fixtureqa 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fixture/__init__.py +22 -0
- fixture/__main__.py +161 -0
- fixture/api/__init__.py +0 -0
- fixture/api/app.py +95 -0
- fixture/api/connection_manager.py +161 -0
- fixture/api/deps.py +73 -0
- fixture/api/routers/__init__.py +0 -0
- fixture/api/routers/admin.py +178 -0
- fixture/api/routers/auth.py +74 -0
- fixture/api/routers/branding.py +33 -0
- fixture/api/routers/fix_spec.py +41 -0
- fixture/api/routers/messages.py +137 -0
- fixture/api/routers/scenarios.py +65 -0
- fixture/api/routers/sessions.py +272 -0
- fixture/api/routers/setup.py +42 -0
- fixture/api/routers/templates.py +36 -0
- fixture/api/routers/ws.py +129 -0
- fixture/api/schemas.py +289 -0
- fixture/config/__init__.py +0 -0
- fixture/core/__init__.py +0 -0
- fixture/core/auth.py +68 -0
- fixture/core/config_store.py +85 -0
- fixture/core/events.py +22 -0
- fixture/core/fix_application.py +67 -0
- fixture/core/fix_parser.py +79 -0
- fixture/core/fix_spec_parser.py +172 -0
- fixture/core/fix_tags.py +297 -0
- fixture/core/housekeeping.py +107 -0
- fixture/core/message_log.py +115 -0
- fixture/core/message_store.py +246 -0
- fixture/core/models.py +87 -0
- fixture/core/scenario_runner.py +331 -0
- fixture/core/scenario_store.py +70 -0
- fixture/core/session.py +278 -0
- fixture/core/session_manager.py +173 -0
- fixture/core/template_store.py +70 -0
- fixture/core/user_store.py +186 -0
- fixture/core/venue_responses.py +94 -0
- fixture/fix_specs/FIX42.xml +2746 -0
- fixture/fix_specs/FIX44.xml +6593 -0
- fixture/server.py +37 -0
- fixture/static/assets/ag-grid-_QKprVdm.js +326 -0
- fixture/static/assets/index-B31-1dt-.css +1 -0
- fixture/static/assets/index-CTsKxGdI.js +87 -0
- fixture/static/assets/react-vendor-2eF0YfZT.js +1 -0
- fixture/static/favicon.svg +12 -0
- fixture/static/index.html +15 -0
- fixture/ui/__init__.py +0 -0
- fixtureqa-0.1.0.dist-info/METADATA +16 -0
- fixtureqa-0.1.0.dist-info/RECORD +54 -0
- fixtureqa-0.1.0.dist-info/WHEEL +5 -0
- fixtureqa-0.1.0.dist-info/entry_points.txt +2 -0
- fixtureqa-0.1.0.dist-info/licenses/LICENSE +21 -0
- fixtureqa-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
function MD(e,t){for(var i=0;i<t.length;i++){const s=t[i];if(typeof s!="string"&&!Array.isArray(s)){for(const n in s)if(n!=="default"&&!(n in e)){const o=Object.getOwnPropertyDescriptor(s,n);o&&Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>s[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function _w(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ow={exports:{}},ue={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Ga=Symbol.for("react.element"),ID=Symbol.for("react.portal"),xD=Symbol.for("react.fragment"),ND=Symbol.for("react.strict_mode"),_D=Symbol.for("react.profiler"),OD=Symbol.for("react.provider"),GD=Symbol.for("react.context"),kD=Symbol.for("react.forward_ref"),VD=Symbol.for("react.suspense"),HD=Symbol.for("react.memo"),BD=Symbol.for("react.lazy"),cC=Symbol.iterator;function WD(e){return e===null||typeof e!="object"?null:(e=cC&&e[cC]||e["@@iterator"],typeof e=="function"?e:null)}var Gw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},kw=Object.assign,Vw={};function Br(e,t,i){this.props=e,this.context=t,this.refs=Vw,this.updater=i||Gw}Br.prototype.isReactComponent={};Br.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)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")};Br.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Hw(){}Hw.prototype=Br.prototype;function Wg(e,t,i){this.props=e,this.context=t,this.refs=Vw,this.updater=i||Gw}var Ug=Wg.prototype=new Hw;Ug.constructor=Wg;kw(Ug,Br.prototype);Ug.isPureReactComponent=!0;var hC=Array.isArray,Bw=Object.prototype.hasOwnProperty,zg={current:null},Ww={key:!0,ref:!0,__self:!0,__source:!0};function Uw(e,t,i){var s,n={},o=null,r=null;if(t!=null)for(s in t.ref!==void 0&&(r=t.ref),t.key!==void 0&&(o=""+t.key),t)Bw.call(t,s)&&!Ww.hasOwnProperty(s)&&(n[s]=t[s]);var l=arguments.length-2;if(l===1)n.children=i;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];n.children=a}if(e&&e.defaultProps)for(s in l=e.defaultProps,l)n[s]===void 0&&(n[s]=l[s]);return{$$typeof:Ga,type:e,key:o,ref:r,props:n,_owner:zg.current}}function UD(e,t){return{$$typeof:Ga,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function $g(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ga}function zD(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(i){return t[i]})}var pC=/\/+/g;function hh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?zD(""+e.key):t.toString(36)}function Iu(e,t,i,s,n){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var r=!1;if(e===null)r=!0;else switch(o){case"string":case"number":r=!0;break;case"object":switch(e.$$typeof){case Ga:case ID:r=!0}}if(r)return r=e,n=n(r),e=s===""?"."+hh(r,0):s,hC(n)?(i="",e!=null&&(i=e.replace(pC,"$&/")+"/"),Iu(n,t,i,"",function(u){return u})):n!=null&&($g(n)&&(n=UD(n,i+(!n.key||r&&r.key===n.key?"":(""+n.key).replace(pC,"$&/")+"/")+e)),t.push(n)),1;if(r=0,s=s===""?".":s+":",hC(e))for(var l=0;l<e.length;l++){o=e[l];var a=s+hh(o,l);r+=Iu(o,t,i,a,n)}else if(a=WD(e),typeof a=="function")for(e=a.call(e),l=0;!(o=e.next()).done;)o=o.value,a=s+hh(o,l++),r+=Iu(o,t,i,a,n);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return r}function au(e,t,i){if(e==null)return e;var s=[],n=0;return Iu(e,s,"","",function(o){return t.call(i,o,n++)}),s}function $D(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(i){(e._status===0||e._status===-1)&&(e._status=1,e._result=i)},function(i){(e._status===0||e._status===-1)&&(e._status=2,e._result=i)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Vt={current:null},xu={transition:null},KD={ReactCurrentDispatcher:Vt,ReactCurrentBatchConfig:xu,ReactCurrentOwner:zg};function zw(){throw Error("act(...) is not supported in production builds of React.")}ue.Children={map:au,forEach:function(e,t,i){au(e,function(){t.apply(this,arguments)},i)},count:function(e){var t=0;return au(e,function(){t++}),t},toArray:function(e){return au(e,function(t){return t})||[]},only:function(e){if(!$g(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ue.Component=Br;ue.Fragment=xD;ue.Profiler=_D;ue.PureComponent=Wg;ue.StrictMode=ND;ue.Suspense=VD;ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=KD;ue.act=zw;ue.cloneElement=function(e,t,i){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var s=kw({},e.props),n=e.key,o=e.ref,r=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,r=zg.current),t.key!==void 0&&(n=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)Bw.call(t,a)&&!Ww.hasOwnProperty(a)&&(s[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)s.children=i;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}return{$$typeof:Ga,type:e.type,key:n,ref:o,props:s,_owner:r}};ue.createContext=function(e){return e={$$typeof:GD,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:OD,_context:e},e.Consumer=e};ue.createElement=Uw;ue.createFactory=function(e){var t=Uw.bind(null,e);return t.type=e,t};ue.createRef=function(){return{current:null}};ue.forwardRef=function(e){return{$$typeof:kD,render:e}};ue.isValidElement=$g;ue.lazy=function(e){return{$$typeof:BD,_payload:{_status:-1,_result:e},_init:$D}};ue.memo=function(e,t){return{$$typeof:HD,type:e,compare:t===void 0?null:t}};ue.startTransition=function(e){var t=xu.transition;xu.transition={};try{e()}finally{xu.transition=t}};ue.unstable_act=zw;ue.useCallback=function(e,t){return Vt.current.useCallback(e,t)};ue.useContext=function(e){return Vt.current.useContext(e)};ue.useDebugValue=function(){};ue.useDeferredValue=function(e){return Vt.current.useDeferredValue(e)};ue.useEffect=function(e,t){return Vt.current.useEffect(e,t)};ue.useId=function(){return Vt.current.useId()};ue.useImperativeHandle=function(e,t,i){return Vt.current.useImperativeHandle(e,t,i)};ue.useInsertionEffect=function(e,t){return Vt.current.useInsertionEffect(e,t)};ue.useLayoutEffect=function(e,t){return Vt.current.useLayoutEffect(e,t)};ue.useMemo=function(e,t){return Vt.current.useMemo(e,t)};ue.useReducer=function(e,t,i){return Vt.current.useReducer(e,t,i)};ue.useRef=function(e){return Vt.current.useRef(e)};ue.useState=function(e){return Vt.current.useState(e)};ue.useSyncExternalStore=function(e,t,i){return Vt.current.useSyncExternalStore(e,t,i)};ue.useTransition=function(){return Vt.current.useTransition()};ue.version="18.3.1";Ow.exports=ue;var S=Ow.exports;const _=_w(S),bN=MD({__proto__:null,default:_},[S]);var $w={exports:{}},Ei={},Kw={exports:{}},jw={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* scheduler.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/(function(e){function t(O,V){var W=O.length;O.push(V);e:for(;0<W;){var te=W-1>>>1,X=O[te];if(0<n(X,V))O[te]=V,O[W]=X,W=te;else break e}}function i(O){return O.length===0?null:O[0]}function s(O){if(O.length===0)return null;var V=O[0],W=O.pop();if(W!==V){O[0]=W;e:for(var te=0,X=O.length,Ce=X>>>1;te<Ce;){var dt=2*(te+1)-1,ve=O[dt],et=dt+1,ze=O[et];if(0>n(ve,W))et<X&&0>n(ze,ve)?(O[te]=ze,O[et]=W,te=et):(O[te]=ve,O[dt]=W,te=dt);else if(et<X&&0>n(ze,W))O[te]=ze,O[et]=W,te=et;else break e}}return V}function n(O,V){var W=O.sortIndex-V.sortIndex;return W!==0?W:O.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var r=Date,l=r.now();e.unstable_now=function(){return r.now()-l}}var a=[],u=[],d=1,h=null,p=3,C=!1,v=!1,y=!1,R=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(O){for(var V=i(u);V!==null;){if(V.callback===null)s(u);else if(V.startTime<=O)s(u),V.sortIndex=V.expirationTime,t(a,V);else break;V=i(u)}}function T(O){if(y=!1,E(O),!v)if(i(a)!==null)v=!0,De(P);else{var V=i(u);V!==null&&me(T,V.startTime-O)}}function P(O,V){v=!1,y&&(y=!1,w(I),I=-1),C=!0;var W=p;try{for(E(V),h=i(a);h!==null&&(!(h.expirationTime>V)||O&&!U());){var te=h.callback;if(typeof te=="function"){h.callback=null,p=h.priorityLevel;var X=te(h.expirationTime<=V);V=e.unstable_now(),typeof X=="function"?h.callback=X:h===i(a)&&s(a),E(V)}else s(a);h=i(a)}if(h!==null)var Ce=!0;else{var dt=i(u);dt!==null&&me(T,dt.startTime-V),Ce=!1}return Ce}finally{h=null,p=W,C=!1}}var A=!1,F=null,I=-1,x=5,k=-1;function U(){return!(e.unstable_now()-k<x)}function ee(){if(F!==null){var O=e.unstable_now();k=O;var V=!0;try{V=F(!0,O)}finally{V?Y():(A=!1,F=null)}}else A=!1}var Y;if(typeof m=="function")Y=function(){m(ee)};else if(typeof MessageChannel<"u"){var ye=new MessageChannel,Re=ye.port2;ye.port1.onmessage=ee,Y=function(){Re.postMessage(null)}}else Y=function(){R(ee,0)};function De(O){F=O,A||(A=!0,Y())}function me(O,V){I=R(function(){O(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_continueExecution=function(){v||C||(v=!0,De(P))},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):x=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return i(a)},e.unstable_next=function(O){switch(p){case 1:case 2:case 3:var V=3;break;default:V=p}var W=p;p=V;try{return O()}finally{p=W}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,V){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var W=p;p=O;try{return V()}finally{p=W}},e.unstable_scheduleCallback=function(O,V,W){var te=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?te+W:te):W=te,O){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=W+X,O={id:d++,callback:V,priorityLevel:O,startTime:W,expirationTime:X,sortIndex:-1},W>te?(O.sortIndex=W,t(u,O),i(a)===null&&O===i(u)&&(y?(w(I),I=-1):y=!0,me(T,W-te))):(O.sortIndex=X,t(a,O),v||C||(v=!0,De(P))),O},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(O){var V=p;return function(){var W=p;p=V;try{return O.apply(this,arguments)}finally{p=W}}}})(jw);Kw.exports=jw;var jD=Kw.exports;/**
|
|
18
|
+
* @license React
|
|
19
|
+
* react-dom.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var YD=S,wi=jD;function G(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Yw=new Set,zl={};function Fo(e,t){vr(e,t),vr(e+"Capture",t)}function vr(e,t){for(zl[e]=t,e=0;e<t.length;e++)Yw.add(t[e])}var xs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cp=Object.prototype.hasOwnProperty,QD=/^[: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]*$/,gC={},fC={};function qD(e){return cp.call(fC,e)?!0:cp.call(gC,e)?!1:QD.test(e)?fC[e]=!0:(gC[e]=!0,!1)}function XD(e,t,i,s){if(i!==null&&i.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return s?!1:i!==null?!i.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ZD(e,t,i,s){if(t===null||typeof t>"u"||XD(e,t,i,s))return!0;if(s)return!1;if(i!==null)switch(i.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ht(e,t,i,s,n,o,r){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=n,this.mustUseProperty=i,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=r}var St={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){St[e]=new Ht(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];St[t]=new Ht(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){St[e]=new Ht(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){St[e]=new Ht(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){St[e]=new Ht(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){St[e]=new Ht(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){St[e]=new Ht(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){St[e]=new Ht(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){St[e]=new Ht(e,5,!1,e.toLowerCase(),null,!1,!1)});var Kg=/[\-:]([a-z])/g;function jg(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(Kg,jg);St[t]=new Ht(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(Kg,jg);St[t]=new Ht(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(Kg,jg);St[t]=new Ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){St[e]=new Ht(e,1,!1,e.toLowerCase(),null,!1,!1)});St.xlinkHref=new Ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){St[e]=new Ht(e,1,!1,e.toLowerCase(),null,!0,!0)});function Yg(e,t,i,s){var n=St.hasOwnProperty(t)?St[t]:null;(n!==null?n.type!==0:s||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(ZD(t,i,n,s)&&(i=null),s||n===null?qD(t)&&(i===null?e.removeAttribute(t):e.setAttribute(t,""+i)):n.mustUseProperty?e[n.propertyName]=i===null?n.type===3?!1:"":i:(t=n.attributeName,s=n.attributeNamespace,i===null?e.removeAttribute(t):(n=n.type,i=n===3||n===4&&i===!0?"":""+i,s?e.setAttributeNS(s,t,i):e.setAttribute(t,i))))}var Bs=YD.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,uu=Symbol.for("react.element"),Qo=Symbol.for("react.portal"),qo=Symbol.for("react.fragment"),Qg=Symbol.for("react.strict_mode"),hp=Symbol.for("react.profiler"),Qw=Symbol.for("react.provider"),qw=Symbol.for("react.context"),qg=Symbol.for("react.forward_ref"),pp=Symbol.for("react.suspense"),gp=Symbol.for("react.suspense_list"),Xg=Symbol.for("react.memo"),Js=Symbol.for("react.lazy"),Xw=Symbol.for("react.offscreen"),mC=Symbol.iterator;function ul(e){return e===null||typeof e!="object"?null:(e=mC&&e[mC]||e["@@iterator"],typeof e=="function"?e:null)}var Ue=Object.assign,ph;function vl(e){if(ph===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);ph=t&&t[1]||""}return`
|
|
26
|
+
`+ph+e}var gh=!1;function fh(e,t){if(!e||gh)return"";gh=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var s=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){s=u}e.call(t.prototype)}else{try{throw Error()}catch(u){s=u}e()}}catch(u){if(u&&s&&typeof u.stack=="string"){for(var n=u.stack.split(`
|
|
27
|
+
`),o=s.stack.split(`
|
|
28
|
+
`),r=n.length-1,l=o.length-1;1<=r&&0<=l&&n[r]!==o[l];)l--;for(;1<=r&&0<=l;r--,l--)if(n[r]!==o[l]){if(r!==1||l!==1)do if(r--,l--,0>l||n[r]!==o[l]){var a=`
|
|
29
|
+
`+n[r].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=r&&0<=l);break}}}finally{gh=!1,Error.prepareStackTrace=i}return(e=e?e.displayName||e.name:"")?vl(e):""}function JD(e){switch(e.tag){case 5:return vl(e.type);case 16:return vl("Lazy");case 13:return vl("Suspense");case 19:return vl("SuspenseList");case 0:case 2:case 15:return e=fh(e.type,!1),e;case 11:return e=fh(e.type.render,!1),e;case 1:return e=fh(e.type,!0),e;default:return""}}function fp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case qo:return"Fragment";case Qo:return"Portal";case hp:return"Profiler";case Qg:return"StrictMode";case pp:return"Suspense";case gp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qw:return(e.displayName||"Context")+".Consumer";case Qw:return(e._context.displayName||"Context")+".Provider";case qg:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Xg:return t=e.displayName||null,t!==null?t:fp(e.type)||"Memo";case Js:t=e._payload,e=e._init;try{return fp(e(t))}catch{}}return null}function eP(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=t.render,e=e.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 fp(t);case 8:return t===Qg?"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(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function vn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Zw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function tP(e){var t=Zw(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var n=i.get,o=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(r){s=""+r,o.call(this,r)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return s},setValue:function(r){s=""+r},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function du(e){e._valueTracker||(e._valueTracker=tP(e))}function Jw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Zw(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function ad(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function mp(e,t){var i=t.checked;return Ue({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??e._wrapperState.initialChecked})}function CC(e,t){var i=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;i=vn(t.value!=null?t.value:i),e._wrapperState={initialChecked:s,initialValue:i,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ey(e,t){t=t.checked,t!=null&&Yg(e,"checked",t,!1)}function Cp(e,t){ey(e,t);var i=vn(t.value),s=t.type;if(i!=null)s==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+i):e.value!==""+i&&(e.value=""+i);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?vp(e,t.type,i):t.hasOwnProperty("defaultValue")&&vp(e,t.type,vn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function vC(e,t,i){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!(s!=="submit"&&s!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,i||t===e.value||(e.value=t),e.defaultValue=t}i=e.name,i!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,i!==""&&(e.name=i)}function vp(e,t,i){(t!=="number"||ad(e.ownerDocument)!==e)&&(i==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}var wl=Array.isArray;function ur(e,t,i,s){if(e=e.options,t){t={};for(var n=0;n<i.length;n++)t["$"+i[n]]=!0;for(i=0;i<e.length;i++)n=t.hasOwnProperty("$"+e[i].value),e[i].selected!==n&&(e[i].selected=n),n&&s&&(e[i].defaultSelected=!0)}else{for(i=""+vn(i),t=null,n=0;n<e.length;n++){if(e[n].value===i){e[n].selected=!0,s&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function wp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(G(91));return Ue({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function wC(e,t){var i=t.value;if(i==null){if(i=t.children,t=t.defaultValue,i!=null){if(t!=null)throw Error(G(92));if(wl(i)){if(1<i.length)throw Error(G(93));i=i[0]}t=i}t==null&&(t=""),i=t}e._wrapperState={initialValue:vn(i)}}function ty(e,t){var i=vn(t.value),s=vn(t.defaultValue);i!=null&&(i=""+i,i!==e.value&&(e.value=i),t.defaultValue==null&&e.defaultValue!==i&&(e.defaultValue=i)),s!=null&&(e.defaultValue=""+s)}function yC(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function iy(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 yp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?iy(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var cu,sy=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,i,s,n){MSApp.execUnsafeLocalFunction(function(){return e(t,i,s,n)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(cu=cu||document.createElement("div"),cu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=cu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function $l(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Il={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},iP=["Webkit","ms","Moz","O"];Object.keys(Il).forEach(function(e){iP.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Il[t]=Il[e]})});function ny(e,t,i){return t==null||typeof t=="boolean"||t===""?"":i||typeof t!="number"||t===0||Il.hasOwnProperty(e)&&Il[e]?(""+t).trim():t+"px"}function oy(e,t){e=e.style;for(var i in t)if(t.hasOwnProperty(i)){var s=i.indexOf("--")===0,n=ny(i,t[i],s);i==="float"&&(i="cssFloat"),s?e.setProperty(i,n):e[i]=n}}var sP=Ue({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 Sp(e,t){if(t){if(sP[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(G(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(G(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(G(61))}if(t.style!=null&&typeof t.style!="object")throw Error(G(62))}}function Ep(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Rp=null;function Zg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Tp=null,dr=null,cr=null;function SC(e){if(e=Ha(e)){if(typeof Tp!="function")throw Error(G(280));var t=e.stateNode;t&&(t=pc(t),Tp(e.stateNode,e.type,t))}}function ry(e){dr?cr?cr.push(e):cr=[e]:dr=e}function ly(){if(dr){var e=dr,t=cr;if(cr=dr=null,SC(e),t)for(e=0;e<t.length;e++)SC(t[e])}}function ay(e,t){return e(t)}function uy(){}var mh=!1;function dy(e,t,i){if(mh)return e(t,i);mh=!0;try{return ay(e,t,i)}finally{mh=!1,(dr!==null||cr!==null)&&(uy(),ly())}}function Kl(e,t){var i=e.stateNode;if(i===null)return null;var s=pc(i);if(s===null)return null;i=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(G(231,t,typeof i));return i}var Dp=!1;if(xs)try{var dl={};Object.defineProperty(dl,"passive",{get:function(){Dp=!0}}),window.addEventListener("test",dl,dl),window.removeEventListener("test",dl,dl)}catch{Dp=!1}function nP(e,t,i,s,n,o,r,l,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(i,u)}catch(d){this.onError(d)}}var xl=!1,ud=null,dd=!1,Pp=null,oP={onError:function(e){xl=!0,ud=e}};function rP(e,t,i,s,n,o,r,l,a){xl=!1,ud=null,nP.apply(oP,arguments)}function lP(e,t,i,s,n,o,r,l,a){if(rP.apply(this,arguments),xl){if(xl){var u=ud;xl=!1,ud=null}else throw Error(G(198));dd||(dd=!0,Pp=u)}}function Ao(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function cy(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function EC(e){if(Ao(e)!==e)throw Error(G(188))}function aP(e){var t=e.alternate;if(!t){if(t=Ao(e),t===null)throw Error(G(188));return t!==e?null:e}for(var i=e,s=t;;){var n=i.return;if(n===null)break;var o=n.alternate;if(o===null){if(s=n.return,s!==null){i=s;continue}break}if(n.child===o.child){for(o=n.child;o;){if(o===i)return EC(n),e;if(o===s)return EC(n),t;o=o.sibling}throw Error(G(188))}if(i.return!==s.return)i=n,s=o;else{for(var r=!1,l=n.child;l;){if(l===i){r=!0,i=n,s=o;break}if(l===s){r=!0,s=n,i=o;break}l=l.sibling}if(!r){for(l=o.child;l;){if(l===i){r=!0,i=o,s=n;break}if(l===s){r=!0,s=o,i=n;break}l=l.sibling}if(!r)throw Error(G(189))}}if(i.alternate!==s)throw Error(G(190))}if(i.tag!==3)throw Error(G(188));return i.stateNode.current===i?e:t}function hy(e){return e=aP(e),e!==null?py(e):null}function py(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=py(e);if(t!==null)return t;e=e.sibling}return null}var gy=wi.unstable_scheduleCallback,RC=wi.unstable_cancelCallback,uP=wi.unstable_shouldYield,dP=wi.unstable_requestPaint,qe=wi.unstable_now,cP=wi.unstable_getCurrentPriorityLevel,Jg=wi.unstable_ImmediatePriority,fy=wi.unstable_UserBlockingPriority,cd=wi.unstable_NormalPriority,hP=wi.unstable_LowPriority,my=wi.unstable_IdlePriority,uc=null,fs=null;function pP(e){if(fs&&typeof fs.onCommitFiberRoot=="function")try{fs.onCommitFiberRoot(uc,e,void 0,(e.current.flags&128)===128)}catch{}}var Zi=Math.clz32?Math.clz32:mP,gP=Math.log,fP=Math.LN2;function mP(e){return e>>>=0,e===0?32:31-(gP(e)/fP|0)|0}var hu=64,pu=4194304;function yl(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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function hd(e,t){var i=e.pendingLanes;if(i===0)return 0;var s=0,n=e.suspendedLanes,o=e.pingedLanes,r=i&268435455;if(r!==0){var l=r&~n;l!==0?s=yl(l):(o&=r,o!==0&&(s=yl(o)))}else r=i&~n,r!==0?s=yl(r):o!==0&&(s=yl(o));if(s===0)return 0;if(t!==0&&t!==s&&!(t&n)&&(n=s&-s,o=t&-t,n>=o||n===16&&(o&4194240)!==0))return t;if(s&4&&(s|=i&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=s;0<t;)i=31-Zi(t),n=1<<i,s|=e[i],t&=~n;return s}function CP(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;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function vP(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,n=e.expirationTimes,o=e.pendingLanes;0<o;){var r=31-Zi(o),l=1<<r,a=n[r];a===-1?(!(l&i)||l&s)&&(n[r]=CP(l,t)):a<=t&&(e.expiredLanes|=l),o&=~l}}function Fp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Cy(){var e=hu;return hu<<=1,!(hu&4194240)&&(hu=64),e}function Ch(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function ka(e,t,i){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Zi(t),e[t]=i}function wP(e,t){var i=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var s=e.eventTimes;for(e=e.expirationTimes;0<i;){var n=31-Zi(i),o=1<<n;t[n]=0,s[n]=-1,e[n]=-1,i&=~o}}function ef(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-Zi(i),n=1<<s;n&t|e[s]&t&&(e[s]|=t),i&=~n}}var Te=0;function vy(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var wy,tf,yy,Sy,Ey,Ap=!1,gu=[],un=null,dn=null,cn=null,jl=new Map,Yl=new Map,tn=[],yP="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 TC(e,t){switch(e){case"focusin":case"focusout":un=null;break;case"dragenter":case"dragleave":dn=null;break;case"mouseover":case"mouseout":cn=null;break;case"pointerover":case"pointerout":jl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yl.delete(t.pointerId)}}function cl(e,t,i,s,n,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:o,targetContainers:[n]},t!==null&&(t=Ha(t),t!==null&&tf(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function SP(e,t,i,s,n){switch(t){case"focusin":return un=cl(un,e,t,i,s,n),!0;case"dragenter":return dn=cl(dn,e,t,i,s,n),!0;case"mouseover":return cn=cl(cn,e,t,i,s,n),!0;case"pointerover":var o=n.pointerId;return jl.set(o,cl(jl.get(o)||null,e,t,i,s,n)),!0;case"gotpointercapture":return o=n.pointerId,Yl.set(o,cl(Yl.get(o)||null,e,t,i,s,n)),!0}return!1}function Ry(e){var t=Yn(e.target);if(t!==null){var i=Ao(t);if(i!==null){if(t=i.tag,t===13){if(t=cy(i),t!==null){e.blockedOn=t,Ey(e.priority,function(){yy(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Nu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=bp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Rp=s,i.target.dispatchEvent(s),Rp=null}else return t=Ha(i),t!==null&&tf(t),e.blockedOn=i,!1;t.shift()}return!0}function DC(e,t,i){Nu(e)&&i.delete(t)}function EP(){Ap=!1,un!==null&&Nu(un)&&(un=null),dn!==null&&Nu(dn)&&(dn=null),cn!==null&&Nu(cn)&&(cn=null),jl.forEach(DC),Yl.forEach(DC)}function hl(e,t){e.blockedOn===t&&(e.blockedOn=null,Ap||(Ap=!0,wi.unstable_scheduleCallback(wi.unstable_NormalPriority,EP)))}function Ql(e){function t(n){return hl(n,e)}if(0<gu.length){hl(gu[0],e);for(var i=1;i<gu.length;i++){var s=gu[i];s.blockedOn===e&&(s.blockedOn=null)}}for(un!==null&&hl(un,e),dn!==null&&hl(dn,e),cn!==null&&hl(cn,e),jl.forEach(t),Yl.forEach(t),i=0;i<tn.length;i++)s=tn[i],s.blockedOn===e&&(s.blockedOn=null);for(;0<tn.length&&(i=tn[0],i.blockedOn===null);)Ry(i),i.blockedOn===null&&tn.shift()}var hr=Bs.ReactCurrentBatchConfig,pd=!0;function RP(e,t,i,s){var n=Te,o=hr.transition;hr.transition=null;try{Te=1,sf(e,t,i,s)}finally{Te=n,hr.transition=o}}function TP(e,t,i,s){var n=Te,o=hr.transition;hr.transition=null;try{Te=4,sf(e,t,i,s)}finally{Te=n,hr.transition=o}}function sf(e,t,i,s){if(pd){var n=bp(e,t,i,s);if(n===null)Fh(e,t,s,gd,i),TC(e,s);else if(SP(n,e,t,i,s))s.stopPropagation();else if(TC(e,s),t&4&&-1<yP.indexOf(e)){for(;n!==null;){var o=Ha(n);if(o!==null&&wy(o),o=bp(e,t,i,s),o===null&&Fh(e,t,s,gd,i),o===n)break;n=o}n!==null&&s.stopPropagation()}else Fh(e,t,s,null,i)}}var gd=null;function bp(e,t,i,s){if(gd=null,e=Zg(s),e=Yn(e),e!==null)if(t=Ao(e),t===null)e=null;else if(i=t.tag,i===13){if(e=cy(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return gd=e,null}function Ty(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(cP()){case Jg:return 1;case fy:return 4;case cd:case hP:return 16;case my:return 536870912;default:return 16}default:return 16}}var on=null,nf=null,_u=null;function Dy(){if(_u)return _u;var e,t=nf,i=t.length,s,n="value"in on?on.value:on.textContent,o=n.length;for(e=0;e<i&&t[e]===n[e];e++);var r=i-e;for(s=1;s<=r&&t[i-s]===n[o-s];s++);return _u=n.slice(e,1<s?1-s:void 0)}function Ou(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function fu(){return!0}function PC(){return!1}function Ri(e){function t(i,s,n,o,r){this._reactName=i,this._targetInst=n,this.type=s,this.nativeEvent=o,this.target=r,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(i=e[l],this[l]=i?i(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?fu:PC,this.isPropagationStopped=PC,this}return Ue(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=fu)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=fu)},persist:function(){},isPersistent:fu}),t}var Wr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},of=Ri(Wr),Va=Ue({},Wr,{view:0,detail:0}),DP=Ri(Va),vh,wh,pl,dc=Ue({},Va,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rf,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==pl&&(pl&&e.type==="mousemove"?(vh=e.screenX-pl.screenX,wh=e.screenY-pl.screenY):wh=vh=0,pl=e),vh)},movementY:function(e){return"movementY"in e?e.movementY:wh}}),FC=Ri(dc),PP=Ue({},dc,{dataTransfer:0}),FP=Ri(PP),AP=Ue({},Va,{relatedTarget:0}),yh=Ri(AP),bP=Ue({},Wr,{animationName:0,elapsedTime:0,pseudoElement:0}),LP=Ri(bP),MP=Ue({},Wr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),IP=Ri(MP),xP=Ue({},Wr,{data:0}),AC=Ri(xP),NP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_P={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"},OP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function GP(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=OP[e])?!!t[e]:!1}function rf(){return GP}var kP=Ue({},Va,{key:function(e){if(e.key){var t=NP[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ou(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?_P[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rf,charCode:function(e){return e.type==="keypress"?Ou(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ou(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),VP=Ri(kP),HP=Ue({},dc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bC=Ri(HP),BP=Ue({},Va,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rf}),WP=Ri(BP),UP=Ue({},Wr,{propertyName:0,elapsedTime:0,pseudoElement:0}),zP=Ri(UP),$P=Ue({},dc,{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}),KP=Ri($P),jP=[9,13,27,32],lf=xs&&"CompositionEvent"in window,Nl=null;xs&&"documentMode"in document&&(Nl=document.documentMode);var YP=xs&&"TextEvent"in window&&!Nl,Py=xs&&(!lf||Nl&&8<Nl&&11>=Nl),LC=" ",MC=!1;function Fy(e,t){switch(e){case"keyup":return jP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ay(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xo=!1;function QP(e,t){switch(e){case"compositionend":return Ay(t);case"keypress":return t.which!==32?null:(MC=!0,LC);case"textInput":return e=t.data,e===LC&&MC?null:e;default:return null}}function qP(e,t){if(Xo)return e==="compositionend"||!lf&&Fy(e,t)?(e=Dy(),_u=nf=on=null,Xo=!1,e):null;switch(e){case"paste":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 Py&&t.locale!=="ko"?null:t.data;default:return null}}var XP={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 IC(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!XP[e.type]:t==="textarea"}function by(e,t,i,s){ry(s),t=fd(t,"onChange"),0<t.length&&(i=new of("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var _l=null,ql=null;function ZP(e){Hy(e,0)}function cc(e){var t=er(e);if(Jw(t))return e}function JP(e,t){if(e==="change")return t}var Ly=!1;if(xs){var Sh;if(xs){var Eh="oninput"in document;if(!Eh){var xC=document.createElement("div");xC.setAttribute("oninput","return;"),Eh=typeof xC.oninput=="function"}Sh=Eh}else Sh=!1;Ly=Sh&&(!document.documentMode||9<document.documentMode)}function NC(){_l&&(_l.detachEvent("onpropertychange",My),ql=_l=null)}function My(e){if(e.propertyName==="value"&&cc(ql)){var t=[];by(t,ql,e,Zg(e)),dy(ZP,t)}}function eF(e,t,i){e==="focusin"?(NC(),_l=t,ql=i,_l.attachEvent("onpropertychange",My)):e==="focusout"&&NC()}function tF(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return cc(ql)}function iF(e,t){if(e==="click")return cc(t)}function sF(e,t){if(e==="input"||e==="change")return cc(t)}function nF(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ts=typeof Object.is=="function"?Object.is:nF;function Xl(e,t){if(ts(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var n=i[s];if(!cp.call(t,n)||!ts(e[n],t[n]))return!1}return!0}function _C(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function OC(e,t){var i=_C(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=_C(i)}}function Iy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Iy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xy(){for(var e=window,t=ad();t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=ad(e.document)}return t}function af(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function oF(e){var t=xy(),i=e.focusedElem,s=e.selectionRange;if(t!==i&&i&&i.ownerDocument&&Iy(i.ownerDocument.documentElement,i)){if(s!==null&&af(i)){if(t=s.start,e=s.end,e===void 0&&(e=t),"selectionStart"in i)i.selectionStart=t,i.selectionEnd=Math.min(e,i.value.length);else if(e=(t=i.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var n=i.textContent.length,o=Math.min(s.start,n);s=s.end===void 0?o:Math.min(s.end,n),!e.extend&&o>s&&(n=s,s=o,o=n),n=OC(i,o);var r=OC(i,s);n&&r&&(e.rangeCount!==1||e.anchorNode!==n.node||e.anchorOffset!==n.offset||e.focusNode!==r.node||e.focusOffset!==r.offset)&&(t=t.createRange(),t.setStart(n.node,n.offset),e.removeAllRanges(),o>s?(e.addRange(t),e.extend(r.node,r.offset)):(t.setEnd(r.node,r.offset),e.addRange(t)))}}for(t=[],e=i;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<t.length;i++)e=t[i],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var rF=xs&&"documentMode"in document&&11>=document.documentMode,Zo=null,Lp=null,Ol=null,Mp=!1;function GC(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Mp||Zo==null||Zo!==ad(s)||(s=Zo,"selectionStart"in s&&af(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Ol&&Xl(Ol,s)||(Ol=s,s=fd(Lp,"onSelect"),0<s.length&&(t=new of("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Zo)))}function mu(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Jo={animationend:mu("Animation","AnimationEnd"),animationiteration:mu("Animation","AnimationIteration"),animationstart:mu("Animation","AnimationStart"),transitionend:mu("Transition","TransitionEnd")},Rh={},Ny={};xs&&(Ny=document.createElement("div").style,"AnimationEvent"in window||(delete Jo.animationend.animation,delete Jo.animationiteration.animation,delete Jo.animationstart.animation),"TransitionEvent"in window||delete Jo.transitionend.transition);function hc(e){if(Rh[e])return Rh[e];if(!Jo[e])return e;var t=Jo[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Ny)return Rh[e]=t[i];return e}var _y=hc("animationend"),Oy=hc("animationiteration"),Gy=hc("animationstart"),ky=hc("transitionend"),Vy=new Map,kC="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 Pn(e,t){Vy.set(e,t),Fo(t,[e])}for(var Th=0;Th<kC.length;Th++){var Dh=kC[Th],lF=Dh.toLowerCase(),aF=Dh[0].toUpperCase()+Dh.slice(1);Pn(lF,"on"+aF)}Pn(_y,"onAnimationEnd");Pn(Oy,"onAnimationIteration");Pn(Gy,"onAnimationStart");Pn("dblclick","onDoubleClick");Pn("focusin","onFocus");Pn("focusout","onBlur");Pn(ky,"onTransitionEnd");vr("onMouseEnter",["mouseout","mouseover"]);vr("onMouseLeave",["mouseout","mouseover"]);vr("onPointerEnter",["pointerout","pointerover"]);vr("onPointerLeave",["pointerout","pointerover"]);Fo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fo("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sl="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(" "),uF=new Set("cancel close invalid load scroll toggle".split(" ").concat(Sl));function VC(e,t,i){var s=e.type||"unknown-event";e.currentTarget=i,lP(s,t,void 0,e),e.currentTarget=null}function Hy(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],n=s.event;s=s.listeners;e:{var o=void 0;if(t)for(var r=s.length-1;0<=r;r--){var l=s[r],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==o&&n.isPropagationStopped())break e;VC(n,l,u),o=a}else for(r=0;r<s.length;r++){if(l=s[r],a=l.instance,u=l.currentTarget,l=l.listener,a!==o&&n.isPropagationStopped())break e;VC(n,l,u),o=a}}}if(dd)throw e=Pp,dd=!1,Pp=null,e}function xe(e,t){var i=t[Op];i===void 0&&(i=t[Op]=new Set);var s=e+"__bubble";i.has(s)||(By(t,e,2,!1),i.add(s))}function Ph(e,t,i){var s=0;t&&(s|=4),By(i,e,s,t)}var Cu="_reactListening"+Math.random().toString(36).slice(2);function Zl(e){if(!e[Cu]){e[Cu]=!0,Yw.forEach(function(i){i!=="selectionchange"&&(uF.has(i)||Ph(i,!1,e),Ph(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Cu]||(t[Cu]=!0,Ph("selectionchange",!1,t))}}function By(e,t,i,s){switch(Ty(t)){case 1:var n=RP;break;case 4:n=TP;break;default:n=sf}i=n.bind(null,t,i,e),n=void 0,!Dp||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),s?n!==void 0?e.addEventListener(t,i,{capture:!0,passive:n}):e.addEventListener(t,i,!0):n!==void 0?e.addEventListener(t,i,{passive:n}):e.addEventListener(t,i,!1)}function Fh(e,t,i,s,n){var o=s;if(!(t&1)&&!(t&2)&&s!==null)e:for(;;){if(s===null)return;var r=s.tag;if(r===3||r===4){var l=s.stateNode.containerInfo;if(l===n||l.nodeType===8&&l.parentNode===n)break;if(r===4)for(r=s.return;r!==null;){var a=r.tag;if((a===3||a===4)&&(a=r.stateNode.containerInfo,a===n||a.nodeType===8&&a.parentNode===n))return;r=r.return}for(;l!==null;){if(r=Yn(l),r===null)return;if(a=r.tag,a===5||a===6){s=o=r;continue e}l=l.parentNode}}s=s.return}dy(function(){var u=o,d=Zg(i),h=[];e:{var p=Vy.get(e);if(p!==void 0){var C=of,v=e;switch(e){case"keypress":if(Ou(i)===0)break e;case"keydown":case"keyup":C=VP;break;case"focusin":v="focus",C=yh;break;case"focusout":v="blur",C=yh;break;case"beforeblur":case"afterblur":C=yh;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":C=FC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":C=FP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":C=WP;break;case _y:case Oy:case Gy:C=LP;break;case ky:C=zP;break;case"scroll":C=DP;break;case"wheel":C=KP;break;case"copy":case"cut":case"paste":C=IP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":C=bC}var y=(t&4)!==0,R=!y&&e==="scroll",w=y?p!==null?p+"Capture":null:p;y=[];for(var m=u,E;m!==null;){E=m;var T=E.stateNode;if(E.tag===5&&T!==null&&(E=T,w!==null&&(T=Kl(m,w),T!=null&&y.push(Jl(m,T,E)))),R)break;m=m.return}0<y.length&&(p=new C(p,v,null,i,d),h.push({event:p,listeners:y}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",C=e==="mouseout"||e==="pointerout",p&&i!==Rp&&(v=i.relatedTarget||i.fromElement)&&(Yn(v)||v[Ns]))break e;if((C||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,C?(v=i.relatedTarget||i.toElement,C=u,v=v?Yn(v):null,v!==null&&(R=Ao(v),v!==R||v.tag!==5&&v.tag!==6)&&(v=null)):(C=null,v=u),C!==v)){if(y=FC,T="onMouseLeave",w="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(y=bC,T="onPointerLeave",w="onPointerEnter",m="pointer"),R=C==null?p:er(C),E=v==null?p:er(v),p=new y(T,m+"leave",C,i,d),p.target=R,p.relatedTarget=E,T=null,Yn(d)===u&&(y=new y(w,m+"enter",v,i,d),y.target=E,y.relatedTarget=R,T=y),R=T,C&&v)t:{for(y=C,w=v,m=0,E=y;E;E=Uo(E))m++;for(E=0,T=w;T;T=Uo(T))E++;for(;0<m-E;)y=Uo(y),m--;for(;0<E-m;)w=Uo(w),E--;for(;m--;){if(y===w||w!==null&&y===w.alternate)break t;y=Uo(y),w=Uo(w)}y=null}else y=null;C!==null&&HC(h,p,C,y,!1),v!==null&&R!==null&&HC(h,R,v,y,!0)}}e:{if(p=u?er(u):window,C=p.nodeName&&p.nodeName.toLowerCase(),C==="select"||C==="input"&&p.type==="file")var P=JP;else if(IC(p))if(Ly)P=sF;else{P=tF;var A=eF}else(C=p.nodeName)&&C.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(P=iF);if(P&&(P=P(e,u))){by(h,P,i,d);break e}A&&A(e,p,u),e==="focusout"&&(A=p._wrapperState)&&A.controlled&&p.type==="number"&&vp(p,"number",p.value)}switch(A=u?er(u):window,e){case"focusin":(IC(A)||A.contentEditable==="true")&&(Zo=A,Lp=u,Ol=null);break;case"focusout":Ol=Lp=Zo=null;break;case"mousedown":Mp=!0;break;case"contextmenu":case"mouseup":case"dragend":Mp=!1,GC(h,i,d);break;case"selectionchange":if(rF)break;case"keydown":case"keyup":GC(h,i,d)}var F;if(lf)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else Xo?Fy(e,i)&&(I="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(I="onCompositionStart");I&&(Py&&i.locale!=="ko"&&(Xo||I!=="onCompositionStart"?I==="onCompositionEnd"&&Xo&&(F=Dy()):(on=d,nf="value"in on?on.value:on.textContent,Xo=!0)),A=fd(u,I),0<A.length&&(I=new AC(I,e,null,i,d),h.push({event:I,listeners:A}),F?I.data=F:(F=Ay(i),F!==null&&(I.data=F)))),(F=YP?QP(e,i):qP(e,i))&&(u=fd(u,"onBeforeInput"),0<u.length&&(d=new AC("onBeforeInput","beforeinput",null,i,d),h.push({event:d,listeners:u}),d.data=F))}Hy(h,t)})}function Jl(e,t,i){return{instance:e,listener:t,currentTarget:i}}function fd(e,t){for(var i=t+"Capture",s=[];e!==null;){var n=e,o=n.stateNode;n.tag===5&&o!==null&&(n=o,o=Kl(e,i),o!=null&&s.unshift(Jl(e,o,n)),o=Kl(e,t),o!=null&&s.push(Jl(e,o,n))),e=e.return}return s}function Uo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function HC(e,t,i,s,n){for(var o=t._reactName,r=[];i!==null&&i!==s;){var l=i,a=l.alternate,u=l.stateNode;if(a!==null&&a===s)break;l.tag===5&&u!==null&&(l=u,n?(a=Kl(i,o),a!=null&&r.unshift(Jl(i,a,l))):n||(a=Kl(i,o),a!=null&&r.push(Jl(i,a,l)))),i=i.return}r.length!==0&&e.push({event:t,listeners:r})}var dF=/\r\n?/g,cF=/\u0000|\uFFFD/g;function BC(e){return(typeof e=="string"?e:""+e).replace(dF,`
|
|
30
|
+
`).replace(cF,"")}function vu(e,t,i){if(t=BC(t),BC(e)!==t&&i)throw Error(G(425))}function md(){}var Ip=null,xp=null;function Np(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _p=typeof setTimeout=="function"?setTimeout:void 0,hF=typeof clearTimeout=="function"?clearTimeout:void 0,WC=typeof Promise=="function"?Promise:void 0,pF=typeof queueMicrotask=="function"?queueMicrotask:typeof WC<"u"?function(e){return WC.resolve(null).then(e).catch(gF)}:_p;function gF(e){setTimeout(function(){throw e})}function Ah(e,t){var i=t,s=0;do{var n=i.nextSibling;if(e.removeChild(i),n&&n.nodeType===8)if(i=n.data,i==="/$"){if(s===0){e.removeChild(n),Ql(t);return}s--}else i!=="$"&&i!=="$?"&&i!=="$!"||s++;i=n}while(i);Ql(t)}function hn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function UC(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"){if(t===0)return e;t--}else i==="/$"&&t++}e=e.previousSibling}return null}var Ur=Math.random().toString(36).slice(2),ps="__reactFiber$"+Ur,ea="__reactProps$"+Ur,Ns="__reactContainer$"+Ur,Op="__reactEvents$"+Ur,fF="__reactListeners$"+Ur,mF="__reactHandles$"+Ur;function Yn(e){var t=e[ps];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Ns]||i[ps]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=UC(e);e!==null;){if(i=e[ps])return i;e=UC(e)}return t}e=i,i=e.parentNode}return null}function Ha(e){return e=e[ps]||e[Ns],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function er(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(G(33))}function pc(e){return e[ea]||null}var Gp=[],tr=-1;function Fn(e){return{current:e}}function _e(e){0>tr||(e.current=Gp[tr],Gp[tr]=null,tr--)}function Le(e,t){tr++,Gp[tr]=e.current,e.current=t}var wn={},At=Fn(wn),ii=Fn(!1),co=wn;function wr(e,t){var i=e.type.contextTypes;if(!i)return wn;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var n={},o;for(o in i)n[o]=t[o];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n),n}function si(e){return e=e.childContextTypes,e!=null}function Cd(){_e(ii),_e(At)}function zC(e,t,i){if(At.current!==wn)throw Error(G(168));Le(At,t),Le(ii,i)}function Wy(e,t,i){var s=e.stateNode;if(t=t.childContextTypes,typeof s.getChildContext!="function")return i;s=s.getChildContext();for(var n in s)if(!(n in t))throw Error(G(108,eP(e)||"Unknown",n));return Ue({},i,s)}function vd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||wn,co=At.current,Le(At,e),Le(ii,ii.current),!0}function $C(e,t,i){var s=e.stateNode;if(!s)throw Error(G(169));i?(e=Wy(e,t,co),s.__reactInternalMemoizedMergedChildContext=e,_e(ii),_e(At),Le(At,e)):_e(ii),Le(ii,i)}var Fs=null,gc=!1,bh=!1;function Uy(e){Fs===null?Fs=[e]:Fs.push(e)}function CF(e){gc=!0,Uy(e)}function An(){if(!bh&&Fs!==null){bh=!0;var e=0,t=Te;try{var i=Fs;for(Te=1;e<i.length;e++){var s=i[e];do s=s(!0);while(s!==null)}Fs=null,gc=!1}catch(n){throw Fs!==null&&(Fs=Fs.slice(e+1)),gy(Jg,An),n}finally{Te=t,bh=!1}}return null}var ir=[],sr=0,wd=null,yd=0,Pi=[],Fi=0,ho=null,bs=1,Ls="";function Vn(e,t){ir[sr++]=yd,ir[sr++]=wd,wd=e,yd=t}function zy(e,t,i){Pi[Fi++]=bs,Pi[Fi++]=Ls,Pi[Fi++]=ho,ho=e;var s=bs;e=Ls;var n=32-Zi(s)-1;s&=~(1<<n),i+=1;var o=32-Zi(t)+n;if(30<o){var r=n-n%5;o=(s&(1<<r)-1).toString(32),s>>=r,n-=r,bs=1<<32-Zi(t)+n|i<<n|s,Ls=o+e}else bs=1<<o|i<<n|s,Ls=e}function uf(e){e.return!==null&&(Vn(e,1),zy(e,1,0))}function df(e){for(;e===wd;)wd=ir[--sr],ir[sr]=null,yd=ir[--sr],ir[sr]=null;for(;e===ho;)ho=Pi[--Fi],Pi[Fi]=null,Ls=Pi[--Fi],Pi[Fi]=null,bs=Pi[--Fi],Pi[Fi]=null}var Ci=null,mi=null,Ve=!1,Yi=null;function $y(e,t){var i=bi(5,null,null,0);i.elementType="DELETED",i.stateNode=t,i.return=e,t=e.deletions,t===null?(e.deletions=[i],e.flags|=16):t.push(i)}function KC(e,t){switch(e.tag){case 5:var i=e.type;return t=t.nodeType!==1||i.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ci=e,mi=hn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ci=e,mi=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(i=ho!==null?{id:bs,overflow:Ls}:null,e.memoizedState={dehydrated:t,treeContext:i,retryLane:1073741824},i=bi(18,null,null,0),i.stateNode=t,i.return=e,e.child=i,Ci=e,mi=null,!0):!1;default:return!1}}function kp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Vp(e){if(Ve){var t=mi;if(t){var i=t;if(!KC(e,t)){if(kp(e))throw Error(G(418));t=hn(i.nextSibling);var s=Ci;t&&KC(e,t)?$y(s,i):(e.flags=e.flags&-4097|2,Ve=!1,Ci=e)}}else{if(kp(e))throw Error(G(418));e.flags=e.flags&-4097|2,Ve=!1,Ci=e}}}function jC(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ci=e}function wu(e){if(e!==Ci)return!1;if(!Ve)return jC(e),Ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Np(e.type,e.memoizedProps)),t&&(t=mi)){if(kp(e))throw Ky(),Error(G(418));for(;t;)$y(e,t),t=hn(t.nextSibling)}if(jC(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"){if(t===0){mi=hn(e.nextSibling);break e}t--}else i!=="$"&&i!=="$!"&&i!=="$?"||t++}e=e.nextSibling}mi=null}}else mi=Ci?hn(e.stateNode.nextSibling):null;return!0}function Ky(){for(var e=mi;e;)e=hn(e.nextSibling)}function yr(){mi=Ci=null,Ve=!1}function cf(e){Yi===null?Yi=[e]:Yi.push(e)}var vF=Bs.ReactCurrentBatchConfig;function gl(e,t,i){if(e=i.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(i._owner){if(i=i._owner,i){if(i.tag!==1)throw Error(G(309));var s=i.stateNode}if(!s)throw Error(G(147,e));var n=s,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(r){var l=n.refs;r===null?delete l[o]:l[o]=r},t._stringRef=o,t)}if(typeof e!="string")throw Error(G(284));if(!i._owner)throw Error(G(290,e))}return e}function yu(e,t){throw e=Object.prototype.toString.call(t),Error(G(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function YC(e){var t=e._init;return t(e._payload)}function jy(e){function t(w,m){if(e){var E=w.deletions;E===null?(w.deletions=[m],w.flags|=16):E.push(m)}}function i(w,m){if(!e)return null;for(;m!==null;)t(w,m),m=m.sibling;return null}function s(w,m){for(w=new Map;m!==null;)m.key!==null?w.set(m.key,m):w.set(m.index,m),m=m.sibling;return w}function n(w,m){return w=mn(w,m),w.index=0,w.sibling=null,w}function o(w,m,E){return w.index=E,e?(E=w.alternate,E!==null?(E=E.index,E<m?(w.flags|=2,m):E):(w.flags|=2,m)):(w.flags|=1048576,m)}function r(w){return e&&w.alternate===null&&(w.flags|=2),w}function l(w,m,E,T){return m===null||m.tag!==6?(m=Oh(E,w.mode,T),m.return=w,m):(m=n(m,E),m.return=w,m)}function a(w,m,E,T){var P=E.type;return P===qo?d(w,m,E.props.children,T,E.key):m!==null&&(m.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Js&&YC(P)===m.type)?(T=n(m,E.props),T.ref=gl(w,m,E),T.return=w,T):(T=Uu(E.type,E.key,E.props,null,w.mode,T),T.ref=gl(w,m,E),T.return=w,T)}function u(w,m,E,T){return m===null||m.tag!==4||m.stateNode.containerInfo!==E.containerInfo||m.stateNode.implementation!==E.implementation?(m=Gh(E,w.mode,T),m.return=w,m):(m=n(m,E.children||[]),m.return=w,m)}function d(w,m,E,T,P){return m===null||m.tag!==7?(m=io(E,w.mode,T,P),m.return=w,m):(m=n(m,E),m.return=w,m)}function h(w,m,E){if(typeof m=="string"&&m!==""||typeof m=="number")return m=Oh(""+m,w.mode,E),m.return=w,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case uu:return E=Uu(m.type,m.key,m.props,null,w.mode,E),E.ref=gl(w,null,m),E.return=w,E;case Qo:return m=Gh(m,w.mode,E),m.return=w,m;case Js:var T=m._init;return h(w,T(m._payload),E)}if(wl(m)||ul(m))return m=io(m,w.mode,E,null),m.return=w,m;yu(w,m)}return null}function p(w,m,E,T){var P=m!==null?m.key:null;if(typeof E=="string"&&E!==""||typeof E=="number")return P!==null?null:l(w,m,""+E,T);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case uu:return E.key===P?a(w,m,E,T):null;case Qo:return E.key===P?u(w,m,E,T):null;case Js:return P=E._init,p(w,m,P(E._payload),T)}if(wl(E)||ul(E))return P!==null?null:d(w,m,E,T,null);yu(w,E)}return null}function C(w,m,E,T,P){if(typeof T=="string"&&T!==""||typeof T=="number")return w=w.get(E)||null,l(m,w,""+T,P);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case uu:return w=w.get(T.key===null?E:T.key)||null,a(m,w,T,P);case Qo:return w=w.get(T.key===null?E:T.key)||null,u(m,w,T,P);case Js:var A=T._init;return C(w,m,E,A(T._payload),P)}if(wl(T)||ul(T))return w=w.get(E)||null,d(m,w,T,P,null);yu(m,T)}return null}function v(w,m,E,T){for(var P=null,A=null,F=m,I=m=0,x=null;F!==null&&I<E.length;I++){F.index>I?(x=F,F=null):x=F.sibling;var k=p(w,F,E[I],T);if(k===null){F===null&&(F=x);break}e&&F&&k.alternate===null&&t(w,F),m=o(k,m,I),A===null?P=k:A.sibling=k,A=k,F=x}if(I===E.length)return i(w,F),Ve&&Vn(w,I),P;if(F===null){for(;I<E.length;I++)F=h(w,E[I],T),F!==null&&(m=o(F,m,I),A===null?P=F:A.sibling=F,A=F);return Ve&&Vn(w,I),P}for(F=s(w,F);I<E.length;I++)x=C(F,w,I,E[I],T),x!==null&&(e&&x.alternate!==null&&F.delete(x.key===null?I:x.key),m=o(x,m,I),A===null?P=x:A.sibling=x,A=x);return e&&F.forEach(function(U){return t(w,U)}),Ve&&Vn(w,I),P}function y(w,m,E,T){var P=ul(E);if(typeof P!="function")throw Error(G(150));if(E=P.call(E),E==null)throw Error(G(151));for(var A=P=null,F=m,I=m=0,x=null,k=E.next();F!==null&&!k.done;I++,k=E.next()){F.index>I?(x=F,F=null):x=F.sibling;var U=p(w,F,k.value,T);if(U===null){F===null&&(F=x);break}e&&F&&U.alternate===null&&t(w,F),m=o(U,m,I),A===null?P=U:A.sibling=U,A=U,F=x}if(k.done)return i(w,F),Ve&&Vn(w,I),P;if(F===null){for(;!k.done;I++,k=E.next())k=h(w,k.value,T),k!==null&&(m=o(k,m,I),A===null?P=k:A.sibling=k,A=k);return Ve&&Vn(w,I),P}for(F=s(w,F);!k.done;I++,k=E.next())k=C(F,w,I,k.value,T),k!==null&&(e&&k.alternate!==null&&F.delete(k.key===null?I:k.key),m=o(k,m,I),A===null?P=k:A.sibling=k,A=k);return e&&F.forEach(function(ee){return t(w,ee)}),Ve&&Vn(w,I),P}function R(w,m,E,T){if(typeof E=="object"&&E!==null&&E.type===qo&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case uu:e:{for(var P=E.key,A=m;A!==null;){if(A.key===P){if(P=E.type,P===qo){if(A.tag===7){i(w,A.sibling),m=n(A,E.props.children),m.return=w,w=m;break e}}else if(A.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Js&&YC(P)===A.type){i(w,A.sibling),m=n(A,E.props),m.ref=gl(w,A,E),m.return=w,w=m;break e}i(w,A);break}else t(w,A);A=A.sibling}E.type===qo?(m=io(E.props.children,w.mode,T,E.key),m.return=w,w=m):(T=Uu(E.type,E.key,E.props,null,w.mode,T),T.ref=gl(w,m,E),T.return=w,w=T)}return r(w);case Qo:e:{for(A=E.key;m!==null;){if(m.key===A)if(m.tag===4&&m.stateNode.containerInfo===E.containerInfo&&m.stateNode.implementation===E.implementation){i(w,m.sibling),m=n(m,E.children||[]),m.return=w,w=m;break e}else{i(w,m);break}else t(w,m);m=m.sibling}m=Gh(E,w.mode,T),m.return=w,w=m}return r(w);case Js:return A=E._init,R(w,m,A(E._payload),T)}if(wl(E))return v(w,m,E,T);if(ul(E))return y(w,m,E,T);yu(w,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,m!==null&&m.tag===6?(i(w,m.sibling),m=n(m,E),m.return=w,w=m):(i(w,m),m=Oh(E,w.mode,T),m.return=w,w=m),r(w)):i(w,m)}return R}var Sr=jy(!0),Yy=jy(!1),Sd=Fn(null),Ed=null,nr=null,hf=null;function pf(){hf=nr=Ed=null}function gf(e){var t=Sd.current;_e(Sd),e._currentValue=t}function Hp(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function pr(e,t){Ed=e,hf=nr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Xt=!0),e.firstContext=null)}function _i(e){var t=e._currentValue;if(hf!==e)if(e={context:e,memoizedValue:t,next:null},nr===null){if(Ed===null)throw Error(G(308));nr=e,Ed.dependencies={lanes:0,firstContext:e}}else nr=nr.next=e;return t}var Qn=null;function ff(e){Qn===null?Qn=[e]:Qn.push(e)}function Qy(e,t,i,s){var n=t.interleaved;return n===null?(i.next=i,ff(t)):(i.next=n.next,n.next=i),t.interleaved=i,_s(e,s)}function _s(e,t){e.lanes|=t;var i=e.alternate;for(i!==null&&(i.lanes|=t),i=e,e=e.return;e!==null;)e.childLanes|=t,i=e.alternate,i!==null&&(i.childLanes|=t),i=e,e=e.return;return i.tag===3?i.stateNode:null}var en=!1;function mf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qy(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 Ms(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function pn(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,ge&2){var n=s.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),s.pending=t,_s(e,i)}return n=s.interleaved,n===null?(t.next=t,ff(s)):(t.next=n.next,n.next=t),s.interleaved=t,_s(e,i)}function Gu(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194240)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,ef(e,i)}}function QC(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var n=null,o=null;if(i=i.firstBaseUpdate,i!==null){do{var r={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};o===null?n=o=r:o=o.next=r,i=i.next}while(i!==null);o===null?n=o=t:o=o.next=t}else n=o=t;i={baseState:s.baseState,firstBaseUpdate:n,lastBaseUpdate:o,shared:s.shared,effects:s.effects},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}function Rd(e,t,i,s){var n=e.updateQueue;en=!1;var o=n.firstBaseUpdate,r=n.lastBaseUpdate,l=n.shared.pending;if(l!==null){n.shared.pending=null;var a=l,u=a.next;a.next=null,r===null?o=u:r.next=u,r=a;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==r&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=a))}if(o!==null){var h=n.baseState;r=0,d=u=a=null,l=o;do{var p=l.lane,C=l.eventTime;if((s&p)===p){d!==null&&(d=d.next={eventTime:C,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,y=l;switch(p=t,C=i,y.tag){case 1:if(v=y.payload,typeof v=="function"){h=v.call(C,h,p);break e}h=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=y.payload,p=typeof v=="function"?v.call(C,h,p):v,p==null)break e;h=Ue({},h,p);break e;case 2:en=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=n.effects,p===null?n.effects=[l]:p.push(l))}else C={eventTime:C,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=C,a=h):d=d.next=C,r|=p;if(l=l.next,l===null){if(l=n.shared.pending,l===null)break;p=l,l=p.next,p.next=null,n.lastBaseUpdate=p,n.shared.pending=null}}while(!0);if(d===null&&(a=h),n.baseState=a,n.firstBaseUpdate=u,n.lastBaseUpdate=d,t=n.shared.interleaved,t!==null){n=t;do r|=n.lane,n=n.next;while(n!==t)}else o===null&&(n.shared.lanes=0);go|=r,e.lanes=r,e.memoizedState=h}}function qC(e,t,i){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var s=e[t],n=s.callback;if(n!==null){if(s.callback=null,s=i,typeof n!="function")throw Error(G(191,n));n.call(s)}}}var Ba={},ms=Fn(Ba),ta=Fn(Ba),ia=Fn(Ba);function qn(e){if(e===Ba)throw Error(G(174));return e}function Cf(e,t){switch(Le(ia,t),Le(ta,e),Le(ms,Ba),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:yp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=yp(t,e)}_e(ms),Le(ms,t)}function Er(){_e(ms),_e(ta),_e(ia)}function Xy(e){qn(ia.current);var t=qn(ms.current),i=yp(t,e.type);t!==i&&(Le(ta,e),Le(ms,i))}function vf(e){ta.current===e&&(_e(ms),_e(ta))}var Be=Fn(0);function Td(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||i.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Lh=[];function wf(){for(var e=0;e<Lh.length;e++)Lh[e]._workInProgressVersionPrimary=null;Lh.length=0}var ku=Bs.ReactCurrentDispatcher,Mh=Bs.ReactCurrentBatchConfig,po=0,We=null,lt=null,ht=null,Dd=!1,Gl=!1,sa=0,wF=0;function Tt(){throw Error(G(321))}function yf(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!ts(e[i],t[i]))return!1;return!0}function Sf(e,t,i,s,n,o){if(po=o,We=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ku.current=e===null||e.memoizedState===null?RF:TF,e=i(s,n),Gl){o=0;do{if(Gl=!1,sa=0,25<=o)throw Error(G(301));o+=1,ht=lt=null,t.updateQueue=null,ku.current=DF,e=i(s,n)}while(Gl)}if(ku.current=Pd,t=lt!==null&<.next!==null,po=0,ht=lt=We=null,Dd=!1,t)throw Error(G(300));return e}function Ef(){var e=sa!==0;return sa=0,e}function hs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ht===null?We.memoizedState=ht=e:ht=ht.next=e,ht}function Oi(){if(lt===null){var e=We.alternate;e=e!==null?e.memoizedState:null}else e=lt.next;var t=ht===null?We.memoizedState:ht.next;if(t!==null)ht=t,lt=e;else{if(e===null)throw Error(G(310));lt=e,e={memoizedState:lt.memoizedState,baseState:lt.baseState,baseQueue:lt.baseQueue,queue:lt.queue,next:null},ht===null?We.memoizedState=ht=e:ht=ht.next=e}return ht}function na(e,t){return typeof t=="function"?t(e):t}function Ih(e){var t=Oi(),i=t.queue;if(i===null)throw Error(G(311));i.lastRenderedReducer=e;var s=lt,n=s.baseQueue,o=i.pending;if(o!==null){if(n!==null){var r=n.next;n.next=o.next,o.next=r}s.baseQueue=n=o,i.pending=null}if(n!==null){o=n.next,s=s.baseState;var l=r=null,a=null,u=o;do{var d=u.lane;if((po&d)===d)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),s=u.hasEagerState?u.eagerState:e(s,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=h,r=s):a=a.next=h,We.lanes|=d,go|=d}u=u.next}while(u!==null&&u!==o);a===null?r=s:a.next=l,ts(s,t.memoizedState)||(Xt=!0),t.memoizedState=s,t.baseState=r,t.baseQueue=a,i.lastRenderedState=s}if(e=i.interleaved,e!==null){n=e;do o=n.lane,We.lanes|=o,go|=o,n=n.next;while(n!==e)}else n===null&&(i.lanes=0);return[t.memoizedState,i.dispatch]}function xh(e){var t=Oi(),i=t.queue;if(i===null)throw Error(G(311));i.lastRenderedReducer=e;var s=i.dispatch,n=i.pending,o=t.memoizedState;if(n!==null){i.pending=null;var r=n=n.next;do o=e(o,r.action),r=r.next;while(r!==n);ts(o,t.memoizedState)||(Xt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),i.lastRenderedState=o}return[o,s]}function Zy(){}function Jy(e,t){var i=We,s=Oi(),n=t(),o=!ts(s.memoizedState,n);if(o&&(s.memoizedState=n,Xt=!0),s=s.queue,Rf(iS.bind(null,i,s,e),[e]),s.getSnapshot!==t||o||ht!==null&&ht.memoizedState.tag&1){if(i.flags|=2048,oa(9,tS.bind(null,i,s,n,t),void 0,null),gt===null)throw Error(G(349));po&30||eS(i,t,n)}return n}function eS(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=We.updateQueue,t===null?(t={lastEffect:null,stores:null},We.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function tS(e,t,i,s){t.value=i,t.getSnapshot=s,sS(t)&&nS(e)}function iS(e,t,i){return i(function(){sS(t)&&nS(e)})}function sS(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!ts(e,i)}catch{return!0}}function nS(e){var t=_s(e,1);t!==null&&Ji(t,e,1,-1)}function XC(e){var t=hs();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:e},t.queue=e,e=e.dispatch=EF.bind(null,We,e),[t.memoizedState,e]}function oa(e,t,i,s){return e={tag:e,create:t,destroy:i,deps:s,next:null},t=We.updateQueue,t===null?(t={lastEffect:null,stores:null},We.updateQueue=t,t.lastEffect=e.next=e):(i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e)),e}function oS(){return Oi().memoizedState}function Vu(e,t,i,s){var n=hs();We.flags|=e,n.memoizedState=oa(1|t,i,void 0,s===void 0?null:s)}function fc(e,t,i,s){var n=Oi();s=s===void 0?null:s;var o=void 0;if(lt!==null){var r=lt.memoizedState;if(o=r.destroy,s!==null&&yf(s,r.deps)){n.memoizedState=oa(t,i,o,s);return}}We.flags|=e,n.memoizedState=oa(1|t,i,o,s)}function ZC(e,t){return Vu(8390656,8,e,t)}function Rf(e,t){return fc(2048,8,e,t)}function rS(e,t){return fc(4,2,e,t)}function lS(e,t){return fc(4,4,e,t)}function aS(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function uS(e,t,i){return i=i!=null?i.concat([e]):null,fc(4,4,aS.bind(null,t,e),i)}function Tf(){}function dS(e,t){var i=Oi();t=t===void 0?null:t;var s=i.memoizedState;return s!==null&&t!==null&&yf(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function cS(e,t){var i=Oi();t=t===void 0?null:t;var s=i.memoizedState;return s!==null&&t!==null&&yf(t,s[1])?s[0]:(e=e(),i.memoizedState=[e,t],e)}function hS(e,t,i){return po&21?(ts(i,t)||(i=Cy(),We.lanes|=i,go|=i,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Xt=!0),e.memoizedState=i)}function yF(e,t){var i=Te;Te=i!==0&&4>i?i:4,e(!0);var s=Mh.transition;Mh.transition={};try{e(!1),t()}finally{Te=i,Mh.transition=s}}function pS(){return Oi().memoizedState}function SF(e,t,i){var s=fn(e);if(i={lane:s,action:i,hasEagerState:!1,eagerState:null,next:null},gS(e))fS(t,i);else if(i=Qy(e,t,i,s),i!==null){var n=_t();Ji(i,e,s,n),mS(i,t,s)}}function EF(e,t,i){var s=fn(e),n={lane:s,action:i,hasEagerState:!1,eagerState:null,next:null};if(gS(e))fS(t,n);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var r=t.lastRenderedState,l=o(r,i);if(n.hasEagerState=!0,n.eagerState=l,ts(l,r)){var a=t.interleaved;a===null?(n.next=n,ff(t)):(n.next=a.next,a.next=n),t.interleaved=n;return}}catch{}finally{}i=Qy(e,t,n,s),i!==null&&(n=_t(),Ji(i,e,s,n),mS(i,t,s))}}function gS(e){var t=e.alternate;return e===We||t!==null&&t===We}function fS(e,t){Gl=Dd=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function mS(e,t,i){if(i&4194240){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,ef(e,i)}}var Pd={readContext:_i,useCallback:Tt,useContext:Tt,useEffect:Tt,useImperativeHandle:Tt,useInsertionEffect:Tt,useLayoutEffect:Tt,useMemo:Tt,useReducer:Tt,useRef:Tt,useState:Tt,useDebugValue:Tt,useDeferredValue:Tt,useTransition:Tt,useMutableSource:Tt,useSyncExternalStore:Tt,useId:Tt,unstable_isNewReconciler:!1},RF={readContext:_i,useCallback:function(e,t){return hs().memoizedState=[e,t===void 0?null:t],e},useContext:_i,useEffect:ZC,useImperativeHandle:function(e,t,i){return i=i!=null?i.concat([e]):null,Vu(4194308,4,aS.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Vu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Vu(4,2,e,t)},useMemo:function(e,t){var i=hs();return t=t===void 0?null:t,e=e(),i.memoizedState=[e,t],e},useReducer:function(e,t,i){var s=hs();return t=i!==void 0?i(t):t,s.memoizedState=s.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},s.queue=e,e=e.dispatch=SF.bind(null,We,e),[s.memoizedState,e]},useRef:function(e){var t=hs();return e={current:e},t.memoizedState=e},useState:XC,useDebugValue:Tf,useDeferredValue:function(e){return hs().memoizedState=e},useTransition:function(){var e=XC(!1),t=e[0];return e=yF.bind(null,e[1]),hs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,i){var s=We,n=hs();if(Ve){if(i===void 0)throw Error(G(407));i=i()}else{if(i=t(),gt===null)throw Error(G(349));po&30||eS(s,t,i)}n.memoizedState=i;var o={value:i,getSnapshot:t};return n.queue=o,ZC(iS.bind(null,s,o,e),[e]),s.flags|=2048,oa(9,tS.bind(null,s,o,i,t),void 0,null),i},useId:function(){var e=hs(),t=gt.identifierPrefix;if(Ve){var i=Ls,s=bs;i=(s&~(1<<32-Zi(s)-1)).toString(32)+i,t=":"+t+"R"+i,i=sa++,0<i&&(t+="H"+i.toString(32)),t+=":"}else i=wF++,t=":"+t+"r"+i.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},TF={readContext:_i,useCallback:dS,useContext:_i,useEffect:Rf,useImperativeHandle:uS,useInsertionEffect:rS,useLayoutEffect:lS,useMemo:cS,useReducer:Ih,useRef:oS,useState:function(){return Ih(na)},useDebugValue:Tf,useDeferredValue:function(e){var t=Oi();return hS(t,lt.memoizedState,e)},useTransition:function(){var e=Ih(na)[0],t=Oi().memoizedState;return[e,t]},useMutableSource:Zy,useSyncExternalStore:Jy,useId:pS,unstable_isNewReconciler:!1},DF={readContext:_i,useCallback:dS,useContext:_i,useEffect:Rf,useImperativeHandle:uS,useInsertionEffect:rS,useLayoutEffect:lS,useMemo:cS,useReducer:xh,useRef:oS,useState:function(){return xh(na)},useDebugValue:Tf,useDeferredValue:function(e){var t=Oi();return lt===null?t.memoizedState=e:hS(t,lt.memoizedState,e)},useTransition:function(){var e=xh(na)[0],t=Oi().memoizedState;return[e,t]},useMutableSource:Zy,useSyncExternalStore:Jy,useId:pS,unstable_isNewReconciler:!1};function zi(e,t){if(e&&e.defaultProps){t=Ue({},t),e=e.defaultProps;for(var i in e)t[i]===void 0&&(t[i]=e[i]);return t}return t}function Bp(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:Ue({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var mc={isMounted:function(e){return(e=e._reactInternals)?Ao(e)===e:!1},enqueueSetState:function(e,t,i){e=e._reactInternals;var s=_t(),n=fn(e),o=Ms(s,n);o.payload=t,i!=null&&(o.callback=i),t=pn(e,o,n),t!==null&&(Ji(t,e,n,s),Gu(t,e,n))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=_t(),n=fn(e),o=Ms(s,n);o.tag=1,o.payload=t,i!=null&&(o.callback=i),t=pn(e,o,n),t!==null&&(Ji(t,e,n,s),Gu(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=_t(),s=fn(e),n=Ms(i,s);n.tag=2,t!=null&&(n.callback=t),t=pn(e,n,s),t!==null&&(Ji(t,e,s,i),Gu(t,e,s))}};function JC(e,t,i,s,n,o,r){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,o,r):t.prototype&&t.prototype.isPureReactComponent?!Xl(i,s)||!Xl(n,o):!0}function CS(e,t,i){var s=!1,n=wn,o=t.contextType;return typeof o=="object"&&o!==null?o=_i(o):(n=si(t)?co:At.current,s=t.contextTypes,o=(s=s!=null)?wr(e,n):wn),t=new t(i,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=mc,e.stateNode=t,t._reactInternals=e,s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=o),t}function ev(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&mc.enqueueReplaceState(t,t.state,null)}function Wp(e,t,i,s){var n=e.stateNode;n.props=i,n.state=e.memoizedState,n.refs={},mf(e);var o=t.contextType;typeof o=="object"&&o!==null?n.context=_i(o):(o=si(t)?co:At.current,n.context=wr(e,o)),n.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Bp(e,t,o,i),n.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(t=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),t!==n.state&&mc.enqueueReplaceState(n,n.state,null),Rd(e,i,n,s),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308)}function Rr(e,t){try{var i="",s=t;do i+=JD(s),s=s.return;while(s);var n=i}catch(o){n=`
|
|
31
|
+
Error generating stack: `+o.message+`
|
|
32
|
+
`+o.stack}return{value:e,source:t,stack:n,digest:null}}function Nh(e,t,i){return{value:e,source:null,stack:i??null,digest:t??null}}function Up(e,t){try{console.error(t.value)}catch(i){setTimeout(function(){throw i})}}var PF=typeof WeakMap=="function"?WeakMap:Map;function vS(e,t,i){i=Ms(-1,i),i.tag=3,i.payload={element:null};var s=t.value;return i.callback=function(){Ad||(Ad=!0,Jp=s),Up(e,t)},i}function wS(e,t,i){i=Ms(-1,i),i.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var n=t.value;i.payload=function(){return s(n)},i.callback=function(){Up(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(i.callback=function(){Up(e,t),typeof s!="function"&&(gn===null?gn=new Set([this]):gn.add(this));var r=t.stack;this.componentDidCatch(t.value,{componentStack:r!==null?r:""})}),i}function tv(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new PF;var n=new Set;s.set(t,n)}else n=s.get(t),n===void 0&&(n=new Set,s.set(t,n));n.has(i)||(n.add(i),e=HF.bind(null,e,t,i),t.then(e,e))}function iv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function sv(e,t,i,s,n){return e.mode&1?(e.flags|=65536,e.lanes=n,e):(e===t?e.flags|=65536:(e.flags|=128,i.flags|=131072,i.flags&=-52805,i.tag===1&&(i.alternate===null?i.tag=17:(t=Ms(-1,1),t.tag=2,pn(i,t,1))),i.lanes|=1),e)}var FF=Bs.ReactCurrentOwner,Xt=!1;function It(e,t,i,s){t.child=e===null?Yy(t,null,i,s):Sr(t,e.child,i,s)}function nv(e,t,i,s,n){i=i.render;var o=t.ref;return pr(t,n),s=Sf(e,t,i,s,o,n),i=Ef(),e!==null&&!Xt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Os(e,t,n)):(Ve&&i&&uf(t),t.flags|=1,It(e,t,s,n),t.child)}function ov(e,t,i,s,n){if(e===null){var o=i.type;return typeof o=="function"&&!If(o)&&o.defaultProps===void 0&&i.compare===null&&i.defaultProps===void 0?(t.tag=15,t.type=o,yS(e,t,o,s,n)):(e=Uu(i.type,null,s,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&n)){var r=o.memoizedProps;if(i=i.compare,i=i!==null?i:Xl,i(r,s)&&e.ref===t.ref)return Os(e,t,n)}return t.flags|=1,e=mn(o,s),e.ref=t.ref,e.return=t,t.child=e}function yS(e,t,i,s,n){if(e!==null){var o=e.memoizedProps;if(Xl(o,s)&&e.ref===t.ref)if(Xt=!1,t.pendingProps=s=o,(e.lanes&n)!==0)e.flags&131072&&(Xt=!0);else return t.lanes=e.lanes,Os(e,t,n)}return zp(e,t,i,s,n)}function SS(e,t,i){var s=t.pendingProps,n=s.children,o=e!==null?e.memoizedState:null;if(s.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Le(rr,ci),ci|=i;else{if(!(i&1073741824))return e=o!==null?o.baseLanes|i:i,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Le(rr,ci),ci|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=o!==null?o.baseLanes:i,Le(rr,ci),ci|=s}else o!==null?(s=o.baseLanes|i,t.memoizedState=null):s=i,Le(rr,ci),ci|=s;return It(e,t,n,i),t.child}function ES(e,t){var i=t.ref;(e===null&&i!==null||e!==null&&e.ref!==i)&&(t.flags|=512,t.flags|=2097152)}function zp(e,t,i,s,n){var o=si(i)?co:At.current;return o=wr(t,o),pr(t,n),i=Sf(e,t,i,s,o,n),s=Ef(),e!==null&&!Xt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Os(e,t,n)):(Ve&&s&&uf(t),t.flags|=1,It(e,t,i,n),t.child)}function rv(e,t,i,s,n){if(si(i)){var o=!0;vd(t)}else o=!1;if(pr(t,n),t.stateNode===null)Hu(e,t),CS(t,i,s),Wp(t,i,s,n),s=!0;else if(e===null){var r=t.stateNode,l=t.memoizedProps;r.props=l;var a=r.context,u=i.contextType;typeof u=="object"&&u!==null?u=_i(u):(u=si(i)?co:At.current,u=wr(t,u));var d=i.getDerivedStateFromProps,h=typeof d=="function"||typeof r.getSnapshotBeforeUpdate=="function";h||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(l!==s||a!==u)&&ev(t,r,s,u),en=!1;var p=t.memoizedState;r.state=p,Rd(t,s,r,n),a=t.memoizedState,l!==s||p!==a||ii.current||en?(typeof d=="function"&&(Bp(t,i,d,s),a=t.memoizedState),(l=en||JC(t,i,l,s,p,a,u))?(h||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=a),r.props=s,r.state=a,r.context=u,s=l):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{r=t.stateNode,qy(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:zi(t.type,l),r.props=u,h=t.pendingProps,p=r.context,a=i.contextType,typeof a=="object"&&a!==null?a=_i(a):(a=si(i)?co:At.current,a=wr(t,a));var C=i.getDerivedStateFromProps;(d=typeof C=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(l!==h||p!==a)&&ev(t,r,s,a),en=!1,p=t.memoizedState,r.state=p,Rd(t,s,r,n);var v=t.memoizedState;l!==h||p!==v||ii.current||en?(typeof C=="function"&&(Bp(t,i,C,s),v=t.memoizedState),(u=en||JC(t,i,u,s,p,v,a)||!1)?(d||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(s,v,a),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(s,v,a)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=v),r.props=s,r.state=v,r.context=a,s=u):(typeof r.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),s=!1)}return $p(e,t,i,s,o,n)}function $p(e,t,i,s,n,o){ES(e,t);var r=(t.flags&128)!==0;if(!s&&!r)return n&&$C(t,i,!1),Os(e,t,o);s=t.stateNode,FF.current=t;var l=r&&typeof i.getDerivedStateFromError!="function"?null:s.render();return t.flags|=1,e!==null&&r?(t.child=Sr(t,e.child,null,o),t.child=Sr(t,null,l,o)):It(e,t,l,o),t.memoizedState=s.state,n&&$C(t,i,!0),t.child}function RS(e){var t=e.stateNode;t.pendingContext?zC(e,t.pendingContext,t.pendingContext!==t.context):t.context&&zC(e,t.context,!1),Cf(e,t.containerInfo)}function lv(e,t,i,s,n){return yr(),cf(n),t.flags|=256,It(e,t,i,s),t.child}var Kp={dehydrated:null,treeContext:null,retryLane:0};function jp(e){return{baseLanes:e,cachePool:null,transitions:null}}function TS(e,t,i){var s=t.pendingProps,n=Be.current,o=!1,r=(t.flags&128)!==0,l;if((l=r)||(l=e!==null&&e.memoizedState===null?!1:(n&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(n|=1),Le(Be,n&1),e===null)return Vp(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(r=s.children,e=s.fallback,o?(s=t.mode,o=t.child,r={mode:"hidden",children:r},!(s&1)&&o!==null?(o.childLanes=0,o.pendingProps=r):o=wc(r,s,0,null),e=io(e,s,i,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=jp(i),t.memoizedState=Kp,e):Df(t,r));if(n=e.memoizedState,n!==null&&(l=n.dehydrated,l!==null))return AF(e,t,r,s,l,n,i);if(o){o=s.fallback,r=t.mode,n=e.child,l=n.sibling;var a={mode:"hidden",children:s.children};return!(r&1)&&t.child!==n?(s=t.child,s.childLanes=0,s.pendingProps=a,t.deletions=null):(s=mn(n,a),s.subtreeFlags=n.subtreeFlags&14680064),l!==null?o=mn(l,o):(o=io(o,r,i,null),o.flags|=2),o.return=t,s.return=t,s.sibling=o,t.child=s,s=o,o=t.child,r=e.child.memoizedState,r=r===null?jp(i):{baseLanes:r.baseLanes|i,cachePool:null,transitions:r.transitions},o.memoizedState=r,o.childLanes=e.childLanes&~i,t.memoizedState=Kp,s}return o=e.child,e=o.sibling,s=mn(o,{mode:"visible",children:s.children}),!(t.mode&1)&&(s.lanes=i),s.return=t,s.sibling=null,e!==null&&(i=t.deletions,i===null?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=s,t.memoizedState=null,s}function Df(e,t){return t=wc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Su(e,t,i,s){return s!==null&&cf(s),Sr(t,e.child,null,i),e=Df(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function AF(e,t,i,s,n,o,r){if(i)return t.flags&256?(t.flags&=-257,s=Nh(Error(G(422))),Su(e,t,r,s)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=s.fallback,n=t.mode,s=wc({mode:"visible",children:s.children},n,0,null),o=io(o,n,r,null),o.flags|=2,s.return=t,o.return=t,s.sibling=o,t.child=s,t.mode&1&&Sr(t,e.child,null,r),t.child.memoizedState=jp(r),t.memoizedState=Kp,o);if(!(t.mode&1))return Su(e,t,r,null);if(n.data==="$!"){if(s=n.nextSibling&&n.nextSibling.dataset,s)var l=s.dgst;return s=l,o=Error(G(419)),s=Nh(o,s,void 0),Su(e,t,r,s)}if(l=(r&e.childLanes)!==0,Xt||l){if(s=gt,s!==null){switch(r&-r){case 4:n=2;break;case 16:n=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:n=32;break;case 536870912:n=268435456;break;default:n=0}n=n&(s.suspendedLanes|r)?0:n,n!==0&&n!==o.retryLane&&(o.retryLane=n,_s(e,n),Ji(s,e,n,-1))}return Mf(),s=Nh(Error(G(421))),Su(e,t,r,s)}return n.data==="$?"?(t.flags|=128,t.child=e.child,t=BF.bind(null,e),n._reactRetry=t,null):(e=o.treeContext,mi=hn(n.nextSibling),Ci=t,Ve=!0,Yi=null,e!==null&&(Pi[Fi++]=bs,Pi[Fi++]=Ls,Pi[Fi++]=ho,bs=e.id,Ls=e.overflow,ho=t),t=Df(t,s.children),t.flags|=4096,t)}function av(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Hp(e.return,t,i)}function _h(e,t,i,s,n){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:n}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=s,o.tail=i,o.tailMode=n)}function DS(e,t,i){var s=t.pendingProps,n=s.revealOrder,o=s.tail;if(It(e,t,s.children,i),s=Be.current,s&2)s=s&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&av(e,i,t);else if(e.tag===19)av(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}s&=1}if(Le(Be,s),!(t.mode&1))t.memoizedState=null;else switch(n){case"forwards":for(i=t.child,n=null;i!==null;)e=i.alternate,e!==null&&Td(e)===null&&(n=i),i=i.sibling;i=n,i===null?(n=t.child,t.child=null):(n=i.sibling,i.sibling=null),_h(t,!1,n,i,o);break;case"backwards":for(i=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&Td(e)===null){t.child=n;break}e=n.sibling,n.sibling=i,i=n,n=e}_h(t,!0,i,null,o);break;case"together":_h(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Os(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),go|=t.lanes,!(i&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(G(153));if(t.child!==null){for(e=t.child,i=mn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=mn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function bF(e,t,i){switch(t.tag){case 3:RS(t),yr();break;case 5:Xy(t);break;case 1:si(t.type)&&vd(t);break;case 4:Cf(t,t.stateNode.containerInfo);break;case 10:var s=t.type._context,n=t.memoizedProps.value;Le(Sd,s._currentValue),s._currentValue=n;break;case 13:if(s=t.memoizedState,s!==null)return s.dehydrated!==null?(Le(Be,Be.current&1),t.flags|=128,null):i&t.child.childLanes?TS(e,t,i):(Le(Be,Be.current&1),e=Os(e,t,i),e!==null?e.sibling:null);Le(Be,Be.current&1);break;case 19:if(s=(i&t.childLanes)!==0,e.flags&128){if(s)return DS(e,t,i);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),Le(Be,Be.current),s)break;return null;case 22:case 23:return t.lanes=0,SS(e,t,i)}return Os(e,t,i)}var PS,Yp,FS,AS;PS=function(e,t){for(var i=t.child;i!==null;){if(i.tag===5||i.tag===6)e.appendChild(i.stateNode);else if(i.tag!==4&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};Yp=function(){};FS=function(e,t,i,s){var n=e.memoizedProps;if(n!==s){e=t.stateNode,qn(ms.current);var o=null;switch(i){case"input":n=mp(e,n),s=mp(e,s),o=[];break;case"select":n=Ue({},n,{value:void 0}),s=Ue({},s,{value:void 0}),o=[];break;case"textarea":n=wp(e,n),s=wp(e,s),o=[];break;default:typeof n.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=md)}Sp(i,s);var r;i=null;for(u in n)if(!s.hasOwnProperty(u)&&n.hasOwnProperty(u)&&n[u]!=null)if(u==="style"){var l=n[u];for(r in l)l.hasOwnProperty(r)&&(i||(i={}),i[r]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(zl.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in s){var a=s[u];if(l=n!=null?n[u]:void 0,s.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(r in l)!l.hasOwnProperty(r)||a&&a.hasOwnProperty(r)||(i||(i={}),i[r]="");for(r in a)a.hasOwnProperty(r)&&l[r]!==a[r]&&(i||(i={}),i[r]=a[r])}else i||(o||(o=[]),o.push(u,i)),i=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(o=o||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(zl.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&xe("scroll",e),o||l===a||(o=[])):(o=o||[]).push(u,a))}i&&(o=o||[]).push("style",i);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};AS=function(e,t,i,s){i!==s&&(t.flags|=4)};function fl(e,t){if(!Ve)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Dt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var n=e.child;n!==null;)i|=n.lanes|n.childLanes,s|=n.subtreeFlags&14680064,s|=n.flags&14680064,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)i|=n.lanes|n.childLanes,s|=n.subtreeFlags,s|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function LF(e,t,i){var s=t.pendingProps;switch(df(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Dt(t),null;case 1:return si(t.type)&&Cd(),Dt(t),null;case 3:return s=t.stateNode,Er(),_e(ii),_e(At),wf(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(wu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Yi!==null&&(ig(Yi),Yi=null))),Yp(e,t),Dt(t),null;case 5:vf(t);var n=qn(ia.current);if(i=t.type,e!==null&&t.stateNode!=null)FS(e,t,i,s,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!s){if(t.stateNode===null)throw Error(G(166));return Dt(t),null}if(e=qn(ms.current),wu(t)){s=t.stateNode,i=t.type;var o=t.memoizedProps;switch(s[ps]=t,s[ea]=o,e=(t.mode&1)!==0,i){case"dialog":xe("cancel",s),xe("close",s);break;case"iframe":case"object":case"embed":xe("load",s);break;case"video":case"audio":for(n=0;n<Sl.length;n++)xe(Sl[n],s);break;case"source":xe("error",s);break;case"img":case"image":case"link":xe("error",s),xe("load",s);break;case"details":xe("toggle",s);break;case"input":CC(s,o),xe("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!o.multiple},xe("invalid",s);break;case"textarea":wC(s,o),xe("invalid",s)}Sp(i,o),n=null;for(var r in o)if(o.hasOwnProperty(r)){var l=o[r];r==="children"?typeof l=="string"?s.textContent!==l&&(o.suppressHydrationWarning!==!0&&vu(s.textContent,l,e),n=["children",l]):typeof l=="number"&&s.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&vu(s.textContent,l,e),n=["children",""+l]):zl.hasOwnProperty(r)&&l!=null&&r==="onScroll"&&xe("scroll",s)}switch(i){case"input":du(s),vC(s,o,!0);break;case"textarea":du(s),yC(s);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(s.onclick=md)}s=n,t.updateQueue=s,s!==null&&(t.flags|=4)}else{r=n.nodeType===9?n:n.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=iy(i)),e==="http://www.w3.org/1999/xhtml"?i==="script"?(e=r.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=r.createElement(i,{is:s.is}):(e=r.createElement(i),i==="select"&&(r=e,s.multiple?r.multiple=!0:s.size&&(r.size=s.size))):e=r.createElementNS(e,i),e[ps]=t,e[ea]=s,PS(e,t,!1,!1),t.stateNode=e;e:{switch(r=Ep(i,s),i){case"dialog":xe("cancel",e),xe("close",e),n=s;break;case"iframe":case"object":case"embed":xe("load",e),n=s;break;case"video":case"audio":for(n=0;n<Sl.length;n++)xe(Sl[n],e);n=s;break;case"source":xe("error",e),n=s;break;case"img":case"image":case"link":xe("error",e),xe("load",e),n=s;break;case"details":xe("toggle",e),n=s;break;case"input":CC(e,s),n=mp(e,s),xe("invalid",e);break;case"option":n=s;break;case"select":e._wrapperState={wasMultiple:!!s.multiple},n=Ue({},s,{value:void 0}),xe("invalid",e);break;case"textarea":wC(e,s),n=wp(e,s),xe("invalid",e);break;default:n=s}Sp(i,n),l=n;for(o in l)if(l.hasOwnProperty(o)){var a=l[o];o==="style"?oy(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&sy(e,a)):o==="children"?typeof a=="string"?(i!=="textarea"||a!=="")&&$l(e,a):typeof a=="number"&&$l(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(zl.hasOwnProperty(o)?a!=null&&o==="onScroll"&&xe("scroll",e):a!=null&&Yg(e,o,a,r))}switch(i){case"input":du(e),vC(e,s,!1);break;case"textarea":du(e),yC(e);break;case"option":s.value!=null&&e.setAttribute("value",""+vn(s.value));break;case"select":e.multiple=!!s.multiple,o=s.value,o!=null?ur(e,!!s.multiple,o,!1):s.defaultValue!=null&&ur(e,!!s.multiple,s.defaultValue,!0);break;default:typeof n.onClick=="function"&&(e.onclick=md)}switch(i){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}}s&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Dt(t),null;case 6:if(e&&t.stateNode!=null)AS(e,t,e.memoizedProps,s);else{if(typeof s!="string"&&t.stateNode===null)throw Error(G(166));if(i=qn(ia.current),qn(ms.current),wu(t)){if(s=t.stateNode,i=t.memoizedProps,s[ps]=t,(o=s.nodeValue!==i)&&(e=Ci,e!==null))switch(e.tag){case 3:vu(s.nodeValue,i,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&vu(s.nodeValue,i,(e.mode&1)!==0)}o&&(t.flags|=4)}else s=(i.nodeType===9?i:i.ownerDocument).createTextNode(s),s[ps]=t,t.stateNode=s}return Dt(t),null;case 13:if(_e(Be),s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ve&&mi!==null&&t.mode&1&&!(t.flags&128))Ky(),yr(),t.flags|=98560,o=!1;else if(o=wu(t),s!==null&&s.dehydrated!==null){if(e===null){if(!o)throw Error(G(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(G(317));o[ps]=t}else yr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Dt(t),o=!1}else Yi!==null&&(ig(Yi),Yi=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=i,t):(s=s!==null,s!==(e!==null&&e.memoizedState!==null)&&s&&(t.child.flags|=8192,t.mode&1&&(e===null||Be.current&1?ut===0&&(ut=3):Mf())),t.updateQueue!==null&&(t.flags|=4),Dt(t),null);case 4:return Er(),Yp(e,t),e===null&&Zl(t.stateNode.containerInfo),Dt(t),null;case 10:return gf(t.type._context),Dt(t),null;case 17:return si(t.type)&&Cd(),Dt(t),null;case 19:if(_e(Be),o=t.memoizedState,o===null)return Dt(t),null;if(s=(t.flags&128)!==0,r=o.rendering,r===null)if(s)fl(o,!1);else{if(ut!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(r=Td(e),r!==null){for(t.flags|=128,fl(o,!1),s=r.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),t.subtreeFlags=0,s=i,i=t.child;i!==null;)o=i,e=s,o.flags&=14680066,r=o.alternate,r===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=r.childLanes,o.lanes=r.lanes,o.child=r.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=r.memoizedProps,o.memoizedState=r.memoizedState,o.updateQueue=r.updateQueue,o.type=r.type,e=r.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),i=i.sibling;return Le(Be,Be.current&1|2),t.child}e=e.sibling}o.tail!==null&&qe()>Tr&&(t.flags|=128,s=!0,fl(o,!1),t.lanes=4194304)}else{if(!s)if(e=Td(r),e!==null){if(t.flags|=128,s=!0,i=e.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),fl(o,!0),o.tail===null&&o.tailMode==="hidden"&&!r.alternate&&!Ve)return Dt(t),null}else 2*qe()-o.renderingStartTime>Tr&&i!==1073741824&&(t.flags|=128,s=!0,fl(o,!1),t.lanes=4194304);o.isBackwards?(r.sibling=t.child,t.child=r):(i=o.last,i!==null?i.sibling=r:t.child=r,o.last=r)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=qe(),t.sibling=null,i=Be.current,Le(Be,s?i&1|2:i&1),t):(Dt(t),null);case 22:case 23:return Lf(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&t.mode&1?ci&1073741824&&(Dt(t),t.subtreeFlags&6&&(t.flags|=8192)):Dt(t),null;case 24:return null;case 25:return null}throw Error(G(156,t.tag))}function MF(e,t){switch(df(t),t.tag){case 1:return si(t.type)&&Cd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Er(),_e(ii),_e(At),wf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return vf(t),null;case 13:if(_e(Be),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));yr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _e(Be),null;case 4:return Er(),null;case 10:return gf(t.type._context),null;case 22:case 23:return Lf(),null;case 24:return null;default:return null}}var Eu=!1,Pt=!1,IF=typeof WeakSet=="function"?WeakSet:Set,z=null;function or(e,t){var i=e.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(s){Ke(e,t,s)}else i.current=null}function Qp(e,t,i){try{i()}catch(s){Ke(e,t,s)}}var uv=!1;function xF(e,t){if(Ip=pd,e=xy(),af(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var n=s.anchorOffset,o=s.focusNode;s=s.focusOffset;try{i.nodeType,o.nodeType}catch{i=null;break e}var r=0,l=-1,a=-1,u=0,d=0,h=e,p=null;t:for(;;){for(var C;h!==i||n!==0&&h.nodeType!==3||(l=r+n),h!==o||s!==0&&h.nodeType!==3||(a=r+s),h.nodeType===3&&(r+=h.nodeValue.length),(C=h.firstChild)!==null;)p=h,h=C;for(;;){if(h===e)break t;if(p===i&&++u===n&&(l=r),p===o&&++d===s&&(a=r),(C=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=C}i=l===-1||a===-1?null:{start:l,end:a}}else i=null}i=i||{start:0,end:0}}else i=null;for(xp={focusedElem:e,selectionRange:i},pd=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,R=v.memoizedState,w=t.stateNode,m=w.getSnapshotBeforeUpdate(t.elementType===t.type?y:zi(t.type,y),R);w.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(G(163))}}catch(T){Ke(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return v=uv,uv=!1,v}function kl(e,t,i){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var n=s=s.next;do{if((n.tag&e)===e){var o=n.destroy;n.destroy=void 0,o!==void 0&&Qp(t,i,o)}n=n.next}while(n!==s)}}function Cc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var i=t=t.next;do{if((i.tag&e)===e){var s=i.create;i.destroy=s()}i=i.next}while(i!==t)}}function qp(e){var t=e.ref;if(t!==null){var i=e.stateNode;switch(e.tag){case 5:e=i;break;default:e=i}typeof t=="function"?t(e):t.current=e}}function bS(e){var t=e.alternate;t!==null&&(e.alternate=null,bS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ps],delete t[ea],delete t[Op],delete t[fF],delete t[mF])),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 LS(e){return e.tag===5||e.tag===3||e.tag===4}function dv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||LS(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xp(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.nodeType===8?i.parentNode.insertBefore(e,t):i.insertBefore(e,t):(i.nodeType===8?(t=i.parentNode,t.insertBefore(e,i)):(t=i,t.appendChild(e)),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=md));else if(s!==4&&(e=e.child,e!==null))for(Xp(e,t,i),e=e.sibling;e!==null;)Xp(e,t,i),e=e.sibling}function Zp(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(Zp(e,t,i),e=e.sibling;e!==null;)Zp(e,t,i),e=e.sibling}var Ct=null,$i=!1;function Qs(e,t,i){for(i=i.child;i!==null;)MS(e,t,i),i=i.sibling}function MS(e,t,i){if(fs&&typeof fs.onCommitFiberUnmount=="function")try{fs.onCommitFiberUnmount(uc,i)}catch{}switch(i.tag){case 5:Pt||or(i,t);case 6:var s=Ct,n=$i;Ct=null,Qs(e,t,i),Ct=s,$i=n,Ct!==null&&($i?(e=Ct,i=i.stateNode,e.nodeType===8?e.parentNode.removeChild(i):e.removeChild(i)):Ct.removeChild(i.stateNode));break;case 18:Ct!==null&&($i?(e=Ct,i=i.stateNode,e.nodeType===8?Ah(e.parentNode,i):e.nodeType===1&&Ah(e,i),Ql(e)):Ah(Ct,i.stateNode));break;case 4:s=Ct,n=$i,Ct=i.stateNode.containerInfo,$i=!0,Qs(e,t,i),Ct=s,$i=n;break;case 0:case 11:case 14:case 15:if(!Pt&&(s=i.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){n=s=s.next;do{var o=n,r=o.destroy;o=o.tag,r!==void 0&&(o&2||o&4)&&Qp(i,t,r),n=n.next}while(n!==s)}Qs(e,t,i);break;case 1:if(!Pt&&(or(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=i.memoizedProps,s.state=i.memoizedState,s.componentWillUnmount()}catch(l){Ke(i,t,l)}Qs(e,t,i);break;case 21:Qs(e,t,i);break;case 22:i.mode&1?(Pt=(s=Pt)||i.memoizedState!==null,Qs(e,t,i),Pt=s):Qs(e,t,i);break;default:Qs(e,t,i)}}function cv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var i=e.stateNode;i===null&&(i=e.stateNode=new IF),t.forEach(function(s){var n=WF.bind(null,e,s);i.has(s)||(i.add(s),s.then(n,n))})}}function Ui(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var n=i[s];try{var o=e,r=t,l=r;e:for(;l!==null;){switch(l.tag){case 5:Ct=l.stateNode,$i=!1;break e;case 3:Ct=l.stateNode.containerInfo,$i=!0;break e;case 4:Ct=l.stateNode.containerInfo,$i=!0;break e}l=l.return}if(Ct===null)throw Error(G(160));MS(o,r,n),Ct=null,$i=!1;var a=n.alternate;a!==null&&(a.return=null),n.return=null}catch(u){Ke(n,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)IS(t,e),t=t.sibling}function IS(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ui(t,e),rs(e),s&4){try{kl(3,e,e.return),Cc(3,e)}catch(y){Ke(e,e.return,y)}try{kl(5,e,e.return)}catch(y){Ke(e,e.return,y)}}break;case 1:Ui(t,e),rs(e),s&512&&i!==null&&or(i,i.return);break;case 5:if(Ui(t,e),rs(e),s&512&&i!==null&&or(i,i.return),e.flags&32){var n=e.stateNode;try{$l(n,"")}catch(y){Ke(e,e.return,y)}}if(s&4&&(n=e.stateNode,n!=null)){var o=e.memoizedProps,r=i!==null?i.memoizedProps:o,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&ey(n,o),Ep(l,r);var u=Ep(l,o);for(r=0;r<a.length;r+=2){var d=a[r],h=a[r+1];d==="style"?oy(n,h):d==="dangerouslySetInnerHTML"?sy(n,h):d==="children"?$l(n,h):Yg(n,d,h,u)}switch(l){case"input":Cp(n,o);break;case"textarea":ty(n,o);break;case"select":var p=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!o.multiple;var C=o.value;C!=null?ur(n,!!o.multiple,C,!1):p!==!!o.multiple&&(o.defaultValue!=null?ur(n,!!o.multiple,o.defaultValue,!0):ur(n,!!o.multiple,o.multiple?[]:"",!1))}n[ea]=o}catch(y){Ke(e,e.return,y)}}break;case 6:if(Ui(t,e),rs(e),s&4){if(e.stateNode===null)throw Error(G(162));n=e.stateNode,o=e.memoizedProps;try{n.nodeValue=o}catch(y){Ke(e,e.return,y)}}break;case 3:if(Ui(t,e),rs(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Ql(t.containerInfo)}catch(y){Ke(e,e.return,y)}break;case 4:Ui(t,e),rs(e);break;case 13:Ui(t,e),rs(e),n=e.child,n.flags&8192&&(o=n.memoizedState!==null,n.stateNode.isHidden=o,!o||n.alternate!==null&&n.alternate.memoizedState!==null||(Af=qe())),s&4&&cv(e);break;case 22:if(d=i!==null&&i.memoizedState!==null,e.mode&1?(Pt=(u=Pt)||d,Ui(t,e),Pt=u):Ui(t,e),rs(e),s&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(z=e,d=e.child;d!==null;){for(h=z=d;z!==null;){switch(p=z,C=p.child,p.tag){case 0:case 11:case 14:case 15:kl(4,p,p.return);break;case 1:or(p,p.return);var v=p.stateNode;if(typeof v.componentWillUnmount=="function"){s=p,i=p.return;try{t=s,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(y){Ke(s,i,y)}}break;case 5:or(p,p.return);break;case 22:if(p.memoizedState!==null){pv(h);continue}}C!==null?(C.return=p,z=C):pv(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{n=h.stateNode,u?(o=n.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=h.stateNode,a=h.memoizedProps.style,r=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=ny("display",r))}catch(y){Ke(e,e.return,y)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(y){Ke(e,e.return,y)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||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:Ui(t,e),rs(e),s&4&&cv(e);break;case 21:break;default:Ui(t,e),rs(e)}}function rs(e){var t=e.flags;if(t&2){try{e:{for(var i=e.return;i!==null;){if(LS(i)){var s=i;break e}i=i.return}throw Error(G(160))}switch(s.tag){case 5:var n=s.stateNode;s.flags&32&&($l(n,""),s.flags&=-33);var o=dv(e);Zp(e,o,n);break;case 3:case 4:var r=s.stateNode.containerInfo,l=dv(e);Xp(e,l,r);break;default:throw Error(G(161))}}catch(a){Ke(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function NF(e,t,i){z=e,xS(e)}function xS(e,t,i){for(var s=(e.mode&1)!==0;z!==null;){var n=z,o=n.child;if(n.tag===22&&s){var r=n.memoizedState!==null||Eu;if(!r){var l=n.alternate,a=l!==null&&l.memoizedState!==null||Pt;l=Eu;var u=Pt;if(Eu=r,(Pt=a)&&!u)for(z=n;z!==null;)r=z,a=r.child,r.tag===22&&r.memoizedState!==null?gv(n):a!==null?(a.return=r,z=a):gv(n);for(;o!==null;)z=o,xS(o),o=o.sibling;z=n,Eu=l,Pt=u}hv(e)}else n.subtreeFlags&8772&&o!==null?(o.return=n,z=o):hv(e)}}function hv(e){for(;z!==null;){var t=z;if(t.flags&8772){var i=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Pt||Cc(5,t);break;case 1:var s=t.stateNode;if(t.flags&4&&!Pt)if(i===null)s.componentDidMount();else{var n=t.elementType===t.type?i.memoizedProps:zi(t.type,i.memoizedProps);s.componentDidUpdate(n,i.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&qC(t,o,s);break;case 3:var r=t.updateQueue;if(r!==null){if(i=null,t.child!==null)switch(t.child.tag){case 5:i=t.child.stateNode;break;case 1:i=t.child.stateNode}qC(t,r,i)}break;case 5:var l=t.stateNode;if(i===null&&t.flags&4){i=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break;case"img":a.src&&(i.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&Ql(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(G(163))}Pt||t.flags&512&&qp(t)}catch(p){Ke(t,t.return,p)}}if(t===e){z=null;break}if(i=t.sibling,i!==null){i.return=t.return,z=i;break}z=t.return}}function pv(e){for(;z!==null;){var t=z;if(t===e){z=null;break}var i=t.sibling;if(i!==null){i.return=t.return,z=i;break}z=t.return}}function gv(e){for(;z!==null;){var t=z;try{switch(t.tag){case 0:case 11:case 15:var i=t.return;try{Cc(4,t)}catch(a){Ke(t,i,a)}break;case 1:var s=t.stateNode;if(typeof s.componentDidMount=="function"){var n=t.return;try{s.componentDidMount()}catch(a){Ke(t,n,a)}}var o=t.return;try{qp(t)}catch(a){Ke(t,o,a)}break;case 5:var r=t.return;try{qp(t)}catch(a){Ke(t,r,a)}}}catch(a){Ke(t,t.return,a)}if(t===e){z=null;break}var l=t.sibling;if(l!==null){l.return=t.return,z=l;break}z=t.return}}var _F=Math.ceil,Fd=Bs.ReactCurrentDispatcher,Pf=Bs.ReactCurrentOwner,Ii=Bs.ReactCurrentBatchConfig,ge=0,gt=null,st=null,wt=0,ci=0,rr=Fn(0),ut=0,ra=null,go=0,vc=0,Ff=0,Vl=null,qt=null,Af=0,Tr=1/0,Ps=null,Ad=!1,Jp=null,gn=null,Ru=!1,rn=null,bd=0,Hl=0,eg=null,Bu=-1,Wu=0;function _t(){return ge&6?qe():Bu!==-1?Bu:Bu=qe()}function fn(e){return e.mode&1?ge&2&&wt!==0?wt&-wt:vF.transition!==null?(Wu===0&&(Wu=Cy()),Wu):(e=Te,e!==0||(e=window.event,e=e===void 0?16:Ty(e.type)),e):1}function Ji(e,t,i,s){if(50<Hl)throw Hl=0,eg=null,Error(G(185));ka(e,i,s),(!(ge&2)||e!==gt)&&(e===gt&&(!(ge&2)&&(vc|=i),ut===4&&sn(e,wt)),ni(e,s),i===1&&ge===0&&!(t.mode&1)&&(Tr=qe()+500,gc&&An()))}function ni(e,t){var i=e.callbackNode;vP(e,t);var s=hd(e,e===gt?wt:0);if(s===0)i!==null&&RC(i),e.callbackNode=null,e.callbackPriority=0;else if(t=s&-s,e.callbackPriority!==t){if(i!=null&&RC(i),t===1)e.tag===0?CF(fv.bind(null,e)):Uy(fv.bind(null,e)),pF(function(){!(ge&6)&&An()}),i=null;else{switch(vy(s)){case 1:i=Jg;break;case 4:i=fy;break;case 16:i=cd;break;case 536870912:i=my;break;default:i=cd}i=BS(i,NS.bind(null,e))}e.callbackPriority=t,e.callbackNode=i}}function NS(e,t){if(Bu=-1,Wu=0,ge&6)throw Error(G(327));var i=e.callbackNode;if(gr()&&e.callbackNode!==i)return null;var s=hd(e,e===gt?wt:0);if(s===0)return null;if(s&30||s&e.expiredLanes||t)t=Ld(e,s);else{t=s;var n=ge;ge|=2;var o=OS();(gt!==e||wt!==t)&&(Ps=null,Tr=qe()+500,to(e,t));do try{kF();break}catch(l){_S(e,l)}while(!0);pf(),Fd.current=o,ge=n,st!==null?t=0:(gt=null,wt=0,t=ut)}if(t!==0){if(t===2&&(n=Fp(e),n!==0&&(s=n,t=tg(e,n))),t===1)throw i=ra,to(e,0),sn(e,s),ni(e,qe()),i;if(t===6)sn(e,s);else{if(n=e.current.alternate,!(s&30)&&!OF(n)&&(t=Ld(e,s),t===2&&(o=Fp(e),o!==0&&(s=o,t=tg(e,o))),t===1))throw i=ra,to(e,0),sn(e,s),ni(e,qe()),i;switch(e.finishedWork=n,e.finishedLanes=s,t){case 0:case 1:throw Error(G(345));case 2:Hn(e,qt,Ps);break;case 3:if(sn(e,s),(s&130023424)===s&&(t=Af+500-qe(),10<t)){if(hd(e,0)!==0)break;if(n=e.suspendedLanes,(n&s)!==s){_t(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=_p(Hn.bind(null,e,qt,Ps),t);break}Hn(e,qt,Ps);break;case 4:if(sn(e,s),(s&4194240)===s)break;for(t=e.eventTimes,n=-1;0<s;){var r=31-Zi(s);o=1<<r,r=t[r],r>n&&(n=r),s&=~o}if(s=n,s=qe()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*_F(s/1960))-s,10<s){e.timeoutHandle=_p(Hn.bind(null,e,qt,Ps),s);break}Hn(e,qt,Ps);break;case 5:Hn(e,qt,Ps);break;default:throw Error(G(329))}}}return ni(e,qe()),e.callbackNode===i?NS.bind(null,e):null}function tg(e,t){var i=Vl;return e.current.memoizedState.isDehydrated&&(to(e,t).flags|=256),e=Ld(e,t),e!==2&&(t=qt,qt=i,t!==null&&ig(t)),e}function ig(e){qt===null?qt=e:qt.push.apply(qt,e)}function OF(e){for(var t=e;;){if(t.flags&16384){var i=t.updateQueue;if(i!==null&&(i=i.stores,i!==null))for(var s=0;s<i.length;s++){var n=i[s],o=n.getSnapshot;n=n.value;try{if(!ts(o(),n))return!1}catch{return!1}}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function sn(e,t){for(t&=~Ff,t&=~vc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var i=31-Zi(t),s=1<<i;e[i]=-1,t&=~s}}function fv(e){if(ge&6)throw Error(G(327));gr();var t=hd(e,0);if(!(t&1))return ni(e,qe()),null;var i=Ld(e,t);if(e.tag!==0&&i===2){var s=Fp(e);s!==0&&(t=s,i=tg(e,s))}if(i===1)throw i=ra,to(e,0),sn(e,t),ni(e,qe()),i;if(i===6)throw Error(G(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Hn(e,qt,Ps),ni(e,qe()),null}function bf(e,t){var i=ge;ge|=1;try{return e(t)}finally{ge=i,ge===0&&(Tr=qe()+500,gc&&An())}}function fo(e){rn!==null&&rn.tag===0&&!(ge&6)&&gr();var t=ge;ge|=1;var i=Ii.transition,s=Te;try{if(Ii.transition=null,Te=1,e)return e()}finally{Te=s,Ii.transition=i,ge=t,!(ge&6)&&An()}}function Lf(){ci=rr.current,_e(rr)}function to(e,t){e.finishedWork=null,e.finishedLanes=0;var i=e.timeoutHandle;if(i!==-1&&(e.timeoutHandle=-1,hF(i)),st!==null)for(i=st.return;i!==null;){var s=i;switch(df(s),s.tag){case 1:s=s.type.childContextTypes,s!=null&&Cd();break;case 3:Er(),_e(ii),_e(At),wf();break;case 5:vf(s);break;case 4:Er();break;case 13:_e(Be);break;case 19:_e(Be);break;case 10:gf(s.type._context);break;case 22:case 23:Lf()}i=i.return}if(gt=e,st=e=mn(e.current,null),wt=ci=t,ut=0,ra=null,Ff=vc=go=0,qt=Vl=null,Qn!==null){for(t=0;t<Qn.length;t++)if(i=Qn[t],s=i.interleaved,s!==null){i.interleaved=null;var n=s.next,o=i.pending;if(o!==null){var r=o.next;o.next=n,s.next=r}i.pending=s}Qn=null}return e}function _S(e,t){do{var i=st;try{if(pf(),ku.current=Pd,Dd){for(var s=We.memoizedState;s!==null;){var n=s.queue;n!==null&&(n.pending=null),s=s.next}Dd=!1}if(po=0,ht=lt=We=null,Gl=!1,sa=0,Pf.current=null,i===null||i.return===null){ut=1,ra=t,st=null;break}e:{var o=e,r=i.return,l=i,a=t;if(t=wt,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,d=l,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var C=iv(r);if(C!==null){C.flags&=-257,sv(C,r,l,o,t),C.mode&1&&tv(o,u,t),t=C,a=u;var v=t.updateQueue;if(v===null){var y=new Set;y.add(a),t.updateQueue=y}else v.add(a);break e}else{if(!(t&1)){tv(o,u,t),Mf();break e}a=Error(G(426))}}else if(Ve&&l.mode&1){var R=iv(r);if(R!==null){!(R.flags&65536)&&(R.flags|=256),sv(R,r,l,o,t),cf(Rr(a,l));break e}}o=a=Rr(a,l),ut!==4&&(ut=2),Vl===null?Vl=[o]:Vl.push(o),o=r;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var w=vS(o,a,t);QC(o,w);break e;case 1:l=a;var m=o.type,E=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(gn===null||!gn.has(E)))){o.flags|=65536,t&=-t,o.lanes|=t;var T=wS(o,l,t);QC(o,T);break e}}o=o.return}while(o!==null)}kS(i)}catch(P){t=P,st===i&&i!==null&&(st=i=i.return);continue}break}while(!0)}function OS(){var e=Fd.current;return Fd.current=Pd,e===null?Pd:e}function Mf(){(ut===0||ut===3||ut===2)&&(ut=4),gt===null||!(go&268435455)&&!(vc&268435455)||sn(gt,wt)}function Ld(e,t){var i=ge;ge|=2;var s=OS();(gt!==e||wt!==t)&&(Ps=null,to(e,t));do try{GF();break}catch(n){_S(e,n)}while(!0);if(pf(),ge=i,Fd.current=s,st!==null)throw Error(G(261));return gt=null,wt=0,ut}function GF(){for(;st!==null;)GS(st)}function kF(){for(;st!==null&&!uP();)GS(st)}function GS(e){var t=HS(e.alternate,e,ci);e.memoizedProps=e.pendingProps,t===null?kS(e):st=t,Pf.current=null}function kS(e){var t=e;do{var i=t.alternate;if(e=t.return,t.flags&32768){if(i=MF(i,t),i!==null){i.flags&=32767,st=i;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ut=6,st=null;return}}else if(i=LF(i,t,ci),i!==null){st=i;return}if(t=t.sibling,t!==null){st=t;return}st=t=e}while(t!==null);ut===0&&(ut=5)}function Hn(e,t,i){var s=Te,n=Ii.transition;try{Ii.transition=null,Te=1,VF(e,t,i,s)}finally{Ii.transition=n,Te=s}return null}function VF(e,t,i,s){do gr();while(rn!==null);if(ge&6)throw Error(G(327));i=e.finishedWork;var n=e.finishedLanes;if(i===null)return null;if(e.finishedWork=null,e.finishedLanes=0,i===e.current)throw Error(G(177));e.callbackNode=null,e.callbackPriority=0;var o=i.lanes|i.childLanes;if(wP(e,o),e===gt&&(st=gt=null,wt=0),!(i.subtreeFlags&2064)&&!(i.flags&2064)||Ru||(Ru=!0,BS(cd,function(){return gr(),null})),o=(i.flags&15990)!==0,i.subtreeFlags&15990||o){o=Ii.transition,Ii.transition=null;var r=Te;Te=1;var l=ge;ge|=4,Pf.current=null,xF(e,i),IS(i,e),oF(xp),pd=!!Ip,xp=Ip=null,e.current=i,NF(i),dP(),ge=l,Te=r,Ii.transition=o}else e.current=i;if(Ru&&(Ru=!1,rn=e,bd=n),o=e.pendingLanes,o===0&&(gn=null),pP(i.stateNode),ni(e,qe()),t!==null)for(s=e.onRecoverableError,i=0;i<t.length;i++)n=t[i],s(n.value,{componentStack:n.stack,digest:n.digest});if(Ad)throw Ad=!1,e=Jp,Jp=null,e;return bd&1&&e.tag!==0&&gr(),o=e.pendingLanes,o&1?e===eg?Hl++:(Hl=0,eg=e):Hl=0,An(),null}function gr(){if(rn!==null){var e=vy(bd),t=Ii.transition,i=Te;try{if(Ii.transition=null,Te=16>e?16:e,rn===null)var s=!1;else{if(e=rn,rn=null,bd=0,ge&6)throw Error(G(331));var n=ge;for(ge|=4,z=e.current;z!==null;){var o=z,r=o.child;if(z.flags&16){var l=o.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(z=u;z!==null;){var d=z;switch(d.tag){case 0:case 11:case 15:kl(8,d,o)}var h=d.child;if(h!==null)h.return=d,z=h;else for(;z!==null;){d=z;var p=d.sibling,C=d.return;if(bS(d),d===u){z=null;break}if(p!==null){p.return=C,z=p;break}z=C}}}var v=o.alternate;if(v!==null){var y=v.child;if(y!==null){v.child=null;do{var R=y.sibling;y.sibling=null,y=R}while(y!==null)}}z=o}}if(o.subtreeFlags&2064&&r!==null)r.return=o,z=r;else e:for(;z!==null;){if(o=z,o.flags&2048)switch(o.tag){case 0:case 11:case 15:kl(9,o,o.return)}var w=o.sibling;if(w!==null){w.return=o.return,z=w;break e}z=o.return}}var m=e.current;for(z=m;z!==null;){r=z;var E=r.child;if(r.subtreeFlags&2064&&E!==null)E.return=r,z=E;else e:for(r=m;z!==null;){if(l=z,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Cc(9,l)}}catch(P){Ke(l,l.return,P)}if(l===r){z=null;break e}var T=l.sibling;if(T!==null){T.return=l.return,z=T;break e}z=l.return}}if(ge=n,An(),fs&&typeof fs.onPostCommitFiberRoot=="function")try{fs.onPostCommitFiberRoot(uc,e)}catch{}s=!0}return s}finally{Te=i,Ii.transition=t}}return!1}function mv(e,t,i){t=Rr(i,t),t=vS(e,t,1),e=pn(e,t,1),t=_t(),e!==null&&(ka(e,1,t),ni(e,t))}function Ke(e,t,i){if(e.tag===3)mv(e,e,i);else for(;t!==null;){if(t.tag===3){mv(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(gn===null||!gn.has(s))){e=Rr(i,e),e=wS(t,e,1),t=pn(t,e,1),e=_t(),t!==null&&(ka(t,1,e),ni(t,e));break}}t=t.return}}function HF(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),t=_t(),e.pingedLanes|=e.suspendedLanes&i,gt===e&&(wt&i)===i&&(ut===4||ut===3&&(wt&130023424)===wt&&500>qe()-Af?to(e,0):Ff|=i),ni(e,t)}function VS(e,t){t===0&&(e.mode&1?(t=pu,pu<<=1,!(pu&130023424)&&(pu=4194304)):t=1);var i=_t();e=_s(e,t),e!==null&&(ka(e,t,i),ni(e,i))}function BF(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),VS(e,i)}function WF(e,t){var i=0;switch(e.tag){case 13:var s=e.stateNode,n=e.memoizedState;n!==null&&(i=n.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(G(314))}s!==null&&s.delete(t),VS(e,i)}var HS;HS=function(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps||ii.current)Xt=!0;else{if(!(e.lanes&i)&&!(t.flags&128))return Xt=!1,bF(e,t,i);Xt=!!(e.flags&131072)}else Xt=!1,Ve&&t.flags&1048576&&zy(t,yd,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;Hu(e,t),e=t.pendingProps;var n=wr(t,At.current);pr(t,i),n=Sf(null,t,s,e,n,i);var o=Ef();return t.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,si(s)?(o=!0,vd(t)):o=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,mf(t),n.updater=mc,t.stateNode=n,n._reactInternals=t,Wp(t,s,e,i),t=$p(null,t,s,!0,o,i)):(t.tag=0,Ve&&o&&uf(t),It(null,t,n,i),t=t.child),t;case 16:s=t.elementType;e:{switch(Hu(e,t),e=t.pendingProps,n=s._init,s=n(s._payload),t.type=s,n=t.tag=zF(s),e=zi(s,e),n){case 0:t=zp(null,t,s,e,i);break e;case 1:t=rv(null,t,s,e,i);break e;case 11:t=nv(null,t,s,e,i);break e;case 14:t=ov(null,t,s,zi(s.type,e),i);break e}throw Error(G(306,s,""))}return t;case 0:return s=t.type,n=t.pendingProps,n=t.elementType===s?n:zi(s,n),zp(e,t,s,n,i);case 1:return s=t.type,n=t.pendingProps,n=t.elementType===s?n:zi(s,n),rv(e,t,s,n,i);case 3:e:{if(RS(t),e===null)throw Error(G(387));s=t.pendingProps,o=t.memoizedState,n=o.element,qy(e,t),Rd(t,s,null,i);var r=t.memoizedState;if(s=r.element,o.isDehydrated)if(o={element:s,isDehydrated:!1,cache:r.cache,pendingSuspenseBoundaries:r.pendingSuspenseBoundaries,transitions:r.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){n=Rr(Error(G(423)),t),t=lv(e,t,s,i,n);break e}else if(s!==n){n=Rr(Error(G(424)),t),t=lv(e,t,s,i,n);break e}else for(mi=hn(t.stateNode.containerInfo.firstChild),Ci=t,Ve=!0,Yi=null,i=Yy(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(yr(),s===n){t=Os(e,t,i);break e}It(e,t,s,i)}t=t.child}return t;case 5:return Xy(t),e===null&&Vp(t),s=t.type,n=t.pendingProps,o=e!==null?e.memoizedProps:null,r=n.children,Np(s,n)?r=null:o!==null&&Np(s,o)&&(t.flags|=32),ES(e,t),It(e,t,r,i),t.child;case 6:return e===null&&Vp(t),null;case 13:return TS(e,t,i);case 4:return Cf(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Sr(t,null,s,i):It(e,t,s,i),t.child;case 11:return s=t.type,n=t.pendingProps,n=t.elementType===s?n:zi(s,n),nv(e,t,s,n,i);case 7:return It(e,t,t.pendingProps,i),t.child;case 8:return It(e,t,t.pendingProps.children,i),t.child;case 12:return It(e,t,t.pendingProps.children,i),t.child;case 10:e:{if(s=t.type._context,n=t.pendingProps,o=t.memoizedProps,r=n.value,Le(Sd,s._currentValue),s._currentValue=r,o!==null)if(ts(o.value,r)){if(o.children===n.children&&!ii.current){t=Os(e,t,i);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){r=o.child;for(var a=l.firstContext;a!==null;){if(a.context===s){if(o.tag===1){a=Ms(-1,i&-i),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?a.next=a:(a.next=d.next,d.next=a),u.pending=a}}o.lanes|=i,a=o.alternate,a!==null&&(a.lanes|=i),Hp(o.return,i,t),l.lanes|=i;break}a=a.next}}else if(o.tag===10)r=o.type===t.type?null:o.child;else if(o.tag===18){if(r=o.return,r===null)throw Error(G(341));r.lanes|=i,l=r.alternate,l!==null&&(l.lanes|=i),Hp(r,i,t),r=o.sibling}else r=o.child;if(r!==null)r.return=o;else for(r=o;r!==null;){if(r===t){r=null;break}if(o=r.sibling,o!==null){o.return=r.return,r=o;break}r=r.return}o=r}It(e,t,n.children,i),t=t.child}return t;case 9:return n=t.type,s=t.pendingProps.children,pr(t,i),n=_i(n),s=s(n),t.flags|=1,It(e,t,s,i),t.child;case 14:return s=t.type,n=zi(s,t.pendingProps),n=zi(s.type,n),ov(e,t,s,n,i);case 15:return yS(e,t,t.type,t.pendingProps,i);case 17:return s=t.type,n=t.pendingProps,n=t.elementType===s?n:zi(s,n),Hu(e,t),t.tag=1,si(s)?(e=!0,vd(t)):e=!1,pr(t,i),CS(t,s,n),Wp(t,s,n,i),$p(null,t,s,!0,e,i);case 19:return DS(e,t,i);case 22:return SS(e,t,i)}throw Error(G(156,t.tag))};function BS(e,t){return gy(e,t)}function UF(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bi(e,t,i,s){return new UF(e,t,i,s)}function If(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zF(e){if(typeof e=="function")return If(e)?1:0;if(e!=null){if(e=e.$$typeof,e===qg)return 11;if(e===Xg)return 14}return 2}function mn(e,t){var i=e.alternate;return i===null?(i=bi(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&14680064,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i}function Uu(e,t,i,s,n,o){var r=2;if(s=e,typeof e=="function")If(e)&&(r=1);else if(typeof e=="string")r=5;else e:switch(e){case qo:return io(i.children,n,o,t);case Qg:r=8,n|=8;break;case hp:return e=bi(12,i,t,n|2),e.elementType=hp,e.lanes=o,e;case pp:return e=bi(13,i,t,n),e.elementType=pp,e.lanes=o,e;case gp:return e=bi(19,i,t,n),e.elementType=gp,e.lanes=o,e;case Xw:return wc(i,n,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Qw:r=10;break e;case qw:r=9;break e;case qg:r=11;break e;case Xg:r=14;break e;case Js:r=16,s=null;break e}throw Error(G(130,e==null?e:typeof e,""))}return t=bi(r,i,t,n),t.elementType=e,t.type=s,t.lanes=o,t}function io(e,t,i,s){return e=bi(7,e,s,t),e.lanes=i,e}function wc(e,t,i,s){return e=bi(22,e,s,t),e.elementType=Xw,e.lanes=i,e.stateNode={isHidden:!1},e}function Oh(e,t,i){return e=bi(6,e,null,t),e.lanes=i,e}function Gh(e,t,i){return t=bi(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $F(e,t,i,s,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ch(0),this.expirationTimes=Ch(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ch(0),this.identifierPrefix=s,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function xf(e,t,i,s,n,o,r,l,a){return e=new $F(e,t,i,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=bi(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:s,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},mf(o),e}function KF(e,t,i){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Qo,key:s==null?null:""+s,children:e,containerInfo:t,implementation:i}}function WS(e){if(!e)return wn;e=e._reactInternals;e:{if(Ao(e)!==e||e.tag!==1)throw Error(G(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(si(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(G(171))}if(e.tag===1){var i=e.type;if(si(i))return Wy(e,i,t)}return t}function US(e,t,i,s,n,o,r,l,a){return e=xf(i,s,!0,e,n,o,r,l,a),e.context=WS(null),i=e.current,s=_t(),n=fn(i),o=Ms(s,n),o.callback=t??null,pn(i,o,n),e.current.lanes=n,ka(e,n,s),ni(e,s),e}function yc(e,t,i,s){var n=t.current,o=_t(),r=fn(n);return i=WS(i),t.context===null?t.context=i:t.pendingContext=i,t=Ms(o,r),t.payload={element:e},s=s===void 0?null:s,s!==null&&(t.callback=s),e=pn(n,t,r),e!==null&&(Ji(e,n,r,o),Gu(e,n,r)),r}function Md(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Cv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Nf(e,t){Cv(e,t),(e=e.alternate)&&Cv(e,t)}function jF(){return null}var zS=typeof reportError=="function"?reportError:function(e){console.error(e)};function _f(e){this._internalRoot=e}Sc.prototype.render=_f.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(G(409));yc(e,t,null,null)};Sc.prototype.unmount=_f.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fo(function(){yc(null,e,null,null)}),t[Ns]=null}};function Sc(e){this._internalRoot=e}Sc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Sy();e={blockedOn:null,target:e,priority:t};for(var i=0;i<tn.length&&t!==0&&t<tn[i].priority;i++);tn.splice(i,0,e),i===0&&Ry(e)}};function Of(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ec(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function vv(){}function YF(e,t,i,s,n){if(n){if(typeof s=="function"){var o=s;s=function(){var u=Md(r);o.call(u)}}var r=US(t,s,e,0,null,!1,!1,"",vv);return e._reactRootContainer=r,e[Ns]=r.current,Zl(e.nodeType===8?e.parentNode:e),fo(),r}for(;n=e.lastChild;)e.removeChild(n);if(typeof s=="function"){var l=s;s=function(){var u=Md(a);l.call(u)}}var a=xf(e,0,!1,null,null,!1,!1,"",vv);return e._reactRootContainer=a,e[Ns]=a.current,Zl(e.nodeType===8?e.parentNode:e),fo(function(){yc(t,a,i,s)}),a}function Rc(e,t,i,s,n){var o=i._reactRootContainer;if(o){var r=o;if(typeof n=="function"){var l=n;n=function(){var a=Md(r);l.call(a)}}yc(t,r,e,n)}else r=YF(i,t,e,n,s);return Md(r)}wy=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var i=yl(t.pendingLanes);i!==0&&(ef(t,i|1),ni(t,qe()),!(ge&6)&&(Tr=qe()+500,An()))}break;case 13:fo(function(){var s=_s(e,1);if(s!==null){var n=_t();Ji(s,e,1,n)}}),Nf(e,1)}};tf=function(e){if(e.tag===13){var t=_s(e,134217728);if(t!==null){var i=_t();Ji(t,e,134217728,i)}Nf(e,134217728)}};yy=function(e){if(e.tag===13){var t=fn(e),i=_s(e,t);if(i!==null){var s=_t();Ji(i,e,t,s)}Nf(e,t)}};Sy=function(){return Te};Ey=function(e,t){var i=Te;try{return Te=e,t()}finally{Te=i}};Tp=function(e,t,i){switch(t){case"input":if(Cp(e,i),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var n=pc(s);if(!n)throw Error(G(90));Jw(s),Cp(s,n)}}}break;case"textarea":ty(e,i);break;case"select":t=i.value,t!=null&&ur(e,!!i.multiple,t,!1)}};ay=bf;uy=fo;var QF={usingClientEntryPoint:!1,Events:[Ha,er,pc,ry,ly,bf]},ml={findFiberByHostInstance:Yn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},qF={bundleType:ml.bundleType,version:ml.version,rendererPackageName:ml.rendererPackageName,rendererConfig:ml.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Bs.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=hy(e),e===null?null:e.stateNode},findFiberByHostInstance:ml.findFiberByHostInstance||jF,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tu.isDisabled&&Tu.supportsFiber)try{uc=Tu.inject(qF),fs=Tu}catch{}}Ei.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=QF;Ei.createPortal=function(e,t){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Of(t))throw Error(G(200));return KF(e,t,null,i)};Ei.createRoot=function(e,t){if(!Of(e))throw Error(G(299));var i=!1,s="",n=zS;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onRecoverableError!==void 0&&(n=t.onRecoverableError)),t=xf(e,1,!1,null,null,i,!1,s,n),e[Ns]=t.current,Zl(e.nodeType===8?e.parentNode:e),new _f(t)};Ei.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(G(188)):(e=Object.keys(e).join(","),Error(G(268,e)));return e=hy(t),e=e===null?null:e.stateNode,e};Ei.flushSync=function(e){return fo(e)};Ei.hydrate=function(e,t,i){if(!Ec(t))throw Error(G(200));return Rc(null,e,t,!0,i)};Ei.hydrateRoot=function(e,t,i){if(!Of(e))throw Error(G(405));var s=i!=null&&i.hydratedSources||null,n=!1,o="",r=zS;if(i!=null&&(i.unstable_strictMode===!0&&(n=!0),i.identifierPrefix!==void 0&&(o=i.identifierPrefix),i.onRecoverableError!==void 0&&(r=i.onRecoverableError)),t=US(t,null,e,1,i??null,n,!1,o,r),e[Ns]=t.current,Zl(e),s)for(e=0;e<s.length;e++)i=s[e],n=i._getVersion,n=n(i._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[i,n]:t.mutableSourceEagerHydrationData.push(i,n);return new Sc(t)};Ei.render=function(e,t,i){if(!Ec(t))throw Error(G(200));return Rc(null,e,t,!1,i)};Ei.unmountComponentAtNode=function(e){if(!Ec(e))throw Error(G(40));return e._reactRootContainer?(fo(function(){Rc(null,null,e,!1,function(){e._reactRootContainer=null,e[Ns]=null})}),!0):!1};Ei.unstable_batchedUpdates=bf;Ei.unstable_renderSubtreeIntoContainer=function(e,t,i,s){if(!Ec(i))throw Error(G(200));if(e==null||e._reactInternals===void 0)throw Error(G(38));return Rc(e,t,i,!1,s)};Ei.version="18.3.1-next-f1338f8080-20240426";function $S(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($S)}catch(e){console.error(e)}}$S(),$w.exports=Ei;var Gf=$w.exports;const sg=_w(Gf);var kf=Object.defineProperty,XF=Object.defineProperties,ZF=Object.getOwnPropertyDescriptor,JF=Object.getOwnPropertyDescriptors,Id=Object.getOwnPropertySymbols,KS=Object.prototype.hasOwnProperty,jS=Object.prototype.propertyIsEnumerable,wv=(e,t,i)=>t in e?kf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,$=(e,t)=>{for(var i in t||(t={}))KS.call(t,i)&&wv(e,i,t[i]);if(Id)for(var i of Id(t))jS.call(t,i)&&wv(e,i,t[i]);return e},Me=(e,t)=>XF(e,JF(t)),eA=(e,t)=>{var i={};for(var s in e)KS.call(e,s)&&t.indexOf(s)<0&&(i[s]=e[s]);if(e!=null&&Id)for(var s of Id(e))t.indexOf(s)<0&&jS.call(e,s)&&(i[s]=e[s]);return i},mt=(e,t)=>{for(var i in t)kf(e,i,{get:t[i],enumerable:!0})},c=(e,t,i,s)=>{for(var n=s>1?void 0:s?ZF(t,i):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(n=(s?r(t,i,n):r(n))||n);return s&&n&&kf(t,i,n),n},Qi=(e,t)=>(i,s)=>t(i,s,e),YS={};mt(YS,{attrToBoolean:()=>xd,attrToNumber:()=>Cn,attrToString:()=>tA,defaultComparator:()=>iA,exists:()=>b,jsonEquals:()=>ng,makeNull:()=>Cs,missing:()=>q,missingOrEmpty:()=>Ai,toStringOrNull:()=>la,values:()=>so});function Cs(e){return e==null||e===""?null:e}function b(e,t=!1){return e!=null&&(e!==""||t)}function q(e){return!b(e)}function Ai(e){return e==null||e.length===0}function la(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Cn(e){if(e===void 0)return;if(e===null||e==="")return null;if(typeof e=="number")return isNaN(e)?void 0:e;const t=parseInt(e,10);return isNaN(t)?void 0:t}function xd(e){if(e!==void 0)return e===null||e===""?!1:typeof e=="boolean"?e:/true/i.test(e)}function tA(e){if(!(e==null||e===""))return e}function ng(e,t){const i=e?JSON.stringify(e):null,s=t?JSON.stringify(t):null;return i===s}function iA(e,t,i=!1){const s=e==null,n=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&n)return 0;if(s)return-1;if(n)return 1;function o(r,l){return r>l?1:r<l?-1:0}if(typeof e!="string"||!i)return o(e,t);try{return e.localeCompare(t)}catch{return o(e,t)}}function so(e){if(e instanceof Set||e instanceof Map){const t=[];return e.forEach(i=>t.push(i)),t}return Object.values(e)}var sA=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=la(e);let i=0;for(;;){let s;if(e?(s=e,i!==0&&(s+="_"+i)):t?(s=t,i!==0&&(s+="_"+i)):s=i,!this.existingKeys[s])return this.existingKeys[s]=!0,String(s);i++}}},QS={};mt(QS,{SKIP_JS_BUILTINS:()=>Tc,cloneObject:()=>Vf,deepCloneDefinition:()=>Nd,getAllValuesInObject:()=>yn,getValueUsingField:()=>fr,isNonNullObject:()=>_d,iterateObject:()=>Ft,mergeDeep:()=>Zt,removeAllReferences:()=>qS});var Tc=new Set(["__proto__","constructor","prototype"]);function Ft(e,t){if(e!=null){if(Array.isArray(e)){for(let i=0;i<e.length;i++)t(i.toString(),e[i]);return}for(const[i,s]of Object.entries(e))t(i,s)}}function Vf(e){const t={},i=Object.keys(e);for(let s=0;s<i.length;s++){if(Tc.has(i[s]))continue;const n=i[s],o=e[n];t[n]=o}return t}function Nd(e,t){if(!e)return;const i=e,s={};return Object.keys(i).forEach(n=>{if(t&&t.indexOf(n)>=0||Tc.has(n))return;const o=i[n];_d(o)&&o.constructor===Object?s[n]=Nd(o):s[n]=o}),s}function yn(e){if(!e)return[];const t=Object;if(typeof t.values=="function")return t.values(e);const i=[];for(const s in e)e.hasOwnProperty(s)&&e.propertyIsEnumerable(s)&&i.push(e[s]);return i}function Zt(e,t,i=!0,s=!1){b(t)&&Ft(t,(n,o)=>{if(Tc.has(n))return;let r=e[n];r!==o&&(s&&r==null&&o!=null&&typeof o=="object"&&o.constructor===Object&&(r={},e[n]=r),_d(o)&&_d(r)&&!Array.isArray(r)?Zt(r,o,i,s):(i||o!==void 0)&&(e[n]=o))})}function fr(e,t,i){if(!t||!e)return;if(!i)return e[t];const s=t.split(".");let n=e;for(let o=0;o<s.length;o++){if(n==null)return;n=n[s[o]]}return n}function qS(e,t=[],i){Object.keys(e).forEach(r=>{typeof e[r]=="object"&&!t.includes(r)&&(e[r]=void 0)});const s=Object.getPrototypeOf(e),n={},o=r=>`AG Grid: Grid API function ${r}() cannot be called as the grid has been destroyed.
|
|
33
|
+
It is recommended to remove local references to the grid api. Alternatively, check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
|
|
34
|
+
To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${i}`;Object.getOwnPropertyNames(s).forEach(r=>{if(typeof s[r]=="function"&&!t.includes(r)){const a=()=>{console.warn(o(r))};n[r]={value:a,writable:!0}}}),Object.defineProperties(e,n)}function _d(e){return typeof e=="object"&&e!==null}var XS={};mt(XS,{compose:()=>nA,debounce:()=>Nt,doOnce:()=>Dr,errorOnce:()=>Xn,executeAfter:()=>JS,executeInAWhile:()=>ZS,executeNextVMTurn:()=>og,getFunctionName:()=>Dc,isFunction:()=>Pc,noop:()=>oA,throttle:()=>rg,waitUntil:()=>Hf,warnOnce:()=>K});var yv={};function Dr(e,t){yv[t]||(e(),yv[t]=!0)}function K(e){Dr(()=>console.warn("AG Grid: "+e),e)}function Xn(e){Dr(()=>console.error("AG Grid: "+e),e)}function Dc(e){if(e.name)return e.name;const t=/function\s+([^\(]+)/.exec(e.toString());return t&&t.length===2?t[1].trim():null}function Pc(e){return!!(e&&e.constructor&&e.call&&e.apply)}function ZS(e){JS(e,400)}var kh=[],Vh=!1;function og(e){kh.push(e),!Vh&&(Vh=!0,window.setTimeout(()=>{const t=kh.slice();kh.length=0,Vh=!1,t.forEach(i=>i())},0))}function JS(e,t=0){e.length>0&&window.setTimeout(()=>e.forEach(i=>i()),t)}function Nt(e,t){let i;return function(...s){const n=this;window.clearTimeout(i),i=window.setTimeout(function(){e.apply(n,s)},t)}}function rg(e,t){let i=0;return function(...s){const n=this,o=new Date().getTime();o-i<t||(i=o,e.apply(n,s))}}function Hf(e,t,i=100,s){const n=new Date().getTime();let o=null,r=!1;const l=()=>{const a=new Date().getTime()-n>i;(e()||a)&&(t(),r=!0,o!=null&&(window.clearInterval(o),o=null),a&&s&&console.warn(s))};l(),r||(o=window.setInterval(l,10))}function nA(...e){return t=>e.reduce((i,s)=>s(i),t)}var oA=()=>{},eE=(e=>(e.CommunityCoreModule="@ag-grid-community/core",e.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",e.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",e.CsvExportModule="@ag-grid-community/csv-export",e.EnterpriseCoreModule="@ag-grid-enterprise/core",e.RowGroupingModule="@ag-grid-enterprise/row-grouping",e.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",e.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",e.MenuModule="@ag-grid-enterprise/menu",e.SetFilterModule="@ag-grid-enterprise/set-filter",e.MultiFilterModule="@ag-grid-enterprise/multi-filter",e.StatusBarModule="@ag-grid-enterprise/status-bar",e.SideBarModule="@ag-grid-enterprise/side-bar",e.RangeSelectionModule="@ag-grid-enterprise/range-selection",e.MasterDetailModule="@ag-grid-enterprise/master-detail",e.RichSelectModule="@ag-grid-enterprise/rich-select",e.GridChartsModule="@ag-grid-enterprise/charts",e.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",e.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",e.ExcelExportModule="@ag-grid-enterprise/excel-export",e.ClipboardModule="@ag-grid-enterprise/clipboard",e.SparklinesModule="@ag-grid-enterprise/sparklines",e.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",e.AngularModule="@ag-grid-community/angular",e.ReactModule="@ag-grid-community/react",e.VueModule="@ag-grid-community/vue",e))(eE||{}),Fc=class we{static register(t){we.__register(t,!0,void 0)}static registerModules(t){we.__registerModules(t,!0,void 0)}static __register(t,i,s){we.runVersionChecks(t),s!==void 0?(we.areGridScopedModules=!0,we.gridModulesMap[s]===void 0&&(we.gridModulesMap[s]={}),we.gridModulesMap[s][t.moduleName]=t):we.globalModulesMap[t.moduleName]=t,we.setModuleBased(i)}static __unRegisterGridModules(t){delete we.gridModulesMap[t]}static __registerModules(t,i,s){we.setModuleBased(i),t&&t.forEach(n=>we.__register(n,i,s))}static isValidModuleVersion(t){const[i,s]=t.version.split(".")||[],[n,o]=we.currentModuleVersion.split(".")||[];return i===n&&s===o}static runVersionChecks(t){if(we.currentModuleVersion||(we.currentModuleVersion=t.version),t.version?we.isValidModuleVersion(t)||console.error(`AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '${t.moduleName}' is version ${t.version} but the other modules are version ${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. '${t.moduleName}' is incompatible. Please update all modules to the same version.`),t.validate){const i=t.validate();i.isValid||console.error(`AG Grid: ${i.message}`)}}static setModuleBased(t){we.moduleBased===void 0?we.moduleBased=t:we.moduleBased!==t&&Dr(()=>{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/modules/ for more information.")},"ModulePackageCheck")}static __setIsBundled(){we.isBundled=!0}static __assertRegistered(t,i,s){var n;if(this.__isRegistered(t,s))return!0;const o=i+t;let r;if(we.isBundled)r=`AG Grid: unable to use ${i} as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:
|
|
35
|
+
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js"><\/script>
|
|
37
|
+
|
|
38
|
+
For more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise`;else if(we.moduleBased||we.moduleBased===void 0){let l=(n=Object.entries(eE).find(([a,u])=>u===t))==null?void 0:n[0];r=`AG Grid: unable to use ${i} as the ${l} is not registered${we.areGridScopedModules?` for gridId: ${s}`:""}. Check if you have registered the module:
|
|
39
|
+
|
|
40
|
+
import { ModuleRegistry } from '@ag-grid-community/core';
|
|
41
|
+
import { ${l} } from '${t}';
|
|
42
|
+
|
|
43
|
+
ModuleRegistry.registerModules([ ${l} ]);
|
|
44
|
+
|
|
45
|
+
For more info see: https://www.ag-grid.com/javascript-grid/modules/`}else r=`AG Grid: unable to use ${i} as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:
|
|
46
|
+
|
|
47
|
+
import 'ag-grid-enterprise';`;return Dr(()=>{console.warn(r)},o),!1}static __isRegistered(t,i){var s;return!!we.globalModulesMap[t]||!!((s=we.gridModulesMap[i])!=null&&s[t])}static __getRegisteredModules(t){return[...so(we.globalModulesMap),...so(we.gridModulesMap[t]||{})]}static __getGridRegisteredModules(t){var i;return so((i=we.gridModulesMap[t])!=null?i:{})||[]}static __isPackageBased(){return!we.moduleBased}};Fc.globalModulesMap={};Fc.gridModulesMap={};Fc.areGridScopedModules=!1;var he=Fc,rA=class{constructor(e,t){if(this.beanWrappers={},this.destroyed=!1,!e||!e.beanClasses)return;this.contextParams=e,this.logger=t,this.logger.log(">> creating ag-Application Context"),this.createBeans();const i=this.getBeanInstances();this.wireBeans(i),this.logger.log(">> ag-Application Context ready - component is alive")}getBeanInstances(){return so(this.beanWrappers).map(e=>e.beanInstance)}createBean(e,t){if(!e)throw Error("Can't wire to bean since it is null");return this.wireBeans([e],t),e}wireBeans(e,t){this.autoWireBeans(e),this.methodWireBeans(e),this.callLifeCycleMethods(e,"preConstructMethods"),b(t)&&e.forEach(t),this.callLifeCycleMethods(e,"postConstructMethods")}createBeans(){this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),Ft(this.beanWrappers,(t,i)=>{let s;i.bean.__agBeanMetaData&&i.bean.__agBeanMetaData.autowireMethods&&i.bean.__agBeanMetaData.autowireMethods.agConstructor&&(s=i.bean.__agBeanMetaData.autowireMethods.agConstructor);const n=this.getBeansForParameters(s,i.bean.name),o=new(i.bean.bind.apply(i.bean,[null,...n]));i.beanInstance=o});const e=Object.keys(this.beanWrappers).join(", ");this.logger.log(`created beans: ${e}`)}createBeanWrapper(e){const t=e.__agBeanMetaData;if(!t){let s;e.prototype.constructor?s=Dc(e.prototype.constructor):s=""+e,console.error(`Context item ${s} is not a bean`);return}const i={bean:e,beanInstance:null,beanName:t.beanName};this.beanWrappers[t.beanName]=i}autoWireBeans(e){e.forEach(t=>{this.forEachMetaDataInHierarchy(t,(i,s)=>{const n=i.agClassAttributes;n&&n.forEach(o=>{const r=this.lookupBeanInstance(s,o.beanName,o.optional);t[o.attributeName]=r})})})}methodWireBeans(e){e.forEach(t=>{this.forEachMetaDataInHierarchy(t,(i,s)=>{Ft(i.autowireMethods,(n,o)=>{if(n==="agConstructor")return;const r=this.getBeansForParameters(o,s);t[n].apply(t,r)})})})}forEachMetaDataInHierarchy(e,t){let i=Object.getPrototypeOf(e);for(;i!=null;){const s=i.constructor;if(s.hasOwnProperty("__agBeanMetaData")){const n=s.__agBeanMetaData,o=this.getBeanName(s);t(n,o)}i=Object.getPrototypeOf(i)}}getBeanName(e){if(e.__agBeanMetaData&&e.__agBeanMetaData.beanName)return e.__agBeanMetaData.beanName;const t=e.toString();return t.substring(9,t.indexOf("("))}getBeansForParameters(e,t){const i=[];return e&&Ft(e,(s,n)=>{const o=this.lookupBeanInstance(t,n);i[Number(s)]=o}),i}lookupBeanInstance(e,t,i=!1){if(this.destroyed)return this.logger.log(`AG Grid: bean reference ${t} is used after the grid is destroyed!`),null;if(t==="context")return this;if(this.contextParams.providedBeanInstances&&this.contextParams.providedBeanInstances.hasOwnProperty(t))return this.contextParams.providedBeanInstances[t];const s=this.beanWrappers[t];return s?s.beanInstance:(i||console.error(`AG Grid: unable to find bean reference ${t} while initialising ${e}`),null)}callLifeCycleMethods(e,t){e.forEach(i=>this.callLifeCycleMethodsOnBean(i,t))}callLifeCycleMethodsOnBean(e,t,i){const s={};this.forEachMetaDataInHierarchy(e,o=>{const r=o[t];r&&r.forEach(l=>{l!=i&&(s[l]=!0)})}),Object.keys(s).forEach(o=>e[o]())}getBean(e){return this.lookupBeanInstance("getBean",e,!0)}destroy(){if(this.destroyed)return;this.destroyed=!0,this.logger.log(">> Shutting down ag-Application Context");const e=this.getBeanInstances();this.destroyBeans(e),this.contextParams.providedBeanInstances=null,he.__unRegisterGridModules(this.contextParams.gridId),this.logger.log(">> ag-Application Context shut down - component is dead")}destroyBean(e){e&&this.destroyBeans([e])}destroyBeans(e){return e?(e.forEach(t=>{this.callLifeCycleMethodsOnBean(t,"preDestroyMethods","destroy");const i=t;typeof i.destroy=="function"&&i.destroy()}),[]):[]}isDestroyed(){return this.destroyed}getGridId(){return this.contextParams.gridId}};function tE(e,t,i){const s=mo(e.constructor);s.preConstructMethods||(s.preConstructMethods=[]),s.preConstructMethods.push(t)}function M(e,t,i){const s=mo(e.constructor);s.postConstructMethods||(s.postConstructMethods=[]),s.postConstructMethods.push(t)}function Bt(e,t,i){const s=mo(e.constructor);s.preDestroyMethods||(s.preDestroyMethods=[]),s.preDestroyMethods.push(t)}function H(e){return t=>{const i=mo(t);i.beanName=e}}function f(e){return(t,i,s)=>{iE(t,e,!1,t,i)}}function fe(e){return(t,i,s)=>{iE(t,e,!0,t,i)}}function iE(e,t,i,s,n,o){if(t===null){console.error("AG Grid: Autowired name should not be null");return}const r=mo(e.constructor);r.agClassAttributes||(r.agClassAttributes=[]),r.agClassAttributes.push({attributeName:n,beanName:t,optional:i})}function Li(e){return(t,i,s)=>{const n=typeof t=="function"?t:t.constructor;let o;if(typeof s=="number"){let r;i?(o=mo(n),r=i):(o=mo(n),r="agConstructor"),o.autowireMethods||(o.autowireMethods={}),o.autowireMethods[r]||(o.autowireMethods[r]={}),o.autowireMethods[r][s]=e}}}function mo(e){return e.hasOwnProperty("__agBeanMetaData")||(e.__agBeanMetaData={}),e.__agBeanMetaData}var is=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setBeans(e,t,i=null,s=null){if(this.frameworkOverrides=t,this.gos=e,i){const n=e.useAsyncEvents();this.addGlobalListener(i,n)}s&&this.addGlobalListener(s,!1)}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){const s=t?this.allAsyncListeners:this.allSyncListeners;let n=s.get(e);return!n&&i&&(n=new Set,s.set(e,n)),n}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){const s=this.getListeners(e,i,!1);s&&(s.delete(t),s.size===0&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){let t=e;this.gos&&this.gos.addGridCommonParams(t),this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){var i;const s=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const n=(a,u)=>a.forEach(d=>{if(!u.has(d))return;const h=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>d(e)):()=>d(e);t?this.dispatchAsync(h):h()}),o=(i=this.getListeners(s,t,!1))!=null?i:new Set,r=new Set(o);r.size>0&&n(r,o),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{const u=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(s,e)):()=>a(s,e);t?this.dispatchAsync(u):u()})}dispatchAsync(e){this.asyncFunctionsQueue.push(e),this.scheduled||(this.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)}),this.scheduled=!0)}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}};c([Qi(0,Li("gridOptionsService")),Qi(1,Li("frameworkOverrides")),Qi(2,Li("globalEventListener")),Qi(3,Li("globalSyncEventListener"))],is.prototype,"setBeans",1);is=c([H("eventService")],is);var Bf=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=i=>{this.frameworkOverrides.wrapOutgoing(()=>e(i))},this.wrappedListeners.set(e,t)),t}wrapGlobal(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=(i,s)=>{this.frameworkOverrides.wrapOutgoing(()=>e(i,s))},this.wrappedGlobalListeners.set(e,t)),t}unwrap(e){var t;return(t=this.wrappedListeners.get(e))!=null?t:e}unwrapGlobal(e){var t;return(t=this.wrappedGlobalListeners.get(e))!=null?t:e}},lA={resizable:!0,sortable:!0},aA=0;function sE(){return aA++}var Je=class nE{constructor(t,i,s,n){this.instanceId=sE(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.eventService=new is,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=t,this.userProvidedColDef=i,this.colId=s,this.primary=n,this.setState(t)}getInstanceId(){return this.instanceId}setState(t){t.sort!==void 0?(t.sort==="asc"||t.sort==="desc")&&(this.sort=t.sort):(t.initialSort==="asc"||t.initialSort==="desc")&&(this.sort=t.initialSort);const i=t.sortIndex,s=t.initialSortIndex;i!==void 0?i!==null&&(this.sortIndex=i):s!==null&&(this.sortIndex=s);const n=t.hide,o=t.initialHide;n!==void 0?this.visible=!n:this.visible=!o,t.pinned!==void 0?this.setPinned(t.pinned):this.setPinned(t.initialPinned);const r=t.flex,l=t.initialFlex;r!==void 0?this.flex=r:l!==void 0&&(this.flex=l)}setColDef(t,i,s){this.colDef=t,this.userProvidedColDef=i,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.eventService.dispatchEvent(this.createColumnEvent("colDefChanged",s))}getUserProvidedColDef(){return this.userProvidedColDef}setParent(t){this.parent=t}getParent(){return this.parent}setOriginalParent(t){this.originalParent=t}getOriginalParent(){return this.originalParent}initialise(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}initDotNotation(){const t=this.gos.get("suppressFieldDotNotation");this.fieldContainsDots=b(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!t,this.tooltipFieldContainsDots=b(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!t}initMinAndMaxWidths(){var t,i;const s=this.colDef;this.minWidth=(t=s.minWidth)!=null?t:this.environment.getMinColWidth(),this.maxWidth=(i=s.maxWidth)!=null?i:Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=b(this.colDef.tooltipField)||b(this.colDef.tooltipValueGetter)||b(this.colDef.tooltipComponent)}resetActualWidth(t){const i=this.calculateColInitialWidth(this.colDef);this.setActualWidth(i,t,!0)}calculateColInitialWidth(t){var i,s;const n=(i=t.minWidth)!=null?i:this.environment.getMinColWidth(),o=(s=t.maxWidth)!=null?s:Number.MAX_SAFE_INTEGER;let r;const l=Cn(t.width),a=Cn(t.initialWidth);return l!=null?r=l:a!=null?r=a:r=200,Math.max(Math.min(r,o),n)}isEmptyGroup(){return!1}isRowGroupDisplayed(t){if(q(this.colDef)||q(this.colDef.showRowGroup))return!1;const i=this.colDef.showRowGroup===!0,s=this.colDef.showRowGroup===t;return i||s}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}addEventListener(t,i){var s,n;this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.eventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new Bf(this.frameworkOverrides));const o=(n=(s=this.frameworkEventListenerService)==null?void 0:s.wrap(i))!=null?n:i;this.eventService.addEventListener(t,o)}removeEventListener(t,i){var s,n;const o=(n=(s=this.frameworkEventListenerService)==null?void 0:s.unwrap(i))!=null?n:i;this.eventService.removeEventListener(t,o)}createColumnFunctionCallbackParams(t){return this.gos.addGridCommonParams({node:t,data:t.data,column:this,colDef:this.colDef})}isSuppressNavigable(t){if(typeof this.colDef.suppressNavigable=="boolean")return this.colDef.suppressNavigable;if(typeof this.colDef.suppressNavigable=="function"){const i=this.createColumnFunctionCallbackParams(t),s=this.colDef.suppressNavigable;return s(i)}return!1}isCellEditable(t){return t.group&&!this.gos.get("enableGroupEdit")?!1:this.isColumnFunc(t,this.colDef.editable)}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(t){return this.isColumnFunc(t,this.colDef.rowDrag)}isDndSource(t){return this.isColumnFunc(t,this.colDef.dndSource)}isCellCheckboxSelection(t){return this.isColumnFunc(t,this.colDef.checkboxSelection)}isSuppressPaste(t){return this.isColumnFunc(t,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(t){var i;return(i=this.colDef[t])!=null?i:lA[t]}isColumnFunc(t,i){if(typeof i=="boolean")return i;if(typeof i=="function"){const s=this.createColumnFunctionCallbackParams(t);return i(s)}return!1}setMoving(t,i){this.moving=t,this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",i))}createColumnEvent(t,i){return this.gos.addGridCommonParams({type:t,column:this,columns:[this],source:i})}isMoving(){return this.moving}getSort(){return this.sort}setSort(t,i){this.sort!==t&&(this.sort=t,this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",i))),this.dispatchStateUpdatedEvent("sort")}setMenuVisible(t,i){this.menuVisible!==t&&(this.menuVisible=t,this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",i)))}isMenuVisible(){return this.menuVisible}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return q(this.sort)}isSorting(){return b(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(t){this.sortIndex=t,this.dispatchStateUpdatedEvent("sortIndex")}setAggFunc(t){this.aggFunc=t,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(t,i){this.oldLeft=this.left,this.left!==t&&(this.left=t,this.eventService.dispatchEvent(this.createColumnEvent("leftChanged",i)))}isFilterActive(){return this.filterActive}setFilterActive(t,i,s){this.filterActive!==t&&(this.filterActive=t,this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",i)));const n=this.createColumnEvent("filterChanged",i);s&&Zt(n,s),this.eventService.dispatchEvent(n)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(t){t===!0||t==="left"?this.pinned="left":t==="right"?this.pinned="right":this.pinned=null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(t,i){this.firstRightPinned!==t&&(this.firstRightPinned=t,this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",i)))}setLastLeftPinned(t,i){this.lastLeftPinned!==t&&(this.lastLeftPinned=t,this.eventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",i)))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(t,i){const s=t===!0;this.visible!==s&&(this.visible=s,this.eventService.dispatchEvent(this.createColumnEvent("visibleChanged",i))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){const t=this.getColDef();return!t.suppressSpanHeaderHeight&&!t.autoHeaderHeight}getColumnGroupPaddingInfo(){let t=this.getParent();if(!t||!t.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const i=t.getPaddingLevel()+1;let s=!0;for(;t;){if(!t.isPadding()){s=!1;break}t=t.getParent()}return{numberOfParents:i,isSpanningTotal:s}}getColDef(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getDefinition(){return this.colDef}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(t){const i=t!==this.autoHeaderHeight;return this.autoHeaderHeight=t,i}createBaseColDefParams(t){return this.gos.addGridCommonParams({node:t,data:t.data,colDef:this.colDef,column:this})}getColSpan(t){if(q(this.colDef.colSpan))return 1;const i=this.createBaseColDefParams(t),s=this.colDef.colSpan(i);return Math.max(s,1)}getRowSpan(t){if(q(this.colDef.rowSpan))return 1;const i=this.createBaseColDefParams(t),s=this.colDef.rowSpan(i);return Math.max(s,1)}setActualWidth(t,i,s=!1){this.minWidth!=null&&(t=Math.max(t,this.minWidth)),this.maxWidth!=null&&(t=Math.min(t,this.maxWidth)),this.actualWidth!==t&&(this.actualWidth=t,this.flex&&i!=="flex"&&i!=="gridInitializing"&&(this.flex=null),s||this.fireColumnWidthChangedEvent(i)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(t){this.eventService.dispatchEvent(this.createColumnEvent("widthChanged",t))}isGreaterThanMax(t){return this.maxWidth!=null?t>this.maxWidth:!1}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(t){this.flex!==t&&(this.flex=t),this.dispatchStateUpdatedEvent("flex")}setMinimum(t){b(this.minWidth)&&this.setActualWidth(this.minWidth,t)}setRowGroupActive(t,i){this.rowGroupActive!==t&&(this.rowGroupActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",i))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(t,i){this.pivotActive!==t&&(this.pivotActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",i))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(t,i){this.aggregationActive!==t&&(this.aggregationActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnValueChanged",i)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}getMenuTabs(t){K("As of v31.1, 'getMenuTabs' is deprecated. Use 'getColDef().menuTabs ?? defaultValues' instead.");let i=this.getColDef().menuTabs;return i==null&&(i=t),i}dispatchStateUpdatedEvent(t){this.eventService.dispatchEvent({type:nE.EVENT_STATE_UPDATED,key:t})}};Je.EVENT_MOVING_CHANGED="movingChanged";Je.EVENT_LEFT_CHANGED="leftChanged";Je.EVENT_WIDTH_CHANGED="widthChanged";Je.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged";Je.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged";Je.EVENT_VISIBLE_CHANGED="visibleChanged";Je.EVENT_FILTER_CHANGED="filterChanged";Je.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged";Je.EVENT_SORT_CHANGED="sortChanged";Je.EVENT_COL_DEF_CHANGED="colDefChanged";Je.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged";Je.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged";Je.EVENT_PIVOT_CHANGED="columnPivotChanged";Je.EVENT_VALUE_CHANGED="columnValueChanged";Je.EVENT_STATE_UPDATED="columnStateUpdated";c([f("gridOptionsService")],Je.prototype,"gos",2);c([f("environment")],Je.prototype,"environment",2);c([f("columnHoverService")],Je.prototype,"columnHoverService",2);c([f("frameworkOverrides")],Je.prototype,"frameworkOverrides",2);c([M],Je.prototype,"initialise",1);var Ee=Je,Ac=class El{constructor(t,i,s,n){this.localEventService=new is,this.expandable=!1,this.instanceId=sE(),this.expandableListenerRemoveCallback=null,this.colGroupDef=t,this.groupId=i,this.expanded=!!t&&!!t.openByDefault,this.padding=s,this.level=n}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0)}reset(t,i){this.colGroupDef=t,this.level=i,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}setOriginalParent(t){this.originalParent=t}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(t=>t.isVisible()):!1}isPadding(){return this.padding}setExpanded(t){this.expanded=t===void 0?!1:t;const i={type:El.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(i)}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(t){this.children=t}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const t=[];return this.addLeafColumns(t),t}addLeafColumns(t){this.children&&this.children.forEach(i=>{i instanceof Ee?t.push(i):i instanceof El&&i.addLeafColumns(t)})}getColumnGroupShow(){const t=this.colGroupDef;if(t)return t.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const t=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(i=>i.addEventListener("visibleChanged",t)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(i=>i.removeEventListener("visibleChanged",t)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let t=!1,i=!1,s=!1;const n=this.findChildrenRemovingPadding();for(let r=0,l=n.length;r<l;r++){const a=n[r];if(!a.isVisible())continue;const u=a.getColumnGroupShow();u==="open"?(t=!0,s=!0):u==="closed"?(i=!0,s=!0):(t=!0,i=!0)}const o=t&&i&&s;if(this.expandable!==o){this.expandable=o;const r={type:El.EVENT_EXPANDABLE_CHANGED};this.localEventService.dispatchEvent(r)}}findChildrenRemovingPadding(){const t=[],i=s=>{s.forEach(n=>{n instanceof El&&n.isPadding()?i(n.children):t.push(n)})};return i(this.children),t}onColumnVisibilityChanged(){this.setExpandable()}addEventListener(t,i){this.localEventService.addEventListener(t,i)}removeEventListener(t,i){this.localEventService.removeEventListener(t,i)}};Ac.EVENT_EXPANDED_CHANGED="expandedChanged";Ac.EVENT_EXPANDABLE_CHANGED="expandableChanged";c([Bt],Ac.prototype,"destroy",1);var Qe=Ac,uA={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},oE={};mt(oE,{addSafePassiveEventListener:()=>fE,createEventPath:()=>pE,getCtrlForEventTarget:()=>Od,getEventPath:()=>gE,isElementInEventPath:()=>Gd,isEventSupported:()=>Uf,isStopPropagationForAgGrid:()=>es,stopPropagationForAgGrid:()=>ss});var rE={};mt(rE,{areEqual:()=>gs,existsAndNotEmpty:()=>lE,flatten:()=>cE,forEachReverse:()=>pA,includes:()=>vi,insertArrayIntoArray:()=>lg,insertIntoArray:()=>aa,last:()=>de,moveInArray:()=>ag,pushAll:()=>ug,removeAllFromArray:()=>dE,removeAllFromUnorderedArray:()=>uE,removeFromArray:()=>Qt,removeFromUnorderedArray:()=>Wf,removeRepeatsFromArray:()=>cA,shallowCompare:()=>dA,sortNumerically:()=>aE,toStrings:()=>hA});function lE(e){return e!=null&&e.length>0}function de(e){if(!(!e||!e.length))return e[e.length-1]}function gs(e,t,i){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((s,n)=>i?i(s,t[n]):t[n]===s)}function dA(e,t){return gs(e,t)}function aE(e){return e.sort((t,i)=>t-i)}function cA(e,t){if(e)for(let i=e.length-2;i>=0;i--){const s=e[i]===t,n=e[i+1]===t;s&&n&&e.splice(i+1,1)}}function Wf(e,t){const i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function Qt(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function uE(e,t){for(let i=0;i<t.length;i++)Wf(e,t[i])}function dE(e,t){for(let i=0;i<t.length;i++)Qt(e,t[i])}function aa(e,t,i){e.splice(i,0,t)}function lg(e,t,i){if(!(e==null||t==null))for(let s=t.length-1;s>=0;s--){const n=t[s];aa(e,n,i)}}function ag(e,t,i){dE(e,t),t.slice().reverse().forEach(s=>aa(e,s,i))}function vi(e,t){return e.indexOf(t)>-1}function cE(e){return[].concat.apply([],e)}function ug(e,t){t==null||e==null||t.forEach(i=>e.push(i))}function hA(e){return e.map(la)}function pA(e,t){if(e!=null)for(let i=e.length-1;i>=0;i--)t(e[i],i)}var hE="__ag_Grid_Stop_Propagation",gA=["touchstart","touchend","touchmove","touchcancel","scroll"],Hh={};function ss(e){e[hE]=!0}function es(e){return e[hE]===!0}var Uf=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return i=>{if(typeof Hh[i]=="boolean")return Hh[i];const s=document.createElement(e[i]||"div");return i="on"+i,Hh[i]=i in s}})();function Od(e,t,i){let s=t;for(;s;){const n=e.getDomData(s,i);if(n)return n;s=s.parentElement}return null}function Gd(e,t){return!t||!e?!1:gE(t).indexOf(e)>=0}function pE(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}function gE(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():pE(t)}function fE(e,t,i,s){const o=vi(gA,i)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,i,s,o)}var Ws=class mE{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.lastChangeSetIdLookup={},this.propertyListenerId=0,this.isAlive=()=>!this.destroyed}getFrameworkOverrides(){return this.frameworkOverrides}getContext(){return this.context}destroy(){for(let t=0;t<this.destroyFunctions.length;t++)this.destroyFunctions[t]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:mE.EVENT_DESTROYED})}addEventListener(t,i){this.localEventService||(this.localEventService=new is),this.localEventService.addEventListener(t,i)}removeEventListener(t,i){this.localEventService&&this.localEventService.removeEventListener(t,i)}dispatchEvent(t){this.localEventService&&this.localEventService.dispatchEvent(t)}addManagedListener(t,i,s){if(this.destroyed)return;t instanceof HTMLElement?fE(this.getFrameworkOverrides(),t,i,s):t.addEventListener(i,s);const n=()=>(t.removeEventListener(i,s),null);return this.destroyFunctions.push(n),()=>(n(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==n),null)}setupGridOptionListener(t,i){this.gos.addEventListener(t,i);const s=()=>(this.gos.removeEventListener(t,i),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(n=>n!==s),null)}addManagedPropertyListener(t,i){return this.destroyed?()=>null:this.setupGridOptionListener(t,i)}addManagedPropertyListeners(t,i){if(this.destroyed)return;const s=t.join("-")+this.propertyListenerId++,n=o=>{if(o.changeSet){if(o.changeSet&&o.changeSet.id===this.lastChangeSetIdLookup[s])return;this.lastChangeSetIdLookup[s]=o.changeSet.id}const r={type:"gridPropertyChanged",changeSet:o.changeSet,source:o.source};i(r)};t.forEach(o=>this.setupGridOptionListener(o,n))}addDestroyFunc(t){this.isAlive()?this.destroyFunctions.push(t):t()}createManagedBean(t,i){const s=this.createBean(t,i);return this.addDestroyFunc(this.destroyBean.bind(this,t,i)),s}createBean(t,i,s){return(i||this.getContext()).createBean(t,s)}destroyBean(t,i){return(i||this.getContext()).destroyBean(t)}destroyBeans(t,i){if(t)for(let s=0;s<t.length;s++)this.destroyBean(t[s],i);return[]}};Ws.EVENT_DESTROYED="destroyed";c([f("frameworkOverrides")],Ws.prototype,"frameworkOverrides",2);c([f("context")],Ws.prototype,"context",2);c([f("eventService")],Ws.prototype,"eventService",2);c([f("gridOptionsService")],Ws.prototype,"gos",2);c([f("localeService")],Ws.prototype,"localeService",2);c([f("environment")],Ws.prototype,"environment",2);c([Bt],Ws.prototype,"destroy",1);var L=Ws,ua=class extends L{setBeans(e){this.logger=e.create("ColumnFactory")}createColumnTree(e,t,i,s){const n=new sA,{existingCols:o,existingGroups:r,existingColKeys:l}=this.extractExistingTreeData(i);n.addExistingKeys(l);const a=this.recursivelyCreateColumns(e,0,t,o,n,r,s),u=this.findMaxDept(a,0);this.logger.log("Number of levels for grouped columns is "+u);const d=this.balanceColumnTree(a,0,u,n);return As(null,d,(p,C)=>{p instanceof Qe&&p.setupExpandable(),p.setOriginalParent(C)}),{columnTree:d,treeDept:u}}extractExistingTreeData(e){const t=[],i=[],s=[];return e&&As(null,e,n=>{if(n instanceof Qe){const o=n;i.push(o)}else{const o=n;s.push(o.getId()),t.push(o)}}),{existingCols:t,existingGroups:i,existingColKeys:s}}createForAutoGroups(e,t){return e.map(i=>this.createAutoGroupTreeItem(t,i))}createAutoGroupTreeItem(e,t){const i=this.findDepth(e);let s=t;for(let n=i-1;n>=0;n--){const o=new Qe(null,`FAKE_PATH_${t.getId()}}_${n}`,!0,n);this.createBean(o),o.setChildren([s]),s.setOriginalParent(o),s=o}return i===0&&t.setOriginalParent(null),s}findDepth(e){let t=0,i=e;for(;i&&i[0]&&i[0]instanceof Qe;)t++,i=i[0].getChildren();return t}balanceColumnTree(e,t,i,s){const n=[];for(let o=0;o<e.length;o++){const r=e[o];if(r instanceof Qe){const l=r,a=this.balanceColumnTree(l.getChildren(),t+1,i,s);l.setChildren(a),n.push(l)}else{let l,a;for(let u=i-1;u>=t;u--){const d=s.getUniqueKey(null,null),h=this.createMergedColGroupDef(null),p=new Qe(h,d,!0,t);this.createBean(p),a&&a.setChildren([p]),a=p,l||(l=a)}if(l&&a)if(n.push(l),e.some(d=>d instanceof Qe)){a.setChildren([r]);continue}else{a.setChildren(e);break}n.push(r)}}return n}findMaxDept(e,t){let i=t;for(let s=0;s<e.length;s++){const n=e[s];if(n instanceof Qe){const o=n,r=this.findMaxDept(o.getChildren(),t+1);i<r&&(i=r)}}return i}recursivelyCreateColumns(e,t,i,s,n,o,r){if(!e)return[];const l=new Array(e.length);for(let a=0;a<l.length;a++){const u=e[a];this.isColumnGroup(u)?l[a]=this.createColumnGroup(i,u,t,s,n,o,r):l[a]=this.createColumn(i,u,s,n,r)}return l}createColumnGroup(e,t,i,s,n,o,r){const l=this.createMergedColGroupDef(t),a=n.getUniqueKey(l.groupId||null,null),u=new Qe(l,a,!1,i);this.createBean(u);const d=this.findExistingGroup(t,o);d&&o.splice(d.idx,1);let h=d==null?void 0:d.group;h&&u.setExpanded(h.isExpanded());const p=this.recursivelyCreateColumns(l.children,i+1,e,s,n,o,r);return u.setChildren(p),u}createMergedColGroupDef(e){const t={};return Object.assign(t,this.gos.get("defaultColGroupDef")),Object.assign(t,e),t}createColumn(e,t,i,s,n){const o=this.findExistingColumn(t,i);o&&(i==null||i.splice(o.idx,1));let r=o==null?void 0:o.column;if(r){const l=this.addColumnDefaultAndTypes(t,r.getColId());r.setColDef(l,t,n),this.applyColumnState(r,l,n)}else{const l=s.getUniqueKey(t.colId,t.field),a=this.addColumnDefaultAndTypes(t,l);r=new Ee(a,t,l,e),this.context.createBean(r)}return this.dataTypeService.addColumnListeners(r),r}applyColumnState(e,t,i){const s=Cn(t.flex);if(s!==void 0&&e.setFlex(s),e.getFlex()<=0){const l=Cn(t.width);if(l!=null)e.setActualWidth(l,i);else{const a=e.getActualWidth();e.setActualWidth(a,i)}}t.sort!==void 0&&(t.sort=="asc"||t.sort=="desc"?e.setSort(t.sort,i):e.setSort(void 0,i));const o=Cn(t.sortIndex);o!==void 0&&e.setSortIndex(o);const r=xd(t.hide);r!==void 0&&e.setVisible(!r,i),t.pinned!==void 0&&e.setPinned(t.pinned)}findExistingColumn(e,t){if(t)for(let i=0;i<t.length;i++){const s=t[i].getUserProvidedColDef();if(!s)continue;if(e.colId!=null){if(t[i].getId()===e.colId)return{idx:i,column:t[i]};continue}if(e.field!=null){if(s.field===e.field)return{idx:i,column:t[i]};continue}if(s===e)return{idx:i,column:t[i]}}}findExistingGroup(e,t){if(e.groupId!=null)for(let s=0;s<t.length;s++){const n=t[s];if(n.getColGroupDef()&&n.getId()===e.groupId)return{idx:s,group:n}}}addColumnDefaultAndTypes(e,t){const i={},s=this.gos.get("defaultColDef");Zt(i,s,!1,!0);const n=this.dataTypeService.updateColDefAndGetColumnType(i,e,t);n&&this.assignColumnTypes(n,i),Zt(i,e,!1,!0);const o=this.gos.get("autoGroupColumnDef"),r=this.gos.isColumnsSortingCoupledToGroup();return e.rowGroup&&o&&r&&Zt(i,{sort:o.sort,initialSort:o.initialSort},!1,!0),this.dataTypeService.validateColDef(i),i}assignColumnTypes(e,t){if(!e.length)return;const i=Object.assign({},uA),s=this.gos.get("columnTypes")||{};Ft(s,(n,o)=>{n in i?console.warn(`AG Grid: the column type '${n}' is a default column type and cannot be overridden.`):(o.type&&K("Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type."),i[n]=o)}),e.forEach(n=>{const o=i[n.trim()];o?Zt(t,o,!1,!0):console.warn("AG Grid: colDef.type '"+n+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(e){return e.children!==void 0}};c([f("dataTypeService")],ua.prototype,"dataTypeService",2);c([Qi(0,Li("loggerFactory"))],ua.prototype,"setBeans",1);ua=c([H("columnFactory")],ua);function As(e,t,i){if(t)for(let s=0;s<t.length;s++){const n=t[s];n instanceof Qe&&As(n,n.getChildren(),i),i(n,e)}}var bc=class ls{constructor(t,i,s,n){this.displayedChildren=[],this.localEventService=new is,this.groupId=i,this.partId=s,this.providedColumnGroup=t,this.pinned=n}static createUniqueId(t,i){return t+"_"+i}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(t){this.parent=t}getUniqueId(){return ls.createUniqueId(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const t=this.getProvidedColumnGroup().getLeafColumns();return!t||t.length===0?!1:t.every(i=>i.isMoving())}checkLeft(){if(this.displayedChildren.forEach(t=>{t instanceof ls&&t.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const i=de(this.displayedChildren).getLeft();this.setLeft(i)}else{const t=this.displayedChildren[0].getLeft();this.setLeft(t)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(t){this.oldLeft=this.left,this.left!==t&&(this.left=t,this.localEventService.dispatchEvent(this.createAgEvent(ls.EVENT_LEFT_CHANGED)))}getPinned(){return this.pinned}createAgEvent(t){return{type:t}}addEventListener(t,i){this.localEventService.addEventListener(t,i)}removeEventListener(t,i){this.localEventService.removeEventListener(t,i)}getGroupId(){return this.groupId}getPartId(){return this.partId}isChildInThisGroupDeepSearch(t){let i=!1;return this.children.forEach(s=>{t===s&&(i=!0),s instanceof ls&&s.isChildInThisGroupDeepSearch(t)&&(i=!0)}),i}getActualWidth(){let t=0;return this.displayedChildren&&this.displayedChildren.forEach(i=>{t+=i.getActualWidth()}),t}isResizable(){if(!this.displayedChildren)return!1;let t=!1;return this.displayedChildren.forEach(i=>{i.isResizable()&&(t=!0)}),t}getMinWidth(){let t=0;return this.displayedChildren.forEach(i=>{t+=i.getMinWidth()||0}),t}addChild(t){this.children||(this.children=[]),this.children.push(t)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const t=[];return this.addLeafColumns(t),t}getDisplayedLeafColumns(){const t=[];return this.addDisplayedLeafColumns(t),t}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(t){this.providedColumnGroup.setExpanded(t)}addDisplayedLeafColumns(t){this.displayedChildren.forEach(i=>{i instanceof Ee?t.push(i):i instanceof ls&&i.addDisplayedLeafColumns(t)})}addLeafColumns(t){this.children.forEach(i=>{i instanceof Ee?t.push(i):i instanceof ls&&i.addLeafColumns(t)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const t=this.getParent();return!this.isPadding()||!t||!t.isPadding()?0:1+t.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let t=this;for(;t!=null&&t.isPadding();)t=t.getParent();if(!(t?t.providedColumnGroup.isExpandable():!1)){this.displayedChildren=this.children,this.localEventService.dispatchEvent(this.createAgEvent(ls.EVENT_DISPLAYED_CHILDREN_CHANGED));return}this.children.forEach(s=>{if(s instanceof ls&&(!s.displayedChildren||!s.displayedChildren.length))return;switch(s.getColumnGroupShow()){case"open":t.providedColumnGroup.isExpanded()&&this.displayedChildren.push(s);break;case"closed":t.providedColumnGroup.isExpanded()||this.displayedChildren.push(s);break;default:this.displayedChildren.push(s);break}}),this.localEventService.dispatchEvent(this.createAgEvent(ls.EVENT_DISPLAYED_CHILDREN_CHANGED))}};bc.EVENT_LEFT_CHANGED="leftChanged";bc.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged";c([f("gridOptionsService")],bc.prototype,"gos",2);var at=bc,g=class{};g.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged";g.EVENT_NEW_COLUMNS_LOADED="newColumnsLoaded";g.EVENT_COLUMN_PIVOT_MODE_CHANGED="columnPivotModeChanged";g.EVENT_PIVOT_MAX_COLUMNS_EXCEEDED="pivotMaxColumnsExceeded";g.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged";g.EVENT_EXPAND_COLLAPSE_ALL="expandOrCollapseAll";g.EVENT_COLUMN_PIVOT_CHANGED="columnPivotChanged";g.EVENT_GRID_COLUMNS_CHANGED="gridColumnsChanged";g.EVENT_COLUMN_VALUE_CHANGED="columnValueChanged";g.EVENT_COLUMN_MOVED="columnMoved";g.EVENT_COLUMN_VISIBLE="columnVisible";g.EVENT_COLUMN_PINNED="columnPinned";g.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened";g.EVENT_COLUMN_RESIZED="columnResized";g.EVENT_DISPLAYED_COLUMNS_CHANGED="displayedColumnsChanged";g.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED="suppressMovableColumns";g.EVENT_SUPPRESS_MENU_HIDE_CHANGED="suppressMenuHide";g.EVENT_SUPPRESS_FIELD_DOT_NOTATION="suppressFieldDotNotation";g.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged";g.EVENT_COLUMN_HEADER_MOUSE_OVER="columnHeaderMouseOver";g.EVENT_COLUMN_HEADER_MOUSE_LEAVE="columnHeaderMouseLeave";g.EVENT_COLUMN_HEADER_CLICKED="columnHeaderClicked";g.EVENT_COLUMN_HEADER_CONTEXT_MENU="columnHeaderContextMenu";g.EVENT_ASYNC_TRANSACTIONS_FLUSHED="asyncTransactionsFlushed";g.EVENT_ROW_GROUP_OPENED="rowGroupOpened";g.EVENT_ROW_DATA_UPDATED="rowDataUpdated";g.EVENT_PINNED_ROW_DATA_CHANGED="pinnedRowDataChanged";g.EVENT_RANGE_SELECTION_CHANGED="rangeSelectionChanged";g.EVENT_CHART_CREATED="chartCreated";g.EVENT_CHART_RANGE_SELECTION_CHANGED="chartRangeSelectionChanged";g.EVENT_CHART_OPTIONS_CHANGED="chartOptionsChanged";g.EVENT_CHART_DESTROYED="chartDestroyed";g.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged";g.EVENT_TOOL_PANEL_SIZE_CHANGED="toolPanelSizeChanged";g.EVENT_COLUMN_PANEL_ITEM_DRAG_START="columnPanelItemDragStart";g.EVENT_COLUMN_PANEL_ITEM_DRAG_END="columnPanelItemDragEnd";g.EVENT_MODEL_UPDATED="modelUpdated";g.EVENT_CUT_START="cutStart";g.EVENT_CUT_END="cutEnd";g.EVENT_PASTE_START="pasteStart";g.EVENT_PASTE_END="pasteEnd";g.EVENT_FILL_START="fillStart";g.EVENT_FILL_END="fillEnd";g.EVENT_RANGE_DELETE_START="rangeDeleteStart";g.EVENT_RANGE_DELETE_END="rangeDeleteEnd";g.EVENT_UNDO_STARTED="undoStarted";g.EVENT_UNDO_ENDED="undoEnded";g.EVENT_REDO_STARTED="redoStarted";g.EVENT_REDO_ENDED="redoEnded";g.EVENT_KEY_SHORTCUT_CHANGED_CELL_START="keyShortcutChangedCellStart";g.EVENT_KEY_SHORTCUT_CHANGED_CELL_END="keyShortcutChangedCellEnd";g.EVENT_CELL_CLICKED="cellClicked";g.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked";g.EVENT_CELL_MOUSE_DOWN="cellMouseDown";g.EVENT_CELL_CONTEXT_MENU="cellContextMenu";g.EVENT_CELL_VALUE_CHANGED="cellValueChanged";g.EVENT_CELL_EDIT_REQUEST="cellEditRequest";g.EVENT_ROW_VALUE_CHANGED="rowValueChanged";g.EVENT_CELL_FOCUSED="cellFocused";g.EVENT_CELL_FOCUS_CLEARED="cellFocusCleared";g.EVENT_FULL_WIDTH_ROW_FOCUSED="fullWidthRowFocused";g.EVENT_ROW_SELECTED="rowSelected";g.EVENT_SELECTION_CHANGED="selectionChanged";g.EVENT_TOOLTIP_SHOW="tooltipShow";g.EVENT_TOOLTIP_HIDE="tooltipHide";g.EVENT_CELL_KEY_DOWN="cellKeyDown";g.EVENT_CELL_MOUSE_OVER="cellMouseOver";g.EVENT_CELL_MOUSE_OUT="cellMouseOut";g.EVENT_FILTER_CHANGED="filterChanged";g.EVENT_FILTER_MODIFIED="filterModified";g.EVENT_FILTER_OPENED="filterOpened";g.EVENT_ADVANCED_FILTER_BUILDER_VISIBLE_CHANGED="advancedFilterBuilderVisibleChanged";g.EVENT_SORT_CHANGED="sortChanged";g.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved";g.EVENT_ROW_CLICKED="rowClicked";g.EVENT_ROW_DOUBLE_CLICKED="rowDoubleClicked";g.EVENT_GRID_READY="gridReady";g.EVENT_GRID_PRE_DESTROYED="gridPreDestroyed";g.EVENT_GRID_SIZE_CHANGED="gridSizeChanged";g.EVENT_VIEWPORT_CHANGED="viewportChanged";g.EVENT_SCROLLBAR_WIDTH_CHANGED="scrollbarWidthChanged";g.EVENT_FIRST_DATA_RENDERED="firstDataRendered";g.EVENT_DRAG_STARTED="dragStarted";g.EVENT_DRAG_STOPPED="dragStopped";g.EVENT_CHECKBOX_CHANGED="checkboxChanged";g.EVENT_ROW_EDITING_STARTED="rowEditingStarted";g.EVENT_ROW_EDITING_STOPPED="rowEditingStopped";g.EVENT_CELL_EDITING_STARTED="cellEditingStarted";g.EVENT_CELL_EDITING_STOPPED="cellEditingStopped";g.EVENT_BODY_SCROLL="bodyScroll";g.EVENT_BODY_SCROLL_END="bodyScrollEnd";g.EVENT_HEIGHT_SCALE_CHANGED="heightScaleChanged";g.EVENT_PAGINATION_CHANGED="paginationChanged";g.EVENT_COMPONENT_STATE_CHANGED="componentStateChanged";g.EVENT_STORE_REFRESHED="storeRefreshed";g.EVENT_STATE_UPDATED="stateUpdated";g.EVENT_COLUMN_MENU_VISIBLE_CHANGED="columnMenuVisibleChanged";g.EVENT_CONTEXT_MENU_VISIBLE_CHANGED="contextMenuVisibleChanged";g.EVENT_BODY_HEIGHT_CHANGED="bodyHeightChanged";g.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED="columnContainerWidthChanged";g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED="displayedColumnsWidthChanged";g.EVENT_SCROLL_VISIBILITY_CHANGED="scrollVisibilityChanged";g.EVENT_COLUMN_HOVER_CHANGED="columnHoverChanged";g.EVENT_FLASH_CELLS="flashCells";g.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED="paginationPixelOffsetChanged";g.EVENT_DISPLAYED_ROWS_CHANGED="displayedRowsChanged";g.EVENT_LEFT_PINNED_WIDTH_CHANGED="leftPinnedWidthChanged";g.EVENT_RIGHT_PINNED_WIDTH_CHANGED="rightPinnedWidthChanged";g.EVENT_ROW_CONTAINER_HEIGHT_CHANGED="rowContainerHeightChanged";g.EVENT_HEADER_HEIGHT_CHANGED="headerHeightChanged";g.EVENT_COLUMN_HEADER_HEIGHT_CHANGED="columnHeaderHeightChanged";g.EVENT_ROW_DRAG_ENTER="rowDragEnter";g.EVENT_ROW_DRAG_MOVE="rowDragMove";g.EVENT_ROW_DRAG_LEAVE="rowDragLeave";g.EVENT_ROW_DRAG_END="rowDragEnd";g.EVENT_GRID_STYLES_CHANGED="gridStylesChanged";g.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST="columnRowGroupChangeRequest";g.EVENT_COLUMN_PIVOT_CHANGE_REQUEST="columnPivotChangeRequest";g.EVENT_COLUMN_VALUE_CHANGE_REQUEST="columnValueChangeRequest";g.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST="columnAggFuncChangeRequest";g.EVENT_STORE_UPDATED="storeUpdated";g.EVENT_FILTER_DESTROYED="filterDestroyed";g.EVENT_ROW_DATA_UPDATE_STARTED="rowDataUpdateStarted";g.EVENT_ROW_COUNT_READY="rowCountReady";g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED="advancedFilterEnabledChanged";g.EVENT_DATA_TYPES_INFERRED="dataTypesInferred";g.EVENT_FIELD_VALUE_CHANGED="fieldValueChanged";g.EVENT_FIELD_PICKER_VALUE_SELECTED="fieldPickerValueSelected";g.EVENT_SIDE_BAR_UPDATED="sideBarUpdated";var zu=new Set([g.EVENT_GRID_PRE_DESTROYED,g.EVENT_FILL_START]),CE=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let i;return typeof t!="number"?i=0:i=t+1,this.existingIds[e]=i,i}},Pr="ag-Grid-AutoColumn",da=class extends L{createAutoGroupColumns(e){const t=[],i=this.gos.get("treeData");let s=this.gos.isGroupMultiAutoColumn();return i&&s&&(console.warn('AG Grid: you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),s=!1),s?e.forEach((n,o)=>{t.push(this.createOneAutoGroupColumn(n,o))}):t.push(this.createOneAutoGroupColumn()),t}updateAutoGroupColumns(e,t){e.forEach((i,s)=>this.updateOneAutoGroupColumn(i,s,t))}createOneAutoGroupColumn(e,t){let i;e?i=`${Pr}-${e.getId()}`:i=Pr;const s=this.createAutoGroupColDef(i,e,t);s.colId=i;const n=new Ee(s,null,i,!0);return this.context.createBean(n),n}updateOneAutoGroupColumn(e,t,i){const s=e.getColDef(),n=typeof s.showRowGroup=="string"?s.showRowGroup:void 0,o=n!=null?this.columnModel.getPrimaryColumn(n):void 0,r=this.createAutoGroupColDef(e.getId(),o??void 0,t);e.setColDef(r,null,i),this.columnFactory.applyColumnState(e,r,i)}createAutoGroupColDef(e,t,i){let s=this.createBaseColDef(t);const n=this.gos.get("autoGroupColumnDef");Zt(s,n),s=this.columnFactory.addColumnDefaultAndTypes(s,e),this.gos.get("treeData")||q(s.field)&&q(s.valueGetter)&&q(s.filterValueGetter)&&s.filter!=="agGroupColumnFilter"&&(s.filter=!1),i&&i>0&&(s.headerCheckboxSelection=!1);const o=this.gos.isColumnsSortingCoupledToGroup(),r=s.valueGetter||s.field!=null;return o&&!r&&(s.sortIndex=void 0,s.initialSort=void 0),s}createBaseColDef(e){const t=this.gos.get("autoGroupColumnDef"),s={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(t&&(t.cellRenderer||t.cellRendererSelector)||(s.cellRenderer="agGroupCellRenderer"),e){const o=e.getColDef();Object.assign(s,{headerName:this.columnModel.getDisplayNameForColumn(e,"header"),headerValueGetter:o.headerValueGetter}),o.cellRenderer&&Object.assign(s,{cellRendererParams:{innerRenderer:o.cellRenderer,innerRendererParams:o.cellRendererParams}}),s.showRowGroup=e.getColId()}else s.showRowGroup=!0;return s}};c([f("columnModel")],da.prototype,"columnModel",2);c([f("columnFactory")],da.prototype,"columnFactory",2);da=c([H("autoGroupColService")],da);var vE={};mt(vE,{camelCaseToHumanText:()=>wE,camelCaseToHyphenated:()=>yE,capitalise:()=>vA,escapeString:()=>Xe,utf8_encode:()=>CA});var fA=/[&<>"']/g,mA={"&":"&","<":"<",">":">",'"':""","'":"'"};function CA(e){const t=String.fromCharCode;function i(h){const p=[];if(!h)return[];const C=h.length;let v=0,y,R;for(;v<C;)y=h.charCodeAt(v++),y>=55296&&y<=56319&&v<C?(R=h.charCodeAt(v++),(R&64512)==56320?p.push(((y&1023)<<10)+(R&1023)+65536):(p.push(y),v--)):p.push(y);return p}function s(h){if(h>=55296&&h<=57343)throw Error("Lone surrogate U+"+h.toString(16).toUpperCase()+" is not a scalar value")}function n(h,p){return t(h>>p&63|128)}function o(h){if(h>=0&&h<=31&&h!==10)return`_x${h.toString(16).toUpperCase().padStart(4,"0")}_`;if(!(h&4294967168))return t(h);let p="";return h&4294965248?h&4294901760?h&4292870144||(p=t(h>>18&7|240),p+=n(h,12),p+=n(h,6)):(s(h),p=t(h>>12&15|224),p+=n(h,6)):p=t(h>>6&31|192),p+=t(h&63|128),p}const r=i(e),l=r.length;let a=-1,u,d="";for(;++a<l;)u=r[a],d+=o(u);return d}function vA(e){return e[0].toUpperCase()+e.substring(1).toLowerCase()}function Xe(e,t){if(e==null)return null;const i=e.toString().toString();return t?i:i.replace(fA,s=>mA[s])}function wE(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,i=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(i,"$1 $2$3").replace(/\./g," ").split(" ").map(n=>n.substring(0,1).toUpperCase()+(n.length>1?n.substring(1,n.length):"")).join(" ")}function yE(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}var SE={};mt(SE,{convertToMap:()=>nn,keys:()=>yA,mapById:()=>wA});function nn(e){const t=new Map;return e.forEach(i=>t.set(i[0],i[1])),t}function wA(e,t){const i=new Map;return e.forEach(s=>i.set(t(s),s)),i}function yA(e){const t=[];return e.forEach((i,s)=>t.push(s)),t}var ft=class extends L{constructor(){super(...arguments),this.primaryHeaderRowCount=0,this.secondaryHeaderRowCount=0,this.gridHeaderRowCount=0,this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.displayedColumnsAndGroupsMap={},this.viewportColumns=[],this.viewportColumnsHash="",this.headerViewportColumns=[],this.viewportColumnsCenter=[],this.headerViewportColumnsCenter=[],this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.autoHeightActiveAtLeastOnce=!1,this.rowGroupColumns=[],this.valueColumns=[],this.pivotColumns=[],this.ready=!1,this.changeEventsDispatching=!1,this.autoGroupsNeedBuilding=!1,this.forceRecreateAutoGroups=!1,this.pivotMode=!1,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}init(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation");const e=this.gos.get("pivotMode");this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],t=>this.buildAutoGroupColumns(lr(t.source))),this.addManagedPropertyListener("autoGroupColumnDef",t=>this.onAutoGroupColumnDefChanged(lr(t.source))),this.addManagedPropertyListeners(["defaultColDef","columnTypes","suppressFieldDotNotation"],t=>this.onSharedColDefChanged(lr(t.source))),this.addManagedPropertyListener("pivotMode",t=>this.setPivotMode(this.gos.get("pivotMode"),lr(t.source))),this.addManagedListener(this.eventService,g.EVENT_FIRST_DATA_RENDERED,()=>this.onFirstDataRendered())}buildAutoGroupColumns(e){this.columnDefs&&(this.autoGroupsNeedBuilding=!0,this.forceRecreateAutoGroups=!0,this.updateGridColumns(),this.updateDisplayedColumns(e))}onAutoGroupColumnDefChanged(e){this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns,e)}onSharedColDefChanged(e){this.gridColumns&&(this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns,e),this.createColumnsFromColumnDefs(!0,e))}setColumnDefs(e,t){const i=!!this.columnDefs;this.columnDefs=e,this.createColumnsFromColumnDefs(i,t)}recreateColumnDefs(e){this.onSharedColDefChanged(e)}destroyOldColumns(e,t){const i={};if(!e)return;As(null,e,n=>{i[n.getInstanceId()]=n}),t&&As(null,t,n=>{i[n.getInstanceId()]=null});const s=Object.values(i).filter(n=>n!=null);this.destroyBeans(s)}destroyColumns(){this.destroyOldColumns(this.primaryColumnTree),this.destroyOldColumns(this.secondaryBalancedTree),this.destroyOldColumns(this.groupAutoColsBalancedTree)}createColumnsFromColumnDefs(e,t){const i=e?this.compareColumnStatesAndDispatchEvents(t):void 0;this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;const s=this.primaryColumns,n=this.primaryColumnTree,o=this.columnFactory.createColumnTree(this.columnDefs,!0,n,t);this.destroyOldColumns(this.primaryColumnTree,o.columnTree),this.primaryColumnTree=o.columnTree,this.primaryHeaderRowCount=o.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree),this.primaryColumnsMap={},this.primaryColumns.forEach(a=>this.primaryColumnsMap[a.getId()]=a),this.extractRowGroupColumns(t,s),this.extractPivotColumns(t,s),this.extractValueColumns(t,s),this.ready=!0;const r=this.gridColsArePrimary===void 0;(this.gridColsArePrimary||r||this.autoGroupsNeedBuilding)&&(this.updateGridColumns(),e&&this.gridColsArePrimary&&!this.gos.get("maintainColumnOrder")&&this.orderGridColumnsLikePrimary(),this.updateDisplayedColumns(t),this.checkViewportColumns()),this.dispatchEverythingChanged(t),this.changeEventsDispatching=!0,i&&i(),this.changeEventsDispatching=!1,this.dispatchNewColumnsLoaded(t)}shouldRowModelIgnoreRefresh(){return this.changeEventsDispatching}dispatchNewColumnsLoaded(e){const t={type:g.EVENT_NEW_COLUMNS_LOADED,source:e};this.eventService.dispatchEvent(t),e==="gridInitializing"&&this.onColumnsReady()}dispatchEverythingChanged(e){const t={type:g.EVENT_COLUMN_EVERYTHING_CHANGED,source:e};this.eventService.dispatchEvent(t)}orderGridColumnsLikePrimary(){const e=this.primaryColumns;if(!e)return;const t=e.filter(s=>this.gridColumns.indexOf(s)>=0),i=this.gridColumns.filter(s=>t.indexOf(s)<0);this.gridColumns=[...i,...t],this.gridColumns=this.placeLockedColumns(this.gridColumns)}getAllDisplayedAutoHeightCols(){return this.displayedAutoHeightCols}setViewport(){this.gos.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)}checkViewportColumns(e=!1){if(this.displayedColumnsCenter==null||!this.extractViewport())return;const i={type:g.EVENT_VIRTUAL_COLUMNS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(i)}setViewportPosition(e,t,i=!1){(e!==this.scrollWidth||t!==this.scrollPosition||this.bodyWidthDirty)&&(this.scrollWidth=e,this.scrollPosition=t,this.bodyWidthDirty=!0,this.setViewport(),this.ready&&this.checkViewportColumns(i))}isPivotMode(){return this.pivotMode}isPivotSettingAllowed(e){return e&&this.gos.get("treeData")?(K("Pivot mode not available with treeData."),!1):!0}setPivotMode(e,t){if(e===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode)||(this.pivotMode=e,!this.gridColumns))return;this.autoGroupsNeedBuilding=!0,this.updateGridColumns(),this.updateDisplayedColumns(t);const i={type:g.EVENT_COLUMN_PIVOT_MODE_CHANGED};this.eventService.dispatchEvent(i)}getSecondaryPivotColumn(e,t){if(q(this.secondaryColumns))return null;const i=this.getPrimaryColumn(t);let s=null;return this.secondaryColumns.forEach(n=>{const o=n.getColDef().pivotKeys,r=n.getColDef().pivotValueColumn;gs(o,e)&&r===i&&(s=n)}),s}setBeans(e){this.logger=e.create("columnModel")}setFirstRightAndLastLeftPinned(e){let t,i;this.gos.get("enableRtl")?(t=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null,i=this.displayedColumnsRight?de(this.displayedColumnsRight):null):(t=this.displayedColumnsLeft?de(this.displayedColumnsLeft):null,i=this.displayedColumnsRight?this.displayedColumnsRight[0]:null),this.gridColumns.forEach(s=>{s.setLastLeftPinned(s===t,e),s.setFirstRightPinned(s===i,e)})}autoSizeColumns(e){if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push(()=>this.autoSizeColumns(e));return}const{columns:t,skipHeader:i,skipHeaderGroups:s,stopAtGroup:n,source:o="api"}=e;this.animationFrameService.flushAllFrames();const r=[];let l=-1;const a=i??this.gos.get("skipHeaderOnAutoSize"),u=s??a;for(;l!==0;)l=0,this.actionOnGridColumns(t,d=>{if(r.indexOf(d)>=0)return!1;const h=this.autoWidthCalculator.getPreferredWidthForColumn(d,a);if(h>0){const p=this.normaliseColumnWidth(d,h);d.setActualWidth(p,o),r.push(d),l++}return!0},o);u||this.autoSizeColumnGroupsByColumns(t,o,n),this.dispatchColumnResizedEvent(r,!0,"autosizeColumns")}dispatchColumnResizedEvent(e,t,i,s=null){if(e&&e.length){const n={type:g.EVENT_COLUMN_RESIZED,columns:e,column:e.length===1?e[0]:null,flexColumns:s,finished:t,source:i};this.eventService.dispatchEvent(n)}}dispatchColumnChangedEvent(e,t,i){const s={type:e,columns:t,column:t&&t.length==1?t[0]:null,source:i};this.eventService.dispatchEvent(s)}dispatchColumnMovedEvent(e){const{movedColumns:t,source:i,toIndex:s,finished:n}=e,o={type:g.EVENT_COLUMN_MOVED,columns:t,column:t&&t.length===1?t[0]:null,toIndex:s,finished:n,source:i};this.eventService.dispatchEvent(o)}dispatchColumnPinnedEvent(e,t){if(!e.length)return;const i=e.length===1?e[0]:null,s=this.getCommonValue(e,o=>o.getPinned()),n={type:g.EVENT_COLUMN_PINNED,pinned:s??null,columns:e,column:i,source:t};this.eventService.dispatchEvent(n)}dispatchColumnVisibleEvent(e,t){if(!e.length)return;const i=e.length===1?e[0]:null,s=this.getCommonValue(e,o=>o.isVisible()),n={type:g.EVENT_COLUMN_VISIBLE,visible:s,columns:e,column:i,source:t};this.eventService.dispatchEvent(n)}autoSizeColumn(e,t,i){e&&this.autoSizeColumns({columns:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){const s=new Set;this.getGridColumns(e).forEach(l=>{let a=l.getParent();for(;a&&a!=i;)a.isPadding()||s.add(a),a=a.getParent()});let o;const r=[];for(const l of s){for(const a of this.ctrlsService.getHeaderRowContainerCtrls())if(o=a.getHeaderCtrlForColumn(l),o)break;o&&o.resizeLeafColumnsToFit(t)}return r}autoSizeAllColumns(e,t){if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push(()=>this.autoSizeAllColumns(e,t));return}const i=this.getAllDisplayedColumns();this.autoSizeColumns({columns:i,skipHeader:t,source:e})}getColumnsFromTree(e){const t=[],i=s=>{for(let n=0;n<s.length;n++){const o=s[n];o instanceof Ee?t.push(o):o instanceof Qe&&i(o.getChildren())}};return i(e),t}getAllDisplayedTrees(){return this.displayedTreeLeft&&this.displayedTreeRight&&this.displayedTreeCentre?this.displayedTreeLeft.concat(this.displayedTreeCentre).concat(this.displayedTreeRight):null}getPrimaryColumnTree(){return this.primaryColumnTree}getHeaderRowCount(){return this.gridHeaderRowCount}getDisplayedTreeLeft(){return this.displayedTreeLeft}getDisplayedTreeRight(){return this.displayedTreeRight}getDisplayedTreeCentre(){return this.displayedTreeCentre}isColumnDisplayed(e){return this.getAllDisplayedColumns().indexOf(e)>=0}getAllDisplayedColumns(){return this.displayedColumns}getViewportColumns(){return this.viewportColumns}getDisplayedLeftColumnsForRow(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsLeft):this.displayedColumnsLeft}getDisplayedRightColumnsForRow(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsRight):this.displayedColumnsRight}isColSpanActive(){return this.colSpanActive}getDisplayedColumnsForRow(e,t,i,s){const n=[];let o=null;for(let r=0;r<t.length;r++){const l=t[r],a=t.length-r,u=Math.min(l.getColSpan(e),a),d=[l];if(u>1){const p=u-1;for(let C=1;C<=p;C++)d.push(t[r+C]);r+=p}let h;i?(h=!1,d.forEach(p=>{i(p)&&(h=!0)})):h=!0,h&&(n.length===0&&o&&(s&&s(l))&&n.push(o),n.push(l)),o=l}return n}getViewportCenterColumnsForRow(e){if(!this.colSpanActive)return this.viewportColumnsCenter;const t=s=>{const n=s.getLeft();return b(n)&&n>this.viewportLeft},i=this.isColumnVirtualisationSuppressed()?null:this.isColumnInRowViewport.bind(this);return this.getDisplayedColumnsForRow(e,this.displayedColumnsCenter,i,t)}isColumnAtEdge(e,t){const i=this.getAllDisplayedColumns();if(!i.length)return!1;const s=t==="first";let n;if(e instanceof at){const o=e.getDisplayedLeafColumns();if(!o.length)return!1;n=s?o[0]:de(o)}else n=e;return(s?i[0]:de(i))===n}getAriaColumnIndex(e){let t;return e instanceof at?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,i=t+e.getActualWidth(),s=this.viewportLeft-200,n=this.viewportRight+200,o=t<s&&i<s,r=t>n&&i>n;return!o&&!r}getDisplayedColumnsLeftWidth(){return this.getWidthOfColsInList(this.displayedColumnsLeft)}getDisplayedColumnsRightWidth(){return this.getWidthOfColsInList(this.displayedColumnsRight)}updatePrimaryColumnList(e,t,i,s,n,o){if(!e||Ai(e))return;let r=!1;if(e.forEach(a=>{if(!a)return;const u=this.getPrimaryColumn(a);if(u){if(i){if(t.indexOf(u)>=0)return;t.push(u)}else{if(t.indexOf(u)<0)return;Qt(t,u)}s(u),r=!0}}),!r)return;this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(o);const l={type:n,columns:t,column:t.length===1?t[0]:null,source:o};this.eventService.dispatchEvent(l)}setRowGroupColumns(e,t){this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,g.EVENT_COLUMN_ROW_GROUP_CHANGED,!0,this.setRowGroupActive.bind(this),t)}setRowGroupActive(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.setColumnsVisible([t],!1,i),!e&&!this.gos.get("suppressMakeColumnVisibleAfterUnGroup")&&this.setColumnsVisible([t],!0,i))}addRowGroupColumns(e,t){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),g.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}removeRowGroupColumns(e,t){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),g.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}addPivotColumns(e,t){this.updatePrimaryColumnList(e,this.pivotColumns,!0,i=>i.setPivotActive(!0,t),g.EVENT_COLUMN_PIVOT_CHANGED,t)}setPivotColumns(e,t){this.setPrimaryColumnList(e,this.pivotColumns,g.EVENT_COLUMN_PIVOT_CHANGED,!0,(i,s)=>{s.setPivotActive(i,t)},t)}removePivotColumns(e,t){this.updatePrimaryColumnList(e,this.pivotColumns,!1,i=>i.setPivotActive(!1,t),g.EVENT_COLUMN_PIVOT_CHANGED,t)}setPrimaryColumnList(e,t,i,s,n,o){if(!this.gridColumns)return;const r=new Map;t.forEach((l,a)=>r.set(l,a)),t.length=0,b(e)&&e.forEach(l=>{const a=this.getPrimaryColumn(l);a&&t.push(a)}),t.forEach((l,a)=>{const u=r.get(l);if(u===void 0){r.set(l,0);return}s&&u!==a||r.delete(l)}),(this.primaryColumns||[]).forEach(l=>{const a=t.indexOf(l)>=0;n(a,l)}),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(o),this.dispatchColumnChangedEvent(i,[...r.keys()],o)}setValueColumns(e,t){this.setPrimaryColumnList(e,this.valueColumns,g.EVENT_COLUMN_VALUE_CHANGED,!1,this.setValueActive.bind(this),t)}setValueActive(e,t,i){if(e!==t.isValueActive()&&(t.setValueActive(e,i),e&&!t.getAggFunc()&&this.aggFuncService)){const s=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(s)}}addValueColumns(e,t){this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),g.EVENT_COLUMN_VALUE_CHANGED,t)}removeValueColumns(e,t){this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),g.EVENT_COLUMN_VALUE_CHANGED,t)}normaliseColumnWidth(e,t){const i=e.getMinWidth();b(i)&&t<i&&(t=i);const s=e.getMaxWidth();return b(s)&&e.isGreaterThanMax(t)&&(t=s),t}getPrimaryOrGridColumn(e){return this.getPrimaryColumn(e)||this.getGridColumn(e)}setColumnWidths(e,t,i,s){const n=[];e.forEach(o=>{const r=this.getPrimaryOrGridColumn(o.key);if(!r)return;if(n.push({width:o.newWidth,ratios:[1],columns:[r]}),this.gos.get("colResizeDefault")==="shift"&&(t=!t),t){const a=this.getDisplayedColAfter(r);if(!a)return;const u=r.getActualWidth()-o.newWidth,d=a.getActualWidth()+u;n.push({width:d,ratios:[1],columns:[a]})}}),n.length!==0&&this.resizeColumnSets({resizeSets:n,finished:i,source:s})}checkMinAndMaxWidthsForSet(e){const{columns:t,width:i}=e;let s=0,n=0,o=!0;t.forEach(a=>{const u=a.getMinWidth();s+=u||0;const d=a.getMaxWidth();b(d)&&d>0?n+=d:o=!1});const r=i>=s,l=!o||i<=n;return r&&l}resizeColumnSets(e){const{resizeSets:t,finished:i,source:s}=e;if(!(!t||t.every(d=>this.checkMinAndMaxWidthsForSet(d)))){if(i){const d=t&&t.length>0?t[0].columns:null;this.dispatchColumnResizedEvent(d,i,s)}return}const o=[],r=[];t.forEach(d=>{const{width:h,columns:p,ratios:C}=d,v={},y={};p.forEach(m=>r.push(m));let R=!0,w=0;for(;R;){if(w++,w>1e3){console.error("AG Grid: infinite loop in resizeColumnSets");break}R=!1;const m=[];let E=0,T=h;p.forEach((A,F)=>{if(y[A.getId()])T-=v[A.getId()];else{m.push(A);const x=C[F];E+=x}});const P=1/E;m.forEach((A,F)=>{const I=F===m.length-1;let x;I?x=T:(x=Math.round(C[F]*h*P),T-=x);const k=A.getMinWidth(),U=A.getMaxWidth();b(k)&&x<k?(x=k,y[A.getId()]=!0,R=!0):b(U)&&U>0&&x>U&&(x=U,y[A.getId()]=!0,R=!0),v[A.getId()]=x})}p.forEach(m=>{const E=v[m.getId()];m.getActualWidth()!==E&&(m.setActualWidth(E,s),o.push(m))})});const l=o.length>0;let a=[];l&&(a=this.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0}),this.setLeftValues(s),this.updateBodyWidths(),this.checkViewportColumns());const u=r.concat(a);(l||i)&&this.dispatchColumnResizedEvent(u,i,s,a)}setColumnAggFunc(e,t,i){if(!e)return;const s=this.getPrimaryColumn(e);s&&(s.setAggFunc(t),this.dispatchColumnChangedEvent(g.EVENT_COLUMN_VALUE_CHANGED,[s],i))}moveRowGroupColumn(e,t,i){if(this.isRowGroupEmpty())return;const s=this.rowGroupColumns[e],n=this.rowGroupColumns.slice(e,t);this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(t,0,s);const o={type:g.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:n,column:n.length===1?n[0]:null,source:i};this.eventService.dispatchEvent(o)}moveColumns(e,t,i,s=!0){if(!this.gridColumns)return;if(this.columnAnimationService.start(),t>this.gridColumns.length-e.length){console.warn("AG Grid: tried to insert columns in invalid location, toIndex = "+t),console.warn("AG Grid: remember that you should not count the moving columns when calculating the new index");return}const n=this.getGridColumns(e);this.doesMovePassRules(n,t)&&(ag(this.gridColumns,n,t),this.updateDisplayedColumns(i),this.dispatchColumnMovedEvent({movedColumns:n,source:i,toIndex:t,finished:s}),this.columnAnimationService.finish())}doesMovePassRules(e,t){const i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){return!(!this.doesMovePassMarryChildren(e)||!this.doesMovePassLockedPositions(e))}getProposedColumnOrder(e,t){const i=this.gridColumns.slice();return ag(i,e,t),i}sortColumnsLikeGridColumns(e){!e||e.length<=1||e.filter(i=>this.gridColumns.indexOf(i)<0).length>0||e.sort((i,s)=>{const n=this.gridColumns.indexOf(i),o=this.gridColumns.indexOf(s);return n-o})}doesMovePassLockedPositions(e){let t=0,i=!0;const s=n=>n?n===!0||n==="left"?0:2:1;return e.forEach(n=>{const o=s(n.getColDef().lockPosition);o<t&&(i=!1),t=o}),i}doesMovePassMarryChildren(e){let t=!0;return As(null,this.gridBalancedTree,i=>{if(!(i instanceof Qe))return;const s=i,n=s.getColGroupDef();if(!(n&&n.marryChildren))return;const r=[];s.getLeafColumns().forEach(h=>{const p=e.indexOf(h);r.push(p)});const l=Math.max.apply(Math,r),a=Math.min.apply(Math,r),u=l-a,d=s.getLeafColumns().length-1;u>d&&(t=!1)}),t}moveColumnByIndex(e,t,i){if(!this.gridColumns)return;const s=this.gridColumns[e];this.moveColumns([s],t,i)}getColumnDefs(){if(!this.primaryColumns)return;const e=this.primaryColumns.slice();return this.gridColsArePrimary?e.sort((t,i)=>this.gridColumns.indexOf(t)-this.gridColumns.indexOf(i)):this.lastPrimaryOrder&&e.sort((t,i)=>this.lastPrimaryOrder.indexOf(t)-this.lastPrimaryOrder.indexOf(i)),this.columnDefFactory.buildColumnDefs(e,this.rowGroupColumns,this.pivotColumns)}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}updateBodyWidths(){const e=this.getWidthOfColsInList(this.displayedColumnsCenter),t=this.getWidthOfColsInList(this.displayedColumnsLeft),i=this.getWidthOfColsInList(this.displayedColumnsRight);if(this.bodyWidthDirty=this.bodyWidth!==e,this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i){this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i;const n={type:g.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED};this.eventService.dispatchEvent(n);const o={type:g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED};this.eventService.dispatchEvent(o)}}getValueColumns(){return this.valueColumns?this.valueColumns:[]}getPivotColumns(){return this.pivotColumns?this.pivotColumns:[]}isPivotActive(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode}getRowGroupColumns(){return this.rowGroupColumns?this.rowGroupColumns:[]}getDisplayedCenterColumns(){return this.displayedColumnsCenter}getDisplayedLeftColumns(){return this.displayedColumnsLeft}getDisplayedRightColumns(){return this.displayedColumnsRight}getAllPrimaryColumns(){return this.primaryColumns?this.primaryColumns:null}getSecondaryColumns(){return this.secondaryColumns?this.secondaryColumns:null}getAllColumnsForQuickFilter(){return this.columnsForQuickFilter}getAllGridColumns(){var e;return(e=this.gridColumns)!=null?e:[]}isRowGroupEmpty(){return Ai(this.rowGroupColumns)}setColumnsVisible(e,t=!1,i){this.applyColumnState({state:e.map(s=>({colId:typeof s=="string"?s:s.getColId(),hide:!t}))},i)}setColumnsPinned(e,t,i){if(!this.gridColumns)return;if(this.gos.isDomLayout("print")){console.warn("AG Grid: Changing the column pinning status is not allowed with domLayout='print'");return}this.columnAnimationService.start();let s;t===!0||t==="left"?s="left":t==="right"?s="right":s=null,this.actionOnGridColumns(e,n=>n.getPinned()!==s?(n.setPinned(s),!0):!1,i,()=>({type:g.EVENT_COLUMN_PINNED,pinned:s,column:null,columns:null,source:i})),this.columnAnimationService.finish()}actionOnGridColumns(e,t,i,s){if(Ai(e))return;const n=[];if(e.forEach(o=>{if(!o)return;const r=this.getGridColumn(o);if(!r)return;t(r)!==!1&&n.push(r)}),!!n.length&&(this.updateDisplayedColumns(i),b(s)&&s)){const o=s();o.columns=n,o.column=n.length===1?n[0]:null,this.eventService.dispatchEvent(o)}}getDisplayedColBefore(e){const t=this.getAllDisplayedColumns(),i=t.indexOf(e);return i>0?t[i-1]:null}getDisplayedColAfter(e){const t=this.getAllDisplayedColumns(),i=t.indexOf(e);return i<t.length-1?t[i+1]:null}getDisplayedGroupAtDirection(e,t){const i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),n=t==="After"?de(s):s[0],o=`getDisplayedCol${t}`;for(;;){const r=this[o](n);if(!r)return null;const l=this.getColumnGroupAtLevel(r,i);if(l!==e)return l}}getColumnGroupAtLevel(e,t){let i=e.getParent(),s,n;for(;s=i.getProvidedColumnGroup().getLevel(),n=i.getPaddingLevel(),!(s+n<=t);)i=i.getParent();return i}isPinningLeft(){return this.displayedColumnsLeft.length>0}isPinningRight(){return this.displayedColumnsRight.length>0}getPrimaryAndSecondaryAndAutoColumns(){return[].concat(this.primaryColumns||[],this.groupAutoColumns||[],this.secondaryColumns||[])}createStateItemFromColumn(e){const t=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,i=e.isPivotActive()?this.pivotColumns.indexOf(e):null,s=e.isValueActive()?e.getAggFunc():null,n=e.getSort()!=null?e.getSort():null,o=e.getSortIndex()!=null?e.getSortIndex():null,r=e.getFlex()!=null&&e.getFlex()>0?e.getFlex():null;return{colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:n,sortIndex:o,aggFunc:s,rowGroup:e.isRowGroupActive(),rowGroupIndex:t,pivot:e.isPivotActive(),pivotIndex:i,flex:r}}getColumnState(){if(q(this.primaryColumns)||!this.isAlive())return[];const t=this.getPrimaryAndSecondaryAndAutoColumns().map(this.createStateItemFromColumn.bind(this));return this.orderColumnStateList(t),t}orderColumnStateList(e){const t=nn(this.gridColumns.map((i,s)=>[i.getColId(),s]));e.sort((i,s)=>{const n=t.has(i.colId)?t.get(i.colId):-1,o=t.has(s.colId)?t.get(s.colId):-1;return n-o})}resetColumnState(e){if(Ai(this.primaryColumns))return;const t=this.getColumnsFromTree(this.primaryColumnTree),i=[];let s=1e3,n=1e3,o=[];this.groupAutoColumns&&(o=o.concat(this.groupAutoColumns)),t&&(o=o.concat(t)),o.forEach(r=>{const l=this.getColumnStateFromColDef(r);q(l.rowGroupIndex)&&l.rowGroup&&(l.rowGroupIndex=s++),q(l.pivotIndex)&&l.pivot&&(l.pivotIndex=n++),i.push(l)}),this.applyColumnState({state:i,applyOrder:!0},e)}getColumnStateFromColDef(e){const t=(v,y)=>v??y??null,i=e.getColDef(),s=t(i.sort,i.initialSort),n=t(i.sortIndex,i.initialSortIndex),o=t(i.hide,i.initialHide),r=t(i.pinned,i.initialPinned),l=t(i.width,i.initialWidth),a=t(i.flex,i.initialFlex);let u=t(i.rowGroupIndex,i.initialRowGroupIndex),d=t(i.rowGroup,i.initialRowGroup);u==null&&(d==null||d==!1)&&(u=null,d=null);let h=t(i.pivotIndex,i.initialPivotIndex),p=t(i.pivot,i.initialPivot);h==null&&(p==null||p==!1)&&(h=null,p=null);const C=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:n,hide:o,pinned:r,width:l,flex:a,rowGroup:d,rowGroupIndex:u,pivot:p,pivotIndex:h,aggFunc:C}}applyColumnState(e,t){if(Ai(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;const i=(o,r,l)=>{const a=this.compareColumnStatesAndDispatchEvents(t);this.autoGroupsNeedBuilding=!0;const u=r.slice(),d={},h={},p=[],C=[];let v=0;const y=this.rowGroupColumns.slice(),R=this.pivotColumns.slice();o.forEach(T=>{const P=T.colId||"";if(P.startsWith(Pr)){p.push(T),C.push(T);return}const F=l(P);F?(this.syncColumnWithStateItem(F,T,e.defaultState,d,h,!1,t),Qt(u,F)):(C.push(T),v+=1)});const w=T=>this.syncColumnWithStateItem(T,null,e.defaultState,d,h,!1,t);u.forEach(w);const m=(T,P,A,F)=>{const I=T[A.getId()],x=T[F.getId()],k=I!=null,U=x!=null;if(k&&U)return I-x;if(k)return-1;if(U)return 1;const ee=P.indexOf(A),Y=P.indexOf(F),ye=ee>=0,Re=Y>=0;return ye&&Re?ee-Y:ye?-1:1};this.rowGroupColumns.sort(m.bind(this,d,y)),this.pivotColumns.sort(m.bind(this,h,R)),this.updateGridColumns();const E=this.groupAutoColumns?this.groupAutoColumns.slice():[];return p.forEach(T=>{const P=this.getAutoColumn(T.colId);Qt(E,P),this.syncColumnWithStateItem(P,T,e.defaultState,null,null,!0,t)}),E.forEach(w),this.applyOrderAfterApplyState(e),this.updateDisplayedColumns(t),this.dispatchEverythingChanged(t),a(),{unmatchedAndAutoStates:C,unmatchedCount:v}};this.columnAnimationService.start();let{unmatchedAndAutoStates:s,unmatchedCount:n}=i(e.state||[],this.primaryColumns||[],o=>this.getPrimaryColumn(o));return(s.length>0||b(e.defaultState))&&(n=i(s,this.secondaryColumns||[],o=>this.getSecondaryColumn(o)).unmatchedCount),this.columnAnimationService.finish(),n===0}applyOrderAfterApplyState(e){if(!e.applyOrder||!e.state)return;let t=[];const i={};e.state.forEach(n=>{if(!n.colId||i[n.colId])return;const o=this.gridColumnsMap[n.colId];o&&(t.push(o),i[n.colId]=!0)});let s=0;if(this.gridColumns.forEach(n=>{const o=n.getColId();if(i[o]!=null)return;o.startsWith(Pr)?aa(t,n,s++):t.push(n)}),t=this.placeLockedColumns(t),!this.doesMovePassMarryChildren(t)){console.warn("AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.");return}this.gridColumns=t}compareColumnStatesAndDispatchEvents(e){const t={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()},i=this.getColumnState(),s={};return i.forEach(n=>{s[n.colId]=n}),()=>{const n=this.getPrimaryAndSecondaryAndAutoColumns(),o=(y,R,w,m)=>{const E=R.map(m),T=w.map(m);if(gs(E,T))return;const A=new Set(R);w.forEach(x=>{A.delete(x)||A.add(x)});const F=[...A],I={type:y,columns:F,column:F.length===1?F[0]:null,source:e};this.eventService.dispatchEvent(I)},r=y=>{const R=[];return n.forEach(w=>{const m=s[w.getColId()];m&&y(m,w)&&R.push(w)}),R},l=y=>y.getColId();o(g.EVENT_COLUMN_ROW_GROUP_CHANGED,t.rowGroupColumns,this.rowGroupColumns,l),o(g.EVENT_COLUMN_PIVOT_CHANGED,t.pivotColumns,this.pivotColumns,l);const u=r((y,R)=>{const w=y.aggFunc!=null,m=w!=R.isValueActive(),E=w&&y.aggFunc!=R.getAggFunc();return m||E});u.length>0&&this.dispatchColumnChangedEvent(g.EVENT_COLUMN_VALUE_CHANGED,u,e);const d=(y,R)=>y.width!=R.getActualWidth();this.dispatchColumnResizedEvent(r(d),!0,e);const h=(y,R)=>y.pinned!=R.getPinned();this.dispatchColumnPinnedEvent(r(h),e);const p=(y,R)=>y.hide==R.isVisible();this.dispatchColumnVisibleEvent(r(p),e);const v=r((y,R)=>y.sort!=R.getSort()||y.sortIndex!=R.getSortIndex());v.length>0&&this.sortController.dispatchSortChangedEvents(e,v),this.normaliseColumnMovedEventForColumnState(i,e)}}getCommonValue(e,t){if(!e||e.length==0)return;const i=t(e[0]);for(let s=1;s<e.length;s++)if(i!==t(e[s]))return;return i}normaliseColumnMovedEventForColumnState(e,t){const i=this.getColumnState(),s={};i.forEach(a=>s[a.colId]=a);const n={};e.forEach(a=>{s[a.colId]&&(n[a.colId]=!0)});const o=e.filter(a=>n[a.colId]),r=i.filter(a=>n[a.colId]),l=[];r.forEach((a,u)=>{const d=o&&o[u];if(d&&d.colId!==a.colId){const h=this.getGridColumn(d.colId);h&&l.push(h)}}),l.length&&this.dispatchColumnMovedEvent({movedColumns:l,source:t,finished:!0})}syncColumnWithStateItem(e,t,i,s,n,o,r){var l;if(!e)return;const a=(T,P)=>{const A={value1:void 0,value2:void 0};let F=!1;return t&&(t[T]!==void 0&&(A.value1=t[T],F=!0),b(P)&&t[P]!==void 0&&(A.value2=t[P],F=!0)),!F&&i&&(i[T]!==void 0&&(A.value1=i[T]),b(P)&&i[P]!==void 0&&(A.value2=i[P])),A},u=a("hide").value1;u!==void 0&&e.setVisible(!u,r);const d=a("pinned").value1;d!==void 0&&e.setPinned(d);const h=(l=e.getColDef().minWidth)!=null?l:this.environment.getMinColWidth(),p=a("flex").value1;if(p!==void 0&&e.setFlex(p),p==null){const T=a("width").value1;T!=null&&h!=null&&T>=h&&e.setActualWidth(T,r)}const C=a("sort").value1;C!==void 0&&(C==="desc"||C==="asc"?e.setSort(C,r):e.setSort(void 0,r));const v=a("sortIndex").value1;if(v!==void 0&&e.setSortIndex(v),o||!e.isPrimary())return;const y=a("aggFunc").value1;y!==void 0&&(typeof y=="string"?(e.setAggFunc(y),e.isValueActive()||(e.setValueActive(!0,r),this.valueColumns.push(e))):(b(y)&&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,r),Qt(this.valueColumns,e))));const{value1:R,value2:w}=a("rowGroup","rowGroupIndex");(R!==void 0||w!==void 0)&&(typeof w=="number"||R?(e.isRowGroupActive()||(e.setRowGroupActive(!0,r),this.rowGroupColumns.push(e)),s&&typeof w=="number"&&(s[e.getId()]=w)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,r),Qt(this.rowGroupColumns,e)));const{value1:m,value2:E}=a("pivot","pivotIndex");(m!==void 0||E!==void 0)&&(typeof E=="number"||m?(e.isPivotActive()||(e.setPivotActive(!0,r),this.pivotColumns.push(e)),n&&typeof E=="number"&&(n[e.getId()]=E)):e.isPivotActive()&&(e.setPivotActive(!1,r),Qt(this.pivotColumns,e)))}getGridColumns(e){return this.getColumns(e,this.getGridColumn.bind(this))}getColumns(e,t){const i=[];return e&&e.forEach(s=>{const n=t(s);n&&i.push(n)}),i}getColumnWithValidation(e){if(e==null)return null;const t=this.getGridColumn(e);return t||console.warn("AG Grid: could not find column "+e),t}getPrimaryColumn(e){return this.primaryColumns?this.getColumn(e,this.primaryColumns,this.primaryColumnsMap):null}getGridColumn(e){return this.getColumn(e,this.gridColumns,this.gridColumnsMap)}lookupGridColumn(e){return this.gridColumnsMap[e]}getSecondaryColumn(e){return this.secondaryColumns?this.getColumn(e,this.secondaryColumns,this.secondaryColumnsMap):null}getColumn(e,t,i){if(!e||!i)return null;if(typeof e=="string"&&i[e])return i[e];for(let s=0;s<t.length;s++)if(this.columnsMatch(t[s],e))return t[s];return this.getAutoColumn(e)}getSourceColumnsForGroupColumn(e){const t=e.getColDef().showRowGroup;if(!t)return null;if(t===!0)return this.rowGroupColumns.slice(0);const i=this.getPrimaryColumn(t);return i?[i]:null}getAutoColumn(e){return!this.groupAutoColumns||!b(this.groupAutoColumns)||q(this.groupAutoColumns)?null:this.groupAutoColumns.find(t=>this.columnsMatch(t,e))||null}columnsMatch(e,t){const i=e===t,s=e.getColDef()===t,n=e.getColId()==t;return i||s||n}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;const s=this.getHeaderName(e.getColDef(),e,null,null,t);return i?this.wrapHeaderNameWithAggFunc(e,s):s}getDisplayNameForProvidedColumnGroup(e,t,i){const s=t?t.getColGroupDef():null;return s?this.getHeaderName(s,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,s,n){const o=e.headerValueGetter;if(o){const r=this.gos.addGridCommonParams({colDef:e,column:t,columnGroup:i,providedColumnGroup:s,location:n});return typeof o=="function"?o(r):typeof o=="string"?this.expressionService.evaluate(o,r):(console.warn("AG Grid: headerValueGetter must be a function or a string"),"")}else{if(e.headerName!=null)return e.headerName;if(e.field)return wE(e.field)}return""}wrapHeaderNameWithAggFunc(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;const i=e.getColDef().pivotValueColumn,s=b(i);let n=null,o;if(s){const r=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&this.valueColumns.length===1,l=e.getColDef().pivotTotalColumnIds!==void 0;if(r&&!l)return t;n=i?i.getAggFunc():null,o=!0}else{const r=e.isValueActive(),l=this.pivotMode||!this.isRowGroupEmpty();r&&l?(n=e.getAggFunc(),o=!0):o=!1}if(o){const r=typeof n=="string"?n:"func";return`${this.localeService.getLocaleTextFunc()(r,r)}(${t})`}return t}getColumnGroup(e,t){if(!e)return null;if(e instanceof at)return e;const i=this.getAllDisplayedTrees(),s=typeof t=="number";let n=null;return Bn(i,!1,o=>{if(o instanceof at){const r=o;let l;s?l=e===r.getGroupId()&&t===r.getPartId():l=e===r.getGroupId(),l&&(n=r)}}),n}isReady(){return this.ready}extractValueColumns(e,t){this.valueColumns=this.extractColumns(t,this.valueColumns,(i,s)=>i.setValueActive(s,e),()=>{},()=>{},i=>{const s=i.aggFunc;if(s===null||s==="")return null;if(s!==void 0)return!!s},i=>i.initialAggFunc!=null&&i.initialAggFunc!=""),this.valueColumns.forEach(i=>{const s=i.getColDef();s.aggFunc!=null&&s.aggFunc!=""?i.setAggFunc(s.aggFunc):i.getAggFunc()||i.setAggFunc(s.initialAggFunc)})}extractRowGroupColumns(e,t){this.rowGroupColumns=this.extractColumns(t,this.rowGroupColumns,(i,s)=>i.setRowGroupActive(s,e),i=>i.rowGroupIndex,i=>i.initialRowGroupIndex,i=>i.rowGroup,i=>i.initialRowGroup)}extractColumns(e=[],t=[],i,s,n,o,r){const l=[],a=[];(this.primaryColumns||[]).forEach(h=>{const p=e.indexOf(h)<0,C=h.getColDef(),v=xd(o(C)),y=xd(r(C)),R=Cn(s(C)),w=Cn(n(C));let m;v!==void 0?m=v:R!==void 0?R===null?m=!1:m=R>=0:p?y!==void 0?m=y:w!==void 0?m=w!=null&&w>=0:m=!1:m=t.indexOf(h)>=0,m&&((p?R!=null||w!=null:R!=null)?l.push(h):a.push(h))});const u=h=>{const p=s(h.getColDef()),C=n(h.getColDef());return p??C};l.sort((h,p)=>{const C=u(h),v=u(p);return C===v?0:C<v?-1:1});const d=[].concat(l);return t.forEach(h=>{a.indexOf(h)>=0&&d.push(h)}),a.forEach(h=>{d.indexOf(h)<0&&d.push(h)}),t.forEach(h=>{d.indexOf(h)<0&&i(h,!1)}),d.forEach(h=>{t.indexOf(h)<0&&i(h,!0)}),d}extractPivotColumns(e,t){this.pivotColumns=this.extractColumns(t,this.pivotColumns,(i,s)=>i.setPivotActive(s,e),i=>i.pivotIndex,i=>i.initialPivotIndex,i=>i.pivot,i=>i.initialPivot)}resetColumnGroupState(e){if(!this.primaryColumnTree)return;const t=[];As(null,this.primaryColumnTree,i=>{if(i instanceof Qe){const s=i.getColGroupDef(),n={groupId:i.getGroupId(),open:s?s.openByDefault:void 0};t.push(n)}}),this.setColumnGroupState(t,e)}getColumnGroupState(){const e=[];return As(null,this.gridBalancedTree,t=>{t instanceof Qe&&e.push({groupId:t.getGroupId(),open:t.isExpanded()})}),e}setColumnGroupState(e,t){if(!this.gridBalancedTree)return;this.columnAnimationService.start();const i=[];if(e.forEach(s=>{const n=s.groupId,o=s.open,r=this.getProvidedColumnGroup(n);r&&r.isExpanded()!==o&&(this.logger.log("columnGroupOpened("+r.getGroupId()+","+o+")"),r.setExpanded(o),i.push(r))}),this.updateGroupsAndDisplayedColumns(t),this.setFirstRightAndLastLeftPinned(t),i.length){const s={type:g.EVENT_COLUMN_GROUP_OPENED,columnGroup:Qe.length===1?i[0]:void 0,columnGroups:i};this.eventService.dispatchEvent(s)}this.columnAnimationService.finish()}setColumnGroupOpened(e,t,i){let s;e instanceof Qe?s=e.getId():s=e||"",this.setColumnGroupState([{groupId:s,open:t}],i)}getProvidedColumnGroup(e){typeof e!="string"&&console.error("AG Grid: group key must be a string");let t=null;return As(null,this.gridBalancedTree,i=>{i instanceof Qe&&i.getId()===e&&(t=i)}),t}calculateColumnsForDisplay(){let e;return this.pivotMode&&q(this.secondaryColumns)?e=this.gridColumns.filter(t=>{const i=this.groupAutoColumns&&vi(this.groupAutoColumns,t),s=this.valueColumns&&vi(this.valueColumns,t);return i||s}):e=this.gridColumns.filter(t=>this.groupAutoColumns&&vi(this.groupAutoColumns,t)||t.isVisible()),e}checkColSpanActiveInCols(e){let t=!1;return e.forEach(i=>{b(i.getColDef().colSpan)&&(t=!0)}),t}calculateColumnsForGroupDisplay(){this.groupDisplayColumns=[],this.groupDisplayColumnsMap={};const e=t=>{const i=t.getColDef(),s=i.showRowGroup;i&&b(s)&&(this.groupDisplayColumns.push(t),typeof s=="string"?this.groupDisplayColumnsMap[s]=t:s===!0&&this.getRowGroupColumns().forEach(n=>{this.groupDisplayColumnsMap[n.getId()]=t}))};this.gridColumns.forEach(e)}getGroupDisplayColumns(){return this.groupDisplayColumns}getGroupDisplayColumnForGroup(e){return this.groupDisplayColumnsMap[e]}updateDisplayedColumns(e){const t=this.calculateColumnsForDisplay();this.buildDisplayedTrees(t),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e)}isSecondaryColumnsPresent(){return b(this.secondaryColumns)}setSecondaryColumns(e,t){if(!this.gridColumns)return;const i=e;if(!(!i&&q(this.secondaryColumns))){if(i){this.processSecondaryColumnDefinitions(e);const s=this.columnFactory.createColumnTree(e,!1,this.secondaryBalancedTree||this.previousSecondaryColumns||void 0,t);this.destroyOldColumns(this.secondaryBalancedTree,s.columnTree),this.secondaryBalancedTree=s.columnTree,this.secondaryHeaderRowCount=s.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsMap={},this.secondaryColumns.forEach(n=>this.secondaryColumnsMap[n.getId()]=n),this.previousSecondaryColumns=null}else this.previousSecondaryColumns=this.secondaryBalancedTree,this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsMap={};this.updateGridColumns(),this.updateDisplayedColumns(t)}}processSecondaryColumnDefinitions(e){const t=this.gos.get("processPivotResultColDef"),i=this.gos.get("processPivotResultColGroupDef");if(!t&&!i)return;const s=n=>{n.forEach(o=>{if(b(o.children)){const l=o;i&&i(l),s(l.children)}else t&&t(o)})};e&&s(e)}updateGridColumns(){const e=this.gridBalancedTree;if(this.gridColsArePrimary?this.lastPrimaryOrder=this.gridColumns:this.lastSecondaryOrder=this.gridColumns,this.createGroupAutoColumnsIfNeeded()){const s=nn(this.groupAutoColumns.map(n=>[n,!0]));this.lastPrimaryOrder&&(this.lastPrimaryOrder=this.lastPrimaryOrder.filter(n=>!s.has(n)),this.lastPrimaryOrder=[...this.groupAutoColumns,...this.lastPrimaryOrder]),this.lastSecondaryOrder&&(this.lastSecondaryOrder=this.lastSecondaryOrder.filter(n=>!s.has(n)),this.lastSecondaryOrder=[...this.groupAutoColumns,...this.lastSecondaryOrder])}let i;if(this.secondaryColumns&&this.secondaryBalancedTree){const s=this.secondaryColumns.some(n=>this.gridColumnsMap[n.getColId()]!==void 0);this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1,s&&(i=this.lastSecondaryOrder)}else this.primaryColumns&&(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,i=this.lastPrimaryOrder);if(this.addAutoGroupToGridColumns(),this.orderGridColsLike(i),this.gridColumns=this.placeLockedColumns(this.gridColumns),this.calculateColumnsForGroupDisplay(),this.refreshQuickFilterColumns(),this.clearDisplayedAndViewportColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns),this.gridColumnsMap={},this.gridColumns.forEach(s=>this.gridColumnsMap[s.getId()]=s),this.setAutoHeightActive(),!gs(e,this.gridBalancedTree)){const s={type:g.EVENT_GRID_COLUMNS_CHANGED};this.eventService.dispatchEvent(s)}}setAutoHeightActive(){this.autoHeightActive=this.gridColumns.filter(e=>e.isAutoHeight()).length>0,this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,this.gos.isRowModelType("clientSide")||this.gos.isRowModelType("serverSide")||K("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}orderGridColsLike(e){if(q(e))return;const t=nn(e.map((a,u)=>[a,u]));let i=!0;if(this.gridColumns.forEach(a=>{t.has(a)&&(i=!1)}),i)return;const s=nn(this.gridColumns.map(a=>[a,!0])),n=e.filter(a=>s.has(a)),o=nn(n.map(a=>[a,!0])),r=this.gridColumns.filter(a=>!o.has(a)),l=n.slice();r.forEach(a=>{let u=a.getOriginalParent();if(!u){l.push(a);return}const d=[];for(;!d.length&&u;)u.getLeafColumns().forEach(v=>{const y=l.indexOf(v)>=0,R=d.indexOf(v)<0;y&&R&&d.push(v)}),u=u.getOriginalParent();if(!d.length){l.push(a);return}const h=d.map(C=>l.indexOf(C)),p=Math.max(...h);aa(l,a,p+1)}),this.gridColumns=l}isPrimaryColumnGroupsPresent(){return this.primaryHeaderRowCount>1}refreshQuickFilterColumns(){var e;let t=(e=this.isPivotMode()&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")?this.secondaryColumns:this.primaryColumns)!=null?e:[];this.groupAutoColumns&&(t=t.concat(this.groupAutoColumns)),this.columnsForQuickFilter=this.gos.get("includeHiddenColumnsInQuickFilter")?t:t.filter(i=>i.isVisible()||i.isRowGroupActive())}placeLockedColumns(e){const t=[],i=[],s=[];return e.forEach(n=>{const o=n.getColDef().lockPosition;o==="right"?s.push(n):o==="left"||o===!0?t.push(n):i.push(n)}),[...t,...i,...s]}addAutoGroupToGridColumns(){if(q(this.groupAutoColumns)){this.destroyOldColumns(this.groupAutoColsBalancedTree),this.groupAutoColsBalancedTree=null;return}this.gridColumns=this.groupAutoColumns?this.groupAutoColumns.concat(this.gridColumns):this.gridColumns;const e=this.columnFactory.createForAutoGroups(this.groupAutoColumns,this.gridBalancedTree);this.destroyOldColumns(this.groupAutoColsBalancedTree,e),this.groupAutoColsBalancedTree=e,this.gridBalancedTree=e.concat(this.gridBalancedTree)}clearDisplayedAndViewportColumns(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.ariaOrderColumns=[],this.viewportColumns=[],this.headerViewportColumns=[],this.viewportColumnsHash=""}updateGroupsAndDisplayedColumns(e){this.updateOpenClosedVisibilityInColumnGroups(),this.deriveDisplayedColumns(e),this.refreshFlexedColumns(),this.extractViewport(),this.updateBodyWidths();const t={type:g.EVENT_DISPLAYED_COLUMNS_CHANGED};this.eventService.dispatchEvent(t)}deriveDisplayedColumns(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(t=>t.isAutoHeight())}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}joinColumnsAriaOrder(){const e=this.getAllGridColumns(),t=[],i=[],s=[];for(const n of e){const o=n.getPinned();o?o===!0||o==="left"?t.push(n):s.push(n):i.push(n)}this.ariaOrderColumns=t.concat(i).concat(s)}joinDisplayedColumns(){this.gos.get("enableRtl")?this.displayedColumns=this.displayedColumnsRight.concat(this.displayedColumnsCenter).concat(this.displayedColumnsLeft):this.displayedColumns=this.displayedColumnsLeft.concat(this.displayedColumnsCenter).concat(this.displayedColumnsRight)}setLeftValues(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups()}setLeftValuesOfColumns(e){if(!this.primaryColumns)return;const t=this.getPrimaryAndSecondaryAndAutoColumns().slice(0),i=this.gos.get("enableRtl");[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach(s=>{if(i){let n=this.getWidthOfColsInList(s);s.forEach(o=>{n-=o.getActualWidth(),o.setLeft(n,e)})}else{let n=0;s.forEach(o=>{o.setLeft(n,e),n+=o.getActualWidth()})}uE(t,s)}),t.forEach(s=>{s.setLeft(null,e)})}setLeftValuesOfGroups(){[this.displayedTreeLeft,this.displayedTreeRight,this.displayedTreeCentre].forEach(e=>{e.forEach(t=>{t instanceof at&&t.checkLeft()})})}derivedDisplayedColumnsFromDisplayedTree(e,t){t.length=0,Bn(e,!0,i=>{i instanceof Ee&&t.push(i)})}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}extractViewportColumns(){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)}getVirtualHeaderGroupRow(e,t){let i;switch(e){case"left":i=this.viewportRowLeft[t];break;case"right":i=this.viewportRowRight[t];break;default:i=this.viewportRowCenter[t];break}return q(i)&&(i=[]),i}calculateHeaderRows(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={};const e={};this.headerViewportColumns.forEach(i=>e[i.getId()]=!0);const t=(i,s,n)=>{let o=!1;for(let r=0;r<i.length;r++){const l=i[r];let a=!1;if(l instanceof Ee)a=e[l.getId()]===!0;else{const d=l.getDisplayedChildren();d&&(a=t(d,s,n+1))}a&&(o=!0,s[n]||(s[n]=[]),s[n].push(l))}return o};t(this.displayedTreeLeft,this.viewportRowLeft,0),t(this.displayedTreeRight,this.viewportRowRight,0),t(this.displayedTreeCentre,this.viewportRowCenter,0)}extractViewport(){const e=s=>`${s.getId()}-${s.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.viewportColumns.map(e).join("#"),i=this.viewportColumnsHash!==t;return i&&(this.viewportColumnsHash=t,this.calculateHeaderRows()),i}refreshFlexedColumns(e={}){var t;const i=e.source?e.source:"flex";if(e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];let s=-1;if(e.resizingCols){const p=new Set(e.resizingCols);let C=this.displayedColumnsCenter;for(let v=C.length-1;v>=0;v--)if(p.has(C[v])){s=v;break}}let n=0,o=[],r=0,l=0;for(let p=0;p<this.displayedColumnsCenter.length;p++)this.displayedColumnsCenter[p].getFlex()&&p>s?(o.push(this.displayedColumnsCenter[p]),l+=this.displayedColumnsCenter[p].getFlex(),r+=(t=this.displayedColumnsCenter[p].getMinWidth())!=null?t:0):n+=this.displayedColumnsCenter[p].getActualWidth();if(!o.length)return[];let a=[];n+r>this.flexViewportWidth&&(o.forEach(p=>{var C;return p.setActualWidth((C=p.getMinWidth())!=null?C:0,i)}),a=o,o=[]);const u=[];let d;e:for(;;){d=this.flexViewportWidth-n;const p=d/l;for(let C=0;C<o.length;C++){const v=o[C],y=p*v.getFlex();let R=0;const w=v.getMinWidth(),m=v.getMaxWidth();if(b(w)&&y<w?R=w:b(m)&&y>m&&(R=m),R){v.setActualWidth(R,i),Wf(o,v),l-=v.getFlex(),a.push(v),n+=v.getActualWidth();continue e}u[C]=Math.round(y)}break}let h=d;return o.forEach((p,C)=>{p.setActualWidth(Math.min(u[C],h),i),a.push(p),h-=u[C]}),e.skipSetLeft||this.setLeftValues(i),e.updateBodyWidths&&this.updateBodyWidths(),e.fireResizedEvent&&this.dispatchColumnResizedEvent(a,!0,i,o),o}sizeColumnsToFit(e,t="sizeColumnsToFit",i,s){var n,o,r,l,a;if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push(()=>this.sizeColumnsToFit(e,t,i,s));return}const u={};s&&((n=s==null?void 0:s.columnLimits)==null||n.forEach(w=>{var m=w,{key:E}=m,T=eA(m,["key"]);u[typeof E=="string"?E:E.getColId()]=T}));const d=this.getAllDisplayedColumns(),h=e===this.getWidthOfColsInList(d);if(e<=0||!d.length||h)return;const p=[],C=[];d.forEach(w=>{w.getColDef().suppressSizeToFit===!0?C.push(w):p.push(w)});const v=p.slice(0);let y=!1;const R=w=>{Qt(p,w),C.push(w)};for(p.forEach(w=>{var m,E;w.resetActualWidth(t);const T=u==null?void 0:u[w.getId()],P=(m=T==null?void 0:T.minWidth)!=null?m:s==null?void 0:s.defaultMinWidth,A=(E=T==null?void 0:T.maxWidth)!=null?E:s==null?void 0:s.defaultMaxWidth,F=w.getActualWidth();typeof P=="number"&&F<P?w.setActualWidth(P,t,!0):typeof A=="number"&&F>A&&w.setActualWidth(A,t,!0)});!y;){y=!0;const w=e-this.getWidthOfColsInList(C);if(w<=0)p.forEach(m=>{var E,T;const P=(T=(E=u==null?void 0:u[m.getId()])==null?void 0:E.minWidth)!=null?T:s==null?void 0:s.defaultMinWidth;if(typeof P=="number"){m.setActualWidth(P,t,!0);return}m.setMinimum(t)});else{const m=w/this.getWidthOfColsInList(p);let E=w;for(let T=p.length-1;T>=0;T--){const P=p[T],A=u==null?void 0:u[P.getId()],F=(o=A==null?void 0:A.minWidth)!=null?o:s==null?void 0:s.defaultMinWidth,I=(r=A==null?void 0:A.maxWidth)!=null?r:s==null?void 0:s.defaultMaxWidth,x=(l=P.getMinWidth())!=null?l:0,k=(a=P.getMaxWidth())!=null?a:Number.MAX_VALUE,U=typeof F=="number"&&F>x?F:P.getMinWidth(),ee=typeof I=="number"&&I<k?I:P.getMaxWidth();let Y=Math.round(P.getActualWidth()*m);b(U)&&Y<U?(Y=U,R(P),y=!1):b(ee)&&Y>ee?(Y=ee,R(P),y=!1):T===0&&(Y=E),P.setActualWidth(Y,t,!0),E-=Y}}}v.forEach(w=>{w.fireColumnWidthChangedEvent(t)}),this.setLeftValues(t),this.updateBodyWidths(),!i&&this.dispatchColumnResizedEvent(v,!0,t)}buildDisplayedTrees(e){const t=[],i=[],s=[];e.forEach(o=>{switch(o.getPinned()){case"left":t.push(o);break;case"right":i.push(o);break;default:s.push(o);break}});const n=new CE;this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(t,n,"left",this.displayedTreeLeft),this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(i,n,"right",this.displayedTreeRight),this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(s,n,null,this.displayedTreeCentre),this.updateDisplayedMap()}updateDisplayedMap(){this.displayedColumnsAndGroupsMap={};const e=t=>{this.displayedColumnsAndGroupsMap[t.getUniqueId()]=t};Bn(this.displayedTreeCentre,!1,e),Bn(this.displayedTreeLeft,!1,e),Bn(this.displayedTreeRight,!1,e)}isDisplayed(e){return this.displayedColumnsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){const e=this.getAllDisplayedTrees();Bn(e,!1,t=>{t instanceof at&&t.calculateDisplayedColumns()})}getGroupAutoColumns(){return this.groupAutoColumns}createGroupAutoColumnsIfNeeded(){const e=this.forceRecreateAutoGroups;if(this.forceRecreateAutoGroups=!1,!this.autoGroupsNeedBuilding)return!1;this.autoGroupsNeedBuilding=!1;const t=this.gos.isGroupUseEntireRow(this.pivotMode),i=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isGroupSuppressAutoColumn();if((this.rowGroupColumns.length>0||this.gos.get("treeData"))&&!i&&!t){const o=this.autoGroupColService.createAutoGroupColumns(this.rowGroupColumns);if(!this.autoColsEqual(o,this.groupAutoColumns)||e)return this.groupAutoColumns=o,!0}else this.groupAutoColumns=null;return!1}isGroupSuppressAutoColumn(){return this.gos.get("groupDisplayType")==="custom"?!0:this.gos.get("treeDataDisplayType")==="custom"}autoColsEqual(e,t){return gs(e,t,(i,s)=>i.getColId()===s.getColId())}getWidthOfColsInList(e){return e.reduce((t,i)=>t+i.getActualWidth(),0)}getFirstDisplayedColumn(){const e=this.gos.get("enableRtl"),t=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];e&&t.reverse();for(let i=0;i<t.length;i++){const s=this[t[i]]();if(s.length)return e?de(s):s[0]}return null}setColumnHeaderHeight(e,t){if(e.setAutoHeaderHeight(t)){const s={type:g.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,column:e,columns:[e],source:"autosizeColumnHeaderHeight"};this.eventService.dispatchEvent(s)}}getColumnGroupHeaderRowHeight(){return this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight()}getColumnHeaderRowHeight(){const e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),t=this.getAllDisplayedColumns().filter(i=>i.isAutoHeaderHeight()).map(i=>i.getAutoHeaderHeight()||0);return Math.max(e,...t)}getHeaderHeight(){var e;return(e=this.gos.get("headerHeight"))!=null?e:this.environment.getFromTheme(25,"headerHeight")}getFloatingFiltersHeight(){var e;return(e=this.gos.get("floatingFiltersHeight"))!=null?e:this.getHeaderHeight()}getGroupHeaderHeight(){var e;return(e=this.gos.get("groupHeaderHeight"))!=null?e:this.getHeaderHeight()}getPivotHeaderHeight(){var e;return(e=this.gos.get("pivotHeaderHeight"))!=null?e:this.getHeaderHeight()}getPivotGroupHeaderHeight(){var e;return(e=this.gos.get("pivotGroupHeaderHeight"))!=null?e:this.getGroupHeaderHeight()}queueResizeOperations(){this.shouldQueueResizeOperations=!0}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}resetColumnDefIntoColumn(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const s=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(s,i,t),!0}isColumnGroupingLocked(e){const t=this.gos.get("groupLockGroupColumns");if(!e.isRowGroupActive()||t===0)return!1;if(t===-1)return!0;const i=this.rowGroupColumns.findIndex(s=>s.getColId()===e.getColId());return t>i}generateColumnStateForRowGroupAndPivotIndexes(e,t){let i={};const s=(n,o,r,l,a,u)=>{if(!o.length||!this.primaryColumns)return[];const d=Object.keys(n),h=new Set(d),p=new Set(d),C=new Set(o.map(P=>{const A=P.getColId();return p.delete(A),A}).concat(d)),v=[],y={};let R=0;for(let P=0;P<this.primaryColumns.length;P++){const A=this.primaryColumns[P].getColId();C.has(A)&&(v.push(A),y[A]=R++)}let w=1e3,m=!1,E=0;const T=P=>{const A=y[P];for(let F=E;F<A;F++){const I=v[F];p.has(I)&&(n[I][a]=w++,p.delete(I))}E=A};o.forEach(P=>{const A=P.getColId();if(h.has(A))T(A),n[A][a]=w++;else{const F=P.getColDef();(F[a]===null||F[a]===void 0&&F[u]==null)&&(m||(F[r]||F[r]===void 0&&F[l]?T(A):(p.forEach(k=>{n[k][a]=w+y[k]}),w+=v.length,m=!0)),i[A]||(i[A]={colId:A}),i[A][a]=w++)}})};return s(e,this.rowGroupColumns,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),s(t,this.pivotColumns,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i)}onColumnsReady(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){const{columnLimits:i,defaultMinWidth:s,defaultMaxWidth:n}=e,o=i==null?void 0:i.map(({colId:r,minWidth:l,maxWidth:a})=>({key:r,minWidth:l,maxWidth:a}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:s,defaultMaxWidth:n,columnLimits:o})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if((e==null?void 0:e.type)!=="fitCellContents")return;const{colIds:t,skipHeader:i}=e;setTimeout(()=>{t?this.autoSizeColumns({columns:t,skipHeader:i,source:"autosizeColumns"}):this.autoSizeAllColumns("autosizeColumns",i)})}};c([f("expressionService")],ft.prototype,"expressionService",2);c([f("columnFactory")],ft.prototype,"columnFactory",2);c([f("displayedGroupCreator")],ft.prototype,"displayedGroupCreator",2);c([f("ctrlsService")],ft.prototype,"ctrlsService",2);c([f("autoWidthCalculator")],ft.prototype,"autoWidthCalculator",2);c([f("columnAnimationService")],ft.prototype,"columnAnimationService",2);c([f("autoGroupColService")],ft.prototype,"autoGroupColService",2);c([f("valueCache")],ft.prototype,"valueCache",2);c([f("animationFrameService")],ft.prototype,"animationFrameService",2);c([f("sortController")],ft.prototype,"sortController",2);c([f("columnDefFactory")],ft.prototype,"columnDefFactory",2);c([fe("aggFuncService")],ft.prototype,"aggFuncService",2);c([M],ft.prototype,"init",1);c([Bt],ft.prototype,"destroyColumns",1);c([Qi(0,Li("loggerFactory"))],ft.prototype,"setBeans",1);ft=c([H("columnModel")],ft);function lr(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function Bn(e,t,i){if(e)for(let s=0;s<e.length;s++){const n=e[s];if(n instanceof at){const o=t?n.getDisplayedChildren():n.getChildren();Bn(o,t,i)}i(n)}}var dg=class extends L{createDisplayedGroups(e,t,i,s){const n=this.mapOldGroupsById(s),o=[];let r=e;for(;r.length;){const l=r;r=[];let a=0;const u=d=>{const h=a;a=d;const p=l[h],v=(p instanceof at?p.getProvidedColumnGroup():p).getOriginalParent();if(v==null){for(let R=h;R<d;R++)o.push(l[R]);return}const y=this.createColumnGroup(v,t,n,i);for(let R=h;R<d;R++)y.addChild(l[R]);r.push(y)};for(let d=1;d<l.length;d++){const h=l[d],C=(h instanceof at?h.getProvidedColumnGroup():h).getOriginalParent(),v=l[a],R=(v instanceof at?v.getProvidedColumnGroup():v).getOriginalParent();C!==R&&u(d)}a<l.length&&u(l.length)}return this.setupParentsIntoColumns(o,null),o}createColumnGroup(e,t,i,s){const n=e.getGroupId(),o=t.getInstanceIdForKey(n),r=at.createUniqueId(n,o);let l=i[r];return l&&l.getProvidedColumnGroup()!==e&&(l=null),b(l)?l.reset():(l=new at(e,n,o,s),this.context.createBean(l)),l}mapOldGroupsById(e){const t={},i=s=>{s.forEach(n=>{if(n instanceof at){const o=n;t[n.getUniqueId()]=o,i(o.getChildren())}})};return e&&i(e),t}setupParentsIntoColumns(e,t){e.forEach(i=>{if(i.setParent(t),i instanceof at){const s=i;this.setupParentsIntoColumns(s.getChildren(),s)}})}};dg=c([H("displayedGroupCreator")],dg);var SA={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},it=class{};it.STRING_PROPERTIES=["rowSelection","overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"];it.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"];it.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"];it.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"];it.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","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval"];it.OTHER_PROPERTIES=["suppressStickyTotalRow"];it.FUNCTIONAL_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher"];it.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","groupTotalRow"];it.FUNCTION_PROPERTIES=[...it.FUNCTIONAL_PROPERTIES,...it.CALLBACK_PROPERTIES];it.ALL_PROPERTIES=[...it.ARRAY_PROPERTIES,...it.OBJECT_PROPERTIES,...it.STRING_PROPERTIES,...it.NUMBER_PROPERTIES,...it.FUNCTION_PROPERTIES,...it.BOOLEAN_PROPERTIES,...it.OTHER_PROPERTIES];var ca=it,yt=class $u{static getCallbackForEvent(t){return!t||t.length<2?t:"on"+t[0].toUpperCase()+t.substring(1)}static getGridOptionKeys(){return this.ALL_PROPERTIES_AND_CALLBACKS}static combineAttributesAndGridOptions(t,i){typeof t!="object"&&(t={});const s=$({},t);return $u.getGridOptionKeys().forEach(o=>{const r=i[o];typeof r<"u"&&r!==$u.VUE_OMITTED_PROPERTY&&(s[o]=r)}),s}static processOnChange(t,i,s){if(!t)return;const n={};let o=!1;if(Object.keys(t).filter(l=>$u.ALL_PROPERTIES_AND_CALLBACKS_SET.has(l)).forEach(l=>{n[l]=t[l],o=!0}),!o)return;i.__internalUpdateGridOptions(n,!0);const r={type:g.EVENT_COMPONENT_STATE_CHANGED};Ft(n,(l,a)=>{r[l]=a}),i.dispatchEvent(r)}};yt.EVENTS=so(g);yt.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY";yt.EXCLUDED_INTERNAL_EVENTS=[g.EVENT_SCROLLBAR_WIDTH_CHANGED,g.EVENT_CHECKBOX_CHANGED,g.EVENT_HEIGHT_SCALE_CHANGED,g.EVENT_BODY_HEIGHT_CHANGED,g.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,g.EVENT_SCROLL_VISIBILITY_CHANGED,g.EVENT_COLUMN_HOVER_CHANGED,g.EVENT_FLASH_CELLS,g.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,g.EVENT_DISPLAYED_ROWS_CHANGED,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,g.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,g.EVENT_STORE_UPDATED,g.EVENT_COLUMN_PANEL_ITEM_DRAG_START,g.EVENT_COLUMN_PANEL_ITEM_DRAG_END,g.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,g.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,g.EVENT_FULL_WIDTH_ROW_FOCUSED,g.EVENT_HEADER_HEIGHT_CHANGED,g.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,g.EVENT_CELL_FOCUS_CLEARED,g.EVENT_GRID_STYLES_CHANGED,g.EVENT_FILTER_DESTROYED,g.EVENT_ROW_DATA_UPDATE_STARTED,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,g.EVENT_DATA_TYPES_INFERRED,g.EVENT_FIELD_VALUE_CHANGED,g.EVENT_FIELD_PICKER_VALUE_SELECTED,g.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,g.EVENT_SUPPRESS_MENU_HIDE_CHANGED,g.EVENT_SUPPRESS_FIELD_DOT_NOTATION,g.EVENT_ROW_COUNT_READY,g.EVENT_SIDE_BAR_UPDATED];yt.PUBLIC_EVENTS=yt.EVENTS.filter(e=>!vi(yt.EXCLUDED_INTERNAL_EVENTS,e));yt.EVENT_CALLBACKS=yt.EVENTS.map(e=>yt.getCallbackForEvent(e));yt.BOOLEAN_PROPERTIES=ca.BOOLEAN_PROPERTIES;yt.ALL_PROPERTIES=ca.ALL_PROPERTIES;yt.ALL_PROPERTIES_AND_CALLBACKS=[...yt.ALL_PROPERTIES,...yt.EVENT_CALLBACKS];yt.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(yt.ALL_PROPERTIES_AND_CALLBACKS);var kd=yt,cg=class extends L{constructor(){super(...arguments),this.componentsMappedByName={}}setupComponents(e){e&&e.forEach(t=>this.addComponent(t))}addComponent(e){const i=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().toUpperCase();this.componentsMappedByName[i]=e.componentClass}getComponentClass(e){return this.componentsMappedByName[e]}};cg=c([H("agStackComponentsRegistry")],cg);var EE={};mt(EE,{getAriaCheckboxStateName:()=>Ic,getAriaLabel:()=>PE,getAriaLevel:()=>EA,getAriaPosInSet:()=>DE,getAriaSortState:()=>TE,removeAriaExpanded:()=>LE,removeAriaSort:()=>OE,setAriaActiveDescendant:()=>jf,setAriaAtomic:()=>FE,setAriaChecked:()=>TA,setAriaColCount:()=>xE,setAriaColIndex:()=>Qf,setAriaColSpan:()=>NE,setAriaControls:()=>qf,setAriaDescribedBy:()=>RA,setAriaDisabled:()=>Kf,setAriaExpanded:()=>Gs,setAriaHidden:()=>Wa,setAriaLabel:()=>yi,setAriaLabelledBy:()=>Fr,setAriaLevel:()=>bE,setAriaLive:()=>$f,setAriaMultiSelectable:()=>ME,setAriaPosInSet:()=>Mc,setAriaRelevant:()=>AE,setAriaRole:()=>He,setAriaRowCount:()=>IE,setAriaRowIndex:()=>Yf,setAriaSelected:()=>Ar,setAriaSetSize:()=>Lc,setAriaSort:()=>_E});function Vi(e,t,i){i==null||typeof i=="string"&&i==""?zf(e,t):Hi(e,t,i)}function Hi(e,t,i){e.setAttribute(RE(t),i.toString())}function zf(e,t){e.removeAttribute(RE(t))}function RE(e){return`aria-${e}`}function He(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function TE(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function EA(e){return parseInt(e.getAttribute("aria-level"),10)}function DE(e){return parseInt(e.getAttribute("aria-posinset"),10)}function PE(e){return e.getAttribute("aria-label")}function yi(e,t){Vi(e,"label",t)}function Fr(e,t){Vi(e,"labelledby",t)}function RA(e,t){Vi(e,"describedby",t)}function $f(e,t){Vi(e,"live",t)}function FE(e,t){Vi(e,"atomic",t)}function AE(e,t){Vi(e,"relevant",t)}function bE(e,t){Vi(e,"level",t)}function Kf(e,t){Vi(e,"disabled",t)}function Wa(e,t){Vi(e,"hidden",t)}function jf(e,t){Vi(e,"activedescendant",t)}function Gs(e,t){Hi(e,"expanded",t)}function LE(e){zf(e,"expanded")}function Lc(e,t){Hi(e,"setsize",t)}function Mc(e,t){Hi(e,"posinset",t)}function ME(e,t){Hi(e,"multiselectable",t)}function IE(e,t){Hi(e,"rowcount",t)}function Yf(e,t){Hi(e,"rowindex",t)}function xE(e,t){Hi(e,"colcount",t)}function Qf(e,t){Hi(e,"colindex",t)}function NE(e,t){Hi(e,"colspan",t)}function _E(e,t){Hi(e,"sort",t)}function OE(e){zf(e,"sort")}function Ar(e,t){Vi(e,"selected",t)}function TA(e,t){Hi(e,"checked",t===void 0?"mixed":t)}function qf(e,t){Vi(e,"controls",t.id),Fr(t,e.id)}function Ic(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var GE={};mt(GE,{browserSupportsPreventScroll:()=>em,getBodyHeight:()=>HE,getBodyWidth:()=>VE,getMaxDivHeight:()=>kE,getSafariVersion:()=>Xf,getScrollbarWidth:()=>BE,getTabIndex:()=>Vd,isBrowserChrome:()=>xc,isBrowserFirefox:()=>Zf,isBrowserSafari:()=>ws,isIOSUserAgent:()=>Us,isInvisibleScrollbar:()=>tm,isMacOsUserAgent:()=>Jf});var Bh,Du,Wh,Uh,zh,$h,hg,pg;function ws(){return Bh===void 0&&(Bh=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Bh}function Xf(){if(Du===void 0)if(ws()){const e=navigator.userAgent.match(/version\/(\d+)/i);e&&(Du=e[1]!=null?parseFloat(e[1]):0)}else Du=0;return Du}function xc(){if(Wh===void 0){const e=window;Wh=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return Wh}function Zf(){return Uh===void 0&&(Uh=/(firefox)/i.test(navigator.userAgent)),Uh}function Jf(){return zh===void 0&&(zh=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),zh}function Us(){return $h===void 0&&($h=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),$h}function em(){return!ws()||Xf()>=15}function Vd(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return t===-1&&(i===null||i===""&&!Zf())?null:t.toString()}function kE(){if(!document.body)return-1;let e=1e6;const t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){const s=e*2;if(i.style.height=s+"px",s>t||i.clientHeight!==s)break;e=s}return document.body.removeChild(i),e}function VE(){var e,t,i;return(i=(e=document.body)==null?void 0:e.clientWidth)!=null?i:window.innerHeight||((t=document.documentElement)==null?void 0:t.clientWidth)||-1}function HE(){var e,t,i;return(i=(e=document.body)==null?void 0:e.clientHeight)!=null?i:window.innerHeight||((t=document.documentElement)==null?void 0:t.clientHeight)||-1}function BE(){return pg==null&&WE(),pg}function WE(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let i=t.offsetWidth-t.clientWidth;i===0&&t.clientWidth===0&&(i=null),t.parentNode&&t.parentNode.removeChild(t),i!=null&&(pg=i,hg=i===0)}function tm(){return hg==null&&WE(),hg}var UE={};mt(UE,{dateToFormattedString:()=>Cr,parseDateTimeFromString:()=>Jt,serialiseDate:()=>xi});var zE={};mt(zE,{cleanNumber:()=>DA,createArrayOfNumbers:()=>$E,decToHex:()=>PA,formatNumberCommas:()=>im,formatNumberTwoDecimalPlacesAndCommas:()=>FA,padStartWidthZeros:()=>mr,sum:()=>AA});function mr(e,t){return e.toString().padStart(t,"0")}function $E(e,t){const i=[];for(let s=e;s<=t;s++)i.push(s);return i}function DA(e){return typeof e=="string"&&(e=parseInt(e,10)),typeof e=="number"?Math.floor(e):null}function PA(e,t){let i="";for(let s=0;s<t;s++)i+=String.fromCharCode(e&255),e>>>=8;return i}function FA(e,t,i){return typeof e!="number"?"":im(Math.round(e*100)/100,t,i)}function im(e,t,i){return typeof e!="number"?"":e.toString().replace(".",i).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${t}`)}function AA(e){return e==null?null:e.reduce((t,i)=>t+i,0)}function xi(e,t=!0,i="-"){if(!e)return null;let s=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(n=>mr(n,2)).join(i);return t&&(s+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(n=>mr(n,2)).join(":")),s}var Kh=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 Cr(e,t="YYYY-MM-DD"){const i=mr(e.getFullYear(),4),s=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o={YYYY:()=>i.slice(i.length-4,i.length),YY:()=>i.slice(i.length-2,i.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>s[e.getMonth()],MMM:()=>s[e.getMonth()].slice(0,3),MM:()=>mr(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${Kh(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${Kh(e.getDate())}`,DD:()=>mr(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>n[e.getDay()],ddd:()=>n[e.getDay()].slice(0,3),dd:()=>n[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${Kh(e.getDay())}`,d:()=>`${e.getDay()}`},r=new RegExp(Object.keys(o).join("|"),"g");return t.replace(r,l=>l in o?o[l]():l)}function Jt(e){if(!e)return null;const[t,i]=e.split(" ");if(!t)return null;const s=t.split("-").map(h=>parseInt(h,10));if(s.filter(h=>!isNaN(h)).length!==3)return null;const[n,o,r]=s,l=new Date(n,o-1,r);if(l.getFullYear()!==n||l.getMonth()!==o-1||l.getDate()!==r)return null;if(!i||i==="00:00:00")return l;const[a,u,d]=i.split(":").map(h=>parseInt(h,10));return a>=0&&a<24&&l.setHours(a),u>=0&&u<60&&l.setMinutes(u),d>=0&&d<60&&l.setSeconds(d),l}var KE={};mt(KE,{FOCUSABLE_EXCLUDE:()=>sm,FOCUSABLE_SELECTOR:()=>jE,addOrRemoveAttribute:()=>vs,addStylesToElement:()=>dm,bindCellRendererToHtmlElement:()=>hm,clearElement:()=>je,copyNodeList:()=>ZE,ensureDomOrder:()=>am,formatSize:()=>Nc,getAbsoluteHeight:()=>om,getAbsoluteWidth:()=>ha,getElementRectWithOffset:()=>rm,getElementSize:()=>bn,getInnerHeight:()=>Ua,getInnerWidth:()=>bo,getScrollLeft:()=>ga,insertWithDomOrder:()=>QE,isElementChildOfClass:()=>no,isFocusableFormField:()=>nm,isHorizontalScrollShowing:()=>qE,isInDOM:()=>lm,isNodeOrElement:()=>za,isRtlNegativeScroll:()=>pa,isVerticalScrollShowing:()=>XE,isVisible:()=>oi,iterateNamedNodeMap:()=>JE,loadTemplate:()=>ei,nodeListForEach:()=>cm,radioCssClass:()=>gg,removeFromParent:()=>qi,setDisabled:()=>br,setDisplayed:()=>le,setDomChildOrder:()=>um,setElementHeight:()=>bA,setElementWidth:()=>ma,setFixedHeight:()=>oo,setFixedWidth:()=>Ni,setScrollLeft:()=>fa,setVisible:()=>YE});var Pu;function gg(e,t,i){const s=e.parentElement;let n=s&&s.firstChild;for(;n;)t&&n.classList.toggle(t,n===e),i&&n.classList.toggle(i,n!==e),n=n.nextSibling}var jE="[tabindex], input, select, button, textarea, [href]",sm="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function nm(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,s=t.call(e,"input, select, button, textarea"),n=t.call(e,sm),o=oi(e);return s&&!n&&o}function le(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||Wa(e,!t)}function YE(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-invisible",!t),s||Wa(e,!t)}function br(e,t){const i="disabled",s=t?n=>n.setAttribute(i,""):n=>n.removeAttribute(i);s(e),cm(e.querySelectorAll("input"),n=>s(n))}function no(e,t,i){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof i=="number"){if(++s>i)break}else if(e===i)break}return!1}function bn(e){const{height:t,width:i,borderTopWidth:s,borderRightWidth:n,borderBottomWidth:o,borderLeftWidth:r,paddingTop:l,paddingRight:a,paddingBottom:u,paddingLeft:d,marginTop:h,marginRight:p,marginBottom:C,marginLeft:v,boxSizing:y}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(n||"0"),borderBottomWidth:parseFloat(o||"0"),borderLeftWidth:parseFloat(r||"0"),paddingTop:parseFloat(l||"0"),paddingRight:parseFloat(a||"0"),paddingBottom:parseFloat(u||"0"),paddingLeft:parseFloat(d||"0"),marginTop:parseFloat(h||"0"),marginRight:parseFloat(p||"0"),marginBottom:parseFloat(C||"0"),marginLeft:parseFloat(v||"0"),boxSizing:y}}function Ua(e){const t=bn(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function bo(e){const t=bn(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function om(e){const t=bn(e),i=t.marginBottom+t.marginTop;return Math.ceil(e.offsetHeight+i)}function ha(e){const t=bn(e),i=t.marginLeft+t.marginRight;return Math.ceil(e.offsetWidth+i)}function rm(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:n,borderBottomWidth:o}=bn(e);return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(n||0),bottom:t.bottom+(o||0)}}function pa(){if(typeof Pu=="boolean")return Pu;const e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML=`<div style="width: 2px">
|
|
48
|
+
<span style="display: inline-block; width: 1px"></span>
|
|
49
|
+
<span style="display: inline-block; width: 1px"></span>
|
|
50
|
+
</div>`,document.body.appendChild(e),e.scrollLeft=1,Pu=Math.floor(e.scrollLeft)===0,document.body.removeChild(e),Pu}function ga(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i),xc()&&!pa()&&(i=e.scrollWidth-e.clientWidth-i)),i}function fa(e,t,i){i&&(pa()?t*=-1:(ws()||xc())&&(t=e.scrollWidth-e.clientWidth-t)),e.scrollLeft=t}function je(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function qi(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function lm(e){return!!e.offsetParent}function oi(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!lm(e)||window.getComputedStyle(e).visibility!=="visible")}function ei(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function am(e,t,i){i&&i.nextSibling===t||(i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t))}function um(e,t){for(let i=0;i<t.length;i++){const s=t[i],n=e.children[i];n!==s&&e.insertBefore(s,n)}}function QE(e,t,i){i?i.insertAdjacentElement("afterend",t):e.firstChild?e.insertAdjacentElement("afterbegin",t):e.appendChild(t)}function dm(e,t){if(t)for(const[i,s]of Object.entries(t)){if(!i||!i.length||s==null)continue;const n=yE(i),o=s.toString(),r=o.replace(/\s*!important/g,""),l=r.length!=o.length?"important":void 0;e.style.setProperty(n,r,l)}}function qE(e){return e.clientWidth<e.scrollWidth}function XE(e){return e.clientHeight<e.scrollHeight}function ma(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Ni(e,t)}function Ni(e,t){t=Nc(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function bA(e,t){t==="flex"?(e.style.removeProperty("height"),e.style.removeProperty("minHeight"),e.style.removeProperty("maxHeight"),e.style.flex="1 1 auto"):oo(e,t)}function oo(e,t){t=Nc(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function Nc(e){return typeof e=="number"?`${e}px`:e}function za(e){return e instanceof Node||e instanceof HTMLElement}function ZE(e){if(e==null)return[];const t=[];return cm(e,i=>t.push(i)),t}function JE(e,t){if(e)for(let i=0;i<e.length;i++){const s=e[i];t(s.name,s.value)}}function vs(e,t,i){i==null?e.removeAttribute(t):e.setAttribute(t,i.toString())}function cm(e,t){if(e!=null)for(let i=0;i<e.length;i++)t(e[i])}function hm(e,t){e.then(i=>{const s=i.getGui();s!=null&&(typeof s=="object"?t.appendChild(s):t.innerHTML=s)})}var eR={};mt(eR,{fuzzyCheckStrings:()=>tR,fuzzySuggestions:()=>$a});function tR(e,t,i){const s={},n=e.filter(o=>!t.some(r=>r===o));return n.length>0&&n.forEach(o=>s[o]=$a(o,i).values),s}function $a(e,t,i,s){let n=t.map((l,a)=>({value:l,relevance:LA(e.toLowerCase(),l.toLocaleLowerCase()),idx:a}));if(n.sort((l,a)=>a.relevance-l.relevance),i&&(n=n.filter(l=>l.relevance!==0)),n.length>0&&s&&s>0){const a=n[0].relevance*s;n=n.filter(u=>a-u.relevance<0)}const o=[],r=[];for(const l of n)o.push(l.value),r.push(l.idx);return{values:o,indices:r}}function LA(e,t){const i=e.replace(/\s/g,""),s=t.replace(/\s/g,"");let n=0,o=-1;for(let r=0;r<i.length;r++){const l=s.indexOf(i[r],o+1);l!==-1&&(o=l,n+=100-o*100/1e4*100)}return n}var iR={};mt(iR,{createIcon:()=>Di,createIconNoSpan:()=>Oe,iconNameClassMap:()=>sR});var sR={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 Di(e,t,i){const s=Oe(e,t,i);if(s){const{className:o}=s;if(typeof o=="string"&&o.indexOf("ag-icon")>-1||typeof o=="object"&&o["ag-icon"])return s}const n=document.createElement("span");return n.appendChild(s),n}function Oe(e,t,i,s){let n=null;const o=i&&i.getColDef().icons;if(o&&(n=o[e]),t&&!n){const r=t.get("icons");r&&(n=r[e])}if(n){let r;if(typeof n=="function")r=n();else if(typeof n=="string")r=n;else throw new Error("icon from grid options needs to be a string or a function");if(typeof r=="string")return ei(r);if(za(r))return r;console.warn("AG Grid: iconRenderer should return back a string or a dom object")}else{const r=document.createElement("span");let l=sR[e];return l||(s?l=e:(console.warn(`AG Grid: Did not find icon ${e}`),l="")),r.setAttribute("class",`ag-icon ag-icon-${l}`),r.setAttribute("unselectable","on"),He(r,"presentation"),r}}var nR={};mt(nR,{isDeleteKey:()=>lR,isEventFromPrintableCharacter:()=>_c,isUserSuppressingHeaderKeyboardEvent:()=>oR,isUserSuppressingKeyboardEvent:()=>Hd,normaliseQwertyAzerty:()=>rR});var D=class{};D.BACKSPACE="Backspace";D.TAB="Tab";D.ENTER="Enter";D.ESCAPE="Escape";D.SPACE=" ";D.LEFT="ArrowLeft";D.UP="ArrowUp";D.RIGHT="ArrowRight";D.DOWN="ArrowDown";D.DELETE="Delete";D.F2="F2";D.PAGE_UP="PageUp";D.PAGE_DOWN="PageDown";D.PAGE_HOME="Home";D.PAGE_END="End";D.A="KeyA";D.C="KeyC";D.D="KeyD";D.V="KeyV";D.X="KeyX";D.Y="KeyY";D.Z="KeyZ";var MA=65,IA=67,xA=86,NA=68,_A=90,OA=89;function _c(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key.length===1}function Hd(e,t,i,s,n){const o=s?s.getColDef().suppressKeyboardEvent:void 0;if(!o)return!1;const r=e.addGridCommonParams({event:t,editing:n,column:s,node:i,data:i.data,colDef:s.getColDef()});return!!(o&&o(r))}function oR(e,t,i,s){const n=s.getDefinition(),o=n&&n.suppressHeaderKeyboardEvent;if(!b(o))return!1;const r=e.addGridCommonParams({colDef:n,column:s,headerRowIndex:i,event:t});return!!o(r)}function rR(e){const{keyCode:t}=e;let i;switch(t){case MA:i=D.A;break;case IA:i=D.C;break;case xA:i=D.V;break;case NA:i=D.D;break;case _A:i=D.Z;break;case OA:i=D.Y;break;default:i=e.code}return i}function lR(e,t=!1){return e===D.DELETE?!0:!t&&e===D.BACKSPACE?Jf():!1}var aR={};mt(aR,{areEventsNear:()=>pm});function pm(e,t,i){if(i===0)return!1;const s=Math.abs(e.clientX-t.clientX),n=Math.abs(e.clientY-t.clientY);return Math.max(s,n)<=i}var uR={};mt(uR,{sortRowNodesByOrder:()=>GA});function GA(e,t){if(!e)return!1;const i=(r,l)=>{const a=t[r.id],u=t[l.id],d=a!==void 0,h=u!==void 0,p=d&&h,C=!d&&!h;return p?a-u:C?r.__objectId-l.__objectId:d?1:-1};let s,n,o=!1;for(let r=0;r<e.length-1;r++)if(s=e[r],n=e[r+1],i(s,n)>0){o=!0;break}return o?(e.sort(i),!0):!1}var dR={};mt(dR,{convertToSet:()=>gm});function gm(e){const t=new Set;return e.forEach(i=>t.add(i)),t}var kA=$($($($($($($($($($($($($($($($($($({},EE),rE),GE),UE),KE),oE),XS),eR),YS),iR),nR),SE),aR),zE),QS),uR),dR),vE),Q=kA,Lr=class{constructor(e=0,t=1){this.nextValue=e,this.step=t}next(){const e=this.nextValue;return this.nextValue+=this.step,e}peek(){return this.nextValue}skip(e){this.nextValue+=e}},Ze=class Ku{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(i=>this.onDone(i),i=>this.onReject(i))}static all(t){return new Ku(i=>{let s=t.length;const n=new Array(s);t.forEach((o,r)=>{o.then(l=>{n[r]=l,s--,s===0&&i(n)})})})}static resolve(t=null){return new Ku(i=>i(t))}then(t){return new Ku(i=>{this.status===1?i(t(this.resolution)):this.waiters.push(s=>i(t(s)))})}resolveNow(t,i){return this.status===1?i(this.resolution):t}onDone(t){this.status=1,this.resolution=t,this.waiters.forEach(i=>i(t))}onReject(t){console.warn("TBI")}},Ka=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){const t=(e||"").split(" ");if(t.length>1){t.forEach(s=>this.addCssClass(s));return}if(this.cssClassStates[e]!==!0&&e.length){const s=this.getGui();s&&s.classList.add(e),this.cssClassStates[e]=!0}}removeCssClass(e){const t=(e||"").split(" ");if(t.length>1){t.forEach(s=>this.removeCssClass(s));return}if(this.cssClassStates[e]!==!1&&e.length){const s=this.getGui();s&&s.classList.remove(e),this.cssClassStates[e]=!1}}containsCssClass(e){const t=this.getGui();return t?t.classList.contains(e):!1}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){s.forEach(n=>this.addOrRemoveCssClass(n,t));return}}if(this.cssClassStates[e]!==t&&e.length){const s=this.getGui();s&&s.classList.toggle(e,t),this.cssClassStates[e]=t}}},ja=class Wn extends L{constructor(t,i,s,n){super(),this.parentComp=t,this.tooltipShowDelayOverride=i,this.tooltipHideDelayOverride=s,this.shouldDisplayTooltip=n,this.SHOW_QUICK_TOOLTIP_DIFF=1e3,this.FADE_OUT_TOOLTIP_TIMEOUT=1e3,this.INTERACTIVE_HIDE_DELAY=100,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const t=this.parentComp.getGui();this.tooltipTrigger===0&&(this.addManagedListener(t,"mouseenter",this.onMouseEnter.bind(this)),this.addManagedListener(t,"mouseleave",this.onMouseLeave.bind(this))),this.tooltipTrigger===1&&(this.addManagedListener(t,"focusin",this.onFocusIn.bind(this)),this.addManagedListener(t,"focusout",this.onFocusOut.bind(this))),this.addManagedListener(t,"mousemove",this.onMouseMove.bind(this)),this.interactionEnabled||(this.addManagedListener(t,"mousedown",this.onMouseDown.bind(this)),this.addManagedListener(t,"keydown",this.onKeyDown.bind(this)))}getGridOptionsTooltipDelay(t){const i=this.gos.get(t);return i<0&&K(`${t} should not be lower than 0`),Math.max(200,i)}getTooltipDelay(t){var i,s;return t==="show"?(i=this.tooltipShowDelayOverride)!=null?i:this.getGridOptionsTooltipDelay("tooltipShowDelay"):(s=this.tooltipHideDelayOverride)!=null?s:this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const t=this.gos.get("tooltipTrigger");return!t||t==="hover"?0:1}onMouseEnter(t){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Us()&&(Wn.isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(t)},this.INTERACTIVE_HIDE_DELAY):this.prepareToShowTooltip(t))}onMouseMove(t){this.lastMouseEvent&&(this.lastMouseEvent=t),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(t){var i;const s=t.relatedTarget,n=this.parentComp.getGui(),o=(i=this.tooltipComp)==null?void 0:i.getGui();this.isInteractingWithTooltip||n.contains(s)||this.interactionEnabled&&(o!=null&&o.contains(s))||this.setToDoNothing()}onKeyDown(){this.setToDoNothing()}prepareToShowTooltip(t){if(this.state!=0||Wn.isLocked)return;let i=0;t&&(i=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=t||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i),this.state=1}isLastTooltipHiddenRecently(){const t=new Date().getTime(),i=Wn.lastTooltipHideTime;return t-i<this.SHOW_QUICK_TOOLTIP_DIFF}setToDoNothing(){this.state===2&&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}showTooltip(){const t=$({},this.parentComp.getTooltipParams());if(!b(t.value)||this.shouldDisplayTooltip&&!this.shouldDisplayTooltip()){this.setToDoNothing();return}this.state=2,this.tooltipInstanceCount++;const i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.userComponentFactory.getTooltipCompDetails(t).newAgStackInstance().then(i)}hideTooltip(t){if(!t&&this.isInteractingWithTooltip)return;this.tooltipComp&&(this.destroyTooltipComp(),Wn.lastTooltipHideTime=new Date().getTime());const i={type:g.EVENT_TOOLTIP_HIDE,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(i),this.state=0}newTooltipComponentCallback(t,i){if(this.state!==2||this.tooltipInstanceCount!==t){this.getContext().destroyBean(i);return}const n=i.getGui();this.tooltipComp=i,n.classList.contains("ag-tooltip")||n.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&n.classList.add("ag-tooltip-animate"),this.interactionEnabled&&n.classList.add("ag-tooltip-interactive");const o=this.localeService.getLocaleTextFunc(),r=this.popupService.addPopup({eChild:n,ariaLabel:o("ariaLabelTooltip","Tooltip")});r&&(this.tooltipPopupDestroyFunc=r.hideFunc),this.positionTooltip(),this.tooltipTrigger===1&&(this.onBodyScrollEventCallback=this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,this.setToDoNothing.bind(this)),this.onColumnMovedEventCallback=this.addManagedListener(this.eventService,g.EVENT_COLUMN_MOVED,this.setToDoNothing.bind(this))),this.interactionEnabled&&(this.tooltipTrigger===0?(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));const l={type:g.EVENT_TOOLTIP_SHOW,tooltipGui:n,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(l),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isInteractingWithTooltip=!1,this.lockService()}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}onTooltipFocusOut(t){var i;const s=this.parentComp.getGui(),n=(i=this.tooltipComp)==null?void 0:i.getGui(),o=t.relatedTarget;n!=null&&n.contains(o)||(this.isInteractingWithTooltip=!1,s.contains(o)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const t={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent(Me($({},t),{mouseEvent:this.lastMouseEvent})):this.popupService.positionPopupByComponent(Me($({},t),{eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5}))}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const t=this.tooltipPopupDestroyFunc,i=this.tooltipComp,s=this.tooltipTrigger===0?this.FADE_OUT_TOOLTIP_TIMEOUT:0;window.setTimeout(()=>{t(),this.getContext().destroyBean(i)},s),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(t=>{t&&t()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Wn.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},this.INTERACTIVE_HIDE_DELAY)}unlockService(){Wn.isLocked=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};ja.isLocked=!1;c([f("popupService")],ja.prototype,"popupService",2);c([f("userComponentFactory")],ja.prototype,"userComponentFactory",2);c([M],ja.prototype,"postConstruct",1);var VA=ja,zs=class extends L{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshToolTip()}setBrowserTooltip(e){const t="title",i=this.ctrl.getGui();i&&(e!=null&&e!=""?i.setAttribute(t,e):i.removeAttribute(t))}updateTooltipText(){this.tooltip=this.ctrl.getTooltipValue()}createTooltipFeatureIfNeeded(){var e,t,i,s;if(this.tooltipManager!=null)return;const n={getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()};this.tooltipManager=this.createBean(new VA(n,(t=(e=this.ctrl).getTooltipShowDelayOverride)==null?void 0:t.call(e),(s=(i=this.ctrl).getTooltipHideDelayOverride)==null?void 0:s.call(i),this.ctrl.shouldDisplayTooltip),this.beans.context)}refreshToolTip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context))):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}getTooltipParams(){const e=this.ctrl,t=e.getColumn?e.getColumn():void 0,i=e.getColDef?e.getColDef():void 0,s=e.getRowNode?e.getRowNode():void 0;return{location:e.getLocation(),colDef:i,column:t,rowIndex:e.getRowIndex?e.getRowIndex():void 0,node:s,data:s?s.data:void 0,value:this.getTooltipText(),valueFormatted:e.getValueFormatted?e.getValueFormatted():void 0,hideTooltipCallback:()=>{var n;return(n=this.tooltipManager)==null?void 0:n.hideTooltip(!0)}}}getTooltipText(){return this.tooltip}destroy(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),super.destroy()}};c([f("beans")],zs.prototype,"beans",2);c([M],zs.prototype,"postConstruct",1);var HA=new Lr,Ya=class fg extends L{constructor(t){super(),this.displayed=!0,this.visible=!0,this.compId=HA.next(),this.cssClassManager=new Ka(()=>this.eGui),t&&this.setTemplate(t)}preConstructOnComponent(){this.usingBrowserTooltips=this.gos.get("enableBrowserTooltips")}getCompId(){return this.compId}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"}}setTooltip(t){const{newTooltipText:i,showDelayOverride:s,hideDelayOverride:n,location:o,shouldDisplayTooltip:r}=t||{};this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.tooltipText!==i&&(this.tooltipText=i);const l=()=>this.tooltipText;i!=null&&(this.tooltipFeature=this.createBean(new zs({getTooltipValue:l,getGui:()=>this.getGui(),getLocation:()=>o??"UNKNOWN",getColDef:t==null?void 0:t.getColDef,getColumn:t==null?void 0:t.getColumn,getTooltipShowDelayOverride:s!=null?()=>s:void 0,getTooltipHideDelayOverride:n!=null?()=>n:void 0,shouldDisplayTooltip:r})))}createChildComponentsFromTags(t,i){ZE(t.childNodes).forEach(n=>{if(!(n instanceof HTMLElement))return;const o=this.createComponentFromElement(n,r=>{r.getGui()&&this.copyAttributesFromNode(n,r.getGui())},i);if(o){if(o.addItems&&n.children.length){this.createChildComponentsFromTags(n,i);const r=Array.prototype.slice.call(n.children);o.addItems(r)}this.swapComponentForNode(o,t,n)}else n.childNodes&&this.createChildComponentsFromTags(n,i)})}createComponentFromElement(t,i,s){const n=t.nodeName,o=s?s[t.getAttribute("ref")]:void 0,r=this.agStackComponentsRegistry.getComponentClass(n);if(r){fg.elementGettingCreated=t;const l=new r(o);return l.setParentComponent(this),this.createBean(l,null,i),l}return null}copyAttributesFromNode(t,i){JE(t.attributes,(s,n)=>i.setAttribute(s,n))}swapComponentForNode(t,i,s){const n=t.getGui();i.replaceChild(n,s),i.insertBefore(document.createComment(s.nodeName),n),this.addDestroyFunc(this.destroyBean.bind(this,t)),this.swapInComponentForQuerySelectors(t,s)}swapInComponentForQuerySelectors(t,i){const s=this;this.iterateOverQuerySelectors(n=>{s[n.attributeName]===i&&(s[n.attributeName]=t)})}iterateOverQuerySelectors(t){let i=Object.getPrototypeOf(this);for(;i!=null;){const s=i.__agComponentMetaData,n=Dc(i.constructor);s&&s[n]&&s[n].querySelectors&&s[n].querySelectors.forEach(o=>t(o)),i=Object.getPrototypeOf(i)}}activateTabIndex(t){const i=this.gos.get("tabIndex");t||(t=[]),t.length||t.push(this.getGui()),t.forEach(s=>s.setAttribute("tabindex",i.toString()))}setTemplate(t,i){const s=ei(t);this.setTemplateFromElement(s,i)}setTemplateFromElement(t,i){this.eGui=t,this.eGui.__agComponent=this,this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui(),i)}createChildComponentsPreConstruct(){this.getGui()&&this.createChildComponentsFromTags(this.getGui())}wireQuerySelectors(){if(!this.eGui)return;const t=this;this.iterateOverQuerySelectors(i=>{const s=o=>t[i.attributeName]=o;if(i.refSelector&&this.getAttribute("ref")===i.refSelector)s(this.eGui);else{const o=this.eGui.querySelector(i.querySelector);o&&s(o.__agComponent||o)}})}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(t){this.parentComponent=t}getParentComponent(){return this.parentComponent}setGui(t){this.eGui=t}queryForHtmlElement(t){return this.eGui.querySelector(t)}queryForHtmlInputElement(t){return this.eGui.querySelector(t)}appendChild(t,i){if(t!=null)if(i||(i=this.eGui),za(t))i.appendChild(t);else{const s=t;i.appendChild(s.getGui())}}isDisplayed(){return this.displayed}setVisible(t,i={}){if(t!==this.visible){this.visible=t;const{skipAriaHidden:s}=i;YE(this.eGui,t,{skipAriaHidden:s})}}setDisplayed(t,i={}){if(t!==this.displayed){this.displayed=t;const{skipAriaHidden:s}=i;le(this.eGui,t,{skipAriaHidden:s});const n={type:fg.EVENT_DISPLAYED_CHANGED,visible:this.displayed};this.dispatchEvent(n)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const t=this.eGui;t&&t.__agComponent&&(t.__agComponent=void 0),super.destroy()}addGuiEventListener(t,i,s){this.eGui.addEventListener(t,i,s),this.addDestroyFunc(()=>this.eGui.removeEventListener(t,i))}addCssClass(t){this.cssClassManager.addCssClass(t)}removeCssClass(t){this.cssClassManager.removeCssClass(t)}containsCssClass(t){return this.cssClassManager.containsCssClass(t)}addOrRemoveCssClass(t,i){this.cssClassManager.addOrRemoveCssClass(t,i)}getAttribute(t){const{eGui:i}=this;return i?i.getAttribute(t):null}getRefElement(t){return this.queryForHtmlElement(`[ref="${t}"]`)}};Ya.EVENT_DISPLAYED_CHANGED="displayedChanged";c([f("agStackComponentsRegistry")],Ya.prototype,"agStackComponentsRegistry",2);c([tE],Ya.prototype,"preConstructOnComponent",1);c([tE],Ya.prototype,"createChildComponentsPreConstruct",1);var Z=Ya;function N(e){return BA.bind(this,`[ref=${e}]`,e)}function BA(e,t,i,s,n){if(e===null){console.error("AG Grid: QuerySelector selector should not be null");return}if(typeof n=="number"){console.error("AG Grid: QuerySelector should be on an attribute");return}WA(i,"querySelectors",{attributeName:s,querySelector:e,refSelector:t})}function WA(e,t,i){const s=UA(e,Dc(e.constructor));s[t]||(s[t]=[]),s[t].push(i)}function UA(e,t){return e.__agComponentMetaData||(e.__agComponentMetaData={}),e.__agComponentMetaData[t]||(e.__agComponentMetaData[t]={}),e.__agComponentMetaData[t]}var fm=class extends Z{constructor(){super(`
|
|
51
|
+
<div class="ag-floating-filter-input" role="presentation">
|
|
52
|
+
<ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>
|
|
53
|
+
</div>`)}destroy(){super.destroy()}init(e){this.params=e;const t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${i("ariaFilterInput","Filter Input")}`)}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const i=t.getModelAsString(e);this.eFloatingFilterText.setValue(i)}})}onParamsUpdated(e){this.refresh(e)}refresh(e){this.init(e)}};c([N("eFloatingFilterText")],fm.prototype,"eFloatingFilterText",2);c([f("columnModel")],fm.prototype,"columnModel",2);var cR=class{constructor(e,t,i,s,n){this.alive=!0,this.context=e,this.eParent=s,t.getDateCompDetails(i).newAgStackInstance().then(l=>{if(!this.alive){e.destroyBean(l);return}this.dateComp=l,l&&(s.appendChild(l.getGui()),l.afterGuiAttached&&l.afterGuiAttached(),this.tempValue&&l.setDate(this.tempValue),this.disabled!=null&&this.setDateCompDisabled(this.disabled),n==null||n(this))})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){this.dateComp?this.dateComp.setDate(e):this.tempValue=e}setDisabled(e){this.dateComp?this.setDateCompDisabled(e):this.disabled=e}setDisplayed(e){le(this.eParent,e)}setInputPlaceholder(e){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(e)}setInputAriaLabel(e){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(e)}afterGuiAttached(e){this.dateComp&&typeof this.dateComp.afterGuiAttached=="function"&&this.dateComp.afterGuiAttached(e)}updateParams(e){var t,i;let s=!1;(t=this.dateComp)!=null&&t.refresh&&typeof this.dateComp.refresh=="function"&&this.dateComp.refresh(e)!==null&&(s=!0),!s&&((i=this.dateComp)!=null&&i.onParamsUpdated)&&typeof this.dateComp.onParamsUpdated=="function"&&this.dateComp.onParamsUpdated(e)!==null&&K("Custom date component method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")}setDateCompDisabled(e){this.dateComp!=null&&this.dateComp.setDisabled!=null&&this.dateComp.setDisabled(e)}},hR=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions||t,this.mapCustomOptions(),this.selectDefaultItem(e)}getFilterOptions(){return this.filterOptions}mapCustomOptions(){this.filterOptions&&this.filterOptions.forEach(e=>{if(typeof e=="string")return;const t=[["displayKey"],["displayName"],["predicate","test"]],i=s=>s.some(n=>e[n]!=null)?!0:(console.warn(`AG Grid: ignoring FilterOptionDef as it doesn't contain one of '${s}'`),!1);if(!t.every(i)){this.filterOptions=this.filterOptions.filter(s=>s===e)||[];return}this.customFilterOptions[e.displayKey]=e})}selectDefaultItem(e){if(e.defaultOption)this.defaultOption=e.defaultOption;else if(this.filterOptions.length>=1){const t=this.filterOptions[0];typeof t=="string"?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")}getDefaultOption(){return this.defaultOption}getCustomOption(e){return this.customFilterOptions[e]}},pR={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"},Oc=class gR extends L{constructor(t,i={}){super(),this.eFocusableElement=t,this.callbacks=i,this.callbacks=$({shouldStopEventPropagation:()=>!1,onTabKeyDown:s=>{if(s.defaultPrevented)return;const n=this.focusService.findNextFocusableElement(this.eFocusableElement,!1,s.shiftKey);n&&(n.focus(),s.preventDefault())}},i)}postConstruct(){this.eFocusableElement.classList.add(gR.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)}addKeyDownListeners(t){this.addManagedListener(t,"keydown",i=>{if(!(i.defaultPrevented||es(i))){if(this.callbacks.shouldStopEventPropagation(i)){ss(i);return}i.key===D.TAB?this.callbacks.onTabKeyDown(i):this.callbacks.handleKeyDown&&this.callbacks.handleKeyDown(i)}})}};Oc.FOCUS_MANAGED_CLASS="ag-focus-managed";c([f("focusService")],Oc.prototype,"focusService",2);c([M],Oc.prototype,"postConstruct",1);var Ln=Oc,fR="ag-resizer-wrapper",zA=`<div class="${fR}">
|
|
54
|
+
<div ref="eTopLeftResizer" class="ag-resizer ag-resizer-topLeft"></div>
|
|
55
|
+
<div ref="eTopResizer" class="ag-resizer ag-resizer-top"></div>
|
|
56
|
+
<div ref="eTopRightResizer" class="ag-resizer ag-resizer-topRight"></div>
|
|
57
|
+
<div ref="eRightResizer" class="ag-resizer ag-resizer-right"></div>
|
|
58
|
+
<div ref="eBottomRightResizer" class="ag-resizer ag-resizer-bottomRight"></div>
|
|
59
|
+
<div ref="eBottomResizer" class="ag-resizer ag-resizer-bottom"></div>
|
|
60
|
+
<div ref="eBottomLeftResizer" class="ag-resizer ag-resizer-bottomLeft"></div>
|
|
61
|
+
<div ref="eLeftResizer" class="ag-resizer ag-resizer-left"></div>
|
|
62
|
+
</div>`,zr=class extends L{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}center(){const{clientHeight:e,clientWidth:t}=this.offsetParent,i=t/2-this.getWidth()/2,s=e/2-this.getHeight()/2;this.offsetElement(i,s)}initialisePosition(){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:t,minWidth:i,width:s,minHeight:n,height:o,x:r,y:l}=this.config;this.offsetParent||this.setOffsetParent();let a=0,u=0;const d=oi(this.element);if(d){const h=this.findBoundaryElement(),p=window.getComputedStyle(h);if(p.minWidth!=null){const C=h.offsetWidth-this.element.offsetWidth;u=parseInt(p.minWidth,10)-C}if(p.minHeight!=null){const C=h.offsetHeight-this.element.offsetHeight;a=parseInt(p.minHeight,10)-C}}if(this.minHeight=n||a,this.minWidth=i||u,s&&this.setWidth(s),o&&this.setHeight(o),(!s||!o)&&this.refreshSize(),e)this.center();else if(r||l)this.offsetElement(r,l);else if(d&&t){let h=this.boundaryEl,p=!0;if(h||(h=this.findBoundaryElement(),p=!1),h){const C=parseFloat(h.style.top),v=parseFloat(h.style.left);p?this.offsetElement(isNaN(v)?0:v,isNaN(C)?0:C):this.setPosition(v,C)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;const i=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragService.addDragSource(i),this.moveElementDragListener=i):(this.dragService.removeDragSource(i),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{const s=!!e[t],n=this.getResizerElement(t),o={dragStartPixels:0,eElement:n,onDragStart:r=>this.onResizeStart(r,t),onDragging:this.onResize.bind(this),onDragStop:r=>this.onResizeEnd(r,t)};(s||!this.isAlive()&&!s)&&(s?(this.dragService.addDragSource(o),this.resizeListeners.push(o),n.style.pointerEvents="all"):n.style.pointerEvents="none",this.resizable[t]=s)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,i=this.element;let s=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)oo(i,e),e=om(i),s=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const n=this.getAvailableHeight();n&&e>n&&(e=n)}this.getHeight()!==e&&(s?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?oo(i,e):(i.style.height=`${e}px`,i.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:i}=this.offsetParent;if(!i)return null;const s=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),o=e?this.position.y:s.top,r=e?0:n.top;let l=0;if(t){const u=this.element.parentElement;if(u){const{bottom:d}=u.getBoundingClientRect();l=d-s.bottom}}return i+r-o-l}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:i}=this.config;let s=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)Ni(t,e),e=ha(t),s=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:n}=this.offsetParent,o=i?this.position.x:this.element.getBoundingClientRect().left;n&&e+o>n&&(e=n-o)}this.getWidth()!==e&&(s?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Ni(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:parseFloat(e)))}offsetElement(e=0,t=0){const{forcePopupParentAsOffsetParent:i}=this.config,s=i?this.boundaryEl:this.element;s&&(this.popupService.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(s.style.left),parseFloat(s.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const i=this.getAvailableHeight();this.element.style.setProperty("max-height",`${i}px`)};e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),t):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:i,isTop:s,anywhereWithin:n,topBuffer:o}=e,r=t.clientX-this.dragStartPosition.x,l=t.clientY-this.dragStartPosition.y,a=this.shouldSkipX(t,!!i,!!n,r)?0:r,u=this.shouldSkipY(t,!!s,o,l)?0:l;return{movementX:a,movementY:u}}shouldSkipX(e,t,i,s){const n=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.x:n.left;let a=l<=0&&o.left>=e.clientX||o.right<=e.clientX&&o.right<=r.right;return a?!0:(t?a=s<0&&e.clientX>l+o.left||s>0&&e.clientX<l+o.left:i?a=s<0&&e.clientX>r.right||s>0&&e.clientX<l+o.left:a=s<0&&e.clientX>r.right||s>0&&e.clientX<r.right,a)}shouldSkipY(e,t,i=0,s){const n=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.y:n.top;let a=l<=0&&o.top>=e.clientY||o.bottom<=e.clientY&&o.bottom<=r.bottom;return a?!0:(t?a=s<0&&e.clientY>l+o.top+i||s>0&&e.clientY<l+o.top:a=s<0&&e.clientY>r.bottom||s>0&&e.clientY<r.bottom,a)}createResizeMap(){const 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]")}}}addResizers(){if(this.resizersAdded)return;const e=this.element;if(!e)return;const i=new DOMParser().parseFromString(zA,"text/html").body;e.appendChild(i.firstChild),this.createResizeMap(),this.resizersAdded=!0}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${fR}`);e&&this.element.removeChild(e),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:i,forcePopupParentAsOffsetParent:s}=this.config;!i&&!s&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(i=>!i.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,i=0;for(let s=0;s<e.length;s++){const n=e[s],o=!!n.style.flex&&n.style.flex!=="0 0 auto";if(n===this.element)continue;let r=this.minHeight||0,l=this.minWidth||0;if(o){const a=window.getComputedStyle(n);a.minHeight&&(r=parseInt(a.minHeight,10)),a.minWidth&&(l=parseInt(a.minWidth,10))}else r=n.offsetHeight,l=n.offsetWidth;t+=r,i+=l}return{height:t,width:i}}applySizeToSiblings(e){let t=null;const i=this.getSiblings();if(i){for(let s=0;s<i.length;s++){const n=i[s];n!==t&&(e?n.style.height=`${n.offsetHeight}px`:n.style.width=`${n.offsetWidth}px`,n.style.flex="0 0 auto",n===this.element&&(t=i[s+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:i}=this.config,{isTop:s,isRight:n,isBottom:o,isLeft:r}=this.currentResizer,l=n||r,a=o||s,{movementX:u,movementY:d}=this.calculateMouseMovement({e,isLeft:r,isTop:s}),h=this.position.x,p=this.position.y;let C=0,v=0;if(l&&u){const y=r?-1:1,R=this.getWidth(),w=R+u*y;let m=!1;r&&(C=R-w,(h+C<=0||w<=this.minWidth)&&(m=!0,C=0)),m||this.setWidth(w)}if(a&&d){const y=s?-1:1,R=this.getHeight(),w=R+d*y;let m=!1;s?(v=R-w,(p+v<=0||w<=this.minHeight)&&(m=!0,v=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&R<w&&this.getMinSizeOfSiblings().height+w>this.element.parentElement.offsetHeight&&(m=!0),m||this.setHeight(w)}this.updateDragStartPosition(e.clientX,e.clientY),((t||i)&&C||v)&&this.offsetElement(h+C,p+v)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null;const i={type:"resize"};this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchEvent(i)}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:i}=this.position;let s;this.config.calculateTopBuffer&&(s=this.config.calculateTopBuffer());const{movementX:n,movementY:o}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:s});this.offsetElement(t+n,i+o),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent?this.offsetParent=this.popupService.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}};c([f("popupService")],zr.prototype,"popupService",2);c([f("resizeObserverService")],zr.prototype,"resizeObserverService",2);c([f("dragService")],zr.prototype,"dragService",2);var Gc=class Rl extends Z{constructor(t){super(),this.filterNameKey=t,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.buttonListeners=[]}postConstruct(){this.resetTemplate(),this.createManagedBean(new Ln(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new zr(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(t){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(t){let i=this.getGui();i&&i.removeEventListener("submit",this.onFormSubmit);const s=`
|
|
63
|
+
<form class="ag-filter-wrapper">
|
|
64
|
+
<div class="ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper" ref="eFilterBody">
|
|
65
|
+
${this.createBodyTemplate()}
|
|
66
|
+
</div>
|
|
67
|
+
</form>`;this.setTemplate(s,t),i=this.getGui(),i&&i.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.providedFilterParams.readOnly}init(t){this.setParams(t),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(t){this.providedFilterParams=t,this.applyActive=Rl.isUseApplyButton(t),this.resetButtonsPanel()}updateParams(t){this.providedFilterParams=t,this.applyActive=Rl.isUseApplyButton(t),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(){const{buttons:t}=this.providedFilterParams,i=t&&t.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(je(this.eButtonsPanel),this.buttonListeners.forEach(o=>o==null?void 0:o()),this.buttonListeners=[]):i&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),!i){this.eButtonsPanel&&qi(this.eButtonsPanel);return}const s=document.createDocumentFragment(),n=o=>{let r,l;switch(o){case"apply":r=this.translate("applyFilter"),l=d=>this.onBtApply(!1,!1,d);break;case"clear":r=this.translate("clearFilter"),l=()=>this.onBtClear();break;case"reset":r=this.translate("resetFilter"),l=()=>this.onBtReset();break;case"cancel":r=this.translate("cancelFilter"),l=d=>{this.onBtCancel(d)};break;default:console.warn("AG Grid: Unknown button type specified");return}const u=ei(`<button
|
|
68
|
+
type="${o==="apply"?"submit":"button"}"
|
|
69
|
+
ref="${o}FilterButton"
|
|
70
|
+
class="ag-button ag-standard-button ag-filter-apply-panel-button"
|
|
71
|
+
>${r}
|
|
72
|
+
</button>`);this.buttonListeners.push(this.addManagedListener(u,"click",l)),s.append(u)};gm(t).forEach(o=>n(o)),this.eButtonsPanel.append(s),this.getGui().appendChild(this.eButtonsPanel)}getDefaultDebounceMs(){return 0}setupOnBtApplyDebounce(){const t=Rl.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs()),i=Nt(this.checkApplyDebounce.bind(this),t);this.onBtApplyDebounce=()=>{this.debouncePending=!0,i()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel?this.appliedModel:null}setModel(t){return(t!=null?this.setModelIntoUi(t):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(t){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(t)})}handleCancelEnd(t){this.providedFilterParams.closeOnApply&&this.close(t)}resetUiToActiveModel(t,i){const s=()=>{this.onUiChanged(!1,"prevent"),i==null||i()};t!=null?this.setModelIntoUi(t).then(s):this.resetUiToDefaults().then(s)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(t="api"){const i=this.getModelFromUi();if(!this.isModelValid(i))return!1;const s=this.appliedModel;return this.appliedModel=i,!this.areModelsEqual(s,i)}isModelValid(t){return!0}onFormSubmit(t){t.preventDefault()}onBtApply(t=!1,i=!1,s){s&&s.preventDefault(),this.applyModel(i?"rowDataUpdated":"ui")&&this.providedFilterParams.filterChangedCallback({afterFloatingFilter:t,afterDataChange:i,source:"columnFilter"});const{closeOnApply:n}=this.providedFilterParams;n&&this.applyActive&&!t&&!i&&this.close(s)}onNewRowsLoaded(){}close(t){if(!this.hidePopup)return;const i=t,s=i&&i.key;let n;(s==="Enter"||s==="Space")&&(n={keyboardEvent:i}),this.hidePopup(n),this.hidePopup=null}onUiChanged(t=!1,i){if(this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const s=this.isModelValid(this.getModelFromUi()),n=this.getRefElement("applyFilterButton");n&&br(n,!s)}t&&!i||i==="immediately"?this.onBtApply(t):(!this.applyActive&&!i||i==="debounce")&&this.onBtApplyDebounce()}afterGuiAttached(t){t&&(this.hidePopup=t.hidePopup),this.refreshFilterResizer(t==null?void 0:t.container)}refreshFilterResizer(t){if(!this.positionableFeature||t==="toolPanel")return;const i=t==="floatingFilter"||t==="columnFilter",{positionableFeature:s,gos:n}=this;i?(s.restoreLastSize(),s.setResizable(n.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(this.positionableFeature.removeSizeFromEl(),this.positionableFeature.setResizable(!1)),this.positionableFeature.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature&&this.positionableFeature.constrainSizeToAvailableHeight(!1)}static getDebounceMs(t,i){return Rl.isUseApplyButton(t)?(t.debounceMs!=null&&console.warn("AG Grid: debounceMs is ignored when apply button is present"),0):t.debounceMs!=null?t.debounceMs:i}static isUseApplyButton(t){return!!t.buttons&&t.buttons.indexOf("apply")>=0}refresh(t){return this.providedFilterParams=t,!0}destroy(){const t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(t){return this.localeService.getLocaleTextFunc()(t,pR[t])}getCellValue(t){return this.providedFilterParams.getValue(t)}getPositionableElement(){return this.eFilterBody}};c([f("rowModel")],Gc.prototype,"rowModel",2);c([N("eFilterBody")],Gc.prototype,"eFilterBody",2);c([M],Gc.prototype,"postConstruct",1);var Bd=Gc,mm=class extends Z{constructor(e,t){super(t),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{}}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:i,labelAlignment:s,disabled:n}=this.config;n!=null&&this.setDisabled(n),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),i!=null&&this.setLabelWidth(i),this.setLabelAlignment(s||this.labelAlignment),this.refreshLabel()}refreshLabel(){je(this.eLabel),typeof this.label=="string"?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),this.label===""?(le(this.eLabel,!1),He(this.eLabel,"presentation")):(le(this.eLabel,!0),He(this.eLabel,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){return this.eLabel.id=this.eLabel.id||`ag-${this.getCompId()}-label`,this.eLabel.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const i=this.getGui().classList;return i.toggle("ag-label-align-left",e==="left"),i.toggle("ag-label-align-right",e==="right"),i.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(ma(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return br(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}};c([M],mm.prototype,"postConstruct",1);var mR=class extends mm{constructor(e,t,i){super(e,t),this.className=i}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:i}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),i!=null&&this.onValueChange(i),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId();PE(e)!==null?Fr(e,""):Fr(e,t??"")}setAriaLabel(e){return yi(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListener(this,g.EVENT_FIELD_VALUE_CHANGED,()=>e(this.getValue())),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Ni(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchEvent({type:g.EVENT_FIELD_VALUE_CHANGED}),this)}},$A=`
|
|
73
|
+
<div class="ag-picker-field" role="presentation">
|
|
74
|
+
<div ref="eLabel"></div>
|
|
75
|
+
<div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">
|
|
76
|
+
<div ref="eDisplayField" class="ag-picker-field-display"></div>
|
|
77
|
+
<div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>`,Lo=class extends mR{constructor(e){if(super(e,(e==null?void 0:e.template)||$A,e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.ariaRole=e==null?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:i,variableWidth:s,minPickerWidth:n,maxPickerWidth:o}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!s,i!=null&&this.setPickerMaxHeight(i),n!=null&&this.setPickerMinWidth(n),o!=null&&this.setPickerMaxWidth(o)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const 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));const{pickerIcon:i,inputWidth:s}=this.config;if(i){const n=Oe(i,this.gos);n&&this.eIcon.appendChild(n)}s!=null&&this.setInputWidth(s)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),Gs(e,!1),this.ariaRole&&He(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case D.UP:case D.DOWN:case D.ENTER:case D.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case D.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.gos.getDocument(),t=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||(this.destroyMouseWheelFunc=this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,()=>{this.hidePicker()}));const i=this.localeService.getLocaleTextFunc(),{pickerAriaLabelKey:s,pickerAriaLabelValue:n,modalPicker:o=!0}=this.config,r={modal:o,eChild:t,closeOnEsc:!0,closedCallback:()=>{const C=this.gos.getActiveDomElement(),v=!C||C===e.body;this.beforeHidePicker(),v&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:i(s,n)},l=this.popupService.addPopup(r),{maxPickerHeight:a,minPickerWidth:u,maxPickerWidth:d,variableWidth:h}=this;h?(u&&(t.style.minWidth=u),t.style.width=Nc(ha(this.eWrapper)),d&&(t.style.maxWidth=d)):ma(t,d??ha(this.eWrapper));const p=a??`${Ua(this.popupService.getPopupParent())}px`;return t.style.setProperty("max-height",p),t.style.position="absolute",this.alignPickerToComponent(),l.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerType:e}=this.config,{pickerGap:t}=this,i=this.gos.get("enableRtl")?"right":"left";this.popupService.positionPopupByComponent({type:e,eventSource:this.eWrapper,ePopup:this.pickerComponent.getGui(),position:"under",alignSide:i,keepWithinBounds:!0,nudgeY:t})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();Gs(t,e),this.eWrapper.classList.toggle("ag-picker-expanded",e),this.eWrapper.classList.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(t=this.pickerComponent)!=null&&t.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&this.hideCurrentPicker()}setInputWidth(e){return ma(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}};c([f("popupService")],Lo.prototype,"popupService",2);c([N("eLabel")],Lo.prototype,"eLabel",2);c([N("eWrapper")],Lo.prototype,"eWrapper",2);c([N("eDisplayField")],Lo.prototype,"eDisplayField",2);c([N("eIcon")],Lo.prototype,"eIcon",2);var kc=class ju extends Z{constructor(t="default",i=!1){super(`<div class="ag-list ag-${t}-list" role="listbox"></div>`),this.cssIdentifier=t,this.unFocusable=i,this.options=[],this.itemEls=[]}init(){const t=this.getGui();this.addManagedListener(t,"mouseleave",()=>this.clearHighlighted()),!this.unFocusable&&this.addManagedListener(t,"keydown",this.handleKeyDown.bind(this))}handleKeyDown(t){const i=t.key;switch(i){case D.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{const s=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(s)}break;case D.DOWN:case D.UP:t.preventDefault(),this.navigate(i);break;case D.PAGE_DOWN:case D.PAGE_UP:case D.PAGE_HOME:case D.PAGE_END:t.preventDefault(),this.navigateToPage(i);break}}navigate(t){const i=t===D.DOWN;let s;if(!this.highlightedEl)s=this.itemEls[i?0:this.itemEls.length-1];else{let o=this.itemEls.indexOf(this.highlightedEl)+(i?1:-1);o=Math.min(Math.max(o,0),this.itemEls.length-1),s=this.itemEls[o]}this.highlightItem(s)}navigateToPage(t){if(!this.highlightedEl||this.itemEls.length===0)return;const i=this.itemEls.indexOf(this.highlightedEl),s=this.options.length-1,n=this.itemEls[0].clientHeight,o=Math.floor(this.getGui().clientHeight/n);let r=-1;t===D.PAGE_HOME?r=0:t===D.PAGE_END?r=s:t===D.PAGE_DOWN?r=Math.min(i+o,s):t===D.PAGE_UP&&(r=Math.max(i-o,0)),r!==-1&&this.highlightItem(this.itemEls[r])}addOptions(t){return t.forEach(i=>this.addOption(i)),this}addOption(t){const{value:i,text:s}=t,n=s||i;return this.options.push({value:i,text:n}),this.renderOption(i,n),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(t=>{qi(t)}),this.itemEls=[]}updateIndices(){const t=this.getGui().querySelectorAll(".ag-list-item");t.forEach((i,s)=>{Mc(i,s+1),Lc(i,t.length)})}renderOption(t,i){const s=this.gos.getDocument(),n=s.createElement("div");He(n,"option"),n.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);const o=s.createElement("span");n.appendChild(o),o.textContent=i,this.unFocusable||(n.tabIndex=-1),this.itemEls.push(n),this.addManagedListener(n,"mousemove",()=>this.highlightItem(n)),this.addManagedListener(n,"mousedown",r=>{r.preventDefault(),this.setValue(t)}),this.createManagedBean(new zs({getTooltipValue:()=>i,getGui:()=>n,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>o.scrollWidth>o.clientWidth})),this.getGui().appendChild(n)}setValue(t,i){if(this.value===t)return this.fireItemSelected(),this;if(t==null)return this.reset(i),this;const s=this.options.findIndex(n=>n.value===t);if(s!==-1){const n=this.options[s];this.value=n.value,this.displayValue=n.text,this.highlightItem(this.itemEls[s]),i||this.fireChangeEvent()}return this}setValueByIndex(t){return this.setValue(this.options[t].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const t=this.options.findIndex(i=>i.value===this.value);t!==-1&&this.highlightItem(this.itemEls[t])}reset(t){this.value=null,this.displayValue=null,this.clearHighlighted(),t||this.fireChangeEvent()}highlightItem(t){if(!oi(t))return;this.clearHighlighted(),this.highlightedEl=t,this.highlightedEl.classList.add(ju.ACTIVE_CLASS),Ar(this.highlightedEl,!0);const i=this.getGui(),{scrollTop:s,clientHeight:n}=i,{offsetTop:o,offsetHeight:r}=t;(o+r>s+n||o<s)&&this.highlightedEl.scrollIntoView({block:"nearest"}),this.unFocusable||this.highlightedEl.focus()}clearHighlighted(){!this.highlightedEl||!oi(this.highlightedEl)||(this.highlightedEl.classList.remove(ju.ACTIVE_CLASS),Ar(this.highlightedEl,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchEvent({type:g.EVENT_FIELD_VALUE_CHANGED}),this.fireItemSelected()}fireItemSelected(){this.dispatchEvent({type:ju.EVENT_ITEM_SELECTED})}};kc.EVENT_ITEM_SELECTED="selectedItem";kc.ACTIVE_CLASS="ag-active-item";c([M],kc.prototype,"init",1);var Sv=kc,CR=class vR extends Lo{constructor(t){super($({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"smallDown",ariaRole:"combobox"},t))}postConstruct(){super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:t,value:i,placeholder:s}=this.config;t!=null&&this.addOptions(t),i!=null&&this.setValue(i,!0),s&&i==null&&(this.eDisplayField.textContent=s),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this))}onWrapperFocusOut(t){this.eWrapper.contains(t.relatedTarget)||this.hidePicker()}createListComponent(){this.listComponent=this.createBean(new Sv("select",!0)),this.listComponent.setParentComponent(this);const t=this.listComponent.getAriaElement(),i=`ag-select-list-${this.listComponent.getCompId()}`;t.setAttribute("id",i),qf(this.getAriaElement(),t),this.listComponent.addManagedListener(this.listComponent,Sv.EVENT_ITEM_SELECTED,()=>{this.hidePicker(),this.dispatchEvent({type:vR.EVENT_ITEM_SELECTED})}),this.listComponent.addManagedListener(this.listComponent,g.EVENT_FIELD_VALUE_CHANGED,()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())})}createPickerComponent(){return this.listComponent}onKeyDown(t){var i;const{key:s}=t;switch(s===D.TAB&&this.hidePicker(),s){case D.ENTER:case D.UP:case D.DOWN:case D.PAGE_UP:case D.PAGE_DOWN:case D.PAGE_HOME:case D.PAGE_END:t.preventDefault(),this.isPickerDisplayed?(i=this.listComponent)==null||i.handleKeyDown(t):super.onKeyDown(t);break;case D.ESCAPE:super.onKeyDown(t);break}}showPicker(){this.listComponent&&(super.showPicker(),this.listComponent.refreshHighlighted())}addOptions(t){return t.forEach(i=>this.addOption(i)),this}addOption(t){return this.listComponent.addOption(t),this}clearOptions(){var t;return(t=this.listComponent)==null||t.clearOptions(),this}setValue(t,i,s){if(this.value===t||!this.listComponent)return this;if(s||this.listComponent.setValue(t,!0),this.listComponent.getValue()===this.getValue())return this;let o=this.listComponent.getDisplayValue();return o==null&&this.config.placeholder&&(o=this.config.placeholder),this.eDisplayField.textContent=o,this.setTooltip({newTooltipText:o??null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth}),super.setValue(t,i)}destroy(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),super.destroy()}};CR.EVENT_ITEM_SELECTED="selectedItem";var Vc=CR,Xi=class extends mR{constructor(e,t,i="text",s="input"){super(e,`
|
|
80
|
+
<div role="presentation">
|
|
81
|
+
<div ref="eLabel" class="ag-input-field-label"></div>
|
|
82
|
+
<div ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">
|
|
83
|
+
<${s} ref="eInput" class="ag-input-field-input"></${s}>
|
|
84
|
+
</div>
|
|
85
|
+
</div>`,t),this.inputType=i,this.displayFieldTag=s}postConstruct(){super.postConstruct(),this.setInputType(),this.eLabel.classList.add(`${this.className}-label`),this.eWrapper.classList.add(`${this.className}-input-wrapper`),this.eInput.classList.add(`${this.className}-input`),this.addCssClass("ag-input-field"),this.eInput.id=this.eInput.id||`ag-${this.getCompId()}-input`;const{inputName:e,inputWidth:t}=this.config;e!=null&&this.setInputName(e),t!=null&&this.setInputWidth(t),this.addInputListeners(),this.activateTabIndex([this.eInput])}addInputListeners(){this.addManagedListener(this.eInput,"input",e=>this.setValue(e.target.value))}setInputType(){this.displayFieldTag==="input"&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return ma(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return vs(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return yi(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return br(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)vs(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";vs(this.eInput,"autocomplete",t)}return this}};c([N("eLabel")],Xi.prototype,"eLabel",2);c([N("eWrapper")],Xi.prototype,"eWrapper",2);c([N("eInput")],Xi.prototype,"eInput",2);var Hc=class extends Xi{constructor(e,t="ag-checkbox",i="checkbox"){super(e,t,i),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this)),this.addManagedListener(this.eLabel,"click",this.toggle.bind(this))}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){this.isSelected()!==e&&(this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0,this.eInput.checked=e,this.eInput.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue))}dispatchChange(e,t,i){this.dispatchEvent({type:g.EVENT_FIELD_VALUE_CHANGED,selected:e,previousValue:t,event:i});const s=this.getInputElement(),n={type:g.EVENT_CHECKBOX_CHANGED,id:s.id,name:s.name,selected:e,previousValue:t};this.eventService.dispatchEvent(n)}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),i=this.selected=e.target.checked;this.refreshSelectedClass(i),this.dispatchChange(i,t,e)}refreshSelectedClass(e){this.eWrapper.classList.toggle("ag-checked",e===!0),this.eWrapper.classList.toggle("ag-indeterminate",e==null)}},wR=class extends Hc{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedListener(this.eventService,g.EVENT_CHECKBOX_CHANGED,this.onChange.bind(this))}onChange(e){e.selected&&e.name&&this.eInput.name&&this.eInput.name===e.name&&e.id&&this.eInput.id!==e.id&&this.setValue(!1,!0)}},Cm=class{constructor(e,t,i){this.localeService=e,this.optionsFactory=t,this.valueFormatter=i}getModelAsString(e){if(!e)return null;const t=e.operator!=null,i=this.localeService.getLocaleTextFunc();if(t){const s=e;let{conditions:n}=s;if(!n){const{condition1:l,condition2:a}=s;n=[l,a]}const o=n.map(l=>this.getModelAsString(l)),r=s.operator==="AND"?"andCondition":"orCondition";return o.join(` ${i(r,pR[r])} `)}else{if(e.type===ke.BLANK||e.type===ke.NOT_BLANK)return i(e.type,e.type);{const s=e,n=this.optionsFactory.getCustomOption(s.type),{displayKey:o,displayName:r,numberOfInputs:l}=n||{};return o&&r&&l===0?(i(o,r),r):this.conditionToString(s,n)}}}updateParams(e){this.optionsFactory=e.optionsFactory}formatValue(e){var t;return this.valueFormatter?(t=this.valueFormatter(e??null))!=null?t:"":String(e)}},Wt=class zo extends Bd{constructor(){super(...arguments),this.eTypes=[],this.eJoinOperatorPanels=[],this.eJoinOperatorsAnd=[],this.eJoinOperatorsOr=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}getNumberOfInputs(t){const i=this.optionsFactory.getCustomOption(t);if(i){const{numberOfInputs:n}=i;return n??1}const s=[zo.EMPTY,zo.NOT_BLANK,zo.BLANK];return t&&s.indexOf(t)>=0?0:t===zo.IN_RANGE?2:1}onFloatingFilterChanged(t,i){this.setTypeFromFloatingFilter(t),this.setValueFromFloatingFilter(i),this.onUiChanged(!0)}setTypeFromFloatingFilter(t){this.eTypes.forEach((i,s)=>{s===0?i.setValue(t,!0):i.setValue(this.optionsFactory.getDefaultOption(),!0)})}getModelFromUi(){const t=this.getUiCompleteConditions();return t.length===0?null:this.maxNumConditions>1&&t.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),condition1:t[0],condition2:t[1],conditions:t}:t[0]}getConditionTypes(){return this.eTypes.map(t=>t.getValue())}getConditionType(t){return this.eTypes[t].getValue()}getJoinOperator(){return this.eJoinOperatorsOr.length===0?this.defaultJoinOperator:this.eJoinOperatorsOr[0].getValue()===!0?"OR":"AND"}areModelsEqual(t,i){if(!t&&!i)return!0;if(!t&&i||t&&!i)return!1;const s=!t.operator,n=!i.operator;if(!s&&n||s&&!n)return!1;let r;if(s){const l=t,a=i;r=this.areSimpleModelsEqual(l,a)}else{const l=t,a=i;r=l.operator===a.operator&&gs(l.conditions,a.conditions,(u,d)=>this.areSimpleModelsEqual(u,d))}return r}shouldRefresh(t){var i,s,n;const o=this.getModel(),r=o?(i=o.conditions)!=null?i:[o]:null,l=(n=(s=t.filterOptions)==null?void 0:s.map(u=>typeof u=="string"?u:u.displayKey))!=null?n:this.getDefaultFilterOptions();return!(!(!r||r.every(u=>l.find(d=>d===u.type)!==void 0))||typeof t.maxNumConditions=="number"&&r&&r.length>t.maxNumConditions)}refresh(t){return!this.shouldRefresh(t)||!super.refresh(t)?!1:(this.setParams(t),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),!0)}setModelIntoUi(t){if(t.operator){let s=t;s.conditions||(s.conditions=[s.condition1,s.condition2]);const n=this.validateAndUpdateConditions(s.conditions),o=this.getNumConditions();if(n<o)this.removeConditionsAndOperators(n);else if(n>o)for(let l=o;l<n;l++)this.createJoinOperatorPanel(),this.createOption();const r=s.operator==="OR";this.eJoinOperatorsAnd.forEach(l=>l.setValue(!r,!0)),this.eJoinOperatorsOr.forEach(l=>l.setValue(r,!0)),s.conditions.forEach((l,a)=>{this.eTypes[a].setValue(l.type,!0),this.setConditionIntoUi(l,a)})}else{const s=t;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(),Ze.resolve()}validateAndUpdateConditions(t){let i=t.length;return i>this.maxNumConditions&&(t.splice(this.maxNumConditions),K('Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'),i=this.maxNumConditions),i}doesFilterPass(t){var i;const s=this.getModel();if(s==null)return!0;const{operator:n}=s,o=[];if(n){const l=s;o.push(...(i=l.conditions)!=null?i:[])}else o.push(s);return o[n&&n==="OR"?"some":"every"](l=>this.individualConditionPasses(t,l))}setParams(t){super.setParams(t),this.setNumConditions(t),this.defaultJoinOperator=this.getDefaultJoinOperator(t.defaultJoinOperator),this.filterPlaceholder=t.filterPlaceholder,this.optionsFactory=new hR,this.optionsFactory.init(t,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")}setNumConditions(t){var i,s;t.suppressAndOrCondition!=null&&K('Since v29.2 "filterParams.suppressAndOrCondition" is deprecated. Use "filterParams.maxNumConditions = 1" instead.'),t.alwaysShowBothConditions!=null&&K('Since v29.2 "filterParams.alwaysShowBothConditions" is deprecated. Use "filterParams.numAlwaysVisibleConditions = 2" instead.'),this.maxNumConditions=(i=t.maxNumConditions)!=null?i:t.suppressAndOrCondition?1:2,this.maxNumConditions<1&&(K('"filterParams.maxNumConditions" must be greater than or equal to zero.'),this.maxNumConditions=1),this.numAlwaysVisibleConditions=(s=t.numAlwaysVisibleConditions)!=null?s:t.alwaysShowBothConditions?2:1,this.numAlwaysVisibleConditions<1&&(K('"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(K('"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'),this.numAlwaysVisibleConditions=this.maxNumConditions)}createOption(){const t=this.createManagedBean(new Vc);this.eTypes.push(t),t.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(t.getGui());const i=this.createValueElement();this.eConditionBodies.push(i),this.eFilterBody.appendChild(i),this.putOptionsIntoDropdown(t),this.resetType(t);const s=this.getNumConditions()-1;this.forEachPositionInput(s,n=>this.resetInput(n)),this.addChangedListeners(t,s)}createJoinOperatorPanel(){const t=document.createElement("div");this.eJoinOperatorPanels.push(t),t.classList.add("ag-filter-condition");const i=this.createJoinOperator(this.eJoinOperatorsAnd,t,"and"),s=this.createJoinOperator(this.eJoinOperatorsOr,t,"or");this.eFilterBody.appendChild(t);const n=this.eJoinOperatorPanels.length-1,o=this.joinOperatorId++;this.resetJoinOperatorAnd(i,n,o),this.resetJoinOperatorOr(s,n,o),this.isReadOnly()||(i.onValueChange(this.listener),s.onValueChange(this.listener))}createJoinOperator(t,i,s){const n=this.createManagedBean(new wR);return t.push(n),n.addCssClass("ag-filter-condition-operator"),n.addCssClass(`ag-filter-condition-operator-${s}`),i.appendChild(n.getGui()),n}getDefaultJoinOperator(t){return t==="AND"||t==="OR"?t:"AND"}createFilterListOptions(){const t=this.optionsFactory.getFilterOptions();this.filterListOptions=t.map(i=>typeof i=="string"?this.createBoilerplateListOption(i):this.createCustomListOption(i))}putOptionsIntoDropdown(t){this.filterListOptions.forEach(i=>{t.addOption(i)}),t.setDisabled(this.filterListOptions.length<=1)}createBoilerplateListOption(t){return{value:t,text:this.translate(t)}}createCustomListOption(t){const{displayKey:i}=t,s=this.optionsFactory.getCustomOption(t.displayKey);return{value:i,text:s?this.localeService.getLocaleTextFunc()(s.displayKey,s.displayName):this.translate(i)}}isAllowTwoConditions(){return this.maxNumConditions>=2}createBodyTemplate(){return""}getCssIdentifier(){return"simple-filter"}updateUiVisibility(){const t=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,t)}updateNumConditions(){var t;let i=-1,s=!0;for(let n=0;n<this.getNumConditions();n++)this.isConditionUiComplete(n)?i=n:s=!1;if(this.shouldAddNewConditionAtEnd(s))this.createJoinOperatorPanel(),this.createOption();else{const n=(t=this.lastUiCompletePosition)!=null?t:this.getNumConditions()-2;if(i<n){this.removeConditionsAndOperators(n+1);const o=i+1,r=n-o;r>0&&this.removeConditionsAndOperators(o,r),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=i}updateConditionStatusesAndValues(t,i){this.eTypes.forEach((n,o)=>{const r=this.isConditionDisabled(o,t);n.setDisabled(r||this.filterListOptions.length<=1),o===1&&(br(this.eJoinOperatorPanels[0],r),this.eJoinOperatorsAnd[0].setDisabled(r),this.eJoinOperatorsOr[0].setDisabled(r))}),this.eConditionBodies.forEach((n,o)=>{le(n,this.isConditionBodyVisible(o))});const s=(i??this.getJoinOperator())==="OR";this.eJoinOperatorsAnd.forEach((n,o)=>{n.setValue(!s,!0)}),this.eJoinOperatorsOr.forEach((n,o)=>{n.setValue(s,!0)}),this.forEachInput((n,o,r,l)=>{this.setElementDisplayed(n,o<l),this.setElementDisabled(n,this.isConditionDisabled(r,t))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(t){return t&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(t,i){if(t>=this.getNumConditions())return;this.removeComponents(this.eTypes,t,i),this.removeElements(this.eConditionBodies,t,i),this.removeValueElements(t,i);const s=Math.max(t-1,0);this.removeElements(this.eJoinOperatorPanels,s,i),this.removeComponents(this.eJoinOperatorsAnd,s,i),this.removeComponents(this.eJoinOperatorsOr,s,i)}removeElements(t,i,s){this.removeItems(t,i,s).forEach(o=>qi(o))}removeComponents(t,i,s){this.removeItems(t,i,s).forEach(o=>{qi(o.getGui()),this.destroyBean(o)})}removeItems(t,i,s){return s==null?t.splice(i):t.splice(i,s)}afterGuiAttached(t){if(super.afterGuiAttached(t),this.resetPlaceholder(),!(t!=null&&t.suppressFocus))if(this.isReadOnly())this.eFilterBody.focus();else{const i=this.getInputs(0)[0];if(!i)return;i instanceof Xi&&i.getInputElement().focus()}}afterGuiDetached(){super.afterGuiDetached();const t=this.getModel();this.resetUiToActiveModel(t);let i=-1,s=-1,n=!1;const o=this.getJoinOperator();for(let l=this.getNumConditions()-1;l>=0;l--)if(this.isConditionUiComplete(l))i===-1&&(i=l,s=l);else{const a=l>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(l-1),u=l<i;(a||u)&&(this.removeConditionsAndOperators(l,1),n=!0,u&&s--)}let r=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),r=!0),this.shouldAddNewConditionAtEnd(s===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),r=!0),r&&this.updateConditionStatusesAndValues(s,o),n&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=s}getPlaceholderText(t,i){let s=this.translate(t);if(Pc(this.filterPlaceholder)){const n=this.filterPlaceholder,o=this.eTypes[i].getValue(),r=this.translate(o);s=n({filterOptionKey:o,filterOption:r,placeholder:s})}else typeof this.filterPlaceholder=="string"&&(s=this.filterPlaceholder);return s}resetPlaceholder(){const t=this.localeService.getLocaleTextFunc();this.forEachInput((i,s,n,o)=>{if(!(i instanceof Xi))return;const r=s===0&&o>1?"inRangeStart":s===0?"filterOoo":"inRangeEnd",l=s===0&&o>1?t("ariaFilterFromValue","Filter from value"):s===0?t("ariaFilterValue","Filter Value"):t("ariaFilterToValue","Filter to Value");i.setInputPlaceholder(this.getPlaceholderText(r,n)),i.setInputAriaLabel(l)})}setElementValue(t,i,s){t instanceof Xi&&t.setValue(i!=null?String(i):null,!0)}setElementDisplayed(t,i){t instanceof Z&&le(t.getGui(),i)}setElementDisabled(t,i){t instanceof Z&&br(t.getGui(),i)}attachElementOnChange(t,i){t instanceof Xi&&t.onValueChange(i)}forEachInput(t){this.getConditionTypes().forEach((i,s)=>{this.forEachPositionTypeInput(s,i,t)})}forEachPositionInput(t,i){const s=this.getConditionType(t);this.forEachPositionTypeInput(t,s,i)}forEachPositionTypeInput(t,i,s){const n=this.getNumberOfInputs(i),o=this.getInputs(t);for(let r=0;r<o.length;r++){const l=o[r];l!=null&&s(l,r,t,n)}}isConditionDisabled(t,i){return this.isReadOnly()?!0:t===0?!1:t>i+1}isConditionBodyVisible(t){const i=this.getConditionType(t);return this.getNumberOfInputs(i)>0}isConditionUiComplete(t){return!(t>=this.getNumConditions()||this.getConditionType(t)===zo.EMPTY||this.getValues(t).some(s=>s==null))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const t=[];for(let i=0;i<this.getNumConditions();i++)this.isConditionUiComplete(i)&&t.push(this.createCondition(i));return t}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let t=this.getNumConditions();t<this.numAlwaysVisibleConditions;t++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(t){return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(i=>this.resetType(i)),this.eJoinOperatorsAnd.forEach((i,s)=>this.resetJoinOperatorAnd(i,s,this.joinOperatorId+s)),this.eJoinOperatorsOr.forEach((i,s)=>this.resetJoinOperatorOr(i,s,this.joinOperatorId+s)),this.joinOperatorId++,this.forEachInput(i=>this.resetInput(i)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,t||this.onUiChanged(),Ze.resolve()}resetType(t){const s=this.localeService.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");t.setValue(this.optionsFactory.getDefaultOption(),!0).setAriaLabel(s).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(t,i,s){this.resetJoinOperator(t,i,this.isDefaultOperator("AND"),this.translate("andCondition"),s)}resetJoinOperatorOr(t,i,s){this.resetJoinOperator(t,i,this.isDefaultOperator("OR"),this.translate("orCondition"),s)}resetJoinOperator(t,i,s,n,o){this.updateJoinOperatorDisabled(t.setValue(s,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${o}`).setLabel(n),i)}updateJoinOperatorsDisabled(){this.eJoinOperatorsAnd.forEach((t,i)=>this.updateJoinOperatorDisabled(t,i)),this.eJoinOperatorsOr.forEach((t,i)=>this.updateJoinOperatorDisabled(t,i))}updateJoinOperatorDisabled(t,i){t.setDisabled(this.isReadOnly()||i>0)}resetInput(t){this.setElementValue(t,null),this.setElementDisabled(t,this.isReadOnly())}setConditionIntoUi(t,i){const s=this.mapValuesFromModel(t);this.forEachInput((n,o,r,l)=>{r===i&&this.setElementValue(n,s[o]!=null?s[o]:null)})}setValueFromFloatingFilter(t){this.forEachInput((i,s,n,o)=>{this.setElementValue(i,s===0&&n===0?t:null,!0)})}isDefaultOperator(t){return t===this.defaultJoinOperator}addChangedListeners(t,i){this.isReadOnly()||(t.onValueChange(this.listener),this.forEachPositionInput(i,s=>{this.attachElementOnChange(s,this.listener)}))}individualConditionPasses(t,i){const s=this.getCellValue(t.node),n=this.mapValuesFromModel(i),o=this.optionsFactory.getCustomOption(i.type),r=this.evaluateCustomFilter(o,n,s);return r??(s==null?this.evaluateNullValue(i.type):this.evaluateNonNullValue(n,s,i,t))}evaluateCustomFilter(t,i,s){if(t==null)return;const{predicate:n}=t;if(n!=null&&!i.some(o=>o==null))return n(i,s)}isBlank(t){return t==null||typeof t=="string"&&t.trim().length===0}hasInvalidInputs(){return!1}};Wt.EMPTY="empty";Wt.BLANK="blank";Wt.NOT_BLANK="notBlank";Wt.EQUALS="equals";Wt.NOT_EQUAL="notEqual";Wt.LESS_THAN="lessThan";Wt.LESS_THAN_OR_EQUAL="lessThanOrEqual";Wt.GREATER_THAN="greaterThan";Wt.GREATER_THAN_OR_EQUAL="greaterThanOrEqual";Wt.IN_RANGE="inRange";Wt.CONTAINS="contains";Wt.NOT_CONTAINS="notContains";Wt.STARTS_WITH="startsWith";Wt.ENDS_WITH="endsWith";var ke=Wt,tt=class rt extends ke{setParams(t){super.setParams(t),this.scalarFilterParams=t}evaluateNullValue(t){switch(t){case rt.EQUALS:case rt.NOT_EQUAL:if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case rt.GREATER_THAN:case rt.GREATER_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case rt.LESS_THAN:case rt.LESS_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case rt.IN_RANGE:if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case rt.BLANK:return!0;case rt.NOT_BLANK:return!1}return!1}evaluateNonNullValue(t,i,s){const n=this.comparator(),o=t[0]!=null?n(t[0],i):0;switch(s.type){case rt.EQUALS:return o===0;case rt.NOT_EQUAL:return o!==0;case rt.GREATER_THAN:return o>0;case rt.GREATER_THAN_OR_EQUAL:return o>=0;case rt.LESS_THAN:return o<0;case rt.LESS_THAN_OR_EQUAL:return o<=0;case rt.IN_RANGE:{const r=n(t[1],i);return this.scalarFilterParams.inRangeInclusive?o>=0&&r<=0:o>0&&r<0}case rt.BLANK:return this.isBlank(i);case rt.NOT_BLANK:return!this.isBlank(i);default:return console.warn('AG Grid: Unexpected type of filter "'+s.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}}},Ev=1e3,Rv=1/0,yR=class extends Cm{constructor(e,t,i){super(t,i),this.dateFilterParams=e}conditionToString(e,t){const{type:i}=e,{numberOfInputs:s}=t||{},n=i==ke.IN_RANGE||s===2,o=Jt(e.dateFrom),r=Jt(e.dateTo),l=this.dateFilterParams.inRangeFloatingFilterDateFormat;if(n){const a=o!==null?Cr(o,l):"null",u=r!==null?Cr(r,l):"null";return`${a}-${u}`}return o!=null?Cr(o,l):`${i}`}updateParams(e){super.updateParams(e),this.dateFilterParams=e.dateFilterParams}},vm=class SR extends tt{constructor(){super("dateFilter"),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=Ev,this.maxValidYear=Rv,this.minValidDate=null,this.maxValidDate=null}afterGuiAttached(t){super.afterGuiAttached(t),this.dateConditionFromComps[0].afterGuiAttached(t)}mapValuesFromModel(t){const{dateFrom:i,dateTo:s,type:n}=t||{};return[i&&Jt(i)||null,s&&Jt(s)||null].slice(0,this.getNumberOfInputs(n))}comparator(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)}defaultComparator(t,i){const s=i;return i==null||s<t?-1:s>t?1:0}setParams(t){this.dateFilterParams=t,super.setParams(t);const i=(s,n)=>{if(t[s]!=null)if(isNaN(t[s]))console.warn(`AG Grid: DateFilter ${s} is not a number`);else return t[s]==null?n:Number(t[s]);return n};this.minValidYear=i("minValidYear",Ev),this.maxValidYear=i("maxValidYear",Rv),this.minValidYear>this.maxValidYear&&console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear"),t.minValidDate?this.minValidDate=t.minValidDate instanceof Date?t.minValidDate:Jt(t.minValidDate):this.minValidDate=null,t.maxValidDate?this.maxValidDate=t.maxValidDate instanceof Date?t.maxValidDate:Jt(t.maxValidDate):this.maxValidDate=null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&console.warn("AG Grid: DateFilter minValidDate should be <= maxValidDate"),this.filterModelFormatter=new yR(this.dateFilterParams,this.localeService,this.optionsFactory)}createDateCompWrapper(t){const i=new cR(this.getContext(),this.userComponentFactory,{onDateChanged:()=>this.onUiChanged(),filterParams:this.dateFilterParams},t);return this.addDestroyFunc(()=>i.destroy()),i}setElementValue(t,i){t.setDate(i)}setElementDisplayed(t,i){t.setDisplayed(i)}setElementDisabled(t,i){t.setDisabled(i)}getDefaultFilterOptions(){return SR.DEFAULT_FILTER_OPTIONS}createValueElement(){const i=this.gos.getDocument().createElement("div");return i.classList.add("ag-filter-body"),this.createFromToElement(i,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(i,this.eConditionPanelsTo,this.dateConditionToComps,"to"),i}createFromToElement(t,i,s,n){const r=this.gos.getDocument().createElement("div");r.classList.add(`ag-filter-${n}`),r.classList.add(`ag-filter-date-${n}`),i.push(r),t.appendChild(r),s.push(this.createDateCompWrapper(r))}removeValueElements(t,i){this.removeDateComps(this.dateConditionFromComps,t,i),this.removeDateComps(this.dateConditionToComps,t,i),this.removeItems(this.eConditionPanelsFrom,t,i),this.removeItems(this.eConditionPanelsTo,t,i)}removeDateComps(t,i,s){this.removeItems(t,i,s).forEach(o=>o.destroy())}isValidDateValue(t){if(t===null)return!1;if(this.minValidDate){if(t<this.minValidDate)return!1}else if(t.getUTCFullYear()<this.minValidYear)return!1;if(this.maxValidDate){if(t>this.maxValidDate)return!1}else if(t.getUTCFullYear()>this.maxValidYear)return!1;return!0}isConditionUiComplete(t){if(!super.isConditionUiComplete(t))return!1;let i=!0;return this.forEachInput((s,n,o,r)=>{o!==t||!i||n>=r||(i=i&&this.isValidDateValue(s.getDate()))}),i}areSimpleModelsEqual(t,i){return t.dateFrom===i.dateFrom&&t.dateTo===i.dateTo&&t.type===i.type}getFilterType(){return"date"}createCondition(t){const i=this.getConditionType(t),s={},n=this.getValues(t);return n.length>0&&(s.dateFrom=xi(n[0])),n.length>1&&(s.dateTo=xi(n[1])),$({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:i},s)}resetPlaceholder(){const t=this.localeService.getLocaleTextFunc(),i=this.translate("dateFormatOoo"),s=t("ariaFilterValue","Filter Value");this.forEachInput(n=>{n.setInputPlaceholder(i),n.setInputAriaLabel(s)})}getInputs(t){return t>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[t],this.dateConditionToComps[t]]}getValues(t){const i=[];return this.forEachPositionInput(t,(s,n,o,r)=>{n<r&&i.push(s.getDate())}),i}translate(t){return t===tt.LESS_THAN?super.translate("before"):t===tt.GREATER_THAN?super.translate("after"):super.translate(t)}getModelAsString(t){var i;return(i=this.filterModelFormatter.getModelAsString(t))!=null?i:""}};vm.DEFAULT_FILTER_OPTIONS=[tt.EQUALS,tt.NOT_EQUAL,tt.LESS_THAN,tt.GREATER_THAN,tt.IN_RANGE,tt.BLANK,tt.NOT_BLANK];c([f("userComponentFactory")],vm.prototype,"userComponentFactory",2);var ER=vm,wm=class extends Z{getDefaultDebounceMs(){return 0}destroy(){super.destroy()}isEventFromFloatingFilter(e){return e&&e.afterFloatingFilter}isEventFromDataChange(e){return e==null?void 0:e.afterDataChange}getLastType(){return this.lastType}isReadOnly(){return this.readOnly}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.getDefaultOption();return}const t=e.operator;let i;t?i=e.conditions[0]:i=e,this.lastType=i.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const i=e;return this.isTypeEditable(i.type)}init(e){this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){this.optionsFactory=new hR,this.optionsFactory.init(e.filterParams,this.getDefaultFilterOptions()),t||(this.lastType=this.optionsFactory.getDefaultOption()),this.readOnly=!!e.filterParams.readOnly;const i=this.isTypeEditable(this.optionsFactory.getDefaultOption());this.setEditable(i)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.setSimpleParams(e)}doesFilterHaveSingleInput(e){const t=this.optionsFactory.getCustomOption(e),{numberOfInputs:i}=t||{};return i==null||i==1}isTypeEditable(e){const t=[ke.IN_RANGE,ke.EMPTY,ke.BLANK,ke.NOT_BLANK];return!!e&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(e)&&t.indexOf(e)<0}getAriaLabel(e){const t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();return`${t} ${i("ariaFilterInput","Filter Input")}`}};c([f("columnModel")],wm.prototype,"columnModel",2);var Bc=class extends wm{constructor(){super(`
|
|
86
|
+
<div class="ag-floating-filter-input" role="presentation">
|
|
87
|
+
<ag-input-text-field ref="eReadOnlyText"></ag-input-text-field>
|
|
88
|
+
<div ref="eDateWrapper" style="display: flex;"></div>
|
|
89
|
+
</div>`)}getDefaultFilterOptions(){return ER.DEFAULT_FILTER_OPTIONS}init(e){super.init(e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent(),this.filterModelFormatter=new yR(this.filterParams,this.localeService,this.optionsFactory);const t=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.params=e,this.filterParams=e.filterParams,this.updateDateComponent(),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams}),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){if(e){const i=e;this.dateComp.setDate(Jt(i.dateFrom))}else this.dateComp.setDate(null);this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){le(this.eDateWrapper,e),le(this.eReadOnlyText.getGui(),!e)}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(super.setLastTypeFromModel(e),this.updateCompOnModelChange(e))}onDateChanged(){const e=this.dateComp.getDate(),t=xi(e);this.params.parentFilterInstance(i=>{if(i){const s=Jt(t);i.onFloatingFilterChanged(this.getLastType()||null,s)}})}getDateComponentParams(){const e=Bd.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:Nt(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams}}createDateComponent(){this.dateComp=new cR(this.getContext(),this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper,e=>{e.setInputAriaLabel(this.getAriaLabel(this.params))}),this.addDestroyFunc(()=>this.dateComp.destroy())}updateDateComponent(){const e=this.gos.addGridCommonParams(this.getDateComponentParams());this.dateComp.updateParams(e)}getFilterModelFormatter(){return this.filterModelFormatter}};c([f("userComponentFactory")],Bc.prototype,"userComponentFactory",2);c([N("eReadOnlyText")],Bc.prototype,"eReadOnlyText",2);c([N("eDateWrapper")],Bc.prototype,"eDateWrapper",2);var RR=class extends Z{constructor(){super(`
|
|
90
|
+
<div class="ag-filter-filter">
|
|
91
|
+
<ag-input-text-field class="ag-date-filter" ref="eDateInput"></ag-input-text-field>
|
|
92
|
+
</div>`)}destroy(){super.destroy()}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListener(t,"mousedown",()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus()}),this.addManagedListener(t,"input",i=>{i.target===this.gos.getActiveDomElement()&&(this.eDateInput.isDisabled()||this.params.onDateChanged())})}setParams(e){const t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&ws(),t.type=i?"date":"text";const{minValidYear:s,maxValidYear:n,minValidDate:o,maxValidDate:r}=e.filterParams||{};if(o&&s&&K("DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored."),r&&n&&K("DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored."),o&&r){const[l,a]=[o,r].map(u=>u instanceof Date?u:Jt(u));l&&a&&l.getTime()>a.getTime()&&K("DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")}o?o instanceof Date?t.min=Cr(o):t.min=o:s&&(t.min=`${s}-01-01`),r?r instanceof Date?t.max=Cr(r):t.max=r:n&&(t.max=`${n}-12-31`)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams(e)}getDate(){return Jt(this.eDateInput.getValue())}setDate(e){this.eDateInput.setValue(xi(e,!1))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){(!e||!e.suppressFocus)&&this.eDateInput.getInputElement().focus()}shouldUseBrowserDatePicker(e){return e.filterParams&&e.filterParams.browserDatePicker!=null?e.filterParams.browserDatePicker:xc()||Zf()||ws()&&Xf()>=14.1}};c([N("eDateInput")],RR.prototype,"eDateInput",2);var Mo=class extends Xi{constructor(e,t="ag-text-field",i="text"){super(e,t,i)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){return this.eInput.value!==e&&(this.eInput.value=b(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=i=>{_c(i)&&i.key&&!e.test(i.key)&&i.preventDefault()};this.addManagedListener(this.eInput,"keydown",t),this.addManagedListener(this.eInput,"paste",i=>{var s;const n=(s=i.clipboardData)==null?void 0:s.getData("text");n&&n.split("").some(o=>!e.test(o))&&i.preventDefault()})}},ym=class extends Mo{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct(),this.addManagedListener(this.eInput,"blur",()=>{const n=parseFloat(this.eInput.value),o=isNaN(n)?"":this.normalizeValue(n.toString());this.value!==o&&this.setValue(o)}),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this)),this.eInput.step="any";const{precision:e,min:t,max:i,step:s}=this.config;typeof e=="number"&&this.setPrecision(e),typeof t=="number"&&this.setMin(t),typeof i=="number"&&this.setMax(i),typeof s=="number"&&this.setStep(s)}onWheel(e){this.gos.getActiveDomElement()===this.eInput&&e.preventDefault()}normalizeValue(e){if(e==="")return"";this.precision!=null&&(e=this.adjustPrecision(e));const t=parseFloat(e);return this.min!=null&&t<this.min?e=this.min.toString():this.max!=null&&t>this.max&&(e=this.max.toString()),e}adjustPrecision(e,t){if(this.precision==null)return e;if(t){const s=parseFloat(e).toFixed(this.precision);return parseFloat(s).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=this.precision)return e;if(this.precision>0)return`${i[0]}.${i[1].slice(0,this.precision)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,vs(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,vs(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,vs(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(i=>super.setValue(i,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,i){if(b(i)){let s=this.isScientificNotation(i);if(s&&this.eInput.validity.valid)return e(i);if(!s){i=this.adjustPrecision(i);const n=this.normalizeValue(i);s=i!=n}if(s)return t(i)}return e(i)}getValue(){if(!this.eInput.validity.valid)return;const e=this.eInput.value;return this.isScientificNotation(e)?this.adjustPrecision(e,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},TR=class extends Cm{conditionToString(e,t){const{numberOfInputs:i}=t||{};return e.type==ke.IN_RANGE||i===2?`${this.formatValue(e.filter)}-${this.formatValue(e.filterTo)}`:e.filter!=null?this.formatValue(e.filter):`${e.type}`}};function mg(e){const{allowedCharPattern:t}=e??{};return t??null}var DR=class PR extends tt{constructor(){super("numberFilter"),this.eValuesFrom=[],this.eValuesTo=[]}refresh(t){return this.numberFilterParams.allowedCharPattern!==t.allowedCharPattern?!1:super.refresh(t)}mapValuesFromModel(t){const{filter:i,filterTo:s,type:n}=t||{};return[this.processValue(i),this.processValue(s)].slice(0,this.getNumberOfInputs(n))}getDefaultDebounceMs(){return 500}comparator(){return(t,i)=>t===i?0:t<i?1:-1}setParams(t){this.numberFilterParams=t,super.setParams(t),this.filterModelFormatter=new TR(this.localeService,this.optionsFactory,this.numberFilterParams.numberFormatter)}getDefaultFilterOptions(){return PR.DEFAULT_FILTER_OPTIONS}setElementValue(t,i,s){const n=!s&&this.numberFilterParams.numberFormatter?this.numberFilterParams.numberFormatter(i??null):i;super.setElementValue(t,n)}createValueElement(){const t=mg(this.numberFilterParams),i=document.createElement("div");return i.classList.add("ag-filter-body"),He(i,"presentation"),this.createFromToElement(i,this.eValuesFrom,"from",t),this.createFromToElement(i,this.eValuesTo,"to",t),i}createFromToElement(t,i,s,n){const o=this.createManagedBean(n?new Mo({allowedCharPattern:n}):new ym);o.addCssClass(`ag-filter-${s}`),o.addCssClass("ag-filter-filter"),i.push(o),t.appendChild(o.getGui())}removeValueElements(t,i){this.removeComponents(this.eValuesFrom,t,i),this.removeComponents(this.eValuesTo,t,i)}getValues(t){const i=[];return this.forEachPositionInput(t,(s,n,o,r)=>{n<r&&i.push(this.processValue(this.stringToFloat(s.getValue())))}),i}areSimpleModelsEqual(t,i){return t.filter===i.filter&&t.filterTo===i.filterTo&&t.type===i.type}getFilterType(){return"number"}processValue(t){return t==null||isNaN(t)?null:t}stringToFloat(t){if(typeof t=="number")return t;let i=Cs(t);return i!=null&&i.trim()===""&&(i=null),this.numberFilterParams.numberParser?this.numberFilterParams.numberParser(i):i==null||i.trim()==="-"?null:parseFloat(i)}createCondition(t){const i=this.getConditionType(t),s={filterType:this.getFilterType(),type:i},n=this.getValues(t);return n.length>0&&(s.filter=n[0]),n.length>1&&(s.filterTo=n[1]),s}getInputs(t){return t>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[t],this.eValuesTo[t]]}getModelAsString(t){var i;return(i=this.filterModelFormatter.getModelAsString(t))!=null?i:""}hasInvalidInputs(){let t=!1;return this.forEachInput(i=>{if(!i.getInputElement().validity.valid){t=!0;return}}),t}};DR.DEFAULT_FILTER_OPTIONS=[tt.EQUALS,tt.NOT_EQUAL,tt.GREATER_THAN,tt.GREATER_THAN_OR_EQUAL,tt.LESS_THAN,tt.LESS_THAN_OR_EQUAL,tt.IN_RANGE,tt.BLANK,tt.NOT_BLANK];var FR=DR,AR=class extends Cm{conditionToString(e,t){const{numberOfInputs:i}=t||{};return e.type==ke.IN_RANGE||i===2?`${e.filter}-${e.filterTo}`:e.filter!=null?`${e.filter}`:`${e.type}`}},Ki=class $o extends ke{constructor(){super("textFilter"),this.eValuesFrom=[],this.eValuesTo=[]}static trimInput(t){const i=t&&t.trim();return i===""?t:i}getDefaultDebounceMs(){return 500}setParams(t){this.textFilterParams=t,super.setParams(t),this.matcher=this.getTextMatcher(),this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?$o.DEFAULT_FORMATTER:$o.DEFAULT_LOWERCASE_FORMATTER),this.filterModelFormatter=new AR(this.localeService,this.optionsFactory)}getTextMatcher(){const t=this.textFilterParams.textCustomComparator;return t?(Q.warnOnce("textCustomComparator is deprecated, use textMatcher instead."),({filterOption:i,value:s,filterText:n})=>t(i,s,n)):this.textFilterParams.textMatcher||$o.DEFAULT_MATCHER}createCondition(t){const i=this.getConditionType(t),s={filterType:this.getFilterType(),type:i},n=this.getValuesWithSideEffects(t,!0);return n.length>0&&(s.filter=n[0]),n.length>1&&(s.filterTo=n[1]),s}getFilterType(){return"text"}areSimpleModelsEqual(t,i){return t.filter===i.filter&&t.filterTo===i.filterTo&&t.type===i.type}getInputs(t){return t>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[t],this.eValuesTo[t]]}getValues(t){return this.getValuesWithSideEffects(t,!1)}getValuesWithSideEffects(t,i){const s=[];return this.forEachPositionInput(t,(n,o,r,l)=>{var a;if(o<l){let u=Cs(n.getValue());i&&this.textFilterParams.trimInput&&(u=(a=$o.trimInput(u))!=null?a:null,n.setValue(u,!0)),s.push(u)}}),s}getDefaultFilterOptions(){return $o.DEFAULT_FILTER_OPTIONS}createValueElement(){const t=document.createElement("div");return t.classList.add("ag-filter-body"),He(t,"presentation"),this.createFromToElement(t,this.eValuesFrom,"from"),this.createFromToElement(t,this.eValuesTo,"to"),t}createFromToElement(t,i,s){const n=this.createManagedBean(new Mo);n.addCssClass(`ag-filter-${s}`),n.addCssClass("ag-filter-filter"),i.push(n),t.appendChild(n.getGui())}removeValueElements(t,i){this.removeComponents(this.eValuesFrom,t,i),this.removeComponents(this.eValuesTo,t,i)}mapValuesFromModel(t){const{filter:i,filterTo:s,type:n}=t||{};return[i||null,s||null].slice(0,this.getNumberOfInputs(n))}evaluateNullValue(t){const i=[ke.NOT_EQUAL,ke.NOT_CONTAINS,ke.BLANK];return t?i.indexOf(t)>=0:!1}evaluateNonNullValue(t,i,s,n){const o=t.map(v=>this.formatter(v))||[],r=this.formatter(i),{api:l,colDef:a,column:u,columnApi:d,context:h,textFormatter:p}=this.textFilterParams;if(s.type===ke.BLANK)return this.isBlank(i);if(s.type===ke.NOT_BLANK)return!this.isBlank(i);const C={api:l,colDef:a,column:u,columnApi:d,context:h,node:n.node,data:n.data,filterOption:s.type,value:r,textFormatter:p};return o.some(v=>this.matcher(Me($({},C),{filterText:v})))}getModelAsString(t){var i;return(i=this.filterModelFormatter.getModelAsString(t))!=null?i:""}};Ki.DEFAULT_FILTER_OPTIONS=[ke.CONTAINS,ke.NOT_CONTAINS,ke.EQUALS,ke.NOT_EQUAL,ke.STARTS_WITH,ke.ENDS_WITH,ke.BLANK,ke.NOT_BLANK];Ki.DEFAULT_FORMATTER=e=>e;Ki.DEFAULT_LOWERCASE_FORMATTER=e=>e==null?null:e.toString().toLowerCase();Ki.DEFAULT_MATCHER=({filterOption:e,value:t,filterText:i})=>{if(i==null)return!1;switch(e){case Ki.CONTAINS:return t.indexOf(i)>=0;case Ki.NOT_CONTAINS:return t.indexOf(i)<0;case Ki.EQUALS:return t===i;case Ki.NOT_EQUAL:return t!=i;case Ki.STARTS_WITH:return t.indexOf(i)===0;case Ki.ENDS_WITH:const s=t.lastIndexOf(i);return s>=0&&s===t.length-i.length;default:return!1}};var Sm=Ki,bR=class extends L{constructor(e){super(),this.params=e,this.valueChangedListener=()=>{}}setupGui(e){var t;this.eFloatingFilterTextInput=this.createManagedBean(new Mo((t=this.params)==null?void 0:t.config));const i=this.eFloatingFilterTextInput.getGui();e.appendChild(i),this.addManagedListener(i,"input",s=>this.valueChangedListener(s)),this.addManagedListener(i,"keydown",s=>this.valueChangedListener(s))}setEditable(e){this.eFloatingFilterTextInput.setDisabled(!e)}setAutoComplete(e){this.eFloatingFilterTextInput.setAutoComplete(e)}getValue(){return this.eFloatingFilterTextInput.getValue()}setValue(e,t){this.eFloatingFilterTextInput.setValue(e,t)}setValueChangedListener(e){this.valueChangedListener=e}setParams(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterTextInput.setInputAriaLabel(e)}},Wc=class extends wm{postConstruct(){this.setTemplate(`
|
|
93
|
+
<div class="ag-floating-filter-input" role="presentation" ref="eFloatingFilterInputContainer"></div>
|
|
94
|
+
`)}getDefaultDebounceMs(){return 500}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(e)))}init(e){this.setupFloatingFilterInputService(e),super.init(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.floatingFilterInputService=this.createFloatingFilterInputService(e),this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){var t;this.params=e;const i=(t=e.browserAutoComplete)!=null?t:!1;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:i}),this.applyActive=Bd.isUseApplyButton(this.params.filterParams),!this.isReadOnly()){const s=Bd.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),n=Nt(this.syncUpWithParentFilter.bind(this),s);this.floatingFilterInputService.setValueChangedListener(n)}}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const t=this.floatingFilterInputService.getValue();je(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(e),this.floatingFilterInputService.setValue(t,!0)}syncUpWithParentFilter(e){const t=e.key===D.ENTER;if(this.applyActive&&!t)return;let i=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(i=Sm.trimInput(i),this.floatingFilterInputService.setValue(i,!0)),this.params.parentFilterInstance(s=>{s&&s.onFloatingFilterChanged(this.getLastType()||null,i||null)})}setEditable(e){this.floatingFilterInputService.setEditable(e)}};c([N("eFloatingFilterInputContainer")],Wc.prototype,"eFloatingFilterInputContainer",2);c([M],Wc.prototype,"postConstruct",1);var KA=class extends L{constructor(){super(...arguments),this.valueChangedListener=()=>{},this.numberInputActive=!0}setupGui(e){this.eFloatingFilterNumberInput=this.createManagedBean(new ym),this.eFloatingFilterTextInput=this.createManagedBean(new Mo),this.eFloatingFilterTextInput.setDisabled(!0);const t=this.eFloatingFilterNumberInput.getGui(),i=this.eFloatingFilterTextInput.getGui();e.appendChild(t),e.appendChild(i),this.setupListeners(t,s=>this.valueChangedListener(s)),this.setupListeners(i,s=>this.valueChangedListener(s))}setEditable(e){this.numberInputActive=e,this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive),this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eFloatingFilterNumberInput.setAutoComplete(e),this.eFloatingFilterTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eFloatingFilterNumberInput:this.eFloatingFilterTextInput}setValueChangedListener(e){this.valueChangedListener=e}setupListeners(e,t){this.addManagedListener(e,"input",t),this.addManagedListener(e,"keydown",t)}setParams(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterNumberInput.setInputAriaLabel(e),this.eFloatingFilterTextInput.setInputAriaLabel(e)}},jA=class extends Wc{init(e){var t;super.init(e),this.filterModelFormatter=new TR(this.localeService,this.optionsFactory,(t=e.filterParams)==null?void 0:t.numberFormatter)}onParamsUpdated(e){this.refresh(e)}refresh(e){mg(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return FR.DEFAULT_FILTER_OPTIONS}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(e){return this.allowedCharPattern=mg(e.filterParams),this.allowedCharPattern?this.createManagedBean(new bR({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new KA)}},YA=class extends Wc{init(e){super.init(e),this.filterModelFormatter=new AR(this.localeService,this.optionsFactory)}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return Sm.DEFAULT_FILTER_OPTIONS}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(){return this.createManagedBean(new bR)}},Qa=class Tl{constructor(t,i=!1){this.destroyFuncs=[],this.touching=!1,this.eventService=new is,this.eElement=t,this.preventMouseClick=i;const s=this.onTouchStart.bind(this),n=this.onTouchMove.bind(this),o=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",s,{passive:!0}),this.eElement.addEventListener("touchmove",n,{passive:!0}),this.eElement.addEventListener("touchend",o,{passive:!1}),this.destroyFuncs.push(()=>{this.eElement.removeEventListener("touchstart",s,{passive:!0}),this.eElement.removeEventListener("touchmove",n,{passive:!0}),this.eElement.removeEventListener("touchend",o,{passive:!1})})}getActiveTouch(t){for(let i=0;i<t.length;i++)if(t[i].identifier===this.touchStart.identifier)return t[i];return null}addEventListener(t,i){this.eventService.addEventListener(t,i)}removeEventListener(t,i){this.eventService.removeEventListener(t,i)}onTouchStart(t){if(this.touching)return;this.touchStart=t.touches[0],this.touching=!0,this.moved=!1;const i=this.touchStart;window.setTimeout(()=>{const s=this.touchStart===i;if(this.touching&&s&&!this.moved){this.moved=!0;const n={type:Tl.EVENT_LONG_TAP,touchStart:this.touchStart,touchEvent:t};this.eventService.dispatchEvent(n)}},500)}onTouchMove(t){if(!this.touching)return;const i=this.getActiveTouch(t.touches);if(!i)return;!pm(i,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(t){if(this.touching){if(!this.moved){const i={type:Tl.EVENT_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(i),this.checkForDoubleTap()}this.preventMouseClick&&t.cancelable&&t.preventDefault(),this.touching=!1}}checkForDoubleTap(){const t=new Date().getTime();if(this.lastTapTime&&this.lastTapTime>0)if(t-this.lastTapTime>Tl.DOUBLE_TAP_MILLIS){const s={type:Tl.EVENT_DOUBLE_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(s),this.lastTapTime=null}else this.lastTapTime=t;else this.lastTapTime=t}destroy(){this.destroyFuncs.forEach(t=>t())}};Qa.EVENT_TAP="tap";Qa.EVENT_DOUBLE_TAP="doubleTap";Qa.EVENT_LONG_TAP="longTap";Qa.DOUBLE_TAP_MILLIS=500;var pt=Qa,$s=class LR extends Z{constructor(t){super(),t||this.setTemplate(LR.TEMPLATE)}attachCustomElements(t,i,s,n,o){this.eSortOrder=t,this.eSortAsc=i,this.eSortDesc=s,this.eSortMixed=n,this.eSortNone=o}setupSort(t,i=!1){this.column=t,this.suppressOrder=i,this.setupMultiSortIndicator(),!(!this.column.isSortable()&&!this.column.getColDef().showRowGroup)&&(this.addInIcon("sortAscending",this.eSortAsc,t),this.addInIcon("sortDescending",this.eSortDesc,t),this.addInIcon("sortUnSort",this.eSortNone,t),this.addManagedPropertyListener("unSortIcon",()=>this.updateIcons()),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,()=>this.updateIcons()),this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,()=>this.onSortChanged()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.onSortChanged()),this.onSortChanged())}addInIcon(t,i,s){if(i==null)return;const n=Oe(t,this.gos,s);n&&i.appendChild(n)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const t=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc){const i=t==="asc";le(this.eSortAsc,i,{skipAriaHidden:!0})}if(this.eSortDesc){const i=t==="desc";le(this.eSortDesc,i,{skipAriaHidden:!0})}if(this.eSortNone){const i=!this.column.getColDef().unSortIcon&&!this.gos.get("unSortIcon"),s=t==null;le(this.eSortNone,!i&&s,{skipAriaHidden:!0})}}setupMultiSortIndicator(){this.addInIcon("sortUnSort",this.eSortMixed,this.column);const t=this.column.getColDef().showRowGroup;this.gos.isColumnsSortingCoupledToGroup()&&t&&(this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,()=>this.updateMultiSortIndicator()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.updateMultiSortIndicator()),this.updateMultiSortIndicator())}updateMultiSortIndicator(){if(this.eSortMixed){const t=this.sortController.getDisplaySortForColumn(this.column)==="mixed";le(this.eSortMixed,t,{skipAriaHidden:!0})}}updateSortOrder(){var t;if(!this.eSortOrder)return;const i=this.sortController.getColumnsWithSortingOrdered(),s=(t=this.sortController.getDisplaySortIndexForColumn(this.column))!=null?t:-1,n=i.some(r=>{var l;return(l=this.sortController.getDisplaySortIndexForColumn(r))!=null?l:!1}),o=s>=0&&n;le(this.eSortOrder,o,{skipAriaHidden:!0}),s>=0?this.eSortOrder.textContent=(s+1).toString():je(this.eSortOrder)}};$s.TEMPLATE=`<span class="ag-sort-indicator-container">
|
|
95
|
+
<span ref="eSortOrder" class="ag-sort-indicator-icon ag-sort-order ag-hidden" aria-hidden="true"></span>
|
|
96
|
+
<span ref="eSortAsc" class="ag-sort-indicator-icon ag-sort-ascending-icon ag-hidden" aria-hidden="true"></span>
|
|
97
|
+
<span ref="eSortDesc" class="ag-sort-indicator-icon ag-sort-descending-icon ag-hidden" aria-hidden="true"></span>
|
|
98
|
+
<span ref="eSortMixed" class="ag-sort-indicator-icon ag-sort-mixed-icon ag-hidden" aria-hidden="true"></span>
|
|
99
|
+
<span ref="eSortNone" class="ag-sort-indicator-icon ag-sort-none-icon ag-hidden" aria-hidden="true"></span>
|
|
100
|
+
</span>`;c([N("eSortOrder")],$s.prototype,"eSortOrder",2);c([N("eSortAsc")],$s.prototype,"eSortAsc",2);c([N("eSortDesc")],$s.prototype,"eSortDesc",2);c([N("eSortMixed")],$s.prototype,"eSortMixed",2);c([N("eSortNone")],$s.prototype,"eSortNone",2);c([f("columnModel")],$s.prototype,"columnModel",2);c([f("sortController")],$s.prototype,"sortController",2);var Em=$s,Lt=class MR extends Z{constructor(){super(...arguments),this.lastMovingChanged=0}destroy(){super.destroy()}refresh(t){const i=this.params;return this.params=t,this.workOutTemplate()!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||this.workOutSort()!=this.currentSort||this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||i.enableFilterButton!=t.enableFilterButton||i.enableFilterIcon!=t.enableFilterIcon?!1:(this.setDisplayName(t),!0)}workOutTemplate(){var t;let i=(t=this.params.template)!=null?t:MR.TEMPLATE;return i=i&&i.trim?i.trim():i,i}init(t){this.params=t,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate),this.setupTap(),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setupFilterButton(),this.setDisplayName(t)}setDisplayName(t){if(this.currentDisplayName!=t.displayName){this.currentDisplayName=t.displayName;const i=Xe(this.currentDisplayName,!0);this.eText&&(this.eText.textContent=i)}}addInIcon(t,i,s){if(i==null)return;const n=Oe(t,this.gos,s);n&&i.appendChild(n)}setupTap(){const{gos:t}=this;if(t.get("suppressTouch"))return;const i=new pt(this.getGui(),!0),s=this.shouldSuppressMenuHide(),n=s&&b(this.eMenu),o=n?new pt(this.eMenu,!0):i;if(this.params.enableMenu){const r=n?"EVENT_TAP":"EVENT_LONG_TAP",l=a=>this.params.showColumnMenuAfterMouseClick(a.touchStart);this.addManagedListener(o,pt[r],l)}if(this.params.enableSorting){const r=l=>{var a,u;const d=l.touchStart.target;s&&((a=this.eMenu)!=null&&a.contains(d)||(u=this.eFilterButton)!=null&&u.contains(d))||this.sortController.progressSort(this.params.column,!1,"uiColumnSorted")};this.addManagedListener(i,pt.EVENT_TAP,r)}if(this.params.enableFilterButton){const r=new pt(this.eFilterButton,!0);this.addManagedListener(r,"tap",()=>this.params.showFilter(this.eFilterButton)),this.addDestroyFunc(()=>r.destroy())}this.addDestroyFunc(()=>i.destroy()),n&&this.addDestroyFunc(()=>o.destroy())}workOutShowMenu(){return this.params.enableMenu&&this.menuService.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return this.menuService.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){qi(this.eMenu),this.eMenu=void 0;return}const 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",()=>this.params.showColumnMenu(this.eMenu)),this.eMenu.classList.toggle("ag-header-menu-always-show",this.currentSuppressMenuHide)}onMenuKeyboardShortcut(t){var i,s,n,o;const{column:r}=this.params,l=this.menuService.isLegacyMenuEnabled();if(t&&!l){if(this.menuService.isFilterMenuInHeaderEnabled(r))return this.params.showFilter((s=(i=this.eFilterButton)!=null?i:this.eMenu)!=null?s:this.getGui()),!0}else if(this.params.enableMenu)return this.params.showColumnMenu((o=(n=this.eMenu)!=null?n:this.eFilterButton)!=null?o:this.getGui()),!0;return!1}workOutSort(){return this.params.enableSorting}setupSort(){if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.context.createBean(new Em(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDesc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),!this.currentSort)return;this.addManagedListener(this.params.column,Ee.EVENT_MOVING_CHANGED,()=>{this.lastMovingChanged=new Date().getTime()}),this.eLabel&&this.addManagedListener(this.eLabel,"click",i=>{const s=this.params.column.isMoving(),o=new Date().getTime()-this.lastMovingChanged<50;if(!(s||o)){const a=this.gos.get("multiSortKey")==="ctrl"?i.ctrlKey||i.metaKey:i.shiftKey;this.params.progressSort(a)}});const t=()=>{if(this.addOrRemoveCssClass("ag-header-cell-sorted-asc",this.params.column.isSortAscending()),this.addOrRemoveCssClass("ag-header-cell-sorted-desc",this.params.column.isSortDescending()),this.addOrRemoveCssClass("ag-header-cell-sorted-none",this.params.column.isSortNone()),this.params.column.getColDef().showRowGroup){const i=this.columnModel.getSourceColumnsForGroupColumn(this.params.column),n=!(i==null?void 0:i.every(o=>this.params.column.getSort()==o.getSort()));this.addOrRemoveCssClass("ag-header-cell-sorted-mixed",n)}};this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,t),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}setupFilterIcon(){this.eFilter&&this.configureFilter(this.params.enableFilterIcon,this.eFilter,this.onFilterChangedIcon.bind(this))}setupFilterButton(){if(!this.eFilterButton)return;this.configureFilter(this.params.enableFilterButton,this.eFilterButton,this.onFilterChangedButton.bind(this))?this.addManagedListener(this.eFilterButton,"click",()=>this.params.showFilter(this.eFilterButton)):this.eFilterButton=void 0}configureFilter(t,i,s){if(!t)return qi(i),!1;const{column:n}=this.params;return this.addInIcon("filter",i,n),this.addManagedListener(n,Ee.EVENT_FILTER_CHANGED,s),s(),!0}onFilterChangedIcon(){const t=this.params.column.isFilterActive();le(this.eFilter,t,{skipAriaHidden:!0})}onFilterChangedButton(){const t=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",t)}getAnchorElementForMenu(t){var i,s,n,o;return t?(s=(i=this.eFilterButton)!=null?i:this.eMenu)!=null?s:this.getGui():(o=(n=this.eMenu)!=null?n:this.eFilterButton)!=null?o:this.getGui()}};Lt.TEMPLATE=`<div class="ag-cell-label-container" role="presentation">
|
|
101
|
+
<span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>
|
|
102
|
+
<span ref="eFilterButton" class="ag-header-icon ag-header-cell-filter-button" aria-hidden="true"></span>
|
|
103
|
+
<div ref="eLabel" class="ag-header-cell-label" role="presentation">
|
|
104
|
+
<span ref="eText" class="ag-header-cell-text"></span>
|
|
105
|
+
<span ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>
|
|
106
|
+
<ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator>
|
|
107
|
+
</div>
|
|
108
|
+
</div>`;c([f("sortController")],Lt.prototype,"sortController",2);c([f("menuService")],Lt.prototype,"menuService",2);c([f("columnModel")],Lt.prototype,"columnModel",2);c([N("eFilter")],Lt.prototype,"eFilter",2);c([N("eFilterButton")],Lt.prototype,"eFilterButton",2);c([N("eSortIndicator")],Lt.prototype,"eSortIndicator",2);c([N("eMenu")],Lt.prototype,"eMenu",2);c([N("eLabel")],Lt.prototype,"eLabel",2);c([N("eText")],Lt.prototype,"eText",2);c([N("eSortOrder")],Lt.prototype,"eSortOrder",2);c([N("eSortAsc")],Lt.prototype,"eSortAsc",2);c([N("eSortDesc")],Lt.prototype,"eSortDesc",2);c([N("eSortMixed")],Lt.prototype,"eSortMixed",2);c([N("eSortNone")],Lt.prototype,"eSortNone",2);var Cg=Lt,qa=class IR extends Z{constructor(){super(IR.TEMPLATE)}destroy(){super.destroy()}init(t){this.params=t,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()}checkWarnings(){this.params.template&&K("A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)")}setupExpandIcons(){this.addInIcon("columnGroupOpened","agOpened"),this.addInIcon("columnGroupClosed","agClosed");const t=n=>{if(es(n))return;const o=!this.params.columnGroup.isExpanded();this.columnModel.setColumnGroupOpened(this.params.columnGroup.getProvidedColumnGroup(),o,"uiColumnExpanded")};this.addTouchAndClickListeners(this.eCloseIcon,t),this.addTouchAndClickListeners(this.eOpenIcon,t);const i=n=>{ss(n)};this.addManagedListener(this.eCloseIcon,"dblclick",i),this.addManagedListener(this.eOpenIcon,"dblclick",i),this.addManagedListener(this.getGui(),"dblclick",t),this.updateIconVisibility();const s=this.params.columnGroup.getProvidedColumnGroup();this.addManagedListener(s,Qe.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addManagedListener(s,Qe.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))}addTouchAndClickListeners(t,i){const s=new pt(t,!0);this.addManagedListener(s,pt.EVENT_TAP,i),this.addDestroyFunc(()=>s.destroy()),this.addManagedListener(t,"click",i)}updateIconVisibility(){if(this.params.columnGroup.isExpandable()){const i=this.params.columnGroup.isExpanded();le(this.eOpenIcon,i),le(this.eCloseIcon,!i)}else le(this.eOpenIcon,!1),le(this.eCloseIcon,!1)}addInIcon(t,i){const s=Oe(t,this.gos,null);s&&this.getRefElement(i).appendChild(s)}addGroupExpandIcon(){if(!this.params.columnGroup.isExpandable()){le(this.eOpenIcon,!1),le(this.eCloseIcon,!1);return}}setupLabel(){var t;const{displayName:i,columnGroup:s}=this.params;if(b(i)){const n=Xe(i,!0);this.getRefElement("agLabel").textContent=n}this.addOrRemoveCssClass("ag-sticky-label",!((t=s.getColGroupDef())!=null&&t.suppressStickyLabel))}};qa.TEMPLATE=`<div class="ag-header-group-cell-label" ref="agContainer" role="presentation">
|
|
109
|
+
<span ref="agLabel" class="ag-header-group-text" role="presentation"></span>
|
|
110
|
+
<span ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>
|
|
111
|
+
<span ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>
|
|
112
|
+
</div>`;c([f("columnModel")],qa.prototype,"columnModel",2);c([N("agOpened")],qa.prototype,"eOpenIcon",2);c([N("agClosed")],qa.prototype,"eCloseIcon",2);var QA=qa,Io=class extends Z{isPopup(){return!0}setParentComponent(e){e.addCssClass("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},Rm=class xR extends Io{constructor(){super(xR.TEMPLATE)}init(t){this.params=t,this.focusAfterAttached=t.cellStartedEdit,this.eTextArea.setMaxLength(t.maxLength||200).setCols(t.cols||60).setRows(t.rows||10),b(t.value,!0)&&this.eTextArea.setValue(t.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(t){const i=t.key;(i===D.LEFT||i===D.UP||i===D.RIGHT||i===D.DOWN||t.shiftKey&&i===D.ENTER)&&t.stopPropagation()}afterGuiAttached(){const t=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(t("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()}getValue(){const t=this.eTextArea.getValue();return!b(t)&&!b(this.params.value)?this.params.value:this.params.parseValue(t)}};Rm.TEMPLATE=`<div class="ag-large-text">
|
|
113
|
+
<ag-input-text-area ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>
|
|
114
|
+
</div>`;c([N("eTextArea")],Rm.prototype,"eTextArea",2);var qA=Rm,Tm=class extends Io{constructor(){super(`<div class="ag-cell-edit-wrapper">
|
|
115
|
+
<ag-select class="ag-cell-editor" ref="eSelect"></ag-select>
|
|
116
|
+
</div>`),this.startedByEnter=!1}init(e){this.focusAfterAttached=e.cellStartedEdit;const{eSelect:t,valueService:i,gos:s}=this,{values:n,value:o,eventKey:r}=e;if(q(n)){console.warn("AG Grid: no values found for select cellEditor");return}this.startedByEnter=r!=null?r===D.ENTER:!1;let l=!1;n.forEach(h=>{const p={value:h},C=i.formatValue(e.column,null,h),v=C!=null;p.text=v?C:h,t.addOption(p),l=l||o===h}),l?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:a,valueListMaxWidth:u,valueListMaxHeight:d}=e;a!=null&&t.setPickerGap(a),d!=null&&t.setPickerMaxHeight(d),u!=null&&t.setPickerMaxWidth(u),s.get("editType")!=="fullRow"&&this.addManagedListener(this.eSelect,Vc.EVENT_ITEM_SELECTED,()=>e.stopEditing())}afterGuiAttached(){this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eSelect.showPicker()})}focusIn(){this.eSelect.getFocusableElement().focus()}getValue(){return this.eSelect.getValue()}isPopup(){return!1}};c([f("valueService")],Tm.prototype,"valueService",2);c([N("eSelect")],Tm.prototype,"eSelect",2);var Xa=class extends Io{constructor(e){super(`
|
|
117
|
+
<div class="ag-cell-edit-wrapper">
|
|
118
|
+
${e.getTemplate()}
|
|
119
|
+
</div>`),this.cellEditorInput=e}init(e){this.params=e;const t=this.eInput;this.cellEditorInput.init(t,e);let i;if(e.cellStartedEdit){this.focusAfterAttached=!0;const s=e.eventKey;s===D.BACKSPACE||e.eventKey===D.DELETE?i="":s&&s.length===1?i=s:(i=this.cellEditorInput.getStartValue(),s!==D.F2&&(this.highlightAllOnFocus=!0))}else this.focusAfterAttached=!1,i=this.cellEditorInput.getStartValue();i!=null&&t.setStartValue(i),this.addManagedListener(t.getGui(),"keydown",s=>{const{key:n}=s;(n===D.PAGE_UP||n===D.PAGE_DOWN)&&s.preventDefault()})}afterGuiAttached(){var e,t;const i=this.localeService.getLocaleTextFunc(),s=this.eInput;if(s.setInputAriaLabel(i("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;ws()||s.getFocusableElement().focus();const n=s.getInputElement();this.highlightAllOnFocus?n.select():(t=(e=this.cellEditorInput).setCaret)==null||t.call(e)}focusIn(){const e=this.eInput,t=e.getFocusableElement(),i=e.getInputElement();t.focus(),i.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}};c([N("eInput")],Xa.prototype,"eInput",2);var XA=class{getTemplate(){return'<ag-input-text-field class="ag-cell-editor" ref="eInput"></ag-input-text-field>'}init(e,t){this.eInput=e,this.params=t,t.maxLength!=null&&e.setMaxLength(t.maxLength)}getValue(){const e=this.eInput.getValue();return!b(e)&&!b(this.params.value)?this.params.value:this.params.parseValue(e)}getStartValue(){return this.params.useFormatter||this.params.column.getColDef().refData?this.params.formatValue(this.params.value):this.params.value}setCaret(){const e=this.eInput.getValue(),t=b(e)&&e.length||0;t&&this.eInput.getInputElement().setSelectionRange(t,t)}},Tv=class extends Xa{constructor(){super(new XA)}},ZA="↑",JA="↓",NR=class extends Z{constructor(){super(),this.refreshCount=0;const e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-change-delta");const i=document.createElement("span");i.setAttribute("class","ag-value-change-value"),e.appendChild(t),e.appendChild(i),this.setTemplateFromElement(e)}init(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e,!0)}showDelta(e,t){const i=Math.abs(t),s=e.formatValue(i),n=b(s)?s:i,o=t>=0;o?this.eDelta.textContent=ZA+n:this.eDelta.textContent=JA+n,this.eDelta.classList.toggle("ag-value-change-delta-up",o),this.eDelta.classList.toggle("ag-value-change-delta-down",!o)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),je(this.eDelta)}refresh(e,t=!1){const i=e.value;if(i===this.lastValue||(b(e.valueFormatted)?this.eValue.textContent=e.valueFormatted:b(e.value)?this.eValue.textContent=i:je(this.eValue),this.filterManager.isSuppressFlashingCellsBecauseFiltering()))return!1;if(typeof i=="number"&&typeof this.lastValue=="number"){const s=i-this.lastValue;this.showDelta(e,s)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=i,!0}};c([f("filterManager")],NR.prototype,"filterManager",2);var _R=class extends Z{constructor(){super(),this.refreshCount=0;const e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-slide-current"),e.appendChild(t),this.setTemplateFromElement(e),this.eCurrent=this.queryForHtmlElement(".ag-value-slide-current")}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);const t=document.createElement("span");t.setAttribute("class","ag-value-slide-previous ag-value-slide-out"),this.ePrevious=t,this.ePrevious.textContent=this.eCurrent.textContent,this.getGui().insertBefore(this.ePrevious,this.eCurrent),this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let i=e.value;return q(i)&&(i=""),i===this.lastValue||this.filterManager.isSuppressFlashingCellsBecauseFiltering()?!1:(t||this.addSlideAnimation(),this.lastValue=i,b(e.valueFormatted)?this.eCurrent.textContent=e.valueFormatted:b(e.value)?this.eCurrent.textContent=i:je(this.eCurrent),!0)}};c([f("filterManager")],_R.prototype,"filterManager",2);var Ie=class Pe{constructor(t){this.rowIndex=null,this.key=null,this.childrenMapped={},this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=Pe.OBJECT_ID_SEQUENCE++,this.__autoHeights={},this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.selected=!1,this.beans=t}setData(t){this.setDataCommon(t,!1)}updateData(t){this.setDataCommon(t,!0)}setDataCommon(t,i){const s=this.data;this.data=t,this.beans.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(t,s,i);this.dispatchLocalEvent(n)}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(t,i,s){return{type:Pe.EVENT_DATA_CHANGED,node:this,oldData:i,newData:t,update:s}}createLocalRowEvent(t){return{type:t,node:this}}getRowIndexString(){return this.rowPinned==="top"?"t-"+this.rowIndex:this.rowPinned==="bottom"?"b-"+this.rowIndex:this.rowIndex.toString()}createDaemonNode(){const t=new Pe(this.beans);return t.id=this.id,t.data=this.data,t.__daemon=!0,t.selected=this.selected,t.level=this.level,t}setDataAndId(t,i){const s=b(this.id)?this.createDaemonNode():null,n=this.data;this.data=t,this.updateDataOnDetailNode(),this.setId(i),this.checkRowSelectable(),this.beans.selectionService.syncInRowNode(this,s);const o=this.createDataChangedEvent(t,n,!1);this.dispatchLocalEvent(o)}checkRowSelectable(){const t=this.beans.gos.get("isRowSelectable");this.setRowSelectable(t?t(this):!0)}setRowSelectable(t,i){if(this.selectable!==t){if(this.selectable=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Pe.EVENT_SELECTABLE_CHANGED)),i)return;if(this.beans.gos.get("groupSelectsChildren")){const n=this.calculateSelectedFromChildren();this.setSelectedParams({newValue:n??!1,source:"selectableChanged"});return}this.isSelected()&&!this.selectable&&this.setSelectedParams({newValue:!1,source:"selectableChanged"})}}setId(t){const i=this.beans.gos.getCallback("getRowId");if(i)if(this.data){const s=this.getGroupKeys(!0);this.id=i({data:this.data,parentKeys:s.length>0?s:void 0,level:this.level}),this.id!==null&&typeof this.id=="string"&&this.id.startsWith(Pe.ID_PREFIX_ROW_GROUP)&&console.error(`AG Grid: Row IDs cannot start with ${Pe.ID_PREFIX_ROW_GROUP}, this is a reserved prefix for AG Grid's row grouping feature.`),this.id!==null&&typeof this.id!="string"&&(this.id=""+this.id)}else this.id=void 0;else this.id=t}getGroupKeys(t=!1){const i=[];let s=this;for(t&&(s=s.parent);s&&s.level>=0;)i.push(s.key),s=s.parent;return i.reverse(),i}isPixelInRange(t){return!b(this.rowTop)||!b(this.rowHeight)?!1:t>=this.rowTop&&t<this.rowTop+this.rowHeight}setFirstChild(t){this.firstChild!==t&&(this.firstChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Pe.EVENT_FIRST_CHILD_CHANGED)))}setLastChild(t){this.lastChild!==t&&(this.lastChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Pe.EVENT_LAST_CHILD_CHANGED)))}setChildIndex(t){this.childIndex!==t&&(this.childIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Pe.EVENT_CHILD_INDEX_CHANGED)))}setRowTop(t){this.oldRowTop=this.rowTop,this.rowTop!==t&&(this.rowTop=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Pe.EVENT_TOP_CHANGED)),this.setDisplayed(t!==null))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setDisplayed(t){this.displayed!==t&&(this.displayed=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Pe.EVENT_DISPLAYED_CHANGED)))}setDragging(t){this.dragging!==t&&(this.dragging=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Pe.EVENT_DRAGGING_CHANGED)))}setHighlighted(t){t!==this.highlighted&&(this.highlighted=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Pe.EVENT_HIGHLIGHT_CHANGED)))}setHovered(t){this.hovered!==t&&(this.hovered=t)}isHovered(){return this.hovered}setAllChildrenCount(t){this.allChildrenCount!==t&&(this.allChildrenCount=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Pe.EVENT_ALL_CHILDREN_COUNT_CHANGED)))}setMaster(t){this.master!==t&&(this.master&&!t&&(this.expanded=!1),this.master=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Pe.EVENT_MASTER_CHANGED)))}setGroup(t){this.group!==t&&(this.group&&!t&&(this.expanded=!1),this.group=t,this.updateHasChildren(),this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Pe.EVENT_GROUP_CHANGED)))}setRowHeight(t,i=!1){this.rowHeight=t,this.rowHeightEstimated=i,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Pe.EVENT_HEIGHT_CHANGED))}setRowAutoHeight(t,i){this.__autoHeights||(this.__autoHeights={}),this.__autoHeights[i.getId()]=t,t!=null&&(this.checkAutoHeightsDebounced==null&&(this.checkAutoHeightsDebounced=Nt(this.checkAutoHeights.bind(this),1)),this.checkAutoHeightsDebounced())}checkAutoHeights(){let t=!1,i=!0,s=0;const n=this.__autoHeights;if(n==null||(this.beans.columnModel.getAllDisplayedAutoHeightCols().forEach(l=>{let a=n[l.getId()];if(a==null)if(this.beans.columnModel.isColSpanActive()){let u=[];switch(l.getPinned()){case"left":u=this.beans.columnModel.getDisplayedLeftColumnsForRow(this);break;case"right":u=this.beans.columnModel.getDisplayedRightColumnsForRow(this);break;case null:u=this.beans.columnModel.getViewportCenterColumnsForRow(this);break}if(u.includes(l)){t=!0;return}a=-1}else{t=!0;return}else i=!1;a>s&&(s=a)}),t)||((i||s<10)&&(s=this.beans.gos.getRowHeightForNode(this).height),s==this.rowHeight))return;this.setRowHeight(s);const r=this.beans.rowModel;r.onRowHeightChangedDebounced&&r.onRowHeightChangedDebounced()}setRowIndex(t){this.rowIndex!==t&&(this.rowIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Pe.EVENT_ROW_INDEX_CHANGED)))}setUiLevel(t){this.uiLevel!==t&&(this.uiLevel=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Pe.EVENT_UI_LEVEL_CHANGED)))}setExpanded(t,i,s){if(this.expanded===t)return;this.expanded=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Pe.EVENT_EXPANDED_CHANGED));const n=Object.assign({},this.createGlobalRowEvent(g.EVENT_ROW_GROUP_OPENED),{expanded:t,event:i||null});this.beans.rowNodeEventThrottle.dispatchExpanded(n,s),this.beans.rowRenderer.refreshCells({rowNodes:[this]})}createGlobalRowEvent(t){return this.beans.gos.addGridCommonParams({type:t,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned})}dispatchLocalEvent(t){this.eventService&&this.eventService.dispatchEvent(t)}setDataValue(t,i,s){const o=(()=>{var a;return typeof t!="string"?t:(a=this.beans.columnModel.getGridColumn(t))!=null?a:this.beans.columnModel.getPrimaryColumn(t)})(),r=this.getValueFromValueService(o);if(this.beans.gos.get("readOnlyEdit"))return this.dispatchEventForSaveValueReadOnly(o,r,i,s),!1;const l=this.beans.valueService.setValue(this,o,i,s);return this.dispatchCellChangedEvent(o,i,r),this.checkRowSelectable(),l}getValueFromValueService(t){var i,s;const n=this.leafGroup&&this.beans.columnModel.isPivotMode(),o=this.group&&this.expanded&&!this.footer&&!n;let r=!1;const l=(i=this.beans.gos.get("groupTotalRow"))!=null?i:this.beans.gos.get("groupIncludeFooter");typeof l!="function"?r=!!l:r=!!((s=this.beans.gos.getCallback("groupTotalRow"))!=null?s:this.beans.gos.getCallback("groupIncludeFooter"))({node:this});const a=this.beans.gos.get("groupSuppressBlankHeader"),u=o&&r&&!a;return this.beans.valueService.getValue(t,this,!1,u)}dispatchEventForSaveValueReadOnly(t,i,s,n){const o=this.beans.gos.addGridCommonParams({type:g.EVENT_CELL_EDIT_REQUEST,event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:t,colDef:t.getColDef(),data:this.data,node:this,oldValue:i,newValue:s,value:s,source:n});this.beans.eventService.dispatchEvent(o)}setGroupValue(t,i){const s=this.beans.columnModel.getGridColumn(t);q(this.groupData)&&(this.groupData={});const n=s.getColId(),o=this.groupData[n];o!==i&&(this.groupData[n]=i,this.dispatchCellChangedEvent(s,i,o))}setAggData(t){const i=this.aggData;if(this.aggData=t,this.eventService){const s=n=>{const o=this.aggData?this.aggData[n]:void 0,r=i?i[n]:void 0;if(o===r)return;const l=this.beans.columnModel.lookupGridColumn(n);l&&this.dispatchCellChangedEvent(l,o,r)};for(const n in this.aggData)s(n);for(const n in t)n in this.aggData||s(n)}}updateHasChildren(){let t=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;if(this.beans.gos.isRowModelType("serverSide")){const s=this.beans.gos.get("treeData"),n=this.beans.gos.get("isServerSideGroup");t=!this.stub&&!this.footer&&(s?!!n&&n(this.data):!!this.group)}t!==this.__hasChildren&&(this.__hasChildren=!!t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Pe.EVENT_HAS_CHILDREN_CHANGED)))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}isEmptyRowGroupNode(){return this.group&&Ai(this.childrenAfterGroup)}dispatchCellChangedEvent(t,i,s){const n={type:Pe.EVENT_CELL_CHANGED,node:this,column:t,newValue:i,oldValue:s};this.dispatchLocalEvent(n)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.footer?!1:this.beans.columnModel.isPivotMode()?this.hasChildren()&&!this.leafGroup:this.hasChildren()||!!this.master}isSelected(){return this.footer?this.sibling.isSelected():this.selected}depthFirstSearch(t){this.childrenAfterGroup&&this.childrenAfterGroup.forEach(i=>i.depthFirstSearch(t)),t(this)}calculateSelectedFromChildren(){var t;let i=!1,s=!1,n=!1;if(!((t=this.childrenAfterGroup)!=null&&t.length))return this.selectable?this.selected:null;for(let o=0;o<this.childrenAfterGroup.length;o++){const r=this.childrenAfterGroup[o];let l=r.isSelected();if(!r.selectable){const a=r.calculateSelectedFromChildren();if(a===null)continue;l=a}switch(l){case!0:i=!0;break;case!1:s=!0;break;default:n=!0;break}}if(!(n||i&&s))return i?!0:s?!1:this.selectable?this.selected:null}setSelectedInitialValue(t){this.selected=t}selectThisNode(t,i,s="api"){const n=!this.selectable&&t,o=this.selected===t;if(n||o)return!1;this.selected=t,this.eventService&&this.dispatchLocalEvent(this.createLocalRowEvent(Pe.EVENT_ROW_SELECTED));const r=this.sibling;r&&r.footer&&r.eventService&&r.dispatchLocalEvent(r.createLocalRowEvent(Pe.EVENT_ROW_SELECTED));const l=Me($({},this.createGlobalRowEvent(g.EVENT_ROW_SELECTED)),{event:i||null,source:s});return this.beans.eventService.dispatchEvent(l),!0}setSelected(t,i=!1,s="api"){if(typeof s=="boolean"){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.");return}this.setSelectedParams({newValue:t,clearSelection:i,rangeSelect:!1,source:s})}setSelectedParams(t){return this.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),0):this.id===void 0?(console.warn("AG Grid: cannot select node until id for node is known"),0):this.beans.selectionService.setNodesSelected(Me($({},t),{nodes:[this.footer?this.sibling:this]}))}isRowPinned(){return this.rowPinned==="top"||this.rowPinned==="bottom"}isParentOfNode(t){let i=this.parent;for(;i;){if(i===t)return!0;i=i.parent}return!1}addEventListener(t,i){var s,n;this.eventService||(this.eventService=new is),this.beans.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.eventService.setFrameworkOverrides(this.beans.frameworkOverrides),this.frameworkEventListenerService=new Bf(this.beans.frameworkOverrides));const o=(n=(s=this.frameworkEventListenerService)==null?void 0:s.wrap(i))!=null?n:i;this.eventService.addEventListener(t,o)}removeEventListener(t,i){var s,n;if(!this.eventService)return;const o=(n=(s=this.frameworkEventListenerService)==null?void 0:s.unwrap(i))!=null?n:i;this.eventService.removeEventListener(t,o),this.eventService.noRegisteredListenersExist()&&(this.eventService=null)}onMouseEnter(){this.dispatchLocalEvent(this.createLocalRowEvent(Pe.EVENT_MOUSE_ENTER))}onMouseLeave(){this.dispatchLocalEvent(this.createLocalRowEvent(Pe.EVENT_MOUSE_LEAVE))}getFirstChildOfFirstChild(t){let i=this,s=!0,n=!1,o=null;for(;s&&!n;){const r=i.parent;b(r)&&i.firstChild?r.rowGroupColumn===t&&(n=!0,o=r):s=!1,i=r}return n?o:null}isFullWidthCell(){if(this.detail)return!0;const t=this.beans.gos.getCallback("isFullWidthRow");return t?t({rowNode:this}):!1}getRoute(){if(this.key==null)return;const t=[];let i=this;for(;i.key!=null;)t.push(i.key),i=i.parent;return t.reverse()}createFooter(){if(this.sibling)return;const t=new Set(["eventService","__objectId","sticky"]),i=new Pe(this.beans);Object.keys(this).forEach(s=>{t.has(s)||(i[s]=this[s])}),i.footer=!0,i.setRowTop(null),i.setRowIndex(null),i.oldRowTop=null,i.id="rowGroupFooter_"+this.id,i.sibling=this,this.sibling=i}destroyFooter(){this.sibling&&(this.sibling.setRowTop(null),this.sibling.setRowIndex(null),this.sibling=void 0)}};Ie.ID_PREFIX_ROW_GROUP="row-group-";Ie.ID_PREFIX_TOP_PINNED="t-";Ie.ID_PREFIX_BOTTOM_PINNED="b-";Ie.OBJECT_ID_SEQUENCE=0;Ie.EVENT_ROW_SELECTED="rowSelected";Ie.EVENT_DATA_CHANGED="dataChanged";Ie.EVENT_CELL_CHANGED="cellChanged";Ie.EVENT_ALL_CHILDREN_COUNT_CHANGED="allChildrenCountChanged";Ie.EVENT_MASTER_CHANGED="masterChanged";Ie.EVENT_GROUP_CHANGED="groupChanged";Ie.EVENT_MOUSE_ENTER="mouseEnter";Ie.EVENT_MOUSE_LEAVE="mouseLeave";Ie.EVENT_HEIGHT_CHANGED="heightChanged";Ie.EVENT_TOP_CHANGED="topChanged";Ie.EVENT_DISPLAYED_CHANGED="displayedChanged";Ie.EVENT_FIRST_CHILD_CHANGED="firstChildChanged";Ie.EVENT_LAST_CHILD_CHANGED="lastChildChanged";Ie.EVENT_CHILD_INDEX_CHANGED="childIndexChanged";Ie.EVENT_ROW_INDEX_CHANGED="rowIndexChanged";Ie.EVENT_EXPANDED_CHANGED="expandedChanged";Ie.EVENT_HAS_CHILDREN_CHANGED="hasChildrenChanged";Ie.EVENT_SELECTABLE_CHANGED="selectableChanged";Ie.EVENT_UI_LEVEL_CHANGED="uiLevelChanged";Ie.EVENT_HIGHLIGHT_CHANGED="rowHighlightChanged";Ie.EVENT_DRAGGING_CHANGED="draggingChanged";var se=Ie,Uc=class extends Z{constructor(){super(`
|
|
120
|
+
<div class="ag-selection-checkbox" role="presentation">
|
|
121
|
+
<ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>
|
|
122
|
+
</div>`)}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.localeService.getLocaleTextFunc(),t=this.rowNode.isSelected(),i=Ic(e,t),[s,n]=this.rowNode.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],o=e(s,n);this.eCheckbox.setValue(t,!0),this.eCheckbox.setInputAriaLabel(`${o} (${i})`)}onClicked(e,t,i){return this.rowNode.setSelectedParams({newValue:e,rangeSelect:i.shiftKey,groupSelectsFiltered:t,event:i,source:"checkboxSelected"})}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListener(this.eCheckbox.getInputElement(),"dblclick",s=>{ss(s)}),this.addManagedListener(this.eCheckbox.getInputElement(),"click",s=>{ss(s);const n=this.gos.get("groupSelectsFiltered"),o=this.eCheckbox.getValue();this.shouldHandleIndeterminateState(o,n)?this.onClicked(!0,n,s||{})===0&&this.onClicked(!1,n,s):o?this.onClicked(!1,n,s):this.onClicked(!0,n,s||{})}),this.addManagedListener(this.rowNode,se.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.rowNode,se.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addManagedListener(this.rowNode,se.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this)),this.gos.get("isRowSelectable")||typeof this.getIsVisible()=="function"){const s=this.showOrHideSelect.bind(this);this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,s),this.addManagedListener(this.rowNode,se.EVENT_DATA_CHANGED,s),this.addManagedListener(this.rowNode,se.EVENT_CELL_CHANGED,s),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}shouldHandleIndeterminateState(e,t){return t&&(this.eCheckbox.getPreviousValue()===void 0||e===void 0)&&this.gos.isRowModelType("clientSide")}showOrHideSelect(){var e,t,i;let s=this.rowNode.selectable;const n=this.getIsVisible();if(s)if(typeof n=="function"){const r=(e=this.overrides)==null?void 0:e.callbackParams;if(!this.column)s=n(Me($({},r),{node:this.rowNode,data:this.rowNode.data}));else{const l=this.column.createColumnFunctionCallbackParams(this.rowNode);s=n($($({},r),l))}}else s=n??!1;if((t=this.column)==null?void 0:t.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!s),this.setVisible(!0),this.setDisplayed(!0);return}if((i=this.overrides)!=null&&i.removeHidden){this.setDisplayed(s);return}this.setVisible(s)}getIsVisible(){var e,t;return this.overrides?this.overrides.isVisible:(t=(e=this.column)==null?void 0:e.getColDef())==null?void 0:t.checkboxSelection}};c([N("eCheckbox")],Uc.prototype,"eCheckbox",2);c([M],Uc.prototype,"postConstruct",1);var OR=(e=>(e[e.Left=0]="Left",e[e.Right=1]="Right",e))(OR||{}),J=class extends L{constructor(){super(...arguments),this.dragSourceAndParamsList=[],this.dropTargets=[]}init(){this.ePinnedIcon=Di("columnMovePin",this.gos,null),this.eHideIcon=Di("columnMoveHide",this.gos,null),this.eMoveIcon=Di("columnMoveMove",this.gos,null),this.eLeftIcon=Di("columnMoveLeft",this.gos,null),this.eRightIcon=Di("columnMoveRight",this.gos,null),this.eGroupIcon=Di("columnMoveGroup",this.gos,null),this.eAggregateIcon=Di("columnMoveValue",this.gos,null),this.ePivotIcon=Di("columnMovePivot",this.gos,null),this.eDropNotAllowedIcon=Di("dropNotAllowed",this.gos,null)}addDragSource(e,t=!1){const i={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:i,dragSource:e}),this.dragService.addDragSource(i)}removeDragSource(e){const t=this.dragSourceAndParamsList.find(i=>i.dragSource===e);t&&(this.dragService.removeDragSource(t.params),Qt(this.dragSourceAndParamsList,t))}clearDragSourceParamsList(){this.dragSourceAndParamsList.forEach(e=>this.dragService.removeDragSource(e.params)),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.getDragItem(),this.lastDropTarget=void 0,this.dragSource.onDragStarted&&this.dragSource.onDragStarted(),this.createGhost()}onDragStop(e){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.onDragStopped&&this.dragSource.onDragStopped(),this.lastDropTarget&&this.lastDropTarget.onDragStop){const t=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(t)}this.lastDropTarget=null,this.dragItem=null,this.removeGhost()}onDragging(e,t){var i,s,n,o;const r=this.getHorizontalDirection(e),l=this.getVerticalDirection(e);this.eventLastTime=e,this.positionGhost(e);const a=this.dropTargets.filter(d=>this.isMouseOnDropTarget(e,d)),u=this.findCurrentDropTarget(e,a);if(u!==this.lastDropTarget)this.leaveLastTargetIfExists(e,r,l,t),this.lastDropTarget!==null&&u===null&&((s=(i=this.dragSource).onGridExit)==null||s.call(i,this.dragItem)),this.lastDropTarget===null&&u!==null&&((o=(n=this.dragSource).onGridEnter)==null||o.call(n,this.dragItem)),this.enterDragTargetIfExists(u,e,r,l,t),this.lastDropTarget=u;else if(u&&u.onDragging){const d=this.createDropTargetEvent(u,e,r,l,t);u.onDragging(d)}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,i=[[e.getContainer()]];return t?i.concat(t):i}allContainersIntersect(e,t){for(const i of t){const s=i.getBoundingClientRect();if(s.width===0||s.height===0)return!1;const n=e.clientX>=s.left&&e.clientX<s.right,o=e.clientY>=s.top&&e.clientY<s.bottom;if(!n||!o)return!1}return!0}isMouseOnDropTarget(e,t){const i=this.getAllContainersFromDropTarget(t);let s=!1;for(const n of i)if(this.allContainersIntersect(e,n)){s=!0;break}return t.targetContainsSource&&!t.getContainer().contains(this.dragSource.eElement)?!1:s&&t.isInterestedIn(this.dragSource.type,this.dragSource.eElement)}findCurrentDropTarget(e,t){const i=t.length;if(i===0)return null;if(i===1)return t[0];const n=this.gos.getRootNode().elementsFromPoint(e.clientX,e.clientY);for(const o of n)for(const r of t)if(cE(this.getAllContainersFromDropTarget(r)).indexOf(o)!==-1)return r;return null}enterDragTargetIfExists(e,t,i,s,n){if(e){if(e.onDragEnter){const o=this.createDropTargetEvent(e,t,i,s,n);e.onDragEnter(o)}this.setGhostIcon(e.getIconName?e.getIconName():null)}}leaveLastTargetIfExists(e,t,i,s){if(this.lastDropTarget){if(this.lastDropTarget.onDragLeave){const n=this.createDropTargetEvent(this.lastDropTarget,e,t,i,s);this.lastDropTarget.onDragLeave(n)}this.setGhostIcon(null)}}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(i=>i.external).find(i=>i.getContainer()===e.getContainer())||null}getHorizontalDirection(e){const t=this.eventLastTime&&this.eventLastTime.clientX,i=e.clientX;return t===i?null:t>i?0:1}getVerticalDirection(e){const t=this.eventLastTime&&this.eventLastTime.clientY,i=e.clientY;return t===i?null:t>i?0:1}createDropTargetEvent(e,t,i,s,n){const o=e.getContainer(),r=o.getBoundingClientRect(),{gridApi:l,columnApi:a,dragItem:u,dragSource:d}=this,h=t.clientX-r.left,p=t.clientY-r.top;return{event:t,x:h,y:p,vDirection:s,hDirection:i,dragSource:d,fromNudge:n,dragItem:u,api:l,columnApi:a,dropZoneTarget:o}}positionGhost(e){const t=this.eGhost;if(!t)return;const s=t.getBoundingClientRect().height,n=VE()-2,o=HE()-2,r=rm(t.offsetParent),{clientY:l,clientX:a}=e;let u=l-r.top-s/2,d=a-r.left-10;const h=this.gos.getDocument(),p=h.defaultView||window,C=p.pageYOffset||h.documentElement.scrollTop,v=p.pageXOffset||h.documentElement.scrollLeft;n>0&&d+t.clientWidth>n+v&&(d=n+v-t.clientWidth),d<0&&(d=0),o>0&&u+t.clientHeight>o+C&&(u=o+C-t.clientHeight),u<0&&(u=0),t.style.left=`${d}px`,t.style.top=`${u}px`}removeGhost(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null}createGhost(){this.eGhost=ei(J.GHOST_TEMPLATE),this.mouseEventService.stampTopLevelGridCompWithGridInstance(this.eGhost);const{theme:e}=this.environment.getTheme();e&&this.eGhost.classList.add(e),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null);const t=this.eGhost.querySelector(".ag-dnd-ghost-label");let i=this.dragSource.dragItemName;Pc(i)&&(i=i()),t.innerHTML=Xe(i)||"",this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";const s=this.gos.getDocument();let n=null,o=null;try{n=s.fullscreenElement}catch{}finally{n||(n=this.gos.getRootNode());const r=n.querySelector("body");r?o=r:n instanceof ShadowRoot?o=n:n instanceof Document?o=n==null?void 0:n.documentElement:o=n}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")}setGhostIcon(e,t=!1){je(this.eGhostIcon);let i=null;switch(e||(e=this.dragSource.getDefaultIconName?this.dragSource.getDefaultIconName():J.ICON_NOT_ALLOWED),e){case J.ICON_PINNED:i=this.ePinnedIcon;break;case J.ICON_MOVE:i=this.eMoveIcon;break;case J.ICON_LEFT:i=this.eLeftIcon;break;case J.ICON_RIGHT:i=this.eRightIcon;break;case J.ICON_GROUP:i=this.eGroupIcon;break;case J.ICON_AGGREGATE:i=this.eAggregateIcon;break;case J.ICON_PIVOT:i=this.ePivotIcon;break;case J.ICON_NOT_ALLOWED:i=this.eDropNotAllowedIcon;break;case J.ICON_HIDE:i=this.eHideIcon;break}this.eGhostIcon.classList.toggle("ag-shake-left-to-right",t),!(i===this.eHideIcon&&this.gos.get("suppressDragLeaveHidesColumns"))&&i&&this.eGhostIcon.appendChild(i)}};J.ICON_PINNED="pinned";J.ICON_MOVE="move";J.ICON_LEFT="left";J.ICON_RIGHT="right";J.ICON_GROUP="group";J.ICON_AGGREGATE="aggregate";J.ICON_PIVOT="pivot";J.ICON_NOT_ALLOWED="notAllowed";J.ICON_HIDE="hide";J.GHOST_TEMPLATE=`<div class="ag-dnd-ghost ag-unselectable">
|
|
123
|
+
<span class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>
|
|
124
|
+
<div class="ag-dnd-ghost-label"></div>
|
|
125
|
+
</div>`;c([f("dragService")],J.prototype,"dragService",2);c([f("mouseEventService")],J.prototype,"mouseEventService",2);c([f("columnApi")],J.prototype,"columnApi",2);c([f("gridApi")],J.prototype,"gridApi",2);c([M],J.prototype,"init",1);c([Bt],J.prototype,"clearDragSourceParamsList",1);J=c([H("dragAndDropService")],J);var Co=class extends Z{constructor(e,t,i,s,n,o){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=s,this.dragStartPixels=n,this.suppressVisibilityChange=o,this.dragSource=null}isCustomGui(){return this.customGui!=null}postConstruct(){if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate('<div class="ag-drag-handle ag-row-drag" aria-hidden="true"></div>'),this.getGui().appendChild(Oe("rowDrag",this.gos,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){const e=this.gos.get("rowDragManaged")?new VR(this,this.beans,this.rowNode,this.column):new kR(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)}}setDragElement(e,t){this.setTemplateFromElement(e),this.addDragSource(t)}getSelectedNodes(){if(!this.gos.get("rowDragMultiRow"))return[this.rowNode];const t=this.beans.selectionService.getSelectedNodes();return t.indexOf(this.rowNode)!==-1?t:[this.rowNode]}checkCompatibility(){const e=this.gos.get("rowDragManaged");this.gos.get("treeData")&&e&&K("If using row drag with tree data, you cannot have rowDragManaged=true")}getDragItem(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(e){if(e){const t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gos.get("rowDragText")}addDragSource(e=4){this.dragSource&&this.removeDragSource();const t=this.localeService.getLocaleTextFunc();this.dragSource={type:2,eElement:this.getGui(),dragItemName:()=>{var i;const s=this.getDragItem(),n=((i=s.rowNodes)==null?void 0:i.length)||1,o=this.getRowDragText(this.column);return o?o(s,n):n===1?this.cellValueFn():`${n} ${t("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)}removeDragSource(){this.dragSource&&this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null}};c([f("beans")],Co.prototype,"beans",2);c([M],Co.prototype,"postConstruct",1);c([Bt],Co.prototype,"removeDragSource",1);var GR=class extends L{constructor(e,t,i){super(),this.parent=e,this.rowNode=t,this.column=i}setDisplayedOrVisible(e){const t={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,t);else{let i=!0,s=!1;this.column&&(i=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),s=Pc(this.column.getColDef().rowDrag)),s?(this.parent.setDisplayed(!0,t),this.parent.setVisible(i,t)):(this.parent.setDisplayed(i,t),this.parent.setVisible(!0,t))}}},kR=class extends GR{constructor(e,t,i,s){super(e,i,s),this.beans=t}postConstruct(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addManagedListener(this.rowNode,se.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,se.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,se.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const e=this.gos.get("suppressRowDrag");this.setDisplayedOrVisible(e)}};c([M],kR.prototype,"postConstruct",1);var VR=class extends GR{constructor(e,t,i,s){super(e,i,s),this.beans=t}postConstruct(){this.addManagedListener(this.beans.eventService,g.EVENT_SORT_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_FILTER_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,se.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,se.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const t=this.beans.ctrlsService.getGridBodyCtrl().getRowDragFeature(),i=t&&t.shouldPreventRowMove(),s=this.gos.get("suppressRowDrag"),n=this.beans.dragAndDropService.hasExternalDropZones(),o=i&&!n||s;this.setDisplayedOrVisible(o)}};c([M],VR.prototype,"postConstruct",1);var xo=class extends L{init(e,t,i,s,n,o,r){var l,a,u,d;this.params=r,this.eGui=t,this.eCheckbox=i,this.eExpanded=s,this.eContracted=n,this.comp=e,this.compClass=o;const{node:h,value:p,colDef:C}=r,v=this.isTopLevelFooter();if(!v){if(this.isEmbeddedRowMismatch())return;if(h.footer&&this.gos.get("groupHideOpenParents")){const R=C&&C.showRowGroup,w=h.rowGroupColumn&&h.rowGroupColumn.getColId();if(R!==w)return}}if(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),!v){const y=r.node.footer&&r.node.rowGroupIndex===this.columnModel.getRowGroupColumns().findIndex(A=>{var F;return A.getColId()===((F=r.colDef)==null?void 0:F.showRowGroup)}),w=this.gos.get("groupDisplayType")!="multipleColumns"||this.gos.get("treeData")||this.gos.get("showOpenedGroup")&&!r.node.footer&&(!r.node.group||r.node.rowGroupIndex!=null&&r.node.rowGroupIndex>this.columnModel.getRowGroupColumns().findIndex(A=>{var F;return A.getColId()===((F=r.colDef)==null?void 0:F.showRowGroup)})),m=!h.group&&(((l=this.params.colDef)==null?void 0:l.field)||((a=this.params.colDef)==null?void 0:a.valueGetter)),E=this.isExpandable(),T=this.columnModel.isPivotMode()&&h.leafGroup&&((u=h.rowGroupColumn)==null?void 0:u.getColId())===((d=r.column)==null?void 0:d.getColDef().showRowGroup);if(!this.showingValueForOpenedParent&&!E&&!m&&!w&&!y&&!T)return}this.addExpandAndContract(),this.addFullWidthRowDraggerIfNeeded(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded()}getCellAriaRole(){var e,t;const i=(e=this.params.colDef)==null?void 0:e.cellAriaRole,s=(t=this.params.column)==null?void 0:t.getColDef().cellAriaRole;return i||s||"gridcell"}destroy(){super.destroy(),this.expandListener=null}refreshAriaExpanded(){const{node:e,eGridCell:t}=this.params;if(this.expandListener&&(this.expandListener=this.expandListener()),!this.isExpandable()){LE(t);return}const i=()=>{Gs(t,!!e.expanded)};this.expandListener=this.addManagedListener(e,se.EVENT_EXPANDED_CHANGED,i)||null,i()}isTopLevelFooter(){if(!this.gos.getGrandTotalRow()||this.params.value!=null||this.params.node.level!=-1)return!1;const t=this.params.colDef;if(t==null||t.showRowGroup===!0)return!0;const s=this.columnModel.getRowGroupColumns();return!s||s.length===0?!0:s[0].getId()===t.showRowGroup}isEmbeddedRowMismatch(){if(!this.params.fullWidth||!this.gos.get("embedFullWidthRows"))return!1;const e=this.params.pinned==="left",t=this.params.pinned==="right",i=!e&&!t;return this.gos.get("enableRtl")?this.columnModel.isPinningLeft()?!t:!i:this.columnModel.isPinningLeft()?!e:!i}findDisplayedGroupNode(){const e=this.params.column,t=this.params.node;if(this.showingValueForOpenedParent){let i=t.parent;for(;i!=null;){if(i.rowGroupColumn&&e.isRowGroupDisplayed(i.rowGroupColumn.getId())){this.displayedGroupNode=i;break}i=i.parent}}q(this.displayedGroupNode)&&(this.displayedGroupNode=t)}setupShowingValueForOpenedParent(){const e=this.params.node,t=this.params.column;if(!this.gos.get("groupHideOpenParents")){this.showingValueForOpenedParent=!1;return}if(!e.groupData){this.showingValueForOpenedParent=!1;return}if(e.rowGroupColumn!=null){const n=e.rowGroupColumn.getId();if(t.isRowGroupDisplayed(n)){this.showingValueForOpenedParent=!1;return}}const s=e.groupData[t.getId()]!=null;this.showingValueForOpenedParent=s}addValueElement(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())}addGroupValue(){var e;const t=this.adjustParamsWithDetailsFromRelatedColumn(),i=this.getInnerCompDetails(t),{valueFormatted:s,value:n}=t;let o=s;if(o==null){const r=this.displayedGroupNode.rowGroupColumn&&((e=this.params.column)==null?void 0:e.isRowGroupDisplayed(this.displayedGroupNode.rowGroupColumn.getId()));this.displayedGroupNode.key===""&&this.displayedGroupNode.group&&r?o=this.localeService.getLocaleTextFunc()("blanks","(Blanks)"):o=n??null}this.comp.setInnerRenderer(i,o)}adjustParamsWithDetailsFromRelatedColumn(){const e=this.displayedGroupNode.rowGroupColumn,t=this.params.column;if(!e)return this.params;if(t!=null&&!t.isRowGroupDisplayed(e.getId()))return this.params;const s=this.params,{value:n,node:o}=this.params,r=this.valueService.formatValue(e,o,n);return Me($({},s),{valueFormatted:r})}addFooterValue(){let e=this.params.totalValueGetter;if(!e){const s=this.params.footerValueGetter;s&&(e=s,K("As of v31.3, footerValueGetter is deprecated. Use `totalValueGetter` instead."))}let t="";if(e){const s=Vf(this.params);s.value=this.params.value,typeof e=="function"?t=e(s):typeof e=="string"?t=this.expressionService.evaluate(e,s):console.warn("AG Grid: footerValueGetter should be either a function or a string (expression)")}else t=this.localeService.getLocaleTextFunc()("footerTotal","Total")+" "+(this.params.value!=null?this.params.value:"");const i=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(i,t)}getInnerCompDetails(e){if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gos.get("groupRowRendererParams"),e);const t=this.userComponentFactory.getInnerRendererDetails(e,e),i=r=>r&&r.componentClass==this.compClass;if(t&&!i(t))return t;const s=this.displayedGroupNode.rowGroupColumn,n=s?s.getColDef():void 0;if(!n)return;const o=this.userComponentFactory.getCellRendererDetails(n,e);if(o&&!i(o))return o;if(i(o)&&n.cellRendererParams&&n.cellRendererParams.innerRenderer)return this.userComponentFactory.getInnerRendererDetails(n.cellRendererParams,e)}addChildCount(){this.params.suppressCount||(this.addManagedListener(this.displayedGroupNode,se.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this)),this.updateChildCount())}updateChildCount(){const e=this.displayedGroupNode.allChildrenCount,s=this.isShowRowGroupForThisRow()&&e!=null&&e>=0?`(${e})`:"";this.comp.setChildCount(s)}isShowRowGroupForThisRow(){if(this.gos.get("treeData"))return!0;const e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;const t=this.params.column;return t==null||t.isRowGroupDisplayed(e.getId())}addExpandAndContract(){var e;const t=this.params,i=Oe("groupExpanded",this.gos,null),s=Oe("groupContracted",this.gos,null);i&&this.eExpanded.appendChild(i),s&&this.eContracted.appendChild(s);const n=t.eGridCell;!(((e=this.params.column)==null?void 0:e.isCellEditable(t.node))&&this.gos.get("enableGroupEdit"))&&this.isExpandable()&&!t.suppressDoubleClickExpand&&this.addManagedListener(n,"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(n,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(t.node,se.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this)),this.showExpandAndContractIcons();const r=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListener(this.displayedGroupNode,se.EVENT_ALL_CHILDREN_COUNT_CHANGED,r),this.addManagedListener(this.displayedGroupNode,se.EVENT_MASTER_CHANGED,r),this.addManagedListener(this.displayedGroupNode,se.EVENT_GROUP_CHANGED,r),this.addManagedListener(this.displayedGroupNode,se.EVENT_HAS_CHILDREN_CHANGED,r)}onExpandClicked(e){es(e)||(ss(e),this.onExpandOrContract(e))}onExpandOrContract(e){const t=this.displayedGroupNode,i=!t.expanded;!i&&t.sticky&&this.scrollToStickyNode(t),t.setExpanded(i,e)}scrollToStickyNode(e){this.ctrlsService.getGridBodyCtrl().getScrollFeature().setVerticalScrollPosition(e.rowTop-e.stickyRowTop)}isExpandable(){if(this.showingValueForOpenedParent)return!0;const e=this.displayedGroupNode,t=this.columnModel.isPivotMode()&&e.leafGroup;if(!(e.isExpandable()&&!e.footer&&!t))return!1;const s=this.params.column;return s!=null&&typeof s.getColDef().showRowGroup=="string"?this.isShowRowGroupForThisRow():!0}showExpandAndContractIcons(){const{params:e,displayedGroupNode:t,columnModel:i}=this,{node:s}=e,n=this.isExpandable();if(n){const u=this.showingValueForOpenedParent?!0:s.expanded;this.comp.setExpandedDisplayed(u),this.comp.setContractedDisplayed(!u)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);const o=i.isPivotMode(),r=o&&t.leafGroup,l=n&&!r,a=s.footer&&s.level===-1;this.comp.addOrRemoveCssClass("ag-cell-expandable",l),this.comp.addOrRemoveCssClass("ag-row-group",l),o?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",r):a||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!l)}onRowNodeIsExpandableChanged(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()}setupIndent(){const e=this.params.node;this.params.suppressPadding||(this.addManagedListener(e,se.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this)),this.setIndent())}setIndent(){if(this.gos.get("groupHideOpenParents"))return;const e=this.params,t=e.node,i=!!e.colDef,s=this.gos.get("treeData"),o=!i||s||e.colDef.showRowGroup===!0?t.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+o,this.comp.addOrRemoveCssClass(this.indentClass,!0)}addFullWidthRowDraggerIfNeeded(){if(!this.params.fullWidth||!this.params.rowDrag)return;const e=new Co(()=>this.params.value,this.params.node);this.createManagedBean(e,this.context),this.eGui.insertAdjacentElement("afterbegin",e.getGui())}isUserWantsSelected(){const e=this.params.checkbox;return typeof e=="function"||e===!0}addCheckboxIfNeeded(){const e=this.displayedGroupNode,t=this.isUserWantsSelected()&&!e.footer&&!e.rowPinned&&!e.detail;if(t){const i=new Uc;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(()=>this.getContext().destroyBean(i))}this.comp.setCheckboxVisible(t)}onKeyDown(e){!(e.key===D.ENTER)||this.params.suppressEnterExpand||this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e)}onCellDblClicked(e){if(es(e))return;Gd(this.eExpanded,e)||Gd(this.eContracted,e)||this.onExpandOrContract(e)}};c([f("expressionService")],xo.prototype,"expressionService",2);c([f("valueService")],xo.prototype,"valueService",2);c([f("columnModel")],xo.prototype,"columnModel",2);c([f("userComponentFactory")],xo.prototype,"userComponentFactory",2);c([f("ctrlsService")],xo.prototype,"ctrlsService",2);var No=class HR extends Z{constructor(){super(HR.TEMPLATE)}init(t){const i={setInnerRenderer:(r,l)=>this.setRenderDetails(r,l),setChildCount:r=>this.eChildCount.textContent=r,addOrRemoveCssClass:(r,l)=>this.addOrRemoveCssClass(r,l),setContractedDisplayed:r=>le(this.eContracted,r),setExpandedDisplayed:r=>le(this.eExpanded,r),setCheckboxVisible:r=>this.eCheckbox.classList.toggle("ag-invisible",!r)},s=this.createManagedBean(new xo),n=!t.colDef,o=this.getGui();s.init(i,o,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,t),n&&He(o,s.getCellAriaRole())}setRenderDetails(t,i){if(t){const s=t.newAgStackInstance();if(!s)return;s.then(n=>{if(!n)return;const o=()=>this.context.destroyBean(n);this.isAlive()?(this.eValue.appendChild(n.getGui()),this.addDestroyFunc(o)):o()})}else this.eValue.innerText=i}destroy(){this.getContext().destroyBean(this.innerCellRenderer),super.destroy()}refresh(){return!1}};No.TEMPLATE=`<span class="ag-cell-wrapper">
|
|
126
|
+
<span class="ag-group-expanded" ref="eExpanded"></span>
|
|
127
|
+
<span class="ag-group-contracted" ref="eContracted"></span>
|
|
128
|
+
<span class="ag-group-checkbox ag-invisible" ref="eCheckbox"></span>
|
|
129
|
+
<span class="ag-group-value" ref="eValue"></span>
|
|
130
|
+
<span class="ag-group-child-count" ref="eChildCount"></span>
|
|
131
|
+
</span>`;c([N("eExpanded")],No.prototype,"eExpanded",2);c([N("eContracted")],No.prototype,"eContracted",2);c([N("eCheckbox")],No.prototype,"eCheckbox",2);c([N("eValue")],No.prototype,"eValue",2);c([N("eChildCount")],No.prototype,"eChildCount",2);var Dv=No,zc=class BR extends Z{constructor(){super(BR.TEMPLATE)}init(t){t.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){const t=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingError","ERR")}setupLoading(){const t=Oe("groupLoading",this.gos,null);t&&this.eLoadingIcon.appendChild(t);const i=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=i("loadingOoo","Loading")}refresh(t){return!1}destroy(){super.destroy()}};zc.TEMPLATE=`<div class="ag-loading">
|
|
132
|
+
<span class="ag-loading-icon" ref="eLoadingIcon"></span>
|
|
133
|
+
<span class="ag-loading-text" ref="eLoadingText"></span>
|
|
134
|
+
</div>`;c([N("eLoadingIcon")],zc.prototype,"eLoadingIcon",2);c([N("eLoadingText")],zc.prototype,"eLoadingText",2);var eb=zc,WR=class UR extends Z{constructor(){super(UR.TEMPLATE)}init(t){const i=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",i),this.addDestroyFunc(()=>Fr(t.eParentOfValue)),Fr(t.eParentOfValue,i),t.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){const t=this.localeService.getLocaleTextFunc();this.getGui().innerText=t("loadingError","ERR");const i=t("ariaSkeletonCellLoadingFailed","Row failed to load");yi(this.getGui(),i)}setupLoading(){const i=this.gos.getDocument().createElement("div");i.classList.add("ag-skeleton-effect"),this.getGui().appendChild(i);const n=this.localeService.getLocaleTextFunc()("ariaSkeletonCellLoading","Row data is loading");yi(this.getGui(),n)}refresh(t){return!1}destroy(){super.destroy()}};WR.TEMPLATE='<div class="ag-skeleton-container"></div>';var tb=WR,zR=class $R extends Z{constructor(){super()}destroy(){super.destroy()}init(t){const i=this.gos.get("overlayLoadingTemplate");if(this.setTemplate(i??$R.DEFAULT_LOADING_OVERLAY_TEMPLATE),!i){const s=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=s("loadingOoo","Loading...")})}}};zR.DEFAULT_LOADING_OVERLAY_TEMPLATE='<span aria-live="polite" aria-atomic="true" class="ag-overlay-loading-center"></span>';var ib=zR,KR=class jR extends Z{constructor(){super()}destroy(){super.destroy()}init(t){const i=this.gos.get("overlayNoRowsTemplate");if(this.setTemplate(i??jR.DEFAULT_NO_ROWS_TEMPLATE),!i){const s=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=s("noRowsToShow","No Rows To Show")})}}};KR.DEFAULT_NO_ROWS_TEMPLATE='<span class="ag-overlay-no-rows-center"></span>';var sb=KR,nb=class extends Io{constructor(){super('<div class="ag-tooltip"></div>')}init(e){const{value:t}=e;this.getGui().textContent=Xe(t,!0)}},ob=class{getTemplate(){return'<ag-input-number-field class="ag-cell-editor" ref="eInput"></ag-input-number-field>'}init(e,t){this.eInput=e,this.params=t,t.max!=null&&e.setMax(t.max),t.min!=null&&e.setMin(t.min),t.precision!=null&&e.setPrecision(t.precision),t.step!=null&&e.setStep(t.step);const i=e.getInputElement();t.preventStepping?e.addManagedListener(i,"keydown",this.preventStepping):t.showStepperButtons&&i.classList.add("ag-number-field-input-stepper")}preventStepping(e){(e.key===D.UP||e.key===D.DOWN)&&e.preventDefault()}getValue(){const e=this.eInput.getValue();if(!b(e)&&!b(this.params.value))return this.params.value;let t=this.params.parseValue(e);if(t==null)return t;if(typeof t=="string"){if(t==="")return null;t=Number(t)}return isNaN(t)?null:t}getStartValue(){return this.params.value}},rb=class extends Xa{constructor(){super(new ob)}},lb=class{getTemplate(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'}init(e,t){this.eInput=e,this.params=t,t.min!=null&&e.setMin(t.min),t.max!=null&&e.setMax(t.max),t.step!=null&&e.setStep(t.step)}getValue(){const e=this.eInput.getDate();return!b(e)&&!b(this.params.value)?this.params.value:e??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return xi(e,!1)}},ab=class extends Xa{constructor(){super(new lb)}},ub=class{constructor(e){this.getDataTypeService=e}getTemplate(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'}init(e,t){this.eInput=e,this.params=t,t.min!=null&&e.setMin(t.min),t.max!=null&&e.setMax(t.max),t.step!=null&&e.setStep(t.step)}getValue(){const e=this.formatDate(this.eInput.getDate());return!b(e)&&!b(this.params.value)?this.params.value:this.params.parseValue(e??"")}getStartValue(){var e,t;return xi((t=this.parseDate((e=this.params.value)!=null?e:void 0))!=null?t:null,!1)}parseDate(e){return this.getDataTypeService().getDateParserFunction(this.params.column)(e)}formatDate(e){return this.getDataTypeService().getDateFormatterFunction(this.params.column)(e)}},YR=class extends Xa{constructor(){super(new ub(()=>this.dataTypeService))}};c([f("dataTypeService")],YR.prototype,"dataTypeService",2);var Dm=class QR extends Z{constructor(){super(QR.TEMPLATE)}init(t){this.params=t,this.updateCheckbox(t);const i=this.eCheckbox.getInputElement();i.setAttribute("tabindex","-1"),$f(i,"polite"),this.addManagedListener(i,"click",s=>{if(ss(s),this.eCheckbox.isDisabled())return;const n=this.eCheckbox.getValue();this.onCheckboxChanged(n)}),this.addManagedListener(i,"dblclick",s=>{ss(s)}),this.addManagedListener(this.params.eGridCell,"keydown",s=>{if(s.key===D.SPACE&&!this.eCheckbox.isDisabled()){this.params.eGridCell===this.gos.getActiveDomElement()&&this.eCheckbox.toggle();const n=this.eCheckbox.getValue();this.onCheckboxChanged(n),s.preventDefault()}})}refresh(t){return this.params=t,this.updateCheckbox(t),!0}updateCheckbox(t){var i,s,n;let o,r=!0;if(t.node.group&&t.column){const h=t.column.getColId();h.startsWith(Pr)?o=t.value==null||t.value===""?void 0:t.value==="true":t.node.aggData&&t.node.aggData[h]!==void 0?o=(i=t.value)!=null?i:void 0:r=!1}else o=(s=t.value)!=null?s:void 0;if(!r){this.eCheckbox.setDisplayed(!1);return}this.eCheckbox.setValue(o);const l=t.disabled!=null?t.disabled:!((n=t.column)!=null&&n.isCellEditable(t.node));this.eCheckbox.setDisabled(l);const a=this.localeService.getLocaleTextFunc(),u=Ic(a,o),d=l?u:`${a("ariaToggleCellValue","Press SPACE to toggle cell value")} (${u})`;this.eCheckbox.setInputAriaLabel(d)}onCheckboxChanged(t){const{column:i,node:s,rowIndex:n,value:o}=this.params,r={type:g.EVENT_CELL_EDITING_STARTED,column:i,colDef:i==null?void 0:i.getColDef(),data:s.data,node:s,rowIndex:n,rowPinned:s.rowPinned,value:o};this.eventService.dispatchEvent(r);const l=this.params.node.setDataValue(this.params.column,t,"edit"),a={type:g.EVENT_CELL_EDITING_STOPPED,column:i,colDef:i==null?void 0:i.getColDef(),data:s.data,node:s,rowIndex:n,rowPinned:s.rowPinned,value:o,oldValue:o,newValue:t,valueChanged:l};this.eventService.dispatchEvent(a)}};Dm.TEMPLATE=`
|
|
135
|
+
<div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">
|
|
136
|
+
<ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>
|
|
137
|
+
</div>`;c([N("eCheckbox")],Dm.prototype,"eCheckbox",2);var db=Dm,qR=class extends Io{constructor(){super(`
|
|
138
|
+
<div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">
|
|
139
|
+
<ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>
|
|
140
|
+
</div>`)}init(e){var t;this.params=e;const i=(t=e.value)!=null?t:void 0;this.eCheckbox.setValue(i),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(i),this.addManagedListener(this.eCheckbox,g.EVENT_FIELD_VALUE_CHANGED,n=>this.setAriaLabel(n.selected))}getValue(){return this.eCheckbox.getValue()}focusIn(){this.eCheckbox.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.localeService.getLocaleTextFunc(),i=Ic(t,e),s=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(`${s} (${i})`)}};c([N("eCheckbox")],qR.prototype,"eCheckbox",2);var cb=class extends Z{constructor(){super(),this.setTemplate("<div></div>")}init(e){var t;this.params=e,this.cssClassPrefix=(t=this.params.cssClassPrefix)!=null?t:"ag-menu-option",this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu()}configureDefaults(){return!0}addIcon(){if(this.params.isCompact)return;const e=ei(`<span ref="eIcon" class="${this.getClassName("part")} ${this.getClassName("icon")}" role="presentation"></span>`);this.params.checked?e.appendChild(Oe("check",this.gos)):this.params.icon&&(za(this.params.icon)?e.appendChild(this.params.icon):typeof this.params.icon=="string"?e.innerHTML=this.params.icon:console.warn("AG Grid: menu item icon must be DOM node or string")),this.getGui().appendChild(e)}addName(){const e=ei(`<span ref="eName" class="${this.getClassName("part")} ${this.getClassName("text")}">${this.params.name||""}</span>`);this.getGui().appendChild(e)}addShortcut(){if(this.params.isCompact)return;const e=ei(`<span ref="eShortcut" class="${this.getClassName("part")} ${this.getClassName("shortcut")}">${this.params.shortcut||""}</span>`);this.getGui().appendChild(e)}addSubMenu(){const e=ei(`<span ref="ePopupPointer" class="${this.getClassName("part")} ${this.getClassName("popup-pointer")}"></span>`),t=this.getGui();if(this.params.subMenu){const i=this.gos.get("enableRtl")?"smallLeft":"smallRight";Gs(t,!1),e.appendChild(Oe(i,this.gos))}t.appendChild(e)}getClassName(e){return`${this.cssClassPrefix}-${e}`}destroy(){super.destroy()}},Wd=class extends L{constructor(){super(...arguments),this.agGridDefaults={agDateInput:RR,agColumnHeader:Cg,agColumnGroupHeader:QA,agSortIndicator:Em,agTextColumnFloatingFilter:YA,agNumberColumnFloatingFilter:jA,agDateColumnFloatingFilter:Bc,agReadOnlyFloatingFilter:fm,agAnimateShowChangeCellRenderer:NR,agAnimateSlideCellRenderer:_R,agGroupCellRenderer:Dv,agGroupRowRenderer:Dv,agLoadingCellRenderer:eb,agSkeletonCellRenderer:tb,agCheckboxCellRenderer:db,agCellEditor:Tv,agTextCellEditor:Tv,agNumberCellEditor:rb,agDateCellEditor:ab,agDateStringCellEditor:YR,agSelectCellEditor:Tm,agLargeTextCellEditor:qA,agCheckboxCellEditor:qR,agTextColumnFilter:Sm,agNumberColumnFilter:FR,agDateColumnFilter:ER,agLoadingOverlay:ib,agNoRowsOverlay:sb,agTooltipComponent:nb,agMenuItem:cb},this.enterpriseAgDefaultCompsModule={agSetColumnFilter:"@ag-grid-enterprise/set-filter",agSetColumnFloatingFilter:"@ag-grid-enterprise/set-filter",agMultiColumnFilter:"@ag-grid-enterprise/multi-filter",agMultiColumnFloatingFilter:"@ag-grid-enterprise/multi-filter",agGroupColumnFilter:"@ag-grid-enterprise/row-grouping",agGroupColumnFloatingFilter:"@ag-grid-enterprise/row-grouping",agRichSelect:"@ag-grid-enterprise/rich-select",agRichSelectCellEditor:"@ag-grid-enterprise/rich-select",agDetailCellRenderer:"@ag-grid-enterprise/master-detail",agSparklineCellRenderer:"@ag-grid-enterprise/sparklines"},this.jsComps={}}init(){const e=this.gos.get("components");e!=null&&Ft(e,(t,i)=>this.registerJsComponent(t,i))}registerDefaultComponent(e,t){if(this.agGridDefaults[e]){console.error("Trying to overwrite a default component. You should call registerComponent");return}this.agGridDefaults[e]=t}registerJsComponent(e,t){this.jsComps[e]=t}retrieve(e,t){const i=(l,a)=>({componentFromFramework:a,component:l}),s=this.getFrameworkOverrides().frameworkComponent(t,this.gos.get("components"));if(s!=null)return i(s,!0);const n=this.jsComps[t];if(n){const l=this.getFrameworkOverrides().isFrameworkComponent(n);return i(n,l)}const o=this.agGridDefaults[t];if(o)return i(o,!1);const r=this.enterpriseAgDefaultCompsModule[t];return r?he.__assertRegistered(r,`AG Grid '${e}' component: ${t}`,this.context.getGridId()):Dr(()=>{this.warnAboutMissingComponent(e,t)},"MissingComp"+t),null}warnAboutMissingComponent(e,t){const i=[...Object.keys(this.agGridDefaults).filter(n=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(n)),...Object.keys(this.jsComps)],s=$a(t,i,!0,.8).values;console.warn(`AG Grid: Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.`),s.length>0&&console.warn(` Did you mean: [${s.slice(0,3)}]?`),console.warn(`If using a custom component check it has been registered as described in: ${this.getFrameworkOverrides().getDocLink("components/")}`)}};c([M],Wd.prototype,"init",1);Wd=c([H("userComponentRegistry")],Wd);var hb={propertyName:"dateComponent",cellRenderer:!1},pb={propertyName:"headerComponent",cellRenderer:!1},gb={propertyName:"headerGroupComponent",cellRenderer:!1},Pv={propertyName:"cellRenderer",cellRenderer:!0},fb={propertyName:"loadingCellRenderer",cellRenderer:!0},mb={propertyName:"cellEditor",cellRenderer:!1},Fv={propertyName:"innerRenderer",cellRenderer:!0},Cb={propertyName:"loadingOverlayComponent",cellRenderer:!1},vb={propertyName:"noRowsOverlayComponent",cellRenderer:!1},wb={propertyName:"tooltipComponent",cellRenderer:!1},vg={propertyName:"filter",cellRenderer:!1},yb={propertyName:"floatingFilterComponent",cellRenderer:!1},Sb={propertyName:"toolPanel",cellRenderer:!1},Eb={propertyName:"statusPanel",cellRenderer:!1},Rb={propertyName:"fullWidthCellRenderer",cellRenderer:!0},Tb={propertyName:"loadingCellRenderer",cellRenderer:!0},Db={propertyName:"groupRowRenderer",cellRenderer:!0},Pb={propertyName:"detailCellRenderer",cellRenderer:!0},Fb={propertyName:"menuItem",cellRenderer:!1},XR=class{static getFloatingFilterType(e){return this.filterToFloatingFilterMapping[e]}};XR.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 Sn=class extends L{getHeaderCompDetails(e,t){return this.getCompDetails(e,pb,"agColumnHeader",t)}getHeaderGroupCompDetails(e){const t=e.columnGroup.getColGroupDef();return this.getCompDetails(t,gb,"agColumnGroupHeader",e)}getFullWidthCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Rb,null,e,!0)}getFullWidthLoadingCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Tb,"agLoadingCellRenderer",e,!0)}getFullWidthGroupCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Db,"agGroupRowRenderer",e,!0)}getFullWidthDetailCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Pb,"agDetailCellRenderer",e,!0)}getInnerRendererDetails(e,t){return this.getCompDetails(e,Fv,null,t)}getFullWidthGroupRowInnerCellRenderer(e,t){return this.getCompDetails(e,Fv,null,t)}getCellRendererDetails(e,t){return this.getCompDetails(e,Pv,null,t)}getLoadingCellRendererDetails(e,t){return this.getCompDetails(e,fb,"agSkeletonCellRenderer",t,!0)}getCellEditorDetails(e,t){return this.getCompDetails(e,mb,"agCellEditor",t,!0)}getFilterDetails(e,t,i){return this.getCompDetails(e,vg,i,t,!0)}getDateCompDetails(e){return this.getCompDetails(this.gridOptions,hb,"agDateInput",e,!0)}getLoadingOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,Cb,"agLoadingOverlay",e,!0)}getNoRowsOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,vb,"agNoRowsOverlay",e,!0)}getTooltipCompDetails(e){return this.getCompDetails(e.colDef,wb,"agTooltipComponent",e,!0)}getSetFilterCellRendererDetails(e,t){return this.getCompDetails(e,Pv,null,t)}getFloatingFilterCompDetails(e,t,i){return this.getCompDetails(e,yb,i,t)}getToolPanelCompDetails(e,t){return this.getCompDetails(e,Sb,null,t,!0)}getStatusPanelCompDetails(e,t){return this.getCompDetails(e,Eb,null,t,!0)}getMenuItemCompDetails(e,t){return this.getCompDetails(e,Fb,"agMenuItem",t,!0)}getCompDetails(e,t,i,s,n=!1){const{propertyName:o,cellRenderer:r}=t;let{compName:l,jsComp:a,fwComp:u,paramsFromSelector:d,popupFromSelector:h,popupPositionFromSelector:p}=this.getCompKeys(e,t,s);const C=w=>{const m=this.userComponentRegistry.retrieve(o,w);m&&(a=m.componentFromFramework?void 0:m.component,u=m.componentFromFramework?m.component:void 0)};if(l!=null&&C(l),a==null&&u==null&&i!=null&&C(i),a&&r&&!this.agComponentUtils.doesImplementIComponent(a)&&(a=this.agComponentUtils.adaptFunction(o,a)),!a&&!u){n&&console.error(`AG Grid: Could not find component ${l}, did you forget to configure this component?`);return}const v=this.mergeParamsWithApplicationProvidedParams(e,t,s,d),y=a==null,R=a||u;return{componentFromFramework:y,componentClass:R,params:v,type:t,popupFromSelector:h,popupPositionFromSelector:p,newAgStackInstance:()=>this.newAgStackInstance(R,y,v,t)}}getCompKeys(e,t,i){const{propertyName:s}=t;let n,o,r,l,a,u;if(e){const d=e,h=d[s+"Selector"],p=h?h(i):null,C=v=>{typeof v=="string"?n=v:v!=null&&v!==!0&&(this.getFrameworkOverrides().isFrameworkComponent(v)?r=v:o=v)};p?(C(p.component),l=p.params,a=p.popup,u=p.popupPosition):C(d[s])}return{compName:n,jsComp:o,fwComp:r,paramsFromSelector:l,popupFromSelector:a,popupPositionFromSelector:u}}newAgStackInstance(e,t,i,s){const n=s.propertyName,o=!t;let r;if(o)r=new e;else{const a=this.componentMetadataProvider.retrieve(n);r=this.frameworkComponentWrapper.wrap(e,a.mandatoryMethodList,a.optionalMethodList,s)}const l=this.initComponent(r,i);return l==null?Ze.resolve(r):l.then(()=>r)}mergeParamsWithApplicationProvidedParams(e,t,i,s=null){const n=this.gos.getGridCommonParams();Zt(n,i);const o=e,r=o&&o[t.propertyName+"Params"];if(typeof r=="function"){const l=r(i);Zt(n,l)}else typeof r=="object"&&Zt(n,r);return Zt(n,s),n}initComponent(e,t){if(this.context.createBean(e),e.init!=null)return e.init(t)}getDefaultFloatingFilterType(e,t){if(e==null)return null;let i=null,{compName:s,jsComp:n,fwComp:o}=this.getCompKeys(e,vg);return s?i=XR.getFloatingFilterType(s):n==null&&o==null&&e.filter===!0&&(i=t()),i}};c([f("gridOptions")],Sn.prototype,"gridOptions",2);c([f("agComponentUtils")],Sn.prototype,"agComponentUtils",2);c([f("componentMetadataProvider")],Sn.prototype,"componentMetadataProvider",2);c([f("userComponentRegistry")],Sn.prototype,"userComponentRegistry",2);c([fe("frameworkComponentWrapper")],Sn.prototype,"frameworkComponentWrapper",2);Sn=c([H("userComponentFactory")],Sn);var ZR=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.indexOf("x")!==-1,this.scrollVertically=e.scrollAxis.indexOf("y")!==-1,this.scrollByTick=e.scrollByTick!=null?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}check(e,t=!1){const i=t||this.shouldSkipVerticalScroll();if(i&&this.shouldSkipHorizontalScroll())return;const s=this.scrollContainer.getBoundingClientRect(),n=this.scrollByTick;this.tickLeft=e.clientX<s.left+n,this.tickRight=e.clientX>s.right-n,this.tickUp=e.clientY<s.top+n&&!i,this.tickDown=e.clientY>s.bottom-n&&!i,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;let e;if(e=this.tickCount>20?200:this.tickCount>10?80:40,this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},Ti=class extends L{constructor(e){super(),this.eContainer=e}postConstruct(){this.gos.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(e=>{const t=e.gridBodyCtrl;this.autoScrollService=new ZR({scrollContainer:t.getBodyViewportElement(),scrollAxis:"y",getVerticalPosition:()=>t.getScrollFeature().getVScrollPosition().top,setVerticalPosition:i=>t.getScrollFeature().setVerticalScrollPosition(i),onScrollCallback:()=>{this.onDragging(this.lastDraggingEvent)}})})}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(){return this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?J.ICON_NOT_ALLOWED:J.ICON_MOVE}shouldPreventRowMove(){return!!(this.columnModel.getRowGroupColumns().length||this.filterManager.isAnyFilterPresent()||this.sortController.isSortActive())}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const s=[...this.selectionService.getSelectedNodes()].sort((n,o)=>n.rowIndex==null||o.rowIndex==null?0:this.getRowIndexNumber(n)-this.getRowIndexNumber(o));if(s.indexOf(t)!==-1)return s}return[t]}onDragEnter(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent(g.EVENT_ROW_DRAG_ENTER,e),this.getRowNodes(e).forEach(t=>{t.setDragging(!0)}),this.onEnterOrDragging(e)}onDragging(e){this.onEnterOrDragging(e)}isFromThisGrid(e){const{dragSourceDomDataKey:t}=e.dragSource;return t===this.gos.getDomDataKey()}isDropZoneWithinThisGrid(e){const i=this.ctrlsService.getGridBodyCtrl().getGui(),{dropZoneTarget:s}=e;return!i.contains(s)}onEnterOrDragging(e){this.dispatchGridEvent(g.EVENT_ROW_DRAG_MOVE,e),this.lastDraggingEvent=e;const t=this.mouseEventService.getNormalisedPosition(e).y;this.gos.get("rowDragManaged")&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)}doManagedDrag(e,t){const i=this.isFromThisGrid(e),s=this.gos.get("rowDragManaged"),n=e.dragItem.rowNodes;s&&this.shouldPreventRowMove()||(this.gos.get("suppressMoveWhenRowDragging")||!i?this.isDropZoneWithinThisGrid(e)||this.clientSideRowModel.highlightRowAtPixel(n[0],t):this.moveRows(n,t))}getRowIndexNumber(e){return parseInt(de(e.getRowIndexString().split("-")),10)}moveRowAndClearHighlight(e){const t=this.clientSideRowModel.getLastHighlightedRowNode(),i=t&&t.highlighted===1,s=this.mouseEventService.getNormalisedPosition(e).y,n=e.dragItem.rowNodes;let o=i?1:0;if(this.isFromThisGrid(e))n.forEach(r=>{r.rowTop<s&&(o-=1)}),this.moveRows(n,s,o);else{const r=this.gos.getCallback("getRowId");let l=this.clientSideRowModel.getRowIndexAtPixel(s)+1;this.clientSideRowModel.getHighlightPosition(s)===0&&l--,this.clientSideRowModel.updateRowData({add:n.map(a=>a.data).filter(a=>!this.clientSideRowModel.getRowNode(r?r({data:a,level:0}):a.id)),addIndex:l})}this.clearRowHighlight()}clearRowHighlight(){this.clientSideRowModel.highlightRowAtPixel(null)}moveRows(e,t,i=0){var s;this.clientSideRowModel.ensureRowsAtPixel(e,t,i)&&(this.focusService.clearFocusedCell(),(s=this.rangeService)==null||s.removeAllCellRanges())}addRowDropZone(e){if(!e.getContainer()){K("addRowDropZone - A container target needs to be provided");return}if(this.dragAndDropService.findExternalZone(e)){console.warn("AG Grid: addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.");return}let t={getContainer:e.getContainer};e.fromGrid?t=e:(e.onDragEnter&&(t.onDragEnter=i=>{e.onDragEnter(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_ENTER,i))}),e.onDragLeave&&(t.onDragLeave=i=>{e.onDragLeave(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_LEAVE,i))}),e.onDragging&&(t.onDragging=i=>{e.onDragging(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_MOVE,i))}),e.onDragStop&&(t.onDragStop=i=>{e.onDragStop(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_END,i))})),this.dragAndDropService.addDropTarget($({isInterestedIn:i=>i===2,getIconName:()=>J.ICON_MOVE,external:!0},t))}getRowDropZone(e){const t=this.getContainer.bind(this),i=this.onDragEnter.bind(this),s=this.onDragLeave.bind(this),n=this.onDragging.bind(this),o=this.onDragStop.bind(this);return e?{getContainer:t,onDragEnter:e.onDragEnter?r=>{i(r),e.onDragEnter(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_ENTER,r))}:i,onDragLeave:e.onDragLeave?r=>{s(r),e.onDragLeave(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_LEAVE,r))}:s,onDragging:e.onDragging?r=>{n(r),e.onDragging(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_MOVE,r))}:n,onDragStop:e.onDragStop?r=>{o(r),e.onDragStop(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_END,r))}:o,fromGrid:!0}:{getContainer:t,onDragEnter:i,onDragLeave:s,onDragging:n,onDragStop:o,fromGrid:!0}}draggingToRowDragEvent(e,t){const i=this.mouseEventService.getNormalisedPosition(t).y,s=i>this.paginationProxy.getCurrentPageHeight();let n=-1,o;s||(n=this.rowModel.getRowIndexAtPixel(i),o=this.rowModel.getRow(n));let r;switch(t.vDirection){case 1:r="down";break;case 0:r="up";break;default:r=null;break}return this.gos.addGridCommonParams({type:e,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:n,overNode:o,y:i,vDirection:r})}dispatchGridEvent(e,t){const i=this.draggingToRowDragEvent(e,t);this.eventService.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent(g.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e),this.gos.get("rowDragManaged")&&this.clearRowHighlight()}onDragStop(e){this.dispatchGridEvent(g.EVENT_ROW_DRAG_END,e),this.stopDragging(e),this.gos.get("rowDragManaged")&&(this.gos.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&!this.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e)}stopDragging(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(t=>{t.setDragging(!1)})}};c([f("dragAndDropService")],Ti.prototype,"dragAndDropService",2);c([f("rowModel")],Ti.prototype,"rowModel",2);c([f("paginationProxy")],Ti.prototype,"paginationProxy",2);c([f("columnModel")],Ti.prototype,"columnModel",2);c([f("focusService")],Ti.prototype,"focusService",2);c([f("sortController")],Ti.prototype,"sortController",2);c([f("filterManager")],Ti.prototype,"filterManager",2);c([f("selectionService")],Ti.prototype,"selectionService",2);c([f("mouseEventService")],Ti.prototype,"mouseEventService",2);c([f("ctrlsService")],Ti.prototype,"ctrlsService",2);c([fe("rangeService")],Ti.prototype,"rangeService",2);c([M],Ti.prototype,"postConstruct",1);var Ca=class extends L{constructor(){super(...arguments),this.dragEndFunctions=[],this.dragSources=[]}removeAllListeners(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0}removeListener(e){const t=e.dragSource.eElement,i=e.mouseDownListener;if(t.removeEventListener("mousedown",i),e.touchEnabled){const s=e.touchStartListener;t.removeEventListener("touchstart",s,{passive:!0})}}removeDragSource(e){const t=this.dragSources.find(i=>i.dragSource===e);t&&(this.removeListener(t),Qt(this.dragSources,t))}isDragging(){return this.dragging}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:i,includeTouch:s,stopPropagationForTouch:n}=e;i.addEventListener("mousedown",t);let o=null;const r=this.gos.get("suppressTouch");s&&!r&&(o=l=>{nm(l.target)||(l.cancelable&&(l.preventDefault(),n&&l.stopPropagation()),this.onTouchStart(e,l))},i.addEventListener("touchstart",o,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:o,touchEnabled:!!s})}getStartTarget(){return this.startTarget}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const i=t.touches[0];this.touchLastTime=i,this.touchStart=i;const s=a=>this.onTouchMove(a,e.eElement),n=a=>this.onTouchUp(a,e.eElement),o=a=>{a.cancelable&&a.preventDefault()},r=t.target,l=[{target:this.gos.getRootNode(),type:"touchmove",listener:o,options:{passive:!1}},{target:r,type:"touchmove",listener:s,options:{passive:!0}},{target:r,type:"touchend",listener:n,options:{passive:!0}},{target:r,type:"touchcancel",listener:n,options:{passive:!0}}];this.addTemporaryEvents(l),e.dragStartPixels===0&&this.onCommonMove(i,this.touchStart,e.eElement)}onMouseDown(e,t){const i=t;if(e.skipMouseEvent&&e.skipMouseEvent(t)||i._alreadyProcessedByDragService||(i._alreadyProcessedByDragService=!0,t.button!==0))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;const s=a=>this.onMouseMove(a,e.eElement),n=a=>this.onMouseUp(a,e.eElement),o=a=>a.preventDefault(),r=this.gos.getRootNode(),l=[{target:r,type:"mousemove",listener:s},{target:r,type:"mouseup",listener:n},{target:r,type:"contextmenu",listener:o}];this.addTemporaryEvents(l),e.dragStartPixels===0&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(t=>{const{target:i,type:s,listener:n,options:o}=t;i.addEventListener(s,n,o)}),this.dragEndFunctions.push(()=>{e.forEach(t=>{const{target:i,type:s,listener:n,options:o}=t;i.removeEventListener(s,n,o)})})}isEventNearStartEvent(e,t){const{dragStartPixels:i}=this.currentDragParams,s=b(i)?i:4;return pm(e,t,s)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,i){if(!this.dragging){if(!this.dragging&&this.isEventNearStartEvent(e,t))return;this.dragging=!0;const s={type:g.EVENT_DRAG_STARTED,target:i};this.eventService.dispatchEvent(s),this.currentDragParams.onDragStart(t),this.currentDragParams.onDragging(t)}this.currentDragParams.onDragging(e)}onTouchMove(e,t){const i=this.getFirstActiveTouch(e.touches);i&&this.onCommonMove(i,this.touchStart,t)}onMouseMove(e,t){var i;ws()&&((i=this.gos.getDocument().getSelection())==null||i.removeAllRanges()),this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){const t=this.gos.get("enableCellTextSelection"),i=e.type==="mousemove";return t&&i&&e.cancelable&&this.mouseEventService.isEventFromThisGrid(e)&&!this.isOverFormFieldElement(e)}isOverFormFieldElement(e){const t=e.target,i=t==null?void 0:t.tagName.toLocaleLowerCase();return!!(i!=null&&i.match("^a$|textarea|input|select|button"))}onTouchUp(e,t){let i=this.getFirstActiveTouch(e.changedTouches);i||(i=this.touchLastTime),this.onUpCommon(i,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){if(this.dragging){this.dragging=!1,this.currentDragParams.onDragStop(e);const i={type:g.EVENT_DRAG_STOPPED,target:t};this.eventService.dispatchEvent(i)}this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach(i=>i()),this.dragEndFunctions.length=0}};c([f("mouseEventService")],Ca.prototype,"mouseEventService",2);c([Bt],Ca.prototype,"removeAllListeners",1);Ca=c([H("dragService")],Ca);var jh="ag-list-item-hovered",JR=class extends L{constructor(e,t,i){super(),this.comp=e,this.virtualList=t,this.params=i,this.currentDragValue=null,this.lastHoveredListItem=null}postConstruct(){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()}listItemDragStart(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)}listItemDragEnd(){window.setTimeout(()=>{this.currentDragValue=null,this.moveBlocked=!1},10)}createDropTarget(){const e={isInterestedIn:t=>t===this.params.dragSourceType,getIconName:()=>this.moveBlocked?J.ICON_PINNED:J.ICON_MOVE,getContainer:()=>this.comp.getGui(),onDragging:t=>this.onDragging(t),onDragStop:()=>this.onDragStop(),onDragLeave:()=>this.onDragLeave()};this.dragAndDropService.addDropTarget(e)}createAutoScrollService(){const e=this.virtualList.getGui();this.autoScrollService=new ZR({scrollContainer:e,scrollAxis:"y",getVerticalPosition:()=>e.scrollTop,setVerticalPosition:t=>e.scrollTop=t})}onDragging(e){if(!this.currentDragValue||this.moveBlocked)return;const t=this.getListDragItem(e),i=this.virtualList.getComponentAt(t.rowIndex);if(!i)return;const s=i.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===t.rowIndex&&this.lastHoveredListItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=t,gg(s,jh),gg(s,`ag-item-highlight-${t.position}`))}getListDragItem(e){const t=this.virtualList.getGui(),i=parseFloat(window.getComputedStyle(t).paddingTop),s=this.virtualList.getRowHeight(),n=this.virtualList.getScrollTop(),o=Math.max(0,(e.y-i+n)/s),r=this.params.getNumRows(this.comp)-1,l=Math.min(r,o)|0;return{rowIndex:l,position:Math.round(o)>o||o>r?"bottom":"top",component:this.virtualList.getComponentAt(l)}}onDragStop(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearHoveredItems(),this.autoScrollService.ensureCleared())}onDragLeave(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()}clearHoveredItems(){this.virtualList.getGui().querySelectorAll(`.${jh}`).forEach(t=>{[jh,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach(i=>{t.classList.remove(i)})}),this.lastHoveredListItem=null}};c([f("dragAndDropService")],JR.prototype,"dragAndDropService",2);c([M],JR.prototype,"postConstruct",1);function Zn(e){const t=e;return t!=null&&t.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var oe=class{constructor(){this.detailGridInfoMap={},this.destroyCalled=!1}init(){switch(this.rowModel.getType()){case"clientSide":this.clientSideRowModel=this.rowModel;break;case"infinite":this.infiniteRowModel=this.rowModel;break;case"serverSide":this.serverSideRowModel=this.rowModel;break}this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl})}__getAlignedGridService(){return this.alignedGridsService}getGridId(){return this.context.getGridId()}addDetailGridInfo(e,t){this.detailGridInfoMap[e]=t}removeDetailGridInfo(e){delete this.detailGridInfoMap[e]}getDetailGridInfo(e){return this.detailGridInfoMap[e]}forEachDetailGridInfo(e){let t=0;Ft(this.detailGridInfoMap,(i,s)=>{b(s)&&(e(s,t),t++)})}getDataAsCsv(e){if(he.__assertRegistered("@ag-grid-community/csv-export","api.getDataAsCsv",this.context.getGridId()))return this.csvCreator.getDataAsCsv(e)}exportDataAsCsv(e){he.__assertRegistered("@ag-grid-community/csv-export","api.exportDataAsCsv",this.context.getGridId())&&this.csvCreator.exportDataAsCsv(e)}assertNotExcelMultiSheet(e,t){return he.__assertRegistered("@ag-grid-enterprise/excel-export","api."+e,this.context.getGridId())?this.excelCreator.getFactoryMode()===1?(console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'"),!1):!0:!1}getDataAsExcel(e){if(this.assertNotExcelMultiSheet("getDataAsExcel",e))return this.excelCreator.getDataAsExcel(e)}exportDataAsExcel(e){this.assertNotExcelMultiSheet("exportDataAsExcel",e)&&this.excelCreator.exportDataAsExcel(e)}getSheetDataForExcel(e){if(he.__assertRegistered("@ag-grid-enterprise/excel-export","api.getSheetDataForExcel",this.context.getGridId()))return this.excelCreator.setFactoryMode(1),this.excelCreator.getSheetDataForExcel(e)}getMultipleSheetsAsExcel(e){if(he.__assertRegistered("@ag-grid-enterprise/excel-export","api.getMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.getMultipleSheetsAsExcel(e)}exportMultipleSheetsAsExcel(e){he.__assertRegistered("@ag-grid-enterprise/excel-export","api.exportMultipleSheetsAsExcel",this.context.getGridId())&&this.excelCreator.exportMultipleSheetsAsExcel(e)}setGridAriaProperty(e,t){if(!e)return;const i=this.ctrlsService.getGridBodyCtrl().getGui(),s=`aria-${e}`;t===null?i.removeAttribute(s):i.setAttribute(s,t)}logMissingRowModel(e,...t){console.error(`AG Grid: api.${e} can only be called when gridOptions.rowModelType is ${t.join(" or ")}`)}logDeprecation(e,t,i,s){K(`Since ${e} api.${t} is deprecated. Please use ${i} instead. ${s??""}`)}getPinnedTopRowCount(){return this.pinnedRowModel.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.pinnedRowModel.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.pinnedRowModel.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.pinnedRowModel.getPinnedBottomRow(e)}expireValueCache(){this.valueCache.expire()}getVerticalPixelRange(){return this.gridBodyCtrl.getScrollFeature().getVScrollPosition()}getHorizontalPixelRange(){return this.gridBodyCtrl.getScrollFeature().getHScrollPosition()}refreshCells(e={}){this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.refreshCells(e))}flashCells(e={}){const t=i=>K(`Since v31.1 api.flashCells parameter '${i}Delay' is deprecated. Please use '${i}Duration' instead.`);b(e.fadeDelay)&&t("fade"),b(e.flashDelay)&&t("flash"),this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.flashCells(e))}redrawRows(e={}){const t=e?e.rowNodes:void 0;this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.redrawRows(t))}refreshHeader(){this.frameworkOverrides.wrapIncoming(()=>this.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh()))}isAnyFilterPresent(){return this.filterManager.isAnyFilterPresent()}isColumnFilterPresent(){return this.filterManager.isColumnFilterPresent()||this.filterManager.isAggregateFilterPresent()}isQuickFilterPresent(){return this.filterManager.isQuickFilterPresent()}getModel(){return K("Since v31.1 getModel() is deprecated. Please use the appropriate grid API methods instead."),this.rowModel}setRowNodeExpanded(e,t,i,s){this.expansionService.setRowNodeExpanded(e,t,i,s)}onGroupExpandedOrCollapsed(){if(q(this.clientSideRowModel)){this.logMissingRowModel("onGroupExpandedOrCollapsed","clientSide");return}this.expansionService.onGroupExpandedOrCollapsed()}refreshClientSideRowModel(e){if(q(this.clientSideRowModel)){this.logMissingRowModel("refreshClientSideRowModel","clientSide");return}this.clientSideRowModel.refreshModel(e)}isAnimationFrameQueueEmpty(){return this.animationFrameService.isQueueEmpty()}flushAllAnimationFrames(){this.animationFrameService.flushAllFrames()}getRowNode(e){return this.rowModel.getRowNode(e)}getSizesForCurrentTheme(){return{rowHeight:this.gos.getRowHeightAsNumber(),headerHeight:this.columnModel.getHeaderHeight()}}expandAll(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!0):this.logMissingRowModel("expandAll","clientSide","serverSide")}collapseAll(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!1):this.logMissingRowModel("collapseAll","clientSide","serverSide")}addRenderedRowListener(e,t,i){this.rowRenderer.addRenderedRowListener(e,t,i)}getQuickFilter(){return this.gos.get("quickFilterText")}getAdvancedFilterModel(){return he.__assertRegistered("@ag-grid-enterprise/advanced-filter","api.getAdvancedFilterModel",this.context.getGridId())?this.filterManager.getAdvancedFilterModel():null}setAdvancedFilterModel(e){this.filterManager.setAdvancedFilterModel(e)}showAdvancedFilterBuilder(){he.__assertRegistered("@ag-grid-enterprise/advanced-filter","api.setAdvancedFilterModel",this.context.getGridId())&&this.filterManager.showAdvancedFilterBuilder("api")}setNodesSelected(e){if(!e.nodes.every(r=>r.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),!1):r.id===void 0?(console.warn("AG Grid: cannot select node until id for node is known"),!1):!0))return;const{nodes:i,source:s,newValue:n}=e,o=i;this.selectionService.setNodesSelected({nodes:o,source:s??"api",newValue:n})}selectAll(e="apiSelectAll"){this.selectionService.selectAllRowNodes({source:e})}deselectAll(e="apiSelectAll"){this.selectionService.deselectAllRowNodes({source:e})}selectAllFiltered(e="apiSelectAllFiltered"){this.selectionService.selectAllRowNodes({source:e,justFiltered:!0})}deselectAllFiltered(e="apiSelectAllFiltered"){this.selectionService.deselectAllRowNodes({source:e,justFiltered:!0})}getServerSideSelectionState(){return q(this.serverSideRowModel)?(this.logMissingRowModel("getServerSideSelectionState","serverSide"),null):this.selectionService.getSelectionState()}setServerSideSelectionState(e){if(q(this.serverSideRowModel)){this.logMissingRowModel("setServerSideSelectionState","serverSide");return}this.selectionService.setSelectionState(e,"api")}selectAllOnCurrentPage(e="apiSelectAllCurrentPage"){this.selectionService.selectAllRowNodes({source:e,justCurrentPage:!0})}deselectAllOnCurrentPage(e="apiSelectAllCurrentPage"){this.selectionService.deselectAllRowNodes({source:e,justCurrentPage:!0})}showLoadingOverlay(){this.overlayService.showLoadingOverlay()}showNoRowsOverlay(){this.overlayService.showNoRowsOverlay()}hideOverlay(){this.overlayService.hideOverlay()}getSelectedNodes(){return this.selectionService.getSelectedNodes()}getSelectedRows(){return this.selectionService.getSelectedRows()}getBestCostNodeSelection(){if(q(this.clientSideRowModel)){this.logMissingRowModel("getBestCostNodeSelection","clientSide");return}return this.selectionService.getBestCostNodeSelection()}getRenderedNodes(){return this.rowRenderer.getRenderedNodes()}ensureColumnVisible(e,t="auto"){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureColumnVisible(e,t),"ensureVisible")}ensureIndexVisible(e,t){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(e,t),"ensureVisible")}ensureNodeVisible(e,t=null){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureNodeVisible(e,t),"ensureVisible")}forEachLeafNode(e){if(q(this.clientSideRowModel)){this.logMissingRowModel("forEachLeafNode","clientSide");return}this.clientSideRowModel.forEachLeafNode(e)}forEachNode(e,t){this.rowModel.forEachNode(e,t)}forEachNodeAfterFilter(e){if(q(this.clientSideRowModel)){this.logMissingRowModel("forEachNodeAfterFilter","clientSide");return}this.clientSideRowModel.forEachNodeAfterFilter(e)}forEachNodeAfterFilterAndSort(e){if(q(this.clientSideRowModel)){this.logMissingRowModel("forEachNodeAfterFilterAndSort","clientSide");return}this.clientSideRowModel.forEachNodeAfterFilterAndSort(e)}getFilterInstance(e,t){return K("'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)}getColumnFilterInstance(e){return this.filterManager.getColumnFilterInstance(e)}destroyFilter(e){const t=this.columnModel.getPrimaryColumn(e);if(t)return this.filterManager.destroyFilter(t,"api")}getStatusPanel(e){if(!he.__assertRegistered("@ag-grid-enterprise/status-bar","api.getStatusPanel",this.context.getGridId()))return;const t=this.statusBarService.getStatusPanel(e);return Zn(t)}getColumnDef(e){const t=this.columnModel.getPrimaryColumn(e);return t?t.getColDef():null}getColumnDefs(){return this.columnModel.getColumnDefs()}onFilterChanged(e="api"){this.filterManager.onFilterChanged({source:e})}onSortChanged(){this.sortController.onSortChanged("api")}setFilterModel(e){this.frameworkOverrides.wrapIncoming(()=>this.filterManager.setFilterModel(e))}getFilterModel(){return this.filterManager.getFilterModel()}getColumnFilterModel(e){return this.filterManager.getColumnFilterModel(e)}setColumnFilterModel(e,t){return this.filterManager.setColumnFilterModel(e,t)}getFocusedCell(){return this.focusService.getFocusedCell()}clearFocusedCell(){return this.focusService.clearFocusedCell()}setFocusedCell(e,t,i){this.focusService.setFocusedCell({rowIndex:e,column:t,rowPinned:i,forceBrowserFocus:!0})}addRowDropZone(e){this.gridBodyCtrl.getRowDragFeature().addRowDropZone(e)}removeRowDropZone(e){const t=this.dragAndDropService.findExternalZone(e);t&&this.dragAndDropService.removeDropTarget(t)}getRowDropZoneParams(e){return this.gridBodyCtrl.getRowDragFeature().getRowDropZone(e)}assertSideBarLoaded(e){return he.__assertRegistered("@ag-grid-enterprise/side-bar","api."+e,this.context.getGridId())}isSideBarVisible(){return this.assertSideBarLoaded("isSideBarVisible")&&this.sideBarService.getSideBarComp().isDisplayed()}setSideBarVisible(e){this.assertSideBarLoaded("setSideBarVisible")&&this.sideBarService.getSideBarComp().setDisplayed(e)}setSideBarPosition(e){this.assertSideBarLoaded("setSideBarPosition")&&this.sideBarService.getSideBarComp().setSideBarPosition(e)}openToolPanel(e){this.assertSideBarLoaded("openToolPanel")&&this.sideBarService.getSideBarComp().openToolPanel(e,"api")}closeToolPanel(){this.assertSideBarLoaded("closeToolPanel")&&this.sideBarService.getSideBarComp().close("api")}getOpenedToolPanel(){return this.assertSideBarLoaded("getOpenedToolPanel")?this.sideBarService.getSideBarComp().openedItem():null}refreshToolPanel(){this.assertSideBarLoaded("refreshToolPanel")&&this.sideBarService.getSideBarComp().refresh()}isToolPanelShowing(){return this.assertSideBarLoaded("isToolPanelShowing")&&this.sideBarService.getSideBarComp().isToolPanelShowing()}getToolPanelInstance(e){if(this.assertSideBarLoaded("getToolPanelInstance")){const t=this.sideBarService.getSideBarComp().getToolPanelInstance(e);return Zn(t)}}getSideBar(){if(this.assertSideBarLoaded("getSideBar"))return this.sideBarService.getSideBarComp().getDef()}resetRowHeights(){if(b(this.clientSideRowModel)){if(this.columnModel.isAutoRowHeightActive()){console.warn("AG Grid: calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.");return}this.clientSideRowModel.resetRowHeights()}}setRowCount(e,t){if(this.serverSideRowModel){if(this.columnModel.isRowGroupEmpty()){this.serverSideRowModel.setRowCount(e,t);return}console.error("AG Grid: setRowCount cannot be used while using row grouping.");return}if(this.infiniteRowModel){this.infiniteRowModel.setRowCount(e,t);return}this.logMissingRowModel("setRowCount","infinite","serverSide")}onRowHeightChanged(){this.clientSideRowModel?this.clientSideRowModel.onRowHeightChanged():this.serverSideRowModel&&this.serverSideRowModel.onRowHeightChanged()}getValue(e,t){return this.logDeprecation("31.3","getValue","getCellValue"),this.getCellValue({colKey:e,rowNode:t})}getCellValue(e){var t;const{colKey:i,rowNode:s,useFormatter:n}=e;let o=(t=this.columnModel.getPrimaryColumn(i))!=null?t:this.columnModel.getGridColumn(i);if(q(o))return null;const r=this.valueService.getValue(o,s);if(n){const l=this.valueService.formatValue(o,s,r);return l??Xe(r,!0)}return r}addEventListener(e,t){this.apiEventService.addEventListener(e,t)}addGlobalListener(e){this.apiEventService.addGlobalListener(e)}removeEventListener(e,t){this.apiEventService.removeEventListener(e,t)}removeGlobalListener(e){this.apiEventService.removeGlobalListener(e)}dispatchEvent(e){this.eventService.dispatchEvent(e)}destroy(){var e;const t=`See ${this.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}`;if(this.destroyCalled)return;const i={type:g.EVENT_GRID_PRE_DESTROYED,state:this.getState()};this.dispatchEvent(i),this.destroyCalled=!0,(e=this.ctrlsService.get("gridCtrl"))==null||e.destroyGridUi(),this.context.destroy(),this.detailGridInfoMap={},qS(this,["isDestroyed"],t)}isDestroyed(){return this.destroyCalled}resetQuickFilter(){this.filterManager.resetQuickFilterCache()}getCellRanges(){return this.rangeService?this.rangeService.getCellRanges():(he.__assertRegistered("@ag-grid-enterprise/range-selection","api.getCellRanges",this.context.getGridId()),null)}addCellRange(e){if(this.rangeService){this.rangeService.addCellRange(e);return}he.__assertRegistered("@ag-grid-enterprise/range-selection","api.addCellRange",this.context.getGridId())}clearRangeSelection(){this.rangeService&&this.rangeService.removeAllCellRanges(),he.__assertRegistered("@ag-grid-enterprise/range-selection","gridApi.clearRangeSelection",this.context.getGridId())}undoCellEditing(){this.undoRedoService.undo("api")}redoCellEditing(){this.undoRedoService.redo("api")}getCurrentUndoSize(){return this.undoRedoService.getCurrentUndoStackSize()}getCurrentRedoSize(){return this.undoRedoService.getCurrentRedoStackSize()}assertChart(e,t){if(he.__assertRegistered("@ag-grid-enterprise/charts","api."+e,this.context.getGridId()))return this.frameworkOverrides.wrapIncoming(()=>t())}getChartModels(){return this.assertChart("getChartModels",()=>this.chartService.getChartModels())}getChartRef(e){return this.assertChart("getChartRef",()=>this.chartService.getChartRef(e))}getChartImageDataURL(e){return this.assertChart("getChartImageDataURL",()=>this.chartService.getChartImageDataURL(e))}downloadChart(e){return this.assertChart("downloadChart",()=>this.chartService.downloadChart(e))}openChartToolPanel(e){return this.assertChart("openChartToolPanel",()=>this.chartService.openChartToolPanel(e))}closeChartToolPanel(e){return this.assertChart("closeChartToolPanel",()=>this.chartService.closeChartToolPanel(e.chartId))}createRangeChart(e){return this.assertChart("createRangeChart",()=>this.chartService.createRangeChart(e))}createPivotChart(e){return this.assertChart("createPivotChart",()=>this.chartService.createPivotChart(e))}createCrossFilterChart(e){return this.assertChart("createCrossFilterChart",()=>this.chartService.createCrossFilterChart(e))}updateChart(e){return this.assertChart("updateChart",()=>this.chartService.updateChart(e))}restoreChart(e,t){return this.assertChart("restoreChart",()=>this.chartService.restoreChart(e,t))}assertClipboard(e,t){he.__assertRegistered("@ag-grid-enterprise/clipboard","api"+e,this.context.getGridId())&&t()}copyToClipboard(e){this.assertClipboard("copyToClipboard",()=>this.clipboardService.copyToClipboard(e))}cutToClipboard(e){this.assertClipboard("cutToClipboard",()=>this.clipboardService.cutToClipboard(e))}copySelectedRowsToClipboard(e){this.assertClipboard("copySelectedRowsToClipboard",()=>this.clipboardService.copySelectedRowsToClipboard(e))}copySelectedRangeToClipboard(e){this.assertClipboard("copySelectedRangeToClipboard",()=>this.clipboardService.copySelectedRangeToClipboard(e))}copySelectedRangeDown(){this.assertClipboard("copySelectedRangeDown",()=>this.clipboardService.copyRangeDown())}pasteFromClipboard(){this.assertClipboard("pasteFromClipboard",()=>this.clipboardService.pasteFromClipboard())}showColumnMenuAfterButtonClick(e,t){K("'showColumnMenuAfterButtonClick' is deprecated. Use 'IHeaderParams.showColumnMenu' within a header component, or 'api.showColumnMenu' elsewhere.");const i=this.columnModel.getGridColumn(e);this.menuService.showColumnMenu({column:i,buttonElement:t,positionBy:"button"})}showColumnMenuAfterMouseClick(e,t){K("'showColumnMenuAfterMouseClick' is deprecated. Use 'IHeaderParams.showColumnMenuAfterMouseClick' within a header component, or 'api.showColumnMenu' elsewhere.");let i=this.columnModel.getGridColumn(e);if(i||(i=this.columnModel.getPrimaryColumn(e)),!i){console.error(`AG Grid: column '${e}' not found`);return}this.menuService.showColumnMenu({column:i,mouseEvent:t,positionBy:"mouse"})}showContextMenu(e){const{rowNode:t,column:i,value:s,x:n,y:o}=e||{};let{x:r,y:l}=this.menuService.getContextMenuPosition(t,i);n!=null&&(r=n),o!=null&&(l=o),this.menuService.showContextMenu({mouseEvent:new MouseEvent("mousedown",{clientX:r,clientY:l}),rowNode:t,column:i,value:s})}showColumnChooser(e){this.menuService.showColumnChooser({chooserParams:e})}showColumnFilter(e){const t=this.columnModel.getGridColumn(e);if(!t){console.error(`AG Grid: column '${e}' not found`);return}this.menuService.showFilterMenu({column:t,containerType:"columnFilter",positionBy:"auto"})}showColumnMenu(e){const t=this.columnModel.getGridColumn(e);if(!t){console.error(`AG Grid: column '${e}' not found`);return}this.menuService.showColumnMenu({column:t,positionBy:"auto"})}hidePopupMenu(){this.menuService.hidePopupMenu()}hideColumnChooser(){this.menuService.hideColumnChooser()}tabToNextCell(e){return this.navigationService.tabToNextCell(!1,e)}tabToPreviousCell(e){return this.navigationService.tabToNextCell(!0,e)}getCellRendererInstances(e={}){return this.rowRenderer.getCellRendererInstances(e).map(Zn)}getCellEditorInstances(e={}){return this.rowRenderer.getCellEditorInstances(e).map(Zn)}getEditingCells(){return this.rowRenderer.getEditingCells()}stopEditing(e=!1){this.rowRenderer.stopEditing(e)}startEditingCell(e){const t=this.columnModel.getGridColumn(e.colKey);if(!t){console.warn(`AG Grid: no column found for ${e.colKey}`);return}const i={rowIndex:e.rowIndex,rowPinned:e.rowPinned||null,column:t};e.rowPinned==null&&this.ensureIndexVisible(e.rowIndex),this.ensureColumnVisible(e.colKey);const n=this.navigationService.getCellByPosition(i);n&&(this.focusService.isCellFocused(i)||this.focusService.setFocusedCell(i),n.startRowOrCellEdit(e.key))}addAggFunc(e,t){this.logDeprecation("v31.1","addAggFunc(key, func)","addAggFuncs({ key: func })"),this.aggFuncService&&this.aggFuncService.addAggFuncs({key:t})}addAggFuncs(e){this.aggFuncService&&this.aggFuncService.addAggFuncs(e)}clearAggFuncs(){this.aggFuncService&&this.aggFuncService.clear()}applyServerSideTransaction(e){if(!this.serverSideTransactionManager){this.logMissingRowModel("applyServerSideTransaction","serverSide");return}return this.serverSideTransactionManager.applyTransaction(e)}applyServerSideTransactionAsync(e,t){if(!this.serverSideTransactionManager){this.logMissingRowModel("applyServerSideTransactionAsync","serverSide");return}return this.serverSideTransactionManager.applyTransactionAsync(e,t)}applyServerSideRowData(e){var t,i;const s=(t=e.startRow)!=null?t:0,n=(i=e.route)!=null?i:[];if(s<0){console.warn(`AG Grid: invalid value ${e.startRow} for startRow, the value should be >= 0`);return}this.serverSideRowModel?this.serverSideRowModel.applyRowData(e.successParams,s,n):this.logMissingRowModel("setServerSideDatasource","serverSide")}retryServerSideLoads(){if(!this.serverSideRowModel){this.logMissingRowModel("retryServerSideLoads","serverSide");return}this.serverSideRowModel.retryLoads()}flushServerSideAsyncTransactions(){if(!this.serverSideTransactionManager){this.logMissingRowModel("flushServerSideAsyncTransactions","serverSide");return}return this.serverSideTransactionManager.flushAsyncTransactions()}applyTransaction(e){if(!this.clientSideRowModel){this.logMissingRowModel("applyTransaction","clientSide");return}return this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.updateRowData(e))}applyTransactionAsync(e,t){if(!this.clientSideRowModel){this.logMissingRowModel("applyTransactionAsync","clientSide");return}this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.batchUpdateRowData(e,t))}flushAsyncTransactions(){if(!this.clientSideRowModel){this.logMissingRowModel("flushAsyncTransactions","clientSide");return}this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.flushAsyncTransactions())}refreshInfiniteCache(){this.infiniteRowModel?this.infiniteRowModel.refreshCache():this.logMissingRowModel("refreshInfiniteCache","infinite")}purgeInfiniteCache(){this.infiniteRowModel?this.infiniteRowModel.purgeCache():this.logMissingRowModel("purgeInfiniteCache","infinite")}refreshServerSide(e){if(!this.serverSideRowModel){this.logMissingRowModel("refreshServerSide","serverSide");return}this.serverSideRowModel.refreshStore(e)}getServerSideGroupLevelState(){return this.serverSideRowModel?this.serverSideRowModel.getStoreState():(this.logMissingRowModel("getServerSideGroupLevelState","serverSide"),[])}getInfiniteRowCount(){if(this.infiniteRowModel)return this.infiniteRowModel.getRowCount();this.logMissingRowModel("getInfiniteRowCount","infinite")}isLastRowIndexKnown(){if(this.infiniteRowModel)return this.infiniteRowModel.isLastRowIndexKnown();this.logMissingRowModel("isLastRowIndexKnown","infinite")}getCacheBlockState(){return this.rowNodeBlockLoader.getBlockState()}getFirstDisplayedRow(){return this.logDeprecation("v31.1","getFirstDisplayedRow","getFirstDisplayedRowIndex"),this.getFirstDisplayedRowIndex()}getFirstDisplayedRowIndex(){return this.rowRenderer.getFirstVirtualRenderedRow()}getLastDisplayedRow(){return this.logDeprecation("v31.1","getLastDisplayedRow","getLastDisplayedRowIndex"),this.getLastDisplayedRowIndex()}getLastDisplayedRowIndex(){return this.rowRenderer.getLastVirtualRenderedRow()}getDisplayedRowAtIndex(e){return this.rowModel.getRow(e)}getDisplayedRowCount(){return this.rowModel.getRowCount()}paginationIsLastPageFound(){return this.paginationProxy.isLastPageFound()}paginationGetPageSize(){return this.paginationProxy.getPageSize()}paginationGetCurrentPage(){return this.paginationProxy.getCurrentPage()}paginationGetTotalPages(){return this.paginationProxy.getTotalPages()}paginationGetRowCount(){return this.paginationProxy.getMasterRowCount()}paginationGoToNextPage(){this.paginationProxy.goToNextPage()}paginationGoToPreviousPage(){this.paginationProxy.goToPreviousPage()}paginationGoToFirstPage(){this.paginationProxy.goToFirstPage()}paginationGoToLastPage(){this.paginationProxy.goToLastPage()}paginationGoToPage(e){this.paginationProxy.goToPage(e)}sizeColumnsToFit(e){typeof e=="number"?this.columnModel.sizeColumnsToFit(e,"api"):this.gridBodyCtrl.sizeColumnsToFit(e)}setColumnGroupOpened(e,t){this.columnModel.setColumnGroupOpened(e,t,"api")}getColumnGroup(e,t){return this.columnModel.getColumnGroup(e,t)}getProvidedColumnGroup(e){return this.columnModel.getProvidedColumnGroup(e)}getDisplayNameForColumn(e,t){return this.columnModel.getDisplayNameForColumn(e,t)||""}getDisplayNameForColumnGroup(e,t){return this.columnModel.getDisplayNameForColumnGroup(e,t)||""}getColumn(e){return this.columnModel.getPrimaryColumn(e)}getColumns(){return this.columnModel.getAllPrimaryColumns()}applyColumnState(e){return this.columnModel.applyColumnState(e,"api")}getColumnState(){return this.columnModel.getColumnState()}resetColumnState(){this.columnModel.resetColumnState("api")}getColumnGroupState(){return this.columnModel.getColumnGroupState()}setColumnGroupState(e){this.columnModel.setColumnGroupState(e,"api")}resetColumnGroupState(){this.columnModel.resetColumnGroupState("api")}isPinning(){return this.columnModel.isPinningLeft()||this.columnModel.isPinningRight()}isPinningLeft(){return this.columnModel.isPinningLeft()}isPinningRight(){return this.columnModel.isPinningRight()}getDisplayedColAfter(e){return this.columnModel.getDisplayedColAfter(e)}getDisplayedColBefore(e){return this.columnModel.getDisplayedColBefore(e)}setColumnVisible(e,t){this.logDeprecation("v31.1","setColumnVisible(key,visible)","setColumnsVisible([key],visible)"),this.columnModel.setColumnsVisible([e],t,"api")}setColumnsVisible(e,t){this.columnModel.setColumnsVisible(e,t,"api")}setColumnPinned(e,t){this.logDeprecation("v31.1","setColumnPinned(key,pinned)","setColumnsPinned([key],pinned)"),this.columnModel.setColumnsPinned([e],t,"api")}setColumnsPinned(e,t){this.columnModel.setColumnsPinned(e,t,"api")}getAllGridColumns(){return this.columnModel.getAllGridColumns()}getDisplayedLeftColumns(){return this.columnModel.getDisplayedLeftColumns()}getDisplayedCenterColumns(){return this.columnModel.getDisplayedCenterColumns()}getDisplayedRightColumns(){return this.columnModel.getDisplayedRightColumns()}getAllDisplayedColumns(){return this.columnModel.getAllDisplayedColumns()}getAllDisplayedVirtualColumns(){return this.columnModel.getViewportColumns()}moveColumn(e,t){this.logDeprecation("v31.1","moveColumn(key, toIndex)","moveColumns([key], toIndex)"),this.columnModel.moveColumns([e],t,"api")}moveColumnByIndex(e,t){this.columnModel.moveColumnByIndex(e,t,"api")}moveColumns(e,t){this.columnModel.moveColumns(e,t,"api")}moveRowGroupColumn(e,t){this.columnModel.moveRowGroupColumn(e,t,"api")}setColumnAggFunc(e,t){this.columnModel.setColumnAggFunc(e,t,"api")}setColumnWidth(e,t,i=!0,s="api"){this.logDeprecation("v31.1","setColumnWidth(col, width)","setColumnWidths([{key: col, newWidth: width}])"),this.columnModel.setColumnWidths([{key:e,newWidth:t}],!1,i,s)}setColumnWidths(e,t=!0,i="api"){this.columnModel.setColumnWidths(e,!1,t,i)}isPivotMode(){return this.columnModel.isPivotMode()}getPivotResultColumn(e,t){return this.columnModel.getSecondaryPivotColumn(e,t)}setValueColumns(e){this.columnModel.setValueColumns(e,"api")}getValueColumns(){return this.columnModel.getValueColumns()}removeValueColumn(e){this.logDeprecation("v31.1","removeValueColumn(colKey)","removeValueColumns([colKey])"),this.columnModel.removeValueColumns([e],"api")}removeValueColumns(e){this.columnModel.removeValueColumns(e,"api")}addValueColumn(e){this.logDeprecation("v31.1","addValueColumn(colKey)","addValueColumns([colKey])"),this.columnModel.addValueColumns([e],"api")}addValueColumns(e){this.columnModel.addValueColumns(e,"api")}setRowGroupColumns(e){this.columnModel.setRowGroupColumns(e,"api")}removeRowGroupColumn(e){this.logDeprecation("v31.1","removeRowGroupColumn(colKey)","removeRowGroupColumns([colKey])"),this.columnModel.removeRowGroupColumns([e],"api")}removeRowGroupColumns(e){this.columnModel.removeRowGroupColumns(e,"api")}addRowGroupColumn(e){this.logDeprecation("v31.1","addRowGroupColumn(colKey)","addRowGroupColumns([colKey])"),this.columnModel.addRowGroupColumns([e],"api")}addRowGroupColumns(e){this.columnModel.addRowGroupColumns(e,"api")}getRowGroupColumns(){return this.columnModel.getRowGroupColumns()}setPivotColumns(e){this.columnModel.setPivotColumns(e,"api")}removePivotColumn(e){this.logDeprecation("v31.1","removePivotColumn(colKey)","removePivotColumns([colKey])"),this.columnModel.removePivotColumns([e],"api")}removePivotColumns(e){this.columnModel.removePivotColumns(e,"api")}addPivotColumn(e){this.logDeprecation("v31.1","addPivotColumn(colKey)","addPivotColumns([colKey])"),this.columnModel.addPivotColumns([e],"api")}addPivotColumns(e){this.columnModel.addPivotColumns(e,"api")}getPivotColumns(){return this.columnModel.getPivotColumns()}getLeftDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeLeft()}getCenterDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeCentre()}getRightDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeRight()}getAllDisplayedColumnGroups(){return this.columnModel.getAllDisplayedTrees()}autoSizeColumn(e,t){return this.logDeprecation("v31.1","autoSizeColumn(key, skipHeader)","autoSizeColumns([key], skipHeader)"),this.columnModel.autoSizeColumns({columns:[e],skipHeader:t,source:"api"})}autoSizeColumns(e,t){this.columnModel.autoSizeColumns({columns:e,skipHeader:t,source:"api"})}autoSizeAllColumns(e){this.columnModel.autoSizeAllColumns("api",e)}setPivotResultColumns(e){this.columnModel.setSecondaryColumns(e,"api")}getPivotResultColumns(){return this.columnModel.getSecondaryColumns()}getState(){return this.stateService.getState()}getGridOption(e){return this.gos.get(e)}setGridOption(e,t){this.updateGridOptions({[e]:t})}updateGridOptions(e){this.gos.updateGridOptions({options:e})}__internalUpdateGridOptions(e,t){this.gos.updateGridOptions({options:e,force:t,source:"gridOptionsUpdated"})}deprecatedUpdateGridOption(e,t){K(`set${e.charAt(0).toUpperCase()}${e.slice(1,e.length)} is deprecated. Please use 'api.setGridOption('${e}', newValue)' or 'api.updateGridOptions({ ${e}: newValue })' instead.`),this.setGridOption(e,t)}setPivotMode(e){this.deprecatedUpdateGridOption("pivotMode",e)}setPinnedTopRowData(e){this.deprecatedUpdateGridOption("pinnedTopRowData",e)}setPinnedBottomRowData(e){this.deprecatedUpdateGridOption("pinnedBottomRowData",e)}setPopupParent(e){this.deprecatedUpdateGridOption("popupParent",e)}setSuppressModelUpdateAfterUpdateTransaction(e){this.deprecatedUpdateGridOption("suppressModelUpdateAfterUpdateTransaction",e)}setDataTypeDefinitions(e){this.deprecatedUpdateGridOption("dataTypeDefinitions",e)}setPagination(e){this.deprecatedUpdateGridOption("pagination",e)}paginationSetPageSize(e){this.deprecatedUpdateGridOption("paginationPageSize",e)}setSideBar(e){this.deprecatedUpdateGridOption("sideBar",e)}setSuppressClipboardPaste(e){this.deprecatedUpdateGridOption("suppressClipboardPaste",e)}setGroupRemoveSingleChildren(e){this.deprecatedUpdateGridOption("groupRemoveSingleChildren",e)}setGroupRemoveLowestSingleChildren(e){this.deprecatedUpdateGridOption("groupRemoveLowestSingleChildren",e)}setGroupDisplayType(e){this.deprecatedUpdateGridOption("groupDisplayType",e)}setGroupIncludeFooter(e){this.deprecatedUpdateGridOption("groupIncludeFooter",e)}setGroupIncludeTotalFooter(e){this.deprecatedUpdateGridOption("groupIncludeTotalFooter",e)}setRowClass(e){this.deprecatedUpdateGridOption("rowClass",e)}setDeltaSort(e){this.deprecatedUpdateGridOption("deltaSort",e)}setSuppressRowDrag(e){this.deprecatedUpdateGridOption("suppressRowDrag",e)}setSuppressMoveWhenRowDragging(e){this.deprecatedUpdateGridOption("suppressMoveWhenRowDragging",e)}setSuppressRowClickSelection(e){this.deprecatedUpdateGridOption("suppressRowClickSelection",e)}setEnableAdvancedFilter(e){this.deprecatedUpdateGridOption("enableAdvancedFilter",e)}setIncludeHiddenColumnsInAdvancedFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInAdvancedFilter",e)}setAdvancedFilterParent(e){this.deprecatedUpdateGridOption("advancedFilterParent",e)}setAdvancedFilterBuilderParams(e){this.deprecatedUpdateGridOption("advancedFilterBuilderParams",e)}setQuickFilter(e){K("setQuickFilter is deprecated. Please use 'api.setGridOption('quickFilterText', newValue)' or 'api.updateGridOptions({ quickFilterText: newValue })' instead."),this.gos.updateGridOptions({options:{quickFilterText:e}})}setExcludeHiddenColumnsFromQuickFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",!e)}setIncludeHiddenColumnsInQuickFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",e)}setQuickFilterParser(e){this.deprecatedUpdateGridOption("quickFilterParser",e)}setQuickFilterMatcher(e){this.deprecatedUpdateGridOption("quickFilterMatcher",e)}setAlwaysShowHorizontalScroll(e){this.deprecatedUpdateGridOption("alwaysShowHorizontalScroll",e)}setAlwaysShowVerticalScroll(e){this.deprecatedUpdateGridOption("alwaysShowVerticalScroll",e)}setFunctionsReadOnly(e){this.deprecatedUpdateGridOption("functionsReadOnly",e)}setColumnDefs(e,t="api"){K("setColumnDefs is deprecated. Please use 'api.setGridOption('columnDefs', newValue)' or 'api.updateGridOptions({ columnDefs: newValue })' instead."),this.gos.updateGridOptions({options:{columnDefs:e},source:t})}setAutoGroupColumnDef(e,t="api"){K("setAutoGroupColumnDef is deprecated. Please use 'api.setGridOption('autoGroupColumnDef', newValue)' or 'api.updateGridOptions({ autoGroupColumnDef: newValue })' instead."),this.gos.updateGridOptions({options:{autoGroupColumnDef:e},source:t})}setDefaultColDef(e,t="api"){K("setDefaultColDef is deprecated. Please use 'api.setGridOption('defaultColDef', newValue)' or 'api.updateGridOptions({ defaultColDef: newValue })' instead."),this.gos.updateGridOptions({options:{defaultColDef:e},source:t})}setColumnTypes(e,t="api"){K("setColumnTypes is deprecated. Please use 'api.setGridOption('columnTypes', newValue)' or 'api.updateGridOptions({ columnTypes: newValue })' instead."),this.gos.updateGridOptions({options:{columnTypes:e},source:t})}setTreeData(e){this.deprecatedUpdateGridOption("treeData",e)}setServerSideDatasource(e){this.deprecatedUpdateGridOption("serverSideDatasource",e)}setCacheBlockSize(e){this.deprecatedUpdateGridOption("cacheBlockSize",e)}setDatasource(e){this.deprecatedUpdateGridOption("datasource",e)}setViewportDatasource(e){this.deprecatedUpdateGridOption("viewportDatasource",e)}setRowData(e){this.deprecatedUpdateGridOption("rowData",e)}setEnableCellTextSelection(e){this.deprecatedUpdateGridOption("enableCellTextSelection",e)}setHeaderHeight(e){this.deprecatedUpdateGridOption("headerHeight",e)}setDomLayout(e){this.deprecatedUpdateGridOption("domLayout",e)}setFillHandleDirection(e){this.deprecatedUpdateGridOption("fillHandleDirection",e)}setGroupHeaderHeight(e){this.deprecatedUpdateGridOption("groupHeaderHeight",e)}setFloatingFiltersHeight(e){this.deprecatedUpdateGridOption("floatingFiltersHeight",e)}setPivotHeaderHeight(e){this.deprecatedUpdateGridOption("pivotHeaderHeight",e)}setPivotGroupHeaderHeight(e){this.deprecatedUpdateGridOption("pivotGroupHeaderHeight",e)}setAnimateRows(e){this.deprecatedUpdateGridOption("animateRows",e)}setIsExternalFilterPresent(e){this.deprecatedUpdateGridOption("isExternalFilterPresent",e)}setDoesExternalFilterPass(e){this.deprecatedUpdateGridOption("doesExternalFilterPass",e)}setNavigateToNextCell(e){this.deprecatedUpdateGridOption("navigateToNextCell",e)}setTabToNextCell(e){this.deprecatedUpdateGridOption("tabToNextCell",e)}setTabToNextHeader(e){this.deprecatedUpdateGridOption("tabToNextHeader",e)}setNavigateToNextHeader(e){this.deprecatedUpdateGridOption("navigateToNextHeader",e)}setRowGroupPanelShow(e){this.deprecatedUpdateGridOption("rowGroupPanelShow",e)}setGetGroupRowAgg(e){this.deprecatedUpdateGridOption("getGroupRowAgg",e)}setGetBusinessKeyForNode(e){this.deprecatedUpdateGridOption("getBusinessKeyForNode",e)}setGetChildCount(e){this.deprecatedUpdateGridOption("getChildCount",e)}setProcessRowPostCreate(e){this.deprecatedUpdateGridOption("processRowPostCreate",e)}setGetRowId(e){K("getRowId is a static property and can no longer be updated.")}setGetRowClass(e){this.deprecatedUpdateGridOption("getRowClass",e)}setIsFullWidthRow(e){this.deprecatedUpdateGridOption("isFullWidthRow",e)}setIsRowSelectable(e){this.deprecatedUpdateGridOption("isRowSelectable",e)}setIsRowMaster(e){this.deprecatedUpdateGridOption("isRowMaster",e)}setPostSortRows(e){this.deprecatedUpdateGridOption("postSortRows",e)}setGetDocument(e){this.deprecatedUpdateGridOption("getDocument",e)}setGetContextMenuItems(e){this.deprecatedUpdateGridOption("getContextMenuItems",e)}setGetMainMenuItems(e){this.deprecatedUpdateGridOption("getMainMenuItems",e)}setProcessCellForClipboard(e){this.deprecatedUpdateGridOption("processCellForClipboard",e)}setSendToClipboard(e){this.deprecatedUpdateGridOption("sendToClipboard",e)}setProcessCellFromClipboard(e){this.deprecatedUpdateGridOption("processCellFromClipboard",e)}setProcessPivotResultColDef(e){this.deprecatedUpdateGridOption("processPivotResultColDef",e)}setProcessPivotResultColGroupDef(e){this.deprecatedUpdateGridOption("processPivotResultColGroupDef",e)}setPostProcessPopup(e){this.deprecatedUpdateGridOption("postProcessPopup",e)}setInitialGroupOrderComparator(e){this.deprecatedUpdateGridOption("initialGroupOrderComparator",e)}setGetChartToolbarItems(e){this.deprecatedUpdateGridOption("getChartToolbarItems",e)}setPaginationNumberFormatter(e){this.deprecatedUpdateGridOption("paginationNumberFormatter",e)}setGetServerSideGroupLevelParams(e){this.deprecatedUpdateGridOption("getServerSideGroupLevelParams",e)}setIsServerSideGroupOpenByDefault(e){this.deprecatedUpdateGridOption("isServerSideGroupOpenByDefault",e)}setIsApplyServerSideTransaction(e){this.deprecatedUpdateGridOption("isApplyServerSideTransaction",e)}setIsServerSideGroup(e){this.deprecatedUpdateGridOption("isServerSideGroup",e)}setGetServerSideGroupKey(e){this.deprecatedUpdateGridOption("getServerSideGroupKey",e)}setGetRowStyle(e){this.deprecatedUpdateGridOption("getRowStyle",e)}setGetRowHeight(e){this.deprecatedUpdateGridOption("getRowHeight",e)}};c([f("rowRenderer")],oe.prototype,"rowRenderer",2);c([f("navigationService")],oe.prototype,"navigationService",2);c([f("filterManager")],oe.prototype,"filterManager",2);c([f("columnModel")],oe.prototype,"columnModel",2);c([f("selectionService")],oe.prototype,"selectionService",2);c([f("gridOptionsService")],oe.prototype,"gos",2);c([f("valueService")],oe.prototype,"valueService",2);c([f("alignedGridsService")],oe.prototype,"alignedGridsService",2);c([f("eventService")],oe.prototype,"eventService",2);c([f("pinnedRowModel")],oe.prototype,"pinnedRowModel",2);c([f("context")],oe.prototype,"context",2);c([f("rowModel")],oe.prototype,"rowModel",2);c([f("sortController")],oe.prototype,"sortController",2);c([f("paginationProxy")],oe.prototype,"paginationProxy",2);c([f("focusService")],oe.prototype,"focusService",2);c([f("dragAndDropService")],oe.prototype,"dragAndDropService",2);c([f("menuService")],oe.prototype,"menuService",2);c([f("valueCache")],oe.prototype,"valueCache",2);c([f("animationFrameService")],oe.prototype,"animationFrameService",2);c([f("ctrlsService")],oe.prototype,"ctrlsService",2);c([f("overlayService")],oe.prototype,"overlayService",2);c([f("stateService")],oe.prototype,"stateService",2);c([f("expansionService")],oe.prototype,"expansionService",2);c([f("apiEventService")],oe.prototype,"apiEventService",2);c([f("frameworkOverrides")],oe.prototype,"frameworkOverrides",2);c([f("undoRedoService")],oe.prototype,"undoRedoService",2);c([f("rowNodeBlockLoader")],oe.prototype,"rowNodeBlockLoader",2);c([fe("csvCreator")],oe.prototype,"csvCreator",2);c([fe("excelCreator")],oe.prototype,"excelCreator",2);c([fe("rangeService")],oe.prototype,"rangeService",2);c([fe("clipboardService")],oe.prototype,"clipboardService",2);c([fe("aggFuncService")],oe.prototype,"aggFuncService",2);c([fe("statusBarService")],oe.prototype,"statusBarService",2);c([fe("chartService")],oe.prototype,"chartService",2);c([fe("ssrmTransactionManager")],oe.prototype,"serverSideTransactionManager",2);c([fe("sideBarService")],oe.prototype,"sideBarService",2);c([M],oe.prototype,"init",1);oe=c([H("gridApi")],oe);var ti=class extends L{constructor(){super(...arguments),this.quickFilter=null,this.quickFilterParts=null}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,()=>{this.gos.get("includeHiddenColumnsInQuickFilter")||this.resetQuickFilterCache()}),this.addManagedPropertyListener("quickFilterText",e=>this.setQuickFilter(e.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onQuickFilterColumnConfigChanged()),this.quickFilter=this.parseQuickFilter(this.gos.get("quickFilterText")),this.parser=this.gos.get("quickFilterParser"),this.matcher=this.gos.get("quickFilterMatcher"),this.setQuickFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setQuickFilterParserAndMatcher())}isQuickFilterPresent(){return this.quickFilter!==null}doesRowPassQuickFilter(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassQuickFilterMatcher(t,e):this.quickFilterParts.every(i=>t?this.doesRowPassQuickFilterCache(e,i):this.doesRowPassQuickFilterNoCache(e,i))}resetQuickFilterCache(){this.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}setQuickFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseQuickFilter(e){return b(e)?this.gos.isRowModelType("clientSide")?e.toUpperCase():(console.warn("AG Grid - Quick filtering only works with the Client-Side Row Model"),null):null}setQuickFilter(e){if(e!=null&&typeof e!="string"){console.warn(`AG Grid - Grid option quickFilterText only supports string inputs, received: ${typeof e}`);return}const t=this.parseQuickFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setQuickFilterParts(),this.dispatchEvent({type:ti.EVENT_QUICK_FILTER_CHANGED}))}setQuickFilterParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),i=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,i&&(this.setQuickFilterParts(),this.dispatchEvent({type:ti.EVENT_QUICK_FILTER_CHANGED}))}onQuickFilterColumnConfigChanged(){this.columnModel.refreshQuickFilterColumns(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.dispatchEvent({type:ti.EVENT_QUICK_FILTER_CHANGED})}doesRowPassQuickFilterNoCache(e,t){return this.columnModel.getAllColumnsForQuickFilter().some(s=>{const n=this.getQuickFilterTextForColumn(s,e);return b(n)&&n.indexOf(t)>=0})}doesRowPassQuickFilterCache(e,t){return this.checkGenerateQuickFilterAggregateText(e),e.quickFilterAggregateText.indexOf(t)>=0}doesRowPassQuickFilterMatcher(e,t){let i;e?(this.checkGenerateQuickFilterAggregateText(t),i=t.quickFilterAggregateText):i=this.getQuickFilterAggregateText(t);const{quickFilterParts:s,matcher:n}=this;return n(s,i)}checkGenerateQuickFilterAggregateText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getQuickFilterAggregateText(e))}getQuickFilterTextForColumn(e,t){let i=this.valueService.getValue(e,t,!0);const s=e.getColDef();if(s.getQuickFilterText){const n=this.gos.addGridCommonParams({value:i,node:t,data:t.data,column:e,colDef:s});i=s.getQuickFilterText(n)}return b(i)?i.toString().toUpperCase():null}getQuickFilterAggregateText(e){const t=[];return this.columnModel.getAllColumnsForQuickFilter().forEach(s=>{const n=this.getQuickFilterTextForColumn(s,e);b(n)&&t.push(n)}),t.join(ti.QUICK_FILTER_SEPARATOR)}};ti.EVENT_QUICK_FILTER_CHANGED="quickFilterChanged";ti.QUICK_FILTER_SEPARATOR=`
|
|
141
|
+
`;c([f("valueService")],ti.prototype,"valueService",2);c([f("columnModel")],ti.prototype,"columnModel",2);c([f("rowModel")],ti.prototype,"rowModel",2);c([M],ti.prototype,"postConstruct",1);ti=c([H("quickFilterService")],ti);var Gi=class extends L{constructor(){super(...arguments),this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue=[],this.advancedFilterModelUpdateQueue=[]}init(){var e,t,i;this.addManagedListener(this.eventService,g.EVENT_GRID_COLUMNS_CHANGED,()=>this.onColumnsChanged()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VALUE_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,()=>this.updateAdvancedFilterColumns()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,()=>this.updateAdvancedFilterColumns()),this.addManagedListener(this.eventService,g.EVENT_ROW_DATA_UPDATED,()=>this.onNewRowsLoaded("rowDataUpdated")),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.addManagedPropertyListener("advancedFilterModel",s=>this.setAdvancedFilterModel(s.currentValue)),this.addManagedListener(this.eventService,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,({enabled:s})=>this.onAdvancedFilterEnabledChanged(s)),this.addManagedListener(this.eventService,g.EVENT_DATA_TYPES_INFERRED,()=>this.processFilterModelUpdateQueue()),this.addManagedListener(this.quickFilterService,ti.EVENT_QUICK_FILTER_CHANGED,()=>this.onFilterChanged({source:"quickFilter"})),this.initialFilterModel=$({},(i=(t=(e=this.gos.get("initialState"))==null?void 0:e.filter)==null?void 0:t.filterModel)!=null?i:{})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"?e({}):!1}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"?t(e):!1}setFilterModel(e,t="api"){if(this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return}if(this.dataTypeService.isPendingInference()){this.filterModelUpdateQueue.push({model:e,source:t});return}const i=[],s=this.getFilterModel();if(e){const n=gm(Object.keys(e));this.allColumnFilters.forEach((o,r)=>{const l=e[r];i.push(this.setModelOnFilterWrapper(o.filterPromise,l)),n.delete(r)}),n.forEach(o=>{const r=this.columnModel.getPrimaryColumn(o)||this.columnModel.getGridColumn(o);if(!r){console.warn("AG Grid: setFilterModel() - no column found for colId: "+o);return}if(!r.isFilterAllowed()){console.warn("AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+o);return}const l=this.getOrCreateFilterWrapper(r,"NO_UI");if(!l){console.warn("AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: "+o);return}i.push(this.setModelOnFilterWrapper(l.filterPromise,e[o]))})}else this.allColumnFilters.forEach(n=>{i.push(this.setModelOnFilterWrapper(n.filterPromise,null))});Ze.all(i).then(()=>{const n=this.getFilterModel(),o=[];this.allColumnFilters.forEach((r,l)=>{const a=s?s[l]:null,u=n?n[l]:null;Q.jsonEquals(a,u)||o.push(r.column)}),o.length>0&&this.onFilterChanged({columns:o,source:t})})}setModelOnFilterWrapper(e,t){return new Ze(i=>{e.then(s=>{typeof s.setModel!="function"&&(console.warn("AG Grid: filter missing setModel method, which is needed for setFilterModel"),i()),(s.setModel(t)||Ze.resolve()).then(()=>i())})})}getFilterModel(){const e={};return this.allColumnFilters.forEach((t,i)=>{const s=this.getModelFromFilterWrapper(t);b(s)&&(e[i]=s)}),e}getModelFromFilterWrapper(e){var t;const s=e.filterPromise.resolveNow(null,n=>n);return s==null?(t=this.initialFilterModel[e.column.getColId()])!=null?t:null:typeof s.getModel!="function"?(console.warn("AG Grid: filter API missing getModel method, which is needed for getFilterModel"),null):s.getModel()}isColumnFilterPresent(){return this.activeColumnFilters.length>0}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length}isExternalFilterPresent(){return this.externalFilterPresent}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}isAdvancedFilterPresent(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isFilterPresent()}onAdvancedFilterEnabledChanged(e){var t;e?this.allColumnFilters.size&&(this.allColumnFilters.forEach(i=>this.disposeFilterWrapper(i,"advancedFilterEnabled")),this.onFilterChanged({source:"advancedFilter"})):(t=this.advancedFilterService)!=null&&t.isFilterPresent()&&(this.advancedFilterService.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvancedFilterEnabled(){var e;return!!((e=this.advancedFilterService)!=null&&e.isEnabled())}isAdvancedFilterHeaderActive(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isHeaderActive()}doAggregateFiltersPass(e,t){return this.doColumnFiltersPass(e,t,!0)}updateActiveFilters(){this.activeColumnFilters.length=0,this.activeAggregateFilters.length=0;const e=s=>s?s.isFilterActive?s.isFilterActive():(console.warn("AG Grid: Filter is missing isFilterActive() method"),!1):!1,t=!!this.gos.getGroupAggFiltering(),i=s=>{if(!s.isPrimary())return!0;const o=!this.columnModel.isPivotActive();return!s.isValueActive()||!o?!1:this.columnModel.isPivotMode()?!0:t};this.allColumnFilters.forEach(s=>{if(s.filterPromise.resolveNow(!1,e)){const n=s.filterPromise.resolveNow(null,o=>o);i(s.column)?this.activeAggregateFilters.push(n):this.activeColumnFilters.push(n)}})}updateFilterFlagInColumns(e,t){this.allColumnFilters.forEach(i=>{const s=i.filterPromise.resolveNow(!1,n=>n.isFilterActive());i.column.setFilterActive(s,e,t)})}isAnyFilterPresent(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}doColumnFiltersPass(e,t,i){const{data:s,aggData:n}=e,o=i?this.activeAggregateFilters:this.activeColumnFilters,r=i?n:s;for(let l=0;l<o.length;l++){const a=o[l];if(!(a==null||a===t)){if(typeof a.doesFilterPass!="function")throw new Error("Filter is missing method doesFilterPass");if(!a.doesFilterPass({node:e,data:r}))return!1}}return!0}resetQuickFilterCache(){this.quickFilterService.resetQuickFilterCache()}refreshFiltersForAggregations(){this.gos.getGroupAggFiltering()&&this.onFilterChanged()}callOnFilterChangedOutsideRenderCycle(e){const t=()=>this.onFilterChanged(e);this.rowRenderer.isRefreshInProgress()?setTimeout(t,0):t()}onFilterChanged(e={}){const{source:t,filterInstance:i,additionalEventAttributes:s,columns:n}=e;this.updateDependantFilters(),this.updateActiveFilters(),this.updateFilterFlagInColumns("filterChanged",s),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.allColumnFilters.forEach(r=>{r.filterPromise&&r.filterPromise.then(l=>{l&&l!==i&&l.onAnyFilterChanged&&l.onAnyFilterChanged()})});const o={source:t,type:g.EVENT_FILTER_CHANGED,columns:n||[]};s&&Zt(o,s),this.processingFilterChange=!0,this.eventService.dispatchEvent(o),this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){var e;return!((e=this.gos.get("allowShowChangeAfterFilter"))!=null?e:!1)&&this.processingFilterChange}isQuickFilterPresent(){return this.quickFilterService.isQuickFilterPresent()}updateAggFiltering(){this.aggFiltering=!!this.gos.getGroupAggFiltering()}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.columnModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e})}doesRowPassAggregateFilters(e){return!(this.isAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isAggregateFilterPresent()&&!this.doAggregateFiltersPass(e.rowNode,e.filterInstanceToSkip))}doesRowPassFilter(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))}onNewRowsLoaded(e){this.allColumnFilters.forEach(t=>{t.filterPromise.then(i=>{i.onNewRowsLoaded&&i.onNewRowsLoaded()})}),this.updateFilterFlagInColumns(e,{afterDataChange:!0}),this.updateActiveFilters()}createValueGetter(e){return({node:t})=>this.valueService.getValue(e,t,!0)}createGetValue(e){return(t,i)=>{const s=i?this.columnModel.getGridColumn(i):e;return s?this.valueService.getValue(s,t,!0):void 0}}getFilterComponent(e,t,i=!0){var s;if(i)return((s=this.getOrCreateFilterWrapper(e,t))==null?void 0:s.filterPromise)||null;const n=this.cachedFilter(e);return n?n.filterPromise:null}isFilterActive(e){const t=this.cachedFilter(e);return!!t&&t.filterPromise.resolveNow(!1,i=>i.isFilterActive())}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return null;let i=this.cachedFilter(e);return i||(i=this.createFilterWrapper(e,t),this.setColumnFilterWrapper(e,i)),i}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e){let t;if(he.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()))t="agSetColumnFilter";else{const i=this.dataTypeService.getBaseDataType(e);i==="number"?t="agNumberColumnFilter":i==="date"||i==="dateString"?t="agDateColumnFilter":t="agTextColumnFilter"}return t}getDefaultFloatingFilter(e){let t;if(he.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()))t="agSetColumnFloatingFilter";else{const i=this.dataTypeService.getBaseDataType(e);i==="number"?t="agNumberColumnFloatingFilter":i==="date"||i==="dateString"?t="agDateColumnFloatingFilter":t="agTextColumnFloatingFilter"}return t}createFilterInstance(e){const t=this.getDefaultFilter(e),i=e.getColDef();let s;const n=Me($({},this.createFilterParams(e,i)),{filterModifiedCallback:()=>this.filterModifiedCallbackFactory(s,e)(),filterChangedCallback:r=>this.filterChangedCallbackFactory(s,e)(r),doesRowPassOtherFilter:r=>this.doesRowPassOtherFilters(s,r)}),o=this.userComponentFactory.getFilterDetails(i,n,t);return o?{filterPromise:()=>{const r=o.newAgStackInstance();return r&&r.then(l=>s=l),r},compDetails:o}:{filterPromise:null,compDetails:null}}createFilterParams(e,t){return this.gos.addGridCommonParams({column:e,colDef:Vf(t),rowModel:this.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},valueGetter:this.createValueGetter(e),getValue:this.createGetValue(e),doesRowPassOtherFilter:()=>!0})}createFilterWrapper(e,t){var i;const s={column:e,filterPromise:null,compiledElement:null,compDetails:null},{filterPromise:n,compDetails:o}=this.createFilterInstance(e);return s.filterPromise=(i=n==null?void 0:n())!=null?i:null,s.compDetails=o,s}onColumnsChanged(){const e=[];this.allColumnFilters.forEach((t,i)=>{let s;t.column.isPrimary()?s=this.columnModel.getPrimaryColumn(i):s=this.columnModel.getGridColumn(i),!(s&&s===t.column)&&(e.push(t.column),this.disposeFilterWrapper(t,"columnChanged"),this.disposeColumnListener(i))}),e.length>0?this.onFilterChanged({columns:e,source:"api"}):this.updateDependantFilters()}updateDependantFilters(){const e=this.columnModel.getGroupAutoColumns();e==null||e.forEach(t=>{t.getColDef().filter==="agGroupColumnFilter"&&this.getOrCreateFilterWrapper(t,"NO_UI")})}isFilterAllowed(e){var t,i;if(this.isAdvancedFilterEnabled()||!e.isFilterAllowed())return!1;const n=this.allColumnFilters.get(e.getColId());return(i=(t=n==null?void 0:n.filterPromise)==null?void 0:t.resolveNow(!0,o=>typeof(o==null?void 0:o.isFilterAllowed)=="function"?o==null?void 0:o.isFilterAllowed():!0))!=null?i:!0}getFloatingFilterCompDetails(e,t){const i=a=>{const u=this.getFilterComponent(e,"NO_UI");u!=null&&u.then(d=>{a(Zn(d))})},s=e.getColDef(),n=Me($({},this.createFilterParams(e,s)),{filterChangedCallback:()=>i(a=>this.filterChangedCallbackFactory(a,e)())}),o=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(s,vg,n);let r=this.userComponentFactory.getDefaultFloatingFilterType(s,()=>this.getDefaultFloatingFilter(e));r==null&&(r="agReadOnlyFloatingFilter");const l={column:e,filterParams:o,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:i,showParentFilter:t,suppressFilterButton:!1};return this.userComponentFactory.getFloatingFilterCompDetails(s,l,r)}getCurrentFloatingFilterParentModel(e){const t=this.getFilterComponent(e,"NO_UI",!1);return t?t.resolveNow(null,i=>i&&i.getModel()):null}destroyFilter(e,t="api"){const i=e.getColId(),s=this.allColumnFilters.get(i);this.disposeColumnListener(i),delete this.initialFilterModel[i],s&&(this.disposeFilterWrapper(s,t),this.onFilterChanged({columns:[e],source:"api"}))}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){e.filterPromise.then(i=>{this.getContext().destroyBean(i),e.column.setFilterActive(!1,"filterDestroyed"),this.allColumnFilters.delete(e.column.getColId());const s={type:g.EVENT_FILTER_DESTROYED,source:t,column:e.column};this.eventService.dispatchEvent(s)})}filterModifiedCallbackFactory(e,t){return()=>{const i={type:g.EVENT_FILTER_MODIFIED,column:t,filterInstance:e};this.eventService.dispatchEvent(i)}}filterChangedCallbackFactory(e,t){return i=>{var s;const n=(s=i==null?void 0:i.source)!=null?s:"api",o={filter:e,additionalEventAttributes:i,columns:[t],source:n};this.callOnFilterChangedOutsideRenderCycle(o)}}checkDestroyFilter(e){const t=this.allColumnFilters.get(e);if(!t)return;const i=t.column,{compDetails:s}=i.isFilterAllowed()?this.createFilterInstance(i):{compDetails:null};if(this.areFilterCompsDifferent(t.compDetails,s)){this.destroyFilter(i,"paramsUpdated");return}const n=i.getColDef().filterParams;if(!t.filterPromise){this.destroyFilter(i,"paramsUpdated");return}t.filterPromise.then(o=>{(o!=null&&o.refresh?o.refresh($(Me($({},this.createFilterParams(i,i.getColDef())),{filterModifiedCallback:this.filterModifiedCallbackFactory(o,i),filterChangedCallback:this.filterChangedCallbackFactory(o,i),doesRowPassOtherFilter:l=>this.doesRowPassOtherFilters(o,l)}),n)):!0)===!1&&this.destroyFilter(i,"paramsUpdated")})}setColumnFilterWrapper(e,t){const i=e.getColId();this.allColumnFilters.set(i,t),this.allColumnListeners.set(i,this.addManagedListener(e,Ee.EVENT_COL_DEF_CHANGED,()=>this.checkDestroyFilter(i)))}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:i}=e,{componentClass:s}=t;return!(i===s||(i==null?void 0:i.render)&&(s==null?void 0:s.render)&&i.render===s.render)}getAdvancedFilterModel(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null}setAdvancedFilterModel(e){if(this.isAdvancedFilterEnabled()){if(this.dataTypeService.isPendingInference()){this.advancedFilterModelUpdateQueue.push(e);return}this.advancedFilterService.setModel(e??null),this.onFilterChanged({source:"advancedFilter"})}}showAdvancedFilterBuilder(e){this.isAdvancedFilterEnabled()&&this.advancedFilterService.getCtrl().toggleFilterBuilder(e,!0)}updateAdvancedFilterColumns(){this.isAdvancedFilterEnabled()&&this.advancedFilterService.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return this.isAdvancedFilterEnabled()?!1:this.columnModel.getAllGridColumns().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e,t){if(this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return}const i=this.getFilterInstanceImpl(e,n=>{if(!t)return;const o=Zn(n);t(o)});return Zn(i)}getColumnFilterInstance(e){return new Promise(t=>{this.getFilterInstance(e,i=>{t(i)})})}getFilterInstanceImpl(e,t){const i=this.columnModel.getPrimaryColumn(e);if(!i)return;const s=this.getFilterComponent(i,"NO_UI"),n=s&&s.resolveNow(null,o=>o);return n?setTimeout(t,0,n):s&&s.then(o=>{t(o)}),n}warnAdvancedFilters(){K("Column Filter API methods have been disabled as Advanced Filters are enabled.")}setupAdvancedFilterHeaderComp(e){var t;(t=this.advancedFilterService)==null||t.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvancedFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvancedFilterHeaderActive()?this.advancedFilterService.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){this.filterModelUpdateQueue.forEach(({model:e,source:t})=>this.setFilterModel(e,t)),this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue.forEach(({key:e,model:t,resolve:i})=>{this.setColumnFilterModel(e,t).then(()=>i())}),this.columnFilterModelUpdateQueue=[],this.advancedFilterModelUpdateQueue.forEach(e=>this.setAdvancedFilterModel(e)),this.advancedFilterModelUpdateQueue=[]}getColumnFilterModel(e){const t=this.getFilterWrapper(e);return t?this.getModelFromFilterWrapper(t):null}setColumnFilterModel(e,t){if(this.isAdvancedFilterEnabled())return this.warnAdvancedFilters(),Promise.resolve();if(this.dataTypeService.isPendingInference()){let o=()=>{};const r=new Promise(l=>{o=l});return this.columnFilterModelUpdateQueue.push({key:e,model:t,resolve:o}),r}const i=this.columnModel.getPrimaryColumn(e),s=i?this.getOrCreateFilterWrapper(i,"NO_UI"):null;return s?(o=>new Promise(r=>{o.then(l=>r(l))}))(this.setModelOnFilterWrapper(s.filterPromise,t)):Promise.resolve()}getFilterWrapper(e){var t;const i=this.columnModel.getPrimaryColumn(e);return i&&(t=this.cachedFilter(i))!=null?t:null}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear()}};c([f("valueService")],Gi.prototype,"valueService",2);c([f("columnModel")],Gi.prototype,"columnModel",2);c([f("rowModel")],Gi.prototype,"rowModel",2);c([f("userComponentFactory")],Gi.prototype,"userComponentFactory",2);c([f("rowRenderer")],Gi.prototype,"rowRenderer",2);c([f("dataTypeService")],Gi.prototype,"dataTypeService",2);c([f("quickFilterService")],Gi.prototype,"quickFilterService",2);c([fe("advancedFilterService")],Gi.prototype,"advancedFilterService",2);c([M],Gi.prototype,"init",1);Gi=c([H("filterManager")],Gi);var $c=class extends Z{constructor(e,t){super('<div class="ag-filter"></div>'),this.column=e,this.source=t,this.filterWrapper=null}postConstruct(){this.createFilter(!0),this.addManagedListener(this.eventService,g.EVENT_FILTER_DESTROYED,this.onFilterDestroyed.bind(this))}hasFilter(){return!!this.filterWrapper}getFilter(){var e,t;return(t=(e=this.filterWrapper)==null?void 0:e.filterPromise)!=null?t:null}afterInit(){var e,t,i;return(i=(t=(e=this.filterWrapper)==null?void 0:e.filterPromise)==null?void 0:t.then(()=>{}))!=null?i:Ze.resolve()}afterGuiAttached(e){var t,i;(i=(t=this.filterWrapper)==null?void 0:t.filterPromise)==null||i.then(s=>{var n;(n=s==null?void 0:s.afterGuiAttached)==null||n.call(s,e)})}afterGuiDetached(){var e,t;(t=(e=this.filterWrapper)==null?void 0:e.filterPromise)==null||t.then(i=>{var s;(s=i==null?void 0:i.afterGuiDetached)==null||s.call(i)})}createFilter(e){var t;const{column:i,source:s}=this;this.filterWrapper=this.filterManager.getOrCreateFilterWrapper(i,s),(t=this.filterWrapper)!=null&&t.filterPromise&&this.filterWrapper.filterPromise.then(n=>{let o=n.getGui();if(b(o)||console.warn(`AG Grid: getGui method from filter returned ${o}, it should be a DOM element or an HTML template string.`),typeof o=="string"&&(o=ei(o)),this.appendChild(o),e){const r={type:g.EVENT_FILTER_OPENED,column:i,source:s,eGui:this.getGui()};this.eventService.dispatchEvent(r)}})}onFilterDestroyed(e){(e.source==="api"||e.source==="paramsUpdated")&&e.column.getId()===this.column.getId()&&this.columnModel.getPrimaryColumn(this.column)&&(je(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}};c([f("filterManager")],$c.prototype,"filterManager",2);c([f("columnModel")],$c.prototype,"columnModel",2);c([M],$c.prototype,"postConstruct",1);var Pm=class extends Z{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},_o=class eT extends Pm{constructor(t){super(eT.TEMPLATE,t)}postConstruct(){const t=this.getGui(),i={addOrRemoveCssClass:(s,n)=>this.addOrRemoveCssClass(s,n),addOrRemoveBodyCssClass:(s,n)=>this.eFloatingFilterBody.classList.toggle(s,n),setButtonWrapperDisplayed:s=>le(this.eButtonWrapper,s),setCompDetails:s=>this.setCompDetails(s),getFloatingFilterComp:()=>this.compPromise,setWidth:s=>t.style.width=s,setMenuIcon:s=>this.eButtonShowMainFilter.appendChild(s)};this.ctrl.setComp(i,t,this.eButtonShowMainFilter,this.eFloatingFilterBody)}setCompDetails(t){if(!t){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=t.newAgStackInstance(),this.compPromise.then(i=>this.afterCompCreated(i))}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(t){if(t){if(!this.isAlive()){this.destroyBean(t);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=t,this.eFloatingFilterBody.appendChild(t.getGui()),t.afterGuiAttached&&t.afterGuiAttached()}}};_o.TEMPLATE=`<div class="ag-header-cell ag-floating-filter" role="gridcell">
|
|
142
|
+
<div ref="eFloatingFilterBody" role="presentation"></div>
|
|
143
|
+
<div class="ag-floating-filter-button ag-hidden" ref="eButtonWrapper" role="presentation">
|
|
144
|
+
<button type="button" class="ag-button ag-floating-filter-button-button" ref="eButtonShowMainFilter" tabindex="-1"></button>
|
|
145
|
+
</div>
|
|
146
|
+
</div>`;c([N("eFloatingFilterBody")],_o.prototype,"eFloatingFilterBody",2);c([N("eButtonWrapper")],_o.prototype,"eButtonWrapper",2);c([N("eButtonShowMainFilter")],_o.prototype,"eButtonShowMainFilter",2);c([M],_o.prototype,"postConstruct",1);c([Bt],_o.prototype,"destroyFloatingFilterComp",1);var Ab=_o,Kc=class extends L{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.getDomLayout(),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},i=t.autoHeight?"ag-layout-auto-height":t.print?"ag-layout-print":"ag-layout-normal";this.view.updateLayoutClasses(i,t)}getDomLayout(){var e;const t=(e=this.gos.get("domLayout"))!=null?e:"normal";return["normal","print","autoHeight"].indexOf(t)===-1?(K(`${t} is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.`),"normal"):t}};c([M],Kc.prototype,"postConstruct",1);var Ks=class extends L{constructor(e){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.eBodyViewport=e,this.resetLastHScrollDebounced=Nt(()=>this.lastScrollSource[1]=null,500),this.resetLastVScrollDebounced=Nt(()=>this.lastScrollSource[0]=null,500)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.ctrlsService.whenReady(e=>{this.centerRowsCtrl=e.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}addScrollListener(){const{fakeHScrollComp:e,fakeVScrollComp:t}=this.ctrlsService.getParams();this.addManagedListener(this.centerRowsCtrl.getViewportElement(),"scroll",this.onHScroll.bind(this)),e.onScrollCallback(this.onFakeHScroll.bind(this));const i=this.gos.get("debounceVerticalScrollbar"),s=i?Nt(this.onVScroll.bind(this),100):this.onVScroll.bind(this),n=i?Nt(this.onFakeVScroll.bind(this),100):this.onFakeVScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",s),t.onScrollCallback(n)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){if(this.centerRowsCtrl==null)return;e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft());const i=this.enableRtl?e:-e,{topCenter:s,stickyTopCenter:n,stickyBottomCenter:o,centerHeader:r,bottomCenter:l,fakeHScrollComp:a}=this.ctrlsService.getParams();r.setHorizontalScroll(-i),l.setContainerTranslateX(i),s.setContainerTranslateX(i),n.setContainerTranslateX(i),o.setContainerTranslateX(i);const u=this.centerRowsCtrl.getViewportElement(),d=this.lastScrollSource[1]===0;e=Math.abs(e),d?a.setScrollPosition(e):fa(u,e,this.enableRtl)}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(this.lastScrollSource[t]=e,!0):this.lastScrollSource[t]===e}onFakeHScroll(){this.isControllingScroll(1,1)&&this.onHScrollCommon(1)}onHScroll(){this.isControllingScroll(0,1)&&this.onHScrollCommon(0)}onHScrollCommon(e){const t=this.centerRowsCtrl.getViewportElement(),{scrollLeft:i}=t;if(this.shouldBlockScrollUpdate(1,i,!0))return;let s;e===0?s=ga(t,this.enableRtl):s=this.ctrlsService.get("fakeHScrollComp").getScrollPosition(),this.doHorizontalScroll(Math.round(s)),this.resetLastHScrollDebounced()}onFakeVScroll(){this.isControllingScroll(1,0)&&this.onVScrollCommon(1)}onVScroll(){this.isControllingScroll(0,0)&&this.onVScrollCommon(0)}onVScrollCommon(e){let t;e===0?t=this.eBodyViewport.scrollTop:t=this.ctrlsService.get("fakeVScrollComp").getScrollPosition(),!this.shouldBlockScrollUpdate(0,t,!0)&&(this.animationFrameService.setScrollTop(t),this.nextScrollTop=t,e===0?this.ctrlsService.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,this.gos.get("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced())}doHorizontalScroll(e){const t=this.ctrlsService.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(e){const t={type:g.EVENT_BODY_SCROLL,direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout(()=>{const i=Me($({},t),{type:g.EVENT_BODY_SCROLL_END});this.eventService.dispatchEvent(i)},100)}shouldBlockScrollUpdate(e,t,i=!1){return i&&!Us()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=Ua(this.eBodyViewport),{scrollHeight:i}=this.eBodyViewport;return e<0||e+t>i}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:i}=this.centerRowsCtrl.getViewportElement();if(this.enableRtl&&pa()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>i}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScrollCommon(0)}scrollGridIfNeeded(){const e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e}setHorizontalScrollPosition(e,t=!1){const s=this.centerRowsCtrl.getViewportElement().scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl&&pa()?e=e>0?0:s:e=Math.min(Math.max(e,0),s)),fa(this.centerRowsCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.eBodyViewport.scrollTop=e}getVScrollPosition(){return this.lastScrollTop=this.eBodyViewport.scrollTop,this.lastOffsetHeight=this.eBodyViewport.offsetHeight,{top:this.lastScrollTop,bottom:this.lastScrollTop+this.lastOffsetHeight}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.centerRowsCtrl.isHorizontalScrollShowing()}scrollHorizontally(e){const t=this.centerRowsCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.getViewportElement().scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const i=this.rowModel.getRowCount();let s=-1;for(let n=0;n<i;n++){const o=this.rowModel.getRow(n);if(typeof e=="function"){if(o&&e(o)){s=n;break}}else if(e===o||e===o.data){s=n;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t){if(this.gos.isDomLayout("print"))return;const i=this.paginationProxy.getRowCount();if(typeof e!="number"||e<0||e>=i){console.warn("AG Grid: Invalid row index for ensureIndexVisible: "+e);return}const n=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.getFrameworkOverrides().wrapIncoming(()=>{n||this.paginationProxy.goToPageWithIndex(e);const o=this.ctrlsService.getGridBodyCtrl(),r=o.getStickyTopHeight(),l=o.getStickyBottomHeight(),a=this.paginationProxy.getRow(e);let u;do{const d=a.rowTop,h=a.rowHeight,p=this.paginationProxy.getPixelOffset(),C=a.rowTop-p,v=C+a.rowHeight,y=this.getVScrollPosition(),R=this.heightScaler.getDivStretchOffset(),w=y.top+R,m=y.bottom+R,E=m-w,T=this.heightScaler.getScrollPositionForPixel(C),P=this.heightScaler.getScrollPositionForPixel(v-E),A=Math.min((T+P)/2,C),F=w+r>C,I=m-l<v;let x=null;t==="top"?x=T:t==="bottom"?x=P:t==="middle"?x=A:F?x=T-r:I&&(x=P+l),x!==null&&(this.setVerticalScrollPosition(x),this.rowRenderer.redraw({afterScroll:!0})),u=d!==a.rowTop||h!==a.rowHeight}while(u);this.animationFrameService.flushAllFrames()})}ensureColumnVisible(e,t="auto"){const i=this.columnModel.getGridColumn(e);if(!i||i.isPinned()||!this.columnModel.isColumnDisplayed(i))return;const s=this.getPositionedHorizontalScroll(i,t);this.getFrameworkOverrides().wrapIncoming(()=>{s!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(s),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameService.flushAllFrames()})}setScrollPosition(e,t){this.getFrameworkOverrides().wrapIncoming(()=>{this.centerRowsCtrl.setCenterViewportScrollLeft(t),this.setVerticalScrollPosition(e),this.rowRenderer.redraw({afterScroll:!0}),this.animationFrameService.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:i,columnAfterEnd:s}=this.isColumnOutsideViewport(e),n=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),o=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let l=(r?i:s)||n,a=r?s:i;t!=="auto"&&(l=t==="start",a=t==="end");const u=t==="middle";if(l||a||u){const{colLeft:d,colMiddle:h,colRight:p}=this.getColumnBounds(e);return u?h-o/2:l?r?p:d:r?d-o:p-o}return null}isColumnOutsideViewport(e){const{start:t,end:i}=this.getViewportBounds(),{colLeft:s,colRight:n}=this.getColumnBounds(e),o=this.enableRtl,r=o?t>n:i<n,l=o?i<s:t>s;return{columnBeforeStart:r,columnAfterEnd:l}}getColumnBounds(e){const t=this.enableRtl,i=this.columnModel.getBodyContainerWidth(),s=e.getActualWidth(),n=e.getLeft(),o=t?-1:1,r=t?i-n:n,l=r+s*o,a=r+s/2*o;return{colLeft:r,colMiddle:a,colRight:l}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),i=t,s=e+t;return{start:i,end:s,width:e}}};c([f("ctrlsService")],Ks.prototype,"ctrlsService",2);c([f("animationFrameService")],Ks.prototype,"animationFrameService",2);c([f("paginationProxy")],Ks.prototype,"paginationProxy",2);c([f("rowModel")],Ks.prototype,"rowModel",2);c([f("rowContainerHeightService")],Ks.prototype,"heightScaler",2);c([f("rowRenderer")],Ks.prototype,"rowRenderer",2);c([f("columnModel")],Ks.prototype,"columnModel",2);c([M],Ks.prototype,"postConstruct",1);var tT="ag-force-vertical-scroll",bb="ag-selectable",Lb="ag-column-moving",Mt=class extends L{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}getScrollFeature(){return this.bodyScrollFeature}getBodyViewportElement(){return this.eBodyViewport}setComp(e,t,i,s,n,o,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=i,this.eTop=s,this.eBottom=n,this.eStickyTop=o,this.eStickyBottom=r,this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",l=>this.setCellTextSelection(l.currentValue)),this.createManagedBean(new Kc(this.comp)),this.bodyScrollFeature=this.createManagedBean(new Ks(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([s,i,n,o,r]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.filterManager.setupAdvancedFilterHeaderComp(s),this.ctrlsService.register("gridBodyCtrl",this)}getComp(){return this.comp}addEventListeners(){this.addManagedListener(this.eventService,g.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))}addFocusListeners(e){e.forEach(t=>{this.addManagedListener(t,"focusin",i=>{const{target:s}=i,n=no(s,"ag-root",t);t.classList.toggle("ag-has-focus",!n)}),this.addManagedListener(t,"focusout",i=>{const{target:s,relatedTarget:n}=i,o=t.contains(n),r=no(n,"ag-root",t);no(s,"ag-root",t)||(!o||r)&&t.classList.remove("ag-has-focus")})})}setColumnMovingCss(e){this.comp.setColumnMovingCss(Lb,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(bb,e)}onScrollVisibilityChanged(){const e=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(e),this.setStickyWidth(e),this.setStickyBottomOffsetBottom();const t=e&&this.gos.getScrollbarWidth()||0,i=tm()?16:0,s=`calc(100% + ${t+i}px)`;this.animationFrameService.requestAnimationFrame(()=>this.comp.setBodyViewportWidth(s))}onGridColumnsChanged(){const e=this.columnModel.getAllGridColumns();this.comp.setColumnCount(e.length)}disableBrowserDragging(){this.addManagedListener(this.eGridBody,"dragstart",e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1})}addStopEditingWhenGridLosesFocus(){if(!this.gos.get("stopEditingWhenCellsLoseFocus"))return;const e=i=>{const s=i.relatedTarget;if(Vd(s)===null){this.rowRenderer.stopEditing();return}let n=t.some(o=>o.contains(s))&&this.mouseEventService.isElementInThisGrid(s);if(!n){const o=this.popupService;n=o.getActivePopups().some(r=>r.contains(s))||o.isElementWithinCustomPopup(s)}n||this.rowRenderer.stopEditing()},t=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom];t.forEach(i=>this.addManagedListener(i,"focusout",e))}updateRowCount(){const e=this.headerNavigationService.getHeaderRowCount()+this.filterManager.getHeaderRowCount(),t=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1,i=t===-1?-1:e+t;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?tT:null,i=this.gos.isDomLayout("normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||i&&XE(this.eBodyViewport)}setupRowAnimationCssClass(){const e=()=>{const t=this.gos.isAnimateRows()&&!this.rowContainerHeightService.isStretching(),i=t?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(i,t)};e(),this.addManagedListener(this.eventService,g.EVENT_HEIGHT_SCALE_CHANGED,e),this.addManagedPropertyListener("animateRows",e)}getGridBodyElement(){return this.eGridBody}addBodyViewportListener(){const 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.onStickyWheel.bind(this)),this.addManagedListener(this.eStickyBottom,"wheel",this.onStickyWheel.bind(this)),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){const e=this.eBodyViewport.querySelector(".ag-full-width-container"),t=this.eBodyViewport.querySelector(".ag-center-cols-viewport");e&&t&&this.addManagedListener(e,"wheel",i=>this.onFullWidthContainerWheel(i,t))}onFullWidthContainerWheel(e,t){!e.deltaX||Math.abs(e.deltaY)>Math.abs(e.deltaX)||!this.mouseEventService.isEventFromThisGrid(e)||(e.preventDefault(),t.scrollBy({left:e.deltaX}))}onBodyViewportContextMenu(e,t,i){if(!e&&!i)return;this.gos.get("preventDefaultOnContextMenu")&&(e||i).preventDefault();const{target:s}=e||t;(s===this.eBodyViewport||s===this.ctrlsService.get("center").getViewportElement())&&this.menuService.showContextMenu({mouseEvent:e,touchEvent:i,value:null,anchorToElement:this.eGridBody})}mockContextMenuForIPad(e){if(!Us())return;const t=new pt(this.eBodyViewport),i=s=>{e(void 0,s.touchStart,s.touchEvent)};this.addManagedListener(t,pt.EVENT_LONG_TAP,i),this.addDestroyFunc(()=>t.destroy())}onBodyViewportWheel(e){this.gos.get("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault()}onStickyWheel(e){e.preventDefault(),e.offsetY&&this.scrollVertically(e.deltaY)}getGui(){return this.eGridBody}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}addRowDragListener(){this.rowDragFeature=this.createManagedBean(new Ti(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature)}getRowDragFeature(){return this.rowDragFeature}onPinnedRowDataChanged(){this.setFloatingHeights()}setFloatingHeights(){const{pinnedRowModel:e}=this;let t=e.getPinnedTopTotalHeight(),i=e.getPinnedBottomTotalHeight();this.comp.setTopHeight(t),this.comp.setBottomHeight(i),this.comp.setTopDisplay(t?"inherit":"none"),this.comp.setBottomDisplay(i?"inherit":"none"),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}getStickyTopHeight(){return this.stickyTopHeight}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}getStickyBottomHeight(){return this.stickyBottomHeight}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.gos.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}onHeaderHeightChanged(){this.setStickyTopOffsetTop()}setStickyTopOffsetTop(){const t=this.ctrlsService.get("gridHeaderCtrl").getHeaderHeight()+this.filterManager.getHeaderHeight(),i=this.pinnedRowModel.getPinnedTopTotalHeight();let s=0;t>0&&(s+=t),i>0&&(s+=i),s>0&&(s+=1),this.comp.setStickyTopTop(`${s}px`)}setStickyBottomOffsetBottom(){const e=this.pinnedRowModel.getPinnedBottomTotalHeight(),i=this.scrollVisibleService.isHorizontalScrollShowing()&&this.gos.getScrollbarWidth()||0,s=e+i;this.comp.setStickyBottomBottom(`${s}px`)}sizeColumnsToFit(e,t){const s=this.isVerticalScrollShowing()?this.gos.getScrollbarWidth():0,o=bo(this.eGridBody)-s;if(o>0){this.columnModel.sizeColumnsToFit(o,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFit(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFit(e,500)},100):t===500?window.setTimeout(()=>{this.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?")}addScrollEventListener(e){this.eBodyViewport.addEventListener("scroll",e,{passive:!0})}removeScrollEventListener(e){this.eBodyViewport.removeEventListener("scroll",e)}};c([f("animationFrameService")],Mt.prototype,"animationFrameService",2);c([f("rowContainerHeightService")],Mt.prototype,"rowContainerHeightService",2);c([f("ctrlsService")],Mt.prototype,"ctrlsService",2);c([f("columnModel")],Mt.prototype,"columnModel",2);c([f("scrollVisibleService")],Mt.prototype,"scrollVisibleService",2);c([f("menuService")],Mt.prototype,"menuService",2);c([f("headerNavigationService")],Mt.prototype,"headerNavigationService",2);c([f("dragAndDropService")],Mt.prototype,"dragAndDropService",2);c([f("pinnedRowModel")],Mt.prototype,"pinnedRowModel",2);c([f("rowRenderer")],Mt.prototype,"rowRenderer",2);c([f("popupService")],Mt.prototype,"popupService",2);c([f("mouseEventService")],Mt.prototype,"mouseEventService",2);c([f("rowModel")],Mt.prototype,"rowModel",2);c([f("filterManager")],Mt.prototype,"filterManager",2);var Cl="ag-cell-range-selected",Mb="ag-cell-range-chart",Ib="ag-cell-range-single-cell",xb="ag-cell-range-chart-category",Nb="ag-cell-range-handle",_b="ag-cell-range-top",Ob="ag-cell-range-right",Gb="ag-cell-range-bottom",kb="ag-cell-range-left",Vb=class{constructor(e,t){this.beans=e,this.rangeService=e.rangeService,this.selectionHandleFactory=e.selectionHandleFactory,this.cellCtrl=t}setComp(e,t){this.cellComp=e,this.eGui=t,this.onRangeSelectionChanged()}onRangeSelectionChanged(){this.cellComp&&(this.rangeCount=this.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(Cl,this.rangeCount!==0),this.cellComp.addOrRemoveCssClass(`${Cl}-1`,this.rangeCount===1),this.cellComp.addOrRemoveCssClass(`${Cl}-2`,this.rangeCount===2),this.cellComp.addOrRemoveCssClass(`${Cl}-3`,this.rangeCount===3),this.cellComp.addOrRemoveCssClass(`${Cl}-4`,this.rangeCount>=4),this.cellComp.addOrRemoveCssClass(Mb,this.hasChartRange),Ar(this.eGui,this.rangeCount>0?!0:void 0),this.cellComp.addOrRemoveCssClass(Ib,this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())}updateRangeBorders(){const e=this.getRangeBorders(),t=this.isSingleCell(),i=!t&&e.top,s=!t&&e.right,n=!t&&e.bottom,o=!t&&e.left;this.cellComp.addOrRemoveCssClass(_b,i),this.cellComp.addOrRemoveCssClass(Ob,s),this.cellComp.addOrRemoveCssClass(Gb,n),this.cellComp.addOrRemoveCssClass(kb,o)}isSingleCell(){const{rangeService:e}=this.beans;return this.rangeCount===1&&!!e&&!e.isMoreThanOneCell()}getHasChartRange(){const{rangeService:e}=this.beans;if(!this.rangeCount||!e)return!1;const t=e.getCellRanges();return t.length>0&&t.every(i=>vi([1,0],i.type))}updateRangeBordersIfRangeCount(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())}getRangeBorders(){const e=this.beans.gos.get("enableRtl");let t=!1,i=!1,s=!1,n=!1;const o=this.cellCtrl.getCellPosition().column,r=this.beans.columnModel;let l,a;e?(l=r.getDisplayedColAfter(o),a=r.getDisplayedColBefore(o)):(l=r.getDisplayedColBefore(o),a=r.getDisplayedColAfter(o));const u=this.rangeService.getCellRanges().filter(d=>this.rangeService.isCellInSpecificRange(this.cellCtrl.getCellPosition(),d));l||(n=!0),a||(i=!0);for(let d=0;d<u.length&&!(t&&i&&s&&n);d++){const h=u[d],p=this.rangeService.getRangeStartRow(h),C=this.rangeService.getRangeEndRow(h);!t&&this.beans.rowPositionUtils.sameRow(p,this.cellCtrl.getCellPosition())&&(t=!0),!s&&this.beans.rowPositionUtils.sameRow(C,this.cellCtrl.getCellPosition())&&(s=!0),!n&&l&&h.columns.indexOf(l)<0&&(n=!0),!i&&a&&h.columns.indexOf(a)<0&&(i=!0)}return{top:t,right:i,bottom:s,left:n}}refreshHandle(){if(this.beans.context.isDestroyed())return;const e=this.shouldHaveSelectionHandle();this.selectionHandle&&!e&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),e&&this.addSelectionHandle(),this.cellComp.addOrRemoveCssClass(Nb,!!this.selectionHandle)}shouldHaveSelectionHandle(){const e=this.beans.gos,t=this.rangeService.getCellRanges(),i=t.length;if(this.rangeCount<1||i<1)return!1;const s=de(t),n=this.cellCtrl.getCellPosition(),o=e.get("enableFillHandle")&&!this.cellCtrl.isSuppressFillHandle(),r=e.get("enableRangeHandle");let l=i===1&&!this.cellCtrl.isEditing()&&(o||r);if(this.hasChartRange){const u=t[0].type===1&&this.rangeService.isCellInSpecificRange(n,t[0]);this.cellComp.addOrRemoveCssClass(xb,u),l=s.type===0}return l&&s.endRow!=null&&this.rangeService.isContiguousRange(s)&&this.rangeService.isBottomRightCell(s,n)}addSelectionHandle(){const e=this.beans.gos,t=de(this.rangeService.getCellRanges()).type,s=e.get("enableFillHandle")&&q(t)?0:1;this.selectionHandle&&this.selectionHandle.getType()!==s&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),this.selectionHandle||(this.selectionHandle=this.selectionHandleFactory.createSelectionHandle(s)),this.selectionHandle.refresh(this.cellCtrl)}destroy(){this.beans.context.destroyBean(this.selectionHandle)}},Hb=class extends L{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListener(this.beans.eventService,g.EVENT_NEW_COLUMNS_LOADED,()=>this.onNewColumnsLoaded())}setComp(e){this.eGui=e,this.setupColSpan(),this.setupRowSpan(),this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan()}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this.applyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();gs(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListener(this.beans.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayColumnsChanged.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onWidthChanged.bind(this)))}onWidthChanged(){if(!this.eGui)return;const e=this.getCellWidth();this.eGui.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const e=this.column.getColSpan(this.rowNode),t=[];if(e===1)t.push(this.column);else{let i=this.column;const s=this.column.getPinned();for(let n=0;i&&n<e&&(t.push(i),i=this.beans.columnModel.getDisplayedColAfter(i),!(!i||q(i)||s!==i.getPinned()));n++);}return t}onLeftChanged(){if(!this.eGui)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eGui.style.left=e+"px"}getCellLeft(){let e;return this.beans.gos.get("enableRtl")&&this.colsSpanning?e=de(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.isPrintLayout()||this.column.getPinned()==="left")return e;const t=this.beans.columnModel.getDisplayedColumnsLeftWidth();if(this.column.getPinned()==="right"){const i=this.beans.columnModel.getBodyContainerWidth();return t+i+(e||0)}return t+(e||0)}applyRowSpan(e){if(this.rowSpan===1&&!e)return;const i=this.beans.gos.getRowHeightAsNumber()*this.rowSpan;this.eGui.style.height=`${i}px`,this.eGui.style.zIndex="1"}destroy(){super.destroy()}},Bb=class extends L{constructor(e,t){super(),this.staticClasses=[],this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const e=this.column.getColDef(),{cellClassRules:t}=e,i=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:e,column:this.column,rowIndex:this.rowNode.rowIndex});this.beans.stylingService.processClassRules(t===this.cellClassRules?void 0:this.cellClassRules,t,i,s=>this.cellComp.addOrRemoveCssClass(s,!0),s=>this.cellComp.addOrRemoveCssClass(s,!1)),this.cellClassRules=t}applyUserStyles(){const e=this.column.getColDef();if(!e.cellStyle)return;let t;if(typeof e.cellStyle=="function"){const i=this.beans.gos.addGridCommonParams({column:this.column,value:this.cellCtrl.getValue(),colDef:e,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex}),s=e.cellStyle;t=s(i)}else t=e.cellStyle;t&&this.cellComp.setUserStyles(t)}applyClassesFromColDef(){const e=this.column.getColDef(),t=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,column:this.column,colDef:e,rowIndex:this.rowNode.rowIndex});this.staticClasses.length&&this.staticClasses.forEach(i=>this.cellComp.addOrRemoveCssClass(i,!1)),this.staticClasses=this.beans.stylingService.getStaticCellClasses(e,t),this.staticClasses.length&&this.staticClasses.forEach(i=>this.cellComp.addOrRemoveCssClass(i,!0))}destroy(){super.destroy()}},ie=class{postConstruct(){this.gos.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.gos.isRowModelType("serverSide")&&(this.serverSideRowModel=this.rowModel)}};c([f("resizeObserverService")],ie.prototype,"resizeObserverService",2);c([f("paginationProxy")],ie.prototype,"paginationProxy",2);c([f("context")],ie.prototype,"context",2);c([f("gridOptionsService")],ie.prototype,"gos",2);c([f("environment")],ie.prototype,"environment",2);c([f("rowRenderer")],ie.prototype,"rowRenderer",2);c([f("valueService")],ie.prototype,"valueService",2);c([f("eventService")],ie.prototype,"eventService",2);c([f("columnModel")],ie.prototype,"columnModel",2);c([f("headerNavigationService")],ie.prototype,"headerNavigationService",2);c([f("navigationService")],ie.prototype,"navigationService",2);c([f("columnAnimationService")],ie.prototype,"columnAnimationService",2);c([f("focusService")],ie.prototype,"focusService",2);c([f("popupService")],ie.prototype,"popupService",2);c([f("stylingService")],ie.prototype,"stylingService",2);c([f("columnHoverService")],ie.prototype,"columnHoverService",2);c([f("userComponentFactory")],ie.prototype,"userComponentFactory",2);c([f("userComponentRegistry")],ie.prototype,"userComponentRegistry",2);c([f("animationFrameService")],ie.prototype,"animationFrameService",2);c([f("dragService")],ie.prototype,"dragService",2);c([f("dragAndDropService")],ie.prototype,"dragAndDropService",2);c([f("sortController")],ie.prototype,"sortController",2);c([f("filterManager")],ie.prototype,"filterManager",2);c([f("rowContainerHeightService")],ie.prototype,"rowContainerHeightService",2);c([f("frameworkOverrides")],ie.prototype,"frameworkOverrides",2);c([f("cellPositionUtils")],ie.prototype,"cellPositionUtils",2);c([f("rowPositionUtils")],ie.prototype,"rowPositionUtils",2);c([f("selectionService")],ie.prototype,"selectionService",2);c([f("rowCssClassCalculator")],ie.prototype,"rowCssClassCalculator",2);c([f("rowModel")],ie.prototype,"rowModel",2);c([f("ctrlsService")],ie.prototype,"ctrlsService",2);c([f("ctrlsFactory")],ie.prototype,"ctrlsFactory",2);c([f("agStackComponentsRegistry")],ie.prototype,"agStackComponentsRegistry",2);c([f("valueCache")],ie.prototype,"valueCache",2);c([f("rowNodeEventThrottle")],ie.prototype,"rowNodeEventThrottle",2);c([f("localeService")],ie.prototype,"localeService",2);c([f("syncService")],ie.prototype,"syncService",2);c([f("ariaAnnouncementService")],ie.prototype,"ariaAnnouncementService",2);c([fe("rangeService")],ie.prototype,"rangeService",2);c([fe("selectionHandleFactory")],ie.prototype,"selectionHandleFactory",2);c([M],ie.prototype,"postConstruct",1);ie=c([H("beans")],ie);var Wb=class extends ie{constructor(e,t,i){super(),this.cellCtrl=e,this.beans=t,this.column=i}onMouseEvent(e,t){if(!es(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){if(this.isDoubleClickOnIPad()){this.onCellDoubleClicked(e),e.preventDefault();return}const{eventService:t,rangeService:i,gos:s}=this.beans,n=e.ctrlKey||e.metaKey;i&&n&&i.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&i.intersectLastRange(!0);const o=this.cellCtrl.createEvent(e,g.EVENT_CELL_CLICKED);t.dispatchEvent(o);const r=this.column.getColDef();r.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{r.onCellClicked(o)})},0),(s.get("singleClickEdit")||r.singleClickEdit)&&!s.get("suppressClickEdit")&&!(e.shiftKey&&(i==null?void 0:i.getCellRanges().length)!=0)&&this.cellCtrl.startRowOrCellEdit()}isDoubleClickOnIPad(){if(!Us()||Uf("dblclick"))return!1;const e=new Date().getTime(),t=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,t}onCellDoubleClicked(e){const t=this.column.getColDef(),i=this.cellCtrl.createEvent(e,g.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(i),typeof t.onCellDoubleClicked=="function"&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{t.onCellDoubleClicked(i)})},0),!this.beans.gos.get("singleClickEdit")&&!this.beans.gos.get("suppressClickEdit")&&this.cellCtrl.startRowOrCellEdit(null,e)}onMouseDown(e){const{ctrlKey:t,metaKey:i,shiftKey:s}=e,n=e.target,{cellCtrl:o,beans:r}=this,{eventService:l,rangeService:a,focusService:u}=r;if(this.isRightClickInExistingRange(e))return;const d=a&&a.getCellRanges().length!=0;if(!s||!d){const h=ws()&&!o.isEditing()&&!nm(n);o.focusCell(h)}if(s&&d&&!u.isCellFocused(o.getCellPosition())){e.preventDefault();const h=u.getFocusedCell();if(h){const{column:p,rowIndex:C,rowPinned:v}=h,y=r.rowRenderer.getRowByPosition({rowIndex:C,rowPinned:v}),R=y==null?void 0:y.getCellCtrl(p);R!=null&&R.isEditing()&&R.stopEditing(),u.setFocusedCell({column:p,rowIndex:C,rowPinned:v,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!this.containsWidget(n)){if(a){const h=this.cellCtrl.getCellPosition();if(s)a.extendLatestRangeToCell(h);else{const p=t||i;a.setRangeToCell(h,p)}}l.dispatchEvent(this.cellCtrl.createEvent(e,g.EVENT_CELL_MOUSE_DOWN))}}isRightClickInExistingRange(e){const{rangeService:t}=this.beans;if(t){const i=t.isCellInAnyRange(this.cellCtrl.getCellPosition()),s=e.button===2||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(i&&s)return!0}return!1}containsWidget(e){return no(e,"ag-selection-checkbox",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const t=this.cellCtrl.createEvent(e,g.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const t=this.cellCtrl.createEvent(e,g.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.getGui(),i=t.contains(e.target),s=t.contains(e.relatedTarget);return i&&s}destroy(){}},Ub=class extends L{constructor(e,t,i,s,n){super(),this.cellCtrl=e,this.beans=t,this.rowNode=s,this.rowCtrl=n}setComp(e){this.eGui=e}onKeyDown(e){const t=e.key;switch(t){case D.ENTER:this.onEnterKeyDown(e);break;case D.F2:this.onF2KeyDown(e);break;case D.ESCAPE:this.onEscapeKeyDown(e);break;case D.TAB:this.onTabKeyDown(e);break;case D.BACKSPACE:case D.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case D.DOWN:case D.UP:case D.RIGHT:case D.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){this.cellCtrl.isEditing()||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):this.beans.navigationService.navigateToNextCell(e,t,this.cellCtrl.getCellPosition(),!0),e.preventDefault())}onShiftRangeSelect(e){if(!this.beans.rangeService)return;const t=this.beans.rangeService.extendLatestRangeInDirection(e);t&&this.beans.navigationService.ensureCellVisible(t)}onTabKeyDown(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){var i;const{cellCtrl:s,beans:n,rowNode:o}=this,{gos:r,rangeService:l,eventService:a}=n;if(!s.isEditing()){if(a.dispatchEvent({type:g.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),lR(e,r.get("enableCellEditingOnBackspace"))){if(l&&r.get("enableRangeSelection"))l.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(s.isCellEditable()){const u=s.getColumn(),d=(i=this.beans.valueService.parseValue(u,o,"",o.getValueFromValueService(u)))!=null?i:null;o.setDataValue(u,d,"cellClear")}}else s.startRowOrCellEdit(e,t);a.dispatchEvent({type:g.EVENT_KEY_SHORTCUT_CHANGED_CELL_END})}}onEnterKeyDown(e){if(this.cellCtrl.isEditing()||this.rowCtrl.isEditing())this.cellCtrl.stopEditingAndFocus(!1,e.shiftKey);else if(this.beans.gos.get("enterNavigatesVertically")){const t=e.shiftKey?D.UP:D.DOWN;this.beans.navigationService.navigateToNextCell(null,t,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(D.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault()}onF2KeyDown(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(D.F2,e)}onEscapeKeyDown(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.isEditing())return;const s=e.key;s===" "?this.onSpaceKeyDown(e):(this.cellCtrl.startRowOrCellEdit(s,e),e.preventDefault())}onSpaceKeyDown(e){const{gos:t}=this.beans;if(!this.cellCtrl.isEditing()&&t.isRowSelection()){const i=this.rowNode.isSelected(),s=!i;if(s||!t.get("suppressRowDeselection")){const n=this.beans.gos.get("groupSelectsFiltered"),o=this.rowNode.setSelectedParams({newValue:s,rangeSelect:e.shiftKey,groupSelectsFiltered:n,event:e,source:"spaceKey"});i===void 0&&o===0&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:n,event:e,source:"spaceKey"})}}e.preventDefault()}destroy(){super.destroy()}},iT=class extends Z{constructor(e,t,i){super('<div class="ag-drag-handle ag-row-drag" draggable="true"></div>'),this.rowNode=e,this.column=t,this.eCell=i}postConstruct(){this.getGui().appendChild(Oe("rowDrag",this.gos,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const t=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0);const i=()=>{try{const s=JSON.stringify(this.rowNode.data);e.dataTransfer.setData("application/json",s),e.dataTransfer.setData("text/plain",s)}catch{}};if(t){const s=this.gos.addGridCommonParams({rowNode:this.rowNode,dragEvent:e});t(s)}else i()}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}};c([M],iT.prototype,"postConstruct",1);var zb="ag-column-first",$b="ag-column-last",jc=class{static getHeaderClassesFromColDef(e,t,i,s){return q(e)?[]:this.getColumnClassesFromCollDef(e.headerClass,e,t,i,s)}static getToolPanelClassesFromColDef(e,t,i,s){return q(e)?[]:this.getColumnClassesFromCollDef(e.toolPanelClass,e,t,i,s)}static refreshFirstAndLastStyles(e,t,i){e.addOrRemoveCssClass(zb,i.isColumnAtEdge(t,"first")),e.addOrRemoveCssClass($b,i.isColumnAtEdge(t,"last"))}static getClassParams(e,t,i,s){return t.addGridCommonParams({colDef:e,column:i,columnGroup:s})}static getColumnClassesFromCollDef(e,t,i,s,n){if(q(e))return[];let o;if(typeof e=="function"){const r=this.getClassParams(t,i,s,n);o=e(r)}else o=e;return typeof o=="string"?[o]:Array.isArray(o)?[...o]:[]}},Kb="ag-cell",jb="ag-cell-auto-height",Yb="ag-cell-normal-height",Qb="ag-cell-focus",qb="ag-cell-first-right-pinned",Xb="ag-cell-last-left-pinned",Zb="ag-cell-not-inline-editing",Jb="ag-column-hover",eL="ag-cell-wrap-text",tL=0,sT=class wg extends L{constructor(t,i,s,n){super(),this.cellRangeFeature=null,this.cellPositionFeature=null,this.cellCustomStyleFeature=null,this.tooltipFeature=null,this.cellMouseListenerFeature=null,this.cellKeyboardListenerFeature=null,this.suppressRefreshCell=!1,this.onCellCompAttachedFuncs=[],this.column=t,this.rowNode=i,this.beans=s,this.rowCtrl=n,this.instanceId=t.getId()+"-"+tL++,this.colIdSanitised=Xe(this.column.getId()),s.gos.get("suppressCellFocus")||(this.tabIndex=-1),this.createCellPosition(),this.addFeatures(),this.updateAndFormatValue(!1)}shouldRestoreFocus(){return this.beans.focusService.shouldRestoreFocus(this.cellPosition)}addFeatures(){this.cellPositionFeature=new Hb(this,this.beans),this.addDestroyFunc(()=>{var i;(i=this.cellPositionFeature)==null||i.destroy(),this.cellPositionFeature=null}),this.cellCustomStyleFeature=new Bb(this,this.beans),this.addDestroyFunc(()=>{var i;(i=this.cellCustomStyleFeature)==null||i.destroy(),this.cellCustomStyleFeature=null}),this.cellMouseListenerFeature=new Wb(this,this.beans,this.column),this.addDestroyFunc(()=>{var i;(i=this.cellMouseListenerFeature)==null||i.destroy(),this.cellMouseListenerFeature=null}),this.cellKeyboardListenerFeature=new Ub(this,this.beans,this.column,this.rowNode,this.rowCtrl),this.addDestroyFunc(()=>{var i;(i=this.cellKeyboardListenerFeature)==null||i.destroy(),this.cellKeyboardListenerFeature=null}),this.column.isTooltipEnabled()&&(this.enableTooltipFeature(),this.addDestroyFunc(()=>{this.disableTooltipFeature()})),this.beans.rangeService&&this.beans.gos.get("enableRangeSelection")&&(this.cellRangeFeature=new Vb(this.beans,this),this.addDestroyFunc(()=>{var i;(i=this.cellRangeFeature)==null||i.destroy(),this.cellRangeFeature=null}))}enableTooltipFeature(t,i){const s=()=>{const r=this.column.getColDef(),l=this.rowNode.data;if(r.tooltipField&&b(l))return fr(l,r.tooltipField,this.column.isTooltipFieldContainsDots());const a=r.tooltipValueGetter;return a?a(this.beans.gos.addGridCommonParams({location:"cell",colDef:this.column.getColDef(),column:this.column,rowIndex:this.cellPosition.rowIndex,node:this.rowNode,data:this.rowNode.data,value:this.value,valueFormatted:this.valueFormatted})):null},n=this.beans.gos.get("tooltipShowMode")==="whenTruncated";!i&&n&&!this.isCellRenderer()&&(i=()=>{const r=this.getGui(),l=r.children.length===0?r:r.querySelector(".ag-cell-value");return l?l.scrollWidth>l.clientWidth:!0});const o={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getRowIndex:()=>this.cellPosition.rowIndex,getRowNode:()=>this.rowNode,getGui:()=>this.getGui(),getLocation:()=>"cell",getTooltipValue:t!=null?()=>t:s,getValueFormatted:()=>this.valueFormatted,shouldDisplayTooltip:i};this.tooltipFeature=new zs(o,this.beans)}disableTooltipFeature(){this.tooltipFeature&&(this.tooltipFeature.destroy(),this.tooltipFeature=null)}setComp(t,i,s,n,o){var r,l,a,u;this.cellComp=t,this.eGui=i,this.printLayout=n,this.addDomData(),this.onCellFocused(this.focusEventToRestore),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(s),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),(r=this.cellPositionFeature)==null||r.setComp(i),(l=this.cellCustomStyleFeature)==null||l.setComp(t),(a=this.tooltipFeature)==null||a.refreshToolTip(),(u=this.cellKeyboardListenerFeature)==null||u.setComp(this.eGui),this.cellRangeFeature&&this.cellRangeFeature.setComp(t,i),o&&this.isCellEditable()?this.startEditing():this.showValue(),this.onCellCompAttachedFuncs.length&&(this.onCellCompAttachedFuncs.forEach(d=>d()),this.onCellCompAttachedFuncs=[])}setupAutoHeight(t){if(this.isAutoHeight=this.column.isAutoHeight(),!this.isAutoHeight||!t)return;const i=t.parentElement,s=this.beans.gos.getRowHeightForNode(this.rowNode).height,n=l=>{if(this.editing||!this.isAlive())return;const{paddingTop:a,paddingBottom:u,borderBottomWidth:d,borderTopWidth:h}=bn(i),p=a+u+d+h,v=t.offsetHeight+p;if(l<5){const R=this.beans.gos.getDocument(),w=!R||!R.contains(t),m=v==0;if(w||m){window.setTimeout(()=>n(l+1),0);return}}const y=Math.max(v,s);this.rowNode.setRowAutoHeight(y,this.column)},o=()=>n(0);o();const r=this.beans.resizeObserverService.observeResize(t,o);this.addDestroyFunc(()=>{r(),this.rowNode.setRowAutoHeight(void 0,this.column)})}getCellAriaRole(){var t;return(t=this.column.getColDef().cellAriaRole)!=null?t:"gridcell"}getInstanceId(){return this.instanceId}getColumnIdSanitised(){return this.colIdSanitised}getTabIndex(){return this.tabIndex}isCellRenderer(){const t=this.column.getColDef();return t.cellRenderer!=null||t.cellRendererSelector!=null}getValueToDisplay(){var t;return(t=this.valueFormatted)!=null?t:this.value}showValue(t=!1){var i;const s=this.getValueToDisplay();let n;if(this.rowNode.stub){const o=this.createCellRendererParams();n=this.beans.userComponentFactory.getLoadingCellRendererDetails(this.column.getColDef(),o)}else if(this.isCellRenderer()){const o=this.createCellRendererParams();n=this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(),o)}this.cellComp.setRenderDetails(n,s,t),(i=this.cellRangeFeature)==null||i.refreshHandle()}setupControlComps(){const t=this.column.getColDef();this.includeSelection=this.isIncludeControl(t.checkboxSelection),this.includeRowDrag=this.isIncludeControl(t.rowDrag),this.includeDndSource=this.isIncludeControl(t.dndSource),this.cellComp.setIncludeSelection(this.includeSelection),this.cellComp.setIncludeDndSource(this.includeDndSource),this.cellComp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(t){return this.rowNode.rowPinned!=null?!1:typeof t=="function"||t===!0}refreshShouldDestroy(){const t=this.column.getColDef(),i=this.includeSelection!=this.isIncludeControl(t.checkboxSelection),s=this.includeRowDrag!=this.isIncludeControl(t.rowDrag),n=this.includeDndSource!=this.isIncludeControl(t.dndSource),o=this.isAutoHeight!=this.column.isAutoHeight();return i||s||n||o}startEditing(t=null,i=!1,s=null){if(!this.isCellEditable()||this.editing)return;if(!this.cellComp){this.onCellCompAttachedFuncs.push(()=>{this.startEditing(t,i,s)});return}const n=this.createCellEditorParams(t,i),o=this.column.getColDef(),r=this.beans.userComponentFactory.getCellEditorDetails(o,n);this.editCompDetails=r;const l=(r==null?void 0:r.popupFromSelector)!=null?r.popupFromSelector:!!o.cellEditorPopup,a=(r==null?void 0:r.popupPositionFromSelector)!=null?r.popupPositionFromSelector:o.cellEditorPopupPosition;this.setEditing(!0),this.cellComp.setEditDetails(r,l,a,this.beans.gos.get("reactiveCustomComponents"));const u=this.createEvent(s,g.EVENT_CELL_EDITING_STARTED);this.beans.eventService.dispatchEvent(u)}setEditing(t){var i;this.editing!==t&&(this.editing=t,(i=this.cellRangeFeature)==null||i.refreshHandle())}stopRowOrCellEdit(t=!1){this.beans.gos.get("editType")==="fullRow"?this.rowCtrl.stopEditing(t):this.stopEditing(t)}onPopupEditorClosed(){this.isEditing()&&this.stopEditingAndFocus()}takeValueFromCellEditor(t){const i={newValueExists:!1};if(t)return i;const s=this.cellComp.getCellEditor();return!s||s.isCancelAfterEnd&&s.isCancelAfterEnd()?i:{newValue:s.getValue(),newValueExists:!0}}saveNewValue(t,i){if(i===t)return!1;this.suppressRefreshCell=!0;const s=this.rowNode.setDataValue(this.column,i,"edit");return this.suppressRefreshCell=!1,s}stopEditing(t=!1){if(!this.editing)return!1;const{newValue:i,newValueExists:s}=this.takeValueFromCellEditor(t),n=this.rowNode.getValueFromValueService(this.column);let o=!1;return s&&(o=this.saveNewValue(n,i)),this.setEditing(!1),this.cellComp.setEditDetails(),this.editCompDetails=void 0,this.updateAndFormatValue(!1),this.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.dispatchEditingStoppedEvent(n,i,!t&&!!o),o}dispatchEditingStoppedEvent(t,i,s){const n=Me($({},this.createEvent(null,g.EVENT_CELL_EDITING_STOPPED)),{oldValue:t,newValue:i,valueChanged:s});this.beans.eventService.dispatchEvent(n)}createCellEditorParams(t,i){return this.beans.gos.addGridCommonParams({value:this.rowNode.getValueFromValueService(this.column),eventKey:t,column:this.column,colDef:this.column.getColDef(),rowIndex:this.getCellPosition().rowIndex,node:this.rowNode,data:this.rowNode.data,cellStartedEdit:i,onKeyDown:this.onKeyDown.bind(this),stopEditing:this.stopEditingAndFocus.bind(this),eGridCell:this.getGui(),parseValue:this.parseValue.bind(this),formatValue:this.formatValue.bind(this)})}createCellRendererParams(){return this.beans.gos.addGridCommonParams({value:this.value,valueFormatted:this.valueFormatted,getValue:()=>this.rowNode.getValueFromValueService(this.column),setValue:i=>this.beans.valueService.setValue(this.rowNode,this.column,i),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:(i,s,n,o)=>this.registerRowDragger(i,s,o),setTooltip:(i,s)=>{var n;this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(i,s),(n=this.tooltipFeature)==null||n.refreshToolTip()}})}parseValue(t){return this.beans.valueService.parseValue(this.column,this.rowNode,t,this.getValue())}setFocusOutOnEditor(){if(!this.editing)return;const t=this.cellComp.getCellEditor();t&&t.focusOut&&t.focusOut()}setFocusInOnEditor(){if(!this.editing)return;const t=this.cellComp.getCellEditor();t&&t.focusIn?t.focusIn():this.focusCell(!0)}onCellChanged(t){t.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(t){var i;this.refreshShouldDestroy()?(i=this.rowCtrl)==null||i.recreateCell(this):this.refreshCell(t)}refreshCell(t){var i,s,n,o;if(this.suppressRefreshCell||this.editing)return;const r=this.column.getColDef(),l=t!=null&&!!t.newData,a=t!=null&&!!t.suppressFlash||!!r.suppressCellFlash,u=r.field==null&&r.valueGetter==null&&r.showRowGroup==null,d=t&&t.forceRefresh||u||l,h=!!this.cellComp,p=this.updateAndFormatValue(h),C=d||p;if(h){if(C){this.showValue(l);const v=this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering();!a&&!v&&(this.beans.gos.get("enableCellChangeFlash")||r.enableCellChangeFlash)&&this.flashCell(),(i=this.cellCustomStyleFeature)==null||i.applyUserStyles(),(s=this.cellCustomStyleFeature)==null||s.applyClassesFromColDef()}(n=this.tooltipFeature)==null||n.refreshToolTip(),(o=this.cellCustomStyleFeature)==null||o.applyCellClassRules()}}stopEditingAndFocus(t=!1,i=!1){this.stopRowOrCellEdit(),this.focusCell(!0),t||this.navigateAfterEdit(i)}navigateAfterEdit(t){if(this.beans.gos.get("enterNavigatesVerticallyAfterEdit")){const s=t?D.UP:D.DOWN;this.beans.navigationService.navigateToNextCell(null,s,this.getCellPosition(),!1)}}flashCell(t){var i,s;const n=(i=t==null?void 0:t.flashDuration)!=null?i:t==null?void 0:t.flashDelay,o=(s=t==null?void 0:t.fadeDuration)!=null?s:t==null?void 0:t.fadeDelay;this.animateCell("data-changed",n,o)}animateCell(t,i,s){if(!this.cellComp)return;const n=`ag-cell-${t}`,o=`ag-cell-${t}-animation`,{gos:r}=this.beans;i||(i=r.get("cellFlashDuration")),b(s)||(s=r.get("cellFadeDuration")),this.cellComp.addOrRemoveCssClass(n,!0),this.cellComp.addOrRemoveCssClass(o,!1),this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(n,!1),this.cellComp.addOrRemoveCssClass(o,!0),this.eGui.style.transition=`background-color ${s}ms`,window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(o,!1),this.eGui.style.transition="")},s))},i)})}onFlashCells(t){if(!this.cellComp)return;const i=this.beans.cellPositionUtils.createId(this.getCellPosition());t.cells[i]&&this.animateCell("highlight")}isCellEditable(){return this.column.isCellEditable(this.rowNode)}isSuppressFillHandle(){return this.column.isSuppressFillHandle()}formatValue(t){var i;return(i=this.callValueFormatter(t))!=null?i:t}callValueFormatter(t){return this.beans.valueService.formatValue(this.column,this.rowNode,t)}updateAndFormatValue(t){const i=this.value,s=this.valueFormatted;return this.value=this.rowNode.getValueFromValueService(this.column),this.valueFormatted=this.callValueFormatter(this.value),t?!this.valuesAreEqual(i,this.value)||this.valueFormatted!=s:!0}valuesAreEqual(t,i){const s=this.column.getColDef();return s.equals?s.equals(t,i):t===i}getComp(){return this.cellComp}getValue(){return this.value}addDomData(){const t=this.getGui();this.beans.gos.setDomData(t,wg.DOM_DATA_KEY_CELL_CTRL,this),this.addDestroyFunc(()=>this.beans.gos.setDomData(t,wg.DOM_DATA_KEY_CELL_CTRL,null))}createEvent(t,i){return this.beans.gos.addGridCommonParams({type:i,node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.column.getColDef(),rowPinned:this.rowNode.rowPinned,event:t,rowIndex:this.rowNode.rowIndex})}processCharacter(t){var i;(i=this.cellKeyboardListenerFeature)==null||i.processCharacter(t)}onKeyDown(t){var i;(i=this.cellKeyboardListenerFeature)==null||i.onKeyDown(t)}onMouseEvent(t,i){var s;(s=this.cellMouseListenerFeature)==null||s.onMouseEvent(t,i)}getGui(){return this.eGui}getColSpanningList(){return this.cellPositionFeature.getColSpanningList()}onLeftChanged(){var t;this.cellComp&&((t=this.cellPositionFeature)==null||t.onLeftChanged())}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{cellComp:t,column:i,beans:s}=this;jc.refreshFirstAndLastStyles(t,i,s.columnModel)}refreshAriaColIndex(){const t=this.beans.columnModel.getAriaColumnIndex(this.column);Qf(this.getGui(),t)}isSuppressNavigable(){return this.column.isSuppressNavigable(this.rowNode)}onWidthChanged(){var t;return(t=this.cellPositionFeature)==null?void 0:t.onWidthChanged()}getColumn(){return this.column}getRowNode(){return this.rowNode}isPrintLayout(){return this.printLayout}getCellPosition(){return this.cellPosition}isEditing(){return this.editing}startRowOrCellEdit(t,i=null){if(!this.cellComp){this.onCellCompAttachedFuncs.push(()=>{this.startRowOrCellEdit(t,i)});return}this.beans.gos.get("editType")==="fullRow"?this.rowCtrl.startRowEditing(t,this):this.startEditing(t,!0,i)}getRowCtrl(){return this.rowCtrl}getRowPosition(){return{rowIndex:this.cellPosition.rowIndex,rowPinned:this.cellPosition.rowPinned}}updateRangeBordersIfRangeCount(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.updateRangeBordersIfRangeCount()}onRangeSelectionChanged(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()}isRangeSelectionEnabled(){return this.cellRangeFeature!=null}focusCell(t=!1){this.beans.focusService.setFocusedCell({rowIndex:this.getCellPosition().rowIndex,column:this.column,rowPinned:this.rowNode.rowPinned,forceBrowserFocus:t})}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()}onFirstRightPinnedChanged(){if(!this.cellComp)return;const t=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass(qb,t)}onLastLeftPinnedChanged(){if(!this.cellComp)return;const t=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass(Xb,t)}onCellFocused(t){if(this.beans.gos.get("suppressCellFocus"))return;const i=this.beans.focusService.isCellFocused(this.cellPosition);if(!this.cellComp){i&&(t!=null&&t.forceBrowserFocus)&&(this.focusEventToRestore=t);return}this.focusEventToRestore=void 0,this.cellComp.addOrRemoveCssClass(Qb,i),i&&t&&t.forceBrowserFocus&&this.cellComp.getFocusableElement().focus({preventScroll:!!t.preventScrollOnBrowserFocus});const s=this.beans.gos.get("editType")==="fullRow";!i&&!s&&this.editing&&this.stopRowOrCellEdit(),i&&this.rowCtrl.announceDescription()}createCellPosition(){this.cellPosition={rowIndex:this.rowNode.rowIndex,rowPinned:Cs(this.rowNode.rowPinned),column:this.column}}applyStaticCssClasses(){this.cellComp.addOrRemoveCssClass(Kb,!0),this.cellComp.addOrRemoveCssClass(Zb,!0);const t=this.column.isAutoHeight()==!0;this.cellComp.addOrRemoveCssClass(jb,t),this.cellComp.addOrRemoveCssClass(Yb,!t)}onColumnHover(){if(!this.cellComp||!this.beans.gos.get("columnHoverHighlight"))return;const t=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass(Jb,t)}onColDefChanged(){if(!this.cellComp)return;if(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),!this.editing)this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0});else{const i=this.getCellEditor();if(i!=null&&i.refresh){const{eventKey:s,cellStartedEdit:n}=this.editCompDetails.params,o=this.createCellEditorParams(s,n),r=this.column.getColDef(),l=this.beans.userComponentFactory.getCellEditorDetails(r,o);i.refresh(l.params)}}}setWrapText(){const t=this.column.getColDef().wrapText==!0;this.cellComp.addOrRemoveCssClass(eL,t)}dispatchCellContextMenuEvent(t){const i=this.column.getColDef(),s=this.createEvent(t,g.EVENT_CELL_CONTEXT_MENU);this.beans.eventService.dispatchEvent(s),i.onCellContextMenu&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{i.onCellContextMenu(s)})},0)}getCellRenderer(){return this.cellComp?this.cellComp.getCellRenderer():null}getCellEditor(){return this.cellComp?this.cellComp.getCellEditor():null}destroy(){this.onCellCompAttachedFuncs=[],super.destroy()}createSelectionCheckbox(){const t=new Uc;return this.beans.context.createBean(t),t.init({rowNode:this.rowNode,column:this.column}),t}createDndSource(){const t=new iT(this.rowNode,this.column,this.eGui);return this.beans.context.createBean(t),t}registerRowDragger(t,i,s){if(this.customRowDragComp){this.customRowDragComp.setDragElement(t,i);return}const n=this.createRowDragComp(t,i,s);n&&(this.customRowDragComp=n,this.addDestroyFunc(()=>{this.beans.context.destroyBean(n),this.customRowDragComp=null}))}createRowDragComp(t,i,s){const n=this.beans.gos.get("pagination"),o=this.beans.gos.get("rowDragManaged"),r=this.beans.gos.isRowModelType("clientSide");if(o){if(!r){K("managed row dragging is only allowed in the Client Side Row Model");return}if(n){K("managed row dragging is not possible when doing pagination");return}}const l=new Co(()=>this.value,this.rowNode,this.column,t,i,s);return this.beans.context.createBean(l),l}};sT.DOM_DATA_KEY_CELL_CTRL="cellCtrl";var ro=sT,iL=0,nT=class yg extends L{constructor(t,i,s,n,o){super(),this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKeySanitised=null,this.beans=i,this.gos=i.gos,this.rowNode=t,this.paginationPage=i.paginationProxy.getCurrentPage(),this.useAnimationFrameForCreate=n,this.printLayout=o,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=t.id+"-"+iL++,this.rowId=Xe(t.id),this.initRowBusinessKey(),this.rowFocused=i.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=i.rowCssClassCalculator.calculateRowLevel(this.rowNode),this.setRowType(),this.setAnimateFlags(s),this.rowStyles=this.processStylesFromGridOptions(),this.isFullWidth()&&!this.gos.get("suppressCellFocus")&&(this.tabIndex=-1),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const t=this.businessKeyForNodeFunc(this.rowNode);this.businessKeySanitised=Xe(t)}getRowId(){return this.rowId}getRowStyles(){return this.rowStyles}getTabIndex(){return this.tabIndex}isSticky(){return this.rowNode.sticky}getInstanceId(){return this.instanceId}setComp(t,i,s){const n={rowComp:t,element:i,containerType:s};this.allRowGuis.push(n),s==="left"?this.leftGui=n:s==="right"?this.rightGui=n:s==="fullWidth"?this.fullWidthGui=n:this.centerGui=n,this.initialiseRowComp(n),this.rowType!=="FullWidthLoading"&&!this.rowNode.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent()}unsetComp(t){switch(this.allRowGuis=this.allRowGuis.filter(i=>i.containerType!==t),t){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;break}}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(t){const i=t?"none":"";this.allRowGuis.forEach(s=>s.element.style.display=i)}initialiseRowComp(t){const i=this.gos;this.listenOnDomOrder(t),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights(),this.onRowHeightChanged(t),this.updateRowIndexes(t),this.setFocusedClasses(t),this.setStylesFromGridOptions(!1,t),i.isRowSelection()&&this.rowNode.selectable&&this.onRowSelected(t),this.updateColumnLists(!this.useAnimationFrameForCreate);const s=t.rowComp;this.getInitialRowClasses(t.containerType).forEach(o=>s.addOrRemoveCssClass(o,!0)),this.executeSlideAndFadeAnimations(t),this.rowNode.group&&Gs(t.element,this.rowNode.expanded==!0),this.setRowCompRowId(s),this.setRowCompRowBusinessKey(s),i.setDomData(t.element,yg.DOM_DATA_KEY_ROW_CTRL,this),this.addDestroyFunc(()=>i.setDomData(t.element,yg.DOM_DATA_KEY_ROW_CTRL,null)),this.useAnimationFrameForCreate?this.beans.animationFrameService.createTask(this.addHoverFunctionality.bind(this,t.element),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(t.element),this.isFullWidth()&&this.setupFullWidth(t),i.get("rowDragEntireRow")&&this.addRowDraggerToRow(t),this.useAnimationFrameForCreate&&this.beans.animationFrameService.addDestroyTask(()=>{this.isAlive()&&t.rowComp.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(t){this.businessKeySanitised!=null&&t.setRowBusinessKey(this.businessKeySanitised)}getBusinessKey(){return this.businessKeySanitised}setRowCompRowId(t){this.rowId=Xe(this.rowNode.id),this.rowId!=null&&t.setRowId(this.rowId)}executeSlideAndFadeAnimations(t){const{containerType:i}=t;this.slideInAnimation[i]&&(og(()=>{this.onTopChanged()}),this.slideInAnimation[i]=!1),this.fadeInAnimation[i]&&(og(()=>{t.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[i]=!1)}addRowDraggerToRow(t){if(this.gos.get("enableRangeSelection")){K("Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `enableRangeSelection: true`");return}const i=this.beans.localeService.getLocaleTextFunc(),s=new Co(()=>`1 ${i("rowDragRow","row")}`,this.rowNode,void 0,t.element,void 0,!0),n=this.createBean(s,this.beans.context);this.rowDragComps.push(n)}setupFullWidth(t){const i=this.getPinnedForContainer(t.containerType);if(this.rowType=="FullWidthDetail"&&!he.__assertRegistered("@ag-grid-enterprise/master-detail","cell renderer 'agDetailCellRenderer' (for master detail)",this.beans.context.getGridId()))return;const s=this.createFullWidthCompDetails(t.element,i);t.rowComp.showFullWidth(s)}isPrintLayout(){return this.printLayout}getFullWidthCellRenderers(){var t,i;return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(s=>{var n;return(n=s==null?void 0:s.rowComp)==null?void 0:n.getFullWidthCellRenderer()}):[(i=(t=this.fullWidthGui)==null?void 0:t.rowComp)==null?void 0:i.getFullWidthCellRenderer()]}getCellElement(t){const i=this.getCellCtrl(t);return i?i.getGui():null}executeProcessRowPostCreateFunc(){const t=this.gos.getCallback("processRowPostCreate");if(!t||!this.areAllContainersReady())return;const i={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)};t(i)}areAllContainersReady(){const t=!!this.leftGui||!this.beans.columnModel.isPinningLeft(),i=!!this.centerGui,s=!!this.rightGui||!this.beans.columnModel.isPinningRight();return t&&i&&s}setRowType(){const t=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow"),i=this.rowNode.isFullWidthCell(),s=this.gos.get("masterDetail")&&this.rowNode.detail,n=this.beans.columnModel.isPivotMode(),r=!!this.rowNode.group&&!this.rowNode.footer&&this.gos.isGroupUseEntireRow(n);t?this.rowType="FullWidthLoading":s?this.rowType="FullWidthDetail":i?this.rowType="FullWidth":r?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(t=!1,i=!1){if(this.isFullWidth())return;if(t||this.gos.get("suppressAnimationFrame")||this.printLayout){this.updateColumnListsImpl(i);return}this.updateColumnListsPending||(this.beans.animationFrameService.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0)}createCellCtrls(t,i,s=null){const n={list:[],map:{}},o=(r,l)=>{n.list.push(l),n.map[r]=l};return i.forEach(r=>{const l=r.getInstanceId();let a=t.map[l];a||(a=new ro(r,this.rowNode,this.beans,this)),o(l,a)}),t.list.forEach(r=>{if(n.map[r.getColumn().getInstanceId()]!=null)return;if(!this.isCellEligibleToBeRemoved(r,s)){o(r.getColumn().getInstanceId(),r);return}r.destroy()}),n}updateColumnListsImpl(t){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(t)}setCellCtrls(t){this.allRowGuis.forEach(i=>{const s=this.getCellCtrlsForContainer(i.containerType);i.rowComp.setCellCtrls(s,t)})}getCellCtrlsForContainer(t){switch(t){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list;default:const i=t;throw new Error(`Unhandled case: ${i}`)}}createAllCellCtrls(){const t=this.beans.columnModel;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.getAllDisplayedColumns()),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const i=t.getViewportCenterColumnsForRow(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,i);const s=t.getDisplayedLeftColumnsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,s,"left");const n=t.getDisplayedRightColumnsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,n,"right")}}isCellEligibleToBeRemoved(t,i){if(t.getColumn().getPinned()!=i)return!0;const r=t.isEditing(),l=this.beans.focusService.isCellFocused(t.getCellPosition());if(r||l){const u=t.getColumn();return!(this.beans.columnModel.getAllDisplayedColumns().indexOf(u)>=0)}return!0}getDomOrder(){return this.gos.get("ensureDomOrder")||this.gos.isDomLayout("print")}listenOnDomOrder(t){const i=()=>{t.rowComp.setDomOrder(this.getDomOrder())};this.addManagedPropertyListener("domLayout",i),this.addManagedPropertyListener("ensureDomOrder",i)}setAnimateFlags(t){if(this.isSticky()||!t)return;const i=b(this.rowNode.oldRowTop),s=this.beans.columnModel.isPinningLeft(),n=this.beans.columnModel.isPinningRight();if(i){if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){this.slideInAnimation.fullWidth=!0;return}this.slideInAnimation.center=!0,this.slideInAnimation.left=s,this.slideInAnimation.right=n}else{if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){this.fadeInAnimation.fullWidth=!0;return}this.fadeInAnimation.center=!0,this.fadeInAnimation.left=s,this.fadeInAnimation.right=n}}isEditing(){return this.editingRow}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const t=(l,a)=>l?l.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(l.element,a).params):!0,i=t(this.fullWidthGui,null),s=t(this.centerGui,null),n=t(this.leftGui,"left"),o=t(this.rightGui,"right");return i&&s&&n&&o}addListeners(){this.addManagedListener(this.rowNode,se.EVENT_HEIGHT_CHANGED,()=>this.onRowHeightChanged()),this.addManagedListener(this.rowNode,se.EVENT_ROW_SELECTED,()=>this.onRowSelected()),this.addManagedListener(this.rowNode,se.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addManagedListener(this.rowNode,se.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(this.rowNode,se.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,se.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this)),this.rowNode.detail&&this.addManagedListener(this.rowNode.parent,se.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,se.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,se.EVENT_CELL_CHANGED,this.postProcessCss.bind(this)),this.addManagedListener(this.rowNode,se.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this)),this.addManagedListener(this.rowNode,se.EVENT_DRAGGING_CHANGED,this.postProcessRowDragging.bind(this)),this.addManagedListener(this.rowNode,se.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));const t=this.beans.eventService;this.addManagedListener(t,g.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOffsetChanged.bind(this)),this.addManagedListener(t,g.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(t,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(t,g.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(t,g.EVENT_CELL_FOCUSED,this.onCellFocusChanged.bind(this)),this.addManagedListener(t,g.EVENT_CELL_FOCUS_CLEARED,this.onCellFocusChanged.bind(this)),this.addManagedListener(t,g.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addManagedListener(t,g.EVENT_MODEL_UPDATED,this.refreshFirstAndLastRowStyles.bind(this)),this.addManagedListener(t,g.EVENT_COLUMN_MOVED,this.updateColumnLists.bind(this)),this.addDestroyFunc(()=>{this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context))}),this.addManagedPropertyListeners(["rowDragEntireRow"],()=>{if(this.gos.get("rowDragEntireRow")){this.allRowGuis.forEach(s=>{this.addRowDraggerToRow(s)});return}this.destroyBeans(this.rowDragComps,this.beans.context),this.rowDragComps=[]}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListener(this.rowNode,se.EVENT_ROW_INDEX_CHANGED,()=>{this.getAllCellCtrls().forEach(t=>t.onRowIndexChanged())}),this.addManagedListener(this.rowNode,se.EVENT_CELL_CHANGED,t=>{this.getAllCellCtrls().forEach(i=>i.onCellChanged(t))})}onRowNodeDataChanged(t){if(this.isFullWidth()!==!!this.rowNode.isFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(s=>s.refreshCell({suppressFlash:!t.update,newData:!t.update})),this.allRowGuis.forEach(s=>{this.setRowCompRowId(s.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(s.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const t=this.rowNode.highlighted;this.allRowGuis.forEach(i=>{const s=t===0,n=t===1;i.rowComp.addOrRemoveCssClass("ag-row-highlight-above",s),i.rowComp.addOrRemoveCssClass("ag-row-highlight-below",n)})}postProcessRowDragging(){const t=this.rowNode.dragging;this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass("ag-row-dragging",t))}updateExpandedCss(){const t=this.rowNode.isExpandable(),i=this.rowNode.expanded==!0;this.allRowGuis.forEach(s=>{s.rowComp.addOrRemoveCssClass("ag-row-group",t),s.rowComp.addOrRemoveCssClass("ag-row-group-expanded",t&&i),s.rowComp.addOrRemoveCssClass("ag-row-group-contracted",t&&!i),Gs(s.element,t&&i)})}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:Cs(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(t){const i=this.allRowGuis.find(a=>a.element.contains(t.target));if(!((i?i.element:null)===t.target))return;const o=this.rowNode,r=this.beans.focusService.getFocusedCell(),l={rowIndex:o.rowIndex,rowPinned:o.rowPinned,column:r&&r.column};this.beans.navigationService.navigateToNextCell(t,t.key,l,!0),t.preventDefault()}onTabKeyDown(t){if(t.defaultPrevented||es(t))return;const i=this.allRowGuis.find(r=>r.element.contains(t.target)),s=i?i.element:null,n=s===t.target;let o=null;n||(o=this.beans.focusService.findNextFocusableElement(s,!1,t.shiftKey)),(this.isFullWidth()&&n||!o)&&this.beans.navigationService.onTabKeyDown(this,t)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){var t;const i=(t=this.allRowGuis.find(s=>oi(s.element)))==null?void 0:t.element;return i?i.getBoundingClientRect().top:0}onFullWidthRowFocused(t){var i;const s=this.rowNode,n=t?this.isFullWidth()&&t.rowIndex===s.rowIndex&&t.rowPinned==s.rowPinned:!1,o=this.fullWidthGui?this.fullWidthGui.element:(i=this.centerGui)==null?void 0:i.element;o&&(o.classList.toggle("ag-full-width-focus",n),n&&o.focus({preventScroll:!0}))}recreateCell(t){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,t),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,t),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,t),t.destroy(),this.updateColumnLists()}removeCellCtrl(t,i){const s={list:[],map:{}};return t.list.forEach(n=>{n!==i&&(s.list.push(n),s.map[n.getColumn().getInstanceId()]=n)}),s}onMouseEvent(t,i){switch(t){case"dblclick":this.onRowDblClick(i);break;case"click":this.onRowClick(i);break;case"touchstart":case"mousedown":this.onRowMouseDown(i);break}}createRowEvent(t,i){return this.gos.addGridCommonParams({type:t,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,event:i})}createRowEventWithSource(t,i){const s=this.createRowEvent(t,i);return s.source=this,s}onRowDblClick(t){if(es(t))return;const i=this.createRowEventWithSource(g.EVENT_ROW_DOUBLE_CLICKED,t);this.beans.eventService.dispatchEvent(i)}onRowMouseDown(t){if(this.lastMouseDownOnDragger=no(t.target,"ag-row-drag",3),!this.isFullWidth())return;const i=this.rowNode,s=this.beans.columnModel;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges(),this.beans.focusService.setFocusedCell({rowIndex:i.rowIndex,column:s.getAllDisplayedColumns()[0],rowPinned:i.rowPinned,forceBrowserFocus:!0})}onRowClick(t){if(es(t)||this.lastMouseDownOnDragger)return;const s=this.createRowEventWithSource(g.EVENT_ROW_CLICKED,t);this.beans.eventService.dispatchEvent(s);const n=t.ctrlKey||t.metaKey,o=t.shiftKey;if(this.gos.get("groupSelectsChildren")&&this.rowNode.group||this.isRowSelectionBlocked()||this.gos.get("suppressRowClickSelection"))return;const l=this.gos.get("rowMultiSelectWithClick"),a=!this.gos.get("suppressRowDeselection"),u="rowClicked";if(this.rowNode.isSelected())l?this.rowNode.setSelectedParams({newValue:!1,event:t,source:u}):n?a&&this.rowNode.setSelectedParams({newValue:!1,event:t,source:u}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!o,rangeSelect:o,event:t,source:u});else{const d=l?!1:!n;this.rowNode.setSelectedParams({newValue:!0,clearSelection:d,rangeSelect:o,event:t,source:u})}}isRowSelectionBlocked(){return!this.rowNode.selectable||!!this.rowNode.rowPinned||!this.gos.isRowSelection()}setupDetailRowAutoHeight(t){if(this.rowType!=="FullWidthDetail"||!this.gos.get("detailRowAutoHeight"))return;const i=()=>{const n=t.clientHeight;if(n!=null&&n>0){const o=()=>{this.rowNode.setRowHeight(n),this.beans.clientSideRowModel?this.beans.clientSideRowModel.onRowHeightChanged():this.beans.serverSideRowModel&&this.beans.serverSideRowModel.onRowHeightChanged()};window.setTimeout(o,0)}},s=this.beans.resizeObserverService.observeResize(t,i);this.addDestroyFunc(s),i()}createFullWidthCompDetails(t,i){const s=this.gos.addGridCommonParams({fullWidth:!0,data:this.rowNode.data,node:this.rowNode,value:this.rowNode.key,valueFormatted:this.rowNode.key,rowIndex:this.rowNode.rowIndex,eGridCell:t,eParentOfValue:t,pinned:i,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(n,o,r,l)=>this.addFullWidthRowDragging(n,o,r,l),setTooltip:(n,o)=>this.refreshRowTooltip(n,o)});switch(this.rowType){case"FullWidthDetail":return this.beans.userComponentFactory.getFullWidthDetailCellRendererDetails(s);case"FullWidthGroup":return this.beans.userComponentFactory.getFullWidthGroupCellRendererDetails(s);case"FullWidthLoading":return this.beans.userComponentFactory.getFullWidthLoadingCellRendererDetails(s);default:return this.beans.userComponentFactory.getFullWidthCellRendererDetails(s)}}refreshRowTooltip(t,i){if(!this.fullWidthGui)return;const s={getGui:()=>this.fullWidthGui.element,getTooltipValue:()=>t,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i};this.tooltipFeature&&this.destroyBean(this.tooltipFeature,this.beans.context),this.tooltipFeature=this.createBean(new zs(s,this.beans))}addFullWidthRowDragging(t,i,s="",n){if(!this.isFullWidth())return;const o=new Co(()=>s,this.rowNode,void 0,t,i,n);this.createBean(o,this.beans.context),this.addDestroyFunc(()=>{this.destroyBean(o,this.beans.context)})}onUiLevelChanged(){const t=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=t){const i="ag-row-level-"+t,s="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(n=>{n.rowComp.addOrRemoveCssClass(i,!0),n.rowComp.addOrRemoveCssClass(s,!1)})}this.rowLevel=t}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow()}refreshFirstAndLastRowStyles(){const t=this.isFirstRowOnPage(),i=this.isLastRowOnPage();this.firstRowOnPage!==t&&(this.firstRowOnPage=t,this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass("ag-row-first",t))),this.lastRowOnPage!==i&&(this.lastRowOnPage=i,this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass("ag-row-last",i)))}stopEditing(t=!1){if(this.stoppingRowEdit)return;const i=this.getAllCellCtrls(),s=this.editingRow;this.stoppingRowEdit=!0;let n=!1;for(const o of i){const r=o.stopEditing(t);s&&!t&&!n&&r&&(n=!0)}if(n){const o=this.createRowEvent(g.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(o)}s&&this.setEditingRow(!1),this.stoppingRowEdit=!1}setInlineEditingCss(t){this.allRowGuis.forEach(i=>{i.rowComp.addOrRemoveCssClass("ag-row-inline-editing",t),i.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!t)})}setEditingRow(t){this.editingRow=t,this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass("ag-row-editing",t));const i=t?this.createRowEvent(g.EVENT_ROW_EDITING_STARTED):this.createRowEvent(g.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(i)}startRowEditing(t=null,i=null,s=null){if(this.editingRow)return;this.getAllCellCtrls().reduce((o,r)=>{const l=r===i;return l?r.startEditing(t,l,s):r.startEditing(null,l,s),o?!0:r.isEditing()},!1)&&this.setEditingRow(!0)}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const t=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);!t||!t.length||t.forEach(i=>{this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass(i,!0))})}postProcessRowClassRules(){this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,t=>{this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass(t,!0))},t=>{this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass(t,!1))})}setStylesFromGridOptions(t,i){t&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(i,s=>s.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(t){return t==="left"?"left":t==="right"?"right":null}getInitialRowClasses(t){const i=this.getPinnedForContainer(t),s={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeInAnimation[t],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:i};return this.beans.rowCssClassCalculator.getInitialRowClasses(s)}processStylesFromGridOptions(){const t=this.gos.get("rowStyle");if(t&&typeof t=="function"){console.warn("AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead");return}const i=this.gos.getCallback("getRowStyle");let s;if(i){const n={data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex};s=i(n)}return s||t?Object.assign({},t,s):this.emptyStyle}onRowSelected(t){const i=!!this.rowNode.isSelected();this.forEachGui(t,s=>{s.rowComp.addOrRemoveCssClass("ag-row-selected",i),Ar(s.element,i),s.element.contains(this.beans.gos.getActiveDomElement())&&(s===this.centerGui||s===this.fullWidthGui)&&this.announceDescription()})}announceDescription(){if(this.isRowSelectionBlocked())return;const t=this.rowNode.isSelected();if(t&&this.beans.gos.get("suppressRowDeselection"))return;const s=this.beans.localeService.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row.`);this.beans.ariaAnnouncementService.announceValue(s)}addHoverFunctionality(t){this.active&&(this.addManagedListener(t,"mouseenter",()=>this.rowNode.onMouseEnter()),this.addManagedListener(t,"mouseleave",()=>this.rowNode.onMouseLeave()),this.addManagedListener(this.rowNode,se.EVENT_MOUSE_ENTER,()=>{!this.beans.dragService.isDragging()&&!this.gos.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),this.rowNode.setHovered(!0))}),this.addManagedListener(this.rowNode,se.EVENT_MOUSE_LEAVE,()=>{t.classList.remove("ag-row-hover"),this.rowNode.setHovered(!1)}))}roundRowTopToBounds(t){const i=this.beans.ctrlsService.getGridBodyCtrl().getScrollFeature().getApproximateVScollPosition(),s=this.applyPaginationOffset(i.top,!0)-100,n=this.applyPaginationOffset(i.bottom,!0)+100;return Math.min(Math.max(s,t),n)}getFrameworkOverrides(){return this.beans.frameworkOverrides}forEachGui(t,i){t?i(t):this.allRowGuis.forEach(i)}onRowHeightChanged(t){if(this.rowNode.rowHeight==null)return;const i=this.rowNode.rowHeight,s=this.beans.environment.getDefaultRowHeight(),o=this.gos.isGetRowHeightFunction()?this.gos.getRowHeightForNode(this.rowNode).height:void 0,r=o?`${Math.min(s,o)-2}px`:void 0;this.forEachGui(t,l=>{l.element.style.height=`${i}px`,r&&l.element.style.setProperty("--ag-line-height",r)})}addEventListener(t,i){super.addEventListener(t,i)}removeEventListener(t,i){super.removeEventListener(t,i)}destroyFirstPass(t=!1){if(this.active=!1,!t&&this.gos.isAnimateRows()&&!this.isSticky())if(this.rowNode.rowTop!=null){const n=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(n)}else this.allRowGuis.forEach(n=>n.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0));this.rowNode.setHovered(!1);const i=this.createRowEvent(g.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(i),this.beans.eventService.dispatchEvent(i),super.destroy()}destroySecondPass(){this.allRowGuis.length=0,this.stopEditing();const t=i=>(i.list.forEach(s=>s.destroy()),{list:[],map:{}});this.centerCellCtrls=t(this.centerCellCtrls),this.leftCellCtrls=t(this.leftCellCtrls),this.rightCellCtrls=t(this.rightCellCtrls)}setFocusedClasses(t){this.forEachGui(t,i=>{i.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),i.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const t=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses()),!t&&this.editingRow&&this.stopEditing(!1)}onPaginationChanged(){const t=this.beans.paginationProxy.getCurrentPage();this.paginationPage!==t&&(this.paginationPage=t,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(t,i=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return t;const s=this.beans.paginationProxy.getPixelOffset();return t+s*(i?1:-1)}setRowTop(t){if(!this.printLayout&&b(t)){const i=this.applyPaginationOffset(t),o=`${this.rowNode.isRowPinned()||this.rowNode.sticky?i:this.beans.rowContainerHeightService.getRealPixelPosition(i)}px`;this.setRowTopStyle(o)}}getInitialRowTop(t){return this.suppressRowTransform?this.getInitialRowTopShared(t):void 0}getInitialTransform(t){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(t)})`}getInitialRowTopShared(t){if(this.printLayout)return"";let i;if(this.isSticky())i=this.rowNode.stickyRowTop;else{const s=this.slideInAnimation[t]?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,n=this.applyPaginationOffset(s);i=this.rowNode.isRowPinned()?n:this.beans.rowContainerHeightService.getRealPixelPosition(n)}return i+"px"}setRowTopStyle(t){this.allRowGuis.forEach(i=>this.suppressRowTransform?i.rowComp.setTop(t):i.rowComp.setTransform(`translateY(${t})`))}getRowNode(){return this.rowNode}getCellCtrl(t){let i=null;return this.getAllCellCtrls().forEach(s=>{s.getColumn()==t&&(i=s)}),i!=null||this.getAllCellCtrls().forEach(s=>{s.getColSpanningList().indexOf(t)>=0&&(i=s)}),i}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}getRowIndex(){return this.rowNode.getRowIndexString()}updateRowIndexes(t){const i=this.rowNode.getRowIndexString(),s=this.beans.headerNavigationService.getHeaderRowCount()+this.beans.filterManager.getHeaderRowCount(),n=this.rowNode.rowIndex%2===0,o=s+this.rowNode.rowIndex+1;this.forEachGui(t,r=>{r.rowComp.setRowIndex(i),r.rowComp.addOrRemoveCssClass("ag-row-even",n),r.rowComp.addOrRemoveCssClass("ag-row-odd",!n),Yf(r.element,o)})}};nT.DOM_DATA_KEY_ROW_CTRL="renderedRow";var lo=nT,ri=class extends L{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedListener(this.element,e,t)}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",Uf("touchstart")?"touchstart":"mousedown"].forEach(i=>{const s=this.processMouseEvent.bind(this,i);this.addManagedListener(this.element,i,s)})}processMouseEvent(e,t){if(!this.mouseEventService.isEventFromThisGrid(t)||es(t))return;const i=this.getRowForEvent(t),s=this.mouseEventService.getRenderedCellForEvent(t);e==="contextmenu"?this.handleContextMenuMouseEvent(t,void 0,i,s):(s&&s.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}mockContextMenuForIPad(){if(!Us())return;const e=new pt(this.element),t=i=>{const s=this.getRowForEvent(i.touchEvent),n=this.mouseEventService.getRenderedCellForEvent(i.touchEvent);this.handleContextMenuMouseEvent(void 0,i.touchEvent,s,n)};this.addManagedListener(e,pt.EVENT_LONG_TAP,t),this.addDestroyFunc(()=>e.destroy())}getRowForEvent(e){let t=e.target;for(;t;){const i=this.gos.getDomData(t,lo.DOM_DATA_KEY_ROW_CTRL);if(i)return i;t=t.parentElement}return null}handleContextMenuMouseEvent(e,t,i,s){const n=i?i.getRowNode():null,o=s?s.getColumn():null;let r=null;if(o){const u=e||t;s.dispatchCellContextMenuEvent(u??null),r=this.valueService.getValue(o,n)}const l=this.ctrlsService.getGridBodyCtrl(),a=s?s.getGui():l.getGridBodyElement();this.menuService.showContextMenu({mouseEvent:e,touchEvent:t,rowNode:n,column:o,value:r,anchorToElement:a})}getControlsForEventTarget(e){return{cellCtrl:Od(this.gos,e,ro.DOM_DATA_KEY_CELL_CTRL),rowCtrl:Od(this.gos,e,lo.DOM_DATA_KEY_ROW_CTRL)}}processKeyboardEvent(e,t){const{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(i?this.processCellKeyboardEvent(i,e,t):s&&s.isFullWidth()&&this.processFullWidthRowKeyboardEvent(s,e,t))}processCellKeyboardEvent(e,t,i){const s=e.getRowNode(),n=e.getColumn(),o=e.isEditing();if(!Hd(this.gos,i,s,n,o)&&t==="keydown"&&(!o&&this.navigationService.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,e.isEditing()),_c(i)&&e.processCharacter(i)),t==="keydown"){const l=e.createEvent(i,g.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(l)}}processFullWidthRowKeyboardEvent(e,t,i){const s=e.getRowNode(),n=this.focusService.getFocusedCell(),o=n&&n.column;if(!Hd(this.gos,i,s,o,!1)){const l=i.key;if(t==="keydown")switch(l){case D.PAGE_HOME:case D.PAGE_END:case D.PAGE_UP:case D.PAGE_DOWN:this.navigationService.handlePageScrollingKey(i,!0);break;case D.UP:case D.DOWN:e.onKeyboardNavigate(i);break;case D.TAB:e.onTabKeyDown(i);break}}if(t==="keydown"){const l=e.createRowEvent(g.EVENT_CELL_KEY_DOWN,i);this.eventService.dispatchEvent(l)}}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!this.mouseEventService.isEventFromThisGrid(e))return;const i=rR(e);if(i===D.A)return this.onCtrlAndA(e);if(i===D.C)return this.onCtrlAndC(e);if(i===D.D)return this.onCtrlAndD(e);if(i===D.V)return this.onCtrlAndV(e);if(i===D.X)return this.onCtrlAndX(e);if(i===D.Y)return this.onCtrlAndY();if(i===D.Z)return this.onCtrlAndZ(e)}onCtrlAndA(e){const{pinnedRowModel:t,paginationProxy:i,rangeService:s}=this;if(s&&i.isRowsToRender()){const[n,o]=[t.isEmpty("top"),t.isEmpty("bottom")],r=n?null:"top";let l,a;o?(l=null,a=this.paginationProxy.getRowCount()-1):(l="bottom",a=t.getPinnedBottomRowData().length-1);const u=this.columnModel.getAllDisplayedColumns();if(Ai(u))return;s.setCellRange({rowStartIndex:0,rowStartPinned:r,rowEndIndex:a,rowEndPinned:l,columnStart:u[0],columnEnd:de(u)})}e.preventDefault()}onCtrlAndC(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);t!=null&&t.isEditing()||i!=null&&i.isEditing()||(e.preventDefault(),this.clipboardService.copyToClipboard())}onCtrlAndX(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);t!=null&&t.isEditing()||i!=null&&i.isEditing()||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}onCtrlAndV(e){const{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);t!=null&&t.isEditing()||i!=null&&i.isEditing()||this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.pasteFromClipboard()}onCtrlAndD(e){this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault()}onCtrlAndZ(e){this.gos.get("undoRedoCellEditing")&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))}onCtrlAndY(){this.undoRedoService.redo("ui")}};c([f("mouseEventService")],ri.prototype,"mouseEventService",2);c([f("valueService")],ri.prototype,"valueService",2);c([f("menuService")],ri.prototype,"menuService",2);c([f("ctrlsService")],ri.prototype,"ctrlsService",2);c([f("navigationService")],ri.prototype,"navigationService",2);c([f("focusService")],ri.prototype,"focusService",2);c([f("undoRedoService")],ri.prototype,"undoRedoService",2);c([f("columnModel")],ri.prototype,"columnModel",2);c([f("paginationProxy")],ri.prototype,"paginationProxy",2);c([f("pinnedRowModel")],ri.prototype,"pinnedRowModel",2);c([fe("rangeService")],ri.prototype,"rangeService",2);c([fe("clipboardService")],ri.prototype,"clipboardService",2);c([M],ri.prototype,"postConstruct",1);var $r=class extends L{constructor(e){super(),this.centerContainerCtrl=e}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedListener(this.eventService,g.EVENT_SCROLLBAR_WIDTH_CHANGED,this.onScrollbarWidthChanged.bind(this)),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const e=()=>this.onCenterViewportResized();this.centerContainerCtrl.registerViewportResizeListener(e),this.gridBodyCtrl.registerBodyViewportResizeListener(e)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.centerContainerCtrl.isViewportInTheDOMTree()){this.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const e=this.centerContainerCtrl.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnModel.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.getBodyViewportElement(),t=bo(e);if(t<=50)return;let i=this.getPinnedColumnsOverflowingViewport(t-50);const s=this.gos.getCallback("processUnpinnedColumns");i.length&&(s&&(i=s({columns:i,viewportWidth:t})),this.columnModel.setColumnsPinned(i,null,"viewportSizeFeature"))}getPinnedColumnsOverflowingViewport(e){const t=this.pinnedWidthService.getPinnedRightWidth(),i=this.pinnedWidthService.getPinnedLeftWidth(),s=t+i;if(s<e)return[];const n=[...this.columnModel.getDisplayedLeftColumns()],o=[...this.columnModel.getDisplayedRightColumns()];let r=0,l=0,a=0;const u=[];let d=s-a-e;for(;(l<n.length||r<o.length)&&d>0;){if(r<o.length){const h=o[r++];d-=h.getActualWidth(),u.push(h)}if(l<n.length&&d>0){const h=n[l++];d-=h.getActualWidth(),u.push(h)}}return u}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.getBodyViewportElement(),t=Ua(e);if(this.bodyHeight!==t){this.bodyHeight=t;const i={type:g.EVENT_BODY_HEIGHT_CHANGED};this.eventService.dispatchEvent(i)}}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){const e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e)}isHorizontalScrollShowing(){return this.centerContainerCtrl.isHorizontalScrollShowing()}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.columnModel.setViewportPosition(e,t)}};c([f("ctrlsService")],$r.prototype,"ctrlsService",2);c([f("pinnedWidthService")],$r.prototype,"pinnedWidthService",2);c([f("columnModel")],$r.prototype,"columnModel",2);c([f("scrollVisibleService")],$r.prototype,"scrollVisibleService",2);c([M],$r.prototype,"postConstruct",1);var Fm=class extends L{constructor(e){super(),this.element=e}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this))}onPinnedLeftWidthChanged(){const e=this.pinnedWidthService.getPinnedLeftWidth(),t=e>0;le(this.element,t),Ni(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedLeftWidth()}};c([f("pinnedWidthService")],Fm.prototype,"pinnedWidthService",2);c([M],Fm.prototype,"postConstruct",1);var Am=class extends L{constructor(e){super(),this.element=e}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this))}onPinnedRightWidthChanged(){const e=this.pinnedWidthService.getPinnedRightWidth(),t=e>0;le(this.element,t),Ni(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedRightWidth()}};c([f("pinnedWidthService")],Am.prototype,"pinnedWidthService",2);c([M],Am.prototype,"postConstruct",1);var Yc=class extends L{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onHeightChanged.bind(this))}onHeightChanged(){const e=this.maxDivHeightScaler.getUiContainerHeight(),t=e!=null?`${e}px`:"";this.eContainer.style.height=t,this.eViewport&&(this.eViewport.style.height=t)}};c([f("rowContainerHeightService")],Yc.prototype,"maxDivHeightScaler",2);c([M],Yc.prototype,"postConstruct",1);var Qc=class extends L{constructor(e){super(),this.eContainer=e}postConstruct(){if(!this.rangeService)return;this.params={eElement:this.eContainer,onDragStart:this.rangeService.onDragStart.bind(this.rangeService),onDragStop:this.rangeService.onDragStop.bind(this.rangeService),onDragging:this.rangeService.onDragging.bind(this.rangeService)},this.addManagedPropertyListener("enableRangeSelection",t=>{if(t.currentValue){this.enableFeature();return}this.disableFeature()}),this.addDestroyFunc(()=>this.disableFeature()),this.gos.get("enableRangeSelection")&&this.enableFeature()}enableFeature(){this.dragService.addDragSource(this.params)}disableFeature(){this.dragService.removeDragSource(this.params)}};c([f("dragService")],Qc.prototype,"dragService",2);c([fe("rangeService")],Qc.prototype,"rangeService",2);c([M],Qc.prototype,"postConstruct",1);var Kr=class extends L{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedListener(this.eventService,g.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,e),this.addSpacer&&(this.addManagedListener(this.eventService,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_SCROLLBAR_WIDTH_CHANGED,e)),this.setWidth()}setWidth(){const{columnModel:e}=this,t=this.gos.isDomLayout("print"),i=e.getBodyContainerWidth(),s=e.getDisplayedColumnsLeftWidth(),n=e.getDisplayedColumnsRightWidth();let o;t?o=i+s+n:(o=i,this.addSpacer&&(this.gos.get("enableRtl")?s:n)===0&&this.scrollVisibleService.isVerticalScrollShowing()&&(o+=this.gos.getScrollbarWidth())),this.callback(o)}};c([f("columnModel")],Kr.prototype,"columnModel",2);c([f("scrollVisibleService")],Kr.prototype,"scrollVisibleService",2);c([M],Kr.prototype,"postConstruct",1);var Fe=(e=>(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.STICKY_BOTTOM_LEFT="stickyBottomLeft",e.STICKY_BOTTOM_RIGHT="stickyBottomRight",e.STICKY_BOTTOM_CENTER="stickyBottomCenter",e.STICKY_BOTTOM_FULL_WIDTH="stickyBottomFullWidth",e.BOTTOM_LEFT="bottomLeft",e.BOTTOM_RIGHT="bottomRight",e.BOTTOM_CENTER="bottomCenter",e.BOTTOM_FULL_WIDTH="bottomFullWidth",e))(Fe||{});function oT(e){switch(e){case"center":case"topCenter":case"stickyTopCenter":case"bottomCenter":case"stickyBottomCenter":return"center";case"left":case"topLeft":case"stickyTopLeft":case"bottomLeft":case"stickyBottomLeft":return"left";case"right":case"topRight":case"stickyTopRight":case"bottomRight":case"stickyBottomRight":return"right";case"fullWidth":case"topFullWidth":case"stickyTopFullWidth":case"bottomFullWidth":case"stickyBottomFullWidth":return"fullWidth";default:throw Error("Invalid Row Container Type")}}var sL=nn([["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"],["stickyBottomCenter","ag-sticky-bottom-container"],["stickyBottomLeft","ag-pinned-left-sticky-bottom"],["stickyBottomRight","ag-pinned-right-sticky-bottom"],["stickyBottomFullWidth","ag-sticky-bottom-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"]]),nL=nn([["center","ag-center-cols-viewport"],["topCenter","ag-floating-top-viewport"],["stickyTopCenter","ag-sticky-top-viewport"],["bottomCenter","ag-floating-bottom-viewport"],["stickyBottomCenter","ag-sticky-bottom-viewport"]]),Oo=class rT extends L{constructor(t){super(),this.visible=!0,this.EMPTY_CTRLS=[],this.name=t,this.isFullWithContainer=this.name==="topFullWidth"||this.name==="stickyTopFullWidth"||this.name==="stickyBottomFullWidth"||this.name==="bottomFullWidth"||this.name==="fullWidth"}static getRowContainerCssClasses(t){const i=sL.get(t),s=nL.get(t);return{container:i,viewport:s}}static getPinned(t){switch(t){case"bottomLeft":case"topLeft":case"stickyTopLeft":case"stickyBottomLeft":case"left":return"left";case"bottomRight":case"topRight":case"stickyTopRight":case"stickyBottomRight":case"right":return"right";default:return null}}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>this.viewportSizeFeature=this.createManagedBean(new $r(this)))}registerWithCtrlsService(){switch(this.name){case"fullWidth":case"topFullWidth":case"stickyTopFullWidth":case"bottomFullWidth":case"stickyBottomFullWidth":return;default:this.ctrlsService.register(this.name,this)}}forContainers(t,i){t.indexOf(this.name)>=0&&i()}getContainerElement(){return this.eContainer}getViewportSizeFeature(){return this.viewportSizeFeature}setComp(t,i,s){this.comp=t,this.eContainer=i,this.eViewport=s,this.createManagedBean(new ri(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder(),this.stopHScrollOnPinnedRows();const n=["topCenter","topLeft","topRight"],o=["stickyTopCenter","stickyTopLeft","stickyTopRight"],r=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],l=["bottomCenter","bottomLeft","bottomRight"],a=["center","left","right"],u=[...n,...l,...a,...o,...r],d=["center","left","right","fullWidth"],h=["center","topCenter","stickyTopCenter","bottomCenter","stickyBottomCenter"],p=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],C=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"];this.forContainers(p,()=>{this.pinnedWidthFeature=this.createManagedBean(new Fm(this.eContainer)),this.addManagedListener(this.eventService,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,()=>this.onPinnedWidthChanged())}),this.forContainers(C,()=>{this.pinnedWidthFeature=this.createManagedBean(new Am(this.eContainer)),this.addManagedListener(this.eventService,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,()=>this.onPinnedWidthChanged())}),this.forContainers(d,()=>this.createManagedBean(new Yc(this.eContainer,this.name==="center"?s:void 0))),this.forContainers(u,()=>this.createManagedBean(new Qc(this.eContainer))),this.forContainers(h,()=>this.createManagedBean(new Kr(v=>this.comp.setContainerWidth(`${v}px`)))),this.addListeners(),this.registerWithCtrlsService()}addListeners(){this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,()=>this.onDisplayedColumnsChanged()),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,()=>this.onDisplayedColumnsWidthChanged()),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_ROWS_CHANGED,t=>this.onDisplayedRowsChanged(t.afterScroll)),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()}listenOnDomOrder(){if(["stickyTopCenter","stickyTopLeft","stickyTopRight","stickyTopFullWidth","stickyBottomCenter","stickyBottomLeft","stickyBottomRight","stickyBottomFullWidth"].indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const s=()=>{const n=this.gos.get("ensureDomOrder"),o=this.gos.isDomLayout("print");this.comp.setDomOrder(n||o)};this.addManagedPropertyListener("domLayout",s),s()}stopHScrollOnPinnedRows(){this.forContainers(["topCenter","stickyTopCenter","bottomCenter","stickyBottomCenter"],()=>{const t=()=>this.eViewport.scrollLeft=0;this.addManagedListener(this.eViewport,"scroll",t)})}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}onDisplayedColumnsWidthChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const t=i=>{this.dragService.isDragging()&&i.cancelable&&i.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(t=!1){const i=this.getCenterWidth(),s=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(i,s,t)}getCenterWidth(){return bo(this.eViewport)}getCenterViewportScrollLeft(){return ga(this.eViewport,this.enableRtl)}registerViewportResizeListener(t){const i=this.resizeObserverService.observeResize(this.eViewport,t);this.addDestroyFunc(()=>i())}isViewportInTheDOMTree(){return lm(this.eViewport)}getViewportScrollLeft(){return ga(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||qE(this.eViewport)}getViewportElement(){return this.eViewport}setContainerTranslateX(t){this.eContainer.style.transform=`translateX(${t}px)`}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(t){fa(this.eViewport,t,this.enableRtl)}isContainerVisible(){return!rT.getPinned(this.name)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const t=this.isContainerVisible();this.visible!=t&&(this.visible=t,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(t=!1){const i=this.getRowCtrls();if(!this.visible||i.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const s=this.gos.isDomLayout("print"),o=this.gos.get("embedFullWidthRows")||s,r=i.filter(l=>{const a=l.isFullWidth();return this.isFullWithContainer?!o&&a:o||!a});this.comp.setRowCtrls({rowCtrls:r,useFlushSync:t})}getRowCtrls(){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"stickyBottomCenter":case"stickyBottomLeft":case"stickyBottomRight":case"stickyBottomFullWidth":return this.rowRenderer.getStickyBottomRowCtrls();case"bottomCenter":case"bottomLeft":case"bottomRight":case"bottomFullWidth":return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getCentreRowCtrls()}}};c([f("dragService")],Oo.prototype,"dragService",2);c([f("ctrlsService")],Oo.prototype,"ctrlsService",2);c([f("columnModel")],Oo.prototype,"columnModel",2);c([f("resizeObserverService")],Oo.prototype,"resizeObserverService",2);c([f("rowRenderer")],Oo.prototype,"rowRenderer",2);c([M],Oo.prototype,"postConstruct",1);var Ud=Oo,oL=`<div class="ag-root ag-unselectable" role="treegrid">
|
|
147
|
+
<ag-header-root ref="gridHeader"></ag-header-root>
|
|
148
|
+
<div class="ag-floating-top" ref="eTop" role="presentation">
|
|
149
|
+
<ag-row-container ref="topLeftContainer" name="topLeft"></ag-row-container>
|
|
150
|
+
<ag-row-container ref="topCenterContainer" name="topCenter"></ag-row-container>
|
|
151
|
+
<ag-row-container ref="topRightContainer" name="topRight"></ag-row-container>
|
|
152
|
+
<ag-row-container ref="topFullWidthContainer" name="topFullWidth"></ag-row-container>
|
|
153
|
+
</div>
|
|
154
|
+
<div class="ag-body" ref="eBody" role="presentation">
|
|
155
|
+
<div class="ag-body-viewport" ref="eBodyViewport" role="presentation">
|
|
156
|
+
<ag-row-container ref="leftContainer" name="left"></ag-row-container>
|
|
157
|
+
<ag-row-container ref="centerContainer" name="center"></ag-row-container>
|
|
158
|
+
<ag-row-container ref="rightContainer" name="right"></ag-row-container>
|
|
159
|
+
<ag-row-container ref="fullWidthContainer" name="fullWidth"></ag-row-container>
|
|
160
|
+
</div>
|
|
161
|
+
<ag-fake-vertical-scroll></ag-fake-vertical-scroll>
|
|
162
|
+
</div>
|
|
163
|
+
<div class="ag-sticky-top" ref="eStickyTop" role="presentation">
|
|
164
|
+
<ag-row-container ref="stickyTopLeftContainer" name="stickyTopLeft"></ag-row-container>
|
|
165
|
+
<ag-row-container ref="stickyTopCenterContainer" name="stickyTopCenter"></ag-row-container>
|
|
166
|
+
<ag-row-container ref="stickyTopRightContainer" name="stickyTopRight"></ag-row-container>
|
|
167
|
+
<ag-row-container ref="stickyTopFullWidthContainer" name="stickyTopFullWidth"></ag-row-container>
|
|
168
|
+
</div>
|
|
169
|
+
<div class="ag-sticky-bottom" ref="eStickyBottom" role="presentation">
|
|
170
|
+
<ag-row-container ref="stickyBottomLeftContainer" name="stickyBottomLeft"></ag-row-container>
|
|
171
|
+
<ag-row-container ref="stickyBottomCenterContainer" name="stickyBottomCenter"></ag-row-container>
|
|
172
|
+
<ag-row-container ref="stickyBottomRightContainer" name="stickyBottomRight"></ag-row-container>
|
|
173
|
+
<ag-row-container ref="stickyBottomFullWidthContainer" name="stickyBottomFullWidth"></ag-row-container>
|
|
174
|
+
</div>
|
|
175
|
+
<div class="ag-floating-bottom" ref="eBottom" role="presentation">
|
|
176
|
+
<ag-row-container ref="bottomLeftContainer" name="bottomLeft"></ag-row-container>
|
|
177
|
+
<ag-row-container ref="bottomCenterContainer" name="bottomCenter"></ag-row-container>
|
|
178
|
+
<ag-row-container ref="bottomRightContainer" name="bottomRight"></ag-row-container>
|
|
179
|
+
<ag-row-container ref="bottomFullWidthContainer" name="bottomFullWidth"></ag-row-container>
|
|
180
|
+
</div>
|
|
181
|
+
<ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>
|
|
182
|
+
<ag-overlay-wrapper></ag-overlay-wrapper>
|
|
183
|
+
</div>`,ns=class extends Z{constructor(){super(oL)}init(){const t=(s,n)=>{const o=`${s}px`;n.style.minHeight=o,n.style.height=o},i={setRowAnimationCssOnBodyViewport:(s,n)=>this.setRowAnimationCssOnBodyViewport(s,n),setColumnCount:s=>xE(this.getGui(),s),setRowCount:s=>IE(this.getGui(),s),setTopHeight:s=>t(s,this.eTop),setBottomHeight:s=>t(s,this.eBottom),setTopDisplay:s=>this.eTop.style.display=s,setBottomDisplay:s=>this.eBottom.style.display=s,setStickyTopHeight:s=>this.eStickyTop.style.height=s,setStickyTopTop:s=>this.eStickyTop.style.top=s,setStickyTopWidth:s=>this.eStickyTop.style.width=s,setStickyBottomHeight:s=>this.eStickyBottom.style.height=s,setStickyBottomBottom:s=>this.eStickyBottom.style.bottom=s,setStickyBottomWidth:s=>this.eStickyBottom.style.width=s,setColumnMovingCss:(s,n)=>this.addOrRemoveCssClass(s,n),updateLayoutClasses:(s,n)=>{[this.eBodyViewport.classList,this.eBody.classList].forEach(r=>{r.toggle("ag-layout-auto-height",n.autoHeight),r.toggle("ag-layout-normal",n.normal),r.toggle("ag-layout-print",n.print)}),this.addOrRemoveCssClass("ag-layout-auto-height",n.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",n.normal),this.addOrRemoveCssClass("ag-layout-print",n.print)},setAlwaysVerticalScrollClass:(s,n)=>this.eBodyViewport.classList.toggle(tT,n),registerBodyViewportResizeListener:s=>{const n=this.resizeObserverService.observeResize(this.eBodyViewport,s);this.addDestroyFunc(()=>n())},setPinnedTopBottomOverflowY:s=>this.eTop.style.overflowY=this.eBottom.style.overflowY=s,setCellSelectableCss:(s,n)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(o=>o.classList.toggle(s,n))},setBodyViewportWidth:s=>this.eBodyViewport.style.width=s};this.ctrl=this.createManagedBean(new Mt),this.ctrl.setComp(i,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(this.rangeService&&this.gos.get("enableRangeSelection")||this.gos.get("rowSelection")==="multiple")&&ME(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(t,i){const s=this.eBodyViewport.classList;s.toggle("ag-row-animation",i),s.toggle("ag-row-no-animation",!i)}getFloatingTopBottom(){return[this.eTop,this.eBottom]}};c([f("resizeObserverService")],ns.prototype,"resizeObserverService",2);c([fe("rangeService")],ns.prototype,"rangeService",2);c([N("eBodyViewport")],ns.prototype,"eBodyViewport",2);c([N("eStickyTop")],ns.prototype,"eStickyTop",2);c([N("eStickyBottom")],ns.prototype,"eStickyBottom",2);c([N("eTop")],ns.prototype,"eTop",2);c([N("eBottom")],ns.prototype,"eBottom",2);c([N("gridHeader")],ns.prototype,"headerRootComp",2);c([N("eBody")],ns.prototype,"eBody",2);c([M],ns.prototype,"init",1);var Mr=class extends L{postConstruct(){this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this))}onDisplayedColumnsChanged(){this.update()}onDisplayedColumnsWidthChanged(){this.update()}update(){this.columnAnimationService.isActive()?this.columnAnimationService.executeLaterVMTurn(()=>{this.columnAnimationService.executeLaterVMTurn(()=>this.updateImpl())}):this.updateImpl()}updateImpl(){const e=this.ctrlsService.get("center");if(!e||this.columnAnimationService.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(t)}setScrollsVisible(e){if(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing){this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing;const i={type:g.EVENT_SCROLL_VISIBILITY_CHANGED};this.eventService.dispatchEvent(i)}}isHorizontalScrollShowing(){return this.horizontalScrollShowing}isVerticalScrollShowing(){return this.verticalScrollShowing}};c([f("ctrlsService")],Mr.prototype,"ctrlsService",2);c([f("columnAnimationService")],Mr.prototype,"columnAnimationService",2);c([M],Mr.prototype,"postConstruct",1);Mr=c([H("scrollVisibleService")],Mr);var Is=class extends L{constructor(){super(...arguments),this.gridInstanceId=Is.gridInstanceSequence.next()}stampTopLevelGridCompWithGridInstance(e){e[Is.GRID_DOM_KEY]=this.gridInstanceId}getRenderedCellForEvent(e){return Od(this.gos,e.target,ro.DOM_DATA_KEY_CELL_CTRL)}isEventFromThisGrid(e){return this.isElementInThisGrid(e.target)}isElementInThisGrid(e){let t=e;for(;t;){const i=t[Is.GRID_DOM_KEY];if(b(i))return i===this.gridInstanceId;t=t.parentElement}return!1}getCellPositionForEvent(e){const t=this.getRenderedCellForEvent(e);return t?t.getCellPosition():null}getNormalisedPosition(e){const t=this.gos.isDomLayout("normal"),i=e;let s,n;if(i.clientX!=null||i.clientY!=null?(s=i.clientX,n=i.clientY):(s=i.x,n=i.y),t){const o=this.ctrlsService.getGridBodyCtrl(),r=o.getScrollFeature().getVScrollPosition(),l=o.getScrollFeature().getHScrollPosition();s+=l.left,n+=r.top}return{x:s,y:n}}};Is.gridInstanceSequence=new Lr;Is.GRID_DOM_KEY="__ag_grid_instance";c([f("ctrlsService")],Is.prototype,"ctrlsService",2);Is=c([H("mouseEventService")],Is);var bt=class extends L{constructor(){super(),this.onPageDown=rg(this.onPageDown,100),this.onPageUp=rg(this.onPageUp,100)}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const i=e.key,s=e.altKey,n=e.ctrlKey||e.metaKey,o=!!this.rangeService&&e.shiftKey,r=this.mouseEventService.getCellPositionForEvent(e);let l=!1;switch(i){case D.PAGE_HOME:case D.PAGE_END:!n&&!s&&(this.onHomeOrEndKey(i),l=!0);break;case D.LEFT:case D.RIGHT:case D.UP:case D.DOWN:if(!r)return!1;n&&!s&&!o&&(this.onCtrlUpDownLeftRight(i,r),l=!0);break;case D.PAGE_DOWN:case D.PAGE_UP:!n&&!s&&(l=this.handlePageUpDown(i,r,t));break}return l&&e.preventDefault(),l}handlePageUpDown(e,t,i){return i&&(t=this.focusService.getFocusedCell()),t?(e===D.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo(e){var t;const{scrollIndex:i,scrollType:s,scrollColumn:n,focusIndex:o,focusColumn:r}=e;b(n)&&!n.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(n),b(i)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(i,s),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(o),this.focusService.setFocusedCell({rowIndex:o,column:r,rowPinned:null,forceBrowserFocus:!0}),(t=this.rangeService)==null||t.setRangeToCell({rowIndex:o,rowPinned:null,column:r})}onPageDown(e){const i=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),s=this.getViewportHeight(),n=this.paginationProxy.getPixelOffset(),o=i.top+s,r=this.paginationProxy.getRowIndexAtPixel(o+n);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,r):this.navigateToNextPage(e,r)}onPageUp(e){const i=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),s=this.paginationProxy.getPixelOffset(),n=i.top,o=this.paginationProxy.getRowIndexAtPixel(n+s);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,o,!0):this.navigateToNextPage(e,o,!0)}navigateToNextPage(e,t,i=!1){const s=this.getViewportHeight(),n=this.paginationProxy.getPageFirstRow(),o=this.paginationProxy.getPageLastRow(),r=this.paginationProxy.getPixelOffset(),l=this.paginationProxy.getRow(e.rowIndex),a=i?(l==null?void 0:l.rowHeight)-s-r:s-r,u=(l==null?void 0:l.rowTop)+a;let d=this.paginationProxy.getRowIndexAtPixel(u+r);if(d===e.rowIndex){const p=i?-1:1;t=d=e.rowIndex+p}let h;i?(h="bottom",d<n&&(d=n),t<n&&(t=n)):(h="top",d>o&&(d=o),t>o&&(t=o)),this.isRowTallerThanView(d)&&(t=d,h="top"),this.navigateTo({scrollIndex:t,scrollType:h,scrollColumn:null,focusIndex:d,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,i=!1){this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const s=this.getNextFocusIndexForAutoHeight(e,i);this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:s,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){var i;const s=t?-1:1,n=this.getViewportHeight(),o=this.paginationProxy.getPageLastRow();let r=0,l=e.rowIndex;for(;l>=0&&l<=o;){const a=this.paginationProxy.getRow(l);if(a){const u=(i=a.rowHeight)!=null?i:0;if(r+u>n)break;r+=u}l+=s}return Math.max(0,Math.min(l,o))}getViewportHeight(){const{gridBodyCtrl:e,center:t}=this.ctrlsService.getParams(),i=e.getScrollFeature().getVScrollPosition(),s=this.gos.getScrollbarWidth();let n=i.bottom-i.top;return t.isHorizontalScrollShowing()&&(n-=s),n}isRowTallerThanView(e){const t=this.paginationProxy.getRow(e);if(!t)return!1;const i=t.rowHeight;return typeof i!="number"?!1:i>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const i=this.cellNavigationService.getNextCellToFocus(e,t,!0),{rowIndex:s,column:n}=i;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:n,focusIndex:s,focusColumn:n})}onHomeOrEndKey(e){const t=e===D.PAGE_HOME,i=this.columnModel.getAllDisplayedColumns(),s=t?i[0]:de(i),n=t?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:n,scrollType:null,scrollColumn:s,focusIndex:n,focusColumn:s})}onTabKeyDown(e,t){const i=t.shiftKey,s=this.tabToNextCellCommon(e,i,t);if(s!==!1){s&&t.preventDefault();return}if(i){const{rowIndex:n,rowPinned:o}=e.getRowPosition();(o?n===0:n===this.paginationProxy.getPageFirstRow())&&(this.gos.get("headerHeight")===0||this.gos.get("suppressHeaderFocus")?this.focusService.focusNextGridCoreContainer(!0,!0):(t.preventDefault(),this.focusService.focusPreviousFromFirstCell(t)))}else e instanceof ro&&e.focusCell(!0),this.focusService.focusNextGridCoreContainer(i)&&t.preventDefault()}tabToNextCell(e,t){const i=this.focusService.getFocusedCell();if(!i)return!1;let s=this.getCellByPosition(i);return!s&&(s=this.rowRenderer.getRowByPosition(i),!s||!s.isFullWidth())?!1:!!this.tabToNextCellCommon(s,e,t)}tabToNextCellCommon(e,t,i){let s=e.isEditing();if(!s&&e instanceof ro){const r=e.getRowCtrl();r&&(s=r.isEditing())}let n;return s?this.gos.get("editType")==="fullRow"?n=this.moveToNextEditingRow(e,t,i):n=this.moveToNextEditingCell(e,t,i):n=this.moveToNextCellNotEditing(e,t),n===null?n:n||!!this.focusService.getFocusedHeader()}moveToNextEditingCell(e,t,i=null){const s=e.getCellPosition();e.getGui().focus(),e.stopEditing();const n=this.findNextCellToFocusOn(s,t,!0);return n===!1?null:n==null?!1:(n.startEditing(null,!0,i),n.focusCell(!1),!0)}moveToNextEditingRow(e,t,i=null){const s=e.getCellPosition(),n=this.findNextCellToFocusOn(s,t,!0);if(n===!1)return null;if(n==null)return!1;const o=n.getCellPosition(),r=this.isCellEditable(s),l=this.isCellEditable(o),a=o&&s.rowIndex===o.rowIndex&&s.rowPinned===o.rowPinned;return r&&e.setFocusOutOnEditor(),a||(e.getRowCtrl().stopEditing(),n.getRowCtrl().startRowEditing(void 0,void 0,i)),l?(n.setFocusInOnEditor(),n.focusCell()):n.focusCell(!0),!0}moveToNextCellNotEditing(e,t){const i=this.columnModel.getAllDisplayedColumns();let s;e instanceof lo?s=Me($({},e.getRowPosition()),{column:t?i[0]:de(i)}):s=e.getCellPosition();const n=this.findNextCellToFocusOn(s,t,!1);if(n===!1)return null;if(n instanceof ro)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n.getRowPosition(),t);return b(n)}findNextCellToFocusOn(e,t,i){var s;let n=e;for(;;){e!==n&&(e=n),t||(n=this.getLastCellOfColSpan(n)),n=this.cellNavigationService.getNextTabbedCell(n,t);const o=this.gos.getCallback("tabToNextCell");if(b(o)){const u=o({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:n||null});if(u===!0||u===null)u===null&&K("Returning `null` from tabToNextCell is deprecated. Return `true` to stay on the current cell, or `false` to let the browser handle the tab behaviour."),n=e;else{if(u===!1)return!1;u.floating&&(K("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),u.rowPinned=u.floating),n={rowIndex:u.rowIndex,column:u.column,rowPinned:u.rowPinned}}}if(!n)return null;if(n.rowIndex<0){const a=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:a+n.rowIndex,column:n.column},fromCell:!0}),null}const r=this.gos.get("editType")==="fullRow";if(i&&!r&&!this.isCellEditable(n))continue;this.ensureCellVisible(n);const l=this.getCellByPosition(n);if(!l){const a=this.rowRenderer.getRowByPosition(n);if(!a||!a.isFullWidth()||i)continue;return a}if(!l.isSuppressNavigable())return(s=this.rangeService)==null||s.setRangeToCell(n),l}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}getCellByPosition(e){const t=this.rowRenderer.getRowByPosition(e);return t?t.getCellCtrl(e.column):null}lookupRowNodeForCell(e){return e.rowPinned==="top"?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):e.rowPinned==="bottom"?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.paginationProxy.getRow(e.rowIndex)}navigateToNextCell(e,t,i,s){let n=i,o=!1;for(;n&&(n===i||!this.isValidNavigateCell(n));)this.gos.get("enableRtl")?t===D.LEFT&&(n=this.getLastCellOfColSpan(n)):t===D.RIGHT&&(n=this.getLastCellOfColSpan(n)),n=this.cellNavigationService.getNextCellToFocus(t,n),o=q(n);if(o&&e&&e.key===D.UP&&(n={rowIndex:-1,rowPinned:null,column:i.column}),s){const l=this.gos.getCallback("navigateToNextCell");if(b(l)){const u=l({key:t,previousCellPosition:i,nextCellPosition:n||null,event:e});b(u)?(u.floating&&(K("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),u.rowPinned=u.floating),n={rowPinned:u.rowPinned,rowIndex:u.rowIndex,column:u.column}):n=null}}if(!n)return;if(n.rowIndex<0){const l=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l+n.rowIndex,column:i.column},event:e||void 0,fromCell:!0});return}const r=this.getNormalisedPosition(n);r?this.focusPosition(r):this.tryToFocusFullWidthRow(n)}getNormalisedPosition(e){this.ensureCellVisible(e);const t=this.getCellByPosition(e);return t?(e=t.getCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t=!1){const i=this.columnModel.getAllDisplayedColumns(),s=this.rowRenderer.getRowByPosition(e);if(!s||!s.isFullWidth())return!1;const n=this.focusService.getFocusedCell(),o={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?de(i):i[0])};this.focusPosition(o);const r=n!=null?this.rowPositionUtils.before(o,n):!1,l={type:g.EVENT_FULL_WIDTH_ROW_FOCUSED,rowIndex:o.rowIndex,rowPinned:o.rowPinned,column:o.column,isFullWidthCell:!0,floating:o.rowPinned,fromBelow:r};return this.eventService.dispatchEvent(l),!0}focusPosition(e){var t;this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),(t=this.rangeService)==null||t.setRangeToCell(e)}isValidNavigateCell(e){return!!this.rowPositionUtils.getRowNode(e)}getLastCellOfColSpan(e){const t=this.getCellByPosition(e);if(!t)return e;const i=t.getColSpanningList();return i.length===1?e:{rowIndex:e.rowIndex,column:de(i),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=this.gos.isGroupRowsSticky(),i=this.rowModel.getRow(e.rowIndex);!(t&&(i==null?void 0:i.sticky))&&q(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)}};c([f("mouseEventService")],bt.prototype,"mouseEventService",2);c([f("paginationProxy")],bt.prototype,"paginationProxy",2);c([f("focusService")],bt.prototype,"focusService",2);c([f("columnModel")],bt.prototype,"columnModel",2);c([f("rowModel")],bt.prototype,"rowModel",2);c([f("ctrlsService")],bt.prototype,"ctrlsService",2);c([f("rowRenderer")],bt.prototype,"rowRenderer",2);c([f("headerNavigationService")],bt.prototype,"headerNavigationService",2);c([f("rowPositionUtils")],bt.prototype,"rowPositionUtils",2);c([f("cellNavigationService")],bt.prototype,"cellNavigationService",2);c([f("pinnedRowModel")],bt.prototype,"pinnedRowModel",2);c([fe("rangeService")],bt.prototype,"rangeService",2);c([M],bt.prototype,"postConstruct",1);bt=c([H("navigationService")],bt);var bm=class lT extends Io{constructor(t){super('<div class="ag-popup-editor" tabindex="-1"/>'),this.params=t}postConstruct(){this.gos.setDomData(this.getGui(),lT.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addKeyDownListener()}addKeyDownListener(){const t=this.getGui(),i=this.params,s=n=>{Hd(this.gos,n,i.node,i.column,!0)||i.onKeyDown(n)};this.addManagedListener(t,"keydown",s)}};bm.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper";c([M],bm.prototype,"postConstruct",1);var aT=bm,rL=class extends Z{constructor(t,i,s,n,o){super(),this.rendererVersion=0,this.editorVersion=0,this.beans=t,this.column=i.getColumn(),this.rowNode=i.getRowNode(),this.rowCtrl=i.getRowCtrl(),this.eRow=n,this.cellCtrl=i;const r=document.createElement("div");r.setAttribute("comp-id",`${this.getCompId()}`),this.setTemplateFromElement(r);const l=this.getGui();this.forceWrapper=i.isForceWrapper(),this.refreshWrapper(!1);const a=(h,p)=>{p!=null&&p!=""?l.setAttribute(h,p):l.removeAttribute(h)};He(l,i.getCellAriaRole()),a("col-id",i.getColumnIdSanitised());const u=i.getTabIndex();u!==void 0&&a("tabindex",u.toString());const d={addOrRemoveCssClass:(h,p)=>this.addOrRemoveCssClass(h,p),setUserStyles:h=>dm(l,h),getFocusableElement:()=>this.getFocusableElement(),setIncludeSelection:h=>this.includeSelection=h,setIncludeRowDrag:h=>this.includeRowDrag=h,setIncludeDndSource:h=>this.includeDndSource=h,setRenderDetails:(h,p,C)=>this.setRenderDetails(h,p,C),setEditDetails:(h,p,C)=>this.setEditDetails(h,p,C),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()};i.setComp(d,this.getGui(),this.eCellWrapper,s,o)}getParentOfValue(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()}setRenderDetails(t,i,s){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;const o=this.refreshWrapper(!1);this.refreshEditStyles(!1),t?!(s||o)&&this.refreshCellRenderer(t)||(this.destroyRenderer(),this.createCellRendererInstance(t)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(i))}setEditDetails(t,i,s){t?this.createCellEditorInstance(t,i,s):this.destroyEditor()}removeControls(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)}refreshWrapper(t){const i=this.includeRowDrag||this.includeDndSource||this.includeSelection,s=i||this.forceWrapper,n=s&&this.eCellWrapper==null;if(n){const d=document.createElement("div");d.setAttribute("role","presentation"),d.setAttribute("class","ag-cell-wrapper"),this.eCellWrapper=d,this.getGui().appendChild(this.eCellWrapper)}const o=!s&&this.eCellWrapper!=null;o&&(qi(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!s);const r=!t&&s,l=r&&this.eCellValue==null;if(l){const d=document.createElement("span");d.setAttribute("role","presentation"),d.setAttribute("class","ag-cell-value"),this.eCellValue=d,this.eCellWrapper.appendChild(this.eCellValue)}const a=!r&&this.eCellValue!=null;a&&(qi(this.eCellValue),this.eCellValue=void 0);const u=n||o||l||a;return u&&this.removeControls(),t||i&&this.addControls(),u}addControls(){this.includeRowDrag&&this.rowDraggingComp==null&&(this.rowDraggingComp=this.cellCtrl.createRowDragComp(),this.rowDraggingComp&&this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(),this.eCellValue)),this.includeDndSource&&this.dndSourceComp==null&&(this.dndSourceComp=this.cellCtrl.createDndSource(),this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)),this.includeSelection&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox(),this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue))}createCellEditorInstance(t,i,s){const n=this.editorVersion,o=t.newAgStackInstance();if(!o)return;const{params:r}=t;o.then(a=>this.afterCellEditorCreated(n,a,r,i,s)),q(this.cellEditor)&&r.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(t){const i=this.getParentOfValue();je(i);const s=t!=null?Xe(t,!0):null;s!=null&&(i.textContent=s)}destroyEditorAndRenderer(){this.destroyRenderer(),this.destroyEditor()}destroyRenderer(){const{context:t}=this.beans;this.cellRenderer=t.destroyBean(this.cellRenderer),qi(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:t}=this.beans;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=t.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=t.destroyBean(this.cellEditorPopupWrapper),qi(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(t){if(this.cellRenderer==null||this.cellRenderer.refresh==null||this.cellRendererClass!==t.componentClass)return!1;const i=this.cellRenderer.refresh(t.params);return i===!0||i===void 0}createCellRendererInstance(t){const s=!this.beans.gos.get("suppressAnimationFrame"),n=this.rendererVersion,{componentClass:o}=t,r=()=>{if(this.rendererVersion!==n||!this.isAlive())return;const a=t.newAgStackInstance(),u=this.afterCellRendererCreated.bind(this,n,o);a&&a.then(u)};s&&this.firstRender?this.beans.animationFrameService.createTask(r,this.rowNode.rowIndex,"createTasksP2"):r()}getCtrl(){return this.cellCtrl}getRowCtrl(){return this.rowCtrl}getCellRenderer(){return this.cellRenderer}getCellEditor(){return this.cellEditor}afterCellRendererCreated(t,i,s){if(!this.isAlive()||t!==this.rendererVersion){this.beans.context.destroyBean(s);return}if(this.cellRenderer=s,this.cellRendererClass=i,this.cellRendererGui=this.cellRenderer.getGui(),this.cellRendererGui!=null){const o=this.getParentOfValue();je(o),o.appendChild(this.cellRendererGui)}}afterCellEditorCreated(t,i,s,n,o){if(t!==this.editorVersion){this.beans.context.destroyBean(i);return}if(i.isCancelBeforeStart&&i.isCancelBeforeStart()){this.beans.context.destroyBean(i),this.cellCtrl.stopEditing(!0);return}if(!i.getGui){console.warn(`AG Grid: cellEditor for column ${this.column.getId()} is missing getGui() method`),this.beans.context.destroyBean(i);return}this.cellEditor=i,this.cellEditorGui=i.getGui();const a=n||i.isPopup!==void 0&&i.isPopup();a?this.addPopupCellEditor(s,o):this.addInCellEditor(),this.refreshEditStyles(!0,a),i.afterGuiAttached&&i.afterGuiAttached()}refreshEditStyles(t,i){var s;this.addOrRemoveCssClass("ag-cell-inline-editing",t&&!i),this.addOrRemoveCssClass("ag-cell-popup-editing",t&&!!i),this.addOrRemoveCssClass("ag-cell-not-inline-editing",!t||!!i),(s=this.rowCtrl)==null||s.setInlineEditingCss(t)}addInCellEditor(){const t=this.getGui();t.contains(this.beans.gos.getActiveDomElement())&&t.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(t,i){this.beans.gos.get("editType")==="fullRow"&&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.");const s=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new aT(t));const n=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&n.appendChild(this.cellEditorGui);const o=this.beans.popupService,r=this.beans.gos.get("stopEditingWhenCellsLoseFocus"),l=i??(s.getPopupPosition?s.getPopupPosition():"over"),a=this.beans.gos.get("enableRtl"),u={ePopup:n,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:l,alignSide:a?"right":"left",keepWithinBounds:!0},d=o.positionPopupByComponent.bind(o,u),h=this.beans.localeService.getLocaleTextFunc(),p=o.addPopup({modal:r,eChild:n,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:d,ariaLabel:h("ariaLabelCellEditor","Cell Editor")});p&&(this.hideEditorPopup=p.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),super.destroy()}clearParentOfValue(){const t=this.getGui();t.contains(this.beans.gos.getActiveDomElement())&&em()&&t.focus({preventScroll:!0}),je(this.getParentOfValue())}},lL=class extends Z{constructor(t,i,s){super(),this.cellComps={},this.beans=i,this.rowCtrl=t;const n=document.createElement("div");n.setAttribute("comp-id",`${this.getCompId()}`),n.setAttribute("style",this.getInitialStyle(s)),this.setTemplateFromElement(n);const o=this.getGui(),r=o.style;this.domOrder=this.rowCtrl.getDomOrder(),He(o,"row");const l=this.rowCtrl.getTabIndex();l!=null&&o.setAttribute("tabindex",l.toString());const a={setDomOrder:u=>this.domOrder=u,setCellCtrls:u=>this.setCellCtrls(u),showFullWidth:u=>this.showFullWidth(u),getFullWidthCellRenderer:()=>this.getFullWidthCellRenderer(),addOrRemoveCssClass:(u,d)=>this.addOrRemoveCssClass(u,d),setUserStyles:u=>dm(o,u),setTop:u=>r.top=u,setTransform:u=>r.transform=u,setRowIndex:u=>o.setAttribute("row-index",u),setRowId:u=>o.setAttribute("row-id",u),setRowBusinessKey:u=>o.setAttribute("row-business-key",u),refreshFullWidth:u=>this.refreshFullWidth(u)};t.setComp(a,this.getGui(),s),this.addDestroyFunc(()=>{t.unsetComp(s)})}getInitialStyle(t){const i=this.rowCtrl.getInitialTransform(t);return i?`transform: ${i}`:`top: ${this.rowCtrl.getInitialRowTop(t)}`}showFullWidth(t){const i=n=>{if(this.isAlive()){const o=n.getGui();this.getGui().appendChild(o),this.rowCtrl.setupDetailRowAutoHeight(o),this.setFullWidthRowComp(n)}else this.beans.context.destroyBean(n)},s=t.newAgStackInstance();s&&s.then(i)}setCellCtrls(t){const i=Object.assign({},this.cellComps);t.forEach(n=>{const o=n.getInstanceId();this.cellComps[o]==null?this.newCellComp(n):i[o]=null});const s=yn(i).filter(n=>n!=null);this.destroyCells(s),this.ensureDomOrder(t)}ensureDomOrder(t){if(!this.domOrder)return;const i=[];t.forEach(s=>{const n=this.cellComps[s.getInstanceId()];n&&i.push(n.getGui())}),um(this.getGui(),i)}newCellComp(t){const i=new rL(this.beans,t,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[t.getInstanceId()]=i,this.getGui().appendChild(i.getGui())}destroy(){super.destroy(),this.destroyAllCells()}destroyAllCells(){const t=yn(this.cellComps).filter(i=>i!=null);this.destroyCells(t)}setFullWidthRowComp(t){this.fullWidthCellRenderer&&console.error("AG Grid - should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=t,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}getFullWidthCellRenderer(){return this.fullWidthCellRenderer}destroyCells(t){t.forEach(i=>{if(!i)return;const s=i.getCtrl().getInstanceId();this.cellComps[s]===i&&(i.detach(),i.destroy(),this.cellComps[s]=null)})}refreshFullWidth(t){const{fullWidthCellRenderer:i}=this;if(!i||!i.refresh)return!1;const s=t();return i.refresh(s)}};function aL(){const e=Z.elementGettingCreated.getAttribute("name"),t=Ud.getRowContainerCssClasses(e);let i;return e==="center"||e==="topCenter"||e==="stickyTopCenter"||e==="bottomCenter"||e==="stickyBottomCenter"?i=`<div class="${t.viewport}" ref="eViewport" role="presentation">
|
|
184
|
+
<div class="${t.container}" ref="eContainer"></div>
|
|
185
|
+
</div>`:i=`<div class="${t.container}" ref="eContainer"></div>`,i}var jr=class extends Z{constructor(){super(aL()),this.rowComps={},this.name=Z.elementGettingCreated.getAttribute("name"),this.type=oT(this.name)}postConstruct(){const t={setViewportHeight:s=>this.eViewport.style.height=s,setRowCtrls:({rowCtrls:s})=>this.setRowCtrls(s),setDomOrder:s=>{this.domOrder=s},setContainerWidth:s=>this.eContainer.style.width=s};this.createManagedBean(new Ud(this.name)).setComp(t,this.eContainer,this.eViewport)}preDestroy(){this.setRowCtrls([])}setRowCtrls(t){const i=$({},this.rowComps);this.rowComps={},this.lastPlacedElement=null;const s=n=>{const o=n.getInstanceId(),r=i[o];if(r)this.rowComps[o]=r,delete i[o],this.ensureDomOrder(r.getGui());else{if(!n.getRowNode().displayed)return;const l=new lL(n,this.beans,this.type);this.rowComps[o]=l,this.appendRow(l.getGui())}};t.forEach(s),yn(i).forEach(n=>{this.eContainer.removeChild(n.getGui()),n.destroy()}),He(this.eContainer,"rowgroup")}appendRow(t){this.domOrder?QE(this.eContainer,t,this.lastPlacedElement):this.eContainer.appendChild(t),this.lastPlacedElement=t}ensureDomOrder(t){this.domOrder&&(am(this.eContainer,t,this.lastPlacedElement),this.lastPlacedElement=t)}};c([f("beans")],jr.prototype,"beans",2);c([N("eViewport")],jr.prototype,"eViewport",2);c([N("eContainer")],jr.prototype,"eContainer",2);c([M],jr.prototype,"postConstruct",1);c([Bt],jr.prototype,"preDestroy",1);var Lm=class{constructor(e){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;t&&t.forEach(i=>{i.isPrimary()&&(i.isAnyFunctionActive()||(i.isAllowValue()?this.columnsToAggregate.push(i):i.isAllowRowGroup()?this.columnsToGroup.push(i):i.isAllowPivot()&&this.columnsToPivot.push(i)))})}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?J.ICON_PINNED:J.ICON_MOVE:null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){this.columnsToAggregate.length>0&&this.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")}};c([f("columnModel")],Lm.prototype,"columnModel",2);c([f("gridOptionsService")],Lm.prototype,"gos",2);var ao=class{static attemptMoveColumns(e){const{isFromHeader:t,hDirection:i,xPosition:s,fromEnter:n,fakeEvent:o,pinned:r,gos:l,columnModel:a}=e,u=i===0,d=i===1;let{allMovingColumns:h}=e;if(t){let T=[];h.forEach(P=>{var A;let F=null,I=P.getParent();for(;I!=null&&I.getDisplayedLeafColumns().length===1;)F=I,I=I.getParent();F!=null?(!!((A=F.getColGroupDef())!=null&&A.marryChildren)?F.getProvidedColumnGroup().getLeafColumns():F.getLeafColumns()).forEach(U=>{T.includes(U)||T.push(U)}):T.includes(P)||T.push(P)}),h=T}const p=h.slice();a.sortColumnsLikeGridColumns(p);const C=this.calculateValidMoves({movingCols:p,draggingRight:d,xPosition:s,pinned:r,gos:l,columnModel:a}),v=this.calculateOldIndex(p,a);if(C.length===0)return;const y=C[0];let R=v!==null&&!n;if(t&&(R=v!==null),R&&!o&&(u&&y>=v||d&&y<=v))return;const w=a.getAllDisplayedColumns();let m=[],E=null;for(let T=0;T<C.length;T++){const P=C[T],A=a.getProposedColumnOrder(p,P);if(!a.doesOrderPassRules(A))continue;const F=A.filter(x=>w.includes(x));if(E===null)E=F;else if(!gs(F,E))break;const I=this.groupFragCount(A);m.push({move:P,fragCount:I})}if(m.length!==0)return m.sort((T,P)=>T.fragCount-P.fragCount),this.moveColumns(h,m[0].move,"uiColumnMoved",!1,a)}static moveColumns(e,t,i,s,n){return n.moveColumns(e,t,i,s),s?null:{columns:e,toIndex:t}}static calculateOldIndex(e,t){const i=t.getAllGridColumns(),s=aE(e.map(a=>i.indexOf(a))),n=s[0];return de(s)-n!==s.length-1?null:n}static groupFragCount(e){function t(s){let n=[],o=s.getOriginalParent();for(;o!=null;)n.push(o),o=o.getOriginalParent();return n}let i=0;for(let s=0;s<e.length-1;s++){let n=t(e[s]),o=t(e[s+1]);[n,o]=n.length>o.length?[n,o]:[o,n],n.forEach(r=>{o.indexOf(r)===-1&&i++})}return i}static getDisplayedColumns(e,t){switch(t){case"left":return e.getDisplayedLeftColumns();case"right":return e.getDisplayedRightColumns();default:return e.getDisplayedCenterColumns()}}static calculateValidMoves(e){const{movingCols:t,draggingRight:i,xPosition:s,pinned:n,gos:o,columnModel:r}=e;if(o.get("suppressMovableColumns")||t.some(m=>m.getColDef().suppressMovable))return[];const a=this.getDisplayedColumns(r,n),u=r.getAllGridColumns(),d=a.filter(m=>vi(t,m)),h=a.filter(m=>!vi(t,m)),p=u.filter(m=>!vi(t,m));let C=0,v=s;if(i){let m=0;d.forEach(E=>m+=E.getActualWidth()),v-=m}if(v>0){for(let m=0;m<h.length;m++){const E=h[m];if(v-=E.getActualWidth(),v<0)break;C++}i&&C++}let y;if(C>0){const m=h[C-1];y=p.indexOf(m)+1}else y=p.indexOf(h[0]),y===-1&&(y=0);const R=[y],w=(m,E)=>m-E;if(i){let m=y+1;const E=u.length-1;for(;m<=E;)R.push(m),m++;R.sort(w)}else{let m=y;const E=u.length-1;let T=u[m];for(;m<=E&&a.indexOf(T)<0;)m++,R.push(m),T=u[m];m=y-1;const P=0;for(;m>=P;)R.push(m),m--;R.sort(w).reverse()}return R}static normaliseX(e,t,i,s,n){const o=n.getHeaderRowContainerCtrl(t).getViewport();return i&&(e-=o.getBoundingClientRect().left),s.get("enableRtl")&&(e=o.clientWidth-e),t==null&&(e+=n.get("center").getCenterViewportScrollLeft()),e}},Yr=class{constructor(e){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=e,this.isCenterContainer=!b(e)}init(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){return this.pinned?J.ICON_PINNED:J.ICON_MOVE}onDragEnter(e){const t=e.dragItem.columns;if(e.dragSource.type===0)this.setColumnsVisible(t,!0,"uiColumnDragged");else{const s=e.dragItem.visibleState,n=(t||[]).filter(o=>s[o.getId()]);this.setColumnsVisible(n,!0,"uiColumnDragged")}this.setColumnsPinned(t,this.pinned,"uiColumnDragged"),this.onDragging(e,!0,!0)}onDragLeave(){this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,i){if(e){const s=e.filter(n=>!n.getColDef().lockVisible);this.columnModel.setColumnsVisible(s,t,i)}}setColumnsPinned(e,t,i){if(e){const s=e.filter(n=>!n.getColDef().lockPinned);this.columnModel.setColumnsPinned(s,t,i)}}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}checkCenterForScrolling(e){if(this.isCenterContainer){const t=this.ctrlsService.get("center"),i=t.getCenterViewportScrollLeft(),s=i+t.getCenterWidth();this.gos.get("enableRtl")?(this.needToMoveRight=e<i+50,this.needToMoveLeft=e>s-50):(this.needToMoveLeft=e<i+50,this.needToMoveRight=e>s-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}}onDragging(e=this.lastDraggingEvent,t=!1,i=!1,s=!1){var n;if(s){if(this.lastMovedInfo){const{columns:d,toIndex:h}=this.lastMovedInfo;ao.moveColumns(d,h,"uiColumnMoved",!0,this.columnModel)}return}if(this.lastDraggingEvent=e,q(e.hDirection))return;const o=ao.normaliseX(e.x,this.pinned,!1,this.gos,this.ctrlsService);t||this.checkCenterForScrolling(o);const r=this.normaliseDirection(e.hDirection),l=e.dragSource.type,a=((n=e.dragSource.getDragItem().columns)==null?void 0:n.filter(d=>d.getColDef().lockPinned?d.getPinned()==this.pinned:!0))||[],u=ao.attemptMoveColumns({allMovingColumns:a,isFromHeader:l===1,hDirection:r,xPosition:o,pinned:this.pinned,fromEnter:t,fakeEvent:i,gos:this.gos,columnModel:this.columnModel});u&&(this.lastMovedInfo=u)}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case 0:return 1;case 1:return 0;default:console.error(`AG Grid: Unknown direction ${e}`)}else return e}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.needToMoveLeft?this.dragAndDropService.setGhostIcon(J.ICON_LEFT,!0):this.dragAndDropService.setGhostIcon(J.ICON_RIGHT,!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(J.ICON_MOVE))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*5,e>100&&(e=100);let t=null;const i=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?t=i.scrollHorizontally(-e):this.needToMoveRight&&(t=i.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const n=this.lastDraggingEvent.dragItem.columns.filter(o=>!o.getColDef().lockPinned);if(n.length>0&&(this.dragAndDropService.setGhostIcon(J.ICON_PINNED),this.failedMoveAttempts>7)){const o=this.needToMoveLeft?"left":"right";this.setColumnsPinned(n,o,"uiColumnDragged"),this.dragAndDropService.nudge()}}}};c([f("columnModel")],Yr.prototype,"columnModel",2);c([f("dragAndDropService")],Yr.prototype,"dragAndDropService",2);c([f("gridOptionsService")],Yr.prototype,"gos",2);c([f("ctrlsService")],Yr.prototype,"ctrlsService",2);c([M],Yr.prototype,"init",1);var Qr=class extends L{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){this.ctrlsService.whenReady(e=>{switch(this.pinned){case"left":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.left.getContainerElement()],[e.bottomLeft.getContainerElement()],[e.topLeft.getContainerElement()]];break;case"right":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.right.getContainerElement()],[e.bottomRight.getContainerElement()],[e.topRight.getContainerElement()]];break;default:this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.center.getViewportElement()],[e.bottomCenter.getViewportElement()],[e.topCenter.getViewportElement()]];break}})}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}init(){this.moveColumnFeature=this.createManagedBean(new Yr(this.pinned)),this.bodyDropPivotTarget=this.createManagedBean(new Lm(this.pinned)),this.dragAndDropService.addDropTarget(this)}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.columnModel.isPivotMode()&&e.dragSource.type===0}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}};c([f("dragAndDropService")],Qr.prototype,"dragAndDropService",2);c([f("columnModel")],Qr.prototype,"columnModel",2);c([f("ctrlsService")],Qr.prototype,"ctrlsService",2);c([M],Qr.prototype,"postConstruct",1);c([M],Qr.prototype,"init",1);var qr=class uT extends Pm{constructor(t){super(uT.TEMPLATE,t),this.headerCompVersion=0,this.column=t.getColumnGroupChild(),this.pinned=t.getPinned()}postConstruct(){const t=this.getGui();((o,r)=>{r!=null&&r!=""?t.setAttribute(o,r):t.removeAttribute(o)})("col-id",this.column.getColId());const s={setWidth:o=>t.style.width=o,addOrRemoveCssClass:(o,r)=>this.addOrRemoveCssClass(o,r),setAriaSort:o=>o?_E(t,o):OE(t),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(s,this.getGui(),this.eResize,this.eHeaderCompWrapper);const n=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",n)}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(t){this.headerCompVersion++;const i=this.headerCompVersion;t.newAgStackInstance().then(s=>this.afterCompCreated(i,s))}afterCompCreated(t,i){if(t!=this.headerCompVersion||!this.isAlive()){this.destroyBean(i);return}this.destroyHeaderComp(),this.headerComp=i,this.headerCompGui=i.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}};qr.TEMPLATE=`<div class="ag-header-cell" role="columnheader">
|
|
186
|
+
<div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
|
|
187
|
+
<div ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>
|
|
188
|
+
</div>`;c([N("eResize")],qr.prototype,"eResize",2);c([N("eHeaderCompWrapper")],qr.prototype,"eHeaderCompWrapper",2);c([M],qr.prototype,"postConstruct",1);c([Bt],qr.prototype,"destroyHeaderComp",1);var uL=qr,qc=class dT extends Pm{constructor(t){super(dT.TEMPLATE,t)}postConstruct(){const t=this.getGui(),i=(n,o)=>o!=null?t.setAttribute(n,o):t.removeAttribute(n);t.setAttribute("col-id",this.ctrl.getColId());const s={addOrRemoveCssClass:(n,o)=>this.addOrRemoveCssClass(n,o),setResizableDisplayed:n=>le(this.eResize,n),setWidth:n=>t.style.width=n,setAriaExpanded:n=>i("aria-expanded",n),setUserCompDetails:n=>this.setUserCompDetails(n),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(s,t,this.eResize)}setUserCompDetails(t){t.newAgStackInstance().then(i=>this.afterHeaderCompCreated(i))}afterHeaderCompCreated(t){const i=()=>this.destroyBean(t);if(!this.isAlive()){i();return}const s=this.getGui(),n=t.getGui();s.appendChild(n),this.addDestroyFunc(i),this.headerGroupComp=t,this.ctrl.setDragSource(s)}};qc.TEMPLATE=`<div class="ag-header-group-cell" role="columnheader">
|
|
189
|
+
<div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
|
|
190
|
+
</div>`;c([N("eResize")],qc.prototype,"eResize",2);c([M],qc.prototype,"postConstruct",1);var dL=qc,Sg=(e=>(e.COLUMN_GROUP="group",e.COLUMN="column",e.FLOATING_FILTER="filter",e))(Sg||{}),Mm=class extends Z{constructor(t){super(),this.headerComps={},this.ctrl=t,this.setTemplate(`<div class="${this.ctrl.getHeaderRowClass()}" role="row"></div>`)}init(){Yf(this.getGui(),this.ctrl.getAriaRowIndex());const t={setHeight:i=>this.getGui().style.height=i,setTop:i=>this.getGui().style.top=i,setHeaderCtrls:(i,s)=>this.setHeaderCtrls(i,s),setWidth:i=>this.getGui().style.width=i};this.ctrl.setComp(t)}destroyHeaderCtrls(){this.setHeaderCtrls([],!1)}setHeaderCtrls(t,i){if(!this.isAlive())return;const s=this.headerComps;if(this.headerComps={},t.forEach(n=>{const o=n.getInstanceId();let r=s[o];delete s[o],r==null&&(r=this.createHeaderComp(n),this.getGui().appendChild(r.getGui())),this.headerComps[o]=r}),Ft(s,(n,o)=>{this.getGui().removeChild(o.getGui()),this.destroyBean(o)}),i){const n=yn(this.headerComps);n.sort((r,l)=>{const a=r.getCtrl().getColumnGroupChild().getLeft(),u=l.getCtrl().getColumnGroupChild().getLeft();return a-u});const o=n.map(r=>r.getGui());um(this.getGui(),o)}}createHeaderComp(t){let i;switch(this.ctrl.getType()){case"group":i=new dL(t);break;case"filter":i=new Ab(t);break;default:i=new uL(t);break}return this.createBean(i),i.setParentComponent(this),i}};c([M],Mm.prototype,"init",1);c([Bt],Mm.prototype,"destroyHeaderCtrls",1);var cL=0,js=class cT extends L{constructor(t,i,s){super(),this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.columnGroupChild=t,this.parentRowCtrl=s,this.beans=i,this.instanceId=t.getUniqueId()+"-"+cL++}postConstruct(){this.addManagedPropertyListeners(["suppressHeaderFocus"],()=>this.refreshTabIndex())}shouldStopEventPropagation(t){const{headerRowIndex:i,column:s}=this.focusService.getFocusedHeader();return oR(this.gos,t,i,s)}getWrapperHasFocus(){return this.gos.getActiveDomElement()===this.eGui}setGui(t){this.eGui=t,this.addDomData(),this.addManagedListener(this.beans.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}onDisplayedColumnsChanged(){!this.comp||!this.column||(this.refreshFirstAndLastStyles(),this.refreshAriaColIndex())}refreshFirstAndLastStyles(){const{comp:t,column:i,beans:s}=this;jc.refreshFirstAndLastStyles(t,i,s.columnModel)}refreshAriaColIndex(){const{beans:t,column:i}=this,s=t.columnModel.getAriaColumnIndex(i);Qf(this.eGui,s)}addResizeAndMoveKeyboardListeners(){this.resizeFeature&&(this.addManagedListener(this.eGui,"keydown",this.onGuiKeyDown.bind(this)),this.addManagedListener(this.eGui,"keyup",this.onGuiKeyUp.bind(this)))}refreshTabIndex(){this.gos.get("suppressHeaderFocus")?this.eGui.removeAttribute("tabindex"):this.eGui.setAttribute("tabindex","-1")}onGuiKeyDown(t){var i;const s=this.gos.getActiveDomElement(),n=t.key===D.LEFT||t.key===D.RIGHT;if(this.isResizing&&(t.preventDefault(),t.stopImmediatePropagation()),s!==this.eGui||!t.shiftKey&&!t.altKey||((this.isResizing||n)&&(t.preventDefault(),t.stopImmediatePropagation()),!n))return;const o=t.key===D.LEFT!==this.gos.get("enableRtl"),r=OR[o?"Left":"Right"];if(t.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const l=this.getViewportAdjustedResizeDiff(t);this.resizeHeader(l,t.shiftKey),(i=this.resizeFeature)==null||i.toggleColumnResizing(!0)}else this.moveHeader(r)}getViewportAdjustedResizeDiff(t){let i=this.getResizeDiff(t);if(this.column.getPinned()){const n=this.pinnedWidthService.getPinnedLeftWidth(),o=this.pinnedWidthService.getPinnedRightWidth(),r=bo(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(n+o+i>r)if(r>n+o)i=r-n-o;else return 0}return i}getResizeDiff(t){let i=t.key===D.LEFT!==this.gos.get("enableRtl");const s=this.column.getPinned(),n=this.gos.get("enableRtl");return s&&n!==(s==="right")&&(i=!i),(i?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=setTimeout(()=>{var t;(t=this.resizeFeature)==null||t.toggleColumnResizing(!1)},150))}handleKeyDown(t){const i=this.getWrapperHasFocus();switch(t.key){case D.PAGE_DOWN:case D.PAGE_UP:case D.PAGE_HOME:case D.PAGE_END:i&&t.preventDefault()}}addDomData(){const t=cT.DOM_DATA_KEY_HEADER_CTRL;this.gos.setDomData(this.eGui,t,this),this.addDestroyFunc(()=>this.gos.setDomData(this.eGui,t,null))}getGui(){return this.eGui}focus(t){return this.eGui?(this.lastFocusEvent=t||null,this.eGui.focus(),!0):!1}getRowIndex(){return this.parentRowCtrl.getRowIndex()}getParentRowCtrl(){return this.parentRowCtrl}getPinned(){return this.parentRowCtrl.getPinned()}getInstanceId(){return this.instanceId}getColumnGroupChild(){return this.columnGroupChild}removeDragSource(){this.dragSource&&(this.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(t,i,s){const n=t??i;this.gos.get("preventDefaultOnContextMenu")&&n.preventDefault();const o=s instanceof Ee?s:void 0;this.menuService.isHeaderContextMenuEnabled(o)&&this.menuService.showHeaderContextMenu(o,t,i),this.dispatchColumnMouseEvent(g.EVENT_COLUMN_HEADER_CONTEXT_MENU,s)}dispatchColumnMouseEvent(t,i){const s={type:t,column:i};this.eventService.dispatchEvent(s)}destroy(){super.destroy(),this.removeDragSource(),this.comp=null,this.column=null,this.resizeFeature=null,this.lastFocusEvent=null,this.columnGroupChild=null,this.parentRowCtrl=null,this.eGui=null}};js.DOM_DATA_KEY_HEADER_CTRL="headerCtrl";c([f("pinnedWidthService")],js.prototype,"pinnedWidthService",2);c([f("focusService")],js.prototype,"focusService",2);c([f("userComponentFactory")],js.prototype,"userComponentFactory",2);c([f("ctrlsService")],js.prototype,"ctrlsService",2);c([f("dragAndDropService")],js.prototype,"dragAndDropService",2);c([f("menuService")],js.prototype,"menuService",2);c([M],js.prototype,"postConstruct",1);var Xc=js,Zc=class extends L{constructor(e,t,i,s){super(),this.columnOrGroup=e,this.eCell=t,this.ariaEl=this.eCell.querySelector("[role=columnheader]")||this.eCell,this.colsSpanning=s,this.beans=i}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){return this.beans.gos.get("enableRtl")&&this.colsSpanning?de(this.colsSpanning):this.columnOrGroup}postConstruct(){this.addManagedListener(this.columnOrGroup,Ee.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime(),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onLeftChanged.bind(this))}setLeftFirstTime(){const e=this.beans.gos.get("suppressColumnMoveAnimation"),t=b(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&t&&!e?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=e.getLeft(),i=e.getOldLeft(),s=this.modifyLeftForPrintLayout(e,i),n=this.modifyLeftForPrintLayout(e,t);this.setLeft(s),this.actualLeft=n,this.beans.columnAnimationService.executeNextVMTurn(()=>{this.actualLeft===n&&this.setLeft(n)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){if(!this.beans.gos.isDomLayout("print")||e.getPinned()==="left")return t;const s=this.beans.columnModel.getDisplayedColumnsLeftWidth();if(e.getPinned()==="right"){const n=this.beans.columnModel.getBodyContainerWidth();return s+n+t}return s+t}setLeft(e){if(b(e)&&(this.eCell.style.left=`${e}px`),this.columnOrGroup instanceof Ee)this.columnOrGroup;else{const i=this.columnOrGroup.getLeafColumns();if(!i.length)return;i.length>1&&NE(this.ariaEl,i.length),i[0]}}};c([M],Zc.prototype,"postConstruct",1);var Za=class extends L{constructor(e,t){super(),this.columns=e,this.element=t}postConstruct(){this.gos.get("columnHoverHighlight")&&this.addMouseHoverListeners()}addMouseHoverListeners(){this.addManagedListener(this.element,"mouseout",this.onMouseOut.bind(this)),this.addManagedListener(this.element,"mouseover",this.onMouseOver.bind(this))}onMouseOut(){this.columnHoverService.clearMouseOver()}onMouseOver(){this.columnHoverService.setMouseOver(this.columns)}};c([f("columnHoverService")],Za.prototype,"columnHoverService",2);c([M],Za.prototype,"postConstruct",1);var hL=class extends Xc{constructor(e,t,i){super(e,t,i),this.iconCreated=!1,this.column=e}setComp(e,t,i,s){this.comp=e,this.eButtonShowMainFilter=i,this.eFloatingFilterBody=s,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,Ee.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))}resizeHeader(){}moveHeader(){}setupActive(){const e=this.column.getColDef(),t=!!e.filter,i=!!e.floatingFilter;this.active=t&&i}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=Oe("filter",this.gos,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(){this.createManagedBean(new Ln(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.localeService.getLocaleTextFunc();yi(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){if(this.gos.getActiveDomElement()===this.eGui)return;const s=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(s){this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),s.focus();return}const n=this.findNextColumnWithFloatingFilter(e.shiftKey);n&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:n},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.columnModel;let i=this.column;do if(i=e?t.getDisplayedColBefore(i):t.getDisplayedColAfter(i),!i)break;while(!i.getColDef().filter||!i.getColDef().floatingFilter);return i}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case D.UP:case D.DOWN:t||e.preventDefault();case D.LEFT:case D.RIGHT:if(t)return;e.stopPropagation();case D.ENTER:t&&this.focusService.focusInto(this.eGui)&&e.preventDefault();break;case D.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const i=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),s=!!e.relatedTarget&&no(e.relatedTarget,"ag-floating-filter");if(i&&s&&e.target===this.eGui){const o=this.lastFocusEvent,r=!!(o&&o.key===D.TAB);if(o&&r){const l=o.shiftKey;this.focusService.focusInto(this.eGui,l)}}const n=this.getRowIndex();this.beans.focusService.setFocusedHeader(n,this.column)}setupHover(){this.createManagedBean(new Za([this.column],this.eGui));const e=()=>{if(!this.gos.get("columnHoverHighlight"))return;const t=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",t)};this.addManagedListener(this.eventService,g.EVENT_COLUMN_HOVER_CHANGED,e),e()}setupLeft(){const e=new Zc(this.column,this.eGui,this.beans);this.createManagedBean(e)}setupFilterButton(){this.suppressFilterButton=!this.menuService.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!this.menuService.isLegacyMenuEnabled()}setupUserComp(){if(!this.active)return;const e=this.beans.filterManager.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuService.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(){if(!this.active)return;const{filterManager:e}=this.beans,t=i=>{if((i==null?void 0:i.source)==="filterDestroyed"&&this.context.isDestroyed())return;const s=this.comp.getFloatingFilterComp();s&&s.then(n=>{var o;if(n){const r=e.getCurrentFloatingFilterParentModel(this.column);n.onParentModelChanged(r,i?this.gos.addGridCommonParams({columns:(o=i.columns)!=null?o:[],type:g.EVENT_FILTER_CHANGED,source:i.source==="api"?"api":"columnFilter"}):null)}})};this.destroySyncListener=this.addManagedListener(this.column,Ee.EVENT_FILTER_CHANGED,t),e.isFilterActive(this.column)&&t(null)}setupWidth(){const e=()=>{const t=`${this.column.getActualWidth()}px`;this.comp.setWidth(t)};this.addManagedListener(this.column,Ee.EVENT_WIDTH_CHANGED,e),e()}setupFilterChangedListener(){this.active&&(this.destroyFilterChangedListener=this.addManagedListener(this.column,Ee.EVENT_FILTER_CHANGED,this.updateFilterButton.bind(this)),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=this.beans.filterManager.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(){var e,t;const i=this.active;this.setupActive();const s=!i&&this.active;i&&!this.active&&((e=this.destroySyncListener)==null||e.call(this),(t=this.destroyFilterChangedListener)==null||t.call(this));const n=this.active?this.beans.filterManager.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,o=this.comp.getFloatingFilterComp();!o||!n?this.updateCompDetails(n,s):o.then(r=>{var l;!r||this.beans.filterManager.areFilterCompsDifferent((l=this.userCompDetails)!=null?l:null,n)?this.updateCompDetails(n,s):this.updateFloatingFilterParams(n)})}updateCompDetails(e,t){this.isAlive()&&(this.setCompDetails(e),this.setupFilterButton(),this.setupUi(),t&&(this.setupSyncWithFilter(),this.setupFilterChangedListener()))}updateFloatingFilterParams(e){var t;if(!e)return;const i=e.params;(t=this.comp.getFloatingFilterComp())==null||t.then(s=>{let n=!1;s!=null&&s.refresh&&typeof s.refresh=="function"&&s.refresh(i)!==null&&(n=!0),!n&&(s!=null&&s.onParamsUpdated)&&typeof s.onParamsUpdated=="function"&&s.onParamsUpdated(i)!==null&&K("Custom floating filter method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")})}destroy(){super.destroy(),this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.destroySyncListener=null,this.destroyFilterChangedListener=null}},Xr=class extends L{constructor(e,t,i,s,n){super(),this.pinned=e,this.column=t,this.eResize=i,this.comp=s,this.ctrl=n}postConstruct(){const e=[];let t,i;const s=()=>{if(le(this.eResize,t),!t)return;const r=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(e.push(r),i){const l=this.gos.get("skipHeaderOnAutoSize"),a=()=>{this.columnModel.autoSizeColumn(this.column,"uiColumnResized",l)};this.eResize.addEventListener("dblclick",a);const u=new pt(this.eResize);u.addEventListener(pt.EVENT_DOUBLE_TAP,a),e.push(()=>{this.eResize.removeEventListener("dblclick",a),u.removeEventListener(pt.EVENT_DOUBLE_TAP,a),u.destroy()})}},n=()=>{e.forEach(r=>r()),e.length=0},o=()=>{const r=this.column.isResizable(),l=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||l!==i)&&(t=r,i=l,n(),s())};o(),this.addDestroyFunc(n),this.ctrl.addRefreshFunction(o)}onResizing(e,t){const{column:i,lastResizeAmount:s,resizeStartWidth:n}=this,o=this.normaliseResizeAmount(t),r=n+o,l=[{key:i,newWidth:r}];if(this.column.getPinned()){const a=this.pinnedWidthService.getPinnedLeftWidth(),u=this.pinnedWidthService.getPinnedRightWidth(),d=bo(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(a+u+(o-s)>d)return}this.lastResizeAmount=o,this.columnModel.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const i=this.pinned!=="left",s=this.pinned==="right";return this.gos.get("enableRtl")?i&&(t*=-1):s&&(t*=-1),t}};c([f("horizontalResizeService")],Xr.prototype,"horizontalResizeService",2);c([f("pinnedWidthService")],Xr.prototype,"pinnedWidthService",2);c([f("ctrlsService")],Xr.prototype,"ctrlsService",2);c([f("columnModel")],Xr.prototype,"columnModel",2);c([M],Xr.prototype,"postConstruct",1);var Im=class extends L{constructor(e){super(),this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1,this.column=e}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(this.gos.getActiveDomElement())&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new Hc),this.cbSelectAll.addCssClass("ag-header-select-all"),He(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addManagedListener(this.cbSelectAll,g.EVENT_FIELD_VALUE_CHANGED,this.onCbSelectAll.bind(this)),Wa(this.cbSelectAll.getGui(),!0),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onNewColumnsLoaded(){this.showOrHideSelectAll()}onDisplayedColumnsChanged(){this.isAlive()&&this.showOrHideSelectAll()}showOrHideSelectAll(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible,{skipAriaHidden:!0}),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.selectionService.getSelectAllState(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setValue(e);const t=this.selectionService.hasNodesToSelect(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setDisabled(!t),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(){const e=this.localeService.getLocaleTextFunc(),i=this.cbSelectAll.getValue()?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),s=e("ariaRowSelectAll","Press Space to toggle all rows selection");this.cbSelectAllVisible?this.headerCellCtrl.setAriaDescriptionProperty("selectAll",`${s} (${i})`):this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel(`${s} (${i})`),this.headerCellCtrl.announceAriaDescription()}checkSelectionType(e){return this.gos.get("rowSelection")==="multiple"?!0:(console.warn(`AG Grid: ${e} is only available if using 'multiple' rowSelection.`),!1)}checkRightRowModelType(e){const t=this.rowModel.getType();return t==="clientSide"||t==="serverSide"?!0:(console.warn(`AG Grid: ${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.isFilteredOnly(),i=this.isCurrentPageOnly();let s="uiSelectAll";i?s="uiSelectAllCurrentPage":t&&(s="uiSelectAllFiltered");const n={source:s,justFiltered:t,justCurrentPage:i};e?this.selectionService.selectAllRowNodes(n):this.selectionService.deselectAllRowNodes(n)}isCheckboxSelection(){let e=this.column.getColDef().headerCheckboxSelection;if(typeof e=="function"){const t=e,i=this.gos.addGridCommonParams({column:this.column,colDef:this.column.getColDef()});e=t(i)}return e?this.checkRightRowModelType("headerCheckboxSelection")&&this.checkSelectionType("headerCheckboxSelection"):!1}isFilteredOnly(){return!!this.column.getColDef().headerCheckboxSelectionFilteredOnly}isCurrentPageOnly(){return!!this.column.getColDef().headerCheckboxSelectionCurrentPageOnly}};c([f("rowModel")],Im.prototype,"rowModel",2);c([f("selectionService")],Im.prototype,"selectionService",2);var pL=class extends Xc{constructor(e,t,i){super(e,t,i),this.refreshFunctions=[],this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map,this.column=e}setComp(e,t,i,s){this.comp=e,this.setGui(t),this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight(s),this.addColumnHoverListener(),this.setupFilterClass(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.refreshAria(),this.resizeFeature=this.createManagedBean(new Xr(this.getPinned(),this.column,i,e,this)),this.createManagedBean(new Za([this.column],t)),this.createManagedBean(new Zc(this.column,t,this.beans)),this.createManagedBean(new Ln(t,{shouldStopEventPropagation:n=>this.shouldStopEventPropagation(n),onTabKeyDown:()=>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,Ee.EVENT_COL_DEF_CHANGED,this.refresh.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_CHANGED,this.onColumnPivotChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))}resizeHeader(e,t){var i,s;if(!this.column.isResizable())return;const n=this.column.getActualWidth(),o=(i=this.column.getMinWidth())!=null?i:0,r=(s=this.column.getMaxWidth())!=null?s:Number.MAX_SAFE_INTEGER,l=Math.min(Math.max(n+e,o),r);this.beans.columnModel.setColumnWidths([{key:this.column,newWidth:l}],t,!0,"uiColumnResized")}moveHeader(e){const{eGui:t,column:i,gos:s,ctrlsService:n}=this,o=this.getPinned(),r=t.getBoundingClientRect().left,l=i.getActualWidth(),a=s.get("enableRtl"),u=e===0!==a,d=ao.normaliseX(u?r-20:r+l+20,o,!0,s,n);ao.attemptMoveColumns({allMovingColumns:[i],isFromHeader:!0,hDirection:e,xPosition:d,pinned:o,fromEnter:!1,fakeEvent:!1,gos:s,columnModel:this.beans.columnModel}),n.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(i,"auto")}setupUserComp(){const e=this.lookupUserCompDetails();this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(t,e)}createParams(){return this.gos.addGridCommonParams({column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&this.menuService.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!this.openFilterEnabled||this.menuService.isLegacyMenuEnabled(),showColumnMenu:t=>{this.menuService.showColumnMenu({column:this.column,buttonElement:t,positionBy:"button"})},showColumnMenuAfterMouseClick:t=>{this.menuService.showColumnMenu({column:this.column,mouseEvent:t,positionBy:"mouse"})},showFilter:t=>{this.menuService.showFilterMenu({column:this.column,buttonElement:t,containerType:"columnFilter",positionBy:"button"})},progressSort:t=>{this.beans.sortController.progressSort(this.column,!!t,"uiColumnSorted")},setSort:(t,i)=>{this.beans.sortController.setSortForColumn(this.column,t,!!i,"uiColumnSorted")},eGridHeader:this.getGui(),setTooltip:(t,i)=>{this.setupTooltip(t,i)}})}setupSelectAll(){this.selectAllFeature=this.createManagedBean(new Im(this.column)),this.selectAllFeature.setComp(this)}getSelectAllGui(){return this.selectAllFeature.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===D.SPACE&&this.selectAllFeature.onSpaceKeyDown(e),e.key===D.ENTER&&this.onEnterKeyDown(e),e.key===D.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){if(e.ctrlKey||e.metaKey)this.showMenuOnKeyPress(e,!0);else if(this.sortable){const t=e.shiftKey;this.beans.sortController.progressSort(this.column,t,"uiColumnSorted")}}showMenuOnKeyPress(e,t){const i=this.comp.getUserCompInstance();!i||!(i instanceof Cg)||i.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){if(!this.getGui().contains(e.relatedTarget)){const t=this.getRowIndex();this.focusService.setFocusedHeader(t,this.column),this.announceAriaDescription()}this.focusService.isKeyboardMode()&&this.setActiveHeader(!0)}onFocusOut(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const i=this.gos.get("tooltipShowMode")==="whenTruncated",s=this.eGui,n=this.column.getColDef();!t&&i&&!n.headerComponent&&(t=()=>{const l=s.querySelector(".ag-header-cell-text");return l?l.scrollWidth>l.clientWidth:!0});const o={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getGui:()=>s,getLocation:()=>"header",getTooltipValue:()=>e??this.column.getColDef().headerTooltip,shouldDisplayTooltip:t},r=this.createManagedBean(new zs(o));this.refreshFunctions.push(()=>r.refreshToolTip())}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),i=jc.getHeaderClassesFromColDef(t,this.gos,this.column,null),s=this.userHeaderClasses;this.userHeaderClasses=new Set(i),i.forEach(n=>{s.has(n)?s.delete(n):this.comp.addOrRemoveCssClass(n,!0)}),s.forEach(n=>this.comp.addOrRemoveCssClass(n,!1))};this.refreshFunctions.push(e),e()}setDragSource(e){if(this.dragSourceElement=e,this.removeDragSource(),!e||!this.draggable)return;const{column:t,beans:i,displayName:s,dragAndDropService:n,gos:o}=this,{columnModel:r}=i;let l=!this.gos.get("suppressDragLeaveHidesColumns");const a=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>l?J.ICON_HIDE:J.ICON_NOT_ALLOWED,getDragItem:()=>this.createDragItem(t),dragItemName:s,onDragStarted:()=>{l=!o.get("suppressDragLeaveHidesColumns"),t.setMoving(!0,"uiColumnMoved")},onDragStopped:()=>t.setMoving(!1,"uiColumnMoved"),onGridEnter:u=>{var d;if(l){const h=((d=u==null?void 0:u.columns)==null?void 0:d.filter(p=>!p.getColDef().lockVisible))||[];r.setColumnsVisible(h,!0,"uiColumnMoved")}},onGridExit:u=>{var d;if(l){const h=((d=u==null?void 0:u.columns)==null?void 0:d.filter(p=>!p.getColDef().lockVisible))||[];r.setColumnsVisible(h,!1,"uiColumnMoved")}}};n.addDragSource(a,!0)}createDragItem(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}updateState(){this.menuEnabled=this.menuService.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=this.menuService.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}addRefreshFunction(e){this.refreshFunctions.push(e)}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),this.refreshFunctions.forEach(e=>e())}refreshHeaderComp(){const e=this.lookupUserCompDetails();(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.columnModel.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}onColumnRowGroupChanged(){this.checkDisplayName()}onColumnPivotChanged(){this.checkDisplayName()}onColumnValueChanged(){this.checkDisplayName()}setupWidth(){const e=()=>{const t=this.column.getActualWidth();this.comp.setWidth(`${t}px`)};this.addManagedListener(this.column,Ee.EVENT_WIDTH_CHANGED,e),e()}setupMovingCss(){const e=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};this.addManagedListener(this.column,Ee.EVENT_MOVING_CHANGED,e),e()}setupMenuClass(){const e=()=>{this.comp.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};this.addManagedListener(this.column,Ee.EVENT_MENU_VISIBLE_CHANGED,e),e()}setupSortableClass(){const e=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};e(),this.addRefreshFunction(e),this.addManagedListener(this.eventService,Ee.EVENT_SORT_CHANGED,this.refreshAriaSort.bind(this))}setupFilterClass(){const e=()=>{const t=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",t),this.refreshAria()};this.addManagedListener(this.column,Ee.EVENT_FILTER_ACTIVE_CHANGED,e),e()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",t)};e(),this.addRefreshFunction(e)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:i,beans:s}=this;if(!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),i.addOrRemoveCssClass("ag-header-span-height",!1),i.addOrRemoveCssClass("ag-header-span-total",!1);return}const{numberOfParents:n,isSpanningTotal:o}=this.column.getColumnGroupPaddingInfo();i.addOrRemoveCssClass("ag-header-span-height",n>0);const{columnModel:r}=s,l=r.getColumnHeaderRowHeight();if(n===0){i.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}i.addOrRemoveCssClass("ag-header-span-total",o);const u=r.isPivotMode()?r.getPivotGroupHeaderHeight():r.getGroupHeaderHeight(),d=n*u;e.style.setProperty("top",`${-d}px`),e.style.setProperty("height",`${l+d}px`)}setupAutoHeight(e){const{columnModel:t,resizeObserverService:i}=this.beans,s=u=>{if(!this.isAlive())return;const{paddingTop:d,paddingBottom:h,borderBottomWidth:p,borderTopWidth:C}=bn(this.getGui()),v=d+h+p+C,R=e.offsetHeight+v;if(u<5){const w=this.beans.gos.getDocument(),m=!w||!w.contains(e),E=R==0;if(m||E){window.setTimeout(()=>s(u+1),0);return}}t.setColumnHeaderHeight(this.column,R)};let n=!1,o;const r=()=>{const u=this.column.isAutoHeaderHeight();u&&!n&&l(),!u&&n&&a()},l=()=>{n=!0,s(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),o=i.observeResize(e,()=>s(0))},a=()=>{n=!1,o&&o(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),o=void 0};r(),this.addDestroyFunc(()=>a()),this.addManagedListener(this.column,Ee.EVENT_WIDTH_CHANGED,()=>n&&s(0)),this.addManagedListener(this.eventService,Ee.EVENT_SORT_CHANGED,()=>{n&&window.setTimeout(()=>s(0))}),this.addRefreshFunction(r)}refreshAriaSort(){if(this.sortable){const e=this.localeService.getLocaleTextFunc(),t=this.beans.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(TE(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){const e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!this.menuService.isLegacyMenuEnabled()){const e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const e=this.localeService.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){t!=null?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains(this.beans.gos.getActiveDomElement()))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((t,i)=>t==="filter"?-1:i.charCodeAt(0)-t.charCodeAt(0)).map(t=>this.ariaDescriptionProperties.get(t)).join(". ");this.beans.ariaAnnouncementService.announceValue(e)}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(){const e=()=>{if(!this.gos.get("columnHoverHighlight"))return;const t=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",t)};this.addManagedListener(this.eventService,g.EVENT_COLUMN_HOVER_CHANGED,e),e()}getColId(){return this.column.getColId()}addActiveHeaderMouseListeners(){const e=s=>this.handleMouseOverChange(s.type==="mouseenter"),t=()=>this.dispatchColumnMouseEvent(g.EVENT_COLUMN_HEADER_CLICKED,this.column),i=s=>this.handleContextMenuMouseEvent(s,void 0,this.column);this.addManagedListener(this.getGui(),"mouseenter",e),this.addManagedListener(this.getGui(),"mouseleave",e),this.addManagedListener(this.getGui(),"click",t),this.addManagedListener(this.getGui(),"contextmenu",i)}handleMouseOverChange(e){this.setActiveHeader(e);const i={type:e?g.EVENT_COLUMN_HEADER_MOUSE_OVER:g.EVENT_COLUMN_HEADER_MOUSE_LEAVE,column:this.column};this.eventService.dispatchEvent(i)}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return t instanceof Cg?t.getAnchorElementForMenu(e):this.getGui()}destroy(){super.destroy(),this.refreshFunctions=null,this.selectAllFeature=null,this.dragSourceElement=null,this.userCompDetails=null,this.userHeaderClasses=null,this.ariaDescriptionProperties=null}},Ja=class extends L{constructor(e,t,i,s){super(),this.eResize=t,this.comp=e,this.pinned=i,this.columnGroup=s}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const e=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(e),!this.gos.get("suppressAutoSize")){const t=this.gos.get("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",()=>{const i=[];this.columnGroup.getDisplayedLeafColumns().forEach(n=>{n.getColDef().suppressAutoSize||i.push(n.getColId())}),i.length>0&&this.columnModel.autoSizeColumns({columns:i,skipHeader:t,stopAtGroup:this.columnGroup,source:"uiColumnResized"}),this.resizeLeafColumnsToFit("uiColumnResized")})}}onResizeStart(e){const t=this.getInitialValues(e);this.storeLocalValues(t),this.toggleColumnResizing(!0)}onResizing(e,t,i="uiColumnResized"){const s=this.normaliseDragChange(t),n=this.resizeStartWidth+s;this.resizeColumnsFromLocalValues(n,i,e)}getInitialValues(e){const t=this.getColumnsToResize(),i=this.getInitialSizeOfColumns(t),s=this.getSizeRatiosOfColumns(t,i),n={columnsToResize:t,resizeStartWidth:i,resizeRatios:s};let o=null;if(e&&(o=this.columnModel.getDisplayedGroupAtDirection(this.columnGroup,"After")),o){const r=o.getDisplayedLeafColumns(),l=n.groupAfterColumns=r.filter(u=>u.isResizable()),a=n.groupAfterStartWidth=this.getInitialSizeOfColumns(l);n.groupAfterRatios=this.getSizeRatiosOfColumns(l,a)}else n.groupAfterColumns=void 0,n.groupAfterStartWidth=void 0,n.groupAfterRatios=void 0;return n}storeLocalValues(e){const{columnsToResize:t,resizeStartWidth:i,resizeRatios:s,groupAfterColumns:n,groupAfterStartWidth:o,groupAfterRatios:r}=e;this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=s,this.resizeTakeFromCols=n,this.resizeTakeFromStartWidth=o,this.resizeTakeFromRatios=r}clearLocalValues(){this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}resizeLeafColumnsToFit(e){const t=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup),i=this.getInitialValues();t>i.resizeStartWidth&&this.resizeColumns(i,t,e,!0)}resizeColumnsFromLocalValues(e,t,i=!0){var s,n,o;if(!this.resizeCols||!this.resizeRatios)return;const r={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:(s=this.resizeTakeFromCols)!=null?s:void 0,groupAfterStartWidth:(n=this.resizeTakeFromStartWidth)!=null?n:void 0,groupAfterRatios:(o=this.resizeTakeFromRatios)!=null?o:void 0};this.resizeColumns(r,e,t,i)}resizeColumns(e,t,i,s=!0){const{columnsToResize:n,resizeStartWidth:o,resizeRatios:r,groupAfterColumns:l,groupAfterStartWidth:a,groupAfterRatios:u}=e,d=[];if(d.push({columns:n,ratios:r,width:t}),l){const h=t-o;d.push({columns:l,ratios:u,width:a-h})}this.columnModel.resizeColumnSets({resizeSets:d,finished:s,source:i}),s&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}getInitialSizeOfColumns(e){return e.reduce((t,i)=>t+i.getActualWidth(),0)}getSizeRatiosOfColumns(e,t){return e.map(i=>i.getActualWidth()/t)}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.clearLocalValues()}};c([f("horizontalResizeService")],Ja.prototype,"horizontalResizeService",2);c([f("autoWidthCalculator")],Ja.prototype,"autoWidthCalculator",2);c([f("columnModel")],Ja.prototype,"columnModel",2);c([M],Ja.prototype,"postConstruct",1);var hT=class extends L{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListener(this.columnGroup,at.EVENT_DISPLAYED_CHILDREN_CHANGED,this.onDisplayedChildrenChanged.bind(this)),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{t.addEventListener("widthChanged",e),t.addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.removeEventListener("widthChanged",e),t.removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.addOrRemoveCssClass("ag-hidden",e===0)}};c([M],hT.prototype,"postConstruct",1);var gL=class extends Xc{constructor(e,t,i){super(e,t,i),this.onSuppressColMoveChange=()=>{if(!this.isAlive()||this.isSuppressMoving())this.removeDragSource();else if(!this.dragSource){const s=this.getGui();this.setDragSource(s)}},this.column=e}setComp(e,t,i){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(()=>{this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature))}),this.setupUserComp(),this.addHeaderMouseListeners();const s=this.getParentRowCtrl().getPinned(),n=this.column.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new Za(n,t)),this.createManagedBean(new Zc(this.column,t,this.beans)),this.createManagedBean(new hT(e,this.column)),this.resizeFeature=this.createManagedBean(new Ja(e,i,s,this.column)),this.createManagedBean(new Ln(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addManagedPropertyListener(g.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners()}resizeHeader(e,t){if(!this.resizeFeature)return;const i=this.resizeFeature.getInitialValues(t);this.resizeFeature.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}moveHeader(e){const{beans:t,eGui:i,column:s,gos:n,ctrlsService:o}=this,r=n.get("enableRtl"),l=e===0,a=this.getPinned(),u=i.getBoundingClientRect(),d=u.left,h=u.width,p=ao.normaliseX(l!==r?d-20:d+h+20,a,!0,n,o),C=s.getGroupId(),v=this.focusService.getFocusedHeader();ao.attemptMoveColumns({allMovingColumns:this.column.getLeafColumns(),isFromHeader:!0,hDirection:e,xPosition:p,pinned:a,fromEnter:!1,fakeEvent:!1,gos:n,columnModel:t.columnModel});const y=s.getDisplayedLeafColumns(),R=l?y[0]:de(y);this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(R,"auto"),!this.isAlive()&&v&&this.restoreFocus(C,s,v)}restoreFocus(e,t,i){const s=t.getLeafColumns();if(!s.length)return;const n=s[0].getParent();if(!n)return;const o=this.findGroupWidthId(n,e);o&&this.focusService.focusHeaderPosition({headerPosition:Me($({},i),{column:o})})}findGroupWidthId(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}return null}resizeLeafColumnsToFit(e){this.resizeFeature&&this.resizeFeature.resizeLeafColumnsToFit(e)}setupUserComp(){const e=this.gos.addGridCommonParams({displayName:this.displayName,columnGroup:this.column,setExpanded:i=>{this.beans.columnModel.setColumnGroupOpened(this.column.getProvidedColumnGroup(),i,"gridInitializing")},setTooltip:(i,s)=>{this.setupTooltip(i,s)}}),t=this.userComponentFactory.getHeaderGroupCompDetails(e);this.comp.setUserCompDetails(t)}addHeaderMouseListeners(){const e=s=>this.handleMouseOverChange(s.type==="mouseenter"),t=()=>this.dispatchColumnMouseEvent(g.EVENT_COLUMN_HEADER_CLICKED,this.column.getProvidedColumnGroup()),i=s=>this.handleContextMenuMouseEvent(s,void 0,this.column.getProvidedColumnGroup());this.addManagedListener(this.getGui(),"mouseenter",e),this.addManagedListener(this.getGui(),"mouseleave",e),this.addManagedListener(this.getGui(),"click",t),this.addManagedListener(this.getGui(),"contextmenu",i)}handleMouseOverChange(e){const i={type:e?g.EVENT_COLUMN_HEADER_MOUSE_OVER:g.EVENT_COLUMN_HEADER_MOUSE_LEAVE,column:this.column.getProvidedColumnGroup()};this.eventService.dispatchEvent(i)}setupTooltip(e,t){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const i=this.column.getColGroupDef(),s=this.gos.get("tooltipShowMode")==="whenTruncated",n=this.eGui;!t&&s&&!(i!=null&&i.headerGroupComponent)&&(t=()=>{const r=n.querySelector(".ag-header-group-text");return r?r.scrollWidth>r.clientWidth:!0});const o={getColumn:()=>this.column,getGui:()=>n,getLocation:()=>"headerGroup",getTooltipValue:()=>e??(i&&i.headerTooltip),shouldDisplayTooltip:t};i&&(o.getColDef=()=>i),this.createBean(new zs(o))}setupExpandable(){const e=this.column.getProvidedColumnGroup();this.refreshExpanded(),this.addManagedListener(e,Qe.EVENT_EXPANDABLE_CHANGED,this.refreshExpanded.bind(this)),this.addManagedListener(e,Qe.EVENT_EXPANDED_CHANGED,this.refreshExpanded.bind(this))}refreshExpanded(){const e=this.column;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0)}getColId(){return this.column.getUniqueId()}addClasses(){const e=this.column.getColGroupDef(),t=jc.getHeaderClassesFromColDef(e,this.gos,null,this.column);this.column.isPadding()?(t.push("ag-header-group-cell-no-group"),this.column.getLeafColumns().every(s=>s.isSpanHeaderHeight())&&t.push("ag-header-span-height")):t.push("ag-header-group-cell-with-group"),t.forEach(i=>this.comp.addOrRemoveCssClass(i,!0))}setupMovingCss(){const t=this.column.getProvidedColumnGroup().getLeafColumns(),i=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving());t.forEach(s=>{this.addManagedListener(s,Ee.EVENT_MOVING_CHANGED,i)}),i()}onFocusIn(e){if(!this.eGui.contains(e.relatedTarget)){const t=this.getRowIndex();this.beans.focusService.setFocusedHeader(t,this.column)}}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(!(!this.expandable||!t)&&e.key===D.ENTER){const i=this.column,s=!i.isExpanded();this.beans.columnModel.setColumnGroupOpened(i.getProvidedColumnGroup(),s,"uiColumnExpanded")}}setDragSource(e){if(!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),!e))return;const{beans:t,column:i,displayName:s,gos:n,dragAndDropService:o}=this,{columnModel:r}=t,l=i.getProvidedColumnGroup().getLeafColumns();let a=!n.get("suppressDragLeaveHidesColumns");const u=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>a?J.ICON_HIDE:J.ICON_NOT_ALLOWED,dragItemName:s,getDragItem:()=>this.getDragItemForGroup(i),onDragStarted:()=>{a=!n.get("suppressDragLeaveHidesColumns"),l.forEach(d=>d.setMoving(!0,"uiColumnDragged"))},onDragStopped:()=>l.forEach(d=>d.setMoving(!1,"uiColumnDragged")),onGridEnter:d=>{var h;if(a){const p=((h=d==null?void 0:d.columns)==null?void 0:h.filter(C=>!C.getColDef().lockVisible))||[];r.setColumnsVisible(p,!0,"uiColumnMoved")}},onGridExit:d=>{var h;if(a){const p=((h=d==null?void 0:d.columns)==null?void 0:h.filter(C=>!C.getColDef().lockVisible))||[];r.setColumnsVisible(p,!1,"uiColumnMoved")}}};o.addDragSource(u,!0)}getDragItemForGroup(e){const t=e.getProvidedColumnGroup().getLeafColumns(),i={};t.forEach(n=>i[n.getId()]=n.isVisible());const s=[];return this.beans.columnModel.getAllDisplayedColumns().forEach(n=>{t.indexOf(n)>=0&&(s.push(n),Qt(t,n))}),t.forEach(n=>s.push(n)),{columns:s,visibleState:i}}isSuppressMoving(){let e=!1;return this.column.getLeafColumns().forEach(i=>{(i.getColDef().suppressMovable||i.getColDef().lockPosition)&&(e=!0)}),e||this.gos.get("suppressMovableColumns")}},fL=0,Bl=class extends L{constructor(e,t,i){super(),this.instanceId=fL++,this.rowIndex=e,this.pinned=t,this.type=i;const s=i=="group"?"ag-header-row-column-group":i=="filter"?"ag-header-row-column-filter":"ag-header-row-column";this.headerRowClass=`ag-header-row ${s}`}postConstruct(){this.isPrintLayout=this.gos.isDomLayout("print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}getInstanceId(){return this.instanceId}setComp(e,t=!0){this.comp=e,t&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners()}getHeaderRowClass(){return this.headerRowClass}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(){this.addManagedListener(this.eventService,g.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_VIRTUAL_COLUMNS_CHANGED,e=>this.onVirtualColumnsChanged(e.afterScroll)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),this.addManagedPropertyListener("ensureDomOrder",e=>this.isEnsureDomOrder=e.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))}getHeaderCellCtrl(e){if(this.headerCellCtrls)return so(this.headerCellCtrls).find(t=>t.getColumnGroupChild()===e)}onDisplayedColumnsChanged(){this.isPrintLayout=this.gos.isDomLayout("print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}getType(){return this.type}onColumnResized(){this.setWidth()}setWidth(){const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{columnModel:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){var{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){const{columnModel:e,filterManager:t}=this.beans;let i=e.getHeaderRowCount();const s=[];let n=0;t.hasFloatingFilters()&&(i++,n=1);const o=e.getColumnGroupHeaderRowHeight(),r=e.getColumnHeaderRowHeight(),l=1+n,a=i-l;for(let h=0;h<a;h++)s.push(o);s.push(r);for(let h=0;h<n;h++)s.push(e.getFloatingFiltersHeight());let u=0;for(let h=0;h<this.rowIndex;h++)u+=s[h];const d=s[this.rowIndex];return{topOffset:u,rowHeight:d}}getPinned(){return this.pinned}getRowIndex(){return this.rowIndex}onVirtualColumnsChanged(e=!1){const t=this.getHeaderCtrls(),i=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,i,e)}getHeaderCtrls(){const e=this.headerCellCtrls;this.headerCellCtrls=new Map;const t=this.getColumnsInViewport();for(const n of t)this.recycleAndCreateHeaderCtrls(n,e);const i=n=>{const{focusService:o,columnModel:r}=this.beans;return o.isHeaderWrapperFocused(n)?r.isDisplayed(n.getColumnGroupChild()):!1};if(e)for(const[n,o]of e)i(o)?this.headerCellCtrls.set(n,o):this.destroyBean(o);return Array.from(this.headerCellCtrls.values())}recycleAndCreateHeaderCtrls(e,t){if(!this.headerCellCtrls||e.isEmptyGroup())return;const i=e.getUniqueId();let s;if(t&&(s=t.get(i),t.delete(i)),s&&s.getColumnGroupChild()!=e&&(this.destroyBean(s),s=void 0),s==null)switch(this.type){case"filter":s=this.createBean(new hL(e,this.beans,this));break;case"group":s=this.createBean(new gL(e,this.beans,this));break;default:s=this.createBean(new pL(e,this.beans,this));break}this.headerCellCtrls.set(i,s)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(this.pinned!=null)return[];let e=[];const t=this.getActualDepth(),{columnModel:i}=this.beans;return["left",null,"right"].forEach(s=>{const n=i.getVirtualHeaderGroupRow(s,t);e=e.concat(n)}),e}getActualDepth(){return this.type=="filter"?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.columnModel.getVirtualHeaderGroupRow(this.pinned,this.getActualDepth())}focusHeader(e,t){if(!this.headerCellCtrls)return!1;const s=Array.from(this.headerCellCtrls.values()).find(n=>n.getColumnGroupChild()==e);return s?s.focus(t):!1}destroy(){this.headerCellCtrls&&this.headerCellCtrls.forEach(e=>{this.destroyBean(e)}),this.headerCellCtrls=void 0,super.destroy()}};c([f("beans")],Bl.prototype,"beans",2);c([M],Bl.prototype,"postConstruct",1);var Mn=class extends L{constructor(e){super(),this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[],this.pinned=e}setComp(e,t){this.comp=e,this.eViewport=t,this.setupCenterWidth(),this.setupPinnedWidth(),this.setupDragAndDrop(this.eViewport),this.addManagedListener(this.eventService,g.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.ctrlsService.registerHeaderContainer(this,this.pinned),this.columnModel.isReady()&&this.refresh()}setupDragAndDrop(e){const t=new Qr(this.pinned,e);this.createManagedBean(t)}refresh(e=!1){const t=new Lr,i=this.focusService.getFocusHeaderToUseAfterRefresh(),s=()=>{const l=this.columnModel.getHeaderRowCount()-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let a=0;a<l;a++){const u=this.createBean(new Bl(t.next(),this.pinned,"group"));this.groupsRowCtrls.push(u)}},n=()=>{const l=t.next(),a=!this.hidden&&(this.columnsRowCtrl==null||!e||this.columnsRowCtrl.getRowIndex()!==l);(a||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),a&&(this.columnsRowCtrl=this.createBean(new Bl(l,this.pinned,"column")))},o=()=>{this.includeFloatingFilter=this.filterManager.hasFloatingFilters()&&!this.hidden;const l=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){l();return}const a=t.next();if(this.filtersRowCtrl){const u=this.filtersRowCtrl.getRowIndex()!==a;(!e||u)&&l()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new Bl(a,this.pinned,"filter")))};s(),n(),o();const r=this.getAllCtrls();this.comp.setCtrls(r),this.restoreFocusOnHeader(i)}restoreFocusOnHeader(e){e==null||e.column.getPinned()!=this.pinned||this.focusService.focusHeaderPosition({headerPosition:e})}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(){const e=this.filterManager.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==e&&this.refresh(!0)}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new Kr(e=>this.comp.setCenterWidth(`${e}px`),!0))}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}setupPinnedWidth(){if(this.pinned==null)return;const e=this.pinned==="left",t=this.pinned==="right";this.hidden=!0;const i=()=>{const s=e?this.pinnedWidthService.getPinnedLeftWidth():this.pinnedWidthService.getPinnedRightWidth();if(s==null)return;const n=s==0,o=this.hidden!==n,r=this.gos.get("enableRtl"),l=this.gos.getScrollbarWidth(),u=this.scrollVisibleService.isVerticalScrollShowing()&&(r&&e||!r&&t)?s+l:s;this.comp.setPinnedContainerWidth(`${u}px`),this.comp.setDisplayed(!n),o&&(this.hidden=n,this.refresh())};this.addManagedListener(this.eventService,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,i),this.addManagedListener(this.eventService,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,i),this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,i),this.addManagedListener(this.eventService,g.EVENT_SCROLLBAR_WIDTH_CHANGED,i)}getHeaderCtrlForColumn(e){if(e instanceof Ee)return this.columnsRowCtrl?this.columnsRowCtrl.getHeaderCellCtrl(e):void 0;if(this.groupsRowCtrls.length!==0)for(let t=0;t<this.groupsRowCtrls.length;t++){const i=this.groupsRowCtrls[t].getHeaderCellCtrl(e);if(i)return i}}getHtmlElementForColumnHeader(e){const t=this.getHeaderCtrlForColumn(e);return t?t.getGui():null}getRowType(e){const i=this.getAllCtrls()[e];return i?i.getType():void 0}focusHeader(e,t,i){const n=this.getAllCtrls()[e];return n?n.focusHeader(t,i):!1}getViewport(){return this.eViewport}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}destroy(){this.filtersRowCtrl&&(this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)),this.columnsRowCtrl&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),this.groupsRowCtrls&&this.groupsRowCtrls.length&&(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls)),super.destroy()}};c([f("ctrlsService")],Mn.prototype,"ctrlsService",2);c([f("scrollVisibleService")],Mn.prototype,"scrollVisibleService",2);c([f("pinnedWidthService")],Mn.prototype,"pinnedWidthService",2);c([f("columnModel")],Mn.prototype,"columnModel",2);c([f("focusService")],Mn.prototype,"focusService",2);c([f("filterManager")],Mn.prototype,"filterManager",2);var Go=class Yu extends Z{constructor(t){super(),this.headerRowComps={},this.rowCompsList=[],this.pinned=t}init(){this.selectAndSetTemplate();const t={setDisplayed:s=>this.setDisplayed(s),setCtrls:s=>this.setCtrls(s),setCenterWidth:s=>this.eCenterContainer.style.width=s,setViewportScrollLeft:s=>this.getGui().scrollLeft=s,setPinnedContainerWidth:s=>{const n=this.getGui();n.style.width=s,n.style.maxWidth=s,n.style.minWidth=s}};this.createManagedBean(new Mn(this.pinned)).setComp(t,this.getGui())}selectAndSetTemplate(){const t=this.pinned=="left",i=this.pinned=="right",s=t?Yu.PINNED_LEFT_TEMPLATE:i?Yu.PINNED_RIGHT_TEMPLATE:Yu.CENTER_TEMPLATE;this.setTemplate(s),this.eRowContainer=this.eCenterContainer?this.eCenterContainer:this.getGui()}destroyRowComps(){this.setCtrls([])}destroyRowComp(t){this.destroyBean(t),this.eRowContainer.removeChild(t.getGui())}setCtrls(t){const i=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let s;const n=o=>{const r=o.getGui();r.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(r),s&&am(this.eRowContainer,r,s),s=r};t.forEach(o=>{const r=o.getInstanceId(),l=i[r];delete i[r];const a=l||this.createBean(new Mm(o));this.headerRowComps[r]=a,this.rowCompsList.push(a),n(a)}),yn(i).forEach(o=>this.destroyRowComp(o))}};Go.PINNED_LEFT_TEMPLATE='<div class="ag-pinned-left-header" role="rowgroup"></div>';Go.PINNED_RIGHT_TEMPLATE='<div class="ag-pinned-right-header" role="rowgroup"></div>';Go.CENTER_TEMPLATE=`<div class="ag-header-viewport" role="presentation">
|
|
191
|
+
<div class="ag-header-container" ref="eCenterContainer" role="rowgroup"></div>
|
|
192
|
+
</div>`;c([N("eCenterContainer")],Go.prototype,"eCenterContainer",2);c([M],Go.prototype,"init",1);c([Bt],Go.prototype,"destroyRowComps",1);var Yh=Go,vo=class extends L{constructor(){super(...arguments),this.currentHeaderRowWithoutSpan=-1}postConstruct(){this.ctrlsService.whenReady(t=>{this.gridBodyCon=t.gridBodyCtrl});const e=this.gos.getDocument();this.addManagedListener(e,"mousedown",()=>this.setCurrentHeaderRowWithoutSpan(-1))}getHeaderRowCount(){const e=this.ctrlsService.getHeaderRowContainerCtrl();return e?e.getRowCount():0}navigateVertically(e,t,i){if(t||(t=this.focusService.getFocusedHeader()),!t)return!1;const{headerRowIndex:s,column:n}=t,o=this.getHeaderRowCount(),r=e===0;let{headerRowIndex:l,column:a,headerRowIndexWithoutSpan:u}=r?this.headerPositionUtils.getColumnVisibleParent(n,s):this.headerPositionUtils.getColumnVisibleChild(n,s),d=!1;return l<0&&(l=0,a=n,d=!0),l>=o?(l=-1,this.setCurrentHeaderRowWithoutSpan(-1)):u!==void 0&&(this.currentHeaderRowWithoutSpan=u),!d&&!a?!1:this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l,column:a},allowUserOverride:!0,event:i})}setCurrentHeaderRowWithoutSpan(e){this.currentHeaderRowWithoutSpan=e}navigateHorizontally(e,t=!1,i){const s=this.focusService.getFocusedHeader(),n=e===2,o=this.gos.get("enableRtl");let r,l;if(this.currentHeaderRowWithoutSpan!==-1?s.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=s.headerRowIndex,n!==o?(l="Before",r=this.headerPositionUtils.findHeader(s,l)):(l="After",r=this.headerPositionUtils.findHeader(s,l)),r||!t)return this.focusService.focusHeaderPosition({headerPosition:r,direction:l,fromTab:t,allowUserOverride:!0,event:i});if(t){const a=this.gos.getCallback("tabToNextHeader");if(a)return this.focusService.focusHeaderPositionFromUserFunc({userFunc:a,headerPosition:r,direction:l})}return this.focusNextHeaderRow(s,l,i)}focusNextHeaderRow(e,t,i){const s=e.headerRowIndex;let n=null,o;if(t==="Before"?s>0&&(o=s-1,this.currentHeaderRowWithoutSpan-=1,n=this.headerPositionUtils.findColAtEdgeForHeaderRow(o,"end")):(o=s+1,this.currentHeaderRowWithoutSpan<this.getHeaderRowCount()?this.currentHeaderRowWithoutSpan+=1:this.setCurrentHeaderRowWithoutSpan(-1),n=this.headerPositionUtils.findColAtEdgeForHeaderRow(o,"start")),!n)return!1;const{column:r,headerRowIndex:l}=this.headerPositionUtils.getHeaderIndexToFocus(n.column,n==null?void 0:n.headerRowIndex);return this.focusService.focusHeaderPosition({headerPosition:{column:r,headerRowIndex:l},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e,t="After"){if(e.getPinned())return;let i;if(e instanceof at){const s=e.getDisplayedLeafColumns();i=t==="Before"?de(s):s[0]}else i=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(i)}};c([f("focusService")],vo.prototype,"focusService",2);c([f("headerPositionUtils")],vo.prototype,"headerPositionUtils",2);c([f("ctrlsService")],vo.prototype,"ctrlsService",2);c([M],vo.prototype,"postConstruct",1);vo=c([H("headerNavigationService")],vo);var In=class extends L{setComp(e,t,i){this.comp=e,this.eGui=t,this.createManagedBean(new Ln(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onPivotModeChanged(),this.setupHeaderHeight();const s=this.onHeaderContextMenu.bind(this);this.addManagedListener(this.eGui,"contextmenu",s),this.mockContextMenuForIPad(s),this.ctrlsService.register("gridHeaderCtrl",this)}setupHeaderHeight(){const 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,g.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,e)}getHeaderHeight(){return this.headerHeight}setHeaderHeight(){const{columnModel:e}=this;let t=0,i=e.getHeaderRowCount(),s;this.filterManager.hasFloatingFilters()&&(i++,t=1);const o=this.columnModel.getColumnGroupHeaderRowHeight(),r=this.columnModel.getColumnHeaderRowHeight(),l=1+t,a=i-l;if(s=t*e.getFloatingFiltersHeight(),s+=a*o,s+=r,this.headerHeight===s)return;this.headerHeight=s;const u=`${s+1}px`;this.comp.setHeightAndMinHeight(u),this.eventService.dispatchEvent({type:g.EVENT_HEADER_HEIGHT_CHANGED})}onPivotModeChanged(){const e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)}onDisplayedColumnsChanged(){const t=this.columnModel.getAllDisplayedColumns().some(i=>i.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",t)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),i=e.shiftKey!==t?2:3;(this.headerNavigationService.navigateHorizontally(i,!0,e)||this.focusService.focusNextGridCoreContainer(e.shiftKey))&&e.preventDefault()}handleKeyDown(e){let t=null;switch(e.key){case D.LEFT:t=2;case D.RIGHT:b(t)||(t=3),this.headerNavigationService.navigateHorizontally(t,!1,e);break;case D.UP:t=0;case D.DOWN:b(t)||(t=1),this.headerNavigationService.navigateVertically(t,null,e)&&e.preventDefault();break;default:return}}onFocusOut(e){const{relatedTarget:t}=e;!t&&this.eGui.contains(this.gos.getActiveDomElement())||this.eGui.contains(t)||this.focusService.clearFocusedHeader()}onHeaderContextMenu(e,t,i){if(!e&&!i||!this.menuService.isHeaderContextMenuEnabled())return;const{target:s}=e??t;(s===this.eGui||s===this.ctrlsService.getHeaderRowContainerCtrl().getViewport())&&this.menuService.showHeaderContextMenu(void 0,e,i)}mockContextMenuForIPad(e){if(!Us())return;const t=new pt(this.eGui),i=s=>{e(void 0,s.touchStart,s.touchEvent)};this.addManagedListener(t,pt.EVENT_LONG_TAP,i),this.addDestroyFunc(()=>t.destroy())}};c([f("headerNavigationService")],In.prototype,"headerNavigationService",2);c([f("focusService")],In.prototype,"focusService",2);c([f("columnModel")],In.prototype,"columnModel",2);c([f("ctrlsService")],In.prototype,"ctrlsService",2);c([f("filterManager")],In.prototype,"filterManager",2);c([f("menuService")],In.prototype,"menuService",2);var xm=class pT extends Z{constructor(){super(pT.TEMPLATE)}postConstruct(){const t={addOrRemoveCssClass:(n,o)=>this.addOrRemoveCssClass(n,o),setHeightAndMinHeight:n=>{this.getGui().style.height=n,this.getGui().style.minHeight=n}};this.createManagedBean(new In).setComp(t,this.getGui(),this.getFocusableElement());const s=n=>{this.createManagedBean(n),this.appendChild(n)};s(new Yh("left")),s(new Yh(null)),s(new Yh("right"))}};xm.TEMPLATE='<div class="ag-header" role="presentation"/>';c([M],xm.prototype,"postConstruct",1);var mL=xm,va=class extends L{addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0};return this.dragService.addDragSource(t),()=>this.dragService.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const i=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(i)}setResizeIcons(){const e=this.ctrlsService.get("gridCtrl");e.setResizeCursor(!0),e.disableUserSelect(!0)}onDragStop(e,t){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.ctrlsService.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}};c([f("dragService")],va.prototype,"dragService",2);c([f("ctrlsService")],va.prototype,"ctrlsService",2);va=c([H("horizontalResizeService")],va);var En=class extends L{hideActiveMenu(){this.hidePopup&&this.hidePopup()}showMenuAfterMouseEvent(e,t,i){this.showPopup(e,s=>{this.popupService.positionPopupUnderMouseEvent({column:e,type:i,mouseEvent:t,ePopup:s})},i,t.target,this.menuService.isLegacyMenuEnabled())}showMenuAfterButtonClick(e,t,i){let s=-1,n="left";const o=this.menuService.isLegacyMenuEnabled();!o&&this.gos.get("enableRtl")&&(s=1,n="right");let r=o?void 0:4*s,l=o?void 0:4;this.showPopup(e,a=>{this.popupService.positionPopupByComponent({type:i,eventSource:t,ePopup:a,nudgeX:r,nudgeY:l,alignSide:n,keepWithinBounds:!0,position:"under",column:e})},i,t,o)}showPopup(e,t,i,s,n){const o=e?this.createBean(new $c(e,"COLUMN_MENU")):void 0;if(this.activeMenu=o,!(o!=null&&o.hasFilter())||!e)throw new Error("AG Grid - unable to show popup filter, filter instantiation failed");const r=document.createElement("div");He(r,"presentation"),r.classList.add("ag-menu"),n||r.classList.add("ag-filter-menu"),this.tabListener=this.addManagedListener(r,"keydown",v=>this.trapFocusWithin(v,r)),r.appendChild(o==null?void 0:o.getGui());let l;const a=()=>o==null?void 0:o.afterGuiDetached(),u=this.menuService.isColumnMenuAnchoringEnabled()?s??this.ctrlsService.getGridBodyCtrl().getGui():void 0,d=v=>{e.setMenuVisible(!1,"contextMenu");const y=v instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),y&&s&&oi(s)){const R=this.focusService.findTabbableParent(s);R&&R.focus()}a(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,i,e)},h=this.localeService.getLocaleTextFunc(),p=n&&i!=="columnFilter"?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),C=this.popupService.addPopup({modal:!0,eChild:r,closeOnEsc:!0,closedCallback:d,positionCallback:()=>t(r),anchorToElement:u,ariaLabel:p});C&&(this.hidePopup=l=C.hideFunc),o.afterInit().then(()=>{t(r),o.afterGuiAttached({container:i,hidePopup:l})}),e.setMenuVisible(!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,i,e)}trapFocusWithin(e,t){e.key!==D.TAB||e.defaultPrevented||this.focusService.findNextFocusableElement(t,!1,e.shiftKey)||(e.preventDefault(),this.focusService.focusInto(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,i){const s={type:g.EVENT_COLUMN_MENU_VISIBLE_CHANGED,visible:e,switchingTab:!1,key:t,column:i??null};this.eventService.dispatchEvent(s)}isMenuEnabled(e){var t;return e.isFilterAllowed()&&((t=e.getColDef().menuTabs)!=null?t:["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}};c([f("filterManager")],En.prototype,"filterManager",2);c([f("popupService")],En.prototype,"popupService",2);c([f("focusService")],En.prototype,"focusService",2);c([f("ctrlsService")],En.prototype,"ctrlsService",2);c([f("menuService")],En.prototype,"menuService",2);En=c([H("filterMenuFactory")],En);var Qu=(e=>(e.TAB_GUARD="ag-tab-guard",e.TAB_GUARD_TOP="ag-tab-guard-top",e.TAB_GUARD_BOTTOM="ag-tab-guard-bottom",e))(Qu||{}),Jc=class extends L{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1;const{comp:t,eTopGuard:i,eBottomGuard:s,focusTrapActive:n,forceFocusOutWhenTabGuardsAreEmpty:o,focusInnerElement:r,onFocusIn:l,onFocusOut:a,shouldStopEventPropagation:u,onTabKeyDown:d,handleKeyDown:h,eFocusableElement:p}=e;this.comp=t,this.eTopGuard=i,this.eBottomGuard=s,this.providedFocusInnerElement=r,this.eFocusableElement=p,this.focusTrapActive=!!n,this.forceFocusOutWhenTabGuardsAreEmpty=!!o,this.providedFocusIn=l,this.providedFocusOut=a,this.providedShouldStopEventPropagation=u,this.providedOnTabKeyDown=d,this.providedHandleKeyDown=h}postConstruct(){this.createManagedBean(new Ln(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(e=>this.addManagedListener(e,"focus",this.onFocus.bind(this)))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&this.focusService.findFocusableElements(this.eFocusableElement,".ag-tab-guard").length===0){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}const t=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t)}findNextElementOutsideAndFocus(e){const t=this.gos.getDocument(),i=this.focusService.findFocusableElements(t.body,null,!0),s=i.indexOf(e?this.eTopGuard:this.eBottomGuard);if(s===-1)return;let n,o;e?(n=0,o=s):(n=s+1,o=i.length);const r=i.slice(n,o),l=this.gos.get("tabIndex");r.sort((a,u)=>{const d=parseInt(a.getAttribute("tabindex")||"0"),h=parseInt(u.getAttribute("tabindex")||"0");return h===l?1:d===l?-1:d===0?1:h===0?-1:d-h}),r[e?r.length-1:0].focus()}onFocusIn(e){this.focusTrapActive||(this.providedFocusIn&&this.providedFocusIn(e),this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const i=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),i&&(i.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=this.focusService.findFocusableElements(this.eFocusableElement);this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length&&t[e?t.length-1:0].focus({preventScroll:!0})}getNextFocusableElement(e){return this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e){return e===this.eTopGuard||e===this.eBottomGuard}};c([f("focusService")],Jc.prototype,"focusService",2);c([M],Jc.prototype,"postConstruct",1);var eu=class extends Z{initialiseTabGuard(t){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.getFocusableElement();const i=[this.eTopGuard,this.eBottomGuard],s={setTabIndex:n=>{i.forEach(o=>n!=null?o.setAttribute("tabindex",n):o.removeAttribute("tabindex"))}};this.addTabGuards(this.eTopGuard,this.eBottomGuard),this.tabGuardCtrl=this.createManagedBean(new Jc({comp:s,focusTrapActive:!!t.focusTrapActive,eTopGuard:this.eTopGuard,eBottomGuard:this.eBottomGuard,eFocusableElement:this.eFocusableElement,onFocusIn:t.onFocusIn,onFocusOut:t.onFocusOut,focusInnerElement:t.focusInnerElement,handleKeyDown:t.handleKeyDown,onTabKeyDown:t.onTabKeyDown,shouldStopEventPropagation:t.shouldStopEventPropagation,forceFocusOutWhenTabGuardsAreEmpty:t.forceFocusOutWhenTabGuardsAreEmpty}))}createTabGuard(t){const i=document.createElement("div"),s=t==="top"?"ag-tab-guard-top":"ag-tab-guard-bottom";return i.classList.add("ag-tab-guard",s),He(i,"presentation"),i}addTabGuards(t,i){this.eFocusableElement.insertAdjacentElement("afterbegin",t),this.eFocusableElement.insertAdjacentElement("beforeend",i)}removeAllChildrenExceptTabGuards(){const t=[this.eTopGuard,this.eBottomGuard];je(this.getFocusableElement()),this.addTabGuards(...t)}forceFocusOutOfContainer(t=!1){this.tabGuardCtrl.forceFocusOutOfContainer(t)}appendChild(t,i){za(t)||(t=t.getGui());const{eBottomGuard:s}=this;s?s.insertAdjacentElement("beforebegin",t):super.appendChild(t,i)}},eh=class gT extends eu{constructor(t){super(gT.getTemplate(t.cssClass)),this.items=[],this.tabbedItemScrollMap=new Map,this.params=t}postConstruct(){this.setupHeader(),this.params.items&&this.params.items.forEach(t=>this.addItem(t)),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),focusInnerElement:this.focusInnerElement.bind(this),focusTrapActive:!0}),this.addDestroyFunc(()=>{var t,i,s;return(s=(i=(t=this.activeItem)==null?void 0:t.tabbedItem)==null?void 0:i.afterDetachedCallback)==null?void 0:s.call(i)})}static getTemplate(t){return`<div class="ag-tabs ${t}">
|
|
193
|
+
<div ref="eHeader"></div>
|
|
194
|
+
<div ref="eBody" role="presentation" class="ag-tabs-body ${t?`${t}-body`:""}"></div>
|
|
195
|
+
</div>`}setupHeader(){const{enableCloseButton:t,cssClass:i}=this.params,s=(n,o)=>{n.classList.add(`ag-tabs-${o}`),i&&n.classList.add(`${i}-${o}`)};t?(this.setupCloseButton(s),this.eTabHeader=this.gos.getDocument().createElement("div"),s(this.eHeader,"header-wrapper"),He(this.eHeader,"presentation"),this.eHeader.appendChild(this.eTabHeader)):this.eTabHeader=this.eHeader,He(this.eTabHeader,"tablist"),s(this.eTabHeader,"header")}setupCloseButton(t){const i=this.gos.getDocument(),s=i.createElement("button");t(s,"close-button");const n=Oe("close",this.gos,void 0,!0);yi(s,this.params.closeButtonAriaLabel),s.appendChild(n),this.addManagedListener(s,"click",()=>{var r,l;return(l=(r=this.params).onCloseClicked)==null?void 0:l.call(r)});const o=i.createElement("div");t(o,"close-button-wrapper"),He(o,"presentation"),o.appendChild(s),this.eHeader.appendChild(o),this.eCloseButton=s}handleKeyDown(t){switch(t.key){case D.RIGHT:case D.LEFT:if(!this.eTabHeader.contains(this.gos.getActiveDomElement()))return;const i=t.key===D.RIGHT,s=this.gos.get("enableRtl"),n=this.items.indexOf(this.activeItem),o=i!==s?Math.min(n+1,this.items.length-1):Math.max(n-1,0);if(n===o)return;t.preventDefault();const r=this.items[o];this.showItemWrapper(r),r.eHeaderButton.focus();break;case D.UP:case D.DOWN:t.stopPropagation();break}}onTabKeyDown(t){var i,s,n,o;if(t.defaultPrevented)return;const{focusService:r,eHeader:l,eBody:a,activeItem:u,params:d}=this,{suppressTrapFocus:h,enableCloseButton:p}=d,C=this.gos.getActiveDomElement(),v=t.target,y=t.shiftKey;if(l.contains(C)){t.preventDefault(),p&&y&&!((i=this.eCloseButton)!=null&&i.contains(C))?(s=this.eCloseButton)==null||s.focus():h&&y?(n=this.focusService.findFocusableElementBeforeTabGuard(this.gos.getDocument().body,v))==null||n.focus():this.focusBody(t.shiftKey);return}let R=null;if(r.isTargetUnderManagedComponent(a,v)&&(y&&(R=this.focusService.findFocusableElementBeforeTabGuard(a,v)),!R&&!h&&(R=u.eHeaderButton)),!R&&a.contains(C)&&(R=r.findNextFocusableElement(a,!1,y),!R)){t.preventDefault(),h&&!y?this.forceFocusOutOfContainer(y):p&&!y?(o=this.eCloseButton)==null||o.focus():this.focusHeader();return}R&&(t.preventDefault(),R.focus())}focusInnerElement(t){t?this.focusHeader():this.focusBody(!0)}focusHeader(t){this.activeItem.eHeaderButton.focus({preventScroll:t})}focusBody(t){this.focusService.focusInto(this.eBody,t)}setAfterAttachedParams(t){this.afterAttachedParams=t}showFirstItem(){this.items.length>0&&this.showItemWrapper(this.items[0])}addItem(t){const i=document.createElement("span");He(i,"tab"),i.setAttribute("tabindex","-1"),i.appendChild(t.title),i.classList.add("ag-tab"),this.eTabHeader.appendChild(i),yi(i,t.titleLabel);const s={tabbedItem:t,eHeaderButton:i};this.items.push(s),i.addEventListener("click",this.showItemWrapper.bind(this,s))}showItem(t){const i=this.items.find(s=>s.tabbedItem===t);i&&this.showItemWrapper(i)}showItemWrapper(t){var i,s,n,o,r,l;const{tabbedItem:a,eHeaderButton:u}=t;if((s=(i=this.params).onItemClicked)==null||s.call(i,{item:a}),this.activeItem===t){(o=(n=this.params).onActiveItemClicked)==null||o.call(n);return}this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),je(this.eBody),a.bodyPromise.then(d=>{this.eBody.appendChild(d);const h=!this.focusService.isKeyboardMode();if(this.params.suppressFocusBodyOnOpen||this.focusService.focusInto(this.eBody,!1,h),a.afterAttachedCallback&&a.afterAttachedCallback(this.afterAttachedParams),this.params.keepScrollPosition){const p=a.getScrollableContainer&&a.getScrollableContainer()||d;this.lastScrollListener=this.addManagedListener(p,"scroll",()=>{this.tabbedItemScrollMap.set(a.name,p.scrollTop)});const C=this.tabbedItemScrollMap.get(a.name);C!==void 0&&setTimeout(()=>{p.scrollTop=C},0)}}),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),(l=(r=this.activeItem.tabbedItem).afterDetachedCallback)==null||l.call(r)),u.classList.add("ag-tab-selected"),this.activeItem=t}};c([f("focusService")],eh.prototype,"focusService",2);c([N("eHeader")],eh.prototype,"eHeader",2);c([N("eBody")],eh.prototype,"eBody",2);c([M],eh.prototype,"postConstruct",1);var CL=50,Eg=class extends L{constructor(){super(...arguments),this.polyfillFunctions=[]}observeResize(e,t){const i=this.gos.getWindow(),s=()=>{const l=new i.ResizeObserver(t);return l.observe(e),()=>l.disconnect()},n=()=>{var l,a;let u=(l=e==null?void 0:e.clientWidth)!=null?l:0,d=(a=e==null?void 0:e.clientHeight)!=null?a:0,h=!0;const p=()=>{var C,v;if(h){const y=(C=e==null?void 0:e.clientWidth)!=null?C:0,R=(v=e==null?void 0:e.clientHeight)!=null?v:0;(y!==u||R!==d)&&(u=y,d=R,t()),this.doNextPolyfillTurn(p)}};return p(),()=>h=!1},o=this.gos.get("suppressBrowserResizeObserver");return!!i.ResizeObserver&&!o?s():this.getFrameworkOverrides().wrapIncoming(()=>n(),"resize-observer")}doNextPolyfillTurn(e){this.polyfillFunctions.push(e),this.schedulePolyfill()}schedulePolyfill(){if(this.polyfillScheduled)return;const e=()=>{const t=this.polyfillFunctions;this.polyfillScheduled=!1,this.polyfillFunctions=[],t.forEach(i=>i())};this.polyfillScheduled=!0,window.setTimeout(e,CL)}};Eg=c([H("resizeObserverService")],Eg);var Ir=class extends L{constructor(){super(...arguments),this.createTasksP1={list:[],sorted:!1},this.createTasksP2={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastPage=0,this.lastScrollTop=0,this.taskCount=0,this.cancelledTasks=new Set}setScrollTop(e){const t=this.gos.get("pagination");if(this.scrollGoingDown=e>=this.lastScrollTop,t&&e===0){const i=this.paginationProxy.getCurrentPage();i!==this.lastPage&&(this.lastPage=i,this.scrollGoingDown=!0)}this.lastScrollTop=e}init(){this.useAnimationFrame=!this.gos.get("suppressAnimationFrame")}isOn(){return this.useAnimationFrame}verifyAnimationFrameOn(e){this.useAnimationFrame===!1&&console.warn(`AG Grid: AnimationFrameService.${e} called but animation frames are off`)}createTask(e,t,i){this.verifyAnimationFrameOn(i);const s={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[i],s),this.schedule()}cancelTask(e){this.cancelledTasks.add(e)}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((i,s)=>i.index!==s.index?t*(s.index-i.index):s.createOrder-i.createOrder),e.sorted=!0}addDestroyTask(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule()}executeFrame(e){this.verifyAnimationFrameOn("executeFrame");const t=this.createTasksP1,i=t.list,s=this.createTasksP2,n=s.list,o=this.destroyTasks,r=new Date().getTime();let l=new Date().getTime()-r;const a=e<=0,u=this.ctrlsService.getGridBodyCtrl();for(;a||l<e;){if(!u.getScrollFeature().scrollGridIfNeeded()){let h;if(i.length)this.sortTaskList(t),h=i.pop().task;else if(n.length)this.sortTaskList(s),h=n.pop().task;else if(o.length)h=o.pop();else{this.cancelledTasks.clear();break}this.cancelledTasks.has(h)||h()}l=new Date().getTime()-r}i.length||n.length||o.length?this.requestFrame():this.stopTicking()}stopTicking(){this.ticking=!1}flushAllFrames(){this.useAnimationFrame&&this.executeFrame(-1)}schedule(){this.useAnimationFrame&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);this.requestAnimationFrame(e)}requestAnimationFrame(e){const t=this.gos.getWindow();t.requestAnimationFrame?t.requestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.setTimeout(e,0)}isQueueEmpty(){return!this.ticking}debounce(e){let t=!1;return()=>{if(!this.isOn()){window.setTimeout(e,0);return}t||(t=!0,this.addDestroyTask(()=>{t=!1,e()}))}}};c([f("ctrlsService")],Ir.prototype,"ctrlsService",2);c([f("paginationProxy")],Ir.prototype,"paginationProxy",2);c([M],Ir.prototype,"init",1);Ir=c([H("animationFrameService")],Ir);var wa=class extends L{postConstruct(){this.isClientSideRowModel=this.rowModel.getType()==="clientSide"}expandRows(e){if(!this.isClientSideRowModel)return;const t=new Set(e);this.rowModel.forEachNode(i=>{i.id&&t.has(i.id)&&(i.expanded=!0)}),this.onGroupExpandedOrCollapsed()}getExpandedRows(){const e=[];return this.rowModel.forEachNode(({expanded:t,id:i})=>{t&&i&&e.push(i)}),e}expandAll(e){this.isClientSideRowModel&&this.rowModel.expandOrCollapseAll(e)}setRowNodeExpanded(e,t,i,s){e&&(i&&e.parent&&e.parent.level!==-1&&this.setRowNodeExpanded(e.parent,t,i,s),e.setExpanded(t,void 0,s))}onGroupExpandedOrCollapsed(){this.isClientSideRowModel&&this.rowModel.refreshModel({step:"map"})}};c([f("rowModel")],wa.prototype,"rowModel",2);c([M],wa.prototype,"postConstruct",1);wa=c([H("expansionService")],wa);var ki=class extends L{postConstruct(){var e;this.activeMenuFactory=(e=this.enterpriseMenuFactory)!=null?e:this.filterMenuFactory}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){const t=this.enterpriseMenuFactory&&this.isLegacyMenuEnabled()?this.enterpriseMenuFactory:this.filterMenuFactory;this.showColumnMenuCommon(t,e,e.containerType,!0)}showHeaderContextMenu(e,t,i){this.activeMenuFactory.showMenuAfterContextMenuEvent(e,t,i)}getContextMenuPosition(e,t){const i=this.getRowCtrl(e),s=this.getCellGui(i,t);if(!s)return i?{x:0,y:i.getRowYPosition()}:{x:0,y:0};const n=s.getBoundingClientRect();return{x:n.x+n.width/2,y:n.y+n.height/2}}showContextMenu(e){var t,i,s;const{column:n,rowNode:o}=e;let{anchorToElement:r,value:l}=e;o&&n&&l==null&&(l=o.getValueFromValueService(n)),r==null&&(r=this.getContextMenuAnchorElement(o,n)),(s=this.contextMenuFactory)==null||s.onContextMenu((t=e.mouseEvent)!=null?t:null,(i=e.touchEvent)!=null?i:null,o??null,n??null,l,r)}showColumnChooser(e){var t;(t=this.columnChooserFactory)==null||t.showColumnChooser(e)}hidePopupMenu(){var e;(e=this.contextMenuFactory)==null||e.hideActiveMenu(),this.activeMenuFactory.hideActiveMenu()}hideColumnChooser(){var e;(e=this.columnChooserFactory)==null||e.hideActiveColumnChooser()}isColumnMenuInHeaderEnabled(e){const{suppressMenu:t,suppressHeaderMenuButton:i}=e.getColDef();return!(i??t)&&this.activeMenuFactory.isMenuEnabled(e)&&(this.isLegacyMenuEnabled()||!!this.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&this.filterManager.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e!=null&&e.getColDef().suppressHeaderContextMenu)&&this.getColumnMenuType()==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(Us()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!this.isLegacyMenuEnabled()&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return this.filterManager.isFilterAllowed(e)&&!this.isLegacyMenuEnabled()&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isColumnMenuAnchoringEnabled(){return!this.isLegacyMenuEnabled()}areAdditionalColumnMenuItemsEnabled(){return this.getColumnMenuType()==="new"}isLegacyMenuEnabled(){return this.getColumnMenuType()==="legacy"}isFloatingFilterButtonEnabled(e){var t;const i=e.getColDef(),s=(t=i.floatingFilterComponentParams)==null?void 0:t.suppressFilterButton;return s!=null&&K("As of v31.1, 'colDef.floatingFilterComponentParams.suppressFilterButton' is deprecated. Use 'colDef.suppressFloatingFilterButton' instead."),i.suppressFloatingFilterButton==null?!s:!i.suppressFloatingFilterButton}getColumnMenuType(){var e;return(e=this.gos.get("columnMenu"))!=null?e:"legacy"}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos.get("suppressMenuHide");return this.isLegacyMenuEnabled()||this.gos.exists("suppressMenuHide")?e:!0}showColumnMenuCommon(e,t,i,s){const{column:n,positionBy:o}=t;if(o==="button"){const{buttonElement:r}=t;e.showMenuAfterButtonClick(n,r,i,s)}else if(o==="mouse"){const{mouseEvent:r}=t;e.showMenuAfterMouseEvent(n,r,i,s)}else n&&(this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(n,"auto"),this.animationFrameService.requestAnimationFrame(()=>{const r=this.ctrlsService.getHeaderRowContainerCtrl(n.getPinned()).getHeaderCtrlForColumn(n);e.showMenuAfterButtonClick(n,r.getAnchorElementForMenu(s),i,!0)}))}getRowCtrl(e){const{rowIndex:t,rowPinned:i}=e||{};if(t!=null)return this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i})||void 0}getCellGui(e,t){if(!e||!t)return;const i=e.getCellCtrl(t);return(i==null?void 0:i.getGui())||void 0}getContextMenuAnchorElement(e,t){const i=this.ctrlsService.getGridBodyCtrl().getGridBodyElement(),s=this.getRowCtrl(e);if(!s)return i;const n=this.getCellGui(s,t);return n||(s.isFullWidth()?s.getFullWidthElement():i)}};c([f("filterMenuFactory")],ki.prototype,"filterMenuFactory",2);c([f("ctrlsService")],ki.prototype,"ctrlsService",2);c([f("animationFrameService")],ki.prototype,"animationFrameService",2);c([f("filterManager")],ki.prototype,"filterManager",2);c([f("rowRenderer")],ki.prototype,"rowRenderer",2);c([fe("columnChooserFactory")],ki.prototype,"columnChooserFactory",2);c([fe("contextMenuFactory")],ki.prototype,"contextMenuFactory",2);c([fe("enterpriseMenuFactory")],ki.prototype,"enterpriseMenuFactory",2);c([M],ki.prototype,"postConstruct",1);ki=c([H("menuService")],ki);var wo=class extends L{postConstruct(){this.ctrlsService.whenReady(e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const i=this.getHeaderCellForColumn(e);if(!i)return-1;const s=this.rowRenderer.getAllCellsForColumn(e);return t||s.push(i),this.addElementsToContainerAndGetWidth(s)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.addElementsToContainerAndGetWidth([t]):-1}addElementsToContainerAndGetWidth(e){const t=document.createElement("form");t.style.position="fixed";const i=this.centerRowContainerCtrl.getContainerElement();e.forEach(o=>this.cloneItemIntoDummy(o,t)),i.appendChild(t);const s=t.offsetWidth;i.removeChild(t);const n=this.getAutoSizePadding();return s+n}getAutoSizePadding(){return this.gos.get("autoSizePadding")}getHeaderCellForColumn(e){let t=null;return this.ctrlsService.getHeaderRowContainerCtrls().forEach(i=>{const s=i.getHtmlElementForColumnHeader(e);s!=null&&(t=s)}),t}cloneItemIntoDummy(e,t){const i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";const s=document.createElement("div"),n=s.classList;["ag-header-cell","ag-header-group-cell"].some(l=>i.classList.contains(l))?(n.add("ag-header","ag-header-row"),s.style.position="static"):n.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(a=>r.classList.contains(a))){for(let a=0;a<r.classList.length;a++){const u=r.classList[a];u!="ag-row-position-absolute"&&n.add(u)}break}r=r.parentElement}s.appendChild(i),t.appendChild(s)}};c([f("rowRenderer")],wo.prototype,"rowRenderer",2);c([f("ctrlsService")],wo.prototype,"ctrlsService",2);c([f("rowCssClassCalculator")],wo.prototype,"rowCssClassCalculator",2);c([M],wo.prototype,"postConstruct",1);wo=c([H("autoWidthCalculator")],wo);var tu=class extends L{constructor(e,t){super(),this.createRowCon=e,this.destroyRowCtrls=t,this.stickyTopRowCtrls=[],this.stickyBottomRowCtrls=[],this.topContainerHeight=0,this.bottomContainerHeight=0}postConstruct(){this.isClientSide=this.rowModel.getType()==="clientSide",this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl})}getStickyTopRowCtrls(){return this.stickyTopRowCtrls}getStickyBottomRowCtrls(){return this.stickyBottomRowCtrls}getLastPixelOfGroup(e){return this.isClientSide?this.getClientSideLastPixelOfGroup(e):this.getServerSideLastPixelOfGroup(e)}getFirstPixelOfGroup(e){return e.footer?e.sibling.rowTop+e.sibling.rowHeight-1:e.hasChildren()?e.rowTop-1:0}getServerSideLastPixelOfGroup(e){var t,i,s,n;if(this.isClientSide)throw new Error("This func should only be called in server side row model.");if(e.isExpandable()||e.footer){if(e.master)return e.detailNode.rowTop+e.detailNode.rowHeight;if(!e.sibling||Math.abs(e.sibling.rowIndex-e.rowIndex)===1){let r=(t=e.childStore)==null?void 0:t.getStoreBounds();return e.footer&&(r=(i=e.sibling.childStore)==null?void 0:i.getStoreBounds()),((s=r==null?void 0:r.heightPx)!=null?s:0)+((n=r==null?void 0:r.topPx)!=null?n:0)}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}getClientSideLastPixelOfGroup(e){if(!this.isClientSide)throw new Error("This func should only be called in client side row model.");if(e.isExpandable()||e.footer){const t=e.footer&&e.rowIndex===0,i=!e.sibling||Math.abs(e.sibling.rowIndex-e.rowIndex)===1;if(t||i){let s=e.footer?e.sibling:e;for(;s.isExpandable()&&s.expanded;)if(s.master)s=s.detailNode;else if(s.childrenAfterSort){if(s.childrenAfterSort.length===0)break;s=de(s.childrenAfterSort)}return s.rowTop+s.rowHeight}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}updateStickyRows(e){const t=e==="top";let i=0;if(!this.canRowsBeSticky())return this.refreshNodesAndContainerHeight(e,new Set,i);const s=t?this.rowRenderer.getFirstVisibleVerticalPixel():this.rowRenderer.getLastVisibleVerticalPixel(),n=new Set,o=u=>{if(n.add(u),t){const d=this.getLastPixelOfGroup(u),h=s+i+u.rowHeight;d<h?u.stickyRowTop=i+(d-h):u.stickyRowTop=i}else{const d=this.getFirstPixelOfGroup(u),h=s-(i+u.rowHeight);d>h?u.stickyRowTop=i-(d-h):u.stickyRowTop=i}i=0,n.forEach(d=>{const h=d.stickyRowTop+d.rowHeight;i<h&&(i=h)})},r=this.areFooterRowsStickySuppressed(),l=this.gos.get("suppressGroupRowsSticky"),a=u=>u.displayed?u.footer?r===!0||r==="grand"&&u.level===-1||r==="group"&&u.level>-1?!1:!n.has(u):u.isExpandable()?l===!0?!1:!n.has(u)&&u.expanded:!1:!1;for(let u=0;u<100;u++){let d=s+i;t||(d=s-i);const h=this.rowModel.getRowIndexAtPixel(d),p=this.rowModel.getRow(h);if(p==null)break;const v=this.getStickyAncestors(p).find(R=>(t?R.rowIndex<h:R.rowIndex>h)&&a(R));if(v){o(v);continue}if((t?p.rowTop<d:p.rowTop+p.rowHeight>d)&&a(p)){o(p);continue}break}return t||n.forEach(u=>{u.stickyRowTop=i-(u.stickyRowTop+u.rowHeight)}),this.refreshNodesAndContainerHeight(e,n,i)}areFooterRowsStickySuppressed(){const e=this.gos.get("suppressStickyTotalRow");if(e===!0)return!0;const t=!!this.gos.get("groupIncludeFooter")||e==="group",i=!!this.gos.get("groupIncludeTotalFooter")||e==="grand";return t&&i?!0:i?"grand":t?"group":!1}canRowsBeSticky(){const e=this.gos.isGroupRowsSticky(),t=this.areFooterRowsStickySuppressed(),i=this.gos.get("suppressGroupRowsSticky");return e&&(!t||!i)}getStickyAncestors(e){const t=[];let i=e.footer?e.sibling:e.parent;for(;i;)i.sibling&&t.push(i.sibling),t.push(i),i=i.parent;return t.reverse()}checkStickyRows(){const e=this.updateStickyRows("top"),t=this.updateStickyRows("bottom");return e||t}destroyStickyCtrls(){this.refreshNodesAndContainerHeight("top",new Set,0),this.refreshNodesAndContainerHeight("bottom",new Set,0)}refreshStickyNode(e){const t=new Set;if(this.stickyTopRowCtrls.some(i=>i.getRowNode()===e)){for(let i=0;i<this.stickyTopRowCtrls.length;i++){const s=this.stickyTopRowCtrls[i].getRowNode();s!==e&&t.add(s)}this.refreshNodesAndContainerHeight("top",t,this.topContainerHeight)&&this.checkStickyRows();return}for(let i=0;i<this.stickyBottomRowCtrls.length;i++){const s=this.stickyBottomRowCtrls[i].getRowNode();s!==e&&t.add(s)}this.refreshNodesAndContainerHeight("bottom",t,this.bottomContainerHeight)&&this.checkStickyRows()}refreshNodesAndContainerHeight(e,t,i){const s=e==="top",n=s?this.stickyTopRowCtrls:this.stickyBottomRowCtrls,o={},r=[];for(let h=0;h<n.length;h++){const p=n[h].getRowNode();if(!t.has(p)){o[p.id]=n[h],p.sticky=!1;continue}r.push(n[h])}const l=new Set;for(let h=0;h<r.length;h++)l.add(r[h].getRowNode());const a=[];t.forEach(h=>{l.has(h)||(h.sticky=!0,a.push(this.createRowCon(h,!1,!1)))});let u=!!a.length||r.length!==n.length;s?this.topContainerHeight!==i&&(this.topContainerHeight=i,this.gridBodyCtrl.setStickyTopHeight(i),u=!0):this.bottomContainerHeight!==i&&(this.bottomContainerHeight=i,this.gridBodyCtrl.setStickyBottomHeight(i),u=!0),this.destroyRowCtrls(o,!1);const d=[...r,...a];return d.sort((h,p)=>p.getRowNode().rowIndex-h.getRowNode().rowIndex),s||d.reverse(),d.forEach(h=>h.setRowTop(h.getRowNode().stickyRowTop)),u?(s?this.stickyTopRowCtrls=d:this.stickyBottomRowCtrls=d,!0):!1}};c([f("rowModel")],tu.prototype,"rowModel",2);c([f("rowRenderer")],tu.prototype,"rowRenderer",2);c([f("ctrlsService")],tu.prototype,"ctrlsService",2);c([M],tu.prototype,"postConstruct",1);var Si=class extends L{constructor(){super(...arguments),this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{this.getAllCellCtrls().forEach(o=>o.onRangeSelectionChanged())},t=()=>{this.getAllCellCtrls().forEach(o=>o.updateRangeBordersIfRangeCount())},i=()=>{this.eventService.addEventListener(g.EVENT_RANGE_SELECTION_CHANGED,e),this.eventService.addEventListener(g.EVENT_COLUMN_MOVED,t),this.eventService.addEventListener(g.EVENT_COLUMN_PINNED,t),this.eventService.addEventListener(g.EVENT_COLUMN_VISIBLE,t)},s=()=>{this.eventService.removeEventListener(g.EVENT_RANGE_SELECTION_CHANGED,e),this.eventService.removeEventListener(g.EVENT_COLUMN_MOVED,t),this.eventService.removeEventListener(g.EVENT_COLUMN_PINNED,t),this.eventService.removeEventListener(g.EVENT_COLUMN_VISIBLE,t)};this.addDestroyFunc(()=>s()),this.addManagedPropertyListener("enableRangeSelection",o=>{o.currentValue?i():s()}),this.gos.get("enableRangeSelection")&&i()}}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){if(this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,this.onPageLoaded.bind(this)),this.addManagedListener(this.eventService,g.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,this.onBodyScroll.bind(this)),this.addManagedListener(this.eventService,g.EVENT_BODY_HEIGHT_CHANGED,this.redraw.bind(this)),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListeners(["suppressCellFocus","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.gos.isGroupRowsSticky()){const e=this.rowModel.getType();(e==="clientSide"||e==="serverSide")&&(this.stickyRowFeature=this.createManagedBean(new tu(this.createRowCon.bind(this),this.destroyRowCtrls.bind(this))))}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=this.gos.isDomLayout("print"),this.embedFullWidthRows=this.printLayout||this.gos.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new vL(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyTopRowCtrls():[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyBottomRowCtrls():[]}updateAllRowCtrls(){const e=yn(this.rowCtrlsByRowIndex),t=yn(this.zombieRowCtrls),i=this.cachedRowCtrls?this.cachedRowCtrls.getEntries():[];t.length>0||i.length>0?this.allRowCtrls=[...e,...t,...i]:this.allRowCtrls=e}onCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e))}registerCellEventListeners(){this.addManagedListener(this.eventService,g.EVENT_CELL_FOCUSED,e=>{this.onCellFocusChanged(e)}),this.addManagedListener(this.eventService,g.EVENT_CELL_FOCUS_CLEARED,()=>{this.onCellFocusChanged()}),this.addManagedListener(this.eventService,g.EVENT_FLASH_CELLS,e=>{this.getAllCellCtrls().forEach(t=>t.onFlashCells(e))}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_HOVER_CHANGED,()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())}),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())}),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedListener(this.eventService,g.EVENT_GRID_COLUMNS_CHANGED,this.refreshListenersToColumnsForCellComps.bind(this)),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.columnModel.getAllGridColumns().forEach(t=>{const i=a=>{this.getAllCellCtrls().forEach(u=>{u.getColumn()===t&&a(u)})},s=()=>{i(a=>a.onLeftChanged())},n=()=>{i(a=>a.onWidthChanged())},o=()=>{i(a=>a.onFirstRightPinnedChanged())},r=()=>{i(a=>a.onLastLeftPinnedChanged())},l=()=>{i(a=>a.onColDefChanged())};t.addEventListener("leftChanged",s),t.addEventListener("widthChanged",n),t.addEventListener("firstRightPinnedChanged",o),t.addEventListener("lastLeftPinnedChanged",r),t.addEventListener("colDefChanged",l),this.destroyFuncsForColumnListeners.push(()=>{t.removeEventListener("leftChanged",s),t.removeEventListener("widthChanged",n),t.removeEventListener("firstRightPinnedChanged",o),t.removeEventListener("lastLeftPinnedChanged",r),t.removeEventListener("colDefChanged",l)})})}onDomLayoutChanged(){const e=this.gos.isDomLayout("print"),t=e||this.gos.get("embedFullWidthRows"),i=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,i&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsForColumn(e){const t=[];return this.getAllRowCtrls().forEach(i=>{const s=i.getCellElement(e);s&&t.push(s)}),t}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,this.pinnedRowModel.getPinnedTopRowData()),this.refreshFloatingRows(this.bottomRowCtrls,this.pinnedRowModel.getPinnedBottomRowData())}getTopRowCtrls(){return this.topRowCtrls}getCentreRowCtrls(){return this.allRowCtrls}getBottomRowCtrls(){return this.bottomRowCtrls}refreshFloatingRows(e,t){e.forEach(i=>{i.destroyFirstPass(),i.destroySecondPass()}),e.length=0,t&&t.forEach(i=>{const s=new lo(i,this.beans,!1,!1,this.printLayout);e.push(s)})}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}redrawRow(e,t=!1){var i;if(e.sticky)this.stickyRowFeature.refreshStickyNode(e);else if((i=this.cachedRowCtrls)!=null&&i.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const s=n=>{const o=n[e.rowIndex];o&&o.getRowNode()===e&&(o.destroyFirstPass(),o.destroySecondPass(),n[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":s(this.topRowCtrls);break;case"bottom":s(this.bottomRowCtrls);break;default:s(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){if(e!=null){e==null||e.forEach(i=>this.redrawRow(i,!0)),this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}getCellToRestoreFocusToAfterRefresh(e){const t=e!=null&&e.suppressKeepFocus?null:this.focusService.getFocusCellToUseAfterRefresh();if(t==null)return null;const i=this.gos.getActiveDomElement(),s=this.gos.getDomData(i,ro.DOM_DATA_KEY_CELL_CTRL),n=this.gos.getDomData(i,lo.DOM_DATA_KEY_ROW_CTRL);return s||n?t:null}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.getCellToRestoreFocusToAfterRefresh(e);this.updateContainerHeights(),this.scrollToTopIfNewData(e);const i=!e.domLayoutChanged&&!!e.recycleRows,s=e.animate&&this.gos.isAnimateRows(),n=i?this.getRowsToRecycle():null;i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender(),this.stickyRowFeature&&this.stickyRowFeature.checkStickyRows(),this.recycleRows(n,s),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,i=this.gos.get("suppressScrollOnNewData");t&&!i&&this.gridBodyCtrl.getScrollFeature().scrollToTop()}updateContainerHeights(){if(this.printLayout){this.rowContainerHeightService.setModelHeight(null);return}let e=this.paginationProxy.getCurrentPageHeight();e===0&&(e=1),this.rowContainerHeightService.setModelHeight(e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error("AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). To see what part of your code that caused the refresh check this stacktrace.");this.refreshInProgress=!0}releaseLockOnRefresh(){this.refreshInProgress=!1}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){e&&(this.focusService.setRestoreFocusedCell(e),this.onCellFocusChanged(this.beans.gos.addGridCommonParams({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"mock"})))}stopEditing(e=!1){this.getAllRowCtrls().forEach(t=>{t.stopEditing(e)})}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),i=t.length;for(let s=0;s<i;s++){const n=t[s].getAllCellCtrls(),o=n.length;for(let r=0;r<o;r++)e.push(n[r])}return e}getAllRowCtrls(){const e=this.stickyRowFeature&&this.stickyRowFeature.getStickyTopRowCtrls()||[],t=this.stickyRowFeature&&this.stickyRowFeature.getStickyBottomRowCtrls()||[],i=[...this.topRowCtrls,...this.bottomRowCtrls,...e,...t];for(const s in this.rowCtrlsByRowIndex)i.push(this.rowCtrlsByRowIndex[s]);return i}addRenderedRowListener(e,t,i){const s=this.rowCtrlsByRowIndex[t];s&&s.addEventListener(e,i)}flashCells(e={}){this.getCellCtrls(e.rowNodes,e.columns).forEach(t=>t.flashCell(e))}refreshCells(e={}){const t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};this.getCellCtrls(e.rowNodes,e.columns).forEach(i=>i.refreshOrDestroyCell(t)),e.rowNodes&&(this.getRowCtrls(e.rowNodes).forEach(i=>{if(!i.isFullWidth())return;i.refreshFullWidth()||this.redrawRow(i.getRowNode(),!0)}),this.dispatchDisplayedRowsChanged(!1))}getCellRendererInstances(e){var t;const i=this.getCellCtrls(e.rowNodes,e.columns).map(o=>o.getCellRenderer()).filter(o=>o!=null);if((t=e.columns)!=null&&t.length)return i;const s=[],n=this.mapRowNodes(e.rowNodes);return this.getAllRowCtrls().forEach(o=>{if(n&&!this.isRowInMap(o.getRowNode(),n)||!o.isFullWidth())return;const r=o.getFullWidthCellRenderers();for(let l=0;l<r.length;l++){const a=r[l];a!=null&&s.push(a)}}),[...s,...i]}getCellEditorInstances(e){const t=[];return this.getCellCtrls(e.rowNodes,e.columns).forEach(i=>{const s=i.getCellEditor();s&&t.push(s)}),t}getEditingCells(){const e=[];return this.getAllCellCtrls().forEach(t=>{if(t.isEditing()){const i=t.getCellPosition();e.push(i)}}),e}mapRowNodes(e){if(!e)return;const t={top:{},bottom:{},normal:{}};return e.forEach(i=>{const s=i.id;switch(i.rowPinned){case"top":t.top[s]=i;break;case"bottom":t.bottom[s]=i;break;default:t.normal[s]=i;break}}),t}isRowInMap(e,t){const i=e.id;switch(e.rowPinned){case"top":return t.top[i]!=null;case"bottom":return t.bottom[i]!=null;default:return t.normal[i]!=null}}getRowCtrls(e){const t=this.mapRowNodes(e),i=this.getAllRowCtrls();return!e||!t?i:i.filter(s=>{const n=s.getRowNode();return this.isRowInMap(n,t)})}getCellCtrls(e,t){let i;b(t)&&(i={},t.forEach(n=>{const o=this.columnModel.getGridColumn(n);b(o)&&(i[o.getId()]=!0)}));const s=[];return this.getRowCtrls(e).forEach(n=>{n.getAllCellCtrls().forEach(o=>{const r=o.getColumn().getId();i&&!i[r]||s.push(o)})}),s}destroy(){this.removeAllRowComps(),super.destroy()}removeAllRowComps(){const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e),this.stickyRowFeature&&this.stickyRowFeature.destroyStickyCtrls()}getRowsToRecycle(){const e=[];Ft(this.rowCtrlsByRowIndex,(i,s)=>{s.getRowNode().id==null&&e.push(i)}),this.removeRowCtrls(e);const t={};return Ft(this.rowCtrlsByRowIndex,(i,s)=>{const n=s.getRowNode();t[n.id]=s}),this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){e.forEach(i=>{const s=this.rowCtrlsByRowIndex[i];s&&(s.destroyFirstPass(t),s.destroySecondPass()),delete this.rowCtrlsByRowIndex[i]})}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{afterScroll:t}=e;let i;this.stickyRowFeature&&em()&&(i=this.getCellToRestoreFocusToAfterRefresh()||void 0);const s=this.firstRenderedRow,n=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let o=!1;this.stickyRowFeature&&(o=this.stickyRowFeature.checkStickyRows());const r=this.firstRenderedRow!==s||this.lastRenderedRow!==n;if(!(t&&!o&&!r)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,t),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(t&&!o),i!=null)){const l=this.getCellToRestoreFocusToAfterRefresh();i!=null&&l==null&&(this.animationFrameService.flushAllFrames(),this.restoreFocusedCell(i))}}removeRowCompsNotToDraw(e,t){const i={};e.forEach(o=>i[o]=!0);const n=Object.keys(this.rowCtrlsByRowIndex).filter(o=>!i[o]);this.removeRowCtrls(n,t)}calculateIndexesToDraw(e){let t=$E(this.firstRenderedRow,this.lastRenderedRow);const i=(n,o)=>{const r=o.getRowNode().rowIndex;r!=null&&(r<this.firstRenderedRow||r>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(o)&&t.push(r)};Ft(this.rowCtrlsByRowIndex,i),Ft(e,i),t.sort((n,o)=>n-o);const s=[];for(let n=0;n<t.length;n++){const o=t[n],r=this.paginationProxy.getRow(o);r&&!r.sticky&&s.push(o)}return s}recycleRows(e,t=!1,i=!1){const s=this.calculateIndexesToDraw(e);(this.printLayout||i)&&(t=!1),this.removeRowCompsNotToDraw(s,!t),s.forEach(n=>{this.createOrUpdateRowCtrl(n,e,t,i)}),e&&(i&&!this.gos.get("suppressAnimationFrame")&&!this.printLayout?this.beans.animationFrameService.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)),this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){const t={type:g.EVENT_DISPLAYED_ROWS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(t)}onDisplayedColumnsChanged(){const e=this.columnModel.isPinningLeft(),t=this.columnModel.isPinningRight();(this.pinningLeft!==e||t!==this.pinningRight)&&(this.pinningLeft=e,this.pinningRight=t,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];this.getFullWidthRowCtrls().forEach(t=>{const i=t.getRowNode().rowIndex;e.push(i.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=this.mapRowNodes(e);return this.getAllRowCtrls().filter(i=>{if(!i.isFullWidth())return!1;const s=i.getRowNode();return!(t!=null&&!this.isRowInMap(s,t))})}createOrUpdateRowCtrl(e,t,i,s){let n,o=this.rowCtrlsByRowIndex[e];if(o||(n=this.paginationProxy.getRow(e),b(n)&&b(t)&&t[n.id]&&n.alreadyRendered&&(o=t[n.id],t[n.id]=null)),!o)if(n||(n=this.paginationProxy.getRow(e)),b(n))o=this.createRowCon(n,i,s);else return;return n&&(n.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=o,o}destroyRowCtrls(e,t){const i=[];Ft(e,(s,n)=>{if(n){if(this.cachedRowCtrls&&n.isCacheable()){this.cachedRowCtrls.addRow(n);return}n.destroyFirstPass(!t),t?(this.zombieRowCtrls[n.getInstanceId()]=n,i.push(()=>{n.destroySecondPass(),delete this.zombieRowCtrls[n.getInstanceId()]})):n.destroySecondPass()}}),t&&(i.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),ZS(i))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=this.gos.getRowHeightAsNumber();return e*t}workOutFirstAndLastRowsToRender(){this.rowContainerHeightService.updateOffset();let e,t;if(!this.paginationProxy.isRowsToRender())e=0,t=-1;else if(this.printLayout)this.environment.refreshRowHeightVariable(),e=this.paginationProxy.getPageFirstRow(),t=this.paginationProxy.getPageLastRow();else{const l=this.getRowBufferInPixels(),a=this.ctrlsService.getGridBodyCtrl(),u=this.gos.get("suppressRowVirtualisation");let d=!1,h,p;do{const w=this.paginationProxy.getPixelOffset(),{pageFirstPixel:m,pageLastPixel:E}=this.paginationProxy.getCurrentPagePixelRange(),T=this.rowContainerHeightService.getDivStretchOffset(),P=a.getScrollFeature().getVScrollPosition(),A=P.top,F=P.bottom;u?(h=m+T,p=E+T):(h=Math.max(A+w-l,m)+T,p=Math.min(F+w+l,E)+T),this.firstVisibleVPixel=Math.max(A+w,m)+T,this.lastVisibleVPixel=Math.min(F+w,E)+T,d=this.ensureAllRowsInRangeHaveHeightsCalculated(h,p)}while(d);let C=this.paginationProxy.getRowIndexAtPixel(h),v=this.paginationProxy.getRowIndexAtPixel(p);const y=this.paginationProxy.getPageFirstRow(),R=this.paginationProxy.getPageLastRow();C<y&&(C=y),v>R&&(v=R),e=C,t=v}const i=this.gos.isDomLayout("normal"),s=this.gos.get("suppressMaxRenderedRowRestriction"),n=Math.max(this.getRowBuffer(),500);i&&!s&&t-e>n&&(t=e+n);const o=e!==this.firstRenderedRow,r=t!==this.lastRenderedRow;if(o||r){this.firstRenderedRow=e,this.lastRenderedRow=t;const l={type:g.EVENT_VIEWPORT_CHANGED,firstRow:e,lastRow:t};this.eventService.dispatchEvent(l)}}dispatchFirstDataRenderedEvent(){if(this.dataFirstRenderedFired)return;this.dataFirstRenderedFired=!0;const e={type:g.EVENT_FIRST_DATA_RENDERED,firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow};window.requestAnimationFrame(()=>{this.beans.eventService.dispatchEvent(e)})}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const i=this.paginationProxy.ensureRowHeightsValid(e,t,-1,-1);return i&&this.updateContainerHeights(),i}getFirstVisibleVerticalPixel(){return this.firstVisibleVPixel}getLastVisibleVerticalPixel(){return this.lastVisibleVPixel}getFirstVirtualRenderedRow(){return this.firstRenderedRow}getLastVirtualRenderedRow(){return this.lastRenderedRow}doNotUnVirtualiseRow(e){const s=e.getRowNode(),n=this.focusService.isRowNodeFocused(s),o=e.isEditing(),r=s.detail;return n||o||r?!!this.paginationProxy.isRowPresent(s):!1}createRowCon(e,t,i){const s=this.cachedRowCtrls?this.cachedRowCtrls.getRow(e):null;if(s)return s;const n=this.gos.get("suppressAnimationFrame"),o=i&&!n&&!this.printLayout;return new lo(e,this.beans,t,o,this.printLayout)}getRenderedNodes(){const e=this.rowCtrlsByRowIndex;return Object.values(e).map(t=>t.getRowNode())}getRowByPosition(e){let t;const{rowIndex:i}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[i];break;case"bottom":t=this.bottomRowCtrls[i];break;default:t=this.rowCtrlsByRowIndex[i],t||(t=this.getStickyTopRowCtrls().find(s=>s.getRowNode().rowIndex===i)||null,t||(t=this.getStickyBottomRowCtrls().find(s=>s.getRowNode().rowIndex===i)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const s=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!s}};c([f("animationFrameService")],Si.prototype,"animationFrameService",2);c([f("paginationProxy")],Si.prototype,"paginationProxy",2);c([f("columnModel")],Si.prototype,"columnModel",2);c([f("pinnedRowModel")],Si.prototype,"pinnedRowModel",2);c([f("rowModel")],Si.prototype,"rowModel",2);c([f("focusService")],Si.prototype,"focusService",2);c([f("beans")],Si.prototype,"beans",2);c([f("rowContainerHeightService")],Si.prototype,"rowContainerHeightService",2);c([f("ctrlsService")],Si.prototype,"ctrlsService",2);c([M],Si.prototype,"postConstruct",1);Si=c([H("rowRenderer")],Si);var vL=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.getRowNode().id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e==null||e.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.getRowNode()!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,i=this.entriesMap[t];delete this.entriesMap[t],Qt(this.entriesList,i)}removeFromCache(e){const t=e.getRowNode().id;delete this.entriesMap[t],Qt(this.entriesList,e)}getEntries(){return this.entriesList}},ya=class extends L{init(){this.setPinnedTopRowData(),this.setPinnedBottomRowData(),this.addManagedPropertyListener("pinnedTopRowData",()=>this.setPinnedTopRowData()),this.addManagedPropertyListener("pinnedBottomRowData",()=>this.setPinnedBottomRowData())}isEmpty(e){const t=e==="top"?this.pinnedTopRows:this.pinnedBottomRows;return Ai(t)}isRowsToRender(e){return!this.isEmpty(e)}getRowAtPixel(e,t){const i=t==="top"?this.pinnedTopRows:this.pinnedBottomRows;if(Ai(i))return 0;for(let s=0;s<i.length;s++){const n=i[s];if(n.rowTop+n.rowHeight-1>=e)return s}return i.length-1}setPinnedTopRowData(){const e=this.gos.get("pinnedTopRowData");this.pinnedTopRows=this.createNodesFromData(e,!0);const t={type:g.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(t)}setPinnedBottomRowData(){const e=this.gos.get("pinnedBottomRowData");this.pinnedBottomRows=this.createNodesFromData(e,!1);const t={type:g.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(t)}createNodesFromData(e,t){const i=[];if(e){let s=0;e.forEach((n,o)=>{const r=new se(this.beans);r.data=n;const l=t?se.ID_PREFIX_TOP_PINNED:se.ID_PREFIX_BOTTOM_PINNED;r.id=l+o,r.rowPinned=t?"top":"bottom",r.setRowTop(s),r.setRowHeight(this.gos.getRowHeightForNode(r).height),r.setRowIndex(o),s+=r.rowHeight,i.push(r)})}return i}getPinnedTopRowData(){return this.pinnedTopRows}getPinnedBottomRowData(){return this.pinnedBottomRows}getPinnedTopTotalHeight(){return this.getTotalHeight(this.pinnedTopRows)}getPinnedTopRowCount(){return this.pinnedTopRows?this.pinnedTopRows.length:0}getPinnedBottomRowCount(){return this.pinnedBottomRows?this.pinnedBottomRows.length:0}getPinnedTopRow(e){return this.pinnedTopRows[e]}getPinnedBottomRow(e){return this.pinnedBottomRows[e]}forEachPinnedTopRow(e){Ai(this.pinnedTopRows)||this.pinnedTopRows.forEach(e)}forEachPinnedBottomRow(e){Ai(this.pinnedBottomRows)||this.pinnedBottomRows.forEach(e)}getPinnedBottomTotalHeight(){return this.getTotalHeight(this.pinnedBottomRows)}getTotalHeight(e){if(!e||e.length===0)return 0;const t=de(e);return t.rowTop+t.rowHeight}};c([f("beans")],ya.prototype,"beans",2);c([M],ya.prototype,"init",1);ya=c([H("pinnedRowModel")],ya);var th=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}setInactive(){this.active=!1}isActive(){return this.active}depthFirstSearchChangedPath(e,t){if(e.children)for(let i=0;i<e.children.length;i++)this.depthFirstSearchChangedPath(e.children[i],t);t(e.rowNode)}depthFirstSearchEverything(e,t,i){if(e.childrenAfterGroup)for(let s=0;s<e.childrenAfterGroup.length;s++){const n=e.childrenAfterGroup[s];n.childrenAfterGroup?this.depthFirstSearchEverything(e.childrenAfterGroup[s],t,i):i&&t(n)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,i=!1){this.active&&!i?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,i=0;for(;!this.mapToItems[t.id];){const s={rowNode:t,children:null};this.mapToItems[t.id]=s,i++,t=t.parent}return i}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let i=e;for(;i;)this.nodeIdsToColumns[i.id]||(this.nodeIdsToColumns[i.id]={}),t.forEach(s=>this.nodeIdsToColumns[i.id][s.getId()]=!0),i=i.parent}linkPathItems(e,t){let i=e;for(let s=0;s<t;s++){const n=this.mapToItems[i.id],o=this.mapToItems[i.parent.id];o.children||(o.children=[]),o.children.push(n),i=i.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const i=this.createPathItems(e);this.linkPathItems(e,i),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const i=this.nodeIdsToColumns[e.id];return t.filter(n=>i[n.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const i=this.nodeIdsToColumns[e.id];return t.filter(n=>!i[n.getId()])}},Zr=class Un extends L{constructor(t){super(),this.state=Un.STATE_WAITING_TO_LOAD,this.version=0,this.id=t}getId(){return this.id}load(){this.state=Un.STATE_LOADING,this.loadFromDatasource()}getVersion(){return this.version}setStateWaitingToLoad(){this.version++,this.state=Un.STATE_WAITING_TO_LOAD}getState(){return this.state}pageLoadFailed(t){this.isRequestMostRecentAndLive(t)&&(this.state=Un.STATE_FAILED,this.processServerFail()),this.dispatchLoadCompleted(!1)}success(t,i){this.successCommon(t,i)}pageLoaded(t,i,s){this.successCommon(t,{rowData:i,rowCount:s})}isRequestMostRecentAndLive(t){const i=t===this.version,s=this.isAlive();return i&&s}successCommon(t,i){this.dispatchLoadCompleted(),this.isRequestMostRecentAndLive(t)&&(this.state=Un.STATE_LOADED,this.processServerResult(i))}dispatchLoadCompleted(t=!0){const i={type:Un.EVENT_LOAD_COMPLETE,success:t,block:this};this.dispatchEvent(i)}};Zr.EVENT_LOAD_COMPLETE="loadComplete";Zr.STATE_WAITING_TO_LOAD="needsLoading";Zr.STATE_LOADING="loading";Zr.STATE_LOADED="loaded";Zr.STATE_FAILED="failed";var Rg=Zr,ys=class extends L{constructor(){super(...arguments),this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=this.getMaxConcurrentDatasourceRequests();const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=Q.debounce(this.performCheckBlocksToLoad.bind(this),e))}setBeans(e){this.logger=e.create("RowNodeBlockLoader")}getMaxConcurrentDatasourceRequests(){const e=this.gos.get("maxConcurrentDatasourceRequests");if(e==null)return 2;if(!(e<=0))return e}addBlock(e){this.blocks.push(e),e.addEventListener(Rg.EVENT_LOAD_COMPLETE,this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Q.removeFromArray(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad(),this.dispatchEvent({type:ys.BLOCK_LOADED_EVENT}),this.activeBlockLoadsCount==0&&this.dispatchEvent({type:ys.BLOCK_LOADER_FINISHED_EVENT})}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){this.logger.log("checkBlockToLoad: max loads exceeded");return}const e=this.getAvailableLoadingCount(),t=this.blocks.filter(i=>i.getState()===Rg.STATE_WAITING_TO_LOAD).slice(0,e);this.registerLoads(t.length),t.forEach(i=>i.load()),this.printCacheStatus()}getBlockState(){if(this.gos.isRowModelType("serverSide"))return this.rowModel.getBlockStates();const e={};return this.blocks.forEach(t=>{const{id:i,state:s}=t.getBlockStateJson();e[i]=s}),e}printCacheStatus(){this.logger.isLogging()&&this.logger.log(`printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}isLoading(){return this.activeBlockLoadsCount>0}registerLoads(e){this.activeBlockLoadsCount+=e}getAvailableLoadingCount(){return this.maxConcurrentRequests!==void 0?this.maxConcurrentRequests-this.activeBlockLoadsCount:void 0}};ys.BLOCK_LOADED_EVENT="blockLoaded";ys.BLOCK_LOADER_FINISHED_EVENT="blockLoaderFinished";c([f("rowModel")],ys.prototype,"rowModel",2);c([M],ys.prototype,"postConstruct",1);c([Qi(0,Li("loggerFactory"))],ys.prototype,"setBeans",1);ys=c([H("rowNodeBlockLoader")],ys);var Sa=class extends L{constructor(){super(...arguments),this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.pixelOffset=0,this.masterRowCount=0}postConstruct(){this.active=this.gos.get("pagination"),this.pageSizeFromGridOptions=this.gos.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedListener(this.eventService,g.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this)),this.onModelUpdated()}ensureRowHeightsValid(e,t,i,s){const n=this.rowModel.ensureRowHeightsValid(e,t,this.getPageFirstRow(),this.getPageLastRow());return n&&this.calculatePages(),n}isPaginateChildRows(){return this.gos.get("groupRemoveSingleChildren")||this.gos.get("groupRemoveLowestSingleChildren")?!0:this.gos.get("paginateChildRows")}onModelUpdated(e){this.calculatePages();const t={type:g.EVENT_PAGINATION_CHANGED,animate:e?e.animate:!1,newData:e?e.newData:!1,newPage:e?e.newPage:!1,newPageSize:e?e.newPageSize:!1,keepRenderedRows:e?e.keepRenderedRows:!1};this.eventService.dispatchEvent(t)}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages();const e={type:g.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!1,keepRenderedRows:!0};this.eventService.dispatchEvent(e)}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){if(!this.active||this.currentPage===e||typeof this.currentPage!="number")return;this.currentPage=e,this.calculatePages();const t={type:g.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!0,newPageSize:!1,keepRenderedRows:!1};this.eventService.dispatchEvent(t)}getPixelOffset(){return this.pixelOffset}getRow(e){return this.rowModel.getRow(e)}getRowNode(e){return this.rowModel.getRowNode(e)}getRowIndexAtPixel(e){return this.rowModel.getRowIndexAtPixel(e)}getCurrentPageHeight(){return q(this.topRowBounds)||q(this.bottomRowBounds)?0:Math.max(this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop,0)}getCurrentPagePixelRange(){const e=this.topRowBounds?this.topRowBounds.rowTop:0,t=this.bottomRowBounds?this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight:0;return{pageFirstPixel:e,pageLastPixel:t}}isRowPresent(e){return this.rowModel.isRowPresent(e)?e.rowIndex>=this.topDisplayedRowIndex&&e.rowIndex<=this.bottomDisplayedRowIndex:!1}isEmpty(){return this.rowModel.isEmpty()}isRowsToRender(){return this.rowModel.isRowsToRender()}forEachNode(e){return this.rowModel.forEachNode(e)}forEachNodeOnPage(e){const t=this.getPageFirstRow(),i=this.getPageLastRow();for(let s=t;s<=i;s++){const n=this.getRow(s);n&&e(n)}}getType(){return this.rowModel.getType()}getRowBounds(e){const t=this.rowModel.getRowBounds(e);return t.rowIndex=e,t}getPageFirstRow(){return this.topRowBounds?this.topRowBounds.rowIndex:-1}getPageLastRow(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1}getRowCount(){return this.rowModel.getRowCount()}getPageForIndex(e){return Math.floor(e/this.pageSize)}goToPageWithIndex(e){if(!this.active)return;const t=this.getPageForIndex(e);this.goToPage(t)}isRowInPage(e){return this.active?this.getPageForIndex(e.rowIndex)===this.currentPage:!0}isLastPageFound(){return this.rowModel.isLastRowIndexKnown()}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return b(this.pageSizeAutoCalculated)?this.pageSizeAutoCalculated:b(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:b(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:b(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;if(this.pageSizeAutoCalculated=void 0,this.pageSize===e)return;this.calculatePages();const t={type:g.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!0,keepRenderedRows:!1};this.eventService.dispatchEvent(t)}setPageSize(e,t){const i=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}if(i!==this.pageSize){this.calculatePages();const s={type:g.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!0,keepRenderedRows:!0};this.eventService.dispatchEvent(s)}}calculatePages(){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(b(this.topRowBounds)?this.topRowBounds.rowTop:0)}setPixelOffset(e){this.pixelOffset!==e&&(this.pixelOffset=e,this.eventService.dispatchEvent({type:g.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!isFinite(this.currentPage)||isNaN(this.currentPage)||this.currentPage<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){if(this.masterRowCount=this.rowModel.getTopLevelRowCount(),this.masterRowCount<=0){this.setZeroRows();return}const e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid();const t=this.pageSize*this.currentPage;let i=this.pageSize*(this.currentPage+1)-1;if(i>e&&(i=e),this.topDisplayedRowIndex=this.rowModel.getTopLevelRowDisplayedIndex(t),i===e)this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1;else{const s=this.rowModel.getTopLevelRowDisplayedIndex(i+1);this.bottomDisplayedRowIndex=s-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){if(this.masterRowCount=this.rowModel.getRowCount(),this.masterRowCount===0){this.setZeroRows();return}const e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=this.pageSize*this.currentPage,this.bottomDisplayedRowIndex=this.pageSize*(this.currentPage+1)-1,this.bottomDisplayedRowIndex>e&&(this.bottomDisplayedRowIndex=e)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1}};c([f("rowModel")],Sa.prototype,"rowModel",2);c([M],Sa.prototype,"postConstruct",1);Sa=c([H("paginationProxy")],Sa);var zd=class extends L{processAllCellClasses(e,t,i,s){this.processClassRules(void 0,e.cellClassRules,t,i,s),this.processStaticCellClasses(e,t,i)}processClassRules(e,t,i,s,n){if(t==null&&e==null)return;const o={},r={},l=(a,u)=>{a.split(" ").forEach(d=>{d.trim()!=""&&u(d)})};if(t){const a=Object.keys(t);for(let u=0;u<a.length;u++){const d=a[u],h=t[d];let p;typeof h=="string"?p=this.expressionService.evaluate(h,i):typeof h=="function"&&(p=h(i)),l(d,C=>{p?o[C]=!0:r[C]=!0})}}e&&n&&Object.keys(e).forEach(a=>l(a,u=>{o[u]||(r[u]=!0)})),n&&Object.keys(r).forEach(n),Object.keys(o).forEach(s)}getStaticCellClasses(e,t){const{cellClass:i}=e;if(!i)return[];let s;return typeof i=="function"?s=i(t):s=i,typeof s=="string"&&(s=[s]),s||[]}processStaticCellClasses(e,t,i){this.getStaticCellClasses(e,t).forEach(n=>{i(n)})}};c([f("expressionService")],zd.prototype,"expressionService",2);zd=c([H("stylingService")],zd);var fT=class extends Hc{constructor(e){super(e,"ag-toggle-button")}setValue(e,t){return super.setValue(e,t),this.addOrRemoveCssClass("ag-selected",this.getValue()),this}},wL=class extends Xi{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const i=super.setValue(e,t);return this.eInput.value=e,i}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},yL=class extends Mo{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct(),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this));const e=ws();this.addManagedListener(this.eInput,"mousedown",()=>{this.isDisabled()||e||this.eInput.focus()}),this.eInput.step="any"}onWheel(e){this.gos.getActiveDomElement()===this.eInput&&e.preventDefault()}setMin(e){var t;const i=e instanceof Date?(t=xi(e??null,!1))!=null?t:void 0:e;return this.min===i?this:(this.min=i,vs(this.eInput,"min",i),this)}setMax(e){var t;const i=e instanceof Date?(t=xi(e??null,!1))!=null?t:void 0:e;return this.max===i?this:(this.max=i,vs(this.eInput,"max",i),this)}setStep(e){return this.step===e?this:(this.step=e,vs(this.eInput,"step",e),this)}getDate(){var e;if(this.eInput.validity.valid)return(e=Jt(this.getValue()))!=null?e:void 0}setDate(e,t){this.setValue(xi(e??null,!1),t)}},SL=class extends Xi{constructor(e){super(e,"ag-range-field","range")}postConstruct(){super.postConstruct();const{min:e,max:t,step:i}=this.config;e!=null&&this.setMinValue(e),t!=null&&this.setMaxValue(t),this.setStep(i||1)}addInputListeners(){this.addManagedListener(this.eInput,"input",e=>{const t=e.target.value;this.setValue(t)})}setMinValue(e){return this.min=e,this.eInput.setAttribute("min",e.toString()),this}setMaxValue(e){return this.max=e,this.eInput.setAttribute("max",e.toString()),this}setStep(e){return this.eInput.setAttribute("step",e.toString()),this}setValue(e,t){this.min!=null&&(e=Math.max(parseFloat(e),this.min).toString()),this.max!=null&&(e=Math.min(parseFloat(e),this.max).toString());const i=super.setValue(e,t);return this.eInput.value=e,i}},Nm=class extends Z{constructor(e,t){super('<div class="ag-rich-select-row" role="presentation"></div>'),this.params=e,this.wrapperEl=t}postConstruct(){this.addManagedListener(this.getGui(),"click",this.onClick.bind(this))}setState(e){let t="";this.params.valueFormatter&&(t=this.params.valueFormatter(e)),this.populateWithRenderer(e,t)||this.populateWithoutRenderer(e,t),this.value=e}highlightString(e){const{parsedValue:t}=this;if(this.params.cellRenderer||!b(t))return;let i=b(e);if(i){const s=t==null?void 0:t.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(s>=0){const n=s+e.length,o=Xe(t.slice(0,s),!0),r=Xe(t.slice(s,n),!0),l=Xe(t.slice(n));this.renderValueWithoutRenderer(`${o}<span class="ag-rich-select-row-text-highlight">${r}</span>${l}`)}else i=!1}i||this.renderValueWithoutRenderer(t)}updateHighlighted(e){var t;const i=this.getGui(),s=`ag-rich-select-row-${this.getCompId()}`;if((t=i.parentElement)==null||t.setAttribute("id",s),e){const n=this.getParentComponent().getAriaElement();jf(n,s),this.wrapperEl.setAttribute("data-active-option",s)}Ar(i.parentElement,e),this.addOrRemoveCssClass("ag-rich-select-row-selected",e)}populateWithoutRenderer(e,t){const i=this.gos.getDocument(),s=this.getGui(),n=i.createElement("span");n.style.overflow="hidden",n.style.textOverflow="ellipsis";const o=Xe(b(t)?t:e,!0);this.parsedValue=b(o)?o:null,s.appendChild(n),this.renderValueWithoutRenderer(o),this.setTooltip({newTooltipText:this.parsedValue,shouldDisplayTooltip:()=>n.scrollWidth>n.clientWidth})}renderValueWithoutRenderer(e){const t=this.getGui().querySelector("span");t&&(t.innerHTML=b(e)?e:" ")}populateWithRenderer(e,t){let i,s;return this.params.cellRenderer&&(s=this.userComponentFactory.getCellRendererDetails(this.params,{value:e,valueFormatted:t,setTooltip:(n,o)=>{this.setTooltip({newTooltipText:n,shouldDisplayTooltip:o})}})),s&&(i=s.newAgStackInstance()),i&&hm(i,this.getGui()),i?(i.then(n=>{this.addDestroyFunc(()=>{this.getContext().destroyBean(n)})}),!0):!1}onClick(){const e=this.getParentComponent(),t={type:g.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:!1,value:this.value};e==null||e.dispatchEvent(t)}};c([f("userComponentFactory")],Nm.prototype,"userComponentFactory",2);c([M],Nm.prototype,"postConstruct",1);var iu=class mT extends eu{constructor(t){super(mT.getTemplate((t==null?void 0:t.cssIdentifier)||"default")),this.renderedRows=new Map,this.rowHeight=20,this.pageSize=-1,this.isScrolling=!1,this.isHeightFromTheme=!0;const{cssIdentifier:i="default",ariaRole:s="listbox",listName:n}=t||{};this.cssIdentifier=i,this.ariaRole=s,this.listName=n}postConstruct(){this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:t=>this.onFocusIn(t),onFocusOut:t=>this.onFocusOut(t),focusInnerElement:t=>this.focusInnerElement(t),onTabKeyDown:t=>this.onTabKeyDown(t),handleKeyDown:t=>this.handleKeyDown(t)}),this.setAriaProperties(),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanged.bind(this))}onGridStylesChanged(){this.rowHeight=this.getItemHeight(),this.refresh()}setAriaProperties(){const i=this.localeService.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),s=this.eContainer;He(s,this.ariaRole),yi(s,i)}addResizeObserver(){const t=()=>this.animationFrameService.requestAnimationFrame(()=>this.drawVirtualRows()),i=this.resizeObserverService.observeResize(this.getGui(),t);this.addDestroyFunc(i)}focusInnerElement(t){this.focusRow(t?this.model.getRowCount()-1:0)}onFocusIn(t){const i=t.target;i.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=DE(i)-1)}onFocusOut(t){this.getFocusableElement().contains(t.relatedTarget)||(this.lastFocusedRowIndex=null)}handleKeyDown(t){switch(t.key){case D.UP:case D.DOWN:this.navigate(t.key===D.UP)&&t.preventDefault();break;case D.PAGE_HOME:case D.PAGE_END:case D.PAGE_UP:case D.PAGE_DOWN:this.navigateToPage(t.key)!==null&&t.preventDefault();break}}onTabKeyDown(t){this.navigate(t.shiftKey)?t.preventDefault():(ss(t),this.forceFocusOutOfContainer(t.shiftKey))}navigate(t){if(this.lastFocusedRowIndex==null)return!1;const i=this.lastFocusedRowIndex+(t?-1:1);return i<0||i>=this.model.getRowCount()?!1:(this.focusRow(i),!0)}navigateToPage(t,i="focused"){let s=!1;i==="focused"&&(i=this.getLastFocusedRow(),s=!0);const n=this.model.getRowCount()-1;let o=-1;return t===D.PAGE_HOME?o=0:t===D.PAGE_END?o=n:t===D.PAGE_DOWN?o=Math.min(i+this.pageSize,n):t===D.PAGE_UP&&(o=Math.max(i-this.pageSize,0)),o===-1?null:(s?this.focusRow(o):this.ensureIndexVisible(o),o)}getLastFocusedRow(){return this.lastFocusedRowIndex}focusRow(t){this.isScrolling||(this.isScrolling=!0,this.ensureIndexVisible(t),this.animationFrameService.requestAnimationFrame(()=>{if(this.isScrolling=!1,!this.isAlive())return;const i=this.renderedRows.get(t);i&&i.eDiv.focus()}))}getComponentAt(t){const i=this.renderedRows.get(t);return i&&i.rowComponent}forEachRenderedRow(t){this.renderedRows.forEach((i,s)=>t(i.rowComponent,s))}static getTemplate(t){return`<div class="ag-virtual-list-viewport ag-${t}-virtual-list-viewport" role="presentation">
|
|
196
|
+
<div class="ag-virtual-list-container ag-${t}-virtual-list-container" ref="eContainer"></div>
|
|
197
|
+
</div>`}getItemHeight(){return this.isHeightFromTheme?this.environment.getListItemHeight():this.rowHeight}ensureIndexVisible(t,i=!0){const s=this.model.getRowCount();if(typeof t!="number"||t<0||t>=s)return console.warn("AG Grid: invalid row index for ensureIndexVisible: "+t),!1;const n=t*this.rowHeight,o=n+this.rowHeight,r=this.getGui(),l=r.scrollTop,a=r.offsetHeight,u=l+a,d=i?0:this.rowHeight,h=l>n+d,p=u<o-d;if(h)return r.scrollTop=n,!0;if(p){const C=o-a;return r.scrollTop=C,!0}return!1}setComponentCreator(t){this.componentCreator=t}setComponentUpdater(t){this.componentUpdater=t}getRowHeight(){return this.rowHeight}getScrollTop(){return this.getGui().scrollTop}setRowHeight(t){this.isHeightFromTheme=!1,this.rowHeight=t,this.refresh()}refresh(t){if(this.model==null||!this.isAlive())return;const i=this.model.getRowCount();this.eContainer.style.height=`${i*this.rowHeight}px`,Hf(()=>this.eContainer.clientHeight>=i*this.rowHeight,()=>{this.isAlive()&&(this.canSoftRefresh(t)?this.drawVirtualRows(!0):(this.clearVirtualRows(),this.drawVirtualRows()))})}canSoftRefresh(t){return!!(t&&this.renderedRows.size&&typeof this.model.areRowsEqual=="function"&&this.componentUpdater)}clearVirtualRows(){this.renderedRows.forEach((t,i)=>this.removeRow(i))}drawVirtualRows(t){if(!this.isAlive()||!this.model)return;const i=this.getGui(),s=i.scrollTop,n=s+i.offsetHeight,o=Math.floor(s/this.rowHeight),r=Math.floor(n/this.rowHeight);this.pageSize=Math.floor((n-s)/this.rowHeight),this.ensureRowsRendered(o,r,t)}ensureRowsRendered(t,i,s){this.renderedRows.forEach((n,o)=>{(o<t||o>i)&&o!==this.lastFocusedRowIndex&&this.removeRow(o)}),s&&this.refreshRows();for(let n=t;n<=i;n++)this.renderedRows.has(n)||n<this.model.getRowCount()&&this.insertRow(n)}insertRow(t){const i=this.model.getRow(t),s=document.createElement("div");s.classList.add("ag-virtual-list-item",`ag-${this.cssIdentifier}-virtual-list-item`),He(s,this.ariaRole==="tree"?"treeitem":"option"),Lc(s,this.model.getRowCount()),Mc(s,t+1),s.setAttribute("tabindex","-1"),s.style.height=`${this.rowHeight}px`,s.style.top=`${this.rowHeight*t}px`;const n=this.componentCreator(i,s);n.addGuiEventListener("focusin",()=>this.lastFocusedRowIndex=t),s.appendChild(n.getGui()),this.renderedRows.has(t-1)?this.renderedRows.get(t-1).eDiv.insertAdjacentElement("afterend",s):this.renderedRows.has(t+1)?this.renderedRows.get(t+1).eDiv.insertAdjacentElement("beforebegin",s):this.eContainer.appendChild(s),this.renderedRows.set(t,{rowComponent:n,eDiv:s,value:i})}removeRow(t){const i=this.renderedRows.get(t);this.eContainer.removeChild(i.eDiv),this.destroyBean(i.rowComponent),this.renderedRows.delete(t)}refreshRows(){const t=this.model.getRowCount();this.renderedRows.forEach((i,s)=>{var n,o;if(s>=t)this.removeRow(s);else{const r=this.model.getRow(s);(o=(n=this.model).areRowsEqual)!=null&&o.call(n,i.value,r)?this.componentUpdater(r,i.rowComponent):this.removeRow(s)}})}addScrollListener(){this.addGuiEventListener("scroll",()=>this.drawVirtualRows(),{passive:!0})}setModel(t){this.model=t}getAriaElement(){return this.eContainer}destroy(){this.isAlive()&&(this.clearVirtualRows(),super.destroy())}};c([f("resizeObserverService")],iu.prototype,"resizeObserverService",2);c([f("animationFrameService")],iu.prototype,"animationFrameService",2);c([N("eContainer")],iu.prototype,"eContainer",2);c([M],iu.prototype,"postConstruct",1);var CT=iu,EL=`
|
|
198
|
+
<div class="ag-picker-field" role="presentation">
|
|
199
|
+
<div ref="eLabel"></div>
|
|
200
|
+
<div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-rich-select-value ag-picker-collapsed">
|
|
201
|
+
<div ref="eDisplayField" class="ag-picker-field-display"></div>
|
|
202
|
+
<ag-input-text-field ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>
|
|
203
|
+
<div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
|
|
204
|
+
</div>
|
|
205
|
+
</div>`,ih=class extends Lo{constructor(e){var t,i;super(Me($({pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"ag-list",className:"ag-rich-select",pickerIcon:"smallDown",ariaRole:"combobox",template:(t=e==null?void 0:e.template)!=null?t:EL,modalPicker:!1},e),{maxPickerHeight:(i=e==null?void 0:e.maxPickerHeight)!=null?i:"calc(var(--ag-row-height) * 6.5)"})),this.searchString="",this.highlightedItem=-1,this.lastRowHovered=-1,this.searchStringCreator=null;const{cellRowHeight:s,value:n,valueList:o,searchStringCreator:r}=e||{};s!=null&&(this.cellRowHeight=s),n!==void 0&&(this.value=n),o!=null&&(this.values=o),r&&(this.searchStringCreator=r)}postConstruct(){super.postConstruct(),this.createLoadingElement(),this.createListComponent();const{allowTyping:e,placeholder:t}=this.config;e?(this.eInput.setAutoComplete(!1).setInputPlaceholder(t),this.eDisplayField.classList.add("ag-hidden")):this.eInput.setDisplayed(!1),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{searchDebounceDelay:i=300}=this.config;this.clearSearchString=Nt(this.clearSearchString,i),this.renderSelectedValue(),e&&(this.eInput.onValueChange(s=>this.searchTextFromString(s)),this.addManagedListener(this.eWrapper,"focus",this.onWrapperFocus.bind(this))),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this))}createLoadingElement(){const e=this.gos.getDocument(),t=this.localeService.getLocaleTextFunc(),i=e.createElement("div");i.classList.add("ag-loading-text"),i.innerText=t("loadingOoo","Loading..."),this.eLoading=i}createListComponent(){this.listComponent=this.createBean(new CT({cssIdentifier:"rich-select"})),this.listComponent.setComponentCreator(this.createRowComponent.bind(this));const e=(l,a)=>{};this.listComponent.setComponentUpdater(e),this.listComponent.setParentComponent(this),this.addManagedListener(this.listComponent,g.EVENT_FIELD_PICKER_VALUE_SELECTED,l=>{this.onListValueSelected(l.value,l.fromEnterKey)});const{cellRowHeight:t}=this;t&&this.listComponent.setRowHeight(t);const i=this.listComponent.getGui(),s=this.listComponent.getAriaElement();this.addManagedListener(i,"mousemove",this.onPickerMouseMove.bind(this)),this.addManagedListener(i,"mousedown",l=>l.preventDefault()),i.classList.add("ag-rich-select-list");const n=`ag-rich-select-list-${this.listComponent.getCompId()}`;s.setAttribute("id",n);const r=this.localeService.getLocaleTextFunc()(this.config.pickerAriaLabelKey,this.config.pickerAriaLabelValue);yi(s,r),qf(this.eWrapper,s)}renderSelectedValue(){const{value:e,eDisplayField:t,config:i}=this,{allowTyping:s,initialInputValue:n}=this.config,o=this.config.valueFormatter?this.config.valueFormatter(e):e;if(s){this.eInput.setValue(n??o);return}let r;i.cellRenderer&&(r=this.userComponentFactory.getCellRendererDetails(this.config,{value:e,valueFormatted:o}));let l;if(r&&(l=r.newAgStackInstance()),l)je(t),hm(l,t),l.then(a=>{this.addDestroyFunc(()=>this.getContext().destroyBean(a))});else{if(b(this.value))t.innerText=o,t.classList.remove("ag-display-as-placeholder");else{const{placeholder:a}=i;b(a)?(t.innerHTML=`${Xe(a)}`,t.classList.add("ag-display-as-placeholder")):je(t)}this.setTooltip({newTooltipText:o??null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth})}}getCurrentValueIndex(){const{currentList:e,value:t}=this;if(t==null||!e)return-1;for(let i=0;i<e.length;i++)if(e[i]===t)return i;return-1}highlightFilterMatch(){var e;(e=this.listComponent)==null||e.forEachRenderedRow((t,i)=>{t.highlightString(this.searchString)})}highlightSelectedValue(e){var t;e==null&&(e=this.getCurrentValueIndex()),this.highlightedItem=e,(t=this.listComponent)==null||t.forEachRenderedRow((i,s)=>{const n=e===-1?!1:this.highlightedItem===s;i.updateHighlighted(n)})}setRowHeight(e){e!==this.cellRowHeight&&(this.cellRowHeight=e),this.listComponent&&this.listComponent.setRowHeight(e)}createPickerComponent(){const{values:e}=this;return e&&this.setValueList({valueList:e}),this.listComponent}setSearchStringCreator(e){this.searchStringCreator=e}setValueList(e){const{valueList:t,refresh:i}=e;this.listComponent&&this.currentList!==t&&(this.currentList=t,this.listComponent.setModel({getRowCount:()=>t.length,getRow:s=>t[s],areRowsEqual:(s,n)=>s===n}),i&&(this.values?this.listComponent.refresh(!0):(this.values=t,this.isPickerDisplayed&&this.showCurrentValueInPicker())))}showPicker(){super.showPicker(),this.showCurrentValueInPicker(),this.displayOrHidePicker()}showCurrentValueInPicker(){var e,t;if(!this.listComponent)return;if(!this.currentList){this.isPickerDisplayed&&this.eLoading&&this.listComponent.appendChild(this.eLoading);return}(e=this.eLoading)!=null&&e.offsetParent&&((t=this.eLoading.parentElement)==null||t.removeChild(this.eLoading));const i=this.getCurrentValueIndex();i!==-1?(this.listComponent.refresh(),this.listComponent.ensureIndexVisible(i),this.listComponent.refresh(!0),this.highlightSelectedValue(i)):this.listComponent.refresh()}beforeHidePicker(){this.highlightedItem=-1,super.beforeHidePicker()}onWrapperFocus(){if(!this.eInput)return;const e=this.eInput.getFocusableElement();e.focus(),e.select()}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}buildSearchStringFromKeyboardEvent(e){let{key:t}=e;if(t===D.BACKSPACE)this.searchString=this.searchString.slice(0,-1),t="";else if(!_c(e))return;e.preventDefault(),this.searchTextFromCharacter(t)}searchTextFromCharacter(e){this.searchString+=e,this.runSearch(),this.clearSearchString()}searchTextFromString(e){e==null&&(e=""),this.searchString=e,this.runSearch()}buildSearchStrings(e){const{valueFormatter:t=s=>s}=this.config;let i;return typeof e[0]=="number"||typeof e[0]=="string"?i=e.map(s=>t(s)):typeof e[0]=="object"&&this.searchStringCreator&&(i=this.searchStringCreator(e)),i}getSuggestionsAndFilteredValues(e,t){let i=[],s=[];if(!e.length)return{suggestions:i,filteredValues:s};const{searchType:n="fuzzy",filterList:o}=this.config;if(n==="fuzzy"){const r=$a(this.searchString,t,!0);i=r.values;const l=r.indices;if(o&&l.length)for(let a=0;a<l.length;a++)s.push(this.values[l[a]])}else i=t.filter((r,l)=>{const a=r.toLocaleLowerCase(),u=this.searchString.toLocaleLowerCase(),d=n==="match"?a.startsWith(u):a.indexOf(u)!==-1;return o&&d&&s.push(this.values[l]),d});return{suggestions:i,filteredValues:s}}filterListModel(e){const{filterList:t}=this.config;t&&(this.setValueList({valueList:e,refresh:!0}),this.alignPickerToComponent())}runSearch(){var e,t;const{values:i}=this,s=this.buildSearchStrings(i);if(!s){this.highlightSelectedValue(-1);return}const{suggestions:n,filteredValues:o}=this.getSuggestionsAndFilteredValues(this.searchString,s),{filterList:r,highlightMatch:l,searchType:a="fuzzy"}=this.config,u=o.length,d=!!(r&&this.searchString!=="");if(this.filterListModel(d?o:i),n.length){const h=d?0:s.indexOf(n[0]);this.selectListItem(h)}else if(this.highlightSelectedValue(-1),!d||u)(e=this.listComponent)==null||e.ensureIndexVisible(0);else if(d){this.getAriaElement().removeAttribute("data-active-option");const h=(t=this.listComponent)==null?void 0:t.getAriaElement();h&&jf(h,null)}l&&a!=="fuzzy"&&this.highlightFilterMatch(),this.displayOrHidePicker()}displayOrHidePicker(){var e;const t=(e=this.listComponent)==null?void 0:e.getGui(),i=this.currentList?this.currentList.length===0:!1;t==null||t.classList.toggle("ag-hidden",i)}clearSearchString(){this.searchString=""}selectListItem(e,t){if(!this.isPickerDisplayed||!this.currentList||!this.listComponent||e<0||e>=this.currentList.length)return;this.listComponent.ensureIndexVisible(e,!t)&&!t&&this.listComponent.refresh(!0),this.highlightSelectedValue(e)}setValue(e,t,i){const s=this.currentList?this.currentList.indexOf(e):-1;return s===-1?this:(this.value=e,i||this.selectListItem(s),this.renderSelectedValue(),super.setValue(e,t))}createRowComponent(e){const t=new Nm(this.config,this.eWrapper);t.setParentComponent(this.listComponent),this.getContext().createBean(t),t.setState(e);const{highlightMatch:i,searchType:s="fuzzy"}=this.config;return i&&s!=="fuzzy"&&t.highlightString(this.searchString),t}getRowForMouseEvent(e){const{listComponent:t}=this;if(!t)return-1;const s=(t==null?void 0:t.getGui()).getBoundingClientRect(),n=t.getScrollTop(),o=e.clientY-s.top+n;return Math.floor(o/t.getRowHeight())}onPickerMouseMove(e){if(!this.listComponent)return;const t=this.getRowForMouseEvent(e);t!==-1&&t!=this.lastRowHovered&&(this.lastRowHovered=t,this.selectListItem(t,!0))}onNavigationKeyDown(e,t){e.preventDefault();const i=t===D.DOWN;if(!this.isPickerDisplayed&&i){this.showPicker();return}const s=this.highlightedItem,o=s===-1?0:s+(i?1:-1);this.selectListItem(o)}onPageNavigation(e){var t;if(!this.isPickerDisplayed)return;const i=(t=this.listComponent)==null?void 0:t.navigateToPage(e,this.highlightedItem);i!=null&&this.animationFrameService.requestAnimationFrame(()=>{if(!this.isAlive())return null;this.highlightSelectedValue(i)})}onEnterKeyDown(e){this.isPickerDisplayed&&(e.preventDefault(),this.currentList&&this.onListValueSelected(this.currentList[this.highlightedItem],!0))}onTabKeyDown(){!this.isPickerDisplayed||!this.currentList||this.setValue(this.currentList[this.highlightedItem],!1,!0)}onListValueSelected(e,t){this.setValue(e,!1,!0),this.dispatchPickerEvent(e,t),this.hidePicker()}dispatchPickerEvent(e,t){const i={type:g.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:t,value:e};this.dispatchEvent(i)}getFocusableElement(){const{allowTyping:e}=this.config;return e?this.eInput.getFocusableElement():super.getFocusableElement()}onKeyDown(e){const t=e.key,{allowTyping:i}=this.config;switch(t){case D.LEFT:case D.RIGHT:i||e.preventDefault();break;case D.PAGE_HOME:case D.PAGE_END:if(i){e.preventDefault();const s=this.eInput.getInputElement(),n=t===D.PAGE_HOME?0:s.value.length;s.setSelectionRange(n,n);break}case D.PAGE_UP:case D.PAGE_DOWN:e.preventDefault(),this.onPageNavigation(t);break;case D.DOWN:case D.UP:this.onNavigationKeyDown(e,t);break;case D.ESCAPE:this.isPickerDisplayed&&(oi(this.listComponent.getGui())&&(e.preventDefault(),ss(e)),this.hidePicker());break;case D.ENTER:this.onEnterKeyDown(e);break;case D.TAB:this.onTabKeyDown();break;default:i||this.buildSearchStringFromKeyboardEvent(e)}}destroy(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),this.eLoading=void 0,super.destroy()}};c([f("userComponentFactory")],ih.prototype,"userComponentFactory",2);c([f("animationFrameService")],ih.prototype,"animationFrameService",2);c([N("eInput")],ih.prototype,"eInput",2);var Jr=class vT extends mm{constructor(t){super(t,vT.TEMPLATE),this.labelAlignment="top"}init(){this.eSlider.addCssClass("ag-slider-field");const{minValue:t,maxValue:i,textFieldWidth:s,step:n,value:o,onValueChange:r}=this.config;t!=null&&this.setMinValue(t),i!=null&&this.setMaxValue(i),s!=null&&this.setTextFieldWidth(s),n!=null&&this.setStep(n),o!=null&&this.setValue(o),r!=null&&this.onValueChange(r)}onValueChange(t){const i=g.EVENT_FIELD_VALUE_CHANGED;return this.addManagedListener(this.eText,i,()=>{const s=parseFloat(this.eText.getValue());this.eSlider.setValue(s.toString(),!0),t(s||0)}),this.addManagedListener(this.eSlider,i,()=>{const s=this.eSlider.getValue();this.eText.setValue(s,!0),t(parseFloat(s))}),this}setSliderWidth(t){return this.eSlider.setWidth(t),this}setTextFieldWidth(t){return this.eText.setWidth(t),this}setMinValue(t){return this.eSlider.setMinValue(t),this.eText.setMin(t),this}setMaxValue(t){return this.eSlider.setMaxValue(t),this.eText.setMax(t),this}getValue(){return this.eText.getValue()}setValue(t,i){return this.getValue()===t?this:(this.eText.setValue(t,!0),this.eSlider.setValue(t,!0),i||this.dispatchEvent({type:g.EVENT_FIELD_VALUE_CHANGED}),this)}setStep(t){return this.eSlider.setStep(t),this.eText.setStep(t),this}};Jr.TEMPLATE=`<div class="ag-slider">
|
|
206
|
+
<label ref="eLabel"></label>
|
|
207
|
+
<div class="ag-wrapper ag-slider-wrapper">
|
|
208
|
+
<ag-input-range ref="eSlider"></ag-input-range>
|
|
209
|
+
<ag-input-number-field ref="eText"></ag-input-number-field>
|
|
210
|
+
</div>
|
|
211
|
+
</div>`;c([N("eLabel")],Jr.prototype,"eLabel",2);c([N("eSlider")],Jr.prototype,"eSlider",2);c([N("eText")],Jr.prototype,"eText",2);c([M],Jr.prototype,"init",1);var RL=Jr,xn=class Ko extends Z{constructor(t={}){super(Ko.getTemplate(t)),this.params=t,this.suppressEnabledCheckbox=!0,this.suppressToggleExpandOnEnableChange=!1;const{enabled:i,items:s,suppressEnabledCheckbox:n,expanded:o,suppressToggleExpandOnEnableChange:r,useToggle:l}=t;this.cssIdentifier=t.cssIdentifier||"default",this.enabled=i??!0,this.items=s||[],this.useToggle=l??!1,this.alignItems=t.alignItems||"center",this.expanded=o??!0,n!=null&&(this.suppressEnabledCheckbox=n),r!=null&&(this.suppressToggleExpandOnEnableChange=r)}static getTemplate(t){const i=t.cssIdentifier||"default",s=t.direction||"vertical";return`
|
|
212
|
+
<div class="ag-group ag-${i}-group" role="presentation">
|
|
213
|
+
<div ref="eToolbar" class="ag-group-toolbar ag-${i}-group-toolbar">
|
|
214
|
+
<ag-checkbox ref="cbGroupEnabled"></ag-checkbox>
|
|
215
|
+
</div>
|
|
216
|
+
<div ref="eContainer" class="ag-group-container ag-group-container-${s} ag-${i}-group-container"></div>
|
|
217
|
+
</div>
|
|
218
|
+
`}postConstruct(){if(this.setupTitleBar(),this.items.length){const n=this.items;this.items=[],this.addItems(n)}const t=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(t("enabled","Enabled")),this.enabled&&this.setEnabled(this.enabled,void 0,!0),this.setAlignItems(this.alignItems);const{onEnableChange:i,suppressOpenCloseIcons:s}=this.params;this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(s??!1),this.refreshChildDisplay(),le(this.eContainer,this.expanded),this.cbGroupEnabled.onValueChange(n=>{this.setEnabled(n,!0,this.suppressToggleExpandOnEnableChange),this.dispatchEnableChangeEvent(n)}),i!=null&&this.onEnableChange(i)}refreshChildDisplay(){var t;le(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),(t=this.eTitleBar)==null||t.refreshOnExpand(this.expanded)}isExpanded(){return this.expanded}setAlignItems(t){this.alignItems!==t&&this.removeCssClass(`ag-group-item-alignment-${this.alignItems}`),this.alignItems=t;const i=`ag-group-item-alignment-${this.alignItems}`;return this.addCssClass(i),this}toggleGroupExpand(t){var i;let s=!1;if((i=this.eTitleBar)!=null&&i.isSuppressCollapse()&&!this.useToggle)t=!0,s=!0;else if(t=t??!this.expanded,this.expanded===t)return this;return this.expanded=t,this.refreshChildDisplay(),le(this.eContainer,t),s||this.dispatchEvent({type:t?Ko.EVENT_EXPANDED:Ko.EVENT_COLLAPSED}),this}addItems(t){t.forEach(i=>this.addItem(i))}prependItem(t){this.insertItem(t,!0)}addItem(t){this.insertItem(t,!1)}insertItem(t,i){const s=this.eContainer,n=t instanceof Z?t.getGui():t;n.classList.add("ag-group-item",`ag-${this.cssIdentifier}-group-item`),i?(s.insertAdjacentElement("afterbegin",n),this.items.unshift(n)):(s.appendChild(n),this.items.push(n))}hideItem(t,i){const s=this.items[i];le(s,!t)}getItemIndex(t){const i=t instanceof Z?t.getGui():t;return this.items.indexOf(i)}setTitle(t){var i;return(i=this.eTitleBar)==null||i.setTitle(t),this}addTitleBarWidget(t){var i;return(i=this.eTitleBar)==null||i.addWidget(t),this}addCssClassToTitleBar(t){var i;(i=this.eTitleBar)==null||i.addCssClass(t)}dispatchEnableChangeEvent(t){const i={type:Ko.EVENT_ENABLE_CHANGE,enabled:t};this.dispatchEvent(i)}setEnabled(t,i,s){var n;return this.enabled=t,this.refreshDisabledStyles(),s||this.toggleGroupExpand(t),i||(this.cbGroupEnabled.setValue(t),(n=this.eToggle)==null||n.setValue(t)),this}isEnabled(){return this.enabled}onEnableChange(t){return this.addManagedListener(this,Ko.EVENT_ENABLE_CHANGE,i=>t(i.enabled)),this}hideEnabledCheckbox(t){return this.suppressEnabledCheckbox=t,this.refreshChildDisplay(),this.refreshDisabledStyles(),this}hideOpenCloseIcons(t){var i;return(i=this.eTitleBar)==null||i.hideOpenCloseIcons(t),this}refreshDisabledStyles(){var t;const i=!this.enabled;this.eContainer.classList.toggle("ag-disabled",i),(t=this.eTitleBar)==null||t.refreshDisabledStyles(this.suppressEnabledCheckbox&&i),this.eContainer.classList.toggle("ag-disabled-group-container",i)}setupTitleBar(){const t=this.useToggle?this.createToggleTitleBar():this.createDefaultTitleBar();this.eToolbar.insertAdjacentElement("beforebegin",t.getGui())}createDefaultTitleBar(){const t=this.createManagedBean(new Av(this.params));return this.eTitleBar=t,t.refreshOnExpand(this.expanded),this.addManagedListener(t,Av.EVENT_EXPAND_CHANGED,i=>this.toggleGroupExpand(i.expanded)),t}createToggleTitleBar(){var t;const i=this.createManagedBean(new fT({value:this.enabled,label:this.params.title,labelAlignment:"left",labelWidth:"flex",onValueChange:s=>{this.setEnabled(s,!0),this.dispatchEnableChangeEvent(s)}}));return i.addCssClass("ag-group-title-bar"),i.addCssClass(`ag-${(t=this.params.cssIdentifier)!=null?t:"default"}-group-title-bar ag-unselectable`),this.eToggle=i,this.toggleGroupExpand(this.enabled),i}};xn.EVENT_EXPANDED="expanded";xn.EVENT_COLLAPSED="collapsed";xn.EVENT_ENABLE_CHANGE="enableChange";c([N("eToolbar")],xn.prototype,"eToolbar",2);c([N("cbGroupEnabled")],xn.prototype,"cbGroupEnabled",2);c([N("eContainer")],xn.prototype,"eContainer",2);c([M],xn.prototype,"postConstruct",1);var TL=xn,Qh="ag-disabled-group-title-bar",el=class Tg extends Z{constructor(t={}){super(Tg.getTemplate(t)),this.suppressOpenCloseIcons=!1;const{title:i,suppressOpenCloseIcons:s}=t;i&&i.length>0&&(this.title=i),s!=null&&(this.suppressOpenCloseIcons=s)}static getTemplate(t){var i;const s=(i=t.cssIdentifier)!=null?i:"default";return`
|
|
219
|
+
<div class="ag-group-title-bar ag-${s}-group-title-bar ag-unselectable" role="button">
|
|
220
|
+
<span class="ag-group-title-bar-icon ag-${s}-group-title-bar-icon" ref="eGroupOpenedIcon" role="presentation"></span>
|
|
221
|
+
<span class="ag-group-title-bar-icon ag-${s}-group-title-bar-icon" ref="eGroupClosedIcon" role="presentation"></span>
|
|
222
|
+
<span ref="eTitle" class="ag-group-title ag-${s}-group-title"></span>
|
|
223
|
+
</div>
|
|
224
|
+
`}postConstruct(){this.setTitle(this.title),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract()}setupExpandContract(){this.eGroupClosedIcon.appendChild(Di("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(Di("columnSelectOpen",this.gos,null)),this.addManagedListener(this.getGui(),"click",()=>this.dispatchExpandChanged()),this.addManagedListener(this.getGui(),"keydown",t=>{switch(t.key){case D.ENTER:case D.SPACE:t.preventDefault(),this.dispatchExpandChanged();break;case D.RIGHT:case D.LEFT:t.preventDefault(),this.dispatchExpandChanged(t.key===D.RIGHT);break}})}refreshOnExpand(t){this.refreshAriaStatus(t),this.refreshOpenCloseIcons(t)}refreshAriaStatus(t){this.suppressOpenCloseIcons||Gs(this.getGui(),t)}refreshOpenCloseIcons(t){const i=!this.suppressOpenCloseIcons;le(this.eGroupOpenedIcon,i&&t),le(this.eGroupClosedIcon,i&&!t)}isSuppressCollapse(){return this.suppressOpenCloseIcons}dispatchExpandChanged(t){const i={type:Tg.EVENT_EXPAND_CHANGED,expanded:t};this.dispatchEvent(i)}setTitle(t){const i=this.getGui(),s=!!t&&t.length>0;t=s?t:void 0,this.eTitle.textContent=t??"",le(i,s),t!==this.title&&(this.title=t);const n=i.classList.contains(Qh);return this.refreshDisabledStyles(n),this}addWidget(t){return this.getGui().appendChild(t),this}hideOpenCloseIcons(t){return this.suppressOpenCloseIcons=t,t&&this.dispatchExpandChanged(!0),this}refreshDisabledStyles(t){const i=this.getGui();t?(i.classList.add(Qh),i.removeAttribute("tabindex")):(i.classList.remove(Qh),typeof this.title=="string"?i.setAttribute("tabindex","0"):i.removeAttribute("tabindex"))}};el.EVENT_EXPAND_CHANGED="expandedChanged";c([N("eGroupOpenedIcon")],el.prototype,"eGroupOpenedIcon",2);c([N("eGroupClosedIcon")],el.prototype,"eGroupClosedIcon",2);c([N("eTitle")],el.prototype,"eTitle",2);c([M],el.prototype,"postConstruct",1);var Av=el,_m=class extends eu{constructor(e=0,t){super('<div class="ag-menu-list" role="tree"></div>'),this.level=e,this.menuItems=[],this.params=t??{column:null,node:null,value:null}}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.handleFocusIn(e),onFocusOut:e=>this.handleFocusOut(e)})}onTabKeyDown(e){const t=this.getParentComponent(),i=t&&t.getGui();i&&i.classList.contains("ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)}handleKeyDown(e){switch(e.key){case D.UP:case D.RIGHT:case D.DOWN:case D.LEFT:e.preventDefault(),this.handleNavKey(e.key);break;case D.ESCAPE:this.closeIfIsChild()&&ss(e);break}}handleFocusIn(e){var t,i;const s=e.relatedTarget;!this.tabGuardCtrl.isTabGuard(s)&&(this.getGui().contains(s)||(i=(t=this.activeMenuItem)==null?void 0:t.getSubMenuGui())!=null&&i.contains(s))||(this.activeMenuItem?this.activeMenuItem.activate():this.activateFirstItem())}handleFocusOut(e){var t;const i=e.relatedTarget;!this.activeMenuItem||this.getGui().contains(i)||(t=this.activeMenuItem.getSubMenuGui())!=null&&t.contains(i)||this.activeMenuItem.isSubMenuOpening()||this.activeMenuItem.deactivate()}clearActiveItem(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)}addMenuItems(e){e!=null&&Ze.all(e.map(t=>t==="separator"?Ze.resolve({eGui:this.createSeparator()}):typeof t=="string"?(console.warn(`AG Grid: unrecognised menu item ${t}`),Ze.resolve({eGui:null})):this.addItem(t))).then(t=>{t.forEach(i=>{i!=null&&i.eGui&&(this.appendChild(i.eGui),i.comp&&this.menuItems.push(i.comp))})})}addItem(e){const t=this.createManagedBean(new Fu);return t.init({menuItemDef:e,isAnotherSubMenuOpen:()=>this.menuItems.some(i=>i.isSubMenuOpen()),level:this.level,contextParams:this.params}).then(()=>(t.setParentComponent(this),this.addManagedListener(t,Fu.EVENT_CLOSE_MENU,i=>{this.dispatchEvent(i)}),this.addManagedListener(t,Fu.EVENT_MENU_ITEM_ACTIVATED,i=>{this.activeMenuItem&&this.activeMenuItem!==i.menuItem&&this.activeMenuItem.deactivate(),this.activeMenuItem=i.menuItem}),{comp:t,eGui:t.getGui()}))}activateFirstItem(){const e=this.menuItems.filter(t=>!t.isDisabled())[0];e&&e.activate()}createSeparator(){return ei(`
|
|
225
|
+
<div class="ag-menu-separator" aria-hidden="true">
|
|
226
|
+
<div class="ag-menu-separator-part"></div>
|
|
227
|
+
<div class="ag-menu-separator-part"></div>
|
|
228
|
+
<div class="ag-menu-separator-part"></div>
|
|
229
|
+
<div class="ag-menu-separator-part"></div>
|
|
230
|
+
</div>`)}handleNavKey(e){switch(e){case D.UP:case D.DOWN:const i=this.findNextItem(e===D.UP);i&&i!==this.activeMenuItem&&i.activate();return}const t=this.gos.get("enableRtl")?D.RIGHT:D.LEFT;e===t?this.closeIfIsChild():this.openChild()}closeIfIsChild(e){const t=this.getParentComponent();return t&&t instanceof Fu?(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus(),!0):!1}openChild(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)}findNextItem(e){const t=this.menuItems.filter(n=>!n.isDisabled());if(!t.length)return;if(!this.activeMenuItem)return e?de(t):t[0];e&&t.reverse();let i,s=!1;for(let n=0;n<t.length;n++){const o=t[n];if(!s){o===this.activeMenuItem&&(s=!0);continue}i=o;break}return s&&!i?t[0]:i||this.activeMenuItem}destroy(){this.clearActiveItem(),super.destroy()}};c([f("focusService")],_m.prototype,"focusService",2);c([M],_m.prototype,"postConstruct",1);var wT=class extends eu{constructor(e){super(),this.wrappedComponent=e,this.setTemplateFromElement(e.getGui())}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)})}handleKeyDown(e){e.key===D.ESCAPE&&this.closePanel()}onTabKeyDown(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())}closePanel(){const e=this.parentComponent;e.closeSubMenu(),setTimeout(()=>e.getGui().focus(),0)}};c([M],wT.prototype,"postConstruct",1);var tl=class jo extends L{constructor(){super(...arguments),this.isActive=!1,this.subMenuIsOpen=!1,this.subMenuIsOpening=!1,this.suppressRootStyles=!0,this.suppressAria=!0,this.suppressFocus=!0}init(t){var i,s;const{menuItemDef:n,isAnotherSubMenuOpen:o,level:r,childComponent:l,contextParams:a}=t;return this.params=t.menuItemDef,this.level=r,this.isAnotherSubMenuOpen=o,this.childComponent=l,this.contextParams=a,this.cssClassPrefix=(s=(i=this.params.menuItemParams)==null?void 0:i.cssClassPrefix)!=null?s:"ag-menu-option",this.userComponentFactory.getMenuItemCompDetails(this.params,Me($({},n),{level:r,isAnotherSubMenuOpen:o,openSubMenu:d=>this.openSubMenu(d),closeSubMenu:()=>this.closeSubMenu(),closeMenu:d=>this.closeMenu(d),updateTooltip:(d,h)=>this.refreshTooltip(d,h),onItemActivated:()=>this.onItemActivated()})).newAgStackInstance().then(d=>{var h;this.menuItemComp=d;const p=(h=d.configureDefaults)==null?void 0:h.call(d);p&&this.configureDefaults(p===!0?void 0:p)})}addListeners(t,i){i!=null&&i.suppressClick||this.addManagedListener(t,"click",s=>this.onItemSelected(s)),i!=null&&i.suppressKeyboardSelect||this.addManagedListener(t,"keydown",s=>{(s.key===D.ENTER||s.key===D.SPACE)&&(s.preventDefault(),this.onItemSelected(s))}),i!=null&&i.suppressMouseDown||this.addManagedListener(t,"mousedown",s=>{s.stopPropagation(),s.preventDefault()}),i!=null&&i.suppressMouseOver||(this.addManagedListener(t,"mouseenter",()=>this.onMouseEnter()),this.addManagedListener(t,"mouseleave",()=>this.onMouseLeave()))}isDisabled(){return!!this.params.disabled}openSubMenu(t=!1){var i,s;if(this.closeSubMenu(),!this.params.subMenu)return;this.subMenuIsOpening=!0;const n=ei('<div class="ag-menu" role="presentation"></div>');this.eSubMenuGui=n;let o,r=()=>{this.subMenuIsOpening=!1};if(this.childComponent){const d=this.createBean(new wT(this.childComponent));d.setParentComponent(this);const h=d.getGui(),p="mouseenter",C=()=>this.cancelDeactivate();h.addEventListener(p,C),o=()=>h.removeEventListener(p,C),n.appendChild(h),this.childComponent.afterGuiAttached&&(r=()=>{this.childComponent.afterGuiAttached(),this.subMenuIsOpening=!1})}else if(this.params.subMenu){const d=this.createBean(new _m(this.level+1,this.contextParams));d.setParentComponent(this),d.addMenuItems(this.params.subMenu),n.appendChild(d.getGui()),this.addManagedListener(d,jo.EVENT_CLOSE_MENU,h=>this.dispatchEvent(h)),d.addGuiEventListener("mouseenter",()=>this.cancelDeactivate()),o=()=>this.destroyBean(d),t&&(r=()=>{d.activateFirstItem(),this.subMenuIsOpening=!1})}const l=this.popupService.positionPopupForMenu.bind(this.popupService,{eventSource:this.eGui,ePopup:n}),a=this.localeService.getLocaleTextFunc(),u=this.popupService.addPopup({modal:!0,eChild:n,positionCallback:l,anchorToElement:this.eGui,ariaLabel:a("ariaLabelSubMenu","SubMenu"),afterGuiAttached:r});this.subMenuIsOpen=!0,this.setAriaExpanded(!0),this.hideSubMenu=()=>{var d,h;u&&u.hideFunc(),this.subMenuIsOpen=!1,this.setAriaExpanded(!1),o(),(h=(d=this.menuItemComp).setExpanded)==null||h.call(d,!1),this.eSubMenuGui=void 0},(s=(i=this.menuItemComp).setExpanded)==null||s.call(i,!0)}setAriaExpanded(t){this.suppressAria||Gs(this.eGui,t)}closeSubMenu(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,this.setAriaExpanded(!1))}isSubMenuOpen(){return this.subMenuIsOpen}isSubMenuOpening(){return this.subMenuIsOpening}activate(t){var i,s;this.cancelActivate(),!this.params.disabled&&(this.isActive=!0,this.suppressRootStyles||this.eGui.classList.add(`${this.cssClassPrefix}-active`),(s=(i=this.menuItemComp).setActive)==null||s.call(i,!0),this.suppressFocus||this.eGui.focus({preventScroll:!0}),t&&this.params.subMenu&&window.setTimeout(()=>{this.isAlive()&&this.isActive&&this.openSubMenu()},300),this.onItemActivated())}deactivate(){var t,i;this.cancelDeactivate(),this.suppressRootStyles||this.eGui.classList.remove(`${this.cssClassPrefix}-active`),(i=(t=this.menuItemComp).setActive)==null||i.call(t,!1),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()}getGui(){return this.menuItemComp.getGui()}getParentComponent(){return this.parentComponent}setParentComponent(t){this.parentComponent=t}getSubMenuGui(){return this.eSubMenuGui}onItemSelected(t){var i,s;(s=(i=this.menuItemComp).select)==null||s.call(i),this.params.action?this.getFrameworkOverrides().wrapOutgoing(()=>this.params.action(this.gos.addGridCommonParams($({},this.contextParams)))):this.openSubMenu(t&&t.type==="keydown"),!(this.params.subMenu&&!this.params.action||this.params.suppressCloseOnSelect)&&this.closeMenu(t)}closeMenu(t){const i={type:jo.EVENT_CLOSE_MENU};t&&(t instanceof MouseEvent?i.mouseEvent=t:i.keyboardEvent=t),this.dispatchEvent(i)}onItemActivated(){const t={type:jo.EVENT_MENU_ITEM_ACTIVATED,menuItem:this};this.dispatchEvent(t)}cancelActivate(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)}cancelDeactivate(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)}onMouseEnter(){this.cancelDeactivate(),this.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout(()=>this.activate(!0),jo.ACTIVATION_DELAY):this.activate(!0)}onMouseLeave(){this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout(()=>this.deactivate(),jo.ACTIVATION_DELAY):this.deactivate()}configureDefaults(t){var i,s,n;if(!this.menuItemComp){setTimeout(()=>this.configureDefaults(t));return}let o=this.menuItemComp.getGui();const r=(s=(i=this.menuItemComp).getRootElement)==null?void 0:s.call(i);r&&(t!=null&&t.suppressRootStyles||o.classList.add("ag-menu-option-custom"),o=r),this.eGui=o,this.suppressRootStyles=!!(t!=null&&t.suppressRootStyles),this.suppressRootStyles||(o.classList.add(this.cssClassPrefix),(n=this.params.cssClasses)==null||n.forEach(l=>o.classList.add(l)),this.params.disabled&&o.classList.add(`${this.cssClassPrefix}-disabled`)),t!=null&&t.suppressTooltip||this.refreshTooltip(this.params.tooltip),this.suppressAria=!!(t!=null&&t.suppressAria),this.suppressAria||(He(o,"treeitem"),bE(o,this.level+1),this.params.disabled&&Kf(o,!0)),t!=null&&t.suppressTabIndex||o.setAttribute("tabindex","-1"),this.params.disabled||this.addListeners(o,t),this.suppressFocus=!!(t!=null&&t.suppressFocus)}refreshTooltip(t,i){this.tooltip=t,this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),!(!t||!this.menuItemComp)&&(this.tooltipFeature=this.createBean(new zs({getGui:()=>this.getGui(),getTooltipValue:()=>this.tooltip,getLocation:()=>"menu",shouldDisplayTooltip:i})))}destroy(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),super.destroy()}};tl.EVENT_CLOSE_MENU="closeMenu";tl.EVENT_MENU_ITEM_ACTIVATED="menuItemActivated";tl.ACTIVATION_DELAY=80;c([f("popupService")],tl.prototype,"popupService",2);c([f("userComponentFactory")],tl.prototype,"userComponentFactory",2);var Fu=tl,ko=class Dg extends Z{constructor(t){super(Dg.getTemplate(t)),this.config=t,this.closable=!0}static getTemplate(t){const i=t.cssIdentifier||"default";return`<div class="ag-panel ag-${i}-panel" tabindex="-1">
|
|
231
|
+
<div ref="eTitleBar" class="ag-panel-title-bar ag-${i}-panel-title-bar ag-unselectable">
|
|
232
|
+
<span ref="eTitle" class="ag-panel-title-bar-title ag-${i}-panel-title-bar-title"></span>
|
|
233
|
+
<div ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-${i}-panel-title-bar-buttons"></div>
|
|
234
|
+
</div>
|
|
235
|
+
<div ref="eContentWrapper" class="ag-panel-content-wrapper ag-${i}-panel-content-wrapper"></div>
|
|
236
|
+
</div>`}postConstruct(){const{component:t,closable:i,hideTitleBar:s,title:n,minWidth:o=250,width:r,minHeight:l=250,height:a,centered:u,popup:d,x:h,y:p}=this.config;this.positionableFeature=new zr(this.getGui(),{minWidth:o,width:r,minHeight:l,height:a,centered:u,x:h,y:p,popup:d,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}),this.createManagedBean(this.positionableFeature);const C=this.getGui();t&&this.setBodyComponent(t),s?le(this.eTitleBar,!1):(n&&this.setTitle(n),this.setClosable(i??this.closable)),this.addManagedListener(this.eTitleBar,"mousedown",v=>{if(C.contains(v.relatedTarget)||C.contains(this.gos.getActiveDomElement())||this.eTitleBarButtons.contains(v.target)){v.preventDefault();return}const y=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");y&&y.focus()}),!(d&&this.positionableFeature.isPositioned())&&(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")}renderComponent(){const t=this.getGui();t.focus(),this.close=()=>{t.parentElement.removeChild(t),this.destroy()}}getHeight(){return this.positionableFeature.getHeight()}setHeight(t){this.positionableFeature.setHeight(t)}getWidth(){return this.positionableFeature.getWidth()}setWidth(t){this.positionableFeature.setWidth(t)}setClosable(t){if(t!==this.closable&&(this.closable=t),t){const i=this.closeButtonComp=new Z(Dg.CLOSE_BTN_TEMPLATE);this.getContext().createBean(i);const s=i.getGui(),n=Oe("close",this.gos);n.classList.add("ag-panel-title-bar-button-icon"),s.appendChild(n),this.addTitleBarButton(i),i.addManagedListener(s,"click",this.onBtClose.bind(this))}else if(this.closeButtonComp){const i=this.closeButtonComp.getGui();i.parentElement.removeChild(i),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}}setBodyComponent(t){t.setParentComponent(this),this.eContentWrapper.appendChild(t.getGui())}addTitleBarButton(t,i){const s=this.eTitleBarButtons,n=s.children,o=n.length;i==null&&(i=o),i=Math.max(0,Math.min(i,o)),t.addCssClass("ag-panel-title-bar-button");const r=t.getGui();i===0?s.insertAdjacentElement("afterbegin",r):i===o?s.insertAdjacentElement("beforeend",r):n[i-1].insertAdjacentElement("afterend",r),t.setParentComponent(this)}getBodyHeight(){return Ua(this.eContentWrapper)}getBodyWidth(){return bo(this.eContentWrapper)}setTitle(t){this.eTitle.innerText=t}onBtClose(){this.close()}destroy(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));const t=this.getGui();t&&oi(t)&&this.close(),super.destroy()}};ko.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>';c([N("eContentWrapper")],ko.prototype,"eContentWrapper",2);c([N("eTitleBar")],ko.prototype,"eTitleBar",2);c([N("eTitleBarButtons")],ko.prototype,"eTitleBarButtons",2);c([N("eTitle")],ko.prototype,"eTitle",2);c([M],ko.prototype,"postConstruct",1);var DL=ko,PL=class extends DL{constructor(e){super(Me($({},e),{popup:!0})),this.isMaximizable=!1,this.isMaximized=!1,this.maximizeListeners=[],this.resizeListenerDestroy=null,this.lastPosition={x:0,y:0,width:0,height:0}}postConstruct(){const e=this.getGui(),{movable:t,resizable:i,maximizable:s}=this.config;this.addCssClass("ag-dialog"),super.postConstruct(),this.addManagedListener(e,"focusin",n=>{this.popupService.bringPopupToFront(e)}),t&&this.setMovable(t),s&&this.setMaximizable(s),i&&this.setResizable(i)}renderComponent(){const e=this.getGui(),{alwaysOnTop:t,modal:i,title:s,afterGuiAttached:n}=this.config,o=this.localeService.getLocaleTextFunc(),r=this.popupService.addPopup({modal:i,eChild:e,closeOnEsc:!0,closedCallback:this.onClosed.bind(this),alwaysOnTop:t,ariaLabel:s||o("ariaLabelDialog","Dialog"),afterGuiAttached:n});r&&(this.close=r.hideFunc)}onClosed(e){var t,i;this.destroy(),(i=(t=this.config).closedCallback)==null||i.call(t,e)}toggleMaximize(){const e=this.positionableFeature.getPosition();if(this.isMaximized){const{x:t,y:i,width:s,height:n}=this.lastPosition;this.setWidth(s),this.setHeight(n),this.positionableFeature.offsetElement(t,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()}refreshMaximizeIcon(){le(this.maximizeIcon,!this.isMaximized),le(this.minimizeIcon,this.isMaximized)}clearMaximizebleListeners(){this.maximizeListeners.length&&(this.maximizeListeners.forEach(e=>e()),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)}destroy(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),super.destroy()}setResizable(e){this.positionableFeature.setResizable(e)}setMovable(e){this.positionableFeature.setMovable(e,this.eTitleBar)}setMaximizable(e){if(!e){this.clearMaximizebleListeners(),this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0);return}const t=this.eTitleBar;if(!t||e===this.isMaximizable)return;const i=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),i.addManagedListener(i.getGui(),"click",this.toggleMaximize.bind(this)),this.addTitleBarButton(i,0),this.maximizeListeners.push(this.addManagedListener(t,"dblclick",this.toggleMaximize.bind(this))),this.resizeListenerDestroy=this.addManagedListener(this,"resize",()=>{this.isMaximized=!1,this.refreshMaximizeIcon()})}buildMaximizeAndMinimizeElements(){const e=this.maximizeButtonComp=this.createBean(new Z('<div class="ag-dialog-button"></span>')),t=e.getGui();return this.maximizeIcon=Oe("maximize",this.gos),t.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=Oe("minimize",this.gos),t.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e}};c([f("popupService")],PL.prototype,"popupService",2);var FL=0,ks=class extends L{constructor(){super(...arguments),this.popupList=[]}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridCtrl=e.gridCtrl}),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,this.handleThemeChange.bind(this))}getPopupParent(){const e=this.gos.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:i}=e,s=this.getPopupIndex(i);if(s!==-1){const C=this.popupList[s];C.alignedToElement=t}const n=t.getBoundingClientRect(),o=this.getParentRect(),r=this.keepXYWithinBounds(i,n.top-o.top,0),l=i.clientWidth>0?i.clientWidth:200;i.style.minWidth=`${l}px`;const u=o.right-o.left-l;let d;this.gos.get("enableRtl")?(d=p(),d<0&&(d=h(),this.setAlignedStyles(i,"left")),d>u&&(d=0,this.setAlignedStyles(i,"right"))):(d=h(),d>u&&(d=p(),this.setAlignedStyles(i,"right")),d<0&&(d=0,this.setAlignedStyles(i,"left"))),i.style.left=`${d}px`,i.style.top=`${r}px`;function h(){return n.right-o.left-2}function p(){return n.left-o.left-l}}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:i,nudgeY:s,skipObserver:n}=e;this.positionPopup({ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:!0,skipObserver:n,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:n,eventSource:o,alignSide:r="left",position:l="over",column:a,rowNode:u,type:d}=e,h=o.getBoundingClientRect(),p=this.getParentRect(),C=this.getPopupIndex(t);if(C!==-1){const y=this.popupList[C];y.alignedToElement=o}const v=()=>{let y=h.left-p.left;r==="right"&&(y-=t.offsetWidth-h.width);let R;return l==="over"?(R=h.top-p.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,h,p,e.nudgeY||0)==="under"?R=h.top-p.top+h.height:R=h.top-t.offsetHeight-(s||0)*2-p.top),{x:y,y:R}};this.positionPopup({ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:n,updatePosition:v,postProcessCallback:()=>this.callPostProcessPopup(d,t,o,null,a,u)})}shouldRenderUnderOrAbove(e,t,i,s){const n=i.bottom-t.bottom,o=t.top-i.top,r=e.offsetHeight+s;return n>r?"under":o>r||o>n?"above":"under"}setAlignedStyles(e,t){const i=this.getPopupIndex(e);if(i===-1)return;const s=this.popupList[i],{alignedToElement:n}=s;!n||(["right","left","over","above","under"].forEach(r=>{n.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`)}),!t)||(n.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}callPostProcessPopup(e,t,i,s,n,o){const r=this.gos.getCallback("postProcessPopup");r&&r({column:n,rowNode:o,ePopup:t,type:e,eventSource:i,mouseEvent:s})}positionPopup(e){const{ePopup:t,keepWithinBounds:i,nudgeX:s,nudgeY:n,skipObserver:o,updatePosition:r}=e,l={width:0,height:0},a=(u=!1)=>{let{x:d,y:h}=r();u&&t.clientWidth===l.width&&t.clientHeight===l.height||(l.width=t.clientWidth,l.height=t.clientHeight,s&&(d+=s),n&&(h+=n),i&&(d=this.keepXYWithinBounds(t,d,1),h=this.keepXYWithinBounds(t,h,0)),t.style.left=`${d}px`,t.style.top=`${h}px`,e.postProcessCallback&&e.postProcessCallback())};if(a(),!o){const u=this.resizeObserverService.observeResize(t,()=>a(!0));setTimeout(()=>u(),ks.WAIT_FOR_POPUP_CONTENT_RESIZE)}}getActivePopups(){return this.popupList.map(e=>e.element)}getPopupList(){return this.popupList}getParentRect(){const e=this.gos.getDocument();let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),rm(t)}keepXYWithinBounds(e,t,i){const s=i===0,n=s?"clientHeight":"clientWidth",o=s?"top":"left",r=s?"offsetHeight":"offsetWidth",l=s?"scrollTop":"scrollLeft",a=this.gos.getDocument(),u=a.documentElement,d=this.getPopupParent(),h=d.getBoundingClientRect(),p=a.documentElement.getBoundingClientRect(),C=d===a.body,v=e[r];let R=C?(s?om:ha)(u)+u[l]:d[n];C&&(R-=Math.abs(p[o]-h[o]));const w=R-v;return Math.min(Math.max(t,0),Math.abs(w))}addPopup(e){const t=this.gos.getDocument(),{eChild:i,ariaLabel:s,alwaysOnTop:n,positionCallback:o,anchorToElement:r}=e;if(!t)return console.warn("AG Grid: could not find the document, document is empty"),{hideFunc:()=>{}};const l=this.getPopupIndex(i);if(l!==-1)return{hideFunc:this.popupList[l].hideFunc};this.initialisePopupPosition(i);const a=this.createPopupWrapper(i,s,!!n),u=this.addEventListenersToPopup(Me($({},e),{wrapperEl:a}));return o&&o(),this.addPopupToPopupList(i,a,u,r),{hideFunc:u}}initialisePopupPosition(e){const i=this.getPopupParent().getBoundingClientRect();b(e.style.top)||(e.style.top=`${i.top*-1}px`),b(e.style.left)||(e.style.left=`${i.left*-1}px`)}createPopupWrapper(e,t,i){const s=this.getPopupParent(),n=document.createElement("div"),{allThemes:o}=this.environment.getTheme();return o.length&&n.classList.add(...o),n.classList.add("ag-popup"),e.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||He(e,"dialog"),yi(e,t),n.appendChild(e),s.appendChild(n),i?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),n}handleThemeChange(){const{allThemes:e}=this.environment.getTheme();for(const t of this.popupList){for(const i of Array.from(t.wrapper.classList))i.startsWith("ag-theme-")&&t.wrapper.classList.remove(i);e.length&&t.wrapper.classList.add(...e)}}addEventListenersToPopup(e){const t=this.gos.getDocument(),i=this.getPopupParent(),{wrapperEl:s,eChild:n,closedCallback:o,afterGuiAttached:r,closeOnEsc:l,modal:a}=e;let u=!1;const d=v=>{if(!s.contains(this.gos.getActiveDomElement()))return;v.key===D.ESCAPE&&!es(v)&&C({keyboardEvent:v})},h=v=>C({mouseEvent:v}),p=v=>C({touchEvent:v}),C=(v={})=>{const{mouseEvent:y,touchEvent:R,keyboardEvent:w,forceHide:m}=v;!m&&(this.isEventFromCurrentPopup({mouseEvent:y,touchEvent:R},n)||u)||(u=!0,i.removeChild(s),t.removeEventListener("keydown",d),t.removeEventListener("mousedown",h),t.removeEventListener("touchstart",p),t.removeEventListener("contextmenu",h),this.eventService.removeEventListener(g.EVENT_DRAG_STARTED,h),o&&o(y||R||w),this.removePopupFromPopupList(n))};return r&&r({hidePopup:C}),window.setTimeout(()=>{l&&t.addEventListener("keydown",d),a&&(t.addEventListener("mousedown",h),this.eventService.addEventListener(g.EVENT_DRAG_STARTED,h),t.addEventListener("touchstart",p),t.addEventListener("contextmenu",h))},0),C}addPopupToPopupList(e,t,i,s){this.popupList.push({element:e,wrapper:t,hideFunc:i,instanceId:FL++,isAnchored:!!s}),s&&this.setPopupPositionRelatedToElement(e,s)}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const i=this.getPopupIndex(e);if(i===-1)return;const s=this.popupList[i];if(s.stopAnchoringPromise&&s.stopAnchoringPromise.then(o=>o&&o()),s.stopAnchoringPromise=void 0,s.isAnchored=!1,!t)return;const n=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:s.hideFunc});return s.stopAnchoringPromise=n,s.isAnchored=!0,n}removePopupFromPopupList(e){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),this.popupList=this.popupList.filter(t=>t.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),i=t.getBoundingClientRect(),{element:s,ePopup:n}=e,o=s.getBoundingClientRect(),r=i.top-o.top,l=i.left-o.left;let a=r,u=l;const d=n.style.top,h=parseInt(d.substring(0,d.length-1),10),p=n.style.left,C=parseInt(p.substring(0,p.length-1),10);return new Ze(v=>{this.getFrameworkOverrides().setInterval(()=>{const y=t.getBoundingClientRect(),R=s.getBoundingClientRect();if(R.top==0&&R.left==0&&R.height==0&&R.width==0){e.hidePopup();return}const m=y.top-R.top;if(m!=a){const T=this.keepXYWithinBounds(n,h+r-m,0);n.style.top=`${T}px`}a=m;const E=y.left-R.left;if(E!=u){const T=this.keepXYWithinBounds(n,C+l-E,1);n.style.left=`${T}px`}u=E},200).then(y=>{v(()=>{y!=null&&window.clearInterval(y)})})})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:i,touchEvent:s}=e,n=i||s;if(!n)return!1;const o=this.getPopupIndex(t);if(o===-1)return!1;for(let r=o;r<this.popupList.length;r++){const l=this.popupList[r];if(Gd(l.element,n))return!0}return this.isElementWithinCustomPopup(n.target)}isElementWithinCustomPopup(e){const t=this.gos.getDocument();for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const i=this.getWrapper(e);i&&(i.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(i))}bringPopupToFront(e){const t=this.getPopupParent(),i=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),s=i.length,n=Array.prototype.slice.call(t.querySelectorAll(".ag-popup.ag-always-on-top")),o=n.length,r=this.getWrapper(e);if(!r||s<=1||!t.contains(e))return;const l=i.indexOf(r),a=r.querySelectorAll("div"),u=[];for(a.forEach(d=>{d.scrollTop!==0&&u.push([d,d.scrollTop])}),o?r.classList.contains("ag-always-on-top")?l!==s-1&&de(n).insertAdjacentElement("afterend",r):l!==s-o-1&&n[0].insertAdjacentElement("beforebegin",r):l!==s-1&&de(i).insertAdjacentElement("afterend",r);u.length;){const d=u.pop();d[0].scrollTop=d[1]}}};ks.WAIT_FOR_POPUP_CONTENT_RESIZE=200;c([f("focusService")],ks.prototype,"focusService",2);c([f("ctrlsService")],ks.prototype,"ctrlsService",2);c([f("resizeObserverService")],ks.prototype,"resizeObserverService",2);c([M],ks.prototype,"postConstruct",1);ks=c([H("popupService")],ks);var AL=class extends Z{constructor(){super(`
|
|
237
|
+
<div class="ag-autocomplete-row" role="presentation">
|
|
238
|
+
<div class="ag-autocomplete-row-label"></div>
|
|
239
|
+
</div>`),this.hasHighlighting=!1}setState(e,t){this.value=e,this.render(),this.updateSelected(t)}updateSelected(e){this.addOrRemoveCssClass("ag-autocomplete-row-selected",e)}setSearchString(e){var t;let i=!1;if(b(e)){const s=(t=this.value)==null?void 0:t.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(s>=0){i=!0,this.hasHighlighting=!0;const n=s+e.length,o=Xe(this.value.slice(0,s)),r=Xe(this.value.slice(s,n)),l=Xe(this.value.slice(n));this.getGui().lastElementChild.innerHTML=`${o}<b>${r}</b>${l}`}}!i&&this.hasHighlighting&&(this.hasHighlighting=!1,this.render())}render(){var e;this.getGui().lastElementChild.innerHTML=(e=Xe(this.value))!=null?e:" "}},sh=class yT extends Io{constructor(t){super(yT.TEMPLATE),this.params=t,this.searchString=""}destroy(){super.destroy()}init(){this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList=this.createManagedBean(new CT({cssIdentifier:"autocomplete"})),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:()=>this.autocompleteEntries.length,getRow:i=>this.autocompleteEntries[i]});const t=this.virtualList.getGui();this.addManagedListener(t,"click",()=>this.params.onConfirmed()),this.addManagedListener(t,"mousemove",this.onMouseMove.bind(this)),this.addManagedListener(t,"mousedown",i=>i.preventDefault()),this.setSelectedValue(0)}onNavigationKeyDown(t,i){t.preventDefault();const s=this.autocompleteEntries.indexOf(this.selectedValue),n=i===D.UP?s-1:s+1;this.checkSetSelectedValue(n)}setSearch(t){this.searchString=t,b(t)?this.runSearch():(this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList.refresh(),this.checkSetSelectedValue(0)),this.updateSearchInList()}runContainsSearch(t,i){let s,n=!1;const o=t.toLocaleLowerCase(),r=i.filter(l=>{const u=l.toLocaleLowerCase().indexOf(o),d=u===0,h=u>=0;return h&&(!s||!n&&d||n===d&&l.length<s.length)&&(s=l,n=d),h});return!s&&r.length&&(s=r[0]),{topMatch:s,allMatches:r}}runSearch(){var t,i;const{autocompleteEntries:s}=this.params,n=s.map(u=>{var d;return(d=u.displayValue)!=null?d:u.key});let o,r;if(this.params.useFuzzySearch)o=$a(this.searchString,n,!0).values,r=o.length?o[0]:void 0;else{const u=this.runContainsSearch(this.searchString,n);o=u.allMatches,r=u.topMatch}let l=s.filter(({key:u,displayValue:d})=>o.includes(d??u));if(!l.length&&this.selectedValue&&((i=(t=this.params)==null?void 0:t.forceLastSelection)!=null&&i.call(t,this.selectedValue,this.searchString))&&(l=[this.selectedValue]),this.autocompleteEntries=l,this.virtualList.refresh(),!r)return;const a=o.indexOf(r);this.checkSetSelectedValue(a)}updateSearchInList(){this.virtualList.forEachRenderedRow(t=>t.setSearchString(this.searchString))}checkSetSelectedValue(t){t>=0&&t<this.autocompleteEntries.length&&this.setSelectedValue(t)}setSelectedValue(t){const i=this.autocompleteEntries[t];this.selectedValue!==i&&(this.selectedValue=i,this.virtualList.ensureIndexVisible(t),this.virtualList.forEachRenderedRow((s,n)=>{s.updateSelected(t===n)}))}createRowComponent(t){var i;const s=new AL;return this.getContext().createBean(s),s.setState((i=t.displayValue)!=null?i:t.key,t===this.selectedValue),s}onMouseMove(t){const i=this.virtualList.getGui().getBoundingClientRect(),s=this.virtualList.getScrollTop(),n=t.clientY-i.top+s,o=Math.floor(n/this.virtualList.getRowHeight());this.checkSetSelectedValue(o)}afterGuiAttached(){this.virtualList.refresh()}getSelectedValue(){var t;return this.autocompleteEntries.length&&(t=this.selectedValue)!=null?t:null}};sh.TEMPLATE=`<div class="ag-autocomplete-list-popup">
|
|
240
|
+
<div ref="eList" class="ag-autocomplete-list"></div>
|
|
241
|
+
<div>`;c([N("eList")],sh.prototype,"eList",2);c([M],sh.prototype,"init",1);var bL=sh,Nn=class Dl extends Z{constructor(){super(`
|
|
242
|
+
<div class="ag-autocomplete" role="presentation">
|
|
243
|
+
<ag-input-text-field ref="eAutocompleteInput"></ag-input-text-field>
|
|
244
|
+
</div>`),this.isListOpen=!1,this.lastPosition=0,this.valid=!0}postConstruct(){this.eAutocompleteInput.onValueChange(t=>this.onValueChanged(t)),this.eAutocompleteInput.getInputElement().setAttribute("autocomplete","off"),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.addGuiEventListener("click",this.updatePositionAndList.bind(this)),this.addDestroyFunc(()=>{this.destroyBean(this.autocompleteList)}),this.addGuiEventListener("focusout",()=>this.onFocusOut())}onValueChanged(t){const i=Cs(t);this.updateValue(i),this.updateAutocompleteList(i)}updateValue(t){this.updateLastPosition(),this.dispatchEvent({type:Dl.EVENT_VALUE_CHANGED,value:t}),this.validate(t)}updateAutocompleteList(t){var i,s,n,o;const r=(s=(i=this.listGenerator)==null?void 0:i.call(this,t,this.lastPosition))!=null?s:{enabled:!1};if((!r.type||r.type!==((n=this.autocompleteListParams)==null?void 0:n.type))&&this.isListOpen&&this.closeList(),this.autocompleteListParams=r,(o=this.autocompleteListParams)!=null&&o.enabled){this.isListOpen||this.openList();const{searchString:l}=this.autocompleteListParams;this.autocompleteList.setSearch(l??"")}else this.isListOpen&&this.closeList()}onKeyDown(t){const i=t.key;switch(this.updateLastPosition(),i){case D.ENTER:this.onEnterKeyDown(t);break;case D.TAB:this.onTabKeyDown(t);break;case D.DOWN:case D.UP:this.onUpDownKeyDown(t,i);break;case D.LEFT:case D.RIGHT:case D.PAGE_HOME:case D.PAGE_END:setTimeout(()=>{this.updatePositionAndList()});break;case D.ESCAPE:this.onEscapeKeyDown(t);break;case D.SPACE:t.ctrlKey&&!this.isListOpen&&(t.preventDefault(),this.forceOpenList());break}}confirmSelection(){var t;const i=(t=this.autocompleteList)==null?void 0:t.getSelectedValue();i&&(this.closeList(),this.dispatchEvent({type:Dl.EVENT_OPTION_SELECTED,value:this.getValue(),position:this.lastPosition,updateEntry:i,autocompleteType:this.autocompleteListParams.type}))}onTabKeyDown(t){this.isListOpen&&(t.preventDefault(),t.stopPropagation(),this.confirmSelection())}onEnterKeyDown(t){t.preventDefault(),this.isListOpen?this.confirmSelection():this.onCompleted()}onUpDownKeyDown(t,i){var s;t.preventDefault(),this.isListOpen?(s=this.autocompleteList)==null||s.onNavigationKeyDown(t,i):this.forceOpenList()}onEscapeKeyDown(t){this.isListOpen&&(t.preventDefault(),t.stopPropagation(),this.closeList(),this.setCaret(this.lastPosition,!0))}onFocusOut(){this.isListOpen&&this.closeList()}updatePositionAndList(){var t;this.updateLastPosition(),this.updateAutocompleteList((t=this.eAutocompleteInput.getValue())!=null?t:null)}setCaret(t,i){const s=this.gos.getDocument(),n=this.gos.getActiveDomElement();i&&(!n||n===s.body)&&this.eAutocompleteInput.getFocusableElement().focus();const o=this.eAutocompleteInput.getInputElement();o.setSelectionRange(t,t),t===o.value.length&&(o.scrollLeft=o.scrollWidth)}forceOpenList(){this.onValueChanged(this.eAutocompleteInput.getValue())}updateLastPosition(){var t;this.lastPosition=(t=this.eAutocompleteInput.getInputElement().selectionStart)!=null?t:0}validate(t){var i;this.validator&&(this.validationMessage=this.validator(t),this.eAutocompleteInput.getInputElement().setCustomValidity((i=this.validationMessage)!=null?i:""),this.valid=!this.validationMessage,this.dispatchEvent({type:Dl.EVENT_VALID_CHANGED,isValid:this.valid,validationMessage:this.validationMessage}))}openList(){this.isListOpen=!0,this.autocompleteList=this.createBean(new bL({autocompleteEntries:this.autocompleteListParams.entries,onConfirmed:()=>this.confirmSelection(),forceLastSelection:this.forceLastSelection}));const t=this.autocompleteList.getGui(),i={ePopup:t,type:"autocomplete",eventSource:this.getGui(),position:"under",alignSide:this.gos.get("enableRtl")?"right":"left",keepWithinBounds:!0},s=this.popupService.addPopup({eChild:t,anchorToElement:this.getGui(),positionCallback:()=>this.popupService.positionPopupByComponent(i),ariaLabel:this.listAriaLabel});this.hidePopup=s.hideFunc,this.autocompleteList.afterGuiAttached()}closeList(){this.isListOpen=!1,this.hidePopup(),this.destroyBean(this.autocompleteList),this.autocompleteList=null}onCompleted(){this.isListOpen&&this.closeList(),this.dispatchEvent({type:Dl.EVENT_VALUE_CONFIRMED,value:this.getValue(),isValid:this.isValid()})}getValue(){return Cs(this.eAutocompleteInput.getValue())}setInputPlaceholder(t){return this.eAutocompleteInput.setInputPlaceholder(t),this}setInputAriaLabel(t){return this.eAutocompleteInput.setInputAriaLabel(t),this}setListAriaLabel(t){return this.listAriaLabel=t,this}setListGenerator(t){return this.listGenerator=t,this}setValidator(t){return this.validator=t,this}isValid(){return this.valid}setValue(t){const{value:i,position:s,silent:n,updateListOnlyIfOpen:o,restoreFocus:r}=t;this.eAutocompleteInput.setValue(i,!0),this.setCaret(s??this.lastPosition,r),n||this.updateValue(i),(!o||this.isListOpen)&&this.updateAutocompleteList(i)}setForceLastSelection(t){return this.forceLastSelection=t,this}setInputDisabled(t){return this.eAutocompleteInput.setDisabled(t),this}};Nn.EVENT_VALUE_CHANGED="eventValueChanged";Nn.EVENT_VALUE_CONFIRMED="eventValueConfirmed";Nn.EVENT_OPTION_SELECTED="eventOptionSelected";Nn.EVENT_VALID_CHANGED="eventValidChanged";c([f("popupService")],Nn.prototype,"popupService",2);c([N("eAutocompleteInput")],Nn.prototype,"eAutocompleteInput",2);c([M],Nn.prototype,"postConstruct",1);var LL=Nn,_n=class qu extends Z{constructor(t,i,s,n){super(),this.dragSourceDropTarget=t,this.ghost=i,this.horizontal=s,this.template=n}init(){var t;this.setTemplate((t=this.template)!=null?t:qu.TEMPLATE);const i=this.getGui();this.addElementClasses(i),this.addElementClasses(this.eDragHandle,"drag-handle"),this.addElementClasses(this.eText,"text"),this.addElementClasses(this.eButton,"button"),this.eDragHandle.appendChild(Oe("columnDrag",this.gos)),this.eButton.appendChild(Oe("cancel",this.gos)),this.setupComponents(),!this.ghost&&this.isDraggable()&&this.addDragSource(),this.setupAria(),this.setupTooltip(),this.activateTabIndex(),this.refreshDraggable()}isDraggable(){return!0}refreshDraggable(){this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!this.isDraggable())}setupAria(){const t=this.localeService.getLocaleTextFunc(),i=[this.getAriaDisplayName()];this.addAdditionalAriaInstructions(i,t),yi(this.getGui(),i.join(". "))}addAdditionalAriaInstructions(t,i){if(this.isRemovable()){const s=i("ariaDropZoneColumnComponentDescription","Press DELETE to remove");t.push(s)}}setupTooltip(){const t=()=>{const i=this.getTooltip();this.setTooltip({newTooltipText:i})};t(),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,t)}getDragSourceId(){}getDefaultIconName(){return J.ICON_NOT_ALLOWED}addDragSource(){const{dragAndDropService:t,eDragHandle:i}=this,s=this.createGetDragItem(),n=this.getDefaultIconName(),o={type:this.getDragSourceType(),sourceId:this.getDragSourceId(),eElement:i,getDefaultIconName:()=>n,getDragItem:s,dragItemName:this.getDisplayName()};t.addDragSource(o,!0),this.addDestroyFunc(()=>t.removeDragSource(o))}setupComponents(){this.setTextValue(),this.setupRemove(),this.ghost&&this.addCssClass("ag-column-drop-cell-ghost")}isRemovable(){return!0}refreshRemove(){le(this.eButton,this.isRemovable())}setupRemove(){this.refreshRemove();const t={type:qu.EVENT_COLUMN_REMOVE};this.addGuiEventListener("keydown",s=>this.onKeyDown(s)),this.addManagedListener(this.eButton,"click",s=>{this.dispatchEvent(t),s.stopPropagation()});const i=new pt(this.eButton);this.addManagedListener(i,pt.EVENT_TAP,()=>{this.dispatchEvent(t)}),this.addDestroyFunc(i.destroy.bind(i))}onKeyDown(t){t.key===D.DELETE&&this.isRemovable()&&(t.preventDefault(),this.dispatchEvent({type:qu.EVENT_COLUMN_REMOVE}))}getDisplayValue(){return this.getDisplayName()}setTextValue(){const t=this.getDisplayValue(),i=Xe(t);this.eText.innerHTML=i}addElementClasses(t,i){i=i?`-${i}`:"";const s=this.horizontal?"horizontal":"vertical";t.classList.add(`ag-column-drop-cell${i}`,`ag-column-drop-${s}-cell${i}`)}destroy(){super.destroy(),this.dragSourceDropTarget=null}};_n.EVENT_COLUMN_REMOVE="columnRemove";_n.TEMPLATE=`<span role="option">
|
|
245
|
+
<span ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>
|
|
246
|
+
<span ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>
|
|
247
|
+
<span ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>
|
|
248
|
+
</span>`;c([f("dragAndDropService")],_n.prototype,"dragAndDropService",2);c([N("eText")],_n.prototype,"eText",2);c([N("eDragHandle")],_n.prototype,"eDragHandle",2);c([N("eButton")],_n.prototype,"eButton",2);c([M],_n.prototype,"init",1);var ML=_n,su=class as extends Z{constructor(t){super('<div class="ag-unselectable" role="presentation"></div>'),this.horizontal=t,this.state=as.STATE_NOT_DRAGGING,this.guiDestroyFunctions=[],this.childPillComponents=[],this.resizeEnabled=!1,this.addElementClasses(this.getGui()),this.ePillDropList=document.createElement("div"),this.addElementClasses(this.ePillDropList,"list"),He(this.ePillDropList,"listbox")}isHorizontal(){return this.horizontal}toggleResizable(t){this.positionableFeature.setResizable(t?{bottom:!0}:!1),this.resizeEnabled=t}isSourceEventFromTarget(t){const{dropZoneTarget:i,dragSource:s}=t;return i.contains(s.eElement)}destroy(){this.destroyGui(),super.destroy()}destroyGui(){this.guiDestroyFunctions.forEach(t=>t()),this.guiDestroyFunctions.length=0,this.childPillComponents.length=0,je(this.getGui()),je(this.ePillDropList)}init(t){this.params=t??{},this.createManagedBean(new Ln(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.setupDropTarget(),this.positionableFeature=new zr(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature),this.refreshGui(),yi(this.ePillDropList,this.getAriaLabel())}handleKeyDown(t){const i=!this.horizontal;let s=t.key===D.DOWN,n=t.key===D.UP;if(!i){const r=this.gos.get("enableRtl");s=!r&&t.key===D.RIGHT||r&&t.key===D.LEFT,n=!r&&t.key===D.LEFT||r&&t.key===D.RIGHT}if(!s&&!n)return;const o=this.focusService.findNextFocusableElement(this.getFocusableElement(),!1,n);o&&(t.preventDefault(),o.focus())}addElementClasses(t,i){i=i?`-${i}`:"";const s=this.horizontal?"horizontal":"vertical";t.classList.add(`ag-column-drop${i}`,`ag-column-drop-${s}${i}`)}setupDropTarget(){this.dropTarget={getContainer:this.getGui.bind(this),getIconName:this.getIconName.bind(this),onDragging:this.onDragging.bind(this),onDragEnter:this.onDragEnter.bind(this),onDragLeave:this.onDragLeave.bind(this),onDragStop:this.onDragStop.bind(this),isInterestedIn:this.isInterestedIn.bind(this)},this.dragAndDropService.addDropTarget(this.dropTarget)}minimumAllowedNewInsertIndex(){return 0}checkInsertIndex(t){const i=this.getNewInsertIndex(t);if(i<0)return!1;const s=this.minimumAllowedNewInsertIndex(),n=Math.max(s,i),o=n!==this.insertIndex;return o&&(this.insertIndex=n),o}getNewInsertIndex(t){const i=t.event,s=this.horizontal?i.clientX:i.clientY,n=this.childPillComponents.map(r=>r.getGui().getBoundingClientRect()),o=n.findIndex(r=>this.horizontal?r.right>s&&r.left<s:r.top<s&&r.bottom>s);if(o===-1){const r=this.gos.get("enableRtl");return n.every(u=>s>(this.horizontal?u.right:u.bottom))?r&&this.horizontal?0:this.childPillComponents.length:n.every(u=>s<(this.horizontal?u.left:u.top))?r&&this.horizontal?this.childPillComponents.length:0:this.insertIndex}return this.insertIndex<=o?o+1:o}checkDragStartedBySelf(t){this.state===as.STATE_NOT_DRAGGING&&(this.state=as.STATE_REARRANGE_ITEMS,this.potentialDndItems=this.getItems(t.dragSource.getDragItem()),this.refreshGui(),this.checkInsertIndex(t),this.refreshGui())}onDragging(t){this.checkDragStartedBySelf(t),this.checkInsertIndex(t)&&this.refreshGui()}handleDragEnterEnd(t){}onDragEnter(t){const i=this.getItems(t.dragSource.getDragItem());this.state=as.STATE_NEW_ITEMS_IN;const s=i.filter(o=>this.isItemDroppable(o,t)),n=s.every(o=>this.childPillComponents.map(r=>r.getItem()).indexOf(o)!==-1);if(s.length!==0){if(this.potentialDndItems=s,n){this.state=as.STATE_NOT_DRAGGING;return}this.handleDragEnterEnd(t),this.checkInsertIndex(t),this.refreshGui()}}isPotentialDndItems(){return lE(this.potentialDndItems)}handleDragLeaveEnd(t){}onDragLeave(t){if(this.state===as.STATE_REARRANGE_ITEMS){const i=this.getItems(t.dragSource.getDragItem());this.removeItems(i)}this.isPotentialDndItems()&&(this.handleDragLeaveEnd(t),this.potentialDndItems=[],this.refreshGui()),this.state=as.STATE_NOT_DRAGGING}refreshOnDragStop(){return!0}onDragStop(){if(this.isPotentialDndItems()){let t=!1;this.state===as.STATE_NEW_ITEMS_IN?(this.addItems(this.potentialDndItems),t=!0):t=this.rearrangeItems(this.potentialDndItems),this.potentialDndItems=[],(this.refreshOnDragStop()||!t)&&this.refreshGui()}this.state=as.STATE_NOT_DRAGGING}removeItems(t){const i=this.getExistingItems().filter(s=>!vi(t,s));this.updateItems(i)}addItems(t){if(!t)return;const i=this.getExistingItems().slice(),s=t.filter(n=>i.indexOf(n)<0);lg(i,s,this.insertIndex),this.updateItems(i)}addItem(t){this.insertIndex=this.getExistingItems().length,this.addItems([t]),this.refreshGui()}rearrangeItems(t){const i=this.getNonGhostItems().slice();return lg(i,t,this.insertIndex),gs(i,this.getExistingItems())?!1:(this.updateItems(i),!0)}refreshGui(){const t=this.ePillDropList.scrollTop,i=this.resizeEnabled,s=this.getFocusedItem();let n=this.focusService.findNextFocusableElement();n||(n=this.focusService.findNextFocusableElement(void 0,!1,!0)),this.toggleResizable(!1),this.destroyGui(),this.addIconAndTitleToGui(),this.addEmptyMessageToGui(),this.addItemsToGui(),this.isHorizontal()||(this.ePillDropList.scrollTop=t),i&&this.toggleResizable(i),this.focusService.isKeyboardMode()&&this.restoreFocus(s,n)}getFocusedItem(){const t=this.getGui(),i=this.gos.getActiveDomElement();return t.contains(i)?Array.from(t.querySelectorAll(".ag-column-drop-cell")).indexOf(i):-1}restoreFocus(t,i){const s=this.getGui(),n=Array.from(s.querySelectorAll(".ag-column-drop-cell"));if(t===-1)return;n.length===0&&i.focus();const o=Math.min(n.length-1,t),r=n[o];r&&r.focus()}focusList(t){const i=t?this.childPillComponents.length-1:0;this.restoreFocus(i,this.getFocusableElement())}getNonGhostItems(){const t=this.getExistingItems();return this.isPotentialDndItems()?t.filter(i=>!vi(this.potentialDndItems,i)):t}addItemsToGui(){const i=this.getNonGhostItems().map(s=>this.createItemComponent(s,!1));if(this.isPotentialDndItems()){const s=this.potentialDndItems.map(n=>this.createItemComponent(n,!0));this.insertIndex>=i.length?i.push(...s):i.splice(this.insertIndex,0,...s)}this.appendChild(this.ePillDropList),i.forEach((s,n)=>{n>0&&this.addArrow(this.ePillDropList),this.ePillDropList.appendChild(s.getGui())}),this.addAriaLabelsToComponents()}addAriaLabelsToComponents(){this.childPillComponents.forEach((t,i)=>{const s=t.getGui();Mc(s,i+1),Lc(s,this.childPillComponents.length)})}createItemComponent(t,i){const s=this.createPillComponent(t,this.dropTarget,i,this.horizontal);return s.addEventListener(ML.EVENT_COLUMN_REMOVE,this.removeItems.bind(this,[t])),this.context.createBean(s),this.guiDestroyFunctions.push(()=>this.destroyBean(s)),i||this.childPillComponents.push(s),s}addIconAndTitleToGui(){const{title:t,icon:i}=this.params;if(!t||!i)return;const s=document.createElement("div");if(Wa(s,!0),this.addElementClasses(s,"title-bar"),this.addElementClasses(i,"icon"),this.addOrRemoveCssClass("ag-column-drop-empty",this.isExistingItemsEmpty()),s.appendChild(i),!this.horizontal){const n=document.createElement("span");this.addElementClasses(n,"title"),n.innerHTML=t,s.appendChild(n)}this.appendChild(s)}isExistingItemsEmpty(){return this.getExistingItems().length===0}addEmptyMessageToGui(){const{emptyMessage:t}=this.params;if(!t||!this.isExistingItemsEmpty()||this.isPotentialDndItems())return;const i=document.createElement("span");i.innerHTML=t,this.addElementClasses(i,"empty-message"),this.ePillDropList.appendChild(i)}addArrow(t){if(this.horizontal){const i=this.gos.get("enableRtl"),s=Oe(i?"smallLeft":"smallRight",this.gos);this.addElementClasses(s,"cell-separator"),t.appendChild(s)}}};su.STATE_NOT_DRAGGING="notDragging";su.STATE_NEW_ITEMS_IN="newItemsIn";su.STATE_REARRANGE_ITEMS="rearrangeItems";c([f("focusService")],su.prototype,"focusService",2);c([f("dragAndDropService")],su.prototype,"dragAndDropService",2);var IL=["touchstart","touchend","touchmove","touchcancel"],ST=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t()}setInterval(e,t){return new Ze(i=>{i(window.setInterval(e,t))})}addEventListener(e,t,i,s){const n=vi(IL,t);e.addEventListener(t,i,{capture:!!s,passive:n})}get shouldWrapOutgoing(){return!1}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return`https://www.ag-grid.com/${this.frameworkName==="solid"?"react":this.frameworkName}-data-grid${e?`/${e}`:""}`}},Rn=class extends L{getNextCellToFocus(e,t,i=!1){return i?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const i=e===D.UP,s=e===D.DOWN,n=e===D.LEFT;let o,r;if(i||s)r=i?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow(),o=t.column;else{const l=this.columnModel.getAllDisplayedColumns(),a=this.gos.get("enableRtl");r=t.rowIndex,o=n!==a?l[0]:de(l)}return{rowIndex:r,rowPinned:null,column:o}}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,s=!1;for(;!s;){switch(e){case D.UP:i=this.getCellAbove(i);break;case D.DOWN:i=this.getCellBelow(i);break;case D.RIGHT:this.gos.get("enableRtl")?i=this.getCellToLeft(i):i=this.getCellToRight(i);break;case D.LEFT:this.gos.get("enableRtl")?i=this.getCellToRight(i):i=this.getCellToLeft(i);break;default:i=null,console.warn("AG Grid: unknown key for navigation "+e);break}i?s=this.isCellGoodToFocusOn(i):s=!0}return i}isCellGoodToFocusOn(e){const t=e.column;let i;switch(e.rowPinned){case"top":i=this.pinnedRowModel.getPinnedTopRow(e.rowIndex);break;case"bottom":i=this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);break;default:i=this.rowModel.getRow(e.rowIndex);break}return i?!t.isSuppressNavigable(i):!1}getCellToLeft(e){if(!e)return null;const t=this.columnModel.getDisplayedColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.columnModel.getDisplayedColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getRowBelow(e){const t=e.rowIndex,i=e.rowPinned;if(this.isLastRowInContainer(e))switch(i){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}const s=this.rowModel.getRow(e.rowIndex),n=this.getNextStickyPosition(s);return n||{rowIndex:t+1,rowPinned:i}}getNextStickyPosition(e,t){if(!this.gos.isGroupRowsSticky()||!e||!e.sticky)return;const i=this.rowRenderer.getStickyTopRowCtrls().some(l=>l.getRowNode().rowIndex===e.rowIndex);let s=[];i?s=[...this.rowRenderer.getStickyTopRowCtrls()].sort((l,a)=>l.getRowNode().rowIndex-a.getRowNode().rowIndex):s=[...this.rowRenderer.getStickyBottomRowCtrls()].sort((l,a)=>a.getRowNode().rowIndex-l.getRowNode().rowIndex);const n=t?-1:1,o=s.findIndex(l=>l.getRowNode().rowIndex===e.rowIndex),r=s[o+n];if(r)return{rowIndex:r.getRowNode().rowIndex,rowPinned:null}}getCellBelow(e){if(!e)return null;const t=this.getRowBelow(e);return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}isLastRowInContainer(e){const t=e.rowPinned,i=e.rowIndex;return t==="top"?this.pinnedRowModel.getPinnedTopRowData().length-1<=i:t==="bottom"?this.pinnedRowModel.getPinnedBottomRowData().length-1<=i:this.paginationProxy.getPageLastRow()<=i}getRowAbove(e){const t=e.rowIndex,i=e.rowPinned;if(i?t===0:t===this.paginationProxy.getPageFirstRow())return i==="top"?null:i?this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null:this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null;const n=this.rowModel.getRow(e.rowIndex),o=this.getNextStickyPosition(n,!0);return o||{rowIndex:t-1,rowPinned:i}}getCellAbove(e){if(!e)return null;const t=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}getLastBodyCell(){return{rowIndex:this.paginationProxy.getPageLastRow(),rowPinned:null}}getLastFloatingTopRow(){return{rowIndex:this.pinnedRowModel.getPinnedTopRowData().length-1,rowPinned:"top"}}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const t=this.columnModel.getAllDisplayedColumns();let i=e.rowIndex,s=e.rowPinned,n=this.columnModel.getDisplayedColAfter(e.column);if(!n){n=t[0];const o=this.getRowBelow(e);if(q(o)||!o.rowPinned&&!this.paginationProxy.isRowInPage(o))return null;i=o?o.rowIndex:null,s=o?o.rowPinned:null}return{rowIndex:i,column:n,rowPinned:s}}getNextTabbedCellBackwards(e){const t=this.columnModel.getAllDisplayedColumns();let i=e.rowIndex,s=e.rowPinned,n=this.columnModel.getDisplayedColBefore(e.column);if(!n){n=de(t);const o=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(q(o)||!o.rowPinned&&!this.paginationProxy.isRowInPage(o))return null;i=o?o.rowIndex:null,s=o?o.rowPinned:null}return{rowIndex:i,column:n,rowPinned:s}}};c([f("columnModel")],Rn.prototype,"columnModel",2);c([f("rowModel")],Rn.prototype,"rowModel",2);c([f("rowRenderer")],Rn.prototype,"rowRenderer",2);c([f("pinnedRowModel")],Rn.prototype,"pinnedRowModel",2);c([f("paginationProxy")],Rn.prototype,"paginationProxy",2);Rn=c([H("cellNavigationService")],Rn);var yo=class extends L{constructor(){super(...arguments),this.consuming=!1}setBeans(e){this.logger=e.create("AlignedGridsService")}getAlignedGridApis(){var e;let t=(e=this.gos.get("alignedGrids"))!=null?e:[];const i=typeof t=="function";typeof t=="function"&&(t=t());const s=()=>`See ${this.getFrameworkOverrides().getDocLink("aligned-grids")}`;return t.map(o=>{var r;if(!o){Xn("alignedGrids contains an undefined option."),i||Xn(`You may want to configure via a callback to avoid setup race conditions:
|
|
249
|
+
"alignedGrids: () => [linkedGrid]"`),Xn(s());return}if(o instanceof oe)return o;const l=o;return"current"in l?(r=l.current)==null?void 0:r.api:(l.api||Xn(`alignedGrids - No api found on the linked grid. If you are passing gridOptions to alignedGrids since v31 this is no longer valid. ${s()}`),l.api)}).filter(o=>!!o&&!o.isDestroyed())}init(){this.addManagedListener(this.eventService,g.EVENT_COLUMN_MOVED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PINNED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_GROUP_OPENED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_RESIZED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,this.fireScrollEvent.bind(this))}fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(t=>{if(t.isDestroyed())return;const i=t.__getAlignedGridService();e(i)})}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent(t=>{t.onColumnEvent(e)})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent(t=>{t.onScrollEvent(e)})}onScrollEvent(e){this.onEvent(()=>{this.ctrlsService.getGridBodyCtrl().getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}getMasterColumns(e){const t=[];return e.columns?e.columns.forEach(i=>{t.push(i)}):e.column&&t.push(e.column),t}getColumnIds(e){const t=[];return e.columns?e.columns.forEach(i=>{t.push(i.getColId())}):e.column&&t.push(e.column.getColId()),t}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case g.EVENT_COLUMN_MOVED:case g.EVENT_COLUMN_VISIBLE:case g.EVENT_COLUMN_PINNED:case g.EVENT_COLUMN_RESIZED:const t=e;this.processColumnEvent(t);break;case g.EVENT_COLUMN_GROUP_OPENED:const i=e;this.processGroupOpenedEvent(i);break;case g.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.");break}})}processGroupOpenedEvent(e){e.columnGroups.forEach(t=>{let i=null;if(t){const s=t.getGroupId();i=this.columnModel.getProvidedColumnGroup(s)}t&&!i||(this.logger.log("onColumnEvent-> processing "+e+" expanded = "+t.isExpanded()),this.columnModel.setColumnGroupOpened(i,t.isExpanded(),"alignedGridChanged"))})}processColumnEvent(e){var t;const i=e.column;let s=null;if(i&&(s=this.columnModel.getPrimaryColumn(i.getColId())),i&&!s)return;const n=this.getMasterColumns(e);switch(e.type){case g.EVENT_COLUMN_MOVED:{const u=e,h=e.api.getColumnState().map(p=>({colId:p.colId}));this.columnModel.applyColumnState({state:h,applyOrder:!0},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} toIndex = ${u.toIndex}`)}break;case g.EVENT_COLUMN_VISIBLE:{const u=e,h=e.api.getColumnState().map(p=>({colId:p.colId,hide:p.hide}));this.columnModel.applyColumnState({state:h},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} visible = ${u.visible}`)}break;case g.EVENT_COLUMN_PINNED:{const u=e,h=e.api.getColumnState().map(p=>({colId:p.colId,pinned:p.pinned}));this.columnModel.applyColumnState({state:h},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} pinned = ${u.pinned}`)}break;case g.EVENT_COLUMN_RESIZED:const l=e,a={};n.forEach(u=>{this.logger.log(`onColumnEvent-> processing ${e.type} actualWidth = ${u.getActualWidth()}`),a[u.getId()]={key:u.getColId(),newWidth:u.getActualWidth()}}),(t=l.flexColumns)==null||t.forEach(u=>{a[u.getId()]&&delete a[u.getId()]}),this.columnModel.setColumnWidths(Object.values(a),!1,l.finished,"alignedGridChanged");break}const r=this.ctrlsService.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(l=>{l.setGridOption("alwaysShowVerticalScroll",r)})}};c([f("columnModel")],yo.prototype,"columnModel",2);c([f("ctrlsService")],yo.prototype,"ctrlsService",2);c([Qi(0,Li("loggerFactory"))],yo.prototype,"setBeans",1);c([M],yo.prototype,"init",1);yo=c([H("alignedGridsService")],yo);var So=class extends L{constructor(){super(...arguments),this.selectedNodes=new Map,this.lastRowNode=null}init(){this.rowSelection=this.gos.get("rowSelection"),this.groupSelectsChildren=this.gos.get("groupSelectsChildren"),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],()=>{this.groupSelectsChildren=this.gos.get("groupSelectsChildren"),this.rowSelection=this.gos.get("rowSelection"),this.deselectAllRowNodes({source:"api"})}),this.addManagedListener(this.eventService,g.EVENT_ROW_SELECTED,this.onRowSelected.bind(this))}destroy(){super.destroy(),this.resetNodes(),this.lastRowNode=null}isMultiselect(){return this.rowSelection==="multiple"}setNodesSelected(e){var t;const{newValue:i,clearSelection:s,suppressFinishActions:n,rangeSelect:o,nodes:r,event:l,source:a="api"}=e;if(r.length===0)return 0;if(r.length>1&&!this.isMultiselect())return console.warn("AG Grid: cannot multi select while rowSelection='single'"),0;const u=this.groupSelectsChildren&&e.groupSelectsFiltered===!0,d=r.map(p=>p.footer?p.sibling:p);if(o){if(r.length>1)return console.warn("AG Grid: cannot range select while selecting multiple rows"),0;let p=null;if(a==="checkboxSelected"&&i===!1&&this.lastRowNode&&(this.lastRowNode.id?p=this.lastRowNode:this.lastRowNode=null),p==null&&(p=this.getLastSelectedNode()),p){const C=d[0];if(C!==p&&this.isMultiselect())return this.selectRange(C,p,i,a)}}this.lastRowNode=i?null:d[0];let h=0;for(let p=0;p<d.length;p++){const C=d[p];u&&C.group||C.selectThisNode(i,l,a)&&h++,this.groupSelectsChildren&&((t=C.childrenAfterGroup)!=null&&t.length)&&(h+=this.selectChildren(C,i,u,a))}if(!n&&(i&&(s||!this.isMultiselect())&&(h+=this.clearOtherNodes(d[0],a)),h>0)){this.updateGroupsFromChildrenSelections(a);const C={type:g.EVENT_SELECTION_CHANGED,source:a};this.eventService.dispatchEvent(C)}return h}selectRange(e,t,i=!0,s){const n=this.rowModel.getNodesInRangeForSelection(e,t);let o=0;n.forEach(l=>{if(l.group&&this.groupSelectsChildren)return;l.selectThisNode(i,void 0,s)&&o++}),this.updateGroupsFromChildrenSelections(s);const r={type:g.EVENT_SELECTION_CHANGED,source:s};return this.eventService.dispatchEvent(r),o}selectChildren(e,t,i,s){const n=i?e.childrenAfterAggFilter:e.childrenAfterGroup;return q(n)?0:this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:i,source:s,nodes:n})}getLastSelectedNode(){const e=Array.from(this.selectedNodes.keys());if(e.length==0)return null;const t=this.selectedNodes.get(de(e));return t||null}getSelectedNodes(){const e=[];return this.selectedNodes.forEach(t=>{t&&e.push(t)}),e}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>{t&&t.data&&e.push(t.data)}),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((i,s)=>{i&&e(i)&&t.set(s,i)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsChildren||this.rowModel.getType()!=="clientSide")return!1;const s=this.rowModel.getRootNode();t||(t=new th(!0,s),t.setInactive());let n=!1;return t.forEachChangedNodeDepthFirst(o=>{if(o!==s){const r=o.calculateSelectedFromChildren();n=o.selectThisNode(r===null?!1:r,void 0,e)||n}}),n}clearOtherNodes(e,t){const i=new Map;let s=0;return this.selectedNodes.forEach(n=>{if(n&&n.id!==e.id){const o=this.selectedNodes.get(n.id);s+=o.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:t}),this.groupSelectsChildren&&n.parent&&i.set(n.parent.id,n.parent)}}),i.forEach(n=>{const o=n.calculateSelectedFromChildren();n.selectThisNode(o===null?!1:o,void 0,t)}),s}onRowSelected(e){const t=e.node;this.groupSelectsChildren&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}syncInOldRowNode(e,t){if(b(t)&&e.id!==t.id&&t){const s=t.id;this.selectedNodes.get(s)==e&&this.selectedNodes.set(t.id,t)}}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.setSelectedInitialValue(!0),this.selectedNodes.set(e.id,e)):e.setSelectedInitialValue(!1)}reset(e){const t=this.getSelectionCount();if(this.resetNodes(),t){const i={type:g.EVENT_SELECTION_CHANGED,source:e};this.eventService.dispatchEvent(i)}}resetNodes(){var e;(e=this.selectedNodes)==null||e.clear()}getBestCostNodeSelection(){if(this.rowModel.getType()!=="clientSide")return;const t=this.rowModel.getTopLevelNodes();if(t===null)return;const i=[];function s(n){for(let o=0,r=n.length;o<r;o++){const l=n[o];if(l.isSelected())i.push(l);else{const a=l;a.group&&a.children&&s(a.children)}}}return s(t),i}isEmpty(){let e=0;return this.selectedNodes.forEach(t=>{t&&e++}),e===0}deselectAllRowNodes(e){const t=l=>l.selectThisNode(!1,void 0,s),i=this.rowModel.getType()==="clientSide",{source:s,justFiltered:n,justCurrentPage:o}=e;if(o||n){if(!i){console.error("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'");return}this.getNodesToSelect(n,o).forEach(t)}else this.selectedNodes.forEach(l=>{l&&t(l)}),this.reset(s);i&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(s);const r={type:g.EVENT_SELECTION_CHANGED,source:s};this.eventService.dispatchEvent(r)}getSelectedCounts(e,t){let i=0,s=0;const n=o=>{this.groupSelectsChildren&&o.group||(o.isSelected()?i++:o.selectable&&s++)};return this.getNodesToSelect(e,t).forEach(n),{selectedCount:i,notSelectedCount:s}}getSelectAllState(e,t){const{selectedCount:i,notSelectedCount:s}=this.getSelectedCounts(e,t);return i===0&&s===0?!1:i>0&&s>0?null:i>0}hasNodesToSelect(e=!1,t=!1){return this.getNodesToSelect(e,t).filter(i=>i.selectable).length>0}getNodesToSelect(e=!1,t=!1){if(this.rowModel.getType()!=="clientSide")throw new Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`);const i=[];if(t)return this.paginationProxy.forEachNodeOnPage(n=>{if(!n.group){i.push(n);return}if(!n.expanded){const o=r=>{var l;i.push(r),(l=r.childrenAfterFilter)!=null&&l.length&&r.childrenAfterFilter.forEach(o)};o(n);return}this.groupSelectsChildren||i.push(n)}),i;const s=this.rowModel;return e?(s.forEachNodeAfterFilter(n=>{i.push(n)}),i):(s.forEachNode(n=>{i.push(n)}),i)}selectAllRowNodes(e){if(this.rowModel.getType()!=="clientSide")throw new Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`);const{source:t,justFiltered:i,justCurrentPage:s}=e,n=r=>r.selectThisNode(!0,void 0,t);this.getNodesToSelect(i,s).forEach(n),this.rowModel.getType()==="clientSide"&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(t);const o={type:g.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(o)}getSelectionState(){const e=[];return this.selectedNodes.forEach(t=>{t!=null&&t.id&&e.push(t.id)}),e.length?e:null}setSelectionState(e,t){if(!Array.isArray(e))return;const i=new Set(e),s=[];this.rowModel.forEachNode(n=>{i.has(n.id)&&s.push(n)}),this.setNodesSelected({newValue:!0,nodes:s,source:t})}};c([f("rowModel")],So.prototype,"rowModel",2);c([f("paginationProxy")],So.prototype,"paginationProxy",2);c([M],So.prototype,"init",1);So=c([H("selectionService")],So);var xr=class{constructor(e){this.viaApi=(t,...i)=>(K(`Since v31, 'columnApi.${t}' is deprecated and moved to 'api.${t}'.`),this.api[t](...i)),this.api=e}sizeColumnsToFit(e){this.viaApi("sizeColumnsToFit",e)}setColumnGroupOpened(e,t){this.viaApi("setColumnGroupOpened",e,t)}getColumnGroup(e,t){return this.viaApi("getColumnGroup",e,t)}getProvidedColumnGroup(e){return this.viaApi("getProvidedColumnGroup",e)}getDisplayNameForColumn(e,t){return this.viaApi("getDisplayNameForColumn",e,t)}getDisplayNameForColumnGroup(e,t){return this.viaApi("getDisplayNameForColumnGroup",e,t)}getColumn(e){return this.viaApi("getColumn",e)}getColumns(){return this.viaApi("getColumns")}applyColumnState(e){return this.viaApi("applyColumnState",e)}getColumnState(){return this.viaApi("getColumnState")}resetColumnState(){this.viaApi("resetColumnState")}getColumnGroupState(){return this.viaApi("getColumnGroupState")}setColumnGroupState(e){this.viaApi("setColumnGroupState",e)}resetColumnGroupState(){this.viaApi("resetColumnGroupState")}isPinning(){return this.viaApi("isPinning")}isPinningLeft(){return this.viaApi("isPinningLeft")}isPinningRight(){return this.viaApi("isPinningRight")}getDisplayedColAfter(e){return this.viaApi("getDisplayedColAfter",e)}getDisplayedColBefore(e){return this.viaApi("getDisplayedColBefore",e)}setColumnVisible(e,t){this.viaApi("setColumnVisible",e,t)}setColumnsVisible(e,t){this.viaApi("setColumnsVisible",e,t)}setColumnPinned(e,t){this.viaApi("setColumnPinned",e,t)}setColumnsPinned(e,t){this.viaApi("setColumnsPinned",e,t)}getAllGridColumns(){return this.viaApi("getAllGridColumns")}getDisplayedLeftColumns(){return this.viaApi("getDisplayedLeftColumns")}getDisplayedCenterColumns(){return this.viaApi("getDisplayedCenterColumns")}getDisplayedRightColumns(){return this.viaApi("getDisplayedRightColumns")}getAllDisplayedColumns(){return this.viaApi("getAllDisplayedColumns")}getAllDisplayedVirtualColumns(){return this.viaApi("getAllDisplayedVirtualColumns")}moveColumn(e,t){this.viaApi("moveColumn",e,t)}moveColumnByIndex(e,t){this.viaApi("moveColumnByIndex",e,t)}moveColumns(e,t){this.viaApi("moveColumns",e,t)}moveRowGroupColumn(e,t){this.viaApi("moveRowGroupColumn",e,t)}setColumnAggFunc(e,t){this.viaApi("setColumnAggFunc",e,t)}setColumnWidth(e,t,i=!0,s){this.viaApi("setColumnWidth",e,t,i,s)}setColumnWidths(e,t=!0,i){this.viaApi("setColumnWidths",e,t,i)}setPivotMode(e){this.viaApi("setPivotMode",e)}isPivotMode(){return this.viaApi("isPivotMode")}getPivotResultColumn(e,t){return this.viaApi("getPivotResultColumn",e,t)}setValueColumns(e){this.viaApi("setValueColumns",e)}getValueColumns(){return this.viaApi("getValueColumns")}removeValueColumn(e){this.viaApi("removeValueColumn",e)}removeValueColumns(e){this.viaApi("removeValueColumns",e)}addValueColumn(e){this.viaApi("addValueColumn",e)}addValueColumns(e){this.viaApi("addValueColumns",e)}setRowGroupColumns(e){this.viaApi("setRowGroupColumns",e)}removeRowGroupColumn(e){this.viaApi("removeRowGroupColumn",e)}removeRowGroupColumns(e){this.viaApi("removeRowGroupColumns",e)}addRowGroupColumn(e){this.viaApi("addRowGroupColumn",e)}addRowGroupColumns(e){this.viaApi("addRowGroupColumns",e)}getRowGroupColumns(){return this.viaApi("getRowGroupColumns")}setPivotColumns(e){this.viaApi("setPivotColumns",e)}removePivotColumn(e){this.viaApi("removePivotColumn",e)}removePivotColumns(e){this.viaApi("removePivotColumns",e)}addPivotColumn(e){this.viaApi("addPivotColumn",e)}addPivotColumns(e){this.viaApi("addPivotColumns",e)}getPivotColumns(){return this.viaApi("getPivotColumns")}getLeftDisplayedColumnGroups(){return this.viaApi("getLeftDisplayedColumnGroups")}getCenterDisplayedColumnGroups(){return this.viaApi("getCenterDisplayedColumnGroups")}getRightDisplayedColumnGroups(){return this.viaApi("getRightDisplayedColumnGroups")}getAllDisplayedColumnGroups(){return this.viaApi("getAllDisplayedColumnGroups")}autoSizeColumn(e,t){return this.viaApi("autoSizeColumn",e,t)}autoSizeColumns(e,t){this.viaApi("autoSizeColumns",e,t)}autoSizeAllColumns(e){this.viaApi("autoSizeAllColumns",e)}setPivotResultColumns(e){this.viaApi("setPivotResultColumns",e)}getPivotResultColumns(){return this.viaApi("getPivotResultColumns")}};c([f("gridApi")],xr.prototype,"api",2);xr=c([H("columnApi")],xr);var Tn=class extends L{constructor(){super(...arguments),this.initialised=!1,this.isSsrm=!1}init(){this.isSsrm=this.gos.isRowModelType("serverSide"),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=i=>this.callColumnCellValueChangedHandler(i),t=this.gos.useAsyncEvents();this.eventService.addEventListener(g.EVENT_CELL_VALUE_CHANGED,e,t),this.addDestroyFunc(()=>this.eventService.removeEventListener(g.EVENT_CELL_VALUE_CHANGED,e,t)),this.addManagedPropertyListener("treeData",i=>this.isTreeData=i.currentValue)}getValue(e,t,i=!1,s=!1){if(this.initialised||this.init(),!t)return;const n=e.getColDef(),o=n.field,r=e.getColId(),l=t.data;let a;const u=t.groupData&&t.groupData[r]!==void 0,d=!s&&t.aggData&&t.aggData[r]!==void 0,h=this.isSsrm&&s&&!!e.getColDef().aggFunc,p=this.isSsrm&&t.footer&&t.field&&(e.getColDef().showRowGroup===!0||e.getColDef().showRowGroup===t.field);if(i&&n.filterValueGetter?a=this.executeFilterValueGetter(n.filterValueGetter,l,e,t):this.isTreeData&&d?a=t.aggData[r]:this.isTreeData&&n.valueGetter?a=this.executeValueGetter(n.valueGetter,l,e,t):this.isTreeData&&o&&l?a=fr(l,o,e.isFieldContainsDots()):u?a=t.groupData[r]:d?a=t.aggData[r]:n.valueGetter?a=this.executeValueGetter(n.valueGetter,l,e,t):p?a=fr(l,t.field,e.isFieldContainsDots()):o&&l&&!h&&(a=fr(l,o,e.isFieldContainsDots())),this.cellExpressions&&typeof a=="string"&&a.indexOf("=")===0){const C=a.substring(1);a=this.executeValueGetter(C,l,e,t)}if(a==null){const C=this.getOpenedGroup(t,e);if(C!=null)return C}return a}parseValue(e,t,i,s){const n=e.getColDef(),o=this.gos.addGridCommonParams({node:t,data:t==null?void 0:t.data,oldValue:s,newValue:i,colDef:n,column:e}),r=n.valueParser;return b(r)?typeof r=="function"?r(o):this.expressionService.evaluate(r,o):i}formatValue(e,t,i,s,n=!0){let o=null,r;const l=e.getColDef();if(s?r=s:n&&(r=l.valueFormatter),r){const a=this.gos.addGridCommonParams({value:i,node:t,data:t?t.data:null,colDef:l,column:e});typeof r=="function"?o=r(a):o=this.expressionService.evaluate(r,a)}else if(l.refData)return l.refData[i]||"";return o==null&&Array.isArray(i)&&(o=i.join(", ")),o}getOpenedGroup(e,t){if(!this.gos.get("showOpenedGroup")||!t.getColDef().showRowGroup)return;const s=t.getColDef().showRowGroup;let n=e.parent;for(;n!=null;){if(n.rowGroupColumn&&(s===!0||s===n.rowGroupColumn.getColId()))return n.key;n=n.parent}}setValue(e,t,i,s){const n=this.columnModel.getPrimaryColumn(t);if(!e||!n)return!1;q(e.data)&&(e.data={});const{field:o,valueSetter:r}=n.getColDef();if(q(o)&&q(r))return console.warn("AG Grid: you need either field or valueSetter set on colDef for editing to work"),!1;if(!this.dataTypeService.checkType(n,i))return console.warn("AG Grid: Data type of the new value does not match the cell data type of the column"),!1;const l=this.gos.addGridCommonParams({node:e,data:e.data,oldValue:this.getValue(n,e),newValue:i,colDef:n.getColDef(),column:n});l.newValue=i;let a;if(b(r)?typeof r=="function"?a=r(l):a=this.expressionService.evaluate(r,l):a=this.setValueUsingField(e.data,o,i,n.isFieldContainsDots()),a===void 0&&(a=!0),!a)return!1;e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged(),l.newValue=this.getValue(n,e);const u={type:g.EVENT_CELL_VALUE_CHANGED,event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:l.column,api:l.api,columnApi:l.columnApi,colDef:l.colDef,context:l.context,data:e.data,node:e,oldValue:l.oldValue,newValue:l.newValue,value:l.newValue,source:s};return this.eventService.dispatchEvent(u),!0}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.getFrameworkOverrides().wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,columnApi:e.columnApi,context:e.context})})}setValueUsingField(e,t,i,s){if(!t)return!1;let n=!1;if(!s)n=e[t]===i,n||(e[t]=i);else{const o=t.split(".");let r=e;for(;o.length>0&&r;){const l=o.shift();o.length===0?(n=r[l]===i,n||(r[l]=i)):r=r[l]}}return!n}executeFilterValueGetter(e,t,i,s){const n=this.gos.addGridCommonParams({data:t,node:s,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,s)});return typeof e=="function"?e(n):this.expressionService.evaluate(e,n)}executeValueGetter(e,t,i,s){const n=i.getColId(),o=this.valueCache.getValue(s,n);if(o!==void 0)return o;const r=this.gos.addGridCommonParams({data:t,node:s,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,s)});let l;return typeof e=="function"?l=e(r):l=this.expressionService.evaluate(e,r),this.valueCache.setValue(s,n,l),l}getValueCallback(e,t){const i=this.columnModel.getPrimaryColumn(t);return i?this.getValue(i,e):null}getKeyForNode(e,t){const i=this.getValue(e,t),s=e.getColDef().keyCreator;let n=i;if(s){const o=this.gos.addGridCommonParams({value:i,colDef:e.getColDef(),column:e,node:t,data:t.data});n=s(o)}return typeof n=="string"||n==null||(n=String(n),n==="[object Object]"&&K("a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (se AG Grid docs) or b) to toString() on the object to return a key")),n}};c([f("expressionService")],Tn.prototype,"expressionService",2);c([f("columnModel")],Tn.prototype,"columnModel",2);c([f("valueCache")],Tn.prototype,"valueCache",2);c([f("dataTypeService")],Tn.prototype,"dataTypeService",2);c([M],Tn.prototype,"init",1);Tn=c([H("valueService")],Tn);var $d=class extends L{constructor(){super(...arguments),this.expressionToFunctionCache={}}setBeans(e){this.logger=e.create("ExpressionService")}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);console.error("AG Grid: value should be either a string or a function",e)}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.columnApi,t.getValue,t.column,t.columnGroup)}catch(i){return console.log("Processing of the expression failed"),console.log("Expression = "+e),console.log("Params =",t),console.log("Exception = "+i),null}}createExpressionFunction(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];const t=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup",t);return this.expressionToFunctionCache[e]=i,i}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}};c([Qi(0,Li("loggerFactory"))],$d.prototype,"setBeans",1);$d=c([H("expressionService")],$d);var Kd=class extends L{setBeans(e){this.logging=e.get("debug")}create(e){return new Om(e,this.isLogging.bind(this))}isLogging(){return this.logging}};c([Qi(0,Li("gridOptionsService"))],Kd.prototype,"setBeans",1);Kd=c([H("loggerFactory")],Kd);var Om=class{constructor(e,t){this.name=e,this.isLoggingFunc=t}isLogging(){return this.isLoggingFunc()}log(e){this.isLoggingFunc()&&console.log("AG Grid."+this.name+": "+e)}},On=class extends L{setComp(e,t,i){this.view=e,this.eGridHostDiv=t,this.eGui=i,this.eGui.setAttribute("grid-id",this.context.getGridId()),this.dragAndDropService.addDropTarget({getContainer:()=>this.eGui,isInterestedIn:n=>n===1||n===0,getIconName:()=>J.ICON_NOT_ALLOWED}),this.mouseEventService.stampTopLevelGridCompWithGridInstance(t),this.createManagedBean(new Kc(this.view)),this.addRtlSupport();const s=this.resizeObserverService.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>s()),this.ctrlsService.register("gridCtrl",this)}isDetailGrid(){var e;const t=this.focusService.findTabbableParent(this.getGui());return((e=t==null?void 0:t.getAttribute("row-id"))==null?void 0:e.startsWith("detail"))||!1}showDropZones(){return he.__isRegistered("@ag-grid-enterprise/row-grouping",this.context.getGridId())}showSideBar(){return he.__isRegistered("@ag-grid-enterprise/side-bar",this.context.getGridId())}showStatusBar(){return he.__isRegistered("@ag-grid-enterprise/status-bar",this.context.getGridId())}showWatermark(){return he.__isRegistered("@ag-grid-enterprise/core",this.context.getGridId())}onGridSizeChanged(){const e={type:g.EVENT_GRID_SIZE_CHANGED,clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight};this.eventService.dispatchEvent(e)}addRtlSupport(){const e=this.gos.get("enableRtl")?"ag-rtl":"ag-ltr";this.view.setRtlClass(e)}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){this.view.setCursor(e?"ew-resize":null)}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.view.getFocusableContainers(),i=this.gos.getActiveDomElement(),n=t.findIndex(o=>o.contains(i))+(e?-1:1);return n<=0||n>=t.length?!1:this.focusService.focusInto(t[n])}focusInnerElement(e){const t=this.view.getFocusableContainers(),i=this.columnModel.getAllDisplayedColumns();if(e){if(t.length>1)return this.focusService.focusInto(de(t),!0);const s=de(i);if(this.focusService.focusGridView(s,!0))return!0}if(this.gos.get("headerHeight")===0||this.gos.get("suppressHeaderFocus")){if(this.focusService.focusGridView(i[0]))return!0;for(let s=1;s<t.length;s++)if(this.focusService.focusInto(t[s]))return!0;return!1}return this.focusService.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}};c([f("focusService")],On.prototype,"focusService",2);c([f("resizeObserverService")],On.prototype,"resizeObserverService",2);c([f("columnModel")],On.prototype,"columnModel",2);c([f("ctrlsService")],On.prototype,"ctrlsService",2);c([f("mouseEventService")],On.prototype,"mouseEventService",2);c([f("dragAndDropService")],On.prototype,"dragAndDropService",2);var nu=class extends eu{constructor(t){super(),this.eGridDiv=t}postConstruct(){this.logger=this.loggerFactory.create("GridComp");const t={destroyGridUi:()=>this.destroyBean(this),setRtlClass:s=>this.addCssClass(s),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:s=>{this.getGui().style.userSelect=s??"",this.getGui().style.webkitUserSelect=s??""},setCursor:s=>{this.getGui().style.cursor=s??""}};this.ctrl=this.createManagedBean(new On);const i=this.createTemplate();this.setTemplate(i),this.ctrl.setComp(t,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:s=>this.ctrl.focusInnerElement(s),forceFocusOutWhenTabGuardsAreEmpty:!0})}insertGridIntoDom(){const t=this.getGui();this.eGridDiv.appendChild(t),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(t),this.logger.log("Grid removed from DOM")})}updateLayoutClasses(t,i){const s=this.eRootWrapperBody.classList;s.toggle("ag-layout-auto-height",i.autoHeight),s.toggle("ag-layout-normal",i.normal),s.toggle("ag-layout-print",i.print),this.addOrRemoveCssClass("ag-layout-auto-height",i.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",i.normal),this.addOrRemoveCssClass("ag-layout-print",i.print)}createTemplate(){const t=this.ctrl.showDropZones()?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":"",i=this.ctrl.showSideBar()?'<ag-side-bar ref="sideBar"></ag-side-bar>':"",s=this.ctrl.showStatusBar()?'<ag-status-bar ref="statusBar"></ag-status-bar>':"",n=this.ctrl.showWatermark()?"<ag-watermark></ag-watermark>":"";return`<div class="ag-root-wrapper" role="presentation">
|
|
250
|
+
${t}
|
|
251
|
+
<div class="ag-root-wrapper-body" ref="rootWrapperBody" role="presentation">
|
|
252
|
+
<ag-grid-body ref="gridBody"></ag-grid-body>
|
|
253
|
+
${i}
|
|
254
|
+
</div>
|
|
255
|
+
${s}
|
|
256
|
+
<ag-pagination></ag-pagination>
|
|
257
|
+
${n}
|
|
258
|
+
</div>`}getFocusableElement(){return this.eRootWrapperBody}getFocusableContainers(){const t=[this.gridBodyComp.getGui()];return this.sideBarComp&&t.push(this.sideBarComp.getGui()),t.filter(i=>oi(i))}};c([f("loggerFactory")],nu.prototype,"loggerFactory",2);c([N("gridBody")],nu.prototype,"gridBodyComp",2);c([N("sideBar")],nu.prototype,"sideBarComp",2);c([N("rootWrapperBody")],nu.prototype,"eRootWrapperBody",2);c([M],nu.prototype,"postConstruct",1);var Eo=class extends L{progressSort(e,t,i){const s=this.getNextSortDirection(e);this.setSortForColumn(e,s,t,i)}setSortForColumn(e,t,i,s){t!=="asc"&&t!=="desc"&&(t=null);const n=this.gos.isColumnsSortingCoupledToGroup();let o=[e];if(n&&e.getColDef().showRowGroup){const a=this.columnModel.getSourceColumnsForGroupColumn(e),u=a==null?void 0:a.filter(d=>d.isSortable());u&&(o=[e,...u])}o.forEach(a=>a.setSort(t,s));const r=(i||this.gos.get("alwaysMultiSort"))&&!this.gos.get("suppressMultiSort"),l=[];if(!r){const a=this.clearSortBarTheseColumns(o,s);l.push(...a)}this.updateSortIndex(e),l.push(...o),this.dispatchSortChangedEvents(s,l)}updateSortIndex(e){const t=this.gos.isColumnsSortingCoupledToGroup(),i=this.columnModel.getGroupDisplayColumnForGroup(e.getId()),s=t&&i||e,n=this.getColumnsWithSortingOrdered();this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(l=>l.setSortIndex(null));const o=n.filter(l=>t&&l.getColDef().showRowGroup?!1:l!==s);(s.getSort()?[...o,s]:o).forEach((l,a)=>{l.setSortIndex(a)})}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){const t=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(i=>!!i.getSort());return t&&t.length>0}dispatchSortChangedEvents(e,t){const i={type:g.EVENT_SORT_CHANGED,source:e};t&&(i.columns=t),this.eventService.dispatchEvent(i)}clearSortBarTheseColumns(e,t){const i=[];return this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(s=>{e.includes(s)||(s.getSort()&&i.push(s),s.setSort(void 0,t))}),i}getNextSortDirection(e){let t;if(e.getColDef().sortingOrder?t=e.getColDef().sortingOrder:this.gos.get("sortingOrder")?t=this.gos.get("sortingOrder"):t=Eo.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 ${t}`),null;const i=t.indexOf(e.getSort()),s=i<0,n=i==t.length-1;let o;return s||n?o=t[0]:o=t[i+1],Eo.DEFAULT_SORTING_ORDER.indexOf(o)<0?(console.warn("AG Grid: invalid sort type "+o),null):o}getIndexedSortMap(){let e=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(o=>!!o.getSort());if(this.columnModel.isPivotMode()){const o=this.gos.isColumnsSortingCoupledToGroup();e=e.filter(r=>{const l=!!r.getAggFunc(),a=!r.isPrimary(),u=o?this.columnModel.getGroupDisplayColumnForGroup(r.getId()):r.getColDef().showRowGroup;return l||a||u})}const t=this.columnModel.getRowGroupColumns().filter(o=>!!o.getSort()),i={};e.forEach((o,r)=>i[o.getId()]=r),e.sort((o,r)=>{const l=o.getSortIndex(),a=r.getSortIndex();if(l!=null&&a!=null)return l-a;if(l==null&&a==null){const u=i[o.getId()],d=i[r.getId()];return u>d?1:-1}else return a==null?-1:1});const s=this.gos.isColumnsSortingCoupledToGroup()&&!!t.length;s&&(e=[...new Set(e.map(o=>{var r;return(r=this.columnModel.getGroupDisplayColumnForGroup(o.getId()))!=null?r:o}))]);const n=new Map;return e.forEach((o,r)=>n.set(o,r)),s&&t.forEach(o=>{const r=this.columnModel.getGroupDisplayColumnForGroup(o.getId());n.set(o,n.get(r))}),n}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([e,t],[i,s])=>t-s).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){const t=this.gos.isColumnsSortingCoupledToGroup(),i=!!e.getColDef().showRowGroup;return t&&i}getDisplaySortForColumn(e){const t=this.columnModel.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!(t!=null&&t.length))return e.getSort();const s=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,n=s[0].getSort();return s.every(r=>r.getSort()==n)?n:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}};Eo.DEFAULT_SORTING_ORDER=["asc","desc",null];c([f("columnModel")],Eo.prototype,"columnModel",2);Eo=c([H("sortController")],Eo);var Se=class extends L{static addKeyboardModeEvents(e){this.instanceCount>0||(e.addEventListener("keydown",Se.toggleKeyboardMode),e.addEventListener("mousedown",Se.toggleKeyboardMode))}static removeKeyboardModeEvents(e){this.instanceCount>0||(e.addEventListener("keydown",Se.toggleKeyboardMode),e.addEventListener("mousedown",Se.toggleKeyboardMode))}static toggleKeyboardMode(e){const t=Se.keyboardModeActive,i=e.type==="keydown";i&&(e.ctrlKey||e.metaKey||e.altKey)||t!==i&&(Se.keyboardModeActive=i)}static unregisterGridCompController(e){Se.removeKeyboardModeEvents(e)}init(){const e=this.clearFocusedCell.bind(this);this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverythingChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_GROUP_OPENED,e),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.registerKeyboardFocusEvents(),this.ctrlsService.whenReady(t=>{this.gridCtrl=t.gridCtrl})}registerKeyboardFocusEvents(){const e=this.gos.getDocument();Se.addKeyboardModeEvents(e),Se.instanceCount++,this.addDestroyFunc(()=>{Se.instanceCount--,Se.unregisterGridCompController(e)})}onColumnEverythingChanged(){if(!this.focusedCellPosition)return;const e=this.focusedCellPosition.column,t=this.columnModel.getGridColumn(e.getId());e!==t&&this.clearFocusedCell()}isKeyboardMode(){return Se.keyboardModeActive}getFocusCellToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(this.gos.getActiveDomElement(),lo.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(this.gos.getActiveDomElement(),Xc.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition}isDomDataMissingInHierarchy(e,t){let i=e;for(;i;){if(this.gos.getDomData(i,t))return!1;i=i.parentNode}return!0}getFocusedCell(){return this.focusedCellPosition}shouldRestoreFocus(e){return this.isCellRestoreFocused(e)?(setTimeout(()=>{this.restoredFocusedCellPosition=null},0),!0):!1}isCellRestoreFocused(e){return this.restoredFocusedCellPosition==null?!1:this.cellPositionUtils.equals(e,this.restoredFocusedCellPosition)}setRestoreFocusedCell(e){this.getFrameworkOverrides().renderingEngine==="react"&&(this.restoredFocusedCellPosition=e)}getFocusEventParams(){const{rowIndex:e,rowPinned:t,column:i}=this.focusedCellPosition,s={rowIndex:e,rowPinned:t,column:i,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:e,rowPinned:t});return n&&(s.isFullWidthCell=n.isFullWidth()),s}clearFocusedCell(){if(this.restoredFocusedCellPosition=null,this.focusedCellPosition==null)return;const e=$({type:g.EVENT_CELL_FOCUS_CLEARED},this.getFocusEventParams());this.focusedCellPosition=null,this.eventService.dispatchEvent(e)}setFocusedCell(e){const{column:t,rowIndex:i,rowPinned:s,forceBrowserFocus:n=!1,preventScrollOnBrowserFocus:o=!1}=e,r=this.columnModel.getGridColumn(t);if(!r){this.focusedCellPosition=null;return}this.focusedCellPosition=r?{rowIndex:i,rowPinned:Cs(s),column:r}:null;const l=Me($({type:g.EVENT_CELL_FOCUSED},this.getFocusEventParams()),{forceBrowserFocus:n,preventScrollOnBrowserFocus:o,floating:null});this.eventService.dispatchEvent(l)}isCellFocused(e){return this.focusedCellPosition==null?!1:this.cellPositionUtils.equals(e,this.focusedCellPosition)}isRowNodeFocused(e){return this.isRowFocused(e.rowIndex,e.rowPinned)}isHeaderWrapperFocused(e){if(this.focusedHeaderPosition==null)return!1;const t=e.getColumnGroupChild(),i=e.getRowIndex(),s=e.getPinned(),{column:n,headerRowIndex:o}=this.focusedHeaderPosition;return t===n&&i===o&&s==n.getPinned()}clearFocusedHeader(){this.focusedHeaderPosition=null}getFocusedHeader(){return this.focusedHeaderPosition}setFocusedHeader(e,t){this.focusedHeaderPosition={headerRowIndex:e,column:t}}focusHeaderPosition(e){if(this.gos.get("suppressHeaderFocus"))return!1;const{direction:t,fromTab:i,allowUserOverride:s,event:n,fromCell:o,rowWithoutSpanValue:r}=e;let{headerPosition:l}=e;if(o&&this.filterManager.isAdvancedFilterHeaderActive())return this.focusAdvancedFilter(l);if(s){const a=this.getFocusedHeader(),u=this.headerNavigationService.getHeaderRowCount();if(i){const d=this.gos.getCallback("tabToNextHeader");d&&(l=this.getHeaderPositionFromUserFunc({userFunc:d,direction:t,currentPosition:a,headerPosition:l,headerRowCount:u}))}else{const d=this.gos.getCallback("navigateToNextHeader");if(d&&n){const h={key:n.key,previousHeaderPosition:a,nextHeaderPosition:l,headerRowCount:u,event:n};l=d(h)}}}return l?this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:n,fromCell:o,rowWithoutSpanValue:r}):!1}focusHeaderPositionFromUserFunc(e){if(this.gos.get("suppressHeaderFocus"))return!1;const{userFunc:t,headerPosition:i,direction:s,event:n}=e,o=this.getFocusedHeader(),r=this.headerNavigationService.getHeaderRowCount(),l=this.getHeaderPositionFromUserFunc({userFunc:t,direction:s,currentPosition:o,headerPosition:i,headerRowCount:r});return!!l&&this.focusProvidedHeaderPosition({headerPosition:l,direction:s,event:n})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:i,currentPosition:s,headerPosition:n,headerRowCount:o}=e,l=t({backwards:i==="Before",previousHeaderPosition:s,nextHeaderPosition:n,headerRowCount:o});return l===!0||l===null?(l===null&&K("Returning `null` from tabToNextHeader is deprecated. Return `true` to stay on the current header, or `false` to let the browser handle the tab behaviour."),s):l===!1?null:l}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:i,fromCell:s,rowWithoutSpanValue:n,event:o}=e;if(t.headerRowIndex===-1)return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView(t.column);this.headerNavigationService.scrollToColumn(t.column,i);const l=this.ctrlsService.getHeaderRowContainerCtrl(t.column.getPinned()).focusHeader(t.headerRowIndex,t.column,o);return l&&(n!=null||s)&&this.headerNavigationService.setCurrentHeaderRowWithoutSpan(n??-1),l}focusFirstHeader(){let e=this.columnModel.getAllDisplayedColumns()[0];if(!e)return!1;e.getParent()&&(e=this.columnModel.getColumnGroupAtLevel(e,0));const t=this.headerPositionUtils.getHeaderIndexToFocus(e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){const t=this.headerNavigationService.getHeaderRowCount()-1,i=de(this.columnModel.getAllDisplayedColumns());return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:i},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCellPosition}isRowFocused(e,t){return this.focusedCellPosition==null?!1:this.focusedCellPosition.rowIndex===e&&this.focusedCellPosition.rowPinned===Cs(t)}findFocusableElements(e,t,i=!1){const s=jE;let n=sm;t&&(n+=", "+t),i&&(n+=', [tabindex="-1"]');const o=Array.prototype.slice.apply(e.querySelectorAll(s)).filter(a=>oi(a)),r=Array.prototype.slice.apply(e.querySelectorAll(n));return r.length?((a,u)=>a.filter(d=>u.indexOf(d)===-1))(o,r):o}focusInto(e,t=!1,i=!1){const s=this.findFocusableElements(e,null,i),n=t?de(s):s[0];return n?(n.focus({preventScroll:!0}),!0):!1}findFocusableElementBeforeTabGuard(e,t){if(!t)return null;const i=this.findFocusableElements(e),s=i.indexOf(t);if(s===-1)return null;let n=-1;for(let o=s-1;o>=0;o--)if(i[o].classList.contains("ag-tab-guard-top")){n=o;break}return n<=0?null:i[n-1]}findNextFocusableElement(e=this.eGridDiv,t,i){const s=this.findFocusableElements(e,t?':not([tabindex="-1"])':null),n=this.gos.getActiveDomElement();let o;t?o=s.findIndex(l=>l.contains(n)):o=s.indexOf(n);const r=o+(i?-1:1);return r<0||r>=s.length?null:s[r]}isTargetUnderManagedComponent(e,t){if(!t)return!1;const i=e.querySelectorAll(`.${Ln.FOCUS_MANAGED_CLASS}`);if(!i.length)return!1;for(let s=0;s<i.length;s++)if(i[s].contains(t))return!0;return!1}findTabbableParent(e,t=5){let i=0;for(;e&&Vd(e)===null&&++i<=t;)e=e.parentElement;return Vd(e)===null?null:e}focusGridView(e,t){var i;if(this.gos.get("suppressCellFocus"))return t?this.gos.get("suppressHeaderFocus")?this.focusNextGridCoreContainer(!0,!0):this.focusLastHeader():this.focusNextGridCoreContainer(!1);const s=t?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(!s)return!1;const{rowIndex:n,rowPinned:o}=s,r=this.getFocusedHeader();return!e&&r&&(e=r.column),n==null||!e?!1:(this.navigationService.ensureCellVisible({rowIndex:n,column:e,rowPinned:o}),this.setFocusedCell({rowIndex:n,column:e,rowPinned:Cs(o),forceBrowserFocus:!0}),(i=this.rangeService)==null||i.setRangeToCell({rowIndex:n,rowPinned:o,column:e}),!0)}focusNextGridCoreContainer(e,t=!1){return!t&&this.gridCtrl.focusNextInnerContainer(e)?!0:((t||!e&&!this.gridCtrl.isDetailGrid())&&this.gridCtrl.forceFocusOutOfContainer(e),!1)}focusAdvancedFilter(e){var t,i;return this.advancedFilterFocusColumn=e==null?void 0:e.column,(i=(t=this.advancedFilterService)==null?void 0:t.getCtrl().focusHeaderComp())!=null?i:!1}focusNextFromAdvancedFilter(e,t){var i,s;const n=(s=t?void 0:this.advancedFilterFocusColumn)!=null?s:(i=this.columnModel.getAllDisplayedColumns())==null?void 0:i[0];return e?this.focusHeaderPosition({headerPosition:{column:n,headerRowIndex:this.headerNavigationService.getHeaderRowCount()-1}}):this.focusGridView(n)}clearAdvancedFilterColumn(){this.advancedFilterFocusColumn=void 0}};Se.keyboardModeActive=!1;Se.instanceCount=0;c([f("eGridDiv")],Se.prototype,"eGridDiv",2);c([f("columnModel")],Se.prototype,"columnModel",2);c([f("headerNavigationService")],Se.prototype,"headerNavigationService",2);c([f("headerPositionUtils")],Se.prototype,"headerPositionUtils",2);c([f("rowRenderer")],Se.prototype,"rowRenderer",2);c([f("rowPositionUtils")],Se.prototype,"rowPositionUtils",2);c([f("cellPositionUtils")],Se.prototype,"cellPositionUtils",2);c([f("navigationService")],Se.prototype,"navigationService",2);c([f("ctrlsService")],Se.prototype,"ctrlsService",2);c([f("filterManager")],Se.prototype,"filterManager",2);c([fe("rangeService")],Se.prototype,"rangeService",2);c([fe("advancedFilterService")],Se.prototype,"advancedFilterService",2);c([M],Se.prototype,"init",1);Se=c([H("focusService")],Se);var Pg=class extends L{setMouseOver(e){this.selectedColumns=e;const t={type:g.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(t)}clearMouseOver(){this.selectedColumns=null;const e={type:g.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(e)}isHovered(e){return!!this.selectedColumns&&this.selectedColumns.indexOf(e)>=0}};Pg=c([H("columnHoverService")],Pg);var Ea=class extends L{constructor(){super(...arguments),this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.ctrlsService.whenReady(e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){this.active||this.gos.get("suppressColumnMoveAnimation")||this.gos.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0)}finish(){this.active&&this.flush(()=>{this.active=!1})}executeNextVMTurn(e){this.active?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount;this.gridBodyCtrl.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&this.gridBodyCtrl.setColumnMovingCss(!1)})}flush(e){if(this.executeNextFuncs.length===0&&this.executeLaterFuncs.length===0){e();return}const t=i=>{for(;i.length;){const s=i.pop();s&&s()}};this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>t(this.executeNextFuncs),0),window.setTimeout(()=>{e(),t(this.executeLaterFuncs)},200)})}};c([f("ctrlsService")],Ea.prototype,"ctrlsService",2);c([M],Ea.prototype,"postConstruct",1);Ea=c([H("columnAnimationService")],Ea);var Nr=class extends L{postConstruct(){this.ctrlsService.whenReady(e=>{this.centerRowsCtrl=e.center,this.addManagedListener(this.eventService,g.EVENT_BODY_HEIGHT_CHANGED,this.checkPageSize.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,this.checkPageSize.bind(this)),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.paginationProxy.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.getViewportSizeFeature().getBodyHeight();if(e>0){const t=()=>{const i=this.gos.getRowHeightAsNumber(),s=Math.floor(e/i);this.paginationProxy.setPageSize(s,"autoCalculated")};this.isBodyRendered?Nt(()=>t(),50)():(t(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};c([f("ctrlsService")],Nr.prototype,"ctrlsService",2);c([f("paginationProxy")],Nr.prototype,"paginationProxy",2);c([M],Nr.prototype,"postConstruct",1);Nr=c([H("paginationAutoPageSizeService")],Nr);var jd=class extends L{constructor(){super(...arguments),this.cacheVersion=0}init(){this.active=this.gos.get("valueCache"),this.neverExpires=this.gos.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,i){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[t]=i)}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}};c([M],jd.prototype,"init",1);jd=c([H("valueCache")],jd);var xL="paste",_r=class extends L{init(){this.rowModel.getType()==="clientSide"&&(this.clientSideRowModel=this.rowModel),this.addManagedListener(this.eventService,g.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged.bind(this))}onCellValueChanged(e){e.source!==xL&&this.doChangeDetection(e.node,e.column)}doChangeDetection(e,t){if(this.gos.get("suppressChangeDetection"))return;const i=[e];if(this.clientSideRowModel&&!e.isRowPinned()){const s=this.gos.get("aggregateOnlyChangedColumns"),n=new th(s,this.clientSideRowModel.getRootNode());n.addParentNode(e.parent,[t]),this.clientSideRowModel.doAggregate(n),n.forEachChangedNodeDepthFirst(o=>{i.push(o)})}this.rowRenderer.refreshCells({rowNodes:i})}};c([f("rowModel")],_r.prototype,"rowModel",2);c([f("rowRenderer")],_r.prototype,"rowRenderer",2);c([M],_r.prototype,"init",1);_r=c([H("changeDetectionService")],_r);var Yd=class extends L{adaptFunction(e,t){const i=this.componentMetadataProvider.retrieve(e);return i&&i.functionAdapter?i.functionAdapter(t):null}adaptCellRendererFunction(e){class t{refresh(s){return!1}getGui(){return this.eGui}init(s){const n=e(s),o=typeof n;if(o==="string"||o==="number"||o==="boolean"){this.eGui=ei("<span>"+n+"</span>");return}if(n==null){this.eGui=ei("<span></span>");return}this.eGui=n}}return t}doesImplementIComponent(e){return e?e.prototype&&"getGui"in e.prototype:!1}};c([f("componentMetadataProvider")],Yd.prototype,"componentMetadataProvider",2);Yd=c([H("agComponentUtils")],Yd);var Ra=class extends L{postConstruct(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","onParamsUpdated","refresh"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},headerComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},loadingOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},noRowsOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},floatingFilterComponent:{mandatoryMethodList:["onParentModelChanged"],optionalMethodList:["afterGuiAttached","onParamsUpdated","refresh"]},cellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},cellEditor:{mandatoryMethodList:["getValue"],optionalMethodList:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},innerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},fullWidthCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},groupRowRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},filter:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["refresh"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","getState"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]},menuItem:{mandatoryMethodList:[],optionalMethodList:["setActive","select","setExpanded","configureDefaults"]}}}retrieve(e){return this.componentMetaData[e]}};c([f("agComponentUtils")],Ra.prototype,"agComponentUtils",2);c([M],Ra.prototype,"postConstruct",1);Ra=c([H("componentMetadataProvider")],Ra);var NL=25,bv=10,qh=8,_L=4,Xh=4,Zh=6,OL=16,Lv=14,Jh=8,GL={"ag-theme-custom":{headerHeight:25,headerCellMinWidth:24,listItemHeight:_L*5,rowHeight:25,chartMenuPanelWidth:220},"ag-theme-material":{headerHeight:qh*7,headerCellMinWidth:48,listItemHeight:qh*4,rowHeight:qh*6,chartMenuPanelWidth:240},"ag-theme-balham":{headerHeight:Xh*8,headerCellMinWidth:24,listItemHeight:Xh*6,rowHeight:Xh*7,chartMenuPanelWidth:220},"ag-theme-alpine":{headerHeight:Zh*8,headerCellMinWidth:36,listItemHeight:Zh*4,rowHeight:Zh*7,chartMenuPanelWidth:240},"ag-theme-quartz":{headerHeight:Lv+Jh*4.25,headerCellMinWidth:36,listItemHeight:OL+Jh,rowHeight:Lv+Jh*3.5,chartMenuPanelWidth:260}},Mv={headerHeight:["ag-header-row"],headerCellMinWidth:["ag-header-cell"],listItemHeight:["ag-virtual-list-item"],rowHeight:["ag-row"],chartMenuPanelWidth:["ag-chart-docked-container"]},Ta=class extends L{constructor(){super(...arguments),this.calculatedSizes={},this.calculatedTheme=null}postConstruct(){var e;const t=(e=this.getTheme().el)!=null?e:this.eGridDiv;this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.mutationObserver=new MutationObserver(()=>{this.calculatedSizes={},this.calculatedTheme=null,this.calculatedTheme=this.getTheme(),this.fireGridStylesChangedEvent()}),this.mutationObserver.observe(t||this.eGridDiv,{attributes:!0,attributeFilter:["class"]})}fireGridStylesChangedEvent(){const e={type:g.EVENT_GRID_STYLES_CHANGED};this.eventService.dispatchEvent(e)}getSassVariable(e){const{themeFamily:t,el:i}=this.getTheme();if(!t||t.indexOf("ag-theme")!==0)return;this.calculatedSizes||(this.calculatedSizes={}),this.calculatedSizes[t]||(this.calculatedSizes[t]={});const s=this.calculatedSizes[t][e];return s??(this.calculatedSizes[t][e]=this.calculateValueForSassProperty(e,t,i),this.calculatedSizes[t][e])}calculateValueForSassProperty(e,t,i){const s="ag-theme-"+(t.match("material")?"material":t.match("balham")?"balham":t.match("alpine")?"alpine":"custom"),n=GL[s][e],o=this.gos.getDocument();if(i||(i=this.eGridDiv),!Mv[e])return n;const r=Mv[e],l=o.createElement("div"),a=Array.from(i.classList);l.classList.add(t,...a),l.style.position="absolute";const u=r.reduce((h,p)=>{const C=o.createElement("div");return C.style.position="static",C.classList.add(p),h.appendChild(C),C},l);let d=0;if(o.body){o.body.appendChild(l);const h=e.toLowerCase().indexOf("height")!==-1?"height":"width";d=parseInt(window.getComputedStyle(u)[h],10),o.body.removeChild(l)}return d||n}isThemeDark(){const{theme:e}=this.getTheme();return!!e&&e.indexOf("dark")>=0}chartMenuPanelWidth(){return this.getSassVariable("chartMenuPanelWidth")}getTheme(){if(this.calculatedTheme)return this.calculatedTheme;const e=/\bag-(material|(?:theme-([\w\-]*)))\b/g;let t=this.eGridDiv,i=null,s=[];for(;t;)if(i=e.exec(t.className),!i)t=t.parentElement||void 0;else{const o=t.className.match(e);o&&(s=o);break}if(!i)return{allThemes:s};const n=i[0];return this.calculatedTheme={theme:n,el:t,themeFamily:n.replace(/-dark$/,""),allThemes:s},this.calculatedTheme}getFromTheme(e,t){var i;return(i=this.getSassVariable(t))!=null?i:e}getDefaultRowHeight(){return this.getFromTheme(NL,"rowHeight")}getListItemHeight(){return this.getFromTheme(20,"listItemHeight")}refreshRowHeightVariable(){const e=this.eGridDiv.style.getPropertyValue("--ag-line-height").trim(),t=this.gos.get("rowHeight");if(t==null||isNaN(t)||!isFinite(t))return e!==null&&this.eGridDiv.style.setProperty("--ag-line-height",null),-1;const i=`${t}px`;return e!=i?(this.eGridDiv.style.setProperty("--ag-line-height",i),t):e!=""?parseFloat(e):-1}getMinColWidth(){const e=this.getFromTheme(null,"headerCellMinWidth");return b(e)?Math.max(e,bv):bv}destroy(){this.calculatedSizes=null,this.mutationObserver&&this.mutationObserver.disconnect(),super.destroy()}};c([f("eGridDiv")],Ta.prototype,"eGridDiv",2);c([M],Ta.prototype,"postConstruct",1);Ta=c([H("environment")],Ta);var Or=class extends L{constructor(){super(...arguments),this.scrollY=0,this.uiBodyHeight=0}agWire(e){this.logger=e.create("RowContainerHeightService")}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_BODY_HEIGHT_CHANGED,this.updateOffset.bind(this)),this.maxDivHeight=kE(),this.logger.log("maxDivHeight = "+this.maxDivHeight)}isStretching(){return this.stretching}getDivStretchOffset(){return this.divStretchOffset}updateOffset(){if(!this.stretching)return;const t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition().top,i=this.getUiBodyHeight();(t!==this.scrollY||i!==this.uiBodyHeight)&&(this.scrollY=t,this.uiBodyHeight=i,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;this.logger.log(`Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventService.dispatchEvent({type:g.EVENT_ROW_CONTAINER_HEIGHT_CHANGED}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventService.dispatchEvent({type:g.EVENT_HEIGHT_SCALE_CHANGED}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getUiContainerHeight(){return this.uiContainerHeight}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition();return t.bottom-t.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),i=e/t;return this.maxScrollY*i}};c([f("ctrlsService")],Or.prototype,"ctrlsService",2);c([Qi(0,Li("loggerFactory"))],Or.prototype,"agWire",1);c([M],Or.prototype,"postConstruct",1);Or=c([H("rowContainerHeightService")],Or);var Gr=class extends L{init(){this.addManagedPropertyListener("isRowSelectable",()=>this.updateSelectable())}updateSelectableAfterGrouping(){this.updateSelectable(!0)}updateSelectable(e=!1){const t=!!this.gos.get("rowSelection"),i=this.gos.get("isRowSelectable");if(!t||!i)return;const s=this.gos.get("groupSelectsChildren"),n=this.rowModel.getType()==="clientSide"&&s,o=[],r=l=>{if(e&&!l.group)return;if(n&&l.group){const u=l.childrenAfterGroup.some(d=>d.selectable===!0);l.setRowSelectable(u,!0);return}const a=i?i(l):!0;l.setRowSelectable(a,!0),!a&&l.isSelected()&&o.push(l)};if(n){const l=this.rowModel;new th(!1,l.getRootNode()).forEachChangedNodeDepthFirst(r,!0,!0)}else this.rowModel.forEachNode(r);o.length&&this.selectionService.setNodesSelected({nodes:o,newValue:!1,source:"selectableChanged"}),n&&this.selectionService instanceof So&&this.selectionService.updateGroupsFromChildrenSelections("selectableChanged")}};c([f("rowModel")],Gr.prototype,"rowModel",2);c([f("selectionService")],Gr.prototype,"selectionService",2);c([M],Gr.prototype,"init",1);Gr=c([H("selectableService")],Gr);var li=class extends Z{constructor(){super(),this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate());const{btFirst:t,btPrevious:i,btNext:s,btLast:n,pageSizeComp:o}=this;this.activateTabIndex([t,i,s,n]),t.insertAdjacentElement("afterbegin",Oe(e?"last":"first",this.gos)),i.insertAdjacentElement("afterbegin",Oe(e?"next":"previous",this.gos)),s.insertAdjacentElement("afterbegin",Oe(e?"previous":"next",this.gos)),n.insertAdjacentElement("afterbegin",Oe(e?"first":"last",this.gos)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.onPaginationChanged()}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateRowLabels(),this.setCurrentPageLabel(),this.setTotalLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){this.areListenersSetup||(this.addManagedListener(this.eventService,g.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(e=>{const{el:t,fn:i}=e;this.addManagedListener(t,"click",i),this.addManagedListener(t,"keydown",s=>{(s.key===D.ENTER||s.key===D.SPACE)&&(s.preventDefault(),i())})}),this.areListenersSetup=!0)}onBtFirst(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToFirstPage()}setCurrentPageLabel(){const e=this.paginationProxy.getTotalPages()>0,t=this.paginationProxy.getCurrentPage(),i=e?t+1:0;this.lbCurrent.textContent=this.formatNumber(i)}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");if(t)return t({value:e});const i=this.localeService.getLocaleTextFunc(),s=i("thousandSeparator",","),n=i("decimalSeparator",".");return im(e,s,n)}getTemplate(){const e=this.localeService.getLocaleTextFunc(),t=e("page","Page"),i=e("to","to"),s=e("of","of"),n=e("firstPage","First Page"),o=e("previousPage","Previous Page"),r=e("nextPage","Next Page"),l=e("lastPage","Last Page"),a=this.getCompId();return`<div class="ag-paging-panel ag-unselectable" id="ag-${a}">
|
|
259
|
+
<ag-page-size-selector ref="pageSizeComp"></ag-page-size-selector>
|
|
260
|
+
<span class="ag-paging-row-summary-panel" role="status">
|
|
261
|
+
<span id="ag-${a}-first-row" ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>
|
|
262
|
+
<span id="ag-${a}-to">${i}</span>
|
|
263
|
+
<span id="ag-${a}-last-row" ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>
|
|
264
|
+
<span id="ag-${a}-of">${s}</span>
|
|
265
|
+
<span id="ag-${a}-row-count" ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>
|
|
266
|
+
</span>
|
|
267
|
+
<span class="ag-paging-page-summary-panel" role="presentation">
|
|
268
|
+
<div ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="${n}"></div>
|
|
269
|
+
<div ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="${o}"></div>
|
|
270
|
+
<span class="ag-paging-description" role="status">
|
|
271
|
+
<span id="ag-${a}-start-page">${t}</span>
|
|
272
|
+
<span id="ag-${a}-start-page-number" ref="lbCurrent" class="ag-paging-number"></span>
|
|
273
|
+
<span id="ag-${a}-of-page">${s}</span>
|
|
274
|
+
<span id="ag-${a}-of-page-number" ref="lbTotal" class="ag-paging-number"></span>
|
|
275
|
+
</span>
|
|
276
|
+
<div ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="${r}"></div>
|
|
277
|
+
<div ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="${l}"></div>
|
|
278
|
+
</span>
|
|
279
|
+
</div>`}onBtNext(){this.nextButtonDisabled||this.paginationProxy.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.paginationProxy.goToLastPage()}enableOrDisableButtons(){const e=this.paginationProxy.getCurrentPage(),t=this.paginationProxy.isLastPageFound(),i=this.paginationProxy.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const s=this.isZeroPagesToDisplay(),n=e===i-1;this.nextButtonDisabled=n||s,this.lastButtonDisabled=!t||s||e===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){Kf(e,t),e.classList.toggle("ag-disabled",t)}updateRowLabels(){const e=this.paginationProxy.getCurrentPage(),t=this.paginationProxy.getPageSize(),i=this.paginationProxy.isLastPageFound(),s=this.paginationProxy.isLastPageFound()?this.paginationProxy.getMasterRowCount():null;let n,o;if(this.isZeroPagesToDisplay()?n=o=0:(n=t*e+1,o=n+t-1,i&&o>s&&(o=s)),this.lbFirstRowOnPage.textContent=this.formatNumber(n),this.rowNodeBlockLoader.isLoading()){const r=this.localeService.getLocaleTextFunc();this.lbLastRowOnPage.innerHTML=r("pageLastRowUnknown","?")}else this.lbLastRowOnPage.textContent=this.formatNumber(o)}isZeroPagesToDisplay(){const e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages();return e&&t===0}setTotalLabels(){const e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages(),i=e?this.paginationProxy.getMasterRowCount():null;if(i===1){const s=this.paginationProxy.getRow(0);if(s&&s.group&&!(s.groupData||s.aggData)){this.setTotalLabelsToZero();return}}if(e)this.lbTotal.textContent=this.formatNumber(t),this.lbRecordCount.textContent=this.formatNumber(i);else{const s=this.localeService.getLocaleTextFunc()("more","more");this.lbTotal.innerHTML=s,this.lbRecordCount.innerHTML=s}}setTotalLabelsToZero(){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)}};c([f("paginationProxy")],li.prototype,"paginationProxy",2);c([f("rowNodeBlockLoader")],li.prototype,"rowNodeBlockLoader",2);c([N("btFirst")],li.prototype,"btFirst",2);c([N("btPrevious")],li.prototype,"btPrevious",2);c([N("btNext")],li.prototype,"btNext",2);c([N("btLast")],li.prototype,"btLast",2);c([N("lbRecordCount")],li.prototype,"lbRecordCount",2);c([N("lbFirstRowOnPage")],li.prototype,"lbFirstRowOnPage",2);c([N("lbLastRowOnPage")],li.prototype,"lbLastRowOnPage",2);c([N("lbCurrent")],li.prototype,"lbCurrent",2);c([N("lbTotal")],li.prototype,"lbTotal",2);c([N("pageSizeComp")],li.prototype,"pageSizeComp",2);c([M],li.prototype,"postConstruct",1);var ou=class ET extends Z{constructor(){super(ET.TEMPLATE),this.inProgress=!1,this.destroyRequested=!1}updateLayoutClasses(t,i){const s=this.eOverlayWrapper.classList;s.toggle("ag-layout-auto-height",i.autoHeight),s.toggle("ag-layout-normal",i.normal),s.toggle("ag-layout-print",i.print)}postConstruct(){this.createManagedBean(new Kc(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.overlayService.registerOverlayWrapperComp(this)}setWrapperTypeClass(t){const i=this.eOverlayWrapper.classList;this.activeOverlayWrapperCssClass&&i.toggle(this.activeOverlayWrapperCssClass,!1),this.activeOverlayWrapperCssClass=t,i.toggle(t,!0)}showOverlay(t,i,s){this.inProgress||(this.setWrapperTypeClass(i),this.destroyActiveOverlay(),this.inProgress=!0,t&&t.then(n=>{this.inProgress=!1,this.eOverlayWrapper.appendChild(n.getGui()),this.activeOverlay=n,this.updateListenerDestroyFunc=s,this.destroyRequested&&(this.destroyRequested=!1,this.destroyActiveOverlay())}),this.setDisplayed(!0,{skipAriaHidden:!0}))}destroyActiveOverlay(){var t;if(this.inProgress){this.destroyRequested=!0;return}this.activeOverlay&&(this.activeOverlay=this.getContext().destroyBean(this.activeOverlay),(t=this.updateListenerDestroyFunc)==null||t.call(this),je(this.eOverlayWrapper))}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}destroy(){this.destroyActiveOverlay(),super.destroy()}};ou.TEMPLATE=`
|
|
280
|
+
<div class="ag-overlay" role="presentation">
|
|
281
|
+
<div class="ag-overlay-panel" role="presentation">
|
|
282
|
+
<div class="ag-overlay-wrapper" ref="eOverlayWrapper" role="presentation"></div>
|
|
283
|
+
</div>
|
|
284
|
+
</div>`;c([f("overlayService")],ou.prototype,"overlayService",2);c([N("eOverlayWrapper")],ou.prototype,"eOverlayWrapper",2);c([M],ou.prototype,"postConstruct",1);var kL=ou,kr=class extends L{getFirstRow(){let e=0,t;return this.pinnedRowModel.getPinnedTopRowCount()?t="top":this.rowModel.getRowCount()?(t=null,e=this.paginationProxy.getPageFirstRow()):this.pinnedRowModel.getPinnedBottomRowCount()&&(t="bottom"),t===void 0?null:{rowIndex:e,rowPinned:t}}getLastRow(){let e,t=null;const i=this.pinnedRowModel.getPinnedBottomRowCount(),s=this.pinnedRowModel.getPinnedTopRowCount();return i?(t="bottom",e=i-1):this.rowModel.getRowCount()?(t=null,e=this.paginationProxy.getPageLastRow()):s&&(t="top",e=s-1),e===void 0?null:{rowIndex:e,rowPinned:t}}getRowNode(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)}}sameRow(e,t){return!e&&!t?!0:e&&!t||!e&&t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}before(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if(b(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}};c([f("rowModel")],kr.prototype,"rowModel",2);c([f("pinnedRowModel")],kr.prototype,"pinnedRowModel",2);c([f("paginationProxy")],kr.prototype,"paginationProxy",2);kr=c([H("rowPositionUtils")],kr);var Fg=class extends L{createId(e){const{rowIndex:t,rowPinned:i,column:s}=e;return this.createIdFromValues({rowIndex:t,column:s,rowPinned:i})}createIdFromValues(e){const{rowIndex:t,rowPinned:i,column:s}=e;return`${t}.${i??"null"}.${s.getId()}`}equals(e,t){const i=e.column===t.column,s=e.rowPinned===t.rowPinned,n=e.rowIndex===t.rowIndex;return i&&s&&n}};Fg=c([H("cellPositionUtils")],Fg);var Pl=class{constructor(e){this.cellValueChanges=e}},ep=class extends Pl{constructor(e,t,i,s){super(e),this.initialRange=t,this.finalRange=i,this.ranges=s}},RT=class TT{constructor(t){this.actionStack=[],this.maxStackSize=t||TT.DEFAULT_STACK_SIZE,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(t){t.cellValueChanges&&t.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(t))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}};RT.DEFAULT_STACK_SIZE=10;var Iv=RT,Ss=class extends L{constructor(){super(...arguments),this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},i=this.activeCellEdit!==null&&this.cellPositionUtils.equals(this.activeCellEdit,t),s=this.activeRowEdit!==null&&this.rowPositionUtils.sameRow(this.activeRowEdit,t);if(!(i||s||this.isPasting||this.isRangeInAction))return;const{rowPinned:o,rowIndex:r,column:l,oldValue:a,value:u}=e,d={rowPinned:o,rowIndex:r,columnId:l.getColId(),newValue:u,oldValue:a};this.cellValueChanges.push(d)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}init(){if(!this.gos.get("undoRedoCellEditing"))return;const e=this.gos.get("undoRedoCellEditingLimit");e<=0||(this.undoStack=new Iv(e),this.redoStack=new Iv(e),this.addRowEditingListeners(),this.addCellEditingListeners(),this.addPasteListeners(),this.addFillListeners(),this.addCellKeyListeners(),this.addManagedListener(this.eventService,g.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged),this.addManagedListener(this.eventService,g.EVENT_MODEL_UPDATED,t=>{t.keepUndoRedoStack||this.clearStacks()}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_GROUP_OPENED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_MOVED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PINNED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_ROW_DRAG_END,this.clearStacks),this.ctrlsService.whenReady(t=>{this.gridBodyCtrl=t.gridBodyCtrl}))}getCurrentUndoStackSize(){return this.undoStack?this.undoStack.getCurrentStackSize():0}getCurrentRedoStackSize(){return this.redoStack?this.redoStack.getCurrentStackSize():0}undo(e){const t={type:g.EVENT_UNDO_STARTED,source:e};this.eventService.dispatchEvent(t);const i=this.undoRedo(this.undoStack,this.redoStack,"initialRange","oldValue","undo"),s={type:g.EVENT_UNDO_ENDED,source:e,operationPerformed:i};this.eventService.dispatchEvent(s)}redo(e){const t={type:g.EVENT_REDO_STARTED,source:e};this.eventService.dispatchEvent(t);const i=this.undoRedo(this.redoStack,this.undoStack,"finalRange","newValue","redo"),s={type:g.EVENT_REDO_ENDED,source:e,operationPerformed:i};this.eventService.dispatchEvent(s)}undoRedo(e,t,i,s,n){if(!e)return!1;const o=e.pop();return!o||!o.cellValueChanges?!1:(this.processAction(o,r=>r[s],n),o instanceof ep?this.processRange(this.rangeService,o.ranges||[o[i]]):this.processCell(o.cellValueChanges),t.push(o),!0)}processAction(e,t,i){e.cellValueChanges.forEach(s=>{const{rowIndex:n,rowPinned:o,columnId:r}=s,l={rowIndex:n,rowPinned:o},a=this.rowPositionUtils.getRowNode(l);a.displayed&&a.setDataValue(r,t(s),i)})}processRange(e,t){let i;e.removeAllCellRanges(!0),t.forEach((s,n)=>{if(!s)return;const o=s.startRow,r=s.endRow;n===t.length-1&&(i={rowPinned:o.rowPinned,rowIndex:o.rowIndex,columnId:s.startColumn.getColId()},this.setLastFocusedCell(i));const l={rowStartIndex:o.rowIndex,rowStartPinned:o.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:s.startColumn,columns:s.columns};e.addCellRange(l)})}processCell(e){const t=e[0],{rowIndex:i,rowPinned:s}=t,n={rowIndex:i,rowPinned:s},o=this.rowPositionUtils.getRowNode(n),r={rowPinned:t.rowPinned,rowIndex:o.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r,this.rangeService)}setLastFocusedCell(e,t){const{rowIndex:i,columnId:s,rowPinned:n}=e,o=this.gridBodyCtrl.getScrollFeature(),r=this.columnModel.getGridColumn(s);if(!r)return;o.ensureIndexVisible(i),o.ensureColumnVisible(r);const l={rowIndex:i,column:r,rowPinned:n};this.focusService.setFocusedCell(Me($({},l),{forceBrowserFocus:!0})),t==null||t.setRangeToCell(l)}addRowEditingListeners(){this.addManagedListener(this.eventService,g.EVENT_ROW_EDITING_STARTED,e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}}),this.addManagedListener(this.eventService,g.EVENT_ROW_EDITING_STOPPED,()=>{const e=new Pl(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null})}addCellEditingListeners(){this.addManagedListener(this.eventService,g.EVENT_CELL_EDITING_STARTED,e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}}),this.addManagedListener(this.eventService,g.EVENT_CELL_EDITING_STOPPED,e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const i=new Pl(this.cellValueChanges);this.pushActionsToUndoStack(i)}})}addPasteListeners(){this.addManagedListener(this.eventService,g.EVENT_PASTE_START,()=>{this.isPasting=!0}),this.addManagedListener(this.eventService,g.EVENT_PASTE_END,()=>{const e=new Pl(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1})}addFillListeners(){this.addManagedListener(this.eventService,g.EVENT_FILL_START,()=>{this.isRangeInAction=!0}),this.addManagedListener(this.eventService,g.EVENT_FILL_END,e=>{const t=new ep(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1})}addCellKeyListeners(){this.addManagedListener(this.eventService,g.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,()=>{this.isRangeInAction=!0}),this.addManagedListener(this.eventService,g.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,()=>{let e;this.rangeService&&this.gos.get("enableRangeSelection")?e=new ep(this.cellValueChanges,void 0,void 0,[...this.rangeService.getCellRanges()]):e=new Pl(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1})}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}};c([f("focusService")],Ss.prototype,"focusService",2);c([f("ctrlsService")],Ss.prototype,"ctrlsService",2);c([f("cellPositionUtils")],Ss.prototype,"cellPositionUtils",2);c([f("rowPositionUtils")],Ss.prototype,"rowPositionUtils",2);c([f("columnModel")],Ss.prototype,"columnModel",2);c([fe("rangeService")],Ss.prototype,"rangeService",2);c([M],Ss.prototype,"init",1);Ss=c([H("undoRedoService")],Ss);var Da=class extends L{findHeader(e,t){let i,s;if(e.column instanceof at?i=this.columnModel.getDisplayedGroupAtDirection(e.column,t):(s=`getDisplayedCol${t}`,i=this.columnModel[s](e.column)),!i)return;let{headerRowIndex:n}=e;if(this.getHeaderRowType(n)!=="filter"){const l=[i];for(;i.getParent();)i=i.getParent(),l.push(i);i=l[l.length-1-n]}const{column:o,headerRowIndex:r}=this.getHeaderIndexToFocus(i,n);return{column:o,headerRowIndex:r}}getHeaderIndexToFocus(e,t){let i;if(e instanceof at&&this.isAnyChildSpanningHeaderHeight(e)&&e.isPadding()){const s=e;i=s.getLeafColumns()[0];let n=i;for(;n!==s;)t++,n=n.getParent()}return{column:i||e,headerRowIndex:t}}isAnyChildSpanningHeaderHeight(e){return e?e.getLeafColumns().some(t=>t.isSpanHeaderHeight()):!1}getColumnVisibleParent(e,t){const i=this.getHeaderRowType(t),s=i==="filter",n=i==="column";let o=s?e:e.getParent(),r=t-1,l=r;if(n&&this.isAnyChildSpanningHeaderHeight(e.getParent())){for(;o&&o.isPadding();)o=o.getParent(),r--;l=r,r<0&&(o=e,r=t,l=void 0)}return{column:o,headerRowIndex:r,headerRowIndexWithoutSpan:l}}getColumnVisibleChild(e,t,i="After"){const s=this.getHeaderRowType(t);let n=e,o=t+1,r=o;if(s==="group"){const l=e.getDisplayedLeafColumns(),a=i==="After"?l[0]:de(l),u=[];let d=a;for(;d.getParent()!==e;)d=d.getParent(),u.push(d);if(n=a,a.isSpanHeaderHeight())for(let h=u.length-1;h>=0;h--){const p=u[h];if(!p.isPadding()){n=p;break}o++}else n=de(u),n||(n=a)}return{column:n,headerRowIndex:o,headerRowIndexWithoutSpan:r}}getHeaderRowType(e){const t=this.ctrlsService.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}findColAtEdgeForHeaderRow(e,t){const i=this.columnModel.getAllDisplayedColumns(),s=i[t==="start"?0:i.length-1];if(!s)return;const o=this.ctrlsService.getHeaderRowContainerCtrl(s.getPinned()).getRowType(e);if(o=="group"){const r=this.columnModel.getColumnGroupAtLevel(s,e);return{headerRowIndex:e,column:r}}return{headerRowIndex:o==null?-1:e,column:s}}};c([f("columnModel")],Da.prototype,"columnModel",2);c([f("ctrlsService")],Da.prototype,"ctrlsService",2);Da=c([H("headerPositionUtils")],Da);var Ag=class{buildColumnDefs(e,t,i){const s=[],n={};return e.forEach(o=>{const r=this.createDefFromColumn(o,t,i);let l=!0,a=r,u=o.getOriginalParent(),d=null;for(;u;){let h=null;if(u.isPadding()){u=u.getOriginalParent();continue}const p=n[u.getGroupId()];if(p){p.children.push(a),l=!1;break}if(h=this.createDefFromGroup(u),h&&(h.children=[a],n[h.groupId]=h,a=h,u=u.getOriginalParent()),u!=null&&d===u){l=!1;break}d=u}l&&s.push(a)}),s}createDefFromGroup(e){const t=Nd(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,i){const s=Nd(e.getColDef());return s.colId=e.getColId(),s.width=e.getActualWidth(),s.rowGroup=e.isRowGroupActive(),s.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,s.pivot=e.isPivotActive(),s.pivotIndex=e.isPivotActive()?i.indexOf(e):null,s.aggFunc=e.isValueActive()?e.getAggFunc():null,s.hide=e.isVisible()?void 0:!0,s.pinned=e.isPinned()?e.getPinned():null,s.sort=e.getSort()?e.getSort():null,s.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,s}};Ag=c([H("columnDefFactory")],Ag);var Pa=class{getInitialRowClasses(e){const t=[];return b(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"),ug(t,this.processClassesFromGridOptions(e.rowNode)),ug(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&&(e.pinned==="left"&&t.push("ag-cell-last-left-pinned"),e.pinned==="right"&&t.push("ag-cell-first-right-pinned")),t}processClassesFromGridOptions(e){const t=[],i=o=>{typeof o=="string"?t.push(o):Array.isArray(o)&&o.forEach(r=>t.push(r))},s=this.gos.get("rowClass");if(s){if(typeof s=="function")return console.warn("AG Grid: rowClass should not be a function, please use getRowClass instead"),[];i(s)}const n=this.gos.getCallback("getRowClass");if(n){const o={data:e.data,node:e,rowIndex:e.rowIndex},r=n(o);i(r)}return t}preProcessRowClassRules(e){const t=[];return this.processRowClassRules(e,i=>{t.push(i)},i=>{}),t}processRowClassRules(e,t,i){const s=this.gos.addGridCommonParams({data:e.data,node:e,rowIndex:e.rowIndex});this.stylingService.processClassRules(void 0,this.gos.get("rowClassRules"),s,t,i)}calculateRowLevel(e){return e.group?e.level:e.parent?e.parent.level+1:0}};c([f("stylingService")],Pa.prototype,"stylingService",2);c([f("gridOptionsService")],Pa.prototype,"gos",2);Pa=c([H("rowCssClassCalculator")],Pa);var Vr=class extends L{init(){this.isAccentedSort=this.gos.get("accentedSort"),this.primaryColumnsSortGroups=this.gos.isColumnsSortingCoupledToGroup(),this.addManagedPropertyListener("accentedSort",e=>this.isAccentedSort=e.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=this.gos.isColumnsSortingCoupledToGroup())}doFullSort(e,t){const i=(n,o)=>({currentPos:o,rowNode:n}),s=e.map(i);return s.sort(this.compareRowNodes.bind(this,t)),s.map(n=>n.rowNode)}compareRowNodes(e,t,i){const s=t.rowNode,n=i.rowNode;for(let o=0,r=e.length;o<r;o++){const l=e[o],a=l.sort==="desc",u=this.getValue(s,l.column),d=this.getValue(n,l.column);let h;const p=this.getComparator(l,s);if(p?h=p(u,d,s,n,a):h=Q.defaultComparator(u,d,this.isAccentedSort),!isNaN(h)&&h!==0)return l.sort==="asc"?h:h*-1}return t.currentPos-i.currentPos}getComparator(e,t){const i=e.column,s=i.getColDef().comparator;if(s!=null)return s;if(!i.getColDef().showRowGroup)return;const n=!t.group&&i.getColDef().field;if(!n)return;const o=this.columnModel.getPrimaryColumn(n);if(o)return o.getColDef().comparator}getValue(e,t){var i,s;if(!this.primaryColumnsSortGroups)return this.valueService.getValue(t,e,!1,!1);if(e.rowGroupColumn===t){if(this.gos.isGroupUseEntireRow(this.columnModel.isPivotActive())){const l=(i=e.allLeafChildren)==null?void 0:i[0];return l?this.valueService.getValue(t,l,!1,!1):void 0}const r=this.columnModel.getGroupDisplayColumnForGroup(t.getId());return r?(s=e.groupData)==null?void 0:s[r.getId()]:void 0}if(!(e.group&&t.getColDef().showRowGroup))return this.valueService.getValue(t,e,!1,!1)}};c([f("valueService")],Vr.prototype,"valueService",2);c([f("columnModel")],Vr.prototype,"columnModel",2);c([M],Vr.prototype,"init",1);Vr=c([H("rowNodeSorter")],Vr);var uo=class extends L{constructor(){super(...arguments),this.params={},this.ready=!1,this.readyCallbacks=[]}checkReady(){const e=this.params;this.ready=e.gridCtrl!=null&&e.gridBodyCtrl!=null&&e.center!=null&&e.left!=null&&e.right!=null&&e.bottomCenter!=null&&e.bottomLeft!=null&&e.bottomRight!=null&&e.topCenter!=null&&e.topLeft!=null&&e.topRight!=null&&e.stickyTopCenter!=null&&e.stickyTopLeft!=null&&e.stickyTopRight!=null&&e.stickyBottomCenter!=null&&e.stickyBottomLeft!=null&&e.stickyBottomRight!=null&&e.centerHeader!=null&&e.leftHeader!=null&&e.rightHeader!=null&&e.fakeHScrollComp!=null&&e.fakeVScrollComp!=null&&e.gridHeaderCtrl!=null,this.ready&&(this.readyCallbacks.forEach(t=>t(e)),this.readyCallbacks.length=0)}whenReady(e){this.ready?e(this.params):this.readyCallbacks.push(e)}register(e,t){this.params[e]=t,this.checkReady()}registerHeaderContainer(e,t){switch(t){case"left":this.params.leftHeader=e;break;case"right":this.params.rightHeader=e;break;default:this.params.centerHeader=e;break}this.checkReady()}get(e){return this.params[e]}getParams(){return this.params}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){return[this.params.leftHeader,this.params.rightHeader,this.params.centerHeader]}getHeaderRowContainerCtrl(e){switch(e){case"left":return this.params.leftHeader;case"right":return this.params.rightHeader;default:return this.params.centerHeader}}};uo.NAME="ctrlsService";uo=c([H(uo.NAME)],uo);var bg=class extends L{constructor(){super(...arguments),this.registry={}}register(e){this.registry[e.controllerName]=e.controllerClass}getInstance(e){const t=this.registry[e];if(t!=null)return new t}};bg=c([H("ctrlsFactory")],bg);var Vo=class extends Z{constructor(e,t){super(e),this.direction=t,this.hideTimeout=null}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",Jf()||Us())}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=tm(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=["mouseenter","mousedown","touchstart"],t=["mouseleave","touchend"],i=this.getGui();e.forEach(s=>this.addManagedListener(i,s,()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0))),t.forEach(s=>this.addManagedListener(i,s,()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1)))}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),this.animationFrameService.requestAnimationFrame(()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,e=>{e.direction===this.direction&&(this.hideTimeout!==null&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=null),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))}),this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL_END,()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=null},400)})}attemptSettingScrollPosition(e){const t=this.getViewport();Hf(()=>oi(t),()=>this.setScrollPosition(e),100)}getViewport(){return this.eViewport}getContainer(){return this.eContainer}onScrollCallback(e){this.addManagedListener(this.getViewport(),"scroll",e)}};c([N("eViewport")],Vo.prototype,"eViewport",2);c([N("eContainer")],Vo.prototype,"eContainer",2);c([f("scrollVisibleService")],Vo.prototype,"scrollVisibleService",2);c([f("ctrlsService")],Vo.prototype,"ctrlsService",2);c([f("animationFrameService")],Vo.prototype,"animationFrameService",2);var Ho=class DT extends Vo{constructor(){super(DT.TEMPLATE,"horizontal")}postConstruct(){super.postConstruct();const t=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,t),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,t),this.addManagedListener(this.eventService,g.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedPropertyListener("domLayout",t),this.ctrlsService.register("fakeHScrollComp",this),this.createManagedBean(new Kr(i=>this.eContainer.style.width=`${i}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}onPinnedRowDataChanged(){this.refreshCompBottom()}refreshCompBottom(){if(!this.invisibleScrollbar)return;const t=this.pinnedRowModel.getPinnedBottomTotalHeight();this.getGui().style.bottom=`${t}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const t=this.scrollVisibleService.isVerticalScrollShowing();let i=this.columnModel.getDisplayedColumnsRightWidth();const s=!this.enableRtl&&t,n=this.gos.getScrollbarWidth();s&&(i+=n),Ni(this.eRightSpacer,i),this.eRightSpacer.classList.toggle("ag-scroller-corner",i<=n);let o=this.columnModel.getDisplayedColumnsLeftWidth();this.enableRtl&&t&&(o+=n),Ni(this.eLeftSpacer,o),this.eLeftSpacer.classList.toggle("ag-scroller-corner",o<=n)}setScrollVisible(){const t=this.scrollVisibleService.isHorizontalScrollShowing(),i=this.invisibleScrollbar,s=this.gos.get("suppressHorizontalScroll"),n=t&&this.gos.getScrollbarWidth()||0,r=s?0:n===0&&i?16:n;this.addOrRemoveCssClass("ag-scrollbar-invisible",i),oo(this.getGui(),r),oo(this.eViewport,r),oo(this.eContainer,r),this.setDisplayed(t,{skipAriaHidden:!0})}getScrollPosition(){return ga(this.getViewport(),this.enableRtl)}setScrollPosition(t){oi(this.getViewport())||this.attemptSettingScrollPosition(t),fa(this.getViewport(),t,this.enableRtl)}};Ho.TEMPLATE=`<div class="ag-body-horizontal-scroll" aria-hidden="true">
|
|
285
|
+
<div class="ag-horizontal-left-spacer" ref="eLeftSpacer"></div>
|
|
286
|
+
<div class="ag-body-horizontal-scroll-viewport" ref="eViewport">
|
|
287
|
+
<div class="ag-body-horizontal-scroll-container" ref="eContainer"></div>
|
|
288
|
+
</div>
|
|
289
|
+
<div class="ag-horizontal-right-spacer" ref="eRightSpacer"></div>
|
|
290
|
+
</div>`;c([N("eLeftSpacer")],Ho.prototype,"eLeftSpacer",2);c([N("eRightSpacer")],Ho.prototype,"eRightSpacer",2);c([f("columnModel")],Ho.prototype,"columnModel",2);c([f("pinnedRowModel")],Ho.prototype,"pinnedRowModel",2);c([M],Ho.prototype,"postConstruct",1);var VL=Ho,Fa=class extends L{postConstruct(){const e=this.checkContainerWidths.bind(this);this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const e=this.gos.isDomLayout("print"),t=e?0:this.columnModel.getDisplayedColumnsLeftWidth(),i=e?0:this.columnModel.getDisplayedColumnsRightWidth();t!=this.leftWidth&&(this.leftWidth=t,this.eventService.dispatchEvent({type:g.EVENT_LEFT_PINNED_WIDTH_CHANGED})),i!=this.rightWidth&&(this.rightWidth=i,this.eventService.dispatchEvent({type:g.EVENT_RIGHT_PINNED_WIDTH_CHANGED}))}getPinnedRightWidth(){return this.rightWidth}getPinnedLeftWidth(){return this.leftWidth}};c([f("columnModel")],Fa.prototype,"columnModel",2);c([M],Fa.prototype,"postConstruct",1);Fa=c([H("pinnedWidthService")],Fa);var Hr=class extends L{constructor(){super(...arguments),this.events=[]}postConstruct(){this.rowModel.getType()=="clientSide"&&(this.clientSideRowModel=this.rowModel)}dispatchExpanded(e,t){if(this.clientSideRowModel==null){this.eventService.dispatchEvent(e);return}this.events.push(e);const i=()=>{this.clientSideRowModel&&this.clientSideRowModel.onRowGroupOpened(),this.events.forEach(s=>this.eventService.dispatchEvent(s)),this.events=[]};t?i():(this.dispatchExpandedDebounced==null&&(this.dispatchExpandedDebounced=this.animationFrameService.debounce(i)),this.dispatchExpandedDebounced())}};c([f("animationFrameService")],Hr.prototype,"animationFrameService",2);c([f("rowModel")],Hr.prototype,"rowModel",2);c([M],Hr.prototype,"postConstruct",1);Hr=c([H("rowNodeEventThrottle")],Hr);var HL={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`."}},qs=(e,t)=>{var i;return((i=t.rowModelType)!=null?i:"clientSide")==="clientSide"?{module:"@ag-grid-enterprise/row-grouping"}:null},BL={enableRowGroup:qs,rowGroup:qs,rowGroupIndex:qs,enablePivot:qs,enableValue:qs,pivot:qs,pivotIndex:qs,aggFunc:qs,cellEditor:e=>e.cellEditor==="agRichSelect"||e.cellEditor==="agRichSelectCellEditor"?{module:"@ag-grid-enterprise/rich-select"}:null,menuTabs:e=>{var t;const i=["columnsMenuTab","generalMenuTab"];return(t=e.menuTabs)!=null&&t.some(s=>i.includes(s))?{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:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],dependencies:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],dependencies:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},children:()=>ar},WL={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,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0},UL=Object.keys(WL),ar={objectName:"colDef",allProperties:UL,docsUrl:"column-properties/",deprecations:HL,validations:BL},zL={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."},groupIncludeFooter:{version:"31.3",message:"Use `groupTotalRow` instead."},groupIncludeTotalFooter:{version:"31.3",message:"Use `grandTotalRow` instead."}},$L={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:" ",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,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1},KL={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:e=>{var t;const i=(t=e.rowModelType)!=null?t:"clientSide";switch(i){case"clientSide":const s=`treeData requires 'getDataPath' in the ${i} row model.`;return e.getDataPath?null:s;case"serverSide":const n=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;return e.isServerSideGroup&&e.getServerSideGroupKey?null:n}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:e=>{var t;switch((t=e.rowModelType)!=null?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:()=>ar,defaultColDef:()=>ar,defaultColGroupDef:()=>ar,autoGroupColumnDef:()=>ar},jL={objectName:"gridOptions",allProperties:[...ca.ALL_PROPERTIES,...kd.EVENT_CALLBACKS],propertyExceptions:["api","columnApi"],docsUrl:"grid-options/",deprecations:zL,validations:KL},pe=class{constructor(){this.destroyed=!1,this.domDataKey="__AG_"+Math.random().toString(),this.propertyEventService=new is,this.globalEventHandlerFactory=e=>(t,i)=>{if(this.destroyed)return;const s=zu.has(t);if(s&&!e||!s&&e)return;const n=kd.getCallbackForEvent(t),o=this.gridOptions[n];typeof o=="function"&&this.frameworkOverrides.wrapOutgoing(()=>{o(i)})}}get context(){return this.gridOptions.context}init(){this.columnApi=new xr(this.api);const e=!this.get("suppressAsyncEvents");this.eventService.addGlobalListener(this.globalEventHandlerFactory().bind(this),e),this.eventService.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propertyEventService.setFrameworkOverrides(this.frameworkOverrides),this.getScrollbarWidth()}destroy(){this.destroyed=!0,this.columnApi=void 0}get(e){var t;return(t=this.gridOptions[e])!=null?t:$L[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return b(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(i=>{const s=i;return s.api=this.api,s.columnApi=this.columnApi,s.context=this.context,e(s)})}static toBoolean(e){return typeof e=="boolean"?e:typeof e=="string"?e.toUpperCase()==="TRUE"||e=="":!1}static toNumber(e){if(typeof e=="number")return e;if(typeof e=="string"){const t=parseInt(e);return isNaN(t)?void 0:t}}static toConstrainedNum(e,t){return i=>{const s=pe.toNumber(i);if(!(s==null||s<e||s>t))return s}}static getCoercedValue(e,t){const i=pe.PROPERTY_COERCIONS.get(e);return i?i(t):t}static getCoercedGridOptions(e){const t={};return Object.entries(e).forEach(([i,s])=>{const n=pe.getCoercedValue(i,s);t[i]=n}),t}updateGridOptions({options:e,force:t,source:i="api"}){const s={id:pe.changeSetId++,properties:[]},n=[];Object.entries(e).forEach(([o,r])=>{i==="api"&&SA[o]&&K(`${o} is an initial property and cannot be updated.`);const l=pe.getCoercedValue(o,r),a=t||typeof l=="object"&&i==="api",u=this.gridOptions[o];if(a||u!==l){this.gridOptions[o]=l;const d={type:o,currentValue:l,previousValue:u,changeSet:s,source:i};n.push(d)}}),this.validationService.processGridOptions(this.gridOptions),s.properties=n.map(o=>o.type),n.forEach(o=>{this.gridOptions.debug&&console.log(`AG Grid: Updated property ${o.type} from `,o.previousValue," to ",o.currentValue),this.propertyEventService.dispatchEvent(o)})}addEventListener(e,t){this.propertyEventService.addEventListener(e,t)}removeEventListener(e,t){this.propertyEventService.removeEventListener(e,t)}getScrollbarWidth(){if(this.scrollbarWidth==null){const t=typeof this.gridOptions.scrollbarWidth=="number"&&this.gridOptions.scrollbarWidth>=0?this.gridOptions.scrollbarWidth:BE();t!=null&&(this.scrollbarWidth=t,this.eventService.dispatchEvent({type:g.EVENT_SCROLLBAR_WIDTH_CHANGED}))}return this.scrollbarWidth}isRowModelType(e){return this.gridOptions.rowModelType===e||e==="clientSide"&&q(this.gridOptions.rowModelType)}isDomLayout(e){var t;return((t=this.gridOptions.domLayout)!=null?t:"normal")===e}isRowSelection(){return this.gridOptions.rowSelection==="single"||this.gridOptions.rowSelection==="multiple"}useAsyncEvents(){return!this.get("suppressAsyncEvents")}isGetRowHeightFunction(){return typeof this.gridOptions.getRowHeight=="function"}getRowHeightForNode(e,t=!1,i){if(i==null&&(i=this.environment.getDefaultRowHeight()),this.isGetRowHeightFunction()){if(t)return{height:i,estimated:!0};const n={node:e,data:e.data},o=this.getCallback("getRowHeight")(n);if(this.isNumeric(o))return o===0&&K("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,o),estimated:!1}}return e.detail&&this.get("masterDetail")?this.getMasterDetailRowHeight():{height:this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:i,estimated:!1}}getMasterDetailRowHeight(){return this.get("detailRowAutoHeight")?{height:1,estimated:!1}:this.isNumeric(this.gridOptions.detailRowHeight)?{height:this.gridOptions.detailRowHeight,estimated:!1}:{height:300,estimated:!1}}getRowHeightAsNumber(){if(!this.gridOptions.rowHeight||q(this.gridOptions.rowHeight))return this.environment.getDefaultRowHeight();const e=this.environment.refreshRowHeightVariable();return e!==-1?e:(console.warn("AG Grid row height must be a number if not using standard row model"),this.environment.getDefaultRowHeight())}isNumeric(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}getDomDataKey(){return this.domDataKey}getDomData(e,t){const i=e[this.getDomDataKey()];return i?i[t]:void 0}setDomData(e,t,i){const s=this.getDomDataKey();let n=e[s];q(n)&&(n={},e[s]=n),n[t]=i}getDocument(){let e=null;return this.gridOptions.getDocument&&b(this.gridOptions.getDocument)?e=this.gridOptions.getDocument():this.eGridDiv&&(e=this.eGridDiv.ownerDocument),e&&b(e)?e:document}getWindow(){return this.getDocument().defaultView||window}getRootNode(){return this.eGridDiv.getRootNode()}getActiveDomElement(){return this.getRootNode().activeElement}getAsyncTransactionWaitMillis(){return b(this.gridOptions.asyncTransactionWaitMillis)?this.gridOptions.asyncTransactionWaitMillis:50}isAnimateRows(){return this.get("ensureDomOrder")?!1:this.get("animateRows")}isGroupRowsSticky(){return!(this.get("paginateChildRows")||this.get("groupHideOpenParents")||this.isDomLayout("print"))}isColumnsSortingCoupledToGroup(){const e=this.gridOptions.autoGroupColumnDef;return!(e!=null&&e.comparator)&&!this.get("treeData")}getGroupAggFiltering(){const e=this.gridOptions.groupAggFiltering;if(typeof e=="function")return this.getCallback("groupAggFiltering");if(e===!0)return()=>!0}getGrandTotalRow(){const e=this.gridOptions.grandTotalRow;if(e)return e;if(this.gridOptions.groupIncludeTotalFooter)return"bottom"}getGroupTotalRowCallback(){const e=this.get("groupTotalRow");if(typeof e=="function")return this.getCallback("groupTotalRow");if(e)return()=>e;const t=this.get("groupIncludeFooter");if(typeof t=="function"){const i=this.getCallback("groupIncludeFooter");return s=>i(s)?"bottom":void 0}return()=>t?"bottom":void 0}isGroupMultiAutoColumn(){return this.gridOptions.groupDisplayType?this.gridOptions.groupDisplayType==="multipleColumns":this.get("groupHideOpenParents")}isGroupUseEntireRow(e){return e?!1:this.gridOptions.groupDisplayType==="groupRows"}getGridCommonParams(){return{api:this.api,columnApi:this.columnApi,context:this.context}}addGridCommonParams(e){const t=e;return t.api=this.api,t.columnApi=this.columnApi,t.context=this.context,t}};pe.PROPERTY_COERCIONS=new Map([...ca.BOOLEAN_PROPERTIES.map(e=>[e,pe.toBoolean]),...ca.NUMBER_PROPERTIES.map(e=>[e,pe.toNumber]),["groupAggFiltering",e=>typeof e=="function"?e:pe.toBoolean(e)],["pageSize",pe.toConstrainedNum(1,Number.MAX_VALUE)],["autoSizePadding",pe.toConstrainedNum(0,Number.MAX_VALUE)],["keepDetailRowsCount",pe.toConstrainedNum(1,Number.MAX_VALUE)],["rowBuffer",pe.toConstrainedNum(0,Number.MAX_VALUE)],["infiniteInitialRowCount",pe.toConstrainedNum(1,Number.MAX_VALUE)],["cacheOverflowSize",pe.toConstrainedNum(1,Number.MAX_VALUE)],["cacheBlockSize",pe.toConstrainedNum(1,Number.MAX_VALUE)],["serverSideInitialRowCount",pe.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelPageSize",pe.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelBufferSize",pe.toConstrainedNum(0,Number.MAX_VALUE)]]);pe.changeSetId=0;c([f("gridOptions")],pe.prototype,"gridOptions",2);c([f("eventService")],pe.prototype,"eventService",2);c([f("environment")],pe.prototype,"environment",2);c([f("frameworkOverrides")],pe.prototype,"frameworkOverrides",2);c([f("eGridDiv")],pe.prototype,"eGridDiv",2);c([f("validationService")],pe.prototype,"validationService",2);c([f("gridApi")],pe.prototype,"api",2);c([M],pe.prototype,"init",1);c([Bt],pe.prototype,"destroy",1);pe=c([H("gridOptionsService")],pe);var Lg=class extends L{getLocaleTextFunc(){const e=this.gos.getCallback("getLocaleText");if(e)return(i,s,n)=>e({key:i,defaultValue:s,variableValues:n});const t=this.gos.get("localeText");return(i,s,n)=>{let o=t&&t[i];if(o&&n&&n.length){let r=0;for(;!(r>=n.length||o.indexOf("${variable}")===-1);)o=o.replace("${variable}",n[r++])}return o??s}}};Lg=c([H("localeService")],Lg);var Gm=class PT extends Vo{constructor(){super(PT.TEMPLATE,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new Yc(this.eContainer)),this.ctrlsService.register("fakeVScrollComp",this),this.addManagedListener(this.eventService,g.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onRowContainerHeightChanged.bind(this))}setScrollVisible(){const t=this.scrollVisibleService.isVerticalScrollShowing(),i=this.invisibleScrollbar,s=t&&this.gos.getScrollbarWidth()||0,n=s===0&&i?16:s;this.addOrRemoveCssClass("ag-scrollbar-invisible",i),Ni(this.getGui(),n),Ni(this.eViewport,n),Ni(this.eContainer,n),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(){const{ctrlsService:t}=this,s=t.getGridBodyCtrl().getBodyViewportElement(),n=this.getScrollPosition(),o=s.scrollTop;n!=o&&this.setScrollPosition(o,!0)}getScrollPosition(){return this.getViewport().scrollTop}setScrollPosition(t,i){!i&&!oi(this.getViewport())&&this.attemptSettingScrollPosition(t),this.getViewport().scrollTop=t}};Gm.TEMPLATE=`<div class="ag-body-vertical-scroll" aria-hidden="true">
|
|
291
|
+
<div class="ag-body-vertical-scroll-viewport" ref="eViewport">
|
|
292
|
+
<div class="ag-body-vertical-scroll-container" ref="eContainer"></div>
|
|
293
|
+
</div>
|
|
294
|
+
</div>`;c([M],Gm.prototype,"postConstruct",1);var YL=Gm,xv={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Nv=["january","february","march","april","may","june","july","august","september","october","november","december"],Ro=class extends L{constructor(){super(...arguments),this.dataTypeDefinitions={},this.isWaitingForRowData=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}init(){this.groupHideOpenParents=this.gos.get("groupHideOpenParents"),this.addManagedPropertyListener("groupHideOpenParents",()=>{this.groupHideOpenParents=this.gos.get("groupHideOpenParents")}),this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.columnModel.recreateColumnDefs(lr(e.source))})}processDataTypeDefinitions(){var e;const t=this.getDefaultDataTypes();this.dataTypeDefinitions={},Object.entries(t).forEach(([s,n])=>{this.dataTypeDefinitions[s]=Me($({},n),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(n)})});const i=(e=this.gos.get("dataTypeDefinitions"))!=null?e:{};this.dataTypeMatchers={},Object.entries(i).forEach(([s,n])=>{const o=this.processDataTypeDefinition(n,i,[s],t);o&&(this.dataTypeDefinitions[s]=o,n.dataTypeMatcher&&(this.dataTypeMatchers[s]=n.dataTypeMatcher))}),this.checkObjectValueHandlers(t),["dateString","text","number","boolean","date"].forEach(s=>{const n=this.dataTypeMatchers[s];n&&delete this.dataTypeMatchers[s],this.dataTypeMatchers[s]=n??t[s].dataTypeMatcher})}mergeDataTypeDefinitions(e,t){const i=$($({},e),t);return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=[...this.convertColumnTypes(e.columnTypes),...this.convertColumnTypes(t.columnTypes)]),i}processDataTypeDefinition(e,t,i,s){let n;const o=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=s[o];const l=t[o];if(r&&l&&(r=l),!this.validateDataTypeDefinition(e,r,o))return;n=this.mergeDataTypeDefinitions(r,e)}else{if(i.includes(o)){K('Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.');return}const r=t[o];if(!this.validateDataTypeDefinition(e,r,o))return;const l=this.processDataTypeDefinition(r,t,[...i,o],s);if(!l)return;n=this.mergeDataTypeDefinitions(l,e)}return Me($({},n),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(n)})}validateDataTypeDefinition(e,t,i){return t?t.baseDataType!==e.baseDataType?(K('The "baseDataType" property of a data type definition must match that of its parent.'),!1):!0:(K(`The data type definition ${i} does not exist.`),!1)}createGroupSafeValueFormatter(e){if(e.valueFormatter)return t=>{var i,s;if((i=t.node)!=null&&i.group){const n=t.column.getAggFunc();if(n){if(n==="first"||n==="last")return e.valueFormatter(t);if(e.baseDataType==="number"&&n!=="count"){if(typeof t.value=="number")return e.valueFormatter(t);if(typeof t.value=="object"){if(!t.value)return;if("toNumber"in t.value)return e.valueFormatter(Me($({},t),{value:t.value.toNumber()}));if("value"in t.value)return e.valueFormatter(Me($({},t),{value:t.value.value}))}}}if(!this.gos.get("suppressGroupMaintainValueType"))return}else if(this.groupHideOpenParents&&t.column.isRowGroupActive()){if(typeof t.value!="string"||(s=e.dataTypeMatcher)!=null&&s.call(e,t.value))return e.valueFormatter(t);if(!this.gos.get("suppressGroupMaintainValueType"))return}return e.valueFormatter(t)}}updateColDefAndGetDataTypeDefinitionColumnType(e,t,i){let{cellDataType:s}=t;const{field:n}=t;if(s===void 0&&(s=e.cellDataType),(s==null||s===!0)&&(s=this.canInferCellDataType(e,t)?this.inferCellDataType(n,i):!1),!s){e.cellDataType=!1;return}const o=this.dataTypeDefinitions[s];if(!o){K(`Missing data type definition - "${s}"`);return}return e.cellDataType=s,o.groupSafeValueFormatter&&(e.valueFormatter=o.groupSafeValueFormatter),o.valueParser&&(e.valueParser=o.valueParser),o.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,o,i),o.columnTypes}updateColDefAndGetColumnType(e,t,i){var s,n;const o=this.updateColDefAndGetDataTypeDefinitionColumnType(e,t,i),r=(n=(s=t.type)!=null?s:o)!=null?n:e.type;return e.type=r,r?this.convertColumnTypes(r):void 0}addColumnListeners(e){if(!this.isWaitingForRowData)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const i=s=>{t.add(s.key)};e.addEventListener(Ee.EVENT_STATE_UPDATED,i),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.removeEventListener(Ee.EVENT_STATE_UPDATED,i))}canInferCellDataType(e,t){var i;if(this.rowModel.getType()!=="clientSide")return!1;const s={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(this.doColDefPropsPreventInference(t,s))return!1;const n=t.type===null?e.type:t.type;if(n){const o=(i=this.gos.get("columnTypes"))!=null?i:{};if(this.convertColumnTypes(n).some(l=>{const a=o[l.trim()];return a&&this.doColDefPropsPreventInference(a,s)}))return!1}return!this.doColDefPropsPreventInference(e,s)}doColDefPropsPreventInference(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([i,s])=>this.doesColDefPropPreventInference(e,t,i,s))}doesColDefPropPreventInference(e,t,i,s){if(!t[i])return!1;const n=e[i];return n===null?(t[i]=!1,!1):s===void 0?!!n:n===s}inferCellDataType(e,t){var i;if(!e)return;let s;const n=this.getInitialData();if(n){const r=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");s=fr(n,e,r)}else this.initWaitForRowData(t);if(s==null)return;const[o]=(i=Object.entries(this.dataTypeMatchers).find(([r,l])=>l(s)))!=null?i:["object"];return o}getInitialData(){const e=this.gos.get("rowData");if(e!=null&&e.length)return e[0];if(this.initialData)return this.initialData;{const t=this.rowModel.getRootNode().allLeafChildren;if(t!=null&&t.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isWaitingForRowData)return;this.isWaitingForRowData=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions;t&&this.columnModel.queueResizeOperations();const i=this.addManagedListener(this.eventService,g.EVENT_ROW_DATA_UPDATE_STARTED,s=>{const{firstRowData:n}=s;if(!n)return;i==null||i(),this.isWaitingForRowData=!1,this.processColumnsPendingInference(n,t),this.columnStateUpdatesPendingInference={},t&&this.columnModel.processResizeOperations();const o={type:g.EVENT_DATA_TYPES_INFERRED};this.eventService.dispatchEvent(o)})}isPendingInference(){return this.isWaitingForRowData}processColumnsPendingInference(e,t){this.initialData=e;const i=[];this.columnStateUpdateListenerDestroyFuncs.forEach(o=>o()),this.columnStateUpdateListenerDestroyFuncs=[];const s={},n={};Object.entries(this.columnStateUpdatesPendingInference).forEach(([o,r])=>{const l=this.columnModel.getGridColumn(o);if(!l)return;const a=l.getColDef();if(!this.columnModel.resetColumnDefIntoColumn(l,"cellDataTypeInferred"))return;const u=l.getColDef();if(t&&u.type&&u.type!==a.type){const d=this.getUpdatedColumnState(l,r);d.rowGroup&&d.rowGroupIndex==null&&(s[o]=d),d.pivot&&d.pivotIndex==null&&(n[o]=d),i.push(d)}}),t&&i.push(...this.columnModel.generateColumnStateForRowGroupAndPivotIndexes(s,n)),i.length&&this.columnModel.applyColumnState({state:i},"cellDataTypeInferred"),this.initialData=null}getUpdatedColumnState(e,t){const i=this.columnModel.getColumnStateFromColDef(e);return t.forEach(s=>{delete i[s],s==="rowGroup"?delete i.rowGroupIndex:s==="pivot"&&delete i.pivotIndex}),i}checkObjectValueHandlers(e){const t=this.dataTypeDefinitions.object,i=e.object;this.hasObjectValueParser=t.valueParser!==i.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==i.valueFormatter}convertColumnTypes(e){let t=[];return e instanceof Array?e.some(s=>typeof s!="string")?console.warn("if colDef.type is supplied an array it should be of type 'string[]'"):t=e:typeof e=="string"?t=e.split(","):console.warn("colDef.type should be of type 'string' | 'string[]'"),t}getDateStringTypeDefinition(e){var t;return e?(t=this.getDataTypeDefinition(e))!=null?t:this.dataTypeDefinitions.dateString:this.dataTypeDefinitions.dateString}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){var t;return(t=this.getDataTypeDefinition(e))==null?void 0:t.baseDataType}checkType(e,t){var i;if(t==null)return!0;const s=(i=this.getDataTypeDefinition(e))==null?void 0:i.dataTypeMatcher;return s?s(t):!0}validateColDef(e){e.cellDataType==="object"&&(e.valueFormatter===this.dataTypeDefinitions.object.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&K('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&&K('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"'))}setColDefPropertiesForBaseDataType(e,t,i){const s=(l,a,u)=>{let d=l.getColDef().valueFormatter;return d===t.groupSafeValueFormatter&&(d=t.valueFormatter),this.valueService.formatValue(l,a,u,d)},n=he.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()),o=this.localeService.getLocaleTextFunc(),r=l=>{const{filterParams:a}=e;e.filterParams=typeof a=="object"?$($({},a),l):l};switch(t.baseDataType){case"number":{e.cellEditor="agNumberCellEditor",n&&r({comparator:(l,a)=>{const u=l==null?0:parseInt(l),d=a==null?0:parseInt(a);return u===d?0:u>d?1:-1}});break}case"boolean":{e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.suppressKeyboardEvent=l=>!!l.colDef.editable&&l.event.key===D.SPACE,r(n?{valueFormatter:l=>b(l.value)?o(String(l.value),l.value?"True":"False"):o("blanks","(Blanks)")}:{maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(l,a)=>a,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(l,a)=>a===!1,numberOfInputs:0}]});break}case"date":{e.cellEditor="agDateCellEditor",e.keyCreator=l=>s(l.column,l.node,l.value),n&&r({valueFormatter:l=>{const a=s(l.column,l.node,l.value);return b(a)?a:o("blanks","(Blanks)")},treeList:!0,treeListFormatter:(l,a)=>{if(a===1&&l!=null){const u=Nv[Number(l)-1];return o(u,xv[u])}return l??o("blanks","(Blanks)")}});break}case"dateString":{e.cellEditor="agDateStringCellEditor",e.keyCreator=a=>s(a.column,a.node,a.value);const l=t.dateParser;r(n?{valueFormatter:a=>{const u=s(a.column,a.node,a.value);return b(u)?u:o("blanks","(Blanks)")},treeList:!0,treeListPathGetter:a=>{const u=l(a??void 0);return u?[String(u.getFullYear()),String(u.getMonth()+1),String(u.getDate())]:null},treeListFormatter:(a,u)=>{if(u===1&&a!=null){const d=Nv[Number(a)-1];return o(d,xv[d])}return a??o("blanks","(Blanks)")}}:{comparator:(a,u)=>{const d=l(u);return u==null||d<a?-1:d>a?1:0}});break}case"object":{e.cellEditorParams={useFormatter:!0},e.comparator=(l,a)=>{const u=this.columnModel.getPrimaryColumn(i),d=u==null?void 0:u.getColDef();if(!u||!d)return 0;const h=l==null?"":s(u,null,l),p=a==null?"":s(u,null,a);return h===p?0:h>p?1:-1},e.keyCreator=l=>s(l.column,l.node,l.value),n?r({valueFormatter:l=>{const a=s(l.column,l.node,l.value);return b(a)?a:o("blanks","(Blanks)")}}):e.filterValueGetter=l=>s(l.column,l.node,this.valueService.getValue(l.column,l.node));break}}}getDefaultDataTypes(){const e=i=>!!i.match("^\\d{4}-\\d{2}-\\d{2}$"),t=this.localeService.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:i=>{var s,n;return((n=(s=i.newValue)==null?void 0:s.trim)==null?void 0:n.call(s))===""?null:Number(i.newValue)},valueFormatter:i=>i.value==null?"":typeof i.value!="number"||isNaN(i.value)?t("invalidNumber","Invalid Number"):String(i.value),dataTypeMatcher:i=>typeof i=="number"},text:{baseDataType:"text",valueParser:i=>i.newValue===""?null:la(i.newValue),dataTypeMatcher:i=>typeof i=="string"},boolean:{baseDataType:"boolean",valueParser:i=>{var s,n;return i.newValue==null?i.newValue:((n=(s=i.newValue)==null?void 0:s.trim)==null?void 0:n.call(s))===""?null:String(i.newValue).toLowerCase()==="true"},valueFormatter:i=>i.value==null?"":String(i.value),dataTypeMatcher:i=>typeof i=="boolean"},date:{baseDataType:"date",valueParser:i=>Jt(i.newValue==null?null:String(i.newValue)),valueFormatter:i=>{var s;return i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?t("invalidDate","Invalid Date"):(s=xi(i.value,!1))!=null?s:""},dataTypeMatcher:i=>i instanceof Date},dateString:{baseDataType:"dateString",dateParser:i=>{var s;return(s=Jt(i))!=null?s:void 0},dateFormatter:i=>{var s;return(s=xi(i??null,!1))!=null?s:void 0},valueParser:i=>e(String(i.newValue))?i.newValue:null,valueFormatter:i=>e(String(i.value))?i.value:"",dataTypeMatcher:i=>typeof i=="string"&&e(i)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:i=>{var s;return(s=la(i.value))!=null?s:""}}}}};c([f("rowModel")],Ro.prototype,"rowModel",2);c([f("columnModel")],Ro.prototype,"columnModel",2);c([f("valueService")],Ro.prototype,"valueService",2);c([M],Ro.prototype,"init",1);Ro=c([H("dataTypeService")],Ro);var To=class extends L{constructor(){super(...arguments),this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.ctrlsService.whenReady(()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){this.columnModel.setColumnDefs(e??[],"gridInitializing"),this.rowModel.start()}gridReady(){this.dispatchGridReadyEvent();const e=he.__isRegistered("@ag-grid-enterprise/core",this.context.getGridId());new Om("AG Grid",()=>this.gos.get("debug")).log(`initialised successfully, enterprise = ${e}`)}dispatchGridReadyEvent(){const e={type:g.EVENT_GRID_READY};this.eventService.dispatchEvent(e)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.columnModel.setColumnDefs(t,lr(e.source))}}};c([f("ctrlsService")],To.prototype,"ctrlsService",2);c([f("columnModel")],To.prototype,"columnModel",2);c([f("rowModel")],To.prototype,"rowModel",2);c([M],To.prototype,"postConstruct",1);To=c([H("syncService")],To);var Do=class extends L{constructor(){super(...arguments),this.manuallyDisplayed=!1}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_ROW_DATA_UPDATED,()=>this.onRowDataUpdated()),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,()=>this.onNewColumnsLoaded())}registerOverlayWrapperComp(e){this.overlayWrapperComp=e,(!this.gos.get("columnDefs")||this.gos.isRowModelType("clientSide")&&!this.gos.get("rowData"))&&this.showLoadingOverlay()}showLoadingOverlay(){if(this.gos.get("suppressLoadingOverlay"))return;const e={},t=this.userComponentFactory.getLoadingOverlayCompDetails(e);this.showOverlay(t,"ag-overlay-loading-wrapper","loadingOverlayComponentParams")}showNoRowsOverlay(){if(this.gos.get("suppressNoRowsOverlay"))return;const e={},t=this.userComponentFactory.getNoRowsOverlayCompDetails(e);this.showOverlay(t,"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams")}showOverlay(e,t,i){const s=e.newAgStackInstance(),n=this.addManagedPropertyListener(i,({currentValue:o})=>{s.then(r=>{r.refresh&&r.refresh(this.gos.addGridCommonParams($({},o??{})))})});this.manuallyDisplayed=this.columnModel.isReady()&&!this.paginationProxy.isEmpty(),this.overlayWrapperComp.showOverlay(s,t,n)}hideOverlay(){this.manuallyDisplayed=!1,this.overlayWrapperComp.hideOverlay()}showOrHideOverlay(){const e=this.paginationProxy.isEmpty(),t=this.gos.get("suppressNoRowsOverlay");e&&!t?this.showNoRowsOverlay():this.hideOverlay()}onRowDataUpdated(){this.showOrHideOverlay()}onNewColumnsLoaded(){this.columnModel.isReady()&&!this.paginationProxy.isEmpty()&&!this.manuallyDisplayed&&this.hideOverlay()}};c([f("userComponentFactory")],Do.prototype,"userComponentFactory",2);c([f("paginationProxy")],Do.prototype,"paginationProxy",2);c([f("columnModel")],Do.prototype,"columnModel",2);c([M],Do.prototype,"postConstruct",1);Do=c([H("overlayService")],Do);var Ot=class extends L{constructor(){super(...arguments),this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Nt(()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Nt(()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),0),this.onRowSelectedDebounced=Nt(()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){var e;this.isClientSideRowModel=this.rowModel.getType()==="clientSide",this.cachedState=(e=this.gos.get("initialState"))!=null?e:{},this.ctrlsService.whenReady(()=>this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnGridReady()));const t=this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,({source:n})=>{n==="gridInitializing"&&(t==null||t(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnColumnsInitialised()))}),i=this.addManagedListener(this.eventService,g.EVENT_ROW_COUNT_READY,()=>{i==null||i(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnRowCountReady())}),s=this.addManagedListener(this.eventService,g.EVENT_FIRST_DATA_RENDERED,()=>{s==null||s(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnFirstDataRendered())})}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setupStateOnGridReady(){this.updateCachedState("sideBar",this.getSideBarState()),this.addManagedListener(this.eventService,g.EVENT_TOOL_PANEL_VISIBLE_CHANGED,()=>this.updateCachedState("sideBar",this.getSideBarState())),this.addManagedListener(this.eventService,g.EVENT_SIDE_BAR_UPDATED,()=>this.updateCachedState("sideBar",this.getSideBarState()))}setupStateOnColumnsInitialised(){var e;const t=(e=this.gos.get("initialState"))!=null?e:{};this.setColumnState(t),this.setColumnGroupState(t),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VALUE_CHANGED,()=>this.updateColumnState(["aggregation"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_MOVED,()=>this.updateColumnState(["columnOrder"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PINNED,()=>this.updateColumnState(["columnPinning"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_RESIZED,()=>this.updateColumnState(["columnSizing"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,()=>this.updateColumnState(["columnVisibility"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_CHANGED,()=>this.updateColumnState(["pivot"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.updateColumnState(["pivot"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.updateColumnState(["rowGroup"])),this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,()=>this.updateColumnState(["sort"])),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,()=>this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_GROUP_OPENED,()=>this.updateCachedState("columnGroup",this.getColumnGroupState()))}setupStateOnRowCountReady(){var e;const{filter:t,rowGroupExpansion:i,rowSelection:s,pagination:n}=(e=this.gos.get("initialState"))!=null?e:{},o=this.gos.get("advancedFilterModel");(t||o)&&this.setFilterState(t,o),i&&this.setRowGroupExpansionState(i),s&&this.setRowSelectionState(s),n&&this.setPaginationState(n),this.updateCachedState("filter",this.getFilterState()),this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowSelection",this.getRowSelectionState()),this.updateCachedState("pagination",this.getPaginationState()),this.addManagedListener(this.eventService,g.EVENT_FILTER_CHANGED,()=>this.updateCachedState("filter",this.getFilterState())),this.addManagedListener(this.eventService,g.EVENT_ROW_GROUP_OPENED,()=>this.onRowGroupOpenedDebounced()),this.addManagedListener(this.eventService,g.EVENT_EXPAND_COLLAPSE_ALL,()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())),this.addManagedListener(this.eventService,g.EVENT_SELECTION_CHANGED,()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()}),this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,r=>{(r.newPage||r.newPageSize)&&this.updateCachedState("pagination",this.getPaginationState())})}setupStateOnFirstDataRendered(){var e;const{scroll:t,rangeSelection:i,focusedCell:s,columnOrder:n}=(e=this.gos.get("initialState"))!=null?e:{};s&&this.setFocusedCellState(s),i&&this.setRangeSelectionState(i),t&&this.setScrollState(t),this.setColumnPivotState(!!(n!=null&&n.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,g.EVENT_CELL_FOCUSED,()=>this.updateCachedState("focusedCell",this.getFocusedCellState())),this.addManagedListener(this.eventService,g.EVENT_RANGE_SELECTION_CHANGED,o=>{o.finished&&this.updateCachedState("rangeSelection",this.getRangeSelectionState())}),this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL_END,()=>this.updateCachedState("scroll",this.getScrollState()))}getColumnState(){const e=this.columnModel.isPivotMode(),t=[],i=[],s=[],n=[],o=[],r=[],l=[],a=[],u=[],d=this.columnModel.getColumnState();for(let h=0;h<d.length;h++){const{colId:p,sort:C,sortIndex:v,rowGroup:y,rowGroupIndex:R,aggFunc:w,pivot:m,pivotIndex:E,pinned:T,hide:P,width:A,flex:F}=d[h];u.push(p),C&&(t[v??0]={colId:p,sort:C}),y&&(i[R??0]=p),typeof w=="string"&&s.push({colId:p,aggFunc:w}),m&&(n[E??0]=p),T&&(T==="right"?r:o).push(p),P&&l.push(p),(F||A)&&a.push({colId:p,flex:F??void 0,width:A})}return{sort:t.length?{sortModel:t}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:n.length||e?{pivotMode:e,pivotColIds:n}:void 0,columnPinning:o.length||r.length?{leftColIds:o,rightColIds:r}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:a.length?{columnSizingModel:a}:void 0,columnOrder:u.length?{orderedColIds:u}:void 0}}setColumnState(e){const{sort:t,rowGroup:i,aggregation:s,pivot:n,columnPinning:o,columnVisibility:r,columnSizing:l,columnOrder:a}=e,u={},d=v=>{let y=u[v];return y||(y={colId:v},u[v]=y,y)};t&&t.sortModel.forEach(({colId:v,sort:y},R)=>{const w=d(v);w.sort=y,w.sortIndex=R}),i&&i.groupColIds.forEach((v,y)=>{const R=d(v);R.rowGroup=!0,R.rowGroupIndex=y}),s&&s.aggregationModel.forEach(({colId:v,aggFunc:y})=>{d(v).aggFunc=y}),n&&(n.pivotColIds.forEach((v,y)=>{const R=d(v);R.pivot=!0,R.pivotIndex=y}),this.gos.updateGridOptions({options:{pivotMode:n.pivotMode},source:"gridInitializing"})),o&&(o.leftColIds.forEach(v=>{d(v).pinned="left"}),o.rightColIds.forEach(v=>{d(v).pinned="right"})),r&&r.hiddenColIds.forEach(v=>{d(v).hide=!0}),l&&l.columnSizingModel.forEach(({colId:v,flex:y,width:R})=>{const w=d(v);w.flex=y??null,w.width=R});const h=a==null?void 0:a.orderedColIds,p=!!(h!=null&&h.length),C=p?h.map(v=>d(v)):Object.values(u);if(C.length){this.columnStates=C;const v={sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null};this.columnModel.applyColumnState({state:C,applyOrder:p,defaultState:v},"gridInitializing")}}setColumnPivotState(e){const t=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;if(this.columnGroupStates=void 0,!!this.columnModel.isSecondaryColumnsPresent()){if(t){let s=[];for(const n of t)this.columnModel.getSecondaryColumn(n.colId)&&s.push(n);this.columnModel.applyColumnState({state:s,applyOrder:e},"gridInitializing")}i&&this.columnModel.setColumnGroupState(i,"gridInitializing")}}getColumnGroupState(){const e=this.columnModel.getColumnGroupState(),t=[];return e.forEach(({groupId:i,open:s})=>{s&&t.push(i)}),t.length?{openColumnGroupIds:t}:void 0}setColumnGroupState(e){var t;if(!e.hasOwnProperty("columnGroup"))return;const i=new Set((t=e.columnGroup)==null?void 0:t.openColumnGroupIds),n=this.columnModel.getColumnGroupState().map(({groupId:o})=>{const r=i.has(o);return r&&i.delete(o),{groupId:o,open:r}});i.forEach(o=>{n.push({groupId:o,open:!0})}),n.length&&(this.columnGroupStates=n),this.columnModel.setColumnGroupState(n,"gridInitializing")}getFilterState(){var e;let t=this.filterManager.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const i=(e=this.filterManager.getAdvancedFilterModel())!=null?e:void 0;return t||i?{filterModel:t,advancedFilterModel:i}:void 0}setFilterState(e,t){const{filterModel:i,advancedFilterModel:s}=e??{advancedFilterModel:t};i&&this.filterManager.setFilterModel(i,"columnFilter"),s&&this.filterManager.setAdvancedFilterModel(s)}getRangeSelectionState(){var e;const t=(e=this.rangeService)==null?void 0:e.getCellRanges().map(i=>{const{id:s,type:n,startRow:o,endRow:r,columns:l,startColumn:a}=i;return{id:s,type:n,startRow:o,endRow:r,colIds:l.map(u=>u.getColId()),startColId:a.getColId()}});return t!=null&&t.length?{cellRanges:t}:void 0}setRangeSelectionState(e){if(!this.gos.get("enableRangeSelection")||!this.rangeService)return;const t=[];e.cellRanges.forEach(i=>{const s=[];if(i.colIds.forEach(o=>{const r=this.columnModel.getGridColumn(o);r&&s.push(r)}),!s.length)return;let n=this.columnModel.getGridColumn(i.startColId);if(!n){const o=this.columnModel.getAllDisplayedColumns(),r=new Set(s);n=o.find(l=>r.has(l))}t.push(Me($({},i),{columns:s,startColumn:n}))}),this.rangeService.setCellRanges(t)}getScrollState(){var e,t,i;if(!this.isClientSideRowModel)return;const s=(e=this.ctrlsService.getGridBodyCtrl())==null?void 0:e.getScrollFeature(),{left:n}=(t=s==null?void 0:s.getHScrollPosition())!=null?t:{left:0},{top:o}=(i=s==null?void 0:s.getVScrollPosition())!=null?i:{top:0};return o||n?{top:o,left:n}:void 0}setScrollState(e){var t;if(!this.isClientSideRowModel)return;const{top:i,left:s}=e;(t=this.ctrlsService.getGridBodyCtrl())==null||t.getScrollFeature().setScrollPosition(i,s)}getSideBarState(){var e,t;return(t=(e=this.sideBarService)==null?void 0:e.getSideBarComp())==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.focusService.getFocusedCell();if(e){const{column:t,rowIndex:i,rowPinned:s}=e;return{colId:t.getColId(),rowIndex:i,rowPinned:s}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{colId:t,rowIndex:i,rowPinned:s}=e;this.focusService.setFocusedCell({column:this.columnModel.getGridColumn(t),rowIndex:i,rowPinned:s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const e=this.paginationProxy.getCurrentPage(),t=this.gos.get("paginationAutoPageSize")?void 0:this.paginationProxy.getPageSize();if(!(!e&&!t))return{page:e,pageSize:t}}setPaginationState(e){e.pageSize&&!this.gos.get("paginationAutoPageSize")&&this.paginationProxy.setPageSize(e.pageSize,"initialState"),typeof e.page=="number"&&this.paginationProxy.setPage(e.page)}getRowSelectionState(){var e;const t=this.selectionService.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((e=t==null?void 0:t.toggledNodes)!=null&&e.length)?void 0:t}setRowSelectionState(e){this.selectionService.setSelectionState(e,"gridInitializing")}getRowGroupExpansionState(){const e=this.expansionService.getExpandedRows();return e.length?{expandedRowGroupIds:e}:void 0}setRowGroupExpansionState(e){this.expansionService.expandRows(e.expandedRowGroupIds)}updateColumnState(e){const t=this.getColumnState();let i=!1;Object.entries(t).forEach(([s,n])=>{ng(n,this.cachedState[s])||(i=!0)}),this.cachedState=$($({},this.cachedState),t),i&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const i=this.cachedState[e];this.setCachedStateValue(e,t),ng(t,i)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState=Me($({},this.cachedState),{[e]:t})}refreshStaleState(){this.staleStateKeys.forEach(e=>{switch(e){case"rowSelection":this.setCachedStateValue(e,this.getRowSelectionState());break}}),this.staleStateKeys.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(t=>this.queuedUpdateSources.add(t)),this.dispatchStateUpdateEventDebounced())}dispatchQueuedStateUpdateEvents(){const e=Array.from(this.queuedUpdateSources);this.queuedUpdateSources.clear();const t={type:g.EVENT_STATE_UPDATED,sources:e,state:this.cachedState};this.eventService.dispatchEvent(t)}suppressEventsAndDispatchInitEvent(e){this.suppressEvents=!0,this.columnAnimationService.setSuppressAnimation(!0),e(),setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.columnAnimationService.setSuppressAnimation(!1),this.dispatchStateUpdateEvent(["gridInitializing"]))})}};c([f("filterManager")],Ot.prototype,"filterManager",2);c([f("ctrlsService")],Ot.prototype,"ctrlsService",2);c([f("focusService")],Ot.prototype,"focusService",2);c([f("columnModel")],Ot.prototype,"columnModel",2);c([f("paginationProxy")],Ot.prototype,"paginationProxy",2);c([f("rowModel")],Ot.prototype,"rowModel",2);c([f("selectionService")],Ot.prototype,"selectionService",2);c([f("expansionService")],Ot.prototype,"expansionService",2);c([f("columnAnimationService")],Ot.prototype,"columnAnimationService",2);c([fe("sideBarService")],Ot.prototype,"sideBarService",2);c([fe("rangeService")],Ot.prototype,"rangeService",2);c([M],Ot.prototype,"postConstruct",1);Ot=c([H("stateService")],Ot);var Aa=class extends L{init(){this.processGridOptions(this.gridOptions)}processGridOptions(e){this.processOptions(e,jL)}processColumnDefs(e){this.processOptions(e,ar)}processOptions(e,t){const{validations:i,deprecations:s,allProperties:n,propertyExceptions:o,objectName:r,docsUrl:l}=t;n&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...o??[],...Object.keys(s)],n,r,l);const a=new Set;Object.keys(e).forEach(d=>{var h;const p=s[d];if(p)if("renamed"in p){const{renamed:E,version:T}=p;a.add(`As of v${T}, ${String(d)} is deprecated. Please use ${String(E)} instead.`),e[E]=e[d]}else{const{message:E,version:T}=p;a.add(`As of v${T}, ${String(d)} is deprecated. ${E??""}`)}const C=e[d];if(C==null||C===!1)return;const v=i[d];let y;if(v)if(typeof v=="function"){const E=v(e,this.gridOptions);if(!E)return;if("objectName"in E){const T=e[d];if(Array.isArray(T)){T.forEach(P=>{this.processOptions(P,E)});return}this.processOptions(e[d],E);return}y=E}else y=v;else return;const{module:R,dependencies:w,supportedRowModels:m}=y;if(m){const E=(h=this.gridOptions.rowModelType)!=null?h:"clientSide";if(!m.includes(E)){a.add(`${String(d)} is not supported with the '${E}' row model.`);return}}if(R){const E=Array.isArray(R)?R:[R];let T=!0;if(E.forEach(P=>{he.__assertRegistered(P,String(d),this.context.getGridId())||(T=!1,a.add(`${String(d)} is only available when ${P} is loaded.`))}),!T)return}if(w){const E=this.checkForWarning(d,w,e);if(E){a.add(E);return}}}),a.size>0&&a.forEach(d=>{K(d)})}checkForWarning(e,t,i){if(typeof t=="function")return t(i,this.gridOptions);const n=Object.entries(t).find(([l,a])=>{const u=i[l];return!a.includes(u)});if(!n)return null;const[o,r]=n;return r.length>1?`'${String(e)}' requires '${o}' to be one of [${r.join(", ")}].`:`'${String(e)}' requires '${o}' to be ${r[0]}.`}checkProperties(e,t,i,s,n){const o=["__ob__","__v_skip","__metadata__"],r=tR(Object.getOwnPropertyNames(e),[...o,...t,...i],i);if(Ft(r,(l,a)=>{K(`invalid ${s} property '${l}' did you mean any of these: ${a.slice(0,8).join(", ")}`)}),Object.keys(r).length>0&&n){const l=this.getFrameworkOverrides().getDocLink(n);K(`to see all the valid ${s} properties please check: ${l}`)}}};c([f("gridOptions")],Aa.prototype,"gridOptions",2);c([M],Aa.prototype,"init",1);Aa=c([H("validationService")],Aa);var Qd=class extends L{constructor(){super(...arguments),this.syncEventListeners=new Map,this.asyncEventListeners=new Map,this.syncGlobalEventListeners=new Set,this.globalEventListenerPairs=new Map}postConstruct(){this.frameworkEventWrappingService=new Bf(this.getFrameworkOverrides())}addEventListener(e,t){const i=this.frameworkEventWrappingService.wrap(t),s=this.gos.useAsyncEvents()&&!zu.has(e),n=s?this.asyncEventListeners:this.syncEventListeners;n.has(e)||n.set(e,new Set),n.get(e).add(i),this.eventService.addEventListener(e,i,s)}removeEventListener(e,t){var i;const s=this.frameworkEventWrappingService.unwrap(t),n=this.asyncEventListeners.get(e),o=!!(n!=null&&n.delete(s));o||(i=this.syncEventListeners.get(e))==null||i.delete(s),this.eventService.removeEventListener(e,s,o)}addGlobalListener(e){const t=this.frameworkEventWrappingService.wrapGlobal(e);if(this.gos.useAsyncEvents()){const s=(o,r)=>{zu.has(o)&&t(o,r)},n=(o,r)=>{zu.has(o)||t(o,r)};this.globalEventListenerPairs.set(e,{syncListener:s,asyncListener:n}),this.eventService.addGlobalListener(s,!1),this.eventService.addGlobalListener(n,!0)}else this.syncGlobalEventListeners.add(t),this.eventService.addGlobalListener(t,!1)}removeGlobalListener(e){const t=this.frameworkEventWrappingService.unwrapGlobal(e);if(this.globalEventListenerPairs.has(t)){const{syncListener:s,asyncListener:n}=this.globalEventListenerPairs.get(t);this.eventService.removeGlobalListener(s,!1),this.eventService.removeGlobalListener(n,!0),this.globalEventListenerPairs.delete(e)}else this.syncGlobalEventListeners.delete(t),this.eventService.removeGlobalListener(t,!1)}destroyEventListeners(e,t){e.forEach((i,s)=>{i.forEach(n=>this.eventService.removeEventListener(s,n,t)),i.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(i=>this.eventService.removeGlobalListener(i,t)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncEventListeners,!1),this.destroyEventListeners(this.asyncEventListeners,!0),this.destroyGlobalListeners(this.syncGlobalEventListeners,!1),this.globalEventListenerPairs.forEach(({syncListener:e,asyncListener:t})=>{this.eventService.removeGlobalListener(e,!1),this.eventService.removeGlobalListener(t,!0)}),this.globalEventListenerPairs.clear()}};c([M],Qd.prototype,"postConstruct",1);Qd=c([H("apiEventService")],Qd);var km=class extends Z{constructor(){super('<span class="ag-paging-page-size"></span>'),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.paginationProxy.getPageSize()||(this.paginationProxy.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}init(){this.addManagedPropertyListener("paginationPageSizeSelector",()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,e=>this.handlePaginationChanged(e))}handlePaginationChanged(e){if(!this.selectPageSizeComp||!(e!=null&&e.newPageSize))return;const t=this.paginationProxy.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp&&this.appendChild(this.selectPageSizeComp))}reset(){je(this.getGui()),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0)}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get("paginationPageSizeSelector")!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.paginationProxy.getPageSize(),i=!t||!e.includes(t);i&&(e.unshift(""),K(`The paginationPageSize grid option is set to a value that is not in the list of page size options.
|
|
295
|
+
Please make sure that the paginationPageSize grid option is set to one of the values in the
|
|
296
|
+
paginationPageSizeSelector array, or set the paginationPageSizeSelector to false to hide the page size selector.`)),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0);const s=this.localeService.getLocaleTextFunc(),n=s("pageSizeSelectorLabel","Page Size:"),o=e.map(l=>({value:String(l),text:String(l)})),r=s("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Vc).addOptions(o).setValue(String(i?"":t)).setAriaLabel(r).setLabel(n).onValueChange(()=>this.handlePageSizeItemSelected()),this.hasEmptyOption=i}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get("paginationPageSizeSelector");return!Array.isArray(t)||!this.validateValues(t)?e:[...t].sort((i,s)=>i-s)}validateValues(e){if(!e.length)return K(`The paginationPageSizeSelector grid option is an empty array. This is most likely a mistake.
|
|
297
|
+
If you want to hide the page size selector, please set the paginationPageSizeSelector to false.`),!1;for(let t=0;t<e.length;t++){const i=e[t],s=typeof i=="number",n=i>0;if(!s)return K(`The paginationPageSizeSelector grid option contains a non-numeric value.
|
|
298
|
+
Please make sure that all values in the paginationPageSizeSelector array are numbers.`),!1;if(!n)return K(`The paginationPageSizeSelector grid option contains a negative number or zero.
|
|
299
|
+
Please make sure that all values in the paginationPageSizeSelector array are positive.`),!1}return!0}destroy(){this.toggleSelectDisplay(!1),super.destroy()}};c([f("paginationProxy")],km.prototype,"paginationProxy",2);c([M],km.prototype,"init",1);var ba=class extends L{constructor(){super(),this.descriptionContainer=null,this.announceValue=Nt(this.announceValue.bind(this),200)}postConstruct(){const e=this.gos.getDocument(),t=this.descriptionContainer=e.createElement("div");t.classList.add("ag-aria-description-container"),$f(t,"polite"),AE(t,"additions text"),FE(t,!0),this.eGridDiv.appendChild(t)}announceValue(e){this.descriptionContainer&&(this.descriptionContainer.textContent="",setTimeout(()=>{this.isAlive()&&this.descriptionContainer&&(this.descriptionContainer.textContent=e)},50))}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(je(e),e.parentElement&&e.parentElement.removeChild(e)),this.descriptionContainer=null,this.eGridDiv=null}};c([f("eGridDiv")],ba.prototype,"eGridDiv",2);c([M],ba.prototype,"postConstruct",1);ba=c([H("ariaAnnouncementService")],ba);var Mg=class{};Mg.gridOptions=void 0;var QL=1,qL=class{create(e,t,i,s,n){var o;let r={};Mg.gridOptions?(Zt(r,Mg.gridOptions,!0,!0),r=$($({},r),t)):r=t;const l=pe.getCoercedGridOptions(r),a=!!l.debug,u=(o=l.gridId)!=null?o:String(QL++),d=this.getRegisteredModules(n,u),h=this.createBeansList(l.rowModelType,d,u),p=this.createProvidedBeans(e,l,n);if(!h){Xn("Failed to create grid.");return}const C={providedBeanInstances:p,beanClasses:h,debug:a,gridId:u},v=new Om("Context",()=>C.debug),y=new rA(C,v),R=y.getBean("beans");return this.registerModuleUserComponents(R,d),this.registerStackComponents(R,d),this.registerControllers(R,d),i(y),R.syncService.start(),s&&s(y),y.getBean("gridApi")}registerControllers(e,t){t.forEach(i=>{i.controllers&&i.controllers.forEach(s=>e.ctrlsFactory.register(s))})}registerStackComponents(e,t){const i=this.createAgStackComponentsList(t);e.agStackComponentsRegistry.setupComponents(i)}getRegisteredModules(e,t){const i=e?e.modules:null,s=he.__getRegisteredModules(t),n=[],o={},r=(l,a,u)=>{(h=>{o[h.moduleName]||(o[h.moduleName]=!0,n.push(h),he.__register(h,l,u))})(a),a.dependantModules&&a.dependantModules.forEach(h=>r(l,h,u))};return i&&i.forEach(l=>r(!0,l,t)),s&&s.forEach(l=>r(!he.__isPackageBased(),l,void 0)),n}registerModuleUserComponents(e,t){this.extractModuleEntity(t,s=>s.userComponents?s.userComponents:[]).forEach(s=>{e.userComponentRegistry.registerDefaultComponent(s.componentName,s.componentClass)})}createProvidedBeans(e,t,i){let s=i?i.frameworkOverrides:null;q(s)&&(s=new ST);const n={gridOptions:t,eGridDiv:e,globalEventListener:i?i.globalEventListener:null,globalSyncEventListener:i?i.globalSyncEventListener:null,frameworkOverrides:s};return i&&i.providedBeanInstances&&Object.assign(n,i.providedBeanInstances),n}createAgStackComponentsList(e){let t=[{componentName:"AgCheckbox",componentClass:Hc},{componentName:"AgRadioButton",componentClass:wR},{componentName:"AgToggleButton",componentClass:fT},{componentName:"AgInputTextField",componentClass:Mo},{componentName:"AgInputTextArea",componentClass:wL},{componentName:"AgInputNumberField",componentClass:ym},{componentName:"AgInputDateField",componentClass:yL},{componentName:"AgInputRange",componentClass:SL},{componentName:"AgRichSelect",componentClass:ih},{componentName:"AgSelect",componentClass:Vc},{componentName:"AgSlider",componentClass:RL},{componentName:"AgGridBody",componentClass:ns},{componentName:"AgHeaderRoot",componentClass:mL},{componentName:"AgSortIndicator",componentClass:Em},{componentName:"AgPagination",componentClass:li},{componentName:"AgPageSizeSelector",componentClass:km},{componentName:"AgOverlayWrapper",componentClass:kL},{componentName:"AgGroupComponent",componentClass:TL},{componentName:"AgRowContainer",componentClass:jr},{componentName:"AgFakeHorizontalScroll",componentClass:VL},{componentName:"AgFakeVerticalScroll",componentClass:YL},{componentName:"AgAutocomplete",componentClass:LL}];const i=this.extractModuleEntity(e,s=>s.agStackComponents?s.agStackComponents:[]);return t=t.concat(i),t}createBeansList(e="clientSide",t,i){const s=t.filter(a=>!a.rowModel||a.rowModel===e),n={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(!n[e]){Xn("Could not find row model for rowModelType = "+e);return}if(!he.__assertRegistered(n[e],`rowModelType = '${e}'`,i))return;const o=[ie,kr,Fg,Da,Nr,oe,Wd,Yd,Ra,Eg,Sn,Or,va,Lg,Aa,ya,Ca,dg,is,pe,ks,So,Gi,ft,vo,Sa,Si,$d,ua,yo,bt,jd,Tn,Kd,wo,En,J,xr,Se,Is,Ta,Rn,zd,Mr,Eo,Pg,Ea,Gr,da,_r,Ir,Ss,cg,Ag,Pa,ys,Vr,uo,Fa,Hr,bg,Ro,ti,To,Do,Ot,wa,Qd,ba,ki],r=this.extractModuleEntity(s,a=>a.beans?a.beans:[]);o.push(...r);const l=[];return o.forEach(a=>{l.indexOf(a)<0&&l.push(a)}),l}extractModuleEntity(e,t){return[].concat(...e.map(t))}},XL=class{wrap(e,t,i=[],s){const n=this.createWrapper(e,s);return t.forEach(o=>{this.createMethod(n,o,!0)}),i.forEach(o=>{this.createMethod(n,o,!1)}),n}unwrap(e){return e}createMethod(e,t,i){e.addMethod(t,this.createMethodProxy(e,t,i))}createMethodProxy(e,t,i){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(i&&console.warn("AG Grid: Framework component is missing the method "+t+"()"),null)}}},il=typeof global>"u"?{}:global;il.HTMLElement=typeof HTMLElement>"u"?{}:HTMLElement;il.HTMLButtonElement=typeof HTMLButtonElement>"u"?{}:HTMLButtonElement;il.HTMLSelectElement=typeof HTMLSelectElement>"u"?{}:HTMLSelectElement;il.HTMLInputElement=typeof HTMLInputElement>"u"?{}:HTMLInputElement;il.Node=typeof Node>"u"?{}:Node;il.MouseEvent=typeof MouseEvent>"u"?{}:MouseEvent;var Vm=class Fl{constructor(t,i,s,n,o,r){this.nextId=0,this.rowCountReady=!1,this.allNodesMap={},this.rootNode=t,this.gos=i,this.eventService=s,this.columnModel=n,this.beans=r,this.selectionService=o,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id=Fl.ROOT_NODE_ID,this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[]}getCopyOfNodesMap(){return Q.cloneObject(this.allNodesMap)}getRowNode(t){return this.allNodesMap[t]}setRowData(t){if(typeof t=="string"){console.warn("AG Grid: rowData must be an array.");return}this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(t);const i=this.rootNode,s=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(n=>this.createNode(n,this.rootNode,Fl.TOP_LEVEL)):(i.allLeafChildren=[],i.childrenAfterGroup=[]),s&&(s.childrenAfterFilter=i.childrenAfterFilter,s.childrenAfterGroup=i.childrenAfterGroup,s.childrenAfterAggFilter=i.childrenAfterAggFilter,s.childrenAfterSort=i.childrenAfterSort,s.childrenMapped=i.childrenMapped,s.allLeafChildren=i.allLeafChildren)}updateRowData(t,i){this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(t.add);const s={remove:[],update:[],add:[]},n=[];return this.executeRemove(t,s,n),this.executeUpdate(t,s,n),this.executeAdd(t,s),this.updateSelection(n,"rowDataChanged"),i&&Q.sortRowNodesByOrder(this.rootNode.allLeafChildren,i),s}isRowCountReady(){return this.rowCountReady}dispatchRowDataUpdateStartedEvent(t){const i={type:g.EVENT_ROW_DATA_UPDATE_STARTED,firstRowData:t!=null&&t.length?t[0]:null};this.eventService.dispatchEvent(i)}updateSelection(t,i){const s=t.length>0;if(s&&this.selectionService.setNodesSelected({newValue:!1,nodes:t,suppressFinishActions:!0,source:i}),this.selectionService.updateGroupsFromChildrenSelections(i),s){const n={type:g.EVENT_SELECTION_CHANGED,source:i};this.eventService.dispatchEvent(n)}}executeAdd(t,i){var s;const{add:n,addIndex:o}=t;if(Q.missingOrEmpty(n))return;const r=n.map(l=>this.createNode(l,this.rootNode,Fl.TOP_LEVEL));if(typeof o=="number"&&o>=0){const{allLeafChildren:l}=this.rootNode,a=l.length;let u=o;if(this.gos.get("treeData")&&o>0&&a>0){for(let C=0;C<a;C++)if(((s=l[C])==null?void 0:s.rowIndex)==o-1){u=C+1;break}}const h=l.slice(0,u),p=l.slice(u,l.length);this.rootNode.allLeafChildren=[...h,...r,...p]}else this.rootNode.allLeafChildren=[...this.rootNode.allLeafChildren,...r];this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren),i.add=r}executeRemove(t,i,s){const{remove:n}=t;if(Q.missingOrEmpty(n))return;const o={};n.forEach(r=>{const l=this.lookupRowNode(r);l&&(l.isSelected()&&s.push(l),l.clearRowTopAndRowIndex(),o[l.id]=!0,delete this.allNodesMap[l.id],i.remove.push(l))}),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren.filter(r=>!o[r.id]),this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren)}executeUpdate(t,i,s){const{update:n}=t;Q.missingOrEmpty(n)||n.forEach(o=>{const r=this.lookupRowNode(o);r&&(r.updateData(o),!r.selectable&&r.isSelected()&&s.push(r),this.setMasterForRow(r,o,Fl.TOP_LEVEL,!1),i.update.push(r))})}lookupRowNode(t){const i=this.gos.getCallback("getRowId");let s;if(i){const n=i({data:t,level:0});if(s=this.allNodesMap[n],!s)return console.error(`AG Grid: could not find row id=${n}, data item was not found for this id`),null}else if(s=this.rootNode.allLeafChildren.find(n=>n.data===t),!s)return console.error("AG Grid: could not find data item as object was not found",t),console.error("Consider using getRowId to help the Grid find matching row data"),null;return s||null}createNode(t,i,s){const n=new se(this.beans);n.group=!1,this.setMasterForRow(n,t,s,!0);const o=this.gos.get("suppressParentsInRowNodes");return i&&!o&&(n.parent=i),n.level=s,n.setDataAndId(t,this.nextId.toString()),this.allNodesMap[n.id]&&console.warn(`AG Grid: duplicate node id '${n.id}' detected from getRowId callback, this could cause issues in your grid.`),this.allNodesMap[n.id]=n,this.nextId++,n}setMasterForRow(t,i,s,n){if(this.gos.get("treeData"))t.setMaster(!1),n&&(t.expanded=!1);else{if(this.gos.get("masterDetail")){const l=this.gos.get("isRowMaster");l?t.setMaster(l(i)):t.setMaster(!0)}else t.setMaster(!1);if(n){const l=this.columnModel.getRowGroupColumns(),a=l?l.length:0,u=s+a;t.expanded=t.master?this.isExpanded(u):!1}}}isExpanded(t){const i=this.gos.get("groupDefaultExpanded");return i===-1?!0:t<i}};Vm.TOP_LEVEL=0;Vm.ROOT_NODE_ID="ROOT_NODE_ID";var ZL=Vm,Gt=class extends L{constructor(){super(...arguments),this.onRowHeightChanged_debounced=Q.debounce(this.onRowHeightChanged.bind(this),100),this.rowsToDisplay=[],this.hasStarted=!1,this.shouldSkipSettingDataOnStart=!1,this.isRefreshingModel=!1,this.rowCountReady=!1}init(){const e=this.refreshModel.bind(this,{step:"group"}),t=!this.gos.get("suppressAnimationFrame"),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:t});this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,i),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VALUE_CHANGED,this.onValueChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_CHANGED,this.refreshModel.bind(this,{step:"pivot"})),this.addManagedListener(this.eventService,g.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanges.bind(this)),this.addManagedListener(this.eventService,g.EVENT_GRID_READY,()=>this.onGridReady()),this.addPropertyListeners(),this.rootNode=new se(this.beans),this.nodeManager=new ZL(this.rootNode,this.gos,this.eventService,this.columnModel,this.selectionService,this.beans)}addPropertyListeners(){const e=new Set(["treeData","masterDetail"]),t=new Set(["suppressParentsInRowNodes","groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),i=new Set(["excludeChildrenWhenTreeDataFiltering"]),s=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),n=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly","grandTotalRow"]),o=new Set(["postSortRows","groupDisplayType","accentedSort"]),r=new Set([]),l=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter","groupTotalRow"]),a=[...e,...t,...i,...s,...s,...n,...o,...r,...l];this.addManagedPropertyListeners(a,u=>{var d;const h=(d=u.changeSet)==null?void 0:d.properties;if(!h)return;const p=C=>h.some(v=>C.has(v));if(p(e)){this.setRowData(this.rootNode.allLeafChildren.map(C=>C.data));return}if(p(t)){this.refreshModel({step:"group"});return}if(p(i)){this.refreshModel({step:"filter"});return}if(p(s)){this.refreshModel({step:"pivot"});return}if(p(n)){this.refreshModel({step:"aggregate"});return}if(p(o)){this.refreshModel({step:"sort"});return}if(p(r)){this.refreshModel({step:"filter_aggregates"});return}p(l)&&this.refreshModel({step:"map"})}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.hasStarted=!0,this.shouldSkipSettingDataOnStart?this.dispatchUpdateEventsAndRefresh():this.setInitialData()}setInitialData(){const e=this.gos.get("rowData");e&&(this.shouldSkipSettingDataOnStart=!0,this.setRowData(e))}ensureRowHeightsValid(e,t,i,s){let n,o=!1;do{n=!1;const r=this.getRowIndexAtPixel(e),l=this.getRowIndexAtPixel(t),a=Math.max(r,i),u=Math.min(l,s);for(let d=a;d<=u;d++){const h=this.getRow(d);if(h.rowHeightEstimated){const p=this.gos.getRowHeightForNode(h);h.setRowHeight(p.height),n=!0,o=!0}}n&&this.setRowTopAndRowIndex()}while(n);return o}setRowTopAndRowIndex(){const e=this.environment.getDefaultRowHeight();let t=0;const i=new Set,s=this.gos.isDomLayout("normal");for(let n=0;n<this.rowsToDisplay.length;n++){const o=this.rowsToDisplay[n];if(o.id!=null&&i.add(o.id),o.rowHeight==null){const r=this.gos.getRowHeightForNode(o,s,e);o.setRowHeight(r.height,r.estimated)}o.setRowTop(t),o.setRowIndex(n),t+=o.rowHeight}return i}clearRowTopAndRowIndex(e,t){const i=e.isActive(),s=o=>{o&&o.id!=null&&!t.has(o.id)&&o.clearRowTopAndRowIndex()},n=o=>{if(s(o),s(o.detailNode),s(o.sibling),o.hasChildren()&&o.childrenAfterGroup){const r=o.level==-1;i&&!r&&!o.expanded||o.childrenAfterGroup.forEach(n)}};n(this.rootNode)}ensureRowsAtPixel(e,t,i=0){const s=this.getRowIndexAtPixel(t),n=this.getRow(s),o=!this.gos.get("suppressAnimationFrame");return n===e[0]?!1:(e.forEach(r=>{Q.removeFromArray(this.rootNode.allLeafChildren,r)}),e.forEach((r,l)=>{Q.insertIntoArray(this.rootNode.allLeafChildren,r,Math.max(s+i,0)+l)}),this.refreshModel({step:"group",keepRenderedRows:!0,keepEditingRows:!0,animate:o}),!0)}highlightRowAtPixel(e,t){const i=t!=null?this.getRowIndexAtPixel(t):null,s=i!=null?this.getRow(i):null;if(!s||!e||s===e||t==null){this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null);return}const n=this.getHighlightPosition(t,s);this.lastHighlightedRow&&this.lastHighlightedRow!==s&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),s.setHighlighted(n),this.lastHighlightedRow=s}getHighlightPosition(e,t){if(!t){const n=this.getRowIndexAtPixel(e);if(t=this.getRow(n||0),!t)return 1}const{rowTop:i,rowHeight:s}=t;return e-i<s/2?0:1}getLastHighlightedRowNode(){return this.lastHighlightedRow}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return 1;const t=this.rootNode.childrenAfterAggFilter;return t?t.length:0}getTopLevelRowDisplayedIndex(e){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return e;let i=this.rootNode.childrenAfterSort[e];if(this.gos.get("groupHideOpenParents"))for(;i.expanded&&i.childrenAfterSort&&i.childrenAfterSort.length>0;)i=i.childrenAfterSort[0];return i.rowIndex}getRowBounds(e){if(Q.missing(this.rowsToDisplay))return null;const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){const e=this.gos.isAnimateRows();this.refreshModel({step:"map",keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;const t=this.gos.isAnimateRows(),s=e.columns.length===0||e.columns.some(n=>n.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:s,keepRenderedRows:!0,animate:t})}onSortChanged(){const e=this.gos.isAnimateRows();this.refreshModel({step:"sort",keepRenderedRows:!0,animate:e,keepEditingRows:!0})}getType(){return"clientSide"}onValueChanged(){this.columnModel.isPivotActive()?this.refreshModel({step:"pivot"}):this.refreshModel({step:"aggregate"})}createChangePath(e){const t=Q.missingOrEmpty(e),i=new th(!1,this.rootNode);return(t||this.gos.get("treeData"))&&i.setInactive(),i}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction")||e.rowNodeTransactions==null)return!1;const t=e.rowNodeTransactions.filter(s=>s.add!=null&&s.add.length>0||s.remove!=null&&s.remove.length>0);return t==null||t.length==0}buildRefreshModelParams(e){let t="group";const i={everything:"group",group:"group",filter:"filter",map:"map",aggregate:"aggregate",sort:"sort",pivot:"pivot"};if(Q.exists(e)&&(t=i[e]),Q.missing(t)){console.error(`AG Grid: invalid step ${e}, available steps are ${Object.keys(i).join(", ")}`);return}const s=!this.gos.get("suppressAnimationFrame");return{step:t,keepRenderedRows:!0,keepEditingRows:!0,animate:s}}refreshModel(e){if(!this.hasStarted||this.isRefreshingModel||this.columnModel.shouldRowModelIgnoreRefresh())return;let t=typeof e=="object"&&"step"in e?e:this.buildRefreshModelParams(e);if(!t||this.isSuppressModelUpdateAfterUpdateTransaction(t))return;const i=this.createChangePath(t.rowNodeTransactions);switch(this.isRefreshingModel=!0,t.step){case"group":this.doRowGrouping(t.rowNodeTransactions,t.rowNodeOrder,i,!!t.afterColumnsChanged);case"filter":this.doFilter(i);case"pivot":this.doPivot(i);case"aggregate":this.doAggregate(i);case"filter_aggregates":this.doFilterAggregates(i);case"sort":this.doSort(t.rowNodeTransactions,i);case"map":this.doRowsToDisplay()}const s=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(i,s),this.isRefreshingModel=!1;const n={type:g.EVENT_MODEL_UPDATED,animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack};this.eventService.dispatchEvent(n)}isEmpty(){const e=Q.missing(this.rootNode.allLeafChildren)||this.rootNode.allLeafChildren.length===0;return Q.missing(this.rootNode)||e||!this.columnModel.isReady()}isRowsToRender(){return Q.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let i=!t,s=!1;const n=[],o=this.gos.get("groupSelectsChildren");return this.forEachNodeAfterFilterAndSort(r=>{if(s)return;if(i&&(r===t||r===e)&&(s=!0,r.group&&o)){n.push(...r.allLeafChildren);return}if(!i){if(r!==t&&r!==e)return;i=!0}if(!r.group||!o){n.push(r);return}}),n}setDatasource(e){console.error("AG Grid: should never call setDatasource on clientSideRowController")}getTopLevelNodes(){return this.rootNode?this.rootNode.childrenAfterGroup:null}getRootNode(){return this.rootNode}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){if(this.isEmpty()||this.rowsToDisplay.length===0)return-1;let t=0,i=this.rowsToDisplay.length-1;if(e<=0)return 0;if(Q.last(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;let n=-1,o=-1;for(;;){const r=Math.floor((t+i)/2),l=this.rowsToDisplay[r];if(this.isRowInPixel(l,e)||(l.rowTop<e?t=r+1:l.rowTop>e&&(i=r-1),n===t&&o===i))return r;n=t,o=i}}isRowInPixel(e,t){const i=e.rowTop,s=e.rowTop+e.rowHeight;return i<=t&&s>t}forEachLeafNode(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach((t,i)=>e(t,i))}forEachNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterGroup||[]],callback:e,recursionType:0,index:0,includeFooterNodes:t})}forEachNodeAfterFilter(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterAggFilter||[]],callback:e,recursionType:1,index:0,includeFooterNodes:t})}forEachNodeAfterFilterAndSort(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterSort||[]],callback:e,recursionType:2,index:0,includeFooterNodes:t})}forEachPivotNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:e,recursionType:3,index:0,includeFooterNodes:t})}recursivelyWalkNodesAndCallback(e){const{nodes:t,callback:i,recursionType:s,includeFooterNodes:n}=e;let{index:o}=e;const r=l=>{var a;const u=(a=t[0])==null?void 0:a.parent;if(!u)return;const d=n&&this.gos.getGrandTotalRow(),h=this.gos.getGroupTotalRowCallback(),p=n&&h({node:u});if(u===this.rootNode){d===l&&(u.createFooter(),i(u.sibling,o++));return}p===l&&(u.createFooter(),i(u.sibling,o++))};r("top");for(let l=0;l<t.length;l++){const a=t[l];if(i(a,o++),a.hasChildren()&&!a.footer){let u=null;switch(s){case 0:u=a.childrenAfterGroup;break;case 1:u=a.childrenAfterAggFilter;break;case 2:u=a.childrenAfterSort;break;case 3:u=a.leafGroup?null:a.childrenAfterSort;break}u&&(o=this.recursivelyWalkNodesAndCallback({nodes:[...u],callback:i,recursionType:s,index:o,includeFooterNodes:n}))}}return r("bottom"),o}doAggregate(e){var t;(t=this.aggregationStage)==null||t.execute({rowNode:this.rootNode,changedPath:e})}doFilterAggregates(e){this.filterAggregatesStage?this.filterAggregatesStage.execute({rowNode:this.rootNode,changedPath:e}):this.rootNode.childrenAfterAggFilter=this.rootNode.childrenAfterFilter}expandOrCollapseAll(e){const t=this.gos.get("treeData"),i=this.columnModel.isPivotActive(),s=r=>{r&&r.forEach(l=>{const a=()=>{l.expanded=e,s(l.childrenAfterGroup)};if(t){Q.exists(l.childrenAfterGroup)&&a();return}if(i){!l.leafGroup&&a();return}l.group&&a()})};this.rootNode&&s(this.rootNode.childrenAfterGroup),this.refreshModel({step:"map"});const n=e?"expandAll":"collapseAll",o={type:g.EVENT_EXPAND_COLLAPSE_ALL,source:n};this.eventService.dispatchEvent(o)}doSort(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})}doRowGrouping(e,t,i,s){if(this.groupStage){if(e?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,rowNodeOrder:t,changedPath:i}):this.groupStage.execute({rowNode:this.rootNode,changedPath:i,afterColumnsChanged:s}),this.gos.get("groupSelectsChildren")&&this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",i)){const o={type:g.EVENT_SELECTION_CHANGED,source:"rowGroupChanged"};this.eventService.dispatchEvent(o)}}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:g.EVENT_ROW_COUNT_READY}))}doFilter(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})}doPivot(e){var t;(t=this.pivotStage)==null||t.execute({rowNode:this.rootNode,changedPath:e})}getCopyOfNodesMap(){return this.nodeManager.getCopyOfNodesMap()}getRowNode(e){if(typeof e=="string"&&e.indexOf(se.ID_PREFIX_ROW_GROUP)==0){let i;return this.forEachNode(s=>{s.id===e&&(i=s)}),i}return this.nodeManager.getRowNode(e)}setRowData(e){this.selectionService.reset("rowDataChanged"),this.nodeManager.setRowData(e),this.hasStarted&&this.dispatchUpdateEventsAndRefresh()}dispatchUpdateEventsAndRefresh(){const e={type:g.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(e),this.refreshModel({step:"group",newData:!0})}batchUpdateRowData(e,t){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];const i=this.gos.getAsyncTransactionWaitMillis();this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.executeBatchUpdateRowData()},i)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){this.valueCache.onDataChanged();const e=[],t=[];let i=!1;if(this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEach(s=>{const n=this.nodeManager.updateRowData(s.rowDataTransaction,void 0);t.push(n),s.callback&&e.push(s.callback.bind(null,n)),typeof s.rowDataTransaction.addIndex=="number"&&(i=!0)}),this.commonUpdateRowData(t,void 0,i),e.length>0&&window.setTimeout(()=>{e.forEach(s=>s())},0),t.length>0){const s={type:g.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:t};this.eventService.dispatchEvent(s)}this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e,t){this.valueCache.onDataChanged();const i=this.nodeManager.updateRowData(e,t),s=typeof e.addIndex=="number";return this.commonUpdateRowData([i],t,s),i}createRowNodeOrder(){if(this.gos.get("suppressMaintainUnsortedOrder"))return;const t={};if(this.rootNode&&this.rootNode.allLeafChildren)for(let i=0;i<this.rootNode.allLeafChildren.length;i++){const s=this.rootNode.allLeafChildren[i];t[s.id]=i}return t}commonUpdateRowData(e,t,i){if(!this.hasStarted)return;const s=!this.gos.get("suppressAnimationFrame");i&&(t=this.createRowNodeOrder());const n={type:g.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(n),this.refreshModel({step:"group",rowNodeTransactions:e,rowNodeOrder:t,keepRenderedRows:!0,keepEditingRows:!0,animate:s})}doRowsToDisplay(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepEditingRows:!0,keepUndoRedoStack:!0})}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}resetRowHeights(){const e=this.resetRowHeightsForAllRowNodes();this.rootNode.setRowHeight(this.rootNode.rowHeight,!0),this.rootNode.sibling&&this.rootNode.sibling.setRowHeight(this.rootNode.sibling.rowHeight,!0),e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const i=t.detailNode;i&&i.setRowHeight(i.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0}),e}onGridStylesChanges(){this.columnModel.isAutoRowHeightActive()||this.resetRowHeights()}onGridReady(){this.hasStarted||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}};c([f("columnModel")],Gt.prototype,"columnModel",2);c([f("selectionService")],Gt.prototype,"selectionService",2);c([f("valueCache")],Gt.prototype,"valueCache",2);c([f("beans")],Gt.prototype,"beans",2);c([f("filterStage")],Gt.prototype,"filterStage",2);c([f("sortStage")],Gt.prototype,"sortStage",2);c([f("flattenStage")],Gt.prototype,"flattenStage",2);c([fe("groupStage")],Gt.prototype,"groupStage",2);c([fe("aggregationStage")],Gt.prototype,"aggregationStage",2);c([fe("pivotStage")],Gt.prototype,"pivotStage",2);c([fe("filterAggregatesStage")],Gt.prototype,"filterAggregatesStage",2);c([M],Gt.prototype,"init",1);Gt=c([H("rowModel")],Gt);var qd=class extends L{execute(e){const{changedPath:t}=e;this.filterService.filter(t)}};c([f("filterService")],qd.prototype,"filterService",2);qd=c([H("filterStage")],qd);var La=class extends L{execute(e){const t=this.sortController.getSortOptions(),i=Q.exists(t)&&t.length>0,s=i&&Q.exists(e.rowNodeTransactions)&&this.gos.get("deltaSort"),n=t.some(o=>this.gos.isColumnsSortingCoupledToGroup()?o.column.isPrimary()&&o.column.isRowGroupActive():!!o.column.getColDef().showRowGroup);this.sortService.sort(t,i,s,e.rowNodeTransactions,e.changedPath,n)}};c([f("sortService")],La.prototype,"sortService",2);c([f("sortController")],La.prototype,"sortController",2);La=c([H("sortStage")],La);var Xd=class extends L{execute(e){const t=e.rowNode,i=[],s=this.beans.columnModel.isPivotMode(),n=s&&t.leafGroup,o=n?[t]:t.childrenAfterSort,r=this.getFlattenDetails();this.recursivelyAddToRowsToDisplay(r,o,i,s,0);const l=i.length>0;if(!n&&l&&r.grandTotalRow){t.createFooter();const u=r.grandTotalRow==="top";this.addRowNodeToRowsToDisplay(r,t.sibling,i,0,u)}return i}getFlattenDetails(){const e=this.gos.get("groupRemoveSingleChildren");return{groupRemoveLowestSingleChildren:!e&&this.gos.get("groupRemoveLowestSingleChildren"),groupRemoveSingleChildren:e,isGroupMultiAutoColumn:this.gos.isGroupMultiAutoColumn(),hideOpenParents:this.gos.get("groupHideOpenParents"),grandTotalRow:this.gos.getGrandTotalRow(),groupTotalRow:this.gos.getGroupTotalRowCallback()}}recursivelyAddToRowsToDisplay(e,t,i,s,n){if(!Q.missingOrEmpty(t))for(let o=0;o<t.length;o++){const r=t[o],l=r.hasChildren(),a=s&&!l,u=e.groupRemoveSingleChildren&&l&&r.childrenAfterGroup.length===1,d=e.groupRemoveLowestSingleChildren&&l&&r.leafGroup&&r.childrenAfterGroup.length===1,h=s&&r.leafGroup,p=e.hideOpenParents&&r.expanded&&!r.master&&!h;if(!a&&!p&&!u&&!d&&this.addRowNodeToRowsToDisplay(e,r,i,n),!(s&&r.leafGroup)){if(l){const v=u||d;if(r.expanded||v){const y=e.groupTotalRow({node:r});y||r.destroyFooter();const R=v?n:n+1;y==="top"&&(r.createFooter(),this.addRowNodeToRowsToDisplay(e,r.sibling,i,R)),this.recursivelyAddToRowsToDisplay(e,r.childrenAfterSort,i,s,R),y==="bottom"&&(r.createFooter(),this.addRowNodeToRowsToDisplay(e,r.sibling,i,R))}}else if(r.master&&r.expanded){const v=this.createDetailNode(r);this.addRowNodeToRowsToDisplay(e,v,i,n)}}}}addRowNodeToRowsToDisplay(e,t,i,s,n){n?i.unshift(t):i.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:s)}createDetailNode(e){if(Q.exists(e.detailNode))return e.detailNode;const t=new se(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,Q.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t}};c([f("beans")],Xd.prototype,"beans",2);Xd=c([H("flattenStage")],Xd);var Ma=class extends L{sort(e,t,i,s,n,o){const r=this.gos.get("groupMaintainOrder"),l=this.columnModel.getAllGridColumns().some(p=>p.isRowGroupActive());let a={};i&&s&&(a=this.calculateDirtyNodes(s));const u=this.columnModel.isPivotMode(),d=this.gos.getCallback("postSortRows"),h=p=>{var C;this.pullDownGroupDataForHideOpenParents(p.childrenAfterAggFilter,!0);const v=u&&p.leafGroup;if(r&&l&&!p.leafGroup&&!o){const R=(C=this.columnModel.getRowGroupColumns())==null?void 0:C[p.level+1],w=(R==null?void 0:R.getSort())===null,m=p.childrenAfterAggFilter.slice(0);if(p.childrenAfterSort&&!w){const E={};p.childrenAfterSort.forEach((T,P)=>{E[T.id]=P}),m.sort((T,P)=>{var A,F;return((A=E[T.id])!=null?A:0)-((F=E[P.id])!=null?F:0)})}p.childrenAfterSort=m}else!t||v?p.childrenAfterSort=p.childrenAfterAggFilter.slice(0):i?p.childrenAfterSort=this.doDeltaSort(p,a,n,e):p.childrenAfterSort=this.rowNodeSorter.doFullSort(p.childrenAfterAggFilter,e);if(p.sibling&&(p.sibling.childrenAfterSort=p.childrenAfterSort),this.updateChildIndexes(p),d){const R={nodes:p.childrenAfterSort};d(R)}};n&&n.forEachChangedNodeDepthFirst(h),this.updateGroupDataForHideOpenParents(n)}calculateDirtyNodes(e){const t={},i=s=>{s&&s.forEach(n=>t[n.id]=!0)};return e&&e.forEach(s=>{i(s.add),i(s.update),i(s.remove)}),t}doDeltaSort(e,t,i,s){const n=e.childrenAfterAggFilter,o=e.childrenAfterSort;if(!o)return this.rowNodeSorter.doFullSort(n,s);const r={},l=[];n.forEach(h=>{t[h.id]||!i.canSkip(h)?l.push(h):r[h.id]=!0});const a=o.filter(h=>r[h.id]),u=(h,p)=>({currentPos:p,rowNode:h}),d=l.map(u).sort((h,p)=>this.rowNodeSorter.compareRowNodes(s,h,p));return this.mergeSortedArrays(s,d,a.map(u)).map(({rowNode:h})=>h)}mergeSortedArrays(e,t,i){const s=[];let n=0,o=0;for(;n<t.length&&o<i.length;)this.rowNodeSorter.compareRowNodes(e,t[n],i[o])<0?s.push(t[n++]):s.push(i[o++]);for(;n<t.length;)s.push(t[n++]);for(;o<i.length;)s.push(i[o++]);return s}updateChildIndexes(e){if(Q.missing(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let i=0;i<t.length;i++){const s=t[i],n=i===0,o=i===e.childrenAfterSort.length-1;s.setFirstChild(n),s.setLastChild(o),s.setChildIndex(i)}}updateGroupDataForHideOpenParents(e){if(!this.gos.get("groupHideOpenParents"))return;if(this.gos.get("treeData"))return Q.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;const t=i=>{this.pullDownGroupDataForHideOpenParents(i.childrenAfterSort,!1),i.childrenAfterSort.forEach(s=>{s.hasChildren()&&t(s)})};e&&e.executeFromRootNode(i=>t(i))}pullDownGroupDataForHideOpenParents(e,t){!this.gos.get("groupHideOpenParents")||Q.missing(e)||e.forEach(i=>{this.columnModel.getGroupDisplayColumns().forEach(n=>{const o=n.getColDef().showRowGroup;if(typeof o!="string"){console.error("AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");return}const r=o,l=this.columnModel.getPrimaryColumn(r);if(l!==i.rowGroupColumn)if(t)i.setGroupValue(n.getId(),void 0);else{const u=i.getFirstChildOfFirstChild(l);u&&i.setGroupValue(n.getId(),u.key)}})})}};c([f("columnModel")],Ma.prototype,"columnModel",2);c([f("rowNodeSorter")],Ma.prototype,"rowNodeSorter",2);Ma=c([H("sortService")],Ma);var Zd=class extends L{filter(e){const t=this.filterManager.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const i=(s,n)=>{s.hasChildren()&&e&&!n?s.childrenAfterFilter=s.childrenAfterGroup.filter(o=>{const r=o.childrenAfterFilter&&o.childrenAfterFilter.length>0,l=o.data&&this.filterManager.doesRowPassFilter({rowNode:o});return r||l}):s.childrenAfterFilter=s.childrenAfterGroup,s.sibling&&(s.sibling.childrenAfterFilter=s.childrenAfterFilter)};if(this.doingTreeDataFiltering()){const s=(o,r)=>{if(o.childrenAfterGroup)for(let l=0;l<o.childrenAfterGroup.length;l++){const a=o.childrenAfterGroup[l],u=r||this.filterManager.doesRowPassFilter({rowNode:a});a.childrenAfterGroup?s(o.childrenAfterGroup[l],u):i(a,u)}i(o,r)},n=o=>s(o,!1);t.executeFromRootNode(n)}else{const s=n=>i(n,!1);t.forEachChangedNodeDepthFirst(s,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}};c([f("filterManager")],Zd.prototype,"filterManager",2);Zd=c([H("filterService")],Zd);var Po=class extends L{postConstruct(){this.rowModel.getType()==="clientSide"&&(this.clientSideRowModel=this.rowModel,this.addManagedPropertyListener("rowData",()=>this.onRowDataUpdated()))}isActive(){const e=this.gos.exists("getRowId");return this.gos.get("resetRowDataOnUpdate")?!1:e}setRowData(e){const t=this.createTransactionForRowData(e);if(!t)return;const[i,s]=t;this.clientSideRowModel.updateRowData(i,s)}createTransactionForRowData(e){if(Q.missing(this.clientSideRowModel)){console.error("AG Grid: ImmutableService only works with ClientSideRowModel");return}const t=this.gos.getCallback("getRowId");if(t==null){console.error("AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!");return}const i={remove:[],update:[],add:[]},s=this.clientSideRowModel.getCopyOfNodesMap(),o=this.gos.get("suppressMaintainUnsortedOrder")?void 0:{};return Q.exists(e)&&e.forEach((r,l)=>{const a=t({data:r,level:0}),u=s[a];o&&(o[a]=l),u?(u.data!==r&&i.update.push(r),s[a]=void 0):i.add.push(r)}),Q.iterateObject(s,(r,l)=>{l&&i.remove.push(l.data)}),[i,o]}onRowDataUpdated(){const e=this.gos.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)))}};c([f("rowModel")],Po.prototype,"rowModel",2);c([f("rowRenderer")],Po.prototype,"rowRenderer",2);c([f("selectionService")],Po.prototype,"selectionService",2);c([M],Po.prototype,"postConstruct",1);Po=c([H("immutableService")],Po);var JL="31.3.4",eM={version:JL,moduleName:"@ag-grid-community/client-side-row-model",rowModel:"clientSide",beans:[Gt,qd,La,Xd,Ma,Zd,Po]},tM=Object.defineProperty,iM=Object.getOwnPropertyDescriptor,Ut=(e,t,i,s)=>{for(var n=s>1?void 0:s?iM(t,i):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(n=(s?r(t,i,n):r(n))||n);return s&&n&&tM(t,i,n),n},sM=(e,t)=>(i,s)=>t(i,s,e),Ia=class extends Rg{constructor(e,t,i){super(e),this.parentCache=t,this.params=i,this.startRow=e*i.blockSize,this.endRow=this.startRow+i.blockSize}postConstruct(){this.createRowNodes()}getBlockStateJson(){return{id:""+this.getId(),state:{blockNumber:this.getId(),startRow:this.getStartRow(),endRow:this.getEndRow(),pageStatus:this.getState()}}}setDataAndId(e,t,i){Q.exists(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Q.missing(this.params.datasource.getRows)){console.warn("AG Grid: datasource is missing getRows method");return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}processServerFail(){}createLoadParams(){return{startRow:this.getStartRow(),endRow:this.getEndRow(),successCallback:this.pageLoaded.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),sortModel:this.params.sortModel,filterModel:this.params.filterModel,context:this.gos.getGridCommonParams().context}}forEachNode(e,t,i){this.rowNodes.forEach((s,n)=>{this.startRow+n<i&&e(s,t.next())})}getLastAccessed(){return this.lastAccessed}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.next());const i=e-this.startRow;return this.rowNodes[i]}getStartRow(){return this.startRow}getEndRow(){return this.endRow}createRowNodes(){this.rowNodes=[];for(let e=0;e<this.params.blockSize;e++){const t=this.startRow+e,i=new se(this.beans);i.setRowHeight(this.params.rowHeight),i.uiLevel=0,i.setRowIndex(t),i.setRowTop(this.params.rowHeight*t),this.rowNodes.push(i)}}processServerResult(e){this.rowNodes.forEach((i,s)=>{const n=e.rowData?e.rowData[s]:void 0;!i.id&&i.alreadyRendered&&n&&(this.rowNodes[s]=new se(this.beans),this.rowNodes[s].setRowIndex(i.rowIndex),this.rowNodes[s].setRowTop(i.rowTop),this.rowNodes[s].setRowHeight(i.rowHeight),i.clearRowTopAndRowIndex()),this.setDataAndId(this.rowNodes[s],n,this.startRow+s)});const t=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,t)}destroyRowNodes(){this.rowNodes.forEach(e=>{e.clearRowTopAndRowIndex()})}};Ut([f("beans")],Ia.prototype,"beans",2);Ut([M],Ia.prototype,"postConstruct",1);Ut([Bt],Ia.prototype,"destroyRowNodes",1);var sl=class FT extends L{constructor(t){super(),this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=t.initialRowCount,this.params=t}setBeans(t){this.logger=t.create("InfiniteCache")}getRow(t,i=!1){const s=Math.floor(t/this.params.blockSize);let n=this.blocks[s];if(!n){if(i)return;n=this.createBlock(s)}return n.getRow(t)}createBlock(t){const i=this.createBean(new Ia(t,this,this.params));return this.blocks[i.getId()]=i,this.blockCount++,this.purgeBlocksIfNeeded(i),this.params.rowNodeBlockLoader.addBlock(i),i}refreshCache(){if(this.blockCount==0){this.purgeCache();return}this.getBlocksInOrder().forEach(i=>i.setStateWaitingToLoad()),this.params.rowNodeBlockLoader.checkBlockToLoad()}destroyAllBlocks(){this.getBlocksInOrder().forEach(t=>this.destroyBlock(t))}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(t,i){this.isAlive()&&(this.logger.log(`onPageLoaded: page = ${t.getId()}, lastRow = ${i}`),this.checkRowCount(t,i),this.onCacheUpdated())}purgeBlocksIfNeeded(t){const i=this.getBlocksInOrder().filter(l=>l!=t),s=(l,a)=>a.getLastAccessed()-l.getLastAccessed();i.sort(s);const n=this.params.maxBlocksInCache>0,o=n?this.params.maxBlocksInCache-1:null,r=FT.MAX_EMPTY_BLOCKS_TO_KEEP-1;i.forEach((l,a)=>{const u=l.getState()===Ia.STATE_WAITING_TO_LOAD&&a>=r,d=n?a>=o:!1;if(u||d){if(this.isBlockCurrentlyDisplayed(l)||this.isBlockFocused(l))return;this.removeBlockFromCache(l)}})}isBlockFocused(t){const i=this.focusService.getFocusCellToUseAfterRefresh();if(!i||i.rowPinned!=null)return!1;const s=t.getStartRow(),n=t.getEndRow();return i.rowIndex>=s&&i.rowIndex<n}isBlockCurrentlyDisplayed(t){const i=t.getStartRow(),s=t.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(i,s)}removeBlockFromCache(t){t&&this.destroyBlock(t)}checkRowCount(t,i){if(typeof i=="number"&&i>=0)this.rowCount=i,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const n=(t.getId()+1)*this.params.blockSize+this.params.overflowSize;this.rowCount<n&&(this.rowCount=n)}}setRowCount(t,i){this.rowCount=t,Q.exists(i)&&(this.lastRowIndexKnown=i),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(t){const i=new Lr;this.getBlocksInOrder().forEach(s=>s.forEachNode(t,i,this.rowCount))}getBlocksInOrder(){const t=(s,n)=>s.getId()-n.getId();return Q.getAllValuesInObject(this.blocks).sort(t)}destroyBlock(t){delete this.blocks[t.getId()],this.destroyBean(t),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(t)}onCacheUpdated(){if(this.isAlive()){this.destroyAllBlocksPastVirtualRowCount();const t={type:g.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(t)}}destroyAllBlocksPastVirtualRowCount(){const t=[];this.getBlocksInOrder().forEach(i=>{i.getId()*this.params.blockSize>=this.rowCount&&t.push(i)}),t.length>0&&t.forEach(i=>this.destroyBlock(i))}purgeCache(){this.getBlocksInOrder().forEach(t=>this.removeBlockFromCache(t)),this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(t,i){const s=[];let n=-1,o=!1;const r=new Lr;Q.missing(t)&&(o=!0);let l=!1;return this.getBlocksInOrder().forEach(u=>{if(!l){if(o&&n+1!==u.getId()){l=!0;return}n=u.getId(),u.forEachNode(d=>{const h=d===t||d===i;(o||h)&&s.push(d),h&&(o=!o)},r,this.rowCount)}}),l||o?[]:s}};sl.MAX_EMPTY_BLOCKS_TO_KEEP=2;Ut([f("rowRenderer")],sl.prototype,"rowRenderer",2);Ut([f("focusService")],sl.prototype,"focusService",2);Ut([sM(0,Li("loggerFactory"))],sl.prototype,"setBeans",1);Ut([Bt],sl.prototype,"destroyAllBlocks",1);var nM=sl,Es=class extends L{getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(e,t,i,s){return!1}init(){this.gos.isRowModelType("infinite")&&(this.rowHeight=this.gos.getRowHeightAsNumber(),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache()),this.verifyProps())}verifyProps(){this.gos.exists("initialGroupOrderComparator")&&Q.warnOnce("initialGroupOrderComparator cannot be used with Infinite Row Model as sorting is done on the server side")}start(){this.setDatasource(this.gos.get("datasource"))}destroyDatasource(){this.datasource&&(this.getContext().destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedListener(this.eventService,g.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,g.EVENT_STORE_UPDATED,this.onCacheUpdated.bind(this)),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=this.gos.getRowHeightAsNumber(),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onFilterChanged(){this.reset()}onSortChanged(){this.reset()}onColumnEverything(){let e;this.cacheParams?e=this.isSortModelDifferent():e=!0,e&&this.reset()}isSortModelDifferent(){return!Q.jsonEquals(this.cacheParams.sortModel,this.sortController.getSortModel())}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,t):[]}reset(){if(!this.datasource)return;this.gos.getCallback("getRowId")!=null||this.selectionService.reset("rowDataChanged"),this.resetCache()}createModelUpdatedEvent(){return{type:g.EVENT_MODEL_UPDATED,newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1}}resetCache(){this.destroyCache(),this.cacheParams={datasource:this.datasource,filterModel:this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,initialRowCount:this.gos.get("infiniteInitialRowCount"),maxBlocksInCache:this.gos.get("maxBlocksInCache"),rowHeight:this.gos.getRowHeightAsNumber(),overflowSize:this.gos.get("cacheOverflowSize"),blockSize:this.gos.get("cacheBlockSize"),lastAccessedSequence:new Lr},this.infiniteCache=this.createBean(new nM(this.cacheParams)),this.eventService.dispatchEventOnce({type:g.EVENT_ROW_COUNT_READY});const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}updateRowHeights(){this.forEachNode(t=>{t.setRowHeight(this.rowHeight),t.setRowTop(this.rowHeight*t.rowIndex)});const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}destroyCache(){this.infiniteCache&&(this.infiniteCache=this.destroyBean(this.infiniteCache))}onCacheUpdated(){const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}getRow(e){if(this.infiniteCache&&!(e>=this.infiniteCache.getRowCount()))return this.infiniteCache.getRow(e)}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}forEachNode(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),i=this.getRowCount()-1;return t>i?i:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache&&this.infiniteCache.refreshCache()}purgeCache(){this.infiniteCache&&this.infiniteCache.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?this.infiniteCache.isLastRowIndexKnown():!1}setRowCount(e,t){this.infiniteCache&&this.infiniteCache.setRowCount(e,t)}};Ut([f("filterManager")],Es.prototype,"filterManager",2);Ut([f("sortController")],Es.prototype,"sortController",2);Ut([f("selectionService")],Es.prototype,"selectionService",2);Ut([f("rowRenderer")],Es.prototype,"rowRenderer",2);Ut([f("rowNodeBlockLoader")],Es.prototype,"rowNodeBlockLoader",2);Ut([M],Es.prototype,"init",1);Ut([Bt],Es.prototype,"destroyDatasource",1);Es=Ut([H("rowModel")],Es);var oM="31.3.4",rM={version:oM,moduleName:"@ag-grid-community/infinite-row-model",rowModel:"infinite",beans:[Es]},lM=Object.defineProperty,aM=Object.getOwnPropertyDescriptor,ai=(e,t,i,s)=>{for(var n=s>1?void 0:s?aM(t,i):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(n=(s?r(t,i,n):r(n))||n);return s&&n&&lM(t,i,n),n},uM=class{setBeans(e){this.beans=e}getFileName(e){const t=this.getDefaultFileExtension();return(e==null||!e.length)&&(e=this.getDefaultFileName()),e.indexOf(".")===-1?`${e}.${t}`:e}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},dM=class{constructor(e){this.groupColumns=[];const{columnModel:t,valueService:i,gos:s,processCellCallback:n,processHeaderCallback:o,processGroupHeaderCallback:r,processRowGroupCallback:l}=e;this.columnModel=t,this.valueService=i,this.gos=s,this.processCellCallback=n,this.processHeaderCallback=o,this.processGroupHeaderCallback=r,this.processRowGroupCallback=l}prepare(e){this.groupColumns=e.filter(t=>!!t.getColDef().showRowGroup)}extractHeaderValue(e){const t=this.getHeaderName(this.processHeaderCallback,e);return t??""}extractRowCellValue(e,t,i,s,n){const r=(!this.gos.get("groupHideOpenParents")||n.footer)&&this.shouldRenderGroupSummaryCell(n,e,t)?this.createValueForGroupNode(e,n):this.valueService.getValue(e,n);return this.processCell({accumulatedRowIndex:i,rowNode:n,column:e,value:r,processCellCallback:this.processCellCallback,type:s})}shouldRenderGroupSummaryCell(e,t,i){var s;if(!(e&&e.group))return!1;if(this.groupColumns.indexOf(t)!==-1){if(((s=e.groupData)==null?void 0:s[t.getId()])!=null||this.gos.isRowModelType("serverSide")&&e.group)return!0;if(e.footer&&e.level===-1){const l=t.getColDef();return l==null||l.showRowGroup===!0||l.showRowGroup===this.columnModel.getRowGroupColumns()[0].getId()}}const r=this.gos.isGroupUseEntireRow(this.columnModel.isPivotMode());return i===0&&r}getHeaderName(e,t){return e?e(this.gos.addGridCommonParams({column:t})):this.columnModel.getDisplayNameForColumn(t,"csv",!0)}createValueForGroupNode(e,t){if(this.processRowGroupCallback)return this.processRowGroupCallback(this.gos.addGridCommonParams({column:e,node:t}));const i=this.gos.get("treeData"),s=this.gos.get("suppressGroupMaintainValueType"),n=a=>{var u,d;if(i||s)return a.key;const h=(u=a.groupData)==null?void 0:u[e.getId()];return!h||!a.rowGroupColumn||a.rowGroupColumn.getColDef().useValueFormatterForExport===!1?h:(d=this.valueService.formatValue(a.rowGroupColumn,a,h))!=null?d:h},o=t.footer,r=[n(t)];if(!this.gos.isGroupMultiAutoColumn())for(;t.parent;)t=t.parent,r.push(n(t));const l=r.reverse().join(" -> ");return o?`Total ${l}`:l}processCell(e){var t;const{accumulatedRowIndex:i,rowNode:s,column:n,value:o,processCellCallback:r,type:l}=e;return r?{value:(t=r(this.gos.addGridCommonParams({accumulatedRowIndex:i,column:n,node:s,value:o,type:l,parseValue:a=>this.valueService.parseValue(n,s,a,this.valueService.getValue(n,s)),formatValue:a=>{var u;return(u=this.valueService.formatValue(n,s,a))!=null?u:a}})))!=null?t:""}:n.getColDef().useValueFormatterForExport!==!1?{value:o??"",valueFormatted:this.valueService.formatValue(n,s,o)}:{value:o??""}}},cM=class{static download(e,t){const i=document.defaultView||window;if(!i){console.warn("AG Grid: There is no `window` associated with the current `document`");return}const s=document.createElement("a"),n=i.URL.createObjectURL(t);s.setAttribute("href",n),s.setAttribute("download",e),s.style.display="none",document.body.appendChild(s),s.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:i})),document.body.removeChild(s),i.setTimeout(()=>{i.URL.revokeObjectURL(n)},0)}},_v=`\r
|
|
300
|
+
`,hM=class extends dM{constructor(e){super(e),this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:i}=e;this.suppressQuotes=t,this.columnSeparator=i}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,_v),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((i,s)=>{s!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(i.data.value||""),i.mergeAcross&&this.appendEmptyCells(i.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,i,s){i!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(s)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,i){var s;t!=0&&(this.result+=this.columnSeparator);const n=this.extractRowCellValue(e,t,t,"csv",i);this.result+=this.putInQuotes((s=n.valueFormatted)!=null?s:n.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(console.warn("AG Grid: unknown value type during csv conversion"),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=_v),this.isFirstLine=!1}},Dn=class extends uM{postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gos:this.gos})}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration.");return}const t=this.getMergedParams(e),i=this.getData(t),s=new Blob(["\uFEFF",i],{type:"text/plain"}),n=typeof t.fileName=="function"?t.fileName(this.gos.getGridCommonParams()):t.fileName;cM.download(this.getFileName(n),s)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const i=t?Object.assign({},e):this.getMergedParams(e);return this.getData(i)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{columnModel:t,valueService:i,gos:s}=this,{processCellCallback:n,processHeaderCallback:o,processGroupHeaderCallback:r,processRowGroupCallback:l,suppressQuotes:a,columnSeparator:u}=e;return new hM({columnModel:t,valueService:i,gos:s,processCellCallback:n||void 0,processHeaderCallback:o||void 0,processGroupHeaderCallback:r||void 0,processRowGroupCallback:l||void 0,suppressQuotes:a||!1,columnSeparator:u||","})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};ai([f("columnModel")],Dn.prototype,"columnModel",2);ai([f("valueService")],Dn.prototype,"valueService",2);ai([f("gridSerializer")],Dn.prototype,"gridSerializer",2);ai([f("gridOptionsService")],Dn.prototype,"gos",2);ai([M],Dn.prototype,"postConstruct",1);Dn=ai([H("csvCreator")],Dn);var Rs=class extends L{serialize(e,t={}){const{allColumns:i,columnKeys:s,skipRowGroups:n}=t,o=this.getColumnsToExport(i,n,s);return Q.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))(e).parse()}processRow(e,t,i,s){const n=t.shouldRowBeSkipped||(()=>!1),o=this.gos.get("groupRemoveSingleChildren"),r=this.gos.get("groupRemoveLowestSingleChildren"),a=t.rowPositions!=null||!!t.onlySelected,u=this.gos.get("groupHideOpenParents")&&!a,d=this.columnModel.isPivotMode()?s.leafGroup:!s.group,h=!!s.footer;t.skipRowGroups;const p=r&&s.leafGroup,C=s.allChildrenCount===1&&(o||p);if(!d&&!h&&(t.skipRowGroups||C||u)||t.onlySelected&&!s.isSelected()||t.skipPinnedTop&&s.rowPinned==="top"||t.skipPinnedBottom&&s.rowPinned==="bottom"||s.level===-1&&!d&&!h||n(this.gos.addGridCommonParams({node:s})))return;const R=e.onNewBodyRow(s);if(i.forEach((w,m)=>{R.onColumn(w,m,s)}),t.getCustomContentBelowRow){const w=t.getCustomContentBelowRow(this.gos.addGridCommonParams({node:s}));w&&e.addCustomContent(w)}}appendContent(e){return t=>{const i=e.appendContent;return i&&t.addCustomContent(i),t}}prependContent(e){return t=>{const i=e.prependContent;return i&&t.addCustomContent(i),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return i=>{if(!e.skipColumnGroupHeaders){const s=new CE,n=this.displayedGroupCreator.createDisplayedGroups(t,s,null);this.recursivelyAddHeaderGroups(n,i,e.processGroupHeaderCallback)}return i}}exportHeaders(e,t){return i=>{if(!e.skipColumnHeaders){const s=i.onNewHeaderRow();t.forEach((n,o)=>{s.onColumn(n,o,void 0)})}return i}}processPinnedTopRows(e,t){return i=>{const s=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(n=>n.rowPinned==="top").sort((n,o)=>n.rowIndex-o.rowIndex).map(n=>this.pinnedRowModel.getPinnedTopRow(n.rowIndex)).forEach(s):this.pinnedRowModel.forEachPinnedTopRow(s),i}}processRows(e,t){return i=>{const s=this.rowModel,n=s.getType(),o=n==="clientSide",r=n==="serverSide",l=!o&&e.onlySelected,a=this.processRow.bind(this,i,e,t),{exportedRows:u="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(d=>d.rowPinned==null).sort((d,h)=>d.rowIndex-h.rowIndex).map(d=>s.getRow(d.rowIndex)).forEach(a);else if(this.columnModel.isPivotMode())o?s.forEachPivotNode(a,!0):r?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);else if(e.onlySelectedAllPages||l){const d=this.selectionService.getSelectedNodes();this.replicateSortedOrder(d),d.forEach(a)}else u==="all"?s.forEachNode(a):o||r?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);return i}}replicateSortedOrder(e){const t=this.sortController.getSortOptions(),i=(s,n)=>{var o,r,l,a;return s.rowIndex!=null&&n.rowIndex!=null?s.rowIndex-n.rowIndex:s.level===n.level?((o=s.parent)==null?void 0:o.id)===((r=n.parent)==null?void 0:r.id)?this.rowNodeSorter.compareRowNodes(t,{rowNode:s,currentPos:(l=s.rowIndex)!=null?l:-1},{rowNode:n,currentPos:(a=n.rowIndex)!=null?a:-1}):i(s.parent,n.parent):s.level>n.level?i(s.parent,n):i(s,n.parent)};e.sort(i)}processPinnedBottomRows(e,t){return i=>{const s=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(n=>n.rowPinned==="bottom").sort((n,o)=>n.rowIndex-o.rowIndex).map(n=>this.pinnedRowModel.getPinnedBottomRow(n.rowIndex)).forEach(s):this.pinnedRowModel.forEachPinnedBottomRow(s),i}}getColumnsToExport(e=!1,t=!1,i){const s=this.columnModel.isPivotMode();if(i&&i.length)return this.columnModel.getGridColumns(i);const n=this.gos.get("treeData");let o=[];return e&&!s?o=this.columnModel.getAllGridColumns():o=this.columnModel.getAllDisplayedColumns(),t&&!n&&(o=o.filter(r=>r.getColId()!==Pr)),o}recursivelyAddHeaderGroups(e,t,i){const s=[];e.forEach(n=>{const o=n;o.getChildren&&o.getChildren().forEach(r=>s.push(r))}),e.length>0&&e[0]instanceof at&&this.doAddHeaderHeader(t,e,i),s&&s.length>0&&this.recursivelyAddHeaderGroups(s,t,i)}doAddHeaderHeader(e,t,i){const s=e.onNewHeaderGroupingRow();let n=0;t.forEach(o=>{const r=o;let l;i?l=i(this.gos.addGridCommonParams({columnGroup:r})):l=this.columnModel.getDisplayNameForColumnGroup(r,"header");const a=r.getLeafColumns().reduce((u,d,h,p)=>{let C=Q.last(u);return d.getColumnGroupShow()==="open"?(!C||C[1]!=null)&&(C=[h],u.push(C)):C&&C[1]==null&&(C[1]=h-1),h===p.length-1&&C&&C[1]==null&&(C[1]=h),u},[]);s.onColumn(r,l||"",n++,r.getLeafColumns().length-1,a)})}};ai([f("displayedGroupCreator")],Rs.prototype,"displayedGroupCreator",2);ai([f("columnModel")],Rs.prototype,"columnModel",2);ai([f("rowModel")],Rs.prototype,"rowModel",2);ai([f("pinnedRowModel")],Rs.prototype,"pinnedRowModel",2);ai([f("selectionService")],Rs.prototype,"selectionService",2);ai([f("rowNodeSorter")],Rs.prototype,"rowNodeSorter",2);ai([f("sortController")],Rs.prototype,"sortController",2);Rs=ai([H("gridSerializer")],Rs);var pM="31.3.4",gM={version:pM,moduleName:"@ag-grid-community/csv-export",beans:[Dn,Rs]},{utf8_encode:kN}=Q;he.__registerModules([eM,rM,gM],!1,void 0);var nl={};/**
|
|
301
|
+
* @license React
|
|
302
|
+
* react-dom-server-legacy.browser.production.min.js
|
|
303
|
+
*
|
|
304
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
305
|
+
*
|
|
306
|
+
* This source code is licensed under the MIT license found in the
|
|
307
|
+
* LICENSE file in the root directory of this source tree.
|
|
308
|
+
*/var AT=S;function ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var jt=Object.prototype.hasOwnProperty,fM=/^[: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]*$/,Ov={},Gv={};function bT(e){return jt.call(Gv,e)?!0:jt.call(Ov,e)?!1:fM.test(e)?Gv[e]=!0:(Ov[e]=!0,!1)}function zt(e,t,i,s,n,o,r){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=n,this.mustUseProperty=i,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=r}var Et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Et[e]=new zt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Et[t]=new zt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Et[e]=new zt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Et[e]=new zt(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){Et[e]=new zt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Et[e]=new zt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Et[e]=new zt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Et[e]=new zt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Et[e]=new zt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Hm=/[\-:]([a-z])/g;function Bm(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(Hm,Bm);Et[t]=new zt(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(Hm,Bm);Et[t]=new zt(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(Hm,Bm);Et[t]=new zt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Et[e]=new zt(e,1,!1,e.toLowerCase(),null,!1,!1)});Et.xlinkHref=new zt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Et[e]=new zt(e,1,!1,e.toLowerCase(),null,!0,!0)});var Xu={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},mM=["Webkit","ms","Moz","O"];Object.keys(Xu).forEach(function(e){mM.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Xu[t]=Xu[e]})});var CM=/["'&<>]/;function xt(e){if(typeof e=="boolean"||typeof e=="number")return""+e;e=""+e;var t=CM.exec(e);if(t){var i="",s,n=0;for(s=t.index;s<e.length;s++){switch(e.charCodeAt(s)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}n!==s&&(i+=e.substring(n,s)),n=s+1,i+=t}e=n!==s?i+e.substring(n,s):i}return e}var vM=/([A-Z])/g,wM=/^ms-/,Ig=Array.isArray;function Ds(e,t){return{insertionMode:e,selectedValue:t}}function yM(e,t,i){switch(t){case"select":return Ds(1,i.value!=null?i.value:i.defaultValue);case"svg":return Ds(2,null);case"math":return Ds(3,null);case"foreignObject":return Ds(1,null);case"table":return Ds(4,null);case"thead":case"tbody":case"tfoot":return Ds(5,null);case"colgroup":return Ds(7,null);case"tr":return Ds(6,null)}return 4<=e.insertionMode||e.insertionMode===0?Ds(1,null):e}var kv=new Map;function LT(e,t,i){if(typeof i!="object")throw Error(ne(62));t=!0;for(var s in i)if(jt.call(i,s)){var n=i[s];if(n!=null&&typeof n!="boolean"&&n!==""){if(s.indexOf("--")===0){var o=xt(s);n=xt((""+n).trim())}else{o=s;var r=kv.get(o);r!==void 0||(r=xt(o.replace(vM,"-$1").toLowerCase().replace(wM,"-ms-")),kv.set(o,r)),o=r,n=typeof n=="number"?n===0||jt.call(Xu,s)?""+n:n+"px":xt((""+n).trim())}t?(t=!1,e.push(' style="',o,":",n)):e.push(";",o,":",n)}}t||e.push('"')}function ui(e,t,i,s){switch(i){case"style":LT(e,t,s);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N"){if(t=Et.hasOwnProperty(i)?Et[i]:null,t!==null){switch(typeof s){case"function":case"symbol":return;case"boolean":if(!t.acceptsBooleans)return}switch(i=t.attributeName,t.type){case 3:s&&e.push(" ",i,'=""');break;case 4:s===!0?e.push(" ",i,'=""'):s!==!1&&e.push(" ",i,'="',xt(s),'"');break;case 5:isNaN(s)||e.push(" ",i,'="',xt(s),'"');break;case 6:!isNaN(s)&&1<=s&&e.push(" ",i,'="',xt(s),'"');break;default:t.sanitizeURL&&(s=""+s),e.push(" ",i,'="',xt(s),'"')}}else if(bT(i)){switch(typeof s){case"function":case"symbol":return;case"boolean":if(t=i.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-")return}e.push(" ",i,'="',xt(s),'"')}}}function Zu(e,t,i){if(t!=null){if(i!=null)throw Error(ne(60));if(typeof t!="object"||!("__html"in t))throw Error(ne(61));t=t.__html,t!=null&&e.push(""+t)}}function SM(e){var t="";return AT.Children.forEach(e,function(i){i!=null&&(t+=i)}),t}function tp(e,t,i,s){e.push(us(i));var n=i=null,o;for(o in t)if(jt.call(t,o)){var r=t[o];if(r!=null)switch(o){case"children":i=r;break;case"dangerouslySetInnerHTML":n=r;break;default:ui(e,s,o,r)}}return e.push(">"),Zu(e,n,i),typeof i=="string"?(e.push(xt(i)),null):i}var EM=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Vv=new Map;function us(e){var t=Vv.get(e);if(t===void 0){if(!EM.test(e))throw Error(ne(65,e));t="<"+e,Vv.set(e,t)}return t}function RM(e,t,i,s,n){switch(t){case"select":e.push(us("select"));var o=null,r=null;for(d in i)if(jt.call(i,d)){var l=i[d];if(l!=null)switch(d){case"children":o=l;break;case"dangerouslySetInnerHTML":r=l;break;case"defaultValue":case"value":break;default:ui(e,s,d,l)}}return e.push(">"),Zu(e,r,o),o;case"option":r=n.selectedValue,e.push(us("option"));var a=l=null,u=null,d=null;for(o in i)if(jt.call(i,o)){var h=i[o];if(h!=null)switch(o){case"children":l=h;break;case"selected":u=h;break;case"dangerouslySetInnerHTML":d=h;break;case"value":a=h;default:ui(e,s,o,h)}}if(r!=null)if(i=a!==null?""+a:SM(l),Ig(r)){for(s=0;s<r.length;s++)if(""+r[s]===i){e.push(' selected=""');break}}else""+r===i&&e.push(' selected=""');else u&&e.push(' selected=""');return e.push(">"),Zu(e,d,l),l;case"textarea":e.push(us("textarea")),d=r=o=null;for(l in i)if(jt.call(i,l)&&(a=i[l],a!=null))switch(l){case"children":d=a;break;case"value":o=a;break;case"defaultValue":r=a;break;case"dangerouslySetInnerHTML":throw Error(ne(91));default:ui(e,s,l,a)}if(o===null&&r!==null&&(o=r),e.push(">"),d!=null){if(o!=null)throw Error(ne(92));if(Ig(d)&&1<d.length)throw Error(ne(93));o=""+d}return typeof o=="string"&&o[0]===`
|
|
309
|
+
`&&e.push(`
|
|
310
|
+
`),o!==null&&e.push(xt(""+o)),null;case"input":e.push(us("input")),a=d=l=o=null;for(r in i)if(jt.call(i,r)&&(u=i[r],u!=null))switch(r){case"children":case"dangerouslySetInnerHTML":throw Error(ne(399,"input"));case"defaultChecked":a=u;break;case"defaultValue":l=u;break;case"checked":d=u;break;case"value":o=u;break;default:ui(e,s,r,u)}return d!==null?ui(e,s,"checked",d):a!==null&&ui(e,s,"checked",a),o!==null?ui(e,s,"value",o):l!==null&&ui(e,s,"value",l),e.push("/>"),null;case"menuitem":e.push(us("menuitem"));for(var p in i)if(jt.call(i,p)&&(o=i[p],o!=null))switch(p){case"children":case"dangerouslySetInnerHTML":throw Error(ne(400));default:ui(e,s,p,o)}return e.push(">"),null;case"title":e.push(us("title")),o=null;for(h in i)if(jt.call(i,h)&&(r=i[h],r!=null))switch(h){case"children":o=r;break;case"dangerouslySetInnerHTML":throw Error(ne(434));default:ui(e,s,h,r)}return e.push(">"),o;case"listing":case"pre":e.push(us(t)),r=o=null;for(a in i)if(jt.call(i,a)&&(l=i[a],l!=null))switch(a){case"children":o=l;break;case"dangerouslySetInnerHTML":r=l;break;default:ui(e,s,a,l)}if(e.push(">"),r!=null){if(o!=null)throw Error(ne(60));if(typeof r!="object"||!("__html"in r))throw Error(ne(61));i=r.__html,i!=null&&(typeof i=="string"&&0<i.length&&i[0]===`
|
|
311
|
+
`?e.push(`
|
|
312
|
+
`,i):e.push(""+i))}return typeof o=="string"&&o[0]===`
|
|
313
|
+
`&&e.push(`
|
|
314
|
+
`),o;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":e.push(us(t));for(var C in i)if(jt.call(i,C)&&(o=i[C],o!=null))switch(C){case"children":case"dangerouslySetInnerHTML":throw Error(ne(399,t));default:ui(e,s,C,o)}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 tp(e,i,t,s);case"html":return n.insertionMode===0&&e.push("<!DOCTYPE html>"),tp(e,i,t,s);default:if(t.indexOf("-")===-1&&typeof i.is!="string")return tp(e,i,t,s);e.push(us(t)),r=o=null;for(u in i)if(jt.call(i,u)&&(l=i[u],l!=null))switch(u){case"children":o=l;break;case"dangerouslySetInnerHTML":r=l;break;case"style":LT(e,s,l);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:bT(u)&&typeof l!="function"&&typeof l!="symbol"&&e.push(" ",u,'="',xt(l),'"')}return e.push(">"),Zu(e,r,o),o}}function Hv(e,t,i){if(e.push('<!--$?--><template id="'),i===null)throw Error(ne(395));return e.push(i),e.push('"></template>')}function TM(e,t,i,s){switch(i.insertionMode){case 0:case 1:return e.push('<div hidden id="'),e.push(t.segmentPrefix),t=s.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=s.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=s.toString(16),e.push(t),e.push('">');case 4:return e.push('<table hidden id="'),e.push(t.segmentPrefix),t=s.toString(16),e.push(t),e.push('">');case 5:return e.push('<table hidden><tbody id="'),e.push(t.segmentPrefix),t=s.toString(16),e.push(t),e.push('">');case 6:return e.push('<table hidden><tr id="'),e.push(t.segmentPrefix),t=s.toString(16),e.push(t),e.push('">');case 7:return e.push('<table hidden><colgroup id="'),e.push(t.segmentPrefix),t=s.toString(16),e.push(t),e.push('">');default:throw Error(ne(397))}}function DM(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(ne(397))}}var PM=/[<\u2028\u2029]/g;function ip(e){return JSON.stringify(e).replace(PM,function(t){switch(t){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 FM(e,t){return t=t===void 0?"":t,{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:t+"P:",segmentPrefix:t+"S:",boundaryPrefix:t+"B:",idPrefix:t,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:e}}function Bv(e,t,i,s){return i.generateStaticMarkup?(e.push(xt(t)),!1):(t===""?e=s:(s&&e.push("<!-- -->"),e.push(xt(t)),e=!0),e)}var Wl=Object.assign,AM=Symbol.for("react.element"),MT=Symbol.for("react.portal"),IT=Symbol.for("react.fragment"),xT=Symbol.for("react.strict_mode"),NT=Symbol.for("react.profiler"),_T=Symbol.for("react.provider"),OT=Symbol.for("react.context"),GT=Symbol.for("react.forward_ref"),kT=Symbol.for("react.suspense"),VT=Symbol.for("react.suspense_list"),HT=Symbol.for("react.memo"),Wm=Symbol.for("react.lazy"),bM=Symbol.for("react.scope"),LM=Symbol.for("react.debug_trace_mode"),MM=Symbol.for("react.legacy_hidden"),IM=Symbol.for("react.default_value"),Wv=Symbol.iterator;function xg(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case IT:return"Fragment";case MT:return"Portal";case NT:return"Profiler";case xT:return"StrictMode";case kT:return"Suspense";case VT:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case OT:return(e.displayName||"Context")+".Consumer";case _T:return(e._context.displayName||"Context")+".Provider";case GT:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case HT:return t=e.displayName||null,t!==null?t:xg(e.type)||"Memo";case Wm:t=e._payload,e=e._init;try{return xg(e(t))}catch{}}return null}var BT={};function Uv(e,t){if(e=e.contextTypes,!e)return BT;var i={},s;for(s in e)i[s]=t[s];return i}var Jn=null;function nh(e,t){if(e!==t){e.context._currentValue2=e.parentValue,e=e.parent;var i=t.parent;if(e===null){if(i!==null)throw Error(ne(401))}else{if(i===null)throw Error(ne(401));nh(e,i)}t.context._currentValue2=t.value}}function WT(e){e.context._currentValue2=e.parentValue,e=e.parent,e!==null&&WT(e)}function UT(e){var t=e.parent;t!==null&&UT(t),e.context._currentValue2=e.value}function zT(e,t){if(e.context._currentValue2=e.parentValue,e=e.parent,e===null)throw Error(ne(402));e.depth===t.depth?nh(e,t):zT(e,t)}function $T(e,t){var i=t.parent;if(i===null)throw Error(ne(402));e.depth===i.depth?nh(e,i):$T(e,i),t.context._currentValue2=t.value}function Jd(e){var t=Jn;t!==e&&(t===null?UT(e):e===null?WT(t):t.depth===e.depth?nh(t,e):t.depth>e.depth?zT(t,e):$T(t,e),Jn=e)}var zv={isMounted:function(){return!1},enqueueSetState:function(e,t){e=e._reactInternals,e.queue!==null&&e.queue.push(t)},enqueueReplaceState:function(e,t){e=e._reactInternals,e.replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function $v(e,t,i,s){var n=e.state!==void 0?e.state:null;e.updater=zv,e.props=i,e.state=n;var o={queue:[],replace:!1};e._reactInternals=o;var r=t.contextType;if(e.context=typeof r=="object"&&r!==null?r._currentValue2:s,r=t.getDerivedStateFromProps,typeof r=="function"&&(r=r(i,n),n=r==null?n:Wl({},n,r),e.state=n),typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function"&&(typeof e.UNSAFE_componentWillMount=="function"||typeof e.componentWillMount=="function"))if(t=e.state,typeof e.componentWillMount=="function"&&e.componentWillMount(),typeof e.UNSAFE_componentWillMount=="function"&&e.UNSAFE_componentWillMount(),t!==e.state&&zv.enqueueReplaceState(e,e.state,null),o.queue!==null&&0<o.queue.length)if(t=o.queue,r=o.replace,o.queue=null,o.replace=!1,r&&t.length===1)e.state=t[0];else{for(o=r?t[0]:e.state,n=!0,r=r?1:0;r<t.length;r++){var l=t[r];l=typeof l=="function"?l.call(e,o,i,s):l,l!=null&&(n?(n=!1,o=Wl({},o,l)):Wl(o,l))}e.state=o}else o.queue=null}var xM={id:1,overflow:""};function Ng(e,t,i){var s=e.id;e=e.overflow;var n=32-Ju(s)-1;s&=~(1<<n),i+=1;var o=32-Ju(t)+n;if(30<o){var r=n-n%5;return o=(s&(1<<r)-1).toString(32),s>>=r,n-=r,{id:1<<32-Ju(t)+n|i<<n|s,overflow:o+e}}return{id:1<<o|i<<n|s,overflow:e}}var Ju=Math.clz32?Math.clz32:OM,NM=Math.log,_M=Math.LN2;function OM(e){return e>>>=0,e===0?32:31-(NM(e)/_M|0)|0}function GM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kM=typeof Object.is=="function"?Object.is:GM,Vs=null,Um=null,ed=null,Ae=null,Al=!1,ec=!1,xa=0,ln=null,oh=0;function zn(){if(Vs===null)throw Error(ne(321));return Vs}function Kv(){if(0<oh)throw Error(ne(312));return{memoizedState:null,queue:null,next:null}}function zm(){return Ae===null?ed===null?(Al=!1,ed=Ae=Kv()):(Al=!0,Ae=ed):Ae.next===null?(Al=!1,Ae=Ae.next=Kv()):(Al=!0,Ae=Ae.next),Ae}function $m(){Um=Vs=null,ec=!1,ed=null,oh=0,Ae=ln=null}function KT(e,t){return typeof t=="function"?t(e):t}function jv(e,t,i){if(Vs=zn(),Ae=zm(),Al){var s=Ae.queue;if(t=s.dispatch,ln!==null&&(i=ln.get(s),i!==void 0)){ln.delete(s),s=Ae.memoizedState;do s=e(s,i.action),i=i.next;while(i!==null);return Ae.memoizedState=s,[s,t]}return[Ae.memoizedState,t]}return e=e===KT?typeof t=="function"?t():t:i!==void 0?i(t):t,Ae.memoizedState=e,e=Ae.queue={last:null,dispatch:null},e=e.dispatch=VM.bind(null,Vs,e),[Ae.memoizedState,e]}function Yv(e,t){if(Vs=zn(),Ae=zm(),t=t===void 0?null:t,Ae!==null){var i=Ae.memoizedState;if(i!==null&&t!==null){var s=i[1];e:if(s===null)s=!1;else{for(var n=0;n<s.length&&n<t.length;n++)if(!kM(t[n],s[n])){s=!1;break e}s=!0}if(s)return i[0]}}return e=e(),Ae.memoizedState=[e,t],e}function VM(e,t,i){if(25<=oh)throw Error(ne(301));if(e===Vs)if(ec=!0,e={action:i,next:null},ln===null&&(ln=new Map),i=ln.get(t),i===void 0)ln.set(t,e);else{for(t=i;t.next!==null;)t=t.next;t.next=e}}function HM(){throw Error(ne(394))}function Au(){}var Qv={readContext:function(e){return e._currentValue2},useContext:function(e){return zn(),e._currentValue2},useMemo:Yv,useReducer:jv,useRef:function(e){Vs=zn(),Ae=zm();var t=Ae.memoizedState;return t===null?(e={current:e},Ae.memoizedState=e):t},useState:function(e){return jv(KT,e)},useInsertionEffect:Au,useLayoutEffect:function(){},useCallback:function(e,t){return Yv(function(){return e},t)},useImperativeHandle:Au,useEffect:Au,useDebugValue:Au,useDeferredValue:function(e){return zn(),e},useTransition:function(){return zn(),[!1,HM]},useId:function(){var e=Um.treeContext,t=e.overflow;e=e.id,e=(e&~(1<<32-Ju(e)-1)).toString(32)+t;var i=td;if(i===null)throw Error(ne(404));return t=xa++,e=":"+i.idPrefix+"R"+e,0<t&&(e+="H"+t.toString(32)),e+":"},useMutableSource:function(e,t){return zn(),t(e._source)},useSyncExternalStore:function(e,t,i){if(i===void 0)throw Error(ne(407));return i()}},td=null,sp=AT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function BM(e){return console.error(e),null}function bl(){}function WM(e,t,i,s,n,o,r,l,a){var u=[],d=new Set;return t={destination:null,responseState:t,progressiveChunkSize:s===void 0?12800:s,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:d,pingedTasks:u,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:n===void 0?BM:n,onAllReady:bl,onShellReady:r===void 0?bl:r,onShellError:bl,onFatalError:bl},i=tc(t,0,null,i,!1,!1),i.parentFlushed=!0,e=Km(t,e,null,i,d,BT,null,xM),u.push(e),t}function Km(e,t,i,s,n,o,r,l){e.allPendingTasks++,i===null?e.pendingRootTasks++:i.pendingTasks++;var a={node:t,ping:function(){var u=e.pingedTasks;u.push(a),u.length===1&&QT(e)},blockedBoundary:i,blockedSegment:s,abortSet:n,legacyContext:o,context:r,treeContext:l};return n.add(a),a}function tc(e,t,i,s,n,o){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:s,boundary:i,lastPushedText:n,textEmbedded:o}}function Na(e,t){if(e=e.onError(t),e!=null&&typeof e!="string")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 ic(e,t){var i=e.onShellError;i(t),i=e.onFatalError,i(t),e.destination!==null?(e.status=2,e.destination.destroy(t)):(e.status=1,e.fatalError=t)}function qv(e,t,i,s,n){for(Vs={},Um=t,xa=0,e=i(s,n);ec;)ec=!1,xa=0,oh+=1,Ae=null,e=i(s,n);return $m(),e}function Xv(e,t,i,s){var n=i.render(),o=s.childContextTypes;if(o!=null){var r=t.legacyContext;if(typeof i.getChildContext!="function")s=r;else{i=i.getChildContext();for(var l in i)if(!(l in o))throw Error(ne(108,xg(s)||"Unknown",l));s=Wl({},r,i)}t.legacyContext=s,hi(e,t,n),t.legacyContext=r}else hi(e,t,n)}function Zv(e,t){if(e&&e.defaultProps){t=Wl({},t),e=e.defaultProps;for(var i in e)t[i]===void 0&&(t[i]=e[i]);return t}return t}function _g(e,t,i,s,n){if(typeof i=="function")if(i.prototype&&i.prototype.isReactComponent){n=Uv(i,t.legacyContext);var o=i.contextType;o=new i(s,typeof o=="object"&&o!==null?o._currentValue2:n),$v(o,i,s,n),Xv(e,t,o,i)}else{o=Uv(i,t.legacyContext),n=qv(e,t,i,s,o);var r=xa!==0;if(typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0)$v(n,i,s,o),Xv(e,t,n,i);else if(r){s=t.treeContext,t.treeContext=Ng(s,1,0);try{hi(e,t,n)}finally{t.treeContext=s}}else hi(e,t,n)}else if(typeof i=="string"){switch(n=t.blockedSegment,o=RM(n.chunks,i,s,e.responseState,n.formatContext),n.lastPushedText=!1,r=n.formatContext,n.formatContext=yM(r,i,s),Og(e,t,o),n.formatContext=r,i){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:n.chunks.push("</",i,">")}n.lastPushedText=!1}else{switch(i){case MM:case LM:case xT:case NT:case IT:hi(e,t,s.children);return;case VT:hi(e,t,s.children);return;case bM:throw Error(ne(343));case kT:e:{i=t.blockedBoundary,n=t.blockedSegment,o=s.fallback,s=s.children,r=new Set;var l={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:r,errorDigest:null},a=tc(e,n.chunks.length,l,n.formatContext,!1,!1);n.children.push(a),n.lastPushedText=!1;var u=tc(e,0,null,n.formatContext,!1,!1);u.parentFlushed=!0,t.blockedBoundary=l,t.blockedSegment=u;try{if(Og(e,t,s),e.responseState.generateStaticMarkup||u.lastPushedText&&u.textEmbedded&&u.chunks.push("<!-- -->"),u.status=1,sc(l,u),l.pendingTasks===0)break e}catch(d){u.status=4,l.forceClientRender=!0,l.errorDigest=Na(e,d)}finally{t.blockedBoundary=i,t.blockedSegment=n}t=Km(e,o,i,a,r,t.legacyContext,t.context,t.treeContext),e.pingedTasks.push(t)}return}if(typeof i=="object"&&i!==null)switch(i.$$typeof){case GT:if(s=qv(e,t,i.render,s,n),xa!==0){i=t.treeContext,t.treeContext=Ng(i,1,0);try{hi(e,t,s)}finally{t.treeContext=i}}else hi(e,t,s);return;case HT:i=i.type,s=Zv(i,s),_g(e,t,i,s,n);return;case _T:if(n=s.children,i=i._context,s=s.value,o=i._currentValue2,i._currentValue2=s,r=Jn,Jn=s={parent:r,depth:r===null?0:r.depth+1,context:i,parentValue:o,value:s},t.context=s,hi(e,t,n),e=Jn,e===null)throw Error(ne(403));s=e.parentValue,e.context._currentValue2=s===IM?e.context._defaultValue:s,e=Jn=e.parent,t.context=e;return;case OT:s=s.children,s=s(i._currentValue2),hi(e,t,s);return;case Wm:n=i._init,i=n(i._payload),s=Zv(i,s),_g(e,t,i,s,void 0);return}throw Error(ne(130,i==null?i:typeof i,""))}}function hi(e,t,i){if(t.node=i,typeof i=="object"&&i!==null){switch(i.$$typeof){case AM:_g(e,t,i.type,i.props,i.ref);return;case MT:throw Error(ne(257));case Wm:var s=i._init;i=s(i._payload),hi(e,t,i);return}if(Ig(i)){Jv(e,t,i);return}if(i===null||typeof i!="object"?s=null:(s=Wv&&i[Wv]||i["@@iterator"],s=typeof s=="function"?s:null),s&&(s=s.call(i))){if(i=s.next(),!i.done){var n=[];do n.push(i.value),i=s.next();while(!i.done);Jv(e,t,n)}return}throw e=Object.prototype.toString.call(i),Error(ne(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e))}typeof i=="string"?(s=t.blockedSegment,s.lastPushedText=Bv(t.blockedSegment.chunks,i,e.responseState,s.lastPushedText)):typeof i=="number"&&(s=t.blockedSegment,s.lastPushedText=Bv(t.blockedSegment.chunks,""+i,e.responseState,s.lastPushedText))}function Jv(e,t,i){for(var s=i.length,n=0;n<s;n++){var o=t.treeContext;t.treeContext=Ng(o,s,n);try{Og(e,t,i[n])}finally{t.treeContext=o}}}function Og(e,t,i){var s=t.blockedSegment.formatContext,n=t.legacyContext,o=t.context;try{return hi(e,t,i)}catch(a){if($m(),typeof a=="object"&&a!==null&&typeof a.then=="function"){i=a;var r=t.blockedSegment,l=tc(e,r.chunks.length,null,r.formatContext,r.lastPushedText,!0);r.children.push(l),r.lastPushedText=!1,e=Km(e,t.node,t.blockedBoundary,l,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,i.then(e,e),t.blockedSegment.formatContext=s,t.legacyContext=n,t.context=o,Jd(o)}else throw t.blockedSegment.formatContext=s,t.legacyContext=n,t.context=o,Jd(o),a}}function UM(e){var t=e.blockedBoundary;e=e.blockedSegment,e.status=3,YT(this,t,e)}function jT(e,t,i){var s=e.blockedBoundary;e.blockedSegment.status=3,s===null?(t.allPendingTasks--,t.status!==2&&(t.status=2,t.destination!==null&&t.destination.push(null))):(s.pendingTasks--,s.forceClientRender||(s.forceClientRender=!0,e=i===void 0?Error(ne(432)):i,s.errorDigest=t.onError(e),s.parentFlushed&&t.clientRenderedBoundaries.push(s)),s.fallbackAbortableTasks.forEach(function(n){return jT(n,t,i)}),s.fallbackAbortableTasks.clear(),t.allPendingTasks--,t.allPendingTasks===0&&(s=t.onAllReady,s()))}function sc(e,t){if(t.chunks.length===0&&t.children.length===1&&t.children[0].boundary===null){var i=t.children[0];i.id=t.id,i.parentFlushed=!0,i.status===1&&sc(e,i)}else e.completedSegments.push(t)}function YT(e,t,i){if(t===null){if(i.parentFlushed){if(e.completedRootSegment!==null)throw Error(ne(389));e.completedRootSegment=i}e.pendingRootTasks--,e.pendingRootTasks===0&&(e.onShellError=bl,t=e.onShellReady,t())}else t.pendingTasks--,t.forceClientRender||(t.pendingTasks===0?(i.parentFlushed&&i.status===1&&sc(t,i),t.parentFlushed&&e.completedBoundaries.push(t),t.fallbackAbortableTasks.forEach(UM,e),t.fallbackAbortableTasks.clear()):i.parentFlushed&&i.status===1&&(sc(t,i),t.completedSegments.length===1&&t.parentFlushed&&e.partialBoundaries.push(t)));e.allPendingTasks--,e.allPendingTasks===0&&(e=e.onAllReady,e())}function QT(e){if(e.status!==2){var t=Jn,i=sp.current;sp.current=Qv;var s=td;td=e.responseState;try{var n=e.pingedTasks,o;for(o=0;o<n.length;o++){var r=n[o],l=e,a=r.blockedSegment;if(a.status===0){Jd(r.context);try{hi(l,r,r.node),l.responseState.generateStaticMarkup||a.lastPushedText&&a.textEmbedded&&a.chunks.push("<!-- -->"),r.abortSet.delete(r),a.status=1,YT(l,r.blockedBoundary,a)}catch(v){if($m(),typeof v=="object"&&v!==null&&typeof v.then=="function"){var u=r.ping;v.then(u,u)}else{r.abortSet.delete(r),a.status=4;var d=r.blockedBoundary,h=v,p=Na(l,h);if(d===null?ic(l,h):(d.pendingTasks--,d.forceClientRender||(d.forceClientRender=!0,d.errorDigest=p,d.parentFlushed&&l.clientRenderedBoundaries.push(d))),l.allPendingTasks--,l.allPendingTasks===0){var C=l.onAllReady;C()}}}finally{}}}n.splice(0,o),e.destination!==null&&jm(e,e.destination)}catch(v){Na(e,v),ic(e,v)}finally{td=s,sp.current=i,i===Qv&&Jd(t)}}}function bu(e,t,i){switch(i.parentFlushed=!0,i.status){case 0:var s=i.id=e.nextSegmentId++;return i.lastPushedText=!1,i.textEmbedded=!1,e=e.responseState,t.push('<template id="'),t.push(e.placeholderPrefix),e=s.toString(16),t.push(e),t.push('"></template>');case 1:i.status=2;var n=!0;s=i.chunks;var o=0;i=i.children;for(var r=0;r<i.length;r++){for(n=i[r];o<n.index;o++)t.push(s[o]);n=rh(e,t,n)}for(;o<s.length-1;o++)t.push(s[o]);return o<s.length&&(n=t.push(s[o])),n;default:throw Error(ne(390))}}function rh(e,t,i){var s=i.boundary;if(s===null)return bu(e,t,i);if(s.parentFlushed=!0,s.forceClientRender)return e.responseState.generateStaticMarkup||(s=s.errorDigest,t.push("<!--$!-->"),t.push("<template"),s&&(t.push(' data-dgst="'),s=xt(s),t.push(s),t.push('"')),t.push("></template>")),bu(e,t,i),e=e.responseState.generateStaticMarkup?!0:t.push("<!--/$-->"),e;if(0<s.pendingTasks){s.rootSegmentID=e.nextSegmentId++,0<s.completedSegments.length&&e.partialBoundaries.push(s);var n=e.responseState,o=n.nextSuspenseID++;return n=n.boundaryPrefix+o.toString(16),s=s.id=n,Hv(t,e.responseState,s),bu(e,t,i),t.push("<!--/$-->")}if(s.byteSize>e.progressiveChunkSize)return s.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(s),Hv(t,e.responseState,s.id),bu(e,t,i),t.push("<!--/$-->");if(e.responseState.generateStaticMarkup||t.push("<!--$-->"),i=s.completedSegments,i.length!==1)throw Error(ne(391));return rh(e,t,i[0]),e=e.responseState.generateStaticMarkup?!0:t.push("<!--/$-->"),e}function ew(e,t,i){return TM(t,e.responseState,i.formatContext,i.id),rh(e,t,i),DM(t,i.formatContext)}function tw(e,t,i){for(var s=i.completedSegments,n=0;n<s.length;n++)qT(e,t,i,s[n]);if(s.length=0,e=e.responseState,s=i.id,i=i.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("')),s===null)throw Error(ne(395));return i=i.toString(16),t.push(s),t.push('","'),t.push(e.segmentPrefix),t.push(i),t.push('")<\/script>')}function qT(e,t,i,s){if(s.status===2)return!0;var n=s.id;if(n===-1){if((s.id=i.rootSegmentID)===-1)throw Error(ne(392));return ew(e,t,s)}return ew(e,t,s),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),n=n.toString(16),t.push(n),t.push('","'),t.push(e.placeholderPrefix),t.push(n),t.push('")<\/script>')}function jm(e,t){try{var i=e.completedRootSegment;if(i!==null&&e.pendingRootTasks===0){rh(e,t,i),e.completedRootSegment=null;var s=e.responseState.bootstrapChunks;for(i=0;i<s.length-1;i++)t.push(s[i]);i<s.length&&t.push(s[i])}var n=e.clientRenderedBoundaries,o;for(o=0;o<n.length;o++){var r=n[o];s=t;var l=e.responseState,a=r.id,u=r.errorDigest,d=r.errorMessage,h=r.errorComponentStack;if(s.push(l.startInlineScript),l.sentClientRenderFunction?s.push('$RX("'):(l.sentClientRenderFunction=!0,s.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("')),a===null)throw Error(ne(395));if(s.push(a),s.push('"'),u||d||h){s.push(",");var p=ip(u||"");s.push(p)}if(d||h){s.push(",");var C=ip(d||"");s.push(C)}if(h){s.push(",");var v=ip(h);s.push(v)}if(!s.push(")<\/script>")){e.destination=null,o++,n.splice(0,o);return}}n.splice(0,o);var y=e.completedBoundaries;for(o=0;o<y.length;o++)if(!tw(e,t,y[o])){e.destination=null,o++,y.splice(0,o);return}y.splice(0,o);var R=e.partialBoundaries;for(o=0;o<R.length;o++){var w=R[o];e:{n=e,r=t;var m=w.completedSegments;for(l=0;l<m.length;l++)if(!qT(n,r,w,m[l])){l++,m.splice(0,l);var E=!1;break e}m.splice(0,l),E=!0}if(!E){e.destination=null,o++,R.splice(0,o);return}}R.splice(0,o);var T=e.completedBoundaries;for(o=0;o<T.length;o++)if(!tw(e,t,T[o])){e.destination=null,o++,T.splice(0,o);return}T.splice(0,o)}finally{e.allPendingTasks===0&&e.pingedTasks.length===0&&e.clientRenderedBoundaries.length===0&&e.completedBoundaries.length===0&&t.push(null)}}function zM(e,t){try{var i=e.abortableTasks;i.forEach(function(s){return jT(s,e,t)}),i.clear(),e.destination!==null&&jm(e,e.destination)}catch(s){Na(e,s),ic(e,s)}}function $M(){}function XT(e,t,i,s){var n=!1,o=null,r="",l={push:function(u){return u!==null&&(r+=u),!0},destroy:function(u){n=!0,o=u}},a=!1;if(e=WM(e,FM(i,t?t.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,$M,void 0,function(){a=!0}),QT(e),zM(e,s),e.status===1)e.status=2,l.destroy(e.fatalError);else if(e.status!==2&&e.destination===null){e.destination=l;try{jm(e,l)}catch(u){Na(e,u),ic(e,u)}}if(n)throw o;if(!a)throw Error(ne(426));return r}nl.renderToNodeStream=function(){throw Error(ne(207))};nl.renderToStaticMarkup=function(e,t){return XT(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')};nl.renderToStaticNodeStream=function(){throw Error(ne(208))};nl.renderToString=function(e,t){return XT(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')};nl.version="18.3.1";var Ym={};/**
|
|
315
|
+
* @license React
|
|
316
|
+
* react-dom-server.browser.production.min.js
|
|
317
|
+
*
|
|
318
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
319
|
+
*
|
|
320
|
+
* This source code is licensed under the MIT license found in the
|
|
321
|
+
* LICENSE file in the root directory of this source tree.
|
|
322
|
+
*/var ZT=S;function re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var pi=null,gi=0;function j(e,t){if(t.length!==0)if(512<t.length)0<gi&&(e.enqueue(new Uint8Array(pi.buffer,0,gi)),pi=new Uint8Array(512),gi=0),e.enqueue(t);else{var i=pi.length-gi;i<t.length&&(i===0?e.enqueue(pi):(pi.set(t.subarray(0,i),gi),e.enqueue(pi),t=t.subarray(i)),pi=new Uint8Array(512),gi=0),pi.set(t,gi),gi+=t.length}}function Ne(e,t){return j(e,t),!0}function iw(e){pi&&0<gi&&(e.enqueue(new Uint8Array(pi.buffer,0,gi)),pi=null,gi=0)}var JT=new TextEncoder;function ae(e){return JT.encode(e)}function B(e){return JT.encode(e)}function eD(e,t){typeof e.error=="function"?e.error(t):e.close()}var Yt=Object.prototype.hasOwnProperty,KM=/^[: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]*$/,sw={},nw={};function tD(e){return Yt.call(nw,e)?!0:Yt.call(sw,e)?!1:KM.test(e)?nw[e]=!0:(sw[e]=!0,!1)}function $t(e,t,i,s,n,o,r){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=n,this.mustUseProperty=i,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=r}var Rt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Rt[e]=new $t(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Rt[t]=new $t(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Rt[e]=new $t(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Rt[e]=new $t(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){Rt[e]=new $t(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Rt[e]=new $t(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Rt[e]=new $t(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Rt[e]=new $t(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Rt[e]=new $t(e,5,!1,e.toLowerCase(),null,!1,!1)});var Qm=/[\-:]([a-z])/g;function qm(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(Qm,qm);Rt[t]=new $t(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(Qm,qm);Rt[t]=new $t(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(Qm,qm);Rt[t]=new $t(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Rt[e]=new $t(e,1,!1,e.toLowerCase(),null,!1,!1)});Rt.xlinkHref=new $t("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Rt[e]=new $t(e,1,!1,e.toLowerCase(),null,!0,!0)});var id={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},jM=["Webkit","ms","Moz","O"];Object.keys(id).forEach(function(e){jM.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),id[t]=id[e]})});var YM=/["'&<>]/;function vt(e){if(typeof e=="boolean"||typeof e=="number")return""+e;e=""+e;var t=YM.exec(e);if(t){var i="",s,n=0;for(s=t.index;s<e.length;s++){switch(e.charCodeAt(s)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}n!==s&&(i+=e.substring(n,s)),n=s+1,i+=t}e=n!==s?i+e.substring(n,s):i}return e}var QM=/([A-Z])/g,qM=/^ms-/,Gg=Array.isArray,XM=B("<script>"),ZM=B("<\/script>"),JM=B('<script src="'),eI=B('<script type="module" src="'),ow=B('" async=""><\/script>'),tI=/(<\/|<)(s)(cript)/gi;function iI(e,t,i,s){return""+t+(i==="s"?"\\u0073":"\\u0053")+s}function sI(e,t,i,s,n){e=e===void 0?"":e,t=t===void 0?XM:B('<script nonce="'+vt(t)+'">');var o=[];if(i!==void 0&&o.push(t,ae((""+i).replace(tI,iI)),ZM),s!==void 0)for(i=0;i<s.length;i++)o.push(JM,ae(vt(s[i])),ow);if(n!==void 0)for(s=0;s<n.length;s++)o.push(eI,ae(vt(n[s])),ow);return{bootstrapChunks:o,startInlineScript:t,placeholderPrefix:B(e+"P:"),segmentPrefix:B(e+"S:"),boundaryPrefix:e+"B:",idPrefix:e,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}function ds(e,t){return{insertionMode:e,selectedValue:t}}function nI(e){return ds(e==="http://www.w3.org/2000/svg"?2:e==="http://www.w3.org/1998/Math/MathML"?3:0,null)}function oI(e,t,i){switch(t){case"select":return ds(1,i.value!=null?i.value:i.defaultValue);case"svg":return ds(2,null);case"math":return ds(3,null);case"foreignObject":return ds(1,null);case"table":return ds(4,null);case"thead":case"tbody":case"tfoot":return ds(5,null);case"colgroup":return ds(7,null);case"tr":return ds(6,null)}return 4<=e.insertionMode||e.insertionMode===0?ds(1,null):e}var Xm=B("<!-- -->");function rw(e,t,i,s){return t===""?s:(s&&e.push(Xm),e.push(ae(vt(t))),!0)}var lw=new Map,rI=B(' style="'),aw=B(":"),lI=B(";");function iD(e,t,i){if(typeof i!="object")throw Error(re(62));t=!0;for(var s in i)if(Yt.call(i,s)){var n=i[s];if(n!=null&&typeof n!="boolean"&&n!==""){if(s.indexOf("--")===0){var o=ae(vt(s));n=ae(vt((""+n).trim()))}else{o=s;var r=lw.get(o);r!==void 0||(r=B(vt(o.replace(QM,"-$1").toLowerCase().replace(qM,"-ms-"))),lw.set(o,r)),o=r,n=typeof n=="number"?n===0||Yt.call(id,s)?ae(""+n):ae(n+"px"):ae(vt((""+n).trim()))}t?(t=!1,e.push(rI,o,aw,n)):e.push(lI,o,aw,n)}}t||e.push($n)}var Xs=B(" "),Yo=B('="'),$n=B('"'),uw=B('=""');function di(e,t,i,s){switch(i){case"style":iD(e,t,s);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N"){if(t=Rt.hasOwnProperty(i)?Rt[i]:null,t!==null){switch(typeof s){case"function":case"symbol":return;case"boolean":if(!t.acceptsBooleans)return}switch(i=ae(t.attributeName),t.type){case 3:s&&e.push(Xs,i,uw);break;case 4:s===!0?e.push(Xs,i,uw):s!==!1&&e.push(Xs,i,Yo,ae(vt(s)),$n);break;case 5:isNaN(s)||e.push(Xs,i,Yo,ae(vt(s)),$n);break;case 6:!isNaN(s)&&1<=s&&e.push(Xs,i,Yo,ae(vt(s)),$n);break;default:t.sanitizeURL&&(s=""+s),e.push(Xs,i,Yo,ae(vt(s)),$n)}}else if(tD(i)){switch(typeof s){case"function":case"symbol":return;case"boolean":if(t=i.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-")return}e.push(Xs,ae(i),Yo,ae(vt(s)),$n)}}}var Zs=B(">"),dw=B("/>");function sd(e,t,i){if(t!=null){if(i!=null)throw Error(re(60));if(typeof t!="object"||!("__html"in t))throw Error(re(61));t=t.__html,t!=null&&e.push(ae(""+t))}}function aI(e){var t="";return ZT.Children.forEach(e,function(i){i!=null&&(t+=i)}),t}var np=B(' selected=""');function op(e,t,i,s){e.push(cs(i));var n=i=null,o;for(o in t)if(Yt.call(t,o)){var r=t[o];if(r!=null)switch(o){case"children":i=r;break;case"dangerouslySetInnerHTML":n=r;break;default:di(e,s,o,r)}}return e.push(Zs),sd(e,n,i),typeof i=="string"?(e.push(ae(vt(i))),null):i}var rp=B(`
|
|
323
|
+
`),uI=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,cw=new Map;function cs(e){var t=cw.get(e);if(t===void 0){if(!uI.test(e))throw Error(re(65,e));t=B("<"+e),cw.set(e,t)}return t}var dI=B("<!DOCTYPE html>");function cI(e,t,i,s,n){switch(t){case"select":e.push(cs("select"));var o=null,r=null;for(d in i)if(Yt.call(i,d)){var l=i[d];if(l!=null)switch(d){case"children":o=l;break;case"dangerouslySetInnerHTML":r=l;break;case"defaultValue":case"value":break;default:di(e,s,d,l)}}return e.push(Zs),sd(e,r,o),o;case"option":r=n.selectedValue,e.push(cs("option"));var a=l=null,u=null,d=null;for(o in i)if(Yt.call(i,o)){var h=i[o];if(h!=null)switch(o){case"children":l=h;break;case"selected":u=h;break;case"dangerouslySetInnerHTML":d=h;break;case"value":a=h;default:di(e,s,o,h)}}if(r!=null)if(i=a!==null?""+a:aI(l),Gg(r)){for(s=0;s<r.length;s++)if(""+r[s]===i){e.push(np);break}}else""+r===i&&e.push(np);else u&&e.push(np);return e.push(Zs),sd(e,d,l),l;case"textarea":e.push(cs("textarea")),d=r=o=null;for(l in i)if(Yt.call(i,l)&&(a=i[l],a!=null))switch(l){case"children":d=a;break;case"value":o=a;break;case"defaultValue":r=a;break;case"dangerouslySetInnerHTML":throw Error(re(91));default:di(e,s,l,a)}if(o===null&&r!==null&&(o=r),e.push(Zs),d!=null){if(o!=null)throw Error(re(92));if(Gg(d)&&1<d.length)throw Error(re(93));o=""+d}return typeof o=="string"&&o[0]===`
|
|
324
|
+
`&&e.push(rp),o!==null&&e.push(ae(vt(""+o))),null;case"input":e.push(cs("input")),a=d=l=o=null;for(r in i)if(Yt.call(i,r)&&(u=i[r],u!=null))switch(r){case"children":case"dangerouslySetInnerHTML":throw Error(re(399,"input"));case"defaultChecked":a=u;break;case"defaultValue":l=u;break;case"checked":d=u;break;case"value":o=u;break;default:di(e,s,r,u)}return d!==null?di(e,s,"checked",d):a!==null&&di(e,s,"checked",a),o!==null?di(e,s,"value",o):l!==null&&di(e,s,"value",l),e.push(dw),null;case"menuitem":e.push(cs("menuitem"));for(var p in i)if(Yt.call(i,p)&&(o=i[p],o!=null))switch(p){case"children":case"dangerouslySetInnerHTML":throw Error(re(400));default:di(e,s,p,o)}return e.push(Zs),null;case"title":e.push(cs("title")),o=null;for(h in i)if(Yt.call(i,h)&&(r=i[h],r!=null))switch(h){case"children":o=r;break;case"dangerouslySetInnerHTML":throw Error(re(434));default:di(e,s,h,r)}return e.push(Zs),o;case"listing":case"pre":e.push(cs(t)),r=o=null;for(a in i)if(Yt.call(i,a)&&(l=i[a],l!=null))switch(a){case"children":o=l;break;case"dangerouslySetInnerHTML":r=l;break;default:di(e,s,a,l)}if(e.push(Zs),r!=null){if(o!=null)throw Error(re(60));if(typeof r!="object"||!("__html"in r))throw Error(re(61));i=r.__html,i!=null&&(typeof i=="string"&&0<i.length&&i[0]===`
|
|
325
|
+
`?e.push(rp,ae(i)):e.push(ae(""+i)))}return typeof o=="string"&&o[0]===`
|
|
326
|
+
`&&e.push(rp),o;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":e.push(cs(t));for(var C in i)if(Yt.call(i,C)&&(o=i[C],o!=null))switch(C){case"children":case"dangerouslySetInnerHTML":throw Error(re(399,t));default:di(e,s,C,o)}return e.push(dw),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 op(e,i,t,s);case"html":return n.insertionMode===0&&e.push(dI),op(e,i,t,s);default:if(t.indexOf("-")===-1&&typeof i.is!="string")return op(e,i,t,s);e.push(cs(t)),r=o=null;for(u in i)if(Yt.call(i,u)&&(l=i[u],l!=null))switch(u){case"children":o=l;break;case"dangerouslySetInnerHTML":r=l;break;case"style":iD(e,s,l);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:tD(u)&&typeof l!="function"&&typeof l!="symbol"&&e.push(Xs,ae(u),Yo,ae(vt(l)),$n)}return e.push(Zs),sd(e,r,o),o}}var hI=B("</"),pI=B(">"),gI=B('<template id="'),fI=B('"></template>'),mI=B("<!--$-->"),CI=B('<!--$?--><template id="'),vI=B('"></template>'),wI=B("<!--$!-->"),yI=B("<!--/$-->"),SI=B("<template"),EI=B('"'),RI=B(' data-dgst="');B(' data-msg="');B(' data-stck="');var TI=B("></template>");function hw(e,t,i){if(j(e,CI),i===null)throw Error(re(395));return j(e,i),Ne(e,vI)}var DI=B('<div hidden id="'),PI=B('">'),FI=B("</div>"),AI=B('<svg aria-hidden="true" style="display:none" id="'),bI=B('">'),LI=B("</svg>"),MI=B('<math aria-hidden="true" style="display:none" id="'),II=B('">'),xI=B("</math>"),NI=B('<table hidden id="'),_I=B('">'),OI=B("</table>"),GI=B('<table hidden><tbody id="'),kI=B('">'),VI=B("</tbody></table>"),HI=B('<table hidden><tr id="'),BI=B('">'),WI=B("</tr></table>"),UI=B('<table hidden><colgroup id="'),zI=B('">'),$I=B("</colgroup></table>");function KI(e,t,i,s){switch(i.insertionMode){case 0:case 1:return j(e,DI),j(e,t.segmentPrefix),j(e,ae(s.toString(16))),Ne(e,PI);case 2:return j(e,AI),j(e,t.segmentPrefix),j(e,ae(s.toString(16))),Ne(e,bI);case 3:return j(e,MI),j(e,t.segmentPrefix),j(e,ae(s.toString(16))),Ne(e,II);case 4:return j(e,NI),j(e,t.segmentPrefix),j(e,ae(s.toString(16))),Ne(e,_I);case 5:return j(e,GI),j(e,t.segmentPrefix),j(e,ae(s.toString(16))),Ne(e,kI);case 6:return j(e,HI),j(e,t.segmentPrefix),j(e,ae(s.toString(16))),Ne(e,BI);case 7:return j(e,UI),j(e,t.segmentPrefix),j(e,ae(s.toString(16))),Ne(e,zI);default:throw Error(re(397))}}function jI(e,t){switch(t.insertionMode){case 0:case 1:return Ne(e,FI);case 2:return Ne(e,LI);case 3:return Ne(e,xI);case 4:return Ne(e,OI);case 5:return Ne(e,VI);case 6:return Ne(e,WI);case 7:return Ne(e,$I);default:throw Error(re(397))}}var YI=B('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("'),QI=B('$RS("'),qI=B('","'),XI=B('")<\/script>'),ZI=B('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("'),JI=B('$RC("'),ex=B('","'),tx=B('")<\/script>'),ix=B('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("'),sx=B('$RX("'),nx=B('"'),ox=B(")<\/script>"),lp=B(","),rx=/[<\u2028\u2029]/g;function ap(e){return JSON.stringify(e).replace(rx,function(t){switch(t){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 Ul=Object.assign,lx=Symbol.for("react.element"),sD=Symbol.for("react.portal"),nD=Symbol.for("react.fragment"),oD=Symbol.for("react.strict_mode"),rD=Symbol.for("react.profiler"),lD=Symbol.for("react.provider"),aD=Symbol.for("react.context"),uD=Symbol.for("react.forward_ref"),dD=Symbol.for("react.suspense"),cD=Symbol.for("react.suspense_list"),hD=Symbol.for("react.memo"),Zm=Symbol.for("react.lazy"),ax=Symbol.for("react.scope"),ux=Symbol.for("react.debug_trace_mode"),dx=Symbol.for("react.legacy_hidden"),cx=Symbol.for("react.default_value"),pw=Symbol.iterator;function kg(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case nD:return"Fragment";case sD:return"Portal";case rD:return"Profiler";case oD:return"StrictMode";case dD:return"Suspense";case cD:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case aD:return(e.displayName||"Context")+".Consumer";case lD:return(e._context.displayName||"Context")+".Provider";case uD:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case hD:return t=e.displayName||null,t!==null?t:kg(e.type)||"Memo";case Zm:t=e._payload,e=e._init;try{return kg(e(t))}catch{}}return null}var pD={};function gw(e,t){if(e=e.contextTypes,!e)return pD;var i={},s;for(s in e)i[s]=t[s];return i}var eo=null;function lh(e,t){if(e!==t){e.context._currentValue=e.parentValue,e=e.parent;var i=t.parent;if(e===null){if(i!==null)throw Error(re(401))}else{if(i===null)throw Error(re(401));lh(e,i)}t.context._currentValue=t.value}}function gD(e){e.context._currentValue=e.parentValue,e=e.parent,e!==null&&gD(e)}function fD(e){var t=e.parent;t!==null&&fD(t),e.context._currentValue=e.value}function mD(e,t){if(e.context._currentValue=e.parentValue,e=e.parent,e===null)throw Error(re(402));e.depth===t.depth?lh(e,t):mD(e,t)}function CD(e,t){var i=t.parent;if(i===null)throw Error(re(402));e.depth===i.depth?lh(e,i):CD(e,i),t.context._currentValue=t.value}function nc(e){var t=eo;t!==e&&(t===null?fD(e):e===null?gD(t):t.depth===e.depth?lh(t,e):t.depth>e.depth?mD(t,e):CD(t,e),eo=e)}var fw={isMounted:function(){return!1},enqueueSetState:function(e,t){e=e._reactInternals,e.queue!==null&&e.queue.push(t)},enqueueReplaceState:function(e,t){e=e._reactInternals,e.replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function mw(e,t,i,s){var n=e.state!==void 0?e.state:null;e.updater=fw,e.props=i,e.state=n;var o={queue:[],replace:!1};e._reactInternals=o;var r=t.contextType;if(e.context=typeof r=="object"&&r!==null?r._currentValue:s,r=t.getDerivedStateFromProps,typeof r=="function"&&(r=r(i,n),n=r==null?n:Ul({},n,r),e.state=n),typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function"&&(typeof e.UNSAFE_componentWillMount=="function"||typeof e.componentWillMount=="function"))if(t=e.state,typeof e.componentWillMount=="function"&&e.componentWillMount(),typeof e.UNSAFE_componentWillMount=="function"&&e.UNSAFE_componentWillMount(),t!==e.state&&fw.enqueueReplaceState(e,e.state,null),o.queue!==null&&0<o.queue.length)if(t=o.queue,r=o.replace,o.queue=null,o.replace=!1,r&&t.length===1)e.state=t[0];else{for(o=r?t[0]:e.state,n=!0,r=r?1:0;r<t.length;r++){var l=t[r];l=typeof l=="function"?l.call(e,o,i,s):l,l!=null&&(n?(n=!1,o=Ul({},o,l)):Ul(o,l))}e.state=o}else o.queue=null}var hx={id:1,overflow:""};function Vg(e,t,i){var s=e.id;e=e.overflow;var n=32-nd(s)-1;s&=~(1<<n),i+=1;var o=32-nd(t)+n;if(30<o){var r=n-n%5;return o=(s&(1<<r)-1).toString(32),s>>=r,n-=r,{id:1<<32-nd(t)+n|i<<n|s,overflow:o+e}}return{id:1<<o|i<<n|s,overflow:e}}var nd=Math.clz32?Math.clz32:fx,px=Math.log,gx=Math.LN2;function fx(e){return e>>>=0,e===0?32:31-(px(e)/gx|0)|0}function mx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Cx=typeof Object.is=="function"?Object.is:mx,Hs=null,Jm=null,od=null,be=null,Ll=!1,oc=!1,_a=0,an=null,ah=0;function Kn(){if(Hs===null)throw Error(re(321));return Hs}function Cw(){if(0<ah)throw Error(re(312));return{memoizedState:null,queue:null,next:null}}function eC(){return be===null?od===null?(Ll=!1,od=be=Cw()):(Ll=!0,be=od):be.next===null?(Ll=!1,be=be.next=Cw()):(Ll=!0,be=be.next),be}function tC(){Jm=Hs=null,oc=!1,od=null,ah=0,be=an=null}function vD(e,t){return typeof t=="function"?t(e):t}function vw(e,t,i){if(Hs=Kn(),be=eC(),Ll){var s=be.queue;if(t=s.dispatch,an!==null&&(i=an.get(s),i!==void 0)){an.delete(s),s=be.memoizedState;do s=e(s,i.action),i=i.next;while(i!==null);return be.memoizedState=s,[s,t]}return[be.memoizedState,t]}return e=e===vD?typeof t=="function"?t():t:i!==void 0?i(t):t,be.memoizedState=e,e=be.queue={last:null,dispatch:null},e=e.dispatch=vx.bind(null,Hs,e),[be.memoizedState,e]}function ww(e,t){if(Hs=Kn(),be=eC(),t=t===void 0?null:t,be!==null){var i=be.memoizedState;if(i!==null&&t!==null){var s=i[1];e:if(s===null)s=!1;else{for(var n=0;n<s.length&&n<t.length;n++)if(!Cx(t[n],s[n])){s=!1;break e}s=!0}if(s)return i[0]}}return e=e(),be.memoizedState=[e,t],e}function vx(e,t,i){if(25<=ah)throw Error(re(301));if(e===Hs)if(oc=!0,e={action:i,next:null},an===null&&(an=new Map),i=an.get(t),i===void 0)an.set(t,e);else{for(t=i;t.next!==null;)t=t.next;t.next=e}}function wx(){throw Error(re(394))}function Lu(){}var yw={readContext:function(e){return e._currentValue},useContext:function(e){return Kn(),e._currentValue},useMemo:ww,useReducer:vw,useRef:function(e){Hs=Kn(),be=eC();var t=be.memoizedState;return t===null?(e={current:e},be.memoizedState=e):t},useState:function(e){return vw(vD,e)},useInsertionEffect:Lu,useLayoutEffect:function(){},useCallback:function(e,t){return ww(function(){return e},t)},useImperativeHandle:Lu,useEffect:Lu,useDebugValue:Lu,useDeferredValue:function(e){return Kn(),e},useTransition:function(){return Kn(),[!1,wx]},useId:function(){var e=Jm.treeContext,t=e.overflow;e=e.id,e=(e&~(1<<32-nd(e)-1)).toString(32)+t;var i=rd;if(i===null)throw Error(re(404));return t=_a++,e=":"+i.idPrefix+"R"+e,0<t&&(e+="H"+t.toString(32)),e+":"},useMutableSource:function(e,t){return Kn(),t(e._source)},useSyncExternalStore:function(e,t,i){if(i===void 0)throw Error(re(407));return i()}},rd=null,up=ZT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function yx(e){return console.error(e),null}function Ml(){}function Sx(e,t,i,s,n,o,r,l,a){var u=[],d=new Set;return t={destination:null,responseState:t,progressiveChunkSize:s===void 0?12800:s,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:d,pingedTasks:u,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:n===void 0?yx:n,onAllReady:o===void 0?Ml:o,onShellReady:r===void 0?Ml:r,onShellError:l===void 0?Ml:l,onFatalError:a===void 0?Ml:a},i=rc(t,0,null,i,!1,!1),i.parentFlushed=!0,e=iC(t,e,null,i,d,pD,null,hx),u.push(e),t}function iC(e,t,i,s,n,o,r,l){e.allPendingTasks++,i===null?e.pendingRootTasks++:i.pendingTasks++;var a={node:t,ping:function(){var u=e.pingedTasks;u.push(a),u.length===1&&SD(e)},blockedBoundary:i,blockedSegment:s,abortSet:n,legacyContext:o,context:r,treeContext:l};return n.add(a),a}function rc(e,t,i,s,n,o){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:s,boundary:i,lastPushedText:n,textEmbedded:o}}function Oa(e,t){if(e=e.onError(t),e!=null&&typeof e!="string")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 lc(e,t){var i=e.onShellError;i(t),i=e.onFatalError,i(t),e.destination!==null?(e.status=2,eD(e.destination,t)):(e.status=1,e.fatalError=t)}function Sw(e,t,i,s,n){for(Hs={},Jm=t,_a=0,e=i(s,n);oc;)oc=!1,_a=0,ah+=1,be=null,e=i(s,n);return tC(),e}function Ew(e,t,i,s){var n=i.render(),o=s.childContextTypes;if(o!=null){var r=t.legacyContext;if(typeof i.getChildContext!="function")s=r;else{i=i.getChildContext();for(var l in i)if(!(l in o))throw Error(re(108,kg(s)||"Unknown",l));s=Ul({},r,i)}t.legacyContext=s,fi(e,t,n),t.legacyContext=r}else fi(e,t,n)}function Rw(e,t){if(e&&e.defaultProps){t=Ul({},t),e=e.defaultProps;for(var i in e)t[i]===void 0&&(t[i]=e[i]);return t}return t}function Hg(e,t,i,s,n){if(typeof i=="function")if(i.prototype&&i.prototype.isReactComponent){n=gw(i,t.legacyContext);var o=i.contextType;o=new i(s,typeof o=="object"&&o!==null?o._currentValue:n),mw(o,i,s,n),Ew(e,t,o,i)}else{o=gw(i,t.legacyContext),n=Sw(e,t,i,s,o);var r=_a!==0;if(typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0)mw(n,i,s,o),Ew(e,t,n,i);else if(r){s=t.treeContext,t.treeContext=Vg(s,1,0);try{fi(e,t,n)}finally{t.treeContext=s}}else fi(e,t,n)}else if(typeof i=="string"){switch(n=t.blockedSegment,o=cI(n.chunks,i,s,e.responseState,n.formatContext),n.lastPushedText=!1,r=n.formatContext,n.formatContext=oI(r,i,s),Bg(e,t,o),n.formatContext=r,i){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:n.chunks.push(hI,ae(i),pI)}n.lastPushedText=!1}else{switch(i){case dx:case ux:case oD:case rD:case nD:fi(e,t,s.children);return;case cD:fi(e,t,s.children);return;case ax:throw Error(re(343));case dD:e:{i=t.blockedBoundary,n=t.blockedSegment,o=s.fallback,s=s.children,r=new Set;var l={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:r,errorDigest:null},a=rc(e,n.chunks.length,l,n.formatContext,!1,!1);n.children.push(a),n.lastPushedText=!1;var u=rc(e,0,null,n.formatContext,!1,!1);u.parentFlushed=!0,t.blockedBoundary=l,t.blockedSegment=u;try{if(Bg(e,t,s),u.lastPushedText&&u.textEmbedded&&u.chunks.push(Xm),u.status=1,ac(l,u),l.pendingTasks===0)break e}catch(d){u.status=4,l.forceClientRender=!0,l.errorDigest=Oa(e,d)}finally{t.blockedBoundary=i,t.blockedSegment=n}t=iC(e,o,i,a,r,t.legacyContext,t.context,t.treeContext),e.pingedTasks.push(t)}return}if(typeof i=="object"&&i!==null)switch(i.$$typeof){case uD:if(s=Sw(e,t,i.render,s,n),_a!==0){i=t.treeContext,t.treeContext=Vg(i,1,0);try{fi(e,t,s)}finally{t.treeContext=i}}else fi(e,t,s);return;case hD:i=i.type,s=Rw(i,s),Hg(e,t,i,s,n);return;case lD:if(n=s.children,i=i._context,s=s.value,o=i._currentValue,i._currentValue=s,r=eo,eo=s={parent:r,depth:r===null?0:r.depth+1,context:i,parentValue:o,value:s},t.context=s,fi(e,t,n),e=eo,e===null)throw Error(re(403));s=e.parentValue,e.context._currentValue=s===cx?e.context._defaultValue:s,e=eo=e.parent,t.context=e;return;case aD:s=s.children,s=s(i._currentValue),fi(e,t,s);return;case Zm:n=i._init,i=n(i._payload),s=Rw(i,s),Hg(e,t,i,s,void 0);return}throw Error(re(130,i==null?i:typeof i,""))}}function fi(e,t,i){if(t.node=i,typeof i=="object"&&i!==null){switch(i.$$typeof){case lx:Hg(e,t,i.type,i.props,i.ref);return;case sD:throw Error(re(257));case Zm:var s=i._init;i=s(i._payload),fi(e,t,i);return}if(Gg(i)){Tw(e,t,i);return}if(i===null||typeof i!="object"?s=null:(s=pw&&i[pw]||i["@@iterator"],s=typeof s=="function"?s:null),s&&(s=s.call(i))){if(i=s.next(),!i.done){var n=[];do n.push(i.value),i=s.next();while(!i.done);Tw(e,t,n)}return}throw e=Object.prototype.toString.call(i),Error(re(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e))}typeof i=="string"?(s=t.blockedSegment,s.lastPushedText=rw(t.blockedSegment.chunks,i,e.responseState,s.lastPushedText)):typeof i=="number"&&(s=t.blockedSegment,s.lastPushedText=rw(t.blockedSegment.chunks,""+i,e.responseState,s.lastPushedText))}function Tw(e,t,i){for(var s=i.length,n=0;n<s;n++){var o=t.treeContext;t.treeContext=Vg(o,s,n);try{Bg(e,t,i[n])}finally{t.treeContext=o}}}function Bg(e,t,i){var s=t.blockedSegment.formatContext,n=t.legacyContext,o=t.context;try{return fi(e,t,i)}catch(a){if(tC(),typeof a=="object"&&a!==null&&typeof a.then=="function"){i=a;var r=t.blockedSegment,l=rc(e,r.chunks.length,null,r.formatContext,r.lastPushedText,!0);r.children.push(l),r.lastPushedText=!1,e=iC(e,t.node,t.blockedBoundary,l,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,i.then(e,e),t.blockedSegment.formatContext=s,t.legacyContext=n,t.context=o,nc(o)}else throw t.blockedSegment.formatContext=s,t.legacyContext=n,t.context=o,nc(o),a}}function Ex(e){var t=e.blockedBoundary;e=e.blockedSegment,e.status=3,yD(this,t,e)}function wD(e,t,i){var s=e.blockedBoundary;e.blockedSegment.status=3,s===null?(t.allPendingTasks--,t.status!==2&&(t.status=2,t.destination!==null&&t.destination.close())):(s.pendingTasks--,s.forceClientRender||(s.forceClientRender=!0,e=i===void 0?Error(re(432)):i,s.errorDigest=t.onError(e),s.parentFlushed&&t.clientRenderedBoundaries.push(s)),s.fallbackAbortableTasks.forEach(function(n){return wD(n,t,i)}),s.fallbackAbortableTasks.clear(),t.allPendingTasks--,t.allPendingTasks===0&&(s=t.onAllReady,s()))}function ac(e,t){if(t.chunks.length===0&&t.children.length===1&&t.children[0].boundary===null){var i=t.children[0];i.id=t.id,i.parentFlushed=!0,i.status===1&&ac(e,i)}else e.completedSegments.push(t)}function yD(e,t,i){if(t===null){if(i.parentFlushed){if(e.completedRootSegment!==null)throw Error(re(389));e.completedRootSegment=i}e.pendingRootTasks--,e.pendingRootTasks===0&&(e.onShellError=Ml,t=e.onShellReady,t())}else t.pendingTasks--,t.forceClientRender||(t.pendingTasks===0?(i.parentFlushed&&i.status===1&&ac(t,i),t.parentFlushed&&e.completedBoundaries.push(t),t.fallbackAbortableTasks.forEach(Ex,e),t.fallbackAbortableTasks.clear()):i.parentFlushed&&i.status===1&&(ac(t,i),t.completedSegments.length===1&&t.parentFlushed&&e.partialBoundaries.push(t)));e.allPendingTasks--,e.allPendingTasks===0&&(e=e.onAllReady,e())}function SD(e){if(e.status!==2){var t=eo,i=up.current;up.current=yw;var s=rd;rd=e.responseState;try{var n=e.pingedTasks,o;for(o=0;o<n.length;o++){var r=n[o],l=e,a=r.blockedSegment;if(a.status===0){nc(r.context);try{fi(l,r,r.node),a.lastPushedText&&a.textEmbedded&&a.chunks.push(Xm),r.abortSet.delete(r),a.status=1,yD(l,r.blockedBoundary,a)}catch(v){if(tC(),typeof v=="object"&&v!==null&&typeof v.then=="function"){var u=r.ping;v.then(u,u)}else{r.abortSet.delete(r),a.status=4;var d=r.blockedBoundary,h=v,p=Oa(l,h);if(d===null?lc(l,h):(d.pendingTasks--,d.forceClientRender||(d.forceClientRender=!0,d.errorDigest=p,d.parentFlushed&&l.clientRenderedBoundaries.push(d))),l.allPendingTasks--,l.allPendingTasks===0){var C=l.onAllReady;C()}}}finally{}}}n.splice(0,o),e.destination!==null&&sC(e,e.destination)}catch(v){Oa(e,v),lc(e,v)}finally{rd=s,up.current=i,i===yw&&nc(t)}}}function Mu(e,t,i){switch(i.parentFlushed=!0,i.status){case 0:var s=i.id=e.nextSegmentId++;return i.lastPushedText=!1,i.textEmbedded=!1,e=e.responseState,j(t,gI),j(t,e.placeholderPrefix),e=ae(s.toString(16)),j(t,e),Ne(t,fI);case 1:i.status=2;var n=!0;s=i.chunks;var o=0;i=i.children;for(var r=0;r<i.length;r++){for(n=i[r];o<n.index;o++)j(t,s[o]);n=uh(e,t,n)}for(;o<s.length-1;o++)j(t,s[o]);return o<s.length&&(n=Ne(t,s[o])),n;default:throw Error(re(390))}}function uh(e,t,i){var s=i.boundary;if(s===null)return Mu(e,t,i);if(s.parentFlushed=!0,s.forceClientRender)s=s.errorDigest,Ne(t,wI),j(t,SI),s&&(j(t,RI),j(t,ae(vt(s))),j(t,EI)),Ne(t,TI),Mu(e,t,i);else if(0<s.pendingTasks){s.rootSegmentID=e.nextSegmentId++,0<s.completedSegments.length&&e.partialBoundaries.push(s);var n=e.responseState,o=n.nextSuspenseID++;n=B(n.boundaryPrefix+o.toString(16)),s=s.id=n,hw(t,e.responseState,s),Mu(e,t,i)}else if(s.byteSize>e.progressiveChunkSize)s.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(s),hw(t,e.responseState,s.id),Mu(e,t,i);else{if(Ne(t,mI),i=s.completedSegments,i.length!==1)throw Error(re(391));uh(e,t,i[0])}return Ne(t,yI)}function Dw(e,t,i){return KI(t,e.responseState,i.formatContext,i.id),uh(e,t,i),jI(t,i.formatContext)}function Pw(e,t,i){for(var s=i.completedSegments,n=0;n<s.length;n++)ED(e,t,i,s[n]);if(s.length=0,e=e.responseState,s=i.id,i=i.rootSegmentID,j(t,e.startInlineScript),e.sentCompleteBoundaryFunction?j(t,JI):(e.sentCompleteBoundaryFunction=!0,j(t,ZI)),s===null)throw Error(re(395));return i=ae(i.toString(16)),j(t,s),j(t,ex),j(t,e.segmentPrefix),j(t,i),Ne(t,tx)}function ED(e,t,i,s){if(s.status===2)return!0;var n=s.id;if(n===-1){if((s.id=i.rootSegmentID)===-1)throw Error(re(392));return Dw(e,t,s)}return Dw(e,t,s),e=e.responseState,j(t,e.startInlineScript),e.sentCompleteSegmentFunction?j(t,QI):(e.sentCompleteSegmentFunction=!0,j(t,YI)),j(t,e.segmentPrefix),n=ae(n.toString(16)),j(t,n),j(t,qI),j(t,e.placeholderPrefix),j(t,n),Ne(t,XI)}function sC(e,t){pi=new Uint8Array(512),gi=0;try{var i=e.completedRootSegment;if(i!==null&&e.pendingRootTasks===0){uh(e,t,i),e.completedRootSegment=null;var s=e.responseState.bootstrapChunks;for(i=0;i<s.length-1;i++)j(t,s[i]);i<s.length&&Ne(t,s[i])}var n=e.clientRenderedBoundaries,o;for(o=0;o<n.length;o++){var r=n[o];s=t;var l=e.responseState,a=r.id,u=r.errorDigest,d=r.errorMessage,h=r.errorComponentStack;if(j(s,l.startInlineScript),l.sentClientRenderFunction?j(s,sx):(l.sentClientRenderFunction=!0,j(s,ix)),a===null)throw Error(re(395));j(s,a),j(s,nx),(u||d||h)&&(j(s,lp),j(s,ae(ap(u||"")))),(d||h)&&(j(s,lp),j(s,ae(ap(d||"")))),h&&(j(s,lp),j(s,ae(ap(h)))),Ne(s,ox)}n.splice(0,o);var p=e.completedBoundaries;for(o=0;o<p.length;o++)Pw(e,t,p[o]);p.splice(0,o),iw(t),pi=new Uint8Array(512),gi=0;var C=e.partialBoundaries;for(o=0;o<C.length;o++){var v=C[o];e:{n=e,r=t;var y=v.completedSegments;for(l=0;l<y.length;l++)if(!ED(n,r,v,y[l])){l++,y.splice(0,l);var R=!1;break e}y.splice(0,l),R=!0}if(!R){e.destination=null,o++,C.splice(0,o);return}}C.splice(0,o);var w=e.completedBoundaries;for(o=0;o<w.length;o++)Pw(e,t,w[o]);w.splice(0,o)}finally{iw(t),e.allPendingTasks===0&&e.pingedTasks.length===0&&e.clientRenderedBoundaries.length===0&&e.completedBoundaries.length===0&&t.close()}}function Fw(e,t){try{var i=e.abortableTasks;i.forEach(function(s){return wD(s,e,t)}),i.clear(),e.destination!==null&&sC(e,e.destination)}catch(s){Oa(e,s),lc(e,s)}}Ym.renderToReadableStream=function(e,t){return new Promise(function(i,s){var n,o,r=new Promise(function(d,h){o=d,n=h}),l=Sx(e,sI(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),nI(t?t.namespaceURI:void 0),t?t.progressiveChunkSize:void 0,t?t.onError:void 0,o,function(){var d=new ReadableStream({type:"bytes",pull:function(h){if(l.status===1)l.status=2,eD(h,l.fatalError);else if(l.status!==2&&l.destination===null){l.destination=h;try{sC(l,h)}catch(p){Oa(l,p),lc(l,p)}}},cancel:function(){Fw(l)}},{highWaterMark:0});d.allReady=r,i(d)},function(d){r.catch(function(){}),s(d)},n);if(t&&t.signal){var a=t.signal,u=function(){Fw(l,a.reason),a.removeEventListener("abort",u)};a.addEventListener("abort",u)}SD(l)})};Ym.version="18.3.1";var ol,RD;ol=nl,RD=Ym;ol.version;ol.renderToString;var Rx=ol.renderToStaticMarkup;ol.renderToNodeStream;ol.renderToStaticNodeStream;RD.renderToReadableStream;var Tx=Object.defineProperty,Dx=Object.defineProperties,Px=Object.getOwnPropertyDescriptors,Aw=Object.getOwnPropertySymbols,Fx=Object.prototype.hasOwnProperty,Ax=Object.prototype.propertyIsEnumerable,bw=(e,t,i)=>t in e?Tx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Ge=(e,t)=>{for(var i in t||(t={}))Fx.call(t,i)&&bw(e,i,t[i]);if(Aw)for(var i of Aw(t))Ax.call(t,i)&&bw(e,i,t[i]);return e},kt=(e,t)=>Dx(e,Px(t)),nC=S.createContext({setMethods:()=>{}}),bx=e=>{const{initialProps:t,addUpdateCallback:i,CustomComponentClass:s,setMethods:n}=e,[o,r]=S.useState(t);return S.useEffect(()=>{i(l=>r(l))},[]),_.createElement(nC.Provider,{value:{setMethods:n}},_.createElement(s,Ge({},o)))},Lx=S.memo(bx),Mx=0;function Lw(){return`agPortalKey_${++Mx}`}var TD=class{constructor(e,t,i,s){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=i,this.suppressFallbackMethods=!!s,this.statelessComponent=this.isStateless(this.reactComponent),this.key=Lw(),this.portalKey=Lw(),this.instanceCreated=this.isStatelessComponent()?Ze.resolve(!1):new Ze(n=>{this.resolveInstanceCreated=n})}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){return this.componentInstance&&typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy(),this.portalManager.destroyPortal(this.portal)}createParentElement(e){const t=this.portalManager.getComponentWrappingElement(),i=document.createElement(t||"div");return i.classList.add("ag-react-container"),e.reactContainer=i,i}addParentContainerStyleAndClasses(){this.componentInstance&&(this.componentInstance.getReactContainerStyle&&this.componentInstance.getReactContainerStyle()&&(Q.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()&&(Q.warnOnce('Since v31.1 "getReactContainerClasses" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),this.componentInstance.getReactContainerClasses().forEach(t=>this.eParentElement.classList.add(t))))}statelessComponentRendered(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}getFrameworkComponentInstance(){return this.componentInstance}isStatelessComponent(){return this.statelessComponent}getReactComponentName(){return this.reactComponent.name}getMemoType(){return this.hasSymbol()?Symbol.for("react.memo"):60115}hasSymbol(){return typeof Symbol=="function"&&Symbol.for}isStateless(e){return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===this.getMemoType()}hasMethod(e){const t=this.getFrameworkComponentInstance();return!!t&&t[e]!=null||this.fallbackMethodAvailable(e)}callMethod(e,t){const i=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!i){setTimeout(()=>this.callMethod(e,t));return}const s=i[e];if(s)return s.apply(i,t);if(this.fallbackMethodAvailable(e))return this.fallbackMethod(e,t&&t[0]?t[0]:{})}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.params=e,this.createOrUpdatePortal(e),new Ze(t=>this.createReactComponent(t))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=t=>{var i;this.componentInstance=t,this.addParentContainerStyleAndClasses(),(i=this.resolveInstanceCreated)==null||i.call(this,!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,kt(Ge({},e),{key:this.key})),this.portal=Gf.createPortal(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return S.createElement(e,t)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,t=>{e(t)})}isNullValue(){return this.valueRenderedIsNull(this.params)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!!(!this.isStatelessComponent()&&this.getFrameworkComponentInstance())}valueRenderedIsNull(e){if(!this.componentType.cellRenderer)return!1;const t=console.error;try{return console.error=()=>{},Rx(S.createElement(this.reactComponent,e))===""}catch{}finally{console.error=t}return!1}refreshComponent(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}fallbackMethod(e,t){const i=this[`${e}Component`];if(!this.suppressFallbackMethods&&i)return i.bind(this)(t)}fallbackMethodAvailable(e){return this.suppressFallbackMethods?!1:!!this[`${e}Component`]}};function oC(e,t,i){e.forEach(s=>{const n=t[s];n&&(i[s]=n)})}var Gn=class extends TD{constructor(){super(...arguments),this.awaitUpdateCallback=new Ze(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=Lx}init(e){return this.sourceParams=e,super.init(this.getProps())}addMethod(){}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}getFrameworkComponentInstance(){return this}createElement(e,t){return super.createElement(this.wrapperComponent,{initialProps:t,CustomComponentClass:e,setMethods:i=>this.setMethods(i),addUpdateCallback:i=>{this.updateCallback=()=>(i(this.getProps()),new Ze(s=>{setTimeout(()=>{s()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,oC(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return kt(Ge({},this.sourceParams),{key:this.key,ref:this.ref})}refreshProps(){return this.updateCallback?this.updateCallback():new Ze(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},Ix=class extends Gn{constructor(){super(...arguments),this.date=null,this.onDateChange=e=>this.updateDate(e)}getDate(){return this.date}setDate(e){this.date=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled"]}updateDate(e){this.setDate(e),this.sourceParams.onDateChanged()}getProps(){const e=super.getProps();return e.date=this.date,e.onDateChange=this.onDateChange,delete e.onDateChanged,e}},xx=class extends Gn{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterChangedCallback()}isFilterActive(){return this.model!=null}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.model=e,this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getOptionalMethods(){return["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}updateModel(e){this.setModel(e).then(()=>this.sourceParams.filterChangedCallback())}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e.onUiChange=this.onUiChange,delete e.filterChangedCallback,delete e.filterModifiedCallback,delete e.valueGetter,e}};function DD(e,t){e.parentFilterInstance(i=>{(i.setModel(t)||Ze.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var Nx=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=i=>this.updateModel(i)}getProps(){return kt(Ge({},this.floatingFilterParams),{model:this.model,onModelChange:this.onModelChange})}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){oC(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),DD(this.floatingFilterParams,e)}},_x=class extends Gn{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e)}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),DD(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},Ox=class extends Gn{refresh(e){this.sourceParams=e,this.refreshProps()}},Gx=class extends Gn{constructor(){super(...arguments),this.active=!1,this.expanded=!1,this.onActiveChange=e=>this.updateActive(e)}setActive(e){this.awaitSetActive(e)}setExpanded(e){this.expanded=e,this.refreshProps()}getOptionalMethods(){return["select","configureDefaults"]}awaitSetActive(e){return this.active=e,this.refreshProps()}updateActive(e){const t=this.awaitSetActive(e);e&&t.then(()=>this.sourceParams.onItemActivated())}getProps(){const e=super.getProps();return e.active=this.active,e.expanded=this.expanded,e.onActiveChange=this.onActiveChange,delete e.onItemActivated,e}},kx=class extends Gn{refresh(e){this.sourceParams=e,this.refreshProps()}},Vx=class extends Gn{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},Hx=class extends Gn{constructor(){super(...arguments),this.onStateChange=e=>this.updateState(e)}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getState(){return this.state}updateState(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}getProps(){const e=super.getProps();return e.state=this.state,e.onStateChange=this.onStateChange,e}},PD=class FD{constructor(t,i,s){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=i||"div",this.refresher=t,this.maxComponentCreationTimeMs=s||FD.MAX_COMPONENT_CREATION_TIME_IN_MS}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(t){this.portals=this.portals.filter(i=>i!==t),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(t,i,s){this.portals=[...this.portals,t],this.waitForInstance(i,s),this.batchUpdate()}updateReactPortal(t,i){this.portals[this.portals.indexOf(t)]=i,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||(setTimeout(()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)}),this.hasPendingPortalUpdate=!0)}waitForInstance(t,i,s=Date.now()){if(this.destroyed){i(null);return}if(t.rendered())i(t);else{if(Date.now()-s>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate){if(t.isNullValue()){i(t);return}console.error(`AG Grid: React Component '${t.getReactComponentName()}' not created within ${this.maxComponentCreationTimeMs}ms.`),console.error(" If the component is using `forwardRef` but not `useImperativeHandle`, add the following: `useImperativeHandle(ref, () => ({}));`");return}window.setTimeout(()=>{this.waitForInstance(t,i,s)})}}};PD.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3;var Bx=PD,Kt=_.createContext({}),ji=(...e)=>e.filter(i=>i!=null&&i!=="").join(" "),Mi=class AD{constructor(...t){this.classesMap={},t.forEach(i=>{this.classesMap[i]=!0})}setClass(t,i){if(!!this.classesMap[t]==i)return this;const n=new AD;return n.classesMap=Ge({},this.classesMap),n.classesMap[t]=i,n}toString(){return Object.keys(this.classesMap).filter(i=>this.classesMap[i]).join(" ")}},rl=e=>{const t=()=>typeof Symbol=="function"&&Symbol.for,i=()=>t()?Symbol.for("react.memo"):60115;return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===i()},Wx=sg.createRoot!=null&&sg.flushSync!=null,ld=!1;function Ux(e){return ld||setTimeout(()=>ld=!1,0),ld=!0,e()}var rC=(e,t)=>{Wx&&e&&!ld?sg.flushSync(t):t()};function lC(e,t,i){if(t==null||e==null)return t;if(e===t||t.length===0&&e.length===0)return e;if(i||e.length===0&&t.length>0||e.length>0&&t.length===0)return t;const s=[],n=[],o=new Map,r=new Map;for(let l=0;l<t.length;l++){const a=t[l];r.set(a.getInstanceId(),a)}for(let l=0;l<e.length;l++){const a=e[l];o.set(a.getInstanceId(),a),r.has(a.getInstanceId())&&s.push(a)}for(let l=0;l<t.length;l++){const a=t[l],u=a.getInstanceId();o.has(u)||n.push(a)}return s.length===e.length&&n.length===0?e:s.length===0&&n.length===t.length?t:s.length===0?n:n.length===0?s:[...s,...n]}var ru=(e,t,i,s)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const o=e.newAgStackInstance();if(!o)return;let r,l,a=!1;return o.then(u=>{if(a){t.destroyBean(u);return}r=u,l=r.getGui(),i.appendChild(l),Mw(s,r)}),()=>{a=!0,r&&(l&&l.parentElement&&l.parentElement.removeChild(l),t.destroyBean(r),s&&Mw(s,void 0))}},Mw=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const i=e;i.current=t}},zx=e=>{const t=e.newAgStackInstance();if(t)return t.resolveNow(null,i=>i)},bD=S.forwardRef((e,t)=>{var i;const s=S.useContext(Kt).context,n=S.useRef(null),o=S.useRef(null),r=S.useRef(null),l=S.useRef(null),a=S.useRef(null),u=S.useRef(),[d,h]=S.useState(),[p,C]=S.useState(),[v,y]=S.useState(),[R,w]=S.useState(()=>new Mi),[m,E]=S.useState(()=>new Mi("ag-hidden")),[T,P]=S.useState(()=>new Mi("ag-hidden")),[A,F]=S.useState(()=>new Mi("ag-invisible"));S.useImperativeHandle(t,()=>({refresh(){return!1}})),S.useLayoutEffect(()=>ru(d,s,o.current),[d]);const I=S.useCallback(me=>{if(n.current=me,!n.current){s.destroyBean(u.current),u.current=null;return}const O={setInnerRenderer:(V,W)=>{h(V),y(W)},setChildCount:V=>C(V),addOrRemoveCssClass:(V,W)=>w(te=>te.setClass(V,W)),setContractedDisplayed:V=>P(W=>W.setClass("ag-hidden",!V)),setExpandedDisplayed:V=>E(W=>W.setClass("ag-hidden",!V)),setCheckboxVisible:V=>F(W=>W.setClass("ag-invisible",!V))};u.current=s.createBean(new xo),u.current.init(O,n.current,r.current,l.current,a.current,bD,e)},[]),x=S.useMemo(()=>`ag-cell-wrapper ${R.toString()}`,[R]),k=S.useMemo(()=>`ag-group-expanded ${m.toString()}`,[m]),U=S.useMemo(()=>`ag-group-contracted ${T.toString()}`,[T]),ee=S.useMemo(()=>`ag-group-checkbox ${A.toString()}`,[A]),Y=d&&d.componentFromFramework,ye=Y?d.componentClass:void 0,Re=d==null&&v!=null,De=Q.escapeString(v,!0);return _.createElement("span",Ge({className:x,ref:I},e.colDef?{}:{role:(i=u.current)==null?void 0:i.getCellAriaRole()}),_.createElement("span",{className:k,ref:l}),_.createElement("span",{className:U,ref:a}),_.createElement("span",{className:ee,ref:r}),_.createElement("span",{className:"ag-group-value",ref:o},Re&&_.createElement(_.Fragment,null,De),Y&&_.createElement(ye,Ge({},d.params))),_.createElement("span",{className:"ag-group-child-count"},p))}),Iw=bD,$x=e=>{const{ctrl:t}=e,i=t.isAlive(),{context:s}=S.useContext(Kt),n=i?t.getColId():void 0,[o,r]=S.useState(),l=S.useRef(null),a=S.useRef(null),u=S.useRef(null),d=S.useRef();let h=S.useRef();i&&!h.current&&(h.current=new Ka(()=>l.current));const p=S.useCallback(R=>{var w;if(l.current=R,!l.current||!i)return;const m={setWidth:T=>{l.current&&(l.current.style.width=T)},addOrRemoveCssClass:(T,P)=>h.current.addOrRemoveCssClass(T,P),setAriaSort:T=>{l.current&&(T?Q.setAriaSort(l.current,T):Q.removeAriaSort(l.current))},setUserCompDetails:T=>r(T),getUserCompInstance:()=>d.current||void 0};t.setComp(m,l.current,a.current,u.current);const E=t.getSelectAllGui();(w=a.current)==null||w.insertAdjacentElement("afterend",E)},[]);S.useLayoutEffect(()=>ru(o,s,u.current,d),[o]),S.useEffect(()=>{t.setDragSource(l.current)},[o]);const C=S.useMemo(()=>!!((o==null?void 0:o.componentFromFramework)&&rl(o.componentClass)),[o]),v=o&&o.componentFromFramework,y=o&&o.componentClass;return _.createElement("div",{ref:p,className:"ag-header-cell","col-id":n,role:"columnheader"},_.createElement("div",{ref:a,className:"ag-header-cell-resize",role:"presentation"}),_.createElement("div",{ref:u,className:"ag-header-cell-comp-wrapper",role:"presentation"},v&&C&&_.createElement(y,Ge({},o.params)),v&&!C&&_.createElement(y,kt(Ge({},o.params),{ref:d}))))},Kx=S.memo($x),jx=e=>{const{context:t}=S.useContext(Kt),{ctrl:i}=e,[s,n]=S.useState(()=>new Mi),[o,r]=S.useState(()=>new Mi),[l,a]=S.useState("false"),[u,d]=S.useState(),[h,p]=S.useState(),C=S.useMemo(()=>i.getColId(),[]),v=S.useRef(null),y=S.useRef(null),R=S.useRef(),w=S.useCallback(F=>{if(v.current=F,!v.current)return;const I={setWidth:x=>{v.current&&(v.current.style.width=x)},addOrRemoveCssClass:(x,k)=>n(U=>U.setClass(x,k)),setUserCompDetails:x=>p(x),setResizableDisplayed:x=>{r(k=>k.setClass("ag-hidden",!x)),a(x?"false":"true")},setAriaExpanded:x=>d(x),getUserCompInstance:()=>R.current||void 0};i.setComp(I,v.current,y.current)},[]);S.useLayoutEffect(()=>ru(h,t,v.current),[h]),S.useEffect(()=>{v.current&&i.setDragSource(v.current)},[h]);const m=S.useMemo(()=>!!((h==null?void 0:h.componentFromFramework)&&rl(h.componentClass)),[h]),E=S.useMemo(()=>"ag-header-group-cell "+s.toString(),[s]),T=S.useMemo(()=>"ag-header-cell-resize "+o.toString(),[o]),P=h&&h.componentFromFramework,A=h&&h.componentClass;return _.createElement("div",{ref:w,className:E,"col-id":C,role:"columnheader","aria-expanded":u},P&&m&&_.createElement(A,Ge({},h.params)),P&&!m&&_.createElement(A,kt(Ge({},h.params),{ref:R})),_.createElement("div",{ref:y,"aria-hidden":l,className:T}))},Yx=S.memo(jx);function aC(){Q.warnOnce("Using custom components without `reactiveCustomComponents = true` is deprecated.")}var Qx=e=>{const{context:t,gos:i}=S.useContext(Kt),[s,n]=S.useState(()=>new Mi("ag-header-cell","ag-floating-filter")),[o,r]=S.useState(()=>new Mi),[l,a]=S.useState(()=>new Mi("ag-floating-filter-button","ag-hidden")),[u,d]=S.useState("false"),[h,p]=S.useState(),[C,v]=S.useState(1),y=S.useRef(null),R=S.useRef(null),w=S.useRef(null),m=S.useRef(null),E=S.useRef(),T=S.useRef(),P=me=>{me!=null&&E.current&&E.current(me)},{ctrl:A}=e,F=S.useCallback(me=>{if(y.current=me,!y.current)return;T.current=new Ze(V=>{E.current=V});const O={addOrRemoveCssClass:(V,W)=>n(te=>te.setClass(V,W)),addOrRemoveBodyCssClass:(V,W)=>r(te=>te.setClass(V,W)),setButtonWrapperDisplayed:V=>{a(W=>W.setClass("ag-hidden",!V)),d(V?"false":"true")},setWidth:V=>{y.current&&(y.current.style.width=V)},setCompDetails:V=>p(V),getFloatingFilterComp:()=>T.current?T.current:null,setMenuIcon:V=>{var W;return(W=m.current)==null?void 0:W.appendChild(V)}};A.setComp(O,y.current,m.current,R.current)},[]);S.useLayoutEffect(()=>ru(h,t,R.current,P),[h]);const I=S.useMemo(()=>s.toString(),[s]),x=S.useMemo(()=>o.toString(),[o]),k=S.useMemo(()=>l.toString(),[l]),U=S.useMemo(()=>!!(h&&h.componentFromFramework&&rl(h.componentClass)),[h]),ee=S.useMemo(()=>i.get("reactiveCustomComponents"),[]),Y=S.useMemo(()=>{if(h)if(ee){const me=new Nx(h.params,()=>v(O=>O+1));return P(me),me}else h.componentFromFramework&&aC()},[h]),ye=Y==null?void 0:Y.getProps(),Re=h&&h.componentFromFramework,De=h&&h.componentClass;return _.createElement("div",{ref:F,className:I,role:"gridcell"},_.createElement("div",{ref:R,className:x,role:"presentation"},Re&&!ee&&_.createElement(De,kt(Ge({},h.params),{ref:U?()=>{}:P})),Re&&ee&&_.createElement(nC.Provider,{value:{setMethods:me=>Y.setMethods(me)}},_.createElement(De,Ge({},ye)))),_.createElement("div",{ref:w,"aria-hidden":u,className:k,role:"presentation"},_.createElement("button",{ref:m,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},qx=S.memo(Qx),Xx=e=>{const{ctrl:t}=e,{topOffset:i,rowHeight:s}=S.useMemo(()=>t.getTopAndHeight(),[]),n=t.getAriaRowIndex(),o=t.getHeaderRowClass(),[r,l]=S.useState(()=>s+"px"),[a,u]=S.useState(()=>i+"px"),d=S.useRef(null),h=S.useRef(null),[p,C]=S.useState(()=>t.getHeaderCtrls()),v=S.useRef(null),y=S.useCallback(m=>{if(v.current=m,!m)return;const E={setHeight:T=>l(T),setTop:T=>u(T),setHeaderCtrls:(T,P,A)=>{h.current=d.current,d.current=T;const F=lC(h.current,T,P);F!==h.current&&rC(A,()=>C(F))},setWidth:T=>{v.current&&(v.current.style.width=T)}};t.setComp(E,!1)},[]),R=S.useMemo(()=>({height:r,top:a}),[r,a]),w=S.useCallback(m=>{switch(t.getType()){case Sg.COLUMN_GROUP:return _.createElement(Yx,{ctrl:m,key:m.getInstanceId()});case Sg.FLOATING_FILTER:return _.createElement(qx,{ctrl:m,key:m.getInstanceId()});default:return _.createElement(Kx,{ctrl:m,key:m.getInstanceId()})}},[]);return _.createElement("div",{ref:y,className:o,role:"row",style:R,"aria-rowindex":n},p.map(w))},Zx=S.memo(Xx),Jx=e=>{const[t,i]=S.useState(!0),[s,n]=S.useState([]),{context:o}=S.useContext(Kt),r=S.useRef(null),l=S.useRef(null),a=S.useRef(null),u=e.pinned==="left",d=e.pinned==="right",h=!u&&!d,p=S.useCallback(y=>{if(r.current=y,!r.current){o.destroyBean(a.current),a.current=null;return}const R={setDisplayed:i,setCtrls:w=>n(w),setCenterWidth:w=>{l.current&&(l.current.style.width=w)},setViewportScrollLeft:w=>{r.current&&(r.current.scrollLeft=w)},setPinnedContainerWidth:w=>{r.current&&(r.current.style.width=w,r.current.style.minWidth=w,r.current.style.maxWidth=w)}};a.current=o.createBean(new Mn(e.pinned)),a.current.setComp(R,r.current)},[]),C=t?"":"ag-hidden",v=()=>s.map(y=>_.createElement(Zx,{ctrl:y,key:y.getInstanceId()}));return _.createElement(_.Fragment,null,u&&_.createElement("div",{ref:p,className:"ag-pinned-left-header "+C,"aria-hidden":!t,role:"rowgroup"},v()),d&&_.createElement("div",{ref:p,className:"ag-pinned-right-header "+C,"aria-hidden":!t,role:"rowgroup"},v()),h&&_.createElement("div",{ref:p,className:"ag-header-viewport "+C,role:"presentation"},_.createElement("div",{ref:l,className:"ag-header-container",role:"rowgroup"},v())))},dp=S.memo(Jx),eN=()=>{const[e,t]=S.useState(()=>new Mi),[i,s]=S.useState(),{context:n}=S.useContext(Kt),o=S.useRef(null),r=S.useRef(null),l=S.useCallback(d=>{if(o.current=d,!d){n.destroyBean(r.current),r.current=null;return}const h={addOrRemoveCssClass:(p,C)=>t(v=>v.setClass(p,C)),setHeightAndMinHeight:p=>s(p)};r.current=n.createBean(new In),r.current.setComp(h,o.current,o.current)},[]),a=S.useMemo(()=>"ag-header "+e.toString(),[e]),u=S.useMemo(()=>({height:i,minHeight:i}),[i]);return _.createElement("div",{ref:l,className:a,style:u,role:"presentation"},_.createElement(dp,{pinned:"left"}),_.createElement(dp,{pinned:null}),_.createElement(dp,{pinned:"right"}))},tN=S.memo(eN),iN=(e,t)=>{S.useEffect(()=>{const i=t.current;if(i){const s=i.parentElement;if(s){const n=document.createComment(e);return s.insertBefore(n,i),()=>{s.removeChild(n)}}}},[e])},jn=iN,sN=e=>{const t=S.useRef(e),i=S.useRef(),s=S.useRef(!1),n=S.useRef(!1),[,o]=S.useState(0);s.current&&(n.current=!0),S.useEffect(()=>(s.current||(i.current=t.current(),s.current=!0),o(r=>r+1),()=>{n.current&&i.current&&i.current()}),[])},nN=e=>{const[t,i]=S.useState(),{context:s,popupService:n,localeService:o,gos:r}=S.useContext(Kt);return sN(()=>{const{editDetails:l,cellCtrl:a,eParentCell:u}=e,{compDetails:d}=l,h=r.get("stopEditingWhenCellsLoseFocus"),p=s.createBean(new aT(d.params)),C=p.getGui();if(e.jsChildComp){const E=e.jsChildComp.getGui();E&&C.appendChild(E)}const v={column:a.getColumn(),rowNode:a.getRowNode(),type:"popupCellEditor",eventSource:u,ePopup:C,position:l.popupPosition,keepWithinBounds:!0},y=n.positionPopupByComponent.bind(n,v),R=o.getLocaleTextFunc(),w=n.addPopup({modal:h,eChild:C,closeOnEsc:!0,closedCallback:()=>{a.onPopupEditorClosed()},anchorToElement:u,positionCallback:y,ariaLabel:R("ariaLabelCellEditor","Cell Editor")}),m=w?w.hideFunc:void 0;return i(p),e.jsChildComp&&e.jsChildComp.afterGuiAttached&&e.jsChildComp.afterGuiAttached(),()=>{m!=null&&m(),s.destroyBean(p)}}),_.createElement(_.Fragment,null,t&&e.wrappedContent&&Gf.createPortal(e.wrappedContent,t.getGui()))},xw=S.memo(nN),oN=(e,t,i,s,n,o)=>{const{context:r}=S.useContext(Kt),l=S.useCallback(()=>{const a=n.current;if(!a)return;const u=a.getGui();u&&u.parentElement&&u.parentElement.removeChild(u),r.destroyBean(a),n.current=void 0},[]);S.useEffect(()=>{const a=e!=null,u=e&&e.compDetails&&!e.compDetails.componentFromFramework,d=t&&i==null;if(!(a&&u&&!d)){l();return}const p=e.compDetails;if(n.current){const w=n.current,E=w.refresh!=null&&e.force==!1?w.refresh(p.params):!1;if(E===!0||E===void 0)return;l()}const C=p.newAgStackInstance();if(!C)return;const v=C.resolveNow(null,w=>w);if(!v)return;const y=v.getGui();if(!y)return;(t?i:o.current).appendChild(y),n.current=v},[e,t,s]),S.useEffect(()=>l,[])},rN=oN,lN=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new Ze(i=>{this.resolveInstanceCreated=i}),this.onValueChange=i=>this.updateValue(i),this.value=e.value}getProps(){return kt(Ge({},this.cellEditorParams),{initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange})}getValue(){return this.value}refresh(e){this.cellEditorParams=e,this.refreshProps()}setMethods(e){oC(this.getOptionalMethods(),e,this)}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}setRef(e){var t;this.componentInstance=e,(t=this.resolveInstanceCreated)==null||t.call(this),this.resolveInstanceCreated=void 0}getOptionalMethods(){return["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached"]}updateValue(e){this.value=e,this.refreshProps()}},aN=(e,t,i)=>{const s=i.getColumn();if(!e&&t.isPopup&&t.isPopup()){const n=`AG Grid: Found an issue in column ${s.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.`;Q.doOnce(()=>console.warn(n),"jsEditorComp-isPopup-"+i.getColumn().getColId())}if(e&&t.getPopupPosition&&t.getPopupPosition()!=null){const n=`AG Grid: Found an issue in column ${s.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.`;Q.doOnce(()=>console.warn(n),"jsEditorComp-getPopupPosition-"+i.getColumn().getColId())}},uN=(e,t,i)=>{const{compProxy:s}=e;i(s);const n=s.getProps(),o=rl(t);return _.createElement(nC.Provider,{value:{setMethods:r=>s.setMethods(r)}},o&&_.createElement(t,Ge({},n)),!o&&_.createElement(t,kt(Ge({},n),{ref:r=>s.setRef(r)})))},Nw=(e,t,i)=>{const s=e.compProxy;return _.createElement(_.Fragment,null,!s&&_.createElement(t,kt(Ge({},e.compDetails.params),{ref:i})),s&&uN(e,t,i))},dN=(e,t,i,s,n,o)=>{const r=e.compDetails,l=r.componentClass,a=r.componentFromFramework&&!e.popup,u=r.componentFromFramework&&e.popup,d=!r.componentFromFramework&&e.popup;return _.createElement(_.Fragment,null,a&&Nw(e,l,t),u&&_.createElement(xw,{editDetails:e,cellCtrl:n,eParentCell:s,wrappedContent:Nw(e,l,i)}),d&&o&&_.createElement(xw,{editDetails:e,cellCtrl:n,eParentCell:s,jsChildComp:o}))},cN=(e,t,i,s,n,o,r)=>{const{compDetails:l,value:a}=e,u=!l,d=l&&l.componentFromFramework,h=l&&l.componentClass,p=a!=null&&a.toString?a.toString():a,C=()=>_.createElement(_.Fragment,null,u&&_.createElement(_.Fragment,null,p),d&&!o&&_.createElement(h,kt(Ge({},l.params),{key:t,ref:s})),d&&o&&_.createElement(h,kt(Ge({},l.params),{key:t})));return _.createElement(_.Fragment,null,n?_.createElement("span",{role:"presentation",id:`cell-${i}`,className:"ag-cell-value",ref:r},C()):C())},hN=e=>{const{context:t}=S.useContext(Kt),{cellCtrl:i,printLayout:s,editingRow:n}=e,o=i.getTabIndex(),r=i.getColumnIdSanitised(),l=i.getInstanceId(),[a,u]=S.useState(()=>i.isCellRenderer()?void 0:{compDetails:void 0,value:i.getValueToDisplay(),force:!1}),[d,h]=S.useState(),[p,C]=S.useState(1),[v,y]=S.useState(),[R,w]=S.useState(!1),[m,E]=S.useState(!1),[T,P]=S.useState(!1),[A,F]=S.useState(),I=S.useMemo(()=>i.isForceWrapper(),[i]),x=S.useMemo(()=>i.getCellAriaRole(),[i]),k=S.useRef(null),U=S.useRef(null),ee=S.useRef(),Y=S.useRef(),ye=S.useRef(),Re=S.useRef([]),De=S.useRef(),[me,O]=S.useState(0),V=S.useCallback($e=>{De.current=$e,O(Ye=>Ye+1)},[]),W=a!=null&&(R||T||m),te=I||W,X=S.useCallback(($e,Ye)=>{Y.current=Ye,Ye&&(aN($e,Ye,i),Ye.isCancelBeforeStart&&Ye.isCancelBeforeStart()&&setTimeout(()=>{i.stopEditing(!0),i.focusCell(!0)}))},[i]),Ce=S.useCallback($e=>X(!0,$e),[X]),dt=S.useCallback($e=>X(!1,$e),[X]);let ve=S.useRef();ve.current||(ve.current=new Ka(()=>k.current)),rN(a,te,De.current,me,ee,k);const et=S.useRef();S.useLayoutEffect(()=>{const $e=et.current,Ye=a;if(et.current=a,$e==null||$e.compDetails==null||Ye==null||Ye.compDetails==null)return;const nt=$e.compDetails,ce=Ye.compDetails;if(nt.componentClass!=ce.componentClass||U.current==null||U.current.refresh==null)return;U.current.refresh(ce.params)!=!0&&C(Bi=>Bi+1)},[a]),S.useLayoutEffect(()=>{if(!(d&&!d.compDetails.componentFromFramework))return;const Ye=d.compDetails,nt=d.popup===!0,ce=zx(Ye);if(!ce)return;const ot=ce.getGui();if(X(nt,ce),!nt){const Bi=(I?ye:k).current;Bi==null||Bi.appendChild(ot),ce.afterGuiAttached&&ce.afterGuiAttached()}return F(ce),()=>{t.destroyBean(ce),X(nt,void 0),F(void 0),ot&&ot.parentElement&&ot.parentElement.removeChild(ot)}},[d]);const ze=S.useCallback($e=>{if(ye.current=$e,!ye.current){Re.current.forEach(nt=>nt()),Re.current=[];return}const Ye=nt=>{var ce;if(nt){const ot=nt.getGui();(ce=ye.current)==null||ce.insertAdjacentElement("afterbegin",ot),Re.current.push(()=>{t.destroyBean(nt),Q.removeFromParent(ot)})}return nt};if(R){const nt=i.createSelectionCheckbox();Ye(nt)}T&&Ye(i.createDndSource()),m&&Ye(i.createRowDragComp())},[i,t,T,m,R]),Ts=S.useCallback($e=>{if(k.current=$e,!k.current||!i)return;const Ye={addOrRemoveCssClass:(ce,ot)=>ve.current.addOrRemoveCssClass(ce,ot),setUserStyles:ce=>y(ce),getFocusableElement:()=>k.current,setIncludeSelection:ce=>w(ce),setIncludeRowDrag:ce=>E(ce),setIncludeDndSource:ce=>P(ce),getCellEditor:()=>Y.current||null,getCellRenderer:()=>U.current?U.current:ee.current,getParentOfValue:()=>De.current?De.current:ye.current?ye.current:k.current,setRenderDetails:(ce,ot,Bi)=>{u(Wi=>(Wi==null?void 0:Wi.compDetails)!==ce||(Wi==null?void 0:Wi.value)!==ot||(Wi==null?void 0:Wi.force)!==Bi?{value:ot,compDetails:ce,force:Bi}:Wi)},setEditDetails:(ce,ot,Bi,Wi)=>{if(ce){let kn;Wi?kn=new lN(ce.params,()=>C(dh=>dh+1)):ce.componentFromFramework&&aC(),h({compDetails:ce,popup:ot,popupPosition:Bi,compProxy:kn}),ot||u(void 0)}else h(kn=>{kn!=null&&kn.compProxy&&(Y.current=void 0)})}},nt=ye.current||void 0;i.setComp(Ye,k.current,nt,s,n)},[]),Bo=S.useMemo(()=>!!(a&&a.compDetails&&a.compDetails.componentFromFramework&&rl(a.compDetails.componentClass)),[a]);S.useLayoutEffect(()=>{var $e;k.current&&(ve.current.addOrRemoveCssClass("ag-cell-value",!te),ve.current.addOrRemoveCssClass("ag-cell-inline-editing",!!d&&!d.popup),ve.current.addOrRemoveCssClass("ag-cell-popup-editing",!!d&&!!d.popup),ve.current.addOrRemoveCssClass("ag-cell-not-inline-editing",!d||!!d.popup),($e=i.getRowCtrl())==null||$e.setInlineEditingCss(!!d),i.shouldRestoreFocus()&&!i.isEditing()&&k.current.focus({preventScroll:!0}))});const lu=()=>_.createElement(_.Fragment,null,a!=null&&cN(a,p,l,U,te,Bo,V),d!=null&&dN(d,dt,Ce,k.current,i,A));return _.createElement("div",{ref:Ts,style:v,tabIndex:o,role:x,"col-id":r},te?_.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:ze},lu()):lu())},pN=S.memo(hN),gN=e=>{const{context:t,gos:i}=S.useContext(Kt),{rowCtrl:s,containerType:n}=e,o=s.getTabIndex(),r=S.useRef(s.getDomOrder()),l=s.isFullWidth(),a=s.getRowNode().displayed,[u,d]=S.useState(()=>a?s.getRowIndex():null),[h,p]=S.useState(()=>s.getRowId()),[C,v]=S.useState(()=>s.getBusinessKey()),[y,R]=S.useState(()=>s.getRowStyles()),w=S.useRef(null),m=S.useRef(null),[E,T]=S.useState(()=>null),[P,A]=S.useState(),[F,I]=S.useState(()=>a?s.getInitialRowTop(n):void 0),[x,k]=S.useState(()=>a?s.getInitialTransform(n):void 0),U=S.useRef(null),ee=S.useRef(),Y=S.useRef(!1),[ye,Re]=S.useState(0);S.useEffect(()=>{var ve;if(Y.current||!P||ye>10)return;const et=(ve=U.current)==null?void 0:ve.firstChild;et?(s.setupDetailRowAutoHeight(et),Y.current=!0):Re(ze=>ze+1)},[P,ye]);let De=S.useRef();De.current||(De.current=new Ka(()=>U.current));const me=S.useCallback(ve=>{if(U.current=ve,!U.current){s.unsetComp(n);return}if(!s.isAlive())return;const et={setTop:I,setTransform:k,addOrRemoveCssClass:(ze,Ts)=>De.current.addOrRemoveCssClass(ze,Ts),setDomOrder:ze=>r.current=ze,setRowIndex:d,setRowId:p,setRowBusinessKey:v,setUserStyles:R,setCellCtrls:(ze,Ts)=>{m.current=w.current,w.current=ze;const Bo=lC(m.current,ze,r.current);Bo!==m.current&&rC(Ts,()=>T(Bo))},showFullWidth:ze=>A(ze),getFullWidthCellRenderer:()=>ee.current,refreshFullWidth:ze=>X.current?(A(Ts=>kt(Ge({},Ts),{params:ze()})),!0):!ee.current||!ee.current.refresh?!1:ee.current.refresh(ze())};s.setComp(et,U.current,n)},[]);S.useLayoutEffect(()=>ru(P,t,U.current,ee),[P]);const O=S.useMemo(()=>{const ve={top:F,transform:x};return Object.assign(ve,y),ve},[F,x,y]),V=l&&P&&P.componentFromFramework,W=!l&&E!=null,te=S.useMemo(()=>!!((P==null?void 0:P.componentFromFramework)&&rl(P.componentClass)),[P]),X=S.useRef(!1);S.useEffect(()=>{X.current=te&&!!P&&!!i.get("reactiveCustomComponents")},[te,P]);const Ce=()=>E==null?void 0:E.map(ve=>_.createElement(pN,{cellCtrl:ve,editingRow:s.isEditing(),printLayout:s.isPrintLayout(),key:ve.getInstanceId()})),dt=()=>{const ve=P.componentClass;return _.createElement(_.Fragment,null,te&&_.createElement(ve,Ge({},P.params)),!te&&_.createElement(ve,kt(Ge({},P.params),{ref:ee})))};return _.createElement("div",{ref:me,role:"row",style:O,"row-index":u,"row-id":h,"row-business-key":C,tabIndex:o},W&&Ce(),V&&dt())},fN=S.memo(gN),mN=e=>{const{context:t}=S.useContext(Kt),{name:i}=e,s=S.useMemo(()=>oT(i),[i]),n=S.useRef(null),o=S.useRef(null),r=S.useRef([]),l=S.useRef([]),[a,u]=S.useState(()=>[]),d=S.useRef(!1),h=S.useRef(),p=S.useMemo(()=>Ud.getRowContainerCssClasses(i),[i]),C=S.useMemo(()=>ji(p.viewport),[p]),v=S.useMemo(()=>ji(p.container),[p]),y=i===Fe.CENTER||i===Fe.TOP_CENTER||i===Fe.BOTTOM_CENTER||i===Fe.STICKY_TOP_CENTER||i===Fe.STICKY_BOTTOM_CENTER,R=y?n:o;jn(" AG Row Container "+i+" ",R);const w=S.useCallback(()=>y?n.current!=null&&o.current!=null:o.current!=null,[]),m=S.useCallback(()=>y?n.current==null&&o.current==null:o.current==null,[]),E=S.useCallback(()=>{if(m()&&(t.destroyBean(h.current),h.current=null),w()){const F=x=>{const k=lC(l.current,r.current,d.current);k!==l.current&&(l.current=k,rC(x,()=>u(k)))},I={setViewportHeight:x=>{n.current&&(n.current.style.height=x)},setRowCtrls:({rowCtrls:x,useFlushSync:k})=>{const U=!!k&&r.current.length>0&&x.length>0;r.current=x,F(U)},setDomOrder:x=>{d.current!=x&&(d.current=x,F(!1))},setContainerWidth:x=>{o.current&&(o.current.style.width=x)}};h.current=t.createBean(new Ud(i)),h.current.setComp(I,o.current,n.current)}},[w,m]),T=S.useCallback(F=>{o.current=F,E()},[E]),P=S.useCallback(F=>{n.current=F,E()},[E]),A=()=>_.createElement("div",{className:v,ref:T,role:"rowgroup"},a.map(F=>_.createElement(fN,{rowCtrl:F,containerType:s,key:F.getInstanceId()})));return _.createElement(_.Fragment,null,y?_.createElement("div",{className:C,ref:P,role:"presentation"},A()):A())},CN=S.memo(mN),vN=()=>{const{context:e,agStackComponentsRegistry:t,resizeObserverService:i}=S.useContext(Kt),[s,n]=S.useState(""),[o,r]=S.useState(0),[l,a]=S.useState(0),[u,d]=S.useState("0px"),[h,p]=S.useState("0px"),[C,v]=S.useState("100%"),[y,R]=S.useState("0px"),[w,m]=S.useState("0px"),[E,T]=S.useState("100%"),[P,A]=S.useState(""),[F,I]=S.useState(""),[x,k]=S.useState(null),[U,ee]=S.useState(""),[Y,ye]=S.useState(null),[Re,De]=S.useState("ag-layout-normal");let me=S.useRef();me.current||(me.current=new Ka(()=>O.current));const O=S.useRef(null),V=S.useRef(null),W=S.useRef(null),te=S.useRef(null),X=S.useRef(null),Ce=S.useRef(null),dt=S.useRef(null),ve=S.useRef([]),et=S.useRef([]);jn(" AG Grid Body ",O),jn(" AG Pinned Top ",V),jn(" AG Sticky Top ",W),jn(" AG Middle ",Ce),jn(" AG Pinned Bottom ",dt);const ze=S.useCallback(Wo=>{if(O.current=Wo,!O.current){e.destroyBeans(ve.current),et.current.forEach(ct=>ct()),ve.current=[],et.current=[];return}if(!e)return;const al=ct=>{const os=t.getComponentClass(ct),dC=e.createBean(new os);return ve.current.push(dC),dC},Ys=(ct,os)=>{ct.appendChild(os),et.current.push(()=>ct.removeChild(os))};Ys(O.current,document.createComment(" AG Fake Horizontal Scroll ")),Ys(O.current,al("AG-FAKE-HORIZONTAL-SCROLL").getGui()),Ys(O.current,document.createComment(" AG Overlay Wrapper ")),Ys(O.current,al("AG-OVERLAY-WRAPPER").getGui()),X.current&&(Ys(X.current,document.createComment(" AG Fake Vertical Scroll ")),Ys(X.current,al("AG-FAKE-VERTICAL-SCROLL").getGui()));const ch={setRowAnimationCssOnBodyViewport:n,setColumnCount:ct=>{O.current&&Q.setAriaColCount(O.current,ct)},setRowCount:ct=>{O.current&&Q.setAriaRowCount(O.current,ct)},setTopHeight:r,setBottomHeight:a,setStickyTopHeight:d,setStickyTopTop:p,setStickyTopWidth:v,setTopDisplay:A,setBottomDisplay:I,setColumnMovingCss:(ct,os)=>me.current.addOrRemoveCssClass(ct,os),updateLayoutClasses:De,setAlwaysVerticalScrollClass:k,setPinnedTopBottomOverflowY:ee,setCellSelectableCss:(ct,os)=>ye(os?ct:null),setBodyViewportWidth:ct=>{Ce.current&&(Ce.current.style.width=ct)},registerBodyViewportResizeListener:ct=>{if(Ce.current){const os=i.observeResize(Ce.current,ct);et.current.push(()=>os())}},setStickyBottomHeight:R,setStickyBottomBottom:m,setStickyBottomWidth:T},uC=e.createBean(new Mt);ve.current.push(uC),uC.setComp(ch,O.current,Ce.current,V.current,dt.current,W.current,te.current)},[]),Ts=S.useMemo(()=>ji("ag-root","ag-unselectable",Re),[Re]),Bo=S.useMemo(()=>ji("ag-body-viewport",s,Re,x,Y),[s,Re,x,Y]),lu=S.useMemo(()=>ji("ag-body",Re),[Re]),$e=S.useMemo(()=>ji("ag-floating-top",Y),[Y]),Ye=S.useMemo(()=>ji("ag-sticky-top",Y),[Y]),nt=S.useMemo(()=>ji("ag-sticky-bottom",Y),[Y]),ce=S.useMemo(()=>ji("ag-floating-bottom",Y),[Y]),ot=S.useMemo(()=>({height:o,minHeight:o,display:P,overflowY:U}),[o,P,U]),Bi=S.useMemo(()=>({height:u,top:h,width:C}),[u,h,C]),Wi=S.useMemo(()=>({height:y,bottom:w,width:E}),[y,w,E]),kn=S.useMemo(()=>({height:l,minHeight:l,display:F,overflowY:U}),[l,F,U]),dh=Wo=>_.createElement(CN,{name:Wo,key:`${Wo}-container`}),ll=({section:Wo,children:al,className:Ys,style:ch})=>_.createElement("div",{ref:Wo,className:Ys,role:"presentation",style:ch},al.map(dh));return _.createElement("div",{ref:ze,className:Ts,role:"treegrid"},_.createElement(tN,null),ll({section:V,className:$e,style:ot,children:[Fe.TOP_LEFT,Fe.TOP_CENTER,Fe.TOP_RIGHT,Fe.TOP_FULL_WIDTH]}),_.createElement("div",{className:lu,ref:X,role:"presentation"},ll({section:Ce,className:Bo,children:[Fe.LEFT,Fe.CENTER,Fe.RIGHT,Fe.FULL_WIDTH]})),ll({section:W,className:Ye,style:Bi,children:[Fe.STICKY_TOP_LEFT,Fe.STICKY_TOP_CENTER,Fe.STICKY_TOP_RIGHT,Fe.STICKY_TOP_FULL_WIDTH]}),ll({section:te,className:nt,style:Wi,children:[Fe.STICKY_BOTTOM_LEFT,Fe.STICKY_BOTTOM_CENTER,Fe.STICKY_BOTTOM_RIGHT,Fe.STICKY_BOTTOM_FULL_WIDTH]}),ll({section:dt,className:ce,style:kn,children:[Fe.BOTTOM_LEFT,Fe.BOTTOM_CENTER,Fe.BOTTOM_RIGHT,Fe.BOTTOM_FULL_WIDTH]}))},wN=S.memo(vN),yN=(e,t)=>{const{children:i,eFocusableElement:s,onTabKeyDown:n,gridCtrl:o,forceFocusOutWhenTabGuardsAreEmpty:r}=e,{context:l}=S.useContext(Kt),a=S.useRef(null),u=S.useRef(null),d=S.useRef(),h=R=>{const w=R==null?void 0:parseInt(R,10).toString();[a,u].forEach(m=>{var E,T;w===void 0?(E=m.current)==null||E.removeAttribute("tabindex"):(T=m.current)==null||T.setAttribute("tabindex",w)})};S.useImperativeHandle(t,()=>({forceFocusOutOfContainer(R){var w;(w=d.current)==null||w.forceFocusOutOfContainer(R)}}));const p=S.useCallback(()=>{if(!a.current&&!u.current){l.destroyBean(d.current),d.current=null;return}if(a.current&&u.current){const R={setTabIndex:h};d.current=l.createBean(new Jc({comp:R,eTopGuard:a.current,eBottomGuard:u.current,eFocusableElement:s,onTabKeyDown:n,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:w=>o.focusInnerElement(w)}))}},[]),C=S.useCallback(R=>{a.current=R,p()},[p]),v=S.useCallback(R=>{u.current=R,p()},[p]),y=R=>{const w=R==="top"?Qu.TAB_GUARD_TOP:Qu.TAB_GUARD_BOTTOM;return _.createElement("div",{className:`${Qu.TAB_GUARD} ${w}`,role:"presentation",ref:R==="top"?C:v})};return _.createElement(_.Fragment,null,y("top"),i,y("bottom"))},SN=S.forwardRef(yN),EN=S.memo(SN),RN=({context:e})=>{const[t,i]=S.useState(""),[s,n]=S.useState(""),[o,r]=S.useState(""),[l,a]=S.useState(null),[u,d]=S.useState(null),[h,p]=S.useState(!1),[C,v]=S.useState(),y=S.useRef(null),R=S.useRef(null),w=S.useRef(),[m,E]=S.useState(null),T=S.useRef(()=>{}),P=S.useCallback(()=>{},[]),A=S.useMemo(()=>e.isDestroyed()?null:e.getBean("beans"),[e]);jn(" AG Grid ",R);const F=S.useCallback(ee=>{if(R.current=ee,!R.current){e.destroyBean(y.current),y.current=null;return}if(e.isDestroyed())return;y.current=e.createBean(new On);const Y=y.current;T.current=Y.focusInnerElement.bind(Y);const ye={destroyGridUi:()=>{},setRtlClass:i,forceFocusOutOfContainer:Re=>{var De;(De=w.current)==null||De.forceFocusOutOfContainer(Re)},updateLayoutClasses:r,getFocusableContainers:()=>{var Re,De;const me=[],O=(Re=R.current)==null?void 0:Re.querySelector(".ag-root"),V=(De=R.current)==null?void 0:De.querySelector(".ag-side-bar:not(.ag-hidden)");return O&&me.push(O),V&&me.push(V),me},setCursor:a,setUserSelect:d};Y.setComp(ye,R.current,R.current),p(!0)},[]);S.useEffect(()=>{if(!C||!A||!y.current||!m||!R.current)return;const ee=y.current,Y=[],{agStackComponentsRegistry:ye}=A,Re=ye.getComponentClass("AG-GRID-HEADER-DROP-ZONES"),De=ye.getComponentClass("AG-SIDE-BAR"),me=ye.getComponentClass("AG-STATUS-BAR"),O=ye.getComponentClass("AG-WATERMARK"),V=ye.getComponentClass("AG-PAGINATION"),W=[],te=R.current;if(ee.showDropZones()&&Re){const X=e.createBean(new Re),Ce=X.getGui();te.insertAdjacentElement("afterbegin",Ce),W.push(Ce),Y.push(X)}if(ee.showSideBar()&&De){const X=e.createBean(new De),Ce=X.getGui(),dt=m.querySelector(".ag-tab-guard-bottom");dt&&(dt.insertAdjacentElement("beforebegin",Ce),W.push(Ce)),Y.push(X)}if(ee.showStatusBar()&&me){const X=e.createBean(new me),Ce=X.getGui();te.insertAdjacentElement("beforeend",Ce),W.push(Ce),Y.push(X)}if(V){const X=e.createBean(new V),Ce=X.getGui();te.insertAdjacentElement("beforeend",Ce),W.push(Ce),Y.push(X)}if(ee.showWatermark()&&O){const X=e.createBean(new O),Ce=X.getGui();te.insertAdjacentElement("beforeend",Ce),W.push(Ce),Y.push(X)}return()=>{e.destroyBeans(Y),W.forEach(X=>{X.parentElement&&X.parentElement.removeChild(X)})}},[C,m,A]);const I=S.useMemo(()=>ji("ag-root-wrapper",t,s,o),[t,s,o]),x=S.useMemo(()=>ji("ag-root-wrapper-body","ag-focus-managed",o),[o]),k=S.useMemo(()=>({userSelect:u??"",WebkitUserSelect:u??"",cursor:l??""}),[u,l]),U=S.useCallback(ee=>{w.current=ee,v(ee!==null)},[]);return _.createElement("div",{ref:F,className:I,style:k,role:"presentation"},_.createElement("div",{className:x,ref:E,role:"presentation"},h&&m&&A&&_.createElement(Kt.Provider,{value:A},_.createElement(EN,{ref:U,eFocusableElement:m,onTabKeyDown:P,gridCtrl:y.current,forceFocusOutWhenTabGuardsAreEmpty:!0},_.createElement(wN,null)))))},TN=S.memo(RN),LD=e=>{var t,i;const s=S.useRef(),n=S.useRef(null),o=S.useRef(null),r=S.useRef([]),l=S.useRef([]),a=S.useRef(e),u=S.useRef(!1),[d,h]=S.useState(void 0),[,p]=S.useState(0),C=S.useCallback(R=>{if(n.current=R,!n.current){r.current.forEach(F=>F()),r.current.length=0;return}const w=e.modules||[];o.current||(o.current=new Bx(()=>p(F=>F+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),r.current.push(()=>{var F;(F=o.current)==null||F.destroy(),o.current=null}));const m=kd.combineAttributesAndGridOptions(e.gridOptions,e),E={providedBeanInstances:{frameworkComponentWrapper:new PN(o.current,!!m.reactiveCustomComponents)},modules:w,frameworkOverrides:new AN},T=F=>{h(F),r.current.push(()=>{F.destroy()}),F.getBean(uo.NAME).whenReady(()=>{if(F.isDestroyed())return;const x=s.current;x&&e.setGridApi&&e.setGridApi(x,new xr(x))})},P=F=>{F.getBean(uo.NAME).whenReady(()=>{l.current.forEach(x=>x()),l.current.length=0,u.current=!0})},A=new qL;s.current=A.create(n.current,m,T,P,E)},[]),v=S.useMemo(()=>Ge({height:"100%"},e.containerStyle||{}),[e.containerStyle]),y=S.useCallback(R=>{u.current?R():l.current.push(R)},[]);return S.useEffect(()=>{const R=DN(a.current,e);a.current=e,y(()=>{s.current&&kd.processOnChange(R,s.current)})},[e]),_.createElement("div",{style:v,className:e.className,ref:C},d&&!d.isDestroyed()?_.createElement(TN,{context:d}):null,(i=(t=o.current)==null?void 0:t.getPortals())!=null?i:null)};function DN(e,t){const i={};return Object.keys(t).forEach(s=>{const n=t[s];e[s]!==n&&(i[s]=n)}),i}var PN=class extends XL{constructor(e,t){super(),this.parent=e,this.reactiveCustomComponents=t}createWrapper(e,t){if(this.reactiveCustomComponents){const n=(o=>{switch(o){case"filter":return xx;case"floatingFilterComponent":return _x;case"dateComponent":return Ix;case"loadingOverlayComponent":return Ox;case"noRowsOverlayComponent":return kx;case"statusPanel":return Vx;case"toolPanel":return Hx;case"menuItem":return Gx}})(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":aC();break}const i=!t.cellRenderer&&t.propertyName!=="toolPanel";return new TD(e,this.parent,t,i)}},FN=S.forwardRef((e,t)=>{const{ctrlsFactory:i,context:s,gos:n,resizeObserverService:o,clientSideRowModel:r,serverSideRowModel:l}=S.useContext(Kt),[a,u]=S.useState(()=>new Mi),[d,h]=S.useState(()=>new Mi),[p,C]=S.useState(),[v,y]=S.useState(),R=S.useRef(),w=S.useRef(null),m=S.useRef(),E=S.useMemo(()=>he.__getGridRegisteredModules(e.api.getGridId()),[e]),T=S.useMemo(()=>a.toString()+" ag-details-row",[a]),P=S.useMemo(()=>d.toString()+" ag-details-grid",[d]);t&&S.useImperativeHandle(t,()=>({refresh(){var I,x;return(x=(I=R.current)==null?void 0:I.refresh())!=null?x:!1}})),e.template&&Q.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/");const A=S.useCallback(I=>{if(w.current=I,!w.current){s.destroyBean(R.current),m.current&&m.current();return}const x={addOrRemoveCssClass:(U,ee)=>u(Y=>Y.setClass(U,ee)),addOrRemoveDetailGridCssClass:(U,ee)=>h(Y=>Y.setClass(U,ee)),setDetailGrid:U=>C(U),setRowData:U=>y(U),getGui:()=>w.current},k=i.getInstance("detailCellRenderer");if(k&&(s.createBean(k),k.init(x,e),R.current=k,n.get("detailRowAutoHeight"))){const U=()=>{if(w.current==null)return;const ee=w.current.clientHeight;ee!=null&&ee>0&&setTimeout(()=>{e.node.setRowHeight(ee),r?r.onRowHeightChanged():l&&l.onRowHeightChanged()},0)};m.current=o.observeResize(w.current,U),U()}},[]),F=S.useCallback((I,x)=>{var k;(k=R.current)==null||k.registerDetailWithMaster(I,x)},[]);return _.createElement("div",{className:T,ref:A},p&&_.createElement(LD,kt(Ge({className:P},p),{modules:E,rowData:v,setGridApi:F})))}),AN=class extends ST{constructor(){super("react"),this.frameworkComponents={agGroupCellRenderer:Iw,agGroupRowRenderer:Iw,agDetailCellRenderer:FN},this.wrapIncoming=(e,t)=>t==="ensureVisible"?Ux(e):e(),this.renderingEngine="react"}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;const t=e.prototype;return!(t&&"getGui"in t)}},VN=class extends S.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=(e,t)=>{this.api=e,this.columnApi=t,this.apiListeners.forEach(i=>i(e))}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return _.createElement(LD,kt(Ge({},this.props),{setGridApi:this.setGridApi}))}};export{VN as A,_ as R,Gf as a,bN as b,_w as g,S as r};
|