/*! For license information please see main.3746d617.js.LICENSE.txt */
!function(){var e={8477:function(e,t,n){"use strict";var i=n(6690).default,r=n(9728).default,o=n(1655).default,a=n(6389).default;t.AgChartsReact=void 0;var s=n(2791),l=n(2007),u=n(850),c=function(e){o(n,e);var t=a(n);function n(e){var r;return i(this,n),(r=t.call(this,e)).props=e,r.chartRef=s.createRef(),r}return r(n,[{key:"render",value:function(){return s.createElement("div",{style:this.createStyleForDiv(),ref:this.chartRef})}},{key:"createStyleForDiv",value:function(){var e;return Object.assign({height:"100%"},null!==(e=this.props.containerStyle)&&void 0!==e?e:{})}},{key:"componentDidMount",value:function(){var e=this,t=this.applyContainerIfNotSet(this.props.options),n=u.AgChart.create(t);this.chart=n,n.chart.waitForUpdate().then((function(){var t,i;return null===(i=(t=e.props).onChartReady)||void 0===i?void 0:i.call(t,n)}))}},{key:"applyContainerIfNotSet",value:function(e){return e.container?e:Object.assign(Object.assign({},e),{container:this.chartRef.current})}},{key:"shouldComponentUpdate",value:function(e){return this.processPropsChanges(this.props,e),!1}},{key:"processPropsChanges",value:function(e,t){this.chart&&u.AgChart.update(this.chart,this.applyContainerIfNotSet(t.options))}},{key:"componentWillUnmount",value:function(){this.chart&&(this.chart.destroy(),this.chart=void 0)}}]),n}(s.Component);t.AgChartsReact=c,c.propTypes={options:l.object}},9653:function(e,t,n){t.AgChartsReact=n(8477).AgChartsReact},888:function(e,t,n){"use strict";var i=n(9047);function r(){}function o(){}o.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,o,a){if(a!==i){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:r};return n.PropTypes=n,n}},2007:function(e,t,n){e.exports=n(888)()},9047:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1071:function(e,t,n){"use strict";var i=n(2791);function r(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);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=Object.prototype.hasOwnProperty,a=/^[: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]*$/,s={},l={};function u(e){return!!o.call(l,e)||!o.call(s,e)&&(a.test(e)?l[e]=!0:(s[e]=!0,!1))}function c(e,t,n,i,r,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var d={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){d[e]=new c(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];d[t]=new c(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){d[e]=new c(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){d[e]=new c(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){d[e]=new c(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){d[e]=new c(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){d[e]=new c(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){d[e]=new c(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){d[e]=new c(e,5,!1,e.toLowerCase(),null,!1,!1)}));var h=/[\-:]([a-z])/g;function p(e){return e[1].toUpperCase()}"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(h,p);d[t]=new c(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(h,p);d[t]=new c(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(h,p);d[t]=new c(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){d[e]=new c(e,1,!1,e.toLowerCase(),null,!1,!1)})),d.xlinkHref=new c("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){d[e]=new c(e,1,!1,e.toLowerCase(),null,!0,!0)}));var f={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},v=["Webkit","ms","Moz","O"];Object.keys(f).forEach((function(e){v.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),f[t]=f[e]}))}));var g=/["'&<>]/;function m(e){if("boolean"===typeof e||"number"===typeof e)return""+e;e=""+e;var t=g.exec(e);if(t){var n,i="",r=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}r!==n&&(i+=e.substring(r,n)),r=n+1,i+=t}e=r!==n?i+e.substring(r,n):i}return e}var y=/([A-Z])/g,C=/^ms-/,k=Array.isArray;function w(e,t){return{insertionMode:e,selectedValue:t}}var S=new Map;function b(e,t,n){if("object"!==typeof n)throw Error(r(62));for(var i in t=!0,n)if(o.call(n,i)){var a=n[i];if(null!=a&&"boolean"!==typeof a&&""!==a){if(0===i.indexOf("--")){var s=m(i);a=m((""+a).trim())}else{s=i;var l=S.get(s);void 0!==l||(l=m(s.replace(y,"-$1").toLowerCase().replace(C,"-ms-")),S.set(s,l)),s=l,a="number"===typeof a?0===a||o.call(f,i)?""+a:a+"px":m((""+a).trim())}t?(t=!1,e.push(' style="',s,":",a)):e.push(";",s,":",a)}}t||e.push('"')}function E(e,t,n,i){switch(n){case"style":return void b(e,t,i);case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])if(null!==(t=d.hasOwnProperty(n)?d[n]:null)){switch(typeof i){case"function":case"symbol":return;case"boolean":if(!t.acceptsBooleans)return}switch(n=t.attributeName,t.type){case 3:i&&e.push(" ",n,'=""');break;case 4:!0===i?e.push(" ",n,'=""'):!1!==i&&e.push(" ",n,'="',m(i),'"');break;case 5:isNaN(i)||e.push(" ",n,'="',m(i),'"');break;case 6:!isNaN(i)&&1<=i&&e.push(" ",n,'="',m(i),'"');break;default:t.sanitizeURL&&(i=""+i),e.push(" ",n,'="',m(i),'"')}}else if(u(n)){switch(typeof i){case"function":case"symbol":return;case"boolean":if("data-"!==(t=n.toLowerCase().slice(0,5))&&"aria-"!==t)return}e.push(" ",n,'="',m(i),'"')}}function x(e,t,n){if(null!=t){if(null!=n)throw Error(r(60));if("object"!==typeof t||!("__html"in t))throw Error(r(61));null!==(t=t.__html)&&void 0!==t&&e.push(""+t)}}function R(e,t,n,i){e.push(O(n));var r,a=n=null;for(r in t)if(o.call(t,r)){var s=t[r];if(null!=s)switch(r){case"children":n=s;break;case"dangerouslySetInnerHTML":a=s;break;default:E(e,i,r,s)}}return e.push(">"),x(e,a,n),"string"===typeof n?(e.push(m(n)),null):n}var D=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,T=new Map;function O(e){var t=T.get(e);if(void 0===t){if(!D.test(e))throw Error(r(65,e));t="<"+e,T.set(e,t)}return t}function P(e,t,n,a,s){switch(t){case"select":e.push(O("select"));var l=null,c=null;for(f in n)if(o.call(n,f)){var d=n[f];if(null!=d)switch(f){case"children":l=d;break;case"dangerouslySetInnerHTML":c=d;break;case"defaultValue":case"value":break;default:E(e,a,f,d)}}return e.push(">"),x(e,c,l),l;case"option":c=s.selectedValue,e.push(O("option"));var h=d=null,p=null,f=null;for(l in n)if(o.call(n,l)){var v=n[l];if(null!=v)switch(l){case"children":d=v;break;case"selected":p=v;break;case"dangerouslySetInnerHTML":f=v;break;case"value":h=v;default:E(e,a,l,v)}}if(null!=c)if(n=null!==h?""+h:function(e){var t="";return i.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(d),k(c)){for(a=0;a<c.length;a++)if(""+c[a]===n){e.push(' selected=""');break}}else""+c===n&&e.push(' selected=""');else p&&e.push(' selected=""');return e.push(">"),x(e,f,d),d;case"textarea":for(d in e.push(O("textarea")),f=c=l=null,n)if(o.call(n,d)&&null!=(h=n[d]))switch(d){case"children":f=h;break;case"value":l=h;break;case"defaultValue":c=h;break;case"dangerouslySetInnerHTML":throw Error(r(91));default:E(e,a,d,h)}if(null===l&&null!==c&&(l=c),e.push(">"),null!=f){if(null!=l)throw Error(r(92));if(k(f)&&1<f.length)throw Error(r(93));l=""+f}return"string"===typeof l&&"\n"===l[0]&&e.push("\n"),null!==l&&e.push(m(""+l)),null;case"input":for(c in e.push(O("input")),h=f=d=l=null,n)if(o.call(n,c)&&null!=(p=n[c]))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(r(399,"input"));case"defaultChecked":h=p;break;case"defaultValue":d=p;break;case"checked":f=p;break;case"value":l=p;break;default:E(e,a,c,p)}return null!==f?E(e,a,"checked",f):null!==h&&E(e,a,"checked",h),null!==l?E(e,a,"value",l):null!==d&&E(e,a,"value",d),e.push("/>"),null;case"menuitem":for(var g in e.push(O("menuitem")),n)if(o.call(n,g)&&null!=(l=n[g]))switch(g){case"children":case"dangerouslySetInnerHTML":throw Error(r(400));default:E(e,a,g,l)}return e.push(">"),null;case"title":for(v in e.push(O("title")),l=null,n)if(o.call(n,v)&&null!=(c=n[v]))switch(v){case"children":l=c;break;case"dangerouslySetInnerHTML":throw Error(r(434));default:E(e,a,v,c)}return e.push(">"),l;case"listing":case"pre":for(h in e.push(O(t)),c=l=null,n)if(o.call(n,h)&&null!=(d=n[h]))switch(h){case"children":l=d;break;case"dangerouslySetInnerHTML":c=d;break;default:E(e,a,h,d)}if(e.push(">"),null!=c){if(null!=l)throw Error(r(60));if("object"!==typeof c||!("__html"in c))throw Error(r(61));null!==(n=c.__html)&&void 0!==n&&("string"===typeof n&&0<n.length&&"\n"===n[0]?e.push("\n",n):e.push(""+n))}return"string"===typeof l&&"\n"===l[0]&&e.push("\n"),l;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":for(var y in e.push(O(t)),n)if(o.call(n,y)&&null!=(l=n[y]))switch(y){case"children":case"dangerouslySetInnerHTML":throw Error(r(399,t));default:E(e,a,y,l)}return e.push("/>"),null;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 R(e,n,t,a);case"html":return 0===s.insertionMode&&e.push("<!DOCTYPE html>"),R(e,n,t,a);default:if(-1===t.indexOf("-")&&"string"!==typeof n.is)return R(e,n,t,a);for(p in e.push(O(t)),c=l=null,n)if(o.call(n,p)&&null!=(d=n[p]))switch(p){case"children":l=d;break;case"dangerouslySetInnerHTML":c=d;break;case"style":b(e,a,d);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:u(p)&&"function"!==typeof d&&"symbol"!==typeof d&&e.push(" ",p,'="',m(d),'"')}return e.push(">"),x(e,c,l),l}}function A(e,t,n){if(e.push('\x3c!--$?--\x3e<template id="'),null===n)throw Error(r(395));return e.push(n),e.push('"></template>')}var M=/[<\u2028\u2029]/g;function N(e){return JSON.stringify(e).replace(M,(function(e){switch(e){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}}))}function L(e,t,n,i){return n.generateStaticMarkup?(e.push(m(t)),!1):(""===t?e=i:(i&&e.push("\x3c!-- --\x3e"),e.push(m(t)),e=!0),e)}var I=Object.assign,F=Symbol.for("react.element"),_=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),Z=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),B=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),Y=Symbol.for("react.scope"),X=Symbol.for("react.debug_trace_mode"),q=Symbol.for("react.legacy_hidden"),Q=Symbol.for("react.default_value"),J=Symbol.iterator;function $(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 G:return"Fragment";case _:return"Portal";case V:return"Profiler";case Z:return"StrictMode";case z:return"Suspense";case U:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case B:return(e.displayName||"Context")+".Consumer";case H:return(e._context.displayName||"Context")+".Provider";case W:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case j:return null!==(t=e.displayName||null)?t:$(e.type)||"Memo";case K:t=e._payload,e=e._init;try{return $(e(t))}catch(n){}}return null}var ee={};function te(e,t){if(!(e=e.contextTypes))return ee;var n,i={};for(n in e)i[n]=t[n];return i}var ne=null;function ie(e,t){if(e!==t){e.context._currentValue2=e.parentValue,e=e.parent;var n=t.parent;if(null===e){if(null!==n)throw Error(r(401))}else{if(null===n)throw Error(r(401));ie(e,n)}t.context._currentValue2=t.value}}function re(e){e.context._currentValue2=e.parentValue,null!==(e=e.parent)&&re(e)}function oe(e){var t=e.parent;null!==t&&oe(t),e.context._currentValue2=e.value}function ae(e,t){if(e.context._currentValue2=e.parentValue,null===(e=e.parent))throw Error(r(402));e.depth===t.depth?ie(e,t):ae(e,t)}function se(e,t){var n=t.parent;if(null===n)throw Error(r(402));e.depth===n.depth?ie(e,n):se(e,n),t.context._currentValue2=t.value}function le(e){var t=ne;t!==e&&(null===t?oe(e):null===e?re(t):t.depth===e.depth?ie(t,e):t.depth>e.depth?ae(t,e):se(t,e),ne=e)}var ue={isMounted:function(){return!1},enqueueSetState:function(e,t){null!==(e=e._reactInternals).queue&&e.queue.push(t)},enqueueReplaceState:function(e,t){(e=e._reactInternals).replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function ce(e,t,n,i){var r=void 0!==e.state?e.state:null;e.updater=ue,e.props=n,e.state=r;var o={queue:[],replace:!1};e._reactInternals=o;var a=t.contextType;if(e.context="object"===typeof a&&null!==a?a._currentValue2:i,"function"===typeof(a=t.getDerivedStateFromProps)&&(r=null===(a=a(n,r))||void 0===a?r:I({},r,a),e.state=r),"function"!==typeof t.getDerivedStateFromProps&&"function"!==typeof e.getSnapshotBeforeUpdate&&("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount))if(t=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),t!==e.state&&ue.enqueueReplaceState(e,e.state,null),null!==o.queue&&0<o.queue.length)if(t=o.queue,a=o.replace,o.queue=null,o.replace=!1,a&&1===t.length)e.state=t[0];else{for(o=a?t[0]:e.state,r=!0,a=a?1:0;a<t.length;a++){var s=t[a];null!=(s="function"===typeof s?s.call(e,o,n,i):s)&&(r?(r=!1,o=I({},o,s)):I(o,s))}e.state=o}else o.queue=null}var de={id:1,overflow:""};function he(e,t,n){var i=e.id;e=e.overflow;var r=32-pe(i)-1;i&=~(1<<r),n+=1;var o=32-pe(t)+r;if(30<o){var a=r-r%5;return o=(i&(1<<a)-1).toString(32),i>>=a,r-=a,{id:1<<32-pe(t)+r|n<<r|i,overflow:o+e}}return{id:1<<o|n<<r|i,overflow:e}}var pe=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(fe(e)/ve|0)|0},fe=Math.log,ve=Math.LN2;var ge="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},me=null,ye=null,Ce=null,ke=null,we=!1,Se=!1,be=0,Ee=null,xe=0;function Re(){if(null===me)throw Error(r(321));return me}function De(){if(0<xe)throw Error(r(312));return{memoizedState:null,queue:null,next:null}}function Te(){return null===ke?null===Ce?(we=!1,Ce=ke=De()):(we=!0,ke=Ce):null===ke.next?(we=!1,ke=ke.next=De()):(we=!0,ke=ke.next),ke}function Oe(){ye=me=null,Se=!1,Ce=null,xe=0,ke=Ee=null}function Pe(e,t){return"function"===typeof t?t(e):t}function Ae(e,t,n){if(me=Re(),ke=Te(),we){var i=ke.queue;if(t=i.dispatch,null!==Ee&&void 0!==(n=Ee.get(i))){Ee.delete(i),i=ke.memoizedState;do{i=e(i,n.action),n=n.next}while(null!==n);return ke.memoizedState=i,[i,t]}return[ke.memoizedState,t]}return e=e===Pe?"function"===typeof t?t():t:void 0!==n?n(t):t,ke.memoizedState=e,e=(e=ke.queue={last:null,dispatch:null}).dispatch=Ne.bind(null,me,e),[ke.memoizedState,e]}function Me(e,t){if(me=Re(),t=void 0===t?null:t,null!==(ke=Te())){var n=ke.memoizedState;if(null!==n&&null!==t){var i=n[1];e:if(null===i)i=!1;else{for(var r=0;r<i.length&&r<t.length;r++)if(!ge(t[r],i[r])){i=!1;break e}i=!0}if(i)return n[0]}}return e=e(),ke.memoizedState=[e,t],e}function Ne(e,t,n){if(25<=xe)throw Error(r(301));if(e===me)if(Se=!0,e={action:n,next:null},null===Ee&&(Ee=new Map),void 0===(n=Ee.get(t)))Ee.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}function Le(){throw Error(r(394))}function Ie(){}var Fe={readContext:function(e){return e._currentValue2},useContext:function(e){return Re(),e._currentValue2},useMemo:Me,useReducer:Ae,useRef:function(e){me=Re();var t=(ke=Te()).memoizedState;return null===t?(e={current:e},ke.memoizedState=e):t},useState:function(e){return Ae(Pe,e)},useInsertionEffect:Ie,useLayoutEffect:function(){},useCallback:function(e,t){return Me((function(){return e}),t)},useImperativeHandle:Ie,useEffect:Ie,useDebugValue:Ie,useDeferredValue:function(e){return Re(),e},useTransition:function(){return Re(),[!1,Le]},useId:function(){var e=ye.treeContext,t=e.overflow;e=((e=e.id)&~(1<<32-pe(e)-1)).toString(32)+t;var n=_e;if(null===n)throw Error(r(404));return t=be++,e=":"+n.idPrefix+"R"+e,0<t&&(e+="H"+t.toString(32)),e+":"},useMutableSource:function(e,t){return Re(),t(e._source)},useSyncExternalStore:function(e,t,n){if(void 0===n)throw Error(r(407));return n()}},_e=null,Ge=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function Ze(e){return console.error(e),null}function Ve(){}function He(e,t,n,i,r,o,a,s){e.allPendingTasks++,null===n?e.pendingRootTasks++:n.pendingTasks++;var l={node:t,ping:function(){var t=e.pingedTasks;t.push(l),1===t.length&&nt(e)},blockedBoundary:n,blockedSegment:i,abortSet:r,legacyContext:o,context:a,treeContext:s};return r.add(l),l}function Be(e,t,n,i,r,o){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:i,boundary:n,lastPushedText:r,textEmbedded:o}}function We(e,t){if(null!=(e=e.onError(t))&&"string"!==typeof e)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof e+'" instead');return e}function ze(e,t){var n=e.onShellError;n(t),(n=e.onFatalError)(t),null!==e.destination?(e.status=2,e.destination.destroy(t)):(e.status=1,e.fatalError=t)}function Ue(e,t,n,i,r){for(me={},ye=t,be=0,e=n(i,r);Se;)Se=!1,be=0,xe+=1,ke=null,e=n(i,r);return Oe(),e}function je(e,t,n,i){var o=n.render(),a=i.childContextTypes;if(null!==a&&void 0!==a){var s=t.legacyContext;if("function"!==typeof n.getChildContext)i=s;else{for(var l in n=n.getChildContext())if(!(l in a))throw Error(r(108,$(i)||"Unknown",l));i=I({},s,n)}t.legacyContext=i,Xe(e,t,o),t.legacyContext=s}else Xe(e,t,o)}function Ke(e,t){if(e&&e.defaultProps){for(var n in t=I({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function Ye(e,t,n,i,o){if("function"===typeof n)if(n.prototype&&n.prototype.isReactComponent){o=te(n,t.legacyContext);var a=n.contextType;ce(a=new n(i,"object"===typeof a&&null!==a?a._currentValue2:o),n,i,o),je(e,t,a,n)}else{o=Ue(e,t,n,i,a=te(n,t.legacyContext));var s=0!==be;if("object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof)ce(o,n,i,a),je(e,t,o,n);else if(s){i=t.treeContext,t.treeContext=he(i,1,0);try{Xe(e,t,o)}finally{t.treeContext=i}}else Xe(e,t,o)}else{if("string"!==typeof n){switch(n){case q:case X:case Z:case V:case G:case U:return void Xe(e,t,i.children);case Y:throw Error(r(343));case z:e:{n=t.blockedBoundary,o=t.blockedSegment,a=i.fallback,i=i.children;var l={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:s=new Set,errorDigest:null},u=Be(0,o.chunks.length,l,o.formatContext,!1,!1);o.children.push(u),o.lastPushedText=!1;var c=Be(0,0,null,o.formatContext,!1,!1);c.parentFlushed=!0,t.blockedBoundary=l,t.blockedSegment=c;try{if(Qe(e,t,i),e.responseState.generateStaticMarkup||c.lastPushedText&&c.textEmbedded&&c.chunks.push("\x3c!-- --\x3e"),c.status=1,et(l,c),0===l.pendingTasks)break e}catch(d){c.status=4,l.forceClientRender=!0,l.errorDigest=We(e,d)}finally{t.blockedBoundary=n,t.blockedSegment=o}t=He(e,a,n,u,s,t.legacyContext,t.context,t.treeContext),e.pingedTasks.push(t)}return}if("object"===typeof n&&null!==n)switch(n.$$typeof){case W:if(i=Ue(e,t,n.render,i,o),0!==be){n=t.treeContext,t.treeContext=he(n,1,0);try{Xe(e,t,i)}finally{t.treeContext=n}}else Xe(e,t,i);return;case j:return void Ye(e,t,n=n.type,i=Ke(n,i),o);case H:if(o=i.children,n=n._context,i=i.value,a=n._currentValue2,n._currentValue2=i,ne=i={parent:s=ne,depth:null===s?0:s.depth+1,context:n,parentValue:a,value:i},t.context=i,Xe(e,t,o),null===(e=ne))throw Error(r(403));return i=e.parentValue,e.context._currentValue2=i===Q?e.context._defaultValue:i,e=ne=e.parent,void(t.context=e);case B:return void Xe(e,t,i=(i=i.children)(n._currentValue2));case K:return void Ye(e,t,n=(o=n._init)(n._payload),i=Ke(n,i),void 0)}throw Error(r(130,null==n?n:typeof n,""))}switch(a=P((o=t.blockedSegment).chunks,n,i,e.responseState,o.formatContext),o.lastPushedText=!1,s=o.formatContext,o.formatContext=function(e,t,n){switch(t){case"select":return w(1,null!=n.value?n.value:n.defaultValue);case"svg":return w(2,null);case"math":return w(3,null);case"foreignObject":return w(1,null);case"table":return w(4,null);case"thead":case"tbody":case"tfoot":return w(5,null);case"colgroup":return w(7,null);case"tr":return w(6,null)}return 4<=e.insertionMode||0===e.insertionMode?w(1,null):e}(s,n,i),Qe(e,t,a),o.formatContext=s,n){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:o.chunks.push("</",n,">")}o.lastPushedText=!1}}function Xe(e,t,n){if(t.node=n,"object"===typeof n&&null!==n){switch(n.$$typeof){case F:return void Ye(e,t,n.type,n.props,n.ref);case _:throw Error(r(257));case K:var i=n._init;return void Xe(e,t,n=i(n._payload))}if(k(n))return void qe(e,t,n);if(null===n||"object"!==typeof n?i=null:i="function"===typeof(i=J&&n[J]||n["@@iterator"])?i:null,i&&(i=i.call(n))){if(!(n=i.next()).done){var o=[];do{o.push(n.value),n=i.next()}while(!n.done);qe(e,t,o)}return}throw e=Object.prototype.toString.call(n),Error(r(31,"[object Object]"===e?"object with keys {"+Object.keys(n).join(", ")+"}":e))}"string"===typeof n?(i=t.blockedSegment).lastPushedText=L(t.blockedSegment.chunks,n,e.responseState,i.lastPushedText):"number"===typeof n&&((i=t.blockedSegment).lastPushedText=L(t.blockedSegment.chunks,""+n,e.responseState,i.lastPushedText))}function qe(e,t,n){for(var i=n.length,r=0;r<i;r++){var o=t.treeContext;t.treeContext=he(o,i,r);try{Qe(e,t,n[r])}finally{t.treeContext=o}}}function Qe(e,t,n){var i=t.blockedSegment.formatContext,r=t.legacyContext,o=t.context;try{return Xe(e,t,n)}catch(l){if(Oe(),"object"!==typeof l||null===l||"function"!==typeof l.then)throw t.blockedSegment.formatContext=i,t.legacyContext=r,t.context=o,le(o),l;n=l;var a=t.blockedSegment,s=Be(0,a.chunks.length,null,a.formatContext,a.lastPushedText,!0);a.children.push(s),a.lastPushedText=!1,e=He(e,t.node,t.blockedBoundary,s,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,n.then(e,e),t.blockedSegment.formatContext=i,t.legacyContext=r,t.context=o,le(o)}}function Je(e){var t=e.blockedBoundary;(e=e.blockedSegment).status=3,tt(this,t,e)}function $e(e,t,n){var i=e.blockedBoundary;e.blockedSegment.status=3,null===i?(t.allPendingTasks--,2!==t.status&&(t.status=2,null!==t.destination&&t.destination.push(null))):(i.pendingTasks--,i.forceClientRender||(i.forceClientRender=!0,e=void 0===n?Error(r(432)):n,i.errorDigest=t.onError(e),i.parentFlushed&&t.clientRenderedBoundaries.push(i)),i.fallbackAbortableTasks.forEach((function(e){return $e(e,t,n)})),i.fallbackAbortableTasks.clear(),t.allPendingTasks--,0===t.allPendingTasks&&(i=t.onAllReady)())}function et(e,t){if(0===t.chunks.length&&1===t.children.length&&null===t.children[0].boundary){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,1===n.status&&et(e,n)}else e.completedSegments.push(t)}function tt(e,t,n){if(null===t){if(n.parentFlushed){if(null!==e.completedRootSegment)throw Error(r(389));e.completedRootSegment=n}e.pendingRootTasks--,0===e.pendingRootTasks&&(e.onShellError=Ve,(t=e.onShellReady)())}else t.pendingTasks--,t.forceClientRender||(0===t.pendingTasks?(n.parentFlushed&&1===n.status&&et(t,n),t.parentFlushed&&e.completedBoundaries.push(t),t.fallbackAbortableTasks.forEach(Je,e),t.fallbackAbortableTasks.clear()):n.parentFlushed&&1===n.status&&(et(t,n),1===t.completedSegments.length&&t.parentFlushed&&e.partialBoundaries.push(t)));e.allPendingTasks--,0===e.allPendingTasks&&(e=e.onAllReady)()}function nt(e){if(2!==e.status){var t=ne,n=Ge.current;Ge.current=Fe;var i=_e;_e=e.responseState;try{var r,o=e.pingedTasks;for(r=0;r<o.length;r++){var a=o[r],s=e,l=a.blockedSegment;if(0===l.status){le(a.context);try{Xe(s,a,a.node),s.responseState.generateStaticMarkup||l.lastPushedText&&l.textEmbedded&&l.chunks.push("\x3c!-- --\x3e"),a.abortSet.delete(a),l.status=1,tt(s,a.blockedBoundary,l)}catch(p){if(Oe(),"object"===typeof p&&null!==p&&"function"===typeof p.then){var u=a.ping;p.then(u,u)}else{a.abortSet.delete(a),l.status=4;var c=a.blockedBoundary,d=p,h=We(s,d);if(null===c?ze(s,d):(c.pendingTasks--,c.forceClientRender||(c.forceClientRender=!0,c.errorDigest=h,c.parentFlushed&&s.clientRenderedBoundaries.push(c))),s.allPendingTasks--,0===s.allPendingTasks)(0,s.onAllReady)()}}}}o.splice(0,r),null!==e.destination&&lt(e,e.destination)}catch(p){We(e,p),ze(e,p)}finally{_e=i,Ge.current=n,n===Fe&&le(t)}}}function it(e,t,n){switch(n.parentFlushed=!0,n.status){case 0:var i=n.id=e.nextSegmentId++;return n.lastPushedText=!1,n.textEmbedded=!1,e=e.responseState,t.push('<template id="'),t.push(e.placeholderPrefix),e=i.toString(16),t.push(e),t.push('"></template>');case 1:n.status=2;var o=!0;i=n.chunks;var a=0;n=n.children;for(var s=0;s<n.length;s++){for(o=n[s];a<o.index;a++)t.push(i[a]);o=rt(e,t,o)}for(;a<i.length-1;a++)t.push(i[a]);return a<i.length&&(o=t.push(i[a])),o;default:throw Error(r(390))}}function rt(e,t,n){var i=n.boundary;if(null===i)return it(e,t,n);if(i.parentFlushed=!0,i.forceClientRender)return e.responseState.generateStaticMarkup||(i=i.errorDigest,t.push("\x3c!--$!--\x3e"),t.push("<template"),i&&(t.push(' data-dgst="'),i=m(i),t.push(i),t.push('"')),t.push("></template>")),it(e,t,n),e=!!e.responseState.generateStaticMarkup||t.push("\x3c!--/$--\x3e");if(0<i.pendingTasks){i.rootSegmentID=e.nextSegmentId++,0<i.completedSegments.length&&e.partialBoundaries.push(i);var o=e.responseState,a=o.nextSuspenseID++;return o=o.boundaryPrefix+a.toString(16),i=i.id=o,A(t,e.responseState,i),it(e,t,n),t.push("\x3c!--/$--\x3e")}if(i.byteSize>e.progressiveChunkSize)return i.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(i),A(t,e.responseState,i.id),it(e,t,n),t.push("\x3c!--/$--\x3e");if(e.responseState.generateStaticMarkup||t.push("\x3c!--$--\x3e"),1!==(n=i.completedSegments).length)throw Error(r(391));return rt(e,t,n[0]),e=!!e.responseState.generateStaticMarkup||t.push("\x3c!--/$--\x3e")}function ot(e,t,n){return function(e,t,n,i){switch(n.insertionMode){case 0:case 1:return e.push('<div hidden id="'),e.push(t.segmentPrefix),t=i.toString(16),e.push(t),e.push('">');case 2:return e.push('<svg aria-hidden="true" style="display:none" id="'),e.push(t.segmentPrefix),t=i.toString(16),e.push(t),e.push('">');case 3:return e.push('<math aria-hidden="true" style="display:none" id="'),e.push(t.segmentPrefix),t=i.toString(16),e.push(t),e.push('">');case 4:return e.push('<table hidden id="'),e.push(t.segmentPrefix),t=i.toString(16),e.push(t),e.push('">');case 5:return e.push('<table hidden><tbody id="'),e.push(t.segmentPrefix),t=i.toString(16),e.push(t),e.push('">');case 6:return e.push('<table hidden><tr id="'),e.push(t.segmentPrefix),t=i.toString(16),e.push(t),e.push('">');case 7:return e.push('<table hidden><colgroup id="'),e.push(t.segmentPrefix),t=i.toString(16),e.push(t),e.push('">');default:throw Error(r(397))}}(t,e.responseState,n.formatContext,n.id),rt(e,t,n),function(e,t){switch(t.insertionMode){case 0:case 1:return e.push("</div>");case 2:return e.push("</svg>");case 3:return e.push("</math>");case 4:return e.push("</table>");case 5:return e.push("</tbody></table>");case 6:return e.push("</tr></table>");case 7:return e.push("</colgroup></table>");default:throw Error(r(397))}}(t,n.formatContext)}function at(e,t,n){for(var i=n.completedSegments,o=0;o<i.length;o++)st(e,t,n,i[o]);if(i.length=0,e=e.responseState,i=n.id,n=n.rootSegmentID,t.push(e.startInlineScript),e.sentCompleteBoundaryFunction?t.push('$RC("'):(e.sentCompleteBoundaryFunction=!0,t.push('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')),null===i)throw Error(r(395));return n=n.toString(16),t.push(i),t.push('","'),t.push(e.segmentPrefix),t.push(n),t.push('")<\/script>')}function st(e,t,n,i){if(2===i.status)return!0;var o=i.id;if(-1===o){if(-1===(i.id=n.rootSegmentID))throw Error(r(392));return ot(e,t,i)}return ot(e,t,i),e=e.responseState,t.push(e.startInlineScript),e.sentCompleteSegmentFunction?t.push('$RS("'):(e.sentCompleteSegmentFunction=!0,t.push('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')),t.push(e.segmentPrefix),o=o.toString(16),t.push(o),t.push('","'),t.push(e.placeholderPrefix),t.push(o),t.push('")<\/script>')}function lt(e,t){try{var n=e.completedRootSegment;if(null!==n&&0===e.pendingRootTasks){rt(e,t,n),e.completedRootSegment=null;var i=e.responseState.bootstrapChunks;for(n=0;n<i.length-1;n++)t.push(i[n]);n<i.length&&t.push(i[n])}var o,a=e.clientRenderedBoundaries;for(o=0;o<a.length;o++){var s=a[o];i=t;var l=e.responseState,u=s.id,c=s.errorDigest,d=s.errorMessage,h=s.errorComponentStack;if(i.push(l.startInlineScript),l.sentClientRenderFunction?i.push('$RX("'):(l.sentClientRenderFunction=!0,i.push('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("')),null===u)throw Error(r(395));if(i.push(u),i.push('"'),c||d||h){i.push(",");var p=N(c||"");i.push(p)}if(d||h){i.push(",");var f=N(d||"");i.push(f)}if(h){i.push(",");var v=N(h);i.push(v)}if(!i.push(")<\/script>"))return e.destination=null,o++,void a.splice(0,o)}a.splice(0,o);var g=e.completedBoundaries;for(o=0;o<g.length;o++)if(!at(e,t,g[o]))return e.destination=null,o++,void g.splice(0,o);g.splice(0,o);var m=e.partialBoundaries;for(o=0;o<m.length;o++){var y=m[o];e:{a=e,s=t;var C=y.completedSegments;for(l=0;l<C.length;l++)if(!st(a,s,y,C[l])){l++,C.splice(0,l);var k=!1;break e}C.splice(0,l),k=!0}if(!k)return e.destination=null,o++,void m.splice(0,o)}m.splice(0,o);var w=e.completedBoundaries;for(o=0;o<w.length;o++)if(!at(e,t,w[o]))return e.destination=null,o++,void w.splice(0,o);w.splice(0,o)}finally{0===e.allPendingTasks&&0===e.pingedTasks.length&&0===e.clientRenderedBoundaries.length&&0===e.completedBoundaries.length&&t.push(null)}}function ut(e,t){try{var n=e.abortableTasks;n.forEach((function(n){return $e(n,e,t)})),n.clear(),null!==e.destination&&lt(e,e.destination)}catch(i){We(e,i),ze(e,i)}}function ct(){}function dt(e,t,n,i){var o=!1,a=null,s="",l={push:function(e){return null!==e&&(s+=e),!0},destroy:function(e){o=!0,a=e}},u=!1;if(e=function(e,t,n,i,r,o,a,s,l){var u=[],c=new Set;return(n=Be(t={destination:null,responseState:t,progressiveChunkSize:void 0===i?12800:i,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:c,pingedTasks:u,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===r?Ze:r,onAllReady:void 0===o?Ve:o,onShellReady:void 0===a?Ve:a,onShellError:void 0===s?Ve:s,onFatalError:void 0===l?Ve:l},0,null,n,!1,!1)).parentFlushed=!0,e=He(t,e,null,n,c,ee,null,de),u.push(e),t}(e,function(e,t){return{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:(t=void 0===t?"":t)+"P:",segmentPrefix:t+"S:",boundaryPrefix:t+"B:",idPrefix:t,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:e}}(n,t?t.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,ct,void 0,(function(){u=!0}),void 0,void 0),nt(e),ut(e,i),1===e.status)e.status=2,l.destroy(e.fatalError);else if(2!==e.status&&null===e.destination){e.destination=l;try{lt(e,l)}catch(c){We(e,c),ze(e,c)}}if(o)throw a;if(!u)throw Error(r(426));return s}t.renderToNodeStream=function(){throw Error(r(207))},t.renderToStaticMarkup=function(e,t){return dt(e,t,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},t.renderToStaticNodeStream=function(){throw Error(r(208))},t.renderToString=function(e,t){return dt(e,t,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},t.version="18.2.0"},4424:function(e,t,n){"use strict";var i=n(2791);function r(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);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=null,a=0;function s(e,t){if(0!==t.length)if(512<t.length)0<a&&(e.enqueue(new Uint8Array(o.buffer,0,a)),o=new Uint8Array(512),a=0),e.enqueue(t);else{var n=o.length-a;n<t.length&&(0===n?e.enqueue(o):(o.set(t.subarray(0,n),a),e.enqueue(o),t=t.subarray(n)),o=new Uint8Array(512),a=0),o.set(t,a),a+=t.length}}function l(e,t){return s(e,t),!0}function u(e){o&&0<a&&(e.enqueue(new Uint8Array(o.buffer,0,a)),o=null,a=0)}var c=new TextEncoder;function d(e){return c.encode(e)}function h(e){return c.encode(e)}function p(e,t){"function"===typeof e.error?e.error(t):e.close()}var f=Object.prototype.hasOwnProperty,v=/^[: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]*$/,g={},m={};function y(e){return!!f.call(m,e)||!f.call(g,e)&&(v.test(e)?m[e]=!0:(g[e]=!0,!1))}function C(e,t,n,i,r,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){k[e]=new C(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];k[t]=new C(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){k[e]=new C(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){k[e]=new C(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){k[e]=new C(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){k[e]=new C(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){k[e]=new C(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){k[e]=new C(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){k[e]=new C(e,5,!1,e.toLowerCase(),null,!1,!1)}));var w=/[\-:]([a-z])/g;function S(e){return e[1].toUpperCase()}"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(w,S);k[t]=new C(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(w,S);k[t]=new C(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(w,S);k[t]=new C(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){k[e]=new C(e,1,!1,e.toLowerCase(),null,!1,!1)})),k.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){k[e]=new C(e,1,!1,e.toLowerCase(),null,!0,!0)}));var b={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},E=["Webkit","ms","Moz","O"];Object.keys(b).forEach((function(e){E.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),b[t]=b[e]}))}));var x=/["'&<>]/;function R(e){if("boolean"===typeof e||"number"===typeof e)return""+e;e=""+e;var t=x.exec(e);if(t){var n,i="",r=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}r!==n&&(i+=e.substring(r,n)),r=n+1,i+=t}e=r!==n?i+e.substring(r,n):i}return e}var D=/([A-Z])/g,T=/^ms-/,O=Array.isArray,P=h("<script>"),A=h("<\/script>"),M=h('<script src="'),N=h('<script type="module" src="'),L=h('" async=""><\/script>'),I=/(<\/|<)(s)(cript)/gi;function F(e,t,n,i){return t+("s"===n?"\\u0073":"\\u0053")+i}function _(e,t){return{insertionMode:e,selectedValue:t}}var G=h("\x3c!-- --\x3e");function Z(e,t,n,i){return""===t?i:(i&&e.push(G),e.push(d(R(t))),!0)}var V=new Map,H=h(' style="'),B=h(":"),W=h(";");function z(e,t,n){if("object"!==typeof n)throw Error(r(62));for(var i in t=!0,n)if(f.call(n,i)){var o=n[i];if(null!=o&&"boolean"!==typeof o&&""!==o){if(0===i.indexOf("--")){var a=d(R(i));o=d(R((""+o).trim()))}else{a=i;var s=V.get(a);void 0!==s||(s=h(R(a.replace(D,"-$1").toLowerCase().replace(T,"-ms-"))),V.set(a,s)),a=s,o="number"===typeof o?0===o||f.call(b,i)?d(""+o):d(o+"px"):d(R((""+o).trim()))}t?(t=!1,e.push(H,a,B,o)):e.push(W,a,B,o)}}t||e.push(K)}var U=h(" "),j=h('="'),K=h('"'),Y=h('=""');function X(e,t,n,i){switch(n){case"style":return void z(e,t,i);case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])if(null!==(t=k.hasOwnProperty(n)?k[n]:null)){switch(typeof i){case"function":case"symbol":return;case"boolean":if(!t.acceptsBooleans)return}switch(n=d(t.attributeName),t.type){case 3:i&&e.push(U,n,Y);break;case 4:!0===i?e.push(U,n,Y):!1!==i&&e.push(U,n,j,d(R(i)),K);break;case 5:isNaN(i)||e.push(U,n,j,d(R(i)),K);break;case 6:!isNaN(i)&&1<=i&&e.push(U,n,j,d(R(i)),K);break;default:t.sanitizeURL&&(i=""+i),e.push(U,n,j,d(R(i)),K)}}else if(y(n)){switch(typeof i){case"function":case"symbol":return;case"boolean":if("data-"!==(t=n.toLowerCase().slice(0,5))&&"aria-"!==t)return}e.push(U,d(n),j,d(R(i)),K)}}var q=h(">"),Q=h("/>");function J(e,t,n){if(null!=t){if(null!=n)throw Error(r(60));if("object"!==typeof t||!("__html"in t))throw Error(r(61));null!==(t=t.__html)&&void 0!==t&&e.push(d(""+t))}}var $=h(' selected=""');function ee(e,t,n,i){e.push(re(n));var r,o=n=null;for(r in t)if(f.call(t,r)){var a=t[r];if(null!=a)switch(r){case"children":n=a;break;case"dangerouslySetInnerHTML":o=a;break;default:X(e,i,r,a)}}return e.push(q),J(e,o,n),"string"===typeof n?(e.push(d(R(n))),null):n}var te=h("\n"),ne=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,ie=new Map;function re(e){var t=ie.get(e);if(void 0===t){if(!ne.test(e))throw Error(r(65,e));t=h("<"+e),ie.set(e,t)}return t}var oe=h("<!DOCTYPE html>");function ae(e,t,n,o,a){switch(t){case"select":e.push(re("select"));var s=null,l=null;for(p in n)if(f.call(n,p)){var u=n[p];if(null!=u)switch(p){case"children":s=u;break;case"dangerouslySetInnerHTML":l=u;break;case"defaultValue":case"value":break;default:X(e,o,p,u)}}return e.push(q),J(e,l,s),s;case"option":l=a.selectedValue,e.push(re("option"));var c=u=null,h=null,p=null;for(s in n)if(f.call(n,s)){var v=n[s];if(null!=v)switch(s){case"children":u=v;break;case"selected":h=v;break;case"dangerouslySetInnerHTML":p=v;break;case"value":c=v;default:X(e,o,s,v)}}if(null!=l)if(n=null!==c?""+c:function(e){var t="";return i.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(u),O(l)){for(o=0;o<l.length;o++)if(""+l[o]===n){e.push($);break}}else""+l===n&&e.push($);else h&&e.push($);return e.push(q),J(e,p,u),u;case"textarea":for(u in e.push(re("textarea")),p=l=s=null,n)if(f.call(n,u)&&null!=(c=n[u]))switch(u){case"children":p=c;break;case"value":s=c;break;case"defaultValue":l=c;break;case"dangerouslySetInnerHTML":throw Error(r(91));default:X(e,o,u,c)}if(null===s&&null!==l&&(s=l),e.push(q),null!=p){if(null!=s)throw Error(r(92));if(O(p)&&1<p.length)throw Error(r(93));s=""+p}return"string"===typeof s&&"\n"===s[0]&&e.push(te),null!==s&&e.push(d(R(""+s))),null;case"input":for(l in e.push(re("input")),c=p=u=s=null,n)if(f.call(n,l)&&null!=(h=n[l]))switch(l){case"children":case"dangerouslySetInnerHTML":throw Error(r(399,"input"));case"defaultChecked":c=h;break;case"defaultValue":u=h;break;case"checked":p=h;break;case"value":s=h;break;default:X(e,o,l,h)}return null!==p?X(e,o,"checked",p):null!==c&&X(e,o,"checked",c),null!==s?X(e,o,"value",s):null!==u&&X(e,o,"value",u),e.push(Q),null;case"menuitem":for(var g in e.push(re("menuitem")),n)if(f.call(n,g)&&null!=(s=n[g]))switch(g){case"children":case"dangerouslySetInnerHTML":throw Error(r(400));default:X(e,o,g,s)}return e.push(q),null;case"title":for(v in e.push(re("title")),s=null,n)if(f.call(n,v)&&null!=(l=n[v]))switch(v){case"children":s=l;break;case"dangerouslySetInnerHTML":throw Error(r(434));default:X(e,o,v,l)}return e.push(q),s;case"listing":case"pre":for(c in e.push(re(t)),l=s=null,n)if(f.call(n,c)&&null!=(u=n[c]))switch(c){case"children":s=u;break;case"dangerouslySetInnerHTML":l=u;break;default:X(e,o,c,u)}if(e.push(q),null!=l){if(null!=s)throw Error(r(60));if("object"!==typeof l||!("__html"in l))throw Error(r(61));null!==(n=l.__html)&&void 0!==n&&("string"===typeof n&&0<n.length&&"\n"===n[0]?e.push(te,d(n)):e.push(d(""+n)))}return"string"===typeof s&&"\n"===s[0]&&e.push(te),s;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":for(var m in e.push(re(t)),n)if(f.call(n,m)&&null!=(s=n[m]))switch(m){case"children":case"dangerouslySetInnerHTML":throw Error(r(399,t));default:X(e,o,m,s)}return e.push(Q),null;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 ee(e,n,t,o);case"html":return 0===a.insertionMode&&e.push(oe),ee(e,n,t,o);default:if(-1===t.indexOf("-")&&"string"!==typeof n.is)return ee(e,n,t,o);for(h in e.push(re(t)),l=s=null,n)if(f.call(n,h)&&null!=(u=n[h]))switch(h){case"children":s=u;break;case"dangerouslySetInnerHTML":l=u;break;case"style":z(e,o,u);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:y(h)&&"function"!==typeof u&&"symbol"!==typeof u&&e.push(U,d(h),j,d(R(u)),K)}return e.push(q),J(e,l,s),s}}var se=h("</"),le=h(">"),ue=h('<template id="'),ce=h('"></template>'),de=h("\x3c!--$--\x3e"),he=h('\x3c!--$?--\x3e<template id="'),pe=h('"></template>'),fe=h("\x3c!--$!--\x3e"),ve=h("\x3c!--/$--\x3e"),ge=h("<template"),me=h('"'),ye=h(' data-dgst="');h(' data-msg="'),h(' data-stck="');var Ce=h("></template>");function ke(e,t,n){if(s(e,he),null===n)throw Error(r(395));return s(e,n),l(e,pe)}var we=h('<div hidden id="'),Se=h('">'),be=h("</div>"),Ee=h('<svg aria-hidden="true" style="display:none" id="'),xe=h('">'),Re=h("</svg>"),De=h('<math aria-hidden="true" style="display:none" id="'),Te=h('">'),Oe=h("</math>"),Pe=h('<table hidden id="'),Ae=h('">'),Me=h("</table>"),Ne=h('<table hidden><tbody id="'),Le=h('">'),Ie=h("</tbody></table>"),Fe=h('<table hidden><tr id="'),_e=h('">'),Ge=h("</tr></table>"),Ze=h('<table hidden><colgroup id="'),Ve=h('">'),He=h("</colgroup></table>");var Be=h('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),We=h('$RS("'),ze=h('","'),Ue=h('")<\/script>'),je=h('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),Ke=h('$RC("'),Ye=h('","'),Xe=h('")<\/script>'),qe=h('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),Qe=h('$RX("'),Je=h('"'),$e=h(")<\/script>"),et=h(","),tt=/[<\u2028\u2029]/g;function nt(e){return JSON.stringify(e).replace(tt,(function(e){switch(e){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}}))}var it=Object.assign,rt=Symbol.for("react.element"),ot=Symbol.for("react.portal"),at=Symbol.for("react.fragment"),st=Symbol.for("react.strict_mode"),lt=Symbol.for("react.profiler"),ut=Symbol.for("react.provider"),ct=Symbol.for("react.context"),dt=Symbol.for("react.forward_ref"),ht=Symbol.for("react.suspense"),pt=Symbol.for("react.suspense_list"),ft=Symbol.for("react.memo"),vt=Symbol.for("react.lazy"),gt=Symbol.for("react.scope"),mt=Symbol.for("react.debug_trace_mode"),yt=Symbol.for("react.legacy_hidden"),Ct=Symbol.for("react.default_value"),kt=Symbol.iterator;function wt(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 at:return"Fragment";case ot:return"Portal";case lt:return"Profiler";case st:return"StrictMode";case ht:return"Suspense";case pt:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case ct:return(e.displayName||"Context")+".Consumer";case ut:return(e._context.displayName||"Context")+".Provider";case dt:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case ft:return null!==(t=e.displayName||null)?t:wt(e.type)||"Memo";case vt:t=e._payload,e=e._init;try{return wt(e(t))}catch(n){}}return null}var St={};function bt(e,t){if(!(e=e.contextTypes))return St;var n,i={};for(n in e)i[n]=t[n];return i}var Et=null;function xt(e,t){if(e!==t){e.context._currentValue=e.parentValue,e=e.parent;var n=t.parent;if(null===e){if(null!==n)throw Error(r(401))}else{if(null===n)throw Error(r(401));xt(e,n)}t.context._currentValue=t.value}}function Rt(e){e.context._currentValue=e.parentValue,null!==(e=e.parent)&&Rt(e)}function Dt(e){var t=e.parent;null!==t&&Dt(t),e.context._currentValue=e.value}function Tt(e,t){if(e.context._currentValue=e.parentValue,null===(e=e.parent))throw Error(r(402));e.depth===t.depth?xt(e,t):Tt(e,t)}function Ot(e,t){var n=t.parent;if(null===n)throw Error(r(402));e.depth===n.depth?xt(e,n):Ot(e,n),t.context._currentValue=t.value}function Pt(e){var t=Et;t!==e&&(null===t?Dt(e):null===e?Rt(t):t.depth===e.depth?xt(t,e):t.depth>e.depth?Tt(t,e):Ot(t,e),Et=e)}var At={isMounted:function(){return!1},enqueueSetState:function(e,t){null!==(e=e._reactInternals).queue&&e.queue.push(t)},enqueueReplaceState:function(e,t){(e=e._reactInternals).replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function Mt(e,t,n,i){var r=void 0!==e.state?e.state:null;e.updater=At,e.props=n,e.state=r;var o={queue:[],replace:!1};e._reactInternals=o;var a=t.contextType;if(e.context="object"===typeof a&&null!==a?a._currentValue:i,"function"===typeof(a=t.getDerivedStateFromProps)&&(r=null===(a=a(n,r))||void 0===a?r:it({},r,a),e.state=r),"function"!==typeof t.getDerivedStateFromProps&&"function"!==typeof e.getSnapshotBeforeUpdate&&("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount))if(t=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),t!==e.state&&At.enqueueReplaceState(e,e.state,null),null!==o.queue&&0<o.queue.length)if(t=o.queue,a=o.replace,o.queue=null,o.replace=!1,a&&1===t.length)e.state=t[0];else{for(o=a?t[0]:e.state,r=!0,a=a?1:0;a<t.length;a++){var s=t[a];null!=(s="function"===typeof s?s.call(e,o,n,i):s)&&(r?(r=!1,o=it({},o,s)):it(o,s))}e.state=o}else o.queue=null}var Nt={id:1,overflow:""};function Lt(e,t,n){var i=e.id;e=e.overflow;var r=32-It(i)-1;i&=~(1<<r),n+=1;var o=32-It(t)+r;if(30<o){var a=r-r%5;return o=(i&(1<<a)-1).toString(32),i>>=a,r-=a,{id:1<<32-It(t)+r|n<<r|i,overflow:o+e}}return{id:1<<o|n<<r|i,overflow:e}}var It=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(Ft(e)/_t|0)|0},Ft=Math.log,_t=Math.LN2;var Gt="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},Zt=null,Vt=null,Ht=null,Bt=null,Wt=!1,zt=!1,Ut=0,jt=null,Kt=0;function Yt(){if(null===Zt)throw Error(r(321));return Zt}function Xt(){if(0<Kt)throw Error(r(312));return{memoizedState:null,queue:null,next:null}}function qt(){return null===Bt?null===Ht?(Wt=!1,Ht=Bt=Xt()):(Wt=!0,Bt=Ht):null===Bt.next?(Wt=!1,Bt=Bt.next=Xt()):(Wt=!0,Bt=Bt.next),Bt}function Qt(){Vt=Zt=null,zt=!1,Ht=null,Kt=0,Bt=jt=null}function Jt(e,t){return"function"===typeof t?t(e):t}function $t(e,t,n){if(Zt=Yt(),Bt=qt(),Wt){var i=Bt.queue;if(t=i.dispatch,null!==jt&&void 0!==(n=jt.get(i))){jt.delete(i),i=Bt.memoizedState;do{i=e(i,n.action),n=n.next}while(null!==n);return Bt.memoizedState=i,[i,t]}return[Bt.memoizedState,t]}return e=e===Jt?"function"===typeof t?t():t:void 0!==n?n(t):t,Bt.memoizedState=e,e=(e=Bt.queue={last:null,dispatch:null}).dispatch=tn.bind(null,Zt,e),[Bt.memoizedState,e]}function en(e,t){if(Zt=Yt(),t=void 0===t?null:t,null!==(Bt=qt())){var n=Bt.memoizedState;if(null!==n&&null!==t){var i=n[1];e:if(null===i)i=!1;else{for(var r=0;r<i.length&&r<t.length;r++)if(!Gt(t[r],i[r])){i=!1;break e}i=!0}if(i)return n[0]}}return e=e(),Bt.memoizedState=[e,t],e}function tn(e,t,n){if(25<=Kt)throw Error(r(301));if(e===Zt)if(zt=!0,e={action:n,next:null},null===jt&&(jt=new Map),void 0===(n=jt.get(t)))jt.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}function nn(){throw Error(r(394))}function rn(){}var on={readContext:function(e){return e._currentValue},useContext:function(e){return Yt(),e._currentValue},useMemo:en,useReducer:$t,useRef:function(e){Zt=Yt();var t=(Bt=qt()).memoizedState;return null===t?(e={current:e},Bt.memoizedState=e):t},useState:function(e){return $t(Jt,e)},useInsertionEffect:rn,useLayoutEffect:function(){},useCallback:function(e,t){return en((function(){return e}),t)},useImperativeHandle:rn,useEffect:rn,useDebugValue:rn,useDeferredValue:function(e){return Yt(),e},useTransition:function(){return Yt(),[!1,nn]},useId:function(){var e=Vt.treeContext,t=e.overflow;e=((e=e.id)&~(1<<32-It(e)-1)).toString(32)+t;var n=an;if(null===n)throw Error(r(404));return t=Ut++,e=":"+n.idPrefix+"R"+e,0<t&&(e+="H"+t.toString(32)),e+":"},useMutableSource:function(e,t){return Yt(),t(e._source)},useSyncExternalStore:function(e,t,n){if(void 0===n)throw Error(r(407));return n()}},an=null,sn=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function ln(e){return console.error(e),null}function un(){}function cn(e,t,n,i,r,o,a,s){e.allPendingTasks++,null===n?e.pendingRootTasks++:n.pendingTasks++;var l={node:t,ping:function(){var t=e.pingedTasks;t.push(l),1===t.length&&xn(e)},blockedBoundary:n,blockedSegment:i,abortSet:r,legacyContext:o,context:a,treeContext:s};return r.add(l),l}function dn(e,t,n,i,r,o){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:i,boundary:n,lastPushedText:r,textEmbedded:o}}function hn(e,t){if(null!=(e=e.onError(t))&&"string"!==typeof e)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof e+'" instead');return e}function pn(e,t){var n=e.onShellError;n(t),(n=e.onFatalError)(t),null!==e.destination?(e.status=2,p(e.destination,t)):(e.status=1,e.fatalError=t)}function fn(e,t,n,i,r){for(Zt={},Vt=t,Ut=0,e=n(i,r);zt;)zt=!1,Ut=0,Kt+=1,Bt=null,e=n(i,r);return Qt(),e}function vn(e,t,n,i){var o=n.render(),a=i.childContextTypes;if(null!==a&&void 0!==a){var s=t.legacyContext;if("function"!==typeof n.getChildContext)i=s;else{for(var l in n=n.getChildContext())if(!(l in a))throw Error(r(108,wt(i)||"Unknown",l));i=it({},s,n)}t.legacyContext=i,yn(e,t,o),t.legacyContext=s}else yn(e,t,o)}function gn(e,t){if(e&&e.defaultProps){for(var n in t=it({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function mn(e,t,n,i,o){if("function"===typeof n)if(n.prototype&&n.prototype.isReactComponent){o=bt(n,t.legacyContext);var a=n.contextType;Mt(a=new n(i,"object"===typeof a&&null!==a?a._currentValue:o),n,i,o),vn(e,t,a,n)}else{o=fn(e,t,n,i,a=bt(n,t.legacyContext));var s=0!==Ut;if("object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof)Mt(o,n,i,a),vn(e,t,o,n);else if(s){i=t.treeContext,t.treeContext=Lt(i,1,0);try{yn(e,t,o)}finally{t.treeContext=i}}else yn(e,t,o)}else{if("string"!==typeof n){switch(n){case yt:case mt:case st:case lt:case at:case pt:return void yn(e,t,i.children);case gt:throw Error(r(343));case ht:e:{n=t.blockedBoundary,o=t.blockedSegment,a=i.fallback,i=i.children;var l={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:s=new Set,errorDigest:null},u=dn(0,o.chunks.length,l,o.formatContext,!1,!1);o.children.push(u),o.lastPushedText=!1;var c=dn(0,0,null,o.formatContext,!1,!1);c.parentFlushed=!0,t.blockedBoundary=l,t.blockedSegment=c;try{if(kn(e,t,i),c.lastPushedText&&c.textEmbedded&&c.chunks.push(G),c.status=1,bn(l,c),0===l.pendingTasks)break e}catch(h){c.status=4,l.forceClientRender=!0,l.errorDigest=hn(e,h)}finally{t.blockedBoundary=n,t.blockedSegment=o}t=cn(e,a,n,u,s,t.legacyContext,t.context,t.treeContext),e.pingedTasks.push(t)}return}if("object"===typeof n&&null!==n)switch(n.$$typeof){case dt:if(i=fn(e,t,n.render,i,o),0!==Ut){n=t.treeContext,t.treeContext=Lt(n,1,0);try{yn(e,t,i)}finally{t.treeContext=n}}else yn(e,t,i);return;case ft:return void mn(e,t,n=n.type,i=gn(n,i),o);case ut:if(o=i.children,n=n._context,i=i.value,a=n._currentValue,n._currentValue=i,Et=i={parent:s=Et,depth:null===s?0:s.depth+1,context:n,parentValue:a,value:i},t.context=i,yn(e,t,o),null===(e=Et))throw Error(r(403));return i=e.parentValue,e.context._currentValue=i===Ct?e.context._defaultValue:i,e=Et=e.parent,void(t.context=e);case ct:return void yn(e,t,i=(i=i.children)(n._currentValue));case vt:return void mn(e,t,n=(o=n._init)(n._payload),i=gn(n,i),void 0)}throw Error(r(130,null==n?n:typeof n,""))}switch(a=ae((o=t.blockedSegment).chunks,n,i,e.responseState,o.formatContext),o.lastPushedText=!1,s=o.formatContext,o.formatContext=function(e,t,n){switch(t){case"select":return _(1,null!=n.value?n.value:n.defaultValue);case"svg":return _(2,null);case"math":return _(3,null);case"foreignObject":return _(1,null);case"table":return _(4,null);case"thead":case"tbody":case"tfoot":return _(5,null);case"colgroup":return _(7,null);case"tr":return _(6,null)}return 4<=e.insertionMode||0===e.insertionMode?_(1,null):e}(s,n,i),kn(e,t,a),o.formatContext=s,n){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:o.chunks.push(se,d(n),le)}o.lastPushedText=!1}}function yn(e,t,n){if(t.node=n,"object"===typeof n&&null!==n){switch(n.$$typeof){case rt:return void mn(e,t,n.type,n.props,n.ref);case ot:throw Error(r(257));case vt:var i=n._init;return void yn(e,t,n=i(n._payload))}if(O(n))return void Cn(e,t,n);if(null===n||"object"!==typeof n?i=null:i="function"===typeof(i=kt&&n[kt]||n["@@iterator"])?i:null,i&&(i=i.call(n))){if(!(n=i.next()).done){var o=[];do{o.push(n.value),n=i.next()}while(!n.done);Cn(e,t,o)}return}throw e=Object.prototype.toString.call(n),Error(r(31,"[object Object]"===e?"object with keys {"+Object.keys(n).join(", ")+"}":e))}"string"===typeof n?(i=t.blockedSegment).lastPushedText=Z(t.blockedSegment.chunks,n,e.responseState,i.lastPushedText):"number"===typeof n&&((i=t.blockedSegment).lastPushedText=Z(t.blockedSegment.chunks,""+n,e.responseState,i.lastPushedText))}function Cn(e,t,n){for(var i=n.length,r=0;r<i;r++){var o=t.treeContext;t.treeContext=Lt(o,i,r);try{kn(e,t,n[r])}finally{t.treeContext=o}}}function kn(e,t,n){var i=t.blockedSegment.formatContext,r=t.legacyContext,o=t.context;try{return yn(e,t,n)}catch(l){if(Qt(),"object"!==typeof l||null===l||"function"!==typeof l.then)throw t.blockedSegment.formatContext=i,t.legacyContext=r,t.context=o,Pt(o),l;n=l;var a=t.blockedSegment,s=dn(0,a.chunks.length,null,a.formatContext,a.lastPushedText,!0);a.children.push(s),a.lastPushedText=!1,e=cn(e,t.node,t.blockedBoundary,s,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,n.then(e,e),t.blockedSegment.formatContext=i,t.legacyContext=r,t.context=o,Pt(o)}}function wn(e){var t=e.blockedBoundary;(e=e.blockedSegment).status=3,En(this,t,e)}function Sn(e,t,n){var i=e.blockedBoundary;e.blockedSegment.status=3,null===i?(t.allPendingTasks--,2!==t.status&&(t.status=2,null!==t.destination&&t.destination.close())):(i.pendingTasks--,i.forceClientRender||(i.forceClientRender=!0,e=void 0===n?Error(r(432)):n,i.errorDigest=t.onError(e),i.parentFlushed&&t.clientRenderedBoundaries.push(i)),i.fallbackAbortableTasks.forEach((function(e){return Sn(e,t,n)})),i.fallbackAbortableTasks.clear(),t.allPendingTasks--,0===t.allPendingTasks&&(i=t.onAllReady)())}function bn(e,t){if(0===t.chunks.length&&1===t.children.length&&null===t.children[0].boundary){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,1===n.status&&bn(e,n)}else e.completedSegments.push(t)}function En(e,t,n){if(null===t){if(n.parentFlushed){if(null!==e.completedRootSegment)throw Error(r(389));e.completedRootSegment=n}e.pendingRootTasks--,0===e.pendingRootTasks&&(e.onShellError=un,(t=e.onShellReady)())}else t.pendingTasks--,t.forceClientRender||(0===t.pendingTasks?(n.parentFlushed&&1===n.status&&bn(t,n),t.parentFlushed&&e.completedBoundaries.push(t),t.fallbackAbortableTasks.forEach(wn,e),t.fallbackAbortableTasks.clear()):n.parentFlushed&&1===n.status&&(bn(t,n),1===t.completedSegments.length&&t.parentFlushed&&e.partialBoundaries.push(t)));e.allPendingTasks--,0===e.allPendingTasks&&(e=e.onAllReady)()}function xn(e){if(2!==e.status){var t=Et,n=sn.current;sn.current=on;var i=an;an=e.responseState;try{var r,o=e.pingedTasks;for(r=0;r<o.length;r++){var a=o[r],s=e,l=a.blockedSegment;if(0===l.status){Pt(a.context);try{yn(s,a,a.node),l.lastPushedText&&l.textEmbedded&&l.chunks.push(G),a.abortSet.delete(a),l.status=1,En(s,a.blockedBoundary,l)}catch(p){if(Qt(),"object"===typeof p&&null!==p&&"function"===typeof p.then){var u=a.ping;p.then(u,u)}else{a.abortSet.delete(a),l.status=4;var c=a.blockedBoundary,d=p,h=hn(s,d);if(null===c?pn(s,d):(c.pendingTasks--,c.forceClientRender||(c.forceClientRender=!0,c.errorDigest=h,c.parentFlushed&&s.clientRenderedBoundaries.push(c))),s.allPendingTasks--,0===s.allPendingTasks)(0,s.onAllReady)()}}}}o.splice(0,r),null!==e.destination&&An(e,e.destination)}catch(p){hn(e,p),pn(e,p)}finally{an=i,sn.current=n,n===on&&Pt(t)}}}function Rn(e,t,n){switch(n.parentFlushed=!0,n.status){case 0:var i=n.id=e.nextSegmentId++;return n.lastPushedText=!1,n.textEmbedded=!1,e=e.responseState,s(t,ue),s(t,e.placeholderPrefix),s(t,e=d(i.toString(16))),l(t,ce);case 1:n.status=2;var o=!0;i=n.chunks;var a=0;n=n.children;for(var u=0;u<n.length;u++){for(o=n[u];a<o.index;a++)s(t,i[a]);o=Dn(e,t,o)}for(;a<i.length-1;a++)s(t,i[a]);return a<i.length&&(o=l(t,i[a])),o;default:throw Error(r(390))}}function Dn(e,t,n){var i=n.boundary;if(null===i)return Rn(e,t,n);if(i.parentFlushed=!0,i.forceClientRender)i=i.errorDigest,l(t,fe),s(t,ge),i&&(s(t,ye),s(t,d(R(i))),s(t,me)),l(t,Ce),Rn(e,t,n);else if(0<i.pendingTasks){i.rootSegmentID=e.nextSegmentId++,0<i.completedSegments.length&&e.partialBoundaries.push(i);var o=e.responseState,a=o.nextSuspenseID++;o=h(o.boundaryPrefix+a.toString(16)),i=i.id=o,ke(t,e.responseState,i),Rn(e,t,n)}else if(i.byteSize>e.progressiveChunkSize)i.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(i),ke(t,e.responseState,i.id),Rn(e,t,n);else{if(l(t,de),1!==(n=i.completedSegments).length)throw Error(r(391));Dn(e,t,n[0])}return l(t,ve)}function Tn(e,t,n){return function(e,t,n,i){switch(n.insertionMode){case 0:case 1:return s(e,we),s(e,t.segmentPrefix),s(e,d(i.toString(16))),l(e,Se);case 2:return s(e,Ee),s(e,t.segmentPrefix),s(e,d(i.toString(16))),l(e,xe);case 3:return s(e,De),s(e,t.segmentPrefix),s(e,d(i.toString(16))),l(e,Te);case 4:return s(e,Pe),s(e,t.segmentPrefix),s(e,d(i.toString(16))),l(e,Ae);case 5:return s(e,Ne),s(e,t.segmentPrefix),s(e,d(i.toString(16))),l(e,Le);case 6:return s(e,Fe),s(e,t.segmentPrefix),s(e,d(i.toString(16))),l(e,_e);case 7:return s(e,Ze),s(e,t.segmentPrefix),s(e,d(i.toString(16))),l(e,Ve);default:throw Error(r(397))}}(t,e.responseState,n.formatContext,n.id),Dn(e,t,n),function(e,t){switch(t.insertionMode){case 0:case 1:return l(e,be);case 2:return l(e,Re);case 3:return l(e,Oe);case 4:return l(e,Me);case 5:return l(e,Ie);case 6:return l(e,Ge);case 7:return l(e,He);default:throw Error(r(397))}}(t,n.formatContext)}function On(e,t,n){for(var i=n.completedSegments,o=0;o<i.length;o++)Pn(e,t,n,i[o]);if(i.length=0,e=e.responseState,i=n.id,n=n.rootSegmentID,s(t,e.startInlineScript),e.sentCompleteBoundaryFunction?s(t,Ke):(e.sentCompleteBoundaryFunction=!0,s(t,je)),null===i)throw Error(r(395));return n=d(n.toString(16)),s(t,i),s(t,Ye),s(t,e.segmentPrefix),s(t,n),l(t,Xe)}function Pn(e,t,n,i){if(2===i.status)return!0;var o=i.id;if(-1===o){if(-1===(i.id=n.rootSegmentID))throw Error(r(392));return Tn(e,t,i)}return Tn(e,t,i),s(t,(e=e.responseState).startInlineScript),e.sentCompleteSegmentFunction?s(t,We):(e.sentCompleteSegmentFunction=!0,s(t,Be)),s(t,e.segmentPrefix),s(t,o=d(o.toString(16))),s(t,ze),s(t,e.placeholderPrefix),s(t,o),l(t,Ue)}function An(e,t){o=new Uint8Array(512),a=0;try{var n=e.completedRootSegment;if(null!==n&&0===e.pendingRootTasks){Dn(e,t,n),e.completedRootSegment=null;var i=e.responseState.bootstrapChunks;for(n=0;n<i.length-1;n++)s(t,i[n]);n<i.length&&l(t,i[n])}var c,h=e.clientRenderedBoundaries;for(c=0;c<h.length;c++){var p=h[c];i=t;var f=e.responseState,v=p.id,g=p.errorDigest,m=p.errorMessage,y=p.errorComponentStack;if(s(i,f.startInlineScript),f.sentClientRenderFunction?s(i,Qe):(f.sentClientRenderFunction=!0,s(i,qe)),null===v)throw Error(r(395));if(s(i,v),s(i,Je),(g||m||y)&&(s(i,et),s(i,d(nt(g||"")))),(m||y)&&(s(i,et),s(i,d(nt(m||"")))),y&&(s(i,et),s(i,d(nt(y)))),!l(i,$e))return e.destination=null,c++,void h.splice(0,c)}h.splice(0,c);var C=e.completedBoundaries;for(c=0;c<C.length;c++)if(!On(e,t,C[c]))return e.destination=null,c++,void C.splice(0,c);C.splice(0,c),u(t),o=new Uint8Array(512),a=0;var k=e.partialBoundaries;for(c=0;c<k.length;c++){var w=k[c];e:{h=e,p=t;var S=w.completedSegments;for(f=0;f<S.length;f++)if(!Pn(h,p,w,S[f])){f++,S.splice(0,f);var b=!1;break e}S.splice(0,f),b=!0}if(!b)return e.destination=null,c++,void k.splice(0,c)}k.splice(0,c);var E=e.completedBoundaries;for(c=0;c<E.length;c++)if(!On(e,t,E[c]))return e.destination=null,c++,void E.splice(0,c);E.splice(0,c)}finally{u(t),0===e.allPendingTasks&&0===e.pingedTasks.length&&0===e.clientRenderedBoundaries.length&&0===e.completedBoundaries.length&&t.close()}}function Mn(e,t){try{var n=e.abortableTasks;n.forEach((function(n){return Sn(n,e,t)})),n.clear(),null!==e.destination&&An(e,e.destination)}catch(i){hn(e,i),pn(e,i)}}t.renderToReadableStream=function(e,t){return new Promise((function(n,i){var r,o,a=new Promise((function(e,t){o=e,r=t})),s=function(e,t,n,i,r,o,a,s,l){var u=[],c=new Set;return(n=dn(t={destination:null,responseState:t,progressiveChunkSize:void 0===i?12800:i,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:c,pingedTasks:u,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===r?ln:r,onAllReady:void 0===o?un:o,onShellReady:void 0===a?un:a,onShellError:void 0===s?un:s,onFatalError:void 0===l?un:l},0,null,n,!1,!1)).parentFlushed=!0,e=cn(t,e,null,n,c,St,null,Nt),u.push(e),t}(e,function(e,t,n,i,r){e=void 0===e?"":e,t=void 0===t?P:h('<script nonce="'+R(t)+'">');var o=[];if(void 0!==n&&o.push(t,d((""+n).replace(I,F)),A),void 0!==i)for(n=0;n<i.length;n++)o.push(M,d(R(i[n])),L);if(void 0!==r)for(i=0;i<r.length;i++)o.push(N,d(R(r[i])),L);return{bootstrapChunks:o,startInlineScript:t,placeholderPrefix:h(e+"P:"),segmentPrefix:h(e+"S:"),boundaryPrefix:e+"B:",idPrefix:e,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}(t?t.identifierPrefix:void 0,t?t.nonce:void 0,t?t.bootstrapScriptContent:void 0,t?t.bootstrapScripts:void 0,t?t.bootstrapModules:void 0),function(e){return _("http://www.w3.org/2000/svg"===e?2:"http://www.w3.org/1998/Math/MathML"===e?3:0,null)}(t?t.namespaceURI:void 0),t?t.progressiveChunkSize:void 0,t?t.onError:void 0,o,(function(){var e=new ReadableStream({type:"bytes",pull:function(e){if(1===s.status)s.status=2,p(e,s.fatalError);else if(2!==s.status&&null===s.destination){s.destination=e;try{An(s,e)}catch(t){hn(s,t),pn(s,t)}}},cancel:function(){Mn(s)}},{highWaterMark:0});e.allReady=a,n(e)}),(function(e){a.catch((function(){})),i(e)}),r);if(t&&t.signal){var l=t.signal;l.addEventListener("abort",(function e(){Mn(s,l.reason),l.removeEventListener("abort",e)}))}xn(s)}))},t.version="18.2.0"},4463:function(e,t,n){"use strict";var i=n(2791),r=n(5296);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);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 a=new Set,s={};function l(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var c=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[: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={},f={};function v(e,t,n,i,r,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new v(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new v(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new v(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){g[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new v(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new v(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new v(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)}));var m=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function C(e,t,n,i){var r=g.hasOwnProperty(t)?g[t]:null;(null!==r?0!==r.type:i||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,i){if(null===t||"undefined"===typeof t||function(e,t,n,i){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!i&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,i))return!0;if(i)return!1;if(null!==n)switch(n.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,n,r,i)&&(n=null),i||null===r?function(e){return!!d.call(f,e)||!d.call(p,e)&&(h.test(e)?f[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):r.mustUseProperty?e[r.propertyName]=null===n?3!==r.type&&"":n:(t=r.attributeName,i=r.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(r=r.type)||4===r&&!0===n?"":""+n,i?e.setAttributeNS(i,t,n):e.setAttribute(t,n))))}"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(m,y);g[t]=new v(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(m,y);g[t]=new v(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(m,y);g[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var k=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),S=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),D=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),M=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var N=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var L=Symbol.iterator;function I(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=L&&e[L]||e["@@iterator"])?e:null}var F,_=Object.assign;function G(e){if(void 0===F)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);F=t&&t[1]||""}return"\n"+F+e}var Z=!1;function V(e,t){if(!e||Z)return"";Z=!0;var n=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(u){var i=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){i=u}e.call(t.prototype)}else{try{throw Error()}catch(u){i=u}e()}}catch(u){if(u&&i&&"string"===typeof u.stack){for(var r=u.stack.split("\n"),o=i.stack.split("\n"),a=r.length-1,s=o.length-1;1<=a&&0<=s&&r[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(r[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||r[a]!==o[s]){var l="\n"+r[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{Z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?G(e):""}function H(e){switch(e.tag){case 5:return G(e.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return e=V(e.type,!1);case 11:return e=V(e.type.render,!1);case 1:return e=V(e.type,!0);default:return""}}function B(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 b:return"Fragment";case S:return"Portal";case x:return"Profiler";case E:return"StrictMode";case O:return"Suspense";case P:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case D:return(e.displayName||"Context")+".Consumer";case R:return(e._context.displayName||"Context")+".Provider";case T:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case A:return null!==(t=e.displayName||null)?t:B(e.type)||"Memo";case M:t=e._payload,e=e._init;try{return B(e(t))}catch(n){}}return null}function W(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 B(t);case 8:return t===E?"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 z(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function U(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function j(e){e._valueTracker||(e._valueTracker=function(e){var t=U(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var r=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(e){i=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(e){i=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=U(e)?e.checked?"true":"false":e.value),(e=i)!==n&&(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 X(e,t){var n=t.checked;return _({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function q(e,t){var n=null==t.defaultValue?"":t.defaultValue,i=null!=t.checked?t.checked:t.defaultChecked;n=z(null!=t.value?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,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 J(e,t){Q(e,t);var n=z(t.value),i=t.type;if(null!=n)"number"===i?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===i||"reset"===i)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,z(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function $(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!("submit"!==i&&"reset"!==i||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Y(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,i){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&i&&(e[n].defaultSelected=!0)}else{for(n=""+z(n),t=null,r=0;r<e.length;r++){if(e[r].value===n)return e[r].selected=!0,void(i&&(e[r].defaultSelected=!0));null!==t||e[r].disabled||(t=e[r])}null!==t&&(t.selected=!0)}}function ie(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return _({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function re(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(te(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:z(n)}}function oe(e,t){var n=z(t.value),i=z(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=i&&(e.defaultValue=""+i)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(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?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ue,ce,de=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,i){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.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},fe=["Webkit","ms","Moz","O"];function ve(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var i=0===n.indexOf("--"),r=ve(n,t[n],i);"float"===n&&(n="cssFloat"),i?e.setProperty(n,r):e[n]=r}}Object.keys(pe).forEach((function(e){fe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var me=_({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(me[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(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 ke=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,be=null,Ee=null;function xe(e){if(e=Cr(e)){if("function"!==typeof Se)throw Error(o(280));var t=e.stateNode;t&&(t=wr(t),Se(e.stateNode,e.type,t))}}function Re(e){be?Ee?Ee.push(e):Ee=[e]:be=e}function De(){if(be){var e=be,t=Ee;if(Ee=be=null,xe(e),t)for(e=0;e<t.length;e++)xe(t[e])}}function Te(e,t){return e(t)}function Oe(){}var Pe=!1;function Ae(e,t,n){if(Pe)return e(t,n);Pe=!0;try{return Te(e,t,n)}finally{Pe=!1,(null!==be||null!==Ee)&&(Oe(),De())}}function Me(e,t){var n=e.stateNode;if(null===n)return null;var i=wr(n);if(null===i)return null;n=i[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":(i=!i.disabled)||(i=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(o(231,t,typeof n));return n}var Ne=!1;if(c)try{var Le={};Object.defineProperty(Le,"passive",{get:function(){Ne=!0}}),window.addEventListener("test",Le,Le),window.removeEventListener("test",Le,Le)}catch(ce){Ne=!1}function Ie(e,t,n,i,r,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Fe=!1,_e=null,Ge=!1,Ze=null,Ve={onError:function(e){Fe=!0,_e=e}};function He(e,t,n,i,r,o,a,s,l){Fe=!1,_e=null,Ie.apply(Ve,arguments)}function Be(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function We(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 ze(e){if(Be(e)!==e)throw Error(o(188))}function Ue(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Be(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,i=t;;){var r=n.return;if(null===r)break;var a=r.alternate;if(null===a){if(null!==(i=r.return)){n=i;continue}break}if(r.child===a.child){for(a=r.child;a;){if(a===n)return ze(r),e;if(a===i)return ze(r),t;a=a.sibling}throw Error(o(188))}if(n.return!==i.return)n=r,i=a;else{for(var s=!1,l=r.child;l;){if(l===n){s=!0,n=r,i=a;break}if(l===i){s=!0,i=r,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,i=r;break}if(l===i){s=!0,i=a,n=r;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==i)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?je(e):null}function je(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=je(e);if(null!==t)return t;e=e.sibling}return null}var Ke=r.unstable_scheduleCallback,Ye=r.unstable_cancelCallback,Xe=r.unstable_shouldYield,qe=r.unstable_requestPaint,Qe=r.unstable_now,Je=r.unstable_getCurrentPriorityLevel,$e=r.unstable_ImmediatePriority,et=r.unstable_UserBlockingPriority,tt=r.unstable_NormalPriority,nt=r.unstable_LowPriority,it=r.unstable_IdlePriority,rt=null,ot=null;var at=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ut=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 ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var i=0,r=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~r;0!==s?i=dt(s):0!==(o&=a)&&(i=dt(o))}else 0!==(a=n&~r)?i=dt(a):0!==o&&(i=dt(o));if(0===i)return 0;if(0!==t&&t!==i&&0===(t&r)&&((r=i&-i)>=(o=t&-t)||16===r&&0!==(4194240&o)))return t;if(0!==(4&i)&&(i|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=i;0<t;)r=1<<(n=31-at(t)),i|=e[n],t&=~r;return i}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 ft(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function vt(){var e=ut;return 0===(4194240&(ut<<=1))&&(ut=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function mt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-at(n),r=1<<i;r&t|e[i]&t&&(e[i]|=t),n&=~r}}var Ct=0;function kt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var wt,St,bt,Et,xt,Rt=!1,Dt=[],Tt=null,Ot=null,Pt=null,At=new Map,Mt=new Map,Nt=[],Lt="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 It(e,t){switch(e){case"focusin":case"focusout":Tt=null;break;case"dragenter":case"dragleave":Ot=null;break;case"mouseover":case"mouseout":Pt=null;break;case"pointerover":case"pointerout":At.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mt.delete(t.pointerId)}}function Ft(e,t,n,i,r,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:o,targetContainers:[r]},null!==t&&(null!==(t=Cr(t))&&St(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,null!==r&&-1===t.indexOf(r)&&t.push(r),e)}function _t(e){var t=yr(e.target);if(null!==t){var n=Be(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=We(n)))return e.blockedOn=t,void xt(e.priority,(function(){bt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Gt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Cr(n))&&St(t),e.blockedOn=n,!1;var i=new(n=e.nativeEvent).constructor(n.type,n);ke=i,n.target.dispatchEvent(i),ke=null,t.shift()}return!0}function Zt(e,t,n){Gt(e)&&n.delete(t)}function Vt(){Rt=!1,null!==Tt&&Gt(Tt)&&(Tt=null),null!==Ot&&Gt(Ot)&&(Ot=null),null!==Pt&&Gt(Pt)&&(Pt=null),At.forEach(Zt),Mt.forEach(Zt)}function Ht(e,t){e.blockedOn===t&&(e.blockedOn=null,Rt||(Rt=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Vt)))}function Bt(e){function t(t){return Ht(t,e)}if(0<Dt.length){Ht(Dt[0],e);for(var n=1;n<Dt.length;n++){var i=Dt[n];i.blockedOn===e&&(i.blockedOn=null)}}for(null!==Tt&&Ht(Tt,e),null!==Ot&&Ht(Ot,e),null!==Pt&&Ht(Pt,e),At.forEach(t),Mt.forEach(t),n=0;n<Nt.length;n++)(i=Nt[n]).blockedOn===e&&(i.blockedOn=null);for(;0<Nt.length&&null===(n=Nt[0]).blockedOn;)_t(n),null===n.blockedOn&&Nt.shift()}var Wt=k.ReactCurrentBatchConfig,zt=!0;function Ut(e,t,n,i){var r=Ct,o=Wt.transition;Wt.transition=null;try{Ct=1,Kt(e,t,n,i)}finally{Ct=r,Wt.transition=o}}function jt(e,t,n,i){var r=Ct,o=Wt.transition;Wt.transition=null;try{Ct=4,Kt(e,t,n,i)}finally{Ct=r,Wt.transition=o}}function Kt(e,t,n,i){if(zt){var r=Xt(e,t,n,i);if(null===r)zi(e,t,i,Yt,n),It(e,i);else if(function(e,t,n,i,r){switch(t){case"focusin":return Tt=Ft(Tt,e,t,n,i,r),!0;case"dragenter":return Ot=Ft(Ot,e,t,n,i,r),!0;case"mouseover":return Pt=Ft(Pt,e,t,n,i,r),!0;case"pointerover":var o=r.pointerId;return At.set(o,Ft(At.get(o)||null,e,t,n,i,r)),!0;case"gotpointercapture":return o=r.pointerId,Mt.set(o,Ft(Mt.get(o)||null,e,t,n,i,r)),!0}return!1}(r,e,t,n,i))i.stopPropagation();else if(It(e,i),4&t&&-1<Lt.indexOf(e)){for(;null!==r;){var o=Cr(r);if(null!==o&&wt(o),null===(o=Xt(e,t,n,i))&&zi(e,t,i,Yt,n),o===r)break;r=o}null!==r&&i.stopPropagation()}else zi(e,t,i,null,n)}}var Yt=null;function Xt(e,t,n,i){if(Yt=null,null!==(e=yr(e=we(i))))if(null===(t=Be(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=We(t)))return e;e=null}else if(3===n){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(Je()){case $e:return 1;case et:return 4;case tt:case nt:return 16;case it:return 536870912;default:return 16}default:return 16}}var Qt=null,Jt=null,$t=null;function en(){if($t)return $t;var e,t,n=Jt,i=n.length,r="value"in Qt?Qt.value:Qt.textContent,o=r.length;for(e=0;e<i&&n[e]===r[e];e++);var a=i-e;for(t=1;t<=a&&n[i-t]===r[o-t];t++);return $t=r.slice(e,1<t?1-t:void 0)}function tn(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 nn(){return!0}function rn(){return!1}function on(e){function t(t,n,i,r,o){for(var a in this._reactName=t,this._targetInst=i,this.type=n,this.nativeEvent=r,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(r):r[a]);return this.isDefaultPrevented=(null!=r.defaultPrevented?r.defaultPrevented:!1===r.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return _(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=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,ln,un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=on(un),dn=_({},un,{view:0,detail:0}),hn=on(dn),pn=_({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xn,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!==ln&&(ln&&"mousemove"===e.type?(an=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=an=0,ln=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),fn=on(pn),vn=on(_({},pn,{dataTransfer:0})),gn=on(_({},dn,{relatedTarget:0})),mn=on(_({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=_({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Cn=on(yn),kn=on(_({},un,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={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"},bn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function En(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=bn[e])&&!!t[e]}function xn(){return En}var Rn=_({},dn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Dn=on(Rn),Tn=on(_({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),On=on(_({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xn})),Pn=on(_({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),An=_({},pn,{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}),Mn=on(An),Nn=[9,13,27,32],Ln=c&&"CompositionEvent"in window,In=null;c&&"documentMode"in document&&(In=document.documentMode);var Fn=c&&"TextEvent"in window&&!In,_n=c&&(!Ln||In&&8<In&&11>=In),Gn=String.fromCharCode(32),Zn=!1;function Vn(e,t){switch(e){case"keyup":return-1!==Nn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Bn=!1;var Wn={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 zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wn[e.type]:"textarea"===t}function Un(e,t,n,i){Re(i),0<(t=ji(t,"onChange")).length&&(n=new cn("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var jn=null,Kn=null;function Yn(e){Gi(e,0)}function Xn(e){if(K(kr(e)))return e}function qn(e,t){if("change"===e)return t}var Qn=!1;if(c){var Jn;if(c){var $n="oninput"in document;if(!$n){var ei=document.createElement("div");ei.setAttribute("oninput","return;"),$n="function"===typeof ei.oninput}Jn=$n}else Jn=!1;Qn=Jn&&(!document.documentMode||9<document.documentMode)}function ti(){jn&&(jn.detachEvent("onpropertychange",ni),Kn=jn=null)}function ni(e){if("value"===e.propertyName&&Xn(Kn)){var t=[];Un(t,Kn,e,we(e)),Ae(Yn,t)}}function ii(e,t,n){"focusin"===e?(ti(),Kn=n,(jn=t).attachEvent("onpropertychange",ni)):"focusout"===e&&ti()}function ri(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn(Kn)}function oi(e,t){if("click"===e)return Xn(t)}function ai(e,t){if("input"===e||"change"===e)return Xn(t)}var si="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function li(e,t){if(si(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var r=n[i];if(!d.call(t,r)||!si(e[r],t[r]))return!1}return!0}function ui(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ci(e,t){var n,i=ui(e);for(e=0;i;){if(3===i.nodeType){if(n=e+i.textContent.length,e<=t&&n>=t)return{node:i,offset:t-e};e=n}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=ui(i)}}function di(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?di(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hi(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(i){n=!1}if(!n)break;t=Y((e=t.contentWindow).document)}return t}function pi(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 fi(e){var t=hi(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&di(n.ownerDocument.documentElement,n)){if(null!==i&&pi(n))if(t=i.start,void 0===(e=i.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var r=n.textContent.length,o=Math.min(i.start,r);i=void 0===i.end?o:Math.min(i.end,r),!e.extend&&o>i&&(r=i,i=o,o=r),r=ci(n,o);var a=ci(n,i);r&&a&&(1!==e.rangeCount||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(r.node,r.offset),e.removeAllRanges(),o>i?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var vi=c&&"documentMode"in document&&11>=document.documentMode,gi=null,mi=null,yi=null,Ci=!1;function ki(e,t,n){var i=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Ci||null==gi||gi!==Y(i)||("selectionStart"in(i=gi)&&pi(i)?i={start:i.selectionStart,end:i.selectionEnd}:i={anchorNode:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset},yi&&li(yi,i)||(yi=i,0<(i=ji(mi,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=gi)))}function wi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Si={animationend:wi("Animation","AnimationEnd"),animationiteration:wi("Animation","AnimationIteration"),animationstart:wi("Animation","AnimationStart"),transitionend:wi("Transition","TransitionEnd")},bi={},Ei={};function xi(e){if(bi[e])return bi[e];if(!Si[e])return e;var t,n=Si[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ei)return bi[e]=n[t];return e}c&&(Ei=document.createElement("div").style,"AnimationEvent"in window||(delete Si.animationend.animation,delete Si.animationiteration.animation,delete Si.animationstart.animation),"TransitionEvent"in window||delete Si.transitionend.transition);var Ri=xi("animationend"),Di=xi("animationiteration"),Ti=xi("animationstart"),Oi=xi("transitionend"),Pi=new Map,Ai="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 Mi(e,t){Pi.set(e,t),l(t,[e])}for(var Ni=0;Ni<Ai.length;Ni++){var Li=Ai[Ni];Mi(Li.toLowerCase(),"on"+(Li[0].toUpperCase()+Li.slice(1)))}Mi(Ri,"onAnimationEnd"),Mi(Di,"onAnimationIteration"),Mi(Ti,"onAnimationStart"),Mi("dblclick","onDoubleClick"),Mi("focusin","onFocus"),Mi("focusout","onBlur"),Mi(Oi,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("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 Ii="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(" "),Fi=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ii));function _i(e,t,n){var i=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,i,r,a,s,l,u){if(He.apply(this,arguments),Fe){if(!Fe)throw Error(o(198));var c=_e;Fe=!1,_e=null,Ge||(Ge=!0,Ze=c)}}(i,t,void 0,e),e.currentTarget=null}function Gi(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var i=e[n],r=i.event;i=i.listeners;e:{var o=void 0;if(t)for(var a=i.length-1;0<=a;a--){var s=i[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==o&&r.isPropagationStopped())break e;_i(r,s,u),o=l}else for(a=0;a<i.length;a++){if(l=(s=i[a]).instance,u=s.currentTarget,s=s.listener,l!==o&&r.isPropagationStopped())break e;_i(r,s,u),o=l}}}if(Ge)throw e=Ze,Ge=!1,Ze=null,e}function Zi(e,t){var n=t[vr];void 0===n&&(n=t[vr]=new Set);var i=e+"__bubble";n.has(i)||(Wi(t,e,2,!1),n.add(i))}function Vi(e,t,n){var i=0;t&&(i|=4),Wi(n,e,i,t)}var Hi="_reactListening"+Math.random().toString(36).slice(2);function Bi(e){if(!e[Hi]){e[Hi]=!0,a.forEach((function(t){"selectionchange"!==t&&(Fi.has(t)||Vi(t,!1,e),Vi(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Hi]||(t[Hi]=!0,Vi("selectionchange",!1,t))}}function Wi(e,t,n,i){switch(qt(t)){case 1:var r=Ut;break;case 4:r=jt;break;default:r=Kt}n=r.bind(null,t,n,e),r=void 0,!Ne||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(r=!0),i?void 0!==r?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):void 0!==r?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function zi(e,t,n,i,r){var o=i;if(0===(1&t)&&0===(2&t)&&null!==i)e:for(;;){if(null===i)return;var a=i.tag;if(3===a||4===a){var s=i.stateNode.containerInfo;if(s===r||8===s.nodeType&&s.parentNode===r)break;if(4===a)for(a=i.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===r||8===l.nodeType&&l.parentNode===r))return;a=a.return}for(;null!==s;){if(null===(a=yr(s)))return;if(5===(l=a.tag)||6===l){i=o=a;continue e}s=s.parentNode}}i=i.return}Ae((function(){var i=o,r=we(n),a=[];e:{var s=Pi.get(e);if(void 0!==s){var l=cn,u=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=Dn;break;case"focusin":u="focus",l=gn;break;case"focusout":u="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=fn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=vn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=On;break;case Ri:case Di:case Ti:l=mn;break;case Oi:l=Pn;break;case"scroll":l=hn;break;case"wheel":l=Mn;break;case"copy":case"cut":case"paste":l=Cn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Tn}var c=0!==(4&t),d=!c&&"scroll"===e,h=c?null!==s?s+"Capture":null:s;c=[];for(var p,f=i;null!==f;){var v=(p=f).stateNode;if(5===p.tag&&null!==v&&(p=v,null!==h&&(null!=(v=Me(f,h))&&c.push(Ui(f,v,p)))),d)break;f=f.return}0<c.length&&(s=new l(s,u,null,n,r),a.push({event:s,listeners:c}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===ke||!(u=n.relatedTarget||n.fromElement)||!yr(u)&&!u[fr])&&(l||s)&&(s=r.window===r?r:(s=r.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=i,null!==(u=(u=n.relatedTarget||n.toElement)?yr(u):null)&&(u!==(d=Be(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=i),l!==u)){if(c=fn,v="onMouseLeave",h="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(c=Tn,v="onPointerLeave",h="onPointerEnter",f="pointer"),d=null==l?s:kr(l),p=null==u?s:kr(u),(s=new c(v,f+"leave",l,n,r)).target=d,s.relatedTarget=p,v=null,yr(r)===i&&((c=new c(h,f+"enter",u,n,r)).target=p,c.relatedTarget=d,v=c),d=v,l&&u)e:{for(h=u,f=0,p=c=l;p;p=Ki(p))f++;for(p=0,v=h;v;v=Ki(v))p++;for(;0<f-p;)c=Ki(c),f--;for(;0<p-f;)h=Ki(h),p--;for(;f--;){if(c===h||null!==h&&c===h.alternate)break e;c=Ki(c),h=Ki(h)}c=null}else c=null;null!==l&&Yi(a,s,l,c,!1),null!==u&&null!==d&&Yi(a,d,u,c,!0)}if("select"===(l=(s=i?kr(i):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=qn;else if(zn(s))if(Qn)g=ai;else{g=ri;var m=ii}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=oi);switch(g&&(g=g(e,i))?Un(a,g,n,r):(m&&m(e,s,i),"focusout"===e&&(m=s._wrapperState)&&m.controlled&&"number"===s.type&&ee(s,"number",s.value)),m=i?kr(i):window,e){case"focusin":(zn(m)||"true"===m.contentEditable)&&(gi=m,mi=i,yi=null);break;case"focusout":yi=mi=gi=null;break;case"mousedown":Ci=!0;break;case"contextmenu":case"mouseup":case"dragend":Ci=!1,ki(a,n,r);break;case"selectionchange":if(vi)break;case"keydown":case"keyup":ki(a,n,r)}var y;if(Ln)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 Bn?Vn(e,n)&&(C="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(C="onCompositionStart");C&&(_n&&"ko"!==n.locale&&(Bn||"onCompositionStart"!==C?"onCompositionEnd"===C&&Bn&&(y=en()):(Jt="value"in(Qt=r)?Qt.value:Qt.textContent,Bn=!0)),0<(m=ji(i,C)).length&&(C=new kn(C,e,null,n,r),a.push({event:C,listeners:m}),y?C.data=y:null!==(y=Hn(n))&&(C.data=y))),(y=Fn?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Zn=!0,Gn);case"textInput":return(e=t.data)===Gn&&Zn?null:e;default:return null}}(e,n):function(e,t){if(Bn)return"compositionend"===e||!Ln&&Vn(e,t)?(e=en(),$t=Jt=Qt=null,Bn=!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 _n&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(i=ji(i,"onBeforeInput")).length&&(r=new kn("onBeforeInput","beforeinput",null,n,r),a.push({event:r,listeners:i}),r.data=y))}Gi(a,t)}))}function Ui(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ji(e,t){for(var n=t+"Capture",i=[];null!==e;){var r=e,o=r.stateNode;5===r.tag&&null!==o&&(r=o,null!=(o=Me(e,n))&&i.unshift(Ui(e,o,r)),null!=(o=Me(e,t))&&i.push(Ui(e,o,r))),e=e.return}return i}function Ki(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Yi(e,t,n,i,r){for(var o=t._reactName,a=[];null!==n&&n!==i;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===i)break;5===s.tag&&null!==u&&(s=u,r?null!=(l=Me(n,o))&&a.unshift(Ui(n,l,s)):r||null!=(l=Me(n,o))&&a.push(Ui(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Xi=/\r\n?/g,qi=/\u0000|\uFFFD/g;function Qi(e){return("string"===typeof e?e:""+e).replace(Xi,"\n").replace(qi,"")}function Ji(e,t,n){if(t=Qi(t),Qi(e)!==t&&n)throw Error(o(425))}function $i(){}var er=null,tr=null;function nr(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 ir="function"===typeof setTimeout?setTimeout:void 0,rr="function"===typeof clearTimeout?clearTimeout:void 0,or="function"===typeof Promise?Promise:void 0,ar="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof or?function(e){return or.resolve(null).then(e).catch(sr)}:ir;function sr(e){setTimeout((function(){throw e}))}function lr(e,t){var n=t,i=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===i)return e.removeChild(r),void Bt(t);i--}else"$"!==n&&"$?"!==n&&"$!"!==n||i++;n=r}while(n);Bt(t)}function ur(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 cr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var dr=Math.random().toString(36).slice(2),hr="__reactFiber$"+dr,pr="__reactProps$"+dr,fr="__reactContainer$"+dr,vr="__reactEvents$"+dr,gr="__reactListeners$"+dr,mr="__reactHandles$"+dr;function yr(e){var t=e[hr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fr]||n[hr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=cr(e);null!==e;){if(n=e[hr])return n;e=cr(e)}return t}n=(e=n).parentNode}return null}function Cr(e){return!(e=e[hr]||e[fr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function kr(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function wr(e){return e[pr]||null}var Sr=[],br=-1;function Er(e){return{current:e}}function xr(e){0>br||(e.current=Sr[br],Sr[br]=null,br--)}function Rr(e,t){br++,Sr[br]=e.current,e.current=t}var Dr={},Tr=Er(Dr),Or=Er(!1),Pr=Dr;function Ar(e,t){var n=e.type.contextTypes;if(!n)return Dr;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var r,o={};for(r in n)o[r]=t[r];return i&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Mr(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Nr(){xr(Or),xr(Tr)}function Lr(e,t,n){if(Tr.current!==Dr)throw Error(o(168));Rr(Tr,t),Rr(Or,n)}function Ir(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,"function"!==typeof i.getChildContext)return n;for(var r in i=i.getChildContext())if(!(r in t))throw Error(o(108,W(e)||"Unknown",r));return _({},n,i)}function Fr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Dr,Pr=Tr.current,Rr(Tr,e),Rr(Or,Or.current),!0}function _r(e,t,n){var i=e.stateNode;if(!i)throw Error(o(169));n?(e=Ir(e,t,Pr),i.__reactInternalMemoizedMergedChildContext=e,xr(Or),xr(Tr),Rr(Tr,e)):xr(Or),Rr(Or,n)}var Gr=null,Zr=!1,Vr=!1;function Hr(e){null===Gr?Gr=[e]:Gr.push(e)}function Br(){if(!Vr&&null!==Gr){Vr=!0;var e=0,t=Ct;try{var n=Gr;for(Ct=1;e<n.length;e++){var i=n[e];do{i=i(!0)}while(null!==i)}Gr=null,Zr=!1}catch(r){throw null!==Gr&&(Gr=Gr.slice(e+1)),Ke($e,Br),r}finally{Ct=t,Vr=!1}}return null}var Wr=[],zr=0,Ur=null,jr=0,Kr=[],Yr=0,Xr=null,qr=1,Qr="";function Jr(e,t){Wr[zr++]=jr,Wr[zr++]=Ur,Ur=e,jr=t}function $r(e,t,n){Kr[Yr++]=qr,Kr[Yr++]=Qr,Kr[Yr++]=Xr,Xr=e;var i=qr;e=Qr;var r=32-at(i)-1;i&=~(1<<r),n+=1;var o=32-at(t)+r;if(30<o){var a=r-r%5;o=(i&(1<<a)-1).toString(32),i>>=a,r-=a,qr=1<<32-at(t)+r|n<<r|i,Qr=o+e}else qr=1<<o|n<<r|i,Qr=e}function eo(e){null!==e.return&&(Jr(e,1),$r(e,1,0))}function to(e){for(;e===Ur;)Ur=Wr[--zr],Wr[zr]=null,jr=Wr[--zr],Wr[zr]=null;for(;e===Xr;)Xr=Kr[--Yr],Kr[Yr]=null,Qr=Kr[--Yr],Kr[Yr]=null,qr=Kr[--Yr],Kr[Yr]=null}var no=null,io=null,ro=!1,oo=null;function ao(e,t){var n=Au(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function so(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,no=e,io=ur(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,no=e,io=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Xr?{id:qr,overflow:Qr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Au(18,null,null,0)).stateNode=t,n.return=e,e.child=n,no=e,io=null,!0);default:return!1}}function lo(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function uo(e){if(ro){var t=io;if(t){var n=t;if(!so(e,t)){if(lo(e))throw Error(o(418));t=ur(n.nextSibling);var i=no;t&&so(e,t)?ao(i,n):(e.flags=-4097&e.flags|2,ro=!1,no=e)}}else{if(lo(e))throw Error(o(418));e.flags=-4097&e.flags|2,ro=!1,no=e}}}function co(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;no=e}function ho(e){if(e!==no)return!1;if(!ro)return co(e),ro=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!nr(e.type,e.memoizedProps)),t&&(t=io)){if(lo(e))throw po(),Error(o(418));for(;t;)ao(e,t),t=ur(t.nextSibling)}if(co(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){io=ur(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}io=null}}else io=no?ur(e.stateNode.nextSibling):null;return!0}function po(){for(var e=io;e;)e=ur(e.nextSibling)}function fo(){io=no=null,ro=!1}function vo(e){null===oo?oo=[e]:oo.push(e)}var go=k.ReactCurrentBatchConfig;function mo(e,t){if(e&&e.defaultProps){for(var n in t=_({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var yo=Er(null),Co=null,ko=null,wo=null;function So(){wo=ko=Co=null}function bo(e){var t=yo.current;xr(yo),e._currentValue=t}function Eo(e,t,n){for(;null!==e;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==i&&(i.childLanes|=t)):null!==i&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function xo(e,t){Co=e,wo=ko=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ks=!0),e.firstContext=null)}function Ro(e){var t=e._currentValue;if(wo!==e)if(e={context:e,memoizedValue:t,next:null},null===ko){if(null===Co)throw Error(o(308));ko=e,Co.dependencies={lanes:0,firstContext:e}}else ko=ko.next=e;return t}var Do=null;function To(e){null===Do?Do=[e]:Do.push(e)}function Oo(e,t,n,i){var r=t.interleaved;return null===r?(n.next=n,To(t)):(n.next=r.next,r.next=n),t.interleaved=n,Po(e,i)}function Po(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ao=!1;function Mo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function No(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 Lo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Io(e,t,n){var i=e.updateQueue;if(null===i)return null;if(i=i.shared,0!==(2&Tl)){var r=i.pending;return null===r?t.next=t:(t.next=r.next,r.next=t),i.pending=t,Po(e,n)}return null===(r=i.interleaved)?(t.next=t,To(i)):(t.next=r.next,r.next=t),i.interleaved=t,Po(e,n)}function Fo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,yt(e,n)}}function _o(e,t){var n=e.updateQueue,i=e.alternate;if(null!==i&&n===(i=i.updateQueue)){var r=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?r=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?r=o=t:o=o.next=t}else r=o=t;return n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:i.shared,effects:i.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Go(e,t,n,i){var r=e.updateQueue;Ao=!1;var o=r.firstBaseUpdate,a=r.lastBaseUpdate,s=r.shared.pending;if(null!==s){r.shared.pending=null;var l=s,u=l.next;l.next=null,null===a?o=u:a.next=u,a=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==o){var d=r.baseState;for(a=0,c=u=l=null,s=o;;){var h=s.lane,p=s.eventTime;if((i&h)===h){null!==c&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var f=e,v=s;switch(h=t,p=n,v.tag){case 1:if("function"===typeof(f=v.payload)){d=f.call(p,d,h);break e}d=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null===(h="function"===typeof(f=v.payload)?f.call(p,d,h):f)||void 0===h)break e;d=_({},d,h);break e;case 2:Ao=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=r.effects)?r.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=p,l=d):c=c.next=p,a|=h;if(null===(s=s.next)){if(null===(s=r.shared.pending))break;s=(h=s).next,h.next=null,r.lastBaseUpdate=h,r.shared.pending=null}}if(null===c&&(l=d),r.baseState=l,r.firstBaseUpdate=u,r.lastBaseUpdate=c,null!==(t=r.shared.interleaved)){r=t;do{a|=r.lane,r=r.next}while(r!==t)}else null===o&&(r.shared.lanes=0);Fl|=a,e.lanes=a,e.memoizedState=d}}function Zo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var i=e[t],r=i.callback;if(null!==r){if(i.callback=null,i=n,"function"!==typeof r)throw Error(o(191,r));r.call(i)}}}var Vo=(new i.Component).refs;function Ho(e,t,n,i){n=null===(n=n(i,t=e.memoizedState))||void 0===n?t:_({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Bo={isMounted:function(e){return!!(e=e._reactInternals)&&Be(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var i=eu(),r=tu(e),o=Lo(i,r);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=Io(e,o,r))&&(nu(t,e,r,i),Fo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=eu(),r=tu(e),o=Lo(i,r);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=Io(e,o,r))&&(nu(t,e,r,i),Fo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=eu(),i=tu(e),r=Lo(n,i);r.tag=2,void 0!==t&&null!==t&&(r.callback=t),null!==(t=Io(e,r,i))&&(nu(t,e,i,n),Fo(t,e,i))}};function Wo(e,t,n,i,r,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(i,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!li(n,i)||!li(r,o))}function zo(e,t,n){var i=!1,r=Dr,o=t.contextType;return"object"===typeof o&&null!==o?o=Ro(o):(r=Mr(t)?Pr:Tr.current,o=(i=null!==(i=t.contextTypes)&&void 0!==i)?Ar(e,r):Dr),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Bo,e.stateNode=t,t._reactInternals=e,i&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=o),t}function Uo(e,t,n,i){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,i),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&Bo.enqueueReplaceState(t,t.state,null)}function jo(e,t,n,i){var r=e.stateNode;r.props=n,r.state=e.memoizedState,r.refs=Vo,Mo(e);var o=t.contextType;"object"===typeof o&&null!==o?r.context=Ro(o):(o=Mr(t)?Pr:Tr.current,r.context=Ar(e,o)),r.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(Ho(e,t,o,n),r.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof r.getSnapshotBeforeUpdate||"function"!==typeof r.UNSAFE_componentWillMount&&"function"!==typeof r.componentWillMount||(t=r.state,"function"===typeof r.componentWillMount&&r.componentWillMount(),"function"===typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),t!==r.state&&Bo.enqueueReplaceState(r,r.state,null),Go(e,n,r,i),r.state=e.memoizedState),"function"===typeof r.componentDidMount&&(e.flags|=4194308)}function Ko(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var i=n.stateNode}if(!i)throw Error(o(147,e));var r=i,a=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=r.refs;t===Vo&&(t=r.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!==typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function Yo(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Xo(e){return(0,e._init)(e._payload)}function qo(e){function t(t,n){if(e){var i=t.deletions;null===i?(t.deletions=[n],t.flags|=16):i.push(n)}}function n(n,i){if(!e)return null;for(;null!==i;)t(n,i),i=i.sibling;return null}function i(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 r(e,t){return(e=Nu(e,t)).index=0,e.sibling=null,e}function a(t,n,i){return t.index=i,e?null!==(i=t.alternate)?(i=i.index)<n?(t.flags|=2,n):i:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,i){return null===t||6!==t.tag?((t=_u(n,e.mode,i)).return=e,t):((t=r(t,n)).return=e,t)}function u(e,t,n,i){var o=n.type;return o===b?d(e,t,n.props.children,i,n.key):null!==t&&(t.elementType===o||"object"===typeof o&&null!==o&&o.$$typeof===M&&Xo(o)===t.type)?((i=r(t,n.props)).ref=Ko(e,t,n),i.return=e,i):((i=Lu(n.type,n.key,n.props,null,e.mode,i)).ref=Ko(e,t,n),i.return=e,i)}function c(e,t,n,i){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Gu(n,e.mode,i)).return=e,t):((t=r(t,n.children||[])).return=e,t)}function d(e,t,n,i,o){return null===t||7!==t.tag?((t=Iu(n,e.mode,i,o)).return=e,t):((t=r(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=_u(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Lu(t.type,t.key,t.props,null,e.mode,n)).ref=Ko(e,null,t),n.return=e,n;case S:return(t=Gu(t,e.mode,n)).return=e,t;case M:return h(e,(0,t._init)(t._payload),n)}if(te(t)||I(t))return(t=Iu(t,e.mode,n,null)).return=e,t;Yo(e,t)}return null}function p(e,t,n,i){var r=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==r?null:l(e,t,""+n,i);if("object"===typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===r?u(e,t,n,i):null;case S:return n.key===r?c(e,t,n,i):null;case M:return p(e,t,(r=n._init)(n._payload),i)}if(te(n)||I(n))return null!==r?null:d(e,t,n,i,null);Yo(e,n)}return null}function f(e,t,n,i,r){if("string"===typeof i&&""!==i||"number"===typeof i)return l(t,e=e.get(n)||null,""+i,r);if("object"===typeof i&&null!==i){switch(i.$$typeof){case w:return u(t,e=e.get(null===i.key?n:i.key)||null,i,r);case S:return c(t,e=e.get(null===i.key?n:i.key)||null,i,r);case M:return f(e,t,n,(0,i._init)(i._payload),r)}if(te(i)||I(i))return d(t,e=e.get(n)||null,i,r,null);Yo(t,i)}return null}function v(r,o,s,l){for(var u=null,c=null,d=o,v=o=0,g=null;null!==d&&v<s.length;v++){d.index>v?(g=d,d=null):g=d.sibling;var m=p(r,d,s[v],l);if(null===m){null===d&&(d=g);break}e&&d&&null===m.alternate&&t(r,d),o=a(m,o,v),null===c?u=m:c.sibling=m,c=m,d=g}if(v===s.length)return n(r,d),ro&&Jr(r,v),u;if(null===d){for(;v<s.length;v++)null!==(d=h(r,s[v],l))&&(o=a(d,o,v),null===c?u=d:c.sibling=d,c=d);return ro&&Jr(r,v),u}for(d=i(r,d);v<s.length;v++)null!==(g=f(d,r,v,s[v],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?v:g.key),o=a(g,o,v),null===c?u=g:c.sibling=g,c=g);return e&&d.forEach((function(e){return t(r,e)})),ro&&Jr(r,v),u}function g(r,s,l,u){var c=I(l);if("function"!==typeof c)throw Error(o(150));if(null==(l=c.call(l)))throw Error(o(151));for(var d=c=null,v=s,g=s=0,m=null,y=l.next();null!==v&&!y.done;g++,y=l.next()){v.index>g?(m=v,v=null):m=v.sibling;var C=p(r,v,y.value,u);if(null===C){null===v&&(v=m);break}e&&v&&null===C.alternate&&t(r,v),s=a(C,s,g),null===d?c=C:d.sibling=C,d=C,v=m}if(y.done)return n(r,v),ro&&Jr(r,g),c;if(null===v){for(;!y.done;g++,y=l.next())null!==(y=h(r,y.value,u))&&(s=a(y,s,g),null===d?c=y:d.sibling=y,d=y);return ro&&Jr(r,g),c}for(v=i(r,v);!y.done;g++,y=l.next())null!==(y=f(v,r,g,y.value,u))&&(e&&null!==y.alternate&&v.delete(null===y.key?g:y.key),s=a(y,s,g),null===d?c=y:d.sibling=y,d=y);return e&&v.forEach((function(e){return t(r,e)})),ro&&Jr(r,g),c}return function e(i,o,a,l){if("object"===typeof a&&null!==a&&a.type===b&&null===a.key&&(a=a.props.children),"object"===typeof a&&null!==a){switch(a.$$typeof){case w:e:{for(var u=a.key,c=o;null!==c;){if(c.key===u){if((u=a.type)===b){if(7===c.tag){n(i,c.sibling),(o=r(c,a.props.children)).return=i,i=o;break e}}else if(c.elementType===u||"object"===typeof u&&null!==u&&u.$$typeof===M&&Xo(u)===c.type){n(i,c.sibling),(o=r(c,a.props)).ref=Ko(i,c,a),o.return=i,i=o;break e}n(i,c);break}t(i,c),c=c.sibling}a.type===b?((o=Iu(a.props.children,i.mode,l,a.key)).return=i,i=o):((l=Lu(a.type,a.key,a.props,null,i.mode,l)).ref=Ko(i,o,a),l.return=i,i=l)}return s(i);case S:e:{for(c=a.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(i,o.sibling),(o=r(o,a.children||[])).return=i,i=o;break e}n(i,o);break}t(i,o),o=o.sibling}(o=Gu(a,i.mode,l)).return=i,i=o}return s(i);case M:return e(i,o,(c=a._init)(a._payload),l)}if(te(a))return v(i,o,a,l);if(I(a))return g(i,o,a,l);Yo(i,a)}return"string"===typeof a&&""!==a||"number"===typeof a?(a=""+a,null!==o&&6===o.tag?(n(i,o.sibling),(o=r(o,a)).return=i,i=o):(n(i,o),(o=_u(a,i.mode,l)).return=i,i=o),s(i)):n(i,o)}}var Qo=qo(!0),Jo=qo(!1),$o={},ea=Er($o),ta=Er($o),na=Er($o);function ia(e){if(e===$o)throw Error(o(174));return e}function ra(e,t){switch(Rr(na,t),Rr(ta,e),Rr(ea,$o),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)}xr(ea),Rr(ea,t)}function oa(){xr(ea),xr(ta),xr(na)}function aa(e){ia(na.current);var t=ia(ea.current),n=le(t,e.type);t!==n&&(Rr(ta,e),Rr(ea,n))}function sa(e){ta.current===e&&(xr(ea),xr(ta))}var la=Er(0);function ua(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.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 ca=[];function da(){for(var e=0;e<ca.length;e++)ca[e]._workInProgressVersionPrimary=null;ca.length=0}var ha=k.ReactCurrentDispatcher,pa=k.ReactCurrentBatchConfig,fa=0,va=null,ga=null,ma=null,ya=!1,Ca=!1,ka=0,wa=0;function Sa(){throw Error(o(321))}function ba(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!si(e[n],t[n]))return!1;return!0}function Ea(e,t,n,i,r,a){if(fa=a,va=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ha.current=null===e||null===e.memoizedState?ss:ls,e=n(i,r),Ca){a=0;do{if(Ca=!1,ka=0,25<=a)throw Error(o(301));a+=1,ma=ga=null,t.updateQueue=null,ha.current=us,e=n(i,r)}while(Ca)}if(ha.current=as,t=null!==ga&&null!==ga.next,fa=0,ma=ga=va=null,ya=!1,t)throw Error(o(300));return e}function xa(){var e=0!==ka;return ka=0,e}function Ra(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ma?va.memoizedState=ma=e:ma=ma.next=e,ma}function Da(){if(null===ga){var e=va.alternate;e=null!==e?e.memoizedState:null}else e=ga.next;var t=null===ma?va.memoizedState:ma.next;if(null!==t)ma=t,ga=e;else{if(null===e)throw Error(o(310));e={memoizedState:(ga=e).memoizedState,baseState:ga.baseState,baseQueue:ga.baseQueue,queue:ga.queue,next:null},null===ma?va.memoizedState=ma=e:ma=ma.next=e}return ma}function Ta(e,t){return"function"===typeof t?t(e):t}function Oa(e){var t=Da(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var i=ga,r=i.baseQueue,a=n.pending;if(null!==a){if(null!==r){var s=r.next;r.next=a.next,a.next=s}i.baseQueue=r=a,n.pending=null}if(null!==r){a=r.next,i=i.baseState;var l=s=null,u=null,c=a;do{var d=c.lane;if((fa&d)===d)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),i=c.hasEagerState?c.eagerState:e(i,c.action);else{var h={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=h,s=i):u=u.next=h,va.lanes|=d,Fl|=d}c=c.next}while(null!==c&&c!==a);null===u?s=i:u.next=l,si(i,t.memoizedState)||(ks=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=u,n.lastRenderedState=i}if(null!==(e=n.interleaved)){r=e;do{a=r.lane,va.lanes|=a,Fl|=a,r=r.next}while(r!==e)}else null===r&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Pa(e){var t=Da(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var i=n.dispatch,r=n.pending,a=t.memoizedState;if(null!==r){n.pending=null;var s=r=r.next;do{a=e(a,s.action),s=s.next}while(s!==r);si(a,t.memoizedState)||(ks=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,i]}function Aa(){}function Ma(e,t){var n=va,i=Da(),r=t(),a=!si(i.memoizedState,r);if(a&&(i.memoizedState=r,ks=!0),i=i.queue,za(Ia.bind(null,n,i,e),[e]),i.getSnapshot!==t||a||null!==ma&&1&ma.memoizedState.tag){if(n.flags|=2048,Za(9,La.bind(null,n,i,r,t),void 0,null),null===Ol)throw Error(o(349));0!==(30&fa)||Na(n,t,r)}return r}function Na(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=va.updateQueue)?(t={lastEffect:null,stores:null},va.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function La(e,t,n,i){t.value=n,t.getSnapshot=i,Fa(t)&&_a(e)}function Ia(e,t,n){return n((function(){Fa(t)&&_a(e)}))}function Fa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!si(e,n)}catch(i){return!0}}function _a(e){var t=Po(e,1);null!==t&&nu(t,e,1,-1)}function Ga(e){var t=Ra();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:e},t.queue=e,e=e.dispatch=ns.bind(null,va,e),[t.memoizedState,e]}function Za(e,t,n,i){return e={tag:e,create:t,destroy:n,deps:i,next:null},null===(t=va.updateQueue)?(t={lastEffect:null,stores:null},va.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function Va(){return Da().memoizedState}function Ha(e,t,n,i){var r=Ra();va.flags|=e,r.memoizedState=Za(1|t,n,void 0,void 0===i?null:i)}function Ba(e,t,n,i){var r=Da();i=void 0===i?null:i;var o=void 0;if(null!==ga){var a=ga.memoizedState;if(o=a.destroy,null!==i&&ba(i,a.deps))return void(r.memoizedState=Za(t,n,o,i))}va.flags|=e,r.memoizedState=Za(1|t,n,o,i)}function Wa(e,t){return Ha(8390656,8,e,t)}function za(e,t){return Ba(2048,8,e,t)}function Ua(e,t){return Ba(4,2,e,t)}function ja(e,t){return Ba(4,4,e,t)}function Ka(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 Ya(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ba(4,4,Ka.bind(null,t,e),n)}function Xa(){}function qa(e,t){var n=Da();t=void 0===t?null:t;var i=n.memoizedState;return null!==i&&null!==t&&ba(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function Qa(e,t){var n=Da();t=void 0===t?null:t;var i=n.memoizedState;return null!==i&&null!==t&&ba(t,i[1])?i[0]:(e=e(),n.memoizedState=[e,t],e)}function Ja(e,t,n){return 0===(21&fa)?(e.baseState&&(e.baseState=!1,ks=!0),e.memoizedState=n):(si(n,t)||(n=vt(),va.lanes|=n,Fl|=n,e.baseState=!0),t)}function $a(e,t){var n=Ct;Ct=0!==n&&4>n?n:4,e(!0);var i=pa.transition;pa.transition={};try{e(!1),t()}finally{Ct=n,pa.transition=i}}function es(){return Da().memoizedState}function ts(e,t,n){var i=tu(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},is(e))rs(t,n);else if(null!==(n=Oo(e,t,n,i))){nu(n,e,i,eu()),os(n,t,i)}}function ns(e,t,n){var i=tu(e),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(is(e))rs(t,r);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(r.hasEagerState=!0,r.eagerState=s,si(s,a)){var l=t.interleaved;return null===l?(r.next=r,To(t)):(r.next=l.next,l.next=r),void(t.interleaved=r)}}catch(u){}null!==(n=Oo(e,t,r,i))&&(nu(n,e,i,r=eu()),os(n,t,i))}}function is(e){var t=e.alternate;return e===va||null!==t&&t===va}function rs(e,t){Ca=ya=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function os(e,t,n){if(0!==(4194240&n)){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,yt(e,n)}}var as={readContext:Ro,useCallback:Sa,useContext:Sa,useEffect:Sa,useImperativeHandle:Sa,useInsertionEffect:Sa,useLayoutEffect:Sa,useMemo:Sa,useReducer:Sa,useRef:Sa,useState:Sa,useDebugValue:Sa,useDeferredValue:Sa,useTransition:Sa,useMutableSource:Sa,useSyncExternalStore:Sa,useId:Sa,unstable_isNewReconciler:!1},ss={readContext:Ro,useCallback:function(e,t){return Ra().memoizedState=[e,void 0===t?null:t],e},useContext:Ro,useEffect:Wa,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ha(4194308,4,Ka.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ha(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ha(4,2,e,t)},useMemo:function(e,t){var n=Ra();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=Ra();return t=void 0!==n?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=ts.bind(null,va,e),[i.memoizedState,e]},useRef:function(e){return e={current:e},Ra().memoizedState=e},useState:Ga,useDebugValue:Xa,useDeferredValue:function(e){return Ra().memoizedState=e},useTransition:function(){var e=Ga(!1),t=e[0];return e=$a.bind(null,e[1]),Ra().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=va,r=Ra();if(ro){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Ol)throw Error(o(349));0!==(30&fa)||Na(i,t,n)}r.memoizedState=n;var a={value:n,getSnapshot:t};return r.queue=a,Wa(Ia.bind(null,i,a,e),[e]),i.flags|=2048,Za(9,La.bind(null,i,a,n,t),void 0,null),n},useId:function(){var e=Ra(),t=Ol.identifierPrefix;if(ro){var n=Qr;t=":"+t+"R"+(n=(qr&~(1<<32-at(qr)-1)).toString(32)+n),0<(n=ka++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=wa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ls={readContext:Ro,useCallback:qa,useContext:Ro,useEffect:za,useImperativeHandle:Ya,useInsertionEffect:Ua,useLayoutEffect:ja,useMemo:Qa,useReducer:Oa,useRef:Va,useState:function(){return Oa(Ta)},useDebugValue:Xa,useDeferredValue:function(e){return Ja(Da(),ga.memoizedState,e)},useTransition:function(){return[Oa(Ta)[0],Da().memoizedState]},useMutableSource:Aa,useSyncExternalStore:Ma,useId:es,unstable_isNewReconciler:!1},us={readContext:Ro,useCallback:qa,useContext:Ro,useEffect:za,useImperativeHandle:Ya,useInsertionEffect:Ua,useLayoutEffect:ja,useMemo:Qa,useReducer:Pa,useRef:Va,useState:function(){return Pa(Ta)},useDebugValue:Xa,useDeferredValue:function(e){var t=Da();return null===ga?t.memoizedState=e:Ja(t,ga.memoizedState,e)},useTransition:function(){return[Pa(Ta)[0],Da().memoizedState]},useMutableSource:Aa,useSyncExternalStore:Ma,useId:es,unstable_isNewReconciler:!1};function cs(e,t){try{var n="",i=t;do{n+=H(i),i=i.return}while(i);var r=n}catch(o){r="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:r,digest:null}}function ds(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function hs(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var ps="function"===typeof WeakMap?WeakMap:Map;function fs(e,t,n){(n=Lo(-1,n)).tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){zl||(zl=!0,Ul=i),hs(0,t)},n}function vs(e,t,n){(n=Lo(-1,n)).tag=3;var i=e.type.getDerivedStateFromError;if("function"===typeof i){var r=t.value;n.payload=function(){return i(r)},n.callback=function(){hs(0,t)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){hs(0,t),"function"!==typeof i&&(null===jl?jl=new Set([this]):jl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function gs(e,t,n){var i=e.pingCache;if(null===i){i=e.pingCache=new ps;var r=new Set;i.set(t,r)}else void 0===(r=i.get(t))&&(r=new Set,i.set(t,r));r.has(n)||(r.add(n),e=xu.bind(null,e,t,n),t.then(e,e))}function ms(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 ys(e,t,n,i,r){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Lo(-1,1)).tag=2,Io(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=r,e)}var Cs=k.ReactCurrentOwner,ks=!1;function ws(e,t,n,i){t.child=null===e?Jo(t,null,n,i):Qo(t,e.child,n,i)}function Ss(e,t,n,i,r){n=n.render;var o=t.ref;return xo(t,r),i=Ea(e,t,n,i,o,r),n=xa(),null===e||ks?(ro&&n&&eo(t),t.flags|=1,ws(e,t,i,r),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,zs(e,t,r))}function bs(e,t,n,i,r){if(null===e){var o=n.type;return"function"!==typeof o||Mu(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Lu(n.type,null,i,t,t.mode,r)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Es(e,t,o,i,r))}if(o=e.child,0===(e.lanes&r)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:li)(a,i)&&e.ref===t.ref)return zs(e,t,r)}return t.flags|=1,(e=Nu(o,i)).ref=t.ref,e.return=t,t.child=e}function Es(e,t,n,i,r){if(null!==e){var o=e.memoizedProps;if(li(o,i)&&e.ref===t.ref){if(ks=!1,t.pendingProps=i=o,0===(e.lanes&r))return t.lanes=e.lanes,zs(e,t,r);0!==(131072&e.flags)&&(ks=!0)}}return Ds(e,t,n,i,r)}function xs(e,t,n){var i=t.pendingProps,r=i.children,o=null!==e?e.memoizedState:null;if("hidden"===i.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Rr(Nl,Ml),Ml|=n;else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Rr(Nl,Ml),Ml|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=null!==o?o.baseLanes:n,Rr(Nl,Ml),Ml|=i}else null!==o?(i=o.baseLanes|n,t.memoizedState=null):i=n,Rr(Nl,Ml),Ml|=i;return ws(e,t,r,n),t.child}function Rs(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ds(e,t,n,i,r){var o=Mr(n)?Pr:Tr.current;return o=Ar(t,o),xo(t,r),n=Ea(e,t,n,i,o,r),i=xa(),null===e||ks?(ro&&i&&eo(t),t.flags|=1,ws(e,t,n,r),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,zs(e,t,r))}function Ts(e,t,n,i,r){if(Mr(n)){var o=!0;Fr(t)}else o=!1;if(xo(t,r),null===t.stateNode)Ws(e,t),zo(t,n,i),jo(t,n,i,r),i=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"===typeof u&&null!==u?u=Ro(u):u=Ar(t,u=Mr(n)?Pr:Tr.current);var c=n.getDerivedStateFromProps,d="function"===typeof c||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==i||l!==u)&&Uo(t,a,i,u),Ao=!1;var h=t.memoizedState;a.state=h,Go(t,i,a,r),l=t.memoizedState,s!==i||h!==l||Or.current||Ao?("function"===typeof c&&(Ho(t,n,c,i),l=t.memoizedState),(s=Ao||Wo(t,n,s,i,h,l,u))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=l),a.props=i,a.state=l,a.context=u,i=s):("function"===typeof a.componentDidMount&&(t.flags|=4194308),i=!1)}else{a=t.stateNode,No(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:mo(t.type,s),a.props=u,d=t.pendingProps,h=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=Ro(l):l=Ar(t,l=Mr(n)?Pr:Tr.current);var p=n.getDerivedStateFromProps;(c="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==d||h!==l)&&Uo(t,a,i,l),Ao=!1,h=t.memoizedState,a.state=h,Go(t,i,a,r);var f=t.memoizedState;s!==d||h!==f||Or.current||Ao?("function"===typeof p&&(Ho(t,n,p,i),f=t.memoizedState),(u=Ao||Wo(t,n,u,i,h,f,l)||!1)?(c||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(i,f,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(i,f,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=f),a.props=i,a.state=f,a.context=l,i=u):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),i=!1)}return Os(e,t,n,i,o,r)}function Os(e,t,n,i,r,o){Rs(e,t);var a=0!==(128&t.flags);if(!i&&!a)return r&&_r(t,n,!1),zs(e,t,o);i=t.stateNode,Cs.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:i.render();return t.flags|=1,null!==e&&a?(t.child=Qo(t,e.child,null,o),t.child=Qo(t,null,s,o)):ws(e,t,s,o),t.memoizedState=i.state,r&&_r(t,n,!0),t.child}function Ps(e){var t=e.stateNode;t.pendingContext?Lr(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Lr(0,t.context,!1),ra(e,t.containerInfo)}function As(e,t,n,i,r){return fo(),vo(r),t.flags|=256,ws(e,t,n,i),t.child}var Ms,Ns,Ls,Is={dehydrated:null,treeContext:null,retryLane:0};function Fs(e){return{baseLanes:e,cachePool:null,transitions:null}}function _s(e,t,n){var i,r=t.pendingProps,a=la.current,s=!1,l=0!==(128&t.flags);if((i=l)||(i=(null===e||null!==e.memoizedState)&&0!==(2&a)),i?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Rr(la,1&a),null===e)return uo(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=r.children,e=r.fallback,s?(r=t.mode,s=t.child,l={mode:"hidden",children:l},0===(1&r)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=Fu(l,r,0,null),e=Iu(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Fs(n),t.memoizedState=Is,e):Gs(t,l));if(null!==(a=e.memoizedState)&&null!==(i=a.dehydrated))return function(e,t,n,i,r,a,s){if(n)return 256&t.flags?(t.flags&=-257,Zs(e,t,s,i=ds(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=i.fallback,r=t.mode,i=Fu({mode:"visible",children:i.children},r,0,null),(a=Iu(a,r,s,null)).flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,0!==(1&t.mode)&&Qo(t,e.child,null,s),t.child.memoizedState=Fs(s),t.memoizedState=Is,a);if(0===(1&t.mode))return Zs(e,t,s,null);if("$!"===r.data){if(i=r.nextSibling&&r.nextSibling.dataset)var l=i.dgst;return i=l,Zs(e,t,s,i=ds(a=Error(o(419)),i,void 0))}if(l=0!==(s&e.childLanes),ks||l){if(null!==(i=Ol)){switch(s&-s){case 4:r=2;break;case 16:r=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:r=32;break;case 536870912:r=268435456;break;default:r=0}0!==(r=0!==(r&(i.suspendedLanes|s))?0:r)&&r!==a.retryLane&&(a.retryLane=r,Po(e,r),nu(i,e,r,-1))}return vu(),Zs(e,t,s,i=ds(Error(o(421))))}return"$?"===r.data?(t.flags|=128,t.child=e.child,t=Du.bind(null,e),r._reactRetry=t,null):(e=a.treeContext,io=ur(r.nextSibling),no=t,ro=!0,oo=null,null!==e&&(Kr[Yr++]=qr,Kr[Yr++]=Qr,Kr[Yr++]=Xr,qr=e.id,Qr=e.overflow,Xr=t),(t=Gs(t,i.children)).flags|=4096,t)}(e,t,l,r,i,a,n);if(s){s=r.fallback,l=t.mode,i=(a=e.child).sibling;var u={mode:"hidden",children:r.children};return 0===(1&l)&&t.child!==a?((r=t.child).childLanes=0,r.pendingProps=u,t.deletions=null):(r=Nu(a,u)).subtreeFlags=14680064&a.subtreeFlags,null!==i?s=Nu(i,s):(s=Iu(s,l,n,null)).flags|=2,s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,l=null===(l=e.child.memoizedState)?Fs(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Is,r}return e=(s=e.child).sibling,r=Nu(s,{mode:"visible",children:r.children}),0===(1&t.mode)&&(r.lanes=n),r.return=t,r.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Gs(e,t){return(t=Fu({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Zs(e,t,n,i){return null!==i&&vo(i),Qo(t,e.child,null,n),(e=Gs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Vs(e,t,n){e.lanes|=t;var i=e.alternate;null!==i&&(i.lanes|=t),Eo(e.return,t,n)}function Hs(e,t,n,i,r){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=i,o.tail=n,o.tailMode=r)}function Bs(e,t,n){var i=t.pendingProps,r=i.revealOrder,o=i.tail;if(ws(e,t,i.children,n),0!==(2&(i=la.current)))i=1&i|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&&Vs(e,n,t);else if(19===e.tag)Vs(e,n,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}i&=1}if(Rr(la,i),0===(1&t.mode))t.memoizedState=null;else switch(r){case"forwards":for(n=t.child,r=null;null!==n;)null!==(e=n.alternate)&&null===ua(e)&&(r=n),n=n.sibling;null===(n=r)?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Hs(t,!1,r,n,o);break;case"backwards":for(n=null,r=t.child,t.child=null;null!==r;){if(null!==(e=r.alternate)&&null===ua(e)){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Hs(t,!0,n,null,o);break;case"together":Hs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ws(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function zs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Fl|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Nu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Nu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Us(e,t){if(!ro)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;null!==n;)null!==n.alternate&&(i=n),n=n.sibling;null===i?t||null===e.tail?e.tail=null:e.tail.sibling=null:i.sibling=null}}function js(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,i=0;if(t)for(var r=e.child;null!==r;)n|=r.lanes|r.childLanes,i|=14680064&r.subtreeFlags,i|=14680064&r.flags,r.return=e,r=r.sibling;else for(r=e.child;null!==r;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function Ks(e,t,n){var i=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return js(t),null;case 1:case 17:return Mr(t.type)&&Nr(),js(t),null;case 3:return i=t.stateNode,oa(),xr(Or),xr(Tr),da(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(ho(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==oo&&(au(oo),oo=null))),js(t),null;case 5:sa(t);var r=ia(na.current);if(n=t.type,null!==e&&null!=t.stateNode)Ns(e,t,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(null===t.stateNode)throw Error(o(166));return js(t),null}if(e=ia(ea.current),ho(t)){i=t.stateNode,n=t.type;var a=t.memoizedProps;switch(i[hr]=t,i[pr]=a,e=0!==(1&t.mode),n){case"dialog":Zi("cancel",i),Zi("close",i);break;case"iframe":case"object":case"embed":Zi("load",i);break;case"video":case"audio":for(r=0;r<Ii.length;r++)Zi(Ii[r],i);break;case"source":Zi("error",i);break;case"img":case"image":case"link":Zi("error",i),Zi("load",i);break;case"details":Zi("toggle",i);break;case"input":q(i,a),Zi("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!a.multiple},Zi("invalid",i);break;case"textarea":re(i,a),Zi("invalid",i)}for(var l in ye(n,a),r=null,a)if(a.hasOwnProperty(l)){var u=a[l];"children"===l?"string"===typeof u?i.textContent!==u&&(!0!==a.suppressHydrationWarning&&Ji(i.textContent,u,e),r=["children",u]):"number"===typeof u&&i.textContent!==""+u&&(!0!==a.suppressHydrationWarning&&Ji(i.textContent,u,e),r=["children",""+u]):s.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&Zi("scroll",i)}switch(n){case"input":j(i),$(i,a,!0);break;case"textarea":j(i),ae(i);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(i.onclick=$i)}i=r,t.updateQueue=i,null!==i&&(t.flags|=4)}else{l=9===r.nodeType?r:r.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof i.is?e=l.createElement(n,{is:i.is}):(e=l.createElement(n),"select"===n&&(l=e,i.multiple?l.multiple=!0:i.size&&(l.size=i.size))):e=l.createElementNS(e,n),e[hr]=t,e[pr]=i,Ms(e,t),t.stateNode=e;e:{switch(l=Ce(n,i),n){case"dialog":Zi("cancel",e),Zi("close",e),r=i;break;case"iframe":case"object":case"embed":Zi("load",e),r=i;break;case"video":case"audio":for(r=0;r<Ii.length;r++)Zi(Ii[r],e);r=i;break;case"source":Zi("error",e),r=i;break;case"img":case"image":case"link":Zi("error",e),Zi("load",e),r=i;break;case"details":Zi("toggle",e),r=i;break;case"input":q(e,i),r=X(e,i),Zi("invalid",e);break;case"option":default:r=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},r=_({},i,{value:void 0}),Zi("invalid",e);break;case"textarea":re(e,i),r=ie(e,i),Zi("invalid",e)}for(a in ye(n,r),u=r)if(u.hasOwnProperty(a)){var c=u[a];"style"===a?ge(e,c):"dangerouslySetInnerHTML"===a?null!=(c=c?c.__html:void 0)&&de(e,c):"children"===a?"string"===typeof c?("textarea"!==n||""!==c)&&he(e,c):"number"===typeof c&&he(e,""+c):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=c&&"onScroll"===a&&Zi("scroll",e):null!=c&&C(e,a,c,l))}switch(n){case"input":j(e),$(e,i,!1);break;case"textarea":j(e),ae(e);break;case"option":null!=i.value&&e.setAttribute("value",""+z(i.value));break;case"select":e.multiple=!!i.multiple,null!=(a=i.value)?ne(e,!!i.multiple,a,!1):null!=i.defaultValue&&ne(e,!!i.multiple,i.defaultValue,!0);break;default:"function"===typeof r.onClick&&(e.onclick=$i)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return js(t),null;case 6:if(e&&null!=t.stateNode)Ls(0,t,e.memoizedProps,i);else{if("string"!==typeof i&&null===t.stateNode)throw Error(o(166));if(n=ia(na.current),ia(ea.current),ho(t)){if(i=t.stateNode,n=t.memoizedProps,i[hr]=t,(a=i.nodeValue!==n)&&null!==(e=no))switch(e.tag){case 3:Ji(i.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Ji(i.nodeValue,n,0!==(1&e.mode))}a&&(t.flags|=4)}else(i=(9===n.nodeType?n:n.ownerDocument).createTextNode(i))[hr]=t,t.stateNode=i}return js(t),null;case 13:if(xr(la),i=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ro&&null!==io&&0!==(1&t.mode)&&0===(128&t.flags))po(),fo(),t.flags|=98560,a=!1;else if(a=ho(t),null!==i&&null!==i.dehydrated){if(null===e){if(!a)throw Error(o(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(o(317));a[hr]=t}else fo(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;js(t),a=!1}else null!==oo&&(au(oo),oo=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((i=null!==i)!==(null!==e&&null!==e.memoizedState)&&i&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&la.current)?0===Ll&&(Ll=3):vu())),null!==t.updateQueue&&(t.flags|=4),js(t),null);case 4:return oa(),null===e&&Bi(t.stateNode.containerInfo),js(t),null;case 10:return bo(t.type._context),js(t),null;case 19:if(xr(la),null===(a=t.memoizedState))return js(t),null;if(i=0!==(128&t.flags),null===(l=a.rendering))if(i)Us(a,!1);else{if(0!==Ll||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ua(e))){for(t.flags|=128,Us(a,!1),null!==(i=l.updateQueue)&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;null!==n;)e=i,(a=n).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Rr(la,1&la.current|2),t.child}e=e.sibling}null!==a.tail&&Qe()>Bl&&(t.flags|=128,i=!0,Us(a,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=ua(l))){if(t.flags|=128,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Us(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!ro)return js(t),null}else 2*Qe()-a.renderingStartTime>Bl&&1073741824!==n&&(t.flags|=128,i=!0,Us(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=a.last)?n.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Qe(),t.sibling=null,n=la.current,Rr(la,i?1&n|2:1&n),t):(js(t),null);case 22:case 23:return du(),i=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==i&&(t.flags|=8192),i&&0!==(1&t.mode)?0!==(1073741824&Ml)&&(js(t),6&t.subtreeFlags&&(t.flags|=8192)):js(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Ys(e,t){switch(to(t),t.tag){case 1:return Mr(t.type)&&Nr(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return oa(),xr(Or),xr(Tr),da(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return sa(t),null;case 13:if(xr(la),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));fo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return xr(la),null;case 4:return oa(),null;case 10:return bo(t.type._context),null;case 22:case 23:return du(),null;default:return null}}Ms=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ns=function(e,t,n,i){var r=e.memoizedProps;if(r!==i){e=t.stateNode,ia(ea.current);var o,a=null;switch(n){case"input":r=X(e,r),i=X(e,i),a=[];break;case"select":r=_({},r,{value:void 0}),i=_({},i,{value:void 0}),a=[];break;case"textarea":r=ie(e,r),i=ie(e,i),a=[];break;default:"function"!==typeof r.onClick&&"function"===typeof i.onClick&&(e.onclick=$i)}for(c in ye(n,i),n=null,r)if(!i.hasOwnProperty(c)&&r.hasOwnProperty(c)&&null!=r[c])if("style"===c){var l=r[c];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(s.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in i){var u=i[c];if(l=null!=r?r[c]:void 0,i.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(o in l)!l.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&l[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(a||(a=[]),a.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(a=a||[]).push(c,u)):"children"===c?"string"!==typeof u&&"number"!==typeof u||(a=a||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(s.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&Zi("scroll",e),a||l===u||(a=[])):(a=a||[]).push(c,u))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},Ls=function(e,t,n,i){n!==i&&(t.flags|=4)};var Xs=!1,qs=!1,Qs="function"===typeof WeakSet?WeakSet:Set,Js=null;function $s(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(i){Eu(e,t,i)}else n.current=null}function el(e,t,n){try{n()}catch(i){Eu(e,t,i)}}var tl=!1;function nl(e,t,n){var i=t.updateQueue;if(null!==(i=null!==i?i.lastEffect:null)){var r=i=i.next;do{if((r.tag&e)===e){var o=r.destroy;r.destroy=void 0,void 0!==o&&el(t,n,o)}r=r.next}while(r!==i)}}function il(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function rl(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[hr],delete t[pr],delete t[vr],delete t[gr],delete t[mr])),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 al(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(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,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=$i));else if(4!==i&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function ul(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==i&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var cl=null,dl=!1;function hl(e,t,n){for(n=n.child;null!==n;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(ot&&"function"===typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(rt,n)}catch(s){}switch(n.tag){case 5:qs||$s(n,t);case 6:var i=cl,r=dl;cl=null,hl(e,t,n),dl=r,null!==(cl=i)&&(dl?(e=cl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):cl.removeChild(n.stateNode));break;case 18:null!==cl&&(dl?(e=cl,n=n.stateNode,8===e.nodeType?lr(e.parentNode,n):1===e.nodeType&&lr(e,n),Bt(e)):lr(cl,n.stateNode));break;case 4:i=cl,r=dl,cl=n.stateNode.containerInfo,dl=!0,hl(e,t,n),cl=i,dl=r;break;case 0:case 11:case 14:case 15:if(!qs&&(null!==(i=n.updateQueue)&&null!==(i=i.lastEffect))){r=i=i.next;do{var o=r,a=o.destroy;o=o.tag,void 0!==a&&(0!==(2&o)||0!==(4&o))&&el(n,t,a),r=r.next}while(r!==i)}hl(e,t,n);break;case 1:if(!qs&&($s(n,t),"function"===typeof(i=n.stateNode).componentWillUnmount))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(s){Eu(n,t,s)}hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:1&n.mode?(qs=(i=qs)||null!==n.memoizedState,hl(e,t,n),qs=i):hl(e,t,n);break;default:hl(e,t,n)}}function fl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Qs),t.forEach((function(t){var i=Tu.bind(null,e,t);n.has(t)||(n.add(t),t.then(i,i))}))}}function vl(e,t){var n=t.deletions;if(null!==n)for(var i=0;i<n.length;i++){var r=n[i];try{var a=e,s=t,l=s;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(o(160));pl(a,s,r),cl=null,dl=!1;var u=r.alternate;null!==u&&(u.return=null),r.return=null}catch(c){Eu(r,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vl(t,e),ml(e),4&i){try{nl(3,e,e.return),il(3,e)}catch(g){Eu(e,e.return,g)}try{nl(5,e,e.return)}catch(g){Eu(e,e.return,g)}}break;case 1:vl(t,e),ml(e),512&i&&null!==n&&$s(n,n.return);break;case 5:if(vl(t,e),ml(e),512&i&&null!==n&&$s(n,n.return),32&e.flags){var r=e.stateNode;try{he(r,"")}catch(g){Eu(e,e.return,g)}}if(4&i&&null!=(r=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===a.type&&null!=a.name&&Q(r,a),Ce(l,s);var c=Ce(l,a);for(s=0;s<u.length;s+=2){var d=u[s],h=u[s+1];"style"===d?ge(r,h):"dangerouslySetInnerHTML"===d?de(r,h):"children"===d?he(r,h):C(r,d,h,c)}switch(l){case"input":J(r,a);break;case"textarea":oe(r,a);break;case"select":var p=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!a.multiple;var f=a.value;null!=f?ne(r,!!a.multiple,f,!1):p!==!!a.multiple&&(null!=a.defaultValue?ne(r,!!a.multiple,a.defaultValue,!0):ne(r,!!a.multiple,a.multiple?[]:"",!1))}r[pr]=a}catch(g){Eu(e,e.return,g)}}break;case 6:if(vl(t,e),ml(e),4&i){if(null===e.stateNode)throw Error(o(162));r=e.stateNode,a=e.memoizedProps;try{r.nodeValue=a}catch(g){Eu(e,e.return,g)}}break;case 3:if(vl(t,e),ml(e),4&i&&null!==n&&n.memoizedState.isDehydrated)try{Bt(t.containerInfo)}catch(g){Eu(e,e.return,g)}break;case 4:default:vl(t,e),ml(e);break;case 13:vl(t,e),ml(e),8192&(r=e.child).flags&&(a=null!==r.memoizedState,r.stateNode.isHidden=a,!a||null!==r.alternate&&null!==r.alternate.memoizedState||(Hl=Qe())),4&i&&fl(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(qs=(c=qs)||d,vl(t,e),qs=c):vl(t,e),ml(e),8192&i){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!d&&0!==(1&e.mode))for(Js=e,d=e.child;null!==d;){for(h=Js=d;null!==Js;){switch(f=(p=Js).child,p.tag){case 0:case 11:case 14:case 15:nl(4,p,p.return);break;case 1:$s(p,p.return);var v=p.stateNode;if("function"===typeof v.componentWillUnmount){i=p,n=p.return;try{t=i,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(g){Eu(i,n,g)}}break;case 5:$s(p,p.return);break;case 22:if(null!==p.memoizedState){wl(h);continue}}null!==f?(f.return=p,Js=f):wl(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{r=h.stateNode,c?"function"===typeof(a=r.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=h.stateNode,s=void 0!==(u=h.memoizedProps.style)&&null!==u&&u.hasOwnProperty("display")?u.display:null,l.style.display=ve("display",s))}catch(g){Eu(e,e.return,g)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(g){Eu(e,e.return,g)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:vl(t,e),ml(e),4&i&&fl(e);case 21:}}function ml(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(al(n)){var i=n;break e}n=n.return}throw Error(o(160))}switch(i.tag){case 5:var r=i.stateNode;32&i.flags&&(he(r,""),i.flags&=-33),ul(e,sl(e),r);break;case 3:case 4:var a=i.stateNode.containerInfo;ll(e,sl(e),a);break;default:throw Error(o(161))}}catch(s){Eu(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function yl(e,t,n){Js=e,Cl(e,t,n)}function Cl(e,t,n){for(var i=0!==(1&e.mode);null!==Js;){var r=Js,o=r.child;if(22===r.tag&&i){var a=null!==r.memoizedState||Xs;if(!a){var s=r.alternate,l=null!==s&&null!==s.memoizedState||qs;s=Xs;var u=qs;if(Xs=a,(qs=l)&&!u)for(Js=r;null!==Js;)l=(a=Js).child,22===a.tag&&null!==a.memoizedState?Sl(r):null!==l?(l.return=a,Js=l):Sl(r);for(;null!==o;)Js=o,Cl(o,t,n),o=o.sibling;Js=r,Xs=s,qs=u}kl(e)}else 0!==(8772&r.subtreeFlags)&&null!==o?(o.return=r,Js=o):kl(e)}}function kl(e){for(;null!==Js;){var t=Js;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:qs||il(5,t);break;case 1:var i=t.stateNode;if(4&t.flags&&!qs)if(null===n)i.componentDidMount();else{var r=t.elementType===t.type?n.memoizedProps:mo(t.type,n.memoizedProps);i.componentDidUpdate(r,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Zo(t,a,i);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Zo(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.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 h=d.dehydrated;null!==h&&Bt(h)}}}break;default:throw Error(o(163))}qs||512&t.flags&&rl(t)}catch(p){Eu(t,t.return,p)}}if(t===e){Js=null;break}if(null!==(n=t.sibling)){n.return=t.return,Js=n;break}Js=t.return}}function wl(e){for(;null!==Js;){var t=Js;if(t===e){Js=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Js=n;break}Js=t.return}}function Sl(e){for(;null!==Js;){var t=Js;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{il(4,t)}catch(l){Eu(t,n,l)}break;case 1:var i=t.stateNode;if("function"===typeof i.componentDidMount){var r=t.return;try{i.componentDidMount()}catch(l){Eu(t,r,l)}}var o=t.return;try{rl(t)}catch(l){Eu(t,o,l)}break;case 5:var a=t.return;try{rl(t)}catch(l){Eu(t,a,l)}}}catch(l){Eu(t,t.return,l)}if(t===e){Js=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Js=s;break}Js=t.return}}var bl,El=Math.ceil,xl=k.ReactCurrentDispatcher,Rl=k.ReactCurrentOwner,Dl=k.ReactCurrentBatchConfig,Tl=0,Ol=null,Pl=null,Al=0,Ml=0,Nl=Er(0),Ll=0,Il=null,Fl=0,_l=0,Gl=0,Zl=null,Vl=null,Hl=0,Bl=1/0,Wl=null,zl=!1,Ul=null,jl=null,Kl=!1,Yl=null,Xl=0,ql=0,Ql=null,Jl=-1,$l=0;function eu(){return 0!==(6&Tl)?Qe():-1!==Jl?Jl:Jl=Qe()}function tu(e){return 0===(1&e.mode)?1:0!==(2&Tl)&&0!==Al?Al&-Al:null!==go.transition?(0===$l&&($l=vt()),$l):0!==(e=Ct)?e:e=void 0===(e=window.event)?16:qt(e.type)}function nu(e,t,n,i){if(50<ql)throw ql=0,Ql=null,Error(o(185));mt(e,n,i),0!==(2&Tl)&&e===Ol||(e===Ol&&(0===(2&Tl)&&(_l|=n),4===Ll&&su(e,Al)),iu(e,i),1===n&&0===Tl&&0===(1&t.mode)&&(Bl=Qe()+500,Zr&&Br()))}function iu(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-at(o),s=1<<a,l=r[a];-1===l?0!==(s&n)&&0===(s&i)||(r[a]=pt(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var i=ht(e,e===Ol?Al:0);if(0===i)null!==n&&Ye(n),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(null!=n&&Ye(n),1===t)0===e.tag?function(e){Zr=!0,Hr(e)}(lu.bind(null,e)):Hr(lu.bind(null,e)),ar((function(){0===(6&Tl)&&Br()})),n=null;else{switch(kt(i)){case 1:n=$e;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=it}n=Ou(n,ru.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ru(e,t){if(Jl=-1,$l=0,0!==(6&Tl))throw Error(o(327));var n=e.callbackNode;if(Su()&&e.callbackNode!==n)return null;var i=ht(e,e===Ol?Al:0);if(0===i)return null;if(0!==(30&i)||0!==(i&e.expiredLanes)||t)t=gu(e,i);else{t=i;var r=Tl;Tl|=2;var a=fu();for(Ol===e&&Al===t||(Wl=null,Bl=Qe()+500,hu(e,t));;)try{yu();break}catch(l){pu(e,l)}So(),xl.current=a,Tl=r,null!==Pl?t=0:(Ol=null,Al=0,t=Ll)}if(0!==t){if(2===t&&(0!==(r=ft(e))&&(i=r,t=ou(e,r))),1===t)throw n=Il,hu(e,0),su(e,i),iu(e,Qe()),n;if(6===t)su(e,i);else{if(r=e.current.alternate,0===(30&i)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var i=0;i<n.length;i++){var r=n[i],o=r.getSnapshot;r=r.value;try{if(!si(o(),r))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;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}(r)&&(2===(t=gu(e,i))&&(0!==(a=ft(e))&&(i=a,t=ou(e,a))),1===t))throw n=Il,hu(e,0),su(e,i),iu(e,Qe()),n;switch(e.finishedWork=r,e.finishedLanes=i,t){case 0:case 1:throw Error(o(345));case 2:case 5:wu(e,Vl,Wl);break;case 3:if(su(e,i),(130023424&i)===i&&10<(t=Hl+500-Qe())){if(0!==ht(e,0))break;if(((r=e.suspendedLanes)&i)!==i){eu(),e.pingedLanes|=e.suspendedLanes&r;break}e.timeoutHandle=ir(wu.bind(null,e,Vl,Wl),t);break}wu(e,Vl,Wl);break;case 4:if(su(e,i),(4194240&i)===i)break;for(t=e.eventTimes,r=-1;0<i;){var s=31-at(i);a=1<<s,(s=t[s])>r&&(r=s),i&=~a}if(i=r,10<(i=(120>(i=Qe()-i)?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*El(i/1960))-i)){e.timeoutHandle=ir(wu.bind(null,e,Vl,Wl),i);break}wu(e,Vl,Wl);break;default:throw Error(o(329))}}}return iu(e,Qe()),e.callbackNode===n?ru.bind(null,e):null}function ou(e,t){var n=Zl;return e.current.memoizedState.isDehydrated&&(hu(e,t).flags|=256),2!==(e=gu(e,t))&&(t=Vl,Vl=n,null!==t&&au(t)),e}function au(e){null===Vl?Vl=e:Vl.push.apply(Vl,e)}function su(e,t){for(t&=~Gl,t&=~_l,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),i=1<<n;e[n]=-1,t&=~i}}function lu(e){if(0!==(6&Tl))throw Error(o(327));Su();var t=ht(e,0);if(0===(1&t))return iu(e,Qe()),null;var n=gu(e,t);if(0!==e.tag&&2===n){var i=ft(e);0!==i&&(t=i,n=ou(e,i))}if(1===n)throw n=Il,hu(e,0),su(e,t),iu(e,Qe()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wu(e,Vl,Wl),iu(e,Qe()),null}function uu(e,t){var n=Tl;Tl|=1;try{return e(t)}finally{0===(Tl=n)&&(Bl=Qe()+500,Zr&&Br())}}function cu(e){null!==Yl&&0===Yl.tag&&0===(6&Tl)&&Su();var t=Tl;Tl|=1;var n=Dl.transition,i=Ct;try{if(Dl.transition=null,Ct=1,e)return e()}finally{Ct=i,Dl.transition=n,0===(6&(Tl=t))&&Br()}}function du(){Ml=Nl.current,xr(Nl)}function hu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,rr(n)),null!==Pl)for(n=Pl.return;null!==n;){var i=n;switch(to(i),i.tag){case 1:null!==(i=i.type.childContextTypes)&&void 0!==i&&Nr();break;case 3:oa(),xr(Or),xr(Tr),da();break;case 5:sa(i);break;case 4:oa();break;case 13:case 19:xr(la);break;case 10:bo(i.type._context);break;case 22:case 23:du()}n=n.return}if(Ol=e,Pl=e=Nu(e.current,null),Al=Ml=t,Ll=0,Il=null,Gl=_l=Fl=0,Vl=Zl=null,null!==Do){for(t=0;t<Do.length;t++)if(null!==(i=(n=Do[t]).interleaved)){n.interleaved=null;var r=i.next,o=n.pending;if(null!==o){var a=o.next;o.next=r,i.next=a}n.pending=i}Do=null}return e}function pu(e,t){for(;;){var n=Pl;try{if(So(),ha.current=as,ya){for(var i=va.memoizedState;null!==i;){var r=i.queue;null!==r&&(r.pending=null),i=i.next}ya=!1}if(fa=0,ma=ga=va=null,Ca=!1,ka=0,Rl.current=null,null===n||null===n.return){Ll=1,Il=t,Pl=null;break}e:{var a=e,s=n.return,l=n,u=t;if(t=Al,l.flags|=32768,null!==u&&"object"===typeof u&&"function"===typeof u.then){var c=u,d=l,h=d.tag;if(0===(1&d.mode)&&(0===h||11===h||15===h)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=ms(s);if(null!==f){f.flags&=-257,ys(f,s,l,0,t),1&f.mode&&gs(a,c,t),u=c;var v=(t=f).updateQueue;if(null===v){var g=new Set;g.add(u),t.updateQueue=g}else v.add(u);break e}if(0===(1&t)){gs(a,c,t),vu();break e}u=Error(o(426))}else if(ro&&1&l.mode){var m=ms(s);if(null!==m){0===(65536&m.flags)&&(m.flags|=256),ys(m,s,l,0,t),vo(cs(u,l));break e}}a=u=cs(u,l),4!==Ll&&(Ll=2),null===Zl?Zl=[a]:Zl.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,_o(a,fs(0,u,t));break e;case 1:l=u;var y=a.type,C=a.stateNode;if(0===(128&a.flags)&&("function"===typeof y.getDerivedStateFromError||null!==C&&"function"===typeof C.componentDidCatch&&(null===jl||!jl.has(C)))){a.flags|=65536,t&=-t,a.lanes|=t,_o(a,vs(a,l,t));break e}}a=a.return}while(null!==a)}ku(n)}catch(k){t=k,Pl===n&&null!==n&&(Pl=n=n.return);continue}break}}function fu(){var e=xl.current;return xl.current=as,null===e?as:e}function vu(){0!==Ll&&3!==Ll&&2!==Ll||(Ll=4),null===Ol||0===(268435455&Fl)&&0===(268435455&_l)||su(Ol,Al)}function gu(e,t){var n=Tl;Tl|=2;var i=fu();for(Ol===e&&Al===t||(Wl=null,hu(e,t));;)try{mu();break}catch(r){pu(e,r)}if(So(),Tl=n,xl.current=i,null!==Pl)throw Error(o(261));return Ol=null,Al=0,Ll}function mu(){for(;null!==Pl;)Cu(Pl)}function yu(){for(;null!==Pl&&!Xe();)Cu(Pl)}function Cu(e){var t=bl(e.alternate,e,Ml);e.memoizedProps=e.pendingProps,null===t?ku(e):Pl=t,Rl.current=null}function ku(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Ks(n,t,Ml)))return void(Pl=n)}else{if(null!==(n=Ys(n,t)))return n.flags&=32767,void(Pl=n);if(null===e)return Ll=6,void(Pl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Pl=t);Pl=t=e}while(null!==t);0===Ll&&(Ll=5)}function wu(e,t,n){var i=Ct,r=Dl.transition;try{Dl.transition=null,Ct=1,function(e,t,n,i){do{Su()}while(null!==Yl);if(0!==(6&Tl))throw Error(o(327));n=e.finishedWork;var r=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=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 i=e.eventTimes;for(e=e.expirationTimes;0<n;){var r=31-at(n),o=1<<r;t[r]=0,i[r]=-1,e[r]=-1,n&=~o}}(e,a),e===Ol&&(Pl=Ol=null,Al=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Kl||(Kl=!0,Ou(tt,(function(){return Su(),null}))),a=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||a){a=Dl.transition,Dl.transition=null;var s=Ct;Ct=1;var l=Tl;Tl|=4,Rl.current=null,function(e,t){if(er=zt,pi(e=hi())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var i=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(i&&0!==i.rangeCount){n=i.anchorNode;var r=i.anchorOffset,a=i.focusNode;i=i.focusOffset;try{n.nodeType,a.nodeType}catch(w){n=null;break e}var s=0,l=-1,u=-1,c=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==n||0!==r&&3!==h.nodeType||(l=s+r),h!==a||0!==i&&3!==h.nodeType||(u=s+i),3===h.nodeType&&(s+=h.nodeValue.length),null!==(f=h.firstChild);)p=h,h=f;for(;;){if(h===e)break t;if(p===n&&++c===r&&(l=s),p===a&&++d===i&&(u=s),null!==(f=h.nextSibling))break;p=(h=p).parentNode}h=f}n=-1===l||-1===u?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(tr={focusedElem:e,selectionRange:n},zt=!1,Js=t;null!==Js;)if(e=(t=Js).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Js=e;else for(;null!==Js;){t=Js;try{var v=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!==v){var g=v.memoizedProps,m=v.memoizedState,y=t.stateNode,C=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:mo(t.type,g),m);y.__reactInternalSnapshotBeforeUpdate=C}break;case 3:var k=t.stateNode.containerInfo;1===k.nodeType?k.textContent="":9===k.nodeType&&k.documentElement&&k.removeChild(k.documentElement);break;default:throw Error(o(163))}}catch(w){Eu(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,Js=e;break}Js=t.return}v=tl,tl=!1}(e,n),gl(n,e),fi(tr),zt=!!er,tr=er=null,e.current=n,yl(n,e,r),qe(),Tl=l,Ct=s,Dl.transition=a}else e.current=n;if(Kl&&(Kl=!1,Yl=e,Xl=r),0===(a=e.pendingLanes)&&(jl=null),function(e){if(ot&&"function"===typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(rt,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),iu(e,Qe()),null!==t)for(i=e.onRecoverableError,n=0;n<t.length;n++)i((r=t[n]).value,{componentStack:r.stack,digest:r.digest});if(zl)throw zl=!1,e=Ul,Ul=null,e;0!==(1&Xl)&&0!==e.tag&&Su(),0!==(1&(a=e.pendingLanes))?e===Ql?ql++:(ql=0,Ql=e):ql=0,Br()}(e,t,n,i)}finally{Dl.transition=r,Ct=i}return null}function Su(){if(null!==Yl){var e=kt(Xl),t=Dl.transition,n=Ct;try{if(Dl.transition=null,Ct=16>e?16:e,null===Yl)var i=!1;else{if(e=Yl,Yl=null,Xl=0,0!==(6&Tl))throw Error(o(331));var r=Tl;for(Tl|=4,Js=e.current;null!==Js;){var a=Js,s=a.child;if(0!==(16&Js.flags)){var l=a.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(Js=c;null!==Js;){var d=Js;switch(d.tag){case 0:case 11:case 15:nl(8,d,a)}var h=d.child;if(null!==h)h.return=d,Js=h;else for(;null!==Js;){var p=(d=Js).sibling,f=d.return;if(ol(d),d===c){Js=null;break}if(null!==p){p.return=f,Js=p;break}Js=f}}}var v=a.alternate;if(null!==v){var g=v.child;if(null!==g){v.child=null;do{var m=g.sibling;g.sibling=null,g=m}while(null!==g)}}Js=a}}if(0!==(2064&a.subtreeFlags)&&null!==s)s.return=a,Js=s;else e:for(;null!==Js;){if(0!==(2048&(a=Js).flags))switch(a.tag){case 0:case 11:case 15:nl(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,Js=y;break e}Js=a.return}}var C=e.current;for(Js=C;null!==Js;){var k=(s=Js).child;if(0!==(2064&s.subtreeFlags)&&null!==k)k.return=s,Js=k;else e:for(s=C;null!==Js;){if(0!==(2048&(l=Js).flags))try{switch(l.tag){case 0:case 11:case 15:il(9,l)}}catch(S){Eu(l,l.return,S)}if(l===s){Js=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Js=w;break e}Js=l.return}}if(Tl=r,Br(),ot&&"function"===typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(rt,e)}catch(S){}i=!0}return i}finally{Ct=n,Dl.transition=t}}return!1}function bu(e,t,n){e=Io(e,t=fs(0,t=cs(n,t),1),1),t=eu(),null!==e&&(mt(e,1,t),iu(e,t))}function Eu(e,t,n){if(3===e.tag)bu(e,e,n);else for(;null!==t;){if(3===t.tag){bu(t,e,n);break}if(1===t.tag){var i=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof i.componentDidCatch&&(null===jl||!jl.has(i))){t=Io(t,e=vs(t,e=cs(n,e),1),1),e=eu(),null!==t&&(mt(t,1,e),iu(t,e));break}}t=t.return}}function xu(e,t,n){var i=e.pingCache;null!==i&&i.delete(t),t=eu(),e.pingedLanes|=e.suspendedLanes&n,Ol===e&&(Al&n)===n&&(4===Ll||3===Ll&&(130023424&Al)===Al&&500>Qe()-Hl?hu(e,0):Gl|=n),iu(e,t)}function Ru(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ct,0===(130023424&(ct<<=1))&&(ct=4194304)));var n=eu();null!==(e=Po(e,t))&&(mt(e,t,n),iu(e,n))}function Du(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ru(e,n)}function Tu(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,r=e.memoizedState;null!==r&&(n=r.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(o(314))}null!==i&&i.delete(t),Ru(e,n)}function Ou(e,t){return Ke(e,t)}function Pu(e,t,n,i){this.tag=e,this.key=n,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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Au(e,t,n,i){return new Pu(e,t,n,i)}function Mu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Nu(e,t){var n=e.alternate;return null===n?((n=Au(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Lu(e,t,n,i,r,a){var s=2;if(i=e,"function"===typeof e)Mu(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case b:return Iu(n.children,r,a,t);case E:s=8,r|=8;break;case x:return(e=Au(12,n,t,2|r)).elementType=x,e.lanes=a,e;case O:return(e=Au(13,n,t,r)).elementType=O,e.lanes=a,e;case P:return(e=Au(19,n,t,r)).elementType=P,e.lanes=a,e;case N:return Fu(n,r,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case R:s=10;break e;case D:s=9;break e;case T:s=11;break e;case A:s=14;break e;case M:s=16,i=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Au(s,n,t,r)).elementType=e,t.type=i,t.lanes=a,t}function Iu(e,t,n,i){return(e=Au(7,e,i,t)).lanes=n,e}function Fu(e,t,n,i){return(e=Au(22,e,i,t)).elementType=N,e.lanes=n,e.stateNode={isHidden:!1},e}function _u(e,t,n){return(e=Au(6,e,null,t)).lanes=n,e}function Gu(e,t,n){return(t=Au(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Zu(e,t,n,i,r){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=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Vu(e,t,n,i,r,o,a,s,l){return e=new Zu(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Au(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mo(o),e}function Hu(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==i?null:""+i,children:e,containerInfo:t,implementation:n}}function Bu(e){if(!e)return Dr;e:{if(Be(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Mr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Mr(n))return Ir(e,n,t)}return t}function Wu(e,t,n,i,r,o,a,s,l){return(e=Vu(n,i,!0,e,0,o,0,s,l)).context=Bu(null),n=e.current,(o=Lo(i=eu(),r=tu(n))).callback=void 0!==t&&null!==t?t:null,Io(n,o,r),e.current.lanes=r,mt(e,r,i),iu(e,i),e}function zu(e,t,n,i){var r=t.current,o=eu(),a=tu(r);return n=Bu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Lo(o,a)).payload={element:e},null!==(i=void 0===i?null:i)&&(t.callback=i),null!==(e=Io(r,t,a))&&(nu(e,r,a,o),Fo(e,r,a)),a}function Uu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function ju(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Ku(e,t){ju(e,t),(e=e.alternate)&&ju(e,t)}bl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Or.current)ks=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return ks=!1,function(e,t,n){switch(t.tag){case 3:Ps(t),fo();break;case 5:aa(t);break;case 1:Mr(t.type)&&Fr(t);break;case 4:ra(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,r=t.memoizedProps.value;Rr(yo,i._currentValue),i._currentValue=r;break;case 13:if(null!==(i=t.memoizedState))return null!==i.dehydrated?(Rr(la,1&la.current),t.flags|=128,null):0!==(n&t.child.childLanes)?_s(e,t,n):(Rr(la,1&la.current),null!==(e=zs(e,t,n))?e.sibling:null);Rr(la,1&la.current);break;case 19:if(i=0!==(n&t.childLanes),0!==(128&e.flags)){if(i)return Bs(e,t,n);t.flags|=128}if(null!==(r=t.memoizedState)&&(r.rendering=null,r.tail=null,r.lastEffect=null),Rr(la,la.current),i)break;return null;case 22:case 23:return t.lanes=0,xs(e,t,n)}return zs(e,t,n)}(e,t,n);ks=0!==(131072&e.flags)}else ks=!1,ro&&0!==(1048576&t.flags)&&$r(t,jr,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Ws(e,t),e=t.pendingProps;var r=Ar(t,Tr.current);xo(t,n),r=Ea(null,t,i,e,r,n);var a=xa();return t.flags|=1,"object"===typeof r&&null!==r&&"function"===typeof r.render&&void 0===r.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mr(i)?(a=!0,Fr(t)):a=!1,t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,Mo(t),r.updater=Bo,t.stateNode=r,r._reactInternals=t,jo(t,i,e,n),t=Os(null,t,i,!0,a,n)):(t.tag=0,ro&&a&&eo(t),ws(null,t,r,n),t=t.child),t;case 16:i=t.elementType;e:{switch(Ws(e,t),e=t.pendingProps,i=(r=i._init)(i._payload),t.type=i,r=t.tag=function(e){if("function"===typeof e)return Mu(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===T)return 11;if(e===A)return 14}return 2}(i),e=mo(i,e),r){case 0:t=Ds(null,t,i,e,n);break e;case 1:t=Ts(null,t,i,e,n);break e;case 11:t=Ss(null,t,i,e,n);break e;case 14:t=bs(null,t,i,mo(i.type,e),n);break e}throw Error(o(306,i,""))}return t;case 0:return i=t.type,r=t.pendingProps,Ds(e,t,i,r=t.elementType===i?r:mo(i,r),n);case 1:return i=t.type,r=t.pendingProps,Ts(e,t,i,r=t.elementType===i?r:mo(i,r),n);case 3:e:{if(Ps(t),null===e)throw Error(o(387));i=t.pendingProps,r=(a=t.memoizedState).element,No(e,t),Go(t,i,null,n);var s=t.memoizedState;if(i=s.element,a.isDehydrated){if(a={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=As(e,t,i,n,r=cs(Error(o(423)),t));break e}if(i!==r){t=As(e,t,i,n,r=cs(Error(o(424)),t));break e}for(io=ur(t.stateNode.containerInfo.firstChild),no=t,ro=!0,oo=null,n=Jo(t,null,i,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fo(),i===r){t=zs(e,t,n);break e}ws(e,t,i,n)}t=t.child}return t;case 5:return aa(t),null===e&&uo(t),i=t.type,r=t.pendingProps,a=null!==e?e.memoizedProps:null,s=r.children,nr(i,r)?s=null:null!==a&&nr(i,a)&&(t.flags|=32),Rs(e,t),ws(e,t,s,n),t.child;case 6:return null===e&&uo(t),null;case 13:return _s(e,t,n);case 4:return ra(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=Qo(t,null,i,n):ws(e,t,i,n),t.child;case 11:return i=t.type,r=t.pendingProps,Ss(e,t,i,r=t.elementType===i?r:mo(i,r),n);case 7:return ws(e,t,t.pendingProps,n),t.child;case 8:case 12:return ws(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,r=t.pendingProps,a=t.memoizedProps,s=r.value,Rr(yo,i._currentValue),i._currentValue=s,null!==a)if(si(a.value,s)){if(a.children===r.children&&!Or.current){t=zs(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var u=l.firstContext;null!==u;){if(u.context===i){if(1===a.tag){(u=Lo(-1,n&-n)).tag=2;var c=a.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}a.lanes|=n,null!==(u=a.alternate)&&(u.lanes|=n),Eo(a.return,n,t),l.lanes|=n;break}u=u.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(o(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Eo(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}ws(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,i=t.pendingProps.children,xo(t,n),i=i(r=Ro(r)),t.flags|=1,ws(e,t,i,n),t.child;case 14:return r=mo(i=t.type,t.pendingProps),bs(e,t,i,r=mo(i.type,r),n);case 15:return Es(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,r=t.pendingProps,r=t.elementType===i?r:mo(i,r),Ws(e,t),t.tag=1,Mr(i)?(e=!0,Fr(t)):e=!1,xo(t,n),zo(t,i,r),jo(t,i,r,n),Os(null,t,i,!0,e,n);case 19:return Bs(e,t,n);case 22:return xs(e,t,n)}throw Error(o(156,t.tag))};var Yu="function"===typeof reportError?reportError:function(e){console.error(e)};function Xu(e){this._internalRoot=e}function qu(e){this._internalRoot=e}function Qu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Ju(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function $u(){}function ec(e,t,n,i,r){var o=n._reactRootContainer;if(o){var a=o;if("function"===typeof r){var s=r;r=function(){var e=Uu(a);s.call(e)}}zu(t,a,e,r)}else a=function(e,t,n,i,r){if(r){if("function"===typeof i){var o=i;i=function(){var e=Uu(a);o.call(e)}}var a=Wu(t,i,e,0,null,!1,0,"",$u);return e._reactRootContainer=a,e[fr]=a.current,Bi(8===e.nodeType?e.parentNode:e),cu(),a}for(;r=e.lastChild;)e.removeChild(r);if("function"===typeof i){var s=i;i=function(){var e=Uu(l);s.call(e)}}var l=Vu(e,0,!1,null,0,!1,0,"",$u);return e._reactRootContainer=l,e[fr]=l.current,Bi(8===e.nodeType?e.parentNode:e),cu((function(){zu(t,l,n,i)})),l}(n,t,e,r,i);return Uu(a)}qu.prototype.render=Xu.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));zu(e,t,null,null)},qu.prototype.unmount=Xu.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;cu((function(){zu(null,e,null,null)})),t[fr]=null}},qu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Et();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nt.length&&0!==t&&t<Nt[n].priority;n++);Nt.splice(n,0,e),0===n&&_t(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(yt(t,1|n),iu(t,Qe()),0===(6&Tl)&&(Bl=Qe()+500,Br()))}break;case 13:cu((function(){var t=Po(e,1);if(null!==t){var n=eu();nu(t,e,1,n)}})),Ku(e,1)}},St=function(e){if(13===e.tag){var t=Po(e,134217728);if(null!==t)nu(t,e,134217728,eu());Ku(e,134217728)}},bt=function(e){if(13===e.tag){var t=tu(e),n=Po(e,t);if(null!==n)nu(n,e,t,eu());Ku(e,t)}},Et=function(){return Ct},xt=function(e,t){var n=Ct;try{return Ct=e,t()}finally{Ct=n}},Se=function(e,t,n){switch(t){case"input":if(J(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var r=wr(i);if(!r)throw Error(o(90));K(i),J(i,r)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Te=uu,Oe=cu;var tc={usingClientEntryPoint:!1,Events:[Cr,kr,wr,Re,De,uu]},nc={findFiberByHostInstance:yr,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ic={bundleType:nc.bundleType,version:nc.version,rendererPackageName:nc.rendererPackageName,rendererConfig:nc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ue(e))?null:e.stateNode},findFiberByHostInstance:nc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var rc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rc.isDisabled&&rc.supportsFiber)try{rt=rc.inject(ic),ot=rc}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Qu(t))throw Error(o(200));return Hu(e,t,null,n)},t.createRoot=function(e,t){if(!Qu(e))throw Error(o(299));var n=!1,i="",r=Yu;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onRecoverableError&&(r=t.onRecoverableError)),t=Vu(e,1,!1,null,0,n,0,i,r),e[fr]=t.current,Bi(8===e.nodeType?e.parentNode:e),new Xu(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(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=null===(e=Ue(t))?null:e.stateNode},t.flushSync=function(e){return cu(e)},t.hydrate=function(e,t,n){if(!Ju(t))throw Error(o(200));return ec(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Qu(e))throw Error(o(405));var i=null!=n&&n.hydratedSources||null,r=!1,a="",s=Yu;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(r=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Wu(t,null,e,1,null!=n?n:null,r,0,a,s),e[fr]=t.current,Bi(e),i)for(e=0;e<i.length;e++)r=(r=(n=i[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,r]:t.mutableSourceEagerHydrationData.push(n,r);return new qu(t)},t.render=function(e,t,n){if(!Ju(t))throw Error(o(200));return ec(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Ju(e))throw Error(o(40));return!!e._reactRootContainer&&(cu((function(){ec(null,null,e,!1,(function(){e._reactRootContainer=null,e[fr]=null}))})),!0)},t.unstable_batchedUpdates=uu,t.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Ju(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return ec(e,t,n,!1,i)},t.version="18.2.0-next-9e3b772b8-20220608"},1250:function(e,t,n){"use strict";var i=n(4164);t.s=i.createRoot,i.hydrateRoot},4164:function(e,t,n){"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=n(4463)},8340:function(e,t,n){"use strict";var i,r;i=n(1071),r=n(4424),i.version,i.renderToString,t.uS=i.renderToStaticMarkup,i.renderToNodeStream,i.renderToStaticNodeStream,r.renderToReadableStream},6374:function(e,t,n){"use strict";var i=n(2791),r=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var i,o={},u=null,c=null;for(i in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)a.call(t,i)&&!l.hasOwnProperty(i)&&(o[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===o[i]&&(o[i]=t[i]);return{$$typeof:r,type:e,key:u,ref:c,props:o,_owner:s.current}}t.Fragment=o,t.jsx=u,t.jsxs=u},9117:function(e,t){"use strict";var n=Symbol.for("react.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,g={};function m(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}function y(){}function C(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}m.prototype.isReactComponent={},m.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")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=m.prototype;var k=C.prototype=new y;k.constructor=C,v(k,m.prototype),k.isPureReactComponent=!0;var w=Array.isArray,S=Object.prototype.hasOwnProperty,b={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function x(e,t,i){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)S.call(t,r)&&!E.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=i;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:n,type:e,key:a,ref:s,props:o,_owner:b.current}}function R(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var D=/\/+/g;function T(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 O(e,t,r,o,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case i:l=!0}}if(l)return a=a(l=e),e=""===o?"."+T(l,0):o,w(a)?(r="",null!=e&&(r=e.replace(D,"$&/")+"/"),O(a,t,r,"",(function(e){return e}))):null!=a&&(R(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,r+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(D,"$&/")+"/")+e)),t.push(a)),1;if(l=0,o=""===o?".":o+":",w(e))for(var u=0;u<e.length;u++){var c=o+T(s=e[u],u);l+=O(s,t,r,c,a)}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),u=0;!(s=e.next()).done;)l+=O(s=s.value,t,r,c=o+T(s,u++),a);else if("object"===s)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 P(e,t,n){if(null==e)return e;var i=[],r=0;return O(e,i,"","",(function(e){return t.call(n,e,r++)})),i}function A(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 M={current:null},N={transition:null},L={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:N,ReactCurrentOwner:b};t.Children={map:P,forEach:function(e,t,n){P(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return P(e,(function(){t++})),t},toArray:function(e){return P(e,(function(e){return e}))||[]},only:function(e){if(!R(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=m,t.Fragment=r,t.Profiler=a,t.PureComponent=C,t.StrictMode=o,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L,t.cloneElement=function(e,t,i){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=v({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=b.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)S.call(t,u)&&!E.hasOwnProperty(u)&&(r[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)r.children=i;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];r.children=l}return{$$typeof:n,type:e.type,key:o,ref:a,props:r,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=x,t.createFactory=function(e){var t=x.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=R,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:A}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=N.transition;N.transition={};try{e()}finally{N.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return M.current.useCallback(e,t)},t.useContext=function(e){return M.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return M.current.useDeferredValue(e)},t.useEffect=function(e,t){return M.current.useEffect(e,t)},t.useId=function(){return M.current.useId()},t.useImperativeHandle=function(e,t,n){return M.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return M.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return M.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return M.current.useMemo(e,t)},t.useReducer=function(e,t,n){return M.current.useReducer(e,t,n)},t.useRef=function(e){return M.current.useRef(e)},t.useState=function(e){return M.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return M.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return M.current.useTransition()},t.version="18.2.0"},2791:function(e,t,n){"use strict";e.exports=n(9117)},184:function(e,t,n){"use strict";e.exports=n(6374)},6813:function(e,t){"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var i=n-1>>>1,r=e[i];if(!(0<o(r,t)))break e;e[i]=t,e[n]=r,n=i}}function i(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var i=0,r=e.length,a=r>>>1;i<a;){var s=2*(i+1)-1,l=e[s],u=s+1,c=e[u];if(0>o(l,n))u<r&&0>o(c,l)?(e[i]=c,e[u]=n,i=u):(e[i]=l,e[s]=n,i=s);else{if(!(u<r&&0>o(c,n)))break e;e[i]=c,e[u]=n,i=u}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var u=[],c=[],d=1,h=null,p=3,f=!1,v=!1,g=!1,m="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,C="undefined"!==typeof setImmediate?setImmediate:null;function k(e){for(var t=i(c);null!==t;){if(null===t.callback)r(c);else{if(!(t.startTime<=e))break;r(c),t.sortIndex=t.expirationTime,n(u,t)}t=i(c)}}function w(e){if(g=!1,k(e),!v)if(null!==i(u))v=!0,N(S);else{var t=i(c);null!==t&&L(w,t.startTime-e)}}function S(e,n){v=!1,g&&(g=!1,y(R),R=-1),f=!0;var o=p;try{for(k(n),h=i(u);null!==h&&(!(h.expirationTime>n)||e&&!O());){var a=h.callback;if("function"===typeof a){h.callback=null,p=h.priorityLevel;var s=a(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?h.callback=s:h===i(u)&&r(u),k(n)}else r(u);h=i(u)}if(null!==h)var l=!0;else{var d=i(c);null!==d&&L(w,d.startTime-n),l=!1}return l}finally{h=null,p=o,f=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var b,E=!1,x=null,R=-1,D=5,T=-1;function O(){return!(t.unstable_now()-T<D)}function P(){if(null!==x){var e=t.unstable_now();T=e;var n=!0;try{n=x(!0,e)}finally{n?b():(E=!1,x=null)}}else E=!1}if("function"===typeof C)b=function(){C(P)};else if("undefined"!==typeof MessageChannel){var A=new MessageChannel,M=A.port2;A.port1.onmessage=P,b=function(){M.postMessage(null)}}else b=function(){m(P,0)};function N(e){x=e,E||(E=!0,b())}function L(e,n){R=m((function(){e(t.unstable_now())}),n)}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(){v||f||(v=!0,N(S))},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"):D=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return i(u)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},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 n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,r,o){var a=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0<o?a+o:a:o=a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:r,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(e.sortIndex=o,n(c,e),null===i(u)&&e===i(c)&&(g?(y(R),R=-1):g=!0,L(w,o-a))):(e.sortIndex=s,n(u,e),v||f||(v=!0,N(S))),e},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},5296:function(e,t,n){"use strict";e.exports=n(6813)},6115:function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},6690:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},9728:function(e){function t(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}e.exports=function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},6389:function(e,t,n){var i=n(3808),r=n(9617),o=n(4993);e.exports=function(e){var t=r();return function(){var n,r=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return o(this,n)}},e.exports.__esModule=!0,e.exports.default=e.exports},3808:function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},1655:function(e,t,n){var i=n(6015);e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},9617:function(e){e.exports=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},4993:function(e,t,n){var i=n(8698).default,r=n(6115);e.exports=function(e,t){if(t&&("object"===i(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},6015:function(e){function t(n,i){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},8698:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},907:function(e,t,n){"use strict";function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}n.d(t,{Z:function(){return i}})},3878:function(e,t,n){"use strict";function i(e){if(Array.isArray(e))return e}n.d(t,{Z:function(){return i}})},7326:function(e,t,n){"use strict";function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return i}})},5671:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return i}})},3144:function(e,t,n){"use strict";function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n.d(t,{Z:function(){return r}})},7762:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var i=n(181);function r(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,i.Z)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}},9388:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var i=n(1120),r=n(8814),o=n(2963);function a(e){var t=(0,r.Z)();return function(){var n,r=(0,i.Z)(e);if(t){var a=(0,i.Z)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return(0,o.Z)(this,n)}}},4942:function(e,t,n){"use strict";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:function(){return i}})},1752:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=n(1120);function r(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=(0,i.Z)(e)););return e}function o(){return o="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=r(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},o.apply(this,arguments)}},1120:function(e,t,n){"use strict";function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}n.d(t,{Z:function(){return i}})},136:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var i=n(9611);function r(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,i.Z)(e,t)}},8814:function(e,t,n){"use strict";function i(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,{Z:function(){return i}})},9199:function(e,t,n){"use strict";function i(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{Z:function(){return i}})},5267:function(e,t,n){"use strict";function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Z:function(){return i}})},2963:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=n(1002),r=n(7326);function o(e,t){if(t&&("object"===(0,i.Z)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,r.Z)(e)}},4165:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var i=n(1002);function r(){r=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(T){u=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var r=t&&t.prototype instanceof p?t:p,o=Object.create(r.prototype),a=new x(i||[]);return o._invoke=function(e,t,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return D()}for(n.method=r,n.arg=o;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var l=d(e,t,n);if("normal"===l.type){if(i=n.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(T){return{type:"throw",arg:T}}}e.wrap=c;var h={};function p(){}function f(){}function v(){}var g={};u(g,a,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(R([])));y&&y!==t&&n.call(y,a)&&(g=y);var C=v.prototype=p.prototype=Object.create(g);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(o,a,s,l){var u=d(e[o],e,a);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==(0,i.Z)(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,s,l)}),(function(e){r("throw",e,s,l)})):t.resolve(h).then((function(e){c.value=e,s(c)}),(function(e){return r("throw",e,s,l)}))}l(u.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return o=o?o.then(i,i):i()}}function S(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var i=d(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var r=i.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function b(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(b,this),this.reset(!0)}function R(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,r=function t(){for(;++i<e.length;)if(n.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:D}}function D(){return{value:void 0,done:!0}}return f.prototype=v,u(C,"constructor",v),u(v,"constructor",f),f.displayName=u(v,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,u(e,l,"GeneratorFunction")),e.prototype=Object.create(C),e},e.awrap=function(e){return{__await:e}},k(w.prototype),u(w.prototype,s,(function(){return this})),e.AsyncIterator=w,e.async=function(t,n,i,r,o){void 0===o&&(o=Promise);var a=new w(c(t,n,i,r),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(C),u(C,l,"Generator"),u(C,a,(function(){return this})),u(C,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},e.values=R,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(n,i){return a.type="throw",a.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;E(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:R(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}},9611:function(e,t,n){"use strict";function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}n.d(t,{Z:function(){return i}})},9439:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var i=n(3878);var r=n(181),o=n(5267);function a(e,t){return(0,i.Z)(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);a=!0);}catch(l){s=!0,r=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return o}}(e,t)||(0,r.Z)(e,t)||(0,o.Z)()}},3433:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var i=n(907);var r=n(9199),o=n(181);function a(e){return function(e){if(Array.isArray(e))return(0,i.Z)(e)}(e)||(0,r.Z)(e)||(0,o.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},1002:function(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}n.d(t,{Z:function(){return i}})},181:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var i=n(907);function r(e,t){if(e){if("string"===typeof e)return(0,i.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,i.Z)(e,t):void 0}}},8737:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var i=n(1120),r=n(9611);var o=n(8814);function a(e,t,n){return a=(0,o.Z)()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&(0,r.Z)(o,n.prototype),o},a.apply(null,arguments)}function s(e){var t="function"===typeof Map?new Map:void 0;return s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return a(e,arguments,(0,i.Z)(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),(0,r.Z)(o,e)},s(e)}},850:function(e,t,n){"use strict";n.r(t),n.d(t,{AgChart:function(){return Td},Marker:function(){return _r},VERSION:function(){return Gd},_ModuleSupport:function(){return o},_Scale:function(){return l},_Scene:function(){return a},_Theme:function(){return s},_Util:function(){return u},__FORCE_MODULE_DETECTION:function(){return c},time:function(){return i}});var i={};n.r(i),n.d(i,{day:function(){return I},friday:function(){return W},hour:function(){return N},millisecond:function(){return m},minute:function(){return P},monday:function(){return Z},month:function(){return j},saturday:function(){return z},second:function(){return D},sunday:function(){return G},thursday:function(){return B},tuesday:function(){return V},utcDay:function(){return J},utcHour:function(){return Q},utcMinute:function(){return q},utcMonth:function(){return $},utcYear:function(){return ee},wednesday:function(){return H},year:function(){return Y}});var r={};n.r(r),n.d(r,{easeIn:function(){return tr},easeInOut:function(){return ir},easeOut:function(){return nr},easeOutElastic:function(){return rr},linear:function(){return $i}});var o={};n.r(o),n.d(o,{AND:function(){return kt},ARRAY:function(){return yt},ActionOnSet:function(){return ii},AnimationManager:function(){return sr},Axis:function(){return Ga},AxisTick:function(){return Oa},BOOLEAN:function(){return Dt},BOOLEAN_ARRAY:function(){return Jt},BaseModuleInstance:function(){return ud},CHART_BACKGROUND_MODULE:function(){return Ed},CHART_NAVIGATOR_MODULE:function(){return wd},COLOR_STRING:function(){return Gt},COLOR_STRING_ARRAY:function(){return Vt},CartesianSeries:function(){return _l},CartesianSeriesMarker:function(){return Gl},CartesianSeriesNodeBaseClickEvent:function(){return Nl},CartesianSeriesNodeClickEvent:function(){return Ll},CartesianSeriesNodeDoubleClickEvent:function(){return Il},ChartAxisDirection:function(){return Qt},ChartEventManager:function(){return ur},ChartUpdateType:function(){return Cr},CursorManager:function(){return lr},DATE:function(){return At},DATETIME_MS:function(){return Lt},DATE_ARRAY:function(){return Nt},DataController:function(){return vo},DataModel:function(){return Rn},Default:function(){return ka},FONT_STYLE:function(){return tn},FONT_WEIGHT:function(){return rn},FUNCTION:function(){return xt},GREATER_THAN:function(){return Et},HighlightManager:function(){return cr},HighlightStyle:function(){return wi},INTERACTION_RANGE:function(){return mn},InteractionManager:function(){return vr},LESS_THAN:function(){return bt},LINE_CAP:function(){return un},LINE_DASH:function(){return an},LINE_JOIN:function(){return hn},Layers:function(){return qt},LayoutService:function(){return kr},Motion:function(){return r},NUMBER:function(){return Bt},NUMBER_ARRAY:function(){return Ut},NUMBER_OR_NAN:function(){return zt},OPTIONAL:function(){return mt},OPT_ARRAY:function(){return Ct},OPT_BOOLEAN:function(){return Tt},OPT_BOOLEAN_ARRAY:function(){return $t},OPT_COLOR_STRING:function(){return Zt},OPT_COLOR_STRING_ARRAY:function(){return Ht},OPT_DATE:function(){return Mt},OPT_DATETIME_MS:function(){return It},OPT_DATE_OR_DATETIME_MS:function(){return Ft},OPT_FONT_STYLE:function(){return nn},OPT_FONT_WEIGHT:function(){return on},OPT_FUNCTION:function(){return Rt},OPT_LINE_CAP:function(){return cn},OPT_LINE_DASH:function(){return sn},OPT_LINE_JOIN:function(){return pn},OPT_NUMBER:function(){return Wt},OPT_NUMBER_ARRAY:function(){return jt},OPT_STRING:function(){return Pt},OPT_STRING_ARRAY:function(){return Yt},OR:function(){return wt},POSITION:function(){return vn},PolarAxis:function(){return tl},PolarSeries:function(){return Qa},ProxyOnWrite:function(){return ti},ProxyPropertyOnWrite:function(){return ni},REGISTERED_MODULES:function(){return cd},STRING:function(){return Ot},STRING_ARRAY:function(){return Kt},STRING_UNION:function(){return Xt},Series:function(){return Ei},SeriesItemHighlightStyle:function(){return yi},SeriesMarker:function(){return Tl},SeriesNodeBaseClickEvent:function(){return vi},SeriesNodeClickEvent:function(){return gi},SeriesNodeDoubleClickEvent:function(){return mi},SeriesNodePickMode:function(){return ri},SeriesTooltip:function(){return Si},SeriesTooltipInteraction:function(){return bi},StateMachine:function(){return Pa},TEXT_WRAP:function(){return Cn},Tags:function(){return Aa},TooltipManager:function(){return gr},UpdateService:function(){return Sr},Validate:function(){return vt},ZoomManager:function(){return mr},__FORCE_MODULE_DETECTION:function(){return xd},accumulativeValueProperty:function(){return hi},assignJsonApplyConstructedArray:function(){return ps},checkCrisp:function(){return tu},createLabelData:function(){return Jl},fixNumericExtent:function(){return En},getRectConfig:function(){return eu},groupAccumulativeValueProperty:function(){return fi},keyProperty:function(){return ui},predicateWithMessage:function(){return gt},rangedValueProperty:function(){return di},registerModule:function(){return dd},trailingAccumulatedValueProperty:function(){return pi},updateLabel:function(){return nu},updateRect:function(){return $l},valueProperty:function(){return ci}});var a={};n.r(a),n.d(a,{Arc:function(){return Vd},BBox:function(){return he},BandScale:function(){return So},Caption:function(){return Ro},Circle:function(){return Hr},ContinuousScale:function(){return To},Diamond:function(){return Wr},DropShadow:function(){return Ba},Group:function(){return Ae},HdpiCanvas:function(){return de},Image:function(){return Bd},Label:function(){return ga},Line:function(){return Eo},LinearScale:function(){return Wa},Marker:function(){return _r},Node:function(){return Ee},Path:function(){return Ir},Path2D:function(){return Mr},PointerEvents:function(){return ke},Rect:function(){return ql},RedrawType:function(){return fe},Scene:function(){return Fe},SceneChangeDetection:function(){return Ce},Sector:function(){return Xa},Selection:function(){return Rr},Shape:function(){return Ke},Square:function(){return Gr},Text:function(){return qe},Tooltip:function(){return In},getFont:function(){return Qe},getMarker:function(){return Kr},toRadians:function(){return Be},toTooltipHtml:function(){return An}});var s={};n.r(s),n.d(s,{ChartTheme:function(){return xc},DEFAULT_FONT_FAMILY:function(){return bc},EXTENDS_AXES_DEFAULTS:function(){return yc},EXTENDS_AXES_LABEL_DEFAULTS:function(){return Cc},EXTENDS_AXES_LINE_DEFAULTS:function(){return kc},EXTENDS_SERIES_DEFAULTS:function(){return wc},OVERRIDE_SERIES_LABEL_DEFAULTS:function(){return Sc},getChartTheme:function(){return Yc},themes:function(){return Wd}});var l={};n.r(l),n.d(l,{BandScale:function(){return So},ColorScale:function(){return Eu},ContinuousScale:function(){return To},LinearScale:function(){return Wa},TimeScale:function(){return Yo}});var u={};n.r(u),n.d(u,{Color:function(){return dt},DELETE:function(){return Vi},Logger:function(){return Oe},Padding:function(){return Ri},checkDatum:function(){return ut},createId:function(){return me},extent:function(){return pa},interpolateString:function(){return Vl},isContinuous:function(){return lt},isDate:function(){return at},isDiscrete:function(){return st},isNumber:function(){return ct},isNumberEqual:function(){return za},isString:function(){return rt},isStringObject:function(){return ot},jsonApply:function(){return Wi},jsonDiff:function(){return Zi},jsonMerge:function(){return Bi},jsonWalk:function(){return zi},normalisedExtent:function(){return fa},normalizeAngle180:function(){return He},normalizeAngle360:function(){return Ze},normalizeAngle360Inclusive:function(){return Ve},resetIds:function(){return ge},sanitizeHtml:function(){return Bl},tickFormat:function(){return ua},ticks:function(){return Po},toDegrees:function(){return We},toFixed:function(){return Ua},toRadians:function(){return Be}});var c=0,d=n(136),h=n(9388),p=n(5671),f=n(3144),v=function(){function e(t,n,i){(0,p.Z)(this,e),this._encode=t,this._decode=n,this._rangeCallback=i}return(0,f.Z)(e,[{key:"floor",value:function(e){var t=new Date(e),n=this._encode(t);return this._decode(n)}},{key:"ceil",value:function(e){var t=new Date(Number(e)-1),n=this._encode(t);return this._decode(n+1)}},{key:"range",value:function(e,t,n){var i,r=null===(i=this._rangeCallback)||void 0===i?void 0:i.call(this,e,t),o=this._encode(n?this.floor(e):this.ceil(e)),a=this._encode(n?this.ceil(t):this.floor(t));if(a<o)return[];for(var s=[],l=o;l<=a;l++){var u=this._decode(l);s.push(u)}return null===r||void 0===r||r(),s}}]),e}(),g=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n,[{key:"getOffset",value:function(e,t){var n="number"===typeof e||e instanceof Date?this._encode(new Date(e)):0;return Math.floor(n)%t}},{key:"every",value:function(e,t){var n,i=this,r=0,o=(null!==t&&void 0!==t?t:{}).snapTo,a=void 0===o?"start":o;if("string"===typeof a){var s=r;n=function(t,n){var o="start"===a?t:n;return r=i.getOffset(o,e),function(){return r=s}}}else"number"===typeof a?r=this.getOffset(new Date(a),e):a instanceof Date&&(r=this.getOffset(a,e));return new v((function(t){var n=i._encode(t);return Math.floor((n-r)/e)}),(function(t){return i._decode(t*e+r)}),n)}}]),n}(v);var m=new g((function(e){return e.getTime()}),(function(e){return new Date(e)})),y=m,C=(new Date(0).getFullYear(),1e3),k=6e4,w=36e5,S=864e5,b=6048e5,E=2592e6,x=31536e6,R=(new Date).getTimezoneOffset()*k;var D=new g((function(e){return Math.floor((e.getTime()-R)/C)}),(function(e){return new Date(R+e*C)})),T=D,O=(new Date).getTimezoneOffset()*k;var P=new g((function(e){return Math.floor((e.getTime()-O)/k)}),(function(e){return new Date(O+e*k)})),A=P,M=(new Date).getTimezoneOffset()*k;var N=new g((function(e){return Math.floor((e.getTime()-M)/w)}),(function(e){return new Date(M+e*w)})),L=N;var I=new g((function(e){var t=6e4*e.getTimezoneOffset();return Math.floor((e.getTime()-t)/S)}),(function(e){var t=new Date(1970,0,1);return t.setDate(t.getDate()+e),t})),F=I;function _(e){var t=new Date(2023,0,1+e).getTime();return new g((function(e){var n=e.getTime();return Math.floor((n-t)/b)}),(function(e){var n=new Date(t);return n.setDate(n.getDate()+7*e),n}))}var G=_(0),Z=_(1),V=_(2),H=_(3),B=_(4),W=_(5),z=_(6),U=G;var j=new g((function(e){return 12*e.getFullYear()+e.getMonth()}),(function(e){var t=Math.floor(e/12);return new Date(t,e-12*t,1)})),K=j;var Y=new g((function(e){return e.getFullYear()}),(function(e){var t=new Date;return t.setFullYear(e),t.setMonth(0,1),t.setHours(0,0,0,0),t})),X=Y;var q=new g((function(e){return Math.floor(e.getTime()/k)}),(function(e){return new Date(e*k)}));var Q=new g((function(e){return Math.floor(e.getTime()/w)}),(function(e){return new Date(e*w)}));var J=new g((function(e){return Math.floor(e.getTime()/S)}),(function(e){var t=new Date(0);return t.setUTCDate(t.getUTCDate()+e),t.setUTCHours(0,0,0,0),t}));var $=new g((function(e){return 12*e.getUTCFullYear()+e.getUTCMonth()}),(function(e){var t=Math.floor(e/12),n=e-12*t;return new Date(Date.UTC(t,n,1))}));var ee=new g((function(e){return e.getUTCFullYear()}),(function(e){var t=new Date;return t.setUTCFullYear(e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),t})),te=n(3433),ne=n(7762),ie=n(4165),re=n(9439),oe=n(1752),ae=n(1120),se=n(4942),le=n(7326),ue=[/Android/i,/webOS/i,/iPhone/i,/iPad/i,/iPod/i,/BlackBerry/i,/Windows Phone/i];function ce(){var e=navigator.userAgent;return!ue.some((function(t){return t.test(e)}))}var de=function(){function e(t){var n=t.document,i=void 0===n?window.document:n,r=t.width,o=void 0===r?600:r,a=t.height,s=void 0===a?300:a,l=t.domLayer,u=void 0!==l&&l,c=t.zIndex,d=void 0===c?0:c,h=t.name,f=void 0===h?void 0:h,v=t.overrideDevicePixelRatio,g=void 0===v?void 0:v;(0,p.Z)(this,e),this._container=void 0,this._enabled=!0,this._pixelRatio=NaN,this._width=0,this._height=0,this.document=i,this.element=i.createElement("canvas"),this.element.width=o,this.element.height=s,this.context=this.element.getContext("2d"),this.imageSource=this.context.canvas;var m=this.element.style;m.userSelect="none",m.display="block",u&&(m.position="absolute",m.zIndex=String(d),m.top="0",m.left="0",m.pointerEvents="none",m.opacity="1",f&&(this.element.id=f)),this.setPixelRatio(g),this.resize(o,s)}return(0,f.Z)(e,[{key:"container",get:function(){return this._container},set:function(e){this._container!==e&&(this.remove(),e&&e.appendChild(this.element),this._container=e)}},{key:"enabled",get:function(){return this._enabled},set:function(e){this.element.style.display=e?"block":"none",this._enabled=!!e}},{key:"remove",value:function(){var e=this.element.parentNode;null!=e&&e.removeChild(this.element)}},{key:"destroy",value:function(){this.element.remove(),this.element.width=0,this.element.height=0,this.context.clearRect(0,0,0,0),Object.freeze(this)}},{key:"snapshot",value:function(){}},{key:"clear",value:function(){this.context.save(),this.context.resetTransform(),this.context.clearRect(0,0,this.width,this.height),this.context.restore()}},{key:"toImage",value:function(){var e=this.document.createElement("img");return e.src=this.getDataURL(),e}},{key:"getDataURL",value:function(e){return this.element.toDataURL(e)}},{key:"download",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"image/png";e=(null!==e&&void 0!==e?e:"").trim()||"image";var n=this.getDataURL(t),i=this.document,r=i.createElement("a");r.href=n,r.download=e,r.style.display="none",i.body.appendChild(r),r.click(),i.body.removeChild(r)}},{key:"pixelRatio",get:function(){return this._pixelRatio}},{key:"setPixelRatio",value:function(t){var n=null!==t&&void 0!==t?t:window.devicePixelRatio;ce()||(n=1),e.overrideScale(this.context,n),this._pixelRatio=n}},{key:"pixelated",get:function(){return"pixelated"===this.element.style.imageRendering},set:function(e){this.element.style.imageRendering=e?"pixelated":"auto"}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"resize",value:function(e,t){if(e>0&&t>0){var n=this.element,i=this.context,r=this.pixelRatio;n.width=Math.round(e*r),n.height=Math.round(t*r),n.style.width=e+"px",n.style.height=t+"px",i.resetTransform(),this._width=e,this._height=t}}}],[{key:"textMeasuringContext",get:function(){if(this._textMeasuringContext)return this._textMeasuringContext;var e=document.createElement("canvas");return this._textMeasuringContext=e.getContext("2d"),this._textMeasuringContext}},{key:"svgText",get:function(){if(this._svgText)return this._svgText;var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.setAttribute("width","100"),t.setAttribute("height","100"),t.classList?t.classList.add("text-measuring-svg"):t.setAttribute("class","text-measuring-svg"),t.style.position="absolute",t.style.top="-1000px",t.style.visibility="hidden";var n=document.createElementNS(e,"text");return n.setAttribute("x","0"),n.setAttribute("y","30"),n.setAttribute("text","black"),t.appendChild(n),document.body.appendChild(t),this._svgText=n,n}},{key:"has",get:function(){if(this._has)return this._has;var e=navigator.userAgent.indexOf("Chrome")>-1,t=navigator.userAgent.indexOf("Firefox")>-1,n=!e&&navigator.userAgent.indexOf("Safari")>-1;return this._has=Object.freeze({textMetrics:void 0!==this.textMeasuringContext.measureText("test").actualBoundingBoxDescent&&!t&&!n,getTransform:void 0!==this.textMeasuringContext.getTransform}),this._has}},{key:"measureText",value:function(e,t,n,i){var r=this.textMeasuringContext;return r.font=t,r.textBaseline=n,r.textAlign=i,r.measureText(e)}},{key:"getTextSize",value:function(e,t){if(this.has.textMetrics){var n=this.textMeasuringContext;n.font=t;var i=n.measureText(e);return{width:i.width,height:i.actualBoundingBoxAscent+i.actualBoundingBoxDescent}}return this.measureSvgText(e,t)}},{key:"measureSvgText",value:function(e,t){var n=this.textSizeCache,i=n[t];if(i){var r=i[e];if(r)return r}else n[t]={};var o=this.svgText;o.style.font=t,o.textContent=e;var a=o.getBBox(),s={width:a.width,height:a.height};return n[t][e]=s,s}},{key:"overrideScale",value:function(e,t){var n=0,i={save:function(){this.$save(),n++},restore:function(){if(!(n>0))throw new Error("AG Charts - Unable to restore() past depth 0");this.$restore(),n--},setTransform:function(e,n,i,r,o,a){"object"===typeof e?this.$setTransform(e):this.$setTransform(e*t,n*t,i*t,r*t,o*t,a*t)},resetTransform:function(){this.$setTransform(t,0,0,t,0,0)},verifyDepthZero:function(){if(0!==n)throw new Error("AG Charts - Save/restore depth is non-zero: "+n)}};for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e["$"+r]||(e["$"+r]=e[r]),e[r]=i[r])}}]),e}();de.textSizeCache={};var he=function(){function e(t,n,i,r){(0,p.Z)(this,e),this.x=t,this.y=n,this.width=i,this.height=r}return(0,f.Z)(e,[{key:"clone",value:function(){return new e(this.x,this.y,this.width,this.height)}},{key:"equals",value:function(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height}},{key:"containsPoint",value:function(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height}},{key:"collidesBBox",value:function(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}},{key:"isInfinite",value:function(){return Math.abs(this.x)===1/0||Math.abs(this.y)===1/0||Math.abs(this.width)===1/0||Math.abs(this.height)===1/0}},{key:"shrink",value:function(e,t){var n=this,i=function(e,t){switch(e){case"top":n.y+=t;case"bottom":n.height-=t;break;case"left":n.x+=t;case"right":n.width-=t;break;case"vertical":n.y+=t,n.height-=2*t;break;case"horizontal":n.x+=t,n.width-=2*t;break;default:n.x+=t,n.width-=2*t,n.y+=t,n.height-=2*t}};return"number"===typeof e?i(t,e):Object.entries(e).forEach((function(e){var t=(0,re.Z)(e,2),n=t[0],r=t[1];return i(n,r)})),this}},{key:"grow",value:function(e,t){if("number"===typeof e)this.shrink(-e,t);else{var n=Object.assign({},e);for(var i in n)n[i]*=-1;this.shrink(n)}return this}}],[{key:"merge",value:function(t){var n=1/0,i=1/0,r=-1/0,o=-1/0;return t.forEach((function(e){e.x<n&&(n=e.x),e.y<i&&(i=e.y),e.x+e.width>r&&(r=e.x+e.width),e.y+e.height>o&&(o=e.y+e.height)})),new e(n,i,r-n,o-i)}}]),e}(),pe=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[1,0,0,1,0,0];(0,p.Z)(this,e),this.elements=t}return(0,f.Z)(e,[{key:"e",get:function(){return(0,te.Z)(this.elements)}},{key:"setElements",value:function(e){var 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}},{key:"identity",get:function(){var e=this.elements;return 1===e[0]&&0===e[1]&&0===e[2]&&1===e[3]&&0===e[4]&&0===e[5]}},{key:"AxB",value:function(e,t,n){var i=e[0]*t[0]+e[2]*t[1],r=e[1]*t[0]+e[3]*t[1],o=e[0]*t[2]+e[2]*t[3],a=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];(n=null!==n&&void 0!==n?n:e)[0]=i,n[1]=r,n[2]=o,n[3]=a,n[4]=s,n[5]=l}},{key:"multiplySelf",value:function(e){return this.AxB(this.elements,e.elements),this}},{key:"multiply",value:function(t){var n=new Array(6);return this.AxB(this.elements,t.elements,n),new e(n)}},{key:"preMultiplySelf",value:function(e){return this.AxB(e.elements,this.elements,this.elements),this}},{key:"inverse",value:function(){var t=this.elements,n=t[0],i=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=1/(n*o-i*r);return new e([o*=l,-(i*=l),-(r*=l),n*=l,r*s-o*a,i*a-n*s])}},{key:"inverseTo",value:function(e){var t=this.elements,n=t[0],i=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=1/(n*o-i*r);return n*=l,i*=l,r*=l,o*=l,e.setElements([o,-i,-r,n,r*s-o*a,i*a-n*s]),this}},{key:"invertSelf",value:function(){var e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],s=1/(t*r-n*i);return t*=s,n*=s,i*=s,r*=s,e[0]=r,e[1]=-n,e[2]=-i,e[3]=t,e[4]=i*a-r*o,e[5]=n*o-t*a,this}},{key:"transformPoint",value:function(e,t){var n=this.elements;return{x:e*n[0]+t*n[2]+n[4],y:e*n[1]+t*n[3]+n[5]}}},{key:"transformBBox",value:function(e,t){var n=this.elements,i=n[0],r=n[1],o=n[2],a=n[3],s=.5*e.width,l=.5*e.height,u=e.x+s,c=e.y+l,d=Math.abs(s*i)+Math.abs(l*o),h=Math.abs(s*r)+Math.abs(l*a);return t||(t=new he(0,0,0,0)),t.x=u*i+c*o+n[4]-d,t.y=u*r+c*a+n[5]-h,t.width=d+d,t.height=h+h,t}},{key:"toContext",value:function(e){if(!this.identity){var t=this.elements;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}}}],[{key:"flyweight",value:function(t){return e.instance.setElements(t.elements)}},{key:"updateTransformMatrix",value:function(e,t,n,i,r,o,a){var s,l,u=t,c=n;1===u&&1===c?(s=0,l=0):(s=null==(null===a||void 0===a?void 0:a.scalingCenterX)?0:null===a||void 0===a?void 0:a.scalingCenterX,l=null==(null===a||void 0===a?void 0:a.scalingCenterY)?0:null===a||void 0===a?void 0:a.scalingCenterY);var d,h,p=i,f=Math.cos(p),v=Math.sin(p);0===p?(d=0,h=0):(d=null==(null===a||void 0===a?void 0:a.rotationCenterX)?0:null===a||void 0===a?void 0:a.rotationCenterX,h=null==(null===a||void 0===a?void 0:a.rotationCenterY)?0:null===a||void 0===a?void 0:a.rotationCenterY);var g=r,m=o,y=s*(1-u)-d,C=l*(1-c)-h;return e.setElements([f*u,v*u,-v*c,f*c,f*y-v*C+d+g,v*y+f*C+h+m]),e}},{key:"fromContext",value:function(t){var n=t.getTransform();return new e([n.a,n.b,n.c,n.d,n.e,n.f])}}]),e}();pe.instance=new pe;var fe,ve={};function ge(){for(var e in ve)delete ve[e]}function me(e){var t,n=e.constructor,i=Object.prototype.hasOwnProperty.call(n,"className")?n.className:n.name;if(!i)throw new Error("The ".concat(n," is missing the 'className' property."));var r=(null!==(t=ve[i])&&void 0!==t?t:0)+1;return ve[i]=r,i+"-"+r}!function(e){e[e.NONE=0]="NONE",e[e.TRIVIAL=1]="TRIVIAL",e[e.MINOR=2]="MINOR",e[e.MAJOR=3]="MAJOR"}(fe||(fe={}));var ye=function(){try{return new Function("return true"),!0}catch(e){return!1}}();function Ce(e){var t=null!==e&&void 0!==e?e:{},n=t.changeCb,i=t.convertor;return function(t,r){var o="__".concat(r);t[r]||(ye&&null==n&&null==i?function(e,t,n,i){var r=null!==i&&void 0!==i?i:{},o=r.redraw,a=void 0===o?fe.TRIVIAL:o,s=r.type,l=void 0===s?"normal":s,u=r.checkDirtyOnAssignment,c=void 0!==u&&u,d=new Function("value","\n        const oldValue = this.".concat(n,";\n        if (value !== oldValue) {\n            this.").concat(n," = value;\n            ").concat("normal"===l?"this.markDirty(this, ".concat(a,");"):"","\n            ").concat("transform"===l?"this.markDirtyTransform(".concat(a,");"):"","\n            ").concat("path"===l?"if (!this._dirtyPath) { this._dirtyPath = true; this.markDirty(this, ".concat(a,"); }"):"","\n            ").concat("font"===l?"if (!this._dirtyFont) { this._dirtyFont = true; this.markDirty(this, ".concat(a,"); }"):"","\n        }\n        ").concat(c?"if (value != null && value._dirty > ".concat(fe.NONE,") { this.markDirty(value, value._dirty); }"):"","\n")),h=new Function("return this.".concat(n,";"));Object.defineProperty(e,t,{set:d,get:h,enumerable:!0,configurable:!0})}(t,r,o,e):function(e,t,n,i){var r=null!==i&&void 0!==i?i:{},o=r.redraw,a=void 0===o?fe.TRIVIAL:o,s=r.type,l=void 0===s?"normal":s,u=r.changeCb,c=r.convertor,d=r.checkDirtyOnAssignment,h=void 0!==d&&d,p=function(e){var t=this[n];(e=c?c(e):e)!==t&&(this[n]=e,"normal"===l&&this.markDirty(this,a),"transform"===l&&this.markDirtyTransform(a),"path"!==l||this._dirtyPath||(this._dirtyPath=!0,this.markDirty(this,a)),"font"!==l||this._dirtyFont||(this._dirtyFont=!0,this.markDirty(this,a)),u&&u(this)),h&&null!=e&&e._dirty>fe.NONE&&this.markDirty(e,e._dirty)},f=function(){return this[n]};Object.defineProperty(e,t,{set:p,get:f,enumerable:!0,configurable:!0})}(t,r,o,e))}}var ke,we=function(){function e(){(0,p.Z)(this,e),this._dirty=fe.MAJOR}return(0,f.Z)(e,[{key:"markDirty",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fe.TRIVIAL;this._dirty>t||(this._dirty=t)}},{key:"markClean",value:function(e){this._dirty=fe.NONE}},{key:"isDirty",value:function(){return this._dirty>fe.NONE}}]),e}(),Se=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};!function(e){e[e.All=0]="All",e[e.None=1]="None"}(ke||(ke={}));var be=function(e){e.parent&&(e.parent.dirtyZIndex=!0),e.zIndexChanged()},Ee=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=i.isVirtual;return(0,p.Z)(this,n),(e=t.call(this)).serialNumber=n._nextSerialNumber++,e.id=me((0,le.Z)(e)),e.tag=NaN,e.isContainerNode=!1,e._virtualChildren=[],e._children=[],e.childSet={},e.matrix=new pe,e.inverseMatrix=new pe,e.dirtyTransform=!1,e.scalingX=1,e.scalingY=1,e.scalingCenterX=null,e.scalingCenterY=null,e.rotationCenterX=null,e.rotationCenterY=null,e.rotation=0,e.translationX=0,e.translationY=0,e.visible=!0,e.dirtyZIndex=!1,e.zIndex=0,e.zIndexSubOrder=void 0,e.pointerEvents=ke.All,e.isVirtual=null!==r&&void 0!==r&&r,e}return(0,f.Z)(n,[{key:"datum",get:function(){var e;return void 0!==this._datum?this._datum:null===(e=this._parent)||void 0===e?void 0:e.datum},set:function(e){this._datum=e}},{key:"_setLayerManager",value:function(e){this._layerManager=e,this._debug=null===e||void 0===e?void 0:e.debug;var t,n=(0,ne.Z)(this._children);try{for(n.s();!(t=n.n()).done;){t.value._setLayerManager(e)}}catch(o){n.e(o)}finally{n.f()}var i,r=(0,ne.Z)(this._virtualChildren);try{for(r.s();!(i=r.n()).done;){i.value._setLayerManager(e)}}catch(o){r.e(o)}finally{r.f()}}},{key:"layerManager",get:function(){return this._layerManager}},{key:"parent",get:function(){return this._parent}},{key:"children",get:function(){if(0===this._virtualChildren.length)return this._children;var e,t=(0,te.Z)(this._children),n=(0,ne.Z)(this._virtualChildren);try{for(n.s();!(e=n.n()).done;){var i=e.value;t.push.apply(t,(0,te.Z)(i.children))}}catch(r){n.e(r)}finally{n.f()}return t}},{key:"virtualChildren",get:function(){return this._virtualChildren}},{key:"hasVirtualChildren",value:function(){return this._virtualChildren.length>0}},{key:"append",value:function(e){Array.isArray(e)||(e=[e]);var t,n=(0,ne.Z)(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.parent)throw new Error("".concat(i," already belongs to another parent: ").concat(i.parent,"."));if(i.layerManager)throw new Error("".concat(i," already belongs to a scene: ").concat(i.layerManager,"."));if(this.childSet[i.id])throw new Error("Duplicate ".concat(i.constructor.name," node: ").concat(i));i.isVirtual?this._virtualChildren.push(i):this._children.push(i),this.childSet[i.id]=!0,i._parent=this,i._setLayerManager(this.layerManager)}}catch(r){n.e(r)}finally{n.f()}this.dirtyZIndex=!0,this.markDirty(this,fe.MAJOR)}},{key:"appendChild",value:function(e){return this.append(e),e}},{key:"removeChild",value:function(e){var t=function(){throw new Error("The node to be removed is not a child of this node.")};if(e.parent!==this&&t(),e.isVirtual){var n=this._virtualChildren.indexOf(e);n<0&&t(),this._virtualChildren.splice(n,1)}else{var i=this._children.indexOf(e);i<0&&t(),this._children.splice(i,1)}return delete this.childSet[e.id],e._parent=void 0,e._setLayerManager(),this.dirtyZIndex=!0,this.markDirty(e,fe.MAJOR),e}},{key:"calculateCumulativeMatrix",value:function(){this.computeTransformMatrix();for(var e=pe.flyweight(this.matrix),t=this.parent;t;)t.computeTransformMatrix(),e.preMultiplySelf(t.matrix),t=t.parent;return e}},{key:"transformPoint",value:function(e,t){return this.calculateCumulativeMatrix().invertSelf().transformPoint(e,t)}},{key:"inverseTransformPoint",value:function(e,t){return this.calculateCumulativeMatrix().transformPoint(e,t)}},{key:"transformBBox",value:function(e){return this.calculateCumulativeMatrix().invertSelf().transformBBox(e)}},{key:"inverseTransformBBox",value:function(e){return this.calculateCumulativeMatrix().transformBBox(e)}},{key:"markDirtyTransform",value:function(){this.dirtyTransform=!0,this.markDirty(this,fe.MAJOR)}},{key:"containsPoint",value:function(e,t){return!1}},{key:"pickNode",value:function(e,t){var n;if(this.visible&&this.pointerEvents!==ke.None&&this.containsPoint(e,t)){var i=this.children;if(i.length>1e3)for(var r=i.length-1;r>=0;r--){var o=i[r],a=(null===(n=o.computeTransformedBBox())||void 0===n?void 0:n.containsPoint(e,t))?o.pickNode(e,t):void 0;if(a)return a}else if(i.length)for(var s=i.length-1;s>=0;s--){var l=i[s].pickNode(e,t);if(l)return l}else if(!this.isContainerNode)return this}}},{key:"findNodes",value:function(e){var t,n=e(this)?[this]:[],i=(0,ne.Z)(this.children);try{for(i.s();!(t=i.n()).done;){var r=t.value.findNodes(e);r&&n.push.apply(n,(0,te.Z)(r))}}catch(o){i.e(o)}finally{i.f()}return n}},{key:"computeBBox",value:function(){}},{key:"computeTransformedBBox",value:function(){var e=this.computeBBox();if(e){this.computeTransformMatrix();for(var t=pe.flyweight(this.matrix),n=this.parent;n;)n.computeTransformMatrix(),t.preMultiplySelf(n.matrix),n=n.parent;return t.transformBBox(e,e),e}}},{key:"computeTransformMatrix",value:function(){if(this.dirtyTransform){var e=this.matrix,t=this.scalingX,n=this.scalingY,i=this.rotation,r=this.translationX,o=this.translationY,a=this.scalingCenterX,s=this.scalingCenterY,l=this.rotationCenterX,u=this.rotationCenterY;pe.updateTransformMatrix(e,t,n,i,r,o,{scalingCenterX:a,scalingCenterY:s,rotationCenterX:l,rotationCenterY:u}),e.inverseTo(this.inverseMatrix),this.dirtyTransform=!1}}},{key:"render",value:function(e){var t=e.stats;this._dirty=fe.NONE,t&&t.nodesRendered++}},{key:"clearBBox",value:function(e){var t=this.computeBBox();if(null!=t){var n=t.x,i=t.y,r=t.width,o=t.height,a=this.transformPoint(n,i),s=this.transformPoint(n+r,i+o);e.clearRect(a.x,a.y,s.x-a.x,s.y-a.y)}}},{key:"markDirty",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fe.TRIVIAL,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;this._dirty>t||this._dirty===t&&t===n||(this._dirty=t,this.parent?this.parent.markDirty(this,n):this.layerManager&&this.layerManager.markDirty())}},{key:"dirty",get:function(){return this._dirty}},{key:"markClean",value:function(e){var t=null!==e&&void 0!==e?e:{},n=t.force,i=void 0!==n&&n,r=t.recursive,o=void 0===r||r;if(this._dirty!==fe.NONE||i){if(this._dirty=fe.NONE,!1!==o){var a,s=(0,ne.Z)(this._virtualChildren);try{for(s.s();!(a=s.n()).done;){a.value.markClean({force:i})}}catch(c){s.e(c)}finally{s.f()}}if(!0===o){var l,u=(0,ne.Z)(this._children);try{for(u.s();!(l=u.n()).done;){l.value.markClean({force:i})}}catch(c){u.e(c)}finally{u.f()}}}}},{key:"visibilityChanged",value:function(){}},{key:"nodeCount",get:function(){var e,t=1,n=this._dirty>=fe.NONE||this.dirtyTransform?1:0,i=this.visible?1:0,r=function(e){var r=e.nodeCount,o=r.count,a=r.visibleCount,s=r.dirtyCount;t+=o,i+=a,n+=s},o=(0,ne.Z)(this._children);try{for(o.s();!(e=o.n()).done;){r(e.value)}}catch(l){o.e(l)}finally{o.f()}var a,s=(0,ne.Z)(this._virtualChildren);try{for(s.s();!(a=s.n()).done;){r(a.value)}}catch(l){s.e(l)}finally{s.f()}return{count:t,visibleCount:i,dirtyCount:n}}},{key:"zIndexChanged",value:function(){}}]),n}(we);function xe(e,t){var n=0;return"number"===typeof e&&"number"===typeof t?n=e-t:"string"===typeof e&&"string"===typeof t?n=e.localeCompare(t):null==e&&null==t||(n=null==e?-1:null==t?1:String(e).localeCompare(String(t))),n}function Re(e,t,n){var i=function(e){return"function"===typeof e?e():e};for(var r in e){var o=n(i(e[r]),i(t[r]));if(0!==o)return o}return 0}Ee._nextSerialNumber=0,Se([Ce({type:"transform"})],Ee.prototype,"scalingX",void 0),Se([Ce({type:"transform"})],Ee.prototype,"scalingY",void 0),Se([Ce({type:"transform"})],Ee.prototype,"scalingCenterX",void 0),Se([Ce({type:"transform"})],Ee.prototype,"scalingCenterY",void 0),Se([Ce({type:"transform"})],Ee.prototype,"rotationCenterX",void 0),Se([Ce({type:"transform"})],Ee.prototype,"rotationCenterY",void 0),Se([Ce({type:"transform"})],Ee.prototype,"rotation",void 0),Se([Ce({type:"transform"})],Ee.prototype,"translationX",void 0),Se([Ce({type:"transform"})],Ee.prototype,"translationY",void 0),Se([Ce({redraw:fe.MAJOR,changeCb:function(e){return e.visibilityChanged()}})],Ee.prototype,"visible",void 0),Se([Ce({redraw:fe.TRIVIAL,changeCb:be})],Ee.prototype,"zIndex",void 0),Se([Ce({redraw:fe.TRIVIAL,changeCb:be})],Ee.prototype,"zIndexSubOrder",void 0);var De={};function Te(e,t){De[t]||(e(),De[t]=!0)}var Oe={debug:function(){var e;(e=console).log.apply(e,arguments)},warn:function(e){for(var t,n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];(t=console).warn.apply(t,["AG Charts - ".concat(e)].concat(i))},error:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var r,o;"object"===typeof e?(r=console).error.apply(r,["AG Charts error",e].concat(n)):(o=console).error.apply(o,["AG Charts - ".concat(e)].concat(n))},warnOnce:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];Te((function(){return Oe.warn.apply(Oe,[e].concat(n))}),"Logger.warn: ".concat(e))},errorOnce:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];Te((function(){return Oe.error.apply(Oe,[e].concat(n))}),"Logger.warn: ".concat(e))}},Pe=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Ae=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i,r;(0,p.Z)(this,n),(i=t.call(this,{isVirtual:null===e||void 0===e?void 0:e.isVirtual})).opts=e,i.opacity=1,i.lastBBox=void 0;var o=null!==e&&void 0!==e?e:{},a=o.zIndex,s=o.zIndexSubOrder;return i.isContainerNode=!0,void 0!==a&&(i.zIndex=a),void 0!==s&&(i.zIndexSubOrder=s),i.name=null===(r=i.opts)||void 0===r?void 0:r.name,i}return(0,f.Z)(n,[{key:"zIndexChanged",value:function(){var e;this.layer&&(null===(e=this._layerManager)||void 0===e||e.moveLayer(this.layer,this.zIndex,this.zIndexSubOrder))}},{key:"isLayer",value:function(){return null!=this.layer}},{key:"_setLayerManager",value:function(e){var t,i,r=this;if(this._layerManager&&this.layer&&(this._layerManager.removeLayer(this.layer),this.layer=void 0),this.layer)throw new Error("AG Charts - unable to deregister scene rendering layer!");if((0,oe.Z)((0,ae.Z)(n.prototype),"_setLayerManager",this).call(this,e),e&&(null===(t=this.opts)||void 0===t?void 0:t.layer)){var o=null!==(i=this.opts)&&void 0!==i?i:{},a=o.zIndex,s=o.zIndexSubOrder,l=o.name;this.layer=e.addLayer({zIndex:a,zIndexSubOrder:s,name:l,getComputedOpacity:function(){return r.getComputedOpacity()},getVisibility:function(){return r.getVisibility()}})}}},{key:"getComputedOpacity",value:function(){var e=1,t=this;do{t instanceof n&&(e*=t.opacity)}while(t=t.parent);return e}},{key:"getVisibility",value:function(){for(var e=this,t=this.visible;e=e.parent;)e.visible||(t=e.visible);return t}},{key:"visibilityChanged",value:function(){this.layer&&(this.layer.enabled=this.visible)}},{key:"markDirty",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fe.TRIVIAL;if(this.isVirtual)(0,oe.Z)((0,ae.Z)(n.prototype),"markDirty",this).call(this,e,t);else{var i=t;(t<fe.MINOR||null!=this.layer)&&(i=fe.TRIVIAL),(0,oe.Z)((0,ae.Z)(n.prototype),"markDirty",this).call(this,e,t,i)}}},{key:"containsPoint",value:function(e,t){return!0}},{key:"computeBBox",value:function(){return this.computeTransformMatrix(),n.computeBBox(this.children)}},{key:"computeTransformedBBox",value:function(){return this.computeBBox()}},{key:"render",value:function(e){var t,i,r,o=this.opts,a=(o=void 0===o?{}:o).name,s=void 0===a?void 0:a,l=this._debug,u=(l=void 0===l?{}:l).consoleLog,c=void 0!==u&&u,d=this.dirty,h=this.dirtyZIndex,p=this.layer,f=this.children,v=this.clipRect,g=this.dirtyTransform,m=e.ctx,y=e.forceRender,C=e.clipBBox,k=e.resized,w=e.stats,S=m.getTransform(),b=d>=fe.MINOR||h||k,E=b,x=!1,R=(0,ne.Z)(f);try{for(R.s();!(r=R.n()).done;){var D=r.value;if(E||(E=null==D.layerManager&&D.dirty>=fe.TRIVIAL),x||(x=null!=D.layerManager&&D.dirty>=fe.TRIVIAL),E)break}}catch(X){R.e(X)}finally{R.f()}if(s&&c&&Oe.debug({name:s,group:this,isDirty:b,isChildDirty:E,dirtyTransform:g,renderCtx:e,forceRender:y}),g)y="dirtyTransform";else if(p){var T=this.computeBBox();void 0!==this.lastBBox&&this.lastBBox.equals(T)||(y="dirtyTransform",this.lastBBox=T)}if(!b&&!E&&!x&&!y){if(s&&c&&w){var O=this.nodeCount;Oe.debug({name:s,result:"skipping",renderCtx:e,counts:O,group:this})}return p&&w&&(w.layersSkipped++,w.nodesSkipped+=this.nodeCount.count),void this.markClean({recursive:!1})}var P=this.visible;if(p){if((m=p.context).save(),m.resetTransform(),"dirtyTransform"!==y&&(y=E||h),y&&p.clear(),C){var A=C,M=A.width,N=A.height,L=A.x,I=A.y;c&&Oe.debug({name:s,clipBBox:C,ctxTransform:m.getTransform(),renderCtx:e,group:this}),this.clipCtx(m,L,I,M,N)}m.setTransform(S)}else m.globalAlpha*=this.opacity;if(this.computeTransformMatrix(),this.matrix.toContext(m),v){var F=v.x,_=v.y,G=v.width,Z=v.height;m.save(),c&&Oe.debug({name:s,clipRect:v,ctxTransform:m.getTransform(),renderCtx:e,group:this}),this.clipCtx(m,F,_,G,Z),C=this.matrix.transformBBox(v)}var V=this.hasVirtualChildren();h?(this.sortChildren(f),"dirtyTransform"!==y&&(y=!0)):V&&this.sortChildren(f);var H,B=y!==e.forceRender||C!==e.clipBBox||m!==e.ctx?Object.assign(Object.assign({},e),{ctx:m,forceRender:y,clipBBox:C}):e,W=0,z=(0,ne.Z)(f);try{for(z.s();!(H=z.n()).done;){var U=H.value;U.visible&&P?y||U.dirty!==fe.NONE?(m.save(),U.render(B),m.restore()):w&&(W+=U.nodeCount.count):(U.markClean(),w&&(W+=U.nodeCount.count))}}catch(X){z.e(X)}finally{z.f()}if(w&&(w.nodesSkipped+=W),(0,oe.Z)((0,ae.Z)(n.prototype),"render",this).call(this,e),v&&m.restore(),V){var j,K=(0,ne.Z)(this.virtualChildren);try{for(K.s();!(j=K.n()).done;){j.value.markClean({recursive:"virtual"})}}catch(X){K.e(X)}finally{K.f()}}if(p&&(w&&w.layersRendered++,m.restore(),y&&p.snapshot(),null===(i=(t=p.context).verifyDepthZero)||void 0===i||i.call(t)),s&&c&&w){var Y=this.nodeCount;Oe.debug({name:s,result:"rendered",skipped:W,renderCtx:e,counts:Y,group:this})}}},{key:"sortChildren",value:function(e){this.dirtyZIndex=!1,e.sort((function(e,t){var n,i;return Re([e.zIndex].concat((0,te.Z)(null!==(n=e.zIndexSubOrder)&&void 0!==n?n:[void 0,void 0]),[e.serialNumber]),[t.zIndex].concat((0,te.Z)(null!==(i=t.zIndexSubOrder)&&void 0!==i?i:[void 0,void 0]),[t.serialNumber]),xe)}))}},{key:"clipCtx",value:function(e,t,n,i,r){e.beginPath(),e.moveTo(t,n),e.lineTo(t+i,n),e.lineTo(t+i,n+r),e.lineTo(t,n+r),e.closePath(),e.clip()}},{key:"setClipRectInGroupCoordinateSpace",value:function(e){this.clipRect=e?this.transformBBox(e):void 0}}],[{key:"computeBBox",value:function(e){var t=1/0,n=-1/0,i=1/0,r=-1/0;return e.forEach((function(e){if(e.visible){var o=e.computeTransformedBBox();if(o){var a=o.x,s=o.y;a<t&&(t=a),s<i&&(i=s),a+o.width>n&&(n=a+o.width),s+o.height>r&&(r=s+o.height)}}})),new he(t,i,n-t,r-i)}}]),n}(Ee);Ae.className="Group",Pe([Ce({redraw:fe.MAJOR,convertor:function(e){return Math.min(1,Math.max(0,e))}})],Ae.prototype,"opacity",void 0);var Me,Ne=function(){function e(t){var n=t.width,i=void 0===n?600:n,r=t.height,o=void 0===r?300:r,a=t.overrideDevicePixelRatio,s=void 0===a?void 0:a;(0,p.Z)(this,e),this.enabled=!0,this._pixelRatio=NaN,this._width=0,this._height=0,this.canvas=new OffscreenCanvas(i,o),this.context=this.canvas.getContext("2d"),this.imageSource=this.canvas.transferToImageBitmap(),this.setPixelRatio(s),this.resize(i,o)}return(0,f.Z)(e,[{key:"snapshot",value:function(){this.imageSource.close(),this.imageSource=this.canvas.transferToImageBitmap()}},{key:"destroy",value:function(){this.imageSource.close(),this.canvas.width=0,this.canvas.height=0,this.context.clearRect(0,0,0,0)}},{key:"clear",value:function(){this.context.save(),this.context.resetTransform(),this.context.clearRect(0,0,this.width,this.height),this.context.restore()}},{key:"pixelRatio",get:function(){return this._pixelRatio}},{key:"setPixelRatio",value:function(e){var t=null!==e&&void 0!==e?e:window.devicePixelRatio;ce()||(t=1),de.overrideScale(this.context,t),this._pixelRatio=t}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"resize",value:function(e,t){if(e>0&&t>0){var n=this.canvas,i=this.context,r=this.pixelRatio;n.width=Math.round(e*r),n.height=Math.round(t*r),i.resetTransform(),this._width=e,this._height=t}}}],[{key:"isSupported",value:function(){return null!=window.OffscreenCanvas}}]),e}();function Le(e){var t="undefined"!==typeof window?window:void 0;return null===t||void 0===t?void 0:t[e]}!function(e){e[e.SUMMARY=0]="SUMMARY",e[e.DETAILED=1]="DETAILED"}(Me||(Me={}));var Ie=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))};var Fe=function(){function e(t){var n,i,r;(0,p.Z)(this,e),this.id=me(this),this.layers=[],this._nextZIndex=0,this._nextLayerId=0,this._dirty=!1,this._root=null,this.debug={dirtyTree:!1,stats:!1,renderBoundingBoxes:!1,consoleLog:!1,level:Me.SUMMARY,sceneNodeHighlight:[]};var o=t.document,a=void 0===o?window.document:o,s=t.mode,l=void 0===s?null!==(n=Le("agChartsSceneRenderModel"))&&void 0!==n?n:"adv-composite":s,u=t.width,c=t.height,d=t.overrideDevicePixelRatio,h=void 0===d?void 0:d;this.overrideDevicePixelRatio=h,this.opts={document:a,mode:l},this.debug.consoleLog=[!0,"scene"].includes(Le("agChartsDebug")),this.debug.level=["scene"].includes(Le("agChartsDebug"))?Me.DETAILED:Me.SUMMARY,this.debug.stats=null!==(i=Le("agChartsSceneStats"))&&void 0!==i&&i,this.debug.dirtyTree=null!==(r=Le("agChartsSceneDirtyTree"))&&void 0!==r&&r,this.debug.sceneNodeHighlight=function(){var e,t=null!==(e=Le("agChartsSceneDebug"))&&void 0!==e?e:[];"string"===typeof t&&(t=[t]);var n=[];return t.forEach((function(e){"layout"===e?n.push("seriesRoot","legend","root",/.*Axis-\d+-axis.*/):n.push(e)})),n}(),this.canvas=new de({document:a,width:u,height:c,overrideDevicePixelRatio:h})}return(0,f.Z)(e,[{key:"container",get:function(){return this.canvas.container},set:function(e){this.canvas.container=e}},{key:"download",value:function(e,t){this.canvas.download(e,t)}},{key:"getDataURL",value:function(e){return this.canvas.getDataURL(e)}},{key:"width",get:function(){return this.pendingSize?this.pendingSize[0]:this.canvas.width}},{key:"height",get:function(){return this.pendingSize?this.pendingSize[1]:this.canvas.height}},{key:"resize",value:function(e,t){e=Math.round(e),t=Math.round(t);var n=e<=0||t<=0,i=isNaN(e)||isNaN(t);return!(e===this.width&&t===this.height||i||n)&&(this.pendingSize=[e,t],this.markDirty(),!0)}},{key:"addLayer",value:function(e){var t,n=this.opts.mode;if(["composite","dom-composite","adv-composite"].includes(n)){var i=e.zIndex,r=void 0===i?this._nextZIndex++:i,o=e.name,a=e.zIndexSubOrder,s=e.getComputedOpacity,l=e.getVisibility,u=this.width,c=this.height,d=this.overrideDevicePixelRatio,h="dom-composite"===n,p="adv-composite"===n&&Ne.isSupported()?new Ne({width:u,height:c,overrideDevicePixelRatio:d}):new de({document:this.opts.document,width:u,height:c,domLayer:h,zIndex:r,name:o,overrideDevicePixelRatio:d}),f={id:this._nextLayerId++,name:o,zIndex:r,zIndexSubOrder:a,canvas:p,getComputedOpacity:s,getVisibility:l};if(r>=this._nextZIndex&&(this._nextZIndex=r+1),this.layers.push(f),this.sortLayers(),h){var v=this.layers.map((function(e){return e.canvas})).filter((function(e){return e instanceof de})),g=v.findIndex((function(e){return e===p}));(null!==(t=v[g-1])&&void 0!==t?t:this.canvas).element.insertAdjacentElement("afterend",p.element)}return this.debug.consoleLog&&Oe.debug("Scene.addLayer() - layers",this.layers),f.canvas}}},{key:"removeLayer",value:function(e){var t=this.layers.findIndex((function(t){return t.canvas===e}));t>=0&&(this.layers.splice(t,1),e.destroy(),this.markDirty(),this.debug.consoleLog&&Oe.debug("Scene.removeLayer() -  layers",this.layers))}},{key:"moveLayer",value:function(e,t,n){var i=this.layers.find((function(t){return t.canvas===e}));i&&(i.zIndex=t,i.zIndexSubOrder=n,this.sortLayers(),this.markDirty(),this.debug.consoleLog&&Oe.debug("Scene.moveLayer() -  layers",this.layers))}},{key:"sortLayers",value:function(){this.layers.sort((function(e,t){var n,i;return Re([e.zIndex].concat((0,te.Z)(null!==(n=e.zIndexSubOrder)&&void 0!==n?n:[void 0,void 0]),[e.id]),[t.zIndex].concat((0,te.Z)(null!==(i=t.zIndexSubOrder)&&void 0!==i?i:[void 0,void 0]),[t.id]),xe)}))}},{key:"markDirty",value:function(){this._dirty=!0}},{key:"dirty",get:function(){return this._dirty}},{key:"root",get:function(){return this._root},set:function(e){var t=this;e!==this._root&&(this._root&&this._root._setLayerManager(),this._root=e,e&&(null===e.parent&&e.layerManager&&e.layerManager!==this&&(e.layerManager.root=null),e._setLayerManager({addLayer:function(e){return t.addLayer(e)},moveLayer:function(){return t.moveLayer.apply(t,arguments)},removeLayer:function(){return t.removeLayer.apply(t,arguments)},markDirty:function(){return t.markDirty()},canvas:this.canvas,debug:Object.assign(Object.assign({},this.debug),{consoleLog:this.debug.level>=Me.DETAILED})})),this.markDirty())}},{key:"strip",value:function(){var e,t=this.layers,n=(0,ne.Z)(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;i.canvas.destroy(),delete i.canvas}}catch(r){n.e(r)}finally{n.f()}t.splice(0,t.length),this.root=null,this._dirty=!1,this.canvas.context.resetTransform()}},{key:"destroy",value:function(){this.container=void 0,this.strip(),this.canvas.destroy(),Object.assign(this,{canvas:void 0,ctx:void 0})}},{key:"render",value:function(e){var t;return Ie(this,void 0,void 0,(0,ie.Z)().mark((function n(){var i,r,o,a,s,l,u,c,d,h,p,f,v,g,m,y,C;return(0,ie.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=(i=null!==e&&void 0!==e?e:{}).debugSplitTimes,o=void 0===r?[performance.now()]:r,a=i.extraDebugStats,s=void 0===a?{}:a,l=this.canvas,u=this.canvas.context,c=this.root,d=this.layers,h=this.pendingSize,p=this.opts.mode,h&&((f=this.canvas).resize.apply(f,(0,te.Z)(h)),this.layers.forEach((function(e){var t;return(t=e.canvas).resize.apply(t,(0,te.Z)(h))})),this.pendingSize=void 0),!c||c.visible){n.next=6;break}return this._dirty=!1,n.abrupt("return");case 6:if(!c||this.dirty){n.next=10;break}return this.debug.consoleLog&&Oe.debug("Scene.render() - no-op",{redrawType:fe[c.dirty],tree:this.buildTree(c)}),this.debugStats(o,u,void 0,s),n.abrupt("return");case 10:v={ctx:u,forceRender:!0,resized:!!h,debugNodes:{}},"detailed"===this.debug.stats&&(v.stats={layersRendered:0,layersSkipped:0,nodesRendered:0,nodesSkipped:0}),g=!1,(!c||c.dirty>=fe.TRIVIAL)&&(g=!0,l.clear()),c&&this.debug.dirtyTree&&(m=this.buildDirtyTree(c),y=m.dirtyTree,C=m.paths,Oe.debug("Scene.render() - dirtyTree",{dirtyTree:y,paths:C})),c&&g&&(this.debug.consoleLog&&Oe.debug("Scene.render() - before",{redrawType:fe[c.dirty],canvasCleared:g,tree:this.buildTree(c)}),c.visible&&(u.save(),c.render(v),u.restore())),"dom-composite"!==p&&d.length>0&&g&&(this.sortLayers(),u.save(),u.setTransform(1/l.pixelRatio,0,0,1/l.pixelRatio,0,0),d.forEach((function(e){var t=e.canvas,n=t.imageSource,i=t.enabled,r=e.getComputedOpacity,o=e.getVisibility;i&&o()&&(u.globalAlpha=r(),u.drawImage(n,0,0))})),u.restore()),null===(t=u.verifyDepthZero)||void 0===t||t.call(u),this._dirty=!1,this.debugStats(o,u,v.stats,s),this.debugSceneNodeHighlight(u,this.debug.sceneNodeHighlight,v.debugNodes),c&&this.debug.consoleLog&&Oe.debug("Scene.render() - after",{redrawType:fe[c.dirty],canvasCleared:g,tree:this.buildTree(c)});case 22:case"end":return n.stop()}}),n,this)})))}},{key:"debugStats",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=performance.now();if(this.debug.stats){var o=e[0];e.push(r);var a=function(e,t){var n=e+t;return"".concat(e," / ").concat(n," (").concat(Math.round(100*e/n),"%)")},s=function(e,t){return"".concat(Math.round(100*(t-e))/100,"ms")},l=null!==n&&void 0!==n?n:{},u=l.layersRendered,c=void 0===u?0:u,d=l.layersSkipped,h=void 0===d?0:d,p=l.nodesRendered,f=void 0===p?0:p,v=l.nodesSkipped,g=void 0===v?0:v,m=e.map((function(t,n){return n>0?s(e[n-1],t):null})).filter((function(e){return null!=e})).join(" + "),y=Object.entries(i).map((function(e){var t=(0,re.Z)(e,2),n=t[0],i=t[1];return"".concat(n,": ").concat(i)})).join(" ; "),C=["".concat(s(o,r)," (").concat(m,")"),"".concat(y),"detailed"===this.debug.stats?"Layers: ".concat(a(c,h)):null,"detailed"===this.debug.stats?"Nodes: ".concat(a(f,g)):null].filter((function(e){return null!=e})),k=C.map((function(e){return[e,de.getTextSize(e,t.font)]})),w=Math.max.apply(Math,(0,te.Z)(k.map((function(e){return(0,re.Z)(e,2)[1].width})))),S=k.reduce((function(e,t){return e+(0,re.Z)(t,2)[1].height}),0);t.save(),t.fillStyle="white",t.fillRect(0,0,w,S),t.fillStyle="black";var b,E=0,x=(0,ne.Z)(k);try{for(x.s();!(b=x.n()).done;){var R=(0,re.Z)(b.value,2),D=R[0],T=R[1];E+=T.height,t.fillText(D,2,E)}}catch(O){x.e(O)}finally{x.f()}t.restore()}}},{key:"debugSceneNodeHighlight",value:function(e,t,n){var i,r,o=function(e){return function(t){return!!e.test(t.id)||t instanceof Ae&&null!=t.name&&e.test(t.name)}},a=function(e){return function(t){return e===t.id||t instanceof Ae&&null!=t.name&&e===t.name}},s=(0,ne.Z)(t);try{for(s.s();!(r=s.n()).done;){var l=r.value;if("string"!==typeof l||null==n[l]){var u="string"===typeof l?a(l):o(l),c=null===(i=this.root)||void 0===i?void 0:i.findNodes(u);if(c&&0!==c.length){var d,h=(0,ne.Z)(c);try{for(h.s();!(d=h.n()).done;){var p=d.value;p instanceof Ae&&p.name?n[p.name]=p:n[p.id]=p}}catch(C){h.e(C)}finally{h.f()}}else Oe.debug("Scene.render() - no debugging node with id [".concat(l,"] in scene graph."))}}}catch(C){s.e(C)}finally{s.f()}e.save();for(var f=0,v=Object.entries(n);f<v.length;f++){var g=(0,re.Z)(v[f],2),m=g[0],y=g[1].computeTransformedBBox();y?(e.globalAlpha=.8,e.strokeStyle="red",e.lineWidth=1,e.strokeRect(y.x,y.y,y.width,y.height),e.fillStyle="red",e.strokeStyle="white",e.font="16px sans-serif",e.textBaseline="top",e.textAlign="left",e.lineWidth=2,e.strokeText(m,y.x,y.y,y.width),e.fillText(m,y.x,y.y,y.width)):Oe.debug("Scene.render() - no bbox for debugged node [".concat(m,"]."))}e.restore()}},{key:"buildTree",value:function(e){var t,n,i=this,r=null!==(t=e instanceof Ae?e.name:null)&&void 0!==t?t:e.id;return Object.assign(Object.assign({name:r,node:e,dirty:fe[e.dirty]},(null===(n=e.parent)||void 0===n?void 0:n.isVirtual)?{virtualParentDirty:fe[e.parent.dirty],virtualParent:e.parent}:{}),e.children.map((function(e){return i.buildTree(e)})).reduce((function(e,t){var n=t.name,i=t.node,r=i.visible,o=i.opacity,a=i.zIndex,s=i.zIndexSubOrder,l=t.node,u=t.virtualParent;(!r||o<=0)&&(n="(".concat(n,")")),l instanceof Ae&&l.isLayer()&&(n="*".concat(n,"*"));for(var c=["".concat(null!==n&&void 0!==n?n:"<unknown>"),"z: ".concat(a),s&&"zo: ".concat(s.map((function(e){return"function"===typeof e?"".concat(e()," (fn)"):e})).join(" / ")),u&&"(virtual parent)"].filter((function(e){return!!e})).join(" "),d=c,h=1;null!=e[d]&&h<100;)d="".concat(c," (").concat(h++,")");return e[d]=t,e}),{}))}},{key:"buildDirtyTree",value:function(e){var t,n=this;if(e.dirty===fe.NONE)return{dirtyTree:{},paths:[]};var i=e.children.map((function(e){return n.buildDirtyTree(e)})).filter((function(e){return e.paths.length>0})),r=null!==(t=e instanceof Ae?e.name:null)&&void 0!==t?t:e.id,o=0===i.length?[r]:i.map((function(e){return e.paths})).reduce((function(e,t){return e.concat(t)}),[]).map((function(e){return"".concat(r,".").concat(e)}));return{dirtyTree:Object.assign({name:r,node:e,dirty:fe[e.dirty]},i.map((function(e){return e.dirtyTree})).filter((function(e){return void 0!==e.dirty})).reduce((function(e,t){var n;return e[null!==(n=t.name)&&void 0!==n?n:"<unknown>"]=t,e}),{})),paths:o}}}]),e}();Fe.className="Scene";var _e=(0,f.Z)((function e(){(0,p.Z)(this,e),this.stops=[]})),Ge=2*Math.PI;function Ze(e){return e%=Ge,e+=Ge,e%=Ge}function Ve(e){return e%=Ge,(e+=Ge)!==Ge&&(e%=Ge),e}function He(e){return(e%=Ge)<-Math.PI?e+=Ge:e>=Math.PI&&(e-=Ge),e}function Be(e){return e/180*Math.PI}function We(e){return e/Math.PI*180}var ze=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).angle=0,e}return(0,f.Z)(n,[{key:"createGradient",value:function(e,t){var n=this.stops,i=Ze(Be(this.angle+90)),r=Math.cos(i),o=Math.sin(i),a=t.width,s=t.height,l=t.x+.5*a,u=t.y+.5*s;if(a>0&&s>0){var c,d=Math.sqrt(s*s+a*a)/2,h=Math.atan2(s,a);c=i<Math.PI/2?i:i<Math.PI?Math.PI-i:i<3*Math.PI/2?i-Math.PI:2*Math.PI-i;var p=d*Math.abs(Math.cos(c-h)),f=e.createLinearGradient(l+r*p,u+o*p,l-r*p,u-o*p);return n.forEach((function(e){f.addColorStop(e.offset,e.color)})),f}return"black"}}]),n}(_e),Ue=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},je=/^linear-gradient\((.*?)deg,\s*(.*?)\s*\)$/i,Ke=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).lastInstanceId=0,e.fillOpacity=1,e.strokeOpacity=1,e.fill=n.defaultStyles.fill,e.stroke=n.defaultStyles.stroke,e.strokeWidth=n.defaultStyles.strokeWidth,e.lineDash=n.defaultStyles.lineDash,e.lineDashOffset=n.defaultStyles.lineDashOffset,e.lineCap=n.defaultStyles.lineCap,e.lineJoin=n.defaultStyles.lineJoin,e.opacity=n.defaultStyles.opacity,e.fillShadow=n.defaultStyles.fillShadow,e}return(0,f.Z)(n,[{key:"restoreOwnStyles",value:function(){for(var e=this.constructor.defaultStyles,t=Object.getOwnPropertyNames(e),n=0,i=t.length;n<i;n++){var r=t[n];this[r]=e[r]}}},{key:"restoreAllStyles",value:function(){var e=this.constructor.defaultStyles;for(var t in e)this[t]=e[t]}},{key:"restoreOverriddenStyles",value:function(){var e=this.constructor.defaultStyles,t=Object.getPrototypeOf(e);for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&Object.prototype.hasOwnProperty.call(t,n)&&(this[n]=e[n])}},{key:"updateGradient",value:function(){var e,t=this.fill;if((null===t||void 0===t?void 0:t.startsWith("linear-gradient"))&&(e=je.exec(t))){for(var n,i=parseFloat(e[1]),r=[],o=e[2],a=/(#[0-9a-f]+)|(rgba?\(.+?\))|([a-z]+)/gi;n=a.exec(o);)r.push(n[0]);this.gradient=new ze,this.gradient.angle=i,this.gradient.stops=r.map((function(e,t){return{offset:t/(r.length-1),color:e}}))}else this.gradient=void 0}},{key:"align",value:function(e,t){var n,i,r,o=null!==(r=null===(i=null===(n=this.layerManager)||void 0===n?void 0:n.canvas)||void 0===i?void 0:i.pixelRatio)&&void 0!==r?r:1,a=Math.round(e*o)/o;return void 0==t?a:0===t?0:t<1?Math.ceil(t*o)/o:Math.round((t+e)*o)/o-a}},{key:"fillStroke",value:function(e){this.renderFill(e),this.renderStroke(e)}},{key:"renderFill",value:function(e){if(this.fill){var t=e.globalAlpha;this.applyFill(e),this.applyFillAlpha(e),this.applyShadow(e),e.fill(),e.globalAlpha=t}e.shadowColor="rgba(0, 0, 0, 0)"}},{key:"applyFill",value:function(e){this.gradient?e.fillStyle=this.gradient.createGradient(e,this.computeBBox()):e.fillStyle=this.fill}},{key:"applyFillAlpha",value:function(e){var t=e.globalAlpha;e.globalAlpha=t*this.opacity*this.fillOpacity}},{key:"applyShadow",value:function(e){var t,n,i=null!==(n=null===(t=this.layerManager)||void 0===t?void 0:t.canvas.pixelRatio)&&void 0!==n?n:1,r=this.fillShadow;(null===r||void 0===r?void 0:r.enabled)&&(e.shadowColor=r.color,e.shadowOffsetX=r.xOffset*i,e.shadowOffsetY=r.yOffset*i,e.shadowBlur=r.blur*i)}},{key:"renderStroke",value:function(e){if(this.stroke&&this.strokeWidth){var t=e.globalAlpha;e.strokeStyle=this.stroke,e.globalAlpha=t*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),e.stroke(),e.globalAlpha=t}}},{key:"containsPoint",value:function(e,t){return this.isPointInPath(e,t)}}],[{key:"createInstance",value:function(e){var t=Object.create(e);return t._setParent(void 0),t.id=e.id+"-Instance-"+String(++e.lastInstanceId),t}}]),n}(Ee);Ke.defaultStyles=Object.assign({},{fill:"black",stroke:void 0,strokeWidth:0,lineDash:void 0,lineDashOffset:0,lineCap:void 0,lineJoin:void 0,opacity:1,fillShadow:void 0}),Ue([Ce({redraw:fe.MINOR})],Ke.prototype,"fillOpacity",void 0),Ue([Ce({redraw:fe.MINOR})],Ke.prototype,"strokeOpacity",void 0),Ue([Ce({redraw:fe.MINOR,changeCb:function(e){return e.updateGradient()}})],Ke.prototype,"fill",void 0),Ue([Ce({redraw:fe.MINOR})],Ke.prototype,"stroke",void 0),Ue([Ce({redraw:fe.MINOR})],Ke.prototype,"strokeWidth",void 0),Ue([Ce({redraw:fe.MINOR})],Ke.prototype,"lineDash",void 0),Ue([Ce({redraw:fe.MINOR})],Ke.prototype,"lineDashOffset",void 0),Ue([Ce({redraw:fe.MINOR})],Ke.prototype,"lineCap",void 0),Ue([Ce({redraw:fe.MINOR})],Ke.prototype,"lineJoin",void 0),Ue([Ce({redraw:fe.MINOR,convertor:function(e){return Math.min(1,Math.max(0,e))}})],Ke.prototype,"opacity",void 0),Ue([Ce({redraw:fe.MINOR,checkDirtyOnAssignment:!0})],Ke.prototype,"fillShadow",void 0);var Ye=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};function Xe(e){var t=null!==e&&void 0!==e?e:{},n=t.redraw;return Ce({redraw:void 0===n?fe.MAJOR:n,type:"font",changeCb:t.changeCb})}var qe=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).x=0,e.y=0,e.lines=[],e.text=void 0,e._dirtyFont=!0,e.fontSize=10,e.fontFamily="sans-serif",e.textAlign=n.defaultStyles.textAlign,e.textBaseline=n.defaultStyles.textBaseline,e.lineHeight=void 0,e}return(0,f.Z)(n,[{key:"_setLines",value:function(){this.lines=nt(this.text)}},{key:"font",get:function(){return(null==this._font||this._dirtyFont)&&(this._dirtyFont=!1,this._font=Qe(this)),this._font}},{key:"computeBBox",value:function(){return de.has.textMetrics?$e(this.lines,this.x,this.y,this):et(this.lines,this.x,this.y,this)}},{key:"getLineHeight",value:function(e){var t,n;if(this.lineHeight)return this.lineHeight;if(de.has.textMetrics){var i=de.measureText(e,this.font,this.textBaseline,this.textAlign);return(null!==(t=i.fontBoundingBoxAscent)&&void 0!==t?t:i.emHeightAscent)+(null!==(n=i.fontBoundingBoxDescent)&&void 0!==n?n:i.emHeightDescent)}return de.getTextSize(e,this.font).height}},{key:"isPointInPath",value:function(e,t){var n=this.transformPoint(e,t),i=this.computeBBox();return!!i&&i.containsPoint(n.x,n.y)}},{key:"render",value:function(e){var t=e.ctx,i=e.forceRender,r=e.stats;if(this.dirty!==fe.NONE||i)if(this.lines.length&&this.layerManager){this.computeTransformMatrix(),this.matrix.toContext(t);var o=this.fill,a=this.stroke,s=this.strokeWidth;t.font=this.font,t.textAlign=this.textAlign,t.textBaseline=this.textBaseline;var l=this.layerManager.canvas.pixelRatio||1,u=t.globalAlpha;if(o){t.fillStyle=o,t.globalAlpha=u*this.opacity*this.fillOpacity;var c=this.fillShadow;(null===c||void 0===c?void 0:c.enabled)&&(t.shadowColor=c.color,t.shadowOffsetX=c.xOffset*l,t.shadowOffsetY=c.yOffset*l,t.shadowBlur=c.blur*l),this.renderLines((function(e,n,i){return t.fillText(e,n,i)}))}if(a&&s){t.strokeStyle=a,t.lineWidth=s,t.globalAlpha=u*this.opacity*this.strokeOpacity;var d=this.lineDash,h=this.lineDashOffset,p=this.lineCap,f=this.lineJoin;d&&t.setLineDash(d),h&&(t.lineDashOffset=h),p&&(t.lineCap=p),f&&(t.lineJoin=f),this.renderLines((function(e,n,i){return t.strokeText(e,n,i)}))}(0,oe.Z)((0,ae.Z)(n.prototype),"render",this).call(this,e)}else r&&(r.nodesSkipped+=this.nodeCount.count);else r&&(r.nodesSkipped+=this.nodeCount.count)}},{key:"renderLines",value:function(e){for(var t=this,n=this.lines,i=this.x,r=this.y,o=this.lines.map((function(e){return t.getLineHeight(e)})),a=-(o.reduce((function(e,t){return e+t}),0)-o[0])*tt(this.textBaseline),s=0;s<n.length;s++)e(n[s],i,r+a),a+=o[s]}},{key:"setFont",value:function(e){this.fontFamily=e.fontFamily,this.fontSize=e.fontSize,this.fontStyle=e.fontStyle,this.fontWeight=e.fontWeight}},{key:"setAlign",value:function(e){this.textAlign=e.textAlign,this.textBaseline=e.textBaseline}}],[{key:"wrap",value:function(e,t,i,r,o){var a=function(e){var t=new Map,n=function(t){return de.getTextSize(t,e)},i=function(e){if(t.has(e))return t.get(e);var i=n(e).width;return t.set(e,i),i};return{size:n,width:i}}(Qe(r)),s=e.split(/\r?\n/g);if(0===s.length)return"";if("never"===o)return n.truncateLine(s[0],t,a,!1);var l,u=[],c=0,d=(0,ne.Z)(s);try{for(d.s();!(l=d.n()).done;){var h=l.value,p=n.wrapLine(h,t,i,a,r,o,c);if(u.push(p.result),c=p.cumulativeHeight,p.truncated)break}}catch(f){d.e(f)}finally{d.f()}return u.join("\n").trim()}},{key:"wrapLine",value:function(e,t,i,r,o,a,s){if(!(e=e.trim()))return{result:"",truncated:!1,cumulativeHeight:s};var l=r.size(e);if(l.width<=t)return{result:e,truncated:!1,cumulativeHeight:s+l.height};if(l.height>i||r.width("W")>t)return{result:"",truncated:!0,cumulativeHeight:s};var u=e.split(/\s+/g),c=n.wrapLineSequentially(u,t,i,r,o,a,s);s=c.cumulativeHeight;var d=c.lines;if(!c.wordsBrokenOrTruncated&&!c.linesTruncated){var h=c.lines.length,p=n.wrapLineBalanced(u,t,r,h);p.length===d.length&&(d=p)}return{result:d.map((function(e){return e.join(" ")})).join("\n"),truncated:c.linesTruncated,cumulativeHeight:s}}},{key:"breakWord",value:function(e,t,i,r,o){for(var a=function(t){return n.punctuationMarks.includes(e[t])},s=r?o.width("-"):0,l=[],u=0,c=0,d=0;d<e.length;d++){var h=e[d],p=o.width(h);u+p+s>(0===c?t:i)&&(l.push(d),u=0,c++),u+=p}for(var f=[],v=0,g=0,m=l;g<m.length;g++){var y=m[g],C=e.substring(v,y);r&&C.length>0&&!a(y-1)&&!a(y)&&(C+="-"),f.push(C),v=y}return f.push(e.substring(v)),f}},{key:"truncateLine",value:function(e,t,n,i){var r=n.width(e);if(r<t&&!i)return e;var o=n.width("\u2026");if(r+o<=t)return"".concat(e).concat("\u2026");var a,s,l=Math.floor(e.length*t/r)+1;do{a=e.substring(0,l),s=n.width(a)}while(--l>=0&&s+o>t);return"".concat(a).concat("\u2026")}},{key:"wrapLineSequentially",value:function(e,t,i,r,o,a,s){var l=o.fontSize,u=o.lineHeight,c=void 0===u?l*n.defaultLineHeightRatio:u,d="always"===a||"hyphenate"===a,h="hyphenate"===a,p=r.width(" "),f=!1,v=!1,g=[],m=[],y=0,C=function(){var e=s+c;if(e>=i){var o=m.join(" "),a=n.truncateLine(o,t,r,!0);return m.splice(0,m.length,a),v=!0,!1}return m=[],y=0,s=e,g.push(m),!0};if(!C())return{lines:g,linesTruncated:!0,wordsBrokenOrTruncated:f,cumulativeHeight:s};for(var k=0;k<e.length;k++){var w=e[k],S=r.width(w),b=0===m.length?0:p,E=y+b+S;if(E<=t)m.push(w),y=E;else if(S<=t){if(!C())break;m.push(w),y=S}else{if(f=!0,!d){if(!C())break;var x=n.truncateLine(w,t,r,!0);m.push(x),k<e.length-1&&(v=!0);break}for(var R=t-y-b,D=n.breakWord(w,R,t,h,r),T=!1,O=0;O<D.length;O++){var P=D[O];if(P&&m.push(P),O===D.length-1)y=r.width(P);else if(!C()){T=!0;break}}if(T)break}}return{lines:g,linesTruncated:v,wordsBrokenOrTruncated:f,cumulativeHeight:s}}},{key:"wrapLineBalanced",value:function(e,t,n,i){var r,o=e.reduce((function(e,t){return e+n.width(t)}),0),a=n.width(" "),s=(o+a*(e.length-i-2))/i,l=[],u=[],c=n.width(e[0]),d=!0,h=(0,ne.Z)(e);try{for(h.s();!(r=h.n()).done;){var p=r.value,f=n.width(p);if(d)(u=[]).push(p),c=f,d=!1,l.push(u);else{var v=c+a+f;v<=s?(u.push(p),c=v):v<=t?(u.push(p),d=!0):(u=[p],c=f,l.push(u))}}}catch(g){h.e(g)}finally{h.f()}return l}}]),n}(Ke);function Qe(e){var t=e.fontFamily,n=e.fontSize,i=e.fontStyle,r=e.fontWeight;return[null!==i&&void 0!==i?i:"",null!==r&&void 0!==r?r:"",n+"px",t].join(" ").trim()}function Je(e,t,n,i){return de.has.textMetrics?$e(e,t,n,i):et(e,t,n,i)}function $e(e,t,n,i){for(var r,o,a=0,s=0,l=0,u=0,c=0,d=Qe(i),h=i.lineHeight,p=i.textBaseline,f=void 0===p?qe.defaultStyles.textBaseline:p,v=i.textAlign,g=void 0===v?qe.defaultStyles.textAlign:v,m=0;m<e.length;m++){var y=de.measureText(e[m],d,f,g);a=Math.max(a,y.actualBoundingBoxLeft),l=Math.max(l,y.width),0==m?(s+=y.actualBoundingBoxAscent,u+=y.actualBoundingBoxAscent):c+=null!==(r=y.fontBoundingBoxAscent)&&void 0!==r?r:y.emHeightAscent,m==e.length-1?u+=y.actualBoundingBoxDescent:c+=null!==(o=y.fontBoundingBoxDescent)&&void 0!==o?o:y.emHeightDescent}return void 0!==h&&(c=(e.length-1)*h),u+=c,s+=c*tt(f),new he(t-a,n-s,l,u)}function et(e,t,n,i){var r=0,o=0,a=0,s=Qe(i),l=i.lineHeight,u=i.textBaseline,c=void 0===u?qe.defaultStyles.textBaseline:u,d=i.textAlign,h=void 0===d?qe.defaultStyles.textAlign:d;if(e.length>0){var p=de.getTextSize(e[0],s);r=p.width,o=p.height}for(var f=1;f<e.length;f++){var v=de.getTextSize(e[f],s);r=Math.max(r,v.width),a+=null!==l&&void 0!==l?l:v.height}switch(h){case"end":case"right":t-=r;break;case"center":t-=r/2}switch(c){case"alphabetic":n-=.7*o+.5*a;break;case"middle":n-=.45*o+.5*a;break;case"ideographic":case"bottom":n-=o+a;break;case"hanging":n-=.2*o+.5*a}return new he(t,n,r,o+a)}function tt(e){switch(e){case"top":case"hanging":return 0;case"bottom":case"alphabetic":case"ideographic":return 1;case"middle":return.5}}function nt(e){return"string"===typeof e?e.split(/\r?\n/g):[]}qe.className="Text",qe.defaultLineHeightRatio=1.15,qe.defaultStyles=Object.assign({},Ke.defaultStyles,{textAlign:"start",fontStyle:void 0,fontWeight:void 0,fontSize:10,fontFamily:"sans-serif",textBaseline:"alphabetic"}),qe.punctuationMarks=[".",",","-",":",";","!","?","'",'"',"(",")"],Ye([Ce({redraw:fe.MAJOR})],qe.prototype,"x",void 0),Ye([Ce({redraw:fe.MAJOR})],qe.prototype,"y",void 0),Ye([Ce({redraw:fe.MAJOR,changeCb:function(e){return e._setLines()}})],qe.prototype,"text",void 0),Ye([Xe()],qe.prototype,"fontStyle",void 0),Ye([Xe()],qe.prototype,"fontWeight",void 0),Ye([Xe()],qe.prototype,"fontSize",void 0),Ye([Xe()],qe.prototype,"fontFamily",void 0),Ye([Ce({redraw:fe.MAJOR})],qe.prototype,"textAlign",void 0),Ye([Ce({redraw:fe.MAJOR})],qe.prototype,"textBaseline",void 0),Ye([Ce({redraw:fe.MAJOR})],qe.prototype,"lineHeight",void 0);var it=function(){function e(){(0,p.Z)(this,e),this.allEventListeners=new Map}return(0,f.Z)(e,[{key:"addEventListener",value:function(e,t){if("function"!==typeof t)throw new Error("AG Charts - listener must be a Function");var n=this.allEventListeners,i=n.get(e);i||(i=new Set,n.set(e,i)),i.has(t)||i.add(t)}},{key:"removeEventListener",value:function(e,t){var n=this.allEventListeners,i=n.get(e);i&&(i.delete(t),0===i.size&&n.delete(e))}},{key:"hasEventListener",value:function(e){return this.allEventListeners.has(e)}},{key:"clearEventListeners",value:function(){this.allEventListeners.clear()}},{key:"fireEvent",value:function(e){var t=this.allEventListeners.get(e.type);null===t||void 0===t||t.forEach((function(t){return t(e)}))}}]),e}(),rt=function(e){return"string"===typeof e},ot=function(e){return!!e&&Object.prototype.hasOwnProperty.call(e,"toString")&&rt(e.toString())},at=function(e){return e instanceof Date&&!isNaN(+e)};function st(e){return rt(e)||ot(e)}function lt(e){var t;return ct(e)||!!(t=e)&&Object.prototype.hasOwnProperty.call(t,"valueOf")&&ct(t.valueOf())||function(e){return e instanceof Date&&!isNaN(+e)}(e)}function ut(e,t){return t&&lt(e)?e:t?void 0:st(e)?e:String(e)}var ct=function(e){return"number"===typeof e&&Number.isFinite(e)},dt=function(){function e(t,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;(0,p.Z)(this,e),this.r=Math.min(1,Math.max(0,t||0)),this.g=Math.min(1,Math.max(0,n||0)),this.b=Math.min(1,Math.max(0,i||0)),this.a=Math.min(1,Math.max(0,r||0))}return(0,f.Z)(e,[{key:"toHexString",value:function(){var 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}},{key:"toRgbaString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=[Math.round(255*this.r),Math.round(255*this.g),Math.round(255*this.b)],n=Math.pow(10,e);return 1!==this.a?(t.push(Math.round(this.a*n)/n),"rgba(".concat(t.join(", "),")")):"rgb(".concat(t.join(", "),")")}},{key:"toString",value:function(){return 1===this.a?this.toHexString():this.toRgbaString()}},{key:"toHSB",value:function(){return e.RGBtoHSB(this.r,this.g,this.b)}},{key:"derive",value:function(t,n,i,r){var o=e.RGBtoHSB(this.r,this.g,this.b),a=o[2];0==a&&i>1&&(a=.05);var s=((o[0]+t)%360+360)%360,l=Math.max(Math.min(o[1]*n,1),0);a=Math.max(Math.min(a*i,1),0);var u=Math.max(Math.min(this.a*r,1),0),c=e.HSBtoRGB(s,l,a);return c.push(u),e.fromArray(c)}},{key:"brighter",value:function(){return this.derive(0,1,1/.7,1)}},{key:"darker",value:function(){return this.derive(0,1,.7,1)}}],[{key:"validColorString",value:function(t){return t.indexOf("#")>=0?!!e.parseHex(t):t.indexOf("rgb")>=0?!!e.stringToRgba(t):!!e.nameToHex[t.toLowerCase()]}},{key:"fromString",value:function(t){if(t.indexOf("#")>=0)return e.fromHexString(t);var n=e.nameToHex[t.toLowerCase()];if(n)return e.fromHexString(n);if(t.indexOf("rgb")>=0)return e.fromRgbaString(t);throw new Error("Invalid color string: '".concat(t,"'"))}},{key:"tryParseFromString",value:function(t){try{return e.fromString(t)}catch(n){return Oe.warnOnce("invalid color string: '".concat(t,"'.")),e.fromArray([0,0,0])}}},{key:"parseHex",value:function(e){var t;switch((e=e.replace(/ /g,"").slice(1)).length){case 6:case 8:t=[];for(var n=0;n<e.length;n+=2)t.push(parseInt("".concat(e[n]).concat(e[n+1]),16));break;case 3:case 4:t=e.split("").map((function(e){return parseInt(e,16)})).map((function(e){return e+16*e}))}if((null===t||void 0===t?void 0:t.length)>=3&&t.every((function(e){return e>=0})))return 3===t.length&&t.push(255),t}},{key:"fromHexString",value:function(t){var n=e.parseHex(t);if(n){var i=(0,re.Z)(n,4);return new e(i[0]/255,i[1]/255,i[2]/255,i[3]/255)}throw new Error("Malformed hexadecimal color string: '".concat(t,"'"))}},{key:"stringToRgba",value:function(e){for(var t=NaN,n=NaN,i=0;i<e.length;i++){var r=e[i];if(t||"("!==r){if(")"===r){n=i;break}}else t=i}var o=t&&n&&e.substring(t+1,n);if(o){for(var a=o.split(","),s=[],l=0;l<a.length;l++){var u=a[l],c=parseFloat(u);if(isNaN(c))return;u.indexOf("%")>=0?(c=Math.max(0,Math.min(100,c)),c/=100):3===l?c=Math.max(0,Math.min(1,c)):(c=Math.max(0,Math.min(255,c)),c/=255),s.push(c)}return s}}},{key:"fromRgbaString",value:function(t){var n=e.stringToRgba(t);if(n){if(3===n.length)return new e(n[0],n[1],n[2]);if(4===n.length)return new e(n[0],n[1],n[2],n[3])}throw new Error("Malformed rgb/rgba color string: '".concat(t,"'"))}},{key:"fromArray",value:function(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).")}},{key:"fromHSB",value:function(t,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=e.HSBtoRGB(t,n,i);return new e(o[0],o[1],o[2],r)}},{key:"padHex",value:function(e){return 1===e.length?"0"+e:e}},{key:"RGBtoHSB",value:function(e,t,n){var i=Math.min(e,t,n),r=Math.max(e,t,n),o=NaN;if(i!==r){var a=r-i,s=(r-e)/a,l=(r-t)/a,u=(r-n)/a;o=e===r?u-l:t===r?2+s-u:4+l-s,(o/=6)<0&&(o+=1)}return[360*o,0!==r?(r-i)/r:0,r]}},{key:"HSBtoRGB",value:function(e,t,n){isNaN(e)&&(e=0),e=(e%360+360)%360/360;var i=0,r=0,o=0;if(0===t)i=r=o=n;else{var a=6*(e-Math.floor(e)),s=a-Math.floor(a),l=n*(1-t),u=n*(1-t*s),c=n*(1-t*(1-s));switch(a>>0){case 0:i=n,r=c,o=l;break;case 1:i=u,r=n,o=l;break;case 2:i=l,r=n,o=c;break;case 3:i=l,r=u,o=n;break;case 4:i=c,r=l,o=n;break;case 5:i=n,r=l,o=u}}return[i,r,o]}},{key:"interpolate",value:function(t,n){var i=e.tryParseFromString(t),r=e.tryParseFromString(n);return function(t){var n=function(e,n){return e*(1-t)+n*t};return new e(n(i.r,r.r),n(i.g,r.g),n(i.b,r.b),n(i.a,r.a)).toString()}}}]),e}();dt.nameToHex=Object.freeze({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:"#BA55D3",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 ht=Symbol("BREAK"),pt="__decorator_config";function ft(e,t){return function(n,i){var r=i.toString(),o=function(e,t,n,i){null==Object.getOwnPropertyDescriptor(e,pt)&&Object.defineProperty(e,pt,{value:{}});var r=e[pt];if(null!=r[n])return r[n];r[n]={setters:[],getters:[]};var o=Object.getOwnPropertyDescriptor(e,t),a=null===o||void 0===o?void 0:o.set,s=null===o||void 0===o?void 0:o.get;return Object.defineProperty(e,t,{set:function(e){var o,l,u,c=null!==(l=null===(o=r[n])||void 0===o?void 0:o.setters)&&void 0!==l?l:[];c.some((function(e){return e.length>2}))&&(u=s?s.call(this):this[i]);var d,h=(0,ne.Z)(c);try{for(h.s();!(d=h.n()).done;)if((e=(0,d.value)(this,t,e,u))===ht)return}catch(p){h.e(p)}finally{h.f()}a?a.call(this,e):this[i]=e},get:function(){var e,o,a,l=s?s.call(this):this[i],u=(0,ne.Z)(null!==(o=null===(e=r[n])||void 0===e?void 0:e.getters)&&void 0!==o?o:[]);try{for(u.s();!(a=u.n()).done;)if((l=(0,a.value)(this,t,l))===ht)return}catch(c){u.e(c)}finally{u.f()}return l},enumerable:!0,configurable:!1}),r[n]}(n,i,r,"__".concat(r)),a=o.getters;o.setters.push(e),t&&a.splice(0,0,t)}}function vt(e){return ft((function(t,n,i){var r,o,a;if(e(i,{target:t}))return i;var s=n.toString().replace(/^_*/,""),l=null!==(o=null===(r=t.constructor)||void 0===r?void 0:r.className)&&void 0!==o?o:null===(a=t.constructor)||void 0===a?void 0:a.name;(null===l||void 0===l?void 0:l.length)<3&&(l=null);var u=l?"of [".concat(l,"] "):"";return e.message?Oe.warn("Property [".concat(s,"] ").concat(u,"cannot be set to [").concat(JSON.stringify(i),"]; ").concat(e.message,", ignoring.")):Oe.warn("Property [".concat(s,"] ").concat(u,"cannot be set to [").concat(JSON.stringify(i),"], ignoring.")),ht}))}function gt(e,t){return e.message=t,e}var mt=function(e,t,n){return void 0===e||n(e,t)},yt=function(e,t){return gt((function(n,i){return Array.isArray(n)&&(!e||n.length===e)&&(!t||n.every((function(e){return t(e,i)})))}),"expecting an Array")},Ct=function(e){return gt((function(t,n){return mt(t,n,yt(e))}),"expecting an optional Array")},kt=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return gt((function(e,n){return t.every((function(t){return t(e,n)}))}),t.map((function(e){return e.message})).filter((function(e){return null!=e})).join(" AND "))},wt=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return gt((function(e,n){return t.some((function(t){return t(e,n)}))}),t.map((function(e){return e.message})).filter((function(e){return null!=e})).join(" OR "))},St=function(e){return null!=e&&!isNaN(e)},bt=function(e){return gt((function(t,n){return!St(t)||!St(n.target[e])||t<n.target[e]}),"expected to be less than ".concat(e))},Et=function(e){return gt((function(t,n){return!St(t)||!St(n.target[e])||t>n.target[e]}),"expected to be greater than ".concat(e))},xt=gt((function(e){return"function"===typeof e}),"expecting a Function"),Rt=gt((function(e,t){return mt(e,t,xt)}),"expecting an optional Function"),Dt=gt((function(e){return!0===e||!1===e}),"expecting a Boolean"),Tt=gt((function(e,t){return mt(e,t,Dt)}),"expecting an optional Boolean"),Ot=gt((function(e){return"string"===typeof e}),"expecting a String"),Pt=gt((function(e,t){return mt(e,t,Ot)}),"expecting an optional String"),At=gt((function(e){return e instanceof Date&&!isNaN(+e)}),"expecting a Date object"),Mt=gt((function(e,t){return mt(e,t,At)}),"expecting an optional Date"),Nt=gt(yt(void 0,At),"expecting an Array of Date objects"),Lt=Bt(0),It=gt((function(e,t){return mt(e,t,Lt)}),"expecting an optional number"),Ft=wt(Mt,It),_t="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",Gt=gt((function(e){return"string"===typeof e&&dt.validColorString(e)}),"expecting a color String. ".concat(_t)),Zt=gt((function(e,t){return mt(e,t,Gt)}),"expecting an optional color String. ".concat(_t)),Vt=gt(yt(void 0,Gt),"expecting an Array of color strings. ".concat(_t)),Ht=gt((function(e,t){return mt(e,t,Vt)}),"expecting an optional Array of color strings. ".concat(_t));function Bt(e,t){return gt((function(n){return"number"===typeof n&&Number.isFinite(n)&&(void 0===e||n>=e)&&(void 0===t||n<=t)}),"expecting a finite Number".concat((void 0!==e?", more than or equal to "+e:"")+(void 0!==t?", less than or equal to "+t:"")))}function Wt(e,t){return gt((function(n,i){return mt(n,i,Bt(e,t))}),"expecting an optional finite Number".concat((void 0!==e?", more than or equal to "+e:"")+(void 0!==t?", less than or equal to "+t:"")))}function zt(e,t){return gt((function(n){return"number"===typeof n&&(isNaN(n)||Number.isFinite(n)&&(void 0===e||n>=e)&&(void 0===t||n<=t))}),"expecting a finite Number".concat((void 0!==e?", more than or equal to "+e:"")+(void 0!==t?", less than or equal to "+t:"")))}var Ut=gt(yt(void 0,Bt()),"expecting an Array of numbers"),jt=gt((function(e,t){return mt(e,t,Ut)}),"expecting an optional Array of numbers"),Kt=gt(yt(void 0,Ot),"expecting an Array of strings"),Yt=gt((function(e,t){return mt(e,t,Kt)}),"expecting an optional Array of strings");function Xt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i="expecting one of: ".concat(t.join(", "));return gt((function(e){return"string"===typeof e&&t.indexOf(e)>=0}),i)}var qt,Qt,Jt=gt(yt(void 0,Dt),"expecting an Array of boolean values"),$t=gt((function(e,t){return mt(e,t,Jt)}),"expecting an optional Array of boolean values"),en=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"],tn=gt((function(e){return"normal"===e||"italic"===e||"oblique"===e}),"expecting a font style keyword such as 'normal', 'italic' or 'oblique'"),nn=gt((function(e,t){return mt(e,t,tn)}),"expecting an optional font style keyword such as 'normal', 'italic' or 'oblique'"),rn=gt((function(e){return en.includes(e)}),"expecting a font weight keyword such as 'normal', 'bold' or 'bolder' or a numeric value such as 100, 300 or 600"),on=gt((function(e,t){return mt(e,t,rn)}),"expecting an optional font weight keyword such as 'normal', 'bold' or 'bolder' or a numeric value such as 100, 300 or 600"),an=gt(yt(void 0,Bt(0)),"expecting an Array of 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."),sn=gt((function(e,t){return mt(e,t,an)}),"expecting an optional Array of 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."),ln=["butt","round","square"],un=gt((function(e){return ln.includes(e)}),"expecting a line cap keyword such as 'butt', 'round' or 'square'"),cn=gt((function(e,t){return mt(e,t,un)}),"expecting an optional line cap keyword such as 'butt', 'round' or 'square'"),dn=["round","bevel","miter"],hn=gt((function(e){return dn.includes(e)}),"expecting a line join keyword such as 'round', 'bevel' or 'miter'"),pn=gt((function(e,t){return mt(e,t,hn)}),"expecting an optional line join keyword such as 'round', 'bevel' or 'miter'"),fn=["top","right","bottom","left"],vn=gt((function(e){return fn.includes(e)}),"expecting a position keyword such as 'top', 'right', 'bottom' or 'left"),gn=["exact","nearest"],mn=gt((function(e){return"number"===typeof e&&Number.isFinite(e)||gn.includes(e)}),"expecting an interaction range of 'exact', 'nearest' or a number"),yn=["never","always","hyphenate","on-space"],Cn=gt((function(e){return yn.includes(e)}),"expecting a text wrap strategy keyword such as 'never', 'always', 'hyphenate', 'on-space'");!function(e){e[e.SERIES_BACKGROUND_ZINDEX=-10]="SERIES_BACKGROUND_ZINDEX",e[e.AXIS_GRID_ZINDEX=0]="AXIS_GRID_ZINDEX",e[e.AXIS_ZINDEX=20]="AXIS_ZINDEX",e[e.SERIES_CROSSLINE_RANGE_ZINDEX=30]="SERIES_CROSSLINE_RANGE_ZINDEX",e[e.SERIES_LAYER_ZINDEX=500]="SERIES_LAYER_ZINDEX",e[e.SERIES_CROSSHAIR_ZINDEX=1e3]="SERIES_CROSSHAIR_ZINDEX",e[e.SERIES_LABEL_ZINDEX=1500]="SERIES_LABEL_ZINDEX",e[e.SERIES_CROSSLINE_LINE_ZINDEX=2500]="SERIES_CROSSLINE_LINE_ZINDEX",e[e.LEGEND_ZINDEX=3e3]="LEGEND_ZINDEX"}(qt||(qt={})),function(e){e.X="x",e.Y="y"}(Qt||(Qt={}));var kn=function(){function e(t){(0,p.Z)(this,e),this.type=t,this.continuousDomain=[1/0,-1/0],this.discreteDomain=new Set}return(0,f.Z)(e,[{key:"extend",value:function(e){"discrete"===this.type?this.discreteDomain.add(e):"continuous"===this.type&&(this.continuousDomain[0]>e&&(this.continuousDomain[0]=e),this.continuousDomain[1]<e&&(this.continuousDomain[1]=e))}},{key:"getDomain",value:function(){if("discrete"===this.type)return this.discreteDomain;if("continuous"===this.type)return this.continuousDomain;throw new Error("AG Charts - Unsupported data domain type: "+this.type)}}]),e}();function wn(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[1/0,-1/0],i=(0,ne.Z)(e);try{for(i.s();!(t=i.n()).done;){var r=t.value;"number"===typeof r&&(r<n[0]&&(n[0]=r),r>n[1]&&(n[1]=r))}}catch(o){i.e(o)}finally{i.f()}return n}function Sn(e){return e.map((function(e){return null==e||"number"===typeof e||"string"===typeof e||"boolean"===typeof e?e:"object"===typeof e?JSON.stringify(e):e})).join("-")}function bn(e){var t=1e4;return Number.isInteger(e)?e:Math.abs(e)>t?Math.trunc(e):Math.round(e*t)/t}function En(e){if(void 0===e)return[];var t=(0,re.Z)(e,2),n=t[0],i=t[1];return i=+i,0===(n=+n)&&0===i?[0,1]:n===1/0&&i===-1/0?[]:(n===1/0&&(n=0),i===-1/0&&(i=0),ct(n)&&ct(i)?[n,i]:[])}var xn=Symbol("invalid"),Rn=function(){function e(t){var n=this;(0,p.Z)(this,e);var i,r=t.props,o=!0,a=(0,ne.Z)(r);try{for(a.s();!(i=a.n()).done;){var s=i.value;if("key"===s.type&&!o)throw new Error("AG Charts - internal config error: keys must come before values.");"value"===s.type&&o&&(o=!1)}}catch(y){a.e(y)}finally{a.f()}this.opts=Object.assign({dataVisible:!0},t),this.keys=r.filter((function(e){return"key"===e.type})).map((function(e,t){return Object.assign(Object.assign({},e),{index:t,missing:0})})),this.values=r.filter((function(e){return"value"===e.type})).map((function(e,t){return Object.assign(Object.assign({},e),{index:t,missing:0})})),this.aggregates=r.filter((function(e){return"aggregate"===e.type})).map((function(e,t){return Object.assign(Object.assign({},e),{index:t})})),this.groupProcessors=r.filter((function(e){return"group-value-processor"===e.type})).map((function(e,t){return Object.assign(Object.assign({},e),{index:t})})),this.propertyProcessors=r.filter((function(e){return"property-value-processor"===e.type})).map((function(e,t){return Object.assign(Object.assign({},e),{index:t})})),this.reducers=r.filter((function(e){return"reducer"===e.type})).map((function(e,t){return Object.assign(Object.assign({},e),{index:t})})),this.processors=r.filter((function(e){return"processor"===e.type})).map((function(e,t){return Object.assign(Object.assign({},e),{index:t})}));var l,u=(0,ne.Z)(this.values);try{for(u.s();!(l=u.n()).done;){var c=l.value;if(null==c.property)throw new Error("AG Charts - internal config error: no properties specified for value definitions: ".concat(JSON.stringify(c)))}}catch(y){u.e(y)}finally{u.f()}for(var d=function(e){var t,i=e.matchGroupIds,r=(0,ne.Z)(null!==i&&void 0!==i?i:[]);try{var o=function(){var e=t.value;if(!n.values.some((function(t){return t.groupId===e})))throw new Error("AG Charts - internal config error: matchGroupIds properties must match defined groups (".concat(e,")."))};for(r.s();!(t=r.n()).done;)o()}catch(y){r.e(y)}finally{r.f()}},h=function(e){var t,i=e.matchScopes,r=(0,ne.Z)(null!==i&&void 0!==i?i:[]);try{var o=function(){var e=t.value;if(!n.values.some((function(t){var n;return null===(n=t.scopes)||void 0===n?void 0:n.includes(e)})))throw new Error("AG Charts - internal config error: matchGroupIds properties must match defined groups (".concat(e,")."))};for(r.s();!(t=r.n()).done;)o()}catch(y){r.e(y)}finally{r.f()}},f=function(e){var t,i=e.matchIds,r=(0,ne.Z)(null!==i&&void 0!==i?i:[]);try{var o=function(){var e=t.value;if(!n.values.some((function(t){return t.id===e})))throw new Error("AG Charts - internal config error: matchGroupIds properties must match defined groups (".concat(e,")."))};for(r.s();!(t=r.n()).done;)o()}catch(y){r.e(y)}finally{r.f()}},v=0,g=[].concat((0,te.Z)(this.groupProcessors),(0,te.Z)(this.aggregates));v<g.length;v++){var m=g[v];f(m),d(m),h(m)}}return(0,f.Z)(e,[{key:"resolveProcessedDataIndexById",value:function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"value",r=null!==(n=this.resolveProcessedDataDefById(e,t,i))&&void 0!==n?n:{},o=r.index,a=r.def;return{type:i,index:o,def:a}}},{key:"resolveProcessedDataIndicesById",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"value";return this.resolveProcessedDataDefsById(e,t,n).map((function(e){var t=e.index,i=e.def;return{type:n,index:t,def:i}}))}},{key:"resolveProcessedDataDefById",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"value";return this.resolveProcessedDataDefsById(e,t,n)[0]}},{key:"resolveProcessedDataDefsById",value:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"value",i=this.keys,r=this.values,o=this.aggregates,a=this.groupProcessors,s=this.reducers,l=function(n){var i=n.id,r=n.scopes;return null!=i&&(!(null!=e&&!(null===r||void 0===r?void 0:r.includes(e.id)))&&("string"===typeof t?i===t:t.test(i)))},u=[i,r,o,a,s],c=[],d=0,h=u;d<h.length;d++){var p=h[d];c.push.apply(c,(0,te.Z)(p.filter(l).map((function(e){return{index:e.index,def:e}}))))}if(c.length>0)return c;throw new Error("AG Charts - didn't find property definition for [".concat(t,", ").concat(e.id,", ").concat(n,"]"))}},{key:"getDomain",value:function(e,t){var n,i,r,o,a,s,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"value",u=arguments.length>3?arguments[3]:void 0;try{a=this.resolveProcessedDataIndicesById(e,t,l)}catch(v){if("string"!==typeof t&&/didn't find property definition/.test(v.message))return[];throw v}switch(l){case"key":s="keys";break;case"value":s="values";break;case"aggregate":s="aggValues";break;case"group-value-processor":s="groups";break;default:return[]}var c=null!==(i=null===(n=u.domain[s])||void 0===n?void 0:n[a[0].index])&&void 0!==i?i:[];if(1===a.length)return c;var d,h=(0,te.Z)(c),p=(0,ne.Z)(a.slice(1));try{for(p.s();!(d=p.n()).done;){var f=d.value;wn(null!==(o=null===(r=u.domain[s])||void 0===r?void 0:r[f.index])&&void 0!==o?o:[],h)}}catch(g){p.e(g)}finally{p.f()}return h}},{key:"processData",value:function(t){for(var n=this.opts,i=n.groupByKeys,r=n.groupByFn,o=this.aggregates,a=this.groupProcessors,s=this.reducers,l=this.processors,u=this.propertyProcessors,c=performance.now(),d=0,h=[].concat((0,te.Z)(this.keys),(0,te.Z)(this.values));d<h.length;d++){h[d].missing=0}if(!i||0!==this.keys.length){var p=this.extractData(t);i?p=this.groupData(p):r&&(p=this.groupData(p,r(p))),a.length>0&&this.postProcessGroups(p),o.length>0&&this.aggregateData(p),u.length>0&&this.postProcessProperties(p),s.length>0&&this.reduceData(p),l.length>0&&this.postProcessData(p);for(var f=0,v=[].concat((0,te.Z)(this.keys),(0,te.Z)(this.values));f<v.length;f++){var g=v[f];t.length>0&&g.missing>=t.length&&Oe.warnOnce("the key '".concat(g.property,"' was not found in any data element."))}var m=performance.now();return p.time=m-c,e.DEBUG()&&function(e){var t,n,i=function(e,t){t.length>0&&(console.log("DataModel.processData() - ".concat(e)),console.table(t))};if(console.log("DataModel.processData() - processedData",e),i("Key Domains",e.domain.keys),i("Group Domains",null!==(t=e.domain.groups)&&void 0!==t?t:[]),i("Value Domains",e.domain.values),i("Aggregate Domains",null!==(n=e.domain.aggValues)&&void 0!==n?n:[]),"grouped"===e.type){var r=e.data.reduce((function(e,t){var n,i,r=null!==(n=t.keys)&&void 0!==n?n:[],o=null!==(i=t.aggValues)&&void 0!==i?i:[],a=t.keys.map((function(){})),s=null===o||void 0===o?void 0:o.map((function(){}));return e.push.apply(e,(0,te.Z)(t.values.map((function(e,t){return[].concat((0,te.Z)(0===t?r:a),(0,te.Z)(null!==e&&void 0!==e?e:[]),(0,te.Z)(0==t?o:s))})))),e}),[]);i("Values",r)}else{var o=e.data.reduce((function(e,t){var n,i=null!==(n=t.aggValues)&&void 0!==n?n:[];return e.push([].concat((0,te.Z)(t.keys),(0,te.Z)(t.values),(0,te.Z)(i))),e}),[]);i("Values",o)}}(p),p}}},{key:"valueGroupIdxLookup",value:function(e){var t=e.matchGroupIds,n=e.matchIds,i=e.matchScopes;return this.values.map((function(e,t){return{def:e,index:t}})).filter((function(e){var r=e.def;return!(t&&(null==r.groupId||!t.includes(r.groupId)))&&(!(n&&(null==r.id||!n.includes(r.id)))&&!(i&&(null==r.scopes||!i.some((function(e){var t;return null===(t=r.scopes)||void 0===t?void 0:t.includes(e)})))))})).map((function(e){return e.index}))}},{key:"valueIdxLookup",value:function(e,t){var n,i=null==e||0===e.length,r=function(t){if(null==t)return!0;var n=null==t||0===t.length;return i===n||(null===t||void 0===t?void 0:t.some((function(t){return e.includes(t)})))};if((n="string"===typeof t?this.values.findIndex((function(e){return r(e.scopes)&&e.property===t})):this.values.findIndex((function(e){return r(e.scopes)&&e.id===t.id})))>=0)return n;throw new Error("AG Charts - configuration error, unknown property ".concat(JSON.stringify(t)," in scope(s) ").concat(JSON.stringify(e)))}},{key:"extractData",value:function(e){var t,n,i=this.keys,r=this.values,o=this.opts.dataVisible,a=this.initDataDomainProcessor(),s=a.dataDomain,l=a.processValue,u=a.scopes,c=a.allScopesHaveSameDefs,d=new Array(o?e.length:0),h=0,p=0,f=(0,ne.Z)(e);try{for(f.s();!(n=f.n()).done;){var v,g=n.value,m=u.size>0?new Set(u):void 0,y=o?new Array(i.length):void 0,C=0,k=void 0,w=(0,ne.Z)(i);try{for(w.s();!(v=w.n()).done;){if((k=l(v.value,g,k))===xn)break;y&&(y[C++]=k)}}catch(N){w.e(N)}finally{w.f()}if(k!==xn){var S,b=o&&r.length>0?new Array(r.length):void 0,E=0,x=void 0,R=(0,ne.Z)(r);try{for(R.s();!(S=R.n()).done;){var D=S.value;if((x=l(D,g,x))===xn){if(c)break;var T,O=(0,ne.Z)(null!==(t=D.scopes)&&void 0!==t?t:u);try{for(O.s();!(T=O.n()).done;){var P=T.value;null===m||void 0===m||m.delete(P)}}catch(N){O.e(N)}finally{O.f()}if(E++,0===(null===m||void 0===m?void 0:m.size))break}else b&&(b[E++]=x)}}catch(N){R.e(N)}finally{R.f()}if((x!==xn||!c)&&0!==(null===m||void 0===m?void 0:m.size)&&o){var A={datum:g,keys:y,values:b};!c&&m&&m.size<u.size&&(p++,A.validScopes=(0,te.Z)(m)),d[h++]=A}}}}catch(N){f.e(N)}finally{f.f()}d.length=h;var M=function(e){var t=s.get(e).getDomain();return Array.isArray(t)&&t[0]>t[1]?[]:(0,te.Z)(t)};return{type:"ungrouped",data:d,domain:{keys:i.map((function(e){return M(e)})),values:r.map((function(e){return M(e)}))},defs:{allScopesHaveSameDefs:c,keys:i,values:r},partialValidDataCount:p,time:0}}},{key:"groupData",value:function(e,t){var n,i,r,o,a,s=new Map,l=(0,ne.Z)(e.data);try{for(l.s();!(a=l.n()).done;){var u=a.value,c=u.keys,d=u.values,h=u.datum,p=u.validScopes,f=t?t(u):c,v=Sn(f);if(s.has(v)){var g=s.get(v);if(g.values.push(d),g.datum.push(h),null!=p)for(var m=function(e){var t=null===(r=g.validScopes)||void 0===r?void 0:r[e];if(p.some((function(e){return e===t})))return"continue";null===(o=g.validScopes)||void 0===o||o.splice(e,1)},y=0;y<(null!==(i=null===(n=g.validScopes)||void 0===n?void 0:n.length)&&void 0!==i?i:0);y++)m(y)}else s.set(v,{keys:f,values:[d],datum:[h],validScopes:p})}}catch(O){l.e(O)}finally{l.f()}var C,k=new Array(s.size),w=new Array(s.size),S=0,b=(0,ne.Z)(s.entries());try{for(b.s();!(C=b.n()).done;){var E=(0,re.Z)(C.value,2)[1],x=E.keys,R=E.values,D=E.datum,T=E.validScopes;0!==(null===T||void 0===T?void 0:T.length)&&(w[S]=x,k[S++]={keys:x,values:R,datum:D,validScopes:T})}}catch(O){b.e(O)}finally{b.f()}return Object.assign(Object.assign({},e),{type:"grouped",data:k,domain:Object.assign(Object.assign({},e.domain),{groups:w})})}},{key:"aggregateData",value:function(e){var t,n,i,r,o,a,s,l,u=this,c=this.aggregates;if(c){var d,h=c.map((function(){return[1/0,-1/0]})),p=c.map((function(e){return u.valueGroupIdxLookup(e)})),f=c.map((function(e){return e.aggregateFunction})),v=c.map((function(e){return e.groupAggregateFunction})),g=c.map((function(e){return e.finalFunction})),m=(0,ne.Z)(e.data);try{var y=function(){var u=d.value,m=u.values,y=u.validScopes;null!==(t=u.aggValues)&&void 0!==t||(u.aggValues=new Array(p.length)),"ungrouped"===e.type&&(m=[m]);var C,k=0,w=(0,ne.Z)(p);try{for(w.s();!(C=w.n()).done;){var S=C.value,b=null===(n=null===y||void 0===y?void 0:y.some((function(e){var t;return null===(t=c[k].matchScopes)||void 0===t?void 0:t.some((function(t){return e===t}))})))||void 0===n||n;if(b){var E,x=null!==(r=null===(i=v[k])||void 0===i?void 0:i.call(v))&&void 0!==r?r:wn([]),R=(0,ne.Z)(m);try{var D=function(){var e=E.value,t=S.map((function(t){return e[t]})),n=f[k](t,u.keys);n&&(x=null!==(a=null===(o=v[k])||void 0===o?void 0:o.call(v,n,x))&&void 0!==a?a:wn(n,x))};for(R.s();!(E=R.n()).done;)D()}catch(O){R.e(O)}finally{R.f()}var T=(null!==(l=null===(s=g[k])||void 0===s?void 0:s.call(g,x))&&void 0!==l?l:x).map((function(e){return bn(e)}));wn(T,h[k]),u.aggValues[k++]=T}else k++}}catch(O){w.e(O)}finally{w.f()}};for(m.s();!(d=m.n()).done;)y()}catch(C){m.e(C)}finally{m.f()}e.domain.aggValues=h}}},{key:"postProcessGroups",value:function(e){var t,n,i,r,o,a=this.groupProcessors;if(a){var s,l=new Set,u=new Map,c=new Map,d=new Map,h=(0,ne.Z)(a);try{for(h.s();!(s=h.n()).done;){var p=s.value,f=this.valueGroupIdxLookup(p);c.set(p,f),d.set(p,p.adjust());var v,g=(0,ne.Z)(f);try{for(g.s();!(v=g.n()).done;){var m=v.value,y=this.values[m];l.add(m),u.set(m,new kn("category"===y.valueType?"discrete":"continuous"))}}catch(N){g.e(N)}finally{g.f()}}}catch(N){h.e(N)}finally{h.f()}var C,k=function(e){var t,n,i=(0,ne.Z)(l);try{for(i.s();!(n=i.n()).done;){var r=n.value;null===(t=u.get(r))||void 0===t||t.extend(e[r])}}catch(N){i.e(N)}finally{i.f()}},w=(0,ne.Z)(e.data);try{for(w.s();!(C=w.n()).done;){var S,b=C.value,E=(0,ne.Z)(a);try{var x=function(){var a=S.value;if(!(null===(n=null===(t=b.validScopes)||void 0===t?void 0:t.some((function(e){var t;return null===(t=a.matchScopes)||void 0===t?void 0:t.some((function(t){return e===t}))})))||void 0===n||n))return"continue";var s=null!==(i=c.get(a))&&void 0!==i?i:[],l=null!==(o=null===(r=d.get(a))||void 0===r?void 0:r())&&void 0!==o?o:function(){};if("grouped"===e.type){var u,h=(0,ne.Z)(b.values);try{for(h.s();!(u=h.n()).done;){var p=u.value;p&&l(p,s)}}catch(N){h.e(N)}finally{h.f()}return"continue"}b.values&&l(b.values,s)};for(E.s();!(S=E.n()).done;)x()}catch(N){E.e(N)}finally{E.f()}if("grouped"===e.type){var R,D=(0,ne.Z)(b.values);try{for(D.s();!(R=D.n()).done;){k(R.value)}}catch(N){D.e(N)}finally{D.f()}}else k(b.values)}}catch(N){w.e(N)}finally{w.f()}var T,O=(0,ne.Z)(u);try{for(O.s();!(T=O.n()).done;){var P=(0,re.Z)(T.value,2),A=P[0],M=P[1];e.domain.values[A]=(0,te.Z)(M.getDomain())}}catch(N){O.e(N)}finally{O.f()}}}},{key:"postProcessProperties",value:function(e){var t=this.propertyProcessors;if(t){var n,i=(0,ne.Z)(t);try{for(i.s();!(n=i.n()).done;){var r=n.value,o=r.adjust,a=r.property,s=r.scopes;o()(e,this.valueIdxLookup(null!==s&&void 0!==s?s:[],a))}}catch(l){i.e(l)}finally{i.f()}}}},{key:"reduceData",value:function(e){var t,n,i,r,o=this.reducers,a=o.map((function(e){return e.scopes})),s=o.map((function(e){return e.reducer()})),l=o.map((function(e){return e.initialValue})),u=(0,ne.Z)(e.data);try{var c=function(){var e,i=r.value,o=0,u=(0,ne.Z)(s);try{for(u.s();!(e=u.n()).done;){var c=e.value;null===(n=null===(t=i.validScopes)||void 0===t?void 0:t.some((function(e){var t;return null===(t=a[o])||void 0===t?void 0:t.some((function(t){return e===t}))})))||void 0===n||n?(l[o]=c(l[o],i),o++):o++}}catch(d){u.e(d)}finally{u.f()}};for(u.s();!(r=u.n()).done;)c()}catch(h){u.e(h)}finally{u.f()}for(var d=0;d<l.length;d++)null!==(i=e.reduced)&&void 0!==i||(e.reduced={}),e.reduced[o[d].property]=l[d]}},{key:"postProcessData",value:function(e){var t,n,i=this.processors,r=(0,ne.Z)(i);try{for(r.s();!(n=r.n()).done;){var o=n.value;null!==(t=e.reduced)&&void 0!==t||(e.reduced={}),e.reduced[o.property]=o.calculate(e)}}catch(a){r.e(a)}finally{r.f()}}},{key:"initDataDomainProcessor",value:function(){var e,t,n=this.keys,i=this.values,r=new Set,o=(0,ne.Z)(i);try{for(o.s();!(t=o.n()).done;){var a,s=t.value,l=(0,ne.Z)(null!==(e=s.scopes)&&void 0!==e?e:[]);try{for(l.s();!(a=l.n()).done;){var u=a.value;r.add(u)}}catch(m){l.e(m)}finally{l.f()}}}catch(m){o.e(m)}finally{o.f()}var c=r.size,d=new Map,h=new Map,p=!0,f=function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;"category"===t?i.set(e,new kn("discrete")):(i.set(e,new kn("continuous")),p&&(p=(null!==(n=e.scopes)&&void 0!==n?n:[]).length===c))},v=function(){n.forEach((function(e){return f(e,e.valueType)})),i.forEach((function(e){return f(e,e.valueType)}))};v();var g=this.buildAccessors.apply(this,(0,te.Z)(n).concat((0,te.Z)(i)));return{dataDomain:d,processValue:function(e,t,n){var i,r,o,a,s,l=!1;if(e.property in g){try{s=g[e.property](t)}catch(u){}l=void 0!==s}else s=(l=e.property in t)?t[e.property]:e.missingValue;if((l||"missingValue"in e||e.missing++,d.has(e)||v(),l)&&!(null===(r=null===(i=e.validation)||void 0===i?void 0:i.call(e,s,t))||void 0===r||r)){if(!("invalidValue"in e))return xn;s=e.invalidValue}return e.processor&&(h.has(e)||h.set(e,e.processor()),s=null===(o=h.get(e))||void 0===o?void 0:o(s,n!==xn?n:void 0)),null===(a=d.get(e))||void 0===a||a.extend(s),s},initDataDomain:v,scopes:r,allScopesHaveSameDefs:p}}},{key:"buildAccessors",value:function(){for(var e={},t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];for(var r=0,o=n;r<o.length;r++){var a=o[r],s=a.property.indexOf(".")>=0||a.property.indexOf("[")>=0;if(s){var l=void 0;l=a.property.startsWith("[")?"return datum".concat(a.property,";"):"return datum.".concat(a.property,";"),e[a.property]=new Function("datum",l)}}return e}}]),e}();function Dn(){return function(e,t){var n=["Property [".concat(e,"] is deprecated."),t].filter((function(e){return null!=e})).join(" ");Oe.warnOnce(n)}}Rn.DEBUG=function(){var e;return null!==(e=[!0,"data-model"].includes(Le("agChartsDebug")))&&void 0!==e&&e};var Tn=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},On="ag-chart-tooltip",Pn="\n.".concat(On," {\n    transition: transform 0.1s ease;\n    display: table;\n    position: fixed;\n    left: 0px;\n    top: 0px;\n    white-space: nowrap;\n    z-index: 99999;\n    font: 12px Verdana, sans-serif;\n    color: black;\n    background: rgb(244, 244, 244);\n    border-radius: 5px;\n    box-shadow: 0 0 1px rgba(3, 3, 3, 0.7), 0.5vh 0.5vh 1vh rgba(3, 3, 3, 0.25);\n}\n\n.").concat(On,"-no-interaction {\n    pointer-events: none;\n    user-select: none;\n}\n\n.").concat(On,"-no-animation {\n    transition: none !important;\n}\n\n.").concat(On,"-hidden {\n    visibility: hidden;\n}\n\n.").concat(On,"-title {\n    font-weight: bold;\n    padding: 7px;\n    border-top-left-radius: 5px;\n    border-top-right-radius: 5px;\n    color: white;\n    background-color: #888888;\n    border-top-left-radius: 5px;\n    border-top-right-radius: 5px;\n}\n\n.").concat(On,"-content {\n    padding: 7px;\n    line-height: 1.7em;\n    border-bottom-left-radius: 5px;\n    border-bottom-right-radius: 5px;\n    overflow: hidden;\n}\n\n.").concat(On,"-content:empty {\n    padding: 0;\n    height: 7px;\n}\n\n.").concat(On,'-arrow::before {\n    content: "";\n\n    position: absolute;\n    top: 100%;\n    left: 50%;\n    transform: translateX(-50%);\n\n    border: 6px solid #989898;\n\n    border-left-color: transparent;\n    border-right-color: transparent;\n    border-top-color: #989898;\n    border-bottom-color: transparent;\n\n    width: 0;\n    height: 0;\n\n    margin: 0 auto;\n}\n\n.').concat(On,'-arrow::after {\n    content: "";\n\n    position: absolute;\n    top: 100%;\n    left: 50%;\n    transform: translateX(-50%);\n\n    border: 5px solid black;\n\n    border-left-color: transparent;\n    border-right-color: transparent;\n    border-top-color: rgb(244, 244, 244);\n    border-bottom-color: transparent;\n\n    width: 0;\n    height: 0;\n\n    margin: 0 auto;\n}\n\n.ag-chart-wrapper {\n    box-sizing: border-box;\n    overflow: hidden;\n}\n');function An(e,t){var n,i,r,o;if("string"===typeof e)return e;t=null!==t&&void 0!==t?t:{};var a=e.content,s=void 0===a?null!==(n=t.content)&&void 0!==n?n:"":a,l=e.title,u=void 0===l?null!==(i=t.title)&&void 0!==i?i:void 0:l,c=e.color,d=void 0===c?null!==(r=t.color)&&void 0!==r?r:"white":c,h=e.backgroundColor,p=void 0===h?null!==(o=t.backgroundColor)&&void 0!==o?o:"#888":h,f=u?'<div class="'.concat(On,'-title"\n        style="color: ').concat(d,"; background-color: ").concat(p,'">').concat(u,"</div>"):"";return"".concat(f,'<div class="').concat(On,'-content">').concat(s,"</div>")}var Mn=["pointer","node"],Nn=gt((function(e){return Mn.includes(e)}),"expecting a position type keyword such as 'pointer' or 'node'"),Ln=(0,f.Z)((function e(){(0,p.Z)(this,e),this.type="pointer",this.xOffset=0,this.yOffset=0}));Tn([vt(Nn)],Ln.prototype,"type",void 0),Tn([vt(Bt())],Ln.prototype,"xOffset",void 0),Tn([vt(Bt())],Ln.prototype,"yOffset",void 0);var In=function(){function e(t,n,i){var r=this;(0,p.Z)(this,e),this.enableInteraction=!1,this.enabled=!0,this.showArrow=void 0,this.class=void 0,this.lastClass=void 0,this.delay=0,this.range="nearest",this.position=new Ln,this.showTimeout=0,this._showArrow=!0,this.tooltipRoot=i;var o=n.createElement("div");if(this.element=this.tooltipRoot.appendChild(o),this.element.classList.add(On),this.canvasElement=t,window.IntersectionObserver){var a=new IntersectionObserver((function(e){var t,n=(0,ne.Z)(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.target===r.canvasElement&&0===i.intersectionRatio&&r.toggle(!1)}}catch(o){n.e(o)}finally{n.f()}}),{root:this.tooltipRoot});a.observe(this.canvasElement),this.observer=a}if(e.tooltipDocuments.indexOf(n)<0){var s=n.createElement("style");s.innerHTML=Pn,n.head.insertBefore(s,n.head.querySelector("style")),e.tooltipDocuments.push(n)}}return(0,f.Z)(e,[{key:"destroy",value:function(){var e=this.element.parentNode;e&&e.removeChild(this.element),this.observer&&this.observer.unobserve(this.canvasElement)}},{key:"isVisible",value:function(){return!this.element.classList.contains("ag-chart-tooltip-hidden")}},{key:"updateClass",value:function(e,t){var n=this.element,i=this.class,r=this.lastClass,o=this.enableInteraction,a=function(e,t){var i="".concat(On,"-").concat(e);t?n.classList.add(i):n.classList.remove(i)};a("no-animation",!this.isVisible()&&!!e),a("no-interaction",!o),a("hidden",!e),a("arrow",!!t),i!==r&&(r&&n.classList.remove(r),i&&n.classList.add(i),this.lastClass=i)}},{key:"show",value:function(e,t){var n,i,r,o,a,s,l,u=this,c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],d=this.element,h=this.canvasElement;if(void 0!==t)d.innerHTML=t;else if(!d.innerHTML)return void this.toggle(!1);var p=function(e,t,n){return Math.max(Math.min(t,n),e)},f=null!==(i=null===(n=e.position)||void 0===n?void 0:n.xOffset)&&void 0!==i?i:0,v=null!==(o=null===(r=e.position)||void 0===r?void 0:r.yOffset)&&void 0!==o?o:0,g=h.getBoundingClientRect(),m=g.left+e.offsetX-d.clientWidth/2+f,y=g.top+e.offsetY-d.clientHeight-8+v,C=this.getWindowBoundingBox(),k=C.x+C.width-d.clientWidth-1,w=C.y+C.height-d.clientHeight,S=p(C.x,m,k),b=p(C.y,y,w),E=S!==m||b!==y,x=!E&&!f&&!v,R=null!==(s=null!==(a=e.showArrow)&&void 0!==a?a:this.showArrow)&&void 0!==s?s:x;if(this.updateShowArrow(R),d.style.transform="translate(".concat(Math.round(S),"px, ").concat(Math.round(b),"px)"),this.enableInteraction=null!==(l=e.enableInteraction)&&void 0!==l&&l,this.delay>0&&!c)return this.toggle(!1),void(this.showTimeout=window.setTimeout((function(){u.toggle(!0)}),this.delay));this.toggle(!0)}},{key:"getWindowBoundingBox",value:function(){return new he(0,0,window.innerWidth,window.innerHeight)}},{key:"toggle",value:function(e){e||window.clearTimeout(this.showTimeout),this.updateClass(e,this._showArrow)}},{key:"pointerLeftOntoTooltip",value:function(e){var t;if(!this.enableInteraction)return!1;var n=null===(t=e.sourceEvent.relatedTarget)||void 0===t?void 0:t.classList,i=Boolean(["","-title","-content"].filter((function(e){return null===n||void 0===n?void 0:n.contains("".concat(On).concat(e))})));return void 0!==n&&i}},{key:"updateShowArrow",value:function(e){this._showArrow=e}}]),e}();function Fn(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0],i=(0,ne.Z)(e);try{for(i.s();!(t=i.n()).done;){var r=t.value;"number"===typeof r&&(r<0&&(n[0]+=r),r>0&&(n[1]+=r))}}catch(o){i.e(o)}finally{i.f()}return n}function _n(e,t){return{id:t,scopes:[e.id],type:"aggregate",aggregateFunction:function(){return[0,1]},groupAggregateFunction:function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0];return i[0]+=null!==(t=null===e||void 0===e?void 0:e[0])&&void 0!==t?t:0,i[1]+=null!==(n=null===e||void 0===e?void 0:e[1])&&void 0!==n?n:0,i}}}function Gn(e,t,n){var i={id:t,scopes:[e.id],matchGroupIds:n?[n]:void 0,type:"aggregate",aggregateFunction:function(e){return Fn(e)},groupAggregateFunction:function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,-1];return i[0]+=null!==(t=null===e||void 0===e?void 0:e[0])&&void 0!==t?t:0,i[1]+=null!==(n=null===e||void 0===e?void 0:e[1])&&void 0!==n?n:0,i[2]++,i},finalFunction:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0],t=e[0]+e[1];return t>=0?[0,t/e[2]]:[t/e[2],0]}};return i}function Zn(e,t,n,i){var r={id:t,scopes:[e.id],matchGroupIds:i?[i]:void 0,type:"aggregate",aggregateFunction:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=t[1]-t[0];return n.aggregateFunction(e).map((function(e){return e/i}))}};return n.groupAggregateFunction&&(r.groupAggregateFunction=n.groupAggregateFunction),r}function Vn(){return function(){var e=0;return function(t){return"number"!==typeof t||isNaN(t)?t:e+=t}}}function Hn(){return function(){var e=0;return function(t){if("number"!==typeof t)return t;if(isNaN(t))return t;var n=e;return e+=t,n}}}In.tooltipDocuments=[],Tn([vt(Dt)],In.prototype,"enabled",void 0),Tn([vt(Tt)],In.prototype,"showArrow",void 0),Tn([vt(Pt)],In.prototype,"class",void 0),Tn([vt(Bt(0))],In.prototype,"delay",void 0),Tn([function(e,t){var n=Dn();return ft((function(i,r,o){return o!==i[e]&&(n(r.toString(),"Use [".concat(e,"] instead.")),i[e]=t?t(o):o),ht}),(function(t,i){return n(i.toString(),"Use [".concat(e,"] instead.")),t[e]}))}("range",(function(e){return e?"nearest":"exact"}))],In.prototype,"tracking",void 0),Tn([vt(mn)],In.prototype,"range",void 0);var Bn=new Map;function Wn(e,t){var n,i,r,o=JSON.stringify(e,null,0);return Bn.has(t)||Bn.set(t,new Map),(null===(n=Bn.get(t))||void 0===n?void 0:n.has(o))||null===(i=Bn.get(t))||void 0===i||i.set(o,t(e)),null===(r=Bn.get(t))||void 0===r?void 0:r.get(o)}var zn={type:"reducer",property:"smallestKeyInterval",initialValue:1/0,reducer:function(){var e=NaN;return function(t,n){var i=n.keys[0],r=Math.abs(i-e);return e=i,!isNaN(r)&&r>0&&r<t?r:t}}},Un={type:"processor",property:"sortedGroupDomain",calculate:function(e){var t=e.domain.groups;if(null!=t)return(0,te.Z)(t).sort((function(e,t){for(var n=0;n<e.length;n++){var i=e[n]-t[n];if(0!==i)return i}return 0}))}};function jn(e){var t=e.normaliseTo,n=e.mode,i=function(e,n){var i=e*t/n;return i>=0?Math.min(t,i):Math.max(-t,i)};return function(){return function(){return function(e,t){var r,o=[0,0],a=(0,ne.Z)(t);try{for(a.s();!(r=a.n()).done;){var s=e[r.value],l=s<0?0:1;"sum"===n?o[l]+=s:o[l]=0===l?Math.min(o[l],s):Math.max(o[l],s)}}catch(p){a.e(p)}finally{a.f()}var u,c=Math.max(Math.abs(o[0]),o[1]),d=(0,ne.Z)(t);try{for(d.s();!(u=d.n()).done;){var h=u.value;e[h]=i(e[h],c)}}catch(p){d.e(p)}finally{d.f()}}}}}function Kn(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"sum";return{scopes:[e.id],type:"group-value-processor",matchGroupIds:t,adjust:Wn({normaliseTo:n,mode:i},jn)}}function Yn(e){var t=e.normaliseTo,n=e.rangeMin,i=e.rangeMax,r=t[1]-t[0],o=function(e,n,i){var o=t[0]+(e-n)/i*r;return 0===i||o>=t[1]?t[1]:o<t[0]?t[0]:o};return function(){return function(e,r){var a=(0,re.Z)(e.domain.values[r],2),s=a[0],l=a[1];null!=n&&(s=n),null!=i&&(l=i);var u=l-s;e.domain.values[r]=[t[0],t[1]];var c,d=(0,ne.Z)(e.data);try{for(d.s();!(c=d.n()).done;){var h=c.value.values;"ungrouped"===e.type&&(h=[h]);var p,f=(0,ne.Z)(h);try{for(f.s();!(p=f.n()).done;){var v=p.value;v[r]=o(v[r],s,u)}}catch(g){f.e(g)}finally{f.f()}}}catch(g){d.e(g)}finally{d.f()}}}}function Xn(e,t,n,i,r){return{scopes:[e.id],type:"property-value-processor",property:t,adjust:Wn({normaliseTo:n,rangeMin:i,rangeMax:r},Yn)}}function qn(e){return function(){return function(){return function(t,n){var i,r=0,o=(0,ne.Z)(n);try{for(o.s();!(i=o.n()).done;){var a=i.value,s=t[a];"number"!==typeof s||isNaN(s)||("normal"===e&&(r+=s),t[a]=r,"trailing"===e&&(r+=s))}}catch(l){o.e(l)}finally{o.f()}}}}}function Qn(e){var t=e.mode,n=e.sum;return function(){var e=[],i=!0;return function(){return function(r,o){var a,s=0,l=(0,ne.Z)(o);try{for(l.s();!(a=l.n()).done;){var u=a.value,c=r[u],d=i&&"current"===n?0:e[u];e[u]=c;var h="current"===n?c:d;"number"!==typeof c||isNaN(c)?r[u]=h:"number"!==typeof d||isNaN(d)?r[u]=h:("normal"===t&&(s+=h),r[u]=s,"trailing"===t&&(s+=h))}}catch(p){l.e(p)}finally{l.f()}i=!1}}}}function Jn(e,t,n,i){var r;n.startsWith("window")?r=Wn({mode:n.endsWith("-trailing")?"trailing":"normal",sum:i},Qn):r=Wn(n,qn);return{scopes:[e.id],type:"group-value-processor",matchGroupIds:[t],adjust:r}}function $n(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"processor",property:"diff",calculate:function(n){for(var i={changed:!1,added:[],updated:[],removed:[]},r=new Map,o=new Map,a=new Map,s=0;s<Math.max(e.data.length,n.data.length);s++){var l=e.data[s],u=n.data[s],c=null===l||void 0===l?void 0:l.keys.join("___"),d=null===u||void 0===u?void 0:u.keys.join("___");c!==d?(a.has(d)?(!t&&ei(a.get(d).values,u.values)||o.set(d,u),a.delete(d)):u&&r.set(d,u),r.has(c)?(!t&&ei(r.get(c).values,l.values)||o.set(c,l),r.delete(c)):l&&a.set(c,l)):ei(l.values,u.values)||o.set(d,u)}return i.added=Array.from(r.values()).map((function(e){return e.keys})),i.updated=Array.from(o.values()).map((function(e){return e.keys})),i.removed=Array.from(a.values()).map((function(e){return e.keys})),i.changed=i.added.length>0||i.updated.length>0||i.removed.length>0,i}}}function ei(e,t){if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){if(Array.isArray(e[n])&&Array.isArray(t[n]))return ei(e[n],t[n]);if(e[n]!==t[n])return!1}return!0}function ti(e){return ft((function(t,n,i){return t[e]=i,i}))}function ni(e,t){return ft((function(n,i,r){return n[e][null!==t&&void 0!==t?t:i]=r,r}))}function ii(e){var t=e.newValue,n=e.oldValue,i=e.changeValue;return ft((function(e,r,o,a){return o!==a&&(void 0!==a&&(null===n||void 0===n||n.call(e,a)),void 0!==o&&(null===t||void 0===t||t.call(e,o)),null===i||void 0===i||i.call(e,o,a)),o}))}var ri,oi=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},ai=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};function si(e){return null!=ut(e,!0)}function li(e){return null!=ut(e,!1)}function ui(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=Object.assign({scopes:[e.id],property:t,type:"key",valueType:n?"range":"category",validation:n?si:li},i);return r}function ci(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=Object.assign({scopes:[e.id],property:t,type:"value",valueType:n?"range":"category",validation:n?si:li},i);return r}function di(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.min,r=void 0===i?-1/0:i,o=n.max,a=void 0===o?1/0:o,s=ai(n,["min","max"]);return Object.assign({scopes:[e.id],type:"value",property:t,valueType:"range",validation:si,processor:function(){return function(e){return"number"!==typeof e||isNaN(e)?e:Math.min(Math.max(e,r),a)}}},s)}function hi(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=Object.assign(Object.assign({},ci(e,t,n,i)),{processor:Vn()});return r}function pi(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=Object.assign(Object.assign({},ci(e,t,n,i)),{processor:Hn()});return r}function fi(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"current",o=arguments.length>5?arguments[5]:void 0;return[ci(e,t,n,o),Jn(e,o.groupId,i,r)]}!function(e){e[e.EXACT_SHAPE_MATCH=0]="EXACT_SHAPE_MATCH",e[e.NEAREST_BY_MAIN_AXIS_FIRST=1]="NEAREST_BY_MAIN_AXIS_FIRST",e[e.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST=2]="NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST",e[e.NEAREST_NODE=3]="NEAREST_NODE"}(ri||(ri={}));var vi=(0,f.Z)((function e(t,n,i){(0,p.Z)(this,e),this.type="nodeClick",this.event=t,this.datum=n.datum,this.seriesId=i.id})),gi=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n)}(vi),mi=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).type="nodeDoubleClick",e}return(0,f.Z)(n)}(vi),yi=(0,f.Z)((function e(){(0,p.Z)(this,e),this.fill="yellow",this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=void 0}));oi([vt(Zt)],yi.prototype,"fill",void 0),oi([vt(Wt(0,1))],yi.prototype,"fillOpacity",void 0),oi([vt(Zt)],yi.prototype,"stroke",void 0),oi([vt(Wt(0))],yi.prototype,"strokeWidth",void 0);var Ci=(0,f.Z)((function e(){(0,p.Z)(this,e),this.strokeWidth=void 0,this.dimOpacity=void 0,this.enabled=void 0}));oi([vt(Wt(0))],Ci.prototype,"strokeWidth",void 0),oi([vt(Wt(0,1))],Ci.prototype,"dimOpacity",void 0),oi([vt(Tt)],Ci.prototype,"enabled",void 0);var ki=(0,f.Z)((function e(){(0,p.Z)(this,e),this.color="black"}));oi([vt(Zt)],ki.prototype,"color",void 0);var wi=(0,f.Z)((function e(){(0,p.Z)(this,e),this.item=new yi,this.series=new Ci,this.text=new ki})),Si=(0,f.Z)((function e(){(0,p.Z)(this,e),this.enabled=!0,this.showArrow=void 0,this.interaction=new bi,this.position=new Ln}));oi([vt(Dt)],Si.prototype,"enabled",void 0),oi([vt(Tt)],Si.prototype,"showArrow",void 0);var bi=(0,f.Z)((function e(){(0,p.Z)(this,e),this.enabled=!1}));oi([vt(Dt)],bi.prototype,"enabled",void 0);var Ei=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i,r;(0,p.Z)(this,n),(r=t.call(this)).id=me((0,le.Z)(r)),r.rootGroup=new Ae({name:"seriesRoot",isVirtual:!0}),r.axes=(i={},(0,se.Z)(i,Qt.X,void 0),(0,se.Z)(i,Qt.Y,void 0),i),r.directions=[Qt.X,Qt.Y],r.nodeDataRefresh=!0,r._data=void 0,r._visible=!0,r.showInLegend=!0,r.cursor="default",r.nodeClickRange="exact",r.seriesGrouping=void 0,r._declarationOrder=-1,r.highlightStyle=new wi,r.ctx=e.moduleCtx;var o=e.useLabelLayer,a=void 0!==o&&o,s=e.pickModes,l=void 0===s?[ri.NEAREST_BY_MAIN_AXIS_FIRST]:s,u=e.directionKeys,c=void 0===u?{}:u,d=e.directionNames,h=void 0===d?{}:d,f=e.contentGroupVirtual,v=void 0===f||f,g=(0,le.Z)(r).rootGroup;return r.directionKeys=c,r.directionNames=h,r.contentGroup=g.appendChild(new Ae({name:"".concat(r.id,"-content"),layer:!v,isVirtual:v,zIndex:qt.SERIES_LAYER_ZINDEX,zIndexSubOrder:r.getGroupZIndexSubOrder("data")})),r.highlightGroup=g.appendChild(new Ae({name:"".concat(r.id,"-highlight"),layer:!0,zIndex:qt.SERIES_LAYER_ZINDEX,zIndexSubOrder:r.getGroupZIndexSubOrder("highlight")})),r.highlightNode=r.highlightGroup.appendChild(new Ae({name:"highlightNode"})),r.highlightLabel=r.highlightGroup.appendChild(new Ae({name:"highlightLabel"})),r.highlightNode.zIndex=0,r.highlightLabel.zIndex=10,r.pickModes=l,a&&(r.labelGroup=g.appendChild(new Ae({name:"".concat(r.id,"-series-labels"),layer:!0,zIndex:qt.SERIES_LABEL_ZINDEX}))),r}return(0,f.Z)(n,[{key:"type",get:function(){var e;return null!==(e=this.constructor.type)&&void 0!==e?e:""}},{key:"data",get:function(){return this._data},set:function(e){this._data=e,this.nodeDataRefresh=!0}},{key:"hasData",value:function(){var e=this.data;return e&&(!Array.isArray(e)||e.length>0)}},{key:"visible",get:function(){return this._visible},set:function(e){this._visible=e,this.visibleChanged()}},{key:"onSeriesGroupingChange",value:function(e,t){var n=this,i=this.id,r=this.type,o=this.visible,a=this.rootGroup;e&&this.ctx.seriesStateManager.deregisterSeries({id:i,type:r}),t&&this.ctx.seriesStateManager.registerSeries({id:i,type:r,visible:o,seriesGrouping:t}),this.ctx.seriesLayerManager.changeGroup({id:i,type:r,rootGroup:a,getGroupZIndexSubOrder:function(e){return n.getGroupZIndexSubOrder(e)},seriesGrouping:t,oldGrouping:e})}},{key:"getBandScalePadding",value:function(){return{inner:1,outer:0}}},{key:"getGroupZIndexSubOrder",value:function(e){var t=this,n=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":n+=15e3}var r=function(){return t._declarationOrder+i};return[r,n]}},{key:"addChartEventListeners",value:function(){}},{key:"destroy",value:function(){this.ctx.seriesStateManager.deregisterSeries(this),this.ctx.seriesLayerManager.releaseGroup(this)}},{key:"getDirectionValues",value:function(e,t){var n=this,i=this.resolveKeyDirection(e),r=null===t||void 0===t?void 0:t[i],o=[],a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,r=t;i<r.length;i++){var o=r[i];s(o)}},s=function(e){Array.isArray(e)?a.apply(void 0,(0,te.Z)(e)):"object"===typeof e?a(Object.values(e)):o.push(e)};return r?(r.forEach((function(e){var t=n[e];s(t)})),o):o}},{key:"getKeys",value:function(e){return this.getDirectionValues(e,this.directionKeys)}},{key:"getNames",value:function(e){return this.getDirectionValues(e,this.directionNames)}},{key:"resolveKeyDirection",value:function(e){return e}},{key:"markNodeDataDirty",value:function(){this.nodeDataRefresh=!0}},{key:"visibleChanged",value:function(){this.ctx.seriesStateManager.registerSeries(this)}},{key:"getOpacity",value:function(e){var t=this.highlightStyle.series,n=t.dimOpacity,i=void 0===n?1:n,r=t.enabled;if(!1===(void 0===r||r)||1===i)return 1;switch(this.isItemIdHighlighted(e)){case"no-highlight":case"highlighted":return 1;case"peer-highlighted":case"other-highlighted":return i}}},{key:"getStrokeWidth",value:function(e,t){var n=this.highlightStyle.series,i=n.strokeWidth,r=n.enabled;if(!1===(void 0===r||r)||void 0===i)return e;switch(this.isItemIdHighlighted(t)){case"highlighted":return i;case"no-highlight":case"other-highlighted":case"peer-highlighted":return e}}},{key:"isItemIdHighlighted",value:function(e){var t,n=null===(t=this.ctx.highlightManager)||void 0===t?void 0:t.getActiveHighlight(),i=null!==n&&void 0!==n?n:{},r=i.series,o=i.itemId;return null!=r?r!==this?"other-highlighted":void 0===o?"highlighted":e&&n!==e&&o!==e.itemId?"peer-highlighted":"highlighted":"no-highlight"}},{key:"pickNode",value:function(e,t){var n=this.pickModes,i=this.visible,r=this.rootGroup;if(i&&r.visible){var o,a=(0,ne.Z)(n);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(!t||t.includes(s)){var l=void 0;switch(s){case ri.EXACT_SHAPE_MATCH:l=this.pickNodeExactShape(e);break;case ri.NEAREST_BY_MAIN_AXIS_FIRST:case ri.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST:l=this.pickNodeMainAxisFirst(e,s===ri.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST);break;case ri.NEAREST_NODE:l=this.pickNodeClosestDatum(e)}if(l)return{pickMode:s,match:l.datum,distance:l.distance}}}}catch(u){a.e(u)}finally{a.f()}}}},{key:"pickNodeExactShape",value:function(e){var t=this.contentGroup.pickNode(e.x,e.y);if(t)return{datum:t.datum,distance:0}}},{key:"pickNodeClosestDatum",value:function(e){throw new Error("AG Charts - Series.pickNodeClosestDatum() not implemented")}},{key:"pickNodeMainAxisFirst",value:function(e,t){throw new Error("AG Charts - Series.pickNodeMainAxisFirst() not implemented")}},{key:"fireNodeClickEvent",value:function(e,t){var n=this.getNodeClickEvent(e,t);this.fireEvent(n)}},{key:"fireNodeDoubleClickEvent",value:function(e,t){var n=this.getNodeDoubleClickEvent(e,t);this.fireEvent(n)}},{key:"getNodeClickEvent",value:function(e,t){return new gi(e,t,this)}},{key:"getNodeDoubleClickEvent",value:function(e,t){return new mi(e,t,this)}},{key:"toggleSeriesItem",value:function(e,t){this.visible=t,this.nodeDataRefresh=!0}},{key:"isEnabled",value:function(){return this.visible}},{key:"fixNumericExtent",value:function(e,t){var n,i=En(e);if(0===i.length)return i;var r=(0,re.Z)(i,2),o=r[0],a=r[1];if(o===a){var s=null!==(n=null===t||void 0===t?void 0:t.calculatePadding(o,a))&&void 0!==n?n:[1,1],l=(0,re.Z)(s,2);o-=l[0],a+=l[1]}return[o,a]}}]),n}(it);Ei.highlightedZIndex=1e12,oi([vt(Ot)],Ei.prototype,"id",void 0),oi([vt(Dt)],Ei.prototype,"_visible",void 0),oi([vt(Dt)],Ei.prototype,"showInLegend",void 0),oi([vt(Ot)],Ei.prototype,"cursor",void 0),oi([vt(mn)],Ei.prototype,"nodeClickRange",void 0),oi([ii({changeValue:function(e,t){this.onSeriesGroupingChange(t,e)}})],Ei.prototype,"seriesGrouping",void 0);var xi=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Ri=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;(0,p.Z)(this,e),this.top=t,this.right=n,this.bottom=i,this.left=r}return(0,f.Z)(e,[{key:"clear",value:function(){this.top=this.right=this.bottom=this.left=0}}]),e}();xi([vt(Bt(0))],Ri.prototype,"top",void 0),xi([vt(Bt(0))],Ri.prototype,"right",void 0),xi([vt(Bt(0))],Ri.prototype,"bottom",void 0),xi([vt(Bt(0))],Ri.prototype,"left",void 0);var Di=function(){function e(){(0,p.Z)(this,e)}return(0,f.Z)(e,null,[{key:"init",value:function(){var e=this,t=window.ResizeObserver;if(t)this.resizeObserver=new t((function(t){var n,i=(0,ne.Z)(t);try{for(i.s();!(n=i.n()).done;){var r=n.value,o=r.contentRect,a=o.width,s=o.height;e.checkSize(e.elements.get(r.target),r.target,a,s)}}catch(l){i.e(l)}finally{i.f()}}));else{this.pollerHandler=window.setInterval((function(){e.elements.forEach((function(t,n){e.checkClientSize(n,t)}))}),100)}this.ready=!0}},{key:"destroy",value:function(){var e;null!=this.pollerHandler&&(clearInterval(this.pollerHandler),this.pollerHandler=void 0),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.resizeObserver=void 0,this.ready=!1}},{key:"checkSize",value:function(e,t,n,i){e&&(e.size&&n===e.size.width&&i===e.size.height||(e.size={width:n,height:i},e.cb(e.size,t)))}},{key:"observe",value:function(e,t){this.ready||this.init(),this.unobserve(e,!1),this.resizeObserver&&this.resizeObserver.observe(e),this.elements.set(e,{cb:t}),this.checkClientSize(e,{cb:t})}},{key:"unobserve",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.resizeObserver&&this.resizeObserver.unobserve(e),this.elements.delete(e),t&&0===this.elements.size&&this.destroy()}},{key:"checkClientSize",value:function(e,t){var n=e.clientWidth?e.clientWidth:0,i=e.clientHeight?e.clientHeight:0;this.checkSize(t,e,n,i)}}]),e}();function Ti(e,t,n,i,r){var o=e.x;e.x<t?o=t:e.x>t+i&&(o=t+i);var a=e.y;e.y<n?a=n:e.y>n+r&&(a=n+r);var s=e.x-o,l=e.y-a;return Math.sqrt(s*s+l*l)<=.5*e.size}function Oi(e,t,n,i,r){var o=e.x+e.width>t&&e.x<t+i,a=e.y+e.height>n&&e.y<n+r;return o&&a}function Pi(e,t,n,i,r){return t+i<e.x+e.width&&t>e.x&&n>e.y&&n+r<e.y+e.height}Di.elements=new Map,Di.ready=!1;var Ai=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))};function Mi(e){return Li((function(e,t){return requestAnimationFrame(e)}),e)}function Ni(e){return Li((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return setTimeout(e,t)}),e)}function Li(e,t){var n,i,r=0,o=!1,a=function(){return o},s=function(){o=!1,null===i||void 0===i||i(),i=void 0,n=void 0,r>0&&e(l)},l=function(){var e=r;r=0,o=!0;var n=t({count:e});n?n.then(s).catch(s):s()};return{schedule:function(t){0!==r||a()||e(l,t),r++},await:function(){return Ai(this,void 0,void 0,(0,ie.Z)().mark((function e(){return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a()){e.next=2;break}return e.abrupt("return");case 2:null==n&&(n=new Promise((function(e){i=e})));case 3:if(!a()){e.next=8;break}return e.next=6,n;case 6:e.next=3;break;case 8:case"end":return e.stop()}}),e)})))}}}function Ii(e){return new Promise((function(t){setTimeout((function(){return t(void 0)}),e)}))}var Fi=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},_i=function(){function e(t,n){(0,p.Z)(this,e),this.renderer=void 0,this.text=void 0,this.className=t,this.parentElement=n}return(0,f.Z)(e,[{key:"show",value:function(e){var t,n,i=this.element;if(i||((i=document.createElement("div")).className=this.className,this.element=i),i.style.position="absolute",i.style.left="".concat(e.x,"px"),i.style.top="".concat(e.y,"px"),i.style.width="".concat(e.width,"px"),i.style.height="".concat(e.height,"px"),this.renderer)i.innerHTML=this.renderer();else{var r=document.createElement("div");r.style.alignItems="center",r.style.boxSizing="border-box",r.style.display="flex",r.style.justifyContent="center",r.style.margin="8px",r.style.height="100%",r.style.font="12px Verdana, sans-serif",r.innerText=null!==(t=this.text)&&void 0!==t?t:"No data to display",i.append(r)}null===(n=this.parentElement)||void 0===n||n.append(i)}},{key:"hide",value:function(){var e;null===(e=this.element)||void 0===e||e.remove(),this.element=void 0}}]),e}();Fi([vt(Rt)],_i.prototype,"renderer",void 0),Fi([vt(Pt)],_i.prototype,"text",void 0);var Gi=(0,f.Z)((function e(t){(0,p.Z)(this,e),this.noData=new _i("ag-chart-no-data-overlay",t)}));function Zi(e,t){var n=ji(e),i=ji(t);if("array"===i){var r=t;return"array"!==n||e.length!==r.length||r.some((function(t,n){var i;return null!=Zi(null===(i=e)||void 0===i?void 0:i[n],t)}))?(0,te.Z)(r):null}if("primitive"===i)return"primitive"!==n?Object.assign({},t):e!==t?t:null;var o,a=e||{},s=t||{},l=new Set([].concat((0,te.Z)(Object.keys(a)),(0,te.Z)(Object.keys(s)))),u=0,c={},d=(0,ne.Z)(l);try{var h=function(){var e=o.value;if(a[e]===s[e])return"continue";var t=function(t){c[e]=t,u++},n=ji(a[e]),i=ji(s[e]);if(n!==i)return t(s[e]),"continue";if("primitive"===i||null===i)return t(s[e]),"continue";if("array"===i&&a[e].length!==s[e].length)return t(s[e]),"continue";if("class-instance"===i)return t(s[e]),"continue";if("function"===i&&a[e]!==s[e])return t(s[e]),"continue";var r=Zi(a[e],s[e]);null!==r&&t(r)};for(d.s();!(o=d.n()).done;)h()}catch(p){d.e(p)}finally{d.f()}return 0===u?null:c}var Vi=Symbol("<delete-property>"),Hi=Symbol("<unspecified-property>");function Bi(e,t){var n,i=null!==(n=null===t||void 0===t?void 0:t.avoidDeepClone)&&void 0!==n?n:[];if(e.map((function(e){return ji(e)})).some((function(e){return"array"===e}))){var r=e[e.length-1];return r instanceof Array?r.map((function(e){var n=ji(e);return"array"===n?Bi([[],e],t):"object"===n?Bi([{},e],t):e})):r}var o,a={},s=new Set(e.map((function(e){return null!=e?Object.keys(e):[]})).reduce((function(e,t){return e.concat(t)}),[])),l=(0,ne.Z)(s);try{var u=function(){var n=o.value,r=e.map((function(e){return null!=e&&"object"===typeof e&&n in e?e[n]:Hi})).filter((function(e){return e!==Hi}));if(0===r.length)return"continue";var s=r[r.length-1];if(s===Vi)return"continue";var l=r.map((function(e){return ji(e)})),u=l[0];if(l.some((function(e){return e!==u})))return a[n]=s,"continue";"array"!==u&&"object"!==u||i.includes(n)?a[n]="array"===u?(0,te.Z)(s):s:a[n]=Bi(r,t)};for(l.s();!(o=l.n()).done;)u()}catch(c){l.e(c)}finally{l.f()}return a}function Wi(e,t){var n,i,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.path,s=void 0===a?void 0:a,l=o.matcherPath,u=void 0===l?s?s.replace(/(\[[0-9+]+\])/i,"[]"):void 0:l,c=o.skip,d=void 0===c?[]:c,h=o.constructors,p=void 0===h?{}:h,f=o.constructedArrays,v=void 0===f?new WeakMap:f,g=o.allowedTypes,m=void 0===g?{}:g,y=o.idx;if(null==e)throw new Error("AG Charts - target is uninitialised: ".concat(null!==s&&void 0!==s?s:"<root>"));if(null==t)return e;var C=e;null!=y&&"_declarationOrder"in C&&(C._declarationOrder=y);var k=ji(e),w=function(a){var l="".concat(u?u+".":"").concat(a);if(d.indexOf(l)>=0)return"continue";var c=t[a],h="".concat(s?s+".":"").concat(a),f=C.constructor,g=C[a],y=null!==(n=p[l])&&void 0!==n?n:p[a];try{var w=ji(g),S=ji(c);if("class-instance"===k&&!(a in e)&&!Object.prototype.hasOwnProperty.call(C,a))return Oe.warn("unable to set [".concat(h,"] in ").concat(null===f||void 0===f?void 0:f.name," - property is unknown")),"continue";var b=null!==(i=m[l])&&void 0!==i?i:[w];if("class-instance"===w&&"object"===S);else if(null!=w&&null!=S&&!b.includes(S))return Oe.warn("unable to set [".concat(h,"] in ").concat(null===f||void 0===f?void 0:f.name," - can't apply type of [").concat(S,"], allowed types are: [").concat(b,"]")),"continue";if("array"===S)if(null!=(y=null!==(r=null!==y&&void 0!==y?y:v.get(g))&&void 0!==r?r:p["".concat(l,"[]")])){var E=c;C[a]=E.map((function(e,t){return Wi(new y,e,Object.assign(Object.assign({},o),{path:h,matcherPath:l+"[]",idx:t}))}))}else C[a]=c;else"class-instance"===S?C[a]=c:"object"===S?null!=g?Wi(g,c,Object.assign(Object.assign({},o),{path:h,matcherPath:l,idx:void 0})):C[a]=null!=y?Wi(new y,c,Object.assign(Object.assign({},o),{path:h,matcherPath:l,idx:void 0})):c:C[a]=c}catch(x){return Oe.warn("unable to set [".concat(h,"] in [").concat(null===f||void 0===f?void 0:f.name,"]; nested error is: ").concat(x.message)),"continue"}};for(var S in t)w(S);return e}function zi(e,t,n){for(var i=arguments.length,r=new Array(i>3?i-3:0),o=3;o<i;o++)r[o-3]=arguments[o];var a,s=ji(e),l=null!==(a=n.skip)&&void 0!==a?a:[];if("array"!==s){if("object"===s){t.apply(void 0,[s,e].concat(r));var u=function(i){if(l.indexOf(i)>=0)return"continue";var o=e[i],a=null===r||void 0===r?void 0:r.map((function(e){return null===e||void 0===e?void 0:e[i]})),s=ji(o);"object"!==s&&"array"!==s||zi.apply(void 0,[o,t,n].concat((0,te.Z)(a)))};for(var c in e)u(c)}}else e.forEach((function(e,i){zi.apply(void 0,[e,t,n].concat((0,te.Z)((null!==r&&void 0!==r?r:[]).map((function(e){return null===e||void 0===e?void 0:e[i]})))))}))}var Ui="undefined"!==typeof window;function ji(e){return null==e?null:Ui&&e instanceof HTMLElement?"primitive":e instanceof Array?"array":e instanceof Date?"primitive":"object"===typeof e&&e.constructor===Object?"object":"function"===typeof e?"function":"object"===typeof e&&null!=e.constructor?"class-instance":"primitive"}var Ki=function(){function e(){(0,p.Z)(this,e),this.registeredListeners={}}return(0,f.Z)(e,[{key:"addListener",value:function(e,t){var n,i=Symbol(e);return this.registeredListeners[e]||(this.registeredListeners[e]=[]),null===(n=this.registeredListeners[e])||void 0===n||n.push({symbol:i,handler:t}),i}},{key:"dispatch",value:function(e){for(var t,n=null!==(t=this.registeredListeners[e])&&void 0!==t?t:[],i=[],r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];var s,l=(0,ne.Z)(n);try{for(l.s();!(s=l.n()).done;){var u=s.value;try{i.push(u.handler.apply(u,o))}catch(c){Oe.errorOnce(c),i.push(void 0)}}}catch(d){l.e(d)}finally{l.f()}return i}},{key:"cancellableDispatch",value:function(e,t){for(var n,i=null!==(n=this.registeredListeners[e])&&void 0!==n?n:[],r=[],o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];var l,u=(0,ne.Z)(i);try{for(u.s();!(l=u.n()).done;){var c=l.value;if(t())break;r.push(c.handler.apply(c,a))}}catch(d){u.e(d)}finally{u.f()}return r}},{key:"reduceDispatch",value:function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];var o,a,s=null!==(o=this.registeredListeners[e])&&void 0!==o?o:[],l=void 0,u=(0,ne.Z)(s);try{for(u.s();!(a=u.n()).done;){var c=a.value;l=c.handler.apply(c,(0,te.Z)(i)),i=t.apply(void 0,[l].concat((0,te.Z)(i)))}}catch(d){u.e(d)}finally{u.f()}return l}},{key:"removeListener",value:function(e){for(var t in this.registeredListeners){var n=this.registeredListeners[t],i=null===n||void 0===n?void 0:n.findIndex((function(t){return t.symbol===e}));null!=i&&i>=0&&(null===n||void 0===n||n.splice(i,1)),null!=i&&0===(null===n||void 0===n?void 0:n.length)&&delete this.registeredListeners[t]}}}]),e}(),Yi=function(){function e(){(0,p.Z)(this,e),this.listeners=new Ki}return(0,f.Z)(e,[{key:"addListener",value:function(e,t){return this.listeners.addListener(e,t)}},{key:"removeListener",value:function(e){this.listeners.removeListener(e)}}]),e}();function Xi(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function qi(e,t){if("string"===typeof e)try{e=dt.fromString(e)}catch(a){e=dt.fromArray([0,0,0])}if("string"===typeof t)try{t=dt.fromString(t)}catch(a){t=dt.fromArray([0,0,0])}var n=Xi(e.r,t.r),i=Xi(e.g,t.g),r=Xi(e.b,t.b),o=Xi(e.a,t.a);return function(e){return dt.fromArray([n(e),i(e),r(e),o(e)]).toRgbaString()}}function Qi(e,t){var n=typeof t;if("number"===n)return Xi(e,t);if("string"===n)try{return qi(e,t=dt.fromString(t))}catch(i){}throw new Error("Unable to interpolate values")}function Ji(e){return function(t){var n=Qi(t.from,t.to);return function(t){return n(e(t))}}}function $i(e){return Qi(e.from,e.to)}var er,tr=Ji((function(e){return 1-Math.cos(e*Math.PI/2)})),nr=Ji((function(e){return Math.sin(e*Math.PI/2)})),ir=Ji((function(e){return-(Math.cos(e*Math.PI)-1)/2})),rr=Ji((function(e){if(0===e||1===e)return e;var t=Math.pow(2,-10*e),n=10*e-.75,i=2*Math.PI/3;return t*Math.sin(n*i)+1}));function or(e){var t,n=e.driver,i=e.duration,r=e.from,o=e.to,a=e.autoplay,s=void 0===a||a,l=e.delay,u=void 0===l?0:l,c=e.ease,d=void 0===c?$i:c,h=e.repeat,p=void 0===h?0:h,f=e.repeatType,v=void 0===f?er.Loop:f,g=e.onComplete,m=e.onPlay,y=e.onRepeat,C=e.onStop,k=e.onUpdate,w=0,S=0,b=0,E=!0,x=!1,R=d({from:r,to:o}),D={isPlaying:!1,play:O,pause:function(){return D.isPlaying=!1,D},stop:P,reset:function(){return x=!1,S=0,b=0,T.reset(),D}},T=n((function(e){E||(e=-e);if(!(w>=u))return void(w+=e);S+=e;x||(t=R(Math.min(1,Math.max(0,S/i))),x=E?S>=i:S<=0);null===k||void 0===k||k(t),x&&(b<p?function(){b++,v===er.Reverse?S=(E=b%2===0)?S%i:i-S%i:S%=i;x=!1,null===y||void 0===y||y()}():(P(),null===g||void 0===g||g()))}));function O(){return D.isPlaying=!0,T.start(),null===m||void 0===m||m(),D}function P(){return D.isPlaying=!1,T.stop(),null===C||void 0===C||C(),D}return s&&O(),D}!function(e){e.Loop="loop",e.Reverse="reverse"}(er||(er={}));var ar=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n},sr=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i;return(0,p.Z)(this,n),(i=t.call(this)).controllers={},i.throttles={},i.throttleGroups=new Set,i.updaters=[],i.isPlaying=!1,i.readyToPlay=!1,i.defaultOptions={},i.skipAnimations=!1,i.debug=!1,i.interactionManager=e,window.addEventListener("DOMContentLoaded",(function(){i.readyToPlay=!0})),setTimeout((function(){i.readyToPlay=!0}),10),i}return(0,f.Z)(n,[{key:"play",value:function(){if(!this.isPlaying){for(var e in this.isPlaying=!0,this.debug&&Oe.debug("AnimationManager.play()"),this.controllers)this.controllers[e].play();this.startAnimationCycle()}}},{key:"pause",value:function(){if(this.isPlaying)for(var e in this.isPlaying=!1,this.cancelAnimationFrame(),this.debug&&Oe.debug("AnimationManager.pause()"),this.controllers)this.controllers[e].pause()}},{key:"stop",value:function(){for(var e in this.isPlaying=!1,this.cancelAnimationFrame(),this.debug&&Oe.debug("AnimationManager.stop()"),this.controllers)this.controllers[e].stop()}},{key:"reset",value:function(){this.isPlaying?(this.stop(),this.play()):this.stop()}},{key:"animate",value:function(e,t){var n,i,r=t.disableInteractions,o=void 0===r||r,a=ar(t,["disableInteractions"]);if(!this.skipAnimations){var s=Object.assign(Object.assign({},a),{autoplay:!!this.isPlaying&&a.autoplay,driver:this.createDriver(e,o)});this.controllers[e]&&this.controllers[e].stop();var l=or(s);return this.controllers[e]=l,null===(i=a.onUpdate)||void 0===i||i.call(a,a.from),l}null===(n=a.onUpdate)||void 0===n||n.call(a,a.to)}},{key:"animateMany",value:function(e,t,n){var i;if(this.skipAnimations){var r=t.map((function(e){return e.to}));return n.onUpdate(r),void(null===(i=n.onComplete)||void 0===i||i.call(n))}var o,a=t.map((function(e){return e.from})),s=0,l=0,u=0,c=0,d=function(e){return function(i){var r;a[e]=i,++u>=t.length&&(null===(r=n.onUpdate)||void 0===r||r.call(n,a),u=0)}},h=function(){var e;++s>=t.length&&(null===(e=n.onPlay)||void 0===e||e.call(n))},p=function(){var e;++l>=t.length&&(null===(e=n.onStop)||void 0===e||e.call(n))},f=function(){var e;++c>=t.length&&(null===(e=n.onComplete)||void 0===e||e.call(n))},v=0,g=(0,ne.Z)(t);try{for(g.s();!(o=g.n()).done;){var m=o.value,y="".concat(e,"-").concat(v);this.animate(y,Object.assign(Object.assign(Object.assign({},n),m),{onUpdate:d(v),onPlay:h,onStop:p,onComplete:f})),v++}}catch(C){g.e(C)}finally{g.f()}}},{key:"animateWithThrottle",value:function(e,t){var n,i=null!==(n=t.throttleId)&&void 0!==n?n:e;this.throttles[i]&&t.duration&&Date.now()-this.throttles[i]<t.duration&&(t.delay=0,t.duration=1),this.throttles[e]=Date.now(),this.animate(e,Object.assign({},t))}},{key:"animateManyWithThrottle",value:function(e,t,n){var i,r=this,o=n.throttleGroup,a=null!==(i=n.throttleId)&&void 0!==i?i:e,s=Date.now(),l=this.throttles[a]&&n.duration&&s-this.throttles[a]<n.duration,u=o&&this.throttleGroups.has(o);l&&!u&&(n.delay=0,n.duration=1),!l&&o&&this.throttleGroups.add(o);return this.throttles[a]=s,this.animateMany(e,t,Object.assign(Object.assign({},n),{onStop:function(){var e;o&&r.throttleGroups.delete(o),null===(e=n.onStop)||void 0===e||e.call(n)}}))}},{key:"tween",value:function(e){var t="tween-".concat(btoa(JSON.stringify(e)));return function(e){var t,n=Object.assign(Object.assign({},e),{autoplay:!1,onUpdate:function(e){null===t||void 0===t||t(e)}}),i=or(n),r={start:function(e){return i.stop(),i.reset(),i.play(),t=e,r},stop:function(){return i.stop(),r}};return r}(Object.assign(Object.assign({},e),{driver:this.createDriver(t)}))}},{key:"createDriver",value:function(e,t){var n=this;return function(i){return{start:function(){n.updaters.push([e,i]),null==n.requestId&&n.startAnimationCycle(),t&&n.interactionManager.pause("animation_".concat(e))},stop:function(){delete n.controllers[e],n.updaters=n.updaters.filter((function(t){return(0,re.Z)(t,1)[0]!==e})),n.updaters.length<=0&&n.cancelAnimationFrame(),t&&n.interactionManager.resume("animation_".concat(e))},reset:function(){}}}}},{key:"startAnimationCycle",value:function(){var e=this;if(0!==this.updaters.length){this.requestId=requestAnimationFrame((function t(n){if(e.requestId=requestAnimationFrame(t),e.readyToPlay){void 0===e.lastTime&&(e.lastTime=n);var i=n-e.lastTime;e.lastTime=n,e.debug&&Oe.debug("AnimationManager - frame()",{updaterCount:e.updaters.length}),e.updaters.forEach((function(e){var t=(0,re.Z)(e,2);t[0];return(0,t[1])(i)})),e.listeners.dispatch("animation-frame",{type:"animation-frame",deltaMs:i})}}))}}},{key:"cancelAnimationFrame",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){this.requestId&&(cancelAnimationFrame(this.requestId),this.requestId=void 0,this.lastTime=void 0)}))}]),n}(Yi),lr=function(){function e(t){(0,p.Z)(this,e),this.states={},this.element=t}return(0,f.Z)(e,[{key:"updateCursor",value:function(e,t){delete this.states[e],null!=t&&(this.states[e]={style:t}),this.applyStates()}},{key:"applyStates",value:function(){var e="default";Object.entries(this.states).reverse().slice(0,1).forEach((function(t){var n=(0,re.Z)(t,2),i=(n[0],n[1].style);return e=i})),this.element.style.cursor=e}}]),e}(),ur=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n,[{key:"legendItemClick",value:function(e,t,n,i){var r={type:"legend-item-click",series:e,itemId:t,enabled:n,legendItemName:i};this.listeners.dispatch("legend-item-click",r)}},{key:"legendItemDoubleClick",value:function(e,t,n,i,r){var o={type:"legend-item-double-click",series:e,itemId:t,enabled:n,legendItemName:r,numVisibleItems:i};this.listeners.dispatch("legend-item-double-click",o)}},{key:"axisHover",value:function(e,t){var n={type:"axis-hover",axisId:e,direction:t};this.listeners.dispatch("axis-hover",n)}}]),n}(Yi);var cr=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.call(this)).states={},e.activeHighlight=void 0,e}return(0,f.Z)(n,[{key:"updateHighlight",value:function(e,t){delete this.states[e],null!=t&&(this.states[e]={highlightedDatum:t}),this.applyStates()}},{key:"getActiveHighlight",value:function(){return this.activeHighlight}},{key:"applyStates",value:function(){var e,t,n=this.activeHighlight,i=void 0;if(Object.entries(this.states).reverse().slice(0,1).forEach((function(e){var t=(0,re.Z)(e,2),n=(t[0],t[1].highlightedDatum);return i=n})),this.activeHighlight=i,e=n,t=this.activeHighlight,!(e===t||(null===e||void 0===e?void 0:e.series)===(null===t||void 0===t?void 0:t.series)&&(null===e||void 0===e?void 0:e.itemId)===(null===t||void 0===t?void 0:t.itemId)&&(null===e||void 0===e?void 0:e.datum)===(null===t||void 0===t?void 0:t.datum))){var r={type:"highlight-change",previousHighlight:n,currentHighlight:this.activeHighlight};this.listeners.dispatch("highlight-change",r)}}}]),n}(Yi),dr=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))},hr=["pagehide","mousemove","mouseup","wheel"],pr=["click","dblclick","contextmenu","mousedown","mouseout","mouseenter","touchstart","touchmove","touchend","touchcancel"],fr="\n.ag-chart-wrapper {\n    touch-action: none;\n}\n",vr=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;(0,p.Z)(this,n),(i=t.call(this)).eventHandler=function(e){return i.processEvent(e)},i.mouseDown=!1,i.touchDown=!1,i.enabled=!0,i.pausers=[],i.rootElement=r.body,i.element=e;var o,a=(0,ne.Z)(pr);try{for(a.s();!(o=a.n()).done;){var s=o.value;s.startsWith("touch")?e.addEventListener(s,i.eventHandler,{passive:!0}):e.addEventListener(s,i.eventHandler)}}catch(h){a.e(h)}finally{a.f()}var l,u=(0,ne.Z)(hr);try{for(u.s();!(l=u.n()).done;){var c=l.value;"wheel"===c?window.addEventListener(c,i.eventHandler,{passive:!1}):window.addEventListener(c,i.eventHandler)}}catch(h){u.e(h)}finally{u.f()}if(n.interactionDocuments.indexOf(r)<0){var d=document.createElement("style");d.innerHTML=fr,document.head.insertBefore(d,document.head.querySelector("style")),n.interactionDocuments.push(r)}return i}return(0,f.Z)(n,[{key:"destroy",value:function(){var e,t=(0,ne.Z)(hr);try{for(t.s();!(e=t.n()).done;){var n=e.value;window.removeEventListener(n,this.eventHandler)}}catch(a){t.e(a)}finally{t.f()}var i,r=(0,ne.Z)(pr);try{for(r.s();!(i=r.n()).done;){var o=i.value;this.element.removeEventListener(o,this.eventHandler)}}catch(a){r.e(a)}finally{r.f()}}},{key:"resume",value:function(e){return this.pausers=this.pausers.filter((function(t){return t!==e})),this.enabled=this.pausers.length<=0,this.enabled}},{key:"pause",value:function(e){this.enabled=!1,this.pausers.push(e)}},{key:"processEvent",value:function(e){var t=this.decideInteractionEventTypes(e);t.length>0&&this.enabled&&this.dispatchEvent(e,t).catch((function(e){return Oe.errorOnce(e)}))}},{key:"dispatchEvent",value:function(e,t){return dr(this,void 0,void 0,(0,ie.Z)().mark((function n(){var i,r,o,a,s=this;return(0,ie.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(null!=(i=this.calculateCoordinates(e))){n.next=3;break}return n.abrupt("return");case 3:r=(0,ne.Z)(t);try{for(a=function(){var t=o.value,n=s.buildEvent(Object.assign(Object.assign({event:e},i),{type:t}));s.listeners.cancellableDispatch(t,(function(){return n.consumed}),n)},r.s();!(o=r.n()).done;)a()}catch(l){r.e(l)}finally{r.f()}case 5:case"end":return n.stop()}}),n,this)})))}},{key:"decideInteractionEventTypes",value:function(e){switch(e.type){case"click":return["click"];case"dblclick":return["dblclick"];case"contextmenu":return["contextmenu"];case"mousedown":return this.mouseDown=!0,this.dragStartElement=e.target,["drag-start"];case"touchstart":return this.touchDown=!0,this.dragStartElement=e.target,["drag-start"];case"touchmove":case"mousemove":return this.mouseDown||this.touchDown||this.isEventOverElement(e)?this.mouseDown||this.touchDown?["drag"]:["hover"]:[];case"mouseup":return this.mouseDown||this.isEventOverElement(e)?(this.mouseDown=!1,this.dragStartElement=void 0,["drag-end"]):[];case"touchend":return this.touchDown||this.isEventOverElement(e)?(this.touchDown=!1,this.dragStartElement=void 0,["drag-end"]):[];case"mouseout":case"touchcancel":return["leave"];case"mouseenter":var t=e instanceof MouseEvent&&1===(1&e.buttons);return this.mouseDown!==t?(this.mouseDown=t,[t?"drag-start":"drag-end"]):[];case"pagehide":return["page-left"];case"wheel":return["wheel"]}return[]}},{key:"isEventOverElement",value:function(e){var t;return e.target===this.element||(null===(t=e.target)||void 0===t?void 0:t.parentElement)===this.element}},{key:"calculateCoordinates",value:function(e){var t;if(e instanceof MouseEvent){var i=e.clientX,r=e.clientY,o=e.pageX,a=e.pageY,s=e.offsetX,l=e.offsetY;return this.fixOffsets(e,{clientX:i,clientY:r,pageX:o,pageY:a,offsetX:s,offsetY:l})}if("undefined"!==typeof TouchEvent&&e instanceof TouchEvent){var u=null!==(t=e.touches[0])&&void 0!==t?t:e.changedTouches[0],c=u.clientX,d=u.clientY,h=u.pageX,p=u.pageY;return Object.assign(Object.assign({},n.NULL_COORDS),{clientX:c,clientY:d,pageX:h,pageY:p})}if(e instanceof PageTransitionEvent){if(e.persisted)return;return n.NULL_COORDS}}},{key:"fixOffsets",value:function(e,t){var n=function(e){for(var t=0,n=0;e;)t+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{x:t,y:n}};if(null!=this.dragStartElement&&e.target!==this.dragStartElement){var i=n(this.dragStartElement),r=n(e.target);t.offsetX-=i.x-r.x,t.offsetY-=i.y-r.y}return t}},{key:"buildEvent",value:function(e){var t=e.type,n=e.event,i=e.clientX,r=e.clientY,o=e.offsetX,a=e.offsetY,s=e.pageX,l=e.pageY;if(!ct(o)||!ct(a)){var u=this.element.getBoundingClientRect();o=i-u.left,a=r-u.top}if(!ct(s)||!ct(l)){var c=this.rootElement.getBoundingClientRect();s=i-c.left,l=r-c.top}var d={type:t,offsetX:o,offsetY:a,pageX:s,pageY:l,sourceEvent:n,consumed:!1,consume:function(){return d.consumed=!0}};return d}}]),n}(Yi);vr.interactionDocuments=[],vr.NULL_COORDS={clientX:-1/0,clientY:-1/0,pageX:-1/0,pageY:-1/0,offsetX:-1/0,offsetY:-1/0};var gr=function(){function e(t,n){var i=this;(0,p.Z)(this,e),this.states={},this.exclusiveAreas={},this.destroyFns=[],this.tooltip=t;var r=n.addListener("hover",(function(e){return i.checkExclusiveRects(e)}));this.destroyFns.push((function(){return n.removeListener(r)}))}return(0,f.Z)(e,[{key:"updateTooltip",value:function(e,t,n){var i;null==n&&(n=null===(i=this.states[e])||void 0===i?void 0:i.content),this.states[e]={content:n,meta:t},this.applyStates()}},{key:"updateExclusiveRect",value:function(e,t){t?this.exclusiveAreas[e]=t:delete this.exclusiveAreas[e]}},{key:"removeTooltip",value:function(e){delete this.states[e],this.applyStates()}},{key:"getTooltipMeta",value:function(e){var t;return null===(t=this.states[e])||void 0===t?void 0:t.meta}},{key:"destroy",value:function(){var e,t=(0,ne.Z)(this.destroyFns);try{for(t.s();!(e=t.n()).done;){(0,e.value)()}}catch(n){t.e(n)}finally{t.f()}}},{key:"checkExclusiveRects",value:function(e){for(var t,n=0,i=Object.entries(this.exclusiveAreas);n<i.length;n++){var r=(0,re.Z)(i[n],2),o=r[0];if(r[1].containsPoint(e.offsetX,e.offsetY)){t=o;break}}t!==this.appliedExclusiveArea&&(this.appliedExclusiveArea=t,this.applyStates())}},{key:"applyStates",value:function(){var e,t=this,n=this.appliedExclusiveArea?[this.appliedExclusiveArea]:Object.keys(this.states),i=void 0,r=void 0;if(n.reverse(),n.slice(0,1).forEach((function(e){var n,o=null!==(n=t.states[e])&&void 0!==n?n:{},a=o.content,s=o.meta;i=a,r=s})),void 0===r||void 0===i)return this.appliedState=void 0,void this.tooltip.toggle(!1);if((null===(e=this.appliedState)||void 0===e?void 0:e.content)===i){var o=this.tooltip.isVisible();this.tooltip.show(r,void 0,o)}else this.tooltip.show(r,i);this.appliedState={content:i,meta:r}}}]),e}(),mr=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).axes={},e}return(0,f.Z)(n,[{key:"updateAxes",value:function(e){var t=this,n=new Set(Object.keys(this.axes));e.forEach((function(e){var i,r,o;n.delete(e.id),null!==(i=(r=t.axes)[o=e.id])&&void 0!==i||(r[o]=new yr(e))})),n.forEach((function(e){delete t.axes[e]})),this.initialZoom&&(this.updateZoom(this.initialZoom.callerId,this.initialZoom.newZoom),this.initialZoom=void 0)}},{key:"updateZoom",value:function(e,t){0!==Object.keys(this.axes).length?(Object.values(this.axes).forEach((function(n){n.updateZoom(e,null===t||void 0===t?void 0:t[n.getDirection()])})),this.applyStates()):this.initialZoom={callerId:e,newZoom:t}}},{key:"updateAxisZoom",value:function(e,t,n){var i;null===(i=this.axes[t])||void 0===i||i.updateZoom(e,n),this.applyStates()}},{key:"getZoom",value:function(){var e,t;if(Object.values(this.axes).forEach((function(n){n.getDirection()===Qt.X?e=n.getZoom():n.getDirection()===Qt.Y&&(t=n.getZoom())})),e||t)return{x:e,y:t}}},{key:"getAxisZoom",value:function(e){var t;return null===(t=this.axes[e])||void 0===t?void 0:t.getZoom()}},{key:"getAxisZooms",value:function(){for(var e={},t=0,n=Object.entries(this.axes);t<n.length;t++){var i=(0,re.Z)(n[t],2),r=i[0],o=i[1];e[r]={direction:o.getDirection(),zoom:o.getZoom()}}return e}},{key:"applyStates",value:function(){var e=Object.values(this.axes).map((function(e){return e.applyStates()})).some(Boolean);if(e){for(var t=this.getZoom(),n={},i=0,r=Object.entries(this.axes);i<r.length;i++){var o=(0,re.Z)(r[i],2),a=o[0],s=o[1];n[a]=s.getZoom()}var l=Object.assign(Object.assign({type:"zoom-change"},null!==t&&void 0!==t?t:{}),{axes:n});this.listeners.dispatch("zoom-change",l)}}}]),n}(Yi),yr=function(){function e(t){(0,p.Z)(this,e),this.states={},this.currentZoom=void 0,this.axis=t}return(0,f.Z)(e,[{key:"getDirection",value:function(){return this.axis.direction}},{key:"updateZoom",value:function(e,t){delete this.states[e],null!=t&&(this.states[e]=Object.assign({},t))}},{key:"getZoom",value:function(){return this.currentZoom}},{key:"applyStates",value:function(){var e,t,n=this.currentZoom,i=Object.keys(this.states)[Object.keys(this.states).length-1];return this.currentZoom=Object.assign({},this.states[i]),(null===n||void 0===n?void 0:n.min)!==(null===(e=this.currentZoom)||void 0===e?void 0:e.min)||(null===n||void 0===n?void 0:n.max)!==(null===(t=this.currentZoom)||void 0===t?void 0:t.max)}}]),e}();var Cr,kr=function(){function e(){(0,p.Z)(this,e),this.layoutProcessors=new Ki,this.listeners=new Ki}return(0,f.Z)(e,[{key:"addListener",value:function(e,t){if("layout-complete"!==e)return this.layoutProcessors.addListener(e,t);if(function(e){return"layout-complete"===e}(e))return this.listeners.addListener(e,t);throw new Error("AG Charts - unsupported listener type: "+e)}},{key:"removeListener",value:function(e){this.listeners.removeListener(e),this.layoutProcessors.removeListener(e)}},{key:"dispatchPerformLayout",value:function(e,t){var n=this.layoutProcessors.reduceDispatch(e,(function(e,t){var n=e.shrinkRect;return[Object.assign(Object.assign({},t),{shrinkRect:n})]}),t);return null!==n&&void 0!==n?n:t}},{key:"dispatchLayoutComplete",value:function(e){this.listeners.dispatch("layout-complete",e)}}]),e}(),wr=(0,f.Z)((function e(t){(0,p.Z)(this,e),this.getSeries=t}));!function(e){e[e.FULL=0]="FULL",e[e.PROCESS_DATA=1]="PROCESS_DATA",e[e.PERFORM_LAYOUT=2]="PERFORM_LAYOUT",e[e.SERIES_UPDATE=3]="SERIES_UPDATE",e[e.TOOLTIP_RECALCULATION=4]="TOOLTIP_RECALCULATION",e[e.SCENE_RENDER=5]="SCENE_RENDER",e[e.NONE=6]="NONE"}(Cr||(Cr={}));var Sr=function(){function e(t){(0,p.Z)(this,e),this.updateCallback=t}return(0,f.Z)(e,[{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Cr.FULL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.forceNodeDataRefresh,i=void 0!==n&&n;this.updateCallback(e,{forceNodeDataRefresh:i})}}]),e}(),br=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Er=(0,f.Z)((function e(){(0,p.Z)(this,e),this.range="tooltip"}));br([vt(Xt("tooltip","node"))],Er.prototype,"range",void 0);var xr,Rr=function(){function e(t,n){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];(0,p.Z)(this,e),this._nodes=[],this._data=[],this._datumNodeIndices=new Map,this._garbage=[],this._garbageCollection=!0,this._parent=t,this._factory=Object.prototype.isPrototypeOf.call(Ee,n)?function(){return new n}:n,this._garbageCollection=i}return(0,f.Z)(e,[{key:"each",value:function(e){return this._nodes.forEach((function(t,n){return e(t,t.datum,n)})),this}},{key:"update",value:function(e,t,n){var i=this,r=this._data,o=this._parent,a=this._factory,s=new Map;if(n?e.forEach((function(e,r){var l=n(e);if(s.set(l,r),!i._datumNodeIndices.has(l)){var u=a(e);u.datum=e,null===t||void 0===t||t(u),o.appendChild(u),i._nodes.push(u),i._datumNodeIndices.set(l,i._nodes.length-1)}})):e.length>r.length?e.slice(r.length).forEach((function(e){var n=a(e);n.datum=e,null===t||void 0===t||t(n),o.appendChild(n),i._nodes.push(n)})):e.length<r.length&&this._nodes.splice(e.length).forEach((function(e){o.removeChild(e)})),this._data=e.slice(0),n){var l,u=(0,ne.Z)(this._datumNodeIndices);try{for(u.s();!(l=u.n()).done;){var c=(0,re.Z)(l.value,2),d=c[0],h=c[1],p=s.get(d);void 0!==p?this._nodes[h].datum=e[p]:this._garbage.push(d)}}catch(v){u.e(v)}finally{u.f()}this._garbageCollection&&this.cleanup()}else for(var f=0;f<e.length;f++)this._nodes[f].datum=this._data[f];return this}},{key:"clear",value:function(){return this.update([]),this}},{key:"cleanup",value:function(){var e=this;if(0!==this._garbage.length){this._garbage.forEach((function(t){var n=e._datumNodeIndices.get(t);if(void 0!==n){var i=e._nodes[n];delete e._nodes[n],e._datumNodeIndices.delete(t),i&&e._parent.removeChild(i)}}));var t,n=0,i=this._datumNodeIndices.entries(),r=new Map,o=(0,ne.Z)(i);try{for(o.s();!(t=o.n()).done;){var a=(0,re.Z)(t.value,2),s=a[0],l=a[1];r.set(l,s)}}catch(u){o.e(u)}finally{o.f()}this._nodes=this._nodes.filter((function(t,i){if(void 0===t)return!1;var o=r.get(i);return e._datumNodeIndices.set(o,n),n++,!0})),this._garbage=[]}}},{key:"select",value:function(t){return e.selectAll(this._parent,t)}},{key:"selectByClass",value:function(e){return this.select((function(t){return t instanceof e}))}},{key:"selectByTag",value:function(e){return this.select((function(t){return t.tag===e}))}},{key:"nodes",value:function(){return this._nodes}}],[{key:"select",value:function(t,n){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return new e(t,n,i)}},{key:"selectAll",value:function(e,t){var n=[];return function e(i){t(i)&&n.push(i),i.children.forEach(e)}(e),n}},{key:"selectByClass",value:function(t,n){return e.selectAll(t,(function(e){return e instanceof n}))}},{key:"selectByTag",value:function(t,n){return e.selectAll(t,(function(e){return e.tag===n}))}}]),e}();function Dr(e,t,n,i){if(0===e)return function(e,t,n){if(0===e)return function(e,t){var n=-t/e;return 0!==e&&n>=0&&n<=1?[n]:[]}(t,n);var i=t*t-4*e*n,r=[];if(0===i){var o=-t/(2*e);o>=0&&o<=1&&r.push(o)}else if(i>0){var a=Math.sqrt(i),s=(-t-a)/(2*e),l=(-t+a)/(2*e);s>=0&&s<=1&&r.push(s),l>=0&&l<=1&&r.push(l)}return r}(t,n,i);var r=t/e,o=n/e,a=(3*o-r*r)/9,s=(9*r*o-27*(i/e)-2*r*r*r)/54,l=a*a*a+s*s,u=1/3,c=[];if(l>=0){var d=Math.sqrt(l),h=Math.sign(s+d)*Math.pow(Math.abs(s+d),u),p=Math.sign(s-d)*Math.pow(Math.abs(s-d),u),f=Math.abs(Math.sqrt(3)*(h-p)/2),v=-u*r+(h+p);if(v>=0&&v<=1&&c.push(v),0===f){var g=-u*r-(h+p)/2;g>=0&&g<=1&&c.push(g)}}else{var m=Math.acos(s/Math.sqrt(-a*a*a)),y=u*r,C=2*Math.sqrt(-a),k=C*Math.cos(u*m)-y,w=C*Math.cos(u*(m+2*Math.PI))-y,S=C*Math.cos(u*(m+4*Math.PI))-y;k>=0&&k<=1&&c.push(k),w>=0&&w<=1&&c.push(w),S>=0&&S<=1&&c.push(S)}return c}function Tr(e,t,n,i,r,o,a,s){var l=(n-e)*(s-o)-(i-t)*(a-r);if(0===l)return null;var u=((a-r)*(t-o)-(e-r)*(s-o))/l,c=((n-e)*(t-o)-(i-t)*(e-r))/l;return u>=0&&u<=1&&c>=0&&c<=1?{x:e+u*(n-e),y:t+u*(i-t)}:null}function Or(e,t,n,i,r,o,a,s,l,u,c,d){var h,p=[],f=u-d,v=c-l,g=l*(d-u)-u*(c-l),m=Pr(e,n,r,a),y=Pr(t,i,o,s),C=Dr(f*m[0]+v*y[0],f*m[1]+v*y[1],f*m[2]+v*y[2],f*m[3]+v*y[3]+g),k=(0,ne.Z)(C);try{for(k.s();!(h=k.n()).done;){var w=h.value,S=w*w,b=w*S,E=m[0]*b+m[1]*S+m[2]*w+m[3],x=y[0]*b+y[1]*S+y[2]*w+y[3],R=void 0;(R=l!==c?(E-l)/(c-l):(x-u)/(d-u))>=0&&R<=1&&p.push({x:E,y:x})}}catch(D){k.e(D)}finally{k.f()}return p}function Pr(e,t,n,i){return[3*t-e-3*n+i,3*e-6*t+3*n,-3*e+3*t,e]}function Ar(e,t,n,i,r,o,a,s,l,u){var c=(u-s)/(l-a),d=s-c*a,h=Math.pow(c,2)+1,p=2*(c*(d-t)-e),f=Math.pow(e,2)+Math.pow(d-t,2)-Math.pow(n,2),v=Math.pow(p,2)-4*h*f;if(v<0)return[];var g=(-p+Math.sqrt(v))/2/h,m=(-p-Math.sqrt(v))/2/h,y=[];return[g,m].forEach((function(e){if(e>=Math.min(a,l)&&e<=Math.max(a,l)){var t=c*e,n=Ze(o?r:i),s=Ze(o?i:r),u=Ze(Math.atan2(t,e));s<=n&&(s+=2*Math.PI),u<n&&(u+=2*Math.PI),u>=n&&u<=s&&y.push({x:e,y:t})}})),y}!function(e){e[e.Move=0]="Move",e[e.Line=1]="Line",e[e.Arc=2]="Arc",e[e.Curve=3]="Curve",e[e.ClosePath=4]="ClosePath"}(xr||(xr={}));var Mr=function(){function e(){(0,p.Z)(this,e),this.previousCommands=[],this.previousParams=[],this.previousClosedPath=!1,this.commands=[],this.params=[],this._closedPath=!1}return(0,f.Z)(e,[{key:"isDirty",value:function(){if(this._closedPath!==this.previousClosedPath)return!0;if(this.previousCommands.length!==this.commands.length)return!0;if(this.previousParams.length!==this.params.length)return!0;for(var e=0;e<this.commands.length;e++)if(this.commands[e]!==this.previousCommands[e])return!0;for(var t=0;t<this.params.length;t++)if(this.params[t]!==this.previousParams[t])return!0;return!1}},{key:"draw",value:function(e){var t=this.commands,n=this.params,i=0;e.beginPath();var r,o=(0,ne.Z)(t);try{for(o.s();!(r=o.n()).done;){switch(r.value){case xr.Move:e.moveTo(n[i++],n[i++]);break;case xr.Line:e.lineTo(n[i++],n[i++]);break;case xr.Curve:e.bezierCurveTo(n[i++],n[i++],n[i++],n[i++],n[i++],n[i++]);break;case xr.Arc:e.arc(n[i++],n[i++],n[i++],n[i++],n[i++],1===n[i++]);break;case xr.ClosePath:e.closePath()}}}catch(a){o.e(a)}finally{o.f()}0===t.length&&e.closePath()}},{key:"moveTo",value:function(e,t){this.xy?(this.xy[0]=e,this.xy[1]=t):this.xy=[e,t],this.commands.push(xr.Move),this.params.push(e,t)}},{key:"lineTo",value:function(e,t){this.xy?(this.commands.push(xr.Line),this.params.push(e,t),this.xy[0]=e,this.xy[1]=t):this.moveTo(e,t)}},{key:"rect",value:function(e,t,n,i){this.moveTo(e,t),this.lineTo(e+n,t),this.lineTo(e+n,t+i),this.lineTo(e,t+i),this.closePath()}},{key:"arc",value:function(e,t,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=e+n*Math.cos(r),s=t+n*Math.sin(r);this.xy?(this.xy[0]=a,this.xy[1]=s):this.xy=[a,s],this.commands.push(xr.Arc),this.params.push(e,t,n,i,r,o?1:0)}},{key:"cubicCurveTo",value:function(e,t,n,i,r,o){this.xy||this.moveTo(e,t),this.commands.push(xr.Curve),this.params.push(e,t,n,i,r,o),this.xy&&(this.xy[0]=r,this.xy[1]=o)}},{key:"closedPath",get:function(){return this._closedPath}},{key:"closePath",value:function(){this.xy&&(this.xy=void 0,this.commands.push(xr.ClosePath),this._closedPath=!0)}},{key:"clear",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{trackChanges:!1},t=e.trackChanges;t?(this.previousCommands=this.commands,this.previousParams=this.params,this.previousClosedPath=this._closedPath,this.commands=[],this.params=[]):(this.commands.length=0,this.params.length=0),this.xy=void 0,this._closedPath=!1}},{key:"isPointInPath",value:function(e,t){for(var n=this.commands,i=this.params,r=n.length,o=-1e4,a=-1e4,s=NaN,l=NaN,u=0,c=0,d=0,h=0,p=0;h<r;h++)switch(n[h]){case xr.Move:isNaN(s)||Tr(s,l,u,c,o,a,e,t)&&d++,s=u=i[p++],l=c=i[p++];break;case xr.Line:Tr(u,c,i[p++],i[p++],o,a,e,t)&&d++,u=i[p-2],c=i[p-1];break;case xr.Curve:d+=Or(u,c,i[p++],i[p++],i[p++],i[p++],i[p++],i[p++],o,a,e,t).length,u=i[p-2],c=i[p-1];break;case xr.Arc:d+=Ar(i[p++],i[p++],i[p++],i[p++],i[p++],Boolean(i[p++]),o,a,e,t).length,u=i[p-2],c=i[p-1];break;case xr.ClosePath:isNaN(s)||Tr(s,l,u,c,o,a,e,t)&&d++}return d%2===1}}]),e}(),Nr=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};function Lr(e){var t=null!==e&&void 0!==e?e:{},n=t.redraw,i=void 0===n?fe.MAJOR:n,r=t.changeCb;return Ce({redraw:i,type:"path",convertor:t.convertor,changeCb:r})}var Ir=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).path=new Mr,e._dirtyPath=!0,e}return(0,f.Z)(n,[{key:"dirtyPath",get:function(){return this._dirtyPath},set:function(e){this._dirtyPath!==e&&(this._dirtyPath=e,e&&this.markDirty(this,fe.MAJOR))}},{key:"checkPathDirty",value:function(){var e,t;this._dirtyPath||(this.dirtyPath=this.path.isDirty()||null!==(t=null===(e=this.fillShadow)||void 0===e?void 0:e.isDirty())&&void 0!==t&&t)}},{key:"isPointInPath",value:function(e,t){var n=this.transformPoint(e,t);return this.path.closedPath&&this.path.isPointInPath(n.x,n.y)}},{key:"isDirtyPath",value:function(){return!1}},{key:"updatePath",value:function(){}},{key:"render",value:function(e){var t,i,r=e.ctx,o=e.forceRender,a=e.stats;if(this.dirty!==fe.NONE||o){if(this.computeTransformMatrix(),this.matrix.toContext(r),(this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1),this.clipPath){if(r.save(),"normal"===this.clipMode&&(this.clipPath.draw(r),r.clip()),this.path.draw(r),this.fillStroke(r),"punch-out"===this.clipMode){this.clipPath.draw(r),r.clip();var s=null!==(t=this.computeBBox())&&void 0!==t?t:{},l=s.x,u=void 0===l?-1e4:l,c=s.y,d=void 0===c?-1e4:c,h=s.width,p=void 0===h?2e4:h,f=s.height,v=void 0===f?2e4:f;r.clearRect(u,d,p,v)}r.restore()}else this.path.draw(r),this.fillStroke(r);null===(i=this.fillShadow)||void 0===i||i.markClean(),(0,oe.Z)((0,ae.Z)(n.prototype),"render",this).call(this,e)}else a&&(a.nodesSkipped+=this.nodeCount.count)}}]),n}(Ke);Ir.className="Path",Nr([Lr()],Ir.prototype,"clipPath",void 0),Nr([Lr()],Ir.prototype,"clipMode",void 0);var Fr=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},_r=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).x=0,e.y=0,e.size=12,e}return(0,f.Z)(n,[{key:"computeBBox",value:function(){var e=this.x,t=this.y,n=this.size,i=n/2;return new he(e-i,t-i,n,n)}},{key:"applyPath",value:function(e,t){var n=this.path,i=this.x,r=this.y;n.clear();var o,a=(0,ne.Z)(t);try{for(a.s();!(o=a.n()).done;){var s=o.value,l=s.x,u=s.y,c=s.t;i+=l*e,r+=u*e,"move"===c?n.moveTo(i,r):n.lineTo(i,r)}}catch(d){a.e(d)}finally{a.f()}n.closePath()}}]),n}(Ir);Fr([Lr()],_r.prototype,"x",void 0),Fr([Lr()],_r.prototype,"y",void 0),Fr([Lr({convertor:Math.abs})],_r.prototype,"size",void 0);var Gr=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n,[{key:"updatePath",value:function(){var e=this.path,t=this.x,n=this.y,i=this.size/2;e.clear(),e.moveTo(this.align(t-i),this.align(n-i)),e.lineTo(this.align(t+i),this.align(n-i)),e.lineTo(this.align(t+i),this.align(n+i)),e.lineTo(this.align(t-i),this.align(n+i)),e.closePath()}}]),n}(_r);Gr.className="Square";var Zr=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Vr=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;(0,p.Z)(this,n),(e=t.call(this,{name:"markerLabelGroup"})).label=new qe,e._marker=new Gr,e._markerSize=15,e._spacing=8;var i=e.label;return i.textBaseline="middle",i.fontSize=12,i.fontFamily="Verdana, sans-serif",i.fill="black",i.y=de.has.textMetrics?1:0,e.append([e.marker,i]),e.update(),e}return(0,f.Z)(n,[{key:"marker",get:function(){return this._marker},set:function(e){this._marker!==e&&(this.removeChild(this._marker),this._marker=e,this.appendChild(e),this.update())}},{key:"markerSize",get:function(){return this._markerSize},set:function(e){this._markerSize!==e&&(this._markerSize=e,this.update())}},{key:"spacing",get:function(){return this._spacing},set:function(e){this._spacing!==e&&(this._spacing=e,this.update())}},{key:"update",value:function(){var e=this.marker,t=this.markerSize;e.size=t,this.label.x=t/2+this.spacing}},{key:"render",value:function(e){this.marker.opacity=this.opacity,this.label.opacity=this.opacity,(0,oe.Z)((0,ae.Z)(n.prototype),"render",this).call(this,e)}}]),n}(Ae);Vr.className="MarkerLabel",Zr([ni("label")],Vr.prototype,"text",void 0),Zr([ni("label")],Vr.prototype,"fontStyle",void 0),Zr([ni("label")],Vr.prototype,"fontWeight",void 0),Zr([ni("label")],Vr.prototype,"fontSize",void 0),Zr([ni("label")],Vr.prototype,"fontFamily",void 0),Zr([ni("label","fill")],Vr.prototype,"color",void 0),Zr([ni("marker","fill")],Vr.prototype,"markerFill",void 0),Zr([ni("marker","stroke")],Vr.prototype,"markerStroke",void 0),Zr([ni("marker","strokeWidth")],Vr.prototype,"markerStrokeWidth",void 0),Zr([ni("marker","fillOpacity")],Vr.prototype,"markerFillOpacity",void 0),Zr([ni("marker","strokeOpacity")],Vr.prototype,"markerStrokeOpacity",void 0);var Hr=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n,[{key:"updatePath",value:function(){var e=this.x,t=this.y,n=this.path,i=this.size/2;n.clear(),n.arc(e,t,i,0,2*Math.PI),n.closePath()}}]),n}(_r);Hr.className="Circle";var Br=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n,[{key:"updatePath",value:function(){var e=this.size/4.2;(0,oe.Z)((0,ae.Z)(n.prototype),"applyPath",this).call(this,e,n.moves)}}]),n}(_r);Br.className="Cross",Br.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 Wr=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n,[{key:"updatePath",value:function(){var e=this.size/2;(0,oe.Z)((0,ae.Z)(n.prototype),"applyPath",this).call(this,e,n.moves)}}]),n}(_r);Wr.className="Diamond",Wr.moves=[{x:0,y:-1,t:"move"},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:1,y:-1}];var zr=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n,[{key:"rad",value:function(e){return e/180*Math.PI}},{key:"updatePath",value:function(){var e=this.x,t=this.path,n=this.size,i=this.rad,r=n/4,o=this.y+r/2;t.clear(),t.arc(e-r,o-r,r,i(130),i(330)),t.arc(e+r,o-r,r,i(220),i(50)),t.lineTo(e,o+r),t.closePath()}}]),n}(_r);zr.className="Heart";var Ur=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n,[{key:"updatePath",value:function(){var e=this.size/3;(0,oe.Z)((0,ae.Z)(n.prototype),"applyPath",this).call(this,e,n.moves)}}]),n}(_r);Ur.className="Plus",Ur.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 jr=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n,[{key:"updatePath",value:function(){var e=1.1*this.size;(0,oe.Z)((0,ae.Z)(n.prototype),"applyPath",this).call(this,e,n.moves)}}]),n}(_r);function Kr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Gr;if("string"===typeof e)switch(e){case"circle":return Hr;case"cross":return Br;case"diamond":return Wr;case"heart":return zr;case"plus":return Ur;case"triangle":return jr;default:return Gr}return"function"===typeof e?e:Gr}function Yr(e){for(var t=e.orientation,n=e.bboxes,i=e.maxHeight,r=e.maxWidth,o=e.itemPaddingY,a=void 0===o?0:o,s=e.itemPaddingX,l=void 0===s?0:s,u=e.forceResult,c=void 0!==u&&u,d="horizontal"===t,h={max:d?r:i,fn:d?function(e){return e.width}:function(e){return e.height},padding:d?l:a},p={max:d?i:r,fn:d?function(e){return e.height}:function(e){return e.width},padding:d?a:l},f=0,v=[];f<n.length;){var g=Xr(n.slice(f),f,h,p,c);if(!g)return;f+=g.processedBBoxCount,v.push(g.pageIndices)}return function(e,t,n,i,r){var o=0,a=0;return{pages:e.map((function(e){"horizontal"===t&&(e=function(e){var t,n=[],i=(0,ne.Z)(e[0]);try{for(i.s();!(t=i.n()).done;){t.value;n.push([])}}catch(r){i.e(r)}finally{i.f()}return e.forEach((function(e,t){e.forEach((function(e,i){n[i][t]=e}))})),n}(e));var s=0,l=e.map((function(e){var t=e.map((function(e){return s=Math.max(e,s),n[e]})),o=0,a=0;return t.forEach((function(e){o+=e.height+i,a=Math.max(a,e.width+r)})),{indices:e,bboxes:t,columnHeight:o,columnWidth:a}})),u=0,c=0;return l.forEach((function(e){u+=e.columnWidth,c=Math.max(c,e.columnHeight)})),o=Math.max(u,o),a=Math.max(c,a),{columns:l,startIndex:e[0][0],endIndex:s,pageWidth:u,pageHeight:c}})),maxPageWidth:o,maxPageHeight:a}}(v,t,n,a,l)}function Xr(e,t,n,i,r){var o=function(e,t){for(var n=e.length,i=0,r=0;r<n;r++){if((i+=t.fn(e[r])+t.padding)>t.max)return n/r<2?Math.ceil(n/2):r}return n}(e,n);if(o<1){if(!r)return;o=1}for(var a=o;a>=1;a--){var s=qr(e,t,a,n,i,r);if(null==s&&a<=1)return;if(null!=s){if("number"!==typeof s)return{processedBBoxCount:s.length*s[0].length,pageIndices:s};if(s<=1)return;a=s<a&&s>1?s:a}}}function qr(e,t,n,i,r,o){for(var a,s=[],l=0,u=0,c=[],d=[],h=0;h<e.length;h++){var p=(h+n)%n;0===p&&(l+=u,u=0,c.length>0&&s.push(c),c=[]);var f=i.fn(e[h])+i.padding;d[p]=Math.max(null!==(a=d[p])&&void 0!==a?a:0,f);var v=l+(u=Math.max(u,r.fn(e[h])+r.padding)),g=!o||s.length>0;if(v>r.max&&g){c=[];break}var m=d.reduce((function(e,t){return e+t}),0);if(m>i.max&&!o)return d.length<n?d.length:void 0;c.push(h+t)}return c.length>0&&s.push(c),s.length>0?s:void 0}jr.className="Triangle",jr.moves=[{x:0,y:-.48,t:"move"},{x:.5,y:.87},{x:-1,y:0}];var Qr=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Jr=(0,f.Z)((function e(){(0,p.Z)(this,e),this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}));Qr([vt(Gt)],Jr.prototype,"color",void 0),Qr([vt(nn)],Jr.prototype,"fontStyle",void 0),Qr([vt(on)],Jr.prototype,"fontWeight",void 0),Qr([vt(Bt(0))],Jr.prototype,"fontSize",void 0),Qr([vt(Ot)],Jr.prototype,"fontFamily",void 0);var $r=(0,f.Z)((function e(){(0,p.Z)(this,e),this.size=15,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=1,this.strokeOpacity=1}));Qr([vt(Bt(0))],$r.prototype,"size",void 0),Qr([vt(Zt)],$r.prototype,"fill",void 0),Qr([vt(Wt(0,1))],$r.prototype,"fillOpacity",void 0),Qr([vt(Zt)],$r.prototype,"stroke",void 0),Qr([vt(Bt(0))],$r.prototype,"strokeWidth",void 0),Qr([vt(Bt(0,1))],$r.prototype,"strokeOpacity",void 0);var eo=function(){function e(){(0,p.Z)(this,e),this.size=15,this._shape=jr,this.padding=8}return(0,f.Z)(e,[{key:"shape",get:function(){return this._shape},set:function(e){var t;this._shape=e,null===(t=this.parent)||void 0===t||t.onMarkerShapeChange()}}]),e}();Qr([vt(Bt(0))],eo.prototype,"size",void 0),Qr([vt(Bt(0))],eo.prototype,"padding",void 0);var to=function(){function e(t,n,i,r){var o=this;(0,p.Z)(this,e),this.chartUpdateCallback=t,this.pageUpdateCallback=n,this.interactionManager=i,this.cursorManager=r,this.id=me(this),this.group=new Ae({name:"pagination"}),this.labelNode=new qe,this.marker=new eo,this.activeStyle=new $r,this.inactiveStyle=new $r,this.highlightStyle=new $r,this.label=new Jr,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 jr,this._previousButton=new jr;var a=this.labelNode;a.textBaseline="middle",a.fontSize=12,a.fontFamily="Verdana, sans-serif",a.fill="black",a.y=de.has.textMetrics?1:0,this.group.append([this.nextButton,this.previousButton,a]),this.interactionManager.addListener("click",(function(e){return o.onPaginationClick(e)})),this.interactionManager.addListener("hover",(function(e){return o.onPaginationMouseMove(e)})),this.marker.parent=this,this.update(),this.updateMarkers()}return(0,f.Z)(e,[{key:"visible",get:function(){return this._visible},set:function(e){this._visible=e,this.updateGroupVisibility()}},{key:"enabled",get:function(){return this._enabled},set:function(e){this._enabled=e,this.updateGroupVisibility()}},{key:"updateGroupVisibility",value:function(){this.group.visible=this.enabled&&this.visible}},{key:"orientation",get:function(){return this._orientation},set:function(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}},{key:"nextButton",get:function(){return this._nextButton},set:function(e){this._nextButton!==e&&(this.group.removeChild(this._nextButton),this._nextButton=e,this.group.appendChild(e))}},{key:"previousButton",get:function(){return this._previousButton},set:function(e){this._previousButton!==e&&(this.group.removeChild(this._previousButton),this._previousButton=e,this.group.appendChild(e))}},{key:"update",value:function(){this.updateLabel(),this.updatePositions(),this.enableOrDisableButtons()}},{key:"updatePositions",value:function(){this.group.translationX=this.translationX,this.group.translationY=this.translationY,this.updateLabelPosition(),this.updateNextButtonPosition()}},{key:"updateLabelPosition",value:function(){var e=this.marker,t=e.size,n=e.padding;this.nextButton.size=t,this.previousButton.size=t,this.labelNode.x=t/2+n}},{key:"updateNextButtonPosition",value:function(){var e=this.labelNode.computeBBox();this.nextButton.translationX=e.x+e.width+this.marker.size/2+this.marker.padding}},{key:"updateLabel",value:function(){var e=this.currentPage,t=this.totalPages,n=this.labelNode,i=this.label,r=i.color,o=i.fontStyle,a=i.fontWeight,s=i.fontSize,l=i.fontFamily;n.text="".concat(e+1," / ").concat(t),n.fill=r,n.fontStyle=o,n.fontWeight=a,n.fontSize=s,n.fontFamily=l}},{key:"updateMarkers",value:function(){var e=this.nextButton,t=this.previousButton,n=this.nextButtonDisabled,i=this.previousButtonDisabled,r=this.activeStyle,o=this.inactiveStyle,a=this.highlightStyle,s=this.highlightActive,l=function(e,t){return t?o:e===s?a:r};this.updateMarker(e,l("next",n)),this.updateMarker(t,l("previous",i))}},{key:"updateMarker",value:function(e,t){var n,i=this.marker.size;e.size=i,e.fill=t.fill,e.fillOpacity=null!==(n=t.fillOpacity)&&void 0!==n?n:1,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.strokeOpacity=t.strokeOpacity}},{key:"enableOrDisableButtons",value:function(){var e=this.currentPage,t=this.totalPages,n=0===t,i=e===t-1,r=0===e;this.nextButtonDisabled=i||n,this.previousButtonDisabled=r||n}},{key:"nextButtonContainsPoint",value:function(e,t){return!this.nextButtonDisabled&&this.nextButton.containsPoint(e,t)}},{key:"previousButtonContainsPoint",value:function(e,t){return!this.previousButtonDisabled&&this.previousButton.containsPoint(e,t)}},{key:"onPaginationClick",value:function(e){var t=e.offsetX,n=e.offsetY;this.nextButtonContainsPoint(t,n)?(this.incrementPage(),this.onPaginationChanged(),e.consume()):this.previousButtonContainsPoint(t,n)&&(this.decrementPage(),this.onPaginationChanged(),e.consume())}},{key:"onPaginationMouseMove",value:function(e){var t=e.offsetX,n=e.offsetY;this.nextButtonContainsPoint(t,n)?(this.cursorManager.updateCursor(this.id,"pointer"),this.highlightActive="next"):this.previousButtonContainsPoint(t,n)?(this.cursorManager.updateCursor(this.id,"pointer"),this.highlightActive="previous"):(this.cursorManager.updateCursor(this.id),this.highlightActive=void 0),this.updateMarkers(),this.chartUpdateCallback(Cr.SCENE_RENDER)}},{key:"onPaginationChanged",value:function(){this.pageUpdateCallback(this.currentPage)}},{key:"incrementPage",value:function(){this.currentPage=Math.min(this.currentPage+1,this.totalPages-1)}},{key:"decrementPage",value:function(){this.currentPage=Math.max(this.currentPage-1,0)}},{key:"onMarkerShapeChange",value:function(){var e=Kr(this.marker.shape||jr);this.previousButton=new e,this.nextButton=new e,this.updatePositions(),this.updateMarkers(),this.chartUpdateCallback(Cr.SCENE_RENDER)}},{key:"attachPagination",value:function(e){e.append(this.group)}},{key:"computeBBox",value:function(){return this.group.computeBBox()}}]),e}();to.className="Pagination";var no=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},io=["horizontal","vertical"],ro=gt((function(e,t){return mt(e,t,(function(e){return io.includes(e)}))}),"expecting an orientation keyword such as 'horizontal' or 'vertical'"),oo=(0,f.Z)((function e(){(0,p.Z)(this,e),this.maxLength=void 0,this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.formatter=void 0}));no([vt(Wt(0))],oo.prototype,"maxLength",void 0),no([vt(Gt)],oo.prototype,"color",void 0),no([vt(nn)],oo.prototype,"fontStyle",void 0),no([vt(on)],oo.prototype,"fontWeight",void 0),no([vt(Bt(0))],oo.prototype,"fontSize",void 0),no([vt(Ot)],oo.prototype,"fontFamily",void 0),no([vt(Rt)],oo.prototype,"formatter",void 0);var ao=function(){function e(){(0,p.Z)(this,e),this.size=15,this._shape=void 0,this.padding=8,this.strokeWidth=1}return(0,f.Z)(e,[{key:"shape",get:function(){return this._shape},set:function(e){var t;this._shape=e,null===(t=this.parent)||void 0===t||t.onMarkerShapeChange()}}]),e}();no([vt(Bt(0))],ao.prototype,"size",void 0),no([vt(Bt(0))],ao.prototype,"padding",void 0),no([vt(Bt(0))],ao.prototype,"strokeWidth",void 0);var so=(0,f.Z)((function e(){(0,p.Z)(this,e),this.marker=new ao,this.label=new oo,this.maxWidth=void 0,this.paddingX=16,this.paddingY=8,this.toggleSeriesVisible=!0}));no([vt(Wt(0))],so.prototype,"maxWidth",void 0),no([vt(Bt(0))],so.prototype,"paddingX",void 0),no([vt(Bt(0))],so.prototype,"paddingY",void 0),no([vt(Dt)],so.prototype,"toggleSeriesVisible",void 0);var lo=(0,f.Z)((function e(){(0,p.Z)(this,e),this.legendItemClick=void 0,this.legendItemDoubleClick=void 0}));no([vt(Rt)],lo.prototype,"legendItemClick",void 0);var uo=function(){function e(t){var n,i=this;(0,p.Z)(this,e),this.ctx=t,this.id=me(this),this.group=new Ae({name:"legend",layer:!0,zIndex:qt.LEGEND_ZINDEX}),this.itemSelection=Rr.select(this.group,Vr),this.oldSize=[0,0],this.pages=[],this.maxPageSize=[0,0],this.paginationTrackingIndex=0,this.item=new so,this.listeners=new lo,this.truncatedItems=new Set,this._data=[],this._enabled=!0,this.position="bottom",this.maxWidth=void 0,this.maxHeight=void 0,this.reverseOrder=void 0,this.destroyFns=[],this.spacing=20,this.characterWidths=new Map,this.size=[0,0],this._visible=!0,this.item.marker.parent=this,this.pagination=new to((function(e){return t.updateService.update(e)}),(function(e){return i.updatePageNumber(e)}),t.interactionManager,t.cursorManager),this.pagination.attachPagination(this.group),this.item.marker.parent=this;var r=[t.interactionManager.addListener("click",(function(e){return i.checkLegendClick(e)})),t.interactionManager.addListener("dblclick",(function(e){return i.checkLegendDoubleClick(e)})),t.interactionManager.addListener("hover",(function(e){return i.handleLegendMouseMove(e)}))],o=[t.layoutService.addListener("start-layout",(function(e){return i.positionLegend(e.shrinkRect)}))];(n=this.destroyFns).push.apply(n,(0,te.Z)(r.map((function(e){return function(){return t.interactionManager.removeListener(e)}}))).concat((0,te.Z)(o.map((function(e){return function(){return t.layoutService.removeListener(e)}}))),[function(){return i.detachLegend()}]))}return(0,f.Z)(e,[{key:"data",get:function(){return this._data},set:function(e){this._data=e,this.updateGroupVisibility()}},{key:"enabled",get:function(){return this._enabled},set:function(e){this._enabled=e,this.updateGroupVisibility()}},{key:"getOrientation",value:function(){if(void 0!==this.orientation)return this.orientation;switch(this.position){case"right":case"left":return"vertical";case"bottom":case"top":return"horizontal"}}},{key:"destroy",value:function(){this.destroyFns.forEach((function(e){return e()}))}},{key:"onMarkerShapeChange",value:function(){this.itemSelection.clear(),this.group.markDirty(this.group,fe.MINOR)}},{key:"getCharacterWidths",value:function(e){var t=this.characterWidths;if(t.has(e))return t.get(e);var n={"...":de.getTextSize("...",e).width};return t.set(e,n),n}},{key:"visible",get:function(){return this._visible},set:function(e){this._visible=e,this.updateGroupVisibility()}},{key:"updateGroupVisibility",value:function(){this.group.visible=this.enabled&&this.visible&&this.data.length>0}},{key:"attachLegend",value:function(e){e.append(this.group)}},{key:"detachLegend",value:function(){var e;null===(e=this.group.parent)||void 0===e||e.removeChild(this.group)}},{key:"getItemLabel",value:function(e){var t=this.ctx.callbackCache,n=this.item.label.formatter;return n?t.call(n,{itemId:e.itemId,value:e.label.text,seriesId:e.seriesId}):e.label.text}},{key:"performLayout",value:function(e,t){var n=this,i=this.item,r=i.paddingX,o=i.paddingY,a=i.label,s=i.maxWidth,l=i.marker,u=l.size,c=l.padding,d=l.shape,h=i.label,p=h.maxLength,f=void 0===p?1/0:p,v=h.fontStyle,g=h.fontWeight,m=h.fontSize,y=h.fontFamily,C=(0,te.Z)(this.data);this.reverseOrder&&C.reverse(),this.itemSelection.update(C);var k=[],w=Qe(a),S=null!==s&&void 0!==s?s:.8*e,b=u+c+r;if(this.itemSelection.each((function(e,t){var i,r=Kr(null!==d&&void 0!==d?d:t.marker.shape);e.marker&&e.marker instanceof r||(e.marker=new r),e.markerSize=u,e.spacing=c,e.fontStyle=v,e.fontWeight=g,e.fontSize=m,e.fontFamily=y;var o=null!==(i=t.itemId)&&void 0!==i?i:t.id,a=n.getItemLabel(t),s=(null!==a&&void 0!==a?a:"<unknown>").replace(/\r?\n/g," ");e.text=n.truncate(s,f,S,b,w,o),k.push(e.computeBBox())})),e=Math.max(1,e),t=Math.max(1,t),!isFinite(e))return!1;var E=this.size,x=this.oldSize;E[0]=e,E[1]=t,E[0]===x[0]&&E[1]===x[1]||(x[0]=E[0],x[1]=E[1]);var R=this.updatePagination(k,e,t),D=R.pages,T=R.maxPageHeight,O=R.maxPageWidth;this.pages=D,this.maxPageSize=[O-r,T-o];var P=this.pagination.currentPage,A=this.pages[P];this.pages.length<1||!A?this.visible=!1:(this.visible=!0,this.updatePositions(P),this.update())}},{key:"truncate",value:function(e,t,n,i,r,o){var a=e.split(""),s=!1;if(e.length>t&&(e="".concat(e.substring(0,t)),s=!0),Math.floor(i+de.getTextSize(e,r).width)>n){var l,u="",c=this.getCharacterWidths(r),d=i+c["..."],h=(0,ne.Z)(a);try{for(h.s();!(l=h.n()).done;){var p=l.value;if(c[p]||(c[p]=de.getTextSize(p,r).width),(d+=c[p])>n)break;u+=p}}catch(f){h.e(f)}finally{h.f()}e=u,s=!0}return s?(e+="...",this.truncatedItems.add(o)):this.truncatedItems.delete(o),e}},{key:"updatePagination",value:function(e,t,n){var i=this.getOrientation(),r=Math.min(this.paginationTrackingIndex,e.length);this.pagination.orientation=i,this.pagination.translationX=0,this.pagination.translationY=0;var o=this.calculatePagination(e,t,n),a=o.pages,s=o.maxPageHeight,l=o.maxPageWidth,u=o.paginationBBox,c=o.paginationVertical,d=a.findIndex((function(e){return e.endIndex>=r}));this.pagination.currentPage=Math.min(Math.max(d,0),a.length-1);var h=this.item,p=l-h.paddingX,f=s-h.paddingY,v=0,g=-u.y-this.item.marker.size/2;return c?g+=f+8:(v+=-u.x+p+8,g+=(f-u.height)/2),this.pagination.translationX=v,this.pagination.translationY=g,this.pagination.update(),this.pagination.updateMarkers(),{maxPageHeight:s,maxPageWidth:l,pages:a}}},{key:"calculatePagination",value:function(e,t,n){var i,r,o,a=this.item,s=a.paddingX,l=a.paddingY,u=this.getOrientation(),c=["left","right"].includes(this.position),d=this.pagination.computeBBox(),h=new he(0,0,0,0),p=[],f=0,v=0,g=0,m=function(e){var t=e.width,n=e.height;return t===d.width&&n===d.height},y=void 0!==this.maxWidth||void 0!==this.maxHeight;do{if(g++>10){Oe.warn("unable to find stable legend layout.");break}d=h;var C=t-(c?0:d.width),k=Yr({orientation:u,bboxes:e,maxHeight:n-(c?d.height:0),maxWidth:C,itemPaddingY:l,itemPaddingX:s,forceResult:y});p=null!==(i=null===k||void 0===k?void 0:k.pages)&&void 0!==i?i:[],f=null!==(r=null===k||void 0===k?void 0:k.maxPageWidth)&&void 0!==r?r:0,v=null!==(o=null===k||void 0===k?void 0:k.maxPageHeight)&&void 0!==o?o:0;var w=p.length;if(this.pagination.visible=w>1,this.pagination.totalPages=w,this.pagination.update(),h=this.pagination.computeBBox(),!this.pagination.visible)break}while(!m(h));return{maxPageWidth:f,maxPageHeight:v,pages:p,paginationBBox:d,paginationVertical:c}}},{key:"updatePositions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.item.paddingY,n=this.itemSelection,i=this.pages;if(!(i.length<1)&&i[e]){var r=i[e],o=r.columns,a=r.startIndex,s=r.endIndex,l=0,u=0,c=o.length,d=o[0].indices.length,h="horizontal"===this.getOrientation(),p=o[0].bboxes[0].height+t,f=[];n.each((function(e,t,n){var i,r;if(n<a||n>s)e.visible=!1;else{var v=n-a,g=0,m=0;h?(g=v%c,m=Math.floor(v/c)):(g=Math.floor(v/d),m=v%d),e.visible=!0;var y=o[g];y&&(u=p*m,l=null!==(i=f[m])&&void 0!==i?i:0,f[m]=(null!==(r=f[m])&&void 0!==r?r:0)+y.columnWidth,e.translationX=Math.floor(l),e.translationY=Math.floor(u))}}))}}},{key:"updatePageNumber",value:function(e){var t=this.pages,n=t[e],i=n.startIndex,r=n.endIndex;0===i?this.paginationTrackingIndex=0:e===t.length-1?this.paginationTrackingIndex=r:this.paginationTrackingIndex=Math.floor((i+r)/2),this.pagination.update(),this.pagination.updateMarkers(),this.updatePositions(e),this.ctx.updateService.update(Cr.SCENE_RENDER)}},{key:"update",value:function(){var e=this.item,t=e.marker.strokeWidth,n=e.label.color;this.itemSelection.each((function(e,i){var r=i.marker;e.markerFill=r.fill,e.markerStroke=r.stroke,e.markerStrokeWidth=t,e.markerFillOpacity=r.fillOpacity,e.markerStrokeOpacity=r.strokeOpacity,e.opacity=i.enabled?1:.5,e.color=n}))}},{key:"getDatumForPoint",value:function(e,t){var n,i=[],r={dist:1/0,datum:void 0},o=(0,ne.Z)(this.group.children);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.visible&&a instanceof Vr){var s=a.computeBBox();if(s.grow(this.item.paddingX/2,"horizontal"),s.grow(this.item.paddingY/2,"vertical"),s.containsPoint(e,t))return a.datum;var l=e-s.x-this.item.paddingX/2,u=t-s.y-this.item.paddingY/2,c=Math.pow(l,2)+Math.pow(u,2);l>=0&&u>=0&&c<r.dist&&(r.dist=c,r.datum=a.datum),i.push(s)}}}catch(d){o.e(d)}finally{o.f()}if(he.merge(i).containsPoint(e,t))return r.datum}},{key:"computeBBox",value:function(){return this.group.computeBBox()}},{key:"computePagedBBox",value:function(){var e=this.group.computeBBox();if(this.pages.length<=1)return e;var t=(0,re.Z)(this.maxPageSize,2),n=t[0],i=t[1];return e.height=Math.max(i,e.height),e.width=Math.max(n,e.width),e}},{key:"checkLegendClick",value:function(e){var t=this.listeners.legendItemClick,n=this.ctx,i=n.dataService,r=n.highlightManager,o=this.item.toggleSeriesVisible,a=e.offsetX,s=e.offsetY,l=this.computeBBox(),u=this.group.visible&&l.containsPoint(a,s),c=this.getDatumForPoint(a,s);if(u&&c){var d=c.id,h=c.itemId,p=c.enabled,f=i.getSeries().find((function(e){return e.id===d}));if(f){e.consume();var v=p;o&&(v=!p,this.ctx.chartEventManager.legendItemClick(f,h,v,c.legendItemName)),v?r.updateHighlight(this.id,{series:f,itemId:h,datum:void 0}):r.updateHighlight(this.id),this.ctx.updateService.update(Cr.PROCESS_DATA,{forceNodeDataRefresh:!0}),null===t||void 0===t||t({type:"click",enabled:v,itemId:h,seriesId:f.id})}}}},{key:"checkLegendDoubleClick",value:function(e){var t,n=this.listeners.legendItemDoubleClick,i=this.ctx.dataService,r=this.item.toggleSeriesVisible,o=e.offsetX,a=e.offsetY;if("integrated"!==this.ctx.mode){var s=this.computeBBox(),l=this.group.visible&&s.containsPoint(o,a),u=this.getDatumForPoint(o,a);if(l&&u){var c=u.id,d=u.itemId,h=u.seriesId,p=i.getSeries(),f=p.find((function(e){return e.id===c}));if(f){if(e.consume(),r){var v=p.reduce((function(e,t){return[].concat((0,te.Z)(e),(0,te.Z)(t.getLegendData().filter((function(e){return"category"===e.legendType}))))}),[]),g={};v.forEach((function(e){var t,n;null!==(t=g[n=e.seriesId])&&void 0!==t||(g[n]=0),e.enabled&&g[e.seriesId]++}));var m=v.find((function(e){return e.itemId===d&&e.seriesId===h}));this.ctx.chartEventManager.legendItemDoubleClick(f,d,null!==(t=null===m||void 0===m?void 0:m.enabled)&&void 0!==t&&t,g,null===m||void 0===m?void 0:m.legendItemName)}this.ctx.updateService.update(Cr.PROCESS_DATA,{forceNodeDataRefresh:!0}),null===n||void 0===n||n({type:"dblclick",enabled:!0,itemId:d,seriesId:f.id})}}}}},{key:"handleLegendMouseMove",value:function(e){var t,n=this.enabled,i=this.item.toggleSeriesVisible,r=this.listeners;if(n){var o=this.computeBBox(),a=e.pageX,s=e.pageY,l=e.offsetX,u=e.offsetY,c=this.group.visible&&o.containsPoint(l,u);if(!c)return this.ctx.cursorManager.updateCursor(this.id),this.ctx.highlightManager.updateHighlight(this.id),void this.ctx.tooltipManager.removeTooltip(this.id);e.consume();var d=this.getDatumForPoint(l,u);if(!(c&&void 0!==d))return this.ctx.cursorManager.updateCursor(this.id),void this.ctx.highlightManager.updateHighlight(this.id);var h=d?this.ctx.dataService.getSeries().find((function(e){return e.id===(null===d||void 0===d?void 0:d.id)})):void 0;if(d&&this.truncatedItems.has(null!==(t=d.itemId)&&void 0!==t?t:d.id)){var p=this.getItemLabel(d);this.ctx.tooltipManager.updateTooltip(this.id,{pageX:a,pageY:s,offsetX:l,offsetY:u,event:e,showArrow:!1},An({content:p}))}else this.ctx.tooltipManager.removeTooltip(this.id);(i||null!=r.legendItemClick||null!=r.legendItemDoubleClick)&&this.ctx.cursorManager.updateCursor(this.id,"pointer"),(null===d||void 0===d?void 0:d.enabled)&&h?this.ctx.highlightManager.updateHighlight(this.id,{series:h,itemId:null===d||void 0===d?void 0:d.itemId,datum:void 0}):this.ctx.highlightManager.updateHighlight(this.id)}}},{key:"positionLegend",value:function(e){var t=this,n=e.clone();if(!this.enabled||!this.data.length)return{shrinkRect:n};var i=this.calculateLegendDimensions(e),r=(0,re.Z)(i,2),o=r[0],a=r[1];this.group.translationX=0,this.group.translationY=0,this.performLayout(o,a);var s=this.computePagedBBox(),l=function(){switch(t.position){case"top":case"left":return 0;case"bottom":return e.height-s.height;default:return e.width-s.width}};if(this.visible){var u,c;switch(this.position){case"top":case"bottom":u=(e.width-s.width)/2,c=l(),n.shrink(s.height,this.position);break;default:u=l(),c=(e.height-s.height)/2,n.shrink(s.width,this.position)}this.group.translationX=Math.floor(-s.x+e.x+u),this.group.translationY=Math.floor(-s.y+e.y+c)}if(this.visible&&this.enabled&&this.data.length){var d=this.spacing;n.shrink(d,this.position);var h=s.clone();h.x+=this.group.translationX,h.y+=this.group.translationY,this.ctx.tooltipManager.updateExclusiveRect(this.id,h)}else this.ctx.tooltipManager.updateExclusiveRect(this.id);return{shrinkRect:n}}},{key:"calculateLegendDimensions",value:function(e){var t=e.width,n=e.height,i=t/n,r=0,o=0;switch(this.position){case"top":case"bottom":var a=i<1?Math.min(.5,1/i*.2):.2;r=this.maxWidth?Math.min(this.maxWidth,t):t,o=this.maxHeight?Math.min(this.maxHeight,n):Math.round(n*a);break;default:var s=i>1?Math.min(.5,.25*i):.25;r=this.maxWidth?Math.min(this.maxWidth,t):Math.round(t*s),o=this.maxHeight?Math.min(this.maxHeight,n):n}return[r,o]}}]),e}();uo.className="Legend",no([vt(Dt)],uo.prototype,"_enabled",void 0),no([vt(vn)],uo.prototype,"position",void 0),no([vt(Wt(0))],uo.prototype,"maxWidth",void 0),no([vt(Wt(0))],uo.prototype,"maxHeight",void 0),no([vt(Tt)],uo.prototype,"reverseOrder",void 0),no([vt(ro)],uo.prototype,"orientation",void 0),no([vt(Bt(0))],uo.prototype,"spacing",void 0);var co={category:uo};function ho(e,t){if(co[e])throw new Error("AG Charts - already registered legend type: ".concat(e));co[e]=t}var po=function(){function e(){(0,p.Z)(this,e),this.cache=new Map}return(0,f.Z)(e,[{key:"call",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var r,o=this.cache.get(e),a=function(){try{var t=e.apply(void 0,n);return o&&null!=r&&o.set(r,t),t}catch(i){return void Oe.warnOnce("User callback errored, ignoring",i)}};try{r=JSON.stringify(n)}catch(s){return a()}return null==o&&(o=new Map,this.cache.set(e,o)),o.has(r)?o.get(r):a()}},{key:"invalidateCache",value:function(){this.cache=new Map}}]),e}(),fo=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))},vo=function(){function e(){(0,p.Z)(this,e),this.requested=[],this.status="setup"}return(0,f.Z)(e,[{key:"request",value:function(e,t,n){return fo(this,void 0,void 0,(0,ie.Z)().mark((function i(){var r=this;return(0,ie.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if("setup"===this.status){i.next=2;break}throw new Error("AG Charts - data request after data setup phase.");case 2:return i.abrupt("return",new Promise((function(i,o){r.requested.push({id:e,opts:n,data:t,resultCb:i,reject:o})})));case 3:case"end":return i.stop()}}),i,this)})))}},{key:"execute",value:function(){return fo(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r,o,a,s,l,u,c,d=this;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("setup"===this.status){t.next=2;break}throw new Error("AG Charts - data request after data setup phase.");case 2:this.status="executed",e.DEBUG()&&Oe.debug("DataController.execute() - requested",this.requested),n=this.mergeRequested(),e.DEBUG()&&Oe.debug("DataController.execute() - merged",n),i=(0,ne.Z)(n);try{for(i.s();!(r=i.n()).done;){o=r.value,a=o.opts,s=o.data,l=o.resultCbs,u=o.rejects,c=o.ids;try{!function(){var e=new Rn(a),t=e.processData(s);t&&0===t.partialValidDataCount?l.forEach((function(n){return n({dataModel:e,processedData:t})})):t?d.splitResult(e,t,c,l):u.forEach((function(e){return e(new Error("AG Charts - no processed data generated"))}))}()}catch(h){u.forEach((function(e){return e(h)}))}}}catch(p){i.e(p)}finally{i.f()}case 8:case"end":return t.stop()}}),t,this)})))}},{key:"mergeRequested",value:function(){var e,t=[],n=function(e){return e.filter((function(e){return"key"===e.type})).map((function(e){return e.property})).join(";")},i=function(e){var t=e.opts,i=e.data;return function(e){return e[0].data===i&&e[0].opts.groupByKeys===t.groupByKeys&&e[0].opts.dataVisible===t.dataVisible&&e[0].opts.groupByFn===t.groupByFn&&n(e[0].opts.props)===n(t.props)}},r=function(e){return function(t){var n;if(t.type!==e.type)return!1;if(t.id!==e.id)return!1;var i=null!==(n=Zi(t,e))&&void 0!==n?n:{};return delete i.scopes,0===Object.keys(i).length}},o=(0,ne.Z)(this.requested);try{for(o.s();!(e=o.n()).done;){var a=e.value,s=t.find(i(a));s?s.push(a):t.push([a])}}catch(l){o.e(l)}finally{o.f()}return t.map((function(e){return{ids:e.map((function(e){return e.id})),resultCbs:e.map((function(e){return e.resultCb})),rejects:e.map((function(e){return e.reject})),data:e[0].data,opts:(t=e.map((function(e){return e.opts})),Object.assign(Object.assign({},t[0]),{props:t.reduce((function(e,t){var n,i,o,a,s=(0,ne.Z)(t.props);try{for(s.s();!(a=s.n()).done;){var u,c=a.value,d=e.find(r(c));d?(null!==(n=d.scopes)&&void 0!==n||(d.scopes=[]),(u=d.scopes).push.apply(u,(0,te.Z)(null!==(i=c.scopes)&&void 0!==i?i:[]).concat((0,te.Z)(null!==(o=t.scopes)&&void 0!==o?o:[])))):e.push(c)}}catch(l){s.e(l)}finally{s.f()}return e}),[])}))};var t}))}},{key:"splitResult",value:function(e,t,n,i){for(var r=function(r){var o=n[r];(0,i[r])({dataModel:e,processedData:Object.assign(Object.assign({},t),{data:t.data.filter((function(e){var t=e.validScopes;return null==t||t.some((function(e){return e===o}))}))})})},o=0;o<n.length;o++)r(o)}}]),e}();vo.DEBUG=function(){var e;return null!==(e=[!0,"data-model"].includes(Le("agChartsDebug")))&&void 0!==e&&e};var go=function(){function e(){(0,p.Z)(this,e),this.groups={}}return(0,f.Z)(e,[{key:"registerSeries",value:function(e){var t,n,i=e.id,r=e.seriesGrouping,o=e.visible,a=e.type;r&&(null!==(t=(n=this.groups)[a])&&void 0!==t||(n[a]={}),this.groups[a][i]={grouping:r,visible:o})}},{key:"deregisterSeries",value:function(e){var t=e.id,n=e.type;this.groups[n]&&delete this.groups[n][t],this.groups[n]&&0===Object.keys(this.groups[n]).length&&delete this.groups[n]}},{key:"getVisiblePeerGroupIndex",value:function(e){var t,n=e.type,i=e.seriesGrouping;if(!i)return{visibleGroupCount:1,index:0};var r=(0,te.Z)(Object.entries(null!==(t=this.groups[n])&&void 0!==t?t:{}).filter((function(e){var t=(0,re.Z)(e,2);t[0];return t[1].visible})).reduce((function(e,t){var n=(0,re.Z)(t,2),i=(n[0],n[1]);return i.visible&&e.add(i.grouping.groupIndex),e}),new Set).values());return r.sort((function(e,t){return e-t})),{visibleGroupCount:r.length,index:r.indexOf(i.groupIndex)}}}]),e}(),mo=function(){function e(t){(0,p.Z)(this,e),this.groups={},this.series={},this.rootGroup=t}return(0,f.Z)(e,[{key:"requestGroup",value:function(e){var t,n,i,r,o=e.id,a=e.type,s=e.rootGroup,l=e.seriesGrouping,u=(null!==l&&void 0!==l?l:{}).groupIndex,c=void 0===u?o:u;if(null!=this.series[o])throw new Error("AG Charts - series already has an allocated layer: ".concat(this.series[o]));null!==(t=(i=this.groups)[a])&&void 0!==t||(i[a]={});var d=this.groups[a][c];return d||(d=null!==(n=(r=this.groups[a])[c])&&void 0!==n?n:r[c]={seriesIds:[],group:this.rootGroup.appendChild(new Ae({name:"".concat(a,"-content"),layer:!0,zIndex:qt.SERIES_LAYER_ZINDEX,zIndexSubOrder:e.getGroupZIndexSubOrder("data")}))}),this.series[o]={layerState:d,seriesConfig:e},d.seriesIds.push(o),d.group.appendChild(s),d.group}},{key:"changeGroup",value:function(e){var t,n,i=e.id,r=e.seriesGrouping,o=e.type,a=e.rootGroup,s=e.oldGrouping,l=(null!==r&&void 0!==r?r:{}).groupIndex,u=void 0===l?i:l;(null===(n=null===(t=this.groups[o])||void 0===t?void 0:t[u])||void 0===n?void 0:n.seriesIds.includes(i))||(null!=this.series[i]&&this.releaseGroup({id:i,seriesGrouping:s,type:o,rootGroup:a}),this.requestGroup(e))}},{key:"releaseGroup",value:function(e){var t,n,i,r,o,a=e.id,s=e.seriesGrouping,l=e.rootGroup,u=e.type,c=(null!==s&&void 0!==s?s:{}).groupIndex,d=void 0===c?a:c;if(null==this.series[a])throw new Error("AG Charts - series doesn't have an allocated layer: ".concat(a));var h=null!==(n=null===(t=this.groups[u])||void 0===t?void 0:t[d])&&void 0!==n?n:null===(i=this.series[a])||void 0===i?void 0:i.layerState;if(h&&(h.seriesIds=h.seriesIds.filter((function(e){return e!==a})),h.group.removeChild(l)),0===(null===h||void 0===h?void 0:h.seriesIds.length))this.rootGroup.removeChild(h.group),delete this.groups[u][d],delete this.groups[u][a];else if((null===h||void 0===h?void 0:h.seriesIds.length)>0){var p=null===(o=this.series[null===(r=null===h||void 0===h?void 0:h.seriesIds)||void 0===r?void 0:r[0]])||void 0===o?void 0:o.seriesConfig;h.group.zIndexSubOrder=null===p||void 0===p?void 0:p.getGroupZIndexSubOrder("data")}delete this.series[a]}},{key:"destroy",value:function(){for(var e=0,t=Object.values(this.groups);e<t.length;e++)for(var n=t[e],i=0,r=Object.values(n);i<r.length;i++){var o=r[i];this.rootGroup.removeChild(o.group)}this.groups={},this.series={}}}]),e}(),yo=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Co=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))},ko=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e,i,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.document,o=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;(0,p.Z)(this,n),(e=t.call(this)).id=me((0,le.Z)(e)),e.processedOptions={},e.userOptions={},e.queuedUserOptions=[],e.seriesRoot=new Ae({name:"".concat(e.id,"-Series-root")}),e.extraDebugStats={},e.container=void 0,e.data=[],e.padding=new Ri(20),e.seriesAreaPadding=new Ri(0),e.title=void 0,e.subtitle=void 0,e.footnote=void 0,e.mode="standalone",e._destroyed=!1,e.modules={},e.legendModules={},e._pendingFactoryUpdates=[],e._performUpdateNoRenderCount=0,e._performUpdateType=Cr.NONE,e.seriesToUpdate=new Set,e.performUpdateTrigger=Ni((function(t){var n=t.count;return Co((0,le.Z)(e),void 0,void 0,(0,ie.Z)().mark((function e(){return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._destroyed){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,this.performUpdate(n);case 5:e.next=11;break;case 7:e.prev=7,e.t0=e.catch(2),this._lastPerformUpdateError=e.t0,Oe.error("update error",e.t0);case 11:case"end":return e.stop()}}),e,this,[[2,7]])})))})),e._axes=[],e._series=[],e.applyLegendOptions=void 0,e.lastInteractionEvent=void 0,e.pointerScheduler=Mi((function(){e.lastInteractionEvent&&e.handlePointer(e.lastInteractionEvent),e.lastInteractionEvent=void 0})),e.onSeriesNodeClick=function(t){var n=Object.assign(Object.assign({},t),{type:"seriesNodeClick"});Object.defineProperty(n,"series",{enumerable:!1,get:function(){return t.series}}),e.fireEvent(n)},e.onSeriesNodeDoubleClick=function(t){var n=Object.assign(Object.assign({},t),{type:"seriesNodeDoubleClick"});e.fireEvent(n)};var s=null===a||void 0===a?void 0:a.scene,l=null!==(i=null===a||void 0===a?void 0:a.element)&&void 0!==i?i:r.createElement("div"),u=null===a||void 0===a?void 0:a.container,c=new Ae({name:"root"});return c.visible=!1,c.append(e.seriesRoot),e.axisGroup=new Ae({name:"Axes",layer:!0,zIndex:qt.AXIS_ZINDEX}),c.appendChild(e.axisGroup),e.element=l,l.classList.add("ag-chart-wrapper"),l.style.position="relative",e.scene=null!==s&&void 0!==s?s:new Fe({document:r,overrideDevicePixelRatio:o}),e.scene.debug.consoleLog=!1,e.scene.root=c,e.scene.container=l,e.autoSize=!0,e.chartEventManager=new ur,e.cursorManager=new lr(l),e.highlightManager=new cr,e.interactionManager=new vr(l),e.zoomManager=new mr,e.dataService=new wr((function(){return e.series})),e.layoutService=new kr,e.updateService=new Sr((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Cr.FULL,n=arguments.length>1?arguments[1]:void 0,i=n.forceNodeDataRefresh;return e.update(t,{forceNodeDataRefresh:i})})),e.seriesStateManager=new go,e.seriesLayerManager=new mo(e.seriesRoot),e.callbackCache=new po,e.animationManager=new sr(e.interactionManager),e.animationManager.skipAnimations=!0,e.animationManager.play(),e.tooltip=new In(e.scene.canvas.element,r,r.body),e.tooltipManager=new gr(e.tooltip,e.interactionManager),e.overlays=new Gi(e.element),e.highlight=new Er,e.container=u,e.debug=!1,Di.observe(e.element,(function(t){var n,i=t.width,r=t.height;if(e.autoSize&&(0!==i||0!==r)){var o=null!==(n=e._lastAutoSize)&&void 0!==n?n:[],a=(0,re.Z)(o,2),s=a[0],l=void 0===s?0:s,u=a[1];l===i&&(void 0===u?0:u)===r||(e._lastAutoSize=[i,r],e.resize())}})),e.layoutService.addListener("start-layout",(function(t){return e.positionPadding(t.shrinkRect)})),e.layoutService.addListener("start-layout",(function(t){return e.positionCaptions(t.shrinkRect)})),e.interactionManager.addListener("click",(function(t){return e.onClick(t)})),e.interactionManager.addListener("dblclick",(function(t){return e.onDoubleClick(t)})),e.interactionManager.addListener("hover",(function(t){return e.onMouseMove(t)})),e.interactionManager.addListener("leave",(function(t){return e.onLeave(t)})),e.interactionManager.addListener("page-left",(function(){return e.destroy()})),e.interactionManager.addListener("wheel",(function(){return e.disablePointer()})),e.animationManager.addListener("animation-frame",(function(t){e.update(Cr.SCENE_RENDER)})),e.highlightManager.addListener("highlight-change",(function(t){return e.changeHighlightDatum(t)})),e.zoomManager.addListener("zoom-change",(function(t){return e.update(Cr.PROCESS_DATA,{forceNodeDataRefresh:!0})})),e.attachLegend("category"),e}return(0,f.Z)(n,[{key:"getOptions",value:function(){var e,t=this.queuedUserOptions;return Bi([null!==(e=t[t.length-1])&&void 0!==e?e:this.userOptions])}},{key:"autoSizeChanged",value:function(e){var t=this.element.style;if(e){if(t.display="block",t.width="100%",t.height="100%",!this._lastAutoSize)return;this.resize()}else t.display="inline-block",t.width="auto",t.height="auto"}},{key:"download",value:function(e,t){this.scene.download(e,t)}},{key:"destroyed",get:function(){return this._destroyed}},{key:"addModule",value:function(e){if(null!=this.modules[e.optionsKey])throw new Error("AG Charts - module already initialised: "+e.optionsKey);var t=new e.instanceConstructor(this.getModuleContext());this.modules[e.optionsKey]={instance:t},this[e.optionsKey]=t}},{key:"removeModule",value:function(e){var t,n;null===(n=null===(t=this.modules[e.optionsKey])||void 0===t?void 0:t.instance)||void 0===n||n.destroy(),delete this.modules[e.optionsKey],delete this[e.optionsKey]}},{key:"isModuleEnabled",value:function(e){return null!=this.modules[e.optionsKey]}},{key:"getModuleContext",value:function(){var e=this.scene,t=this.animationManager,n=this.chartEventManager,i=this.cursorManager,r=this.highlightManager,o=this.interactionManager,a=this.tooltipManager,s=this.zoomManager,l=this.dataService,u=this.layoutService,c=this.updateService,d=this.seriesStateManager,h=this.seriesLayerManager;return{scene:e,animationManager:t,chartEventManager:n,cursorManager:i,highlightManager:r,interactionManager:o,tooltipManager:a,zoomManager:s,dataService:l,layoutService:u,updateService:c,mode:this.mode,seriesStateManager:d,seriesLayerManager:h,callbackCache:this.callbackCache}}},{key:"destroy",value:function(e){var t;if(!this._destroyed){var n=null===e||void 0===e?void 0:e.keepTransferableResources,i=void 0;this._performUpdateType=Cr.NONE,this._pendingFactoryUpdates.splice(0),this.tooltipManager.destroy(),this.tooltip.destroy(),null===(t=this.legend)||void 0===t||t.destroy(),this.overlays.noData.hide(),Di.unobserve(this.element);for(var r=0,o=Object.entries(this.modules);r<o.length;r++){var a=(0,re.Z)(o[r],2),s=a[0];a[1].instance.destroy(),delete this.modules[s],delete this[s]}return this.interactionManager.destroy(),this.animationManager.stop(),n?(this.scene.strip(),i={container:this.container,scene:this.scene,element:this.element}):(this.scene.destroy(),this.container=void 0),this.removeAllSeries(),this.seriesLayerManager.destroy(),this.axes.forEach((function(e){return e.destroy()})),this.axes=[],this.callbackCache.invalidateCache(),this._destroyed=!0,i}}},{key:"log",value:function(){this.debug&&Oe.debug.apply(Oe,arguments)}},{key:"disablePointer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e||this.tooltipManager.removeTooltip(this.id),this.highlightManager.updateHighlight(this.id),this.lastInteractionEvent&&(this.lastInteractionEvent=void 0)}},{key:"requestFactoryUpdate",value:function(e){var t=this._pendingFactoryUpdates,n=t.length;0===n?(t.push(e),this._processCallbacks().catch((function(e){return Oe.errorOnce(e)}))):t.splice(1,n-1,e)}},{key:"_processCallbacks",value:function(){return Co(this,void 0,void 0,(0,ie.Z)().mark((function e(){var t;return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this._pendingFactoryUpdates;case 1:if(!(t.length>0)){e.next=18;break}if(!this.updatePending){e.next=6;break}return e.next=5,Ii(1);case 5:return e.abrupt("continue",1);case 6:return e.prev=6,e.next=9,t[0]();case 9:this.callbackCache.invalidateCache(),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),Oe.error("update error",e.t0);case 15:t.shift(),e.next=1;break;case 18:case"end":return e.stop()}}),e,this,[[6,12]])})))}},{key:"performUpdateType",get:function(){return this._performUpdateType}},{key:"updatePending",get:function(){return this._performUpdateType!==Cr.NONE||null!=this.lastInteractionEvent}},{key:"lastPerformUpdateError",get:function(){return this._lastPerformUpdateError}},{key:"awaitUpdateCompletion",value:function(){return Co(this,void 0,void 0,(0,ie.Z)().mark((function e(){return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.performUpdateTrigger.await();case 2:case"end":return e.stop()}}),e,this)})))}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Cr.FULL,t=arguments.length>1?arguments[1]:void 0,n=null!==t&&void 0!==t?t:{},i=n.forceNodeDataRefresh,r=void 0!==i&&i,o=n.seriesToUpdate,a=void 0===o?this.series:o;r&&this.series.forEach((function(e){return e.markNodeDataDirty()}));var s,l=(0,ne.Z)(a);try{for(l.s();!(s=l.n()).done;){var u=s.value;this.seriesToUpdate.add(u)}}catch(c){l.e(c)}finally{l.f()}e<this._performUpdateType&&(this._performUpdateType=e,this.performUpdateTrigger.schedule())}},{key:"performUpdate",value:function(e){var t;return Co(this,void 0,void 0,(0,ie.Z)().mark((function n(){var i,r,o,a,s,l,u;return(0,ie.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=this._performUpdateType,r=this.extraDebugStats,this.log("Chart.performUpdate() - start",Cr[i]),o=[performance.now()],n.t0=i,n.next=n.t0===Cr.FULL||n.t0===Cr.PROCESS_DATA?6:n.t0===Cr.PERFORM_LAYOUT?10:n.t0===Cr.SERIES_UPDATE?17:n.t0===Cr.TOOLTIP_RECALCULATION?23:n.t0===Cr.SCENE_RENDER?25:n.t0===Cr.NONE?28:29;break;case 6:return n.next=8,this.processData();case 8:this.disablePointer(!0),o.push(performance.now());case 10:if(this.checkFirstAutoSize()){n.next=12;break}return n.abrupt("break",29);case 12:return n.next=14,this.performLayout();case 14:this.handleOverlays(),this.log("Chart.performUpdate() - seriesRect",this.seriesRect),o.push(performance.now());case 17:return a=this.seriesRect,s=(0,te.Z)(this.seriesToUpdate).map((function(e){return e.update({seriesRect:a})})),this.seriesToUpdate.clear(),n.next=22,Promise.all(s);case 22:o.push(performance.now());case 23:l=this.tooltipManager.getTooltipMeta(this.id),i<Cr.SERIES_UPDATE&&"hover"===(null===(t=null===l||void 0===l?void 0:l.event)||void 0===t?void 0:t.type)&&this.handlePointer(l.event);case 25:return n.next=27,this.scene.render({debugSplitTimes:o,extraDebugStats:r});case 27:this.extraDebugStats={};case 28:this._performUpdateType=Cr.NONE;case 29:u=performance.now(),this.log("Chart.performUpdate() - end",{chart:this,durationMs:Math.round(100*(u-o[0]))/100,count:e,performUpdateType:Cr[i]});case 31:case"end":return n.stop()}}),n,this)})))}},{key:"checkFirstAutoSize",value:function(){if(this.autoSize&&!this._lastAutoSize){var e=this._performUpdateNoRenderCount++,t=10*(2^e);if(e<5)return this._performUpdateType=Cr.PERFORM_LAYOUT,this.performUpdateTrigger.schedule(t),this.log("Chart.checkFirstAutoSize() - backing off until first size update",t),!1;this.log("Chart.checkFirstAutoSize() - timeout for first size update.")}return this._performUpdateNoRenderCount=0,!0}},{key:"axes",get:function(){return this._axes},set:function(e){var t=this,n=new Set;this._axes.forEach((function(e){e.detachAxis(t.axisGroup),n.add(e)})),this._axes=e.filter((function(e){return!e.linkedTo})).concat(e.filter((function(e){return e.linkedTo}))),this._axes.forEach((function(e){e.attachAxis(t.axisGroup),n.delete(e)})),this.zoomManager.updateAxes(this._axes),n.forEach((function(e){return e.destroy()}))}},{key:"series",get:function(){return this._series},set:function(e){var t=this;this.removeAllSeries(),e.forEach((function(e){return t.addSeries(e)}))}},{key:"addSeries",value:function(e){var t=this.series;return!!(t.indexOf(e)<0)&&(t.push(e),null==e.rootGroup.parent&&this.seriesLayerManager.requestGroup(e),this.initSeries(e),!0)}},{key:"initSeries",value:function(e){e.chart=this,e.data||(e.data=this.data),this.addSeriesListeners(e),e.addChartEventListeners()}},{key:"removeAllSeries",value:function(){var e=this;this.series.forEach((function(t){t.removeEventListener("nodeClick",e.onSeriesNodeClick),t.removeEventListener("nodeDoubleClick",e.onSeriesNodeDoubleClick),t.destroy(),t.chart=void 0})),this._series=[]}},{key:"addSeriesListeners",value:function(e){this.hasEventListener("seriesNodeClick")&&e.addEventListener("nodeClick",this.onSeriesNodeClick),this.hasEventListener("seriesNodeDoubleClick")&&e.addEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick)}},{key:"updateAllSeriesListeners",value:function(){var e=this;this.series.forEach((function(t){t.removeEventListener("nodeClick",e.onSeriesNodeClick),t.removeEventListener("nodeDoubleClick",e.onSeriesNodeDoubleClick),e.addSeriesListeners(t)}))}},{key:"assignSeriesToAxes",value:function(){var e=this;this.axes.forEach((function(t){t.boundSeries=e.series.filter((function(e){return e.axes[t.direction]===t}))}))}},{key:"assignAxesToSeries",value:function(){var e=this,t={};this.axes.forEach((function(e){var n,i=e.direction;(null!==(n=t[i])&&void 0!==n?n:t[i]=[]).push(e)})),this.series.forEach((function(n){n.directions.forEach((function(i){var r=t[i];if(r){var o=n.getKeys(i),a=e.findMatchingAxis(r,n.getKeys(i));a?n.axes[i]=a:Oe.warn("no matching axis for direction [".concat(i,"] and keys [").concat(o,"]; check series and axes configuration."))}else Oe.warn("no available axis for direction [".concat(i,"]; check series and axes configuration."))}))}))}},{key:"findMatchingAxis",value:function(e,t){var n,i=(0,ne.Z)(e);try{for(i.s();!(n=i.n()).done;){var r=n.value,o=r.keys;if(!o.length)return r;if(t){var a,s=(0,ne.Z)(t);try{for(s.s();!(a=s.n()).done;){var l=a.value;if(o.indexOf(l)>=0)return r}}catch(u){s.e(u)}finally{s.f()}}}}catch(u){i.e(u)}finally{i.f()}}},{key:"resize",value:function(e,t){var n,i,r,o;null!==e&&void 0!==e||(e=null!==(n=this.width)&&void 0!==n?n:this.autoSize?null===(i=this._lastAutoSize)||void 0===i?void 0:i[0]:this.scene.canvas.width),null!==t&&void 0!==t||(t=null!==(r=this.height)&&void 0!==r?r:this.autoSize?null===(o=this._lastAutoSize)||void 0===o?void 0:o[1]:this.scene.canvas.height),this.log("Chart.resize()",{width:e,height:t}),e&&t&&Number.isFinite(e)&&Number.isFinite(t)&&this.scene.resize(e,t)&&(this.disablePointer(),this.update(Cr.PERFORM_LAYOUT,{forceNodeDataRefresh:!0}))}},{key:"processData",value:function(){return Co(this,void 0,void 0,(0,ie.Z)().mark((function e(){var t,n;return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.axes.length>0&&(this.assignAxesToSeries(),this.assignSeriesToAxes()),t=new vo,n=this.series.map((function(e){return e.processData(t)})),e.next=5,t.execute();case 5:return e.next=7,Promise.all(n);case 7:return e.next=9,this.updateLegend();case 9:case"end":return e.stop()}}),e,this)})))}},{key:"placeLabels",value:function(){var e,t,n=[],i=[],r=(0,ne.Z)(this.series);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o.visible){var a=o.getLabelData();a&&(null!=(t=a[0])&&"object"===typeof t.point&&"object"===typeof t.label)&&(i.push(a),n.push(o))}}}catch(u){r.e(u)}finally{r.f()}var s=this.seriesRect,l=s&&i.length>0?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,i=[];e=e.map((function(e){return e.slice().sort((function(e,t){return t.point.size-e.point.size}))}));for(var r=0;r<e.length;r++){var o=i[r]=[],a=e[r];if((null===a||void 0===a?void 0:a.length)&&a[0].label)for(var s=function(r,s){var l=a[r],u=l.label,c=.5*l.point.size,d=l.point.x-.5*u.width,h=l.point.y-c-u.height-n,p=u.width,f=u.height;if(t&&!Pi(t,d,h,p,f))return"continue";var v=e.some((function(e){return e.some((function(e){return Ti(e.point,d,h,p,f)}))}));if(v)return"continue";var g=i.some((function(e){return e.some((function(e){return Oi(e,d,h,p,f)}))}));if(g)return"continue";o.push({index:r,text:u.text,x:d,y:h,width:p,height:f,datum:l})},l=0,u=a.length;l<u;l++)s(l,u)}return i}(i,{x:0,y:0,width:s.width,height:s.height}):[];return new Map(l.map((function(e,t){return[n[t],e]})))}},{key:"attachLegend",value:function(e){var t;if(this.legendType===e&&this.legend)return this.legend;null===(t=this.legend)||void 0===t||t.destroy(),this.legend=void 0;var n=function(e,t){if(co[e])return new co[e](t);throw new Error("AG Charts - unknown legend type: ".concat(e))}(e,this.getModuleContext());return n.attachLegend(this.scene.root),this.legend=n,this.legendType=e,n}},{key:"setLegendInit",value:function(e){this.applyLegendOptions=e}},{key:"updateLegend",value:function(){var e;return Co(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[],this.series.filter((function(e){return e.showInLegend})).forEach((function(e){var t=e.getLegendData();n.push.apply(n,(0,te.Z)(t))})),i=n.length>0?n[0].legendType:"category",r=this.attachLegend(i),null===(e=this.applyLegendOptions)||void 0===e||e.call(this,r),"category"===i&&this.validateLegendData(n),r.data=n;case 7:case"end":return t.stop()}}),t,this)})))}},{key:"validateLegendData",value:function(e){var t=this,n={};e.forEach((function(e){var i,r,o,a,s,l=null===(i=t.series.find((function(t){return t.id===e.seriesId})))||void 0===i?void 0:i.type;if(l){var u=e;null!==(r=n[l])&&void 0!==r||(n[l]=(0,se.Z)({},u.label.text,new Set)),null!==(o=(a=n[l])[s=u.label.text])&&void 0!==o||(a[s]=new Set),null!=u.marker.fill&&n[l][u.label.text].add(u.marker.fill)}})),Object.keys(n).forEach((function(e){Object.keys(n[e]).forEach((function(t){n[e][t].size>1&&Oe.warnOnce("legend item '".concat(t,"' has multiple fill colors, this may cause unexpected behaviour."))}))}))}},{key:"performLayout",value:function(){return Co(this,void 0,void 0,(0,ie.Z)().mark((function e(){var t,n,i,r,o,a;return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null!=this.scene.root&&(this.scene.root.visible=!0),t=this.scene,n=t.width,i=t.height,r=new he(0,0,n,i),o=this.layoutService.dispatchPerformLayout("start-layout",{shrinkRect:r}),r=o.shrinkRect,a=this.layoutService.dispatchPerformLayout("before-series",{shrinkRect:r}),r=a.shrinkRect,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)})))}},{key:"positionPadding",value:function(e){var t=this.padding;return e.shrink(t.left,"left"),e.shrink(t.top,"top"),e.shrink(t.right,"right"),e.shrink(t.bottom,"bottom"),{shrinkRect:e}}},{key:"positionCaptions",value:function(e){var t,n=this.title,i=this.subtitle,r=this.footnote,o=e.clone(),a=function(t){var n,i=e.height/10,r=null!==(n=t.lineHeight)&&void 0!==n?n:t.fontSize*qe.defaultLineHeightRatio,o=e.width,a=Math.max(r,i);t.computeTextWrap(o,a)},s=function(e){var t,n=o.y;e.node.x=o.x+o.width/2,e.node.y=n,e.node.textBaseline="top",a(e);var i=e.node.computeBBox(),r=Math.ceil(i.y-n+i.height+(null!==(t=e.spacing)&&void 0!==t?t:0));o.shrink(r,"top")};return n&&(n.node.visible=n.enabled,n.node.visible&&s(n)),i&&(i.node.visible=null!==(t=(null===n||void 0===n?void 0:n.enabled)&&i.enabled)&&void 0!==t&&t,i.node.visible&&s(i)),r&&(r.node.visible=r.enabled,r.node.visible&&function(e){var t,n=o.y+o.height;e.node.x=o.x+o.width/2,e.node.y=n,e.node.textBaseline="bottom",a(e);var i=e.node.computeBBox(),r=Math.ceil(n-i.y+(null!==(t=e.spacing)&&void 0!==t?t:0));o.shrink(r,"bottom")}(r)),{shrinkRect:o}}},{key:"getSeriesRect",value:function(){return this.seriesRect}},{key:"pickSeriesNode",value:function(e,t,n){var i,r,o,a=performance.now(),s=t?[ri.EXACT_SHAPE_MATCH]:void 0,l=(0,te.Z)(this.series).reverse(),u=void 0,c=(0,ne.Z)(l);try{for(c.s();!(o=c.n()).done;){var d=o.value;if(d.visible&&d.rootGroup.visible){var h=null!==(i=d.pickNode(e,s))&&void 0!==i?i:{},p=h.match,f=h.distance;if(p&&null!=f&&((!u||u.distance>f)&&f<=(null!==n&&void 0!==n?n:1/0)&&(u={series:d,distance:f,datum:p}),0===f))break}}}catch(v){c.e(v)}finally{c.f()}return this.extraDebugStats.pickSeriesNode=Math.round((null!==(r=this.extraDebugStats.pickSeriesNode)&&void 0!==r?r:0)+(performance.now()-a)),u}},{key:"onMouseMove",value:function(e){this.lastInteractionEvent=e,this.pointerScheduler.schedule(),this.extraDebugStats.mouseX=e.offsetX,this.extraDebugStats.mouseY=e.offsetY,this.update(Cr.SCENE_RENDER)}},{key:"onLeave",value:function(e){this.tooltip.pointerLeftOntoTooltip(e)||this.disablePointer()}},{key:"handlePointer",value:function(e){var t=this,n=this.lastPick,i=this.hoverRect,r=e.offsetX,o=e.offsetY,a=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];n&&t.disablePointer(e)};(null===i||void 0===i?void 0:i.containsPoint(r,o))?(this.handlePointerTooltip(e,a),this.handlePointerNode(e)):a()}},{key:"handlePointerTooltip",value:function(e,t){var n,i,r,o=this.lastPick,a=this.tooltip.range,s=e.pageX,l=e.pageY,u=e.offsetX,c=e.offsetY;"number"===typeof a&&Number.isFinite(a)&&(r=a);var d=this.pickSeriesNode({x:u,y:c},"exact"===a,r);if(!d)return this.tooltipManager.updateTooltip(this.id),void("tooltip"===this.highlight.range&&t(!0));var h,p="node"===this.highlight.range||!o||o.datum!==d.datum;p?(h=d.series.getTooltipHtml(d.datum),"tooltip"===this.highlight.range&&this.highlightManager.updateHighlight(this.id,d.datum)):o&&(o.event=e.sourceEvent);var f=null!=r,v=this.tooltip.enabled&&d.series.tooltip.enabled,g="exact"===a&&0===d.distance,m=v&&("nearest"===a||f||g)&&(!p||void 0!==h),y={xOffset:d.datum.series.tooltip.position.xOffset,yOffset:d.datum.series.tooltip.position.yOffset},C=this.mergePointerDatum({pageX:s,pageY:l,offsetX:u,offsetY:c,event:e,showArrow:d.series.tooltip.showArrow,position:y},d.datum);C.enableInteraction=null!==(i=null===(n=d.series.tooltip.interaction)||void 0===n?void 0:n.enabled)&&void 0!==i&&i,m&&this.tooltipManager.updateTooltip(this.id,C,h)}},{key:"handlePointerNode",value:function(e){var t=this;this.checkSeriesNodeRange(e,(function(e,n){(e.hasEventListener("nodeClick")||e.hasEventListener("nodeDoubleClick"))&&t.cursorManager.updateCursor("chart","pointer"),"node"===t.highlight.range&&t.highlightManager.updateHighlight(t.id,n)}))||(this.cursorManager.updateCursor("chart"),"node"===this.highlight.range&&this.highlightManager.updateHighlight(this.id))}},{key:"onClick",value:function(e){this.checkSeriesNodeClick(e)?this.update(Cr.SERIES_UPDATE):this.fireEvent({type:"click",event:e.sourceEvent})}},{key:"onDoubleClick",value:function(e){this.checkSeriesNodeDoubleClick(e)?this.update(Cr.SERIES_UPDATE):this.fireEvent({type:"doubleClick",event:e.sourceEvent})}},{key:"checkSeriesNodeClick",value:function(e){return this.checkSeriesNodeRange(e,(function(t,n){return t.fireNodeClickEvent(e.sourceEvent,n)}))}},{key:"checkSeriesNodeDoubleClick",value:function(e){return this.checkSeriesNodeRange(e,(function(t,n){return t.fireNodeDoubleClickEvent(e.sourceEvent,n)}))}},{key:"checkSeriesNodeRange",value:function(e,t){var n,i=this.pickSeriesNode({x:e.offsetX,y:e.offsetY},!1),r=null===i||void 0===i?void 0:i.datum,o=null===r||void 0===r?void 0:r.series.nodeClickRange;if(r&&"nearest"===o)return t(r.series,r),!0;"number"===typeof o&&Number.isFinite(o)&&(n=o);var a=this.pickSeriesNode({x:e.offsetX,y:e.offsetY},"exact"===o,n);if(!a)return!1;var s=null!=n,l="exact"===o&&0===a.distance;return!(!s&&!l)&&(t(a.series,a.datum),!0)}},{key:"mergePointerDatum",value:function(e,t){if("node"===t.series.tooltip.position.type&&t.nodeMidPoint){var n=t.nodeMidPoint,i=n.x,r=n.y,o=this.scene.canvas,a=t.series.contentGroup.inverseTransformPoint(i,r),s=o.element.getBoundingClientRect();return Object.assign(Object.assign({},e),{pageX:Math.round(s.left+window.scrollX+a.x),pageY:Math.round(s.top+window.scrollY+a.y),offsetX:Math.round(a.x),offsetY:Math.round(a.y)})}return e}},{key:"changeHighlightDatum",value:function(e){var t,n,i=new Set,r=null!==(t=e.currentHighlight)&&void 0!==t?t:{},o=r.series,a=void 0===o?void 0:o,s=r.datum,l=null!==(n=e.previousHighlight)&&void 0!==n?n:{},u=l.series,c=void 0===u?void 0:u,d=l.datum;c&&i.add(c),a&&i.add(a),(null===c||void 0===c?void 0:c.cursor)&&d&&this.cursorManager.updateCursor(c.id),(null===a||void 0===a?void 0:a.cursor)&&s&&this.cursorManager.updateCursor(a.id,a.cursor),this.lastPick=e.currentHighlight?{datum:e.currentHighlight}:void 0,null==a||null==c?this.update(Cr.SERIES_UPDATE):this.update(Cr.SERIES_UPDATE,{seriesToUpdate:i})}},{key:"waitForUpdate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3;return Co(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=performance.now();case 1:if(!(this._pendingFactoryUpdates.length>0||this.updatePending)){t.next=8;break}if(!(performance.now()-n>e)){t.next=4;break}throw new Error("waitForUpdate() timeout reached.");case 4:return t.next=6,Ii(5);case 6:t.next=1;break;case 8:return t.next=10,this.awaitUpdateCompletion();case 10:case"end":return t.stop()}}),t,this)})))}},{key:"handleOverlays",value:function(){this.handleNoDataOverlay()}},{key:"handleNoDataOverlay",value:function(){var e=!this.series.some((function(e){return e.hasData()})),t=this.getSeriesRect();e&&t?this.overlays.noData.show(t):this.overlays.noData.hide()}}]),n}(it);function wo(e,t,n){return Math.max(t,Math.min(n,e))}yo([ii({newValue:function(e){this.scene.debug.consoleLog=e,this.animationManager&&(this.animationManager.debug=e)}})],ko.prototype,"debug",void 0),yo([ii({newValue:function(e){this.destroyed||e.appendChild(this.element)},oldValue:function(e){e.removeChild(this.element)}})],ko.prototype,"container",void 0),yo([ii({newValue:function(e){var t;null===(t=this.series)||void 0===t||t.forEach((function(t){return t.data=e}))}})],ko.prototype,"data",void 0),yo([ii({newValue:function(e){this.resize(e)}})],ko.prototype,"width",void 0),yo([ii({newValue:function(e){this.resize(void 0,e)}})],ko.prototype,"height",void 0),yo([ii({changeValue:function(e){this.autoSizeChanged(e)}}),vt(Dt)],ko.prototype,"autoSize",void 0),yo([ii({newValue:function(e){var t;null===(t=this.scene.root)||void 0===t||t.appendChild(e.node)},oldValue:function(e){var t;null===(t=this.scene.root)||void 0===t||t.removeChild(e.node)}})],ko.prototype,"title",void 0),yo([ii({newValue:function(e){var t;null===(t=this.scene.root)||void 0===t||t.appendChild(e.node)},oldValue:function(e){var t;null===(t=this.scene.root)||void 0===t||t.removeChild(e.node)}})],ko.prototype,"subtitle",void 0),yo([ii({newValue:function(e){var t;null===(t=this.scene.root)||void 0===t||t.appendChild(e.node)},oldValue:function(e){var t;null===(t=this.scene.root)||void 0===t||t.removeChild(e.node)}})],ko.prototype,"footnote",void 0),yo([vt(Xt("standalone","integrated"))],ko.prototype,"mode",void 0);var So=function(){function e(){(0,p.Z)(this,e),this.type="band",this.cache=null,this.cacheProps=["_domain","range","_paddingInner","_paddingOuter","round","interval"],this.index=new Map,this.ordinalRange=[],this._domain=[],this.range=[0,1],this._bandwidth=1,this._rawBandwidth=1,this._paddingInner=0,this._paddingOuter=0,this.round=!1}return(0,f.Z)(e,[{key:"didChange",value:function(){var e=this,t=this.cache,n=!t||this.cacheProps.some((function(n){return e[n]!==t[n]}));return!!n&&(this.cache={},this.cacheProps.forEach((function(t){return e.cache[t]=e[t]})),!0)}},{key:"refresh",value:function(){this.didChange()&&this.update()}},{key:"domain",get:function(){return this._domain},set:function(e){var t=[];this.index=new Map;var n=this.index;e.forEach((function(e){void 0===n.get(e)&&n.set(e,t.push(e)-1)})),this._domain=t}},{key:"ticks",value:function(){this.refresh();var e=this.interval,t=void 0===e?1:e,n=Math.abs(Math.round(t));return this._domain.filter((function(e,t){return t%n===0}))}},{key:"convert",value:function(e){this.refresh();var t=this.index.get(e);if(void 0===t)return NaN;var n=this.ordinalRange[t];return void 0===n?NaN:n}},{key:"invert",value:function(e){this.refresh();var t=this.ordinalRange.findIndex((function(t){return t===e}));return this.domain[t]}},{key:"bandwidth",get:function(){return this.refresh(),this._bandwidth}},{key:"rawBandwidth",get:function(){return this.refresh(),this._rawBandwidth}},{key:"padding",get:function(){return this._paddingInner},set:function(e){e=wo(e,0,1),this._paddingInner=e,this._paddingOuter=e}},{key:"paddingInner",get:function(){return this._paddingInner},set:function(e){this._paddingInner=wo(e,0,1)}},{key:"paddingOuter",get:function(){return this._paddingOuter},set:function(e){this._paddingOuter=wo(e,0,1)}},{key:"update",value:function(){var e=this._domain.length;if(0!==e){for(var t=this.round,n=this._paddingInner,i=this._paddingOuter,r=(0,re.Z)(this.range,2),o=r[0],a=r[1]-o,s=a/Math.max(1,e+2*i-n),l=t?Math.floor(s):s,u=o+(a-l*(e-n))/2,c=t?Math.round(u):u,d=l*(1-n),h=t?Math.round(d):d,p=s*(1-n),f=[],v=0;v<e;v++)f.push(c+l*v);this._bandwidth=h,this._rawBandwidth=p,this.ordinalRange=f}}}]),e}(),bo=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Eo=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.call(this)).x1=0,e.y1=0,e.x2=0,e.y2=0,e.restoreOwnStyles(),e}return(0,f.Z)(n,[{key:"computeBBox",value:function(){return new he(this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)}},{key:"isPointInPath",value:function(e,t){return!1}},{key:"render",value:function(e){var t,i=e.ctx,r=e.forceRender,o=e.stats;if(this.dirty!==fe.NONE||r){this.computeTransformMatrix(),this.matrix.toContext(i);var a=this.x1,s=this.y1,l=this.x2,u=this.y2;if(a===l){var c=Math.round(a)+Math.floor(this.strokeWidth)%2/2;a=c,l=c}else if(s===u){var d=Math.round(s)+Math.floor(this.strokeWidth)%2/2;s=d,u=d}i.beginPath(),i.moveTo(a,s),i.lineTo(l,u),this.fillStroke(i),null===(t=this.fillShadow)||void 0===t||t.markClean(),(0,oe.Z)((0,ae.Z)(n.prototype),"render",this).call(this,e)}else o&&(o.nodesSkipped+=this.nodeCount.count)}}]),n}(Ke);Eo.className="Line",Eo.defaultStyles=Object.assign({},Ke.defaultStyles,{fill:void 0,strokeWidth:1}),bo([Ce({redraw:fe.MAJOR})],Eo.prototype,"x1",void 0),bo([Ce({redraw:fe.MAJOR})],Eo.prototype,"y1",void 0),bo([Ce({redraw:fe.MAJOR})],Eo.prototype,"x2",void 0),bo([Ce({redraw:fe.MAJOR})],Eo.prototype,"y2",void 0);var xo=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Ro=function(){function e(){(0,p.Z)(this,e),this.node=new qe,this.enabled=!1,this.text=void 0,this.fontSize=10,this.fontFamily="sans-serif",this.spacing=e.PADDING,this.lineHeight=void 0,this.maxWidth=void 0,this.maxHeight=void 0,this.wrapping="always";var t=this.node;t.textAlign="center",t.pointerEvents=ke.None}return(0,f.Z)(e,[{key:"computeTextWrap",value:function(e,t){var n,i,r=this.text,o=this.wrapping,a=Math.min(null!==(n=this.maxWidth)&&void 0!==n?n:1/0,e),s=null!==(i=this.maxHeight)&&void 0!==i?i:t;if(isFinite(a)||isFinite(s)){var l=qe.wrap(null!==r&&void 0!==r?r:"",a,s,this,o);this.node.text=l}else this.node.text=r}}]),e}();function Do(e,t){return e.length===t.length&&e.every((function(e,n){return Number(e)===Number(t[n])}))}Ro.PADDING=10,xo([vt(Dt)],Ro.prototype,"enabled",void 0),xo([vt(Pt),ni("node")],Ro.prototype,"text",void 0),xo([vt(nn),ni("node")],Ro.prototype,"fontStyle",void 0),xo([vt(on),ni("node")],Ro.prototype,"fontWeight",void 0),xo([vt(Bt(0)),ni("node")],Ro.prototype,"fontSize",void 0),xo([vt(Ot),ni("node")],Ro.prototype,"fontFamily",void 0),xo([vt(Zt),ni("node","fill")],Ro.prototype,"color",void 0),xo([vt(Wt(0))],Ro.prototype,"spacing",void 0),xo([vt(Wt(0))],Ro.prototype,"lineHeight",void 0),xo([vt(Wt(0))],Ro.prototype,"maxWidth",void 0),xo([vt(Wt(0))],Ro.prototype,"maxHeight",void 0),xo([vt(Cn)],Ro.prototype,"wrapping",void 0);var To=function(){function e(t,n){(0,p.Z)(this,e),this.domain=t,this.range=n,this.nice=!1,this.tickCount=e.defaultTickCount,this.minTickCount=0,this.maxTickCount=1/0,this.niceDomain=null,this.strictClampByDefault=!1,this.cache=null,this.cacheProps=["domain","range","nice","tickCount","minTickCount","maxTickCount"]}return(0,f.Z)(e,[{key:"transform",value:function(e){return e}},{key:"transformInvert",value:function(e){return e}},{key:"fromDomain",value:function(e){return"number"===typeof e?e:e instanceof Date?e.getTime():NaN}},{key:"getDomain",value:function(){return this.nice&&(this.refresh(),this.niceDomain)?this.niceDomain:this.domain}},{key:"convert",value:function(e,t){var n,i=this;if(!this.domain||this.domain.length<2)return NaN;this.refresh();var r=null!==(n=null===t||void 0===t?void 0:t.strict)&&void 0!==n?n:this.strictClampByDefault,o=this.getDomain().map((function(e){return i.transform(e)})),a=(0,re.Z)(o,2),s=a[0],l=a[1],u=this.range,c=(0,re.Z)(u,2),d=c[0],h=c[1];return(e=this.transform(e))<s?r?NaN:d:e>l?r?NaN:h:s===l?(d+h)/2:e===s?d:e===l?h:d+(this.fromDomain(e)-this.fromDomain(s))/(this.fromDomain(l)-this.fromDomain(s))*(h-d)}},{key:"invert",value:function(e){var t=this;this.refresh();var n,i=this.getDomain().map((function(e){return t.transform(e)})),r=(0,re.Z)(i,2),o=r[0],a=r[1],s=this.range,l=(0,re.Z)(s,2),u=l[0],c=l[1],d=u>c;return e<(d?c:u)?d?a:o:e>(d?u:c)?d?o:a:(n=u===c?this.toDomain((this.fromDomain(o)+this.fromDomain(a))/2):this.toDomain(this.fromDomain(o)+(e-u)/(c-u)*(this.fromDomain(a)-this.fromDomain(o))),this.transformInvert(n))}},{key:"didChange",value:function(){var e=this,t=this.cache,n=!t||this.cacheProps.some((function(n){return e[n]!==t[n]}));return!!n&&(this.cache={},this.cacheProps.forEach((function(t){return e.cache[t]=e[t]})),!0)}},{key:"refresh",value:function(){this.didChange()&&this.update()}},{key:"isDenseInterval",value:function(e){var t=e.start,n=e.stop,i=e.interval,r=e.count,o=this.range,a=n-t,s=Math.min(o[0],o[1]);return null!==r&&void 0!==r||(r=a/("number"===typeof i?i:1)),r>=Math.max(o[0],o[1])-s&&(Oe.warn("the configured tick interval results in more than 1 tick per pixel, ignoring. Supply a larger tick interval or omit this configuration."),!0)}}]),e}();To.defaultTickCount=5,To.defaultMaxTickCount=6;var Oo=n(8737);function Po(e,t,n,i,r){if(n<2)return Lo(e,t,t-e);var o=Mo(e,t,n,i,r);return isNaN(o)?new No(0):Lo(e=Math.ceil(e/o)*o,t=Math.floor(t/o)*o,o)}var Ao=[1,2,5,10];function Mo(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1/0,o=(t-e)/n,a=Math.floor(Math.log10(o)),s=Math.pow(10,a),l=Ao.map((function(o){var a=o*s,l=Math.ceil((t-e)/a);return{multiplier:o,isWithinBounds:l>=i&&l<=r,diffCount:Math.abs(l-n)}})).sort((function(e,t){return e.isWithinBounds!==t.isWithinBounds?e.isWithinBounds?-1:1:e.diffCount-t.diffCount}))[0].multiplier;return!l||isNaN(l)?NaN:l*s}var No=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e,i){var r;if((0,p.Z)(this,n),r=t.call(this),i)for(var o=0,a=i.length;o<a;o++)r[o]=i[o];return r.fractionDigits=e,r}return(0,f.Z)(n)}((0,Oo.Z)(Array));function Lo(e,t,n){for(var i=function(e){var t,n,i=e.split("e");return Math.max((null!==(n=null===(t=i[0].split(".")[1])||void 0===t?void 0:t.length)&&void 0!==n?n:0)-Number(i[1]),0)}((n%1).toExponential()),r=Math.pow(10,i),o=Math.ceil((t-e)/n),a=new No(i),s=0;s<=o;s++){var l=e+n*s;a.push(Math.round(l*r)/r)}return a}var Io={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 Fo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date(e.getFullYear(),0,1),n=e.getTimezoneOffset()-t.getTimezoneOffset(),i=e.getTime()-t.getTime()+6e4*n,r=864e5;return Math.floor(i/r)}function _o(e,t){var n=(t-new Date(e.getFullYear(),0,1).getDay()+7)%7,i=new Date(e.getFullYear(),0,n+1);return i<=e?Math.floor(Fo(e,i)/7)+1:0}function Go(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.getFullYear(),n=new Date(t,0,1),i=n.getDay(),r=(4-i+7)%7,o=new Date(t,0,r-3+1);return o<=e?Math.floor(Fo(e,o)/7)+1:Go(e,t-1)}var Zo,Vo,Ho={a:function(e){return Io.shortDays[e.getDay()]},A:function(e){return Io.days[e.getDay()]},b:function(e){return Io.shortMonths[e.getMonth()]},B:function(e){return Io.months[e.getMonth()]},c:"%x, %X",d:function(e,t){return Wo(e.getDate(),2,null!==t&&void 0!==t?t:"0")},e:"%_d",f:function(e,t){return Wo(1e3*e.getMilliseconds(),6,null!==t&&void 0!==t?t:"0")},H:function(e,t){return Wo(e.getHours(),2,null!==t&&void 0!==t?t:"0")},I:function(e,t){var n=e.getHours()%12;return 0===n?"12":Wo(n,2,null!==t&&void 0!==t?t:"0")},j:function(e,t){return Wo(Fo(e)+1,3,null!==t&&void 0!==t?t:"0")},m:function(e,t){return Wo(e.getMonth()+1,2,null!==t&&void 0!==t?t:"0")},M:function(e,t){return Wo(e.getMinutes(),2,null!==t&&void 0!==t?t:"0")},L:function(e,t){return Wo(e.getMilliseconds(),3,null!==t&&void 0!==t?t:"0")},p:function(e){return e.getHours()<12?"AM":"PM"},Q:function(e){return String(e.getTime())},s:function(e){return String(Math.floor(e.getTime()/1e3))},S:function(e,t){return Wo(e.getSeconds(),2,null!==t&&void 0!==t?t:"0")},u:function(e){var t=e.getDay();return t<1&&(t+=7),String(t%7)},U:function(e,t){return Wo(_o(e,0),2,null!==t&&void 0!==t?t:"0")},V:function(e,t){return Wo(Go(e),2,null!==t&&void 0!==t?t:"0")},w:function(e,t){return Wo(e.getDay(),2,null!==t&&void 0!==t?t:"0")},W:function(e,t){return Wo(_o(e,1),2,null!==t&&void 0!==t?t:"0")},x:"%-m/%-d/%Y",X:"%-I:%M:%S %p",y:function(e,t){return Wo(e.getFullYear()%100,2,null!==t&&void 0!==t?t:"0")},Y:function(e,t){return Wo(e.getFullYear(),4,null!==t&&void 0!==t?t:"0")},Z:function(e){return function(e){var t=e.getTimezoneOffset(),n=Math.abs(t);return"".concat(t>0?"-":"+").concat(Wo(Math.floor(n/60),2,"0")).concat(Wo(Math.floor(n%60),2,"0"))}(e)},"%":function(){return"%"}},Bo={_:" ",0:"0","-":""};function Wo(e,t,n){var i=String(Math.floor(e));return i.length>=t?i:"".concat(n.repeat(t-i.length)).concat(i)}function zo(e){for(var t=[];e.length>0;){var n=e.indexOf("%");if(0!==n){var i=n>0?e.substring(0,n):e;t.push(i)}if(n<0)break;var r=e[n+1],o=Bo[r];null!=o&&n++;var a=e[n+1],s=Ho[a];if("function"===typeof s)t.push([s,o]);else if("string"===typeof s){var l=zo(s);t.push([l,o])}else t.push("".concat(null!==o&&void 0!==o?o:"").concat(a));e=e.substring(n+2)}return function(e){var n="number"===typeof e?new Date(e):e;return t.map((function(e){return"string"===typeof e?e:e[0](n,e[1])})).join("")}}!function(e){e[e.MILLISECOND=0]="MILLISECOND",e[e.SECOND=1]="SECOND",e[e.MINUTE=2]="MINUTE",e[e.HOUR=3]="HOUR",e[e.WEEK_DAY=4]="WEEK_DAY",e[e.SHORT_MONTH=5]="SHORT_MONTH",e[e.MONTH=6]="MONTH",e[e.SHORT_YEAR=7]="SHORT_YEAR",e[e.YEAR=8]="YEAR"}(Vo||(Vo={}));var Uo=(Zo={},(0,se.Z)(Zo,Vo.MILLISECOND,".%L"),(0,se.Z)(Zo,Vo.SECOND,":%S"),(0,se.Z)(Zo,Vo.MINUTE,"%I:%M"),(0,se.Z)(Zo,Vo.HOUR,"%I %p"),(0,se.Z)(Zo,Vo.WEEK_DAY,"%a"),(0,se.Z)(Zo,Vo.SHORT_MONTH,"%b %d"),(0,se.Z)(Zo,Vo.MONTH,"%B"),(0,se.Z)(Zo,Vo.SHORT_YEAR,"%y"),(0,se.Z)(Zo,Vo.YEAR,"%Y"),Zo);function jo(e){return e instanceof Date?e.getTime():e}var Ko,Yo=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.call(this,[new Date(2022,11,7),new Date(2022,11,8)],[0,1])).type="time",e.cacheProps=["domain","range","nice","tickCount","interval","minTickCount","maxTickCount"],e.year=X,e.month=K,e.week=U,e.day=F,e.hour=L,e.minute=A,e.second=T,e.millisecond=y,e.tickIntervals=[[e.second,1,C],[e.second,5,5e3],[e.second,15,15e3],[e.second,30,3e4],[e.minute,1,k],[e.minute,5,3e5],[e.minute,15,9e5],[e.minute,30,18e5],[e.hour,1,w],[e.hour,3,108e5],[e.hour,6,216e5],[e.hour,12,432e5],[e.day,1,S],[e.day,2,1728e5],[e.week,1,b],[e.week,2,12096e5],[e.week,3,18144e5],[e.month,1,E],[e.month,2,5184e6],[e.month,3,7776e6],[e.month,4,10368e6],[e.month,6,15552e6],[e.year,1,x]],e}return(0,f.Z)(n,[{key:"toDomain",value:function(e){return new Date(e)}},{key:"calculateDefaultTickFormat",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=Vo.YEAR,i=function(e){e<n&&(n=e)},r=(0,ne.Z)(t);try{for(r.s();!(e=r.n()).done;){var o=e.value,a=this.getLowestGranularityFormat(o);i(a)}}catch(h){r.e(h)}finally{r.f()}var s=jo(t[0]),l=jo(t[t.length-1]),u=new Date(s).getFullYear(),c=new Date(l).getFullYear(),d=c-u>0;return this.buildFormatString(n,d)}},{key:"buildFormatString",value:function(e,t){var n=[Uo[e]],i=0,r=this.getDomain(),o=Math.min.apply(Math,(0,te.Z)(r.map(jo))),a=Math.max.apply(Math,(0,te.Z)(r.map(jo)))-o;switch(e){case Vo.SECOND:a/k>1&&n.push(Uo[Vo.MINUTE]);case Vo.MINUTE:a/w>1&&n.push(Uo[Vo.HOUR]);case Vo.HOUR:i=n.length,a/S>1&&n.push(Uo[Vo.WEEK_DAY]);case Vo.WEEK_DAY:if(a/b>1||t){var s=n.indexOf(Uo[Vo.WEEK_DAY]);s>-1&&n.splice(s,1,Uo[Vo.SHORT_MONTH])}case Vo.SHORT_MONTH:case Vo.MONTH:(a/x>1||t)&&n.push(Uo[Vo.YEAR])}return i<n.length&&(n=[].concat((0,te.Z)(n.slice(0,i)),[n.slice(i).join(" ")])),i>0&&i<(n=[].concat((0,te.Z)(n.slice(0,i).reverse()),(0,te.Z)(n.slice(i)))).length&&n.splice(i,0," "),n.join("")}},{key:"getLowestGranularityFormat",value:function(e){return this.second.floor(e)<e?Vo.MILLISECOND:this.minute.floor(e)<e?Vo.SECOND:this.hour.floor(e)<e?Vo.MINUTE:this.day.floor(e)<e?Vo.HOUR:this.month.floor(e)<e?this.week.floor(e)<e?Vo.WEEK_DAY:Vo.SHORT_MONTH:this.year.floor(e)<e?Vo.MONTH:Vo.YEAR}},{key:"defaultTickFormat",value:function(e){var t=this.calculateDefaultTickFormat(e);return function(e){return zo(t)(e)}}},{key:"getTickInterval",value:function(e){for(var t,n,i=e.start,r=e.stop,o=e.count,a=e.minCount,s=e.maxCount,l=this.tickIntervals,u=null!==o&&void 0!==o?o:To.defaultTickCount,c=Math.abs(r-i)/Math.max(u,1),d=0;d<l.length&&c>l[d][2];)d++;if(0===d)n=Math.max(Mo(i,r,u,a,s),1),t=this.millisecond;else if(d===l.length){n=Mo(i/x,r/x,u,a,s),t=this.year}else{var h=c-l[d-1][2]<l[d][2]-c?d-1:d,p=(0,re.Z)(l[h],2);t=p[0],n=p[1]}return t.every(n)}},{key:"invert",value:function(e){return new Date((0,oe.Z)((0,ae.Z)(n.prototype),"invert",this).call(this,e))}},{key:"ticks",value:function(){if(!this.domain||this.domain.length<2)return[];this.refresh();var e=this.getDomain().map(jo),t=(0,re.Z)(e,2),n=t[0],i=t[1];if(void 0!==this.interval)return this.getTicksForInterval({start:n,stop:i});if(this.nice){var r=this.tickCount;if(2===r)return this.niceDomain;if(1===r)return this.niceDomain.slice(0,1)}return this.getDefaultTicks({start:n,stop:i})}},{key:"getDefaultTicks",value:function(e){var t=e.start,n=e.stop,i=this.getTickInterval({start:t,stop:n,count:this.tickCount,minCount:this.minTickCount,maxCount:this.maxTickCount});return i?i.range(new Date(t),new Date(n)):[]}},{key:"getTicksForInterval",value:function(e){var t=e.start,n=e.stop,i=this.interval,r=this.tickIntervals;if(!i)return[];if(i instanceof v){var o=i.range(new Date(t),new Date(n));return this.isDenseInterval({start:t,stop:n,interval:i,count:o.length})?this.getDefaultTicks({start:t,stop:n}):o}var a=Math.abs(i);if(this.isDenseInterval({start:t,stop:n,interval:a}))return this.getDefaultTicks({start:t,stop:n});var s=(0,te.Z)(r);s.reverse();var l=s.find((function(e){return a%e[2]===0}));if(l)return l[0].every(a/(l[2]/l[1])).range(new Date(t),new Date(n));for(var u=new Date(t),c=new Date(n),d=[];u<=c;)d.push(u),(u=new Date(u)).setMilliseconds(u.getMilliseconds()+a);return d}},{key:"tickFormat",value:function(e){var t=e.ticks,n=e.specifier;return void 0==n?this.defaultTickFormat(t):zo(n)}},{key:"update",value:function(){!this.domain||this.domain.length<2||this.nice&&this.updateNiceDomain()}},{key:"updateNiceDomain",value:function(){for(var e=(0,re.Z)(this.domain,2),t=e[0],n=e[1],i=0;i<4;i++){this.updateNiceDomainIteration(t,n);var r=(0,re.Z)(this.niceDomain,2),o=r[0],a=r[1];if(jo(t)===jo(o)&&jo(n)===jo(a))break;t=o,n=a}}},{key:"updateNiceDomainIteration",value:function(e,t){var n,i=jo(e),r=jo(t),o=this.interval;if(o instanceof v)n=o;else{var a="number"===typeof o?(r-i)/Math.max(o,1):this.tickCount;n=this.getTickInterval({start:i,stop:r,count:a,minCount:this.minTickCount,maxCount:this.maxTickCount})}if(n){var s=n.range(e,t,!0),l=s[0],u=s[s.length-1];this.niceDomain=[l,u]}}}]),n}(To),Xo=function(e){return"(".concat(e,")")},qo=function(e){return"".concat(Xo(e),"?")},Qo=function(e){return qo("?:".concat(e))},Jo=new RegExp(["^",Qo("".concat(qo(".")).concat(Xo("[<>=^]"))),qo("[+\\-( ]"),qo("[$\u20ac\xa3\xa5\u20a3\u20b9#]"),qo("0"),qo("\\d+"),qo(","),Qo("\\.".concat(Xo("\\d+"))),qo("~"),qo("[%a-z]"),"$"].join(""),"i"),$o=new RegExp(["^",Xo(".*?"),"#\\{".concat(Xo(".+?"),"\\}"),Xo(".*?"),"$"].join(""));function ea(e){var t,n,i=$o.exec(e);if(i){var r=(0,re.Z)(i,4);t=r[1],e=r[2],n=r[3]}var o=Jo.exec(e);if(!o)throw new Error("The number formatter is invalid: ".concat(e));var a=(0,re.Z)(o,11),s=a[1],l=a[2],u=a[3],c=a[4],d=a[5],h=a[6],p=a[7],f=a[8],v=a[9],g=a[10];return{fill:s,align:l,sign:u,symbol:c,zero:d,width:parseInt(h),comma:p,precision:parseInt(f),trim:Boolean(v),type:g,prefix:t,suffix:n}}function ta(e){var t,n,i="string"===typeof e?ea(e):e,r=i.fill,o=i.align,a=i.sign,s=void 0===a?"-":a,l=i.symbol,u=i.zero,c=i.width,d=i.comma,h=i.type,p=i.prefix,f=void 0===p?"":p,v=i.suffix,g=void 0===v?"":v,m=i.precision,y=i.trim,C=void 0===m||isNaN(m);if(h)if(h in ra&&h in ia)t=C?ia[h]:ra[h];else if(h in ra)t=ra[h];else{if(!(h in ia))throw new Error("The number formatter type is invalid: ".concat(h));t=ia[h]}else t=ra.g,y=!0;return n=null==m||C?h?6:12:m,function(e){var i=t(e,n);return y&&(i=i.replace(/\.0+$/,"").replace(/(\.[1-9])0+$/,"$1")),d&&(i=function(e,t){var n=e.indexOf(".");n<0&&(n=e.length);for(var i=e.substring(0,n).split(""),r=e.substring(n),o=i.length-3;o>0;o-=3)i.splice(o,0,t);return"".concat(i.join("")).concat(r)}(i,d)),i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if("("===n)return e>=0?t:"(".concat(t,")");var i="+"===n?"+":"";return"".concat(e>=0?i:"\u2212").concat(t)}(e,i,s),l&&"#"!==l&&(i="".concat(l).concat(i)),"#"===l&&"x"===h&&(i="0x".concat(i)),"s"===h&&(i="".concat(i).concat(function(e){return la[oa(e)]}(e))),"%"!==h&&"p"!==h||(i="".concat(i,"%")),null==c||isNaN(c)||(i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" ",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:">",r=e;if(">"!==i&&i){if("<"===i)r=r.padEnd(t,n);else if("^"===i){var o=Math.max(0,t-r.length),a=Math.ceil(o/2),s=Math.floor(o/2);r=(r=r.padStart(a+r.length,n)).padEnd(s+r.length,n)}}else r=r.padStart(t,n);return r}(i,c,null!==r&&void 0!==r?r:u,o)),i="".concat(f).concat(i).concat(g)}}var na=function(e){return Math.floor(Math.abs(e))},ia={b:function(e){return na(e).toString(2)},c:function(e){return String.fromCharCode(e)},d:function(e){return Math.round(Math.abs(e)).toFixed(0)},o:function(e){return na(e).toString(8)},x:function(e){return na(e).toString(16)},X:function(e){return ia.x(e).toUpperCase()},n:function(e){return ia.d(e)},"%":function(e){return"".concat(na(100*e).toFixed(0))}},ra={e:function(e,t){return Math.abs(e).toExponential(t)},E:function(e,t){return ra.e(e,t).toUpperCase()},f:function(e,t){return Math.abs(e).toFixed(t)},F:function(e,t){return ra.f(e,t).toUpperCase()},g:function(e,t){if(0===e)return"0";var n=Math.abs(e),i=Math.floor(Math.log10(n));return i>=-4&&i<t?n.toFixed(t-1-i):n.toExponential(t-1)},G:function(e,t){return ra.g(e,t).toUpperCase()},n:function(e,t){return ra.g(e,t)},p:function(e,t){return ra.r(100*e,t)},r:function(e,t){if(0===e)return"0";var n=Math.abs(e),i=Math.floor(Math.log10(n))-(t-1);if(i<=0)return n.toFixed(-i);var r=Math.pow(10,i);return(Math.round(n/r)*r).toFixed()},s:function(e,t){var n=oa(e);return ra.r(e/Math.pow(10,n),t)},"%":function(e,t){return ra.f(100*e,t)}};function oa(e){var t=Math.log10(Math.abs(e)),n=3*Math.floor(t/3);return Math.max(aa,Math.min(sa,n))}var aa=-24,sa=24,la=(Ko={},(0,se.Z)(Ko,aa,"y"),(0,se.Z)(Ko,-21,"z"),(0,se.Z)(Ko,-18,"a"),(0,se.Z)(Ko,-15,"f"),(0,se.Z)(Ko,-12,"p"),(0,se.Z)(Ko,-9,"n"),(0,se.Z)(Ko,-6,"\xb5"),(0,se.Z)(Ko,-3,"m"),(0,se.Z)(Ko,0,""),(0,se.Z)(Ko,3,"k"),(0,se.Z)(Ko,6,"M"),(0,se.Z)(Ko,9,"G"),(0,se.Z)(Ko,12,"T"),(0,se.Z)(Ko,15,"P"),(0,se.Z)(Ko,18,"E"),(0,se.Z)(Ko,21,"Z"),(0,se.Z)(Ko,sa,"Y"),Ko);function ua(e,t){var n=ea(null!==t&&void 0!==t?t:",f"),i=n.precision;(null==i||isNaN(i))&&("f"===n.type||"%"===n.type?n.precision=Math.max.apply(Math,(0,te.Z)(e.map((function(e){if("number"!==typeof e||0===e)return 0;var t=Math.floor(Math.log10(Math.abs(e))),i=n.type?6:12,r=e.toExponential(i-1).replace(/\.?0+e/,"e"),o=r.indexOf(".");if(o<0)return t>=0?0:-t;var a=r.indexOf("e")-o;return Math.max(0,a-t-1)})))):n.type&&!(n.type in ra)||(n.precision=Math.max.apply(Math,(0,te.Z)(e.map((function(e){if("number"!==typeof e)return 0;var t=e.toExponential((n.type?6:12)-1).replace(/\.?0+e/,"e");return t.substring(0,t.indexOf("e")).replace(".","").length}))))));var r=ta(n);return function(e){return r(Number(e))}}var ca=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},da=function(e){return e},ha=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.call(this,[1,10],[0,1])).type="log",e.base=10,e.cacheProps=["domain","range","nice","tickCount","base"],e.baseLog=da,e.basePow=da,e.log=function(t){return e.domain[0]>=0?e.baseLog(t):-e.baseLog(-t)},e.pow=function(t){return e.domain[0]>=0?e.basePow(t):-e.basePow(-t)},e}return(0,f.Z)(n,[{key:"toDomain",value:function(e){return e}},{key:"transform",value:function(e){return this.domain[0]>=0?Math.log(e):-Math.log(-e)}},{key:"transformInvert",value:function(e){return this.domain[0]>=0?Math.exp(e):-Math.exp(-e)}},{key:"update",value:function(){!this.domain||this.domain.length<2||(this.updateLogFn(),this.updatePowFn(),this.nice&&this.updateNiceDomain())}},{key:"updateLogFn",value:function(){var e,t=this.base;if(10===t)e=Math.log10;else if(t===Math.E)e=Math.log;else if(2===t)e=Math.log2;else{var n=Math.log(t);e=function(e){return Math.log(e)/n}}this.baseLog=e}},{key:"updatePowFn",value:function(){var e,t=this.base;e=10===t?n.pow10:t===Math.E?Math.exp:function(e){return Math.pow(t,e)},this.basePow=e}},{key:"updateNiceDomain",value:function(){var e=(0,re.Z)(this.domain,2),t=e[0],n=e[1],i=this.pow(Math.floor(this.log(t))),r=this.pow(Math.ceil(this.log(n)));this.niceDomain=[i,r]}},{key:"ticks",value:function(){var e,t=this,n=null!==(e=this.tickCount)&&void 0!==e?e:10;if(!this.domain||this.domain.length<2||n<1)return[];this.refresh();var i=this.base,r=this.getDomain(),o=(0,re.Z)(r,2),a=o[0],s=o[1],l=this.log(a),u=this.log(s);if(this.interval){var c=Math.abs(this.interval),d=Math.abs(u-l),h=Lo(l,u,Math.min(d,c)).map((function(e){return t.pow(e)})).filter((function(e){return e>=a&&e<=s}));if(!this.isDenseInterval({start:a,stop:s,interval:c,count:h.length}))return h}if(!(i%1===0)||u-l>=n)return Po(l,u,Math.min(u-l,n)).map((function(e){return t.pow(e)}));var p=[],f=a>0;l=Math.floor(l)-1,u=Math.round(u)+1;for(var v=Math.min.apply(Math,(0,te.Z)(this.range)),g=(Math.max.apply(Math,(0,te.Z)(this.range))-v)/n,m=1/0,y=l;y<=u;y++)for(var C=this.convert(this.pow(y+1)),k=1;k<i;k++){var w=f?k:i-k+1,S=this.pow(y)*w,b=this.convert(S),E=Math.abs(m-b),x=Math.abs(b-C);S>=a&&S<=s&&(1===k||E>=g&&x>=g)&&(p.push(S),m=b)}return p}},{key:"tickFormat",value:function(e){var t=e.count,n=e.ticks,i=e.specifier,r=this.base;return null==i&&(i=10===r?".0e":","),"string"===typeof i&&(i=ta(i)),t===1/0?i:(null==n&&this.ticks(),function(e){return i(e)})}}],[{key:"pow10",value:function(e){return e>=0?Math.pow(10,e):1/Math.pow(10,-e)}}]),n}(To);function pa(e){var t=e.length;if(0!==t){for(var n=1/0,i=-1/0,r=0;r<t;r++){var o=e[r];o instanceof Date&&(o=o.getTime()),"number"===typeof o&&(o<n&&(n=o),o>i&&(i=o))}var a=[n,i];if(!a.some((function(e){return!isFinite(e)})))return a}}function fa(e,t,n){var i;return e.length>2&&(e=null!==(i=pa(e))&&void 0!==i?i:[NaN,NaN]),isNaN(t)||(e=[t,e[1]]),isNaN(n)||(e=[e[0],n]),e[0]>e[1]&&(e=[]),e}ca([vt(Bt(0))],ha.prototype,"base",void 0);var va=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},ga=function(){function e(){(0,p.Z)(this,e),this.enabled=!0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.fontStyle=void 0,this.fontWeight=void 0,this.color="rgba(70, 70, 70, 1)"}return(0,f.Z)(e,[{key:"getFont",value:function(){return Qe(this)}}]),e}();function ma(e){var t=e.parallelFlipRotation,n=void 0===t?0:t,i=e.regularFlipRotation,r=void 0===i?0:i,o=e.rotation?Ze(Be(e.rotation)):0,a=!o&&n>=0&&n<=Math.PI?-1:1,s=!o&&r>=0&&r<=Math.PI?-1:1,l=0;return e.parallel?l=a*Math.PI/2:-1===s&&(l=Math.PI),{configuredRotation:o,defaultRotation:l,parallelFlipFlag:a,regularFlipFlag:s}}function ya(e,t,n,i,r){var o=t>0&&t<=Math.PI,a=n>0&&n<=Math.PI;if(e){if(!t&&!n)return"center";if(i*(o||a?-1:1)===-1)return"end"}else if(i*r===-1)return"end";return"start"}function Ca(e,t,n,i,r){var o=t.width,a=t.height,s=new he(n,i,0,0);r.transformBBox(s,t);var l=t.x,u=void 0===l?0:l,c=t.y,d=void 0===c?0:c;return t.width=o,t.height=a,{point:{x:u,y:d,size:0},label:{width:o,height:a,text:e}}}function ka(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[void 0];return ft((function(n,i,r){return t.includes(r)?e:r}))}va([vt(Dt)],ga.prototype,"enabled",void 0),va([vt(Bt(0))],ga.prototype,"fontSize",void 0),va([vt(Ot)],ga.prototype,"fontFamily",void 0),va([vt(nn)],ga.prototype,"fontStyle",void 0),va([vt(on)],ga.prototype,"fontWeight",void 0),va([vt(Gt)],ga.prototype,"color",void 0);var wa=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Sa=function(){function e(){(0,p.Z)(this,e),this.enabled=!0,this.autoWrap=!1,this.maxWidth=void 0,this.maxHeight=void 0,this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.padding=5,this.minSpacing=NaN,this.color="rgba(87, 87, 87, 1)",this.rotation=void 0,this.autoRotate=void 0,this.autoRotateAngle=335,this.avoidCollisions=!0,this.mirrored=!1,this.parallel=!1,this.formatter=void 0,this.format=void 0}return(0,f.Z)(e,[{key:"getSideFlag",value:function(){return this.mirrored?1:-1}},{key:"getFont",value:function(){return Qe(this)}}]),e}();wa([vt(Dt)],Sa.prototype,"enabled",void 0),wa([vt(Tt)],Sa.prototype,"autoWrap",void 0),wa([vt(Wt(0))],Sa.prototype,"maxWidth",void 0),wa([vt(Wt(0))],Sa.prototype,"maxHeight",void 0),wa([vt(nn)],Sa.prototype,"fontStyle",void 0),wa([vt(on)],Sa.prototype,"fontWeight",void 0),wa([vt(Bt(1))],Sa.prototype,"fontSize",void 0),wa([vt(Ot)],Sa.prototype,"fontFamily",void 0),wa([vt(Bt(0))],Sa.prototype,"padding",void 0),wa([vt(zt()),ka(NaN)],Sa.prototype,"minSpacing",void 0),wa([vt(Zt)],Sa.prototype,"color",void 0),wa([vt(Wt(-360,360))],Sa.prototype,"rotation",void 0),wa([vt(Tt)],Sa.prototype,"autoRotate",void 0),wa([vt(Bt(-360,360))],Sa.prototype,"autoRotateAngle",void 0),wa([vt(Dt)],Sa.prototype,"avoidCollisions",void 0),wa([vt(Dt)],Sa.prototype,"mirrored",void 0),wa([vt(Dt)],Sa.prototype,"parallel",void 0),wa([vt(Pt)],Sa.prototype,"format",void 0);var ba=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Ea=(0,f.Z)((function e(){(0,p.Z)(this,e),this.width=1,this.color="rgba(195, 195, 195, 1)"}));ba([vt(Bt(0))],Ea.prototype,"width",void 0),ba([vt(Zt)],Ea.prototype,"color",void 0);var xa=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Ra=gt((function(e,t){return Bt(0)(e,t)||e instanceof v}),"expecting a tick count Number value or, for a time axis, a Time Interval such as 'agCharts.time.month'"),Da=gt((function(e,t){return mt(e,t,Ra)}),"expecting an optional tick count Number value or, for a time axis, a Time Interval such as 'agCharts.time.month'"),Ta=gt((function(e,t){return mt(e,t,(function(e,t){return 0!==e&&Bt(0)(e,t)||e instanceof v}))}),"expecting an optional non-zero positive Number value or, for a time axis, a Time Interval such as 'agCharts.time.month'"),Oa=(0,f.Z)((function e(){(0,p.Z)(this,e),this.enabled=!0,this.width=1,this.size=6,this.color="rgba(195, 195, 195, 1)",this.count=void 0,this.interval=void 0,this.values=void 0,this.minSpacing=NaN}));xa([vt(Dt)],Oa.prototype,"enabled",void 0),xa([vt(Bt(0))],Oa.prototype,"width",void 0),xa([vt(Bt(0))],Oa.prototype,"size",void 0),xa([vt(Zt)],Oa.prototype,"color",void 0),xa([vt(Da),function(e,t){var n=null===t||void 0===t?void 0:t.default,i=Dn();return ft((function(t,r,o){return o!==n&&i(r.toString(),e),o}))}("Use tick.interval or tick.minSpacing and tick.maxSpacing instead")],Oa.prototype,"count",void 0),xa([vt(Ta)],Oa.prototype,"interval",void 0),xa([vt(Ct())],Oa.prototype,"values",void 0),xa([vt(kt(zt(1),bt("maxSpacing"))),ka(NaN)],Oa.prototype,"minSpacing",void 0);var Pa=function(){function e(t,n){(0,p.Z)(this,e),this.state=t,this.states=n,e.DEBUG()&&Oe.debug("%c".concat(this.constructor.name," | init -> ").concat(t),"color: green")}return(0,f.Z)(e,[{key:"transition",value:function(t,n){var i,r,o,a,s,l=this.states[this.state],u=null===(i=null===l||void 0===l?void 0:l.on)||void 0===i?void 0:i[t];if(u){var c=u.target,d=this.states[c];return e.DEBUG()&&Oe.debug("%c".concat(this.constructor.name," | ").concat(this.state," -> ").concat(t," -> ").concat(c),"color: green"),u.action(n),null===(o=null===(r=null===l||void 0===l?void 0:l.actions)||void 0===r?void 0:r.onExit)||void 0===o||o.call(r),null===(s=null===(a=null===d||void 0===d?void 0:d.actions)||void 0===a?void 0:a.onEnter)||void 0===s||s.call(a),this.state=c,this.state}e.DEBUG()&&Oe.debug("%c".concat(this.constructor.name," | ").concat(this.state," -> ").concat(t," -> ").concat(this.state),"color: grey")}}]),e}();Pa.DEBUG=function(){var e;return null!==(e=[!0,"animation"].includes(Le("agChartsDebug")))&&void 0!==e&&e};var Aa,Ma,Na=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},La=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n},Ia=["stroke","lineDash"],Fa=gt(yt(void 0,(function(e){for(var t in e)if(!Ia.includes(t))return!1;return!0})),"expecting an Array of objects with gridline style properties such as 'stroke' and 'lineDash'");!function(e){e[e.TickLine=0]="TickLine",e[e.TickLabel=1]="TickLabel",e[e.GridLine=2]="GridLine",e[e.GridArc=3]="GridArc",e[e.AxisLine=4]="AxisLine"}(Aa||(Aa={})),function(e){e[e.CREATE=0]="CREATE",e[e.CREATE_SECONDARY=1]="CREATE_SECONDARY",e[e.FILTER=2]="FILTER",e[e.VALUES=3]="VALUES"}(Ma||(Ma={}));var _a=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n)}(Pa),Ga=function(){function e(t,n){var i=this;(0,p.Z)(this,e),this.moduleCtx=t,this.id=me(this),this.nice=!0,this.dataDomain=[],this.keys=[],this.boundSeries=[],this.includeInvisibleDomains=!1,this.axisGroup=new Ae({name:"".concat(this.id,"-axis"),zIndex:qt.AXIS_ZINDEX}),this.lineNode=this.axisGroup.appendChild(new Eo),this.tickLineGroup=this.axisGroup.appendChild(new Ae({name:"".concat(this.id,"-Axis-tick-lines"),zIndex:qt.AXIS_ZINDEX})),this.tickLabelGroup=this.axisGroup.appendChild(new Ae({name:"".concat(this.id,"-Axis-tick-labels"),zIndex:qt.AXIS_ZINDEX})),this.crossLineGroup=new Ae({name:"".concat(this.id,"-CrossLines")}),this.gridGroup=new Ae({name:"".concat(this.id,"-Axis-grid")}),this.gridLineGroup=this.gridGroup.appendChild(new Ae({name:"".concat(this.id,"-gridLines"),zIndex:qt.AXIS_GRID_ZINDEX})),this.tickLineGroupSelection=Rr.select(this.tickLineGroup,Eo,!1),this.tickLabelGroupSelection=Rr.select(this.tickLabelGroup,qe,!1),this.gridLineGroupSelection=Rr.select(this.gridLineGroup,Eo,!1),this.line=new Ea,this.tick=this.createTick(),this.label=new Sa,this.translation={x:0,y:0},this.rotation=0,this.layout={label:{fractionDigits:0,padding:this.label.padding,format:this.label.format}},this.modules={},this.destroyFns=[],this.range=[0,1],this.visibleRange=[0,1],this.title=void 0,this._titleCaption=new Ro,this._gridLength=0,this.gridStyle=[{stroke:"rgba(219, 219, 219, 1)",lineDash:[4,2]}],this.fractionDigits=0,this.gridPadding=0,this.seriesAreaPadding=0,this.maxThickness=1/0,this._scale=n,this.refreshScale(),this._titleCaption.node.rotation=-Math.PI/2,this.axisGroup.appendChild(this._titleCaption.node);var r=t.interactionManager.addListener("hover",(function(e){return i.checkAxisHover(e)}));this.destroyFns.push((function(){return t.interactionManager.removeListener(r)})),this.animationManager=t.animationManager,this.animationState=new _a("empty",{empty:{on:{update:{target:"align",action:function(){return i.resetSelectionNodes()}}}},align:{on:{update:{target:"ready",action:function(){return i.resetSelectionNodes()}}}},ready:{on:{update:{target:"ready",action:function(e){return i.animateReadyUpdate(e)}}}}}),this._crossLines=[],this.assignCrossLineArrayConstructor(this._crossLines)}return(0,f.Z)(e,[{key:"scale",get:function(){return this._scale}},{key:"type",get:function(){var e;return null!==(e=this.constructor.type)&&void 0!==e?e:""}},{key:"crossLines",get:function(){return this._crossLines},set:function(e){var t,n,i=this;null===(t=this._crossLines)||void 0===t||t.forEach((function(e){return i.detachCrossLine(e)})),e&&this.assignCrossLineArrayConstructor(e),this._crossLines=e,null===(n=this._crossLines)||void 0===n||n.forEach((function(e){i.attachCrossLine(e),i.initCrossLine(e)}))}},{key:"attachCrossLine",value:function(e){this.crossLineGroup.appendChild(e.group)}},{key:"detachCrossLine",value:function(e){this.crossLineGroup.removeChild(e.group)}},{key:"destroy",value:function(){for(var e=0,t=Object.entries(this.modules);e<t.length;e++){var n=(0,re.Z)(t[e],2),i=n[0];n[1].instance.destroy(),delete this.modules[i],delete this[i]}this.destroyFns.forEach((function(e){return e()}))}},{key:"refreshScale",value:function(){var e,t=this;this.range=this.scale.range.slice(),null===(e=this.crossLines)||void 0===e||e.forEach((function(e){t.initCrossLine(e)}))}},{key:"updateRange",value:function(){var e,t=this.range,n=this.visibleRange,i=this.scale,r=(t[1]-t[0])/(n[1]-n[0]),o=r*n[0],a=t[0]-o;i.range=[a,a+r],null===(e=this.crossLines)||void 0===e||e.forEach((function(e){e.clippedRange=[t[0],t[1]]}))}},{key:"setCrossLinesVisible",value:function(e){this.crossLineGroup.visible=e}},{key:"attachAxis",value:function(e){e.appendChild(this.gridGroup),e.appendChild(this.axisGroup),e.appendChild(this.crossLineGroup)}},{key:"detachAxis",value:function(e){e.removeChild(this.gridGroup),e.removeChild(this.axisGroup),e.removeChild(this.crossLineGroup)}},{key:"inRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return 0===this.inRangeEx(e,t,n)}},{key:"inRangeEx",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=this.range,r=Math.min(i[0],i[1]),o=Math.max(i[0],i[1]);return e+t<r-n?-1:e>o+n?1:0}},{key:"onLabelFormatChange",value:function(e,t){var n=this.scale,i=this.fractionDigits,r=!(n instanceof ha)&&i>0?function(e){return"number"===typeof e?e.toFixed(i):String(e)}:function(e){return String(e)};if(t&&n&&n.tickFormat)try{this.labelFormatter=n.tickFormat({ticks:e,specifier:t})}catch(o){this.labelFormatter=r,Oe.warnOnce("the axis label format string ".concat(t," is invalid. No formatting will be applied"))}else this.labelFormatter=r}},{key:"setDomain",value:function(){var e,t=this.scale,n=this.dataDomain,i=this.tick.values;if(i&&t instanceof To){var r=null!==(e=pa(i))&&void 0!==e?e:[1/0,-1/0],o=(0,re.Z)(r,2),a=o[0],s=o[1],l=Math.min(t.fromDomain(n[0]),a),u=Math.max(t.fromDomain(n[1]),s);t.domain=[t.toDomain(l),t.toDomain(u)]}else t.domain=n}},{key:"setTickInterval",value:function(e){var t;this.scale.interval=null!==(t=this.tick.interval)&&void 0!==t?t:e}},{key:"setTickCount",value:function(e,t,n){var i=this.scale;if(e&&i instanceof To)return"number"===typeof e?(i.tickCount=e,i.minTickCount=null!==t&&void 0!==t?t:0,void(i.maxTickCount=null!==n&&void 0!==n?n:1/0)):void(i instanceof Yo&&this.setTickInterval(e))}},{key:"gridLength",get:function(){return this._gridLength},set:function(e){var t,n=this;(this._gridLength&&!e||!this._gridLength&&e)&&(this.gridLineGroupSelection=this.gridLineGroupSelection.clear()),this._gridLength=e,null===(t=this.crossLines)||void 0===t||t.forEach((function(e){n.initCrossLine(e)}))}},{key:"createTick",value:function(){return new Oa}},{key:"checkAxisHover",value:function(e){this.computeBBox().containsPoint(e.offsetX,e.offsetY)&&this.moduleCtx.chartEventManager.axisHover(this.id,this.direction)}},{key:"update",value:function(e){var t=this.tickLabelGroupSelection.nodes().map((function(e){return e.datum.tickId})),n=this.calculateRotations(),i=n.rotation,r=n.parallelFlipRotation,o=n.regularFlipRotation,a=this.label.getSideFlag(),s=a*(this.tick.size+this.label.padding+this.seriesAreaPadding);this.updateScale(),this.updatePosition({rotation:i,sideFlag:a}),this.updateLine();var l=this.generateTicks({primaryTickCount:e,parallelFlipRotation:r,regularFlipRotation:o,labelX:s,sideFlag:a}),u=l.tickData,c=l.combinedRotation,d=l.textBaseline,h=l.textAlign,p=La(l,["tickData","combinedRotation","textBaseline","textAlign"]);if(this.updateSelections(u.ticks),this.animationManager.skipAnimations)this.resetSelectionNodes();else{var f=this.calculateUpdateDiff(t,u);this.animationState.transition("update",f)}return this.updateLabels({tickLabelGroupSelection:this.tickLabelGroupSelection,combinedRotation:c,textBaseline:d,textAlign:h,labelX:s}),this.updateVisibility(),this.updateGridLines(a),this.updateTickLines(a),this.updateTitle({anyTickVisible:u.ticks.length>0,sideFlag:a}),this.updateCrossLines({rotation:i,parallelFlipRotation:r,regularFlipRotation:o,sideFlag:a}),this.updateLayoutState(),e=p.primaryTickCount}},{key:"updateLayoutState",value:function(){this.layout.label={fractionDigits:this.fractionDigits,padding:this.label.padding,format:this.label.format}}},{key:"updateScale",value:function(){this.updateRange(),this.calculateDomain(),this.setDomain(),this.setTickInterval(this.tick.interval);var e=this.scale,t=this.nice;e instanceof To&&(this.setTickCount(this.tick.count),e.nice=t,e.update())}},{key:"calculateRotations",value:function(){var e=Be(this.rotation);return{rotation:e,parallelFlipRotation:Ze(e),regularFlipRotation:Ze(e-Math.PI/2)}}},{key:"generateTicks",value:function(e){for(var t,n=e.primaryTickCount,i=e.parallelFlipRotation,r=e.regularFlipRotation,o=e.labelX,a=e.sideFlag,s=this.scale,l=this.tick,u=this.label,c=u.parallel,d=u.rotation,h=u.fontFamily,p=u.fontSize,f=u.fontStyle,v=u.fontWeight,g=void 0!==n,m=ma({rotation:d,parallel:c,regularFlipRotation:r,parallelFlipRotation:i}),y=m.defaultRotation,C=m.configuredRotation,k=m.parallelFlipFlag,w=m.regularFlipFlag,S=C+y,b=new pe,E=this.estimateTickCount({minSpacing:l.minSpacing,maxSpacing:null!==(t=l.maxSpacing)&&void 0!==t?t:NaN}).maxTickCount,x=s instanceof To,R=l.count||!x||isNaN(E)?10:E,D=ya(c,C,0,a,w),T=function(e,t,n,i){return e&&!t?n*i===-1?"hanging":"bottom":"middle"}(c,C,a,k),O={fontFamily:h,fontSize:p,fontStyle:f,fontWeight:v,textBaseline:T,textAlign:D},P={rawTicks:[],ticks:[],labelCount:0},A=0,M=0,N=!0,L=!1;N&&A<=R&&!L;){M=0,D=ya(c,C,0,a,w);var I,F=this.getTickStrategies({secondaryAxis:g,index:A}),_=(0,ne.Z)(F);try{for(_.s();!(I=_.n()).done;){var G=(0,I.value)({index:A,tickData:P,textProps:O,labelOverlap:N,terminate:L,primaryTickCount:n});P=G.tickData,A=G.index,M=G.autoRotation,L=G.terminate;var Z=P.ticks;D=ya(c,C,M,a,w);var V=0!==C||0!==M,H=S+M;N=this.checkLabelOverlap(H,V,b,Z,o,Object.assign(Object.assign({},O),{textAlign:D}))}}catch(W){_.e(W)}finally{_.f()}}var B=y+C+M;return!g&&P.rawTicks.length>0&&(n=P.rawTicks.length),{tickData:P,primaryTickCount:n,combinedRotation:B,textBaseline:T,textAlign:D}}},{key:"getTickStrategies",value:function(e){var t,n=this,i=e.index,r=e.secondaryAxis,o=this.scale,a=this.label,s=this.tick,l=o instanceof To,u=a.enabled&&a.avoidCollisions,c=!(l&&void 0===this.tick.count)&&0!==i&&u,d=!0===a.autoRotate&&void 0===a.rotation,h=[];t=this.tick.values?Ma.VALUES:r?Ma.CREATE_SECONDARY:c?Ma.FILTER:Ma.CREATE;if(h.push((function(e){var i=e.index,r=e.tickData,o=e.primaryTickCount,a=e.terminate;return n.createTickData(t,i,r,a,o)})),!l&&!isNaN(s.minSpacing)){h.push((function(e){var t=e.index,i=e.tickData,r=e.primaryTickCount,o=e.terminate;return n.createTickData(Ma.FILTER,t,i,o,r)}))}if(!u)return h;if(a.autoWrap){h.push((function(e){var t=e.index,i=e.tickData,r=e.textProps;return n.wrapLabels(i,t,r)}))}else if(d){h.push((function(e){var t=e.index,i=e.tickData,r=e.labelOverlap,o=e.terminate;return{index:t,tickData:i,autoRotation:n.getAutoRotation(r),terminate:o}}))}return h}},{key:"createTickData",value:function(e,t,n,i,r){for(var o,a,s,l=this.scale,u=this.tick,c=this.estimateTickCount({minSpacing:u.minSpacing,maxSpacing:null!==(o=u.maxSpacing)&&void 0!==o?o:NaN}),d=c.maxTickCount,h=c.minTickCount,p=c.defaultTickCount,f=l instanceof To,v=u.count||!f||isNaN(d)?10:d,g=null!==(a=u.count)&&void 0!==a?a:f?Math.max(p-t,h):d,m=void 0===u.interval&&void 0===u.values&&void 0===u.count&&g>h&&(f||e===Ma.FILTER),y=!0;y&&t<=v;){var C=n.rawTicks;g=null!==(s=u.count)&&void 0!==s?s:f?Math.max(p-t,h):d;var k=this.getTicks({tickGenerationType:e,previousTicks:C,tickCount:g,minTickCount:h,maxTickCount:d,primaryTickCount:r}),w=k.rawTicks,S=k.ticks,b=k.labelCount;n.rawTicks=w,n.ticks=S,n.labelCount=b,y=!!m&&Do(w,C),t++}var E=void 0!==u.interval||void 0!==u.values;return i||(i=E),{tickData:n,index:t,autoRotation:0,terminate:i}}},{key:"checkLabelOverlap",value:function(e,t,n,i,r,o){pe.updateTransformMatrix(n,1,1,e,0,0);var a=this.createLabelData(i,r,o,n),s=function(e,t){return isNaN(e)?t?0:10:e}(this.label.minSpacing,t);return function(e,t){for(var n=[],i=function(i){var r=e[i],o=r.point,a=o.x,s=o.y,l=r.label.text,u=r.label,c=u.width,d=u.height;if(c+=null!==t&&void 0!==t?t:0,d+=null!==t&&void 0!==t?t:0,n.some((function(e){return Oi(e,a,s,c,d)})))return{v:!0};n.push({index:i,text:l,x:a,y:s,width:c,height:d,datum:r})},r=0;r<e.length;r++){var o=i(r);if("object"===typeof o)return o.v}return!1}(a,s)}},{key:"createLabelData",value:function(e,t,n,i){var r,o=[],a=(0,ne.Z)(e);try{for(a.s();!(r=a.n()).done;){var s=r.value,l=s.tickLabel,u=s.translationY;if(""!==l&&void 0!=l){var c=Je(nt(l),t,u,n),d=c.width,h=c.height,p=Ca(l,new he(t,u,d,h),t,u,i);o.push(p)}}}catch(f){a.e(f)}finally{a.f()}return o}},{key:"getAutoRotation",value:function(e){return e?Ze(Be(this.label.autoRotateAngle)):0}},{key:"getTicks",value:function(e){var t,n=e.tickGenerationType,i=e.previousTicks,r=e.tickCount,o=e.minTickCount,a=e.maxTickCount,s=e.primaryTickCount,l=this.scale,u=[];switch(n){case Ma.VALUES:u=this.tick.values;break;case Ma.CREATE_SECONDARY:u=this.updateSecondaryAxisTicks(s);break;case Ma.FILTER:u=this.filterTicks(i,r);break;default:u=this.createTicks(r,o,a)}this.onLabelFormatChange(u,this.label.format),this.fractionDigits=u.fractionDigits>=0?u.fractionDigits:0;for(var c=(null!==(t=this.scale.bandwidth)&&void 0!==t?t:0)/2,d=[],h=0,p=new Map,f=0;f<u.length;f++){var v=u[f],g=l.convert(v)+c,m=this.formatTick(v,f),y=m;if(p.has(y)){var C=p.get(y);p.set(y,C+1),y="".concat(y,"_").concat(C)}else p.set(y,1);d.push({tick:v,tickId:y,tickLabel:m,translationY:g}),""!==m&&void 0!=m&&h++}return{rawTicks:u,ticks:d,labelCount:h}}},{key:"filterTicks",value:function(e,t){var n,i=!isNaN(this.tick.minSpacing)||!isNaN(null!==(n=this.tick.maxSpacing)&&void 0!==n?n:NaN)?Math.ceil(e.length/t):2;return e.filter((function(e,t){return t%i===0}))}},{key:"createTicks",value:function(e,t,n){var i,r,o;return this.setTickCount(e,t,n),null!==(o=null===(r=(i=this.scale).ticks)||void 0===r?void 0:r.call(i))&&void 0!==o?o:[]}},{key:"estimateTickCount",value:function(t){var n=t.minSpacing,i=t.maxSpacing,r=this.calculateAvailableRange(),o=Math.max(e.defaultTickMinSpacing,r/To.defaultMaxTickCount);isNaN(n)&&isNaN(i)?(n=o)>(i=r)&&(i=n):isNaN(n)?(n=o)>i&&(n=i):isNaN(i)&&n>(i=r)&&(i=n);var a=Math.max(1,Math.floor(r/n)),s=Math.min(a,Math.ceil(r/i)),l=To.defaultTickCount;return l>a?l=a:l<s&&(l=s),{minTickCount:s,maxTickCount:a,defaultTickCount:l}}},{key:"updateVisibility",value:function(){var e=this.range,t=Math.min.apply(Math,(0,te.Z)(e)),n=Math.max.apply(Math,(0,te.Z)(e)),i=function(e){var i=Math.floor(t),r=Math.ceil(n);if(i!==r){e.translationY>=i-1&&e.translationY<i&&(e.translationY=i),e.translationY>r&&e.translationY<=r+1&&(e.translationY=r);var o=e.translationY>=i&&e.translationY<=r;e.visible=o}else e.visible=!1},r=this.gridLineGroupSelection,o=this.tickLineGroupSelection,a=this.tickLabelGroupSelection;r.each(i),o.each(i),a.each(i),this.tickLineGroup.visible=this.tick.enabled,this.tickLabelGroup.visible=this.label.enabled}},{key:"updateCrossLines",value:function(e){var t,n=this,i=e.rotation,r=e.parallelFlipRotation,o=e.regularFlipRotation,a=e.sideFlag,s=this.isAnySeriesActive();null===(t=this.crossLines)||void 0===t||t.forEach((function(e){var t;e.sideFlag=-a,e.direction=i===-Math.PI/2?Qt.X:Qt.Y,e.label.parallel=null!==(t=e.label.parallel)&&void 0!==t?t:n.label.parallel,e.parallelFlipRotation=r,e.regularFlipRotation=o,e.update(s)}))}},{key:"updateTickLines",value:function(e){var t=this.tick;this.tickLineGroupSelection.each((function(n){n.strokeWidth=t.width,n.stroke=t.color,n.x1=e*t.size,n.x2=0,n.y1=0,n.y2=0}))}},{key:"calculateAvailableRange",value:function(){var e=this.range,t=Math.min.apply(Math,(0,te.Z)(e));return Math.max.apply(Math,(0,te.Z)(e))-t}},{key:"calculateDomain",value:function(){var e=this.direction,t=this.boundSeries,n=this.includeInvisibleDomains;if(this.linkedTo)this.dataDomain=this.linkedTo.dataDomain;else{var i,r,o=[],a=t.filter((function(e){return n||e.isEnabled()})),s=(0,ne.Z)(a);try{for(s.s();!(r=s.n()).done;){var l=r.value;o.push(l.getDomain(e))}}catch(c){s.e(c)}finally{s.f()}var u=(i=new Array).concat.apply(i,o);this.dataDomain=this.normaliseDataDomain(u)}}},{key:"updatePosition",value:function(e){var t=e.rotation,n=e.sideFlag,i=this.crossLineGroup,r=this.axisGroup,o=this.gridGroup,a=this.translation,s=this.gridLineGroupSelection,l=this.gridPadding,u=this.gridLength,c=Math.floor(a.x),d=Math.floor(a.y);i.translationX=c,i.translationY=d,i.rotation=t,r.translationX=c,r.translationY=d,r.rotation=t,o.translationX=c,o.translationY=d,o.rotation=t,s.each((function(e){e.x1=l,e.x2=-n*u+l,e.y1=0,e.y2=0}))}},{key:"updateSecondaryAxisTicks",value:function(e){throw new Error("AG Charts - unexpected call to updateSecondaryAxisTicks() - check axes configuration.")}},{key:"updateSelections",value:function(e){var t=this.gridLength?e:[],n=this.gridLineGroupSelection.update(t,(function(e){var t=new Eo;t.tag=Aa.GridLine,e.append(t)}),(function(e){return e.tickId})),i=this.tickLineGroupSelection.update(e,(function(e){var t=new Eo;t.tag=Aa.TickLine,e.appendChild(t)}),(function(e){return e.tickId})),r=this.tickLabelGroupSelection.update(e,(function(e){var t=new qe;t.tag=Aa.TickLabel,e.appendChild(t)}),(function(e){return e.tickId}));this.tickLineGroupSelection=i,this.tickLabelGroupSelection=r,this.gridLineGroupSelection=n}},{key:"updateGridLines",value:function(e){var t=this.gridStyle,n=this.tick,i=this.gridPadding,r=this.gridLength;if(0!==r&&0!==t.length){var o=t.length;this.gridLineGroupSelection.each((function(a,s,l){var u=t[l%o];a.x1=i,a.x2=-e*r+i,a.y1=0,a.y2=0,a.stroke=u.stroke,a.strokeWidth=n.width,a.lineDash=u.lineDash,a.fill=void 0}))}}},{key:"updateLabels",value:function(e){var t=e.tickLabelGroupSelection,n=e.combinedRotation,i=e.textBaseline,r=e.textAlign,o=e.labelX,a=this.label;this.label.enabled&&t.each((function(e,t){var s=t.tickLabel;e.fontStyle=a.fontStyle,e.fontWeight=a.fontWeight,e.fontSize=a.fontSize,e.fontFamily=a.fontFamily,e.fill=a.color,e.text=s,""===e.text||void 0==e.text?e.visible=!1:(e.textBaseline=i,e.textAlign=r,e.x=o,e.rotationCenterX=o,e.rotation=n,e.visible=!0)}))}},{key:"wrapLabels",value:function(e,t,n){var i=this.label,r=i.parallel,o=i.maxWidth,a=i.maxHeight,s=r?Math.round(this.calculateAvailableRange()/e.labelCount):this.maxThickness,l=null!==o&&void 0!==o?o:s,u=r?this.maxThickness:Math.round(this.calculateAvailableRange()/e.labelCount),c=null!==a&&void 0!==a?a:u;return e.ticks.forEach((function(e){var t=e.tickLabel,i=qe.wrap(t,l,c,n,"hyphenate");e.tickLabel=i})),{tickData:e,index:t,autoRotation:0,terminate:!0}}},{key:"updateLine",value:function(){var e=this.lineNode,t=this.range;e.x1=0,e.x2=0,e.y1=t[0],e.y2=t[1],e.strokeWidth=this.line.width,e.stroke=this.line.color,e.visible=!0}},{key:"updateTitle",value:function(e){var t,n=e.anyTickVisible,i=e.sideFlag,r=this.rotation,o=this.title,a=this._titleCaption,s=this.lineNode,l=this.range,u=this.tickLineGroup,c=this.tickLabelGroup,d=this.moduleCtx.callbackCache,h=(null!==(t=this.title)&&void 0!==t?t:{}).formatter,p=void 0===h?function(e){return e.defaultValue}:h;if(o){a.enabled=o.enabled,a.fontFamily=o.fontFamily,a.fontSize=o.fontSize,a.fontStyle=o.fontStyle,a.fontWeight=o.fontWeight,a.color=o.color,a.wrapping=o.wrapping;var f=!1,v=a.node;if(o.enabled&&s.visible){f=!0;var g=Ze(r),m=Ro.PADDING,y=-1===i&&g>Math.PI&&g<2*Math.PI?-1:1;v.rotation=y*i*Math.PI/2,v.x=Math.floor(y*i*(l[0]+l[1])/2);var C=0;if(n){var k=Ae.computeBBox([u,c]),w=0===r?k.width:k.height;Math.abs(w)<1/0&&(C+=w)}v.y=-1===i?Math.floor(y*(-m-C)):Math.floor(-m-C),v.textBaseline=1===y?"bottom":"top",v.text=d.call(p,this.getTitleFormatterParams())}v.visible=f}else a.enabled=!1}},{key:"formatTick",value:function(e,t){var n,i,r=this.label,o=this.labelFormatter,a=this.fractionDigits,s=this.moduleCtx.callbackCache;if(r.formatter){var l=a>0?e:String(e);return null!==(n=s.call(r.formatter,{value:l,index:t,fractionDigits:a,formatter:o}))&&void 0!==n?n:l}return o&&null!==(i=s.call(o,e))&&void 0!==i?i:String(e)}},{key:"formatDatum",value:function(e){return String(e)}},{key:"computeBBox",value:function(){return this.axisGroup.computeBBox()}},{key:"initCrossLine",value:function(e){e.scale=this.scale,e.gridLength=this.gridLength}},{key:"isAnySeriesActive",value:function(){var e=this;return this.boundSeries.some((function(t){return e.includeInvisibleDomains||t.isEnabled()}))}},{key:"clipTickLines",value:function(e,t,n,i){this.tickLineGroup.setClipRectInGroupCoordinateSpace(new he(e,t,n,i))}},{key:"clipGrid",value:function(e,t,n,i){this.gridGroup.setClipRectInGroupCoordinateSpace(new he(e,t,n,i))}},{key:"calculatePadding",value:function(e,t){return[Math.abs(.01*e),Math.abs(.01*e)]}},{key:"getTitleFormatterParams",value:function(){var e,t=this,n=this.boundSeries.reduce((function(e,n){for(var i=n.getKeys(t.direction),r=n.getNames(t.direction),o=0;o<i.length;o++)e.push({key:i[o],name:r[o]});return e}),[]);return{direction:this.direction,boundSeries:n,defaultValue:null===(e=this.title)||void 0===e?void 0:e.text}}},{key:"normaliseDataDomain",value:function(e){return e}},{key:"getLayoutState",value:function(){return Object.assign({rect:this.computeBBox(),gridPadding:this.gridPadding,seriesAreaPadding:this.seriesAreaPadding,tickSize:this.tick.size},this.layout)}},{key:"createAxisContext",value:function(){var e=this;return{axisId:this.id,direction:this.direction,continuous:this.scale instanceof To,keys:function(){return e.boundSeries.map((function(t){return t.getKeys(e.direction)})).reduce((function(e,t){return e.push.apply(e,(0,te.Z)(t)),e}),[])},scaleValueFormatter:function(t){var n,i,r;return null!==(r=null===(i=(n=e.scale).tickFormat)||void 0===i?void 0:i.call(n,{specifier:t}))&&void 0!==r?r:void 0},scaleBandwidth:function(){var t;return null!==(t=e.scale.bandwidth)&&void 0!==t?t:0},scaleConvert:function(t){return e.scale.convert(t)},scaleInvert:function(t){var n,i,r;return null!==(r=null===(i=(n=e.scale).invert)||void 0===i?void 0:i.call(n,t))&&void 0!==r?r:void 0}}}},{key:"addModule",value:function(e){if(null!=this.modules[e.optionsKey])throw new Error("AG Charts - module already initialised: "+e.optionsKey);null==this.axisContext&&(this.axisContext=this.createAxisContext());var t=new e.instanceConstructor(Object.assign(Object.assign({},this.moduleCtx),{parent:this.axisContext}));this.modules[e.optionsKey]={instance:t},this[e.optionsKey]=t}},{key:"removeModule",value:function(e){var t,n;null===(n=null===(t=this.modules[e.optionsKey])||void 0===t?void 0:t.instance)||void 0===n||n.destroy(),delete this.modules[e.optionsKey],delete this[e.optionsKey]}},{key:"isModuleEnabled",value:function(e){return null!=this.modules[e.optionsKey]}},{key:"animateReadyUpdate",value:function(e){var t,n,i=this;if(e.changed){var r=this.gridLineGroupSelection,o=this.tickLineGroupSelection,a=this.tickLabelGroupSelection,s=Object.keys(e.added).length,l=Object.keys(e.removed).length;if(l!==e.tickCount){var u=null!==(n=null===(t=this.animationManager)||void 0===t?void 0:t.defaultOptions.duration)&&void 0!==n?n:1e3,c=Math.floor(u/2);s>0&&l>0&&(c=Math.floor(u/3));var d={delay:l>0?c:0,duration:c},h="".concat(this.id,"_").concat(Math.random());a.each((function(t,n){i.animateSelectionNode(a,e,d,t,n,h)})),r.each((function(t,n){i.animateSelectionNode(r,e,d,t,n,h)})),o.each((function(t,n){i.animateSelectionNode(o,e,d,t,n,h)}))}else this.resetSelectionNodes()}else this.resetSelectionNodes()}},{key:"animateSelectionNode",value:function(e,t,n,i,r,o){var a=Math.round(r.translationY),s={from:i.translationY,to:a},l={from:1,to:1},u=n.duration,c=n.delay,d=r.tickLabel;t.added[d]?(s={from:a,to:a},l={from:0,to:1},c+=u):t.removed[d]&&(l={from:1,to:0},c=0);var h=[s,l];this.animationManager.animateManyWithThrottle("".concat(this.id,"_ready-update_").concat(i.id),h,{disableInteractions:!1,delay:c,duration:u,ease:nr,throttleId:this.id,throttleGroup:o,onUpdate:function(e){var t=(0,re.Z)(e,2),n=t[0],r=t[1];i.translationY=n,i.opacity=r},onComplete:function(){e.cleanup()}})}},{key:"resetSelectionNodes",value:function(){var e=this.gridLineGroupSelection,t=this.tickLineGroupSelection,n=this.tickLabelGroupSelection;e.cleanup(),t.cleanup(),n.cleanup();var i=function(e){e.translationY=Math.round(e.datum.translationY),e.opacity=1};e.each(i),t.each(i),n.each(i)}},{key:"calculateUpdateDiff",value:function(e,t){for(var n,i=new Set,r=new Set,o=Math.max(e.length,t.ticks.length),a=0;a<o;a++){var s=e[a],l=null===(n=t.ticks[a])||void 0===n?void 0:n.tickId;s!==l&&(r.has(l)?r.delete(l):l&&i.add(l),i.has(s)?i.delete(s):s&&r.add(s))}var u={},c={};return i.forEach((function(e){u[e]=!0})),r.forEach((function(e){c[e]=!0})),{changed:i.size>0||r.size>0,tickCount:o,added:u,removed:c}}}]),e}();Ga.defaultTickMinSpacing=50,Na([vt(Dt)],Ga.prototype,"nice",void 0),Na([vt(Kt)],Ga.prototype,"keys",void 0),Na([vt(Fa)],Ga.prototype,"gridStyle",void 0);var Za=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Va=(0,f.Z)((function e(){(0,p.Z)(this,e),this.enabled=!1,this.text=void 0,this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=10,this.fontFamily="sans-serif",this.color=void 0,this.wrapping="always",this.formatter=void 0}));Za([vt(Dt)],Va.prototype,"enabled",void 0),Za([vt(Pt)],Va.prototype,"text",void 0),Za([vt(nn)],Va.prototype,"fontStyle",void 0),Za([vt(on)],Va.prototype,"fontWeight",void 0),Za([vt(Bt(0))],Va.prototype,"fontSize",void 0),Za([vt(Ot)],Va.prototype,"fontFamily",void 0),Za([vt(Zt)],Va.prototype,"color",void 0),Za([vt(Cn)],Va.prototype,"wrapping",void 0),Za([vt(Rt)],Va.prototype,"formatter",void 0);var Ha=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Ba=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).enabled=!0,e.color="rgba(0, 0, 0, 0.5)",e.xOffset=0,e.yOffset=0,e.blur=5,e}return(0,f.Z)(n)}(we);Ha([vt(Dt),Ce({redraw:fe.MAJOR})],Ba.prototype,"enabled",void 0),Ha([vt(Gt),Ce({redraw:fe.MAJOR})],Ba.prototype,"color",void 0),Ha([vt(Bt()),Ce({redraw:fe.MAJOR})],Ba.prototype,"xOffset",void 0),Ha([vt(Bt()),Ce({redraw:fe.MAJOR})],Ba.prototype,"yOffset",void 0),Ha([vt(Bt(0)),Ce({redraw:fe.MAJOR})],Ba.prototype,"blur",void 0);var Wa=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.call(this,[0,1],[0,1])).type="linear",e}return(0,f.Z)(n,[{key:"toDomain",value:function(e){return e}},{key:"ticks",value:function(){var e,t=null!==(e=this.tickCount)&&void 0!==e?e:To.defaultTickCount;if(!this.domain||this.domain.length<2||t<1||this.domain.some((function(e){return!isFinite(e)})))return[];this.refresh();var n=this.getDomain(),i=(0,re.Z)(n,2),r=i[0],o=i[1],a=this.interval;if(a){var s=Math.abs(a);if(!this.isDenseInterval({start:r,stop:o,interval:s}))return Lo(r,o,s)}return Po(r,o,t,this.minTickCount,this.maxTickCount)}},{key:"update",value:function(){!this.domain||this.domain.length<2||this.nice&&this.updateNiceDomain()}},{key:"updateNiceDomain",value:function(){var e,t,n=null!==(e=this.tickCount)&&void 0!==e?e:To.defaultTickCount,i=(0,re.Z)(this.domain,2),r=i[0],o=i[1];if(n<1)this.niceDomain=[r,o];else if(1!==n){for(var a=r,s=o,l=0;l<4;l++){var u=null!==(t=this.interval)&&void 0!==t?t:Mo(r,o,n,this.minTickCount,this.maxTickCount),c=(0,re.Z)(this.domain,2),d=c[0],h=c[1];if(u>=1)r=Math.floor(d/u)*u,o=Math.ceil(h/u)*u;else{var p=1/u;r=Math.floor(d*p)/p,o=Math.ceil(h*p)/p}if(r===a&&o===s)break;a=r,s=o}this.niceDomain=[r,o]}else this.niceDomain=function(e,t){var n=Math.floor(Math.log10(t-e)),i=Math.pow(10,n);return Ao.map((function(n){var r=n*i,o=Math.floor(e/r)*r,a=Math.ceil(t/r)*r;return{error:1-(t-e)/(a-o),domain:[o,a]}})).sort((function(e,t){return e.error-t.error}))[0].domain}(r,o)}},{key:"tickFormat",value:function(e){var t=e.ticks,n=e.specifier;return ua(null!==t&&void 0!==t?t:this.ticks(),n)}}]),n}(To);function za(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e-10;return Math.abs(e-t)<n}function Ua(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=Math.floor(Math.log(Math.abs(e))/Math.LN10);return n>=0||!isFinite(n)?e.toFixed(t):e.toFixed(Math.abs(n)-1+t)}function ja(e,t,n){var i=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),r=n.innerRadius,o=n.outerRadius;if(i<Math.min(r,o)||i>Math.max(r,o))return!1;var a=Math.atan2(t,e);a<-Math.PI/2&&(a+=2*Math.PI);var s=n.startAngle,l=n.endAngle;return l===-Math.PI/2?a<s:s===3*Math.PI/2?a>l:a<=l&&a>=s}function Ka(e,t){var n=t.startAngle,i=t.endAngle,r=t.innerRadius,o=t.outerRadius,a={x:o*Math.cos(n),y:o*Math.sin(n)},s={x:o*Math.cos(i),y:o*Math.sin(i)},l=0===r?{x:0,y:0}:{x:r*Math.cos(n),y:r*Math.sin(n)},u=0===r?{x:0,y:0}:{x:r*Math.cos(i),y:r*Math.sin(i)};return null!=Tr(e.start.x,e.start.y,e.end.x,e.end.y,a.x,a.y,l.x,l.y)||null!=Tr(e.start.x,e.start.y,e.end.x,e.end.y,s.x,s.y,u.x,u.y)||Ar(0,0,o,n,i,!0,e.start.x,e.start.y,e.end.x,e.end.y).length>0}var Ya=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Xa=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).centerX=0,e.centerY=0,e.innerRadius=10,e.outerRadius=20,e.startAngle=0,e.endAngle=2*Math.PI,e.angleOffset=0,e}return(0,f.Z)(n,[{key:"computeBBox",value:function(){var e=this.outerRadius;return new he(this.centerX-e,this.centerY-e,2*e,2*e)}},{key:"updatePath",value:function(){var e=this.path,t=this.angleOffset,n=this.startAngle+t,i=this.endAngle+t,r=Math.min(this.innerRadius,this.outerRadius),o=Math.max(this.innerRadius,this.outerRadius),a=za(Ze(this.startAngle),Ze(this.endAngle)),s=this.centerX,l=this.centerY;e.clear(),a?(e.arc(s,l,o,n,i),r>0&&(e.moveTo(s+r*Math.cos(i),l+r*Math.sin(i)),e.arc(s,l,r,i,n,!0))):(e.moveTo(s+r*Math.cos(n),l+r*Math.sin(n)),e.arc(s,l,o,n,i),r>0?e.arc(s,l,r,i,n,!0):e.lineTo(s,l)),e.closePath(),this.dirtyPath=!1}},{key:"isPointInPath",value:function(e,t){var n=this.angleOffset,i=this.startAngle+n,r=this.endAngle+n,o=Math.min(this.innerRadius,this.outerRadius),a=Math.max(this.innerRadius,this.outerRadius),s=this.transformPoint(e,t);return ja(s.x,s.y,{startAngle:i,endAngle:r,innerRadius:o,outerRadius:a})}}]),n}(Ir);Xa.className="Sector",Ya([Lr()],Xa.prototype,"centerX",void 0),Ya([Lr()],Xa.prototype,"centerY",void 0),Ya([Lr()],Xa.prototype,"innerRadius",void 0),Ya([Lr()],Xa.prototype,"outerRadius",void 0),Ya([Lr()],Xa.prototype,"startAngle",void 0),Ya([Lr()],Xa.prototype,"endAngle",void 0),Ya([Lr()],Xa.prototype,"angleOffset",void 0);var qa,Qa=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i,r,o,a=e.moduleCtx,s=e.useLabelLayer,l=void 0!==s&&s,u=e.pickModes,c=void 0===u?[ri.EXACT_SHAPE_MATCH]:u;return(0,p.Z)(this,n),(o=t.call(this,{moduleCtx:a,useLabelLayer:l,pickModes:c,contentGroupVirtual:!1,directionKeys:(i={},(0,se.Z)(i,Qt.X,["angleKey"]),(0,se.Z)(i,Qt.Y,["radiusKey"]),i),directionNames:(r={},(0,se.Z)(r,Qt.X,["angleName"]),(0,se.Z)(r,Qt.Y,["radiusName"]),r)})).centerX=0,o.centerY=0,o.radius=0,o}return(0,f.Z)(n,[{key:"getLabelData",value:function(){return[]}},{key:"computeLabelsBBox",value:function(e,t){return null}}]),n}(Ei),Ja=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},$a=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))},es=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e,i,r,o,a,s,l){var u;return(0,p.Z)(this,n),(u=t.call(this,a,s,l)).angleKey=e,u.calloutLabelKey=i,u.sectorLabelKey=r,u.radiusKey=o,u}return(0,f.Z)(n)}(vi),ts=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).type="nodeClick",e}return(0,f.Z)(n)}(es),ns=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).type="nodeDoubleClick",e}return(0,f.Z)(n)}(es);!function(e){e[e.Sector=0]="Sector",e[e.Callout=1]="Callout",e[e.Label=2]="Label"}(qa||(qa={}));var is=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).offset=3,e.minAngle=0,e.formatter=void 0,e.minSpacing=4,e.maxCollisionOffset=50,e.avoidCollisions=!0,e}return(0,f.Z)(n)}(ga);Ja([vt(Bt(0))],is.prototype,"offset",void 0),Ja([vt(Bt(0))],is.prototype,"minAngle",void 0),Ja([vt(Rt)],is.prototype,"formatter",void 0),Ja([vt(Bt(0))],is.prototype,"minSpacing",void 0),Ja([vt(Bt(0))],is.prototype,"maxCollisionOffset",void 0),Ja([vt(Dt)],is.prototype,"avoidCollisions",void 0);var rs=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).positionOffset=0,e.positionRatio=.5,e.formatter=void 0,e}return(0,f.Z)(n)}(ga);Ja([vt(Bt())],rs.prototype,"positionOffset",void 0),Ja([vt(Bt(0,1))],rs.prototype,"positionRatio",void 0),Ja([vt(Rt)],rs.prototype,"formatter",void 0);var os=(0,f.Z)((function e(){(0,p.Z)(this,e),this.colors=void 0,this.length=10,this.strokeWidth=1}));Ja([vt(Ht)],os.prototype,"colors",void 0),Ja([vt(Bt(0))],os.prototype,"length",void 0),Ja([vt(Bt(0))],os.prototype,"strokeWidth",void 0);var as=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).renderer=void 0,e}return(0,f.Z)(n)}(Si);Ja([vt(Rt)],as.prototype,"renderer",void 0);var ss=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).showInLegend=!1,e}return(0,f.Z)(n)}(Ro);Ja([vt(Dt)],ss.prototype,"showInLegend",void 0);var ls=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).text="",e.margin=2,e}return(0,f.Z)(n)}(ga);Ja([vt(Ot)],ls.prototype,"text",void 0),Ja([vt(Bt())],ls.prototype,"margin",void 0);var us=(0,f.Z)((function e(){(0,p.Z)(this,e),this.fill="transparent",this.fillOpacity=1}));Ja([vt(Gt)],us.prototype,"fill",void 0),Ja([vt(Wt(0,1))],us.prototype,"fillOpacity",void 0);var cs=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n)}(Pa),ds=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i,r,o,a;(0,p.Z)(this,n),(i=t.call(this,{moduleCtx:e,useLabelLayer:!0})).radiusScale=new Wa,i.groupSelection=Rr.select(i.contentGroup,Ae),i.highlightSelection=Rr.select(i.highlightGroup,Ae),i.nodeData=[],i.seriesItemEnabled=[],i.title=void 0,i.calloutLabel=new is,i.sectorLabel=new rs,i.calloutLine=new os,i.tooltip=new as,i.angleKey="",i.angleName="",i.innerLabels=[],i.innerCircle=void 0,i.radiusKey=void 0,i.radiusName=void 0,i.radiusMin=void 0,i.radiusMax=void 0,i.calloutLabelKey=void 0,i.calloutLabelName=void 0,i.sectorLabelKey=void 0,i.sectorLabelName=void 0,i.legendItemKey=void 0,i.fills=["#c16068","#a2bf8a","#ebcc87","#80a0c3","#b58dae","#85c0d1"],i.strokes=["#874349","#718661","#a48f5f","#5a7088","#7f637a","#5d8692"],i.fillOpacity=1,i.strokeOpacity=1,i.lineDash=[0],i.lineDashOffset=0,i.formatter=void 0,i.rotation=0,i.outerRadiusOffset=0,i.outerRadiusRatio=1,i.innerRadiusOffset=0,i.innerRadiusRatio=1,i.strokeWidth=1,i.shadow=void 0,i.highlightStyle=new wi,i.surroundingRadius=void 0,i.angleScale=new Wa,i.angleScale.domain=[0,1],i.angleScale.range=[-Math.PI,Math.PI].map((function(e){return e+Math.PI/2})),i.backgroundGroup=i.rootGroup.appendChild(new Ae({name:"".concat(i.id,"-background"),layer:!0,zIndex:qt.SERIES_BACKGROUND_ZINDEX}));var s=new Ae({name:"pieCalloutLabels"}),l=new Ae({name:"pieSectorLabels"}),u=new Ae({name:"innerLabels"});return null===(r=i.labelGroup)||void 0===r||r.append(s),null===(o=i.labelGroup)||void 0===o||o.append(l),null===(a=i.labelGroup)||void 0===a||a.append(u),i.calloutLabelSelection=Rr.select(s,Ae),i.sectorLabelSelection=Rr.select(l,qe),i.innerLabelsSelection=Rr.select(u,qe),i.animationState=new cs("empty",{empty:{on:{update:{target:"ready",action:function(){return i.animateEmptyUpdateReady()}}}},ready:{on:{update:{target:"ready",action:function(){return i.animateReadyUpdateReady()}}}}}),i}return(0,f.Z)(n,[{key:"data",get:function(){return this._data},set:function(e){this._data=e,this.processSeriesItemEnabled()}},{key:"addChartEventListeners",value:function(){var e,t=this;null===(e=this.ctx.chartEventManager)||void 0===e||e.addListener("legend-item-click",(function(e){return t.onLegendItemClick(e)}))}},{key:"visibleChanged",value:function(){this.processSeriesItemEnabled()}},{key:"processSeriesItemEnabled",value:function(){var e,t=this.data,n=this.visible;this.seriesItemEnabled=null!==(e=null===t||void 0===t?void 0:t.map((function(){return n})))&&void 0!==e?e:[]}},{key:"getDomain",value:function(e){return e===Qt.X?this.angleScale.domain:this.radiusScale.domain}},{key:"processData",value:function(e){var t,n;return $a(this,void 0,void 0,(0,ie.Z)().mark((function i(){var r,o,a,s,l,u,c,d,h,p,f,v;return(0,ie.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(r=this.data,o=void 0===r?[]:r,a=this.angleKey,s=this.radiusKey,l=this.calloutLabelKey,u=this.sectorLabelKey,c=this.legendItemKey,d=this.seriesItemEnabled,a){i.next=4;break}return i.abrupt("return");case 4:return h=[],s&&(h.push(di(this,s,{id:"radiusValue",min:null!==(t=this.radiusMin)&&void 0!==t?t:0,max:this.radiusMax}),ci(this,s,!0,{id:"radiusRaw"}),Xn(this,{id:"radiusValue"},[0,1],null!==(n=this.radiusMin)&&void 0!==n?n:0,this.radiusMax)),h.push()),l&&h.push(ci(this,l,!1,{id:"calloutLabelValue"})),u&&h.push(ci(this,u,!1,{id:"sectorLabelValue"})),c&&h.push(ci(this,c,!1,{id:"legendItemValue"})),o=o.map((function(e,t){return d[t]?e:Object.assign(Object.assign({},e),(0,se.Z)({},a,0))})),i.next=12,e.request(this.id,o,{props:[hi(this,a,!0,{id:"angleValue"}),ci(this,a,!0,{id:"angleRaw"}),Xn(this,{id:"angleValue"},[0,1],0)].concat(h)});case 12:p=i.sent,f=p.dataModel,v=p.processedData,this.dataModel=f,this.processedData=v;case 17:case"end":return i.stop()}}),i,this)})))}},{key:"maybeRefreshNodeData",value:function(){if(this.nodeDataRefresh){var e=this._createNodeData(),t=(0,re.Z)(e,1)[0],n=(t=void 0===t?{}:t).nodeData,i=void 0===n?[]:n;this.nodeData=i,this.nodeDataRefresh=!1}}},{key:"createNodeData",value:function(){return $a(this,void 0,void 0,(0,ie.Z)().mark((function e(){return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._createNodeData());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getProcessedDataIndexes",value:function(e){return{angleIdx:e.resolveProcessedDataIndexById(this,"angleValue").index,radiusIdx:this.radiusKey?e.resolveProcessedDataIndexById(this,"radiusValue").index:-1,calloutLabelIdx:this.calloutLabelKey?e.resolveProcessedDataIndexById(this,"calloutLabelValue").index:-1,sectorLabelIdx:this.sectorLabelKey?e.resolveProcessedDataIndexById(this,"sectorLabelValue").index:-1,legendItemIdx:this.legendItemKey?e.resolveProcessedDataIndexById(this,"legendItemValue").index:-1}}},{key:"_createNodeData",value:function(){var e=this,t=this.id,n=this.processedData,i=this.dataModel,r=this.rotation,o=this.angleScale;if(!n||!i||"ungrouped"!==n.type)return[];var a=this.getProcessedDataIndexes(i),s=a.angleIdx,l=a.radiusIdx,u=a.calloutLabelIdx,c=a.sectorLabelIdx,d=a.legendItemIdx,h=0,p=n.data.map((function(t,n){var i,a=t.datum,p=t.values,f=p[s],v=o.convert(h)+Be(r);h=f;var g=o.convert(h)+Be(r),m=Math.abs(g-v),y=v+m/2,C=p[s+1],k=l>=0&&null!==(i=p[l])&&void 0!==i?i:1,w=l>=0?p[l+1]:void 0,S=d>=0?p[d]:void 0,b=e.getLabels(a,y,m,!0,f,w,p[u],p[c],S),E=e.getSectorFormat(a,n,n,!1);return Object.assign({itemId:n,series:e,datum:a,index:n,angleValue:C,midAngle:y,midCos:Math.cos(y),midSin:Math.sin(y),startAngle:v,endAngle:g,sectorFormat:E,radius:k,radiusValue:w,legendItemValue:S},b)}));return[{itemId:t,nodeData:p,labelData:p}]}},{key:"getLabels",value:function(e,t,n,i,r,o,a,s,l){var u=this.calloutLabel,c=this.sectorLabel,d=this.legendItemKey,h=this.ctx.callbackCache,p=!i||u.enabled?this.calloutLabelKey:void 0,f=!i||c.enabled?this.sectorLabelKey:void 0;if(!p&&!f&&!d)return{};var v,g,m=this.getLabelFormatterParams(e,r,o,a,s);p&&(v=n>Be(u.minAngle)?u.formatter?h.call(u.formatter,m):String(a):void 0);return f&&(g=c.formatter?h.call(c.formatter,m):String(s)),Object.assign(Object.assign(Object.assign({},null!=v?{calloutLabel:Object.assign(Object.assign({},this.getTextAlignment(t)),{text:v,hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0})}:{}),null!=g?{sectorLabel:{text:g}}:{}),null!=d&&null!=l?{legendItem:{key:d,text:l}}:{})}},{key:"getLabelFormatterParams",value:function(e,t,n,i,r){var o=this.id,a=this.radiusKey,s=this.radiusName;return{datum:e,angleKey:this.angleKey,angleValue:t,angleName:this.angleName,radiusKey:a,radiusValue:n,radiusName:s,calloutLabelKey:this.calloutLabelKey,calloutLabelValue:i,calloutLabelName:this.calloutLabelName,sectorLabelKey:this.sectorLabelKey,sectorLabelValue:r,sectorLabelName:this.sectorLabelName,seriesId:o}}},{key:"getTextAlignment",value:function(e){var t,n,i=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],r=He(e)- -3*Math.PI/4,o=Math.floor(r/(Math.PI/2));return i[(n=i.length,(t=o)>=0?Math.floor(t%n):Math.floor(t%n+n))]}},{key:"getSectorFormat",value:function(e,t,n,i){var r,o,a,s,l,u,c,d,h,p=this.angleKey,f=this.radiusKey,v=this.fills,g=this.strokes,m=this.fillOpacity,y=this.formatter,C=this.id,k=this.ctx,w=k.callbackCache,S=k.highlightManager,b=null===S||void 0===S?void 0:S.getActiveHighlight(),E=i&&(null===b||void 0===b?void 0:b.series)===this&&t===b.itemId,x=E?this.highlightStyle.item:null,R=null!==(r=null===x||void 0===x?void 0:x.fill)&&void 0!==r?r:v[n%v.length],D=null!==(o=null===x||void 0===x?void 0:x.fillOpacity)&&void 0!==o?o:m,T=null!==(a=null===x||void 0===x?void 0:x.stroke)&&void 0!==a?a:g[n%g.length],O=null!==(s=null===x||void 0===x?void 0:x.strokeWidth)&&void 0!==s?s:this.getStrokeWidth(this.strokeWidth);return y&&(h=w.call(y,{datum:e,angleKey:p,radiusKey:f,fill:R,stroke:T,strokeWidth:O,highlighted:E,seriesId:C})),{fill:null!==(l=null===h||void 0===h?void 0:h.fill)&&void 0!==l?l:R,fillOpacity:null!==(u=null===h||void 0===h?void 0:h.fillOpacity)&&void 0!==u?u:D,stroke:null!==(c=null===h||void 0===h?void 0:h.stroke)&&void 0!==c?c:T,strokeWidth:null!==(d=null===h||void 0===h?void 0:h.strokeWidth)&&void 0!==d?d:O}}},{key:"getInnerRadius",value:function(){var e=this.radius,t=this.innerRadiusRatio,n=this.innerRadiusOffset,i=e*(null!==t&&void 0!==t?t:1)+(n||0);return i===e||i<0?0:i}},{key:"getOuterRadius",value:function(){var e=this.radius,t=this.outerRadiusRatio,n=this.outerRadiusOffset,i=e*(null!==t&&void 0!==t?t:1)+(n||0);return i<0?0:i}},{key:"updateRadiusScale",value:function(){var e=this.getInnerRadius(),t=this.getOuterRadius();this.radiusScale.range=[e,t]}},{key:"getTitleTranslationY",value:function(){var e,t,n=Math.max(0,this.radiusScale.range[1]);return 0===n?NaN:-n-(2+(null!==(t=null===(e=this.title)||void 0===e?void 0:e.spacing)&&void 0!==t?t:0))-Math.max(0,-n)}},{key:"update",value:function(e){var t=e.seriesRect;return $a(this,void 0,void 0,(0,ie.Z)().mark((function e(){var n,i,r;return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.title,this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(),this.updateInnerCircleNodes(),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),n&&(i=this.getTitleTranslationY(),r=n.node.computeBBox(),n.node.visible=n.enabled&&isFinite(i)&&!this.bboxIntersectsSurroundingSeries(r,0,i),n.node.translationY=isFinite(i)?i:0),this.updateNodeMidPoint(),e.next=16,this.updateSelections();case 16:return e.next=18,this.updateNodes(t);case 18:case"end":return e.stop()}}),e,this)})))}},{key:"updateTitleNodes",value:function(){var e,t,n=this.title,i=this.oldTitle;i!==n&&(i&&(null===(e=this.labelGroup)||void 0===e||e.removeChild(i.node)),n&&(n.node.textBaseline="bottom",null===(t=this.labelGroup)||void 0===t||t.appendChild(n.node)),this.oldTitle=n)}},{key:"updateInnerCircleNodes",value:function(){var e,t,n=this.innerCircle,i=this.oldInnerCircle,r=this.innerCircleNode;i!==n&&(r&&this.backgroundGroup.removeChild(r),n&&((t=new Hr).fill=n.fill,t.fillOpacity=null!==(e=n.fillOpacity)&&void 0!==e?e:1,this.backgroundGroup.appendChild(t)),this.oldInnerCircle=n,this.innerCircleNode=t)}},{key:"updateNodeMidPoint",value:function(){var e=this;this.nodeData.forEach((function(t){var n=e.radiusScale.convert(t.radius);t.nodeMidPoint={x:t.midCos*Math.max(0,n/2),y:t.midSin*Math.max(0,n/2)}}))}},{key:"updateSelections",value:function(){return $a(this,void 0,void 0,(0,ie.Z)().mark((function e(){return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.updateGroupSelection();case 2:case"end":return e.stop()}}),e,this)})))}},{key:"updateGroupSelection",value:function(){return $a(this,void 0,void 0,(0,ie.Z)().mark((function e(){var t,n,i,r,o,a,s=this;return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.groupSelection,n=this.highlightSelection,i=this.calloutLabelSelection,r=this.sectorLabelSelection,o=this.innerLabelsSelection,a=function(e){return e.update(s.nodeData,(function(e){var t=new Xa;t.tag=qa.Sector,e.appendChild(t)}))},this.groupSelection=a(t),this.highlightSelection=a(n),i.update(this.nodeData,(function(e){var t=new Eo;t.tag=qa.Callout,t.pointerEvents=ke.None,e.appendChild(t);var n=new qe;n.tag=qa.Label,n.pointerEvents=ke.None,e.appendChild(n)})),r.update(this.nodeData,(function(e){e.pointerEvents=ke.None})),o.update(this.innerLabels,(function(e){e.pointerEvents=ke.None}));case 7:case"end":return e.stop()}}),e,this)})))}},{key:"updateNodes",value:function(e){var t;return $a(this,void 0,void 0,(0,ie.Z)().mark((function n(){var i,r,o,a,s,l=this;return(0,ie.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=null===(t=this.ctx.highlightManager)||void 0===t?void 0:t.getActiveHighlight(),r=this.seriesItemEnabled.indexOf(!0)>=0,this.rootGroup.visible=r,this.backgroundGroup.visible=r,this.contentGroup.visible=r,this.highlightGroup.visible=r&&(null===i||void 0===i?void 0:i.series)===this,this.labelGroup&&(this.labelGroup.visible=r),this.contentGroup.opacity=this.getOpacity(),this.updateInnerCircle(),o=this.radiusScale,a=o.convert(0),s=function(e,t,n,i){var r=o.convert(t.radius),s=e.parent,u=null===s||void 0===s?void 0:s.parent;i&&s&&u&&(u.removeChild(s),u.appendChild(s)),e.innerRadius=Math.max(0,a),e.outerRadius=Math.max(0,r),i&&(e.startAngle=t.startAngle,e.endAngle=t.endAngle);var c=l.getSectorFormat(t.datum,t.itemId,n,i);e.fill=c.fill,e.stroke=c.stroke,e.strokeWidth=c.strokeWidth,e.fillOpacity=c.fillOpacity,e.strokeOpacity=l.strokeOpacity,e.lineDash=l.lineDash,e.lineDashOffset=l.lineDashOffset,e.fillShadow=l.shadow,e.lineJoin="round",e.visible=l.seriesItemEnabled[n]},this.groupSelection.selectByTag(qa.Sector).forEach((function(e,t){return s(e,e.datum,t,!1)})),this.highlightSelection.selectByTag(qa.Sector).forEach((function(e,t){var n=(null===i||void 0===i?void 0:i.series)===l&&e.datum.itemId===i.itemId;n?s(e,e.datum,t,n):e.visible=!1})),this.animationState.transition("update"),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(e),this.updateSectorLabelNodes(),this.updateInnerLabelNodes();case 19:case"end":return n.stop()}}),n,this)})))}},{key:"updateCalloutLineNodes",value:function(){var e,t=this.radiusScale,n=this.calloutLine,i=n.length,r=n.strokeWidth,o=null!==(e=n.colors)&&void 0!==e?e:this.strokes,a=this.calloutLabel.offset;this.calloutLabelSelection.selectByTag(qa.Callout).forEach((function(e,n){var s=e.datum,l=t.convert(s.radius),u=Math.max(0,l),c=s.calloutLabel;if((null===c||void 0===c?void 0:c.text)&&!c.hidden&&0!==u){e.visible=!0,e.strokeWidth=r,e.stroke=o[n%o.length],e.fill=void 0;var d=s.midCos*u,h=s.midSin*u,p=s.midCos*(u+i),f=s.midSin*(u+i);if((c.collisionTextAlign||0!==c.collisionOffsetY)&&null!=c.box){var v=c.box,g=p,m=f;p<v.x?g=v.x:p>v.x+v.width&&(g=v.x+v.width),f<v.y?m=v.y:f>v.y+v.height&&(m=v.y+v.height);var y=g-p,C=m-f,k=Math.sqrt(Math.pow(y,2)+Math.pow(C,2)),w=k-a;w>0&&(p+=y*w/k,f+=C*w/k)}e.x1=d,e.y1=h,e.x2=p,e.y2=f}else e.visible=!1}))}},{key:"getLabelOverflow",value:function(e,t,n){var i=n.x-this.centerX,r=n.x+n.width-this.centerX,o=n.y-this.centerY,a=n.y+n.height-this.centerY,s=1;t.x+1<i?s=(t.x+t.width-i)/t.width:t.x+t.width-1>r&&(s=(r-t.x)/t.width);var l=t.y+1<o||t.y+t.height-1>a;return{textLength:1===s?e.length:Math.floor(e.length*s)-1,hasVerticalOverflow:l,hasSurroundingSeriesOverflow:this.bboxIntersectsSurroundingSeries(t)}}},{key:"bboxIntersectsSurroundingSeries",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=this.surroundingRadius;if(null==i)return!1;var r=[{x:e.x+t,y:e.y+n},{x:e.x+e.width+t,y:e.y+n},{x:e.x+e.width+t,y:e.y+e.height+n},{x:e.x+t,y:e.y+e.height+n}],o=Math.pow(i,2);return r.some((function(e){return Math.pow(e.x,2)+Math.pow(e.y,2)>o}))}},{key:"computeCalloutLabelCollisionOffsets",value:function(){var e=this,t=this.radiusScale,n=this.calloutLabel,i=this.calloutLine,r=n.offset,o=n.minSpacing,a=t.convert(0),s=this.nodeData,l=this.nodeData.filter((function(e){return!function(e){var n=e.calloutLabel,i=t.convert(e.radius),r=Math.max(0,i);return!n||0===r}(e)}));if(l.forEach((function(e){var t=e.calloutLabel;null!=t&&(t.hidden=!1,t.collisionTextAlign=void 0,t.collisionOffsetY=0)})),!(l.length<=1)){var u=l.filter((function(e){return e.midCos<0})).sort((function(e,t){return e.midSin-t.midSin})),c=l.filter((function(e){return e.midCos>=0})).sort((function(e,t){return e.midSin-t.midSin})),d=l.filter((function(e){var t;return e.midSin<0&&"center"===(null===(t=e.calloutLabel)||void 0===t?void 0:t.textAlign)})).sort((function(e,t){return e.midCos-t.midCos})),h=l.filter((function(e){var t;return e.midSin>=0&&"center"===(null===(t=e.calloutLabel)||void 0===t?void 0:t.textAlign)})).sort((function(e,t){return e.midCos-t.midCos})),p=new qe,f=function(n){var o,a=n.calloutLabel;if(null==a)return new he(0,0,0,0);var s=t.convert(n.radius),l=Math.max(0,s)+i.length+r,u=n.midCos*l,c=n.midSin*l+a.collisionOffsetY;return p.text=a.text,p.x=u,p.y=c,p.setFont(e.calloutLabel),p.setAlign({textAlign:null!==(o=a.collisionTextAlign)&&void 0!==o?o:a.textAlign,textBaseline:a.textBaseline}),p.computeBBox()},v=function(e,t,n){var i=f(e).grow(o/2),r=f(t).grow(o/2);if(i.x<r.x+r.width&&i.x+i.width>r.x&&("to-top"===n?i.y<r.y+r.height:i.y+i.height>r.y)){var a="to-top"===n?i.y-r.y-r.height:i.y+i.height-r.y;t.calloutLabel.collisionOffsetY=a}},g=function(e){for(var t=e.slice().sort((function(e,t){return Math.abs(e.midSin)-Math.abs(t.midSin)}))[0],n=e.indexOf(t),i=n-1;i>=0;i--){var r=e[i+1],o=e[i];v(r,o,"to-top")}for(var a=n+1;a<e.length;a++){var s=e[a-1],l=e[a];v(s,l,"to-bottom")}},m=function(e){for(var n=l.some((function(e){return 0!==e.calloutLabel.collisionOffsetY})),i=e.map((function(e){return f(e)})),r=i.map((function(e){return e.clone().grow(o/2)})),u=!1,c=0;c<r.length&&!u;c++)for(var d=r[c],h=c+1;h<e.length;h++){var p=r[h];if(d.collidesBBox(p)){u=!0;break}}var v=s.map((function(e){var n=e.startAngle,i=e.endAngle,r=t.convert(e.radius),o=Math.max(0,r);return{startAngle:n,endAngle:i,innerRadius:a,outerRadius:o}})),g=i.some((function(e){return v.some((function(t){return function(e,t){var n={x:e.x,y:e.y},i={x:e.x+e.width,y:e.y},r={x:e.x,y:e.y+e.height},o={x:e.x+e.width,y:e.y+e.height};return Ka({start:n,end:i},t)||Ka({start:r,end:o},t)}(e,t)}))}));(u||n||g)&&e.filter((function(e){return"center"===e.calloutLabel.textAlign})).forEach((function(e){var t=e.calloutLabel;e.midCos<0?t.collisionTextAlign="right":e.midCos>0?t.collisionTextAlign="left":t.collisionTextAlign="center"}))};g(u),g(c),m(d),m(h)}}},{key:"updateCalloutLabelNodes",value:function(e){var t=this,n=this.radiusScale,i=this.calloutLabel,r=this.calloutLine.length,o=i.offset,a=i.color,s=new qe;this.calloutLabelSelection.selectByTag(qa.Label).forEach((function(l){var u,c=l.datum,d=c.calloutLabel,h=n.convert(c.radius),p=Math.max(0,h);if((null===d||void 0===d?void 0:d.text)&&0!==p&&!d.hidden){var f=p+r+o,v=c.midCos*f,g=c.midSin*f+d.collisionOffsetY,m={textAlign:null!==(u=d.collisionTextAlign)&&void 0!==u?u:d.textAlign,textBaseline:d.textBaseline};s.text=d.text,s.x=v,s.y=g,s.setFont(t.calloutLabel),s.setAlign(m);var y=s.computeBBox(),C=d.text,k=!0;if(i.avoidCollisions){var w=t.getLabelOverflow(d.text,y,e),S=w.textLength,b=w.hasVerticalOverflow;C=d.text.length===S?d.text:"".concat(d.text.substring(0,S),"\u2026"),k=!b}l.text=C,l.x=v,l.y=g,l.setFont(t.calloutLabel),l.setAlign(m),l.fill=a,l.visible=k}else l.visible=!1}))}},{key:"computeLabelsBBox",value:function(e,t){var n,i=this,r=this.radiusScale,o=this.calloutLabel,a=this.calloutLine.length,s=o.offset,l=o.maxCollisionOffset,u=o.minSpacing;if(!o.avoidCollisions)return null;this.maybeRefreshNodeData(),this.updateRadiusScale(),this.computeCalloutLabelCollisionOffsets();var c,d=[],h=new qe;if((null===(n=this.title)||void 0===n?void 0:n.text)&&this.title.enabled){var p=this.getTitleTranslationY();isFinite(p)&&(h.text=this.title.text,h.x=0,h.y=p,h.setFont(this.title),h.setAlign({textBaseline:"bottom",textAlign:"center"}),c=h.computeBBox(),d.push(c))}return this.nodeData.forEach((function(n){var o,p=n.calloutLabel,f=r.convert(n.radius),v=Math.max(0,f);if(!p||0===v)return null;var g=v+a+s,m=n.midCos*g,y=n.midSin*g+p.collisionOffsetY;h.text=p.text,h.x=m,h.y=y,h.setFont(i.calloutLabel),h.setAlign({textAlign:null!==(o=p.collisionTextAlign)&&void 0!==o?o:p.textAlign,textBaseline:p.textBaseline});var C=h.computeBBox();if(p.box=C,Math.abs(p.collisionOffsetY)>l)p.hidden=!0;else{if(c){var k=t.y-i.centerY,w=new he(c.x-u,k,c.width+2*u,c.y+c.height+u-k);if(C.collidesBBox(w))return void(p.hidden=!0)}if(e.hideWhenNecessary){var S=i.getLabelOverflow(p.text,C,t),b=S.textLength,E=S.hasVerticalOverflow,x=S.hasSurroundingSeriesOverflow,R=p.text.length>2&&b<2;if(E||R||x)return void(p.hidden=!0)}p.hidden=!1,d.push(C)}})),0===d.length?null:he.merge(d)}},{key:"updateSectorLabelNodes",value:function(){var e=this.radiusScale,t=e.convert(0),n=this.sectorLabel,i=n.fontSize,r=n.fontStyle,o=n.fontWeight,a=n.fontFamily,s=n.positionOffset,l=n.positionRatio,u=n.color,c=t>0,d=1===this.seriesItemEnabled.filter(Boolean).length;this.sectorLabelSelection.each((function(n,h){var p=h.sectorLabel,f=e.convert(h.radius),v=Math.max(0,f),g=!1;if(p&&0!==v){var m=t*(1-l)+f*l+s;n.fill=u,n.fontStyle=r,n.fontWeight=o,n.fontSize=i,n.fontFamily=a,n.text=p.text,!c&&d?(n.x=0,n.y=0):(n.x=h.midCos*m,n.y=h.midSin*m),n.textAlign="center",n.textBaseline="middle";var y=n.computeBBox(),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]],k={startAngle:h.startAngle,endAngle:h.endAngle,innerRadius:t,outerRadius:v};C.every((function(e){var t=(0,re.Z)(e,2);return ja(t[0],t[1],k)}))&&(g=!0)}n.visible=g}))}},{key:"updateInnerCircle",value:function(){var e=this.innerCircleNode;if(e){var t=this.getInnerRadius();if(0===t)e.size=0;else{var n=Math.min(t,this.getOuterRadius());e.size=Math.ceil(2*n+1)}}}},{key:"updateInnerLabelNodes",value:function(){var e=[],t=[];this.innerLabelsSelection.each((function(n,i){var r=i.fontStyle,o=i.fontWeight,a=i.fontSize,s=i.fontFamily,l=i.color;n.fontStyle=r,n.fontWeight=o,n.fontSize=a,n.fontFamily=s,n.text=i.text,n.x=0,n.y=0,n.fill=l,n.textAlign="center",n.textBaseline="alphabetic",e.push(n.computeBBox()),t.push(i.margin)}));for(var n=function(e){return 0===e?0:t[e]},i=function(e){return e===t.length-1?0:t[e]},r=e.reduce((function(e,t,r){return e+t.height+n(r)+i(r)}),0),o=Math.max.apply(Math,(0,te.Z)(e.map((function(e){return e.width})))),a=this.getInnerRadius(),s=Math.sqrt(Math.pow(o/2,2)+Math.pow(r/2,2))<=(a>0?a:this.getOuterRadius()),l=[],u=0,c=-r/2;u<e.length;u++){var d=e[u].height+c+n(u);l.push(d),c=d+i(u)}this.innerLabelsSelection.each((function(e,t,n){e.y=l[n],e.visible=s}))}},{key:"getNodeClickEvent",value:function(e,t){return new ts(this.angleKey,this.calloutLabelKey,this.sectorLabelKey,this.radiusKey,e,t,this)}},{key:"getNodeDoubleClickEvent",value:function(e,t){return new ns(this.angleKey,this.calloutLabelKey,this.sectorLabelKey,this.radiusKey,e,t,this)}},{key:"getTooltipHtml",value:function(e){var t,n=this.angleKey;if(!n)return"";var i=this.tooltip,r=this.angleName,o=this.radiusKey,a=this.radiusName,s=this.calloutLabelKey,l=this.sectorLabelKey,u=this.calloutLabelName,c=this.sectorLabelName,d=this.id,h=i.renderer,p=e.datum,f=e.angleValue,v=e.radiusValue,g=e.sectorFormat.fill,m=e.calloutLabel,y=(m=void 0===m?{}:m).text,C=void 0===y?"":y,k="number"===typeof f?Ua(f):String(f),w=null===(t=this.title)||void 0===t?void 0:t.text,S={title:w,backgroundColor:g,content:"".concat(C?"".concat(C,": "):"").concat(k)};return h?An(h({datum:p,angleKey:n,angleValue:f,angleName:r,radiusKey:o,radiusValue:v,radiusName:a,calloutLabelKey:s,calloutLabelName:u,sectorLabelKey:l,sectorLabelName:c,title:w,color:g,seriesId:d}),S):An(S)}},{key:"getLegendData",value:function(){var e,t,n,i=this.processedData,r=this.calloutLabelKey,o=this.legendItemKey,a=this.id,s=this.dataModel;if(!s||!i||0===i.data.length)return[];if(!o&&!r)return[];for(var l=this.getProcessedDataIndexes(s),u=l.angleIdx,c=l.radiusIdx,d=l.calloutLabelIdx,h=l.sectorLabelIdx,p=l.legendItemIdx,f=(null===(e=this.title)||void 0===e?void 0:e.showInLegend)&&this.title.text,v=[],g=0;g<i.data.length;g++){var m=i.data[g],y=m.datum,C=m.values,k=[];f&&k.push(f);var w=this.getLabels(y,2*Math.PI,2*Math.PI,!1,C[u],C[c],C[d],C[h],C[p]);if(o&&void 0!==w.legendItem?k.push(w.legendItem.text):r&&void 0!==(null===(t=w.calloutLabel)||void 0===t?void 0:t.text)&&k.push(null===(n=w.calloutLabel)||void 0===n?void 0:n.text),0!==k.length){var S=this.getSectorFormat(y,g,g,!1);v.push({legendType:"category",id:a,itemId:g,seriesId:a,enabled:this.seriesItemEnabled[g],label:{text:k.join(" - ")},marker:{fill:S.fill,stroke:S.stroke,fillOpacity:this.fillOpacity,strokeOpacity:this.strokeOpacity}})}}return v}},{key:"onLegendItemClick",value:function(e){var t=e.enabled,n=e.itemId,i=e.series;i.id===this.id?this.toggleSeriesItem(n,t):"pie"===i.type&&this.toggleOtherSeriesItems(i,n,t)}},{key:"toggleSeriesItem",value:function(e,t){this.seriesItemEnabled[e]=t,this.nodeDataRefresh=!0}},{key:"toggleOtherSeriesItems",value:function(e,t,n){var i,r,o=this,a=this.legendItemKey,s=this.dataModel;if(a&&s){var l=e.legendItemKey&&(null===(i=e.data)||void 0===i?void 0:i.find((function(e,n){return n===t}))[e.legendItemKey]);if(l){var u=s.resolveProcessedDataIndexById(this,"legendItemValue").index;null===(r=this.processedData)||void 0===r||r.data.forEach((function(e,t){e.values[u]===l&&o.toggleSeriesItem(t,n)}))}}}},{key:"animateEmptyUpdateReady",value:function(){var e,t,n=this,i=null!==(t=null===(e=this.ctx.animationManager)||void 0===e?void 0:e.defaultOptions.duration)&&void 0!==t?t:1e3,r=Math.PI/-2+Be(this.rotation);this.groupSelection.selectByTag(qa.Sector).forEach((function(e){var t,o=e.datum;null===(t=n.ctx.animationManager)||void 0===t||t.animateMany("".concat(n.id,"_empty-update-ready_").concat(e.id),[{from:r,to:o.startAngle},{from:r,to:o.endAngle}],{duration:i,ease:nr,onUpdate:function(t){var n=(0,re.Z)(t,2),i=n[0],r=n[1];e.startAngle=i,e.endAngle=r}})}));var o={from:0,to:1,delay:i,duration:200};this.calloutLabelSelection.each((function(e){var t;null===(t=n.ctx.animationManager)||void 0===t||t.animate("".concat(n.id,"_empty-update-ready_").concat(e.id),Object.assign(Object.assign({},o),{onUpdate:function(t){e.opacity=t}}))})),this.sectorLabelSelection.each((function(e){var t;null===(t=n.ctx.animationManager)||void 0===t||t.animate("".concat(n.id,"_empty-update-ready_").concat(e.id),Object.assign(Object.assign({},o),{onUpdate:function(t){e.opacity=t}}))})),this.innerLabelsSelection.each((function(e){var t;null===(t=n.ctx.animationManager)||void 0===t||t.animate("".concat(n.id,"_empty-update-ready_").concat(e.id),Object.assign(Object.assign({},o),{onUpdate:function(t){e.opacity=t}}))}))}},{key:"animateReadyUpdateReady",value:function(){this.groupSelection.selectByTag(qa.Sector).forEach((function(e){var t=e.datum;e.startAngle=t.startAngle,e.endAngle=t.endAngle}))}}]),n}(Qa);ds.className="PieSeries",ds.type="pie",Ja([vt(Ot)],ds.prototype,"angleKey",void 0),Ja([vt(Ot)],ds.prototype,"angleName",void 0),Ja([vt(Pt)],ds.prototype,"radiusKey",void 0),Ja([vt(Pt)],ds.prototype,"radiusName",void 0),Ja([vt(Wt(0))],ds.prototype,"radiusMin",void 0),Ja([vt(Wt(0))],ds.prototype,"radiusMax",void 0),Ja([vt(Pt)],ds.prototype,"calloutLabelKey",void 0),Ja([vt(Pt)],ds.prototype,"calloutLabelName",void 0),Ja([vt(Pt)],ds.prototype,"sectorLabelKey",void 0),Ja([vt(Pt)],ds.prototype,"sectorLabelName",void 0),Ja([vt(Pt)],ds.prototype,"legendItemKey",void 0),Ja([vt(Vt)],ds.prototype,"fills",void 0),Ja([vt(Vt)],ds.prototype,"strokes",void 0),Ja([vt(Bt(0,1))],ds.prototype,"fillOpacity",void 0),Ja([vt(Bt(0,1))],ds.prototype,"strokeOpacity",void 0),Ja([vt(sn)],ds.prototype,"lineDash",void 0),Ja([vt(Bt(0))],ds.prototype,"lineDashOffset",void 0),Ja([vt(Rt)],ds.prototype,"formatter",void 0),Ja([vt(Bt(-360,360))],ds.prototype,"rotation",void 0),Ja([vt(Bt())],ds.prototype,"outerRadiusOffset",void 0),Ja([vt(Bt(0))],ds.prototype,"outerRadiusRatio",void 0),Ja([vt(Bt())],ds.prototype,"innerRadiusOffset",void 0),Ja([vt(Bt(0))],ds.prototype,"innerRadiusRatio",void 0),Ja([vt(Bt(0))],ds.prototype,"strokeWidth",void 0);var hs={constructors:{},constructedArrays:new WeakMap};function ps(e,t){var n;null===(n=hs.constructedArrays)||void 0===n||n.set(e,t)}var fs={constructors:{title:Ro,subtitle:Ro,footnote:Ro,shadow:Ba,innerCircle:us,"axes[].title":Va,"series[].innerLabels[]":ls},allowedTypes:{"legend.pagination.marker.shape":["primitive","function"],"series[].marker.shape":["primitive","function"],"axis[].tick.count":["primitive","class-instance"]}};function vs(){return{constructors:Object.assign(Object.assign({},fs.constructors),hs.constructors),constructedArrays:hs.constructedArrays,allowedTypes:Object.assign({},fs.allowedTypes)}}var gs={top:{xTranslationDirection:0,yTranslationDirection:-1},bottom:{xTranslationDirection:0,yTranslationDirection:1},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}},ms={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}};var ys=function(e){var t=e.yDirection,n=e.xEnd,i=e.yStart,r=e.yEnd;return t?{x:n/2,y:i}:{x:n,y:isNaN(r)?i:(i+r)/2}},Cs=function(e){var t=e.yDirection,n=e.xStart,i=e.xEnd,r=e.yStart,o=e.yEnd;return t?{x:n,y:isNaN(o)?r:(r+o)/2}:{x:i/2,y:r}},ks=function(e){var t=e.yDirection,n=e.xEnd,i=e.yStart,r=e.yEnd;return t?{x:n,y:isNaN(r)?i:(i+r)/2}:{x:n/2,y:isNaN(r)?i:r}},ws=function(e){var t=e.yDirection,n=e.xStart,i=e.xEnd,r=e.yStart,o=e.yEnd;return t?{x:i/2,y:isNaN(o)?r:o}:{x:n,y:isNaN(o)?r:(r+o)/2}},Ss=function(e){var t=e.yDirection,n=e.xStart,i=e.xEnd,r=e.yStart;return t?{x:n/2,y:r}:{x:i,y:r}},bs=function(e){var t=e.yDirection,n=e.xStart,i=e.yStart,r=e.yEnd;return t?{x:n,y:isNaN(r)?i:r}:{x:n,y:i}},Es=function(e){var t=e.yDirection,n=e.xEnd,i=e.yStart,r=e.yEnd;return t?{x:n,y:i}:{x:n,y:isNaN(r)?i:r}},xs=function(e){var t=e.yDirection,n=e.xStart,i=e.xEnd,r=e.yStart,o=e.yEnd;return t?{x:i,y:isNaN(o)?r:o}:{x:n,y:isNaN(o)?r:o}},Rs={top:{c:ys},bottom:{c:ws},left:{c:Cs},right:{c:ks},topLeft:{c:Ss},topRight:{c:Es},bottomLeft:{c:bs},bottomRight:{c:xs},inside:{c:function(e){var t=e.xEnd,n=e.yStart,i=e.yEnd;return{x:t/2,y:isNaN(i)?n:(n+i)/2}}},insideLeft:{c:Cs},insideRight:{c:ks},insideTop:{c:ys},insideBottom:{c:ws},insideTopLeft:{c:Ss},insideBottomLeft:{c:bs},insideTopRight:{c:Es},insideBottomRight:{c:xs}},Ds=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Ts=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.call(this)).x1=0,e.y1=0,e.x2=0,e.y2=0,e.startLine=!1,e.endLine=!1,e.isRange=!1,e.restoreOwnStyles(),e}return(0,f.Z)(n,[{key:"computeBBox",value:function(){return new he(this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)}},{key:"isPointInPath",value:function(e,t){return!1}},{key:"render",value:function(e){var t,i=e.ctx,r=e.forceRender,o=e.stats;if(this.dirty!==fe.NONE||r){this.computeTransformMatrix(),this.matrix.toContext(i);var a=this.x1,s=this.y1,l=this.x2,u=this.y2;a=this.align(a),s=this.align(s),l=this.align(l),u=this.align(u);var c=this.fill,d=this.opacity;if(!(!this.isRange||!c)){var h=this.fillOpacity;i.fillStyle=c,i.globalAlpha=d*h,i.beginPath(),i.moveTo(a,s),i.lineTo(l,s),i.lineTo(l,u),i.lineTo(a,u),i.closePath(),i.fill()}var p=this.stroke,f=this.strokeWidth,v=this.startLine,g=this.endLine;if(!(!v&&!g||!p||!f)){var m=this.strokeOpacity,y=this.lineDash,C=this.lineDashOffset,k=this.lineCap,w=this.lineJoin;i.strokeStyle=p,i.globalAlpha=d*m,i.lineWidth=f,y&&i.setLineDash(y),C&&(i.lineDashOffset=C),k&&(i.lineCap=k),w&&(i.lineJoin=w),i.beginPath(),v&&(i.moveTo(a,s),i.lineTo(l,s)),g&&(i.moveTo(l,u),i.lineTo(a,u)),i.stroke()}null===(t=this.fillShadow)||void 0===t||t.markClean(),(0,oe.Z)((0,ae.Z)(n.prototype),"render",this).call(this,e)}else o&&(o.nodesSkipped+=this.nodeCount.count)}}]),n}(Ke);Ts.className="Range",Ts.defaultStyles=Object.assign(Object.assign({},Ke.defaultStyles),{strokeWidth:1}),Ds([Ce({redraw:fe.MINOR})],Ts.prototype,"x1",void 0),Ds([Ce({redraw:fe.MINOR})],Ts.prototype,"y1",void 0),Ds([Ce({redraw:fe.MINOR})],Ts.prototype,"x2",void 0),Ds([Ce({redraw:fe.MINOR})],Ts.prototype,"y2",void 0),Ds([Ce({redraw:fe.MINOR})],Ts.prototype,"startLine",void 0),Ds([Ce({redraw:fe.MINOR})],Ts.prototype,"endLine",void 0),Ds([Ce({redraw:fe.MINOR})],Ts.prototype,"isRange",void 0);var Os=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Ps=["top","left","right","bottom","topLeft","topRight","bottomLeft","bottomRight","inside","insideLeft","insideRight","insideTop","insideBottom","insideTopLeft","insideBottomLeft","insideTopRight","insideBottomRight"],As=gt((function(e,t){return mt(e,t,(function(e){return Ps.includes(e)}))}),"expecting an optional crossLine label position keyword such as 'topLeft', 'topRight' or 'inside'"),Ms=gt((function(e,t){return mt(e,t,(function(e){return"range"===e||"line"===e}))}),"expecting a crossLine type keyword such as 'range' or 'line'"),Ns=(0,f.Z)((function e(){(0,p.Z)(this,e),this.enabled=void 0,this.text=void 0,this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=14,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)",this.position=void 0,this.rotation=void 0,this.parallel=void 0}));Os([vt(Tt)],Ns.prototype,"enabled",void 0),Os([vt(Pt)],Ns.prototype,"text",void 0),Os([vt(nn)],Ns.prototype,"fontStyle",void 0),Os([vt(on)],Ns.prototype,"fontWeight",void 0),Os([vt(Bt(0))],Ns.prototype,"fontSize",void 0),Os([vt(Ot)],Ns.prototype,"fontFamily",void 0),Os([vt(Bt(0))],Ns.prototype,"padding",void 0),Os([vt(Zt)],Ns.prototype,"color",void 0),Os([vt(As)],Ns.prototype,"position",void 0),Os([vt(Wt(-360,360))],Ns.prototype,"rotation",void 0),Os([vt(Tt)],Ns.prototype,"parallel",void 0);var Ls=function(){function e(){(0,p.Z)(this,e),this.id=me(this),this.enabled=void 0,this.type=void 0,this.range=void 0,this.value=void 0,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=void 0,this.strokeOpacity=void 0,this.lineDash=void 0,this.label=new Ns,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction=Qt.X,this.group=new Ae({name:"".concat(this.id),layer:!0,zIndex:e.LINE_LAYER_ZINDEX}),this.crossLineRange=new Ts,this.crossLineLabel=new qe,this.labelPoint=void 0,this.data=[],this.startLine=!1,this.endLine=!1,this.isRange=!1;var t=this.group,n=this.crossLineRange,i=this.crossLineLabel;t.append([n,i]),n.pointerEvents=ke.None}return(0,f.Z)(e,[{key:"update",value:function(e){this.enabled&&(this.group.visible=e,e&&(this.createNodeData()?(this.updateNodes(),this.group.zIndex=this.getZIndex(this.isRange)):this.group.visible=!1))}},{key:"updateNodes",value:function(){this.updateRangeNode(),this.label.enabled&&(this.updateLabel(),this.positionLabel())}},{key:"createNodeData",value:function(){var e,t,n=this.scale,i=this.gridLength,r=this.sideFlag,o=this.direction,a=this.label.position,s=void 0===a?"top":a,l=this.clippedRange,u=this.strokeWidth,c=void 0===u?0:u;if(!n)return!1;var d=null!==(e=n.bandwidth)&&void 0!==e?e:0,h=function(e){return Math.max(Math.min.apply(Math,(0,te.Z)(l)),Math.min(Math.max.apply(Math,(0,te.Z)(l)),e))},p=r*i,f=this.getRange(),v=(0,re.Z)(f,2),g=v[0],m=v[1],y=[Number(n.convert(g,{strict:!1})),n.convert(m,{strict:!1})+d],C=y[0],k=y[1];C=h(C),k=h(k);var w=[Number(n.convert(g)),n.convert(m)+d];g=w[0],m=w[1];var S=!isNaN(C)&&!isNaN(k)&&(g===C||m===k||C!==k)&&Math.abs(k-C)>0;if(S&&C!==Math.min(C,k)){var b=[Math.min(C,k),Math.max(C,k)];C=b[0],k=b[1];var E=[m,g];g=E[0],m=E[1]}if(this.isRange=S,this.startLine=!isNaN(g)&&c>0&&g===C,this.endLine=!isNaN(m)&&c>0&&m===k,!S&&!this.startLine&&!this.endLine)return!1;if(this.data=[C,k],this.label.enabled){var x=o===Qt.Y,R=(null!==(t=Rs[s])&&void 0!==t?t:{}).c,D=(void 0===R?ys:R)({yDirection:x,xStart:0,xEnd:p,yStart:C,yEnd:k}),T=D.x,O=D.y;this.labelPoint={x:T,y:O}}return!0}},{key:"updateRangeNode",value:function(){var e,t=this.crossLineRange,n=this.sideFlag,i=this.gridLength,r=this.data,o=this.startLine,a=this.endLine,s=this.isRange,l=this.fill,u=this.fillOpacity,c=this.stroke,d=this.strokeWidth,h=this.lineDash;t.x1=0,t.x2=n*i,t.y1=r[0],t.y2=r[1],t.startLine=o,t.endLine=a,t.isRange=s,t.fill=l,t.fillOpacity=null!==u&&void 0!==u?u:1,t.stroke=c,t.strokeWidth=null!==d&&void 0!==d?d:1,t.strokeOpacity=null!==(e=this.strokeOpacity)&&void 0!==e?e:1,t.lineDash=h}},{key:"updateLabel",value:function(){var e=this.crossLineLabel,t=this.label;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)}},{key:"positionLabel",value:function(){var e=this.crossLineLabel,t=this.labelPoint,n=(t=void 0===t?{}:t).x,i=void 0===n?void 0:n,r=t.y,o=void 0===r?void 0:r,a=this.label,s=a.parallel,l=a.rotation,u=a.position,c=void 0===u?"top":u,d=a.padding,h=void 0===d?0:d,p=this.direction,f=this.parallelFlipRotation,v=this.regularFlipRotation;if(void 0!==i&&void 0!==o){var g=ma({rotation:l,parallel:s,regularFlipRotation:v,parallelFlipRotation:f}),m=g.defaultRotation,y=g.configuredRotation;e.rotation=m+y,e.textBaseline="middle",e.textAlign="center";var C=this.computeLabelBBox();if(C){var k=function(e){var t=e.yDirection,n=e.padding,i=void 0===n?0:n,r=e.position,o=void 0===r?"top":r,a=e.bbox,s=(t?gs:ms)[o],l=s.xTranslationDirection,u=s.yTranslationDirection;return{xTranslation:l*(i+(t?a.width:a.height)/2),yTranslation:u*(i+(t?a.height:a.width)/2)}}({yDirection:p===Qt.Y,padding:h,position:c,bbox:C}),w=k.xTranslation,S=k.yTranslation;e.translationX=i+w,e.translationY=o+S}}}},{key:"getZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t?e.RANGE_LAYER_ZINDEX:e.LINE_LAYER_ZINDEX}},{key:"getRange",value:function(){var e=this.value,t=this.range,n=this.scale instanceof To,i=null!==t&&void 0!==t?t:[e,void 0],r=(0,re.Z)(i,2),o=r[0],a=r[1];return n||void 0!==a||(a=o),o=null!=ut(o,n)?o:void 0,a=null!=ut(a,n)?a:void 0,n&&o===a&&(a=void 0),void 0===o&&void 0!==a&&(o=a,a=void 0),[o,a]}},{key:"computeLabelBBox",value:function(){return this.crossLineLabel.computeTransformedBBox()}},{key:"calculatePadding",value:function(e){var t,n,i,r,o,a,s,l,u=this.isRange,c=this.startLine,d=this.endLine,h=this.direction,p=this.label,f=p.padding,v=void 0===f?0:f,g=p.position,m=void 0===g?"top":g;if(u||c||d){var y=this.computeLabelBBox(),C=null===y||void 0===y?void 0:y.x,k=null===y||void 0===y?void 0:y.y;if(y&&void 0!=C&&void 0!=k){var w=function(e){var t=e.yDirection,n=e.bbox,i=e.padding,r=void 0===i?0:i,o=e.position,a=void 0===o?"top":o,s={};return a.startsWith("inside")||("top"!==a||t?"bottom"!==a||t?"left"===a&&t?s.left=r+n.width:"right"===a&&t&&(s.right=r+n.width):s.bottom=r+n.height:s.top=r+n.height),s}({yDirection:h===Qt.Y,padding:v,position:m,bbox:y});e.left=Math.max(null!==(t=e.left)&&void 0!==t?t:0,null!==(n=w.left)&&void 0!==n?n:0),e.right=Math.max(null!==(i=e.right)&&void 0!==i?i:0,null!==(r=w.right)&&void 0!==r?r:0),e.top=Math.max(null!==(o=e.top)&&void 0!==o?o:0,null!==(a=w.top)&&void 0!==a?a:0),e.bottom=Math.max(null!==(s=e.bottom)&&void 0!==s?s:0,null!==(l=w.bottom)&&void 0!==l?l:0)}}}}]),e}();Ls.LINE_LAYER_ZINDEX=qt.SERIES_CROSSLINE_LINE_ZINDEX,Ls.RANGE_LAYER_ZINDEX=qt.SERIES_CROSSLINE_RANGE_ZINDEX,Ls.className="CrossLine",Os([vt(Tt)],Ls.prototype,"enabled",void 0),Os([vt(Ms)],Ls.prototype,"type",void 0),Os([vt(Ct(2))],Ls.prototype,"range",void 0),Os([vt(Zt)],Ls.prototype,"fill",void 0),Os([vt(Wt(0,1))],Ls.prototype,"fillOpacity",void 0),Os([vt(Zt)],Ls.prototype,"stroke",void 0),Os([vt(Wt())],Ls.prototype,"strokeWidth",void 0),Os([vt(Wt(0,1))],Ls.prototype,"strokeOpacity",void 0),Os([vt(sn)],Ls.prototype,"lineDash",void 0);var Is=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Fs=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).thickness=0,e.position="left",e}return(0,f.Z)(n,[{key:"direction",get:function(){return["top","bottom"].includes(this.position)?Qt.X:Qt.Y}},{key:"updateDirection",value:function(){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)}},{key:"update",value:function(e){return this.updateDirection(),(0,oe.Z)((0,ae.Z)(n.prototype),"update",this).call(this,e)}},{key:"createAxisContext",value:function(){return Object.assign(Object.assign({},(0,oe.Z)((0,ae.Z)(n.prototype),"createAxisContext",this).call(this)),{position:this.position})}},{key:"assignCrossLineArrayConstructor",value:function(e){ps(e,Ls)}}]),n}(Ga);Is([vt(Bt(0))],Fs.prototype,"thickness",void 0),Is([vt(vn)],Fs.prototype,"position",void 0);var _s=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Gs=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i;return(0,p.Z)(this,n),(i=t.call(this,e,new So))._paddingOverrideEnabled=!1,i.groupPaddingInner=.1,i.includeInvisibleDomains=!0,i}return(0,f.Z)(n,[{key:"paddingInner",get:function(){return this._paddingOverrideEnabled=!0,this.scale.paddingInner},set:function(e){this._paddingOverrideEnabled=!0,this.scale.paddingInner=e}},{key:"paddingOuter",get:function(){return this.scale.paddingOuter},set:function(e){this.scale.paddingOuter=e}},{key:"normaliseDataDomain",value:function(e){var t,n,i,r={},o=(0,ne.Z)(e);try{for(o.s();!(i=o.n()).done;){var a=i.value;null!==(t=r[n=String(a)])&&void 0!==t||(r[n]=a)}}catch(s){o.e(s)}finally{o.f()}return Object.values(r)}},{key:"calculateDomain",value:function(){if(!this._paddingOverrideEnabled){var e=this.boundSeries.map((function(e){var t;return null===(t=e.getBandScalePadding)||void 0===t?void 0:t.call(e)})).filter((function(e){return null!=e}));e.length>0&&(this.scale.paddingInner=Math.min.apply(Math,(0,te.Z)(e.map((function(e){return e.inner})))),this.scale.paddingOuter=Math.max.apply(Math,(0,te.Z)(e.map((function(e){return e.outer})))))}return(0,oe.Z)((0,ae.Z)(n.prototype),"calculateDomain",this).call(this)}}]),n}(Fs);Gs.className="CategoryAxis",Gs.type="category",_s([vt(Bt(0,1))],Gs.prototype,"groupPaddingInner",void 0);var Zs=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;(0,p.Z)(this,e),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=t,this.parent=n,this.depth=n?n.depth+1:0,this.number=i}return(0,f.Z)(e,[{key:"getLeftSibling",value:function(){return this.number>0&&this.parent?this.parent.children[this.number-1]:void 0}},{key:"getLeftmostSibling",value:function(){return this.number>0&&this.parent?this.parent.children[0]:void 0}},{key:"nextLeft",value:function(){return this.children?this.children[0]:this.thread}},{key:"nextRight",value:function(){return this.children?this.children[this.children.length-1]:this.thread}},{key:"getSiblings",value:function(){var e=this;return this.parent?this.parent.children.filter((function(t,n){return n!==e.number})):[]}}]),e}();function Vs(e,t){var n=t.labels.slice().reverse(),i=n.length-1;n.forEach((function(t,n){var r=e.children,o=r.find((function(e){return e.label===t})),a=n!==i;if(o&&a)e=o;else{var s=new Zs(t,e);s.number=r.length,r.push(s),a&&(e=s)}}))}function Hs(e,t,n){var i=n/(t.number-e.number);t.change-=i,t.shift+=n,e.change+=i,t.prelim+=n,t.mod+=n}function Bs(e,t,n){return t.getSiblings().indexOf(e.ancestor)>=0?e.ancestor:n}function Ws(e,t){var n=e.children;if(n.length){var i=n[0];n.forEach((function(e){Ws(e,t),i=function(e,t,n){var i=e.getLeftSibling();if(i){for(var r=e,o=e,a=i,s=o.getLeftmostSibling(),l=o.mod,u=r.mod,c=a.mod,d=s.mod;a.nextRight()&&o.nextLeft();){a=a.nextRight(),o=o.nextLeft(),s=s.nextLeft(),(r=r.nextRight()).ancestor=e;var h=a.prelim+c-(o.prelim+l)+n;h>0&&(Hs(Bs(a,e,t),e,h),l+=h,u+=h),c+=a.mod,l+=o.mod,d+=s.mod,u+=r.mod}a.nextRight()&&!r.nextRight()?(r.thread=a.nextRight(),r.mod+=c-u):(o.nextLeft()&&!s.nextLeft()&&(s.thread=o.nextLeft(),s.mod+=l-d),t=e)}return t}(e,i,t)})),function(e){var t=e.children;if(t)for(var n=0,i=0,r=t.length-1;r>=0;r--){var o=t[r];o.prelim+=n,o.mod+=n,i+=o.change,n+=o.shift+i}}(e);var r=(n[0].prelim+n[n.length-1].prelim)/2,o=e.getLeftSibling();o?(e.prelim=o.prelim+t,e.mod=e.prelim-r):e.prelim=r}else{var a=e.getLeftSibling();e.prelim=a?a.prelim+t:0}}var zs=function(){function e(){(0,p.Z)(this,e),this.top=1/0,this.right=-1/0,this.bottom=-1/0,this.left=1/0}return(0,f.Z)(e,[{key:"update",value:function(e,t){var n=t(e),i=n.x,r=n.y;i>this.right&&(this.right=i),i<this.left&&(this.left=i),r>this.bottom&&(this.bottom=r),r<this.top&&(this.top=r)}}]),e}();function Us(e,t,n){e.x=e.prelim+t,e.y=e.depth,n.update(e),e.children.forEach((function(i){return Us(i,t+e.mod,n)}))}function js(e){var t=e.children,n=0;t.forEach((function(e){js(e),e.children.length?n+=e.leafCount:n++})),e.leafCount=n,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 Ks(e){var t=new Ys;return Ws(e,1),Us(e,-e.prelim,t),js(e),t}var Ys=function(){function e(){(0,p.Z)(this,e),this.dimensions=new zs,this.leafCount=0,this.nodes=[],this.leafNodes=[],this.nonLeafNodes=[],this.depth=0}return(0,f.Z)(e,[{key:"update",value:function(e){this.dimensions.update(e,(function(e){return{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)}},{key:"resize",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=this.leafCount-1,a=this.depth,s=this.dimensions,l=1,u=1;if(e>0&&o){var c=(s.right-s.left)/o,d=e/o;l=d/c,r&&(l=-l)}if(t>0&&a){var h=(s.bottom-s.top)/a,p=t/a;u=p/h}var f=new zs;this.nodes.forEach((function(e){e.screenX=e.x*l,e.screenY=e.y*u,f.update(e,(function(e){return{x:e.screenX,y:e.screenY}}))}));var v=-f.left,g=-f.top;this.nodes.forEach((function(e){e.screenX+=v+n,e.screenY+=g+i}))}}]),e}(),Xs=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},qs=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).grid=!1,e}return(0,f.Z)(n)}(Sa);Xs([vt(Dt)],qs.prototype,"grid",void 0);var Qs=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i;(0,p.Z)(this,n),(i=t.call(this,e,new So)).tickScale=new So,i.translation={x:0,y:0},i.line=new Ea,i.label=new qs,i.labelColor="rgba(87, 87, 87, 1)",i.includeInvisibleDomains=!0;var r=(0,le.Z)(i),o=r.tickLineGroup,a=r.tickLabelGroup,s=r.gridLineGroup,l=r.tickScale,u=r.scale;return u.paddingOuter=.1,u.paddingInner=2*u.paddingOuter,i.range=u.range.slice(),i.refreshScale(),l.paddingInner=1,l.paddingOuter=0,i.gridLineSelection=Rr.select(s,Eo),i.axisLineSelection=Rr.select(o,Eo),i.separatorSelection=Rr.select(o,Eo),i.labelSelection=Rr.select(a,qe),i}return(0,f.Z)(n,[{key:"updateRange",value:function(){var e=this.range,t=this.visibleRange,n=this.scale,i=(e[1]-e[0])/(t[1]-t[0]),r=i*t[0],o=e[0]-r;this.tickScale.range=n.range=[o,o+i],this.resizeTickTree()}},{key:"resizeTickTree",value:function(){var e,t=this.scale,n=t.domain.length?[t.convert(t.domain[0]),t.convert(t.domain[t.domain.length-1])]:t.range,i=this.tickTreeLayout,r=this.lineHeight;i&&i.resize(Math.abs(n[1]-n[0]),i.depth*r,(Math.min(n[0],n[1])||0)+(null!==(e=t.bandwidth)&&void 0!==e?e:0)/2,-i.depth*r,n[1]-n[0]<0)}},{key:"lineHeight",get:function(){return 1.5*this.label.fontSize}},{key:"gridLength",get:function(){return this._gridLength},set:function(e){(this._gridLength&&!e||!this._gridLength&&e)&&(this.gridLineSelection.clear(),this.labelSelection.clear()),this._gridLength=e}},{key:"calculateDomain",value:function(){var e,t,n=this.direction,i=this.boundSeries,r=[],o=void 0;i.filter((function(e){return e.visible})).forEach((function(e){if(n===Qt.X)if(void 0===o){var t=e.getDomain(n);r.push(t),o="number"===typeof t[0]}else o&&r.push(e.getDomain(n));else r.push(e.getDomain(n))}));var a=(e=new Array).concat.apply(e,r),s=null!==(t=pa(a))&&void 0!==t?t:a;this.dataDomain=this.normaliseDataDomain(s),this.scale.domain=this.dataDomain}},{key:"normaliseDataDomain",value:function(e){var t=e.filter((function(e,t,n){return n.indexOf(e)===t})),n=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=new Zs,i=0;return t&&e.forEach((function(e){return i=Math.max(i,e.labels.length)})),e.forEach((function(e){if(t)for(;e.labels.length<i;)e.labels.unshift("");Vs(n,e)})),n}(t);this.tickTreeLayout=Ks(n);var i=t.slice();return i.push(""),this.tickScale.domain=i,this.resizeTickTree(),t}},{key:"update",value:function(e){var t=this;this.updateDirection(),this.calculateDomain(),this.updateRange();var n=this.scale,i=this.label,r=this.label.parallel,o=this.moduleCtx.callbackCache,a=this.tickScale,s=this.range,l=this.title,u=this.title,c=(u=void 0===u?{}:u).formatter,d=void 0===c?function(e){return e.defaultValue}:c,h=this._titleCaption,p=n.range[0],f=n.range[1],v=Math.abs(f-p)/n.domain.length||0,g=Be(this.rotation),m=Math.abs(Math.cos(g))<1e-8,y=i.getSideFlag();this.updatePosition({rotation:g,sideFlag:y}),h.node.visible=!1;var C=this.lineHeight,k=this.tickTreeLayout,w=n.ticks(),S=k?k.nodes:[],b=!!k&&k.depth>1,E=a.ticks(),x=ma({rotation:i.rotation,parallel:r,regularFlipRotation:Ze(g-Math.PI/2),parallelFlipRotation:Ze(g)}),R=x.defaultRotation,D=x.configuredRotation,T=x.parallelFlipFlag,O=this.gridLineSelection.update(this.gridLength?E:[]),P=this.labelSelection.update(S),A=i.formatter,M=new Map,N=0;P.each((function(e,n,r){var a;e.fontStyle=i.fontStyle,e.fontWeight=i.fontWeight,e.fontSize=i.fontSize,e.fontFamily=i.fontFamily,e.fill=i.color,e.textBaseline=-1===T?"bottom":"hanging",e.textAlign="center",e.translationX=n.screenY-.25*i.fontSize,e.translationY=n.screenX,0===r?(null===l||void 0===l?void 0:l.enabled)&&w.length>0?(e.visible=!0,e.text=o.call(d,t.getTitleFormatterParams()),e.fontSize=l.fontSize,e.fontStyle=l.fontStyle,e.fontWeight=l.fontWeight,e.fontFamily=l.fontFamily,e.textBaseline="hanging"):e.visible=!1:A?(e.text=null!==(a=o.call(A,{value:String(n.label),index:r}))&&void 0!==a?a:String(n.label),e.visible=n.screenX>=s[0]&&n.screenX<=s[1]):(e.text=String(n.label),e.visible=n.screenX>=s[0]&&n.screenX<=s[1]);var u=e.computeBBox();M.set(e.id,u),u.width>N&&(N=u.width)}));var L=y*i.padding,I=this.label.grid,F=[];P.each((function(e,n,i){if(e.x=L,e.rotationCenterX=L,n.children.length){e.translationX-=N-C+t.label.padding;var r=n.leafCount*v,o=M.get(e.id);o&&o.width>r?e.visible=!1:e.rotation=m?R:-Math.PI/2}else{e.rotation=D,e.textAlign="end",e.textBaseline="middle";var a=M.get(e.id);a&&a.height>v&&(e.visible=!1)}if(n.parent&&b){var s=n.children.length?n.screenX-n.leafCount*v/2:n.screenX-v/2;if(n.children.length){var l=-N-2*t.label.padding+n.screenY;F.push({y:s,x1:l+C,x2:l,toString:function(){return String(i)}})}else(n.number!==n.children.length-1||I)&&F.push({y:s,x1:0,x2:-N-2*t.label.padding,toString:function(){return String(i)}})}}));var _=0;F.forEach((function(e){return _=Math.min(_,e.x2)})),F.push({y:Math.max(p,f),x1:0,x2:_,toString:function(){return String(F.length)}});var G=this.separatorSelection.update(F);G.each((function(e,n){e.x1=n.x1,e.x2=n.x2,e.y1=n.y,e.y2=n.y,e.visible=n.y>=s[0]-1e-7&&n.y<=s[1]+1e-7,e.stroke=t.tick.color,e.fill=void 0,e.strokeWidth=1})),this.gridLineSelection=O,this.labelSelection=P;for(var Z=k?k.depth+1:1,V=[],H=0;H<Z;H++)V.push(H);if(this.axisLineSelection.update(V).each((function(e,n,i){var r=i>0?-N-2*t.label.padding-(i-1)*C:0;e.x1=r,e.x2=r,e.y1=s[0],e.y2=s[1],e.strokeWidth=t.line.width,e.stroke=t.line.color,e.visible=w.length>0&&(0===i||I&&b)})),this.gridLength){var B=this.gridStyle,W=B.length;O.each((function(e,n,i){var r=Math.round(a.convert(n));e.x1=0,e.x2=-y*t.gridLength,e.y1=r,e.y2=r,e.visible=r>=s[0]&&r<=s[1];var o=B[i%W];e.stroke=o.stroke,e.strokeWidth=t.tick.width,e.lineDash=o.lineDash,e.fill=void 0}))}return e}}]),n}(Fs);Qs.className="GroupedCategoryAxis",Qs.type="groupedCategory",Xs([vt(Zt)],Qs.prototype,"labelColor",void 0);var Js=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))},$s=["top","right","bottom","left"],el=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.document,r=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;return(0,p.Z)(this,n),(e=t.call(this,i,r,o)).paired=!0,e._lastAxisWidths={top:0,bottom:0,left:0,right:0},e._lastVisibility={crossLines:!0,series:!0},e}return(0,f.Z)(n,[{key:"performLayout",value:function(){var e=this,t=Object.create(null,{performLayout:{get:function(){return(0,oe.Z)((0,ae.Z)(n.prototype),"performLayout",e)}}});return Js(this,void 0,void 0,(0,ie.Z)().mark((function e(){var n,i,r,o,a,s,l,u,c;return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.performLayout.call(this);case 2:return n=e.sent,i=this.updateAxes(n),r=i.seriesRect,o=i.visibility,a=i.clipSeries,this.seriesRoot.visible=o.series,this.seriesRect=r,this.seriesRoot.translationX=Math.floor(r.x),this.seriesRoot.translationY=Math.floor(r.y),s=this.seriesRoot,l=this.seriesAreaPadding,u=r.clone().grow({top:l.top,right:l.right,bottom:l.bottom,left:l.left}),20,c=u.clone().grow(20),this.hoverRect=c,this.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.scene.width,height:this.scene.height},series:{rect:r,paddedRect:u,hoverRect:c,visible:o.series},axes:this.axes.map((function(e){return Object.assign({id:e.id},e.getLayoutState())}))}),a?s.setClipRectInGroupCoordinateSpace(r):s.setClipRectInGroupCoordinateSpace(),e.abrupt("return",n);case 16:case"end":return e.stop()}}),e,this)})))}},{key:"updateAxes",value:function(e){for(var t,n=Object.assign({},this._lastAxisWidths),i=Object.assign({},this._lastVisibility),r=new Set(this._axes.map((function(e){return e.position}))),o=0,a=Object.keys(n);o<a.length;o++){var s=a[o];r.has(s)||delete n[s]}var l,u=function(e,t){return!Object.keys(e).some((function(e){return null==n[e]}))&&(i.crossLines===t.crossLines&&i.series===t.series&&Object.entries(n).every((function(t){var n=(0,re.Z)(t,2),i=n[0],r=n[1],o=e[i];return null==r&&null==o||r===o})))},c={},d={},h=!1,p=null===(t=this.seriesRect)||void 0===t?void 0:t.clone(),f=0;do{Object.assign(n,c),Object.assign(i,d);var v=this.updateAxesPass(n,e.clone(),p);if(l=v.axisWidths,c=Object.entries(l).reduce((function(e,t){var n=(0,re.Z)(t,2),i=n[0],r=n[1];return r&&Math.abs(r)===1/0&&(r=0),e[i]=null!=r?Math.ceil(r):r,e}),{}),d=v.visibility,h=v.clipSeries,p=v.seriesRect,f++>10){Oe.warn("unable to find stable axis layout.");break}}while(!u(c,d));return this.axes.forEach((function(t){if(t.setCrossLinesVisible(i.crossLines),p)switch(t.clipGrid(p.x,p.y,p.width+5,p.height+5),t.position){case"left":case"right":t.clipTickLines(e.x,p.y,e.width+5,p.height+5);break;case"top":case"bottom":t.clipTickLines(p.x,e.y,p.width+5,e.height+5)}})),this._lastAxisWidths=n,this._lastVisibility=i,{seriesRect:p,visibility:i,clipSeries:h}}},{key:"updateAxesPass",value:function(e,t,n){var i=this,r=this.axes,o={},a={},s={series:!0,crossLines:!0},l=!1,u={},c=this.applySeriesPadding(t),d=n?this.buildCrossLinePadding(e):{},h=this.buildAxisBound(c,e,d,s),p=this.buildSeriesRect(h,e);return r.forEach((function(t){var n,r,s=t.position,d=void 0===s?"left":s,f=i.calculateAxisDimensions({axis:t,seriesRect:p,paddedBounds:c,axisWidths:e,newAxisWidths:a,primaryTickCounts:u,clipSeries:l,addInterAxisPadding:(null!==(n=o[d])&&void 0!==n?n:0)>0}),v=f.clipSeries,g=f.axisThickness,m=f.axisOffset;o[d]=(null!==(r=o[d])&&void 0!==r?r:0)+1,l=l||v,i.positionAxis({axis:t,axisBound:h,axisOffset:m,axisThickness:g,axisWidths:e,primaryTickCounts:u,seriesRect:p})})),{clipSeries:l,seriesRect:p,axisWidths:a,visibility:s}}},{key:"buildCrossLinePadding",value:function(e){var t,n={};this.axes.forEach((function(e){e.crossLines&&e.crossLines.forEach((function(e){e.calculatePadding(n)}))}));for(var i=0,r=Object.entries(n);i<r.length;i++){var o=(0,re.Z)(r[i],2),a=o[0],s=o[1],l=void 0===s?0:s;n[a]=Math.max(l-(null!==(t=e[a])&&void 0!==t?t:0),0)}return n}},{key:"applySeriesPadding",value:function(e){var t=this,n=e.clone(),i=this.axes.slice().reverse();return $s.forEach((function(e){var r=t.seriesAreaPadding[e],o=i.find((function(t){return t.position===e}));o?o.seriesAreaPadding=r:n.shrink(r,e)})),n}},{key:"buildAxisBound",value:function(e,t,n,i){var r,o,a,s,l=e.clone(),u=n.top,c=void 0===u?0:u,d=n.right,h=void 0===d?0:d,p=n.bottom,f=void 0===p?0:p,v=n.left,g=void 0===v?0:v,m=g+h,y=c+f,C=(null!==(r=t.left)&&void 0!==r?r:0)+(null!==(o=t.right)&&void 0!==o?o:0)+m,k=(null!==(a=t.top)&&void 0!==a?a:0)+(null!==(s=t.bottom)&&void 0!==s?s:0)+y;return l.width<=C||l.height<=k?(i.crossLines=!1,i.series=!1,l):(l.x+=g,l.y+=c,l.width-=m,l.height-=y,l)}},{key:"buildSeriesRect",value:function(e,t){var n=e.clone(),i=t.top,r=t.bottom,o=t.left,a=t.right;return n.x+=null!==o&&void 0!==o?o:0,n.y+=null!==i&&void 0!==i?i:0,n.width-=(null!==o&&void 0!==o?o:0)+(null!==a&&void 0!==a?a:0),n.height-=(null!==i&&void 0!==i?i:0)+(null!==r&&void 0!==r?r:0),n.width=Math.max(0,n.width),n.height=Math.max(0,n.height),n}},{key:"clampToOutsideSeriesRect",value:function(e,t,n,i){var r=e.x,o=e.y,a=[r,o,r+e.width,o+e.height];return(1===i?Math.min:Math.max)(t,a[("x"===n?0:1)+(1===i?0:2)])}},{key:"calculateAxisDimensions",value:function(e){var t,n,i,r,o,a=e.axis,s=e.seriesRect,l=e.paddedBounds,u=e.axisWidths,c=e.newAxisWidths,d=e.primaryTickCounts,h=e.addInterAxisPadding,p=e.clipSeries,f=a.position,v=void 0===f?"left":f,g=a.direction,m=null!==(t=c[v])&&void 0!==t?t:0;switch(v){case"top":case"bottom":a.range=[0,s.width],a.gridLength=s.height;break;case"right":case"left":a.range=function(e){return e instanceof Gs||e instanceof Qs?[0,s.height]:[s.height,0]}(a),a.gridLength=s.width}var y=this.zoomManager.getAxisZoom(a.id),C=null!==y&&void 0!==y?y:{},k=C.min,w=void 0===k?0:k,S=C.max,b=void 0===S?1:S;a.visibleRange=[w,b],!p&&(a.visibleRange[0]>0||a.visibleRange[1]<1)&&(p=!0);var E=a.nice?d[g]:void 0;null!=a.thickness&&a.thickness>0?a.maxThickness=a.thickness:g===Qt.Y?a.maxThickness=.3*l.width:a.maxThickness=.3*l.height,E=a.update(E),d[g]=null!==(n=d[g])&&void 0!==n?n:E;var x=0;if(null!=a.thickness&&a.thickness>0)x=a.thickness;else{var R=a.computeBBox();x=g===Qt.X?R.height:R.width}return h&&(x+=15),x=Math.ceil(x),c[v]=(null!==(i=c[v])&&void 0!==i?i:0)+x,a.gridPadding=(null!==(r=u[v])&&void 0!==r?r:0)-(null!==(o=c[v])&&void 0!==o?o:0),{clipSeries:p,axisThickness:x,axisOffset:m}}},{key:"positionAxis",value:function(e){var t,n,i,r,o=e.axis,a=e.axisBound,s=e.axisWidths,l=e.seriesRect,u=e.axisOffset,c=e.axisThickness;switch(o.position){case"top":o.translation.x=a.x+(null!==(t=s.left)&&void 0!==t?t:0),o.translation.y=this.clampToOutsideSeriesRect(l,a.y+1+u+c,"y",1);break;case"bottom":o.translation.x=a.x+(null!==(n=s.left)&&void 0!==n?n:0),o.translation.y=this.clampToOutsideSeriesRect(l,a.y+a.height+1-c-u,"y",-1);break;case"left":o.translation.y=a.y+(null!==(i=s.top)&&void 0!==i?i:0),o.translation.x=this.clampToOutsideSeriesRect(l,a.x+u+c,"x",1);break;case"right":o.translation.y=a.y+(null!==(r=s.top)&&void 0!==r?r:0),o.translation.x=this.clampToOutsideSeriesRect(l,a.x+a.width-c-u,"x",-1)}o.updatePosition({rotation:Be(o.rotation),sideFlag:o.label.getSideFlag()})}}]),n}(ko);el.className="CartesianChart",el.type="cartesian";var tl=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).shape="polygon",e}return(0,f.Z)(n,[{key:"computeLabelsBBox",value:function(e,t){return null}}]),n}(Ga),nl=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))},il=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.document,r=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;return(0,p.Z)(this,n),(e=t.call(this,i,r,o)).padding=new Ri(40),e}return(0,f.Z)(n,[{key:"performLayout",value:function(){var e=this,t=Object.create(null,{performLayout:{get:function(){return(0,oe.Z)((0,ae.Z)(n.prototype),"performLayout",e)}}});return nl(this,void 0,void 0,(0,ie.Z)().mark((function e(){var n,i,r;return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.performLayout.call(this);case 2:return n=e.sent,i=n.clone(),this.computeSeriesRect(n),this.computeCircle(n),this.axes.forEach((function(e){return e.update()})),20,r=n.clone().grow(20),this.hoverRect=r,this.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.scene.width,height:this.scene.height},series:{rect:i,paddedRect:n,hoverRect:r,visible:!0},axes:[]}),e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,this)})))}},{key:"updateAxes",value:function(e,t,n){var i;this.axes.forEach((function(i){var r;if(i.direction===Qt.X){var o=Be(null!==(r=i.rotation)&&void 0!==r?r:0);i.range=[-Math.PI/2+o,3*Math.PI/2+o],i.gridLength=n,i.translation.x=e,i.translation.y=t}else i.direction===Qt.Y&&(i.range=[n,0],i.translation.x=e,i.translation.y=t-n);i.updateScale()}));var r=this.axes.find((function(e){return e.direction===Qt.X})),o=null===r||void 0===r?void 0:r.scale,a=null===(i=null===o||void 0===o?void 0:o.ticks)||void 0===i?void 0:i.call(o).map((function(e){return o.convert(e)}));this.axes.filter((function(e){return e instanceof tl})).forEach((function(e){return e.gridAngles=a}))}},{key:"computeSeriesRect",value:function(e){var t=this.seriesAreaPadding;e.shrink(t.left,"left"),e.shrink(t.top,"top"),e.shrink(t.right,"right"),e.shrink(t.bottom,"bottom"),this.seriesRect=e}},{key:"computeCircle",value:function(e){var t=this,n=this.series.filter((function(e){return e instanceof Qa})),i=this.axes.filter((function(e){return e instanceof tl})),r=function(e,i,r){t.updateAxes(e,i,r),n.forEach((function(t){t.centerX=e,t.centerY=i,t.radius=r}));var o=n.filter((function(e){return e instanceof ds}));if(o.length>1){var a=o.map((function(e){var t=e.getInnerRadius();return{series:e,innerRadius:t}})).sort((function(e,t){return e.innerRadius-t.innerRadius}));a[a.length-1].series.surroundingRadius=void 0;for(var s=0;s<a.length-1;s++)a[s].series.surroundingRadius=a[s+1].innerRadius}},o=e.x+e.width/2,a=e.y+e.height/2,s=Math.max(0,Math.min(e.width,e.height)/2),l=s;r(o,a,l);var u=function(){for(var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=u.hideWhenNecessary,d=void 0!==c&&c,h=[],p=0,f=[].concat((0,te.Z)(i),(0,te.Z)(n));p<f.length;p++){var v=f[p],g=v.computeLabelsBBox({hideWhenNecessary:d},e);g&&h.push(g)}if(0!==h.length){var m=he.merge(h),y=t.refineCircle(m,l,e);r(y.centerX,y.centerY,y.radius),y.radius!==l&&(l=y.radius)}else r(o,a,s)};return u(),u(),u(),u({hideWhenNecessary:!0}),u({hideWhenNecessary:!0}),{radius:l,centerX:o,centerY:a}}},{key:"refineCircle",value:function(e,t,n){var i=-t,r=-t,o=t,a=t,s=Math.max(0,i-e.x),l=Math.max(0,r-e.y),u=Math.max(0,e.x+e.width-o),c=Math.max(0,e.y+e.height-a),d=n.width-s-u,h=n.height-l-c,p=Math.min(d,h)/2,f=.5*n.width/2,v=.5*n.height/2,g=Math.min(f,v);if(p<g){var m=s+u;if(2*(p=g)+(l+c)>n.height){var y=n.height-2*p;2*Math.min(l,c)>y?(l=y/2,c=y/2):l>c?l=y-c:c=y-l}if(2*p+m>n.width){var C=n.width-2*p;2*Math.min(s,u)>C?(s=C/2,u=C/2):s>u?s=C-u:u=C-s}}var k=s+2*p+u,w=l+2*p+c;return{centerX:n.x+(n.width-k)/2+s+p,centerY:n.y+(n.height-w)/2+l+p,radius:p}}}]),n}(ko);il.className="PolarChart",il.type="polar";var rl=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))},ol=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.document,r=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;return(0,p.Z)(this,n),(e=t.call(this,i,r,o))._data={},e}return(0,f.Z)(n,[{key:"performLayout",value:function(){var e=this,t=Object.create(null,{performLayout:{get:function(){return(0,oe.Z)((0,ae.Z)(n.prototype),"performLayout",e)}}});return rl(this,void 0,void 0,(0,ie.Z)().mark((function e(){var n,i,r,o,a=this;return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.performLayout.call(this);case 2:return n=e.sent,i=this.seriesAreaPadding,r=n.clone(),n.shrink(i.left,"left"),n.shrink(i.top,"top"),n.shrink(i.right,"right"),n.shrink(i.bottom,"bottom"),this.seriesRect=n,20,o=n.clone().grow(20),this.hoverRect=o,this.seriesRoot.translationX=Math.floor(n.x),this.seriesRoot.translationY=Math.floor(n.y),e.next=17,Promise.all(this.series.map((function(e){return rl(a,void 0,void 0,(0,ie.Z)().mark((function t(){return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.update({seriesRect:n});case 2:case"end":return t.stop()}}),t)})))})));case 17:return this.seriesRoot.setClipRectInGroupCoordinateSpace(new he(n.x,n.y,n.width,n.height)),this.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.scene.width,height:this.scene.height},series:{rect:r,paddedRect:n,hoverRect:o,visible:!0},axes:[]}),e.abrupt("return",n);case 21:case"end":return e.stop()}}),e,this)})))}}]),n}(ko);function al(e,t){var n=Math.floor(e[0]),i=e[1];n=function(e,t,n){var i=Math.abs(t-e)/(n-1),r=Math.floor(Math.log10(i)),o=Math.pow(10,r);return Math.floor(e/o)*o}(n,i,t);var r=function(e,t,n){return function(e){var t=Math.floor(Math.log10(e)),n=Math.pow(10,t),i=e/n*10;if(i>0&&i<=1)return n/10;if(i>1&&i<=2)return 2*n/10;if(i>1&&i<=5)return 5*n/10;if(i>5&&i<=10)return 10*n/10;if(i>10&&i<=20)return 20*n/10;if(i>20&&i<=40)return 40*n/10;if(i>40&&i<=50)return 50*n/10;if(i>50&&i<=100)return 100*n/10;return i}((t-e)/(n-1))}(n,i,t),o=[n,i=n+(t-1)*r],a=function(e,t,n){for(var i=Math.floor(Math.log10(t)),r=t>0&&t<1?Math.abs(i):0,o=Math.pow(10,r),a=new No(r),s=0;s<n;s++){var l=e+t*s;a[s]=Math.round(l*o)/o}return a}(n,r,t);return[o,a]}ol.className="HierarchyChart",ol.type="hierarchy";var sl=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},ll=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).maxSpacing=NaN,e}return(0,f.Z)(n)}(Oa);sl([vt(kt(zt(1),Et("minSpacing"))),ka(NaN)],ll.prototype,"maxSpacing",void 0);var ul=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Wa;return(0,p.Z)(this,n),(i=t.call(this,e,r)).min=NaN,i.max=NaN,r.strictClampByDefault=!0,i}return(0,f.Z)(n,[{key:"normaliseDataDomain",value:function(e){return fa(e,this.min,this.max)}},{key:"formatDatum",value:function(e){return"number"===typeof e?e.toFixed(2):(Oe.warnOnce("data contains Date objects which are being plotted against a number axis, please only use a number axis for numbers."),String(e))}},{key:"createTick",value:function(){return new ll}},{key:"updateSecondaryAxisTicks",value:function(e){if(null==this.dataDomain)throw new Error("AG Charts - dataDomain not calculated, cannot perform tick calculation.");var t=al(this.dataDomain,null!==e&&void 0!==e?e:0),n=(0,re.Z)(t,2),i=n[0],r=n[1];return this.scale.nice=!1,this.scale.domain=i,this.scale.update(),r}}]),n}(Fs);ul.className="NumberAxis",ul.type="number",sl([vt(kt(zt(),bt("max"))),ka(NaN)],ul.prototype,"min",void 0),sl([vt(kt(zt(),Et("min"))),ka(NaN)],ul.prototype,"max",void 0);var cl=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};function dl(){return gt((function(e){return"number"===typeof e&&0!==e}),"expecting a non-zero Number")}var hl=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i;return(0,p.Z)(this,n),(i=t.call(this,e,new ha)).min=NaN,i.max=NaN,i.scale.strictClampByDefault=!0,i}return(0,f.Z)(n,[{key:"normaliseDataDomain",value:function(e){var t,n=this.min,i=this.max;e.length>2&&(e=null!==(t=pa(e))&&void 0!==t?t:[NaN,NaN]),isNaN(n)||(e=[n,e[1]]),isNaN(i)||(e=[e[0],i]);var r=e[0]>e[1],o=e[0]<0&&e[1]>0,a=0===e[0]&&0===e[1];return(r||o||a)&&(e=[],o?Oe.warn("the data domain crosses zero, the chart data cannot be rendered. See log axis documentation for more information."):a&&Oe.warn("the data domain has 0 extent, no data is rendered.")),0===e[0]&&(e[0]=1),0===e[1]&&(e[1]=-1),e}},{key:"base",get:function(){return this.scale.base},set:function(e){this.scale.base=e}}]),n}(ul);hl.className="LogAxis",hl.type="log",cl([vt(kt(zt(),bt("max"),dl())),ka(NaN)],hl.prototype,"min",void 0),cl([vt(kt(zt(),Et("min"),dl())),ka(NaN)],hl.prototype,"max",void 0);var pl=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},fl=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).maxSpacing=NaN,e}return(0,f.Z)(n)}(Oa);pl([vt(kt(zt(1),Et("minSpacing"))),ka(NaN)],fl.prototype,"maxSpacing",void 0);var vl,gl=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i;(0,p.Z)(this,n),(i=t.call(this,e,new Yo)).datumFormat="%m/%d/%y, %H:%M:%S",i.min=void 0,i.max=void 0;var r=(0,le.Z)(i).scale;return r.strictClampByDefault=!0,i.refreshScale(),i.datumFormatter=r.tickFormat({specifier:i.datumFormat}),i}return(0,f.Z)(n,[{key:"normaliseDataDomain",value:function(e){var t,n=this.min,i=this.max;return"number"===typeof n&&(n=new Date(n)),"number"===typeof i&&(i=new Date(i)),e.length>2&&(e=(null!==(t=pa(e))&&void 0!==t?t:[0,1e3]).map((function(e){return new Date(e)}))),n instanceof Date&&(e=[n,e[1]]),i instanceof Date&&(e=[e[0],i]),e[0]>e[1]&&(e=[]),e}},{key:"createTick",value:function(){return new fl}},{key:"onLabelFormatChange",value:function(e,t){t?(0,oe.Z)((0,ae.Z)(n.prototype),"onLabelFormatChange",this).call(this,e,t):this.labelFormatter=this.scale.tickFormat({ticks:e})}},{key:"formatDatum",value:function(e){var t;return null!==(t=this.moduleCtx.callbackCache.call(this.datumFormatter,e))&&void 0!==t?t:String(e)}},{key:"calculatePadding",value:function(e,t){return[0,1]}}]),n}(Fs);gl.className="TimeAxis",gl.type="time",pl([vt(kt(Ft,bt("max")))],gl.prototype,"min",void 0),pl([vt(kt(Ft,Et("min")))],gl.prototype,"max",void 0);var ml=(vl={},(0,se.Z)(vl,ul.type,ul),(0,se.Z)(vl,Gs.type,Gs),(0,se.Z)(vl,gl.type,gl),(0,se.Z)(vl,Qs.type,Qs),(0,se.Z)(vl,hl.type,hl),vl);function yl(e,t){ml[e]=t}function Cl(e,t){var n=ml[e];if(n)return new n(t);throw new Error("AG Charts - unknown axis type: ".concat(e))}var kl={has:function(e){return Object.prototype.hasOwnProperty.call(ml,e)},get axesTypes(){return Object.keys(ml)}},wl={};function Sl(e,t){wl[e]=t}var bl,El,xl=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Rl=["circle","cross","diamond","heart","plus","square","triangle"],Dl=gt((function(e){return Rl.includes(e)||Object.getPrototypeOf(e)===_r}),"expecting a marker shape keyword such as 'circle', 'diamond' or 'square' or an object extending the Marker class"),Tl=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).enabled=!0,e.shape=Hr,e.size=6,e.maxSize=30,e.domain=void 0,e.fill=void 0,e.stroke=void 0,e.strokeWidth=1,e.fillOpacity=void 0,e.strokeOpacity=void 0,e}return(0,f.Z)(n)}(we);xl([vt(Dt),Ce({redraw:fe.MAJOR})],Tl.prototype,"enabled",void 0),xl([vt(Dl),Ce({redraw:fe.MAJOR})],Tl.prototype,"shape",void 0),xl([vt(Bt(0)),Ce({redraw:fe.MAJOR})],Tl.prototype,"size",void 0),xl([vt(Bt(0)),Ce({redraw:fe.MAJOR})],Tl.prototype,"maxSize",void 0),xl([vt(jt),Ce({redraw:fe.MAJOR})],Tl.prototype,"domain",void 0),xl([vt(Zt),Ce({redraw:fe.MAJOR})],Tl.prototype,"fill",void 0),xl([vt(Zt),Ce({redraw:fe.MAJOR})],Tl.prototype,"stroke",void 0),xl([vt(Wt(0)),Ce({redraw:fe.MAJOR})],Tl.prototype,"strokeWidth",void 0),xl([vt(Wt(0,1)),Ce({redraw:fe.MAJOR})],Tl.prototype,"fillOpacity",void 0),xl([vt(Wt(0,1)),Ce({redraw:fe.MAJOR})],Tl.prototype,"strokeOpacity",void 0);var Ol=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Pl=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))},Al=(bl={},(0,se.Z)(bl,Qt.X,["xKey"]),(0,se.Z)(bl,Qt.Y,["yKey"]),bl),Ml=(El={},(0,se.Z)(El,Qt.X,["xName"]),(0,se.Z)(El,Qt.Y,["yName"]),El),Nl=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e,i,r,o,a){var s;return(0,p.Z)(this,n),(s=t.call(this,r,o,a)).xKey=e,s.yKey=i,s}return(0,f.Z)(n)}(vi),Ll=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).type="nodeClick",e}return(0,f.Z)(n)}(Nl),Il=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).type="nodeDoubleClick",e}return(0,f.Z)(n)}(Nl),Fl=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n)}(Pa),_l=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i;(0,p.Z)(this,n),(i=t.call(this,Object.assign(Object.assign({},e),{useSeriesGroupLayer:!0,directionKeys:Al,directionNames:Ml}))).legendItemName=void 0,i._contextNodeData=[],i.nodeDataDependencies={},i.highlightSelection=Rr.select(i.highlightNode,(function(){return i.opts.hasMarkers?i.markerFactory():i.nodeFactory()})),i.highlightLabelSelection=Rr.select(i.highlightLabel,qe),i.subGroups=[],i.subGroupId=0,i.datumSelectionGarbageCollection=!0;var r=e.pathsPerSeries,o=void 0===r?1:r,a=e.hasMarkers,s=void 0!==a&&a,l=e.hasHighlightedLabels,u=void 0!==l&&l,c=e.pathsZIndexSubOrderOffset,d=void 0===c?[]:c;return i.opts={pathsPerSeries:o,hasMarkers:s,hasHighlightedLabels:u,pathsZIndexSubOrderOffset:d},i.animationState=new Fl("empty",{empty:{on:{update:{target:"ready",action:function(e){return i.animateEmptyUpdateReady(e)}}}},ready:{on:{updateData:{target:"waiting",action:function(){}},update:{target:"ready",action:function(e){return i.animateReadyUpdate(e)}},highlight:{target:"ready",action:function(e){return i.animateReadyHighlight(e)}},highlightMarkers:{target:"ready",action:function(e){return i.animateReadyHighlightMarkers(e)}},resize:{target:"ready",action:function(e){return i.animateReadyResize(e)}}}},waiting:{on:{update:{target:"ready",action:function(e){return i.animateWaitingUpdateReady(e)}}}}}),i}return(0,f.Z)(n,[{key:"contextNodeData",get:function(){var e;return null===(e=this._contextNodeData)||void 0===e?void 0:e.slice()}},{key:"addChartEventListeners",value:function(){var e,t,n=this;null===(e=this.ctx.chartEventManager)||void 0===e||e.addListener("legend-item-click",(function(e){return n.onLegendItemClick(e)})),null===(t=this.ctx.chartEventManager)||void 0===t||t.addListener("legend-item-double-click",(function(e){return n.onLegendItemDoubleClick(e)}))}},{key:"destroy",value:function(){(0,oe.Z)((0,ae.Z)(n.prototype),"destroy",this).call(this),this._contextNodeData.splice(0,this._contextNodeData.length),this.subGroups.splice(0,this.subGroups.length)}},{key:"checkDomainXY",value:function(e,t,n,i){return(n&&lt(e)||!n&&st(e))&&(i&&lt(t)||!i&&st(t))?[e,t]:void 0}},{key:"checkRangeXY",value:function(e,t,n,i){return!isNaN(e)&&!isNaN(t)&&n.inRange(e)&&i.inRange(t)}},{key:"update",value:function(e){var t,n,i=e.seriesRect;return Pl(this,void 0,void 0,(0,ie.Z)().mark((function e(){var r,o,a,s,l,u;return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.visible,o=null!==(n=null===(t=this.ctx.highlightManager)||void 0===t?void 0:t.getActiveHighlight())&&void 0!==n?n:{},a=o.series,s=a?a===this:void 0,l={seriesRectWidth:null===i||void 0===i?void 0:i.width,seriesRectHeight:null===i||void 0===i?void 0:i.height},(u=null!=Zi(this.nodeDataDependencies,l))&&(this.nodeDataDependencies=l,this.markNodeDataDirty()),e.next=8,this.updateSelections(s,r);case 8:return e.next=10,this.updateNodes(s,r);case 10:u&&this.animationState.transition("resize",{datumSelections:this.subGroups.map((function(e){return e.datumSelection})),markerSelections:this.subGroups.map((function(e){return e.markerSelection})),contextData:this._contextNodeData,paths:this.subGroups.map((function(e){return e.paths}))}),this.animationState.transition("update",{datumSelections:this.subGroups.map((function(e){return e.datumSelection})),markerSelections:this.subGroups.map((function(e){return e.markerSelection})),labelSelections:this.subGroups.map((function(e){return e.labelSelection})),contextData:this._contextNodeData,paths:this.subGroups.map((function(e){return e.paths})),seriesRect:i});case 12:case"end":return e.stop()}}),e,this)})))}},{key:"updateSelections",value:function(e,t){var n;return Pl(this,void 0,void 0,(0,ie.Z)().mark((function i(){var r=this;return(0,ie.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.updateHighlightSelection(e);case 2:if(t){i.next=4;break}return i.abrupt("return");case 4:if(this.nodeDataRefresh||this.isPathOrSelectionDirty()){i.next=6;break}return i.abrupt("return");case 6:if(!this.nodeDataRefresh){i.next=14;break}return this.nodeDataRefresh=!1,(null===(n=this.chart)||void 0===n?void 0:n.debug)&&Oe.debug("CartesianSeries.updateSelections() - calling createNodeData() for",this.id),i.next=11,this.createNodeData();case 11:return this._contextNodeData=i.sent,i.next=14,this.updateSeriesGroups();case 14:return i.next=16,Promise.all(this.subGroups.map((function(e,t){return r.updateSeriesGroupSelections(e,t)})));case 16:case"end":return i.stop()}}),i,this)})))}},{key:"updateSeriesGroupSelections",value:function(e,t){return Pl(this,void 0,void 0,(0,ie.Z)().mark((function n(){var i,r,o,a,s,l;return(0,ie.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.datumSelection,r=e.labelSelection,o=e.markerSelection,a=this._contextNodeData[t],s=a.nodeData,l=a.labelData,n.next=5,this.updateDatumSelection({nodeData:s,datumSelection:i,seriesIdx:t});case 5:return e.datumSelection=n.sent,n.next=8,this.updateLabelSelection({labelData:l,labelSelection:r,seriesIdx:t});case 8:if(e.labelSelection=n.sent,!o){n.next=13;break}return n.next=12,this.updateMarkerSelection({nodeData:s,markerSelection:o,seriesIdx:t});case 12:e.markerSelection=n.sent;case 13:case"end":return n.stop()}}),n,this)})))}},{key:"nodeFactory",value:function(){return new Ae}},{key:"markerFactory",value:function(){return new(Kr())}},{key:"updateSeriesGroups",value:function(){return Pl(this,void 0,void 0,(0,ie.Z)().mark((function e(){var t,n,i,r,o,a,s,l,u,c,d,h,p,f,v=this;return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this._contextNodeData,n=this.contentGroup,i=this.subGroups,r=this.opts,o=r.pathsPerSeries,a=r.hasMarkers,t.length!==i.length){e.next=3;break}return e.abrupt("return");case 3:for(t.length<i.length&&i.splice(t.length).forEach((function(e){var t=e.dataNodeGroup,i=e.markerGroup,r=e.labelGroup,o=e.paths;n.removeChild(t),i&&n.removeChild(i),r&&n.removeChild(r);var a,s=(0,ne.Z)(o);try{for(s.s();!(a=s.n()).done;){var l=a.value;n.removeChild(l)}}catch(u){s.e(u)}finally{s.f()}})),s=t.length;s>i.length;){for(l=!1,u=this.subGroupId++,c=new Ae({name:"".concat(this.id,"-series-sub").concat(u,"-dataNodes"),layer:l,zIndex:qt.SERIES_LAYER_ZINDEX,zIndexSubOrder:this.getGroupZIndexSubOrder("data",u)}),d=a?new Ae({name:"".concat(this.id,"-series-sub").concat(this.subGroupId++,"-markers"),layer:l,zIndex:qt.SERIES_LAYER_ZINDEX,zIndexSubOrder:this.getGroupZIndexSubOrder("marker",u)}):void 0,h=new Ae({name:"".concat(this.id,"-series-sub").concat(this.subGroupId++,"-labels"),layer:l,zIndex:qt.SERIES_LABEL_ZINDEX,zIndexSubOrder:this.getGroupZIndexSubOrder("labels",u)}),n.appendChild(c),n.appendChild(h),d&&n.appendChild(d),p=[],f=0;f<o;f++)p[f]=new Ir,p[f].zIndex=qt.SERIES_LAYER_ZINDEX,p[f].zIndexSubOrder=this.getGroupZIndexSubOrder("paths",f),n.appendChild(p[f]);i.push({paths:p,dataNodeGroup:c,markerGroup:d,labelGroup:h,labelSelection:Rr.select(h,qe),datumSelection:Rr.select(c,(function(){return v.nodeFactory()}),this.datumSelectionGarbageCollection),markerSelection:d?Rr.select(d,(function(){return v.markerFactory()})):void 0})}case 6:case"end":return e.stop()}}),e,this)})))}},{key:"getGroupZIndexSubOrder",value:function(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(0,oe.Z)((0,ae.Z)(n.prototype),"getGroupZIndexSubOrder",this).call(this,e,i);if("paths"===e){var o=null!==(t=this.opts.pathsZIndexSubOrderOffset[i])&&void 0!==t?t:0,a=r[0];r[0]="function"===typeof a?function(){return+a()+o}:+a+o}return r}},{key:"updateNodes",value:function(e,t){var n;return Pl(this,void 0,void 0,(0,ie.Z)().mark((function i(){var r,o,a,s,l,u,c,d,h=this;return(0,ie.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(r=this.highlightSelection,o=this.highlightLabelSelection,a=this._contextNodeData,s=this.opts,l=s.hasMarkers,u=s.hasHighlightedLabels,c=this.visible&&(null===(n=this._contextNodeData)||void 0===n?void 0:n.length)>0&&t,this.rootGroup.visible=c,this.contentGroup.visible=c,this.highlightGroup.visible=c&&!!e,d=this.subGroups.map((function(e,t){var n=a[t].itemId;return h.getOpacity({itemId:n})})),!l){i.next=12;break}return i.next=9,this.updateMarkerNodes({markerSelection:r,isHighlight:!0,seriesIdx:-1});case 9:this.animationState.transition("highlightMarkers",r),i.next=15;break;case 12:return i.next=14,this.updateDatumNodes({datumSelection:r,isHighlight:!0,seriesIdx:-1});case 14:this.animationState.transition("highlight",r);case 15:if(!u){i.next=18;break}return i.next=18,this.updateLabelNodes({labelSelection:o,seriesIdx:-1});case 18:return i.next=20,Promise.all(this.subGroups.map((function(e,t){return Pl(h,void 0,void 0,(0,ie.Z)().mark((function n(){var i,r,o,a,s,u,h,p,f,v,g,m;return(0,ie.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=e.dataNodeGroup,r=e.markerGroup,o=e.datumSelection,a=e.labelSelection,s=e.markerSelection,u=e.paths,h=e.labelGroup,p=c,f=d[t],i.opacity=f,i.visible=p,h.visible=p,r&&(r.opacity=f,r.zIndex=i.zIndex>=qt.SERIES_LAYER_ZINDEX?i.zIndex:i.zIndex+1,r.visible=p),h&&(h.opacity=f),v=(0,ne.Z)(u);try{for(v.s();!(g=v.n()).done;)(m=g.value).opacity=f,m.visible=p}catch(y){v.e(y)}finally{v.f()}if(i.visible){n.next=12;break}return n.abrupt("return");case 12:return n.next=14,this.updateDatumNodes({datumSelection:o,isHighlight:!1,seriesIdx:t});case 14:return n.next=16,this.updateLabelNodes({labelSelection:a,seriesIdx:t});case 16:if(!l||!s){n.next=19;break}return n.next=19,this.updateMarkerNodes({markerSelection:s,isHighlight:!1,seriesIdx:t});case 19:case"end":return n.stop()}}),n,this)})))})));case 20:case"end":return i.stop()}}),i,this)})))}},{key:"updateHighlightSelection",value:function(e){var t;return Pl(this,void 0,void 0,(0,ie.Z)().mark((function n(){var i,r,o,a,s,l;return(0,ie.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=this.highlightSelection,r=this.highlightLabelSelection,o=this._contextNodeData,a=null===(t=this.ctx.highlightManager)||void 0===t?void 0:t.getActiveHighlight(),s=e&&(null===a||void 0===a?void 0:a.datum)?a:void 0,n.next=5,this.updateHighlightSelectionItem({item:s,highlightSelection:i});case 5:return this.highlightSelection=n.sent,this.isLabelEnabled()&&null!=s&&function(){var e,t=s.itemId,n=void 0===t?void 0:t,i=(0,ne.Z)(o);try{for(i.s();!(e=i.n()).done;){var r=e.value.labelData;if(null!=(l=r.find((function(e){return e.datum===s.datum&&e.itemId===n}))))break}}catch(a){i.e(a)}finally{i.f()}}(),n.next=9,this.updateHighlightSelectionLabel({item:l,highlightLabelSelection:r});case 9:this.highlightLabelSelection=n.sent;case 10:case"end":return n.stop()}}),n,this)})))}},{key:"pickNodeExactShape",value:function(e){var t=(0,oe.Z)((0,ae.Z)(n.prototype),"pickNodeExactShape",this).call(this,e);if(t)return t;var i,r=e.x,o=e.y,a=this.opts.hasMarkers,s=(0,ne.Z)(this.subGroups);try{for(s.s();!(i=s.n()).done;){var l=i.value,u=l.dataNodeGroup,c=l.markerGroup,d=u.pickNode(r,o);if(!d&&a&&(d=null===c||void 0===c?void 0:c.pickNode(r,o)),d)return{datum:d.datum,distance:0}}}catch(h){s.e(h)}finally{s.f()}}},{key:"pickNodeClosestDatum",value:function(e){var t,n,i,r,o=e.x,a=e.y,s=this.axes,l=this.rootGroup,u=this._contextNodeData,c=s[Qt.X],d=s[Qt.Y],h=l.transformPoint(o,a),p=1/0,f=(0,ne.Z)(u);try{for(f.s();!(r=f.n()).done;){var v,g=r.value,m=(0,ne.Z)(g.nodeData);try{for(m.s();!(v=m.n()).done;){var y=v.value,C=y.point,k=(C=void 0===C?{}:C).x,w=void 0===k?NaN:k,S=C.y,b=void 0===S?NaN:S;if(!isNaN(w)&&!isNaN(b))if((null===c||void 0===c?void 0:c.inRange(w))&&(null===d||void 0===d?void 0:d.inRange(b))){var E=Math.max(Math.pow(h.x-w,2)+Math.pow(h.y-b,2),0);E<p&&(p=E,i=y)}}}catch(x){m.e(x)}finally{m.f()}}}catch(x){f.e(x)}finally{f.f()}if(i)return{datum:i,distance:Math.max(Math.sqrt(p)-(null!==(n=null===(t=i.point)||void 0===t?void 0:t.size)&&void 0!==n?n:0),0)}}},{key:"pickNodeMainAxisFirst",value:function(e,t){var n,i,r=e.x,o=e.y,a=this.axes,s=this.rootGroup,l=this._contextNodeData,u=a[Qt.X],c=a[Qt.Y],d=[u,c].filter((function(e){return e instanceof Gs})).map((function(e){return e.direction}));if(!t||0!==d.length){var h,p=(0,re.Z)(d,1)[0],f=void 0===p?Qt.X:p,v=s.transformPoint(r,o),g=f===Qt.X?[v.x,v.y]:[v.y,v.x],m=[1/0,1/0],y=void 0,C=(0,ne.Z)(l);try{for(C.s();!(h=C.n()).done;){var k,w=h.value,S=(0,ne.Z)(w.nodeData);try{for(S.s();!(k=S.n()).done;){var b=k.value,E=b.point,x=(E=void 0===E?{}:E).x,R=void 0===x?NaN:x,D=E.y,T=void 0===D?NaN:D;if(!isNaN(R)&&!isNaN(T))if((null===u||void 0===u?void 0:u.inRange(R))&&(null===c||void 0===c?void 0:c.inRange(T))){for(var O=f===Qt.X?[R,T]:[T,R],P=!0,A=0;A<O.length;A++){var M=Math.abs(O[A]-g[A]);if(M>m[A]){P=!1;break}M<m[A]&&(m[A]=M,m.fill(1/0,A+1,m.length))}P&&(y=b)}}}catch(N){S.e(N)}finally{S.f()}}}catch(N){C.e(N)}finally{C.f()}if(y)return{datum:y,distance:Math.max(Math.sqrt(Math.pow(m[0],2)+Math.pow(m[1],2))-(null!==(i=null===(n=y.point)||void 0===n?void 0:n.size)&&void 0!==i?i:0),0)}}}},{key:"onLegendItemClick",value:function(e){var t=e.enabled,n=e.itemId,i=e.series,r=e.legendItemName,o=null!=this.legendItemName&&this.legendItemName===r;(i.id===this.id||o)&&this.toggleSeriesItem(n,t)}},{key:"onLegendItemDoubleClick",value:function(e){var t=e.enabled,n=e.itemId,i=e.series,r=e.numVisibleItems,o=e.legendItemName,a=Object.values(r).reduce((function(e,t){return e+t}),0),s=null!=this.legendItemName&&this.legendItemName===o;i.id===this.id||s||t&&1===a?this.toggleSeriesItem(n,!0):this.toggleSeriesItem(n,!1)}},{key:"isPathOrSelectionDirty",value:function(){return!1}},{key:"getLabelData",value:function(){return[]}},{key:"updateHighlightSelectionItem",value:function(e){return Pl(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r,o,a;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.opts.hasMarkers,i=e.item,r=e.highlightSelection,o=i?[i]:[],!n){t.next=8;break}return a=r,t.abrupt("return",this.updateMarkerSelection({nodeData:o,markerSelection:a,seriesIdx:-1}));case 8:return t.abrupt("return",this.updateDatumSelection({nodeData:o,datumSelection:r,seriesIdx:-1}));case 9:case"end":return t.stop()}}),t,this)})))}},{key:"updateHighlightSelectionLabel",value:function(e){return Pl(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.item,i=e.highlightLabelSelection,r=n?[n]:[],t.abrupt("return",this.updateLabelSelection({labelData:r,labelSelection:i,seriesIdx:-1}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"updateDatumSelection",value:function(e){return Pl(this,void 0,void 0,(0,ie.Z)().mark((function t(){return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.datumSelection);case 1:case"end":return t.stop()}}),t)})))}},{key:"updateDatumNodes",value:function(e){return Pl(this,void 0,void 0,(0,ie.Z)().mark((function e(){return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))}},{key:"updateMarkerSelection",value:function(e){return Pl(this,void 0,void 0,(0,ie.Z)().mark((function t(){return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.markerSelection);case 1:case"end":return t.stop()}}),t)})))}},{key:"updateMarkerNodes",value:function(e){return Pl(this,void 0,void 0,(0,ie.Z)().mark((function e(){return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))}},{key:"animateEmptyUpdateReady",value:function(e){}},{key:"animateReadyUpdate",value:function(e){}},{key:"animateWaitingUpdateReady",value:function(e){}},{key:"animateReadyHighlight",value:function(e){}},{key:"animateReadyHighlightMarkers",value:function(e){}},{key:"animateReadyResize",value:function(e){}}]),n}(Ei);Ol([vt(Pt)],_l.prototype,"legendItemName",void 0);var Gl=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).formatter=void 0,e}return(0,f.Z)(n)}(Tl);Ol([vt(Rt),Ce({redraw:fe.MAJOR})],Gl.prototype,"formatter",void 0);var Zl=/(#\{(.*?)\})/g;function Vl(e,t,n){return e.replace(Zl,(function(){var e=arguments.length<=2?void 0:arguments[2],i=e.split(":"),r=(0,re.Z)(i,2),o=r[0],a=r[1],s=t[o];if("number"===typeof s){var l=a&&n&&n[a];if(l){var u=l.locales,c=l.options;return s.toLocaleString(u,c)}return String(s)}if(s instanceof Date){var d=a&&n&&n[a];if("string"===typeof d){var h=zo(d);return h(s)}return s.toDateString()}return"string"===typeof s||(null===s||void 0===s?void 0:s.toString)?String(s):""}))}var Hl=null;function Bl(e){return Hl=null!==Hl&&void 0!==Hl?Hl:document.createElement("div"),e?(Hl.textContent=e,Hl.innerHTML):""}var Wl=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},zl=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))},Ul=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).formatter=void 0,e}return(0,f.Z)(n)}(ga);Wl([vt(Rt)],Ul.prototype,"formatter",void 0);var jl,Kl=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).renderer=void 0,e.format=void 0,e}return(0,f.Z)(n)}(Si);Wl([vt(Rt)],Kl.prototype,"renderer",void 0),Wl([vt(Pt)],Kl.prototype,"format",void 0),function(e){e[e.Fill=0]="Fill",e[e.Stroke=1]="Stroke",e[e.Marker=2]="Marker",e[e.Label=3]="Label"}(jl||(jl={}));var Yl=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i;(0,p.Z)(this,n),(i=t.call(this,{moduleCtx:e,pathsPerSeries:2,pathsZIndexSubOrderOffset:[0,1e3],hasMarkers:!0})).tooltip=new Kl,i.marker=new Gl,i.label=new Ul,i.fill="#c16068",i.stroke="#874349",i.fillOpacity=1,i.strokeOpacity=1,i.lineDash=[0],i.lineDashOffset=0,i.xKey=void 0,i.xName=void 0,i.strokeWidth=2,i.shadow=void 0;var r=(0,le.Z)(i),o=r.marker,a=r.label;return o.enabled=!1,a.enabled=!1,i}return(0,f.Z)(n,[{key:"processData",value:function(e){return zl(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r,o,a,s,l,u,c,d,h,p,f,v,g,m,y,C,k;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.xKey,i=this.yKey,r=this.axes,o=this.normalizedTo,a=this.data,s=this.visible,l=this.seriesGrouping,u=(l=void 0===l?{}:l).groupIndex,c=void 0===u?this.id:u,n&&i&&a){t.next=5;break}return t.abrupt("return");case 5:return d=r[Qt.X],h=r[Qt.Y],p=(null===d||void 0===d?void 0:d.scale)instanceof To,f=(null===h||void 0===h?void 0:h.scale)instanceof To,v=["area-stack-".concat(c,"-yValues"),"area-stack-".concat(c,"-yValues-trailing"),"area-stack-".concat(c,"-yValues-prev"),"area-stack-".concat(c,"-yValues-trailing-prev"),"area-stack-".concat(c,"-yValues-marker")],g=[],(m=o&&isFinite(o)?o:void 0)&&(g.push(Kn(this,[v[0],v[1],v[4]],m,"range")),g.push(Kn(this,[v[2],v[3]],m,"range"))),t.next=15,e.request(this.id,a,{props:[ui(this,n,p,{id:"xValue"}),ci(this,i,f,{id:"yValue-raw",invalidValue:null})].concat((0,te.Z)(fi(this,i,f,"window","current",{id:"yValue-end",invalidValue:null,groupId:v[0]})),(0,te.Z)(fi(this,i,f,"window-trailing","current",{id:"yValue-start",invalidValue:null,groupId:v[1]})),(0,te.Z)(fi(this,i,f,"window","last",{id:"yValue-previous-end",invalidValue:null,groupId:v[2]})),(0,te.Z)(fi(this,i,f,"window-trailing","last",{id:"yValue-previous-start",invalidValue:null,groupId:v[3]})),(0,te.Z)(fi(this,i,f,"normal","current",{id:"yValue-cumulative",invalidValue:null,groupId:v[4]})),g),groupByKeys:!0,dataVisible:s});case 15:y=t.sent,C=y.dataModel,k=y.processedData,this.dataModel=C,this.processedData=k;case 20:case"end":return t.stop()}}),t,this)})))}},{key:"getDomain",value:function(e){var t=this.processedData,n=this.dataModel,i=this.axes;if(!t||!n)return[];var r=i[Qt.X],o=i[Qt.Y],a=n.resolveProcessedDataDefById(this,"xValue"),s=n.getDomain(this,"xValue","key",t),l=n.getDomain(this,/yValue-(previous-)?end/,"value",t);if(e===Qt.X)return"key"===(null===a||void 0===a?void 0:a.def.type)&&"category"===a.def.valueType?s:this.fixNumericExtent(pa(s),r);if(o instanceof hl||o instanceof gl)return this.fixNumericExtent(l,o);var u=[l[0]>0?0:l[0],l[1]<0?0:l[1]];return this.fixNumericExtent(u,o)}},{key:"createNodeData",value:function(){var e;return zl(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r,o,a,s,l,u,c,d,h,p,f,v,g,m,y,C,k,w,S,b,E,x,R,D,T,O,P,A,M,N,L,I,F,_,G,Z,V,H,B,W=this;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.axes,i=this.data,r=this.processedData,o=(r=void 0===r?{}:r).data,a=this.dataModel,s=this.ctx.callbackCache,l=n[Qt.X],u=n[Qt.Y],l&&u&&i&&a){t.next=7;break}return t.abrupt("return",[]);case 7:for(c=this.yKey,d=void 0===c?"":c,h=this.xKey,p=void 0===h?"":h,f=this.marker,v=this.label,g=this.fill,m=this.stroke,y=this.id,C=l.scale,k=u.scale,w=k instanceof To,S=(null!==(e=C.bandwidth)&&void 0!==e?e:0)/2,b=a.resolveProcessedDataIndexById(this,"yValue-start").index,E=a.resolveProcessedDataIndexById(this,"yValue-end").index,x=a.resolveProcessedDataIndexById(this,"yValue-raw").index,R=a.resolveProcessedDataIndexById(this,"yValue-previous-start").index,D=a.resolveProcessedDataIndexById(this,"yValue-previous-end").index,T=a.resolveProcessedDataIndexById(this,"yValue-cumulative").index,O=function(e,t,n){var i=C.convert(e)+S,r=k.convert(t,{strict:!1});return[{x:i,y:k.convert(n,{strict:!1}),size:f.size},{x:i,y:r,size:f.size}]},P=function(e,t,n){var i,r=W.normalizedTo&&isFinite(W.normalizedTo),o=r&&w&&lt(n);return(!r&&!isNaN(n)||o)&&(i=t),{x:C.convert(e)+S,y:k.convert(i,{strict:!1}),size:f.size}},I={itemId:d,fillSelectionData:L={itemId:d,points:[]},labelData:A=[],nodeData:M=[],strokeSelectionData:N={itemId:d,points:[],yValues:[]}},F=L.points,_=[],G=N.points,Z=N.yValues,V=-1,null===o||void 0===o||o.forEach((function(e){var t=(0,re.Z)(e.keys,1)[0],n=e.datum;e.values.forEach((function(e,i){var r;V++;var o,a=n[i],l=e[x],u=e[b],c=e[E],h=e[R],C=e[D],k=e[T],w=null!=l,S=P(t,+k,l);(w&&f&&M.push({index:V,series:W,itemId:d,datum:a,nodeMidPoint:{x:S.x,y:S.y},cumulativeValue:c,yValue:l,xValue:t,yKey:d,xKey:p,point:S,fill:g,stroke:m}),w&&v)&&(o=v.formatter?null!==(r=s.call(v.formatter,{value:l,seriesId:y}))&&void 0!==r?r:"":ct(l)?Number(l).toFixed(2):String(l),A.push({index:V,itemId:d,point:S,label:o?{text:o,fontStyle:v.fontStyle,fontWeight:v.fontWeight,fontSize:v.fontSize,fontFamily:v.fontFamily,textAlign:"center",textBaseline:"bottom",fill:v.color}:void 0}));var N=[h,u],L=[C,c];if([H,t].some((function(e){return void 0==e})))H=t;else{N.some((function(e){return void 0==e}))&&(N[0]=0,N[1]=0),L.some((function(e){return void 0==e}))&&(L[0]=0,L[1]=0);var I=O(H,+N[0],+L[0]);F.push(I[0]),_.push(I[1]);var B=O(t,+N[1],+L[1]);F.push(B[0]),_.push(B[1]),G.push({x:NaN,y:NaN}),Z.push(void 0),null!=C&&(G.push(I[0]),Z.push(C)),void 0!=c&&(G.push(B[0]),Z.push(c)),H=t}}))})),B=_.length-1;B>=0;B--)F.push(_[B]);return t.abrupt("return",[I]);case 33:case"end":return t.stop()}}),t,this)})))}},{key:"isPathOrSelectionDirty",value:function(){return this.marker.isDirty()}},{key:"markerFactory",value:function(){return new(Kr(this.marker.shape))}},{key:"updateMarkerSelection",value:function(e){return zl(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r,o;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.nodeData,i=e.markerSelection,r=this.marker.enabled,o=r&&n?n:[],this.marker.isDirty()&&i.clear(),t.abrupt("return",i.update(o,(function(e){e.tag=jl.Marker})));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"updateMarkerNodes",value:function(e){var t;return zl(this,void 0,void 0,(0,ie.Z)().mark((function n(){var i,r,o,a,s,l,u,c,d,h,p,f,v,g,m,y,C,k,w,S,b,E,x,R;return(0,ie.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=e.markerSelection,r=e.isHighlight,o=this.id,a=this.xKey,s=void 0===a?"":a,l=this.marker,u=this.fill,c=this.stroke,d=this.fillOpacity,h=this.marker.fillOpacity,p=void 0===h?d:h,f=this.strokeOpacity,v=this.highlightStyle.item,g=v.fill,m=v.fillOpacity,y=void 0===m?p:m,C=v.stroke,k=v.strokeWidth,w=this.visible,S=this.ctx.callbackCache,b=l.size,E=l.formatter,x=null!==(t=l.strokeWidth)&&void 0!==t?t:this.strokeWidth,R="function"===typeof l.shape,i.each((function(e,t){var n,i,a,d,h,v,m,D,T=r&&void 0!==g?g:null!==(n=l.fill)&&void 0!==n?n:u,O=r?y:p,P=r&&void 0!==C?C:null!==(i=l.stroke)&&void 0!==i?i:c,A=r&&void 0!==k?k:x,M=void 0;E&&(M=S.call(E,{datum:t.datum,xKey:s,yKey:t.yKey,fill:T,stroke:P,strokeWidth:A,size:b,highlighted:r,seriesId:o})),e.fill=null!==(a=null===M||void 0===M?void 0:M.fill)&&void 0!==a?a:T,e.stroke=null!==(d=null===M||void 0===M?void 0:M.stroke)&&void 0!==d?d:P,e.strokeWidth=null!==(h=null===M||void 0===M?void 0:M.strokeWidth)&&void 0!==h?h:A,e.fillOpacity=null!==O&&void 0!==O?O:1,e.strokeOpacity=null!==(m=null!==(v=l.strokeOpacity)&&void 0!==v?v:f)&&void 0!==m?m:1,e.size=null!==(D=null===M||void 0===M?void 0:M.size)&&void 0!==D?D:b,e.translationX=t.point.x,e.translationY=t.point.y,e.visible=e.size>0&&w&&!isNaN(t.point.x)&&!isNaN(t.point.y),R&&!e.dirtyPath&&(e.path.clear({trackChanges:!0}),e.updatePath(),e.checkPathDirty())})),r||this.marker.markClean();case 7:case"end":return n.stop()}}),n,this)})))}},{key:"updateLabelSelection",value:function(e){return zl(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.labelData,i=e.labelSelection,t.abrupt("return",i.update(n,(function(e){e.tag=jl.Label})));case 2:case"end":return t.stop()}}),t)})))}},{key:"updateLabelNodes",value:function(e){return zl(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r,o,a,s,l,u;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.labelSelection,i=this.label,r=i.enabled,o=i.fontStyle,a=i.fontWeight,s=i.fontSize,l=i.fontFamily,u=i.color,n.each((function(e,t){var n=t.point,i=t.label;i&&r?(e.fontStyle=o,e.fontWeight=a,e.fontSize=s,e.fontFamily=l,e.textAlign=i.textAlign,e.textBaseline=i.textBaseline,e.text=i.text,e.x=n.x,e.y=n.y-10,e.fill=u,e.visible=!0):e.visible=!1}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"getNodeClickEvent",value:function(e,t){var n;return new Ll(null!==(n=this.xKey)&&void 0!==n?n:"",t.yKey,e,t,this)}},{key:"getNodeDoubleClickEvent",value:function(e,t){var n;return new Il(null!==(n=this.xKey)&&void 0!==n?n:"",t.yKey,e,t,this)}},{key:"getTooltipHtml",value:function(e){var t,n,i,r=this.xKey,o=this.id,a=this.axes,s=this.xName,l=this.yName,u=this.fill,c=this.stroke,d=this.tooltip,h=this.marker,p=this.dataModel,f=e.yKey,v=e.xValue,g=e.yValue,m=e.datum,y=a[Qt.X],C=a[Qt.Y];if(!r||!f||!(y&&C&&ct(g))||!p)return"";var k=p.resolveProcessedDataIndexById(this,"yValue-raw").index,w=h.size,S=h.formatter,b=h.strokeWidth,E=h.fill,x=h.stroke,R=y.formatDatum(v),D=C.formatDatum(g),T=null===(n=null===(t=this.processedData)||void 0===t?void 0:t.data[e.index])||void 0===n?void 0:n.values[0][k],O=Bl(l),P=Bl(R+": "+D),A=null!==b&&void 0!==b?b:this.strokeWidth,M=null!==E&&void 0!==E?E:u,N=void 0;S&&(N=S({datum:m,xKey:r,yKey:f,fill:M,stroke:null!==x&&void 0!==x?x:c,strokeWidth:A,size:w,highlighted:!1,seriesId:o}));var L=null!==(i=null===N||void 0===N?void 0:N.fill)&&void 0!==i?i:M,I={title:O,backgroundColor:L,content:P},F=d.renderer,_=d.format;if(_||F){var G={datum:m,xKey:r,xName:s,xValue:v,yKey:f,yValue:g,processedYValue:T,yName:l,color:L,title:O,seriesId:o};if(_)return An({content:Vl(_,G)},I);if(F)return An(F(G),I)}return An(I)}},{key:"getLegendData",value:function(){var e,t,n,i,r=this.data,o=this.id,a=this.xKey,s=this.yKey,l=this.yName,u=this.marker,c=this.fill,d=this.stroke,h=this.fillOpacity,p=this.strokeOpacity,f=this.visible;return(null===r||void 0===r?void 0:r.length)&&a&&s?[{legendType:"category",id:o,itemId:s,seriesId:o,enabled:f,label:{text:null!==l&&void 0!==l?l:s},marker:{shape:u.shape,fill:null!==(e=u.fill)&&void 0!==e?e:c,stroke:null!==(t=u.stroke)&&void 0!==t?t:d,fillOpacity:null!==(n=u.fillOpacity)&&void 0!==n?n:h,strokeOpacity:null!==(i=u.strokeOpacity)&&void 0!==i?i:p}}]:[]}},{key:"animateEmptyUpdateReady",value:function(e){var t=this,n=e.markerSelections,i=e.labelSelections,r=e.contextData,o=e.paths,a=e.seriesRect,s=this.stroke,l=this.fill,u=this.fillOpacity,c=this.lineDash,d=this.lineDashOffset,h=this.strokeOpacity,p=this.strokeWidth,f=this.shadow;r.forEach((function(e,r){var v,g,m,y,C,k=e.fillSelectionData,w=e.strokeSelectionData,S=e.itemId,b=(0,re.Z)(o[r],2),E=b[0],x=b[1],R=null!==(g=null===(v=t.ctx.animationManager)||void 0===v?void 0:v.defaultOptions.duration)&&void 0!==g?g:1e3,D={from:0,to:null!==(m=null===a||void 0===a?void 0:a.width)&&void 0!==m?m:0,duration:R},T=w.points,O=w.yValues;x.tag=jl.Stroke,x.fill=void 0,x.lineJoin=x.lineCap="round",x.pointerEvents=ke.None,x.stroke=s,x.strokeWidth=t.getStrokeWidth(t.strokeWidth,{itemId:S}),x.strokeOpacity=h,x.lineDash=c,x.lineDashOffset=d,null===(y=t.ctx.animationManager)||void 0===y||y.animate("".concat(t.id,"_empty-update-ready_stroke_").concat(r),Object.assign(Object.assign({},D),{onUpdate:function(e){x.path.clear({trackChanges:!0});var t=!0;T.forEach((function(n,i){if(void 0===O[i]||isNaN(n.x)||isNaN(n.y))t=!0;else if(n.x<=e)t?(x.path.moveTo(n.x,n.y),t=!1):x.path.lineTo(n.x,n.y);else if(i>0&&void 0!==O[i]&&void 0!==O[i-1]&&T[i-1].x<=e){var r=T[i-1],o=n,a=e,s=r.y+(a-r.x)*(o.y-r.y)/(o.x-r.x);x.path.lineTo(a,s)}})),x.checkPathDirty()}}));var P=k.points,A=P.slice(0,P.length/2),M=P.slice(P.length/2);E.tag=jl.Fill,E.stroke=void 0,E.lineJoin="round",E.pointerEvents=ke.None,E.fill=l,E.fillOpacity=u,E.strokeOpacity=h,E.strokeWidth=p,E.lineDash=c,E.lineDashOffset=d,E.fillShadow=f,null===(C=t.ctx.animationManager)||void 0===C||C.animate("".concat(t.id,"_empty-update-ready_fill_").concat(r),Object.assign(Object.assign({},D),{onUpdate:function(e){E.path.clear({trackChanges:!0});var t=0,n=0;A.forEach((function(i,r){if(i.x<=e)t=i.x,n=i.y,E.path.lineTo(i.x,i.y);else if(r>0&&A[r-1].x<e){var o=A[r-1],a=i;t=e,n=o.y+(t-o.x)*(a.y-o.y)/(a.x-o.x),E.path.lineTo(t,n)}})),M.forEach((function(n,i){var r=M.length-i-1;if(n.x<=e)E.path.lineTo(n.x,n.y);else if(r>0&&A[r-1].x<e){var o=n,a=M[i+1],s=o.y+(t-o.x)*(a.y-o.y)/(a.x-o.x);E.path.lineTo(t,s)}})),M.length>0&&E.path.lineTo(M[M.length-1].x,M[M.length-1].y),E.path.closePath(),E.checkPathDirty()}})),n[r].each((function(e,n){var i,r,o,s,l=(null===a||void 0===a?void 0:a.width)?n.point.x/a.width*R:0,u=t.animateFormatter(n),c=null!==(r=null===(i=n.point)||void 0===i?void 0:i.size)&&void 0!==r?r:0;null===(o=t.ctx.animationManager)||void 0===o||o.animate("".concat(t.id,"_empty-update-ready_").concat(e.id),Object.assign(Object.assign({},D),{to:null!==(s=null===u||void 0===u?void 0:u.size)&&void 0!==s?s:c,delay:l,duration:200,onUpdate:function(t){e.size=t}}))})),i[r].each((function(e,n){var i,r=(null===a||void 0===a?void 0:a.width)?n.point.x/a.width*R:0;null===(i=t.ctx.animationManager)||void 0===i||i.animate("".concat(t.id,"_empty-update-ready_").concat(e.id),{from:0,to:1,delay:r,duration:200,onUpdate:function(t){e.opacity=t}})}))}))}},{key:"animateReadyUpdate",value:function(e){var t=this,n=e.contextData,i=e.paths,r=this.stroke,o=this.fill,a=this.fillOpacity,s=this.lineDash,l=this.lineDashOffset,u=this.strokeOpacity,c=this.strokeWidth,d=this.shadow;n.forEach((function(e,n){var h=e.strokeSelectionData,p=e.fillSelectionData,f=e.itemId,v=(0,re.Z)(i[n],2),g=v[0],m=v[1];m.stroke=r,m.strokeWidth=t.getStrokeWidth(t.strokeWidth,{itemId:f}),m.strokeOpacity=u,m.lineDash=s,m.lineDashOffset=l,m.path.clear({trackChanges:!0});var y=!0;h.points.forEach((function(e,t){void 0===h.yValues[t]||isNaN(e.x)||isNaN(e.y)?y=!0:y?(m.path.moveTo(e.x,e.y),y=!1):m.path.lineTo(e.x,e.y)})),m.checkPathDirty(),g.fill=o,g.fillOpacity=a,g.strokeOpacity=u,g.strokeWidth=c,g.lineDash=s,g.lineDashOffset=l,g.fillShadow=d,g.path.clear({trackChanges:!0}),p.points.forEach((function(e){g.path.lineTo(e.x,e.y)})),g.path.closePath(),g.checkPathDirty()}))}},{key:"animateFormatter",value:function(e){var t,n,i,r=this.marker,o=this.fill,a=this.stroke,s=this.xKey,l=void 0===s?"":s,u=this.id,c=this.ctx.callbackCache,d=r.size,h=r.formatter,p=null!==(t=r.fill)&&void 0!==t?t:o,f=null!==(n=r.stroke)&&void 0!==n?n:a,v=null!==(i=r.strokeWidth)&&void 0!==i?i:this.strokeWidth,g=void 0;return h&&(g=c.call(h,{datum:e.datum,xKey:l,yKey:e.yKey,fill:p,stroke:f,strokeWidth:v,size:d,highlighted:!1,seriesId:u})),g}},{key:"isLabelEnabled",value:function(){return this.label.enabled}}]),n}(_l);Yl.className="AreaSeries",Yl.type="area",Wl([vt(Gt)],Yl.prototype,"fill",void 0),Wl([vt(Gt)],Yl.prototype,"stroke",void 0),Wl([vt(Bt(0,1))],Yl.prototype,"fillOpacity",void 0),Wl([vt(Bt(0,1))],Yl.prototype,"strokeOpacity",void 0),Wl([vt(sn)],Yl.prototype,"lineDash",void 0),Wl([vt(Bt(0))],Yl.prototype,"lineDashOffset",void 0),Wl([vt(Pt)],Yl.prototype,"xKey",void 0),Wl([vt(Pt)],Yl.prototype,"xName",void 0),Wl([vt(Pt)],Yl.prototype,"yKey",void 0),Wl([vt(Pt)],Yl.prototype,"yName",void 0),Wl([vt(Wt(0))],Yl.prototype,"normalizedTo",void 0),Wl([vt(Bt(0))],Yl.prototype,"strokeWidth",void 0);var Xl=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},ql=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).borderPath=new Mr,e.x=0,e.y=0,e.width=10,e.height=10,e.radius=0,e.crisp=!1,e.lastUpdatePathStrokeWidth=Ke.defaultStyles.strokeWidth,e.effectiveStrokeWidth=Ke.defaultStyles.strokeWidth,e.microPixelEffectOpacity=1,e}return(0,f.Z)(n,[{key:"isDirtyPath",value:function(){var e;return this.lastUpdatePathStrokeWidth!==this.strokeWidth||!!(this.path.isDirty()||this.borderPath.isDirty()||(null===(e=this.clipPath)||void 0===e?void 0:e.isDirty()))}},{key:"updatePath",value:function(){var e,t,n,i=this.path,r=this.borderPath,o=this.crisp,a=this.x,s=this.y,l=this.width,u=this.height,c=this.strokeWidth,d=1/(null!==(t=null===(e=this.layerManager)||void 0===e?void 0:e.canvas.pixelRatio)&&void 0!==t?t:1),h=1;if(i.clear({trackChanges:!0}),r.clear({trackChanges:!0}),o&&(l<=d&&(h*=l/d),u<=d&&(h*=u/d),l=this.align(a,l),u=this.align(s,u),a=this.align(a),s=this.align(s)),c)if(l<d){var p=a+d/2;r.moveTo(p,s),r.lineTo(p,s+u),c=d,this.borderClipPath=void 0}else if(u<d){var f=s+d/2;r.moveTo(a,f),r.lineTo(a+l,f),c=d,this.borderClipPath=void 0}else if(c<l&&c<u){var v=c/2;a+=v,s+=v,l-=c,u-=c,this.borderClipPath=void 0,i.rect(a,s,l,u),r.rect(a,s,l,u)}else this.borderClipPath=null!==(n=this.borderClipPath)&&void 0!==n?n:new Mr,this.borderClipPath.clear({trackChanges:!0}),this.borderClipPath.rect(a,s,l,u),r.rect(a,s,l,u);else this.borderClipPath=void 0,i.rect(a,s,l,u);this.effectiveStrokeWidth=c,this.lastUpdatePathStrokeWidth=c,this.microPixelEffectOpacity=h}},{key:"computeBBox",value:function(){var e=this.x,t=this.y,n=this.width,i=this.height;return new he(e,t,n,i)}},{key:"isPointInPath",value:function(e,t){var n=this.transformPoint(e,t);return this.computeBBox().containsPoint(n.x,n.y)}},{key:"applyFillAlpha",value:function(e){var t=this.fillOpacity,n=this.microPixelEffectOpacity,i=this.opacity,r=e.globalAlpha;e.globalAlpha=r*i*t*n}},{key:"renderStroke",value:function(e){var t=this.stroke,n=this.effectiveStrokeWidth,i=this.borderPath,r=this.borderClipPath,o=this.opacity,a=this.microPixelEffectOpacity;if(!!t&&!!n){var s=this.strokeOpacity,l=this.lineDash,u=this.lineDashOffset,c=this.lineCap,d=this.lineJoin;r&&(r.draw(e),e.clip()),i.draw(e);var h=e.globalAlpha;e.strokeStyle=t,e.globalAlpha=h*o*s*a,e.lineWidth=n,l&&e.setLineDash(l),u&&(e.lineDashOffset=u),c&&(e.lineCap=c),d&&(e.lineJoin=d),e.stroke(),e.globalAlpha=h}}}]),n}(Ir);ql.className="Rect",Xl([Lr()],ql.prototype,"x",void 0),Xl([Lr()],ql.prototype,"y",void 0),Xl([Lr()],ql.prototype,"width",void 0),Xl([Lr()],ql.prototype,"height",void 0),Xl([Lr()],ql.prototype,"radius",void 0),Xl([Lr()],ql.prototype,"crisp",void 0);var Ql=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};function Jl(e){var t,n=e.value,i=e.rect,r=e.placement,o=e.seriesId,a=e.padding,s=void 0===a?0:a,l=e.formatter,u=e.barAlongX,c=e.ctx.callbackCache;l&&(t=c.call(l,{value:ct(n)?n:void 0,seriesId:o})),void 0===t&&(t=ct(n)?n.toFixed(2):"");var d=i.x+i.width/2,h=i.y+i.height/2,p="center",f="middle",v=n>=0;switch(r){case"start":u?(d=v?i.x-s:i.x+i.width+s,p=v?"start":"end"):(h=v?i.y+i.height+s:i.y-s,f=v?"top":"bottom");break;case"outside":case"end":u?(d=v?i.x+i.width+s:i.x-s,p=v?"start":"end"):(h=v?i.y-s:i.y+i.height+s,f=v?"bottom":"top");break;default:f="middle"}return{text:t,textAlign:p,textBaseline:f,x:d,y:h}}function $l(e){var t=e.rect,n=e.config,i=n.crisp,r=void 0===i||i,o=n.fill,a=n.stroke,s=n.strokeWidth,l=n.fillOpacity,u=n.strokeOpacity,c=n.lineDash,d=n.lineDashOffset,h=n.fillShadow,p=n.visible,f=void 0===p||p;t.crisp=r,t.fill=o,t.stroke=a,t.strokeWidth=s,t.fillOpacity=l,t.strokeOpacity=u,t.lineDash=c,t.lineDashOffset=d,t.fillShadow=h,t.visible=f}function eu(e){var t,n,i,r,o,a,s,l=e.datum,u=e.isHighlighted,c=e.style,d=e.highlightStyle,h=e.formatter,p=e.seriesId,f=e.stackGroup,v=e.ctx.callbackCache,g=Ql(e,["datum","isHighlighted","style","highlightStyle","formatter","seriesId","stackGroup","ctx"]),m=u&&null!==(t=d.fill)&&void 0!==t?t:c.fill,y=u&&null!==(n=d.stroke)&&void 0!==n?n:c.stroke,C=u&&null!==(i=d.strokeWidth)&&void 0!==i?i:c.strokeWidth,k=u&&null!==(r=d.fillOpacity)&&void 0!==r?r:c.fillOpacity,w=c.strokeOpacity,S=c.fillShadow,b=c.lineDash,E=c.lineDashOffset,x=void 0;return h&&(x=v.call(h,Object.assign({datum:l.datum,xKey:l.xKey,yKey:l.yKey,fill:m,stroke:y,strokeWidth:C,highlighted:u,seriesId:p,stackGroup:f},g))),{fill:null!==(o=null===x||void 0===x?void 0:x.fill)&&void 0!==o?o:m,stroke:null!==(a=null===x||void 0===x?void 0:x.stroke)&&void 0!==a?a:y,strokeWidth:null!==(s=null===x||void 0===x?void 0:x.strokeWidth)&&void 0!==s?s:C,fillOpacity:k,strokeOpacity:w,lineDash:b,lineDashOffset:E,fillShadow:S}}function tu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=(0,re.Z)(e,2),n=t[0],i=t[1],r=0!==n||1!==i,o=!r;return o}function nu(e){var t=e.labelNode,n=e.labelDatum,i=e.config,r=e.visible;if(n&&i&&i.enabled){var o=n.x,a=n.y,s=n.text,l=n.textAlign,u=n.textBaseline,c=i.fontStyle,d=i.fontWeight,h=i.fontSize,p=i.fontFamily,f=i.color;t.fontStyle=c,t.fontWeight=d,t.fontSize=h,t.fontFamily=p,t.textAlign=l,t.textBaseline=u,t.text=s,t.x=o,t.y=a,t.fill=f,t.visible=r}else t.visible=!1}var iu,ru=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},ou=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))},au=["inside","outside"];!function(e){e[e.Bar=0]="Bar",e[e.Label=1]="Label"}(iu||(iu={}));var su=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).formatter=void 0,e.placement="inside",e}return(0,f.Z)(n)}(ga);ru([vt(Rt)],su.prototype,"formatter",void 0),ru([vt((function(e,t){return mt(e,t,(function(e){return au.includes(e)}))}))],su.prototype,"placement",void 0);var lu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).renderer=void 0,e}return(0,f.Z)(n)}(Si);ru([vt(Rt)],lu.prototype,"renderer",void 0);var uu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i;return(0,p.Z)(this,n),(i=t.call(this,{moduleCtx:e,pickModes:[ri.EXACT_SHAPE_MATCH],pathsPerSeries:0,hasHighlightedLabels:!0})).label=new su,i.tooltip=new lu,i.fill="#c16068",i.stroke="#874349",i.fillOpacity=1,i.strokeOpacity=1,i.lineDash=[0],i.lineDashOffset=0,i.formatter=void 0,i.xKey=void 0,i.xName=void 0,i.yKey=void 0,i.yName=void 0,i.groupScale=new So,i.stackGroup=void 0,i.strokeWidth=1,i.shadow=void 0,i.smallestDataInterval=void 0,i.datumSelectionGarbageCollection=!1,i.label.enabled=!1,i}return(0,f.Z)(n,[{key:"resolveKeyDirection",value:function(e){return this.getBarDirection()===Qt.X?e===Qt.X?Qt.Y:Qt.X:e}},{key:"processData",value:function(e){var t,n,i,r,o;return ou(this,void 0,void 0,(0,ie.Z)().mark((function a(){var s,l,u,c,d,h,p,f,v,g,m,y,C,k,w,S,b,E;return(0,ie.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return s=this.xKey,l=this.yKey,u=this.normalizedTo,c=this.seriesGrouping,d=(c=void 0===c?{}:c).groupIndex,h=void 0===d?this.id:d,p=this.data,f=void 0===p?[]:p,v=Math.abs(null!==u&&void 0!==u?u:NaN),g=(null===(t=this.getCategoryAxis())||void 0===t?void 0:t.scale)instanceof To,m=(null===(n=this.getValueAxis())||void 0===n?void 0:n.scale)instanceof To,y="bar-stack-".concat(h,"-yValues"),C="".concat(y,"-trailing"),k=v&&isFinite(v)?v:void 0,w=[],k&&w.push(Kn(this,[y,C],k,"range")),!(null===(i=this.ctx.animationManager)||void 0===i?void 0:i.skipAnimations)&&this.processedData&&w.push($n(this.processedData)),a.next=14,e.request(this.id,f,{props:[ui(this,s,g,{id:"xValue"}),ci(this,l,m,{id:"yValue-raw",invalidValue:null})].concat((0,te.Z)(fi(this,l,m,"normal","current",{id:"yValue-end",invalidValue:null,groupId:y})),(0,te.Z)(fi(this,l,m,"trailing","current",{id:"yValue-start",invalidValue:null,groupId:C})),(0,te.Z)(g?[zn]:[]),w),groupByKeys:!0,dataVisible:this.visible});case 14:S=a.sent,b=S.dataModel,E=S.processedData,this.dataModel=b,this.processedData=E,this.smallestDataInterval={x:null!==(o=null===(r=E.reduced)||void 0===r?void 0:r[zn.property])&&void 0!==o?o:1/0,y:1/0},this.animationState.transition("updateData");case 21:case"end":return a.stop()}}),a,this)})))}},{key:"getDomain",value:function(e){var t,n=this.processedData,i=this.dataModel;if(!n||!i)return[];var r=n.reduced,o=(r=void 0===r?{}:r)[zn.property],a=this.getCategoryAxis(),s=this.getValueAxis(),l=i.resolveProcessedDataDefById(this,"xValue"),u=i.getDomain(this,"xValue","key",n),c=i.getDomain(this,"yValue-end","value",n);if(e===this.getCategoryDirection()){if("key"===(null===l||void 0===l?void 0:l.def.type)&&"category"===(null===l||void 0===l?void 0:l.def.valueType))return u;var d=isFinite(o)?o:0,h=null!==(t=pa(u))&&void 0!==t?t:[NaN,NaN];return e===Qt.Y?this.fixNumericExtent([h[0]+-d,h[1]],a):this.fixNumericExtent([h[0],h[1]+d],a)}if(this.getValueAxis()instanceof hl)return this.fixNumericExtent(c,s);var p=[c[0]>0?0:c[0],c[1]<0?0:c[1]];return this.fixNumericExtent(p,s)}},{key:"getNodeClickEvent",value:function(e,t){var n;return new Ll(null!==(n=this.xKey)&&void 0!==n?n:"",t.yKey,e,t,this)}},{key:"getNodeDoubleClickEvent",value:function(e,t){var n;return new Il(null!==(n=this.xKey)&&void 0!==n?n:"",t.yKey,e,t,this)}},{key:"getCategoryAxis",value:function(){var e=this.getCategoryDirection();return this.axes[e]}},{key:"getValueAxis",value:function(){var e=this.getBarDirection();return this.axes[e]}},{key:"calculateStep",value:function(e){var t,n=this.smallestDataInterval,i=this.getCategoryAxis();if(i){var r=(i.dataDomain[1]-i.dataDomain[0])/(null!==(t=null===n||void 0===n?void 0:n.x)&&void 0!==t?t:1)+1,o=Math.floor(e),a=Math.min(r,o);return e/Math.max(1,a)}}},{key:"createNodeData",value:function(){return ou(this,void 0,void 0,(0,ie.Z)().mark((function e(){var t,n,i,r,o,a,s,l,u,c,d,h,p,f,v,g,m,y,C,k,w,S,b,E,x,R,D,T,O,P,A,M,N,L=this;return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.visible,n=this.dataModel,i=this.getCategoryAxis(),r=this.getValueAxis(),n&&t&&i&&r){e.next=5;break}return e.abrupt("return",[]);case 5:for(o=i.scale,a=r.scale,s=this.groupScale,l=this.yKey,u=void 0===l?"":l,c=this.xKey,d=void 0===c?"":c,h=this.fill,p=this.stroke,f=this.strokeWidth,v=this.label,g=this.id,m=this.processedData,y=this.ctx,C=this.ctx.seriesStateManager,k=o.bandwidth,o instanceof To&&(w=Math.max(i.range[0],i.range[1]),S=this.calculateStep(w),k=S),b=[],E=C.getVisiblePeerGroupIndex(this),x=E.index,R=E.visibleGroupCount,D=0;D<R;D++)b.push(String(D));return s.domain=b,s.range=[0,null!==k&&void 0!==k?k:0],s.padding=i instanceof Gs?i.groupPaddingInner:i instanceof Qs?.1:0,0===s.padding?s.round=!1:s.round=!0,T=s.bandwidth>=1?s.bandwidth:s.rawBandwidth,O=n.resolveProcessedDataIndexById(this,"xValue","key").index,P=n.resolveProcessedDataIndexById(this,"yValue-raw").index,A=n.resolveProcessedDataIndexById(this,"yValue-start").index,M=n.resolveProcessedDataIndexById(this,"yValue-end").index,N={itemId:u,nodeData:[],labelData:[]},null===m||void 0===m||m.data.forEach((function(e,t){var n=e.keys,r=e.datum,l=e.values,c=n[O],m=o.convert(c),C=+l[0][M],k=+l[0][A],w=l[0][P],S=m+s.convert(String(x));if(i.inRange(S,T)&&!isNaN(C)){var b=a.convert(C,{strict:!1}),E=a.convert(k,{strict:!1}),R=L.getBarDirection()===Qt.X,D={x:R?Math.min(b,E):S,y:R?S:Math.min(b,E),width:R?Math.abs(E-b):T,height:R?T:Math.abs(E-b)},I={x:D.x+D.width/2,y:D.y+D.height/2},F=v.fontStyle,_=v.fontWeight,G=v.fontSize,Z=v.fontFamily,V=v.color,H=Jl({value:w,rect:D,formatter:v.formatter,placement:v.placement,seriesId:g,barAlongX:R,ctx:y}),B=H.text,W=H.textAlign,z=H.textBaseline,U=H.x,j=H.y,K={index:t,series:L,itemId:u,datum:r[0],cumulativeValue:k+C,xValue:c,yValue:w,yKey:u,xKey:d,x:D.x,y:D.y,width:D.width,height:D.height,nodeMidPoint:I,fill:h,stroke:p,strokeWidth:f,label:B?{text:B,fontStyle:F,fontWeight:_,fontSize:G,fontFamily:Z,textAlign:W,textBaseline:z,fill:V,x:U,y:j}:void 0};N.nodeData.push(K),N.labelData.push(K)}})),e.abrupt("return",[N]);case 25:case"end":return e.stop()}}),e,this)})))}},{key:"nodeFactory",value:function(){return new ql}},{key:"updateDatumSelection",value:function(e){return ou(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.nodeData,i=e.datumSelection,r=function(e){return e.xValue},t.abrupt("return",i.update(n,(function(e){return e.tag=iu.Bar}),r));case 3:case"end":return t.stop()}}),t)})))}},{key:"updateDatumNodes",value:function(e){return ou(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r,o,a,s,l,u,c,d,h,p,f,v,g,m,y,C=this;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.datumSelection,i=e.isHighlight,r=this.fill,o=this.stroke,a=this.fillOpacity,s=this.strokeOpacity,l=this.lineDash,u=this.lineDashOffset,c=this.shadow,d=this.formatter,h=this.id,p=this.highlightStyle.item,f=this.ctx,v=this.stackGroup,g=this.axes[Qt.X],m=tu(null===g||void 0===g?void 0:g.visibleRange),y=this.getCategoryDirection()===Qt.X,n.each((function(e,t){var n={fill:r,stroke:o,fillOpacity:a,strokeOpacity:s,lineDash:l,lineDashOffset:u,fillShadow:c,strokeWidth:C.getStrokeWidth(C.strokeWidth,t)},g=y?t.width>0:t.height>0,k=eu({datum:t,isHighlighted:i,style:n,highlightStyle:p,formatter:d,seriesId:h,stackGroup:v,ctx:f});k.crisp=m,k.visible=g,$l({rect:e,config:k})}));case 6:case"end":return t.stop()}}),t,this)})))}},{key:"updateLabelSelection",value:function(e){return ou(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r,o;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.labelData,i=e.labelSelection,r=this.label.enabled,o=r?n:[],t.abrupt("return",i.update(o,(function(e){e.tag=iu.Label,e.pointerEvents=ke.None})));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updateLabelNodes",value:function(e){return ou(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n=this;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.labelSelection.each((function(e,t){nu({labelNode:e,labelDatum:t.label,config:n.label,visible:!0})}));case 2:case"end":return t.stop()}}),t)})))}},{key:"getTooltipHtml",value:function(e){var t,n=this.xKey,i=this.yKey,r=this.processedData,o=this.ctx.callbackCache,a=this.getCategoryAxis(),s=this.getValueAxis(),l=e.xValue,u=e.yValue,c=e.datum;if(!r||!n||!i||!a||!s)return"";var d=this.xName,h=this.yName,p=this.fill,f=this.stroke,v=this.tooltip,g=this.formatter,m=this.id,y=this.stackGroup,C=v.renderer,k=this.getStrokeWidth(this.strokeWidth),w=Bl(a.formatDatum(l)),S=Bl(s.formatDatum(u)),b=Bl(h),E=w+": "+S,x=void 0;g&&(x=o.call(g,{datum:c,fill:p,stroke:f,strokeWidth:k,highlighted:!1,xKey:n,yKey:i,seriesId:m,stackGroup:y}));var R=null!==(t=null===x||void 0===x?void 0:x.fill)&&void 0!==t?t:p,D={title:b,backgroundColor:R,content:E};return C?An(C({datum:c,xKey:n,xValue:l,xName:d,yKey:i,yValue:u,yName:h,color:R,title:b,seriesId:m,stackGroup:y}),D):An(D)}},{key:"getLegendData",value:function(){var e,t=this.id,n=this.data,i=this.xKey,r=this.yKey,o=this.yName,a=this.legendItemName,s=this.fill,l=this.stroke,u=this.fillOpacity,c=this.strokeOpacity,d=this.visible;if(!this.showInLegend||!(null===n||void 0===n?void 0:n.length)||!i||!r)return[];var h=[];return h.push({legendType:"category",id:t,itemId:r,seriesId:t,enabled:d,label:{text:null!==(e=null!==a&&void 0!==a?a:o)&&void 0!==e?e:r},legendItemName:a,marker:{fill:s,stroke:l,fillOpacity:u,strokeOpacity:c}}),h}},{key:"animateEmptyUpdateReady",value:function(e){var t,n,i=this,r=e.datumSelections,o=e.labelSelections,a=null!==(n=null===(t=this.ctx.animationManager)||void 0===t?void 0:t.defaultOptions.duration)&&void 0!==n?n:1e3,s=this.getDirectionStartingValues(r),l=s.startingX,u=s.startingY;r.forEach((function(e){e.each((function(e,t){var n,r=l,o=0,s=t.y,c=t.height;i.getBarDirection()===Qt.Y&&(r=t.x,o=t.width,s=u,c=0);var d=[{from:r,to:t.x},{from:o,to:t.width},{from:s,to:t.y},{from:c,to:t.height}];null===(n=i.ctx.animationManager)||void 0===n||n.animateMany("".concat(i.id,"_empty-update-ready_").concat(e.id),d,{duration:a,ease:nr,onUpdate:function(t){var n=(0,re.Z)(t,4),i=n[0],r=n[1],o=n[2],a=n[3];e.x=i,e.width=r,e.y=o,e.height=a}})}))})),o.forEach((function(e){e.each((function(e){var t;null===(t=i.ctx.animationManager)||void 0===t||t.animate("".concat(i.id,"_empty-update-ready_").concat(e.id),{from:0,to:1,delay:a,duration:200,onUpdate:function(t){e.opacity=t}})}))}))}},{key:"animateReadyHighlight",value:function(e){this.resetSelectionRects(e)}},{key:"animateReadyResize",value:function(e){var t,n=this,i=e.datumSelections;null===(t=this.ctx.animationManager)||void 0===t||t.reset(),i.forEach((function(e){n.resetSelectionRects(e)}))}},{key:"animateWaitingUpdateReady",value:function(e){var t,n,i,r,o,a=this,s=e.datumSelections,l=e.labelSelections,u=this.processedData,c=null===(t=null===u||void 0===u?void 0:u.reduced)||void 0===t?void 0:t.diff;if(null===c||void 0===c?void 0:c.changed){var d=null!==(i=null===(n=this.ctx.animationManager)||void 0===n?void 0:n.defaultOptions.duration)&&void 0!==i?i:1e3,h=d;(c.added.length>0||c.removed.length>0)&&(h=Math.floor(d/2));var p=this.getDirectionStartingValues(s),f=p.startingX,v=p.startingY,g=null===(o=null===(r=this.processedData)||void 0===r?void 0:r.defs.keys)||void 0===o?void 0:o[0],m={};c.added.forEach((function(e){m[e[0]]=!0}));var y={};c.removed.forEach((function(e){y[e[0]]=!0}));var C="".concat(this.id,"_").concat(Math.random()),k="".concat(this.id,"_").concat(Math.random());s.forEach((function(e){e.each((function(t,n){var i,r=[{from:t.x,to:n.x},{from:t.width,to:n.width},{from:t.y,to:n.y},{from:t.height,to:n.height}],o=c.removed.length>0?h:0,s=h,l=!1,u=g?n.xValue:"",d=f,p=0,k=n.y,w=n.height;a.getBarDirection()===Qt.Y&&(d=n.x,p=n.width,k=v,w=0);var S=void 0!==u&&void 0!==m[u],b=void 0!==u&&void 0!==y[u];S?(r=[{from:d,to:n.x},{from:p,to:n.width},{from:k,to:n.y},{from:w,to:n.height}],s=h):b&&(r=[{from:n.x,to:d},{from:n.width,to:p},{from:n.y,to:k},{from:n.height,to:w}],o=0,s=h,l=!0),null===(i=a.ctx.animationManager)||void 0===i||i.animateManyWithThrottle("".concat(a.id,"_waiting-update-ready_").concat(t.id),r,{delay:o,duration:s,ease:nr,throttleId:"".concat(a.id,"_rects"),throttleGroup:C,onUpdate:function(e){var n=(0,re.Z)(e,4),i=n[0],r=n[1],o=n[2],a=n[3];t.x=i,t.width=r,t.y=o,t.height=a},onComplete:function(){l&&e.cleanup()}})}))})),l.forEach((function(e){e.each((function(e){var t;e.opacity=0,null===(t=a.ctx.animationManager)||void 0===t||t.animateWithThrottle("".concat(a.id,"_waiting-update-ready_").concat(e.id),{from:0,to:1,delay:d,duration:200,throttleId:"".concat(a.id,"_labels"),throttleGroup:k,onUpdate:function(t){e.opacity=t}})}))}))}else s.forEach((function(e){a.resetSelectionRects(e)}))}},{key:"resetSelectionRects",value:function(e){e.each((function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height})),e.cleanup()}},{key:"getDirectionStartingValues",value:function(e){var t=this.getBarDirection()===Qt.Y,n=this.axes[Qt.X],i=this.axes[Qt.Y],r=(null===n||void 0===n?void 0:n.scale)instanceof To,o=(null===i||void 0===i?void 0:i.scale)instanceof To,a=1/0,s=0;return i&&t&&(o?s=i.scale.convert(0):e.forEach((function(e){return e.each((function(e,t){t.yValue>=0&&(s=Math.max(s,t.height+t.y))}))}))),n&&!t&&(r?a=n.scale.convert(0):e.forEach((function(e){return e.each((function(e,t){t.yValue>=0&&(a=Math.min(a,t.x))}))}))),{startingX:a,startingY:s}}},{key:"isLabelEnabled",value:function(){return this.label.enabled}},{key:"getBandScalePadding",value:function(){return{inner:.2,outer:.3}}},{key:"getBarDirection",value:function(){return Qt.X}},{key:"getCategoryDirection",value:function(){return Qt.Y}}]),n}(_l);uu.className="BarSeries",uu.type="bar",ru([vt(Zt)],uu.prototype,"fill",void 0),ru([vt(Zt)],uu.prototype,"stroke",void 0),ru([vt(Bt(0,1))],uu.prototype,"fillOpacity",void 0),ru([vt(Bt(0,1))],uu.prototype,"strokeOpacity",void 0),ru([vt(sn)],uu.prototype,"lineDash",void 0),ru([vt(Bt(0))],uu.prototype,"lineDashOffset",void 0),ru([vt(Rt)],uu.prototype,"formatter",void 0),ru([vt(Pt)],uu.prototype,"xKey",void 0),ru([vt(Pt)],uu.prototype,"xName",void 0),ru([vt(Pt)],uu.prototype,"yKey",void 0),ru([vt(Pt)],uu.prototype,"yName",void 0),ru([vt(Pt)],uu.prototype,"stackGroup",void 0),ru([vt(Wt())],uu.prototype,"normalizedTo",void 0),ru([vt(Bt(0))],uu.prototype,"strokeWidth",void 0);var cu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n,[{key:"getBarDirection",value:function(){return Qt.Y}},{key:"getCategoryDirection",value:function(){return Qt.X}}]),n}(uu);cu.type="column",cu.className="ColumnSeries";var du,hu=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},pu=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))},fu=["count","sum","mean"],vu=gt((function(e){return fu.includes(e)}),"expecting a histogram aggregation keyword such as 'count', 'sum' or 'mean");!function(e){e[e.Bin=0]="Bin",e[e.Label=1]="Label"}(du||(du={}));var gu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).formatter=void 0,e}return(0,f.Z)(n)}(ga);hu([vt(Rt)],gu.prototype,"formatter",void 0);var mu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).renderer=void 0,e}return(0,f.Z)(n)}(Si);hu([vt(Rt)],mu.prototype,"renderer",void 0);var yu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i;return(0,p.Z)(this,n),(i=t.call(this,{moduleCtx:e,pickModes:[ri.EXACT_SHAPE_MATCH]})).label=new gu,i.tooltip=new mu,i.fill=void 0,i.stroke=void 0,i.fillOpacity=1,i.strokeOpacity=1,i.lineDash=[0],i.lineDashOffset=0,i.xKey=void 0,i.areaPlot=!1,i.bins=void 0,i.aggregation="count",i.binCount=void 0,i.xName=void 0,i.yKey=void 0,i.yName=void 0,i.strokeWidth=1,i.shadow=void 0,i.calculatedBins=[],i.datumSelectionGarbageCollection=!1,i.label.enabled=!1,i}return(0,f.Z)(n,[{key:"deriveBins",value:function(e){if(void 0===this.binCount){var t=Po(e[0],e[1],10),n=Mo(e[0],e[1],10),i=t[0];return[[i-n,i]].concat((0,te.Z)(t.map((function(e){return[e,e+n]}))))}return this.calculateNiceBins(e,this.binCount)}},{key:"calculateNiceBins",value:function(e,t){var n=Math.floor(e[0]),i=e[1],r=t||1,o=this.calculateNiceStart(n,i,r),a=o.start,s=o.binSize;return this.getBins(a,i,s,r)}},{key:"getBins",value:function(e,t,n,i){for(var r=[],o=0;o<i;o++){var a=Math.round(10*(e+o*n))/10,s=Math.round(10*(e+(o+1)*n))/10;o===i-1&&(s=Math.max(s,t)),r[o]=[a,s]}return r}},{key:"calculateNiceStart",value:function(e,t,n){var i=Math.abs(t-e)/n,r=Math.floor(Math.log10(i)),o=Math.pow(10,r);return{start:Math.floor(e/o)*o,binSize:i}}},{key:"processData",value:function(e){var t;return pu(this,void 0,void 0,(0,ie.Z)().mark((function n(){var i,r,o,a,s,l,u,c,d,h,p,f,v=this;return(0,ie.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=this.xKey,r=this.yKey,o=this.data,a=this.areaPlot,s=this.aggregation,l=[ui(this,i,!0),Un],r?(u=_n(this,"groupCount"),"count"===s||("sum"===s?(g=void 0,u={id:"groupAgg",scopes:[this.id],type:"aggregate",matchGroupIds:g?[g]:void 0,aggregateFunction:function(e){return Fn(e)},groupAggregateFunction:function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0];return i[0]+=null!==(t=null===e||void 0===e?void 0:e[0])&&void 0!==t?t:0,i[1]+=null!==(n=null===e||void 0===e?void 0:e[1])&&void 0!==n?n:0,i}}):"mean"===s&&(u=Gn(this,"groupAgg"))),a&&(u=Zn(this,"groupAgg",u)),l.push(ci(this,r,!0,{invalidValue:void 0}),u)):(c=_n(this,"groupAgg"),a&&(c=Zn(this,"groupAgg",c)),l.push(c)),d=function(e){var t,n=En(e.domain.keys[0]);if(0===n.length)return e.domain.groups=[],function(){return[]};var i=null!==(t=v.bins)&&void 0!==t?t:v.deriveBins(n),r=i.length;return v.calculatedBins=(0,te.Z)(i),function(e){for(var t=e.keys[0],n=0;n<r;n++){var o=i[n];if(t>=o[0]&&t<o[1])return o;if(n===r-1&&t<=o[1])return o}return[]}},!(null===(t=this.ctx.animationManager)||void 0===t?void 0:t.skipAnimations)&&this.processedData&&l.push($n(this.processedData,!1)),n.next=7,e.request(this.id,null!==o&&void 0!==o?o:[],{props:l,dataVisible:this.visible,groupByFn:d});case 7:h=n.sent,p=h.dataModel,f=h.processedData,this.dataModel=p,this.processedData=f,this.animationState.transition("updateData");case 13:case"end":return n.stop()}var g}),n,this)})))}},{key:"getDomain",value:function(e){var t,n,i,r,o=this.processedData,a=this.dataModel;if(!o||!a)return[];var s=a.getDomain(this,"groupAgg","aggregate",o),l=null===(t=this.calculatedBins)||void 0===t?void 0:t[0][0],u=null===(n=this.calculatedBins)||void 0===n?void 0:n[(null!==(r=null===(i=this.calculatedBins)||void 0===i?void 0:i.length)&&void 0!==r?r:0)-1][1];return e===Qt.X?En([l,u]):En(s)}},{key:"getNodeClickEvent",value:function(e,t){var n,i;return new Ll(null!==(n=this.xKey)&&void 0!==n?n:"",null!==(i=this.yKey)&&void 0!==i?i:"",e,t,this)}},{key:"getNodeDoubleClickEvent",value:function(e,t){var n,i;return new Il(null!==(n=this.xKey)&&void 0!==n?n:"",null!==(i=this.yKey)&&void 0!==i?i:"",e,t,this)}},{key:"createNodeData",value:function(){var e;return pu(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r,o,a,s,l,u,c,d,h,p,f,v,g,m,y,C,k,w,S,b,E,x,R,D=this;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.axes,i=this.processedData,r=this.ctx.callbackCache,o=n[Qt.X],a=n[Qt.Y],this.visible&&o&&a&&i&&"grouped"===i.type){t.next=5;break}return t.abrupt("return",[]);case 5:return s=o.scale,l=a.scale,u=this.fill,c=this.stroke,d=this.strokeWidth,h=this.id,p=this.yKey,f=void 0===p?"":p,v=this.xKey,g=void 0===v?"":v,m=[],y=function(e){return String(e.value)},C=this.label,k=C.formatter,w=void 0===k?y:k,S=C.fontStyle,b=C.fontWeight,E=C.fontSize,x=C.fontFamily,R=C.color,i.data.forEach((function(e){var t,n=e.aggValues;n=void 0===n?[[0,0]]:n;var i=(0,re.Z)(n,1),o=(0,re.Z)(i[0],2),a=o[0],p=o[1],v=e.datum,y=e.datum.length,C=e.keys,k=(0,re.Z)(e.keys,2),T=k[0],O=k[1],P=s.convert(T),A=s.convert(O),M=a+p,N=l.convert(0),L=l.convert(M),I=A-P,F=Math.abs(L-N),_=0!==M?{text:null!==(t=r.call(w,{value:M,seriesId:h}))&&void 0!==t?t:String(M),fontStyle:S,fontWeight:b,fontSize:E,fontFamily:x,fill:R,x:P+I/2,y:L+F/2}:void 0,G={x:P+I/2,y:L+F/2};m.push({series:D,datum:v,aggregatedValue:M,frequency:y,domain:C,yKey:f,xKey:g,x:P,y:L,xValue:P,yValue:L,width:I,height:F,nodeMidPoint:G,fill:u,stroke:c,strokeWidth:d,label:_})})),t.abrupt("return",[{itemId:null!==(e=this.yKey)&&void 0!==e?e:this.id,nodeData:m,labelData:m}]);case 13:case"end":return t.stop()}}),t,this)})))}},{key:"nodeFactory",value:function(){return new ql}},{key:"updateDatumSelection",value:function(e){return pu(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.nodeData,i=e.datumSelection,t.abrupt("return",i.update(n,(function(e){e.tag=du.Bin,e.crisp=!0}),(function(e){return e.domain.join("_")})));case 2:case"end":return t.stop()}}),t)})))}},{key:"updateDatumNodes",value:function(e){return pu(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r,o,a,s,l,u,c,d,h,p=this;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.datumSelection,i=e.isHighlight,r=this.fillOpacity,o=this.strokeOpacity,a=this.shadow,s=this.highlightStyle.item,l=s.fill,u=s.fillOpacity,c=void 0===u?r:u,d=s.stroke,h=s.strokeWidth,n.each((function(e,t,n){var s,u,f=i&&void 0!==h?h:t.strokeWidth,v=i?c:r;e.fill=null!==(s=i?l:void 0)&&void 0!==s?s:t.fill,e.stroke=null!==(u=i?d:void 0)&&void 0!==u?u:t.stroke,e.fillOpacity=v,e.strokeOpacity=o,e.strokeWidth=f,e.lineDash=p.lineDash,e.lineDashOffset=p.lineDashOffset,e.fillShadow=a,e.zIndex=i?Ei.highlightedZIndex:n,e.visible=t.height>0}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"updateLabelSelection",value:function(e){return pu(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.labelData,i=e.labelSelection,t.abrupt("return",i.update(n,(function(e){e.tag=du.Label,e.pointerEvents=ke.None,e.textAlign="center",e.textBaseline="middle"})));case 2:case"end":return t.stop()}}),t)})))}},{key:"updateLabelNodes",value:function(e){return pu(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.labelSelection,i=this.label.enabled,n.each((function(e,t){var n=t.label;n&&i?(e.text=n.text,e.x=n.x,e.y=n.y,e.fontStyle=n.fontStyle,e.fontWeight=n.fontWeight,e.fontSize=n.fontSize,e.fontFamily=n.fontFamily,e.fill=n.fill,e.visible=!0):e.visible=!1}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"getTooltipHtml",value:function(e){var t=this.xKey,n=this.yKey,i=void 0===n?"":n,r=this.axes,o=r[Qt.X],a=r[Qt.Y];if(!t||!o||!a)return"";var s=this.xName,l=this.yName,u=this.fill,c=this.tooltip,d=this.aggregation,h=this.id,p=c.renderer,f=e.aggregatedValue,v=e.frequency,g=e.domain,m=(0,re.Z)(e.domain,2),y=m[0],C=m[1],k="".concat(Bl(null!==s&&void 0!==s?s:t),": ").concat(o.formatDatum(y)," - ").concat(o.formatDatum(C)),w=i?"<b>".concat(Bl(null!==l&&void 0!==l?l:i)," (").concat(d,")</b>: ").concat(a.formatDatum(f),"<br>"):"",S={title:k,backgroundColor:u,content:w+="<b>Frequency</b>: ".concat(v)};return p?An(p({datum:{data:e.datum,aggregatedValue:e.aggregatedValue,domain:e.domain,frequency:e.frequency},xKey:t,xValue:g,xName:s,yKey:i,yValue:f,yName:l,color:u,title:k,seriesId:h}),S):An(S)}},{key:"getLegendData",value:function(){var e,t=this.id,n=this.data,i=this.xKey,r=this.yName,o=this.visible,a=this.fill,s=this.stroke,l=this.fillOpacity,u=this.strokeOpacity;return n&&0!==n.length?[{legendType:"category",id:t,itemId:i,seriesId:t,enabled:o,label:{text:null!==(e=null!==r&&void 0!==r?r:i)&&void 0!==e?e:"Frequency"},marker:{fill:null!==a&&void 0!==a?a:"rgba(0, 0, 0, 0)",stroke:null!==s&&void 0!==s?s:"rgba(0, 0, 0, 0)",fillOpacity:l,strokeOpacity:u}}]:[]}},{key:"animateEmptyUpdateReady",value:function(e){var t,n,i=this,r=e.datumSelections,o=e.labelSelections,a=null!==(n=null===(t=this.ctx.animationManager)||void 0===t?void 0:t.defaultOptions.duration)&&void 0!==n?n:1e3,s=0;r.forEach((function(e){return e.each((function(e,t){s=Math.max(s,t.height+t.y)}))})),r.forEach((function(e){e.each((function(e,t){var n;null===(n=i.ctx.animationManager)||void 0===n||n.animateMany("".concat(i.id,"_empty-update-ready_").concat(e.id),[{from:s,to:t.y},{from:0,to:t.height}],{duration:a,ease:nr,onUpdate:function(n){var i=(0,re.Z)(n,2),r=i[0],o=i[1];e.y=r,e.height=o,e.x=t.x,e.width=t.width}})}))})),o.forEach((function(e){e.each((function(e){var t;null===(t=i.ctx.animationManager)||void 0===t||t.animate("".concat(i.id,"_empty-update-ready_").concat(e.id),{from:0,to:1,delay:a,duration:200,onUpdate:function(t){e.opacity=t}})}))}))}},{key:"animateReadyUpdate",value:function(e){var t=this;e.datumSelections.forEach((function(e){t.resetSelectionRects(e)}))}},{key:"animateReadyHighlight",value:function(e){this.resetSelectionRects(e)}},{key:"animateReadyResize",value:function(e){var t,n=this,i=e.datumSelections;null===(t=this.ctx.animationManager)||void 0===t||t.reset(),i.forEach((function(e){n.resetSelectionRects(e)}))}},{key:"animateWaitingUpdateReady",value:function(e){var t,n,i,r=this,o=e.datumSelections,a=e.labelSelections,s=this.processedData,l=null===(t=null===s||void 0===s?void 0:s.reduced)||void 0===t?void 0:t.diff;if(null===l||void 0===l?void 0:l.changed){var u=null!==(i=null===(n=this.ctx.animationManager)||void 0===n?void 0:n.defaultOptions.duration)&&void 0!==i?i:1e3,c=u;l.added.length>0&&l.removed.length>0?c=Math.floor(u/3):(l.added.length>0||l.removed.length>0)&&(c=Math.floor(u/2));var d=0;o.forEach((function(e){return e.each((function(e,t){d=Math.max(d,t.height+t.y)}))}));var h={};l.added.forEach((function(e){h[e.join("_")]=!0}));var p={};l.removed.forEach((function(e){p[e.join("_")]=!0})),o.forEach((function(e){e.each((function(t,n){var i,o=[{from:t.x,to:n.x},{from:t.width,to:n.width},{from:t.y,to:n.y},{from:t.height,to:n.height}],a=l.removed.length>0?c:0,s=!1,u=n.domain.join("_"),f=d;void 0!==u&&void 0!==h[u]?(o=[{from:n.x,to:n.x},{from:n.width,to:n.width},{from:f,to:n.y},{from:0,to:n.height}],a+=c):void 0!==u&&void 0!==p[u]&&(o=[{from:t.x,to:n.x},{from:t.width,to:n.width},{from:n.y,to:f},{from:n.height,to:0}],a=0,s=!0),null===(i=r.ctx.animationManager)||void 0===i||i.animateMany("".concat(r.id,"_waiting-update-ready_").concat(t.id),o,{disableInteractions:!0,delay:a,duration:c,ease:nr,repeat:0,onUpdate:function(e){var n=(0,re.Z)(e,4),i=n[0],r=n[1],o=n[2],a=n[3];t.x=i,t.width=r,t.y=o,t.height=a},onComplete:function(){s&&e.cleanup()}})}))})),a.forEach((function(e){e.each((function(e){var t;e.opacity=0,null===(t=r.ctx.animationManager)||void 0===t||t.animate("".concat(r.id,"_waiting-update-ready_").concat(e.id),{from:0,to:1,delay:u,duration:200,ease:$i,repeat:0,onUpdate:function(t){e.opacity=t}})}))}))}else o.forEach((function(e){r.resetSelectionRects(e)}))}},{key:"resetSelectionRects",value:function(e){e.each((function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height}))}},{key:"isLabelEnabled",value:function(){return this.label.enabled}}]),n}(_l);yu.className="HistogramSeries",yu.type="histogram",hu([vt(Zt)],yu.prototype,"fill",void 0),hu([vt(Zt)],yu.prototype,"stroke",void 0),hu([vt(Bt(0,1))],yu.prototype,"fillOpacity",void 0),hu([vt(Bt(0,1))],yu.prototype,"strokeOpacity",void 0),hu([vt(sn)],yu.prototype,"lineDash",void 0),hu([vt(Bt(0))],yu.prototype,"lineDashOffset",void 0),hu([vt(Pt)],yu.prototype,"xKey",void 0),hu([vt(Dt)],yu.prototype,"areaPlot",void 0),hu([vt(Ct())],yu.prototype,"bins",void 0),hu([vt(vu)],yu.prototype,"aggregation",void 0),hu([vt(Wt(0))],yu.prototype,"binCount",void 0),hu([vt(Pt)],yu.prototype,"xName",void 0),hu([vt(Pt)],yu.prototype,"yKey",void 0),hu([vt(Pt)],yu.prototype,"yName",void 0),hu([vt(Bt(0))],yu.prototype,"strokeWidth",void 0);var Cu=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},ku=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))},wu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).formatter=void 0,e}return(0,f.Z)(n)}(ga);Cu([vt(Rt)],wu.prototype,"formatter",void 0);var Su=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).renderer=void 0,e.format=void 0,e}return(0,f.Z)(n)}(Si);Cu([vt(Rt)],Su.prototype,"renderer",void 0),Cu([vt(Pt)],Su.prototype,"format",void 0);var bu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i;(0,p.Z)(this,n),(i=t.call(this,{moduleCtx:e,hasMarkers:!0,pickModes:[ri.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST,ri.NEAREST_NODE,ri.EXACT_SHAPE_MATCH]})).marker=new Gl,i.label=new wu,i.title=void 0,i.stroke="#874349",i.lineDash=[0],i.lineDashOffset=0,i.strokeWidth=2,i.strokeOpacity=1,i.tooltip=new Su,i.xKey=void 0,i.xName=void 0,i.yKey=void 0,i.yName=void 0;var r=(0,le.Z)(i),o=r.marker,a=r.label;return o.fill="#c16068",o.stroke="#874349",a.enabled=!1,i}return(0,f.Z)(n,[{key:"processData",value:function(e){return ku(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r,o,a,s,l,u,c,d,h,p,f;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.axes,i=this.xKey,r=void 0===i?"":i,o=this.yKey,a=void 0===o?"":o,s=r&&a&&this.data?this.data:[],l=n[Qt.X],u=n[Qt.Y],c=(null===l||void 0===l?void 0:l.scale)instanceof To,d=(null===u||void 0===u?void 0:u.scale)instanceof To,t.next=8,e.request(this.id,null!==s&&void 0!==s?s:[],{props:[ci(this,r,c,{id:"xValue"}),ci(this,a,d,{id:"yValue",invalidValue:void 0})],dataVisible:this.visible});case 8:h=t.sent,p=h.dataModel,f=h.processedData,this.dataModel=p,this.processedData=f;case 13:case"end":return t.stop()}}),t,this)})))}},{key:"getDomain",value:function(e){var t=this.axes,n=this.dataModel,i=this.processedData;if(!i||!n)return[];var r=t[Qt.X],o=t[Qt.Y],a=n.resolveProcessedDataDefById(this,"xValue");if(e===Qt.X){var s=n.getDomain(this,"xValue","value",i);return"value"===(null===a||void 0===a?void 0:a.def.type)&&"category"===a.def.valueType?s:this.fixNumericExtent(pa(s),r)}var l=n.getDomain(this,"yValue","value",i);return this.fixNumericExtent(l,o)}},{key:"createNodeData",value:function(){var e,t,n,i,r;return ku(this,void 0,void 0,(0,ie.Z)().mark((function o(){var a,s,l,u,c,d,h,p,f,v,g,m,y,C,k,w,S,b,E,x,R,D,T,O,P,A,M,N,L,I,F,_,G,Z,V,H,B,W,z,U,j;return(0,ie.Z)().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(a=this.processedData,s=this.dataModel,l=this.axes,u=this.marker,c=u.enabled,d=u.size,h=u.strokeWidth,p=this.ctx.callbackCache,f=l[Qt.X],v=l[Qt.Y],a&&s&&f&&v){o.next=5;break}return o.abrupt("return",[]);case 5:g=this.label,m=this.yKey,y=void 0===m?"":m,C=this.xKey,k=void 0===C?"":C,w=this.id,S=f.scale,b=v.scale,E=(null!==(e=S.bandwidth)&&void 0!==e?e:0)/2,x=(null!==(t=b.bandwidth)&&void 0!==t?t:0)/2,R=new Array(a.data.length),D=c?d:0,T=s.resolveProcessedDataIndexById(this,"xValue").index,O=s.resolveProcessedDataIndexById(this,"yValue").index,P=!0,A=void 0,M=void 0,N=0,L=0;case 19:if(!(L<a.data.length)){o.next=55;break}if(I=null!==M&&void 0!==M?M:a.data[L],F=I.datum,_=I.values,G=_[T],void 0!==(Z=_[O])){o.next=28;break}A=void 0,P=!0,o.next=52;break;case 28:if(V=S.convert(G)+E,!isNaN(V)){o.next=34;break}return A=void 0,P=!0,M=void 0,o.abrupt("continue",52);case 34:if(H=(null!==(n=S.bandwidth)&&void 0!==n?n:.5*d+(null!==h&&void 0!==h?h:0))+1,M=void 0===(null===(i=a.data[L+1])||void 0===i?void 0:i.values[O])?void 0:a.data[L+1],B=null===(r=a.data[L+1])||void 0===r?void 0:r.values[T],W=f.inRangeEx(V,0,H),z=M&&f.inRangeEx(S.convert(B)+E,0,H),-1!==W||-1!==z){o.next=42;break}return P=!0,o.abrupt("continue",52);case 42:if(1!==W||1!==A){o.next=45;break}return P=!0,o.abrupt("continue",52);case 45:A=W,U=b.convert(Z)+x,j=void 0,g.formatter&&(j=p.call(g.formatter,{value:Z,seriesId:w})),void 0!==j||("number"===typeof Z&&isFinite(Z)?j=Z.toFixed(2):Z&&(j=String(Z))),R[N++]={series:this,datum:F,yKey:y,xKey:k,point:{x:V,y:U,moveTo:P,size:D},nodeMidPoint:{x:V,y:U},yValue:Z,xValue:G,label:j?{text:j,fontStyle:g.fontStyle,fontWeight:g.fontWeight,fontSize:g.fontSize,fontFamily:g.fontFamily,textAlign:"center",textBaseline:"bottom",fill:g.color}:void 0},P=!1;case 52:L++,o.next=19;break;case 55:return R.length=N,o.abrupt("return",[{itemId:y,nodeData:R,labelData:R}]);case 57:case"end":return o.stop()}}),o,this)})))}},{key:"isPathOrSelectionDirty",value:function(){return this.marker.isDirty()}},{key:"markerFactory",value:function(){return new(Kr(this.marker.shape))}},{key:"updateMarkerSelection",value:function(e){return ku(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r,o,a;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.nodeData,i=e.markerSelection,r=this.marker,o=r.shape,a=r.enabled,n=o&&a?n:[],this.marker.isDirty()&&i.clear(),t.abrupt("return",i.update(n));case 6:case"end":return t.stop()}}),t,this)})))}},{key:"updateMarkerNodes",value:function(e){var t;return ku(this,void 0,void 0,(0,ie.Z)().mark((function n(){var i,r,o,a,s,l,u,c,d,h,p,f,v,g,m,y,C,k,w,S,b,E;return(0,ie.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=e.markerSelection,r=e.isHighlight,o=this.marker,a=this.marker.fillOpacity,s=this.xKey,l=void 0===s?"":s,u=this.yKey,c=void 0===u?"":u,d=this.stroke,h=this.strokeOpacity,p=this.highlightStyle.item,f=p.fill,v=p.fillOpacity,g=void 0===v?a:v,m=p.stroke,y=p.strokeWidth,C=this.id,k=this.ctx.callbackCache,w=o.size,S=o.formatter,b=null!==(t=o.strokeWidth)&&void 0!==t?t:this.strokeWidth,E="function"===typeof o.shape,i.each((function(e,t){var n,i,s,u,p,v,x,R=r&&void 0!==f?f:o.fill,D=r?g:a,T=r&&void 0!==m?m:null!==(n=o.stroke)&&void 0!==n?n:d,O=r&&void 0!==y?y:b,P=void 0;S&&(P=k.call(S,{datum:t.datum,xKey:l,yKey:c,fill:R,stroke:T,strokeWidth:O,size:w,highlighted:r,seriesId:C})),e.fill=null!==(i=null===P||void 0===P?void 0:P.fill)&&void 0!==i?i:R,e.stroke=null!==(s=null===P||void 0===P?void 0:P.stroke)&&void 0!==s?s:T,e.strokeWidth=null!==(u=null===P||void 0===P?void 0:P.strokeWidth)&&void 0!==u?u:O,e.fillOpacity=null!==D&&void 0!==D?D:1,e.strokeOpacity=null!==(v=null!==(p=o.strokeOpacity)&&void 0!==p?p:h)&&void 0!==v?v:1,e.size=null!==(x=null===P||void 0===P?void 0:P.size)&&void 0!==x?x:w,e.translationX=t.point.x,e.translationY=t.point.y,e.visible=e.size>0&&!isNaN(t.point.x)&&!isNaN(t.point.y),E&&!e.dirtyPath&&(e.path.clear({trackChanges:!0}),e.updatePath(),e.checkPathDirty())})),r||this.marker.markClean();case 7:case"end":return n.stop()}}),n,this)})))}},{key:"updateLabelSelection",value:function(e){return ku(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r,o,a;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.labelData,i=e.labelSelection,r=this.marker,o=r.shape,a=r.enabled,n=o&&a?n:[],t.abrupt("return",i.update(n));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"updateLabelNodes",value:function(e){return ku(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r,o,a,s,l,u;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.labelSelection,i=this.label,r=i.enabled,o=i.fontStyle,a=i.fontWeight,s=i.fontSize,l=i.fontFamily,u=i.color,n.each((function(e,t){var n=t.point,i=t.label;t&&i&&r?(e.fontStyle=o,e.fontWeight=a,e.fontSize=s,e.fontFamily=l,e.textAlign=i.textAlign,e.textBaseline=i.textBaseline,e.text=i.text,e.x=n.x,e.y=n.y-10,e.fill=u,e.visible=!0):e.visible=!1}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"getNodeClickEvent",value:function(e,t){var n,i;return new Ll(null!==(n=this.xKey)&&void 0!==n?n:"",null!==(i=this.yKey)&&void 0!==i?i:"",e,t,this)}},{key:"getNodeDoubleClickEvent",value:function(e,t){var n,i;return new Il(null!==(n=this.xKey)&&void 0!==n?n:"",null!==(i=this.yKey)&&void 0!==i?i:"",e,t,this)}},{key:"getTooltipHtml",value:function(e){var t,n,i=this.xKey,r=this.yKey,o=this.axes,a=o[Qt.X],s=o[Qt.Y];if(!i||!r||!a||!s)return"";var l=this.xName,u=this.yName,c=this.tooltip,d=this.marker,h=this.id,p=c.renderer,f=c.format,v=e.datum,g=e.xValue,m=e.yValue,y=a.formatDatum(g),C=s.formatDatum(m),k=Bl(null!==(t=this.title)&&void 0!==t?t:u),w=Bl(y+": "+C),S=d.formatter,b=d.fill,E=d.stroke,x=d.strokeWidth,R=d.size,D=null!==x&&void 0!==x?x:this.strokeWidth,T=void 0;S&&(T=S({datum:v,xKey:i,yKey:r,fill:b,stroke:E,strokeWidth:D,size:R,highlighted:!1,seriesId:h}));var O=null!==(n=null===T||void 0===T?void 0:T.fill)&&void 0!==n?n:b,P={title:k,backgroundColor:O,content:w};if(f||p){var A={datum:v,xKey:i,xValue:g,xName:l,yKey:r,yValue:m,yName:u,title:k,color:O,seriesId:h};if(f)return An({content:Vl(f,A)},P);if(p)return An(p(A),P)}return An(P)}},{key:"getLegendData",value:function(){var e,t,n,i,r,o,a,s=this.id,l=this.data,u=this.xKey,c=this.yKey,d=this.yName,h=this.visible,p=this.title,f=this.marker,v=this.stroke,g=this.strokeOpacity;return(null===l||void 0===l?void 0:l.length)&&u&&c?[{legendType:"category",id:s,itemId:c,seriesId:s,enabled:h,label:{text:null!==(e=null!==p&&void 0!==p?p:d)&&void 0!==e?e:c},marker:{shape:f.shape,fill:null!==(t=f.fill)&&void 0!==t?t:"rgba(0, 0, 0, 0)",stroke:null!==(i=null!==(n=f.stroke)&&void 0!==n?n:v)&&void 0!==i?i:"rgba(0, 0, 0, 0)",fillOpacity:null!==(r=f.fillOpacity)&&void 0!==r?r:1,strokeOpacity:null!==(a=null!==(o=f.strokeOpacity)&&void 0!==o?o:g)&&void 0!==a?a:1}}]:[]}},{key:"animateEmptyUpdateReady",value:function(e){var t=this,n=e.markerSelections,i=e.labelSelections,r=e.contextData,o=e.paths;r.forEach((function(e,r){var a,s,l,u=e.nodeData,c=(0,re.Z)(o[r],1)[0],d=c.path,h=[0],p=u.reduce((function(e,t,n){if(0===n)return e;var i=u[n-1];if(isNaN(t.point.x)||isNaN(t.point.y)||isNaN(i.point.x)||isNaN(i.point.y))return h.push(e),e;var r=Math.sqrt(Math.pow(t.point.x-i.point.x,2)+Math.pow(t.point.y-i.point.y,2));return h.push(e+r),e+r}),0);c.fill=void 0,c.lineJoin="round",c.pointerEvents=ke.None,c.stroke=t.stroke,c.strokeWidth=t.getStrokeWidth(t.strokeWidth),c.strokeOpacity=t.strokeOpacity,c.lineDash=t.lineDash,c.lineDashOffset=t.lineDashOffset;var f=null!==(s=null===(a=t.ctx.animationManager)||void 0===a?void 0:a.defaultOptions.duration)&&void 0!==s?s:1e3,v={from:0,to:p};null===(l=t.ctx.animationManager)||void 0===l||l.animate("".concat(t.id,"_empty-update-ready"),Object.assign(Object.assign({},v),{duration:f,onUpdate:function(e){d.clear({trackChanges:!0}),u.forEach((function(t,n){if(h[n]<=e)t.point.moveTo?d.moveTo(t.point.x,t.point.y):d.lineTo(t.point.x,t.point.y);else if(n>0&&h[n-1]<e){var i=u[n-1].point,r=t.point,o=h[n]-h[n-1],a=(o-(h[n]-e))/o,s=(1-a)*i.x+a*r.x,l=(1-a)*i.y+a*r.y;t.point.moveTo?d.moveTo(s,l):d.lineTo(s,l)}})),c.checkPathDirty()}})),n[r].each((function(e,n,i){var r,o,a,s,l=p>0?h[i]/p*f:0,u=t.animateFormatter(n),c=null!==(o=null===(r=n.point)||void 0===r?void 0:r.size)&&void 0!==o?o:0;null===(a=t.ctx.animationManager)||void 0===a||a.animate("".concat(t.id,"_empty-update-ready_").concat(e.id),Object.assign(Object.assign({},v),{to:null!==(s=null===u||void 0===u?void 0:u.size)&&void 0!==s?s:c,delay:l,duration:200,onUpdate:function(t){e.size=t}}))})),i[r].each((function(e,n,i){var r,o=h[i]/p*f;null===(r=t.ctx.animationManager)||void 0===r||r.animate("".concat(t.id,"_empty-update-ready_").concat(e.id),{from:0,to:1,delay:o,duration:200,onUpdate:function(t){e.opacity=t}})}))}))}},{key:"animateReadyUpdate",value:function(e){this.resetMarkersAndPaths(e)}},{key:"animateReadyResize",value:function(e){var t;null===(t=this.ctx.animationManager)||void 0===t||t.reset(),this.resetMarkersAndPaths(e)}},{key:"resetMarkersAndPaths",value:function(e){var t=this,n=e.markerSelections,i=e.contextData,r=e.paths;i.forEach((function(e,i){var o=e.nodeData,a=(0,re.Z)(r[i],1)[0],s=a.path;a.stroke=t.stroke,a.strokeWidth=t.getStrokeWidth(t.strokeWidth),a.strokeOpacity=t.strokeOpacity,a.lineDash=t.lineDash,a.lineDashOffset=t.lineDashOffset,s.clear({trackChanges:!0}),o.forEach((function(e){e.point.moveTo?s.moveTo(e.point.x,e.point.y):s.lineTo(e.point.x,e.point.y)})),a.checkPathDirty(),n[i].each((function(e,n){var i,r,o,a=t.animateFormatter(n),s=null!==(r=null===(i=n.point)||void 0===i?void 0:i.size)&&void 0!==r?r:0;e.size=null!==(o=null===a||void 0===a?void 0:a.size)&&void 0!==o?o:s}))}))}},{key:"animateFormatter",value:function(e){var t,n,i=this.marker,r=this.xKey,o=void 0===r?"":r,a=this.yKey,s=void 0===a?"":a,l=this.stroke,u=this.id,c=this.ctx.callbackCache,d=i.size,h=i.formatter,p=i.fill,f=null!==(t=i.stroke)&&void 0!==t?t:l,v=null!==(n=i.strokeWidth)&&void 0!==n?n:this.strokeWidth,g=void 0;return h&&(g=c.call(h,{datum:e.datum,xKey:o,yKey:s,fill:p,stroke:f,strokeWidth:v,size:d,highlighted:!1,seriesId:u})),g}},{key:"isLabelEnabled",value:function(){return this.label.enabled}}]),n}(_l);bu.className="LineSeries",bu.type="line",Cu([vt(Pt)],bu.prototype,"title",void 0),Cu([vt(Zt)],bu.prototype,"stroke",void 0),Cu([vt(sn)],bu.prototype,"lineDash",void 0),Cu([vt(Bt(0))],bu.prototype,"lineDashOffset",void 0),Cu([vt(Bt(0))],bu.prototype,"strokeWidth",void 0),Cu([vt(Bt(0,1))],bu.prototype,"strokeOpacity",void 0),Cu([vt(Pt)],bu.prototype,"xKey",void 0),Cu([vt(Pt)],bu.prototype,"xName",void 0),Cu([vt(Pt)],bu.prototype,"yKey",void 0),Cu([vt(Pt)],bu.prototype,"yName",void 0);var Eu=function(){function e(){(0,p.Z)(this,e),this.domain=[0,1],this.range=["red","blue"],this.parsedRange=this.range.map((function(e){return dt.fromString(e)}))}return(0,f.Z)(e,[{key:"update",value:function(){var e=this.domain,t=this.range;e.length<2&&(Oe.warnOnce("`colorDomain` should have at least 2 values."),0===e.length?e.push(0,1):1===e.length&&e.push(e[0]+1));for(var n=1;n<e.length;n++){if(e[n-1]>=e[n]){Oe.warnOnce("`colorDomain` values should be supplied in ascending order."),e.sort((function(e,t){return e-t}));break}}var i=t.length<e.length;if(i||e.length>2&&t.length>e.length)if(Oe.warnOnce("Number of elements in `colorRange` needs to match the number of elements in `colorDomain`."),i)for(var r=t.length;r<e.length;r++)t.push("black");else t.splice(e.length);this.parsedRange=this.range.map((function(e){return dt.fromString(e)}))}},{key:"convert",value:function(e){var t,n,i=this.domain,r=this.range,o=this.parsedRange,a=i[0],s=i[i.length-1],l=r[0],u=r[r.length-1];if(e<=a)return l;if(e>=s)return u;if(2===i.length){var c=(e-a)/(s-a),d=1/(r.length-1);n=(c-(t=r.length<=2?0:Math.min(Math.floor(c*(r.length-1)),r.length-2))*d)/d}else{for(t=0;t<i.length-2&&!(e<i[t+1]);t++);var h=i[t];n=(e-h)/(i[t+1]-h)}return qi(o[t],o[t+1])(n)}}]),e}(),xu=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Ru=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))},Du=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).formatter=void 0,e}return(0,f.Z)(n)}(ga);xu([vt(Rt)],Du.prototype,"formatter",void 0);var Tu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e,i,r,o,a,s){var l;return(0,p.Z)(this,n),(l=t.call(this,i,r,o,a,s)).sizeKey=e,l}return(0,f.Z)(n)}(Nl),Ou=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).type="nodeClick",e}return(0,f.Z)(n)}(Tu),Pu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).type="nodeDoubleClick",e}return(0,f.Z)(n)}(Tu),Au=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).renderer=void 0,e}return(0,f.Z)(n)}(Si);xu([vt(Rt)],Au.prototype,"renderer",void 0);var Mu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i;return(0,p.Z)(this,n),(i=t.call(this,{moduleCtx:e,pickModes:[ri.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST,ri.NEAREST_NODE,ri.EXACT_SHAPE_MATCH],pathsPerSeries:0,hasMarkers:!0})).sizeScale=new Wa,i.marker=new Gl,i.label=new Du,i.title=void 0,i.labelKey=void 0,i.xName=void 0,i.yName=void 0,i.sizeName="Size",i.labelName="Label",i.xKey=void 0,i.yKey=void 0,i.sizeKey=void 0,i.colorKey=void 0,i.colorName="Color",i.colorDomain=void 0,i.colorRange=["#ffff00","#00ff00","#0000ff"],i.colorScale=new Eu,i.tooltip=new Au,(0,le.Z)(i).label.enabled=!1,i}return(0,f.Z)(n,[{key:"processData",value:function(e){var t,n;return Ru(this,void 0,void 0,(0,ie.Z)().mark((function i(){var r,o,a,s,l,u,c,d,h,p,f,v,g,m,y,C,k,w,S,b,E,x,R;return(0,ie.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return r=this.xKey,o=void 0===r?"":r,a=this.yKey,s=void 0===a?"":a,l=this.sizeKey,u=this.labelKey,c=this.axes,d=this.marker,h=this.data,p=c[Qt.X],f=c[Qt.Y],v=(null===p||void 0===p?void 0:p.scale)instanceof To,g=(null===f||void 0===f?void 0:f.scale)instanceof To,m=this.colorScale,y=this.colorDomain,C=this.colorRange,k=this.colorKey,i.next=8,e.request(this.id,null!==h&&void 0!==h?h:[],{props:[ci(this,o,v,{id:"xValue"}),ci(this,s,g,{id:"yValue"})].concat((0,te.Z)(l?[ci(this,l,!0,{id:"sizeValue"})]:[]),(0,te.Z)(k?[ci(this,k,!0,{id:"colorValue"})]:[]),(0,te.Z)(u?[ci(this,u,!1,{id:"labelValue"})]:[])),dataVisible:this.visible});case 8:w=i.sent,S=w.dataModel,b=w.processedData,this.dataModel=S,this.processedData=b,l&&(E=S.resolveProcessedDataIndexById(this,"sizeValue").index,x=null!==(t=b.domain.values[E])&&void 0!==t?t:[],this.sizeScale.domain=d.domain?d.domain:x),k&&(R=S.resolveProcessedDataIndexById(this,"colorValue").index,m.domain=null!==(n=null!==y&&void 0!==y?y:b.domain.values[R])&&void 0!==n?n:[],m.range=C,m.update());case 15:case"end":return i.stop()}}),i,this)})))}},{key:"getDomain",value:function(e){var t=this.dataModel,n=this.processedData;if(!n||!t)return[];var i=e===Qt.X?"xValue":"yValue",r=t.resolveProcessedDataDefById(this,i,"value"),o=t.getDomain(this,i,"value",n);if("value"===(null===r||void 0===r?void 0:r.def.type)&&"category"===(null===r||void 0===r?void 0:r.def.valueType))return o;var a=this.axes[e];return this.fixNumericExtent(pa(o),a)}},{key:"getNodeClickEvent",value:function(e,t){var n,i;return new Ou(this.sizeKey,null!==(n=this.xKey)&&void 0!==n?n:"",null!==(i=this.yKey)&&void 0!==i?i:"",e,t,this)}},{key:"getNodeDoubleClickEvent",value:function(e,t){var n,i;return new Pu(this.sizeKey,null!==(n=this.xKey)&&void 0!==n?n:"",null!==(i=this.yKey)&&void 0!==i?i:"",e,t,this)}},{key:"createNodeData",value:function(){var e,t,n,i,r,o;return Ru(this,void 0,void 0,(0,ie.Z)().mark((function a(){var s,l,u,c,d,h,p,f,v,g,m,y,C,k,w,S,b,E,x,R,D,T,O,P,A,M,N,L,I,F,_,G,Z,V,H,B,W,z,U,j,K,Y,X,q;return(0,ie.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(s=this.visible,l=this.axes,u=this.yKey,c=void 0===u?"":u,d=this.xKey,h=void 0===d?"":d,p=this.label,f=this.labelKey,v=this.ctx.callbackCache,g=this.dataModel,m=this.processedData,y=l[Qt.X],C=l[Qt.Y],g&&m&&s&&y&&C){a.next=5;break}return a.abrupt("return",[]);case 5:k=g.resolveProcessedDataIndexById(this,"xValue").index,w=g.resolveProcessedDataIndexById(this,"yValue").index,S=this.sizeKey?g.resolveProcessedDataIndexById(this,"sizeValue").index:-1,b=this.colorKey?g.resolveProcessedDataIndexById(this,"colorValue").index:-1,E=this.labelKey?g.resolveProcessedDataIndexById(this,"labelValue").index:-1,x=this.colorScale,R=this.sizeKey,D=this.colorKey,T=this.id,O=y.scale,P=C.scale,A=(null!==(e=O.bandwidth)&&void 0!==e?e:0)/2,M=(null!==(t=P.bandwidth)&&void 0!==t?t:0)/2,N=this.sizeScale,L=this.marker,I=new Array(null!==(i=null===(n=this.processedData)||void 0===n?void 0:n.data.length)&&void 0!==i?i:0),N.range=[L.size,L.maxSize],F=p.getFont(),_=0,G=(0,ne.Z)(null!==(r=m.data)&&void 0!==r?r:[]),a.prev=21,G.s();case 23:if((Z=G.n()).done){a.next=40;break}if(V=Z.value,H=V.values,B=V.datum,W=H[k],z=H[w],U=O.convert(W)+A,j=P.convert(z)+M,this.checkRangeXY(U,j,y,C)){a.next=31;break}return a.abrupt("continue",38);case 31:K=void 0,p.formatter&&(K=v.call(p.formatter,{value:z,seriesId:T,datum:B})),void 0===K&&(K=f?String(H[E]):""),Y=de.getTextSize(K,F),X=R?N.convert(H[S]):L.size,q=D?x.convert(H[b]):void 0,I[_++]={series:this,itemId:c,yKey:c,xKey:h,datum:B,xValue:W,yValue:z,sizeValue:H[S],point:{x:U,y:j,size:X},nodeMidPoint:{x:U,y:j},fill:q,label:Object.assign({text:K},Y)};case 38:a.next=23;break;case 40:a.next=45;break;case 42:a.prev=42,a.t0=a.catch(21),G.e(a.t0);case 45:return a.prev=45,G.f(),a.finish(45);case 48:return I.length=_,a.abrupt("return",[{itemId:null!==(o=this.yKey)&&void 0!==o?o:this.id,nodeData:I,labelData:I}]);case 50:case"end":return a.stop()}}),a,this,[[21,42,45,48]])})))}},{key:"isPathOrSelectionDirty",value:function(){return this.marker.isDirty()}},{key:"getLabelData",value:function(){var e;return null===(e=this.contextNodeData)||void 0===e?void 0:e.reduce((function(e,t){return e.concat(t.labelData)}),[])}},{key:"markerFactory",value:function(){return new(Kr(this.marker.shape))}},{key:"updateMarkerSelection",value:function(e){return Ru(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r,o;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.nodeData,i=e.markerSelection,r=this.marker.enabled,this.marker.isDirty()&&i.clear(),o=r?n:[],t.abrupt("return",i.update(o));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"updateMarkerNodes",value:function(e){return Ru(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i,r,o,a,s,l,u,c,d,h,p,f,v,g,m,y,C,k,w,S,b;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.markerSelection,i=e.isHighlight,r=this.marker,o=this.xKey,a=void 0===o?"":o,s=this.yKey,l=void 0===s?"":s,u=this.sizeScale,c=this.marker,d=c.fillOpacity,h=c.strokeOpacity,p=c.strokeWidth,f=this.highlightStyle.item,v=f.fill,g=f.fillOpacity,m=void 0===g?d:g,y=f.stroke,C=f.strokeWidth,k=this.id,w=this.ctx.callbackCache,S=r.formatter,u.range=[r.size,r.maxSize],b="function"===typeof r.shape,n.each((function(e,t){var n,o,s,u,c,f,g,E,x,R,D=i&&void 0!==v?v:null!==(n=t.fill)&&void 0!==n?n:r.fill,T=i?m:d,O=i&&void 0!==y?y:r.stroke,P=h,A=i&&void 0!==C?C:null!==p&&void 0!==p?p:1,M=null!==(s=null===(o=t.point)||void 0===o?void 0:o.size)&&void 0!==s?s:0,N=void 0;S&&(N=w.call(S,{datum:t.datum,xKey:a,yKey:l,fill:D,stroke:O,strokeWidth:A,size:M,highlighted:i,seriesId:k})),e.fill=null!==(u=null===N||void 0===N?void 0:N.fill)&&void 0!==u?u:D,e.stroke=null!==(c=null===N||void 0===N?void 0:N.stroke)&&void 0!==c?c:O,e.strokeWidth=null!==(f=null===N||void 0===N?void 0:N.strokeWidth)&&void 0!==f?f:A,e.fillOpacity=null!==T&&void 0!==T?T:1,e.strokeOpacity=null!==P&&void 0!==P?P:1,e.translationX=null!==(E=null===(g=t.point)||void 0===g?void 0:g.x)&&void 0!==E?E:0,e.translationY=null!==(R=null===(x=t.point)||void 0===x?void 0:x.y)&&void 0!==R?R:0,e.visible=e.size>0,b&&!e.dirtyPath&&(e.path.clear({trackChanges:!0}),e.updatePath(),e.checkPathDirty())})),i||this.marker.markClean();case 7:case"end":return t.stop()}}),t,this)})))}},{key:"updateLabelSelection",value:function(e){var t,n;return Ru(this,void 0,void 0,(0,ie.Z)().mark((function i(){var r,o,a,s;return(0,ie.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return r=e.labelSelection,o=this.label.enabled,a=o&&null!==(n=null===(t=this.chart)||void 0===t?void 0:t.placeLabels().get(this))&&void 0!==n?n:[],s=a.map((function(e){return Object.assign(Object.assign({},e.datum),{point:{x:e.x,y:e.y,size:e.datum.point.size}})})),i.abrupt("return",r.update(s));case 5:case"end":return i.stop()}}),i,this)})))}},{key:"updateLabelNodes",value:function(e){return Ru(this,void 0,void 0,(0,ie.Z)().mark((function t(){var n,i;return(0,ie.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.labelSelection,i=this.label,n.each((function(e,t){var n,r,o,a;e.text=t.label.text,e.fill=i.color,e.x=null!==(r=null===(n=t.point)||void 0===n?void 0:n.x)&&void 0!==r?r:0,e.y=null!==(a=null===(o=t.point)||void 0===o?void 0:o.y)&&void 0!==a?a:0,e.fontStyle=i.fontStyle,e.fontWeight=i.fontWeight,e.fontSize=i.fontSize,e.fontFamily=i.fontFamily,e.textAlign="left",e.textBaseline="top"}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"getTooltipHtml",value:function(e){var t,n,i,r,o,a,s,l=this.xKey,u=this.yKey,c=this.axes,d=c[Qt.X],h=c[Qt.Y];if(!l||!u||!d||!h)return"";var p=this.marker,f=this.tooltip,v=this.xName,g=this.yName,m=this.sizeKey,y=this.sizeName,C=this.labelKey,k=this.labelName,w=this.id,S=this.ctx.callbackCache,b=p.stroke,E=null!==(t=e.fill)&&void 0!==t?t:p.fill,x=this.getStrokeWidth(null!==(n=p.strokeWidth)&&void 0!==n?n:1),R=this.marker.formatter,D=void 0;R&&(D=S.call(R,{datum:e,xKey:l,yKey:u,fill:E,stroke:b,strokeWidth:x,size:null!==(r=null===(i=e.point)||void 0===i?void 0:i.size)&&void 0!==r?r:0,highlighted:!1,seriesId:w}));var T=null!==(a=null!==(o=null===D||void 0===D?void 0:D.fill)&&void 0!==o?o:E)&&void 0!==a?a:"gray",O=null!==(s=this.title)&&void 0!==s?s:g,P=e.datum,A=e.xValue,M=e.yValue,N=e.sizeValue,L=e.label.text,I=Bl(d.formatDatum(A)),F=Bl(h.formatDatum(M)),_="<b>".concat(Bl(null!==v&&void 0!==v?v:l),"</b>: ").concat(I,"<br>")+"<b>".concat(Bl(null!==g&&void 0!==g?g:u),"</b>: ").concat(F);m&&(_+="<br><b>".concat(Bl(null!==y&&void 0!==y?y:m),"</b>: ").concat(Bl(N))),C&&(_="<b>".concat(Bl(null!==k&&void 0!==k?k:C),"</b>: ").concat(Bl(L),"<br>")+_);var G={title:O,backgroundColor:T,content:_},Z=f.renderer;return Z?An(Z({datum:P,xKey:l,xValue:A,xName:v,yKey:u,yValue:M,yName:g,sizeKey:m,sizeName:y,labelKey:C,labelName:k,title:O,color:T,seriesId:w}),G):An(G)}},{key:"getLegendData",value:function(){var e,t,n,i,r,o=this.id,a=this.data,s=this.xKey,l=this.yKey,u=this.yName,c=this.title,d=this.visible,h=this.marker,p=h.fill,f=h.stroke,v=h.fillOpacity,g=h.strokeOpacity;return(null===a||void 0===a?void 0:a.length)&&s&&l?[{legendType:"category",id:o,itemId:l,seriesId:o,enabled:d,label:{text:null!==(e=null!==c&&void 0!==c?c:u)&&void 0!==e?e:l},marker:{shape:h.shape,fill:null!==(n=null!==(t=h.fill)&&void 0!==t?t:p)&&void 0!==n?n:"rgba(0, 0, 0, 0)",stroke:null!==(r=null!==(i=h.stroke)&&void 0!==i?i:f)&&void 0!==r?r:"rgba(0, 0, 0, 0)",fillOpacity:null!==v&&void 0!==v?v:1,strokeOpacity:null!==g&&void 0!==g?g:1}}]:[]}},{key:"animateEmptyUpdateReady",value:function(e){var t,n,i=this,r=e.markerSelections,o=e.labelSelections,a=null!==(n=null===(t=this.ctx.animationManager)||void 0===t?void 0:t.defaultOptions.duration)&&void 0!==n?n:1e3;r.forEach((function(e){e.each((function(e,t){var n,r,o,s,l=i.animateFormatter(e,t),u=null!==(r=null===(n=t.point)||void 0===n?void 0:n.size)&&void 0!==r?r:0,c=null!==(o=null===l||void 0===l?void 0:l.size)&&void 0!==o?o:u;null===(s=i.ctx.animationManager)||void 0===s||s.animate("".concat(i.id,"_empty-update-ready_").concat(e.id),{from:0,to:c,duration:a,onUpdate:function(t){e.size=t}})}))})),o.forEach((function(e){e.each((function(e){var t;null===(t=i.ctx.animationManager)||void 0===t||t.animate("".concat(i.id,"_empty-update-ready_").concat(e.id),{from:0,to:1,delay:a,duration:200,onUpdate:function(t){e.opacity=t}})}))}))}},{key:"animateReadyUpdate",value:function(e){var t=this;e.markerSelections.forEach((function(e){t.resetMarkers(e)}))}},{key:"animateReadyHighlightMarkers",value:function(e){this.resetMarkers(e)}},{key:"resetMarkers",value:function(e){var t=this;e.each((function(e,n){var i,r,o,a=t.animateFormatter(e,n),s=null!==(r=null===(i=n.point)||void 0===i?void 0:i.size)&&void 0!==r?r:0;e.size=null!==(o=null===a||void 0===a?void 0:a.size)&&void 0!==o?o:s}))}},{key:"animateFormatter",value:function(e,t){var n,i,r,o=this.xKey,a=void 0===o?"":o,s=this.yKey,l=void 0===s?"":s,u=this.marker.strokeWidth,c=this.id,d=this.ctx.callbackCache,h=this.marker.formatter,p=null!==(n=t.fill)&&void 0!==n?n:e.fill,f=e.stroke,v=null!==u&&void 0!==u?u:1,g=null!==(r=null===(i=t.point)||void 0===i?void 0:i.size)&&void 0!==r?r:0,m=void 0;return h&&(m=d.call(h,{datum:t.datum,xKey:a,yKey:l,fill:p,stroke:f,strokeWidth:v,size:g,highlighted:!1,seriesId:c})),m}},{key:"isLabelEnabled",value:function(){return this.label.enabled}}]),n}(_l);Mu.className="ScatterSeries",Mu.type="scatter",xu([vt(Pt)],Mu.prototype,"title",void 0),xu([vt(Pt)],Mu.prototype,"labelKey",void 0),xu([vt(Pt)],Mu.prototype,"xName",void 0),xu([vt(Pt)],Mu.prototype,"yName",void 0),xu([vt(Pt)],Mu.prototype,"sizeName",void 0),xu([vt(Pt)],Mu.prototype,"labelName",void 0),xu([vt(Pt)],Mu.prototype,"xKey",void 0),xu([vt(Pt)],Mu.prototype,"yKey",void 0),xu([vt(Pt)],Mu.prototype,"sizeKey",void 0),xu([vt(Pt)],Mu.prototype,"colorKey",void 0),xu([vt(Pt)],Mu.prototype,"colorName",void 0),xu([vt(jt)],Mu.prototype,"colorDomain",void 0),xu([vt(Vt)],Mu.prototype,"colorRange",void 0);var Nu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){return(0,p.Z)(this,n),t.call(this,{moduleCtx:e,pickModes:[ri.EXACT_SHAPE_MATCH]})}return(0,f.Z)(n,[{key:"getLabelData",value:function(){return[]}}]),n}(Ei),Lu=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Iu=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))},Fu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).renderer=void 0,e}return(0,f.Z)(n)}(Si);Lu([vt(Rt)],Fu.prototype,"renderer",void 0);var _u=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e,i,r,o,a,s){var l;return(0,p.Z)(this,n),(l=t.call(this,o,a,s)).labelKey=e,l.sizeKey=i,l.colorKey=r,l}return(0,f.Z)(n)}(vi),Gu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).type="nodeClick",e}return(0,f.Z)(n)}(_u),Zu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).type="nodeDoubleClick",e}return(0,f.Z)(n)}(_u),Vu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).padding=10,e}return(0,f.Z)(n)}(ga);Lu([vt(Bt(0))],Vu.prototype,"padding",void 0);var Hu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).wrapping="on-space",e}return(0,f.Z)(n)}(ga);Lu([vt(Cn)],Hu.prototype,"wrapping",void 0);var Bu,Wu=(0,f.Z)((function e(){(0,p.Z)(this,e),this.style=function(){var e=new ga;return e.color="white",e}()}));Lu([vt(Pt)],Wu.prototype,"key",void 0),Lu([vt(Pt)],Wu.prototype,"name",void 0),Lu([vt(Rt)],Wu.prototype,"formatter",void 0),function(e){e[e.Name=0]="Name",e[e.Value=1]="Value"}(Bu||(Bu={}));var zu=new qe;function Uu(e,t){var n=t.fontStyle,i=t.fontWeight,r=t.fontSize,o=t.fontFamily;zu.fontStyle=n,zu.fontWeight=i,zu.fontSize=r,zu.fontFamily=o,zu.text=e,zu.x=0,zu.y=0,zu.textAlign="left",zu.textBaseline="top";var a=zu.computeBBox();return{width:a.width,height:a.height}}function ju(e){if("string"===typeof e&&!dt.validColorString(e)){return Oe.warnOnce('invalid Treemap tile colour string "'.concat(e,'". Affected treemap tiles will be coloured ').concat("black",".")),"black"}return e}var Ku=(0,f.Z)((function e(){(0,p.Z)(this,e),this.color="black"}));Lu([vt(Zt)],Ku.prototype,"color",void 0);var Yu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).text=new Ku,e}return(0,f.Z)(n)}(wi),Xu=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments)).groupSelection=Rr.select(e.contentGroup,Ae),e.highlightSelection=Rr.select(e.highlightGroup,Ae),e.title=function(){var e=new Vu;return e.color="white",e.fontWeight="bold",e.fontSize=12,e.fontFamily="Verdana, sans-serif",e.padding=15,e}(),e.subtitle=function(){var e=new Vu;return e.color="white",e.fontSize=9,e.fontFamily="Verdana, sans-serif",e.padding=13,e}(),e.labels={large:function(){var e=new Hu;return e.color="white",e.fontWeight="bold",e.fontSize=18,e}(),medium:function(){var e=new Hu;return e.color="white",e.fontWeight="bold",e.fontSize=14,e}(),small:function(){var e=new Hu;return e.color="white",e.fontWeight="bold",e.fontSize=10,e}(),formatter:void 0,value:new Wu},e.nodePadding=2,e.nodeGap=0,e.labelKey="label",e.sizeKey="size",e.colorKey="color",e.colorDomain=[-5,5],e.colorRange=["#cb4b3f","#6acb64"],e.groupFill="#272931",e.groupStroke="black",e.groupStrokeWidth=1,e.tileStroke="black",e.tileStrokeWidth=1,e.gradient=!0,e.formatter=void 0,e.colorName="Change",e.rootName="Root",e.highlightGroups=!0,e.tileShadow=new Ba,e.labelShadow=new Ba,e.tooltip=new Fu,e.highlightStyle=new Yu,e}return(0,f.Z)(n,[{key:"getNodePaddingTop",value:function(e,t){var n,i=this.title,r=this.subtitle,o=this.nodePadding,a=e.label;if(e.isLeaf||!a||0===e.depth)return o;var s=e.depth>1?r:i,l=Uu(a,s);return s.fontSize>t.width/3||s.fontSize>t.height/3||l.height>=t.height?o:l.height+o+(null!==(n=s.padding)&&void 0!==n?n:0)}},{key:"getNodePadding",value:function(e,t){var n=this.nodePadding;return{top:this.getNodePaddingTop(e,t),right:n,bottom:n,left:n}}},{key:"squarify",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map;if(t.width<=0||t.height<=0)return n;n.set(e,t);var i=1,r=this.getNodePadding(e,t),o=t.width-r.left-r.right,a=t.height-r.top-r.bottom;if(o<=0||a<=0||e.value<=0)return n;for(var s=0,l=0,u=1/0,c=e.value,d=e.children,h=new he(t.x+r.left,t.y+r.top,o,a),p=h.clone(),f=0;f<d.length;f++){var v=d[f].value,g=d[l].value,m=p.width<p.height;s+=v;var y=m?p.height:p.width,C=m?p.width:p.height,k=C*g/s,w=y*s/c,S=Math.max(k,w)/Math.min(k,w),b=Math.abs(i-S);if(b<u)u=b;else{w=y*(s-=v)/c;for(var E=m?p.x:p.y,x=l;x<f;x++){var R=d[x],D=m?E:p.x,T=m?p.y:E,O=C*R.value/s,P=m?O:w,A=m?w:O,M=new he(D,T,P,A);this.applyGap(h,M),this.squarify(R,M,n),c-=R.value,E+=O}m?(p.y+=w,p.height-=w):(p.x+=w,p.width-=w),l=f,s=0,u=1/0,f--}}for(var N=p.width<p.height,L=N?p.x:p.y,I=l;I<d.length;I++){var F=N?L:p.x,_=N?p.y:L,G=d[I].value/c,Z=p.width*(N?G:1),V=p.height*(N?1:G),H=new he(F,_,Z,V);this.applyGap(h,H),this.squarify(d[I],H,n),L+=N?Z:V}return n}},{key:"applyGap",value:function(e,t){var n=this.nodeGap/2,i=function(e){return{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height}},r=i(e),o=i(t);Object.keys(r).forEach((function(e){za(r[e],o[e])||t.shrink(n,e)}))}},{key:"processData",value:function(){return Iu(this,void 0,void 0,(0,ie.Z)().mark((function e(){var t,n,i,r,o,a,s,l,u,c,d=this;return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.data){e.next=2;break}return e.abrupt("return");case 2:t=this.data,n=this.sizeKey,i=this.labelKey,r=this.colorKey,o=this.colorDomain,a=this.colorRange,s=this.groupFill,l=this.labels.formatter,(u=new Eu).domain=o,u.range=a,u.update(),c=function e(t){var o,a,c,h,p,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,v=arguments.length>2?arguments[2]:void 0;l&&(p=d.ctx.callbackCache.call(l,{datum:t})),void 0!==p||(p=i&&null!==(o=t[i])&&void 0!==o?o:"");var g=r&&null!==(a=t[r])&&void 0!==a?a:f;g=ju(g);var m=!t.children,y=s;"string"===typeof g?y=g:!m&&s||(y=u.convert(g));var C={datum:t,depth:f,parent:v,value:0,label:p,fill:y,series:d,isLeaf:m,children:[]};return m?C.value=n&&null!==(c=t[n])&&void 0!==c?c:1:(null===(h=t.children)||void 0===h||h.forEach((function(t){var n=e(t,f+1,C),i=n.value;!isNaN(i)&&isFinite(i)&&0!==i&&(C.value+=i,C.children.push(n))})),C.children.sort((function(e,t){return t.value-e.value}))),C},this.dataRoot=c(t);case 10:case"end":return e.stop()}}),e,this)})))}},{key:"createNodeData",value:function(){return Iu(this,void 0,void 0,(0,ie.Z)().mark((function e(){return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",[]);case 1:case"end":return e.stop()}}),e)})))}},{key:"update",value:function(){return Iu(this,void 0,void 0,(0,ie.Z)().mark((function e(){return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.updateSelections();case 2:return e.next=4,this.updateNodes();case 4:case"end":return e.stop()}}),e,this)})))}},{key:"updateSelections",value:function(){return Iu(this,void 0,void 0,(0,ie.Z)().mark((function e(){var t,n,i,r,o,a;return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.nodeDataRefresh){e.next=2;break}return e.abrupt("return");case 2:if(this.nodeDataRefresh=!1,t=this.chart,n=this.dataRoot,t&&n){e.next=6;break}return e.abrupt("return");case 6:if(t.getSeriesRect()){e.next=9;break}return e.abrupt("return");case 9:i=[],function e(t){var n;i.push(t),null===(n=t.children)||void 0===n||n.forEach(e)}(n),r=this.groupSelection,o=this.highlightSelection,a=function(e){return e.update(i,(function(e){var t=new ql,n=new qe;n.tag=Bu.Name;var i=new qe;i.tag=Bu.Value,e.append([t,n,i])}))},this.groupSelection=a(r),this.highlightSelection=a(o);case 16:case"end":return e.stop()}}),e,this)})))}},{key:"isDatumHighlighted",value:function(e){var t;return e===(null===(t=this.ctx.highlightManager)||void 0===t?void 0:t.getActiveHighlight())&&(e.isLeaf||this.highlightGroups)}},{key:"getTileFormat",value:function(e,t){var n,i=this.formatter,r=this.ctx.callbackCache;if(!i)return{};var o=this.gradient,a=this.colorKey,s=this.labelKey,l=this.sizeKey,u=this.tileStroke,c=this.tileStrokeWidth,d=this.groupStroke,h=this.groupStrokeWidth,p=e.isLeaf?u:d,f=e.isLeaf?c:h,v=r.call(i,{seriesId:this.id,datum:e.datum,depth:e.depth,parent:null===(n=e.parent)||void 0===n?void 0:n.datum,colorKey:a,sizeKey:l,labelKey:s,fill:e.fill,stroke:p,strokeWidth:f,gradient:o,highlighted:t});return null!==v&&void 0!==v?v:{}}},{key:"updateNodes",value:function(){return Iu(this,void 0,void 0,(0,ie.Z)().mark((function e(){var t,n,i,r,o,a,s,l,u,c,d,h,p,f,v,g,m,y,C,k,w,S=this;return(0,ie.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.chart){e.next=2;break}return e.abrupt("return");case 2:if(t=this.gradient,n=this.highlightStyle,i=n.item,r=i.fill,o=i.fillOpacity,a=i.stroke,s=i.strokeWidth,l=n.text.color,u=this.tileStroke,c=this.tileStrokeWidth,d=this.groupStroke,h=this.groupStrokeWidth,p=this.tileShadow,f=this.labelShadow,v=this.dataRoot){e.next=5;break}return e.abrupt("return");case 5:g=this.chart.getSeriesRect(),m=this.squarify(v,new he(0,0,g.width,g.height)),y=this.buildLabelMeta(m),C=this.getHighlightedSubtree(v),this.updateNodeMidPoint(m),k=function(e,n,i){var l,f,v,g,y,C,k=m.get(n);if(k){var w=i&&void 0!==r?r:n.fill,b=null!==(l=i?o:1)&&void 0!==l?l:1,E=d;i&&void 0!==a?E=a:n.isLeaf&&(E=u);var x=h;i&&void 0!==s?x=s:n.isLeaf&&(x=c);var R=S.getTileFormat(n,i),D=ju(null!==(f=null===R||void 0===R?void 0:R.fill)&&void 0!==f?f:w);if(null!==(v=null===R||void 0===R?void 0:R.gradient)&&void 0!==v?v:t){var T=dt.tryParseFromString(w).brighter().toString(),O=dt.tryParseFromString(w).darker().toString();e.fill="linear-gradient(180deg, ".concat(T,", ").concat(O,")")}else e.fill=D;e.fillOpacity=null!==(g=null===R||void 0===R?void 0:R.fillOpacity)&&void 0!==g?g:b,e.stroke=ju(null!==(y=null===R||void 0===R?void 0:R.stroke)&&void 0!==y?y:E),e.strokeWidth=null!==(C=null===R||void 0===R?void 0:R.strokeWidth)&&void 0!==C?C:x,e.fillShadow=p,e.crisp=!0,e.x=k.x,e.y=k.y,e.width=k.width,e.height=k.height,e.visible=!0}else e.visible=!1},this.groupSelection.selectByClass(ql).forEach((function(e){return k(e,e.datum,!1)})),this.highlightSelection.selectByClass(ql).forEach((function(e){var t=S.isDatumHighlighted(e.datum);e.visible=t||C.has(e.datum),e.visible&&k(e,e.datum,t)})),w=function(e,t,n,i){var r=y.get(t),o=null===r||void 0===r?void 0:r[i];o?(e.text=o.text,e.fontFamily=o.style.fontFamily,e.fontSize=o.style.fontSize,e.fontWeight=o.style.fontWeight,e.fill=n&&null!==l&&void 0!==l?l:o.style.color,e.fillShadow=n?void 0:f,e.textAlign=o.hAlign,e.textBaseline=o.vAlign,e.x=o.x,e.y=o.y,e.visible=!0):e.visible=!1},this.groupSelection.selectByTag(Bu.Name).forEach((function(e){return w(e,e.datum,!1,"label")})),this.highlightSelection.selectByTag(Bu.Name).forEach((function(e){var t=S.isDatumHighlighted(e.datum);e.visible=t||C.has(e.datum),e.visible&&w(e,e.datum,t,"label")})),this.groupSelection.selectByTag(Bu.Value).forEach((function(e){return w(e,e.datum,!1,"value")})),this.highlightSelection.selectByTag(Bu.Value).forEach((function(e){var t=S.isDatumHighlighted(e.datum);e.visible=t||C.has(e.datum),e.visible&&w(e,e.datum,t,"value")}));case 18:case"end":return e.stop()}}),e,this)})))}},{key:"updateNodeMidPoint",value:function(e){e.forEach((function(e,t){t.nodeMidPoint={x:e.x+e.width/2,y:e.y}}))}},{key:"getHighlightedSubtree",value:function(e){var t=this,n=new Set;return function e(i){var r;(t.isDatumHighlighted(i)||i.parent&&n.has(i.parent))&&n.add(i),null===(r=i.children)||void 0===r||r.forEach(e)}(e),n}},{key:"buildLabelMeta",value:function(e){var t=this.labels,n=this.title,i=this.subtitle,r=this.nodePadding,o=this.labelKey,a=this.ctx.callbackCache,s=/-$/m,l=new Map;return e.forEach((function(e,u){var c,d,h;if(o&&0!==u.depth){var p=e.width-2*r,f=e.height-2*r,v=function(t){return t.fontSize>e.width/3||t.fontSize>e.height/3},g=u.isLeaf?u.label:u.label.toUpperCase(),m="",y=t.value,C=y.style,k=Math.ceil(2*C.fontSize*(qe.defaultLineHeightRatio-1));u.isLeaf&&(y.formatter?m=null!==(c=a.call(y.formatter,{datum:u.datum}))&&void 0!==c?c:"":y.key&&(m=u.datum[y.key]));var w,S=Uu(m,C);m&&S.width>p&&(m="");var b="";if(u.isLeaf){var E=function(){for(var e=f-(m?C.fontSize+k:0),n=0,i=[t.large,t.medium,t.small];n<i.length;n++){var r=i[n],o=Uu(g,r),a=o.width;if(!(o.height>e||v(r))){if(a<=p)return{style:r,wrappedText:void 0};var l=qe.wrap(g,p,e,r,r.wrapping);if(l&&"\u2026"!==l&&(r===t.small||!s.exec(l)&&!l.endsWith("\u2026")))return{style:r,wrappedText:l}}}return Uu(g,t.small).height<=e&&!v(t.small)?{style:t.small,wrappedText:void 0}:{style:void 0,wrappedText:void 0}},x=E();!x.style&&m&&(m="",x=E()),w=null!==(d=x.style)&&void 0!==d?d:t.small,b=null!==(h=x.wrappedText)&&void 0!==h?h:""}else w=1===u.depth?n:i;var R=Uu(b||g,w);if(!v(w)){if(R.width>p){var D=Math.floor(g.length*p/R.width)-1;g="".concat(g.substring(0,D).trim(),"\u2026")}S=Uu(m,C);var T=m&&S.width<p&&S.height+R.height+k<f;l.set(u,{label:Object.assign({text:b||g,style:w},u.isLeaf?{hAlign:"center",vAlign:"middle",x:e.x+e.width/2,y:e.y+e.height/2-(T?S.height/2+k/2:0)}:{hAlign:"left",vAlign:"top",x:e.x+r,y:e.y+r}),value:T?{text:m,style:C,hAlign:"center",vAlign:"middle",x:e.x+e.width/2,y:e.y+e.height/2+R.height/2+k/2}:void 0})}}})),l}},{key:"getDomain",value:function(e){return[0,1]}},{key:"getNodeClickEvent",value:function(e,t){return new Gu(this.labelKey,this.sizeKey,this.colorKey,e,t,this)}},{key:"getNodeDoubleClickEvent",value:function(e,t){return new Zu(this.labelKey,this.sizeKey,this.colorKey,e,t,this)}},{key:"getTooltipHtml",value:function(e){var t,n,i,r;if(!this.highlightGroups&&!e.isLeaf)return"";var o=this.tooltip,a=this.sizeKey,s=this.labelKey,l=this.colorKey,u=this.rootName,c=this.id,d=this.labels,h=this.ctx.callbackCache,p=e.datum,f=o.renderer,v=e.depth?p[s]:null!==(t=p[s])&&void 0!==t?t:u,g="",m=this.getTileFormat(e,!1),y=null!==(i=null!==(n=null===m||void 0===m?void 0:m.fill)&&void 0!==n?n:e.fill)&&void 0!==i?i:"gray",C=d.value.key,k=d.value.formatter;if(C||k){var w="";if(k)w=h.call(k,{datum:p});else if(null!=C){var S=p[C];"number"===typeof S&&isFinite(S)&&(w=Ua(S))}w&&(d.value.name&&(g+="<b>".concat(d.value.name,":</b> ")),g+=w)}var b={title:v,backgroundColor:y,content:g};return f?An(f({datum:e.datum,parent:null===(r=e.parent)||void 0===r?void 0:r.datum,depth:e.depth,sizeKey:a,labelKey:s,colorKey:l,title:v,color:y,seriesId:c}),b):v||g?An(b):""}},{key:"getLegendData",value:function(){return[]}}]),n}(Nu);Xu.className="TreemapSeries",Xu.type="treemap",Lu([vt(Bt(0))],Xu.prototype,"nodePadding",void 0),Lu([vt(Bt(0))],Xu.prototype,"nodeGap",void 0),Lu([vt(Ot)],Xu.prototype,"labelKey",void 0),Lu([vt(Pt)],Xu.prototype,"sizeKey",void 0),Lu([vt(Pt)],Xu.prototype,"colorKey",void 0),Lu([vt(Ut)],Xu.prototype,"colorDomain",void 0),Lu([vt(Vt)],Xu.prototype,"colorRange",void 0),Lu([vt(Pt)],Xu.prototype,"groupFill",void 0),Lu([vt(Zt)],Xu.prototype,"groupStroke",void 0),Lu([vt(Wt(0))],Xu.prototype,"groupStrokeWidth",void 0),Lu([vt(Zt)],Xu.prototype,"tileStroke",void 0),Lu([vt(Wt(0))],Xu.prototype,"tileStrokeWidth",void 0),Lu([vt(Dt)],Xu.prototype,"gradient",void 0),Lu([vt(Rt)],Xu.prototype,"formatter",void 0),Lu([vt(Ot)],Xu.prototype,"colorName",void 0),Lu([vt(Ot)],Xu.prototype,"rootName",void 0),Lu([vt(Tt)],Xu.prototype,"highlightGroups",void 0);var qu={area:"cartesian",bar:"cartesian",column:"cartesian",histogram:"cartesian",line:"cartesian",scatter:"cartesian",treemap:"hierarchy",pie:"polar"},Qu={},Ju={has:function(e){return Object.prototype.hasOwnProperty.call(qu,e)},isCartesian:function(e){return"cartesian"===qu[e]},isPolar:function(e){return"polar"===qu[e]},isHierarchy:function(e){return"hierarchy"===qu[e]},get seriesTypes(){return Object.keys(qu)},get cartesianTypes(){var e=this;return this.seriesTypes.filter((function(t){return e.isCartesian(t)}))},get polarTypes(){var e=this;return this.seriesTypes.filter((function(t){return e.isPolar(t)}))},get hierarchyTypes(){var e=this;return this.seriesTypes.filter((function(t){return e.isHierarchy(t)}))}};function $u(e,t){var n;Qu[e]=Bi([null!==(n=Qu[e])&&void 0!==n?n:{},t])}function ec(e){var t;return null!==(t=Qu[e])&&void 0!==t?t:{}}var tc={area:Yl,bar:uu,column:cu,histogram:yu,line:bu,pie:ds,scatter:Mu,treemap:Xu},nc={},ic={},rc={},oc={};function ac(e,t,n,i,r,o){nc[e]=n,ic[e]=i,rc[e]=r,o&&cc(e,o),function(e,t){qu[e]=t}(e,t)}function sc(e,t){var n,i=null!==(n=nc[e])&&void 0!==n?n:tc[e];if(i)return new i(t);throw new Error("AG Charts - unknown series type: ".concat(e))}function lc(e){return ic[e]}function uc(e){return rc[e]}function cc(e,t){oc[e]=t}var dc={axes:[{type:ul.type,position:"left"},{type:Gs.type,position:"bottom"}]},hc={axes:[{type:"number",position:"bottom"},{type:"category",position:"left"}]},pc={axes:[{type:"number",position:"bottom"},{type:"number",position:"left"}]};function fc(e,t){if(gc(e)&&gc(t)){var n={};return Object.keys(e).forEach((function(i){n[i]=i in t?fc(e[i],t[i]):e[i]})),Object.keys(t).forEach((function(i){i in e||(n[i]=t[i])})),n}return Array.isArray(e)&&!Array.isArray(t)||vc(e)&&!vc(t)?e:t}function vc(e){return e&&"object"===typeof e}function gc(e){return vc(e)&&e.constructor===Object}var mc={fills:["#f3622d","#fba71b","#57b757","#41a9c9","#4258c9","#9a42c8","#c84164","#888888"],strokes:["#aa4520","#b07513","#3d803d","#2d768d","#2e3e8d","#6c2e8c","#8c2d46","#5f5f5f"]},yc=Symbol("extends-axes-defaults"),Cc=Symbol("extends-axes-label-defaults"),kc=Symbol("extends-axes-line-defaults"),wc=Symbol("extends-series-defaults"),Sc=Symbol("override-series-label-defaults"),bc=Symbol("default-font"),Ec="bold",xc=function(){function e(t){(0,p.Z)(this,e);var n=t=fc({},null!==t&&void 0!==t?t:{}),i=n.overrides,r=void 0===i?null:i,o=n.palette,a=void 0===o?null:o,s=this.createChartConfigPerChartType(this.getDefaults());if(r){var l=r.common,u=r.cartesian,c=r.polar,d=r.hierarchy,h=function(e,t,n){n&&(s[e]=fc(s[e],n),t.forEach((function(e){var t=e;s[t]=fc(s[t],n)})))};h("common",Object.keys(s),l),h("cartesian",Ju.cartesianTypes,u),h("polar",Ju.polarTypes,c),h("hierarchy",Ju.hierarchyTypes,d),Ju.seriesTypes.forEach((function(e){var t=e,n=r[t];n&&(n.series&&(n.series=(0,se.Z)({},t,n.series)),s[t]=fc(s[t],n))}))}this.palette=null!==a&&void 0!==a?a:this.getPalette(),this.config=Object.freeze(s)}return(0,f.Z)(e,[{key:"getPalette",value:function(){return mc}},{key:"createChartConfigPerChartType",value:function(e){var t=this,n={cartesian:Ju.cartesianTypes,polar:Ju.polarTypes,hierarchy:Ju.hierarchyTypes,groupedCategory:[]};return Object.entries(n).forEach((function(n){var i=(0,re.Z)(n,2),r=i[0],o=i[1],a=r,s=t.templateTheme(ec(a));o.forEach((function(t){var n=t;e[n]||(e[n]=fc({},e[a]),fc(e[n],s))}))})),e}},{key:"getDefaults",value:function(){var t=this,n=fc({},e.defaults),i=function(e,n){var i=t.templateTheme(ec(e));return i.series=n.reduce((function(e,n){var i=uc(n);return i&&(e[n]=t.templateTheme(i)),e}),{}),"cartesian"!==e&&"polar"!==e||(i.axes=kl.axesTypes.reduce((function(e,n){var i=function(e){var t;return null!==(t=wl[e])&&void 0!==t?t:{}}(n);return i&&(e[n]=t.templateTheme(i)),e}),{})),i};return fc(n,{cartesian:i("cartesian",Ju.cartesianTypes),groupedCategory:i("cartesian",Ju.cartesianTypes),polar:i("polar",Ju.polarTypes),hierarchy:i("hierarchy",Ju.hierarchyTypes)})}},{key:"templateTheme",value:function(e){var t=Bi([e]),n=this.getTemplateParameters(),i=n.extensions,r=n.properties;return zi(t,(function(e,t){if(t.__extends__){var n=t.__extends__,o=i.get(n);if(null==o)throw new Error("AG Charts - no template variable provided for: "+n);Object.keys(o).forEach((function(e){e in t||(t[e]=o[e])})),delete t.__extends__}if(t.__overrides__){var a=t.__overrides__,s=i.get(a);if(null==s)throw new Error("AG Charts - no template variable provided for: "+a);Object.assign(t,s),delete t.__overrides__}for(var l=0,u=Object.entries(t);l<u.length;l++){var c=(0,re.Z)(u[l],2),d=c[0],h=c[1];r.has(h)&&(t[d]=r.get(h))}}),{}),t}},{key:"getTemplateParameters",value:function(){var t=new Map;t.set(yc,e.getAxisDefaults()),t.set(Cc,e.getAxisDefaults().label),t.set(kc,e.getAxisDefaults().line),t.set(wc,e.getSeriesDefaults()),t.set(Sc,{});var n=new Map;return n.set(bc,e.fontFamily),{extensions:t,properties:n}}},{key:"mergeWithParentDefaults",value:function(e,t){return fc(e,t)}}],[{key:"getAxisDefaults",value:function(){return{top:{},right:{},bottom:{},left:{},title:{enabled:!1,text:"Axis Title",fontStyle:void 0,fontWeight:Ec,fontSize:12,fontFamily:this.fontFamily,color:"rgb(70, 70, 70)"},label:{fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:this.fontFamily,padding:5,rotation:void 0,color:"rgb(87, 87, 87)",formatter:void 0,autoRotate:!1,avoidCollisions:!0},line:{width:1,color:"rgb(195, 195, 195)"},tick:{width:1,size:6,color:"rgb(195, 195, 195)"},gridStyle:[{stroke:"rgb(219, 219, 219)",lineDash:[4,2]}],crossLines:{enabled:!1,fill:"rgb(187,221,232)",stroke:"rgb(70,162,192)",strokeWidth:1,label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:this.fontFamily,padding:5,color:"rgb(87, 87, 87)",rotation:void 0}}}}},{key:"getSeriesDefaults",value:function(){return{tooltip:{enabled:!0,renderer:void 0},visible:!0,showInLegend:!0,highlightStyle:{item:{fill:"yellow",fillOpacity:1},series:{dimOpacity:1},text:{color:"black"}},nodeClickRange:"exact"}}},{key:"getBarSeriesDefaults",value:function(){return Object.assign(Object.assign({},this.getSeriesDefaults()),{fillOpacity:1,strokeOpacity:1,normalizedTo:void 0,strokeWidth:1,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:this.fontFamily,color:"rgb(70, 70, 70)",formatter:void 0,placement:"inside"},shadow:{enabled:!1,color:"rgba(0, 0, 0, 0.5)",xOffset:3,yOffset:3,blur:5}})}},{key:"getLineSeriesDefaults",value:function(){var e=this.getSeriesDefaults();return Object.assign(Object.assign({},e),{tooltip:Object.assign(Object.assign({},e.tooltip),{format:void 0,position:{type:"node"}})})}},{key:"getAreaSeriesDefaults",value:function(){var e=this.getSeriesDefaults();return Object.assign(Object.assign({},e),{nodeClickRange:"nearest",tooltip:Object.assign(Object.assign({},e.tooltip),{position:{type:"node"}})})}},{key:"getScatterSeriesDefaults",value:function(){var e=this.getSeriesDefaults();return Object.assign(Object.assign({},e),{tooltip:Object.assign(Object.assign({},e.tooltip),{position:{type:"node"}})})}},{key:"getCartesianSeriesMarkerDefaults",value:function(){return{enabled:!0,shape:"circle",size:6,maxSize:30,strokeWidth:1,formatter:void 0}}},{key:"getCaptionWrappingDefaults",value:function(){return"hyphenate"}},{key:"getChartDefaults",value:function(){return{background:{visible:!0,fill:"white"},padding:{top:20,right:20,bottom:20,left:20},title:{enabled:!1,text:"Title",fontStyle:void 0,fontWeight:Ec,fontSize:16,fontFamily:this.fontFamily,color:"rgb(70, 70, 70)",wrapping:e.getCaptionWrappingDefaults()},subtitle:{enabled:!1,text:"Subtitle",fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:this.fontFamily,color:"rgb(140, 140, 140)",wrapping:e.getCaptionWrappingDefaults()},footnote:{enabled:!1,text:"Footnote",fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:this.fontFamily,color:"rgb(140, 140, 140)",spacing:30,wrapping:e.getCaptionWrappingDefaults()},legend:{position:"bottom",spacing:20,listeners:{},item:{paddingX:16,paddingY:8,marker:{shape:void 0,size:15,strokeWidth:1,padding:8},label:{color:"black",fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:this.fontFamily,formatter:void 0}},reverseOrder:!1,pagination:{marker:{size:12},activeStyle:{fill:"rgb(70, 70, 70)"},inactiveStyle:{fill:"rgb(219, 219, 219)"},highlightStyle:{fill:"rgb(70, 70, 70)"},label:{color:"rgb(70, 70, 70)"}}},tooltip:{enabled:!0,range:"nearest",delay:0},listeners:{}}}}]),e}();xc.fontFamily="Verdana, sans-serif",xc.cartesianDefaults=Object.assign(Object.assign({},xc.getChartDefaults()),{axes:{number:Object.assign({},xc.getAxisDefaults()),log:Object.assign(Object.assign({},xc.getAxisDefaults()),{base:10}),category:Object.assign(Object.assign({},xc.getAxisDefaults()),{groupPaddingInner:.1,label:Object.assign(Object.assign({},xc.getAxisDefaults().label),{autoRotate:!0})}),groupedCategory:Object.assign({},xc.getAxisDefaults()),time:Object.assign({},xc.getAxisDefaults())},series:{column:Object.assign({},xc.getBarSeriesDefaults()),bar:Object.assign({},xc.getBarSeriesDefaults()),line:Object.assign(Object.assign({},xc.getLineSeriesDefaults()),{title:void 0,strokeWidth:2,strokeOpacity:1,lineDash:[0],lineDashOffset:0,marker:Object.assign(Object.assign({},xc.getCartesianSeriesMarkerDefaults()),{fillOpacity:1,strokeOpacity:1}),label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:xc.fontFamily,color:"rgb(70, 70, 70)",formatter:void 0}}),scatter:Object.assign(Object.assign({},xc.getScatterSeriesDefaults()),{sizeName:"Size",labelName:"Label",marker:Object.assign({},xc.getCartesianSeriesMarkerDefaults()),label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:xc.fontFamily,color:"rgb(70, 70, 70)"}}),area:Object.assign(Object.assign({},xc.getAreaSeriesDefaults()),{normalizedTo:void 0,fillOpacity:.8,strokeOpacity:1,strokeWidth:2,lineDash:[0],lineDashOffset:0,shadow:{enabled:!1,color:"rgba(0, 0, 0, 0.5)",xOffset:3,yOffset:3,blur:5},marker:Object.assign(Object.assign({},xc.getCartesianSeriesMarkerDefaults()),{fillOpacity:1,strokeOpacity:1,enabled:!1}),label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:xc.fontFamily,color:"rgb(70, 70, 70)",formatter:void 0}}),histogram:Object.assign(Object.assign({},xc.getSeriesDefaults()),{strokeWidth:1,fillOpacity:1,strokeOpacity:1,lineDash:[0],lineDashOffset:0,areaPlot:!1,bins:void 0,aggregation:"sum",label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:xc.fontFamily,color:"rgb(70, 70, 70)",formatter:void 0},shadow:{enabled:!0,color:"rgba(0, 0, 0, 0.5)",xOffset:0,yOffset:0,blur:5}})}}),xc.polarDefaults=Object.assign(Object.assign({},xc.getChartDefaults()),{series:{pie:Object.assign(Object.assign({},xc.getSeriesDefaults()),{title:{enabled:!0,fontStyle:void 0,fontWeight:"bold",fontSize:14,fontFamily:xc.fontFamily,color:"rgb(70, 70, 70)",spacing:0},radiusKey:void 0,radiusName:void 0,calloutLabelKey:void 0,calloutLabelName:void 0,sectorLabelKey:void 0,sectorLabelName:void 0,calloutLabel:{enabled:!0,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:xc.fontFamily,color:"rgb(70, 70, 70)",offset:3,minAngle:0},sectorLabel:{enabled:!0,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:xc.fontFamily,color:"rgb(70, 70, 70)",positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2},fillOpacity:1,strokeOpacity:1,strokeWidth:1,lineDash:[0],lineDashOffset:0,rotation:0,outerRadiusOffset:0,innerRadiusOffset:0,shadow:{enabled:!1,color:"rgba(0, 0, 0, 0.5)",xOffset:3,yOffset:3,blur:5},innerLabels:{fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:xc.fontFamily,color:"rgb(70, 70, 70)",margin:2}})}}),xc.hierarchyDefaults=Object.assign(Object.assign({},xc.getChartDefaults()),{series:{treemap:Object.assign(Object.assign({},xc.getSeriesDefaults()),{showInLegend:!1,labelKey:"label",sizeKey:"size",colorKey:"color",colorDomain:[-5,5],colorRange:["#cb4b3f","#6acb64"],groupFill:"#272931",groupStroke:"black",groupStrokeWidth:1,tileStroke:"black",tileStrokeWidth:1,gradient:!0,tileShadow:{enabled:!1,color:"rgba(0, 0, 0, 0.5)",xOffset:3,yOffset:3,blur:5},labelShadow:{enabled:!0,color:"rgba(0, 0, 0, 0.4)",xOffset:1.5,yOffset:1.5,blur:5},highlightGroups:!0,nodePadding:2,nodeGap:0,title:{enabled:!0,color:"white",fontStyle:void 0,fontWeight:"bold",fontSize:12,fontFamily:"Verdana, sans-serif",padding:2},subtitle:{enabled:!0,color:"white",fontStyle:void 0,fontWeight:void 0,fontSize:9,fontFamily:"Verdana, sans-serif",padding:2},labels:{large:{enabled:!0,fontStyle:void 0,fontWeight:"bold",fontSize:18,fontFamily:"Verdana, sans-serif",color:"white",wrapping:"on-space"},medium:{enabled:!0,fontStyle:void 0,fontWeight:"bold",fontSize:14,fontFamily:"Verdana, sans-serif",color:"white",wrapping:"on-space"},small:{enabled:!0,fontStyle:void 0,fontWeight:"bold",fontSize:10,fontFamily:"Verdana, sans-serif",color:"white",wrapping:"on-space"},value:{style:{enabled:!0,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:"Verdana, sans-serif",color:"white"}}}})}}),xc.defaults={cartesian:xc.cartesianDefaults,groupedCategory:xc.cartesianDefaults,polar:xc.polarDefaults,hierarchy:xc.hierarchyDefaults};var Rc=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){return(0,p.Z)(this,n),t.call(this,e)}return(0,f.Z)(n,[{key:"getDefaults",value:function(){var e=this,t=n.fontColor,i=n.mutedFontColor,r={title:{color:t},label:{color:t},gridStyle:[{stroke:"rgb(88, 88, 88)",lineDash:[4,2]}]},o={label:{color:t}},a={axes:{number:Object.assign({},r),category:Object.assign({},r),time:Object.assign({},r)}},s={background:{fill:"rgb(34, 38, 41)"},title:{color:t},subtitle:{color:i},legend:{item:{label:{color:t}},pagination:{activeStyle:{fill:t},inactiveStyle:{fill:i},highlightStyle:{fill:t},label:{color:t}}}},l=function(t){return t.reduce((function(t,n){var i=uc(n);return i&&(t[n]=e.templateTheme(i)),t}),{})};return this.mergeWithParentDefaults((0,oe.Z)((0,ae.Z)(n.prototype),"getDefaults",this).call(this),{cartesian:Object.assign(Object.assign(Object.assign({},s),a),{series:Object.assign({line:Object.assign({},o),bar:Object.assign({},o),column:Object.assign({},o),histogram:Object.assign({},o)},l(Ju.cartesianTypes))}),groupedCategory:Object.assign(Object.assign(Object.assign({},s),a),{series:Object.assign({bar:Object.assign({},o),column:Object.assign({},o),histogram:Object.assign({},o)},l(Ju.cartesianTypes))}),polar:Object.assign(Object.assign({},s),{series:Object.assign({pie:{calloutLabel:{color:t},sectorLabel:{color:t},title:{color:t},innerLabels:{color:t}}},l(Ju.polarTypes))}),hierarchy:Object.assign(Object.assign({},s),{series:Object.assign({treemap:{tileStroke:"white",groupStroke:"white",title:{color:t},subtitle:{color:i},labels:{large:{color:t},medium:{color:t},small:{color:t},value:{style:{color:t}}}}},l(Ju.hierarchyTypes))})})}},{key:"getTemplateParameters",value:function(){var e=(0,oe.Z)((0,ae.Z)(n.prototype),"getTemplateParameters",this).call(this);return e.extensions.set(Sc,n.seriesLabelDefaults.label),e}}]),n}(xc);Rc.fontColor="rgb(200, 200, 200)",Rc.mutedFontColor="rgb(150, 150, 150)",Rc.seriesLabelDefaults={label:{color:Rc.fontColor}};var Dc={fills:["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722"],strokes:["#ab2f26","#a31545","#6d1b7b","#482980","#2c397f","#1769aa","#0276ab","#008494","#00695f","#357a38","#618834","#909a28","#b3a429","#b38705","#b36a00","#b33d18"]},Tc=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n,[{key:"getPalette",value:function(){return Dc}}]),n}(xc),Oc={fills:["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722"],strokes:["#ab2f26","#a31545","#6d1b7b","#482980","#2c397f","#1769aa","#0276ab","#008494","#00695f","#357a38","#618834","#909a28","#b3a429","#b38705","#b36a00","#b33d18"]},Pc=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n,[{key:"getPalette",value:function(){return Oc}}]),n}(Rc),Ac={fills:["#c16068","#a2bf8a","#ebcc87","#80a0c3","#b58dae","#85c0d1"],strokes:["#874349","#718661","#a48f5f","#5a7088","#7f637a","#5d8692"]},Mc=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n,[{key:"getPalette",value:function(){return Ac}}]),n}(xc),Nc={fills:["#c16068","#a2bf8a","#ebcc87","#80a0c3","#b58dae","#85c0d1"],strokes:["#874349","#718661","#a48f5f","#5a7088","#7f637a","#5d8692"]},Lc=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n,[{key:"getPalette",value:function(){return Nc}}]),n}(Rc),Ic={fills:["#febe76","#ff7979","#badc58","#f9ca23","#f0932b","#eb4c4b","#6ab04c","#7ed6df","#e056fd","#686de0"],strokes:["#b28553","#b35555","#829a3e","#ae8d19","#a8671e","#a43535","#4a7b35","#58969c","#9d3cb1","#494c9d"]},Fc=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n,[{key:"getPalette",value:function(){return Ic}}]),n}(xc),_c={fills:["#febe76","#ff7979","#badc58","#f9ca23","#f0932b","#eb4c4b","#6ab04c","#7ed6df","#e056fd","#686de0"],strokes:["#b28553","#b35555","#829a3e","#ae8d19","#a8671e","#a43535","#4a7b35","#58969c","#9d3cb1","#494c9d"]},Gc=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n,[{key:"getPalette",value:function(){return _c}}]),n}(Rc),Zc={fills:["#5BC0EB","#FDE74C","#9BC53D","#E55934","#FA7921","#fa3081"],strokes:["#4086a4","#b1a235","#6c8a2b","#a03e24","#af5517","#af225a"]},Vc=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n,[{key:"getPalette",value:function(){return Zc}}]),n}(xc),Hc={fills:["#5BC0EB","#FDE74C","#9BC53D","#E55934","#FA7921","#fa3081"],strokes:["#4086a4","#b1a235","#6c8a2b","#a03e24","#af5517","#af225a"]},Bc=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,f.Z)(n,[{key:"getPalette",value:function(){return Hc}}]),n}(Rc),Wc=function(){return new xc},zc=function(){return new Rc},Uc={undefined:Wc,null:Wc,"ag-default":Wc,"ag-material":function(){return new Tc},"ag-pastel":function(){return new Mc},"ag-solar":function(){return new Fc},"ag-vivid":function(){return new Vc}},jc={undefined:zc,null:zc,"ag-default-dark":zc,"ag-material-dark":function(){return new Pc},"ag-pastel-dark":function(){return new Lc},"ag-solar-dark":function(){return new Gc},"ag-vivid-dark":function(){return new Bc}},Kc=Object.assign(Object.assign({},jc),Uc);function Yc(e){var t;if(e instanceof xc)return e;var n=Kc[e];if(n)return n();for(var i,r=[];"object"===typeof e;)r.push(null!==(t=e.overrides)&&void 0!==t?t:{}),e.palette&&null==i&&(i=e.palette),e=e.baseTheme;r.reverse();var o=Object.assign({baseTheme:e,overrides:Bi(r)},i?{palette:i}:{});return o.baseTheme||o.overrides?new(Yc(o.baseTheme).constructor)(o):Wc()}var Xc=["bar","column","area"],qc=["bar","column"];function Qc(e,t){var n=[],i=function(e){var t,n,i,r,o,a,s,l={},u={},c={},d=[],h=(0,ne.Z)(e);try{for(h.s();!(s=h.n()).done;){var p=s.value,f=null!==(t=p.type)&&void 0!==t?t:"line",v=Xc.includes(f),g=qc.includes(f);if(v||g){var m=p.stacked,y=p.stackGroup,C=p.grouped,k=void 0===C?void 0:C,w=p.xKey,S=null!=y||!0===m;null!==(n=c[f])&&void 0!==n||(c[f]=!1),c[f]||(c[f]=S);var b=!0===k,E=[null!==y&&void 0!==y?y:!0===m?"stacked":void 0,b?"grouped":void 0].filter((function(e){return null!=e})).join("-");E||(E="default-ag-charts-group");var x="".concat(f,"-").concat(w,"-").concat(E);if(S&&v){var R=null!==(i=u[x])&&void 0!==i?i:u[x]={type:"stack",opts:[]};0===R.opts.length&&d.push(R),R.opts.push(p)}else if(b&&g){var D=null!==(r=l[x])&&void 0!==r?r:l[x]={type:"group",opts:[]};0===D.opts.length&&d.push(D),D.opts.push(p)}else d.push({type:"ungrouped",opts:[p]})}else d.push({type:"ungrouped",opts:[p]})}}catch(A){h.e(A)}finally{h.f()}if(!Object.values(c).some((function(e){return e})))return d;for(var T=0,O=Object.entries(l);T<O.length;T++){var P=(0,re.Z)(O[T],2)[1];!0===c[null!==(a=null===(o=P.opts[0])||void 0===o?void 0:o.type)&&void 0!==a?a:"line"]&&(P.type="stack")}return d}(t.map((function(e){var t;return"bar"!==e.type&&"column"!==e.type||null==e.yKey||e.stacked?e:Object.assign(Object.assign({},e),{grouped:null===(t=e.grouped)||void 0===t||t})}))),r=i.reduce((function(e,t){var n,i;if("ungrouped"===t.type)return e;var r=null!==(n=t.opts[0].type)&&void 0!==n?n:"line";return null!==(i=e[r])&&void 0!==i||(e[r]=0),e[r]+="stack"===t.type?1:t.opts.length,e}),{}),o={},a=function(e){var t,n,i=0,a=null!==(t=e.opts[0].type)&&void 0!==t?t:"line";if(null!==(n=o[a])&&void 0!==n||(o[a]=0),"stack"===e.type){var s,l=(0,ne.Z)(e.opts);try{for(l.s();!(s=l.n()).done;){s.value.seriesGrouping={groupIndex:o[a],groupCount:r[a],stackIndex:i++,stackCount:e.opts.length}}}catch(p){l.e(p)}finally{l.f()}o[a]++}else if("group"===e.type){var u,c=(0,ne.Z)(e.opts);try{for(c.s();!(u=c.n()).done;){u.value.seriesGrouping={groupIndex:o[a],groupCount:r[a],stackIndex:0,stackCount:0},o[a]++}}catch(p){c.e(p)}finally{c.f()}}else{var d,h=(0,ne.Z)(e.opts);try{for(h.s();!(d=h.n()).done;){d.value.seriesGrouping=void 0}}catch(p){h.e(p)}finally{h.f()}}return e.opts};[!0,"opts"].includes(Le("agChartsDebug"))&&Oe.debug("processSeriesOptions() - series grouping: ",i);var s,l=(0,ne.Z)(i);try{for(l.s();!(s=l.n()).done;){var u=s.value;switch(u.opts[0].type){case"column":case"bar":case"area":n.push.apply(n,(0,te.Z)(a(u)));break;default:u.opts.length>1&&Oe.warn("unexpected grouping of series type: "+u.opts[0].type),n.push.apply(n,(0,te.Z)(u.opts))}}}catch(c){l.e(c)}finally{l.f()}return n}function Jc(e){var t,n,i,r;return null!==(r=null!==(t=e.type)&&void 0!==t?t:null===(i=null===(n=e.series)||void 0===n?void 0:n[0])||void 0===i?void 0:i.type)&&void 0!==r?r:"line"}function $c(e){var t=Jc(e);return null==t||("cartesian"===t?(Oe.warnOnce("type '".concat(t,"' is deprecated, use a series type instead")),!0):Ju.isCartesian(t))}function ed(e){var t=Jc(e);return null!=t&&("hierarchy"===t?(Oe.warnOnce("type '".concat(t,"' is deprecated, use a series type instead")),!0):Ju.isHierarchy(t))}function td(e){var t=Jc(e);return null!=t&&("polar"===t?(Oe.warnOnce("type '".concat(t,"' is deprecated, use a series type instead")),!0):Ju.isPolar(t))}function nd(e){return null!=e&&Ju.has(e)}function id(e){var t,n=0,i=(0,ne.Z)(e);try{for(i.s();!(t=i.n()).done;){var r=t.value;r instanceof Array&&(n+=id(r)),null!=r&&n++}}catch(o){i.e(o)}finally{i.f()}return n}function rd(e,t,n){for(var i=[],r=0;r<n;r++)i.push(t[(r+e.colourIndex)%t.length]);return i}var od={avoidDeepClone:["data"]};function ad(e,t){var n,i,r,o,a,s,l=Bi([t,e],od);!function(e){var t={yKeys:"yKey",yNames:"yName"};Object.entries(t).forEach((function(t){var n,i=(0,re.Z)(t,2),r=i[0],o=i[1];(null===(n=e.series)||void 0===n?void 0:n.some((function(e){return null!=e[r]})))&&Oe.warnOnce("property [series.".concat(r,"] is deprecated, please use [series.").concat(o,"] and multiple series instead."))}))}(l);var u=l.type,c=Jc(l),d=null!==(i=null===(n=l.tooltip)||void 0===n?void 0:n.position)&&void 0!==i?i:{},h=function(e){if(null!=e&&!nd(e)&&!lc(e))throw new Error("AG Charts - unknown series type: ".concat(e,"; expected one of: ").concat(Ju.seriesTypes))};h(c);var p,f=(0,ne.Z)(null!==(r=l.series)&&void 0!==r?r:[]);try{for(f.s();!(p=f.n()).done;){var v=p.value.type;null!=v&&h(v)}}catch(T){f.e(T)}finally{f.f()}l=Object.assign(Object.assign({},l),{type:c});var g="line";$c(l)?g="line":ed(l)?g="treemap":td(l)&&(g="pie");var m={},y=lc(c);y?m=y:"bar"===c?m=hc:"scatter"===c||"histogram"===c?m=pc:$c(l)&&(m=dc),function(e){zi(e,(function(e,t){"enabled"in t&&!1===t.enabled&&Object.entries(t).forEach((function(e){var n=(0,re.Z)(e,1)[0];"enabled"!==n&&delete t[n]}))}),{skip:["data","theme"]})}(l);var C=function(e,t){var n=function(e){var t,n,i=Yc(e.theme),r=i.config[null!==(t=Jc(e))&&void 0!==t?t:"cartesian"],o=Object.entries(i.config).reduce((function(e,t){var n=(0,re.Z)(t,2),i=n[0],r=n[1].series;return e[i]=null===r||void 0===r?void 0:r[i],e}),{});return{theme:i,axesThemes:null!==(n=r.axes)&&void 0!==n?n:{},seriesThemes:o,cleanedTheme:Bi([r,{axes:Vi,series:Vi}])}}(t),i=n.theme,r=n.cleanedTheme,o=n.axesThemes,a=n.seriesThemes,s={colourIndex:0,palette:i.palette},l=Bi([e,r,t],od);return{context:s,mergedOptions:l,axesThemes:o,seriesThemes:a}}(m,l),k=C.context,w=C.mergedOptions,S=C.axesThemes,b=C.seriesThemes;w.series=Qc(0,(null!==(o=w.series)&&void 0!==o?o:[]).map((function(e){var t=g;e.type?t=e.type:nd(u)&&(t=u);var n=function(e,t,n,i){var r,o,a=Bi([Object.assign({},i),null===(r=e.tooltip)||void 0===r?void 0:r.position],od);return Bi([null!==(o=n[t])&&void 0!==o?o:{},Object.assign(Object.assign({},e),{type:t,tooltip:Object.assign(Object.assign({},e.tooltip),{position:a})})],od)}(e,t,b,d);return"pie"===t&&function(e,t,n){Array.isArray(t.innerLabels)?n.innerLabels=t.innerLabels.map((function(t){return Bi([e.innerLabels,t])})):n.innerLabels=Vi}(b.pie,e,n),n}))).map((function(e){return function(e,t){for(var n=ld(e,t),i={stacked:Vi,grouped:Vi},r=arguments.length,o=new Array(r>2?r-2:0),a=2;a<r;a++)o[a-2]=arguments[a];return Bi([].concat(o,[n,t,i]),od)}(k,e)}));var E=function(e){var t,n=null!=(t=e)&&kl.has(t);return n||Oe.warnOnce("AG Charts - unknown axis type: ".concat(e,"; expected one of: ").concat(kl.axesTypes,", ignoring.")),n};if("axes"in w){var x,R=!0,D=(0,ne.Z)(null!==(a=w.axes)&&void 0!==a?a:[]);try{for(D.s();!(x=D.n()).done;){E(x.value.type)||(R=!1)}}catch(T){D.e(T)}finally{D.f()}w.axes=R?null===(s=w.axes)||void 0===s?void 0:s.map((function(e){var t,n,i=e.type;return function(e,t){var n={top:Vi,bottom:Vi,left:Vi,right:Vi};if(e.crossLines){Array.isArray(e.crossLines)||(Oe.warn("axis[].crossLines should be an array."),e.crossLines=[]);var i=t.crossLines;e.crossLines=e.crossLines.map((function(e){return Bi([i,e])}))}return Bi([t,{crossLines:Vi},e,n],od)}(e,Bi([S[i],null!==(n=S[i][null!==(t=e.position)&&void 0!==t?t:"unknown"])&&void 0!==n?n:{}]))})):m.axes,function(e,t){var n,i,r,o;if(void 0!==(null===(n=e.legend)||void 0===n?void 0:n.enabled)||void 0!==(null===(i=t.legend)||void 0===i?void 0:i.enabled))return;if(null!==(r=t.legend)&&void 0!==r||(t.legend={}),(null!==(o=e.series)&&void 0!==o?o:[]).length>1)return void(t.legend.enabled=!0);t.legend.enabled=!1}(l,w)}return function(e,t){zi(e,(function(e,t,n){if(n){var i=n._enabledFromTheme;null!=i&&delete n._enabledFromTheme,"enabled"in n&&(i||null==t.enabled&&(n.enabled=!0))}}),{skip:["data","theme"]},t),zi(t,(function(e,t){null!=t._enabledFromTheme&&delete t._enabledFromTheme}),{skip:["data","theme"]})}(l,w),w}cc("pie",(function(e){return(0,e.takeColors)(e.colorsCount)}));var sd=function(e){var t=(0,e.takeColors)(1);return{fill:(0,re.Z)(t.fills,1)[0],stroke:(0,re.Z)(t.strokes,1)[0]}};function ld(e,t){var n,i,r=(i=t.type,oc[i]);if(!r)return{};var o=e.palette,a=o.fills,s=o.strokes;return r({seriesCount:id(null!==(n=t.yKeys)&&void 0!==n?n:[])||1,colorsCount:Math.max(a.length,s.length),takeColors:function(t){var n={fills:rd(e,a,t),strokes:rd(e,s,t)};return e.colourIndex+=t,n}})}cc("area",sd),cc("bar",sd),cc("column",sd),cc("histogram",sd),cc("scatter",(function(e){var t=sd(e);return{marker:{fill:t.fill,stroke:t.stroke}}})),cc("line",(function(e){var t=sd(e),n=t.fill;return{stroke:n,marker:{fill:n,stroke:t.stroke}}}));var ud=function(){function e(){(0,p.Z)(this,e),this.destroyFns=[]}return(0,f.Z)(e,[{key:"destroy",value:function(){var e,t=(0,ne.Z)(this.destroyFns);try{for(t.s();!(e=t.n()).done;){(0,e.value)()}}catch(n){t.e(n)}finally{t.f()}}}]),e}(),cd=[];function dd(e){var t=cd.find((function(t){return e.type===t.type&&e.optionsKey===t.optionsKey&&e.identifier===t.identifier}));if(t){if("enterprise"===e.packageType&&"community"===t.packageType){var n=cd.indexOf(t);cd.splice(n,1,e)}}else cd.push(e)}var hd=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},pd=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments))._fill="#f2f2f2",e._stroke="#999999",e._strokeWidth=1,e._lineCap="square",e._centerX=0,e._centerY=0,e._width=8,e._gripLineGap=2,e._gripLineLength=8,e._height=16,e}return(0,f.Z)(n,[{key:"centerX",get:function(){return this._centerX},set:function(e){this._centerX!==e&&(this._centerX=e,this.dirtyPath=!0)}},{key:"centerY",get:function(){return this._centerY},set:function(e){this._centerY!==e&&(this._centerY=e,this.dirtyPath=!0)}},{key:"width",get:function(){return this._width},set:function(e){this._width!==e&&(this._width=e,this.dirtyPath=!0)}},{key:"gripLineGap",get:function(){return this._gripLineGap},set:function(e){this._gripLineGap!==e&&(this._gripLineGap=e,this.dirtyPath=!0)}},{key:"gripLineLength",get:function(){return this._gripLineLength},set:function(e){this._gripLineLength!==e&&(this._gripLineLength=e,this.dirtyPath=!0)}},{key:"height",get:function(){return this._height},set:function(e){this._height!==e&&(this._height=e,this.dirtyPath=!0)}},{key:"computeBBox",value:function(){var e=this.centerX,t=this.centerY,n=this.width,i=this.height;return new he(e-n/2,t-i/2,n,i)}},{key:"isPointInPath",value:function(e,t){var n=this.transformPoint(e,t);return this.computeBBox().containsPoint(n.x,n.y)}},{key:"updatePath",value:function(){var e=this.path,t=this.centerX,n=this.centerY,i=this.width,r=this.height;e.clear();var o=t-i/2,a=n-r/2,s=this.align(o),l=this.align(a),u=s+this.align(o,i),c=l+this.align(a,r);e.moveTo(s,l),e.lineTo(u,l),e.lineTo(u,c),e.lineTo(s,c),e.lineTo(s,l);var d=this.gripLineGap/2,h=this.gripLineLength/2;e.moveTo(this.align(t-d),this.align(n-h)),e.lineTo(this.align(t-d),this.align(n+h)),e.moveTo(this.align(t+d),this.align(n-h)),e.lineTo(this.align(t+d),this.align(n+h))}}]),n}(Ir);pd.className="RangeHandle",hd([vt(Gt)],pd.prototype,"_fill",void 0),hd([vt(Gt)],pd.prototype,"_stroke",void 0),hd([vt(Bt(0))],pd.prototype,"_strokeWidth",void 0),hd([vt(un)],pd.prototype,"_lineCap",void 0),hd([vt(Bt(0))],pd.prototype,"_width",void 0),hd([vt(Bt(0))],pd.prototype,"_gripLineGap",void 0),hd([vt(Bt(0))],pd.prototype,"_gripLineLength",void 0),hd([vt(Bt(0))],pd.prototype,"_height",void 0);var fd=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},vd=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.apply(this,arguments))._stroke="#999999",e._strokeWidth=1,e._fill="#999999",e._fillOpacity=.2,e._lineCap="square",e._x=0,e._y=0,e._width=200,e._height=30,e.minRange=.05,e._min=0,e._max=1,e}return(0,f.Z)(n,[{key:"x",get:function(){return this._x},set:function(e){this._x!==e&&(this._x=e,this.dirtyPath=!0)}},{key:"y",get:function(){return this._y},set:function(e){this._y!==e&&(this._y=e,this.dirtyPath=!0)}},{key:"width",get:function(){return this._width},set:function(e){this._width!==e&&(this._width=e,this.dirtyPath=!0)}},{key:"height",get:function(){return this._height},set:function(e){this._height!==e&&(this._height=e,this.dirtyPath=!0)}},{key:"min",get:function(){return this._min},set:function(e){var t;e=Math.min(Math.max(e,0),this.max-this.minRange),isNaN(e)||this._min!==e&&(this._min=e,this.dirtyPath=!0,null===(t=this.onRangeChange)||void 0===t||t.call(this))}},{key:"max",get:function(){return this._max},set:function(e){var t;e=Math.max(Math.min(e,1),this.min+this.minRange),isNaN(e)||this._max!==e&&(this._max=e,this.dirtyPath=!0,null===(t=this.onRangeChange)||void 0===t||t.call(this))}},{key:"computeBBox",value:function(){var e=this.x,t=this.y,n=this.width,i=this.height;return new he(e,t,n,i)}},{key:"computeVisibleRangeBBox",value:function(){var e=this.x,t=this.y,n=this.width,i=this.height,r=this.min,o=this.max,a=e+n*r;return new he(a,t,e+n*o-a,i)}},{key:"updatePath",value:function(){var e=this.path,t=this.x,n=this.y,i=this.width,r=this.height,o=this.min,a=this.max;e.clear();var s=this.align(t),l=this.align(n),u=s+this.align(t,i),c=l+this.align(n,r);e.moveTo(s,l),e.lineTo(u,l),e.lineTo(u,c),e.lineTo(s,c),e.lineTo(s,l);var d=this.align(t+i*o),h=this.align(t+i*a);e.moveTo(d,l),e.lineTo(d,c),e.lineTo(h,c),e.lineTo(h,l),e.lineTo(d,l)}}]),n}(Ir);vd.className="RangeMask",fd([vt(Gt)],vd.prototype,"_stroke",void 0),fd([vt(Bt(0))],vd.prototype,"_strokeWidth",void 0),fd([vt(Gt)],vd.prototype,"_fill",void 0),fd([vt(Bt(0,1))],vd.prototype,"_fillOpacity",void 0),fd([vt(un)],vd.prototype,"_lineCap",void 0),fd([vt(Bt(0))],vd.prototype,"_width",void 0),fd([vt(Bt(0))],vd.prototype,"_height",void 0),fd([vt(Bt())],vd.prototype,"_min",void 0),fd([vt(Bt())],vd.prototype,"_max",void 0);var gd=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.call(this,{name:"rangeSelectorGroup"})).minHandle=new pd,e.maxHandle=new pd,e.mask=function(){var t=n.defaults,i=t.x,r=t.y,o=t.width,a=t.height,s=t.min,l=t.max,u=new vd;u.x=i,u.y=r,u.width=o,u.height=a,u.min=s,u.max=l;var c=(0,le.Z)(e),d=c.minHandle,h=c.maxHandle;return d.centerX=i,h.centerX=i+o,d.centerY=h.centerY=r+a/2,e.append([u,d,h]),u.onRangeChange=function(){var t;e.updateHandles(),null===(t=e.onRangeChange)||void 0===t||t.call((0,le.Z)(e))},u}(),e._x=n.defaults.x,e._y=n.defaults.y,e._width=n.defaults.width,e._height=n.defaults.height,e._min=n.defaults.min,e._max=n.defaults.max,e.isContainerNode=!0,e}return(0,f.Z)(n,[{key:"x",get:function(){return this.mask.x},set:function(e){this.mask.x=e,this.updateHandles()}},{key:"y",get:function(){return this.mask.y},set:function(e){this.mask.y=e,this.updateHandles()}},{key:"width",get:function(){return this.mask.width},set:function(e){this.mask.width=e,this.updateHandles()}},{key:"height",get:function(){return this.mask.height},set:function(e){this.mask.height=e,this.updateHandles()}},{key:"min",get:function(){return this.mask.min},set:function(e){this.mask.min=e}},{key:"max",get:function(){return this.mask.max},set:function(e){this.mask.max=e}},{key:"updateHandles",value:function(){var e=this.minHandle,t=this.maxHandle,n=this.x,i=this.y,r=this.width,o=this.height,a=this.mask;e.centerX=n+r*a.min,t.centerX=n+r*a.max,e.centerY=t.centerY=i+o/2}},{key:"computeBBox",value:function(){return this.mask.computeBBox()}},{key:"computeVisibleRangeBBox",value:function(){return this.mask.computeVisibleRangeBBox()}},{key:"render",value:function(e){var t=e.ctx,n=e.forceRender,i=e.stats;this.dirty!==fe.NONE||n?(this.computeTransformMatrix(),this.matrix.toContext(t),[this.mask,this.minHandle,this.maxHandle].forEach((function(i){i.visible&&(n||i.dirty>fe.NONE)&&(t.save(),i.render(Object.assign(Object.assign({},e),{ctx:t,forceRender:n})),t.restore())})),this.markClean({force:!0}),i&&i.nodesRendered++):i&&i.nodesSkipped++}}]),n}(Ae);gd.className="Range",gd.defaults={x:0,y:0,width:200,height:30,min:0,max:1};var md=function(){function e(t){(0,p.Z)(this,e),this.rm=t}return(0,f.Z)(e,[{key:"fill",get:function(){return this.rm.fill},set:function(e){this.rm.fill=e}},{key:"stroke",get:function(){return this.rm.stroke},set:function(e){this.rm.stroke=e}},{key:"strokeWidth",get:function(){return this.rm.strokeWidth},set:function(e){this.rm.strokeWidth=e}},{key:"fillOpacity",get:function(){return this.rm.fillOpacity},set:function(e){this.rm.fillOpacity=e}}]),e}(),yd=function(){function e(t){(0,p.Z)(this,e),this.rh=t}return(0,f.Z)(e,[{key:"fill",get:function(){return this.rh.fill},set:function(e){this.rh.fill=e}},{key:"stroke",get:function(){return this.rh.stroke},set:function(e){this.rh.stroke=e}},{key:"strokeWidth",get:function(){return this.rh.strokeWidth},set:function(e){this.rh.strokeWidth=e}},{key:"width",get:function(){return this.rh.width},set:function(e){this.rh.width=e}},{key:"height",get:function(){return this.rh.height},set:function(e){this.rh.height=e}},{key:"gripLineGap",get:function(){return this.rh.gripLineGap},set:function(e){this.rh.gripLineGap=e}},{key:"gripLineLength",get:function(){return this.rh.gripLineLength},set:function(e){this.rh.gripLineLength=e}}]),e}(),Cd=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},kd=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i,r;return(0,p.Z)(this,n),(i=t.call(this)).ctx=e,i.rs=new gd,i.mask=new md(i.rs.mask),i.minHandle=new yd(i.rs.minHandle),i.maxHandle=new yd(i.rs.maxHandle),i.minHandleDragging=!1,i.maxHandleDragging=!1,i.panHandleOffset=NaN,i._enabled=!1,i.margin=10,i._visible=!0,i.rs.onRangeChange=function(){return i.ctx.zoomManager.updateZoom("navigator",{x:{min:i.rs.min,max:i.rs.max}})},[e.interactionManager.addListener("drag-start",(function(e){return i.onDragStart(e)})),e.interactionManager.addListener("drag",(function(e){return i.onDrag(e)})),e.interactionManager.addListener("hover",(function(e){return i.onDrag(e)})),e.interactionManager.addListener("drag-end",(function(){return i.onDragStop()}))].forEach((function(t){return i.destroyFns.push((function(){return e.interactionManager.removeListener(t)}))})),[e.layoutService.addListener("before-series",(function(e){return i.layout(e)})),e.layoutService.addListener("layout-complete",(function(e){return i.layoutComplete(e)}))].forEach((function(t){return i.destroyFns.push((function(){return e.layoutService.removeListener(t)}))})),null===(r=e.scene.root)||void 0===r||r.appendChild(i.rs),i.destroyFns.push((function(){var t;return null===(t=e.scene.root)||void 0===t?void 0:t.removeChild(i.rs)})),i.destroyFns.push((function(){return i.ctx.zoomManager.updateZoom("navigator")})),i.updateGroupVisibility(),i}return(0,f.Z)(n,[{key:"enabled",get:function(){return this._enabled},set:function(e){this._enabled=e,this.updateGroupVisibility()}},{key:"width",get:function(){return this.rs.width},set:function(e){this.rs.width=e}},{key:"height",get:function(){return this.rs.height},set:function(e){this.rs.height=e}},{key:"min",get:function(){return this.rs.min},set:function(e){this.rs.min=e}},{key:"max",get:function(){return this.rs.max},set:function(e){this.rs.max=e}},{key:"visible",get:function(){return this._visible},set:function(e){this._visible=e,this.updateGroupVisibility()}},{key:"updateGroupVisibility",value:function(){var e=this.enabled&&this.visible;this.rs.visible=e,e?this.ctx.zoomManager.updateZoom("navigator",{x:{min:this.rs.min,max:this.rs.max}}):this.ctx.zoomManager.updateZoom("navigator")}},{key:"layout",value:function(e){var t=e.shrinkRect;if(this.enabled){var n=this.rs.height+this.margin;t.shrink(n,"bottom"),this.rs.y=t.y+t.height+this.margin}return{shrinkRect:t}}},{key:"layoutComplete",value:function(e){var t=e.series,n=t.rect,i=t.visible;this.enabled&&i&&(this.rs.x=n.x,this.rs.width=n.width),this.visible=i}},{key:"onDragStart",value:function(e){if(this.enabled){var t=e.offsetX,n=e.offsetY,i=this.rs,r=i.minHandle,o=i.maxHandle,a=i.x,s=i.width,l=i.min,u=i.computeVisibleRangeBBox();this.minHandleDragging||this.maxHandleDragging||(r.containsPoint(t,n)?this.minHandleDragging=!0:o.containsPoint(t,n)?this.maxHandleDragging=!0:u.containsPoint(t,n)&&(this.panHandleOffset=(t-a)/s-l))}}},{key:"onDrag",value:function(e){if(this.enabled){var t=this.rs,n=this.panHandleOffset,i=t.x,r=t.y,o=t.width,a=t.height,s=t.minHandle,l=t.maxHandle,u=e.offsetX,c=e.offsetY,d=i+o*t.min,h=i+o*t.max,p=new he(d,r,h-d,a),f=function(){return Math.min(Math.max((u-i)/o,0),1)};if(s.containsPoint(u,c)||l.containsPoint(u,c)?this.ctx.cursorManager.updateCursor("navigator","ew-resize"):p.containsPoint(u,c)?this.ctx.cursorManager.updateCursor("navigator","grab"):this.ctx.cursorManager.updateCursor("navigator"),this.minHandleDragging)t.min=f();else if(this.maxHandleDragging)t.max=f();else if(!isNaN(n)){var v=t.max-t.min,g=Math.min(f()-n,1-v);g<=t.min?(t.min=g,t.max=t.min+v):(t.max=g+v,t.min=t.max-v)}}}},{key:"onDragStop",value:function(){this.stopHandleDragging()}},{key:"stopHandleDragging",value:function(){this.minHandleDragging=this.maxHandleDragging=!1,this.panHandleOffset=NaN}}]),n}(ud);Cd([vt(Dt)],kd.prototype,"_enabled",void 0),Cd([vt(Bt(0))],kd.prototype,"margin",void 0);var wd={type:"root",optionsKey:"navigator",packageType:"community",chartTypes:["cartesian"],instanceConstructor:kd,themeTemplate:{navigator:{enabled:!1,height:30,mask:{fill:"#999999",stroke:"#999999",strokeWidth:1,fillOpacity:.2},minHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:8,height:16,gripLineGap:2,gripLineLength:8},maxHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:8,height:16,gripLineGap:2,gripLineLength:8}}}};dd(wd);var Sd=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},bd=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i,r;(0,p.Z)(this,n),(i=t.call(this)).onLayoutComplete=function(e){var t=e.chart,n=t.width,r=t.height;i.rectNode.width=n,i.rectNode.height=r},i.node=new Ae({name:"background"}),i.node.zIndex=qt.SERIES_BACKGROUND_ZINDEX,i.rectNode=new ql,i.node.appendChild(i.rectNode),i.fill="white",i.visible=!0,null===(r=e.scene.root)||void 0===r||r.appendChild(i.node),i.destroyFns.push((function(){var t;return null===(t=e.scene.root)||void 0===t?void 0:t.removeChild(i.node)}));var o=e.layoutService.addListener("layout-complete",i.onLayoutComplete);return i.destroyFns.push((function(){return e.layoutService.removeListener(o)})),i}return(0,f.Z)(n)}(ud);Sd([vt(Dt),ni("node","visible")],bd.prototype,"visible",void 0),Sd([vt(Zt),ni("rectNode","fill")],bd.prototype,"fill",void 0);var Ed={type:"root",optionsKey:"background",packageType:"community",chartTypes:["cartesian","polar","hierarchy"],instanceConstructor:bd};dd(Ed);var xd=0;var Rd=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))};function Dd(e){if($c(e))return"cartesian";if(td(e))return"polar";if(ed(e))return"hierarchy";throw new Error("AG Chart - unknown type of chart for options with type: ".concat(e.type))}var Td=function(){function e(){(0,p.Z)(this,e)}return(0,f.Z)(e,null,[{key:"create",value:function(e){return Pd.createOrUpdate(e)}},{key:"update",value:function(e,t){if(!Od.isInstance(e))throw new Error("AG Charts - invalid chart reference passed");Pd.createOrUpdate(t,e)}},{key:"updateDelta",value:function(e,t){if(!Od.isInstance(e))throw new Error("AG Charts - invalid chart reference passed");return Pd.updateUserDelta(e,t)}},{key:"download",value:function(e,t){if(!(e instanceof Od))throw new Error("AG Charts - invalid chart reference passed");return Pd.download(e,t)}},{key:"getImageDataURL",value:function(e,t){if(!(e instanceof Od))throw new Error("AG Charts - invalid chart reference passed");return Pd.getImageDataURL(e,t)}}]),e}(),Od=function(){function e(t){(0,p.Z)(this,e),this.chart=t}return(0,f.Z)(e,[{key:"getOptions",value:function(){return this.chart.getOptions()}},{key:"destroy",value:function(){this.chart.destroy()}}],[{key:"isInstance",value:function(t){var n,i;if(t instanceof e)return!0;if("AgChartInstanceProxy"===(null===(n=t.constructor)||void 0===n?void 0:n.name)&&null!=t.chart)return!0;var r=Object.keys(null===(i=t.constructor)||void 0===i?void 0:i.prototype);return!(!Object.keys(e.prototype).every((function(e){return r.includes(e)}))||null==t.chart)}}]),e}(),Pd=function(){function e(){(0,p.Z)(this,e)}return(0,f.Z)(e,null,[{key:"initialiseModules",value:function(){e.initialised||(!function(){var e,t=(0,ne.Z)(cd);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(null!=hs.constructors&&null!=n.optionConstructors&&Object.assign(hs.constructors,n.optionConstructors),"root"===n.type&&n.themeTemplate){var i,r=(0,ne.Z)(n.chartTypes);try{for(r.s();!(i=r.n()).done;)$u(i.value,n.themeTemplate)}catch(s){r.e(s)}finally{r.f()}}if("series"===n.type){if(n.chartTypes.length>1)throw new Error("AG Charts - Module definition error: "+n.identifier);ac(n.identifier,n.chartTypes[0],n.instanceConstructor,n.seriesDefaults,n.themeTemplate,n.paletteFactory)}if("axis-option"===n.type&&n.themeTemplate){var o,a=(0,ne.Z)(n.axisTypes);try{for(a.s();!(o=a.n()).done;)Sl(o.value,n.themeTemplate)}catch(s){a.e(s)}finally{a.f()}}"axis"===n.type&&(yl(n.identifier,n.instanceConstructor),n.themeTemplate&&Sl(n.identifier,n.themeTemplate)),"legend"===n.type&&ho(n.identifier,n.instanceConstructor)}}catch(s){t.e(s)}finally{t.f()}}(),e.initialised=!0)}},{key:"createOrUpdate",value:function(t,n){var i=this;e.initialiseModules(),Ad(">>> AgChartV2.createOrUpdate() user options",t);var r={};!0===e.DEBUG()&&(r.debug=!0);var o=t.overrideDevicePixelRatio;delete t.overrideDevicePixelRatio;var a=ad(t,r),s=null===n||void 0===n?void 0:n.chart;null!=s&&Dd(t)===Dd(s.processedOptions)||(s=e.createChartInstance(a,o,s)),null==n?n=new Od(s):n.chart=s;var l=s;l.queuedUserOptions.push(t);var u=function(){var e=l.queuedUserOptions.indexOf(t);l.queuedUserOptions.splice(0,e)};return l.requestFactoryUpdate((function(){return Rd(i,void 0,void 0,(0,ie.Z)().mark((function n(){var i;return(0,ie.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!l.destroyed){n.next=2;break}return n.abrupt("return");case 2:if(null!=(i=Zi(l.processedOptions,a))){n.next=6;break}return u(),n.abrupt("return");case 6:return n.next=8,e.updateDelta(l,i,t);case 8:u();case 9:case"end":return n.stop()}}),n)})))})),n}},{key:"updateUserDelta",value:function(t,n){var i,r=t.chart,o=t.chart.queuedUserOptions,a=null!==(i=o[o.length-1])&&void 0!==i?i:r.userOptions,s=Bi([a,n]);Ad(">>> AgChartV2.updateUserDelta() user delta",n),Ad("AgChartV2.updateUserDelta() - base options",a),e.createOrUpdate(s,t)}},{key:"download",value:function(t,n){Rd(this,void 0,void 0,(0,ie.Z)().mark((function i(){var r;return(0,ie.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,e.prepareResizedChart(t,n);case 2:(r=i.sent).chart.scene.download(null===n||void 0===n?void 0:n.fileName,null===n||void 0===n?void 0:n.fileFormat),r!==t&&r.destroy();case 6:case"end":return i.stop()}}),i)}))).catch((function(e){return Oe.errorOnce(e)}))}},{key:"getImageDataURL",value:function(t,n){return Rd(this,void 0,void 0,(0,ie.Z)().mark((function i(){var r,o,a;return(0,ie.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,e.prepareResizedChart(t,n);case 2:return r=i.sent,o=r.chart,a=o.scene.canvas.getDataURL(null===n||void 0===n?void 0:n.fileFormat),r!==t&&r.destroy(),i.abrupt("return",a);case 7:case"end":return i.stop()}}),i)})))}},{key:"prepareResizedChart",value:function(t,n){return Rd(this,void 0,void 0,(0,ie.Z)().mark((function i(){var r,o,a,s,l,u,c,d;return(0,ie.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(r=t.chart,a=(o=null!==n&&void 0!==n?n:{}).width,s=o.height,l=r.width,u=r.height,!(void 0===a&&void 0===s||1===r.scene.canvas.pixelRatio&&l===a&&u===s)){i.next=7;break}return i.abrupt("return",t);case 7:return a=null!==a&&void 0!==a?a:l,s=null!==s&&void 0!==s?s:u,c=Object.assign(Object.assign({},r.userOptions),{container:document.createElement("div"),width:a,height:s,autoSize:!1,overrideDevicePixelRatio:1}),d=e.createOrUpdate(c),i.next=13,d.chart.waitForUpdate();case 13:return i.abrupt("return",d);case 14:case"end":return i.stop()}}),i)})))}},{key:"createChartInstance",value:function(e,t,n){var i=null===n||void 0===n?void 0:n.destroy({keepTransferableResources:!0});if($c(e))return new el(document,t,i);if(ed(e))return new ol(document,t,i);if(td(e))return new il(document,t,i);throw new Error("AG Charts - couldn't apply configuration, check type of options: ".concat(e.type))}},{key:"updateDelta",value:function(e,t,n){var i;return Rd(this,void 0,void 0,(0,ie.Z)().mark((function r(){return(0,ie.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return null==t.type&&(t=Object.assign(Object.assign({},t),{type:null!==(i=e.processedOptions.type)&&void 0!==i?i:Jc(t)})),r.next=3,e.awaitUpdateCompletion();case 3:if(!e.destroyed){r.next=5;break}return r.abrupt("return");case 5:Ad("AgChartV2.updateDelta() - applying delta",t),Md(e,t,n);case 7:case"end":return r.stop()}}),r)})))}}]),e}();function Ad(e){if([!0,"opts"].includes(Pd.DEBUG())){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];Oe.debug.apply(Oe,[e].concat(n))}}function Md(e,t,n){var i,r,o,a,s=Bi([null!==(i=e.processedOptions)&&void 0!==i?i:{},t],od),l=function(e,t){var n,i=function(t){return e instanceof el&&t.chartTypes.includes("cartesian")||e instanceof il&&t.chartTypes.includes("polar")||e instanceof ol&&t.chartTypes.includes("hierarchy")},r=!1,o=cd.filter((function(e){return"root"===e.type})),a=(0,ne.Z)(o);try{for(a.s();!(n=a.n()).done;){var s=n.value,l=i(s)&&null!=t[s.optionsKey];l!==e.isModuleEnabled(s)&&(r=!0,l?e.addModule(s):e.removeModule(s))}}catch(u){a.e(u)}finally{a.f()}return r}(e,s),u=["type","data","series","listeners","theme","legend"];if($c(t)||td(t))u.push("axes");else if(!ed(t))throw new Error("AG Charts - couldn't apply configuration, check type of options and chart: ".concat(t.type));t.listeners&&Ld(e,t.listeners),Id(e,t,{skip:u});var c=!1;if(t.series&&t.series.length>0&&(!function(e,t){var n=t.series;if(!n)return;var i=e.series.length===n.length&&e.series.every((function(e,t){var i;return e.type===(null===(i=n[t])||void 0===i?void 0:i.type)}));if(i)return void e.series.forEach((function(t,i){var r,o,a,s,l=Zi(null!==(a=null===(o=null===(r=e.processedOptions)||void 0===r?void 0:r.series)||void 0===o?void 0:o[i])&&void 0!==a?a:{},null!==(s=n[i])&&void 0!==s?s:{});l&&(Ad("AgChartV2.applySeries() - applying series diff idx ".concat(i),l),Fd(t,l,{path:"series[".concat(i,"]"),index:i}),t.markNodeDataDirty())}));e.series=function(e,t){var n,i,r=[],o=e.getModuleContext(),a=0,s=(0,ne.Z)(null!==t&&void 0!==t?t:[]);try{for(s.s();!(i=s.n()).done;){var l=i.value,u="series[".concat(a++,"]"),c=sc(null!==(n=l.type)&&void 0!==n?n:"unknown",o);Fd(c,l,{path:u,index:a}),r.push(c)}}catch(d){s.e(d)}finally{s.f()}return r}(e,n)}(e,t),c=!0),"axes"in t&&Array.isArray(t.axes)){var d=function(e,t){var n=t.axes;if(!n)return!1;if(e.axes.length===n.length&&e.axes.every((function(e,t){return e.type===n[t].type}))){var i=e.processedOptions;if($c(i))return e.axes.forEach((function(e,t){var r,o,a=Zi(null!==(o=null===(r=i.axes)||void 0===r?void 0:r[t])&&void 0!==o?o:{},n[t]);Ad("AgChartV2.applyAxes() - applying axis diff idx ".concat(t),a),Id(e,a,{path:"axes[".concat(t,"]"),skip:["axes[].type"]})})),!0}return e.axes=function(e,t){var n,i=[],r=["axes[].type"],o=e.getModuleContext(),a=0,s=(0,ne.Z)(null!==t&&void 0!==t?t:[]);try{for(s.s();!(n=s.n()).done;){var l=n.value,u=Cl(l.type,o),c="axes[".concat(a++,"]");Nd(u,l),Id(u,l,{path:c,skip:r}),i.push(u)}}catch(d){s.e(d)}finally{s.f()}return i}(e,n),!0}(e,t);d&&(c=!0)}!function(e,t){var n=["listeners"];e.setLegendInit((function(i){var r,o,a,s;Id(i,null!==(r=t.legend)&&void 0!==r?r:{},{skip:n}),(null===(o=t.legend)||void 0===o?void 0:o.listeners)&&Object.assign(null===(a=e.legend)||void 0===a?void 0:a.listeners,null!==(s=t.legend.listeners)&&void 0!==s?s:{})}))}(e,t);var h=t.series,p=!!t.data||(null===h||void 0===h?void 0:h.some((function(e){return null!=e.data}))),f=null!==(o=null!==(r=t.legend)&&void 0!==r?r:t.title)&&void 0!==o?o:t.subtitle;c=c||p||!!f,t.data&&(e.data=t.data),t.listeners&&e.updateAllSeriesListeners(),e.processedOptions=s,e.userOptions=Bi([null!==(a=e.userOptions)&&void 0!==a?a:{},n],od);var v=c||l?Cr.PROCESS_DATA:Cr.PERFORM_LAYOUT;Ad("AgChartV2.applyChartOptions() - update type",Cr[v]),e.update(v,{forceNodeDataRefresh:c})}function Nd(e,t){var n,i=!1,r=cd.filter((function(e){return"axis-option"===e.type})),o=(0,ne.Z)(r);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=null!=t[a.optionsKey];s!==e.isModuleEnabled(a)&&(i=!0,s?e.addModule(a):e.removeModule(a))}}catch(l){o.e(l)}finally{o.f()}return i}function Ld(e,t){for(var n in e.clearEventListeners(),t){var i=t[n];"function"===typeof i&&e.addEventListener(n,i)}}function Id(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.skip,r=n.path,o=Object.assign(Object.assign(Object.assign({},vs()),{skip:i}),r?{path:r}:{});return Wi(e,t,o)}function Fd(e,t){var n,i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.path,a=r.index,s=["series[].listeners","series[].seriesGrouping"],l=vs(),u=null!==(n=l.constructors)&&void 0!==n?n:{},c={constructors:Object.assign(Object.assign({},u),{title:"pie"===e.type?ss:u.title})},d=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},l),c),{skip:["series[].type"].concat((0,te.Z)(null!==s&&void 0!==s?s:[]))}),o?{path:o}:{}),{idx:null!==a&&void 0!==a?a:-1}),h=Wi(e,t,d),p=null===t||void 0===t?void 0:t.listeners;null!=p&&Ld(e,p);var f=t.seriesGrouping;if("seriesGrouping"in(null!==t&&void 0!==t?t:{}))if(f){var v=Object.freeze(Object.assign(Object.assign({},null!==(i=e.seriesGrouping)&&void 0!==i?i:{}),f));e.seriesGrouping=v}else e.seriesGrouping=f;return h}Pd.DEBUG=function(){var e;return null!==(e=Le("agChartsDebug"))&&void 0!==e&&e},Pd.initialised=!1;var _d,Gd="8.2.0",Zd=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};!function(e){e[e.Open=0]="Open",e[e.Chord=1]="Chord",e[e.Round=2]="Round"}(_d||(_d={}));var Vd=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;return(0,p.Z)(this,n),(e=t.call(this)).centerX=0,e.centerY=0,e.radius=10,e.startAngle=0,e.endAngle=2*Math.PI,e.counterClockwise=!1,e.type=_d.Open,e.restoreOwnStyles(),e}return(0,f.Z)(n,[{key:"fullPie",get:function(){return za(Ze(this.startAngle),Ze(this.endAngle))}},{key:"updatePath",value:function(){var e=this.path;e.clear(),e.arc(this.centerX,this.centerY,this.radius,this.startAngle,this.endAngle,this.counterClockwise),this.type===_d.Chord?e.closePath():this.type!==_d.Round||this.fullPie||(e.lineTo(this.centerX,this.centerY),e.closePath())}},{key:"computeBBox",value:function(){return new he(this.centerX-this.radius,this.centerY-this.radius,2*this.radius,2*this.radius)}},{key:"isPointInPath",value:function(e,t){var n=this.transformPoint(e,t),i=this.computeBBox();return this.type!==_d.Open&&i.containsPoint(n.x,n.y)&&this.path.isPointInPath(n.x,n.y)}}]),n}(Ir);Vd.className="Arc",Vd.defaultStyles=Object.assign({},Ke.defaultStyles,{lineWidth:1,fillStyle:null}),Zd([Lr()],Vd.prototype,"centerX",void 0),Zd([Lr()],Vd.prototype,"centerY",void 0),Zd([Lr()],Vd.prototype,"radius",void 0),Zd([Lr()],Vd.prototype,"startAngle",void 0),Zd([Lr()],Vd.prototype,"endAngle",void 0),Zd([Lr()],Vd.prototype,"counterClockwise",void 0),Zd([Lr()],Vd.prototype,"type",void 0);var Hd=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Bd=function(e){(0,d.Z)(n,e);var t=(0,h.Z)(n);function n(e){var i;return(0,p.Z)(this,n),(i=t.call(this)).x=0,i.y=0,i.width=0,i.height=0,i.opacity=1,i.sourceImage=e,i}return(0,f.Z)(n,[{key:"render",value:function(e){var t=e.ctx,i=e.forceRender,r=e.stats;if(this.dirty!==fe.NONE||i){this.computeTransformMatrix(),this.matrix.toContext(t);var o=this.sourceImage;t.globalAlpha=this.opacity,t.drawImage(o,0,0,o.width,o.height,this.x,this.y,this.width,this.height),(0,oe.Z)((0,ae.Z)(n.prototype),"render",this).call(this,e)}else r&&r.nodesSkipped++}}]),n}(Ee);Hd([Ce({redraw:fe.MAJOR})],Bd.prototype,"x",void 0),Hd([Ce({redraw:fe.MAJOR})],Bd.prototype,"y",void 0),Hd([Ce({redraw:fe.MAJOR})],Bd.prototype,"width",void 0),Hd([Ce({redraw:fe.MAJOR})],Bd.prototype,"height",void 0),Hd([Ce({redraw:fe.MAJOR})],Bd.prototype,"opacity",void 0);var Wd=Object.entries(Kc).reduce((function(e,t){var n=(0,re.Z)(t,2),i=n[0],r=n[1];return e[i]=r(),e}),{})}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}!function(){var e,t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};n.t=function(i,r){if(1&r&&(i=this(i)),8&r)return i;if("object"===typeof i&&i){if(4&r&&i.__esModule)return i;if(16&r&&"function"===typeof i.then)return i}var o=Object.create(null);n.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&i;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((function(e){a[e]=function(){return i[e]}}));return a.default=function(){return i},n.d(o,a),o}}(),n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",function(){"use strict";var e=n(2791),t=n.t(e,2),i=n(1250),r=n(9439),o=n(3433),a=n(5671),s=n(3144),l=n(136),u=n(9388),c=n(8737),d=n(3878),h=n(9199),p=n(181),f=n(5267);var v,g=n(7762);function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},m.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(v||(v={}));var y,C="popstate";function k(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function w(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(je){}}}function S(e,t){return{usr:e.state,key:e.key,idx:t}}function b(e,t,n,i){return void 0===n&&(n=null),m({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?x(t):t,{state:n,key:t&&t.key||i||Math.random().toString(36).substr(2,8)})}function E(e){var t=e.pathname,n=void 0===t?"/":t,i=e.search,r=void 0===i?"":i,o=e.hash,a=void 0===o?"":o;return r&&"?"!==r&&(n+="?"===r.charAt(0)?r:"?"+r),a&&"#"!==a&&(n+="#"===a.charAt(0)?a:"#"+a),n}function x(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var i=e.indexOf("?");i>=0&&(t.search=e.substr(i),e=e.substr(0,i)),e&&(t.pathname=e)}return t}function R(e,t,n,i){void 0===i&&(i={});var r=i,o=r.window,a=void 0===o?document.defaultView:o,s=r.v5Compat,l=void 0!==s&&s,u=a.history,c=v.Pop,d=null,h=p();function p(){return(u.state||{idx:null}).idx}function f(){c=v.Pop;var e=p(),t=null==e?null:e-h;h=e,d&&d({action:c,location:y.location,delta:t})}function g(e){var t="null"!==a.location.origin?a.location.origin:a.location.href,n="string"===typeof e?e:E(e);return k(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==h&&(h=0,u.replaceState(m({},u.state,{idx:h}),""));var y={get action(){return c},get location(){return e(a,u)},listen:function(e){if(d)throw new Error("A history only accepts one active listener");return a.addEventListener(C,f),d=e,function(){a.removeEventListener(C,f),d=null}},createHref:function(e){return t(a,e)},createURL:g,encodeLocation:function(e){var t=g(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=v.Push;var i=b(y.location,e,t);n&&n(i,e);var r=S(i,h=p()+1),o=y.createHref(i);try{u.pushState(r,"",o)}catch(s){if(s instanceof DOMException&&"DataCloneError"===s.name)throw s;a.location.assign(o)}l&&d&&d({action:c,location:y.location,delta:1})},replace:function(e,t){c=v.Replace;var i=b(y.location,e,t);n&&n(i,e);var r=S(i,h=p()),o=y.createHref(i);u.replaceState(r,"",o),l&&d&&d({action:c,location:y.location,delta:0})},go:function(e){return u.go(e)}};return y}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(y||(y={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function D(e,t,n){void 0===n&&(n="/");var i=F(("string"===typeof t?x(t):t).pathname||"/",n);if(null==i)return null;var r=T(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(r);for(var o=null,a=0;null==o&&a<r.length;++a)o=N(r[a],I(i));return o}function T(e,t,n,i){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===i&&(i="");var r=function(e,r,o){var a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:r,route:e};a.relativePath.startsWith("/")&&(k(a.relativePath.startsWith(i),'Absolute route path "'+a.relativePath+'" nested under path "'+i+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(i.length));var s=V([i,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(k(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),T(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:M(s,e.index),routesMeta:l})};return e.forEach((function(e,t){var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?")){var i,o=(0,g.Z)(O(e.path));try{for(o.s();!(i=o.n()).done;){var a=i.value;r(e,t,a)}}catch(s){o.e(s)}finally{o.f()}}else r(e,t)})),t}function O(e){var t=e.split("/");if(0===t.length)return[];var n,i=(n=t,(0,d.Z)(n)||(0,h.Z)(n)||(0,p.Z)(n)||(0,f.Z)()),r=i[0],a=i.slice(1),s=r.endsWith("?"),l=r.replace(/\?$/,"");if(0===a.length)return s?[l,""]:[l];var u=O(a.join("/")),c=[];return c.push.apply(c,(0,o.Z)(u.map((function(e){return""===e?l:[l,e].join("/")})))),s&&c.push.apply(c,(0,o.Z)(u)),c.map((function(t){return e.startsWith("/")&&""===t?"/":t}))}var P=/^:\w+$/,A=function(e){return"*"===e};function M(e,t){var n=e.split("/"),i=n.length;return n.some(A)&&(i+=-2),t&&(i+=2),n.filter((function(e){return!A(e)})).reduce((function(e,t){return e+(P.test(t)?3:""===t?1:10)}),i)}function N(e,t){for(var n=e.routesMeta,i={},r="/",o=[],a=0;a<n.length;++a){var s=n[a],l=a===n.length-1,u="/"===r?t:t.slice(r.length)||"/",c=L({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},u);if(!c)return null;Object.assign(i,c.params);var d=s.route;o.push({params:i,pathname:V([r,c.pathname]),pathnameBase:H(V([r,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(r=V([r,c.pathnameBase]))}return o}function L(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});var n=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);w("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');var i=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(function(e,t){return i.push(t),"/([^\\/]+)"}));e.endsWith("*")?(i.push("*"),r+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":""!==e&&"/"!==e&&(r+="(?:(?=\\/|$))");return[new RegExp(r,t?void 0:"i"),i]}(e.path,e.caseSensitive,e.end),i=(0,r.Z)(n,2),o=i[0],a=i[1],s=t.match(o);if(!s)return null;var l=s[0],u=l.replace(/(.)\/+$/,"$1"),c=s.slice(1);return{params:a.reduce((function(e,t,n){if("*"===t){var i=c[n]||"";u=l.slice(0,l.length-i.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return w(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(c[n]||"",t),e}),{}),pathname:l,pathnameBase:u,pattern:e}}function I(e){try{return decodeURI(e)}catch(t){return w(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function F(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&"/"!==i?null:e.slice(n)||"/"}function _(e,t,n,i){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(i)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function G(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function Z(e,t,n,i){var r;void 0===i&&(i=!1),"string"===typeof e?r=x(e):(k(!(r=m({},e)).pathname||!r.pathname.includes("?"),_("?","pathname","search",r)),k(!r.pathname||!r.pathname.includes("#"),_("#","pathname","hash",r)),k(!r.search||!r.search.includes("#"),_("#","search","hash",r)));var o,a=""===e||""===r.pathname,s=a?"/":r.pathname;if(i||null==s)o=n;else{var l=t.length-1;if(s.startsWith("..")){for(var u=s.split("/");".."===u[0];)u.shift(),l-=1;r.pathname=u.join("/")}o=l>=0?t[l]:"/"}var c=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?x(e):e,i=n.pathname,r=n.search,o=void 0===r?"":r,a=n.hash,s=void 0===a?"":a,l=i?i.startsWith("/")?i:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(i,t):t;return{pathname:l,search:B(o),hash:W(s)}}(r,o),d=s&&"/"!==s&&s.endsWith("/"),h=(a||"."===s)&&n.endsWith("/");return c.pathname.endsWith("/")||!d&&!h||(c.pathname+="/"),c}var V=function(e){return e.join("/").replace(/\/\/+/g,"/")},H=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},B=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},W=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""},z=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n)}((0,c.Z)(Error));function U(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}var j=["post","put","patch","delete"],K=(new Set(j),["get"].concat(j));new Set(K),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Y.apply(this,arguments)}var X=e.createContext(null);var q=e.createContext(null);var Q=e.createContext(null);var J=e.createContext(null);var $=e.createContext(null);var ee=e.createContext({outlet:null,matches:[],isDataRoute:!1});var te=e.createContext(null);function ne(){return null!=e.useContext($)}function ie(){return ne()||k(!1),e.useContext($).location}function re(t){e.useContext(J).static||e.useLayoutEffect(t)}function oe(){return e.useContext(ee).isDataRoute?function(){var t=ge(ce.UseNavigateStable).router,n=ye(de.UseNavigateStable),i=e.useRef(!1);return re((function(){i.current=!0})),e.useCallback((function(e,r){void 0===r&&(r={}),i.current&&("number"===typeof e?t.navigate(e):t.navigate(e,Y({fromRouteId:n},r)))}),[t,n])}():function(){ne()||k(!1);var t=e.useContext(X),n=e.useContext(J),i=n.basename,r=n.navigator,o=e.useContext(ee).matches,a=ie().pathname,s=JSON.stringify(G(o).map((function(e){return e.pathnameBase}))),l=e.useRef(!1);return re((function(){l.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),l.current)if("number"!==typeof e){var o=Z(e,JSON.parse(s),a,"path"===n.relative);null==t&&"/"!==i&&(o.pathname="/"===o.pathname?i:V([i,o.pathname])),(n.replace?r.replace:r.push)(o,n.state,n)}else r.go(e)}),[i,r,s,a,t])}()}function ae(){var t=e.useContext(ee).matches,n=t[t.length-1];return n?n.params:{}}function se(t,n){var i=(void 0===n?{}:n).relative,r=e.useContext(ee).matches,o=ie().pathname,a=JSON.stringify(G(r).map((function(e){return e.pathnameBase})));return e.useMemo((function(){return Z(t,JSON.parse(a),o,"path"===i)}),[t,a,o,i])}function le(t,n,i){ne()||k(!1);var r,o=e.useContext(J).navigator,a=e.useContext(ee).matches,s=a[a.length-1],l=s?s.params:{},u=(s&&s.pathname,s?s.pathnameBase:"/"),c=(s&&s.route,ie());if(n){var d,h="string"===typeof n?x(n):n;"/"===u||(null==(d=h.pathname)?void 0:d.startsWith(u))||k(!1),r=h}else r=c;var p=r.pathname||"/",f=D(t,{pathname:"/"===u?p:p.slice(u.length)||"/"});var g=ve(f&&f.map((function(e){return Object.assign({},e,{params:Object.assign({},l,e.params),pathname:V([u,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:V([u,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})})),a,i);return n&&g?e.createElement($.Provider,{value:{location:Y({pathname:"/",search:"",hash:"",state:null,key:"default"},r),navigationType:v.Pop}},g):g}function ue(){var t=function(){var t,n=e.useContext(te),i=me(de.UseRouteError),r=ye(de.UseRouteError);if(n)return n;return null==(t=i.errors)?void 0:t[r]}(),n=U(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),i=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},n),i?e.createElement("pre",{style:o},i):null,null)}var ce,de,he=e.createElement(ue,null),pe=function(t){(0,l.Z)(i,t);var n=(0,u.Z)(i);function i(e){var t;return(0,a.Z)(this,i),(t=n.call(this,e)).state={location:e.location,revalidation:e.revalidation,error:e.error},t}return(0,s.Z)(i,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?e.createElement(ee.Provider,{value:this.props.routeContext},e.createElement(te.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}}]),i}(e.Component);function fe(t){var n=t.routeContext,i=t.match,r=t.children,o=e.useContext(X);return o&&o.static&&o.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=i.route.id),e.createElement(ee.Provider,{value:n},r)}function ve(t,n,i){var r;if(void 0===n&&(n=[]),void 0===i&&(i=null),null==t){var o;if(null==(o=i)||!o.errors)return null;t=i.matches}var a=t,s=null==(r=i)?void 0:r.errors;if(null!=s){var l=a.findIndex((function(e){return e.route.id&&(null==s?void 0:s[e.route.id])}));l>=0||k(!1),a=a.slice(0,Math.min(a.length,l+1))}return a.reduceRight((function(t,r,o){var l=r.route.id?null==s?void 0:s[r.route.id]:null,u=null;i&&(u=r.route.errorElement||he);var c=n.concat(a.slice(0,o+1)),d=function(){var n;return n=l?u:r.route.Component?e.createElement(r.route.Component,null):r.route.element?r.route.element:t,e.createElement(fe,{match:r,routeContext:{outlet:t,matches:c,isDataRoute:null!=i},children:n})};return i&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?e.createElement(pe,{location:i.location,revalidation:i.revalidation,component:u,error:l,children:d(),routeContext:{outlet:null,matches:c,isDataRoute:!0}}):d()}),null)}function ge(t){var n=e.useContext(X);return n||k(!1),n}function me(t){var n=e.useContext(q);return n||k(!1),n}function ye(t){var n=function(t){var n=e.useContext(ee);return n||k(!1),n}(),i=n.matches[n.matches.length-1];return i.route.id||k(!1),i.route.id}!function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"}(ce||(ce={})),function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"}(de||(de={}));var Ce;t.startTransition;function ke(e){k(!1)}function we(t){var n=t.basename,i=void 0===n?"/":n,r=t.children,o=void 0===r?null:r,a=t.location,s=t.navigationType,l=void 0===s?v.Pop:s,u=t.navigator,c=t.static,d=void 0!==c&&c;ne()&&k(!1);var h=i.replace(/^\/*/,"/"),p=e.useMemo((function(){return{basename:h,navigator:u,static:d}}),[h,u,d]);"string"===typeof a&&(a=x(a));var f=a,g=f.pathname,m=void 0===g?"/":g,y=f.search,C=void 0===y?"":y,w=f.hash,S=void 0===w?"":w,b=f.state,E=void 0===b?null:b,R=f.key,D=void 0===R?"default":R,T=e.useMemo((function(){var e=F(m,h);return null==e?null:{location:{pathname:e,search:C,hash:S,state:E,key:D},navigationType:l}}),[h,m,C,S,E,D,l]);return null==T?null:e.createElement(J.Provider,{value:p},e.createElement($.Provider,{children:o,value:T}))}function Se(e){var t=e.children,n=e.location;return le(Ee(t),n)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Ce||(Ce={}));var be=new Promise((function(){}));e.Component;function Ee(t,n){void 0===n&&(n=[]);var i=[];return e.Children.forEach(t,(function(t,r){if(e.isValidElement(t)){var a=[].concat((0,o.Z)(n),[r]);if(t.type!==e.Fragment){t.type!==ke&&k(!1),t.props.index&&t.props.children&&k(!1);var s={id:t.props.id||a.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(s.children=Ee(t.props.children,a)),i.push(s)}else i.push.apply(i,Ee(t.props.children,a))}})),i}function xe(){return xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},xe.apply(this,arguments)}function Re(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);var De=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Te=["aria-current","caseSensitive","className","end","style","to","children"];var Oe=t.startTransition;function Pe(t){var n,i=t.basename,o=t.children,a=t.future,s=t.window,l=e.useRef();null==l.current&&(l.current=(void 0===(n={window:s,v5Compat:!0})&&(n={}),R((function(e,t){var n=e.location;return b("",{pathname:n.pathname,search:n.search,hash:n.hash},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:E(t)}),null,n)));var u=l.current,c=e.useState({action:u.action,location:u.location}),d=(0,r.Z)(c,2),h=d[0],p=d[1],f=(a||{}).v7_startTransition,v=e.useCallback((function(e){f&&Oe?Oe((function(){return p(e)})):p(e)}),[p,f]);return e.useLayoutEffect((function(){return u.listen(v)}),[u,v]),e.createElement(we,{basename:i,children:o,location:h.location,navigationType:h.action,navigator:u})}var Ae="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,Me=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ne=e.forwardRef((function(t,n){var i,r=t.onClick,o=t.relative,a=t.reloadDocument,s=t.replace,l=t.state,u=t.target,c=t.to,d=t.preventScrollReset,h=Re(t,De),p=e.useContext(J).basename,f=!1;if("string"===typeof c&&Me.test(c)&&(i=c,Ae))try{var v=new URL(window.location.href),g=c.startsWith("//")?new URL(v.protocol+c):new URL(c),m=F(g.pathname,p);g.origin===v.origin&&null!=m?c=m+g.search+g.hash:f=!0}catch(je){}var y=function(t,n){var i=(void 0===n?{}:n).relative;ne()||k(!1);var r=e.useContext(J),o=r.basename,a=r.navigator,s=se(t,{relative:i}),l=s.hash,u=s.pathname,c=s.search,d=u;return"/"!==o&&(d="/"===u?o:V([o,u])),a.createHref({pathname:d,search:c,hash:l})}(c,{relative:o}),C=function(t,n){var i=void 0===n?{}:n,r=i.target,o=i.replace,a=i.state,s=i.preventScrollReset,l=i.relative,u=oe(),c=ie(),d=se(t,{relative:l});return e.useCallback((function(e){if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(e,r)){e.preventDefault();var n=void 0!==o?o:E(c)===E(d);u(t,{replace:n,state:a,preventScrollReset:s,relative:l})}}),[c,u,d,o,a,r,t,s,l])}(c,{replace:s,state:l,target:u,preventScrollReset:d,relative:o});return e.createElement("a",xe({},h,{href:i||y,onClick:f||a?r:function(e){r&&r(e),e.defaultPrevented||C(e)},ref:n,target:u}))}));var Le=e.forwardRef((function(t,n){var i=t["aria-current"],r=void 0===i?"page":i,o=t.caseSensitive,a=void 0!==o&&o,s=t.className,l=void 0===s?"":s,u=t.end,c=void 0!==u&&u,d=t.style,h=t.to,p=t.children,f=Re(t,Te),v=se(h,{relative:f.relative}),g=ie(),m=e.useContext(q),y=e.useContext(J).navigator,C=y.encodeLocation?y.encodeLocation(v).pathname:v.pathname,k=g.pathname,w=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;a||(k=k.toLowerCase(),w=w?w.toLowerCase():null,C=C.toLowerCase());var S,b=k===C||!c&&k.startsWith(C)&&"/"===k.charAt(C.length),E=null!=w&&(w===C||!c&&w.startsWith(C)&&"/"===w.charAt(C.length)),x=b?r:void 0;S="function"===typeof l?l({isActive:b,isPending:E}):[l,b?"active":null,E?"pending":null].filter(Boolean).join(" ");var R="function"===typeof d?d({isActive:b,isPending:E}):d;return e.createElement(Ne,xe({},f,{"aria-current":x,className:S,ref:n,style:R,to:h}),"function"===typeof p?p({isActive:b,isPending:E}):p)}));var Ie,Fe;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(Ie||(Ie={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Fe||(Fe={}));var _e=n(4165);function Ge(e,t,n,i,r,o,a){try{var s=e[o](a),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(i,r)}function Ze(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){Ge(o,i,r,a,s,"next",e)}function s(e){Ge(o,i,r,a,s,"throw",e)}a(void 0)}))}}var Ve=n(4942),He=n(7326),Be=function(e,t){return Be=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Be(e,t)};var We=function(){return We=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},We.apply(this,arguments)};function ze(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(je){o(je)}}function s(e){try{l(i.throw(e))}catch(je){o(je)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))}function Ue(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(6===s[0]&&a.label<r[1]){a.label=r[1],r=s;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(s);break}r[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(je){s=[6,je],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function je(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}var Ke="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof n.g?n.g:"undefined"!=typeof self?self:{};function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Xe(e,t){return e(t={exports:{}},t.exports),t.exports}var qe=Xe((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){var e=this;this.locked=new Map,this.addToLocked=function(t,n){var i=e.locked.get(t);void 0===i?void 0===n?e.locked.set(t,[]):e.locked.set(t,[n]):void 0!==n&&(i.unshift(n),e.locked.set(t,i))},this.isLocked=function(t){return e.locked.has(t)},this.lock=function(t){return new Promise((function(n,i){e.isLocked(t)?e.addToLocked(t,n):(e.addToLocked(t),n())}))},this.unlock=function(t){var n=e.locked.get(t);if(void 0!==n&&0!==n.length){var i=n.pop();e.locked.set(t,n),void 0!==i&&setTimeout(i,0)}else e.locked.delete(t)}}return e.getInstance=function(){return void 0===e.instance&&(e.instance=new e),e.instance},e}();t.default=function(){return n.getInstance()}}));Ye(qe);var Qe=Ye(Xe((function(e,t){var n=Ke&&Ke.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):new n((function(t){t(e.value)})).then(a,s)}l((i=i.apply(e,t||[])).next())}))},i=Ke&&Ke.__generator||function(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var r="browser-tabs-lock-key";function o(e){return new Promise((function(t){return setTimeout(t,e)}))}function a(e){for(var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",n="",i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}var s=function(){function e(){this.acquiredIatSet=new Set,this.id=Date.now().toString()+a(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),void 0===e.waiters&&(e.waiters=[])}return e.prototype.acquireLock=function(t,s){return void 0===s&&(s=5e3),n(this,void 0,void 0,(function(){var n,l,u,c,d,h;return i(this,(function(i){switch(i.label){case 0:n=Date.now()+a(4),l=Date.now()+s,u=r+"-"+t,c=window.localStorage,i.label=1;case 1:return Date.now()<l?[4,o(30)]:[3,8];case 2:return i.sent(),null!==c.getItem(u)?[3,5]:(d=this.id+"-"+t+"-"+n,[4,o(Math.floor(25*Math.random()))]);case 3:return i.sent(),c.setItem(u,JSON.stringify({id:this.id,iat:n,timeoutKey:d,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,o(30)];case 4:return i.sent(),null!==(h=c.getItem(u))&&(h=JSON.parse(h)).id===this.id&&h.iat===n?(this.acquiredIatSet.add(n),this.refreshLockWhileAcquired(u,n),[2,!0]):[3,7];case 5:return e.lockCorrector(),[4,this.waitForSomethingToChange(l)];case 6:i.sent(),i.label=7;case 7:return n=Date.now()+a(4),[3,1];case 8:return[2,!1]}}))}))},e.prototype.refreshLockWhileAcquired=function(e,t){return n(this,void 0,void 0,(function(){var r=this;return i(this,(function(o){return setTimeout((function(){return n(r,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return[4,qe.default().lock(t)];case 1:return i.sent(),this.acquiredIatSet.has(t)?(n=window.localStorage,null===(r=n.getItem(e))?(qe.default().unlock(t),[2]):((r=JSON.parse(r)).timeRefreshed=Date.now(),n.setItem(e,JSON.stringify(r)),qe.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(qe.default().unlock(t),[2])}}))}))}),1e3),[2]}))}))},e.prototype.waitForSomethingToChange=function(t){return n(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n){var i=!1,r=Date.now(),o=!1;function a(){if(o||(window.removeEventListener("storage",a),e.removeFromWaiting(a),clearTimeout(s),o=!0),!i){i=!0;var t=50-(Date.now()-r);t>0?setTimeout(n,t):n()}}window.addEventListener("storage",a),e.addToWaiting(a);var s=setTimeout(a,Math.max(0,t-Date.now()))}))];case 1:return n.sent(),[2]}}))}))},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter((function(e){return e!==t})))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEach((function(e){return e()}))},e.prototype.releaseLock=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}}))}))},e.prototype.releaseLock__private__=function(t){return n(this,void 0,void 0,(function(){var n,o,a;return i(this,(function(i){switch(i.label){case 0:return n=window.localStorage,o=r+"-"+t,null===(a=n.getItem(o))?[2]:(a=JSON.parse(a)).id!==this.id?[3,2]:[4,qe.default().lock(a.iat)];case 1:i.sent(),this.acquiredIatSet.delete(a.iat),n.removeItem(o),qe.default().unlock(a.iat),e.notifyWaiters(),i.label=2;case 2:return[2]}}))}))},e.lockCorrector=function(){for(var t=Date.now()-5e3,n=window.localStorage,i=Object.keys(n),o=!1,a=0;a<i.length;a++){var s=i[a];if(s.includes(r)){var l=n.getItem(s);null!==l&&(void 0===(l=JSON.parse(l)).timeRefreshed&&l.timeAcquired<t||void 0!==l.timeRefreshed&&l.timeRefreshed<t)&&(n.removeItem(s),o=!0)}}o&&e.notifyWaiters()},e.waiters=void 0,e}();t.default=s}))),Je={timeoutInSeconds:60},$e={name:"auth0-spa-js",version:"2.1.0"},et=function(){return Date.now()},tt=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i){var r;return(0,a.Z)(this,n),(r=t.call(this,i)).error=e,r.error_description=i,Object.setPrototypeOf((0,He.Z)(r),n.prototype),r}return(0,s.Z)(n,null,[{key:"fromPayload",value:function(e){return new n(e.error,e.error_description)}}]),n}((0,c.Z)(Error)),nt=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r){var o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return(0,a.Z)(this,n),(o=t.call(this,e,i)).state=r,o.appState=s,Object.setPrototypeOf((0,He.Z)(o),n.prototype),o}return(0,s.Z)(n)}(tt),it=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),e=t.call(this,"timeout","Timeout"),Object.setPrototypeOf((0,He.Z)(e),n.prototype),e}return(0,s.Z)(n)}(tt),rt=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).popup=e,Object.setPrototypeOf((0,He.Z)(i),n.prototype),i}return(0,s.Z)(n)}(it),ot=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this,"cancelled","Popup closed")).popup=e,Object.setPrototypeOf((0,He.Z)(i),n.prototype),i}return(0,s.Z)(n)}(tt),at=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r){var o;return(0,a.Z)(this,n),(o=t.call(this,e,i)).mfa_token=r,Object.setPrototypeOf((0,He.Z)(o),n.prototype),o}return(0,s.Z)(n)}(tt),st=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i){var r;return(0,a.Z)(this,n),(r=t.call(this,"missing_refresh_token","Missing Refresh Token (audience: '".concat(lt(e,["default"]),"', scope: '").concat(lt(i),"')"))).audience=e,r.scope=i,Object.setPrototypeOf((0,He.Z)(r),n.prototype),r}return(0,s.Z)(n)}(tt);function lt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e&&!t.includes(e)?e:""}var ut=function(){return window.crypto},ct=function(){var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.",t="";return Array.from(ut().getRandomValues(new Uint8Array(43))).forEach((function(n){return t+=e[n%e.length]})),t},dt=function(e){return btoa(e)},ht=function(e){var t=e.clientId,n=je(e,["clientId"]);return new URLSearchParams(function(e){return Object.keys(e).filter((function(t){return void 0!==e[t]})).reduce((function(t,n){return Object.assign(Object.assign({},t),(0,Ve.Z)({},n,e[n]))}),{})}(Object.assign({client_id:t},n))).toString()},pt=function(e){return function(e){return decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}(e.replace(/_/g,"/").replace(/-/g,"+"))},ft=function(){var e=Ze((0,_e.Z)().mark((function e(t,n){var i;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t,n);case 2:return i=e.sent,e.t0=i.ok,e.next=6,i.json();case 6:return e.t1=e.sent,e.abrupt("return",{ok:e.t0,json:e.t1});case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),vt=function(){var e=Ze((0,_e.Z)().mark((function e(t,n,i){var r,o;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new AbortController,e.abrupt("return",(n.signal=r.signal,Promise.race([ft(t,n),new Promise((function(e,t){o=setTimeout((function(){r.abort(),t(new Error("Timeout when executing 'fetch'"))}),i)}))]).finally((function(){clearTimeout(o)}))));case 2:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),gt=function(){var e=Ze((0,_e.Z)().mark((function e(t,n,i,r,o,a,s){var l,u;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(l={auth:{audience:n,scope:i},timeout:o,fetchUrl:t,fetchOptions:r,useFormData:s},u=a,new Promise((function(e,t){var n=new MessageChannel;n.port1.onmessage=function(i){i.data.error?t(new Error(i.data.error)):e(i.data),n.port1.close()},u.postMessage(l,[n.port2])}))));case 1:case"end":return e.stop()}}),e)})));return function(t,n,i,r,o,a,s){return e.apply(this,arguments)}}(),mt=function(){var e=Ze((0,_e.Z)().mark((function e(t,n,i,r,o,a){var s,l=arguments;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=l.length>6&&void 0!==l[6]?l[6]:1e4,e.abrupt("return",o?gt(t,n,i,r,s,o,a):vt(t,r,s));case 2:case"end":return e.stop()}}),e)})));return function(t,n,i,r,o,a){return e.apply(this,arguments)}}();function yt(e,t){return Ct.apply(this,arguments)}function Ct(){return Ct=Ze((0,_e.Z)().mark((function e(t,n){var i,r,o,a,s,l,u,c;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.baseUrl,r=t.timeout,o=t.audience,a=t.scope,s=t.auth0Client,l=t.useFormData,u=je(t,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]),c=l?ht(u):JSON.stringify(u),e.next=4,function(){var e=Ze((0,_e.Z)().mark((function e(t,n,i,r,o,a,s){var l,u,c,d,h,p,f,v;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u=null,c=0;case 2:if(!(c<3)){e.next=17;break}return e.prev=3,e.next=6,mt(t,i,r,o,a,s,n);case 6:return l=e.sent,u=null,e.abrupt("break",17);case 11:e.prev=11,e.t0=e.catch(3),u=e.t0;case 14:c++,e.next=2;break;case 17:if(!u){e.next=19;break}throw u;case 19:if(d=l.json,h=d.error,p=d.error_description,f=je(d,["error","error_description"]),l.ok){e.next=27;break}if(v=p||"HTTP error. Unable to fetch ".concat(t),"mfa_required"!==h){e.next=24;break}throw new at(h,v,f.mfa_token);case 24:if("missing_refresh_token"!==h){e.next=26;break}throw new st(i,r);case 26:throw new tt(h||"request_error",v);case 27:return e.abrupt("return",f);case 28:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(t,n,i,r,o,a,s){return e.apply(this,arguments)}}()("".concat(i,"/oauth/token"),r,o||"default",a,{method:"POST",body:c,headers:{"Content-Type":l?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(s||$e))}},n,l);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)}))),Ct.apply(this,arguments)}var kt=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(i=t.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(i))).join(" ");var i},wt=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"@@auth0spajs@@",i=arguments.length>2?arguments[2]:void 0;(0,a.Z)(this,e),this.prefix=n,this.suffix=i,this.clientId=t.clientId,this.scope=t.scope,this.audience=t.audience}return(0,s.Z)(e,[{key:"toKey",value:function(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}}],[{key:"fromKey",value:function(t){var n=t.split("::"),i=(0,r.Z)(n,4),o=i[0],a=i[1],s=i[2];return new e({clientId:a,scope:i[3],audience:s},o)}},{key:"fromCacheEntry",value:function(t){return new e({scope:t.scope,audience:t.audience,clientId:t.client_id})}}]),e}(),St=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"set",value:function(e,t){localStorage.setItem(e,JSON.stringify(t))}},{key:"get",value:function(e){var t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return}}},{key:"remove",value:function(e){localStorage.removeItem(e)}},{key:"allKeys",value:function(){return Object.keys(window.localStorage).filter((function(e){return e.startsWith("@@auth0spajs@@")}))}}]),e}(),bt=(0,s.Z)((function e(){(0,a.Z)(this,e),this.enclosedCache=function(){var e={};return{set:function(t,n){e[t]=n},get:function(t){var n=e[t];if(n)return n},remove:function(t){delete e[t]},allKeys:function(){return Object.keys(e)}}}()})),Et=function(){function e(t,n,i){(0,a.Z)(this,e),this.cache=t,this.keyManifest=n,this.nowProvider=i||et}return(0,s.Z)(e,[{key:"setIdToken",value:function(){var e=Ze((0,_e.Z)().mark((function e(t,n,i){var r,o;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.getIdTokenCacheKey(t),e.next=3,this.cache.set(o,{id_token:n,decodedToken:i});case 3:return e.next=5,null===(r=this.keyManifest)||void 0===r?void 0:r.add(o);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n,i){return e.apply(this,arguments)}}()},{key:"getIdToken",value:function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,i;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.cache.get(this.getIdTokenCacheKey(t.clientId));case 2:if((n=e.sent)||!t.scope||!t.audience){e.next=12;break}return e.next=6,this.get(t);case 6:if(i=e.sent){e.next=9;break}return e.abrupt("return");case 9:if(i.id_token&&i.decodedToken){e.next=11;break}return e.abrupt("return");case 11:return e.abrupt("return",{id_token:i.id_token,decodedToken:i.decodedToken});case 12:if(!n){e.next=14;break}return e.abrupt("return",{id_token:n.id_token,decodedToken:n.decodedToken});case 14:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"get",value:function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,i,r,o,a,s,l,u=arguments;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:0,e.next=3,this.cache.get(t.toKey());case 3:if(r=e.sent){e.next=16;break}return e.next=7,this.getCacheKeys();case 7:if(o=e.sent){e.next=10;break}return e.abrupt("return");case 10:if(a=this.matchExistingCacheKey(t,o),e.t0=a,!e.t0){e.next=16;break}return e.next=15,this.cache.get(a);case 15:r=e.sent;case 16:if(r){e.next=18;break}return e.abrupt("return");case 18:return e.next=20,this.nowProvider();case 20:if(s=e.sent,l=Math.floor(s/1e3),!(r.expiresAt-n<l)){e.next=38;break}if(!r.body.refresh_token){e.next=30;break}return r.body={refresh_token:r.body.refresh_token},e.next=27,this.cache.set(t.toKey(),r);case 27:e.t2=r.body,e.next=35;break;case 30:return e.next=32,this.cache.remove(t.toKey());case 32:return e.next=34,null===(i=this.keyManifest)||void 0===i?void 0:i.remove(t.toKey());case 34:e.t2=void e.sent;case 35:e.t1=e.t2,e.next=39;break;case 38:e.t1=r.body;case 39:return e.abrupt("return",e.t1);case 40:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"set",value:function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,i,r;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new wt({clientId:t.client_id,scope:t.scope,audience:t.audience}),e.next=3,this.wrapCacheEntry(t);case 3:return r=e.sent,e.next=6,this.cache.set(i.toKey(),r);case 6:return e.next=8,null===(n=this.keyManifest)||void 0===n?void 0:n.add(i.toKey());case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"clear",value:function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,i,r=this;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getCacheKeys();case 2:if(i=e.sent,e.t0=i,!e.t0){e.next=9;break}return e.next=7,i.filter((function(e){return!t||e.includes(t)})).reduce(function(){var e=Ze((0,_e.Z)().mark((function e(t,n){return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return e.next=4,r.cache.remove(n);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Promise.resolve());case 7:return e.next=9,null===(n=this.keyManifest)||void 0===n?void 0:n.clear();case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"wrapCacheEntry",value:function(){var e=Ze((0,_e.Z)().mark((function e(t){var n;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.nowProvider();case 2:return n=e.sent,e.abrupt("return",{body:t,expiresAt:Math.floor(n/1e3)+t.expires_in});case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getCacheKeys",value:function(){var e=Ze((0,_e.Z)().mark((function e(){var t;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.keyManifest){e.next=15;break}return e.next=3,this.keyManifest.get();case 3:if(e.t2=t=e.sent,e.t1=null===e.t2,e.t1){e.next=7;break}e.t1=void 0===t;case 7:if(!e.t1){e.next=11;break}e.t3=void 0,e.next=12;break;case 11:e.t3=t.keys;case 12:e.t0=e.t3,e.next=16;break;case 15:e.t0=this.cache.allKeys?this.cache.allKeys():void 0;case 16:return e.abrupt("return",e.t0);case 17:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getIdTokenCacheKey",value:function(e){return new wt({clientId:e},"@@auth0spajs@@","@@user@@").toKey()}},{key:"matchExistingCacheKey",value:function(e,t){return t.filter((function(t){var n,i=wt.fromKey(t),r=new Set(i.scope&&i.scope.split(" ")),o=(null===(n=e.scope)||void 0===n?void 0:n.split(" "))||[],a=i.scope&&o.reduce((function(e,t){return e&&r.has(t)}),!0);return"@@auth0spajs@@"===i.prefix&&i.clientId===e.clientId&&i.audience===e.audience&&a}))[0]}}]),e}(),xt=function(){function e(t,n,i){(0,a.Z)(this,e),this.storage=t,this.clientId=n,this.cookieDomain=i,this.storageKey="a0.spajs.txs.".concat(this.clientId)}return(0,s.Z)(e,[{key:"create",value:function(e){this.storage.save(this.storageKey,e,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}},{key:"get",value:function(){return this.storage.get(this.storageKey)}},{key:"remove",value:function(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}}]),e}(),Rt=function(e){return"number"==typeof e},Dt=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],Tt=function(e){if(!e.id_token)throw new Error("ID token is required but missing");var t=function(e){var t=e.split("."),n=(0,r.Z)(t,3),i=n[0],o=n[1],a=n[2];if(3!==t.length||!i||!o||!a)throw new Error("ID token could not be decoded");var s=JSON.parse(pt(o)),l={__raw:e},u={};return Object.keys(s).forEach((function(e){l[e]=s[e],Dt.includes(e)||(u[e]=s[e])})),{encoded:{header:i,payload:o,signature:a},header:JSON.parse(pt(i)),claims:l,user:u}}(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error('Issuer (iss) claim mismatch in the ID token; expected "'.concat(e.iss,'", found "').concat(t.claims.iss,'"'));if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if("RS256"!==t.header.alg)throw new Error('Signature algorithm of "'.concat(t.header.alg,'" is not supported. Expected the ID token to be signed with "RS256".'));if(!t.claims.aud||"string"!=typeof t.claims.aud&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but was not one of "').concat(t.claims.aud.join(", "),'"'));if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error('Authorized Party (azp) claim mismatch in the ID token; expected "'.concat(e.aud,'", found "').concat(t.claims.azp,'"'))}}else if(t.claims.aud!==e.aud)throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but found "').concat(t.claims.aud,'"'));if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error('Nonce (nonce) claim mismatch in the ID token; expected "'.concat(e.nonce,'", found "').concat(t.claims.nonce,'"'))}if(e.max_age&&!Rt(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(null==t.claims.exp||!Rt(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Rt(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");var n=e.leeway||60,i=new Date(e.now||Date.now()),o=new Date(0);if(o.setUTCSeconds(t.claims.exp+n),i>o)throw new Error("Expiration Time (exp) claim error in the ID token; current time (".concat(i,") is after expiration time (").concat(o,")"));if(null!=t.claims.nbf&&Rt(t.claims.nbf)){var a=new Date(0);if(a.setUTCSeconds(t.claims.nbf-n),i<a)throw new Error("Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (".concat(i,") is before ").concat(a))}if(null!=t.claims.auth_time&&Rt(t.claims.auth_time)){var s=new Date(0);if(s.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+n),i>s)throw new Error("Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (".concat(i,") is after last auth at ").concat(s))}if(e.organization){var l=e.organization.trim();if(l.startsWith("org_")){var u=l;if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(u!==t.claims.org_id)throw new Error('Organization ID (org_id) claim mismatch in the ID token; expected "'.concat(u,'", found "').concat(t.claims.org_id,'"'))}else{var c=l.toLowerCase();if(!t.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(c!==t.claims.org_name.toLowerCase())throw new Error('Organization Name (org_name) claim mismatch in the ID token; expected "'.concat(c,'", found "').concat(t.claims.org_name.toLowerCase(),'"'))}}return t},Ot=Xe((function(e,t){var n=Ke&&Ke.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)};function i(e,t){if(!t)return"";var n="; "+e;return!0===t?n:n+"="+t}function r(e,t,n){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){var t=new Date;t.setMilliseconds(t.getMilliseconds()+864e5*e.expires),e.expires=t}return i("Expires",e.expires?e.expires.toUTCString():"")+i("Domain",e.domain)+i("Path",e.path)+i("Secure",e.secure)+i("SameSite",e.sameSite)}(n)}function o(e){for(var t={},n=e?e.split("; "):[],i=/(%[\dA-F]{2})+/gi,r=0;r<n.length;r++){var o=n[r].split("="),a=o.slice(1).join("=");'"'===a.charAt(0)&&(a=a.slice(1,-1));try{t[o[0].replace(i,decodeURIComponent)]=a.replace(i,decodeURIComponent)}catch(e){}}return t}function a(){return o(document.cookie)}function s(e,t,i){document.cookie=r(e,t,n({path:"/"},i))}t.__esModule=!0,t.encode=r,t.parse=o,t.getAll=a,t.get=function(e){return a()[e]},t.set=s,t.remove=function(e,t){s(e,"",n(n({},t),{expires:-1}))}}));Ye(Ot),Ot.encode,Ot.parse,Ot.getAll;var Pt=Ot.get,At=Ot.set,Mt=Ot.remove,Nt={get:function(e){var t=Pt(e);if(void 0!==t)return JSON.parse(t)},save:function(e,t,n){var i={};"https:"===window.location.protocol&&(i={secure:!0,sameSite:"none"}),(null==n?void 0:n.daysUntilExpire)&&(i.expires=n.daysUntilExpire),(null==n?void 0:n.cookieDomain)&&(i.domain=n.cookieDomain),At(e,JSON.stringify(t),i)},remove:function(e,t){var n={};(null==t?void 0:t.cookieDomain)&&(n.domain=t.cookieDomain),Mt(e,n)}},Lt={get:function(e){return Nt.get(e)||Nt.get("_legacy_".concat(e))},save:function(e,t,n){var i={};"https:"===window.location.protocol&&(i={secure:!0}),(null==n?void 0:n.daysUntilExpire)&&(i.expires=n.daysUntilExpire),(null==n?void 0:n.cookieDomain)&&(i.domain=n.cookieDomain),At("_legacy_".concat(e),JSON.stringify(t),i),Nt.save(e,t,n)},remove:function(e,t){var n={};(null==t?void 0:t.cookieDomain)&&(n.domain=t.cookieDomain),Mt(e,n),Nt.remove(e,t),Nt.remove("_legacy_".concat(e),t)}},It={get:function(e){if("undefined"!=typeof sessionStorage){var t=sessionStorage.getItem(e);return null!=t?JSON.parse(t):void 0}},save:function(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove:function(e){sessionStorage.removeItem(e)}};var Ft,_t=("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9Y29uc3Qgcz1lPT57dmFye2NsaWVudElkOnR9PWUscj1mdW5jdGlvbihlLHQpe3ZhciByPXt9O2Zvcih2YXIgcyBpbiBlKU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChlLHMpJiZ0LmluZGV4T2Yocyk8MCYmKHJbc109ZVtzXSk7aWYobnVsbCE9ZSYmImZ1bmN0aW9uIj09dHlwZW9mIE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMpe3ZhciBvPTA7Zm9yKHM9T2JqZWN0LmdldE93blByb3BlcnR5U3ltYm9scyhlKTtvPHMubGVuZ3RoO28rKyl0LmluZGV4T2Yoc1tvXSk8MCYmT2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZS5jYWxsKGUsc1tvXSkmJihyW3Nbb11dPWVbc1tvXV0pfXJldHVybiByfShlLFsiY2xpZW50SWQiXSk7cmV0dXJuIG5ldyBVUkxTZWFyY2hQYXJhbXMoKGU9Pk9iamVjdC5rZXlzKGUpLmZpbHRlcigodD0+dm9pZCAwIT09ZVt0XSkpLnJlZHVjZSgoKHQscik9Pk9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSx0KSx7W3JdOmVbcl19KSkse30pKShPYmplY3QuYXNzaWduKHtjbGllbnRfaWQ6dH0scikpKS50b1N0cmluZygpfTtsZXQgbz17fTtjb25zdCBuPShlLHQpPT5gJHtlfXwke3R9YDthZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIiwoYXN5bmMoe2RhdGE6e3RpbWVvdXQ6ZSxhdXRoOnIsZmV0Y2hVcmw6aSxmZXRjaE9wdGlvbnM6Yyx1c2VGb3JtRGF0YTphfSxwb3J0czpbZl19KT0+e2xldCBwO2NvbnN0e2F1ZGllbmNlOmwsc2NvcGU6dX09cnx8e307dHJ5e2NvbnN0IHI9YT8oZT0+e2NvbnN0IHQ9bmV3IFVSTFNlYXJjaFBhcmFtcyhlKSxyPXt9O3JldHVybiB0LmZvckVhY2goKChlLHQpPT57clt0XT1lfSkpLHJ9KShjLmJvZHkpOkpTT04ucGFyc2UoYy5ib2R5KTtpZighci5yZWZyZXNoX3Rva2VuJiYicmVmcmVzaF90b2tlbiI9PT1yLmdyYW50X3R5cGUpe2NvbnN0IGU9KChlLHQpPT5vW24oZSx0KV0pKGwsdSk7aWYoIWUpdGhyb3cgbmV3IHQobCx1KTtjLmJvZHk9YT9zKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxyKSx7cmVmcmVzaF90b2tlbjplfSkpOkpTT04uc3RyaW5naWZ5KE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxyKSx7cmVmcmVzaF90b2tlbjplfSkpfWxldCBkLGc7ImZ1bmN0aW9uIj09dHlwZW9mIEFib3J0Q29udHJvbGxlciYmKGQ9bmV3IEFib3J0Q29udHJvbGxlcixjLnNpZ25hbD1kLnNpZ25hbCk7dHJ5e2c9YXdhaXQgUHJvbWlzZS5yYWNlKFsoaD1lLG5ldyBQcm9taXNlKChlPT5zZXRUaW1lb3V0KGUsaCkpKSksZmV0Y2goaSxPYmplY3QuYXNzaWduKHt9LGMpKV0pfWNhdGNoKGUpe3JldHVybiB2b2lkIGYucG9zdE1lc3NhZ2Uoe2Vycm9yOmUubWVzc2FnZX0pfWlmKCFnKXJldHVybiBkJiZkLmFib3J0KCksdm9pZCBmLnBvc3RNZXNzYWdlKHtlcnJvcjoiVGltZW91dCB3aGVuIGV4ZWN1dGluZyAnZmV0Y2gnIn0pO3A9YXdhaXQgZy5qc29uKCkscC5yZWZyZXNoX3Rva2VuPygoKGUsdCxyKT0+e29bbih0LHIpXT1lfSkocC5yZWZyZXNoX3Rva2VuLGwsdSksZGVsZXRlIHAucmVmcmVzaF90b2tlbik6KChlLHQpPT57ZGVsZXRlIG9bbihlLHQpXX0pKGwsdSksZi5wb3N0TWVzc2FnZSh7b2s6Zy5vayxqc29uOnB9KX1jYXRjaChlKXtmLnBvc3RNZXNzYWdlKHtvazohMSxqc29uOntlcnJvcjplLmVycm9yLGVycm9yX2Rlc2NyaXB0aW9uOmUubWVzc2FnZX19KX12YXIgaH0pKX0oKTsKCg==",null,!1,function(e){return Ft=Ft||function(e,t,n){var i=void 0===t?null:t,r=function(e,t){var n=atob(e);if(t){for(var i=new Uint8Array(n.length),r=0,o=n.length;r<o;++r)i[r]=n.charCodeAt(r);return String.fromCharCode.apply(null,new Uint16Array(i.buffer))}return n}(e,void 0!==n&&n),o=r.indexOf("\n",10)+1,a=r.substring(o)+(i?"//# sourceMappingURL="+i:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9Y29uc3Qgcz1lPT57dmFye2NsaWVudElkOnR9PWUscj1mdW5jdGlvbihlLHQpe3ZhciByPXt9O2Zvcih2YXIgcyBpbiBlKU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChlLHMpJiZ0LmluZGV4T2Yocyk8MCYmKHJbc109ZVtzXSk7aWYobnVsbCE9ZSYmImZ1bmN0aW9uIj09dHlwZW9mIE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMpe3ZhciBvPTA7Zm9yKHM9T2JqZWN0LmdldE93blByb3BlcnR5U3ltYm9scyhlKTtvPHMubGVuZ3RoO28rKyl0LmluZGV4T2Yoc1tvXSk8MCYmT2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZS5jYWxsKGUsc1tvXSkmJihyW3Nbb11dPWVbc1tvXV0pfXJldHVybiByfShlLFsiY2xpZW50SWQiXSk7cmV0dXJuIG5ldyBVUkxTZWFyY2hQYXJhbXMoKGU9Pk9iamVjdC5rZXlzKGUpLmZpbHRlcigodD0+dm9pZCAwIT09ZVt0XSkpLnJlZHVjZSgoKHQscik9Pk9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSx0KSx7W3JdOmVbcl19KSkse30pKShPYmplY3QuYXNzaWduKHtjbGllbnRfaWQ6dH0scikpKS50b1N0cmluZygpfTtsZXQgbz17fTtjb25zdCBuPShlLHQpPT5gJHtlfXwke3R9YDthZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIiwoYXN5bmMoe2RhdGE6e3RpbWVvdXQ6ZSxhdXRoOnIsZmV0Y2hVcmw6aSxmZXRjaE9wdGlvbnM6Yyx1c2VGb3JtRGF0YTphfSxwb3J0czpbZl19KT0+e2xldCBwO2NvbnN0e2F1ZGllbmNlOmwsc2NvcGU6dX09cnx8e307dHJ5e2NvbnN0IHI9YT8oZT0+e2NvbnN0IHQ9bmV3IFVSTFNlYXJjaFBhcmFtcyhlKSxyPXt9O3JldHVybiB0LmZvckVhY2goKChlLHQpPT57clt0XT1lfSkpLHJ9KShjLmJvZHkpOkpTT04ucGFyc2UoYy5ib2R5KTtpZighci5yZWZyZXNoX3Rva2VuJiYicmVmcmVzaF90b2tlbiI9PT1yLmdyYW50X3R5cGUpe2NvbnN0IGU9KChlLHQpPT5vW24oZSx0KV0pKGwsdSk7aWYoIWUpdGhyb3cgbmV3IHQobCx1KTtjLmJvZHk9YT9zKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxyKSx7cmVmcmVzaF90b2tlbjplfSkpOkpTT04uc3RyaW5naWZ5KE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxyKSx7cmVmcmVzaF90b2tlbjplfSkpfWxldCBkLGc7ImZ1bmN0aW9uIj09dHlwZW9mIEFib3J0Q29udHJvbGxlciYmKGQ9bmV3IEFib3J0Q29udHJvbGxlcixjLnNpZ25hbD1kLnNpZ25hbCk7dHJ5e2c9YXdhaXQgUHJvbWlzZS5yYWNlKFsoaD1lLG5ldyBQcm9taXNlKChlPT5zZXRUaW1lb3V0KGUsaCkpKSksZmV0Y2goaSxPYmplY3QuYXNzaWduKHt9LGMpKV0pfWNhdGNoKGUpe3JldHVybiB2b2lkIGYucG9zdE1lc3NhZ2Uoe2Vycm9yOmUubWVzc2FnZX0pfWlmKCFnKXJldHVybiBkJiZkLmFib3J0KCksdm9pZCBmLnBvc3RNZXNzYWdlKHtlcnJvcjoiVGltZW91dCB3aGVuIGV4ZWN1dGluZyAnZmV0Y2gnIn0pO3A9YXdhaXQgZy5qc29uKCkscC5yZWZyZXNoX3Rva2VuPygoKGUsdCxyKT0+e29bbih0LHIpXT1lfSkocC5yZWZyZXNoX3Rva2VuLGwsdSksZGVsZXRlIHAucmVmcmVzaF90b2tlbik6KChlLHQpPT57ZGVsZXRlIG9bbihlLHQpXX0pKGwsdSksZi5wb3N0TWVzc2FnZSh7b2s6Zy5vayxqc29uOnB9KX1jYXRjaChlKXtmLnBvc3RNZXNzYWdlKHtvazohMSxqc29uOntlcnJvcjplLmVycm9yLGVycm9yX2Rlc2NyaXB0aW9uOmUubWVzc2FnZX19KX12YXIgaH0pKX0oKTsKCg==",null,false),new Worker(Ft,e)}),Gt={},Zt=function(){function e(t,n){(0,a.Z)(this,e),this.cache=t,this.clientId=n,this.manifestKey=this.createManifestKeyFrom(this.clientId)}return(0,s.Z)(e,[{key:"add",value:function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,i;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=Set,e.next=3,this.cache.get(this.manifestKey);case 3:if(e.t3=n=e.sent,e.t2=null===e.t3,e.t2){e.next=7;break}e.t2=void 0===n;case 7:if(!e.t2){e.next=11;break}e.t4=void 0,e.next=12;break;case 11:e.t4=n.keys;case 12:if(e.t1=e.t4,e.t1){e.next=15;break}e.t1=[];case 15:return e.t5=e.t1,(i=new e.t0(e.t5)).add(t),e.next=20,this.cache.set(this.manifestKey,{keys:(0,o.Z)(i)});case 20:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"remove",value:function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,i;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.cache.get(this.manifestKey);case 2:if(!(n=e.sent)){e.next=16;break}if((i=new Set(n.keys)).delete(t),!(i.size>0)){e.next=12;break}return e.next=9,this.cache.set(this.manifestKey,{keys:(0,o.Z)(i)});case 9:e.t0=e.sent,e.next=15;break;case 12:return e.next=14,this.cache.remove(this.manifestKey);case 14:e.t0=e.sent;case 15:return e.abrupt("return",e.t0);case 16:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"get",value:function(){return this.cache.get(this.manifestKey)}},{key:"clear",value:function(){return this.cache.remove(this.manifestKey)}},{key:"createManifestKeyFrom",value:function(e){return"@@auth0spajs@@::".concat(e)}}]),e}(),Vt={memory:function(){return(new bt).enclosedCache},localstorage:function(){return new St}},Ht=function(e){return Vt[e]},Bt=function(e){var t=e.openUrl,n=e.onRedirect,i=je(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},i),{openUrl:!1===t||t?t:n})},Wt=new Qe,zt=function(){function e(t){var n,i,r=this;if((0,a.Z)(this,e),this.userCache=(new bt).enclosedCache,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=Ze((0,_e.Z)().mark((function e(){return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wt.releaseLock("auth0.lock.getTokenSilently");case 2:window.removeEventListener("pagehide",r._releaseLockOnPageHide);case 3:case"end":return e.stop()}}),e)}))),this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),t),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),t.authorizationParams)}),"undefined"!=typeof window&&function(){if(!ut())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===ut().subtle)throw new Error("\n      auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/master/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.\n    ")}(),t.cache&&t.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),t.cache)i=t.cache;else{if(n=t.cacheLocation||"memory",!Ht(n))throw new Error('Invalid cache location "'.concat(n,'"'));i=Ht(n)()}this.httpTimeoutMs=t.httpTimeoutInSeconds?1e3*t.httpTimeoutInSeconds:1e4,this.cookieStorage=!1===t.legacySameSiteCookie?Nt:Lt,this.orgHintCookieName="auth0.".concat(this.options.clientId,".organization_hint"),this.isAuthenticatedCookieName=function(e){return"auth0.".concat(e,".is.authenticated")}(this.options.clientId),this.sessionCheckExpiryDays=t.sessionCheckExpiryDays||1;var o,s=t.useCookiesForTransactions?this.cookieStorage:It;this.scope=kt("openid",this.options.authorizationParams.scope,this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new xt(s,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||et,this.cacheManager=new Et(i,i.allKeys?void 0:new Zt(i,this.options.clientId),this.nowProvider),this.domainUrl=(o=this.options.domain,/^https?:\/\//.test(o)?o:"https://".concat(o)),this.tokenIssuer=function(e,t){return e?e.startsWith("https://")?e:"https://".concat(e,"/"):"".concat(t,"/")}(this.options.issuer,this.domainUrl),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&"memory"===n&&(this.worker=new _t)}return(0,s.Z)(e,[{key:"_url",value:function(e){var t=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||$e)));return"".concat(this.domainUrl).concat(e,"&auth0Client=").concat(t)}},{key:"_authorizeUrl",value:function(e){return this._url("/authorize?".concat(ht(e)))}},{key:"_verifyIdToken",value:function(){var e=Ze((0,_e.Z)().mark((function e(t,n,i){var r,o;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.nowProvider();case 2:return r=e.sent,e.abrupt("return",Tt({iss:this.tokenIssuer,aud:this.options.clientId,id_token:t,nonce:n,organization:i,leeway:this.options.leeway,max_age:(o=this.options.authorizationParams.max_age,"string"!=typeof o?o:parseInt(o,10)||void 0),now:r}));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,i){return e.apply(this,arguments)}}()},{key:"_processOrgHint",value:function(e){e?this.cookieStorage.save(this.orgHintCookieName,e,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}},{key:"_prepareAuthorizeUrl",value:function(){var e=Ze((0,_e.Z)().mark((function e(t,n,i){var r,a,s,l,u,c;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=dt(ct()),a=dt(ct()),s=ct(),e.t0=function(e){var t=new Uint8Array(e);return function(e){var t={"+":"-","/":"_","=":""};return e.replace(/[+/=]/g,(function(e){return t[e]}))}(window.btoa(String.fromCharCode.apply(String,(0,o.Z)(Array.from(t)))))},e.next=6,function(){var e=Ze((0,_e.Z)().mark((function e(t){var n;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=ut().subtle.digest({name:"SHA-256"},(new TextEncoder).encode(t)),e.next=3,n;case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()(s);case 6:return e.t1=e.sent,l=(0,e.t0)(e.t1),u=function(e,t,n,i,r,o,a,s){return Object.assign(Object.assign(Object.assign({client_id:e.clientId},e.authorizationParams),n),{scope:kt(t,n.scope),response_type:"code",response_mode:s||"query",state:i,nonce:r,redirect_uri:a||e.authorizationParams.redirect_uri,code_challenge:o,code_challenge_method:"S256"})}(this.options,this.scope,t,r,a,l,t.redirect_uri||this.options.authorizationParams.redirect_uri||i,null==n?void 0:n.response_mode),c=this._authorizeUrl(u),e.abrupt("return",{nonce:a,code_verifier:s,scope:u.scope,audience:u.audience||"default",redirect_uri:u.redirect_uri,state:r,url:c});case 11:case"end":return e.stop()}}),e,this)})));return function(t,n,i){return e.apply(this,arguments)}}()},{key:"loginWithPopup",value:function(){var e=Ze((0,_e.Z)().mark((function e(t,n){var i,r,o,a;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=t||{},(n=n||{}).popup||(n.popup=function(e){var t=window.screenX+(window.innerWidth-400)/2,n=window.screenY+(window.innerHeight-600)/2;return window.open("","auth0:authorize:popup","left=".concat(t,",top=").concat(n,",width=400,height=600,resizable,scrollbars=yes,status=1"))}(),n.popup)){e.next=2;break}throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");case 2:return e.next=4,this._prepareAuthorizeUrl(t.authorizationParams||{},{response_mode:"web_message"},window.location.origin);case 4:return r=e.sent,n.popup.location.href=r.url,e.next=8,function(e){return new Promise((function(t,n){var i,r=setInterval((function(){e.popup&&e.popup.closed&&(clearInterval(r),clearTimeout(o),window.removeEventListener("message",i,!1),n(new ot(e.popup)))}),1e3),o=setTimeout((function(){clearInterval(r),n(new rt(e.popup)),window.removeEventListener("message",i,!1)}),1e3*(e.timeoutInSeconds||60));i=function(a){if(a.data&&"authorization_response"===a.data.type){if(clearTimeout(o),clearInterval(r),window.removeEventListener("message",i,!1),e.popup.close(),a.data.response.error)return n(tt.fromPayload(a.data.response));t(a.data.response)}},window.addEventListener("message",i)}))}(Object.assign(Object.assign({},n),{timeoutInSeconds:n.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));case 8:if(o=e.sent,r.state===o.state){e.next=11;break}throw new tt("state_mismatch","Invalid state");case 11:return a=(null===(i=t.authorizationParams)||void 0===i?void 0:i.organization)||this.options.authorizationParams.organization,e.next=14,this._requestToken({audience:r.audience,scope:r.scope,code_verifier:r.code_verifier,grant_type:"authorization_code",code:o.code,redirect_uri:r.redirect_uri},{nonceIn:r.nonce,organization:a});case 14:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getUser",value:function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getIdTokenFromCache();case 2:return n=e.sent,e.abrupt("return",null===(t=null==n?void 0:n.decodedToken)||void 0===t?void 0:t.user);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getIdTokenClaims",value:function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getIdTokenFromCache();case 2:return n=e.sent,e.abrupt("return",null===(t=null==n?void 0:n.decodedToken)||void 0===t?void 0:t.claims);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"loginWithRedirect",value:function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n,i,r,o,a,s,l,u,c,d,h,p=arguments;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.length>0&&void 0!==p[0]?p[0]:{},i=Bt(t),r=i.openUrl,o=i.fragment,a=i.appState,s=je(i,["openUrl","fragment","appState"]),l=(null===(n=s.authorizationParams)||void 0===n?void 0:n.organization)||this.options.authorizationParams.organization,e.next=9,this._prepareAuthorizeUrl(s.authorizationParams||{});case 9:if(u=e.sent,c=u.url,d=je(u,["url"]),this.transactionManager.create(Object.assign(Object.assign(Object.assign({},d),{appState:a}),l&&{organization:l})),h=o?"".concat(c,"#").concat(o):c,!r){e.next=19;break}return e.next=17,r(h);case 17:e.next=20;break;case 19:window.location.assign(h);case 20:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"handleRedirectCallback",value:function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n,i,r,o,a,s,l,u,c,d,h=arguments;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=h.length>0&&void 0!==h[0]?h[0]:window.location.href,0!==(n=t.split("?").slice(1)).length){e.next=4;break}throw new Error("There are no query params available for parsing.");case 4:if(i=function(e){e.indexOf("#")>-1&&(e=e.substring(0,e.indexOf("#")));var t=new URLSearchParams(e);return{state:t.get("state"),code:t.get("code")||void 0,error:t.get("error")||void 0,error_description:t.get("error_description")||void 0}}(n.join("")),r=i.state,o=i.code,a=i.error,s=i.error_description,l=this.transactionManager.get()){e.next=7;break}throw new tt("missing_transaction","Invalid state");case 7:if(this.transactionManager.remove(),!a){e.next=9;break}throw new nt(a,s||a,r,l.appState);case 9:if(l.code_verifier&&(!l.state||l.state===r)){e.next=11;break}throw new tt("state_mismatch","Invalid state");case 11:return u=l.organization,c=l.nonce,d=l.redirect_uri,e.next=14,this._requestToken(Object.assign({audience:l.audience,scope:l.scope,code_verifier:l.code_verifier,grant_type:"authorization_code",code:o},d?{redirect_uri:d}:{}),{nonceIn:c,organization:u});case 14:return e.abrupt("return",{appState:l.appState});case 15:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"checkSession",value:function(){var e=Ze((0,_e.Z)().mark((function e(t){return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.cookieStorage.get(this.isAuthenticatedCookieName)){e.next=4;break}if(this.cookieStorage.get("auth0.is.authenticated")){e.next=3;break}return e.abrupt("return");case 3:this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated");case 4:return e.prev=4,e.next=7,this.getTokenSilently(t);case 7:e.next=11;break;case 9:e.prev=9,e.t0=e.catch(4);case 11:case"end":return e.stop()}}),e,this,[[4,9]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getTokenSilently",value:function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n,i,r,o=this,a=arguments;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},i=Object.assign(Object.assign({cacheMode:"on"},t),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),t.authorizationParams),{scope:kt(this.scope,null===(n=t.authorizationParams)||void 0===n?void 0:n.scope)})}),e.next=4,function(e,t){var n=Gt[t];return n||(n=e().finally((function(){delete Gt[t],n=null})),Gt[t]=n),n}((function(){return o._getTokenSilently(i)}),"".concat(this.options.clientId,"::").concat(i.authorizationParams.audience,"::").concat(i.authorizationParams.scope));case 4:return r=e.sent,e.abrupt("return",t.detailedResponse?r:null==r?void 0:r.access_token);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_getTokenSilently",value:function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,i,r,o,a,s,l,u,c;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.cacheMode,i=je(t,["cacheMode"]),"off"===n){e.next=7;break}return e.next=4,this._getEntryFromCache({scope:i.authorizationParams.scope,audience:i.authorizationParams.audience||"default",clientId:this.options.clientId});case 4:if(!(r=e.sent)){e.next=7;break}return e.abrupt("return",r);case 7:if("cache-only"===n){e.next=39;break}return e.next=10,function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,i,r=arguments;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.length>1&&void 0!==r[1]?r[1]:3,i=0;case 2:if(!(i<n)){e.next=10;break}return e.next=5,t();case 5:if(!e.sent){e.next=7;break}return e.abrupt("return",!0);case 7:i++,e.next=2;break;case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()((function(){return Wt.acquireLock("auth0.lock.getTokenSilently",5e3)}),10);case 10:if(e.sent){e.next=12;break}throw new it;case 12:if(e.prev=12,window.addEventListener("pagehide",this._releaseLockOnPageHide),"off"===n){e.next=19;break}return e.next=16,this._getEntryFromCache({scope:i.authorizationParams.scope,audience:i.authorizationParams.audience||"default",clientId:this.options.clientId});case 16:if(!(o=e.sent)){e.next=19;break}return e.abrupt("return",o);case 19:if(!this.options.useRefreshTokens){e.next=25;break}return e.next=22,this._getTokenUsingRefreshToken(i);case 22:e.t0=e.sent,e.next=28;break;case 25:return e.next=27,this._getTokenFromIFrame(i);case 27:e.t0=e.sent;case 28:return a=e.t0,s=a.id_token,l=a.access_token,u=a.oauthTokenScope,c=a.expires_in,e.abrupt("return",Object.assign(Object.assign({id_token:s,access_token:l},u?{scope:u}:null),{expires_in:c}));case 34:return e.prev=34,e.next=37,Wt.releaseLock("auth0.lock.getTokenSilently");case 37:return window.removeEventListener("pagehide",this._releaseLockOnPageHide),e.finish(34);case 39:case"end":return e.stop()}}),e,this,[[12,,34,39]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getTokenWithPopup",value:function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n,i,r,o=arguments;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},n=o.length>1&&void 0!==o[1]?o[1]:{},r=Object.assign(Object.assign({},t),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),t.authorizationParams),{scope:kt(this.scope,null===(i=t.authorizationParams)||void 0===i?void 0:i.scope)})}),n=Object.assign(Object.assign({},Je),n),e.next=6,this.loginWithPopup(r,n);case 6:return e.next=8,this.cacheManager.get(new wt({scope:r.authorizationParams.scope,audience:r.authorizationParams.audience||"default",clientId:this.options.clientId}));case 8:return e.abrupt("return",e.sent.access_token);case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"isAuthenticated",value:function(){var e=Ze((0,_e.Z)().mark((function e(){return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getUser();case 2:return e.abrupt("return",!!e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_buildLogoutUrl",value:function(e){null!==e.clientId?e.clientId=e.clientId||this.options.clientId:delete e.clientId;var t=e.logoutParams||{},n=t.federated,i=je(t,["federated"]),r=n?"&federated":"";return this._url("/v2/logout?".concat(ht(Object.assign({clientId:e.clientId},i))))+r}},{key:"logout",value:function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n,i,r,o,a=arguments;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=a.length>0&&void 0!==a[0]?a[0]:{},n=Bt(t),i=n.openUrl,r=je(n,["openUrl"]),null!==t.clientId){e.next=7;break}return e.next=5,this.cacheManager.clear();case 5:e.next=9;break;case 7:return e.next=9,this.cacheManager.clear(t.clientId||this.options.clientId);case 9:if(this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@"),o=this._buildLogoutUrl(r),!i){e.next=18;break}return e.next=16,i(o);case 16:e.next=19;break;case 18:!1!==i&&window.location.assign(o);case 19:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_getTokenFromIFrame",value:function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,i,r,o,a,s,l,u,c,d,h,p,f;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object.assign(Object.assign({},t.authorizationParams),{prompt:"none"}),(i=this.cookieStorage.get(this.orgHintCookieName))&&!n.organization&&(n.organization=i),e.next=4,this._prepareAuthorizeUrl(n,{response_mode:"web_message"},window.location.origin);case 4:if(r=e.sent,o=r.url,a=r.state,s=r.nonce,l=r.code_verifier,u=r.redirect_uri,c=r.scope,d=r.audience,e.prev=12,!window.crossOriginIsolated){e.next=15;break}throw new tt("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");case 15:return h=t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,e.next=18,function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60;return new Promise((function(i,r){var o=window.document.createElement("iframe");o.setAttribute("width","0"),o.setAttribute("height","0"),o.style.display="none";var a,s=function(){window.document.body.contains(o)&&(window.document.body.removeChild(o),window.removeEventListener("message",a,!1))},l=setTimeout((function(){r(new it),s()}),1e3*n);a=function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){if(e.origin==t&&e.data&&"authorization_response"===e.data.type){var n=e.source;n&&n.close(),e.data.response.error?r(tt.fromPayload(e.data.response)):i(e.data.response),clearTimeout(l),window.removeEventListener("message",a,!1),setTimeout(s,2e3)}})),window.addEventListener("message",a,!1),window.document.body.appendChild(o),o.setAttribute("src",e)}))}(o,this.domainUrl,h);case 18:if(p=e.sent,a===p.state){e.next=21;break}throw new tt("state_mismatch","Invalid state");case 21:return e.next=23,this._requestToken(Object.assign(Object.assign({},t.authorizationParams),{code_verifier:l,code:p.code,grant_type:"authorization_code",redirect_uri:u,timeout:t.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:s,organization:n.organization});case 23:return f=e.sent,e.abrupt("return",Object.assign(Object.assign({},f),{scope:c,oauthTokenScope:f.scope,audience:d}));case 27:throw e.prev=27,e.t0=e.catch(12),"login_required"===e.t0.error&&this.logout({openUrl:!1}),e.t0;case 30:case"end":return e.stop()}}),e,this,[[12,27]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_getTokenUsingRefreshToken",value:function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,i,r,o;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.cacheManager.get(new wt({scope:t.authorizationParams.scope,audience:t.authorizationParams.audience||"default",clientId:this.options.clientId}));case 2:if((n=e.sent)&&n.refresh_token||this.worker){e.next=9;break}if(!this.options.useRefreshTokensFallback){e.next=8;break}return e.next=7,this._getTokenFromIFrame(t);case 7:case 22:return e.abrupt("return",e.sent);case 8:throw new st(t.authorizationParams.audience||"default",t.authorizationParams.scope);case 9:return i=t.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,r="number"==typeof t.timeoutInSeconds?1e3*t.timeoutInSeconds:null,e.prev=10,e.next=13,this._requestToken(Object.assign(Object.assign(Object.assign({},t.authorizationParams),{grant_type:"refresh_token",refresh_token:n&&n.refresh_token,redirect_uri:i}),r&&{timeout:r}));case 13:return o=e.sent,e.abrupt("return",Object.assign(Object.assign({},o),{scope:t.authorizationParams.scope,oauthTokenScope:o.scope,audience:t.authorizationParams.audience||"default"}));case 17:if(e.prev=17,e.t0=e.catch(10),!(e.t0.message.indexOf("Missing Refresh Token")>-1||e.t0.message&&e.t0.message.indexOf("invalid refresh token")>-1)||!this.options.useRefreshTokensFallback){e.next=23;break}return e.next=22,this._getTokenFromIFrame(t);case 23:throw e.t0;case 24:case"end":return e.stop()}}),e,this,[[10,17]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_saveEntryInCache",value:function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,i,r;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.id_token,i=t.decodedToken,r=je(t,["id_token","decodedToken"]),this.userCache.set("@@user@@",{id_token:n,decodedToken:i}),e.next=4,this.cacheManager.setIdToken(this.options.clientId,t.id_token,t.decodedToken);case 4:return e.next=6,this.cacheManager.set(r);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_getIdTokenFromCache",value:function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n,i;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.options.authorizationParams.audience||"default",e.next=3,this.cacheManager.getIdToken(new wt({clientId:this.options.clientId,audience:t,scope:this.scope}));case 3:return n=e.sent,i=this.userCache.get("@@user@@"),e.abrupt("return",n&&n.id_token===(null==i?void 0:i.id_token)?i:(this.userCache.set("@@user@@",n),n));case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_getEntryFromCache",value:function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,i,r,o,a,s,l,u;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.scope,i=t.audience,r=t.clientId,e.next=3,this.cacheManager.get(new wt({scope:n,audience:i,clientId:r}),60);case 3:if(!(o=e.sent)||!o.access_token){e.next=12;break}return a=o.access_token,s=o.oauthTokenScope,l=o.expires_in,e.next=10,this._getIdTokenFromCache();case 10:return u=e.sent,e.abrupt("return",u&&Object.assign(Object.assign({id_token:u.id_token,access_token:a},s?{scope:s}:null),{expires_in:l}));case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_requestToken",value:function(){var e=Ze((0,_e.Z)().mark((function e(t,n){var i,r,o,a,s;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(i=n||{}).nonceIn,o=i.organization,e.next=5,yt(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},t),this.worker);case 5:return a=e.sent,e.next=8,this._verifyIdToken(a.id_token,r,o);case 8:return s=e.sent,e.next=11,this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},a),{decodedToken:s,scope:t.scope,audience:t.audience||"default"}),a.scope?{oauthTokenScope:a.scope}:null),{client_id:this.options.clientId}));case 11:return this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(o),e.abrupt("return",Object.assign(Object.assign({},a),{decodedToken:s}));case 14:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}(),Ut={isAuthenticated:!1,isLoading:!0},jt=function(){throw new Error("You forgot to wrap your component in <Auth0Provider>.")},Kt=We(We({},Ut),{buildAuthorizeUrl:jt,buildLogoutUrl:jt,getAccessTokenSilently:jt,getAccessTokenWithPopup:jt,getIdTokenClaims:jt,loginWithRedirect:jt,loginWithPopup:jt,logout:jt,handleRedirectCallback:jt}),Yt=(0,e.createContext)(Kt),Xt=function(e){function t(n,i){var r=e.call(this,i||n)||this;return r.error=n,r.error_description=i,Object.setPrototypeOf(r,t.prototype),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Be(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error),qt=/[?&]code=[^&]+/,Qt=/[?&]state=[^&]+/,Jt=/[?&]error=[^&]+/,$t=function(e){return function(t){return t instanceof Error?t:null!==t&&"object"===typeof t&&"error"in t&&"string"===typeof t.error?"error_description"in t&&"string"===typeof t.error_description?new Xt(t.error,t.error_description):new Xt(t.error):new Error(e)}},en=$t("Login failed"),tn=$t("Get access token failed"),nn=function(e){var t;(null===e||void 0===e?void 0:e.redirectUri)&&(console.warn("Using `redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `redirectUri` will be no longer supported in a future version"),e.authorizationParams=e.authorizationParams||{},e.authorizationParams.redirect_uri=e.redirectUri,delete e.redirectUri),(null===(t=null===e||void 0===e?void 0:e.authorizationParams)||void 0===t?void 0:t.redirectUri)&&(console.warn("Using `authorizationParams.redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `authorizationParams.redirectUri` will be removed in a future version"),e.authorizationParams.redirect_uri=e.authorizationParams.redirectUri,delete e.authorizationParams.redirectUri)},rn=function(e,t){switch(t.type){case"LOGIN_POPUP_STARTED":return We(We({},e),{isLoading:!0});case"LOGIN_POPUP_COMPLETE":case"INITIALISED":return We(We({},e),{isAuthenticated:!!t.user,user:t.user,isLoading:!1,error:void 0});case"HANDLE_REDIRECT_COMPLETE":case"GET_ACCESS_TOKEN_COMPLETE":return e.user===t.user?e:We(We({},e),{isAuthenticated:!!t.user,user:t.user});case"LOGOUT":return We(We({},e),{isAuthenticated:!1,user:void 0});case"ERROR":return We(We({},e),{isLoading:!1,error:t.error})}},on=function(e){window.history.replaceState({},document.title,(null===e||void 0===e?void 0:e.returnTo)||window.location.pathname)},an=function(t){var n=t.children,i=t.skipRedirectCallback,r=t.onRedirectCallback,o=void 0===r?on:r,a=t.context,s=void 0===a?Yt:a,l=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(t,["children","skipRedirectCallback","onRedirectCallback","context"]),u=(0,e.useState)((function(){return new zt(function(e){return nn(e),We(We({},e),{auth0Client:{name:"auth0-react",version:"2.2.0"}})}(l))}))[0],c=(0,e.useReducer)(rn,Ut),d=c[0],h=c[1],p=(0,e.useRef)(!1);(0,e.useEffect)((function(){p.current||(p.current=!0,ze(void 0,void 0,void 0,(function(){var e,t,n;return Ue(this,(function(r){switch(r.label){case 0:return r.trys.push([0,7,,8]),e=void 0,void 0===a&&(a=window.location.search),!qt.test(a)&&!Jt.test(a)||!Qt.test(a)||i?[3,3]:[4,u.handleRedirectCallback()];case 1:return t=r.sent().appState,[4,u.getUser()];case 2:return e=r.sent(),o(t,e),[3,6];case 3:return[4,u.checkSession()];case 4:return r.sent(),[4,u.getUser()];case 5:e=r.sent(),r.label=6;case 6:return h({type:"INITIALISED",user:e}),[3,8];case 7:return n=r.sent(),h({type:"ERROR",error:en(n)}),[3,8];case 8:return[2]}var a}))})))}),[u,o,i]);var f=(0,e.useCallback)((function(e){return nn(e),u.loginWithRedirect(e)}),[u]),v=(0,e.useCallback)((function(e,t){return ze(void 0,void 0,void 0,(function(){var n,i;return Ue(this,(function(r){switch(r.label){case 0:h({type:"LOGIN_POPUP_STARTED"}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,u.loginWithPopup(e,t)];case 2:return r.sent(),[3,4];case 3:return n=r.sent(),h({type:"ERROR",error:en(n)}),[2];case 4:return[4,u.getUser()];case 5:return i=r.sent(),h({type:"LOGIN_POPUP_COMPLETE",user:i}),[2]}}))}))}),[u]),g=(0,e.useCallback)((function(e){return void 0===e&&(e={}),ze(void 0,void 0,void 0,(function(){return Ue(this,(function(t){switch(t.label){case 0:return[4,u.logout(e)];case 1:return t.sent(),(e.openUrl||!1===e.openUrl)&&h({type:"LOGOUT"}),[2]}}))}))}),[u]),m=(0,e.useCallback)((function(e){return ze(void 0,void 0,void 0,(function(){var t,n,i,r;return Ue(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,3,5]),[4,u.getTokenSilently(e)];case 1:return t=o.sent(),[3,5];case 2:throw n=o.sent(),tn(n);case 3:return i=h,r={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,u.getUser()];case 4:return i.apply(void 0,[(r.user=o.sent(),r)]),[7];case 5:return[2,t]}}))}))}),[u]),y=(0,e.useCallback)((function(e,t){return ze(void 0,void 0,void 0,(function(){var n,i,r,o;return Ue(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,3,5]),[4,u.getTokenWithPopup(e,t)];case 1:return n=a.sent(),[3,5];case 2:throw i=a.sent(),tn(i);case 3:return r=h,o={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,u.getUser()];case 4:return r.apply(void 0,[(o.user=a.sent(),o)]),[7];case 5:return[2,n]}}))}))}),[u]),C=(0,e.useCallback)((function(){return u.getIdTokenClaims()}),[u]),k=(0,e.useCallback)((function(e){return ze(void 0,void 0,void 0,(function(){var t,n,i;return Ue(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,3,5]),[4,u.handleRedirectCallback(e)];case 1:return[2,r.sent()];case 2:throw t=r.sent(),tn(t);case 3:return n=h,i={type:"HANDLE_REDIRECT_COMPLETE"},[4,u.getUser()];case 4:return n.apply(void 0,[(i.user=r.sent(),i)]),[7];case 5:return[2]}}))}))}),[u]),w=(0,e.useMemo)((function(){return We(We({},d),{getAccessTokenSilently:m,getAccessTokenWithPopup:y,getIdTokenClaims:C,loginWithRedirect:f,loginWithPopup:v,logout:g,handleRedirectCallback:k})}),[d,m,y,C,f,v,g,k]);return e.createElement(s.Provider,{value:w},n)},sn=function(t){return void 0===t&&(t=Yt),(0,e.useContext)(t)},ln=function(){return e.createElement(e.Fragment,null)},un=function(){return ze(void 0,void 0,void 0,(function(){return Ue(this,(function(e){return[2]}))}))},cn=function(){return"".concat(window.location.pathname).concat(window.location.search)},dn=n(184),hn=function(){return(0,dn.jsx)("div",{className:"loader",children:(0,dn.jsx)("img",{src:"https://cdn.auth0.com/blog/hello-auth0/loader.svg",alt:"Loading..."})})},pn=function(t){var n=function(t,n){return void 0===n&&(n={}),function(i){var r=this,o=n.returnTo,a=void 0===o?cn:o,s=n.onRedirecting,l=void 0===s?ln:s,u=n.onBeforeAuthentication,c=void 0===u?un:u,d=n.loginOptions,h=n.context,p=sn(void 0===h?Yt:h),f=p.isAuthenticated,v=p.isLoading,g=p.loginWithRedirect;return(0,e.useEffect)((function(){if(!v&&!f){var e=We(We({},d),{appState:We(We({},d&&d.appState),{returnTo:"function"===typeof a?a():a})});ze(r,void 0,void 0,(function(){return Ue(this,(function(t){switch(t.label){case 0:return[4,c()];case 1:return t.sent(),[4,g(e)];case 2:return t.sent(),[2]}}))}))}}),[v,f,g,c,d,a]),f?e.createElement(t,We({},i)):l()}}(t.component,{onRedirecting:function(){return(0,dn.jsx)("div",{className:"page-layout",children:(0,dn.jsx)(hn,{})})}});return(0,dn.jsx)(n,{})};var fn=function(){var e=sn(),t=e.isAuthenticated,n=e.loginWithRedirect;if(!t)return(0,dn.jsx)(dn.Fragment,{children:(0,dn.jsxs)("div",{className:"main-container",children:[(0,dn.jsx)("div",{className:"main-welcome-one",children:"UpTrend"}),(0,dn.jsx)("div",{className:"main-welcome-two",children:"DownTrend"}),(0,dn.jsx)("div",{children:(0,dn.jsx)("button",{className:"main-login-button",onClick:function(){return n()},children:"Log In | Sign Up"})})]})});window.location.href="/dashboard"},vn=n.p+"static/media/stock.000a749e154164437c99.jpg";var gn=function(){var t=sn().logout,n=sn(),i=n.isAuthenticated,o=n.loginWithRedirect,a=(0,e.useState)(!1),s=(0,r.Z)(a,2),l=s[0],u=s[1];return i?(0,dn.jsx)(dn.Fragment,{children:(0,dn.jsx)("nav",{className:"bg-white border-gray-200 dark:bg-gray-900",children:(0,dn.jsxs)("div",{className:"max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4",children:[(0,dn.jsxs)(Le,{to:"/dashboard",className:"flex items-center",children:[(0,dn.jsx)("img",{src:vn,className:"h-8 mr-3",alt:"From https://www.pexels.com/photo/low-angle-view-of-lighting-equipment-on-shelf-257904/"}),(0,dn.jsx)("span",{className:"self-center text-2xl font-semibold whitespace-nowrap dark:text-white",children:"UpTrendDownTrend"})]}),(0,dn.jsxs)("div",{children:[(0,dn.jsx)("div",{className:"burger-drop md:hidden",children:(0,dn.jsxs)("button",{onClick:function(){u(!l)},className:"text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600",children:[(0,dn.jsx)("svg",{className:"w-5 h-5 ".concat(l?"hidden":"block"),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 17 14",children:(0,dn.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M1 1h15M1 7h15M1 13h15"})}),(0,dn.jsx)("svg",{className:"w-5 h-5 ".concat(l?"block":"hidden"),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 17 14",children:(0,dn.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M1 1h15M1 7h15M1 13h15"})})]})}),(0,dn.jsx)("div",{className:"md:flex md:w-auto md:order-1 ".concat(l?"block":"hidden"),children:(0,dn.jsxs)("ul",{className:"flex flex-col font-medium p-4 md:p-0 mt-4 border border-gray-100 rounded-lg bg-gray-50 md:flex-row md:space-x-8 md:mt-0 md:border-0 md:bg-white dark:bg-gray-800 md:dark:bg-gray-900 dark:border-gray-700",children:[(0,dn.jsx)("li",{children:(0,dn.jsx)(Le,{to:"dashboard",className:"block py-2 pl-3 pr-4 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:hover:text-blue-700 md:p-0 md:dark:hover:text-blue-500 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent dark:border-gray-700",children:"Dashboard"})}),(0,dn.jsx)("li",{children:(0,dn.jsx)(Le,{to:"/symbols",className:"block py-2 pl-3 pr-4 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:hover:text-blue-700 md:p-0 md:dark:hover:text-blue-500 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent dark:border-gray-700",children:"All Symbols"})}),(0,dn.jsx)("li",{children:(0,dn.jsx)(Le,{to:"/collections",className:"block py-2 pl-3 pr-4 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:hover:text-blue-700 md:p-0 md:dark:hover:text-blue-500 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent dark:border-gray-700",children:"Collections"})}),(0,dn.jsx)("li",{children:(0,dn.jsx)(Le,{to:"/details",className:"block py-2 pl-3 pr-4 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:hover:text-blue-700 md:p-0 md:dark:hover:text-blue-500 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent dark:border-gray-700",children:"Symbol Search"})})]})})]}),(0,dn.jsx)("div",{className:"flex md:order-2",children:i?(0,dn.jsx)(dn.Fragment,{children:(0,dn.jsx)("button",{type:"button",className:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 text-center mr-3 md:mr-0 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",onClick:function(){return t({logoutParams:{returnTo:window.location.origin}})},children:"Logout"})}):(0,dn.jsx)("button",{type:"button",className:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 text-center mr-3 md:mr-0 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",onClick:function(){return o()},children:"Login"})})]})})}):(0,dn.jsx)(dn.Fragment,{children:(0,dn.jsx)("nav",{className:"bg-white border-gray-200 dark:bg-gray-900",children:(0,dn.jsxs)("div",{className:"max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4",children:[(0,dn.jsxs)(Le,{to:"/",className:"flex items-center",children:[(0,dn.jsx)("img",{src:vn,className:"h-8 mr-3",alt:"From https://www.pexels.com/photo/low-angle-view-of-lighting-equipment-on-shelf-257904/"}),(0,dn.jsx)("span",{className:"self-center text-2xl font-semibold whitespace-nowrap dark:text-white",children:"UpTrendDownTrend"})]}),(0,dn.jsxs)("div",{className:"flex md:order-2",children:[(0,dn.jsx)("button",{type:"button",className:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 text-center mr-3 md:mr-0 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",onClick:function(){return o()},children:"Login"}),(0,dn.jsxs)("button",{"data-collapse-toggle":"navbar-cta",type:"button",className:"inline-flex items-center p-2 w-10 h-10 justify-center text-sm text-gray-500 rounded-lg md:hidden hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600","aria-controls":"navbar-cta","aria-expanded":"false",children:[(0,dn.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,dn.jsx)("svg",{className:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 17 14",children:(0,dn.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M1 1h15M1 7h15M1 13h15"})})]})]})]})})})},mn=n(1752),yn=n(1120),Cn=n(2963),kn=Object.defineProperty,wn=Object.defineProperties,Sn=Object.getOwnPropertyDescriptor,bn=Object.getOwnPropertyDescriptors,En=Object.getOwnPropertySymbols,xn=Object.prototype.hasOwnProperty,Rn=Object.prototype.propertyIsEnumerable,Dn=function(e,t,n){return t in e?kn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Tn=function(e,t){for(var n in t||(t={}))xn.call(t,n)&&Dn(e,n,t[n]);if(En){var i,r=(0,g.Z)(En(t));try{for(r.s();!(i=r.n()).done;){n=i.value;Rn.call(t,n)&&Dn(e,n,t[n])}}catch(o){r.e(o)}finally{r.f()}}return e},On=function(e,t){return wn(e,bn(t))},Pn=function(e,t){var n={};for(var i in e)xn.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&En){var r,o=(0,g.Z)(En(e));try{for(o.s();!(r=o.n()).done;){i=r.value;t.indexOf(i)<0&&Rn.call(e,i)&&(n[i]=e[i])}}catch(a){o.e(a)}finally{o.f()}}return n},An=function(e,t){for(var n in t)kn(e,n,{get:t[n],enumerable:!0})},Mn=function(e,t,n,i){for(var r,o=i>1?void 0:i?Sn(t,n):t,a=e.length-1;a>=0;a--)(r=e[a])&&(o=(i?r(t,n,o):r(o))||o);return i&&o&&kn(t,n,o),o},Nn=function(e,t){return function(n,i){return t(n,i,e)}},Ln={};function In(e){return null==e||""===e?null:e}function Fn(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return null!=e&&(""!==e||t)}function _n(e){return!Fn(e)}function Gn(e){return null==e||0===e.length}function Zn(e){return null!=e&&"function"===typeof e.toString?e.toString():null}function Vn(e){if(void 0!==e){if(null===e||""===e)return null;if("number"===typeof e)return isNaN(e)?void 0:e;var t=parseInt(e,10);return isNaN(t)?void 0:t}}function Hn(e){if(void 0!==e)return null!==e&&""!==e&&("boolean"===typeof e?e:/true/i.test(e))}function Bn(e){if(null!=e&&""!==e)return e}function Wn(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function zn(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=null==e,r=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),i&&r)return 0;if(i)return-1;if(r)return 1;function o(e,t){return e>t?1:e<t?-1:0}if("string"!==typeof e)return o(e,t);if(!n)return o(e,t);try{return e.localeCompare(t)}catch(je){return o(e,t)}}function Un(e){if(e instanceof Set||e instanceof Map){var t=[];return e.forEach((function(e){return t.push(e)})),t}return Object.values(e)}An(Ln,{attrToBoolean:function(){return Hn},attrToNumber:function(){return Vn},attrToString:function(){return Bn},defaultComparator:function(){return zn},exists:function(){return Fn},jsonEquals:function(){return Wn},makeNull:function(){return In},missing:function(){return _n},missingOrEmpty:function(){return Gn},toStringOrNull:function(){return Zn},values:function(){return Un}});var jn=function(){function e(){(0,a.Z)(this,e),this.existingKeys={}}return(0,s.Z)(e,[{key:"addExistingKeys",value:function(e){for(var t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}},{key:"getUniqueKey",value:function(e,t){e=Zn(e);for(var n=0;;){var i=void 0;if(e?(i=e,0!==n&&(i+="_"+n)):t?(i=t,0!==n&&(i+="_"+n)):i=n,!this.existingKeys[i])return this.existingKeys[i]=!0,String(i);n++}}}]),e}(),Kn={};function Yn(e,t){if(null!=e)if(Array.isArray(e))for(var n=0;n<e.length;n++)t(n.toString(),e[n]);else for(var i=0,o=Object.entries(e);i<o.length;i++){var a=(0,r.Z)(o[i],2);t(a[0],a[1])}}function Xn(e){for(var t={},n=Object.keys(e),i=0;i<n.length;i++){var r=n[i],o=e[r];t[r]=o}return t}function qn(e,t){if(e){var n=e,i={};return Object.keys(n).forEach((function(e){if(!(t&&t.indexOf(e)>=0)){var r=n[e],o=ti(r)&&r.constructor===Object;i[e]=o?qn(r):r}})),i}}function Qn(e){if(!e)return[];var t=Object;if("function"===typeof t.values)return t.values(e);var n=[];for(var i in e)e.hasOwnProperty(i)&&e.propertyIsEnumerable(i)&&n.push(e[i]);return n}function Jn(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Fn(t)&&Yn(t,(function(t,r){var o=e[t];if(o!==r){if(i)if(null==o&&null!=r)"object"===typeof r&&r.constructor===Object&&(o={},e[t]=o);ti(r)&&ti(o)&&!Array.isArray(o)?Jn(o,r,n,i):(n||void 0!==r)&&(e[t]=r)}}))}function $n(e,t,n){if(t&&e){if(!n)return e[t];for(var i=t.split("."),r=e,o=0;o<i.length;o++){if(null==r)return;r=r[i[o]]}return r}}function ei(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;Object.keys(e).forEach((function(n){"object"!==typeof e[n]||t.includes(n)||(e[n]=void 0)}));var i=Object.getPrototypeOf(e),r={},o=function(e){return"AG Grid: Grid API function ".concat(e,"() cannot be called as the grid has been destroyed.\n    It is recommended to remove local references to the grid api. Alternatively, check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.\n    To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ").concat(n)};Object.getOwnPropertyNames(i).forEach((function(e){if("function"===typeof i[e]&&!t.includes(e)){r[e]={value:function(){console.warn(o(e))},writable:!0}}})),Object.defineProperties(e,r)}function ti(e){return"object"===typeof e&&null!==e}An(Kn,{cloneObject:function(){return Xn},deepCloneDefinition:function(){return qn},getAllValuesInObject:function(){return Qn},getValueUsingField:function(){return $n},isNonNullObject:function(){return ti},iterateObject:function(){return Yn},mergeDeep:function(){return Jn},removeAllReferences:function(){return ei}});var ni={};An(ni,{compose:function(){return mi},debounce:function(){return fi},doOnce:function(){return ri},errorOnce:function(){return ai},executeAfter:function(){return pi},executeInAWhile:function(){return ui},executeNextVMTurn:function(){return hi},getFunctionName:function(){return si},isFunction:function(){return li},noop:function(){return yi},throttle:function(){return vi},waitUntil:function(){return gi},warnOnce:function(){return oi}});var ii={};function ri(e,t){ii[t]||(e(),ii[t]=!0)}function oi(e){ri((function(){return console.warn("AG Grid: "+e)}),e)}function ai(e){ri((function(){return console.error("AG Grid: "+e)}),e)}function si(e){if(e.name)return e.name;var t=/function\s+([^\(]+)/.exec(e.toString());return t&&2===t.length?t[1].trim():null}function li(e){return!!(e&&e.constructor&&e.call&&e.apply)}function ui(e){pi(e,400)}var ci=[],di=!1;function hi(e){ci.push(e),di||(di=!0,window.setTimeout((function(){var e=ci.slice();ci.length=0,di=!1,e.forEach((function(e){return e()}))}),0))}function pi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;e.length>0&&window.setTimeout((function(){return e.forEach((function(e){return e()}))}),t)}function fi(e,t){var n;return function(){for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];var a=this;window.clearTimeout(n),n=window.setTimeout((function(){e.apply(a,r)}),t)}}function vi(e,t){var n=0;return function(){var i=this,r=(new Date).getTime();if(!(r-n<t)){n=r;for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];e.apply(i,a)}}}function gi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,i=arguments.length>3?arguments[3]:void 0,r=(new Date).getTime(),o=null,a=!1,s=function(){var s=(new Date).getTime()-r>n;(e()||s)&&(t(),a=!0,null!=o&&(window.clearInterval(o),o=null),s&&i&&console.warn(i))};s(),a||(o=window.setInterval(s,10))}function mi(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce((function(e,t){return t(e)}),e)}}var yi=function(){},Ci=function(e){return 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}(Ci||{}),ki=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,null,[{key:"register",value:function(t){e.__register(t,!0,void 0)}},{key:"registerModules",value:function(t){e.__registerModules(t,!0,void 0)}},{key:"__register",value:function(t,n,i){e.runVersionChecks(t),void 0!==i?(e.areGridScopedModules=!0,void 0===e.gridModulesMap[i]&&(e.gridModulesMap[i]={}),e.gridModulesMap[i][t.moduleName]=t):e.globalModulesMap[t.moduleName]=t,e.setModuleBased(n)}},{key:"__unRegisterGridModules",value:function(t){delete e.gridModulesMap[t]}},{key:"__registerModules",value:function(t,n,i){e.setModuleBased(n),t&&t.forEach((function(t){return e.__register(t,n,i)}))}},{key:"isValidModuleVersion",value:function(t){var n=t.version.split(".")||[],i=(0,r.Z)(n,2),o=i[0],a=i[1],s=e.currentModuleVersion.split(".")||[],l=(0,r.Z)(s,2),u=l[0],c=l[1];return o===u&&a===c}},{key:"runVersionChecks",value:function(t){if(e.currentModuleVersion||(e.currentModuleVersion=t.version),t.version?e.isValidModuleVersion(t)||console.error("AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '".concat(t.moduleName,"' is version ").concat(t.version," but the other modules are version ").concat(this.currentModuleVersion,". Please update all modules to the same version.")):console.error("AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '".concat(t.moduleName,"' is incompatible. Please update all modules to the same version.")),t.validate){var n=t.validate();if(!n.isValid){var i=n;console.error("AG Grid: ".concat(i.message))}}}},{key:"setModuleBased",value:function(t){void 0===e.moduleBased?e.moduleBased=t:e.moduleBased!==t&&ri((function(){console.warn("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms."),console.warn("Please see https://www.ag-grid.com/javascript-grid/packages-modules/ for more information.")}),"ModulePackageCheck")}},{key:"__setIsBundled",value:function(){e.isBundled=!0}},{key:"__assertRegistered",value:function(t,n,i){var o;if(this.__isRegistered(t,i))return!0;var a,s=n+t;if(e.isBundled)a="AG Grid: unable to use ".concat(n," 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){var l=null==(o=Object.entries(Ci).find((function(e){var n=(0,r.Z)(e,2);n[0];return n[1]===t})))?void 0:o[0];a="AG Grid: unable to use ".concat(n," as the ").concat(l," is not registered").concat(e.areGridScopedModules?" for gridId: ".concat(i):"",". Check if you have registered the module:\n           \n    import { ModuleRegistry } from '@ag-grid-community/core';\n    import { ").concat(l," } from '").concat(t,"';\n    \n    ModuleRegistry.registerModules([ ").concat(l," ]);\n\nFor more info see: https://www.ag-grid.com/javascript-grid/modules/")}else a="AG Grid: unable to use ".concat(n," as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:\n            \n    import 'ag-grid-enterprise';\n            \nFor more info see: https://www.ag-grid.com/javascript-grid/packages/");return ri((function(){console.warn(a)}),s),!1}},{key:"__warnEnterpriseChartDisabled",value:function(e){var t="ag-charts-enterprise:"+e,n="AG Grid: the '".concat(e,"' chart type is not supported in AG Charts Community as 'ag-grid-charts-enterprise' or '@ag-grid-enterprise/charts-enterprise' hasn't been loaded. See ").concat("https://www.ag-grid.com/javascript-data-grid/integrated-charts-installation/"," for more details.");ri((function(){console.warn(n)}),t)}},{key:"__isRegistered",value:function(t,n){var i;return!!e.globalModulesMap[t]||!!(null==(i=e.gridModulesMap[n])?void 0:i[t])}},{key:"__getRegisteredModules",value:function(t){return[].concat((0,o.Z)(Un(e.globalModulesMap)),(0,o.Z)(Un(e.gridModulesMap[t]||{})))}},{key:"__getGridRegisteredModules",value:function(t){var n;return Un(null!=(n=e.gridModulesMap[t])?n:{})||[]}},{key:"__isPackageBased",value:function(){return!e.moduleBased}}]),e}();ki.globalModulesMap={},ki.gridModulesMap={},ki.areGridScopedModules=!1;var wi=ki,Si=function(){function e(t,n){if((0,a.Z)(this,e),this.beanWrappers={},this.destroyed=!1,t&&t.beanClasses){this.contextParams=t,this.logger=n,this.logger.log(">> creating ag-Application Context"),this.createBeans();var i=this.getBeanInstances();this.wireBeans(i),this.logger.log(">> ag-Application Context ready - component is alive")}}return(0,s.Z)(e,[{key:"getBeanInstances",value:function(){return Un(this.beanWrappers).map((function(e){return e.beanInstance}))}},{key:"createBean",value:function(e,t){if(!e)throw Error("Can't wire to bean since it is null");return this.wireBeans([e],t),e}},{key:"wireBeans",value:function(e,t){this.autoWireBeans(e),this.methodWireBeans(e),this.callLifeCycleMethods(e,"preConstructMethods"),Fn(t)&&e.forEach(t),this.callLifeCycleMethods(e,"postConstructMethods")}},{key:"createBeans",value:function(){var e=this;this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),Yn(this.beanWrappers,(function(t,n){var i;n.bean.__agBeanMetaData&&n.bean.__agBeanMetaData.autowireMethods&&n.bean.__agBeanMetaData.autowireMethods.agConstructor&&(i=n.bean.__agBeanMetaData.autowireMethods.agConstructor);var r=e.getBeansForParameters(i,n.bean.name),a=new(n.bean.bind.apply(n.bean,[null].concat((0,o.Z)(r))));n.beanInstance=a}));var t=Object.keys(this.beanWrappers).join(", ");this.logger.log("created beans: ".concat(t))}},{key:"createBeanWrapper",value:function(e){var t,n=e.__agBeanMetaData;if(!n)return t=e.prototype.constructor?si(e.prototype.constructor):""+e,void console.error("Context item ".concat(t," is not a bean"));var i={bean:e,beanInstance:null,beanName:n.beanName};this.beanWrappers[n.beanName]=i}},{key:"autoWireBeans",value:function(e){var t=this;e.forEach((function(e){t.forEachMetaDataInHierarchy(e,(function(n,i){var r=n.agClassAttributes;r&&r.forEach((function(n){var r=t.lookupBeanInstance(i,n.beanName,n.optional);e[n.attributeName]=r}))}))}))}},{key:"methodWireBeans",value:function(e){var t=this;e.forEach((function(e){t.forEachMetaDataInHierarchy(e,(function(n,i){Yn(n.autowireMethods,(function(n,r){if("agConstructor"!==n){var o=t.getBeansForParameters(r,i);e[n].apply(e,o)}}))}))}))}},{key:"forEachMetaDataInHierarchy",value:function(e,t){for(var n=Object.getPrototypeOf(e);null!=n;){var i=n.constructor;if(i.hasOwnProperty("__agBeanMetaData"))t(i.__agBeanMetaData,this.getBeanName(i));n=Object.getPrototypeOf(n)}}},{key:"getBeanName",value:function(e){if(e.__agBeanMetaData&&e.__agBeanMetaData.beanName)return e.__agBeanMetaData.beanName;var t=e.toString();return t.substring(9,t.indexOf("("))}},{key:"getBeansForParameters",value:function(e,t){var n=this,i=[];return e&&Yn(e,(function(e,r){var o=n.lookupBeanInstance(t,r);i[Number(e)]=o})),i}},{key:"lookupBeanInstance",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.destroyed)return this.logger.log("AG Grid: bean reference ".concat(t," is used after the grid is destroyed!")),null;if("context"===t)return this;if(this.contextParams.providedBeanInstances&&this.contextParams.providedBeanInstances.hasOwnProperty(t))return this.contextParams.providedBeanInstances[t];var i=this.beanWrappers[t];return i?i.beanInstance:(n||console.error("AG Grid: unable to find bean reference ".concat(t," while initialising ").concat(e)),null)}},{key:"callLifeCycleMethods",value:function(e,t){var n=this;e.forEach((function(e){return n.callLifeCycleMethodsOnBean(e,t)}))}},{key:"callLifeCycleMethodsOnBean",value:function(e,t,n){var i={};this.forEachMetaDataInHierarchy(e,(function(e){var r=e[t];r&&r.forEach((function(e){e!=n&&(i[e]=!0)}))})),Object.keys(i).forEach((function(t){return e[t]()}))}},{key:"getBean",value:function(e){return this.lookupBeanInstance("getBean",e,!0)}},{key:"destroy",value:function(){if(!this.destroyed){this.destroyed=!0,this.logger.log(">> Shutting down ag-Application Context");var e=this.getBeanInstances();this.destroyBeans(e),this.contextParams.providedBeanInstances=null,wi.__unRegisterGridModules(this.contextParams.gridId),this.logger.log(">> ag-Application Context shut down - component is dead")}}},{key:"destroyBean",value:function(e){e&&this.destroyBeans([e])}},{key:"destroyBeans",value:function(e){var t=this;return e?(e.forEach((function(e){t.callLifeCycleMethodsOnBean(e,"preDestroyMethods","destroy");var n=e;"function"===typeof n.destroy&&n.destroy()})),[]):[]}},{key:"isDestroyed",value:function(){return this.destroyed}},{key:"getGridId",value:function(){return this.contextParams.gridId}}]),e}();function bi(e,t,n){var i=Ai(e.constructor);i.preConstructMethods||(i.preConstructMethods=[]),i.preConstructMethods.push(t)}function Ei(e,t,n){var i=Ai(e.constructor);i.postConstructMethods||(i.postConstructMethods=[]),i.postConstructMethods.push(t)}function xi(e,t,n){var i=Ai(e.constructor);i.preDestroyMethods||(i.preDestroyMethods=[]),i.preDestroyMethods.push(t)}function Ri(e){return function(t){Ai(t).beanName=e}}function Di(e){return function(t,n,i){Oi(t,e,!1,t,n,null)}}function Ti(e){return function(t,n,i){Oi(t,e,!0,t,n,null)}}function Oi(e,t,n,i,r,o){if(null!==t)if("number"!==typeof o){var a=Ai(e.constructor);a.agClassAttributes||(a.agClassAttributes=[]),a.agClassAttributes.push({attributeName:r,beanName:t,optional:n})}else console.error("AG Grid: Autowired should be on an attribute");else console.error("AG Grid: Autowired name should not be null")}function Pi(e){return function(t,n,i){var r,o,a="function"==typeof t?t:t.constructor;"number"===typeof i&&(n?(r=Ai(a),o=n):(r=Ai(a),o="agConstructor"),r.autowireMethods||(r.autowireMethods={}),r.autowireMethods[o]||(r.autowireMethods[o]={}),r.autowireMethods[o][i]=e)}}function Ai(e){return e.hasOwnProperty("__agBeanMetaData")||(e.__agBeanMetaData={}),e.__agBeanMetaData}var Mi=function(){function e(){(0,a.Z)(this,e),this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}return(0,s.Z)(e,[{key:"setBeans",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(this.frameworkOverrides=t,this.gridOptionsService=e,n){var r=e.useAsyncEvents();this.addGlobalListener(n,r)}i&&this.addGlobalListener(i,!1)}},{key:"setFrameworkOverrides",value:function(e){this.frameworkOverrides=e}},{key:"getListeners",value:function(e,t,n){var i=t?this.allAsyncListeners:this.allSyncListeners,r=i.get(e);return!r&&n&&(r=new Set,i.set(e,r)),r}},{key:"noRegisteredListenersExist",value:function(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size}},{key:"addEventListener",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.getListeners(e,n,!0).add(t)}},{key:"removeEventListener",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this.getListeners(e,n,!1);if(i&&(i.delete(t),0===i.size)){var r=n?this.allAsyncListeners:this.allSyncListeners;r.delete(e)}}},{key:"addGlobalListener",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}},{key:"removeGlobalListener",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}},{key:"dispatchEvent",value:function(e){var t=e;this.gridOptionsService&&this.gridOptionsService.addGridCommonParams(t),this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}},{key:"dispatchEventOnce",value:function(e){this.firedEvents[e.type]||this.dispatchEvent(e)}},{key:"dispatchToListeners",value:function(e,t){var n,i=this,r=e.type;if(t&&"event"in e){var o=e.event;o instanceof Event&&(e.eventPath=o.composedPath())}var a,s=null!=(n=this.getListeners(r,t,!1))?n:new Set,l=new Set(s);l.size>0&&(a=s,l.forEach((function(n){if(a.has(n)){var r=i.frameworkOverrides?function(){return i.frameworkOverrides.wrapIncoming((function(){return n(e)}))}:function(){return n(e)};t?i.dispatchAsync(r):r()}}))),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach((function(n){var o=i.frameworkOverrides?function(){return i.frameworkOverrides.wrapIncoming((function(){return n(r,e)}))}:function(){return n(r,e)};t?i.dispatchAsync(o):o()}))}},{key:"dispatchAsync",value:function(e){var t=this;this.asyncFunctionsQueue.push(e),this.scheduled||(this.frameworkOverrides.wrapIncoming((function(){window.setTimeout(t.flushAsyncQueue.bind(t),0)})),this.scheduled=!0)}},{key:"flushAsyncQueue",value:function(){this.scheduled=!1;var e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach((function(e){return e()}))}}]),e}();Mn([Nn(0,Pi("gridOptionsService")),Nn(1,Pi("frameworkOverrides")),Nn(2,Pi("globalEventListener")),Nn(3,Pi("globalSyncEventListener"))],Mi.prototype,"setBeans",1),Mi=Mn([Ri("eventService")],Mi);var Ni=function(){function e(t){(0,a.Z)(this,e),this.frameworkOverrides=t,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}return(0,s.Z)(e,[{key:"wrap",value:function(e){var t=this,n=e;return this.frameworkOverrides.shouldWrapOutgoing&&(n=function(n){t.frameworkOverrides.wrapOutgoing((function(){return e(n)}))},this.wrappedListeners.set(e,n)),n}},{key:"wrapGlobal",value:function(e){var t=this,n=e;return this.frameworkOverrides.shouldWrapOutgoing&&(n=function(n,i){t.frameworkOverrides.wrapOutgoing((function(){return e(n,i)}))},this.wrappedGlobalListeners.set(e,n)),n}},{key:"unwrap",value:function(e){var t;return null!=(t=this.wrappedListeners.get(e))?t:e}},{key:"unwrapGlobal",value:function(e){var t;return null!=(t=this.wrappedGlobalListeners.get(e))?t:e}}]),e}(),Li={resizable:!0,sortable:!0},Ii=0;function Fi(){return Ii++}var _i=function(){function e(t,n,i,r){(0,a.Z)(this,e),this.instanceId=Fi(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.eventService=new Mi,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=t,this.userProvidedColDef=n,this.colId=i,this.primary=r,this.setState(t)}return(0,s.Z)(e,[{key:"getInstanceId",value:function(){return this.instanceId}},{key:"setState",value:function(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);var t=e.sortIndex,n=e.initialSortIndex;void 0!==t?null!==t&&(this.sortIndex=t):null!==n&&(this.sortIndex=n);var i=e.hide,r=e.initialHide;this.visible=void 0!==i?!i:!r,void 0!==e.pinned?this.setPinned(e.pinned):this.setPinned(e.initialPinned);var o=e.flex,a=e.initialFlex;void 0!==o?this.flex=o:void 0!==a&&(this.flex=a)}},{key:"setColDef",value:function(e,t,n){this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.eventService.dispatchEvent(this.createColumnEvent("colDefChanged",n))}},{key:"getUserProvidedColDef",value:function(){return this.userProvidedColDef}},{key:"setParent",value:function(e){this.parent=e}},{key:"getParent",value:function(){return this.parent}},{key:"setOriginalParent",value:function(e){this.originalParent=e}},{key:"getOriginalParent",value:function(){return this.originalParent}},{key:"initialise",value:function(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}},{key:"initDotNotation",value:function(){var e=this.gridOptionsService.get("suppressFieldDotNotation");this.fieldContainsDots=Fn(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=Fn(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e}},{key:"initMinAndMaxWidths",value:function(){var e=this.colDef;this.minWidth=this.columnUtils.calculateColMinWidth(e),this.maxWidth=this.columnUtils.calculateColMaxWidth(e)}},{key:"initTooltip",value:function(){this.tooltipEnabled=Fn(this.colDef.tooltipField)||Fn(this.colDef.tooltipValueGetter)||Fn(this.colDef.tooltipComponent)}},{key:"resetActualWidth",value:function(e){var t=this.columnUtils.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}},{key:"isEmptyGroup",value:function(){return!1}},{key:"isRowGroupDisplayed",value:function(e){if(_n(this.colDef)||_n(this.colDef.showRowGroup))return!1;var t=!0===this.colDef.showRowGroup,n=this.colDef.showRowGroup===e;return t||n}},{key:"isPrimary",value:function(){return this.primary}},{key:"isFilterAllowed",value:function(){return!!this.colDef.filter}},{key:"isFieldContainsDots",value:function(){return this.fieldContainsDots}},{key:"isTooltipEnabled",value:function(){return this.tooltipEnabled}},{key:"isTooltipFieldContainsDots",value:function(){return this.tooltipFieldContainsDots}},{key:"addEventListener",value:function(e,t){var n,i;this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.eventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new Ni(this.frameworkOverrides));var r=null!=(i=null==(n=this.frameworkEventListenerService)?void 0:n.wrap(t))?i:t;this.eventService.addEventListener(e,r)}},{key:"removeEventListener",value:function(e,t){var n,i,r=null!=(i=null==(n=this.frameworkEventListenerService)?void 0:n.unwrap(t))?i:t;this.eventService.removeEventListener(e,r)}},{key:"createColumnFunctionCallbackParams",value:function(e){return this.gridOptionsService.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})}},{key:"isSuppressNavigable",value:function(e){if("boolean"===typeof this.colDef.suppressNavigable)return this.colDef.suppressNavigable;if("function"===typeof this.colDef.suppressNavigable){var t=this.createColumnFunctionCallbackParams(e);return(0,this.colDef.suppressNavigable)(t)}return!1}},{key:"isCellEditable",value:function(e){return!(e.group&&!this.gridOptionsService.get("enableGroupEdit"))&&this.isColumnFunc(e,this.colDef.editable)}},{key:"isSuppressFillHandle",value:function(){return!!this.colDef.suppressFillHandle}},{key:"isAutoHeight",value:function(){return!!this.colDef.autoHeight}},{key:"isAutoHeaderHeight",value:function(){return!!this.colDef.autoHeaderHeight}},{key:"isRowDrag",value:function(e){return this.isColumnFunc(e,this.colDef.rowDrag)}},{key:"isDndSource",value:function(e){return this.isColumnFunc(e,this.colDef.dndSource)}},{key:"isCellCheckboxSelection",value:function(e){return this.isColumnFunc(e,this.colDef.checkboxSelection)}},{key:"isSuppressPaste",value:function(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)}},{key:"isResizable",value:function(){return!!this.getColDefValue("resizable")}},{key:"getColDefValue",value:function(e){var t;return null!=(t=this.colDef[e])?t:Li[e]}},{key:"isColumnFunc",value:function(e,t){return"boolean"===typeof t?t:"function"===typeof t&&t(this.createColumnFunctionCallbackParams(e))}},{key:"setMoving",value:function(e,t){this.moving=e,this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",t))}},{key:"createColumnEvent",value:function(e,t){return this.gridOptionsService.addGridCommonParams({type:e,column:this,columns:[this],source:t})}},{key:"isMoving",value:function(){return this.moving}},{key:"getSort",value:function(){return this.sort}},{key:"setSort",value:function(e,t){this.sort!==e&&(this.sort=e,this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")}},{key:"setMenuVisible",value:function(e,t){this.menuVisible!==e&&(this.menuVisible=e,this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))}},{key:"isMenuVisible",value:function(){return this.menuVisible}},{key:"isSortable",value:function(){return!!this.getColDefValue("sortable")}},{key:"isSortAscending",value:function(){return"asc"===this.sort}},{key:"isSortDescending",value:function(){return"desc"===this.sort}},{key:"isSortNone",value:function(){return _n(this.sort)}},{key:"isSorting",value:function(){return Fn(this.sort)}},{key:"getSortIndex",value:function(){return this.sortIndex}},{key:"setSortIndex",value:function(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")}},{key:"setAggFunc",value:function(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")}},{key:"getAggFunc",value:function(){return this.aggFunc}},{key:"getLeft",value:function(){return this.left}},{key:"getOldLeft",value:function(){return this.oldLeft}},{key:"getRight",value:function(){return this.left+this.actualWidth}},{key:"setLeft",value:function(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.eventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))}},{key:"isFilterActive",value:function(){return this.filterActive}},{key:"setFilterActive",value:function(e,t,n){this.filterActive!==e&&(this.filterActive=e,this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));var i=this.createColumnEvent("filterChanged",t);n&&Jn(i,n),this.eventService.dispatchEvent(i)}},{key:"isHovered",value:function(){return this.columnHoverService.isHovered(this)}},{key:"setPinned",value:function(e){this.pinned=!0===e||"left"===e?"left":"right"===e?"right":null,this.dispatchStateUpdatedEvent("pinned")}},{key:"setFirstRightPinned",value:function(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))}},{key:"setLastLeftPinned",value:function(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.eventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))}},{key:"isFirstRightPinned",value:function(){return this.firstRightPinned}},{key:"isLastLeftPinned",value:function(){return this.lastLeftPinned}},{key:"isPinned",value:function(){return"left"===this.pinned||"right"===this.pinned}},{key:"isPinnedLeft",value:function(){return"left"===this.pinned}},{key:"isPinnedRight",value:function(){return"right"===this.pinned}},{key:"getPinned",value:function(){return this.pinned}},{key:"setVisible",value:function(e,t){var n=!0===e;this.visible!==n&&(this.visible=n,this.eventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")}},{key:"isVisible",value:function(){return this.visible}},{key:"isSpanHeaderHeight",value:function(){var e=this.getColDef();return!e.suppressSpanHeaderHeight&&!e.autoHeaderHeight}},{key:"getColumnGroupPaddingInfo",value:function(){var e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};for(var t=e.getPaddingLevel()+1,n=!0;e;){if(!e.isPadding()){n=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:n}}},{key:"getColDef",value:function(){return this.colDef}},{key:"getColumnGroupShow",value:function(){return this.colDef.columnGroupShow}},{key:"getColId",value:function(){return this.colId}},{key:"getId",value:function(){return this.colId}},{key:"getUniqueId",value:function(){return this.colId}},{key:"getDefinition",value:function(){return this.colDef}},{key:"getActualWidth",value:function(){return this.actualWidth}},{key:"getAutoHeaderHeight",value:function(){return this.autoHeaderHeight}},{key:"setAutoHeaderHeight",value:function(e){var t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}},{key:"createBaseColDefParams",value:function(e){return this.gridOptionsService.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})}},{key:"getColSpan",value:function(e){if(_n(this.colDef.colSpan))return 1;var t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)}},{key:"getRowSpan",value:function(e){if(_n(this.colDef.rowSpan))return 1;var t=this.createBaseColDefParams(e),n=this.colDef.rowSpan(t);return Math.max(n,1)}},{key:"setActualWidth",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];null!=this.minWidth&&(e=Math.max(e,this.minWidth)),null!=this.maxWidth&&(e=Math.min(e,this.maxWidth)),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&"flex"!==t&&"gridInitializing"!==t&&(this.flex=null),n||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}},{key:"fireColumnWidthChangedEvent",value:function(e){this.eventService.dispatchEvent(this.createColumnEvent("widthChanged",e))}},{key:"isGreaterThanMax",value:function(e){return null!=this.maxWidth&&e>this.maxWidth}},{key:"getMinWidth",value:function(){return this.minWidth}},{key:"getMaxWidth",value:function(){return this.maxWidth}},{key:"getFlex",value:function(){return this.flex||0}},{key:"setFlex",value:function(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")}},{key:"setMinimum",value:function(e){Fn(this.minWidth)&&this.setActualWidth(this.minWidth,e)}},{key:"setRowGroupActive",value:function(e,t){this.rowGroupActive!==e&&(this.rowGroupActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")}},{key:"isRowGroupActive",value:function(){return this.rowGroupActive}},{key:"setPivotActive",value:function(e,t){this.pivotActive!==e&&(this.pivotActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")}},{key:"isPivotActive",value:function(){return this.pivotActive}},{key:"isAnyFunctionActive",value:function(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}},{key:"isAnyFunctionAllowed",value:function(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}},{key:"setValueActive",value:function(e,t){this.aggregationActive!==e&&(this.aggregationActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))}},{key:"isValueActive",value:function(){return this.aggregationActive}},{key:"isAllowPivot",value:function(){return!0===this.colDef.enablePivot}},{key:"isAllowValue",value:function(){return!0===this.colDef.enableValue}},{key:"isAllowRowGroup",value:function(){return!0===this.colDef.enableRowGroup}},{key:"getMenuTabs",value:function(e){oi("As of v31.1, 'getMenuTabs' is deprecated. Use 'getColDef().menuTabs ?? defaultValues' instead.");var t=this.getColDef().menuTabs;return null==t&&(t=e),t}},{key:"dispatchStateUpdatedEvent",value:function(t){this.eventService.dispatchEvent({type:e.EVENT_STATE_UPDATED,key:t})}}]),e}();_i.EVENT_MOVING_CHANGED="movingChanged",_i.EVENT_LEFT_CHANGED="leftChanged",_i.EVENT_WIDTH_CHANGED="widthChanged",_i.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged",_i.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged",_i.EVENT_VISIBLE_CHANGED="visibleChanged",_i.EVENT_FILTER_CHANGED="filterChanged",_i.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged",_i.EVENT_SORT_CHANGED="sortChanged",_i.EVENT_COL_DEF_CHANGED="colDefChanged",_i.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged",_i.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged",_i.EVENT_PIVOT_CHANGED="columnPivotChanged",_i.EVENT_VALUE_CHANGED="columnValueChanged",_i.EVENT_STATE_UPDATED="columnStateUpdated",Mn([Di("gridOptionsService")],_i.prototype,"gridOptionsService",2),Mn([Di("columnUtils")],_i.prototype,"columnUtils",2),Mn([Di("columnHoverService")],_i.prototype,"columnHoverService",2),Mn([Di("frameworkOverrides")],_i.prototype,"frameworkOverrides",2),Mn([Ei],_i.prototype,"initialise",1);var Gi=_i,Zi=function(){function e(t,n,i,r){(0,a.Z)(this,e),this.localEventService=new Mi,this.expandable=!1,this.instanceId=Fi(),this.expandableListenerRemoveCallback=null,this.colGroupDef=t,this.groupId=n,this.expanded=!!t&&!!t.openByDefault,this.padding=i,this.level=r}return(0,s.Z)(e,[{key:"destroy",value:function(){this.expandableListenerRemoveCallback&&this.reset(null,void 0)}},{key:"reset",value:function(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}},{key:"getInstanceId",value:function(){return this.instanceId}},{key:"setOriginalParent",value:function(e){this.originalParent=e}},{key:"getOriginalParent",value:function(){return this.originalParent}},{key:"getLevel",value:function(){return this.level}},{key:"isVisible",value:function(){return!!this.children&&this.children.some((function(e){return e.isVisible()}))}},{key:"isPadding",value:function(){return this.padding}},{key:"setExpanded",value:function(t){this.expanded=void 0!==t&&t;var n={type:e.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(n)}},{key:"isExpandable",value:function(){return this.expandable}},{key:"isExpanded",value:function(){return this.expanded}},{key:"getGroupId",value:function(){return this.groupId}},{key:"getId",value:function(){return this.getGroupId()}},{key:"setChildren",value:function(e){this.children=e}},{key:"getChildren",value:function(){return this.children}},{key:"getColGroupDef",value:function(){return this.colGroupDef}},{key:"getLeafColumns",value:function(){var e=[];return this.addLeafColumns(e),e}},{key:"addLeafColumns",value:function(t){this.children&&this.children.forEach((function(n){n instanceof Gi?t.push(n):n instanceof e&&n.addLeafColumns(t)}))}},{key:"getColumnGroupShow",value:function(){var e=this.colGroupDef;if(e)return e.columnGroupShow}},{key:"setupExpandable",value:function(){var e=this;this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();var t=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach((function(e){return e.addEventListener("visibleChanged",t)})),this.expandableListenerRemoveCallback=function(){e.getLeafColumns().forEach((function(e){return e.removeEventListener("visibleChanged",t)})),e.expandableListenerRemoveCallback=null}}},{key:"setExpandable",value:function(){if(!this.isPadding()){for(var t=!1,n=!1,i=!1,r=this.findChildrenRemovingPadding(),o=0,a=r.length;o<a;o++){var s=r[o];if(s.isVisible()){var l=s.getColumnGroupShow();"open"===l?(t=!0,i=!0):"closed"===l?(n=!0,i=!0):(t=!0,n=!0)}}var u=t&&n&&i;if(this.expandable!==u){this.expandable=u;var c={type:e.EVENT_EXPANDABLE_CHANGED};this.localEventService.dispatchEvent(c)}}}},{key:"findChildrenRemovingPadding",value:function(){var t=[];return function n(i){i.forEach((function(i){i instanceof e&&i.isPadding()?n(i.children):t.push(i)}))}(this.children),t}},{key:"onColumnVisibilityChanged",value:function(){this.setExpandable()}},{key:"addEventListener",value:function(e,t){this.localEventService.addEventListener(e,t)}},{key:"removeEventListener",value:function(e,t){this.localEventService.removeEventListener(e,t)}}]),e}();Zi.EVENT_EXPANDED_CHANGED="expandedChanged",Zi.EVENT_EXPANDABLE_CHANGED="expandableChanged",Mn([xi],Zi.prototype,"destroy",1);var Vi=Zi,Hi={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},Bi={};An(Bi,{addSafePassiveEventListener:function(){return yr},createEventPath:function(){return gr},getCtrlForEventTarget:function(){return fr},getEventPath:function(){return mr},isElementInEventPath:function(){return vr},isEventSupported:function(){return pr},isStopPropagationForAgGrid:function(){return hr},stopPropagationForAgGrid:function(){return dr}});var Wi={};function zi(e){return null!=e&&e.length>0}function Ui(e){if(e&&e.length)return e[e.length-1]}function ji(e,t,n){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every((function(e,i){return n?n(e,t[i]):t[i]===e}))}function Ki(e,t){return ji(e,t)}function Yi(e){return e.sort((function(e,t){return e-t}))}function Xi(e,t){if(e)for(var n=e.length-2;n>=0;n--){var i=e[n]===t,r=e[n+1]===t;i&&r&&e.splice(n+1,1)}}function qi(e,t){var n=e.indexOf(t);n>=0&&(e[n]=e[e.length-1],e.pop())}function Qi(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}function Ji(e,t){for(var n=0;n<t.length;n++)qi(e,t[n])}function $i(e,t){for(var n=0;n<t.length;n++)Qi(e,t[n])}function er(e,t,n){e.splice(n,0,t)}function tr(e,t,n){if(null!=e&&null!=t)for(var i=t.length-1;i>=0;i--){er(e,t[i],n)}}function nr(e,t,n){$i(e,t),t.slice().reverse().forEach((function(t){return er(e,t,n)}))}function ir(e,t){return e.indexOf(t)>-1}function rr(e){return[].concat.apply([],e)}function or(e,t){null!=t&&null!=e&&t.forEach((function(t){return e.push(t)}))}function ar(e){return e.map(Zn)}function sr(e,t){if(null!=e)for(var n=e.length-1;n>=0;n--)t(e[n],n)}An(Wi,{areEqual:function(){return ji},existsAndNotEmpty:function(){return zi},flatten:function(){return rr},forEachReverse:function(){return sr},includes:function(){return ir},insertArrayIntoArray:function(){return tr},insertIntoArray:function(){return er},last:function(){return Ui},moveInArray:function(){return nr},pushAll:function(){return or},removeAllFromArray:function(){return $i},removeAllFromUnorderedArray:function(){return Ji},removeFromArray:function(){return Qi},removeFromUnorderedArray:function(){return qi},removeRepeatsFromArray:function(){return Xi},shallowCompare:function(){return Ki},sortNumerically:function(){return Yi},toStrings:function(){return ar}});var lr="__ag_Grid_Stop_Propagation",ur=["touchstart","touchend","touchmove","touchcancel","scroll"],cr={};function dr(e){e[lr]=!0}function hr(e){return!0===e[lr]}var pr=function(){var e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return function(t){if("boolean"===typeof cr[t])return cr[t];var n=document.createElement(e[t]||"div");return cr[t="on"+t]=t in n}}();function fr(e,t,n){for(var i=t;i;){var r=e.getDomData(i,n);if(r)return r;i=i.parentElement}return null}function vr(e,t){return!(!t||!e)&&mr(t).indexOf(e)>=0}function gr(e){for(var t=[],n=e.target;n;)t.push(n),n=n.parentElement;return t}function mr(e){var t=e;return t.path?t.path:t.composedPath?t.composedPath():gr(t)}function yr(e,t,n,i){var r=ir(ur,n)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,n,i,r)}var Cr=function(){function e(){var t=this;(0,a.Z)(this,e),this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.lastChangeSetIdLookup={},this.propertyListenerId=0,this.isAlive=function(){return!t.destroyed}}return(0,s.Z)(e,[{key:"getFrameworkOverrides",value:function(){return this.frameworkOverrides}},{key:"getContext",value:function(){return this.context}},{key:"destroy",value:function(){this.destroyFunctions.forEach((function(e){return e()})),this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:e.EVENT_DESTROYED})}},{key:"addEventListener",value:function(e,t){this.localEventService||(this.localEventService=new Mi),this.localEventService.addEventListener(e,t)}},{key:"removeEventListener",value:function(e,t){this.localEventService&&this.localEventService.removeEventListener(e,t)}},{key:"dispatchEvent",value:function(e){this.localEventService&&this.localEventService.dispatchEvent(e)}},{key:"addManagedListener",value:function(e,t,n){var i=this;if(!this.destroyed){e instanceof HTMLElement?yr(this.getFrameworkOverrides(),e,t,n):e.addEventListener(t,n);var r=function r(){return e.removeEventListener(t,n),i.destroyFunctions=i.destroyFunctions.filter((function(e){return e!==r})),null};return this.destroyFunctions.push(r),r}}},{key:"setupGridOptionListener",value:function(e,t){var n=this;this.gridOptionsService.addEventListener(e,t);var i=function i(){return n.gridOptionsService.removeEventListener(e,t),n.destroyFunctions=n.destroyFunctions.filter((function(e){return e!==i})),null};return this.destroyFunctions.push(i),i}},{key:"addManagedPropertyListener",value:function(e,t){return this.destroyed?function(){return null}:this.setupGridOptionListener(e,t)}},{key:"addManagedPropertyListeners",value:function(e,t){var n=this;if(!this.destroyed){var i=e.join("-")+this.propertyListenerId++,r=function(e){if(e.changeSet){if(e.changeSet&&e.changeSet.id===n.lastChangeSetIdLookup[i])return;n.lastChangeSetIdLookup[i]=e.changeSet.id}var r={type:"gridPropertyChanged",changeSet:e.changeSet,source:e.source};t(r)};e.forEach((function(e){return n.setupGridOptionListener(e,r)}))}}},{key:"addDestroyFunc",value:function(e){this.isAlive()?this.destroyFunctions.push(e):e()}},{key:"createManagedBean",value:function(e,t){var n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}},{key:"createBean",value:function(e,t,n){return(t||this.getContext()).createBean(e,n)}},{key:"destroyBean",value:function(e,t){return(t||this.getContext()).destroyBean(e)}},{key:"destroyBeans",value:function(e,t){var n=this;return e&&e.forEach((function(e){return n.destroyBean(e,t)})),[]}}]),e}();Cr.EVENT_DESTROYED="destroyed",Mn([Di("frameworkOverrides")],Cr.prototype,"frameworkOverrides",2),Mn([Di("context")],Cr.prototype,"context",2),Mn([Di("eventService")],Cr.prototype,"eventService",2),Mn([Di("gridOptionsService")],Cr.prototype,"gridOptionsService",2),Mn([Di("localeService")],Cr.prototype,"localeService",2),Mn([Di("environment")],Cr.prototype,"environment",2),Mn([xi],Cr.prototype,"destroy",1);var kr=Cr,wr=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"setBeans",value:function(e){this.logger=e.create("ColumnFactory")}},{key:"createColumnTree",value:function(e,t,n,i){var r=new jn,o=this.extractExistingTreeData(n),a=o.existingCols,s=o.existingGroups,l=o.existingColKeys;r.addExistingKeys(l);var u=this.recursivelyCreateColumns(e,0,t,a,r,s,i),c=this.findMaxDept(u,0);this.logger.log("Number of levels for grouped columns is "+c);var d=this.balanceColumnTree(u,0,c,r);return this.columnUtils.depthFirstOriginalTreeSearch(null,d,(function(e,t){e instanceof Vi&&e.setupExpandable(),e.setOriginalParent(t)})),{columnTree:d,treeDept:c}}},{key:"extractExistingTreeData",value:function(e){var t=[],n=[],i=[];return e&&this.columnUtils.depthFirstOriginalTreeSearch(null,e,(function(e){if(e instanceof Vi){var r=e;n.push(r)}else{var o=e;i.push(o.getId()),t.push(o)}})),{existingCols:t,existingGroups:n,existingColKeys:i}}},{key:"createForAutoGroups",value:function(e,t){var n=this;return e.map((function(e){return n.createAutoGroupTreeItem(t,e)}))}},{key:"createAutoGroupTreeItem",value:function(e,t){for(var n=this.findDepth(e),i=t,r=n-1;r>=0;r--){var o=new Vi(null,"FAKE_PATH_".concat(t.getId(),"}_").concat(r),!0,r);this.createBean(o),o.setChildren([i]),i.setOriginalParent(o),i=o}return 0===n&&t.setOriginalParent(null),i}},{key:"findDepth",value:function(e){for(var t=0,n=e;n&&n[0]&&n[0]instanceof Vi;)t++,n=n[0].getChildren();return t}},{key:"balanceColumnTree",value:function(e,t,n,i){for(var r=[],o=0;o<e.length;o++){var a=e[o];if(a instanceof Vi){var s=a,l=this.balanceColumnTree(s.getChildren(),t+1,n,i);s.setChildren(l),r.push(s)}else{for(var u=void 0,c=void 0,d=n-1;d>=t;d--){var h=i.getUniqueKey(null,null),p=this.createMergedColGroupDef(null),f=new Vi(p,h,!0,t);this.createBean(f),c&&c.setChildren([f]),c=f,u||(u=c)}if(u&&c){if(r.push(u),e.some((function(e){return e instanceof Vi}))){c.setChildren([a]);continue}c.setChildren(e);break}r.push(a)}}return r}},{key:"findMaxDept",value:function(e,t){for(var n=t,i=0;i<e.length;i++){var r=e[i];if(r instanceof Vi){var o=r,a=this.findMaxDept(o.getChildren(),t+1);n<a&&(n=a)}}return n}},{key:"recursivelyCreateColumns",value:function(e,t,n,i,r,o,a){if(!e)return[];for(var s=new Array(e.length),l=0;l<s.length;l++){var u=e[l];this.isColumnGroup(u)?s[l]=this.createColumnGroup(n,u,t,i,r,o,a):s[l]=this.createColumn(n,u,i,r,a)}return s}},{key:"createColumnGroup",value:function(e,t,n,i,r,o,a){var s=this.createMergedColGroupDef(t),l=r.getUniqueKey(s.groupId||null,null),u=new Vi(s,l,!1,n);this.createBean(u);var c=this.findExistingGroup(t,o);c&&o.splice(c.idx,1);var d=null==c?void 0:c.group;d&&u.setExpanded(d.isExpanded());var h=this.recursivelyCreateColumns(s.children,n+1,e,i,r,o,a);return u.setChildren(h),u}},{key:"createMergedColGroupDef",value:function(e){var t={};return Object.assign(t,this.gridOptionsService.get("defaultColGroupDef")),Object.assign(t,e),t}},{key:"createColumn",value:function(e,t,n,i,r){var o=this.findExistingColumn(t,n);o&&(null==n||n.splice(o.idx,1));var a=null==o?void 0:o.column;if(a){var s=this.addColumnDefaultAndTypes(t,a.getColId());a.setColDef(s,t,r),this.applyColumnState(a,s,r)}else{var l=i.getUniqueKey(t.colId,t.field),u=this.addColumnDefaultAndTypes(t,l);a=new Gi(u,t,l,e),this.context.createBean(a)}return this.dataTypeService.addColumnListeners(a),a}},{key:"applyColumnState",value:function(e,t,n){var i=Vn(t.flex);if(void 0!==i&&e.setFlex(i),e.getFlex()<=0){var r=Vn(t.width);if(null!=r)e.setActualWidth(r,n);else{var o=e.getActualWidth();e.setActualWidth(o,n)}}void 0!==t.sort&&("asc"==t.sort||"desc"==t.sort?e.setSort(t.sort,n):e.setSort(void 0,n));var a=Vn(t.sortIndex);void 0!==a&&e.setSortIndex(a);var s=Hn(t.hide);void 0!==s&&e.setVisible(!s,n),void 0!==t.pinned&&e.setPinned(t.pinned)}},{key:"findExistingColumn",value:function(e,t){if(t)for(var n=0;n<t.length;n++){var i=t[n].getUserProvidedColDef();if(i)if(null!=e.colId){if(t[n].getId()===e.colId)return{idx:n,column:t[n]}}else if(null!=e.field){if(i.field===e.field)return{idx:n,column:t[n]}}else if(i===e)return{idx:n,column:t[n]}}}},{key:"findExistingGroup",value:function(e,t){if(null!=e.groupId)for(var n=0;n<t.length;n++){var i=t[n];if(i.getColGroupDef()&&i.getId()===e.groupId)return{idx:n,group:i}}}},{key:"addColumnDefaultAndTypes",value:function(e,t){var n={};Jn(n,this.gridOptionsService.get("defaultColDef"),!1,!0);var i=this.dataTypeService.updateColDefAndGetColumnType(n,e,t);i&&this.assignColumnTypes(i,n),Jn(n,e,!1,!0);var r=this.gridOptionsService.get("autoGroupColumnDef"),o=this.gridOptionsService.isColumnsSortingCoupledToGroup();return e.rowGroup&&r&&o&&Jn(n,{sort:r.sort,initialSort:r.initialSort},!1,!0),this.dataTypeService.validateColDef(n),n}},{key:"assignColumnTypes",value:function(e,t){if(e.length){var n=Object.assign({},Hi);Yn(this.gridOptionsService.get("columnTypes")||{},(function(e,t){e in n?console.warn("AG Grid: the column type '".concat(e,"' is a default column type and cannot be overridden.")):(t.type&&oi("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."),n[e]=t)})),e.forEach((function(e){var i=n[e.trim()];i?Jn(t,i,!1,!0):console.warn("AG Grid: colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes")}))}}},{key:"isColumnGroup",value:function(e){return void 0!==e.children}}]),n}(kr);Mn([Di("columnUtils")],wr.prototype,"columnUtils",2),Mn([Di("dataTypeService")],wr.prototype,"dataTypeService",2),Mn([Nn(0,Pi("loggerFactory"))],wr.prototype,"setBeans",1),wr=Mn([Ri("columnFactory")],wr);var Sr=function(){function e(t,n,i,r){(0,a.Z)(this,e),this.displayedChildren=[],this.localEventService=new Mi,this.groupId=n,this.partId=i,this.providedColumnGroup=t,this.pinned=r}return(0,s.Z)(e,[{key:"reset",value:function(){this.parent=null,this.children=null,this.displayedChildren=null}},{key:"getParent",value:function(){return this.parent}},{key:"setParent",value:function(e){this.parent=e}},{key:"getUniqueId",value:function(){return e.createUniqueId(this.groupId,this.partId)}},{key:"isEmptyGroup",value:function(){return 0===this.displayedChildren.length}},{key:"isMoving",value:function(){var e=this.getProvidedColumnGroup().getLeafColumns();return!(!e||0===e.length)&&e.every((function(e){return e.isMoving()}))}},{key:"checkLeft",value:function(){if(this.displayedChildren.forEach((function(t){t instanceof e&&t.checkLeft()})),this.displayedChildren.length>0)if(this.gridOptionsService.get("enableRtl")){var t=Ui(this.displayedChildren).getLeft();this.setLeft(t)}else{var n=this.displayedChildren[0].getLeft();this.setLeft(n)}else this.setLeft(null)}},{key:"getLeft",value:function(){return this.left}},{key:"getOldLeft",value:function(){return this.oldLeft}},{key:"setLeft",value:function(t){this.oldLeft=this.left,this.left!==t&&(this.left=t,this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_LEFT_CHANGED)))}},{key:"getPinned",value:function(){return this.pinned}},{key:"createAgEvent",value:function(e){return{type:e}}},{key:"addEventListener",value:function(e,t){this.localEventService.addEventListener(e,t)}},{key:"removeEventListener",value:function(e,t){this.localEventService.removeEventListener(e,t)}},{key:"getGroupId",value:function(){return this.groupId}},{key:"getPartId",value:function(){return this.partId}},{key:"isChildInThisGroupDeepSearch",value:function(t){var n=!1;return this.children.forEach((function(i){t===i&&(n=!0),i instanceof e&&i.isChildInThisGroupDeepSearch(t)&&(n=!0)})),n}},{key:"getActualWidth",value:function(){var e=0;return this.displayedChildren&&this.displayedChildren.forEach((function(t){e+=t.getActualWidth()})),e}},{key:"isResizable",value:function(){if(!this.displayedChildren)return!1;var e=!1;return this.displayedChildren.forEach((function(t){t.isResizable()&&(e=!0)})),e}},{key:"getMinWidth",value:function(){var e=0;return this.displayedChildren.forEach((function(t){e+=t.getMinWidth()||0})),e}},{key:"addChild",value:function(e){this.children||(this.children=[]),this.children.push(e)}},{key:"getDisplayedChildren",value:function(){return this.displayedChildren}},{key:"getLeafColumns",value:function(){var e=[];return this.addLeafColumns(e),e}},{key:"getDisplayedLeafColumns",value:function(){var e=[];return this.addDisplayedLeafColumns(e),e}},{key:"getDefinition",value:function(){return this.providedColumnGroup.getColGroupDef()}},{key:"getColGroupDef",value:function(){return this.providedColumnGroup.getColGroupDef()}},{key:"isPadding",value:function(){return this.providedColumnGroup.isPadding()}},{key:"isExpandable",value:function(){return this.providedColumnGroup.isExpandable()}},{key:"isExpanded",value:function(){return this.providedColumnGroup.isExpanded()}},{key:"setExpanded",value:function(e){this.providedColumnGroup.setExpanded(e)}},{key:"addDisplayedLeafColumns",value:function(t){this.displayedChildren.forEach((function(n){n instanceof Gi?t.push(n):n instanceof e&&n.addDisplayedLeafColumns(t)}))}},{key:"addLeafColumns",value:function(t){this.children.forEach((function(n){n instanceof Gi?t.push(n):n instanceof e&&n.addLeafColumns(t)}))}},{key:"getChildren",value:function(){return this.children}},{key:"getColumnGroupShow",value:function(){return this.providedColumnGroup.getColumnGroupShow()}},{key:"getProvidedColumnGroup",value:function(){return this.providedColumnGroup}},{key:"getPaddingLevel",value:function(){var e=this.getParent();return this.isPadding()&&e&&e.isPadding()?1+e.getPaddingLevel():0}},{key:"calculateDisplayedColumns",value:function(){var t=this;this.displayedChildren=[];for(var n=this;null!=n&&n.isPadding();)n=n.getParent();if(!(!!n&&n.providedColumnGroup.isExpandable()))return this.displayedChildren=this.children,void this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_DISPLAYED_CHILDREN_CHANGED));this.children.forEach((function(i){if(!(i instanceof e&&(!i.displayedChildren||!i.displayedChildren.length)))switch(i.getColumnGroupShow()){case"open":n.providedColumnGroup.isExpanded()&&t.displayedChildren.push(i);break;case"closed":n.providedColumnGroup.isExpanded()||t.displayedChildren.push(i);break;default:t.displayedChildren.push(i)}})),this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_DISPLAYED_CHILDREN_CHANGED))}}],[{key:"createUniqueId",value:function(e,t){return e+"_"+t}}]),e}();Sr.EVENT_LEFT_CHANGED="leftChanged",Sr.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged",Mn([Di("gridOptionsService")],Sr.prototype,"gridOptionsService",2);var br=Sr,Er=(0,s.Z)((function e(){(0,a.Z)(this,e)}));Er.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged",Er.EVENT_NEW_COLUMNS_LOADED="newColumnsLoaded",Er.EVENT_COLUMN_PIVOT_MODE_CHANGED="columnPivotModeChanged",Er.EVENT_PIVOT_MAX_COLUMNS_EXCEEDED="pivotMaxColumnsExceeded",Er.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",Er.EVENT_EXPAND_COLLAPSE_ALL="expandOrCollapseAll",Er.EVENT_COLUMN_PIVOT_CHANGED="columnPivotChanged",Er.EVENT_GRID_COLUMNS_CHANGED="gridColumnsChanged",Er.EVENT_COLUMN_VALUE_CHANGED="columnValueChanged",Er.EVENT_COLUMN_MOVED="columnMoved",Er.EVENT_COLUMN_VISIBLE="columnVisible",Er.EVENT_COLUMN_PINNED="columnPinned",Er.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened",Er.EVENT_COLUMN_RESIZED="columnResized",Er.EVENT_DISPLAYED_COLUMNS_CHANGED="displayedColumnsChanged",Er.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED="suppressMovableColumns",Er.EVENT_SUPPRESS_MENU_HIDE_CHANGED="suppressMenuHide",Er.EVENT_SUPPRESS_FIELD_DOT_NOTATION="suppressFieldDotNotation",Er.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged",Er.EVENT_COLUMN_HEADER_MOUSE_OVER="columnHeaderMouseOver",Er.EVENT_COLUMN_HEADER_MOUSE_LEAVE="columnHeaderMouseLeave",Er.EVENT_COLUMN_HEADER_CLICKED="columnHeaderClicked",Er.EVENT_COLUMN_HEADER_CONTEXT_MENU="columnHeaderContextMenu",Er.EVENT_ASYNC_TRANSACTIONS_FLUSHED="asyncTransactionsFlushed",Er.EVENT_ROW_GROUP_OPENED="rowGroupOpened",Er.EVENT_ROW_DATA_UPDATED="rowDataUpdated",Er.EVENT_PINNED_ROW_DATA_CHANGED="pinnedRowDataChanged",Er.EVENT_RANGE_SELECTION_CHANGED="rangeSelectionChanged",Er.EVENT_CHART_CREATED="chartCreated",Er.EVENT_CHART_RANGE_SELECTION_CHANGED="chartRangeSelectionChanged",Er.EVENT_CHART_OPTIONS_CHANGED="chartOptionsChanged",Er.EVENT_CHART_DESTROYED="chartDestroyed",Er.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged",Er.EVENT_TOOL_PANEL_SIZE_CHANGED="toolPanelSizeChanged",Er.EVENT_COLUMN_PANEL_ITEM_DRAG_START="columnPanelItemDragStart",Er.EVENT_COLUMN_PANEL_ITEM_DRAG_END="columnPanelItemDragEnd",Er.EVENT_MODEL_UPDATED="modelUpdated",Er.EVENT_CUT_START="cutStart",Er.EVENT_CUT_END="cutEnd",Er.EVENT_PASTE_START="pasteStart",Er.EVENT_PASTE_END="pasteEnd",Er.EVENT_FILL_START="fillStart",Er.EVENT_FILL_END="fillEnd",Er.EVENT_RANGE_DELETE_START="rangeDeleteStart",Er.EVENT_RANGE_DELETE_END="rangeDeleteEnd",Er.EVENT_UNDO_STARTED="undoStarted",Er.EVENT_UNDO_ENDED="undoEnded",Er.EVENT_REDO_STARTED="redoStarted",Er.EVENT_REDO_ENDED="redoEnded",Er.EVENT_KEY_SHORTCUT_CHANGED_CELL_START="keyShortcutChangedCellStart",Er.EVENT_KEY_SHORTCUT_CHANGED_CELL_END="keyShortcutChangedCellEnd",Er.EVENT_CELL_CLICKED="cellClicked",Er.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked",Er.EVENT_CELL_MOUSE_DOWN="cellMouseDown",Er.EVENT_CELL_CONTEXT_MENU="cellContextMenu",Er.EVENT_CELL_VALUE_CHANGED="cellValueChanged",Er.EVENT_CELL_EDIT_REQUEST="cellEditRequest",Er.EVENT_ROW_VALUE_CHANGED="rowValueChanged",Er.EVENT_CELL_FOCUSED="cellFocused",Er.EVENT_CELL_FOCUS_CLEARED="cellFocusCleared",Er.EVENT_FULL_WIDTH_ROW_FOCUSED="fullWidthRowFocused",Er.EVENT_ROW_SELECTED="rowSelected",Er.EVENT_SELECTION_CHANGED="selectionChanged",Er.EVENT_TOOLTIP_SHOW="tooltipShow",Er.EVENT_TOOLTIP_HIDE="tooltipHide",Er.EVENT_CELL_KEY_DOWN="cellKeyDown",Er.EVENT_CELL_MOUSE_OVER="cellMouseOver",Er.EVENT_CELL_MOUSE_OUT="cellMouseOut",Er.EVENT_FILTER_CHANGED="filterChanged",Er.EVENT_FILTER_MODIFIED="filterModified",Er.EVENT_FILTER_OPENED="filterOpened",Er.EVENT_ADVANCED_FILTER_BUILDER_VISIBLE_CHANGED="advancedFilterBuilderVisibleChanged",Er.EVENT_SORT_CHANGED="sortChanged",Er.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved",Er.EVENT_ROW_CLICKED="rowClicked",Er.EVENT_ROW_DOUBLE_CLICKED="rowDoubleClicked",Er.EVENT_GRID_READY="gridReady",Er.EVENT_GRID_PRE_DESTROYED="gridPreDestroyed",Er.EVENT_GRID_SIZE_CHANGED="gridSizeChanged",Er.EVENT_VIEWPORT_CHANGED="viewportChanged",Er.EVENT_SCROLLBAR_WIDTH_CHANGED="scrollbarWidthChanged",Er.EVENT_FIRST_DATA_RENDERED="firstDataRendered",Er.EVENT_DRAG_STARTED="dragStarted",Er.EVENT_DRAG_STOPPED="dragStopped",Er.EVENT_CHECKBOX_CHANGED="checkboxChanged",Er.EVENT_ROW_EDITING_STARTED="rowEditingStarted",Er.EVENT_ROW_EDITING_STOPPED="rowEditingStopped",Er.EVENT_CELL_EDITING_STARTED="cellEditingStarted",Er.EVENT_CELL_EDITING_STOPPED="cellEditingStopped",Er.EVENT_BODY_SCROLL="bodyScroll",Er.EVENT_BODY_SCROLL_END="bodyScrollEnd",Er.EVENT_HEIGHT_SCALE_CHANGED="heightScaleChanged",Er.EVENT_PAGINATION_CHANGED="paginationChanged",Er.EVENT_COMPONENT_STATE_CHANGED="componentStateChanged",Er.EVENT_STORE_REFRESHED="storeRefreshed",Er.EVENT_STATE_UPDATED="stateUpdated",Er.EVENT_COLUMN_MENU_VISIBLE_CHANGED="columnMenuVisibleChanged",Er.EVENT_BODY_HEIGHT_CHANGED="bodyHeightChanged",Er.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED="columnContainerWidthChanged",Er.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED="displayedColumnsWidthChanged",Er.EVENT_SCROLL_VISIBILITY_CHANGED="scrollVisibilityChanged",Er.EVENT_COLUMN_HOVER_CHANGED="columnHoverChanged",Er.EVENT_FLASH_CELLS="flashCells",Er.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED="paginationPixelOffsetChanged",Er.EVENT_DISPLAYED_ROWS_CHANGED="displayedRowsChanged",Er.EVENT_LEFT_PINNED_WIDTH_CHANGED="leftPinnedWidthChanged",Er.EVENT_RIGHT_PINNED_WIDTH_CHANGED="rightPinnedWidthChanged",Er.EVENT_ROW_CONTAINER_HEIGHT_CHANGED="rowContainerHeightChanged",Er.EVENT_HEADER_HEIGHT_CHANGED="headerHeightChanged",Er.EVENT_COLUMN_HEADER_HEIGHT_CHANGED="columnHeaderHeightChanged",Er.EVENT_ROW_DRAG_ENTER="rowDragEnter",Er.EVENT_ROW_DRAG_MOVE="rowDragMove",Er.EVENT_ROW_DRAG_LEAVE="rowDragLeave",Er.EVENT_ROW_DRAG_END="rowDragEnd",Er.EVENT_GRID_STYLES_CHANGED="gridStylesChanged",Er.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST="columnRowGroupChangeRequest",Er.EVENT_COLUMN_PIVOT_CHANGE_REQUEST="columnPivotChangeRequest",Er.EVENT_COLUMN_VALUE_CHANGE_REQUEST="columnValueChangeRequest",Er.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST="columnAggFuncChangeRequest",Er.EVENT_STORE_UPDATED="storeUpdated",Er.EVENT_FILTER_DESTROYED="filterDestroyed",Er.EVENT_ROW_DATA_UPDATE_STARTED="rowDataUpdateStarted",Er.EVENT_ROW_COUNT_READY="rowCountReady",Er.EVENT_ADVANCED_FILTER_ENABLED_CHANGED="advancedFilterEnabledChanged",Er.EVENT_DATA_TYPES_INFERRED="dataTypesInferred",Er.EVENT_FIELD_VALUE_CHANGED="fieldValueChanged",Er.EVENT_FIELD_PICKER_VALUE_SELECTED="fieldPickerValueSelected",Er.EVENT_SIDE_BAR_UPDATED="sideBarUpdated";var xr=new Set([Er.EVENT_GRID_PRE_DESTROYED]),Rr=function(){function e(){(0,a.Z)(this,e),this.existingIds={}}return(0,s.Z)(e,[{key:"getInstanceIdForKey",value:function(e){var t,n=this.existingIds[e];return t="number"!==typeof n?0:n+1,this.existingIds[e]=t,t}}]),e}(),Dr="ag-Grid-AutoColumn",Tr=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"createAutoGroupColumns",value:function(e){var t=this,n=[],i=this.gridOptionsService.get("treeData"),r=this.gridOptionsService.isGroupMultiAutoColumn();return i&&r&&(console.warn('AG Grid: you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),r=!1),r?e.forEach((function(e,i){n.push(t.createOneAutoGroupColumn(e,i))})):n.push(this.createOneAutoGroupColumn()),n}},{key:"updateAutoGroupColumns",value:function(e,t){var n=this;e.forEach((function(e,i){return n.updateOneAutoGroupColumn(e,i,t)}))}},{key:"createOneAutoGroupColumn",value:function(e,t){var n;n=e?"".concat(Dr,"-").concat(e.getId()):Dr;var i=this.createAutoGroupColDef(n,e,t);i.colId=n;var r=new Gi(i,null,n,!0);return this.context.createBean(r),r}},{key:"updateOneAutoGroupColumn",value:function(e,t,n){var i=e.getColDef(),r="string"==typeof i.showRowGroup?i.showRowGroup:void 0,o=null!=r?this.columnModel.getPrimaryColumn(r):void 0,a=this.createAutoGroupColDef(e.getId(),null!=o?o:void 0,t);e.setColDef(a,null,n),this.columnFactory.applyColumnState(e,a,n)}},{key:"createAutoGroupColDef",value:function(e,t,n){var i=this.createBaseColDef(t);(Jn(i,this.gridOptionsService.get("autoGroupColumnDef")),i=this.columnFactory.addColumnDefaultAndTypes(i,e),this.gridOptionsService.get("treeData"))||_n(i.field)&&_n(i.valueGetter)&&_n(i.filterValueGetter)&&"agGroupColumnFilter"!==i.filter&&(i.filter=!1);n&&n>0&&(i.headerCheckboxSelection=!1);var r=this.gridOptionsService.isColumnsSortingCoupledToGroup(),o=i.valueGetter||null!=i.field;return r&&!o&&(i.sortIndex=void 0,i.initialSort=void 0),i}},{key:"createBaseColDef",value:function(e){var t=this.gridOptionsService.get("autoGroupColumnDef"),n={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(t&&(t.cellRenderer||t.cellRendererSelector)||(n.cellRenderer="agGroupCellRenderer"),e){var i=e.getColDef();Object.assign(n,{headerName:this.columnModel.getDisplayNameForColumn(e,"header"),headerValueGetter:i.headerValueGetter}),i.cellRenderer&&Object.assign(n,{cellRendererParams:{innerRenderer:i.cellRenderer,innerRendererParams:i.cellRendererParams}}),n.showRowGroup=e.getColId()}else n.showRowGroup=!0;return n}}]),n}(kr);Mn([Di("columnModel")],Tr.prototype,"columnModel",2),Mn([Di("columnFactory")],Tr.prototype,"columnFactory",2),Tr=Mn([Ri("autoGroupColService")],Tr);var Or={};An(Or,{camelCaseToHumanText:function(){return Ir},camelCaseToHyphenated:function(){return Fr},capitalise:function(){return Nr},escapeString:function(){return Lr},utf8_encode:function(){return Mr}});var Pr=/[&<>"']/g,Ar={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Mr(e){var t=String.fromCharCode;function n(e,n){return t(e>>n&63|128)}function i(e){if(e>=0&&e<=31&&10!==e){var i=e.toString(16).toUpperCase().padStart(4,"0");return"_x".concat(i,"_")}if(0==(4294967168&e))return t(e);var r="";return 0==(4294965248&e)?r=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),r=t(e>>12&15|224),r+=n(e,6)):0==(4292870144&e)&&(r=t(e>>18&7|240),r+=n(e,12),r+=n(e,6)),r+=t(63&e|128)}for(var r=function(e){var t=[];if(!e)return[];for(var n,i,r=e.length,o=0;o<r;)(n=e.charCodeAt(o++))>=55296&&n<=56319&&o<r?56320==(64512&(i=e.charCodeAt(o++)))?t.push(((1023&n)<<10)+(1023&i)+65536):(t.push(n),o--):t.push(n);return t}(e),o=r.length,a=-1,s="";++a<o;)s+=i(r[a]);return s}function Nr(e){return e[0].toUpperCase()+e.substring(1).toLowerCase()}function Lr(e,t){if(null==e)return null;var n=e.toString().toString();return t?n:n.replace(Pr,(function(e){return Ar[e]}))}function Ir(e){if(!e||null==e)return null;return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z])([a-z])/g,"$1 $2$3").replace(/\./g," ").split(" ").map((function(e){return e.substring(0,1).toUpperCase()+(e.length>1?e.substring(1,e.length):"")})).join(" ")}function Fr(e){return e.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLocaleLowerCase())}))}var _r={};function Gr(e){var t=new Map;return e.forEach((function(e){return t.set(e[0],e[1])})),t}function Zr(e,t){var n=new Map;return e.forEach((function(e){return n.set(t(e),e)})),n}function Vr(e){var t=[];return e.forEach((function(e,n){return t.push(n)})),t}An(_r,{convertToMap:function(){return Gr},keys:function(){return Vr},mapById:function(){return Zr}});var Hr=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).primaryHeaderRowCount=0,e.secondaryHeaderRowCount=0,e.gridHeaderRowCount=0,e.displayedColumnsLeft=[],e.displayedColumnsRight=[],e.displayedColumnsCenter=[],e.displayedColumns=[],e.displayedColumnsAndGroupsMap={},e.viewportColumns=[],e.viewportColumnsHash="",e.headerViewportColumns=[],e.viewportColumnsCenter=[],e.headerViewportColumnsCenter=[],e.viewportRowLeft={},e.viewportRowRight={},e.viewportRowCenter={},e.autoHeightActiveAtLeastOnce=!1,e.rowGroupColumns=[],e.valueColumns=[],e.pivotColumns=[],e.ready=!1,e.changeEventsDispatching=!1,e.autoGroupsNeedBuilding=!1,e.forceRecreateAutoGroups=!1,e.pivotMode=!1,e.bodyWidth=0,e.leftWidth=0,e.rightWidth=0,e.bodyWidthDirty=!0,e.shouldQueueResizeOperations=!1,e.resizeOperationQueue=[],e}return(0,s.Z)(n,[{key:"init",value:function(){var e=this;this.suppressColumnVirtualisation=this.gridOptionsService.get("suppressColumnVirtualisation");var t=this.gridOptionsService.get("pivotMode");this.isPivotSettingAllowed(t)&&(this.pivotMode=t),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],(function(t){return e.buildAutoGroupColumns(Br(t.source))})),this.addManagedPropertyListener("autoGroupColumnDef",(function(t){return e.onAutoGroupColumnDefChanged(Br(t.source))})),this.addManagedPropertyListeners(["defaultColDef","columnTypes","suppressFieldDotNotation"],(function(t){return e.onSharedColDefChanged(Br(t.source))})),this.addManagedPropertyListener("pivotMode",(function(t){return e.setPivotMode(e.gridOptionsService.get("pivotMode"),Br(t.source))})),this.addManagedListener(this.eventService,Er.EVENT_FIRST_DATA_RENDERED,(function(){return e.onFirstDataRendered()}))}},{key:"buildAutoGroupColumns",value:function(e){this.columnDefs&&(this.autoGroupsNeedBuilding=!0,this.forceRecreateAutoGroups=!0,this.updateGridColumns(),this.updateDisplayedColumns(e))}},{key:"onAutoGroupColumnDefChanged",value:function(e){this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns,e)}},{key:"onSharedColDefChanged",value:function(e){this.gridColumns&&(this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns,e),this.createColumnsFromColumnDefs(!0,e))}},{key:"setColumnDefs",value:function(e,t){var n=!!this.columnDefs;this.columnDefs=e,this.createColumnsFromColumnDefs(n,t)}},{key:"recreateColumnDefs",value:function(e){this.onSharedColDefChanged(e)}},{key:"destroyOldColumns",value:function(e,t){var n={};if(e){this.columnUtils.depthFirstOriginalTreeSearch(null,e,(function(e){n[e.getInstanceId()]=e})),t&&this.columnUtils.depthFirstOriginalTreeSearch(null,t,(function(e){n[e.getInstanceId()]=null}));var i=Object.values(n).filter((function(e){return null!=e}));this.destroyBeans(i)}}},{key:"destroyColumns",value:function(){this.destroyOldColumns(this.primaryColumnTree),this.destroyOldColumns(this.secondaryBalancedTree),this.destroyOldColumns(this.groupAutoColsBalancedTree)}},{key:"createColumnsFromColumnDefs",value:function(e,t){var n=this,i=e?this.compareColumnStatesAndDispatchEvents(t):void 0;this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;var r=this.primaryColumns,o=this.primaryColumnTree,a=this.columnFactory.createColumnTree(this.columnDefs,!0,o,t);this.destroyOldColumns(this.primaryColumnTree,a.columnTree),this.primaryColumnTree=a.columnTree,this.primaryHeaderRowCount=a.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree),this.primaryColumnsMap={},this.primaryColumns.forEach((function(e){return n.primaryColumnsMap[e.getId()]=e})),this.extractRowGroupColumns(t,r),this.extractPivotColumns(t,r),this.extractValueColumns(t,r),this.ready=!0;var s=void 0===this.gridColsArePrimary;(this.gridColsArePrimary||s||this.autoGroupsNeedBuilding)&&(this.updateGridColumns(),e&&this.gridColsArePrimary&&!this.gridOptionsService.get("maintainColumnOrder")&&this.orderGridColumnsLikePrimary(),this.updateDisplayedColumns(t),this.checkViewportColumns()),this.dispatchEverythingChanged(t),this.changeEventsDispatching=!0,i&&i(),this.changeEventsDispatching=!1,this.dispatchNewColumnsLoaded(t)}},{key:"shouldRowModelIgnoreRefresh",value:function(){return this.changeEventsDispatching}},{key:"dispatchNewColumnsLoaded",value:function(e){var t={type:Er.EVENT_NEW_COLUMNS_LOADED,source:e};this.eventService.dispatchEvent(t),"gridInitializing"===e&&this.onColumnsReady()}},{key:"dispatchEverythingChanged",value:function(e){var t={type:Er.EVENT_COLUMN_EVERYTHING_CHANGED,source:e};this.eventService.dispatchEvent(t)}},{key:"orderGridColumnsLikePrimary",value:function(){var e=this,t=this.primaryColumns;if(t){var n=t.filter((function(t){return e.gridColumns.indexOf(t)>=0})),i=this.gridColumns.filter((function(e){return n.indexOf(e)<0}));this.gridColumns=[].concat((0,o.Z)(i),(0,o.Z)(n)),this.gridColumns=this.placeLockedColumns(this.gridColumns)}}},{key:"getAllDisplayedAutoHeightCols",value:function(){return this.displayedAutoHeightCols}},{key:"setViewport",value:function(){this.gridOptionsService.get("enableRtl")?(this.viewportLeft=this.bodyWidth-this.scrollPosition-this.scrollWidth,this.viewportRight=this.bodyWidth-this.scrollPosition):(this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition)}},{key:"getDisplayedColumnsStartingAt",value:function(e){for(var t=e,n=[];null!=t;)n.push(t),t=this.getDisplayedColAfter(t);return n}},{key:"checkViewportColumns",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!=this.displayedColumnsCenter){var t=this.extractViewport();if(t){var n={type:Er.EVENT_VIRTUAL_COLUMNS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(n)}}}},{key:"setViewportPosition",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(e!==this.scrollWidth||t!==this.scrollPosition||this.bodyWidthDirty)&&(this.scrollWidth=e,this.scrollPosition=t,this.bodyWidthDirty=!0,this.setViewport(),this.ready&&this.checkViewportColumns(n))}},{key:"isPivotMode",value:function(){return this.pivotMode}},{key:"isPivotSettingAllowed",value:function(e){return!e||!this.gridOptionsService.get("treeData")||(console.warn("AG Grid: Pivot mode not available in conjunction Tree Data i.e. 'gridOptions.treeData: true'"),!1)}},{key:"setPivotMode",value:function(e,t){if(e!==this.pivotMode&&this.isPivotSettingAllowed(this.pivotMode)&&(this.pivotMode=e,this.gridColumns)){this.autoGroupsNeedBuilding=!0,this.updateGridColumns(),this.updateDisplayedColumns(t);var n={type:Er.EVENT_COLUMN_PIVOT_MODE_CHANGED};this.eventService.dispatchEvent(n)}}},{key:"getSecondaryPivotColumn",value:function(e,t){if(_n(this.secondaryColumns))return null;var n=this.getPrimaryColumn(t),i=null;return this.secondaryColumns.forEach((function(t){var r=t.getColDef().pivotKeys,o=t.getColDef().pivotValueColumn;ji(r,e)&&o===n&&(i=t)})),i}},{key:"setBeans",value:function(e){this.logger=e.create("columnModel")}},{key:"setFirstRightAndLastLeftPinned",value:function(e){var t,n;this.gridOptionsService.get("enableRtl")?(t=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null,n=this.displayedColumnsRight?Ui(this.displayedColumnsRight):null):(t=this.displayedColumnsLeft?Ui(this.displayedColumnsLeft):null,n=this.displayedColumnsRight?this.displayedColumnsRight[0]:null),this.gridColumns.forEach((function(i){i.setLastLeftPinned(i===t,e),i.setFirstRightPinned(i===n,e)}))}},{key:"autoSizeColumns",value:function(e){var t=this;if(this.shouldQueueResizeOperations)this.resizeOperationQueue.push((function(){return t.autoSizeColumns(e)}));else{var n=e.columns,i=e.skipHeader,r=e.skipHeaderGroups,o=e.stopAtGroup,a=e.source,s=void 0===a?"api":a;this.animationFrameService.flushAllFrames();for(var l=[],u=-1,c=null!=i?i:this.gridOptionsService.get("skipHeaderOnAutoSize"),d=null!=r?r:c;0!==u;)u=0,this.actionOnGridColumns(n,(function(e){if(l.indexOf(e)>=0)return!1;var n=t.autoWidthCalculator.getPreferredWidthForColumn(e,c);if(n>0){var i=t.normaliseColumnWidth(e,n);e.setActualWidth(i,s),l.push(e),u++}return!0}),s);d||this.autoSizeColumnGroupsByColumns(n,s,o),this.dispatchColumnResizedEvent(l,!0,"autosizeColumns")}}},{key:"dispatchColumnResizedEvent",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(e&&e.length){var r={type:Er.EVENT_COLUMN_RESIZED,columns:e,column:1===e.length?e[0]:null,flexColumns:i,finished:t,source:n};this.eventService.dispatchEvent(r)}}},{key:"dispatchColumnChangedEvent",value:function(e,t,n){var i={type:e,columns:t,column:t&&1==t.length?t[0]:null,source:n};this.eventService.dispatchEvent(i)}},{key:"dispatchColumnMovedEvent",value:function(e){var t=e.movedColumns,n=e.source,i=e.toIndex,r=e.finished,o={type:Er.EVENT_COLUMN_MOVED,columns:t,column:t&&1===t.length?t[0]:null,toIndex:i,finished:r,source:n};this.eventService.dispatchEvent(o)}},{key:"dispatchColumnPinnedEvent",value:function(e,t){if(e.length){var n=1===e.length?e[0]:null,i=this.getCommonValue(e,(function(e){return e.getPinned()})),r={type:Er.EVENT_COLUMN_PINNED,pinned:null!=i?i:null,columns:e,column:n,source:t};this.eventService.dispatchEvent(r)}}},{key:"dispatchColumnVisibleEvent",value:function(e,t){if(e.length){var n=1===e.length?e[0]:null,i=this.getCommonValue(e,(function(e){return e.isVisible()})),r={type:Er.EVENT_COLUMN_VISIBLE,visible:i,columns:e,column:n,source:t};this.eventService.dispatchEvent(r)}}},{key:"autoSizeColumn",value:function(e,t,n){e&&this.autoSizeColumns({columns:[e],skipHeader:n,skipHeaderGroups:!0,source:t})}},{key:"autoSizeColumnGroupsByColumns",value:function(e,t,n){var i,r=new Set;this.getGridColumns(e).forEach((function(e){for(var t=e.getParent();t&&t!=n;)t.isPadding()||r.add(t),t=t.getParent()}));var o,a=(0,g.Z)(r);try{for(a.s();!(o=a.n()).done;){var s,l=o.value,u=(0,g.Z)(this.ctrlsService.getHeaderRowContainerCtrls());try{for(u.s();!(s=u.n()).done;){if(i=s.value.getHeaderCtrlForColumn(l))break}}catch(c){u.e(c)}finally{u.f()}i&&i.resizeLeafColumnsToFit(t)}}catch(c){a.e(c)}finally{a.f()}return[]}},{key:"autoSizeAllColumns",value:function(e,t){var n=this;if(this.shouldQueueResizeOperations)this.resizeOperationQueue.push((function(){return n.autoSizeAllColumns(e,t)}));else{var i=this.getAllDisplayedColumns();this.autoSizeColumns({columns:i,skipHeader:t,source:e})}}},{key:"getColumnsFromTree",value:function(e){var t=[];return function e(n){for(var i=0;i<n.length;i++){var r=n[i];r instanceof Gi?t.push(r):r instanceof Vi&&e(r.getChildren())}}(e),t}},{key:"getAllDisplayedTrees",value:function(){return this.displayedTreeLeft&&this.displayedTreeRight&&this.displayedTreeCentre?this.displayedTreeLeft.concat(this.displayedTreeCentre).concat(this.displayedTreeRight):null}},{key:"getPrimaryColumnTree",value:function(){return this.primaryColumnTree}},{key:"getHeaderRowCount",value:function(){return this.gridHeaderRowCount}},{key:"getDisplayedTreeLeft",value:function(){return this.displayedTreeLeft}},{key:"getDisplayedTreeRight",value:function(){return this.displayedTreeRight}},{key:"getDisplayedTreeCentre",value:function(){return this.displayedTreeCentre}},{key:"isColumnDisplayed",value:function(e){return this.getAllDisplayedColumns().indexOf(e)>=0}},{key:"getAllDisplayedColumns",value:function(){return this.displayedColumns}},{key:"getViewportColumns",value:function(){return this.viewportColumns}},{key:"getDisplayedLeftColumnsForRow",value:function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsLeft):this.displayedColumnsLeft}},{key:"getDisplayedRightColumnsForRow",value:function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsRight):this.displayedColumnsRight}},{key:"isColSpanActive",value:function(){return this.colSpanActive}},{key:"getDisplayedColumnsForRow",value:function(e,t,n,i){for(var r=[],o=null,a=0;a<t.length;a++){var s=t[a],l=t.length-a,u=Math.min(s.getColSpan(e),l),c=[s];if(u>1){for(var d=u-1,h=1;h<=d;h++)c.push(t[a+h]);a+=d}var p=void 0;if(n?(p=!1,c.forEach((function(e){n(e)&&(p=!0)}))):p=!0,p){if(0===r.length&&o)!!i&&i(s)&&r.push(o);r.push(s)}o=s}return r}},{key:"getViewportCenterColumnsForRow",value:function(e){var t=this;if(!this.colSpanActive)return this.viewportColumnsCenter;var n=this.isColumnVirtualisationSuppressed()?null:this.isColumnInRowViewport.bind(this);return this.getDisplayedColumnsForRow(e,this.displayedColumnsCenter,n,(function(e){var n=e.getLeft();return Fn(n)&&n>t.viewportLeft}))}},{key:"isColumnAtEdge",value:function(e,t){var n=this.getAllDisplayedColumns();if(!n.length)return!1;var i,r="first"===t;if(e instanceof br){var o=e.getDisplayedLeafColumns();if(!o.length)return!1;i=r?o[0]:Ui(o)}else i=e;return(r?n[0]:Ui(n))===i}},{key:"getAriaColumnIndex",value:function(e){var t;return t=e instanceof br?e.getLeafColumns()[0]:e,this.ariaOrderColumns.indexOf(t)+1}},{key:"isColumnInHeaderViewport",value:function(e){return!!e.isAutoHeaderHeight()||this.isColumnInRowViewport(e)}},{key:"isColumnInRowViewport",value:function(e){if(e.isAutoHeight())return!0;var t=e.getLeft()||0,n=t+e.getActualWidth(),i=this.viewportLeft-200,r=this.viewportRight+200;return!(t<i&&n<i)&&!(t>r&&n>r)}},{key:"getDisplayedColumnsLeftWidth",value:function(){return this.getWidthOfColsInList(this.displayedColumnsLeft)}},{key:"getDisplayedColumnsRightWidth",value:function(){return this.getWidthOfColsInList(this.displayedColumnsRight)}},{key:"updatePrimaryColumnList",value:function(e,t,n,i,r,o){var a=this;if(e&&!Gn(e)){var s=!1;if(e.forEach((function(e){if(e){var r=a.getPrimaryColumn(e);if(r){if(n){if(t.indexOf(r)>=0)return;t.push(r)}else{if(t.indexOf(r)<0)return;Qi(t,r)}i(r),s=!0}}})),s){this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(o);var l={type:r,columns:t,column:1===t.length?t[0]:null,source:o};this.eventService.dispatchEvent(l)}}}},{key:"setRowGroupColumns",value:function(e,t){this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,Er.EVENT_COLUMN_ROW_GROUP_CHANGED,!0,this.setRowGroupActive.bind(this),t)}},{key:"setRowGroupActive",value:function(e,t,n){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,n),e&&!this.gridOptionsService.get("suppressRowGroupHidesColumns")&&this.setColumnsVisible([t],!1,n),e||this.gridOptionsService.get("suppressMakeColumnVisibleAfterUnGroup")||this.setColumnsVisible([t],!0,n))}},{key:"addRowGroupColumns",value:function(e,t){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),Er.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}},{key:"removeRowGroupColumns",value:function(e,t){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),Er.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}},{key:"addPivotColumns",value:function(e,t){this.updatePrimaryColumnList(e,this.pivotColumns,!0,(function(e){return e.setPivotActive(!0,t)}),Er.EVENT_COLUMN_PIVOT_CHANGED,t)}},{key:"setPivotColumns",value:function(e,t){this.setPrimaryColumnList(e,this.pivotColumns,Er.EVENT_COLUMN_PIVOT_CHANGED,!0,(function(e,n){n.setPivotActive(e,t)}),t)}},{key:"removePivotColumns",value:function(e,t){this.updatePrimaryColumnList(e,this.pivotColumns,!1,(function(e){return e.setPivotActive(!1,t)}),Er.EVENT_COLUMN_PIVOT_CHANGED,t)}},{key:"setPrimaryColumnList",value:function(e,t,n,i,r,a){var s=this;if(this.gridColumns){var l=new Map;t.forEach((function(e,t){return l.set(e,t)})),t.length=0,Fn(e)&&e.forEach((function(e){var n=s.getPrimaryColumn(e);n&&t.push(n)})),t.forEach((function(e,t){var n=l.get(e);void 0!==n?i&&n!==t||l.delete(e):l.set(e,0)})),(this.primaryColumns||[]).forEach((function(e){var n=t.indexOf(e)>=0;r(n,e)})),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(a),this.dispatchColumnChangedEvent(n,(0,o.Z)(l.keys()),a)}}},{key:"setValueColumns",value:function(e,t){this.setPrimaryColumnList(e,this.valueColumns,Er.EVENT_COLUMN_VALUE_CHANGED,!1,this.setValueActive.bind(this),t)}},{key:"setValueActive",value:function(e,t,n){if(e!==t.isValueActive()&&(t.setValueActive(e,n),e&&!t.getAggFunc())){var i=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(i)}}},{key:"addValueColumns",value:function(e,t){this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),Er.EVENT_COLUMN_VALUE_CHANGED,t)}},{key:"removeValueColumns",value:function(e,t){this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),Er.EVENT_COLUMN_VALUE_CHANGED,t)}},{key:"normaliseColumnWidth",value:function(e,t){var n=e.getMinWidth();Fn(n)&&t<n&&(t=n);var i=e.getMaxWidth();return Fn(i)&&e.isGreaterThanMax(t)&&(t=i),t}},{key:"getPrimaryOrGridColumn",value:function(e){return this.getPrimaryColumn(e)||this.getGridColumn(e)}},{key:"setColumnWidths",value:function(e,t,n,i){var r=this,o=[];e.forEach((function(e){var n=r.getPrimaryOrGridColumn(e.key);if(n&&(o.push({width:e.newWidth,ratios:[1],columns:[n]}),"shift"===r.gridOptionsService.get("colResizeDefault")&&(t=!t),t)){var i=r.getDisplayedColAfter(n);if(!i)return;var a=n.getActualWidth()-e.newWidth,s=i.getActualWidth()+a;o.push({width:s,ratios:[1],columns:[i]})}})),0!==o.length&&this.resizeColumnSets({resizeSets:o,finished:n,source:i})}},{key:"checkMinAndMaxWidthsForSet",value:function(e){var t=e.columns,n=e.width,i=0,r=0,o=!0;return t.forEach((function(e){var t=e.getMinWidth();i+=t||0;var n=e.getMaxWidth();Fn(n)&&n>0?r+=n:o=!1})),n>=i&&(!o||n<=r)}},{key:"resizeColumnSets",value:function(e){var t=this,n=e.resizeSets,i=e.finished,r=e.source;if(!n||n.every((function(e){return t.checkMinAndMaxWidthsForSet(e)}))){var o=[],a=[];n.forEach((function(e){var t=e.width,n=e.columns,i=e.ratios,s={},l={};n.forEach((function(e){return a.push(e)}));for(var u=!0,c=0,d=function(){if(++c>1e3)return console.error("AG Grid: infinite loop in resizeColumnSets"),"break";u=!1;var e=[],r=0,o=t;n.forEach((function(t,n){if(l[t.getId()])o-=s[t.getId()];else{e.push(t);var a=i[n];r+=a}}));var a=1/r;e.forEach((function(n,r){var c;r===e.length-1?c=o:(c=Math.round(i[r]*t*a),o-=c);var d=n.getMinWidth(),h=n.getMaxWidth();Fn(d)&&c<d?(c=d,l[n.getId()]=!0,u=!0):Fn(h)&&h>0&&c>h&&(c=h,l[n.getId()]=!0,u=!0),s[n.getId()]=c}))};u;){if("break"===d())break}n.forEach((function(e){var t=s[e.getId()];e.getActualWidth()!==t&&(e.setActualWidth(t,r),o.push(e))}))}));var s=o.length>0,l=[];s&&(l=this.refreshFlexedColumns({resizingCols:a,skipSetLeft:!0}),this.setLeftValues(r),this.updateBodyWidths(),this.checkViewportColumns());var u=a.concat(l);(s||i)&&this.dispatchColumnResizedEvent(u,i,r,l)}else if(i){var c=n&&n.length>0?n[0].columns:null;this.dispatchColumnResizedEvent(c,i,r)}}},{key:"setColumnAggFunc",value:function(e,t,n){if(e){var i=this.getPrimaryColumn(e);i&&(i.setAggFunc(t),this.dispatchColumnChangedEvent(Er.EVENT_COLUMN_VALUE_CHANGED,[i],n))}}},{key:"moveRowGroupColumn",value:function(e,t,n){if(!this.isRowGroupEmpty()){var i=this.rowGroupColumns[e],r=this.rowGroupColumns.slice(e,t);this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(t,0,i);var o={type:Er.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:r,column:1===r.length?r[0]:null,source:n};this.eventService.dispatchEvent(o)}}},{key:"moveColumns",value:function(e,t,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(this.gridColumns){if(this.columnAnimationService.start(),t>this.gridColumns.length-e.length)return console.warn("AG Grid: tried to insert columns in invalid location, toIndex = "+t),void console.warn("AG Grid: remember that you should not count the moving columns when calculating the new index");var r=this.getGridColumns(e),o=!this.doesMovePassRules(r,t);o||(nr(this.gridColumns,r,t),this.updateDisplayedColumns(n),this.dispatchColumnMovedEvent({movedColumns:r,source:n,toIndex:t,finished:i}),this.columnAnimationService.finish())}}},{key:"doesMovePassRules",value:function(e,t){var n=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(n)}},{key:"doesOrderPassRules",value:function(e){return!!this.doesMovePassMarryChildren(e)&&!!this.doesMovePassLockedPositions(e)}},{key:"getProposedColumnOrder",value:function(e,t){var n=this.gridColumns.slice();return nr(n,e,t),n}},{key:"sortColumnsLikeGridColumns",value:function(e){var t=this;if(e&&!(e.length<=1)){var n=e.filter((function(e){return t.gridColumns.indexOf(e)<0})).length>0;n||e.sort((function(e,n){return t.gridColumns.indexOf(e)-t.gridColumns.indexOf(n)}))}}},{key:"doesMovePassLockedPositions",value:function(e){var t=0,n=!0;return e.forEach((function(e){var i,r=(i=e.getColDef().lockPosition)?!0===i||"left"===i?0:2:1;r<t&&(n=!1),t=r})),n}},{key:"doesMovePassMarryChildren",value:function(e){var t=!0;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(n){if(n instanceof Vi){var i=n,r=i.getColGroupDef();if(r&&r.marryChildren){var o=[];i.getLeafColumns().forEach((function(t){var n=e.indexOf(t);o.push(n)})),Math.max.apply(Math,o)-Math.min.apply(Math,o)>i.getLeafColumns().length-1&&(t=!1)}}})),t}},{key:"moveColumnByIndex",value:function(e,t,n){if(this.gridColumns){var i=this.gridColumns[e];this.moveColumns([i],t,n)}}},{key:"getColumnDefs",value:function(){var e=this;if(this.primaryColumns){var t=this.primaryColumns.slice();return this.gridColsArePrimary?t.sort((function(t,n){return e.gridColumns.indexOf(t)-e.gridColumns.indexOf(n)})):this.lastPrimaryOrder&&t.sort((function(t,n){return e.lastPrimaryOrder.indexOf(t)-e.lastPrimaryOrder.indexOf(n)})),this.columnDefFactory.buildColumnDefs(t,this.rowGroupColumns,this.pivotColumns)}}},{key:"getBodyContainerWidth",value:function(){return this.bodyWidth}},{key:"getContainerWidth",value:function(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}},{key:"updateBodyWidths",value:function(){var e=this.getWidthOfColsInList(this.displayedColumnsCenter),t=this.getWidthOfColsInList(this.displayedColumnsLeft),n=this.getWidthOfColsInList(this.displayedColumnsRight);if(this.bodyWidthDirty=this.bodyWidth!==e,this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==n){this.bodyWidth=e,this.leftWidth=t,this.rightWidth=n;var i={type:Er.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED};this.eventService.dispatchEvent(i);var r={type:Er.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED};this.eventService.dispatchEvent(r)}}},{key:"getValueColumns",value:function(){return this.valueColumns?this.valueColumns:[]}},{key:"getPivotColumns",value:function(){return this.pivotColumns?this.pivotColumns:[]}},{key:"isPivotActive",value:function(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode}},{key:"getRowGroupColumns",value:function(){return this.rowGroupColumns?this.rowGroupColumns:[]}},{key:"getDisplayedCenterColumns",value:function(){return this.displayedColumnsCenter}},{key:"getDisplayedLeftColumns",value:function(){return this.displayedColumnsLeft}},{key:"getDisplayedRightColumns",value:function(){return this.displayedColumnsRight}},{key:"getDisplayedColumns",value:function(e){switch(e){case"left":return this.getDisplayedLeftColumns();case"right":return this.getDisplayedRightColumns();default:return this.getDisplayedCenterColumns()}}},{key:"getAllPrimaryColumns",value:function(){return this.primaryColumns?this.primaryColumns:null}},{key:"getSecondaryColumns",value:function(){return this.secondaryColumns?this.secondaryColumns:null}},{key:"getAllColumnsForQuickFilter",value:function(){return this.columnsForQuickFilter}},{key:"getAllGridColumns",value:function(){var e;return null!=(e=this.gridColumns)?e:[]}},{key:"isEmpty",value:function(){return Gn(this.gridColumns)}},{key:"isRowGroupEmpty",value:function(){return Gn(this.rowGroupColumns)}},{key:"setColumnsVisible",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;this.applyColumnState({state:e.map((function(e){return{colId:"string"===typeof e?e:e.getColId(),hide:!t}}))},n)}},{key:"setColumnsPinned",value:function(e,t,n){var i;this.gridColumns&&(this.gridOptionsService.isDomLayout("print")?console.warn("AG Grid: Changing the column pinning status is not allowed with domLayout='print'"):(this.columnAnimationService.start(),i=!0===t||"left"===t?"left":"right"===t?"right":null,this.actionOnGridColumns(e,(function(e){return e.getPinned()!==i&&(e.setPinned(i),!0)}),n,(function(){return{type:Er.EVENT_COLUMN_PINNED,pinned:i,column:null,columns:null,source:n}})),this.columnAnimationService.finish()))}},{key:"actionOnGridColumns",value:function(e,t,n,i){var r=this;if(!Gn(e)){var o=[];if(e.forEach((function(e){if(e){var n=r.getGridColumn(e);if(n)!1!==t(n)&&o.push(n)}})),o.length&&(this.updateDisplayedColumns(n),Fn(i)&&i)){var a=i();a.columns=o,a.column=1===o.length?o[0]:null,this.eventService.dispatchEvent(a)}}}},{key:"getDisplayedColBefore",value:function(e){var t=this.getAllDisplayedColumns(),n=t.indexOf(e);return n>0?t[n-1]:null}},{key:"getDisplayedColAfter",value:function(e){var t=this.getAllDisplayedColumns(),n=t.indexOf(e);return n<t.length-1?t[n+1]:null}},{key:"getDisplayedGroupAfter",value:function(e){return this.getDisplayedGroupAtDirection(e,"After")}},{key:"getDisplayedGroupBefore",value:function(e){return this.getDisplayedGroupAtDirection(e,"Before")}},{key:"getDisplayedGroupAtDirection",value:function(e,t){for(var n=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),r="After"===t?Ui(i):i[0],o="getDisplayedCol".concat(t);;){var a=this[o](r);if(!a)return null;var s=this.getColumnGroupAtLevel(a,n);if(s!==e)return s}}},{key:"getColumnGroupAtLevel",value:function(e,t){for(var n=e.getParent();;){if(n.getProvidedColumnGroup().getLevel()+n.getPaddingLevel()<=t)break;n=n.getParent()}return n}},{key:"isPinningLeft",value:function(){return this.displayedColumnsLeft.length>0}},{key:"isPinningRight",value:function(){return this.displayedColumnsRight.length>0}},{key:"getPrimaryAndSecondaryAndAutoColumns",value:function(){var e;return(e=[]).concat.apply(e,[this.primaryColumns||[],this.groupAutoColumns||[],this.secondaryColumns||[]])}},{key:"createStateItemFromColumn",value:function(e){var t=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,n=e.isPivotActive()?this.pivotColumns.indexOf(e):null,i=e.isValueActive()?e.getAggFunc():null,r=null!=e.getSort()?e.getSort():null,o=null!=e.getSortIndex()?e.getSortIndex():null,a=null!=e.getFlex()&&e.getFlex()>0?e.getFlex():null;return{colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:r,sortIndex:o,aggFunc:i,rowGroup:e.isRowGroupActive(),rowGroupIndex:t,pivot:e.isPivotActive(),pivotIndex:n,flex:a}}},{key:"getColumnState",value:function(){if(_n(this.primaryColumns)||!this.isAlive())return[];var e=this.getPrimaryAndSecondaryAndAutoColumns().map(this.createStateItemFromColumn.bind(this));return this.orderColumnStateList(e),e}},{key:"orderColumnStateList",value:function(e){var t=Gr(this.gridColumns.map((function(e,t){return[e.getColId(),t]})));e.sort((function(e,n){return(t.has(e.colId)?t.get(e.colId):-1)-(t.has(n.colId)?t.get(n.colId):-1)}))}},{key:"resetColumnState",value:function(e){var t=this;if(!Gn(this.primaryColumns)){var n=this.getColumnsFromTree(this.primaryColumnTree),i=[],r=1e3,o=1e3,a=[];this.groupAutoColumns&&(a=a.concat(this.groupAutoColumns)),n&&(a=a.concat(n)),a.forEach((function(e){var n=t.getColumnStateFromColDef(e);_n(n.rowGroupIndex)&&n.rowGroup&&(n.rowGroupIndex=r++),_n(n.pivotIndex)&&n.pivot&&(n.pivotIndex=o++),i.push(n)})),this.applyColumnState({state:i,applyOrder:!0},e)}}},{key:"getColumnStateFromColDef",value:function(e){var t=function(e,t){return null!=e?e:null!=t?t:null},n=e.getColDef(),i=t(n.sort,n.initialSort),r=t(n.sortIndex,n.initialSortIndex),o=t(n.hide,n.initialHide),a=t(n.pinned,n.initialPinned),s=t(n.width,n.initialWidth),l=t(n.flex,n.initialFlex),u=t(n.rowGroupIndex,n.initialRowGroupIndex),c=t(n.rowGroup,n.initialRowGroup);null!=u||null!=c&&0!=c||(u=null,c=null);var d=t(n.pivotIndex,n.initialPivotIndex),h=t(n.pivot,n.initialPivot);null!=d||null!=h&&0!=h||(d=null,h=null);var p=t(n.aggFunc,n.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:r,hide:o,pinned:a,width:s,flex:l,rowGroup:c,rowGroupIndex:u,pivot:h,pivotIndex:d,aggFunc:p}}},{key:"applyColumnState",value:function(e,t){var n=this;if(Gn(this.primaryColumns))return!1;if(e&&e.state&&!e.state.forEach)return console.warn("AG Grid: 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;var i=function(i,r,o){var a=n.compareColumnStatesAndDispatchEvents(t);n.autoGroupsNeedBuilding=!0;var s=r.slice(),l={},u={},c=[],d=[],h=0,p=n.rowGroupColumns.slice(),f=n.pivotColumns.slice();i.forEach((function(i){var r=i.colId||"";if(r.startsWith(Dr))return c.push(i),void d.push(i);var a=o(r);a?(n.syncColumnWithStateItem(a,i,e.defaultState,l,u,!1,t),Qi(s,a)):(d.push(i),h+=1)}));var v=function(i){return n.syncColumnWithStateItem(i,null,e.defaultState,l,u,!1,t)};s.forEach(v);var g=function(e,t,n,i){var r=e[n.getId()],o=e[i.getId()],a=null!=r,s=null!=o;if(a&&s)return r-o;if(a)return-1;if(s)return 1;var l=t.indexOf(n),u=t.indexOf(i),c=l>=0;return c&&u>=0?l-u:c?-1:1};n.rowGroupColumns.sort(g.bind(n,l,p)),n.pivotColumns.sort(g.bind(n,u,f)),n.updateGridColumns();var m=n.groupAutoColumns?n.groupAutoColumns.slice():[];return c.forEach((function(i){var r=n.getAutoColumn(i.colId);Qi(m,r),n.syncColumnWithStateItem(r,i,e.defaultState,null,null,!0,t)})),m.forEach(v),n.applyOrderAfterApplyState(e),n.updateDisplayedColumns(t),n.dispatchEverythingChanged(t),a(),{unmatchedAndAutoStates:d,unmatchedCount:h}};this.columnAnimationService.start();var r=i(e.state||[],this.primaryColumns||[],(function(e){return n.getPrimaryColumn(e)})),o=r.unmatchedAndAutoStates,a=r.unmatchedCount;return(o.length>0||Fn(e.defaultState))&&(a=i(o,this.secondaryColumns||[],(function(e){return n.getSecondaryColumn(e)})).unmatchedCount),this.columnAnimationService.finish(),0===a}},{key:"applyOrderAfterApplyState",value:function(e){var t=this;if(e.applyOrder&&e.state){var n=[],i={};e.state.forEach((function(e){if(e.colId&&!i[e.colId]){var r=t.gridColumnsMap[e.colId];r&&(n.push(r),i[e.colId]=!0)}}));var r=0;this.gridColumns.forEach((function(e){var t=e.getColId();null!=i[t]||(t.startsWith(Dr)?er(n,e,r++):n.push(e))})),n=this.placeLockedColumns(n),this.doesMovePassMarryChildren(n)?this.gridColumns=n:console.warn("AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.")}}},{key:"compareColumnStatesAndDispatchEvents",value:function(e){var t=this,n={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()},i=this.getColumnState(),r={};return i.forEach((function(e){r[e.colId]=e})),function(){var a=t.getPrimaryAndSecondaryAndAutoColumns(),s=function(n,i,r,a){if(!ji(i.map(a),r.map(a))){var s=new Set(i);r.forEach((function(e){s.delete(e)||s.add(e)}));var l=(0,o.Z)(s),u={type:n,columns:l,column:1===l.length?l[0]:null,source:e};t.eventService.dispatchEvent(u)}},l=function(e){var t=[];return a.forEach((function(n){var i=r[n.getColId()];i&&e(i,n)&&t.push(n)})),t},u=function(e){return e.getColId()};s(Er.EVENT_COLUMN_ROW_GROUP_CHANGED,n.rowGroupColumns,t.rowGroupColumns,u),s(Er.EVENT_COLUMN_PIVOT_CHANGED,n.pivotColumns,t.pivotColumns,u);var c=l((function(e,t){var n=null!=e.aggFunc,i=n!=t.isValueActive(),r=n&&e.aggFunc!=t.getAggFunc();return i||r}));c.length>0&&t.dispatchColumnChangedEvent(Er.EVENT_COLUMN_VALUE_CHANGED,c,e);t.dispatchColumnResizedEvent(l((function(e,t){return e.width!=t.getActualWidth()})),!0,e);t.dispatchColumnPinnedEvent(l((function(e,t){return e.pinned!=t.getPinned()})),e);t.dispatchColumnVisibleEvent(l((function(e,t){return e.hide==t.isVisible()})),e);var d=l((function(e,t){return e.sort!=t.getSort()||e.sortIndex!=t.getSortIndex()}));d.length>0&&t.sortController.dispatchSortChangedEvents(e,d),t.normaliseColumnMovedEventForColumnState(i,e)}}},{key:"getCommonValue",value:function(e,t){if(e&&0!=e.length){for(var n=t(e[0]),i=1;i<e.length;i++)if(n!==t(e[i]))return;return n}}},{key:"normaliseColumnMovedEventForColumnState",value:function(e,t){var n=this,i=this.getColumnState(),r={};i.forEach((function(e){return r[e.colId]=e}));var o={};e.forEach((function(e){r[e.colId]&&(o[e.colId]=!0)}));var a=e.filter((function(e){return o[e.colId]})),s=i.filter((function(e){return o[e.colId]})),l=[];s.forEach((function(e,t){var i=a&&a[t];if(i&&i.colId!==e.colId){var r=n.getGridColumn(i.colId);r&&l.push(r)}})),l.length&&this.dispatchColumnMovedEvent({movedColumns:l,source:t,finished:!0})}},{key:"syncColumnWithStateItem",value:function(e,t,n,i,r,o,a){if(e){var s=function(e,i){var r={value1:void 0,value2:void 0},o=!1;return t&&(void 0!==t[e]&&(r.value1=t[e],o=!0),Fn(i)&&void 0!==t[i]&&(r.value2=t[i],o=!0)),!o&&n&&(void 0!==n[e]&&(r.value1=n[e]),Fn(i)&&void 0!==n[i]&&(r.value2=n[i])),r},l=s("hide").value1;void 0!==l&&e.setVisible(!l,a);var u=s("pinned").value1;void 0!==u&&e.setPinned(u);var c=this.columnUtils.calculateColMinWidth(e.getColDef()),d=s("flex").value1;if(void 0!==d&&e.setFlex(d),null==d){var h=s("width").value1;null!=h&&null!=c&&h>=c&&e.setActualWidth(h,a)}var p=s("sort").value1;void 0!==p&&("desc"===p||"asc"===p?e.setSort(p,a):e.setSort(void 0,a));var f=s("sortIndex").value1;if(void 0!==f&&e.setSortIndex(f),!o&&e.isPrimary()){var v=s("aggFunc").value1;void 0!==v&&("string"===typeof v?(e.setAggFunc(v),e.isValueActive()||(e.setValueActive(!0,a),this.valueColumns.push(e))):(Fn(v)&&console.warn("AG Grid: 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,a),Qi(this.valueColumns,e))));var g=s("rowGroup","rowGroupIndex"),m=g.value1,y=g.value2;void 0===m&&void 0===y||("number"===typeof y||m?(e.isRowGroupActive()||(e.setRowGroupActive(!0,a),this.rowGroupColumns.push(e)),i&&"number"===typeof y&&(i[e.getId()]=y)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,a),Qi(this.rowGroupColumns,e)));var C=s("pivot","pivotIndex"),k=C.value1,w=C.value2;void 0===k&&void 0===w||("number"===typeof w||k?(e.isPivotActive()||(e.setPivotActive(!0,a),this.pivotColumns.push(e)),r&&"number"===typeof w&&(r[e.getId()]=w)):e.isPivotActive()&&(e.setPivotActive(!1,a),Qi(this.pivotColumns,e)))}}}},{key:"getGridColumns",value:function(e){return this.getColumns(e,this.getGridColumn.bind(this))}},{key:"getColumns",value:function(e,t){var n=[];return e&&e.forEach((function(e){var i=t(e);i&&n.push(i)})),n}},{key:"getColumnWithValidation",value:function(e){if(null==e)return null;var t=this.getGridColumn(e);return t||console.warn("AG Grid: could not find column "+e),t}},{key:"getPrimaryColumn",value:function(e){return this.primaryColumns?this.getColumn(e,this.primaryColumns,this.primaryColumnsMap):null}},{key:"getGridColumn",value:function(e){return this.getColumn(e,this.gridColumns,this.gridColumnsMap)}},{key:"lookupGridColumn",value:function(e){return this.gridColumnsMap[e]}},{key:"getSecondaryColumn",value:function(e){return this.secondaryColumns?this.getColumn(e,this.secondaryColumns,this.secondaryColumnsMap):null}},{key:"getColumn",value:function(e,t,n){if(!e||!n)return null;if("string"==typeof e&&n[e])return n[e];for(var i=0;i<t.length;i++)if(this.columnsMatch(t[i],e))return t[i];return this.getAutoColumn(e)}},{key:"getSourceColumnsForGroupColumn",value:function(e){var t=e.getColDef().showRowGroup;if(!t)return null;if(!0===t)return this.rowGroupColumns.slice(0);var n=this.getPrimaryColumn(t);return n?[n]:null}},{key:"getAutoColumn",value:function(e){var t=this;return this.groupAutoColumns&&Fn(this.groupAutoColumns)&&!_n(this.groupAutoColumns)&&this.groupAutoColumns.find((function(n){return t.columnsMatch(n,e)}))||null}},{key:"columnsMatch",value:function(e,t){var n=e===t,i=e.getColDef()===t,r=e.getColId()==t;return n||i||r}},{key:"getDisplayNameForColumn",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return null;var i=this.getHeaderName(e.getColDef(),e,null,null,t);return n?this.wrapHeaderNameWithAggFunc(e,i):i}},{key:"getDisplayNameForProvidedColumnGroup",value:function(e,t,n){var i=t?t.getColGroupDef():null;return i?this.getHeaderName(i,null,e,t,n):null}},{key:"getDisplayNameForColumnGroup",value:function(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}},{key:"getHeaderName",value:function(e,t,n,i,r){var o=e.headerValueGetter;if(o){var a=this.gridOptionsService.addGridCommonParams({colDef:e,column:t,columnGroup:n,providedColumnGroup:i,location:r});return"function"===typeof o?o(a):"string"===typeof o?this.expressionService.evaluate(o,a):(console.warn("AG Grid: headerValueGetter must be a function or a string"),"")}return null!=e.headerName?e.headerName:e.field?Ir(e.field):""}},{key:"wrapHeaderNameWithAggFunc",value:function(e,t){if(this.gridOptionsService.get("suppressAggFuncInHeader"))return t;var n,i=e.getColDef().pivotValueColumn,r=null;if(Fn(i)){var o=this.gridOptionsService.get("removePivotHeaderRowWhenSingleValueColumn")&&1===this.valueColumns.length,a=void 0!==e.getColDef().pivotTotalColumnIds;if(o&&!a)return t;r=i?i.getAggFunc():null,n=!0}else{var s=e.isValueActive(),l=this.pivotMode||!this.isRowGroupEmpty();s&&l?(r=e.getAggFunc(),n=!0):n=!1}if(n){var u="string"===typeof r?r:"func",c=this.localeService.getLocaleTextFunc()(u,u);return"".concat(c,"(").concat(t,")")}return t}},{key:"getColumnGroup",value:function(e,t){if(!e)return null;if(e instanceof br)return e;var n=this.getAllDisplayedTrees(),i="number"===typeof t,r=null;return this.columnUtils.depthFirstAllColumnTreeSearch(n,(function(n){if(n instanceof br){var o=n;(i?e===o.getGroupId()&&t===o.getPartId():e===o.getGroupId())&&(r=o)}})),r}},{key:"isReady",value:function(){return this.ready}},{key:"extractValueColumns",value:function(e,t){this.valueColumns=this.extractColumns(t,this.valueColumns,(function(t,n){return t.setValueActive(n,e)}),(function(){}),(function(){}),(function(e){var t=e.aggFunc;return null===t||""===t?null:void 0!==t?!!t:void 0}),(function(e){return null!=e.initialAggFunc&&""!=e.initialAggFunc})),this.valueColumns.forEach((function(e){var t=e.getColDef();null!=t.aggFunc&&""!=t.aggFunc?e.setAggFunc(t.aggFunc):e.getAggFunc()||e.setAggFunc(t.initialAggFunc)}))}},{key:"extractRowGroupColumns",value:function(e,t){this.rowGroupColumns=this.extractColumns(t,this.rowGroupColumns,(function(t,n){return t.setRowGroupActive(n,e)}),(function(e){return e.rowGroupIndex}),(function(e){return e.initialRowGroupIndex}),(function(e){return e.rowGroup}),(function(e){return e.initialRowGroup}))}},{key:"extractColumns",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,s=[],l=[];(this.primaryColumns||[]).forEach((function(n){var u=e.indexOf(n)<0,c=n.getColDef(),d=Hn(o(c)),h=Hn(a(c)),p=Vn(i(c)),f=Vn(r(c));(void 0!==d?d:void 0!==p?null!==p&&p>=0:u?void 0!==h?h:!!(void 0!==f)&&(null!=f&&f>=0):t.indexOf(n)>=0)&&((u?null!=p||null!=f:null!=p)?s.push(n):l.push(n))}));var u=function(e){var t=i(e.getColDef()),n=r(e.getColDef());return null!=t?t:n};s.sort((function(e,t){var n=u(e),i=u(t);return n===i?0:n<i?-1:1}));var c=[].concat(s);return t.forEach((function(e){l.indexOf(e)>=0&&c.push(e)})),l.forEach((function(e){c.indexOf(e)<0&&c.push(e)})),t.forEach((function(e){c.indexOf(e)<0&&n(e,!1)})),c.forEach((function(e){t.indexOf(e)<0&&n(e,!0)})),c}},{key:"extractPivotColumns",value:function(e,t){this.pivotColumns=this.extractColumns(t,this.pivotColumns,(function(t,n){return t.setPivotActive(n,e)}),(function(e){return e.pivotIndex}),(function(e){return e.initialPivotIndex}),(function(e){return e.pivot}),(function(e){return e.initialPivot}))}},{key:"resetColumnGroupState",value:function(e){if(this.primaryColumnTree){var t=[];this.columnUtils.depthFirstOriginalTreeSearch(null,this.primaryColumnTree,(function(e){if(e instanceof Vi){var n=e.getColGroupDef(),i={groupId:e.getGroupId(),open:n?n.openByDefault:void 0};t.push(i)}})),this.setColumnGroupState(t,e)}}},{key:"getColumnGroupState",value:function(){var e=[];return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(t){t instanceof Vi&&e.push({groupId:t.getGroupId(),open:t.isExpanded()})})),e}},{key:"setColumnGroupState",value:function(e,t){var n=this;if(this.gridBalancedTree){this.columnAnimationService.start();var i=[];if(e.forEach((function(e){var t=e.groupId,r=e.open,o=n.getProvidedColumnGroup(t);o&&o.isExpanded()!==r&&(n.logger.log("columnGroupOpened("+o.getGroupId()+","+r+")"),o.setExpanded(r),i.push(o))})),this.updateGroupsAndDisplayedColumns(t),this.setFirstRightAndLastLeftPinned(t),i.length){var r={type:Er.EVENT_COLUMN_GROUP_OPENED,columnGroup:1===Vi.length?i[0]:void 0,columnGroups:i};this.eventService.dispatchEvent(r)}this.columnAnimationService.finish()}}},{key:"setColumnGroupOpened",value:function(e,t,n){var i;i=e instanceof Vi?e.getId():e||"",this.setColumnGroupState([{groupId:i,open:t}],n)}},{key:"getProvidedColumnGroup",value:function(e){"string"!==typeof e&&console.error("AG Grid: group key must be a string");var t=null;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(n){n instanceof Vi&&n.getId()===e&&(t=n)})),t}},{key:"calculateColumnsForDisplay",value:function(){var e=this;return this.pivotMode&&_n(this.secondaryColumns)?this.gridColumns.filter((function(t){var n=e.groupAutoColumns&&ir(e.groupAutoColumns,t),i=e.valueColumns&&ir(e.valueColumns,t);return n||i})):this.gridColumns.filter((function(t){return e.groupAutoColumns&&ir(e.groupAutoColumns,t)||t.isVisible()}))}},{key:"checkColSpanActiveInCols",value:function(e){var t=!1;return e.forEach((function(e){Fn(e.getColDef().colSpan)&&(t=!0)})),t}},{key:"calculateColumnsForGroupDisplay",value:function(){var e=this;this.groupDisplayColumns=[],this.groupDisplayColumnsMap={};this.gridColumns.forEach((function(t){var n=t.getColDef(),i=n.showRowGroup;n&&Fn(i)&&(e.groupDisplayColumns.push(t),"string"===typeof i?e.groupDisplayColumnsMap[i]=t:!0===i&&e.getRowGroupColumns().forEach((function(n){e.groupDisplayColumnsMap[n.getId()]=t})))}))}},{key:"getGroupDisplayColumns",value:function(){return this.groupDisplayColumns}},{key:"getGroupDisplayColumnForGroup",value:function(e){return this.groupDisplayColumnsMap[e]}},{key:"updateDisplayedColumns",value:function(e){var t=this.calculateColumnsForDisplay();this.buildDisplayedTrees(t),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e)}},{key:"isSecondaryColumnsPresent",value:function(){return Fn(this.secondaryColumns)}},{key:"setSecondaryColumns",value:function(e,t){var n=this;if(this.gridColumns){var i=e;if(i||!_n(this.secondaryColumns)){if(i){this.processSecondaryColumnDefinitions(e);var r=this.columnFactory.createColumnTree(e,!1,this.secondaryBalancedTree||this.previousSecondaryColumns||void 0,t);this.destroyOldColumns(this.secondaryBalancedTree,r.columnTree),this.secondaryBalancedTree=r.columnTree,this.secondaryHeaderRowCount=r.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsMap={},this.secondaryColumns.forEach((function(e){return n.secondaryColumnsMap[e.getId()]=e})),this.previousSecondaryColumns=null}else this.previousSecondaryColumns=this.secondaryBalancedTree,this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsMap={};this.updateGridColumns(),this.updateDisplayedColumns(t)}}}},{key:"processSecondaryColumnDefinitions",value:function(e){var t=this.gridOptionsService.get("processPivotResultColDef"),n=this.gridOptionsService.get("processPivotResultColGroupDef");if(t||n){e&&function e(i){i.forEach((function(i){if(Fn(i.children)){var r=i;n&&n(r),e(r.children)}else t&&t(i)}))}(e)}}},{key:"updateGridColumns",value:function(){var e,t=this,n=this.gridBalancedTree;if(this.gridColsArePrimary?this.lastPrimaryOrder=this.gridColumns:this.lastSecondaryOrder=this.gridColumns,this.createGroupAutoColumnsIfNeeded()){var i=Gr(this.groupAutoColumns.map((function(e){return[e,!0]})));this.lastPrimaryOrder&&(this.lastPrimaryOrder=this.lastPrimaryOrder.filter((function(e){return!i.has(e)})),this.lastPrimaryOrder=[].concat((0,o.Z)(this.groupAutoColumns),(0,o.Z)(this.lastPrimaryOrder))),this.lastSecondaryOrder&&(this.lastSecondaryOrder=this.lastSecondaryOrder.filter((function(e){return!i.has(e)})),this.lastSecondaryOrder=[].concat((0,o.Z)(this.groupAutoColumns),(0,o.Z)(this.lastSecondaryOrder)))}if(this.secondaryColumns&&this.secondaryBalancedTree){var r=this.secondaryColumns.some((function(e){return void 0!==t.gridColumnsMap[e.getColId()]}));this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1,r&&(e=this.lastSecondaryOrder)}else this.primaryColumns&&(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,e=this.lastPrimaryOrder);if(this.addAutoGroupToGridColumns(),this.orderGridColsLike(e),this.gridColumns=this.placeLockedColumns(this.gridColumns),this.calculateColumnsForGroupDisplay(),this.refreshQuickFilterColumns(),this.clearDisplayedAndViewportColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns),this.gridColumnsMap={},this.gridColumns.forEach((function(e){return t.gridColumnsMap[e.getId()]=e})),this.setAutoHeightActive(),!ji(n,this.gridBalancedTree)){var a={type:Er.EVENT_GRID_COLUMNS_CHANGED};this.eventService.dispatchEvent(a)}}},{key:"setAutoHeightActive",value:function(){(this.autoHeightActive=this.gridColumns.filter((function(e){return e.isAutoHeight()})).length>0,this.autoHeightActive)&&(this.autoHeightActiveAtLeastOnce=!0,this.gridOptionsService.isRowModelType("clientSide")||this.gridOptionsService.isRowModelType("serverSide")||oi("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}},{key:"orderGridColsLike",value:function(e){if(!_n(e)){var t=Gr(e.map((function(e,t){return[e,t]}))),n=!0;if(this.gridColumns.forEach((function(e){t.has(e)&&(n=!1)})),!n){var i=Gr(this.gridColumns.map((function(e){return[e,!0]}))),r=e.filter((function(e){return i.has(e)})),a=Gr(r.map((function(e){return[e,!0]}))),s=this.gridColumns.filter((function(e){return!a.has(e)})),l=r.slice();s.forEach((function(e){var t=e.getOriginalParent();if(t){for(var n=[];!n.length&&t;){t.getLeafColumns().forEach((function(e){var t=l.indexOf(e)>=0,i=n.indexOf(e)<0;t&&i&&n.push(e)})),t=t.getOriginalParent()}if(n.length){var i=n.map((function(e){return l.indexOf(e)})),r=Math.max.apply(Math,(0,o.Z)(i));er(l,e,r+1)}else l.push(e)}else l.push(e)})),this.gridColumns=l}}}},{key:"isPrimaryColumnGroupsPresent",value:function(){return this.primaryHeaderRowCount>1}},{key:"refreshQuickFilterColumns",value:function(){var e,t=null!=(e=this.isPivotMode()?this.secondaryColumns:this.primaryColumns)?e:[];this.groupAutoColumns&&(t=t.concat(this.groupAutoColumns)),this.columnsForQuickFilter=this.gridOptionsService.get("includeHiddenColumnsInQuickFilter")?t:t.filter((function(e){return e.isVisible()||e.isRowGroupActive()}))}},{key:"placeLockedColumns",value:function(e){var t=[],n=[],i=[];return e.forEach((function(e){var r=e.getColDef().lockPosition;"right"===r?i.push(e):"left"===r||!0===r?t.push(e):n.push(e)})),[].concat(t,n,i)}},{key:"addAutoGroupToGridColumns",value:function(){if(_n(this.groupAutoColumns))return this.destroyOldColumns(this.groupAutoColsBalancedTree),void(this.groupAutoColsBalancedTree=null);this.gridColumns=this.groupAutoColumns?this.groupAutoColumns.concat(this.gridColumns):this.gridColumns;var e=this.columnFactory.createForAutoGroups(this.groupAutoColumns,this.gridBalancedTree);this.destroyOldColumns(this.groupAutoColsBalancedTree,e),this.groupAutoColsBalancedTree=e,this.gridBalancedTree=e.concat(this.gridBalancedTree)}},{key:"clearDisplayedAndViewportColumns",value:function(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.ariaOrderColumns=[],this.viewportColumns=[],this.headerViewportColumns=[],this.viewportColumnsHash=""}},{key:"updateGroupsAndDisplayedColumns",value:function(e){this.updateOpenClosedVisibilityInColumnGroups(),this.deriveDisplayedColumns(e),this.refreshFlexedColumns(),this.extractViewport(),this.updateBodyWidths();var t={type:Er.EVENT_DISPLAYED_COLUMNS_CHANGED};this.eventService.dispatchEvent(t)}},{key:"deriveDisplayedColumns",value:function(e){this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft,this.displayedColumnsLeft),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre,this.displayedColumnsCenter),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight,this.displayedColumnsRight),this.joinColumnsAriaOrder(),this.joinDisplayedColumns(),this.setLeftValues(e),this.displayedAutoHeightCols=this.displayedColumns.filter((function(e){return e.isAutoHeight()}))}},{key:"isAutoRowHeightActive",value:function(){return this.autoHeightActive}},{key:"wasAutoRowHeightEverActive",value:function(){return this.autoHeightActiveAtLeastOnce}},{key:"joinColumnsAriaOrder",value:function(){var e,t=this.getAllGridColumns(),n=[],i=[],r=[],o=(0,g.Z)(t);try{for(o.s();!(e=o.n()).done;){var a=e.value,s=a.getPinned();s?!0===s||"left"===s?n.push(a):r.push(a):i.push(a)}}catch(l){o.e(l)}finally{o.f()}this.ariaOrderColumns=n.concat(i).concat(r)}},{key:"joinDisplayedColumns",value:function(){this.gridOptionsService.get("enableRtl")?this.displayedColumns=this.displayedColumnsRight.concat(this.displayedColumnsCenter).concat(this.displayedColumnsLeft):this.displayedColumns=this.displayedColumnsLeft.concat(this.displayedColumnsCenter).concat(this.displayedColumnsRight)}},{key:"setLeftValues",value:function(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups()}},{key:"setLeftValuesOfColumns",value:function(e){var t=this;if(this.primaryColumns){var n=this.getPrimaryAndSecondaryAndAutoColumns().slice(0),i=this.gridOptionsService.get("enableRtl");[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach((function(r){if(i){var o=t.getWidthOfColsInList(r);r.forEach((function(t){o-=t.getActualWidth(),t.setLeft(o,e)}))}else{var a=0;r.forEach((function(t){t.setLeft(a,e),a+=t.getActualWidth()}))}Ji(n,r)})),n.forEach((function(t){t.setLeft(null,e)}))}}},{key:"setLeftValuesOfGroups",value:function(){[this.displayedTreeLeft,this.displayedTreeRight,this.displayedTreeCentre].forEach((function(e){e.forEach((function(e){e instanceof br&&e.checkLeft()}))}))}},{key:"derivedDisplayedColumnsFromDisplayedTree",value:function(e,t){t.length=0,this.columnUtils.depthFirstDisplayedColumnTreeSearch(e,(function(e){e instanceof Gi&&t.push(e)}))}},{key:"isColumnVirtualisationSuppressed",value:function(){return this.suppressColumnVirtualisation||0===this.viewportRight}},{key:"extractViewportColumns",value:function(){this.isColumnVirtualisationSuppressed()?(this.viewportColumnsCenter=this.displayedColumnsCenter,this.headerViewportColumnsCenter=this.displayedColumnsCenter):(this.viewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInRowViewport.bind(this)),this.headerViewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInHeaderViewport.bind(this))),this.viewportColumns=this.viewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight),this.headerViewportColumns=this.headerViewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight)}},{key:"getVirtualHeaderGroupRow",value:function(e,t){var n;switch(e){case"left":n=this.viewportRowLeft[t];break;case"right":n=this.viewportRowRight[t];break;default:n=this.viewportRowCenter[t]}return _n(n)&&(n=[]),n}},{key:"calculateHeaderRows",value:function(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={};var e={};this.headerViewportColumns.forEach((function(t){return e[t.getId()]=!0}));var t=function t(n,i,r){for(var o=!1,a=0;a<n.length;a++){var s=n[a],l=!1;if(s instanceof Gi)l=!0===e[s.getId()];else{var u=s.getDisplayedChildren();u&&(l=t(u,i,r+1))}l&&(o=!0,i[r]||(i[r]=[]),i[r].push(s))}return o};t(this.displayedTreeLeft,this.viewportRowLeft,0),t(this.displayedTreeRight,this.viewportRowRight,0),t(this.displayedTreeCentre,this.viewportRowCenter,0)}},{key:"extractViewport",value:function(){this.extractViewportColumns();var e=this.viewportColumns.map((function(e){return"".concat(e.getId(),"-").concat(e.getPinned()||"normal")})).join("#"),t=this.viewportColumnsHash!==e;return t&&(this.viewportColumnsHash=e,this.calculateHeaderRows()),t}},{key:"refreshFlexedColumns",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.source?t.source:"flex";if(null!=t.viewportWidth&&(this.flexViewportWidth=t.viewportWidth),!this.flexViewportWidth)return[];var i=-1;if(t.resizingCols)for(var r=new Set(t.resizingCols),o=this.displayedColumnsCenter,a=o.length-1;a>=0;a--)if(r.has(o[a])){i=a;break}for(var s=0,l=[],u=0,c=0,d=0;d<this.displayedColumnsCenter.length;d++){var h=this.displayedColumnsCenter[d].getFlex()&&d>i;h?(l.push(this.displayedColumnsCenter[d]),c+=this.displayedColumnsCenter[d].getFlex(),u+=null!=(e=this.displayedColumnsCenter[d].getMinWidth())?e:0):s+=this.displayedColumnsCenter[d].getActualWidth()}if(!l.length)return[];var p=[];s+u>this.flexViewportWidth&&(l.forEach((function(e){var t;return e.setActualWidth(null!=(t=e.getMinWidth())?t:0,n)})),p=l,l=[]);var f,v=[];e:for(;;){for(var g=(f=this.flexViewportWidth-s)/c,m=0;m<l.length;m++){var y=l[m],C=g*y.getFlex(),k=0,w=y.getMinWidth(),S=y.getMaxWidth();if(Fn(w)&&C<w?k=w:Fn(S)&&C>S&&(k=S),k){y.setActualWidth(k,n),qi(l,y),c-=y.getFlex(),p.push(y),s+=y.getActualWidth();continue e}v[m]=Math.round(C)}break}var b=f;return l.forEach((function(e,t){e.setActualWidth(Math.min(v[t],b),n),p.push(e),b-=v[t]})),t.skipSetLeft||this.setLeftValues(n),t.updateBodyWidths&&this.updateBodyWidths(),t.fireResizedEvent&&this.dispatchColumnResizedEvent(p,!0,n,l),l}},{key:"sizeColumnsToFit",value:function(e){var t,n,i,r,o,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"sizeColumnsToFit",l=arguments.length>2?arguments[2]:void 0,u=arguments.length>3?arguments[3]:void 0;if(this.shouldQueueResizeOperations)this.resizeOperationQueue.push((function(){return a.sizeColumnsToFit(e,s,l,u)}));else{var c={};u&&(null==(t=null==u?void 0:u.columnLimits)||t.forEach((function(e){var t=e,n=t.key,i=Pn(t,["key"]);c["string"===typeof n?n:n.getColId()]=i})));var d=this.getAllDisplayedColumns(),h=e===this.getWidthOfColsInList(d);if(!(e<=0||!d.length||h)){var p=[],f=[];d.forEach((function(e){!0===e.getColDef().suppressSizeToFit?f.push(e):p.push(e)}));var v=p.slice(0),g=!1,m=function(e){Qi(p,e),f.push(e)};for(p.forEach((function(e){var t,n;e.resetActualWidth(s);var i=null==c?void 0:c[e.getId()],r=null!=(t=null==i?void 0:i.minWidth)?t:null==u?void 0:u.defaultMinWidth,o=null!=(n=null==i?void 0:i.maxWidth)?n:null==u?void 0:u.defaultMaxWidth,a=e.getActualWidth();"number"===typeof r&&a<r?e.setActualWidth(r,s,!0):"number"===typeof o&&a>o&&e.setActualWidth(o,s,!0)}));!g;){g=!0;var y=e-this.getWidthOfColsInList(f);if(y<=0)p.forEach((function(e){var t,n,i=null!=(n=null==(t=null==c?void 0:c[e.getId()])?void 0:t.minWidth)?n:null==u?void 0:u.defaultMinWidth;"number"!==typeof i?e.setMinimum(s):e.setActualWidth(i,s,!0)}));else for(var C=y/this.getWidthOfColsInList(p),k=y,w=p.length-1;w>=0;w--){var S=p[w],b=null==c?void 0:c[S.getId()],E=null!=(n=null==b?void 0:b.minWidth)?n:null==u?void 0:u.defaultMinWidth,x=null!=(i=null==b?void 0:b.maxWidth)?i:null==u?void 0:u.defaultMaxWidth,R=null!=(r=S.getMinWidth())?r:0,D=null!=(o=S.getMaxWidth())?o:Number.MAX_VALUE,T="number"===typeof E&&E>R?E:S.getMinWidth(),O="number"===typeof x&&x<D?x:S.getMaxWidth(),P=Math.round(S.getActualWidth()*C);Fn(T)&&P<T?(P=T,m(S),g=!1):Fn(O)&&P>O?(P=O,m(S),g=!1):0===w&&(P=k),S.setActualWidth(P,s,!0),k-=P}}v.forEach((function(e){e.fireColumnWidthChangedEvent(s)})),this.setLeftValues(s),this.updateBodyWidths(),l||this.dispatchColumnResizedEvent(v,!0,s)}}}},{key:"buildDisplayedTrees",value:function(e){var t=[],n=[],i=[];e.forEach((function(e){switch(e.getPinned()){case"left":t.push(e);break;case"right":n.push(e);break;default:i.push(e)}}));var r=new Rr;this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(t,r,"left",this.displayedTreeLeft),this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(n,r,"right",this.displayedTreeRight),this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(i,r,null,this.displayedTreeCentre),this.updateDisplayedMap()}},{key:"updateDisplayedMap",value:function(){var e=this;this.displayedColumnsAndGroupsMap={};var t=function(t){e.displayedColumnsAndGroupsMap[t.getUniqueId()]=t};this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeCentre,t),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeLeft,t),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeRight,t)}},{key:"isDisplayed",value:function(e){return this.displayedColumnsAndGroupsMap[e.getUniqueId()]===e}},{key:"updateOpenClosedVisibilityInColumnGroups",value:function(){var e=this.getAllDisplayedTrees();this.columnUtils.depthFirstAllColumnTreeSearch(e,(function(e){e instanceof br&&e.calculateDisplayedColumns()}))}},{key:"getGroupAutoColumns",value:function(){return this.groupAutoColumns}},{key:"createGroupAutoColumnsIfNeeded",value:function(){var e=this.forceRecreateAutoGroups;if(this.forceRecreateAutoGroups=!1,!this.autoGroupsNeedBuilding)return!1;this.autoGroupsNeedBuilding=!1;var t=this.gridOptionsService.isGroupUseEntireRow(this.pivotMode),n=this.pivotMode?this.gridOptionsService.get("pivotSuppressAutoColumn"):this.isGroupSuppressAutoColumn();if((this.rowGroupColumns.length>0||this.gridOptionsService.get("treeData"))&&!n&&!t){var i=this.autoGroupColService.createAutoGroupColumns(this.rowGroupColumns);if(!this.autoColsEqual(i,this.groupAutoColumns)||e)return this.groupAutoColumns=i,!0}else this.groupAutoColumns=null;return!1}},{key:"isGroupSuppressAutoColumn",value:function(){return"custom"===this.gridOptionsService.get("groupDisplayType")||"custom"===this.gridOptionsService.get("treeDataDisplayType")}},{key:"autoColsEqual",value:function(e,t){return ji(e,t,(function(e,t){return e.getColId()===t.getColId()}))}},{key:"getWidthOfColsInList",value:function(e){return e.reduce((function(e,t){return e+t.getActualWidth()}),0)}},{key:"getFirstDisplayedColumn",value:function(){var e=this.gridOptionsService.get("enableRtl"),t=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];e&&t.reverse();for(var n=0;n<t.length;n++){var i=this[t[n]]();if(i.length)return e?Ui(i):i[0]}return null}},{key:"setColumnHeaderHeight",value:function(e,t){if(e.setAutoHeaderHeight(t)){var n={type:Er.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,column:e,columns:[e],source:"autosizeColumnHeaderHeight"};this.eventService.dispatchEvent(n)}}},{key:"getColumnGroupHeaderRowHeight",value:function(){return this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight()}},{key:"getColumnHeaderRowHeight",value:function(){var e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),t=this.getAllDisplayedColumns().filter((function(e){return e.isAutoHeaderHeight()})).map((function(e){return e.getAutoHeaderHeight()||0}));return Math.max.apply(Math,[e].concat((0,o.Z)(t)))}},{key:"getHeaderHeight",value:function(){var e;return null!=(e=this.gridOptionsService.get("headerHeight"))?e:this.environment.getFromTheme(25,"headerHeight")}},{key:"getFloatingFiltersHeight",value:function(){var e;return null!=(e=this.gridOptionsService.get("floatingFiltersHeight"))?e:this.getHeaderHeight()}},{key:"getGroupHeaderHeight",value:function(){var e;return null!=(e=this.gridOptionsService.get("groupHeaderHeight"))?e:this.getHeaderHeight()}},{key:"getPivotHeaderHeight",value:function(){var e;return null!=(e=this.gridOptionsService.get("pivotHeaderHeight"))?e:this.getHeaderHeight()}},{key:"getPivotGroupHeaderHeight",value:function(){var e;return null!=(e=this.gridOptionsService.get("pivotGroupHeaderHeight"))?e:this.getGroupHeaderHeight()}},{key:"queueResizeOperations",value:function(){this.shouldQueueResizeOperations=!0}},{key:"processResizeOperations",value:function(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach((function(e){return e()})),this.resizeOperationQueue=[]}},{key:"resetColumnDefIntoColumn",value:function(e,t){var n=e.getUserProvidedColDef();if(!n)return!1;var i=this.columnFactory.addColumnDefaultAndTypes(n,e.getColId());return e.setColDef(i,n,t),!0}},{key:"isColumnGroupingLocked",value:function(e){var t=this.gridOptionsService.get("groupLockGroupColumns");return!(!e.isRowGroupActive()||0===t)&&(-1===t||t>this.rowGroupColumns.findIndex((function(t){return t.getColId()===e.getColId()})))}},{key:"generateColumnStateForRowGroupAndPivotIndexes",value:function(e,t){var n=this,i={},r=function(e,t,r,o,a,s){if(!t.length||!n.primaryColumns)return[];for(var l=Object.keys(e),u=new Set(l),c=new Set(l),d=new Set(t.map((function(e){var t=e.getColId();return c.delete(t),t})).concat(l)),h=[],p={},f=0,v=0;v<n.primaryColumns.length;v++){var g=n.primaryColumns[v].getColId();d.has(g)&&(h.push(g),p[g]=f++)}var m=1e3,y=!1,C=0,k=function(t){for(var n=p[t],i=C;i<n;i++){var r=h[i];c.has(r)&&(e[r][a]=m++,c.delete(r))}C=n};t.forEach((function(t){var n=t.getColId();if(u.has(n))k(n),e[n][a]=m++;else{var l=t.getColDef();if(null===l[a]||void 0===l[a]&&null==l[s]){if(!y)l[r]||void 0===l[r]&&l[o]?k(n):(c.forEach((function(t){e[t][a]=m+p[t]})),m+=h.length,y=!0);i[n]||(i[n]={colId:n}),i[n][a]=m++}}}))};return r(e,this.rowGroupColumns,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),r(t,this.pivotColumns,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i)}},{key:"onColumnsReady",value:function(){var e=this,t=this.gridOptionsService.get("autoSizeStrategy");if(t){var n=t.type;setTimeout((function(){if("fitGridWidth"===n){var i=t.columnLimits,r=t.defaultMinWidth,o=t.defaultMaxWidth,a=null==i?void 0:i.map((function(e){return{key:e.colId,minWidth:e.minWidth,maxWidth:e.maxWidth}}));e.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:r,defaultMaxWidth:o,columnLimits:a})}else"fitProvidedWidth"===n&&e.sizeColumnsToFit(t.width,"sizeColumnsToFit")}))}}},{key:"onFirstDataRendered",value:function(){var e=this,t=this.gridOptionsService.get("autoSizeStrategy");if("fitCellContents"===(null==t?void 0:t.type)){var n=t.colIds,i=t.skipHeader;setTimeout((function(){n?e.autoSizeColumns({columns:n,skipHeader:i,source:"autosizeColumns"}):e.autoSizeAllColumns("autosizeColumns",i)}))}}}]),n}(kr);function Br(e){return"gridOptionsUpdated"===e?"gridOptionsChanged":e}Mn([Di("expressionService")],Hr.prototype,"expressionService",2),Mn([Di("columnFactory")],Hr.prototype,"columnFactory",2),Mn([Di("displayedGroupCreator")],Hr.prototype,"displayedGroupCreator",2),Mn([Di("ctrlsService")],Hr.prototype,"ctrlsService",2),Mn([Di("autoWidthCalculator")],Hr.prototype,"autoWidthCalculator",2),Mn([Di("columnUtils")],Hr.prototype,"columnUtils",2),Mn([Di("columnAnimationService")],Hr.prototype,"columnAnimationService",2),Mn([Di("autoGroupColService")],Hr.prototype,"autoGroupColService",2),Mn([Ti("aggFuncService")],Hr.prototype,"aggFuncService",2),Mn([Ti("valueCache")],Hr.prototype,"valueCache",2),Mn([Ti("animationFrameService")],Hr.prototype,"animationFrameService",2),Mn([Di("sortController")],Hr.prototype,"sortController",2),Mn([Di("columnDefFactory")],Hr.prototype,"columnDefFactory",2),Mn([Ei],Hr.prototype,"init",1),Mn([xi],Hr.prototype,"destroyColumns",1),Mn([Nn(0,Pi("loggerFactory"))],Hr.prototype,"setBeans",1),Hr=Mn([Ri("columnModel")],Hr);var Wr=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"calculateColMinWidth",value:function(e){return null!=e.minWidth?e.minWidth:this.environment.getMinColWidth()}},{key:"calculateColMaxWidth",value:function(e){return null!=e.maxWidth?e.maxWidth:Number.MAX_SAFE_INTEGER}},{key:"calculateColInitialWidth",value:function(e){var t,n=this.calculateColMinWidth(e),i=this.calculateColMaxWidth(e),r=Vn(e.width),o=Vn(e.initialWidth);return t=null!=r?r:null!=o?o:200,Math.max(Math.min(t,i),n)}},{key:"getOriginalPathForColumn",value:function(e,t){var n=[],i=!1;return function t(r,o){for(var a=0;a<r.length;a++){if(i)return;var s=r[a];if(s instanceof Vi)t(s.getChildren(),o+1),n[o]=s;else s===e&&(i=!0)}}(t,0),i?n:null}},{key:"depthFirstOriginalTreeSearch",value:function(e,t,n){var i=this;t&&t.forEach((function(t){t instanceof Vi&&i.depthFirstOriginalTreeSearch(t,t.getChildren(),n),n(t,e)}))}},{key:"depthFirstAllColumnTreeSearch",value:function(e,t){var n=this;e&&e.forEach((function(e){e instanceof br&&n.depthFirstAllColumnTreeSearch(e.getChildren(),t),t(e)}))}},{key:"depthFirstDisplayedColumnTreeSearch",value:function(e,t){var n=this;e&&e.forEach((function(e){e instanceof br&&n.depthFirstDisplayedColumnTreeSearch(e.getDisplayedChildren(),t),t(e)}))}}]),n}(kr);Wr=Mn([Ri("columnUtils")],Wr);var zr=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"createDisplayedGroups",value:function(e,t,n,i){for(var r=this,o=this.mapOldGroupsById(i),a=[],s=e,l=function(){var e=s;s=[];for(var i=0,l=function(l){var u=i;i=l;var c=e[u],d=(c instanceof br?c.getProvidedColumnGroup():c).getOriginalParent();if(null!=d){for(var h=r.createColumnGroup(d,t,o,n),p=u;p<l;p++)h.addChild(e[p]);s.push(h)}else for(var f=u;f<l;f++)a.push(e[f])},u=1;u<e.length;u++){var c=e[u],d=(c instanceof br?c.getProvidedColumnGroup():c).getOriginalParent(),h=e[i];d!==(h instanceof br?h.getProvidedColumnGroup():h).getOriginalParent()&&l(u)}i<e.length&&l(e.length)};s.length;)l();return this.setupParentsIntoColumns(a,null),a}},{key:"createColumnGroup",value:function(e,t,n,i){var r=e.getGroupId(),o=t.getInstanceIdForKey(r),a=n[br.createUniqueId(r,o)];return a&&a.getProvidedColumnGroup()!==e&&(a=null),Fn(a)?a.reset():(a=new br(e,r,o,i),this.context.createBean(a)),a}},{key:"mapOldGroupsById",value:function(e){var t={};return e&&function e(n){n.forEach((function(n){if(n instanceof br){var i=n;t[n.getUniqueId()]=i,e(i.getChildren())}}))}(e),t}},{key:"setupParentsIntoColumns",value:function(e,t){var n=this;e.forEach((function(e){if(e.setParent(t),e instanceof br){var i=e;n.setupParentsIntoColumns(i.getChildren(),i)}}))}}]),n}(kr);zr=Mn([Ri("displayedGroupCreator")],zr);var Ur={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,excludeHiddenColumnsFromQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,enableChartToolPanelsButton:!0,suppressChartToolPanelsButton:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressParentsInRowNodes:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,suppressAggAtRootLevel:!0,removePivotHeaderRowWhenSingleValueColumn:!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,functionsPassive:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0},jr=(0,s.Z)((function e(){(0,a.Z)(this,e)}));jr.STRING_PROPERTIES=["rowSelection","overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode"],jr.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy"],jr.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],jr.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"],jr.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","suppressParentsInRowNodes","suppressColumnMoveAnimation","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressAggAtRootLevel","suppressFocusAfterRefresh","functionsPassive","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","excludeHiddenColumnsFromQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterMovesDown","enterMovesDownAfterEdit","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","enableChartToolPanelsButton","suppressChartToolPanelsButton","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideFilterAllLevels","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","maintainColumnOrder","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents"],jr.FUNCTIONAL_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher"],jr.CALLBACK_PROPERTIES=["getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","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"],jr.FUNCTION_PROPERTIES=[].concat((0,o.Z)(jr.FUNCTIONAL_PROPERTIES),(0,o.Z)(jr.CALLBACK_PROPERTIES)),jr.ALL_PROPERTIES=[].concat((0,o.Z)(jr.ARRAY_PROPERTIES),(0,o.Z)(jr.OBJECT_PROPERTIES),(0,o.Z)(jr.STRING_PROPERTIES),(0,o.Z)(jr.NUMBER_PROPERTIES),(0,o.Z)(jr.FUNCTION_PROPERTIES),(0,o.Z)(jr.BOOLEAN_PROPERTIES));var Kr=jr,Yr=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,null,[{key:"getCallbackForEvent",value:function(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}},{key:"getGridOptionKeys",value:function(){return this.ALL_PROPERTIES_AND_CALLBACKS}},{key:"combineAttributesAndGridOptions",value:function(t,n){"object"!==typeof t&&(t={});var i=Tn({},t);return e.getGridOptionKeys().forEach((function(t){var r=n[t];"undefined"!==typeof r&&r!==e.VUE_OMITTED_PROPERTY&&(i[t]=r)})),i}},{key:"processOnChange",value:function(t,n){if(t){var i={},r=!1;if(Object.keys(t).filter((function(t){return e.ALL_PROPERTIES_AND_CALLBACKS_SET.has(t)})).forEach((function(e){i[e]=t[e],r=!0})),r){n.__internalUpdateGridOptions(i);var o={type:Er.EVENT_COMPONENT_STATE_CHANGED};Yn(i,(function(e,t){o[e]=t})),n.dispatchEvent(o)}}}}]),e}();Yr.EVENTS=Un(Er),Yr.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY",Yr.EXCLUDED_INTERNAL_EVENTS=[Er.EVENT_SCROLLBAR_WIDTH_CHANGED,Er.EVENT_CHECKBOX_CHANGED,Er.EVENT_HEIGHT_SCALE_CHANGED,Er.EVENT_BODY_HEIGHT_CHANGED,Er.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED,Er.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,Er.EVENT_SCROLL_VISIBILITY_CHANGED,Er.EVENT_COLUMN_HOVER_CHANGED,Er.EVENT_FLASH_CELLS,Er.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,Er.EVENT_DISPLAYED_ROWS_CHANGED,Er.EVENT_LEFT_PINNED_WIDTH_CHANGED,Er.EVENT_RIGHT_PINNED_WIDTH_CHANGED,Er.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,Er.EVENT_STORE_UPDATED,Er.EVENT_COLUMN_PANEL_ITEM_DRAG_START,Er.EVENT_COLUMN_PANEL_ITEM_DRAG_END,Er.EVENT_FILL_START,Er.EVENT_FILL_END,Er.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,Er.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,Er.EVENT_FULL_WIDTH_ROW_FOCUSED,Er.EVENT_HEADER_HEIGHT_CHANGED,Er.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,Er.EVENT_CELL_FOCUS_CLEARED,Er.EVENT_GRID_STYLES_CHANGED,Er.EVENT_FILTER_DESTROYED,Er.EVENT_ROW_DATA_UPDATE_STARTED,Er.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,Er.EVENT_DATA_TYPES_INFERRED,Er.EVENT_FIELD_VALUE_CHANGED,Er.EVENT_FIELD_PICKER_VALUE_SELECTED,Er.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,Er.EVENT_SUPPRESS_MENU_HIDE_CHANGED,Er.EVENT_SUPPRESS_FIELD_DOT_NOTATION,Er.EVENT_ROW_COUNT_READY,Er.EVENT_SIDE_BAR_UPDATED],Yr.PUBLIC_EVENTS=Yr.EVENTS.filter((function(e){return!ir(Yr.EXCLUDED_INTERNAL_EVENTS,e)})),Yr.EVENT_CALLBACKS=Yr.EVENTS.map((function(e){return Yr.getCallbackForEvent(e)})),Yr.STRING_PROPERTIES=Kr.STRING_PROPERTIES,Yr.OBJECT_PROPERTIES=Kr.OBJECT_PROPERTIES,Yr.ARRAY_PROPERTIES=Kr.ARRAY_PROPERTIES,Yr.NUMBER_PROPERTIES=Kr.NUMBER_PROPERTIES,Yr.BOOLEAN_PROPERTIES=Kr.BOOLEAN_PROPERTIES,Yr.FUNCTION_PROPERTIES=Kr.FUNCTION_PROPERTIES,Yr.ALL_PROPERTIES=Kr.ALL_PROPERTIES,Yr.ALL_PROPERTIES_AND_CALLBACKS=[].concat((0,o.Z)(Yr.ALL_PROPERTIES),(0,o.Z)(Yr.EVENT_CALLBACKS)),Yr.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(Yr.ALL_PROPERTIES_AND_CALLBACKS);var Xr=Yr,qr=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).componentsMappedByName={},e}return(0,s.Z)(n,[{key:"setupComponents",value:function(e){var t=this;e&&e.forEach((function(e){return t.addComponent(e)}))}},{key:"addComponent",value:function(e){var t=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().toUpperCase();this.componentsMappedByName[t]=e.componentClass}},{key:"getComponentClass",value:function(e){return this.componentsMappedByName[e]}}]),n}(kr);qr=Mn([Ri("agStackComponentsRegistry")],qr);var Qr={};function Jr(e,t,n){null==n||"string"===typeof n&&""==n?eo(e,t):$r(e,t,n)}function $r(e,t,n){e.setAttribute(to(t),n.toString())}function eo(e,t){e.removeAttribute(to(t))}function to(e){return"aria-".concat(e)}function no(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function io(e){return"asc"===e?"ascending":"desc"===e?"descending":"mixed"===e?"other":"none"}function ro(e){return parseInt(e.getAttribute("aria-level"),10)}function oo(e){return parseInt(e.getAttribute("aria-posinset"),10)}function ao(e){return e.getAttribute("aria-label")}function so(e,t){Jr(e,"label",t)}function lo(e,t){Jr(e,"labelledby",t)}function uo(e,t){Jr(e,"describedby",t)}function co(e,t){Jr(e,"live",t)}function ho(e,t){Jr(e,"atomic",t)}function po(e,t){Jr(e,"relevant",t)}function fo(e,t){Jr(e,"level",t)}function vo(e,t){Jr(e,"disabled",t)}function go(e,t){Jr(e,"hidden",t)}function mo(e,t){Jr(e,"activedescendant",t)}function yo(e,t){$r(e,"expanded",t)}function Co(e){eo(e,"expanded")}function ko(e,t){$r(e,"setsize",t)}function wo(e,t){$r(e,"posinset",t)}function So(e,t){$r(e,"multiselectable",t)}function bo(e,t){$r(e,"rowcount",t)}function Eo(e,t){$r(e,"rowindex",t)}function xo(e,t){$r(e,"colcount",t)}function Ro(e,t){$r(e,"colindex",t)}function Do(e,t){$r(e,"colspan",t)}function To(e,t){$r(e,"sort",t)}function Oo(e){eo(e,"sort")}function Po(e,t){Jr(e,"selected",t)}function Ao(e,t){$r(e,"checked",void 0===t?"mixed":t)}function Mo(e,t){Jr(e,"controls",t.id),lo(t,e.id)}function No(e,t){return void 0===t?e("ariaIndeterminate","indeterminate"):!0===t?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}An(Qr,{getAriaCheckboxStateName:function(){return No},getAriaLabel:function(){return ao},getAriaLevel:function(){return ro},getAriaPosInSet:function(){return oo},getAriaSortState:function(){return io},removeAriaExpanded:function(){return Co},removeAriaSort:function(){return Oo},setAriaActiveDescendant:function(){return mo},setAriaAtomic:function(){return ho},setAriaChecked:function(){return Ao},setAriaColCount:function(){return xo},setAriaColIndex:function(){return Ro},setAriaColSpan:function(){return Do},setAriaControls:function(){return Mo},setAriaDescribedBy:function(){return uo},setAriaDisabled:function(){return vo},setAriaExpanded:function(){return yo},setAriaHidden:function(){return go},setAriaLabel:function(){return so},setAriaLabelledBy:function(){return lo},setAriaLevel:function(){return fo},setAriaLive:function(){return co},setAriaMultiSelectable:function(){return So},setAriaPosInSet:function(){return wo},setAriaRelevant:function(){return po},setAriaRole:function(){return no},setAriaRowCount:function(){return bo},setAriaRowIndex:function(){return Eo},setAriaSelected:function(){return Po},setAriaSetSize:function(){return ko},setAriaSort:function(){return To}});var Lo,Io,Fo,_o,Go,Zo,Vo,Ho,Bo={};function Wo(){return void 0===Lo&&(Lo=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Lo}function zo(){if(void 0===Io)if(Wo()){var e=navigator.userAgent.match(/version\/(\d+)/i);e&&(Io=null!=e[1]?parseFloat(e[1]):0)}else Io=0;return Io}function Uo(){if(void 0===Fo){var e=window;Fo=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return Fo}function jo(){return void 0===_o&&(_o=/(firefox)/i.test(navigator.userAgent)),_o}function Ko(){return void 0===Go&&(Go=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Go}function Yo(){return void 0===Zo&&(Zo=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),Zo}function Xo(){return!Wo()||zo()>=15}function qo(e){if(!e)return null;var t=e.tabIndex,n=e.getAttribute("tabIndex");return-1!==t||null!==n&&(""!==n||jo())?t.toString():null}function Qo(){if(!document.body)return-1;var e=1e6,t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,n=document.createElement("div");for(document.body.appendChild(n);;){var i=2*e;if(n.style.height=i+"px",i>t||n.clientHeight!==i)break;e=i}return document.body.removeChild(n),e}function Jo(){var e,t,n;return null!=(n=null==(e=document.body)?void 0:e.clientWidth)?n:window.innerHeight||(null==(t=document.documentElement)?void 0:t.clientWidth)||-1}function $o(){var e,t,n;return null!=(n=null==(e=document.body)?void 0:e.clientHeight)?n:window.innerHeight||(null==(t=document.documentElement)?void 0:t.clientHeight)||-1}function ea(){return null==Ho&&ta(),Ho}function ta(){var 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);var n=t.offsetWidth-t.clientWidth;0===n&&0===t.clientWidth&&(n=null),t.parentNode&&t.parentNode.removeChild(t),null!=n&&(Ho=n,Vo=0===n)}function na(){return null==Vo&&ta(),Vo}An(Bo,{browserSupportsPreventScroll:function(){return Xo},getBodyHeight:function(){return $o},getBodyWidth:function(){return Jo},getMaxDivHeight:function(){return Qo},getSafariVersion:function(){return zo},getScrollbarWidth:function(){return ea},getTabIndex:function(){return qo},isBrowserChrome:function(){return Uo},isBrowserFirefox:function(){return jo},isBrowserSafari:function(){return Wo},isIOSUserAgent:function(){return Yo},isInvisibleScrollbar:function(){return na},isMacOsUserAgent:function(){return Ko}});var ia={};An(ia,{dateToFormattedString:function(){return fa},parseDateTimeFromString:function(){return va},serialiseDate:function(){return ha}});var ra={};function oa(e,t){return e.toString().padStart(t,"0")}function aa(e,t){for(var n=[],i=e;i<=t;i++)n.push(i);return n}function sa(e){return"string"===typeof e&&(e=parseInt(e,10)),"number"===typeof e?Math.floor(e):null}function la(e,t){for(var n="",i=0;i<t;i++)n+=String.fromCharCode(255&e),e>>>=8;return n}function ua(e,t,n){return"number"!==typeof e?"":ca(Math.round(100*e)/100,t,n)}function ca(e,t,n){return"number"!==typeof e?"":e.toString().replace(".",n).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1".concat(t))}function da(e){return null==e?null:e.reduce((function(e,t){return e+t}),0)}function ha(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-";if(!e)return null;var i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map((function(e){return oa(e,2)})).join(n);return t&&(i+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map((function(e){return oa(e,2)})).join(":")),i}An(ra,{cleanNumber:function(){return sa},createArrayOfNumbers:function(){return aa},decToHex:function(){return la},formatNumberCommas:function(){return ca},formatNumberTwoDecimalPlacesAndCommas:function(){return ua},padStartWidthZeros:function(){return oa},sum:function(){return da}});var pa=function(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 fa(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD",n=oa(e.getFullYear(),4),i=["January","February","March","April","May","June","July","August","September","October","November","December"],r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o={YYYY:function(){return n.slice(n.length-4,n.length)},YY:function(){return n.slice(n.length-2,n.length)},Y:function(){return"".concat(e.getFullYear())},MMMM:function(){return i[e.getMonth()]},MMM:function(){return i[e.getMonth()].slice(0,3)},MM:function(){return oa(e.getMonth()+1,2)},Mo:function(){return"".concat(e.getMonth()+1).concat(pa(e.getMonth()+1))},M:function(){return"".concat(e.getMonth()+1)},Do:function(){return"".concat(e.getDate()).concat(pa(e.getDate()))},DD:function(){return oa(e.getDate(),2)},D:function(){return"".concat(e.getDate())},dddd:function(){return r[e.getDay()]},ddd:function(){return r[e.getDay()].slice(0,3)},dd:function(){return r[e.getDay()].slice(0,2)},do:function(){return"".concat(e.getDay()).concat(pa(e.getDay()))},d:function(){return"".concat(e.getDay())}},a=new RegExp(Object.keys(o).join("|"),"g");return t.replace(a,(function(e){return e in o?o[e]():e}))}function va(e){if(!e)return null;var t=e.split(" "),n=(0,r.Z)(t,2),i=n[0],o=n[1];if(!i)return null;var a=i.split("-").map((function(e){return parseInt(e,10)}));if(3!==a.filter((function(e){return!isNaN(e)})).length)return null;var s=(0,r.Z)(a,3),l=s[0],u=s[1],c=s[2],d=new Date(l,u-1,c);if(d.getFullYear()!==l||d.getMonth()!==u-1||d.getDate()!==c)return null;if(!o||"00:00:00"===o)return d;var h=o.split(":").map((function(e){return parseInt(e,10)})),p=(0,r.Z)(h,3),f=p[0],v=p[1],g=p[2];return f>=0&&f<24&&d.setHours(f),v>=0&&v<60&&d.setMinutes(v),g>=0&&g<60&&d.setSeconds(g),d}var ga,ma={};function ya(e,t,n){for(var i=e.parentElement,r=i&&i.firstChild;r;)t&&r.classList.toggle(t,r===e),n&&r.classList.toggle(n,r!==e),r=r.nextSibling}An(ma,{FOCUSABLE_EXCLUDE:function(){return ka},FOCUSABLE_SELECTOR:function(){return Ca},addOrRemoveAttribute:function(){return es},addStylesToElement:function(){return Wa},bindCellRendererToHtmlElement:function(){return ns},clearElement:function(){return Ia},copyNodeList:function(){return Ja},ensureDomOrder:function(){return Va},formatSize:function(){return qa},getAbsoluteHeight:function(){return Oa},getAbsoluteWidth:function(){return Pa},getElementRectWithOffset:function(){return Aa},getElementSize:function(){return Ra},getInnerHeight:function(){return Da},getInnerWidth:function(){return Ta},getScrollLeft:function(){return Na},insertWithDomOrder:function(){return Ba},isElementChildOfClass:function(){return xa},isFocusableFormField:function(){return wa},isHorizontalScrollShowing:function(){return za},isInDOM:function(){return _a},isNodeOrElement:function(){return Qa},isRtlNegativeScroll:function(){return Ma},isVerticalScrollShowing:function(){return Ua},isVisible:function(){return Ga},iterateNamedNodeMap:function(){return $a},loadTemplate:function(){return Za},nodeListForEach:function(){return ts},radioCssClass:function(){return ya},removeFromParent:function(){return Fa},setDisabled:function(){return Ea},setDisplayed:function(){return Sa},setDomChildOrder:function(){return Ha},setElementHeight:function(){return Ya},setElementWidth:function(){return ja},setFixedHeight:function(){return Xa},setFixedWidth:function(){return Ka},setScrollLeft:function(){return La},setVisible:function(){return ba}});var Ca="[tabindex], input, select, button, textarea, [href]",ka="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function wa(e){var t=Element.prototype.matches||Element.prototype.msMatchesSelector,n=t.call(e,"input, select, button, textarea"),i=t.call(e,ka),r=Ga(e);return n&&!i&&r}function Sa(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.skipAriaHidden;e.classList.toggle("ag-hidden",!t),i||go(e,!t)}function ba(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.skipAriaHidden;e.classList.toggle("ag-invisible",!t),i||go(e,!t)}function Ea(e,t){var n="disabled",i=t?function(e){return e.setAttribute(n,"")}:function(e){return e.removeAttribute(n)};i(e),ts(e.querySelectorAll("input"),(function(e){return i(e)}))}function xa(e,t,n){for(var i=0;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,"number"==typeof n){if(++i>n)break}else if(e===n)break}return!1}function Ra(e){var t=window.getComputedStyle(e),n=t.height,i=t.width,r=t.borderTopWidth,o=t.borderRightWidth,a=t.borderBottomWidth,s=t.borderLeftWidth,l=t.paddingTop,u=t.paddingRight,c=t.paddingBottom,d=t.paddingLeft,h=t.marginTop,p=t.marginRight,f=t.marginBottom,v=t.marginLeft,g=t.boxSizing;return{height:parseFloat(n||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(r||"0"),borderRightWidth:parseFloat(o||"0"),borderBottomWidth:parseFloat(a||"0"),borderLeftWidth:parseFloat(s||"0"),paddingTop:parseFloat(l||"0"),paddingRight:parseFloat(u||"0"),paddingBottom:parseFloat(c||"0"),paddingLeft:parseFloat(d||"0"),marginTop:parseFloat(h||"0"),marginRight:parseFloat(p||"0"),marginBottom:parseFloat(f||"0"),marginLeft:parseFloat(v||"0"),boxSizing:g}}function Da(e){var t=Ra(e);return"border-box"===t.boxSizing?t.height-t.paddingTop-t.paddingBottom:t.height}function Ta(e){var t=Ra(e);return"border-box"===t.boxSizing?t.width-t.paddingLeft-t.paddingRight:t.width}function Oa(e){var t=Ra(e),n=t.marginBottom+t.marginTop;return Math.ceil(e.offsetHeight+n)}function Pa(e){var t=Ra(e),n=t.marginLeft+t.marginRight;return Math.ceil(e.offsetWidth+n)}function Aa(e){var t=e.getBoundingClientRect(),n=Ra(e),i=n.borderTopWidth,r=n.borderLeftWidth,o=n.borderRightWidth,a=n.borderBottomWidth;return{top:t.top+(i||0),left:t.left+(r||0),right:t.right+(o||0),bottom:t.bottom+(a||0)}}function Ma(){if("boolean"===typeof ga)return ga;var 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,ga=0===Math.floor(e.scrollLeft),document.body.removeChild(e),ga}function Na(e,t){var n=e.scrollLeft;return t&&(n=Math.abs(n),Uo()&&!Ma()&&(n=e.scrollWidth-e.clientWidth-n)),n}function La(e,t,n){n&&(Ma()?t*=-1:(Wo()||Uo())&&(t=e.scrollWidth-e.clientWidth-t)),e.scrollLeft=t}function Ia(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function Fa(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function _a(e){return!!e.offsetParent}function Ga(e){var t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!_a(e)||"visible"!==window.getComputedStyle(e).visibility)}function Za(e){var t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Va(e,t,n){n&&n.nextSibling===t||(n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t))}function Ha(e,t){for(var n=0;n<t.length;n++){var i=t[n],r=e.children[n];r!==i&&e.insertBefore(i,r)}}function Ba(e,t,n){n?n.insertAdjacentElement("afterend",t):e.firstChild?e.insertAdjacentElement("afterbegin",t):e.appendChild(t)}function Wa(e,t){if(t)for(var n=0,i=Object.entries(t);n<i.length;n++){var o=(0,r.Z)(i[n],2),a=o[0],s=o[1];if(a&&a.length&&null!=s){var l=Fr(a),u=s.toString(),c=u.replace(/\s*!important/g,""),d=c.length!=u.length?"important":void 0;e.style.setProperty(l,c,d)}}}function za(e){return e.clientWidth<e.scrollWidth}function Ua(e){return e.clientHeight<e.scrollHeight}function ja(e,t){"flex"===t?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Ka(e,t)}function Ka(e,t){t=qa(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function Ya(e,t){"flex"===t?(e.style.removeProperty("height"),e.style.removeProperty("minHeight"),e.style.removeProperty("maxHeight"),e.style.flex="1 1 auto"):Xa(e,t)}function Xa(e,t){t=qa(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function qa(e){return"number"===typeof e?"".concat(e,"px"):e}function Qa(e){return e instanceof Node||e instanceof HTMLElement}function Ja(e){if(null==e)return[];var t=[];return ts(e,(function(e){return t.push(e)})),t}function $a(e,t){if(e)for(var n=0;n<e.length;n++){var i=e[n];t(i.name,i.value)}}function es(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n.toString())}function ts(e,t){if(null!=e)for(var n=0;n<e.length;n++)t(e[n])}function ns(e,t){e.then((function(e){var n=e.getGui();null!=n&&("object"===typeof n?t.appendChild(n):t.innerHTML=n)}))}var is={};function rs(e,t,n){var i={},r=e.filter((function(e){return!t.some((function(t){return t===e}))}));return r.length>0&&r.forEach((function(e){return i[e]=os(e,n).values})),i}function os(e,t,n,i){var r=t.map((function(t,n){return{value:t,relevance:as(e.toLowerCase(),t.toLocaleLowerCase()),idx:n}}));if(r.sort((function(e,t){return t.relevance-e.relevance})),n&&(r=r.filter((function(e){return 0!==e.relevance}))),r.length>0&&i&&i>0){var o=r[0].relevance*i;r=r.filter((function(e){return o-e.relevance<0}))}var a,s=[],l=[],u=(0,g.Z)(r);try{for(u.s();!(a=u.n()).done;){var c=a.value;s.push(c.value),l.push(c.idx)}}catch(d){u.e(d)}finally{u.f()}return{values:s,indices:l}}function as(e,t){for(var n=e.replace(/\s/g,""),i=t.replace(/\s/g,""),r=0,o=-1,a=0;a<n.length;a++){var s=i.indexOf(n[a],o+1);-1!==s&&(r+=100-100*(o=s)/1e4*100)}return r}An(is,{fuzzyCheckStrings:function(){return rs},fuzzySuggestions:function(){return os}});var ss={};An(ss,{createIcon:function(){return us},createIconNoSpan:function(){return cs},iconNameClassMap:function(){return ls}});var ls={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"};function us(e,t,n){var i=cs(e,t,n);if(i){var r=i.className;if("string"===typeof r&&r.indexOf("ag-icon")>-1||"object"===typeof r&&r["ag-icon"])return i}var o=document.createElement("span");return o.appendChild(i),o}function cs(e,t,n,i){var r,o=null,a=n&&n.getColDef().icons;if(a&&(o=a[e]),t&&!o){var s=t.get("icons");s&&(o=s[e])}if(!o){var l=document.createElement("span"),u=ls[e];return u||(i?u=e:(console.warn("AG Grid: Did not find icon ".concat(e)),u="")),l.setAttribute("class","ag-icon ag-icon-".concat(u)),l.setAttribute("unselectable","on"),no(l,"presentation"),l}if("function"===typeof o)r=o();else{if("string"!==typeof o)throw new Error("icon from grid options needs to be a string or a function");r=o}return"string"===typeof r?Za(r):Qa(r)?r:void console.warn("AG Grid: iconRenderer should return back a string or a dom object")}var ds={};An(ds,{isDeleteKey:function(){return ms},isEventFromPrintableCharacter:function(){return ps},isUserSuppressingHeaderKeyboardEvent:function(){return vs},isUserSuppressingKeyboardEvent:function(){return fs},normaliseQwertyAzerty:function(){return gs}});var hs=(0,s.Z)((function e(){(0,a.Z)(this,e)}));hs.BACKSPACE="Backspace",hs.TAB="Tab",hs.ENTER="Enter",hs.ESCAPE="Escape",hs.SPACE=" ",hs.LEFT="ArrowLeft",hs.UP="ArrowUp",hs.RIGHT="ArrowRight",hs.DOWN="ArrowDown",hs.DELETE="Delete",hs.F2="F2",hs.PAGE_UP="PageUp",hs.PAGE_DOWN="PageDown",hs.PAGE_HOME="Home",hs.PAGE_END="End",hs.A="KeyA",hs.C="KeyC",hs.D="KeyD",hs.V="KeyV",hs.X="KeyX",hs.Y="KeyY",hs.Z="KeyZ";function ps(e){return!(e.altKey||e.ctrlKey||e.metaKey)&&1===e.key.length}function fs(e,t,n,i,r){var o=i?i.getColDef().suppressKeyboardEvent:void 0;if(!o)return!1;var a=e.addGridCommonParams({event:t,editing:r,column:i,node:n,data:n.data,colDef:i.getColDef()});if(o&&o(a))return!0;return!1}function vs(e,t,n,i){var r=i.getDefinition(),o=r&&r.suppressHeaderKeyboardEvent;return!!Fn(o)&&!!o(e.addGridCommonParams({colDef:r,column:i,headerRowIndex:n,event:t}))}function gs(e){var t;switch(e.keyCode){case 65:t=hs.A;break;case 67:t=hs.C;break;case 86:t=hs.V;break;case 68:t=hs.D;break;case 90:t=hs.Z;break;case 89:t=hs.Y;break;default:t=e.code}return t}function ms(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e===hs.DELETE||!t&&e===hs.BACKSPACE&&Ko()}var ys={};function Cs(e,t,n){if(0===n)return!1;var i=Math.abs(e.clientX-t.clientX),r=Math.abs(e.clientY-t.clientY);return Math.max(i,r)<=n}An(ys,{areEventsNear:function(){return Cs}});var ks={};function ws(e,t){if(!e)return!1;for(var n=function(e,n){var i=t[e.id],r=t[n.id],o=void 0!==i,a=void 0!==r;return o&&a?i-r:!o&&!a?e.__objectId-n.__objectId:o?1:-1},i=!1,r=0;r<e.length-1;r++)if(n(e[r],e[r+1])>0){i=!0;break}return!!i&&(e.sort(n),!0)}An(ks,{sortRowNodesByOrder:function(){return ws}});var Ss={};function bs(e){var t=new Set;return e.forEach((function(e){return t.add(e)})),t}An(Ss,{convertToSet:function(){return bs}});var Es=Tn(Tn(Tn(Tn(Tn(Tn(Tn(Tn(Tn(Tn(Tn(Tn(Tn(Tn(Tn(Tn(Tn(Tn({},Qr),Wi),Bo),ia),ma),Bi),ni),is),Ln),ss),ds),_r),ys),ra),Kn),ks),Ss),Or),xs=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,a.Z)(this,e),this.nextValue=t,this.step=n}return(0,s.Z)(e,[{key:"next",value:function(){var e=this.nextValue;return this.nextValue+=this.step,e}},{key:"peek",value:function(){return this.nextValue}},{key:"skip",value:function(e){this.nextValue+=e}}]),e}(),Rs=function(){function e(t){var n=this;(0,a.Z)(this,e),this.status=0,this.resolution=null,this.waiters=[],t((function(e){return n.onDone(e)}),(function(e){return n.onReject(e)}))}return(0,s.Z)(e,[{key:"then",value:function(t){var n=this;return new e((function(e){1===n.status?e(t(n.resolution)):n.waiters.push((function(n){return e(t(n))}))}))}},{key:"resolveNow",value:function(e,t){return 1===this.status?t(this.resolution):e}},{key:"onDone",value:function(e){this.status=1,this.resolution=e,this.waiters.forEach((function(t){return t(e)}))}},{key:"onReject",value:function(e){console.warn("TBI")}}],[{key:"all",value:function(t){return new e((function(e){var n=t.length,i=new Array(n);t.forEach((function(t,r){t.then((function(t){i[r]=t,0===--n&&e(i)}))}))}))}},{key:"resolve",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new e((function(e){return e(t)}))}}]),e}(),Ds=function(){function e(t){(0,a.Z)(this,e),this.cssClassStates={},this.getGui=t}return(0,s.Z)(e,[{key:"addCssClass",value:function(e){var t=this,n=(e||"").split(" ");if(n.length>1)n.forEach((function(e){return t.addCssClass(e)}));else if(!0!==this.cssClassStates[e]&&e.length){var i=this.getGui();i&&i.classList.add(e),this.cssClassStates[e]=!0}}},{key:"removeCssClass",value:function(e){var t=this,n=(e||"").split(" ");if(n.length>1)n.forEach((function(e){return t.removeCssClass(e)}));else if(!1!==this.cssClassStates[e]&&e.length){var i=this.getGui();i&&i.classList.remove(e),this.cssClassStates[e]=!1}}},{key:"containsCssClass",value:function(e){var t=this.getGui();return!!t&&t.classList.contains(e)}},{key:"addOrRemoveCssClass",value:function(e,t){var n=this;if(e){if(e.indexOf(" ")>=0){var i=(e||"").split(" ");if(i.length>1)return void i.forEach((function(e){return n.addOrRemoveCssClass(e,t)}))}if(this.cssClassStates[e]!==t&&e.length){var r=this.getGui();r&&r.classList.toggle(e,t),this.cssClassStates[e]=t}}}}]),e}(),Ts=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r,o){var s;return(0,a.Z)(this,n),(s=t.call(this)).parentComp=e,s.tooltipShowDelayOverride=i,s.tooltipHideDelayOverride=r,s.shouldDisplayTooltip=o,s.SHOW_QUICK_TOOLTIP_DIFF=1e3,s.FADE_OUT_TOOLTIP_TIMEOUT=1e3,s.INTERACTIVE_HIDE_DELAY=100,s.interactionEnabled=!1,s.isInteractingWithTooltip=!1,s.state=0,s.tooltipInstanceCount=0,s.tooltipMouseTrack=!1,s}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.gridOptionsService.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gridOptionsService.get("tooltipMouseTrack");var e=this.parentComp.getGui();0===this.tooltipTrigger&&(this.addManagedListener(e,"mouseenter",this.onMouseEnter.bind(this)),this.addManagedListener(e,"mouseleave",this.onMouseLeave.bind(this))),1===this.tooltipTrigger&&(this.addManagedListener(e,"focusin",this.onFocusIn.bind(this)),this.addManagedListener(e,"focusout",this.onFocusOut.bind(this))),this.addManagedListener(e,"mousemove",this.onMouseMove.bind(this)),this.interactionEnabled||(this.addManagedListener(e,"mousedown",this.onMouseDown.bind(this)),this.addManagedListener(e,"keydown",this.onKeyDown.bind(this)))}},{key:"getGridOptionsTooltipDelay",value:function(e){var t=this.gridOptionsService.get(e);return t<0&&oi("".concat(e," should not be lower than 0")),Math.max(200,t)}},{key:"getTooltipDelay",value:function(e){var t,n;return"show"===e?null!=(t=this.tooltipShowDelayOverride)?t:this.getGridOptionsTooltipDelay("tooltipShowDelay"):null!=(n=this.tooltipHideDelayOverride)?n:this.getGridOptionsTooltipDelay("tooltipHideDelay")}},{key:"destroy",value:function(){this.setToDoNothing(),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}},{key:"getTooltipTrigger",value:function(){var e=this.gridOptionsService.get("tooltipTrigger");return e&&"hover"!==e?1:0}},{key:"onMouseEnter",value:function(e){var t=this;this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),Yo()||(n.isLocked?this.showTooltipTimeoutId=window.setTimeout((function(){t.prepareToShowTooltip(e)}),this.INTERACTIVE_HIDE_DELAY):this.prepareToShowTooltip(e))}},{key:"onMouseMove",value:function(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&2===this.state&&this.tooltipComp&&this.positionTooltip()}},{key:"onMouseDown",value:function(){this.setToDoNothing()}},{key:"onMouseLeave",value:function(){this.interactionEnabled?this.lockService():this.setToDoNothing()}},{key:"onFocusIn",value:function(){this.prepareToShowTooltip()}},{key:"onFocusOut",value:function(e){var t,n=e.relatedTarget,i=this.parentComp.getGui(),r=null==(t=this.tooltipComp)?void 0:t.getGui();this.isInteractingWithTooltip||i.contains(n)||this.interactionEnabled&&(null==r?void 0:r.contains(n))||this.setToDoNothing()}},{key:"onKeyDown",value:function(){this.setToDoNothing()}},{key:"prepareToShowTooltip",value:function(e){if(0==this.state&&!n.isLocked){var t=0;e&&(t=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}}},{key:"isLastTooltipHiddenRecently",value:function(){return(new Date).getTime()-n.lastTooltipHideTime<this.SHOW_QUICK_TOOLTIP_DIFF}},{key:"setToDoNothing",value:function(){2===this.state&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}},{key:"showTooltip",value:function(){var e=Tn({},this.parentComp.getTooltipParams());if(!Fn(e.value)||this.shouldDisplayTooltip&&!this.shouldDisplayTooltip())this.setToDoNothing();else{this.state=2,this.tooltipInstanceCount++;var t=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.userComponentFactory.getTooltipCompDetails(e).newAgStackInstance().then(t)}}},{key:"hideTooltip",value:function(e){if(e||!this.isInteractingWithTooltip){this.tooltipComp&&(this.destroyTooltipComp(),n.lastTooltipHideTime=(new Date).getTime());var t={type:Er.EVENT_TOOLTIP_HIDE,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(t),this.state=0}}},{key:"newTooltipComponentCallback",value:function(e,t){if(2!==this.state||this.tooltipInstanceCount!==e)this.getContext().destroyBean(t);else{var n=t.getGui();this.tooltipComp=t,n.classList.contains("ag-tooltip")||n.classList.add("ag-tooltip-custom"),0===this.tooltipTrigger&&n.classList.add("ag-tooltip-animate"),this.interactionEnabled&&n.classList.add("ag-tooltip-interactive");var i=this.localeService.getLocaleTextFunc(),r=this.popupService.addPopup({eChild:n,ariaLabel:i("ariaLabelTooltip","Tooltip")});r&&(this.tooltipPopupDestroyFunc=r.hideFunc),this.positionTooltip(),1===this.tooltipTrigger&&(this.onBodyScrollEventCallback=this.addManagedListener(this.eventService,Er.EVENT_BODY_SCROLL,this.setToDoNothing.bind(this)),this.onColumnMovedEventCallback=this.addManagedListener(this.eventService,Er.EVENT_COLUMN_MOVED,this.setToDoNothing.bind(this))),this.interactionEnabled&&(0===this.tooltipTrigger?(this.tooltipMouseEnterListener=this.addManagedListener(n,"mouseenter",this.onTooltipMouseEnter.bind(this))||null,this.tooltipMouseLeaveListener=this.addManagedListener(n,"mouseleave",this.onTooltipMouseLeave.bind(this))||null):(this.tooltipFocusInListener=this.addManagedListener(n,"focusin",this.onTooltipFocusIn.bind(this))||null,this.tooltipFocusOutListener=this.addManagedListener(n,"focusout",this.onTooltipFocusOut.bind(this))||null));var o={type:Er.EVENT_TOOLTIP_SHOW,tooltipGui:n,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(o),this.startHideTimeout()}}},{key:"onTooltipMouseEnter",value:function(){this.isInteractingWithTooltip=!0,this.unlockService()}},{key:"onTooltipMouseLeave",value:function(){this.isInteractingWithTooltip=!1,this.lockService()}},{key:"onTooltipFocusIn",value:function(){this.isInteractingWithTooltip=!0}},{key:"onTooltipFocusOut",value:function(e){var t,n=this.parentComp.getGui(),i=null==(t=this.tooltipComp)?void 0:t.getGui(),r=e.relatedTarget;(null==i?void 0:i.contains(r))||(this.isInteractingWithTooltip=!1,n.contains(r)?this.startHideTimeout():this.hideTooltip())}},{key:"positionTooltip",value:function(){var e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent(On(Tn({},e),{mouseEvent:this.lastMouseEvent})):this.popupService.positionPopupByComponent(On(Tn({},e),{eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5}))}},{key:"destroyTooltipComp",value:function(){var e=this;this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");var t=this.tooltipPopupDestroyFunc,n=this.tooltipComp,i=0===this.tooltipTrigger?this.FADE_OUT_TOOLTIP_TIMEOUT:0;window.setTimeout((function(){t(),e.getContext().destroyBean(n)}),i),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}},{key:"clearTooltipListeners",value:function(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach((function(e){e&&e()})),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}},{key:"lockService",value:function(){var e=this;n.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout((function(){e.unlockService(),e.setToDoNothing()}),this.INTERACTIVE_HIDE_DELAY)}},{key:"unlockService",value:function(){n.isLocked=!1,this.clearInteractiveTimeout()}},{key:"startHideTimeout",value:function(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}},{key:"clearShowTimeout",value:function(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}},{key:"clearHideTimeout",value:function(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}},{key:"clearInteractiveTimeout",value:function(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}},{key:"clearTimeouts",value:function(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}}]),n}(kr);Ts.isLocked=!1,Mn([Di("popupService")],Ts.prototype,"popupService",2),Mn([Di("userComponentFactory")],Ts.prototype,"userComponentFactory",2),Mn([Ei],Ts.prototype,"postConstruct",1);var Os=Ts,Ps=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i){var r;return(0,a.Z)(this,n),(r=t.call(this)).ctrl=e,i&&(r.beans=i),r}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.refreshToolTip()}},{key:"setBrowserTooltip",value:function(e){var t="title",n=this.ctrl.getGui();n&&(null!=e&&""!=e?n.setAttribute(t,e):n.removeAttribute(t))}},{key:"updateTooltipText",value:function(){this.tooltip=this.ctrl.getTooltipValue()}},{key:"createTooltipFeatureIfNeeded",value:function(){var e,t,n,i,r=this;if(null==this.tooltipManager){var o={getTooltipParams:function(){return r.getTooltipParams()},getGui:function(){return r.ctrl.getGui()}};this.tooltipManager=this.createBean(new Os(o,null==(t=(e=this.ctrl).getTooltipShowDelayOverride)?void 0:t.call(e),null==(i=(n=this.ctrl).getTooltipHideDelayOverride)?void 0:i.call(n),this.ctrl.shouldDisplayTooltip),this.beans.context)}}},{key:"refreshToolTip",value:function(){this.browserTooltips=this.beans.gridOptionsService.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())}},{key:"getTooltipParams",value:function(){var e=this,t=this.ctrl,n=t.getColumn?t.getColumn():void 0,i=t.getColDef?t.getColDef():void 0,r=t.getRowNode?t.getRowNode():void 0;return{location:t.getLocation(),colDef:i,column:n,rowIndex:t.getRowIndex?t.getRowIndex():void 0,node:r,data:r?r.data:void 0,value:this.getTooltipText(),valueFormatted:t.getValueFormatted?t.getValueFormatted():void 0,hideTooltipCallback:function(){var t;return null==(t=e.tooltipManager)?void 0:t.hideTooltip(!0)}}}},{key:"getTooltipText",value:function(){return this.tooltip}},{key:"destroy",value:function(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}}]),n}(kr);Mn([Di("beans")],Ps.prototype,"beans",2),Mn([Ei],Ps.prototype,"postConstruct",1);var As=new xs,Ms=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).displayed=!0,i.visible=!0,i.compId=As.next(),i.cssClassManager=new Ds((function(){return i.eGui})),e&&i.setTemplate(e),i}return(0,s.Z)(n,[{key:"preConstructOnComponent",value:function(){this.usingBrowserTooltips=this.gridOptionsService.get("enableBrowserTooltips")}},{key:"getCompId",value:function(){return this.compId}},{key:"getTooltipParams",value:function(){return{value:this.tooltipText,location:"UNKNOWN"}}},{key:"setTooltip",value:function(e){var t=this,n=e||{},i=n.newTooltipText,r=n.showDelayOverride,o=n.hideDelayOverride,a=n.location,s=n.shouldDisplayTooltip;this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.tooltipText!==i&&(this.tooltipText=i);null!=i&&(this.tooltipFeature=this.createBean(new Ps({getTooltipValue:function(){return t.tooltipText},getGui:function(){return t.getGui()},getLocation:function(){return null!=a?a:"UNKNOWN"},getTooltipShowDelayOverride:null!=r?function(){return r}:void 0,getTooltipHideDelayOverride:null!=o?function(){return o}:void 0,shouldDisplayTooltip:s})))}},{key:"createChildComponentsFromTags",value:function(e,t){var n=this;Ja(e.childNodes).forEach((function(i){if(i instanceof HTMLElement){var r=n.createComponentFromElement(i,(function(e){e.getGui()&&n.copyAttributesFromNode(i,e.getGui())}),t);if(r){if(r.addItems&&i.children.length){n.createChildComponentsFromTags(i,t);var o=Array.prototype.slice.call(i.children);r.addItems(o)}n.swapComponentForNode(r,e,i)}else i.childNodes&&n.createChildComponentsFromTags(i,t)}}))}},{key:"createComponentFromElement",value:function(e,t,i){var r=e.nodeName,o=i?i[e.getAttribute("ref")]:void 0,a=this.agStackComponentsRegistry.getComponentClass(r);if(a){n.elementGettingCreated=e;var s=new a(o);return s.setParentComponent(this),this.createBean(s,null,t),s}return null}},{key:"copyAttributesFromNode",value:function(e,t){$a(e.attributes,(function(e,n){return t.setAttribute(e,n)}))}},{key:"swapComponentForNode",value:function(e,t,n){var i=e.getGui();t.replaceChild(i,n),t.insertBefore(document.createComment(n.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e)),this.swapInComponentForQuerySelectors(e,n)}},{key:"swapInComponentForQuerySelectors",value:function(e,t){var n=this;this.iterateOverQuerySelectors((function(i){n[i.attributeName]===t&&(n[i.attributeName]=e)}))}},{key:"iterateOverQuerySelectors",value:function(e){for(var t=Object.getPrototypeOf(this);null!=t;){var n=t.__agComponentMetaData,i=si(t.constructor);n&&n[i]&&n[i].querySelectors&&n[i].querySelectors.forEach((function(t){return e(t)})),t=Object.getPrototypeOf(t)}}},{key:"activateTabIndex",value:function(e){var t=this.gridOptionsService.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach((function(e){return e.setAttribute("tabindex",t.toString())}))}},{key:"setTemplate",value:function(e,t){var n=Za(e);this.setTemplateFromElement(n,t)}},{key:"setTemplateFromElement",value:function(e,t){this.eGui=e,this.eGui.__agComponent=this,this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui(),t)}},{key:"createChildComponentsPreConstruct",value:function(){this.getGui()&&this.createChildComponentsFromTags(this.getGui())}},{key:"wireQuerySelectors",value:function(){var e=this;if(this.eGui){var t=this;this.iterateOverQuerySelectors((function(n){var i=function(e){return t[n.attributeName]=e};if(n.refSelector&&e.getAttribute("ref")===n.refSelector)i(e.eGui);else{var r=e.eGui.querySelector(n.querySelector);r&&i(r.__agComponent||r)}}))}}},{key:"getGui",value:function(){return this.eGui}},{key:"getFocusableElement",value:function(){return this.eGui}},{key:"getAriaElement",value:function(){return this.getFocusableElement()}},{key:"setParentComponent",value:function(e){this.parentComponent=e}},{key:"getParentComponent",value:function(){return this.parentComponent}},{key:"setGui",value:function(e){this.eGui=e}},{key:"queryForHtmlElement",value:function(e){return this.eGui.querySelector(e)}},{key:"queryForHtmlInputElement",value:function(e){return this.eGui.querySelector(e)}},{key:"appendChild",value:function(e,t){if(null!=e)if(t||(t=this.eGui),Qa(e))t.appendChild(e);else{var n=e;t.appendChild(n.getGui())}}},{key:"isDisplayed",value:function(){return this.displayed}},{key:"setVisible",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e!==this.visible){this.visible=e;var n=t.skipAriaHidden;ba(this.eGui,e,{skipAriaHidden:n})}}},{key:"setDisplayed",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e!==this.displayed){this.displayed=e;var i=t.skipAriaHidden;Sa(this.eGui,e,{skipAriaHidden:i});var r={type:n.EVENT_DISPLAYED_CHANGED,visible:this.displayed};this.dispatchEvent(r)}}},{key:"destroy",value:function(){this.parentComponent&&(this.parentComponent=void 0),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));var e=this.eGui;e&&e.__agComponent&&(e.__agComponent=void 0),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}},{key:"addGuiEventListener",value:function(e,t,n){var i=this;this.eGui.addEventListener(e,t,n),this.addDestroyFunc((function(){return i.eGui.removeEventListener(e,t)}))}},{key:"addCssClass",value:function(e){this.cssClassManager.addCssClass(e)}},{key:"removeCssClass",value:function(e){this.cssClassManager.removeCssClass(e)}},{key:"containsCssClass",value:function(e){return this.cssClassManager.containsCssClass(e)}},{key:"addOrRemoveCssClass",value:function(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)}},{key:"getAttribute",value:function(e){var t=this.eGui;return t?t.getAttribute(e):null}},{key:"getRefElement",value:function(e){return this.queryForHtmlElement('[ref="'.concat(e,'"]'))}}]),n}(kr);Ms.EVENT_DISPLAYED_CHANGED="displayedChanged",Mn([Di("agStackComponentsRegistry")],Ms.prototype,"agStackComponentsRegistry",2),Mn([bi],Ms.prototype,"preConstructOnComponent",1),Mn([bi],Ms.prototype,"createChildComponentsPreConstruct",1);var Ns=Ms;function Ls(e){return Is.bind(this,"[ref=".concat(e,"]"),e)}function Is(e,t,n,i,r){null!==e?"number"!==typeof r?function(e,t,n){var i=function(e,t){e.__agComponentMetaData||(e.__agComponentMetaData={});e.__agComponentMetaData[t]||(e.__agComponentMetaData[t]={});return e.__agComponentMetaData[t]}(e,si(e.constructor));i[t]||(i[t]=[]);i[t].push(n)}(n,"querySelectors",{attributeName:i,querySelector:e,refSelector:t}):console.error("AG Grid: QuerySelector should be on an attribute"):console.error("AG Grid: QuerySelector selector should not be null")}var Fs=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,'\n            <div class="ag-floating-filter-input" role="presentation">\n                <ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>\n            </div>')}return(0,s.Z)(n,[{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}},{key:"init",value:function(e){this.params=e;var t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),n=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel("".concat(t," ").concat(n("ariaFilterInput","Filter Input")))}},{key:"onParentModelChanged",value:function(e){var t=this;null!=e?this.params.parentFilterInstance((function(n){if(n.getModelAsString){var i=n.getModelAsString(e);t.eFloatingFilterText.setValue(i)}})):this.eFloatingFilterText.setValue("")}},{key:"onParamsUpdated",value:function(e){this.refresh(e)}},{key:"refresh",value:function(e){this.init(e)}}]),n}(Ns);Mn([Ls("eFloatingFilterText")],Fs.prototype,"eFloatingFilterText",2),Mn([Di("columnModel")],Fs.prototype,"columnModel",2);var _s=function(){function e(t,n,i,r){var o=this;(0,a.Z)(this,e),this.alive=!0,this.context=t,this.eParent=r,n.getDateCompDetails(i).newAgStackInstance().then((function(e){o.alive?(o.dateComp=e,e&&(r.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached(),o.tempValue&&e.setDate(o.tempValue),null!=o.disabled&&o.setDateCompDisabled(o.disabled))):t.destroyBean(e)}))}return(0,s.Z)(e,[{key:"destroy",value:function(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}},{key:"getDate",value:function(){return this.dateComp?this.dateComp.getDate():this.tempValue}},{key:"setDate",value:function(e){this.dateComp?this.dateComp.setDate(e):this.tempValue=e}},{key:"setDisabled",value:function(e){this.dateComp?this.setDateCompDisabled(e):this.disabled=e}},{key:"setDisplayed",value:function(e){Sa(this.eParent,e)}},{key:"setInputPlaceholder",value:function(e){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(e)}},{key:"setInputAriaLabel",value:function(e){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(e)}},{key:"afterGuiAttached",value:function(e){this.dateComp&&"function"===typeof this.dateComp.afterGuiAttached&&this.dateComp.afterGuiAttached(e)}},{key:"updateParams",value:function(e){var t,n,i=!1;(null==(t=this.dateComp)?void 0:t.refresh)&&"function"===typeof this.dateComp.refresh&&(null!==this.dateComp.refresh(e)&&(i=!0));!i&&(null==(n=this.dateComp)?void 0:n.onParamsUpdated)&&"function"===typeof this.dateComp.onParamsUpdated&&(null!==this.dateComp.onParamsUpdated(e)&&oi("Custom date component method 'onParamsUpdated' is deprecated. Use 'refresh' instead."))}},{key:"setDateCompDisabled",value:function(e){null!=this.dateComp&&null!=this.dateComp.setDisabled&&this.dateComp.setDisabled(e)}}]),e}(),Gs=function(){function e(){(0,a.Z)(this,e),this.customFilterOptions={}}return(0,s.Z)(e,[{key:"init",value:function(e,t){this.filterOptions=e.filterOptions||t,this.mapCustomOptions(),this.selectDefaultItem(e)}},{key:"getFilterOptions",value:function(){return this.filterOptions}},{key:"mapCustomOptions",value:function(){var e=this;this.filterOptions&&this.filterOptions.forEach((function(t){if("string"!==typeof t){[["displayKey"],["displayName"],["predicate","test"]].every((function(e){return!!e.some((function(e){return null!=t[e]}))||(console.warn("AG Grid: ignoring FilterOptionDef as it doesn't contain one of '".concat(e,"'")),!1)}))?e.customFilterOptions[t.displayKey]=t:e.filterOptions=e.filterOptions.filter((function(e){return e===t}))||[]}}))}},{key:"selectDefaultItem",value:function(e){if(e.defaultOption)this.defaultOption=e.defaultOption;else if(this.filterOptions.length>=1){var t=this.filterOptions[0];"string"===typeof t?this.defaultOption=t:t.displayKey?this.defaultOption=t.displayKey:console.warn("AG Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}else console.warn("AG Grid: no filter options for filter")}},{key:"getDefaultOption",value:function(){return this.defaultOption}},{key:"getCustomOption",value:function(e){return this.customFilterOptions[e]}}]),e}(),Zs={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"},Vs=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.Z)(this,n),(i=t.call(this)).eFocusableElement=e,i.callbacks=r,i.callbacks=Tn({shouldStopEventPropagation:function(){return!1},onTabKeyDown:function(e){if(!e.defaultPrevented){var t=i.focusService.findNextFocusableElement(i.eFocusableElement,!1,e.shiftKey);t&&(t.focus(),e.preventDefault())}}},r),i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.eFocusableElement.classList.add(n.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedListener(this.eFocusableElement,"focusin",this.callbacks.onFocusIn),this.callbacks.onFocusOut&&this.addManagedListener(this.eFocusableElement,"focusout",this.callbacks.onFocusOut)}},{key:"addKeyDownListeners",value:function(e){var t=this;this.addManagedListener(e,"keydown",(function(e){e.defaultPrevented||hr(e)||(t.callbacks.shouldStopEventPropagation(e)?dr(e):e.key===hs.TAB?t.callbacks.onTabKeyDown(e):t.callbacks.handleKeyDown&&t.callbacks.handleKeyDown(e))}))}}]),n}(kr);Vs.FOCUS_MANAGED_CLASS="ag-focus-managed",Mn([Di("focusService")],Vs.prototype,"focusService",2),Mn([Ei],Vs.prototype,"postConstruct",1);var Hs=Vs,Bs="ag-resizer-wrapper",Ws='<div class="'.concat(Bs,'">\n        <div ref="eTopLeftResizer" class="ag-resizer ag-resizer-topLeft"></div>\n        <div ref="eTopResizer" class="ag-resizer ag-resizer-top"></div>\n        <div ref="eTopRightResizer" class="ag-resizer ag-resizer-topRight"></div>\n        <div ref="eRightResizer" class="ag-resizer ag-resizer-right"></div>\n        <div ref="eBottomRightResizer" class="ag-resizer ag-resizer-bottomRight"></div>\n        <div ref="eBottomResizer" class="ag-resizer ag-resizer-bottom"></div>\n        <div ref="eBottomLeftResizer" class="ag-resizer ag-resizer-bottomLeft"></div>\n        <div ref="eLeftResizer" class="ag-resizer ag-resizer-left"></div>\n    </div>'),zs=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i){var r;return(0,a.Z)(this,n),(r=t.call(this)).element=e,r.dragStartPosition={x:0,y:0},r.position={x:0,y:0},r.lastSize={width:-1,height:-1},r.positioned=!1,r.resizersAdded=!1,r.resizeListeners=[],r.boundaryEl=null,r.isResizing=!1,r.isMoving=!1,r.resizable={},r.movable=!1,r.currentResizer=null,r.config=Object.assign({},{popup:!1},i),r}return(0,s.Z)(n,[{key:"center",value:function(){var e=this.offsetParent,t=e.clientHeight,n=e.clientWidth/2-this.getWidth()/2,i=t/2-this.getHeight()/2;this.offsetElement(n,i)}},{key:"initialisePosition",value:function(){if(!this.positioned){var e=this.config,t=e.centered,n=e.forcePopupParentAsOffsetParent,i=e.minWidth,r=e.width,o=e.minHeight,a=e.height,s=e.x,l=e.y;this.offsetParent||this.setOffsetParent();var u=0,c=0,d=Ga(this.element);if(d){var h=this.findBoundaryElement(),p=window.getComputedStyle(h);if(null!=p.minWidth){var f=h.offsetWidth-this.element.offsetWidth;c=parseInt(p.minWidth,10)-f}if(null!=p.minHeight){var v=h.offsetHeight-this.element.offsetHeight;u=parseInt(p.minHeight,10)-v}}if(this.minHeight=o||u,this.minWidth=i||c,r&&this.setWidth(r),a&&this.setHeight(a),r&&a||this.refreshSize(),t)this.center();else if(s||l)this.offsetElement(s,l);else if(d&&n){var g=this.boundaryEl,m=!0;if(g||(g=this.findBoundaryElement(),m=!1),g){var y=parseFloat(g.style.top),C=parseFloat(g.style.left);m?this.offsetElement(isNaN(C)?0:C,isNaN(y)?0:y):this.setPosition(C,y)}}this.positioned=!!this.offsetParent}}},{key:"isPositioned",value:function(){return this.positioned}},{key:"getPosition",value:function(){return this.position}},{key:"setMovable",value:function(e,t){if(this.config.popup&&e!==this.movable){this.movable=e;var n=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragService.addDragSource(n),this.moveElementDragListener=n):(this.dragService.removeDragSource(n),this.moveElementDragListener=void 0)}}},{key:"setResizable",value:function(e){var t=this;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((function(n){var i=!!e[n],r=t.getResizerElement(n),o={dragStartPixels:0,eElement:r,onDragStart:function(e){return t.onResizeStart(e,n)},onDragging:t.onResize.bind(t),onDragStop:function(e){return t.onResizeEnd(e,n)}};(i||!t.isAlive()&&!i)&&(i?(t.dragService.addDragSource(o),t.resizeListeners.push(o),r.style.pointerEvents="all"):r.style.pointerEvents="none",t.resizable[n]=i)}))}},{key:"removeSizeFromEl",value:function(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}},{key:"restoreLastSize",value:function(){this.element.style.flex="0 0 auto";var e=this.lastSize,t=e.height,n=e.width;-1!==n&&(this.element.style.width="".concat(n,"px")),-1!==t&&(this.element.style.height="".concat(t,"px"))}},{key:"getHeight",value:function(){return this.element.offsetHeight}},{key:"setHeight",value:function(e){var t=this.config.popup,n=this.element,i=!1;if("string"===typeof e&&-1!==e.indexOf("%"))Xa(n,e),e=Oa(n),i=!0;else if(e=Math.max(this.minHeight,e),this.positioned){var r=this.getAvailableHeight();r&&e>r&&(e=r)}this.getHeight()!==e&&(i?(n.style.maxHeight="unset",n.style.minHeight="unset"):t?Xa(n,e):(n.style.height="".concat(e,"px"),n.style.flex="0 0 auto",this.lastSize.height="number"===typeof e?e:parseFloat(e)))}},{key:"getAvailableHeight",value:function(){var e=this.config,t=e.popup,n=e.forcePopupParentAsOffsetParent;this.positioned||this.initialisePosition();var i=this.offsetParent.clientHeight;if(!i)return null;var r=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),a=t?this.position.y:r.top,s=t?0:o.top,l=0;if(n){var u=this.element.parentElement;if(u)l=u.getBoundingClientRect().bottom-r.bottom}return i+s-a-l}},{key:"getWidth",value:function(){return this.element.offsetWidth}},{key:"setWidth",value:function(e){var t=this.element,n=this.config.popup,i=!1;if("string"===typeof e&&-1!==e.indexOf("%"))Ka(t,e),e=Pa(t),i=!0;else if(this.positioned){e=Math.max(this.minWidth,e);var r=this.offsetParent.clientWidth,o=n?this.position.x:this.element.getBoundingClientRect().left;r&&e+o>r&&(e=r-o)}this.getWidth()!==e&&(i?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Ka(t,e):(t.style.width="".concat(e,"px"),t.style.flex=" unset",this.lastSize.width="number"===typeof e?e:parseFloat(e)))}},{key:"offsetElement",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.config.forcePopupParentAsOffsetParent,i=n?this.boundaryEl:this.element;i&&(this.popupService.positionPopup({ePopup:i,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:function(){return{x:e,y:t}}}),this.setPosition(parseFloat(i.style.left),parseFloat(i.style.top)))}},{key:"constrainSizeToAvailableHeight",value:function(e){var t=this;if(this.config.forcePopupParentAsOffsetParent){e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),(function(){var e=t.getAvailableHeight();t.element.style.setProperty("max-height","".concat(e,"px"))})):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}}},{key:"setPosition",value:function(e,t){this.position.x=e,this.position.y=t}},{key:"updateDragStartPosition",value:function(e,t){this.dragStartPosition={x:e,y:t}}},{key:"calculateMouseMovement",value:function(e){var t=e.e,n=e.isLeft,i=e.isTop,r=e.anywhereWithin,o=e.topBuffer,a=t.clientX-this.dragStartPosition.x,s=t.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(t,!!n,!!r,a)?0:a,movementY:this.shouldSkipY(t,!!i,o,s)?0:s}}},{key:"shouldSkipX",value:function(e,t,n,i){var r=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),a=this.boundaryEl.getBoundingClientRect(),s=this.config.popup?this.position.x:r.left,l=s<=0&&o.left>=e.clientX||o.right<=e.clientX&&o.right<=a.right;return!!l||(l=t?i<0&&e.clientX>s+o.left||i>0&&e.clientX<s+o.left:n?i<0&&e.clientX>a.right||i>0&&e.clientX<s+o.left:i<0&&e.clientX>a.right||i>0&&e.clientX<a.right)}},{key:"shouldSkipY",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3?arguments[3]:void 0,r=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),a=this.boundaryEl.getBoundingClientRect(),s=this.config.popup?this.position.y:r.top,l=s<=0&&o.top>=e.clientY||o.bottom<=e.clientY&&o.bottom<=a.bottom;return!!l||(l=t?i<0&&e.clientY>s+o.top+n||i>0&&e.clientY<s+o.top:i<0&&e.clientY>a.bottom||i>0&&e.clientY<a.bottom)}},{key:"createResizeMap",value:function(){var e=this.element;this.resizerMap={topLeft:{element:e.querySelector("[ref=eTopLeftResizer]")},top:{element:e.querySelector("[ref=eTopResizer]")},topRight:{element:e.querySelector("[ref=eTopRightResizer]")},right:{element:e.querySelector("[ref=eRightResizer]")},bottomRight:{element:e.querySelector("[ref=eBottomRightResizer]")},bottom:{element:e.querySelector("[ref=eBottomResizer]")},bottomLeft:{element:e.querySelector("[ref=eBottomLeftResizer]")},left:{element:e.querySelector("[ref=eLeftResizer]")}}}},{key:"addResizers",value:function(){if(!this.resizersAdded){var e=this.element;if(e){var t=(new DOMParser).parseFromString(Ws,"text/html").body;e.appendChild(t.firstChild),this.createResizeMap(),this.resizersAdded=!0}}}},{key:"removeResizers",value:function(){this.resizerMap=void 0;var e=this.element.querySelector(".".concat(Bs));e&&this.element.removeChild(e),this.resizersAdded=!1}},{key:"getResizerElement",value:function(e){return this.resizerMap[e].element}},{key:"onResizeStart",value:function(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");var n=this.config,i=n.popup,r=n.forcePopupParentAsOffsetParent;i||r||this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}},{key:"getSiblings",value:function(){var e=this.element.parentElement;return e?Array.prototype.slice.call(e.children).filter((function(e){return!e.classList.contains("ag-hidden")})):null}},{key:"getMinSizeOfSiblings",value:function(){for(var e=this.getSiblings()||[],t=0,n=0,i=0;i<e.length;i++){var r=e[i],o=!!r.style.flex&&"0 0 auto"!==r.style.flex;if(r!==this.element){var a=this.minHeight||0,s=this.minWidth||0;if(o){var l=window.getComputedStyle(r);l.minHeight&&(a=parseInt(l.minHeight,10)),l.minWidth&&(s=parseInt(l.minWidth,10))}else a=r.offsetHeight,s=r.offsetWidth;t+=a,n+=s}}return{height:t,width:n}}},{key:"applySizeToSiblings",value:function(e){var t=null,n=this.getSiblings();if(n){for(var i=0;i<n.length;i++){var r=n[i];r!==t&&(e?r.style.height="".concat(r.offsetHeight,"px"):r.style.width="".concat(r.offsetWidth,"px"),r.style.flex="0 0 auto",r===this.element&&(t=n[i+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}},{key:"isResizable",value:function(){return Object.values(this.resizable).some((function(e){return e}))}},{key:"onResize",value:function(e){if(this.isResizing&&this.currentResizer){var t=this.config,n=t.popup,i=t.forcePopupParentAsOffsetParent,r=this.currentResizer,o=r.isTop,a=r.isRight,s=r.isBottom,l=r.isLeft,u=a||l,c=s||o,d=this.calculateMouseMovement({e:e,isLeft:l,isTop:o}),h=d.movementX,p=d.movementY,f=this.position.x,v=this.position.y,g=0,m=0;if(u&&h){var y=l?-1:1,C=this.getWidth(),k=C+h*y,w=!1;l&&(f+(g=C-k)<=0||k<=this.minWidth)&&(w=!0,g=0),w||this.setWidth(k)}if(c&&p){var S=o?-1:1,b=this.getHeight(),E=b+p*S,x=!1;o?(v+(m=b-E)<=0||E<=this.minHeight)&&(x=!0,m=0):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&b<E&&this.getMinSizeOfSiblings().height+E>this.element.parentElement.offsetHeight&&(x=!0),x||this.setHeight(E)}this.updateDragStartPosition(e.clientX,e.clientY),((n||i)&&g||m)&&this.offsetElement(f+g,v+m)}}},{key:"onResizeEnd",value:function(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.dispatchEvent({type:"resize"})}},{key:"refreshSize",value:function(){var e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}},{key:"onMoveStart",value:function(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}},{key:"onMove",value:function(e){if(this.isMoving){var t,n=this.position,i=n.x,r=n.y;this.config.calculateTopBuffer&&(t=this.config.calculateTopBuffer());var o=this.calculateMouseMovement({e:e,isTop:!0,anywhereWithin:!0,topBuffer:t}),a=o.movementX,s=o.movementY;this.offsetElement(i+a,r+s),this.updateDragStartPosition(e.clientX,e.clientY)}}},{key:"onMoveEnd",value:function(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}},{key:"setOffsetParent",value:function(){this.config.forcePopupParentAsOffsetParent?this.offsetParent=this.popupService.getPopupParent():this.offsetParent=this.element.offsetParent}},{key:"findBoundaryElement",value:function(){for(var e=this.element;e;){if("static"!==window.getComputedStyle(e).position)return e;e=e.parentElement}return this.element}},{key:"clearResizeListeners",value:function(){for(;this.resizeListeners.length;){var e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}}},{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}}]),n}(kr);Mn([Di("popupService")],zs.prototype,"popupService",2),Mn([Di("resizeObserverService")],zs.prototype,"resizeObserverService",2),Mn([Di("dragService")],zs.prototype,"dragService",2);var Us=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).filterNameKey=e,i.applyActive=!1,i.hidePopup=null,i.debouncePending=!1,i.appliedModel=null,i.buttonListeners=[],i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.resetTemplate(),this.createManagedBean(new Hs(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new zs(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}},{key:"handleKeyDown",value:function(e){}},{key:"getFilterTitle",value:function(){return this.translate(this.filterNameKey)}},{key:"isFilterActive",value:function(){return!!this.appliedModel}},{key:"resetTemplate",value:function(e){var t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit);var n='\n            <form class="ag-filter-wrapper">\n                <div class="ag-filter-body-wrapper ag-'.concat(this.getCssIdentifier(),'-body-wrapper" ref="eFilterBody">\n                    ').concat(this.createBodyTemplate(),"\n                </div>\n            </form>");this.setTemplate(n,e),(t=this.getGui())&&t.addEventListener("submit",this.onFormSubmit)}},{key:"isReadOnly",value:function(){return!!this.providedFilterParams.readOnly}},{key:"init",value:function(e){var t=this;this.setParams(e),this.resetUiToDefaults(!0).then((function(){t.updateUiVisibility(),t.setupOnBtApplyDebounce()}))}},{key:"setParams",value:function(e){this.providedFilterParams=e,this.applyActive=n.isUseApplyButton(e),this.resetButtonsPanel()}},{key:"updateParams",value:function(e){var t=this;this.providedFilterParams=e,this.applyActive=n.isUseApplyButton(e),this.resetUiToActiveModel(this.getModel(),(function(){t.updateUiVisibility(),t.setupOnBtApplyDebounce()}))}},{key:"resetButtonsPanel",value:function(){var e=this,t=this.providedFilterParams.buttons,n=t&&t.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(Ia(this.eButtonsPanel),this.buttonListeners.forEach((function(e){return null==e?void 0:e()})),this.buttonListeners=[]):n&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),n){var i=document.createDocumentFragment();bs(t).forEach((function(t){return function(t){var n,r;switch(t){case"apply":n=e.translate("applyFilter"),r=function(t){return e.onBtApply(!1,!1,t)};break;case"clear":n=e.translate("clearFilter"),r=function(){return e.onBtClear()};break;case"reset":n=e.translate("resetFilter"),r=function(){return e.onBtReset()};break;case"cancel":n=e.translate("cancelFilter"),r=function(t){e.onBtCancel(t)};break;default:return void console.warn("AG Grid: Unknown button type specified")}var o=Za('<button\n                    type="'.concat("apply"===t?"submit":"button",'"\n                    ref="').concat(t,'FilterButton"\n                    class="ag-button ag-standard-button ag-filter-apply-panel-button"\n                >').concat(n,"\n                </button>"));e.buttonListeners.push(e.addManagedListener(o,"click",r)),i.append(o)}(t)})),this.eButtonsPanel.append(i),this.getGui().appendChild(this.eButtonsPanel)}else this.eButtonsPanel&&Fa(this.eButtonsPanel)}},{key:"getDefaultDebounceMs",value:function(){return 0}},{key:"setupOnBtApplyDebounce",value:function(){var e=this,t=n.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs()),i=fi(this.checkApplyDebounce.bind(this),t);this.onBtApplyDebounce=function(){e.debouncePending=!0,i()}}},{key:"checkApplyDebounce",value:function(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}},{key:"getModel",value:function(){return this.appliedModel?this.appliedModel:null}},{key:"setModel",value:function(e){var t=this;return(null!=e?this.setModelIntoUi(e):this.resetUiToDefaults()).then((function(){t.updateUiVisibility(),t.applyModel("api")}))}},{key:"onBtCancel",value:function(e){var t=this;this.resetUiToActiveModel(this.getModel(),(function(){t.handleCancelEnd(e)}))}},{key:"handleCancelEnd",value:function(e){this.providedFilterParams.closeOnApply&&this.close(e)}},{key:"resetUiToActiveModel",value:function(e,t){var n=this,i=function(){n.onUiChanged(!1,"prevent"),null==t||t()};null!=e?this.setModelIntoUi(e).then(i):this.resetUiToDefaults().then(i)}},{key:"onBtClear",value:function(){var e=this;this.resetUiToDefaults().then((function(){return e.onUiChanged()}))}},{key:"onBtReset",value:function(){this.onBtClear(),this.onBtApply()}},{key:"applyModel",value:function(){var e=this.getModelFromUi();if(!this.isModelValid(e))return!1;var t=this.appliedModel;return this.appliedModel=e,!this.areModelsEqual(t,e)}},{key:"isModelValid",value:function(e){return!0}},{key:"onFormSubmit",value:function(e){e.preventDefault()}},{key:"onBtApply",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;if(n&&n.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")){var i="columnFilter";this.providedFilterParams.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:i})}var r=this.providedFilterParams.closeOnApply;r&&this.applyActive&&!e&&!t&&this.close(n)}},{key:"onNewRowsLoaded",value:function(){}},{key:"close",value:function(e){if(this.hidePopup){var t,n=e,i=n&&n.key;"Enter"!==i&&"Space"!==i||(t={keyboardEvent:n}),this.hidePopup(t),this.hidePopup=null}}},{key:"onUiChanged",value:function(){var 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()){var n=this.isModelValid(this.getModelFromUi()),i=this.getRefElement("applyFilterButton");i&&Ea(i,!n)}e&&!t||"immediately"===t?this.onBtApply(e):(this.applyActive||t)&&"debounce"!==t||this.onBtApplyDebounce()}},{key:"afterGuiAttached",value:function(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(null==e?void 0:e.container)}},{key:"refreshFilterResizer",value:function(e){if(this.positionableFeature&&"toolPanel"!==e){var t="floatingFilter"===e||"columnFilter"===e,n=this.positionableFeature,i=this.gridOptionsService;t?(n.restoreLastSize(),n.setResizable(i.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)}}},{key:"afterGuiDetached",value:function(){this.checkApplyDebounce(),this.positionableFeature&&this.positionableFeature.constrainSizeToAvailableHeight(!1)}},{key:"refresh",value:function(e){return this.providedFilterParams=e,!0}},{key:"destroy",value:function(){var e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}},{key:"translate",value:function(e){var t=this.localeService.getLocaleTextFunc();return t(e,Zs[e])}},{key:"getCellValue",value:function(e){return this.providedFilterParams.getValue(e)}},{key:"getPositionableElement",value:function(){return this.eFilterBody}}],[{key:"getDebounceMs",value:function(e,t){return n.isUseApplyButton(e)?(null!=e.debounceMs&&console.warn("AG Grid: debounceMs is ignored when apply button is present"),0):null!=e.debounceMs?e.debounceMs:t}},{key:"isUseApplyButton",value:function(e){return!!e.buttons&&e.buttons.indexOf("apply")>=0}}]),n}(Ns);Mn([Di("rowModel")],Us.prototype,"rowModel",2),Mn([Ls("eFilterBody")],Us.prototype,"eFilterBody",2),Mn([Ei],Us.prototype,"postConstruct",1);var js=Us,Ks=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i){var r;return(0,a.Z)(this,n),(r=t.call(this,i)).labelSeparator="",r.labelAlignment="left",r.disabled=!1,r.label="",r.config=e||{},r}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");var e=this.config,t=e.labelSeparator,n=e.label,i=e.labelWidth,r=e.labelAlignment,o=e.disabled;null!=o&&this.setDisabled(o),null!=t&&this.setLabelSeparator(t),null!=n&&this.setLabel(n),null!=i&&this.setLabelWidth(i),this.setLabelAlignment(r||this.labelAlignment),this.refreshLabel()}},{key:"refreshLabel",value:function(){Ia(this.eLabel),"string"===typeof this.label?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),""===this.label?(Sa(this.eLabel,!1),no(this.eLabel,"presentation")):(Sa(this.eLabel,!0),no(this.eLabel,null))}},{key:"setLabelSeparator",value:function(e){return this.labelSeparator===e||(this.labelSeparator=e,null!=this.label&&this.refreshLabel()),this}},{key:"getLabelId",value:function(){return this.eLabel.id=this.eLabel.id||"ag-".concat(this.getCompId(),"-label"),this.eLabel.id}},{key:"getLabel",value:function(){return this.label}},{key:"setLabel",value:function(e){return this.label===e||(this.label=e,this.refreshLabel()),this}},{key:"setLabelAlignment",value:function(e){var 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}},{key:"setLabelEllipsis",value:function(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}},{key:"setLabelWidth",value:function(e){return null==this.label||ja(this.eLabel,e),this}},{key:"setDisabled",value:function(e){e=!!e;var t=this.getGui();return Ea(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}},{key:"isDisabled",value:function(){return!!this.disabled}}]),n}(Ns);Mn([Ei],Ks.prototype,"postConstruct",1);var Ys=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r){var o;return(0,a.Z)(this,n),(o=t.call(this,e,i)).className=r,o}return(0,s.Z)(n,[{key:"postConstruct",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"postConstruct",this).call(this);var e=this.config,t=e.width,i=e.value,r=e.onValueChange;null!=t&&this.setWidth(t),null!=i&&this.setValue(i),null!=r&&this.onValueChange(r),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}},{key:"refreshAriaLabelledBy",value:function(){var e=this.getAriaElement(),t=this.getLabelId();null!==ao(e)?lo(e,""):lo(e,null!=t?t:"")}},{key:"setAriaLabel",value:function(e){return so(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}},{key:"onValueChange",value:function(e){var t=this;return this.addManagedListener(this,Er.EVENT_FIELD_VALUE_CHANGED,(function(){return e(t.getValue())})),this}},{key:"getWidth",value:function(){return this.getGui().clientWidth}},{key:"setWidth",value:function(e){return Ka(this.getGui(),e),this}},{key:"getPreviousValue",value:function(){return this.previousValue}},{key:"getValue",value:function(){return this.value}},{key:"setValue",value:function(e,t){return this.value===e||(this.previousValue=this.value,this.value=e,t||this.dispatchEvent({type:Er.EVENT_FIELD_VALUE_CHANGED})),this}}]),n}(Ks),Xs=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;if((0,a.Z)(this,n),(i=t.call(this,e,(null==e?void 0:e.template)||'\n    <div class="ag-picker-field" role="presentation">\n        <div ref="eLabel"></div>\n            <div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">\n            <div ref="eDisplayField" class="ag-picker-field-display"></div>\n            <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n        </div>\n    </div>',null==e?void 0:e.className)).isPickerDisplayed=!1,i.skipClick=!1,i.pickerGap=4,i.hideCurrentPicker=null,i.ariaRole=null==e?void 0:e.ariaRole,i.onPickerFocusIn=i.onPickerFocusIn.bind((0,He.Z)(i)),i.onPickerFocusOut=i.onPickerFocusOut.bind((0,He.Z)(i)),!e)return(0,Cn.Z)(i);var r=e.pickerGap,o=e.maxPickerHeight,s=e.variableWidth,l=e.minPickerWidth,u=e.maxPickerWidth;return null!=r&&(i.pickerGap=r),i.variableWidth=!!s,null!=o&&i.setPickerMaxHeight(o),null!=l&&i.setPickerMinWidth(l),null!=u&&i.setPickerMaxWidth(u),i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"postConstruct",this).call(this),this.setupAria();var e="ag-".concat(this.getCompId(),"-display");this.eDisplayField.setAttribute("id",e);var t=this.getAriaElement();this.addManagedListener(t,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(this.eLabel,"mousedown",this.onLabelOrWrapperMouseDown.bind(this)),this.addManagedListener(this.eWrapper,"mousedown",this.onLabelOrWrapperMouseDown.bind(this));var i=this.config,r=i.pickerIcon,o=i.inputWidth;if(r){var a=cs(r,this.gridOptionsService);a&&this.eIcon.appendChild(a)}null!=o&&this.setInputWidth(o)}},{key:"setupAria",value:function(){var e=this.getAriaElement();e.setAttribute("tabindex",this.gridOptionsService.get("tabIndex").toString()),yo(e,!1),this.ariaRole&&no(e,this.ariaRole)}},{key:"onLabelOrWrapperMouseDown",value:function(e){if(e){var t=this.getFocusableElement();if(t!==this.eWrapper&&(null==e?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}this.skipClick?this.skipClick=!1:this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}},{key:"onKeyDown",value:function(e){switch(e.key){case hs.UP:case hs.DOWN:case hs.ENTER:case hs.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case hs.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker())}}},{key:"showPicker",value:function(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());var e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}},{key:"renderAndPositionPicker",value:function(){var e=this,t=this.gridOptionsService.getDocument(),n=this.pickerComponent.getGui();this.gridOptionsService.get("suppressScrollWhenPopupsAreOpen")||(this.destroyMouseWheelFunc=this.addManagedListener(this.eventService,Er.EVENT_BODY_SCROLL,(function(){e.hidePicker()})));var i=this.localeService.getLocaleTextFunc(),r=this.config,o=r.pickerAriaLabelKey,a=r.pickerAriaLabelValue,s=r.modalPicker,l={modal:void 0===s||s,eChild:n,closeOnEsc:!0,closedCallback:function(){var n=t.activeElement===t.body;e.beforeHidePicker(),n&&e.isAlive()&&e.getFocusableElement().focus()},ariaLabel:i(o,a)},u=this.popupService.addPopup(l),c=this.maxPickerHeight,d=this.minPickerWidth,h=this.maxPickerWidth;this.variableWidth?(d&&(n.style.minWidth=d),n.style.width=qa(Pa(this.eWrapper)),h&&(n.style.maxWidth=h)):ja(n,null!=h?h:Pa(this.eWrapper));var p=null!=c?c:"".concat(Da(this.popupService.getPopupParent()),"px");return n.style.setProperty("max-height",p),n.style.position="absolute",this.alignPickerToComponent(),u.hideFunc}},{key:"alignPickerToComponent",value:function(){if(this.pickerComponent){var e=this.config.pickerType,t=this.pickerGap,n=this.gridOptionsService.get("enableRtl")?"right":"left";this.popupService.positionPopupByComponent({type:e,eventSource:this.eWrapper,ePopup:this.pickerComponent.getGui(),position:"under",alignSide:n,keepWithinBounds:!0,nudgeY:t})}}},{key:"beforeHidePicker",value:function(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);var e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}},{key:"toggleExpandedStyles",value:function(e){this.isAlive()&&(yo(this.getAriaElement(),e),this.eWrapper.classList.toggle("ag-picker-expanded",e),this.eWrapper.classList.toggle("ag-picker-collapsed",!e))}},{key:"onPickerFocusIn",value:function(){this.togglePickerHasFocus(!0)}},{key:"onPickerFocusOut",value:function(e){var t;(null==(t=this.pickerComponent)?void 0:t.getGui().contains(e.relatedTarget))||this.togglePickerHasFocus(!1)}},{key:"togglePickerHasFocus",value:function(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}},{key:"hidePicker",value:function(){this.hideCurrentPicker&&this.hideCurrentPicker()}},{key:"setInputWidth",value:function(e){return ja(this.eWrapper,e),this}},{key:"getFocusableElement",value:function(){return this.eWrapper}},{key:"setPickerGap",value:function(e){return this.pickerGap=e,this}},{key:"setPickerMinWidth",value:function(e){return"number"===typeof e&&(e="".concat(e,"px")),this.minPickerWidth=null==e?void 0:e,this}},{key:"setPickerMaxWidth",value:function(e){return"number"===typeof e&&(e="".concat(e,"px")),this.maxPickerWidth=null==e?void 0:e,this}},{key:"setPickerMaxHeight",value:function(e){return"number"===typeof e&&(e="".concat(e,"px")),this.maxPickerHeight=null==e?void 0:e,this}},{key:"destroy",value:function(){this.hidePicker(),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}}]),n}(Ys);Mn([Di("popupService")],Xs.prototype,"popupService",2),Mn([Ls("eLabel")],Xs.prototype,"eLabel",2),Mn([Ls("eWrapper")],Xs.prototype,"eWrapper",2),Mn([Ls("eDisplayField")],Xs.prototype,"eDisplayField",2),Mn([Ls("eIcon")],Xs.prototype,"eIcon",2);var qs=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,a.Z)(this,n),(e=t.call(this,'<div class="ag-list ag-'.concat(i,'-list" role="listbox"></div>'))).cssIdentifier=i,e.unFocusable=r,e.options=[],e.itemEls=[],e}return(0,s.Z)(n,[{key:"init",value:function(){var e=this,t=this.getGui();this.addManagedListener(t,"mouseleave",(function(){return e.clearHighlighted()})),this.unFocusable||this.addManagedListener(t,"keydown",this.handleKeyDown.bind(this))}},{key:"handleKeyDown",value:function(e){var t=e.key;switch(t){case hs.ENTER:if(this.highlightedEl){var n=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(n)}else this.setValue(this.getValue());break;case hs.DOWN:case hs.UP:var i,r=t===hs.DOWN;if(e.preventDefault(),this.highlightedEl){var o=this.itemEls.indexOf(this.highlightedEl)+(r?1:-1);o=Math.min(Math.max(o,0),this.itemEls.length-1),i=this.itemEls[o]}else i=this.itemEls[r?0:this.itemEls.length-1];this.highlightItem(i)}}},{key:"addOptions",value:function(e){var t=this;return e.forEach((function(e){return t.addOption(e)})),this}},{key:"addOption",value:function(e){var t=e.value,n=e.text||t;return this.options.push({value:t,text:n}),this.renderOption(t,n),this.updateIndices(),this}},{key:"clearOptions",value:function(){this.options=[],this.reset(!0),this.itemEls.forEach((function(e){Fa(e)})),this.itemEls=[]}},{key:"updateIndices",value:function(){var e=this.getGui().querySelectorAll(".ag-list-item");e.forEach((function(t,n){wo(t,n+1),ko(t,e.length)}))}},{key:"renderOption",value:function(e,t){var n=this,i=this.gridOptionsService.getDocument(),r=i.createElement("div");no(r,"option"),r.classList.add("ag-list-item","ag-".concat(this.cssIdentifier,"-list-item"));var o=i.createElement("span");r.appendChild(o),o.innerText=t,this.unFocusable||(r.tabIndex=-1),this.itemEls.push(r),this.addManagedListener(r,"mousemove",(function(){return n.highlightItem(r)})),this.addManagedListener(r,"mousedown",(function(t){t.preventDefault(),n.setValue(e)})),this.createManagedBean(new Ps({getTooltipValue:function(){return t},getGui:function(){return r},getLocation:function(){return"UNKNOWN"},shouldDisplayTooltip:function(){return o.scrollWidth>o.clientWidth}})),this.getGui().appendChild(r)}},{key:"setValue",value:function(e,t){if(this.value===e)return this.fireItemSelected(),this;if(null==e)return this.reset(t),this;var n=this.options.findIndex((function(t){return t.value===e}));if(-1!==n){var i=this.options[n];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.itemEls[n]),t||this.fireChangeEvent()}return this}},{key:"setValueByIndex",value:function(e){return this.setValue(this.options[e].value)}},{key:"getValue",value:function(){return this.value}},{key:"getDisplayValue",value:function(){return this.displayValue}},{key:"refreshHighlighted",value:function(){var e=this;this.clearHighlighted();var t=this.options.findIndex((function(t){return t.value===e.value}));-1!==t&&this.highlightItem(this.itemEls[t])}},{key:"reset",value:function(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}},{key:"highlightItem",value:function(e){if(Ga(e)){this.clearHighlighted(),this.highlightedEl=e,this.highlightedEl.classList.add(n.ACTIVE_CLASS),Po(this.highlightedEl,!0);var t=this.getGui(),i=t.getBoundingClientRect(),r=i.top+t.scrollTop,o=i.height,a=e.offsetTop;(a+e.offsetHeight>r+o||a<r)&&this.highlightedEl.scrollIntoView({block:"nearest"}),this.unFocusable||this.highlightedEl.focus()}}},{key:"clearHighlighted",value:function(){this.highlightedEl&&Ga(this.highlightedEl)&&(this.highlightedEl.classList.remove(n.ACTIVE_CLASS),Po(this.highlightedEl,!1),this.highlightedEl=null)}},{key:"fireChangeEvent",value:function(){this.dispatchEvent({type:Er.EVENT_FIELD_VALUE_CHANGED}),this.fireItemSelected()}},{key:"fireItemSelected",value:function(){this.dispatchEvent({type:n.EVENT_ITEM_SELECTED})}}]),n}(Ns);qs.EVENT_ITEM_SELECTED="selectedItem",qs.ACTIVE_CLASS="ag-active-item",Mn([Ei],qs.prototype,"init",1);var Qs=qs,Js=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){return(0,a.Z)(this,n),t.call(this,Tn({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"smallDown",ariaRole:"combobox"},e))}return(0,s.Z)(n,[{key:"postConstruct",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"postConstruct",this).call(this),this.createListComponent(),this.eWrapper.tabIndex=this.gridOptionsService.get("tabIndex");var e=this.config,t=e.options,i=e.value,r=e.placeholder;null!=t&&this.addOptions(t),null!=i&&this.setValue(i,!0),r&&null==i&&(this.eDisplayField.textContent=r),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this))}},{key:"onWrapperFocusOut",value:function(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}},{key:"createListComponent",value:function(){var e=this;this.listComponent=this.createBean(new Qs("select",!0)),this.listComponent.setParentComponent(this);var t=this.listComponent.getAriaElement(),i="ag-select-list-".concat(this.listComponent.getCompId());t.setAttribute("id",i),Mo(this.getAriaElement(),t),this.listComponent.addManagedListener(this.listComponent,Qs.EVENT_ITEM_SELECTED,(function(){e.hidePicker(),e.dispatchEvent({type:n.EVENT_ITEM_SELECTED})})),this.listComponent.addManagedListener(this.listComponent,Er.EVENT_FIELD_VALUE_CHANGED,(function(){e.listComponent&&(e.setValue(e.listComponent.getValue(),!1,!0),e.hidePicker())}))}},{key:"createPickerComponent",value:function(){return this.listComponent}},{key:"onKeyDown",value:function(e){var t,i=e.key;i===hs.TAB?this.hidePicker():!this.isPickerDisplayed||i!==hs.ENTER&&i!==hs.UP&&i!==hs.DOWN?(0,mn.Z)((0,yn.Z)(n.prototype),"onKeyDown",this).call(this,e):null==(t=this.listComponent)||t.handleKeyDown(e)}},{key:"showPicker",value:function(){this.listComponent&&((0,mn.Z)((0,yn.Z)(n.prototype),"showPicker",this).call(this),this.listComponent.refreshHighlighted())}},{key:"addOptions",value:function(e){var t=this;return e.forEach((function(e){return t.addOption(e)})),this}},{key:"addOption",value:function(e){return this.listComponent.addOption(e),this}},{key:"clearOptions",value:function(){var e;return null==(e=this.listComponent)||e.clearOptions(),this}},{key:"setValue",value:function(e,t,i){var r=this;if(this.value===e||!this.listComponent)return this;if(i||this.listComponent.setValue(e,!0),this.listComponent.getValue()===this.getValue())return this;var o=this.listComponent.getDisplayValue();return null==o&&this.config.placeholder&&(o=this.config.placeholder),this.eDisplayField.innerHTML=o,this.setTooltip({newTooltipText:null!=o?o:null,shouldDisplayTooltip:function(){return r.eDisplayField.scrollWidth>r.eDisplayField.clientWidth}}),(0,mn.Z)((0,yn.Z)(n.prototype),"setValue",this).call(this,e,t)}},{key:"destroy",value:function(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}}]),n}(Xs);Js.EVENT_ITEM_SELECTED="selectedItem";var $s=Js,el=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text",s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"input";return(0,a.Z)(this,n),(r=t.call(this,e,'\n            <div role="presentation">\n                <div ref="eLabel" class="ag-input-field-label"></div>\n                <div ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">\n                    <'.concat(s,' ref="eInput" class="ag-input-field-input"></').concat(s,">\n                </div>\n            </div>"),i)).inputType=o,r.displayFieldTag=s,r}return(0,s.Z)(n,[{key:"postConstruct",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"postConstruct",this).call(this),this.setInputType(),this.eLabel.classList.add("".concat(this.className,"-label")),this.eWrapper.classList.add("".concat(this.className,"-input-wrapper")),this.eInput.classList.add("".concat(this.className,"-input")),this.addCssClass("ag-input-field"),this.eInput.id=this.eInput.id||"ag-".concat(this.getCompId(),"-input");var e=this.config,t=e.inputName,i=e.inputWidth;null!=t&&this.setInputName(t),null!=i&&this.setInputWidth(i),this.addInputListeners(),this.activateTabIndex([this.eInput])}},{key:"addInputListeners",value:function(){var e=this;this.addManagedListener(this.eInput,"input",(function(t){return e.setValue(t.target.value)}))}},{key:"setInputType",value:function(){"input"===this.displayFieldTag&&this.eInput.setAttribute("type",this.inputType)}},{key:"getInputElement",value:function(){return this.eInput}},{key:"setInputWidth",value:function(e){return ja(this.eWrapper,e),this}},{key:"setInputName",value:function(e){return this.getInputElement().setAttribute("name",e),this}},{key:"getFocusableElement",value:function(){return this.eInput}},{key:"setMaxLength",value:function(e){return this.eInput.maxLength=e,this}},{key:"setInputPlaceholder",value:function(e){return es(this.eInput,"placeholder",e),this}},{key:"setInputAriaLabel",value:function(e){return so(this.eInput,e),this.refreshAriaLabelledBy(),this}},{key:"setDisabled",value:function(e){return Ea(this.eInput,e),(0,mn.Z)((0,yn.Z)(n.prototype),"setDisabled",this).call(this,e)}},{key:"setAutoComplete",value:function(e){if(!0===e)es(this.eInput,"autocomplete",null);else{var t="string"===typeof e?e:"off";es(this.eInput,"autocomplete",t)}return this}}]),n}(Ys);Mn([Ls("eLabel")],el.prototype,"eLabel",2),Mn([Ls("eWrapper")],el.prototype,"eWrapper",2),Mn([Ls("eInput")],el.prototype,"eInput",2);var tl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ag-checkbox",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"checkbox";return(0,a.Z)(this,n),(i=t.call(this,e,r,o)).labelAlignment="right",i.selected=!1,i.readOnly=!1,i.passive=!1,i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"postConstruct",this).call(this);var e=this.config,t=e.readOnly,i=e.passive;"boolean"===typeof t&&this.setReadOnly(t),"boolean"===typeof i&&this.setPassive(i)}},{key:"addInputListeners",value:function(){this.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this)),this.addManagedListener(this.eLabel,"click",this.toggle.bind(this))}},{key:"getNextValue",value:function(){return void 0===this.selected||!this.selected}},{key:"setPassive",value:function(e){this.passive=e}},{key:"isReadOnly",value:function(){return this.readOnly}},{key:"setReadOnly",value:function(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}},{key:"setDisabled",value:function(e){return this.eWrapper.classList.toggle("ag-disabled",e),(0,mn.Z)((0,yn.Z)(n.prototype),"setDisabled",this).call(this,e)}},{key:"toggle",value:function(){if(!this.eInput.disabled){var e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}}},{key:"getValue",value:function(){return this.isSelected()}},{key:"setValue",value:function(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}},{key:"setName",value:function(e){return this.getInputElement().name=e,this}},{key:"isSelected",value:function(){return this.selected}},{key:"setSelected",value:function(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))}},{key:"dispatchChange",value:function(e,t,n){this.dispatchEvent({type:Er.EVENT_FIELD_VALUE_CHANGED,selected:e,previousValue:t,event:n});var i=this.getInputElement(),r={type:Er.EVENT_CHECKBOX_CHANGED,id:i.id,name:i.name,selected:e,previousValue:t};this.eventService.dispatchEvent(r)}},{key:"onCheckboxClick",value:function(e){if(!this.passive&&!this.eInput.disabled){var t=this.isSelected(),n=this.selected=e.target.checked;this.refreshSelectedClass(n),this.dispatchChange(n,t,e)}}},{key:"refreshSelectedClass",value:function(e){this.eWrapper.classList.toggle("ag-checked",!0===e),this.eWrapper.classList.toggle("ag-indeterminate",null==e)}}]),n}(el),nl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){return(0,a.Z)(this,n),t.call(this,e,"ag-radio-button","radio")}return(0,s.Z)(n,[{key:"isSelected",value:function(){return this.eInput.checked}},{key:"toggle",value:function(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}},{key:"addInputListeners",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"addInputListeners",this).call(this),this.addManagedListener(this.eventService,Er.EVENT_CHECKBOX_CHANGED,this.onChange.bind(this))}},{key:"onChange",value:function(e){e.selected&&e.name&&this.eInput.name&&this.eInput.name===e.name&&e.id&&this.eInput.id!==e.id&&this.setValue(!1,!0)}}]),n}(tl),il=function(){function e(t,n,i){(0,a.Z)(this,e),this.localeService=t,this.optionsFactory=n,this.valueFormatter=i}return(0,s.Z)(e,[{key:"getModelAsString",value:function(e){var t=this;if(!e)return null;var n=null!=e.operator,i=this.localeService.getLocaleTextFunc();if(n){var r=e,o=r.conditions;if(!o)o=[r.condition1,r.condition2];var a=o.map((function(e){return t.getModelAsString(e)})),s="AND"===r.operator?"andCondition":"orCondition";return a.join(" ".concat(i(s,Zs[s])," "))}if(e.type===ol.BLANK||e.type===ol.NOT_BLANK)return i(e.type,e.type);var l=e,u=this.optionsFactory.getCustomOption(l.type),c=u||{},d=c.displayKey,h=c.displayName,p=c.numberOfInputs;return d&&h&&0===p?(i(d,h),h):this.conditionToString(l,u)}},{key:"updateParams",value:function(e){this.optionsFactory=e.optionsFactory}},{key:"formatValue",value:function(e){var t;return this.valueFormatter?null!=(t=this.valueFormatter(null!=e?e:null))?t:"":String(e)}}]),e}(),rl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).eTypes=[],e.eJoinOperatorPanels=[],e.eJoinOperatorsAnd=[],e.eJoinOperatorsOr=[],e.eConditionBodies=[],e.listener=function(){return e.onUiChanged()},e.lastUiCompletePosition=null,e.joinOperatorId=0,e}return(0,s.Z)(n,[{key:"getNumberOfInputs",value:function(e){var t=this.optionsFactory.getCustomOption(e);if(t){var i=t.numberOfInputs;return null!=i?i:1}var r=[n.EMPTY,n.NOT_BLANK,n.BLANK];return e&&r.indexOf(e)>=0?0:e===n.IN_RANGE?2:1}},{key:"onFloatingFilterChanged",value:function(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged(!0)}},{key:"setTypeFromFloatingFilter",value:function(e){var t=this;this.eTypes.forEach((function(n,i){0===i?n.setValue(e,!0):n.setValue(t.optionsFactory.getDefaultOption(),!0)}))}},{key:"getModelFromUi",value:function(){var e=this.getUiCompleteConditions();return 0===e.length?null:this.maxNumConditions>1&&e.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),condition1:e[0],condition2:e[1],conditions:e}:e[0]}},{key:"getConditionTypes",value:function(){return this.eTypes.map((function(e){return e.getValue()}))}},{key:"getConditionType",value:function(e){return this.eTypes[e].getValue()}},{key:"getJoinOperator",value:function(){return 0===this.eJoinOperatorsOr.length?this.defaultJoinOperator:!0===this.eJoinOperatorsOr[0].getValue()?"OR":"AND"}},{key:"areModelsEqual",value:function(e,t){var n=this;if(!e&&!t)return!0;if(!e&&t||e&&!t)return!1;var i,r=!e.operator,o=!t.operator;if(!r&&o||r&&!o)return!1;if(r){var a=e,s=t;i=this.areSimpleModelsEqual(a,s)}else{var l=e,u=t;i=l.operator===u.operator&&ji(l.conditions,u.conditions,(function(e,t){return n.areSimpleModelsEqual(e,t)}))}return i}},{key:"shouldRefresh",value:function(e){var t,n,i,r=this.getModel(),o=r?null!=(t=r.conditions)?t:[r]:null,a=null!=(i=null==(n=e.filterOptions)?void 0:n.map((function(e){return"string"===typeof e?e:e.displayKey})))?i:this.getDefaultFilterOptions();return!(o&&!o.every((function(e){return void 0!==a.find((function(t){return t===e.type}))})))&&!("number"===typeof e.maxNumConditions&&o&&o.length>e.maxNumConditions)}},{key:"refresh",value:function(e){return!!this.shouldRefresh(e)&&(!!(0,mn.Z)((0,yn.Z)(n.prototype),"refresh",this).call(this,e)&&(this.setParams(e),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),!0))}},{key:"setModelIntoUi",value:function(e){var t=this;if(e.operator){var n=e;n.conditions||(n.conditions=[n.condition1,n.condition2]);var i=this.validateAndUpdateConditions(n.conditions),r=this.getNumConditions();if(i<r)this.removeConditionsAndOperators(i);else if(i>r)for(var o=r;o<i;o++)this.createJoinOperatorPanel(),this.createOption();var a="OR"===n.operator;this.eJoinOperatorsAnd.forEach((function(e){return e.setValue(!a,!0)})),this.eJoinOperatorsOr.forEach((function(e){return e.setValue(a,!0)})),n.conditions.forEach((function(e,n){t.eTypes[n].setValue(e.type,!0),t.setConditionIntoUi(e,n)}))}else{var s=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(s.type,!0),this.setConditionIntoUi(s,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),Rs.resolve()}},{key:"validateAndUpdateConditions",value:function(e){var t=e.length;return t>this.maxNumConditions&&(e.splice(this.maxNumConditions),oi('Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'),t=this.maxNumConditions),t}},{key:"doesFilterPass",value:function(e){var t,n=this,i=this.getModel();if(null==i)return!0;var r=i.operator,a=[];if(r){var s=i;a.push.apply(a,(0,o.Z)(null!=(t=s.conditions)?t:[]))}else a.push(i);return a[r&&"OR"===r?"some":"every"]((function(t){return n.individualConditionPasses(e,t)}))}},{key:"setParams",value:function(e){(0,mn.Z)((0,yn.Z)(n.prototype),"setParams",this).call(this,e),this.setNumConditions(e),this.defaultJoinOperator=this.getDefaultJoinOperator(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.optionsFactory=new Gs,this.optionsFactory.init(e,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")}},{key:"setNumConditions",value:function(e){var t,n;null!=e.suppressAndOrCondition&&oi('Since v29.2 "filterParams.suppressAndOrCondition" is deprecated. Use "filterParams.maxNumConditions = 1" instead.'),null!=e.alwaysShowBothConditions&&oi('Since v29.2 "filterParams.alwaysShowBothConditions" is deprecated. Use "filterParams.numAlwaysVisibleConditions = 2" instead.'),this.maxNumConditions=null!=(t=e.maxNumConditions)?t:e.suppressAndOrCondition?1:2,this.maxNumConditions<1&&(oi('"filterParams.maxNumConditions" must be greater than or equal to zero.'),this.maxNumConditions=1),this.numAlwaysVisibleConditions=null!=(n=e.numAlwaysVisibleConditions)?n:e.alwaysShowBothConditions?2:1,this.numAlwaysVisibleConditions<1&&(oi('"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(oi('"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'),this.numAlwaysVisibleConditions=this.maxNumConditions)}},{key:"createOption",value:function(){var e=this,t=this.createManagedBean(new $s);this.eTypes.push(t),t.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(t.getGui());var n=this.createValueElement();this.eConditionBodies.push(n),this.eFilterBody.appendChild(n),this.putOptionsIntoDropdown(t),this.resetType(t);var i=this.getNumConditions()-1;this.forEachPositionInput(i,(function(t){return e.resetInput(t)})),this.addChangedListeners(t,i)}},{key:"createJoinOperatorPanel",value:function(){var e=document.createElement("div");this.eJoinOperatorPanels.push(e),e.classList.add("ag-filter-condition");var t=this.createJoinOperator(this.eJoinOperatorsAnd,e,"and"),n=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);var i=this.eJoinOperatorPanels.length-1,r=this.joinOperatorId++;this.resetJoinOperatorAnd(t,i,r),this.resetJoinOperatorOr(n,i,r),this.isReadOnly()||(t.onValueChange(this.listener),n.onValueChange(this.listener))}},{key:"createJoinOperator",value:function(e,t,n){var i=this.createManagedBean(new nl);return e.push(i),i.addCssClass("ag-filter-condition-operator"),i.addCssClass("ag-filter-condition-operator-".concat(n)),t.appendChild(i.getGui()),i}},{key:"getDefaultJoinOperator",value:function(e){return"AND"===e||"OR"===e?e:"AND"}},{key:"createFilterListOptions",value:function(){var e=this,t=this.optionsFactory.getFilterOptions();this.filterListOptions=t.map((function(t){return"string"===typeof t?e.createBoilerplateListOption(t):e.createCustomListOption(t)}))}},{key:"putOptionsIntoDropdown",value:function(e){this.filterListOptions.forEach((function(t){e.addOption(t)})),e.setDisabled(this.filterListOptions.length<=1)}},{key:"createBoilerplateListOption",value:function(e){return{value:e,text:this.translate(e)}}},{key:"createCustomListOption",value:function(e){var t=e.displayKey,n=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:n?this.localeService.getLocaleTextFunc()(n.displayKey,n.displayName):this.translate(t)}}},{key:"isAllowTwoConditions",value:function(){return this.maxNumConditions>=2}},{key:"createBodyTemplate",value:function(){return""}},{key:"getCssIdentifier",value:function(){return"simple-filter"}},{key:"updateUiVisibility",value:function(){var e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}},{key:"updateNumConditions",value:function(){for(var e,t=-1,n=!0,i=0;i<this.getNumConditions();i++)this.isConditionUiComplete(i)?t=i:n=!1;if(this.shouldAddNewConditionAtEnd(n))this.createJoinOperatorPanel(),this.createOption();else{var r=null!=(e=this.lastUiCompletePosition)?e:this.getNumConditions()-2;if(t<r){this.removeConditionsAndOperators(r+1);var o=t+1,a=r-o;a>0&&this.removeConditionsAndOperators(o,a),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=t}},{key:"updateConditionStatusesAndValues",value:function(e,t){var n=this;this.eTypes.forEach((function(t,i){var r=n.isConditionDisabled(i,e);t.setDisabled(r||n.filterListOptions.length<=1),1===i&&(Ea(n.eJoinOperatorPanels[0],r),n.eJoinOperatorsAnd[0].setDisabled(r),n.eJoinOperatorsOr[0].setDisabled(r))})),this.eConditionBodies.forEach((function(e,t){Sa(e,n.isConditionBodyVisible(t))}));var i="OR"===(null!=t?t:this.getJoinOperator());this.eJoinOperatorsAnd.forEach((function(e,t){e.setValue(!i,!0)})),this.eJoinOperatorsOr.forEach((function(e,t){e.setValue(i,!0)})),this.forEachInput((function(t,i,r,o){n.setElementDisplayed(t,i<o),n.setElementDisabled(t,n.isConditionDisabled(r,e))})),this.resetPlaceholder()}},{key:"shouldAddNewConditionAtEnd",value:function(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}},{key:"removeConditionsAndOperators",value:function(e,t){if(!(e>=this.getNumConditions())){this.removeComponents(this.eTypes,e,t),this.removeElements(this.eConditionBodies,e,t),this.removeValueElements(e,t);var n=Math.max(e-1,0);this.removeElements(this.eJoinOperatorPanels,n,t),this.removeComponents(this.eJoinOperatorsAnd,n,t),this.removeComponents(this.eJoinOperatorsOr,n,t)}}},{key:"removeElements",value:function(e,t,n){this.removeItems(e,t,n).forEach((function(e){return Fa(e)}))}},{key:"removeComponents",value:function(e,t,n){var i=this;this.removeItems(e,t,n).forEach((function(e){Fa(e.getGui()),i.destroyBean(e)}))}},{key:"removeItems",value:function(e,t,n){return null==n?e.splice(t):e.splice(t,n)}},{key:"afterGuiAttached",value:function(e){if((0,mn.Z)((0,yn.Z)(n.prototype),"afterGuiAttached",this).call(this,e),this.resetPlaceholder(),!(null==e?void 0:e.suppressFocus))if(this.isReadOnly())this.eFilterBody.focus();else{var t=this.getInputs(0)[0];if(!t)return;t instanceof el&&t.getInputElement().focus()}}},{key:"afterGuiDetached",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"afterGuiDetached",this).call(this);var e=this.getModel();this.resetUiToActiveModel(e);for(var t=-1,i=-1,r=!1,o=this.getJoinOperator(),a=this.getNumConditions()-1;a>=0;a--)if(this.isConditionUiComplete(a))-1===t&&(t=a,i=a);else{var s=a<t;(a>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(a-1)||s)&&(this.removeConditionsAndOperators(a,1),r=!0,s&&i--)}var l=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),l=!0),this.shouldAddNewConditionAtEnd(i===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),l=!0),l&&this.updateConditionStatusesAndValues(i,o),r&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=i}},{key:"getPlaceholderText",value:function(e,t){var n=this.translate(e);if(li(this.filterPlaceholder)){var i=this.filterPlaceholder,r=this.eTypes[t].getValue();n=i({filterOptionKey:r,filterOption:this.translate(r),placeholder:n})}else"string"===typeof this.filterPlaceholder&&(n=this.filterPlaceholder);return n}},{key:"resetPlaceholder",value:function(){var e=this,t=this.localeService.getLocaleTextFunc();this.forEachInput((function(n,i,r,o){if(n instanceof el){var a=0===i&&o>1?"inRangeStart":0===i?"filterOoo":"inRangeEnd",s=0===i&&o>1?t("ariaFilterFromValue","Filter from value"):0===i?t("ariaFilterValue","Filter Value"):t("ariaFilterToValue","Filter to Value");n.setInputPlaceholder(e.getPlaceholderText(a,r)),n.setInputAriaLabel(s)}}))}},{key:"setElementValue",value:function(e,t,n){e instanceof el&&e.setValue(null!=t?String(t):null,!0)}},{key:"setElementDisplayed",value:function(e,t){e instanceof Ns&&Sa(e.getGui(),t)}},{key:"setElementDisabled",value:function(e,t){e instanceof Ns&&Ea(e.getGui(),t)}},{key:"attachElementOnChange",value:function(e,t){e instanceof el&&e.onValueChange(t)}},{key:"forEachInput",value:function(e){var t=this;this.getConditionTypes().forEach((function(n,i){t.forEachPositionTypeInput(i,n,e)}))}},{key:"forEachPositionInput",value:function(e,t){var n=this.getConditionType(e);this.forEachPositionTypeInput(e,n,t)}},{key:"forEachPositionTypeInput",value:function(e,t,n){for(var i=this.getNumberOfInputs(t),r=this.getInputs(e),o=0;o<r.length;o++){var a=r[o];null!=a&&n(a,o,e,i)}}},{key:"isConditionDisabled",value:function(e,t){return!!this.isReadOnly()||0!==e&&e>t+1}},{key:"isConditionBodyVisible",value:function(e){var t=this.getConditionType(e);return this.getNumberOfInputs(t)>0}},{key:"isConditionUiComplete",value:function(e){return!(e>=this.getNumConditions())&&(this.getConditionType(e)!==n.EMPTY&&!this.getValues(e).some((function(e){return null==e})))}},{key:"getNumConditions",value:function(){return this.eTypes.length}},{key:"getUiCompleteConditions",value:function(){for(var e=[],t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}},{key:"createMissingConditionsAndOperators",value:function(){if(!this.isReadOnly())for(var e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}},{key:"resetUiToDefaults",value:function(e){var t=this;return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach((function(e){return t.resetType(e)})),this.eJoinOperatorsAnd.forEach((function(e,n){return t.resetJoinOperatorAnd(e,n,t.joinOperatorId+n)})),this.eJoinOperatorsOr.forEach((function(e,n){return t.resetJoinOperatorOr(e,n,t.joinOperatorId+n)})),this.joinOperatorId++,this.forEachInput((function(e){return t.resetInput(e)})),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,e||this.onUiChanged(),Rs.resolve()}},{key:"resetType",value:function(e){var t=this.localeService.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.getDefaultOption(),!0).setAriaLabel(t).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}},{key:"resetJoinOperatorAnd",value:function(e,t,n){this.resetJoinOperator(e,t,this.isDefaultOperator("AND"),this.translate("andCondition"),n)}},{key:"resetJoinOperatorOr",value:function(e,t,n){this.resetJoinOperator(e,t,this.isDefaultOperator("OR"),this.translate("orCondition"),n)}},{key:"resetJoinOperator",value:function(e,t,n,i,r){this.updateJoinOperatorDisabled(e.setValue(n,!0).setName("ag-simple-filter-and-or-".concat(this.getCompId(),"-").concat(r)).setLabel(i),t)}},{key:"updateJoinOperatorsDisabled",value:function(){var e=this;this.eJoinOperatorsAnd.forEach((function(t,n){return e.updateJoinOperatorDisabled(t,n)})),this.eJoinOperatorsOr.forEach((function(t,n){return e.updateJoinOperatorDisabled(t,n)}))}},{key:"updateJoinOperatorDisabled",value:function(e,t){e.setDisabled(this.isReadOnly()||t>0)}},{key:"resetInput",value:function(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}},{key:"setConditionIntoUi",value:function(e,t){var n=this,i=this.mapValuesFromModel(e);this.forEachInput((function(e,r,o,a){o===t&&n.setElementValue(e,null!=i[r]?i[r]:null)}))}},{key:"setValueFromFloatingFilter",value:function(e){var t=this;this.forEachInput((function(n,i,r,o){t.setElementValue(n,0===i&&0===r?e:null,!0)}))}},{key:"isDefaultOperator",value:function(e){return e===this.defaultJoinOperator}},{key:"addChangedListeners",value:function(e,t){var n=this;this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,(function(e){n.attachElementOnChange(e,n.listener)})))}},{key:"individualConditionPasses",value:function(e,t){var n=this.getCellValue(e.node),i=this.mapValuesFromModel(t),r=this.optionsFactory.getCustomOption(t.type),o=this.evaluateCustomFilter(r,i,n);return null!=o?o:null==n?this.evaluateNullValue(t.type):this.evaluateNonNullValue(i,n,t,e)}},{key:"evaluateCustomFilter",value:function(e,t,n){if(null!=e){var i=e.predicate;return null==i||t.some((function(e){return null==e}))?void 0:i(t,n)}}},{key:"isBlank",value:function(e){return null==e||"string"===typeof e&&0===e.trim().length}},{key:"hasInvalidInputs",value:function(){return!1}}]),n}(js);rl.EMPTY="empty",rl.BLANK="blank",rl.NOT_BLANK="notBlank",rl.EQUALS="equals",rl.NOT_EQUAL="notEqual",rl.LESS_THAN="lessThan",rl.LESS_THAN_OR_EQUAL="lessThanOrEqual",rl.GREATER_THAN="greaterThan",rl.GREATER_THAN_OR_EQUAL="greaterThanOrEqual",rl.IN_RANGE="inRange",rl.CONTAINS="contains",rl.NOT_CONTAINS="notContains",rl.STARTS_WITH="startsWith",rl.ENDS_WITH="endsWith";var ol=rl,al=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"setParams",value:function(e){(0,mn.Z)((0,yn.Z)(n.prototype),"setParams",this).call(this,e),this.scalarFilterParams=e}},{key:"evaluateNullValue",value:function(e){switch(e){case n.EQUALS:case n.NOT_EQUAL:if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case n.GREATER_THAN:case n.GREATER_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case n.LESS_THAN:case n.LESS_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case n.IN_RANGE:if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case n.BLANK:return!0;case n.NOT_BLANK:return!1}return!1}},{key:"evaluateNonNullValue",value:function(e,t,i){var r=this.comparator(),o=null!=e[0]?r(e[0],t):0;switch(i.type){case n.EQUALS:return 0===o;case n.NOT_EQUAL:return 0!==o;case n.GREATER_THAN:return o>0;case n.GREATER_THAN_OR_EQUAL:return o>=0;case n.LESS_THAN:return o<0;case n.LESS_THAN_OR_EQUAL:return o<=0;case n.IN_RANGE:var a=r(e[1],t);return this.scalarFilterParams.inRangeInclusive?o>=0&&a<=0:o>0&&a<0;case n.BLANK:return this.isBlank(t);case n.NOT_BLANK:return!this.isBlank(t);default:return console.warn('AG Grid: Unexpected type of filter "'+i.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}}}]),n}(ol),sl=1/0,ll=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r){var o;return(0,a.Z)(this,n),(o=t.call(this,i,r)).dateFilterParams=e,o}return(0,s.Z)(n,[{key:"conditionToString",value:function(e,t){var n=e.type,i=(t||{}).numberOfInputs,r=n==ol.IN_RANGE||2===i,o=va(e.dateFrom),a=va(e.dateTo),s=this.dateFilterParams.inRangeFloatingFilterDateFormat;if(r){var l=null!==o?fa(o,s):"null",u=null!==a?fa(a,s):"null";return"".concat(l,"-").concat(u)}return null!=o?fa(o,s):"".concat(n)}},{key:"updateParams",value:function(e){(0,mn.Z)((0,yn.Z)(n.prototype),"updateParams",this).call(this,e),this.dateFilterParams=e.dateFilterParams}}]),n}(il),ul=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.call(this,"dateFilter")).eConditionPanelsFrom=[],e.eConditionPanelsTo=[],e.dateConditionFromComps=[],e.dateConditionToComps=[],e.minValidYear=1e3,e.maxValidYear=sl,e.minValidDate=null,e.maxValidDate=null,e}return(0,s.Z)(n,[{key:"afterGuiAttached",value:function(e){(0,mn.Z)((0,yn.Z)(n.prototype),"afterGuiAttached",this).call(this,e),this.dateConditionFromComps[0].afterGuiAttached(e)}},{key:"mapValuesFromModel",value:function(e){var t=e||{},n=t.dateFrom,i=t.dateTo,r=t.type;return[n&&va(n)||null,i&&va(i)||null].slice(0,this.getNumberOfInputs(r))}},{key:"comparator",value:function(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)}},{key:"defaultComparator",value:function(e,t){return null==t||t<e?-1:t>e?1:0}},{key:"setParams",value:function(e){this.dateFilterParams=e,(0,mn.Z)((0,yn.Z)(n.prototype),"setParams",this).call(this,e);var t=function(t,n){if(null!=e[t]){if(!isNaN(e[t]))return null==e[t]?n:Number(e[t]);console.warn("AG Grid: DateFilter ".concat(t," is not a number"))}return n};this.minValidYear=t("minValidYear",1e3),this.maxValidYear=t("maxValidYear",sl),this.minValidYear>this.maxValidYear&&console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear"),e.minValidDate?this.minValidDate=e.minValidDate instanceof Date?e.minValidDate:va(e.minValidDate):this.minValidDate=null,e.maxValidDate?this.maxValidDate=e.maxValidDate instanceof Date?e.maxValidDate:va(e.maxValidDate):this.maxValidDate=null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&console.warn("AG Grid: DateFilter minValidDate should be <= maxValidDate"),this.filterModelFormatter=new ll(this.dateFilterParams,this.localeService,this.optionsFactory)}},{key:"createDateCompWrapper",value:function(e){var t=this,n=new _s(this.getContext(),this.userComponentFactory,{onDateChanged:function(){return t.onUiChanged()},filterParams:this.dateFilterParams},e);return this.addDestroyFunc((function(){return n.destroy()})),n}},{key:"setElementValue",value:function(e,t){e.setDate(t)}},{key:"setElementDisplayed",value:function(e,t){e.setDisplayed(t)}},{key:"setElementDisabled",value:function(e,t){e.setDisabled(t)}},{key:"getDefaultFilterOptions",value:function(){return n.DEFAULT_FILTER_OPTIONS}},{key:"createValueElement",value:function(){var e=document.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}},{key:"createFromToElement",value:function(e,t,n,i){var r=document.createElement("div");r.classList.add("ag-filter-".concat(i)),r.classList.add("ag-filter-date-".concat(i)),t.push(r),e.appendChild(r),n.push(this.createDateCompWrapper(r))}},{key:"removeValueElements",value:function(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)}},{key:"removeDateComps",value:function(e,t,n){this.removeItems(e,t,n).forEach((function(e){return e.destroy()}))}},{key:"isValidDateValue",value:function(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}},{key:"isConditionUiComplete",value:function(e){var t=this;if(!(0,mn.Z)((0,yn.Z)(n.prototype),"isConditionUiComplete",this).call(this,e))return!1;var i=!0;return this.forEachInput((function(n,r,o,a){o!==e||!i||r>=a||(i=i&&t.isValidDateValue(n.getDate()))})),i}},{key:"areSimpleModelsEqual",value:function(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}},{key:"getFilterType",value:function(){return"date"}},{key:"createCondition",value:function(e){var t=this.getConditionType(e),n={},i=this.getValues(e);return i.length>0&&(n.dateFrom=ha(i[0])),i.length>1&&(n.dateTo=ha(i[1])),Tn({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:t},n)}},{key:"resetPlaceholder",value:function(){var e=this.localeService.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),n=e("ariaFilterValue","Filter Value");this.forEachInput((function(e){e.setInputPlaceholder(t),e.setInputAriaLabel(n)}))}},{key:"getInputs",value:function(e){return e>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[e],this.dateConditionToComps[e]]}},{key:"getValues",value:function(e){var t=[];return this.forEachPositionInput(e,(function(e,n,i,r){n<r&&t.push(e.getDate())})),t}},{key:"translate",value:function(e){return e===al.LESS_THAN?(0,mn.Z)((0,yn.Z)(n.prototype),"translate",this).call(this,"before"):e===al.GREATER_THAN?(0,mn.Z)((0,yn.Z)(n.prototype),"translate",this).call(this,"after"):(0,mn.Z)((0,yn.Z)(n.prototype),"translate",this).call(this,e)}},{key:"getModelAsString",value:function(e){var t;return null!=(t=this.filterModelFormatter.getModelAsString(e))?t:""}}]),n}(al);ul.DEFAULT_FILTER_OPTIONS=[al.EQUALS,al.NOT_EQUAL,al.LESS_THAN,al.GREATER_THAN,al.IN_RANGE,al.BLANK,al.NOT_BLANK],Mn([Di("userComponentFactory")],ul.prototype,"userComponentFactory",2);var cl=ul,dl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"getDefaultDebounceMs",value:function(){return 0}},{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}},{key:"isEventFromFloatingFilter",value:function(e){return e&&e.afterFloatingFilter}},{key:"isEventFromDataChange",value:function(e){return null==e?void 0:e.afterDataChange}},{key:"getLastType",value:function(){return this.lastType}},{key:"isReadOnly",value:function(){return this.readOnly}},{key:"setLastTypeFromModel",value:function(e){if(e){var t;if(e.operator)t=e.conditions[0];else t=e;this.lastType=t.type}else this.lastType=this.optionsFactory.getDefaultOption()}},{key:"canWeEditAfterModelFromParentFilter",value:function(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;var t=e;return this.isTypeEditable(t.type)}},{key:"init",value:function(e){this.setSimpleParams(e,!1)}},{key:"setSimpleParams",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.optionsFactory=new Gs,this.optionsFactory.init(e.filterParams,this.getDefaultFilterOptions()),t||(this.lastType=this.optionsFactory.getDefaultOption()),this.readOnly=!!e.filterParams.readOnly;var n=this.isTypeEditable(this.optionsFactory.getDefaultOption());this.setEditable(n)}},{key:"onParamsUpdated",value:function(e){this.refresh(e)}},{key:"refresh",value:function(e){this.setSimpleParams(e)}},{key:"doesFilterHaveSingleInput",value:function(e){var t=(this.optionsFactory.getCustomOption(e)||{}).numberOfInputs;return null==t||1==t}},{key:"isTypeEditable",value:function(e){var t=[ol.IN_RANGE,ol.EMPTY,ol.BLANK,ol.NOT_BLANK];return!!e&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(e)&&t.indexOf(e)<0}}]),n}(Ns),hl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,'\n            <div class="ag-floating-filter-input" role="presentation">\n                <ag-input-text-field ref="eReadOnlyText"></ag-input-text-field>\n                <div ref="eDateWrapper" style="display: flex;"></div>\n            </div>')}return(0,s.Z)(n,[{key:"getDefaultFilterOptions",value:function(){return cl.DEFAULT_FILTER_OPTIONS}},{key:"init",value:function(e){(0,mn.Z)((0,yn.Z)(n.prototype),"init",this).call(this,e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent(),this.filterModelFormatter=new ll(this.filterParams,this.localeService,this.optionsFactory);var t=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}},{key:"onParamsUpdated",value:function(e){this.refresh(e)}},{key:"refresh",value:function(e){(0,mn.Z)((0,yn.Z)(n.prototype),"refresh",this).call(this,e),this.params=e,this.filterParams=e.filterParams,this.updateDateComponent(),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams}),this.updateCompOnModelChange(e.currentParentModel())}},{key:"updateCompOnModelChange",value:function(e){var t=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){if(e){var n=e;this.dateComp.setDate(va(n.dateFrom))}else this.dateComp.setDate(null);this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}},{key:"setEditable",value:function(e){Sa(this.eDateWrapper,e),Sa(this.eReadOnlyText.getGui(),!e)}},{key:"onParentModelChanged",value:function(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||((0,mn.Z)((0,yn.Z)(n.prototype),"setLastTypeFromModel",this).call(this,e),this.updateCompOnModelChange(e))}},{key:"onDateChanged",value:function(){var e=this,t=ha(this.dateComp.getDate());this.params.parentFilterInstance((function(n){if(n){var i=va(t);n.onFloatingFilterChanged(e.getLastType()||null,i)}}))}},{key:"getDateComponentParams",value:function(){var e=js.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:fi(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams}}},{key:"createDateComponent",value:function(){var e=this;this.dateComp=new _s(this.getContext(),this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper),this.addDestroyFunc((function(){return e.dateComp.destroy()}))}},{key:"updateDateComponent",value:function(){var e=this.gridOptionsService.addGridCommonParams(this.getDateComponentParams());this.dateComp.updateParams(e)}},{key:"getFilterModelFormatter",value:function(){return this.filterModelFormatter}}]),n}(dl);Mn([Di("userComponentFactory")],hl.prototype,"userComponentFactory",2),Mn([Ls("eReadOnlyText")],hl.prototype,"eReadOnlyText",2),Mn([Ls("eDateWrapper")],hl.prototype,"eDateWrapper",2);var pl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,'\n            <div class="ag-filter-filter">\n                <ag-input-text-field class="ag-date-filter" ref="eDateInput"></ag-input-text-field>\n            </div>')}return(0,s.Z)(n,[{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}},{key:"init",value:function(e){var t=this;this.params=e,this.setParams(e);var n=this.gridOptionsService.getDocument(),i=this.eDateInput.getInputElement();this.addManagedListener(i,"mousedown",(function(){t.eDateInput.isDisabled()||t.usingSafariDatePicker||i.focus()})),this.addManagedListener(i,"input",(function(e){e.target===n.activeElement&&(t.eDateInput.isDisabled()||t.params.onDateChanged())}))}},{key:"setParams",value:function(e){var t=this.eDateInput.getInputElement(),n=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=n&&Wo(),t.type=n?"date":"text";var i=e.filterParams||{},o=i.minValidYear,a=i.maxValidYear,s=i.minValidDate,l=i.maxValidDate;if(s&&o&&oi("DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored."),l&&a&&oi("DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored."),s&&l){var u=[s,l].map((function(e){return e instanceof Date?e:va(e)})),c=(0,r.Z)(u,2),d=c[0],h=c[1];d&&h&&d.getTime()>h.getTime()&&oi("DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")}s?s instanceof Date?t.min=fa(s):t.min=s:o&&(t.min="".concat(o,"-01-01")),l?l instanceof Date?t.max=fa(l):t.max=l:a&&(t.max="".concat(a,"-12-31"))}},{key:"onParamsUpdated",value:function(e){this.refresh(e)}},{key:"refresh",value:function(e){this.params=e,this.setParams(e)}},{key:"getDate",value:function(){return va(this.eDateInput.getValue())}},{key:"setDate",value:function(e){this.eDateInput.setValue(ha(e,!1))}},{key:"setInputPlaceholder",value:function(e){this.eDateInput.setInputPlaceholder(e)}},{key:"setDisabled",value:function(e){this.eDateInput.setDisabled(e)}},{key:"afterGuiAttached",value:function(e){e&&e.suppressFocus||this.eDateInput.getInputElement().focus()}},{key:"shouldUseBrowserDatePicker",value:function(e){return e.filterParams&&null!=e.filterParams.browserDatePicker?e.filterParams.browserDatePicker:Uo()||jo()||Wo()&&zo()>=14.1}}]),n}(Ns);Mn([Ls("eDateInput")],pl.prototype,"eDateInput",2);var fl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ag-text-field",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text";return(0,a.Z)(this,n),t.call(this,e,i,r)}return(0,s.Z)(n,[{key:"postConstruct",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"postConstruct",this).call(this),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}},{key:"setValue",value:function(e,t){return this.eInput.value!==e&&(this.eInput.value=Fn(e)?e:""),(0,mn.Z)((0,yn.Z)(n.prototype),"setValue",this).call(this,e,t)}},{key:"setStartValue",value:function(e){this.setValue(e,!0)}},{key:"preventDisallowedCharacters",value:function(){var e=new RegExp("[".concat(this.config.allowedCharPattern,"]"));this.addManagedListener(this.eInput,"keydown",(function(t){ps(t)&&t.key&&!e.test(t.key)&&t.preventDefault()})),this.addManagedListener(this.eInput,"paste",(function(t){var n,i=null==(n=t.clipboardData)?void 0:n.getData("text");i&&i.split("").some((function(t){return!e.test(t)}))&&t.preventDefault()}))}}]),n}(el),vl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){return(0,a.Z)(this,n),t.call(this,e,"ag-number-field","number")}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;(0,mn.Z)((0,yn.Z)(n.prototype),"postConstruct",this).call(this),this.addManagedListener(this.eInput,"blur",(function(){var t=parseFloat(e.eInput.value),n=isNaN(t)?"":e.normalizeValue(t.toString());e.value!==n&&e.setValue(n)})),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this)),this.eInput.step="any";var t=this.config,i=t.precision,r=t.min,o=t.max,a=t.step;"number"===typeof i&&this.setPrecision(i),"number"===typeof r&&this.setMin(r),"number"===typeof o&&this.setMax(o),"number"===typeof a&&this.setStep(a)}},{key:"onWheel",value:function(e){document.activeElement===this.eInput&&e.preventDefault()}},{key:"normalizeValue",value:function(e){if(""===e)return"";null!=this.precision&&(e=this.adjustPrecision(e));var 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}},{key:"adjustPrecision",value:function(e,t){if(null==this.precision)return e;if(t){var n=parseFloat(e).toFixed(this.precision);return parseFloat(n).toString()}var i=String(e).split(".");if(i.length>1){if(i[1].length<=this.precision)return e;if(this.precision>0)return"".concat(i[0],".").concat(i[1].slice(0,this.precision))}return i[0]}},{key:"setMin",value:function(e){return this.min===e||(this.min=e,es(this.eInput,"min",e)),this}},{key:"setMax",value:function(e){return this.max===e||(this.max=e,es(this.eInput,"max",e)),this}},{key:"setPrecision",value:function(e){return this.precision=e,this}},{key:"setStep",value:function(e){return this.step===e||(this.step=e,es(this.eInput,"step",e)),this}},{key:"setValue",value:function(e,t){var i=this;return this.setValueOrInputValue((function(e){return(0,mn.Z)((0,yn.Z)(n.prototype),"setValue",i).call(i,e,t)}),(function(){return i}),e)}},{key:"setStartValue",value:function(e){var t=this;return this.setValueOrInputValue((function(e){return(0,mn.Z)((0,yn.Z)(n.prototype),"setValue",t).call(t,e,!0)}),(function(e){t.eInput.value=e}),e)}},{key:"setValueOrInputValue",value:function(e,t,n){if(Fn(n)){var i=this.isScientificNotation(n);if(i&&this.eInput.validity.valid)return e(n);if(!i)i=(n=this.adjustPrecision(n))!=this.normalizeValue(n);if(i)return t(n)}return e(n)}},{key:"getValue",value:function(){if(this.eInput.validity.valid){var e=this.eInput.value;return this.isScientificNotation(e)?this.adjustPrecision(e,!0):(0,mn.Z)((0,yn.Z)(n.prototype),"getValue",this).call(this)}}},{key:"isScientificNotation",value:function(e){return"string"===typeof e&&e.includes("e")}}]),n}(fl),gl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"conditionToString",value:function(e,t){var n=(t||{}).numberOfInputs;return e.type==ol.IN_RANGE||2===n?"".concat(this.formatValue(e.filter),"-").concat(this.formatValue(e.filterTo)):null!=e.filter?this.formatValue(e.filter):"".concat(e.type)}}]),n}(il);function ml(e){var t=(null!=e?e:{}).allowedCharPattern;return null!=t?t:null}var yl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.call(this,"numberFilter")).eValuesFrom=[],e.eValuesTo=[],e}return(0,s.Z)(n,[{key:"refresh",value:function(e){return this.numberFilterParams.allowedCharPattern===e.allowedCharPattern&&(0,mn.Z)((0,yn.Z)(n.prototype),"refresh",this).call(this,e)}},{key:"mapValuesFromModel",value:function(e){var t=e||{},n=t.filter,i=t.filterTo,r=t.type;return[this.processValue(n),this.processValue(i)].slice(0,this.getNumberOfInputs(r))}},{key:"getDefaultDebounceMs",value:function(){return 500}},{key:"comparator",value:function(){return function(e,t){return e===t?0:e<t?1:-1}}},{key:"setParams",value:function(e){this.numberFilterParams=e,(0,mn.Z)((0,yn.Z)(n.prototype),"setParams",this).call(this,e),this.filterModelFormatter=new gl(this.localeService,this.optionsFactory,this.numberFilterParams.numberFormatter)}},{key:"getDefaultFilterOptions",value:function(){return n.DEFAULT_FILTER_OPTIONS}},{key:"setElementValue",value:function(e,t,i){var r=!i&&this.numberFilterParams.numberFormatter?this.numberFilterParams.numberFormatter(null!=t?t:null):t;(0,mn.Z)((0,yn.Z)(n.prototype),"setElementValue",this).call(this,e,r)}},{key:"createValueElement",value:function(){var e=ml(this.numberFilterParams),t=document.createElement("div");return t.classList.add("ag-filter-body"),no(t,"presentation"),this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}},{key:"createFromToElement",value:function(e,t,n,i){var r=this.createManagedBean(i?new fl({allowedCharPattern:i}):new vl);r.addCssClass("ag-filter-".concat(n)),r.addCssClass("ag-filter-filter"),t.push(r),e.appendChild(r.getGui())}},{key:"removeValueElements",value:function(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}},{key:"getValues",value:function(e){var t=this,n=[];return this.forEachPositionInput(e,(function(e,i,r,o){i<o&&n.push(t.processValue(t.stringToFloat(e.getValue())))})),n}},{key:"areSimpleModelsEqual",value:function(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}},{key:"getFilterType",value:function(){return"number"}},{key:"processValue",value:function(e){return null==e||isNaN(e)?null:e}},{key:"stringToFloat",value:function(e){if("number"===typeof e)return e;var t=In(e);return null!=t&&""===t.trim()&&(t=null),this.numberFilterParams.numberParser?this.numberFilterParams.numberParser(t):null==t||"-"===t.trim()?null:parseFloat(t)}},{key:"createCondition",value:function(e){var t=this.getConditionType(e),n={filterType:this.getFilterType(),type:t},i=this.getValues(e);return i.length>0&&(n.filter=i[0]),i.length>1&&(n.filterTo=i[1]),n}},{key:"getInputs",value:function(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]}},{key:"getModelAsString",value:function(e){var t;return null!=(t=this.filterModelFormatter.getModelAsString(e))?t:""}},{key:"hasInvalidInputs",value:function(){var e=!1;return this.forEachInput((function(t){t.getInputElement().validity.valid||(e=!0)})),e}}]),n}(al);yl.DEFAULT_FILTER_OPTIONS=[al.EQUALS,al.NOT_EQUAL,al.GREATER_THAN,al.GREATER_THAN_OR_EQUAL,al.LESS_THAN,al.LESS_THAN_OR_EQUAL,al.IN_RANGE,al.BLANK,al.NOT_BLANK];var Cl=yl,kl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"conditionToString",value:function(e,t){var n=(t||{}).numberOfInputs;return e.type==ol.IN_RANGE||2===n?"".concat(e.filter,"-").concat(e.filterTo):null!=e.filter?"".concat(e.filter):"".concat(e.type)}}]),n}(il),wl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.call(this,"textFilter")).eValuesFrom=[],e.eValuesTo=[],e}return(0,s.Z)(n,[{key:"getDefaultDebounceMs",value:function(){return 500}},{key:"setParams",value:function(e){this.textFilterParams=e,(0,mn.Z)((0,yn.Z)(n.prototype),"setParams",this).call(this,e),this.matcher=this.getTextMatcher(),this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?n.DEFAULT_FORMATTER:n.DEFAULT_LOWERCASE_FORMATTER),this.filterModelFormatter=new kl(this.localeService,this.optionsFactory)}},{key:"getTextMatcher",value:function(){var e=this.textFilterParams.textCustomComparator;return e?(Es.warnOnce("textCustomComparator is deprecated, use textMatcher instead."),function(t){var n=t.filterOption,i=t.value,r=t.filterText;return e(n,i,r)}):this.textFilterParams.textMatcher||n.DEFAULT_MATCHER}},{key:"createCondition",value:function(e){var t=this.getConditionType(e),n={filterType:this.getFilterType(),type:t},i=this.getValuesWithSideEffects(e,!0);return i.length>0&&(n.filter=i[0]),i.length>1&&(n.filterTo=i[1]),n}},{key:"getFilterType",value:function(){return"text"}},{key:"areSimpleModelsEqual",value:function(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}},{key:"getInputs",value:function(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]}},{key:"getValues",value:function(e){return this.getValuesWithSideEffects(e,!1)}},{key:"getValuesWithSideEffects",value:function(e,t){var i=this,r=[];return this.forEachPositionInput(e,(function(e,o,a,s){var l;if(o<s){var u=In(e.getValue());t&&i.textFilterParams.trimInput&&(u=null!=(l=n.trimInput(u))?l:null,e.setValue(u,!0)),r.push(u)}})),r}},{key:"getDefaultFilterOptions",value:function(){return n.DEFAULT_FILTER_OPTIONS}},{key:"createValueElement",value:function(){var e=document.createElement("div");return e.classList.add("ag-filter-body"),no(e,"presentation"),this.createFromToElement(e,this.eValuesFrom,"from"),this.createFromToElement(e,this.eValuesTo,"to"),e}},{key:"createFromToElement",value:function(e,t,n){var i=this.createManagedBean(new fl);i.addCssClass("ag-filter-".concat(n)),i.addCssClass("ag-filter-filter"),t.push(i),e.appendChild(i.getGui())}},{key:"removeValueElements",value:function(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}},{key:"mapValuesFromModel",value:function(e){var t=e||{},n=t.filter,i=t.filterTo,r=t.type;return[n||null,i||null].slice(0,this.getNumberOfInputs(r))}},{key:"evaluateNullValue",value:function(e){var t=[ol.NOT_EQUAL,ol.NOT_CONTAINS,ol.BLANK];return!!e&&t.indexOf(e)>=0}},{key:"evaluateNonNullValue",value:function(e,t,n,i){var r=this,o=e.map((function(e){return r.formatter(e)}))||[],a=this.formatter(t),s=this.textFilterParams,l=s.api,u=s.colDef,c=s.column,d=s.columnApi,h=s.context,p=s.textFormatter;if(n.type===ol.BLANK)return this.isBlank(t);if(n.type===ol.NOT_BLANK)return!this.isBlank(t);var f={api:l,colDef:u,column:c,columnApi:d,context:h,node:i.node,data:i.data,filterOption:n.type,value:a,textFormatter:p};return o.some((function(e){return r.matcher(On(Tn({},f),{filterText:e}))}))}},{key:"getModelAsString",value:function(e){var t;return null!=(t=this.filterModelFormatter.getModelAsString(e))?t:""}}],[{key:"trimInput",value:function(e){var t=e&&e.trim();return""===t?e:t}}]),n}(ol);wl.DEFAULT_FILTER_OPTIONS=[ol.CONTAINS,ol.NOT_CONTAINS,ol.EQUALS,ol.NOT_EQUAL,ol.STARTS_WITH,ol.ENDS_WITH,ol.BLANK,ol.NOT_BLANK],wl.DEFAULT_FORMATTER=function(e){return e},wl.DEFAULT_LOWERCASE_FORMATTER=function(e){return null==e?null:e.toString().toLowerCase()},wl.DEFAULT_MATCHER=function(e){var t=e.filterOption,n=e.value,i=e.filterText;if(null==i)return!1;switch(t){case wl.CONTAINS:return n.indexOf(i)>=0;case wl.NOT_CONTAINS:return n.indexOf(i)<0;case wl.EQUALS:return n===i;case wl.NOT_EQUAL:return n!=i;case wl.STARTS_WITH:return 0===n.indexOf(i);case wl.ENDS_WITH:var r=n.lastIndexOf(i);return r>=0&&r===n.length-i.length;default:return!1}};var Sl=wl,bl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).params=e,i.valueChangedListener=function(){},i}return(0,s.Z)(n,[{key:"setupGui",value:function(e){var t,n=this;this.eFloatingFilterTextInput=this.createManagedBean(new fl(null==(t=this.params)?void 0:t.config));var i=this.eFloatingFilterTextInput.getGui();e.appendChild(i),this.addManagedListener(i,"input",(function(e){return n.valueChangedListener(e)})),this.addManagedListener(i,"keydown",(function(e){return n.valueChangedListener(e)}))}},{key:"setEditable",value:function(e){this.eFloatingFilterTextInput.setDisabled(!e)}},{key:"setAutoComplete",value:function(e){this.eFloatingFilterTextInput.setAutoComplete(e)}},{key:"getValue",value:function(){return this.eFloatingFilterTextInput.getValue()}},{key:"setValue",value:function(e,t){this.eFloatingFilterTextInput.setValue(e,t)}},{key:"setValueChangedListener",value:function(e){this.valueChangedListener=e}},{key:"setParams",value:function(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)}},{key:"setAriaLabel",value:function(e){this.eFloatingFilterTextInput.setInputAriaLabel(e)}}]),n}(kr),El=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.setTemplate('\n            <div class="ag-floating-filter-input" role="presentation" ref="eFloatingFilterInputContainer"></div>\n        ')}},{key:"getDefaultDebounceMs",value:function(){return 500}},{key:"onParentModelChanged",value:function(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(e)))}},{key:"init",value:function(e){this.setupFloatingFilterInputService(e),(0,mn.Z)((0,yn.Z)(n.prototype),"init",this).call(this,e),this.setTextInputParams(e)}},{key:"setupFloatingFilterInputService",value:function(e){this.floatingFilterInputService=this.createFloatingFilterInputService(e),this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer)}},{key:"setTextInputParams",value:function(e){var t;this.params=e;var n=null!=(t=e.browserAutoComplete)&&t;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:n}),this.applyActive=js.isUseApplyButton(this.params.filterParams),!this.isReadOnly()){var i=js.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),r=fi(this.syncUpWithParentFilter.bind(this),i);this.floatingFilterInputService.setValueChangedListener(r)}}},{key:"onParamsUpdated",value:function(e){this.refresh(e)}},{key:"refresh",value:function(e){(0,mn.Z)((0,yn.Z)(n.prototype),"refresh",this).call(this,e),this.setTextInputParams(e)}},{key:"recreateFloatingFilterInputService",value:function(e){var t=this.floatingFilterInputService.getValue();Ia(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(e),this.floatingFilterInputService.setValue(t,!0)}},{key:"getAriaLabel",value:function(e){var t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),n=this.localeService.getLocaleTextFunc();return"".concat(t," ").concat(n("ariaFilterInput","Filter Input"))}},{key:"syncUpWithParentFilter",value:function(e){var t=this,n=e.key===hs.ENTER;if(!this.applyActive||n){var i=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(i=Sl.trimInput(i),this.floatingFilterInputService.setValue(i,!0)),this.params.parentFilterInstance((function(e){e&&e.onFloatingFilterChanged(t.getLastType()||null,i||null)}))}}},{key:"setEditable",value:function(e){this.floatingFilterInputService.setEditable(e)}}]),n}(dl);Mn([Di("columnModel")],El.prototype,"columnModel",2),Mn([Ls("eFloatingFilterInputContainer")],El.prototype,"eFloatingFilterInputContainer",2),Mn([Ei],El.prototype,"postConstruct",1);var xl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).valueChangedListener=function(){},e.numberInputActive=!0,e}return(0,s.Z)(n,[{key:"setupGui",value:function(e){var t=this;this.eFloatingFilterNumberInput=this.createManagedBean(new vl),this.eFloatingFilterTextInput=this.createManagedBean(new fl),this.eFloatingFilterTextInput.setDisabled(!0);var n=this.eFloatingFilterNumberInput.getGui(),i=this.eFloatingFilterTextInput.getGui();e.appendChild(n),e.appendChild(i),this.setupListeners(n,(function(e){return t.valueChangedListener(e)})),this.setupListeners(i,(function(e){return t.valueChangedListener(e)}))}},{key:"setEditable",value:function(e){this.numberInputActive=e,this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive),this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive)}},{key:"setAutoComplete",value:function(e){this.eFloatingFilterNumberInput.setAutoComplete(e),this.eFloatingFilterTextInput.setAutoComplete(e)}},{key:"getValue",value:function(){return this.getActiveInputElement().getValue()}},{key:"setValue",value:function(e,t){this.getActiveInputElement().setValue(e,t)}},{key:"getActiveInputElement",value:function(){return this.numberInputActive?this.eFloatingFilterNumberInput:this.eFloatingFilterTextInput}},{key:"setValueChangedListener",value:function(e){this.valueChangedListener=e}},{key:"setupListeners",value:function(e,t){this.addManagedListener(e,"input",t),this.addManagedListener(e,"keydown",t)}},{key:"setParams",value:function(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)}},{key:"setAriaLabel",value:function(e){this.eFloatingFilterNumberInput.setInputAriaLabel(e),this.eFloatingFilterTextInput.setInputAriaLabel(e)}}]),n}(kr),Rl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"init",value:function(e){var t;(0,mn.Z)((0,yn.Z)(n.prototype),"init",this).call(this,e),this.filterModelFormatter=new gl(this.localeService,this.optionsFactory,null==(t=e.filterParams)?void 0:t.numberFormatter)}},{key:"onParamsUpdated",value:function(e){this.refresh(e)}},{key:"refresh",value:function(e){ml(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),(0,mn.Z)((0,yn.Z)(n.prototype),"refresh",this).call(this,e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}},{key:"getDefaultFilterOptions",value:function(){return Cl.DEFAULT_FILTER_OPTIONS}},{key:"getFilterModelFormatter",value:function(){return this.filterModelFormatter}},{key:"createFloatingFilterInputService",value:function(e){return this.allowedCharPattern=ml(e.filterParams),this.allowedCharPattern?this.createManagedBean(new bl({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new xl)}}]),n}(El),Dl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"init",value:function(e){(0,mn.Z)((0,yn.Z)(n.prototype),"init",this).call(this,e),this.filterModelFormatter=new kl(this.localeService,this.optionsFactory)}},{key:"onParamsUpdated",value:function(e){this.refresh(e)}},{key:"refresh",value:function(e){(0,mn.Z)((0,yn.Z)(n.prototype),"refresh",this).call(this,e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}},{key:"getDefaultFilterOptions",value:function(){return Sl.DEFAULT_FILTER_OPTIONS}},{key:"getFilterModelFormatter",value:function(){return this.filterModelFormatter}},{key:"createFloatingFilterInputService",value:function(){return this.createManagedBean(new bl)}}]),n}(El),Tl=function(){function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,a.Z)(this,e),this.destroyFuncs=[],this.touching=!1,this.eventService=new Mi,this.eElement=t,this.preventMouseClick=i;var r=this.onTouchStart.bind(this),o=this.onTouchMove.bind(this),s=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",r,{passive:!0}),this.eElement.addEventListener("touchmove",o,{passive:!0}),this.eElement.addEventListener("touchend",s,{passive:!1}),this.destroyFuncs.push((function(){n.eElement.removeEventListener("touchstart",r,{passive:!0}),n.eElement.removeEventListener("touchmove",o,{passive:!0}),n.eElement.removeEventListener("touchend",s,{passive:!1})}))}return(0,s.Z)(e,[{key:"getActiveTouch",value:function(e){for(var t=0;t<e.length;t++){if(e[t].identifier===this.touchStart.identifier)return e[t]}return null}},{key:"addEventListener",value:function(e,t){this.eventService.addEventListener(e,t)}},{key:"removeEventListener",value:function(e,t){this.eventService.removeEventListener(e,t)}},{key:"onTouchStart",value:function(t){var n=this;if(!this.touching){this.touchStart=t.touches[0],this.touching=!0,this.moved=!1;var i=this.touchStart;window.setTimeout((function(){var r=n.touchStart===i;if(n.touching&&r&&!n.moved){n.moved=!0;var o={type:e.EVENT_LONG_TAP,touchStart:n.touchStart,touchEvent:t};n.eventService.dispatchEvent(o)}}),500)}}},{key:"onTouchMove",value:function(e){if(this.touching){var t=this.getActiveTouch(e.touches);if(t)!Cs(t,this.touchStart,4)&&(this.moved=!0)}}},{key:"onTouchEnd",value:function(t){if(this.touching){if(!this.moved){var n={type:e.EVENT_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(n),this.checkForDoubleTap()}this.preventMouseClick&&t.cancelable&&t.preventDefault(),this.touching=!1}}},{key:"checkForDoubleTap",value:function(){var t=(new Date).getTime();if(this.lastTapTime&&this.lastTapTime>0)if(t-this.lastTapTime>e.DOUBLE_TAP_MILLIS){var n={type:e.EVENT_DOUBLE_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(n),this.lastTapTime=null}else this.lastTapTime=t;else this.lastTapTime=t}},{key:"destroy",value:function(){this.destroyFuncs.forEach((function(e){return e()}))}}]),e}();Tl.EVENT_TAP="tap",Tl.EVENT_DOUBLE_TAP="doubleTap",Tl.EVENT_LONG_TAP="longTap",Tl.DOUBLE_TAP_MILLIS=500;var Ol=Tl,Pl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),i=t.call(this),e||i.setTemplate(n.TEMPLATE),i}return(0,s.Z)(n,[{key:"attachCustomElements",value:function(e,t,n,i,r){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=n,this.eSortMixed=i,this.eSortNone=r}},{key:"setupSort",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.column=e,this.suppressOrder=n,this.setupMultiSortIndicator(),this.column.isSortable()&&(this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addManagedPropertyListener("unSortIcon",(function(){return t.updateIcons()})),this.addManagedListener(this.eventService,Er.EVENT_NEW_COLUMNS_LOADED,(function(){return t.updateIcons()})),this.addManagedListener(this.eventService,Er.EVENT_SORT_CHANGED,(function(){return t.onSortChanged()})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return t.onSortChanged()})),this.onSortChanged())}},{key:"addInIcon",value:function(e,t,n){if(null!=t){var i=cs(e,this.gridOptionsService,n);i&&t.appendChild(i)}}},{key:"onSortChanged",value:function(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}},{key:"updateIcons",value:function(){var e=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc){var t="asc"===e;Sa(this.eSortAsc,t,{skipAriaHidden:!0})}if(this.eSortDesc){var n="desc"===e;Sa(this.eSortDesc,n,{skipAriaHidden:!0})}if(this.eSortNone){var i=!this.column.getColDef().unSortIcon&&!this.gridOptionsService.get("unSortIcon"),r=null===e||void 0===e;Sa(this.eSortNone,!i&&r,{skipAriaHidden:!0})}}},{key:"setupMultiSortIndicator",value:function(){var e=this;this.addInIcon("sortUnSort",this.eSortMixed,this.column);var t=this.column.getColDef().showRowGroup;this.gridOptionsService.isColumnsSortingCoupledToGroup()&&t&&(this.addManagedListener(this.eventService,Er.EVENT_SORT_CHANGED,(function(){return e.updateMultiSortIndicator()})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return e.updateMultiSortIndicator()})),this.updateMultiSortIndicator())}},{key:"updateMultiSortIndicator",value:function(){if(this.eSortMixed){var e="mixed"===this.sortController.getDisplaySortForColumn(this.column);Sa(this.eSortMixed,e,{skipAriaHidden:!0})}}},{key:"updateSortOrder",value:function(){var e,t=this;if(this.eSortOrder){var n=this.sortController.getColumnsWithSortingOrdered(),i=null!=(e=this.sortController.getDisplaySortIndexForColumn(this.column))?e:-1,r=n.some((function(e){var n;return null!=(n=t.sortController.getDisplaySortIndexForColumn(e))&&n})),o=i>=0&&r;Sa(this.eSortOrder,o,{skipAriaHidden:!0}),i>=0?this.eSortOrder.textContent=(i+1).toString():Ia(this.eSortOrder)}}}]),n}(Ns);Pl.TEMPLATE='<span class="ag-sort-indicator-container">\n            <span ref="eSortOrder" class="ag-sort-indicator-icon ag-sort-order ag-hidden" aria-hidden="true"></span>\n            <span ref="eSortAsc" class="ag-sort-indicator-icon ag-sort-ascending-icon ag-hidden" aria-hidden="true"></span>\n            <span ref="eSortDesc" class="ag-sort-indicator-icon ag-sort-descending-icon ag-hidden" aria-hidden="true"></span>\n            <span ref="eSortMixed" class="ag-sort-indicator-icon ag-sort-mixed-icon ag-hidden" aria-hidden="true"></span>\n            <span ref="eSortNone" class="ag-sort-indicator-icon ag-sort-none-icon ag-hidden" aria-hidden="true"></span>\n        </span>',Mn([Ls("eSortOrder")],Pl.prototype,"eSortOrder",2),Mn([Ls("eSortAsc")],Pl.prototype,"eSortAsc",2),Mn([Ls("eSortDesc")],Pl.prototype,"eSortDesc",2),Mn([Ls("eSortMixed")],Pl.prototype,"eSortMixed",2),Mn([Ls("eSortNone")],Pl.prototype,"eSortNone",2),Mn([Di("columnModel")],Pl.prototype,"columnModel",2),Mn([Di("sortController")],Pl.prototype,"sortController",2);var Al=Pl,Ml=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).lastMovingChanged=0,e}return(0,s.Z)(n,[{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}},{key:"refresh",value:function(e){return this.params=e,this.workOutTemplate()==this.currentTemplate&&(this.workOutShowMenu()==this.currentShowMenu&&(this.workOutSort()==this.currentSort&&(this.shouldSuppressMenuHide()==this.currentSuppressMenuHide&&(this.setDisplayName(e),!0))))}},{key:"workOutTemplate",value:function(){var e,t=null!=(e=this.params.template)?e:n.TEMPLATE;return t=t&&t.trim?t.trim():t}},{key:"init",value:function(e){this.params=e,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate),this.setupTap(),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setupFilterButton(),this.setDisplayName(e)}},{key:"setDisplayName",value:function(e){if(this.currentDisplayName!=e.displayName){this.currentDisplayName=e.displayName;var t=Lr(this.currentDisplayName,!0);this.eText&&(this.eText.textContent=t)}}},{key:"addInIcon",value:function(e,t,n){if(null!=t){var i=cs(e,this.gridOptionsService,n);i&&t.appendChild(i)}}},{key:"setupTap",value:function(){var e=this;if(!this.gridOptionsService.get("suppressTouch")){var t=new Ol(this.getGui(),!0),n=this.shouldSuppressMenuHide(),i=n&&Fn(this.eMenu),r=i?new Ol(this.eMenu,!0):t;if(this.params.enableMenu){var o=i?"EVENT_TAP":"EVENT_LONG_TAP";this.addManagedListener(r,Ol[o],(function(t){return e.params.showColumnMenuAfterMouseClick(t.touchStart)}))}if(this.params.enableSorting){this.addManagedListener(t,Ol.EVENT_TAP,(function(t){var i,r,o=t.touchStart.target;n&&((null==(i=e.eMenu)?void 0:i.contains(o))||(null==(r=e.eFilterButton)?void 0:r.contains(o)))||e.sortController.progressSort(e.params.column,!1,"uiColumnSorted")}))}if(this.params.enableFilterButton){var a=new Ol(this.eFilterButton,!0);this.addManagedListener(a,"tap",(function(){return e.params.showFilter(e.eFilterButton)})),this.addDestroyFunc((function(){return a.destroy()}))}this.addDestroyFunc((function(){return t.destroy()})),i&&this.addDestroyFunc((function(){return r.destroy()}))}}},{key:"workOutShowMenu",value:function(){return this.params.enableMenu&&this.menuService.isHeaderMenuButtonEnabled()}},{key:"shouldSuppressMenuHide",value:function(){return this.menuService.isHeaderMenuButtonAlwaysShowEnabled()}},{key:"setMenu",value:function(){var e=this;if(this.eMenu){if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu)return Fa(this.eMenu),void(this.eMenu=void 0);var t=this.menuService.isLegacyMenuEnabled();this.addInIcon(t?"menu":"menuAlt",this.eMenu,this.params.column),this.eMenu.classList.toggle("ag-header-menu-icon",!t),this.currentSuppressMenuHide=this.shouldSuppressMenuHide(),this.addManagedListener(this.eMenu,"click",(function(){return e.params.showColumnMenu(e.eMenu)})),this.eMenu.classList.toggle("ag-header-menu-always-show",this.currentSuppressMenuHide)}}},{key:"onMenuKeyboardShortcut",value:function(e){var t,n,i,r,o=this.params.column,a=this.menuService.isLegacyMenuEnabled();if(e&&!a){if(this.menuService.isFilterMenuInHeaderEnabled(o))return this.params.showFilter(null!=(n=null!=(t=this.eFilterButton)?t:this.eMenu)?n:this.getGui()),!0}else if(this.params.enableMenu)return this.params.showColumnMenu(null!=(r=null!=(i=this.eMenu)?i:this.eFilterButton)?r:this.getGui()),!0;return!1}},{key:"workOutSort",value:function(){return this.params.enableSorting}},{key:"setupSort",value:function(){var e=this;if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.context.createBean(new Al(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDesc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),this.currentSort){this.addManagedListener(this.params.column,Gi.EVENT_MOVING_CHANGED,(function(){e.lastMovingChanged=(new Date).getTime()})),this.eLabel&&this.addManagedListener(this.eLabel,"click",(function(t){var n=e.params.column.isMoving(),i=(new Date).getTime()-e.lastMovingChanged<50;if(!(n||i)){var r="ctrl"===e.gridOptionsService.get("multiSortKey")?t.ctrlKey||t.metaKey:t.shiftKey;e.params.progressSort(r)}}));var t=function(){if(e.addOrRemoveCssClass("ag-header-cell-sorted-asc",e.params.column.isSortAscending()),e.addOrRemoveCssClass("ag-header-cell-sorted-desc",e.params.column.isSortDescending()),e.addOrRemoveCssClass("ag-header-cell-sorted-none",e.params.column.isSortNone()),e.params.column.getColDef().showRowGroup){var t=e.columnModel.getSourceColumnsForGroupColumn(e.params.column),n=!(null==t?void 0:t.every((function(t){return e.params.column.getSort()==t.getSort()})));e.addOrRemoveCssClass("ag-header-cell-sorted-mixed",n)}};this.addManagedListener(this.eventService,Er.EVENT_SORT_CHANGED,t),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}}},{key:"setupFilterIcon",value:function(){this.eFilter&&this.configureFilter(this.params.enableFilterIcon,this.eFilter,this.onFilterChangedIcon.bind(this))}},{key:"setupFilterButton",value:function(){var e=this;this.eFilterButton&&(this.configureFilter(this.params.enableFilterButton,this.eFilterButton,this.onFilterChangedButton.bind(this))?this.addManagedListener(this.eFilterButton,"click",(function(){return e.params.showFilter(e.eFilterButton)})):this.eFilterButton=void 0)}},{key:"configureFilter",value:function(e,t,n){if(!e)return Fa(t),!1;var i=this.params.column;return this.addInIcon("filter",t,i),this.addManagedListener(i,Gi.EVENT_FILTER_CHANGED,n),n(),!0}},{key:"onFilterChangedIcon",value:function(){var e=this.params.column.isFilterActive();Sa(this.eFilter,e,{skipAriaHidden:!0})}},{key:"onFilterChangedButton",value:function(){var e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}},{key:"getAnchorElementForMenu",value:function(e){var t,n,i,r;return e?null!=(n=null!=(t=this.eFilterButton)?t:this.eMenu)?n:this.getGui():null!=(r=null!=(i=this.eMenu)?i:this.eFilterButton)?r:this.getGui()}}]),n}(Ns);Ml.TEMPLATE='<div class="ag-cell-label-container" role="presentation">\n            <span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>\n            <span ref="eFilterButton" class="ag-header-icon ag-header-cell-filter-button" aria-hidden="true"></span>\n            <div ref="eLabel" class="ag-header-cell-label" role="presentation">\n                <span ref="eText" class="ag-header-cell-text"></span>\n                <span ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>\n                <ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator>\n            </div>\n        </div>',Mn([Di("sortController")],Ml.prototype,"sortController",2),Mn([Di("menuService")],Ml.prototype,"menuService",2),Mn([Di("columnModel")],Ml.prototype,"columnModel",2),Mn([Ls("eFilter")],Ml.prototype,"eFilter",2),Mn([Ls("eFilterButton")],Ml.prototype,"eFilterButton",2),Mn([Ls("eSortIndicator")],Ml.prototype,"eSortIndicator",2),Mn([Ls("eMenu")],Ml.prototype,"eMenu",2),Mn([Ls("eLabel")],Ml.prototype,"eLabel",2),Mn([Ls("eText")],Ml.prototype,"eText",2),Mn([Ls("eSortOrder")],Ml.prototype,"eSortOrder",2),Mn([Ls("eSortAsc")],Ml.prototype,"eSortAsc",2),Mn([Ls("eSortDesc")],Ml.prototype,"eSortDesc",2),Mn([Ls("eSortMixed")],Ml.prototype,"eSortMixed",2),Mn([Ls("eSortNone")],Ml.prototype,"eSortNone",2);var Nl=Ml,Ll=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,n.TEMPLATE)}return(0,s.Z)(n,[{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}},{key:"init",value:function(e){this.params=e,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()}},{key:"checkWarnings",value:function(){this.params.template&&oi("A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)")}},{key:"setupExpandIcons",value:function(){var e=this;this.addInIcon("columnGroupOpened","agOpened"),this.addInIcon("columnGroupClosed","agClosed");var t=function(t){if(!hr(t)){var n=!e.params.columnGroup.isExpanded();e.columnModel.setColumnGroupOpened(e.params.columnGroup.getProvidedColumnGroup(),n,"uiColumnExpanded")}};this.addTouchAndClickListeners(this.eCloseIcon,t),this.addTouchAndClickListeners(this.eOpenIcon,t);var n=function(e){dr(e)};this.addManagedListener(this.eCloseIcon,"dblclick",n),this.addManagedListener(this.eOpenIcon,"dblclick",n),this.addManagedListener(this.getGui(),"dblclick",t),this.updateIconVisibility();var i=this.params.columnGroup.getProvidedColumnGroup();this.addManagedListener(i,Vi.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addManagedListener(i,Vi.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))}},{key:"addTouchAndClickListeners",value:function(e,t){var n=new Ol(e,!0);this.addManagedListener(n,Ol.EVENT_TAP,t),this.addDestroyFunc((function(){return n.destroy()})),this.addManagedListener(e,"click",t)}},{key:"updateIconVisibility",value:function(){if(this.params.columnGroup.isExpandable()){var e=this.params.columnGroup.isExpanded();Sa(this.eOpenIcon,e),Sa(this.eCloseIcon,!e)}else Sa(this.eOpenIcon,!1),Sa(this.eCloseIcon,!1)}},{key:"addInIcon",value:function(e,t){var n=cs(e,this.gridOptionsService,null);n&&this.getRefElement(t).appendChild(n)}},{key:"addGroupExpandIcon",value:function(){if(!this.params.columnGroup.isExpandable())return Sa(this.eOpenIcon,!1),void Sa(this.eCloseIcon,!1)}},{key:"setupLabel",value:function(){var e,t=this.params,n=t.displayName,i=t.columnGroup;if(Fn(n)){var r=Lr(n,!0);this.getRefElement("agLabel").textContent=r}this.addOrRemoveCssClass("ag-sticky-label",!(null==(e=i.getColGroupDef())?void 0:e.suppressStickyLabel))}}]),n}(Ns);Ll.TEMPLATE='<div class="ag-header-group-cell-label" ref="agContainer" role="presentation">\n            <span ref="agLabel" class="ag-header-group-text" role="presentation"></span>\n            <span ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>\n            <span ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>\n        </div>',Mn([Di("columnModel")],Ll.prototype,"columnModel",2),Mn([Ls("agOpened")],Ll.prototype,"eOpenIcon",2),Mn([Ls("agClosed")],Ll.prototype,"eCloseIcon",2);var Il=Ll,Fl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"isPopup",value:function(){return!0}},{key:"setParentComponent",value:function(e){e.addCssClass("ag-has-popup"),(0,mn.Z)((0,yn.Z)(n.prototype),"setParentComponent",this).call(this,e)}},{key:"destroy",value:function(){var e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}}]),n}(Ns),_l=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,n.TEMPLATE)}return(0,s.Z)(n,[{key:"init",value:function(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.eTextArea.setMaxLength(e.maxLength||200).setCols(e.cols||60).setRows(e.rows||10),Fn(e.value,!0)&&this.eTextArea.setValue(e.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}},{key:"onKeyDown",value:function(e){var t=e.key;(t===hs.LEFT||t===hs.UP||t===hs.RIGHT||t===hs.DOWN||e.shiftKey&&t===hs.ENTER)&&e.stopPropagation()}},{key:"afterGuiAttached",value:function(){var e=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()}},{key:"getValue",value:function(){var e=this.eTextArea.getValue();return Fn(e)||Fn(this.params.value)?this.params.parseValue(e):this.params.value}}]),n}(Fl);_l.TEMPLATE='<div class="ag-large-text">\n            <ag-input-text-area ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>\n        </div>',Mn([Ls("eTextArea")],_l.prototype,"eTextArea",2);var Gl=_l,Zl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.call(this,'<div class="ag-cell-edit-wrapper">\n                <ag-select class="ag-cell-editor" ref="eSelect"></ag-select>\n            </div>')).startedByEnter=!1,e}return(0,s.Z)(n,[{key:"init",value:function(e){this.focusAfterAttached=e.cellStartedEdit;var t=this.eSelect,n=this.valueFormatterService,i=this.gridOptionsService,r=e.values,o=e.value,a=e.eventKey;if(_n(r))console.warn("AG Grid: no values found for select cellEditor");else{this.startedByEnter=null!=a&&a===hs.ENTER;var s=!1;r.forEach((function(i){var r={value:i},a=n.formatValue(e.column,null,i),l=null!==a&&void 0!==a;r.text=l?a:i,t.addOption(r),s=s||o===i})),s?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);var l=e.valueListGap,u=e.valueListMaxWidth,c=e.valueListMaxHeight;null!=l&&t.setPickerGap(l),null!=c&&t.setPickerMaxHeight(c),null!=u&&t.setPickerMaxWidth(u),"fullRow"!==i.get("editType")&&this.addManagedListener(this.eSelect,$s.EVENT_ITEM_SELECTED,(function(){return e.stopEditing()}))}}},{key:"afterGuiAttached",value:function(){var e=this;this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&setTimeout((function(){e.isAlive()&&e.eSelect.showPicker()}))}},{key:"focusIn",value:function(){this.eSelect.getFocusableElement().focus()}},{key:"getValue",value:function(){return this.eSelect.getValue()}},{key:"isPopup",value:function(){return!1}}]),n}(Fl);Mn([Di("valueFormatterService")],Zl.prototype,"valueFormatterService",2),Mn([Ls("eSelect")],Zl.prototype,"eSelect",2);var Vl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this,'\n            <div class="ag-cell-edit-wrapper">\n                '.concat(e.getTemplate(),"\n            </div>"))).cellEditorInput=e,i}return(0,s.Z)(n,[{key:"init",value:function(e){this.params=e;var t,n=this.eInput;if(this.cellEditorInput.init(n,e),e.cellStartedEdit){this.focusAfterAttached=!0;var i=e.eventKey;i===hs.BACKSPACE||e.eventKey===hs.DELETE?t="":i&&1===i.length?t=i:(t=this.cellEditorInput.getStartValue(),i!==hs.F2&&(this.highlightAllOnFocus=!0))}else this.focusAfterAttached=!1,t=this.cellEditorInput.getStartValue();null!=t&&n.setStartValue(t),this.addManagedListener(n.getGui(),"keydown",(function(e){var t=e.key;t!==hs.PAGE_UP&&t!==hs.PAGE_DOWN||e.preventDefault()}))}},{key:"afterGuiAttached",value:function(){var e,t,n=this.localeService.getLocaleTextFunc(),i=this.eInput;if(i.setInputAriaLabel(n("ariaInputEditor","Input Editor")),this.focusAfterAttached){Wo()||i.getFocusableElement().focus();var r=i.getInputElement();this.highlightAllOnFocus?r.select():null==(t=(e=this.cellEditorInput).setCaret)||t.call(e)}}},{key:"focusIn",value:function(){var e=this.eInput,t=e.getFocusableElement(),n=e.getInputElement();t.focus(),n.select()}},{key:"getValue",value:function(){return this.cellEditorInput.getValue()}},{key:"isPopup",value:function(){return!1}}]),n}(Fl);Mn([Ls("eInput")],Vl.prototype,"eInput",2);var Hl=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"getTemplate",value:function(){return'<ag-input-text-field class="ag-cell-editor" ref="eInput"></ag-input-text-field>'}},{key:"init",value:function(e,t){this.eInput=e,this.params=t,null!=t.maxLength&&e.setMaxLength(t.maxLength)}},{key:"getValue",value:function(){var e=this.eInput.getValue();return Fn(e)||Fn(this.params.value)?this.params.parseValue(e):this.params.value}},{key:"getStartValue",value:function(){return this.params.useFormatter||this.params.column.getColDef().refData?this.params.formatValue(this.params.value):this.params.value}},{key:"setCaret",value:function(){var e=this.eInput.getValue(),t=Fn(e)&&e.length||0;t&&this.eInput.getInputElement().setSelectionRange(t,t)}}]),e}(),Bl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,new Hl)}return(0,s.Z)(n)}(Vl),Wl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;(0,a.Z)(this,n),(e=t.call(this)).refreshCount=0;var i=document.createElement("span"),r=document.createElement("span");r.setAttribute("class","ag-value-change-delta");var o=document.createElement("span");return o.setAttribute("class","ag-value-change-value"),i.appendChild(r),i.appendChild(o),e.setTemplateFromElement(i),e}return(0,s.Z)(n,[{key:"init",value:function(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e,!0)}},{key:"showDelta",value:function(e,t){var n=Math.abs(t),i=e.formatValue(n),r=Fn(i)?i:n,o=t>=0;this.eDelta.textContent=o?"\u2191"+r:"\u2193"+r,this.eDelta.classList.toggle("ag-value-change-delta-up",o),this.eDelta.classList.toggle("ag-value-change-delta-down",!o)}},{key:"setTimerToRemoveDelta",value:function(){var e=this;this.refreshCount++;var t=this.refreshCount;this.getFrameworkOverrides().wrapIncoming((function(){window.setTimeout((function(){t===e.refreshCount&&e.hideDeltaValue()}),2e3)}))}},{key:"hideDeltaValue",value:function(){this.eValue.classList.remove("ag-value-change-value-highlight"),Ia(this.eDelta)}},{key:"refresh",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.value;if(n===this.lastValue)return!1;if(Fn(e.valueFormatted)?this.eValue.textContent=e.valueFormatted:Fn(e.value)?this.eValue.textContent=n:Ia(this.eValue),this.filterManager.isSuppressFlashingCellsBecauseFiltering())return!1;if("number"===typeof n&&"number"===typeof this.lastValue){var i=n-this.lastValue;this.showDelta(e,i)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=n,!0}}]),n}(Ns);Mn([Di("filterManager")],Wl.prototype,"filterManager",2);var zl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;(0,a.Z)(this,n),(e=t.call(this)).refreshCount=0;var i=document.createElement("span"),r=document.createElement("span");return r.setAttribute("class","ag-value-slide-current"),i.appendChild(r),e.setTemplateFromElement(i),e.eCurrent=e.queryForHtmlElement(".ag-value-slide-current"),e}return(0,s.Z)(n,[{key:"init",value:function(e){this.refresh(e,!0)}},{key:"addSlideAnimation",value:function(){var e=this;this.refreshCount++;var t=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);var n=document.createElement("span");n.setAttribute("class","ag-value-slide-previous ag-value-slide-out"),this.ePrevious=n,this.ePrevious.textContent=this.eCurrent.textContent,this.getGui().insertBefore(this.ePrevious,this.eCurrent),this.getFrameworkOverrides().wrapIncoming((function(){window.setTimeout((function(){t===e.refreshCount&&e.ePrevious.classList.add("ag-value-slide-out-end")}),50),window.setTimeout((function(){t===e.refreshCount&&(e.getGui().removeChild(e.ePrevious),e.ePrevious=null)}),3e3)}))}},{key:"refresh",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.value;return _n(n)&&(n=""),n!==this.lastValue&&(!this.filterManager.isSuppressFlashingCellsBecauseFiltering()&&(t||this.addSlideAnimation(),this.lastValue=n,Fn(e.valueFormatted)?this.eCurrent.textContent=e.valueFormatted:Fn(e.value)?this.eCurrent.textContent=n:Ia(this.eCurrent),!0))}}]),n}(Ns);Mn([Di("filterManager")],zl.prototype,"filterManager",2);var Ul=function(){function e(t){(0,a.Z)(this,e),this.rowIndex=null,this.key=null,this.childrenMapped={},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}return(0,s.Z)(e,[{key:"setData",value:function(e){this.setDataCommon(e,!1)}},{key:"updateData",value:function(e){this.setDataCommon(e,!0)}},{key:"setDataCommon",value:function(e,t){var n=this.data;this.data=e,this.beans.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable(),this.resetQuickFilterAggregateText();var i=this.createDataChangedEvent(e,n,t);this.dispatchLocalEvent(i)}},{key:"updateDataOnDetailNode",value:function(){this.detailNode&&(this.detailNode.data=this.data)}},{key:"createDataChangedEvent",value:function(t,n,i){return{type:e.EVENT_DATA_CHANGED,node:this,oldData:n,newData:t,update:i}}},{key:"createLocalRowEvent",value:function(e){return{type:e,node:this}}},{key:"getRowIndexString",value:function(){return"top"===this.rowPinned?"t-"+this.rowIndex:"bottom"===this.rowPinned?"b-"+this.rowIndex:this.rowIndex.toString()}},{key:"createDaemonNode",value:function(){var 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}},{key:"setDataAndId",value:function(e,t){var n=Fn(this.id)?this.createDaemonNode():null,i=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),this.checkRowSelectable(),this.beans.selectionService.syncInRowNode(this,n);var r=this.createDataChangedEvent(e,i,!1);this.dispatchLocalEvent(r)}},{key:"checkRowSelectable",value:function(){var e=this.beans.gridOptionsService.get("isRowSelectable");this.setRowSelectable(!e||e(this))}},{key:"setRowSelectable",value:function(t,n){if(this.selectable!==t){if(this.selectable=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_SELECTABLE_CHANGED)),n)return;if(this.beans.gridOptionsService.get("groupSelectsChildren")){var i=this.calculateSelectedFromChildren();return void this.setSelectedParams({newValue:null!=i&&i,source:"selectableChanged"})}this.isSelected()&&!this.selectable&&this.setSelectedParams({newValue:!1,source:"selectableChanged"})}}},{key:"setId",value:function(t){var n=this.beans.gridOptionsService.getCallback("getRowId");if(n)if(this.data){var i=this.getGroupKeys(!0);this.id=n({data:this.data,parentKeys:i.length>0?i:void 0,level:this.level}),null!==this.id&&"string"===typeof this.id&&this.id.startsWith(e.ID_PREFIX_ROW_GROUP)&&console.error("AG Grid: Row IDs cannot start with ".concat(e.ID_PREFIX_ROW_GROUP,", this is a reserved prefix for AG Grid's row grouping feature.")),null!==this.id&&"string"!==typeof this.id&&(this.id=""+this.id)}else this.id=void 0;else this.id=t}},{key:"getGroupKeys",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=[],n=this;for(e&&(n=n.parent);n&&n.level>=0;)t.push(n.key),n=n.parent;return t.reverse(),t}},{key:"isPixelInRange",value:function(e){return!(!Fn(this.rowTop)||!Fn(this.rowHeight))&&(e>=this.rowTop&&e<this.rowTop+this.rowHeight)}},{key:"setFirstChild",value:function(t){this.firstChild!==t&&(this.firstChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_FIRST_CHILD_CHANGED)))}},{key:"setLastChild",value:function(t){this.lastChild!==t&&(this.lastChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_LAST_CHILD_CHANGED)))}},{key:"setChildIndex",value:function(t){this.childIndex!==t&&(this.childIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_CHILD_INDEX_CHANGED)))}},{key:"setRowTop",value:function(t){this.oldRowTop=this.rowTop,this.rowTop!==t&&(this.rowTop=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_TOP_CHANGED)),this.setDisplayed(null!==t))}},{key:"clearRowTopAndRowIndex",value:function(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}},{key:"setDisplayed",value:function(t){this.displayed!==t&&(this.displayed=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_DISPLAYED_CHANGED)))}},{key:"setDragging",value:function(t){this.dragging!==t&&(this.dragging=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_DRAGGING_CHANGED)))}},{key:"setHighlighted",value:function(t){t!==this.highlighted&&(this.highlighted=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HIGHLIGHT_CHANGED)))}},{key:"setHovered",value:function(e){this.hovered!==e&&(this.hovered=e)}},{key:"isHovered",value:function(){return this.hovered}},{key:"setAllChildrenCount",value:function(t){this.allChildrenCount!==t&&(this.allChildrenCount=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ALL_CHILDREN_COUNT_CHANGED)))}},{key:"setMaster",value:function(t){this.master!==t&&(this.master&&!t&&(this.expanded=!1),this.master=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_MASTER_CHANGED)))}},{key:"setGroup",value:function(t){this.group!==t&&(this.group&&!t&&(this.expanded=!1),this.group=t,this.updateHasChildren(),this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_GROUP_CHANGED)))}},{key:"setRowHeight",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.rowHeight=t,this.rowHeightEstimated=n,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HEIGHT_CHANGED))}},{key:"setRowAutoHeight",value:function(e,t){this.__autoHeights||(this.__autoHeights={}),this.__autoHeights[t.getId()]=e,null!=e&&(null==this.checkAutoHeightsDebounced&&(this.checkAutoHeightsDebounced=fi(this.checkAutoHeights.bind(this),1)),this.checkAutoHeightsDebounced())}},{key:"checkAutoHeights",value:function(){var e=this,t=!1,n=!0,i=0,r=this.__autoHeights;if(null!=r&&(this.beans.columnModel.getAllDisplayedAutoHeightCols().forEach((function(o){var a=r[o.getId()];if(null==a){if(!e.beans.columnModel.isColSpanActive())return void(t=!0);var s=[];switch(o.getPinned()){case"left":s=e.beans.columnModel.getDisplayedLeftColumnsForRow(e);break;case"right":s=e.beans.columnModel.getDisplayedRightColumnsForRow(e);break;case null:s=e.beans.columnModel.getViewportCenterColumnsForRow(e)}if(s.includes(o))return void(t=!0);a=-1}else n=!1;a>i&&(i=a)})),!t&&((n||i<10)&&(i=this.beans.gridOptionsService.getRowHeightForNode(this).height),i!=this.rowHeight))){this.setRowHeight(i);var o=this.beans.rowModel;o.onRowHeightChangedDebounced&&o.onRowHeightChangedDebounced()}}},{key:"setRowIndex",value:function(t){this.rowIndex!==t&&(this.rowIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ROW_INDEX_CHANGED)))}},{key:"setUiLevel",value:function(t){this.uiLevel!==t&&(this.uiLevel=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_UI_LEVEL_CHANGED)))}},{key:"setExpanded",value:function(t,n){if(this.expanded!==t){this.expanded=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_EXPANDED_CHANGED));var i=Object.assign({},this.createGlobalRowEvent(Er.EVENT_ROW_GROUP_OPENED),{expanded:t,event:n||null});this.beans.rowNodeEventThrottle.dispatchExpanded(i),this.sibling&&this.beans.rowRenderer.refreshCells({rowNodes:[this]})}}},{key:"createGlobalRowEvent",value:function(e){return this.beans.gridOptionsService.addGridCommonParams({type:e,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned})}},{key:"dispatchLocalEvent",value:function(e){this.eventService&&this.eventService.dispatchEvent(e)}},{key:"setDataValue",value:function(e,t,n){var i=this,r=function(){var t;return"string"!==typeof e?e:null!=(t=i.beans.columnModel.getGridColumn(e))?t:i.beans.columnModel.getPrimaryColumn(e)}(),o=this.getValueFromValueService(r);if(this.beans.gridOptionsService.get("readOnlyEdit"))return this.dispatchEventForSaveValueReadOnly(r,o,t,n),!1;var a=this.beans.valueService.setValue(this,r,t,n);return this.dispatchCellChangedEvent(r,t,o),this.checkRowSelectable(),a}},{key:"getValueFromValueService",value:function(e){var t=this.leafGroup&&this.beans.columnModel.isPivotMode(),n=this.group&&this.expanded&&!this.footer&&!t,i=this.beans.gridOptionsService.getGroupIncludeFooter()({node:this}),r=this.beans.gridOptionsService.get("groupSuppressBlankHeader"),o=n&&i&&!r;return this.beans.valueService.getValue(e,this,!1,o)}},{key:"dispatchEventForSaveValueReadOnly",value:function(e,t,n,i){var r=this.beans.gridOptionsService.addGridCommonParams({type:Er.EVENT_CELL_EDIT_REQUEST,event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:e,colDef:e.getColDef(),data:this.data,node:this,oldValue:t,newValue:n,value:n,source:i});this.beans.eventService.dispatchEvent(r)}},{key:"setGroupValue",value:function(e,t){var n=this.beans.columnModel.getGridColumn(e);_n(this.groupData)&&(this.groupData={});var i=n.getColId(),r=this.groupData[i];r!==t&&(this.groupData[i]=t,this.dispatchCellChangedEvent(n,t,r))}},{key:"setAggData",value:function(e){var t=this,n=this.aggData;if(this.aggData=e,this.eventService){var i=function(e){var i=t.aggData?t.aggData[e]:void 0,r=n?n[e]:void 0;if(i!==r){var o=t.beans.columnModel.lookupGridColumn(e);o&&t.dispatchCellChangedEvent(o,i,r)}};for(var r in this.aggData)i(r);for(var o in e)o in this.aggData||i(o)}}},{key:"updateHasChildren",value:function(){var t=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;if(this.beans.gridOptionsService.isRowModelType("serverSide")){var n=this.beans.gridOptionsService.get("treeData"),i=this.beans.gridOptionsService.get("isServerSideGroup");t=!this.stub&&!this.footer&&(n?!!i&&i(this.data):!!this.group)}t!==this.__hasChildren&&(this.__hasChildren=!!t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HAS_CHILDREN_CHANGED)))}},{key:"hasChildren",value:function(){return null==this.__hasChildren&&this.updateHasChildren(),this.__hasChildren}},{key:"isEmptyRowGroupNode",value:function(){return this.group&&Gn(this.childrenAfterGroup)}},{key:"dispatchCellChangedEvent",value:function(t,n,i){var r={type:e.EVENT_CELL_CHANGED,node:this,column:t,newValue:n,oldValue:i};this.dispatchLocalEvent(r)}},{key:"resetQuickFilterAggregateText",value:function(){this.quickFilterAggregateText=null}},{key:"isExpandable",value:function(){return!this.footer&&(this.beans.columnModel.isPivotMode()?this.hasChildren()&&!this.leafGroup:this.hasChildren()||!!this.master)}},{key:"isSelected",value:function(){return this.footer?this.sibling.isSelected():this.selected}},{key:"depthFirstSearch",value:function(e){this.childrenAfterGroup&&this.childrenAfterGroup.forEach((function(t){return t.depthFirstSearch(e)})),e(this)}},{key:"calculateSelectedFromChildren",value:function(){var e,t=!1,n=!1,i=!1;if(!(null==(e=this.childrenAfterGroup)?void 0:e.length))return this.selectable?this.selected:null;for(var r=0;r<this.childrenAfterGroup.length;r++){var o=this.childrenAfterGroup[r],a=o.isSelected();if(!o.selectable){var s=o.calculateSelectedFromChildren();if(null===s)continue;a=s}switch(a){case!0:t=!0;break;case!1:n=!0;break;default:i=!0}}return i||t&&n?void 0:!!t||!n&&(this.selectable?this.selected:null)}},{key:"setSelectedInitialValue",value:function(e){this.selected=e}},{key:"selectThisNode",value:function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"api",r=!this.selectable&&t,o=this.selected===t;if(r||o)return!1;if(this.selected=t,this.eventService){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_ROW_SELECTED));var a=this.sibling;a&&a.footer&&a.dispatchLocalEvent(a.createLocalRowEvent(e.EVENT_ROW_SELECTED))}var s=On(Tn({},this.createGlobalRowEvent(Er.EVENT_ROW_SELECTED)),{event:n||null,source:i});return this.beans.eventService.dispatchEvent(s),!0}},{key:"setSelected",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"api";"boolean"!==typeof n?this.setSelectedParams({newValue:e,clearSelection:t,rangeSelect:!1,source:n}):console.warn("AG Grid: 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.")}},{key:"setSelectedParams",value:function(e){return this.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),0):void 0===this.id?(console.warn("AG Grid: cannot select node until id for node is known"),0):this.beans.selectionService.setNodesSelected(On(Tn({},e),{nodes:[this.footer?this.sibling:this]}))}},{key:"isRowPinned",value:function(){return"top"===this.rowPinned||"bottom"===this.rowPinned}},{key:"isParentOfNode",value:function(e){for(var t=this.parent;t;){if(t===e)return!0;t=t.parent}return!1}},{key:"addEventListener",value:function(e,t){var n,i;this.eventService||(this.eventService=new Mi),this.beans.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.eventService.setFrameworkOverrides(this.beans.frameworkOverrides),this.frameworkEventListenerService=new Ni(this.beans.frameworkOverrides));var r=null!=(i=null==(n=this.frameworkEventListenerService)?void 0:n.wrap(t))?i:t;this.eventService.addEventListener(e,r)}},{key:"removeEventListener",value:function(e,t){var n,i;if(this.eventService){var r=null!=(i=null==(n=this.frameworkEventListenerService)?void 0:n.unwrap(t))?i:t;this.eventService.removeEventListener(e,r),this.eventService.noRegisteredListenersExist()&&(this.eventService=null)}}},{key:"onMouseEnter",value:function(){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_MOUSE_ENTER))}},{key:"onMouseLeave",value:function(){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_MOUSE_LEAVE))}},{key:"getFirstChildOfFirstChild",value:function(e){for(var t=this,n=!0,i=!1,r=null;n&&!i;){var o=t.parent;Fn(o)&&t.firstChild?o.rowGroupColumn===e&&(i=!0,r=o):n=!1,t=o}return i?r:null}},{key:"isFullWidthCell",value:function(){if(this.detail)return!0;var e=this.beans.gridOptionsService.getCallback("isFullWidthRow");return!!e&&e({rowNode:this})}},{key:"getRoute",value:function(){if(null!=this.key){for(var e=[],t=this;null!=t.key;)e.push(t.key),t=t.parent;return e.reverse()}}},{key:"createFooter",value:function(){var t=this;if(!this.sibling){var n=new Set(["eventService","__objectId","sticky"]),i=new e(this.beans);Object.keys(this).forEach((function(e){n.has(e)||(i[e]=t[e])})),i.footer=!0,i.setRowTop(null),i.setRowIndex(null),i.oldRowTop=null,i.id="rowGroupFooter_"+this.id,i.sibling=this,this.sibling=i}}},{key:"destroyFooter",value:function(){this.sibling&&(this.sibling.setRowTop(null),this.sibling.setRowIndex(null),this.sibling=void 0)}}]),e}();Ul.ID_PREFIX_ROW_GROUP="row-group-",Ul.ID_PREFIX_TOP_PINNED="t-",Ul.ID_PREFIX_BOTTOM_PINNED="b-",Ul.OBJECT_ID_SEQUENCE=0,Ul.EVENT_ROW_SELECTED="rowSelected",Ul.EVENT_DATA_CHANGED="dataChanged",Ul.EVENT_CELL_CHANGED="cellChanged",Ul.EVENT_ALL_CHILDREN_COUNT_CHANGED="allChildrenCountChanged",Ul.EVENT_MASTER_CHANGED="masterChanged",Ul.EVENT_GROUP_CHANGED="groupChanged",Ul.EVENT_MOUSE_ENTER="mouseEnter",Ul.EVENT_MOUSE_LEAVE="mouseLeave",Ul.EVENT_HEIGHT_CHANGED="heightChanged",Ul.EVENT_TOP_CHANGED="topChanged",Ul.EVENT_DISPLAYED_CHANGED="displayedChanged",Ul.EVENT_FIRST_CHILD_CHANGED="firstChildChanged",Ul.EVENT_LAST_CHILD_CHANGED="lastChildChanged",Ul.EVENT_CHILD_INDEX_CHANGED="childIndexChanged",Ul.EVENT_ROW_INDEX_CHANGED="rowIndexChanged",Ul.EVENT_EXPANDED_CHANGED="expandedChanged",Ul.EVENT_HAS_CHILDREN_CHANGED="hasChildrenChanged",Ul.EVENT_SELECTABLE_CHANGED="selectableChanged",Ul.EVENT_UI_LEVEL_CHANGED="uiLevelChanged",Ul.EVENT_HIGHLIGHT_CHANGED="rowHighlightChanged",Ul.EVENT_DRAGGING_CHANGED="draggingChanged";var jl=Ul,Kl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,'\n            <div class="ag-selection-checkbox" role="presentation">\n                <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n            </div>')}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.eCheckbox.setPassive(!0)}},{key:"getCheckboxId",value:function(){return this.eCheckbox.getInputElement().id}},{key:"onDataChanged",value:function(){this.onSelectionChanged()}},{key:"onSelectableChanged",value:function(){this.showOrHideSelect()}},{key:"onSelectionChanged",value:function(){var e=this.localeService.getLocaleTextFunc(),t=this.rowNode.isSelected(),n=No(e,t),i=this.rowNode.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],o=(0,r.Z)(i,2),a=e(o[0],o[1]);this.eCheckbox.setValue(t,!0),this.eCheckbox.setInputAriaLabel("".concat(a," (").concat(n,")"))}},{key:"onClicked",value:function(e,t,n){return this.rowNode.setSelectedParams({newValue:e,rangeSelect:n.shiftKey,groupSelectsFiltered:t,event:n,source:"checkboxSelected"})}},{key:"init",value:function(e){var t=this;if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListener(this.eCheckbox.getInputElement(),"dblclick",(function(e){dr(e)})),this.addManagedListener(this.eCheckbox.getInputElement(),"click",(function(e){dr(e);var n=t.gridOptionsService.get("groupSelectsFiltered"),i=t.eCheckbox.getValue();t.shouldHandleIndeterminateState(i,n)?0===t.onClicked(!0,n,e||{})&&t.onClicked(!1,n,e):i?t.onClicked(!1,n,e):t.onClicked(!0,n,e||{})})),this.addManagedListener(this.rowNode,jl.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.rowNode,jl.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addManagedListener(this.rowNode,jl.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this)),this.gridOptionsService.get("isRowSelectable")||"function"===typeof this.getIsVisible()){var n=this.showOrHideSelect.bind(this);this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_CHANGED,n),this.addManagedListener(this.rowNode,jl.EVENT_DATA_CHANGED,n),this.addManagedListener(this.rowNode,jl.EVENT_CELL_CHANGED,n),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}},{key:"shouldHandleIndeterminateState",value:function(e,t){return t&&(void 0===this.eCheckbox.getPreviousValue()||void 0===e)&&this.gridOptionsService.isRowModelType("clientSide")}},{key:"showOrHideSelect",value:function(){var e,t,n,i=this.rowNode.selectable,r=this.getIsVisible();if(i)if("function"===typeof r){var o=null==(e=this.overrides)?void 0:e.callbackParams;if(this.column){var a=this.column.createColumnFunctionCallbackParams(this.rowNode);i=r(Tn(Tn({},o),a))}else i=r(On(Tn({},o),{node:this.rowNode,data:this.rowNode.data}))}else i=null!=r&&r;if(null==(t=this.column)?void 0:t.getColDef().showDisabledCheckboxes)return this.eCheckbox.setDisabled(!i),this.setVisible(!0),void this.setDisplayed(!0);(null==(n=this.overrides)?void 0:n.removeHidden)?this.setDisplayed(i):this.setVisible(i)}},{key:"getIsVisible",value:function(){var e,t;return this.overrides?this.overrides.isVisible:null==(t=null==(e=this.column)?void 0:e.getColDef())?void 0:t.checkboxSelection}}]),n}(Ns);Mn([Ls("eCheckbox")],Kl.prototype,"eCheckbox",2),Mn([Ei],Kl.prototype,"postConstruct",1);var Yl=function(e){return e[e.Left=0]="Left",e[e.Right=1]="Right",e}(Yl||{}),Xl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).dragSourceAndParamsList=[],e.dropTargets=[],e}return(0,s.Z)(n,[{key:"init",value:function(){this.ePinnedIcon=us("columnMovePin",this.gridOptionsService,null),this.eHideIcon=us("columnMoveHide",this.gridOptionsService,null),this.eMoveIcon=us("columnMoveMove",this.gridOptionsService,null),this.eLeftIcon=us("columnMoveLeft",this.gridOptionsService,null),this.eRightIcon=us("columnMoveRight",this.gridOptionsService,null),this.eGroupIcon=us("columnMoveGroup",this.gridOptionsService,null),this.eAggregateIcon=us("columnMoveValue",this.gridOptionsService,null),this.ePivotIcon=us("columnMovePivot",this.gridOptionsService,null),this.eDropNotAllowedIcon=us("dropNotAllowed",this.gridOptionsService,null)}},{key:"addDragSource",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:n,dragSource:e}),this.dragService.addDragSource(n)}},{key:"removeDragSource",value:function(e){var t=this.dragSourceAndParamsList.find((function(t){return t.dragSource===e}));t&&(this.dragService.removeDragSource(t.params),Qi(this.dragSourceAndParamsList,t))}},{key:"clearDragSourceParamsList",value:function(){var e=this;this.dragSourceAndParamsList.forEach((function(t){return e.dragService.removeDragSource(t.params)})),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0}},{key:"nudge",value:function(){this.dragging&&this.onDragging(this.eventLastTime,!0)}},{key:"onDragStart",value:function(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.getDragItem(),this.dragSource.onDragStarted&&this.dragSource.onDragStarted(),this.createGhost()}},{key:"onDragStop",value:function(e){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.onDragStopped&&this.dragSource.onDragStopped(),this.lastDropTarget&&this.lastDropTarget.onDragStop){var t=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(t)}this.lastDropTarget=null,this.dragItem=null,this.removeGhost()}},{key:"onDragging",value:function(e,t){var n,i,r,o,a=this,s=this.getHorizontalDirection(e),l=this.getVerticalDirection(e);this.eventLastTime=e,this.positionGhost(e);var u=this.dropTargets.filter((function(t){return a.isMouseOnDropTarget(e,t)})),c=this.findCurrentDropTarget(e,u);if(c!==this.lastDropTarget)this.leaveLastTargetIfExists(e,s,l,t),null!==this.lastDropTarget&&null===c&&(null==(i=(n=this.dragSource).onGridExit)||i.call(n,this.dragItem)),null===this.lastDropTarget&&null!==c&&(null==(o=(r=this.dragSource).onGridEnter)||o.call(r,this.dragItem)),this.enterDragTargetIfExists(c,e,s,l,t),this.lastDropTarget=c;else if(c&&c.onDragging){var d=this.createDropTargetEvent(c,e,s,l,t);c.onDragging(d)}}},{key:"getAllContainersFromDropTarget",value:function(e){var t=e.getSecondaryContainers?e.getSecondaryContainers():null,n=[[e.getContainer()]];return t?n.concat(t):n}},{key:"allContainersIntersect",value:function(e,t){var n,i=(0,g.Z)(t);try{for(i.s();!(n=i.n()).done;){var r=n.value.getBoundingClientRect();if(0===r.width||0===r.height)return!1;var o=e.clientX>=r.left&&e.clientX<r.right,a=e.clientY>=r.top&&e.clientY<r.bottom;if(!o||!a)return!1}}catch(s){i.e(s)}finally{i.f()}return!0}},{key:"isMouseOnDropTarget",value:function(e,t){var n,i=this.getAllContainersFromDropTarget(t),r=!1,o=(0,g.Z)(i);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(this.allContainersIntersect(e,a)){r=!0;break}}}catch(s){o.e(s)}finally{o.f()}return!(t.targetContainsSource&&!t.getContainer().contains(this.dragSource.eElement))&&(r&&t.isInterestedIn(this.dragSource.type,this.dragSource.eElement))}},{key:"findCurrentDropTarget",value:function(e,t){var n=t.length;if(0===n)return null;if(1===n)return t[0];var i,r=this.gridOptionsService.getRootNode().elementsFromPoint(e.clientX,e.clientY),o=(0,g.Z)(r);try{for(o.s();!(i=o.n()).done;){var a,s=i.value,l=(0,g.Z)(t);try{for(l.s();!(a=l.n()).done;){var u=a.value;if(-1!==rr(this.getAllContainersFromDropTarget(u)).indexOf(s))return u}}catch(c){l.e(c)}finally{l.f()}}}catch(c){o.e(c)}finally{o.f()}return null}},{key:"enterDragTargetIfExists",value:function(e,t,n,i,r){if(e){if(e.onDragEnter){var o=this.createDropTargetEvent(e,t,n,i,r);e.onDragEnter(o)}this.setGhostIcon(e.getIconName?e.getIconName():null)}}},{key:"leaveLastTargetIfExists",value:function(e,t,n,i){if(this.lastDropTarget){if(this.lastDropTarget.onDragLeave){var r=this.createDropTargetEvent(this.lastDropTarget,e,t,n,i);this.lastDropTarget.onDragLeave(r)}this.setGhostIcon(null)}}},{key:"addDropTarget",value:function(e){this.dropTargets.push(e)}},{key:"removeDropTarget",value:function(e){this.dropTargets=this.dropTargets.filter((function(t){return t.getContainer()!==e.getContainer()}))}},{key:"hasExternalDropZones",value:function(){return this.dropTargets.some((function(e){return e.external}))}},{key:"findExternalZone",value:function(e){return this.dropTargets.filter((function(e){return e.external})).find((function(t){return t.getContainer()===e.getContainer()}))||null}},{key:"getHorizontalDirection",value:function(e){var t=this.eventLastTime&&this.eventLastTime.clientX,n=e.clientX;return t===n?null:t>n?0:1}},{key:"getVerticalDirection",value:function(e){var t=this.eventLastTime&&this.eventLastTime.clientY,n=e.clientY;return t===n?null:t>n?0:1}},{key:"createDropTargetEvent",value:function(e,t,n,i,r){var o=e.getContainer(),a=o.getBoundingClientRect(),s=this.gridApi,l=this.columnApi,u=this.dragItem,c=this.dragSource;return{event:t,x:t.clientX-a.left,y:t.clientY-a.top,vDirection:i,hDirection:n,dragSource:c,fromNudge:r,dragItem:u,api:s,columnApi:l,dropZoneTarget:o}}},{key:"positionGhost",value:function(e){var t=this.eGhost;if(t){var n=t.getBoundingClientRect().height,i=Jo()-2,r=$o()-2,o=Aa(t.offsetParent),a=e.clientY,s=e.clientX,l=a-o.top-n/2,u=s-o.left-10,c=this.gridOptionsService.getDocument(),d=c.defaultView||window,h=d.pageYOffset||c.documentElement.scrollTop,p=d.pageXOffset||c.documentElement.scrollLeft;i>0&&u+t.clientWidth>i+p&&(u=i+p-t.clientWidth),u<0&&(u=0),r>0&&l+t.clientHeight>r+h&&(l=r+h-t.clientHeight),l<0&&(l=0),t.style.left="".concat(u,"px"),t.style.top="".concat(l,"px")}}},{key:"removeGhost",value:function(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null}},{key:"createGhost",value:function(){this.eGhost=Za(Xl.GHOST_TEMPLATE),this.mouseEventService.stampTopLevelGridCompWithGridInstance(this.eGhost);var e=this.environment.getTheme().theme;e&&this.eGhost.classList.add(e),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null);var t=this.eGhost.querySelector(".ag-dnd-ghost-label"),n=this.dragSource.dragItemName;li(n)&&(n=n()),t.innerHTML=Lr(n)||"",this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";var i=this.gridOptionsService.getDocument(),r=null,o=null;try{r=i.fullscreenElement}catch(je){}finally{r||(r=this.gridOptionsService.getRootNode());var a=r.querySelector("body");o=a||(r instanceof ShadowRoot?r:r instanceof Document?null==r?void 0:r.documentElement:r)}this.eGhostParent=o,this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):console.warn("AG Grid: could not find document body, it is needed for dragging columns")}},{key:"setGhostIcon",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Ia(this.eGhostIcon);var n=null;switch(e||(e=this.dragSource.getDefaultIconName?this.dragSource.getDefaultIconName():Xl.ICON_NOT_ALLOWED),e){case Xl.ICON_PINNED:n=this.ePinnedIcon;break;case Xl.ICON_MOVE:n=this.eMoveIcon;break;case Xl.ICON_LEFT:n=this.eLeftIcon;break;case Xl.ICON_RIGHT:n=this.eRightIcon;break;case Xl.ICON_GROUP:n=this.eGroupIcon;break;case Xl.ICON_AGGREGATE:n=this.eAggregateIcon;break;case Xl.ICON_PIVOT:n=this.ePivotIcon;break;case Xl.ICON_NOT_ALLOWED:n=this.eDropNotAllowedIcon;break;case Xl.ICON_HIDE:n=this.eHideIcon}this.eGhostIcon.classList.toggle("ag-shake-left-to-right",t),n===this.eHideIcon&&this.gridOptionsService.get("suppressDragLeaveHidesColumns")||n&&this.eGhostIcon.appendChild(n)}}]),n}(kr);Xl.ICON_PINNED="pinned",Xl.ICON_MOVE="move",Xl.ICON_LEFT="left",Xl.ICON_RIGHT="right",Xl.ICON_GROUP="group",Xl.ICON_AGGREGATE="aggregate",Xl.ICON_PIVOT="pivot",Xl.ICON_NOT_ALLOWED="notAllowed",Xl.ICON_HIDE="hide",Xl.GHOST_TEMPLATE='<div class="ag-dnd-ghost ag-unselectable">\n            <span class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>\n            <div class="ag-dnd-ghost-label"></div>\n        </div>',Mn([Di("dragService")],Xl.prototype,"dragService",2),Mn([Di("mouseEventService")],Xl.prototype,"mouseEventService",2),Mn([Di("columnApi")],Xl.prototype,"columnApi",2),Mn([Di("gridApi")],Xl.prototype,"gridApi",2),Mn([Ei],Xl.prototype,"init",1),Mn([xi],Xl.prototype,"clearDragSourceParamsList",1),Xl=Mn([Ri("dragAndDropService")],Xl);var ql=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r,o,s,l){var u;return(0,a.Z)(this,n),(u=t.call(this)).cellValueFn=e,u.rowNode=i,u.column=r,u.customGui=o,u.dragStartPixels=s,u.suppressVisibilityChange=l,u.dragSource=null,u}return(0,s.Z)(n,[{key:"isCustomGui",value:function(){return null!=this.customGui}},{key:"postConstruct",value:function(){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(cs("rowDrag",this.gridOptionsService,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){var e=this.gridOptionsService.get("rowDragManaged")?new $l(this,this.beans,this.rowNode,this.column):new Jl(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)}}},{key:"setDragElement",value:function(e,t){this.setTemplateFromElement(e),this.addDragSource(t)}},{key:"getSelectedNodes",value:function(){if(!this.gridOptionsService.get("rowDragMultiRow"))return[this.rowNode];var e=this.beans.selectionService.getSelectedNodes();return-1!==e.indexOf(this.rowNode)?e:[this.rowNode]}},{key:"checkCompatibility",value:function(){var e=this.gridOptionsService.get("rowDragManaged");this.gridOptionsService.get("treeData")&&e&&oi("If using row drag with tree data, you cannot have rowDragManaged=true")}},{key:"getDragItem",value:function(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()}}},{key:"getRowDragText",value:function(e){if(e){var t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gridOptionsService.get("rowDragText")}},{key:"addDragSource",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:4;this.dragSource&&this.removeDragSource();var n=this.localeService.getLocaleTextFunc();this.dragSource={type:2,eElement:this.getGui(),dragItemName:function(){var t,i=e.getDragItem(),r=(null==(t=i.rowNodes)?void 0:t.length)||1,o=e.getRowDragText(e.column);return o?o(i,r):1===r?e.cellValueFn():"".concat(r," ").concat(n("rowDragRows","rows"))},getDragItem:function(){return e.getDragItem()},dragStartPixels:t,dragSourceDomDataKey:this.gridOptionsService.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)}},{key:"removeDragSource",value:function(){this.dragSource&&this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null}}]),n}(Ns);Mn([Di("beans")],ql.prototype,"beans",2),Mn([Ei],ql.prototype,"postConstruct",1),Mn([xi],ql.prototype,"removeDragSource",1);var Ql=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r){var o;return(0,a.Z)(this,n),(o=t.call(this)).parent=e,o.rowNode=i,o.column=r,o}return(0,s.Z)(n,[{key:"setDisplayedOrVisible",value:function(e){var t={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,t);else{var n=!0,i=!1;this.column&&(n=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),i=li(this.column.getColDef().rowDrag)),i?(this.parent.setDisplayed(!0,t),this.parent.setVisible(n,t)):(this.parent.setDisplayed(n,t),this.parent.setVisible(!0,t))}}}]),n}(kr),Jl=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r,o){var s;return(0,a.Z)(this,n),(s=t.call(this,e,r,o)).beans=i,s}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addManagedListener(this.rowNode,jl.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,jl.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,jl.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,Er.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.workOutVisibility()}},{key:"onSuppressRowDrag",value:function(){this.workOutVisibility()}},{key:"workOutVisibility",value:function(){var e=this.gridOptionsService.get("suppressRowDrag");this.setDisplayedOrVisible(e)}}]),n}(Ql);Mn([Ei],Jl.prototype,"postConstruct",1);var $l=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r,o){var s;return(0,a.Z)(this,n),(s=t.call(this,e,r,o)).beans=i,s}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.addManagedListener(this.beans.eventService,Er.EVENT_SORT_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,Er.EVENT_FILTER_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,Er.EVENT_COLUMN_ROW_GROUP_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,Er.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,jl.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,jl.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()}},{key:"onSuppressRowDrag",value:function(){this.workOutVisibility()}},{key:"workOutVisibility",value:function(){var e=this.beans.ctrlsService.getGridBodyCtrl().getRowDragFeature(),t=e&&e.shouldPreventRowMove(),n=this.gridOptionsService.get("suppressRowDrag"),i=this.beans.dragAndDropService.hasExternalDropZones(),r=t&&!i||n;this.setDisplayedOrVisible(r)}}]),n}(Ql);Mn([Ei],$l.prototype,"postConstruct",1);var eu=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"init",value:function(e,t,n,i,r,o,a){var s,l,u,c;this.params=a,this.eGui=t,this.eCheckbox=n,this.eExpanded=i,this.eContracted=r,this.comp=e,this.compClass=o;var d=a.node,h=(a.value,a.colDef),p=this.isTopLevelFooter();if(!p){if(this.isEmbeddedRowMismatch())return;if(d.footer&&this.gridOptionsService.get("groupHideOpenParents"))if((h&&h.showRowGroup)!==(d.rowGroupColumn&&d.rowGroupColumn.getColId()))return}if(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),!p){var f=a.node.footer&&a.node.rowGroupIndex===this.columnModel.getRowGroupColumns().findIndex((function(e){var t;return e.getColId()===(null==(t=a.colDef)?void 0:t.showRowGroup)})),v="multipleColumns"!=this.gridOptionsService.get("groupDisplayType")||this.gridOptionsService.get("treeData")||this.gridOptionsService.get("showOpenedGroup")&&!a.node.footer&&(!a.node.group||null!=a.node.rowGroupIndex&&a.node.rowGroupIndex>this.columnModel.getRowGroupColumns().findIndex((function(e){var t;return e.getColId()===(null==(t=a.colDef)?void 0:t.showRowGroup)}))),g=!d.group&&((null==(s=this.params.colDef)?void 0:s.field)||(null==(l=this.params.colDef)?void 0:l.valueGetter)),m=this.isExpandable(),y=this.columnModel.isPivotMode()&&d.leafGroup&&(null==(u=d.rowGroupColumn)?void 0:u.getColId())===(null==(c=a.column)?void 0:c.getColDef().showRowGroup);if(!this.showingValueForOpenedParent&&!m&&!g&&!v&&!f&&!y)return}this.addExpandAndContract(),this.addFullWidthRowDraggerIfNeeded(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded()}},{key:"getCellAriaRole",value:function(){var e,t,n=null==(e=this.params.colDef)?void 0:e.cellAriaRole,i=null==(t=this.params.column)?void 0:t.getColDef().cellAriaRole;return n||i||"gridcell"}},{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this),this.expandListener=null}},{key:"refreshAriaExpanded",value:function(){var e=this.params,t=e.node,n=e.eGridCell;if(this.expandListener&&(this.expandListener=this.expandListener()),this.isExpandable()){var i=function(){yo(n,!!t.expanded)};this.expandListener=this.addManagedListener(t,jl.EVENT_EXPANDED_CHANGED,i)||null,i()}else Co(n)}},{key:"isTopLevelFooter",value:function(){if(!this.gridOptionsService.get("groupIncludeTotalFooter"))return!1;if(null!=this.params.value||-1!=this.params.node.level)return!1;var e=this.params.colDef;if(null==e)return!0;if(!0===e.showRowGroup)return!0;var t=this.columnModel.getRowGroupColumns();return!t||0===t.length||t[0].getId()===e.showRowGroup}},{key:"isEmbeddedRowMismatch",value:function(){if(!this.params.fullWidth||!this.gridOptionsService.get("embedFullWidthRows"))return!1;var e="left"===this.params.pinned,t="right"===this.params.pinned,n=!e&&!t;return this.gridOptionsService.get("enableRtl")?this.columnModel.isPinningLeft()?!t:!n:this.columnModel.isPinningLeft()?!e:!n}},{key:"findDisplayedGroupNode",value:function(){var e=this.params.column,t=this.params.node;if(this.showingValueForOpenedParent)for(var n=t.parent;null!=n;){if(n.rowGroupColumn&&e.isRowGroupDisplayed(n.rowGroupColumn.getId())){this.displayedGroupNode=n;break}n=n.parent}_n(this.displayedGroupNode)&&(this.displayedGroupNode=t)}},{key:"setupShowingValueForOpenedParent",value:function(){var e=this.params.node,t=this.params.column;if(this.gridOptionsService.get("groupHideOpenParents"))if(e.groupData){if(null!=e.rowGroupColumn){var n=e.rowGroupColumn.getId();if(t.isRowGroupDisplayed(n))return void(this.showingValueForOpenedParent=!1)}var i=null!=e.groupData[t.getId()];this.showingValueForOpenedParent=i}else this.showingValueForOpenedParent=!1;else this.showingValueForOpenedParent=!1}},{key:"addValueElement",value:function(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())}},{key:"addGroupValue",value:function(){var e,t=this.adjustParamsWithDetailsFromRelatedColumn(),n=this.getInnerCompDetails(t),i=t.valueFormatted,r=t.value,o=i;if(null==o){var a=this.displayedGroupNode.rowGroupColumn&&(null==(e=this.params.column)?void 0:e.isRowGroupDisplayed(this.displayedGroupNode.rowGroupColumn.getId()));if(""===this.displayedGroupNode.key&&this.displayedGroupNode.group&&a)o=this.localeService.getLocaleTextFunc()("blanks","(Blanks)");else o=null!=r?r:null}this.comp.setInnerRenderer(n,o)}},{key:"adjustParamsWithDetailsFromRelatedColumn",value:function(){var e=this.displayedGroupNode.rowGroupColumn,t=this.params.column;if(!e)return this.params;if(null!=t&&!t.isRowGroupDisplayed(e.getId()))return this.params;var n=this.params,i=this.params,r=i.value,o=i.node,a=this.valueFormatterService.formatValue(e,o,r);return On(Tn({},n),{valueFormatted:a})}},{key:"addFooterValue",value:function(){var e=this.params.footerValueGetter,t="";if(e){var n=Xn(this.params);n.value=this.params.value,"function"===typeof e?t=e(n):"string"===typeof e?t=this.expressionService.evaluate(e,n):console.warn("AG Grid: footerValueGetter should be either a function or a string (expression)")}else{t=this.localeService.getLocaleTextFunc()("footerTotal","Total")+" "+(null!=this.params.value?this.params.value:"")}var i=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(i,t)}},{key:"getInnerCompDetails",value:function(e){var t=this;if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gridOptionsService.get("groupRowRendererParams"),e);var n=this.userComponentFactory.getInnerRendererDetails(e,e),i=function(e){return e&&e.componentClass==t.compClass};if(n&&!i(n))return n;var r=this.displayedGroupNode.rowGroupColumn,o=r?r.getColDef():void 0;if(o){var a=this.userComponentFactory.getCellRendererDetails(o,e);if(a&&!i(a))return a;if(i(a)&&o.cellRendererParams&&o.cellRendererParams.innerRenderer)return this.userComponentFactory.getInnerRendererDetails(o.cellRendererParams,e)}}},{key:"addChildCount",value:function(){this.params.suppressCount||(this.addManagedListener(this.displayedGroupNode,jl.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this)),this.updateChildCount())}},{key:"updateChildCount",value:function(){var e=this.displayedGroupNode.allChildrenCount,t=this.isShowRowGroupForThisRow()&&null!=e&&e>=0?"(".concat(e,")"):"";this.comp.setChildCount(t)}},{key:"isShowRowGroupForThisRow",value:function(){if(this.gridOptionsService.get("treeData"))return!0;var e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;var t=this.params.column;return null==t||t.isRowGroupDisplayed(e.getId())}},{key:"addExpandAndContract",value:function(){var e,t=this.params,n=cs("groupExpanded",this.gridOptionsService,null),i=cs("groupContracted",this.gridOptionsService,null);n&&this.eExpanded.appendChild(n),i&&this.eContracted.appendChild(i);var r=t.eGridCell;(null==(e=this.params.column)?void 0:e.isCellEditable(t.node))&&this.gridOptionsService.get("enableGroupEdit")||!this.isExpandable()||t.suppressDoubleClickExpand||this.addManagedListener(r,"dblclick",this.onCellDblClicked.bind(this)),this.addManagedListener(this.eExpanded,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eContracted,"click",this.onExpandClicked.bind(this)),this.addManagedListener(r,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(t.node,jl.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this)),this.showExpandAndContractIcons();var o=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListener(this.displayedGroupNode,jl.EVENT_ALL_CHILDREN_COUNT_CHANGED,o),this.addManagedListener(this.displayedGroupNode,jl.EVENT_MASTER_CHANGED,o),this.addManagedListener(this.displayedGroupNode,jl.EVENT_GROUP_CHANGED,o),this.addManagedListener(this.displayedGroupNode,jl.EVENT_HAS_CHILDREN_CHANGED,o)}},{key:"onExpandClicked",value:function(e){hr(e)||(dr(e),this.onExpandOrContract(e))}},{key:"onExpandOrContract",value:function(e){var t=this.displayedGroupNode,n=!t.expanded;!n&&t.sticky&&this.scrollToStickyNode(t),t.setExpanded(n,e)}},{key:"scrollToStickyNode",value:function(e){this.ctrlsService.getGridBodyCtrl().getScrollFeature().setVerticalScrollPosition(e.rowTop-e.stickyRowTop)}},{key:"isExpandable",value:function(){if(this.showingValueForOpenedParent)return!0;var e=this.displayedGroupNode,t=this.columnModel.isPivotMode()&&e.leafGroup;if(!(e.isExpandable()&&!e.footer&&!t))return!1;var n=this.params.column;return null==n||"string"!==typeof n.getColDef().showRowGroup||this.isShowRowGroupForThisRow()}},{key:"showExpandAndContractIcons",value:function(){var e=this.params,t=this.displayedGroupNode,n=this.columnModel,i=e.node,r=this.isExpandable();if(r){var o=!!this.showingValueForOpenedParent||i.expanded;this.comp.setExpandedDisplayed(o),this.comp.setContractedDisplayed(!o)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);var a=n.isPivotMode(),s=a&&t.leafGroup,l=r&&!s,u=i.footer&&-1===i.level;this.comp.addOrRemoveCssClass("ag-cell-expandable",l),this.comp.addOrRemoveCssClass("ag-row-group",l),a?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",s):u||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!l)}},{key:"onRowNodeIsExpandableChanged",value:function(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()}},{key:"setupIndent",value:function(){var e=this.params.node;this.params.suppressPadding||(this.addManagedListener(e,jl.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this)),this.setIndent())}},{key:"setIndent",value:function(){if(!this.gridOptionsService.get("groupHideOpenParents")){var e=this.params,t=e.node,n=!!e.colDef,i=this.gridOptionsService.get("treeData"),r=!n||i||!0===e.colDef.showRowGroup?t.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+r,this.comp.addOrRemoveCssClass(this.indentClass,!0)}}},{key:"addFullWidthRowDraggerIfNeeded",value:function(){var e=this;if(this.params.fullWidth&&this.params.rowDrag){var t=new ql((function(){return e.params.value}),this.params.node);this.createManagedBean(t,this.context),this.eGui.insertAdjacentElement("afterbegin",t.getGui())}}},{key:"isUserWantsSelected",value:function(){var e=this.params.checkbox;return"function"===typeof e||!0===e}},{key:"addCheckboxIfNeeded",value:function(){var e=this,t=this.displayedGroupNode,n=this.isUserWantsSelected()&&!t.footer&&!t.rowPinned&&!t.detail;if(n){var i=new Kl;this.getContext().createBean(i),i.init({rowNode:this.params.node,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(i.getGui()),this.addDestroyFunc((function(){return e.getContext().destroyBean(i)}))}this.comp.setCheckboxVisible(n)}},{key:"onKeyDown",value:function(e){e.key!==hs.ENTER||this.params.suppressEnterExpand||(this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e))}},{key:"onCellDblClicked",value:function(e){hr(e)||(vr(this.eExpanded,e)||vr(this.eContracted,e)||this.onExpandOrContract(e))}}]),n}(kr);Mn([Di("expressionService")],eu.prototype,"expressionService",2),Mn([Di("valueFormatterService")],eu.prototype,"valueFormatterService",2),Mn([Di("columnModel")],eu.prototype,"columnModel",2),Mn([Di("userComponentFactory")],eu.prototype,"userComponentFactory",2),Mn([Di("ctrlsService")],eu.prototype,"ctrlsService",2);var tu=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,n.TEMPLATE)}return(0,s.Z)(n,[{key:"init",value:function(e){var t=this,n={setInnerRenderer:function(e,n){return t.setRenderDetails(e,n)},setChildCount:function(e){return t.eChildCount.textContent=e},addOrRemoveCssClass:function(e,n){return t.addOrRemoveCssClass(e,n)},setContractedDisplayed:function(e){return Sa(t.eContracted,e)},setExpandedDisplayed:function(e){return Sa(t.eExpanded,e)},setCheckboxVisible:function(e){return t.eCheckbox.classList.toggle("ag-invisible",!e)}},i=this.createManagedBean(new eu),r=!e.colDef,o=this.getGui();i.init(n,o,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),r&&no(o,i.getCellAriaRole())}},{key:"setRenderDetails",value:function(e,t){var n=this;if(e){var i=e.newAgStackInstance();if(!i)return;i.then((function(e){if(e){var t=function(){return n.context.destroyBean(e)};n.isAlive()?(n.eValue.appendChild(e.getGui()),n.addDestroyFunc(t)):t()}}))}else this.eValue.innerText=t}},{key:"destroy",value:function(){this.getContext().destroyBean(this.innerCellRenderer),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}},{key:"refresh",value:function(){return!1}}]),n}(Ns);tu.TEMPLATE='<span class="ag-cell-wrapper">\n            <span class="ag-group-expanded" ref="eExpanded"></span>\n            <span class="ag-group-contracted" ref="eContracted"></span>\n            <span class="ag-group-checkbox ag-invisible" ref="eCheckbox"></span>\n            <span class="ag-group-value" ref="eValue"></span>\n            <span class="ag-group-child-count" ref="eChildCount"></span>\n        </span>',Mn([Ls("eExpanded")],tu.prototype,"eExpanded",2),Mn([Ls("eContracted")],tu.prototype,"eContracted",2),Mn([Ls("eCheckbox")],tu.prototype,"eCheckbox",2),Mn([Ls("eValue")],tu.prototype,"eValue",2),Mn([Ls("eChildCount")],tu.prototype,"eChildCount",2);var nu=tu,iu=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,n.TEMPLATE)}return(0,s.Z)(n,[{key:"init",value:function(e){e.node.failedLoad?this.setupFailed():this.setupLoading()}},{key:"setupFailed",value:function(){var e=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingError","ERR")}},{key:"setupLoading",value:function(){var e=cs("groupLoading",this.gridOptionsService,null);e&&this.eLoadingIcon.appendChild(e);var t=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingOoo","Loading")}},{key:"refresh",value:function(e){return!1}},{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}}]),n}(Ns);iu.TEMPLATE='<div class="ag-loading">\n            <span class="ag-loading-icon" ref="eLoadingIcon"></span>\n            <span class="ag-loading-text" ref="eLoadingText"></span>\n        </div>',Mn([Ls("eLoadingIcon")],iu.prototype,"eLoadingIcon",2),Mn([Ls("eLoadingText")],iu.prototype,"eLoadingText",2);var ru=iu,ou=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this)}return(0,s.Z)(n,[{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}},{key:"init",value:function(e){var t=this,i=this.gridOptionsService.get("overlayLoadingTemplate");if(this.setTemplate(null!=i?i:n.DEFAULT_LOADING_OVERLAY_TEMPLATE),!i){var r=this.localeService.getLocaleTextFunc();setTimeout((function(){t.getGui().textContent=r("loadingOoo","Loading...")}))}}}]),n}(Ns);ou.DEFAULT_LOADING_OVERLAY_TEMPLATE='<span aria-live="polite" aria-atomic="true" class="ag-overlay-loading-center"></span>';var au=ou,su=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this)}return(0,s.Z)(n,[{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}},{key:"init",value:function(e){var t=this,i=this.gridOptionsService.get("overlayNoRowsTemplate");if(this.setTemplate(null!=i?i:n.DEFAULT_NO_ROWS_TEMPLATE),!i){var r=this.localeService.getLocaleTextFunc();setTimeout((function(){t.getGui().textContent=r("noRowsToShow","No Rows To Show")}))}}}]),n}(Ns);su.DEFAULT_NO_ROWS_TEMPLATE='<span class="ag-overlay-no-rows-center"></span>';var lu=su,uu=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,'<div class="ag-tooltip"></div>')}return(0,s.Z)(n,[{key:"init",value:function(e){var t=e.value;this.getGui().textContent=Lr(t,!0)}}]),n}(Fl),cu=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"getTemplate",value:function(){return'<ag-input-number-field class="ag-cell-editor" ref="eInput"></ag-input-number-field>'}},{key:"init",value:function(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);var n=e.getInputElement();t.preventStepping?e.addManagedListener(n,"keydown",this.preventStepping):t.showStepperButtons&&n.classList.add("ag-number-field-input-stepper")}},{key:"preventStepping",value:function(e){e.key!==hs.UP&&e.key!==hs.DOWN||e.preventDefault()}},{key:"getValue",value:function(){var e=this.eInput.getValue();if(!Fn(e)&&!Fn(this.params.value))return this.params.value;var 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}},{key:"getStartValue",value:function(){return this.params.value}}]),e}(),du=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,new cu)}return(0,s.Z)(n)}(Vl),hu=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"getTemplate",value:function(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'}},{key:"init",value:function(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)}},{key:"getValue",value:function(){var e=this.eInput.getDate();return Fn(e)||Fn(this.params.value)?null!=e?e:null:this.params.value}},{key:"getStartValue",value:function(){var e=this.params.value;if(e instanceof Date)return ha(e,!1)}}]),e}(),pu=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,new hu)}return(0,s.Z)(n)}(Vl),fu=function(){function e(t){(0,a.Z)(this,e),this.getDataTypeService=t}return(0,s.Z)(e,[{key:"getTemplate",value:function(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'}},{key:"init",value:function(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)}},{key:"getValue",value:function(){var e=this.formatDate(this.eInput.getDate());return Fn(e)||Fn(this.params.value)?this.params.parseValue(null!=e?e:""):this.params.value}},{key:"getStartValue",value:function(){var e,t;return ha(null!=(t=this.parseDate(null!=(e=this.params.value)?e:void 0))?t:null,!1)}},{key:"parseDate",value:function(e){return this.getDataTypeService().getDateParserFunction(this.params.column)(e)}},{key:"formatDate",value:function(e){return this.getDataTypeService().getDateFormatterFunction(this.params.column)(e)}}]),e}(),vu=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),e=t.call(this,new fu((function(){return e.dataTypeService})))}return(0,s.Z)(n)}(Vl);Mn([Di("dataTypeService")],vu.prototype,"dataTypeService",2);var gu=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,n.TEMPLATE)}return(0,s.Z)(n,[{key:"init",value:function(e){var t=this;this.params=e,this.updateCheckbox(e);var n=this.eCheckbox.getInputElement();n.setAttribute("tabindex","-1"),co(n,"polite"),this.addManagedListener(n,"click",(function(e){if(dr(e),!t.eCheckbox.isDisabled()){var n=t.eCheckbox.getValue();t.onCheckboxChanged(n)}})),this.addManagedListener(n,"dblclick",(function(e){dr(e)}));var i=this.gridOptionsService.getDocument();this.addManagedListener(this.params.eGridCell,"keydown",(function(e){if(e.key===hs.SPACE&&!t.eCheckbox.isDisabled()){t.params.eGridCell===i.activeElement&&t.eCheckbox.toggle();var n=t.eCheckbox.getValue();t.onCheckboxChanged(n),e.preventDefault()}}))}},{key:"refresh",value:function(e){return this.params=e,this.updateCheckbox(e),!0}},{key:"updateCheckbox",value:function(e){var t,n,i,r,o=!0;if(e.node.group&&e.column){var a=e.column.getColId();a.startsWith(Dr)?r=null==e.value||""===e.value?void 0:"true"===e.value:e.node.aggData&&void 0!==e.node.aggData[a]?r=null!=(t=e.value)?t:void 0:o=!1}else r=null!=(n=e.value)?n:void 0;if(o){this.eCheckbox.setValue(r);var s=null!=e.disabled?e.disabled:!(null==(i=e.column)?void 0:i.isCellEditable(e.node));this.eCheckbox.setDisabled(s);var l=this.localeService.getLocaleTextFunc(),u=No(l,r),c=s?u:"".concat(l("ariaToggleCellValue","Press SPACE to toggle cell value")," (").concat(u,")");this.eCheckbox.setInputAriaLabel(c)}else this.eCheckbox.setDisplayed(!1)}},{key:"onCheckboxChanged",value:function(e){var t=this.params,n=t.column,i=t.node,r=t.rowIndex,o=t.value,a={type:Er.EVENT_CELL_EDITING_STARTED,column:n,colDef:null==n?void 0:n.getColDef(),data:i.data,node:i,rowIndex:r,rowPinned:i.rowPinned,value:o};this.eventService.dispatchEvent(a);var s=this.params.node.setDataValue(this.params.column,e,"edit"),l={type:Er.EVENT_CELL_EDITING_STOPPED,column:n,colDef:null==n?void 0:n.getColDef(),data:i.data,node:i,rowIndex:r,rowPinned:i.rowPinned,value:o,oldValue:o,newValue:e,valueChanged:s};this.eventService.dispatchEvent(l)}}]),n}(Ns);gu.TEMPLATE='\n        <div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">\n            <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n        </div>',Mn([Ls("eCheckbox")],gu.prototype,"eCheckbox",2);var mu=gu,yu=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,'\n            <div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">\n                <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n            </div>')}return(0,s.Z)(n,[{key:"init",value:function(e){var t,n=this;this.params=e;var i=null!=(t=e.value)?t:void 0;this.eCheckbox.setValue(i),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(i),this.addManagedListener(this.eCheckbox,Er.EVENT_FIELD_VALUE_CHANGED,(function(e){return n.setAriaLabel(e.selected)}))}},{key:"getValue",value:function(){return this.eCheckbox.getValue()}},{key:"focusIn",value:function(){this.eCheckbox.getFocusableElement().focus()}},{key:"afterGuiAttached",value:function(){this.params.cellStartedEdit&&this.focusIn()}},{key:"isPopup",value:function(){return!1}},{key:"setAriaLabel",value:function(e){var t=this.localeService.getLocaleTextFunc(),n=No(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel("".concat(i," (").concat(n,")"))}}]),n}(Fl);Mn([Ls("eCheckbox")],yu.prototype,"eCheckbox",2);var Cu=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.call(this)).setTemplate("<div></div>"),e}return(0,s.Z)(n,[{key:"init",value:function(e){var t;this.params=e,this.cssClassPrefix=null!=(t=this.params.cssClassPrefix)?t:"ag-menu-option",this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu()}},{key:"configureDefaults",value:function(){return!0}},{key:"addIcon",value:function(){if(!this.params.isCompact){var e=Za('<span ref="eIcon" class="'.concat(this.getClassName("part")," ").concat(this.getClassName("icon"),'" role="presentation"></span>'));this.params.checked?e.appendChild(cs("check",this.gridOptionsService)):this.params.icon&&(Qa(this.params.icon)?e.appendChild(this.params.icon):"string"===typeof this.params.icon?e.innerHTML=this.params.icon:console.warn("AG Grid: menu item icon must be DOM node or string")),this.getGui().appendChild(e)}}},{key:"addName",value:function(){var e=Za('<span ref="eName" class="'.concat(this.getClassName("part")," ").concat(this.getClassName("text"),'">').concat(this.params.name||"","</span>"));this.getGui().appendChild(e)}},{key:"addShortcut",value:function(){if(!this.params.isCompact){var e=Za('<span ref="eShortcut" class="'.concat(this.getClassName("part")," ").concat(this.getClassName("shortcut"),'">').concat(this.params.shortcut||"","</span>"));this.getGui().appendChild(e)}}},{key:"addSubMenu",value:function(){var e=Za('<span ref="ePopupPointer" class="'.concat(this.getClassName("part")," ").concat(this.getClassName("popup-pointer"),'"></span>')),t=this.getGui();if(this.params.subMenu){var n=this.gridOptionsService.get("enableRtl")?"smallLeft":"smallRight";yo(t,!1),e.appendChild(cs(n,this.gridOptionsService))}t.appendChild(e)}},{key:"getClassName",value:function(e){return"".concat(this.cssClassPrefix,"-").concat(e)}},{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}}]),n}(Ns),ku=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).agGridDefaults={agDateInput:pl,agColumnHeader:Nl,agColumnGroupHeader:Il,agSortIndicator:Al,agTextColumnFloatingFilter:Dl,agNumberColumnFloatingFilter:Rl,agDateColumnFloatingFilter:hl,agReadOnlyFloatingFilter:Fs,agAnimateShowChangeCellRenderer:Wl,agAnimateSlideCellRenderer:zl,agGroupCellRenderer:nu,agGroupRowRenderer:nu,agLoadingCellRenderer:ru,agCheckboxCellRenderer:mu,agCellEditor:Bl,agTextCellEditor:Bl,agNumberCellEditor:du,agDateCellEditor:pu,agDateStringCellEditor:vu,agSelectCellEditor:Zl,agLargeTextCellEditor:Gl,agCheckboxCellEditor:yu,agTextColumnFilter:Sl,agNumberColumnFilter:Cl,agDateColumnFilter:cl,agLoadingOverlay:au,agNoRowsOverlay:lu,agTooltipComponent:uu,agMenuItem:Cu},e.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",agRichSelect:"@ag-grid-enterprise/rich-select",agRichSelectCellEditor:"@ag-grid-enterprise/rich-select",agDetailCellRenderer:"@ag-grid-enterprise/master-detail",agSparklineCellRenderer:"@ag-grid-enterprise/sparklines"},e.jsComps={},e}return(0,s.Z)(n,[{key:"init",value:function(){var e=this;null!=this.gridOptions.components&&Yn(this.gridOptions.components,(function(t,n){return e.registerJsComponent(t,n)}))}},{key:"registerDefaultComponent",value:function(e,t){this.agGridDefaults[e]?console.error("Trying to overwrite a default component. You should call registerComponent"):this.agGridDefaults[e]=t}},{key:"registerJsComponent",value:function(e,t){this.jsComps[e]=t}},{key:"retrieve",value:function(e,t){var n=this,i=function(e,t){return{componentFromFramework:t,component:e}},r=this.getFrameworkOverrides().frameworkComponent(t,this.gridOptions.components);if(null!=r)return i(r,!0);var o=this.jsComps[t];if(o)return i(o,this.getFrameworkOverrides().isFrameworkComponent(o));var a=this.agGridDefaults[t];if(a)return i(a,!1);var s=this.enterpriseAgDefaultCompsModule[t];return s?wi.__assertRegistered(s,"AG Grid '".concat(e,"' component: ").concat(t),this.context.getGridId()):ri((function(){n.warnAboutMissingComponent(e,t)}),"MissingComp"+t),null}},{key:"warnAboutMissingComponent",value:function(e,t){var n=[].concat((0,o.Z)(Object.keys(this.agGridDefaults).filter((function(e){return!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(e)}))),(0,o.Z)(Object.keys(this.jsComps))),i=os(t,n,!0,.8).values;console.warn("AG Grid: Could not find '".concat(t,"' component. It was configured as \"").concat(e,": '").concat(t,"'\" but it wasn't found in the list of registered components.")),i.length>0&&console.warn("         Did you mean: [".concat(i.slice(0,3),"]?")),console.warn("If using a custom component check it has been registered as described in: ".concat(this.getFrameworkOverrides().getDocLink("components/")))}}]),n}(kr);Mn([Di("gridOptions")],ku.prototype,"gridOptions",2),Mn([Ei],ku.prototype,"init",1),ku=Mn([Ri("userComponentRegistry")],ku);var wu={propertyName:"dateComponent",cellRenderer:!1},Su={propertyName:"headerComponent",cellRenderer:!1},bu={propertyName:"headerGroupComponent",cellRenderer:!1},Eu={propertyName:"cellRenderer",cellRenderer:!0},xu={propertyName:"cellEditor",cellRenderer:!1},Ru={propertyName:"innerRenderer",cellRenderer:!0},Du={propertyName:"loadingOverlayComponent",cellRenderer:!1},Tu={propertyName:"noRowsOverlayComponent",cellRenderer:!1},Ou={propertyName:"tooltipComponent",cellRenderer:!1},Pu={propertyName:"filter",cellRenderer:!1},Au={propertyName:"floatingFilterComponent",cellRenderer:!1},Mu={propertyName:"toolPanel",cellRenderer:!1},Nu={propertyName:"statusPanel",cellRenderer:!1},Lu={propertyName:"fullWidthCellRenderer",cellRenderer:!0},Iu={propertyName:"loadingCellRenderer",cellRenderer:!0},Fu={propertyName:"groupRowRenderer",cellRenderer:!0},_u={propertyName:"detailCellRenderer",cellRenderer:!0},Gu={propertyName:"menuItem",cellRenderer:!1},Zu=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,null,[{key:"getFloatingFilterType",value:function(e){return this.filterToFloatingFilterMapping[e]}}]),e}();Zu.filterToFloatingFilterMapping={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",group:"agGroupColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"};var Vu=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"getHeaderCompDetails",value:function(e,t){return this.getCompDetails(e,Su,"agColumnHeader",t)}},{key:"getHeaderGroupCompDetails",value:function(e){var t=e.columnGroup.getColGroupDef();return this.getCompDetails(t,bu,"agColumnGroupHeader",e)}},{key:"getFullWidthCellRendererDetails",value:function(e){return this.getCompDetails(this.gridOptions,Lu,null,e,!0)}},{key:"getFullWidthLoadingCellRendererDetails",value:function(e){return this.getCompDetails(this.gridOptions,Iu,"agLoadingCellRenderer",e,!0)}},{key:"getFullWidthGroupCellRendererDetails",value:function(e){return this.getCompDetails(this.gridOptions,Fu,"agGroupRowRenderer",e,!0)}},{key:"getFullWidthDetailCellRendererDetails",value:function(e){return this.getCompDetails(this.gridOptions,_u,"agDetailCellRenderer",e,!0)}},{key:"getInnerRendererDetails",value:function(e,t){return this.getCompDetails(e,Ru,null,t)}},{key:"getFullWidthGroupRowInnerCellRenderer",value:function(e,t){return this.getCompDetails(e,Ru,null,t)}},{key:"getCellRendererDetails",value:function(e,t){return this.getCompDetails(e,Eu,null,t)}},{key:"getCellEditorDetails",value:function(e,t){return this.getCompDetails(e,xu,"agCellEditor",t,!0)}},{key:"getFilterDetails",value:function(e,t,n){return this.getCompDetails(e,Pu,n,t,!0)}},{key:"getDateCompDetails",value:function(e){return this.getCompDetails(this.gridOptions,wu,"agDateInput",e,!0)}},{key:"getLoadingOverlayCompDetails",value:function(e){return this.getCompDetails(this.gridOptions,Du,"agLoadingOverlay",e,!0)}},{key:"getNoRowsOverlayCompDetails",value:function(e){return this.getCompDetails(this.gridOptions,Tu,"agNoRowsOverlay",e,!0)}},{key:"getTooltipCompDetails",value:function(e){return this.getCompDetails(e.colDef,Ou,"agTooltipComponent",e,!0)}},{key:"getSetFilterCellRendererDetails",value:function(e,t){return this.getCompDetails(e,Eu,null,t)}},{key:"getFloatingFilterCompDetails",value:function(e,t,n){return this.getCompDetails(e,Au,n,t)}},{key:"getToolPanelCompDetails",value:function(e,t){return this.getCompDetails(e,Mu,null,t,!0)}},{key:"getStatusPanelCompDetails",value:function(e,t){return this.getCompDetails(e,Nu,null,t,!0)}},{key:"getMenuItemCompDetails",value:function(e,t){return this.getCompDetails(e,Gu,"agMenuItem",t,!0)}},{key:"getCompDetails",value:function(e,t,n,i){var r=this,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=t.propertyName,s=t.cellRenderer,l=this.getCompKeys(e,t,i),u=l.compName,c=l.jsComp,d=l.fwComp,h=l.paramsFromSelector,p=l.popupFromSelector,f=l.popupPositionFromSelector,v=function(e){var t=r.userComponentRegistry.retrieve(a,e);t&&(c=t.componentFromFramework?void 0:t.component,d=t.componentFromFramework?t.component:void 0)};if(null!=u&&v(u),null==c&&null==d&&null!=n&&v(n),c&&s&&!this.agComponentUtils.doesImplementIComponent(c)&&(c=this.agComponentUtils.adaptFunction(a,c)),c||d){var g=this.mergeParamsWithApplicationProvidedParams(e,t,i,h),m=null==c,y=c||d;return{componentFromFramework:m,componentClass:y,params:g,type:t,popupFromSelector:p,popupPositionFromSelector:f,newAgStackInstance:function(){return r.newAgStackInstance(y,m,g,t)}}}o&&console.error("AG Grid: Could not find component ".concat(u,", did you forget to configure this component?"))}},{key:"getCompKeys",value:function(e,t,n){var i,r,o,a,s,l,u=this,c=t.propertyName;if(e){var d=e,h=d[c+"Selector"],p=h?h(n):null,f=function(e){if("string"===typeof e)i=e;else if(null!=e&&!0!==e){u.getFrameworkOverrides().isFrameworkComponent(e)?o=e:r=e}};p?(f(p.component),a=p.params,s=p.popup,l=p.popupPosition):f(d[c])}return{compName:i,jsComp:r,fwComp:o,paramsFromSelector:a,popupFromSelector:s,popupPositionFromSelector:l}}},{key:"newAgStackInstance",value:function(e,t,n,i){var r,o=i.propertyName;if(!t)r=new e;else{var a=this.componentMetadataProvider.retrieve(o);r=this.frameworkComponentWrapper.wrap(e,a.mandatoryMethodList,a.optionalMethodList,i)}var s=this.initComponent(r,n);return null==s?Rs.resolve(r):s.then((function(){return r}))}},{key:"mergeParamsWithApplicationProvidedParams",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=this.gridOptionsService.getGridCommonParams();Jn(r,n);var o=e,a=o&&o[t.propertyName+"Params"];if("function"===typeof a){var s=a(n);Jn(r,s)}else"object"===typeof a&&Jn(r,a);return Jn(r,i),r}},{key:"initComponent",value:function(e,t){if(this.context.createBean(e),null!=e.init)return e.init(t)}},{key:"getDefaultFloatingFilterType",value:function(e,t){if(null==e)return null;var n=null,i=this.getCompKeys(e,Pu),r=i.compName,o=i.jsComp,a=i.fwComp;r?n=Zu.getFloatingFilterType(r):null==o&&null==a&&!0===e.filter&&(n=t());return n}}]),n}(kr);Mn([Di("gridOptions")],Vu.prototype,"gridOptions",2),Mn([Di("agComponentUtils")],Vu.prototype,"agComponentUtils",2),Mn([Di("componentMetadataProvider")],Vu.prototype,"componentMetadataProvider",2),Mn([Di("userComponentRegistry")],Vu.prototype,"userComponentRegistry",2),Mn([Ti("frameworkComponentWrapper")],Vu.prototype,"frameworkComponentWrapper",2),Vu=Mn([Ri("userComponentFactory")],Vu);var Hu=(0,s.Z)((function e(){(0,a.Z)(this,e)}));Hu.ColDefPropertyMap={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,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0},Hu.ALL_PROPERTIES=Object.keys(Hu.ColDefPropertyMap);var Bu=Hu,Wu=function(){function e(t){(0,a.Z)(this,e),this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=t.scrollContainer,this.scrollHorizontally=-1!==t.scrollAxis.indexOf("x"),this.scrollVertically=-1!==t.scrollAxis.indexOf("y"),this.scrollByTick=null!=t.scrollByTick?t.scrollByTick:20,t.onScrollCallback&&(this.onScrollCallback=t.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=t.getVerticalPosition,this.setVerticalPosition=t.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=t.getHorizontalPosition,this.setHorizontalPosition=t.setHorizontalPosition),this.shouldSkipVerticalScroll=t.shouldSkipVerticalScroll||function(){return!1},this.shouldSkipHorizontalScroll=t.shouldSkipHorizontalScroll||function(){return!1}}return(0,s.Z)(e,[{key:"check",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t||this.shouldSkipVerticalScroll();if(!n||!this.shouldSkipHorizontalScroll()){var i=this.scrollContainer.getBoundingClientRect(),r=this.scrollByTick;this.tickLeft=e.clientX<i.left+r,this.tickRight=e.clientX>i.right-r,this.tickUp=e.clientY<i.top+r&&!n,this.tickDown=e.clientY>i.bottom-r&&!n,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}}},{key:"ensureTickingStarted",value:function(){null===this.tickingInterval&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}},{key:"doTick",value:function(){var e;if(this.tickCount++,e=this.tickCount>20?200:this.tickCount>10?80:40,this.scrollVertically){var t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){var n=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(n-e),this.tickRight&&this.setHorizontalPosition(n+e)}this.onScrollCallback&&this.onScrollCallback()}},{key:"ensureCleared",value:function(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}}]),e}(),zu=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).isMultiRowDrag=!1,i.eContainer=e,i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.gridOptionsService.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady((function(){var t=e.ctrlsService.getGridBodyCtrl();e.autoScrollService=new Wu({scrollContainer:t.getBodyViewportElement(),scrollAxis:"y",getVerticalPosition:function(){return t.getScrollFeature().getVScrollPosition().top},setVerticalPosition:function(e){return t.getScrollFeature().setVerticalScrollPosition(e)},onScrollCallback:function(){e.onDragging(e.lastDraggingEvent)}})}))}},{key:"getContainer",value:function(){return this.eContainer}},{key:"isInterestedIn",value:function(e){return 2===e}},{key:"getIconName",value:function(){return this.gridOptionsService.get("rowDragManaged")&&this.shouldPreventRowMove()?Xl.ICON_NOT_ALLOWED:Xl.ICON_MOVE}},{key:"shouldPreventRowMove",value:function(){return!!this.columnModel.getRowGroupColumns().length||(!!this.filterManager.isAnyFilterPresent()||!!this.sortController.isSortActive())}},{key:"getRowNodes",value:function(e){var t=this;if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];var n=this.gridOptionsService.get("rowDragMultiRow"),i=(0,o.Z)(this.selectionService.getSelectedNodes()).sort((function(e,n){return null==e.rowIndex||null==n.rowIndex?0:t.getRowIndexNumber(e)-t.getRowIndexNumber(n)})),r=e.dragItem.rowNode;return n&&-1!==i.indexOf(r)?(this.isMultiRowDrag=!0,i):(this.isMultiRowDrag=!1,[r])}},{key:"onDragEnter",value:function(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent(Er.EVENT_ROW_DRAG_ENTER,e),this.getRowNodes(e).forEach((function(e){e.setDragging(!0)})),this.onEnterOrDragging(e)}},{key:"onDragging",value:function(e){this.onEnterOrDragging(e)}},{key:"isFromThisGrid",value:function(e){return e.dragSource.dragSourceDomDataKey===this.gridOptionsService.getDomDataKey()}},{key:"isDropZoneWithinThisGrid",value:function(e){var t=this.ctrlsService.getGridBodyCtrl().getGui(),n=e.dropZoneTarget;return!t.contains(n)}},{key:"onEnterOrDragging",value:function(e){this.dispatchGridEvent(Er.EVENT_ROW_DRAG_MOVE,e),this.lastDraggingEvent=e;var t=this.mouseEventService.getNormalisedPosition(e).y;this.gridOptionsService.get("rowDragManaged")&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)}},{key:"doManagedDrag",value:function(e,t){var n=this.isFromThisGrid(e),i=this.gridOptionsService.get("rowDragManaged"),r=e.dragItem.rowNodes;i&&this.shouldPreventRowMove()||(this.gridOptionsService.get("suppressMoveWhenRowDragging")||!n?this.isDropZoneWithinThisGrid(e)||this.clientSideRowModel.highlightRowAtPixel(r[0],t):this.moveRows(r,t))}},{key:"getRowIndexNumber",value:function(e){return parseInt(Ui(e.getRowIndexString().split("-")),10)}},{key:"moveRowAndClearHighlight",value:function(e){var t=this,n=this.clientSideRowModel.getLastHighlightedRowNode(),i=n&&1===n.highlighted,r=this.mouseEventService.getNormalisedPosition(e).y,o=e.dragItem.rowNodes,a=i?1:0;if(this.isFromThisGrid(e))o.forEach((function(e){e.rowTop<r&&(a-=1)})),this.moveRows(o,r,a);else{var s=this.gridOptionsService.getCallback("getRowId"),l=this.clientSideRowModel.getRowIndexAtPixel(r)+1;0===this.clientSideRowModel.getHighlightPosition(r)&&l--,this.clientSideRowModel.updateRowData({add:o.map((function(e){return e.data})).filter((function(e){return!t.clientSideRowModel.getRowNode(s?s({data:e,level:0}):e.id)})),addIndex:l})}this.clearRowHighlight()}},{key:"clearRowHighlight",value:function(){this.clientSideRowModel.highlightRowAtPixel(null)}},{key:"moveRows",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=this.clientSideRowModel.ensureRowsAtPixel(e,t,n);i&&(this.focusService.clearFocusedCell(),this.rangeService&&this.rangeService.removeAllCellRanges())}},{key:"addRowDropZone",value:function(e){var t=this;if(e.getContainer())if(this.dragAndDropService.findExternalZone(e))console.warn("AG Grid: addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.");else{var n={getContainer:e.getContainer};e.fromGrid?n=e:(e.onDragEnter&&(n.onDragEnter=function(n){e.onDragEnter(t.draggingToRowDragEvent(Er.EVENT_ROW_DRAG_ENTER,n))}),e.onDragLeave&&(n.onDragLeave=function(n){e.onDragLeave(t.draggingToRowDragEvent(Er.EVENT_ROW_DRAG_LEAVE,n))}),e.onDragging&&(n.onDragging=function(n){e.onDragging(t.draggingToRowDragEvent(Er.EVENT_ROW_DRAG_MOVE,n))}),e.onDragStop&&(n.onDragStop=function(n){e.onDragStop(t.draggingToRowDragEvent(Er.EVENT_ROW_DRAG_END,n))})),this.dragAndDropService.addDropTarget(Tn({isInterestedIn:function(e){return 2===e},getIconName:function(){return Xl.ICON_MOVE},external:!0},n))}else oi("addRowDropZone - A container target needs to be provided")}},{key:"getRowDropZone",value:function(e){var t=this,n=this.getContainer.bind(this),i=this.onDragEnter.bind(this),r=this.onDragLeave.bind(this),o=this.onDragging.bind(this),a=this.onDragStop.bind(this);return e?{getContainer:n,onDragEnter:e.onDragEnter?function(n){i(n),e.onDragEnter(t.draggingToRowDragEvent(Er.EVENT_ROW_DRAG_ENTER,n))}:i,onDragLeave:e.onDragLeave?function(n){r(n),e.onDragLeave(t.draggingToRowDragEvent(Er.EVENT_ROW_DRAG_LEAVE,n))}:r,onDragging:e.onDragging?function(n){o(n),e.onDragging(t.draggingToRowDragEvent(Er.EVENT_ROW_DRAG_MOVE,n))}:o,onDragStop:e.onDragStop?function(n){a(n),e.onDragStop(t.draggingToRowDragEvent(Er.EVENT_ROW_DRAG_END,n))}:a,fromGrid:!0}:{getContainer:n,onDragEnter:i,onDragLeave:r,onDragging:o,onDragStop:a,fromGrid:!0}}},{key:"draggingToRowDragEvent",value:function(e,t){var n,i,r=this.mouseEventService.getNormalisedPosition(t).y,o=-1;switch(r>this.paginationProxy.getCurrentPageHeight()||(o=this.rowModel.getRowIndexAtPixel(r),n=this.rowModel.getRow(o)),t.vDirection){case 1:i="down";break;case 0:i="up";break;default:i=null}return this.gridOptionsService.addGridCommonParams({type:e,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:o,overNode:n,y:r,vDirection:i})}},{key:"dispatchGridEvent",value:function(e,t){var n=this.draggingToRowDragEvent(e,t);this.eventService.dispatchEvent(n)}},{key:"onDragLeave",value:function(e){this.dispatchGridEvent(Er.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e),this.gridOptionsService.get("rowDragManaged")&&this.clearRowHighlight(),this.isFromThisGrid(e)&&(this.isMultiRowDrag=!1)}},{key:"onDragStop",value:function(e){this.dispatchGridEvent(Er.EVENT_ROW_DRAG_END,e),this.stopDragging(e),!this.gridOptionsService.get("rowDragManaged")||!this.gridOptionsService.get("suppressMoveWhenRowDragging")&&this.isFromThisGrid(e)||this.isDropZoneWithinThisGrid(e)||this.moveRowAndClearHighlight(e)}},{key:"stopDragging",value:function(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach((function(e){e.setDragging(!1)}))}}]),n}(kr);Mn([Di("dragAndDropService")],zu.prototype,"dragAndDropService",2),Mn([Di("rowModel")],zu.prototype,"rowModel",2),Mn([Di("paginationProxy")],zu.prototype,"paginationProxy",2),Mn([Di("columnModel")],zu.prototype,"columnModel",2),Mn([Di("focusService")],zu.prototype,"focusService",2),Mn([Di("sortController")],zu.prototype,"sortController",2),Mn([Di("filterManager")],zu.prototype,"filterManager",2),Mn([Di("selectionService")],zu.prototype,"selectionService",2),Mn([Di("mouseEventService")],zu.prototype,"mouseEventService",2),Mn([Di("ctrlsService")],zu.prototype,"ctrlsService",2),Mn([Ti("rangeService")],zu.prototype,"rangeService",2),Mn([Ei],zu.prototype,"postConstruct",1);var Uu=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).dragEndFunctions=[],e.dragSources=[],e}return(0,s.Z)(n,[{key:"removeAllListeners",value:function(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0}},{key:"removeListener",value:function(e){var t=e.dragSource.eElement,n=e.mouseDownListener;if(t.removeEventListener("mousedown",n),e.touchEnabled){var i=e.touchStartListener;t.removeEventListener("touchstart",i,{passive:!0})}}},{key:"removeDragSource",value:function(e){var t=this.dragSources.find((function(t){return t.dragSource===e}));t&&(this.removeListener(t),Qi(this.dragSources,t))}},{key:"isDragging",value:function(){return this.dragging}},{key:"addDragSource",value:function(e){var t=this,n=this.onMouseDown.bind(this,e),i=e.eElement,r=e.includeTouch,o=e.stopPropagationForTouch;i.addEventListener("mousedown",n);var a=null,s=this.gridOptionsService.get("suppressTouch");r&&!s&&(a=function(n){wa(n.target)||(n.cancelable&&(n.preventDefault(),o&&n.stopPropagation()),t.onTouchStart(e,n))},i.addEventListener("touchstart",a,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:n,touchStartListener:a,touchEnabled:!!r})}},{key:"getStartTarget",value:function(){return this.startTarget}},{key:"onTouchStart",value:function(e,t){var n=this;this.currentDragParams=e,this.dragging=!1;var i=t.touches[0];this.touchLastTime=i,this.touchStart=i;var r=function(t){return n.onTouchUp(t,e.eElement)},o=t.target,a=[{target:this.gridOptionsService.getRootNode(),type:"touchmove",listener:function(e){e.cancelable&&e.preventDefault()},options:{passive:!1}},{target:o,type:"touchmove",listener:function(t){return n.onTouchMove(t,e.eElement)},options:{passive:!0}},{target:o,type:"touchend",listener:r,options:{passive:!0}},{target:o,type:"touchcancel",listener:r,options:{passive:!0}}];this.addTemporaryEvents(a),0===e.dragStartPixels&&this.onCommonMove(i,this.touchStart,e.eElement)}},{key:"onMouseDown",value:function(e,t){var n=this,i=t;if((!e.skipMouseEvent||!e.skipMouseEvent(t))&&!i._alreadyProcessedByDragService&&(i._alreadyProcessedByDragService=!0,0===t.button)){this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;var r=this.gridOptionsService.getRootNode(),o=[{target:r,type:"mousemove",listener:function(t){return n.onMouseMove(t,e.eElement)}},{target:r,type:"mouseup",listener:function(t){return n.onMouseUp(t,e.eElement)}},{target:r,type:"contextmenu",listener:function(e){return e.preventDefault()}}];this.addTemporaryEvents(o),0===e.dragStartPixels&&this.onMouseMove(t,e.eElement)}}},{key:"addTemporaryEvents",value:function(e){e.forEach((function(e){var t=e.target,n=e.type,i=e.listener,r=e.options;t.addEventListener(n,i,r)})),this.dragEndFunctions.push((function(){e.forEach((function(e){var t=e.target,n=e.type,i=e.listener,r=e.options;t.removeEventListener(n,i,r)}))}))}},{key:"isEventNearStartEvent",value:function(e,t){var n=this.currentDragParams.dragStartPixels;return Cs(e,t,Fn(n)?n:4)}},{key:"getFirstActiveTouch",value:function(e){for(var t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}},{key:"onCommonMove",value:function(e,t,n){if(!this.dragging){if(!this.dragging&&this.isEventNearStartEvent(e,t))return;this.dragging=!0;var i={type:Er.EVENT_DRAG_STARTED,target:n};this.eventService.dispatchEvent(i),this.currentDragParams.onDragStart(t),this.currentDragParams.onDragging(t)}this.currentDragParams.onDragging(e)}},{key:"onTouchMove",value:function(e,t){var n=this.getFirstActiveTouch(e.touches);n&&this.onCommonMove(n,this.touchStart,t)}},{key:"onMouseMove",value:function(e,t){var n;Wo()&&(null==(n=this.gridOptionsService.getDocument().getSelection())||n.removeAllRanges());this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}},{key:"shouldPreventMouseEvent",value:function(e){var t=this.gridOptionsService.get("enableCellTextSelection"),n="mousemove"===e.type;return t&&n&&e.cancelable&&this.mouseEventService.isEventFromThisGrid(e)&&!this.isOverFormFieldElement(e)}},{key:"isOverFormFieldElement",value:function(e){var t=e.target,n=null==t?void 0:t.tagName.toLocaleLowerCase();return!!(null==n?void 0:n.match("^a$|textarea|input|select|button"))}},{key:"onTouchUp",value:function(e,t){var n=this.getFirstActiveTouch(e.changedTouches);n||(n=this.touchLastTime),this.onUpCommon(n,t)}},{key:"onMouseUp",value:function(e,t){this.onUpCommon(e,t)}},{key:"onUpCommon",value:function(e,t){if(this.dragging){this.dragging=!1,this.currentDragParams.onDragStop(e);var n={type:Er.EVENT_DRAG_STOPPED,target:t};this.eventService.dispatchEvent(n)}this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach((function(e){return e()})),this.dragEndFunctions.length=0}}]),n}(kr);Mn([Di("mouseEventService")],Uu.prototype,"mouseEventService",2),Mn([xi],Uu.prototype,"removeAllListeners",1),Uu=Mn([Ri("dragService")],Uu);var ju="ag-list-item-hovered",Ku=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r){var o;return(0,a.Z)(this,n),(o=t.call(this)).comp=e,o.virtualList=i,o.params=r,o.currentDragValue=null,o.lastHoveredListItem=null,o}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.addManagedListener(this.params.eventSource,this.params.listItemDragStartEvent,this.listItemDragStart.bind(this)),this.addManagedListener(this.params.eventSource,this.params.listItemDragEndEvent,this.listItemDragEnd.bind(this)),this.createDropTarget(),this.createAutoScrollService()}},{key:"listItemDragStart",value:function(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)}},{key:"listItemDragEnd",value:function(){var e=this;window.setTimeout((function(){e.currentDragValue=null,e.moveBlocked=!1}),10)}},{key:"createDropTarget",value:function(){var e=this,t={isInterestedIn:function(t){return t===e.params.dragSourceType},getIconName:function(){return e.moveBlocked?Xl.ICON_PINNED:Xl.ICON_MOVE},getContainer:function(){return e.comp.getGui()},onDragging:function(t){return e.onDragging(t)},onDragStop:function(){return e.onDragStop()},onDragLeave:function(){return e.onDragLeave()}};this.dragAndDropService.addDropTarget(t)}},{key:"createAutoScrollService",value:function(){var e=this.virtualList.getGui();this.autoScrollService=new Wu({scrollContainer:e,scrollAxis:"y",getVerticalPosition:function(){return e.scrollTop},setVerticalPosition:function(t){return e.scrollTop=t}})}},{key:"onDragging",value:function(e){if(this.currentDragValue&&!this.moveBlocked){var t=this.getListDragItem(e),n=this.virtualList.getComponentAt(t.rowIndex);if(n){var i=n.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===t.rowIndex&&this.lastHoveredListItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=t,ya(i,ju),ya(i,"ag-item-highlight-".concat(t.position)))}}}},{key:"getListDragItem",value:function(e){var t=this.virtualList.getGui(),n=parseFloat(window.getComputedStyle(t).paddingTop),i=this.virtualList.getRowHeight(),r=this.virtualList.getScrollTop(),o=Math.max(0,(e.y-n+r)/i),a=this.params.getNumRows(this.comp)-1,s=0|Math.min(a,o);return{rowIndex:s,position:Math.round(o)>o||o>a?"bottom":"top",component:this.virtualList.getComponentAt(s)}}},{key:"onDragStop",value:function(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearHoveredItems(),this.autoScrollService.ensureCleared())}},{key:"onDragLeave",value:function(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()}},{key:"clearHoveredItems",value:function(){this.virtualList.getGui().querySelectorAll(".".concat(ju)).forEach((function(e){[ju,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach((function(t){e.classList.remove(t)}))})),this.lastHoveredListItem=null}}]),n}(kr);function Yu(e){var t=e;return null!=t&&null!=t.getFrameworkComponentInstance?t.getFrameworkComponentInstance():e}Mn([Di("dragAndDropService")],Ku.prototype,"dragAndDropService",2),Mn([Ei],Ku.prototype,"postConstruct",1);var Xu=function(){function e(){(0,a.Z)(this,e),this.detailGridInfoMap={},this.destroyCalled=!1}return(0,s.Z)(e,[{key:"init",value:function(){var e=this;switch(this.rowModel.getType()){case"clientSide":this.clientSideRowModel=this.rowModel;break;case"infinite":this.infiniteRowModel=this.rowModel;break;case"serverSide":this.serverSideRowModel=this.rowModel}this.ctrlsService.whenReady((function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl()}))}},{key:"__getAlignedGridService",value:function(){return this.alignedGridsService}},{key:"__getContext",value:function(){return this.context}},{key:"__getModel",value:function(){return this.rowModel}},{key:"getGridId",value:function(){return this.context.getGridId()}},{key:"addDetailGridInfo",value:function(e,t){this.detailGridInfoMap[e]=t}},{key:"removeDetailGridInfo",value:function(e){this.detailGridInfoMap[e]=void 0}},{key:"getDetailGridInfo",value:function(e){return this.detailGridInfoMap[e]}},{key:"forEachDetailGridInfo",value:function(e){var t=0;Yn(this.detailGridInfoMap,(function(n,i){Fn(i)&&(e(i,t),t++)}))}},{key:"getDataAsCsv",value:function(e){if(wi.__assertRegistered("@ag-grid-community/csv-export","api.getDataAsCsv",this.context.getGridId()))return this.csvCreator.getDataAsCsv(e)}},{key:"exportDataAsCsv",value:function(e){wi.__assertRegistered("@ag-grid-community/csv-export","api.exportDataAsCSv",this.context.getGridId())&&this.csvCreator.exportDataAsCsv(e)}},{key:"assertNotExcelMultiSheet",value:function(e,t){return!!wi.__assertRegistered("@ag-grid-enterprise/excel-export","api."+e,this.context.getGridId())&&(1!==this.excelCreator.getFactoryMode()||(console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'"),!1))}},{key:"getDataAsExcel",value:function(e){if(this.assertNotExcelMultiSheet("getDataAsExcel",e))return this.excelCreator.getDataAsExcel(e)}},{key:"exportDataAsExcel",value:function(e){this.assertNotExcelMultiSheet("exportDataAsExcel",e)&&this.excelCreator.exportDataAsExcel(e)}},{key:"getSheetDataForExcel",value:function(e){if(wi.__assertRegistered("@ag-grid-enterprise/excel-export","api.getSheetDataForExcel",this.context.getGridId()))return this.excelCreator.setFactoryMode(1),this.excelCreator.getSheetDataForExcel(e)}},{key:"getMultipleSheetsAsExcel",value:function(e){if(wi.__assertRegistered("@ag-grid-enterprise/excel-export","api.getMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.getMultipleSheetsAsExcel(e)}},{key:"exportMultipleSheetsAsExcel",value:function(e){wi.__assertRegistered("@ag-grid-enterprise/excel-export","api.exportMultipleSheetsAsExcel",this.context.getGridId())&&this.excelCreator.exportMultipleSheetsAsExcel(e)}},{key:"setGridAriaProperty",value:function(e,t){if(e){var n=this.ctrlsService.getGridBodyCtrl().getGui(),i="aria-".concat(e);null===t?n.removeAttribute(i):n.setAttribute(i,t)}}},{key:"logMissingRowModel",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];console.error("AG Grid: api.".concat(e," can only be called when gridOptions.rowModelType is ").concat(n.join(" or ")))}},{key:"logDeprecation",value:function(e,t,n,i){oi("Since ".concat(e," api.").concat(t," is deprecated. Please use ").concat(n," instead. ").concat(i))}},{key:"getPinnedTopRowCount",value:function(){return this.pinnedRowModel.getPinnedTopRowCount()}},{key:"getPinnedBottomRowCount",value:function(){return this.pinnedRowModel.getPinnedBottomRowCount()}},{key:"getPinnedTopRow",value:function(e){return this.pinnedRowModel.getPinnedTopRow(e)}},{key:"getPinnedBottomRow",value:function(e){return this.pinnedRowModel.getPinnedBottomRow(e)}},{key:"expireValueCache",value:function(){this.valueCache.expire()}},{key:"getVerticalPixelRange",value:function(){return this.gridBodyCtrl.getScrollFeature().getVScrollPosition()}},{key:"getHorizontalPixelRange",value:function(){return this.gridBodyCtrl.getScrollFeature().getHScrollPosition()}},{key:"refreshCells",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.frameworkOverrides.wrapIncoming((function(){return e.rowRenderer.refreshCells(t)}))}},{key:"flashCells",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=function(e){return oi("Since v31.1 api.flashCells parameter '".concat(e,"Delay' is deprecated. Please use '").concat(e,"Duration' instead."))};Fn(t.fadeDelay)&&n("fade"),Fn(t.flashDelay)&&n("flash"),this.frameworkOverrides.wrapIncoming((function(){return e.rowRenderer.flashCells(t)}))}},{key:"redrawRows",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t?t.rowNodes:void 0;this.frameworkOverrides.wrapIncoming((function(){return e.rowRenderer.redrawRows(n)}))}},{key:"refreshHeader",value:function(){var e=this;this.frameworkOverrides.wrapIncoming((function(){return e.ctrlsService.getHeaderRowContainerCtrls().forEach((function(e){return e.refresh()}))}))}},{key:"isAnyFilterPresent",value:function(){return this.filterManager.isAnyFilterPresent()}},{key:"isColumnFilterPresent",value:function(){return this.filterManager.isColumnFilterPresent()||this.filterManager.isAggregateFilterPresent()}},{key:"isQuickFilterPresent",value:function(){return this.filterManager.isQuickFilterPresent()}},{key:"getModel",value:function(){return oi("Since v31.1 getModel() is deprecated. Please use the appropriate grid API methods instead."),this.rowModel}},{key:"setRowNodeExpanded",value:function(e,t,n){this.expansionService.setRowNodeExpanded(e,t,n)}},{key:"onGroupExpandedOrCollapsed",value:function(){_n(this.clientSideRowModel)?this.logMissingRowModel("onGroupExpandedOrCollapsed","clientSide"):this.expansionService.onGroupExpandedOrCollapsed()}},{key:"refreshClientSideRowModel",value:function(e){_n(this.clientSideRowModel)?this.logMissingRowModel("refreshClientSideRowModel","clientSide"):this.clientSideRowModel.refreshModel(e)}},{key:"isAnimationFrameQueueEmpty",value:function(){return this.animationFrameService.isQueueEmpty()}},{key:"flushAllAnimationFrames",value:function(){this.animationFrameService.flushAllFrames()}},{key:"getRowNode",value:function(e){return this.rowModel.getRowNode(e)}},{key:"getSizesForCurrentTheme",value:function(){return{rowHeight:this.gos.getRowHeightAsNumber(),headerHeight:this.columnModel.getHeaderHeight()}}},{key:"expandAll",value:function(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!0):this.logMissingRowModel("expandAll","clientSide","serverSide")}},{key:"collapseAll",value:function(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!1):this.logMissingRowModel("collapseAll","clientSide","serverSide")}},{key:"addRenderedRowListener",value:function(e,t,n){this.rowRenderer.addRenderedRowListener(e,t,n)}},{key:"getQuickFilter",value:function(){return this.gos.get("quickFilterText")}},{key:"getAdvancedFilterModel",value:function(){return wi.__assertRegistered("@ag-grid-enterprise/advanced-filter","api.getAdvancedFilterModel",this.context.getGridId())?this.filterManager.getAdvancedFilterModel():null}},{key:"setAdvancedFilterModel",value:function(e){this.filterManager.setAdvancedFilterModel(e)}},{key:"showAdvancedFilterBuilder",value:function(){wi.__assertRegistered("@ag-grid-enterprise/advanced-filter","api.setAdvancedFilterModel",this.context.getGridId())&&this.filterManager.showAdvancedFilterBuilder("api")}},{key:"setNodesSelected",value:function(e){if(e.nodes.every((function(e){return e.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),!1):void 0!==e.id||(console.warn("AG Grid: cannot select node until id for node is known"),!1)}))){var t=e.nodes,n=e.source,i=e.newValue,r=t;this.selectionService.setNodesSelected({nodes:r,source:null!=n?n:"api",newValue:i})}}},{key:"selectAll",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"apiSelectAll";this.selectionService.selectAllRowNodes({source:e})}},{key:"deselectAll",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"apiSelectAll";this.selectionService.deselectAllRowNodes({source:e})}},{key:"selectAllFiltered",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"apiSelectAllFiltered";this.selectionService.selectAllRowNodes({source:e,justFiltered:!0})}},{key:"deselectAllFiltered",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"apiSelectAllFiltered";this.selectionService.deselectAllRowNodes({source:e,justFiltered:!0})}},{key:"getServerSideSelectionState",value:function(){return _n(this.serverSideRowModel)?(this.logMissingRowModel("getServerSideSelectionState","serverSide"),null):this.selectionService.getSelectionState()}},{key:"setServerSideSelectionState",value:function(e){_n(this.serverSideRowModel)?this.logMissingRowModel("setServerSideSelectionState","serverSide"):this.selectionService.setSelectionState(e,"api")}},{key:"selectAllOnCurrentPage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"apiSelectAllCurrentPage";this.selectionService.selectAllRowNodes({source:e,justCurrentPage:!0})}},{key:"deselectAllOnCurrentPage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"apiSelectAllCurrentPage";this.selectionService.deselectAllRowNodes({source:e,justCurrentPage:!0})}},{key:"showLoadingOverlay",value:function(){this.overlayService.showLoadingOverlay()}},{key:"showNoRowsOverlay",value:function(){this.overlayService.showNoRowsOverlay()}},{key:"hideOverlay",value:function(){this.overlayService.hideOverlay()}},{key:"getSelectedNodes",value:function(){return this.selectionService.getSelectedNodes()}},{key:"getSelectedRows",value:function(){return this.selectionService.getSelectedRows()}},{key:"getBestCostNodeSelection",value:function(){if(!_n(this.clientSideRowModel))return this.selectionService.getBestCostNodeSelection();this.logMissingRowModel("getBestCostNodeSelection","clientSide")}},{key:"getRenderedNodes",value:function(){return this.rowRenderer.getRenderedNodes()}},{key:"ensureColumnVisible",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto";this.frameworkOverrides.wrapIncoming((function(){return t.gridBodyCtrl.getScrollFeature().ensureColumnVisible(e,n)}),"ensureVisible")}},{key:"ensureIndexVisible",value:function(e,t){var n=this;this.frameworkOverrides.wrapIncoming((function(){return n.gridBodyCtrl.getScrollFeature().ensureIndexVisible(e,t)}),"ensureVisible")}},{key:"ensureNodeVisible",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.frameworkOverrides.wrapIncoming((function(){return t.gridBodyCtrl.getScrollFeature().ensureNodeVisible(e,n)}),"ensureVisible")}},{key:"forEachLeafNode",value:function(e){_n(this.clientSideRowModel)?this.logMissingRowModel("forEachLeafNode","clientSide"):this.clientSideRowModel.forEachLeafNode(e)}},{key:"forEachNode",value:function(e,t){this.rowModel.forEachNode(e,t)}},{key:"forEachNodeAfterFilter",value:function(e){_n(this.clientSideRowModel)?this.logMissingRowModel("forEachNodeAfterFilter","clientSide"):this.clientSideRowModel.forEachNodeAfterFilter(e)}},{key:"forEachNodeAfterFilterAndSort",value:function(e){_n(this.clientSideRowModel)?this.logMissingRowModel("forEachNodeAfterFilterAndSort","clientSide"):this.clientSideRowModel.forEachNodeAfterFilterAndSort(e)}},{key:"getFilterInstance",value:function(e,t){return oi("'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."),this.filterManager.getFilterInstance(e,t)}},{key:"getColumnFilterInstance",value:function(e){return this.filterManager.getColumnFilterInstance(e)}},{key:"destroyFilter",value:function(e){var t=this.columnModel.getPrimaryColumn(e);if(t)return this.filterManager.destroyFilter(t,"api")}},{key:"getStatusPanel",value:function(e){if(wi.__assertRegistered("@ag-grid-enterprise/status-bar","api.getStatusPanel",this.context.getGridId()))return Yu(this.statusBarService.getStatusPanel(e))}},{key:"getColumnDef",value:function(e){var t=this.columnModel.getPrimaryColumn(e);return t?t.getColDef():null}},{key:"getColumnDefs",value:function(){return this.columnModel.getColumnDefs()}},{key:"onFilterChanged",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"api";this.filterManager.onFilterChanged({source:e})}},{key:"onSortChanged",value:function(){this.sortController.onSortChanged("api")}},{key:"setFilterModel",value:function(e){var t=this;this.frameworkOverrides.wrapIncoming((function(){return t.filterManager.setFilterModel(e)}))}},{key:"getFilterModel",value:function(){return this.filterManager.getFilterModel()}},{key:"getColumnFilterModel",value:function(e){return this.filterManager.getColumnFilterModel(e)}},{key:"setColumnFilterModel",value:function(e,t){return this.filterManager.setColumnFilterModel(e,t)}},{key:"getFocusedCell",value:function(){return this.focusService.getFocusedCell()}},{key:"clearFocusedCell",value:function(){return this.focusService.clearFocusedCell()}},{key:"setFocusedCell",value:function(e,t,n){this.focusService.setFocusedCell({rowIndex:e,column:t,rowPinned:n,forceBrowserFocus:!0})}},{key:"addRowDropZone",value:function(e){this.gridBodyCtrl.getRowDragFeature().addRowDropZone(e)}},{key:"removeRowDropZone",value:function(e){var t=this.dragAndDropService.findExternalZone(e);t&&this.dragAndDropService.removeDropTarget(t)}},{key:"getRowDropZoneParams",value:function(e){return this.gridBodyCtrl.getRowDragFeature().getRowDropZone(e)}},{key:"assertSideBarLoaded",value:function(e){return wi.__assertRegistered("@ag-grid-enterprise/side-bar","api."+e,this.context.getGridId())}},{key:"isSideBarVisible",value:function(){return this.assertSideBarLoaded("isSideBarVisible")&&this.sideBarService.getSideBarComp().isDisplayed()}},{key:"setSideBarVisible",value:function(e){this.assertSideBarLoaded("setSideBarVisible")&&this.sideBarService.getSideBarComp().setDisplayed(e)}},{key:"setSideBarPosition",value:function(e){this.assertSideBarLoaded("setSideBarPosition")&&this.sideBarService.getSideBarComp().setSideBarPosition(e)}},{key:"openToolPanel",value:function(e){this.assertSideBarLoaded("openToolPanel")&&this.sideBarService.getSideBarComp().openToolPanel(e,"api")}},{key:"closeToolPanel",value:function(){this.assertSideBarLoaded("closeToolPanel")&&this.sideBarService.getSideBarComp().close("api")}},{key:"getOpenedToolPanel",value:function(){return this.assertSideBarLoaded("getOpenedToolPanel")?this.sideBarService.getSideBarComp().openedItem():null}},{key:"refreshToolPanel",value:function(){this.assertSideBarLoaded("refreshToolPanel")&&this.sideBarService.getSideBarComp().refresh()}},{key:"isToolPanelShowing",value:function(){return this.assertSideBarLoaded("isToolPanelShowing")&&this.sideBarService.getSideBarComp().isToolPanelShowing()}},{key:"getToolPanelInstance",value:function(e){if(this.assertSideBarLoaded("getToolPanelInstance"))return Yu(this.sideBarService.getSideBarComp().getToolPanelInstance(e))}},{key:"getSideBar",value:function(){if(this.assertSideBarLoaded("getSideBar"))return this.sideBarService.getSideBarComp().getDef()}},{key:"resetRowHeights",value:function(){if(Fn(this.clientSideRowModel)){if(this.columnModel.isAutoRowHeightActive())return void console.warn("AG Grid: calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.");this.clientSideRowModel.resetRowHeights()}}},{key:"setRowCount",value:function(e,t){if(this.serverSideRowModel)return this.columnModel.isRowGroupEmpty()?void this.serverSideRowModel.setRowCount(e,t):void console.error("AG Grid: setRowCount cannot be used while using row grouping.");this.infiniteRowModel?this.infiniteRowModel.setRowCount(e,t):this.logMissingRowModel("setRowCount","infinite","serverSide")}},{key:"onRowHeightChanged",value:function(){this.clientSideRowModel?this.clientSideRowModel.onRowHeightChanged():this.serverSideRowModel&&this.serverSideRowModel.onRowHeightChanged()}},{key:"getValue",value:function(e,t){var n=this.columnModel.getPrimaryColumn(e);return _n(n)&&(n=this.columnModel.getGridColumn(e)),_n(n)?null:this.valueService.getValue(n,t)}},{key:"addEventListener",value:function(e,t){this.apiEventService.addEventListener(e,t)}},{key:"addGlobalListener",value:function(e){this.apiEventService.addGlobalListener(e)}},{key:"removeEventListener",value:function(e,t){this.apiEventService.removeEventListener(e,t)}},{key:"removeGlobalListener",value:function(e){this.apiEventService.removeGlobalListener(e)}},{key:"dispatchEvent",value:function(e){this.eventService.dispatchEvent(e)}},{key:"destroy",value:function(){var e="See ".concat(this.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed"));if(!this.destroyCalled){var t={type:Er.EVENT_GRID_PRE_DESTROYED,state:this.getState()};this.dispatchEvent(t),this.destroyCalled=!0;var n=this.ctrlsService.getGridCtrl();n&&n.destroyGridUi(),this.context.destroy(),ei(this,["isDestroyed"],e)}}},{key:"isDestroyed",value:function(){return this.destroyCalled}},{key:"resetQuickFilter",value:function(){this.filterManager.resetQuickFilterCache()}},{key:"getCellRanges",value:function(){return this.rangeService?this.rangeService.getCellRanges():(wi.__assertRegistered("@ag-grid-enterprise/range-selection","api.getCellRanges",this.context.getGridId()),null)}},{key:"addCellRange",value:function(e){this.rangeService?this.rangeService.addCellRange(e):wi.__assertRegistered("@ag-grid-enterprise/range-selection","api.addCellRange",this.context.getGridId())}},{key:"clearRangeSelection",value:function(){this.rangeService&&this.rangeService.removeAllCellRanges(),wi.__assertRegistered("@ag-grid-enterprise/range-selection","gridApi.clearRangeSelection",this.context.getGridId())}},{key:"undoCellEditing",value:function(){this.undoRedoService.undo("api")}},{key:"redoCellEditing",value:function(){this.undoRedoService.redo("api")}},{key:"getCurrentUndoSize",value:function(){return this.undoRedoService.getCurrentUndoStackSize()}},{key:"getCurrentRedoSize",value:function(){return this.undoRedoService.getCurrentRedoStackSize()}},{key:"assertChart",value:function(e,t){if(wi.__assertRegistered("@ag-grid-enterprise/charts","api."+e,this.context.getGridId()))return this.frameworkOverrides.wrapIncoming((function(){return t()}))}},{key:"getChartModels",value:function(){var e=this;return this.assertChart("getChartModels",(function(){return e.chartService.getChartModels()}))}},{key:"getChartRef",value:function(e){var t=this;return this.assertChart("getChartRef",(function(){return t.chartService.getChartRef(e)}))}},{key:"getChartImageDataURL",value:function(e){var t=this;return this.assertChart("getChartImageDataURL",(function(){return t.chartService.getChartImageDataURL(e)}))}},{key:"downloadChart",value:function(e){var t=this;return this.assertChart("downloadChart",(function(){return t.chartService.downloadChart(e)}))}},{key:"openChartToolPanel",value:function(e){var t=this;return this.assertChart("openChartToolPanel",(function(){return t.chartService.openChartToolPanel(e)}))}},{key:"closeChartToolPanel",value:function(e){var t=this;return this.assertChart("closeChartToolPanel",(function(){return t.chartService.closeChartToolPanel(e.chartId)}))}},{key:"createRangeChart",value:function(e){var t=this;return this.assertChart("createRangeChart",(function(){return t.chartService.createRangeChart(e)}))}},{key:"createPivotChart",value:function(e){var t=this;return this.assertChart("createPivotChart",(function(){return t.chartService.createPivotChart(e)}))}},{key:"createCrossFilterChart",value:function(e){var t=this;return this.assertChart("createCrossFilterChart",(function(){return t.chartService.createCrossFilterChart(e)}))}},{key:"updateChart",value:function(e){var t=this;return this.assertChart("updateChart",(function(){return t.chartService.updateChart(e)}))}},{key:"restoreChart",value:function(e,t){var n=this;return this.assertChart("restoreChart",(function(){return n.chartService.restoreChart(e,t)}))}},{key:"assertClipboard",value:function(e,t){wi.__assertRegistered("@ag-grid-enterprise/clipboard","api"+e,this.context.getGridId())&&t()}},{key:"copyToClipboard",value:function(e){var t=this;this.assertClipboard("copyToClipboard",(function(){return t.clipboardService.copyToClipboard(e)}))}},{key:"cutToClipboard",value:function(e){var t=this;this.assertClipboard("cutToClipboard",(function(){return t.clipboardService.cutToClipboard(e)}))}},{key:"copySelectedRowsToClipboard",value:function(e){var t=this;this.assertClipboard("copySelectedRowsToClipboard",(function(){return t.clipboardService.copySelectedRowsToClipboard(e)}))}},{key:"copySelectedRangeToClipboard",value:function(e){var t=this;this.assertClipboard("copySelectedRangeToClipboard",(function(){return t.clipboardService.copySelectedRangeToClipboard(e)}))}},{key:"copySelectedRangeDown",value:function(){var e=this;this.assertClipboard("copySelectedRangeDown",(function(){return e.clipboardService.copyRangeDown()}))}},{key:"pasteFromClipboard",value:function(){var e=this;this.assertClipboard("pasteFromClipboard",(function(){return e.clipboardService.pasteFromClipboard()}))}},{key:"showColumnMenuAfterButtonClick",value:function(e,t){oi("'showColumnMenuAfterButtonClick' is deprecated. Use 'IHeaderParams.showColumnMenu' within a header component, or 'api.showColumnMenu' elsewhere.");var n=this.columnModel.getGridColumn(e);this.menuService.showColumnMenu({column:n,buttonElement:t,positionBy:"button"})}},{key:"showColumnMenuAfterMouseClick",value:function(e,t){oi("'showColumnMenuAfterMouseClick' is deprecated. Use 'IHeaderParams.showColumnMenuAfterMouseClick' within a header component, or 'api.showColumnMenu' elsewhere.");var n=this.columnModel.getGridColumn(e);n||(n=this.columnModel.getPrimaryColumn(e)),n?this.menuService.showColumnMenu({column:n,mouseEvent:t,positionBy:"mouse"}):console.error("AG Grid: column '".concat(e,"' not found"))}},{key:"showColumnChooser",value:function(e){this.menuService.showColumnChooser({chooserParams:e})}},{key:"showColumnFilter",value:function(e){var t=this.columnModel.getGridColumn(e);t?this.menuService.showFilterMenu({column:t,containerType:"columnFilter",positionBy:"auto"}):console.error("AG Grid: column '".concat(e,"' not found"))}},{key:"showColumnMenu",value:function(e){var t=this.columnModel.getGridColumn(e);t?this.menuService.showColumnMenu({column:t,positionBy:"auto"}):console.error("AG Grid: column '".concat(e,"' not found"))}},{key:"hidePopupMenu",value:function(){this.menuService.hidePopupMenu()}},{key:"hideColumnChooser",value:function(){this.menuService.hideColumnChooser()}},{key:"tabToNextCell",value:function(e){return this.navigationService.tabToNextCell(!1,e)}},{key:"tabToPreviousCell",value:function(e){return this.navigationService.tabToNextCell(!0,e)}},{key:"getCellRendererInstances",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.rowRenderer.getCellRendererInstances(e),n=t.map(Yu);return n}},{key:"getCellEditorInstances",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.rowRenderer.getCellEditorInstances(e),n=t.map(Yu);return n}},{key:"getEditingCells",value:function(){return this.rowRenderer.getEditingCells()}},{key:"stopEditing",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.rowRenderer.stopEditing(e)}},{key:"startEditingCell",value:function(e){var t=this.columnModel.getGridColumn(e.colKey);if(t){var n={rowIndex:e.rowIndex,rowPinned:e.rowPinned||null,column:t};null==e.rowPinned&&this.ensureIndexVisible(e.rowIndex),this.ensureColumnVisible(e.colKey);var i=this.navigationService.getCellByPosition(n);i&&(this.focusService.isCellFocused(n)||this.focusService.setFocusedCell(n),i.startRowOrCellEdit(e.key))}else console.warn("AG Grid: no column found for ".concat(e.colKey))}},{key:"addAggFunc",value:function(e,t){this.logDeprecation("v31.1","addAggFunc(key, func)","addAggFuncs({ key: func })"),this.aggFuncService&&this.aggFuncService.addAggFuncs({key:t})}},{key:"addAggFuncs",value:function(e){this.aggFuncService&&this.aggFuncService.addAggFuncs(e)}},{key:"clearAggFuncs",value:function(){this.aggFuncService&&this.aggFuncService.clear()}},{key:"applyServerSideTransaction",value:function(e){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.applyTransaction(e);this.logMissingRowModel("applyServerSideTransaction","serverSide")}},{key:"applyServerSideTransactionAsync",value:function(e,t){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.applyTransactionAsync(e,t);this.logMissingRowModel("applyServerSideTransactionAsync","serverSide")}},{key:"applyServerSideRowData",value:function(e){var t,n,i=null!=(t=e.startRow)?t:0,r=null!=(n=e.route)?n:[];i<0?console.warn("AG Grid: invalid value ".concat(e.startRow," for startRow, the value should be >= 0")):this.serverSideRowModel?this.serverSideRowModel.applyRowData(e.successParams,i,r):this.logMissingRowModel("setServerSideDatasource","serverSide")}},{key:"retryServerSideLoads",value:function(){this.serverSideRowModel?this.serverSideRowModel.retryLoads():this.logMissingRowModel("retryServerSideLoads","serverSide")}},{key:"flushServerSideAsyncTransactions",value:function(){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.flushAsyncTransactions();this.logMissingRowModel("flushServerSideAsyncTransactions","serverSide")}},{key:"applyTransaction",value:function(e){var t=this;if(this.clientSideRowModel)return this.frameworkOverrides.wrapIncoming((function(){return t.clientSideRowModel.updateRowData(e)}));this.logMissingRowModel("applyTransaction","clientSide")}},{key:"applyTransactionAsync",value:function(e,t){var n=this;this.clientSideRowModel?this.frameworkOverrides.wrapIncoming((function(){return n.clientSideRowModel.batchUpdateRowData(e,t)})):this.logMissingRowModel("applyTransactionAsync","clientSide")}},{key:"flushAsyncTransactions",value:function(){var e=this;this.clientSideRowModel?this.frameworkOverrides.wrapIncoming((function(){return e.clientSideRowModel.flushAsyncTransactions()})):this.logMissingRowModel("flushAsyncTransactions","clientSide")}},{key:"refreshInfiniteCache",value:function(){this.infiniteRowModel?this.infiniteRowModel.refreshCache():this.logMissingRowModel("refreshInfiniteCache","infinite")}},{key:"purgeInfiniteCache",value:function(){this.infiniteRowModel?this.infiniteRowModel.purgeCache():this.logMissingRowModel("purgeInfiniteCache","infinite")}},{key:"refreshServerSide",value:function(e){this.serverSideRowModel?this.serverSideRowModel.refreshStore(e):this.logMissingRowModel("refreshServerSide","serverSide")}},{key:"getServerSideGroupLevelState",value:function(){return this.serverSideRowModel?this.serverSideRowModel.getStoreState():(this.logMissingRowModel("getServerSideGroupLevelState","serverSide"),[])}},{key:"getInfiniteRowCount",value:function(){if(this.infiniteRowModel)return this.infiniteRowModel.getRowCount();this.logMissingRowModel("getInfiniteRowCount","infinite")}},{key:"isLastRowIndexKnown",value:function(){if(this.infiniteRowModel)return this.infiniteRowModel.isLastRowIndexKnown();this.logMissingRowModel("isLastRowIndexKnown","infinite")}},{key:"getCacheBlockState",value:function(){return this.rowNodeBlockLoader.getBlockState()}},{key:"getFirstDisplayedRow",value:function(){return this.logDeprecation("v31.1","getFirstDisplayedRow","getFirstDisplayedRowIndex"),this.getFirstDisplayedRowIndex()}},{key:"getFirstDisplayedRowIndex",value:function(){return this.rowRenderer.getFirstVirtualRenderedRow()}},{key:"getLastDisplayedRow",value:function(){return this.logDeprecation("v31.1","getLastDisplayedRow","getLastDisplayedRowIndex"),this.getLastDisplayedRowIndex()}},{key:"getLastDisplayedRowIndex",value:function(){return this.rowRenderer.getLastVirtualRenderedRow()}},{key:"getDisplayedRowAtIndex",value:function(e){return this.rowModel.getRow(e)}},{key:"getDisplayedRowCount",value:function(){return this.rowModel.getRowCount()}},{key:"paginationIsLastPageFound",value:function(){return this.paginationProxy.isLastPageFound()}},{key:"paginationGetPageSize",value:function(){return this.paginationProxy.getPageSize()}},{key:"paginationGetCurrentPage",value:function(){return this.paginationProxy.getCurrentPage()}},{key:"paginationGetTotalPages",value:function(){return this.paginationProxy.getTotalPages()}},{key:"paginationGetRowCount",value:function(){return this.paginationProxy.getMasterRowCount()}},{key:"paginationGoToNextPage",value:function(){this.paginationProxy.goToNextPage()}},{key:"paginationGoToPreviousPage",value:function(){this.paginationProxy.goToPreviousPage()}},{key:"paginationGoToFirstPage",value:function(){this.paginationProxy.goToFirstPage()}},{key:"paginationGoToLastPage",value:function(){this.paginationProxy.goToLastPage()}},{key:"paginationGoToPage",value:function(e){this.paginationProxy.goToPage(e)}},{key:"sizeColumnsToFit",value:function(e){"number"===typeof e?this.columnModel.sizeColumnsToFit(e,"api"):this.gridBodyCtrl.sizeColumnsToFit(e)}},{key:"setColumnGroupOpened",value:function(e,t){this.columnModel.setColumnGroupOpened(e,t,"api")}},{key:"getColumnGroup",value:function(e,t){return this.columnModel.getColumnGroup(e,t)}},{key:"getProvidedColumnGroup",value:function(e){return this.columnModel.getProvidedColumnGroup(e)}},{key:"getDisplayNameForColumn",value:function(e,t){return this.columnModel.getDisplayNameForColumn(e,t)||""}},{key:"getDisplayNameForColumnGroup",value:function(e,t){return this.columnModel.getDisplayNameForColumnGroup(e,t)||""}},{key:"getColumn",value:function(e){return this.columnModel.getPrimaryColumn(e)}},{key:"getColumns",value:function(){return this.columnModel.getAllPrimaryColumns()}},{key:"applyColumnState",value:function(e){return this.columnModel.applyColumnState(e,"api")}},{key:"getColumnState",value:function(){return this.columnModel.getColumnState()}},{key:"resetColumnState",value:function(){this.columnModel.resetColumnState("api")}},{key:"getColumnGroupState",value:function(){return this.columnModel.getColumnGroupState()}},{key:"setColumnGroupState",value:function(e){this.columnModel.setColumnGroupState(e,"api")}},{key:"resetColumnGroupState",value:function(){this.columnModel.resetColumnGroupState("api")}},{key:"isPinning",value:function(){return this.columnModel.isPinningLeft()||this.columnModel.isPinningRight()}},{key:"isPinningLeft",value:function(){return this.columnModel.isPinningLeft()}},{key:"isPinningRight",value:function(){return this.columnModel.isPinningRight()}},{key:"getDisplayedColAfter",value:function(e){return this.columnModel.getDisplayedColAfter(e)}},{key:"getDisplayedColBefore",value:function(e){return this.columnModel.getDisplayedColBefore(e)}},{key:"setColumnVisible",value:function(e,t){this.logDeprecation("v31.1","setColumnVisible(key,visible)","setColumnsVisible([key],visible)"),this.columnModel.setColumnsVisible([e],t,"api")}},{key:"setColumnsVisible",value:function(e,t){this.columnModel.setColumnsVisible(e,t,"api")}},{key:"setColumnPinned",value:function(e,t){this.logDeprecation("v31.1","setColumnPinned(key,pinned)","setColumnsPinned([key],pinned)"),this.columnModel.setColumnsPinned([e],t,"api")}},{key:"setColumnsPinned",value:function(e,t){this.columnModel.setColumnsPinned(e,t,"api")}},{key:"getAllGridColumns",value:function(){return this.columnModel.getAllGridColumns()}},{key:"getDisplayedLeftColumns",value:function(){return this.columnModel.getDisplayedLeftColumns()}},{key:"getDisplayedCenterColumns",value:function(){return this.columnModel.getDisplayedCenterColumns()}},{key:"getDisplayedRightColumns",value:function(){return this.columnModel.getDisplayedRightColumns()}},{key:"getAllDisplayedColumns",value:function(){return this.columnModel.getAllDisplayedColumns()}},{key:"getAllDisplayedVirtualColumns",value:function(){return this.columnModel.getViewportColumns()}},{key:"moveColumn",value:function(e,t){this.logDeprecation("v31.1","moveColumn(key, toIndex)","moveColumns([key], toIndex)"),this.columnModel.moveColumns([e],t,"api")}},{key:"moveColumnByIndex",value:function(e,t){this.columnModel.moveColumnByIndex(e,t,"api")}},{key:"moveColumns",value:function(e,t){this.columnModel.moveColumns(e,t,"api")}},{key:"moveRowGroupColumn",value:function(e,t){this.columnModel.moveRowGroupColumn(e,t,"api")}},{key:"setColumnAggFunc",value:function(e,t){this.columnModel.setColumnAggFunc(e,t,"api")}},{key:"setColumnWidth",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"api";this.logDeprecation("v31.1","setColumnWidth(col, width)","setColumnWidths([{key: col, newWidth: width}])"),this.columnModel.setColumnWidths([{key:e,newWidth:t}],!1,n,i)}},{key:"setColumnWidths",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"api";this.columnModel.setColumnWidths(e,!1,t,n)}},{key:"isPivotMode",value:function(){return this.columnModel.isPivotMode()}},{key:"getPivotResultColumn",value:function(e,t){return this.columnModel.getSecondaryPivotColumn(e,t)}},{key:"setValueColumns",value:function(e){this.columnModel.setValueColumns(e,"api")}},{key:"getValueColumns",value:function(){return this.columnModel.getValueColumns()}},{key:"removeValueColumn",value:function(e){this.logDeprecation("v31.1","removeValueColumn(colKey)","removeValueColumns([colKey])"),this.columnModel.removeValueColumns([e],"api")}},{key:"removeValueColumns",value:function(e){this.columnModel.removeValueColumns(e,"api")}},{key:"addValueColumn",value:function(e){this.logDeprecation("v31.1","addValueColumn(colKey)","addValueColumns([colKey])"),this.columnModel.addValueColumns([e],"api")}},{key:"addValueColumns",value:function(e){this.columnModel.addValueColumns(e,"api")}},{key:"setRowGroupColumns",value:function(e){this.columnModel.setRowGroupColumns(e,"api")}},{key:"removeRowGroupColumn",value:function(e){this.logDeprecation("v31.1","removeRowGroupColumn(colKey)","removeRowGroupColumns([colKey])"),this.columnModel.removeRowGroupColumns([e],"api")}},{key:"removeRowGroupColumns",value:function(e){this.columnModel.removeRowGroupColumns(e,"api")}},{key:"addRowGroupColumn",value:function(e){this.logDeprecation("v31.1","addRowGroupColumn(colKey)","addRowGroupColumns([colKey])"),this.columnModel.addRowGroupColumns([e],"api")}},{key:"addRowGroupColumns",value:function(e){this.columnModel.addRowGroupColumns(e,"api")}},{key:"getRowGroupColumns",value:function(){return this.columnModel.getRowGroupColumns()}},{key:"setPivotColumns",value:function(e){this.columnModel.setPivotColumns(e,"api")}},{key:"removePivotColumn",value:function(e){this.logDeprecation("v31.1","removePivotColumn(colKey)","removePivotColumns([colKey])"),this.columnModel.removePivotColumns([e],"api")}},{key:"removePivotColumns",value:function(e){this.columnModel.removePivotColumns(e,"api")}},{key:"addPivotColumn",value:function(e){this.logDeprecation("v31.1","addPivotColumn(colKey)","addPivotColumns([colKey])"),this.columnModel.addPivotColumns([e],"api")}},{key:"addPivotColumns",value:function(e){this.columnModel.addPivotColumns(e,"api")}},{key:"getPivotColumns",value:function(){return this.columnModel.getPivotColumns()}},{key:"getLeftDisplayedColumnGroups",value:function(){return this.columnModel.getDisplayedTreeLeft()}},{key:"getCenterDisplayedColumnGroups",value:function(){return this.columnModel.getDisplayedTreeCentre()}},{key:"getRightDisplayedColumnGroups",value:function(){return this.columnModel.getDisplayedTreeRight()}},{key:"getAllDisplayedColumnGroups",value:function(){return this.columnModel.getAllDisplayedTrees()}},{key:"autoSizeColumn",value:function(e,t){return this.logDeprecation("v31.1","autoSizeColumn(key, skipHeader)","autoSizeColumns([key], skipHeader)"),this.columnModel.autoSizeColumns({columns:[e],skipHeader:t,source:"api"})}},{key:"autoSizeColumns",value:function(e,t){this.columnModel.autoSizeColumns({columns:e,skipHeader:t,source:"api"})}},{key:"autoSizeAllColumns",value:function(e){this.columnModel.autoSizeAllColumns("api",e)}},{key:"setPivotResultColumns",value:function(e){this.columnModel.setSecondaryColumns(e,"api")}},{key:"getPivotResultColumns",value:function(){return this.columnModel.getSecondaryColumns()}},{key:"getState",value:function(){return this.stateService.getState()}},{key:"getGridOption",value:function(e){return this.gos.get(e)}},{key:"setGridOption",value:function(e,t){this.updateGridOptions((0,Ve.Z)({},e,t))}},{key:"updateGridOptions",value:function(e){this.gos.updateGridOptions({options:e})}},{key:"__internalUpdateGridOptions",value:function(e){this.gos.updateGridOptions({options:e,source:"gridOptionsUpdated"})}},{key:"deprecatedUpdateGridOption",value:function(e,t){oi("set".concat(e.charAt(0).toUpperCase()).concat(e.slice(1,e.length)," is deprecated. Please use 'api.setGridOption('").concat(e,"', newValue)' or 'api.updateGridOptions({ ").concat(e,": newValue })' instead.")),this.setGridOption(e,t)}},{key:"setPivotMode",value:function(e){this.deprecatedUpdateGridOption("pivotMode",e)}},{key:"setPinnedTopRowData",value:function(e){this.deprecatedUpdateGridOption("pinnedTopRowData",e)}},{key:"setPinnedBottomRowData",value:function(e){this.deprecatedUpdateGridOption("pinnedBottomRowData",e)}},{key:"setPopupParent",value:function(e){this.deprecatedUpdateGridOption("popupParent",e)}},{key:"setSuppressModelUpdateAfterUpdateTransaction",value:function(e){this.deprecatedUpdateGridOption("suppressModelUpdateAfterUpdateTransaction",e)}},{key:"setDataTypeDefinitions",value:function(e){this.deprecatedUpdateGridOption("dataTypeDefinitions",e)}},{key:"setPagination",value:function(e){this.deprecatedUpdateGridOption("pagination",e)}},{key:"paginationSetPageSize",value:function(e){this.deprecatedUpdateGridOption("paginationPageSize",e)}},{key:"setSideBar",value:function(e){this.deprecatedUpdateGridOption("sideBar",e)}},{key:"setSuppressClipboardPaste",value:function(e){this.deprecatedUpdateGridOption("suppressClipboardPaste",e)}},{key:"setGroupRemoveSingleChildren",value:function(e){this.deprecatedUpdateGridOption("groupRemoveSingleChildren",e)}},{key:"setGroupRemoveLowestSingleChildren",value:function(e){this.deprecatedUpdateGridOption("groupRemoveLowestSingleChildren",e)}},{key:"setGroupDisplayType",value:function(e){this.deprecatedUpdateGridOption("groupDisplayType",e)}},{key:"setGroupIncludeFooter",value:function(e){this.deprecatedUpdateGridOption("groupIncludeFooter",e)}},{key:"setGroupIncludeTotalFooter",value:function(e){this.deprecatedUpdateGridOption("groupIncludeTotalFooter",e)}},{key:"setRowClass",value:function(e){this.deprecatedUpdateGridOption("rowClass",e)}},{key:"setDeltaSort",value:function(e){this.deprecatedUpdateGridOption("deltaSort",e)}},{key:"setSuppressRowDrag",value:function(e){this.deprecatedUpdateGridOption("suppressRowDrag",e)}},{key:"setSuppressMoveWhenRowDragging",value:function(e){this.deprecatedUpdateGridOption("suppressMoveWhenRowDragging",e)}},{key:"setSuppressRowClickSelection",value:function(e){this.deprecatedUpdateGridOption("suppressRowClickSelection",e)}},{key:"setEnableAdvancedFilter",value:function(e){this.deprecatedUpdateGridOption("enableAdvancedFilter",e)}},{key:"setIncludeHiddenColumnsInAdvancedFilter",value:function(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInAdvancedFilter",e)}},{key:"setAdvancedFilterParent",value:function(e){this.deprecatedUpdateGridOption("advancedFilterParent",e)}},{key:"setAdvancedFilterBuilderParams",value:function(e){this.deprecatedUpdateGridOption("advancedFilterBuilderParams",e)}},{key:"setQuickFilter",value:function(e){oi("setQuickFilter is deprecated. Please use 'api.setGridOption('quickFilterText', newValue)' or 'api.updateGridOptions({ quickFilterText: newValue })' instead."),this.gos.updateGridOptions({options:{quickFilterText:e}})}},{key:"setExcludeHiddenColumnsFromQuickFilter",value:function(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",!e)}},{key:"setIncludeHiddenColumnsInQuickFilter",value:function(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",e)}},{key:"setQuickFilterParser",value:function(e){this.deprecatedUpdateGridOption("quickFilterParser",e)}},{key:"setQuickFilterMatcher",value:function(e){this.deprecatedUpdateGridOption("quickFilterMatcher",e)}},{key:"setAlwaysShowHorizontalScroll",value:function(e){this.deprecatedUpdateGridOption("alwaysShowHorizontalScroll",e)}},{key:"setAlwaysShowVerticalScroll",value:function(e){this.deprecatedUpdateGridOption("alwaysShowVerticalScroll",e)}},{key:"setFunctionsReadOnly",value:function(e){this.deprecatedUpdateGridOption("functionsReadOnly",e)}},{key:"setColumnDefs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api";oi("setColumnDefs is deprecated. Please use 'api.setGridOption('columnDefs', newValue)' or 'api.updateGridOptions({ columnDefs: newValue })' instead."),this.gos.updateGridOptions({options:{columnDefs:e},source:t})}},{key:"setAutoGroupColumnDef",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api";oi("setAutoGroupColumnDef is deprecated. Please use 'api.setGridOption('autoGroupColumnDef', newValue)' or 'api.updateGridOptions({ autoGroupColumnDef: newValue })' instead."),this.gos.updateGridOptions({options:{autoGroupColumnDef:e},source:t})}},{key:"setDefaultColDef",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api";oi("setDefaultColDef is deprecated. Please use 'api.setGridOption('defaultColDef', newValue)' or 'api.updateGridOptions({ defaultColDef: newValue })' instead."),this.gos.updateGridOptions({options:{defaultColDef:e},source:t})}},{key:"setColumnTypes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api";oi("setColumnTypes is deprecated. Please use 'api.setGridOption('columnTypes', newValue)' or 'api.updateGridOptions({ columnTypes: newValue })' instead."),this.gos.updateGridOptions({options:{columnTypes:e},source:t})}},{key:"setTreeData",value:function(e){this.deprecatedUpdateGridOption("treeData",e)}},{key:"setServerSideDatasource",value:function(e){this.deprecatedUpdateGridOption("serverSideDatasource",e)}},{key:"setCacheBlockSize",value:function(e){this.deprecatedUpdateGridOption("cacheBlockSize",e)}},{key:"setDatasource",value:function(e){this.deprecatedUpdateGridOption("datasource",e)}},{key:"setViewportDatasource",value:function(e){this.deprecatedUpdateGridOption("viewportDatasource",e)}},{key:"setRowData",value:function(e){this.deprecatedUpdateGridOption("rowData",e)}},{key:"setEnableCellTextSelection",value:function(e){this.deprecatedUpdateGridOption("enableCellTextSelection",e)}},{key:"setHeaderHeight",value:function(e){this.deprecatedUpdateGridOption("headerHeight",e)}},{key:"setDomLayout",value:function(e){this.deprecatedUpdateGridOption("domLayout",e)}},{key:"setFillHandleDirection",value:function(e){this.deprecatedUpdateGridOption("fillHandleDirection",e)}},{key:"setGroupHeaderHeight",value:function(e){this.deprecatedUpdateGridOption("groupHeaderHeight",e)}},{key:"setFloatingFiltersHeight",value:function(e){this.deprecatedUpdateGridOption("floatingFiltersHeight",e)}},{key:"setPivotHeaderHeight",value:function(e){this.deprecatedUpdateGridOption("pivotHeaderHeight",e)}},{key:"setPivotGroupHeaderHeight",value:function(e){this.deprecatedUpdateGridOption("pivotGroupHeaderHeight",e)}},{key:"setAnimateRows",value:function(e){this.deprecatedUpdateGridOption("animateRows",e)}},{key:"setIsExternalFilterPresent",value:function(e){this.deprecatedUpdateGridOption("isExternalFilterPresent",e)}},{key:"setDoesExternalFilterPass",value:function(e){this.deprecatedUpdateGridOption("doesExternalFilterPass",e)}},{key:"setNavigateToNextCell",value:function(e){this.deprecatedUpdateGridOption("navigateToNextCell",e)}},{key:"setTabToNextCell",value:function(e){this.deprecatedUpdateGridOption("tabToNextCell",e)}},{key:"setTabToNextHeader",value:function(e){this.deprecatedUpdateGridOption("tabToNextHeader",e)}},{key:"setNavigateToNextHeader",value:function(e){this.deprecatedUpdateGridOption("navigateToNextHeader",e)}},{key:"setRowGroupPanelShow",value:function(e){this.deprecatedUpdateGridOption("rowGroupPanelShow",e)}},{key:"setGetGroupRowAgg",value:function(e){this.deprecatedUpdateGridOption("getGroupRowAgg",e)}},{key:"setGetBusinessKeyForNode",value:function(e){this.deprecatedUpdateGridOption("getBusinessKeyForNode",e)}},{key:"setGetChildCount",value:function(e){this.deprecatedUpdateGridOption("getChildCount",e)}},{key:"setProcessRowPostCreate",value:function(e){this.deprecatedUpdateGridOption("processRowPostCreate",e)}},{key:"setGetRowId",value:function(e){oi("getRowId is a static property and can no longer be updated.")}},{key:"setGetRowClass",value:function(e){this.deprecatedUpdateGridOption("getRowClass",e)}},{key:"setIsFullWidthRow",value:function(e){this.deprecatedUpdateGridOption("isFullWidthRow",e)}},{key:"setIsRowSelectable",value:function(e){this.deprecatedUpdateGridOption("isRowSelectable",e)}},{key:"setIsRowMaster",value:function(e){this.deprecatedUpdateGridOption("isRowMaster",e)}},{key:"setPostSortRows",value:function(e){this.deprecatedUpdateGridOption("postSortRows",e)}},{key:"setGetDocument",value:function(e){this.deprecatedUpdateGridOption("getDocument",e)}},{key:"setGetContextMenuItems",value:function(e){this.deprecatedUpdateGridOption("getContextMenuItems",e)}},{key:"setGetMainMenuItems",value:function(e){this.deprecatedUpdateGridOption("getMainMenuItems",e)}},{key:"setProcessCellForClipboard",value:function(e){this.deprecatedUpdateGridOption("processCellForClipboard",e)}},{key:"setSendToClipboard",value:function(e){this.deprecatedUpdateGridOption("sendToClipboard",e)}},{key:"setProcessCellFromClipboard",value:function(e){this.deprecatedUpdateGridOption("processCellFromClipboard",e)}},{key:"setProcessPivotResultColDef",value:function(e){this.deprecatedUpdateGridOption("processPivotResultColDef",e)}},{key:"setProcessPivotResultColGroupDef",value:function(e){this.deprecatedUpdateGridOption("processPivotResultColGroupDef",e)}},{key:"setPostProcessPopup",value:function(e){this.deprecatedUpdateGridOption("postProcessPopup",e)}},{key:"setInitialGroupOrderComparator",value:function(e){this.deprecatedUpdateGridOption("initialGroupOrderComparator",e)}},{key:"setGetChartToolbarItems",value:function(e){this.deprecatedUpdateGridOption("getChartToolbarItems",e)}},{key:"setPaginationNumberFormatter",value:function(e){this.deprecatedUpdateGridOption("paginationNumberFormatter",e)}},{key:"setGetServerSideGroupLevelParams",value:function(e){this.deprecatedUpdateGridOption("getServerSideGroupLevelParams",e)}},{key:"setIsServerSideGroupOpenByDefault",value:function(e){this.deprecatedUpdateGridOption("isServerSideGroupOpenByDefault",e)}},{key:"setIsApplyServerSideTransaction",value:function(e){this.deprecatedUpdateGridOption("isApplyServerSideTransaction",e)}},{key:"setIsServerSideGroup",value:function(e){this.deprecatedUpdateGridOption("isServerSideGroup",e)}},{key:"setGetServerSideGroupKey",value:function(e){this.deprecatedUpdateGridOption("getServerSideGroupKey",e)}},{key:"setGetRowStyle",value:function(e){this.deprecatedUpdateGridOption("getRowStyle",e)}},{key:"setGetRowHeight",value:function(e){this.deprecatedUpdateGridOption("getRowHeight",e)}}]),e}();Mn([Ti("csvCreator")],Xu.prototype,"csvCreator",2),Mn([Ti("excelCreator")],Xu.prototype,"excelCreator",2),Mn([Di("rowRenderer")],Xu.prototype,"rowRenderer",2),Mn([Di("navigationService")],Xu.prototype,"navigationService",2),Mn([Di("filterManager")],Xu.prototype,"filterManager",2),Mn([Di("columnModel")],Xu.prototype,"columnModel",2),Mn([Di("selectionService")],Xu.prototype,"selectionService",2),Mn([Di("gridOptionsService")],Xu.prototype,"gos",2),Mn([Di("valueService")],Xu.prototype,"valueService",2),Mn([Di("alignedGridsService")],Xu.prototype,"alignedGridsService",2),Mn([Di("eventService")],Xu.prototype,"eventService",2),Mn([Di("pinnedRowModel")],Xu.prototype,"pinnedRowModel",2),Mn([Di("context")],Xu.prototype,"context",2),Mn([Di("rowModel")],Xu.prototype,"rowModel",2),Mn([Di("sortController")],Xu.prototype,"sortController",2),Mn([Di("paginationProxy")],Xu.prototype,"paginationProxy",2),Mn([Di("focusService")],Xu.prototype,"focusService",2),Mn([Di("dragAndDropService")],Xu.prototype,"dragAndDropService",2),Mn([Ti("rangeService")],Xu.prototype,"rangeService",2),Mn([Ti("clipboardService")],Xu.prototype,"clipboardService",2),Mn([Ti("aggFuncService")],Xu.prototype,"aggFuncService",2),Mn([Di("menuService")],Xu.prototype,"menuService",2),Mn([Di("valueCache")],Xu.prototype,"valueCache",2),Mn([Di("animationFrameService")],Xu.prototype,"animationFrameService",2),Mn([Ti("statusBarService")],Xu.prototype,"statusBarService",2),Mn([Ti("chartService")],Xu.prototype,"chartService",2),Mn([Ti("undoRedoService")],Xu.prototype,"undoRedoService",2),Mn([Ti("rowNodeBlockLoader")],Xu.prototype,"rowNodeBlockLoader",2),Mn([Ti("ssrmTransactionManager")],Xu.prototype,"serverSideTransactionManager",2),Mn([Di("ctrlsService")],Xu.prototype,"ctrlsService",2),Mn([Di("overlayService")],Xu.prototype,"overlayService",2),Mn([Ti("sideBarService")],Xu.prototype,"sideBarService",2),Mn([Di("stateService")],Xu.prototype,"stateService",2),Mn([Di("expansionService")],Xu.prototype,"expansionService",2),Mn([Di("apiEventService")],Xu.prototype,"apiEventService",2),Mn([Di("frameworkOverrides")],Xu.prototype,"frameworkOverrides",2),Mn([Ei],Xu.prototype,"init",1),Xu=Mn([Ri("gridApi")],Xu);var qu=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).quickFilter=null,e.quickFilterParts=null,e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.addManagedListener(this.eventService,Er.EVENT_COLUMN_PIVOT_MODE_CHANGED,(function(){return e.resetQuickFilterCache()})),this.addManagedListener(this.eventService,Er.EVENT_NEW_COLUMNS_LOADED,(function(){return e.resetQuickFilterCache()})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return e.resetQuickFilterCache()})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_VISIBLE,(function(){e.gridOptionsService.get("includeHiddenColumnsInQuickFilter")||e.resetQuickFilterCache()})),this.addManagedPropertyListener("quickFilterText",(function(t){return e.setQuickFilter(t.currentValue)})),this.addManagedPropertyListener("includeHiddenColumnsInQuickFilter",(function(){return e.onIncludeHiddenColumnsInQuickFilterChanged()})),this.quickFilter=this.parseQuickFilter(this.gridOptionsService.get("quickFilterText")),this.parser=this.gridOptionsService.get("quickFilterParser"),this.matcher=this.gridOptionsService.get("quickFilterMatcher"),this.setQuickFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],(function(){return e.setQuickFilterParserAndMatcher()}))}},{key:"isQuickFilterPresent",value:function(){return null!==this.quickFilter}},{key:"doesRowPassQuickFilter",value:function(e){var t=this,n=this.gridOptionsService.get("cacheQuickFilter");return this.matcher?this.doesRowPassQuickFilterMatcher(n,e):this.quickFilterParts.every((function(i){return n?t.doesRowPassQuickFilterCache(e,i):t.doesRowPassQuickFilterNoCache(e,i)}))}},{key:"resetQuickFilterCache",value:function(){this.rowModel.forEachNode((function(e){return e.quickFilterAggregateText=null}))}},{key:"setQuickFilterParts",value:function(){var e=this.quickFilter,t=this.parser;this.quickFilterParts=e?t?t(e):e.split(" "):null}},{key:"parseQuickFilter",value:function(e){return Fn(e)?this.gridOptionsService.isRowModelType("clientSide")?e.toUpperCase():(console.warn("AG Grid - Quick filtering only works with the Client-Side Row Model"),null):null}},{key:"setQuickFilter",value:function(e){if(null==e||"string"===typeof e){var t=this.parseQuickFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setQuickFilterParts(),this.dispatchEvent({type:qu.EVENT_QUICK_FILTER_CHANGED}))}else console.warn("AG Grid - Grid option quickFilterText only supports string inputs, received: ".concat(typeof e))}},{key:"setQuickFilterParserAndMatcher",value:function(){var e=this.gridOptionsService.get("quickFilterParser"),t=this.gridOptionsService.get("quickFilterMatcher"),n=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,n&&(this.setQuickFilterParts(),this.dispatchEvent({type:qu.EVENT_QUICK_FILTER_CHANGED}))}},{key:"onIncludeHiddenColumnsInQuickFilterChanged",value:function(){this.columnModel.refreshQuickFilterColumns(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.dispatchEvent({type:qu.EVENT_QUICK_FILTER_CHANGED})}},{key:"doesRowPassQuickFilterNoCache",value:function(e,t){var n=this;return this.columnModel.getAllColumnsForQuickFilter().some((function(i){var r=n.getQuickFilterTextForColumn(i,e);return Fn(r)&&r.indexOf(t)>=0}))}},{key:"doesRowPassQuickFilterCache",value:function(e,t){return this.checkGenerateQuickFilterAggregateText(e),e.quickFilterAggregateText.indexOf(t)>=0}},{key:"doesRowPassQuickFilterMatcher",value:function(e,t){var n;e?(this.checkGenerateQuickFilterAggregateText(t),n=t.quickFilterAggregateText):n=this.getQuickFilterAggregateText(t);var i=this.quickFilterParts;return(0,this.matcher)(i,n)}},{key:"checkGenerateQuickFilterAggregateText",value:function(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getQuickFilterAggregateText(e))}},{key:"getQuickFilterTextForColumn",value:function(e,t){var n=this.valueService.getValue(e,t,!0),i=e.getColDef();if(i.getQuickFilterText){var r=this.gridOptionsService.addGridCommonParams({value:n,node:t,data:t.data,column:e,colDef:i});n=i.getQuickFilterText(r)}return Fn(n)?n.toString().toUpperCase():null}},{key:"getQuickFilterAggregateText",value:function(e){var t=this,n=[];return this.columnModel.getAllColumnsForQuickFilter().forEach((function(i){var r=t.getQuickFilterTextForColumn(i,e);Fn(r)&&n.push(r)})),n.join(qu.QUICK_FILTER_SEPARATOR)}}]),n}(kr);qu.EVENT_QUICK_FILTER_CHANGED="quickFilterChanged",qu.QUICK_FILTER_SEPARATOR="\n",Mn([Di("valueService")],qu.prototype,"valueService",2),Mn([Di("columnModel")],qu.prototype,"columnModel",2),Mn([Di("rowModel")],qu.prototype,"rowModel",2),Mn([Ei],qu.prototype,"postConstruct",1),qu=Mn([Ri("quickFilterService")],qu);var Qu=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).allColumnFilters=new Map,e.allColumnListeners=new Map,e.activeAggregateFilters=[],e.activeColumnFilters=[],e.processingFilterChange=!1,e.filterModelUpdateQueue=[],e.columnFilterModelUpdateQueue=[],e.advancedFilterModelUpdateQueue=[],e}return(0,s.Z)(n,[{key:"init",value:function(){var e,t,n,i=this;this.addManagedListener(this.eventService,Er.EVENT_GRID_COLUMNS_CHANGED,(function(){return i.onColumnsChanged()})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_VALUE_CHANGED,(function(){return i.refreshFiltersForAggregations()})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_PIVOT_CHANGED,(function(){return i.refreshFiltersForAggregations()})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_PIVOT_MODE_CHANGED,(function(){return i.refreshFiltersForAggregations()})),this.addManagedListener(this.eventService,Er.EVENT_NEW_COLUMNS_LOADED,(function(){return i.updateAdvancedFilterColumns()})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_VISIBLE,(function(){return i.updateAdvancedFilterColumns()})),this.addManagedListener(this.eventService,Er.EVENT_ROW_DATA_UPDATED,(function(){return i.onNewRowsLoaded("rowDataUpdated")})),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],(function(){i.onFilterChanged({source:"api"})})),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",(function(){i.updateAggFiltering(),i.onFilterChanged()})),this.addManagedPropertyListener("advancedFilterModel",(function(e){return i.setAdvancedFilterModel(e.currentValue)})),this.addManagedListener(this.eventService,Er.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,(function(e){var t=e.enabled;return i.onAdvancedFilterEnabledChanged(t)})),this.addManagedListener(this.eventService,Er.EVENT_DATA_TYPES_INFERRED,(function(){return i.processFilterModelUpdateQueue()})),this.addManagedListener(this.quickFilterService,qu.EVENT_QUICK_FILTER_CHANGED,(function(){return i.onFilterChanged({source:"quickFilter"})})),this.initialFilterModel=Tn({},null!=(n=null==(t=null==(e=this.gridOptionsService.get("initialState"))?void 0:e.filter)?void 0:t.filterModel)?n:{})}},{key:"isExternalFilterPresentCallback",value:function(){var e=this.gridOptionsService.getCallback("isExternalFilterPresent");return"function"===typeof e&&e({})}},{key:"doesExternalFilterPass",value:function(e){var t=this.gridOptionsService.get("doesExternalFilterPass");return"function"===typeof t&&t(e)}},{key:"setFilterModel",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api";if(this.isAdvancedFilterEnabled())this.warnAdvancedFilters();else if(this.dataTypeService.isPendingInference())this.filterModelUpdateQueue.push({model:e,source:n});else{var i=[],r=this.getFilterModel();if(e){var o=bs(Object.keys(e));this.allColumnFilters.forEach((function(n,r){var a=e[r];i.push(t.setModelOnFilterWrapper(n.filterPromise,a)),o.delete(r)})),o.forEach((function(n){var r=t.columnModel.getPrimaryColumn(n)||t.columnModel.getGridColumn(n);if(r)if(r.isFilterAllowed()){var o=t.getOrCreateFilterWrapper(r,"NO_UI");o?i.push(t.setModelOnFilterWrapper(o.filterPromise,e[n])):console.warn("AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: "+n)}else console.warn("AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+n);else console.warn("AG Grid: setFilterModel() - no column found for colId: "+n)}))}else this.allColumnFilters.forEach((function(e){i.push(t.setModelOnFilterWrapper(e.filterPromise,null))}));Rs.all(i).then((function(){var e=t.getFilterModel(),i=[];t.allColumnFilters.forEach((function(t,n){var o=r?r[n]:null,a=e?e[n]:null;Es.jsonEquals(o,a)||i.push(t.column)})),i.length>0&&t.onFilterChanged({columns:i,source:n})}))}}},{key:"setModelOnFilterWrapper",value:function(e,t){return new Rs((function(n){e.then((function(e){"function"!==typeof e.setModel&&(console.warn("AG Grid: filter missing setModel method, which is needed for setFilterModel"),n()),(e.setModel(t)||Rs.resolve()).then((function(){return n()}))}))}))}},{key:"getFilterModel",value:function(){var e=this,t={};return this.allColumnFilters.forEach((function(n,i){var r=e.getModelFromFilterWrapper(n);Fn(r)&&(t[i]=r)})),t}},{key:"getModelFromFilterWrapper",value:function(e){var t,n=e.filterPromise.resolveNow(null,(function(e){return e}));return null==n?null!=(t=this.initialFilterModel[e.column.getColId()])?t:null:"function"!==typeof n.getModel?(console.warn("AG Grid: filter API missing getModel method, which is needed for getFilterModel"),null):n.getModel()}},{key:"isColumnFilterPresent",value:function(){return this.activeColumnFilters.length>0}},{key:"isAggregateFilterPresent",value:function(){return!!this.activeAggregateFilters.length}},{key:"isExternalFilterPresent",value:function(){return this.externalFilterPresent}},{key:"isChildFilterPresent",value:function(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}},{key:"isAdvancedFilterPresent",value:function(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isFilterPresent()}},{key:"onAdvancedFilterEnabledChanged",value:function(e){var t,n=this;e?this.allColumnFilters.size&&(this.allColumnFilters.forEach((function(e){return n.disposeFilterWrapper(e,"advancedFilterEnabled")})),this.onFilterChanged({source:"advancedFilter"})):(null==(t=this.advancedFilterService)?void 0:t.isFilterPresent())&&(this.advancedFilterService.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}},{key:"isAdvancedFilterEnabled",value:function(){var e;return!!(null==(e=this.advancedFilterService)?void 0:e.isEnabled())}},{key:"isAdvancedFilterHeaderActive",value:function(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isHeaderActive()}},{key:"doAggregateFiltersPass",value:function(e,t){return this.doColumnFiltersPass(e,t,!0)}},{key:"updateActiveFilters",value:function(){var e=this;this.activeColumnFilters.length=0,this.activeAggregateFilters.length=0;var t=function(e){return!!e&&(e.isFilterActive?e.isFilterActive():(console.warn("AG Grid: Filter is missing isFilterActive() method"),!1))},n=!!this.gridOptionsService.getGroupAggFiltering();this.allColumnFilters.forEach((function(i){if(i.filterPromise.resolveNow(!1,t)){var r=i.filterPromise.resolveNow(null,(function(e){return e}));!function(t){if(!t.isPrimary())return!0;var i=!e.columnModel.isPivotActive();return!(!t.isValueActive()||!i)&&(!!e.columnModel.isPivotMode()||n)}(i.column)?e.activeColumnFilters.push(r):e.activeAggregateFilters.push(r)}}))}},{key:"updateFilterFlagInColumns",value:function(e,t){this.allColumnFilters.forEach((function(n){var i=n.filterPromise.resolveNow(!1,(function(e){return e.isFilterActive()}));n.column.setFilterActive(i,e,t)}))}},{key:"isAnyFilterPresent",value:function(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}},{key:"doColumnFiltersPass",value:function(e,t,n){for(var i=e.data,r=e.aggData,o=n?this.activeAggregateFilters:this.activeColumnFilters,a=n?r:i,s=0;s<o.length;s++){var l=o[s];if(null!=l&&l!==t){if("function"!==typeof l.doesFilterPass)throw new Error("Filter is missing method doesFilterPass");if(!l.doesFilterPass({node:e,data:a}))return!1}}return!0}},{key:"resetQuickFilterCache",value:function(){this.quickFilterService.resetQuickFilterCache()}},{key:"refreshFiltersForAggregations",value:function(){this.gridOptionsService.getGroupAggFiltering()&&this.onFilterChanged()}},{key:"callOnFilterChangedOutsideRenderCycle",value:function(e){var t=this,n=function(){return t.onFilterChanged(e)};this.rowRenderer.isRefreshInProgress()?setTimeout(n,0):n()}},{key:"onFilterChanged",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.source,n=e.filterInstance,i=e.additionalEventAttributes,r=e.columns;this.updateDependantFilters(),this.updateActiveFilters(),this.updateFilterFlagInColumns("filterChanged",i),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.allColumnFilters.forEach((function(e){e.filterPromise&&e.filterPromise.then((function(e){e&&e!==n&&e.onAnyFilterChanged&&e.onAnyFilterChanged()}))}));var o={source:t,type:Er.EVENT_FILTER_CHANGED,columns:r||[]};i&&Jn(o,i),this.processingFilterChange=!0,this.eventService.dispatchEvent(o),this.processingFilterChange=!1}},{key:"isSuppressFlashingCellsBecauseFiltering",value:function(){var e;return!(null!=(e=this.gridOptionsService.get("allowShowChangeAfterFilter"))&&e)&&this.processingFilterChange}},{key:"isQuickFilterPresent",value:function(){return this.quickFilterService.isQuickFilterPresent()}},{key:"updateAggFiltering",value:function(){this.aggFiltering=!!this.gridOptionsService.getGroupAggFiltering()}},{key:"isAggregateQuickFilterPresent",value:function(){return this.isQuickFilterPresent()&&(this.aggFiltering||this.columnModel.isPivotMode())}},{key:"isNonAggregateQuickFilterPresent",value:function(){return this.isQuickFilterPresent()&&!(this.aggFiltering||this.columnModel.isPivotMode())}},{key:"doesRowPassOtherFilters",value:function(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e})}},{key:"doesRowPassAggregateFilters",value:function(e){return!(this.isAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode))&&!(this.isAggregateFilterPresent()&&!this.doAggregateFiltersPass(e.rowNode,e.filterInstanceToSkip))}},{key:"doesRowPassFilter",value:function(e){return!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode))&&(!(this.isExternalFilterPresent()&&!this.doesExternalFilterPass(e.rowNode))&&(!(this.isColumnFilterPresent()&&!this.doColumnFiltersPass(e.rowNode,e.filterInstanceToSkip))&&!(this.isAdvancedFilterPresent()&&!this.advancedFilterService.doesFilterPass(e.rowNode))))}},{key:"onNewRowsLoaded",value:function(e){this.allColumnFilters.forEach((function(e){e.filterPromise.then((function(e){e.onNewRowsLoaded&&e.onNewRowsLoaded()}))})),this.updateFilterFlagInColumns(e,{afterDataChange:!0}),this.updateActiveFilters()}},{key:"createValueGetter",value:function(e){var t=this;return function(n){var i=n.node;return t.valueService.getValue(e,i,!0)}}},{key:"createGetValue",value:function(e){var t=this;return function(n,i){var r=i?t.columnModel.getGridColumn(i):e;return r?t.valueService.getValue(r,n,!0):void 0}}},{key:"getFilterComponent",value:function(e,t){var n,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(i)return(null==(n=this.getOrCreateFilterWrapper(e,t))?void 0:n.filterPromise)||null;var r=this.cachedFilter(e);return r?r.filterPromise:null}},{key:"isFilterActive",value:function(e){var t=this.cachedFilter(e);return!!t&&t.filterPromise.resolveNow(!1,(function(e){return e.isFilterActive()}))}},{key:"getOrCreateFilterWrapper",value:function(e,t){if(!e.isFilterAllowed())return null;var n=this.cachedFilter(e);return n?"NO_UI"!==t&&this.putIntoGui(n,t):(n=this.createFilterWrapper(e,t),this.setColumnFilterWrapper(e,n)),n}},{key:"cachedFilter",value:function(e){return this.allColumnFilters.get(e.getColId())}},{key:"getDefaultFilter",value:function(e){var t;if(wi.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()))t="agSetColumnFilter";else{var n=this.dataTypeService.getBaseDataType(e);t="number"===n?"agNumberColumnFilter":"date"===n||"dateString"===n?"agDateColumnFilter":"agTextColumnFilter"}return t}},{key:"getDefaultFloatingFilter",value:function(e){var t;if(wi.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()))t="agSetColumnFloatingFilter";else{var n=this.dataTypeService.getBaseDataType(e);t="number"===n?"agNumberColumnFloatingFilter":"date"===n||"dateString"===n?"agDateColumnFloatingFilter":"agTextColumnFloatingFilter"}return t}},{key:"createFilterInstance",value:function(e){var t,n=this,i=this.getDefaultFilter(e),r=e.getColDef(),o=On(Tn({},this.createFilterParams(e,r)),{filterModifiedCallback:function(){return n.filterModifiedCallbackFactory(t,e)()},filterChangedCallback:function(i){return n.filterChangedCallbackFactory(t,e)(i)},doesRowPassOtherFilter:function(e){return n.doesRowPassOtherFilters(t,e)}}),a=this.userComponentFactory.getFilterDetails(r,o,i);return a?{filterPromise:function(){var e=a.newAgStackInstance();return e&&e.then((function(e){return t=e})),e},compDetails:a}:{filterPromise:null,compDetails:null}}},{key:"createFilterParams",value:function(e,t){return this.gridOptionsService.addGridCommonParams({column:e,colDef:Xn(t),rowModel:this.rowModel,filterChangedCallback:function(){},filterModifiedCallback:function(){},valueGetter:this.createValueGetter(e),getValue:this.createGetValue(e),doesRowPassOtherFilter:function(){return!0}})}},{key:"createFilterWrapper",value:function(e,t){var n,i={column:e,filterPromise:null,compiledElement:null,guiPromise:Rs.resolve(null),compDetails:null},r=this.createFilterInstance(e),o=r.filterPromise,a=r.compDetails;return i.filterPromise=null!=(n=null==o?void 0:o())?n:null,i.compDetails=a,o&&this.putIntoGui(i,t),i}},{key:"putIntoGui",value:function(e,t){var n=this,i=document.createElement("div");i.className="ag-filter",e.guiPromise=new Rs((function(r){e.filterPromise.then((function(o){var a=o.getGui();Fn(a)||console.warn("AG Grid: getGui method from filter returned ".concat(a,", it should be a DOM element or an HTML template string.")),"string"===typeof a&&(a=Za(a)),i.appendChild(a),r(i);var s={type:Er.EVENT_FILTER_OPENED,column:e.column,source:t,eGui:i};n.eventService.dispatchEvent(s)}))}))}},{key:"onColumnsChanged",value:function(){var e=this,t=[];this.allColumnFilters.forEach((function(n,i){(n.column.isPrimary()?e.columnModel.getPrimaryColumn(i):e.columnModel.getGridColumn(i))||(t.push(n.column),e.disposeFilterWrapper(n,"columnChanged"),e.disposeColumnListener(i))})),t.length>0?this.onFilterChanged({columns:t,source:"api"}):this.updateDependantFilters()}},{key:"updateDependantFilters",value:function(){var e=this,t=this.columnModel.getGroupAutoColumns();null==t||t.forEach((function(t){"agGroupColumnFilter"===t.getColDef().filter&&e.getOrCreateFilterWrapper(t,"NO_UI")}))}},{key:"isFilterAllowed",value:function(e){var t,n;if(this.isAdvancedFilterEnabled())return!1;var i=e.isFilterAllowed();if(!i)return!1;var r=this.allColumnFilters.get(e.getColId());return null==(n=null==(t=null==r?void 0:r.filterPromise)?void 0:t.resolveNow(!0,(function(e){return"function"!==typeof(null==e?void 0:e.isFilterAllowed)||(null==e?void 0:e.isFilterAllowed())})))||n}},{key:"getFloatingFilterCompDetails",value:function(e,t){var n=this,i=function(t){var i=n.getFilterComponent(e,"NO_UI");null!=i&&i.then((function(e){t(Yu(e))}))},r=e.getColDef(),o=On(Tn({},this.createFilterParams(e,r)),{filterChangedCallback:function(){return i((function(t){return n.filterChangedCallbackFactory(t,e)()}))}}),a=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(r,Pu,o),s=this.userComponentFactory.getDefaultFloatingFilterType(r,(function(){return n.getDefaultFloatingFilter(e)}));null==s&&(s="agReadOnlyFloatingFilter");var l={column:e,filterParams:a,currentParentModel:function(){return n.getCurrentFloatingFilterParentModel(e)},parentFilterInstance:i,showParentFilter:t,suppressFilterButton:!1};return this.userComponentFactory.getFloatingFilterCompDetails(r,l,s)}},{key:"getCurrentFloatingFilterParentModel",value:function(e){var t=this.getFilterComponent(e,"NO_UI",!1);return t?t.resolveNow(null,(function(e){return e&&e.getModel()})):null}},{key:"destroyFilter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api",n=e.getColId(),i=this.allColumnFilters.get(n);this.disposeColumnListener(n),delete this.initialFilterModel[n],i&&(this.disposeFilterWrapper(i,t),this.onFilterChanged({columns:[e],source:"api"}))}},{key:"disposeColumnListener",value:function(e){var t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}},{key:"disposeFilterWrapper",value:function(e,t){var n=this;e.filterPromise.then((function(i){n.getContext().destroyBean(i),e.column.setFilterActive(!1,"filterDestroyed"),n.allColumnFilters.delete(e.column.getColId());var r={type:Er.EVENT_FILTER_DESTROYED,source:t,column:e.column};n.eventService.dispatchEvent(r)}))}},{key:"filterModifiedCallbackFactory",value:function(e,t){var n=this;return function(){var i={type:Er.EVENT_FILTER_MODIFIED,column:t,filterInstance:e};n.eventService.dispatchEvent(i)}}},{key:"filterChangedCallbackFactory",value:function(e,t){var n=this;return function(i){var r,o=null!=(r=null==i?void 0:i.source)?r:"api",a={filter:e,additionalEventAttributes:i,columns:[t],source:o};n.callOnFilterChangedOutsideRenderCycle(a)}}},{key:"checkDestroyFilter",value:function(e){var t=this,n=this.allColumnFilters.get(e);if(n){var i=n.column,r=(i.isFilterAllowed()?this.createFilterInstance(i):{compDetails:null}).compDetails;if(this.areFilterCompsDifferent(n.compDetails,r))this.destroyFilter(i,"paramsUpdated");else{var o=i.getColDef().filterParams;n.filterPromise?n.filterPromise.then((function(e){!1===(!(null==e?void 0:e.refresh)||e.refresh(Tn(On(Tn({},t.createFilterParams(i,i.getColDef())),{filterModifiedCallback:t.filterModifiedCallbackFactory(e,i),filterChangedCallback:t.filterChangedCallbackFactory(e,i),doesRowPassOtherFilter:function(n){return t.doesRowPassOtherFilters(e,n)}}),o)))&&t.destroyFilter(i,"paramsUpdated")})):this.destroyFilter(i,"paramsUpdated")}}}},{key:"setColumnFilterWrapper",value:function(e,t){var n=this,i=e.getColId();this.allColumnFilters.set(i,t),this.allColumnListeners.set(i,this.addManagedListener(e,Gi.EVENT_COL_DEF_CHANGED,(function(){return n.checkDestroyFilter(i)})))}},{key:"areFilterCompsDifferent",value:function(e,t){if(!t||!e)return!0;var n=e.componentClass,i=t.componentClass;return!(n===i||(null==n?void 0:n.render)&&(null==i?void 0:i.render)&&n.render===i.render)}},{key:"getAdvancedFilterModel",value:function(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null}},{key:"setAdvancedFilterModel",value:function(e){this.isAdvancedFilterEnabled()&&(this.dataTypeService.isPendingInference()?this.advancedFilterModelUpdateQueue.push(e):(this.advancedFilterService.setModel(null!=e?e:null),this.onFilterChanged({source:"advancedFilter"})))}},{key:"showAdvancedFilterBuilder",value:function(e){this.isAdvancedFilterEnabled()&&this.advancedFilterService.getCtrl().toggleFilterBuilder(e,!0)}},{key:"updateAdvancedFilterColumns",value:function(){this.isAdvancedFilterEnabled()&&this.advancedFilterService.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}},{key:"hasFloatingFilters",value:function(){return!this.isAdvancedFilterEnabled()&&this.columnModel.getAllGridColumns().some((function(e){return e.getColDef().floatingFilter}))}},{key:"getFilterInstance",value:function(e,t){if(!this.isAdvancedFilterEnabled()){var n=this.getFilterInstanceImpl(e,(function(e){if(t){var n=Yu(e);t(n)}}));return Yu(n)}this.warnAdvancedFilters()}},{key:"getColumnFilterInstance",value:function(e){var t=this;return new Promise((function(n){t.getFilterInstance(e,(function(e){n(e)}))}))}},{key:"getFilterInstanceImpl",value:function(e,t){var n=this.columnModel.getPrimaryColumn(e);if(n){var i=this.getFilterComponent(n,"NO_UI"),r=i&&i.resolveNow(null,(function(e){return e}));return r?setTimeout(t,0,r):i&&i.then((function(e){t(e)})),r}}},{key:"warnAdvancedFilters",value:function(){oi("Column Filter API methods have been disabled as Advanced Filters are enabled.")}},{key:"setupAdvancedFilterHeaderComp",value:function(e){var t;null==(t=this.advancedFilterService)||t.getCtrl().setupHeaderComp(e)}},{key:"getHeaderRowCount",value:function(){return this.isAdvancedFilterHeaderActive()?1:0}},{key:"getHeaderHeight",value:function(){return this.isAdvancedFilterHeaderActive()?this.advancedFilterService.getCtrl().getHeaderHeight():0}},{key:"processFilterModelUpdateQueue",value:function(){var e=this;this.filterModelUpdateQueue.forEach((function(t){var n=t.model,i=t.source;return e.setFilterModel(n,i)})),this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue.forEach((function(t){var n=t.key,i=t.model,r=t.resolve;e.setColumnFilterModel(n,i).then((function(){return r()}))})),this.columnFilterModelUpdateQueue=[],this.advancedFilterModelUpdateQueue.forEach((function(t){return e.setAdvancedFilterModel(t)})),this.advancedFilterModelUpdateQueue=[]}},{key:"getColumnFilterModel",value:function(e){var t=this.getFilterWrapper(e);return t?this.getModelFromFilterWrapper(t):null}},{key:"setColumnFilterModel",value:function(e,t){if(this.isAdvancedFilterEnabled())return this.warnAdvancedFilters(),Promise.resolve();if(this.dataTypeService.isPendingInference()){var n=function(){},i=new Promise((function(e){n=e}));return this.columnFilterModelUpdateQueue.push({key:e,model:t,resolve:n}),i}var r=this.columnModel.getPrimaryColumn(e),o=r?this.getOrCreateFilterWrapper(r,"NO_UI"):null;return o?function(e){return new Promise((function(t){e.then((function(e){return t(e)}))}))}(this.setModelOnFilterWrapper(o.filterPromise,t)):Promise.resolve()}},{key:"getFilterWrapper",value:function(e){var t,n=this.columnModel.getPrimaryColumn(e);return n&&null!=(t=this.cachedFilter(n))?t:null}},{key:"destroy",value:function(){var e=this;(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this),this.allColumnFilters.forEach((function(t){return e.disposeFilterWrapper(t,"gridDestroyed")})),this.allColumnListeners.clear()}}]),n}(kr);Mn([Di("valueService")],Qu.prototype,"valueService",2),Mn([Di("columnModel")],Qu.prototype,"columnModel",2),Mn([Di("rowModel")],Qu.prototype,"rowModel",2),Mn([Di("userComponentFactory")],Qu.prototype,"userComponentFactory",2),Mn([Di("rowRenderer")],Qu.prototype,"rowRenderer",2),Mn([Di("dataTypeService")],Qu.prototype,"dataTypeService",2),Mn([Di("quickFilterService")],Qu.prototype,"quickFilterService",2),Mn([Ti("advancedFilterService")],Qu.prototype,"advancedFilterService",2),Mn([Ei],Qu.prototype,"init",1),Qu=Mn([Ri("filterManager")],Qu);var Ju=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i){var r;return(0,a.Z)(this,n),(r=t.call(this,e)).ctrl=i,r}return(0,s.Z)(n,[{key:"getCtrl",value:function(){return this.ctrl}}]),n}(Ns),$u=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){return(0,a.Z)(this,n),t.call(this,n.TEMPLATE,e)}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this,t=this.getGui(),n={addOrRemoveCssClass:function(t,n){return e.addOrRemoveCssClass(t,n)},addOrRemoveBodyCssClass:function(t,n){return e.eFloatingFilterBody.classList.toggle(t,n)},setButtonWrapperDisplayed:function(t){return Sa(e.eButtonWrapper,t)},setCompDetails:function(t){return e.setCompDetails(t)},getFloatingFilterComp:function(){return e.compPromise},setWidth:function(e){return t.style.width=e},setMenuIcon:function(t){return e.eButtonShowMainFilter.appendChild(t)}};this.ctrl.setComp(n,t,this.eButtonShowMainFilter,this.eFloatingFilterBody)}},{key:"setCompDetails",value:function(e){var t=this;if(!e)return this.destroyFloatingFilterComp(),void(this.compPromise=null);this.compPromise=e.newAgStackInstance(),this.compPromise.then((function(e){return t.afterCompCreated(e)}))}},{key:"destroyFloatingFilterComp",value:function(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}},{key:"afterCompCreated",value:function(e){e&&(this.isAlive()?(this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()):this.destroyBean(e))}}]),n}(Ju);$u.TEMPLATE='<div class="ag-header-cell ag-floating-filter" role="gridcell">\n            <div ref="eFloatingFilterBody" role="presentation"></div>\n            <div class="ag-floating-filter-button ag-hidden" ref="eButtonWrapper" role="presentation">\n                <button type="button" class="ag-button ag-floating-filter-button-button" ref="eButtonShowMainFilter" tabindex="-1"></button>\n            </div>\n        </div>',Mn([Ls("eFloatingFilterBody")],$u.prototype,"eFloatingFilterBody",2),Mn([Ls("eButtonWrapper")],$u.prototype,"eButtonWrapper",2),Mn([Ls("eButtonShowMainFilter")],$u.prototype,"eButtonShowMainFilter",2),Mn([Ei],$u.prototype,"postConstruct",1),Mn([xi],$u.prototype,"destroyFloatingFilterComp",1);var ec=$u,tc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).view=e,i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}},{key:"updateLayoutClasses",value:function(){var e=this.getDomLayout(),t={autoHeight:"autoHeight"===e,normal:"normal"===e,print:"print"===e},n=t.autoHeight?"ag-layout-auto-height":t.print?"ag-layout-print":"ag-layout-normal";this.view.updateLayoutClasses(n,t)}},{key:"getDomLayout",value:function(){var e,t=null!=(e=this.gridOptionsService.get("domLayout"))?e:"normal";return-1===["normal","print","autoHeight"].indexOf(t)?(oi("".concat(t," is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.")),"normal"):t}}]),n}(kr);Mn([Ei],tc.prototype,"postConstruct",1);var nc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).lastScrollSource=[null,null],i.scrollLeft=-1,i.nextScrollTop=-1,i.scrollTop=-1,i.lastOffsetHeight=-1,i.lastScrollTop=-1,i.eBodyViewport=e,i.resetLastHScrollDebounced=fi((function(){return i.lastScrollSource[1]=null}),500),i.resetLastVScrollDebounced=fi((function(){return i.lastScrollSource[0]=null}),500),i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.enableRtl=this.gridOptionsService.get("enableRtl"),this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.ctrlsService.whenReady((function(t){e.centerRowContainerCtrl=t.centerRowContainerCtrl,e.onDisplayedColumnsWidthChanged(),e.addScrollListener()}))}},{key:"addScrollListener",value:function(){var e=this.ctrlsService.getFakeHScrollComp(),t=this.ctrlsService.getFakeVScrollComp();this.addManagedListener(this.centerRowContainerCtrl.getViewportElement(),"scroll",this.onHScroll.bind(this)),e.onScrollCallback(this.onFakeHScroll.bind(this));var n=this.gridOptionsService.get("debounceVerticalScrollbar"),i=n?fi(this.onVScroll.bind(this),100):this.onVScroll.bind(this),r=n?fi(this.onFakeVScroll.bind(this),100):this.onFakeVScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",i),t.onScrollCallback(r)}},{key:"onDisplayedColumnsWidthChanged",value:function(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}},{key:"horizontallyScrollHeaderCenterAndFloatingCenter",value:function(e){if(!(null==this.centerRowContainerCtrl)){void 0===e&&(e=this.centerRowContainerCtrl.getCenterViewportScrollLeft());var t=this.enableRtl?e:-e,n=this.ctrlsService.getTopCenterRowContainerCtrl(),i=this.ctrlsService.getStickyTopCenterRowContainerCtrl(),r=this.ctrlsService.getBottomCenterRowContainerCtrl(),o=this.ctrlsService.getFakeHScrollComp();this.ctrlsService.getHeaderRowContainerCtrl().setHorizontalScroll(-t),r.setContainerTranslateX(t),n.setContainerTranslateX(t),i.setContainerTranslateX(t);var a=this.centerRowContainerCtrl.getViewportElement(),s=0===this.lastScrollSource[1];e=Math.abs(e),s?o.setScrollPosition(e):La(a,e,this.enableRtl)}}},{key:"isControllingScroll",value:function(e,t){return null==this.lastScrollSource[t]?(this.lastScrollSource[t]=e,!0):this.lastScrollSource[t]===e}},{key:"onFakeHScroll",value:function(){this.isControllingScroll(1,1)&&this.onHScrollCommon(1)}},{key:"onHScroll",value:function(){this.isControllingScroll(0,1)&&this.onHScrollCommon(0)}},{key:"onHScrollCommon",value:function(e){var t,n=this.centerRowContainerCtrl.getViewportElement(),i=n.scrollLeft;this.shouldBlockScrollUpdate(1,i,!0)||(t=0===e?Na(n,this.enableRtl):this.ctrlsService.getFakeHScrollComp().getScrollPosition(),this.doHorizontalScroll(Math.round(t)),this.resetLastHScrollDebounced())}},{key:"onFakeVScroll",value:function(){this.isControllingScroll(1,0)&&this.onVScrollCommon(1)}},{key:"onVScroll",value:function(){this.isControllingScroll(0,0)&&this.onVScrollCommon(0)}},{key:"onVScrollCommon",value:function(e){var t;t=0===e?this.eBodyViewport.scrollTop:this.ctrlsService.getFakeVScrollComp().getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0)||(this.animationFrameService.setScrollTop(t),this.nextScrollTop=t,0===e?this.ctrlsService.getFakeVScrollComp().setScrollPosition(t):this.eBodyViewport.scrollTop=t,this.gridOptionsService.get("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced())}},{key:"doHorizontalScroll",value:function(e){var t=this.ctrlsService.getFakeHScrollComp().getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowContainerCtrl.onHorizontalViewportChanged(!0))}},{key:"fireScrollEvent",value:function(e){var t=this,n={type:Er.EVENT_BODY_SCROLL,direction:1===e?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(n),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout((function(){var e=On(Tn({},n),{type:Er.EVENT_BODY_SCROLL_END});t.eventService.dispatchEvent(e)}),100)}},{key:"shouldBlockScrollUpdate",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!(n&&!Yo())&&(0===e?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t))}},{key:"shouldBlockVerticalScroll",value:function(e){var t=Da(this.eBodyViewport),n=this.eBodyViewport.scrollHeight;return e<0||e+t>n}},{key:"shouldBlockHorizontalScroll",value:function(e){var t=this.centerRowContainerCtrl.getCenterWidth(),n=this.centerRowContainerCtrl.getViewportElement().scrollWidth;if(this.enableRtl&&Ma()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>n}},{key:"redrawRowsAfterScroll",value:function(){this.fireScrollEvent(0)}},{key:"checkScrollLeft",value:function(){this.scrollLeft!==this.centerRowContainerCtrl.getCenterViewportScrollLeft()&&this.onHScrollCommon(0)}},{key:"scrollGridIfNeeded",value:function(){var e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e}},{key:"setHorizontalScrollPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,i=this.centerRowContainerCtrl.getViewportElement().scrollWidth-this.centerRowContainerCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(e=this.enableRtl&&Ma()?e>0?0:i:Math.min(Math.max(e,n),i)),La(this.centerRowContainerCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}},{key:"setVerticalScrollPosition",value:function(e){this.eBodyViewport.scrollTop=e}},{key:"getVScrollPosition",value:function(){return this.lastScrollTop=this.eBodyViewport.scrollTop,this.lastOffsetHeight=this.eBodyViewport.offsetHeight,{top:this.lastScrollTop,bottom:this.lastScrollTop+this.lastOffsetHeight}}},{key:"getApproximateVScollPosition",value:function(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}},{key:"getHScrollPosition",value:function(){return this.centerRowContainerCtrl.getHScrollPosition()}},{key:"isHorizontalScrollShowing",value:function(){return this.centerRowContainerCtrl.isHorizontalScrollShowing()}},{key:"scrollHorizontally",value:function(e){var t=this.centerRowContainerCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowContainerCtrl.getViewportElement().scrollLeft-t}},{key:"scrollToTop",value:function(){this.eBodyViewport.scrollTop=0}},{key:"ensureNodeVisible",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.rowModel.getRowCount(),i=-1,r=0;r<n;r++){var o=this.rowModel.getRow(r);if("function"===typeof e){var a=e;if(o&&a(o)){i=r;break}}else if(e===o||e===o.data){i=r;break}}i>=0&&this.ensureIndexVisible(i,t)}},{key:"ensureIndexVisible",value:function(e,t){var n=this;if(!this.gridOptionsService.isDomLayout("print")){var i=this.paginationProxy.getRowCount();if("number"!==typeof e||e<0||e>=i)console.warn("AG Grid: Invalid row index for ensureIndexVisible: "+e);else{var r=this.gridOptionsService.get("pagination")&&!this.gridOptionsService.get("suppressPaginationPanel");this.getFrameworkOverrides().wrapIncoming((function(){r||n.paginationProxy.goToPageWithIndex(e);var i,o=n.ctrlsService.getGridBodyCtrl().getStickyTopHeight(),a=n.paginationProxy.getRow(e);do{var s=a.rowTop,l=a.rowHeight,u=n.paginationProxy.getPixelOffset(),c=a.rowTop-u,d=c+a.rowHeight,h=n.getVScrollPosition(),p=n.heightScaler.getDivStretchOffset(),f=h.top+p,v=h.bottom+p,g=v-f,m=n.heightScaler.getScrollPositionForPixel(c),y=n.heightScaler.getScrollPositionForPixel(d-g),C=Math.min((m+y)/2,c),k=null;"top"===t?k=m:"bottom"===t?k=y:"middle"===t?k=C:f+o>c?k=m-o:v<d&&(k=y),null!==k&&(n.setVerticalScrollPosition(k),n.rowRenderer.redraw({afterScroll:!0})),i=s!==a.rowTop||l!==a.rowHeight}while(i);n.animationFrameService.flushAllFrames()}))}}}},{key:"ensureColumnVisible",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",i=this.columnModel.getGridColumn(e);if(i&&!i.isPinned()&&this.columnModel.isColumnDisplayed(i)){var r=this.getPositionedHorizontalScroll(i,n);this.getFrameworkOverrides().wrapIncoming((function(){null!==r&&t.centerRowContainerCtrl.setCenterViewportScrollLeft(r),t.centerRowContainerCtrl.onHorizontalViewportChanged(),t.animationFrameService.flushAllFrames()}))}}},{key:"setScrollPosition",value:function(e,t){var n=this;this.getFrameworkOverrides().wrapIncoming((function(){n.centerRowContainerCtrl.setCenterViewportScrollLeft(t),n.setVerticalScrollPosition(e),n.rowRenderer.redraw({afterScroll:!0}),n.animationFrameService.flushAllFrames()}))}},{key:"getPositionedHorizontalScroll",value:function(e,t){var n=this.isColumnOutsideViewport(e),i=n.columnBeforeStart,r=n.columnAfterEnd,o=this.centerRowContainerCtrl.getCenterWidth()<e.getActualWidth(),a=this.centerRowContainerCtrl.getCenterWidth(),s=this.enableRtl,l=(s?i:r)||o,u=s?r:i;"auto"!==t&&(l="start"===t,u="end"===t);var c="middle"===t;if(l||u||c){var d=this.getColumnBounds(e),h=d.colLeft,p=d.colMiddle,f=d.colRight;return c?p-a/2:l?s?f:h:s?h-a:f-a}return null}},{key:"isColumnOutsideViewport",value:function(e){var t=this.getViewportBounds(),n=t.start,i=t.end,r=this.getColumnBounds(e),o=r.colLeft,a=r.colRight,s=this.enableRtl;return{columnBeforeStart:s?n>a:i<a,columnAfterEnd:s?i<o:n>o}}},{key:"getColumnBounds",value:function(e){var t=this.enableRtl,n=this.columnModel.getBodyContainerWidth(),i=e.getActualWidth(),r=e.getLeft(),o=t?-1:1,a=t?n-r:r;return{colLeft:a,colMiddle:a+i/2*o,colRight:a+i*o}}},{key:"getViewportBounds",value:function(){var e=this.centerRowContainerCtrl.getCenterWidth(),t=this.centerRowContainerCtrl.getCenterViewportScrollLeft();return{start:t,end:e+t,width:e}}}]),n}(kr);Mn([Di("ctrlsService")],nc.prototype,"ctrlsService",2),Mn([Di("animationFrameService")],nc.prototype,"animationFrameService",2),Mn([Di("paginationProxy")],nc.prototype,"paginationProxy",2),Mn([Di("rowModel")],nc.prototype,"rowModel",2),Mn([Di("rowContainerHeightService")],nc.prototype,"heightScaler",2),Mn([Di("rowRenderer")],nc.prototype,"rowRenderer",2),Mn([Di("columnModel")],nc.prototype,"columnModel",2),Mn([Ei],nc.prototype,"postConstruct",1);var ic="ag-force-vertical-scroll",rc="ag-selectable",oc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).stickyTopHeight=0,e}return(0,s.Z)(n,[{key:"getScrollFeature",value:function(){return this.bodyScrollFeature}},{key:"getBodyViewportElement",value:function(){return this.eBodyViewport}},{key:"setComp",value:function(e,t,n,i,r,o){var a=this;this.comp=e,this.eGridBody=t,this.eBodyViewport=n,this.eTop=i,this.eBottom=r,this.eStickyTop=o,this.setCellTextSelection(this.gridOptionsService.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",(function(e){return a.setCellTextSelection(e.currentValue)})),this.createManagedBean(new tc(this.comp)),this.bodyScrollFeature=this.createManagedBean(new nc(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,n,r,o]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.filterManager.setupAdvancedFilterHeaderComp(i),this.ctrlsService.registerGridBodyCtrl(this)}},{key:"getComp",value:function(){return this.comp}},{key:"addEventListeners",value:function(){this.addManagedListener(this.eventService,Er.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))}},{key:"addFocusListeners",value:function(e){var t=this;e.forEach((function(e){t.addManagedListener(e,"focusin",(function(t){var n=xa(t.target,"ag-root",e);e.classList.toggle("ag-has-focus",!n)})),t.addManagedListener(e,"focusout",(function(t){var n=t.target,i=t.relatedTarget,r=e.contains(i),o=xa(i,"ag-root",e);xa(n,"ag-root",e)||r&&!o||e.classList.remove("ag-has-focus")}))}))}},{key:"setColumnMovingCss",value:function(e){this.comp.setColumnMovingCss("ag-column-moving",e)}},{key:"setCellTextSelection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.comp.setCellSelectableCss(rc,e)}},{key:"onScrollVisibilityChanged",value:function(){var e=this,t=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(t),this.setStickyTopWidth(t);var n=t&&this.gridOptionsService.getScrollbarWidth()||0,i=na()?16:0,r="calc(100% + ".concat(n+i,"px)");this.animationFrameService.requestAnimationFrame((function(){return e.comp.setBodyViewportWidth(r)}))}},{key:"onGridColumnsChanged",value:function(){var e=this.columnModel.getAllGridColumns();this.comp.setColumnCount(e.length)}},{key:"disableBrowserDragging",value:function(){this.addManagedListener(this.eGridBody,"dragstart",(function(e){if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}))}},{key:"addStopEditingWhenGridLosesFocus",value:function(){var e=this;if(this.gridOptionsService.get("stopEditingWhenCellsLoseFocus")){var t=function(t){var i=t.relatedTarget;if(null!==qo(i)){var r=n.some((function(e){return e.contains(i)}))&&e.mouseEventService.isElementInThisGrid(i);if(!r){var o=e.popupService;r=o.getActivePopups().some((function(e){return e.contains(i)}))||o.isElementWithinCustomPopup(i)}r||e.rowRenderer.stopEditing()}else e.rowRenderer.stopEditing()},n=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop];n.forEach((function(n){return e.addManagedListener(n,"focusout",t)}))}}},{key:"updateRowCount",value:function(){var e=this.headerNavigationService.getHeaderRowCount()+this.filterManager.getHeaderRowCount(),t=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1,n=-1===t?-1:e+t;this.comp.setRowCount(n)}},{key:"registerBodyViewportResizeListener",value:function(e){this.comp.registerBodyViewportResizeListener(e)}},{key:"setVerticalScrollPaddingVisible",value:function(e){var t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}},{key:"isVerticalScrollShowing",value:function(){var e=this.gridOptionsService.get("alwaysShowVerticalScroll"),t=e?ic:null,n=this.gridOptionsService.isDomLayout("normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||n&&Ua(this.eBodyViewport)}},{key:"setupRowAnimationCssClass",value:function(){var e=this,t=function(){var t=e.gridOptionsService.isAnimateRows()&&!e.rowContainerHeightService.isStretching(),n=t?"ag-row-animation":"ag-row-no-animation";e.comp.setRowAnimationCssOnBodyViewport(n,t)};t(),this.addManagedListener(this.eventService,Er.EVENT_HEIGHT_SCALE_CHANGED,t),this.addManagedPropertyListener("animateRows",t)}},{key:"getGridBodyElement",value:function(){return this.eGridBody}},{key:"addBodyViewportListener",value:function(){var e=this.onBodyViewportContextMenu.bind(this);this.addManagedListener(this.eBodyViewport,"contextmenu",e),this.mockContextMenuForIPad(e),this.addManagedListener(this.eBodyViewport,"wheel",this.onBodyViewportWheel.bind(this)),this.addManagedListener(this.eStickyTop,"wheel",this.onStickyTopWheel.bind(this)),this.addFullWidthContainerWheelListener()}},{key:"addFullWidthContainerWheelListener",value:function(){var e=this,t=this.eBodyViewport.querySelector(".ag-full-width-container"),n=this.eBodyViewport.querySelector(".ag-center-cols-viewport");t&&n&&this.addManagedListener(t,"wheel",(function(t){return e.onFullWidthContainerWheel(t,n)}))}},{key:"onFullWidthContainerWheel",value:function(e,t){!e.deltaX||Math.abs(e.deltaY)>Math.abs(e.deltaX)||!this.mouseEventService.isEventFromThisGrid(e)||(e.preventDefault(),t.scrollBy({left:e.deltaX}))}},{key:"onBodyViewportContextMenu",value:function(e,t,n){if(e||n){if(this.gridOptionsService.get("preventDefaultOnContextMenu"))(e||n).preventDefault();var i=(e||t).target;i!==this.eBodyViewport&&i!==this.ctrlsService.getCenterRowContainerCtrl().getViewportElement()||this.menuService.showContextMenu({mouseEvent:e,touchEvent:n,value:null,anchorToElement:this.eGridBody})}}},{key:"mockContextMenuForIPad",value:function(e){if(Yo()){var t=new Ol(this.eBodyViewport);this.addManagedListener(t,Ol.EVENT_LONG_TAP,(function(t){e(void 0,t.touchStart,t.touchEvent)})),this.addDestroyFunc((function(){return t.destroy()}))}}},{key:"onBodyViewportWheel",value:function(e){this.gridOptionsService.get("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault()}},{key:"onStickyTopWheel",value:function(e){e.preventDefault(),e.offsetY&&this.scrollVertically(e.deltaY)}},{key:"getGui",value:function(){return this.eGridBody}},{key:"scrollVertically",value:function(e){var t=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}},{key:"addRowDragListener",value:function(){this.rowDragFeature=this.createManagedBean(new zu(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature)}},{key:"getRowDragFeature",value:function(){return this.rowDragFeature}},{key:"onPinnedRowDataChanged",value:function(){this.setFloatingHeights()}},{key:"setFloatingHeights",value:function(){var e=this.pinnedRowModel,t=e.getPinnedTopTotalHeight(),n=e.getPinnedBottomTotalHeight();this.comp.setTopHeight(t),this.comp.setBottomHeight(n),this.comp.setTopDisplay(t?"inherit":"none"),this.comp.setBottomDisplay(n?"inherit":"none"),this.setStickyTopOffsetTop()}},{key:"setStickyTopHeight",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.comp.setStickyTopHeight("".concat(e,"px")),this.stickyTopHeight=e}},{key:"getStickyTopHeight",value:function(){return this.stickyTopHeight}},{key:"setStickyTopWidth",value:function(e){if(e){var t=this.gridOptionsService.getScrollbarWidth();this.comp.setStickyTopWidth("calc(100% - ".concat(t,"px)"))}else this.comp.setStickyTopWidth("100%")}},{key:"onHeaderHeightChanged",value:function(){this.setStickyTopOffsetTop()}},{key:"setStickyTopOffsetTop",value:function(){var e=this.ctrlsService.getGridHeaderCtrl().getHeaderHeight()+this.filterManager.getHeaderHeight(),t=this.pinnedRowModel.getPinnedTopTotalHeight(),n=0;e>0&&(n+=e+1),t>0&&(n+=t+1),this.comp.setStickyTopTop("".concat(n,"px"))}},{key:"sizeColumnsToFit",value:function(e,t){var n=this,i=this.isVerticalScrollShowing()?this.gridOptionsService.getScrollbarWidth():0,r=Ta(this.eGridBody)-i;r>0?this.columnModel.sizeColumnsToFit(r,"sizeColumnsToFit",!1,e):void 0===t?window.setTimeout((function(){n.sizeColumnsToFit(e,100)}),0):100===t?window.setTimeout((function(){n.sizeColumnsToFit(e,500)}),100):500===t?window.setTimeout((function(){n.sizeColumnsToFit(e,-1)}),500):console.warn("AG Grid: tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")}},{key:"addScrollEventListener",value:function(e){this.eBodyViewport.addEventListener("scroll",e,{passive:!0})}},{key:"removeScrollEventListener",value:function(e){this.eBodyViewport.removeEventListener("scroll",e)}}]),n}(kr);Mn([Di("animationFrameService")],oc.prototype,"animationFrameService",2),Mn([Di("rowContainerHeightService")],oc.prototype,"rowContainerHeightService",2),Mn([Di("ctrlsService")],oc.prototype,"ctrlsService",2),Mn([Di("columnModel")],oc.prototype,"columnModel",2),Mn([Di("scrollVisibleService")],oc.prototype,"scrollVisibleService",2),Mn([Di("menuService")],oc.prototype,"menuService",2),Mn([Di("headerNavigationService")],oc.prototype,"headerNavigationService",2),Mn([Di("dragAndDropService")],oc.prototype,"dragAndDropService",2),Mn([Di("pinnedRowModel")],oc.prototype,"pinnedRowModel",2),Mn([Di("rowRenderer")],oc.prototype,"rowRenderer",2),Mn([Di("popupService")],oc.prototype,"popupService",2),Mn([Di("mouseEventService")],oc.prototype,"mouseEventService",2),Mn([Di("rowModel")],oc.prototype,"rowModel",2),Mn([Di("filterManager")],oc.prototype,"filterManager",2);var ac="ag-cell-range-selected",sc=function(){function e(t,n){(0,a.Z)(this,e),this.beans=t,this.cellCtrl=n}return(0,s.Z)(e,[{key:"setComp",value:function(e,t){this.cellComp=e,this.eGui=t,this.onRangeSelectionChanged()}},{key:"onRangeSelectionChanged",value:function(){this.cellComp&&(this.rangeCount=this.beans.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(ac,0!==this.rangeCount),this.cellComp.addOrRemoveCssClass("".concat(ac,"-1"),1===this.rangeCount),this.cellComp.addOrRemoveCssClass("".concat(ac,"-2"),2===this.rangeCount),this.cellComp.addOrRemoveCssClass("".concat(ac,"-3"),3===this.rangeCount),this.cellComp.addOrRemoveCssClass("".concat(ac,"-4"),this.rangeCount>=4),this.cellComp.addOrRemoveCssClass("ag-cell-range-chart",this.hasChartRange),Po(this.eGui,this.rangeCount>0||void 0),this.cellComp.addOrRemoveCssClass("ag-cell-range-single-cell",this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())}},{key:"updateRangeBorders",value:function(){var e=this.getRangeBorders(),t=this.isSingleCell(),n=!t&&e.top,i=!t&&e.right,r=!t&&e.bottom,o=!t&&e.left;this.cellComp.addOrRemoveCssClass("ag-cell-range-top",n),this.cellComp.addOrRemoveCssClass("ag-cell-range-right",i),this.cellComp.addOrRemoveCssClass("ag-cell-range-bottom",r),this.cellComp.addOrRemoveCssClass("ag-cell-range-left",o)}},{key:"isSingleCell",value:function(){var e=this.beans.rangeService;return 1===this.rangeCount&&e&&!e.isMoreThanOneCell()}},{key:"getHasChartRange",value:function(){var e=this.beans.rangeService;if(!this.rangeCount||!e)return!1;var t=e.getCellRanges();return t.length>0&&t.every((function(e){return ir([1,0],e.type)}))}},{key:"updateRangeBordersIfRangeCount",value:function(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())}},{key:"getRangeBorders",value:function(){var e,t,n=this,i=this.beans.gridOptionsService.get("enableRtl"),r=!1,o=!1,a=!1,s=!1,l=this.cellCtrl.getCellPosition().column,u=this.beans,c=u.rangeService,d=u.columnModel;i?(e=d.getDisplayedColAfter(l),t=d.getDisplayedColBefore(l)):(e=d.getDisplayedColBefore(l),t=d.getDisplayedColAfter(l));var h=c.getCellRanges().filter((function(e){return c.isCellInSpecificRange(n.cellCtrl.getCellPosition(),e)}));e||(s=!0),t||(o=!0);for(var p=0;p<h.length&&!(r&&o&&a&&s);p++){var f=h[p],v=c.getRangeStartRow(f),g=c.getRangeEndRow(f);!r&&this.beans.rowPositionUtils.sameRow(v,this.cellCtrl.getCellPosition())&&(r=!0),!a&&this.beans.rowPositionUtils.sameRow(g,this.cellCtrl.getCellPosition())&&(a=!0),!s&&e&&f.columns.indexOf(e)<0&&(s=!0),!o&&t&&f.columns.indexOf(t)<0&&(o=!0)}return{top:r,right:o,bottom:a,left:s}}},{key:"refreshHandle",value:function(){if(this.beans.rangeService&&!this.beans.context.isDestroyed()){var 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)}}},{key:"shouldHaveSelectionHandle",value:function(){var e=this.beans,t=e.gridOptionsService,n=e.rangeService,i=n.getCellRanges(),r=i.length;if(this.rangeCount<1||r<1)return!1;var o=Ui(i),a=this.cellCtrl.getCellPosition(),s=t.get("enableFillHandle")&&!this.cellCtrl.isSuppressFillHandle(),l=t.get("enableRangeHandle"),u=1===r&&!this.cellCtrl.isEditing()&&(s||l);if(this.hasChartRange){var c=1===i[0].type&&n.isCellInSpecificRange(a,i[0]);this.cellComp.addOrRemoveCssClass("ag-cell-range-chart-category",c),u=0===o.type}return u&&null!=o.endRow&&n.isContiguousRange(o)&&n.isBottomRightCell(o,a)}},{key:"addSelectionHandle",value:function(){var e=this.beans,t=e.gridOptionsService,n=Ui(e.rangeService.getCellRanges()).type,i=t.get("enableFillHandle")&&_n(n)?0:1;this.selectionHandle&&this.selectionHandle.getType()!==i&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),this.selectionHandle||(this.selectionHandle=this.beans.selectionHandleFactory.createSelectionHandle(i)),this.selectionHandle.refresh(this.cellCtrl)}},{key:"destroy",value:function(){this.beans.context.destroyBean(this.selectionHandle)}}]),e}(),lc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i){var r;return(0,a.Z)(this,n),(r=t.call(this)).cellCtrl=e,r.beans=i,r.column=e.getColumn(),r.rowNode=e.getRowNode(),r}return(0,s.Z)(n,[{key:"setupRowSpan",value:function(){var e=this;this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListener(this.beans.eventService,Er.EVENT_NEW_COLUMNS_LOADED,(function(){return e.onNewColumnsLoaded()}))}},{key:"setComp",value:function(e){this.eGui=e,this.setupColSpan(),this.setupRowSpan(),this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan()}},{key:"onNewColumnsLoaded",value:function(){var e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this.applyRowSpan(!0))}},{key:"onDisplayColumnsChanged",value:function(){var e=this.getColSpanningList();ji(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}},{key:"setupColSpan",value:function(){null!=this.column.getColDef().colSpan&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListener(this.beans.eventService,Er.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayColumnsChanged.bind(this)),this.addManagedListener(this.beans.eventService,Er.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onWidthChanged.bind(this)))}},{key:"onWidthChanged",value:function(){if(this.eGui){var e=this.getCellWidth();this.eGui.style.width="".concat(e,"px")}}},{key:"getCellWidth",value:function(){return this.colsSpanning?this.colsSpanning.reduce((function(e,t){return e+t.getActualWidth()}),0):this.column.getActualWidth()}},{key:"getColSpanningList",value:function(){var e=this.column.getColSpan(this.rowNode),t=[];if(1===e)t.push(this.column);else for(var n=this.column,i=this.column.getPinned(),r=0;n&&r<e&&(t.push(n),(n=this.beans.columnModel.getDisplayedColAfter(n))&&!_n(n))&&i===n.getPinned();r++);return t}},{key:"onLeftChanged",value:function(){if(this.eGui){var e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eGui.style.left=e+"px"}}},{key:"getCellLeft",value:function(){return(this.beans.gridOptionsService.get("enableRtl")&&this.colsSpanning?Ui(this.colsSpanning):this.column).getLeft()}},{key:"modifyLeftForPrintLayout",value:function(e){if(!this.cellCtrl.isPrintLayout()||"left"===this.column.getPinned())return e;var t=this.beans.columnModel.getDisplayedColumnsLeftWidth();return"right"===this.column.getPinned()?t+this.beans.columnModel.getBodyContainerWidth()+(e||0):t+(e||0)}},{key:"applyRowSpan",value:function(e){if(1!==this.rowSpan||e){var t=this.beans.gridOptionsService.getRowHeightAsNumber()*this.rowSpan;this.eGui.style.height="".concat(t,"px"),this.eGui.style.zIndex="1"}}},{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}}]),n}(kr),uc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i){var r;return(0,a.Z)(this,n),(r=t.call(this)).staticClasses=[],r.cellCtrl=e,r.beans=i,r.column=e.getColumn(),r.rowNode=e.getRowNode(),r}return(0,s.Z)(n,[{key:"setComp",value:function(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}},{key:"applyCellClassRules",value:function(){var e=this,t=this.column.getColDef(),n=t.cellClassRules,i=this.beans.gridOptionsService.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:t,column:this.column,rowIndex:this.rowNode.rowIndex});this.beans.stylingService.processClassRules(n===this.cellClassRules?void 0:this.cellClassRules,n,i,(function(t){return e.cellComp.addOrRemoveCssClass(t,!0)}),(function(t){return e.cellComp.addOrRemoveCssClass(t,!1)})),this.cellClassRules=n}},{key:"applyUserStyles",value:function(){var e=this.column.getColDef();if(e.cellStyle){var t;if("function"===typeof e.cellStyle){var n=this.beans.gridOptionsService.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)(n)}else t=e.cellStyle;t&&this.cellComp.setUserStyles(t)}}},{key:"applyClassesFromColDef",value:function(){var e=this,t=this.column.getColDef(),n=this.beans.gridOptionsService.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,column:this.column,colDef:t,rowIndex:this.rowNode.rowIndex});this.staticClasses.length&&this.staticClasses.forEach((function(t){return e.cellComp.addOrRemoveCssClass(t,!1)})),this.staticClasses=this.beans.stylingService.getStaticCellClasses(t,n),this.staticClasses.length&&this.staticClasses.forEach((function(t){return e.cellComp.addOrRemoveCssClass(t,!0)}))}},{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}}]),n}(kr),cc=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"postConstruct",value:function(){this.gridOptionsService.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.gridOptionsService.isRowModelType("serverSide")&&(this.serverSideRowModel=this.rowModel)}}]),e}();Mn([Di("resizeObserverService")],cc.prototype,"resizeObserverService",2),Mn([Di("paginationProxy")],cc.prototype,"paginationProxy",2),Mn([Di("context")],cc.prototype,"context",2),Mn([Di("columnApi")],cc.prototype,"columnApi",2),Mn([Di("gridApi")],cc.prototype,"gridApi",2),Mn([Di("gridOptionsService")],cc.prototype,"gridOptionsService",2),Mn([Di("expressionService")],cc.prototype,"expressionService",2),Mn([Di("environment")],cc.prototype,"environment",2),Mn([Di("rowRenderer")],cc.prototype,"rowRenderer",2),Mn([Di("templateService")],cc.prototype,"templateService",2),Mn([Di("valueService")],cc.prototype,"valueService",2),Mn([Di("eventService")],cc.prototype,"eventService",2),Mn([Di("columnModel")],cc.prototype,"columnModel",2),Mn([Di("headerNavigationService")],cc.prototype,"headerNavigationService",2),Mn([Di("navigationService")],cc.prototype,"navigationService",2),Mn([Di("columnAnimationService")],cc.prototype,"columnAnimationService",2),Mn([Ti("rangeService")],cc.prototype,"rangeService",2),Mn([Di("focusService")],cc.prototype,"focusService",2),Mn([Di("popupService")],cc.prototype,"popupService",2),Mn([Di("valueFormatterService")],cc.prototype,"valueFormatterService",2),Mn([Di("stylingService")],cc.prototype,"stylingService",2),Mn([Di("columnHoverService")],cc.prototype,"columnHoverService",2),Mn([Di("userComponentFactory")],cc.prototype,"userComponentFactory",2),Mn([Di("userComponentRegistry")],cc.prototype,"userComponentRegistry",2),Mn([Di("animationFrameService")],cc.prototype,"animationFrameService",2),Mn([Di("dragService")],cc.prototype,"dragService",2),Mn([Di("dragAndDropService")],cc.prototype,"dragAndDropService",2),Mn([Di("sortController")],cc.prototype,"sortController",2),Mn([Di("filterManager")],cc.prototype,"filterManager",2),Mn([Di("rowContainerHeightService")],cc.prototype,"rowContainerHeightService",2),Mn([Di("frameworkOverrides")],cc.prototype,"frameworkOverrides",2),Mn([Di("cellPositionUtils")],cc.prototype,"cellPositionUtils",2),Mn([Di("rowPositionUtils")],cc.prototype,"rowPositionUtils",2),Mn([Di("selectionService")],cc.prototype,"selectionService",2),Mn([Ti("selectionHandleFactory")],cc.prototype,"selectionHandleFactory",2),Mn([Di("rowCssClassCalculator")],cc.prototype,"rowCssClassCalculator",2),Mn([Di("rowModel")],cc.prototype,"rowModel",2),Mn([Di("ctrlsService")],cc.prototype,"ctrlsService",2),Mn([Di("ctrlsFactory")],cc.prototype,"ctrlsFactory",2),Mn([Di("agStackComponentsRegistry")],cc.prototype,"agStackComponentsRegistry",2),Mn([Di("valueCache")],cc.prototype,"valueCache",2),Mn([Di("rowNodeEventThrottle")],cc.prototype,"rowNodeEventThrottle",2),Mn([Di("localeService")],cc.prototype,"localeService",2),Mn([Di("valueParserService")],cc.prototype,"valueParserService",2),Mn([Di("syncService")],cc.prototype,"syncService",2),Mn([Di("ariaAnnouncementService")],cc.prototype,"ariaAnnouncementService",2),Mn([Ei],cc.prototype,"postConstruct",1);var dc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r){var o;return(0,a.Z)(this,n),(o=t.call(this)).cellCtrl=e,o.beans=i,o.column=r,o}return(0,s.Z)(n,[{key:"onMouseEvent",value:function(e,t){if(!hr(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)}}},{key:"onCellClicked",value:function(e){var t=this;if(this.isDoubleClickOnIPad())return this.onCellDoubleClicked(e),void e.preventDefault();var n=this.beans,i=n.eventService,r=n.rangeService,o=n.gridOptionsService,a=e.ctrlKey||e.metaKey;r&&a&&r.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&r.intersectLastRange(!0);var s=this.cellCtrl.createEvent(e,Er.EVENT_CELL_CLICKED);i.dispatchEvent(s);var l=this.column.getColDef();l.onCellClicked&&window.setTimeout((function(){t.beans.frameworkOverrides.wrapOutgoing((function(){l.onCellClicked(s)}))}),0),!((o.get("singleClickEdit")||l.singleClickEdit)&&!o.get("suppressClickEdit"))||e.shiftKey&&0!=(null==r?void 0:r.getCellRanges().length)||this.cellCtrl.startRowOrCellEdit()}},{key:"isDoubleClickOnIPad",value:function(){if(!Yo()||pr("dblclick"))return!1;var e=(new Date).getTime(),t=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,t}},{key:"onCellDoubleClicked",value:function(e){var t=this,n=this.column.getColDef(),i=this.cellCtrl.createEvent(e,Er.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(i),"function"===typeof n.onCellDoubleClicked&&window.setTimeout((function(){t.beans.frameworkOverrides.wrapOutgoing((function(){n.onCellDoubleClicked(i)}))}),0),!this.beans.gridOptionsService.get("singleClickEdit")&&!this.beans.gridOptionsService.get("suppressClickEdit")&&this.cellCtrl.startRowOrCellEdit(null,e)}},{key:"onMouseDown",value:function(e){var t=e.ctrlKey,n=e.metaKey,i=e.shiftKey,r=e.target,o=this.cellCtrl,a=this.beans,s=a.eventService,l=a.rangeService,u=a.focusService;if(!this.isRightClickInExistingRange(e)){var c=l&&0!=l.getCellRanges().length;if(!i||!c){var d=Wo()&&!o.isEditing()&&!wa(r);o.focusCell(d)}if(i&&c&&!u.isCellFocused(o.getCellPosition())){e.preventDefault();var h=u.getFocusedCell();if(h){var p=h.column,f=h.rowIndex,v=h.rowPinned,g=a.rowRenderer.getRowByPosition({rowIndex:f,rowPinned:v}),m=null==g?void 0:g.getCellCtrl(p);(null==m?void 0:m.isEditing())&&m.stopEditing(),u.setFocusedCell({column:p,rowIndex:f,rowPinned:v,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!this.containsWidget(r)){if(l){var y=this.cellCtrl.getCellPosition();if(i)l.extendLatestRangeToCell(y);else{var C=t||n;l.setRangeToCell(y,C)}}s.dispatchEvent(this.cellCtrl.createEvent(e,Er.EVENT_CELL_MOUSE_DOWN))}}}},{key:"isRightClickInExistingRange",value:function(e){var t=this.beans.rangeService;if(t){var n=t.isCellInAnyRange(this.cellCtrl.getCellPosition()),i=2===e.button||e.ctrlKey&&this.beans.gridOptionsService.get("allowContextMenuWithControlKey");if(n&&i)return!0}return!1}},{key:"containsWidget",value:function(e){return xa(e,"ag-selection-checkbox",3)}},{key:"onMouseOut",value:function(e){if(!this.mouseStayingInsideCell(e)){var t=this.cellCtrl.createEvent(e,Er.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.clearMouseOver()}}},{key:"onMouseOver",value:function(e){if(!this.mouseStayingInsideCell(e)){var t=this.cellCtrl.createEvent(e,Er.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.setMouseOver([this.column])}}},{key:"mouseStayingInsideCell",value:function(e){if(!e.target||!e.relatedTarget)return!1;var t=this.cellCtrl.getGui(),n=t.contains(e.target),i=t.contains(e.relatedTarget);return n&&i}},{key:"destroy",value:function(){}}]),n}(cc=Mn([Ri("beans")],cc)),hc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r,o,s){var l;return(0,a.Z)(this,n),(l=t.call(this)).cellCtrl=e,l.beans=i,l.rowNode=o,l.rowCtrl=s,l}return(0,s.Z)(n,[{key:"setComp",value:function(e){this.eGui=e}},{key:"onKeyDown",value:function(e){var t=e.key;switch(t){case hs.ENTER:this.onEnterKeyDown(e);break;case hs.F2:this.onF2KeyDown(e);break;case hs.ESCAPE:this.onEscapeKeyDown(e);break;case hs.TAB:this.onTabKeyDown(e);break;case hs.BACKSPACE:case hs.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case hs.DOWN:case hs.UP:case hs.RIGHT:case hs.LEFT:this.onNavigationKeyDown(e,t)}}},{key:"onNavigationKeyDown",value:function(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())}},{key:"onShiftRangeSelect",value:function(e){if(this.beans.rangeService){var t=this.beans.rangeService.extendLatestRangeInDirection(e);t&&this.beans.navigationService.ensureCellVisible(t)}}},{key:"onTabKeyDown",value:function(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)}},{key:"onBackspaceOrDeleteKeyDown",value:function(e,t){var n=this.cellCtrl,i=this.beans,r=this.rowNode,o=i.gridOptionsService,a=i.rangeService,s=i.eventService;n.isEditing()||(s.dispatchEvent({type:Er.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),ms(e,o.get("enableCellEditingOnBackspace"))?a&&o.get("enableRangeSelection")?a.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"}):n.isCellEditable()&&r.setDataValue(n.getColumn(),null,"cellClear"):n.startRowOrCellEdit(e,t),s.dispatchEvent({type:Er.EVENT_KEY_SHORTCUT_CHANGED_CELL_END}))}},{key:"onEnterKeyDown",value:function(e){if(this.cellCtrl.isEditing()||this.rowCtrl.isEditing())this.cellCtrl.stopEditingAndFocus(!1,e.shiftKey);else if(this.beans.gridOptionsService.get("enterNavigatesVertically")){var t=e.shiftKey?hs.UP:hs.DOWN;this.beans.navigationService.navigateToNextCell(null,t,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(hs.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault()}},{key:"onF2KeyDown",value:function(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(hs.F2,e)}},{key:"onEscapeKeyDown",value:function(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))}},{key:"processCharacter",value:function(e){if(!(e.target!==this.eGui)&&!this.cellCtrl.isEditing()){var t=e.key;" "===t?this.onSpaceKeyDown(e):(this.cellCtrl.startRowOrCellEdit(t,e),e.preventDefault())}}},{key:"onSpaceKeyDown",value:function(e){var t=this.beans.gridOptionsService;if(!this.cellCtrl.isEditing()&&t.isRowSelection()){var n=this.rowNode.isSelected(),i=!n;if(i||!t.get("suppressRowDeselection")){var r=this.beans.gridOptionsService.get("groupSelectsFiltered"),o=this.rowNode.setSelectedParams({newValue:i,rangeSelect:e.shiftKey,groupSelectsFiltered:r,event:e,source:"spaceKey"});void 0===n&&0===o&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:r,event:e,source:"spaceKey"})}}e.preventDefault()}},{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}}]),n}(kr),pc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r){var o;return(0,a.Z)(this,n),(o=t.call(this,'<div class="ag-drag-handle ag-row-drag" draggable="true"></div>')).rowNode=e,o.column=i,o.eCell=r,o}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.getGui().appendChild(cs("rowDrag",this.gridOptionsService,null)),this.addGuiEventListener("mousedown",(function(e){e.stopPropagation()})),this.addDragSource(),this.checkVisibility()}},{key:"addDragSource",value:function(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}},{key:"onDragStart",value:function(e){var t=this,n=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0);n?n(this.gridOptionsService.addGridCommonParams({rowNode:this.rowNode,dragEvent:e})):function(){try{var n=JSON.stringify(t.rowNode.data);e.dataTransfer.setData("application/json",n),e.dataTransfer.setData("text/plain",n)}catch(je){}}()}},{key:"checkVisibility",value:function(){var e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}}]),n}(Ns);Mn([Ei],pc.prototype,"postConstruct",1);var fc=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,null,[{key:"getHeaderClassesFromColDef",value:function(e,t,n,i){return _n(e)?[]:this.getColumnClassesFromCollDef(e.headerClass,e,t,n,i)}},{key:"getToolPanelClassesFromColDef",value:function(e,t,n,i){return _n(e)?[]:this.getColumnClassesFromCollDef(e.toolPanelClass,e,t,n,i)}},{key:"refreshFirstAndLastStyles",value:function(e,t,n){e.addOrRemoveCssClass("ag-column-first",n.isColumnAtEdge(t,"first")),e.addOrRemoveCssClass("ag-column-last",n.isColumnAtEdge(t,"last"))}},{key:"getClassParams",value:function(e,t,n,i){return t.addGridCommonParams({colDef:e,column:n,columnGroup:i})}},{key:"getColumnClassesFromCollDef",value:function(e,t,n,i,r){if(_n(e))return[];var a;"function"===typeof e?a=e(this.getClassParams(t,n,i,r)):a=e;return"string"===typeof a?[a]:Array.isArray(a)?(0,o.Z)(a):[]}}]),e}(),vc=0,gc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r,o){var s;return(0,a.Z)(this,n),(s=t.call(this)).cellRangeFeature=null,s.cellPositionFeature=null,s.cellCustomStyleFeature=null,s.tooltipFeature=null,s.cellMouseListenerFeature=null,s.cellKeyboardListenerFeature=null,s.suppressRefreshCell=!1,s.onCellCompAttachedFuncs=[],s.column=e,s.rowNode=i,s.beans=r,s.rowCtrl=o,s.instanceId=e.getId()+"-"+vc++,s.colIdSanitised=Lr(s.column.getId()),r.gridOptionsService.get("suppressCellFocus")||(s.tabIndex=-1),s.createCellPosition(),s.addFeatures(),s.updateAndFormatValue(!1),s}return(0,s.Z)(n,[{key:"shouldRestoreFocus",value:function(){return this.beans.focusService.shouldRestoreFocus(this.cellPosition)}},{key:"addFeatures",value:function(){var e=this;this.cellPositionFeature=new lc(this,this.beans),this.addDestroyFunc((function(){var t;null==(t=e.cellPositionFeature)||t.destroy(),e.cellPositionFeature=null})),this.cellCustomStyleFeature=new uc(this,this.beans),this.addDestroyFunc((function(){var t;null==(t=e.cellCustomStyleFeature)||t.destroy(),e.cellCustomStyleFeature=null})),this.cellMouseListenerFeature=new dc(this,this.beans,this.column),this.addDestroyFunc((function(){var t;null==(t=e.cellMouseListenerFeature)||t.destroy(),e.cellMouseListenerFeature=null})),this.cellKeyboardListenerFeature=new hc(this,this.beans,this.column,this.rowNode,this.rowCtrl),this.addDestroyFunc((function(){var t;null==(t=e.cellKeyboardListenerFeature)||t.destroy(),e.cellKeyboardListenerFeature=null})),this.column.isTooltipEnabled()&&(this.enableTooltipFeature(),this.addDestroyFunc((function(){e.disableTooltipFeature()}))),this.beans.rangeService&&this.beans.gridOptionsService.get("enableRangeSelection")&&(this.cellRangeFeature=new sc(this.beans,this),this.addDestroyFunc((function(){var t;null==(t=e.cellRangeFeature)||t.destroy(),e.cellRangeFeature=null})))}},{key:"enableTooltipFeature",value:function(e,t){var n=this,i="whenTruncated"===this.beans.gridOptionsService.get("tooltipShowMode");t||!i||this.isCellRenderer()||(t=function(){var e=n.getGui(),t=0===e.children.length?e:e.querySelector(".ag-cell-value");return!t||t.scrollWidth>t.clientWidth});var r={getColumn:function(){return n.column},getColDef:function(){return n.column.getColDef()},getRowIndex:function(){return n.cellPosition.rowIndex},getRowNode:function(){return n.rowNode},getGui:function(){return n.getGui()},getLocation:function(){return"cell"},getTooltipValue:null!=e?function(){return e}:function(){var e=n.column.getColDef(),t=n.rowNode.data;if(e.tooltipField&&Fn(t))return $n(t,e.tooltipField,n.column.isTooltipFieldContainsDots());var i=e.tooltipValueGetter;return i?i(n.beans.gridOptionsService.addGridCommonParams({location:"cell",colDef:n.column.getColDef(),column:n.column,rowIndex:n.cellPosition.rowIndex,node:n.rowNode,data:n.rowNode.data,value:n.value,valueFormatted:n.valueFormatted})):null},getValueFormatted:function(){return n.valueFormatted},shouldDisplayTooltip:t};this.tooltipFeature=new Ps(r,this.beans)}},{key:"disableTooltipFeature",value:function(){this.tooltipFeature&&(this.tooltipFeature.destroy(),this.tooltipFeature=null)}},{key:"setComp",value:function(e,t,n,i,r){var o,a,s,l;this.cellComp=e,this.eGui=t,this.printLayout=i,this.addDomData(),this.onCellFocused(this.focusEventToRestore),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(n),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),null==(o=this.cellPositionFeature)||o.setComp(t),null==(a=this.cellCustomStyleFeature)||a.setComp(e),null==(s=this.tooltipFeature)||s.refreshToolTip(),null==(l=this.cellKeyboardListenerFeature)||l.setComp(this.eGui),this.cellRangeFeature&&this.cellRangeFeature.setComp(e,t),r&&this.isCellEditable()?this.startEditing():this.showValue(),this.onCellCompAttachedFuncs.length&&(this.onCellCompAttachedFuncs.forEach((function(e){return e()})),this.onCellCompAttachedFuncs=[])}},{key:"setupAutoHeight",value:function(e){var t=this;if(this.isAutoHeight=this.column.isAutoHeight(),this.isAutoHeight&&e){var n=e.parentElement,i=this.beans.gridOptionsService.getRowHeightForNode(this.rowNode).height,r=function r(o){if(!t.editing&&t.isAlive()){var a=Ra(n),s=a.paddingTop+a.paddingBottom+a.borderBottomWidth+a.borderTopWidth,l=e.offsetHeight+s;if(o<5){var u=t.beans.gridOptionsService.getDocument();if(!u||!u.contains(e)||0==l)return void window.setTimeout((function(){return r(o+1)}),0)}var c=Math.max(l,i);t.rowNode.setRowAutoHeight(c,t.column)}},o=function(){return r(0)};o();var a=this.beans.resizeObserverService.observeResize(e,o);this.addDestroyFunc((function(){a(),t.rowNode.setRowAutoHeight(void 0,t.column)}))}}},{key:"getCellAriaRole",value:function(){var e;return null!=(e=this.column.getColDef().cellAriaRole)?e:"gridcell"}},{key:"getInstanceId",value:function(){return this.instanceId}},{key:"getIncludeSelection",value:function(){return this.includeSelection}},{key:"getIncludeRowDrag",value:function(){return this.includeRowDrag}},{key:"getIncludeDndSource",value:function(){return this.includeDndSource}},{key:"getColumnIdSanitised",value:function(){return this.colIdSanitised}},{key:"getTabIndex",value:function(){return this.tabIndex}},{key:"isCellRenderer",value:function(){var e=this.column.getColDef();return null!=e.cellRenderer||null!=e.cellRendererSelector}},{key:"getValueToDisplay",value:function(){return null!=this.valueFormatted?this.valueFormatted:this.value}},{key:"showValue",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.getValueToDisplay();if(this.isCellRenderer()){var i=this.createCellRendererParams();e=this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(),i)}this.cellComp.setRenderDetails(e,n,t),this.refreshHandle()}},{key:"setupControlComps",value:function(){var e=this.column.getColDef();this.includeSelection=this.isIncludeControl(e.checkboxSelection),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)}},{key:"isForceWrapper",value:function(){return this.beans.gridOptionsService.get("enableCellTextSelection")||this.column.isAutoHeight()}},{key:"isIncludeControl",value:function(e){return!(null!=this.rowNode.rowPinned)&&("function"===typeof e||!0===e)}},{key:"refreshShouldDestroy",value:function(){var e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(e.checkboxSelection),n=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),i=this.includeDndSource!=this.isIncludeControl(e.dndSource);return t||n||i}},{key:"startEditing",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(this.isCellEditable()&&!this.editing)if(this.cellComp){var r=this.createCellEditorParams(t,n),o=this.column.getColDef(),a=this.beans.userComponentFactory.getCellEditorDetails(o,r);this.editCompDetails=a;var s=null!=(null==a?void 0:a.popupFromSelector)?a.popupFromSelector:!!o.cellEditorPopup,l=null!=(null==a?void 0:a.popupPositionFromSelector)?a.popupPositionFromSelector:o.cellEditorPopupPosition;this.setEditing(!0),this.cellComp.setEditDetails(a,s,l,this.beans.gridOptionsService.get("reactiveCustomComponents"));var u=this.createEvent(i,Er.EVENT_CELL_EDITING_STARTED);this.beans.eventService.dispatchEvent(u)}else this.onCellCompAttachedFuncs.push((function(){e.startEditing(t,n,i)}))}},{key:"setEditing",value:function(e){this.editing!==e&&(this.editing=e,this.refreshHandle())}},{key:"stopRowOrCellEdit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];"fullRow"===this.beans.gridOptionsService.get("editType")?this.rowCtrl.stopEditing(e):this.stopEditing(e)}},{key:"onPopupEditorClosed",value:function(){this.isEditing()&&this.stopEditingAndFocus()}},{key:"takeValueFromCellEditor",value:function(e){var t={newValueExists:!1};if(e)return t;var n=this.cellComp.getCellEditor();return n?n.isCancelAfterEnd&&n.isCancelAfterEnd()?t:{newValue:n.getValue(),newValueExists:!0}:t}},{key:"saveNewValue",value:function(e,t){if(t===e)return!1;this.suppressRefreshCell=!0;var n=this.rowNode.setDataValue(this.column,t,"edit");return this.suppressRefreshCell=!1,n}},{key:"stopEditing",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.editing)return!1;var t=this.takeValueFromCellEditor(e),n=t.newValue,i=t.newValueExists,r=this.rowNode.getValueFromValueService(this.column),o=!1;return i&&(o=this.saveNewValue(r,n)),this.setEditing(!1),this.cellComp.setEditDetails(),this.editCompDetails=void 0,this.updateAndFormatValue(!1),this.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.dispatchEditingStoppedEvent(r,n,!e&&!!o),o}},{key:"dispatchEditingStoppedEvent",value:function(e,t,n){var i=On(Tn({},this.createEvent(null,Er.EVENT_CELL_EDITING_STOPPED)),{oldValue:e,newValue:t,valueChanged:n});this.beans.eventService.dispatchEvent(i)}},{key:"createCellEditorParams",value:function(e,t){return this.beans.gridOptionsService.addGridCommonParams({value:this.rowNode.getValueFromValueService(this.column),eventKey:e,column:this.column,colDef:this.column.getColDef(),rowIndex:this.getCellPosition().rowIndex,node:this.rowNode,data:this.rowNode.data,cellStartedEdit:t,onKeyDown:this.onKeyDown.bind(this),stopEditing:this.stopEditingAndFocus.bind(this),eGridCell:this.getGui(),parseValue:this.parseValue.bind(this),formatValue:this.formatValue.bind(this)})}},{key:"createCellRendererParams",value:function(){var e=this;return this.beans.gridOptionsService.addGridCommonParams({value:this.value,valueFormatted:this.valueFormatted,getValue:function(){return e.rowNode.getValueFromValueService(e.column)},setValue:function(t){return e.beans.valueService.setValue(e.rowNode,e.column,t)},formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,pinned:this.column.getPinned(),colDef:this.column.getColDef(),column:this.column,rowIndex:this.getCellPosition().rowIndex,refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.cellComp.getParentOfValue(),registerRowDragger:function(t,n,i,r){return e.registerRowDragger(t,n,r)},setTooltip:function(t,n){e.tooltipFeature&&e.disableTooltipFeature(),e.enableTooltipFeature(t,n),e.refreshToolTip()}})}},{key:"parseValue",value:function(e){return this.beans.valueParserService.parseValue(this.column,this.rowNode,e,this.getValue())}},{key:"setFocusOutOnEditor",value:function(){if(this.editing){var e=this.cellComp.getCellEditor();e&&e.focusOut&&e.focusOut()}}},{key:"setFocusInOnEditor",value:function(){if(this.editing){var e=this.cellComp.getCellEditor();e&&e.focusIn?e.focusIn():this.focusCell(!0)}}},{key:"onCellChanged",value:function(e){e.column===this.column&&this.refreshCell({})}},{key:"refreshOrDestroyCell",value:function(e){var t;this.refreshShouldDestroy()?null==(t=this.rowCtrl)||t.refreshCell(this):this.refreshCell(e)}},{key:"refreshCell",value:function(e){var t,n,i;if(!this.suppressRefreshCell&&!this.editing){var r=this.column.getColDef(),o=null!=e&&!!e.newData,a=null!=e&&!!e.suppressFlash||!!r.suppressCellFlash,s=null==r.field&&null==r.valueGetter&&null==r.showRowGroup,l=e&&e.forceRefresh||s||o,u=!!this.cellComp,c=this.updateAndFormatValue(u);if(u){if(l||c){this.showValue(o);var d=this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering();!a&&!d&&(this.beans.gridOptionsService.get("enableCellChangeFlash")||r.enableCellChangeFlash)&&this.flashCell(),null==(t=this.cellCustomStyleFeature)||t.applyUserStyles(),null==(n=this.cellCustomStyleFeature)||n.applyClassesFromColDef()}this.refreshToolTip(),null==(i=this.cellCustomStyleFeature)||i.applyCellClassRules()}}}},{key:"stopEditingAndFocus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.stopRowOrCellEdit(),this.focusCell(!0),e||this.navigateAfterEdit(t)}},{key:"navigateAfterEdit",value:function(e){if(this.beans.gridOptionsService.get("enterNavigatesVerticallyAfterEdit")){var t=e?hs.UP:hs.DOWN;this.beans.navigationService.navigateToNextCell(null,t,this.getCellPosition(),!1)}}},{key:"flashCell",value:function(e){var t,n,i=null!=(t=null==e?void 0:e.flashDuration)?t:null==e?void 0:e.flashDelay,r=null!=(n=null==e?void 0:e.fadeDuration)?n:null==e?void 0:e.fadeDelay;this.animateCell("data-changed",i,r)}},{key:"animateCell",value:function(e,t,n){var i=this;if(this.cellComp){var r="ag-cell-".concat(e),o="ag-cell-".concat(e,"-animation"),a=this.beans.gridOptionsService;t||(t=a.get("cellFlashDuration")),Fn(n)||(n=a.get("cellFadeDuration")),this.cellComp.addOrRemoveCssClass(r,!0),this.cellComp.addOrRemoveCssClass(o,!1),this.beans.frameworkOverrides.wrapIncoming((function(){window.setTimeout((function(){i.isAlive()&&(i.cellComp.addOrRemoveCssClass(r,!1),i.cellComp.addOrRemoveCssClass(o,!0),i.eGui.style.transition="background-color ".concat(n,"ms"),window.setTimeout((function(){i.isAlive()&&(i.cellComp.addOrRemoveCssClass(o,!1),i.eGui.style.transition="")}),n))}),t)}))}}},{key:"onFlashCells",value:function(e){if(this.cellComp){var t=this.beans.cellPositionUtils.createId(this.getCellPosition());e.cells[t]&&this.animateCell("highlight")}}},{key:"isCellEditable",value:function(){return this.column.isCellEditable(this.rowNode)}},{key:"isSuppressFillHandle",value:function(){return this.column.isSuppressFillHandle()}},{key:"formatValue",value:function(e){var t;return null!=(t=this.callValueFormatter(e))?t:e}},{key:"callValueFormatter",value:function(e){return this.beans.valueFormatterService.formatValue(this.column,this.rowNode,e)}},{key:"updateAndFormatValue",value:function(e){var t=this.value,n=this.valueFormatted;return this.value=this.rowNode.getValueFromValueService(this.column),this.valueFormatted=this.callValueFormatter(this.value),!e||(!this.valuesAreEqual(t,this.value)||this.valueFormatted!=n)}},{key:"valuesAreEqual",value:function(e,t){var n=this.column.getColDef();return n.equals?n.equals(e,t):e===t}},{key:"getComp",value:function(){return this.cellComp}},{key:"getValue",value:function(){return this.value}},{key:"getValueFormatted",value:function(){return this.valueFormatted}},{key:"addDomData",value:function(){var e=this,t=this.getGui();this.beans.gridOptionsService.setDomData(t,n.DOM_DATA_KEY_CELL_CTRL,this),this.addDestroyFunc((function(){return e.beans.gridOptionsService.setDomData(t,n.DOM_DATA_KEY_CELL_CTRL,null)}))}},{key:"createEvent",value:function(e,t){return this.beans.gridOptionsService.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})}},{key:"processCharacter",value:function(e){var t;null==(t=this.cellKeyboardListenerFeature)||t.processCharacter(e)}},{key:"onKeyDown",value:function(e){var t;null==(t=this.cellKeyboardListenerFeature)||t.onKeyDown(e)}},{key:"onMouseEvent",value:function(e,t){var n;null==(n=this.cellMouseListenerFeature)||n.onMouseEvent(e,t)}},{key:"getGui",value:function(){return this.eGui}},{key:"refreshToolTip",value:function(){var e;null==(e=this.tooltipFeature)||e.refreshToolTip()}},{key:"getColSpanningList",value:function(){return this.cellPositionFeature.getColSpanningList()}},{key:"onLeftChanged",value:function(){var e;this.cellComp&&(null==(e=this.cellPositionFeature)||e.onLeftChanged())}},{key:"onDisplayedColumnsChanged",value:function(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}},{key:"refreshFirstAndLastStyles",value:function(){var e=this.cellComp,t=this.column,n=this.beans;fc.refreshFirstAndLastStyles(e,t,n.columnModel)}},{key:"refreshAriaColIndex",value:function(){var e=this.beans.columnModel.getAriaColumnIndex(this.column);Ro(this.getGui(),e)}},{key:"isSuppressNavigable",value:function(){return this.column.isSuppressNavigable(this.rowNode)}},{key:"onWidthChanged",value:function(){var e;return null==(e=this.cellPositionFeature)?void 0:e.onWidthChanged()}},{key:"getColumn",value:function(){return this.column}},{key:"getRowNode",value:function(){return this.rowNode}},{key:"getBeans",value:function(){return this.beans}},{key:"isPrintLayout",value:function(){return this.printLayout}},{key:"appendChild",value:function(e){this.eGui.appendChild(e)}},{key:"refreshHandle",value:function(){this.cellRangeFeature&&this.cellRangeFeature.refreshHandle()}},{key:"getCellPosition",value:function(){return this.cellPosition}},{key:"isEditing",value:function(){return this.editing}},{key:"startRowOrCellEdit",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.cellComp?"fullRow"===this.beans.gridOptionsService.get("editType")?this.rowCtrl.startRowEditing(e,this):this.startEditing(e,!0,n):this.onCellCompAttachedFuncs.push((function(){t.startRowOrCellEdit(e,n)}))}},{key:"getRowCtrl",value:function(){return this.rowCtrl}},{key:"getRowPosition",value:function(){return{rowIndex:this.cellPosition.rowIndex,rowPinned:this.cellPosition.rowPinned}}},{key:"updateRangeBordersIfRangeCount",value:function(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.updateRangeBordersIfRangeCount()}},{key:"onRangeSelectionChanged",value:function(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()}},{key:"isRangeSelectionEnabled",value:function(){return null!=this.cellRangeFeature}},{key:"focusCell",value:function(){var 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})}},{key:"onRowIndexChanged",value:function(){this.createCellPosition(),this.onCellFocused(),this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()}},{key:"onFirstRightPinnedChanged",value:function(){if(this.cellComp){var e=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass("ag-cell-first-right-pinned",e)}}},{key:"onLastLeftPinnedChanged",value:function(){if(this.cellComp){var e=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass("ag-cell-last-left-pinned",e)}}},{key:"onCellFocused",value:function(e){if(!this.beans.gridOptionsService.get("suppressCellFocus")){var t=this.beans.focusService.isCellFocused(this.cellPosition);if(this.cellComp){if(this.focusEventToRestore=void 0,this.cellComp.addOrRemoveCssClass("ag-cell-focus",t),t&&e&&e.forceBrowserFocus)this.cellComp.getFocusableElement().focus({preventScroll:!!e.preventScrollOnBrowserFocus});var n="fullRow"===this.beans.gridOptionsService.get("editType");t||n||!this.editing||this.stopRowOrCellEdit(),t&&this.rowCtrl.announceDescription()}else t&&(null==e?void 0:e.forceBrowserFocus)&&(this.focusEventToRestore=e)}}},{key:"createCellPosition",value:function(){this.cellPosition={rowIndex:this.rowNode.rowIndex,rowPinned:In(this.rowNode.rowPinned),column:this.column}}},{key:"applyStaticCssClasses",value:function(){this.cellComp.addOrRemoveCssClass("ag-cell",!0),this.cellComp.addOrRemoveCssClass("ag-cell-not-inline-editing",!0);var e=1==this.column.isAutoHeight();this.cellComp.addOrRemoveCssClass("ag-cell-auto-height",e),this.cellComp.addOrRemoveCssClass("ag-cell-normal-height",!e)}},{key:"onColumnHover",value:function(){if(this.cellComp&&this.beans.gridOptionsService.get("columnHoverHighlight")){var e=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass("ag-column-hover",e)}}},{key:"onColDefChanged",value:function(){var e;if(this.cellComp)if(this.column.isAutoHeight()!==this.isAutoHeight&&(null==(e=this.rowCtrl)||e.refreshCell(this)),this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing){var t=this.getCellEditor();if(null==t?void 0:t.refresh){var n=this.editCompDetails.params,i=n.eventKey,r=n.cellStartedEdit,o=this.createCellEditorParams(i,r),a=this.column.getColDef(),s=this.beans.userComponentFactory.getCellEditorDetails(a,o);t.refresh(s.params)}}else this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0})}},{key:"setWrapText",value:function(){var e=1==this.column.getColDef().wrapText;this.cellComp.addOrRemoveCssClass("ag-cell-wrap-text",e)}},{key:"dispatchCellContextMenuEvent",value:function(e){var t=this,n=this.column.getColDef(),i=this.createEvent(e,Er.EVENT_CELL_CONTEXT_MENU);this.beans.eventService.dispatchEvent(i),n.onCellContextMenu&&window.setTimeout((function(){t.beans.frameworkOverrides.wrapOutgoing((function(){n.onCellContextMenu(i)}))}),0)}},{key:"getCellRenderer",value:function(){return this.cellComp?this.cellComp.getCellRenderer():null}},{key:"getCellEditor",value:function(){return this.cellComp?this.cellComp.getCellEditor():null}},{key:"destroy",value:function(){this.onCellCompAttachedFuncs=[],(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}},{key:"createSelectionCheckbox",value:function(){var e=new Kl;return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}},{key:"createDndSource",value:function(){var e=new pc(this.rowNode,this.column,this.eGui);return this.beans.context.createBean(e),e}},{key:"registerRowDragger",value:function(e,t,n){var i=this;if(this.customRowDragComp)this.customRowDragComp.setDragElement(e,t);else{var r=this.createRowDragComp(e,t,n);r&&(this.customRowDragComp=r,this.addDestroyFunc((function(){i.beans.context.destroyBean(r),i.customRowDragComp=null})))}}},{key:"createRowDragComp",value:function(e,t,n){var i=this,r=this.beans.gridOptionsService.get("pagination"),o=this.beans.gridOptionsService.get("rowDragManaged"),a=this.beans.gridOptionsService.isRowModelType("clientSide");if(o){if(!a)return void oi("managed row dragging is only allowed in the Client Side Row Model");if(r)return void oi("managed row dragging is not possible when doing pagination")}var s=new ql((function(){return i.value}),this.rowNode,this.column,e,t,n);return this.beans.context.createBean(s),s}}]),n}(kr);gc.DOM_DATA_KEY_CELL_CTRL="cellCtrl";var mc=gc,yc=0,Cc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r,o,s){var l;return(0,a.Z)(this,n),(l=t.call(this)).allRowGuis=[],l.active=!0,l.centerCellCtrls={list:[],map:{}},l.leftCellCtrls={list:[],map:{}},l.rightCellCtrls={list:[],map:{}},l.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},l.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},l.rowDragComps=[],l.lastMouseDownOnDragger=!1,l.emptyStyle={},l.updateColumnListsPending=!1,l.rowId=null,l.businessKeySanitised=null,l.beans=i,l.gridOptionsService=i.gridOptionsService,l.rowNode=e,l.paginationPage=i.paginationProxy.getCurrentPage(),l.useAnimationFrameForCreate=o,l.printLayout=s,l.suppressRowTransform=l.gridOptionsService.get("suppressRowTransform"),l.instanceId=e.id+"-"+yc++,l.rowId=Lr(e.id),l.initRowBusinessKey(),l.rowFocused=i.focusService.isRowFocused(l.rowNode.rowIndex,l.rowNode.rowPinned),l.rowLevel=i.rowCssClassCalculator.calculateRowLevel(l.rowNode),l.setRowType(),l.setAnimateFlags(r),l.rowStyles=l.processStylesFromGridOptions(),l.isFullWidth()&&!l.gridOptionsService.get("suppressCellFocus")&&(l.tabIndex=-1),l.addListeners(),l}return(0,s.Z)(n,[{key:"initRowBusinessKey",value:function(){this.businessKeyForNodeFunc=this.gridOptionsService.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}},{key:"updateRowBusinessKey",value:function(){if("function"===typeof this.businessKeyForNodeFunc){var e=this.businessKeyForNodeFunc(this.rowNode);this.businessKeySanitised=Lr(e)}}},{key:"getRowId",value:function(){return this.rowId}},{key:"getRowStyles",value:function(){return this.rowStyles}},{key:"getTabIndex",value:function(){return this.tabIndex}},{key:"isSticky",value:function(){return this.rowNode.sticky}},{key:"getBeans",value:function(){return this.beans}},{key:"getInstanceId",value:function(){return this.instanceId}},{key:"setComp",value:function(e,t,n){var i={rowComp:e,element:t,containerType:n};this.allRowGuis.push(i),"left"===n?this.leftGui=i:"right"===n?this.rightGui=i:"fullWidth"===n?this.fullWidthGui=i:this.centerGui=i,this.initialiseRowComp(i),"FullWidthLoading"===this.rowType||this.rowNode.rowPinned||this.beans.rowRenderer.dispatchFirstDataRenderedEvent()}},{key:"unsetComp",value:function(e){switch(this.allRowGuis=this.allRowGuis.filter((function(t){return t.containerType!==e})),e){case"left":this.leftGui=void 0;break;case"right":this.rightGui=void 0;break;case"fullWidth":this.fullWidthGui=void 0;break;case"center":this.centerGui=void 0}}},{key:"isCacheable",value:function(){return"FullWidthDetail"===this.rowType&&this.gridOptionsService.get("keepDetailRows")}},{key:"setCached",value:function(e){var t=e?"none":"";this.allRowGuis.forEach((function(e){return e.element.style.display=t}))}},{key:"initialiseRowComp",value:function(e){var t=this,i=this.gridOptionsService;this.listenOnDomOrder(e),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights(),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),i.isRowSelection()&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);var r=e.rowComp;this.getInitialRowClasses(e.containerType).forEach((function(e){return r.addOrRemoveCssClass(e,!0)})),this.executeSlideAndFadeAnimations(e),this.rowNode.group&&yo(e.element,1==this.rowNode.expanded),this.setRowCompRowId(r),this.setRowCompRowBusinessKey(r),i.setDomData(e.element,n.DOM_DATA_KEY_ROW_CTRL,this),this.addDestroyFunc((function(){return i.setDomData(e.element,n.DOM_DATA_KEY_ROW_CTRL,null)})),this.useAnimationFrameForCreate?this.beans.animationFrameService.createTask(this.addHoverFunctionality.bind(this,e.element),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(e.element),this.isFullWidth()&&this.setupFullWidth(e),i.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameService.addDestroyTask((function(){t.isAlive()&&e.rowComp.addOrRemoveCssClass("ag-after-created",!0)})),this.executeProcessRowPostCreateFunc()}},{key:"setRowCompRowBusinessKey",value:function(e){null!=this.businessKeySanitised&&e.setRowBusinessKey(this.businessKeySanitised)}},{key:"getBusinessKey",value:function(){return this.businessKeySanitised}},{key:"setRowCompRowId",value:function(e){this.rowId=Lr(this.rowNode.id),null!=this.rowId&&e.setRowId(this.rowId)}},{key:"executeSlideAndFadeAnimations",value:function(e){var t=this,n=e.containerType;this.slideInAnimation[n]&&(hi((function(){t.onTopChanged()})),this.slideInAnimation[n]=!1),this.fadeInAnimation[n]&&(hi((function(){e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)})),this.fadeInAnimation[n]=!1)}},{key:"addRowDraggerToRow",value:function(e){if(this.gridOptionsService.get("enableRangeSelection"))oi("Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `enableRangeSelection: true`");else{var t=this.beans.localeService.getLocaleTextFunc(),n=new ql((function(){return"1 ".concat(t("rowDragRow","row"))}),this.rowNode,void 0,e.element,void 0,!0),i=this.createBean(n,this.beans.context);this.rowDragComps.push(i)}}},{key:"setupFullWidth",value:function(e){var t=this.getPinnedForContainer(e.containerType);if("FullWidthDetail"!=this.rowType||wi.__assertRegistered("@ag-grid-enterprise/master-detail","cell renderer 'agDetailCellRenderer' (for master detail)",this.beans.context.getGridId())){var n=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(n)}}},{key:"isPrintLayout",value:function(){return this.printLayout}},{key:"getFullWidthCellRenderers",value:function(){var e,t;return this.gridOptionsService.get("embedFullWidthRows")?this.allRowGuis.map((function(e){var t;return null==(t=null==e?void 0:e.rowComp)?void 0:t.getFullWidthCellRenderer()})):[null==(t=null==(e=this.fullWidthGui)?void 0:e.rowComp)?void 0:t.getFullWidthCellRenderer()]}},{key:"getCellElement",value:function(e){var t=this.getCellCtrl(e);return t?t.getGui():null}},{key:"executeProcessRowPostCreateFunc",value:function(){var e=this.gridOptionsService.getCallback("processRowPostCreate");e&&this.areAllContainersReady()&&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)})}},{key:"areAllContainersReady",value:function(){var e=!!this.leftGui||!this.beans.columnModel.isPinningLeft(),t=!!this.centerGui,n=!!this.rightGui||!this.beans.columnModel.isPinningRight();return e&&t&&n}},{key:"setRowType",value:function(){var e=this.rowNode.stub,t=this.rowNode.isFullWidthCell(),n=this.gridOptionsService.get("masterDetail")&&this.rowNode.detail,i=this.beans.columnModel.isPivotMode(),r=!!this.rowNode.group&&!this.rowNode.footer&&this.gridOptionsService.isGroupUseEntireRow(i);this.rowType=e?"FullWidthLoading":n?"FullWidthDetail":t?"FullWidth":r?"FullWidthGroup":"Normal"}},{key:"updateColumnLists",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.isFullWidth()){var i=t||this.gridOptionsService.get("suppressAnimationFrame")||this.printLayout;i?this.updateColumnListsImpl(n):this.updateColumnListsPending||(this.beans.animationFrameService.createTask((function(){e.active&&e.updateColumnListsImpl(!0)}),this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0)}}},{key:"createCellCtrls",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r={list:[],map:{}},o=function(e,t){r.list.push(t),r.map[e]=t};return t.forEach((function(t){var i=t.getInstanceId(),r=e.map[i];r||(r=new mc(t,n.rowNode,n.beans,n)),o(i,r)})),e.list.forEach((function(e){null!=r.map[e.getColumn().getInstanceId()]||(!n.isCellEligibleToBeRemoved(e,i)?o(e.getColumn().getInstanceId(),e):e.destroy())})),r}},{key:"updateColumnListsImpl",value:function(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}},{key:"setCellCtrls",value:function(e){var t=this;this.allRowGuis.forEach((function(n){var i=t.getCellCtrlsForContainer(n.containerType);n.rowComp.setCellCtrls(i,e)}))}},{key:"getCellCtrlsForContainer",value:function(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list;default:throw new Error("Unhandled case: ".concat(e))}}},{key:"createAllCellCtrls",value:function(){var e=this.beans.columnModel;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,e.getAllDisplayedColumns()),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{var t=e.getViewportCenterColumnsForRow(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t);var n=e.getDisplayedLeftColumnsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,n,"left");var i=e.getDisplayedRightColumnsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,i,"right")}}},{key:"isCellEligibleToBeRemoved",value:function(e,t){var n=!0;if(e.getColumn().getPinned()!=t)return n;var i=e.isEditing(),r=this.beans.focusService.isCellFocused(e.getCellPosition());if(i||r){var o=e.getColumn();return!(this.beans.columnModel.getAllDisplayedColumns().indexOf(o)>=0)&&n}return n}},{key:"getDomOrder",value:function(){return this.gridOptionsService.get("ensureDomOrder")||this.gridOptionsService.isDomLayout("print")}},{key:"listenOnDomOrder",value:function(e){var t=this,n=function(){e.rowComp.setDomOrder(t.getDomOrder())};this.addManagedPropertyListener("domLayout",n),this.addManagedPropertyListener("ensureDomOrder",n)}},{key:"setAnimateFlags",value:function(e){if(!this.isSticky()&&e){var t=Fn(this.rowNode.oldRowTop),n=this.beans.columnModel.isPinningLeft(),i=this.beans.columnModel.isPinningRight();if(t){if(this.isFullWidth()&&!this.gridOptionsService.get("embedFullWidthRows"))return void(this.slideInAnimation.fullWidth=!0);this.slideInAnimation.center=!0,this.slideInAnimation.left=n,this.slideInAnimation.right=i}else{if(this.isFullWidth()&&!this.gridOptionsService.get("embedFullWidthRows"))return void(this.fadeInAnimation.fullWidth=!0);this.fadeInAnimation.center=!0,this.fadeInAnimation.left=n,this.fadeInAnimation.right=i}}}},{key:"isEditing",value:function(){return this.editingRow}},{key:"isFullWidth",value:function(){return"Normal"!==this.rowType}},{key:"getRowType",value:function(){return this.rowType}},{key:"refreshFullWidth",value:function(){var e=this,t=function(t,n){return!t||t.rowComp.refreshFullWidth((function(){return e.createFullWidthCompDetails(t.element,n).params}))},n=t(this.fullWidthGui,null),i=t(this.centerGui,null),r=t(this.leftGui,"left"),o=t(this.rightGui,"right");return n&&i&&r&&o}},{key:"addListeners",value:function(){var e=this;this.addManagedListener(this.rowNode,jl.EVENT_HEIGHT_CHANGED,(function(){return e.onRowHeightChanged()})),this.addManagedListener(this.rowNode,jl.EVENT_ROW_SELECTED,(function(){return e.onRowSelected()})),this.addManagedListener(this.rowNode,jl.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addManagedListener(this.rowNode,jl.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(this.rowNode,jl.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,jl.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this)),this.rowNode.detail&&this.addManagedListener(this.rowNode.parent,jl.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,jl.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,jl.EVENT_CELL_CHANGED,this.postProcessCss.bind(this)),this.addManagedListener(this.rowNode,jl.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this)),this.addManagedListener(this.rowNode,jl.EVENT_DRAGGING_CHANGED,this.postProcessRowDragging.bind(this)),this.addManagedListener(this.rowNode,jl.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));var t=this.beans.eventService;this.addManagedListener(t,Er.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOffsetChanged.bind(this)),this.addManagedListener(t,Er.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(t,Er.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(t,Er.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(t,Er.EVENT_CELL_FOCUSED,this.onCellFocusChanged.bind(this)),this.addManagedListener(t,Er.EVENT_CELL_FOCUS_CLEARED,this.onCellFocusChanged.bind(this)),this.addManagedListener(t,Er.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addManagedListener(t,Er.EVENT_MODEL_UPDATED,this.refreshFirstAndLastRowStyles.bind(this)),this.addManagedListener(t,Er.EVENT_COLUMN_MOVED,this.updateColumnLists.bind(this)),this.addDestroyFunc((function(){e.destroyBeans(e.rowDragComps,e.beans.context),e.tooltipFeature&&(e.tooltipFeature=e.destroyBean(e.tooltipFeature,e.beans.context))})),this.addManagedPropertyListeners(["rowDragEntireRow"],(function(){e.gridOptionsService.get("rowDragEntireRow")?e.allRowGuis.forEach((function(t){e.addRowDraggerToRow(t)})):(e.destroyBeans(e.rowDragComps,e.beans.context),e.rowDragComps=[])})),this.addListenersForCellComps()}},{key:"addListenersForCellComps",value:function(){var e=this;this.addManagedListener(this.rowNode,jl.EVENT_ROW_INDEX_CHANGED,(function(){e.getAllCellCtrls().forEach((function(e){return e.onRowIndexChanged()}))})),this.addManagedListener(this.rowNode,jl.EVENT_CELL_CHANGED,(function(t){e.getAllCellCtrls().forEach((function(e){return e.onCellChanged(t)}))}))}},{key:"onRowNodeDataChanged",value:function(e){var t=this;this.isFullWidth()!==!!this.rowNode.isFullWidthCell()?this.beans.rowRenderer.redrawRow(this.rowNode):this.isFullWidth()?this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode):(this.getAllCellCtrls().forEach((function(t){return t.refreshCell({suppressFlash:!e.update,newData:!e.update})})),this.allRowGuis.forEach((function(e){t.setRowCompRowId(e.rowComp),t.updateRowBusinessKey(),t.setRowCompRowBusinessKey(e.rowComp)})),this.onRowSelected(),this.postProcessCss())}},{key:"postProcessCss",value:function(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}},{key:"onRowNodeHighlightChanged",value:function(){var e=this.rowNode.highlighted;this.allRowGuis.forEach((function(t){var n=0===e,i=1===e;t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",n),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",i)}))}},{key:"postProcessRowDragging",value:function(){var e=this.rowNode.dragging;this.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass("ag-row-dragging",e)}))}},{key:"updateExpandedCss",value:function(){var e=this.rowNode.isExpandable(),t=1==this.rowNode.expanded;this.allRowGuis.forEach((function(n){n.rowComp.addOrRemoveCssClass("ag-row-group",e),n.rowComp.addOrRemoveCssClass("ag-row-group-expanded",e&&t),n.rowComp.addOrRemoveCssClass("ag-row-group-contracted",e&&!t),yo(n.element,e&&t)}))}},{key:"onDisplayedColumnsChanged",value:function(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()}},{key:"onVirtualColumnsChanged",value:function(){this.updateColumnLists(!1,!0)}},{key:"getRowPosition",value:function(){return{rowPinned:In(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}},{key:"onKeyboardNavigate",value:function(e){var t=this.allRowGuis.find((function(t){return t.element.contains(e.target)}));if((t?t.element:null)===e.target){var n=this.rowNode,i=this.beans.focusService.getFocusedCell(),r={rowIndex:n.rowIndex,rowPinned:n.rowPinned,column:i&&i.column};this.beans.navigationService.navigateToNextCell(e,e.key,r,!0),e.preventDefault()}}},{key:"onTabKeyDown",value:function(e){if(!e.defaultPrevented&&!hr(e)){var t=this.allRowGuis.find((function(t){return t.element.contains(e.target)})),n=t?t.element:null,i=n===e.target,r=null;i||(r=this.beans.focusService.findNextFocusableElement(n,!1,e.shiftKey)),(this.isFullWidth()&&i||!r)&&this.beans.navigationService.onTabKeyDown(this,e)}}},{key:"onFullWidthRowFocused",value:function(e){var t,n=this.rowNode,i=!!e&&(this.isFullWidth()&&e.rowIndex===n.rowIndex&&e.rowPinned==n.rowPinned),r=this.fullWidthGui?this.fullWidthGui.element:null==(t=this.centerGui)?void 0:t.element;r&&(r.classList.toggle("ag-full-width-focus",i),i&&r.focus({preventScroll:!0}))}},{key:"refreshCell",value:function(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),this.updateColumnLists()}},{key:"removeCellCtrl",value:function(e,t){var n={list:[],map:{}};return e.list.forEach((function(e){e!==t&&(n.list.push(e),n.map[e.getInstanceId()]=e)})),n}},{key:"onMouseEvent",value:function(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t)}}},{key:"createRowEvent",value:function(e,t){return this.gridOptionsService.addGridCommonParams({type:e,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,event:t})}},{key:"createRowEventWithSource",value:function(e,t){var n=this.createRowEvent(e,t);return n.source=this,n}},{key:"onRowDblClick",value:function(e){if(!hr(e)){var t=this.createRowEventWithSource(Er.EVENT_ROW_DOUBLE_CLICKED,e);this.beans.eventService.dispatchEvent(t)}}},{key:"onRowMouseDown",value:function(e){if(this.lastMouseDownOnDragger=xa(e.target,"ag-row-drag",3),this.isFullWidth()){var t=this.rowNode,n=this.beans.columnModel;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges(),this.beans.focusService.setFocusedCell({rowIndex:t.rowIndex,column:n.getAllDisplayedColumns()[0],rowPinned:t.rowPinned,forceBrowserFocus:!0})}}},{key:"onRowClick",value:function(e){if(!(hr(e)||this.lastMouseDownOnDragger)){var t=this.createRowEventWithSource(Er.EVENT_ROW_CLICKED,e);this.beans.eventService.dispatchEvent(t);var n=e.ctrlKey||e.metaKey,i=e.shiftKey;if(!(this.gridOptionsService.get("groupSelectsChildren")&&this.rowNode.group||this.isRowSelectionBlocked()||this.gridOptionsService.get("suppressRowClickSelection"))){var r=this.gridOptionsService.get("rowMultiSelectWithClick"),o=!this.gridOptionsService.get("suppressRowDeselection"),a="rowClicked";if(this.rowNode.isSelected())r?this.rowNode.setSelectedParams({newValue:!1,event:e,source:a}):n?o&&this.rowNode.setSelectedParams({newValue:!1,event:e,source:a}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!i,rangeSelect:i,event:e,source:a});else{var s=!r&&!n;this.rowNode.setSelectedParams({newValue:!0,clearSelection:s,rangeSelect:i,event:e,source:a})}}}}},{key:"isRowSelectionBlocked",value:function(){return!this.rowNode.selectable||!!this.rowNode.rowPinned||!this.gridOptionsService.isRowSelection()}},{key:"setupDetailRowAutoHeight",value:function(e){var t=this;if("FullWidthDetail"===this.rowType&&this.gridOptionsService.get("detailRowAutoHeight")){var n=function(){var n=e.clientHeight;if(null!=n&&n>0){window.setTimeout((function(){t.rowNode.setRowHeight(n),t.beans.clientSideRowModel?t.beans.clientSideRowModel.onRowHeightChanged():t.beans.serverSideRowModel&&t.beans.serverSideRowModel.onRowHeightChanged()}),0)}},i=this.beans.resizeObserverService.observeResize(e,n);this.addDestroyFunc(i),n()}}},{key:"createFullWidthCompDetails",value:function(e,t){var n=this,i=this.gridOptionsService.addGridCommonParams({fullWidth:!0,data:this.rowNode.data,node:this.rowNode,value:this.rowNode.key,valueFormatted:this.rowNode.key,rowIndex:this.rowNode.rowIndex,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:function(e,t,i,r){return n.addFullWidthRowDragging(e,t,i,r)},setTooltip:function(e,t){return n.refreshRowTooltip(e,t)}});switch(this.rowType){case"FullWidthDetail":return this.beans.userComponentFactory.getFullWidthDetailCellRendererDetails(i);case"FullWidthGroup":return this.beans.userComponentFactory.getFullWidthGroupCellRendererDetails(i);case"FullWidthLoading":return this.beans.userComponentFactory.getFullWidthLoadingCellRendererDetails(i);default:return this.beans.userComponentFactory.getFullWidthCellRendererDetails(i)}}},{key:"refreshRowTooltip",value:function(e,t){var n=this;if(this.fullWidthGui){var i={getGui:function(){return n.fullWidthGui.element},getTooltipValue:function(){return e},getLocation:function(){return"fullWidthRow"},shouldDisplayTooltip:t};this.tooltipFeature&&this.destroyBean(this.tooltipFeature,this.beans.context),this.tooltipFeature=this.createBean(new Ps(i,this.beans))}}},{key:"addFullWidthRowDragging",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;if(this.isFullWidth()){var o=new ql((function(){return i}),this.rowNode,void 0,e,t,r);this.createBean(o,this.beans.context),this.addDestroyFunc((function(){n.destroyBean(o,n.beans.context)}))}}},{key:"onUiLevelChanged",value:function(){var e=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=e){var t="ag-row-level-"+e,n="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach((function(e){e.rowComp.addOrRemoveCssClass(t,!0),e.rowComp.addOrRemoveCssClass(n,!1)}))}this.rowLevel=e}},{key:"isFirstRowOnPage",value:function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow()}},{key:"isLastRowOnPage",value:function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow()}},{key:"refreshFirstAndLastRowStyles",value:function(){var e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass("ag-row-first",e)}))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass("ag-row-last",t)})))}},{key:"stopEditing",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.stoppingRowEdit){var t=this.getAllCellCtrls(),n=this.editingRow;this.stoppingRowEdit=!0;var i,r=!1,o=(0,g.Z)(t);try{for(o.s();!(i=o.n()).done;){var a=i.value,s=a.stopEditing(e);n&&!e&&!r&&s&&(r=!0)}}catch(u){o.e(u)}finally{o.f()}if(r){var l=this.createRowEvent(Er.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(l)}n&&this.setEditingRow(!1),this.stoppingRowEdit=!1}}},{key:"setInlineEditingCss",value:function(e){this.allRowGuis.forEach((function(t){t.rowComp.addOrRemoveCssClass("ag-row-inline-editing",e),t.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!e)}))}},{key:"setEditingRow",value:function(e){this.editingRow=e,this.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass("ag-row-editing",e)}));var t=e?this.createRowEvent(Er.EVENT_ROW_EDITING_STARTED):this.createRowEvent(Er.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(t)}},{key:"startRowEditing",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!this.editingRow){var i=this.getAllCellCtrls().reduce((function(i,r){var o=r===t;return o?r.startEditing(e,o,n):r.startEditing(null,o,n),!!i||r.isEditing()}),!1);i&&this.setEditingRow(!0)}}},{key:"getAllCellCtrls",value:function(){return 0===this.leftCellCtrls.list.length&&0===this.rightCellCtrls.list.length?this.centerCellCtrls.list:[].concat((0,o.Z)(this.centerCellCtrls.list),(0,o.Z)(this.leftCellCtrls.list),(0,o.Z)(this.rightCellCtrls.list))}},{key:"postProcessClassesFromGridOptions",value:function(){var e=this,t=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);t&&t.length&&t.forEach((function(t){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass(t,!0)}))}))}},{key:"postProcessRowClassRules",value:function(){var e=this;this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,(function(t){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass(t,!0)}))}),(function(t){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass(t,!1)}))}))}},{key:"setStylesFromGridOptions",value:function(e,t){var n=this;e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,(function(e){return e.rowComp.setUserStyles(n.rowStyles)}))}},{key:"getPinnedForContainer",value:function(e){return"left"===e?"left":"right"===e?"right":null}},{key:"getInitialRowClasses",value:function(e){var t=this.getPinnedForContainer(e),n={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(n)}},{key:"processStylesFromGridOptions",value:function(){var e=this.gridOptionsService.get("rowStyle");if(!e||"function"!==typeof e){var t,n=this.gridOptionsService.getCallback("getRowStyle");if(n)t=n({data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex});return t||e?Object.assign({},e,t):this.emptyStyle}console.warn("AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead")}},{key:"onRowSelected",value:function(e){var t=this,n=this.beans.gridOptionsService.getDocument(),i=!!this.rowNode.isSelected();this.forEachGui(e,(function(e){e.rowComp.addOrRemoveCssClass("ag-row-selected",i),Po(e.element,i),!e.element.contains(n.activeElement)||e!==t.centerGui&&e!==t.fullWidthGui||t.announceDescription()}))}},{key:"announceDescription",value:function(){if(!this.isRowSelectionBlocked()){var e=this.rowNode.isSelected();if(!e||!this.beans.gridOptionsService.get("suppressRowDeselection")){var t=this.beans.localeService.getLocaleTextFunc()(e?"ariaRowDeselect":"ariaRowSelect","Press SPACE to ".concat(e?"deselect":"select"," this row."));this.beans.ariaAnnouncementService.announceValue(t)}}}},{key:"isUseAnimationFrameForCreate",value:function(){return this.useAnimationFrameForCreate}},{key:"addHoverFunctionality",value:function(e){var t=this;this.active&&(this.addManagedListener(e,"mouseenter",(function(){return t.rowNode.onMouseEnter()})),this.addManagedListener(e,"mouseleave",(function(){return t.rowNode.onMouseLeave()})),this.addManagedListener(this.rowNode,jl.EVENT_MOUSE_ENTER,(function(){t.beans.dragService.isDragging()||t.gridOptionsService.get("suppressRowHoverHighlight")||(e.classList.add("ag-row-hover"),t.rowNode.setHovered(!0))})),this.addManagedListener(this.rowNode,jl.EVENT_MOUSE_LEAVE,(function(){e.classList.remove("ag-row-hover"),t.rowNode.setHovered(!1)})))}},{key:"roundRowTopToBounds",value:function(e){var t=this.beans.ctrlsService.getGridBodyCtrl().getScrollFeature().getApproximateVScollPosition(),n=this.applyPaginationOffset(t.top,!0)-100,i=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(n,e),i)}},{key:"getFrameworkOverrides",value:function(){return this.beans.frameworkOverrides}},{key:"forEachGui",value:function(e,t){e?t(e):this.allRowGuis.forEach(t)}},{key:"onRowHeightChanged",value:function(e){if(null!=this.rowNode.rowHeight){var t=this.rowNode.rowHeight,n=this.beans.environment.getDefaultRowHeight(),i=this.gridOptionsService.isGetRowHeightFunction()?this.gridOptionsService.getRowHeightForNode(this.rowNode).height:void 0,r=i?"".concat(Math.min(n,i)-2,"px"):void 0;this.forEachGui(e,(function(e){e.element.style.height="".concat(t,"px"),r&&e.element.style.setProperty("--ag-line-height",r)}))}}},{key:"addEventListener",value:function(e,t){(0,mn.Z)((0,yn.Z)(n.prototype),"addEventListener",this).call(this,e,t)}},{key:"removeEventListener",value:function(e,t){(0,mn.Z)((0,yn.Z)(n.prototype),"removeEventListener",this).call(this,e,t)}},{key:"destroyFirstPass",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.active=!1,!e&&this.gridOptionsService.isAnimateRows()&&!this.isSticky()){var t=null!=this.rowNode.rowTop;if(t){var i=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(i)}else this.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0)}))}this.rowNode.setHovered(!1);var r=this.createRowEvent(Er.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(r),this.beans.eventService.dispatchEvent(r),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}},{key:"destroySecondPass",value:function(){this.allRowGuis.length=0,this.stopEditing();var e=function(e){return e.list.forEach((function(e){return e.destroy()})),{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}},{key:"setFocusedClasses",value:function(e){var t=this;this.forEachGui(e,(function(e){e.rowComp.addOrRemoveCssClass("ag-row-focus",t.rowFocused),e.rowComp.addOrRemoveCssClass("ag-row-no-focus",!t.rowFocused)}))}},{key:"onCellFocusChanged",value:function(){var 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)}},{key:"onPaginationChanged",value:function(){var e=this.beans.paginationProxy.getCurrentPage();this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}},{key:"onTopChanged",value:function(){this.setRowTop(this.rowNode.rowTop)}},{key:"onPaginationPixelOffsetChanged",value:function(){this.onTopChanged()}},{key:"applyPaginationOffset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;var n=this.beans.paginationProxy.getPixelOffset(),i=t?1:-1;return e+n*i}},{key:"setRowTop",value:function(e){if(!this.printLayout&&Fn(e)){var t=this.applyPaginationOffset(e),n=this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeightService.getRealPixelPosition(t),i="".concat(n,"px");this.setRowTopStyle(i)}}},{key:"getInitialRowTop",value:function(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}},{key:"getInitialTransform",value:function(e){return this.suppressRowTransform?void 0:"translateY(".concat(this.getInitialRowTopShared(e),")")}},{key:"getInitialRowTopShared",value:function(e){if(this.printLayout)return"";var t;if(this.isSticky())t=this.rowNode.stickyRowTop;else{var n=this.slideInAnimation[e]?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,i=this.applyPaginationOffset(n);t=this.rowNode.isRowPinned()?i:this.beans.rowContainerHeightService.getRealPixelPosition(i)}return t+"px"}},{key:"setRowTopStyle",value:function(e){var t=this;this.allRowGuis.forEach((function(n){return t.suppressRowTransform?n.rowComp.setTop(e):n.rowComp.setTransform("translateY(".concat(e,")"))}))}},{key:"getRowNode",value:function(){return this.rowNode}},{key:"getCellCtrl",value:function(e){var t=null;return this.getAllCellCtrls().forEach((function(n){n.getColumn()==e&&(t=n)})),null!=t||this.getAllCellCtrls().forEach((function(n){n.getColSpanningList().indexOf(e)>=0&&(t=n)})),t}},{key:"onRowIndexChanged",value:function(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}},{key:"getRowIndex",value:function(){return this.rowNode.getRowIndexString()}},{key:"updateRowIndexes",value:function(e){var t=this.rowNode.getRowIndexString(),n=this.beans.headerNavigationService.getHeaderRowCount()+this.beans.filterManager.getHeaderRowCount(),i=this.rowNode.rowIndex%2===0,r=n+this.rowNode.rowIndex+1;this.forEachGui(e,(function(e){e.rowComp.setRowIndex(t),e.rowComp.addOrRemoveCssClass("ag-row-even",i),e.rowComp.addOrRemoveCssClass("ag-row-odd",!i),Eo(e.element,r)}))}}]),n}(kr);Cc.DOM_DATA_KEY_ROW_CTRL="renderedRow";var kc=Cc,wc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).element=e,i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()}},{key:"addKeyboardListeners",value:function(){var e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedListener(this.element,e,t)}},{key:"addMouseListeners",value:function(){var e=this;["dblclick","contextmenu","mouseover","mouseout","click",pr("touchstart")?"touchstart":"mousedown"].forEach((function(t){var n=e.processMouseEvent.bind(e,t);e.addManagedListener(e.element,t,n)}))}},{key:"processMouseEvent",value:function(e,t){if(this.mouseEventService.isEventFromThisGrid(t)&&!hr(t)){var n=this.getRowForEvent(t),i=this.mouseEventService.getRenderedCellForEvent(t);"contextmenu"===e?this.handleContextMenuMouseEvent(t,void 0,n,i):(i&&i.onMouseEvent(e,t),n&&n.onMouseEvent(e,t))}}},{key:"mockContextMenuForIPad",value:function(){var e=this;if(Yo()){var t=new Ol(this.element);this.addManagedListener(t,Ol.EVENT_LONG_TAP,(function(t){var n=e.getRowForEvent(t.touchEvent),i=e.mouseEventService.getRenderedCellForEvent(t.touchEvent);e.handleContextMenuMouseEvent(void 0,t.touchEvent,n,i)})),this.addDestroyFunc((function(){return t.destroy()}))}}},{key:"getRowForEvent",value:function(e){for(var t=e.target;t;){var n=this.gridOptionsService.getDomData(t,kc.DOM_DATA_KEY_ROW_CTRL);if(n)return n;t=t.parentElement}return null}},{key:"handleContextMenuMouseEvent",value:function(e,t,n,i){var r=n?n.getRowNode():null,o=i?i.getColumn():null,a=null;if(o){var s=e||t;i.dispatchCellContextMenuEvent(null!=s?s:null),a=this.valueService.getValue(o,r)}var l=this.ctrlsService.getGridBodyCtrl(),u=i?i.getGui():l.getGridBodyElement();this.menuService.showContextMenu({mouseEvent:e,touchEvent:t,rowNode:r,column:o,value:a,anchorToElement:u})}},{key:"getControlsForEventTarget",value:function(e){return{cellCtrl:fr(this.gridOptionsService,e,mc.DOM_DATA_KEY_CELL_CTRL),rowCtrl:fr(this.gridOptionsService,e,kc.DOM_DATA_KEY_ROW_CTRL)}}},{key:"processKeyboardEvent",value:function(e,t){var n=this.getControlsForEventTarget(t.target),i=n.cellCtrl,r=n.rowCtrl;t.defaultPrevented||(i?this.processCellKeyboardEvent(i,e,t):r&&r.isFullWidth()&&this.processFullWidthRowKeyboardEvent(r,e,t))}},{key:"processCellKeyboardEvent",value:function(e,t,n){var i=e.getRowNode(),r=e.getColumn(),o=e.isEditing();fs(this.gridOptionsService,n,i,r,o)||"keydown"===t&&(!o&&this.navigationService.handlePageScrollingKey(n)||e.onKeyDown(n),this.doGridOperations(n,e.isEditing()),ps(n)&&e.processCharacter(n));if("keydown"===t){var a=e.createEvent(n,Er.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(a)}}},{key:"processFullWidthRowKeyboardEvent",value:function(e,t,n){var i=e.getRowNode(),r=this.focusService.getFocusedCell(),o=r&&r.column;if(!fs(this.gridOptionsService,n,i,o,!1)){var a=n.key;if("keydown"===t)switch(a){case hs.PAGE_HOME:case hs.PAGE_END:case hs.PAGE_UP:case hs.PAGE_DOWN:this.navigationService.handlePageScrollingKey(n,!0);break;case hs.UP:case hs.DOWN:e.onKeyboardNavigate(n);break;case hs.TAB:e.onTabKeyDown(n)}}if("keydown"===t){var s=e.createRowEvent(Er.EVENT_CELL_KEY_DOWN,n);this.eventService.dispatchEvent(s)}}},{key:"doGridOperations",value:function(e,t){if((e.ctrlKey||e.metaKey)&&!t&&this.mouseEventService.isEventFromThisGrid(e)){var n=gs(e);return n===hs.A?this.onCtrlAndA(e):n===hs.C?this.onCtrlAndC(e):n===hs.D?this.onCtrlAndD(e):n===hs.V?this.onCtrlAndV(e):n===hs.X?this.onCtrlAndX(e):n===hs.Y?this.onCtrlAndY():n===hs.Z?this.onCtrlAndZ(e):void 0}}},{key:"onCtrlAndA",value:function(e){var t=this.pinnedRowModel,n=this.paginationProxy,i=this.rangeService;if(i&&n.isRowsToRender()){var r,o,a=[t.isEmpty("top"),t.isEmpty("bottom")],s=a[0]?null:"top";a[1]?(r=null,o=this.paginationProxy.getRowCount()-1):(r="bottom",o=t.getPinnedBottomRowData().length-1);var l=this.columnModel.getAllDisplayedColumns();if(Gn(l))return;i.setCellRange({rowStartIndex:0,rowStartPinned:s,rowEndIndex:o,rowEndPinned:r,columnStart:l[0],columnEnd:Ui(l)})}e.preventDefault()}},{key:"onCtrlAndC",value:function(e){if(this.clipboardService&&!this.gridOptionsService.get("enableCellTextSelection")){var t=this.getControlsForEventTarget(e.target),n=t.cellCtrl,i=t.rowCtrl;(null==n?void 0:n.isEditing())||(null==i?void 0:i.isEditing())||(e.preventDefault(),this.clipboardService.copyToClipboard())}}},{key:"onCtrlAndX",value:function(e){if(this.clipboardService&&!this.gridOptionsService.get("enableCellTextSelection")&&!this.gridOptionsService.get("suppressCutToClipboard")){var t=this.getControlsForEventTarget(e.target),n=t.cellCtrl,i=t.rowCtrl;(null==n?void 0:n.isEditing())||(null==i?void 0:i.isEditing())||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}}},{key:"onCtrlAndV",value:function(e){var t=this.getControlsForEventTarget(e.target),n=t.cellCtrl,i=t.rowCtrl;(null==n?void 0:n.isEditing())||(null==i?void 0:i.isEditing())||this.clipboardService&&!this.gridOptionsService.get("suppressClipboardPaste")&&this.clipboardService.pasteFromClipboard()}},{key:"onCtrlAndD",value:function(e){this.clipboardService&&!this.gridOptionsService.get("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault()}},{key:"onCtrlAndZ",value:function(e){this.gridOptionsService.get("undoRedoCellEditing")&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))}},{key:"onCtrlAndY",value:function(){this.undoRedoService.redo("ui")}}]),n}(kr);Mn([Di("mouseEventService")],wc.prototype,"mouseEventService",2),Mn([Di("valueService")],wc.prototype,"valueService",2),Mn([Di("menuService")],wc.prototype,"menuService",2),Mn([Di("ctrlsService")],wc.prototype,"ctrlsService",2),Mn([Di("navigationService")],wc.prototype,"navigationService",2),Mn([Di("focusService")],wc.prototype,"focusService",2),Mn([Di("undoRedoService")],wc.prototype,"undoRedoService",2),Mn([Di("columnModel")],wc.prototype,"columnModel",2),Mn([Di("paginationProxy")],wc.prototype,"paginationProxy",2),Mn([Di("pinnedRowModel")],wc.prototype,"pinnedRowModel",2),Mn([Ti("rangeService")],wc.prototype,"rangeService",2),Mn([Ti("clipboardService")],wc.prototype,"clipboardService",2),Mn([Ei],wc.prototype,"postConstruct",1);var Sc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).centerContainerCtrl=e,i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.ctrlsService.whenReady((function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl(),e.listenForResize()})),this.addManagedListener(this.eventService,Er.EVENT_SCROLLBAR_WIDTH_CHANGED,this.onScrollbarWidthChanged.bind(this)),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],(function(){e.checkViewportAndScrolls()}))}},{key:"listenForResize",value:function(){var e=this,t=function(){return e.onCenterViewportResized()};this.centerContainerCtrl.registerViewportResizeListener(t),this.gridBodyCtrl.registerBodyViewportResizeListener(t)}},{key:"onScrollbarWidthChanged",value:function(){this.checkViewportAndScrolls()}},{key:"onCenterViewportResized",value:function(){if(this.centerContainerCtrl.isViewportInTheDOMTree()){this.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();var e=this.centerContainerCtrl.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnModel.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}},{key:"keepPinnedColumnsNarrowerThanViewport",value:function(){var e=Ta(this.gridBodyCtrl.getBodyViewportElement());if(!(e<=50)){var t=this.getPinnedColumnsOverflowingViewport(e-50),n=this.gridOptionsService.getCallback("processUnpinnedColumns");if(t.length){if(n)t=n({columns:t,viewportWidth:e});this.columnModel.setColumnsPinned(t,null,"viewportSizeFeature")}}}},{key:"getPinnedColumnsOverflowingViewport",value:function(e){var t=this.pinnedWidthService.getPinnedRightWidth()+this.pinnedWidthService.getPinnedLeftWidth();if(t<e)return[];for(var n=(0,o.Z)(this.columnModel.getDisplayedLeftColumns()),i=(0,o.Z)(this.columnModel.getDisplayedRightColumns()),r=0,a=0,s=[],l=t-0-e;(a<n.length||r<i.length)&&l>0;){if(r<i.length){var u=i[r++];l-=u.getActualWidth(),s.push(u)}if(a<n.length&&l>0){var c=n[a++];l-=c.getActualWidth(),s.push(c)}}return s}},{key:"checkViewportAndScrolls",value:function(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()}},{key:"getBodyHeight",value:function(){return this.bodyHeight}},{key:"checkBodyHeight",value:function(){var e=Da(this.gridBodyCtrl.getBodyViewportElement());if(this.bodyHeight!==e){this.bodyHeight=e;var t={type:Er.EVENT_BODY_HEIGHT_CHANGED};this.eventService.dispatchEvent(t)}}},{key:"updateScrollVisibleService",value:function(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}},{key:"updateScrollVisibleServiceImpl",value:function(){var e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e)}},{key:"isHorizontalScrollShowing",value:function(){return this.centerContainerCtrl.isHorizontalScrollShowing()}},{key:"onHorizontalViewportChanged",value:function(){var e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.columnModel.setViewportPosition(e,t)}}]),n}(kr);Mn([Di("ctrlsService")],Sc.prototype,"ctrlsService",2),Mn([Di("pinnedWidthService")],Sc.prototype,"pinnedWidthService",2),Mn([Di("columnModel")],Sc.prototype,"columnModel",2),Mn([Di("scrollVisibleService")],Sc.prototype,"scrollVisibleService",2),Mn([Ei],Sc.prototype,"postConstruct",1);var bc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).element=e,i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.addManagedListener(this.eventService,Er.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this))}},{key:"onPinnedLeftWidthChanged",value:function(){var e=this.pinnedWidthService.getPinnedLeftWidth(),t=e>0;Sa(this.element,t),Ka(this.element,e)}},{key:"getWidth",value:function(){return this.pinnedWidthService.getPinnedLeftWidth()}}]),n}(kr);Mn([Di("pinnedWidthService")],bc.prototype,"pinnedWidthService",2),Mn([Ei],bc.prototype,"postConstruct",1);var Ec=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).element=e,i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.addManagedListener(this.eventService,Er.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this))}},{key:"onPinnedRightWidthChanged",value:function(){var e=this.pinnedWidthService.getPinnedRightWidth(),t=e>0;Sa(this.element,t),Ka(this.element,e)}},{key:"getWidth",value:function(){return this.pinnedWidthService.getPinnedRightWidth()}}]),n}(kr);Mn([Di("pinnedWidthService")],Ec.prototype,"pinnedWidthService",2),Mn([Ei],Ec.prototype,"postConstruct",1);var xc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i){var r;return(0,a.Z)(this,n),(r=t.call(this)).eContainer=e,r.eViewport=i,r}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.addManagedListener(this.eventService,Er.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onHeightChanged.bind(this))}},{key:"onHeightChanged",value:function(){var e=this.maxDivHeightScaler.getUiContainerHeight(),t=null!=e?"".concat(e,"px"):"";this.eContainer.style.height=t,this.eViewport&&(this.eViewport.style.height=t)}}]),n}(kr);Mn([Di("rowContainerHeightService")],xc.prototype,"maxDivHeightScaler",2),Mn([Ei],xc.prototype,"postConstruct",1);var Rc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).eContainer=e,i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;_n(this.rangeService)||(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.addManagedPropertyListener("enableRangeSelection",(function(t){t.currentValue?e.enableFeature():e.disableFeature()})),this.addDestroyFunc((function(){return e.disableFeature()})),this.gridOptionsService.get("enableRangeSelection")&&this.enableFeature())}},{key:"enableFeature",value:function(){this.dragService.addDragSource(this.params)}},{key:"disableFeature",value:function(){this.dragService.removeDragSource(this.params)}}]),n}(kr);Mn([Ti("rangeService")],Rc.prototype,"rangeService",2),Mn([Di("dragService")],Rc.prototype,"dragService",2),Mn([Ei],Rc.prototype,"postConstruct",1);var Dc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,a.Z)(this,n),(i=t.call(this)).callback=e,i.addSpacer=r,i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,Er.EVENT_LEFT_PINNED_WIDTH_CHANGED,e),this.addSpacer&&(this.addManagedListener(this.eventService,Er.EVENT_RIGHT_PINNED_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,Er.EVENT_SCROLL_VISIBILITY_CHANGED,e),this.addManagedListener(this.eventService,Er.EVENT_SCROLLBAR_WIDTH_CHANGED,e)),this.setWidth()}},{key:"setWidth",value:function(){var e,t=this.columnModel,n=this.gridOptionsService.isDomLayout("print"),i=t.getBodyContainerWidth(),r=t.getDisplayedColumnsLeftWidth(),o=t.getDisplayedColumnsRightWidth();n?e=i+r+o:(e=i,this.addSpacer&&0===(this.gridOptionsService.get("enableRtl")?r:o)&&this.scrollVisibleService.isVerticalScrollShowing()&&(e+=this.gridOptionsService.getScrollbarWidth()));this.callback(e)}}]),n}(kr);Mn([Di("columnModel")],Dc.prototype,"columnModel",2),Mn([Di("scrollVisibleService")],Dc.prototype,"scrollVisibleService",2),Mn([Ei],Dc.prototype,"postConstruct",1);var Tc=function(e){return e.LEFT="left",e.RIGHT="right",e.CENTER="center",e.FULL_WIDTH="fullWidth",e.TOP_LEFT="topLeft",e.TOP_RIGHT="topRight",e.TOP_CENTER="topCenter",e.TOP_FULL_WIDTH="topFullWidth",e.STICKY_TOP_LEFT="stickyTopLeft",e.STICKY_TOP_RIGHT="stickyTopRight",e.STICKY_TOP_CENTER="stickyTopCenter",e.STICKY_TOP_FULL_WIDTH="stickyTopFullWidth",e.BOTTOM_LEFT="bottomLeft",e.BOTTOM_RIGHT="bottomRight",e.BOTTOM_CENTER="bottomCenter",e.BOTTOM_FULL_WIDTH="bottomFullWidth",e}(Tc||{});function Oc(e){switch(e){case"center":case"topCenter":case"stickyTopCenter":case"bottomCenter":return"center";case"left":case"topLeft":case"stickyTopLeft":case"bottomLeft":return"left";case"right":case"topRight":case"stickyTopRight":case"bottomRight":return"right";case"fullWidth":case"topFullWidth":case"stickyTopFullWidth":case"bottomFullWidth":return"fullWidth";default:throw Error("Invalid Row Container Type")}}var Pc=Gr([["center","ag-center-cols-container"],["left","ag-pinned-left-cols-container"],["right","ag-pinned-right-cols-container"],["fullWidth","ag-full-width-container"],["topCenter","ag-floating-top-container"],["topLeft","ag-pinned-left-floating-top"],["topRight","ag-pinned-right-floating-top"],["topFullWidth","ag-floating-top-full-width-container"],["stickyTopCenter","ag-sticky-top-container"],["stickyTopLeft","ag-pinned-left-sticky-top"],["stickyTopRight","ag-pinned-right-sticky-top"],["stickyTopFullWidth","ag-sticky-top-full-width-container"],["bottomCenter","ag-floating-bottom-container"],["bottomLeft","ag-pinned-left-floating-bottom"],["bottomRight","ag-pinned-right-floating-bottom"],["bottomFullWidth","ag-floating-bottom-full-width-container"]]),Ac=Gr([["center","ag-center-cols-viewport"],["topCenter","ag-floating-top-viewport"],["stickyTopCenter","ag-sticky-top-viewport"],["bottomCenter","ag-floating-bottom-viewport"]]),Mc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).visible=!0,i.EMPTY_CTRLS=[],i.name=e,i.isFullWithContainer="topFullWidth"===i.name||"stickyTopFullWidth"===i.name||"bottomFullWidth"===i.name||"fullWidth"===i.name,i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.enableRtl=this.gridOptionsService.get("enableRtl"),this.forContainers(["center"],(function(){return e.viewportSizeFeature=e.createManagedBean(new Sc(e))}))}},{key:"registerWithCtrlsService",value:function(){switch(this.name){case"center":this.ctrlsService.registerCenterRowContainerCtrl(this);break;case"left":this.ctrlsService.registerLeftRowContainerCtrl(this);break;case"right":this.ctrlsService.registerRightRowContainerCtrl(this);break;case"topCenter":this.ctrlsService.registerTopCenterRowContainerCtrl(this);break;case"topLeft":this.ctrlsService.registerTopLeftRowContainerCon(this);break;case"topRight":this.ctrlsService.registerTopRightRowContainerCtrl(this);break;case"stickyTopCenter":this.ctrlsService.registerStickyTopCenterRowContainerCtrl(this);break;case"stickyTopLeft":this.ctrlsService.registerStickyTopLeftRowContainerCon(this);break;case"stickyTopRight":this.ctrlsService.registerStickyTopRightRowContainerCtrl(this);break;case"bottomCenter":this.ctrlsService.registerBottomCenterRowContainerCtrl(this);break;case"bottomLeft":this.ctrlsService.registerBottomLeftRowContainerCtrl(this);break;case"bottomRight":this.ctrlsService.registerBottomRightRowContainerCtrl(this)}}},{key:"forContainers",value:function(e,t){e.indexOf(this.name)>=0&&t()}},{key:"getContainerElement",value:function(){return this.eContainer}},{key:"getViewportSizeFeature",value:function(){return this.viewportSizeFeature}},{key:"setComp",value:function(e,t,n){var i=this;this.comp=e,this.eContainer=t,this.eViewport=n,this.createManagedBean(new wc(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder(),this.stopHScrollOnPinnedRows();var r=[].concat(["topCenter","topLeft","topRight"],["bottomCenter","bottomLeft","bottomRight"],["center","left","right"],["stickyTopCenter","stickyTopLeft","stickyTopRight"]);this.forContainers(["left","bottomLeft","topLeft","stickyTopLeft"],(function(){i.pinnedWidthFeature=i.createManagedBean(new bc(i.eContainer)),i.addManagedListener(i.eventService,Er.EVENT_LEFT_PINNED_WIDTH_CHANGED,(function(){return i.onPinnedWidthChanged()}))})),this.forContainers(["right","bottomRight","topRight","stickyTopRight"],(function(){i.pinnedWidthFeature=i.createManagedBean(new Ec(i.eContainer)),i.addManagedListener(i.eventService,Er.EVENT_RIGHT_PINNED_WIDTH_CHANGED,(function(){return i.onPinnedWidthChanged()}))})),this.forContainers(["center","left","right","fullWidth"],(function(){return i.createManagedBean(new xc(i.eContainer,"center"===i.name?n:void 0))})),this.forContainers(r,(function(){return i.createManagedBean(new Rc(i.eContainer))})),this.forContainers(["center","topCenter","stickyTopCenter","bottomCenter"],(function(){return i.createManagedBean(new Dc((function(e){return i.comp.setContainerWidth("".concat(e,"px"))})))})),this.addListeners(),this.registerWithCtrlsService()}},{key:"addListeners",value:function(){var e=this;this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_CHANGED,(function(){return e.onDisplayedColumnsChanged()})),this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,(function(){return e.onDisplayedColumnsWidthChanged()})),this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_ROWS_CHANGED,(function(t){return e.onDisplayedRowsChanged(t.afterScroll)})),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()}},{key:"listenOnDomOrder",value:function(){var e=this;if(["stickyTopCenter","stickyTopLeft","stickyTopRight","stickyTopFullWidth"].indexOf(this.name)>=0)this.comp.setDomOrder(!0);else{var t=function(){var t=e.gridOptionsService.get("ensureDomOrder"),n=e.gridOptionsService.isDomLayout("print");e.comp.setDomOrder(t||n)};this.addManagedPropertyListener("domLayout",t),t()}}},{key:"stopHScrollOnPinnedRows",value:function(){var e=this;this.forContainers(["topCenter","stickyTopCenter","bottomCenter"],(function(){e.addManagedListener(e.eViewport,"scroll",(function(){return e.eViewport.scrollLeft=0}))}))}},{key:"onDisplayedColumnsChanged",value:function(){var e=this;this.forContainers(["center"],(function(){return e.onHorizontalViewportChanged()}))}},{key:"onDisplayedColumnsWidthChanged",value:function(){var e=this;this.forContainers(["center"],(function(){return e.onHorizontalViewportChanged()}))}},{key:"addPreventScrollWhileDragging",value:function(){var e=this,t=function(t){e.dragService.isDragging()&&t.cancelable&&t.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc((function(){return e.eContainer.removeEventListener("touchmove",t)}))}},{key:"onHorizontalViewportChanged",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.getCenterWidth(),n=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(t,n,e)}},{key:"getCenterWidth",value:function(){return Ta(this.eViewport)}},{key:"getCenterViewportScrollLeft",value:function(){return Na(this.eViewport,this.enableRtl)}},{key:"registerViewportResizeListener",value:function(e){var t=this.resizeObserverService.observeResize(this.eViewport,e);this.addDestroyFunc((function(){return t()}))}},{key:"isViewportInTheDOMTree",value:function(){return _a(this.eViewport)}},{key:"getViewportScrollLeft",value:function(){return Na(this.eViewport,this.enableRtl)}},{key:"isHorizontalScrollShowing",value:function(){return this.gridOptionsService.get("alwaysShowHorizontalScroll")||za(this.eViewport)}},{key:"getViewportElement",value:function(){return this.eViewport}},{key:"setContainerTranslateX",value:function(e){this.eContainer.style.transform="translateX(".concat(e,"px)")}},{key:"getHScrollPosition",value:function(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}},{key:"setCenterViewportScrollLeft",value:function(e){La(this.eViewport,e,this.enableRtl)}},{key:"isContainerVisible",value:function(){return!n.getPinned(this.name)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}},{key:"onPinnedWidthChanged",value:function(){var e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}},{key:"onDisplayedRowsChanged",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.visible){var n=this.gridOptionsService.isDomLayout("print"),i=this.gridOptionsService.get("embedFullWidthRows"),r=i||n,o=this.getRowCtrls().filter((function(t){var n=t.isFullWidth();return e.isFullWithContainer?!r&&n:r||!n}));this.comp.setRowCtrls({rowCtrls:o,useFlushSync:t})}else this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS})}},{key:"getRowCtrls",value:function(){switch(this.name){case"topCenter":case"topLeft":case"topRight":case"topFullWidth":return this.rowRenderer.getTopRowCtrls();case"stickyTopCenter":case"stickyTopLeft":case"stickyTopRight":case"stickyTopFullWidth":return this.rowRenderer.getStickyTopRowCtrls();case"bottomCenter":case"bottomLeft":case"bottomRight":case"bottomFullWidth":return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getCentreRowCtrls()}}}],[{key:"getRowContainerCssClasses",value:function(e){return{container:Pc.get(e),viewport:Ac.get(e)}}},{key:"getPinned",value:function(e){switch(e){case"bottomLeft":case"topLeft":case"stickyTopLeft":case"left":return"left";case"bottomRight":case"topRight":case"stickyTopRight":case"right":return"right";default:return null}}}]),n}(kr);Mn([Di("dragService")],Mc.prototype,"dragService",2),Mn([Di("ctrlsService")],Mc.prototype,"ctrlsService",2),Mn([Di("columnModel")],Mc.prototype,"columnModel",2),Mn([Di("resizeObserverService")],Mc.prototype,"resizeObserverService",2),Mn([Di("rowRenderer")],Mc.prototype,"rowRenderer",2),Mn([Ei],Mc.prototype,"postConstruct",1);var Nc=Mc,Lc='<div class="ag-root ag-unselectable" role="treegrid">\n        <ag-header-root ref="gridHeader"></ag-header-root>\n        <div class="ag-floating-top" ref="eTop" role="presentation">\n            <ag-row-container ref="topLeftContainer" name="'.concat("topLeft",'"></ag-row-container>\n            <ag-row-container ref="topCenterContainer" name="',"topCenter",'"></ag-row-container>\n            <ag-row-container ref="topRightContainer" name="',"topRight",'"></ag-row-container>\n            <ag-row-container ref="topFullWidthContainer" name="',"topFullWidth",'"></ag-row-container>\n        </div>\n        <div class="ag-body" ref="eBody" role="presentation">\n            <div class="ag-body-viewport" ref="eBodyViewport" role="presentation">\n                <ag-row-container ref="leftContainer" name="',"left",'"></ag-row-container>\n                <ag-row-container ref="centerContainer" name="',"center",'"></ag-row-container>\n                <ag-row-container ref="rightContainer" name="',"right",'"></ag-row-container>\n                <ag-row-container ref="fullWidthContainer" name="',"fullWidth",'"></ag-row-container>\n            </div>\n            <ag-fake-vertical-scroll></ag-fake-vertical-scroll>\n        </div>\n        <div class="ag-sticky-top" ref="eStickyTop" role="presentation">\n            <ag-row-container ref="stickyTopLeftContainer" name="',"stickyTopLeft",'"></ag-row-container>\n            <ag-row-container ref="stickyTopCenterContainer" name="',"stickyTopCenter",'"></ag-row-container>\n            <ag-row-container ref="stickyTopRightContainer" name="',"stickyTopRight",'"></ag-row-container>\n            <ag-row-container ref="stickyTopFullWidthContainer" name="',"stickyTopFullWidth",'"></ag-row-container>\n        </div>\n        <div class="ag-floating-bottom" ref="eBottom" role="presentation">\n            <ag-row-container ref="bottomLeftContainer" name="',"bottomLeft",'"></ag-row-container>\n            <ag-row-container ref="bottomCenterContainer" name="',"bottomCenter",'"></ag-row-container>\n            <ag-row-container ref="bottomRightContainer" name="',"bottomRight",'"></ag-row-container>\n            <ag-row-container ref="bottomFullWidthContainer" name="',"bottomFullWidth",'"></ag-row-container>\n        </div>\n        <ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>\n        <ag-overlay-wrapper></ag-overlay-wrapper>\n    </div>'),Ic=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,Lc)}return(0,s.Z)(n,[{key:"init",value:function(){var e=this,t=function(e,t){var n="".concat(e,"px");t.style.minHeight=n,t.style.height=n},n={setRowAnimationCssOnBodyViewport:function(t,n){return e.setRowAnimationCssOnBodyViewport(t,n)},setColumnCount:function(t){return xo(e.getGui(),t)},setRowCount:function(t){return bo(e.getGui(),t)},setTopHeight:function(n){return t(n,e.eTop)},setBottomHeight:function(n){return t(n,e.eBottom)},setTopDisplay:function(t){return e.eTop.style.display=t},setBottomDisplay:function(t){return e.eBottom.style.display=t},setStickyTopHeight:function(t){return e.eStickyTop.style.height=t},setStickyTopTop:function(t){return e.eStickyTop.style.top=t},setStickyTopWidth:function(t){return e.eStickyTop.style.width=t},setColumnMovingCss:function(t,n){return e.addOrRemoveCssClass(t,n)},updateLayoutClasses:function(t,n){[e.eBodyViewport.classList,e.eBody.classList].forEach((function(e){e.toggle("ag-layout-auto-height",n.autoHeight),e.toggle("ag-layout-normal",n.normal),e.toggle("ag-layout-print",n.print)})),e.addOrRemoveCssClass("ag-layout-auto-height",n.autoHeight),e.addOrRemoveCssClass("ag-layout-normal",n.normal),e.addOrRemoveCssClass("ag-layout-print",n.print)},setAlwaysVerticalScrollClass:function(t,n){return e.eBodyViewport.classList.toggle(ic,n)},registerBodyViewportResizeListener:function(t){var n=e.resizeObserverService.observeResize(e.eBodyViewport,t);e.addDestroyFunc((function(){return n()}))},setPinnedTopBottomOverflowY:function(t){return e.eTop.style.overflowY=e.eBottom.style.overflowY=t},setCellSelectableCss:function(t,n){[e.eTop,e.eBodyViewport,e.eBottom].forEach((function(e){return e.classList.toggle(t,n)}))},setBodyViewportWidth:function(t){return e.eBodyViewport.style.width=t}};this.ctrl=this.createManagedBean(new oc),this.ctrl.setComp(n,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop),(this.rangeService&&this.gridOptionsService.get("enableRangeSelection")||"multiple"===this.gridOptionsService.get("rowSelection"))&&So(this.getGui(),!0)}},{key:"setRowAnimationCssOnBodyViewport",value:function(e,t){var n=this.eBodyViewport.classList;n.toggle("ag-row-animation",t),n.toggle("ag-row-no-animation",!t)}},{key:"getFloatingTopBottom",value:function(){return[this.eTop,this.eBottom]}}]),n}(Ns);Mn([Di("resizeObserverService")],Ic.prototype,"resizeObserverService",2),Mn([Ti("rangeService")],Ic.prototype,"rangeService",2),Mn([Ls("eBodyViewport")],Ic.prototype,"eBodyViewport",2),Mn([Ls("eStickyTop")],Ic.prototype,"eStickyTop",2),Mn([Ls("eTop")],Ic.prototype,"eTop",2),Mn([Ls("eBottom")],Ic.prototype,"eBottom",2),Mn([Ls("gridHeader")],Ic.prototype,"headerRootComp",2),Mn([Ls("eBody")],Ic.prototype,"eBody",2),Mn([Ei],Ic.prototype,"init",1);var Fc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this))}},{key:"onDisplayedColumnsChanged",value:function(){this.update()}},{key:"onDisplayedColumnsWidthChanged",value:function(){this.update()}},{key:"update",value:function(){var e=this;this.columnAnimationService.isActive()?this.columnAnimationService.executeLaterVMTurn((function(){e.columnAnimationService.executeLaterVMTurn((function(){return e.updateImpl()}))})):this.updateImpl()}},{key:"updateImpl",value:function(){var e=this.ctrlsService.getCenterRowContainerCtrl();if(e&&!this.columnAnimationService.isActive()){var t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(t)}}},{key:"setScrollsVisible",value:function(e){if(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing){this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing;var t={type:Er.EVENT_SCROLL_VISIBILITY_CHANGED};this.eventService.dispatchEvent(t)}}},{key:"isHorizontalScrollShowing",value:function(){return this.horizontalScrollShowing}},{key:"isVerticalScrollShowing",value:function(){return this.verticalScrollShowing}}]),n}(kr);Mn([Di("ctrlsService")],Fc.prototype,"ctrlsService",2),Mn([Di("columnAnimationService")],Fc.prototype,"columnAnimationService",2),Mn([Ei],Fc.prototype,"postConstruct",1),Fc=Mn([Ri("scrollVisibleService")],Fc);var _c=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).gridInstanceId=_c.gridInstanceSequence.next(),e}return(0,s.Z)(n,[{key:"stampTopLevelGridCompWithGridInstance",value:function(e){e[_c.GRID_DOM_KEY]=this.gridInstanceId}},{key:"getRenderedCellForEvent",value:function(e){return fr(this.gridOptionsService,e.target,mc.DOM_DATA_KEY_CELL_CTRL)}},{key:"isEventFromThisGrid",value:function(e){return this.isElementInThisGrid(e.target)}},{key:"isElementInThisGrid",value:function(e){for(var t=e;t;){var n=t[_c.GRID_DOM_KEY];if(Fn(n))return n===this.gridInstanceId;t=t.parentElement}return!1}},{key:"getCellPositionForEvent",value:function(e){var t=this.getRenderedCellForEvent(e);return t?t.getCellPosition():null}},{key:"getNormalisedPosition",value:function(e){var t,n,i=this.gridOptionsService.isDomLayout("normal"),r=e;if(null!=r.clientX||null!=r.clientY?(t=r.clientX,n=r.clientY):(t=r.x,n=r.y),i){var o=this.ctrlsService.getGridBodyCtrl(),a=o.getScrollFeature().getVScrollPosition();t+=o.getScrollFeature().getHScrollPosition().left,n+=a.top}return{x:t,y:n}}}]),n}(kr);_c.gridInstanceSequence=new xs,_c.GRID_DOM_KEY="__ag_grid_instance",Mn([Di("ctrlsService")],_c.prototype,"ctrlsService",2),_c=Mn([Ri("mouseEventService")],_c);var Gc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.call(this)).onPageDown=vi(e.onPageDown,100),e.onPageUp=vi(e.onPageUp,100),e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.ctrlsService.whenReady((function(t){e.gridBodyCon=t.gridBodyCtrl}))}},{key:"handlePageScrollingKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.key,i=e.altKey,r=e.ctrlKey||e.metaKey,o=!!this.rangeService&&e.shiftKey,a=this.mouseEventService.getCellPositionForEvent(e),s=!1;switch(n){case hs.PAGE_HOME:case hs.PAGE_END:r||i||(this.onHomeOrEndKey(n),s=!0);break;case hs.LEFT:case hs.RIGHT:case hs.UP:case hs.DOWN:if(!a)return!1;!r||i||o||(this.onCtrlUpDownLeftRight(n,a),s=!0);break;case hs.PAGE_DOWN:case hs.PAGE_UP:r||i||(s=this.handlePageUpDown(n,a,t))}return s&&e.preventDefault(),s}},{key:"handlePageUpDown",value:function(e,t,n){return n&&(t=this.focusService.getFocusedCell()),!!t&&(e===hs.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0)}},{key:"navigateTo",value:function(e){var t=e.scrollIndex,n=e.scrollType,i=e.scrollColumn,r=e.focusIndex,o=e.focusColumn;if(Fn(i)&&!i.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(i),Fn(t)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(t,n),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(r),this.focusService.setFocusedCell({rowIndex:r,column:o,rowPinned:null,forceBrowserFocus:!0}),this.rangeService){var a={rowIndex:r,rowPinned:null,column:o};this.rangeService.setRangeToCell(a)}}},{key:"onPageDown",value:function(e){var t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),n=this.getViewportHeight(),i=this.paginationProxy.getPixelOffset(),r=t.top+n,o=this.paginationProxy.getRowIndexAtPixel(r+i);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,o):this.navigateToNextPage(e,o)}},{key:"onPageUp",value:function(e){var t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),n=this.paginationProxy.getPixelOffset(),i=t.top,r=this.paginationProxy.getRowIndexAtPixel(i+n);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,r,!0):this.navigateToNextPage(e,r,!0)}},{key:"navigateToNextPage",value:function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.getViewportHeight(),o=this.paginationProxy.getPageFirstRow(),a=this.paginationProxy.getPageLastRow(),s=this.paginationProxy.getPixelOffset(),l=this.paginationProxy.getRow(e.rowIndex),u=i?(null==l?void 0:l.rowHeight)-r-s:r-s,c=(null==l?void 0:l.rowTop)+u,d=this.paginationProxy.getRowIndexAtPixel(c+s);if(d===e.rowIndex){var h=i?-1:1;t=d=e.rowIndex+h}i?(n="bottom",d<o&&(d=o),t<o&&(t=o)):(n="top",d>a&&(d=a),t>a&&(t=a)),this.isRowTallerThanView(d)&&(t=d,n="top"),this.navigateTo({scrollIndex:t,scrollType:n,scrollColumn:null,focusIndex:d,focusColumn:e.column})}},{key:"navigateToNextPageWithAutoHeight",value:function(e,t){var n=this,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((function(){var r=n.getNextFocusIndexForAutoHeight(e,i);n.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:r,focusColumn:e.column,isAsync:!0})}),50)}},{key:"getNextFocusIndexForAutoHeight",value:function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=n?-1:1,r=this.getViewportHeight(),o=this.paginationProxy.getPageLastRow(),a=0,s=e.rowIndex;s>=0&&s<=o;){var l=this.paginationProxy.getRow(s);if(l){var u=null!=(t=l.rowHeight)?t:0;if(a+u>r)break;a+=u}s+=i}return Math.max(0,Math.min(s,o))}},{key:"getViewportHeight",value:function(){var e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),t=this.gridOptionsService.getScrollbarWidth(),n=e.bottom-e.top;return this.ctrlsService.getCenterRowContainerCtrl().isHorizontalScrollShowing()&&(n-=t),n}},{key:"isRowTallerThanView",value:function(e){var t=this.paginationProxy.getRow(e);if(!t)return!1;var n=t.rowHeight;return"number"===typeof n&&n>this.getViewportHeight()}},{key:"onCtrlUpDownLeftRight",value:function(e,t){var n=this.cellNavigationService.getNextCellToFocus(e,t,!0),i=n.rowIndex,r=n.column;this.navigateTo({scrollIndex:i,scrollType:null,scrollColumn:r,focusIndex:i,focusColumn:r})}},{key:"onHomeOrEndKey",value:function(e){var t=e===hs.PAGE_HOME,n=this.columnModel.getAllDisplayedColumns(),i=t?n[0]:Ui(n),r=t?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:i,focusIndex:r,focusColumn:i})}},{key:"onTabKeyDown",value:function(e,t){var n=t.shiftKey;if(this.tabToNextCellCommon(e,n,t))t.preventDefault();else if(n){var i=e.getRowPosition(),r=i.rowIndex;(i.rowPinned?0===r:r===this.paginationProxy.getPageFirstRow())&&(0===this.gridOptionsService.get("headerHeight")||this.gridOptionsService.get("suppressHeaderFocus")?this.focusService.focusNextGridCoreContainer(!0,!0):(t.preventDefault(),this.focusService.focusPreviousFromFirstCell(t)))}else e instanceof mc&&e.focusCell(!0),this.focusService.focusNextGridCoreContainer(n)&&t.preventDefault()}},{key:"tabToNextCell",value:function(e,t){var n=this.focusService.getFocusedCell();if(!n)return!1;var i=this.getCellByPosition(n);return!!(i||(i=this.rowRenderer.getRowByPosition(n))&&i.isFullWidth())&&this.tabToNextCellCommon(i,e,t)}},{key:"tabToNextCellCommon",value:function(e,t,n){var i=e.isEditing();if(!i&&e instanceof mc){var r=e.getRowCtrl();r&&(i=r.isEditing())}return(i?"fullRow"===this.gridOptionsService.get("editType")?this.moveToNextEditingRow(e,t,n):this.moveToNextEditingCell(e,t,n):this.moveToNextCellNotEditing(e,t))||!!this.focusService.getFocusedHeader()}},{key:"moveToNextEditingCell",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=e.getCellPosition();e.getGui().focus(),e.stopEditing();var r=this.findNextCellToFocusOn(i,t,!0);return null!=r&&(r.startEditing(null,!0,n),r.focusCell(!1),!0)}},{key:"moveToNextEditingRow",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=e.getCellPosition(),r=this.findNextCellToFocusOn(i,t,!0);if(null==r)return!1;var o=r.getCellPosition(),a=this.isCellEditable(i),s=this.isCellEditable(o),l=o&&i.rowIndex===o.rowIndex&&i.rowPinned===o.rowPinned;if(a&&e.setFocusOutOnEditor(),!l){var u=e.getRowCtrl();u.stopEditing();var c=r.getRowCtrl();c.startRowEditing(void 0,void 0,n)}return s?(r.setFocusInOnEditor(),r.focusCell()):r.focusCell(!0),!0}},{key:"moveToNextCellNotEditing",value:function(e,t){var n,i=this.columnModel.getAllDisplayedColumns();n=e instanceof kc?On(Tn({},e.getRowPosition()),{column:t?i[0]:Ui(i)}):e.getCellPosition();var r=this.findNextCellToFocusOn(n,t,!1);if(r instanceof mc)r.focusCell(!0);else if(r)return this.tryToFocusFullWidthRow(r.getRowPosition(),t);return Fn(r)}},{key:"findNextCellToFocusOn",value:function(e,t,n){for(var i=e;;){e!==i&&(e=i),t||(i=this.getLastCellOfColSpan(i)),i=this.cellNavigationService.getNextTabbedCell(i,t);var r=this.gridOptionsService.getCallback("tabToNextCell");if(Fn(r)){var o=r({backwards:t,editing:n,previousCellPosition:e,nextCellPosition:i||null});Fn(o)?(o.floating&&(oi("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),o.rowPinned=o.floating),i={rowIndex:o.rowIndex,column:o.column,rowPinned:o.rowPinned}):i=null}if(!i)return null;if(i.rowIndex<0){var a=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:a+i.rowIndex,column:i.column},fromCell:!0}),null}var s="fullRow"===this.gridOptionsService.get("editType");if(n&&!s)if(!this.isCellEditable(i))continue;this.ensureCellVisible(i);var l=this.getCellByPosition(i);if(!l){var u=this.rowRenderer.getRowByPosition(i);if(!u||!u.isFullWidth()||n)continue;return u}if(!l.isSuppressNavigable())return this.rangeService&&this.rangeService.setRangeToCell(i),l}}},{key:"isCellEditable",value:function(e){var t=this.lookupRowNodeForCell(e);return!!t&&e.column.isCellEditable(t)}},{key:"getCellByPosition",value:function(e){var t=this.rowRenderer.getRowByPosition(e);return t?t.getCellCtrl(e.column):null}},{key:"lookupRowNodeForCell",value:function(e){return"top"===e.rowPinned?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):"bottom"===e.rowPinned?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.paginationProxy.getRow(e.rowIndex)}},{key:"navigateToNextCell",value:function(e,t,n,i){for(var r=n,o=!1;r&&(r===n||!this.isValidNavigateCell(r));)this.gridOptionsService.get("enableRtl")?t===hs.LEFT&&(r=this.getLastCellOfColSpan(r)):t===hs.RIGHT&&(r=this.getLastCellOfColSpan(r)),o=_n(r=this.cellNavigationService.getNextCellToFocus(t,r));if(o&&e&&e.key===hs.UP&&(r={rowIndex:-1,rowPinned:null,column:n.column}),i){var a=this.gridOptionsService.getCallback("navigateToNextCell");if(Fn(a)){var s=a({key:t,previousCellPosition:n,nextCellPosition:r||null,event:e});Fn(s)?(s.floating&&(oi("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),s.rowPinned=s.floating),r={rowPinned:s.rowPinned,rowIndex:s.rowIndex,column:s.column}):r=null}}if(r)if(r.rowIndex<0){var l=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l+r.rowIndex,column:n.column},event:e||void 0,fromCell:!0})}else{var u=this.getNormalisedPosition(r);u?this.focusPosition(u):this.tryToFocusFullWidthRow(r)}}},{key:"getNormalisedPosition",value:function(e){this.ensureCellVisible(e);var t=this.getCellByPosition(e);return t?(e=t.getCellPosition(),this.ensureCellVisible(e),e):null}},{key:"tryToFocusFullWidthRow",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.columnModel.getAllDisplayedColumns(),i=this.rowRenderer.getRowByPosition(e);if(!i||!i.isFullWidth())return!1;var r=this.focusService.getFocusedCell(),o={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?Ui(n):n[0])};this.focusPosition(o);var a=null!=r&&this.rowPositionUtils.before(o,r),s={type:Er.EVENT_FULL_WIDTH_ROW_FOCUSED,rowIndex:o.rowIndex,rowPinned:o.rowPinned,column:o.column,isFullWidthCell:!0,floating:o.rowPinned,fromBelow:a};return this.eventService.dispatchEvent(s),!0}},{key:"focusPosition",value:function(e){this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.rangeService&&this.rangeService.setRangeToCell(e)}},{key:"isValidNavigateCell",value:function(e){return!!this.rowPositionUtils.getRowNode(e)}},{key:"getLastCellOfColSpan",value:function(e){var t=this.getCellByPosition(e);if(!t)return e;var n=t.getColSpanningList();return 1===n.length?e:{rowIndex:e.rowIndex,column:Ui(n),rowPinned:e.rowPinned}}},{key:"ensureCellVisible",value:function(e){var t=this.gridOptionsService.isGroupRowsSticky(),n=this.rowModel.getRow(e.rowIndex);!(t&&(null==n?void 0:n.sticky))&&_n(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)}}]),n}(kr);Mn([Di("mouseEventService")],Gc.prototype,"mouseEventService",2),Mn([Di("paginationProxy")],Gc.prototype,"paginationProxy",2),Mn([Di("focusService")],Gc.prototype,"focusService",2),Mn([Ti("rangeService")],Gc.prototype,"rangeService",2),Mn([Di("columnModel")],Gc.prototype,"columnModel",2),Mn([Di("rowModel")],Gc.prototype,"rowModel",2),Mn([Di("ctrlsService")],Gc.prototype,"ctrlsService",2),Mn([Di("rowRenderer")],Gc.prototype,"rowRenderer",2),Mn([Di("headerNavigationService")],Gc.prototype,"headerNavigationService",2),Mn([Di("rowPositionUtils")],Gc.prototype,"rowPositionUtils",2),Mn([Di("cellNavigationService")],Gc.prototype,"cellNavigationService",2),Mn([Di("pinnedRowModel")],Gc.prototype,"pinnedRowModel",2),Mn([Ei],Gc.prototype,"postConstruct",1),Gc=Mn([Ri("navigationService")],Gc);var Zc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this,'<div class="ag-popup-editor" tabindex="-1"/>')).params=e,i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.gridOptionsService.setDomData(this.getGui(),n.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addKeyDownListener()}},{key:"addKeyDownListener",value:function(){var e=this,t=this.getGui(),n=this.params;this.addManagedListener(t,"keydown",(function(t){fs(e.gridOptionsService,t,n.node,n.column,!0)||n.onKeyDown(t)}))}}]),n}(Fl);Zc.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper",Mn([Ei],Zc.prototype,"postConstruct",1);var Vc=Zc,Hc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r,o,s){var l;(0,a.Z)(this,n),(l=t.call(this)).rendererVersion=0,l.editorVersion=0,l.beans=e,l.column=i.getColumn(),l.rowNode=i.getRowNode(),l.rowCtrl=i.getRowCtrl(),l.eRow=o,l.cellCtrl=i;var u=document.createElement("div");u.setAttribute("comp-id","".concat(l.getCompId())),l.setTemplateFromElement(u);var c=l.getGui();l.forceWrapper=i.isForceWrapper(),l.refreshWrapper(!1);var d=function(e,t){null!=t&&""!=t?c.setAttribute(e,t):c.removeAttribute(e)};no(c,i.getCellAriaRole()),d("col-id",i.getColumnIdSanitised());var h=i.getTabIndex();void 0!==h&&d("tabindex",h.toString());var p={addOrRemoveCssClass:function(e,t){return l.addOrRemoveCssClass(e,t)},setUserStyles:function(e){return Wa(c,e)},getFocusableElement:function(){return l.getFocusableElement()},setIncludeSelection:function(e){return l.includeSelection=e},setIncludeRowDrag:function(e){return l.includeRowDrag=e},setIncludeDndSource:function(e){return l.includeDndSource=e},setRenderDetails:function(e,t,n){return l.setRenderDetails(e,t,n)},setEditDetails:function(e,t,n){return l.setEditDetails(e,t,n)},getCellEditor:function(){return l.cellEditor||null},getCellRenderer:function(){return l.cellRenderer||null},getParentOfValue:function(){return l.getParentOfValue()}};return i.setComp(p,l.getGui(),l.eCellWrapper,r,s),l}return(0,s.Z)(n,[{key:"getParentOfValue",value:function(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()}},{key:"setRenderDetails",value:function(e,t,n){if(!(this.cellEditor&&!this.cellEditorPopupWrapper)){this.firstRender=null==this.firstRender;var i=this.refreshWrapper(!1);if(this.refreshEditStyles(!1),e)!(n||i)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e));else this.destroyRenderer(),this.insertValueWithoutCellRenderer(t)}}},{key:"setEditDetails",value:function(e,t,n){e?this.createCellEditorInstance(e,t,n):this.destroyEditor()}},{key:"removeControls",value:function(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)}},{key:"refreshWrapper",value:function(e){var t=this.includeRowDrag||this.includeDndSource||this.includeSelection,n=t||this.forceWrapper,i=n&&null==this.eCellWrapper;if(i){var r=document.createElement("div");r.setAttribute("role","presentation"),r.setAttribute("class","ag-cell-wrapper"),this.eCellWrapper=r,this.getGui().appendChild(this.eCellWrapper)}var o=!n&&null!=this.eCellWrapper;o&&(Fa(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!n);var a=!e&&n,s=a&&null==this.eCellValue;if(s){var l=document.createElement("span");l.setAttribute("role","presentation"),l.setAttribute("class","ag-cell-value"),this.eCellValue=l,this.eCellWrapper.appendChild(this.eCellValue)}var u=!a&&null!=this.eCellValue;u&&(Fa(this.eCellValue),this.eCellValue=void 0);var c=i||o||s||u;return c&&this.removeControls(),e||t&&this.addControls(),c}},{key:"addControls",value:function(){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))}},{key:"createCellEditorInstance",value:function(e,t,n){var i=this,r=this.editorVersion,o=e.newAgStackInstance();if(o){var a=e.params;o.then((function(e){return i.afterCellEditorCreated(r,e,a,t,n)})),_n(this.cellEditor)&&a.cellStartedEdit&&this.cellCtrl.focusCell(!0)}}},{key:"insertValueWithoutCellRenderer",value:function(e){var t=this.getParentOfValue();Ia(t);var n=null!=e?Lr(e,!0):null;null!=n&&(t.textContent=n)}},{key:"destroyEditorAndRenderer",value:function(){this.destroyRenderer(),this.destroyEditor()}},{key:"destroyRenderer",value:function(){var e=this.beans.context;this.cellRenderer=e.destroyBean(this.cellRenderer),Fa(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}},{key:"destroyEditor",value:function(){var e=this.beans.context;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),Fa(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}},{key:"refreshCellRenderer",value:function(e){if(null==this.cellRenderer||null==this.cellRenderer.refresh)return!1;if(this.cellRendererClass!==e.componentClass)return!1;var t=this.cellRenderer.refresh(e.params);return!0===t||void 0===t}},{key:"createCellRendererInstance",value:function(e){var t=this,n=!this.beans.gridOptionsService.get("suppressAnimationFrame"),i=this.rendererVersion,r=e.componentClass,o=function(){if(!(t.rendererVersion!==i||!t.isAlive())){var n=e.newAgStackInstance(),o=t.afterCellRendererCreated.bind(t,i,r);n&&n.then(o)}};n&&this.firstRender?this.beans.animationFrameService.createTask(o,this.rowNode.rowIndex,"createTasksP2"):o()}},{key:"getCtrl",value:function(){return this.cellCtrl}},{key:"getRowCtrl",value:function(){return this.rowCtrl}},{key:"getCellRenderer",value:function(){return this.cellRenderer}},{key:"getCellEditor",value:function(){return this.cellEditor}},{key:"afterCellRendererCreated",value:function(e,t,n){if(!this.isAlive()||e!==this.rendererVersion)this.beans.context.destroyBean(n);else if(this.cellRenderer=n,this.cellRendererClass=t,this.cellRendererGui=this.cellRenderer.getGui(),null!=this.cellRendererGui){var i=this.getParentOfValue();Ia(i),i.appendChild(this.cellRendererGui)}}},{key:"afterCellEditorCreated",value:function(e,t,n,i,r){if(e!==this.editorVersion)this.beans.context.destroyBean(t);else{if(t.isCancelBeforeStart&&t.isCancelBeforeStart())return this.beans.context.destroyBean(t),void this.cellCtrl.stopEditing(!0);if(!t.getGui)return console.warn("AG Grid: cellEditor for column ".concat(this.column.getId()," is missing getGui() method")),void this.beans.context.destroyBean(t);this.cellEditor=t,this.cellEditorGui=t.getGui();var o=i||void 0!==t.isPopup&&t.isPopup();o?this.addPopupCellEditor(n,r):this.addInCellEditor(),this.refreshEditStyles(!0,o),t.afterGuiAttached&&t.afterGuiAttached()}}},{key:"refreshEditStyles",value:function(e,t){var n;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),null==(n=this.rowCtrl)||n.setInlineEditingCss(e)}},{key:"addInCellEditor",value:function(){var e=this.getGui(),t=this.beans.gridOptionsService.getDocument();(e.contains(t.activeElement)&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui)&&this.getParentOfValue().appendChild(this.cellEditorGui)}},{key:"addPopupCellEditor",value:function(e,t){var n=this;"fullRow"===this.beans.gridOptionsService.get("editType")&&console.warn("AG Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");var i=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new Vc(e));var r=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&r.appendChild(this.cellEditorGui);var o=this.beans.popupService,a=this.beans.gridOptionsService.get("stopEditingWhenCellsLoseFocus"),s=null!=t?t:i.getPopupPosition?i.getPopupPosition():"over",l=this.beans.gridOptionsService.get("enableRtl"),u={ePopup:r,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:s,alignSide:l?"right":"left",keepWithinBounds:!0},c=o.positionPopupByComponent.bind(o,u),d=this.beans.localeService.getLocaleTextFunc(),h=o.addPopup({modal:a,eChild:r,closeOnEsc:!0,closedCallback:function(){n.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:c,ariaLabel:d("ariaLabelCellEditor","Cell Editor")});h&&(this.hideEditorPopup=h.hideFunc)}},{key:"detach",value:function(){this.eRow.removeChild(this.getGui())}},{key:"destroy",value:function(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}},{key:"clearParentOfValue",value:function(){var e=this.getGui(),t=this.beans.gridOptionsService.getDocument();e.contains(t.activeElement)&&Xo()&&e.focus({preventScroll:!0}),Ia(this.getParentOfValue())}}]),n}(Ns),Bc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r){var o;(0,a.Z)(this,n),(o=t.call(this)).cellComps={},o.beans=i,o.rowCtrl=e;var s=document.createElement("div");s.setAttribute("comp-id","".concat(o.getCompId())),s.setAttribute("style",o.getInitialStyle(r)),o.setTemplateFromElement(s);var l=o.getGui(),u=l.style;o.domOrder=o.rowCtrl.getDomOrder(),no(l,"row");var c=o.rowCtrl.getTabIndex();null!=c&&l.setAttribute("tabindex",c.toString());var d={setDomOrder:function(e){return o.domOrder=e},setCellCtrls:function(e){return o.setCellCtrls(e)},showFullWidth:function(e){return o.showFullWidth(e)},getFullWidthCellRenderer:function(){return o.getFullWidthCellRenderer()},addOrRemoveCssClass:function(e,t){return o.addOrRemoveCssClass(e,t)},setUserStyles:function(e){return Wa(l,e)},setTop:function(e){return u.top=e},setTransform:function(e){return u.transform=e},setRowIndex:function(e){return l.setAttribute("row-index",e)},setRowId:function(e){return l.setAttribute("row-id",e)},setRowBusinessKey:function(e){return l.setAttribute("row-business-key",e)},refreshFullWidth:function(e){return o.refreshFullWidth(e)}};return e.setComp(d,o.getGui(),r),o.addDestroyFunc((function(){e.unsetComp(r)})),o}return(0,s.Z)(n,[{key:"getInitialStyle",value:function(e){var t=this.rowCtrl.getInitialTransform(e);return t?"transform: ".concat(t):"top: ".concat(this.rowCtrl.getInitialRowTop(e))}},{key:"showFullWidth",value:function(e){var t=this,n=e.newAgStackInstance();n&&n.then((function(e){if(t.isAlive()){var n=e.getGui();t.getGui().appendChild(n),t.rowCtrl.setupDetailRowAutoHeight(n),t.setFullWidthRowComp(e)}else t.beans.context.destroyBean(e)}))}},{key:"setCellCtrls",value:function(e){var t=this,n=Object.assign({},this.cellComps);e.forEach((function(e){var i=e.getInstanceId();null==t.cellComps[i]?t.newCellComp(e):n[i]=null}));var i=Qn(n).filter((function(e){return null!=e}));this.destroyCells(i),this.ensureDomOrder(e)}},{key:"ensureDomOrder",value:function(e){var t=this;if(this.domOrder){var n=[];e.forEach((function(e){var i=t.cellComps[e.getInstanceId()];i&&n.push(i.getGui())})),Ha(this.getGui(),n)}}},{key:"newCellComp",value:function(e){var t=new Hc(this.beans,e,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[e.getInstanceId()]=t,this.getGui().appendChild(t.getGui())}},{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this),this.destroyAllCells()}},{key:"destroyAllCells",value:function(){var e=Qn(this.cellComps).filter((function(e){return null!=e}));this.destroyCells(e)}},{key:"setFullWidthRowComp",value:function(e){var t=this;this.fullWidthCellRenderer&&console.error("AG Grid - should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=e,this.addDestroyFunc((function(){t.fullWidthCellRenderer=t.beans.context.destroyBean(t.fullWidthCellRenderer)}))}},{key:"getFullWidthCellRenderer",value:function(){return this.fullWidthCellRenderer}},{key:"destroyCells",value:function(e){var t=this;e.forEach((function(e){if(e){var n=e.getCtrl().getInstanceId();t.cellComps[n]===e&&(e.detach(),e.destroy(),t.cellComps[n]=null)}}))}},{key:"refreshFullWidth",value:function(e){var t=this.fullWidthCellRenderer;if(!t||!t.refresh)return!1;var n=e();return t.refresh(n)}}]),n}(Ns);var Wc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.call(this,function(){var e=Ns.elementGettingCreated.getAttribute("name"),t=Nc.getRowContainerCssClasses(e);return"center"===e||"topCenter"===e||"stickyTopCenter"===e||"bottomCenter"===e?'<div class="'.concat(t.viewport,'" ref="eViewport" role="presentation">\n                <div class="').concat(t.container,'" ref="eContainer"></div>\n            </div>'):'<div class="'.concat(t.container,'" ref="eContainer"></div>')}())).rowComps={},e.name=Ns.elementGettingCreated.getAttribute("name"),e.type=Oc(e.name),e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this,t={setViewportHeight:function(t){return e.eViewport.style.height=t},setRowCtrls:function(t){var n=t.rowCtrls;return e.setRowCtrls(n)},setDomOrder:function(t){e.domOrder=t},setContainerWidth:function(t){return e.eContainer.style.width=t}};this.createManagedBean(new Nc(this.name)).setComp(t,this.eContainer,this.eViewport)}},{key:"preDestroy",value:function(){this.setRowCtrls([])}},{key:"setRowCtrls",value:function(e){var t=this,n=Tn({},this.rowComps);this.rowComps={},this.lastPlacedElement=null;e.forEach((function(e){var i=e.getInstanceId(),r=n[i];if(r)t.rowComps[i]=r,delete n[i],t.ensureDomOrder(r.getGui());else{if(!e.getRowNode().displayed)return;var o=new Bc(e,t.beans,t.type);t.rowComps[i]=o,t.appendRow(o.getGui())}})),Qn(n).forEach((function(e){t.eContainer.removeChild(e.getGui()),e.destroy()})),no(this.eContainer,"rowgroup")}},{key:"appendRow",value:function(e){this.domOrder?Ba(this.eContainer,e,this.lastPlacedElement):this.eContainer.appendChild(e),this.lastPlacedElement=e}},{key:"ensureDomOrder",value:function(e){this.domOrder&&(Va(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)}}]),n}(Ns);Mn([Di("beans")],Wc.prototype,"beans",2),Mn([Ls("eViewport")],Wc.prototype,"eViewport",2),Mn([Ls("eContainer")],Wc.prototype,"eContainer",2),Mn([Ei],Wc.prototype,"postConstruct",1),Mn([xi],Wc.prototype,"preDestroy",1);var zc=function(){function e(t){(0,a.Z)(this,e),this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=t}return(0,s.Z)(e,[{key:"onDragEnter",value:function(e){var t=this;if(this.clearColumnsList(),!this.gridOptionsService.get("functionsReadOnly")){var n=e.dragItem.columns;n&&n.forEach((function(e){e.isPrimary()&&(e.isAnyFunctionActive()||(e.isAllowValue()?t.columnsToAggregate.push(e):e.isAllowRowGroup()?t.columnsToGroup.push(e):e.isAllowPivot()&&t.columnsToPivot.push(e)))}))}}},{key:"getIconName",value:function(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?Xl.ICON_PINNED:Xl.ICON_MOVE:null}},{key:"onDragLeave",value:function(e){this.clearColumnsList()}},{key:"clearColumnsList",value:function(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}},{key:"onDragging",value:function(e){}},{key:"onDragStop",value:function(e){this.columnsToAggregate.length>0&&this.columnModel.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.columnModel.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.columnModel.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")}}]),e}();Mn([Di("columnModel")],zc.prototype,"columnModel",2),Mn([Di("gridOptionsService")],zc.prototype,"gridOptionsService",2);var Uc=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,null,[{key:"attemptMoveColumns",value:function(e){var t=e.isFromHeader,n=e.hDirection,i=e.xPosition,r=e.fromEnter,o=e.fakeEvent,a=e.pinned,s=e.gridOptionsService,l=e.columnModel,u=0===n,c=1===n,d=e.allMovingColumns;if(t){var h=[];d.forEach((function(e){for(var t,n=null,i=e.getParent();null!=i&&1===i.getDisplayedLeafColumns().length;)n=i,i=i.getParent();null!=n?(!!(null==(t=n.getColGroupDef())?void 0:t.marryChildren)?n.getProvidedColumnGroup().getLeafColumns():n.getLeafColumns()).forEach((function(e){h.includes(e)||h.push(e)})):h.includes(e)||h.push(e)})),d=h}var p=d.slice();l.sortColumnsLikeGridColumns(p);var f=this.calculateValidMoves({movingCols:p,draggingRight:c,xPosition:i,pinned:a,gridOptionsService:s,columnModel:l}),v=this.calculateOldIndex(p,l);if(0!==f.length){var g=f[0],m=null!==v&&!r;if(t&&(m=null!==v),m&&!o){if(u&&g>=v)return;if(c&&g<=v)return}for(var y=l.getAllDisplayedColumns(),C=[],k=null,w=0;w<f.length;w++){var S=f[w],b=l.getProposedColumnOrder(p,S);if(l.doesOrderPassRules(b)){var E=b.filter((function(e){return y.includes(e)}));if(null===k)k=E;else if(!ji(E,k))break;var x=this.groupFragCount(b);C.push({move:S,fragCount:x})}}if(0!==C.length)return C.sort((function(e,t){return e.fragCount-t.fragCount})),this.moveColumns(d,C[0].move,"uiColumnMoved",!1,l)}}},{key:"moveColumns",value:function(e,t,n,i,r){return r.moveColumns(e,t,n,i),i?null:{columns:e,toIndex:t}}},{key:"calculateOldIndex",value:function(e,t){var n=t.getAllGridColumns(),i=Yi(e.map((function(e){return n.indexOf(e)}))),r=i[0];return Ui(i)-r!==i.length-1?null:r}},{key:"groupFragCount",value:function(e){function t(e){for(var t=[],n=e.getOriginalParent();null!=n;)t.push(n),n=n.getOriginalParent();return t}for(var n=0,i=function(i){var o=t(e[i]),a=t(e[i+1]),s=o.length>a.length?[o,a]:[a,o],l=(0,r.Z)(s,2);o=l[0],a=l[1],o.forEach((function(e){-1===a.indexOf(e)&&n++}))},o=0;o<e.length-1;o++)i(o);return n}},{key:"calculateValidMoves",value:function(e){var t=e.movingCols,n=e.draggingRight,i=e.xPosition,r=e.pinned,o=e.gridOptionsService,a=e.columnModel,s=o.get("suppressMovableColumns")||t.some((function(e){return e.getColDef().suppressMovable}));if(s)return[];var l,u=a.getDisplayedColumns(r),c=a.getAllGridColumns(),d=u.filter((function(e){return ir(t,e)})),h=u.filter((function(e){return!ir(t,e)})),p=c.filter((function(e){return!ir(t,e)})),f=0,v=i;if(n){var g=0;d.forEach((function(e){return g+=e.getActualWidth()})),v-=g}if(v>0){for(var m=0;m<h.length;m++){if((v-=h[m].getActualWidth())<0)break;f++}n&&f++}if(f>0){var y=h[f-1];l=p.indexOf(y)+1}else-1===(l=p.indexOf(h[0]))&&(l=0);var C=[l],k=function(e,t){return e-t};if(n){for(var w=l+1,S=c.length-1;w<=S;)C.push(w),w++;C.sort(k)}else{for(var b=l,E=c.length-1,x=c[b];b<=E&&u.indexOf(x)<0;)b++,C.push(b),x=c[b];b=l-1;for(;b>=0;)C.push(b),b--;C.sort(k).reverse()}return C}},{key:"normaliseX",value:function(e,t,n,i,r){var o=r.getHeaderRowContainerCtrl(t).getViewport();(n&&(e-=o.getBoundingClientRect().left),i.get("enableRtl"))&&(e=o.clientWidth-e);return null==t&&(e+=r.getCenterRowContainerCtrl().getCenterViewportScrollLeft()),e}}]),e}(),jc=function(){function e(t,n){(0,a.Z)(this,e),this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=t,this.eContainer=n,this.centerContainer=!Fn(t)}return(0,s.Z)(e,[{key:"init",value:function(){var e=this;this.ctrlsService.whenReady((function(){e.gridBodyCon=e.ctrlsService.getGridBodyCtrl()}))}},{key:"getIconName",value:function(){return this.pinned?Xl.ICON_PINNED:Xl.ICON_MOVE}},{key:"onDragEnter",value:function(e){var t=e.dragItem.columns;if(0===e.dragSource.type)this.setColumnsVisible(t,!0,"uiColumnDragged");else{var n=e.dragItem.visibleState,i=(t||[]).filter((function(e){return n[e.getId()]}));this.setColumnsVisible(i,!0,"uiColumnDragged")}this.setColumnsPinned(t,this.pinned,"uiColumnDragged"),this.onDragging(e,!0,!0)}},{key:"onDragLeave",value:function(){this.ensureIntervalCleared(),this.lastMovedInfo=null}},{key:"setColumnsVisible",value:function(e,t,n){if(e){var i=e.filter((function(e){return!e.getColDef().lockVisible}));this.columnModel.setColumnsVisible(i,t,n)}}},{key:"setColumnsPinned",value:function(e,t,n){if(e){var i=e.filter((function(e){return!e.getColDef().lockPinned}));this.columnModel.setColumnsPinned(i,t,n)}}},{key:"onDragStop",value:function(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}},{key:"checkCenterForScrolling",value:function(e){if(this.centerContainer){var t=this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft(),n=t+this.ctrlsService.getCenterRowContainerCtrl().getCenterWidth();this.gridOptionsService.get("enableRtl")?(this.needToMoveRight=e<t+50,this.needToMoveLeft=e>n-50):(this.needToMoveLeft=e<t+50,this.needToMoveRight=e>n-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}}},{key:"onDragging",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.lastDraggingEvent,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(o){if(this.lastMovedInfo){var a=this.lastMovedInfo,s=a.columns,l=a.toIndex;Uc.moveColumns(s,l,"uiColumnMoved",!0,this.columnModel)}}else if(this.lastDraggingEvent=n,!_n(n.hDirection)){var u=Uc.normaliseX(n.x,this.pinned,!1,this.gridOptionsService,this.ctrlsService);i||this.checkCenterForScrolling(u);var c=this.normaliseDirection(n.hDirection),d=n.dragSource.type,h=(null==(e=n.dragSource.getDragItem().columns)?void 0:e.filter((function(e){return!e.getColDef().lockPinned||e.getPinned()==t.pinned})))||[],p=Uc.attemptMoveColumns({allMovingColumns:h,isFromHeader:1===d,hDirection:c,xPosition:u,pinned:this.pinned,fromEnter:i,fakeEvent:r,gridOptionsService:this.gridOptionsService,columnModel:this.columnModel});p&&(this.lastMovedInfo=p)}}},{key:"normaliseDirection",value:function(e){if(!this.gridOptionsService.get("enableRtl"))return e;switch(e){case 0:return 1;case 1:return 0;default:console.error("AG Grid: Unknown direction ".concat(e))}}},{key:"ensureIntervalStarted",value:function(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.needToMoveLeft?this.dragAndDropService.setGhostIcon(Xl.ICON_LEFT,!0):this.dragAndDropService.setGhostIcon(Xl.ICON_RIGHT,!0))}},{key:"ensureIntervalCleared",value:function(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(Xl.ICON_MOVE))}},{key:"moveInterval",value:function(){var e;this.intervalCount++,(e=10+5*this.intervalCount)>100&&(e=100);var t=null,n=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?t=n.scrollHorizontally(-e):this.needToMoveRight&&(t=n.scrollHorizontally(e)),0!==t)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;var i=this.lastDraggingEvent.dragItem.columns.filter((function(e){return!e.getColDef().lockPinned}));if(i.length>0&&(this.dragAndDropService.setGhostIcon(Xl.ICON_PINNED),this.failedMoveAttempts>7)){var r=this.needToMoveLeft?"left":"right";this.setColumnsPinned(i,r,"uiColumnDragged"),this.dragAndDropService.nudge()}}}}]),e}();Mn([Di("columnModel")],jc.prototype,"columnModel",2),Mn([Di("dragAndDropService")],jc.prototype,"dragAndDropService",2),Mn([Di("gridOptionsService")],jc.prototype,"gridOptionsService",2),Mn([Di("ctrlsService")],jc.prototype,"ctrlsService",2),Mn([Ei],jc.prototype,"init",1);var Kc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i){var r;return(0,a.Z)(this,n),(r=t.call(this)).pinned=e,r.eContainer=i,r}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.ctrlsService.whenReady((function(t){switch(e.pinned){case"left":e.eSecondaryContainers=[[t.gridBodyCtrl.getBodyViewportElement(),t.leftRowContainerCtrl.getContainerElement()],[t.bottomLeftRowContainerCtrl.getContainerElement()],[t.topLeftRowContainerCtrl.getContainerElement()]];break;case"right":e.eSecondaryContainers=[[t.gridBodyCtrl.getBodyViewportElement(),t.rightRowContainerCtrl.getContainerElement()],[t.bottomRightRowContainerCtrl.getContainerElement()],[t.topRightRowContainerCtrl.getContainerElement()]];break;default:e.eSecondaryContainers=[[t.gridBodyCtrl.getBodyViewportElement(),t.centerRowContainerCtrl.getViewportElement()],[t.bottomCenterRowContainerCtrl.getViewportElement()],[t.topCenterRowContainerCtrl.getViewportElement()]]}}))}},{key:"isInterestedIn",value:function(e){return 1===e||0===e&&this.gridOptionsService.get("allowDragFromColumnsToolPanel")}},{key:"getSecondaryContainers",value:function(){return this.eSecondaryContainers}},{key:"getContainer",value:function(){return this.eContainer}},{key:"init",value:function(){this.moveColumnFeature=this.createManagedBean(new jc(this.pinned,this.eContainer)),this.bodyDropPivotTarget=this.createManagedBean(new zc(this.pinned)),this.dragAndDropService.addDropTarget(this)}},{key:"getIconName",value:function(){return this.currentDropListener.getIconName()}},{key:"isDropColumnInPivotMode",value:function(e){return this.columnModel.isPivotMode()&&0===e.dragSource.type}},{key:"onDragEnter",value:function(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}},{key:"onDragLeave",value:function(e){this.currentDropListener.onDragLeave(e)}},{key:"onDragging",value:function(e){this.currentDropListener.onDragging(e)}},{key:"onDragStop",value:function(e){this.currentDropListener.onDragStop(e)}}]),n}(kr);Mn([Di("dragAndDropService")],Kc.prototype,"dragAndDropService",2),Mn([Di("columnModel")],Kc.prototype,"columnModel",2),Mn([Di("ctrlsService")],Kc.prototype,"ctrlsService",2),Mn([Ei],Kc.prototype,"postConstruct",1),Mn([Ei],Kc.prototype,"init",1);var Yc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this,n.TEMPLATE,e)).headerCompVersion=0,i.column=e.getColumnGroupChild(),i.pinned=e.getPinned(),i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e,t,n=this,i=this.getGui();e="col-id",null!=(t=this.column.getColId())&&""!=t?i.setAttribute(e,t):i.removeAttribute(e);var r={setWidth:function(e){return i.style.width=e},addOrRemoveCssClass:function(e,t){return n.addOrRemoveCssClass(e,t)},setAriaSort:function(e){return e?To(i,e):Oo(i)},setUserCompDetails:function(e){return n.setUserCompDetails(e)},getUserCompInstance:function(){return n.headerComp}};this.ctrl.setComp(r,this.getGui(),this.eResize,this.eHeaderCompWrapper);var o=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",o)}},{key:"destroyHeaderComp",value:function(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}},{key:"setUserCompDetails",value:function(e){var t=this;this.headerCompVersion++;var n=this.headerCompVersion;e.newAgStackInstance().then((function(e){return t.afterCompCreated(n,e)}))}},{key:"afterCompCreated",value:function(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)}}]),n}(Ju);Yc.TEMPLATE='<div class="ag-header-cell" role="columnheader">\n            <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n            <div ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>\n        </div>',Mn([Ls("eResize")],Yc.prototype,"eResize",2),Mn([Ls("eHeaderCompWrapper")],Yc.prototype,"eHeaderCompWrapper",2),Mn([Ei],Yc.prototype,"postConstruct",1),Mn([xi],Yc.prototype,"destroyHeaderComp",1);var Xc=Yc,qc=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){return(0,a.Z)(this,n),t.call(this,n.TEMPLATE,e)}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this,t=this.getGui();t.setAttribute("col-id",this.ctrl.getColId());var n={addOrRemoveCssClass:function(t,n){return e.addOrRemoveCssClass(t,n)},setResizableDisplayed:function(t){return Sa(e.eResize,t)},setWidth:function(e){return t.style.width=e},setAriaExpanded:function(e){return n="aria-expanded",void 0!=(i=e)?t.setAttribute(n,i):t.removeAttribute(n);var n,i},setUserCompDetails:function(t){return e.setUserCompDetails(t)},getUserCompInstance:function(){return e.headerGroupComp}};this.ctrl.setComp(n,t,this.eResize)}},{key:"setUserCompDetails",value:function(e){var t=this;e.newAgStackInstance().then((function(e){return t.afterHeaderCompCreated(e)}))}},{key:"afterHeaderCompCreated",value:function(e){var t=this,n=function(){return t.destroyBean(e)};if(this.isAlive()){var i=this.getGui(),r=e.getGui();i.appendChild(r),this.addDestroyFunc(n),this.headerGroupComp=e,this.ctrl.setDragSource(i)}else n()}}]),n}(Ju);qc.TEMPLATE='<div class="ag-header-group-cell" role="columnheader">\n            <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n        </div>',Mn([Ls("eResize")],qc.prototype,"eResize",2),Mn([Ei],qc.prototype,"postConstruct",1);var Qc=qc,Jc=function(e){return e.COLUMN_GROUP="group",e.COLUMN="column",e.FLOATING_FILTER="filter",e}(Jc||{}),$c=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).headerComps={},i.ctrl=e,i.setTemplate('<div class="'.concat(i.ctrl.getHeaderRowClass(),'" role="row"></div>')),i}return(0,s.Z)(n,[{key:"init",value:function(){var e=this;Eo(this.getGui(),this.ctrl.getAriaRowIndex());var t={setHeight:function(t){return e.getGui().style.height=t},setTop:function(t){return e.getGui().style.top=t},setHeaderCtrls:function(t,n){return e.setHeaderCtrls(t,n)},setWidth:function(t){return e.getGui().style.width=t}};this.ctrl.setComp(t)}},{key:"destroyHeaderCtrls",value:function(){this.setHeaderCtrls([],!1)}},{key:"setHeaderCtrls",value:function(e,t){var n=this;if(this.isAlive()){var i=this.headerComps;if(this.headerComps={},e.forEach((function(e){var t=e.getInstanceId(),r=i[t];delete i[t],null==r&&(r=n.createHeaderComp(e),n.getGui().appendChild(r.getGui())),n.headerComps[t]=r})),Yn(i,(function(e,t){n.getGui().removeChild(t.getGui()),n.destroyBean(t)})),t){var r=Qn(this.headerComps);r.sort((function(e,t){return e.getCtrl().getColumnGroupChild().getLeft()-t.getCtrl().getColumnGroupChild().getLeft()}));var o=r.map((function(e){return e.getGui()}));Ha(this.getGui(),o)}}}},{key:"createHeaderComp",value:function(e){var t;switch(this.ctrl.getType()){case"group":t=new Qc(e);break;case"filter":t=new ec(e);break;default:t=new Xc(e)}return this.createBean(t),t.setParentComponent(this),t}}]),n}(Ns);Mn([Ei],$c.prototype,"init",1),Mn([xi],$c.prototype,"destroyHeaderCtrls",1);var ed=0,td=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r){var o;return(0,a.Z)(this,n),(o=t.call(this)).resizeToggleTimeout=0,o.resizeMultiplier=1,o.resizeFeature=null,o.lastFocusEvent=null,o.dragSource=null,o.columnGroupChild=e,o.parentRowCtrl=r,o.beans=i,o.instanceId=e.getUniqueId()+"-"+ed++,o}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.addManagedPropertyListeners(["suppressHeaderFocus"],(function(){return e.refreshTabIndex()}))}},{key:"shouldStopEventPropagation",value:function(e){var t=this.focusService.getFocusedHeader(),n=t.headerRowIndex,i=t.column;return vs(this.gridOptionsService,e,n,i)}},{key:"getWrapperHasFocus",value:function(){return this.gridOptionsService.getDocument().activeElement===this.eGui}},{key:"setGui",value:function(e){this.eGui=e,this.addDomData(),this.addManagedListener(this.beans.eventService,Er.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}},{key:"onDisplayedColumnsChanged",value:function(){this.comp&&this.column&&(this.refreshFirstAndLastStyles(),this.refreshAriaColIndex())}},{key:"refreshFirstAndLastStyles",value:function(){var e=this.comp,t=this.column,n=this.beans;fc.refreshFirstAndLastStyles(e,t,n.columnModel)}},{key:"refreshAriaColIndex",value:function(){var e=this.beans,t=this.column,n=e.columnModel.getAriaColumnIndex(t);Ro(this.eGui,n)}},{key:"addResizeAndMoveKeyboardListeners",value:function(){this.resizeFeature&&(this.addManagedListener(this.eGui,"keydown",this.onGuiKeyDown.bind(this)),this.addManagedListener(this.eGui,"keyup",this.onGuiKeyUp.bind(this)))}},{key:"refreshTabIndex",value:function(){this.gridOptionsService.get("suppressHeaderFocus")?this.eGui.removeAttribute("tabindex"):this.eGui.setAttribute("tabindex","-1")}},{key:"onGuiKeyDown",value:function(e){var t,n=this.gridOptionsService.getDocument().activeElement,i=e.key===hs.LEFT||e.key===hs.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),n===this.eGui&&(e.shiftKey||e.altKey)&&((this.isResizing||i)&&(e.preventDefault(),e.stopImmediatePropagation()),i)){var r=e.key===hs.LEFT!==this.gridOptionsService.get("enableRtl"),o=Yl[r?"Left":"Right"];if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;var a=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(a,e.shiftKey),null==(t=this.resizeFeature)||t.toggleColumnResizing(!0)}else this.moveHeader(o)}}},{key:"getViewportAdjustedResizeDiff",value:function(e){var t=this.getResizeDiff(e);if(this.column.getPinned()){var n=this.pinnedWidthService.getPinnedLeftWidth(),i=this.pinnedWidthService.getPinnedRightWidth(),r=Ta(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(n+i+t>r){if(!(r>n+i))return 0;t=r-n-i}}return t}},{key:"getResizeDiff",value:function(e){var t=e.key===hs.LEFT!==this.gridOptionsService.get("enableRtl"),n=this.column.getPinned(),i=this.gridOptionsService.get("enableRtl");return n&&i!==("right"===n)&&(t=!t),(t?-1:1)*this.resizeMultiplier}},{key:"onGuiKeyUp",value:function(){var e=this;this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=setTimeout((function(){var t;null==(t=e.resizeFeature)||t.toggleColumnResizing(!1)}),150))}},{key:"handleKeyDown",value:function(e){var t=this.getWrapperHasFocus();switch(e.key){case hs.PAGE_DOWN:case hs.PAGE_UP:case hs.PAGE_HOME:case hs.PAGE_END:t&&e.preventDefault()}}},{key:"addDomData",value:function(){var e=this,t=n.DOM_DATA_KEY_HEADER_CTRL;this.gridOptionsService.setDomData(this.eGui,t,this),this.addDestroyFunc((function(){return e.gridOptionsService.setDomData(e.eGui,t,null)}))}},{key:"getGui",value:function(){return this.eGui}},{key:"focus",value:function(e){return!!this.eGui&&(this.lastFocusEvent=e||null,this.eGui.focus(),!0)}},{key:"getRowIndex",value:function(){return this.parentRowCtrl.getRowIndex()}},{key:"getParentRowCtrl",value:function(){return this.parentRowCtrl}},{key:"getPinned",value:function(){return this.parentRowCtrl.getPinned()}},{key:"getInstanceId",value:function(){return this.instanceId}},{key:"getColumnGroupChild",value:function(){return this.columnGroupChild}},{key:"removeDragSource",value:function(){this.dragSource&&(this.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)}},{key:"handleContextMenuMouseEvent",value:function(e,t,n){var i=null!=e?e:t;this.gridOptionsService.get("preventDefaultOnContextMenu")&&i.preventDefault();var r=n instanceof Gi?n:void 0;this.menuService.isHeaderContextMenuEnabled(r)&&this.menuService.showHeaderContextMenu(r,e,t),this.dispatchColumnMouseEvent(Er.EVENT_COLUMN_HEADER_CONTEXT_MENU,n)}},{key:"dispatchColumnMouseEvent",value:function(e,t){var n={type:e,column:t};this.eventService.dispatchEvent(n)}},{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this),this.removeDragSource(),this.comp=null,this.column=null,this.resizeFeature=null,this.lastFocusEvent=null,this.columnGroupChild=null,this.parentRowCtrl=null,this.eGui=null}}]),n}(kr);td.DOM_DATA_KEY_HEADER_CTRL="headerCtrl",Mn([Di("pinnedWidthService")],td.prototype,"pinnedWidthService",2),Mn([Di("focusService")],td.prototype,"focusService",2),Mn([Di("userComponentFactory")],td.prototype,"userComponentFactory",2),Mn([Di("ctrlsService")],td.prototype,"ctrlsService",2),Mn([Di("dragAndDropService")],td.prototype,"dragAndDropService",2),Mn([Di("menuService")],td.prototype,"menuService",2),Mn([Ei],td.prototype,"postConstruct",1);var nd=td,id=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r,o){var s;return(0,a.Z)(this,n),(s=t.call(this)).columnOrGroup=e,s.eCell=i,s.ariaEl=s.eCell.querySelector("[role=columnheader]")||s.eCell,s.colsSpanning=o,s.beans=r,s}return(0,s.Z)(n,[{key:"setColsSpanning",value:function(e){this.colsSpanning=e,this.onLeftChanged()}},{key:"getColumnOrGroup",value:function(){return this.beans.gridOptionsService.get("enableRtl")&&this.colsSpanning?Ui(this.colsSpanning):this.columnOrGroup}},{key:"postConstruct",value:function(){this.addManagedListener(this.columnOrGroup,Gi.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime(),this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onLeftChanged.bind(this))}},{key:"setLeftFirstTime",value:function(){var e=this.beans.gridOptionsService.get("suppressColumnMoveAnimation"),t=Fn(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&t&&!e?this.animateInLeft():this.onLeftChanged()}},{key:"animateInLeft",value:function(){var e=this,t=this.getColumnOrGroup(),n=t.getLeft(),i=t.getOldLeft(),r=this.modifyLeftForPrintLayout(t,i),o=this.modifyLeftForPrintLayout(t,n);this.setLeft(r),this.actualLeft=o,this.beans.columnAnimationService.executeNextVMTurn((function(){e.actualLeft===o&&e.setLeft(o)}))}},{key:"onLeftChanged",value:function(){var e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}},{key:"modifyLeftForPrintLayout",value:function(e,t){if(!this.beans.gridOptionsService.isDomLayout("print"))return t;if("left"===e.getPinned())return t;var n=this.beans.columnModel.getDisplayedColumnsLeftWidth();return"right"===e.getPinned()?n+this.beans.columnModel.getBodyContainerWidth()+t:n+t}},{key:"setLeft",value:function(e){if(Fn(e)&&(this.eCell.style.left="".concat(e,"px")),this.columnOrGroup instanceof Gi)this.columnOrGroup;else{var t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&Do(this.ariaEl,t.length),t[0]}}}]),n}(kr);Mn([Ei],id.prototype,"postConstruct",1);var rd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i){var r;return(0,a.Z)(this,n),(r=t.call(this)).columns=e,r.element=i,r}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.gridOptionsService.get("columnHoverHighlight")&&this.addMouseHoverListeners()}},{key:"addMouseHoverListeners",value:function(){this.addManagedListener(this.element,"mouseout",this.onMouseOut.bind(this)),this.addManagedListener(this.element,"mouseover",this.onMouseOver.bind(this))}},{key:"onMouseOut",value:function(){this.columnHoverService.clearMouseOver()}},{key:"onMouseOver",value:function(){this.columnHoverService.setMouseOver(this.columns)}}]),n}(kr);Mn([Di("columnHoverService")],rd.prototype,"columnHoverService",2),Mn([Ei],rd.prototype,"postConstruct",1);var od=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r){var o;return(0,a.Z)(this,n),(o=t.call(this,e,i,r)).iconCreated=!1,o.column=e,o}return(0,s.Z)(n,[{key:"setComp",value:function(e,t,n,i){this.comp=e,this.eButtonShowMainFilter=n,this.eFloatingFilterBody=i,this.setGui(t),this.setupActive(),this.setupWidth(),this.setupLeft(),this.setupHover(),this.setupFocus(),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(),this.setupUi(),this.addManagedListener(this.eButtonShowMainFilter,"click",this.showParentFilter.bind(this)),this.setupFilterChangedListener(),this.addManagedListener(this.column,Gi.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))}},{key:"resizeHeader",value:function(){}},{key:"moveHeader",value:function(){}},{key:"setupActive",value:function(){var e=this.column.getColDef(),t=!!e.filter,n=!!e.floatingFilter;this.active=t&&n}},{key:"setupUi",value:function(){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){var e=cs("filter",this.gridOptionsService,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}}},{key:"setupFocus",value:function(){this.createManagedBean(new Hs(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}},{key:"setupAria",value:function(){var e=this.localeService.getLocaleTextFunc();so(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}},{key:"onTabKeyDown",value:function(e){if(!(this.gridOptionsService.getDocument().activeElement===this.eGui)){var t=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(t)return this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),void t.focus();var n=this.findNextColumnWithFloatingFilter(e.shiftKey);n&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:n},event:e})&&e.preventDefault()}}},{key:"findNextColumnWithFloatingFilter",value:function(e){var t=this.beans.columnModel,n=this.column;do{if(!(n=e?t.getDisplayedColBefore(n):t.getDisplayedColAfter(n)))break}while(!n.getColDef().filter||!n.getColDef().floatingFilter);return n}},{key:"handleKeyDown",value:function(e){(0,mn.Z)((0,yn.Z)(n.prototype),"handleKeyDown",this).call(this,e);var t=this.getWrapperHasFocus();switch(e.key){case hs.UP:case hs.DOWN:t||e.preventDefault();case hs.LEFT:case hs.RIGHT:if(t)return;e.stopPropagation();case hs.ENTER:t&&this.focusService.focusInto(this.eGui)&&e.preventDefault();break;case hs.ESCAPE:t||this.eGui.focus()}}},{key:"onFocusIn",value:function(e){if(!this.eGui.contains(e.relatedTarget)){var t=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),n=!!e.relatedTarget&&xa(e.relatedTarget,"ag-floating-filter");if(t&&n&&e.target===this.eGui){var i=this.lastFocusEvent,r=!(!i||i.key!==hs.TAB);if(i&&r){var o=i.shiftKey;this.focusService.focusInto(this.eGui,o)}}var a=this.getRowIndex();this.beans.focusService.setFocusedHeader(a,this.column)}}},{key:"setupHover",value:function(){var e=this;this.createManagedBean(new rd([this.column],this.eGui));var t=function(){if(e.gridOptionsService.get("columnHoverHighlight")){var t=e.beans.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",t)}};this.addManagedListener(this.eventService,Er.EVENT_COLUMN_HOVER_CHANGED,t),t()}},{key:"setupLeft",value:function(){var e=new id(this.column,this.eGui,this.beans);this.createManagedBean(e)}},{key:"setupFilterButton",value:function(){this.suppressFilterButton=!this.menuService.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!this.menuService.isLegacyMenuEnabled()}},{key:"setupUserComp",value:function(){var e=this;if(this.active){var t=this.beans.filterManager.getFloatingFilterCompDetails(this.column,(function(){return e.showParentFilter()}));t&&this.setCompDetails(t)}}},{key:"setCompDetails",value:function(e){this.userCompDetails=e,this.comp.setCompDetails(e)}},{key:"showParentFilter",value:function(){var e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuService.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}},{key:"setupSyncWithFilter",value:function(){var e=this;if(this.active){var t=this.beans.filterManager,n=function(n){var i=e.comp.getFloatingFilterComp();i&&i.then((function(i){if(i){var r=t.getCurrentFloatingFilterParentModel(e.column);i.onParentModelChanged(r,n)}}))};this.destroySyncListener=this.addManagedListener(this.column,Gi.EVENT_FILTER_CHANGED,n),t.isFilterActive(this.column)&&n(null)}}},{key:"setupWidth",value:function(){var e=this,t=function(){var t="".concat(e.column.getActualWidth(),"px");e.comp.setWidth(t)};this.addManagedListener(this.column,Gi.EVENT_WIDTH_CHANGED,t),t()}},{key:"setupFilterChangedListener",value:function(){this.active&&(this.destroyFilterChangedListener=this.addManagedListener(this.column,Gi.EVENT_FILTER_CHANGED,this.updateFilterButton.bind(this)),this.updateFilterButton())}},{key:"updateFilterButton",value:function(){if(!this.suppressFilterButton&&this.comp){var e=this.beans.filterManager.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}},{key:"onColDefChanged",value:function(){var e,t,n=this,i=this.active;this.setupActive();var r=!i&&this.active;i&&!this.active&&(null==(e=this.destroySyncListener)||e.call(this),null==(t=this.destroyFilterChangedListener)||t.call(this));var o=this.active?this.beans.filterManager.getFloatingFilterCompDetails(this.column,(function(){return n.showParentFilter()})):null,a=this.comp.getFloatingFilterComp();a&&o?a.then((function(e){var t;!e||n.beans.filterManager.areFilterCompsDifferent(null!=(t=n.userCompDetails)?t:null,o)?n.updateCompDetails(o,r):n.updateFloatingFilterParams(o)})):this.updateCompDetails(o,r)}},{key:"updateCompDetails",value:function(e,t){this.isAlive()&&(this.setCompDetails(e),this.setupFilterButton(),this.setupUi(),t&&(this.setupSyncWithFilter(),this.setupFilterChangedListener()))}},{key:"updateFloatingFilterParams",value:function(e){var t;if(e){var n=e.params;null==(t=this.comp.getFloatingFilterComp())||t.then((function(e){var t=!1;(null==e?void 0:e.refresh)&&"function"===typeof e.refresh&&(null!==e.refresh(n)&&(t=!0));!t&&(null==e?void 0:e.onParamsUpdated)&&"function"===typeof e.onParamsUpdated&&(null!==e.onParamsUpdated(n)&&oi("Custom floating filter method 'onParamsUpdated' is deprecated. Use 'refresh' instead."))}))}}},{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this),this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.destroySyncListener=null,this.destroyFilterChangedListener=null}}]),n}(nd),ad=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r,o,s){var l;return(0,a.Z)(this,n),(l=t.call(this)).pinned=e,l.column=i,l.eResize=r,l.comp=o,l.ctrl=s,l}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e,t,n=this,i=[],r=function(){i.forEach((function(e){return e()})),i.length=0},o=function(){var o=n.column.isResizable(),a=!n.gridOptionsService.get("suppressAutoSize")&&!n.column.getColDef().suppressAutoSize;(o!==e||a!==t)&&(e=o,t=a,r(),function(){if(Sa(n.eResize,e),e){var r=n.horizontalResizeService.addResizeBar({eResizeBar:n.eResize,onResizeStart:n.onResizeStart.bind(n),onResizing:n.onResizing.bind(n,!1),onResizeEnd:n.onResizing.bind(n,!0)});if(i.push(r),t){var o=n.gridOptionsService.get("skipHeaderOnAutoSize"),a=function(){n.columnModel.autoSizeColumn(n.column,"uiColumnResized",o)};n.eResize.addEventListener("dblclick",a);var s=new Ol(n.eResize);s.addEventListener(Ol.EVENT_DOUBLE_TAP,a),i.push((function(){n.eResize.removeEventListener("dblclick",a),s.removeEventListener(Ol.EVENT_DOUBLE_TAP,a),s.destroy()}))}}}())};o(),this.addDestroyFunc(r),this.ctrl.addRefreshFunction(o)}},{key:"onResizing",value:function(e,t){var n=this.column,i=this.lastResizeAmount,r=this.resizeStartWidth,o=this.normaliseResizeAmount(t),a=[{key:n,newWidth:r+o}];if(this.column.getPinned()&&this.pinnedWidthService.getPinnedLeftWidth()+this.pinnedWidthService.getPinnedRightWidth()+(o-i)>Ta(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50)return;this.lastResizeAmount=o,this.columnModel.setColumnWidths(a,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}},{key:"onResizeStart",value:function(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}},{key:"toggleColumnResizing",value:function(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}},{key:"normaliseResizeAmount",value:function(e){var t=e,n="left"!==this.pinned,i="right"===this.pinned;return this.gridOptionsService.get("enableRtl")?n&&(t*=-1):i&&(t*=-1),t}}]),n}(kr);Mn([Di("horizontalResizeService")],ad.prototype,"horizontalResizeService",2),Mn([Di("pinnedWidthService")],ad.prototype,"pinnedWidthService",2),Mn([Di("ctrlsService")],ad.prototype,"ctrlsService",2),Mn([Di("columnModel")],ad.prototype,"columnModel",2),Mn([Ei],ad.prototype,"postConstruct",1);var sd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).cbSelectAllVisible=!1,i.processingEventFromCheckbox=!1,i.column=e,i}return(0,s.Z)(n,[{key:"onSpaceKeyDown",value:function(e){var t=this.cbSelectAll,n=this.gridOptionsService.getDocument();t.isDisplayed()&&!t.getGui().contains(n.activeElement)&&(e.preventDefault(),t.setValue(!t.getValue()))}},{key:"getCheckboxGui",value:function(){return this.cbSelectAll.getGui()}},{key:"setComp",value:function(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new tl),this.cbSelectAll.addCssClass("ag-header-select-all"),no(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedListener(this.eventService,Er.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_PAGINATION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addManagedListener(this.cbSelectAll,Er.EVENT_FIELD_VALUE_CHANGED,this.onCbSelectAll.bind(this)),go(this.cbSelectAll.getGui(),!0),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}},{key:"onNewColumnsLoaded",value:function(){this.showOrHideSelectAll()}},{key:"onDisplayedColumnsChanged",value:function(){this.isAlive()&&this.showOrHideSelectAll()}},{key:"showOrHideSelectAll",value:function(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible,{skipAriaHidden:!0}),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()}},{key:"onModelChanged",value:function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}},{key:"onSelectionChanged",value:function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}},{key:"updateStateOfCheckbox",value:function(){if(!this.processingEventFromCheckbox){this.processingEventFromCheckbox=!0;var e=this.selectionService.getSelectAllState(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setValue(e);var t=this.selectionService.hasNodesToSelect(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setDisabled(!t),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}}},{key:"refreshSelectAllLabel",value:function(){var e=this.localeService.getLocaleTextFunc(),t=this.cbSelectAll.getValue()?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),n=e("ariaRowSelectAll","Press Space to toggle all rows selection");this.cbSelectAllVisible?this.headerCellCtrl.setAriaDescriptionProperty("selectAll","".concat(n," (").concat(t,")")):this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel("".concat(n," (").concat(t,")")),this.headerCellCtrl.announceAriaDescription()}},{key:"checkSelectionType",value:function(e){return!("multiple"!==this.gridOptionsService.get("rowSelection"))||(console.warn("AG Grid: ".concat(e," is only available if using 'multiple' rowSelection.")),!1)}},{key:"checkRightRowModelType",value:function(e){var t=this.rowModel.getType();return!("clientSide"!==t&&"serverSide"!==t)||(console.warn("AG Grid: ".concat(e," is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ").concat(t,".")),!1)}},{key:"onCbSelectAll",value:function(){if(!this.processingEventFromCheckbox&&this.cbSelectAllVisible){var e=this.cbSelectAll.getValue(),t=this.isFilteredOnly(),n=this.isCurrentPageOnly(),i="uiSelectAll";n?i="uiSelectAllCurrentPage":t&&(i="uiSelectAllFiltered");var r={source:i,justFiltered:t,justCurrentPage:n};e?this.selectionService.selectAllRowNodes(r):this.selectionService.deselectAllRowNodes(r)}}},{key:"isCheckboxSelection",value:function(){var e=this.column.getColDef().headerCheckboxSelection;"function"===typeof e&&(e=e(this.gridOptionsService.addGridCommonParams({column:this.column,colDef:this.column.getColDef()})));return!!e&&(this.checkRightRowModelType("headerCheckboxSelection")&&this.checkSelectionType("headerCheckboxSelection"))}},{key:"isFilteredOnly",value:function(){return!!this.column.getColDef().headerCheckboxSelectionFilteredOnly}},{key:"isCurrentPageOnly",value:function(){return!!this.column.getColDef().headerCheckboxSelectionCurrentPageOnly}}]),n}(kr);Mn([Di("rowModel")],sd.prototype,"rowModel",2),Mn([Di("selectionService")],sd.prototype,"selectionService",2);var ld=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r){var o;return(0,a.Z)(this,n),(o=t.call(this,e,i,r)).refreshFunctions=[],o.userHeaderClasses=new Set,o.ariaDescriptionProperties=new Map,o.column=e,o}return(0,s.Z)(n,[{key:"setComp",value:function(e,t,n,i){var r=this;this.comp=e,this.setGui(t),this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight(i),this.addColumnHoverListener(),this.setupFilterClass(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.refreshAria(),this.resizeFeature=this.createManagedBean(new ad(this.getPinned(),this.column,n,e,this)),this.createManagedBean(new rd([this.column],t)),this.createManagedBean(new id(this.column,t,this.beans)),this.createManagedBean(new Hs(t,{shouldStopEventPropagation:function(e){return r.shouldStopEventPropagation(e)},onTabKeyDown:function(){return null},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(),this.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader"],this.refresh.bind(this)),this.addManagedListener(this.column,Gi.EVENT_COL_DEF_CHANGED,this.refresh.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_PIVOT_CHANGED,this.onColumnPivotChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))}},{key:"resizeHeader",value:function(e,t){var n,i;if(this.column.isResizable()){var r=this.column.getActualWidth(),o=null!=(n=this.column.getMinWidth())?n:0,a=null!=(i=this.column.getMaxWidth())?i:Number.MAX_SAFE_INTEGER,s=Math.min(Math.max(r+e,o),a);this.beans.columnModel.setColumnWidths([{key:this.column,newWidth:s}],t,!0,"uiColumnResized")}}},{key:"moveHeader",value:function(e){var t=this.eGui,n=this.column,i=this.gridOptionsService,r=this.ctrlsService,o=this.getPinned(),a=t.getBoundingClientRect().left,s=n.getActualWidth(),l=0===e!==i.get("enableRtl"),u=Uc.normaliseX(l?a-20:a+s+20,o,!0,i,r);Uc.attemptMoveColumns({allMovingColumns:[n],isFromHeader:!0,hDirection:e,xPosition:u,pinned:o,fromEnter:!1,fakeEvent:!1,gridOptionsService:i,columnModel:this.beans.columnModel}),r.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(n,"auto")}},{key:"setupUserComp",value:function(){var e=this.lookupUserCompDetails();this.setCompDetails(e)}},{key:"setCompDetails",value:function(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}},{key:"lookupUserCompDetails",value:function(){var e=this.createParams(),t=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(t,e)}},{key:"createParams",value:function(){var e=this;return this.gridOptionsService.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:function(t){e.menuService.showColumnMenu({column:e.column,buttonElement:t,positionBy:"button"})},showColumnMenuAfterMouseClick:function(t){e.menuService.showColumnMenu({column:e.column,mouseEvent:t,positionBy:"mouse"})},showFilter:function(t){e.menuService.showFilterMenu({column:e.column,buttonElement:t,containerType:"columnFilter",positionBy:"button"})},progressSort:function(t){e.beans.sortController.progressSort(e.column,!!t,"uiColumnSorted")},setSort:function(t,n){e.beans.sortController.setSortForColumn(e.column,t,!!n,"uiColumnSorted")},eGridHeader:this.getGui(),setTooltip:function(t,n){e.setupTooltip(t,n)}})}},{key:"setupSelectAll",value:function(){this.selectAllFeature=this.createManagedBean(new sd(this.column)),this.selectAllFeature.setComp(this)}},{key:"getSelectAllGui",value:function(){return this.selectAllFeature.getCheckboxGui()}},{key:"handleKeyDown",value:function(e){(0,mn.Z)((0,yn.Z)(n.prototype),"handleKeyDown",this).call(this,e),e.key===hs.SPACE&&this.selectAllFeature.onSpaceKeyDown(e),e.key===hs.ENTER&&this.onEnterKeyDown(e),e.key===hs.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}},{key:"onEnterKeyDown",value:function(e){if(e.ctrlKey||e.metaKey)this.showMenuOnKeyPress(e,!0);else if(this.sortable){var t=e.shiftKey;this.beans.sortController.progressSort(this.column,t,"uiColumnSorted")}}},{key:"showMenuOnKeyPress",value:function(e,t){var n=this.comp.getUserCompInstance();n&&n instanceof Nl&&n.onMenuKeyboardShortcut(t)&&e.preventDefault()}},{key:"onFocusIn",value:function(e){if(!this.getGui().contains(e.relatedTarget)){var t=this.getRowIndex();this.focusService.setFocusedHeader(t,this.column),this.announceAriaDescription()}this.focusService.isKeyboardMode()&&this.setActiveHeader(!0)}},{key:"onFocusOut",value:function(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)}},{key:"setupTooltip",value:function(e,t){var n=this;this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));var i="whenTruncated"===this.gridOptionsService.get("tooltipShowMode"),r=this.eGui,o=this.column.getColDef();t||!i||o.headerComponent||(t=function(){var e=r.querySelector(".ag-header-cell-text");return!e||e.scrollWidth>e.clientWidth});var a={getColumn:function(){return n.column},getColDef:function(){return n.column.getColDef()},getGui:function(){return r},getLocation:function(){return"header"},getTooltipValue:function(){return null!=e?e:n.column.getColDef().headerTooltip},shouldDisplayTooltip:t},s=this.createManagedBean(new Ps(a));this.refreshFunctions.push((function(){return s.refreshToolTip()}))}},{key:"setupClassesFromColDef",value:function(){var e=this,t=function(){var t=e.column.getColDef(),n=fc.getHeaderClassesFromColDef(t,e.gridOptionsService,e.column,null),i=e.userHeaderClasses;e.userHeaderClasses=new Set(n),n.forEach((function(t){i.has(t)?i.delete(t):e.comp.addOrRemoveCssClass(t,!0)})),i.forEach((function(t){return e.comp.addOrRemoveCssClass(t,!1)}))};this.refreshFunctions.push(t),t()}},{key:"setDragSource",value:function(e){var t=this;if(this.dragSourceElement=e,this.removeDragSource(),e&&this.draggable){var n=this.column,i=this.beans,r=this.displayName,o=this.dragAndDropService,a=this.gridOptionsService,s=i.columnModel,l=!this.gridOptionsService.get("suppressDragLeaveHidesColumns"),u=this.dragSource={type:1,eElement:e,getDefaultIconName:function(){return l?Xl.ICON_HIDE:Xl.ICON_NOT_ALLOWED},getDragItem:function(){return t.createDragItem(n)},dragItemName:r,onDragStarted:function(){l=!a.get("suppressDragLeaveHidesColumns"),n.setMoving(!0,"uiColumnMoved")},onDragStopped:function(){return n.setMoving(!1,"uiColumnMoved")},onGridEnter:function(e){var t;if(l){var n=(null==(t=null==e?void 0:e.columns)?void 0:t.filter((function(e){return!e.getColDef().lockVisible})))||[];s.setColumnsVisible(n,!0,"uiColumnMoved")}},onGridExit:function(e){var t;if(l){var n=(null==(t=null==e?void 0:e.columns)?void 0:t.filter((function(e){return!e.getColDef().lockVisible})))||[];s.setColumnsVisible(n,!1,"uiColumnMoved")}}};o.addDragSource(u,!0)}}},{key:"createDragItem",value:function(e){var t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}},{key:"updateState",value:function(){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()}},{key:"addRefreshFunction",value:function(e){this.refreshFunctions.push(e)}},{key:"refresh",value:function(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),this.refreshFunctions.forEach((function(e){return e()}))}},{key:"refreshHeaderComp",value:function(){var e=this.lookupUserCompDetails();!!(null!=this.comp.getUserCompInstance()&&this.userCompDetails.componentClass==e.componentClass)&&this.attemptHeaderCompRefresh(e.params)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}},{key:"attemptHeaderCompRefresh",value:function(e){var t=this.comp.getUserCompInstance();return!!t&&(!!t.refresh&&t.refresh(e))}},{key:"calculateDisplayName",value:function(){return this.beans.columnModel.getDisplayNameForColumn(this.column,"header",!0)}},{key:"checkDisplayName",value:function(){this.displayName!==this.calculateDisplayName()&&this.refresh()}},{key:"workOutDraggable",value:function(){var e=this.column.getColDef();return!!(!this.gridOptionsService.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}},{key:"onColumnRowGroupChanged",value:function(){this.checkDisplayName()}},{key:"onColumnPivotChanged",value:function(){this.checkDisplayName()}},{key:"onColumnValueChanged",value:function(){this.checkDisplayName()}},{key:"setupWidth",value:function(){var e=this,t=function(){var t=e.column.getActualWidth();e.comp.setWidth("".concat(t,"px"))};this.addManagedListener(this.column,Gi.EVENT_WIDTH_CHANGED,t),t()}},{key:"setupMovingCss",value:function(){var e=this,t=function(){e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.column.isMoving())};this.addManagedListener(this.column,Gi.EVENT_MOVING_CHANGED,t),t()}},{key:"setupMenuClass",value:function(){var e=this,t=function(){e.comp.addOrRemoveCssClass("ag-column-menu-visible",e.column.isMenuVisible())};this.addManagedListener(this.column,Gi.EVENT_MENU_VISIBLE_CHANGED,t),t()}},{key:"setupSortableClass",value:function(){var e=this,t=function(){e.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!e.sortable)};t(),this.addRefreshFunction(t),this.addManagedListener(this.eventService,Gi.EVENT_SORT_CHANGED,this.refreshAriaSort.bind(this))}},{key:"setupFilterClass",value:function(){var e=this,t=function(){var t=e.column.isFilterActive();e.comp.addOrRemoveCssClass("ag-header-cell-filtered",t),e.refreshAria()};this.addManagedListener(this.column,Gi.EVENT_FILTER_ACTIVE_CHANGED,t),t()}},{key:"setupWrapTextClass",value:function(){var e=this,t=function(){var t=!!e.column.getColDef().wrapHeaderText;e.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",t)};t(),this.addRefreshFunction(t)}},{key:"onDisplayedColumnsChanged",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"onDisplayedColumnsChanged",this).call(this),this.isAlive()&&this.onHeaderHeightChanged()}},{key:"onHeaderHeightChanged",value:function(){this.refreshSpanHeaderHeight()}},{key:"refreshSpanHeaderHeight",value:function(){var e=this.eGui,t=this.column,n=this.comp,i=this.beans;if(!t.isSpanHeaderHeight())return e.style.removeProperty("top"),e.style.removeProperty("height"),n.addOrRemoveCssClass("ag-header-span-height",!1),void n.addOrRemoveCssClass("ag-header-span-total",!1);var r=this.column.getColumnGroupPaddingInfo(),o=r.numberOfParents,a=r.isSpanningTotal;n.addOrRemoveCssClass("ag-header-span-height",o>0);var s=i.columnModel,l=s.getColumnHeaderRowHeight();if(0===o)return n.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),void e.style.setProperty("height","".concat(l,"px"));n.addOrRemoveCssClass("ag-header-span-total",a);var u=o*(s.isPivotMode()?s.getPivotGroupHeaderHeight():s.getGroupHeaderHeight());e.style.setProperty("top","".concat(-u,"px")),e.style.setProperty("height","".concat(l+u,"px"))}},{key:"setupAutoHeight",value:function(e){var t,n=this,i=this.beans,r=i.columnModel,o=i.resizeObserverService,a=function t(i){if(n.isAlive()){var o=Ra(n.getGui()),a=o.paddingTop+o.paddingBottom+o.borderBottomWidth+o.borderTopWidth,s=e.offsetHeight+a;if(i<5){var l=n.beans.gridOptionsService.getDocument();if(!l||!l.contains(e)||0==s)return void window.setTimeout((function(){return t(i+1)}),0)}r.setColumnHeaderHeight(n.column,s)}},s=!1,l=function(){var e=n.column.isAutoHeaderHeight();e&&!s&&u(),!e&&s&&c()},u=function(){s=!0,a(0),n.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),t=o.observeResize(e,(function(){return a(0)}))},c=function(){s=!1,t&&t(),n.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),t=void 0};l(),this.addDestroyFunc((function(){return c()})),this.addManagedListener(this.column,Gi.EVENT_WIDTH_CHANGED,(function(){return s&&a(0)})),this.addManagedListener(this.eventService,Gi.EVENT_SORT_CHANGED,(function(){s&&window.setTimeout((function(){return a(0)}))})),this.addRefreshFunction(l)}},{key:"refreshAriaSort",value:function(){if(this.sortable){var e=this.localeService.getLocaleTextFunc(),t=this.beans.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(io(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}},{key:"refreshAriaMenu",value:function(){if(this.menuEnabled){var e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}},{key:"refreshAriaFilterButton",value:function(){if(this.openFilterEnabled&&!this.menuService.isLegacyMenuEnabled()){var e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}},{key:"refreshAriaFiltered",value:function(){var e=this.localeService.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}},{key:"setAriaDescriptionProperty",value:function(e,t){null!=t?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}},{key:"announceAriaDescription",value:function(){var e=this,t=this.beans.gridOptionsService.getDocument();if(this.eGui.contains(t.activeElement)){var n=Array.from(this.ariaDescriptionProperties.keys()).sort((function(e,t){return"filter"===e?-1:t.charCodeAt(0)-e.charCodeAt(0)})).map((function(t){return e.ariaDescriptionProperties.get(t)})).join(". ");this.beans.ariaAnnouncementService.announceValue(n)}}},{key:"refreshAria",value:function(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}},{key:"addColumnHoverListener",value:function(){var e=this,t=function(){if(e.gridOptionsService.get("columnHoverHighlight")){var t=e.beans.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",t)}};this.addManagedListener(this.eventService,Er.EVENT_COLUMN_HOVER_CHANGED,t),t()}},{key:"getColId",value:function(){return this.column.getColId()}},{key:"addActiveHeaderMouseListeners",value:function(){var e=this,t=function(t){return e.handleMouseOverChange("mouseenter"===t.type)};this.addManagedListener(this.getGui(),"mouseenter",t),this.addManagedListener(this.getGui(),"mouseleave",t),this.addManagedListener(this.getGui(),"click",(function(){return e.dispatchColumnMouseEvent(Er.EVENT_COLUMN_HEADER_CLICKED,e.column)})),this.addManagedListener(this.getGui(),"contextmenu",(function(t){return e.handleContextMenuMouseEvent(t,void 0,e.column)}))}},{key:"handleMouseOverChange",value:function(e){this.setActiveHeader(e);var t={type:e?Er.EVENT_COLUMN_HEADER_MOUSE_OVER:Er.EVENT_COLUMN_HEADER_MOUSE_LEAVE,column:this.column};this.eventService.dispatchEvent(t)}},{key:"setActiveHeader",value:function(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}},{key:"getAnchorElementForMenu",value:function(e){var t=this.comp.getUserCompInstance();return t instanceof Nl?t.getAnchorElementForMenu(e):this.getGui()}},{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this),this.refreshFunctions=null,this.selectAllFeature=null,this.dragSourceElement=null,this.userCompDetails=null,this.userHeaderClasses=null,this.ariaDescriptionProperties=null}}]),n}(nd),ud=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r,o){var s;return(0,a.Z)(this,n),(s=t.call(this)).eResize=i,s.comp=e,s.pinned=r,s.columnGroup=o,s}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;if(this.columnGroup.isResizable()){var t=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(t),!this.gridOptionsService.get("suppressAutoSize")){var n=this.gridOptionsService.get("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",(function(){var t=[];e.columnGroup.getDisplayedLeafColumns().forEach((function(e){e.getColDef().suppressAutoSize||t.push(e.getColId())})),t.length>0&&e.columnModel.autoSizeColumns({columns:t,skipHeader:n,stopAtGroup:e.columnGroup,source:"uiColumnResized"}),e.resizeLeafColumnsToFit("uiColumnResized")}))}}else this.comp.setResizableDisplayed(!1)}},{key:"onResizeStart",value:function(e){var t=this.getInitialValues(e);this.storeLocalValues(t),this.toggleColumnResizing(!0)}},{key:"onResizing",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"uiColumnResized",i=this.normaliseDragChange(t),r=this.resizeStartWidth+i;this.resizeColumnsFromLocalValues(r,n,e)}},{key:"getInitialValues",value:function(e){var t=this.getColumnsToResize(),n=this.getInitialSizeOfColumns(t),i={columnsToResize:t,resizeStartWidth:n,resizeRatios:this.getSizeRatiosOfColumns(t,n)},r=null;if(e&&(r=this.columnModel.getDisplayedGroupAfter(this.columnGroup)),r){var o=r.getDisplayedLeafColumns(),a=i.groupAfterColumns=o.filter((function(e){return e.isResizable()})),s=i.groupAfterStartWidth=this.getInitialSizeOfColumns(a);i.groupAfterRatios=this.getSizeRatiosOfColumns(a,s)}else i.groupAfterColumns=void 0,i.groupAfterStartWidth=void 0,i.groupAfterRatios=void 0;return i}},{key:"storeLocalValues",value:function(e){var t=e.columnsToResize,n=e.resizeStartWidth,i=e.resizeRatios,r=e.groupAfterColumns,o=e.groupAfterStartWidth,a=e.groupAfterRatios;this.resizeCols=t,this.resizeStartWidth=n,this.resizeRatios=i,this.resizeTakeFromCols=r,this.resizeTakeFromStartWidth=o,this.resizeTakeFromRatios=a}},{key:"clearLocalValues",value:function(){this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},{key:"resizeLeafColumnsToFit",value:function(e){var t=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup),n=this.getInitialValues();t>n.resizeStartWidth&&this.resizeColumns(n,t,e,!0)}},{key:"resizeColumnsFromLocalValues",value:function(e,t){var n,i,r,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this.resizeCols&&this.resizeRatios){var a={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:null!=(n=this.resizeTakeFromCols)?n:void 0,groupAfterStartWidth:null!=(i=this.resizeTakeFromStartWidth)?i:void 0,groupAfterRatios:null!=(r=this.resizeTakeFromRatios)?r:void 0};this.resizeColumns(a,e,t,o)}}},{key:"resizeColumns",value:function(e,t,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=e.columnsToResize,o=e.resizeStartWidth,a=e.resizeRatios,s=e.groupAfterColumns,l=e.groupAfterStartWidth,u=e.groupAfterRatios,c=[];if(c.push({columns:r,ratios:a,width:t}),s){var d=t-o;c.push({columns:s,ratios:u,width:l-d})}this.columnModel.resizeColumnSets({resizeSets:c,finished:i,source:n}),i&&this.toggleColumnResizing(!1)}},{key:"toggleColumnResizing",value:function(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}},{key:"getColumnsToResize",value:function(){return this.columnGroup.getDisplayedLeafColumns().filter((function(e){return e.isResizable()}))}},{key:"getInitialSizeOfColumns",value:function(e){return e.reduce((function(e,t){return e+t.getActualWidth()}),0)}},{key:"getSizeRatiosOfColumns",value:function(e,t){return e.map((function(e){return e.getActualWidth()/t}))}},{key:"normaliseDragChange",value:function(e){var t=e;return this.gridOptionsService.get("enableRtl")?"left"!==this.pinned&&(t*=-1):"right"===this.pinned&&(t*=-1),t}},{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this),this.clearLocalValues()}}]),n}(kr);Mn([Di("horizontalResizeService")],ud.prototype,"horizontalResizeService",2),Mn([Di("autoWidthCalculator")],ud.prototype,"autoWidthCalculator",2),Mn([Di("columnModel")],ud.prototype,"columnModel",2),Mn([Ei],ud.prototype,"postConstruct",1);var cd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i){var r;return(0,a.Z)(this,n),(r=t.call(this)).removeChildListenersFuncs=[],r.columnGroup=i,r.comp=e,r}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.addListenersToChildrenColumns(),this.addManagedListener(this.columnGroup,br.EVENT_DISPLAYED_CHILDREN_CHANGED,this.onDisplayedChildrenChanged.bind(this)),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}},{key:"addListenersToChildrenColumns",value:function(){var e=this;this.removeListenersOnChildrenColumns();var t=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach((function(n){n.addEventListener("widthChanged",t),n.addEventListener("visibleChanged",t),e.removeChildListenersFuncs.push((function(){n.removeEventListener("widthChanged",t),n.removeEventListener("visibleChanged",t)}))}))}},{key:"removeListenersOnChildrenColumns",value:function(){this.removeChildListenersFuncs.forEach((function(e){return e()})),this.removeChildListenersFuncs=[]}},{key:"onDisplayedChildrenChanged",value:function(){this.addListenersToChildrenColumns(),this.onWidthChanged()}},{key:"onWidthChanged",value:function(){var e=this.columnGroup.getActualWidth();this.comp.setWidth("".concat(e,"px")),this.comp.addOrRemoveCssClass("ag-hidden",0===e)}}]),n}(kr);Mn([Ei],cd.prototype,"postConstruct",1);var dd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r){var o;return(0,a.Z)(this,n),(o=t.call(this,e,i,r)).onSuppressColMoveChange=function(){if(!o.isAlive()||o.isSuppressMoving())o.removeDragSource();else if(!o.dragSource){var e=o.getGui();o.setDragSource(e)}},o.column=e,o}return(0,s.Z)(n,[{key:"setComp",value:function(e,t,n){var i=this;this.comp=e,this.setGui(t),this.displayName=this.beans.columnModel.getDisplayNameForColumnGroup(this.column,"header"),this.addClasses(),this.setupMovingCss(),this.setupExpandable(),this.setupTooltip(),this.addDestroyFunc((function(){i.tooltipFeature&&(i.tooltipFeature=i.destroyBean(i.tooltipFeature))})),this.setupUserComp(),this.addHeaderMouseListeners();var r=this.getParentRowCtrl().getPinned(),o=this.column.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new rd(o,t)),this.createManagedBean(new id(this.column,t,this.beans)),this.createManagedBean(new cd(e,this.column)),this.resizeFeature=this.createManagedBean(new ud(e,n,r,this.column)),this.createManagedBean(new Hs(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:function(){},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addManagedPropertyListener(Er.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners()}},{key:"resizeHeader",value:function(e,t){if(this.resizeFeature){var n=this.resizeFeature.getInitialValues(t);this.resizeFeature.resizeColumns(n,n.resizeStartWidth+e,"uiColumnResized",!0)}}},{key:"moveHeader",value:function(e){var t=this.beans,n=this.eGui,i=this.column,r=this.gridOptionsService,o=this.ctrlsService,a=r.get("enableRtl"),s=0===e,l=this.getPinned(),u=n.getBoundingClientRect(),c=u.left,d=u.width,h=Uc.normaliseX(s!==a?c-20:c+d+20,l,!0,r,o),p=i.getGroupId(),f=this.focusService.getFocusedHeader();Uc.attemptMoveColumns({allMovingColumns:this.column.getLeafColumns(),isFromHeader:!0,hDirection:e,xPosition:h,pinned:l,fromEnter:!1,fakeEvent:!1,gridOptionsService:r,columnModel:t.columnModel});var v=i.getDisplayedLeafColumns(),g=s?v[0]:Ui(v);this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(g,"auto"),!this.isAlive()&&f&&this.restoreFocus(p,i,f)}},{key:"restoreFocus",value:function(e,t,n){var i=t.getLeafColumns();if(i.length){var r=i[0].getParent();if(r){var o=this.findGroupWidthId(r,e);o&&this.focusService.focusHeaderPosition({headerPosition:On(Tn({},n),{column:o})})}}}},{key:"findGroupWidthId",value:function(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}return null}},{key:"resizeLeafColumnsToFit",value:function(e){this.resizeFeature&&this.resizeFeature.resizeLeafColumnsToFit(e)}},{key:"setupUserComp",value:function(){var e=this,t=this.gridOptionsService.addGridCommonParams({displayName:this.displayName,columnGroup:this.column,setExpanded:function(t){e.beans.columnModel.setColumnGroupOpened(e.column.getProvidedColumnGroup(),t,"gridInitializing")},setTooltip:function(t,n){e.setupTooltip(t,n)}}),n=this.userComponentFactory.getHeaderGroupCompDetails(t);this.comp.setUserCompDetails(n)}},{key:"addHeaderMouseListeners",value:function(){var e=this,t=function(t){return e.handleMouseOverChange("mouseenter"===t.type)};this.addManagedListener(this.getGui(),"mouseenter",t),this.addManagedListener(this.getGui(),"mouseleave",t),this.addManagedListener(this.getGui(),"click",(function(){return e.dispatchColumnMouseEvent(Er.EVENT_COLUMN_HEADER_CLICKED,e.column.getProvidedColumnGroup())})),this.addManagedListener(this.getGui(),"contextmenu",(function(t){return e.handleContextMenuMouseEvent(t,void 0,e.column.getProvidedColumnGroup())}))}},{key:"handleMouseOverChange",value:function(e){var t={type:e?Er.EVENT_COLUMN_HEADER_MOUSE_OVER:Er.EVENT_COLUMN_HEADER_MOUSE_LEAVE,column:this.column.getProvidedColumnGroup()};this.eventService.dispatchEvent(t)}},{key:"setupTooltip",value:function(e,t){var n=this;this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));var i=this.column.getColGroupDef(),r="whenTruncated"===this.gridOptionsService.get("tooltipShowMode"),o=this.eGui;t||!r||(null==i?void 0:i.headerGroupComponent)||(t=function(){var e=o.querySelector(".ag-header-group-text");return!e||e.scrollWidth>e.clientWidth});var a={getColumn:function(){return n.column},getGui:function(){return o},getLocation:function(){return"headerGroup"},getTooltipValue:function(){return null!=e?e:i&&i.headerTooltip},shouldDisplayTooltip:t};i&&(a.getColDef=function(){return i}),this.createBean(new Ps(a))}},{key:"setupExpandable",value:function(){var e=this.column.getProvidedColumnGroup();this.refreshExpanded(),this.addManagedListener(e,Vi.EVENT_EXPANDABLE_CHANGED,this.refreshExpanded.bind(this)),this.addManagedListener(e,Vi.EVENT_EXPANDED_CHANGED,this.refreshExpanded.bind(this))}},{key:"refreshExpanded",value:function(){var e=this.column;this.expandable=e.isExpandable();var t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0)}},{key:"getColId",value:function(){return this.column.getUniqueId()}},{key:"addClasses",value:function(){var e=this,t=this.column.getColGroupDef(),n=fc.getHeaderClassesFromColDef(t,this.gridOptionsService,null,this.column);this.column.isPadding()?(n.push("ag-header-group-cell-no-group"),this.column.getLeafColumns().every((function(e){return e.isSpanHeaderHeight()}))&&n.push("ag-header-span-height")):n.push("ag-header-group-cell-with-group");n.forEach((function(t){return e.comp.addOrRemoveCssClass(t,!0)}))}},{key:"setupMovingCss",value:function(){var e=this,t=this.column.getProvidedColumnGroup().getLeafColumns(),n=function(){return e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.column.isMoving())};t.forEach((function(t){e.addManagedListener(t,Gi.EVENT_MOVING_CHANGED,n)})),n()}},{key:"onFocusIn",value:function(e){if(!this.eGui.contains(e.relatedTarget)){var t=this.getRowIndex();this.beans.focusService.setFocusedHeader(t,this.column)}}},{key:"handleKeyDown",value:function(e){(0,mn.Z)((0,yn.Z)(n.prototype),"handleKeyDown",this).call(this,e);var t=this.getWrapperHasFocus();if(this.expandable&&t&&e.key===hs.ENTER){var i=this.column,r=!i.isExpanded();this.beans.columnModel.setColumnGroupOpened(i.getProvidedColumnGroup(),r,"uiColumnExpanded")}}},{key:"setDragSource",value:function(e){var t=this;if(this.isAlive()&&!this.isSuppressMoving()&&(this.removeDragSource(),e)){var n=this.beans,i=this.column,r=this.displayName,o=this.gridOptionsService,a=this.dragAndDropService,s=n.columnModel,l=i.getProvidedColumnGroup().getLeafColumns(),u=!o.get("suppressDragLeaveHidesColumns"),c=this.dragSource={type:1,eElement:e,getDefaultIconName:function(){return u?Xl.ICON_HIDE:Xl.ICON_NOT_ALLOWED},dragItemName:r,getDragItem:function(){return t.getDragItemForGroup(i)},onDragStarted:function(){u=!o.get("suppressDragLeaveHidesColumns"),l.forEach((function(e){return e.setMoving(!0,"uiColumnDragged")}))},onDragStopped:function(){return l.forEach((function(e){return e.setMoving(!1,"uiColumnDragged")}))},onGridEnter:function(e){var t;if(u){var n=(null==(t=null==e?void 0:e.columns)?void 0:t.filter((function(e){return!e.getColDef().lockVisible})))||[];s.setColumnsVisible(n,!0,"uiColumnMoved")}},onGridExit:function(e){var t;if(u){var n=(null==(t=null==e?void 0:e.columns)?void 0:t.filter((function(e){return!e.getColDef().lockVisible})))||[];s.setColumnsVisible(n,!1,"uiColumnMoved")}}};a.addDragSource(c,!0)}}},{key:"getDragItemForGroup",value:function(e){var t=e.getProvidedColumnGroup().getLeafColumns(),n={};t.forEach((function(e){return n[e.getId()]=e.isVisible()}));var i=[];return this.beans.columnModel.getAllDisplayedColumns().forEach((function(e){t.indexOf(e)>=0&&(i.push(e),Qi(t,e))})),t.forEach((function(e){return i.push(e)})),{columns:i,visibleState:n}}},{key:"isSuppressMoving",value:function(){var e=!1;return this.column.getLeafColumns().forEach((function(t){(t.getColDef().suppressMovable||t.getColDef().lockPosition)&&(e=!0)})),e||this.gridOptionsService.get("suppressMovableColumns")}}]),n}(nd),hd=0,pd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r){var o;(0,a.Z)(this,n),(o=t.call(this)).instanceId=hd++,o.rowIndex=e,o.pinned=i,o.type=r;var s="group"==r?"ag-header-row-column-group":"filter"==r?"ag-header-row-column-filter":"ag-header-row-column";return o.headerRowClass="ag-header-row ".concat(s),o}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.isPrintLayout=this.gridOptionsService.isDomLayout("print"),this.isEnsureDomOrder=this.gridOptionsService.get("ensureDomOrder")}},{key:"getInstanceId",value:function(){return this.instanceId}},{key:"setComp",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.comp=e,t&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners()}},{key:"getHeaderRowClass",value:function(){return this.headerRowClass}},{key:"getAriaRowIndex",value:function(){return this.rowIndex+1}},{key:"addEventListeners",value:function(){var e=this;this.addManagedListener(this.eventService,Er.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_VIRTUAL_COLUMNS_CHANGED,(function(t){return e.onVirtualColumnsChanged(t.afterScroll)})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_GRID_STYLES_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),this.addManagedPropertyListener("ensureDomOrder",(function(t){return e.isEnsureDomOrder=t.currentValue})),this.addManagedPropertyListener("headerHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("groupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotGroupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("floatingFiltersHeight",this.onRowHeightChanged.bind(this))}},{key:"getHeaderCellCtrl",value:function(e){if(this.headerCellCtrls)return Un(this.headerCellCtrls).find((function(t){return t.getColumnGroupChild()===e}))}},{key:"onDisplayedColumnsChanged",value:function(){this.isPrintLayout=this.gridOptionsService.isDomLayout("print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}},{key:"getType",value:function(){return this.type}},{key:"onColumnResized",value:function(){this.setWidth()}},{key:"setWidth",value:function(){var e=this.getWidthForRow();this.comp.setWidth("".concat(e,"px"))}},{key:"getWidthForRow",value:function(){var e=this.beans.columnModel;return this.isPrintLayout?null!=this.pinned?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}},{key:"onRowHeightChanged",value:function(){var e=this.getTopAndHeight(),t=e.topOffset,n=e.rowHeight;this.comp.setTop(t+"px"),this.comp.setHeight(n+"px")}},{key:"getTopAndHeight",value:function(){var e=this.beans,t=e.columnModel,n=e.filterManager,i=t.getHeaderRowCount(),r=[],o=0;n.hasFloatingFilters()&&(i++,o=1);for(var a=t.getColumnGroupHeaderRowHeight(),s=t.getColumnHeaderRowHeight(),l=i-(1+o),u=0;u<l;u++)r.push(a);r.push(s);for(var c=0;c<o;c++)r.push(t.getFloatingFiltersHeight());for(var d=0,h=0;h<this.rowIndex;h++)d+=r[h];return{topOffset:d,rowHeight:r[this.rowIndex]}}},{key:"getPinned",value:function(){return this.pinned}},{key:"getRowIndex",value:function(){return this.rowIndex}},{key:"onVirtualColumnsChanged",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.getHeaderCtrls(),n=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,n,e)}},{key:"getHeaderCtrls",value:function(){var e=this,t=this.headerCellCtrls;this.headerCellCtrls=new Map;var n,i=this.getColumnsInViewport(),o=(0,g.Z)(i);try{for(o.s();!(n=o.n()).done;){var a=n.value;this.recycleAndCreateHeaderCtrls(a,t)}}catch(p){o.e(p)}finally{o.f()}var s=function(t){var n=e.beans,i=n.focusService,r=n.columnModel;return!!i.isHeaderWrapperFocused(t)&&r.isDisplayed(t.getColumnGroupChild())};if(t){var l,u=(0,g.Z)(t);try{for(u.s();!(l=u.n()).done;){var c=(0,r.Z)(l.value,2),d=c[0],h=c[1];s(h)?this.headerCellCtrls.set(d,h):this.destroyBean(h)}}catch(p){u.e(p)}finally{u.f()}}return Array.from(this.headerCellCtrls.values())}},{key:"recycleAndCreateHeaderCtrls",value:function(e,t){if(this.headerCellCtrls&&!e.isEmptyGroup()){var n,i=e.getUniqueId();if(t&&(n=t.get(i),t.delete(i)),n&&n.getColumnGroupChild()!=e&&(this.destroyBean(n),n=void 0),null==n)switch(this.type){case"filter":n=this.createBean(new od(e,this.beans,this));break;case"group":n=this.createBean(new dd(e,this.beans,this));break;default:n=this.createBean(new ld(e,this.beans,this))}this.headerCellCtrls.set(i,n)}}},{key:"getColumnsInViewport",value:function(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}},{key:"getColumnsInViewportPrintLayout",value:function(){if(null!=this.pinned)return[];var e=[],t=this.getActualDepth(),n=this.beans.columnModel;return["left",null,"right"].forEach((function(i){var r=n.getVirtualHeaderGroupRow(i,t);e=e.concat(r)})),e}},{key:"getActualDepth",value:function(){return"filter"==this.type?this.rowIndex-1:this.rowIndex}},{key:"getColumnsInViewportNormalLayout",value:function(){return this.beans.columnModel.getVirtualHeaderGroupRow(this.pinned,this.getActualDepth())}},{key:"focusHeader",value:function(e,t){if(!this.headerCellCtrls)return!1;var n=Array.from(this.headerCellCtrls.values()).find((function(t){return t.getColumnGroupChild()==e}));return!!n&&n.focus(t)}},{key:"destroy",value:function(){var e=this;this.headerCellCtrls&&this.headerCellCtrls.forEach((function(t){e.destroyBean(t)})),this.headerCellCtrls=void 0,(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}}]),n}(kr);Mn([Di("beans")],pd.prototype,"beans",2),Mn([Ei],pd.prototype,"postConstruct",1);var fd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).hidden=!1,i.includeFloatingFilter=!1,i.groupsRowCtrls=[],i.pinned=e,i}return(0,s.Z)(n,[{key:"setComp",value:function(e,t){this.comp=e,this.eViewport=t,this.setupCenterWidth(),this.setupPinnedWidth(),this.setupDragAndDrop(this.eViewport),this.addManagedListener(this.eventService,Er.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.ctrlsService.registerHeaderContainer(this,this.pinned),this.columnModel.isReady()&&this.refresh()}},{key:"setupDragAndDrop",value:function(e){var t=new Kc(this.pinned,e);this.createManagedBean(t)}},{key:"refresh",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=new xs,i=this.focusService.getFocusHeaderToUseAfterRefresh(),r=function(){var t=e.columnModel.getHeaderRowCount()-1;e.groupsRowCtrls=e.destroyBeans(e.groupsRowCtrls);for(var i=0;i<t;i++){var r=e.createBean(new pd(n.next(),e.pinned,"group"));e.groupsRowCtrls.push(r)}},o=function(){var i=n.next(),r=!e.hidden&&(null==e.columnsRowCtrl||!t||e.columnsRowCtrl.getRowIndex()!==i);(r||e.hidden)&&(e.columnsRowCtrl=e.destroyBean(e.columnsRowCtrl)),r&&(e.columnsRowCtrl=e.createBean(new pd(i,e.pinned,"column")))},a=function(){e.includeFloatingFilter=e.filterManager.hasFloatingFilters()&&!e.hidden;var i=function(){e.filtersRowCtrl=e.destroyBean(e.filtersRowCtrl)};if(e.includeFloatingFilter){var r=n.next();if(e.filtersRowCtrl){var o=e.filtersRowCtrl.getRowIndex()!==r;t&&!o||i()}e.filtersRowCtrl||(e.filtersRowCtrl=e.createBean(new pd(r,e.pinned,"filter")))}else i()};r(),o(),a();var s=this.getAllCtrls();this.comp.setCtrls(s),this.restoreFocusOnHeader(i)}},{key:"restoreFocusOnHeader",value:function(e){null!=e&&e.column.getPinned()==this.pinned&&this.focusService.focusHeaderPosition({headerPosition:e})}},{key:"getAllCtrls",value:function(){var e=(0,o.Z)(this.groupsRowCtrls);return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}},{key:"onGridColumnsChanged",value:function(){this.refresh(!0)}},{key:"onDisplayedColumnsChanged",value:function(){var e=this.filterManager.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==e&&this.refresh(!0)}},{key:"setupCenterWidth",value:function(){var e=this;null==this.pinned&&this.createManagedBean(new Dc((function(t){return e.comp.setCenterWidth("".concat(t,"px"))}),!0))}},{key:"setHorizontalScroll",value:function(e){this.comp.setViewportScrollLeft(e)}},{key:"setupPinnedWidth",value:function(){var e=this;if(null!=this.pinned){var t="left"===this.pinned,n="right"===this.pinned;this.hidden=!0;var i=function(){var i=t?e.pinnedWidthService.getPinnedLeftWidth():e.pinnedWidthService.getPinnedRightWidth();if(null!=i){var r=0==i,o=e.hidden!==r,a=e.gridOptionsService.get("enableRtl"),s=e.gridOptionsService.getScrollbarWidth(),l=e.scrollVisibleService.isVerticalScrollShowing()&&(a&&t||!a&&n)?i+s:i;e.comp.setPinnedContainerWidth("".concat(l,"px")),e.comp.setDisplayed(!r),o&&(e.hidden=r,e.refresh())}};this.addManagedListener(this.eventService,Er.EVENT_LEFT_PINNED_WIDTH_CHANGED,i),this.addManagedListener(this.eventService,Er.EVENT_RIGHT_PINNED_WIDTH_CHANGED,i),this.addManagedListener(this.eventService,Er.EVENT_SCROLL_VISIBILITY_CHANGED,i),this.addManagedListener(this.eventService,Er.EVENT_SCROLLBAR_WIDTH_CHANGED,i)}}},{key:"getHeaderCtrlForColumn",value:function(e){if(e instanceof Gi){if(!this.columnsRowCtrl)return;return this.columnsRowCtrl.getHeaderCellCtrl(e)}if(0!==this.groupsRowCtrls.length)for(var t=0;t<this.groupsRowCtrls.length;t++){var n=this.groupsRowCtrls[t].getHeaderCellCtrl(e);if(n)return n}}},{key:"getHtmlElementForColumnHeader",value:function(e){var t=this.getHeaderCtrlForColumn(e);return t?t.getGui():null}},{key:"getRowType",value:function(e){var t=this.getAllCtrls()[e];return t?t.getType():void 0}},{key:"focusHeader",value:function(e,t,n){var i=this.getAllCtrls()[e];return!!i&&i.focusHeader(t,n)}},{key:"getViewport",value:function(){return this.eViewport}},{key:"getRowCount",value:function(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}},{key:"destroy",value:function(){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)),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}}]),n}(kr);Mn([Di("ctrlsService")],fd.prototype,"ctrlsService",2),Mn([Di("scrollVisibleService")],fd.prototype,"scrollVisibleService",2),Mn([Di("pinnedWidthService")],fd.prototype,"pinnedWidthService",2),Mn([Di("columnModel")],fd.prototype,"columnModel",2),Mn([Di("focusService")],fd.prototype,"focusService",2),Mn([Di("filterManager")],fd.prototype,"filterManager",2);var vd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).headerRowComps={},i.rowCompsList=[],i.pinned=e,i}return(0,s.Z)(n,[{key:"init",value:function(){var e=this;this.selectAndSetTemplate();var t={setDisplayed:function(t){return e.setDisplayed(t)},setCtrls:function(t){return e.setCtrls(t)},setCenterWidth:function(t){return e.eCenterContainer.style.width=t},setViewportScrollLeft:function(t){return e.getGui().scrollLeft=t},setPinnedContainerWidth:function(t){var n=e.getGui();n.style.width=t,n.style.maxWidth=t,n.style.minWidth=t}};this.createManagedBean(new fd(this.pinned)).setComp(t,this.getGui())}},{key:"selectAndSetTemplate",value:function(){var e="left"==this.pinned,t="right"==this.pinned,i=e?n.PINNED_LEFT_TEMPLATE:t?n.PINNED_RIGHT_TEMPLATE:n.CENTER_TEMPLATE;this.setTemplate(i),this.eRowContainer=this.eCenterContainer?this.eCenterContainer:this.getGui()}},{key:"destroyRowComps",value:function(){this.setCtrls([])}},{key:"destroyRowComp",value:function(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())}},{key:"setCtrls",value:function(e){var t,n=this,i=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];e.forEach((function(e){var r=e.getInstanceId(),o=i[r];delete i[r];var a=o||n.createBean(new $c(e));n.headerRowComps[r]=a,n.rowCompsList.push(a),function(e){var i=e.getGui();i.parentElement!=n.eRowContainer&&n.eRowContainer.appendChild(i),t&&Va(n.eRowContainer,i,t),t=i}(a)})),Qn(i).forEach((function(e){return n.destroyRowComp(e)}))}}]),n}(Ns);vd.PINNED_LEFT_TEMPLATE='<div class="ag-pinned-left-header" role="rowgroup"></div>',vd.PINNED_RIGHT_TEMPLATE='<div class="ag-pinned-right-header" role="rowgroup"></div>',vd.CENTER_TEMPLATE='<div class="ag-header-viewport" role="presentation">\n            <div class="ag-header-container" ref="eCenterContainer" role="rowgroup"></div>\n        </div>',Mn([Ls("eCenterContainer")],vd.prototype,"eCenterContainer",2),Mn([Ei],vd.prototype,"init",1),Mn([xi],vd.prototype,"destroyRowComps",1);var gd=vd,md=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).currentHeaderRowWithoutSpan=-1,e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.ctrlsService.whenReady((function(t){e.gridBodyCon=t.gridBodyCtrl}));var t=this.gridOptionsService.getDocument();this.addManagedListener(t,"mousedown",(function(){return e.setCurrentHeaderRowWithoutSpan(-1)}))}},{key:"getHeaderRowCount",value:function(){var e=this.ctrlsService.getHeaderRowContainerCtrl();return e?e.getRowCount():0}},{key:"navigateVertically",value:function(e,t,n){if(t||(t=this.focusService.getFocusedHeader()),!t)return!1;var i=t,r=i.headerRowIndex,o=i.column,a=this.getHeaderRowCount(),s=0===e?this.headerPositionUtils.getColumnVisibleParent(o,r):this.headerPositionUtils.getColumnVisibleChild(o,r),l=s.headerRowIndex,u=s.column,c=s.headerRowIndexWithoutSpan,d=!1;return l<0&&(l=0,u=o,d=!0),l>=a?(l=-1,this.setCurrentHeaderRowWithoutSpan(-1)):void 0!==c&&(this.currentHeaderRowWithoutSpan=c),!(!d&&!u)&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l,column:u},allowUserOverride:!0,event:n})}},{key:"setCurrentHeaderRowWithoutSpan",value:function(e){this.currentHeaderRowWithoutSpan=e}},{key:"navigateHorizontally",value:function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0,o=this.focusService.getFocusedHeader(),a=2===e,s=this.gridOptionsService.get("enableRtl");return-1!==this.currentHeaderRowWithoutSpan?o.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=o.headerRowIndex,a!==s?(n="Before",t=this.headerPositionUtils.findHeader(o,n)):(n="After",t=this.headerPositionUtils.findHeader(o,n)),t||!i?this.focusService.focusHeaderPosition({headerPosition:t,direction:n,fromTab:i,allowUserOverride:!0,event:r}):this.focusNextHeaderRow(o,n,r)}},{key:"focusNextHeaderRow",value:function(e,t,n){var i,r=e.headerRowIndex,o=null;if("Before"===t?r>0&&(i=r-1,this.currentHeaderRowWithoutSpan-=1,o=this.headerPositionUtils.findColAtEdgeForHeaderRow(i,"end")):(i=r+1,this.currentHeaderRowWithoutSpan<this.getHeaderRowCount()?this.currentHeaderRowWithoutSpan+=1:this.setCurrentHeaderRowWithoutSpan(-1),o=this.headerPositionUtils.findColAtEdgeForHeaderRow(i,"start")),!o)return!1;var a=this.headerPositionUtils.getHeaderIndexToFocus(o.column,null==o?void 0:o.headerRowIndex),s=a.column,l=a.headerRowIndex;return this.focusService.focusHeaderPosition({headerPosition:{column:s,headerRowIndex:l},direction:t,fromTab:!0,allowUserOverride:!0,event:n})}},{key:"scrollToColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"After";if(!e.getPinned()){var n;if(e instanceof br){var i=e.getDisplayedLeafColumns();n="Before"===t?Ui(i):i[0]}else n=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(n)}}}]),n}(kr);Mn([Di("focusService")],md.prototype,"focusService",2),Mn([Di("headerPositionUtils")],md.prototype,"headerPositionUtils",2),Mn([Di("ctrlsService")],md.prototype,"ctrlsService",2),Mn([Ei],md.prototype,"postConstruct",1),md=Mn([Ri("headerNavigationService")],md);var yd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"setComp",value:function(e,t,n){this.comp=e,this.eGui=t,this.createManagedBean(new Hs(n,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onPivotModeChanged(),this.setupHeaderHeight();var i=this.onHeaderContextMenu.bind(this);this.addManagedListener(this.eGui,"contextmenu",i),this.mockContextMenuForIPad(i),this.ctrlsService.registerGridHeaderCtrl(this)}},{key:"setupHeaderHeight",value:function(){var e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListener("headerHeight",e),this.addManagedPropertyListener("pivotHeaderHeight",e),this.addManagedPropertyListener("groupHeaderHeight",e),this.addManagedPropertyListener("pivotGroupHeaderHeight",e),this.addManagedPropertyListener("floatingFiltersHeight",e),this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,e),this.addManagedListener(this.eventService,Er.EVENT_GRID_STYLES_CHANGED,e),this.addManagedListener(this.eventService,Er.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,e)}},{key:"getHeaderHeight",value:function(){return this.headerHeight}},{key:"setHeaderHeight",value:function(){var e,t=this.columnModel,n=0,i=t.getHeaderRowCount();this.filterManager.hasFloatingFilters()&&(i++,n=1);var r=this.columnModel.getColumnGroupHeaderRowHeight(),o=this.columnModel.getColumnHeaderRowHeight(),a=i-(1+n);if(e=n*t.getFloatingFiltersHeight(),e+=a*r,e+=o,this.headerHeight!==e){this.headerHeight=e;var s="".concat(e+1,"px");this.comp.setHeightAndMinHeight(s),this.eventService.dispatchEvent({type:Er.EVENT_HEADER_HEIGHT_CHANGED})}}},{key:"onPivotModeChanged",value:function(){var e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)}},{key:"onDisplayedColumnsChanged",value:function(){var e=this.columnModel.getAllDisplayedColumns().some((function(e){return e.isSpanHeaderHeight()}));this.comp.addOrRemoveCssClass("ag-header-allow-overflow",e)}},{key:"onTabKeyDown",value:function(e){var t=this.gridOptionsService.get("enableRtl"),n=e.shiftKey!==t?2:3;(this.headerNavigationService.navigateHorizontally(n,!0,e)||this.focusService.focusNextGridCoreContainer(e.shiftKey))&&e.preventDefault()}},{key:"handleKeyDown",value:function(e){var t=null;switch(e.key){case hs.LEFT:t=2;case hs.RIGHT:Fn(t)||(t=3),this.headerNavigationService.navigateHorizontally(t,!1,e);break;case hs.UP:t=0;case hs.DOWN:Fn(t)||(t=1),this.headerNavigationService.navigateVertically(t,null,e)&&e.preventDefault();break;default:return}}},{key:"onFocusOut",value:function(e){var t=this.gridOptionsService.getDocument(),n=e.relatedTarget;!n&&this.eGui.contains(t.activeElement)||this.eGui.contains(n)||this.focusService.clearFocusedHeader()}},{key:"onHeaderContextMenu",value:function(e,t,n){if((e||n)&&this.menuService.isHeaderContextMenuEnabled()){var i=(null!=e?e:t).target;i!==this.eGui&&i!==this.ctrlsService.getHeaderRowContainerCtrl().getViewport()||this.menuService.showHeaderContextMenu(void 0,e,n)}}},{key:"mockContextMenuForIPad",value:function(e){if(Yo()){var t=new Ol(this.eGui);this.addManagedListener(t,Ol.EVENT_LONG_TAP,(function(t){e(void 0,t.touchStart,t.touchEvent)})),this.addDestroyFunc((function(){return t.destroy()}))}}}]),n}(kr);Mn([Di("headerNavigationService")],yd.prototype,"headerNavigationService",2),Mn([Di("focusService")],yd.prototype,"focusService",2),Mn([Di("columnModel")],yd.prototype,"columnModel",2),Mn([Di("ctrlsService")],yd.prototype,"ctrlsService",2),Mn([Di("filterManager")],yd.prototype,"filterManager",2),Mn([Di("menuService")],yd.prototype,"menuService",2);var Cd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,n.TEMPLATE)}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this,t={addOrRemoveCssClass:function(t,n){return e.addOrRemoveCssClass(t,n)},setHeightAndMinHeight:function(t){e.getGui().style.height=t,e.getGui().style.minHeight=t}};this.createManagedBean(new yd).setComp(t,this.getGui(),this.getFocusableElement());var n=function(t){e.createManagedBean(t),e.appendChild(t)};n(new gd("left")),n(new gd(null)),n(new gd("right"))}}]),n}(Ns);Cd.TEMPLATE='<div class="ag-header" role="presentation"/>',Mn([Ei],Cd.prototype,"postConstruct",1);var kd=Cd,wd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"addResizeBar",value:function(e){var t=this,n={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),includeTouch:!0,stopPropagationForTouch:!0};this.dragService.addDragSource(n);return function(){return t.dragService.removeDragSource(n)}}},{key:"onDragStart",value:function(e,t){this.dragStartX=t.clientX,this.setResizeIcons();var n=t instanceof MouseEvent&&!0===t.shiftKey;e.onResizeStart(n)}},{key:"setResizeIcons",value:function(){var e=this.ctrlsService.getGridCtrl();e.setResizeCursor(!0),e.disableUserSelect(!0)}},{key:"onDragStop",value:function(e,t){e.onResizeEnd(this.resizeAmount),this.resetIcons()}},{key:"resetIcons",value:function(){var e=this.ctrlsService.getGridCtrl();e.setResizeCursor(!1),e.disableUserSelect(!1)}},{key:"onDragging",value:function(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}}]),n}(kr);Mn([Di("dragService")],wd.prototype,"dragService",2),Mn([Di("ctrlsService")],wd.prototype,"ctrlsService",2),wd=Mn([Ri("horizontalResizeService")],wd);var Sd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"hideActiveMenu",value:function(){this.hidePopup&&this.hidePopup()}},{key:"showMenuAfterMouseEvent",value:function(e,t,n){var i=this;this.showPopup(e,(function(r){i.popupService.positionPopupUnderMouseEvent({column:e,type:n,mouseEvent:t,ePopup:r})}),n,t.target,this.menuService.isLegacyMenuEnabled())}},{key:"showMenuAfterButtonClick",value:function(e,t,n){var i=this,r=-1,o="left",a=this.menuService.isLegacyMenuEnabled();!a&&this.gridOptionsService.get("enableRtl")&&(r=1,o="right");var s=a?void 0:4*r,l=a?void 0:4;this.showPopup(e,(function(r){i.popupService.positionPopupByComponent({type:n,eventSource:t,ePopup:r,nudgeX:s,nudgeY:l,alignSide:o,keepWithinBounds:!0,position:"under",column:e})}),n,t,a)}},{key:"showPopup",value:function(e,t,n,i,r){var o=this,a=e?this.filterManager.getOrCreateFilterWrapper(e,"COLUMN_MENU"):void 0;if(!a||!e)throw new Error("AG Grid - unable to show popup filter, filter instantiation failed");var s,l=document.createElement("div");no(l,"presentation"),l.classList.add("ag-menu"),r||l.classList.add("ag-filter-menu"),this.tabListener=this.addManagedListener(l,"keydown",(function(e){return o.trapFocusWithin(e,l)})),a.guiPromise.then((function(e){return l.appendChild(e)}));var u=this.menuService.isColumnMenuAnchoringEnabled()?null!=i?i:this.ctrlsService.getGridBodyCtrl().getGui():void 0,c=this.localeService.getLocaleTextFunc(),d=r&&"columnFilter"!==n?c("ariaLabelColumnMenu","Column Menu"):c("ariaLabelColumnFilter","Column Filter"),h=this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:function(t){e.setMenuVisible(!1,"contextMenu");var r=t instanceof KeyboardEvent;if(o.tabListener&&(o.tabListener=o.tabListener()),r&&i&&Ga(i)){var s=o.focusService.findTabbableParent(i);s&&s.focus()}!function(){var e;null==(e=a.filterPromise)||e.then((function(e){var t;return null==(t=null==e?void 0:e.afterGuiDetached)?void 0:t.call(e)}))}(),o.dispatchVisibleChangedEvent(!1,n,e)},positionCallback:function(){return t(l)},anchorToElement:u,ariaLabel:d});h&&(this.hidePopup=s=h.hideFunc),a.filterPromise.then((function(e){t(l),e.afterGuiAttached&&e.afterGuiAttached({container:n,hidePopup:s})})),e.setMenuVisible(!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,n,e)}},{key:"trapFocusWithin",value:function(e,t){e.key!==hs.TAB||e.defaultPrevented||this.focusService.findNextFocusableElement(t,!1,e.shiftKey)||(e.preventDefault(),this.focusService.focusInto(t,e.shiftKey))}},{key:"dispatchVisibleChangedEvent",value:function(e,t,n){var i={type:Er.EVENT_COLUMN_MENU_VISIBLE_CHANGED,visible:e,switchingTab:!1,key:t,column:null!=n?n:null};this.eventService.dispatchEvent(i)}},{key:"isMenuEnabled",value:function(e){var t;return e.isFilterAllowed()&&(null!=(t=e.getColDef().menuTabs)?t:["filterMenuTab"]).includes("filterMenuTab")}},{key:"showMenuAfterContextMenuEvent",value:function(){}}]),n}(kr);Mn([Di("filterManager")],Sd.prototype,"filterManager",2),Mn([Di("popupService")],Sd.prototype,"popupService",2),Mn([Di("focusService")],Sd.prototype,"focusService",2),Mn([Di("ctrlsService")],Sd.prototype,"ctrlsService",2),Mn([Di("menuService")],Sd.prototype,"menuService",2),Sd=Mn([Ri("filterMenuFactory")],Sd);var bd=function(e){return e.TAB_GUARD="ag-tab-guard",e.TAB_GUARD_TOP="ag-tab-guard-top",e.TAB_GUARD_BOTTOM="ag-tab-guard-bottom",e}(bd||{}),Ed=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;(0,a.Z)(this,n),(i=t.call(this)).skipTabGuardFocus=!1,i.forcingFocusOut=!1;var r=e.comp,o=e.eTopGuard,s=e.eBottomGuard,l=e.focusTrapActive,u=e.forceFocusOutWhenTabGuardsAreEmpty,c=e.focusInnerElement,d=e.onFocusIn,h=e.onFocusOut,p=e.shouldStopEventPropagation,f=e.onTabKeyDown,v=e.handleKeyDown,g=e.eFocusableElement;return i.comp=r,i.eTopGuard=o,i.eBottomGuard=s,i.providedFocusInnerElement=c,i.eFocusableElement=g,i.focusTrapActive=!!l,i.forceFocusOutWhenTabGuardsAreEmpty=!!u,i.providedFocusIn=d,i.providedFocusOut=h,i.providedShouldStopEventPropagation=p,i.providedOnTabKeyDown=f,i.providedHandleKeyDown=v,i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.createManagedBean(new Hs(this.eFocusableElement,{shouldStopEventPropagation:function(){return e.shouldStopEventPropagation()},onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)},onFocusIn:function(t){return e.onFocusIn(t)},onFocusOut:function(t){return e.onFocusOut(t)}})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach((function(t){return e.addManagedListener(t,"focus",e.onFocus.bind(e))}))}},{key:"handleKeyDown",value:function(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}},{key:"tabGuardsAreActive",value:function(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}},{key:"shouldStopEventPropagation",value:function(){return!!this.providedShouldStopEventPropagation&&this.providedShouldStopEventPropagation()}},{key:"activateTabGuards",value:function(){if(!this.forcingFocusOut){var e=this.gridOptionsService.get("tabIndex");this.comp.setTabIndex(e.toString())}}},{key:"deactivateTabGuards",value:function(){this.comp.setTabIndex()}},{key:"onFocus",value:function(e){if(this.skipTabGuardFocus)this.skipTabGuardFocus=!1;else{if(this.forceFocusOutWhenTabGuardsAreEmpty)if(0===this.focusService.findFocusableElements(this.eFocusableElement,".ag-tab-guard").length)return void this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);var t=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t)}}},{key:"findNextElementOutsideAndFocus",value:function(e){var t=this.gridOptionsService.getDocument(),n=this.focusService.findFocusableElements(t.body,null,!0),i=n.indexOf(e?this.eTopGuard:this.eBottomGuard);if(-1!==i){var r,o;e?(r=0,o=i):(r=i+1,o=n.length);var a=n.slice(r,o),s=this.gridOptionsService.get("tabIndex");a.sort((function(e,t){var n=parseInt(e.getAttribute("tabindex")||"0"),i=parseInt(t.getAttribute("tabindex")||"0");return i===s?1:n===s?-1:0===n?1:0===i?-1:n-i})),a[e?a.length-1:0].focus()}}},{key:"onFocusIn",value:function(e){this.focusTrapActive||(this.providedFocusIn&&this.providedFocusIn(e),this.deactivateTabGuards())}},{key:"onFocusOut",value:function(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}},{key:"onTabKeyDown",value:function(e){var t=this;if(this.providedOnTabKeyDown)this.providedOnTabKeyDown(e);else if(!this.focusTrapActive&&!e.defaultPrevented){var n=this.tabGuardsAreActive();n&&this.deactivateTabGuards();var i=this.getNextFocusableElement(e.shiftKey);n&&setTimeout((function(){return t.activateTabGuards()}),0),i&&(i.focus(),e.preventDefault())}}},{key:"focusInnerElement",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],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})}},{key:"getNextFocusableElement",value:function(e){return this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e)}},{key:"forceFocusOutOfContainer",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.forcingFocusOut){var n=t?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,n.focus(),window.setTimeout((function(){e.forcingFocusOut=!1,e.activateTabGuards()}))}}},{key:"isTabGuard",value:function(e){return e===this.eTopGuard||e===this.eBottomGuard}}]),n}(kr);Mn([Di("focusService")],Ed.prototype,"focusService",2),Mn([Ei],Ed.prototype,"postConstruct",1);var xd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"initialiseTabGuard",value:function(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.getFocusableElement();var t=[this.eTopGuard,this.eBottomGuard],n={setTabIndex:function(e){t.forEach((function(t){return null!=e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex")}))}};this.addTabGuards(this.eTopGuard,this.eBottomGuard),this.tabGuardCtrl=this.createManagedBean(new Ed({comp:n,focusTrapActive:!!e.focusTrapActive,eTopGuard:this.eTopGuard,eBottomGuard:this.eBottomGuard,eFocusableElement:this.eFocusableElement,onFocusIn:e.onFocusIn,onFocusOut:e.onFocusOut,focusInnerElement:e.focusInnerElement,handleKeyDown:e.handleKeyDown,onTabKeyDown:e.onTabKeyDown,shouldStopEventPropagation:e.shouldStopEventPropagation,forceFocusOutWhenTabGuardsAreEmpty:e.forceFocusOutWhenTabGuardsAreEmpty}))}},{key:"createTabGuard",value:function(e){var t=document.createElement("div"),n="top"===e?"ag-tab-guard-top":"ag-tab-guard-bottom";return t.classList.add("ag-tab-guard",n),no(t,"presentation"),t}},{key:"addTabGuards",value:function(e,t){this.eFocusableElement.insertAdjacentElement("afterbegin",e),this.eFocusableElement.insertAdjacentElement("beforeend",t)}},{key:"removeAllChildrenExceptTabGuards",value:function(){var e=[this.eTopGuard,this.eBottomGuard];Ia(this.getFocusableElement()),this.addTabGuards.apply(this,e)}},{key:"forceFocusOutOfContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.tabGuardCtrl.forceFocusOutOfContainer(e)}},{key:"appendChild",value:function(e,t){Qa(e)||(e=e.getGui());var i=this.eBottomGuard;i?i.insertAdjacentElement("beforebegin",e):(0,mn.Z)((0,yn.Z)(n.prototype),"appendChild",this).call(this,e,t)}}]),n}(Ns),Rd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this,n.getTemplate(e.cssClass))).items=[],i.tabbedItemScrollMap=new Map,i.params=e,i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.setupHeader(),this.params.items&&this.params.items.forEach((function(t){return e.addItem(t)})),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),focusInnerElement:this.focusInnerElement.bind(this),focusTrapActive:!0}),this.addDestroyFunc((function(){var t,n,i;return null==(i=null==(n=null==(t=e.activeItem)?void 0:t.tabbedItem)?void 0:n.afterDetachedCallback)?void 0:i.call(n)}))}},{key:"setupHeader",value:function(){var e=this.params,t=e.enableCloseButton,n=e.cssClass,i=function(e,t){e.classList.add("ag-tabs-".concat(t)),n&&e.classList.add("".concat(n,"-").concat(t))};t?(this.setupCloseButton(i),this.eTabHeader=this.gridOptionsService.getDocument().createElement("div"),i(this.eHeader,"header-wrapper"),no(this.eHeader,"presentation"),this.eHeader.appendChild(this.eTabHeader)):this.eTabHeader=this.eHeader,no(this.eTabHeader,"tablist"),i(this.eTabHeader,"header")}},{key:"setupCloseButton",value:function(e){var t=this,n=this.gridOptionsService.getDocument(),i=n.createElement("button");e(i,"close-button");var r=cs("close",this.gridOptionsService,void 0,!0);so(i,this.params.closeButtonAriaLabel),i.appendChild(r),this.addManagedListener(i,"click",(function(){var e,n;return null==(n=(e=t.params).onCloseClicked)?void 0:n.call(e)}));var o=n.createElement("div");e(o,"close-button-wrapper"),no(o,"presentation"),o.appendChild(i),this.eHeader.appendChild(o),this.eCloseButton=i}},{key:"handleKeyDown",value:function(e){var t=this.gridOptionsService.getDocument();switch(e.key){case hs.RIGHT:case hs.LEFT:if(!this.eTabHeader.contains(t.activeElement))return;var n=e.key===hs.RIGHT,i=this.gridOptionsService.get("enableRtl"),r=this.items.indexOf(this.activeItem),o=n!==i?Math.min(r+1,this.items.length-1):Math.max(r-1,0);if(r===o)return;e.preventDefault();var a=this.items[o];this.showItemWrapper(a),a.eHeaderButton.focus();break;case hs.UP:case hs.DOWN:e.stopPropagation()}}},{key:"onTabKeyDown",value:function(e){var t,n,i,r;if(!e.defaultPrevented){var o=this.focusService,a=this.eHeader,s=this.eBody,l=this.activeItem,u=this.params,c=u.suppressTrapFocus,d=u.enableCloseButton,h=this.gridOptionsService.getDocument().activeElement,p=e.target,f=e.shiftKey;if(a.contains(h))return e.preventDefault(),void(d&&f&&!(null==(t=this.eCloseButton)?void 0:t.contains(h))?null==(n=this.eCloseButton)||n.focus():c&&f?null==(i=this.focusService.findFocusableElementBeforeTabGuard(this.gridOptionsService.getDocument().body,p))||i.focus():this.focusBody(e.shiftKey));var v=null;if(o.isTargetUnderManagedComponent(s,p)&&(f&&(v=this.focusService.findFocusableElementBeforeTabGuard(s,p)),v||c||(v=l.eHeaderButton)),!v&&s.contains(h)&&!(v=o.findNextFocusableElement(s,!1,f)))return e.preventDefault(),void(c&&!f?this.forceFocusOutOfContainer(f):d&&!f?null==(r=this.eCloseButton)||r.focus():this.focusHeader());v&&(e.preventDefault(),v.focus())}}},{key:"focusInnerElement",value:function(e){e?this.focusHeader():this.focusBody(!0)}},{key:"focusHeader",value:function(e){this.activeItem.eHeaderButton.focus({preventScroll:e})}},{key:"focusBody",value:function(e){this.focusService.focusInto(this.eBody,e)}},{key:"setAfterAttachedParams",value:function(e){this.afterAttachedParams=e}},{key:"showFirstItem",value:function(){this.items.length>0&&this.showItemWrapper(this.items[0])}},{key:"addItem",value:function(e){var t=document.createElement("span");no(t,"tab"),t.setAttribute("tabindex","-1"),t.appendChild(e.title),t.classList.add("ag-tab"),this.eTabHeader.appendChild(t),so(t,e.titleLabel);var n={tabbedItem:e,eHeaderButton:t};this.items.push(n),t.addEventListener("click",this.showItemWrapper.bind(this,n))}},{key:"showItem",value:function(e){var t=this.items.find((function(t){return t.tabbedItem===e}));t&&this.showItemWrapper(t)}},{key:"showItemWrapper",value:function(e){var t,n,i,r,o,a,s=this,l=e.tabbedItem,u=e.eHeaderButton;null==(n=(t=this.params).onItemClicked)||n.call(t,{item:l}),this.activeItem!==e?(this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),Ia(this.eBody),l.bodyPromise.then((function(e){s.eBody.appendChild(e);var t=!s.focusService.isKeyboardMode();if(s.params.suppressFocusBodyOnOpen||s.focusService.focusInto(s.eBody,!1,t),l.afterAttachedCallback&&l.afterAttachedCallback(s.afterAttachedParams),s.params.keepScrollPosition){var n=l.getScrollableContainer&&l.getScrollableContainer()||e;s.lastScrollListener=s.addManagedListener(n,"scroll",(function(){s.tabbedItemScrollMap.set(l.name,n.scrollTop)}));var i=s.tabbedItemScrollMap.get(l.name);void 0!==i&&setTimeout((function(){n.scrollTop=i}),0)}})),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),null==(a=(o=this.activeItem.tabbedItem).afterDetachedCallback)||a.call(o)),u.classList.add("ag-tab-selected"),this.activeItem=e):null==(r=(i=this.params).onActiveItemClicked)||r.call(i)}}],[{key:"getTemplate",value:function(e){return'<div class="ag-tabs '.concat(e,'">\n            <div ref="eHeader"></div>\n            <div ref="eBody" role="presentation" class="ag-tabs-body ').concat(e?"".concat(e,"-body"):"",'"></div>\n        </div>')}}]),n}(xd);Mn([Di("focusService")],Rd.prototype,"focusService",2),Mn([Ls("eHeader")],Rd.prototype,"eHeader",2),Mn([Ls("eBody")],Rd.prototype,"eBody",2),Mn([Ei],Rd.prototype,"postConstruct",1);var Dd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).polyfillFunctions=[],e}return(0,s.Z)(n,[{key:"observeResize",value:function(e,t){var n=this,i=this.gridOptionsService.getWindow(),r=this.gridOptionsService.get("suppressBrowserResizeObserver");return!!i.ResizeObserver&&!r?function(){var n=new i.ResizeObserver(t);return n.observe(e),function(){return n.disconnect()}}():this.getFrameworkOverrides().wrapIncoming((function(){return function(){var i,r,o=null!=(i=null==e?void 0:e.clientWidth)?i:0,a=null!=(r=null==e?void 0:e.clientHeight)?r:0,s=!0;return function i(){var r,l;if(s){var u=null!=(r=null==e?void 0:e.clientWidth)?r:0,c=null!=(l=null==e?void 0:e.clientHeight)?l:0;(u!==o||c!==a)&&(o=u,a=c,t()),n.doNextPolyfillTurn(i)}}(),function(){return s=!1}}()}),"resize-observer")}},{key:"doNextPolyfillTurn",value:function(e){this.polyfillFunctions.push(e),this.schedulePolyfill()}},{key:"schedulePolyfill",value:function(){var e=this;if(!this.polyfillScheduled){this.polyfillScheduled=!0,window.setTimeout((function(){var t=e.polyfillFunctions;e.polyfillScheduled=!1,e.polyfillFunctions=[],t.forEach((function(e){return e()}))}),50)}}}]),n}(kr);Dd=Mn([Ri("resizeObserverService")],Dd);var Td=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).createTasksP1={list:[],sorted:!1},e.createTasksP2={list:[],sorted:!1},e.destroyTasks=[],e.ticking=!1,e.scrollGoingDown=!0,e.lastPage=0,e.lastScrollTop=0,e.taskCount=0,e.cancelledTasks=new Set,e}return(0,s.Z)(n,[{key:"setScrollTop",value:function(e){var t=this.gridOptionsService.get("pagination");if(this.scrollGoingDown=e>=this.lastScrollTop,t&&0===e){var n=this.paginationProxy.getCurrentPage();n!==this.lastPage&&(this.lastPage=n,this.scrollGoingDown=!0)}this.lastScrollTop=e}},{key:"init",value:function(){this.useAnimationFrame=!this.gridOptionsService.get("suppressAnimationFrame")}},{key:"isOn",value:function(){return this.useAnimationFrame}},{key:"verifyAnimationFrameOn",value:function(e){!1===this.useAnimationFrame&&console.warn("AG Grid: AnimationFrameService.".concat(e," called but animation frames are off"))}},{key:"createTask",value:function(e,t,n){this.verifyAnimationFrameOn(n);var i={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[n],i),this.schedule()}},{key:"cancelTask",value:function(e){this.cancelledTasks.add(e)}},{key:"addTaskToList",value:function(e,t){e.list.push(t),e.sorted=!1}},{key:"sortTaskList",value:function(e){if(!e.sorted){var t=this.scrollGoingDown?1:-1;e.list.sort((function(e,n){return e.index!==n.index?t*(n.index-e.index):n.createOrder-e.createOrder})),e.sorted=!0}}},{key:"addDestroyTask",value:function(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule()}},{key:"executeFrame",value:function(e){this.verifyAnimationFrameOn("executeFrame");for(var t=this.createTasksP1,n=t.list,i=this.createTasksP2,r=i.list,o=this.destroyTasks,a=(new Date).getTime(),s=(new Date).getTime()-a,l=e<=0,u=this.ctrlsService.getGridBodyCtrl();l||s<e;){if(!u.getScrollFeature().scrollGridIfNeeded()){var c=void 0;if(n.length)this.sortTaskList(t),c=n.pop().task;else if(r.length)this.sortTaskList(i),c=r.pop().task;else{if(!o.length){this.cancelledTasks.clear();break}c=o.pop()}this.cancelledTasks.has(c)||c()}s=(new Date).getTime()-a}n.length||r.length||o.length?this.requestFrame():this.stopTicking()}},{key:"stopTicking",value:function(){this.ticking=!1}},{key:"flushAllFrames",value:function(){this.useAnimationFrame&&this.executeFrame(-1)}},{key:"schedule",value:function(){this.useAnimationFrame&&(this.ticking||(this.ticking=!0,this.requestFrame()))}},{key:"requestFrame",value:function(){var e=this.executeFrame.bind(this,60);this.requestAnimationFrame(e)}},{key:"requestAnimationFrame",value:function(e){var t=this.gridOptionsService.getWindow();t.requestAnimationFrame?t.requestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.setTimeout(e,0)}},{key:"isQueueEmpty",value:function(){return!this.ticking}},{key:"debounce",value:function(e){var t=this,n=!1;return function(){t.isOn()?n||(n=!0,t.addDestroyTask((function(){n=!1,e()}))):window.setTimeout(e,0)}}}]),n}(kr);Mn([Di("ctrlsService")],Td.prototype,"ctrlsService",2),Mn([Di("paginationProxy")],Td.prototype,"paginationProxy",2),Mn([Ei],Td.prototype,"init",1),Td=Mn([Ri("animationFrameService")],Td);var Od=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.isClientSideRowModel="clientSide"===this.rowModel.getType()}},{key:"expandRows",value:function(e){if(this.isClientSideRowModel){var t=new Set(e);this.rowModel.forEachNode((function(e){e.id&&t.has(e.id)&&(e.expanded=!0)})),this.onGroupExpandedOrCollapsed()}}},{key:"getExpandedRows",value:function(){var e=[];return this.rowModel.forEachNode((function(t){var n=t.expanded,i=t.id;n&&i&&e.push(i)})),e}},{key:"expandAll",value:function(e){this.isClientSideRowModel&&this.rowModel.expandOrCollapseAll(e)}},{key:"setRowNodeExpanded",value:function(e,t,n){e&&(n&&e.parent&&-1!==e.parent.level&&this.setRowNodeExpanded(e.parent,t,n),e.setExpanded(t))}},{key:"onGroupExpandedOrCollapsed",value:function(){this.isClientSideRowModel&&this.rowModel.refreshModel({step:"map"})}}]),n}(kr);Mn([Di("rowModel")],Od.prototype,"rowModel",2),Mn([Ei],Od.prototype,"postConstruct",1),Od=Mn([Ri("expansionService")],Od);var Pd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e;this.activeMenuFactory=null!=(e=this.enterpriseMenuFactory)?e:this.filterMenuFactory}},{key:"showColumnMenu",value:function(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}},{key:"showFilterMenu",value:function(e){var t=this.enterpriseMenuFactory&&this.isLegacyMenuEnabled()?this.enterpriseMenuFactory:this.filterMenuFactory;this.showColumnMenuCommon(t,e,e.containerType,!0)}},{key:"showHeaderContextMenu",value:function(e,t,n){this.activeMenuFactory.showMenuAfterContextMenuEvent(e,t,n)}},{key:"showContextMenu",value:function(e){var t,n,i,r=e.column,o=e.anchorToElement,a=e.rowNode,s=e.value;null==(i=this.contextMenuFactory)||i.onContextMenu(null!=(t=e.mouseEvent)?t:null,null!=(n=e.touchEvent)?n:null,null!=a?a:null,null!=r?r:null,s,o)}},{key:"showColumnChooser",value:function(e){var t;null==(t=this.columnChooserFactory)||t.showColumnChooser(e)}},{key:"hidePopupMenu",value:function(){var e;null==(e=this.contextMenuFactory)||e.hideActiveMenu(),this.activeMenuFactory.hideActiveMenu()}},{key:"hideColumnChooser",value:function(){var e;null==(e=this.columnChooserFactory)||e.hideActiveColumnChooser()}},{key:"isColumnMenuInHeaderEnabled",value:function(e){var t=e.getColDef(),n=t.suppressMenu,i=t.suppressHeaderMenuButton;return!(null!=i?i:n)&&this.activeMenuFactory.isMenuEnabled(e)&&(this.isLegacyMenuEnabled()||!!this.enterpriseMenuFactory)}},{key:"isFilterMenuInHeaderEnabled",value:function(e){return!e.getColDef().suppressHeaderFilterButton&&this.filterManager.isFilterAllowed(e)}},{key:"isHeaderContextMenuEnabled",value:function(e){return!(null==e?void 0:e.getColDef().suppressHeaderContextMenu)&&"new"===this.getColumnMenuType()}},{key:"isHeaderMenuButtonAlwaysShowEnabled",value:function(){return this.isSuppressMenuHide()}},{key:"isHeaderMenuButtonEnabled",value:function(){var e=!this.isSuppressMenuHide();return!(Yo()&&e)}},{key:"isHeaderFilterButtonEnabled",value:function(e){return this.isFilterMenuInHeaderEnabled(e)&&!this.isLegacyMenuEnabled()&&!this.isFloatingFilterButtonDisplayed(e)}},{key:"isFilterMenuItemEnabled",value:function(e){return this.filterManager.isFilterAllowed(e)&&!this.isLegacyMenuEnabled()&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}},{key:"isColumnMenuAnchoringEnabled",value:function(){return!this.isLegacyMenuEnabled()}},{key:"areAdditionalColumnMenuItemsEnabled",value:function(){return"new"===this.getColumnMenuType()}},{key:"isLegacyMenuEnabled",value:function(){return"legacy"===this.getColumnMenuType()}},{key:"isFloatingFilterButtonEnabled",value:function(e){var t,n=e.getColDef(),i=null==(t=n.floatingFilterComponentParams)?void 0:t.suppressFilterButton;return null!=i&&oi("As of v31.1, 'colDef.floatingFilterComponentParams.suppressFilterButton' is deprecated. Use 'colDef.suppressFloatingFilterButton' instead."),null==n.suppressFloatingFilterButton?!i:!n.suppressFloatingFilterButton}},{key:"getColumnMenuType",value:function(){var e;return null!=(e=this.gridOptionsService.get("columnMenu"))?e:"legacy"}},{key:"isFloatingFilterButtonDisplayed",value:function(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}},{key:"isSuppressMenuHide",value:function(){var e=this.gridOptionsService.get("suppressMenuHide");return this.isLegacyMenuEnabled()?e:!this.gridOptionsService.exists("suppressMenuHide")||e}},{key:"showColumnMenuCommon",value:function(e,t,n,i){var r=this,o=t.column,a=t.positionBy;if("button"===a){var s=t.buttonElement;e.showMenuAfterButtonClick(o,s,n,i)}else if("mouse"===a){var l=t.mouseEvent;e.showMenuAfterMouseEvent(o,l,n,i)}else o&&(this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(o,"auto"),this.animationFrameService.requestAnimationFrame((function(){var t=r.ctrlsService.getHeaderRowContainerCtrl(o.getPinned()).getHeaderCtrlForColumn(o);e.showMenuAfterButtonClick(o,t.getAnchorElementForMenu(i),n,!0)})))}}]),n}(kr);Mn([Ti("enterpriseMenuFactory")],Pd.prototype,"enterpriseMenuFactory",2),Mn([Di("filterMenuFactory")],Pd.prototype,"filterMenuFactory",2),Mn([Ti("contextMenuFactory")],Pd.prototype,"contextMenuFactory",2),Mn([Di("ctrlsService")],Pd.prototype,"ctrlsService",2),Mn([Di("animationFrameService")],Pd.prototype,"animationFrameService",2),Mn([Ti("columnChooserFactory")],Pd.prototype,"columnChooserFactory",2),Mn([Di("filterManager")],Pd.prototype,"filterManager",2),Mn([Ei],Pd.prototype,"postConstruct",1),Pd=Mn([Ri("menuService")],Pd);var Ad=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.ctrlsService.whenReady((function(t){e.centerRowContainerCtrl=t.centerRowContainerCtrl}))}},{key:"getPreferredWidthForColumn",value:function(e,t){var n=this.getHeaderCellForColumn(e);if(!n)return-1;var i=this.rowRenderer.getAllCellsForColumn(e);return t||i.push(n),this.addElementsToContainerAndGetWidth(i)}},{key:"getPreferredWidthForColumnGroup",value:function(e){var t=this.getHeaderCellForColumn(e);return t?this.addElementsToContainerAndGetWidth([t]):-1}},{key:"addElementsToContainerAndGetWidth",value:function(e){var t=this,n=document.createElement("form");n.style.position="fixed";var i=this.centerRowContainerCtrl.getContainerElement();e.forEach((function(e){return t.cloneItemIntoDummy(e,n)})),i.appendChild(n);var r=n.offsetWidth;return i.removeChild(n),r+this.getAutoSizePadding()}},{key:"getAutoSizePadding",value:function(){return this.gridOptionsService.get("autoSizePadding")}},{key:"getHeaderCellForColumn",value:function(e){var t=null;return this.ctrlsService.getHeaderRowContainerCtrls().forEach((function(n){var i=n.getHtmlElementForColumnHeader(e);null!=i&&(t=i)})),t}},{key:"cloneItemIntoDummy",value:function(e,t){var n=e.cloneNode(!0);n.style.width="",n.style.position="static",n.style.left="";var i=document.createElement("div"),r=i.classList;["ag-header-cell","ag-header-group-cell"].some((function(e){return n.classList.contains(e)}))?(r.add("ag-header","ag-header-row"),i.style.position="static"):r.add("ag-row");for(var o=e.parentElement;o;){if(["ag-header-row","ag-row"].some((function(e){return o.classList.contains(e)}))){for(var a=0;a<o.classList.length;a++){var s=o.classList[a];"ag-row-position-absolute"!=s&&r.add(s)}break}o=o.parentElement}i.appendChild(n),t.appendChild(i)}}]),n}(kr);Mn([Di("rowRenderer")],Ad.prototype,"rowRenderer",2),Mn([Di("ctrlsService")],Ad.prototype,"ctrlsService",2),Mn([Di("rowCssClassCalculator")],Ad.prototype,"rowCssClassCalculator",2),Mn([Ei],Ad.prototype,"postConstruct",1),Ad=Mn([Ri("autoWidthCalculator")],Ad);var Md=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i){var r;return(0,a.Z)(this,n),(r=t.call(this)).createRowCon=e,r.destroyRowCtrls=i,r.stickyRowCtrls=[],r.containerHeight=0,r}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.isClientSide="clientSide"===this.rowModel.getType(),this.ctrlsService.whenReady((function(t){e.gridBodyCtrl=t.gridBodyCtrl}))}},{key:"getStickyRowCtrls",value:function(){return this.stickyRowCtrls}},{key:"checkStickyRows",value:function(){var e=this,t=0;if(!this.gridOptionsService.isGroupRowsSticky())return this.refreshNodesAndContainerHeight([],t);for(var n=[],i=this.rowRenderer.getFirstVisibleVerticalPixel(),r=function(r){var o,a,s,l;if(n.push(r),e.isClientSide){for(var u=r;u.isExpandable()&&u.expanded;)if(u.master)u=u.detailNode;else if(u.childrenAfterSort){if(0===u.childrenAfterSort.length)break;u=Ui(u.childrenAfterSort)}l=u.rowTop+u.rowHeight}else if(r.master)l=r.detailNode.rowTop+r.detailNode.rowHeight;else{var c=null==(o=r.childStore)?void 0:o.getStoreBounds();l=(null!=(a=null==c?void 0:c.heightPx)?a:0)+(null!=(s=null==c?void 0:c.topPx)?s:0)}var d=i+t+r.rowHeight;r.stickyRowTop=l<d?t+(l-d):t,t=0,n.forEach((function(e){var n=e.stickyRowTop+e.rowHeight;t<n&&(t=n)}))},o=0;;){var a=i+t,s=this.rowModel.getRowIndexAtPixel(a),l=this.rowModel.getRow(s);if(null==l)break;if(l.level<0)break;if(100===o++)break;for(var u=[],c=l.parent;c.level>=0;)u.push(c),c=c.parent;var d=u.reverse().find((function(e){return n.indexOf(e)<0&&e.displayed}));if(d)r(d);else{if(!(l.isExpandable()&&l.expanded&&l.rowTop<a))break;r(l)}}return this.refreshNodesAndContainerHeight(n,t)}},{key:"refreshStickyNode",value:function(e){for(var t=[],n=0;n<this.stickyRowCtrls.length;n++){var i=this.stickyRowCtrls[n].getRowNode();i!==e&&t.push(i)}this.refreshNodesAndContainerHeight(t,this.containerHeight)&&this.checkStickyRows()}},{key:"refreshNodesAndContainerHeight",value:function(e,t){var n,i=this,r=!1,a=this.stickyRowCtrls.filter((function(t){return-1===e.indexOf(t.getRowNode())})),s=e.filter((function(e){return-1===i.stickyRowCtrls.findIndex((function(t){return t.getRowNode()===e}))}));(a.length||s.length)&&(r=!0);var l={};a.forEach((function(e){l[e.getRowNode().id]=e,i.stickyRowCtrls=i.stickyRowCtrls.filter((function(t){return t!==e}))}));for(var u=0,c=Object.values(l);u<c.length;u++){c[u].getRowNode().sticky=!1}this.destroyRowCtrls(l,!1);var d=s.map((function(e){return e.sticky=!0,i.createRowCon(e,!1,!1)}));return(n=this.stickyRowCtrls).push.apply(n,(0,o.Z)(d)),this.stickyRowCtrls.forEach((function(e){return e.setRowTop(e.getRowNode().stickyRowTop)})),this.stickyRowCtrls.sort((function(e,t){return t.getRowNode().rowIndex-e.getRowNode().rowIndex})),this.containerHeight!==t&&(this.containerHeight=t,this.gridBodyCtrl.setStickyTopHeight(t),r=!0),r}}]),n}(kr);Mn([Di("rowModel")],Md.prototype,"rowModel",2),Mn([Di("rowRenderer")],Md.prototype,"rowRenderer",2),Mn([Di("ctrlsService")],Md.prototype,"ctrlsService",2),Mn([Ei],Md.prototype,"postConstruct",1);var Nd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).destroyFuncsForColumnListeners=[],e.rowCtrlsByRowIndex={},e.zombieRowCtrls={},e.allRowCtrls=[],e.topRowCtrls=[],e.bottomRowCtrls=[],e.refreshInProgress=!1,e.dataFirstRenderedFired=!1,e.setupRangeSelectionListeners=function(){var t=function(){e.getAllCellCtrls().forEach((function(e){return e.onRangeSelectionChanged()}))},n=function(){e.getAllCellCtrls().forEach((function(e){return e.updateRangeBordersIfRangeCount()}))},i=function(){e.eventService.addEventListener(Er.EVENT_RANGE_SELECTION_CHANGED,t),e.eventService.addEventListener(Er.EVENT_COLUMN_MOVED,n),e.eventService.addEventListener(Er.EVENT_COLUMN_PINNED,n),e.eventService.addEventListener(Er.EVENT_COLUMN_VISIBLE,n)},r=function(){e.eventService.removeEventListener(Er.EVENT_RANGE_SELECTION_CHANGED,t),e.eventService.removeEventListener(Er.EVENT_COLUMN_MOVED,n),e.eventService.removeEventListener(Er.EVENT_COLUMN_PINNED,n),e.eventService.removeEventListener(Er.EVENT_COLUMN_VISIBLE,n)};e.addDestroyFunc((function(){return r()})),e.addManagedPropertyListener("enableRangeSelection",(function(e){e.currentValue?i():r()})),e.gridOptionsService.get("enableRangeSelection")&&i()},e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.ctrlsService.whenReady((function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl(),e.initialise()}))}},{key:"initialise",value:function(){var e=this;if(this.addManagedListener(this.eventService,Er.EVENT_PAGINATION_CHANGED,this.onPageLoaded.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_BODY_SCROLL,this.onBodyScroll.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_BODY_HEIGHT_CHANGED,this.redraw.bind(this)),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],(function(){return e.onDomLayoutChanged()})),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],(function(){return e.redraw()})),this.addManagedPropertyListeners(["suppressCellFocus","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],(function(){return e.redrawRows()})),this.gridOptionsService.isGroupRowsSticky()){var t=this.rowModel.getType();"clientSide"!==t&&"serverSide"!==t||(this.stickyRowFeature=this.createManagedBean(new Md(this.createRowCon.bind(this),this.destroyRowCtrls.bind(this))))}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=this.gridOptionsService.isDomLayout("print"),this.embedFullWidthRows=this.printLayout||this.gridOptionsService.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}},{key:"initialiseCache",value:function(){if(this.gridOptionsService.get("keepDetailRows")){var e=this.getKeepDetailRowsCount(),t=null!=e?e:3;this.cachedRowCtrls=new Ld(t)}}},{key:"getKeepDetailRowsCount",value:function(){return this.gridOptionsService.get("keepDetailRowsCount")}},{key:"getStickyTopRowCtrls",value:function(){return this.stickyRowFeature?this.stickyRowFeature.getStickyRowCtrls():[]}},{key:"updateAllRowCtrls",value:function(){var e=Qn(this.rowCtrlsByRowIndex),t=Qn(this.zombieRowCtrls),n=this.cachedRowCtrls?this.cachedRowCtrls.getEntries():[];t.length>0||n.length>0?this.allRowCtrls=[].concat((0,o.Z)(e),(0,o.Z)(t),(0,o.Z)(n)):this.allRowCtrls=e}},{key:"onCellFocusChanged",value:function(e){this.getAllCellCtrls().forEach((function(t){return t.onCellFocused(e)})),this.getFullWidthRowCtrls().forEach((function(t){return t.onFullWidthRowFocused(e)}))}},{key:"registerCellEventListeners",value:function(){var e=this;this.addManagedListener(this.eventService,Er.EVENT_CELL_FOCUSED,(function(t){e.onCellFocusChanged(t)})),this.addManagedListener(this.eventService,Er.EVENT_CELL_FOCUS_CLEARED,(function(){e.onCellFocusChanged()})),this.addManagedListener(this.eventService,Er.EVENT_FLASH_CELLS,(function(t){e.getAllCellCtrls().forEach((function(e){return e.onFlashCells(t)}))})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_HOVER_CHANGED,(function(){e.getAllCellCtrls().forEach((function(e){return e.onColumnHover()}))})),this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_CHANGED,(function(){e.getAllCellCtrls().forEach((function(e){return e.onDisplayedColumnsChanged()}))})),this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,(function(){e.printLayout&&e.getAllCellCtrls().forEach((function(e){return e.onLeftChanged()}))})),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedListener(this.eventService,Er.EVENT_GRID_COLUMNS_CHANGED,this.refreshListenersToColumnsForCellComps.bind(this)),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}},{key:"removeGridColumnListeners",value:function(){this.destroyFuncsForColumnListeners.forEach((function(e){return e()})),this.destroyFuncsForColumnListeners.length=0}},{key:"refreshListenersToColumnsForCellComps",value:function(){var e=this;this.removeGridColumnListeners(),this.columnModel.getAllGridColumns().forEach((function(t){var n=function(n){e.getAllCellCtrls().forEach((function(e){e.getColumn()===t&&n(e)}))},i=function(){n((function(e){return e.onLeftChanged()}))},r=function(){n((function(e){return e.onWidthChanged()}))},o=function(){n((function(e){return e.onFirstRightPinnedChanged()}))},a=function(){n((function(e){return e.onLastLeftPinnedChanged()}))},s=function(){n((function(e){return e.onColDefChanged()}))};t.addEventListener("leftChanged",i),t.addEventListener("widthChanged",r),t.addEventListener("firstRightPinnedChanged",o),t.addEventListener("lastLeftPinnedChanged",a),t.addEventListener("colDefChanged",s),e.destroyFuncsForColumnListeners.push((function(){t.removeEventListener("leftChanged",i),t.removeEventListener("widthChanged",r),t.removeEventListener("firstRightPinnedChanged",o),t.removeEventListener("lastLeftPinnedChanged",a),t.removeEventListener("colDefChanged",s)}))}))}},{key:"onDomLayoutChanged",value:function(){var e=this.gridOptionsService.isDomLayout("print"),t=e||this.gridOptionsService.get("embedFullWidthRows"),n=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,n&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}},{key:"datasourceChanged",value:function(){this.firstRenderedRow=0,this.lastRenderedRow=-1;var e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}},{key:"onPageLoaded",value:function(e){var t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}},{key:"getAllCellsForColumn",value:function(e){var t=[];return this.getAllRowCtrls().forEach((function(n){var i=n.getCellElement(e);i&&t.push(i)})),t}},{key:"refreshFloatingRowComps",value:function(){this.refreshFloatingRows(this.topRowCtrls,this.pinnedRowModel.getPinnedTopRowData()),this.refreshFloatingRows(this.bottomRowCtrls,this.pinnedRowModel.getPinnedBottomRowData())}},{key:"getTopRowCtrls",value:function(){return this.topRowCtrls}},{key:"getCentreRowCtrls",value:function(){return this.allRowCtrls}},{key:"getBottomRowCtrls",value:function(){return this.bottomRowCtrls}},{key:"refreshFloatingRows",value:function(e,t){var n=this;e.forEach((function(e){e.destroyFirstPass(),e.destroySecondPass()})),e.length=0,t&&t.forEach((function(t){var i=new kc(t,n.beans,!1,!1,n.printLayout);e.push(i)}))}},{key:"onPinnedRowDataChanged",value:function(){this.redrawAfterModelUpdate({recycleRows:!0})}},{key:"redrawRow",value:function(e){var t,n=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.sticky)this.stickyRowFeature.refreshStickyNode(e);else{if(null==(t=this.cachedRowCtrls)?void 0:t.has(e))return void this.cachedRowCtrls.removeRow(e);var r=function(t){var i=t[e.rowIndex];i&&i.getRowNode()===e&&(i.destroyFirstPass(),i.destroySecondPass(),t[e.rowIndex]=n.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":r(this.topRowCtrls);break;case"bottom":r(this.bottomRowCtrls);break;default:r(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}i||this.dispatchDisplayedRowsChanged(!1)}},{key:"redrawRows",value:function(e){var t=this;if(null!=e)return null==e||e.forEach((function(e){return t.redrawRow(e,!0)})),void this.dispatchDisplayedRowsChanged(!1);this.redrawAfterModelUpdate()}},{key:"getCellToRestoreFocusToAfterRefresh",value:function(e){var t=(null==e?void 0:e.suppressKeepFocus)?null:this.focusService.getFocusCellToUseAfterRefresh();if(null==t)return null;var n=this.gridOptionsService.getDocument().activeElement,i=this.gridOptionsService.getDomData(n,mc.DOM_DATA_KEY_CELL_CTRL),r=this.gridOptionsService.getDomData(n,kc.DOM_DATA_KEY_ROW_CTRL);return i||r?t:null}},{key:"redrawAfterModelUpdate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.getLockOnRefresh();var t=this.getCellToRestoreFocusToAfterRefresh(e);this.updateContainerHeights(),this.scrollToTopIfNewData(e);var n=!e.domLayoutChanged&&!!e.recycleRows,i=e.animate&&this.gridOptionsService.isAnimateRows(),r=n?this.getRowsToRecycle():null;n||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender(),this.stickyRowFeature&&this.stickyRowFeature.checkStickyRows(),this.recycleRows(r,i),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),null!=t&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}},{key:"scrollToTopIfNewData",value:function(e){var t=e.newData||e.newPage,n=this.gridOptionsService.get("suppressScrollOnNewData");t&&!n&&this.gridBodyCtrl.getScrollFeature().scrollToTop()}},{key:"updateContainerHeights",value:function(){if(this.printLayout)this.rowContainerHeightService.setModelHeight(null);else{var e=this.paginationProxy.getCurrentPageHeight();0===e&&(e=1),this.rowContainerHeightService.setModelHeight(e)}}},{key:"getLockOnRefresh",value:function(){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(); }, 0). To see what part of your code that caused the refresh check this stacktrace.");this.refreshInProgress=!0}},{key:"releaseLockOnRefresh",value:function(){this.refreshInProgress=!1}},{key:"isRefreshInProgress",value:function(){return this.refreshInProgress}},{key:"restoreFocusedCell",value:function(e){e&&(this.focusService.setRestoreFocusedCell(e),this.onCellFocusChanged(this.beans.gridOptionsService.addGridCommonParams({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"mock"})))}},{key:"stopEditing",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.getAllRowCtrls().forEach((function(t){t.stopEditing(e)}))}},{key:"getAllCellCtrls",value:function(){for(var e=[],t=this.getAllRowCtrls(),n=t.length,i=0;i<n;i++)for(var r=t[i].getAllCellCtrls(),o=r.length,a=0;a<o;a++)e.push(r[a]);return e}},{key:"getAllRowCtrls",value:function(){for(var e=this.stickyRowFeature&&this.stickyRowFeature.getStickyRowCtrls()||[],t=[].concat((0,o.Z)(this.topRowCtrls),(0,o.Z)(this.bottomRowCtrls),(0,o.Z)(e)),n=0,i=Object.keys(this.rowCtrlsByRowIndex);n<i.length;n++){var r=i[n];t.push(this.rowCtrlsByRowIndex[r])}return t}},{key:"addRenderedRowListener",value:function(e,t,n){var i=this.rowCtrlsByRowIndex[t];i&&i.addEventListener(e,n)}},{key:"flashCells",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.getCellCtrls(e.rowNodes,e.columns).forEach((function(t){return t.flashCell(e)}))}},{key:"refreshCells",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={forceRefresh:t.force,newData:!1,suppressFlash:t.suppressFlash};this.getCellCtrls(t.rowNodes,t.columns).forEach((function(e){return e.refreshOrDestroyCell(n)})),t.rowNodes&&(this.getRowCtrls(t.rowNodes).forEach((function(t){t.isFullWidth()&&(t.refreshFullWidth()||e.redrawRow(t.getRowNode(),!0))})),this.dispatchDisplayedRowsChanged(!1))}},{key:"getCellRendererInstances",value:function(e){var t,n=this,i=this.getCellCtrls(e.rowNodes,e.columns).map((function(e){return e.getCellRenderer()})).filter((function(e){return null!=e}));if(null==(t=e.columns)?void 0:t.length)return i;var r=[],a=this.mapRowNodes(e.rowNodes);return this.getAllRowCtrls().forEach((function(e){if((!a||n.isRowInMap(e.getRowNode(),a))&&e.isFullWidth())for(var t=e.getFullWidthCellRenderers(),i=0;i<t.length;i++){var o=t[i];null!=o&&r.push(o)}})),[].concat(r,(0,o.Z)(i))}},{key:"getCellEditorInstances",value:function(e){var t=[];return this.getCellCtrls(e.rowNodes,e.columns).forEach((function(e){var n=e.getCellEditor();n&&t.push(n)})),t}},{key:"getEditingCells",value:function(){var e=[];return this.getAllCellCtrls().forEach((function(t){if(t.isEditing()){var n=t.getCellPosition();e.push(n)}})),e}},{key:"mapRowNodes",value:function(e){if(e){var t={top:{},bottom:{},normal:{}};return e.forEach((function(e){var n=e.id;"top"===e.rowPinned?t.top[n]=e:"bottom"===e.rowPinned?t.bottom[n]=e:t.normal[n]=e})),t}}},{key:"isRowInMap",value:function(e,t){var n=e.id,i=e.rowPinned;return"bottom"===i?null!=t.bottom[n]:"top"===i?null!=t.top[n]:null!=t.normal[n]}},{key:"getRowCtrls",value:function(e){var t=this,n=this.mapRowNodes(e),i=this.getAllRowCtrls();return e&&n?i.filter((function(e){var i=e.getRowNode();return t.isRowInMap(i,n)})):i}},{key:"getCellCtrls",value:function(e,t){var n,i=this;Fn(t)&&(n={},t.forEach((function(e){var t=i.columnModel.getGridColumn(e);Fn(t)&&(n[t.getId()]=!0)})));var r=[];return this.getRowCtrls(e).forEach((function(e){e.getAllCellCtrls().forEach((function(e){var t=e.getColumn().getId();n&&!n[t]||r.push(e)}))})),r}},{key:"destroy",value:function(){this.removeAllRowComps(),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}},{key:"removeAllRowComps",value:function(){var e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}},{key:"getRowsToRecycle",value:function(){var e=[];Yn(this.rowCtrlsByRowIndex,(function(t,n){null==n.getRowNode().id&&e.push(t)})),this.removeRowCtrls(e);var t={};return Yn(this.rowCtrlsByRowIndex,(function(e,n){var i=n.getRowNode();t[i.id]=n})),this.rowCtrlsByRowIndex={},t}},{key:"removeRowCtrls",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.forEach((function(e){var i=t.rowCtrlsByRowIndex[e];i&&(i.destroyFirstPass(n),i.destroySecondPass()),delete t.rowCtrlsByRowIndex[e]}))}},{key:"onBodyScroll",value:function(e){"vertical"===e.direction&&this.redraw({afterScroll:!0})}},{key:"redraw",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.afterScroll;this.stickyRowFeature&&Xo()&&(e=this.getCellToRestoreFocusToAfterRefresh()||void 0);var i=this.firstRenderedRow,r=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();var o=!1;this.stickyRowFeature&&(o=this.stickyRowFeature.checkStickyRows());var a=this.firstRenderedRow!==i||this.lastRenderedRow!==r;if((!n||o||a)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,n),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(n&&!o),null!=e)){var s=this.getCellToRestoreFocusToAfterRefresh();null!=e&&null==s&&(this.animationFrameService.flushAllFrames(),this.restoreFocusedCell(e))}}},{key:"removeRowCompsNotToDraw",value:function(e,t){var n={};e.forEach((function(e){return n[e]=!0}));var i=Object.keys(this.rowCtrlsByRowIndex).filter((function(e){return!n[e]}));this.removeRowCtrls(i,t)}},{key:"calculateIndexesToDraw",value:function(e){var t=this,n=aa(this.firstRenderedRow,this.lastRenderedRow),i=function(e,i){var r=i.getRowNode().rowIndex;null!=r&&(r<t.firstRenderedRow||r>t.lastRenderedRow)&&t.doNotUnVirtualiseRow(i)&&n.push(r)};Yn(this.rowCtrlsByRowIndex,i),Yn(e,i),n.sort((function(e,t){return e-t}));for(var r=[],o=0;o<n.length;o++){var a=n[o],s=this.paginationProxy.getRow(a);s&&!s.sticky&&r.push(a)}return r}},{key:"recycleRows",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.calculateIndexesToDraw(e);(this.printLayout||i)&&(n=!1),this.removeRowCompsNotToDraw(r,!n);var o=[];if(r.forEach((function(r){var a=t.createOrUpdateRowCtrl(r,e,n,i);Fn(a)&&o.push(a)})),e){var a=i&&!this.gridOptionsService.get("suppressAnimationFrame")&&!this.printLayout;a?this.beans.animationFrameService.addDestroyTask((function(){t.destroyRowCtrls(e,n),t.updateAllRowCtrls(),t.dispatchDisplayedRowsChanged()})):this.destroyRowCtrls(e,n)}this.updateAllRowCtrls()}},{key:"dispatchDisplayedRowsChanged",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t={type:Er.EVENT_DISPLAYED_ROWS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(t)}},{key:"onDisplayedColumnsChanged",value:function(){var e=this.columnModel.isPinningLeft(),t=this.columnModel.isPinningRight();(this.pinningLeft!==e||t!==this.pinningRight)&&(this.pinningLeft=e,this.pinningRight=t,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}},{key:"redrawFullWidthEmbeddedRows",value:function(){var e=[];this.getFullWidthRowCtrls().forEach((function(t){var n=t.getRowNode().rowIndex;e.push(n.toString())})),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}},{key:"getFullWidthRowCtrls",value:function(e){var t=this,n=this.mapRowNodes(e);return this.getAllRowCtrls().filter((function(e){if(!e.isFullWidth())return!1;var i=e.getRowNode();return!(null!=n&&!t.isRowInMap(i,n))}))}},{key:"createOrUpdateRowCtrl",value:function(e,t,n,i){var r,o=this.rowCtrlsByRowIndex[e];if(o||Fn(r=this.paginationProxy.getRow(e))&&Fn(t)&&t[r.id]&&r.alreadyRendered&&(o=t[r.id],t[r.id]=null),!o){if(r||(r=this.paginationProxy.getRow(e)),!Fn(r))return;o=this.createRowCon(r,n,i)}return r&&(r.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=o,o}},{key:"destroyRowCtrls",value:function(e,t){var n=this,i=[];Yn(e,(function(e,r){r&&(n.cachedRowCtrls&&r.isCacheable()?n.cachedRowCtrls.addRow(r):(r.destroyFirstPass(!t),t?(n.zombieRowCtrls[r.getInstanceId()]=r,i.push((function(){r.destroySecondPass(),delete n.zombieRowCtrls[r.getInstanceId()]}))):r.destroySecondPass()))})),t&&(i.push((function(){n.updateAllRowCtrls(),n.dispatchDisplayedRowsChanged()})),ui(i))}},{key:"getRowBuffer",value:function(){return this.gridOptionsService.get("rowBuffer")}},{key:"getRowBufferInPixels",value:function(){return this.getRowBuffer()*this.gridOptionsService.getRowHeightAsNumber()}},{key:"workOutFirstAndLastRowsToRender",value:function(){var e,t;if(this.rowContainerHeightService.updateOffset(),this.paginationProxy.isRowsToRender())if(this.printLayout)this.environment.refreshRowHeightVariable(),e=this.paginationProxy.getPageFirstRow(),t=this.paginationProxy.getPageLastRow();else{var n,i,r=this.getRowBufferInPixels(),o=this.ctrlsService.getGridBodyCtrl(),a=this.gridOptionsService.get("suppressRowVirtualisation"),s=!1;do{var l=this.paginationProxy.getPixelOffset(),u=this.paginationProxy.getCurrentPagePixelRange(),c=u.pageFirstPixel,d=u.pageLastPixel,h=this.rowContainerHeightService.getDivStretchOffset(),p=o.getScrollFeature().getVScrollPosition(),f=p.top,v=p.bottom;a?(n=c+h,i=d+h):(n=Math.max(f+l-r,c)+h,i=Math.min(v+l+r,d)+h),this.firstVisibleVPixel=Math.max(f+l,c)+h,s=this.ensureAllRowsInRangeHaveHeightsCalculated(n,i)}while(s);var g=this.paginationProxy.getRowIndexAtPixel(n),m=this.paginationProxy.getRowIndexAtPixel(i),y=this.paginationProxy.getPageFirstRow(),C=this.paginationProxy.getPageLastRow();g<y&&(g=y),m>C&&(m=C),e=g,t=m}else e=0,t=-1;var k=this.gridOptionsService.isDomLayout("normal"),w=this.gridOptionsService.get("suppressMaxRenderedRowRestriction"),S=Math.max(this.getRowBuffer(),500);k&&!w&&t-e>S&&(t=e+S);var b=e!==this.firstRenderedRow,E=t!==this.lastRenderedRow;if(b||E){this.firstRenderedRow=e,this.lastRenderedRow=t;var x={type:Er.EVENT_VIEWPORT_CHANGED,firstRow:e,lastRow:t};this.eventService.dispatchEvent(x)}}},{key:"dispatchFirstDataRenderedEvent",value:function(){var e=this;if(!this.dataFirstRenderedFired){this.dataFirstRenderedFired=!0;var t={type:Er.EVENT_FIRST_DATA_RENDERED,firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow};window.requestAnimationFrame((function(){e.beans.eventService.dispatchEvent(t)}))}}},{key:"ensureAllRowsInRangeHaveHeightsCalculated",value:function(e,t){var n=this.paginationProxy.ensureRowHeightsValid(e,t,-1,-1);return n&&this.updateContainerHeights(),n}},{key:"getFirstVisibleVerticalPixel",value:function(){return this.firstVisibleVPixel}},{key:"getFirstVirtualRenderedRow",value:function(){return this.firstRenderedRow}},{key:"getLastVirtualRenderedRow",value:function(){return this.lastRenderedRow}},{key:"doNotUnVirtualiseRow",value:function(e){var t=e.getRowNode(),n=this.focusService.isRowNodeFocused(t),i=e.isEditing(),r=t.detail;return!!(n||i||r)&&!!this.paginationProxy.isRowPresent(t)}},{key:"createRowCon",value:function(e,t,n){var i=this.cachedRowCtrls?this.cachedRowCtrls.getRow(e):null;if(i)return i;var r=this.gridOptionsService.get("suppressAnimationFrame"),o=n&&!r&&!this.printLayout;return new kc(e,this.beans,t,o,this.printLayout)}},{key:"getRenderedNodes",value:function(){var e=this.rowCtrlsByRowIndex;return Object.keys(e).map((function(t){return e[t].getRowNode()}))}},{key:"getRowByPosition",value:function(e){var t,n=e.rowIndex;switch(e.rowPinned){case"top":t=this.topRowCtrls[n];break;case"bottom":t=this.bottomRowCtrls[n];break;default:(t=this.rowCtrlsByRowIndex[n])||(t=this.getStickyTopRowCtrls().find((function(e){return e.getRowNode().rowIndex===n}))||null)}return t}},{key:"getRowNode",value:function(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}}},{key:"isRangeInRenderedViewport",value:function(e,t){if(null==e||null==t)return!1;var n=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!n}}]),n}(kr);Mn([Di("animationFrameService")],Nd.prototype,"animationFrameService",2),Mn([Di("paginationProxy")],Nd.prototype,"paginationProxy",2),Mn([Di("columnModel")],Nd.prototype,"columnModel",2),Mn([Di("pinnedRowModel")],Nd.prototype,"pinnedRowModel",2),Mn([Di("rowModel")],Nd.prototype,"rowModel",2),Mn([Di("focusService")],Nd.prototype,"focusService",2),Mn([Di("beans")],Nd.prototype,"beans",2),Mn([Di("rowContainerHeightService")],Nd.prototype,"rowContainerHeightService",2),Mn([Di("ctrlsService")],Nd.prototype,"ctrlsService",2),Mn([Ei],Nd.prototype,"postConstruct",1),Nd=Mn([Ri("rowRenderer")],Nd);var Ld=function(){function e(t){(0,a.Z)(this,e),this.entriesMap={},this.entriesList=[],this.maxCount=t}return(0,s.Z)(e,[{key:"addRow",value:function(e){if(this.entriesMap[e.getRowNode().id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){var t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}},{key:"getRow",value:function(e){if(null==e||null==e.id)return null;var t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.getRowNode()!=e?null:t):null}},{key:"has",value:function(e){return null!=this.entriesMap[e.id]}},{key:"removeRow",value:function(e){var t=e.id,n=this.entriesMap[t];delete this.entriesMap[t],Qi(this.entriesList,n)}},{key:"removeFromCache",value:function(e){var t=e.getRowNode().id;delete this.entriesMap[t],Qi(this.entriesList,e)}},{key:"getEntries",value:function(){return this.entriesList}}]),e}(),Id=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"formatValue",value:function(e,t,n,i){var r,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=null,s=e.getColDef();if(i?r=i:o&&(r=s.valueFormatter),r){var l=this.gridOptionsService.addGridCommonParams({value:n,node:t,data:t?t.data:null,colDef:s,column:e});a="function"===typeof r?r(l):this.expressionService.evaluate(r,l)}else if(s.refData)return s.refData[n]||"";return null==a&&Array.isArray(n)&&(a=n.join(", ")),a}}]),n}(kr);Mn([Di("expressionService")],Id.prototype,"expressionService",2),Id=Mn([Ri("valueFormatterService")],Id);var Fd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"init",value:function(){var e=this;this.setPinnedTopRowData(),this.setPinnedBottomRowData(),this.addManagedPropertyListener("pinnedTopRowData",(function(){return e.setPinnedTopRowData()})),this.addManagedPropertyListener("pinnedBottomRowData",(function(){return e.setPinnedBottomRowData()}))}},{key:"isEmpty",value:function(e){return Gn("top"===e?this.pinnedTopRows:this.pinnedBottomRows)}},{key:"isRowsToRender",value:function(e){return!this.isEmpty(e)}},{key:"getRowAtPixel",value:function(e,t){var n="top"===t?this.pinnedTopRows:this.pinnedBottomRows;if(Gn(n))return 0;for(var i=0;i<n.length;i++){var r=n[i];if(r.rowTop+r.rowHeight-1>=e)return i}return n.length-1}},{key:"setPinnedTopRowData",value:function(){var e=this.gridOptionsService.get("pinnedTopRowData");this.pinnedTopRows=this.createNodesFromData(e,!0);var t={type:Er.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(t)}},{key:"setPinnedBottomRowData",value:function(){var e=this.gridOptionsService.get("pinnedBottomRowData");this.pinnedBottomRows=this.createNodesFromData(e,!1);var t={type:Er.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(t)}},{key:"createNodesFromData",value:function(e,t){var n=this,i=[];if(e){var r=0;e.forEach((function(e,o){var a=new jl(n.beans);a.data=e;var s=t?jl.ID_PREFIX_TOP_PINNED:jl.ID_PREFIX_BOTTOM_PINNED;a.id=s+o,a.rowPinned=t?"top":"bottom",a.setRowTop(r),a.setRowHeight(n.gridOptionsService.getRowHeightForNode(a).height),a.setRowIndex(o),r+=a.rowHeight,i.push(a)}))}return i}},{key:"getPinnedTopRowData",value:function(){return this.pinnedTopRows}},{key:"getPinnedBottomRowData",value:function(){return this.pinnedBottomRows}},{key:"getPinnedTopTotalHeight",value:function(){return this.getTotalHeight(this.pinnedTopRows)}},{key:"getPinnedTopRowCount",value:function(){return this.pinnedTopRows?this.pinnedTopRows.length:0}},{key:"getPinnedBottomRowCount",value:function(){return this.pinnedBottomRows?this.pinnedBottomRows.length:0}},{key:"getPinnedTopRow",value:function(e){return this.pinnedTopRows[e]}},{key:"getPinnedBottomRow",value:function(e){return this.pinnedBottomRows[e]}},{key:"forEachPinnedTopRow",value:function(e){Gn(this.pinnedTopRows)||this.pinnedTopRows.forEach(e)}},{key:"forEachPinnedBottomRow",value:function(e){Gn(this.pinnedBottomRows)||this.pinnedBottomRows.forEach(e)}},{key:"getPinnedBottomTotalHeight",value:function(){return this.getTotalHeight(this.pinnedBottomRows)}},{key:"getTotalHeight",value:function(e){if(!e||0===e.length)return 0;var t=Ui(e);return t.rowTop+t.rowHeight}}]),n}(kr);Mn([Di("beans")],Fd.prototype,"beans",2),Mn([Ei],Fd.prototype,"init",1),Fd=Mn([Ri("pinnedRowModel")],Fd);var _d=function(){function e(t,n){(0,a.Z)(this,e),this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=t,this.pathRoot={rowNode:n,children:null},this.mapToItems[n.id]=this.pathRoot}return(0,s.Z)(e,[{key:"setInactive",value:function(){this.active=!1}},{key:"isActive",value:function(){return this.active}},{key:"depthFirstSearchChangedPath",value:function(e,t){if(e.children)for(var n=0;n<e.children.length;n++)this.depthFirstSearchChangedPath(e.children[n],t);t(e.rowNode)}},{key:"depthFirstSearchEverything",value:function(e,t,n){if(e.childrenAfterGroup)for(var i=0;i<e.childrenAfterGroup.length;i++){var r=e.childrenAfterGroup[i];r.childrenAfterGroup?this.depthFirstSearchEverything(e.childrenAfterGroup[i],t,n):n&&t(r)}t(e)}},{key:"forEachChangedNodeDepthFirst",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.active&&!n?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}},{key:"executeFromRootNode",value:function(e){e(this.pathRoot.rowNode)}},{key:"createPathItems",value:function(e){for(var t=e,n=0;!this.mapToItems[t.id];){var i={rowNode:t,children:null};this.mapToItems[t.id]=i,n++,t=t.parent}return n}},{key:"populateColumnsMap",value:function(e,t){var n=this;if(this.keepingColumns&&t)for(var i=e;i;)this.nodeIdsToColumns[i.id]||(this.nodeIdsToColumns[i.id]={}),t.forEach((function(e){return n.nodeIdsToColumns[i.id][e.getId()]=!0})),i=i.parent}},{key:"linkPathItems",value:function(e,t){for(var n=e,i=0;i<t;i++){var r=this.mapToItems[n.id],o=this.mapToItems[n.parent.id];o.children||(o.children=[]),o.children.push(r),n=n.parent}}},{key:"addParentNode",value:function(e,t){if(e&&!e.isRowPinned()){var n=this.createPathItems(e);this.linkPathItems(e,n),this.populateColumnsMap(e,t)}}},{key:"canSkip",value:function(e){return this.active&&!this.mapToItems[e.id]}},{key:"getValueColumnsForNode",value:function(e,t){if(!this.keepingColumns)return t;var n=this.nodeIdsToColumns[e.id];return t.filter((function(e){return n[e.getId()]}))}},{key:"getNotValueColumnsForNode",value:function(e,t){if(!this.keepingColumns)return null;var n=this.nodeIdsToColumns[e.id];return t.filter((function(e){return!n[e.getId()]}))}}]),e}(),Gd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).state=n.STATE_WAITING_TO_LOAD,i.version=0,i.id=e,i}return(0,s.Z)(n,[{key:"getId",value:function(){return this.id}},{key:"load",value:function(){this.state=n.STATE_LOADING,this.loadFromDatasource()}},{key:"getVersion",value:function(){return this.version}},{key:"setStateWaitingToLoad",value:function(){this.version++,this.state=n.STATE_WAITING_TO_LOAD}},{key:"getState",value:function(){return this.state}},{key:"pageLoadFailed",value:function(e){this.isRequestMostRecentAndLive(e)&&(this.state=n.STATE_FAILED,this.processServerFail()),this.dispatchLoadCompleted(!1)}},{key:"success",value:function(e,t){this.successCommon(e,t)}},{key:"pageLoaded",value:function(e,t,n){this.successCommon(e,{rowData:t,rowCount:n})}},{key:"isRequestMostRecentAndLive",value:function(e){var t=e===this.version,n=this.isAlive();return t&&n}},{key:"successCommon",value:function(e,t){this.dispatchLoadCompleted(),this.isRequestMostRecentAndLive(e)&&(this.state=n.STATE_LOADED,this.processServerResult(t))}},{key:"dispatchLoadCompleted",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t={type:n.EVENT_LOAD_COMPLETE,success:e,block:this};this.dispatchEvent(t)}}]),n}(kr);Gd.EVENT_LOAD_COMPLETE="loadComplete",Gd.STATE_WAITING_TO_LOAD="needsLoading",Gd.STATE_LOADING="loading",Gd.STATE_LOADED="loaded",Gd.STATE_FAILED="failed";var Zd=Gd,Vd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).activeBlockLoadsCount=0,e.blocks=[],e.active=!0,e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.maxConcurrentRequests=this.getMaxConcurrentDatasourceRequests();var e=this.gridOptionsService.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=Es.debounce(this.performCheckBlocksToLoad.bind(this),e))}},{key:"setBeans",value:function(e){this.logger=e.create("RowNodeBlockLoader")}},{key:"getMaxConcurrentDatasourceRequests",value:function(){var e=this.gridOptionsService.get("maxConcurrentDatasourceRequests");return null==e?2:e<=0?void 0:e}},{key:"addBlock",value:function(e){this.blocks.push(e),e.addEventListener(Zd.EVENT_LOAD_COMPLETE,this.loadComplete.bind(this)),this.checkBlockToLoad()}},{key:"removeBlock",value:function(e){Es.removeFromArray(this.blocks,e)}},{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this),this.active=!1}},{key:"loadComplete",value:function(){this.activeBlockLoadsCount--,this.checkBlockToLoad(),this.dispatchEvent({type:Vd.BLOCK_LOADED_EVENT}),0==this.activeBlockLoadsCount&&this.dispatchEvent({type:Vd.BLOCK_LOADER_FINISHED_EVENT})}},{key:"checkBlockToLoad",value:function(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}},{key:"performCheckBlocksToLoad",value:function(){if(this.active)if(this.printCacheStatus(),null!=this.maxConcurrentRequests&&this.activeBlockLoadsCount>=this.maxConcurrentRequests)this.logger.log("checkBlockToLoad: max loads exceeded");else{var e=this.getAvailableLoadingCount(),t=this.blocks.filter((function(e){return e.getState()===Zd.STATE_WAITING_TO_LOAD})).slice(0,e);this.registerLoads(t.length),t.forEach((function(e){return e.load()})),this.printCacheStatus()}}},{key:"getBlockState",value:function(){if(this.gridOptionsService.isRowModelType("serverSide"))return this.rowModel.getBlockStates();var e={};return this.blocks.forEach((function(t){var n=t.getBlockStateJson(),i=n.id,r=n.state;e[i]=r})),e}},{key:"printCacheStatus",value:function(){this.logger.isLogging()&&this.logger.log("printCacheStatus: activePageLoadsCount = ".concat(this.activeBlockLoadsCount,", blocks = ").concat(JSON.stringify(this.getBlockState())))}},{key:"isLoading",value:function(){return this.activeBlockLoadsCount>0}},{key:"registerLoads",value:function(e){this.activeBlockLoadsCount+=e}},{key:"getAvailableLoadingCount",value:function(){return void 0!==this.maxConcurrentRequests?this.maxConcurrentRequests-this.activeBlockLoadsCount:void 0}}]),n}(kr);Vd.BLOCK_LOADED_EVENT="blockLoaded",Vd.BLOCK_LOADER_FINISHED_EVENT="blockLoaderFinished",Mn([Di("rowModel")],Vd.prototype,"rowModel",2),Mn([Ei],Vd.prototype,"postConstruct",1),Mn([Nn(0,Pi("loggerFactory"))],Vd.prototype,"setBeans",1),Vd=Mn([Ri("rowNodeBlockLoader")],Vd);var Hd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).currentPage=0,e.topDisplayedRowIndex=0,e.bottomDisplayedRowIndex=0,e.pixelOffset=0,e.masterRowCount=0,e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.active=this.gridOptionsService.get("pagination"),this.pageSizeFromGridOptions=this.gridOptionsService.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedListener(this.eventService,Er.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this)),this.onModelUpdated()}},{key:"ensureRowHeightsValid",value:function(e,t,n,i){var r=this.rowModel.ensureRowHeightsValid(e,t,this.getPageFirstRow(),this.getPageLastRow());return r&&this.calculatePages(),r}},{key:"isPaginateChildRows",value:function(){return!(!this.gridOptionsService.get("groupRemoveSingleChildren")&&!this.gridOptionsService.get("groupRemoveLowestSingleChildren"))||this.gridOptionsService.get("paginateChildRows")}},{key:"onModelUpdated",value:function(e){this.calculatePages();var t={type:Er.EVENT_PAGINATION_CHANGED,animate:!!e&&e.animate,newData:!!e&&e.newData,newPage:!!e&&e.newPage,newPageSize:!!e&&e.newPageSize,keepRenderedRows:!!e&&e.keepRenderedRows};this.eventService.dispatchEvent(t)}},{key:"onPaginationGridOptionChanged",value:function(){this.active=this.gridOptionsService.get("pagination"),this.calculatePages();var e={type:Er.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!1,keepRenderedRows:!0};this.eventService.dispatchEvent(e)}},{key:"onPageSizeGridOptionChanged",value:function(){this.setPageSize(this.gridOptionsService.get("paginationPageSize"),"gridOptions")}},{key:"goToPage",value:function(e){if(this.active&&this.currentPage!==e&&"number"===typeof this.currentPage){this.currentPage=e;var t={type:Er.EVENT_MODEL_UPDATED,animate:!1,keepRenderedRows:!1,newData:!1,newPage:!0,newPageSize:!1};this.onModelUpdated(t)}}},{key:"getPixelOffset",value:function(){return this.pixelOffset}},{key:"getRow",value:function(e){return this.rowModel.getRow(e)}},{key:"getRowNode",value:function(e){return this.rowModel.getRowNode(e)}},{key:"getRowIndexAtPixel",value:function(e){return this.rowModel.getRowIndexAtPixel(e)}},{key:"getCurrentPageHeight",value:function(){return _n(this.topRowBounds)||_n(this.bottomRowBounds)?0:Math.max(this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop,0)}},{key:"getCurrentPagePixelRange",value:function(){return{pageFirstPixel:this.topRowBounds?this.topRowBounds.rowTop:0,pageLastPixel:this.bottomRowBounds?this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight:0}}},{key:"isRowPresent",value:function(e){return!!this.rowModel.isRowPresent(e)&&(e.rowIndex>=this.topDisplayedRowIndex&&e.rowIndex<=this.bottomDisplayedRowIndex)}},{key:"isEmpty",value:function(){return this.rowModel.isEmpty()}},{key:"isRowsToRender",value:function(){return this.rowModel.isRowsToRender()}},{key:"forEachNode",value:function(e){return this.rowModel.forEachNode(e)}},{key:"forEachNodeOnPage",value:function(e){for(var t=this.getPageFirstRow(),n=this.getPageLastRow(),i=t;i<=n;i++){var r=this.getRow(i);r&&e(r)}}},{key:"getType",value:function(){return this.rowModel.getType()}},{key:"getRowBounds",value:function(e){var t=this.rowModel.getRowBounds(e);return t.rowIndex=e,t}},{key:"getPageFirstRow",value:function(){return this.topRowBounds?this.topRowBounds.rowIndex:-1}},{key:"getPageLastRow",value:function(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1}},{key:"getRowCount",value:function(){return this.rowModel.getRowCount()}},{key:"getPageForIndex",value:function(e){return Math.floor(e/this.pageSize)}},{key:"goToPageWithIndex",value:function(e){if(this.active){var t=this.getPageForIndex(e);this.goToPage(t)}}},{key:"isRowInPage",value:function(e){return!this.active||this.getPageForIndex(e.rowIndex)===this.currentPage}},{key:"isLastPageFound",value:function(){return this.rowModel.isLastRowIndexKnown()}},{key:"getCurrentPage",value:function(){return this.currentPage}},{key:"goToNextPage",value:function(){this.goToPage(this.currentPage+1)}},{key:"goToPreviousPage",value:function(){this.goToPage(this.currentPage-1)}},{key:"goToFirstPage",value:function(){this.goToPage(0)}},{key:"goToLastPage",value:function(){var e=this.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}},{key:"getPageSize",value:function(){return this.pageSize}},{key:"getTotalPages",value:function(){return this.totalPages}},{key:"setPage",value:function(e){this.currentPage=e}},{key:"pageSize",get:function(){return Fn(this.pageSizeAutoCalculated)?this.pageSizeAutoCalculated:Fn(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:Fn(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:Fn(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}},{key:"unsetAutoCalculatedPageSize",value:function(){if(void 0!==this.pageSizeAutoCalculated){var e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&this.onModelUpdated({type:Er.EVENT_MODEL_UPDATED,animate:!1,keepRenderedRows:!1,newData:!1,newPage:!1,newPageSize:!0})}}},{key:"setPageSize",value:function(e,t){var n=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()}if(n!==this.pageSize){var i={type:Er.EVENT_MODEL_UPDATED,animate:!1,keepRenderedRows:!1,newData:!1,newPage:!1,newPageSize:!0};this.onModelUpdated(i)}}},{key:"calculatePages",value:function(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.topRowBounds=this.rowModel.getRowBounds(this.topDisplayedRowIndex),this.topRowBounds&&(this.topRowBounds.rowIndex=this.topDisplayedRowIndex),this.bottomRowBounds=this.rowModel.getRowBounds(this.bottomDisplayedRowIndex),this.bottomRowBounds&&(this.bottomRowBounds.rowIndex=this.bottomDisplayedRowIndex),this.setPixelOffset(Fn(this.topRowBounds)?this.topRowBounds.rowTop:0)}},{key:"setPixelOffset",value:function(e){this.pixelOffset!==e&&(this.pixelOffset=e,this.eventService.dispatchEvent({type:Er.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED}))}},{key:"setZeroRows",value:function(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}},{key:"adjustCurrentPageIfInvalid",value:function(){this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!isFinite(this.currentPage)||isNaN(this.currentPage)||this.currentPage<0)&&(this.currentPage=0)}},{key:"calculatePagesMasterRowsOnly",value:function(){if(this.masterRowCount=this.rowModel.getTopLevelRowCount(),this.masterRowCount<=0)this.setZeroRows();else{var e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid();var t=this.pageSize*this.currentPage,n=this.pageSize*(this.currentPage+1)-1;if(n>e&&(n=e),this.topDisplayedRowIndex=this.rowModel.getTopLevelRowDisplayedIndex(t),n===e)this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1;else{var i=this.rowModel.getTopLevelRowDisplayedIndex(n+1);this.bottomDisplayedRowIndex=i-1}}}},{key:"getMasterRowCount",value:function(){return this.masterRowCount}},{key:"calculatePagesAllRows",value:function(){if(this.masterRowCount=this.rowModel.getRowCount(),0!==this.masterRowCount){var 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)}else this.setZeroRows()}},{key:"calculatedPagesNotActive",value:function(){this.setPageSize(this.masterRowCount,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1}}]),n}(kr);Mn([Di("rowModel")],Hd.prototype,"rowModel",2),Mn([Ei],Hd.prototype,"postConstruct",1),Hd=Mn([Ri("paginationProxy")],Hd);var Bd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"processAllCellClasses",value:function(e,t,n,i){this.processClassRules(void 0,e.cellClassRules,t,n,i),this.processStaticCellClasses(e,t,n)}},{key:"processClassRules",value:function(e,t,n,i,r){var o=this;if(null!=t||null!=e){var a={},s={},l=function(e,t){e.split(" ").forEach((function(e){""!=e.trim()&&t(e)}))};if(t)for(var u=Object.keys(t),c=function(e){var i=u[e],r=t[i],c=void 0;"string"===typeof r?c=o.expressionService.evaluate(r,n):"function"===typeof r&&(c=r(n)),l(i,(function(e){c?a[e]=!0:s[e]=!0}))},d=0;d<u.length;d++)c(d);e&&r&&Object.keys(e).forEach((function(e){return l(e,(function(e){a[e]||(s[e]=!0)}))})),r&&Object.keys(s).forEach(r),Object.keys(a).forEach(i)}}},{key:"getStaticCellClasses",value:function(e,t){var n,i=e.cellClass;if(!i)return[];"function"===typeof i?n=i(t):n=i;return"string"===typeof n&&(n=[n]),n||[]}},{key:"processStaticCellClasses",value:function(e,t,n){this.getStaticCellClasses(e,t).forEach((function(e){n(e)}))}}]),n}(kr);Mn([Di("expressionService")],Bd.prototype,"expressionService",2),Bd=Mn([Ri("stylingService")],Bd);var Wd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){return(0,a.Z)(this,n),t.call(this,e,"ag-toggle-button")}return(0,s.Z)(n,[{key:"setValue",value:function(e,t){return(0,mn.Z)((0,yn.Z)(n.prototype),"setValue",this).call(this,e,t),this.addOrRemoveCssClass("ag-selected",this.getValue()),this}}]),n}(tl),zd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){return(0,a.Z)(this,n),t.call(this,e,"ag-text-area",null,"textarea")}return(0,s.Z)(n,[{key:"setValue",value:function(e,t){var i=(0,mn.Z)((0,yn.Z)(n.prototype),"setValue",this).call(this,e,t);return this.eInput.value=e,i}},{key:"setCols",value:function(e){return this.eInput.cols=e,this}},{key:"setRows",value:function(e){return this.eInput.rows=e,this}}]),n}(el),Ud=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){return(0,a.Z)(this,n),t.call(this,e,"ag-date-field","date")}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;(0,mn.Z)((0,yn.Z)(n.prototype),"postConstruct",this).call(this),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this));var t=Wo();this.addManagedListener(this.eInput,"mousedown",(function(){e.isDisabled()||t||e.eInput.focus()})),this.eInput.step="any"}},{key:"onWheel",value:function(e){document.activeElement===this.eInput&&e.preventDefault()}},{key:"setMin",value:function(e){var t,n=e instanceof Date?null!=(t=ha(null!=e?e:null,!1))?t:void 0:e;return this.min===n||(this.min=n,es(this.eInput,"min",n)),this}},{key:"setMax",value:function(e){var t,n=e instanceof Date?null!=(t=ha(null!=e?e:null,!1))?t:void 0:e;return this.max===n||(this.max=n,es(this.eInput,"max",n)),this}},{key:"setStep",value:function(e){return this.step===e||(this.step=e,es(this.eInput,"step",e)),this}},{key:"getDate",value:function(){var e;if(this.eInput.validity.valid)return null!=(e=va(this.getValue()))?e:void 0}},{key:"setDate",value:function(e,t){this.setValue(ha(null!=e?e:null,!1),t)}}]),n}(fl),jd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){return(0,a.Z)(this,n),t.call(this,e,"ag-range-field","range")}return(0,s.Z)(n,[{key:"postConstruct",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"postConstruct",this).call(this);var e=this.config,t=e.min,i=e.max,r=e.step;null!=t&&this.setMinValue(t),null!=i&&this.setMaxValue(i),this.setStep(r||1)}},{key:"addInputListeners",value:function(){var e=this;this.addManagedListener(this.eInput,"input",(function(t){var n=t.target.value;e.setValue(n)}))}},{key:"setMinValue",value:function(e){return this.min=e,this.eInput.setAttribute("min",e.toString()),this}},{key:"setMaxValue",value:function(e){return this.max=e,this.eInput.setAttribute("max",e.toString()),this}},{key:"setStep",value:function(e){return this.eInput.setAttribute("step",e.toString()),this}},{key:"setValue",value:function(e,t){null!=this.min&&(e=Math.max(parseFloat(e),this.min).toString()),null!=this.max&&(e=Math.min(parseFloat(e),this.max).toString());var i=(0,mn.Z)((0,yn.Z)(n.prototype),"setValue",this).call(this,e,t);return this.eInput.value=e,i}}]),n}(el),Kd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i){var r;return(0,a.Z)(this,n),(r=t.call(this,'<div class="ag-rich-select-row" role="presentation"></div>')).params=e,r.wrapperEl=i,r}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.addManagedListener(this.getGui(),"click",this.onClick.bind(this))}},{key:"setState",value:function(e){var t="";this.params.valueFormatter&&(t=this.params.valueFormatter(e)),this.populateWithRenderer(e,t)||this.populateWithoutRenderer(e,t),this.value=e}},{key:"highlightString",value:function(e){var t=this.parsedValue;if(!this.params.cellRenderer&&Fn(t)){var n=Fn(e);if(n){var i=null==t?void 0:t.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(i>=0){var r=i+e.length,o=Lr(t.slice(0,i),!0),a=Lr(t.slice(i,r),!0),s=Lr(t.slice(r));this.renderValueWithoutRenderer("".concat(o,'<span class="ag-rich-select-row-text-highlight">').concat(a,"</span>").concat(s))}else n=!1}n||this.renderValueWithoutRenderer(t)}}},{key:"updateHighlighted",value:function(e){var t,n=this.getGui(),i="ag-rich-select-row-".concat(this.getCompId());(null==(t=n.parentElement)||t.setAttribute("id",i),e)&&(mo(this.getParentComponent().getAriaElement(),i),this.wrapperEl.setAttribute("data-active-option",i));Po(n.parentElement,e),this.addOrRemoveCssClass("ag-rich-select-row-selected",e)}},{key:"populateWithoutRenderer",value:function(e,t){var n=this.gridOptionsService.getDocument(),i=this.getGui(),r=n.createElement("span");r.style.overflow="hidden",r.style.textOverflow="ellipsis";var o=Lr(Fn(t)?t:e,!0);this.parsedValue=Fn(o)?o:null,i.appendChild(r),this.renderValueWithoutRenderer(o),this.setTooltip({newTooltipText:this.parsedValue,shouldDisplayTooltip:function(){return r.scrollWidth>r.clientWidth}})}},{key:"renderValueWithoutRenderer",value:function(e){var t=this.getGui().querySelector("span");t&&(t.innerHTML=Fn(e)?e:"&nbsp;")}},{key:"populateWithRenderer",value:function(e,t){var n,i,r=this;return this.params.cellRenderer&&(i=this.userComponentFactory.getCellRendererDetails(this.params,{value:e,valueFormatted:t,setTooltip:function(e,t){r.setTooltip({newTooltipText:e,shouldDisplayTooltip:t})}})),i&&(n=i.newAgStackInstance()),n&&ns(n,this.getGui()),!!n&&(n.then((function(e){r.addDestroyFunc((function(){r.getContext().destroyBean(e)}))})),!0)}},{key:"onClick",value:function(){var e=this.getParentComponent(),t={type:Er.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:!1,value:this.value};null==e||e.dispatchEvent(t)}}]),n}(Ns);Mn([Di("userComponentFactory")],Kd.prototype,"userComponentFactory",2),Mn([Ei],Kd.prototype,"postConstruct",1);var Yd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;(0,a.Z)(this,n),(i=t.call(this,n.getTemplate((null==e?void 0:e.cssIdentifier)||"default"))).renderedRows=new Map,i.rowHeight=20,i.isHeightFromTheme=!0;var r=e||{},o=r.cssIdentifier,s=void 0===o?"default":o,l=r.ariaRole,u=void 0===l?"listbox":l,c=r.listName;return i.cssIdentifier=s,i.ariaRole=u,i.listName=c,i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:function(t){return e.onFocusIn(t)},onFocusOut:function(t){return e.onFocusOut(t)},focusInnerElement:function(t){return e.focusInnerElement(t)},onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)}}),this.setAriaProperties(),this.addManagedListener(this.eventService,Er.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanged.bind(this))}},{key:"onGridStylesChanged",value:function(){this.rowHeight=this.getItemHeight(),this.refresh()}},{key:"setAriaProperties",value:function(){var e=this.localeService.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),t=this.eContainer;no(t,this.ariaRole),so(t,e)}},{key:"addResizeObserver",value:function(){var e=this,t=this.resizeObserverService.observeResize(this.getGui(),(function(){return e.animationFrameService.requestAnimationFrame((function(){return e.drawVirtualRows()}))}));this.addDestroyFunc(t)}},{key:"focusInnerElement",value:function(e){this.focusRow(e?this.model.getRowCount()-1:0)}},{key:"onFocusIn",value:function(e){var t=e.target;t.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=oo(t)-1)}},{key:"onFocusOut",value:function(e){this.getFocusableElement().contains(e.relatedTarget)||(this.lastFocusedRowIndex=null)}},{key:"handleKeyDown",value:function(e){switch(e.key){case hs.UP:case hs.DOWN:this.navigate(e.key===hs.UP)&&e.preventDefault()}}},{key:"onTabKeyDown",value:function(e){this.navigate(e.shiftKey)?e.preventDefault():(dr(e),this.forceFocusOutOfContainer(e.shiftKey))}},{key:"navigate",value:function(e){if(null==this.lastFocusedRowIndex)return!1;var t=this.lastFocusedRowIndex+(e?-1:1);return!(t<0||t>=this.model.getRowCount())&&(this.focusRow(t),!0)}},{key:"getLastFocusedRow",value:function(){return this.lastFocusedRowIndex}},{key:"focusRow",value:function(e){var t=this;this.ensureIndexVisible(e),window.setTimeout((function(){if(t.isAlive()){var n=t.renderedRows.get(e);n&&n.eDiv.focus()}}),10)}},{key:"getComponentAt",value:function(e){var t=this.renderedRows.get(e);return t&&t.rowComponent}},{key:"forEachRenderedRow",value:function(e){this.renderedRows.forEach((function(t,n){return e(t.rowComponent,n)}))}},{key:"getItemHeight",value:function(){return this.isHeightFromTheme?this.environment.getListItemHeight():this.rowHeight}},{key:"ensureIndexVisible",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.model.getRowCount();if("number"!==typeof e||e<0||e>=n)return console.warn("AG Grid: invalid row index for ensureIndexVisible: "+e),!1;var i=e*this.rowHeight,r=i+this.rowHeight,o=this.getGui(),a=o.scrollTop,s=o.offsetHeight,l=a+s,u=t?0:this.rowHeight,c=a>i+u,d=l<r-u;if(c)return o.scrollTop=i,!0;if(d){var h=r-s;return o.scrollTop=h,!0}return!1}},{key:"setComponentCreator",value:function(e){this.componentCreator=e}},{key:"setComponentUpdater",value:function(e){this.componentUpdater=e}},{key:"getRowHeight",value:function(){return this.rowHeight}},{key:"getScrollTop",value:function(){return this.getGui().scrollTop}},{key:"setRowHeight",value:function(e){this.isHeightFromTheme=!1,this.rowHeight=e,this.refresh()}},{key:"refresh",value:function(e){var t=this;if(null!=this.model&&this.isAlive()){var n=this.model.getRowCount();this.eContainer.style.height="".concat(n*this.rowHeight,"px"),gi((function(){return t.eContainer.clientHeight>=n*t.rowHeight}),(function(){t.isAlive()&&(t.canSoftRefresh(e)?t.drawVirtualRows(!0):(t.clearVirtualRows(),t.drawVirtualRows()))}))}}},{key:"canSoftRefresh",value:function(e){return!!(e&&this.renderedRows.size&&"function"===typeof this.model.areRowsEqual&&this.componentUpdater)}},{key:"clearVirtualRows",value:function(){var e=this;this.renderedRows.forEach((function(t,n){return e.removeRow(n)}))}},{key:"drawVirtualRows",value:function(e){if(this.isAlive()&&this.model){var t=this.getGui(),n=t.scrollTop,i=n+t.offsetHeight,r=Math.floor(n/this.rowHeight),o=Math.floor(i/this.rowHeight);this.ensureRowsRendered(r,o,e)}}},{key:"ensureRowsRendered",value:function(e,t,n){var i=this;this.renderedRows.forEach((function(n,r){(r<e||r>t)&&r!==i.lastFocusedRowIndex&&i.removeRow(r)})),n&&this.refreshRows();for(var r=e;r<=t;r++)this.renderedRows.has(r)||r<this.model.getRowCount()&&this.insertRow(r)}},{key:"insertRow",value:function(e){var t=this,n=this.model.getRow(e),i=document.createElement("div");i.classList.add("ag-virtual-list-item","ag-".concat(this.cssIdentifier,"-virtual-list-item")),no(i,"tree"===this.ariaRole?"treeitem":"option"),ko(i,this.model.getRowCount()),wo(i,e+1),i.setAttribute("tabindex","-1"),i.style.height="".concat(this.rowHeight,"px"),i.style.top="".concat(this.rowHeight*e,"px");var r=this.componentCreator(n,i);r.addGuiEventListener("focusin",(function(){return t.lastFocusedRowIndex=e})),i.appendChild(r.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:r,eDiv:i,value:n})}},{key:"removeRow",value:function(e){var t=this.renderedRows.get(e);this.eContainer.removeChild(t.eDiv),this.destroyBean(t.rowComponent),this.renderedRows.delete(e)}},{key:"refreshRows",value:function(){var e=this,t=this.model.getRowCount();this.renderedRows.forEach((function(n,i){var r,o;if(i>=t)e.removeRow(i);else{var a=e.model.getRow(i);(null==(o=(r=e.model).areRowsEqual)?void 0:o.call(r,n.value,a))?e.componentUpdater(a,n.rowComponent):e.removeRow(i)}}))}},{key:"addScrollListener",value:function(){var e=this;this.addGuiEventListener("scroll",(function(){return e.drawVirtualRows()}),{passive:!0})}},{key:"setModel",value:function(e){this.model=e}},{key:"getAriaElement",value:function(){return this.eContainer}},{key:"destroy",value:function(){this.isAlive()&&(this.clearVirtualRows(),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this))}}],[{key:"getTemplate",value:function(e){return'<div class="ag-virtual-list-viewport ag-'.concat(e,'-virtual-list-viewport" role="presentation">\n                <div class="ag-virtual-list-container ag-').concat(e,'-virtual-list-container" ref="eContainer"></div>\n            </div>')}}]),n}(xd);Mn([Di("resizeObserverService")],Yd.prototype,"resizeObserverService",2),Mn([Di("animationFrameService")],Yd.prototype,"animationFrameService",2),Mn([Ls("eContainer")],Yd.prototype,"eContainer",2),Mn([Ei],Yd.prototype,"postConstruct",1);var Xd=Yd,qd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i,r,o;(0,a.Z)(this,n),(i=t.call(this,On(Tn({pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"ag-list",className:"ag-rich-select",pickerIcon:"smallDown",ariaRole:"combobox",template:null!=(r=null==e?void 0:e.template)?r:'\n    <div class="ag-picker-field" role="presentation">\n        <div ref="eLabel"></div>\n            <div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-rich-select-value ag-picker-collapsed">\n            <div ref="eDisplayField" class="ag-picker-field-display"></div>\n            <ag-input-text-field ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>\n            <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n        </div>\n    </div>',modalPicker:!1},e),{maxPickerHeight:null!=(o=null==e?void 0:e.maxPickerHeight)?o:"calc(var(--ag-row-height) * 6.5)"}))).searchString="",i.highlightedItem=-1,i.lastRowHovered=-1,i.searchStringCreator=null;var s=e||{},l=s.cellRowHeight,u=s.value,c=s.valueList,d=s.searchStringCreator;return null!=l&&(i.cellRowHeight=l),void 0!==u&&(i.value=u),null!=c&&(i.values=c),d&&(i.searchStringCreator=d),i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;(0,mn.Z)((0,yn.Z)(n.prototype),"postConstruct",this).call(this),this.createLoadingElement(),this.createListComponent();var t=this.config,i=t.allowTyping,r=t.placeholder;i?(this.eInput.setAutoComplete(!1).setInputPlaceholder(r),this.eDisplayField.classList.add("ag-hidden")):this.eInput.setDisplayed(!1),this.eWrapper.tabIndex=this.gridOptionsService.get("tabIndex");var o=this.config.searchDebounceDelay,a=void 0===o?300:o;this.clearSearchString=fi(this.clearSearchString,a),this.renderSelectedValue(),i&&(this.eInput.onValueChange((function(t){return e.searchTextFromString(t)})),this.addManagedListener(this.eWrapper,"focus",this.onWrapperFocus.bind(this))),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this))}},{key:"createLoadingElement",value:function(){var e=this.gridOptionsService.getDocument(),t=this.localeService.getLocaleTextFunc(),n=e.createElement("div");n.classList.add("ag-loading-text"),n.innerText=t("loadingOoo","Loading..."),this.eLoading=n}},{key:"createListComponent",value:function(){var e=this;this.listComponent=this.createBean(new Xd({cssIdentifier:"rich-select"})),this.listComponent.setComponentCreator(this.createRowComponent.bind(this));this.listComponent.setComponentUpdater((function(e,t){})),this.listComponent.setParentComponent(this),this.addManagedListener(this.listComponent,Er.EVENT_FIELD_PICKER_VALUE_SELECTED,(function(t){e.onListValueSelected(t.value,t.fromEnterKey)}));var t=this.cellRowHeight;t&&this.listComponent.setRowHeight(t);var n=this.listComponent.getGui(),i=this.listComponent.getAriaElement();this.addManagedListener(n,"mousemove",this.onPickerMouseMove.bind(this)),this.addManagedListener(n,"mousedown",(function(e){return e.preventDefault()})),n.classList.add("ag-rich-select-list");var r="ag-rich-select-list-".concat(this.listComponent.getCompId());i.setAttribute("id",r),so(i,this.localeService.getLocaleTextFunc()(this.config.pickerAriaLabelKey,this.config.pickerAriaLabelValue)),Mo(this.eWrapper,i)}},{key:"renderSelectedValue",value:function(){var e,t,n=this,i=this.value,r=this.eDisplayField,o=this.config,a=this.config,s=a.allowTyping,l=a.initialInputValue,u=this.config.valueFormatter?this.config.valueFormatter(i):i;if(s)this.eInput.setValue(null!=l?l:u);else if(o.cellRenderer&&(e=this.userComponentFactory.getCellRendererDetails(this.config,{value:i,valueFormatted:u})),e&&(t=e.newAgStackInstance()),t)Ia(r),ns(t,r),t.then((function(e){n.addDestroyFunc((function(){return n.getContext().destroyBean(e)}))}));else{if(Fn(this.value))r.innerText=u,r.classList.remove("ag-display-as-placeholder");else{var c=o.placeholder;Fn(c)?(r.innerHTML="".concat(Lr(c)),r.classList.add("ag-display-as-placeholder")):Ia(r)}this.setTooltip({newTooltipText:null!=u?u:null,shouldDisplayTooltip:function(){return n.eDisplayField.scrollWidth>n.eDisplayField.clientWidth}})}}},{key:"getCurrentValueIndex",value:function(){var e=this.currentList,t=this.value;if(null==t||!e)return-1;for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}},{key:"highlightFilterMatch",value:function(){var e,t=this;null==(e=this.listComponent)||e.forEachRenderedRow((function(e,n){e.highlightString(t.searchString)}))}},{key:"highlightSelectedValue",value:function(e){var t,n=this;null==e&&(e=this.getCurrentValueIndex()),this.highlightedItem=e,null==(t=this.listComponent)||t.forEachRenderedRow((function(t,i){var r=-1!==e&&n.highlightedItem===i;t.updateHighlighted(r)}))}},{key:"setRowHeight",value:function(e){e!==this.cellRowHeight&&(this.cellRowHeight=e),this.listComponent&&this.listComponent.setRowHeight(e)}},{key:"createPickerComponent",value:function(){var e=this.values;return e&&this.setValueList({valueList:e}),this.listComponent}},{key:"setSearchStringCreator",value:function(e){this.searchStringCreator=e}},{key:"setValueList",value:function(e){var t=e.valueList,n=e.refresh;this.listComponent&&this.currentList!==t&&(this.currentList=t,this.listComponent.setModel({getRowCount:function(){return t.length},getRow:function(e){return t[e]},areRowsEqual:function(e,t){return e===t}}),n&&(this.values?this.listComponent.refresh(!0):(this.values=t,this.isPickerDisplayed&&this.showCurrentValueInPicker())))}},{key:"showPicker",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"showPicker",this).call(this),this.showCurrentValueInPicker(),this.displayOrHidePicker()}},{key:"showCurrentValueInPicker",value:function(){var e,t;if(this.listComponent)if(this.currentList){(null==(e=this.eLoading)?void 0:e.offsetParent)&&(null==(t=this.eLoading.parentElement)||t.removeChild(this.eLoading));var n=this.getCurrentValueIndex();-1!==n?(this.listComponent.refresh(),this.listComponent.ensureIndexVisible(n),this.listComponent.refresh(!0),this.highlightSelectedValue(n)):this.listComponent.refresh()}else this.isPickerDisplayed&&this.eLoading&&this.listComponent.appendChild(this.eLoading)}},{key:"beforeHidePicker",value:function(){this.highlightedItem=-1,(0,mn.Z)((0,yn.Z)(n.prototype),"beforeHidePicker",this).call(this)}},{key:"onWrapperFocus",value:function(){if(this.eInput){var e=this.eInput.getFocusableElement();e.focus(),e.select()}}},{key:"onWrapperFocusOut",value:function(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}},{key:"buildSearchStringFromKeyboardEvent",value:function(e){var t=e.key;if(t===hs.BACKSPACE)this.searchString=this.searchString.slice(0,-1),t="";else if(!ps(e))return;e.preventDefault(),this.searchTextFromCharacter(t)}},{key:"searchTextFromCharacter",value:function(e){this.searchString+=e,this.runSearch(),this.clearSearchString()}},{key:"searchTextFromString",value:function(e){null==e&&(e=""),this.searchString=e,this.runSearch()}},{key:"buildSearchStrings",value:function(e){var t,n=this.config.valueFormatter,i=void 0===n?function(e){return e}:n;return"number"===typeof e[0]||"string"===typeof e[0]?t=e.map((function(e){return i(e)})):"object"===typeof e[0]&&this.searchStringCreator&&(t=this.searchStringCreator(e)),t}},{key:"getSuggestionsAndFilteredValues",value:function(e,t){var n=this,i=[],r=[];if(!e.length)return{suggestions:i,filteredValues:r};var o=this.config,a=o.searchType,s=void 0===a?"fuzzy":a,l=o.filterList;if("fuzzy"===s){var u=os(this.searchString,t,!0);i=u.values;var c=u.indices;if(l&&c.length)for(var d=0;d<c.length;d++)r.push(this.values[c[d]])}else i=t.filter((function(e,t){var i=e.toLocaleLowerCase(),o=n.searchString.toLocaleLowerCase(),a="match"===s?i.startsWith(o):-1!==i.indexOf(o);return l&&a&&r.push(n.values[t]),a}));return{suggestions:i,filteredValues:r}}},{key:"filterListModel",value:function(e){this.config.filterList&&(this.setValueList({valueList:e,refresh:!0}),this.alignPickerToComponent())}},{key:"runSearch",value:function(){var e,t,n=this.values,i=this.buildSearchStrings(n);if(i){var r=this.getSuggestionsAndFilteredValues(this.searchString,i),o=r.suggestions,a=r.filteredValues,s=this.config,l=s.filterList,u=s.highlightMatch,c=s.searchType,d=void 0===c?"fuzzy":c,h=a.length,p=!(!l||""===this.searchString);if(this.filterListModel(p?a:n),o.length){var f=p?0:i.indexOf(o[0]);this.selectListItem(f)}else if(this.highlightSelectedValue(-1),!p||h)null==(e=this.listComponent)||e.ensureIndexVisible(0);else if(p){this.getAriaElement().removeAttribute("data-active-option");var v=null==(t=this.listComponent)?void 0:t.getAriaElement();v&&mo(v,null)}u&&"fuzzy"!==d&&this.highlightFilterMatch(),this.displayOrHidePicker()}else this.highlightSelectedValue(-1)}},{key:"displayOrHidePicker",value:function(){var e,t=null==(e=this.listComponent)?void 0:e.getGui(),n=!!this.currentList&&0===this.currentList.length;null==t||t.classList.toggle("ag-hidden",n)}},{key:"clearSearchString",value:function(){this.searchString=""}},{key:"selectListItem",value:function(e,t){!this.isPickerDisplayed||!this.currentList||!this.listComponent||e<0||e>=this.currentList.length||(this.listComponent.ensureIndexVisible(e,!t)&&!t&&this.listComponent.refresh(!0),this.highlightSelectedValue(e))}},{key:"setValue",value:function(e,t,i){var r=this.currentList?this.currentList.indexOf(e):-1;return-1===r?this:(this.value=e,i||this.selectListItem(r),this.renderSelectedValue(),(0,mn.Z)((0,yn.Z)(n.prototype),"setValue",this).call(this,e,t))}},{key:"createRowComponent",value:function(e){var t=new Kd(this.config,this.eWrapper);t.setParentComponent(this.listComponent),this.getContext().createBean(t),t.setState(e);var n=this.config,i=n.highlightMatch,r=n.searchType;return i&&"fuzzy"!==(void 0===r?"fuzzy":r)&&t.highlightString(this.searchString),t}},{key:"getRowForMouseEvent",value:function(e){var t=this.listComponent;if(!t)return-1;var n=(null==t?void 0:t.getGui()).getBoundingClientRect(),i=t.getScrollTop(),r=e.clientY-n.top+i;return Math.floor(r/t.getRowHeight())}},{key:"onPickerMouseMove",value:function(e){if(this.listComponent){var t=this.getRowForMouseEvent(e);-1!==t&&t!=this.lastRowHovered&&(this.lastRowHovered=t,this.selectListItem(t,!0))}}},{key:"onNavigationKeyDown",value:function(e,t){e.preventDefault();var n=t===hs.DOWN;if(this.isPickerDisplayed||!n){var i=this.highlightedItem,r=-1===i?0:i+(n?1:-1);this.selectListItem(r)}else this.showPicker()}},{key:"onEnterKeyDown",value:function(e){this.isPickerDisplayed&&(e.preventDefault(),this.currentList&&this.onListValueSelected(this.currentList[this.highlightedItem],!0))}},{key:"onTabKeyDown",value:function(){this.isPickerDisplayed&&this.currentList&&this.setValue(this.currentList[this.highlightedItem],!1,!0)}},{key:"onListValueSelected",value:function(e,t){this.setValue(e,!1,!0),this.dispatchPickerEvent(e,t),this.hidePicker()}},{key:"dispatchPickerEvent",value:function(e,t){var n={type:Er.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:t,value:e};this.dispatchEvent(n)}},{key:"getFocusableElement",value:function(){return this.config.allowTyping?this.eInput.getFocusableElement():(0,mn.Z)((0,yn.Z)(n.prototype),"getFocusableElement",this).call(this)}},{key:"onKeyDown",value:function(e){var t=e.key,n=this.config.allowTyping;switch(t){case hs.LEFT:case hs.RIGHT:case hs.PAGE_HOME:case hs.PAGE_END:n||e.preventDefault();break;case hs.PAGE_UP:case hs.PAGE_DOWN:e.preventDefault();break;case hs.DOWN:case hs.UP:this.onNavigationKeyDown(e,t);break;case hs.ESCAPE:this.isPickerDisplayed&&(Ga(this.listComponent.getGui())&&(e.preventDefault(),dr(e)),this.hidePicker());break;case hs.ENTER:this.onEnterKeyDown(e);break;case hs.TAB:this.onTabKeyDown();break;default:n||this.buildSearchStringFromKeyboardEvent(e)}}},{key:"destroy",value:function(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),this.eLoading=void 0,(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}}]),n}(Xs);Mn([Di("userComponentFactory")],qd.prototype,"userComponentFactory",2),Mn([Ls("eInput")],qd.prototype,"eInput",2);var Qd=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this,e,n.TEMPLATE)).labelAlignment="top",i}return(0,s.Z)(n,[{key:"init",value:function(){this.eSlider.addCssClass("ag-slider-field");var e=this.config,t=e.minValue,n=e.maxValue,i=e.textFieldWidth,r=e.step,o=e.value,a=e.onValueChange;null!=t&&this.setMinValue(t),null!=n&&this.setMaxValue(n),null!=i&&this.setTextFieldWidth(i),null!=r&&this.setStep(r),null!=o&&this.setValue(o),null!=a&&this.onValueChange(a)}},{key:"onValueChange",value:function(e){var t=this,n=Er.EVENT_FIELD_VALUE_CHANGED;return this.addManagedListener(this.eText,n,(function(){var n=parseFloat(t.eText.getValue());t.eSlider.setValue(n.toString(),!0),e(n||0)})),this.addManagedListener(this.eSlider,n,(function(){var n=t.eSlider.getValue();t.eText.setValue(n,!0),e(parseFloat(n))})),this}},{key:"setSliderWidth",value:function(e){return this.eSlider.setWidth(e),this}},{key:"setTextFieldWidth",value:function(e){return this.eText.setWidth(e),this}},{key:"setMinValue",value:function(e){return this.eSlider.setMinValue(e),this.eText.setMin(e),this}},{key:"setMaxValue",value:function(e){return this.eSlider.setMaxValue(e),this.eText.setMax(e),this}},{key:"getValue",value:function(){return this.eText.getValue()}},{key:"setValue",value:function(e,t){return this.getValue()===e||(this.eText.setValue(e,!0),this.eSlider.setValue(e,!0),t||this.dispatchEvent({type:Er.EVENT_FIELD_VALUE_CHANGED})),this}},{key:"setStep",value:function(e){return this.eSlider.setStep(e),this.eText.setStep(e),this}}]),n}(Ks);Qd.TEMPLATE='<div class="ag-slider">\n            <label ref="eLabel"></label>\n            <div class="ag-wrapper ag-slider-wrapper">\n                <ag-input-range ref="eSlider"></ag-input-range>\n                <ag-input-number-field ref="eText"></ag-input-number-field>\n            </div>\n        </div>',Mn([Ls("eLabel")],Qd.prototype,"eLabel",2),Mn([Ls("eSlider")],Qd.prototype,"eSlider",2),Mn([Ls("eText")],Qd.prototype,"eText",2),Mn([Ei],Qd.prototype,"init",1);var Jd=Qd,$d=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.Z)(this,n),(e=t.call(this,n.getTemplate(i))).params=i,e.suppressEnabledCheckbox=!0,e.suppressToggleExpandOnEnableChange=!1;var r=i.enabled,o=i.items,s=i.suppressEnabledCheckbox,l=i.expanded,u=i.suppressToggleExpandOnEnableChange,c=i.useToggle;return e.cssIdentifier=i.cssIdentifier||"default",e.enabled=null==r||r,e.items=o||[],e.useToggle=null!=c&&c,e.alignItems=i.alignItems||"center",e.expanded=null==l||l,null!=s&&(e.suppressEnabledCheckbox=s),null!=u&&(e.suppressToggleExpandOnEnableChange=u),e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;if(this.setupTitleBar(),this.items.length){var t=this.items;this.items=[],this.addItems(t)}var n=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(n("enabled","Enabled")),this.enabled&&this.setEnabled(this.enabled,void 0,!0),this.setAlignItems(this.alignItems);var i=this.params,r=i.onEnableChange,o=i.suppressOpenCloseIcons;this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(null!=o&&o),this.refreshChildDisplay(),Sa(this.eContainer,this.expanded),this.cbGroupEnabled.onValueChange((function(t){e.setEnabled(t,!0,e.suppressToggleExpandOnEnableChange),e.dispatchEnableChangeEvent(t)})),null!=r&&this.onEnableChange(r)}},{key:"refreshChildDisplay",value:function(){var e;Sa(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),null==(e=this.eTitleBar)||e.refreshOnExpand(this.expanded)}},{key:"isExpanded",value:function(){return this.expanded}},{key:"setAlignItems",value:function(e){this.alignItems!==e&&this.removeCssClass("ag-group-item-alignment-".concat(this.alignItems)),this.alignItems=e;var t="ag-group-item-alignment-".concat(this.alignItems);return this.addCssClass(t),this}},{key:"toggleGroupExpand",value:function(e){var t,i=!1;if((null==(t=this.eTitleBar)?void 0:t.isSuppressCollapse())&&!this.useToggle)e=!0,i=!0;else if(e=null!=e?e:!this.expanded,this.expanded===e)return this;return this.expanded=e,this.refreshChildDisplay(),Sa(this.eContainer,e),i||this.dispatchEvent({type:e?n.EVENT_EXPANDED:n.EVENT_COLLAPSED}),this}},{key:"addItems",value:function(e){var t=this;e.forEach((function(e){return t.addItem(e)}))}},{key:"prependItem",value:function(e){this.insertItem(e,!0)}},{key:"addItem",value:function(e){this.insertItem(e,!1)}},{key:"insertItem",value:function(e,t){var n=this.eContainer,i=e instanceof Ns?e.getGui():e;i.classList.add("ag-group-item","ag-".concat(this.cssIdentifier,"-group-item")),t?(n.insertAdjacentElement("afterbegin",i),this.items.unshift(i)):(n.appendChild(i),this.items.push(i))}},{key:"hideItem",value:function(e,t){Sa(this.items[t],!e)}},{key:"getItemIndex",value:function(e){var t=e instanceof Ns?e.getGui():e;return this.items.indexOf(t)}},{key:"setTitle",value:function(e){var t;return null==(t=this.eTitleBar)||t.setTitle(e),this}},{key:"addCssClassToTitleBar",value:function(e){var t;null==(t=this.eTitleBar)||t.addCssClass(e)}},{key:"dispatchEnableChangeEvent",value:function(e){var t={type:n.EVENT_ENABLE_CHANGE,enabled:e};this.dispatchEvent(t)}},{key:"setEnabled",value:function(e,t,n){var i;return this.enabled=e,this.refreshDisabledStyles(),n||this.toggleGroupExpand(e),t||(this.cbGroupEnabled.setValue(e),null==(i=this.eToggle)||i.setValue(e)),this}},{key:"isEnabled",value:function(){return this.enabled}},{key:"onEnableChange",value:function(e){return this.addManagedListener(this,n.EVENT_ENABLE_CHANGE,(function(t){return e(t.enabled)})),this}},{key:"hideEnabledCheckbox",value:function(e){return this.suppressEnabledCheckbox=e,this.refreshChildDisplay(),this.refreshDisabledStyles(),this}},{key:"hideOpenCloseIcons",value:function(e){var t;return null==(t=this.eTitleBar)||t.hideOpenCloseIcons(e),this}},{key:"refreshDisabledStyles",value:function(){var e,t=!this.enabled;this.eContainer.classList.toggle("ag-disabled",t),null==(e=this.eTitleBar)||e.refreshDisabledStyles(this.suppressEnabledCheckbox&&t),this.eContainer.classList.toggle("ag-disabled-group-container",t)}},{key:"setupTitleBar",value:function(){var e=this.useToggle?this.createToggleTitleBar():this.createDefaultTitleBar();this.eToolbar.insertAdjacentElement("beforebegin",e.getGui())}},{key:"createDefaultTitleBar",value:function(){var e=this,t=this.createManagedBean(new nh(this.params));return this.eTitleBar=t,t.refreshOnExpand(this.expanded),this.addManagedListener(t,nh.EVENT_EXPAND_CHANGED,(function(t){return e.toggleGroupExpand(t.expanded)})),t}},{key:"createToggleTitleBar",value:function(){var e,t=this,n=this.createManagedBean(new Wd({value:this.enabled,label:this.params.title,labelAlignment:"left",labelWidth:"flex",onValueChange:function(e){t.setEnabled(e,!0),t.dispatchEnableChangeEvent(e)}}));return n.addCssClass("ag-group-title-bar"),n.addCssClass("ag-".concat(null!=(e=this.params.cssIdentifier)?e:"default","-group-title-bar ag-unselectable")),this.eToggle=n,this.toggleGroupExpand(this.enabled),n}}],[{key:"getTemplate",value:function(e){var t=e.cssIdentifier||"default",n=e.direction||"vertical";return'\n            <div class="ag-group ag-'.concat(t,'-group" role="presentation">\n                <div ref="eToolbar" class="ag-group-toolbar ag-').concat(t,'-group-toolbar">\n                    <ag-checkbox ref="cbGroupEnabled"></ag-checkbox>\n                </div>\n                <div ref="eContainer" class="ag-group-container ag-group-container-').concat(n," ag-").concat(t,'-group-container"></div>\n            </div>\n        ')}}]),n}(Ns);$d.EVENT_EXPANDED="expanded",$d.EVENT_COLLAPSED="collapsed",$d.EVENT_ENABLE_CHANGE="enableChange",Mn([Ls("eToolbar")],$d.prototype,"eToolbar",2),Mn([Ls("cbGroupEnabled")],$d.prototype,"cbGroupEnabled",2),Mn([Ls("eContainer")],$d.prototype,"eContainer",2),Mn([Ei],$d.prototype,"postConstruct",1);var eh=$d,th=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.Z)(this,n),(e=t.call(this,n.getTemplate(i))).suppressOpenCloseIcons=!1;var r=i.title,o=i.suppressOpenCloseIcons;return e.title=r,null!=o&&(e.suppressOpenCloseIcons=o),e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.setTitle(this.title),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract()}},{key:"setupExpandContract",value:function(){var e=this;this.eGroupClosedIcon.appendChild(us("columnSelectClosed",this.gridOptionsService,null)),this.eGroupOpenedIcon.appendChild(us("columnSelectOpen",this.gridOptionsService,null)),this.addManagedListener(this.getGui(),"click",(function(){return e.dispatchExpandChanged()})),this.addManagedListener(this.getGui(),"keydown",(function(t){switch(t.key){case hs.ENTER:case hs.SPACE:t.preventDefault(),e.dispatchExpandChanged();break;case hs.RIGHT:case hs.LEFT:t.preventDefault(),e.dispatchExpandChanged(t.key===hs.RIGHT)}}))}},{key:"refreshOnExpand",value:function(e){this.refreshAriaStatus(e),this.refreshOpenCloseIcons(e)}},{key:"refreshAriaStatus",value:function(e){this.suppressOpenCloseIcons||yo(this.getGui(),e)}},{key:"refreshOpenCloseIcons",value:function(e){var t=!this.suppressOpenCloseIcons;Sa(this.eGroupOpenedIcon,t&&e),Sa(this.eGroupClosedIcon,t&&!e)}},{key:"isSuppressCollapse",value:function(){return this.suppressOpenCloseIcons}},{key:"dispatchExpandChanged",value:function(e){var t={type:n.EVENT_EXPAND_CHANGED,expanded:e};this.dispatchEvent(t)}},{key:"setTitle",value:function(e){return this.eTitle.innerText=e||"",Sa(this.getGui(),void 0!=e),this}},{key:"hideOpenCloseIcons",value:function(e){return this.suppressOpenCloseIcons=e,e&&this.dispatchExpandChanged(!0),this}},{key:"refreshDisabledStyles",value:function(e){var t=this.getGui();e?(t.classList.add("ag-disabled-group-title-bar"),t.removeAttribute("tabindex")):(t.classList.remove("ag-disabled-group-title-bar"),"string"===typeof this.title?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex"))}}],[{key:"getTemplate",value:function(e){var t,n=null!=(t=e.cssIdentifier)?t:"default";return'\n            <div class="ag-group-title-bar ag-'.concat(n,'-group-title-bar ag-unselectable" role="button">\n                <span class="ag-group-title-bar-icon ag-').concat(n,'-group-title-bar-icon" ref="eGroupOpenedIcon" role="presentation"></span>\n                <span class="ag-group-title-bar-icon ag-').concat(n,'-group-title-bar-icon" ref="eGroupClosedIcon" role="presentation"></span>\n                <span ref="eTitle" class="ag-group-title ag-').concat(n,'-group-title"></span>\n            </div>\n        ')}}]),n}(Ns);th.EVENT_EXPAND_CHANGED="expandedChanged",Mn([Ls("eGroupOpenedIcon")],th.prototype,"eGroupOpenedIcon",2),Mn([Ls("eGroupClosedIcon")],th.prototype,"eGroupClosedIcon",2),Mn([Ls("eTitle")],th.prototype,"eTitle",2),Mn([Ei],th.prototype,"postConstruct",1);var nh=th,ih=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1?arguments[1]:void 0;return(0,a.Z)(this,n),(e=t.call(this,'<div class="ag-menu-list" role="tree"></div>')).level=i,e.menuItems=[],e.params=null!=r?r:{column:null,node:null,value:null},e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.initialiseTabGuard({onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)},onFocusIn:function(t){return e.handleFocusIn(t)},onFocusOut:function(t){return e.handleFocusOut(t)}})}},{key:"onTabKeyDown",value:function(e){var t=this.getParentComponent(),n=t&&t.getGui();n&&n.classList.contains("ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)}},{key:"handleKeyDown",value:function(e){switch(e.key){case hs.UP:case hs.RIGHT:case hs.DOWN:case hs.LEFT:e.preventDefault(),this.handleNavKey(e.key);break;case hs.ESCAPE:this.closeIfIsChild()&&dr(e)}}},{key:"handleFocusIn",value:function(e){var t,n,i=e.relatedTarget;(this.tabGuardCtrl.isTabGuard(i)||!this.getGui().contains(i)&&!(null==(n=null==(t=this.activeMenuItem)?void 0:t.getSubMenuGui())?void 0:n.contains(i)))&&(this.activeMenuItem?this.activeMenuItem.activate():this.activateFirstItem())}},{key:"handleFocusOut",value:function(e){var t,n=e.relatedTarget;!this.activeMenuItem||this.getGui().contains(n)||(null==(t=this.activeMenuItem.getSubMenuGui())?void 0:t.contains(n))||this.activeMenuItem.isSubMenuOpening()||this.activeMenuItem.deactivate()}},{key:"clearActiveItem",value:function(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)}},{key:"addMenuItems",value:function(e){var t=this;null!=e&&Rs.all(e.map((function(e){return"separator"===e?Rs.resolve({eGui:t.createSeparator()}):"string"===typeof e?(console.warn("AG Grid: unrecognised menu item ".concat(e)),Rs.resolve({eGui:null})):t.addItem(e)}))).then((function(e){e.forEach((function(e){(null==e?void 0:e.eGui)&&(t.appendChild(e.eGui),e.comp&&t.menuItems.push(e.comp))}))}))}},{key:"addItem",value:function(e){var t=this,n=this.createManagedBean(new ah);return n.init({menuItemDef:e,isAnotherSubMenuOpen:function(){return t.menuItems.some((function(e){return e.isSubMenuOpen()}))},level:this.level,contextParams:this.params}).then((function(){return n.setParentComponent(t),t.addManagedListener(n,ah.EVENT_CLOSE_MENU,(function(e){t.dispatchEvent(e)})),t.addManagedListener(n,ah.EVENT_MENU_ITEM_ACTIVATED,(function(e){t.activeMenuItem&&t.activeMenuItem!==e.menuItem&&t.activeMenuItem.deactivate(),t.activeMenuItem=e.menuItem})),{comp:n,eGui:n.getGui()}}))}},{key:"activateFirstItem",value:function(){var e=this.menuItems.filter((function(e){return!e.isDisabled()}))[0];e&&e.activate()}},{key:"createSeparator",value:function(){return Za('\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>')}},{key:"handleNavKey",value:function(e){switch(e){case hs.UP:case hs.DOWN:var t=this.findNextItem(e===hs.UP);return void(t&&t!==this.activeMenuItem&&t.activate())}e===(this.gridOptionsService.get("enableRtl")?hs.RIGHT:hs.LEFT)?this.closeIfIsChild():this.openChild()}},{key:"closeIfIsChild",value:function(e){var t=this.getParentComponent();return!!(t&&t instanceof ah)&&(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus(),!0)}},{key:"openChild",value:function(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)}},{key:"findNextItem",value:function(e){var t=this.menuItems.filter((function(e){return!e.isDisabled()}));if(t.length){if(!this.activeMenuItem)return e?Ui(t):t[0];var n;e&&t.reverse();for(var i=!1,r=0;r<t.length;r++){var o=t[r];if(i){n=o;break}o===this.activeMenuItem&&(i=!0)}return i&&!n?t[0]:n||this.activeMenuItem}}},{key:"destroy",value:function(){this.clearActiveItem(),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}}]),n}(xd);Mn([Di("focusService")],ih.prototype,"focusService",2),Mn([Ei],ih.prototype,"postConstruct",1);var rh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).wrappedComponent=e,i.setTemplateFromElement(e.getGui()),i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.initialiseTabGuard({onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)}})}},{key:"handleKeyDown",value:function(e){e.key===hs.ESCAPE&&this.closePanel()}},{key:"onTabKeyDown",value:function(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())}},{key:"closePanel",value:function(){var e=this.parentComponent;e.closeSubMenu(),setTimeout((function(){return e.getGui().focus()}),0)}}]),n}(xd);Mn([Ei],rh.prototype,"postConstruct",1);var oh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).isActive=!1,e.subMenuIsOpen=!1,e.subMenuIsOpening=!1,e.suppressRootStyles=!0,e.suppressAria=!0,e.suppressFocus=!0,e}return(0,s.Z)(n,[{key:"init",value:function(e){var t,n,i=this,r=e.menuItemDef,o=e.isAnotherSubMenuOpen,a=e.level,s=e.childComponent,l=e.contextParams;return this.params=e.menuItemDef,this.level=a,this.isAnotherSubMenuOpen=o,this.childComponent=s,this.contextParams=l,this.cssClassPrefix=null!=(n=null==(t=this.params.menuItemParams)?void 0:t.cssClassPrefix)?n:"ag-menu-option",this.userComponentFactory.getMenuItemCompDetails(this.params,On(Tn({},r),{level:a,isAnotherSubMenuOpen:o,openSubMenu:function(e){return i.openSubMenu(e)},closeSubMenu:function(){return i.closeSubMenu()},closeMenu:function(e){return i.closeMenu(e)},updateTooltip:function(e,t){return i.refreshTooltip(e,t)},onItemActivated:function(){return i.onItemActivated()}})).newAgStackInstance().then((function(e){var t;i.menuItemComp=e;var n=null==(t=e.configureDefaults)?void 0:t.call(e);n&&i.configureDefaults(!0===n?void 0:n)}))}},{key:"addListeners",value:function(e,t){var n=this;(null==t?void 0:t.suppressClick)||this.addManagedListener(e,"click",(function(e){return n.onItemSelected(e)})),(null==t?void 0:t.suppressKeyboardSelect)||this.addManagedListener(e,"keydown",(function(e){e.key!==hs.ENTER&&e.key!==hs.SPACE||(e.preventDefault(),n.onItemSelected(e))})),(null==t?void 0:t.suppressMouseDown)||this.addManagedListener(e,"mousedown",(function(e){e.stopPropagation(),e.preventDefault()})),(null==t?void 0:t.suppressMouseOver)||(this.addManagedListener(e,"mouseenter",(function(){return n.onMouseEnter()})),this.addManagedListener(e,"mouseleave",(function(){return n.onMouseLeave()})))}},{key:"isDisabled",value:function(){return!!this.params.disabled}},{key:"openSubMenu",value:function(){var e,t,i=this,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.closeSubMenu(),this.params.subMenu){this.subMenuIsOpening=!0;var o,a=Za('<div class="ag-menu" role="presentation"></div>');this.eSubMenuGui=a;var s=function(){i.subMenuIsOpening=!1};if(this.childComponent){var l=this.createBean(new rh(this.childComponent));l.setParentComponent(this);var u=l.getGui(),c="mouseenter",d=function(){return i.cancelDeactivate()};u.addEventListener(c,d),o=function(){return u.removeEventListener(c,d)},a.appendChild(u),this.childComponent.afterGuiAttached&&(s=function(){i.childComponent.afterGuiAttached(),i.subMenuIsOpening=!1})}else if(this.params.subMenu){var h=this.createBean(new ih(this.level+1,this.contextParams));h.setParentComponent(this),h.addMenuItems(this.params.subMenu),a.appendChild(h.getGui()),this.addManagedListener(h,n.EVENT_CLOSE_MENU,(function(e){return i.dispatchEvent(e)})),h.addGuiEventListener("mouseenter",(function(){return i.cancelDeactivate()})),o=function(){return i.destroyBean(h)},r&&(s=function(){h.activateFirstItem(),i.subMenuIsOpening=!1})}var p=this.popupService.positionPopupForMenu.bind(this.popupService,{eventSource:this.eGui,ePopup:a}),f=this.localeService.getLocaleTextFunc(),v=this.popupService.addPopup({modal:!0,eChild:a,positionCallback:p,anchorToElement:this.eGui,ariaLabel:f("ariaLabelSubMenu","SubMenu"),afterGuiAttached:s});this.subMenuIsOpen=!0,this.setAriaExpanded(!0),this.hideSubMenu=function(){var e,t;v&&v.hideFunc(),i.subMenuIsOpen=!1,i.setAriaExpanded(!1),o(),null==(t=(e=i.menuItemComp).setExpanded)||t.call(e,!1),i.eSubMenuGui=void 0},null==(t=(e=this.menuItemComp).setExpanded)||t.call(e,!0)}}},{key:"setAriaExpanded",value:function(e){this.suppressAria||yo(this.eGui,e)}},{key:"closeSubMenu",value:function(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,this.setAriaExpanded(!1))}},{key:"isSubMenuOpen",value:function(){return this.subMenuIsOpen}},{key:"isSubMenuOpening",value:function(){return this.subMenuIsOpening}},{key:"activate",value:function(e){var t,n,i=this;this.cancelActivate(),this.params.disabled||(this.isActive=!0,this.suppressRootStyles||this.eGui.classList.add("".concat(this.cssClassPrefix,"-active")),null==(n=(t=this.menuItemComp).setActive)||n.call(t,!0),this.suppressFocus||this.eGui.focus({preventScroll:!0}),e&&this.params.subMenu&&window.setTimeout((function(){i.isAlive()&&i.isActive&&i.openSubMenu()}),300),this.onItemActivated())}},{key:"deactivate",value:function(){var e,t;this.cancelDeactivate(),this.suppressRootStyles||this.eGui.classList.remove("".concat(this.cssClassPrefix,"-active")),null==(t=(e=this.menuItemComp).setActive)||t.call(e,!1),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()}},{key:"getGui",value:function(){return this.menuItemComp.getGui()}},{key:"getParentComponent",value:function(){return this.parentComponent}},{key:"setParentComponent",value:function(e){this.parentComponent=e}},{key:"getSubMenuGui",value:function(){return this.eSubMenuGui}},{key:"onItemSelected",value:function(e){var t,n,i=this;null==(n=(t=this.menuItemComp).select)||n.call(t),this.params.action?this.getFrameworkOverrides().wrapOutgoing((function(){return i.params.action(i.gridOptionsService.addGridCommonParams(Tn({},i.contextParams)))})):this.openSubMenu(e&&"keydown"===e.type),this.params.subMenu&&!this.params.action||this.params.suppressCloseOnSelect||this.closeMenu(e)}},{key:"closeMenu",value:function(e){var t={type:n.EVENT_CLOSE_MENU,event:e};this.dispatchEvent(t)}},{key:"onItemActivated",value:function(){var e={type:n.EVENT_MENU_ITEM_ACTIVATED,menuItem:this};this.dispatchEvent(e)}},{key:"cancelActivate",value:function(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)}},{key:"cancelDeactivate",value:function(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)}},{key:"onMouseEnter",value:function(){var e=this;this.cancelDeactivate(),this.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout((function(){return e.activate(!0)}),n.ACTIVATION_DELAY):this.activate(!0)}},{key:"onMouseLeave",value:function(){var e=this;this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout((function(){return e.deactivate()}),n.ACTIVATION_DELAY):this.deactivate()}},{key:"configureDefaults",value:function(e){var t,n,i,r=this;if(this.tooltip=this.params.tooltip,this.menuItemComp){var o=this.menuItemComp.getGui(),a=null==(n=(t=this.menuItemComp).getRootElement)?void 0:n.call(t);a&&((null==e?void 0:e.suppressRootStyles)||o.classList.add("ag-menu-option-custom"),o=a),this.eGui=o,this.suppressRootStyles=!!(null==e?void 0:e.suppressRootStyles),this.suppressRootStyles||(o.classList.add(this.cssClassPrefix),null==(i=this.params.cssClasses)||i.forEach((function(e){return o.classList.add(e)})),this.params.disabled&&o.classList.add("".concat(this.cssClassPrefix,"-disabled"))),(null==e?void 0:e.suppressTooltip)||this.refreshTooltip(),this.suppressAria=!!(null==e?void 0:e.suppressAria),this.suppressAria||(no(o,"treeitem"),fo(o,this.level+1),this.params.disabled&&vo(o,!0)),(null==e?void 0:e.suppressTabIndex)||o.setAttribute("tabindex","-1"),this.params.disabled||this.addListeners(o,e),this.suppressFocus=!!(null==e?void 0:e.suppressFocus)}else setTimeout((function(){return r.configureDefaults(e)}))}},{key:"refreshTooltip",value:function(e,t){var n=this;this.tooltip=e,this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),e&&this.menuItemComp&&(this.tooltipFeature=this.createBean(new Ps({getGui:function(){return n.getGui()},getTooltipValue:function(){return n.tooltip},getLocation:function(){return"menu"},shouldDisplayTooltip:t})))}},{key:"destroy",value:function(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}}]),n}(kr);oh.EVENT_CLOSE_MENU="closeMenu",oh.EVENT_MENU_ITEM_ACTIVATED="menuItemActivated",oh.ACTIVATION_DELAY=80,Mn([Di("popupService")],oh.prototype,"popupService",2),Mn([Di("userComponentFactory")],oh.prototype,"userComponentFactory",2),Mn([Di("beans")],oh.prototype,"beans",2);var ah=oh,sh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this,n.getTemplate(e))).config=e,i.closable=!0,i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this,t=this.config,n=t.component,i=t.closable,r=t.hideTitleBar,o=t.title,a=t.minWidth,s=void 0===a?250:a,l=t.width,u=t.minHeight,c=void 0===u?250:u,d=t.height,h=t.centered,p=t.popup,f=t.x,v=t.y;this.positionableFeature=new zs(this.getGui(),{minWidth:s,width:l,minHeight:c,height:d,centered:h,x:f,y:v,popup:p,calculateTopBuffer:function(){return e.positionableFeature.getHeight()-e.getBodyHeight()}}),this.createManagedBean(this.positionableFeature);var g=this.getGui();n&&this.setBodyComponent(n),r?Sa(this.eTitleBar,!1):(o&&this.setTitle(o),this.setClosable(null!=i?i:this.closable)),this.addManagedListener(this.eTitleBar,"mousedown",(function(t){var n=e.gridOptionsService.getDocument();if(g.contains(t.relatedTarget)||g.contains(n.activeElement)||e.eTitleBarButtons.contains(t.target))t.preventDefault();else{var i=e.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");i&&i.focus()}})),p&&this.positionableFeature.isPositioned()||(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")}},{key:"renderComponent",value:function(){var e=this,t=this.getGui();t.focus(),this.close=function(){t.parentElement.removeChild(t),e.destroy()}}},{key:"getHeight",value:function(){return this.positionableFeature.getHeight()}},{key:"setHeight",value:function(e){this.positionableFeature.setHeight(e)}},{key:"getWidth",value:function(){return this.positionableFeature.getWidth()}},{key:"setWidth",value:function(e){this.positionableFeature.setWidth(e)}},{key:"setClosable",value:function(e){if(e!==this.closable&&(this.closable=e),e){var t=this.closeButtonComp=new Ns(n.CLOSE_BTN_TEMPLATE);this.getContext().createBean(t);var i=t.getGui(),r=cs("close",this.gridOptionsService);r.classList.add("ag-panel-title-bar-button-icon"),i.appendChild(r),this.addTitleBarButton(t),t.addManagedListener(i,"click",this.onBtClose.bind(this))}else if(this.closeButtonComp){var o=this.closeButtonComp.getGui();o.parentElement.removeChild(o),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}}},{key:"setBodyComponent",value:function(e){e.setParentComponent(this),this.eContentWrapper.appendChild(e.getGui())}},{key:"addTitleBarButton",value:function(e,t){var n=this.eTitleBarButtons,i=n.children,r=i.length;null==t&&(t=r),t=Math.max(0,Math.min(t,r)),e.addCssClass("ag-panel-title-bar-button");var o=e.getGui();0===t?n.insertAdjacentElement("afterbegin",o):t===r?n.insertAdjacentElement("beforeend",o):i[t-1].insertAdjacentElement("afterend",o),e.setParentComponent(this)}},{key:"getBodyHeight",value:function(){return Da(this.eContentWrapper)}},{key:"getBodyWidth",value:function(){return Ta(this.eContentWrapper)}},{key:"setTitle",value:function(e){this.eTitle.innerText=e}},{key:"onBtClose",value:function(){this.close()}},{key:"destroy",value:function(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));var e=this.getGui();e&&Ga(e)&&this.close(),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}}],[{key:"getTemplate",value:function(e){var t=e.cssIdentifier||"default";return'<div class="ag-panel ag-'.concat(t,'-panel" tabindex="-1">\n            <div ref="eTitleBar" class="ag-panel-title-bar ag-').concat(t,'-panel-title-bar ag-unselectable">\n                <span ref="eTitle" class="ag-panel-title-bar-title ag-').concat(t,'-panel-title-bar-title"></span>\n                <div ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-').concat(t,'-panel-title-bar-buttons"></div>\n            </div>\n            <div ref="eContentWrapper" class="ag-panel-content-wrapper ag-').concat(t,'-panel-content-wrapper"></div>\n        </div>')}}]),n}(Ns);sh.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>',Mn([Ls("eContentWrapper")],sh.prototype,"eContentWrapper",2),Mn([Ls("eTitleBar")],sh.prototype,"eTitleBar",2),Mn([Ls("eTitleBarButtons")],sh.prototype,"eTitleBarButtons",2),Mn([Ls("eTitle")],sh.prototype,"eTitle",2),Mn([Ei],sh.prototype,"postConstruct",1);var lh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this,On(Tn({},e),{popup:!0}))).isMaximizable=!1,i.isMaximized=!1,i.maximizeListeners=[],i.resizeListenerDestroy=null,i.lastPosition={x:0,y:0,width:0,height:0},i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this,t=this.getGui(),i=this.config,r=i.movable,o=i.resizable,a=i.maximizable;this.addCssClass("ag-dialog"),(0,mn.Z)((0,yn.Z)(n.prototype),"postConstruct",this).call(this),this.addManagedListener(t,"focusin",(function(n){e.popupService.bringPopupToFront(t)})),r&&this.setMovable(r),a&&this.setMaximizable(a),o&&this.setResizable(o)}},{key:"renderComponent",value:function(){var e=this.getGui(),t=this.config,n=t.alwaysOnTop,i=t.modal,r=t.title,o=t.afterGuiAttached,a=this.localeService.getLocaleTextFunc(),s=this.popupService.addPopup({modal:i,eChild:e,closeOnEsc:!0,closedCallback:this.onClosed.bind(this),alwaysOnTop:n,ariaLabel:r||a("ariaLabelDialog","Dialog"),afterGuiAttached:o});s&&(this.close=s.hideFunc)}},{key:"onClosed",value:function(e){var t,n;this.destroy(),null==(n=(t=this.config).closedCallback)||n.call(t,e)}},{key:"toggleMaximize",value:function(){var e=this.positionableFeature.getPosition();if(this.isMaximized){var t=this.lastPosition,n=t.x,i=t.y,r=t.width,o=t.height;this.setWidth(r),this.setHeight(o),this.positionableFeature.offsetElement(n,i)}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()}},{key:"refreshMaximizeIcon",value:function(){Sa(this.maximizeIcon,!this.isMaximized),Sa(this.minimizeIcon,this.isMaximized)}},{key:"clearMaximizebleListeners",value:function(){this.maximizeListeners.length&&(this.maximizeListeners.forEach((function(e){return e()})),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)}},{key:"destroy",value:function(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}},{key:"setResizable",value:function(e){this.positionableFeature.setResizable(e)}},{key:"setMovable",value:function(e){this.positionableFeature.setMovable(e,this.eTitleBar)}},{key:"setMaximizable",value:function(e){var t=this;if(!e)return this.clearMaximizebleListeners(),void(this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0));var n=this.eTitleBar;if(n&&e!==this.isMaximizable){var i=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),i.addManagedListener(i.getGui(),"click",this.toggleMaximize.bind(this)),this.addTitleBarButton(i,0),this.maximizeListeners.push(this.addManagedListener(n,"dblclick",this.toggleMaximize.bind(this))),this.resizeListenerDestroy=this.addManagedListener(this,"resize",(function(){t.isMaximized=!1,t.refreshMaximizeIcon()}))}}},{key:"buildMaximizeAndMinimizeElements",value:function(){var e=this.maximizeButtonComp=this.createBean(new Ns('<div class="ag-dialog-button"></span>')),t=e.getGui();return this.maximizeIcon=cs("maximize",this.gridOptionsService),t.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=cs("minimize",this.gridOptionsService),t.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e}}]),n}(sh);Mn([Di("popupService")],lh.prototype,"popupService",2);var uh=0,ch=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).popupList=[],e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.ctrlsService.whenReady((function(t){e.gridCtrl=t.gridCtrl})),this.addManagedListener(this.eventService,Er.EVENT_GRID_STYLES_CHANGED,this.handleThemeChange.bind(this))}},{key:"getPopupParent",value:function(){var e=this.gridOptionsService.get("popupParent");return e||this.gridCtrl.getGui()}},{key:"positionPopupForMenu",value:function(e){var t=e.eventSource,n=e.ePopup,i=this.getPopupIndex(n);-1!==i&&(this.popupList[i].alignedToElement=t);var r=t.getBoundingClientRect(),o=this.getParentRect(),a=this.keepXYWithinBounds(n,r.top-o.top,0),s=n.clientWidth>0?n.clientWidth:200;n.style.minWidth="".concat(s,"px");var l,u=o.right-o.left-s;function c(){return r.right-o.left-2}function d(){return r.left-o.left-s}this.gridOptionsService.get("enableRtl")?((l=d())<0&&(l=c(),this.setAlignedStyles(n,"left")),l>u&&(l=0,this.setAlignedStyles(n,"right"))):((l=c())>u&&(l=d(),this.setAlignedStyles(n,"right")),l<0&&(l=0,this.setAlignedStyles(n,"left"))),n.style.left="".concat(l,"px"),n.style.top="".concat(a,"px")}},{key:"positionPopupUnderMouseEvent",value:function(e){var t=this,n=e.ePopup,i=e.nudgeX,r=e.nudgeY,o=e.skipObserver;this.positionPopup({ePopup:n,nudgeX:i,nudgeY:r,keepWithinBounds:!0,skipObserver:o,updatePosition:function(){return t.calculatePointerAlign(e.mouseEvent)},postProcessCallback:function(){return t.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)}})}},{key:"calculatePointerAlign",value:function(e){var t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}},{key:"positionPopupByComponent",value:function(e){var t=this,n=e.ePopup,i=e.nudgeX,r=e.nudgeY,o=e.keepWithinBounds,a=e.eventSource,s=e.alignSide,l=void 0===s?"left":s,u=e.position,c=void 0===u?"over":u,d=e.column,h=e.rowNode,p=e.type,f=a.getBoundingClientRect(),v=this.getParentRect(),g=this.getPopupIndex(n);-1!==g&&(this.popupList[g].alignedToElement=a);this.positionPopup({ePopup:n,nudgeX:i,nudgeY:r,keepWithinBounds:o,updatePosition:function(){var i,o=f.left-v.left;("right"===l&&(o-=n.offsetWidth-f.width),"over"===c)?(i=f.top-v.top,t.setAlignedStyles(n,"over")):(t.setAlignedStyles(n,"under"),i="under"===t.shouldRenderUnderOrAbove(n,f,v,e.nudgeY||0)?f.top-v.top+f.height:f.top-n.offsetHeight-2*(r||0)-v.top);return{x:o,y:i}},postProcessCallback:function(){return t.callPostProcessPopup(p,n,a,null,d,h)}})}},{key:"shouldRenderUnderOrAbove",value:function(e,t,n,i){var r=n.bottom-t.bottom,o=t.top-n.top,a=e.offsetHeight+i;return r>a?"under":o>a||o>r?"above":"under"}},{key:"setAlignedStyles",value:function(e,t){var n=this.getPopupIndex(e);if(-1!==n){var i=this.popupList[n].alignedToElement;if(i){["right","left","over","above","under"].forEach((function(t){i.classList.remove("ag-has-popup-positioned-".concat(t)),e.classList.remove("ag-popup-positioned-".concat(t))})),t&&(i.classList.add("ag-has-popup-positioned-".concat(t)),e.classList.add("ag-popup-positioned-".concat(t)))}}}},{key:"callPostProcessPopup",value:function(e,t,n,i,r,o){var a=this.gridOptionsService.getCallback("postProcessPopup");a&&a({column:r,rowNode:o,ePopup:t,type:e,eventSource:n,mouseEvent:i})}},{key:"positionPopup",value:function(e){var t=this,n=e.ePopup,i=e.keepWithinBounds,r=e.nudgeX,o=e.nudgeY,a=e.skipObserver,s=e.updatePosition,l={width:0,height:0},u=function(){var a=arguments.length>0&&void 0!==arguments[0]&&arguments[0],u=s(),c=u.x,d=u.y;a&&n.clientWidth===l.width&&n.clientHeight===l.height||(l.width=n.clientWidth,l.height=n.clientHeight,r&&(c+=r),o&&(d+=o),i&&(c=t.keepXYWithinBounds(n,c,1),d=t.keepXYWithinBounds(n,d,0)),n.style.left="".concat(c,"px"),n.style.top="".concat(d,"px"),e.postProcessCallback&&e.postProcessCallback())};if(u(),!a){var c=this.resizeObserverService.observeResize(n,(function(){return u(!0)}));setTimeout((function(){return c()}),ch.WAIT_FOR_POPUP_CONTENT_RESIZE)}}},{key:"getActivePopups",value:function(){return this.popupList.map((function(e){return e.element}))}},{key:"getPopupList",value:function(){return this.popupList}},{key:"getParentRect",value:function(){var e=this.gridOptionsService.getDocument(),t=this.getPopupParent();return t===e.body?t=e.documentElement:"static"===getComputedStyle(t).position&&(t=t.offsetParent),Aa(t)}},{key:"keepXYWithinBounds",value:function(e,t,n){var i=0===n,r=i?"clientHeight":"clientWidth",o=i?"top":"left",a=i?"offsetHeight":"offsetWidth",s=i?"scrollTop":"scrollLeft",l=this.gridOptionsService.getDocument(),u=l.documentElement,c=this.getPopupParent(),d=c.getBoundingClientRect(),h=l.documentElement.getBoundingClientRect(),p=c===l.body,f=e[a],v=p?(i?Oa:Pa)(u)+u[s]:c[r];p&&(v-=Math.abs(h[o]-d[o]));var g=v-f;return Math.min(Math.max(t,0),Math.abs(g))}},{key:"addPopup",value:function(e){var t=this.gridOptionsService.getDocument(),n=e.eChild,i=e.ariaLabel,r=e.alwaysOnTop,o=e.positionCallback,a=e.anchorToElement;if(!t)return console.warn("AG Grid: could not find the document, document is empty"),{hideFunc:function(){}};var s=this.getPopupIndex(n);if(-1!==s)return{hideFunc:this.popupList[s].hideFunc};this.initialisePopupPosition(n);var l=this.createPopupWrapper(n,i,!!r),u=this.addEventListenersToPopup(On(Tn({},e),{wrapperEl:l}));return o&&o(),this.addPopupToPopupList(n,l,u,a),{hideFunc:u}}},{key:"initialisePopupPosition",value:function(e){var t=this.getPopupParent().getBoundingClientRect();Fn(e.style.top)||(e.style.top="".concat(-1*t.top,"px")),Fn(e.style.left)||(e.style.left="".concat(-1*t.left,"px"))}},{key:"createPopupWrapper",value:function(e,t,n){var i,r=this.getPopupParent(),a=document.createElement("div"),s=this.environment.getTheme().allThemes;s.length&&(i=a.classList).add.apply(i,(0,o.Z)(s));return a.classList.add("ag-popup"),e.classList.add(this.gridOptionsService.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||no(e,"dialog"),so(e,t),a.appendChild(e),r.appendChild(a),n?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}},{key:"handleThemeChange",value:function(){var e,t=this.environment.getTheme().allThemes,n=(0,g.Z)(this.popupList);try{for(n.s();!(e=n.n()).done;){for(var i,r=e.value,a=0,s=Array.from(r.wrapper.classList);a<s.length;a++){var l=s[a];l.startsWith("ag-theme-")&&r.wrapper.classList.remove(l)}if(t.length)(i=r.wrapper.classList).add.apply(i,(0,o.Z)(t))}}catch(u){n.e(u)}finally{n.f()}}},{key:"addEventListenersToPopup",value:function(e){var t=this,n=this.gridOptionsService.getDocument(),i=this.getPopupParent(),r=e.wrapperEl,o=e.eChild,a=(e.click,e.closedCallback),s=e.afterGuiAttached,l=e.closeOnEsc,u=e.modal,c=!1,d=function(e){r.contains(n.activeElement)&&(e.key!==hs.ESCAPE||hr(e)||f({keyboardEvent:e}))},h=function(e){return f({mouseEvent:e})},p=function(e){return f({touchEvent:e})},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=e.mouseEvent,l=e.touchEvent,u=e.keyboardEvent;t.isEventFromCurrentPopup({mouseEvent:s,touchEvent:l},o)||c||(c=!0,i.removeChild(r),n.removeEventListener("keydown",d),n.removeEventListener("mousedown",h),n.removeEventListener("touchstart",p),n.removeEventListener("contextmenu",h),t.eventService.removeEventListener(Er.EVENT_DRAG_STARTED,h),a&&a(s||l||u),t.removePopupFromPopupList(o))};return s&&s({hidePopup:f}),window.setTimeout((function(){l&&n.addEventListener("keydown",d),u&&(n.addEventListener("mousedown",h),t.eventService.addEventListener(Er.EVENT_DRAG_STARTED,h),n.addEventListener("touchstart",p),n.addEventListener("contextmenu",h))}),0),f}},{key:"addPopupToPopupList",value:function(e,t,n,i){this.popupList.push({element:e,wrapper:t,hideFunc:n,instanceId:uh++,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i)}},{key:"getPopupIndex",value:function(e){return this.popupList.findIndex((function(t){return t.element===e}))}},{key:"setPopupPositionRelatedToElement",value:function(e,t){var n=this.getPopupIndex(e);if(-1!==n){var i=this.popupList[n];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then((function(e){return e&&e()})),i.stopAnchoringPromise=void 0,i.isAnchored=!1,t){var r=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=r,i.isAnchored=!0,r}}}},{key:"removePopupFromPopupList",value:function(e){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),this.popupList=this.popupList.filter((function(t){return t.element!==e}))}},{key:"keepPopupPositionedRelativeTo",value:function(e){var t=this,n=this.getPopupParent(),i=n.getBoundingClientRect(),r=e.element,o=e.ePopup,a=r.getBoundingClientRect(),s=i.top-a.top,l=i.left-a.left,u=s,c=l,d=o.style.top,h=parseInt(d.substring(0,d.length-1),10),p=o.style.left,f=parseInt(p.substring(0,p.length-1),10);return new Rs((function(i){t.getFrameworkOverrides().setInterval((function(){var i=n.getBoundingClientRect(),a=r.getBoundingClientRect();if(0==a.top&&0==a.left&&0==a.height&&0==a.width)e.hidePopup();else{var d=i.top-a.top;if(d!=u){var p=t.keepXYWithinBounds(o,h+s-d,0);o.style.top="".concat(p,"px")}u=d;var v=i.left-a.left;if(v!=c){var g=t.keepXYWithinBounds(o,f+l-v,1);o.style.left="".concat(g,"px")}c=v}}),200).then((function(e){i((function(){null!=e&&window.clearInterval(e)}))}))}))}},{key:"hasAnchoredPopup",value:function(){return this.popupList.some((function(e){return e.isAnchored}))}},{key:"isEventFromCurrentPopup",value:function(e,t){var n=e.mouseEvent,i=e.touchEvent,r=n||i;if(!r)return!1;var o=this.getPopupIndex(t);if(-1===o)return!1;for(var a=o;a<this.popupList.length;a++){if(vr(this.popupList[a].element,r))return!0}return this.isElementWithinCustomPopup(r.target)}},{key:"isElementWithinCustomPopup",value:function(e){for(var t=this.gridOptionsService.getDocument();e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||null===e.parentElement)return!0;e=e.parentElement}return!1}},{key:"getWrapper",value:function(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}},{key:"setAlwaysOnTop",value:function(e,t){var n=this.getWrapper(e);n&&(n.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(n))}},{key:"bringPopupToFront",value:function(e){var t=this.getPopupParent(),n=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=n.length,r=Array.prototype.slice.call(t.querySelectorAll(".ag-popup.ag-always-on-top")),o=r.length,a=this.getWrapper(e);if(a&&!(i<=1)&&t.contains(e)){var s=n.indexOf(a),l=a.querySelectorAll("div"),u=[];if(l.forEach((function(e){0!==e.scrollTop&&u.push([e,e.scrollTop])})),o)a.classList.contains("ag-always-on-top")?s!==i-1&&Ui(r).insertAdjacentElement("afterend",a):s!==i-o-1&&r[0].insertAdjacentElement("beforebegin",a);else s!==i-1&&Ui(n).insertAdjacentElement("afterend",a);for(;u.length;){var c=u.pop();c[0].scrollTop=c[1]}}}}]),n}(kr);ch.WAIT_FOR_POPUP_CONTENT_RESIZE=200,Mn([Di("focusService")],ch.prototype,"focusService",2),Mn([Di("ctrlsService")],ch.prototype,"ctrlsService",2),Mn([Di("resizeObserverService")],ch.prototype,"resizeObserverService",2),Mn([Ei],ch.prototype,"postConstruct",1),ch=Mn([Ri("popupService")],ch);var dh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.call(this,'\n        <div class="ag-autocomplete-row" role="presentation">\n            <div class="ag-autocomplete-row-label"></div>\n        </div>')).hasHighlighting=!1,e}return(0,s.Z)(n,[{key:"setState",value:function(e,t){this.value=e,this.render(),this.updateSelected(t)}},{key:"updateSelected",value:function(e){this.addOrRemoveCssClass("ag-autocomplete-row-selected",e)}},{key:"setSearchString",value:function(e){var t,n=!1;if(Fn(e)){var i=null==(t=this.value)?void 0:t.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(i>=0){n=!0,this.hasHighlighting=!0;var r=i+e.length,o=Lr(this.value.slice(0,i)),a=Lr(this.value.slice(i,r)),s=Lr(this.value.slice(r));this.getGui().lastElementChild.innerHTML="".concat(o,"<b>").concat(a,"</b>").concat(s)}}!n&&this.hasHighlighting&&(this.hasHighlighting=!1,this.render())}},{key:"render",value:function(){var e;this.getGui().lastElementChild.innerHTML=null!=(e=Lr(this.value))?e:"&nbsp;"}}]),n}(Ns),hh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this,n.TEMPLATE)).params=e,i.searchString="",i}return(0,s.Z)(n,[{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}},{key:"init",value:function(){var e=this;this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList=this.createManagedBean(new Xd({cssIdentifier:"autocomplete"})),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:function(){return e.autocompleteEntries.length},getRow:function(t){return e.autocompleteEntries[t]}});var t=this.virtualList.getGui();this.addManagedListener(t,"click",(function(){return e.params.onConfirmed()})),this.addManagedListener(t,"mousemove",this.onMouseMove.bind(this)),this.addManagedListener(t,"mousedown",(function(e){return e.preventDefault()})),this.setSelectedValue(0)}},{key:"onNavigationKeyDown",value:function(e,t){e.preventDefault();var n=this.autocompleteEntries.indexOf(this.selectedValue),i=t===hs.UP?n-1:n+1;this.checkSetSelectedValue(i)}},{key:"setSearch",value:function(e){this.searchString=e,Fn(e)?this.runSearch():(this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList.refresh(),this.checkSetSelectedValue(0)),this.updateSearchInList()}},{key:"runContainsSearch",value:function(e,t){var n,i=!1,r=e.toLocaleLowerCase(),o=t.filter((function(e){var t=e.toLocaleLowerCase().indexOf(r),o=0===t,a=t>=0;return a&&(!n||!i&&o||i===o&&e.length<n.length)&&(n=e,i=o),a}));return!n&&o.length&&(n=o[0]),{topMatch:n,allMatches:o}}},{key:"runSearch",value:function(){var e,t,n,i,r=this.params.autocompleteEntries,o=r.map((function(e){var t;return null!=(t=e.displayValue)?t:e.key}));if(this.params.useFuzzySearch)i=(n=os(this.searchString,o,!0).values).length?n[0]:void 0;else{var a=this.runContainsSearch(this.searchString,o);n=a.allMatches,i=a.topMatch}var s=r.filter((function(e){var t=e.key,i=e.displayValue;return n.includes(null!=i?i:t)}));if(!s.length&&this.selectedValue&&(null==(t=null==(e=this.params)?void 0:e.forceLastSelection)?void 0:t.call(e,this.selectedValue,this.searchString))&&(s=[this.selectedValue]),this.autocompleteEntries=s,this.virtualList.refresh(),i){var l=n.indexOf(i);this.checkSetSelectedValue(l)}}},{key:"updateSearchInList",value:function(){var e=this;this.virtualList.forEachRenderedRow((function(t){return t.setSearchString(e.searchString)}))}},{key:"checkSetSelectedValue",value:function(e){e>=0&&e<this.autocompleteEntries.length&&this.setSelectedValue(e)}},{key:"setSelectedValue",value:function(e){var t=this.autocompleteEntries[e];this.selectedValue!==t&&(this.selectedValue=t,this.virtualList.ensureIndexVisible(e),this.virtualList.forEachRenderedRow((function(t,n){t.updateSelected(e===n)})))}},{key:"createRowComponent",value:function(e){var t,n=new dh;return this.getContext().createBean(n),n.setState(null!=(t=e.displayValue)?t:e.key,e===this.selectedValue),n}},{key:"onMouseMove",value:function(e){var t=this.virtualList.getGui().getBoundingClientRect(),n=this.virtualList.getScrollTop(),i=e.clientY-t.top+n,r=Math.floor(i/this.virtualList.getRowHeight());this.checkSetSelectedValue(r)}},{key:"afterGuiAttached",value:function(){this.virtualList.refresh()}},{key:"getSelectedValue",value:function(){var e;return this.autocompleteEntries.length&&null!=(e=this.selectedValue)?e:null}}]),n}(Fl);hh.TEMPLATE='<div class="ag-autocomplete-list-popup">\n            <div ref="eList" class="ag-autocomplete-list"></div>\n        <div>',Mn([Ls("eList")],hh.prototype,"eList",2),Mn([Ei],hh.prototype,"init",1);var ph=hh,fh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.call(this,'\n            <div class="ag-autocomplete" role="presentation">\n                <ag-input-text-field ref="eAutocompleteInput"></ag-input-text-field>\n            </div>')).isListOpen=!1,e.lastPosition=0,e.valid=!0,e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.eAutocompleteInput.onValueChange((function(t){return e.onValueChanged(t)})),this.eAutocompleteInput.getInputElement().setAttribute("autocomplete","off"),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.addGuiEventListener("click",this.updatePositionAndList.bind(this)),this.addDestroyFunc((function(){e.destroyBean(e.autocompleteList)})),this.addGuiEventListener("focusout",(function(){return e.onFocusOut()}))}},{key:"onValueChanged",value:function(e){var t=In(e);this.updateValue(t),this.updateAutocompleteList(t)}},{key:"updateValue",value:function(e){this.updateLastPosition(),this.dispatchEvent({type:n.EVENT_VALUE_CHANGED,value:e}),this.validate(e)}},{key:"updateAutocompleteList",value:function(e){var t,n,i,r,o=null!=(n=null==(t=this.listGenerator)?void 0:t.call(this,e,this.lastPosition))?n:{enabled:!1};if(o.type&&o.type===(null==(i=this.autocompleteListParams)?void 0:i.type)||this.isListOpen&&this.closeList(),this.autocompleteListParams=o,null==(r=this.autocompleteListParams)?void 0:r.enabled){this.isListOpen||this.openList();var a=this.autocompleteListParams.searchString;this.autocompleteList.setSearch(null!=a?a:"")}else this.isListOpen&&this.closeList()}},{key:"onKeyDown",value:function(e){var t=this,n=e.key;switch(this.updateLastPosition(),n){case hs.ENTER:this.onEnterKeyDown(e);break;case hs.TAB:this.onTabKeyDown(e);break;case hs.DOWN:case hs.UP:this.onUpDownKeyDown(e,n);break;case hs.LEFT:case hs.RIGHT:case hs.PAGE_HOME:case hs.PAGE_END:setTimeout((function(){t.updatePositionAndList()}));break;case hs.ESCAPE:this.onEscapeKeyDown(e);break;case hs.SPACE:e.ctrlKey&&!this.isListOpen&&(e.preventDefault(),this.forceOpenList())}}},{key:"confirmSelection",value:function(){var e,t=null==(e=this.autocompleteList)?void 0:e.getSelectedValue();t&&(this.closeList(),this.dispatchEvent({type:n.EVENT_OPTION_SELECTED,value:this.getValue(),position:this.lastPosition,updateEntry:t,autocompleteType:this.autocompleteListParams.type}))}},{key:"onTabKeyDown",value:function(e){this.isListOpen&&(e.preventDefault(),e.stopPropagation(),this.confirmSelection())}},{key:"onEnterKeyDown",value:function(e){e.preventDefault(),this.isListOpen?this.confirmSelection():this.onCompleted()}},{key:"onUpDownKeyDown",value:function(e,t){var n;e.preventDefault(),this.isListOpen?null==(n=this.autocompleteList)||n.onNavigationKeyDown(e,t):this.forceOpenList()}},{key:"onEscapeKeyDown",value:function(e){this.isListOpen&&(e.preventDefault(),e.stopPropagation(),this.closeList(),this.setCaret(this.lastPosition,!0))}},{key:"onFocusOut",value:function(){this.isListOpen&&this.closeList()}},{key:"updatePositionAndList",value:function(){var e;this.updateLastPosition(),this.updateAutocompleteList(null!=(e=this.eAutocompleteInput.getValue())?e:null)}},{key:"setCaret",value:function(e,t){var n=this.gridOptionsService.getDocument();t&&n.activeElement===n.body&&this.eAutocompleteInput.getFocusableElement().focus();var i=this.eAutocompleteInput.getInputElement();i.setSelectionRange(e,e),e===i.value.length&&(i.scrollLeft=i.scrollWidth)}},{key:"forceOpenList",value:function(){this.onValueChanged(this.eAutocompleteInput.getValue())}},{key:"updateLastPosition",value:function(){var e;this.lastPosition=null!=(e=this.eAutocompleteInput.getInputElement().selectionStart)?e:0}},{key:"validate",value:function(e){var t;this.validator&&(this.validationMessage=this.validator(e),this.eAutocompleteInput.getInputElement().setCustomValidity(null!=(t=this.validationMessage)?t:""),this.valid=!this.validationMessage,this.dispatchEvent({type:n.EVENT_VALID_CHANGED,isValid:this.valid,validationMessage:this.validationMessage}))}},{key:"openList",value:function(){var e=this;this.isListOpen=!0,this.autocompleteList=this.createBean(new ph({autocompleteEntries:this.autocompleteListParams.entries,onConfirmed:function(){return e.confirmSelection()},forceLastSelection:this.forceLastSelection}));var t=this.autocompleteList.getGui(),n={ePopup:t,type:"autocomplete",eventSource:this.getGui(),position:"under",alignSide:this.gridOptionsService.get("enableRtl")?"right":"left",keepWithinBounds:!0},i=this.popupService.addPopup({eChild:t,anchorToElement:this.getGui(),positionCallback:function(){return e.popupService.positionPopupByComponent(n)},ariaLabel:this.listAriaLabel});this.hidePopup=i.hideFunc,this.autocompleteList.afterGuiAttached()}},{key:"closeList",value:function(){this.isListOpen=!1,this.hidePopup(),this.destroyBean(this.autocompleteList),this.autocompleteList=null}},{key:"onCompleted",value:function(){this.isListOpen&&this.closeList(),this.dispatchEvent({type:n.EVENT_VALUE_CONFIRMED,value:this.getValue(),isValid:this.isValid()})}},{key:"getValue",value:function(){return In(this.eAutocompleteInput.getValue())}},{key:"setInputPlaceholder",value:function(e){return this.eAutocompleteInput.setInputPlaceholder(e),this}},{key:"setInputAriaLabel",value:function(e){return this.eAutocompleteInput.setInputAriaLabel(e),this}},{key:"setListAriaLabel",value:function(e){return this.listAriaLabel=e,this}},{key:"setListGenerator",value:function(e){return this.listGenerator=e,this}},{key:"setValidator",value:function(e){return this.validator=e,this}},{key:"isValid",value:function(){return this.valid}},{key:"setValue",value:function(e){var t=e.value,n=e.position,i=e.silent,r=e.updateListOnlyIfOpen,o=e.restoreFocus;this.eAutocompleteInput.setValue(t,!0),this.setCaret(null!=n?n:this.lastPosition,o),i||this.updateValue(t),r&&!this.isListOpen||this.updateAutocompleteList(t)}},{key:"setForceLastSelection",value:function(e){return this.forceLastSelection=e,this}},{key:"setInputDisabled",value:function(e){return this.eAutocompleteInput.setDisabled(e),this}}]),n}(Ns);fh.EVENT_VALUE_CHANGED="eventValueChanged",fh.EVENT_VALUE_CONFIRMED="eventValueConfirmed",fh.EVENT_OPTION_SELECTED="eventOptionSelected",fh.EVENT_VALID_CHANGED="eventValidChanged",Mn([Di("popupService")],fh.prototype,"popupService",2),Mn([Ls("eAutocompleteInput")],fh.prototype,"eAutocompleteInput",2),Mn([Ei],fh.prototype,"postConstruct",1);var vh=fh,gh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r,o){var s;return(0,a.Z)(this,n),(s=t.call(this)).dragSourceDropTarget=e,s.ghost=i,s.horizontal=r,s.template=o,s}return(0,s.Z)(n,[{key:"init",value:function(){var e;this.setTemplate(null!=(e=this.template)?e:n.TEMPLATE);var t=this.getGui();this.addElementClasses(t),this.addElementClasses(this.eDragHandle,"drag-handle"),this.addElementClasses(this.eText,"text"),this.addElementClasses(this.eButton,"button"),this.eDragHandle.appendChild(cs("columnDrag",this.gridOptionsService)),this.eButton.appendChild(cs("cancel",this.gridOptionsService)),this.setupComponents(),!this.ghost&&this.isDraggable()&&this.addDragSource(),this.setupAria(),this.setupTooltip(),this.activateTabIndex(),this.refreshDraggable()}},{key:"isDraggable",value:function(){return!0}},{key:"refreshDraggable",value:function(){this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!this.isDraggable())}},{key:"setupAria",value:function(){var e=this.localeService.getLocaleTextFunc(),t=[this.getAriaDisplayName()];this.addAdditionalAriaInstructions(t,e),so(this.getGui(),t.join(". "))}},{key:"addAdditionalAriaInstructions",value:function(e,t){if(this.isRemovable()){var n=t("ariaDropZoneColumnComponentDescription","Press DELETE to remove");e.push(n)}}},{key:"setupTooltip",value:function(){var e=this,t=function(){var t=e.getTooltip();e.setTooltip({newTooltipText:t})};t(),this.addManagedListener(this.eventService,Er.EVENT_NEW_COLUMNS_LOADED,t)}},{key:"getDragSourceId",value:function(){}},{key:"getDefaultIconName",value:function(){return Xl.ICON_NOT_ALLOWED}},{key:"addDragSource",value:function(){var e=this.dragAndDropService,t=this.eDragHandle,n=this.createGetDragItem(),i=this.getDefaultIconName(),r={type:this.getDragSourceType(),sourceId:this.getDragSourceId(),eElement:t,getDefaultIconName:function(){return i},getDragItem:n,dragItemName:this.getDisplayName()};e.addDragSource(r,!0),this.addDestroyFunc((function(){return e.removeDragSource(r)}))}},{key:"setupComponents",value:function(){this.setTextValue(),this.setupRemove(),this.ghost&&this.addCssClass("ag-column-drop-cell-ghost")}},{key:"isRemovable",value:function(){return!0}},{key:"refreshRemove",value:function(){Sa(this.eButton,this.isRemovable())}},{key:"setupRemove",value:function(){var e=this;this.refreshRemove();var t={type:n.EVENT_COLUMN_REMOVE};this.addGuiEventListener("keydown",(function(t){return e.onKeyDown(t)})),this.addManagedListener(this.eButton,"click",(function(n){e.dispatchEvent(t),n.stopPropagation()}));var i=new Ol(this.eButton);this.addManagedListener(i,Ol.EVENT_TAP,(function(){e.dispatchEvent(t)})),this.addDestroyFunc(i.destroy.bind(i))}},{key:"onKeyDown",value:function(e){e.key===hs.DELETE&&this.isRemovable()&&(e.preventDefault(),this.dispatchEvent({type:n.EVENT_COLUMN_REMOVE}))}},{key:"getDisplayValue",value:function(){return this.getDisplayName()}},{key:"setTextValue",value:function(){var e=Lr(this.getDisplayValue());this.eText.innerHTML=e}},{key:"addElementClasses",value:function(e,t){t=t?"-".concat(t):"";var n=this.horizontal?"horizontal":"vertical";e.classList.add("ag-column-drop-cell".concat(t),"ag-column-drop-".concat(n,"-cell").concat(t))}},{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this),this.dragSourceDropTarget=null}}]),n}(Ns);gh.EVENT_COLUMN_REMOVE="columnRemove",gh.TEMPLATE='<span role="option">\n          <span ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>\n          <span ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>\n          <span ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>\n        </span>',Mn([Di("dragAndDropService")],gh.prototype,"dragAndDropService",2),Mn([Ls("eText")],gh.prototype,"eText",2),Mn([Ls("eDragHandle")],gh.prototype,"eDragHandle",2),Mn([Ls("eButton")],gh.prototype,"eButton",2),Mn([Ei],gh.prototype,"init",1);var mh=gh,yh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this,'<div class="ag-unselectable" role="presentation"></div>')).horizontal=e,i.state=n.STATE_NOT_DRAGGING,i.guiDestroyFunctions=[],i.childPillComponents=[],i.resizeEnabled=!1,i.addElementClasses(i.getGui()),i.ePillDropList=document.createElement("div"),i.addElementClasses(i.ePillDropList,"list"),no(i.ePillDropList,"listbox"),i}return(0,s.Z)(n,[{key:"isHorizontal",value:function(){return this.horizontal}},{key:"toggleResizable",value:function(e){this.positionableFeature.setResizable(!!e&&{bottom:!0}),this.resizeEnabled=e}},{key:"isSourceEventFromTarget",value:function(e){var t=e.dropZoneTarget,n=e.dragSource;return t.contains(n.eElement)}},{key:"destroy",value:function(){this.destroyGui(),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}},{key:"destroyGui",value:function(){this.guiDestroyFunctions.forEach((function(e){return e()})),this.guiDestroyFunctions.length=0,this.childPillComponents.length=0,Ia(this.getGui()),Ia(this.ePillDropList)}},{key:"init",value:function(e){this.params=null!=e?e:{},this.createManagedBean(new Hs(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.setupDropTarget(),this.positionableFeature=new zs(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature),this.refreshGui(),so(this.ePillDropList,this.getAriaLabel())}},{key:"handleKeyDown",value:function(e){var t=!this.horizontal,n=e.key===hs.DOWN,i=e.key===hs.UP;if(!t){var r=this.gridOptionsService.get("enableRtl");n=!r&&e.key===hs.RIGHT||r&&e.key===hs.LEFT,i=!r&&e.key===hs.LEFT||r&&e.key===hs.RIGHT}if(n||i){var o=this.focusService.findNextFocusableElement(this.getFocusableElement(),!1,i);o&&(e.preventDefault(),o.focus())}}},{key:"addElementClasses",value:function(e,t){t=t?"-".concat(t):"";var n=this.horizontal?"horizontal":"vertical";e.classList.add("ag-column-drop".concat(t),"ag-column-drop-".concat(n).concat(t))}},{key:"setupDropTarget",value:function(){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),isInterestedIn:this.isInterestedIn.bind(this)},this.dragAndDropService.addDropTarget(this.dropTarget)}},{key:"minimumAllowedNewInsertIndex",value:function(){return 0}},{key:"checkInsertIndex",value:function(e){var t=this.getNewInsertIndex(e);if(t<0)return!1;var n=this.minimumAllowedNewInsertIndex(),i=Math.max(n,t),r=i!==this.insertIndex;return r&&(this.insertIndex=i),r}},{key:"getNewInsertIndex",value:function(e){var t=this,n=e.event,i=this.horizontal?n.clientX:n.clientY,r=this.childPillComponents.map((function(e){return e.getGui().getBoundingClientRect()})),o=r.findIndex((function(e){return t.horizontal?e.right>i&&e.left<i:e.top<i&&e.bottom>i}));if(-1===o){var a=this.gridOptionsService.get("enableRtl");return r.every((function(e){return i>(t.horizontal?e.right:e.bottom)}))?a&&this.horizontal?0:this.childPillComponents.length:r.every((function(e){return i<(t.horizontal?e.left:e.top)}))?a&&this.horizontal?this.childPillComponents.length:0:this.insertIndex}return this.insertIndex<=o?o+1:o}},{key:"checkDragStartedBySelf",value:function(e){this.state===n.STATE_NOT_DRAGGING&&(this.state=n.STATE_REARRANGE_ITEMS,this.potentialDndItems=this.getItems(e.dragSource.getDragItem()),this.refreshGui(),this.checkInsertIndex(e),this.refreshGui())}},{key:"onDragging",value:function(e){this.checkDragStartedBySelf(e),this.checkInsertIndex(e)&&this.refreshGui()}},{key:"handleDragEnterEnd",value:function(e){}},{key:"onDragEnter",value:function(e){var t=this,i=this.getItems(e.dragSource.getDragItem());this.state=n.STATE_NEW_ITEMS_IN;var r=i.filter((function(n){return t.isItemDroppable(n,e)})),o=r.every((function(e){return-1!==t.childPillComponents.map((function(e){return e.getItem()})).indexOf(e)}));0!==r.length&&(this.potentialDndItems=r,o?this.state=n.STATE_NOT_DRAGGING:(this.handleDragEnterEnd(e),this.checkInsertIndex(e),this.refreshGui()))}},{key:"isPotentialDndItems",value:function(){return zi(this.potentialDndItems)}},{key:"handleDragLeaveEnd",value:function(e){}},{key:"onDragLeave",value:function(e){if(this.state===n.STATE_REARRANGE_ITEMS){var t=this.getItems(e.dragSource.getDragItem());this.removeItems(t)}this.isPotentialDndItems()&&(this.handleDragLeaveEnd(e),this.potentialDndItems=[],this.refreshGui()),this.state=n.STATE_NOT_DRAGGING}},{key:"refreshOnDragStop",value:function(){return!0}},{key:"onDragStop",value:function(){if(this.isPotentialDndItems()){var e=!1;this.state===n.STATE_NEW_ITEMS_IN?(this.addItems(this.potentialDndItems),e=!0):e=this.rearrangeItems(this.potentialDndItems),this.potentialDndItems=[],!this.refreshOnDragStop()&&e||this.refreshGui()}this.state=n.STATE_NOT_DRAGGING}},{key:"removeItems",value:function(e){var t=this.getExistingItems().filter((function(t){return!ir(e,t)}));this.updateItems(t)}},{key:"addItems",value:function(e){if(e){var t=this.getExistingItems().slice(),n=e.filter((function(e){return t.indexOf(e)<0}));tr(t,n,this.insertIndex),this.updateItems(t)}}},{key:"addItem",value:function(e){this.insertIndex=this.getExistingItems().length,this.addItems([e]),this.refreshGui()}},{key:"rearrangeItems",value:function(e){var t=this.getNonGhostItems().slice();return tr(t,e,this.insertIndex),!ji(t,this.getExistingItems())&&(this.updateItems(t),!0)}},{key:"refreshGui",value:function(){var e=this.ePillDropList.scrollTop,t=this.resizeEnabled,n=this.getFocusedItem(),i=this.focusService.findNextFocusableElement();i||(i=this.focusService.findNextFocusableElement(void 0,!1,!0)),this.toggleResizable(!1),this.destroyGui(),this.addIconAndTitleToGui(),this.addEmptyMessageToGui(),this.addItemsToGui(),this.isHorizontal()||(this.ePillDropList.scrollTop=e),t&&this.toggleResizable(t),this.focusService.isKeyboardMode()&&this.restoreFocus(n,i)}},{key:"getFocusedItem",value:function(){var e=this.getGui(),t=this.gridOptionsService.getDocument().activeElement;return e.contains(t)?Array.from(e.querySelectorAll(".ag-column-drop-cell")).indexOf(t):-1}},{key:"restoreFocus",value:function(e,t){var n=this.getGui(),i=Array.from(n.querySelectorAll(".ag-column-drop-cell"));if(-1!==e){0===i.length&&t.focus();var r=i[Math.min(i.length-1,e)];r&&r.focus()}}},{key:"focusList",value:function(e){var t=e?this.childPillComponents.length-1:0;this.restoreFocus(t,this.getFocusableElement())}},{key:"getNonGhostItems",value:function(){var e=this,t=this.getExistingItems();return this.isPotentialDndItems()?t.filter((function(t){return!ir(e.potentialDndItems,t)})):t}},{key:"addItemsToGui",value:function(){var e=this,t=this.getNonGhostItems().map((function(t){return e.createItemComponent(t,!1)}));if(this.isPotentialDndItems()){var n=this.potentialDndItems.map((function(t){return e.createItemComponent(t,!0)}));this.insertIndex>=t.length?t.push.apply(t,(0,o.Z)(n)):t.splice.apply(t,[this.insertIndex,0].concat((0,o.Z)(n)))}this.appendChild(this.ePillDropList),t.forEach((function(t,n){n>0&&e.addArrow(e.ePillDropList),e.ePillDropList.appendChild(t.getGui())})),this.addAriaLabelsToComponents()}},{key:"addAriaLabelsToComponents",value:function(){var e=this;this.childPillComponents.forEach((function(t,n){var i=t.getGui();wo(i,n+1),ko(i,e.childPillComponents.length)}))}},{key:"createItemComponent",value:function(e,t){var n=this,i=this.createPillComponent(e,this.dropTarget,t,this.horizontal);return i.addEventListener(mh.EVENT_COLUMN_REMOVE,this.removeItems.bind(this,[e])),this.context.createBean(i),this.guiDestroyFunctions.push((function(){return n.destroyBean(i)})),t||this.childPillComponents.push(i),i}},{key:"addIconAndTitleToGui",value:function(){var e=this.params,t=e.title,n=e.icon;if(t&&n){var i=document.createElement("div");if(go(i,!0),this.addElementClasses(i,"title-bar"),this.addElementClasses(n,"icon"),this.addOrRemoveCssClass("ag-column-drop-empty",this.isExistingItemsEmpty()),i.appendChild(n),!this.horizontal){var r=document.createElement("span");this.addElementClasses(r,"title"),r.innerHTML=t,i.appendChild(r)}this.appendChild(i)}}},{key:"isExistingItemsEmpty",value:function(){return 0===this.getExistingItems().length}},{key:"addEmptyMessageToGui",value:function(){var e=this.params.emptyMessage;if(e&&this.isExistingItemsEmpty()&&!this.isPotentialDndItems()){var t=document.createElement("span");t.innerHTML=e,this.addElementClasses(t,"empty-message"),this.ePillDropList.appendChild(t)}}},{key:"addArrow",value:function(e){if(this.horizontal){var t=cs(this.gridOptionsService.get("enableRtl")?"smallLeft":"smallRight",this.gridOptionsService);this.addElementClasses(t,"cell-separator"),e.appendChild(t)}}}]),n}(Ns);yh.STATE_NOT_DRAGGING="notDragging",yh.STATE_NEW_ITEMS_IN="newItemsIn",yh.STATE_REARRANGE_ITEMS="rearrangeItems",Mn([Di("focusService")],yh.prototype,"focusService",2),Mn([Di("dragAndDropService")],yh.prototype,"dragAndDropService",2);var Ch=["touchstart","touchend","touchmove","touchcancel"],kh=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"javascript";(0,a.Z)(this,e),this.frameworkName=t,this.renderingEngine="vanilla",this.wrapIncoming=function(e){return e()},this.wrapOutgoing=function(e){return e()}}return(0,s.Z)(e,[{key:"setInterval",value:function(e,t){return new Rs((function(n){n(window.setInterval(e,t))}))}},{key:"addEventListener",value:function(e,t,n,i){var r=ir(Ch,t);e.addEventListener(t,n,{capture:!!i,passive:r})}},{key:"shouldWrapOutgoing",get:function(){return!1}},{key:"frameworkComponent",value:function(e){return null}},{key:"isFrameworkComponent",value:function(e){return!1}},{key:"getDocLink",value:function(e){var t="solid"===this.frameworkName?"react":this.frameworkName;return"https://www.ag-grid.com/".concat(t,"-data-grid").concat(e?"/".concat(e):"")}}]),e}(),wh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"getNextCellToFocus",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return n?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}},{key:"getNextCellToFocusWithCtrlPressed",value:function(e,t){var n,i,r=e===hs.UP,o=e===hs.DOWN,a=e===hs.LEFT;if(r||o)i=r?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow(),n=t.column;else{var s=this.columnModel.getAllDisplayedColumns(),l=this.gridOptionsService.get("enableRtl");i=t.rowIndex,n=a!==l?s[0]:Ui(s)}return{rowIndex:i,rowPinned:null,column:n}}},{key:"getNextCellToFocusWithoutCtrlPressed",value:function(e,t){for(var n=t,i=!1;!i;){switch(e){case hs.UP:n=this.getCellAbove(n);break;case hs.DOWN:n=this.getCellBelow(n);break;case hs.RIGHT:n=this.gridOptionsService.get("enableRtl")?this.getCellToLeft(n):this.getCellToRight(n);break;case hs.LEFT:n=this.gridOptionsService.get("enableRtl")?this.getCellToRight(n):this.getCellToLeft(n);break;default:n=null,console.warn("AG Grid: unknown key for navigation "+e)}i=!n||this.isCellGoodToFocusOn(n)}return n}},{key:"isCellGoodToFocusOn",value:function(e){var t,n=e.column;switch(e.rowPinned){case"top":t=this.pinnedRowModel.getPinnedTopRow(e.rowIndex);break;case"bottom":t=this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);break;default:t=this.rowModel.getRow(e.rowIndex)}return!!t&&!n.isSuppressNavigable(t)}},{key:"getCellToLeft",value:function(e){if(!e)return null;var t=this.columnModel.getDisplayedColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}},{key:"getCellToRight",value:function(e){if(!e)return null;var t=this.columnModel.getDisplayedColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}},{key:"getRowBelow",value:function(e){var t=e.rowIndex,n=e.rowPinned;if(this.isLastRowInContainer(e))switch(n){case"bottom":return null;case"top":return this.rowModel.isRowsToRender()?{rowIndex:this.paginationProxy.getPageFirstRow(),rowPinned:null}:this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;default:return this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null}var i=this.rowModel.getRow(e.rowIndex),r=this.getNextStickyPosition(i);return r||{rowIndex:t+1,rowPinned:n}}},{key:"getNextStickyPosition",value:function(e,t){if(this.gridOptionsService.isGroupRowsSticky()&&e&&e.sticky){var n=(0,o.Z)(this.rowRenderer.getStickyTopRowCtrls()).sort((function(e,t){return e.getRowNode().rowIndex-t.getRowNode().rowIndex})),i=t?-1:1,r=n.findIndex((function(t){return t.getRowNode().rowIndex===e.rowIndex})),a=n[r+i];return a?{rowIndex:a.getRowNode().rowIndex,rowPinned:null}:void 0}}},{key:"getCellBelow",value:function(e){if(!e)return null;var t=this.getRowBelow(e);return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}},{key:"isLastRowInContainer",value:function(e){var t=e.rowPinned,n=e.rowIndex;return"top"===t?this.pinnedRowModel.getPinnedTopRowData().length-1<=n:"bottom"===t?this.pinnedRowModel.getPinnedBottomRowData().length-1<=n:this.paginationProxy.getPageLastRow()<=n}},{key:"getRowAbove",value:function(e){var t=e.rowIndex,n=e.rowPinned;if(n?0===t:t===this.paginationProxy.getPageFirstRow())return"top"===n?null:n&&this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null;var i=this.rowModel.getRow(e.rowIndex),r=this.getNextStickyPosition(i,!0);return r||{rowIndex:t-1,rowPinned:n}}},{key:"getCellAbove",value:function(e){if(!e)return null;var t=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}},{key:"getLastBodyCell",value:function(){return{rowIndex:this.paginationProxy.getPageLastRow(),rowPinned:null}}},{key:"getLastFloatingTopRow",value:function(){return{rowIndex:this.pinnedRowModel.getPinnedTopRowData().length-1,rowPinned:"top"}}},{key:"getNextTabbedCell",value:function(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}},{key:"getNextTabbedCellForwards",value:function(e){var t=this.columnModel.getAllDisplayedColumns(),n=e.rowIndex,i=e.rowPinned,r=this.columnModel.getDisplayedColAfter(e.column);if(!r){r=t[0];var o=this.getRowBelow(e);if(_n(o))return null;if(!o.rowPinned&&!this.paginationProxy.isRowInPage(o))return null;n=o?o.rowIndex:null,i=o?o.rowPinned:null}return{rowIndex:n,column:r,rowPinned:i}}},{key:"getNextTabbedCellBackwards",value:function(e){var t=this.columnModel.getAllDisplayedColumns(),n=e.rowIndex,i=e.rowPinned,r=this.columnModel.getDisplayedColBefore(e.column);if(!r){r=Ui(t);var o=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(_n(o))return null;if(!o.rowPinned&&!this.paginationProxy.isRowInPage(o))return null;n=o?o.rowIndex:null,i=o?o.rowPinned:null}return{rowIndex:n,column:r,rowPinned:i}}}]),n}(kr);Mn([Di("columnModel")],wh.prototype,"columnModel",2),Mn([Di("rowModel")],wh.prototype,"rowModel",2),Mn([Di("rowRenderer")],wh.prototype,"rowRenderer",2),Mn([Di("pinnedRowModel")],wh.prototype,"pinnedRowModel",2),Mn([Di("paginationProxy")],wh.prototype,"paginationProxy",2),wh=Mn([Ri("cellNavigationService")],wh);var Sh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).consuming=!1,e}return(0,s.Z)(n,[{key:"setBeans",value:function(e){this.logger=e.create("AlignedGridsService")}},{key:"getAlignedGridApis",value:function(){var e,t=this,n=null!=(e=this.gridOptionsService.get("alignedGrids"))?e:[],i="function"===typeof n;"function"===typeof n&&(n=n());var r=function(){return"See ".concat(t.getFrameworkOverrides().getDocLink("aligned-grids"))};return n.map((function(e){var t;if(!e)return ai("alignedGrids contains an undefined option."),i||ai('You may want to configure via a callback to avoid setup race conditions:\n                     "alignedGrids: () => [linkedGrid]"'),void ai(r());if(e instanceof Xu)return e;var n=e;return"current"in n?null==(t=n.current)?void 0:t.api:(n.api||ai("alignedGrids - No api found on the linked grid. If you are passing gridOptions to alignedGrids since v31 this is no longer valid. ".concat(r())),n.api)})).filter((function(e){return!!e&&!e.isDestroyed()}))}},{key:"init",value:function(){this.addManagedListener(this.eventService,Er.EVENT_COLUMN_MOVED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_VISIBLE,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_PINNED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_GROUP_OPENED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_RESIZED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_BODY_SCROLL,this.fireScrollEvent.bind(this))}},{key:"fireEvent",value:function(e){this.consuming||this.getAlignedGridApis().forEach((function(t){var n=t.__getAlignedGridService();e(n)}))}},{key:"onEvent",value:function(e){this.consuming=!0,e(),this.consuming=!1}},{key:"fireColumnEvent",value:function(e){this.fireEvent((function(t){t.onColumnEvent(e)}))}},{key:"fireScrollEvent",value:function(e){"horizontal"===e.direction&&this.fireEvent((function(t){t.onScrollEvent(e)}))}},{key:"onScrollEvent",value:function(e){var t=this;this.onEvent((function(){t.ctrlsService.getGridBodyCtrl().getScrollFeature().setHorizontalScrollPosition(e.left,!0)}))}},{key:"getMasterColumns",value:function(e){var t=[];return e.columns?e.columns.forEach((function(e){t.push(e)})):e.column&&t.push(e.column),t}},{key:"getColumnIds",value:function(e){var t=[];return e.columns?e.columns.forEach((function(e){t.push(e.getColId())})):e.column&&t.push(e.column.getColId()),t}},{key:"onColumnEvent",value:function(e){var t=this;this.onEvent((function(){switch(e.type){case Er.EVENT_COLUMN_MOVED:case Er.EVENT_COLUMN_VISIBLE:case Er.EVENT_COLUMN_PINNED:case Er.EVENT_COLUMN_RESIZED:var n=e;t.processColumnEvent(n);break;case Er.EVENT_COLUMN_GROUP_OPENED:var i=e;t.processGroupOpenedEvent(i);break;case Er.EVENT_COLUMN_PIVOT_CHANGED:console.warn("AG Grid: pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.")}}))}},{key:"processGroupOpenedEvent",value:function(e){var t=this;e.columnGroups.forEach((function(n){var i=null;if(n){var r=n.getGroupId();i=t.columnModel.getProvidedColumnGroup(r)}n&&!i||(t.logger.log("onColumnEvent-> processing "+e+" expanded = "+n.isExpanded()),t.columnModel.setColumnGroupOpened(i,n.isExpanded(),"alignedGridChanged"))}))}},{key:"processColumnEvent",value:function(e){var t,n=this,i=e.column,r=null;if(i&&(r=this.columnModel.getPrimaryColumn(i.getColId())),!i||r){var o=this.getMasterColumns(e);switch(e.type){case Er.EVENT_COLUMN_MOVED:var a=e,s=e.api.getColumnState().map((function(e){return{colId:e.colId}}));this.columnModel.applyColumnState({state:s,applyOrder:!0},"alignedGridChanged"),this.logger.log("onColumnEvent-> processing ".concat(e.type," toIndex = ").concat(a.toIndex));break;case Er.EVENT_COLUMN_VISIBLE:var l=e,u=e.api.getColumnState().map((function(e){return{colId:e.colId,hide:e.hide}}));this.columnModel.applyColumnState({state:u},"alignedGridChanged"),this.logger.log("onColumnEvent-> processing ".concat(e.type," visible = ").concat(l.visible));break;case Er.EVENT_COLUMN_PINNED:var c=e,d=e.api.getColumnState().map((function(e){return{colId:e.colId,pinned:e.pinned}}));this.columnModel.applyColumnState({state:d},"alignedGridChanged"),this.logger.log("onColumnEvent-> processing ".concat(e.type," pinned = ").concat(c.pinned));break;case Er.EVENT_COLUMN_RESIZED:var h=e,p={};o.forEach((function(t){n.logger.log("onColumnEvent-> processing ".concat(e.type," actualWidth = ").concat(t.getActualWidth())),p[t.getId()]={key:t.getColId(),newWidth:t.getActualWidth()}})),null==(t=h.flexColumns)||t.forEach((function(e){p[e.getId()]&&delete p[e.getId()]})),this.columnModel.setColumnWidths(Object.values(p),!1,h.finished,"alignedGridChanged")}var f=this.ctrlsService.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach((function(e){e.setGridOption("alwaysShowVerticalScroll",f)}))}}}]),n}(kr);Mn([Di("columnModel")],Sh.prototype,"columnModel",2),Mn([Di("ctrlsService")],Sh.prototype,"ctrlsService",2),Mn([Nn(0,Pi("loggerFactory"))],Sh.prototype,"setBeans",1),Mn([Ei],Sh.prototype,"init",1),Sh=Mn([Ri("alignedGridsService")],Sh);var bh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).selectedNodes=new Map,e.lastRowNode=null,e}return(0,s.Z)(n,[{key:"init",value:function(){var e=this;this.rowSelection=this.gridOptionsService.get("rowSelection"),this.groupSelectsChildren=this.gridOptionsService.get("groupSelectsChildren"),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],(function(){e.groupSelectsChildren=e.gridOptionsService.get("groupSelectsChildren"),e.rowSelection=e.gridOptionsService.get("rowSelection"),e.deselectAllRowNodes({source:"api"})})),this.addManagedListener(this.eventService,Er.EVENT_ROW_SELECTED,this.onRowSelected.bind(this))}},{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this),this.resetNodes(),this.lastRowNode=null}},{key:"isMultiselect",value:function(){return"multiple"===this.rowSelection}},{key:"setNodesSelected",value:function(e){var t,n=e.newValue,i=e.clearSelection,r=e.suppressFinishActions,o=e.rangeSelect,a=e.nodes,s=e.event,l=e.source,u=void 0===l?"api":l;if(0===a.length)return 0;if(a.length>1&&!this.isMultiselect())return console.warn("AG Grid: cannot multi select while rowSelection='single'"),0;var c=this.groupSelectsChildren&&!0===e.groupSelectsFiltered,d=a.map((function(e){return e.footer?e.sibling:e}));if(o){if(a.length>1)return console.warn("AG Grid: cannot range select while selecting multiple rows"),0;var h=null;if("checkboxSelected"===u&&!1===n&&this.lastRowNode&&(this.lastRowNode.id?h=this.lastRowNode:this.lastRowNode=null),null==h&&(h=this.getLastSelectedNode()),h){var p=d[0];if(p!==h&&this.isMultiselect())return this.selectRange(p,h,n,u)}}this.lastRowNode=n?null:d[0];for(var f=0,v=0;v<d.length;v++){var g=d[v];if(!(c&&g.group))g.selectThisNode(n,s,u)&&f++;this.groupSelectsChildren&&(null==(t=g.childrenAfterGroup)?void 0:t.length)&&(f+=this.selectChildren(g,n,c,u))}if(!r&&(n&&(i||!this.isMultiselect())&&(f+=this.clearOtherNodes(d[0],u)),f>0)){this.updateGroupsFromChildrenSelections(u);var m={type:Er.EVENT_SELECTION_CHANGED,source:u};this.eventService.dispatchEvent(m)}return f}},{key:"selectRange",value:function(e,t){var n=this,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3?arguments[3]:void 0,o=this.rowModel.getNodesInRangeForSelection(e,t),a=0;o.forEach((function(e){e.group&&n.groupSelectsChildren||e.selectThisNode(i,void 0,r)&&a++})),this.updateGroupsFromChildrenSelections(r);var s={type:Er.EVENT_SELECTION_CHANGED,source:r};return this.eventService.dispatchEvent(s),a}},{key:"selectChildren",value:function(e,t,n,i){var r=n?e.childrenAfterAggFilter:e.childrenAfterGroup;return _n(r)?0:this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:n,source:i,nodes:r})}},{key:"getLastSelectedNode",value:function(){var e=Array.from(this.selectedNodes.keys());if(0==e.length)return null;var t=this.selectedNodes.get(Ui(e));return t||null}},{key:"getSelectedNodes",value:function(){var e=[];return this.selectedNodes.forEach((function(t){t&&e.push(t)})),e}},{key:"getSelectedRows",value:function(){var e=[];return this.selectedNodes.forEach((function(t){t&&t.data&&e.push(t.data)})),e}},{key:"getSelectionCount",value:function(){return this.selectedNodes.size}},{key:"filterFromSelection",value:function(e){var t=new Map;this.selectedNodes.forEach((function(n,i){n&&e(n)&&t.set(i,n)})),this.selectedNodes=t}},{key:"updateGroupsFromChildrenSelections",value:function(e,t){if(!this.groupSelectsChildren)return!1;if("clientSide"!==this.rowModel.getType())return!1;var n=this.rowModel.getRootNode();t||(t=new _d(!0,n)).setInactive();var i=!1;return t.forEachChangedNodeDepthFirst((function(t){if(t!==n){var r=t.calculateSelectedFromChildren();i=t.selectThisNode(null!==r&&r,void 0,e)||i}})),i}},{key:"clearOtherNodes",value:function(e,t){var n=this,i=new Map,r=0;return this.selectedNodes.forEach((function(o){if(o&&o.id!==e.id){var a=n.selectedNodes.get(o.id);r+=a.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:t}),n.groupSelectsChildren&&o.parent&&i.set(o.parent.id,o.parent)}})),i.forEach((function(e){var n=e.calculateSelectedFromChildren();e.selectThisNode(null!==n&&n,void 0,t)})),r}},{key:"onRowSelected",value:function(e){var t=e.node;this.groupSelectsChildren&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}},{key:"syncInRowNode",value:function(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}},{key:"syncInOldRowNode",value:function(e,t){if(Fn(t)&&e.id!==t.id&&t){var n=t.id;this.selectedNodes.get(n)==e&&this.selectedNodes.set(t.id,t)}}},{key:"syncInNewRowNode",value:function(e){this.selectedNodes.has(e.id)?(e.setSelectedInitialValue(!0),this.selectedNodes.set(e.id,e)):e.setSelectedInitialValue(!1)}},{key:"reset",value:function(e){var t=this.getSelectionCount();if(this.resetNodes(),t){var n={type:Er.EVENT_SELECTION_CHANGED,source:e};this.eventService.dispatchEvent(n)}}},{key:"resetNodes",value:function(){var e;null==(e=this.selectedNodes)||e.clear()}},{key:"getBestCostNodeSelection",value:function(){if("clientSide"===this.rowModel.getType()){var e=this.rowModel.getTopLevelNodes();if(null!==e){var t=[];return function e(n){for(var i=0,r=n.length;i<r;i++){var o=n[i];if(o.isSelected())t.push(o);else{var a=o;a.group&&a.children&&e(a.children)}}}(e),t}}}},{key:"isEmpty",value:function(){var e=0;return this.selectedNodes.forEach((function(t){t&&e++})),0===e}},{key:"deselectAllRowNodes",value:function(e){var t=function(e){return e.selectThisNode(!1,void 0,i)},n="clientSide"===this.rowModel.getType(),i=e.source,r=e.justFiltered,o=e.justCurrentPage;if(o||r){if(!n)return void console.error("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'");this.getNodesToSelect(r,o).forEach(t)}else this.selectedNodes.forEach((function(e){e&&t(e)})),this.reset(i);n&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(i);var a={type:Er.EVENT_SELECTION_CHANGED,source:i};this.eventService.dispatchEvent(a)}},{key:"getSelectedCounts",value:function(e,t){var n=this,i=0,r=0;return this.getNodesToSelect(e,t).forEach((function(e){n.groupSelectsChildren&&e.group||(e.isSelected()?i++:e.selectable&&r++)})),{selectedCount:i,notSelectedCount:r}}},{key:"getSelectAllState",value:function(e,t){var n=this.getSelectedCounts(e,t),i=n.selectedCount,r=n.notSelectedCount;return(0!==i||0!==r)&&(i>0&&r>0?null:i>0)}},{key:"hasNodesToSelect",value:function(){var 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((function(e){return e.selectable})).length>0}},{key:"getNodesToSelect",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("clientSide"!==this.rowModel.getType())throw new Error("selectAll only available when rowModelType='clientSide', ie not ".concat(this.rowModel.getType()));var i=[];if(n)return this.paginationProxy.forEachNodeOnPage((function(t){if(t.group)if(t.expanded)e.groupSelectsChildren||i.push(t);else{(function e(t){var n;i.push(t),(null==(n=t.childrenAfterFilter)?void 0:n.length)&&t.childrenAfterFilter.forEach(e)})(t)}else i.push(t)})),i;var r=this.rowModel;return t?(r.forEachNodeAfterFilter((function(e){i.push(e)})),i):(r.forEachNode((function(e){i.push(e)})),i)}},{key:"selectAllRowNodes",value:function(e){if("clientSide"!==this.rowModel.getType())throw new Error("selectAll only available when rowModelType='clientSide', ie not ".concat(this.rowModel.getType()));var t=e.source,n=e.justFiltered,i=e.justCurrentPage;this.getNodesToSelect(n,i).forEach((function(e){return e.selectThisNode(!0,void 0,t)})),"clientSide"===this.rowModel.getType()&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(t);var r={type:Er.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(r)}},{key:"getSelectionState",value:function(){var e=[];return this.selectedNodes.forEach((function(t){(null==t?void 0:t.id)&&e.push(t.id)})),e.length?e:null}},{key:"setSelectionState",value:function(e,t){if(Array.isArray(e)){var n=new Set(e),i=[];this.rowModel.forEachNode((function(e){n.has(e.id)&&i.push(e)})),this.setNodesSelected({newValue:!0,nodes:i,source:t})}}}]),n}(kr);Mn([Di("rowModel")],bh.prototype,"rowModel",2),Mn([Di("paginationProxy")],bh.prototype,"paginationProxy",2),Mn([Ei],bh.prototype,"init",1),bh=Mn([Ri("selectionService")],bh);var Eh=function(){function e(t){var n=this;(0,a.Z)(this,e),this.viaApi=function(e){var t;oi("Since v31, 'columnApi.".concat(e,"' is deprecated and moved to 'api.").concat(e,"'."));for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];return(t=n.api)[e].apply(t,r)},this.api=t}return(0,s.Z)(e,[{key:"sizeColumnsToFit",value:function(e){this.viaApi("sizeColumnsToFit",e)}},{key:"setColumnGroupOpened",value:function(e,t){this.viaApi("setColumnGroupOpened",e,t)}},{key:"getColumnGroup",value:function(e,t){return this.viaApi("getColumnGroup",e,t)}},{key:"getProvidedColumnGroup",value:function(e){return this.viaApi("getProvidedColumnGroup",e)}},{key:"getDisplayNameForColumn",value:function(e,t){return this.viaApi("getDisplayNameForColumn",e,t)}},{key:"getDisplayNameForColumnGroup",value:function(e,t){return this.viaApi("getDisplayNameForColumnGroup",e,t)}},{key:"getColumn",value:function(e){return this.viaApi("getColumn",e)}},{key:"getColumns",value:function(){return this.viaApi("getColumns")}},{key:"applyColumnState",value:function(e){return this.viaApi("applyColumnState",e)}},{key:"getColumnState",value:function(){return this.viaApi("getColumnState")}},{key:"resetColumnState",value:function(){this.viaApi("resetColumnState")}},{key:"getColumnGroupState",value:function(){return this.viaApi("getColumnGroupState")}},{key:"setColumnGroupState",value:function(e){this.viaApi("setColumnGroupState",e)}},{key:"resetColumnGroupState",value:function(){this.viaApi("resetColumnGroupState")}},{key:"isPinning",value:function(){return this.viaApi("isPinning")}},{key:"isPinningLeft",value:function(){return this.viaApi("isPinningLeft")}},{key:"isPinningRight",value:function(){return this.viaApi("isPinningRight")}},{key:"getDisplayedColAfter",value:function(e){return this.viaApi("getDisplayedColAfter",e)}},{key:"getDisplayedColBefore",value:function(e){return this.viaApi("getDisplayedColBefore",e)}},{key:"setColumnVisible",value:function(e,t){this.viaApi("setColumnVisible",e,t)}},{key:"setColumnsVisible",value:function(e,t){this.viaApi("setColumnsVisible",e,t)}},{key:"setColumnPinned",value:function(e,t){this.viaApi("setColumnPinned",e,t)}},{key:"setColumnsPinned",value:function(e,t){this.viaApi("setColumnsPinned",e,t)}},{key:"getAllGridColumns",value:function(){return this.viaApi("getAllGridColumns")}},{key:"getDisplayedLeftColumns",value:function(){return this.viaApi("getDisplayedLeftColumns")}},{key:"getDisplayedCenterColumns",value:function(){return this.viaApi("getDisplayedCenterColumns")}},{key:"getDisplayedRightColumns",value:function(){return this.viaApi("getDisplayedRightColumns")}},{key:"getAllDisplayedColumns",value:function(){return this.viaApi("getAllDisplayedColumns")}},{key:"getAllDisplayedVirtualColumns",value:function(){return this.viaApi("getAllDisplayedVirtualColumns")}},{key:"moveColumn",value:function(e,t){this.viaApi("moveColumn",e,t)}},{key:"moveColumnByIndex",value:function(e,t){this.viaApi("moveColumnByIndex",e,t)}},{key:"moveColumns",value:function(e,t){this.viaApi("moveColumns",e,t)}},{key:"moveRowGroupColumn",value:function(e,t){this.viaApi("moveRowGroupColumn",e,t)}},{key:"setColumnAggFunc",value:function(e,t){this.viaApi("setColumnAggFunc",e,t)}},{key:"setColumnWidth",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;this.viaApi("setColumnWidth",e,t,n,i)}},{key:"setColumnWidths",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;this.viaApi("setColumnWidths",e,t,n)}},{key:"setPivotMode",value:function(e){this.viaApi("setPivotMode",e)}},{key:"isPivotMode",value:function(){return this.viaApi("isPivotMode")}},{key:"getPivotResultColumn",value:function(e,t){return this.viaApi("getPivotResultColumn",e,t)}},{key:"setValueColumns",value:function(e){this.viaApi("setValueColumns",e)}},{key:"getValueColumns",value:function(){return this.viaApi("getValueColumns")}},{key:"removeValueColumn",value:function(e){this.viaApi("removeValueColumn",e)}},{key:"removeValueColumns",value:function(e){this.viaApi("removeValueColumns",e)}},{key:"addValueColumn",value:function(e){this.viaApi("addValueColumn",e)}},{key:"addValueColumns",value:function(e){this.viaApi("addValueColumns",e)}},{key:"setRowGroupColumns",value:function(e){this.viaApi("setRowGroupColumns",e)}},{key:"removeRowGroupColumn",value:function(e){this.viaApi("removeRowGroupColumn",e)}},{key:"removeRowGroupColumns",value:function(e){this.viaApi("removeRowGroupColumns",e)}},{key:"addRowGroupColumn",value:function(e){this.viaApi("addRowGroupColumn",e)}},{key:"addRowGroupColumns",value:function(e){this.viaApi("addRowGroupColumns",e)}},{key:"getRowGroupColumns",value:function(){return this.viaApi("getRowGroupColumns")}},{key:"setPivotColumns",value:function(e){this.viaApi("setPivotColumns",e)}},{key:"removePivotColumn",value:function(e){this.viaApi("removePivotColumn",e)}},{key:"removePivotColumns",value:function(e){this.viaApi("removePivotColumns",e)}},{key:"addPivotColumn",value:function(e){this.viaApi("addPivotColumn",e)}},{key:"addPivotColumns",value:function(e){this.viaApi("addPivotColumns",e)}},{key:"getPivotColumns",value:function(){return this.viaApi("getPivotColumns")}},{key:"getLeftDisplayedColumnGroups",value:function(){return this.viaApi("getLeftDisplayedColumnGroups")}},{key:"getCenterDisplayedColumnGroups",value:function(){return this.viaApi("getCenterDisplayedColumnGroups")}},{key:"getRightDisplayedColumnGroups",value:function(){return this.viaApi("getRightDisplayedColumnGroups")}},{key:"getAllDisplayedColumnGroups",value:function(){return this.viaApi("getAllDisplayedColumnGroups")}},{key:"autoSizeColumn",value:function(e,t){return this.viaApi("autoSizeColumn",e,t)}},{key:"autoSizeColumns",value:function(e,t){this.viaApi("autoSizeColumns",e,t)}},{key:"autoSizeAllColumns",value:function(e){this.viaApi("autoSizeAllColumns",e)}},{key:"setPivotResultColumns",value:function(e){this.viaApi("setPivotResultColumns",e)}},{key:"getPivotResultColumns",value:function(){return this.viaApi("getPivotResultColumns")}}]),e}();Mn([Di("gridApi")],Eh.prototype,"api",2),Eh=Mn([Ri("columnApi")],Eh);var xh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).initialised=!1,e.isSsrm=!1,e}return(0,s.Z)(n,[{key:"init",value:function(){var e=this;this.isSsrm=this.gridOptionsService.isRowModelType("serverSide"),this.cellExpressions=this.gridOptionsService.get("enableCellExpressions"),this.isTreeData=this.gridOptionsService.get("treeData"),this.initialised=!0;var t=function(t){return e.callColumnCellValueChangedHandler(t)},n=this.gridOptionsService.useAsyncEvents();this.eventService.addEventListener(Er.EVENT_CELL_VALUE_CHANGED,t,n),this.addDestroyFunc((function(){return e.eventService.removeEventListener(Er.EVENT_CELL_VALUE_CHANGED,t,n)})),this.addManagedPropertyListener("treeData",(function(t){return e.isTreeData=t.currentValue}))}},{key:"getValue",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.initialised||this.init(),t){var r,o=e.getColDef(),a=o.field,s=e.getColId(),l=t.data,u=t.groupData&&void 0!==t.groupData[s],c=!i&&t.aggData&&void 0!==t.aggData[s],d=this.isSsrm&&i&&!!e.getColDef().aggFunc,h=this.isSsrm&&t.footer&&t.field&&(!0===e.getColDef().showRowGroup||e.getColDef().showRowGroup===t.field);if(n&&o.filterValueGetter?r=this.executeFilterValueGetter(o.filterValueGetter,l,e,t):this.isTreeData&&c?r=t.aggData[s]:this.isTreeData&&o.valueGetter?r=this.executeValueGetter(o.valueGetter,l,e,t):this.isTreeData&&a&&l?r=$n(l,a,e.isFieldContainsDots()):u?r=t.groupData[s]:c?r=t.aggData[s]:o.valueGetter?r=this.executeValueGetter(o.valueGetter,l,e,t):h?r=$n(l,t.field,e.isFieldContainsDots()):a&&l&&!d&&(r=$n(l,a,e.isFieldContainsDots())),this.cellExpressions&&"string"===typeof r&&0===r.indexOf("=")){var p=r.substring(1);r=this.executeValueGetter(p,l,e,t)}if(null==r){var f=this.getOpenedGroup(t,e);if(null!=f)return f}return r}}},{key:"getOpenedGroup",value:function(e,t){if(this.gridOptionsService.get("showOpenedGroup")&&t.getColDef().showRowGroup)for(var n=t.getColDef().showRowGroup,i=e.parent;null!=i;){if(i.rowGroupColumn&&(!0===n||n===i.rowGroupColumn.getColId()))return i.key;i=i.parent}}},{key:"setValue",value:function(e,t,n,i){var r=this.columnModel.getPrimaryColumn(t);if(!e||!r)return!1;_n(e.data)&&(e.data={});var o=r.getColDef(),a=o.field,s=o.valueSetter;if(_n(a)&&_n(s))return console.warn("AG Grid: you need either field or valueSetter set on colDef for editing to work"),!1;if(!this.dataTypeService.checkType(r,n))return console.warn("AG Grid: Data type of the new value does not match the cell data type of the column"),!1;var l,u=this.gridOptionsService.addGridCommonParams({node:e,data:e.data,oldValue:this.getValue(r,e),newValue:n,colDef:r.getColDef(),column:r});if(u.newValue=n,void 0===(l=Fn(s)?"function"===typeof s?s(u):this.expressionService.evaluate(s,u):this.setValueUsingField(e.data,a,n,r.isFieldContainsDots()))&&(l=!0),!l)return!1;e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged(),u.newValue=this.getValue(r,e);var c={type:Er.EVENT_CELL_VALUE_CHANGED,event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:u.column,api:u.api,columnApi:u.columnApi,colDef:u.colDef,context:u.context,data:e.data,node:e,oldValue:u.oldValue,newValue:u.newValue,value:u.newValue,source:i};return this.eventService.dispatchEvent(c),!0}},{key:"callColumnCellValueChangedHandler",value:function(e){var t=e.colDef.onCellValueChanged;"function"===typeof t&&this.getFrameworkOverrides().wrapOutgoing((function(){t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,columnApi:e.columnApi,context:e.context})}))}},{key:"setValueUsingField",value:function(e,t,n,i){if(!t)return!1;var r=!1;if(i)for(var o=t.split("."),a=e;o.length>0&&a;){var s=o.shift();0===o.length?(r=a[s]===n)||(a[s]=n):a=a[s]}else(r=e[t]===n)||(e[t]=n);return!r}},{key:"executeFilterValueGetter",value:function(e,t,n,i){var r=this.gridOptionsService.addGridCommonParams({data:t,node:i,column:n,colDef:n.getColDef(),getValue:this.getValueCallback.bind(this,i)});return"function"===typeof e?e(r):this.expressionService.evaluate(e,r)}},{key:"executeValueGetter",value:function(e,t,n,i){var r=n.getColId(),o=this.valueCache.getValue(i,r);if(void 0!==o)return o;var a,s=this.gridOptionsService.addGridCommonParams({data:t,node:i,column:n,colDef:n.getColDef(),getValue:this.getValueCallback.bind(this,i)});return a="function"===typeof e?e(s):this.expressionService.evaluate(e,s),this.valueCache.setValue(i,r,a),a}},{key:"getValueCallback",value:function(e,t){var n=this.columnModel.getPrimaryColumn(t);return n?this.getValue(n,e):null}},{key:"getKeyForNode",value:function(e,t){var n=this.getValue(e,t),i=e.getColDef().keyCreator,r=n;i&&(r=i(this.gridOptionsService.addGridCommonParams({value:n,colDef:e.getColDef(),column:e,node:t,data:t.data})));return"string"===typeof r||null==r||"[object Object]"===(r=String(r))&&oi("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"),r}}]),n}(kr);Mn([Di("expressionService")],xh.prototype,"expressionService",2),Mn([Di("columnModel")],xh.prototype,"columnModel",2),Mn([Di("valueCache")],xh.prototype,"valueCache",2),Mn([Di("dataTypeService")],xh.prototype,"dataTypeService",2),Mn([Ei],xh.prototype,"init",1),xh=Mn([Ri("valueService")],xh);var Rh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).expressionToFunctionCache={},e}return(0,s.Z)(n,[{key:"setBeans",value:function(e){this.logger=e.create("ExpressionService")}},{key:"evaluate",value:function(e,t){if("string"===typeof e)return this.evaluateExpression(e,t);console.error("AG Grid: value should be either a string or a function",e)}},{key:"evaluateExpression",value:function(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.columnApi,t.getValue,t.column,t.columnGroup)}catch(je){return console.log("Processing of the expression failed"),console.log("Expression = "+e),console.log("Params =",t),console.log("Exception = "+je),null}}},{key:"createExpressionFunction",value:function(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];var t=this.createFunctionBody(e),n=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup",t);return this.expressionToFunctionCache[e]=n,n}},{key:"createFunctionBody",value:function(e){return e.indexOf("return")>=0?e:"return "+e+";"}}]),n}(kr);Mn([Nn(0,Pi("loggerFactory"))],Rh.prototype,"setBeans",1),Rh=Mn([Ri("expressionService")],Rh);var Dh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).templateCache={},e.waitingCallbacks={},e}return(0,s.Z)(n,[{key:"getTemplate",value:function(e,t){var n=this.templateCache[e];if(n)return n;var i=this.waitingCallbacks[e],r=this;if(!i){i=[],this.waitingCallbacks[e]=i;var o=new XMLHttpRequest;o.onload=function(){r.handleHttpResult(this,e)},o.open("GET",e),o.send()}return t&&i.push(t),null}},{key:"handleHttpResult",value:function(e,t){if(200===e.status&&null!==e.response){this.templateCache[t]=e.response||e.responseText;for(var n=this.waitingCallbacks[t],i=0;i<n.length;i++){(0,n[i])()}}else console.warn("AG Grid: Unable to get template error ".concat(e.status," - ").concat(t))}}]),n}(kr);Dh=Mn([Ri("templateService")],Dh);var Th=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"setBeans",value:function(e){this.logging=e.get("debug")}},{key:"create",value:function(e){return new Oh(e,this.isLogging.bind(this))}},{key:"isLogging",value:function(){return this.logging}}]),n}(kr);Mn([Nn(0,Pi("gridOptionsService"))],Th.prototype,"setBeans",1),Th=Mn([Ri("loggerFactory")],Th);var Oh=function(){function e(t,n){(0,a.Z)(this,e),this.name=t,this.isLoggingFunc=n}return(0,s.Z)(e,[{key:"isLogging",value:function(){return this.isLoggingFunc()}},{key:"log",value:function(e){this.isLoggingFunc()&&console.log("AG Grid."+this.name+": "+e)}}]),e}(),Ph=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"setComp",value:function(e,t,n){var i=this;this.view=e,this.eGridHostDiv=t,this.eGui=n,this.eGui.setAttribute("grid-id",this.context.getGridId()),this.dragAndDropService.addDropTarget({getContainer:function(){return i.eGui},isInterestedIn:function(e){return 1===e||0===e},getIconName:function(){return Xl.ICON_NOT_ALLOWED}}),this.mouseEventService.stampTopLevelGridCompWithGridInstance(t),this.createManagedBean(new tc(this.view)),this.addRtlSupport();var r=this.resizeObserverService.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc((function(){return r()})),this.ctrlsService.registerGridCtrl(this)}},{key:"isDetailGrid",value:function(){var e,t=this.focusService.findTabbableParent(this.getGui());return(null==(e=null==t?void 0:t.getAttribute("row-id"))?void 0:e.startsWith("detail"))||!1}},{key:"showDropZones",value:function(){return wi.__isRegistered("@ag-grid-enterprise/row-grouping",this.context.getGridId())}},{key:"showSideBar",value:function(){return wi.__isRegistered("@ag-grid-enterprise/side-bar",this.context.getGridId())}},{key:"showStatusBar",value:function(){return wi.__isRegistered("@ag-grid-enterprise/status-bar",this.context.getGridId())}},{key:"showWatermark",value:function(){return wi.__isRegistered("@ag-grid-enterprise/core",this.context.getGridId())}},{key:"onGridSizeChanged",value:function(){var e={type:Er.EVENT_GRID_SIZE_CHANGED,clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight};this.eventService.dispatchEvent(e)}},{key:"addRtlSupport",value:function(){var e=this.gridOptionsService.get("enableRtl")?"ag-rtl":"ag-ltr";this.view.setRtlClass(e)}},{key:"destroyGridUi",value:function(){this.view.destroyGridUi()}},{key:"getGui",value:function(){return this.eGui}},{key:"setResizeCursor",value:function(e){this.view.setCursor(e?"ew-resize":null)}},{key:"disableUserSelect",value:function(e){this.view.setUserSelect(e?"none":null)}},{key:"focusNextInnerContainer",value:function(e){var t=this.gridOptionsService.getDocument(),n=this.view.getFocusableContainers(),i=n.findIndex((function(e){return e.contains(t.activeElement)})),r=i+(e?-1:1);return!(r<=0||r>=n.length)&&this.focusService.focusInto(n[r])}},{key:"focusInnerElement",value:function(e){var t=this.view.getFocusableContainers(),n=this.columnModel.getAllDisplayedColumns();if(e){if(t.length>1)return this.focusService.focusInto(Ui(t),!0);var i=Ui(n);if(this.focusService.focusGridView(i,!0))return!0}if(0===this.gridOptionsService.get("headerHeight")||this.gridOptionsService.get("suppressHeaderFocus")){if(this.focusService.focusGridView(n[0]))return!0;for(var r=1;r<t.length;r++)if(this.focusService.focusInto(t[r]))return!0;return!1}return this.focusService.focusFirstHeader()}},{key:"forceFocusOutOfContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.view.forceFocusOutOfContainer(e)}}]),n}(kr);Mn([Di("focusService")],Ph.prototype,"focusService",2),Mn([Di("resizeObserverService")],Ph.prototype,"resizeObserverService",2),Mn([Di("columnModel")],Ph.prototype,"columnModel",2),Mn([Di("ctrlsService")],Ph.prototype,"ctrlsService",2),Mn([Di("mouseEventService")],Ph.prototype,"mouseEventService",2),Mn([Di("dragAndDropService")],Ph.prototype,"dragAndDropService",2);var Ah=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).eGridDiv=e,i}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.logger=this.loggerFactory.create("GridComp");var t={destroyGridUi:function(){return e.destroyBean(e)},setRtlClass:function(t){return e.addCssClass(t)},forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:function(t){e.getGui().style.userSelect=null!=t?t:"",e.getGui().style.webkitUserSelect=null!=t?t:""},setCursor:function(t){e.getGui().style.cursor=null!=t?t:""}};this.ctrl=this.createManagedBean(new Ph);var n=this.createTemplate();this.setTemplate(n),this.ctrl.setComp(t,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:function(){},focusInnerElement:function(t){return e.ctrl.focusInnerElement(t)},forceFocusOutWhenTabGuardsAreEmpty:!0})}},{key:"insertGridIntoDom",value:function(){var e=this,t=this.getGui();this.eGridDiv.appendChild(t),this.addDestroyFunc((function(){e.eGridDiv.removeChild(t),e.logger.log("Grid removed from DOM")}))}},{key:"updateLayoutClasses",value:function(e,t){var n=this.eRootWrapperBody.classList;n.toggle("ag-layout-auto-height",t.autoHeight),n.toggle("ag-layout-normal",t.normal),n.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)}},{key:"createTemplate",value:function(){var e=this.ctrl.showDropZones()?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":"",t=this.ctrl.showSideBar()?'<ag-side-bar ref="sideBar"></ag-side-bar>':"",n=this.ctrl.showStatusBar()?'<ag-status-bar ref="statusBar"></ag-status-bar>':"",i=this.ctrl.showWatermark()?"<ag-watermark></ag-watermark>":"";return'<div class="ag-root-wrapper" role="presentation">\n                '.concat(e,'\n                <div class="ag-root-wrapper-body" ref="rootWrapperBody" role="presentation">\n                    <ag-grid-body ref="gridBody"></ag-grid-body>\n                    ').concat(t,"\n                </div>\n                ").concat(n,"\n                <ag-pagination></ag-pagination>\n                ").concat(i,"\n            </div>")}},{key:"getFocusableElement",value:function(){return this.eRootWrapperBody}},{key:"getFocusableContainers",value:function(){var e=[this.gridBodyComp.getGui()];return this.sideBarComp&&e.push(this.sideBarComp.getGui()),e.filter((function(e){return Ga(e)}))}}]),n}(xd);Mn([Di("loggerFactory")],Ah.prototype,"loggerFactory",2),Mn([Ls("gridBody")],Ah.prototype,"gridBodyComp",2),Mn([Ls("sideBar")],Ah.prototype,"sideBarComp",2),Mn([Ls("rootWrapperBody")],Ah.prototype,"eRootWrapperBody",2),Mn([Ei],Ah.prototype,"postConstruct",1);var Mh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"progressSort",value:function(e,t,n){var i=this.getNextSortDirection(e);this.setSortForColumn(e,i,t,n)}},{key:"setSortForColumn",value:function(e,t,n,i){"asc"!==t&&"desc"!==t&&(t=null);var r=[e];if(this.gridOptionsService.isColumnsSortingCoupledToGroup()&&e.getColDef().showRowGroup){var a=this.columnModel.getSourceColumnsForGroupColumn(e),s=null==a?void 0:a.filter((function(e){return e.isSortable()}));s&&(r=[e].concat((0,o.Z)(s)))}r.forEach((function(e){return e.setSort(t,i)}));var l=[];if(!((n||this.gridOptionsService.get("alwaysMultiSort"))&&!this.gridOptionsService.get("suppressMultiSort"))){var u=this.clearSortBarTheseColumns(r,i);l.push.apply(l,(0,o.Z)(u))}this.updateSortIndex(e),l.push.apply(l,(0,o.Z)(r)),this.dispatchSortChangedEvents(i,l)}},{key:"updateSortIndex",value:function(e){var t=this.gridOptionsService.isColumnsSortingCoupledToGroup(),n=this.columnModel.getGroupDisplayColumnForGroup(e.getId()),i=t&&n||e,r=this.getColumnsWithSortingOrdered();this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach((function(e){return e.setSortIndex(null)}));var a=r.filter((function(e){return(!t||!e.getColDef().showRowGroup)&&e!==i}));(i.getSort()?[].concat((0,o.Z)(a),[i]):a).forEach((function(e,t){e.setSortIndex(t)}))}},{key:"onSortChanged",value:function(e,t){this.dispatchSortChangedEvents(e,t)}},{key:"isSortActive",value:function(){var e=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter((function(e){return!!e.getSort()}));return e&&e.length>0}},{key:"dispatchSortChangedEvents",value:function(e,t){var n={type:Er.EVENT_SORT_CHANGED,source:e};t&&(n.columns=t),this.eventService.dispatchEvent(n)}},{key:"clearSortBarTheseColumns",value:function(e,t){var n=[];return this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach((function(i){e.includes(i)||(i.getSort()&&n.push(i),i.setSort(void 0,t))})),n}},{key:"getNextSortDirection",value:function(e){var t;if(t=e.getColDef().sortingOrder?e.getColDef().sortingOrder:this.gridOptionsService.get("sortingOrder")?this.gridOptionsService.get("sortingOrder"):Mh.DEFAULT_SORTING_ORDER,!Array.isArray(t)||t.length<=0)return console.warn("AG Grid: sortingOrder must be an array with at least one element, currently it's ".concat(t)),null;var n,i=t.indexOf(e.getSort()),r=i<0,o=i==t.length-1;return n=r||o?t[0]:t[i+1],Mh.DEFAULT_SORTING_ORDER.indexOf(n)<0?(console.warn("AG Grid: invalid sort type "+n),null):n}},{key:"getIndexedSortMap",value:function(){var e=this,t=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter((function(e){return!!e.getSort()}));if(this.columnModel.isPivotMode()){var n=this.gridOptionsService.isColumnsSortingCoupledToGroup();t=t.filter((function(t){var i=!!t.getAggFunc(),r=!t.isPrimary(),o=n?e.columnModel.getGroupDisplayColumnForGroup(t.getId()):t.getColDef().showRowGroup;return i||r||o}))}var i=this.columnModel.getRowGroupColumns().filter((function(e){return!!e.getSort()})),r={};t.forEach((function(e,t){return r[e.getId()]=t})),t.sort((function(e,t){var n=e.getSortIndex(),i=t.getSortIndex();return null!=n&&null!=i?n-i:null==n&&null==i?r[e.getId()]>r[t.getId()]?1:-1:null==i?-1:1}));var a=this.gridOptionsService.isColumnsSortingCoupledToGroup()&&!!i.length;a&&(t=(0,o.Z)(new Set(t.map((function(t){var n;return null!=(n=e.columnModel.getGroupDisplayColumnForGroup(t.getId()))?n:t})))));var s=new Map;return t.forEach((function(e,t){return s.set(e,t)})),a&&i.forEach((function(t){var n=e.columnModel.getGroupDisplayColumnForGroup(t.getId());s.set(t,s.get(n))})),s}},{key:"getColumnsWithSortingOrdered",value:function(){return(0,o.Z)(this.getIndexedSortMap().entries()).sort((function(e,t){var n=(0,r.Z)(e,2),i=(n[0],n[1]),o=(0,r.Z)(t,2);o[0];return i-o[1]})).map((function(e){return(0,r.Z)(e,1)[0]}))}},{key:"getSortModel",value:function(){return this.getColumnsWithSortingOrdered().filter((function(e){return e.getSort()})).map((function(e){return{sort:e.getSort(),colId:e.getId()}}))}},{key:"getSortOptions",value:function(){return this.getColumnsWithSortingOrdered().filter((function(e){return e.getSort()})).map((function(e){return{sort:e.getSort(),column:e}}))}},{key:"canColumnDisplayMixedSort",value:function(e){var t=this.gridOptionsService.isColumnsSortingCoupledToGroup(),n=!!e.getColDef().showRowGroup;return t&&n}},{key:"getDisplaySortForColumn",value:function(e){var t=this.columnModel.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!(null==t?void 0:t.length))return e.getSort();var n=null!=e.getColDef().field||!!e.getColDef().valueGetter?[e].concat((0,o.Z)(t)):t,i=n[0].getSort();return n.every((function(e){return e.getSort()==i}))?i:"mixed"}},{key:"getDisplaySortIndexForColumn",value:function(e){return this.getIndexedSortMap().get(e)}}]),n}(kr);Mh.DEFAULT_SORTING_ORDER=["asc","desc",null],Mn([Di("columnModel")],Mh.prototype,"columnModel",2),Mh=Mn([Ri("sortController")],Mh);var Nh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"init",value:function(){var e=this,t=this.clearFocusedCell.bind(this);this.addManagedListener(this.eventService,Er.EVENT_COLUMN_PIVOT_MODE_CHANGED,t),this.addManagedListener(this.eventService,Er.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverythingChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_GROUP_OPENED,t),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_ROW_GROUP_CHANGED,t),this.registerKeyboardFocusEvents(),this.ctrlsService.whenReady((function(t){e.gridCtrl=t.gridCtrl}))}},{key:"registerKeyboardFocusEvents",value:function(){var e=this.gridOptionsService.getDocument();Nh.addKeyboardModeEvents(e),Nh.instanceCount++,this.addDestroyFunc((function(){Nh.instanceCount--,Nh.unregisterGridCompController(e)}))}},{key:"onColumnEverythingChanged",value:function(){if(this.focusedCellPosition){var e=this.focusedCellPosition.column,t=this.columnModel.getGridColumn(e.getId());e!==t&&this.clearFocusedCell()}}},{key:"isKeyboardMode",value:function(){return Nh.keyboardModeActive}},{key:"getFocusCellToUseAfterRefresh",value:function(){var e=this.gridOptionsService.getDocument();return this.gridOptionsService.get("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(e.activeElement,kc.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition}},{key:"getFocusHeaderToUseAfterRefresh",value:function(){var e=this.gridOptionsService.getDocument();return this.gridOptionsService.get("suppressFocusAfterRefresh")||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(e.activeElement,nd.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition}},{key:"isDomDataMissingInHierarchy",value:function(e,t){for(var n=e;n;){if(this.gridOptionsService.getDomData(n,t))return!1;n=n.parentNode}return!0}},{key:"getFocusedCell",value:function(){return this.focusedCellPosition}},{key:"shouldRestoreFocus",value:function(e){var t=this;return!!this.isCellRestoreFocused(e)&&(setTimeout((function(){t.restoredFocusedCellPosition=null}),0),!0)}},{key:"isCellRestoreFocused",value:function(e){return null!=this.restoredFocusedCellPosition&&this.cellPositionUtils.equals(e,this.restoredFocusedCellPosition)}},{key:"setRestoreFocusedCell",value:function(e){"react"===this.getFrameworkOverrides().renderingEngine&&(this.restoredFocusedCellPosition=e)}},{key:"getFocusEventParams",value:function(){var e=this.focusedCellPosition,t=e.rowIndex,n=e.rowPinned,i={rowIndex:t,rowPinned:n,column:e.column,isFullWidthCell:!1},r=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:n});return r&&(i.isFullWidthCell=r.isFullWidth()),i}},{key:"clearFocusedCell",value:function(){if(this.restoredFocusedCellPosition=null,null!=this.focusedCellPosition){var e=Tn({type:Er.EVENT_CELL_FOCUS_CLEARED},this.getFocusEventParams());this.focusedCellPosition=null,this.eventService.dispatchEvent(e)}}},{key:"setFocusedCell",value:function(e){var t=e.column,n=e.rowIndex,i=e.rowPinned,r=e.forceBrowserFocus,o=void 0!==r&&r,a=e.preventScrollOnBrowserFocus,s=void 0!==a&&a,l=this.columnModel.getGridColumn(t);if(l){this.focusedCellPosition=l?{rowIndex:n,rowPinned:In(i),column:l}:null;var u=On(Tn({type:Er.EVENT_CELL_FOCUSED},this.getFocusEventParams()),{forceBrowserFocus:o,preventScrollOnBrowserFocus:s,floating:null});this.eventService.dispatchEvent(u)}else this.focusedCellPosition=null}},{key:"isCellFocused",value:function(e){return null!=this.focusedCellPosition&&this.cellPositionUtils.equals(e,this.focusedCellPosition)}},{key:"isRowNodeFocused",value:function(e){return this.isRowFocused(e.rowIndex,e.rowPinned)}},{key:"isHeaderWrapperFocused",value:function(e){if(null==this.focusedHeaderPosition)return!1;var t=e.getColumnGroupChild(),n=e.getRowIndex(),i=e.getPinned(),r=this.focusedHeaderPosition,o=r.column,a=r.headerRowIndex;return t===o&&n===a&&i==o.getPinned()}},{key:"clearFocusedHeader",value:function(){this.focusedHeaderPosition=null}},{key:"getFocusedHeader",value:function(){return this.focusedHeaderPosition}},{key:"setFocusedHeader",value:function(e,t){this.focusedHeaderPosition={headerRowIndex:e,column:t}}},{key:"focusHeaderPosition",value:function(e){if(this.gridOptionsService.get("suppressHeaderFocus"))return!1;var t=e.direction,n=e.fromTab,i=e.allowUserOverride,r=e.event,o=e.fromCell,a=e.rowWithoutSpanValue,s=e.headerPosition;if(o&&this.filterManager.isAdvancedFilterHeaderActive())return this.focusAdvancedFilter(s);if(i){var l=this.getFocusedHeader(),u=this.headerNavigationService.getHeaderRowCount();if(n){var c=this.gridOptionsService.getCallback("tabToNextHeader");if(c)s=c({backwards:"Before"===t,previousHeaderPosition:l,nextHeaderPosition:s,headerRowCount:u})}else{var d=this.gridOptionsService.getCallback("navigateToNextHeader");if(d&&r)s=d({key:r.key,previousHeaderPosition:l,nextHeaderPosition:s,headerRowCount:u,event:r})}}if(!s)return!1;if(-1===s.headerRowIndex)return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(s):this.focusGridView(s.column);this.headerNavigationService.scrollToColumn(s.column,t);var h=this.ctrlsService.getHeaderRowContainerCtrl(s.column.getPinned()).focusHeader(s.headerRowIndex,s.column,r);return h&&(null!=a||o)&&this.headerNavigationService.setCurrentHeaderRowWithoutSpan(null!=a?a:-1),h}},{key:"focusFirstHeader",value:function(){var e=this.columnModel.getAllDisplayedColumns()[0];if(!e)return!1;e.getParent()&&(e=this.columnModel.getColumnGroupAtLevel(e,0));var t=this.headerPositionUtils.getHeaderIndexToFocus(e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}},{key:"focusLastHeader",value:function(e){var t=this.headerNavigationService.getHeaderRowCount()-1,n=Ui(this.columnModel.getAllDisplayedColumns());return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:n},rowWithoutSpanValue:-1,event:e})}},{key:"focusPreviousFromFirstCell",value:function(e){return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}},{key:"isAnyCellFocused",value:function(){return!!this.focusedCellPosition}},{key:"isRowFocused",value:function(e,t){return null!=this.focusedCellPosition&&(this.focusedCellPosition.rowIndex===e&&this.focusedCellPosition.rowPinned===In(t))}},{key:"findFocusableElements",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=Ca,r=ka;t&&(r+=", "+t),n&&(r+=', [tabindex="-1"]');var o=Array.prototype.slice.apply(e.querySelectorAll(i)).filter((function(e){return Ga(e)})),a=Array.prototype.slice.apply(e.querySelectorAll(r));if(!a.length)return o;var s=function(e,t){return e.filter((function(e){return-1===t.indexOf(e)}))};return s(o,a)}},{key:"focusInto",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this.findFocusableElements(e,null,n),r=t?Ui(i):i[0];return!!r&&(r.focus({preventScroll:!0}),!0)}},{key:"findFocusableElementBeforeTabGuard",value:function(e,t){if(!t)return null;var n=this.findFocusableElements(e),i=n.indexOf(t);if(-1===i)return null;for(var r=-1,o=i-1;o>=0;o--)if(n[o].classList.contains("ag-tab-guard-top")){r=o;break}return r<=0?null:n[r-1]}},{key:"findNextFocusableElement",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.eGridDiv,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=this.findFocusableElements(e,t?':not([tabindex="-1"])':null),r=this.gridOptionsService.getDocument(),o=r.activeElement,a=(t?i.findIndex((function(e){return e.contains(o)})):i.indexOf(o))+(n?-1:1);return a<0||a>=i.length?null:i[a]}},{key:"isTargetUnderManagedComponent",value:function(e,t){if(!t)return!1;var n=e.querySelectorAll(".".concat(Hs.FOCUS_MANAGED_CLASS));if(!n.length)return!1;for(var i=0;i<n.length;i++)if(n[i].contains(t))return!0;return!1}},{key:"findTabbableParent",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,n=0;e&&null===qo(e)&&++n<=t;)e=e.parentElement;return null===qo(e)?null:e}},{key:"focusGridView",value:function(e,t){if(this.gridOptionsService.get("suppressCellFocus"))return t?this.gridOptionsService.get("suppressHeaderFocus")?this.focusNextGridCoreContainer(!0,!0):this.focusLastHeader():this.focusNextGridCoreContainer(!1);var n=t?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(!n)return!1;var i=n.rowIndex,r=n.rowPinned,o=this.getFocusedHeader();if(!e&&o&&(e=o.column),null==i||!e)return!1;if(this.navigationService.ensureCellVisible({rowIndex:i,column:e,rowPinned:r}),this.setFocusedCell({rowIndex:i,column:e,rowPinned:In(r),forceBrowserFocus:!0}),this.rangeService){var a={rowIndex:i,rowPinned:r,column:e};this.rangeService.setRangeToCell(a)}return!0}},{key:"focusNextGridCoreContainer",value:function(e){var 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)}},{key:"focusAdvancedFilter",value:function(e){return this.advancedFilterFocusColumn=null==e?void 0:e.column,this.advancedFilterService.getCtrl().focusHeaderComp()}},{key:"focusNextFromAdvancedFilter",value:function(e,t){var n,i,r=null!=(i=t?void 0:this.advancedFilterFocusColumn)?i:null==(n=this.columnModel.getAllDisplayedColumns())?void 0:n[0];return e?this.focusHeaderPosition({headerPosition:{column:r,headerRowIndex:this.headerNavigationService.getHeaderRowCount()-1}}):this.focusGridView(r)}},{key:"clearAdvancedFilterColumn",value:function(){this.advancedFilterFocusColumn=void 0}}],[{key:"addKeyboardModeEvents",value:function(e){this.instanceCount>0||(e.addEventListener("keydown",Nh.toggleKeyboardMode),e.addEventListener("mousedown",Nh.toggleKeyboardMode))}},{key:"removeKeyboardModeEvents",value:function(e){this.instanceCount>0||(e.addEventListener("keydown",Nh.toggleKeyboardMode),e.addEventListener("mousedown",Nh.toggleKeyboardMode))}},{key:"toggleKeyboardMode",value:function(e){var t=Nh.keyboardModeActive,n="keydown"===e.type;n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(Nh.keyboardModeActive=n)}},{key:"unregisterGridCompController",value:function(e){Nh.removeKeyboardModeEvents(e)}}]),n}(kr);Nh.keyboardModeActive=!1,Nh.instanceCount=0,Mn([Di("eGridDiv")],Nh.prototype,"eGridDiv",2),Mn([Di("columnModel")],Nh.prototype,"columnModel",2),Mn([Di("headerNavigationService")],Nh.prototype,"headerNavigationService",2),Mn([Di("headerPositionUtils")],Nh.prototype,"headerPositionUtils",2),Mn([Di("rowRenderer")],Nh.prototype,"rowRenderer",2),Mn([Di("rowPositionUtils")],Nh.prototype,"rowPositionUtils",2),Mn([Di("cellPositionUtils")],Nh.prototype,"cellPositionUtils",2),Mn([Ti("rangeService")],Nh.prototype,"rangeService",2),Mn([Di("navigationService")],Nh.prototype,"navigationService",2),Mn([Di("ctrlsService")],Nh.prototype,"ctrlsService",2),Mn([Di("filterManager")],Nh.prototype,"filterManager",2),Mn([Ti("advancedFilterService")],Nh.prototype,"advancedFilterService",2),Mn([Ei],Nh.prototype,"init",1),Nh=Mn([Ri("focusService")],Nh);var Lh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"setMouseOver",value:function(e){this.selectedColumns=e;var t={type:Er.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(t)}},{key:"clearMouseOver",value:function(){this.selectedColumns=null;var e={type:Er.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(e)}},{key:"isHovered",value:function(e){return!!this.selectedColumns&&this.selectedColumns.indexOf(e)>=0}}]),n}(kr);Lh=Mn([Ri("columnHoverService")],Lh);var Ih=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).executeNextFuncs=[],e.executeLaterFuncs=[],e.active=!1,e.suppressAnimation=!1,e.animationThreadCount=0,e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.ctrlsService.whenReady((function(t){return e.gridBodyCtrl=t.gridBodyCtrl}))}},{key:"isActive",value:function(){return this.active&&!this.suppressAnimation}},{key:"setSuppressAnimation",value:function(e){this.suppressAnimation=e}},{key:"start",value:function(){this.active||this.gridOptionsService.get("suppressColumnMoveAnimation")||this.gridOptionsService.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0)}},{key:"finish",value:function(){var e=this;this.active&&this.flush((function(){e.active=!1}))}},{key:"executeNextVMTurn",value:function(e){this.active?this.executeNextFuncs.push(e):e()}},{key:"executeLaterVMTurn",value:function(e){this.active?this.executeLaterFuncs.push(e):e()}},{key:"ensureAnimationCssClassPresent",value:function(){var e=this;this.animationThreadCount++;var t=this.animationThreadCount;this.gridBodyCtrl.setColumnMovingCss(!0),this.executeLaterFuncs.push((function(){e.animationThreadCount===t&&e.gridBodyCtrl.setColumnMovingCss(!1)}))}},{key:"flush",value:function(e){var t=this;if(0!==this.executeNextFuncs.length||0!==this.executeLaterFuncs.length){var n=function(e){for(;e.length;){var t=e.pop();t&&t()}};this.getFrameworkOverrides().wrapIncoming((function(){window.setTimeout((function(){return n(t.executeNextFuncs)}),0),window.setTimeout((function(){n(t.executeLaterFuncs),e()}),200)}))}else e()}}]),n}(kr);Mn([Di("ctrlsService")],Ih.prototype,"ctrlsService",2),Mn([Ei],Ih.prototype,"postConstruct",1),Ih=Mn([Ri("columnAnimationService")],Ih);var Fh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.ctrlsService.whenReady((function(t){e.centerRowContainerCon=t.centerRowContainerCtrl,e.addManagedListener(e.eventService,Er.EVENT_BODY_HEIGHT_CHANGED,e.checkPageSize.bind(e)),e.addManagedListener(e.eventService,Er.EVENT_SCROLL_VISIBILITY_CHANGED,e.checkPageSize.bind(e)),e.addManagedPropertyListener("paginationAutoPageSize",e.onPaginationAutoSizeChanged.bind(e)),e.checkPageSize()}))}},{key:"notActive",value:function(){return!this.gridOptionsService.get("paginationAutoPageSize")||null==this.centerRowContainerCon}},{key:"onPaginationAutoSizeChanged",value:function(){this.notActive()?this.paginationProxy.unsetAutoCalculatedPageSize():this.checkPageSize()}},{key:"checkPageSize",value:function(){var e=this;if(!this.notActive()){var t=this.centerRowContainerCon.getViewportSizeFeature().getBodyHeight();if(t>0){var n=function(){var n=e.gridOptionsService.getRowHeightAsNumber(),i=Math.floor(t/n);e.paginationProxy.setPageSize(i,"autoCalculated")};this.isBodyRendered?fi((function(){return n()}),50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}}}]),n}(kr);Mn([Di("ctrlsService")],Fh.prototype,"ctrlsService",2),Mn([Di("paginationProxy")],Fh.prototype,"paginationProxy",2),Mn([Ei],Fh.prototype,"postConstruct",1),Fh=Mn([Ri("paginationAutoPageSizeService")],Fh);var _h=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).cacheVersion=0,e}return(0,s.Z)(n,[{key:"init",value:function(){this.active=this.gridOptionsService.get("valueCache"),this.neverExpires=this.gridOptionsService.get("valueCacheNeverExpires")}},{key:"onDataChanged",value:function(){this.neverExpires||this.expire()}},{key:"expire",value:function(){this.cacheVersion++}},{key:"setValue",value:function(e,t,n){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[t]=n)}},{key:"getValue",value:function(e,t){if(this.active&&e.__cacheVersion===this.cacheVersion)return e.__cacheData[t]}}]),n}(kr);Mn([Ei],_h.prototype,"init",1),_h=Mn([Ri("valueCache")],_h);var Gh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"init",value:function(){"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel),this.addManagedListener(this.eventService,Er.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged.bind(this))}},{key:"onCellValueChanged",value:function(e){"paste"!==e.source&&this.doChangeDetection(e.node,e.column)}},{key:"doChangeDetection",value:function(e,t){if(!this.gridOptionsService.get("suppressChangeDetection")){var n=[e];if(this.clientSideRowModel&&!e.isRowPinned()){var i=this.gridOptionsService.get("aggregateOnlyChangedColumns"),r=new _d(i,this.clientSideRowModel.getRootNode());r.addParentNode(e.parent,[t]),this.clientSideRowModel.doAggregate(r),r.forEachChangedNodeDepthFirst((function(e){n.push(e)}))}this.rowRenderer.refreshCells({rowNodes:n})}}}]),n}(kr);Mn([Di("rowModel")],Gh.prototype,"rowModel",2),Mn([Di("rowRenderer")],Gh.prototype,"rowRenderer",2),Mn([Ei],Gh.prototype,"init",1),Gh=Mn([Ri("changeDetectionService")],Gh);var Zh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"adaptFunction",value:function(e,t){var n=this.componentMetadataProvider.retrieve(e);return n&&n.functionAdapter?n.functionAdapter(t):null}},{key:"adaptCellRendererFunction",value:function(e){return function(){function t(){(0,a.Z)(this,t)}return(0,s.Z)(t,[{key:"refresh",value:function(e){return!1}},{key:"getGui",value:function(){return this.eGui}},{key:"init",value:function(t){var n=e(t),i=typeof n;this.eGui="string"!==i&&"number"!==i&&"boolean"!==i?null!=n?n:Za("<span></span>"):Za("<span>"+n+"</span>")}}]),t}()}},{key:"doesImplementIComponent",value:function(e){return!!e&&(e.prototype&&"getGui"in e.prototype)}}]),n}(kr);Mn([Di("componentMetadataProvider")],Zh.prototype,"componentMetadataProvider",2),Zh=Mn([Ri("agComponentUtils")],Zh);var Vh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","onParamsUpdated","refresh"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},headerComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[]},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"]}}}},{key:"retrieve",value:function(e){return this.componentMetaData[e]}}]),n}(kr);Mn([Di("agComponentUtils")],Vh.prototype,"agComponentUtils",2),Mn([Ei],Vh.prototype,"postConstruct",1),Vh=Mn([Ri("componentMetadataProvider")],Vh);var Hh={"ag-theme-custom":{headerHeight:25,headerCellMinWidth:24,listItemHeight:20,rowHeight:25,chartMenuPanelWidth:220},"ag-theme-material":{headerHeight:56,headerCellMinWidth:48,listItemHeight:32,rowHeight:48,chartMenuPanelWidth:240},"ag-theme-balham":{headerHeight:32,headerCellMinWidth:24,listItemHeight:24,rowHeight:28,chartMenuPanelWidth:220},"ag-theme-alpine":{headerHeight:48,headerCellMinWidth:36,listItemHeight:24,rowHeight:42,chartMenuPanelWidth:240},"ag-theme-quartz":{headerHeight:48,headerCellMinWidth:36,listItemHeight:24,rowHeight:42,chartMenuPanelWidth:260}},Bh={headerHeight:["ag-header-row"],headerCellMinWidth:["ag-header-cell"],listItemHeight:["ag-virtual-list-item"],rowHeight:["ag-row"],chartMenuPanelWidth:["ag-chart-docked-container"]},Wh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).calculatedSizes={},e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e,t=this,n=null!=(e=this.getTheme().el)?e:this.eGridDiv;this.addManagedPropertyListener("rowHeight",(function(){return t.refreshRowHeightVariable()})),this.mutationObserver=new MutationObserver((function(){t.calculatedSizes={},t.fireGridStylesChangedEvent()})),this.mutationObserver.observe(n||this.eGridDiv,{attributes:!0,attributeFilter:["class"]})}},{key:"fireGridStylesChangedEvent",value:function(){var e={type:Er.EVENT_GRID_STYLES_CHANGED};this.eventService.dispatchEvent(e)}},{key:"getSassVariable",value:function(e){var t=this.getTheme(),n=t.themeFamily,i=t.el;if(n&&0===n.indexOf("ag-theme")){this.calculatedSizes||(this.calculatedSizes={}),this.calculatedSizes[n]||(this.calculatedSizes[n]={});var r=this.calculatedSizes[n][e];return null!=r?r:(this.calculatedSizes[n][e]=this.calculateValueForSassProperty(e,n,i),this.calculatedSizes[n][e])}}},{key:"calculateValueForSassProperty",value:function(e,t,n){var i,r="ag-theme-"+(t.match("material")?"material":t.match("balham")?"balham":t.match("alpine")?"alpine":"custom"),o=Hh[r][e],a=this.gridOptionsService.getDocument();if(n||(n=this.eGridDiv),!Bh[e])return o;var s=Bh[e],l=a.createElement("div"),u=Array.from(n.classList);(i=l.classList).add.apply(i,[t].concat(u)),l.style.position="absolute";var c=s.reduce((function(e,t){var n=a.createElement("div");return n.style.position="static",n.classList.add(t),e.appendChild(n),n}),l),d=0;if(a.body){a.body.appendChild(l);var h=-1!==e.toLowerCase().indexOf("height")?"height":"width";d=parseInt(window.getComputedStyle(c)[h],10),a.body.removeChild(l)}return d||o}},{key:"isThemeDark",value:function(){var e=this.getTheme().theme;return!!e&&e.indexOf("dark")>=0}},{key:"chartMenuPanelWidth",value:function(){return this.getSassVariable("chartMenuPanelWidth")}},{key:"getTheme",value:function(){for(var e=/\bag-(material|(?:theme-([\w\-]*)))\b/g,t=this.eGridDiv,n=null,i=[];t;){if(n=e.exec(t.className)){var r=t.className.match(e);r&&(i=r);break}t=t.parentElement||void 0}if(!n)return{allThemes:i};var o=n[0];return{theme:o,el:t,themeFamily:o.replace(/-dark$/,""),allThemes:i}}},{key:"getFromTheme",value:function(e,t){var n;return null!=(n=this.getSassVariable(t))?n:e}},{key:"getDefaultRowHeight",value:function(){return this.getFromTheme(25,"rowHeight")}},{key:"getListItemHeight",value:function(){return this.getFromTheme(20,"listItemHeight")}},{key:"refreshRowHeightVariable",value:function(){var e=this.eGridDiv.style.getPropertyValue("--ag-line-height").trim(),t=this.gridOptionsService.get("rowHeight");if(null==t||isNaN(t)||!isFinite(t))return null!==e&&this.eGridDiv.style.setProperty("--ag-line-height",null),-1;var n="".concat(t,"px");return e!=n?(this.eGridDiv.style.setProperty("--ag-line-height",n),t):""!=e?parseFloat(e):-1}},{key:"getMinColWidth",value:function(){var e=this.getFromTheme(null,"headerCellMinWidth");return Fn(e)?Math.max(e,10):10}},{key:"destroy",value:function(){this.calculatedSizes=null,this.mutationObserver&&this.mutationObserver.disconnect(),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}}]),n}(kr);Mn([Di("eGridDiv")],Wh.prototype,"eGridDiv",2),Mn([Ei],Wh.prototype,"postConstruct",1),Wh=Mn([Ri("environment")],Wh);var zh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).scrollY=0,e.uiBodyHeight=0,e}return(0,s.Z)(n,[{key:"agWire",value:function(e){this.logger=e.create("RowContainerHeightService")}},{key:"postConstruct",value:function(){this.addManagedListener(this.eventService,Er.EVENT_BODY_HEIGHT_CHANGED,this.updateOffset.bind(this)),this.maxDivHeight=Qo(),this.logger.log("maxDivHeight = "+this.maxDivHeight)}},{key:"isStretching",value:function(){return this.stretching}},{key:"getDivStretchOffset",value:function(){return this.divStretchOffset}},{key:"updateOffset",value:function(){if(this.stretching){var e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}}},{key:"calculateOffset",value:function(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;var e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;this.logger.log("Div Stretch Offset = ".concat(t," (").concat(this.pixelsToShave," * ").concat(e,")")),this.setDivStretchOffset(t)}},{key:"setUiContainerHeight",value:function(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventService.dispatchEvent({type:Er.EVENT_ROW_CONTAINER_HEIGHT_CHANGED}))}},{key:"clearOffset",value:function(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}},{key:"setDivStretchOffset",value:function(e){var t="number"===typeof e?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventService.dispatchEvent({type:Er.EVENT_HEIGHT_SCALE_CHANGED}))}},{key:"setModelHeight",value:function(e){this.modelHeight=e,this.stretching=null!=e&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}},{key:"getUiContainerHeight",value:function(){return this.uiContainerHeight}},{key:"getRealPixelPosition",value:function(e){return e-this.divStretchOffset}},{key:"getUiBodyHeight",value:function(){var e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition();return e.bottom-e.top}},{key:"getScrollPositionForPixel",value:function(e){if(this.pixelsToShave<=0)return e;var t=e/(this.modelHeight-this.getUiBodyHeight());return this.maxScrollY*t}}]),n}(kr);Mn([Di("ctrlsService")],zh.prototype,"ctrlsService",2),Mn([Nn(0,Pi("loggerFactory"))],zh.prototype,"agWire",1),Mn([Ei],zh.prototype,"postConstruct",1),zh=Mn([Ri("rowContainerHeightService")],zh);var Uh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"init",value:function(){var e=this;this.addManagedPropertyListener("isRowSelectable",(function(){return e.updateSelectable()}))}},{key:"updateSelectableAfterGrouping",value:function(){this.updateSelectable(!0)}},{key:"updateSelectable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!!this.gridOptionsService.get("rowSelection"),n=this.gridOptionsService.get("isRowSelectable");if(t&&n){var i=this.gridOptionsService.get("groupSelectsChildren"),r="clientSide"===this.rowModel.getType()&&i,o=[],a=function(t){if(!e||t.group)if(r&&t.group){var i=t.childrenAfterGroup.some((function(e){return!0===e.selectable}));t.setRowSelectable(i,!0)}else{var a=!n||n(t);t.setRowSelectable(a,!0),!a&&t.isSelected()&&o.push(t)}};if(r){var s=this.rowModel,l=new _d(!1,s.getRootNode());l.forEachChangedNodeDepthFirst(a,!0,!0)}else this.rowModel.forEachNode(a);o.length&&this.selectionService.setNodesSelected({nodes:o,newValue:!1,source:"selectableChanged"}),r&&this.selectionService instanceof bh&&this.selectionService.updateGroupsFromChildrenSelections("selectableChanged")}}}]),n}(kr);Mn([Di("rowModel")],Uh.prototype,"rowModel",2),Mn([Di("selectionService")],Uh.prototype,"selectionService",2),Mn([Ei],Uh.prototype,"init",1),Uh=Mn([Ri("selectableService")],Uh);var jh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.call(this)).previousAndFirstButtonsDisabled=!1,e.nextButtonDisabled=!1,e.lastButtonDisabled=!1,e.areListenersSetup=!1,e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this,t=this.gridOptionsService.get("enableRtl");this.setTemplate(this.getTemplate());var n=this.btFirst,i=this.btPrevious,r=this.btNext,o=this.btLast;this.pageSizeComp;this.activateTabIndex([n,i,r,o]),n.insertAdjacentElement("afterbegin",cs(t?"last":"first",this.gridOptionsService)),i.insertAdjacentElement("afterbegin",cs(t?"next":"previous",this.gridOptionsService)),r.insertAdjacentElement("afterbegin",cs(t?"previous":"next",this.gridOptionsService)),o.insertAdjacentElement("afterbegin",cs(t?"first":"last",this.gridOptionsService)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],(function(){return e.onPageSizeRelatedOptionsChange()})),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.onPaginationChanged()}},{key:"onPaginationChanged",value:function(){var e=this.gridOptionsService.get("pagination")&&!this.gridOptionsService.get("suppressPaginationPanel");this.setDisplayed(e),e&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateRowLabels(),this.setCurrentPageLabel(),this.setTotalLabels(),this.onPageSizeRelatedOptionsChange())}},{key:"onPageSizeRelatedOptionsChange",value:function(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}},{key:"setupListeners",value:function(){var e=this;this.areListenersSetup||(this.addManagedListener(this.eventService,Er.EVENT_PAGINATION_CHANGED,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((function(t){var n=t.el,i=t.fn;e.addManagedListener(n,"click",i),e.addManagedListener(n,"keydown",(function(e){e.key!==hs.ENTER&&e.key!==hs.SPACE||(e.preventDefault(),i())}))})),this.areListenersSetup=!0)}},{key:"onBtFirst",value:function(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToFirstPage()}},{key:"setCurrentPageLabel",value:function(){var e=this.paginationProxy.getTotalPages()>0,t=this.paginationProxy.getCurrentPage(),n=e?t+1:0;this.lbCurrent.textContent=this.formatNumber(n)}},{key:"formatNumber",value:function(e){var t=this.gridOptionsService.getCallback("paginationNumberFormatter");if(t)return t({value:e});var n=this.localeService.getLocaleTextFunc();return ca(e,n("thousandSeparator",","),n("decimalSeparator","."))}},{key:"getTemplate",value:function(){var e=this.localeService.getLocaleTextFunc(),t=e("page","Page"),n=e("to","to"),i=e("of","of"),r=e("firstPage","First Page"),o=e("previousPage","Previous Page"),a=e("nextPage","Next Page"),s=e("lastPage","Last Page"),l=this.getCompId();return'<div class="ag-paging-panel ag-unselectable" id="ag-'.concat(l,'">\n                <ag-page-size-selector ref="pageSizeComp"></ag-page-size-selector>\n                <span class="ag-paging-row-summary-panel" role="status">\n                    <span id="ag-').concat(l,'-first-row" ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n                    <span id="ag-').concat(l,'-to">').concat(n,'</span>\n                    <span id="ag-').concat(l,'-last-row" ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n                    <span id="ag-').concat(l,'-of">').concat(i,'</span>\n                    <span id="ag-').concat(l,'-row-count" ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>\n                </span>\n                <span class="ag-paging-page-summary-panel" role="presentation">\n                    <div ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="').concat(r,'"></div>\n                    <div ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="').concat(o,'"></div>\n                    <span class="ag-paging-description" role="status">\n                        <span id="ag-').concat(l,'-start-page">').concat(t,'</span>\n                        <span id="ag-').concat(l,'-start-page-number" ref="lbCurrent" class="ag-paging-number"></span>\n                        <span id="ag-').concat(l,'-of-page">').concat(i,'</span>\n                        <span id="ag-').concat(l,'-of-page-number" ref="lbTotal" class="ag-paging-number"></span>\n                    </span>\n                    <div ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="').concat(a,'"></div>\n                    <div ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="').concat(s,'"></div>\n                </span>\n            </div>')}},{key:"onBtNext",value:function(){this.nextButtonDisabled||this.paginationProxy.goToNextPage()}},{key:"onBtPrevious",value:function(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToPreviousPage()}},{key:"onBtLast",value:function(){this.lastButtonDisabled||this.paginationProxy.goToLastPage()}},{key:"enableOrDisableButtons",value:function(){var e=this.paginationProxy.getCurrentPage(),t=this.paginationProxy.isLastPageFound(),n=this.paginationProxy.getTotalPages();this.previousAndFirstButtonsDisabled=0===e,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);var i=this.isZeroPagesToDisplay(),r=e===n-1;this.nextButtonDisabled=r||i,this.lastButtonDisabled=!t||i||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}},{key:"toggleButtonDisabled",value:function(e,t){vo(e,t),e.classList.toggle("ag-disabled",t)}},{key:"updateRowLabels",value:function(){var e,t,n=this.paginationProxy.getCurrentPage(),i=this.paginationProxy.getPageSize(),r=this.paginationProxy.isLastPageFound(),o=this.paginationProxy.isLastPageFound()?this.paginationProxy.getMasterRowCount():null;if(this.isZeroPagesToDisplay()?e=t=0:(t=(e=i*n+1)+i-1,r&&t>o&&(t=o)),this.lbFirstRowOnPage.textContent=this.formatNumber(e),this.rowNodeBlockLoader.isLoading()){var a=this.localeService.getLocaleTextFunc();this.lbLastRowOnPage.innerHTML=a("pageLastRowUnknown","?")}else this.lbLastRowOnPage.textContent=this.formatNumber(t)}},{key:"isZeroPagesToDisplay",value:function(){var e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages();return e&&0===t}},{key:"setTotalLabels",value:function(){var e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages(),n=e?this.paginationProxy.getMasterRowCount():null;if(1===n){var i=this.paginationProxy.getRow(0);if(i&&i.group&&!(i.groupData||i.aggData))return void this.setTotalLabelsToZero()}if(e)this.lbTotal.textContent=this.formatNumber(t),this.lbRecordCount.textContent=this.formatNumber(n);else{var r=this.localeService.getLocaleTextFunc()("more","more");this.lbTotal.innerHTML=r,this.lbRecordCount.innerHTML=r}}},{key:"setTotalLabelsToZero",value:function(){this.lbFirstRowOnPage.textContent=this.formatNumber(0),this.lbCurrent.textContent=this.formatNumber(0),this.lbLastRowOnPage.textContent=this.formatNumber(0),this.lbTotal.textContent=this.formatNumber(0),this.lbRecordCount.textContent=this.formatNumber(0)}}]),n}(Ns);Mn([Di("paginationProxy")],jh.prototype,"paginationProxy",2),Mn([Di("rowNodeBlockLoader")],jh.prototype,"rowNodeBlockLoader",2),Mn([Ls("btFirst")],jh.prototype,"btFirst",2),Mn([Ls("btPrevious")],jh.prototype,"btPrevious",2),Mn([Ls("btNext")],jh.prototype,"btNext",2),Mn([Ls("btLast")],jh.prototype,"btLast",2),Mn([Ls("lbRecordCount")],jh.prototype,"lbRecordCount",2),Mn([Ls("lbFirstRowOnPage")],jh.prototype,"lbFirstRowOnPage",2),Mn([Ls("lbLastRowOnPage")],jh.prototype,"lbLastRowOnPage",2),Mn([Ls("lbCurrent")],jh.prototype,"lbCurrent",2),Mn([Ls("lbTotal")],jh.prototype,"lbTotal",2),Mn([Ls("pageSizeComp")],jh.prototype,"pageSizeComp",2),Mn([Ei],jh.prototype,"postConstruct",1);var Kh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.call(this,n.TEMPLATE)).inProgress=!1,e.destroyRequested=!1,e}return(0,s.Z)(n,[{key:"updateLayoutClasses",value:function(e,t){var n=this.eOverlayWrapper.classList;n.toggle("ag-layout-auto-height",t.autoHeight),n.toggle("ag-layout-normal",t.normal),n.toggle("ag-layout-print",t.print)}},{key:"postConstruct",value:function(){this.createManagedBean(new tc(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.overlayService.registerOverlayWrapperComp(this)}},{key:"setWrapperTypeClass",value:function(e){var t=this.eOverlayWrapper.classList;this.activeOverlayWrapperCssClass&&t.toggle(this.activeOverlayWrapperCssClass,!1),this.activeOverlayWrapperCssClass=e,t.toggle(e,!0)}},{key:"showOverlay",value:function(e,t,n){var i=this;this.inProgress||(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.inProgress=!0,e&&e.then((function(e){i.inProgress=!1,i.eOverlayWrapper.appendChild(e.getGui()),i.activeOverlay=e,i.updateListenerDestroyFunc=n,i.destroyRequested&&(i.destroyRequested=!1,i.destroyActiveOverlay())})),this.setDisplayed(!0,{skipAriaHidden:!0}))}},{key:"destroyActiveOverlay",value:function(){var e;this.inProgress?this.destroyRequested=!0:this.activeOverlay&&(this.activeOverlay=this.getContext().destroyBean(this.activeOverlay),null==(e=this.updateListenerDestroyFunc)||e.call(this),Ia(this.eOverlayWrapper))}},{key:"hideOverlay",value:function(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}},{key:"destroy",value:function(){this.destroyActiveOverlay(),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}}]),n}(Ns);Kh.TEMPLATE='\n        <div class="ag-overlay" role="presentation">\n            <div class="ag-overlay-panel" role="presentation">\n                <div class="ag-overlay-wrapper" ref="eOverlayWrapper" role="presentation"></div>\n            </div>\n        </div>',Mn([Di("overlayService")],Kh.prototype,"overlayService",2),Mn([Ls("eOverlayWrapper")],Kh.prototype,"eOverlayWrapper",2),Mn([Ei],Kh.prototype,"postConstruct",1);var Yh=Kh,Xh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"getFirstRow",value:function(){var e,t=0;return this.pinnedRowModel.getPinnedTopRowCount()?e="top":this.rowModel.getRowCount()?(e=null,t=this.paginationProxy.getPageFirstRow()):this.pinnedRowModel.getPinnedBottomRowCount()&&(e="bottom"),void 0===e?null:{rowIndex:t,rowPinned:e}}},{key:"getLastRow",value:function(){var e,t=null,n=this.pinnedRowModel.getPinnedBottomRowCount(),i=this.pinnedRowModel.getPinnedTopRowCount();return n?(t="bottom",e=n-1):this.rowModel.getRowCount()?(t=null,e=this.paginationProxy.getPageLastRow()):i&&(t="top",e=i-1),void 0===e?null:{rowIndex:e,rowPinned:t}}},{key:"getRowNode",value:function(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}}},{key:"sameRow",value:function(e,t){return!e&&!t||!(e&&!t||!e&&t)&&(e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned)}},{key:"before",value:function(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(Fn(t.rowPinned))return"top"!==t.rowPinned}return e.rowIndex<t.rowIndex}},{key:"rowMax",value:function(e){var t,n=this;return e.forEach((function(e){(void 0===t||n.before(t,e))&&(t=e)})),t}},{key:"rowMin",value:function(e){var t,n=this;return e.forEach((function(e){(void 0===t||n.before(e,t))&&(t=e)})),t}}]),n}(kr);Mn([Di("rowModel")],Xh.prototype,"rowModel",2),Mn([Di("pinnedRowModel")],Xh.prototype,"pinnedRowModel",2),Mn([Di("paginationProxy")],Xh.prototype,"paginationProxy",2),Xh=Mn([Ri("rowPositionUtils")],Xh);var qh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"createId",value:function(e){var t=e.rowIndex,n=e.rowPinned,i=e.column;return this.createIdFromValues({rowIndex:t,column:i,rowPinned:n})}},{key:"createIdFromValues",value:function(e){var t=e.rowIndex,n=e.rowPinned,i=e.column;return"".concat(t,".").concat(null==n?"null":n,".").concat(i.getId())}},{key:"equals",value:function(e,t){var n=e.column===t.column,i=e.rowPinned===t.rowPinned,r=e.rowIndex===t.rowIndex;return n&&i&&r}}]),n}(kr);qh=Mn([Ri("cellPositionUtils")],qh);var Qh=(0,s.Z)((function e(t){(0,a.Z)(this,e),this.cellValueChanges=t})),Jh=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r,o){var s;return(0,a.Z)(this,n),(s=t.call(this,e)).initialRange=i,s.finalRange=r,s.ranges=o,s}return(0,s.Z)(n)}(Qh),$h=function(){function e(t){(0,a.Z)(this,e),this.actionStack=[],this.maxStackSize=t||e.DEFAULT_STACK_SIZE,this.actionStack=new Array(this.maxStackSize)}return(0,s.Z)(e,[{key:"pop",value:function(){return this.actionStack.pop()}},{key:"push",value:function(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}},{key:"clear",value:function(){this.actionStack=[]}},{key:"getCurrentStackSize",value:function(){return this.actionStack.length}}]),e}();$h.DEFAULT_STACK_SIZE=10;var ep=$h,tp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).cellValueChanges=[],e.activeCellEdit=null,e.activeRowEdit=null,e.isPasting=!1,e.isRangeInAction=!1,e.onCellValueChanged=function(t){var n={column:t.column,rowIndex:t.rowIndex,rowPinned:t.rowPinned},i=null!==e.activeCellEdit&&e.cellPositionUtils.equals(e.activeCellEdit,n),r=null!==e.activeRowEdit&&e.rowPositionUtils.sameRow(e.activeRowEdit,n);if(i||r||e.isPasting||e.isRangeInAction){var o=t.rowPinned,a=t.rowIndex,s=t.column,l=t.oldValue,u=t.value,c={rowPinned:o,rowIndex:a,columnId:s.getColId(),newValue:u,oldValue:l};e.cellValueChanges.push(c)}},e.clearStacks=function(){e.undoStack.clear(),e.redoStack.clear()},e}return(0,s.Z)(n,[{key:"init",value:function(){var e=this;if(this.gridOptionsService.get("undoRedoCellEditing")){var t=this.gridOptionsService.get("undoRedoCellEditingLimit");t<=0||(this.undoStack=new ep(t),this.redoStack=new ep(t),this.addRowEditingListeners(),this.addCellEditingListeners(),this.addPasteListeners(),this.addFillListeners(),this.addCellKeyListeners(),this.addManagedListener(this.eventService,Er.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged),this.addManagedListener(this.eventService,Er.EVENT_MODEL_UPDATED,(function(t){t.keepUndoRedoStack||e.clearStacks()})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,Er.EVENT_NEW_COLUMNS_LOADED,this.clearStacks),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_GROUP_OPENED,this.clearStacks),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_ROW_GROUP_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_MOVED,this.clearStacks),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_PINNED,this.clearStacks),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_VISIBLE,this.clearStacks),this.addManagedListener(this.eventService,Er.EVENT_ROW_DRAG_END,this.clearStacks),this.ctrlsService.whenReady((function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl()})))}}},{key:"getCurrentUndoStackSize",value:function(){return this.undoStack?this.undoStack.getCurrentStackSize():0}},{key:"getCurrentRedoStackSize",value:function(){return this.redoStack?this.redoStack.getCurrentStackSize():0}},{key:"undo",value:function(e){var t={type:Er.EVENT_UNDO_STARTED,source:e};this.eventService.dispatchEvent(t);var n=this.undoRedo(this.undoStack,this.redoStack,"initialRange","oldValue","undo"),i={type:Er.EVENT_UNDO_ENDED,source:e,operationPerformed:n};this.eventService.dispatchEvent(i)}},{key:"redo",value:function(e){var t={type:Er.EVENT_REDO_STARTED,source:e};this.eventService.dispatchEvent(t);var n=this.undoRedo(this.redoStack,this.undoStack,"finalRange","newValue","redo"),i={type:Er.EVENT_REDO_ENDED,source:e,operationPerformed:n};this.eventService.dispatchEvent(i)}},{key:"undoRedo",value:function(e,t,n,i,r){if(!e)return!1;var o=e.pop();return!(!o||!o.cellValueChanges)&&(this.processAction(o,(function(e){return e[i]}),r),o instanceof Jh?this.processRange(o.ranges||[o[n]]):this.processCell(o.cellValueChanges),t.push(o),!0)}},{key:"processAction",value:function(e,t,n){var i=this;e.cellValueChanges.forEach((function(e){var r=e.rowIndex,o=e.rowPinned,a=e.columnId,s={rowIndex:r,rowPinned:o},l=i.getRowNode(s);l.displayed&&l.setDataValue(a,t(e),n)}))}},{key:"processRange",value:function(e){var t,n=this;this.rangeService.removeAllCellRanges(!0),e.forEach((function(i,r){if(i){var o=i.startRow,a=i.endRow;r===e.length-1&&(t={rowPinned:o.rowPinned,rowIndex:o.rowIndex,columnId:i.startColumn.getColId()},n.setLastFocusedCell(t));var s={rowStartIndex:o.rowIndex,rowStartPinned:o.rowPinned,rowEndIndex:a.rowIndex,rowEndPinned:a.rowPinned,columnStart:i.startColumn,columns:i.columns};n.rangeService.addCellRange(s)}}))}},{key:"processCell",value:function(e){var t=e[0],n={rowIndex:t.rowIndex,rowPinned:t.rowPinned},i=this.getRowNode(n),r={rowPinned:t.rowPinned,rowIndex:i.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r,!!this.rangeService)}},{key:"setLastFocusedCell",value:function(e,t){var n=e.rowIndex,i=e.columnId,r=e.rowPinned,o=this.gridBodyCtrl.getScrollFeature(),a=this.columnModel.getGridColumn(i);if(a){o.ensureIndexVisible(n),o.ensureColumnVisible(a);var s={rowIndex:n,column:a,rowPinned:r};this.focusService.setFocusedCell(On(Tn({},s),{forceBrowserFocus:!0})),t&&this.rangeService.setRangeToCell(s)}}},{key:"addRowEditingListeners",value:function(){var e=this;this.addManagedListener(this.eventService,Er.EVENT_ROW_EDITING_STARTED,(function(t){e.activeRowEdit={rowIndex:t.rowIndex,rowPinned:t.rowPinned}})),this.addManagedListener(this.eventService,Er.EVENT_ROW_EDITING_STOPPED,(function(){var t=new Qh(e.cellValueChanges);e.pushActionsToUndoStack(t),e.activeRowEdit=null}))}},{key:"addCellEditingListeners",value:function(){var e=this;this.addManagedListener(this.eventService,Er.EVENT_CELL_EDITING_STARTED,(function(t){e.activeCellEdit={column:t.column,rowIndex:t.rowIndex,rowPinned:t.rowPinned}})),this.addManagedListener(this.eventService,Er.EVENT_CELL_EDITING_STOPPED,(function(t){if(e.activeCellEdit=null,t.valueChanged&&!e.activeRowEdit&&!e.isPasting&&!e.isRangeInAction){var n=new Qh(e.cellValueChanges);e.pushActionsToUndoStack(n)}}))}},{key:"addPasteListeners",value:function(){var e=this;this.addManagedListener(this.eventService,Er.EVENT_PASTE_START,(function(){e.isPasting=!0})),this.addManagedListener(this.eventService,Er.EVENT_PASTE_END,(function(){var t=new Qh(e.cellValueChanges);e.pushActionsToUndoStack(t),e.isPasting=!1}))}},{key:"addFillListeners",value:function(){var e=this;this.addManagedListener(this.eventService,Er.EVENT_FILL_START,(function(){e.isRangeInAction=!0})),this.addManagedListener(this.eventService,Er.EVENT_FILL_END,(function(t){var n=new Jh(e.cellValueChanges,t.initialRange,t.finalRange);e.pushActionsToUndoStack(n),e.isRangeInAction=!1}))}},{key:"addCellKeyListeners",value:function(){var e=this;this.addManagedListener(this.eventService,Er.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,(function(){e.isRangeInAction=!0})),this.addManagedListener(this.eventService,Er.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,(function(){var t;t=e.rangeService&&e.gridOptionsService.get("enableRangeSelection")?new Jh(e.cellValueChanges,void 0,void 0,(0,o.Z)(e.rangeService.getCellRanges())):new Qh(e.cellValueChanges),e.pushActionsToUndoStack(t),e.isRangeInAction=!1}))}},{key:"pushActionsToUndoStack",value:function(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},{key:"getRowNode",value:function(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}}}]),n}(kr);Mn([Di("focusService")],tp.prototype,"focusService",2),Mn([Di("ctrlsService")],tp.prototype,"ctrlsService",2),Mn([Di("rowModel")],tp.prototype,"rowModel",2),Mn([Di("pinnedRowModel")],tp.prototype,"pinnedRowModel",2),Mn([Di("cellPositionUtils")],tp.prototype,"cellPositionUtils",2),Mn([Di("rowPositionUtils")],tp.prototype,"rowPositionUtils",2),Mn([Di("columnModel")],tp.prototype,"columnModel",2),Mn([Ti("rangeService")],tp.prototype,"rangeService",2),Mn([Ei],tp.prototype,"init",1),tp=Mn([Ri("undoRedoService")],tp);var np=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"findHeader",value:function(e,t){var n,i,r;if(e.column instanceof br?(i="getDisplayedGroup".concat(t),n=this.columnModel[i](e.column)):(r="getDisplayedCol".concat(t),n=this.columnModel[r](e.column)),n){var o=e.headerRowIndex;if("filter"!==this.getHeaderRowType(o)){for(var a=[n];n.getParent();)n=n.getParent(),a.push(n);n=a[a.length-1-o]}var s=this.getHeaderIndexToFocus(n,o);return{column:s.column,headerRowIndex:s.headerRowIndex}}}},{key:"getHeaderIndexToFocus",value:function(e,t){var n;if(e instanceof br&&this.isAnyChildSpanningHeaderHeight(e)&&e.isPadding())for(var i=e,r=n=i.getLeafColumns()[0];r!==i;)t++,r=r.getParent();return{column:n||e,headerRowIndex:t}}},{key:"isAnyChildSpanningHeaderHeight",value:function(e){return!!e&&e.getLeafColumns().some((function(e){return e.isSpanHeaderHeight()}))}},{key:"getColumnVisibleParent",value:function(e,t){var n=this.getHeaderRowType(t),i="column"===n,r="filter"===n?e:e.getParent(),o=t-1,a=o;if(i&&this.isAnyChildSpanningHeaderHeight(e.getParent())){for(;r&&r.isPadding();)r=r.getParent(),o--;a=o,o<0&&(r=e,o=t,a=void 0)}return{column:r,headerRowIndex:o,headerRowIndexWithoutSpan:a}}},{key:"getColumnVisibleChild",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"After",i=this.getHeaderRowType(t),r=e,o=t+1,a=o;if("group"===i){for(var s=e.getDisplayedLeafColumns(),l="After"===n?s[0]:Ui(s),u=[],c=l;c.getParent()!==e;)c=c.getParent(),u.push(c);if(r=l,l.isSpanHeaderHeight())for(var d=u.length-1;d>=0;d--){var h=u[d];if(!h.isPadding()){r=h;break}o++}else(r=Ui(u))||(r=l)}return{column:r,headerRowIndex:o,headerRowIndexWithoutSpan:a}}},{key:"getHeaderRowType",value:function(e){var t=this.ctrlsService.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}},{key:"findColAtEdgeForHeaderRow",value:function(e,t){var n=this.columnModel.getAllDisplayedColumns(),i=n["start"===t?0:n.length-1];if(i){var r=this.ctrlsService.getHeaderRowContainerCtrl(i.getPinned()).getRowType(e);return"group"==r?{headerRowIndex:e,column:this.columnModel.getColumnGroupAtLevel(i,e)}:{headerRowIndex:null==r?-1:e,column:i}}}}]),n}(kr);Mn([Di("columnModel")],np.prototype,"columnModel",2),Mn([Di("ctrlsService")],np.prototype,"ctrlsService",2),np=Mn([Ri("headerPositionUtils")],np);var ip=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"buildColumnDefs",value:function(e,t,n){var i=this,r=[],o={};return e.forEach((function(e){for(var a=!0,s=i.createDefFromColumn(e,t,n),l=e.getOriginalParent(),u=null;l;){var c=null;if(l.isPadding())l=l.getOriginalParent();else{var d=o[l.getGroupId()];if(d){d.children.push(s),a=!1;break}if((c=i.createDefFromGroup(l))&&(c.children=[s],o[c.groupId]=c,s=c,l=l.getOriginalParent()),null!=l&&u===l){a=!1;break}u=l}}a&&r.push(s)})),r}},{key:"createDefFromGroup",value:function(e){var t=qn(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}},{key:"createDefFromColumn",value:function(e,t,n){var i=qn(e.getColDef());return i.colId=e.getColId(),i.width=e.getActualWidth(),i.rowGroup=e.isRowGroupActive(),i.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,i.pivot=e.isPivotActive(),i.pivotIndex=e.isPivotActive()?n.indexOf(e):null,i.aggFunc=e.isValueActive()?e.getAggFunc():null,i.hide=!e.isVisible()||void 0,i.pinned=e.isPinned()?e.getPinned():null,i.sort=e.getSort()?e.getSort():null,i.sortIndex=null!=e.getSortIndex()?e.getSortIndex():null,i}}]),e}();ip=Mn([Ri("columnDefFactory")],ip);var rp=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"getInitialRowClasses",value:function(e){var t=[];return Fn(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"),or(t,this.processClassesFromGridOptions(e.rowNode)),or(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}},{key:"processClassesFromGridOptions",value:function(e){var t=[],n=function(e){"string"===typeof e?t.push(e):Array.isArray(e)&&e.forEach((function(e){return t.push(e)}))},i=this.gridOptionsService.get("rowClass");if(i){if("function"===typeof i)return console.warn("AG Grid: rowClass should not be a function, please use getRowClass instead"),[];n(i)}var r=this.gridOptionsService.getCallback("getRowClass");r&&n(r({data:e.data,node:e,rowIndex:e.rowIndex}));return t}},{key:"preProcessRowClassRules",value:function(e){var t=[];return this.processRowClassRules(e,(function(e){t.push(e)}),(function(e){})),t}},{key:"processRowClassRules",value:function(e,t,n){var i=this.gridOptionsService.addGridCommonParams({data:e.data,node:e,rowIndex:e.rowIndex});this.stylingService.processClassRules(void 0,this.gridOptionsService.get("rowClassRules"),i,t,n)}},{key:"calculateRowLevel",value:function(e){return e.group?e.level:e.parent?e.parent.level+1:0}}]),e}();Mn([Di("stylingService")],rp.prototype,"stylingService",2),Mn([Di("gridOptionsService")],rp.prototype,"gridOptionsService",2),rp=Mn([Ri("rowCssClassCalculator")],rp);var op=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"init",value:function(){var e=this;this.isAccentedSort=this.gridOptionsService.get("accentedSort"),this.primaryColumnsSortGroups=this.gridOptionsService.isColumnsSortingCoupledToGroup(),this.addManagedPropertyListener("accentedSort",(function(t){return e.isAccentedSort=t.currentValue})),this.addManagedPropertyListener("autoGroupColumnDef",(function(){return e.primaryColumnsSortGroups=e.gridOptionsService.isColumnsSortingCoupledToGroup()}))}},{key:"doFullSort",value:function(e,t){var n=e.map((function(e,t){return{currentPos:t,rowNode:e}}));return n.sort(this.compareRowNodes.bind(this,t)),n.map((function(e){return e.rowNode}))}},{key:"compareRowNodes",value:function(e,t,n){for(var i=t.rowNode,r=n.rowNode,o=0,a=e.length;o<a;o++){var s=e[o],l="desc"===s.sort,u=this.getValue(i,s.column),c=this.getValue(r,s.column),d=void 0,h=this.getComparator(s,i);if(d=h?h(u,c,i,r,l):Es.defaultComparator(u,c,this.isAccentedSort),!isNaN(d)&&0!==d)return"asc"===s.sort?d:-1*d}return t.currentPos-n.currentPos}},{key:"getComparator",value:function(e,t){var n=e.column,i=n.getColDef().comparator;if(null!=i)return i;if(n.getColDef().showRowGroup){var r=!t.group&&n.getColDef().field;if(r){var o=this.columnModel.getPrimaryColumn(r);if(o)return o.getColDef().comparator}}}},{key:"getValue",value:function(e,t){var n,i;if(!this.primaryColumnsSortGroups)return this.valueService.getValue(t,e,!1,!1);if(e.rowGroupColumn===t){if(this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotActive())){var r=null==(n=e.allLeafChildren)?void 0:n[0];return r?this.valueService.getValue(t,r,!1,!1):void 0}var o=this.columnModel.getGroupDisplayColumnForGroup(t.getId());if(!o)return;return null==(i=e.groupData)?void 0:i[o.getId()]}return e.group&&t.getColDef().showRowGroup?void 0:this.valueService.getValue(t,e,!1,!1)}}]),n}(kr);Mn([Di("valueService")],op.prototype,"valueService",2),Mn([Di("columnModel")],op.prototype,"columnModel",2),Mn([Ei],op.prototype,"init",1),op=Mn([Ri("rowNodeSorter")],op);var ap=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).ready=!1,e.readyCallbacks=[],e}return(0,s.Z)(n,[{key:"checkReady",value:function(){if(this.ready=null!=this.gridCtrl&&null!=this.gridBodyCtrl&&null!=this.centerRowContainerCtrl&&null!=this.leftRowContainerCtrl&&null!=this.rightRowContainerCtrl&&null!=this.bottomCenterRowContainerCtrl&&null!=this.bottomLeftRowContainerCtrl&&null!=this.bottomRightRowContainerCtrl&&null!=this.topCenterRowContainerCtrl&&null!=this.topLeftRowContainerCtrl&&null!=this.topRightRowContainerCtrl&&null!=this.stickyTopCenterRowContainerCtrl&&null!=this.stickyTopLeftRowContainerCtrl&&null!=this.stickyTopRightRowContainerCtrl&&null!=this.centerHeaderRowContainerCtrl&&null!=this.leftHeaderRowContainerCtrl&&null!=this.rightHeaderRowContainerCtrl&&null!=this.fakeHScrollComp&&null!=this.fakeVScrollComp&&null!=this.gridHeaderCtrl,this.ready){var e=this.createReadyParams();this.readyCallbacks.forEach((function(t){return t(e)})),this.readyCallbacks.length=0}}},{key:"whenReady",value:function(e){this.ready?e(this.createReadyParams()):this.readyCallbacks.push(e)}},{key:"createReadyParams",value:function(){return{centerRowContainerCtrl:this.centerRowContainerCtrl,leftRowContainerCtrl:this.leftRowContainerCtrl,rightRowContainerCtrl:this.rightRowContainerCtrl,bottomCenterRowContainerCtrl:this.bottomCenterRowContainerCtrl,bottomLeftRowContainerCtrl:this.bottomLeftRowContainerCtrl,bottomRightRowContainerCtrl:this.bottomRightRowContainerCtrl,topCenterRowContainerCtrl:this.topCenterRowContainerCtrl,topLeftRowContainerCtrl:this.topLeftRowContainerCtrl,topRightRowContainerCtrl:this.topRightRowContainerCtrl,stickyTopCenterRowContainerCtrl:this.stickyTopCenterRowContainerCtrl,stickyTopLeftRowContainerCtrl:this.stickyTopLeftRowContainerCtrl,stickyTopRightRowContainerCtrl:this.stickyTopRightRowContainerCtrl,centerHeaderRowContainerCtrl:this.centerHeaderRowContainerCtrl,leftHeaderRowContainerCtrl:this.leftHeaderRowContainerCtrl,rightHeaderRowContainerCtrl:this.rightHeaderRowContainerCtrl,fakeHScrollComp:this.fakeHScrollComp,fakeVScrollComp:this.fakeVScrollComp,gridBodyCtrl:this.gridBodyCtrl,gridCtrl:this.gridCtrl,gridHeaderCtrl:this.gridHeaderCtrl}}},{key:"registerFakeHScrollComp",value:function(e){this.fakeHScrollComp=e,this.checkReady()}},{key:"registerFakeVScrollComp",value:function(e){this.fakeVScrollComp=e,this.checkReady()}},{key:"registerGridHeaderCtrl",value:function(e){this.gridHeaderCtrl=e,this.checkReady()}},{key:"registerCenterRowContainerCtrl",value:function(e){this.centerRowContainerCtrl=e,this.checkReady()}},{key:"registerLeftRowContainerCtrl",value:function(e){this.leftRowContainerCtrl=e,this.checkReady()}},{key:"registerRightRowContainerCtrl",value:function(e){this.rightRowContainerCtrl=e,this.checkReady()}},{key:"registerTopCenterRowContainerCtrl",value:function(e){this.topCenterRowContainerCtrl=e,this.checkReady()}},{key:"registerTopLeftRowContainerCon",value:function(e){this.topLeftRowContainerCtrl=e,this.checkReady()}},{key:"registerTopRightRowContainerCtrl",value:function(e){this.topRightRowContainerCtrl=e,this.checkReady()}},{key:"registerStickyTopCenterRowContainerCtrl",value:function(e){this.stickyTopCenterRowContainerCtrl=e,this.checkReady()}},{key:"registerStickyTopLeftRowContainerCon",value:function(e){this.stickyTopLeftRowContainerCtrl=e,this.checkReady()}},{key:"registerStickyTopRightRowContainerCtrl",value:function(e){this.stickyTopRightRowContainerCtrl=e,this.checkReady()}},{key:"registerBottomCenterRowContainerCtrl",value:function(e){this.bottomCenterRowContainerCtrl=e,this.checkReady()}},{key:"registerBottomLeftRowContainerCtrl",value:function(e){this.bottomLeftRowContainerCtrl=e,this.checkReady()}},{key:"registerBottomRightRowContainerCtrl",value:function(e){this.bottomRightRowContainerCtrl=e,this.checkReady()}},{key:"registerHeaderContainer",value:function(e,t){switch(t){case"left":this.leftHeaderRowContainerCtrl=e;break;case"right":this.rightHeaderRowContainerCtrl=e;break;default:this.centerHeaderRowContainerCtrl=e}this.checkReady()}},{key:"registerGridBodyCtrl",value:function(e){this.gridBodyCtrl=e,this.checkReady()}},{key:"registerGridCtrl",value:function(e){this.gridCtrl=e,this.checkReady()}},{key:"getFakeHScrollComp",value:function(){return this.fakeHScrollComp}},{key:"getFakeVScrollComp",value:function(){return this.fakeVScrollComp}},{key:"getGridHeaderCtrl",value:function(){return this.gridHeaderCtrl}},{key:"getGridCtrl",value:function(){return this.gridCtrl}},{key:"getCenterRowContainerCtrl",value:function(){return this.centerRowContainerCtrl}},{key:"getTopCenterRowContainerCtrl",value:function(){return this.topCenterRowContainerCtrl}},{key:"getBottomCenterRowContainerCtrl",value:function(){return this.bottomCenterRowContainerCtrl}},{key:"getStickyTopCenterRowContainerCtrl",value:function(){return this.stickyTopCenterRowContainerCtrl}},{key:"getGridBodyCtrl",value:function(){return this.gridBodyCtrl}},{key:"getHeaderRowContainerCtrls",value:function(){return[this.leftHeaderRowContainerCtrl,this.rightHeaderRowContainerCtrl,this.centerHeaderRowContainerCtrl]}},{key:"getHeaderRowContainerCtrl",value:function(e){switch(e){case"left":return this.leftHeaderRowContainerCtrl;case"right":return this.rightHeaderRowContainerCtrl;default:return this.centerHeaderRowContainerCtrl}}}]),n}(kr);ap.NAME="ctrlsService",ap=Mn([Ri(ap.NAME)],ap);var sp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).registry={},e}return(0,s.Z)(n,[{key:"register",value:function(e){this.registry[e.controllerName]=e.controllerClass}},{key:"getInstance",value:function(e){var t=this.registry[e];if(null!=t)return new t}}]),n}(kr);sp=Mn([Ri("ctrlsFactory")],sp);var lp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i){var r;return(0,a.Z)(this,n),(r=t.call(this,e)).direction=i,r.hideTimeout=null,r}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.addManagedListener(this.eventService,Er.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",Ko()||Yo())}},{key:"initialiseInvisibleScrollbar",value:function(){void 0===this.invisibleScrollbar&&(this.invisibleScrollbar=na(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}},{key:"addActiveListenerToggles",value:function(){var e=this,t=this.getGui();["mouseenter","mousedown","touchstart"].forEach((function(n){return e.addManagedListener(t,n,(function(){return e.addOrRemoveCssClass("ag-scrollbar-active",!0)}))})),["mouseleave","touchend"].forEach((function(n){return e.addManagedListener(t,n,(function(){return e.addOrRemoveCssClass("ag-scrollbar-active",!1)}))}))}},{key:"onScrollVisibilityChanged",value:function(){var e=this;void 0===this.invisibleScrollbar&&this.initialiseInvisibleScrollbar(),this.animationFrameService.requestAnimationFrame((function(){return e.setScrollVisible()}))}},{key:"hideAndShowInvisibleScrollAsNeeded",value:function(){var e=this;this.addManagedListener(this.eventService,Er.EVENT_BODY_SCROLL,(function(t){t.direction===e.direction&&(null!==e.hideTimeout&&(window.clearTimeout(e.hideTimeout),e.hideTimeout=null),e.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))})),this.addManagedListener(this.eventService,Er.EVENT_BODY_SCROLL_END,(function(){e.hideTimeout=window.setTimeout((function(){e.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),e.hideTimeout=null}),400)}))}},{key:"attemptSettingScrollPosition",value:function(e){var t=this,n=this.getViewport();gi((function(){return Ga(n)}),(function(){return t.setScrollPosition(e)}),100)}},{key:"getViewport",value:function(){return this.eViewport}},{key:"getContainer",value:function(){return this.eContainer}},{key:"onScrollCallback",value:function(e){this.addManagedListener(this.getViewport(),"scroll",e)}}]),n}(Ns);Mn([Ls("eViewport")],lp.prototype,"eViewport",2),Mn([Ls("eContainer")],lp.prototype,"eContainer",2),Mn([Di("scrollVisibleService")],lp.prototype,"scrollVisibleService",2),Mn([Di("ctrlsService")],lp.prototype,"ctrlsService",2),Mn([Di("animationFrameService")],lp.prototype,"animationFrameService",2);var up=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,n.TEMPLATE,"horizontal")}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;(0,mn.Z)((0,yn.Z)(n.prototype),"postConstruct",this).call(this);var t=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_CHANGED,t),this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,t),this.addManagedListener(this.eventService,Er.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedPropertyListener("domLayout",t),this.ctrlsService.registerFakeHScrollComp(this),this.createManagedBean(new Dc((function(t){return e.eContainer.style.width="".concat(t,"px")}))),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}},{key:"initialiseInvisibleScrollbar",value:function(){void 0===this.invisibleScrollbar&&(this.enableRtl=this.gridOptionsService.get("enableRtl"),(0,mn.Z)((0,yn.Z)(n.prototype),"initialiseInvisibleScrollbar",this).call(this),this.invisibleScrollbar&&this.refreshCompBottom())}},{key:"onPinnedRowDataChanged",value:function(){this.refreshCompBottom()}},{key:"refreshCompBottom",value:function(){if(this.invisibleScrollbar){var e=this.pinnedRowModel.getPinnedBottomTotalHeight();this.getGui().style.bottom="".concat(e,"px")}}},{key:"onScrollVisibilityChanged",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"onScrollVisibilityChanged",this).call(this),this.setFakeHScrollSpacerWidths()}},{key:"setFakeHScrollSpacerWidths",value:function(){var e=this.scrollVisibleService.isVerticalScrollShowing(),t=this.columnModel.getDisplayedColumnsRightWidth(),n=!this.enableRtl&&e,i=this.gridOptionsService.getScrollbarWidth();n&&(t+=i),Ka(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);var r=this.columnModel.getDisplayedColumnsLeftWidth();this.enableRtl&&e&&(r+=i),Ka(this.eLeftSpacer,r),this.eLeftSpacer.classList.toggle("ag-scroller-corner",r<=i)}},{key:"setScrollVisible",value:function(){var e=this.scrollVisibleService.isHorizontalScrollShowing(),t=this.invisibleScrollbar,n=this.gridOptionsService.get("suppressHorizontalScroll"),i=e&&this.gridOptionsService.getScrollbarWidth()||0,r=n?0:0===i&&t?16:i;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),Xa(this.getGui(),r),Xa(this.eViewport,r),Xa(this.eContainer,r),this.setDisplayed(e,{skipAriaHidden:!0})}},{key:"getScrollPosition",value:function(){return Na(this.getViewport(),this.enableRtl)}},{key:"setScrollPosition",value:function(e){Ga(this.getViewport())||this.attemptSettingScrollPosition(e),La(this.getViewport(),e,this.enableRtl)}}]),n}(lp);up.TEMPLATE='<div class="ag-body-horizontal-scroll" aria-hidden="true">\n            <div class="ag-horizontal-left-spacer" ref="eLeftSpacer"></div>\n            <div class="ag-body-horizontal-scroll-viewport" ref="eViewport">\n                <div class="ag-body-horizontal-scroll-container" ref="eContainer"></div>\n            </div>\n            <div class="ag-horizontal-right-spacer" ref="eRightSpacer"></div>\n        </div>',Mn([Ls("eLeftSpacer")],up.prototype,"eLeftSpacer",2),Mn([Ls("eRightSpacer")],up.prototype,"eRightSpacer",2),Mn([Di("columnModel")],up.prototype,"columnModel",2),Mn([Di("pinnedRowModel")],up.prototype,"pinnedRowModel",2),Mn([Ei],up.prototype,"postConstruct",1);var cp=up,dp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this.checkContainerWidths.bind(this);this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,Er.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedPropertyListener("domLayout",e)}},{key:"checkContainerWidths",value:function(){var e=this.gridOptionsService.isDomLayout("print"),t=e?0:this.columnModel.getDisplayedColumnsLeftWidth(),n=e?0:this.columnModel.getDisplayedColumnsRightWidth();t!=this.leftWidth&&(this.leftWidth=t,this.eventService.dispatchEvent({type:Er.EVENT_LEFT_PINNED_WIDTH_CHANGED})),n!=this.rightWidth&&(this.rightWidth=n,this.eventService.dispatchEvent({type:Er.EVENT_RIGHT_PINNED_WIDTH_CHANGED}))}},{key:"getPinnedRightWidth",value:function(){return this.rightWidth}},{key:"getPinnedLeftWidth",value:function(){return this.leftWidth}}]),n}(kr);Mn([Di("columnModel")],dp.prototype,"columnModel",2),Mn([Ei],dp.prototype,"postConstruct",1),dp=Mn([Ri("pinnedWidthService")],dp);var hp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).events=[],e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){"clientSide"==this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel)}},{key:"dispatchExpanded",value:function(e){var t=this;if(null!=this.clientSideRowModel){this.events.push(e);null==this.dispatchExpandedDebounced&&(this.dispatchExpandedDebounced=this.animationFrameService.debounce((function(){t.clientSideRowModel&&t.clientSideRowModel.onRowGroupOpened(),t.events.forEach((function(e){return t.eventService.dispatchEvent(e)})),t.events=[]}))),this.dispatchExpandedDebounced()}else this.eventService.dispatchEvent(e)}}]),n}(kr);Mn([Di("animationFrameService")],hp.prototype,"animationFrameService",2),Mn([Di("rowModel")],hp.prototype,"rowModel",2),Mn([Ei],hp.prototype,"postConstruct",1),hp=Mn([Ri("rowNodeEventThrottle")],hp);var pp=function(e,t){var n;return"clientSide"===(null!=(n=t.rowModelType)?n:"clientSide")?{module:"@ag-grid-enterprise/row-grouping"}:null},fp={enableRowGroup:pp,rowGroup:pp,rowGroupIndex:pp,enablePivot:pp,enableValue:pp,pivot:pp,pivotIndex:pp,aggFunc:pp,cellEditor:function(e){return"agRichSelect"===e.cellEditor||"agRichSelectCellEditor"===e.cellEditor?{module:"@ag-grid-enterprise/rich-select"}:null},menuTabs:function(e){var t,n=["columnsMenuTab","generalMenuTab"];return(null==(t=e.menuTabs)?void 0:t.some((function(e){return n.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"],dependencies:function(e,t){return"multiple"===t.rowSelection?null:"headerCheckboxSelection is only supported with rowSelection=multiple"}},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],dependencies:function(e,t){return"multiple"===t.rowSelection?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"}},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],dependencies:function(e,t){return"multiple"===t.rowSelection?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"}},children:function(){return vp}},vp={objectName:"colDef",allProperties:Bu.ALL_PROPERTIES,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"},dndSource:{version:"31.2",message:"This feature has been replaced by `Row Dragging to an External DropZone`."},dndSourceOnRowDrag:{version:"31.2",message:"This feature has been replaced by `Row Dragging to an External DropZone`."}},validations:fp},gp={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!1,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,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!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,suppressChartToolPanelsButton:!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,functionsPassive:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,pivotMaxGeneratedColumns:-1},mp={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",dependencies:function(e){var t,n=null!=(t=e.rowModelType)?t:"clientSide";switch(n){case"clientSide":var i="treeData requires 'getDataPath' in the ".concat(n," row model.");return e.getDataPath?null:i;case"serverSide":var r="treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ".concat(n," row model.");return e.isServerSideGroup&&e.getServerSideGroupKey?null:r}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"],dependencies:function(e){var t;switch(null!=(t=e.rowModelType)?t:"clientSide"){case"clientSide":return null;case"serverSide":return e.suppressServerSideInfiniteScroll?"groupIncludeFooter is not supported alongside suppressServerSideInfiniteScroll":null}return null}},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"]}},suppressParentsInRowNodes:{dependencies:{groupSelectsChildren:[void 0,!1]}},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"},columnDefs:function(){return vp},defaultColDef:function(){return vp},defaultColGroupDef:function(){return vp},autoGroupColumnDef:function(){return vp}},yp={objectName:"gridOptions",allProperties:[].concat((0,o.Z)(Kr.ALL_PROPERTIES),(0,o.Z)(Xr.EVENT_CALLBACKS)),propertyExceptions:["api","columnApi"],docsUrl:"grid-options/",deprecations:{enableChartToolPanelsButton:{version:"29"},functionsPassive:{version:"29.2"},onColumnRowGroupChangeRequest:{version:"29.2"},onColumnPivotChangeRequest:{version:"29.2"},onColumnValueChangeRequest:{version:"29.2"},onColumnAggFuncChangeRequest:{version:"29.2"},serverSideFilterAllLevels:{version:"30",message:"All server-side group levels are now filtered by default. This can be toggled using `serverSideOnlyRefreshFilteredGroups`."},suppressAggAtRootLevel:{version:"30",message:"The root level aggregation is now suppressed by default. This can be toggled using  `alwaysAggregateAtRootLevel`."},excludeHiddenColumnsFromQuickFilter:{version:"30",message:"Hidden columns are now excluded from the Quick Filter by default. This can be toggled using `includeHiddenColumnsInQuickFilter`."},enterMovesDown:{version:"30",renamed:"enterNavigatesVertically"},enterMovesDownAfterEdit:{version:"30",renamed:"enterNavigatesVerticallyAfterEdit"},suppressParentsInRowNodes:{version:"30.2",message:"Using suppressParentsInRowNodes is no longer recommended. To serialize nodes it is now recommended to instead remove the parent node reference before serialization."},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."}},validations:mp},Cp=function(){function e(){var t=this;(0,a.Z)(this,e),this.destroyed=!1,this.domDataKey="__AG_"+Math.random().toString(),this.propertyEventService=new Mi,this.globalEventHandlerFactory=function(e){return function(n,i){if(!t.destroyed){var r=xr.has(n);if(!(r&&!e||!r&&e)){var o=Xr.getCallbackForEvent(n),a=t.gridOptions[o];"function"===typeof a&&t.frameworkOverrides.wrapOutgoing((function(){a(i)}))}}}}}return(0,s.Z)(e,[{key:"context",get:function(){return this.gridOptions.context}},{key:"init",value:function(){this.columnApi=new Eh(this.api);var 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.getScrollbarWidth()}},{key:"destroy",value:function(){this.destroyed=!0,this.columnApi=void 0}},{key:"get",value:function(e){var t;return null!=(t=this.gridOptions[e])?t:gp[e]}},{key:"getCallback",value:function(e){return this.mergeGridCommonParams(this.gridOptions[e])}},{key:"exists",value:function(e){return Fn(this.gridOptions[e])}},{key:"mergeGridCommonParams",value:function(e){var t=this;if(e){return function(n){var i=n;return i.api=t.api,i.columnApi=t.columnApi,i.context=t.context,e(i)}}return e}},{key:"updateGridOptions",value:function(e){var t=this,n=e.options,i=e.source,o=void 0===i?"api":i,a={id:Cp.changeSetId++,properties:[]},s=[];Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),i=n[0],l=n[1];"api"===o&&Ur[i]&&oi("".concat(i," is an initial property and cannot be updated."));var u=Cp.getCoercedValue(i,l),c="object"===typeof u&&"api"===o,d=t.gridOptions[i];if(c||d!==u){t.gridOptions[i]=u;var h={type:i,currentValue:u,previousValue:d,changeSet:a,source:o};s.push(h)}})),this.validationService.processGridOptions(this.gridOptions),a.properties=s.map((function(e){return e.type})),s.forEach((function(e){t.gridOptions.debug&&console.log("AG Grid: Updated property ".concat(e.type," from "),e.previousValue," to  ",e.currentValue),t.propertyEventService.dispatchEvent(e)}))}},{key:"addEventListener",value:function(e,t){this.propertyEventService.addEventListener(e,t)}},{key:"removeEventListener",value:function(e,t){this.propertyEventService.removeEventListener(e,t)}},{key:"getScrollbarWidth",value:function(){if(null==this.scrollbarWidth){var e="number"===typeof this.gridOptions.scrollbarWidth&&this.gridOptions.scrollbarWidth>=0?this.gridOptions.scrollbarWidth:ea();null!=e&&(this.scrollbarWidth=e,this.eventService.dispatchEvent({type:Er.EVENT_SCROLLBAR_WIDTH_CHANGED}))}return this.scrollbarWidth}},{key:"isRowModelType",value:function(e){return this.gridOptions.rowModelType===e||"clientSide"===e&&_n(this.gridOptions.rowModelType)}},{key:"isDomLayout",value:function(e){var t;return(null!=(t=this.gridOptions.domLayout)?t:"normal")===e}},{key:"isRowSelection",value:function(){return"single"===this.gridOptions.rowSelection||"multiple"===this.gridOptions.rowSelection}},{key:"useAsyncEvents",value:function(){return!this.get("suppressAsyncEvents")}},{key:"isGetRowHeightFunction",value:function(){return"function"===typeof this.gridOptions.getRowHeight}},{key:"getRowHeightForNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;if(null==n&&(n=this.environment.getDefaultRowHeight()),this.isGetRowHeightFunction()){if(t)return{height:n,estimated:!0};var i={node:e,data:e.data},r=this.getCallback("getRowHeight")(i);if(this.isNumeric(r))return 0===r&&oi("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(e.detail&&this.get("masterDetail"))return this.getMasterDetailRowHeight();var o=this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:n;return{height:o,estimated:!1}}},{key:"getMasterDetailRowHeight",value:function(){return this.get("detailRowAutoHeight")?{height:1,estimated:!1}:this.isNumeric(this.gridOptions.detailRowHeight)?{height:this.gridOptions.detailRowHeight,estimated:!1}:{height:300,estimated:!1}}},{key:"getRowHeightAsNumber",value:function(){if(!this.gridOptions.rowHeight||_n(this.gridOptions.rowHeight))return this.environment.getDefaultRowHeight();var e=this.environment.refreshRowHeightVariable();return-1!==e?e:(console.warn("AG Grid row height must be a number if not using standard row model"),this.environment.getDefaultRowHeight())}},{key:"isNumeric",value:function(e){return!isNaN(e)&&"number"===typeof e&&isFinite(e)}},{key:"getDomDataKey",value:function(){return this.domDataKey}},{key:"getDomData",value:function(e,t){var n=e[this.getDomDataKey()];return n?n[t]:void 0}},{key:"setDomData",value:function(e,t,n){var i=this.getDomDataKey(),r=e[i];_n(r)&&(r={},e[i]=r),r[t]=n}},{key:"getDocument",value:function(){var e=null;return this.gridOptions.getDocument&&Fn(this.gridOptions.getDocument)?e=this.gridOptions.getDocument():this.eGridDiv&&(e=this.eGridDiv.ownerDocument),e&&Fn(e)?e:document}},{key:"getWindow",value:function(){return this.getDocument().defaultView||window}},{key:"getRootNode",value:function(){return this.eGridDiv.getRootNode()}},{key:"getAsyncTransactionWaitMillis",value:function(){return Fn(this.gridOptions.asyncTransactionWaitMillis)?this.gridOptions.asyncTransactionWaitMillis:50}},{key:"isAnimateRows",value:function(){return!this.get("ensureDomOrder")&&this.get("animateRows")}},{key:"isGroupRowsSticky",value:function(){return!(this.get("suppressGroupRowsSticky")||this.get("paginateChildRows")||this.get("groupHideOpenParents")||this.isDomLayout("print"))}},{key:"isColumnsSortingCoupledToGroup",value:function(){var e=this.gridOptions.autoGroupColumnDef;return!(null==e?void 0:e.comparator)&&!this.get("treeData")}},{key:"getGroupAggFiltering",value:function(){var e=this.gridOptions.groupAggFiltering;return"function"===typeof e?this.getCallback("groupAggFiltering"):!0===e?function(){return!0}:void 0}},{key:"isGroupIncludeFooterTrueOrCallback",value:function(){var e=this.gridOptions.groupIncludeFooter;return!0===e||"function"===typeof e}},{key:"getGroupIncludeFooter",value:function(){var e=this.gridOptions.groupIncludeFooter;return"function"===typeof e?this.getCallback("groupIncludeFooter"):!0===e?function(){return!0}:function(){return!1}}},{key:"isGroupMultiAutoColumn",value:function(){return this.gridOptions.groupDisplayType?"multipleColumns"===this.gridOptions.groupDisplayType:this.get("groupHideOpenParents")}},{key:"isGroupUseEntireRow",value:function(e){return!e&&"groupRows"===this.gridOptions.groupDisplayType}},{key:"getGridCommonParams",value:function(){return{api:this.api,columnApi:this.columnApi,context:this.context}}},{key:"addGridCommonParams",value:function(e){var t=e;return t.api=this.api,t.columnApi=this.columnApi,t.context=this.context,t}}],[{key:"toBoolean",value:function(e){return"boolean"===typeof e?e:"string"===typeof e&&("TRUE"===e.toUpperCase()||""==e)}},{key:"toNumber",value:function(e){if("number"===typeof e)return e;if("string"===typeof e){var t=parseInt(e);if(isNaN(t))return;return t}}},{key:"toConstrainedNum",value:function(e,t){return function(n){var i=Cp.toNumber(n);if(!(null==i||i<e||i>t))return i}}},{key:"getCoercedValue",value:function(e,t){var n=Cp.PROPERTY_COERCIONS.get(e);return n?n(t):t}},{key:"getCoercedGridOptions",value:function(e){var t={};return Object.entries(e).forEach((function(e){var n=(0,r.Z)(e,2),i=n[0],o=n[1],a=Cp.getCoercedValue(i,o);t[i]=a})),t}}]),e}();Cp.PROPERTY_COERCIONS=new Map([].concat((0,o.Z)(Kr.BOOLEAN_PROPERTIES.map((function(e){return[e,Cp.toBoolean]}))),(0,o.Z)(Kr.NUMBER_PROPERTIES.map((function(e){return[e,Cp.toNumber]}))),[["groupAggFiltering",function(e){return"function"===typeof e?e:Cp.toBoolean(e)}],["pageSize",Cp.toConstrainedNum(1,Number.MAX_VALUE)],["autoSizePadding",Cp.toConstrainedNum(0,Number.MAX_VALUE)],["keepDetailRowsCount",Cp.toConstrainedNum(1,Number.MAX_VALUE)],["rowBuffer",Cp.toConstrainedNum(0,Number.MAX_VALUE)],["infiniteInitialRowCount",Cp.toConstrainedNum(1,Number.MAX_VALUE)],["cacheOverflowSize",Cp.toConstrainedNum(1,Number.MAX_VALUE)],["cacheBlockSize",Cp.toConstrainedNum(1,Number.MAX_VALUE)],["serverSideInitialRowCount",Cp.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelPageSize",Cp.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelBufferSize",Cp.toConstrainedNum(0,Number.MAX_VALUE)]])),Cp.changeSetId=0,Mn([Di("gridOptions")],Cp.prototype,"gridOptions",2),Mn([Di("eventService")],Cp.prototype,"eventService",2),Mn([Di("environment")],Cp.prototype,"environment",2),Mn([Di("frameworkOverrides")],Cp.prototype,"frameworkOverrides",2),Mn([Di("eGridDiv")],Cp.prototype,"eGridDiv",2),Mn([Di("validationService")],Cp.prototype,"validationService",2),Mn([Di("gridApi")],Cp.prototype,"api",2),Mn([Ei],Cp.prototype,"init",1),Mn([xi],Cp.prototype,"destroy",1),Cp=Mn([Ri("gridOptionsService")],Cp);var kp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"getLocaleTextFunc",value:function(){var e=this.gridOptionsService.getCallback("getLocaleText");if(e)return function(t,n,i){return e({key:t,defaultValue:n,variableValues:i})};var t=this.gridOptionsService.get("localeText");return function(e,n,i){var r=t&&t[e];if(r&&i&&i.length)for(var o=0;!(o>=i.length);){if(-1===r.indexOf("${variable}"))break;r=r.replace("${variable}",i[o++])}return null!=r?r:n}}}]),n}(kr);kp=Mn([Ri("localeService")],kp);var wp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,n.TEMPLATE,"vertical")}return(0,s.Z)(n,[{key:"postConstruct",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"postConstruct",this).call(this),this.createManagedBean(new xc(this.eContainer)),this.ctrlsService.registerFakeVScrollComp(this),this.addManagedListener(this.eventService,Er.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onRowContainerHeightChanged.bind(this))}},{key:"setScrollVisible",value:function(){var e=this.scrollVisibleService.isVerticalScrollShowing(),t=this.invisibleScrollbar,n=e&&this.gridOptionsService.getScrollbarWidth()||0,i=0===n&&t?16:n;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),Ka(this.getGui(),i),Ka(this.eViewport,i),Ka(this.eContainer,i),this.setDisplayed(e,{skipAriaHidden:!0})}},{key:"onRowContainerHeightChanged",value:function(){var e=this.ctrlsService.getGridBodyCtrl().getBodyViewportElement(),t=this.getScrollPosition(),n=e.scrollTop;t!=n&&this.setScrollPosition(n,!0)}},{key:"getScrollPosition",value:function(){return this.getViewport().scrollTop}},{key:"setScrollPosition",value:function(e,t){t||Ga(this.getViewport())||this.attemptSettingScrollPosition(e),this.getViewport().scrollTop=e}}]),n}(lp);wp.TEMPLATE='<div class="ag-body-vertical-scroll" aria-hidden="true">\n            <div class="ag-body-vertical-scroll-viewport" ref="eViewport">\n                <div class="ag-body-vertical-scroll-container" ref="eContainer"></div>\n            </div>\n        </div>',Mn([Ei],wp.prototype,"postConstruct",1);var Sp=wp,bp={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Ep=["january","february","march","april","may","june","july","august","september","october","november","december"],xp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).dataTypeDefinitions={},e.isWaitingForRowData=!1,e.isColumnTypeOverrideInDataTypeDefinitions=!1,e.columnStateUpdatesPendingInference={},e.columnStateUpdateListenerDestroyFuncs=[],e}return(0,s.Z)(n,[{key:"init",value:function(){var e=this;this.groupHideOpenParents=this.gridOptionsService.get("groupHideOpenParents"),this.addManagedPropertyListener("groupHideOpenParents",(function(){e.groupHideOpenParents=e.gridOptionsService.get("groupHideOpenParents")})),this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",(function(t){e.processDataTypeDefinitions(),e.columnModel.recreateColumnDefs(Br(t.source))}))}},{key:"processDataTypeDefinitions",value:function(){var e,t=this,n=this.getDefaultDataTypes();this.dataTypeDefinitions={},Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),i=n[0],o=n[1];t.dataTypeDefinitions[i]=On(Tn({},o),{groupSafeValueFormatter:t.createGroupSafeValueFormatter(o)})}));var i=null!=(e=this.gridOptionsService.get("dataTypeDefinitions"))?e:{};this.dataTypeMatchers={},Object.entries(i).forEach((function(e){var o=(0,r.Z)(e,2),a=o[0],s=o[1],l=t.processDataTypeDefinition(s,i,[a],n);l&&(t.dataTypeDefinitions[a]=l,s.dataTypeMatcher&&(t.dataTypeMatchers[a]=s.dataTypeMatcher))})),this.checkObjectValueHandlers(n),["dateString","text","number","boolean","date"].forEach((function(e){var i=t.dataTypeMatchers[e];i&&delete t.dataTypeMatchers[e],t.dataTypeMatchers[e]=null!=i?i:n[e].dataTypeMatcher}))}},{key:"mergeDataTypeDefinitions",value:function(e,t){var n=Tn(Tn({},e),t);return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(n.columnTypes=[].concat((0,o.Z)(this.convertColumnTypes(e.columnTypes)),(0,o.Z)(this.convertColumnTypes(t.columnTypes)))),n}},{key:"processDataTypeDefinition",value:function(e,t,n,i){var r,a=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){var s=i[a],l=t[a];if(s&&l&&(s=l),!this.validateDataTypeDefinition(e,s,a))return;r=this.mergeDataTypeDefinitions(s,e)}else{if(n.includes(a))return void oi('Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.');var u=t[a];if(!this.validateDataTypeDefinition(e,u,a))return;var c=this.processDataTypeDefinition(u,t,[].concat((0,o.Z)(n),[a]),i);if(!c)return;r=this.mergeDataTypeDefinitions(c,e)}return On(Tn({},r),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(r)})}},{key:"validateDataTypeDefinition",value:function(e,t,n){return t?t.baseDataType===e.baseDataType||(oi('The "baseDataType" property of a data type definition must match that of its parent.'),!1):(oi("The data type definition ".concat(n," does not exist.")),!1)}},{key:"createGroupSafeValueFormatter",value:function(e){var t=this;if(e.valueFormatter)return function(n){var i,r;if(null==(i=n.node)?void 0:i.group){var o=n.column.getAggFunc();if(o){if("first"===o||"last"===o)return e.valueFormatter(n);if("number"===e.baseDataType&&"count"!==o){if("number"===typeof n.value)return e.valueFormatter(n);if("object"===typeof n.value){if(!n.value)return;if("toNumber"in n.value)return e.valueFormatter(On(Tn({},n),{value:n.value.toNumber()}));if("value"in n.value)return e.valueFormatter(On(Tn({},n),{value:n.value.value}))}}}if(!t.gridOptionsService.get("suppressGroupMaintainValueType"))return}else if(t.groupHideOpenParents&&n.column.isRowGroupActive()){if("string"!==typeof n.value||(null==(r=e.dataTypeMatcher)?void 0:r.call(e,n.value)))return e.valueFormatter(n);if(!t.gridOptionsService.get("suppressGroupMaintainValueType"))return}return e.valueFormatter(n)}}},{key:"updateColDefAndGetDataTypeDefinitionColumnType",value:function(e,t,n){var i=t.cellDataType,r=t.field;if(void 0===i&&(i=e.cellDataType),null!=i&&!0!==i||(i=!!this.canInferCellDataType(e,t)&&this.inferCellDataType(r,n)),i){var o=this.dataTypeDefinitions[i];if(o)return e.cellDataType=i,o.groupSafeValueFormatter&&(e.valueFormatter=o.groupSafeValueFormatter),o.valueParser&&(e.valueParser=o.valueParser),o.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,o,n),o.columnTypes;oi('Missing data type definition - "'.concat(i,'"'))}else e.cellDataType=!1}},{key:"updateColDefAndGetColumnType",value:function(e,t,n){var i,r,o=this.updateColDefAndGetDataTypeDefinitionColumnType(e,t,n),a=null!=(r=null!=(i=t.type)?i:o)?r:e.type;return e.type=a,a?this.convertColumnTypes(a):void 0}},{key:"addColumnListeners",value:function(e){if(this.isWaitingForRowData){var t=this.columnStateUpdatesPendingInference[e.getColId()];if(t){var n=function(e){t.add(e.key)};e.addEventListener(Gi.EVENT_STATE_UPDATED,n),this.columnStateUpdateListenerDestroyFuncs.push((function(){return e.removeEventListener(Gi.EVENT_STATE_UPDATED,n)}))}}}},{key:"canInferCellDataType",value:function(e,t){var n,i=this;if("clientSide"!==this.rowModel.getType())return!1;var r={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(this.doColDefPropsPreventInference(t,r))return!1;var o=null===t.type?e.type:t.type;if(o){var a=null!=(n=this.gridOptionsService.get("columnTypes"))?n:{};if(this.convertColumnTypes(o).some((function(e){var t=a[e.trim()];return t&&i.doColDefPropsPreventInference(t,r)})))return!1}return!this.doColDefPropsPreventInference(e,r)}},{key:"doColDefPropsPreventInference",value:function(e,t){var n=this;return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some((function(i){var o=(0,r.Z)(i,2),a=o[0],s=o[1];return n.doesColDefPropPreventInference(e,t,a,s)}))}},{key:"doesColDefPropPreventInference",value:function(e,t,n,i){if(!t[n])return!1;var r=e[n];return null===r?(t[n]=!1,!1):void 0===i?!!r:r===i}},{key:"inferCellDataType",value:function(e,t){var n;if(e){var i,o=this.getInitialData();if(o){var a=e.indexOf(".")>=0&&!this.gridOptionsService.get("suppressFieldDotNotation");i=$n(o,e,a)}else this.initWaitForRowData(t);if(null!=i){var s=null!=(n=Object.entries(this.dataTypeMatchers).find((function(e){var t=(0,r.Z)(e,2);t[0];return(0,t[1])(i)})))?n:["object"];return(0,r.Z)(s,1)[0]}}}},{key:"getInitialData",value:function(){var e=this.gridOptionsService.get("rowData");if(null==e?void 0:e.length)return e[0];if(this.initialData)return this.initialData;var t=this.rowModel.getRootNode().allLeafChildren;return(null==t?void 0:t.length)?t[0].data:null}},{key:"initWaitForRowData",value:function(e){var t=this;if(this.columnStateUpdatesPendingInference[e]=new Set,!this.isWaitingForRowData){this.isWaitingForRowData=!0;var n=this.isColumnTypeOverrideInDataTypeDefinitions;n&&this.columnModel.queueResizeOperations();var i=this.addManagedListener(this.eventService,Er.EVENT_ROW_DATA_UPDATE_STARTED,(function(e){var r=e.firstRowData;if(r){null==i||i(),t.isWaitingForRowData=!1,t.processColumnsPendingInference(r,n),t.columnStateUpdatesPendingInference={},n&&t.columnModel.processResizeOperations();var o={type:Er.EVENT_DATA_TYPES_INFERRED};t.eventService.dispatchEvent(o)}}))}}},{key:"isPendingInference",value:function(){return this.isWaitingForRowData}},{key:"processColumnsPendingInference",value:function(e,t){var n=this;this.initialData=e;var i=[];this.columnStateUpdateListenerDestroyFuncs.forEach((function(e){return e()})),this.columnStateUpdateListenerDestroyFuncs=[];var a={},s={};Object.entries(this.columnStateUpdatesPendingInference).forEach((function(e){var o=(0,r.Z)(e,2),l=o[0],u=o[1],c=n.columnModel.getGridColumn(l);if(c){var d=c.getColDef();if(n.columnModel.resetColumnDefIntoColumn(c,"cellDataTypeInferred")){var h=c.getColDef();if(t&&h.type&&h.type!==d.type){var p=n.getUpdatedColumnState(c,u);p.rowGroup&&null==p.rowGroupIndex&&(a[l]=p),p.pivot&&null==p.pivotIndex&&(s[l]=p),i.push(p)}}}})),t&&i.push.apply(i,(0,o.Z)(this.columnModel.generateColumnStateForRowGroupAndPivotIndexes(a,s))),i.length&&this.columnModel.applyColumnState({state:i},"cellDataTypeInferred"),this.initialData=null}},{key:"getUpdatedColumnState",value:function(e,t){var n=this.columnModel.getColumnStateFromColDef(e);return t.forEach((function(e){delete n[e],"rowGroup"===e?delete n.rowGroupIndex:"pivot"===e&&delete n.pivotIndex})),n}},{key:"checkObjectValueHandlers",value:function(e){var t=this.dataTypeDefinitions.object,n=e.object;this.hasObjectValueParser=t.valueParser!==n.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==n.valueFormatter}},{key:"convertColumnTypes",value:function(e){var t=[];if(e instanceof Array){var n=e.some((function(e){return"string"!==typeof e}));n?console.warn("if colDef.type is supplied an array it should be of type 'string[]'"):t=e}else"string"===typeof e?t=e.split(","):console.warn("colDef.type should be of type 'string' | 'string[]'");return t}},{key:"getDateStringTypeDefinition",value:function(e){var t;return e&&null!=(t=this.getDataTypeDefinition(e))?t:this.dataTypeDefinitions.dateString}},{key:"getDateParserFunction",value:function(e){return this.getDateStringTypeDefinition(e).dateParser}},{key:"getDateFormatterFunction",value:function(e){return this.getDateStringTypeDefinition(e).dateFormatter}},{key:"getDataTypeDefinition",value:function(e){var t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}},{key:"getBaseDataType",value:function(e){var t;return null==(t=this.getDataTypeDefinition(e))?void 0:t.baseDataType}},{key:"checkType",value:function(e,t){var n;if(null==t)return!0;var i=null==(n=this.getDataTypeDefinition(e))?void 0:n.dataTypeMatcher;return!i||i(t)}},{key:"validateColDef",value:function(e){"object"===e.cellDataType&&(e.valueFormatter!==this.dataTypeDefinitions.object.groupSafeValueFormatter||this.hasObjectValueFormatter||oi('Cell data type is "object" but no value formatter has been provided. Please either provide an object data type definition with a value formatter, or set "colDef.valueFormatter"'),e.editable&&e.valueParser===this.dataTypeDefinitions.object.valueParser&&!this.hasObjectValueParser&&oi('Cell data type is "object" but no value parser has been provided. Please either provide an object data type definition with a value parser, or set "colDef.valueParser"'))}},{key:"setColDefPropertiesForBaseDataType",value:function(e,t,n){var i=this,r=function(e,n,r){var o=e.getColDef().valueFormatter;return o===t.groupSafeValueFormatter&&(o=t.valueFormatter),i.valueFormatterService.formatValue(e,n,r,o)},o=wi.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()),a=this.localeService.getLocaleTextFunc(),s=function(t){var n=e.filterParams;e.filterParams="object"===typeof n?Tn(Tn({},n),t):t};switch(t.baseDataType){case"number":e.cellEditor="agNumberCellEditor",o&&s({comparator:function(e,t){var n=null==e?0:parseInt(e),i=null==t?0:parseInt(t);return n===i?0:n>i?1:-1}});break;case"boolean":e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.suppressKeyboardEvent=function(e){return!!e.colDef.editable&&e.event.key===hs.SPACE},s(o?{valueFormatter:function(e){return Fn(e.value)?a(String(e.value),e.value?"True":"False"):a("blanks","(Blanks)")}}:{maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:function(e,t){return t},numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:function(e,t){return!1===t},numberOfInputs:0}]});break;case"date":e.cellEditor="agDateCellEditor",e.keyCreator=function(e){return r(e.column,e.node,e.value)},o&&s({valueFormatter:function(e){var t=r(e.column,e.node,e.value);return Fn(t)?t:a("blanks","(Blanks)")},treeList:!0,treeListFormatter:function(e,t){if(1===t&&null!=e){var n=Ep[Number(e)-1];return a(n,bp[n])}return null!=e?e:a("blanks","(Blanks)")}});break;case"dateString":e.cellEditor="agDateStringCellEditor",e.keyCreator=function(e){return r(e.column,e.node,e.value)};var l=t.dateParser;s(o?{valueFormatter:function(e){var t=r(e.column,e.node,e.value);return Fn(t)?t:a("blanks","(Blanks)")},treeList:!0,treeListPathGetter:function(e){var t=l(null!=e?e:void 0);return t?[String(t.getFullYear()),String(t.getMonth()+1),String(t.getDate())]:null},treeListFormatter:function(e,t){if(1===t&&null!=e){var n=Ep[Number(e)-1];return a(n,bp[n])}return null!=e?e:a("blanks","(Blanks)")}}:{comparator:function(e,t){var n=l(t);return null==t||n<e?-1:n>e?1:0}});break;case"object":e.cellEditorParams={useFormatter:!0},e.comparator=function(e,t){var o=i.columnModel.getPrimaryColumn(n),a=null==o?void 0:o.getColDef();if(!o||!a)return 0;var s=null==e?"":r(o,null,e),l=null==t?"":r(o,null,t);return s===l?0:s>l?1:-1},e.keyCreator=function(e){return r(e.column,e.node,e.value)},o?s({valueFormatter:function(e){var t=r(e.column,e.node,e.value);return Fn(t)?t:a("blanks","(Blanks)")}}):e.filterValueGetter=function(e){return r(e.column,e.node,i.valueService.getValue(e.column,e.node))}}}},{key:"getDefaultDataTypes",value:function(){var e=function(e){return!!e.match("^\\d{4}-\\d{2}-\\d{2}$")},t=this.localeService.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:function(e){var t,n;return""===(null==(n=null==(t=e.newValue)?void 0:t.trim)?void 0:n.call(t))?null:Number(e.newValue)},valueFormatter:function(e){return null==e.value?"":"number"!==typeof e.value||isNaN(e.value)?t("invalidNumber","Invalid Number"):String(e.value)},dataTypeMatcher:function(e){return"number"===typeof e}},text:{baseDataType:"text",valueParser:function(e){return""===e.newValue?null:Zn(e.newValue)},dataTypeMatcher:function(e){return"string"===typeof e}},boolean:{baseDataType:"boolean",valueParser:function(e){var t,n;return null==e.newValue?e.newValue:""===(null==(n=null==(t=e.newValue)?void 0:t.trim)?void 0:n.call(t))?null:"true"===String(e.newValue).toLowerCase()},valueFormatter:function(e){return null==e.value?"":String(e.value)},dataTypeMatcher:function(e){return"boolean"===typeof e}},date:{baseDataType:"date",valueParser:function(e){return va(null==e.newValue?null:String(e.newValue))},valueFormatter:function(e){var n;return null==e.value?"":e.value instanceof Date&&!isNaN(e.value.getTime())?null!=(n=ha(e.value,!1))?n:"":t("invalidDate","Invalid Date")},dataTypeMatcher:function(e){return e instanceof Date}},dateString:{baseDataType:"dateString",dateParser:function(e){var t;return null!=(t=va(e))?t:void 0},dateFormatter:function(e){var t;return null!=(t=ha(null!=e?e:null,!1))?t:void 0},valueParser:function(t){return e(String(t.newValue))?t.newValue:null},valueFormatter:function(t){return e(String(t.value))?t.value:""},dataTypeMatcher:function(t){return"string"===typeof t&&e(t)}},object:{baseDataType:"object",valueParser:function(){return null},valueFormatter:function(e){var t;return null!=(t=Zn(e.value))?t:""}}}}}]),n}(kr);Mn([Di("rowModel")],xp.prototype,"rowModel",2),Mn([Di("columnModel")],xp.prototype,"columnModel",2),Mn([Di("columnUtils")],xp.prototype,"columnUtils",2),Mn([Di("valueService")],xp.prototype,"valueService",2),Mn([Di("valueFormatterService")],xp.prototype,"valueFormatterService",2),Mn([Ei],xp.prototype,"init",1),xp=Mn([Ri("dataTypeService")],xp);var Rp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"parseValue",value:function(e,t,n,i){var r=e.getColDef(),o=this.gridOptionsService.addGridCommonParams({node:t,data:null==t?void 0:t.data,oldValue:i,newValue:n,colDef:r,column:e}),a=r.valueParser;return Fn(a)?"function"===typeof a?a(o):this.expressionService.evaluate(a,o):n}}]),n}(kr);Mn([Di("expressionService")],Rp.prototype,"expressionService",2),Rp=Mn([Ri("valueParserService")],Rp);var Dp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).waitingForColumns=!1,e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.addManagedPropertyListener("columnDefs",(function(t){return e.setColumnDefs(t)}))}},{key:"start",value:function(){var e=this;this.ctrlsService.whenReady((function(){var t=e.gridOptionsService.get("columnDefs");t?e.setColumnsAndData(t):e.waitingForColumns=!0,e.gridReady()}))}},{key:"setColumnsAndData",value:function(e){this.columnModel.setColumnDefs(null!=e?e:[],"gridInitializing"),this.rowModel.start()}},{key:"gridReady",value:function(){var e=this;this.dispatchGridReadyEvent();var t=wi.__isRegistered("@ag-grid-enterprise/core",this.context.getGridId());new Oh("AG Grid",(function(){return e.gridOptionsService.get("debug")})).log("initialised successfully, enterprise = ".concat(t))}},{key:"dispatchGridReadyEvent",value:function(){var e={type:Er.EVENT_GRID_READY};this.eventService.dispatchEvent(e)}},{key:"setColumnDefs",value:function(e){var t=this.gridOptionsService.get("columnDefs");if(t)return this.waitingForColumns?(this.waitingForColumns=!1,void this.setColumnsAndData(t)):void this.columnModel.setColumnDefs(t,Br(e.source))}}]),n}(kr);Mn([Di("ctrlsService")],Dp.prototype,"ctrlsService",2),Mn([Di("columnModel")],Dp.prototype,"columnModel",2),Mn([Di("rowModel")],Dp.prototype,"rowModel",2),Mn([Ei],Dp.prototype,"postConstruct",1),Dp=Mn([Ri("syncService")],Dp);var Tp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).manuallyDisplayed=!1,e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;this.addManagedListener(this.eventService,Er.EVENT_ROW_DATA_UPDATED,(function(){return e.onRowDataUpdated()})),this.addManagedListener(this.eventService,Er.EVENT_NEW_COLUMNS_LOADED,(function(){return e.onNewColumnsLoaded()}))}},{key:"registerOverlayWrapperComp",value:function(e){this.overlayWrapperComp=e,(!this.gridOptionsService.get("columnDefs")||this.gridOptionsService.isRowModelType("clientSide")&&!this.gridOptionsService.get("rowData"))&&this.showLoadingOverlay()}},{key:"showLoadingOverlay",value:function(){if(!this.gridOptionsService.get("suppressLoadingOverlay")){var e=this.userComponentFactory.getLoadingOverlayCompDetails({});this.showOverlay(e,"ag-overlay-loading-wrapper","loadingOverlayComponentParams")}}},{key:"showNoRowsOverlay",value:function(){if(!this.gridOptionsService.get("suppressNoRowsOverlay")){var e=this.userComponentFactory.getNoRowsOverlayCompDetails({});this.showOverlay(e,"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams")}}},{key:"showOverlay",value:function(e,t,n){var i=this,r=e.newAgStackInstance(),o=this.addManagedPropertyListener(n,(function(e){var t=e.currentValue;r.then((function(e){e.refresh&&e.refresh(i.gridOptionsService.addGridCommonParams(Tn({},null!=t?t:{})))}))}));this.manuallyDisplayed=this.columnModel.isReady()&&!this.paginationProxy.isEmpty(),this.overlayWrapperComp.showOverlay(r,t,o)}},{key:"hideOverlay",value:function(){this.manuallyDisplayed=!1,this.overlayWrapperComp.hideOverlay()}},{key:"showOrHideOverlay",value:function(){var e=this.paginationProxy.isEmpty(),t=this.gridOptionsService.get("suppressNoRowsOverlay");e&&!t?this.showNoRowsOverlay():this.hideOverlay()}},{key:"onRowDataUpdated",value:function(){this.showOrHideOverlay()}},{key:"onNewColumnsLoaded",value:function(){!this.columnModel.isReady()||this.paginationProxy.isEmpty()||this.manuallyDisplayed||this.hideOverlay()}}]),n}(kr);Mn([Di("userComponentFactory")],Tp.prototype,"userComponentFactory",2),Mn([Di("paginationProxy")],Tp.prototype,"paginationProxy",2),Mn([Di("columnModel")],Tp.prototype,"columnModel",2),Mn([Ei],Tp.prototype,"postConstruct",1),Tp=Mn([Ri("overlayService")],Tp);var Op=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).suppressEvents=!0,e.queuedUpdateSources=new Set,e.dispatchStateUpdateEventDebounced=fi((function(){return e.dispatchQueuedStateUpdateEvents()}),0),e.onRowGroupOpenedDebounced=fi((function(){return e.updateCachedState("rowGroupExpansion",e.getRowGroupExpansionState())}),0),e.onRowSelectedDebounced=fi((function(){e.staleStateKeys.delete("rowSelection"),e.updateCachedState("rowSelection",e.getRowSelectionState())}),0),e.staleStateKeys=new Set,e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e,t=this;this.isClientSideRowModel="clientSide"===this.rowModel.getType(),this.cachedState=null!=(e=this.gridOptionsService.get("initialState"))?e:{},this.ctrlsService.whenReady((function(){return t.suppressEventsAndDispatchInitEvent((function(){return t.setupStateOnGridReady()}))}));var n=this.addManagedListener(this.eventService,Er.EVENT_NEW_COLUMNS_LOADED,(function(e){"gridInitializing"===e.source&&(null==n||n(),t.suppressEventsAndDispatchInitEvent((function(){return t.setupStateOnColumnsInitialised()})))})),i=this.addManagedListener(this.eventService,Er.EVENT_ROW_COUNT_READY,(function(){null==i||i(),t.suppressEventsAndDispatchInitEvent((function(){return t.setupStateOnRowCountReady()}))})),r=this.addManagedListener(this.eventService,Er.EVENT_FIRST_DATA_RENDERED,(function(){null==r||r(),t.suppressEventsAndDispatchInitEvent((function(){return t.setupStateOnFirstDataRendered()}))}))}},{key:"getState",value:function(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}},{key:"setupStateOnGridReady",value:function(){var e=this;this.updateCachedState("sideBar",this.getSideBarState()),this.addManagedListener(this.eventService,Er.EVENT_TOOL_PANEL_VISIBLE_CHANGED,(function(){return e.updateCachedState("sideBar",e.getSideBarState())})),this.addManagedListener(this.eventService,Er.EVENT_SIDE_BAR_UPDATED,(function(){return e.updateCachedState("sideBar",e.getSideBarState())}))}},{key:"setupStateOnColumnsInitialised",value:function(){var e,t=this,n=null!=(e=this.gridOptionsService.get("initialState"))?e:{};this.setColumnState(n),this.setColumnGroupState(n),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState()),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_VALUE_CHANGED,(function(){return t.updateColumnState(["aggregation"])})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_MOVED,(function(){return t.updateColumnState(["columnOrder"])})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_PINNED,(function(){return t.updateColumnState(["columnPinning"])})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_RESIZED,(function(){return t.updateColumnState(["columnSizing"])})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_VISIBLE,(function(){return t.updateColumnState(["columnVisibility"])})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_PIVOT_CHANGED,(function(){return t.updateColumnState(["pivot"])})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_PIVOT_MODE_CHANGED,(function(){return t.updateColumnState(["pivot"])})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return t.updateColumnState(["rowGroup"])})),this.addManagedListener(this.eventService,Er.EVENT_SORT_CHANGED,(function(){return t.updateColumnState(["sort"])})),this.addManagedListener(this.eventService,Er.EVENT_NEW_COLUMNS_LOADED,(function(){return t.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"])})),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_GROUP_OPENED,(function(){return t.updateCachedState("columnGroup",t.getColumnGroupState())}))}},{key:"setupStateOnRowCountReady",value:function(){var e,t=this,n=null!=(e=this.gridOptionsService.get("initialState"))?e:{},i=n.filter,r=n.rowGroupExpansion,o=n.rowSelection,a=n.pagination,s=this.gridOptionsService.get("advancedFilterModel");(i||s)&&this.setFilterState(i,s),r&&this.setRowGroupExpansionState(r),o&&this.setRowSelectionState(o),a&&this.setPaginationState(a),this.updateCachedState("filter",this.getFilterState()),this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowSelection",this.getRowSelectionState()),this.updateCachedState("pagination",this.getPaginationState()),this.addManagedListener(this.eventService,Er.EVENT_FILTER_CHANGED,(function(){return t.updateCachedState("filter",t.getFilterState())})),this.addManagedListener(this.eventService,Er.EVENT_ROW_GROUP_OPENED,(function(){return t.onRowGroupOpenedDebounced()})),this.addManagedListener(this.eventService,Er.EVENT_EXPAND_COLLAPSE_ALL,(function(){return t.updateCachedState("rowGroupExpansion",t.getRowGroupExpansionState())})),this.addManagedListener(this.eventService,Er.EVENT_SELECTION_CHANGED,(function(){t.staleStateKeys.add("rowSelection"),t.onRowSelectedDebounced()})),this.addManagedListener(this.eventService,Er.EVENT_PAGINATION_CHANGED,(function(e){(e.newPage||e.newPageSize)&&t.updateCachedState("pagination",t.getPaginationState())}))}},{key:"setupStateOnFirstDataRendered",value:function(){var e,t=this,n=null!=(e=this.gridOptionsService.get("initialState"))?e:{},i=n.scroll,r=n.rangeSelection,o=n.focusedCell,a=n.columnOrder;o&&this.setFocusedCellState(o),r&&this.setRangeSelectionState(r),i&&this.setScrollState(i),this.setColumnPivotState(!!(null==a?void 0:a.orderedColIds)),this.updateCachedState("sideBar",this.getSideBarState()),this.updateCachedState("focusedCell",this.getFocusedCellState()),this.updateCachedState("rangeSelection",this.getRangeSelectionState()),this.updateCachedState("scroll",this.getScrollState()),this.addManagedListener(this.eventService,Er.EVENT_CELL_FOCUSED,(function(){return t.updateCachedState("focusedCell",t.getFocusedCellState())})),this.addManagedListener(this.eventService,Er.EVENT_RANGE_SELECTION_CHANGED,(function(e){e.finished&&t.updateCachedState("rangeSelection",t.getRangeSelectionState())})),this.addManagedListener(this.eventService,Er.EVENT_BODY_SCROLL_END,(function(){return t.updateCachedState("scroll",t.getScrollState())}))}},{key:"getColumnState",value:function(){for(var e=this.columnModel.isPivotMode(),t=[],n=[],i=[],r=[],o=[],a=[],s=[],l=[],u=[],c=this.columnModel.getColumnState(),d=0;d<c.length;d++){var h=c[d],p=h.colId,f=h.sort,v=h.sortIndex,g=h.rowGroup,m=h.rowGroupIndex,y=h.aggFunc,C=h.pivot,k=h.pivotIndex,w=h.pinned,S=h.hide,b=h.width,E=h.flex;u.push(p),f&&(t[null!=v?v:0]={colId:p,sort:f}),g&&(n[null!=m?m:0]=p),"string"===typeof y&&i.push({colId:p,aggFunc:y}),C&&(r[null!=k?k:0]=p),w&&("right"===w?a:o).push(p),S&&s.push(p),(E||b)&&l.push({colId:p,flex:null!=E?E:void 0,width:b})}return{sort:t.length?{sortModel:t}:void 0,rowGroup:n.length?{groupColIds:n}:void 0,aggregation:i.length?{aggregationModel:i}:void 0,pivot:r.length||e?{pivotMode:e,pivotColIds:r}:void 0,columnPinning:o.length||a.length?{leftColIds:o,rightColIds:a}:void 0,columnVisibility:s.length?{hiddenColIds:s}:void 0,columnSizing:l.length?{columnSizingModel:l}:void 0,columnOrder:u.length?{orderedColIds:u}:void 0}}},{key:"setColumnState",value:function(e){var t=e.sort,n=e.rowGroup,i=e.aggregation,r=e.pivot,o=e.columnPinning,a=e.columnVisibility,s=e.columnSizing,l=e.columnOrder,u={},c=function(e){var t=u[e];return t||(t={colId:e},u[e]=t,t)};t&&t.sortModel.forEach((function(e,t){var n=e.colId,i=e.sort,r=c(n);r.sort=i,r.sortIndex=t})),n&&n.groupColIds.forEach((function(e,t){var n=c(e);n.rowGroup=!0,n.rowGroupIndex=t})),i&&i.aggregationModel.forEach((function(e){var t=e.colId,n=e.aggFunc;c(t).aggFunc=n})),r&&(r.pivotColIds.forEach((function(e,t){var n=c(e);n.pivot=!0,n.pivotIndex=t})),this.gridOptionsService.updateGridOptions({options:{pivotMode:r.pivotMode},source:"gridInitializing"})),o&&(o.leftColIds.forEach((function(e){c(e).pinned="left"})),o.rightColIds.forEach((function(e){c(e).pinned="right"}))),a&&a.hiddenColIds.forEach((function(e){c(e).hide=!0})),s&&s.columnSizingModel.forEach((function(e){var t=e.colId,n=e.flex,i=e.width,r=c(t);r.flex=null!=n?n:null,r.width=i}));var d=null==l?void 0:l.orderedColIds,h=!!(null==d?void 0:d.length),p=h?d.map((function(e){return c(e)})):Object.values(u);if(p.length){this.columnStates=p;this.columnModel.applyColumnState({state:p,applyOrder:h,defaultState:{sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null}},"gridInitializing")}}},{key:"setColumnPivotState",value:function(e){var t=this.columnStates;this.columnStates=void 0;var n=this.columnGroupStates;if(this.columnGroupStates=void 0,this.columnModel.isSecondaryColumnsPresent()){if(t){var i,r=[],o=(0,g.Z)(t);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.columnModel.getSecondaryColumn(a.colId)&&r.push(a)}}catch(s){o.e(s)}finally{o.f()}this.columnModel.applyColumnState({state:r,applyOrder:e},"gridInitializing")}n&&this.columnModel.setColumnGroupState(n,"gridInitializing")}}},{key:"getColumnGroupState",value:function(){var e=this.columnModel.getColumnGroupState(),t=[];return e.forEach((function(e){var n=e.groupId;e.open&&t.push(n)})),t.length?{openColumnGroupIds:t}:void 0}},{key:"setColumnGroupState",value:function(e){var t;if(e.hasOwnProperty("columnGroup")){var n=new Set(null==(t=e.columnGroup)?void 0:t.openColumnGroupIds),i=this.columnModel.getColumnGroupState().map((function(e){var t=e.groupId,i=n.has(t);return i&&n.delete(t),{groupId:t,open:i}}));n.forEach((function(e){i.push({groupId:e,open:!0})})),i.length&&(this.columnGroupStates=i),this.columnModel.setColumnGroupState(i,"gridInitializing")}}},{key:"getFilterState",value:function(){var e,t=this.filterManager.getFilterModel();t&&0===Object.keys(t).length&&(t=void 0);var n=null!=(e=this.filterManager.getAdvancedFilterModel())?e:void 0;return t||n?{filterModel:t,advancedFilterModel:n}:void 0}},{key:"setFilterState",value:function(e,t){var n=null!=e?e:{advancedFilterModel:t},i=n.filterModel,r=n.advancedFilterModel;i&&this.filterManager.setFilterModel(i,"columnFilter"),r&&this.filterManager.setAdvancedFilterModel(r)}},{key:"getRangeSelectionState",value:function(){var e,t=null==(e=this.rangeService)?void 0:e.getCellRanges().map((function(e){var t=e.id,n=e.type,i=e.startRow,r=e.endRow,o=e.columns,a=e.startColumn;return{id:t,type:n,startRow:i,endRow:r,colIds:o.map((function(e){return e.getColId()})),startColId:a.getColId()}}));return(null==t?void 0:t.length)?{cellRanges:t}:void 0}},{key:"setRangeSelectionState",value:function(e){var t,n=this;if(this.gridOptionsService.get("enableRangeSelection")){var i=e.cellRanges.map((function(e){return On(Tn({},e),{columns:e.colIds.map((function(e){return n.columnModel.getGridColumn(e)})),startColumn:n.columnModel.getGridColumn(e.startColId)})}));null==(t=this.rangeService)||t.setCellRanges(i)}}},{key:"getScrollState",value:function(){var e,t,n;if(this.isClientSideRowModel){var i=null==(e=this.ctrlsService.getGridBodyCtrl())?void 0:e.getScrollFeature(),r=(null!=(t=null==i?void 0:i.getHScrollPosition())?t:{left:0}).left,o=(null!=(n=null==i?void 0:i.getVScrollPosition())?n:{top:0}).top;return o||r?{top:o,left:r}:void 0}}},{key:"setScrollState",value:function(e){var t;if(this.isClientSideRowModel){var n=e.top,i=e.left;null==(t=this.ctrlsService.getGridBodyCtrl())||t.getScrollFeature().setScrollPosition(n,i)}}},{key:"getSideBarState",value:function(){var e,t;return null==(t=null==(e=this.sideBarService)?void 0:e.getSideBarComp())?void 0:t.getState()}},{key:"getFocusedCellState",value:function(){if(this.isClientSideRowModel){var e=this.focusService.getFocusedCell();if(e){var t=e.column,n=e.rowIndex,i=e.rowPinned;return{colId:t.getColId(),rowIndex:n,rowPinned:i}}}}},{key:"setFocusedCellState",value:function(e){if(this.isClientSideRowModel){var t=e.colId,n=e.rowIndex,i=e.rowPinned;this.focusService.setFocusedCell({column:this.columnModel.getGridColumn(t),rowIndex:n,rowPinned:i,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}},{key:"getPaginationState",value:function(){var e=this.paginationProxy.getCurrentPage(),t=this.gridOptionsService.get("paginationAutoPageSize")?void 0:this.paginationProxy.getPageSize();if(e||t)return{page:e,pageSize:t}}},{key:"setPaginationState",value:function(e){e.pageSize&&!this.gridOptionsService.get("paginationAutoPageSize")&&this.paginationProxy.setPageSize(e.pageSize,"initialState"),"number"===typeof e.page&&this.paginationProxy.setPage(e.page)}},{key:"getRowSelectionState",value:function(){var e,t=this.selectionService.getSelectionState();return!t||!Array.isArray(t)&&(!1===t.selectAll||!1===t.selectAllChildren)&&!(null==(e=null==t?void 0:t.toggledNodes)?void 0:e.length)?void 0:t}},{key:"setRowSelectionState",value:function(e){this.selectionService.setSelectionState(e,"gridInitializing")}},{key:"getRowGroupExpansionState",value:function(){var e=this.expansionService.getExpandedRows();return e.length?{expandedRowGroupIds:e}:void 0}},{key:"setRowGroupExpansionState",value:function(e){this.expansionService.expandRows(e.expandedRowGroupIds)}},{key:"updateColumnState",value:function(e){var t=this,n=this.getColumnState(),i=!1;Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),o=n[0];Wn(n[1],t.cachedState[o])||(i=!0)})),this.cachedState=Tn(Tn({},this.cachedState),n),i&&this.dispatchStateUpdateEvent(e)}},{key:"updateCachedState",value:function(e,t){var n=this.cachedState[e];this.setCachedStateValue(e,t),Wn(t,n)||this.dispatchStateUpdateEvent([e])}},{key:"setCachedStateValue",value:function(e,t){this.cachedState=On(Tn({},this.cachedState),(0,Ve.Z)({},e,t))}},{key:"refreshStaleState",value:function(){var e=this;this.staleStateKeys.forEach((function(t){if("rowSelection"===t)e.setCachedStateValue(t,e.getRowSelectionState())})),this.staleStateKeys.clear()}},{key:"dispatchStateUpdateEvent",value:function(e){var t=this;this.suppressEvents||(e.forEach((function(e){return t.queuedUpdateSources.add(e)})),this.dispatchStateUpdateEventDebounced())}},{key:"dispatchQueuedStateUpdateEvents",value:function(){var e=Array.from(this.queuedUpdateSources);this.queuedUpdateSources.clear();var t={type:Er.EVENT_STATE_UPDATED,sources:e,state:this.cachedState};this.eventService.dispatchEvent(t)}},{key:"suppressEventsAndDispatchInitEvent",value:function(e){var t=this;this.suppressEvents=!0,this.columnAnimationService.setSuppressAnimation(!0),e(),setTimeout((function(){t.suppressEvents=!1,t.queuedUpdateSources.clear(),t.isAlive()&&(t.columnAnimationService.setSuppressAnimation(!1),t.dispatchStateUpdateEvent(["gridInitializing"]))}))}}]),n}(kr);Mn([Di("filterManager")],Op.prototype,"filterManager",2),Mn([Ti("rangeService")],Op.prototype,"rangeService",2),Mn([Di("ctrlsService")],Op.prototype,"ctrlsService",2),Mn([Ti("sideBarService")],Op.prototype,"sideBarService",2),Mn([Di("focusService")],Op.prototype,"focusService",2),Mn([Di("columnModel")],Op.prototype,"columnModel",2),Mn([Di("paginationProxy")],Op.prototype,"paginationProxy",2),Mn([Di("rowModel")],Op.prototype,"rowModel",2),Mn([Di("selectionService")],Op.prototype,"selectionService",2),Mn([Di("expansionService")],Op.prototype,"expansionService",2),Mn([Di("columnAnimationService")],Op.prototype,"columnAnimationService",2),Mn([Ei],Op.prototype,"postConstruct",1),Op=Mn([Ri("stateService")],Op);var Pp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"init",value:function(){this.processGridOptions(this.gridOptions)}},{key:"processGridOptions",value:function(e){this.processOptions(e,yp)}},{key:"processColumnDefs",value:function(e){this.processOptions(e,vp)}},{key:"processOptions",value:function(e,t){var n=this,i=t.validations,r=t.deprecations,a=t.allProperties,s=t.propertyExceptions,l=t.objectName,u=t.docsUrl;a&&!0!==this.gridOptions.suppressPropertyNamesCheck&&this.checkProperties(e,[].concat((0,o.Z)(null!=s?s:[]),(0,o.Z)(Object.keys(r))),a,l,u);var c=new Set;Object.keys(e).forEach((function(t){var o,a=r[t];if(a)if("renamed"in a){var s=a.renamed,l=a.version;c.add("As of v".concat(l,", ").concat(String(t)," is deprecated. Please use ").concat(String(s)," instead.")),e[s]=e[t]}else{var u=a.message,d=a.version;c.add("As of v".concat(d,", ").concat(String(t)," is deprecated. ").concat(null!=u?u:""))}var h=e[t];if(null!=h&&!1!==h){var p,f=i[t];if(f){if("function"===typeof f){var v=f(e,n.gridOptions);if(!v)return;if("objectName"in v){var g=e[t];return Array.isArray(g)?void g.forEach((function(e){n.processOptions(e,v)})):void n.processOptions(e[t],v)}p=v}else p=f;var m=p,y=m.module,C=m.dependencies,k=m.supportedRowModels;if(k){var w=null!=(o=n.gridOptions.rowModelType)?o:"clientSide";if(!k.includes(w))return void c.add("".concat(String(t)," is not supported with the '").concat(w,"' row model."))}if(y){var S=Array.isArray(y)?y:[y],b=!0;if(S.forEach((function(e){wi.__assertRegistered(e,String(t),n.context.getGridId())||(b=!1,c.add("".concat(String(t)," is only available when ").concat(e," is loaded.")))})),!b)return}if(C){var E=n.checkForWarning(t,C,e);if(E)return void c.add(E)}}}})),c.size>0&&c.forEach((function(e){oi(e)}))}},{key:"checkForWarning",value:function(e,t,n){if("function"===typeof t)return t(n,this.gridOptions);var i=Object.entries(t).find((function(e){var t=(0,r.Z)(e,2),i=t[0],o=t[1],a=n[i];return!o.includes(a)}));if(!i)return null;var o=(0,r.Z)(i,2),a=o[0],s=o[1];return s.length>1?"'".concat(String(e),"' requires '").concat(a,"' to be one of [").concat(s.join(", "),"]."):"'".concat(String(e),"' requires '").concat(a,"' to be ").concat(s[0],".")}},{key:"checkProperties",value:function(e,t,n,i,r){var a=rs(Object.getOwnPropertyNames(e),[].concat(["__ob__","__v_skip","__metadata__"],(0,o.Z)(t),(0,o.Z)(n)),n);if(Yn(a,(function(e,t){oi("invalid ".concat(i," property '").concat(e,"' did you mean any of these: ").concat(t.slice(0,8).join(", ")))})),Object.keys(a).length>0&&r){var s=this.getFrameworkOverrides().getDocLink(r);oi("to see all the valid ".concat(i," properties please check: ").concat(s))}}}]),n}(kr);Mn([Di("gridOptions")],Pp.prototype,"gridOptions",2),Mn([Ei],Pp.prototype,"init",1),Pp=Mn([Ri("validationService")],Pp);var Ap=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).syncEventListeners=new Map,e.asyncEventListeners=new Map,e.syncGlobalEventListeners=new Set,e.globalEventListenerPairs=new Map,e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.frameworkEventWrappingService=new Ni(this.getFrameworkOverrides())}},{key:"addEventListener",value:function(e,t){var n=this.frameworkEventWrappingService.wrap(t),i=this.gridOptionsService.useAsyncEvents()&&!xr.has(e),r=i?this.asyncEventListeners:this.syncEventListeners;r.has(e)||r.set(e,new Set),r.get(e).add(n),this.eventService.addEventListener(e,n,i)}},{key:"removeEventListener",value:function(e,t){var n,i=this.frameworkEventWrappingService.unwrap(t),r=this.asyncEventListeners.get(e),o=!!(null==r?void 0:r.delete(i));o||null==(n=this.syncEventListeners.get(e))||n.delete(i),this.eventService.removeEventListener(e,i,o)}},{key:"addGlobalListener",value:function(e){var t=this.frameworkEventWrappingService.wrapGlobal(e);if(this.gridOptionsService.useAsyncEvents()){var n=function(e,n){xr.has(e)&&t(e,n)},i=function(e,n){xr.has(e)||t(e,n)};this.globalEventListenerPairs.set(e,{syncListener:n,asyncListener:i}),this.eventService.addGlobalListener(n,!1),this.eventService.addGlobalListener(i,!0)}else this.syncGlobalEventListeners.add(t),this.eventService.addGlobalListener(t,!1)}},{key:"removeGlobalListener",value:function(e){var t=this.frameworkEventWrappingService.unwrapGlobal(e);if(this.globalEventListenerPairs.has(t)){var n=this.globalEventListenerPairs.get(t),i=n.syncListener,r=n.asyncListener;this.eventService.removeGlobalListener(i,!1),this.eventService.removeGlobalListener(r,!0),this.globalEventListenerPairs.delete(e)}else this.syncGlobalEventListeners.delete(t),this.eventService.removeGlobalListener(t,!1)}},{key:"destroyEventListeners",value:function(e,t){var n=this;e.forEach((function(e,i){e.forEach((function(e){return n.eventService.removeEventListener(i,e,t)})),e.clear()})),e.clear()}},{key:"destroyGlobalListeners",value:function(e,t){var n=this;e.forEach((function(e){return n.eventService.removeGlobalListener(e,t)})),e.clear()}},{key:"destroy",value:function(){var e=this;(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this),this.destroyEventListeners(this.syncEventListeners,!1),this.destroyEventListeners(this.asyncEventListeners,!0),this.destroyGlobalListeners(this.syncGlobalEventListeners,!1),this.globalEventListenerPairs.forEach((function(t){var n=t.syncListener,i=t.asyncListener;e.eventService.removeGlobalListener(n,!1),e.eventService.removeGlobalListener(i,!0)})),this.globalEventListenerPairs.clear()}}]),n}(kr);Mn([Ei],Ap.prototype,"postConstruct",1),Ap=Mn([Ri("apiEventService")],Ap);var Mp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.call(this,'<span class="ag-paging-page-size"></span>')).hasEmptyOption=!1,e.handlePageSizeItemSelected=function(){if(e.selectPageSizeComp){var t=e.selectPageSizeComp.getValue();if(t){var n=Number(t);isNaN(n)||n<1||n===e.paginationProxy.getPageSize()||(e.paginationProxy.setPageSize(n,"pageSizeSelector"),e.hasEmptyOption&&e.toggleSelectDisplay(!0),e.selectPageSizeComp.getFocusableElement().focus())}}},e}return(0,s.Z)(n,[{key:"init",value:function(){var e=this;this.addManagedPropertyListener("paginationPageSizeSelector",(function(){e.onPageSizeSelectorValuesChange()})),this.addManagedListener(this.eventService,Er.EVENT_PAGINATION_CHANGED,(function(t){return e.handlePaginationChanged(t)}))}},{key:"handlePaginationChanged",value:function(e){if(this.selectPageSizeComp&&(null==e?void 0:e.newPageSize)){var t=this.paginationProxy.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}}},{key:"toggleSelectDisplay",value:function(e){this.selectPageSizeComp&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp&&this.appendChild(this.selectPageSizeComp))}},{key:"reset",value:function(){Ia(this.getGui()),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0)}},{key:"onPageSizeSelectorValuesChange",value:function(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}},{key:"shouldShowPageSizeSelector",value:function(){return this.gridOptionsService.get("pagination")&&!this.gridOptionsService.get("suppressPaginationPanel")&&!this.gridOptionsService.get("paginationAutoPageSize")&&!1!==this.gridOptionsService.get("paginationPageSizeSelector")}},{key:"reloadPageSizesSelector",value:function(){var e=this,t=this.getPageSizeSelectorValues(),n=this.paginationProxy.getPageSize(),i=!n||!t.includes(n);i&&(t.unshift(""),oi("The paginationPageSize grid option is set to a value that is not in the list of page size options.\n                Please make sure that the paginationPageSize grid option is set to one of the values in the \n                paginationPageSizeSelector array, or set the paginationPageSizeSelector to false to hide the page size selector.")),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0);var r=this.localeService.getLocaleTextFunc(),o=r("pageSizeSelectorLabel","Page Size:"),a=t.map((function(e){return{value:String(e),text:String(e)}})),s=r("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new $s).addOptions(a).setValue(String(i?"":n)).setAriaLabel(s).setLabel(o).onValueChange((function(){return e.handlePageSizeItemSelected()})),this.hasEmptyOption=i}},{key:"getPageSizeSelectorValues",value:function(){var e=this.gridOptionsService.get("paginationPageSizeSelector");return Array.isArray(e)&&this.validateValues(e)?(0,o.Z)(e).sort((function(e,t){return e-t})):[20,50,100]}},{key:"validateValues",value:function(e){if(!e.length)return oi("The paginationPageSizeSelector grid option is an empty array. This is most likely a mistake.\n                If you want to hide the page size selector, please set the paginationPageSizeSelector to false."),!1;for(var t=0;t<e.length;t++){var n=e[t],i=n>0;if(!("number"===typeof n))return oi("The paginationPageSizeSelector grid option contains a non-numeric value.\n                    Please make sure that all values in the paginationPageSizeSelector array are numbers."),!1;if(!i)return oi("The paginationPageSizeSelector grid option contains a negative number or zero.\n                    Please make sure that all values in the paginationPageSizeSelector array are positive."),!1}return!0}},{key:"destroy",value:function(){this.toggleSelectDisplay(!1),(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this)}}]),n}(Ns);Mn([Di("localeService")],Mp.prototype,"localeService",2),Mn([Di("gridOptionsService")],Mp.prototype,"gridOptionsService",2),Mn([Di("paginationProxy")],Mp.prototype,"paginationProxy",2),Mn([Ei],Mp.prototype,"init",1);var Np=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.call(this)).descriptionContainer=null,e.announceValue=fi(e.announceValue.bind((0,He.Z)(e)),200),e}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this.gridOptionsService.getDocument(),t=this.descriptionContainer=e.createElement("div");t.classList.add("ag-aria-description-container"),co(t,"polite"),po(t,"additions text"),ho(t,!0),this.eGridDiv.appendChild(t)}},{key:"announceValue",value:function(e){var t=this;this.descriptionContainer&&(this.descriptionContainer.textContent="",setTimeout((function(){t.isAlive()&&t.descriptionContainer&&(t.descriptionContainer.textContent=e)}),50))}},{key:"destroy",value:function(){(0,mn.Z)((0,yn.Z)(n.prototype),"destroy",this).call(this);var e=this.descriptionContainer;e&&(Ia(e),e.parentElement&&e.parentElement.removeChild(e)),this.descriptionContainer=null,this.eGridDiv=null}}]),n}(kr);Mn([Di("eGridDiv")],Np.prototype,"eGridDiv",2),Mn([Ei],Np.prototype,"postConstruct",1),Np=Mn([Ri("ariaAnnouncementService")],Np);var Lp=1,Ip=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"create",value:function(e,t,n,i,r){var o,a=!!t.debug,s=null!=(o=t.gridId)?o:String(Lp++),l=this.getRegisteredModules(r,s),u=this.createBeansList(t.rowModelType,l,s),c=this.createProvidedBeans(e,t,r);if(u){var d={providedBeanInstances:c,beanClasses:u,debug:a,gridId:s},h=new Oh("Context",(function(){return d.debug})),p=new Si(d,h),f=p.getBean("beans");return this.registerModuleUserComponents(f,l),this.registerStackComponents(f,l),this.registerControllers(f,l),n(p),f.syncService.start(),i&&i(p),f.gridApi}ai("Failed to create grid.")}},{key:"registerControllers",value:function(e,t){t.forEach((function(t){t.controllers&&t.controllers.forEach((function(t){return e.ctrlsFactory.register(t)}))}))}},{key:"registerStackComponents",value:function(e,t){var n=this.createAgStackComponentsList(t);e.agStackComponentsRegistry.setupComponents(n)}},{key:"getRegisteredModules",value:function(e,t){var n=e?e.modules:null,i=wi.__getRegisteredModules(t),r=[],o={},a=function e(t,n,i){var a;o[(a=n).moduleName]||(o[a.moduleName]=!0,r.push(a),wi.__register(a,t,i)),n.dependantModules&&n.dependantModules.forEach((function(n){return e(t,n,i)}))};return n&&n.forEach((function(e){return a(!0,e,t)})),i&&i.forEach((function(e){return a(!wi.__isPackageBased(),e,void 0)})),r}},{key:"registerModuleUserComponents",value:function(e,t){this.extractModuleEntity(t,(function(e){return e.userComponents?e.userComponents:[]})).forEach((function(t){e.userComponentRegistry.registerDefaultComponent(t.componentName,t.componentClass)}))}},{key:"createProvidedBeans",value:function(e,t,n){var i=n?n.frameworkOverrides:null;_n(i)&&(i=new kh);var r={gridOptions:t,eGridDiv:e,globalEventListener:n?n.globalEventListener:null,globalSyncEventListener:n?n.globalSyncEventListener:null,frameworkOverrides:i};return n&&n.providedBeanInstances&&Object.assign(r,n.providedBeanInstances),r}},{key:"createAgStackComponentsList",value:function(e){var t=[{componentName:"AgCheckbox",componentClass:tl},{componentName:"AgRadioButton",componentClass:nl},{componentName:"AgToggleButton",componentClass:Wd},{componentName:"AgInputTextField",componentClass:fl},{componentName:"AgInputTextArea",componentClass:zd},{componentName:"AgInputNumberField",componentClass:vl},{componentName:"AgInputDateField",componentClass:Ud},{componentName:"AgInputRange",componentClass:jd},{componentName:"AgRichSelect",componentClass:qd},{componentName:"AgSelect",componentClass:$s},{componentName:"AgSlider",componentClass:Jd},{componentName:"AgGridBody",componentClass:Ic},{componentName:"AgHeaderRoot",componentClass:kd},{componentName:"AgSortIndicator",componentClass:Al},{componentName:"AgPagination",componentClass:jh},{componentName:"AgPageSizeSelector",componentClass:Mp},{componentName:"AgOverlayWrapper",componentClass:Yh},{componentName:"AgGroupComponent",componentClass:eh},{componentName:"AgRowContainer",componentClass:Wc},{componentName:"AgFakeHorizontalScroll",componentClass:cp},{componentName:"AgFakeVerticalScroll",componentClass:Sp},{componentName:"AgAutocomplete",componentClass:vh}],n=this.extractModuleEntity(e,(function(e){return e.agStackComponents?e.agStackComponents:[]}));return t=t.concat(n)}},{key:"createBeansList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"clientSide",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=t.filter((function(t){return!t.rowModel||t.rowModel===e})),r={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(r[e]){if(wi.__assertRegistered(r[e],"rowModelType = '".concat(e,"'"),n)){var a=[cc,Xh,qh,np,Fh,Xu,ku,Zh,Vh,Dd,Vu,zh,wd,kp,Pp,Fd,Uu,zr,Mi,Cp,ch,bh,Qu,Hr,md,Hd,Nd,Rh,wr,Dh,Sh,Gc,_h,xh,Th,Wr,Ad,Sd,Xl,Eh,Nh,_c,Wh,wh,Id,Bd,Fc,Mh,Lh,Ih,Uh,Tr,Gh,Td,tp,qr,ip,rp,Vd,op,ap,dp,hp,sp,xp,Rp,qu,Dp,Tp,Op,Od,Ap,Np,Pd],s=this.extractModuleEntity(i,(function(e){return e.beans?e.beans:[]}));a.push.apply(a,(0,o.Z)(s));var l=[];return a.forEach((function(e){l.indexOf(e)<0&&l.push(e)})),l}}else ai("Could not find row model for rowModelType = "+e)}},{key:"extractModuleEntity",value:function(e,t){var n;return(n=[]).concat.apply(n,(0,o.Z)(e.map(t)))}}]),e}(),Fp=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"wrap",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,o=this.createWrapper(e,r);return t.forEach((function(e){n.createMethod(o,e,!0)})),i.forEach((function(e){n.createMethod(o,e,!1)})),o}},{key:"unwrap",value:function(e){return e}},{key:"createMethod",value:function(e,t,n){e.addMethod(t,this.createMethodProxy(e,t,n))}},{key:"createMethodProxy",value:function(e,t,n){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(n&&console.warn("AG Grid: Framework component is missing the method "+t+"()"),null)}}}]),e}(),_p="undefined"===typeof global?{}:global;_p.HTMLElement="undefined"===typeof HTMLElement?{}:HTMLElement,_p.HTMLButtonElement="undefined"===typeof HTMLButtonElement?{}:HTMLButtonElement,_p.HTMLSelectElement="undefined"===typeof HTMLSelectElement?{}:HTMLSelectElement,_p.HTMLInputElement="undefined"===typeof HTMLInputElement?{}:HTMLInputElement,_p.Node="undefined"===typeof Node?{}:Node,_p.MouseEvent="undefined"===typeof MouseEvent?{}:MouseEvent;var Gp=function(){function e(t,n,i,r,o,s){(0,a.Z)(this,e),this.nextId=0,this.rowCountReady=!1,this.allNodesMap={},this.rootNode=t,this.gridOptionsService=n,this.eventService=i,this.columnModel=r,this.beans=s,this.selectionService=o,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id=e.ROOT_NODE_ID,this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[]}return(0,s.Z)(e,[{key:"getCopyOfNodesMap",value:function(){return Es.cloneObject(this.allNodesMap)}},{key:"getRowNode",value:function(e){return this.allNodesMap[e]}},{key:"setRowData",value:function(t){var n=this;if("string"!==typeof t){this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(t);var i=this.rootNode,r=this.rootNode.sibling;i.childrenAfterFilter=null,i.childrenAfterGroup=null,i.childrenAfterAggFilter=null,i.childrenAfterSort=null,i.childrenMapped=null,i.updateHasChildren(),this.nextId=0,this.allNodesMap={},t?i.allLeafChildren=t.map((function(t){return n.createNode(t,n.rootNode,e.TOP_LEVEL)})):(i.allLeafChildren=[],i.childrenAfterGroup=[]),r&&(r.childrenAfterFilter=i.childrenAfterFilter,r.childrenAfterGroup=i.childrenAfterGroup,r.childrenAfterAggFilter=i.childrenAfterAggFilter,r.childrenAfterSort=i.childrenAfterSort,r.childrenMapped=i.childrenMapped,r.allLeafChildren=i.allLeafChildren)}else console.warn("AG Grid: rowData must be an array, however you passed in a string. If you are loading JSON, make sure you convert the JSON string to JavaScript objects first")}},{key:"updateRowData",value:function(e,t){this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(e.add);var n={remove:[],update:[],add:[]},i=[];return this.executeRemove(e,n,i),this.executeUpdate(e,n,i),this.executeAdd(e,n),this.updateSelection(i,"rowDataChanged"),t&&Es.sortRowNodesByOrder(this.rootNode.allLeafChildren,t),n}},{key:"isRowCountReady",value:function(){return this.rowCountReady}},{key:"dispatchRowDataUpdateStartedEvent",value:function(e){var t={type:Er.EVENT_ROW_DATA_UPDATE_STARTED,firstRowData:(null==e?void 0:e.length)?e[0]:null};this.eventService.dispatchEvent(t)}},{key:"updateSelection",value:function(e,t){var n=e.length>0;if(n&&this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),this.selectionService.updateGroupsFromChildrenSelections(t),n){var i={type:Er.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(i)}}},{key:"executeAdd",value:function(t,n){var i,r=this,a=t.add,s=t.addIndex;if(!Es.missingOrEmpty(a)){var l=a.map((function(t){return r.createNode(t,r.rootNode,e.TOP_LEVEL)}));if("number"===typeof s&&s>=0){var u=this.rootNode.allLeafChildren,c=u.length,d=s;if(this.gridOptionsService.get("treeData")&&s>0&&c>0)for(var h=0;h<c;h++)if((null==(i=u[h])?void 0:i.rowIndex)==s-1){d=h+1;break}var p=u.slice(0,d),f=u.slice(d,u.length);this.rootNode.allLeafChildren=[].concat((0,o.Z)(p),(0,o.Z)(l),(0,o.Z)(f))}else this.rootNode.allLeafChildren=[].concat((0,o.Z)(this.rootNode.allLeafChildren),(0,o.Z)(l));this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren),n.add=l}}},{key:"executeRemove",value:function(e,t,n){var i=this,r=e.remove;if(!Es.missingOrEmpty(r)){var o={};r.forEach((function(e){var r=i.lookupRowNode(e);r&&(r.isSelected()&&n.push(r),r.clearRowTopAndRowIndex(),o[r.id]=!0,delete i.allNodesMap[r.id],t.remove.push(r))})),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren.filter((function(e){return!o[e.id]})),this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren)}}},{key:"executeUpdate",value:function(t,n,i){var r=this,o=t.update;Es.missingOrEmpty(o)||o.forEach((function(t){var o=r.lookupRowNode(t);o&&(o.updateData(t),!o.selectable&&o.isSelected()&&i.push(o),r.setMasterForRow(o,t,e.TOP_LEVEL,!1),n.update.push(o))}))}},{key:"lookupRowNode",value:function(e){var t,n=this.gridOptionsService.getCallback("getRowId");if(n){var i=n({data:e,level:0});if(!(t=this.allNodesMap[i]))return console.error("AG Grid: could not find row id=".concat(i,", data item was not found for this id")),null}else if(!(t=this.rootNode.allLeafChildren.find((function(t){return t.data===e}))))return console.error("AG Grid: could not find data item as object was not found",e),console.error("Consider using getRowId to help the Grid find matching row data"),null;return t||null}},{key:"createNode",value:function(e,t,n){var i=new jl(this.beans);i.group=!1,this.setMasterForRow(i,e,n,!0);var r=this.gridOptionsService.get("suppressParentsInRowNodes");return t&&!r&&(i.parent=t),i.level=n,i.setDataAndId(e,this.nextId.toString()),this.allNodesMap[i.id]&&console.warn("AG Grid: duplicate node id '".concat(i.id,"' detected from getRowId callback, this could cause issues in your grid.")),this.allNodesMap[i.id]=i,this.nextId++,i}},{key:"setMasterForRow",value:function(e,t,n,i){if(this.gridOptionsService.get("treeData"))e.setMaster(!1),i&&(e.expanded=!1);else{if(this.gridOptionsService.get("masterDetail")){var r=this.gridOptionsService.get("isRowMaster");r?e.setMaster(r(t)):e.setMaster(!0)}else e.setMaster(!1);if(i){var o=this.columnModel.getRowGroupColumns(),a=n+(o?o.length:0);e.expanded=!!e.master&&this.isExpanded(a)}}}},{key:"isExpanded",value:function(e){var t=this.gridOptionsService.get("groupDefaultExpanded");return-1===t||e<t}}]),e}();Gp.TOP_LEVEL=0,Gp.ROOT_NODE_ID="ROOT_NODE_ID";var Zp=Gp,Vp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).onRowHeightChanged_debounced=Es.debounce(e.onRowHeightChanged.bind((0,He.Z)(e)),100),e.rowsToDisplay=[],e.hasStarted=!1,e.shouldSkipSettingDataOnStart=!1,e.isRefreshingModel=!1,e.rowCountReady=!1,e}return(0,s.Z)(n,[{key:"init",value:function(){var e=this,t=this.refreshModel.bind(this,{step:"group"}),n=!this.gridOptionsService.get("suppressAnimationFrame"),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:n});this.addManagedListener(this.eventService,Er.EVENT_NEW_COLUMNS_LOADED,i),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_ROW_GROUP_CHANGED,t),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_VALUE_CHANGED,this.onValueChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_PIVOT_CHANGED,this.refreshModel.bind(this,{step:"pivot"})),this.addManagedListener(this.eventService,Er.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_COLUMN_PIVOT_MODE_CHANGED,t),this.addManagedListener(this.eventService,Er.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanges.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_GRID_READY,(function(){return e.onGridReady()})),this.addPropertyListeners(),this.rootNode=new jl(this.beans),this.nodeManager=new Zp(this.rootNode,this.gridOptionsService,this.eventService,this.columnModel,this.selectionService,this.beans)}},{key:"addPropertyListeners",value:function(){var e=this,t=new Set(["treeData","masterDetail"]),n=new Set(["suppressParentsInRowNodes","groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),i=new Set(["excludeChildrenWhenTreeDataFiltering"]),r=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),a=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly"]),s=new Set(["postSortRows","groupDisplayType","accentedSort"]),l=new Set([]),u=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter"]),c=[].concat((0,o.Z)(t),(0,o.Z)(n),(0,o.Z)(i),(0,o.Z)(r),(0,o.Z)(r),(0,o.Z)(a),(0,o.Z)(s),(0,o.Z)(l),(0,o.Z)(u));this.addManagedPropertyListeners(c,(function(o){var c,d=null==(c=o.changeSet)?void 0:c.properties;if(d){var h=function(e){return d.some((function(t){return e.has(t)}))};h(t)?e.setRowData(e.rootNode.allLeafChildren.map((function(e){return e.data}))):h(n)?e.refreshModel({step:"group"}):h(i)?e.refreshModel({step:"filter"}):h(r)?e.refreshModel({step:"pivot"}):h(a)?e.refreshModel({step:"aggregate"}):h(s)?e.refreshModel({step:"sort"}):h(l)?e.refreshModel({step:"filter_aggregates"}):h(u)&&e.refreshModel({step:"map"})}})),this.addManagedPropertyListener("rowHeight",(function(){return e.resetRowHeights()}))}},{key:"start",value:function(){this.hasStarted=!0,this.shouldSkipSettingDataOnStart?this.dispatchUpdateEventsAndRefresh():this.setInitialData()}},{key:"setInitialData",value:function(){var e=this.gridOptionsService.get("rowData");e&&(this.shouldSkipSettingDataOnStart=!0,this.setRowData(e))}},{key:"ensureRowHeightsValid",value:function(e,t,n,i){var r,o=!1;do{r=!1;for(var a=this.getRowIndexAtPixel(e),s=this.getRowIndexAtPixel(t),l=Math.max(a,n),u=Math.min(s,i),c=l;c<=u;c++){var d=this.getRow(c);if(d.rowHeightEstimated){var h=this.gridOptionsService.getRowHeightForNode(d);d.setRowHeight(h.height),r=!0,o=!0}}r&&this.setRowTopAndRowIndex()}while(r);return o}},{key:"setRowTopAndRowIndex",value:function(){for(var e=this.environment.getDefaultRowHeight(),t=0,n=new Set,i=this.gridOptionsService.isDomLayout("normal"),r=0;r<this.rowsToDisplay.length;r++){var o=this.rowsToDisplay[r];if(null!=o.id&&n.add(o.id),null==o.rowHeight){var a=this.gridOptionsService.getRowHeightForNode(o,i,e);o.setRowHeight(a.height,a.estimated)}o.setRowTop(t),o.setRowIndex(r),t+=o.rowHeight}return n}},{key:"clearRowTopAndRowIndex",value:function(e,t){var n=e.isActive(),i=function(e){e&&null!=e.id&&!t.has(e.id)&&e.clearRowTopAndRowIndex()};!function e(t){if(i(t),i(t.detailNode),i(t.sibling),t.hasChildren()&&t.childrenAfterGroup){var r=-1==t.level;n&&!r&&!t.expanded||t.childrenAfterGroup.forEach(e)}}(this.rootNode)}},{key:"ensureRowsAtPixel",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.getRowIndexAtPixel(t),o=this.getRow(r),a=!this.gridOptionsService.get("suppressAnimationFrame");return o!==e[0]&&(e.forEach((function(e){Es.removeFromArray(n.rootNode.allLeafChildren,e)})),e.forEach((function(e,t){Es.insertIntoArray(n.rootNode.allLeafChildren,e,Math.max(r+i,0)+t)})),this.refreshModel({step:"group",keepRenderedRows:!0,keepEditingRows:!0,animate:a}),!0)}},{key:"highlightRowAtPixel",value:function(e,t){var n=null!=t?this.getRowIndexAtPixel(t):null,i=null!=n?this.getRow(n):null;if(i&&e&&i!==e&&null!=t){var r=this.getHighlightPosition(t,i);this.lastHighlightedRow&&this.lastHighlightedRow!==i&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),i.setHighlighted(r),this.lastHighlightedRow=i}else this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null)}},{key:"getHighlightPosition",value:function(e,t){if(!t){var n=this.getRowIndexAtPixel(e);if(!(t=this.getRow(n||0)))return 1}var i=t;return e-i.rowTop<i.rowHeight/2?0:1}},{key:"getLastHighlightedRowNode",value:function(){return this.lastHighlightedRow}},{key:"isLastRowIndexKnown",value:function(){return!0}},{key:"getRowCount",value:function(){return this.rowsToDisplay?this.rowsToDisplay.length:0}},{key:"getTopLevelRowCount",value:function(){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return 1;var e=this.rootNode.childrenAfterAggFilter;return e?e.length:0}},{key:"getTopLevelRowDisplayedIndex",value:function(e){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return e;var t=this.rootNode.childrenAfterSort[e];if(this.gridOptionsService.get("groupHideOpenParents"))for(;t.expanded&&t.childrenAfterSort&&t.childrenAfterSort.length>0;)t=t.childrenAfterSort[0];return t.rowIndex}},{key:"getRowBounds",value:function(e){if(Es.missing(this.rowsToDisplay))return null;var t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}},{key:"onRowGroupOpened",value:function(){var e=this.gridOptionsService.isAnimateRows();this.refreshModel({step:"map",keepRenderedRows:!0,animate:e})}},{key:"onFilterChanged",value:function(e){if(!e.afterDataChange){var t=this.gridOptionsService.isAnimateRows(),n=0===e.columns.length||e.columns.some((function(e){return e.isPrimary()}))?"filter":"filter_aggregates";this.refreshModel({step:n,keepRenderedRows:!0,animate:t})}}},{key:"onSortChanged",value:function(){var e=this.gridOptionsService.isAnimateRows();this.refreshModel({step:"sort",keepRenderedRows:!0,animate:e,keepEditingRows:!0})}},{key:"getType",value:function(){return"clientSide"}},{key:"onValueChanged",value:function(){this.columnModel.isPivotActive()?this.refreshModel({step:"pivot"}):this.refreshModel({step:"aggregate"})}},{key:"createChangePath",value:function(e){var t=Es.missingOrEmpty(e),n=new _d(!1,this.rootNode);return(t||this.gridOptionsService.get("treeData"))&&n.setInactive(),n}},{key:"isSuppressModelUpdateAfterUpdateTransaction",value:function(e){if(!this.gridOptionsService.get("suppressModelUpdateAfterUpdateTransaction"))return!1;if(null==e.rowNodeTransactions)return!1;var t=e.rowNodeTransactions.filter((function(e){return null!=e.add&&e.add.length>0||null!=e.remove&&e.remove.length>0}));return null==t||0==t.length}},{key:"buildRefreshModelParams",value:function(e){var t="group",n={everything:"group",group:"group",filter:"filter",map:"map",aggregate:"aggregate",sort:"sort",pivot:"pivot"};if(Es.exists(e)&&(t=n[e]),!Es.missing(t))return{step:t,keepRenderedRows:!0,keepEditingRows:!0,animate:!this.gridOptionsService.get("suppressAnimationFrame")};console.error("AG Grid: invalid step ".concat(e,", available steps are ").concat(Object.keys(n).join(", ")))}},{key:"refreshModel",value:function(e){if(this.hasStarted&&!this.isRefreshingModel&&!this.columnModel.shouldRowModelIgnoreRefresh()){var t="object"===typeof e&&"step"in e?e:this.buildRefreshModelParams(e);if(t&&!this.isSuppressModelUpdateAfterUpdateTransaction(t)){var n=this.createChangePath(t.rowNodeTransactions);switch(this.isRefreshingModel=!0,t.step){case"group":this.doRowGrouping(t.rowNodeTransactions,t.rowNodeOrder,n,!!t.afterColumnsChanged);case"filter":this.doFilter(n);case"pivot":this.doPivot(n);case"aggregate":this.doAggregate(n);case"filter_aggregates":this.doFilterAggregates(n);case"sort":this.doSort(t.rowNodeTransactions,n);case"map":this.doRowsToDisplay()}var i=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(n,i),this.isRefreshingModel=!1;var r={type:Er.EVENT_MODEL_UPDATED,animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack};this.eventService.dispatchEvent(r)}}}},{key:"isEmpty",value:function(){var e=Es.missing(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length;return Es.missing(this.rootNode)||e||!this.columnModel.isReady()}},{key:"isRowsToRender",value:function(){return Es.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0}},{key:"getNodesInRangeForSelection",value:function(e,t){var n=!t,i=!1,r=[],a=this.gridOptionsService.get("groupSelectsChildren");return this.forEachNodeAfterFilterAndSort((function(s){if(!i)if(n&&(s===t||s===e)&&(i=!0,s.group&&a))r.push.apply(r,(0,o.Z)(s.allLeafChildren));else{if(!n){if(s!==t&&s!==e)return;n=!0}(!s.group||!a)&&r.push(s)}})),r}},{key:"setDatasource",value:function(e){console.error("AG Grid: should never call setDatasource on clientSideRowController")}},{key:"getTopLevelNodes",value:function(){return this.rootNode?this.rootNode.childrenAfterGroup:null}},{key:"getRootNode",value:function(){return this.rootNode}},{key:"getRow",value:function(e){return this.rowsToDisplay[e]}},{key:"isRowPresent",value:function(e){return this.rowsToDisplay.indexOf(e)>=0}},{key:"getRowIndexAtPixel",value:function(e){if(this.isEmpty()||0===this.rowsToDisplay.length)return-1;var t=0,n=this.rowsToDisplay.length-1;if(e<=0)return 0;if(Es.last(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;for(var i=-1,r=-1;;){var o=Math.floor((t+n)/2),a=this.rowsToDisplay[o];if(this.isRowInPixel(a,e))return o;if(a.rowTop<e?t=o+1:a.rowTop>e&&(n=o-1),i===t&&r===n)return o;i=t,r=n}}},{key:"isRowInPixel",value:function(e,t){var n=e.rowTop,i=e.rowTop+e.rowHeight;return n<=t&&i>t}},{key:"forEachLeafNode",value:function(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach((function(t,n){return e(t,n)}))}},{key:"forEachNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.recursivelyWalkNodesAndCallback({nodes:(0,o.Z)(this.rootNode.childrenAfterGroup||[]),callback:e,recursionType:0,index:0,includeFooterNodes:t})}},{key:"forEachNodeAfterFilter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.recursivelyWalkNodesAndCallback({nodes:(0,o.Z)(this.rootNode.childrenAfterAggFilter||[]),callback:e,recursionType:1,index:0,includeFooterNodes:t})}},{key:"forEachNodeAfterFilterAndSort",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.recursivelyWalkNodesAndCallback({nodes:(0,o.Z)(this.rootNode.childrenAfterSort||[]),callback:e,recursionType:2,index:0,includeFooterNodes:t})}},{key:"forEachPivotNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:e,recursionType:3,index:0,includeFooterNodes:t})}},{key:"recursivelyWalkNodesAndCallback",value:function(e){for(var t,n=e.nodes,i=e.callback,r=e.recursionType,a=e.includeFooterNodes,s=e.index,l=0;l<n.length;l++){var u=n[l];if(i(u,s++),u.hasChildren()&&!u.footer){var c=null;switch(r){case 0:c=u.childrenAfterGroup;break;case 1:c=u.childrenAfterAggFilter;break;case 2:c=u.childrenAfterSort;break;case 3:c=u.leafGroup?null:u.childrenAfterSort}c&&(s=this.recursivelyWalkNodesAndCallback({nodes:(0,o.Z)(c),callback:i,recursionType:r,index:s,includeFooterNodes:a}))}}var d=null==(t=n[0])?void 0:t.parent;if(!a||!d)return s;if(d===this.rootNode){if(!this.gridOptionsService.get("groupIncludeTotalFooter"))return s}else if(!this.gridOptionsService.getGroupIncludeFooter()({node:d}))return s;return d.createFooter(),i(d.sibling,s++),s}},{key:"doAggregate",value:function(e){this.aggregationStage&&this.aggregationStage.execute({rowNode:this.rootNode,changedPath:e})}},{key:"doFilterAggregates",value:function(e){this.filterAggregatesStage?this.filterAggregatesStage.execute({rowNode:this.rootNode,changedPath:e}):this.rootNode.childrenAfterAggFilter=this.rootNode.childrenAfterFilter}},{key:"expandOrCollapseAll",value:function(e){var t=this.gridOptionsService.get("treeData"),n=this.columnModel.isPivotActive();this.rootNode&&function i(r){r&&r.forEach((function(r){var o=function(){r.expanded=e,i(r.childrenAfterGroup)};t?Es.exists(r.childrenAfterGroup)&&o():n?!r.leafGroup&&o():r.group&&o()}))}(this.rootNode.childrenAfterGroup),this.refreshModel({step:"map"});var i=e?"expandAll":"collapseAll",r={type:Er.EVENT_EXPAND_COLLAPSE_ALL,source:i};this.eventService.dispatchEvent(r)}},{key:"doSort",value:function(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})}},{key:"doRowGrouping",value:function(e,t,n,i){if(this.groupStage){if(e?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,rowNodeOrder:t,changedPath:n}):this.groupStage.execute({rowNode:this.rootNode,changedPath:n,afterColumnsChanged:i}),this.gridOptionsService.get("groupSelectsChildren")&&this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",n)){var r={type:Er.EVENT_SELECTION_CHANGED,source:"rowGroupChanged"};this.eventService.dispatchEvent(r)}}else this.rootNode.childrenAfterGroup=this.rootNode.allLeafChildren,this.rootNode.sibling&&(this.rootNode.sibling.childrenAfterGroup=this.rootNode.childrenAfterGroup),this.rootNode.updateHasChildren();this.nodeManager.isRowCountReady()&&(this.rowCountReady=!0,this.eventService.dispatchEventOnce({type:Er.EVENT_ROW_COUNT_READY}))}},{key:"doFilter",value:function(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})}},{key:"doPivot",value:function(e){this.pivotStage&&this.pivotStage.execute({rowNode:this.rootNode,changedPath:e})}},{key:"getCopyOfNodesMap",value:function(){return this.nodeManager.getCopyOfNodesMap()}},{key:"getRowNode",value:function(e){if("string"==typeof e&&0==e.indexOf(jl.ID_PREFIX_ROW_GROUP)){var t=void 0;return this.forEachNode((function(n){n.id===e&&(t=n)})),t}return this.nodeManager.getRowNode(e)}},{key:"setRowData",value:function(e){this.selectionService.reset("rowDataChanged"),this.nodeManager.setRowData(e),this.hasStarted&&this.dispatchUpdateEventsAndRefresh()}},{key:"dispatchUpdateEventsAndRefresh",value:function(){var e={type:Er.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(e),this.refreshModel({step:"group",newData:!0})}},{key:"batchUpdateRowData",value:function(e,t){var n=this;if(null==this.applyAsyncTransactionsTimeout){this.rowDataTransactionBatch=[];var i=this.gridOptionsService.getAsyncTransactionWaitMillis();this.applyAsyncTransactionsTimeout=window.setTimeout((function(){n.executeBatchUpdateRowData()}),i)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}},{key:"flushAsyncTransactions",value:function(){null!=this.applyAsyncTransactionsTimeout&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}},{key:"executeBatchUpdateRowData",value:function(){var e=this;this.valueCache.onDataChanged();var t=[],n=[],i=!1;if(this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEach((function(r){var o=e.nodeManager.updateRowData(r.rowDataTransaction,void 0);n.push(o),r.callback&&t.push(r.callback.bind(null,o)),"number"===typeof r.rowDataTransaction.addIndex&&(i=!0)})),this.commonUpdateRowData(n,void 0,i),t.length>0&&window.setTimeout((function(){t.forEach((function(e){return e()}))}),0),n.length>0){var r={type:Er.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:n};this.eventService.dispatchEvent(r)}this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}},{key:"updateRowData",value:function(e,t){this.valueCache.onDataChanged();var n=this.nodeManager.updateRowData(e,t),i="number"===typeof e.addIndex;return this.commonUpdateRowData([n],t,i),n}},{key:"createRowNodeOrder",value:function(){if(!this.gridOptionsService.get("suppressMaintainUnsortedOrder")){var e={};if(this.rootNode&&this.rootNode.allLeafChildren)for(var t=0;t<this.rootNode.allLeafChildren.length;t++){e[this.rootNode.allLeafChildren[t].id]=t}return e}}},{key:"commonUpdateRowData",value:function(e,t,n){if(this.hasStarted){var i=!this.gridOptionsService.get("suppressAnimationFrame");n&&(t=this.createRowNodeOrder());var r={type:Er.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(r),this.refreshModel({step:"group",rowNodeTransactions:e,rowNodeOrder:t,keepRenderedRows:!0,keepEditingRows:!0,animate:i})}}},{key:"doRowsToDisplay",value:function(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})}},{key:"onRowHeightChanged",value:function(){this.refreshModel({step:"map",keepRenderedRows:!0,keepEditingRows:!0,keepUndoRedoStack:!0})}},{key:"onRowHeightChangedDebounced",value:function(){this.onRowHeightChanged_debounced()}},{key:"resetRowHeights",value:function(){var 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()}},{key:"resetRowHeightsForAllRowNodes",value:function(){var e=!1;return this.forEachNode((function(t){t.setRowHeight(t.rowHeight,!0);var n=t.detailNode;n&&n.setRowHeight(n.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0})),e}},{key:"onGridStylesChanges",value:function(){this.columnModel.isAutoRowHeightActive()||this.resetRowHeights()}},{key:"onGridReady",value:function(){this.hasStarted||this.setInitialData()}},{key:"isRowDataLoaded",value:function(){return this.rowCountReady}}]),n}(kr);Mn([Di("columnModel")],Vp.prototype,"columnModel",2),Mn([Di("selectionService")],Vp.prototype,"selectionService",2),Mn([Di("filterManager")],Vp.prototype,"filterManager",2),Mn([Di("valueCache")],Vp.prototype,"valueCache",2),Mn([Di("beans")],Vp.prototype,"beans",2),Mn([Di("filterStage")],Vp.prototype,"filterStage",2),Mn([Di("sortStage")],Vp.prototype,"sortStage",2),Mn([Di("flattenStage")],Vp.prototype,"flattenStage",2),Mn([Ti("groupStage")],Vp.prototype,"groupStage",2),Mn([Ti("aggregationStage")],Vp.prototype,"aggregationStage",2),Mn([Ti("pivotStage")],Vp.prototype,"pivotStage",2),Mn([Ti("filterAggregatesStage")],Vp.prototype,"filterAggregatesStage",2),Mn([Ei],Vp.prototype,"init",1),Vp=Mn([Ri("rowModel")],Vp);var Hp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"execute",value:function(e){var t=e.changedPath;this.filterService.filter(t)}}]),n}(kr);Mn([Di("filterService")],Hp.prototype,"filterService",2),Hp=Mn([Ri("filterStage")],Hp);var Bp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"execute",value:function(e){var t=this,n=this.sortController.getSortOptions(),i=Es.exists(n)&&n.length>0,r=i&&Es.exists(e.rowNodeTransactions)&&this.gridOptionsService.get("deltaSort"),o=n.some((function(e){return t.gridOptionsService.isColumnsSortingCoupledToGroup()?e.column.isPrimary()&&e.column.isRowGroupActive():!!e.column.getColDef().showRowGroup}));this.sortService.sort(n,i,r,e.rowNodeTransactions,e.changedPath,o)}}]),n}(kr);Mn([Di("sortService")],Bp.prototype,"sortService",2),Mn([Di("sortController")],Bp.prototype,"sortController",2),Bp=Mn([Ri("sortStage")],Bp);var Wp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"execute",value:function(e){var t=e.rowNode,n=[],i=this.columnModel.isPivotMode(),r=i&&t.leafGroup,o=r?[t]:t.childrenAfterSort,a=this.getFlattenDetails();return this.recursivelyAddToRowsToDisplay(a,o,n,i,0),!r&&n.length>0&&a.groupIncludeTotalFooter&&(t.createFooter(),this.addRowNodeToRowsToDisplay(a,t.sibling,n,0)),n}},{key:"getFlattenDetails",value:function(){var e=this.gridOptionsService.get("groupRemoveSingleChildren");return{groupRemoveLowestSingleChildren:!e&&this.gridOptionsService.get("groupRemoveLowestSingleChildren"),groupRemoveSingleChildren:e,isGroupMultiAutoColumn:this.gridOptionsService.isGroupMultiAutoColumn(),hideOpenParents:this.gridOptionsService.get("groupHideOpenParents"),groupIncludeTotalFooter:this.gridOptionsService.get("groupIncludeTotalFooter"),getGroupIncludeFooter:this.gridOptionsService.getGroupIncludeFooter()}}},{key:"recursivelyAddToRowsToDisplay",value:function(e,t,n,i,r){if(!Es.missingOrEmpty(t))for(var o=0;o<t.length;o++){var a=t[o],s=a.hasChildren(),l=i&&!s,u=e.groupRemoveSingleChildren&&s&&1===a.childrenAfterGroup.length,c=e.groupRemoveLowestSingleChildren&&s&&a.leafGroup&&1===a.childrenAfterGroup.length,d=i&&a.leafGroup,h=e.hideOpenParents&&a.expanded&&!a.master&&!d;if(!l&&!h&&!u&&!c&&this.addRowNodeToRowsToDisplay(e,a,n,r),!i||!a.leafGroup)if(s){var p=u||c;if(a.expanded||p){var f=p?r:r+1;this.recursivelyAddToRowsToDisplay(e,a.childrenAfterSort,n,i,f),e.getGroupIncludeFooter({node:a})?(a.createFooter(),this.addRowNodeToRowsToDisplay(e,a.sibling,n,f)):a.destroyFooter()}}else if(a.master&&a.expanded){var v=this.createDetailNode(a);this.addRowNodeToRowsToDisplay(e,v,n,r)}}}},{key:"addRowNodeToRowsToDisplay",value:function(e,t,n,i){n.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:i)}},{key:"createDetailNode",value:function(e){if(Es.exists(e.detailNode))return e.detailNode;var t=new jl(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,Es.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t}}]),n}(kr);Mn([Di("columnModel")],Wp.prototype,"columnModel",2),Mn([Di("beans")],Wp.prototype,"beans",2),Wp=Mn([Ri("flattenStage")],Wp);var zp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"sort",value:function(e,t,n,i,r,o){var a=this,s=this.gridOptionsService.get("groupMaintainOrder"),l=this.columnModel.getAllGridColumns().some((function(e){return e.isRowGroupActive()})),u={};n&&i&&(u=this.calculateDirtyNodes(i));var c=this.columnModel.isPivotMode(),d=this.gridOptionsService.getCallback("postSortRows");r&&r.forEachChangedNodeDepthFirst((function(i){var h;a.pullDownGroupDataForHideOpenParents(i.childrenAfterAggFilter,!0);var p=c&&i.leafGroup;if(s&&l&&!i.leafGroup&&!o){var f=null==(h=a.columnModel.getRowGroupColumns())?void 0:h[i.level+1],v=null===(null==f?void 0:f.getSort()),g=i.childrenAfterAggFilter.slice(0);if(i.childrenAfterSort&&!v){var m={};i.childrenAfterSort.forEach((function(e,t){m[e.id]=t})),g.sort((function(e,t){var n,i;return(null!=(n=m[e.id])?n:0)-(null!=(i=m[t.id])?i:0)}))}i.childrenAfterSort=g}else i.childrenAfterSort=!t||p?i.childrenAfterAggFilter.slice(0):n?a.doDeltaSort(i,u,r,e):a.rowNodeSorter.doFullSort(i.childrenAfterAggFilter,e);if(i.sibling&&(i.sibling.childrenAfterSort=i.childrenAfterSort),a.updateChildIndexes(i),d){var y={nodes:i.childrenAfterSort};d(y)}})),this.updateGroupDataForHideOpenParents(r)}},{key:"calculateDirtyNodes",value:function(e){var t={},n=function(e){e&&e.forEach((function(e){return t[e.id]=!0}))};return e&&e.forEach((function(e){n(e.add),n(e.update),n(e.remove)})),t}},{key:"doDeltaSort",value:function(e,t,n,i){var r=this,o=e.childrenAfterAggFilter,a=e.childrenAfterSort;if(!a)return this.rowNodeSorter.doFullSort(o,i);var s={},l=[];o.forEach((function(e){t[e.id]||!n.canSkip(e)?l.push(e):s[e.id]=!0}));var u=a.filter((function(e){return s[e.id]})),c=function(e,t){return{currentPos:t,rowNode:e}},d=l.map(c).sort((function(e,t){return r.rowNodeSorter.compareRowNodes(i,e,t)}));return this.mergeSortedArrays(i,d,u.map(c)).map((function(e){return e.rowNode}))}},{key:"mergeSortedArrays",value:function(e,t,n){for(var i=[],r=0,o=0;r<t.length&&o<n.length;){this.rowNodeSorter.compareRowNodes(e,t[r],n[o])<0?i.push(t[r++]):i.push(n[o++])}for(;r<t.length;)i.push(t[r++]);for(;o<n.length;)i.push(n[o++]);return i}},{key:"updateChildIndexes",value:function(e){if(!Es.missing(e.childrenAfterSort))for(var t=e.childrenAfterSort,n=0;n<t.length;n++){var i=t[n],r=0===n,o=n===e.childrenAfterSort.length-1;i.setFirstChild(r),i.setLastChild(o),i.setChildIndex(n)}}},{key:"updateGroupDataForHideOpenParents",value:function(e){var t=this;if(this.gridOptionsService.get("groupHideOpenParents")){if(this.gridOptionsService.get("treeData"))return Es.warnOnce("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;var n=function e(n){t.pullDownGroupDataForHideOpenParents(n.childrenAfterSort,!1),n.childrenAfterSort.forEach((function(t){t.hasChildren()&&e(t)}))};e&&e.executeFromRootNode((function(e){return n(e)}))}}},{key:"pullDownGroupDataForHideOpenParents",value:function(e,t){var n=this;this.gridOptionsService.get("groupHideOpenParents")&&!Es.missing(e)&&e.forEach((function(e){n.columnModel.getGroupDisplayColumns().forEach((function(i){var r=i.getColDef().showRowGroup;if("string"===typeof r){var o=r,a=n.columnModel.getPrimaryColumn(o);if(!(a===e.rowGroupColumn))if(t)e.setGroupValue(i.getId(),void 0);else{var s=e.getFirstChildOfFirstChild(a);s&&e.setGroupValue(i.getId(),s.key)}}else console.error("AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup")}))}))}}]),n}(kr);Mn([Di("columnModel")],zp.prototype,"columnModel",2),Mn([Di("rowNodeSorter")],zp.prototype,"rowNodeSorter",2),zp=Mn([Ri("sortService")],zp);var Up=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"filter",value:function(e){var t=this.filterManager.isChildFilterPresent();this.filterNodes(t,e)}},{key:"filterNodes",value:function(e,t){var n=this,i=function(t,i){t.hasChildren()?t.childrenAfterFilter=e&&!i?t.childrenAfterGroup.filter((function(e){var t=e.childrenAfterFilter&&e.childrenAfterFilter.length>0,i=e.data&&n.filterManager.doesRowPassFilter({rowNode:e});return t||i})):t.childrenAfterGroup:t.childrenAfterFilter=t.childrenAfterGroup,t.sibling&&(t.sibling.childrenAfterFilter=t.childrenAfterFilter)};if(this.doingTreeDataFiltering()){var r=function e(t,r){if(t.childrenAfterGroup)for(var o=0;o<t.childrenAfterGroup.length;o++){var a=t.childrenAfterGroup[o],s=r||n.filterManager.doesRowPassFilter({rowNode:a});a.childrenAfterGroup?e(t.childrenAfterGroup[o],s):i(a,s)}i(t,r)};t.executeFromRootNode((function(e){return r(e,!1)}))}else{t.forEachChangedNodeDepthFirst((function(e){return i(e,!1)}),!0)}}},{key:"doingTreeDataFiltering",value:function(){return this.gridOptionsService.get("treeData")&&!this.gridOptionsService.get("excludeChildrenWhenTreeDataFiltering")}}]),n}(kr);Mn([Di("filterManager")],Up.prototype,"filterManager",2),Up=Mn([Ri("filterService")],Up);var jp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"postConstruct",value:function(){var e=this;"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel,this.addManagedPropertyListener("rowData",(function(){return e.onRowDataUpdated()})))}},{key:"isActive",value:function(){var e=this.gridOptionsService.exists("getRowId");return!this.gridOptionsService.get("resetRowDataOnUpdate")&&e}},{key:"setRowData",value:function(e){var t=this.createTransactionForRowData(e);if(t){var n=(0,r.Z)(t,2),i=n[0],o=n[1];this.clientSideRowModel.updateRowData(i,o)}}},{key:"createTransactionForRowData",value:function(e){if(Es.missing(this.clientSideRowModel))console.error("AG Grid: ImmutableService only works with ClientSideRowModel");else{var t=this.gridOptionsService.getCallback("getRowId");if(null!=t){var n={remove:[],update:[],add:[]},i=this.clientSideRowModel.getCopyOfNodesMap(),r=this.gridOptionsService.get("suppressMaintainUnsortedOrder")?void 0:{};return Es.exists(e)&&e.forEach((function(e,o){var a=t({data:e,level:0}),s=i[a];(r&&(r[a]=o),s)?(s.data!==e&&n.update.push(e),i[a]=void 0):n.add.push(e)})),Es.iterateObject(i,(function(e,t){t&&n.remove.push(t.data)})),[n,r]}console.error("AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!")}}},{key:"onRowDataUpdated",value:function(){var e=this.gridOptionsService.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)))}}]),n}(kr);Mn([Di("rowModel")],jp.prototype,"rowModel",2),Mn([Di("rowRenderer")],jp.prototype,"rowRenderer",2),Mn([Di("selectionService")],jp.prototype,"selectionService",2),Mn([Ei],jp.prototype,"postConstruct",1);var Kp={version:"31.2.1",moduleName:"@ag-grid-community/client-side-row-model",rowModel:"clientSide",beans:[Vp,Hp,Bp,Wp,zp,Up,jp=Mn([Ri("immutableService")],jp)]},Yp=Object.defineProperty,Xp=Object.getOwnPropertyDescriptor,qp=function(e,t,n,i){for(var r,o=i>1?void 0:i?Xp(t,n):t,a=e.length-1;a>=0;a--)(r=e[a])&&(o=(i?r(t,n,o):r(o))||o);return i&&o&&Yp(t,n,o),o},Qp=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i,r){var o;return(0,a.Z)(this,n),(o=t.call(this,e)).parentCache=i,o.params=r,o.startRow=e*r.blockSize,o.endRow=o.startRow+r.blockSize,o}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.createRowNodes()}},{key:"getBlockStateJson",value:function(){return{id:""+this.getId(),state:{blockNumber:this.getId(),startRow:this.getStartRow(),endRow:this.getEndRow(),pageStatus:this.getState()}}}},{key:"setDataAndId",value:function(e,t,n){Es.exists(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}},{key:"loadFromDatasource",value:function(){var e=this,t=this.createLoadParams();Es.missing(this.params.datasource.getRows)?console.warn("AG Grid: datasource is missing getRows method"):window.setTimeout((function(){e.params.datasource.getRows(t)}),0)}},{key:"processServerFail",value:function(){}},{key:"createLoadParams",value:function(){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.gridOptionsService.getGridCommonParams().context}}},{key:"forEachNode",value:function(e,t,n){var i=this;this.rowNodes.forEach((function(r,o){i.startRow+o<n&&e(r,t.next())}))}},{key:"getLastAccessed",value:function(){return this.lastAccessed}},{key:"getRow",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t||(this.lastAccessed=this.params.lastAccessedSequence.next());var n=e-this.startRow;return this.rowNodes[n]}},{key:"getStartRow",value:function(){return this.startRow}},{key:"getEndRow",value:function(){return this.endRow}},{key:"createRowNodes",value:function(){this.rowNodes=[];for(var e=0;e<this.params.blockSize;e++){var t=this.startRow+e,n=new jl(this.beans);n.setRowHeight(this.params.rowHeight),n.uiLevel=0,n.setRowIndex(t),n.setRowTop(this.params.rowHeight*t),this.rowNodes.push(n)}}},{key:"processServerResult",value:function(e){var t=this;this.rowNodes.forEach((function(n,i){var r=e.rowData?e.rowData[i]:void 0;!n.id&&n.alreadyRendered&&r&&(t.rowNodes[i]=new jl(t.beans),t.rowNodes[i].setRowIndex(n.rowIndex),t.rowNodes[i].setRowTop(n.rowTop),t.rowNodes[i].setRowHeight(n.rowHeight),n.clearRowTopAndRowIndex()),t.setDataAndId(t.rowNodes[i],r,t.startRow+i)}));var n=null!=e.rowCount&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,n)}},{key:"destroyRowNodes",value:function(){this.rowNodes.forEach((function(e){e.clearRowTopAndRowIndex()}))}}]),n}(Zd);qp([Di("beans")],Qp.prototype,"beans",2),qp([Ei],Qp.prototype,"postConstruct",1),qp([xi],Qp.prototype,"destroyRowNodes",1);var Jp,$p,ef=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this)).lastRowIndexKnown=!1,i.blocks={},i.blockCount=0,i.rowCount=e.initialRowCount,i.params=e,i}return(0,s.Z)(n,[{key:"setBeans",value:function(e){this.logger=e.create("InfiniteCache")}},{key:"getRow",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Math.floor(e/this.params.blockSize),i=this.blocks[n];if(!i){if(t)return;i=this.createBlock(n)}return i.getRow(e)}},{key:"createBlock",value:function(e){var t=this.createBean(new Qp(e,this,this.params));return this.blocks[t.getId()]=t,this.blockCount++,this.purgeBlocksIfNeeded(t),this.params.rowNodeBlockLoader.addBlock(t),t}},{key:"refreshCache",value:function(){0==this.blockCount?this.purgeCache():(this.getBlocksInOrder().forEach((function(e){return e.setStateWaitingToLoad()})),this.params.rowNodeBlockLoader.checkBlockToLoad())}},{key:"destroyAllBlocks",value:function(){var e=this;this.getBlocksInOrder().forEach((function(t){return e.destroyBlock(t)}))}},{key:"getRowCount",value:function(){return this.rowCount}},{key:"isLastRowIndexKnown",value:function(){return this.lastRowIndexKnown}},{key:"pageLoaded",value:function(e,t){this.isAlive()&&(this.logger.log("onPageLoaded: page = ".concat(e.getId(),", lastRow = ").concat(t)),this.checkRowCount(e,t),this.onCacheUpdated())}},{key:"purgeBlocksIfNeeded",value:function(e){var t=this,i=this.getBlocksInOrder().filter((function(t){return t!=e}));i.sort((function(e,t){return t.getLastAccessed()-e.getLastAccessed()}));var r=this.params.maxBlocksInCache>0,o=r?this.params.maxBlocksInCache-1:null,a=n.MAX_EMPTY_BLOCKS_TO_KEEP-1;i.forEach((function(e,n){if(e.getState()===Qp.STATE_WAITING_TO_LOAD&&n>=a||!!r&&n>=o){if(t.isBlockCurrentlyDisplayed(e))return;if(t.isBlockFocused(e))return;t.removeBlockFromCache(e)}}))}},{key:"isBlockFocused",value:function(e){var t=this.focusService.getFocusCellToUseAfterRefresh();if(!t)return!1;if(null!=t.rowPinned)return!1;var n=e.getStartRow(),i=e.getEndRow();return t.rowIndex>=n&&t.rowIndex<i}},{key:"isBlockCurrentlyDisplayed",value:function(e){var t=e.getStartRow(),n=e.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(t,n)}},{key:"removeBlockFromCache",value:function(e){e&&this.destroyBlock(e)}},{key:"checkRowCount",value:function(e,t){if("number"===typeof t&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){var n=(e.getId()+1)*this.params.blockSize+this.params.overflowSize;this.rowCount<n&&(this.rowCount=n)}}},{key:"setRowCount",value:function(e,t){this.rowCount=e,Es.exists(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}},{key:"forEachNodeDeep",value:function(e){var t=this,n=new xs;this.getBlocksInOrder().forEach((function(i){return i.forEachNode(e,n,t.rowCount)}))}},{key:"getBlocksInOrder",value:function(){var e=Es.getAllValuesInObject(this.blocks).sort((function(e,t){return e.getId()-t.getId()}));return e}},{key:"destroyBlock",value:function(e){delete this.blocks[e.getId()],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}},{key:"onCacheUpdated",value:function(){if(this.isAlive()){this.destroyAllBlocksPastVirtualRowCount();var e={type:Er.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)}}},{key:"destroyAllBlocksPastVirtualRowCount",value:function(){var e=this,t=[];this.getBlocksInOrder().forEach((function(n){n.getId()*e.params.blockSize>=e.rowCount&&t.push(n)})),t.length>0&&t.forEach((function(t){return e.destroyBlock(t)}))}},{key:"purgeCache",value:function(){var e=this;this.getBlocksInOrder().forEach((function(t){return e.removeBlockFromCache(t)})),this.lastRowIndexKnown=!1,0===this.rowCount&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}},{key:"getRowNodesInRange",value:function(e,t){var n=this,i=[],r=-1,o=!1,a=new xs;Es.missing(e)&&(o=!0);var s=!1;return this.getBlocksInOrder().forEach((function(l){s||(o&&r+1!==l.getId()?s=!0:(r=l.getId(),l.forEachNode((function(n){var r=n===e||n===t;(o||r)&&i.push(n),r&&(o=!o)}),a,n.rowCount)))})),s||o?[]:i}}]),n}(kr);ef.MAX_EMPTY_BLOCKS_TO_KEEP=2,qp([Di("rowRenderer")],ef.prototype,"rowRenderer",2),qp([Di("focusService")],ef.prototype,"focusService",2),qp([(Jp=0,$p=Pi("loggerFactory"),function(e,t){return $p(e,t,Jp)})],ef.prototype,"setBeans",1),qp([xi],ef.prototype,"destroyAllBlocks",1);var tf=ef,nf=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"getRowBounds",value:function(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}},{key:"ensureRowHeightsValid",value:function(e,t,n,i){return!1}},{key:"init",value:function(){var e=this;this.gridOptionsService.isRowModelType("infinite")&&(this.rowHeight=this.gridOptionsService.getRowHeightAsNumber(),this.addEventListeners(),this.addDestroyFunc((function(){return e.destroyCache()})),this.verifyProps())}},{key:"verifyProps",value:function(){this.gridOptionsService.exists("initialGroupOrderComparator")&&Es.warnOnce("initialGroupOrderComparator cannot be used with Infinite Row Model as sorting is done on the server side")}},{key:"start",value:function(){this.setDatasource(this.gridOptionsService.get("datasource"))}},{key:"destroyDatasource",value:function(){this.datasource&&(this.getContext().destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null)}},{key:"addEventListeners",value:function(){var e=this;this.addManagedListener(this.eventService,Er.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,Er.EVENT_STORE_UPDATED,this.onCacheUpdated.bind(this)),this.addManagedPropertyListener("datasource",(function(){return e.setDatasource(e.gridOptionsService.get("datasource"))})),this.addManagedPropertyListener("cacheBlockSize",(function(){return e.resetCache()})),this.addManagedPropertyListener("rowHeight",(function(){e.rowHeight=e.gridOptionsService.getRowHeightAsNumber(),e.cacheParams.rowHeight=e.rowHeight,e.updateRowHeights()}))}},{key:"onFilterChanged",value:function(){this.reset()}},{key:"onSortChanged",value:function(){this.reset()}},{key:"onColumnEverything",value:function(){(!this.cacheParams||this.isSortModelDifferent())&&this.reset()}},{key:"isSortModelDifferent",value:function(){return!Es.jsonEquals(this.cacheParams.sortModel,this.sortController.getSortModel())}},{key:"getType",value:function(){return"infinite"}},{key:"setDatasource",value:function(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}},{key:"isEmpty",value:function(){return!this.infiniteCache}},{key:"isRowsToRender",value:function(){return!!this.infiniteCache}},{key:"getNodesInRangeForSelection",value:function(e,t){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,t):[]}},{key:"reset",value:function(){this.datasource&&(null!=this.gridOptionsService.getCallback("getRowId")||this.selectionService.reset("rowDataChanged"),this.resetCache())}},{key:"createModelUpdatedEvent",value:function(){return{type:Er.EVENT_MODEL_UPDATED,newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1}}},{key:"resetCache",value:function(){this.destroyCache(),this.cacheParams={datasource:this.datasource,filterModel:this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,initialRowCount:this.gridOptionsService.get("infiniteInitialRowCount"),maxBlocksInCache:this.gridOptionsService.get("maxBlocksInCache"),rowHeight:this.gridOptionsService.getRowHeightAsNumber(),overflowSize:this.gridOptionsService.get("cacheOverflowSize"),blockSize:this.gridOptionsService.get("cacheBlockSize"),lastAccessedSequence:new xs},this.infiniteCache=this.createBean(new tf(this.cacheParams)),this.eventService.dispatchEventOnce({type:Er.EVENT_ROW_COUNT_READY});var e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}},{key:"updateRowHeights",value:function(){var e=this;this.forEachNode((function(t){t.setRowHeight(e.rowHeight),t.setRowTop(e.rowHeight*t.rowIndex)}));var t=this.createModelUpdatedEvent();this.eventService.dispatchEvent(t)}},{key:"destroyCache",value:function(){this.infiniteCache&&(this.infiniteCache=this.destroyBean(this.infiniteCache))}},{key:"onCacheUpdated",value:function(){var e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}},{key:"getRow",value:function(e){if(this.infiniteCache&&!(e>=this.infiniteCache.getRowCount()))return this.infiniteCache.getRow(e)}},{key:"getRowNode",value:function(e){var t;return this.forEachNode((function(n){n.id===e&&(t=n)})),t}},{key:"forEachNode",value:function(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e)}},{key:"getTopLevelRowCount",value:function(){return this.getRowCount()}},{key:"getTopLevelRowDisplayedIndex",value:function(e){return e}},{key:"getRowIndexAtPixel",value:function(e){if(0!==this.rowHeight){var t=Math.floor(e/this.rowHeight),n=this.getRowCount()-1;return t>n?n:t}return 0}},{key:"getRowCount",value:function(){return this.infiniteCache?this.infiniteCache.getRowCount():0}},{key:"isRowPresent",value:function(e){return!!this.getRowNode(e.id)}},{key:"refreshCache",value:function(){this.infiniteCache&&this.infiniteCache.refreshCache()}},{key:"purgeCache",value:function(){this.infiniteCache&&this.infiniteCache.purgeCache()}},{key:"isLastRowIndexKnown",value:function(){return!!this.infiniteCache&&this.infiniteCache.isLastRowIndexKnown()}},{key:"setRowCount",value:function(e,t){this.infiniteCache&&this.infiniteCache.setRowCount(e,t)}}]),n}(kr);qp([Di("filterManager")],nf.prototype,"filterManager",2),qp([Di("sortController")],nf.prototype,"sortController",2),qp([Di("selectionService")],nf.prototype,"selectionService",2),qp([Di("rowRenderer")],nf.prototype,"rowRenderer",2),qp([Di("rowNodeBlockLoader")],nf.prototype,"rowNodeBlockLoader",2),qp([Ei],nf.prototype,"init",1),qp([xi],nf.prototype,"destroyDatasource",1);var rf={version:"31.2.1",moduleName:"@ag-grid-community/infinite-row-model",rowModel:"infinite",beans:[nf=qp([Ri("rowModel")],nf)]},of=Object.defineProperty,af=Object.defineProperties,sf=Object.getOwnPropertyDescriptor,lf=Object.getOwnPropertyDescriptors,uf=Object.getOwnPropertySymbols,cf=Object.prototype.hasOwnProperty,df=Object.prototype.propertyIsEnumerable,hf=function(e,t,n){return t in e?of(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},pf=function(e,t){for(var n in t||(t={}))cf.call(t,n)&&hf(e,n,t[n]);if(uf){var i,r=(0,g.Z)(uf(t));try{for(r.s();!(i=r.n()).done;){n=i.value;df.call(t,n)&&hf(e,n,t[n])}}catch(o){r.e(o)}finally{r.f()}}return e},ff=function(e,t){return af(e,lf(t))},vf=function(e,t,n,i){for(var r,o=i>1?void 0:i?sf(t,n):t,a=e.length-1;a>=0;a--)(r=e[a])&&(o=(i?r(t,n,o):r(o))||o);return i&&o&&of(t,n,o),o},gf=function(e,t,n){return new Promise((function(i,r){var o=function(e){try{s(n.next(e))}catch(je){r(je)}},a=function(e){try{s(n.throw(e))}catch(je){r(je)}},s=function(e){return e.done?i(e.value):Promise.resolve(e.value).then(o,a)};s((n=n.apply(e,t)).next())}))},mf=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"setBeans",value:function(e){this.beans=e}},{key:"getFileName",value:function(e){var t=this.getDefaultFileExtension();return null!=e&&e.length||(e=this.getDefaultFileName()),-1===e.indexOf(".")?"".concat(e,".").concat(t):e}},{key:"getData",value:function(e){var t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}},{key:"getDefaultFileName",value:function(){return"export.".concat(this.getDefaultFileExtension())}}]),e}(),yf=function(){function e(t){(0,a.Z)(this,e),this.groupColumns=[];var n=t.columnModel,i=t.valueService,r=t.gridOptionsService,o=t.valueFormatterService,s=t.valueParserService,l=t.processCellCallback,u=t.processHeaderCallback,c=t.processGroupHeaderCallback,d=t.processRowGroupCallback;this.columnModel=n,this.valueService=i,this.gridOptionsService=r,this.valueFormatterService=o,this.valueParserService=s,this.processCellCallback=l,this.processHeaderCallback=u,this.processGroupHeaderCallback=c,this.processRowGroupCallback=d}return(0,s.Z)(e,[{key:"prepare",value:function(e){this.groupColumns=e.filter((function(e){return!!e.getColDef().showRowGroup}))}},{key:"extractHeaderValue",value:function(e){var t=this.getHeaderName(this.processHeaderCallback,e);return null!=t?t:""}},{key:"extractRowCellValue",value:function(e,t,n,i,r){var o=this.gridOptionsService.get("groupHideOpenParents")&&!r.footer||!this.shouldRenderGroupSummaryCell(r,e,t)?this.valueService.getValue(e,r):this.createValueForGroupNode(e,r);return this.processCell({accumulatedRowIndex:n,rowNode:r,column:e,value:o,processCellCallback:this.processCellCallback,type:i})}},{key:"shouldRenderGroupSummaryCell",value:function(e,t,n){var i;if(!(e&&e.group))return!1;if(-1!==this.groupColumns.indexOf(t)){if(null!=(null==(i=e.groupData)?void 0:i[t.getId()]))return!0;if(this.gridOptionsService.isRowModelType("serverSide")&&e.group)return!0;if(e.footer&&-1===e.level){var r=t.getColDef();return null==r||!0===r.showRowGroup||r.showRowGroup===this.columnModel.getRowGroupColumns()[0].getId()}}var o=this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotMode());return 0===n&&o}},{key:"getHeaderName",value:function(e,t){return e?e(this.gridOptionsService.addGridCommonParams({column:t})):this.columnModel.getDisplayNameForColumn(t,"csv",!0)}},{key:"createValueForGroupNode",value:function(e,t){var n=this;if(this.processRowGroupCallback)return this.processRowGroupCallback(this.gridOptionsService.addGridCommonParams({column:e,node:t}));var i=this.gridOptionsService.get("treeData"),r=this.gridOptionsService.get("suppressGroupMaintainValueType"),o=function(t){var o,a;if(i||r)return t.key;var s=null==(o=t.groupData)?void 0:o[e.getId()];return s&&t.rowGroupColumn&&!1!==t.rowGroupColumn.getColDef().useValueFormatterForExport&&null!=(a=n.valueFormatterService.formatValue(t.rowGroupColumn,t,s))?a:s},a=t.footer,s=[o(t)];if(!this.gridOptionsService.isGroupMultiAutoColumn())for(;t.parent;)t=t.parent,s.push(o(t));var l=s.reverse().join(" -> ");return a?"Total ".concat(l):l}},{key:"processCell",value:function(e){var t,n=this,i=e.accumulatedRowIndex,r=e.rowNode,o=e.column,a=e.value,s=e.processCellCallback,l=e.type;return s?{value:null!=(t=s(this.gridOptionsService.addGridCommonParams({accumulatedRowIndex:i,column:o,node:r,value:a,type:l,parseValue:function(e){return n.valueParserService.parseValue(o,r,e,n.valueService.getValue(o,r))},formatValue:function(e){var t;return null!=(t=n.valueFormatterService.formatValue(o,r,e))?t:e}})))?t:""}:!1!==o.getColDef().useValueFormatterForExport?{value:null!=a?a:"",valueFormatted:this.valueFormatterService.formatValue(o,r,a)}:{value:null!=a?a:""}}}]),e}(),Cf=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,null,[{key:"download",value:function(e,t){var n=document.defaultView||window;if(n){var i=document.createElement("a"),r=n.URL.createObjectURL(t);i.setAttribute("href",r),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:n})),document.body.removeChild(i),n.setTimeout((function(){n.URL.revokeObjectURL(r)}),0)}else console.warn("AG Grid: There is no `window` associated with the current `document`")}}]),e}(),kf=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;(0,a.Z)(this,n),(i=t.call(this,e)).isFirstLine=!0,i.result="";var r=e.suppressQuotes,o=e.columnSeparator;return i.suppressQuotes=r,i.columnSeparator=o,i}return(0,s.Z)(n,[{key:"addCustomContent",value:function(e){var t=this;e&&("string"===typeof e?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,"\r\n"),this.result+=e):e.forEach((function(e){t.beginNewLine(),e.forEach((function(e,n){0!==n&&(t.result+=t.columnSeparator),t.result+=t.putInQuotes(e.data.value||""),e.mergeAcross&&t.appendEmptyCells(e.mergeAcross)}))})))}},{key:"onNewHeaderGroupingRow",value:function(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}},{key:"onNewHeaderGroupingRowColumn",value:function(e,t,n,i){0!=n&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(i)}},{key:"appendEmptyCells",value:function(e){for(var t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}},{key:"onNewHeaderRow",value:function(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}},{key:"onNewHeaderRowColumn",value:function(e,t){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}},{key:"onNewBodyRow",value:function(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}},{key:"onNewBodyRowColumn",value:function(e,t,n){var i;0!=t&&(this.result+=this.columnSeparator);var r=this.extractRowCellValue(e,t,t,"csv",n);this.result+=this.putInQuotes(null!=(i=r.valueFormatted)?i:r.value)}},{key:"putInQuotes",value:function(e){return this.suppressQuotes?e:null===e||void 0===e?'""':("string"===typeof e?t=e:"function"===typeof e.toString?t=e.toString():(console.warn("AG Grid: unknown value type during csv conversion"),t=""),'"'+t.replace(/"/g,'""')+'"');var t}},{key:"parse",value:function(){return this.result}},{key:"beginNewLine",value:function(){this.isFirstLine||(this.result+="\r\n"),this.isFirstLine=!1}}]),n}(yf),wf=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"postConstruct",value:function(){this.setBeans({gridSerializer:this.gridSerializer,gridOptionsService:this.gridOptionsService})}},{key:"getMergedParams",value:function(e){var t=this.gridOptionsService.get("defaultCsvExportParams");return Object.assign({},t,e)}},{key:"export",value:function(e){if(this.isExportSuppressed())console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration.");else{var t=this.getMergedParams(e),n=this.getData(t),i=new Blob(["\ufeff",n],{type:"text/plain"}),r="function"===typeof t.fileName?t.fileName(this.gridOptionsService.getGridCommonParams()):t.fileName;Cf.download(this.getFileName(r),i)}}},{key:"exportDataAsCsv",value:function(e){this.export(e)}},{key:"getDataAsCsv",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t?Object.assign({},e):this.getMergedParams(e);return this.getData(n)}},{key:"getDefaultFileExtension",value:function(){return"csv"}},{key:"createSerializingSession",value:function(e){var t=this.columnModel,n=this.valueService,i=this.gridOptionsService,r=this.valueFormatterService,o=this.valueParserService,a=e.processCellCallback,s=e.processHeaderCallback,l=e.processGroupHeaderCallback,u=e.processRowGroupCallback,c=e.suppressQuotes,d=e.columnSeparator;return new kf({columnModel:t,valueService:n,gridOptionsService:i,valueFormatterService:r,valueParserService:o,processCellCallback:a||void 0,processHeaderCallback:s||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:u||void 0,suppressQuotes:c||!1,columnSeparator:d||","})}},{key:"isExportSuppressed",value:function(){return this.gridOptionsService.get("suppressCsvExport")}}]),n}(mf);vf([Di("columnModel")],wf.prototype,"columnModel",2),vf([Di("valueService")],wf.prototype,"valueService",2),vf([Di("gridSerializer")],wf.prototype,"gridSerializer",2),vf([Di("gridOptionsService")],wf.prototype,"gridOptionsService",2),vf([Di("valueFormatterService")],wf.prototype,"valueFormatterService",2),vf([Di("valueParserService")],wf.prototype,"valueParserService",2),vf([Ei],wf.prototype,"postConstruct",1),wf=vf([Ri("csvCreator")],wf);var Sf=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"serialize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.allColumns,i=t.columnKeys,r=t.skipRowGroups,o=this.getColumnsToExport(n,r,i),a=Es.compose(this.prepareSession(o),this.prependContent(t),this.exportColumnGroups(t,o),this.exportHeaders(t,o),this.processPinnedTopRows(t,o),this.processRows(t,o),this.processPinnedBottomRows(t,o),this.appendContent(t));return a(e).parse()}},{key:"processRow",value:function(e,t,n,i){var r=t.shouldRowBeSkipped||function(){return!1},o=this.gridOptionsService.get("groupRemoveSingleChildren"),a=this.gridOptionsService.get("groupRemoveLowestSingleChildren"),s=null!=t.rowPositions||!!t.onlySelected,l=this.gridOptionsService.get("groupHideOpenParents")&&!s,u=this.columnModel.isPivotMode()?i.leafGroup:!i.group,c=!!i.footer,d=(t.skipRowGroups,a&&i.leafGroup),h=1===i.allChildrenCount&&(o||d);if(!(!u&&!c&&(t.skipRowGroups||h||l)||t.onlySelected&&!i.isSelected()||t.skipPinnedTop&&"top"===i.rowPinned||t.skipPinnedBottom&&"bottom"===i.rowPinned)&&((!(-1===i.level)||u||c)&&!r(this.gridOptionsService.addGridCommonParams({node:i})))){var p=e.onNewBodyRow(i);if(n.forEach((function(e,t){p.onColumn(e,t,i)})),t.getCustomContentBelowRow){var f=t.getCustomContentBelowRow(this.gridOptionsService.addGridCommonParams({node:i}));f&&e.addCustomContent(f)}}}},{key:"appendContent",value:function(e){return function(t){var n=e.appendContent;return n&&t.addCustomContent(n),t}}},{key:"prependContent",value:function(e){return function(t){var n=e.prependContent;return n&&t.addCustomContent(n),t}}},{key:"prepareSession",value:function(e){return function(t){return t.prepare(e),t}}},{key:"exportColumnGroups",value:function(e,t){var n=this;return function(i){if(!e.skipColumnGroupHeaders){var r=new Rr,o=n.displayedGroupCreator.createDisplayedGroups(t,r,null);n.recursivelyAddHeaderGroups(o,i,e.processGroupHeaderCallback)}return i}}},{key:"exportHeaders",value:function(e,t){return function(n){if(!e.skipColumnHeaders){var i=n.onNewHeaderRow();t.forEach((function(e,t){i.onColumn(e,t,void 0)}))}return n}}},{key:"processPinnedTopRows",value:function(e,t){var n=this;return function(i){var r=n.processRow.bind(n,i,e,t);return e.rowPositions?e.rowPositions.filter((function(e){return"top"===e.rowPinned})).sort((function(e,t){return e.rowIndex-t.rowIndex})).map((function(e){return n.pinnedRowModel.getPinnedTopRow(e.rowIndex)})).forEach(r):n.pinnedRowModel.forEachPinnedTopRow(r),i}}},{key:"processRows",value:function(e,t){var n=this;return function(i){var r=n.rowModel,o=r.getType(),a="clientSide"===o,s="serverSide"===o,l=!a&&e.onlySelected,u=n.processRow.bind(n,i,e,t),c=e.exportedRows,d=void 0===c?"filteredAndSorted":c;if(e.rowPositions)e.rowPositions.filter((function(e){return null==e.rowPinned})).sort((function(e,t){return e.rowIndex-t.rowIndex})).map((function(e){return r.getRow(e.rowIndex)})).forEach(u);else if(n.columnModel.isPivotMode())a?r.forEachPivotNode(u,!0):s?r.forEachNodeAfterFilterAndSort(u,!0):r.forEachNode(u);else if(e.onlySelectedAllPages||l){var h=n.selectionService.getSelectedNodes();n.replicateSortedOrder(h),h.forEach(u)}else"all"===d?r.forEachNode(u):a||s?r.forEachNodeAfterFilterAndSort(u,!0):r.forEachNode(u);return i}}},{key:"replicateSortedOrder",value:function(e){var t=this,n=this.sortController.getSortOptions();e.sort((function e(i,r){var o,a,s,l;return null!=i.rowIndex&&null!=r.rowIndex?i.rowIndex-r.rowIndex:i.level===r.level?(null==(o=i.parent)?void 0:o.id)===(null==(a=r.parent)?void 0:a.id)?t.rowNodeSorter.compareRowNodes(n,{rowNode:i,currentPos:null!=(s=i.rowIndex)?s:-1},{rowNode:r,currentPos:null!=(l=r.rowIndex)?l:-1}):e(i.parent,r.parent):i.level>r.level?e(i.parent,r):e(i,r.parent)}))}},{key:"processPinnedBottomRows",value:function(e,t){var n=this;return function(i){var r=n.processRow.bind(n,i,e,t);return e.rowPositions?e.rowPositions.filter((function(e){return"bottom"===e.rowPinned})).sort((function(e,t){return e.rowIndex-t.rowIndex})).map((function(e){return n.pinnedRowModel.getPinnedBottomRow(e.rowIndex)})).forEach(r):n.pinnedRowModel.forEachPinnedBottomRow(r),i}}},{key:"getColumnsToExport",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,i=this.columnModel.isPivotMode();if(n&&n.length)return this.columnModel.getGridColumns(n);var r=this.gridOptionsService.get("treeData"),o=[];return o=e&&!i?this.columnModel.getAllGridColumns():this.columnModel.getAllDisplayedColumns(),t&&!r&&(o=o.filter((function(e){return e.getColId()!==Dr}))),o}},{key:"recursivelyAddHeaderGroups",value:function(e,t,n){var i=[];e.forEach((function(e){var t=e;t.getChildren&&t.getChildren().forEach((function(e){return i.push(e)}))})),e.length>0&&e[0]instanceof br&&this.doAddHeaderHeader(t,e,n),i&&i.length>0&&this.recursivelyAddHeaderGroups(i,t,n)}},{key:"doAddHeaderHeader",value:function(e,t,n){var i=this,r=e.onNewHeaderGroupingRow(),o=0;t.forEach((function(e){var t,a=e;t=n?n(i.gridOptionsService.addGridCommonParams({columnGroup:a})):i.columnModel.getDisplayNameForColumnGroup(a,"header");var s=a.getLeafColumns().reduce((function(e,t,n,i){var r=Es.last(e);return"open"===t.getColumnGroupShow()?r&&null==r[1]||(r=[n],e.push(r)):r&&null==r[1]&&(r[1]=n-1),n===i.length-1&&r&&null==r[1]&&(r[1]=n),e}),[]);r.onColumn(a,t||"",o++,a.getLeafColumns().length-1,s)}))}}]),n}(kr);vf([Di("displayedGroupCreator")],Sf.prototype,"displayedGroupCreator",2),vf([Di("columnModel")],Sf.prototype,"columnModel",2),vf([Di("rowModel")],Sf.prototype,"rowModel",2),vf([Di("pinnedRowModel")],Sf.prototype,"pinnedRowModel",2),vf([Di("selectionService")],Sf.prototype,"selectionService",2),vf([Di("rowNodeSorter")],Sf.prototype,"rowNodeSorter",2),vf([Di("sortController")],Sf.prototype,"sortController",2);var bf={version:"31.2.1",moduleName:"@ag-grid-community/csv-export",beans:[wf,Sf=vf([Ri("gridSerializer")],Sf)]};function Ef(e,t){for(var n="",i=0;i<t;i++)n+=String.fromCharCode(255&e),e>>>=8;return n}var xf=function(e){if(!e.length)return 0;for(var t=-1,n=0,i=0;i<e.length;i++)n=e[i],t=t>>>8^Df[255&(t^n)];return-1^t},Rf=function(e){return e.length?xf("string"===typeof e?(new TextEncoder).encode(e):e):0},Df=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]),Tf=function(e){return gf(void 0,null,(0,_e.Z)().mark((function t(){var n,i,r,o,a;return(0,_e.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=0,i=[],r=new WritableStream({write:function(e){i.push(e),n+=e.length}}),o=new ReadableStream({start:function(t){var n=new FileReader;n.onload=function(e){var n;(null==(n=e.target)?void 0:n.result)&&t.enqueue(e.target.result),t.close()},n.readAsArrayBuffer(e)}}),a=new window.CompressionStream("deflate-raw"),t.next=7,o.pipeThrough(a).pipeTo(r);case 7:return t.abrupt("return",{size:n,content:new Blob(i)});case 8:case"end":return t.stop()}}),t)})))},Of=function(e){return gf(void 0,null,(0,_e.Z)().mark((function t(){var n,i,r,o,a;return(0,_e.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new Blob([e]),t.next=3,Tf(n);case 3:return i=t.sent,r=i.size,o=i.content,t.t0=Uint8Array,t.next=9,o.arrayBuffer();case 9:return t.t1=t.sent,a=new t.t0(t.t1),t.abrupt("return",{size:r,content:a});case 12:case"end":return t.stop()}}),t)})))},Pf=Es.utf8_encode,Af=function(e,t){return gf(void 0,null,(0,_e.Z)().mark((function n(){var i,r,o,a,s,l,u,c,d;return(0,_e.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i=e.content,r=i?Lf(i):{size:0,content:Uint8Array.from([])},o=r.size,a=r.content,s=void 0,l=void 0,u=!1,!("file"===e.type&&a&&o>0)){n.next=13;break}return n.next=9,Of(a);case 9:c=n.sent,s=c.content,l=c.size,u=!0;case 13:return d=Nf(e,u,t,o,a,l),n.abrupt("return",ff(pf({},d),{content:s||a,isCompressed:u}));case 15:case"end":return n.stop()}}),n)})))},Mf=function(e,t){var n=e.content,i=(n?Lf(n):{content:Uint8Array.from([])}).content,r=Nf(e,!1,t,i.length,i,void 0);return ff(pf({},r),{content:i,isCompressed:!1})},Nf=function(e,t,n,i,r,o){var a=e.content,s=e.path,l=e.created,u=function(e){var t=e.getHours();return t<<=6,t|=e.getMinutes(),t<<=5,t|e.getSeconds()/2}(l),c=function(e){var t=e.getFullYear()-1980;return t<<=4,t|=e.getMonth()+1,t<<=5,t|e.getDate()}(l),d=Rf(r),h=void 0!==o?o:i,p=Pf(s),f=p!==s,v="";if(f){var g=Ef(1,1)+Ef(Rf(p),4)+p;v="up"+Ef(g.length,2)+g}var m="\x14\0"+(f?"\0\b":"\0\0")+Ef(t?8:0,2)+Ef(u,2)+Ef(c,2)+Ef(h?d:0,4)+Ef(null!=o?o:i,4)+Ef(i,4)+Ef(p.length,2)+Ef(v.length,2),y="PK\x03\x04"+m+p+v,C="PK\x01\x02\x14\0"+m+"\0\0\0\0\0\0"+(a?"\0\0\0\0":"\x10\0\0\0")+Ef(n,4)+p+v;return{localFileHeader:Uint8Array.from(y,(function(e){return e.charCodeAt(0)})),centralDirectoryHeader:Uint8Array.from(C,(function(e){return e.charCodeAt(0)}))}},Lf=function(e){var t;"string"===typeof e?t=function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(atob(e.split(";base64,")[1])):t=e;return{size:t.length,content:t}},If=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,null,[{key:"addFolders",value:function(e){e.forEach(this.addFolder.bind(this))}},{key:"addFolder",value:function(e){this.folders.push({path:e,created:new Date,isBase64:!1,type:"folder"})}},{key:"addFile",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.files.push({path:e,created:new Date,content:n?t:(new TextEncoder).encode(t),isBase64:n,type:"file"})}},{key:"getZipFile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"application/zip";return gf(this,null,(0,_e.Z)().mark((function t(){var n;return(0,_e.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.buildCompressedFileStream();case 2:return n=t.sent,this.clearStream(),t.abrupt("return",new Blob([n],{type:e}));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"getUncompressedZipFile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"application/zip",t=this.buildFileStream();return this.clearStream(),new Blob([t],{type:e})}},{key:"clearStream",value:function(){this.folders=[],this.files=[]}},{key:"packageFiles",value:function(e){var t,n=new Uint8Array(0),i=new Uint8Array(0),r=0,o=0,a=(0,g.Z)(e);try{for(a.s();!(t=a.n()).done;){var s=t.value,l=s.localFileHeader,u=s.centralDirectoryHeader,c=s.content,d=new Uint8Array(n.length+l.length);d.set(n),d.set(l,n.length),n=d;var h=new Uint8Array(n.length+c.length);h.set(n),h.set(c,n.length),n=h;var p=new Uint8Array(i.length+u.length);p.set(i),p.set(u,i.length),i=p,r+=l.length+c.length,o+=u.length}}catch(m){a.e(m)}finally{a.f()}var f=function(e,t,n){var i="PK\x05\x06\0\0\0\0"+Ef(e,2)+Ef(e,2)+Ef(t,4)+Ef(n,4)+"\0\0";return Uint8Array.from(i,(function(e){return e.charCodeAt(0)}))}(e.length,o,r),v=new Uint8Array(n.length+i.length+f.length);return v.set(n),v.set(i,n.length),v.set(f,n.length+i.length),v}},{key:"buildCompressedFileStream",value:function(){return gf(this,null,(0,_e.Z)().mark((function e(){var t,n,i,r,a,s,l,u,c;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[].concat((0,o.Z)(this.folders),(0,o.Z)(this.files)),n=[],i=0,r=(0,g.Z)(t),e.prev=4,r.s();case 6:if((a=r.n()).done){e.next=16;break}return s=a.value,e.next=10,Af(s,i);case 10:l=e.sent,u=l.localFileHeader,c=l.content,n.push(l),i+=u.length+c.length;case 14:e.next=6;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(4),r.e(e.t0);case 21:return e.prev=21,r.f(),e.finish(21);case 24:return e.abrupt("return",this.packageFiles(n));case 25:case"end":return e.stop()}}),e,this,[[4,18,21,24]])})))}},{key:"buildFileStream",value:function(){var e,t=[].concat((0,o.Z)(this.folders),(0,o.Z)(this.files)),n=[],i=0,r=(0,g.Z)(t);try{for(r.s();!(e=r.n()).done;){var a=e.value,s=Mf(a,i),l=s.localFileHeader,u=s.content;n.push(s),i+=l.length+u.length}}catch(c){r.e(c)}finally{r.f()}return this.packageFiles(n)}}]),e}();If.folders=[],If.files=[],wi.__registerModules([Kp,rf,bf],!1,void 0);var Ff=n(4164),_f=n(8340),Gf=Object.defineProperty,Zf=Object.defineProperties,Vf=Object.getOwnPropertyDescriptors,Hf=Object.getOwnPropertySymbols,Bf=Object.prototype.hasOwnProperty,Wf=Object.prototype.propertyIsEnumerable,zf=function(e,t,n){return t in e?Gf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Uf=function(e,t){for(var n in t||(t={}))Bf.call(t,n)&&zf(e,n,t[n]);if(Hf){var i,r=(0,g.Z)(Hf(t));try{for(r.s();!(i=r.n()).done;){n=i.value;Wf.call(t,n)&&zf(e,n,t[n])}}catch(o){r.e(o)}finally{r.f()}}return e},jf=function(e,t){return Zf(e,Vf(t))},Kf=(0,e.createContext)({setMethods:function(){}}),Yf=(0,e.memo)((function(t){var n=t.initialProps,i=t.addUpdateCallback,o=t.CustomComponentClass,a=t.setMethods,s=(0,e.useState)(n),l=(0,r.Z)(s,2),u=l[0],c=l[1];return(0,e.useEffect)((function(){i((function(e){return c(e)}))}),[]),e.createElement(Kf.Provider,{value:{setMethods:a}},e.createElement(o,Uf({},u)))})),Xf=0;function qf(){return"agPortalKey_".concat(++Xf)}var Qf=function(){function t(e,n,i,r){var o=this;(0,a.Z)(this,t),this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=n,this.componentType=i,this.suppressFallbackMethods=!!r,this.statelessComponent=this.isStateless(this.reactComponent),this.key=qf(),this.portalKey=qf(),this.instanceCreated=this.isStatelessComponent()?Rs.resolve(!1):new Rs((function(e){o.resolveInstanceCreated=e}))}return(0,s.Z)(t,[{key:"getGui",value:function(){return this.eParentElement}},{key:"getRootElement",value:function(){return this.eParentElement.firstChild}},{key:"destroy",value:function(){return this.componentInstance&&"function"==typeof this.componentInstance.destroy&&this.componentInstance.destroy(),this.portalManager.destroyPortal(this.portal)}},{key:"createParentElement",value:function(e){var t=this.portalManager.getComponentWrappingElement(),n=document.createElement(t||"div");return n.classList.add("ag-react-container"),e.reactContainer=n,n}},{key:"addParentContainerStyleAndClasses",value:function(){var e=this;this.componentInstance&&(this.componentInstance.getReactContainerStyle&&this.componentInstance.getReactContainerStyle()&&(Es.warnOnce('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()&&(Es.warnOnce('Since v31.1 "getReactContainerClasses" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),this.componentInstance.getReactContainerClasses().forEach((function(t){return e.eParentElement.classList.add(t)}))))}},{key:"statelessComponentRendered",value:function(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}},{key:"getFrameworkComponentInstance",value:function(){return this.componentInstance}},{key:"isStatelessComponent",value:function(){return this.statelessComponent}},{key:"getReactComponentName",value:function(){return this.reactComponent.name}},{key:"getMemoType",value:function(){return this.hasSymbol()?Symbol.for("react.memo"):60115}},{key:"hasSymbol",value:function(){return"function"===typeof Symbol&&Symbol.for}},{key:"isStateless",value:function(e){return"function"===typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"===typeof e&&e.$$typeof===this.getMemoType()}},{key:"hasMethod",value:function(e){var t=this.getFrameworkComponentInstance();return!!t&&null!=t[e]||this.fallbackMethodAvailable(e)}},{key:"callMethod",value:function(e,t){var n=this,i=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(i){var r=i[e];return r?r.apply(i,t):this.fallbackMethodAvailable(e)?this.fallbackMethod(e,t&&t[0]?t[0]:{}):void 0}setTimeout((function(){return n.callMethod(e,t)}))}},{key:"addMethod",value:function(e,t){this[e]=t}},{key:"init",value:function(e){var t=this;return this.eParentElement=this.createParentElement(e),this.params=e,this.createOrUpdatePortal(e),new Rs((function(e){return t.createReactComponent(e)}))}},{key:"createOrUpdatePortal",value:function(e){var t=this;this.isStatelessComponent()||(e.ref=function(e){var n;t.componentInstance=e,t.addParentContainerStyleAndClasses(),null==(n=t.resolveInstanceCreated)||n.call(t,!0),t.resolveInstanceCreated=void 0}),this.reactElement=this.createElement(this.reactComponent,jf(Uf({},e),{key:this.key})),this.portal=(0,Ff.createPortal)(this.reactElement,this.eParentElement,this.portalKey)}},{key:"createElement",value:function(t,n){return(0,e.createElement)(t,n)}},{key:"createReactComponent",value:function(e){this.portalManager.mountReactPortal(this.portal,this,(function(t){e(t)}))}},{key:"isNullValue",value:function(){return this.valueRenderedIsNull(this.params)}},{key:"rendered",value:function(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())}},{key:"valueRenderedIsNull",value:function(t){if(!this.componentType.cellRenderer)return!1;var n=console.error;try{return console.error=function(){},""===(0,_f.uS)((0,e.createElement)(this.reactComponent,t))}catch(i){}finally{console.error=n}return!1}},{key:"refreshComponent",value:function(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}},{key:"fallbackMethod",value:function(e,t){var n=this["".concat(e,"Component")];if(!this.suppressFallbackMethods&&n)return n.bind(this)(t)}},{key:"fallbackMethodAvailable",value:function(e){return!this.suppressFallbackMethods&&!!this["".concat(e,"Component")]}}]),t}();function Jf(e,t,n){e.forEach((function(e){var i=t[e];i&&(n[e]=i)}))}var $f=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).awaitUpdateCallback=new Rs((function(t){e.resolveUpdateCallback=t})),e.wrapperComponent=Yf,e}return(0,s.Z)(n,[{key:"init",value:function(e){return this.sourceParams=e,(0,mn.Z)((0,yn.Z)(n.prototype),"init",this).call(this,this.getProps())}},{key:"addMethod",value:function(){}},{key:"getInstance",value:function(){var e=this;return this.instanceCreated.then((function(){return e.componentInstance}))}},{key:"getFrameworkComponentInstance",value:function(){return this}},{key:"createElement",value:function(e,t){var i=this;return(0,mn.Z)((0,yn.Z)(n.prototype),"createElement",this).call(this,this.wrapperComponent,{initialProps:t,CustomComponentClass:e,setMethods:function(e){return i.setMethods(e)},addUpdateCallback:function(e){i.updateCallback=function(){return e(i.getProps()),new Rs((function(e){setTimeout((function(){e()}))}))},i.resolveUpdateCallback()}})}},{key:"setMethods",value:function(e){this.providedMethods=e,Jf(this.getOptionalMethods(),this.providedMethods,this)}},{key:"getOptionalMethods",value:function(){return[]}},{key:"getProps",value:function(){return jf(Uf({},this.sourceParams),{key:this.key,ref:this.ref})}},{key:"refreshProps",value:function(){var e=this;return this.updateCallback?this.updateCallback():new Rs((function(t){return e.awaitUpdateCallback.then((function(){e.updateCallback().then((function(){return t()}))}))}))}}]),n}(Qf),ev=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).date=null,e.onDateChange=function(t){return e.updateDate(t)},e}return(0,s.Z)(n,[{key:"getDate",value:function(){return this.date}},{key:"setDate",value:function(e){this.date=e,this.refreshProps()}},{key:"refresh",value:function(e){this.sourceParams=e,this.refreshProps()}},{key:"getOptionalMethods",value:function(){return["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled"]}},{key:"updateDate",value:function(e){this.setDate(e),this.sourceParams.onDateChanged()}},{key:"getProps",value:function(){var e=(0,mn.Z)((0,yn.Z)(n.prototype),"getProps",this).call(this);return e.date=this.date,e.onDateChange=this.onDateChange,delete e.onDateChanged,e}}]),n}($f),tv=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).model=null,e.onModelChange=function(t){return e.updateModel(t)},e.onUiChange=function(){return e.sourceParams.filterChangedCallback()},e}return(0,s.Z)(n,[{key:"isFilterActive",value:function(){return null!=this.model}},{key:"doesFilterPass",value:function(e){return this.providedMethods.doesFilterPass(e)}},{key:"getModel",value:function(){return this.model}},{key:"setModel",value:function(e){return this.model=e,this.refreshProps()}},{key:"refresh",value:function(e){return this.sourceParams=e,this.refreshProps(),!0}},{key:"getOptionalMethods",value:function(){return["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}},{key:"updateModel",value:function(e){var t=this;this.setModel(e).then((function(){return t.sourceParams.filterChangedCallback()}))}},{key:"getProps",value:function(){var e=(0,mn.Z)((0,yn.Z)(n.prototype),"getProps",this).call(this);return e.model=this.model,e.onModelChange=this.onModelChange,e.onUiChange=this.onUiChange,delete e.filterChangedCallback,delete e.filterModifiedCallback,delete e.valueGetter,e}}]),n}($f);function nv(e,t){e.parentFilterInstance((function(n){(n.setModel(t)||Rs.resolve()).then((function(){e.filterParams.filterChangedCallback()}))}))}var iv=function(){function e(t,n){var i=this;(0,a.Z)(this,e),this.floatingFilterParams=t,this.refreshProps=n,this.model=null,this.onModelChange=function(e){return i.updateModel(e)}}return(0,s.Z)(e,[{key:"getProps",value:function(){return jf(Uf({},this.floatingFilterParams),{model:this.model,onModelChange:this.onModelChange})}},{key:"onParentModelChanged",value:function(e){this.model=e,this.refreshProps()}},{key:"refresh",value:function(e){this.floatingFilterParams=e,this.refreshProps()}},{key:"setMethods",value:function(e){Jf(this.getOptionalMethods(),e,this)}},{key:"getOptionalMethods",value:function(){return["afterGuiAttached"]}},{key:"updateModel",value:function(e){this.model=e,this.refreshProps(),nv(this.floatingFilterParams,e)}}]),e}(),rv=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).model=null,e.onModelChange=function(t){return e.updateModel(t)},e}return(0,s.Z)(n,[{key:"onParentModelChanged",value:function(e){this.model=e,this.refreshProps()}},{key:"refresh",value:function(e){this.sourceParams=e,this.refreshProps()}},{key:"getOptionalMethods",value:function(){return["afterGuiAttached"]}},{key:"updateModel",value:function(e){this.model=e,this.refreshProps(),nv(this.sourceParams,e)}},{key:"getProps",value:function(){var e=(0,mn.Z)((0,yn.Z)(n.prototype),"getProps",this).call(this);return e.model=this.model,e.onModelChange=this.onModelChange,e}}]),n}($f),ov=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"refresh",value:function(e){this.sourceParams=e,this.refreshProps()}}]),n}($f),av=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).active=!1,e.expanded=!1,e.onActiveChange=function(t){return e.updateActive(t)},e}return(0,s.Z)(n,[{key:"setActive",value:function(e){this.awaitSetActive(e)}},{key:"setExpanded",value:function(e){this.expanded=e,this.refreshProps()}},{key:"getOptionalMethods",value:function(){return["select","configureDefaults"]}},{key:"awaitSetActive",value:function(e){return this.active=e,this.refreshProps()}},{key:"updateActive",value:function(e){var t=this,n=this.awaitSetActive(e);e&&n.then((function(){return t.sourceParams.onItemActivated()}))}},{key:"getProps",value:function(){var e=(0,mn.Z)((0,yn.Z)(n.prototype),"getProps",this).call(this);return e.active=this.active,e.expanded=this.expanded,e.onActiveChange=this.onActiveChange,delete e.onItemActivated,e}}]),n}($f),sv=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"refresh",value:function(e){this.sourceParams=e,this.refreshProps()}}]),n}($f),lv=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"refresh",value:function(e){return this.sourceParams=e,this.refreshProps(),!0}}]),n}($f),uv=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).onStateChange=function(t){return e.updateState(t)},e}return(0,s.Z)(n,[{key:"refresh",value:function(e){return this.sourceParams=e,this.refreshProps(),!0}},{key:"getState",value:function(){return this.state}},{key:"updateState",value:function(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}},{key:"getProps",value:function(){var e=(0,mn.Z)((0,yn.Z)(n.prototype),"getProps",this).call(this);return e.state=this.state,e.onStateChange=this.onStateChange,e}}]),n}($f),cv=function(){function e(t,n,i){(0,a.Z)(this,e),this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=n||"div",this.refresher=t,this.maxComponentCreationTimeMs=i||e.MAX_COMPONENT_CREATION_TIME_IN_MS}return(0,s.Z)(e,[{key:"getPortals",value:function(){return this.portals}},{key:"destroy",value:function(){this.destroyed=!0}},{key:"destroyPortal",value:function(e){this.portals=this.portals.filter((function(t){return t!==e})),this.batchUpdate()}},{key:"getComponentWrappingElement",value:function(){return this.wrappingElement}},{key:"mountReactPortal",value:function(e,t,n){this.portals=[].concat((0,o.Z)(this.portals),[e]),this.waitForInstance(t,n),this.batchUpdate()}},{key:"updateReactPortal",value:function(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()}},{key:"batchUpdate",value:function(){var e=this;this.hasPendingPortalUpdate||(setTimeout((function(){e.destroyed||(e.refresher(),e.hasPendingPortalUpdate=!1)})),this.hasPendingPortalUpdate=!0)}},{key:"waitForInstance",value:function(e,t){var n=this,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 e.isNullValue()?void t(e):(console.error("AG Grid: React Component '".concat(e.getReactComponentName(),"' not created within ").concat(this.maxComponentCreationTimeMs,"ms.")),void console.error("    If the component is using `forwardRef` but not `useImperativeHandle`, add the following: `useImperativeHandle(ref, () => ({}));`"));window.setTimeout((function(){n.waitForInstance(e,t,i)}))}}}]),e}();cv.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3;var dv=cv,hv=e.createContext({}),pv=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.filter((function(e){return null!=e&&""!==e}));return i.join(" ")},fv=function(){function e(){var t=this;(0,a.Z)(this,e),this.classesMap={};for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];i.forEach((function(e){t.classesMap[e]=!0}))}return(0,s.Z)(e,[{key:"setClass",value:function(t,n){if(!!this.classesMap[t]==n)return this;var i=new e;return i.classesMap=Uf({},this.classesMap),i.classesMap[t]=n,i}},{key:"toString",value:function(){var e=this;return Object.keys(this.classesMap).filter((function(t){return e.classesMap[t]})).join(" ")}}]),e}(),vv=function(e){return"function"===typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"===typeof e&&e.$$typeof===("function"===typeof Symbol&&Symbol.for?Symbol.for("react.memo"):60115)},gv=null!=Ff.createRoot&&null!=Ff.flushSync,mv=!1;var yv=function(e,t){gv&&e&&!mv?Ff.flushSync(t):t()};function Cv(e,t,n){if(null==t||null==e)return t;if(e===t||0===t.length&&0===e.length)return e;if(n||0===e.length&&t.length>0||e.length>0&&0===t.length)return t;for(var i=[],r=[],o=new Map,a=new Map,s=0;s<t.length;s++){var l=t[s];a.set(l.getInstanceId(),l)}for(var u=0;u<e.length;u++){var c=e[u];o.set(c.getInstanceId(),c),a.has(c.getInstanceId())&&i.push(c)}for(var d=0;d<t.length;d++){var h=t[d],p=h.getInstanceId();o.has(p)||r.push(h)}return i.length===e.length&&0===r.length?e:0===i.length&&r.length===t.length?t:[].concat(i,r)}var kv=function(e,t,n,i){if(!(!e||e.componentFromFramework||t.isDestroyed())){var r=e.newAgStackInstance();if(r){var o,a,s=!1;return r.then((function(e){s?t.destroyBean(e):(a=(o=e).getGui(),n.appendChild(a),wv(i,o))})),function(){s=!0,o&&(a&&a.parentElement&&a.parentElement.removeChild(a),t.destroyBean(o),i&&wv(i,void 0))}}}},wv=function(e,t){e&&(e instanceof Function?e(t):e.current=t)},Sv=(0,e.forwardRef)((function(t,n){var i,o=(0,e.useContext)(hv).context,a=(0,e.useRef)(null),s=(0,e.useRef)(null),l=(0,e.useRef)(null),u=(0,e.useRef)(null),c=(0,e.useRef)(null),d=(0,e.useRef)(),h=(0,e.useState)(),p=(0,r.Z)(h,2),f=p[0],v=p[1],g=(0,e.useState)(),m=(0,r.Z)(g,2),y=m[0],C=m[1],k=(0,e.useState)(),w=(0,r.Z)(k,2),S=w[0],b=w[1],E=(0,e.useState)((function(){return new fv})),x=(0,r.Z)(E,2),R=x[0],D=x[1],T=(0,e.useState)((function(){return new fv("ag-hidden")})),O=(0,r.Z)(T,2),P=O[0],A=O[1],M=(0,e.useState)((function(){return new fv("ag-hidden")})),N=(0,r.Z)(M,2),L=N[0],I=N[1],F=(0,e.useState)((function(){return new fv("ag-invisible")})),_=(0,r.Z)(F,2),G=_[0],Z=_[1];(0,e.useImperativeHandle)(n,(function(){return{refresh:function(){return!1}}})),(0,e.useLayoutEffect)((function(){return kv(f,o,s.current)}),[f]);var V=(0,e.useCallback)((function(e){if(a.current=e,!a.current)return o.destroyBean(d.current),void(d.current=null);var n={setInnerRenderer:function(e,t){v(e),b(t)},setChildCount:function(e){return C(e)},addOrRemoveCssClass:function(e,t){return D((function(n){return n.setClass(e,t)}))},setContractedDisplayed:function(e){return I((function(t){return t.setClass("ag-hidden",!e)}))},setExpandedDisplayed:function(e){return A((function(t){return t.setClass("ag-hidden",!e)}))},setCheckboxVisible:function(e){return Z((function(t){return t.setClass("ag-invisible",!e)}))}};d.current=o.createBean(new eu),d.current.init(n,a.current,l.current,u.current,c.current,Sv,t)}),[]),H=(0,e.useMemo)((function(){return"ag-cell-wrapper ".concat(R.toString())}),[R]),B=(0,e.useMemo)((function(){return"ag-group-expanded ".concat(P.toString())}),[P]),W=(0,e.useMemo)((function(){return"ag-group-contracted ".concat(L.toString())}),[L]),z=(0,e.useMemo)((function(){return"ag-group-checkbox ".concat(G.toString())}),[G]),U=f&&f.componentFromFramework,j=U?f.componentClass:void 0,K=null==f&&null!=S,Y=Es.escapeString(S,!0);return e.createElement("span",Uf({className:H,ref:V},t.colDef?{}:{role:null==(i=d.current)?void 0:i.getCellAriaRole()}),e.createElement("span",{className:B,ref:u}),e.createElement("span",{className:W,ref:c}),e.createElement("span",{className:z,ref:l}),e.createElement("span",{className:"ag-group-value",ref:s},K&&e.createElement(e.Fragment,null,Y),U&&e.createElement(j,Uf({},f.params))),e.createElement("span",{className:"ag-group-child-count"},y))})),bv=Sv,Ev=(0,e.memo)((function(t){var n=t.ctrl,i=n.isAlive(),o=(0,e.useContext)(hv).context,a=i?n.getColId():void 0,s=(0,e.useState)(),l=(0,r.Z)(s,2),u=l[0],c=l[1],d=(0,e.useRef)(null),h=(0,e.useRef)(null),p=(0,e.useRef)(null),f=(0,e.useRef)(),v=(0,e.useRef)();i&&!v.current&&(v.current=new Ds((function(){return d.current})));var g=(0,e.useCallback)((function(e){var t;if(d.current=e,d.current&&i){var r={setWidth:function(e){d.current&&(d.current.style.width=e)},addOrRemoveCssClass:function(e,t){return v.current.addOrRemoveCssClass(e,t)},setAriaSort:function(e){d.current&&(e?Es.setAriaSort(d.current,e):Es.removeAriaSort(d.current))},setUserCompDetails:function(e){return c(e)},getUserCompInstance:function(){return f.current||void 0}};n.setComp(r,d.current,h.current,p.current);var o=n.getSelectAllGui();null==(t=h.current)||t.insertAdjacentElement("afterend",o)}}),[]);(0,e.useLayoutEffect)((function(){return kv(u,o,p.current,f)}),[u]),(0,e.useEffect)((function(){n.setDragSource(d.current)}),[u]);var m=(0,e.useMemo)((function(){return!!((null==u?void 0:u.componentFromFramework)&&vv(u.componentClass))}),[u]),y=u&&u.componentFromFramework,C=u&&u.componentClass;return e.createElement("div",{ref:g,className:"ag-header-cell","col-id":a,role:"columnheader"},e.createElement("div",{ref:h,className:"ag-header-cell-resize",role:"presentation"}),e.createElement("div",{ref:p,className:"ag-header-cell-comp-wrapper",role:"presentation"},y&&m&&e.createElement(C,Uf({},u.params)),y&&!m&&e.createElement(C,jf(Uf({},u.params),{ref:f}))))})),xv=(0,e.memo)((function(t){var n=(0,e.useContext)(hv).context,i=t.ctrl,o=(0,e.useState)((function(){return new fv})),a=(0,r.Z)(o,2),s=a[0],l=a[1],u=(0,e.useState)((function(){return new fv})),c=(0,r.Z)(u,2),d=c[0],h=c[1],p=(0,e.useState)("false"),f=(0,r.Z)(p,2),v=f[0],g=f[1],m=(0,e.useState)(),y=(0,r.Z)(m,2),C=y[0],k=y[1],w=(0,e.useState)(),S=(0,r.Z)(w,2),b=S[0],E=S[1],x=(0,e.useMemo)((function(){return i.getColId()}),[]),R=(0,e.useRef)(null),D=(0,e.useRef)(null),T=(0,e.useRef)(),O=(0,e.useCallback)((function(e){if(R.current=e,R.current){var t={setWidth:function(e){R.current&&(R.current.style.width=e)},addOrRemoveCssClass:function(e,t){return l((function(n){return n.setClass(e,t)}))},setUserCompDetails:function(e){return E(e)},setResizableDisplayed:function(e){h((function(t){return t.setClass("ag-hidden",!e)})),g(e?"false":"true")},setAriaExpanded:function(e){return k(e)},getUserCompInstance:function(){return T.current||void 0}};i.setComp(t,R.current,D.current)}}),[]);(0,e.useLayoutEffect)((function(){return kv(b,n,R.current)}),[b]),(0,e.useEffect)((function(){R.current&&i.setDragSource(R.current)}),[b]);var P=(0,e.useMemo)((function(){return!!((null==b?void 0:b.componentFromFramework)&&vv(b.componentClass))}),[b]),A=(0,e.useMemo)((function(){return"ag-header-group-cell "+s.toString()}),[s]),M=(0,e.useMemo)((function(){return"ag-header-cell-resize "+d.toString()}),[d]),N=b&&b.componentFromFramework,L=b&&b.componentClass;return e.createElement("div",{ref:O,className:A,"col-id":x,role:"columnheader","aria-expanded":C},N&&P&&e.createElement(L,Uf({},b.params)),N&&!P&&e.createElement(L,jf(Uf({},b.params),{ref:T})),e.createElement("div",{ref:D,"aria-hidden":v,className:M}))}));function Rv(){Es.warnOnce("Using custom components without `reactiveCustomComponents = true` is deprecated.")}var Dv=(0,e.memo)((function(t){var n=(0,e.useContext)(hv),i=n.context,o=n.gridOptionsService,a=(0,e.useState)((function(){return new fv("ag-header-cell","ag-floating-filter")})),s=(0,r.Z)(a,2),l=s[0],u=s[1],c=(0,e.useState)((function(){return new fv})),d=(0,r.Z)(c,2),h=d[0],p=d[1],f=(0,e.useState)((function(){return new fv("ag-floating-filter-button","ag-hidden")})),v=(0,r.Z)(f,2),g=v[0],m=v[1],y=(0,e.useState)("false"),C=(0,r.Z)(y,2),k=C[0],w=C[1],S=(0,e.useState)(),b=(0,r.Z)(S,2),E=b[0],x=b[1],R=(0,e.useState)(1),D=(0,r.Z)(R,2),T=(D[0],D[1]),O=(0,e.useRef)(null),P=(0,e.useRef)(null),A=(0,e.useRef)(null),M=(0,e.useRef)(null),N=(0,e.useRef)(),L=(0,e.useRef)(),I=function(e){null!=e&&N.current&&N.current(e)},F=t.ctrl,_=(0,e.useCallback)((function(e){if(O.current=e,O.current){L.current=new Rs((function(e){N.current=e}));var t={addOrRemoveCssClass:function(e,t){return u((function(n){return n.setClass(e,t)}))},addOrRemoveBodyCssClass:function(e,t){return p((function(n){return n.setClass(e,t)}))},setButtonWrapperDisplayed:function(e){m((function(t){return t.setClass("ag-hidden",!e)})),w(e?"false":"true")},setWidth:function(e){O.current&&(O.current.style.width=e)},setCompDetails:function(e){return x(e)},getFloatingFilterComp:function(){return L.current?L.current:null},setMenuIcon:function(e){var t;return null==(t=M.current)?void 0:t.appendChild(e)}};F.setComp(t,O.current,M.current,P.current)}}),[]);(0,e.useLayoutEffect)((function(){return kv(E,i,P.current,I)}),[E]);var G=(0,e.useMemo)((function(){return l.toString()}),[l]),Z=(0,e.useMemo)((function(){return h.toString()}),[h]),V=(0,e.useMemo)((function(){return g.toString()}),[g]),H=(0,e.useMemo)((function(){return!!(E&&E.componentFromFramework&&vv(E.componentClass))}),[E]),B=(0,e.useMemo)((function(){return o.get("reactiveCustomComponents")}),[]),W=(0,e.useMemo)((function(){if(E){if(B){var e=new iv(E.params,(function(){return T((function(e){return e+1}))}));return I(e),e}E.componentFromFramework&&Rv()}}),[E]),z=null==W?void 0:W.getProps(),U=E&&E.componentFromFramework,j=E&&E.componentClass;return e.createElement("div",{ref:_,className:G,role:"gridcell"},e.createElement("div",{ref:P,className:Z,role:"presentation"},U&&!B&&e.createElement(j,jf(Uf({},E.params),{ref:H?function(){}:I})),U&&B&&e.createElement(Kf.Provider,{value:{setMethods:function(e){return W.setMethods(e)}}},e.createElement(j,Uf({},z)))),e.createElement("div",{ref:A,"aria-hidden":k,className:V,role:"presentation"},e.createElement("button",{ref:M,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))})),Tv=(0,e.memo)((function(t){var n=t.ctrl,i=(0,e.useMemo)((function(){return n.getTopAndHeight()}),[]),o=i.topOffset,a=i.rowHeight,s=n.getAriaRowIndex(),l=n.getHeaderRowClass(),u=(0,e.useState)((function(){return a+"px"})),c=(0,r.Z)(u,2),d=c[0],h=c[1],p=(0,e.useState)((function(){return o+"px"})),f=(0,r.Z)(p,2),v=f[0],g=f[1],m=(0,e.useState)((function(){return n.getHeaderCtrls()})),y=(0,r.Z)(m,2),C=y[0],k=y[1],w=(0,e.useRef)(null),S=(0,e.useCallback)((function(e){if(w.current=e,e){var t={setHeight:function(e){return h(e)},setTop:function(e){return g(e)},setHeaderCtrls:function(e,t,n){yv(n,(function(){k((function(n){return Cv(n,e,t)}))}))},setWidth:function(e){w.current&&(w.current.style.width=e)}};n.setComp(t,!1)}}),[]),b=(0,e.useMemo)((function(){return{height:d,top:v}}),[d,v]),E=(0,e.useCallback)((function(t){switch(n.getType()){case Jc.COLUMN_GROUP:return e.createElement(xv,{ctrl:t,key:t.getInstanceId()});case Jc.FLOATING_FILTER:return e.createElement(Dv,{ctrl:t,key:t.getInstanceId()});default:return e.createElement(Ev,{ctrl:t,key:t.getInstanceId()})}}),[]);return e.createElement("div",{ref:S,className:l,role:"row",style:b,"aria-rowindex":s},C.map(E))})),Ov=(0,e.memo)((function(t){var n=(0,e.useState)(!0),i=(0,r.Z)(n,2),o=i[0],a=i[1],s=(0,e.useState)([]),l=(0,r.Z)(s,2),u=l[0],c=l[1],d=(0,e.useContext)(hv).context,h=(0,e.useRef)(null),p=(0,e.useRef)(null),f=(0,e.useRef)(null),v="left"===t.pinned,g="right"===t.pinned,m=!v&&!g,y=(0,e.useCallback)((function(e){if(h.current=e,!h.current)return d.destroyBean(f.current),void(f.current=null);var n={setDisplayed:a,setCtrls:function(e){return c(e)},setCenterWidth:function(e){p.current&&(p.current.style.width=e)},setViewportScrollLeft:function(e){h.current&&(h.current.scrollLeft=e)},setPinnedContainerWidth:function(e){h.current&&(h.current.style.width=e,h.current.style.minWidth=e,h.current.style.maxWidth=e)}};f.current=d.createBean(new fd(t.pinned)),f.current.setComp(n,h.current)}),[]),C=o?"":"ag-hidden",k=function(){return u.map((function(t){return e.createElement(Tv,{ctrl:t,key:t.getInstanceId()})}))};return e.createElement(e.Fragment,null,v&&e.createElement("div",{ref:y,className:"ag-pinned-left-header "+C,"aria-hidden":!o,role:"rowgroup"},k()),g&&e.createElement("div",{ref:y,className:"ag-pinned-right-header "+C,"aria-hidden":!o,role:"rowgroup"},k()),m&&e.createElement("div",{ref:y,className:"ag-header-viewport "+C,role:"presentation"},e.createElement("div",{ref:p,className:"ag-header-container",role:"rowgroup"},k())))})),Pv=(0,e.memo)((function(){var t=(0,e.useState)((function(){return new fv})),n=(0,r.Z)(t,2),i=n[0],o=n[1],a=(0,e.useState)(),s=(0,r.Z)(a,2),l=s[0],u=s[1],c=(0,e.useContext)(hv).context,d=(0,e.useRef)(null),h=(0,e.useRef)(null),p=(0,e.useCallback)((function(e){if(d.current=e,!e)return c.destroyBean(h.current),void(h.current=null);var t={addOrRemoveCssClass:function(e,t){return o((function(n){return n.setClass(e,t)}))},setHeightAndMinHeight:function(e){return u(e)}};h.current=c.createBean(new yd),h.current.setComp(t,d.current,d.current)}),[]),f=(0,e.useMemo)((function(){return"ag-header "+i.toString()}),[i]),v=(0,e.useMemo)((function(){return{height:l,minHeight:l}}),[l]);return e.createElement("div",{ref:p,className:f,style:v,role:"presentation"},e.createElement(Ov,{pinned:"left"}),e.createElement(Ov,{pinned:null}),e.createElement(Ov,{pinned:"right"}))})),Av=function(t,n){(0,e.useEffect)((function(){var e=n.current;if(e){var i=e.parentElement;if(i){var r=document.createComment(t);return i.insertBefore(r,e),function(){i.removeChild(r)}}}}),[t])},Mv=(0,e.memo)((function(t){var n=(0,e.useState)(),i=(0,r.Z)(n,2),o=i[0],a=i[1],s=(0,e.useContext)(hv),l=s.context,u=s.popupService,c=s.localeService,d=s.gridOptionsService;return function(t){var n=(0,e.useRef)(t),i=(0,e.useRef)(),o=(0,e.useRef)(!1),a=(0,e.useRef)(!1),s=(0,e.useState)(0),l=(0,r.Z)(s,2)[1];o.current&&(a.current=!0),(0,e.useEffect)((function(){return o.current||(i.current=n.current(),o.current=!0),l((function(e){return e+1})),function(){a.current&&i.current&&i.current()}}),[])}((function(){var e=t.editDetails,n=t.cellCtrl,i=t.eParentCell,r=e.compDetails,o=d.get("stopEditingWhenCellsLoseFocus"),s=l.createBean(new Vc(r.params)),h=s.getGui();if(t.jsChildComp){var p=t.jsChildComp.getGui();p&&h.appendChild(p)}var f={column:n.getColumn(),rowNode:n.getRowNode(),type:"popupCellEditor",eventSource:i,ePopup:h,position:e.popupPosition,keepWithinBounds:!0},v=u.positionPopupByComponent.bind(u,f),g=c.getLocaleTextFunc(),m=u.addPopup({modal:o,eChild:h,closeOnEsc:!0,closedCallback:function(){n.onPopupEditorClosed()},anchorToElement:i,positionCallback:v,ariaLabel:g("ariaLabelCellEditor","Cell Editor")}),y=m?m.hideFunc:void 0;return a(s),t.jsChildComp&&t.jsChildComp.afterGuiAttached&&t.jsChildComp.afterGuiAttached(),function(){null!=y&&y(),l.destroyBean(s)}})),e.createElement(e.Fragment,null,o&&t.wrappedContent&&(0,Ff.createPortal)(t.wrappedContent,o.getGui()))})),Nv=function(t,n,i,r,o,a){var s=(0,e.useContext)(hv).context,l=(0,e.useCallback)((function(){var e=o.current;if(e){var t=e.getGui();t&&t.parentElement&&t.parentElement.removeChild(t),s.destroyBean(e),o.current=void 0}}),[]);(0,e.useEffect)((function(){var e=null!=t,r=t&&t.compDetails&&!t.compDetails.componentFromFramework;if(e&&r&&!(n&&null==i)){var s=t.compDetails;if(o.current){var u=o.current,c=!!(null!=u.refresh&&0==t.force)&&u.refresh(s.params);if(!0===c||void 0===c)return;l()}var d=s.newAgStackInstance();if(d){var h=d.resolveNow(null,(function(e){return e}));if(h){var p=h.getGui();if(p)(n?i:a.current).appendChild(p),o.current=h}}}else l()}),[t,n,r]),(0,e.useEffect)((function(){return l}),[])},Lv=function(){function e(t,n){var i=this;(0,a.Z)(this,e),this.cellEditorParams=t,this.refreshProps=n,this.instanceCreated=new Rs((function(e){i.resolveInstanceCreated=e})),this.onValueChange=function(e){return i.updateValue(e)},this.value=t.value}return(0,s.Z)(e,[{key:"getProps",value:function(){return jf(Uf({},this.cellEditorParams),{initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange})}},{key:"getValue",value:function(){return this.value}},{key:"refresh",value:function(e){this.cellEditorParams=e,this.refreshProps()}},{key:"setMethods",value:function(e){Jf(this.getOptionalMethods(),e,this)}},{key:"getInstance",value:function(){var e=this;return this.instanceCreated.then((function(){return e.componentInstance}))}},{key:"setRef",value:function(e){var t;this.componentInstance=e,null==(t=this.resolveInstanceCreated)||t.call(this),this.resolveInstanceCreated=void 0}},{key:"getOptionalMethods",value:function(){return["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached"]}},{key:"updateValue",value:function(e){this.value=e,this.refreshProps()}}]),e}(),Iv=function(t,n,i){var r=t.compProxy;return e.createElement(e.Fragment,null,!r&&e.createElement(n,jf(Uf({},t.compDetails.params),{ref:i})),r&&function(t,n,i){var r=t.compProxy;i(r);var o=r.getProps(),a=vv(n);return e.createElement(Kf.Provider,{value:{setMethods:function(e){return r.setMethods(e)}}},a&&e.createElement(n,Uf({},o)),!a&&e.createElement(n,jf(Uf({},o),{ref:function(e){return r.setRef(e)}})))}(t,n,i))},Fv=(0,e.memo)((function(t){var n=(0,e.useContext)(hv).context,i=t.cellCtrl,o=t.printLayout,a=t.editingRow,s=i.getTabIndex(),l=i.getColumnIdSanitised(),u=i.getInstanceId(),c=(0,e.useState)((function(){return i.isCellRenderer()?void 0:{compDetails:void 0,value:i.getValueToDisplay(),force:!1}})),d=(0,r.Z)(c,2),h=d[0],p=d[1],f=(0,e.useState)(),v=(0,r.Z)(f,2),g=v[0],m=v[1],y=(0,e.useState)(1),C=(0,r.Z)(y,2),k=C[0],w=C[1],S=(0,e.useState)(),b=(0,r.Z)(S,2),E=b[0],x=b[1],R=(0,e.useState)(!1),D=(0,r.Z)(R,2),T=D[0],O=D[1],P=(0,e.useState)(!1),A=(0,r.Z)(P,2),M=A[0],N=A[1],L=(0,e.useState)(!1),I=(0,r.Z)(L,2),F=I[0],_=I[1],G=(0,e.useState)(),Z=(0,r.Z)(G,2),V=Z[0],H=Z[1],B=(0,e.useMemo)((function(){return i.isForceWrapper()}),[i]),W=(0,e.useMemo)((function(){return i.getCellAriaRole()}),[i]),z=(0,e.useRef)(null),U=(0,e.useRef)(null),j=(0,e.useRef)(),K=(0,e.useRef)(),Y=(0,e.useRef)(),X=(0,e.useRef)([]),q=(0,e.useRef)(),Q=(0,e.useState)(0),J=(0,r.Z)(Q,2),$=J[0],ee=J[1],te=(0,e.useCallback)((function(e){q.current=e,ee((function(e){return e+1}))}),[]),ne=B||null!=h&&(T||F||M),ie=(0,e.useCallback)((function(e,t){(K.current=t,t)&&(!function(e,t,n){var i=n.getColumn();if(!e&&t.isPopup&&t.isPopup()){var r="AG Grid: Found an issue in column ".concat(i.getColId(),". If using React, specify an editor is a popup using colDef.cellEditorPopup=true. AG Grid React cannot depend on the editor component specifying if it's in a popup (via the isPopup() method on the editor), as React needs to know this information BEFORE the component is created.");Es.doOnce((function(){return console.warn(r)}),"jsEditorComp-isPopup-"+n.getColumn().getColId())}if(e&&t.getPopupPosition&&null!=t.getPopupPosition()){var o="AG Grid: Found an issue in column ".concat(i.getColId(),". If using React, specify an editor popup position using colDef.cellEditorPopupPosition=true. AG Grid React cannot depend on the editor component specifying it's position (via the getPopupPosition() method on the editor), as React needs to know this information BEFORE the component is created.");Es.doOnce((function(){return console.warn(o)}),"jsEditorComp-getPopupPosition-"+n.getColumn().getColId())}}(e,t,i),t.isCancelBeforeStart&&t.isCancelBeforeStart()&&setTimeout((function(){i.stopEditing(!0),i.focusCell(!0)})))}),[i]),re=(0,e.useCallback)((function(e){return ie(!0,e)}),[ie]),oe=(0,e.useCallback)((function(e){return ie(!1,e)}),[ie]),ae=(0,e.useRef)();ae.current||(ae.current=new Ds((function(){return z.current}))),Nv(h,ne,q.current,$,j,z);var se=(0,e.useRef)();(0,e.useLayoutEffect)((function(){var e=se.current,t=h;if(se.current=h,null!=e&&null!=e.compDetails&&null!=t&&null!=t.compDetails){var n=e.compDetails,i=t.compDetails;if(n.componentClass==i.componentClass)if(null!=U.current&&null!=U.current.refresh)1!=U.current.refresh(i.params)&&w((function(e){return e+1}))}}),[h]),(0,e.useLayoutEffect)((function(){if(g&&!g.compDetails.componentFromFramework){var e=g.compDetails,t=!0===g.popup,i=function(e){var t=e.newAgStackInstance();if(t)return t.resolveNow(null,(function(e){return e}))}(e);if(i){var r=i.getGui();if(ie(t,i),!t){var o=(B?Y:z).current;null==o||o.appendChild(r),i.afterGuiAttached&&i.afterGuiAttached()}return H(i),function(){n.destroyBean(i),ie(t,void 0),H(void 0),r&&r.parentElement&&r.parentElement.removeChild(r)}}}}),[g]);var le=(0,e.useCallback)((function(e){if(Y.current=e,!Y.current)return X.current.forEach((function(e){return e()})),void(X.current=[]);var t=function(e){var t;if(e){var i=e.getGui();null==(t=Y.current)||t.insertAdjacentElement("afterbegin",i),X.current.push((function(){n.destroyBean(e),Es.removeFromParent(i)}))}return e};T&&t(i.createSelectionCheckbox());F&&t(i.createDndSource()),M&&t(i.createRowDragComp())}),[i,n,F,M,T]),ue=(0,e.useCallback)((function(e){if(z.current=e,z.current&&i){var t={addOrRemoveCssClass:function(e,t){return ae.current.addOrRemoveCssClass(e,t)},setUserStyles:function(e){return x(e)},getFocusableElement:function(){return z.current},setIncludeSelection:function(e){return O(e)},setIncludeRowDrag:function(e){return N(e)},setIncludeDndSource:function(e){return _(e)},getCellEditor:function(){return K.current||null},getCellRenderer:function(){return U.current?U.current:j.current},getParentOfValue:function(){return q.current?q.current:Y.current?Y.current:z.current},setRenderDetails:function(e,t,n){p((function(i){return(null==i?void 0:i.compDetails)!==e||(null==i?void 0:i.value)!==t||(null==i?void 0:i.force)!==n?{value:t,compDetails:e,force:n}:i}))},setEditDetails:function(e,t,n,i){if(e){var r=void 0;i?r=new Lv(e.params,(function(){return w((function(e){return e+1}))})):e.componentFromFramework&&Rv(),m({compDetails:e,popup:t,popupPosition:n,compProxy:r}),t||p(void 0)}else m((function(e){(null==e?void 0:e.compProxy)&&(K.current=void 0)}))}},n=Y.current||void 0;i.setComp(t,z.current,n,o,a)}}),[]),ce=(0,e.useMemo)((function(){return!!(h&&h.compDetails&&h.compDetails.componentFromFramework&&vv(h.compDetails.componentClass))}),[h]);(0,e.useLayoutEffect)((function(){var e;z.current&&(ae.current.addOrRemoveCssClass("ag-cell-value",!ne),ae.current.addOrRemoveCssClass("ag-cell-inline-editing",!!g&&!g.popup),ae.current.addOrRemoveCssClass("ag-cell-popup-editing",!!g&&!!g.popup),ae.current.addOrRemoveCssClass("ag-cell-not-inline-editing",!g||!!g.popup),null==(e=i.getRowCtrl())||e.setInlineEditingCss(!!g),i.shouldRestoreFocus()&&!i.isEditing()&&z.current.focus({preventScroll:!0}))}));var de=function(){return e.createElement(e.Fragment,null,null!=h&&function(t,n,i,r,o,a,s){var l=t.compDetails,u=t.value,c=!l,d=l&&l.componentFromFramework,h=l&&l.componentClass,p=(null==u?void 0:u.toString)?u.toString():u,f=function(){return e.createElement(e.Fragment,null,c&&e.createElement(e.Fragment,null,p),d&&!a&&e.createElement(h,jf(Uf({},l.params),{key:n,ref:r})),d&&a&&e.createElement(h,jf(Uf({},l.params),{key:n})))};return e.createElement(e.Fragment,null,o?e.createElement("span",{role:"presentation",id:"cell-".concat(i),className:"ag-cell-value",ref:s},f()):f())}(h,k,u,U,ne,ce,te),null!=g&&function(t,n,i,r,o,a){var s=t.compDetails,l=s.componentClass,u=s.componentFromFramework&&!t.popup,c=s.componentFromFramework&&t.popup,d=!s.componentFromFramework&&t.popup;return e.createElement(e.Fragment,null,u&&Iv(t,l,n),c&&e.createElement(Mv,{editDetails:t,cellCtrl:o,eParentCell:r,wrappedContent:Iv(t,l,i)}),d&&a&&e.createElement(Mv,{editDetails:t,cellCtrl:o,eParentCell:r,jsChildComp:a}))}(g,oe,re,z.current,i,V))};return e.createElement("div",{ref:ue,style:E,tabIndex:s,role:W,"col-id":l},ne?e.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:le},de()):de())})),_v=(0,e.memo)((function(t){var n=(0,e.useContext)(hv),i=n.context,o=n.gridOptionsService,a=t.rowCtrl,s=t.containerType,l=a.getTabIndex(),u=(0,e.useRef)(a.getDomOrder()),c=a.isFullWidth(),d=a.getRowNode().displayed,h=(0,e.useState)((function(){return d?a.getRowIndex():null})),p=(0,r.Z)(h,2),f=p[0],v=p[1],g=(0,e.useState)((function(){return a.getRowId()})),m=(0,r.Z)(g,2),y=m[0],C=m[1],k=(0,e.useState)((function(){return a.getBusinessKey()})),w=(0,r.Z)(k,2),S=w[0],b=w[1],E=(0,e.useState)((function(){return a.getRowStyles()})),x=(0,r.Z)(E,2),R=x[0],D=x[1],T=(0,e.useState)((function(){return null})),O=(0,r.Z)(T,2),P=O[0],A=O[1],M=(0,e.useState)(),N=(0,r.Z)(M,2),L=N[0],I=N[1],F=(0,e.useState)((function(){return d?a.getInitialRowTop(s):void 0})),_=(0,r.Z)(F,2),G=_[0],Z=_[1],V=(0,e.useState)((function(){return d?a.getInitialTransform(s):void 0})),H=(0,r.Z)(V,2),B=H[0],W=H[1],z=(0,e.useRef)(null),U=(0,e.useRef)(),j=(0,e.useRef)(!1),K=(0,e.useState)(0),Y=(0,r.Z)(K,2),X=Y[0],q=Y[1];(0,e.useEffect)((function(){var e;if(!j.current&&L&&!(X>10)){var t=null==(e=z.current)?void 0:e.firstChild;t?(a.setupDetailRowAutoHeight(t),j.current=!0):q((function(e){return e+1}))}}),[L,X]);var Q=(0,e.useRef)();Q.current||(Q.current=new Ds((function(){return z.current})));var J=(0,e.useCallback)((function(e){if(z.current=e,z.current){if(a.isAlive()){var t={setTop:Z,setTransform:W,addOrRemoveCssClass:function(e,t){return Q.current.addOrRemoveCssClass(e,t)},setDomOrder:function(e){return u.current=e},setRowIndex:v,setRowId:C,setRowBusinessKey:b,setUserStyles:D,setCellCtrls:function(e,t){yv(t,(function(){A((function(t){return Cv(t,e,u.current)}))}))},showFullWidth:function(e){return I(e)},getFullWidthCellRenderer:function(){return U.current},refreshFullWidth:function(e){return ie.current?(I((function(t){return jf(Uf({},t),{params:e()})})),!0):!(!U.current||!U.current.refresh)&&U.current.refresh(e())}};a.setComp(t,z.current,s)}}else a.unsetComp(s)}),[]);(0,e.useLayoutEffect)((function(){return kv(L,i,z.current,U)}),[L]);var $=(0,e.useMemo)((function(){var e={top:G,transform:B};return Object.assign(e,R),e}),[G,B,R]),ee=c&&L&&L.componentFromFramework,te=!c&&null!=P,ne=(0,e.useMemo)((function(){return!!((null==L?void 0:L.componentFromFramework)&&vv(L.componentClass))}),[L]),ie=(0,e.useRef)(!1);(0,e.useEffect)((function(){ie.current=ne&&!!L&&!!o.get("reactiveCustomComponents")}),[ne,L]);return e.createElement("div",{ref:J,role:"row",style:$,"row-index":f,"row-id":y,"row-business-key":S,tabIndex:l},te&&(null==P?void 0:P.map((function(t){return e.createElement(Fv,{cellCtrl:t,editingRow:a.isEditing(),printLayout:a.isPrintLayout(),key:t.getInstanceId()})}))),ee&&function(){var t=L.componentClass;return e.createElement(e.Fragment,null,ne&&e.createElement(t,Uf({},L.params)),!ne&&e.createElement(t,jf(Uf({},L.params),{ref:U})))}())})),Gv=(0,e.memo)((function(t){var n=(0,e.useContext)(hv).context,i=t.name,o=(0,e.useMemo)((function(){return Oc(i)}),[i]),a=(0,e.useRef)(null),s=(0,e.useRef)(null),l=(0,e.useRef)([]),u=(0,e.useState)((function(){return[]})),c=(0,r.Z)(u,2),d=c[0],h=c[1],p=(0,e.useRef)(!1),f=(0,e.useRef)(),v=(0,e.useMemo)((function(){return Nc.getRowContainerCssClasses(i)}),[i]),g=(0,e.useMemo)((function(){return pv(v.viewport)}),[v]),m=(0,e.useMemo)((function(){return pv(v.container)}),[v]),y=i===Tc.CENTER||i===Tc.TOP_CENTER||i===Tc.BOTTOM_CENTER||i===Tc.STICKY_TOP_CENTER;Av(" AG Row Container "+i+" ",y?a:s);var C=(0,e.useCallback)((function(){return y?null!=a.current&&null!=s.current:null!=s.current}),[]),k=(0,e.useCallback)((function(){return y?null==a.current&&null==s.current:null==s.current}),[]),w=(0,e.useCallback)((function(){if(k()&&(n.destroyBean(f.current),f.current=null),C()){var e=function(e){yv(e,(function(){h((function(e){return Cv(e,l.current,p.current)}))}))},t={setViewportHeight:function(e){a.current&&(a.current.style.height=e)},setRowCtrls:function(t){var n=t.rowCtrls,i=!!t.useFlushSync&&l.current.length>0&&n.length>0;l.current=n,e(i)},setDomOrder:function(t){p.current!=t&&(p.current=t,e(!1))},setContainerWidth:function(e){s.current&&(s.current.style.width=e)}};f.current=n.createBean(new Nc(i)),f.current.setComp(t,s.current,a.current)}}),[C,k]),S=(0,e.useCallback)((function(e){s.current=e,w()}),[w]),b=(0,e.useCallback)((function(e){a.current=e,w()}),[w]),E=function(){return e.createElement("div",{className:m,ref:S,role:"rowgroup"},d.map((function(t){return e.createElement(_v,{rowCtrl:t,containerType:o,key:t.getInstanceId()})})))};return e.createElement(e.Fragment,null,y?e.createElement("div",{className:g,ref:b,role:"presentation"},E()):E())})),Zv=(0,e.memo)((function(){var t=(0,e.useContext)(hv),n=t.context,i=t.agStackComponentsRegistry,o=t.resizeObserverService,a=(0,e.useState)(""),s=(0,r.Z)(a,2),l=s[0],u=s[1],c=(0,e.useState)(0),d=(0,r.Z)(c,2),h=d[0],p=d[1],f=(0,e.useState)(0),v=(0,r.Z)(f,2),g=v[0],m=v[1],y=(0,e.useState)("0px"),C=(0,r.Z)(y,2),k=C[0],w=C[1],S=(0,e.useState)("0px"),b=(0,r.Z)(S,2),E=b[0],x=b[1],R=(0,e.useState)("100%"),D=(0,r.Z)(R,2),T=D[0],O=D[1],P=(0,e.useState)(""),A=(0,r.Z)(P,2),M=A[0],N=A[1],L=(0,e.useState)(""),I=(0,r.Z)(L,2),F=I[0],_=I[1],G=(0,e.useState)(null),Z=(0,r.Z)(G,2),V=Z[0],H=Z[1],B=(0,e.useState)(""),W=(0,r.Z)(B,2),z=W[0],U=W[1],j=(0,e.useState)(null),K=(0,r.Z)(j,2),Y=K[0],X=K[1],q=(0,e.useState)("ag-layout-normal"),Q=(0,r.Z)(q,2),J=Q[0],$=Q[1],ee=(0,e.useRef)();ee.current||(ee.current=new Ds((function(){return te.current})));var te=(0,e.useRef)(null),ne=(0,e.useRef)(null),ie=(0,e.useRef)(null),re=(0,e.useRef)(null),oe=(0,e.useRef)(null),ae=(0,e.useRef)(null),se=(0,e.useRef)([]),le=(0,e.useRef)([]);Av(" AG Grid Body ",te),Av(" AG Pinned Top ",ne),Av(" AG Sticky Top ",ie),Av(" AG Middle ",oe),Av(" AG Pinned Bottom ",ae);var ue=(0,e.useCallback)((function(e){if(te.current=e,!te.current)return n.destroyBeans(se.current),le.current.forEach((function(e){return e()})),se.current=[],void(le.current=[]);if(n){var t=function(e){var t=i.getComponentClass(e),r=n.createBean(new t);return se.current.push(r),r},r=function(e,t){e.appendChild(t),le.current.push((function(){return e.removeChild(t)}))};r(te.current,document.createComment(" AG Fake Horizontal Scroll ")),r(te.current,t("AG-FAKE-HORIZONTAL-SCROLL").getGui()),r(te.current,document.createComment(" AG Overlay Wrapper ")),r(te.current,t("AG-OVERLAY-WRAPPER").getGui()),re.current&&(r(re.current,document.createComment(" AG Fake Vertical Scroll ")),r(re.current,t("AG-FAKE-VERTICAL-SCROLL").getGui()));var a={setRowAnimationCssOnBodyViewport:u,setColumnCount:function(e){te.current&&Es.setAriaColCount(te.current,e)},setRowCount:function(e){te.current&&Es.setAriaRowCount(te.current,e)},setTopHeight:p,setBottomHeight:m,setStickyTopHeight:w,setStickyTopTop:x,setStickyTopWidth:O,setTopDisplay:N,setBottomDisplay:_,setColumnMovingCss:function(e,t){return ee.current.addOrRemoveCssClass(e,t)},updateLayoutClasses:$,setAlwaysVerticalScrollClass:H,setPinnedTopBottomOverflowY:U,setCellSelectableCss:function(e,t){return X(t?e:null)},setBodyViewportWidth:function(e){oe.current&&(oe.current.style.width=e)},registerBodyViewportResizeListener:function(e){if(oe.current){var t=o.observeResize(oe.current,e);le.current.push((function(){return t()}))}}},s=n.createBean(new oc);se.current.push(s),s.setComp(a,te.current,oe.current,ne.current,ae.current,ie.current)}}),[]),ce=(0,e.useMemo)((function(){return pv("ag-root","ag-unselectable",J)}),[J]),de=(0,e.useMemo)((function(){return pv("ag-body-viewport",l,J,V,Y)}),[l,J,V,Y]),he=(0,e.useMemo)((function(){return pv("ag-body",J)}),[J]),pe=(0,e.useMemo)((function(){return pv("ag-floating-top",Y)}),[Y]),fe=(0,e.useMemo)((function(){return pv("ag-sticky-top",Y)}),[Y]),ve=(0,e.useMemo)((function(){return pv("ag-floating-bottom",Y)}),[Y]),ge=(0,e.useMemo)((function(){return{height:h,minHeight:h,display:M,overflowY:z}}),[h,M,z]),me=(0,e.useMemo)((function(){return{height:k,top:E,width:T}}),[k,E,T]),ye=(0,e.useMemo)((function(){return{height:g,minHeight:g,display:F,overflowY:z}}),[g,F,z]),Ce=function(t){return e.createElement(Gv,{name:t,key:"".concat(t,"-container")})},ke=function(t){var n=t.section,i=t.children,r=t.className,o=t.style;return e.createElement("div",{ref:n,className:r,role:"presentation",style:o},i.map(Ce))};return e.createElement("div",{ref:ue,className:ce,role:"treegrid"},e.createElement(Pv,null),ke({section:ne,className:pe,style:ge,children:[Tc.TOP_LEFT,Tc.TOP_CENTER,Tc.TOP_RIGHT,Tc.TOP_FULL_WIDTH]}),e.createElement("div",{className:he,ref:re,role:"presentation"},ke({section:oe,className:de,children:[Tc.LEFT,Tc.CENTER,Tc.RIGHT,Tc.FULL_WIDTH]})),ke({section:ie,className:fe,style:me,children:[Tc.STICKY_TOP_LEFT,Tc.STICKY_TOP_CENTER,Tc.STICKY_TOP_RIGHT,Tc.STICKY_TOP_FULL_WIDTH]}),ke({section:ae,className:ve,style:ye,children:[Tc.BOTTOM_LEFT,Tc.BOTTOM_CENTER,Tc.BOTTOM_RIGHT,Tc.BOTTOM_FULL_WIDTH]}))})),Vv=(0,e.forwardRef)((function(t,n){var i=t.children,r=t.eFocusableElement,o=t.onTabKeyDown,a=t.gridCtrl,s=t.forceFocusOutWhenTabGuardsAreEmpty,l=(0,e.useContext)(hv).context,u=(0,e.useRef)(null),c=(0,e.useRef)(null),d=(0,e.useRef)(),h=function(e){var t=null==e?void 0:parseInt(e,10).toString();[u,c].forEach((function(e){var n,i;void 0===t?null==(n=e.current)||n.removeAttribute("tabindex"):null==(i=e.current)||i.setAttribute("tabindex",t)}))};(0,e.useImperativeHandle)(n,(function(){return{forceFocusOutOfContainer:function(e){var t;null==(t=d.current)||t.forceFocusOutOfContainer(e)}}}));var p=(0,e.useCallback)((function(){if(!u.current&&!c.current)return l.destroyBean(d.current),void(d.current=null);if(u.current&&c.current){var e={setTabIndex:h};d.current=l.createBean(new Ed({comp:e,eTopGuard:u.current,eBottomGuard:c.current,eFocusableElement:r,onTabKeyDown:o,forceFocusOutWhenTabGuardsAreEmpty:s,focusInnerElement:function(e){return a.focusInnerElement(e)}}))}}),[]),f=(0,e.useCallback)((function(e){u.current=e,p()}),[p]),v=(0,e.useCallback)((function(e){c.current=e,p()}),[p]),g=function(t){var n="top"===t?bd.TAB_GUARD_TOP:bd.TAB_GUARD_BOTTOM;return e.createElement("div",{className:"".concat(bd.TAB_GUARD," ").concat(n),role:"presentation",ref:"top"===t?f:v})};return e.createElement(e.Fragment,null,g("top"),i,g("bottom"))})),Hv=(0,e.memo)(Vv),Bv=(0,e.memo)((function(t){var n=t.context,i=(0,e.useState)(""),o=(0,r.Z)(i,2),a=o[0],s=o[1],l=(0,e.useState)(""),u=(0,r.Z)(l,2),c=u[0],d=(u[1],(0,e.useState)("")),h=(0,r.Z)(d,2),p=h[0],f=h[1],v=(0,e.useState)(null),g=(0,r.Z)(v,2),m=g[0],y=g[1],C=(0,e.useState)(null),k=(0,r.Z)(C,2),w=k[0],S=k[1],b=(0,e.useState)(!1),E=(0,r.Z)(b,2),x=E[0],R=E[1],D=(0,e.useState)(),T=(0,r.Z)(D,2),O=T[0],P=T[1],A=(0,e.useRef)(null),M=(0,e.useRef)(null),N=(0,e.useRef)(),L=(0,e.useState)(null),I=(0,r.Z)(L,2),F=I[0],_=I[1],G=(0,e.useRef)((function(){})),Z=(0,e.useCallback)((function(){}),[]),V=(0,e.useMemo)((function(){return n.isDestroyed()?null:n.getBean("beans")}),[n]);Av(" AG Grid ",M);var H=(0,e.useCallback)((function(e){if(M.current=e,!M.current)return n.destroyBean(A.current),void(A.current=null);if(!n.isDestroyed()){A.current=n.createBean(new Ph);var t=A.current;G.current=t.focusInnerElement.bind(t);var i={destroyGridUi:function(){},setRtlClass:s,forceFocusOutOfContainer:function(e){var t;null==(t=N.current)||t.forceFocusOutOfContainer(e)},updateLayoutClasses:f,getFocusableContainers:function(){var e,t,n=[],i=null==(e=M.current)?void 0:e.querySelector(".ag-root"),r=null==(t=M.current)?void 0:t.querySelector(".ag-side-bar:not(.ag-hidden)");return i&&n.push(i),r&&n.push(r),n},setCursor:y,setUserSelect:S};t.setComp(i,M.current,M.current),R(!0)}}),[]);(0,e.useEffect)((function(){if(O&&V&&A.current&&F&&M.current){var e=A.current,t=[],i=V.agStackComponentsRegistry,r=i.getComponentClass("AG-GRID-HEADER-DROP-ZONES"),o=i.getComponentClass("AG-SIDE-BAR"),a=i.getComponentClass("AG-STATUS-BAR"),s=i.getComponentClass("AG-WATERMARK"),l=i.getComponentClass("AG-PAGINATION"),u=[],c=M.current;if(e.showDropZones()&&r){var d=n.createBean(new r),h=d.getGui();c.insertAdjacentElement("afterbegin",h),u.push(h),t.push(d)}if(e.showSideBar()&&o){var p=n.createBean(new o),f=p.getGui(),v=F.querySelector(".ag-tab-guard-bottom");v&&(v.insertAdjacentElement("beforebegin",f),u.push(f)),t.push(p)}if(e.showStatusBar()&&a){var g=n.createBean(new a),m=g.getGui();c.insertAdjacentElement("beforeend",m),u.push(m),t.push(g)}if(l){var y=n.createBean(new l),C=y.getGui();c.insertAdjacentElement("beforeend",C),u.push(C),t.push(y)}if(e.showWatermark()&&s){var k=n.createBean(new s),w=k.getGui();c.insertAdjacentElement("beforeend",w),u.push(w),t.push(k)}return function(){n.destroyBeans(t),u.forEach((function(e){e.parentElement&&e.parentElement.removeChild(e)}))}}}),[O,F,V]);var B=(0,e.useMemo)((function(){return pv("ag-root-wrapper",a,c,p)}),[a,c,p]),W=(0,e.useMemo)((function(){return pv("ag-root-wrapper-body","ag-focus-managed",p)}),[p]),z=(0,e.useMemo)((function(){return{userSelect:null!=w?w:"",WebkitUserSelect:null!=w?w:"",cursor:null!=m?m:""}}),[w,m]),U=(0,e.useCallback)((function(e){N.current=e,P(null!==e)}),[]);return e.createElement("div",{ref:H,className:B,style:z,role:"presentation"},e.createElement("div",{className:W,ref:_,role:"presentation"},x&&F&&V&&e.createElement(hv.Provider,{value:V},e.createElement(Hv,{ref:U,eFocusableElement:F,onTabKeyDown:Z,gridCtrl:A.current,forceFocusOutWhenTabGuardsAreEmpty:!0},e.createElement(Zv,null)))))})),Wv=function(t){var n,i,o=(0,e.useRef)(),a=(0,e.useRef)(null),s=(0,e.useRef)(null),l=(0,e.useRef)([]),u=(0,e.useRef)([]),c=(0,e.useRef)(t),d=(0,e.useRef)(!1),h=(0,e.useState)(void 0),p=(0,r.Z)(h,2),f=p[0],v=p[1],g=(0,e.useState)(0),m=(0,r.Z)(g,2)[1],y=(0,e.useCallback)((function(e){if(a.current=e,!a.current)return l.current.forEach((function(e){return e()})),void(l.current.length=0);var n=t.modules||[];s.current||(s.current=new dv((function(){return m((function(e){return e+1}))}),t.componentWrappingElement,t.maxComponentCreationTimeMs),l.current.push((function(){var e;null==(e=s.current)||e.destroy(),s.current=null})));var i=Xr.combineAttributesAndGridOptions(t.gridOptions,t),r={providedBeanInstances:{frameworkComponentWrapper:new zv(s.current,!!i.reactiveCustomComponents)},modules:n,frameworkOverrides:new jv},c=new Ip;o.current=c.create(a.current,i,(function(e){v(e),l.current.push((function(){e.destroy()})),e.getBean(ap.NAME).whenReady((function(){if(!e.isDestroyed()){var n=o.current;n&&t.setGridApi&&t.setGridApi(n,new Eh(n))}}))}),(function(e){e.getBean(ap.NAME).whenReady((function(){u.current.forEach((function(e){return e()})),u.current.length=0,d.current=!0}))}),r)}),[]),C=(0,e.useMemo)((function(){return Uf({height:"100%"},t.containerStyle||{})}),[t.containerStyle]),k=(0,e.useCallback)((function(e){d.current?e():u.current.push(e)}),[]);return(0,e.useEffect)((function(){var e=function(e,t){var n={};return Object.keys(t).forEach((function(i){var r=t[i];e[i]!==r&&(n[i]=r)})),n}(c.current,t);c.current=t,k((function(){o.current&&Xr.processOnChange(e,o.current)}))}),[t]),e.createElement("div",{style:C,className:t.className,ref:y},f&&!f.isDestroyed()?e.createElement(Bv,{context:f}):null,null!=(i=null==(n=s.current)?void 0:n.getPortals())?i:null)};var zv=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i){var r;return(0,a.Z)(this,n),(r=t.call(this)).parent=e,r.reactiveCustomComponents=i,r}return(0,s.Z)(n,[{key:"createWrapper",value:function(e,t){if(this.reactiveCustomComponents){var n=function(e){switch(e){case"filter":return tv;case"floatingFilterComponent":return rv;case"dateComponent":return ev;case"loadingOverlayComponent":return ov;case"noRowsOverlayComponent":return sv;case"statusPanel":return lv;case"toolPanel":return uv;case"menuItem":return av}}(t.propertyName);if(n)return new n(e,this.parent,t)}else switch(t.propertyName){case"filter":case"floatingFilterComponent":case"dateComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"statusPanel":case"toolPanel":case"menuItem":Rv()}var i=!t.cellRenderer&&"toolPanel"!==t.propertyName;return new Qf(e,this.parent,t,i)}}]),n}(Fp),Uv=(0,e.forwardRef)((function(t,n){var i=(0,e.useContext)(hv),o=i.ctrlsFactory,a=i.context,s=i.gridOptionsService,l=i.resizeObserverService,u=i.clientSideRowModel,c=i.serverSideRowModel,d=(0,e.useState)((function(){return new fv})),h=(0,r.Z)(d,2),p=h[0],f=h[1],v=(0,e.useState)((function(){return new fv})),g=(0,r.Z)(v,2),m=g[0],y=g[1],C=(0,e.useState)(),k=(0,r.Z)(C,2),w=k[0],S=k[1],b=(0,e.useState)(),E=(0,r.Z)(b,2),x=E[0],R=E[1],D=(0,e.useRef)(),T=(0,e.useRef)(null),O=(0,e.useRef)(),P=(0,e.useMemo)((function(){return wi.__getGridRegisteredModules(t.api.getGridId())}),[t]),A=(0,e.useMemo)((function(){return p.toString()+" ag-details-row"}),[p]),M=(0,e.useMemo)((function(){return m.toString()+" ag-details-grid"}),[m]);n&&(0,e.useImperativeHandle)(n,(function(){return{refresh:function(){var e,t;return null!=(t=null==(e=D.current)?void 0:e.refresh())&&t}}})),t.template&&Es.warnOnce("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/");var N=(0,e.useCallback)((function(e){if(T.current=e,!T.current)return a.destroyBean(D.current),void(O.current&&O.current());var n={addOrRemoveCssClass:function(e,t){return f((function(n){return n.setClass(e,t)}))},addOrRemoveDetailGridCssClass:function(e,t){return y((function(n){return n.setClass(e,t)}))},setDetailGrid:function(e){return S(e)},setRowData:function(e){return R(e)},getGui:function(){return T.current}},i=o.getInstance("detailCellRenderer");if(i&&(a.createBean(i),i.init(n,t),D.current=i,s.get("detailRowAutoHeight"))){var r=function(){if(null!=T.current){var e=T.current.clientHeight;if(null!=e&&e>0){setTimeout((function(){t.node.setRowHeight(e),u?u.onRowHeightChanged():c&&c.onRowHeightChanged()}),0)}}};O.current=l.observeResize(T.current,r),r()}}),[]),L=(0,e.useCallback)((function(e,t){var n;null==(n=D.current)||n.registerDetailWithMaster(e,t)}),[]);return e.createElement("div",{className:A,ref:N},w&&e.createElement(Wv,jf(Uf({className:M},w),{modules:P,rowData:x,setGridApi:L})))})),jv=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.call(this,"react")).frameworkComponents={agGroupCellRenderer:bv,agGroupRowRenderer:bv,agDetailCellRenderer:Uv},e.wrapIncoming=function(e,t){return"ensureVisible"===t?(n=e,mv||setTimeout((function(){return mv=!1}),0),mv=!0,n()):e();var n},e.renderingEngine="react",e}return(0,s.Z)(n,[{key:"frameworkComponent",value:function(e){return this.frameworkComponents[e]}},{key:"isFrameworkComponent",value:function(e){if(!e)return!1;var t=e.prototype;return!(t&&"getGui"in t)}}]),n}(kh),Kv=function(t){(0,l.Z)(i,t);var n=(0,u.Z)(i);function i(){var e;return(0,a.Z)(this,i),(e=n.apply(this,arguments)).apiListeners=[],e.setGridApi=function(t,n){e.api=t,e.columnApi=n,e.apiListeners.forEach((function(e){return e(t)}))},e}return(0,s.Z)(i,[{key:"registerApiListener",value:function(e){this.apiListeners.push(e)}},{key:"componentWillUnmount",value:function(){this.apiListeners.length=0}},{key:"render",value:function(){return e.createElement(Wv,jf(Uf({},this.props),{setGridApi:this.setGridApi}))}}]),i}(e.Component);var Yv=function(){var t=sn(),n=t.isLoading,i=t.getAccessTokenSilently,o=(0,e.useRef)(),a=(0,e.useState)([]),s=(0,r.Z)(a,2),l=s[0],u=s[1],c=(0,e.useState)([]),d=(0,r.Z)(c,2),h=d[0],p=d[1],f=(0,e.useState)(window.innerWidth),v=(0,r.Z)(f,2),g=v[0],m=v[1],y=(0,e.useState)([]),C=(0,r.Z)(y,2),k=C[0],w=C[1],S=(0,e.useState)(""),b=(0,r.Z)(S,2),E=b[0],x=b[1],R=(0,e.useMemo)((function(){return document.body}),[]),D=(0,e.useCallback)((function(){o.current.api.exportDataAsCsv()}),[]);(0,e.useEffect)((function(){var e=function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n,r;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({audience:"https://uptrenddowntrend.com/api",scope:"openid profile email"});case 2:return t=e.sent,e.next=5,fetch("".concat("https://fintrends-api.onrender.com","/api/collections"),{headers:{Authorization:"Bearer ".concat(t)}});case 5:if(!(n=e.sent).ok){e.next=13;break}return e.next=9,n.json();case 9:r=e.sent,w(r),e.next=14;break;case 13:console.error("Error fetching collections data");case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[i]),(0,e.useEffect)((function(){var e=function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n,r;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({audience:"https://uptrenddowntrend.com/api",scope:"openid profile email",ignoreCache:!0});case 2:return t=e.sent,e.next=5,fetch("".concat("https://fintrends-api.onrender.com","/api/symbol_data/recent"),{headers:{Authorization:"Bearer ".concat(t)}});case 5:if(!(n=e.sent).ok){e.next=14;break}return e.next=9,n.json();case 9:r=e.sent,u(r),p(r),e.next=15;break;case 14:console.error("Error fetching initial symbol data");case 15:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[i]),(0,e.useEffect)((function(){var e=localStorage.getItem("selectedCollection");null!==e&&x(e)}),[]),(0,e.useEffect)((function(){var e=function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n,r,o,a,s;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!E){e.next=24;break}return t=parseInt(E,10),e.prev=2,e.next=5,i({audience:"https://uptrenddowntrend.com/api",scope:"openid profile email"});case 5:return n=e.sent,e.next=8,fetch("".concat("https://fintrends-api.onrender.com","/api/collections/link/").concat(t),{headers:{Authorization:"Bearer ".concat(n)}});case 8:if(!(r=e.sent).ok){e.next=16;break}return e.next=12,r.json();case 12:o=e.sent,Array.isArray(o)?(a=o.map((function(e){return e.symbol_id})),s=h.filter((function(e){return a.includes(e.symbol_id)})),u(s)):console.error("Response data is not an array:",o),e.next=17;break;case 16:console.error("Error fetching data for selected collection");case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(2),console.error("Error fetching collection data:",e.t0);case 22:e.next=25;break;case 24:u(h);case 25:case"end":return e.stop()}}),e,null,[[2,19]])})));return function(){return e.apply(this,arguments)}}();e()}),[E,i,h]),(0,e.useEffect)((function(){var e=function(){return m(window.innerWidth)};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]);var T=function(e){return e>950?[{headerName:"Symbol:",field:"symbol",filter:!0,flex:1,maxWidth:135,cellRenderer:function(e){var t=e.data.symbol;return(0,dn.jsx)(Ne,{to:"/details/".concat(t),className:"symbol-header",children:t})}},{headerName:"Company Name:",field:"company_name",filter:!0,flex:1,maxWidth:250,cellRenderer:function(e){var t=e.data.symbol,n=e.data.company_name;return(0,dn.jsx)(Ne,{to:"/details/".concat(t),className:"symbol-header",children:n})}},{headerName:"Market Date:",field:"market_date",filter:!0,flex:1,maxWidth:150},{headerName:"Closing Price:",field:"closing_price",flex:1,maxWidth:150,cellRenderer:function(e){var t=e.data.closing_price;return(0,dn.jsxs)("div",{children:["$",t]})}},{headerName:"Closing Volume:",field:"closing_volume",flex:1,maxWidth:150},{headerName:"Daily Trend:",field:"daily_trend",filter:!0,flex:1,maxWidth:150,cellStyle:function(e){return e.value>0?{color:"#0ca81e"}:0===e.value?{color:"#000"}:e.value<0?{color:"red"}:void 0}},{headerName:"Smoothed Trend:",field:"smoothed_trend",filter:!0,flex:1,maxWidth:175,cellStyle:function(e){return e.value>0?{color:"#0ca81e"}:0===e.value?{color:"#000"}:e.value<0?{color:"red"}:void 0}}]:[{headerName:"Symbol:",field:"symbol",filter:!0,flex:1,maxWidth:135,cellRenderer:function(e){var t=e.data.symbol;return(0,dn.jsx)(Ne,{to:"/details/".concat(t),className:"symbol-header",children:t})}},{headerName:"Closing Price:",field:"closing_price",flex:1,maxWidth:150,cellRenderer:function(e){var t=e.data.closing_price;return(0,dn.jsxs)("div",{children:["$",t]})}},{headerName:"Daily Trend:",field:"daily_trend",filter:!0,flex:1,maxWidth:150,cellStyle:function(e){return e.value>0?{color:"#0ca81e"}:0===e.value?{color:"#000"}:e.value<0?{color:"red"}:void 0}},{headerName:"Smoothed Trend:",field:"smoothed_trend",filter:!0,flex:1,maxWidth:175,cellStyle:function(e){return e.value>0?{color:"#0ca81e"}:0===e.value?{color:"#000"}:e.value<0?{color:"red"}:void 0}}]}(g),O=(0,e.useMemo)((function(){return{sortable:!0}}),[]),P=(0,e.useCallback)((function(e){}),[]),A=(0,e.useState)(""),M=(0,r.Z)(A,2),N=M[0],L=M[1];if(n)return(0,dn.jsx)("div",{children:"Loading ..."});for(var I=0,F=0,_=0;_<l.length;_++)l[_].daily_trend>0?I+=1:l[_].daily_trend<0&&(F+=1);return(0,dn.jsxs)("div",{className:"symbols-main",style:{display:"flex",position:"relative",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[(0,dn.jsxs)("div",{style:{display:g>450?"flex":"block",justifyContent:"center",alignItems:"center",width:"100%",marginBottom:"1rem"},children:[(0,dn.jsxs)("div",{style:{color:"white",border:"1px solid white",padding:".3rem",fontSize:"12px",margin:".2rem",borderRadius:"5px",minWidth:"200px"},children:[(0,dn.jsx)("h1",{children:"EMPTY BOX"}),(0,dn.jsx)("div",{style:{display:"flex",justifyContent:"space-evenly",margin:".2rem"},children:(0,dn.jsx)("p",{children:"ADD INFO HERE !!!!!!!!"})})]}),(0,dn.jsxs)("div",{style:{color:"white",border:"1px solid white",padding:".3rem",fontSize:"12px",margin:".2rem",borderRadius:"5px",minWidth:"200px"},children:[(0,dn.jsx)("h1",{children:"COLLECTIONS TREND"}),(0,dn.jsxs)("div",{style:{display:"flex",justifyContent:"space-evenly",margin:".2rem"},children:[(0,dn.jsxs)("div",{style:{marginRight:".3rem"},children:[(0,dn.jsx)("h1",{style:{textDecoration:"underline"},children:"POSITIVES (+)"}),(0,dn.jsx)("p",{style:{color:"rgb(12, 168, 30)"},children:I})]}),(0,dn.jsxs)("div",{style:{marginLeft:".3rem"},children:[(0,dn.jsx)("h1",{style:{textDecoration:"underline"},children:"NEGATIVES (-)"}),(0,dn.jsx)("p",{style:{color:"red"},children:F})]})]})]})]}),(0,dn.jsxs)("div",{style:{display:"flex",flexDirection:"row",padding:"15px",alignItems:"center",marginBottom:"1rem"},children:[(0,dn.jsx)("input",{className:"all-symbols-input",style:{marginBottom:"1rem",padding:"0.3rem",width:"80%",maxWidth:"300px"},type:"text",placeholder:"Search",onChange:function(e){return L(e.target.value)}}),(0,dn.jsxs)("div",{style:{display:"flex",flexDirection:g>450?"row":"column",alignItems:"center",width:"100%"},children:[(0,dn.jsx)("h4",{style:{color:"#FFF",textTransform:"uppercase",fontSize:"14px",marginRight:".2rem",marginBottom:g>450?0:"1rem"},children:"Select Collection:"}),(0,dn.jsxs)("select",{id:"chooseCollection",value:E,onChange:function(e){return t=e.target.value,x(t),void localStorage.setItem("selectedCollection",t);var t},style:{color:"black",padding:".3rem",borderRadius:"2px",marginBottom:g>450?0:"1rem"},children:[(0,dn.jsx)("option",{value:"",children:"ALL SYMBOLS"}),k.map((function(e){return(0,dn.jsx)("option",{style:{textAlign:"center"},value:e.collection_id,children:e.collection_name},e.collection_id)}))]}),g>450?(0,dn.jsx)("button",{style:{color:"white",border:"1px solid white",padding:".3rem",marginLeft:"1rem",borderRadius:"5px",backgroundColor:"#134f42"},onClick:D,children:"Export as CSV"}):null]})]}),(0,dn.jsx)("div",{className:"ag-theme-alpine",style:{width:"80%",height:"calc(100vh - 200px)",overflowX:"auto",fontSize:"10px"},children:(0,dn.jsx)(Kv,{ref:o,rowData:l,columnDefs:T,defaultColDef:O,animateRows:!0,rowSelection:"multiple",rowMultiSelectWithClick:!0,cellSelection:!0,enableCellTextSelection:!0,ensureDomOrder:!0,onCellClicked:P,quickFilterText:N,suppressExcelExport:!0,popupParent:R})})]})};var Xv=function(){var t=(0,e.useState)(""),n=(0,r.Z)(t,2),i=n[0],o=n[1],a=(0,e.useState)([]),s=(0,r.Z)(a,2),l=s[0],u=s[1],c=(0,e.useState)([]),d=(0,r.Z)(c,2),h=d[0],p=d[1],f=oe();(0,e.useEffect)((function(){var e=function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n,i;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="".concat("https://fintrends-api.onrender.com","/api/symbols"),e.prev=1,e.next=4,fetch(t);case 4:if(!(n=e.sent).ok){e.next=12;break}return e.next=8,n.json();case 8:i=e.sent,u(i),e.next=13;break;case 12:console.error("Failed to fetch symbols.");case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(1),console.error("Error fetching symbols:",e.t0);case 18:case"end":return e.stop()}}),e,null,[[1,15]])})));return function(){return e.apply(this,arguments)}}();e()}),[]);var v=function(){var e=i.toUpperCase();l.some((function(t){return t.symbol===e}))?f("/details/".concat(e)):alert("Symbol not found. Please add to universe.")};return(0,dn.jsxs)("div",{className:"symbol-search-main",style:{textAlign:"center"},children:[(0,dn.jsx)("h1",{style:{fontSize:"3rem"},children:"Symbol Search"}),(0,dn.jsx)("br",{}),(0,dn.jsx)("h3",{style:{padding:"1rem"},children:"Search For a Symbol"}),(0,dn.jsxs)("div",{style:{position:"relative",display:"inline-block"},children:[(0,dn.jsx)("input",{className:"SymbolSearch",type:"text",placeholder:"Search",value:i,onChange:function(e){var t=e.target.value.toUpperCase();if(o(t),t.length>0){var n=l.filter((function(e){return e.symbol.startsWith(t)})).map((function(e){return e.symbol})).slice(0,5);p(n)}else p([])},onKeyDown:function(e){return"Enter"===e.key&&v()},style:{padding:".5rem",borderRadius:"5px",textAlign:"center",color:"#000000",width:"200px",backgroundColor:"white",border:"1px solid #ccc"}}),h.length>0&&(0,dn.jsx)("ul",{style:{listStyleType:"none",padding:0,margin:0,position:"absolute",top:"100%",left:0,width:"100%",backgroundColor:"white",zIndex:1e3,border:"1px solid #ccc",borderRadius:"5px",maxHeight:"150px",overflowY:"auto"},children:h.map((function(e){return(0,dn.jsx)("li",{onClick:function(){return function(e){o(e),p([]),f("/details/".concat(e))}(e)},style:{padding:"0.5rem",cursor:"pointer",color:"#000"},children:e},e)}))})]}),(0,dn.jsx)("div",{style:{marginTop:"10px"},children:(0,dn.jsx)("button",{style:{marginTop:"5px",padding:".5rem 1rem",borderRadius:"5px",border:"1px solid #ccc",backgroundColor:"#134f42",color:"white",cursor:"pointer"},onClick:v,children:"Search"})}),(0,dn.jsx)("div",{style:{marginTop:"40px",color:"white",fontWeight:"bold"},children:"Can't find Symbol?"}),(0,dn.jsx)("div",{style:{marginTop:"10px"},children:(0,dn.jsx)("button",{style:{padding:".5rem 1rem",borderRadius:"5px",border:"1px solid #ccc",backgroundColor:"#134f42",color:"white",cursor:"pointer"},onClick:function(){f("/dashboard/controlpanel")},children:"Add Symbol to Universe"})})]})};function qv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Qv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qv(Object(n),!0).forEach((function(t){(0,Ve.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Jv=n(9653);var $v=function(){var t=sn(),n=t.isLoading,i=t.getAccessTokenSilently,a=(0,e.useRef)(),s=oe(),l=(0,e.useState)([]),u=(0,r.Z)(l,2),c=u[0],d=u[1],h=(0,e.useState)([]),p=(0,r.Z)(h,2),f=p[0],v=p[1],g=(0,e.useState)([]),m=(0,r.Z)(g,2),y=m[0],C=m[1],k=(0,e.useState)(window.innerWidth),w=(0,r.Z)(k,2),S=w[0],b=w[1],E=(0,e.useState)("option2"),x=(0,r.Z)(E,2),R=x[0],D=x[1],T=(0,e.useState)(""),O=(0,r.Z)(T,2),P=O[0],A=O[1],M=(0,e.useState)(""),N=(0,r.Z)(M,2),L=N[0],I=N[1],F=(0,e.useState)([]),_=(0,r.Z)(F,2),G=_[0],Z=_[1],V=ae().symbol||"";(0,e.useEffect)((function(){var e=function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n,i;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="".concat("https://fintrends-api.onrender.com","/api/symbols"),e.next=3,fetch(t);case 3:if(!(n=e.sent).ok){e.next=11;break}return e.next=7,n.json();case 7:i=e.sent,C(i),e.next=12;break;case 11:console.error("Failed to fetch symbols.");case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[]);var H=(0,e.useMemo)((function(){return document.body}),[]),B=(0,e.useCallback)((function(){a.current.api.exportDataAsCsv()}),[]);function W(e){if(!e)return!1;var t=e.split("-").map(Number),n=(0,r.Z)(t,3),i=n[0],o=n[1],a=n[2];return 5===new Date(Date.UTC(i,o-1,a)).getUTCDay()}(0,e.useEffect)((function(){var e=function(){return b(window.innerWidth)};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),(0,e.useEffect)((function(){var e,t=new Date;if("option1"===R)(e=new Date(t)).setMonth(e.getMonth()-2);else if("option2"===R)(e=new Date(t)).setMonth(e.getMonth()-6);else if("option3"===R)(e=new Date(t)).setMonth(e.getMonth()-12);else if("option4"===R&&""!==P){var n=parseInt(P,10);!isNaN(n)&&n>0&&(e=new Date).setDate(e.getDate()-n)}if(e){var i=c.filter((function(t){var n=t.market_date.split("-").map(Number),i=(0,r.Z)(n,3),o=i[0],a=i[1],s=i[2];return new Date(Date.UTC(o,a-1,s))>=e})).sort((function(e,t){return new Date(e.market_date)-new Date(t.market_date)}));v(i)}}),[R,P,c]);var z=function(e){return e>450?[{headerName:"Symbol:",field:"symbol",filter:!0,flex:1,maxWidth:135,cellClass:function(e){return W(e.data.market_date)?"highlight-friday":""}},{headerName:"Company Name:",field:"company_name",filter:!0,flex:1,maxWidth:250,cellClass:function(e){return W(e.data.market_date)?"highlight-friday":""}},{headerName:"Market Date:",field:"market_date",filter:!0,flex:1,maxWidth:150,valueFormatter:function(e){var t=e.value.split("-").map(Number),n=(0,r.Z)(t,3),i=n[0],o=n[1],a=n[2];return"".concat(o,"/").concat(a,"/").concat(i.toString().slice(-2))},cellClass:function(e){return W(e.data.market_date)?"highlight-friday":""}},{headerName:"Closing Price:",field:"closing_price",flex:1,maxWidth:150,cellRenderer:function(e){var t=e.data.closing_price;return(0,dn.jsxs)("div",{children:["$",t]})},cellClass:function(e){return W(e.data.market_date)?"highlight-friday":""}},{headerName:"Closing Volume:",field:"closing_volume",flex:1,maxWidth:150,cellClass:function(e){return W(e.data.market_date)?"highlight-friday":""}},{headerName:"Daily Trend:",field:"daily_trend",filter:!0,flex:1,maxWidth:150,cellRenderer:function(e){var t=e.data.daily_trend,n=e.data.trend_relative_percentage,i="#000";return t>0?i="#0ca81e":t<0&&(i="red"),(0,dn.jsxs)("div",{style:{color:i},children:[t," |"," ",(0,dn.jsx)("span",{children:null!=n?"".concat(n,"%"):"N/A"})]})},cellClass:function(e){return W(e.data.market_date)?"highlight-friday":""}},{headerName:"Smoothed Trend:",field:"smoothed_trend",filter:!0,flex:1,maxWidth:175,cellRenderer:function(e){var t=e.data.smoothed_trend,n=e.data.smoothed_relative_percentage,i="#000";return t>0?i="#0ca81e":t<0&&(i="red"),(0,dn.jsxs)("div",{style:{color:i},children:[t," |"," ",(0,dn.jsx)("span",{children:null!=n?"".concat(n,"%"):"N/A"})]})},cellClass:function(e){return W(e.data.market_date)?"highlight-friday":""}}]:[{headerName:"Market Date:",field:"market_date",filter:!0,flex:1,maxWidth:150,valueFormatter:function(e){var t=e.value.split("-").map(Number),n=(0,r.Z)(t,3),i=n[0],o=n[1],a=n[2];return"".concat(o,"/").concat(a,"/").concat(i.toString().slice(-2))},cellClass:function(e){return W(e.data.market_date)?"highlight-friday":""}},{headerName:"Closing Price:",field:"closing_price",flex:1,maxWidth:150,cellRenderer:function(e){var t=e.data.closing_price;return(0,dn.jsxs)("div",{children:["$",t]})},cellClass:function(e){return W(e.data.market_date)?"highlight-friday":""}},{headerName:"Daily Trend:",field:"daily_trend",filter:!0,flex:1,maxWidth:150,cellRenderer:function(e){var t=e.data.daily_trend,n=e.data.trend_relative_percentage,i="#000";return t>0?i="#0ca81e":t<0&&(i="red"),(0,dn.jsxs)("div",{style:{fontSize:"10px",color:i},children:[t," |"," ",(0,dn.jsx)("span",{children:null!=n?"".concat(n,"%"):"N/A"})]})},cellClass:function(e){return W(e.data.market_date)?"highlight-friday":""}},{headerName:"Smoothed Trend:",field:"smoothed_trend",filter:!0,flex:1,maxWidth:150,cellRenderer:function(e){var t=e.data.smoothed_trend,n=e.data.smoothed_relative_percentage,i="#000";return t>0?i="#0ca81e":t<0&&(i="red"),(0,dn.jsxs)("div",{style:{fontSize:"10px",color:i},children:[t," |"," ",(0,dn.jsx)("span",{children:null!=n?"".concat(n,"%"):"N/A"})]})},cellClass:function(e){return W(e.data.market_date)?"highlight-friday":""}}]}(S),U=(0,e.useState)({autoSize:!0,data:[],legend:{enabled:!0,position:"bottom"},series:[{type:"line",xKey:"market_date",yKey:"closing_price",title:"Closing Price",stroke:"#800080",marker:{enabled:!0,size:4,fill:"#800080"}}],axes:[{type:"category",position:"bottom"},{type:"number",position:"left",crossLines:[{value:0,strokeWidth:2,stroke:"#00008B",lineDash:[6,3]}]}]}),j=(0,r.Z)(U,2),K=j[0],Y=j[1],X=(0,e.useState)({autoSize:!0,data:[],legend:{enabled:!0,position:"bottom"},series:[{type:"line",xKey:"market_date",yKey:"daily_trend",title:"Daily Trend",stroke:"#FF5349",marker:{enabled:!0,size:4,fill:"#FF5349"}},{type:"line",xKey:"market_date",yKey:"smoothed_trend",title:"Smoothed Trend",stroke:"#FFB427",marker:{enabled:!0,size:4,fill:"#FFB427"}}],axes:[{type:"category",position:"bottom"},{type:"number",position:"left",crossLines:[{value:0,strokeWidth:2,stroke:"#00008B",lineDash:[6,3]}]}]}),q=(0,r.Z)(X,2),Q=q[0],J=q[1];(0,e.useEffect)((function(){Y((function(e){return Qv(Qv({},e),{},{data:f})}))}),[f]),(0,e.useEffect)((function(){J((function(e){return Qv(Qv({},e),{},{data:f})}))}),[f]);var $=(0,e.useMemo)((function(){return{sortable:!0}}),[]),ee=(0,e.useCallback)((function(e){}),[]);(0,e.useEffect)((function(){var e=function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n,r;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(V){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,i({audience:"https://uptrenddowntrend.com/api",scope:"openid profile email"});case 5:return t=e.sent,e.next=8,fetch("".concat("https://fintrends-api.onrender.com","/api/symbol_data/").concat(V),{headers:{Authorization:"Bearer ".concat(t)}});case 8:if((n=e.sent).ok){e.next=11;break}throw new Error("Network response was not ok. Status: ".concat(n.status));case 11:return e.next=13,n.json();case 13:r=e.sent,d(r),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(2),console.error("There was a problem with the fetch operation:",e.t0.message);case 20:case"end":return e.stop()}}),e,null,[[2,17]])})));return function(){return e.apply(this,arguments)}}();e()}),[V,i]);var te=V.toUpperCase(),ne=y.map((function(e){return e.symbol})),ie=(0,e.useState)(""),re=(0,r.Z)(ie,2),se=re[0],le=(re[1],(0,e.useCallback)((function(){a.current.api.deselectAll()}),[]),0),ue=0,ce=0,de=0,he=0,pe=0;if(!(c.length>0))return null;var fe=c.slice(0,65);le=Math.max.apply(Math,(0,o.Z)(fe.map((function(e){return e.daily_trend})))),ue=Math.min.apply(Math,(0,o.Z)(fe.map((function(e){return e.daily_trend})))),ce=Math.max.apply(Math,(0,o.Z)(fe.map((function(e){return e.smoothed_trend})))),de=Math.min.apply(Math,(0,o.Z)(fe.map((function(e){return e.smoothed_trend}))));var ve=fe[0];if(ve){var ge=ve.daily_trend;ge>0?he=(ge/le*100).toFixed(2):ge<0&&(he=(ge/ue*100).toFixed(2));var me=ve.smoothed_trend;me>0?pe=(me/ce*100).toFixed(2):me<0&&(pe=(me/de*100).toFixed(2))}return n?(0,dn.jsx)("div",{children:"Loading ..."}):ne.includes(te)?(0,dn.jsx)(dn.Fragment,{children:(0,dn.jsxs)("div",{className:"symbol-details-main",style:{display:"flex",position:"relative",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[(0,dn.jsxs)("div",{style:{color:"white",display:"flex",alignItems:"center",justifyContent:"center",minWidth:"45%"},children:[y.map((function(e){return e.symbol===te?(0,dn.jsx)("div",{className:"symbol_items_container",children:(0,dn.jsxs)("ul",{className:"symbol_items",children:[(0,dn.jsx)("li",{className:"symbol_title",children:e.symbol}),(0,dn.jsx)("li",{className:"symbol_cp_name",children:e.company_name}),(0,dn.jsx)("li",{className:"symbol_exchange",children:e.exchange}),(0,dn.jsx)("li",{className:"symbol_link",children:e.website?(0,dn.jsx)("a",{href:e.website,target:"_blank",rel:"noopener noreferrer",children:e.website}):"No Website Available"})]})},e.symbol):null})),S>450?(0,dn.jsxs)("div",{style:{display:"flex",color:"white",border:"1px solid white",minWidth:"15%",padding:"1rem",borderRadius:"5px",justifyContent:"center",flexDirection:"column",height:"142px"},children:[(0,dn.jsx)("div",{style:{textTransform:"uppercase",color:"#00b1ff"},children:"Uptrend_Downtrend Predictors:"}),(0,dn.jsxs)("div",{style:{display:"flex",justifyContent:"center"},children:[(0,dn.jsxs)("div",{style:{marginRight:".5rem"},children:[(0,dn.jsx)("h3",{style:{textDecoration:"underline"},children:"Daily Trend"}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Current:"," ",(0,dn.jsx)("span",{style:{marginLeft:"2px",color:c[0].daily_trend>0?"#0ca81e":"#ff0e0e"},children:c[0].daily_trend})]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["High: ",le]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Low: ",ue]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Relative Percentage:"," ",(0,dn.jsxs)("span",{style:{marginLeft:"2px",color:c[0].daily_trend>0?"#0ca81e":"#ff0e0e"},children:[he,"%"]})]})]}),(0,dn.jsxs)("div",{style:{marginLeft:".5rem"},children:[(0,dn.jsx)("h3",{style:{textDecoration:"underline"},children:"Smoothed Trend"}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Current:"," ",(0,dn.jsx)("span",{style:{marginLeft:"2px",color:c[0].smoothed_trend>0?"#0ca81e":"#ff0e0e"},children:c[0].smoothed_trend})]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["High: ",ce]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Low: ",de]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Relative Percentage:"," ",(0,dn.jsxs)("span",{style:{marginLeft:"2px",color:c[0].smoothed_trend>0?"#0ca81e":"#ff0e0e"},children:[pe,"%"]})]})]})]})]}):null]}),S<450?(0,dn.jsxs)("div",{style:{display:"flex",color:"white",border:"1px solid white",minWidth:"30%",padding:"1rem",borderRadius:"5px",marginBottom:"1rem",justifyContent:"center",flexDirection:"column"},children:[(0,dn.jsx)("div",{style:{textTransform:"uppercase",color:"#00b1ff"},children:"Uptrend_Downtrend Predictors:"}),(0,dn.jsxs)("div",{style:{padding:".5rem"},children:[(0,dn.jsx)("h3",{style:{textDecoration:"underline"},children:"Daily Trend"}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Current:"," ",(0,dn.jsx)("span",{style:{marginLeft:"2px",color:c[0].daily_trend>0?"#0ca81e":"#ff0e0e"},children:c[0].daily_trend})]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["High: ",le]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Low: ",ue]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Relative Percentage:"," ",(0,dn.jsxs)("span",{style:{marginLeft:"2px",color:c[0].daily_trend>0?"#0ca81e":"#ff0e0e"},children:[he,"%"]})]})]}),(0,dn.jsxs)("div",{style:{padding:".5rem"},children:[(0,dn.jsx)("h3",{style:{textDecoration:"underline"},children:"Smoothed Trend"}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Current:"," ",(0,dn.jsx)("span",{style:{marginLeft:"2px",color:c[0].smoothed_trend>0?"#0ca81e":"#ff0e0e"},children:c[0].smoothed_trend})]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["High: ",ce]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Low: ",de]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Relative Percentage:"," ",(0,dn.jsxs)("span",{style:{marginLeft:"2px",color:c[0].smoothed_trend>0?"#0ca81e":"#ff0e0e"},children:[pe,"%"]})]})]})]}):null,(0,dn.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:".5rem"},children:[(0,dn.jsxs)("div",{style:{position:"relative",marginRight:"1rem"},children:[(0,dn.jsx)("input",{type:"text",placeholder:"Jump to Symbol",value:L,onChange:function(e){var t=e.target.value.toUpperCase();if(I(t),t.length>0){var n=y.filter((function(e){return e.symbol.startsWith(t)})).slice(0,5);Z(n)}else Z([])},style:{color:"black",padding:"0.5rem",borderRadius:"5px",width:"150px",marginBottom:"0.5rem"}}),G.length>0&&(0,dn.jsx)("ul",{style:{listStyleType:"none",padding:0,margin:0,position:"absolute",top:"100%",left:0,width:"150px",backgroundColor:"white",zIndex:1e3,border:"1px solid #ccc",borderRadius:"5px"},children:G.map((function(e){return(0,dn.jsx)("li",{onClick:function(){return function(e){I(e),Z([]),s("/details/".concat(e))}(e.symbol)},style:{padding:"0.5rem",cursor:"pointer"},children:e.symbol},e.symbol)}))})]}),(0,dn.jsx)("button",{style:{color:"white",border:"1px solid white",padding:".3rem",borderRadius:"5px",backgroundColor:"#134f42"},onClick:B,children:"Export as CSV"}),(0,dn.jsx)("button",{style:{color:"white",border:"1px solid white",padding:".3rem",borderRadius:"5px",backgroundColor:"#134f42",marginLeft:"0.5rem"},onClick:function(){return s("/predictor/".concat(V))},children:"Predictor"})]}),S>450?(0,dn.jsx)("div",{className:"ag-theme-alpine",style:{width:"80%",maxWidth:"1110px",height:"calc(100vh - 370px)",overflowX:"auto",marginBottom:".5rem"},children:(0,dn.jsx)(Kv,{ref:a,rowData:c,columnDefs:z,defaultColDef:$,animateRows:!0,rowSelection:"multiple",rowMultiSelectWithClick:!0,cellSelection:!0,enableCellTextSelection:!0,ensureDomOrder:!0,onCellClicked:ee,quickFilterText:se,suppressExcelExport:!0,popupParent:H})}):(0,dn.jsx)("div",{className:"ag-theme-alpine",style:{width:"80%",height:"calc(100vh - 470px)",overflowX:"auto",marginBottom:".5rem",fontSize:"14px"},children:(0,dn.jsx)(Kv,{ref:a,rowData:c,columnDefs:z,defaultColDef:$,animateRows:!0,rowSelection:"multiple",rowMultiSelectWithClick:!0,cellSelection:!0,enableCellTextSelection:!0,ensureDomOrder:!0,onCellClicked:ee,quickFilterText:se})}),(0,dn.jsx)("div",{style:{color:"white"},children:(0,dn.jsxs)("div",{className:"details-container",children:[(0,dn.jsx)("div",{className:"ag-theme-alpine details-grid"}),(0,dn.jsx)("div",{style:{textTransform:"uppercase",color:"#00b1ff",margin:".5rem",justifyContent:"center",fontsize:"24px"},children:"Charts:"}),(0,dn.jsxs)("div",{style:{display:"flex",justifyContent:"flex-start",fontSize:"15px",marginLeft:".5rem"},children:[(0,dn.jsxs)("div",{children:[(0,dn.jsx)("input",{type:"radio",id:"option1",name:"options",value:"option1",style:{marginRight:".2rem"},onChange:function(){return D("option1")},checked:"option1"===R}),(0,dn.jsx)("label",{htmlFor:"option1",style:{marginRight:".5rem"},children:"Previous Month"})]}),(0,dn.jsxs)("div",{children:[(0,dn.jsx)("input",{type:"radio",id:"option2",name:"options",value:"option2",style:{marginRight:".2rem"},onChange:function(){return D("option2")},checked:"option2"===R}),(0,dn.jsx)("label",{htmlFor:"option2",style:{marginRight:".5rem"},children:"Previous 6 Months"})]}),(0,dn.jsxs)("div",{children:[(0,dn.jsx)("input",{type:"radio",id:"option3",name:"options",value:"option3",style:{marginRight:".2rem"},onChange:function(){return D("option3")},checked:"option3"===R}),(0,dn.jsx)("label",{htmlFor:"option3",style:{marginRight:".5rem"},children:"Previous Year"})]}),(0,dn.jsxs)("div",{children:[(0,dn.jsx)("input",{type:"radio",id:"option4",name:"options",value:"option4",style:{marginRight:".2rem"},onChange:function(){return D("option4")},checked:"option4"===R}),(0,dn.jsx)("input",{type:"number",id:"option4",placeholder:"Enter # of Days",name:"options",value:P,style:{marginRight:".2rem",color:"black",borderRadius:"2px"},onChange:function(e){return A(e.target.value)},onClick:function(){return D("option4")}})]})]}),(0,dn.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,dn.jsxs)("div",{className:"details-chart",style:{display:"flex",flexDirection:"column",marginBottom:"1rem"},children:[(0,dn.jsx)("div",{style:{margin:".5rem"},children:(0,dn.jsx)(Jv.AgChartsReact,{options:Q})}),(0,dn.jsx)("div",{style:{margin:".5rem"},children:(0,dn.jsx)(Jv.AgChartsReact,{options:K})})]})})]})})]})}):(0,dn.jsx)(dn.Fragment,{children:(0,dn.jsxs)("div",{className:"error-container",children:[(0,dn.jsx)("div",{style:{display:"flex",textAlign:"center",justifyContent:"Center",paddingTop:"2rem",color:"white",fontSize:"2rem"},children:"SYMBOL DOES NOT EXIST"}),(0,dn.jsxs)("div",{style:{display:"flex",textAlign:"center",justifyContent:"Center",paddingTop:"2rem",color:"white",flexDirection:"column",alignItems:"center"},children:[(0,dn.jsx)("h6",{children:"Would you like to add this symbol?"}),(0,dn.jsx)("button",{className:"no-symbol-btn",style:{border:"1px solid white",maxWidth:"9rem",padding:".7rem",borderRadius:"5px",marginTop:".5rem"},children:(0,dn.jsx)(Ne,{to:"/dashboard/controlpanel",children:"ADD SYMBOL"})})]}),(0,dn.jsxs)("div",{style:{display:"flex",textAlign:"center",justifyContent:"Center",paddingTop:"2rem",color:"white",flexDirection:"column",alignItems:"center"},children:[(0,dn.jsx)("h6",{children:"Search for a different symbol"}),(0,dn.jsx)("button",{className:"no-symbol-btn",style:{border:"1px solid white",maxWidth:"12rem",padding:".8rem",borderRadius:"5px",marginTop:".5rem"},children:(0,dn.jsx)(Ne,{to:"/details",children:"SEARCH SYMBOL"})})]})]})})};var eg=function(){var t=(0,e.useState)(""),n=(0,r.Z)(t,2),i=n[0],o=n[1],a=function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,r,a,s;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),(n={}).symbol=i,n.is_active=!0,n.is_favorite=!0,r="".concat("https://fintrends-api.onrender.com","/api/symbols/"),a={method:"post",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}},e.next=9,fetch(r,a);case 9:(s=e.sent).ok?(o(""),alert("Symbol has been added")):s.isError&&alert(s.error);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,dn.jsx)("div",{className:"container",children:(0,dn.jsx)("div",{className:"columns is-centered",children:(0,dn.jsx)("div",{className:"column is-one-third",children:(0,dn.jsx)("div",{className:"w-full max-w-xs",children:(0,dn.jsxs)("form",{onSubmit:a,className:"bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4",children:[(0,dn.jsxs)("div",{className:"mb-4",children:[(0,dn.jsx)("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"stock_symbol",children:"Stock Symbol"}),(0,dn.jsx)("input",{className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",id:"symbol",type:"text",placeholder:"Stock Symbol",onInput:function(e){return o(e.target.value)},value:i})]}),(0,dn.jsx)("div",{className:"flex items-center justify-between",children:(0,dn.jsx)("button",{className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline",type:"submit",onClick:a,children:"Create"})})]})})})})})};var tg=function(){var e=sn(),t=e.user,n=(0,e.getAccessTokenSilently)();return console.log(n),(0,dn.jsx)(dn.Fragment,{children:(0,dn.jsxs)("div",{className:"dashboard-main",children:[(0,dn.jsxs)("div",{className:"dashboard-welcome",children:["Welcome back, ",t.name]}),(0,dn.jsxs)("div",{className:"cntrlpnl-grid-container",children:[(0,dn.jsx)("div",{className:"cntrlpnl-grid-item-c",children:(0,dn.jsxs)(Ne,{to:"/dashboard/controlpanel",className:"link-to-css",children:[(0,dn.jsx)("div",{className:"cntrlpnl-title",children:"Control Panel"}),(0,dn.jsx)("div",{className:"cntrlpnl-img",children:(0,dn.jsx)("img",{src:"https://img.icons8.com/?size=512&id=uY7ZEuGXILwn&format=png",alt:""})})]})}),(0,dn.jsx)("div",{className:"cntrlpnl-grid-item-d",children:(0,dn.jsxs)(Ne,{to:"/collections",className:"link-to-css",children:[(0,dn.jsx)("div",{className:"collections-title",children:"Collections"}),(0,dn.jsx)("div",{className:"collections-img",children:(0,dn.jsx)("img",{src:"https://img.icons8.com/?size=512&id=46088&format=png",alt:""})})]})}),(0,dn.jsx)("div",{className:"cntrlpnl-grid-item-a",children:(0,dn.jsxs)(Ne,{to:"/symbols",className:"link-to-css",children:[(0,dn.jsx)("div",{className:"symbols-title",children:"Symbols"}),(0,dn.jsx)("div",{className:"symbols-img",children:(0,dn.jsx)("img",{src:"https://img.icons8.com/?size=512&id=43594&format=png",alt:""})})]})}),(0,dn.jsx)("div",{className:"cntrlpnl-grid-item-b",children:(0,dn.jsxs)(Ne,{to:"/details",className:"link-to-css",children:[(0,dn.jsx)("div",{className:"symbol-details-title",children:"Symbol Details"}),(0,dn.jsx)("div",{className:"symbol-details-img",children:(0,dn.jsx)("img",{src:"https://img.icons8.com/?size=512&id=79455&format=png",alt:""})})]})})]})]})})};var ng=function(){var t=(0,e.useState)(""),n=(0,r.Z)(t,2),i=n[0],o=n[1],a=sn(),s=(a.user,a.getAccessTokenSilently),l=(0,e.useState)(!1),u=(0,r.Z)(l,2),c=u[0],d=u[1],h=(0,e.useState)(""),p=(0,r.Z)(h,2),f=p[0],v=p[1];(0,e.useEffect)((function(){var e=localStorage.getItem("activeSection");e&&o(e)}),[]);var g=(0,e.useState)(""),m=(0,r.Z)(g,2),y=m[0],C=m[1],k=(0,e.useState)([]),w=(0,r.Z)(k,2),S=w[0],b=w[1],E=(0,e.useState)(""),x=(0,r.Z)(E,2),R=x[0],D=x[1],T=(0,e.useState)([]),O=(0,r.Z)(T,2),P=O[0],A=O[1],M=(0,e.useCallback)(Ze((0,_e.Z)().mark((function e(){var t,n,i,r;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="".concat("https://fintrends-api.onrender.com","/api/symbols"),e.prev=1,e.next=4,s();case 4:return n=e.sent,e.next=7,fetch(t,{headers:{Authorization:"Bearer ".concat(n)}});case 7:if(!(i=e.sent).ok){e.next=15;break}return e.next=11,i.json();case 11:r=e.sent,A(r),e.next=16;break;case 15:console.error("Failed to fetch symbols:",i.statusText);case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(1),console.error("Error fetching symbols:",e.t0);case 21:case"end":return e.stop()}}),e,null,[[1,18]])}))),[s]);(0,e.useEffect)((function(){M()}),[M]);var N=P.map((function(e){return e.symbol})),L=function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,i,r,o,a,l,u;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),d(!0),v("Adding symbol..."),n={symbol:y.toUpperCase(),is_active:!0,is_favorite:!0},i="".concat("https://fintrends-api.onrender.com","/api/symbols"),e.prev=5,e.next=8,s();case 8:return r=e.sent,o={method:"post",body:JSON.stringify(n),headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(r)}},e.next=12,fetch(i,o);case 12:if(a=e.sent,d(!1),!a.ok){e.next=30;break}return e.next=17,a.json();case 17:if(l=e.sent,u=l.symbol_id,!N.includes(n.symbol)){e.next=23;break}alert("Symbol already exists"),e.next=28;break;case 23:return C(""),alert("Symbol has been added"),M(),e.next=28,I(u);case 28:e.next=31;break;case 30:alert("Failed to add symbol");case 31:e.next=38;break;case 33:e.prev=33,e.t0=e.catch(5),d(!1),console.error("Error adding symbol:",e.t0),alert("Failed to add symbol: "+e.t0.message);case 38:case"end":return e.stop()}}),e,null,[[5,33]])})));return function(t){return e.apply(this,arguments)}}(),I=function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,i,r;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat("https://fintrends-api.onrender.com","/api/run_full_update/").concat(t),e.prev=1,e.next=4,s();case 4:return i=e.sent,r={method:"post",headers:{Authorization:"Bearer ".concat(i)}},e.next=8,fetch(n,r);case 8:e.sent.ok||alert("Failed to initiate full update for the new symbol"),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(1),console.error("Error initiating full update:",e.t0),alert("Failed to initiate full update: "+e.t0.message);case 16:case"end":return e.stop()}}),e,null,[[1,12]])})));return function(t){return e.apply(this,arguments)}}(),F=function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n,i,r,o,a,l,u,c,h,p,f;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(S.length){e.next=3;break}return alert("No symbols to add"),e.abrupt("return");case 3:return d(!0),v("Uploading symbols... This may take a few seconds."),t={symbols:S},n="".concat("https://fintrends-api.onrender.com","/api/symbols/bulk"),e.prev=7,e.next=10,s();case 10:return i=e.sent,r={method:"post",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(i)}},e.next=14,fetch(n,r);case 14:return o=e.sent,e.next=17,o.json();case 17:if(a=e.sent,d(!1),!o.ok){e.next=29;break}return l=a.success_count,u=a.error_count,c=a.added,h=a.errors,p=c.map((function(e){return e.symbol})).join(", "),f=h.map((function(e){return e.message})).join("\n"),alert("Success: ".concat(l," symbols added. Errors: ").concat(u," symbols failed.\n\nAdded Symbols:\n").concat(p,"\n\nErrors:\n").concat(f)),M(),e.next=27,_();case 27:e.next=31;break;case 29:console.error("Error adding bulk symbols:",a),alert("Failed to add bulk symbols: "+a.message);case 31:e.next=38;break;case 33:e.prev=33,e.t0=e.catch(7),d(!1),console.error("Error in handleBulkSubmit:",e.t0),alert("An error occurred while sending the data: "+e.t0.message);case 38:case"end":return e.stop()}}),e,null,[[7,33]])})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n,i;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="".concat("https://fintrends-api.onrender.com","/api/run_full_update_all"),e.prev=1,e.next=4,s();case 4:return n=e.sent,i={method:"post",headers:{Authorization:"Bearer ".concat(n)}},e.next=8,fetch(t,i);case 8:e.sent.ok||alert("Failed to initiate full update for all symbols"),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(1),console.error("Error initiating full update for all symbols:",e.t0),alert("Failed to initiate full update for all symbols: "+e.t0.message);case 16:case"end":return e.stop()}}),e,null,[[1,12]])})));return function(){return e.apply(this,arguments)}}(),G=function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,i,r,o,a;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),d(!0),v("Removing symbol..."),n=R.toUpperCase(),i="".concat("https://fintrends-api.onrender.com","/api/symbols/").concat(n),e.prev=5,e.next=8,s();case 8:return r=e.sent,o={method:"delete",headers:{Authorization:"Bearer ".concat(r)}},e.next=12,fetch(i,o);case 12:a=e.sent,d(!1),a.ok&&N.includes(n)?(D(""),alert("Symbol has been removed"),M()):alert("Symbol removal failed"),e.next=22;break;case 17:e.prev=17,e.t0=e.catch(5),d(!1),console.error("Error removing symbol:",e.t0),alert("Failed to remove symbol: "+e.t0.message);case 22:case"end":return e.stop()}}),e,null,[[5,17]])})));return function(t){return e.apply(this,arguments)}}();return(0,dn.jsx)(dn.Fragment,{children:(0,dn.jsxs)("div",{className:"controlpanel-main",children:[c&&(0,dn.jsx)("div",{className:"loading-overlay",children:f}),(0,dn.jsx)("div",{children:(0,dn.jsx)("h1",{className:"controlpanel-title",children:"Control Panel"})}),(0,dn.jsx)("div",{className:"controlpanel-nav",children:(0,dn.jsx)("button",{className:"btn-one",style:{borderColor:"section1"===i?"white":"grey",backgroundColor:"section1"===i?"#8E8EDC3D":"transparent"},onClick:function(){return o(e="section1"),void localStorage.setItem("activeSection",e);var e},children:"SYMBOLS"})}),"section1"===i&&(0,dn.jsxs)("div",{children:[(0,dn.jsx)("div",{className:"sec-one-contain container",children:(0,dn.jsx)("div",{className:"columns is-centered",children:(0,dn.jsx)("div",{className:"column is-one-third",children:(0,dn.jsx)("div",{className:"w-full max-w-xs",children:(0,dn.jsxs)("form",{onSubmit:L,className:"shadow-md rounded px-8 pt-6 pb-8 mb-4",style:{border:"1px solid white"},children:[(0,dn.jsxs)("div",{className:"mb-4",children:[(0,dn.jsx)("label",{className:"block text-gray-700 text-sm font-bold mb-2",style:{color:"white",fontSize:"18px"},children:"Add Symbol"}),(0,dn.jsx)("input",{className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",id:"symbol",type:"text",placeholder:"Stock Symbol",onInput:function(e){return C(e.target.value)},value:y})]}),(0,dn.jsx)("div",{className:"flex items-center justify-between",style:{justifyContent:"center"},children:(0,dn.jsx)("button",{className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline",type:"submit",onClick:L,children:"Create"})})]})})})})}),(0,dn.jsx)("div",{className:"sec-one-contain container",children:(0,dn.jsx)("div",{className:"columns is-centered",children:(0,dn.jsx)("div",{className:"column is-one-third",children:(0,dn.jsx)("div",{className:"w-full max-w-xs",children:(0,dn.jsxs)("div",{className:"shadow-md rounded px-8 pt-6 pb-8 mb-4",style:{border:"1px solid white"},children:[(0,dn.jsxs)("div",{className:"mb-4",children:[(0,dn.jsx)("label",{className:"block text-gray-700 text-sm font-bold mb-2",style:{color:"white",fontSize:"18px"},children:"Update Symbol List"}),(0,dn.jsx)("input",{type:"file",accept:".csv",onChange:function(e){var t=e.target.files[0];if(t){var n=new FileReader;n.onload=function(e){var t=e.target.result.split(/\r\n|\n/).map((function(e){return e.split(",")[0].trim().toUpperCase()})).filter(Boolean);b(t),console.log("Uploaded symbols:",t)},n.onerror=function(){alert("Failed to read the file")},n.readAsText(t)}}})]}),(0,dn.jsx)("div",{className:"flex items-center justify-between",style:{justifyContent:"center"},children:(0,dn.jsx)("button",{className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline",style:{marginBottom:"8px",fontSize:"12px",color:"#FFF"},type:"submit",onClick:F,children:"Upload CSV and Add Symbols"})})]})})})})}),(0,dn.jsx)("div",{className:"sec-one-contain container",children:(0,dn.jsx)("div",{className:"columns is-centered",children:(0,dn.jsx)("div",{className:"column is-one-third",children:(0,dn.jsx)("div",{className:"w-full max-w-xs",children:(0,dn.jsxs)("form",{onSubmit:G,className:"shadow-md rounded px-8 pt-6 pb-8 mb-4",style:{border:"1px solid white"},children:[(0,dn.jsxs)("div",{className:"mb-4",children:[(0,dn.jsx)("label",{className:"block text-gray-700 text-sm font-bold mb-2",style:{color:"white",fontSize:"18px"},children:"Remove Symbol"}),(0,dn.jsx)("input",{className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",id:"remove_symbol",type:"text",placeholder:"Remove Stock Symbol",onInput:function(e){return D(e.target.value)},value:R})]}),(0,dn.jsx)("div",{className:"flex items-center justify-between",style:{justifyContent:"center"},children:(0,dn.jsx)("button",{className:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline",type:"submit",onClick:G,children:"Remove"})})]})})})})})]})]})})};var ig=function(){var t=sn(),n=t.user,i=t.getAccessTokenSilently,o=(0,e.useState)(""),a=(0,r.Z)(o,2),s=a[0],l=a[1],u=(0,e.useState)(""),c=(0,r.Z)(u,2),d=c[0],h=c[1],p=(0,e.useState)(""),f=(0,r.Z)(p,2),v=f[0],g=f[1],m=(0,e.useState)(""),y=(0,r.Z)(m,2),C=(y[0],y[1],(0,e.useState)([])),k=(0,r.Z)(C,2),w=(k[0],k[1],(0,e.useState)("")),S=(0,r.Z)(w,2),b=(S[0],S[1],(0,e.useState)([])),E=(0,r.Z)(b,2),x=E[0],R=E[1],D=(0,e.useState)(""),T=(0,r.Z)(D,2),O=T[0],P=T[1],A=(0,e.useState)(""),M=(0,r.Z)(A,2),N=M[0],L=M[1],I=(0,e.useState)([]),F=(0,r.Z)(I,2),_=F[0],G=(F[1],(0,e.useState)([])),Z=(0,r.Z)(G,2),V=Z[0],H=Z[1],B=(0,e.useState)([]),W=(0,r.Z)(B,2),z=W[0],U=W[1],j=(0,e.useState)([]),K=(0,r.Z)(j,2),Y=K[0],X=K[1],q=(0,e.useState)([]),Q=(0,r.Z)(q,2),J=Q[0],$=Q[1],ee=(0,e.useState)(""),te=(0,r.Z)(ee,2),ne=(te[0],te[1]),ie=(0,e.useRef)(),re=n.nickname,oe=(0,e.useCallback)(Ze((0,_e.Z)().mark((function e(){var t,n,r,o;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({audience:"https://uptrenddowntrend.com/api",scope:"openid profile email"});case 2:return t=e.sent,n="".concat("https://fintrends-api.onrender.com","/api/symbols"),e.next=6,fetch(n,{headers:{Authorization:"Bearer ".concat(t)}});case 6:if(!(r=e.sent).ok){e.next=12;break}return e.next=10,r.json();case 10:o=e.sent,R(o);case 12:case"end":return e.stop()}}),e)}))),[i]);(0,e.useEffect)((function(){oe()}),[oe]);var ae=(0,e.useCallback)(Ze((0,_e.Z)().mark((function e(){var t,n,r,o;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i({audience:"https://uptrenddowntrend.com/api",scope:"openid profile email"});case 3:return t=e.sent,n="".concat("https://fintrends-api.onrender.com","/api/collections"),e.next=7,fetch(n,{headers:{Authorization:"Bearer ".concat(t)}});case 7:if(!(r=e.sent).ok){e.next=13;break}return e.next=11,r.json();case 11:o=e.sent,H(o);case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(0),console.error("Error fetching data: ",e.t0);case 18:case"end":return e.stop()}}),e,null,[[0,15]])}))),[i]);(0,e.useEffect)((function(){ae()}),[ae]),x.map((function(e){return e.symbol}));var se=function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,r,o,a,s,u,c,p;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.prev=1,e.next=4,i({audience:"https://uptrenddowntrend.com/api",scope:"openid profile email"});case 4:return n=e.sent,r={collection_name:d,created_by:re},o="".concat("https://fintrends-api.onrender.com","/api/collections"),a={method:"post",body:JSON.stringify(r),headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n)}},e.next=10,fetch(o,a);case 10:if(!(s=e.sent).ok){e.next=23;break}return e.next=14,s.json();case 14:u=e.sent,c=u.collection_id,alert("Collection has been added"),h(""),l(c),localStorage.setItem("selectedCollection",c),ae(),e.next=27;break;case 23:return e.next=25,s.json();case 25:p=e.sent,alert(p.error);case 27:e.next=32;break;case 29:e.prev=29,e.t0=e.catch(1),console.error("Error adding collection:",e.t0);case 32:case"end":return e.stop()}}),e,null,[[1,29]])})));return function(t){return e.apply(this,arguments)}}(),le=function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,r,o;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.next=3,i({audience:"https://uptrenddowntrend.com/api",scope:"openid profile email"});case 3:return n=e.sent,r="".concat("https://fintrends-api.onrender.com","/api/collections/").concat(v),o={method:"delete",headers:{Authorization:"Bearer ".concat(n)}},e.next=8,fetch(r,o);case 8:200===e.sent.status?(g(""),alert("Collection has been removed"),l(""),ae()):alert("Collection removal failed");case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ue=function(e){return e.columnApi.getAllDisplayedColumns()[0]===e.column},ce=(0,e.useMemo)((function(){return{width:"100%",height:"100%"}}),[]),de=(0,e.useMemo)((function(){return{height:"30vh",minWidth:"30vw",maxWidth:"60vw"}}),[]),he=(0,e.useState)([{headerName:"Symbol ",field:"symbol",minWidth:30,maxWidth:150,headerClass:"header-center"},{headerName:"Company Name",field:"company_name",minWidth:300,headerClass:"header-center"}]),pe=(0,r.Z)(he,2),fe=pe[0],ve=(pe[1],(0,e.useState)([{headerName:"Symbol ",field:"symbol",maxWidth:150,headerClass:"header-center"},{headerName:"Company Name",field:"company_name",minWidth:300,headerClass:"header-center"}])),ge=(0,r.Z)(ve,2),me=ge[0],ye=(ge[1],(0,e.useMemo)((function(){return{flex:1,minWidth:100,headerCheckboxSelection:ue,checkboxSelection:ue}}),[])),Ce=(0,e.useCallback)((function(){U(x)}),[x]),ke=(0,e.useCallback)((function(){ie.current.api.setQuickFilter(document.getElementById("quickFilter").value)}),[]),we=(0,e.useCallback)(Ze((0,_e.Z)().mark((function e(){var t,n,r,o,a,l,u;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i({audience:"https://uptrenddowntrend.com/api",scope:"openid profile email"});case 3:return t=e.sent,e.next=6,fetch("".concat("https://fintrends-api.onrender.com","/api/collections/link/").concat(s),{headers:{Authorization:"Bearer ".concat(t)}});case 6:if((n=e.sent).ok){e.next=9;break}throw new Error("HTTP error! Status: ".concat(n.status));case 9:return e.next=11,n.json();case 11:for(r=e.sent,o=[],a=new Set,l=function(e){var t=r[e].symbol_id;if(!a.has(t)){a.add(t);var n=x.find((function(e){return e.symbol_id===t}));n&&o.push({symbol:n.symbol,company_name:n.company_name,symbol_id:n.symbol_id})}},u=0;u<r.length;u++)l(u);X(o),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(0),console.error("Error:",e.t0);case 22:case"end":return e.stop()}}),e,null,[[0,19]])}))),[s,x,i]);(0,e.useEffect)((function(){we()}),[s,x,we]);var Se=function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n,r,o,a,l,u,c,d,h,p,f;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=J.map((function(e){return e.symbol_id})),r="".concat("https://fintrends-api.onrender.com","/api/collections/link/multiple"),o=parseInt(s,10),a=(null===(t=V.find((function(e){return e.collection_id===o})))||void 0===t?void 0:t.collection_name)||"Unknown Collection",e.next=7,i({audience:"https://uptrenddowntrend.com/api",scope:"openid profile email"});case 7:return l=e.sent,u={method:"post",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(l)},body:JSON.stringify({symbol_id:n,collection_id:o})},e.next=11,fetch(r,u);case 11:return c=e.sent,e.next=14,c.json();case 14:d=e.sent,200===c.status?(h="",p="",d.added_collections.length>0&&(h="Added symbols: ".concat(d.added_collections.join(", "))),d.duplicate_collections.length>0&&(p="Duplicate symbols: ".concat(d.duplicate_collections.join(", ")," not added")),f="",f=h&&p?"".concat(h," to '").concat(a,"'\n").concat(p," to '").concat(a,"'."):"".concat(h).concat(p," to '").concat(a,"'")||0,alert(f),ie.current.api.deselectAll(),oe()):alert("Failed to add symbols to the collection: "+d.message),e.next=22;break;case 18:e.prev=18,e.t0=e.catch(0),console.error("Error in handleAddToCollection:",e.t0),alert("An error occurred: "+e.t0.message);case 22:case"end":return e.stop()}}),e,null,[[0,18]])})));return function(){return e.apply(this,arguments)}}(),be=function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n,r,o,a,l,u,c,d,h,p,f;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=J.map((function(e){return e.symbol_id})),r="".concat("https://fintrends-api.onrender.com","/api/collections/link/delete-multiple"),o=parseInt(s,10),a=(null===(t=V.find((function(e){return e.collection_id===o})))||void 0===t?void 0:t.collection_name)||"Unknown Collection",e.next=7,i({audience:"https://uptrenddowntrend.com/api",scope:"openid profile email"});case 7:return l=e.sent,u={method:"post",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(l)},body:JSON.stringify({symbol_id:n,collection_id:o})},e.next=11,fetch(r,u);case 11:return c=e.sent,e.next=14,c.json();case 14:d=e.sent,c.ok?(h=d.removed_symbols&&d.removed_symbols.length>0?"Removed symbols: ".concat(d.removed_symbols.join(", ")):"",p=d.not_removed_symbols&&d.not_removed_symbols.length>0?"Symbols not removed: ".concat(d.not_removed_symbols.join(", ")):"",f="",h||p?(f="".concat(h).concat(h&&p?"\n":"").concat(p," from '").concat(a,"'"),alert(f),ie.current.api.deselectAll(),oe()):(f="No symbols were removed or not removed from the collection '".concat(a,"'."),alert(f))):(console.error("Error in handleRemoveFromCollection:",d),alert("Failed to remove symbols from the collection: "+d.message)),e.next=22;break;case 18:e.prev=18,e.t0=e.catch(0),console.error("Error in handleRemoveFromCollection:",e.t0),alert("An error occurred: "+e.t0.message);case 22:case"end":return e.stop()}}),e,null,[[0,18]])})));return function(){return e.apply(this,arguments)}}();return(0,e.useEffect)((function(){var e=parseInt(s),t=_.find((function(t){return t.collection_id===e}));t?ne(t.collection_name):console.log("Desired collection not found.")}),[s,_]),(0,dn.jsx)(dn.Fragment,{children:(0,dn.jsx)("div",{className:"controlpanel-main",children:(0,dn.jsxs)("div",{children:[(0,dn.jsxs)("h1",{style:{fontSize:"1.5rem",textTransform:"uppercase"},children:[n.nickname,"'s Collections"]}),(0,dn.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,dn.jsx)("div",{className:"sec-one-contain container",style:{display:"flex",justifyContent:"center",padding:"2rem",flexDirection:"column"},children:(0,dn.jsxs)("div",{className:"columns is-centered",style:{border:"1px solid white"},children:[(0,dn.jsxs)("div",{className:"column is-one-third",children:[(0,dn.jsx)("div",{className:"w-full max-w-xs",children:(0,dn.jsxs)("div",{className:"shadow-md rounded px-8 pt-6 pb-8",children:[(0,dn.jsx)("h2",{style:{color:"white",fontSize:"18px",fontWeight:"bold"},children:"My Collections:"}),(0,dn.jsx)("div",{className:"scrollable-list",style:{maxHeight:"170px",overflowY:"scroll",border:"1px solid white",scrollbarWidth:"auto",backgroundColor:"white",color:"black"},children:V.map((function(e,t){return e.created_by===re?(0,dn.jsx)("ul",{style:{borderBottom:"1px solid lightgrey"},children:(0,dn.jsx)("li",{children:e.collection_name})},t):null}))})]})}),(0,dn.jsxs)("form",{onSubmit:se,className:"shadow-md rounded px-8 pt-6 pb-8",style:{border:"1px solid white"},children:[(0,dn.jsxs)("div",{className:"mb-4",children:[(0,dn.jsx)("label",{className:"block text-gray-700 text-sm font-bold mb-2",style:{color:"white",fontSize:"18px"},children:"Create New Collection:"}),(0,dn.jsx)("input",{className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",id:"collection",type:"text",placeholder:"Collection Name",onChange:function(e){return h(e.target.value)},value:d})]}),(0,dn.jsx)("div",{className:"flex items-center justify-between",style:{justifyContent:"center"},children:(0,dn.jsx)("button",{className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline",type:"submit",onClick:se,children:"Create"})})]})]}),(0,dn.jsxs)("div",{className:"shadow-md rounded px-8 pt-6 pb-8",style:{border:"1px solid white"},children:[(0,dn.jsx)("h2",{style:{color:"white",fontSize:"18px",fontWeight:"bold"},children:"Remove Collection:"}),(0,dn.jsxs)("select",{placeholder:"Select to Remove",onInput:function(e){return g(e.target.value)},value:v,className:"block appearance-none w-full bg-gray-200 border border-gray-200 text-gray-700 py-3 px-2 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500",id:"remove-collection",children:[(0,dn.jsx)("option",{value:"",children:"Select Collection"}),V.map((function(e){return(0,dn.jsx)("option",{value:e.collection_id,children:e.collection_name},e.collection_id)}))]}),(0,dn.jsx)("button",{style:{border:"1px solid black",backgroundColor:"red",marginTop:".5rem",padding:".3rem",borderRadius:"3px",fontWeight:"bold"},onClick:le,className:"btn btn-primary",children:"Remove"})]})]})}),(0,dn.jsxs)("div",{style:{margin:"2rem"},children:[(0,dn.jsxs)("select",{id:"existingCollection",value:s,onChange:function(e){return function(e){l(e),localStorage.setItem("selectedCollection",e)}(e.target.value)},style:{color:"black"},children:[(0,dn.jsx)("option",{value:"",children:"Select here to manage collection:"}),V.filter((function(e){return e.created_by===re})).map((function(e){return(0,dn.jsx)("option",{value:e.collection_id,children:e.collection_name},e.collection_id)}))]}),""!==s?(0,dn.jsxs)("div",{style:{border:"1px solid white",padding:".5rem",borderRadius:"5px",marginTop:".3rem"},children:[(0,dn.jsx)("h3",{style:{textTransform:"uppercase",paddingBottom:".2rem"},children:"Symbols In Collection:"}),(0,dn.jsx)("div",{style:ce,children:(0,dn.jsxs)("div",{className:"example-wrapper",style:{alignItems:"center"},children:[(0,dn.jsx)("div",{style:{marginBottom:"5px"},children:(0,dn.jsx)("input",{type:"text",onChange:function(e){return P(e.target.value)},onInput:ke,id:"quickFilter",placeholder:"Search",style:{width:"75%",textAlign:"center",color:"black"}})}),(0,dn.jsx)("div",{style:de,className:"ag-theme-alpine",children:(0,dn.jsx)(Kv,{ref:ie,rowData:Y,columnDefs:me,quickFilterText:O})})]})})]}):(0,dn.jsxs)("div",{style:{border:"1px solid white",padding:".5rem",borderRadius:"5px",marginTop:"1rem"},children:[(0,dn.jsx)("h3",{style:{textTransform:"uppercase",paddingBottom:".2rem"},children:"No collection selected"}),(0,dn.jsx)("div",{style:ce,children:(0,dn.jsx)("div",{className:"example-wrapper",style:{alignItems:"center"},children:(0,dn.jsx)("div",{style:de,className:"ag-theme-alpine",children:(0,dn.jsx)(Kv,{ref:ie,rowData:[],columnDefs:me})})})})]}),""!==s?(0,dn.jsxs)("div",{style:{border:"1px solid white",padding:".5rem",borderRadius:"5px",marginTop:"1rem"},children:[(0,dn.jsx)("h3",{style:{textTransform:"uppercase",paddingBottom:".2rem"},children:"Select Symbols to Add or Remove:"}),(0,dn.jsx)("div",{style:ce,children:(0,dn.jsxs)("div",{className:"example-wrapper",style:{alignItems:"center"},children:[(0,dn.jsx)("div",{style:{marginBottom:"5px"},children:(0,dn.jsx)("input",{type:"text",onChange:function(e){return L(e.target.value)},onInput:ke,id:"quickFilter",placeholder:"Search",style:{width:"75%",textAlign:"center",color:"black"}})}),(0,dn.jsx)("div",{style:de,className:"ag-theme-alpine",children:(0,dn.jsx)(Kv,{onSelectionChanged:function(e){var t=e.api.getSelectedNodes().map((function(e){return e.data}));$(t)},ref:ie,rowData:z,columnDefs:fe,defaultColDef:ye,suppressRowClickSelection:!0,rowSelection:"multiple",onGridReady:Ce,quickFilterText:N})}),(0,dn.jsxs)("div",{style:{display:"flex",justifyContent:"center",margin:".5rem"},children:[(0,dn.jsx)("button",{onClick:Se,style:{border:"1px solid black",borderRadius:"3px",fontWeight:"bold",backgroundColor:"#3B82F6",padding:".3rem",minWidth:"5rem",marginRight:"1rem"},children:"Add"}),(0,dn.jsx)("button",{onClick:be,style:{border:"1px solid black",borderRadius:"3px",fontWeight:"bold",backgroundColor:"#FF0000",padding:".3rem",minWidth:"5rem",marginLeft:"1rem"},children:"Remove"})]})]})})]}):null]})]})]})})})};var rg=function(){var t=sn(),n=t.isLoading,i=t.getAccessTokenSilently,a=(0,e.useRef)(),s=oe(),l=(0,e.useState)([]),u=(0,r.Z)(l,2),c=u[0],d=u[1],h=(0,e.useState)([]),p=(0,r.Z)(h,2),f=p[0],v=p[1],g=(0,e.useState)([]),m=(0,r.Z)(g,2),y=m[0],C=m[1],k=(0,e.useState)(window.innerWidth),w=(0,r.Z)(k,2),S=w[0],b=w[1],E=(0,e.useState)("0"),x=(0,r.Z)(E,2),R=x[0],D=x[1],T=(0,e.useState)("option2"),O=(0,r.Z)(T,2),P=O[0],A=O[1],M=(0,e.useState)(""),N=(0,r.Z)(M,2),L=N[0],I=N[1],F=(0,e.useState)([]),_=(0,r.Z)(F,2),G=_[0],Z=_[1],V=(0,e.useState)(""),H=(0,r.Z)(V,2),B=H[0],W=H[1],z=(0,e.useState)(""),U=(0,r.Z)(z,2),j=U[0],K=U[1],Y=(0,e.useState)(""),X=(0,r.Z)(Y,2),q=X[0],Q=X[1],J=(0,e.useState)(""),$=(0,r.Z)(J,2),ee=$[0],te=$[1],ne=ae().symbol||"";function ie(e){if(!e)return!1;if(e.startsWith("+"))return!1;var t=e.split("-").map(Number),n=(0,r.Z)(t,3),i=n[0],o=n[1],a=n[2];return 5===new Date(Date.UTC(i,o-1,a)).getUTCDay()}var re=(0,e.useCallback)((function(e){console.log("Cell clicked:",e)}),[]);(0,e.useEffect)((function(){var e=function(){var e=Ze((0,_e.Z)().mark((function e(){var t,n,i;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="".concat("https://fintrends-api.onrender.com","/api/symbols"),e.next=3,fetch(t);case 3:if(!(n=e.sent).ok){e.next=11;break}return e.next=7,n.json();case 7:i=e.sent,C(i),e.next=12;break;case 11:console.error("Failed to fetch symbols.");case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[]),(0,e.useMemo)((function(){return document.body}),[]);var se=(0,e.useCallback)((function(){a.current.api.exportDataAsCsv()}),[]);(0,e.useEffect)((function(){var e=function(){return b(window.innerWidth)};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]);var le=function(){var e=Ze((0,_e.Z)().mark((function e(t){var n,r,o,a,s,l;return(0,_e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ne){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,i({audience:"https://uptrenddowntrend.com/api",scope:"openid profile email"});case 5:return n=e.sent,r=t.startsWith("+")?t.substring(1):t,e.next=9,fetch("".concat("https://fintrends-api.onrender.com","/up-percentage/").concat(ne,"/").concat(r),{headers:{Authorization:"Bearer ".concat(n)}});case 9:if((o=e.sent).ok){e.next=12;break}throw new Error("Network response was not ok. Status: ".concat(o.status));case 12:return e.next=14,o.json();case 14:a=e.sent,s=a.findIndex((function(e){return 0!==e.data_id})),a.length-s-1,l=a.map((function(e,t){if(0===e.data_id){var n=t-s;e.market_date="+".concat(n)}return e})),d(l),e.next=24;break;case 21:e.prev=21,e.t0=e.catch(2),console.error("There was a problem with the fetch operation:",e.t0.message);case 24:case"end":return e.stop()}}),e,null,[[2,21]])})));return function(t){return e.apply(this,arguments)}}();(0,e.useEffect)((function(){var e="custom"===R?B:R;e&&le(e)}),[ne,R,B]),(0,e.useEffect)((function(){var e,t=new Date;if("option1"===P)(e=new Date(t)).setMonth(e.getMonth()-2);else if("option2"===P)(e=new Date(t)).setMonth(e.getMonth()-6);else if("option3"===P)(e=new Date(t)).setMonth(e.getMonth()-12);else if("option4"===P&&""!==j){var n=parseInt(j,10);!isNaN(n)&&n>0&&(e=new Date).setDate(e.getDate()-n)}if(e){var i=c.filter((function(t){var n=t.market_date;if(n.startsWith("+"))return!0;var i=n.split("-").map(Number),o=(0,r.Z)(i,3),a=o[0],s=o[1],l=o[2];return new Date(Date.UTC(a,s-1,l))>=e})).sort((function(e,t){return(e.market_date.startsWith("+")?1/0:new Date(e.market_date))-(t.market_date.startsWith("+")?1/0:new Date(t.market_date))}));v(i)}}),[P,j,c]);var ue=function(e){return e>450?[{headerName:"Symbol:",field:"symbol",filter:!0,flex:1,maxWidth:135,cellClass:function(e){return ie(e.data.market_date)?"highlight-friday":""}},{headerName:"Company Name:",field:"company_name",filter:!0,flex:1,maxWidth:250,cellClass:function(e){return ie(e.data.market_date)?"highlight-friday":""}},{headerName:"Market Date:",field:"market_date",filter:!0,flex:1,maxWidth:150,valueFormatter:function(e){var t=e.value;if(t.startsWith("+"))return t;var n=t.split("-").map(Number),i=(0,r.Z)(n,3),o=i[0],a=i[1],s=i[2];return"".concat(a,"/").concat(s,"/").concat(o.toString().slice(-2))},cellClass:function(e){return ie(e.data.market_date)?"highlight-friday":""}},{headerName:"Closing Price:",field:"closing_price",flex:1,maxWidth:150,cellRenderer:function(e){var t=parseFloat(e.data.closing_price).toFixed(2);return(0,dn.jsxs)("div",{children:["$",t]})},cellClass:function(e){return ie(e.data.market_date)?"highlight-friday":""}},{headerName:"Closing Volume:",field:"closing_volume",flex:1,maxWidth:150,cellClass:function(e){return ie(e.data.market_date)?"highlight-friday":""}},{headerName:"Daily Trend:",field:"daily_trend",filter:!0,flex:1,maxWidth:150,cellRenderer:function(e){var t=e.data.daily_trend,n=e.data.trend_relative_percentage,i="#000";return t>0?i="#0ca81e":t<0&&(i="red"),(0,dn.jsxs)("div",{style:{color:i},children:[t," |"," ",(0,dn.jsx)("span",{children:null!=n?"".concat(n,"%"):"N/A"})]})},cellClass:function(e){return ie(e.data.market_date)?"highlight-friday":""}},{headerName:"Smoothed Trend:",field:"smoothed_trend",filter:!0,flex:1,maxWidth:175,cellRenderer:function(e){var t=e.data.smoothed_trend,n=e.data.smoothed_relative_percentage,i="#000";return t>0?i="#0ca81e":t<0&&(i="red"),(0,dn.jsxs)("div",{style:{color:i},children:[t," |"," ",(0,dn.jsx)("span",{children:null!=n?"".concat(n,"%"):"N/A"})]})},cellClass:function(e){return ie(e.data.market_date)?"highlight-friday":""}}]:[{headerName:"Market Date:",field:"market_date",filter:!0,flex:1,maxWidth:150,headerClass:"small-header",valueFormatter:function(e){var t=e.value;if(t.startsWith("+"))return t;var n=t.split("-").map(Number),i=(0,r.Z)(n,3),o=i[0],a=i[1],s=i[2];return"".concat(a,"/").concat(s,"/").concat(o.toString().slice(-2))},cellClass:function(e){return ie(e.data.market_date)?"highlight-friday":""},cellStyle:{fontSize:"10px"}},{headerName:"Closing Price:",field:"closing_price",flex:1,maxWidth:150,headerClass:"small-header",cellRenderer:function(e){var t=parseFloat(e.data.closing_price).toFixed(2);return(0,dn.jsxs)("div",{children:["$",t]})},cellClass:function(e){return ie(e.data.market_date)?"highlight-friday":""},cellStyle:{fontSize:"10px"}},{headerName:"Daily Trend:",field:"daily_trend",filter:!0,flex:1,maxWidth:150,headerClass:"small-header",cellRenderer:function(e){var t=e.data.daily_trend,n=e.data.trend_relative_percentage,i="#000";return t>0?i="#0ca81e":t<0&&(i="red"),(0,dn.jsxs)("div",{style:{fontSize:"10px",color:i},children:[t," |"," ",(0,dn.jsx)("span",{children:null!=n?"".concat(n,"%"):"N/A"})]})},cellClass:function(e){return ie(e.data.market_date)?"highlight-friday":""}},{headerName:"Smoothed Trend:",field:"smoothed_trend",filter:!0,flex:1,maxWidth:150,headerClass:"small-header",cellRenderer:function(e){var t=e.data.smoothed_trend,n=e.data.smoothed_relative_percentage,i="#000";return t>0?i="#0ca81e":t<0&&(i="red"),(0,dn.jsxs)("div",{style:{fontSize:"10px",color:i},children:[t," |"," ",(0,dn.jsx)("span",{children:null!=n?"".concat(n,"%"):"N/A"})]})},cellClass:function(e){return ie(e.data.market_date)?"highlight-friday":""}}]}(S),ce=(0,e.useState)({autoSize:!0,data:[],legend:{enabled:!0,position:"bottom"},series:[{type:"line",xKey:"market_date",yKey:"closing_price",title:"Closing Price",stroke:"#800080",marker:{enabled:!0,size:4,fill:"#800080"}}],axes:[{type:"category",position:"bottom"},{type:"number",position:"left",crossLines:[{value:0,strokeWidth:2,stroke:"#00008B",lineDash:[6,3]}]}]}),de=(0,r.Z)(ce,2),he=de[0],pe=de[1],fe=(0,e.useState)({autoSize:!0,data:[],legend:{enabled:!0,position:"bottom"},series:[{type:"line",xKey:"market_date",yKey:"daily_trend",title:"Daily Trend",stroke:"#FF5349",marker:{enabled:!0,size:4,fill:"#FF5349"}},{type:"line",xKey:"market_date",yKey:"smoothed_trend",title:"Smoothed Trend",stroke:"#FFB427",marker:{enabled:!0,size:4,fill:"#FFB427"}}],axes:[{type:"category",position:"bottom"},{type:"number",position:"left",crossLines:[{value:0,strokeWidth:2,stroke:"#00008B",lineDash:[6,3]}]}]}),ve=(0,r.Z)(fe,2),ge=ve[0],me=ve[1];(0,e.useEffect)((function(){pe((function(e){return Qv(Qv({},e),{},{data:f})}))}),[f]),(0,e.useEffect)((function(){me((function(e){return Qv(Qv({},e),{},{data:f})}))}),[f]);var ye=(0,e.useMemo)((function(){return{sortable:!0}}),[]),Ce=ne.toUpperCase(),ke=y.map((function(e){return e.symbol})),we=0,Se=0,be=0,Ee=0,xe=0,Re=0;if(!(c.length>0))return null;var De=c.slice(0,65);we=Math.max.apply(Math,(0,o.Z)(De.map((function(e){return e.daily_trend})))),Se=Math.min.apply(Math,(0,o.Z)(De.map((function(e){return e.daily_trend})))),be=Math.max.apply(Math,(0,o.Z)(De.map((function(e){return e.smoothed_trend})))),Ee=Math.min.apply(Math,(0,o.Z)(De.map((function(e){return e.smoothed_trend}))));var Te,Oe,Pe=De[0];if(Pe){var Ae=Pe.daily_trend;Ae>0?xe=(Ae/we*100).toFixed(2):Ae<0&&(xe=(Ae/Se*100).toFixed(2));var Me=Pe.smoothed_trend;Me>0?Re=(Me/be*100).toFixed(2):Me<0&&(Re=(Me/Ee*100).toFixed(2))}return n?(0,dn.jsx)("div",{children:"Loading ..."}):ke.includes(Ce)?(0,dn.jsx)(dn.Fragment,{children:(0,dn.jsxs)("div",{className:"symbol-details-main",style:{display:"flex",position:"relative",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[(0,dn.jsxs)("div",{style:{color:"white",display:"flex",alignItems:"center",justifyContent:"center",minWidth:"45%"},children:[y.map((function(e){return e.symbol===Ce?(0,dn.jsx)("div",{className:"symbol_items_container",children:(0,dn.jsxs)("ul",{className:"symbol_items",children:[(0,dn.jsx)("li",{className:"symbol_title",children:e.symbol}),(0,dn.jsx)("li",{className:"symbol_cp_name",children:e.company_name}),(0,dn.jsx)("li",{className:"symbol_exchange",children:e.exchange}),(0,dn.jsx)("li",{className:"symbol_link",children:e.website?(0,dn.jsx)("a",{href:e.website,target:"_blank",rel:"noopener noreferrer",children:e.website}):"No Website Available"})]})},e.symbol):null})),S>450?(0,dn.jsxs)("div",{style:(Te={display:"flex",flexDirection:"space-around",color:"white",border:"1px solid white",minWidth:"15%",padding:"1rem",borderRadius:"5px",justifyContent:"center"},(0,Ve.Z)(Te,"flexDirection","column"),(0,Ve.Z)(Te,"height","142px"),Te),children:[(0,dn.jsx)("div",{style:{textTransform:"uppercase",color:"#00b1ff"},children:"Uptrend_Downtrend Predictors:"}),(0,dn.jsxs)("div",{style:{display:"flex",justifyContent:"center"},children:[(0,dn.jsxs)("div",{style:{marginRight:".5rem"},children:[(0,dn.jsx)("h3",{style:{textDecoration:"underline"},children:"Daily Trend"}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Current: ",(0,dn.jsx)("span",{style:{marginLeft:"2px",color:c[0].daily_trend>0?"#0ca81e":"#ff0e0e"},children:c[0].daily_trend})]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["High: ",we]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Low: ",Se]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Relative Percentage: ",(0,dn.jsxs)("span",{style:{marginLeft:"2px",color:c[0].daily_trend>0?"#0ca81e":"#ff0e0e"},children:[xe,"%"]})]})]}),(0,dn.jsxs)("div",{style:{marginLeft:".5rem"},children:[(0,dn.jsx)("h3",{style:{textDecoration:"underline"},children:"Smoothed Trend"}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Current: ",(0,dn.jsx)("span",{style:{marginLeft:"2px",color:c[0].smoothed_trend>0?"#0ca81e":"#ff0e0e"},children:c[0].smoothed_trend})]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["High: ",be]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Low: ",Ee]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Relative Percentage: ",(0,dn.jsxs)("span",{style:{marginLeft:"2px",color:c[0].smoothed_trend>0?"#0ca81e":"#ff0e0e"},children:[Re,"%"]})]})]})]})]}):null]}),S<450?(0,dn.jsxs)("div",{style:(0,Ve.Z)({display:"flex",flexDirection:"space-around",color:"white",border:"1px solid white",minWidth:"30%",padding:"1rem",borderRadius:"5px",marginBottom:"1rem",justifyContent:"center"},"flexDirection","column"),children:[(0,dn.jsx)("div",{style:{textTransform:"uppercase",color:"#00b1ff"},children:"Uptrend_Downtrend Predictors:"}),(0,dn.jsxs)("div",{style:{padding:".5rem"},children:[(0,dn.jsx)("h3",{style:{textDecoration:"underline"},children:"Daily Trend"}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Current:  ",(0,dn.jsx)("span",{style:{marginLeft:"2px",color:c[0].daily_trend>0?"#0ca81e":"#ff0e0e"},children:c[0].daily_trend})]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["High: ",we]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Low: ",Se]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Relative Percentage: ",(0,dn.jsxs)("span",{style:{marginLeft:"2px",color:c[0].daily_trend>0?"#0ca81e":"#ff0e0e"},children:[xe,"%"]})]})]}),(0,dn.jsxs)("div",{style:{padding:".5rem"},children:[(0,dn.jsx)("h3",{style:{textDecoration:"underline"},children:"Smoothed Trend"}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Current: ",(0,dn.jsx)("span",{style:{marginLeft:"2px",color:c[0].smoothed_trend>0?"#0ca81e":"#ff0e0e"},children:c[0].smoothed_trend})]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["High: ",be]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Low: ",Ee]}),(0,dn.jsxs)("h6",{style:{display:"flex",fontSize:"10px"},children:["Relative Percentage: ",(0,dn.jsxs)("span",{style:{marginLeft:"2px",color:c[0].smoothed_trend>0?"#0ca81e":"#ff0e0e"},children:[Re,"%"]})]})]})]}):null,(0,dn.jsxs)("div",{style:(Oe={display:"flex",flexDirection:"space-around",color:"white",border:"1px solid white",minWidth:"15%",padding:"1rem",borderRadius:"5px",justifyContent:"center"},(0,Ve.Z)(Oe,"flexDirection","column"),(0,Ve.Z)(Oe,"height","142px"),(0,Ve.Z)(Oe,"marginBottom","0.5rem"),Oe),children:[(0,dn.jsx)("div",{style:{textTransform:"uppercase",color:"#00b1ff"},children:"Predictor Control Panel:"}),(0,dn.jsx)("div",{style:{textTransform:"uppercase",textSize:"8px"},children:"Price by Percentage:"}),(0,dn.jsxs)("div",{style:{display:"flex",marginLeft:"0.5rem"},children:[(0,dn.jsx)("input",{type:"radio",id:"0",name:"percentageOptions",value:"0",style:{marginRight:".2rem"},onChange:function(){return D("0")},checked:"0"===R}),(0,dn.jsx)("label",{htmlFor:"0",style:{color:"white",marginRight:".5rem",backgroundColor:"#134f42",padding:"0.2rem 0.5rem",borderRadius:"5px"},children:"0%"}),(0,dn.jsx)("input",{type:"radio",id:"+1",name:"percentageOptions",value:"+1",style:{marginRight:".2rem"},onChange:function(){return D("+1")},checked:"+1"===R}),(0,dn.jsx)("label",{htmlFor:"+1",style:{color:"white",marginRight:".5rem",backgroundColor:"#134f42",padding:"0.2rem 0.5rem",borderRadius:"5px"},children:"+1%"}),(0,dn.jsx)("input",{type:"radio",id:"-1",name:"percentageOptions",value:"-1",style:{marginRight:".2rem"},onChange:function(){return D("-1")},checked:"-1"===R}),(0,dn.jsx)("label",{htmlFor:"-1",style:{color:"white",marginRight:".5rem",backgroundColor:"#134f42",padding:"0.2rem 0.5rem",borderRadius:"5px"},children:"-1%"}),(0,dn.jsx)("input",{type:"radio",id:"custom",name:"percentageOptions",value:"custom",style:{marginRight:".2rem"},onChange:function(){return D("custom")},checked:"custom"===R}),(0,dn.jsx)("input",{type:"text",id:"custom",placeholder:"Custom %",name:"percentageOptions",value:B,style:{marginRight:".2rem",color:"black",borderRadius:"2px"},onChange:function(e){var t=e.target.value;/^-?\d*\.?\d*$/.test(t)&&W(t)},onClick:function(){return D("custom")}})]}),(0,dn.jsxs)("div",{style:{display:"flex",justifyContent:"center"},children:[(0,dn.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",marginRight:".5rem"},children:[(0,dn.jsx)("label",{style:{textTransform:"uppercase",textSize:"8px",marginBottom:".2rem"},children:"Custom Price:"}),(0,dn.jsx)("input",{type:"text",id:"customprice",placeholder:"Custom $",name:"priceOptions",value:q,style:{marginRight:".2rem",color:"black",borderRadius:"2px",width:"66%"},onChange:function(e){var t=e.target.value;/^\d*\.?\d*$/.test(t)&&Q(t)},onClick:function(){return D("custom")}})]}),(0,dn.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,dn.jsx)("label",{style:{textTransform:"uppercase",textSize:"8px",marginBottom:".2rem"},children:"Custom Volume:"}),(0,dn.jsx)("input",{type:"text",id:"customvolume",placeholder:"Custom Volume",name:"volumeOptions",value:ee,style:{marginRight:".2rem",color:"black",borderRadius:"2px",width:"66%"},onChange:function(e){var t=e.target.value;/^\d*$/.test(t)&&te(t)},onClick:function(){return D("custom")}})]})]})]}),(0,dn.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:".5rem"},children:[(0,dn.jsxs)("div",{style:{position:"relative",marginRight:"1rem"},children:[(0,dn.jsx)("input",{type:"text",placeholder:"Jump to Symbol",value:L,onChange:function(e){var t=e.target.value.toUpperCase();if(I(t),t.length>0){var n=y.filter((function(e){return e.symbol.startsWith(t)})).slice(0,5);Z(n)}else Z([])},style:{color:"black",padding:"0.5rem",borderRadius:"5px",width:"150px",marginBottom:"0.5rem"}}),G.length>0&&(0,dn.jsx)("ul",{style:{listStyleType:"none",padding:0,margin:0,position:"absolute",top:"100%",left:0,width:"150px",backgroundColor:"white",zIndex:1e3,border:"1px solid #ccc",borderRadius:"5px"},children:G.map((function(e){return(0,dn.jsx)("li",{onClick:function(){return function(e){I(e),Z([]),s("/predictor/".concat(e))}(e.symbol)},style:{padding:"0.5rem",cursor:"pointer"},children:e.symbol},e.symbol)}))})]}),(0,dn.jsx)("button",{style:{color:"white",border:"1px solid white",padding:".3rem",borderRadius:"5px",backgroundColor:"#134f42",marginRight:"0.5rem"},onClick:function(){return s("/details/".concat(ne))},children:"Return to Details"}),(0,dn.jsx)("button",{style:{color:"white",border:"1px solid white",padding:".3rem",borderRadius:"5px",backgroundColor:"#134f42"},onClick:se,children:"Export as CSV"})]}),S>450?(0,dn.jsx)("div",{className:"ag-theme-alpine",style:{width:"80%",maxWidth:"1110px",height:"calc(100vh - 370px)",overflowX:"auto",marginBottom:".5rem"},children:(0,dn.jsx)(Kv,{ref:a,rowData:c,columnDefs:ue,defaultColDef:ye,animateRows:!0,rowSelection:"multiple",rowMultiSelectWithClick:!0,cellSelection:!0,enableCellTextSelection:!0,ensureDomOrder:!0,onCellClicked:re})}):(0,dn.jsx)("div",{className:"ag-theme-alpine",style:{width:"80%",height:"calc(100vh - 470px)",overflowX:"auto",marginBottom:".5rem",fontSize:"14px"},children:(0,dn.jsx)(Kv,{ref:a,rowData:c,columnDefs:ue,defaultColDef:ye,animateRows:!0,rowSelection:"multiple",rowMultiSelectWithClick:!0,cellSelection:!0,enableCellTextSelection:!0,ensureDomOrder:!0,onCellClicked:re})}),(0,dn.jsx)("div",{style:{color:"white"},children:(0,dn.jsxs)("div",{className:"details-container",children:[(0,dn.jsx)("div",{className:"ag-theme-alpine details-grid"}),(0,dn.jsxs)("div",{style:{display:"flex",justifyContent:"flex-start",fontSize:"15px",marginLeft:".5rem"},children:[(0,dn.jsxs)("div",{children:[(0,dn.jsx)("input",{type:"radio",id:"option1",name:"chartOptions",value:"option1",style:{marginRight:".2rem"},onChange:function(){return A("option1")},checked:"option1"===P}),(0,dn.jsx)("label",{htmlFor:"option1",style:{marginRight:".5rem"},children:"Previous Month"})]}),(0,dn.jsxs)("div",{children:[(0,dn.jsx)("input",{type:"radio",id:"option2",name:"chartOptions",value:"option2",style:{marginRight:".2rem"},onChange:function(){return A("option2")},checked:"option2"===P}),(0,dn.jsx)("label",{htmlFor:"option2",style:{marginRight:".5rem"},children:"Previous 6 Months"})]}),(0,dn.jsxs)("div",{children:[(0,dn.jsx)("input",{type:"radio",id:"option3",name:"chartOptions",value:"option3",style:{marginRight:".2rem"},onChange:function(){return A("option3")},checked:"option3"===P}),(0,dn.jsx)("label",{htmlFor:"option3",style:{marginRight:".5rem"},children:"Previous Year"})]}),(0,dn.jsxs)("div",{children:[(0,dn.jsx)("input",{type:"radio",id:"option4",name:"chartOptions",value:"option4",style:{marginRight:".2rem"},onChange:function(){return A("option4")},checked:"option4"===P}),(0,dn.jsx)("input",{type:"text",id:"option4",placeholder:"Enter Days",name:"chartOptions",value:j,style:{marginRight:".2rem",color:"black",borderRadius:"2px"},onChange:function(e){return K(e.target.value)},onClick:function(){return A("option4")}})]})]}),(0,dn.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,dn.jsxs)("div",{className:"details-chart",style:{display:"flex",marginBottom:"1rem"},children:[(0,dn.jsx)("div",{style:{margin:".5rem"},children:(0,dn.jsx)(Jv.AgChartsReact,{options:he})}),(0,dn.jsx)("div",{style:{margin:".5rem"},children:(0,dn.jsx)(Jv.AgChartsReact,{options:ge})})]})})]})})]})}):(0,dn.jsx)(dn.Fragment,{children:(0,dn.jsxs)("div",{className:"error-container",children:[(0,dn.jsx)("div",{style:{display:"flex",textAlign:"center",justifyContent:"Center",paddingTop:"2rem",color:"white",fontSize:"2rem"},children:"SYMBOL DOES NOT EXIST"}),(0,dn.jsxs)("div",{style:{display:"flex",textAlign:"center",justifyContent:"Center",paddingTop:"2rem",color:"white",flexDirection:"column",alignItems:"center"},children:[(0,dn.jsx)("h6",{children:"Would you like to add this symbol?"}),(0,dn.jsx)("button",{className:"no-symbol-btn",style:{border:"1px solid white",maxWidth:"9rem",padding:".7rem",borderRadius:"5px",marginTop:".5rem"},children:(0,dn.jsx)(Ne,{to:"/dashboard/controlpanel",children:"ADD SYMBOL"})})]}),(0,dn.jsxs)("div",{style:{display:"flex",textAlign:"center",justifyContent:"Center",paddingTop:"2rem",color:"white",flexDirection:"column",alignItems:"center"},children:[(0,dn.jsx)("h6",{children:"Search for a different symbol"}),(0,dn.jsx)("button",{className:"no-symbol-btn",style:{border:"1px solid white",maxWidth:"12rem",padding:".8rem",borderRadius:"5px",marginTop:".5rem"},children:(0,dn.jsx)(Ne,{to:"/details",children:"SEARCH SYMBOL"})})]})]})})};var og=function(){return sn().isLoading?(0,dn.jsx)("div",{className:"page-layout",children:(0,dn.jsx)(hn,{})}):(0,dn.jsxs)("div",{children:[(0,dn.jsx)(gn,{}),(0,dn.jsxs)(Se,{children:[(0,dn.jsx)(ke,{path:"/",element:(0,dn.jsx)(fn,{})}),(0,dn.jsx)(ke,{path:"/dashboard/controlpanel",element:(0,dn.jsx)(pn,{component:ng})}),(0,dn.jsx)(ke,{path:"/dashboard",element:(0,dn.jsx)(pn,{component:tg})}),(0,dn.jsx)(ke,{path:"/symbols",element:(0,dn.jsx)(pn,{component:Yv})}),(0,dn.jsx)(ke,{path:"/details/:symbol",element:(0,dn.jsx)(pn,{component:$v})}),(0,dn.jsx)(ke,{path:"/details/",element:(0,dn.jsx)(pn,{component:Xv})}),(0,dn.jsx)(ke,{path:"/create",element:(0,dn.jsx)(pn,{component:eg})}),(0,dn.jsx)(ke,{path:"/collections",element:(0,dn.jsx)(pn,{component:ig})}),(0,dn.jsx)(ke,{path:"/predictor/:symbol",element:(0,dn.jsx)(pn,{component:rg})})]})]})},ag=function(e){var t=e.children,n=e.domain,i=e.clientId,r=(e.redirectUri,e.audience),o=e.scope,a=oe();return n&&i?(0,dn.jsx)(an,{domain:"dev-5iwebxep5xv6ftg6.us.auth0.com",clientId:"Lj514anYL4lBRGdFY3spoNHybMC1KTUU",onRedirectCallback:function(e){a((null===e||void 0===e?void 0:e.returnTo)||window.location.pathname)},authorizationParams:{redirect_uri:"https://uptrenddowntrend.com/dashboard",audience:r,scope:o},children:t}):null},sg=document.getElementById("root");(0,i.s)(sg).render((0,dn.jsx)(e.StrictMode,{children:(0,dn.jsx)(Pe,{children:(0,dn.jsx)(ag,{domain:"dev-5iwebxep5xv6ftg6.us.auth0.com",clientId:"Lj514anYL4lBRGdFY3spoNHybMC1KTUU",redirectUri:"https://uptrenddowntrend.com/dashboard",audience:"https://uptrenddowntrend.com/api",scope:"openid profile email",children:(0,dn.jsx)(og,{})})})}))}()}();
//# sourceMappingURL=main.3746d617.js.map