@arbocollab/arbo-plugin-item-table 0.1.242 ā 0.1.243
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/es/index.es.js +5 -5
- package/lib/style.css +1 -1
- package/lib/umd/index.umd.js +4 -4
- package/package.json +1 -1
package/lib/umd/index.umd.js
CHANGED
|
@@ -190,7 +190,7 @@ ${u}`:l)}else throw i},onCacheKey:i=>$ie(t,n,i)}}function Sle(e){if(Ct(e))return
|
|
|
190
190
|
* vue-i18n v9.14.5
|
|
191
191
|
* (c) 2025 kazuya kawaguchi
|
|
192
192
|
* Released under the MIT License.
|
|
193
|
-
*/const kle="9.14.5";function Fle(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Ra().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Ra().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Ra().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Ra().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Ra().__INTLIFY_PROD_DEVTOOLS__=!1)}const AV=ms.__EXTEND_POINT__,Da=Ry(AV),jn={FALLBACK_TO_ROOT:AV,NOT_SUPPORTED_PRESERVE:Da(),NOT_SUPPORTED_FORMATTER:Da(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:Da(),NOT_SUPPORTED_GET_CHOICE_INDEX:Da(),COMPONENT_NAME_LEGACY_COMPATIBLE:Da(),NOT_FOUND_PARENT_SCOPE:Da(),IGNORE_OBJ_FLATTEN:Da(),NOTICE_DROP_ALLOW_COMPOSITION:Da(),NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG:Da()},Ole={[jn.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[jn.NOT_SUPPORTED_PRESERVE]:"Not supported 'preserve'.",[jn.NOT_SUPPORTED_FORMATTER]:"Not supported 'formatter'.",[jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE]:"Not supported 'preserveDirectiveContent'.",[jn.NOT_SUPPORTED_GET_CHOICE_INDEX]:"Not supported 'getChoiceIndex'.",[jn.COMPONENT_NAME_LEGACY_COMPATIBLE]:"Component name legacy compatible: '{name}' -> 'i18n'",[jn.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[jn.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[jn.NOTICE_DROP_ALLOW_COMPOSITION]:"'allowComposition' option will be dropped in the next major version. For more information, please see š https://tinyurl.com/2p97mcze",[jn.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG]:"'translateExistCompatible' option will be dropped in the next major version."};function Is(e,...t){return P0(Ole[e],...t)}const PV=Bo.__EXTEND_POINT__,xs=Ry(PV),fn={UNEXPECTED_RETURN_TYPE:PV,INVALID_ARGUMENT:xs(),MUST_BE_CALL_SETUP_TOP:xs(),NOT_INSTALLED:xs(),NOT_AVAILABLE_IN_LEGACY_MODE:xs(),REQUIRED_VALUE:xs(),INVALID_VALUE:xs(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:xs(),NOT_INSTALLED_WITH_PROVIDE:xs(),UNEXPECTED_ERROR:xs(),NOT_COMPATIBLE_LEGACY_VUE_I18N:xs(),BRIDGE_SUPPORT_VUE_2_ONLY:xs(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:xs(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:xs(),__EXTEND_POINT__:xs()};function ko(e,...t){return Pd(e,null,ee.env.NODE_ENV!=="production"?{messages:Mle,args:t}:void 0)}const Mle={[fn.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[fn.INVALID_ARGUMENT]:"Invalid argument",[fn.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[fn.NOT_INSTALLED]:"Need to install with `app.use` function",[fn.UNEXPECTED_ERROR]:"Unexpected error",[fn.NOT_AVAILABLE_IN_LEGACY_MODE]:"Not available in legacy mode",[fn.REQUIRED_VALUE]:"Required in value: {0}",[fn.INVALID_VALUE]:"Invalid value",[fn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[fn.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[fn.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[fn.BRIDGE_SUPPORT_VUE_2_ONLY]:"vue-i18n-bridge support Vue 2.x only",[fn.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]:"Must define āi18nā option or custom block in Composition API with using local scope in Legacy API mode",[fn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},z0=Ii("__translateVNode"),j0=Ii("__datetimeParts"),K0=Ii("__numberParts"),Uu=Ii("__enableEmitter"),bp=Ii("__disableEmitter"),kV=Ii("__setPluralRules"),FV=Ii("__injectWithOption"),q0=Ii("__dispose");function Sp(e){if(!dn(e)||Tr(e))return e;for(const t in e)if(Zr(e,t))if(!t.includes("."))dn(e[t])&&Sp(e[t]);else{const n=t.split("."),o=n.length-1;let s=e,r=!1;for(let i=0;i<o;i++){if(n[i]==="__proto__")throw new Error(`unsafe key: ${n[i]}`);if(n[i]in s||(s[n[i]]=An()),!dn(s[n[i]])){ee.env.NODE_ENV!=="production"&&Co(Is(jn.IGNORE_OBJ_FLATTEN,{key:n[i]})),r=!0;break}s=s[n[i]]}if(r||(Tr(s)?KL.includes(n[o])||delete e[t]:(s[n[o]]=e[t],delete e[t])),!Tr(s)){const i=s[n[o]];dn(i)&&Sp(i)}}return e}function Oy(e,t){const{messages:n,__i18n:o,messageResolver:s,flatJson:r}=t,i=zt(n)?n:Mn(o)?An():{[e]:An()};if(Mn(o)&&o.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:l,resource:u}=a;l?(i[l]=i[l]||An(),Dy(u,i[l])):Dy(u,i)}else Ct(a)&&Dy(JSON.parse(a),i)}),s==null&&r)for(const a in i)Zr(i,a)&&Sp(i[a]);return i}function OV(e){return e.type}function MV(e,t,n){let o=dn(t.messages)?t.messages:An();"__i18nGlobal"in n&&(o=Oy(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const s=Object.keys(o);s.length&&s.forEach(r=>{e.mergeLocaleMessage(r,o[r])});{if(dn(t.datetimeFormats)){const r=Object.keys(t.datetimeFormats);r.length&&r.forEach(i=>{e.mergeDateTimeFormat(i,t.datetimeFormats[i])})}if(dn(t.numberFormats)){const r=Object.keys(t.numberFormats);r.length&&r.forEach(i=>{e.mergeNumberFormat(i,t.numberFormats[i])})}}}function NV(e){return ye(Ka,null,e,0)}const LV="__INTLIFY_META__",VV=()=>[],Nle=()=>!1;let BV=0;function $V(e){return(t,n,o,s)=>e(n,o,oo()||void 0,s)}const Lle=()=>{const e=oo();let t=null;return e&&(t=OV(e)[LV])?{[LV]:t}:null};function Y0(e={},t){const{__root:n,__injectWithOption:o}=e,s=n===void 0,r=e.flatJson,i=Xr?$:xh,a=!!e.translateExistCompatible;ee.env.NODE_ENV!=="production"&&a&&RL(Is(jn.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG));let l=on(e.inheritLocale)?e.inheritLocale:!0;const u=i(n&&l?n.locale.value:Ct(e.locale)?e.locale:Od),c=i(n&&l?n.fallbackLocale.value:Ct(e.fallbackLocale)||Mn(e.fallbackLocale)||zt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:u.value),d=i(Oy(u.value,e)),h=i(zt(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),f=i(zt(e.numberFormats)?e.numberFormats:{[u.value]:{}});let p=n?n.missingWarn:on(e.missingWarn)||El(e.missingWarn)?e.missingWarn:!0,g=n?n.fallbackWarn:on(e.fallbackWarn)||El(e.fallbackWarn)?e.fallbackWarn:!0,v=n?n.fallbackRoot:on(e.fallbackRoot)?e.fallbackRoot:!0,w=!!e.fallbackFormat,S=Pn(e.missing)?e.missing:null,b=Pn(e.missing)?$V(e.missing):null,y=Pn(e.postTranslation)?e.postTranslation:null,E=n?n.warnHtmlMessage:on(e.warnHtmlMessage)?e.warnHtmlMessage:!0,_=!!e.escapeParameter;const I=n?n.modifiers:zt(e.modifiers)?e.modifiers:{};let T=e.pluralRules||n&&n.pluralRules,F;F=(()=>{s&&lV(null);const ve={version:kle,locale:u.value,fallbackLocale:c.value,messages:d.value,modifiers:I,pluralRules:T,missing:b===null?void 0:b,missingWarn:p,fallbackWarn:g,fallbackFormat:w,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:E,escapeParameter:_,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};ve.datetimeFormats=h.value,ve.numberFormats=f.value,ve.__datetimeFormatters=zt(F)?F.__datetimeFormatters:void 0,ve.__numberFormatters=zt(F)?F.__numberFormatters:void 0,ee.env.NODE_ENV!=="production"&&(ve.__v_emitter=zt(F)?F.__v_emitter:void 0);const Be=fle(ve);return s&&lV(Be),Be})(),Cp(F,u.value,c.value);function x(){return[u.value,c.value,d.value,h.value,f.value]}const P=X({get:()=>u.value,set:ve=>{u.value=ve,F.locale=u.value}}),k=X({get:()=>c.value,set:ve=>{c.value=ve,F.fallbackLocale=c.value,Cp(F,u.value,ve)}}),M=X(()=>d.value),N=X(()=>h.value),B=X(()=>f.value);function z(){return Pn(y)?y:null}function oe(ve){y=ve,F.postTranslation=ve}function ie(){return S}function te(ve){ve!==null&&(b=$V(ve)),S=ve,F.missing=b}function se(ve,Be){return ve!=="translate"||!Be.resolvedMessage}const Z=(ve,Be,wt,Dt,tn,en)=>{x();let bn;try{ee.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,s||(F.fallbackContext=n?hle():void 0),bn=ve(F)}finally{ee.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,s||(F.fallbackContext=void 0)}if(wt!=="translate exists"&&ro(bn)&&bn===Py||wt==="translate exists"&&!bn){const[Le,Ge]=Be();if(ee.env.NODE_ENV!=="production"&&n&&Ct(Le)&&se(wt,Ge)&&(v&&(Fy(g,Le)||cV(p,Le))&&Co(Is(jn.FALLBACK_TO_ROOT,{key:Le,type:wt})),ee.env.NODE_ENV!=="production")){const{__v_emitter:Rt}=F;Rt&&v&&Rt.emit("fallback",{type:wt,key:Le,to:"global",groupId:`${wt}:${Le}`})}return n&&v?Dt(n):tn(Le)}else{if(en(bn))return bn;throw ko(fn.UNEXPECTED_RETURN_TYPE)}};function A(...ve){return Z(Be=>Reflect.apply(yV,null,[Be,...ve]),()=>H0(...ve),"translate",Be=>Reflect.apply(Be.t,Be,[...ve]),Be=>Be,Be=>Ct(Be))}function j(...ve){const[Be,wt,Dt]=ve;if(Dt&&!dn(Dt))throw ko(fn.INVALID_ARGUMENT);return A(Be,wt,Ko({resolvedMessage:!0},Dt||{}))}function ne(...ve){return Z(Be=>Reflect.apply(EV,null,[Be,...ve]),()=>G0(...ve),"datetime format",Be=>Reflect.apply(Be.d,Be,[...ve]),()=>ky,Be=>Ct(Be))}function ge(...ve){return Z(Be=>Reflect.apply(TV,null,[Be,...ve]),()=>U0(...ve),"number format",Be=>Reflect.apply(Be.n,Be,[...ve]),()=>ky,Be=>Ct(Be))}function xe(ve){return ve.map(Be=>Ct(Be)||ro(Be)||on(Be)?NV(String(Be)):Be)}const K={normalize:xe,interpolate:ve=>ve,type:"vnode"};function Y(...ve){return Z(Be=>{let wt;const Dt=Be;try{Dt.processor=K,wt=Reflect.apply(yV,null,[Dt,...ve])}finally{Dt.processor=null}return wt},()=>H0(...ve),"translate",Be=>Be[z0](...ve),Be=>[NV(Be)],Be=>Mn(Be))}function re(...ve){return Z(Be=>Reflect.apply(TV,null,[Be,...ve]),()=>U0(...ve),"number format",Be=>Be[K0](...ve),VV,Be=>Ct(Be)||Mn(Be))}function R(...ve){return Z(Be=>Reflect.apply(EV,null,[Be,...ve]),()=>G0(...ve),"datetime format",Be=>Be[j0](...ve),VV,Be=>Ct(Be)||Mn(Be))}function G(ve){T=ve,F.pluralRules=T}function J(ve,Be){return Z(()=>{if(!ve)return!1;const wt=Ct(Be)?Be:u.value,Dt=Ce(wt),tn=F.messageResolver(Dt,ve);return a?tn!=null:Tr(tn)||Dr(tn)||Ct(tn)},()=>[ve],"translate exists",wt=>Reflect.apply(wt.te,wt,[ve,Be]),Nle,wt=>on(wt))}function ce(ve){let Be=null;const wt=QL(F,c.value,u.value);for(let Dt=0;Dt<wt.length;Dt++){const tn=d.value[wt[Dt]]||{},en=F.messageResolver(tn,ve);if(en!=null){Be=en;break}}return Be}function Ee(ve){const Be=ce(ve);return Be??(n?n.tm(ve)||{}:{})}function Ce(ve){return d.value[ve]||{}}function Ne(ve,Be){if(r){const wt={[ve]:Be};for(const Dt in wt)Zr(wt,Dt)&&Sp(wt[Dt]);Be=wt[ve]}d.value[ve]=Be,F.messages=d.value}function pe(ve,Be){d.value[ve]=d.value[ve]||{};const wt={[ve]:Be};if(r)for(const Dt in wt)Zr(wt,Dt)&&Sp(wt[Dt]);Be=wt[ve],Dy(Be,d.value[ve]),F.messages=d.value}function H(ve){return h.value[ve]||{}}function W(ve,Be){h.value[ve]=Be,F.datetimeFormats=h.value,RV(F,ve,Be)}function be(ve,Be){h.value[ve]=Ko(h.value[ve]||{},Be),F.datetimeFormats=h.value,RV(F,ve,Be)}function Ae(ve){return f.value[ve]||{}}function He(ve,Be){f.value[ve]=Be,F.numberFormats=f.value,IV(F,ve,Be)}function Te(ve,Be){f.value[ve]=Ko(f.value[ve]||{},Be),F.numberFormats=f.value,IV(F,ve,Be)}BV++,n&&Xr&&(Qe(n.locale,ve=>{l&&(u.value=ve,F.locale=ve,Cp(F,u.value,c.value))}),Qe(n.fallbackLocale,ve=>{l&&(c.value=ve,F.fallbackLocale=ve,Cp(F,u.value,c.value))}));const Xe={id:BV,locale:P,fallbackLocale:k,get inheritLocale(){return l},set inheritLocale(ve){l=ve,ve&&n&&(u.value=n.locale.value,c.value=n.fallbackLocale.value,Cp(F,u.value,c.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:M,get modifiers(){return I},get pluralRules(){return T||{}},get isGlobal(){return s},get missingWarn(){return p},set missingWarn(ve){p=ve,F.missingWarn=p},get fallbackWarn(){return g},set fallbackWarn(ve){g=ve,F.fallbackWarn=g},get fallbackRoot(){return v},set fallbackRoot(ve){v=ve},get fallbackFormat(){return w},set fallbackFormat(ve){w=ve,F.fallbackFormat=w},get warnHtmlMessage(){return E},set warnHtmlMessage(ve){E=ve,F.warnHtmlMessage=ve},get escapeParameter(){return _},set escapeParameter(ve){_=ve,F.escapeParameter=ve},t:A,getLocaleMessage:Ce,setLocaleMessage:Ne,mergeLocaleMessage:pe,getPostTranslationHandler:z,setPostTranslationHandler:oe,getMissingHandler:ie,setMissingHandler:te,[kV]:G};return Xe.datetimeFormats=N,Xe.numberFormats=B,Xe.rt=j,Xe.te=J,Xe.tm=Ee,Xe.d=ne,Xe.n=ge,Xe.getDateTimeFormat=H,Xe.setDateTimeFormat=W,Xe.mergeDateTimeFormat=be,Xe.getNumberFormat=Ae,Xe.setNumberFormat=He,Xe.mergeNumberFormat=Te,Xe[FV]=o,Xe[z0]=Y,Xe[j0]=R,Xe[K0]=re,ee.env.NODE_ENV!=="production"&&(Xe[Uu]=ve=>{F.__v_emitter=ve},Xe[bp]=()=>{F.__v_emitter=void 0}),Xe}function Vle(e){const t=Ct(e.locale)?e.locale:Od,n=Ct(e.fallbackLocale)||Mn(e.fallbackLocale)||zt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=Pn(e.missing)?e.missing:void 0,s=on(e.silentTranslationWarn)||El(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,r=on(e.silentFallbackWarn)||El(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,i=on(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=zt(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=Pn(e.postTranslation)?e.postTranslation:void 0,d=Ct(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,f=on(e.sync)?e.sync:!0;ee.env.NODE_ENV!=="production"&&e.formatter&&Co(Is(jn.NOT_SUPPORTED_FORMATTER)),ee.env.NODE_ENV!=="production"&&e.preserveDirectiveContent&&Co(Is(jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE));let p=e.messages;if(zt(e.sharedMessages)){const _=e.sharedMessages;p=Object.keys(_).reduce((T,F)=>{const L=T[F]||(T[F]={});return Ko(L,_[F]),T},p||{})}const{__i18n:g,__root:v,__injectWithOption:w}=e,S=e.datetimeFormats,b=e.numberFormats,y=e.flatJson,E=e.translateExistCompatible;return{locale:t,fallbackLocale:n,messages:p,flatJson:y,datetimeFormats:S,numberFormats:b,missing:o,missingWarn:s,fallbackWarn:r,fallbackRoot:i,fallbackFormat:a,modifiers:l,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:h,messageResolver:e.messageResolver,inheritLocale:f,translateExistCompatible:E,__i18n:g,__root:v,__injectWithOption:w}}function X0(e={},t){{const n=Y0(Vle(e)),{__extender:o}=e,s={id:n.id,get locale(){return n.locale.value},set locale(r){n.locale.value=r},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(r){n.fallbackLocale.value=r},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_FORMATTER)),{interpolate(){return[]}}},set formatter(r){ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_FORMATTER))},get missing(){return n.getMissingHandler()},set missing(r){n.setMissingHandler(r)},get silentTranslationWarn(){return on(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(r){n.missingWarn=on(r)?!r:r},get silentFallbackWarn(){return on(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(r){n.fallbackWarn=on(r)?!r:r},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(r){n.fallbackFormat=r},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(r){n.setPostTranslationHandler(r)},get sync(){return n.inheritLocale},set sync(r){n.inheritLocale=r},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(r){n.warnHtmlMessage=r!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(r){n.escapeParameter=r},get preserveDirectiveContent(){return ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE)),!0},set preserveDirectiveContent(r){ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE))},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...r){const[i,a,l]=r,u={};let c=null,d=null;if(!Ct(i))throw ko(fn.INVALID_ARGUMENT);const h=i;return Ct(a)?u.locale=a:Mn(a)?c=a:zt(a)&&(d=a),Mn(l)?c=l:zt(l)&&(d=l),Reflect.apply(n.t,n,[h,c||d||{},u])},rt(...r){return Reflect.apply(n.rt,n,[...r])},tc(...r){const[i,a,l]=r,u={plural:1};let c=null,d=null;if(!Ct(i))throw ko(fn.INVALID_ARGUMENT);const h=i;return Ct(a)?u.locale=a:ro(a)?u.plural=a:Mn(a)?c=a:zt(a)&&(d=a),Ct(l)?u.locale=l:Mn(l)?c=l:zt(l)&&(d=l),Reflect.apply(n.t,n,[h,c||d||{},u])},te(r,i){return n.te(r,i)},tm(r){return n.tm(r)},getLocaleMessage(r){return n.getLocaleMessage(r)},setLocaleMessage(r,i){n.setLocaleMessage(r,i)},mergeLocaleMessage(r,i){n.mergeLocaleMessage(r,i)},d(...r){return Reflect.apply(n.d,n,[...r])},getDateTimeFormat(r){return n.getDateTimeFormat(r)},setDateTimeFormat(r,i){n.setDateTimeFormat(r,i)},mergeDateTimeFormat(r,i){n.mergeDateTimeFormat(r,i)},n(...r){return Reflect.apply(n.n,n,[...r])},getNumberFormat(r){return n.getNumberFormat(r)},setNumberFormat(r,i){n.setNumberFormat(r,i)},mergeNumberFormat(r,i){n.mergeNumberFormat(r,i)},getChoiceIndex(r,i){return ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_GET_CHOICE_INDEX)),-1}};return s.__extender=o,ee.env.NODE_ENV!=="production"&&(s.__enableEmitter=r=>{const i=n;i[Uu]&&i[Uu](r)},s.__disableEmitter=()=>{const r=n;r[bp]&&r[bp]()}),s}}const Z0={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function Ble({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,s)=>[...o,...s.type===Pt?s.children:[s]],[]):t.reduce((n,o)=>{const s=e[o];return s&&(n[o]=s()),n},An())}function HV(e){return Pt}const J0=ot({name:"i18n-t",props:Ko({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>ro(e)||!isNaN(e)}},Z0),setup(e,t){const{slots:n,attrs:o}=t,s=e.i18n||n_({useScope:e.scope,__useComponent:!0});return()=>{const r=Object.keys(n).filter(d=>d!=="_"),i=An();e.locale&&(i.locale=e.locale),e.plural!==void 0&&(i.plural=Ct(e.plural)?+e.plural:e.plural);const a=Ble(t,r),l=s[z0](e.keypath,a,i),u=Ko(An(),o),c=Ct(e.tag)||dn(e.tag)?e.tag:HV();return Tc(c,u,l)}}});function $le(e){return Mn(e)&&!Ct(e[0])}function GV(e,t,n,o){const{slots:s,attrs:r}=t;return()=>{const i={part:!0};let a=An();e.locale&&(i.locale=e.locale),Ct(e.format)?i.key=e.format:dn(e.format)&&(Ct(e.format.key)&&(i.key=e.format.key),a=Object.keys(e.format).reduce((h,f)=>n.includes(f)?Ko(An(),h,{[f]:e.format[f]}):h,An()));const l=o(e.value,i,a);let u=[i.key];Mn(l)?u=l.map((h,f)=>{const p=s[h.type],g=p?p({[h.type]:h.value,index:f,parts:l}):[h.value];return $le(g)&&(g[0].key=`${h.type}-${f}`),g}):Ct(l)&&(u=[l]);const c=Ko(An(),r),d=Ct(e.tag)||dn(e.tag)?e.tag:HV();return Tc(d,c,u)}}const UV=ot({name:"i18n-n",props:Ko({value:{type:Number,required:!0},format:{type:[String,Object]}},Z0),setup(e,t){const n=e.i18n||n_({useScope:e.scope,__useComponent:!0});return GV(e,t,DV,(...o)=>n[K0](...o))}}),WV=ot({name:"i18n-d",props:Ko({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Z0),setup(e,t){const n=e.i18n||n_({useScope:e.scope,__useComponent:!0});return GV(e,t,_V,(...o)=>n[j0](...o))}});function Hle(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function Gle(e){const t=i=>{const{instance:a,modifiers:l,value:u}=i;if(!a||!a.$)throw ko(fn.UNEXPECTED_ERROR);const c=Hle(e,a.$);ee.env.NODE_ENV!=="production"&&l.preserve&&Co(Is(jn.NOT_SUPPORTED_PRESERVE));const d=zV(u);return[Reflect.apply(c.t,c,[...jV(d)]),c]};return{created:(i,a)=>{const[l,u]=t(a);Xr&&e.global===u&&(i.__i18nWatcher=Qe(u.locale,()=>{a.instance&&a.instance.$forceUpdate()})),i.__composer=u,i.textContent=l},unmounted:i=>{Xr&&i.__i18nWatcher&&(i.__i18nWatcher(),i.__i18nWatcher=void 0,delete i.__i18nWatcher),i.__composer&&(i.__composer=void 0,delete i.__composer)},beforeUpdate:(i,{value:a})=>{if(i.__composer){const l=i.__composer,u=zV(a);i.textContent=Reflect.apply(l.t,l,[...jV(u)])}},getSSRProps:i=>{const[a]=t(i);return{textContent:a}}}}function zV(e){if(Ct(e))return{path:e};if(zt(e)){if(!("path"in e))throw ko(fn.REQUIRED_VALUE,"path");return e}else throw ko(fn.INVALID_VALUE)}function jV(e){const{path:t,locale:n,args:o,choice:s,plural:r}=e,i={},a=o||{};return Ct(n)&&(i.locale=n),ro(s)&&(i.plural=s),ro(r)&&(i.plural=r),[t,a,i]}function Ule(e,t,...n){const o=zt(n[0])?n[0]:{},s=!!o.useI18nComponentName,r=on(o.globalInstall)?o.globalInstall:!0;ee.env.NODE_ENV!=="production"&&r&&s&&Co(Is(jn.COMPONENT_NAME_LEGACY_COMPATIBLE,{name:J0.name})),r&&([s?"i18n":J0.name,"I18nT"].forEach(i=>e.component(i,J0)),[UV.name,"I18nN"].forEach(i=>e.component(i,UV)),[WV.name,"I18nD"].forEach(i=>e.component(i,WV))),e.directive("t",Gle(t))}const Q0={"vue-devtools-plugin-vue-i18n":"Vue I18n devtools","vue-i18n-resource-inspector":"I18n Resources","vue-i18n-timeline":"Vue I18n"},Wle={"vue-i18n-resource-inspector":"Search for scopes ..."},zle={"vue-i18n-timeline":16764185},KV="vue-i18n: composer properties";let e_;async function jle(e,t){return new Promise((n,o)=>{try{Ple({id:"vue-devtools-plugin-vue-i18n",label:Q0["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[KV],app:e},s=>{e_=s,s.on.visitComponentTree(({componentInstance:i,treeNode:a})=>{Kle(i,a,t)}),s.on.inspectComponent(({componentInstance:i,instanceData:a})=>{i.vnode.el&&i.vnode.el.__VUE_I18N__&&a&&(t.mode==="legacy"?i.vnode.el.__VUE_I18N__!==t.global.__composer&&YV(a,i.vnode.el.__VUE_I18N__):YV(a,i.vnode.el.__VUE_I18N__))}),s.addInspector({id:"vue-i18n-resource-inspector",label:Q0["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:Wle["vue-i18n-resource-inspector"]}),s.on.getInspectorTree(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&Jle(i,t)});const r=new Map;s.on.getInspectorState(async i=>{if(i.app===e&&i.inspectorId==="vue-i18n-resource-inspector")if(s.unhighlightElement(),eue(i,t),i.nodeId==="global"){if(!r.has(i.app)){const[a]=await s.getComponentInstances(i.app);r.set(i.app,a)}s.highlightElement(r.get(i.app))}else{const a=Qle(i.nodeId,t);a&&s.highlightElement(a)}}),s.on.editInspectorState(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&nue(i,t)}),s.addTimelineLayer({id:"vue-i18n-timeline",label:Q0["vue-i18n-timeline"],color:zle["vue-i18n-timeline"]}),n(!0)})}catch(s){console.error(s),o(!1)}})}function qV(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function Kle(e,t,n){const o=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&e.vnode.el.__VUE_I18N__!==o){const s={label:`i18n (${qV(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(s)}}function YV(e,t){const n=KV;e.state.push({type:n,key:"locale",editable:!0,value:t.locale.value}),e.state.push({type:n,key:"availableLocales",editable:!1,value:t.availableLocales}),e.state.push({type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value}),e.state.push({type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}),e.state.push({type:n,key:"messages",editable:!1,value:t_(t.messages.value)}),e.state.push({type:n,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}),e.state.push({type:n,key:"numberFormats",editable:!1,value:t.numberFormats.value})}function t_(e){const t={};return Object.keys(e).forEach(n=>{const o=e[n];Pn(o)&&"source"in o?t[n]=Zle(o):Tr(o)&&o.loc&&o.loc.source?t[n]=o.loc.source:dn(o)?t[n]=t_(o):t[n]=o}),t}const qle={"<":"<",">":">",'"':""","&":"&"};function Yle(e){return e.replace(/[<>"&]/g,Xle)}function Xle(e){return qle[e]||e}function Zle(e){return{_custom:{type:"function",display:`<span>Ę</span> ${e.source?`("${Yle(e.source)}")`:"(?)"}`}}}function Jle(e,t){e.rootNodes.push({id:"global",label:"Global Scope"});const n=t.mode==="composition"?t.global:t.global.__composer;for(const[o,s]of t.__instances){const r=t.mode==="composition"?s:s.__composer;n!==r&&e.rootNodes.push({id:r.id.toString(),label:`${qV(o)} Scope`})}}function Qle(e,t){let n=null;if(e!=="global"){for(const[o,s]of t.__instances.entries())if(s.id.toString()===e){n=o;break}}return n}function XV(e,t){if(e==="global")return t.mode==="composition"?t.global:t.global.__composer;{const n=Array.from(t.__instances.values()).find(o=>o.id.toString()===e);return n?t.mode==="composition"?n:n.__composer:null}}function eue(e,t){const n=XV(e.nodeId,t);return n&&(e.state=tue(n)),null}function tue(e){const t={},n="Locale related info",o=[{type:n,key:"locale",editable:!0,value:e.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:e.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}];t[n]=o;const s="Locale messages info",r=[{type:s,key:"messages",editable:!1,value:t_(e.messages.value)}];t[s]=r;{const i="Datetime formats info",a=[{type:i,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];t[i]=a;const l="Datetime formats info",u=[{type:l,key:"numberFormats",editable:!1,value:e.numberFormats.value}];t[l]=u}return t}function Ep(e,t){if(e_){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),e_.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:n,time:Date.now(),meta:{},data:t||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function nue(e,t){const n=XV(e.nodeId,t);if(n){const[o]=e.path;o==="locale"&&Ct(e.state.value)?n.locale.value=e.state.value:o==="fallbackLocale"&&(Ct(e.state.value)||Mn(e.state.value)||dn(e.state.value))?n.fallbackLocale.value=e.state.value:o==="inheritLocale"&&on(e.state.value)&&(n.inheritLocale=e.state.value)}}function oue(e,t,n){return{beforeCreate(){const o=oo();if(!o)throw ko(fn.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=s.i18n;if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=t,this===this.$root)this.$i18n=ZV(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=X0(r);const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=ZV(e,s);else{this.$i18n=X0({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&MV(t,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$tc=(...r)=>this.$i18n.tc(...r),this.$te=(r,i)=>this.$i18n.te(r,i),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),n.__setInstance(o,this.$i18n)},mounted(){if(ee.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const o=this.$i18n;this.$el.__VUE_I18N__=o.__composer;const s=this.__v_emitter=k0();o.__enableEmitter&&o.__enableEmitter(s),s.on("*",Ep)}},unmounted(){const o=oo();if(!o)throw ko(fn.UNEXPECTED_ERROR);const s=this.$i18n;ee.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Ep),delete this.__v_emitter),this.$i18n&&(s.__disableEmitter&&s.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(o),delete this.$i18n}}}function ZV(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[kV](t.pluralizationRules||e.pluralizationRules);const n=Oy(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const sue=Ii("global-vue-i18n");function rue(e={},t){const n=__VUE_I18N_LEGACY_API__&&on(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,o=on(e.globalInjection)?e.globalInjection:!0,s=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,r=new Map,[i,a]=iue(e,n),l=Ii(ee.env.NODE_ENV!=="production"?"vue-i18n":"");ee.env.NODE_ENV!=="production"&&n&&s&&Co(Is(jn.NOTICE_DROP_ALLOW_COMPOSITION));function u(h){return r.get(h)||null}function c(h,f){r.set(h,f)}function d(h){r.delete(h)}{const h={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return s},async install(f,...p){if(ee.env.NODE_ENV!=="production"&&(f.__VUE_I18N__=h),f.__VUE_I18N_SYMBOL__=l,f.provide(f.__VUE_I18N_SYMBOL__,h),zt(p[0])){const w=p[0];h.__composerExtend=w.__composerExtend,h.__vueI18nExtend=w.__vueI18nExtend}let g=null;!n&&o&&(g=gue(f,h.global)),__VUE_I18N_FULL_INSTALL__&&Ule(f,h,...p),__VUE_I18N_LEGACY_API__&&n&&f.mixin(oue(a,a.__composer,h));const v=f.unmount;if(f.unmount=()=>{g&&g(),h.dispose(),v()},ee.env.NODE_ENV!=="production"){if(!await jle(f,h))throw ko(fn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const S=k0();if(n){const b=a;b.__enableEmitter&&b.__enableEmitter(S)}else{const b=a;b[Uu]&&b[Uu](S)}S.on("*",Ep)}},get global(){return a},dispose(){i.stop()},__instances:r,__getInstance:u,__setInstance:c,__deleteInstance:d};return h}}function n_(e={}){const t=oo();if(t==null)throw ko(fn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw ko(fn.NOT_INSTALLED);const n=aue(t),o=uue(n),s=OV(t),r=lue(e,s);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw ko(fn.NOT_AVAILABLE_IN_LEGACY_MODE);return fue(t,r,o,e)}if(r==="global")return MV(o,e,s),o;if(r==="parent"){let l=cue(n,t,e.__useComponent);return l==null&&(ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_FOUND_PARENT_SCOPE)),l=o),l}const i=n;let a=i.__getInstance(t);if(a==null){const l=Ko({},e);"__i18n"in s&&(l.__i18n=s.__i18n),o&&(l.__root=o),a=Y0(l),i.__composerExtend&&(a[q0]=i.__composerExtend(a)),hue(i,t,a),i.__setInstance(t,a)}return a}function iue(e,t,n){const o=cC();{const s=__VUE_I18N_LEGACY_API__&&t?o.run(()=>X0(e)):o.run(()=>Y0(e));if(s==null)throw ko(fn.UNEXPECTED_ERROR);return[o,s]}}function aue(e){{const t=Dn(e.isCE?sue:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw ko(e.isCE?fn.NOT_INSTALLED_WITH_PROVIDE:fn.UNEXPECTED_ERROR);return t}}function lue(e,t){return _y(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function uue(e){return e.mode==="composition"?e.global:e.global.__composer}function cue(e,t,n=!1){let o=null;const s=t.root;let r=due(t,n);for(;r!=null;){const i=e;if(e.mode==="composition")o=i.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const a=i.__getInstance(r);a!=null&&(o=a.__composer,n&&o&&!o[FV]&&(o=null))}if(o!=null||s===r)break;r=r.parent}return o}function due(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function hue(e,t,n){let o=null;Xt(()=>{if(ee.env.NODE_ENV!=="production"&&t.vnode.el){t.vnode.el.__VUE_I18N__=n,o=k0();const s=n;s[Uu]&&s[Uu](o),o.on("*",Ep)}},t),nu(()=>{const s=n;ee.env.NODE_ENV!=="production"&&t.vnode.el&&t.vnode.el.__VUE_I18N__&&(o&&o.off("*",Ep),s[bp]&&s[bp](),delete t.vnode.el.__VUE_I18N__),e.__deleteInstance(t);const r=s[q0];r&&(r(),delete s[q0])},t)}function fue(e,t,n,o={}){const s=t==="local",r=xh(null);if(s&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw ko(fn.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const i=on(o.inheritLocale)?o.inheritLocale:!Ct(o.locale),a=$(!s||i?n.locale.value:Ct(o.locale)?o.locale:Od),l=$(!s||i?n.fallbackLocale.value:Ct(o.fallbackLocale)||Mn(o.fallbackLocale)||zt(o.fallbackLocale)||o.fallbackLocale===!1?o.fallbackLocale:a.value),u=$(Oy(a.value,o)),c=$(zt(o.datetimeFormats)?o.datetimeFormats:{[a.value]:{}}),d=$(zt(o.numberFormats)?o.numberFormats:{[a.value]:{}}),h=s?n.missingWarn:on(o.missingWarn)||El(o.missingWarn)?o.missingWarn:!0,f=s?n.fallbackWarn:on(o.fallbackWarn)||El(o.fallbackWarn)?o.fallbackWarn:!0,p=s?n.fallbackRoot:on(o.fallbackRoot)?o.fallbackRoot:!0,g=!!o.fallbackFormat,v=Pn(o.missing)?o.missing:null,w=Pn(o.postTranslation)?o.postTranslation:null,S=s?n.warnHtmlMessage:on(o.warnHtmlMessage)?o.warnHtmlMessage:!0,b=!!o.escapeParameter,y=s?n.modifiers:zt(o.modifiers)?o.modifiers:{},E=o.pluralRules||s&&n.pluralRules;function _(){return[a.value,l.value,u.value,c.value,d.value]}const I=X({get:()=>r.value?r.value.locale.value:a.value,set:J=>{r.value&&(r.value.locale.value=J),a.value=J}}),T=X({get:()=>r.value?r.value.fallbackLocale.value:l.value,set:J=>{r.value&&(r.value.fallbackLocale.value=J),l.value=J}}),F=X(()=>r.value?r.value.messages.value:u.value),L=X(()=>c.value),x=X(()=>d.value);function P(){return r.value?r.value.getPostTranslationHandler():w}function k(J){r.value&&r.value.setPostTranslationHandler(J)}function M(){return r.value?r.value.getMissingHandler():v}function N(J){r.value&&r.value.setMissingHandler(J)}function B(J){return _(),J()}function z(...J){return r.value?B(()=>Reflect.apply(r.value.t,null,[...J])):B(()=>"")}function oe(...J){return r.value?Reflect.apply(r.value.rt,null,[...J]):""}function ie(...J){return r.value?B(()=>Reflect.apply(r.value.d,null,[...J])):B(()=>"")}function te(...J){return r.value?B(()=>Reflect.apply(r.value.n,null,[...J])):B(()=>"")}function se(J){return r.value?r.value.tm(J):{}}function Z(J,ce){return r.value?r.value.te(J,ce):!1}function A(J){return r.value?r.value.getLocaleMessage(J):{}}function j(J,ce){r.value&&(r.value.setLocaleMessage(J,ce),u.value[J]=ce)}function ne(J,ce){r.value&&r.value.mergeLocaleMessage(J,ce)}function ge(J){return r.value?r.value.getDateTimeFormat(J):{}}function xe(J,ce){r.value&&(r.value.setDateTimeFormat(J,ce),c.value[J]=ce)}function ue(J,ce){r.value&&r.value.mergeDateTimeFormat(J,ce)}function K(J){return r.value?r.value.getNumberFormat(J):{}}function Y(J,ce){r.value&&(r.value.setNumberFormat(J,ce),d.value[J]=ce)}function re(J,ce){r.value&&r.value.mergeNumberFormat(J,ce)}const R={get id(){return r.value?r.value.id:-1},locale:I,fallbackLocale:T,messages:F,datetimeFormats:L,numberFormats:x,get inheritLocale(){return r.value?r.value.inheritLocale:i},set inheritLocale(J){r.value&&(r.value.inheritLocale=J)},get availableLocales(){return r.value?r.value.availableLocales:Object.keys(u.value)},get modifiers(){return r.value?r.value.modifiers:y},get pluralRules(){return r.value?r.value.pluralRules:E},get isGlobal(){return r.value?r.value.isGlobal:!1},get missingWarn(){return r.value?r.value.missingWarn:h},set missingWarn(J){r.value&&(r.value.missingWarn=J)},get fallbackWarn(){return r.value?r.value.fallbackWarn:f},set fallbackWarn(J){r.value&&(r.value.missingWarn=J)},get fallbackRoot(){return r.value?r.value.fallbackRoot:p},set fallbackRoot(J){r.value&&(r.value.fallbackRoot=J)},get fallbackFormat(){return r.value?r.value.fallbackFormat:g},set fallbackFormat(J){r.value&&(r.value.fallbackFormat=J)},get warnHtmlMessage(){return r.value?r.value.warnHtmlMessage:S},set warnHtmlMessage(J){r.value&&(r.value.warnHtmlMessage=J)},get escapeParameter(){return r.value?r.value.escapeParameter:b},set escapeParameter(J){r.value&&(r.value.escapeParameter=J)},t:z,getPostTranslationHandler:P,setPostTranslationHandler:k,getMissingHandler:M,setMissingHandler:N,rt:oe,d:ie,n:te,tm:se,te:Z,getLocaleMessage:A,setLocaleMessage:j,mergeLocaleMessage:ne,getDateTimeFormat:ge,setDateTimeFormat:xe,mergeDateTimeFormat:ue,getNumberFormat:K,setNumberFormat:Y,mergeNumberFormat:re};function G(J){J.locale.value=a.value,J.fallbackLocale.value=l.value,Object.keys(u.value).forEach(ce=>{J.mergeLocaleMessage(ce,u.value[ce])}),Object.keys(c.value).forEach(ce=>{J.mergeDateTimeFormat(ce,c.value[ce])}),Object.keys(d.value).forEach(ce=>{J.mergeNumberFormat(ce,d.value[ce])}),J.escapeParameter=b,J.fallbackFormat=g,J.fallbackRoot=p,J.fallbackWarn=f,J.missingWarn=h,J.warnHtmlMessage=S}return Bh(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw ko(fn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const J=r.value=e.proxy.$i18n.__composer;t==="global"?(a.value=J.locale.value,l.value=J.fallbackLocale.value,u.value=J.messages.value,c.value=J.datetimeFormats.value,d.value=J.numberFormats.value):s&&G(J)}),R}const pue=["locale","fallbackLocale","availableLocales"],JV=["t","rt","d","n","tm","te"];function gue(e,t){const n=Object.create(null);return pue.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r)throw ko(fn.UNEXPECTED_ERROR);const i=mn(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,s,i)}),e.config.globalProperties.$i18n=n,JV.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r||!r.value)throw ko(fn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,r)}),()=>{delete e.config.globalProperties.$i18n,JV.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}if(Fle(),__INTLIFY_JIT_COMPILATION__?oV(yle):oV(vle),lle(Gae),ule(QL),ee.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=Ra();e.__INTLIFY__=!0,Zae(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}ee.env.NODE_ENV;const QV={en:{}};function mue(e){const t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):null}async function vue(e,t=10,n=300){for(let o=0;o<t;o++){const s=mue(e);if(s)return s;await new Promise(r=>setTimeout(r,n))}return null}async function yue(){const e=await vue("account.tessr_i18n_file_version_url");if(!e)return{};const t=await fetch(e);if(!t.ok)throw new Error("Failed to load en-error.json");return await t.json()}async function wue(){const e=await yue();return{...QV,en:{...QV.en,errorMessages:e}}}async function Cue(){return rue({legacy:!1,locale:"en",fallbackLocale:"en",messages:await wue(),formatFallbackMessages:!0})}const bue=async()=>{const e=await Cue();return oQ(e.global),e},eB=32,Sue=Math.round(eB*16/9),Eue="arbo-thumbnails",_p="thumbnails";let Rp=null;const o_=new Map,s_=new Map;function tB(){return Rp||(Rp=new Promise((e,t)=>{const n=indexedDB.open(Eue,1);n.onupgradeneeded=()=>n.result.createObjectStore(_p),n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)}),Rp.catch(()=>Rp=null)),Rp}async function _ue(e,t){try{const n=await tB();return await new Promise((o,s)=>{const r=n.transaction(_p,"readonly").objectStore(_p).get(e);r.onsuccess=()=>{const i=r.result;o((i==null?void 0:i.url)===t&&i.blob instanceof Blob?i.blob:null)},r.onerror=()=>s(r.error)})}catch{return null}}async function Rue(e,t,n){try{const o=await tB();if(s_.get(e)!==t)return;await new Promise((s,r)=>{const i=o.transaction(_p,"readwrite");i.objectStore(_p).put({url:t,blob:n},e),i.oncomplete=()=>s(),i.onerror=()=>r(i.error)})}catch{}}function Tue(e){return new Promise(t=>{new xP(e,{width:Sue,height:eB,resize:"cover",quality:.8,success:t,error:()=>t(e)})})}function Due(e,t){s_.set(e,t);let n=o_.get(e);n||(n=new Map,o_.set(e,n));const o=n.get(t);if(o)return o;const s=(async()=>{const r=await _ue(e,t);if(r)return r;const i=await fetch(t);if(!i.ok)throw new Error(`Thumbnail request failed: ${i.status}`);const a=await Tue(await i.blob());return await Rue(e,t,a),a})().finally(()=>{n.delete(t),n.size===0&&(o_.delete(e),s_.delete(e))});return n.set(t,s),s}const Iue="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoAgMAAAAwzTx3AAAACVBMVEXz9fjX19fo6etc+oS8AAAINUlEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD24EAAAAAAAMj/tRFUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXYOWPjuGEgii45w4DKWQIDu4orAcEtB3Z0iWdUBpuAY4W2qnRACTgLiwVS/MUbJ7YV6AnEx1+Sp8FgMBgMBoPBYNDGy3sB+kD+3zfqnu9c4E4XM8v8oc554RKOLiYu0Pu6By7xoIuFCxzUNSsXOeliV344PRO4SP1L7tQxM9e9uMxJ/bJwEZ9STknCfglc5PGUBoBBN3OZW0w5yCt+bbDamBkw4/eGa5k1PPVKYG6osYibPWrpNRZxsyctvcaqYdgnK7fVWMCTfeeWGguZc1tzjYWr8aGpxiJG/MxNNVaHuqSxxiKebhOXeYoDxNNtba2xeC1eHdbTnkA82HdNKF0YiAf7Xt/BC6j6xhc/fv3++ufrsH5kXxO67jRbvZWEcpiFntVDPaOV0/tbz3UuVEvJpHS2uWf1ehVdtQ3ds3qofu+7FuOh4xJfP502rbds0OpqUd+R1ecY8ObUpzjMmFNf+OIOqu7qAe9A1X1DjbWnHlPOnHqqsaDqjkrMdlc9NRp76pvdmIvTC6i6oyIreKVpKLJsT53sji+pzmGqO2oo8ZjqnhpGN3vqcWC3p56qLKS6o8RfPk65ykKq+/8fqBzyLVlw9evyfhWrLLj65XJIVfaAVHdf/s4PqcpCqnttWEk5B62+8wdilYVWD3GFpSqLqO6yl6WcVGUR1X32stRdqrLI6jtHxCoLrL5x5BRy7gao7qJj5CZVWUB1H69sNec8rvrECS9VWRvqUsQzoLp7Wl21yuKp+/xF4EOssrDqOz8hjuz21GOVxVN3wodcTinn8NS9pC5WWVT1wE/cxJyzpx6rLJy6E9WlKgunLq+6VGXtqcecs6eeqiyaurjX5Rep0NSlVT9JrLKg6lu+6tmzCQvqp/wiFZq6q6pT/GcwdWVyy6osvvpR+swXpvqiqMeRHUxduTeXVVkwdeVmdD6yQ6pnjyDEKgupTpx4UCnnsNSVZ255lcVSVx4y5zmHqb5kZ5tQZTHVpyzgpYiHUo/RlVLO2qrTli1tPraCqi9pqxtLeJozv/wWFZa6E35PjbE297mjf1I54DHHl7jsb0Rka3L7XN1X5YNPHkzdUWJ+v9bc1l2ahJJy5tRn8DuyESXlQO/D/yPnjG0ch4EoahlQ4AJcgvpQCRNohLlMyfXBJpRfcslWuYGBAaRPcybl548WhpMHmp+PErmNzORvXxp5k79za+Qkf9N6zVDv179nYj9Vcc1QZ2m+Z2E/QXXNUOfmEi1Hh14d9aHOyMYtR3sy+pKxzsPHLceHbpHGDov+VPq7L981lrfmJGq5YRe3RYdVmrcqrcha+CXa7YuEBT/opvWlqoM+qphVlfYBlcUtx/pYUmKNHfJh9KflhnwF8dFY1gsgFrcc6+tGSWgs9wWQZsuRnqqwhMaSXgC5ov/8q7Uc6QkqueGUisZyXwDxj6zWcpynJe02yntNYzkvgMAol0rLcZ6MlvsoHxWN5b4A4p9YpeA5b0HYfbOyocZ6Vlb01+1XvQC6UKELbFYKaKxno0I3WMtW/wJkZ0U/r7+DSTGFFF1j9JUJXWAt27zwMcKEbt+PjpwKMU705T6h3wrZOdGddEWl8TChC25WxGcAZiVCN9ysWKPnDkb0CSe0YowRfVbPo9FzROjiKDihF8UQoVtlFT9aPUeIrp6myh586NV/EK8Y40GHRTxQ2Y0H3WrqVho9x4fuC1mksoUO/dRsz9GgC0hrtGWnQTcY30BlNzb0WT3Bll3Z0D8gKZUtLOgCwxtt2Q8WdKtOamtUvHChP1XzPceFDj/shsruLOgCBR+qbCFBt/oidjRUdqVCP9UTq6xQoasnobJGgi4wtuGWfSdBNyj4WGULEfqikLXVc0ToPrQ5lRUOdPE/8yprHOgGNR6r7M6DDiMbvH1SHnSosmjLvlKgC9LFKntQoBtoS6bnaNAVEqjsxoIO4xpu2ZUCXcBaMiq7MqAbFFmq50jQYVhjlTUS9FOrsVbPMaALoqHKYhjQDQo+pbKFAh1qLKOyBwU6kGUOUgkButQLPlLZjQDdoMVSB6l2BnQo+JzKFgJ0mMk5lT36Rxco+JzKSv/oBkOaU9mNAP1USEZldwJ0haRWN/3fPfofhaScRv92j+4JTBZDje77l+HQd//mcOhe8OOh47KO2R895sy23Ew36o4eKvxwo+5UJx06DGbmzRN+qce8ky038aGDo8VbVow9esyS1Vg+9DlAT9WhPHrMK1nwwazoMVNOY6dgVvSYZ1JjA+3pMlmNpfNY769QY+lkLgt18hmNL9iRxvIt6z6LA40lXNt+2bNjHARCIAqgExMLucfeyVh5qe0tzZ5SVxMaI2zomLxX0xDg8wl1Vp0am/BuezuSckvGgG8nWB2TMeAjlgPRnTLlmkXtmjrlmhfXPXON3a39x3rOox5x7v855Xusf52665l1v9dFHauxt5jZpVdjc+b7x9qpsUlDblfGa+wjJldGa+wzple2X3Va219TpzsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8GIPDgQAAAAAgPxfG0FVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVdqDQwIAAAAAQf9f+8IEAAAAAAAAwCmRg3Unf/8l+AAAAABJRU5ErkJggg==",xue="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoAgMAAAAwzTx3AAAACVBMVEXz9fjX19fk5OUH9i6SAAAGd0lEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD24EAAAAAAAMj/tRFUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXYuXvcCGEgDMODJQrScwSK3GKP4GI/ZKWiSZRjcAn326TZU0YRsOwPkcCuPN88Nxi9wRjwxhhjjDHGGLOPuyYZpXhvSHSRwjkkK737D5L1UrQGGQYpWYsMZymYwy4ar/YaWbyUK2IvbQudw27a/uIb7Kdsje+QKUipIsB6sSObFKpCtpOUqcFBeta5DgfpWedaHKVmGx9xlJolHodpWeIdEujYylZIoeLu1iCFirtbjRQqHtmJR++QQsWepsWk/0rwWfSeps3alUQFow+SpCl5OxezNiVOweiSqOTRMy/WtuBNfObdqbPRS0Q/updENe/o5VcPVt2qW3WK6sQrvN3XrbpVt+pWXWt14vu67easulXnqO5l9Y6Pkah6uJ8c6CmrO/wZGKtPGXvG6pgMNNX989GaQFM9rKPM+KpHzE5s1R0Wnq16g8WZpbpfI856lurh9YT4SFY94uZEVh2rgat6hZUnqb4x+pmkeng9IX7mql5j1XNV73CHq/rD6CTV/cZv3kaO6mFrdKvOUT3izomq+uPoHNU9b/Vg1a06e3W7r2uvbrs5xie3QP/kVmPVk1SfR29439IQv5ursApc1R3ve3jiry/S8n5z63Bj39dpqldYBLbqgsXAUt3L8zo3slQPTxXR852bc5h4vtOSt/9Tw1d9foIJjCejp+wj43l4cRH4pvwVhIi7XmTDdVRf/d+8H/qrb3IABpXV/Z7lLKis/sveHdtGDgNRGJYEbKACVIKSq4IlzAF8xIRKrg8mVwL7PSwM35jiCiC5kR73y+hs/Nvy2AZErXnDWBizOp7iiNVnPB0jVl/xJIzVpWpz8YzVteo9imHE6vgSx6u+4Isbr/qKL0JYXepeJ+4Jq2vlO7XHq45vcbTqC7650aqv+CZ81aXy0gTlq66VdyGF0aon/DdY9QXGjVV9hjnoqkvt1TBKV11rb3zzY1VPgBmq+oKf3EjVZ/x0sFWX6guwlK26Vl+A5UeqnpAZqTpycZzqM3IHWXWpv9xRyKpr/TV/nrr6r1iusYa5+gMh2glnkbh6dp5xdnBVl9MjPRRPOSNc1fUcMtrpzPNW3wDgsNNZ4K2efy5QiqzVFzx5OxUcVXU5b2/BTgWhqq5Fx2inM2Wtvmdf1RtKgbV6yhYXvMJaPfuqXvCKY6peLq7ennIFYaqu5eJqkxWUs/qeLS4bXgmc1bfsF7SElzirJ8A+tOA1R1Rdyv8yqT3zCgdRdS3/MhGsaUEZq9uwsKYFz1h9z76hEy4wVk/ZNzSuOJ7q8v9odJpx5eCpbpefGD89cEX5qufv39pxxfNVzzrHhEt81TfAOFyLNNXFHvDmN64dNNXtzWOVhK36jFqerfqKWoGt+o5qkaW6vT24lmOprnaoJFzVF9TzXNVX1Atc1R9oEEmqiyWs5Uiqq62xtYSqOlooU/UZLQJT9RVNSKqLjVHNcVRXW2OrCVH1hCbKU31Bm8BTfUYjjupiU9RzFNXVpqh30FRPaKQ01dHKs1Rf0Iyiutga2yAyVNfnEM0OkuobmglJ9YRmnqP6gg4M1WWa0SESVNdpRYeDovqODkJRfUMHT1EdPQJBdVnQJd6/uq7o4giqP9BFCKrv6OIJqid0CQTV0env7Uf/jU5/bj96v8/od/QZ/TN6pzDdUfqM/hm9j5/uaPuMPuDoO/A+ne7oAbxPpjsaePQVeN8x3dEMvM9Nd7QA74vTLaEHw28vfescxR7bt9NQbDR9Ow3FRtP3043iZ9s/9uvYCkAQCKKgj9D+TKzO2Cp9lsAasc60AHzuot+t429LEt8S+CDxLYEPOtdSufnO1VQuGGVLxtjgsbcMNMnKXrGsz974tvs+McZ39X2q8V19/xq6c1vb+OlLf+1H6NqWN+7I8mcOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADzswYEAAAAAAJD/ayOoqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkp7cEgAAAAAIOj/a1+YAAAAAAAAALgEoKO2OvzgJtMAAAAASUVORK5CYII=",Aue=["src"],Pue=["src"],kue=["src"],Fue=_t(ot({__name:"ThumbnailRender",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean}},setup(e){const t=e,n=X(()=>t.value),o=X(()=>t.id),s=X(()=>t.disabled),r=X(()=>t.readOnly),i=$("");let a=null;const l=$(!1),u=X(()=>n.value==null||n.value===""),c=X(()=>!u.value&&l.value),d=()=>{l.value=!0},h=()=>{a&&URL.revokeObjectURL(a),a=null},f=()=>{i.value="",h()},p=fd(),{openSceneHub:g}=p,v=X(()=>{const b=un.getInstance().getItem("ws.code"),y=un.getInstance().getItem("BASE_URL"),E=b||t.workspaceId;return es({type:"scene_hub",config:{baseDomain:y,ws_code:E,scene_id:String(t.id)}}).url}),w=b=>{try{if(b.ctrlKey||b.metaKey){window.open(v.value,"_blank");return}g(String(t.id))}catch{window.open(v.value,"_blank")}finally{S()}},S=()=>{var E,_,I,T,F,L;(E=t.params)==null||E.api.clearFocusedCell();const b=((I=(_=t.params)==null?void 0:_.column)==null?void 0:I.getColId())||"",y=((F=(T=t.params)==null?void 0:T.node)==null?void 0:F.rowIndex)||0;(L=t.params)==null||L.api.setFocusedCell(y,b)};return Qe(()=>[o.value,n.value],async([b,y],E,_)=>{let I=!0;if(_(()=>{I=!1,h()}),l.value=!1,i.value="",!(b==null||b===""||!y))try{const T=await Due(String(b),y);if(!I||b!==o.value||y!==n.value)return;a=URL.createObjectURL(T),i.value=a}catch(T){I&&b===o.value&&y===n.value&&(console.warn("Failed to load cached thumbnail; using the original URL.",T),i.value=y)}},{immediate:!0}),Vn(f),(b,y)=>(q(),de("div",{class:le(["thumbnail-wrapper",{disabled:s.value,"read-only":r.value}]),onClick:w},[u.value?(q(),de("img",{key:0,src:V(xue),alt:"No thumbnail"},null,8,Aue)):c.value?(q(),de("img",{key:1,src:V(Iue),alt:"Broken thumbnail"},null,8,Pue)):i.value?(q(),de("img",{key:2,src:i.value,alt:"Thumbnail",onError:d},null,40,kue)):Ye("",!0)],2))}}),[["__scopeId","data-v-1fd3dd73"]]),Oue={class:"left-section"},Mue={class:"create-count"},Nue={class:"modified-template-options"},Lue=["onClick"],Vue={class:"setting-count"},Bue={class:"field-label"},$ue={class:"field-label"},Hue={class:"status-selection"},Gue={class:"preview-section"},Uue={key:0,class:"preview-list"},Wue={key:0,class:"preview-more"},zue={key:1,style:{color:"var(--tessr-text-secondary, #6b6b6b)"}},nB=1e3,oB=8,sB=7,jue=_t(ot({__name:"BulkCreateCount",props:{item:{},takeName:{},options:{default:()=>[{id:"number_up",name:"Number",icon:"ArrowLeft",description:{active:"Remove from the name",inactive:"Add a number that counts up",switch:"Switch to a number that counts up"}},{id:"number_down",name:"Number",icon:"ArrowRight",description:{active:"Remove from the name",inactive:"Add a number that counts down",switch:"Switch to a number that counts down"}},{id:"letter_up",name:"Letter",icon:"ArrowLeft",description:{active:"Remove from the name",inactive:"Add a letter that counts up",switch:"Switch to a letter that counts up"}},{id:"letter_down",name:"Letter",icon:"ArrowRight",description:{active:"Remove from the name",inactive:"Add a letter that counts down",switch:"Switch to a letter that counts down"}}]},getStatusFunc:{},workspaceId:{},entityId:{}},emits:["cancel","changed"],setup(e,{expose:t,emit:n}){const o=Kt,s=Io,r=$(null),i=$(null),a=["number","letter","name"],l={number_up:"1ā9",number_down:"9ā1",letter_up:"AāZ",letter_down:"ZāA",name:"Name"},u=$(null),c=$({}),d=(Y,re)=>{c.value[Y]=re instanceof HTMLElement?re:null},h=$(null),f=$("1"),p=e,g=$([p.takeName,{id:"number",text:"1ā9",direction:"up"}," "]),v=X(()=>{const Y=w.value;let re=1;const R="9999.",G={createCount:`${R}0`,input:`${R}1`,firstField:`${R}5`,stepField:`${R}6`,number_up:`${R}1`,number_down:`${R}2`,letter_up:`${R}3`,letter_down:`${R}4`,statusSelect:`${R}7`};return["number_up","number_down","letter_up","letter_down"].forEach((ce,Ee)=>{re++,G[ce]=`${R}${re}`}),Y?(re++,G.statusSelect=`${R}${re}`,re++,G.firstField=`${R}${re}`,re++,G.stepField=`${R}${re}`):(delete G.firstField,delete G.stepField),G}),w=X(()=>g.value.find(Y=>typeof Y!="string"&&(Y.id==="number"||Y.id==="letter"))),S=$("number"),b=$("up"),y=Fo({...Ei.number}),E=Fo({...Ei.number}),_=()=>{Object.assign(y,Ei[S.value]),Object.assign(E,Ei[S.value])};Qe(w,Y=>{if(!Y)return;const re=Y.id;re!==S.value&&(S.value=re,_()),b.value=Y.direction==="down"?"down":"up"},{immediate:!0,flush:"sync"});const I=X(()=>YO[b.value]),T=X(()=>{const Y=Number(f.value);return Number.isFinite(Y)?Math.min(nB,Math.max(0,Math.floor(Y))):0}),F=(Y,re)=>{const R=JO(S.value,Y,re);y[Y]=R,Mv(Y,R)&&(E[Y]=R)},L=$(null),x=$(null),P=$(null),k=(Y,re)=>{var G,J,ce,Ee;if(re.key==="Enter"||re.key==="Escape")return;if(re.key==="Tab"){re.preventDefault(),re.stopPropagation(),re.stopImmediatePropagation();const Ce=re.shiftKey;Y=="first"&&(Ce?(G=c.value.letter_down)==null||G.focus():(J=L.value)==null||J.focus()),Y=="step"&&(Ce?(ce=L.value)==null||ce.focus():(Ee=i.value)==null||Ee.focus());return}re.key.length===1&&!re.ctrlKey&&!re.metaKey&&!re.altKey&&!ZO(S.value,Y,re.key)&&re.preventDefault()},M=(Y,re)=>{var Ee;re.preventDefault();const R=re.target,G=((Ee=re.clipboardData)==null?void 0:Ee.getData("text/plain"))??"",J=R.selectionStart??R.value.length,ce=R.selectionEnd??R.value.length;R.value=R.value.slice(0,J)+G+R.value.slice(ce),F(Y,R.value),R.value=y[Y]},N=Y=>{if(Mv(Y,y[Y]))return;const re=Ei[S.value][Y];y[Y]=re,E[Y]=re},B=X(()=>w.value?CE({type:S.value,direction:b.value,first:E.first,step:E.step,count:T.value}):[]),z=X(()=>g.value.every(Y=>typeof Y=="string"&&!Y)),oe=X(()=>T.value===0||z.value?[]:Array.from({length:T.value}).map((Y,re)=>g.value.map(R=>typeof R=="string"?R:R.id==="name"?p.takeName:B.value[re]??"").join(""))),ie=X(()=>oe.value.length>oB?oe.value.length-sB:0),te=X(()=>oe.value.length>oB?oe.value.slice(0,sB):oe.value),se=Y=>{A.value=[Y];const re=Y.id.split("_")[0],R=Y.id.split("_")[1],G=l[Y.id],J=r.value;if(!J)return;const ce=Ce=>g.value.find(Ne=>typeof Ne!="string"&&Ce.includes(Ne.id));if(re==="name"){ce(["name"])?J.deleteTag("name"):J.insertTag({id:re,text:G,direction:void 0});return}const Ee=ce(["number","letter"]);if(Ee){const Ce=Ee.id===re,Ne=Ee.direction===R;if(Ce&&Ne){J.deleteTag(Ee.id);return}J.deleteTag(Ee.id),J.insertTag({id:re,text:G,direction:R})}else J.insertTag({id:re,text:G,direction:R})},Z=Y=>j(Y.id)?Y.description.active:!!w.value&&Y.description.switch?Y.description.switch:Y.description.inactive,A=$(null),j=Y=>{const[re,R]=Y.split("_");return g.value.some(G=>typeof G!="string"&&G.id===re&&G.direction===R)},ne=n,ge=X(()=>{const[Y]=g.value;return g.value.length===1&&typeof Y!="string"&&Y.id==="name"});X(()=>g.value.length===0||ge.value);const xe=()=>{const Y=g.value.map(re=>typeof re=="string"?{type:"text",value:re}:re.id==="name"?{type:"current_name"}:{type:"counter",value:y.first,direction:re.direction=="up"?"asc":"desc",format:re.id==="number"?"number":"letter",step:y.step});ne("changed",{data:Y,count:T.value,template_flow_status_id:u.value||void 0})};Qe([g,f,y,u],()=>{xe()},{deep:!0,immediate:!0}),t({reset:()=>{A.value=null,g.value=[]},focus:()=>{var Y;(Y=i.value)==null||Y.focus()}}),Xt(()=>{var Y;(Y=i.value)==null||Y.focus()});const K=Y=>{var re,R;Y.preventDefault(),Y.stopPropagation(),(re=i.value)==null||re.blur(),(R=h.value)==null||R.focus()};return(Y,re)=>(q(),de("div",{class:"bulk-rename-core",ref_key:"popupRef",ref:h,tabindex:"-1"},[Se("div",Oue,[Se("div",Mue,[re[11]||(re[11]=Se("span",null,"How many to create?",-1)),ze(ye(V(hl),{modelValue:f.value,"onUpdate:modelValue":re[0]||(re[0]=R=>f.value=R),type:"number","max-value":nB,"max-decimal-char":0,"show-clear":!1,ref_key:"counterRef",ref:i,placeholder:""},null,8,["modelValue"]),[[V(s),v.value.createCount]])]),ze(ye(VN,{modelValue:g.value,"onUpdate:modelValue":re[1]||(re[1]=R=>g.value=R),"allowed-tags":a,ref_key:"templateInputRef",ref:r,placeholder:"Enter name",onEscape:K},null,8,["modelValue"]),[[V(s),v.value.input]]),Se("div",Nue,[(q(!0),de(Pt,null,xn(e.options,R=>ze((q(),de("button",{onClick:G=>se(R),ref_for:!0,ref:G=>d(R.id,G),key:R.id,class:le([{active:j(R.id)},"template-option"])},[tt(at(R.name)+" ",1),R.icon?(q(),je(V(gt),{key:0,src:R.icon,style:{transform:"rotate(90deg)"}},null,8,["src"])):Ye("",!0)],10,Lue)),[[V(o),{content:Z(R),bypassOverflowCheck:!0,delay:[300,0],interactive:!1,hideOnClick:!1,appendTo:"parent"}],[V(s),`${v.value[R.id]}`]])),128))]),Se("div",Vue,[Se("span",Bue,at(I.value.first),1),ze((q(),je(V(hl),{ref_key:"firstFieldRef",ref:x,"model-value":y.first,disabled:!w.value,"max-length":V(yE),onInput:re[2]||(re[2]=R=>F("first",R)),onKeydown:re[3]||(re[3]=R=>k("first",R)),onPaste:re[4]||(re[4]=R=>M("first",R)),onBlur:re[5]||(re[5]=R=>N("first")),"show-clear":!1},{clear:we(()=>[...re[12]||(re[12]=[Se("div",null,null,-1)])]),_:1},8,["model-value","disabled","max-length"])),[[V(s),v.value.firstField]]),Se("span",$ue,at(I.value.step),1),ze(ye(V(hl),{"model-value":y.step,disabled:!w.value,"max-length":V(wE),onInput:re[6]||(re[6]=R=>F("step",R)),onKeydown:re[7]||(re[7]=R=>k("step",R)),onPaste:re[8]||(re[8]=R=>M("step",R)),onBlur:re[9]||(re[9]=R=>N("step")),"show-clear":!1,ref_key:"fieldStepRef",ref:L},null,8,["model-value","disabled","max-length"]),[[V(s),v.value.stepField]])]),Se("div",Hue,[re[13]||(re[13]=Se("span",null,"Status",-1)),ye(V(wL),{modelValue:u.value,"onUpdate:modelValue":re[10]||(re[10]=R=>u.value=R),"get-status-func":p.getStatusFunc,"workspace-id":p.workspaceId,id:p.entityId,style:{width:"100%"},"max-width":"372px",ref_key:"selectStatusRef",ref:P,"focus-index":v.value.statusSelect},null,8,["modelValue","get-status-func","workspace-id","id","focus-index"])])]),Se("div",Gue,[re[14]||(re[14]=Se("span",{class:"preview-title"},"Preview",-1)),te.value.length>0?(q(),de("ul",Uue,[(q(!0),de(Pt,null,xn(te.value,(R,G)=>(q(),de("li",{key:G},[ye($N,{text:R},null,8,["text"])]))),128)),ie.value>0?(q(),de("li",Wue," ⦠"+at(ie.value)+" more ",1)):Ye("",!0)])):(q(),de("div",zue," Add a name or a counter to see a preview. "))])],512))}}),[["__scopeId","data-v-744a8ab0"]]),rB={text:yl,id:void 0,assignees:Mse,status:KN,dateRange:Nse,isStarted:yl,isCompleted:yl,lastUpdated:yl,completedOn:yl,isDeleted:yl,isArchived:yl,isProcessing:yl,name:GN,options:CQ,metric:zN,__checkboxSelection:void 0,description:Vie,thumbnail:Fue},Kue={text:!1,id:!1,assignees:!0,status:!0,dateRange:!0,isStarted:!1,isCompleted:!1,lastUpdated:!1,completedOn:!1,isDeleted:!1,isArchived:!1,isProcessing:!1,name:!1,options:!0,metric:!1,__checkboxSelection:!1,description:!1,thumbnail:!1},que={text:null,id:void 0,assignees:oM,status:NN,dateRange:Lse,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:GN,options:UN,metric:void 0,__checkboxSelection:void 0,description:void 0,thumbnail:void 0},Yue={id:[100,100],assignees:[200,200],status:[200,200],dateRange:[255,255],isStarted:[150,150],isCompleted:[150,150],lastUpdated:[180,180],completedOn:[180,180],isDeleted:[void 0,void 0],isArchived:[void 0,void 0],isProcessing:[void 0,void 0],name:[350,500],options:[50,50],metric:[200,300],__checkboxSelection:[50,50],text:[200,300],description:[200,300],thumbnail:[82,82]},Xue={dateRange:{cellEditorPopupPosition:"under",cellEditorPopup:!1},name:{cellEditorPopupPosition:"over",cellEditor:!1,cellEditorPopup:!1},metric:{suppressKeyboardEvent:void 0,suppressNavigable:!1,suppressMovable:!1,cellClass:"ag-cell-optimized",editable:!0}},Zue=e=>{var t,n,o;if(e){if(Number((t=e.metric_type)==null?void 0:t.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number((n=e.metric_type)==null?void 0:n.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number((o=e.metric_type)==null?void 0:o.id)==3)return}},Ld=e=>{if(e)return Zue(e)};function iB(e,t){var s,r,i,a;const n=(s=t==null?void 0:t.data)==null?void 0:s.permissions;let o={disabled:!1,readOnly:!1,type:void 0};if(!t||!e)o={disabled:!1,readOnly:!0,type:void 0};else if(e==="options")o={disabled:!1,readOnly:!1,type:void 0};else if(e!=null&&e.includes("metric")){const l=`metric_permission_${e==null?void 0:e.replace("metric_","")}`;o={disabled:!1,readOnly:!((t==null?void 0:t.data)&&t.data[l]&&((r=t.data[l])==null?void 0:r.permission)==2&&!((i=t.colDef)!=null&&i.context.formula)&&!t.data.isLocked&&!t.data.isDeleted),type:Ld((a=t.colDef)==null?void 0:a.context)}}else{const u={assignees:(n==null?void 0:n.has_update_assignee_permission)??0,completedOn:0,name:(n==null?void 0:n.has_edit_permission)??0,permissions:0,status:(n==null?void 0:n.has_edit_template_flow_status_permission)??0,dateRange:(n==null?void 0:n.has_edit_date_permission)??0,isStarted:0,isDeleted:0,isArchived:0,isLocked:0,isProcessing:0,lastUpdated:0,id:0,isCompleted:0,options:1,disabled:0,description:(n==null?void 0:n.has_edit_permission)??0,thumbnail:1}[e]??0;o={disabled:u===-1,readOnly:u!==1,type:void 0}}return o}class r_{constructor(){Rn(this,"eGui");Rn(this,"params")}init(t){this.params=t}getGui(){var n,o,s,r,i;const t=document.createElement("div");return(n=this.params)!=null&&n.height&&t.style.setProperty("--height",(o=this.params)==null?void 0:o.height),(s=this.params)!=null&&s.width?t.style.setProperty("--width",(r=this.params)==null?void 0:r.width):(i=this.params)!=null&&i.fullwidth?t.style.setProperty("--width","100%"):t.style.setProperty("--width",`${Math.floor(Math.random()*50)+50}%`),t.className="ag-cell-skeleton",t.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation()}),this.eGui=t,t}refresh(t){return!1}getValue(){var t;return(t=this.params)==null?void 0:t.value}isPopup(t){return!1}getPopupPosition(){}destroy(){}}const aB=new Map;class Tp{static initialize(t){this.wrappers=t}static getWrappers(){if(!this.wrappers)throw new Error("CellRendererFactory: Not initialized. Please call CellRendererFactory.initialize() first.");return this.wrappers}static buildCommonCellParams(t,n){var u,c,d;const o=t.data||((u=t.node)==null?void 0:u.data),s=(c=t.colDef)==null?void 0:c.field,r=s&&o?o[s]:void 0,i=iB((d=t.colDef)==null?void 0:d.field,t),a=typeof n=="function"?n(t):n??{};return{...t,value:r,disabled:i==null?void 0:i.disabled,readOnly:i==null?void 0:i.readOnly,type:Ld(t.context),...a}}static resolveRendererComponent(t,n){let o;return t.includes("metric")&&rB.metric?Ld(n)==="rating"?o=kie:o=zN:o=rB[t]??void 0,o}static resolveEditorComponent(t,n){const o=t.includes("metric");let s;const r=Ld(n);return o&&["number","dropdown"].includes(r)?s=Wre:s=que[t],s}static canEditField(t,n){var r;if(n.data===void 0)return!1;const o=iB((r=n.colDef)==null?void 0:r.field,n),s=Kue[t]??!0;return!(o!=null&&o.disabled)&&!(o!=null&&o.readOnly)&&s&&(o==null?void 0:o.type)!=="rating"}static resolveSize(t){const[n=250,o=300]=Yue[t]??[];return{minWidth:n,maxWidth:o}}static buildHeaderComponentParams(t){return n=>typeof t=="function"?t(n):t??{}}static fromType(t){const{wrapVueCellEditor:n}=this.getWrappers(),o=String(t.field??""),s=this.resolveSize(o),r=Xue[o]??{},i=Ld(t.context),a=i==="number"||i==="rating",l=i=="rating"?t.context.range*24+20:s.minWidth;return{...t,headerName:t.headerName,...s,...t,cellEditorSelector:c=>{const d=this.resolveEditorComponent(o,t.context);return{component:n(d),params:this.buildCommonCellParams(c,t.cellRendererParams),popup:!a}},singleClickEdit:!0,cellEditorPopup:!a,cellEditorPopupPosition:a?void 0:"under",editable:c=>{let d;return c.data===void 0||c.data.isDeleted||c.node.data===void 0?d=!1:d=this.canEditField(o,c),d},minWidth:l,cellRendererSelector:c=>Jue(c,{component:n(this.resolveRendererComponent(o,t.context)),params:this.buildCommonCellParams(c,t.cellRendererParams)}),headerComponentParams:this.buildHeaderComponentParams(t.headerComponentParams),...r,cellClass:c=>`${i}--${c.colDef.field}`}}}Rn(Tp,"wrappers",null);const Jue=(e,t)=>{var s;const n=(s=e.colDef)==null?void 0:s.field,o=`${n}-${e.node.rowIndex}`;return aB.set(o,(aB.get(o)??0)+1),n!=null&&n.includes("metric")?e.value===void 0?{component:r_,params:{fullwidth:!1}}:t:e.data&&(n!=null&&n.includes("thumbnail"))||e.data&&e.value!==void 0?t:!n||n==="options"||n==="__checkboxSelection"?e.data?t:{component:r_,params:{fullwidth:!0,width:"24px",height:"24px"}}:!e.data||e.value===void 0?{component:r_,params:{fullwidth:!1}}:t},Que=_t(ot({__name:"Vue3Wrapper",props:{component:{},params:{},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},tooltip:{},isNoData:{type:Boolean,default:!1},workspaceId:{},entityId:{},axiosService:{},isSearching:{type:Boolean,default:!1},isFiltering:{type:Boolean,default:!1},sortType:{default:"default"},maxRating:{default:5},config:{}},setup(e,{expose:t}){const n=e,o=$(null),s=X(()=>{var a;return((a=n.component)==null?void 0:a.name)||"UnknownComponent"}),r=X(()=>{var a;return((a=n.component)==null?void 0:a.default)||n.component}),i=X(()=>({params:n.params,disabled:n.disabled,readOnly:n.readOnly,value:n.value,maxRating:n.maxRating,data:n.data,id:n.id,workspaceId:n.workspaceId,entityId:n.entityId,axiosService:n.axiosService,tooltip:n.tooltip,isSearching:n.isSearching,isFiltering:n.isFiltering,isNoData:n.isNoData,config:n.config}));return t({focus:()=>{var a;return(a=o.value)!=null&&a.focus?o.value.focus():console.warn(`Component ${s.value} does not have a focus method.`),!0},blur:()=>{var a,l;return(l=(a=o.value)==null?void 0:a.blur)==null||l.call(a),!0},trigger:(a,l)=>{var u;return(u=o.value)==null||u.$emit(a,l),!0}}),(a,l)=>(q(),je(OC(r.value),jt(i.value,{ref_key:"componentRef",ref:o}),null,16))}}),[["__cssModules",{$style:{skeleton:"_skeleton_7xde7_1",shimmer:"_shimmer_7xde7_16","skeleton-loading":"_skeleton-loading_7xde7_1"}}]]);function ece(e){return"stopEditing"in e}const tce=8,nce=e=>{if(!e)return;const t=e.__vueParentComponent,n=t==null?void 0:t.exposed;n&&typeof n.triggerFocus=="function"?n.triggerFocus():e.focus()};function lB(e){return class{constructor(){Rn(this,"container");Rn(this,"vNode",null);Rn(this,"componentInstance",null);Rn(this,"componsenExposed",null);Rn(this,"params");Rn(this,"isEditor",!1);Rn(this,"_destroyed",!1)}init(n){var l,u,c,d;if(!n){console.error("[Vue3CellWrapper] Missing params");return}const o=performance.now();this.params=n,this.isEditor=ece(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper"),this.container.style.width="100%",this.container.style.height="100%";const s=n.context.apiClass,r=n,i={component:e,params:Object.freeze(n),disabled:!1,readOnly:r.readOnly??!1,value:n.value,maxRating:r.maxRating??void 0,data:n.data,id:(l=n==null?void 0:n.data)==null?void 0:l.id,workspaceId:n.context.workspaceId,entityId:n.context.entityId,axiosService:s,tooltip:r.tooltip??void 0,isSearching:r.isSearching??!1,isFiltering:r.isFiltering??!1,isNoData:r.isNoData??!1,config:r.config,sceneId:(r==null?void 0:r.sceneId)||void 0};this.vNode=ye(Que,i),rb(this.vNode,this.container);const a=performance.now()-o;a>tce&&console.warn(`[Vue3CellWrapper] Slow render (${a.toFixed(1)}ms) for "${(u=n.colDef)==null?void 0:u.field}"`),this.componentInstance=(c=this.vNode.component)==null?void 0:c.proxy,this.componsenExposed=(d=this.vNode.component)==null?void 0:d.exposed}getGui(){return this.container}refresh(n){return!1}focusUi(){var n;(n=this.componsenExposed)!=null&&n.focus?this.componsenExposed.focus():nce(this.container)}getValue(){var n,o,s;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((s=(o=this.componentInstance).getValue)==null?void 0:s.call(o))??this.componentInstance.value:(console.warn("[Vue3CellWrapper] getValue() called but component instance not available"),(n=this.params)==null?void 0:n.value)}isPopup(n){var i,a,l,u,c;const o=(l=(a=(i=this.params)==null?void 0:i.colDef)==null?void 0:a.field)==null?void 0:l.includes("metric"),s=((u=this.params)==null?void 0:u.context)&&Ld(this.params.context);return o||(s==="number"||s==="rating")||!this.isEditor?!1:(c=this.componentInstance)!=null&&c.isPopup?this.componentInstance.isPopup():!0}getPopupPosition(){var o,s,r;return this.isEditor?(o=this.componentInstance)!=null&&o.getPopupPosition?this.componentInstance.getPopupPosition():((r=(s=this.params)==null?void 0:s.colDef)==null?void 0:r.cellEditorPopupPosition)??"under":void 0}afterGuiAttached(){!this.isEditor||this.componentInstance}destroy(){if(!this._destroyed&&(this._destroyed=!0,!!this.container))try{const n=this.componentInstance;if(n){try{typeof n.$destroy=="function"&&n.$destroy()}catch(s){console.warn("[Vue3CellWrapper] Error during $destroy:",s)}try{typeof n.destroy=="function"&&n.destroy()}catch(s){console.warn("[Vue3CellWrapper] Error during destroy():",s)}}(typeof queueMicrotask=="function"?queueMicrotask:s=>Promise.resolve().then(s))(()=>{try{rb(null,this.container)}catch(s){console.warn("[Vue3CellWrapper] Error during unmount:",s)}finally{this.container.textContent=""}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function My(e){return lB(e)}function uB(e){return lB(e)}var Wu=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,n){const o=t?this.allAsyncListeners:this.allSyncListeners;let s=o.get(e);return!s&&n&&(s=new Set,o.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,n=!1){this.getListeners(e,n,!0).add(t)}removeEventListener(e,t,n=!1){const o=this.getListeners(e,n,!1);o&&(o.delete(t),o.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const n=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:o}=this,s=a=>{const l=o?()=>o.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},r=this.getListeners(n,t,!1);if(((r==null?void 0:r.size)??0)>0){const a=new Set(r);for(const l of a)r!=null&&r.has(l)&&s(()=>l(e))}const i=this.getGlobalListeners(t);if(i.size>0){const a=new Set(i);for(const l of a)s(()=>l(n,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}};function Ia(e){return e==null||e===""?null:e}function ft(e){return e!=null&&e!==""}function Gn(e){return!ft(e)}function i_(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Dp(e,t){const n=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return n===o}function oce(e,t,n=!1){const o=e==null,s=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),o&&s)return 0;if(o)return-1;if(s)return 1;function r(i,a){return i>a?1:i<a?-1:0}if(typeof e!="string"||!n)return r(e,t);try{return e.localeCompare(t)}catch{return r(e,t)}}var sce=/[&<>"']/g,rce={"&":"&","<":"<",">":">",'"':""","'":"'"};function Vd(e){return(e==null?void 0:e.toString().toString())??null}function Ip(e){var t;return((t=Vd(e))==null?void 0:t.replace(sce,n=>rce[n]))??null}function Ai(e){return e.eRootDiv.getRootNode()}function Kn(e){return Ai(e).activeElement}function $o(e){const{gos:t,eRootDiv:n}=e;let o=null;const s=t.get("getDocument");return s&&ft(s)?o=s():n&&(o=n.ownerDocument),o&&ft(o)?o:document}function cB(e){const t=Kn(e);return t===null||t===$o(e).body}function dB(e){return $o(e).defaultView||window}function a_(e){let t=null,n=null;try{t=$o(e).fullscreenElement}catch{}finally{t||(t=Ai(e));const o=t.querySelector("body");o?n=o:t instanceof ShadowRoot?n=t:t instanceof Document?n=t==null?void 0:t.documentElement:n=t}return n}function ice(e){const t=a_(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function ace(e){const t=a_(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Qr(e,t,n){n==null||typeof n=="string"&&n==""?hB(e,t):Ir(e,t,n)}function Ir(e,t,n){e.setAttribute(fB(t),n.toString())}function hB(e,t){e.removeAttribute(fB(t))}function fB(e){return`aria-${e}`}function Dl(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function lce(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function uce(e){return e.getAttribute("aria-label")}function Bd(e,t){Qr(e,"label",t)}function xp(e,t){Qr(e,"labelledby",t)}function pB(e,t){Qr(e,"live",t)}function cce(e,t){Qr(e,"atomic",t)}function dce(e,t){Qr(e,"relevant",t)}function hce(e,t){Qr(e,"invalid",t)}function fce(e,t){Qr(e,"disabled",t)}function gB(e,t){Qr(e,"hidden",t)}function l_(e,t){Ir(e,"expanded",t)}function pce(e,t){Ir(e,"setsize",t)}function gce(e,t){Ir(e,"posinset",t)}function mce(e,t){Ir(e,"multiselectable",t)}function vce(e,t){Ir(e,"rowcount",t)}function Ny(e,t){Ir(e,"rowindex",t)}function yce(e,t){Ir(e,"rowspan",t)}function wce(e,t){Ir(e,"colcount",t)}function mB(e,t){Ir(e,"colindex",t)}function Cce(e,t){Ir(e,"colspan",t)}function bce(e,t){Ir(e,"sort",t)}function Sce(e){hB(e,"sort")}function vB(e,t){Qr(e,"selected",t)}function Ece(e,t){Qr(e,"controls",t)}function _ce(e,t){Ece(e,t.id),xp(t,e.id)}function yB(e,t){Qr(e,"owns",t)}function Ly(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Rce="[tabindex], input, select, button, textarea, [href]",wB="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Ap(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(wB)?!1:Pi(e)}function Un(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-hidden",!t),o||gB(e,!t)}function Tce(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-invisible",!t),o||gB(e,!t)}function Pp(e,t){const n="disabled",o=t?r=>r.setAttribute(n,""):r=>r.removeAttribute(n);o(e);const s=e.querySelectorAll("input")??[];for(const r of s)o(r)}function zu(e,t,n){let o=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n=="number"){if(++o>n)break}else if(e===n)break}return!1}function ju(e){const{height:t,width:n,borderTopWidth:o,borderRightWidth:s,borderBottomWidth:r,borderLeftWidth:i,paddingTop:a,paddingRight:l,paddingBottom:u,paddingLeft:c,marginTop:d,marginRight:h,marginBottom:f,marginLeft:p,boxSizing:g}=window.getComputedStyle(e),v=Number.parseFloat;return{height:v(t||"0"),width:v(n||"0"),borderTopWidth:v(o||"0"),borderRightWidth:v(s||"0"),borderBottomWidth:v(r||"0"),borderLeftWidth:v(i||"0"),paddingTop:v(a||"0"),paddingRight:v(l||"0"),paddingBottom:v(u||"0"),paddingLeft:v(c||"0"),marginTop:v(d||"0"),marginRight:v(h||"0"),marginBottom:v(f||"0"),marginLeft:v(p||"0"),boxSizing:g}}function u_(e){const t=ju(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function kp(e){const t=ju(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function CB(e){const{height:t,marginBottom:n,marginTop:o}=ju(e);return Math.floor(t+n+o)}function Vy(e){const{width:t,marginLeft:n,marginRight:o}=ju(e);return Math.floor(t+n+o)}function bB(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:o,borderRightWidth:s,borderBottomWidth:r}=ju(e);return{top:t.top+(n||0),left:t.left+(o||0),right:t.right+(s||0),bottom:t.bottom+(r||0)}}function By(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function $y(e,t,n){n&&(t*=-1),e.scrollLeft=t}function qo(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function ei(e){e!=null&&e.parentNode&&e.remove()}function SB(e){return!!e.offsetParent}function Pi(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!SB(e)||window.getComputedStyle(e).visibility!=="visible")}function c_(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function EB(e,t,n){n&&n.nextSibling===t||(e.firstChild?n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function _B(e,t){for(let n=0;n<t.length;n++){const o=t[n],s=e.children[n];s!==o&&e.insertBefore(o,s)}}function Dce(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Fp(e,t){if(t)for(const n of Object.keys(t)){const o=t[n];if(!(n!=null&&n.length)||o==null)continue;const s=Dce(n),r=o.toString(),i=r.replace(/\s*!important/g,""),a=i.length!=r.length?"important":void 0;e.style.setProperty(s,i,a)}}function Hy(e){return()=>{const t=e();return t?d_(t)||RB(t):!0}}function d_(e){return e.clientWidth<e.scrollWidth}function RB(e){return e.clientHeight<e.scrollHeight}function Gy(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):ki(e,t)}function ki(e,t){t=h_(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Op(e,t){t=h_(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function h_(e){return typeof e=="number"?`${e}px`:e}function f_(e){return e instanceof Node||e instanceof HTMLElement}function Js(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Il(e,t,n){const s=dB(e).ResizeObserver,r=s?new s(n):null;return r==null||r.observe(t),()=>r==null?void 0:r.disconnect()}function xa(e,t){const n=dB(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var TB="data-ref",p_;function DB(){return p_??(p_=document.createTextNode(" ")),p_.cloneNode()}function Mp(e){const{attrs:t,children:n,cls:o,ref:s,role:r,tag:i}=e,a=document.createElement(i);if(o&&(a.className=o),s&&a.setAttribute(TB,s),r&&a.setAttribute("role",r),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(n)if(typeof n=="string")a.textContent=n;else{let l=!0;for(const u of n)u&&(typeof u=="string"?(a.appendChild(document.createTextNode(u)),l=!1):typeof u=="function"?a.appendChild(u()):(l&&(a.appendChild(DB()),l=!1),a.append(Mp(u)),a.appendChild(DB())))}return a}var Ice=["touchstart","touchend","touchmove","touchcancel","scroll"],xce=["wheel"],g_={},IB=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof g_[n]=="boolean")return g_[n];const o=document.createElement(e[n]||"div");return n="on"+n,g_[n]=n in o}})();function Ace(e,t){return!t||!e?!1:kce(t).indexOf(e)>=0}function Pce(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function kce(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Pce(t)}function Fce(e,t,n){const o=Oce(t);let s;o!=null&&(s={passive:o}),e.addEventListener(t,n,s)}var Oce=e=>{const t=Ice.includes(e),n=xce.includes(e);if(t)return!0;if(n)return!1};function xB(e,t,n){if(n===0)return!1;const o=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(o,s)<=n}var Np=(e,t)=>{const n=e.identifier;for(let o=0,s=t.length;o<s;++o){const r=t[o];if(r.identifier===n)return r}return null};function Lp(e,t){return e.gos.isElementInThisInstance(t.target)}function Mce(e,t,n){const s=e.getBoundingClientRect().height,r=ice(n)-2,i=ace(n)-2;if(!e.offsetParent)return;const l=bB(e.offsetParent),{clientY:u,clientX:c}=t;let d=u-l.top-s/2,h=c-l.left-10;const f=$o(n),p=f.defaultView||window,g=p.pageYOffset||f.documentElement.scrollTop,v=p.pageXOffset||f.documentElement.scrollLeft;r>0&&h+e.clientWidth>r+v&&(h=r+v-e.clientWidth),h<0&&(h=0),i>0&&d+e.clientHeight>i+g&&(d=i+g-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var Uy=(e,...t)=>{for(const n of t){const[o,s,r,i]=n;o.addEventListener(s,r,i),e.push(n)}},m_=e=>{if(e){for(const[t,n,o,s]of e)t.removeEventListener(n,o,s);e.length=0}},xl=e=>{e.cancelable&&e.preventDefault()};function Nce(e,t){return t}function AB(e){return(e==null?void 0:e.getLocaleTextFunc())??Nce}function Lce(e,t,n,o){const s=t[n];return e.getLocaleTextFunc()(n,typeof s=="function"?s(o):s,o)}function Vce(e){return(t,n,o)=>e({key:t,defaultValue:n,variableValues:o})}function Bce(e){return(t,n,o)=>{let s=e==null?void 0:e[t];if(s&&(o!=null&&o.length)){let r=0;for(;!(r>=o.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",o[r++])}return s??n}}var Fi=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,n){this.localEventService||(this.localEventService=new Wu),this.localEventService.addEventListener(e,t,n)}removeEventListener(e,t,n){var o;(o=this.localEventService)==null||o.removeEventListener(e,t,n)}dispatchLocalEvent(e){var t;(t=this.localEventService)==null||t.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const n=[];for(const o of Object.keys(t)){const s=t[o];s&&n.push(this._setupListener(e,o,s))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let o;if($ce(e))e.__addEventListener(t,n),o=()=>(e.__removeEventListener(t,n),null);else{const s=Hce(e);e instanceof HTMLElement?Fce(e,t,n):s?e.addListener(t,n):e.addEventListener(t,n),o=s?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}setupPropertyListener(e,t){const{gos:n}=this;n.addPropertyEventListener(e,t);const o=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const n=e.join("-")+this.propertyListenerId++,o=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=s.changeSet.id}const r={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(r)};for(const s of e)this.setupPropertyListener(s,o)}getLocaleTextFunc(){return AB(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}createBean(e,t,n){return(t||this.stubContext).createBean(e,n)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function $ce(e){return e.__addEventListener!==void 0}function Hce(e){return e.eventServiceType==="global"}var qe=class extends Fi{},PB={};function v_(e,t){PB[t]||(e(),PB[t]=!0)}var Gce={pending:!1,funcs:[]},Uce={pending:!1,funcs:[]};function y_(e,t="setTimeout",n){const o=t==="raf"?Uce:Gce;if(o.funcs.push(e),o.pending)return;o.pending=!0;const s=()=>{const r=o.funcs.slice();o.funcs.length=0,o.pending=!1;for(const i of r)i()};t==="raf"?xa(n,s):window.setTimeout(s,0)}function Yo(e,t,n){let o;return function(...s){const r=this;window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(r,s)},n)}}function kB(e,t){let n=0;return function(...o){const s=this,r=Date.now();r-n<t||(n=r,e.apply(s,o))}}function Wce(e,t,n,o=100){const s=Date.now();let r=null,i=!1;const a=()=>{r!=null&&(window.clearInterval(r),r=null)};e.addDestroyFunc(a);const l=()=>{const u=Date.now()-s>o;(t()||u)&&(n(),i=!0,a())};l(),i||(r=window.setInterval(l,10))}var FB=new Set(["__proto__","constructor","prototype"]);function zce(e,t){if(e!=null){if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(n.toString(),e[n]);return}for(const n of Object.keys(e).filter(o=>!FB.has(o)))t(n,e[n])}}function vs(e,t,n=!0,o=!1){ft(t)&&zce(t,(s,r)=>{let i=e[s];i!==r&&(o&&i==null&&r!=null&&typeof r=="object"&&r.constructor===Object&&(i={},e[s]=i),OB(r)&&OB(i)&&!Array.isArray(i)?vs(i,r,n,o):(n||r!==void 0)&&(e[s]=r))})}function OB(e){return typeof e=="object"&&e!==null}var w_=class Ga{static applyGlobalGridOptions(t){if(!Ga.gridOptions)return{...t};let n={};return vs(n,Ga.gridOptions,!0,!0),Ga.mergeStrategy==="deep"?vs(n,t,!0,!0):n={...n,...t},Ga.gridOptions.context&&(n.context=Ga.gridOptions.context),t.context&&(Ga.mergeStrategy==="deep"&&n.context&&vs(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(Ga.mergeStrategy==="deep"){const o=jce(t);if(o&&typeof o=="object"&&typeof n=="object")return Ga.applyGlobalGridOptions({[t]:n})[t]}return n}};w_.gridOptions=void 0,w_.mergeStrategy="shallow";var C_=w_;function jce(e){var t;return(t=C_.gridOptions)==null?void 0:t[e]}var Kce={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,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,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!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,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!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,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},MB="https://www.ag-grid.com";function Al(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function Vp(e,...t){v_(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function $d(e,...t){v_(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var NB=new Set,Wy={},Hd={},zy,LB=!1,VB=!1,qce=!1;function Yce(e){const[t,n]=e.version.split(".")||[],[o,s]=zy.split(".")||[];return t===o&&n===s}function Xce(e){var o;zy||(zy=e.version);const t=s=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${s} Please update all modules to the same version.`;e.version?Yce(e)||$d(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${zy}.`)):$d(t(`'${e.moduleName}' is incompatible.`));const n=(o=e.validate)==null?void 0:o.call(e);n&&!n.isValid&&$d(`${n.message}`)}function Bp(e,t,n=!1){n||(LB=!0),Xce(e);const o=e.rowModels??["all"];NB.add(e);let s;t!==void 0?(VB=!0,Hd[t]===void 0&&(Hd[t]={}),s=Hd[t]):s=Wy;for(const r of o)s[r]===void 0&&(s[r]={}),s[r][e.moduleName]=e;if(e.dependsOn)for(const r of e.dependsOn)Bp(r,t,n)}function Zce(e){delete Hd[e]}function b_(e,t,n){const o=s=>{var r,i,a;return!!((r=Wy[s])!=null&&r[e])||!!((a=(i=Hd[t])==null?void 0:i[s])!=null&&a[e])};return o(n)||o("all")}function S_(){return VB}function Jce(e,t){const n=Hd[e]??{};return[...Object.values(Wy.all??{}),...Object.values(n.all??{}),...Object.values(Wy[t]??{}),...Object.values(n[t]??{})]}function Qce(){return new Set(NB)}function ede(){return LB}function BB(){return qce}var tde=class{static register(e){Bp(e,void 0)}static registerModules(e){for(const t of e)Bp(t,void 0)}},ct="34.3.1",$B=2e3,HB=100,GB="_version_",jy=null,Gd=`${MB}/javascript-data-grid`;function nde(e){jy=e}function ode(e){Gd=e}function UB(e,t,n){return(jy==null?void 0:jy(e,t))??[ade(e,t,n)]}function E_(e,t,n,o,s){e(`${o?"warning":"error"} #${t}`,...UB(t,n,s))}function sde(e){if(!e)return String(e);const t={};for(const n of Object.keys(e))typeof e[n]!="object"&&typeof e[n]!="function"&&(t[n]=e[n]);return JSON.stringify(t)}function rde(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=sde(e)),t}function Ky(e){return e===void 0?"undefined":e===null?"null":e}function __(e,t){return`${e}?${t.toString()}`}function ide(e,t,n){const o=Array.from(t.entries()).sort((r,i)=>i[1].length-r[1].length);let s=__(e,t);for(const[r,i]of o){if(r===GB)continue;const a=s.length-n;if(a<=0)break;const l="...",u=a+l.length,c=i.length-u>HB?i.slice(0,i.length-u)+l:i.slice(0,HB)+l;t.set(r,c),s=__(e,t)}return s}function WB(e,t){const n=new URLSearchParams;if(n.append(GB,ct),t)for(const r of Object.keys(t))n.append(r,rde(t[r]));const o=`${Gd}/errors/${e}`,s=__(o,n);return s.length<=$B?s:ide(o,n,$B)}var ade=(e,t,n)=>{const o=WB(e,t),s=`${n?n+`
|
|
193
|
+
*/const kle="9.14.5";function Fle(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Ra().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Ra().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Ra().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Ra().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Ra().__INTLIFY_PROD_DEVTOOLS__=!1)}const AV=ms.__EXTEND_POINT__,Da=Ry(AV),jn={FALLBACK_TO_ROOT:AV,NOT_SUPPORTED_PRESERVE:Da(),NOT_SUPPORTED_FORMATTER:Da(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:Da(),NOT_SUPPORTED_GET_CHOICE_INDEX:Da(),COMPONENT_NAME_LEGACY_COMPATIBLE:Da(),NOT_FOUND_PARENT_SCOPE:Da(),IGNORE_OBJ_FLATTEN:Da(),NOTICE_DROP_ALLOW_COMPOSITION:Da(),NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG:Da()},Ole={[jn.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[jn.NOT_SUPPORTED_PRESERVE]:"Not supported 'preserve'.",[jn.NOT_SUPPORTED_FORMATTER]:"Not supported 'formatter'.",[jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE]:"Not supported 'preserveDirectiveContent'.",[jn.NOT_SUPPORTED_GET_CHOICE_INDEX]:"Not supported 'getChoiceIndex'.",[jn.COMPONENT_NAME_LEGACY_COMPATIBLE]:"Component name legacy compatible: '{name}' -> 'i18n'",[jn.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[jn.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[jn.NOTICE_DROP_ALLOW_COMPOSITION]:"'allowComposition' option will be dropped in the next major version. For more information, please see š https://tinyurl.com/2p97mcze",[jn.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG]:"'translateExistCompatible' option will be dropped in the next major version."};function Is(e,...t){return P0(Ole[e],...t)}const PV=Bo.__EXTEND_POINT__,xs=Ry(PV),fn={UNEXPECTED_RETURN_TYPE:PV,INVALID_ARGUMENT:xs(),MUST_BE_CALL_SETUP_TOP:xs(),NOT_INSTALLED:xs(),NOT_AVAILABLE_IN_LEGACY_MODE:xs(),REQUIRED_VALUE:xs(),INVALID_VALUE:xs(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:xs(),NOT_INSTALLED_WITH_PROVIDE:xs(),UNEXPECTED_ERROR:xs(),NOT_COMPATIBLE_LEGACY_VUE_I18N:xs(),BRIDGE_SUPPORT_VUE_2_ONLY:xs(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:xs(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:xs(),__EXTEND_POINT__:xs()};function ko(e,...t){return Pd(e,null,ee.env.NODE_ENV!=="production"?{messages:Mle,args:t}:void 0)}const Mle={[fn.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[fn.INVALID_ARGUMENT]:"Invalid argument",[fn.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[fn.NOT_INSTALLED]:"Need to install with `app.use` function",[fn.UNEXPECTED_ERROR]:"Unexpected error",[fn.NOT_AVAILABLE_IN_LEGACY_MODE]:"Not available in legacy mode",[fn.REQUIRED_VALUE]:"Required in value: {0}",[fn.INVALID_VALUE]:"Invalid value",[fn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[fn.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[fn.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[fn.BRIDGE_SUPPORT_VUE_2_ONLY]:"vue-i18n-bridge support Vue 2.x only",[fn.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]:"Must define āi18nā option or custom block in Composition API with using local scope in Legacy API mode",[fn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},z0=Ii("__translateVNode"),j0=Ii("__datetimeParts"),K0=Ii("__numberParts"),Uu=Ii("__enableEmitter"),bp=Ii("__disableEmitter"),kV=Ii("__setPluralRules"),FV=Ii("__injectWithOption"),q0=Ii("__dispose");function Sp(e){if(!dn(e)||Tr(e))return e;for(const t in e)if(Zr(e,t))if(!t.includes("."))dn(e[t])&&Sp(e[t]);else{const n=t.split("."),o=n.length-1;let s=e,r=!1;for(let i=0;i<o;i++){if(n[i]==="__proto__")throw new Error(`unsafe key: ${n[i]}`);if(n[i]in s||(s[n[i]]=An()),!dn(s[n[i]])){ee.env.NODE_ENV!=="production"&&Co(Is(jn.IGNORE_OBJ_FLATTEN,{key:n[i]})),r=!0;break}s=s[n[i]]}if(r||(Tr(s)?KL.includes(n[o])||delete e[t]:(s[n[o]]=e[t],delete e[t])),!Tr(s)){const i=s[n[o]];dn(i)&&Sp(i)}}return e}function Oy(e,t){const{messages:n,__i18n:o,messageResolver:s,flatJson:r}=t,i=zt(n)?n:Mn(o)?An():{[e]:An()};if(Mn(o)&&o.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:l,resource:u}=a;l?(i[l]=i[l]||An(),Dy(u,i[l])):Dy(u,i)}else Ct(a)&&Dy(JSON.parse(a),i)}),s==null&&r)for(const a in i)Zr(i,a)&&Sp(i[a]);return i}function OV(e){return e.type}function MV(e,t,n){let o=dn(t.messages)?t.messages:An();"__i18nGlobal"in n&&(o=Oy(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const s=Object.keys(o);s.length&&s.forEach(r=>{e.mergeLocaleMessage(r,o[r])});{if(dn(t.datetimeFormats)){const r=Object.keys(t.datetimeFormats);r.length&&r.forEach(i=>{e.mergeDateTimeFormat(i,t.datetimeFormats[i])})}if(dn(t.numberFormats)){const r=Object.keys(t.numberFormats);r.length&&r.forEach(i=>{e.mergeNumberFormat(i,t.numberFormats[i])})}}}function NV(e){return ye(Ka,null,e,0)}const LV="__INTLIFY_META__",VV=()=>[],Nle=()=>!1;let BV=0;function $V(e){return(t,n,o,s)=>e(n,o,oo()||void 0,s)}const Lle=()=>{const e=oo();let t=null;return e&&(t=OV(e)[LV])?{[LV]:t}:null};function Y0(e={},t){const{__root:n,__injectWithOption:o}=e,s=n===void 0,r=e.flatJson,i=Xr?$:xh,a=!!e.translateExistCompatible;ee.env.NODE_ENV!=="production"&&a&&RL(Is(jn.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG));let l=on(e.inheritLocale)?e.inheritLocale:!0;const u=i(n&&l?n.locale.value:Ct(e.locale)?e.locale:Od),c=i(n&&l?n.fallbackLocale.value:Ct(e.fallbackLocale)||Mn(e.fallbackLocale)||zt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:u.value),d=i(Oy(u.value,e)),h=i(zt(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),f=i(zt(e.numberFormats)?e.numberFormats:{[u.value]:{}});let p=n?n.missingWarn:on(e.missingWarn)||El(e.missingWarn)?e.missingWarn:!0,g=n?n.fallbackWarn:on(e.fallbackWarn)||El(e.fallbackWarn)?e.fallbackWarn:!0,v=n?n.fallbackRoot:on(e.fallbackRoot)?e.fallbackRoot:!0,w=!!e.fallbackFormat,S=Pn(e.missing)?e.missing:null,b=Pn(e.missing)?$V(e.missing):null,y=Pn(e.postTranslation)?e.postTranslation:null,E=n?n.warnHtmlMessage:on(e.warnHtmlMessage)?e.warnHtmlMessage:!0,_=!!e.escapeParameter;const I=n?n.modifiers:zt(e.modifiers)?e.modifiers:{};let T=e.pluralRules||n&&n.pluralRules,F;F=(()=>{s&&lV(null);const ve={version:kle,locale:u.value,fallbackLocale:c.value,messages:d.value,modifiers:I,pluralRules:T,missing:b===null?void 0:b,missingWarn:p,fallbackWarn:g,fallbackFormat:w,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:E,escapeParameter:_,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};ve.datetimeFormats=h.value,ve.numberFormats=f.value,ve.__datetimeFormatters=zt(F)?F.__datetimeFormatters:void 0,ve.__numberFormatters=zt(F)?F.__numberFormatters:void 0,ee.env.NODE_ENV!=="production"&&(ve.__v_emitter=zt(F)?F.__v_emitter:void 0);const Be=fle(ve);return s&&lV(Be),Be})(),Cp(F,u.value,c.value);function x(){return[u.value,c.value,d.value,h.value,f.value]}const P=X({get:()=>u.value,set:ve=>{u.value=ve,F.locale=u.value}}),k=X({get:()=>c.value,set:ve=>{c.value=ve,F.fallbackLocale=c.value,Cp(F,u.value,ve)}}),M=X(()=>d.value),N=X(()=>h.value),B=X(()=>f.value);function z(){return Pn(y)?y:null}function oe(ve){y=ve,F.postTranslation=ve}function ie(){return S}function te(ve){ve!==null&&(b=$V(ve)),S=ve,F.missing=b}function se(ve,Be){return ve!=="translate"||!Be.resolvedMessage}const Z=(ve,Be,wt,Dt,tn,en)=>{x();let bn;try{ee.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,s||(F.fallbackContext=n?hle():void 0),bn=ve(F)}finally{ee.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,s||(F.fallbackContext=void 0)}if(wt!=="translate exists"&&ro(bn)&&bn===Py||wt==="translate exists"&&!bn){const[Le,Ge]=Be();if(ee.env.NODE_ENV!=="production"&&n&&Ct(Le)&&se(wt,Ge)&&(v&&(Fy(g,Le)||cV(p,Le))&&Co(Is(jn.FALLBACK_TO_ROOT,{key:Le,type:wt})),ee.env.NODE_ENV!=="production")){const{__v_emitter:Rt}=F;Rt&&v&&Rt.emit("fallback",{type:wt,key:Le,to:"global",groupId:`${wt}:${Le}`})}return n&&v?Dt(n):tn(Le)}else{if(en(bn))return bn;throw ko(fn.UNEXPECTED_RETURN_TYPE)}};function A(...ve){return Z(Be=>Reflect.apply(yV,null,[Be,...ve]),()=>H0(...ve),"translate",Be=>Reflect.apply(Be.t,Be,[...ve]),Be=>Be,Be=>Ct(Be))}function j(...ve){const[Be,wt,Dt]=ve;if(Dt&&!dn(Dt))throw ko(fn.INVALID_ARGUMENT);return A(Be,wt,Ko({resolvedMessage:!0},Dt||{}))}function ne(...ve){return Z(Be=>Reflect.apply(EV,null,[Be,...ve]),()=>G0(...ve),"datetime format",Be=>Reflect.apply(Be.d,Be,[...ve]),()=>ky,Be=>Ct(Be))}function ge(...ve){return Z(Be=>Reflect.apply(TV,null,[Be,...ve]),()=>U0(...ve),"number format",Be=>Reflect.apply(Be.n,Be,[...ve]),()=>ky,Be=>Ct(Be))}function xe(ve){return ve.map(Be=>Ct(Be)||ro(Be)||on(Be)?NV(String(Be)):Be)}const K={normalize:xe,interpolate:ve=>ve,type:"vnode"};function Y(...ve){return Z(Be=>{let wt;const Dt=Be;try{Dt.processor=K,wt=Reflect.apply(yV,null,[Dt,...ve])}finally{Dt.processor=null}return wt},()=>H0(...ve),"translate",Be=>Be[z0](...ve),Be=>[NV(Be)],Be=>Mn(Be))}function re(...ve){return Z(Be=>Reflect.apply(TV,null,[Be,...ve]),()=>U0(...ve),"number format",Be=>Be[K0](...ve),VV,Be=>Ct(Be)||Mn(Be))}function R(...ve){return Z(Be=>Reflect.apply(EV,null,[Be,...ve]),()=>G0(...ve),"datetime format",Be=>Be[j0](...ve),VV,Be=>Ct(Be)||Mn(Be))}function G(ve){T=ve,F.pluralRules=T}function J(ve,Be){return Z(()=>{if(!ve)return!1;const wt=Ct(Be)?Be:u.value,Dt=Ce(wt),tn=F.messageResolver(Dt,ve);return a?tn!=null:Tr(tn)||Dr(tn)||Ct(tn)},()=>[ve],"translate exists",wt=>Reflect.apply(wt.te,wt,[ve,Be]),Nle,wt=>on(wt))}function ce(ve){let Be=null;const wt=QL(F,c.value,u.value);for(let Dt=0;Dt<wt.length;Dt++){const tn=d.value[wt[Dt]]||{},en=F.messageResolver(tn,ve);if(en!=null){Be=en;break}}return Be}function Ee(ve){const Be=ce(ve);return Be??(n?n.tm(ve)||{}:{})}function Ce(ve){return d.value[ve]||{}}function Ne(ve,Be){if(r){const wt={[ve]:Be};for(const Dt in wt)Zr(wt,Dt)&&Sp(wt[Dt]);Be=wt[ve]}d.value[ve]=Be,F.messages=d.value}function pe(ve,Be){d.value[ve]=d.value[ve]||{};const wt={[ve]:Be};if(r)for(const Dt in wt)Zr(wt,Dt)&&Sp(wt[Dt]);Be=wt[ve],Dy(Be,d.value[ve]),F.messages=d.value}function H(ve){return h.value[ve]||{}}function W(ve,Be){h.value[ve]=Be,F.datetimeFormats=h.value,RV(F,ve,Be)}function be(ve,Be){h.value[ve]=Ko(h.value[ve]||{},Be),F.datetimeFormats=h.value,RV(F,ve,Be)}function Ae(ve){return f.value[ve]||{}}function He(ve,Be){f.value[ve]=Be,F.numberFormats=f.value,IV(F,ve,Be)}function Te(ve,Be){f.value[ve]=Ko(f.value[ve]||{},Be),F.numberFormats=f.value,IV(F,ve,Be)}BV++,n&&Xr&&(Qe(n.locale,ve=>{l&&(u.value=ve,F.locale=ve,Cp(F,u.value,c.value))}),Qe(n.fallbackLocale,ve=>{l&&(c.value=ve,F.fallbackLocale=ve,Cp(F,u.value,c.value))}));const Xe={id:BV,locale:P,fallbackLocale:k,get inheritLocale(){return l},set inheritLocale(ve){l=ve,ve&&n&&(u.value=n.locale.value,c.value=n.fallbackLocale.value,Cp(F,u.value,c.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:M,get modifiers(){return I},get pluralRules(){return T||{}},get isGlobal(){return s},get missingWarn(){return p},set missingWarn(ve){p=ve,F.missingWarn=p},get fallbackWarn(){return g},set fallbackWarn(ve){g=ve,F.fallbackWarn=g},get fallbackRoot(){return v},set fallbackRoot(ve){v=ve},get fallbackFormat(){return w},set fallbackFormat(ve){w=ve,F.fallbackFormat=w},get warnHtmlMessage(){return E},set warnHtmlMessage(ve){E=ve,F.warnHtmlMessage=ve},get escapeParameter(){return _},set escapeParameter(ve){_=ve,F.escapeParameter=ve},t:A,getLocaleMessage:Ce,setLocaleMessage:Ne,mergeLocaleMessage:pe,getPostTranslationHandler:z,setPostTranslationHandler:oe,getMissingHandler:ie,setMissingHandler:te,[kV]:G};return Xe.datetimeFormats=N,Xe.numberFormats=B,Xe.rt=j,Xe.te=J,Xe.tm=Ee,Xe.d=ne,Xe.n=ge,Xe.getDateTimeFormat=H,Xe.setDateTimeFormat=W,Xe.mergeDateTimeFormat=be,Xe.getNumberFormat=Ae,Xe.setNumberFormat=He,Xe.mergeNumberFormat=Te,Xe[FV]=o,Xe[z0]=Y,Xe[j0]=R,Xe[K0]=re,ee.env.NODE_ENV!=="production"&&(Xe[Uu]=ve=>{F.__v_emitter=ve},Xe[bp]=()=>{F.__v_emitter=void 0}),Xe}function Vle(e){const t=Ct(e.locale)?e.locale:Od,n=Ct(e.fallbackLocale)||Mn(e.fallbackLocale)||zt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=Pn(e.missing)?e.missing:void 0,s=on(e.silentTranslationWarn)||El(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,r=on(e.silentFallbackWarn)||El(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,i=on(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=zt(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=Pn(e.postTranslation)?e.postTranslation:void 0,d=Ct(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,f=on(e.sync)?e.sync:!0;ee.env.NODE_ENV!=="production"&&e.formatter&&Co(Is(jn.NOT_SUPPORTED_FORMATTER)),ee.env.NODE_ENV!=="production"&&e.preserveDirectiveContent&&Co(Is(jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE));let p=e.messages;if(zt(e.sharedMessages)){const _=e.sharedMessages;p=Object.keys(_).reduce((T,F)=>{const L=T[F]||(T[F]={});return Ko(L,_[F]),T},p||{})}const{__i18n:g,__root:v,__injectWithOption:w}=e,S=e.datetimeFormats,b=e.numberFormats,y=e.flatJson,E=e.translateExistCompatible;return{locale:t,fallbackLocale:n,messages:p,flatJson:y,datetimeFormats:S,numberFormats:b,missing:o,missingWarn:s,fallbackWarn:r,fallbackRoot:i,fallbackFormat:a,modifiers:l,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:h,messageResolver:e.messageResolver,inheritLocale:f,translateExistCompatible:E,__i18n:g,__root:v,__injectWithOption:w}}function X0(e={},t){{const n=Y0(Vle(e)),{__extender:o}=e,s={id:n.id,get locale(){return n.locale.value},set locale(r){n.locale.value=r},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(r){n.fallbackLocale.value=r},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_FORMATTER)),{interpolate(){return[]}}},set formatter(r){ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_FORMATTER))},get missing(){return n.getMissingHandler()},set missing(r){n.setMissingHandler(r)},get silentTranslationWarn(){return on(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(r){n.missingWarn=on(r)?!r:r},get silentFallbackWarn(){return on(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(r){n.fallbackWarn=on(r)?!r:r},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(r){n.fallbackFormat=r},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(r){n.setPostTranslationHandler(r)},get sync(){return n.inheritLocale},set sync(r){n.inheritLocale=r},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(r){n.warnHtmlMessage=r!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(r){n.escapeParameter=r},get preserveDirectiveContent(){return ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE)),!0},set preserveDirectiveContent(r){ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE))},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...r){const[i,a,l]=r,u={};let c=null,d=null;if(!Ct(i))throw ko(fn.INVALID_ARGUMENT);const h=i;return Ct(a)?u.locale=a:Mn(a)?c=a:zt(a)&&(d=a),Mn(l)?c=l:zt(l)&&(d=l),Reflect.apply(n.t,n,[h,c||d||{},u])},rt(...r){return Reflect.apply(n.rt,n,[...r])},tc(...r){const[i,a,l]=r,u={plural:1};let c=null,d=null;if(!Ct(i))throw ko(fn.INVALID_ARGUMENT);const h=i;return Ct(a)?u.locale=a:ro(a)?u.plural=a:Mn(a)?c=a:zt(a)&&(d=a),Ct(l)?u.locale=l:Mn(l)?c=l:zt(l)&&(d=l),Reflect.apply(n.t,n,[h,c||d||{},u])},te(r,i){return n.te(r,i)},tm(r){return n.tm(r)},getLocaleMessage(r){return n.getLocaleMessage(r)},setLocaleMessage(r,i){n.setLocaleMessage(r,i)},mergeLocaleMessage(r,i){n.mergeLocaleMessage(r,i)},d(...r){return Reflect.apply(n.d,n,[...r])},getDateTimeFormat(r){return n.getDateTimeFormat(r)},setDateTimeFormat(r,i){n.setDateTimeFormat(r,i)},mergeDateTimeFormat(r,i){n.mergeDateTimeFormat(r,i)},n(...r){return Reflect.apply(n.n,n,[...r])},getNumberFormat(r){return n.getNumberFormat(r)},setNumberFormat(r,i){n.setNumberFormat(r,i)},mergeNumberFormat(r,i){n.mergeNumberFormat(r,i)},getChoiceIndex(r,i){return ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_GET_CHOICE_INDEX)),-1}};return s.__extender=o,ee.env.NODE_ENV!=="production"&&(s.__enableEmitter=r=>{const i=n;i[Uu]&&i[Uu](r)},s.__disableEmitter=()=>{const r=n;r[bp]&&r[bp]()}),s}}const Z0={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function Ble({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,s)=>[...o,...s.type===Pt?s.children:[s]],[]):t.reduce((n,o)=>{const s=e[o];return s&&(n[o]=s()),n},An())}function HV(e){return Pt}const J0=ot({name:"i18n-t",props:Ko({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>ro(e)||!isNaN(e)}},Z0),setup(e,t){const{slots:n,attrs:o}=t,s=e.i18n||n_({useScope:e.scope,__useComponent:!0});return()=>{const r=Object.keys(n).filter(d=>d!=="_"),i=An();e.locale&&(i.locale=e.locale),e.plural!==void 0&&(i.plural=Ct(e.plural)?+e.plural:e.plural);const a=Ble(t,r),l=s[z0](e.keypath,a,i),u=Ko(An(),o),c=Ct(e.tag)||dn(e.tag)?e.tag:HV();return Tc(c,u,l)}}});function $le(e){return Mn(e)&&!Ct(e[0])}function GV(e,t,n,o){const{slots:s,attrs:r}=t;return()=>{const i={part:!0};let a=An();e.locale&&(i.locale=e.locale),Ct(e.format)?i.key=e.format:dn(e.format)&&(Ct(e.format.key)&&(i.key=e.format.key),a=Object.keys(e.format).reduce((h,f)=>n.includes(f)?Ko(An(),h,{[f]:e.format[f]}):h,An()));const l=o(e.value,i,a);let u=[i.key];Mn(l)?u=l.map((h,f)=>{const p=s[h.type],g=p?p({[h.type]:h.value,index:f,parts:l}):[h.value];return $le(g)&&(g[0].key=`${h.type}-${f}`),g}):Ct(l)&&(u=[l]);const c=Ko(An(),r),d=Ct(e.tag)||dn(e.tag)?e.tag:HV();return Tc(d,c,u)}}const UV=ot({name:"i18n-n",props:Ko({value:{type:Number,required:!0},format:{type:[String,Object]}},Z0),setup(e,t){const n=e.i18n||n_({useScope:e.scope,__useComponent:!0});return GV(e,t,DV,(...o)=>n[K0](...o))}}),WV=ot({name:"i18n-d",props:Ko({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Z0),setup(e,t){const n=e.i18n||n_({useScope:e.scope,__useComponent:!0});return GV(e,t,_V,(...o)=>n[j0](...o))}});function Hle(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function Gle(e){const t=i=>{const{instance:a,modifiers:l,value:u}=i;if(!a||!a.$)throw ko(fn.UNEXPECTED_ERROR);const c=Hle(e,a.$);ee.env.NODE_ENV!=="production"&&l.preserve&&Co(Is(jn.NOT_SUPPORTED_PRESERVE));const d=zV(u);return[Reflect.apply(c.t,c,[...jV(d)]),c]};return{created:(i,a)=>{const[l,u]=t(a);Xr&&e.global===u&&(i.__i18nWatcher=Qe(u.locale,()=>{a.instance&&a.instance.$forceUpdate()})),i.__composer=u,i.textContent=l},unmounted:i=>{Xr&&i.__i18nWatcher&&(i.__i18nWatcher(),i.__i18nWatcher=void 0,delete i.__i18nWatcher),i.__composer&&(i.__composer=void 0,delete i.__composer)},beforeUpdate:(i,{value:a})=>{if(i.__composer){const l=i.__composer,u=zV(a);i.textContent=Reflect.apply(l.t,l,[...jV(u)])}},getSSRProps:i=>{const[a]=t(i);return{textContent:a}}}}function zV(e){if(Ct(e))return{path:e};if(zt(e)){if(!("path"in e))throw ko(fn.REQUIRED_VALUE,"path");return e}else throw ko(fn.INVALID_VALUE)}function jV(e){const{path:t,locale:n,args:o,choice:s,plural:r}=e,i={},a=o||{};return Ct(n)&&(i.locale=n),ro(s)&&(i.plural=s),ro(r)&&(i.plural=r),[t,a,i]}function Ule(e,t,...n){const o=zt(n[0])?n[0]:{},s=!!o.useI18nComponentName,r=on(o.globalInstall)?o.globalInstall:!0;ee.env.NODE_ENV!=="production"&&r&&s&&Co(Is(jn.COMPONENT_NAME_LEGACY_COMPATIBLE,{name:J0.name})),r&&([s?"i18n":J0.name,"I18nT"].forEach(i=>e.component(i,J0)),[UV.name,"I18nN"].forEach(i=>e.component(i,UV)),[WV.name,"I18nD"].forEach(i=>e.component(i,WV))),e.directive("t",Gle(t))}const Q0={"vue-devtools-plugin-vue-i18n":"Vue I18n devtools","vue-i18n-resource-inspector":"I18n Resources","vue-i18n-timeline":"Vue I18n"},Wle={"vue-i18n-resource-inspector":"Search for scopes ..."},zle={"vue-i18n-timeline":16764185},KV="vue-i18n: composer properties";let e_;async function jle(e,t){return new Promise((n,o)=>{try{Ple({id:"vue-devtools-plugin-vue-i18n",label:Q0["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[KV],app:e},s=>{e_=s,s.on.visitComponentTree(({componentInstance:i,treeNode:a})=>{Kle(i,a,t)}),s.on.inspectComponent(({componentInstance:i,instanceData:a})=>{i.vnode.el&&i.vnode.el.__VUE_I18N__&&a&&(t.mode==="legacy"?i.vnode.el.__VUE_I18N__!==t.global.__composer&&YV(a,i.vnode.el.__VUE_I18N__):YV(a,i.vnode.el.__VUE_I18N__))}),s.addInspector({id:"vue-i18n-resource-inspector",label:Q0["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:Wle["vue-i18n-resource-inspector"]}),s.on.getInspectorTree(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&Jle(i,t)});const r=new Map;s.on.getInspectorState(async i=>{if(i.app===e&&i.inspectorId==="vue-i18n-resource-inspector")if(s.unhighlightElement(),eue(i,t),i.nodeId==="global"){if(!r.has(i.app)){const[a]=await s.getComponentInstances(i.app);r.set(i.app,a)}s.highlightElement(r.get(i.app))}else{const a=Qle(i.nodeId,t);a&&s.highlightElement(a)}}),s.on.editInspectorState(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&nue(i,t)}),s.addTimelineLayer({id:"vue-i18n-timeline",label:Q0["vue-i18n-timeline"],color:zle["vue-i18n-timeline"]}),n(!0)})}catch(s){console.error(s),o(!1)}})}function qV(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function Kle(e,t,n){const o=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&e.vnode.el.__VUE_I18N__!==o){const s={label:`i18n (${qV(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(s)}}function YV(e,t){const n=KV;e.state.push({type:n,key:"locale",editable:!0,value:t.locale.value}),e.state.push({type:n,key:"availableLocales",editable:!1,value:t.availableLocales}),e.state.push({type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value}),e.state.push({type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}),e.state.push({type:n,key:"messages",editable:!1,value:t_(t.messages.value)}),e.state.push({type:n,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}),e.state.push({type:n,key:"numberFormats",editable:!1,value:t.numberFormats.value})}function t_(e){const t={};return Object.keys(e).forEach(n=>{const o=e[n];Pn(o)&&"source"in o?t[n]=Zle(o):Tr(o)&&o.loc&&o.loc.source?t[n]=o.loc.source:dn(o)?t[n]=t_(o):t[n]=o}),t}const qle={"<":"<",">":">",'"':""","&":"&"};function Yle(e){return e.replace(/[<>"&]/g,Xle)}function Xle(e){return qle[e]||e}function Zle(e){return{_custom:{type:"function",display:`<span>Ę</span> ${e.source?`("${Yle(e.source)}")`:"(?)"}`}}}function Jle(e,t){e.rootNodes.push({id:"global",label:"Global Scope"});const n=t.mode==="composition"?t.global:t.global.__composer;for(const[o,s]of t.__instances){const r=t.mode==="composition"?s:s.__composer;n!==r&&e.rootNodes.push({id:r.id.toString(),label:`${qV(o)} Scope`})}}function Qle(e,t){let n=null;if(e!=="global"){for(const[o,s]of t.__instances.entries())if(s.id.toString()===e){n=o;break}}return n}function XV(e,t){if(e==="global")return t.mode==="composition"?t.global:t.global.__composer;{const n=Array.from(t.__instances.values()).find(o=>o.id.toString()===e);return n?t.mode==="composition"?n:n.__composer:null}}function eue(e,t){const n=XV(e.nodeId,t);return n&&(e.state=tue(n)),null}function tue(e){const t={},n="Locale related info",o=[{type:n,key:"locale",editable:!0,value:e.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:e.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}];t[n]=o;const s="Locale messages info",r=[{type:s,key:"messages",editable:!1,value:t_(e.messages.value)}];t[s]=r;{const i="Datetime formats info",a=[{type:i,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];t[i]=a;const l="Datetime formats info",u=[{type:l,key:"numberFormats",editable:!1,value:e.numberFormats.value}];t[l]=u}return t}function Ep(e,t){if(e_){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),e_.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:n,time:Date.now(),meta:{},data:t||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function nue(e,t){const n=XV(e.nodeId,t);if(n){const[o]=e.path;o==="locale"&&Ct(e.state.value)?n.locale.value=e.state.value:o==="fallbackLocale"&&(Ct(e.state.value)||Mn(e.state.value)||dn(e.state.value))?n.fallbackLocale.value=e.state.value:o==="inheritLocale"&&on(e.state.value)&&(n.inheritLocale=e.state.value)}}function oue(e,t,n){return{beforeCreate(){const o=oo();if(!o)throw ko(fn.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=s.i18n;if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=t,this===this.$root)this.$i18n=ZV(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=X0(r);const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=ZV(e,s);else{this.$i18n=X0({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&MV(t,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$tc=(...r)=>this.$i18n.tc(...r),this.$te=(r,i)=>this.$i18n.te(r,i),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),n.__setInstance(o,this.$i18n)},mounted(){if(ee.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const o=this.$i18n;this.$el.__VUE_I18N__=o.__composer;const s=this.__v_emitter=k0();o.__enableEmitter&&o.__enableEmitter(s),s.on("*",Ep)}},unmounted(){const o=oo();if(!o)throw ko(fn.UNEXPECTED_ERROR);const s=this.$i18n;ee.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Ep),delete this.__v_emitter),this.$i18n&&(s.__disableEmitter&&s.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(o),delete this.$i18n}}}function ZV(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[kV](t.pluralizationRules||e.pluralizationRules);const n=Oy(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const sue=Ii("global-vue-i18n");function rue(e={},t){const n=__VUE_I18N_LEGACY_API__&&on(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,o=on(e.globalInjection)?e.globalInjection:!0,s=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,r=new Map,[i,a]=iue(e,n),l=Ii(ee.env.NODE_ENV!=="production"?"vue-i18n":"");ee.env.NODE_ENV!=="production"&&n&&s&&Co(Is(jn.NOTICE_DROP_ALLOW_COMPOSITION));function u(h){return r.get(h)||null}function c(h,f){r.set(h,f)}function d(h){r.delete(h)}{const h={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return s},async install(f,...p){if(ee.env.NODE_ENV!=="production"&&(f.__VUE_I18N__=h),f.__VUE_I18N_SYMBOL__=l,f.provide(f.__VUE_I18N_SYMBOL__,h),zt(p[0])){const w=p[0];h.__composerExtend=w.__composerExtend,h.__vueI18nExtend=w.__vueI18nExtend}let g=null;!n&&o&&(g=gue(f,h.global)),__VUE_I18N_FULL_INSTALL__&&Ule(f,h,...p),__VUE_I18N_LEGACY_API__&&n&&f.mixin(oue(a,a.__composer,h));const v=f.unmount;if(f.unmount=()=>{g&&g(),h.dispose(),v()},ee.env.NODE_ENV!=="production"){if(!await jle(f,h))throw ko(fn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const S=k0();if(n){const b=a;b.__enableEmitter&&b.__enableEmitter(S)}else{const b=a;b[Uu]&&b[Uu](S)}S.on("*",Ep)}},get global(){return a},dispose(){i.stop()},__instances:r,__getInstance:u,__setInstance:c,__deleteInstance:d};return h}}function n_(e={}){const t=oo();if(t==null)throw ko(fn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw ko(fn.NOT_INSTALLED);const n=aue(t),o=uue(n),s=OV(t),r=lue(e,s);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw ko(fn.NOT_AVAILABLE_IN_LEGACY_MODE);return fue(t,r,o,e)}if(r==="global")return MV(o,e,s),o;if(r==="parent"){let l=cue(n,t,e.__useComponent);return l==null&&(ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_FOUND_PARENT_SCOPE)),l=o),l}const i=n;let a=i.__getInstance(t);if(a==null){const l=Ko({},e);"__i18n"in s&&(l.__i18n=s.__i18n),o&&(l.__root=o),a=Y0(l),i.__composerExtend&&(a[q0]=i.__composerExtend(a)),hue(i,t,a),i.__setInstance(t,a)}return a}function iue(e,t,n){const o=cC();{const s=__VUE_I18N_LEGACY_API__&&t?o.run(()=>X0(e)):o.run(()=>Y0(e));if(s==null)throw ko(fn.UNEXPECTED_ERROR);return[o,s]}}function aue(e){{const t=Dn(e.isCE?sue:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw ko(e.isCE?fn.NOT_INSTALLED_WITH_PROVIDE:fn.UNEXPECTED_ERROR);return t}}function lue(e,t){return _y(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function uue(e){return e.mode==="composition"?e.global:e.global.__composer}function cue(e,t,n=!1){let o=null;const s=t.root;let r=due(t,n);for(;r!=null;){const i=e;if(e.mode==="composition")o=i.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const a=i.__getInstance(r);a!=null&&(o=a.__composer,n&&o&&!o[FV]&&(o=null))}if(o!=null||s===r)break;r=r.parent}return o}function due(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function hue(e,t,n){let o=null;Xt(()=>{if(ee.env.NODE_ENV!=="production"&&t.vnode.el){t.vnode.el.__VUE_I18N__=n,o=k0();const s=n;s[Uu]&&s[Uu](o),o.on("*",Ep)}},t),nu(()=>{const s=n;ee.env.NODE_ENV!=="production"&&t.vnode.el&&t.vnode.el.__VUE_I18N__&&(o&&o.off("*",Ep),s[bp]&&s[bp](),delete t.vnode.el.__VUE_I18N__),e.__deleteInstance(t);const r=s[q0];r&&(r(),delete s[q0])},t)}function fue(e,t,n,o={}){const s=t==="local",r=xh(null);if(s&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw ko(fn.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const i=on(o.inheritLocale)?o.inheritLocale:!Ct(o.locale),a=$(!s||i?n.locale.value:Ct(o.locale)?o.locale:Od),l=$(!s||i?n.fallbackLocale.value:Ct(o.fallbackLocale)||Mn(o.fallbackLocale)||zt(o.fallbackLocale)||o.fallbackLocale===!1?o.fallbackLocale:a.value),u=$(Oy(a.value,o)),c=$(zt(o.datetimeFormats)?o.datetimeFormats:{[a.value]:{}}),d=$(zt(o.numberFormats)?o.numberFormats:{[a.value]:{}}),h=s?n.missingWarn:on(o.missingWarn)||El(o.missingWarn)?o.missingWarn:!0,f=s?n.fallbackWarn:on(o.fallbackWarn)||El(o.fallbackWarn)?o.fallbackWarn:!0,p=s?n.fallbackRoot:on(o.fallbackRoot)?o.fallbackRoot:!0,g=!!o.fallbackFormat,v=Pn(o.missing)?o.missing:null,w=Pn(o.postTranslation)?o.postTranslation:null,S=s?n.warnHtmlMessage:on(o.warnHtmlMessage)?o.warnHtmlMessage:!0,b=!!o.escapeParameter,y=s?n.modifiers:zt(o.modifiers)?o.modifiers:{},E=o.pluralRules||s&&n.pluralRules;function _(){return[a.value,l.value,u.value,c.value,d.value]}const I=X({get:()=>r.value?r.value.locale.value:a.value,set:J=>{r.value&&(r.value.locale.value=J),a.value=J}}),T=X({get:()=>r.value?r.value.fallbackLocale.value:l.value,set:J=>{r.value&&(r.value.fallbackLocale.value=J),l.value=J}}),F=X(()=>r.value?r.value.messages.value:u.value),L=X(()=>c.value),x=X(()=>d.value);function P(){return r.value?r.value.getPostTranslationHandler():w}function k(J){r.value&&r.value.setPostTranslationHandler(J)}function M(){return r.value?r.value.getMissingHandler():v}function N(J){r.value&&r.value.setMissingHandler(J)}function B(J){return _(),J()}function z(...J){return r.value?B(()=>Reflect.apply(r.value.t,null,[...J])):B(()=>"")}function oe(...J){return r.value?Reflect.apply(r.value.rt,null,[...J]):""}function ie(...J){return r.value?B(()=>Reflect.apply(r.value.d,null,[...J])):B(()=>"")}function te(...J){return r.value?B(()=>Reflect.apply(r.value.n,null,[...J])):B(()=>"")}function se(J){return r.value?r.value.tm(J):{}}function Z(J,ce){return r.value?r.value.te(J,ce):!1}function A(J){return r.value?r.value.getLocaleMessage(J):{}}function j(J,ce){r.value&&(r.value.setLocaleMessage(J,ce),u.value[J]=ce)}function ne(J,ce){r.value&&r.value.mergeLocaleMessage(J,ce)}function ge(J){return r.value?r.value.getDateTimeFormat(J):{}}function xe(J,ce){r.value&&(r.value.setDateTimeFormat(J,ce),c.value[J]=ce)}function ue(J,ce){r.value&&r.value.mergeDateTimeFormat(J,ce)}function K(J){return r.value?r.value.getNumberFormat(J):{}}function Y(J,ce){r.value&&(r.value.setNumberFormat(J,ce),d.value[J]=ce)}function re(J,ce){r.value&&r.value.mergeNumberFormat(J,ce)}const R={get id(){return r.value?r.value.id:-1},locale:I,fallbackLocale:T,messages:F,datetimeFormats:L,numberFormats:x,get inheritLocale(){return r.value?r.value.inheritLocale:i},set inheritLocale(J){r.value&&(r.value.inheritLocale=J)},get availableLocales(){return r.value?r.value.availableLocales:Object.keys(u.value)},get modifiers(){return r.value?r.value.modifiers:y},get pluralRules(){return r.value?r.value.pluralRules:E},get isGlobal(){return r.value?r.value.isGlobal:!1},get missingWarn(){return r.value?r.value.missingWarn:h},set missingWarn(J){r.value&&(r.value.missingWarn=J)},get fallbackWarn(){return r.value?r.value.fallbackWarn:f},set fallbackWarn(J){r.value&&(r.value.missingWarn=J)},get fallbackRoot(){return r.value?r.value.fallbackRoot:p},set fallbackRoot(J){r.value&&(r.value.fallbackRoot=J)},get fallbackFormat(){return r.value?r.value.fallbackFormat:g},set fallbackFormat(J){r.value&&(r.value.fallbackFormat=J)},get warnHtmlMessage(){return r.value?r.value.warnHtmlMessage:S},set warnHtmlMessage(J){r.value&&(r.value.warnHtmlMessage=J)},get escapeParameter(){return r.value?r.value.escapeParameter:b},set escapeParameter(J){r.value&&(r.value.escapeParameter=J)},t:z,getPostTranslationHandler:P,setPostTranslationHandler:k,getMissingHandler:M,setMissingHandler:N,rt:oe,d:ie,n:te,tm:se,te:Z,getLocaleMessage:A,setLocaleMessage:j,mergeLocaleMessage:ne,getDateTimeFormat:ge,setDateTimeFormat:xe,mergeDateTimeFormat:ue,getNumberFormat:K,setNumberFormat:Y,mergeNumberFormat:re};function G(J){J.locale.value=a.value,J.fallbackLocale.value=l.value,Object.keys(u.value).forEach(ce=>{J.mergeLocaleMessage(ce,u.value[ce])}),Object.keys(c.value).forEach(ce=>{J.mergeDateTimeFormat(ce,c.value[ce])}),Object.keys(d.value).forEach(ce=>{J.mergeNumberFormat(ce,d.value[ce])}),J.escapeParameter=b,J.fallbackFormat=g,J.fallbackRoot=p,J.fallbackWarn=f,J.missingWarn=h,J.warnHtmlMessage=S}return Bh(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw ko(fn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const J=r.value=e.proxy.$i18n.__composer;t==="global"?(a.value=J.locale.value,l.value=J.fallbackLocale.value,u.value=J.messages.value,c.value=J.datetimeFormats.value,d.value=J.numberFormats.value):s&&G(J)}),R}const pue=["locale","fallbackLocale","availableLocales"],JV=["t","rt","d","n","tm","te"];function gue(e,t){const n=Object.create(null);return pue.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r)throw ko(fn.UNEXPECTED_ERROR);const i=mn(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,s,i)}),e.config.globalProperties.$i18n=n,JV.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r||!r.value)throw ko(fn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,r)}),()=>{delete e.config.globalProperties.$i18n,JV.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}if(Fle(),__INTLIFY_JIT_COMPILATION__?oV(yle):oV(vle),lle(Gae),ule(QL),ee.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=Ra();e.__INTLIFY__=!0,Zae(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}ee.env.NODE_ENV;const QV={en:{}};function mue(e){const t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):null}async function vue(e,t=10,n=300){for(let o=0;o<t;o++){const s=mue(e);if(s)return s;await new Promise(r=>setTimeout(r,n))}return null}async function yue(){const e=await vue("account.tessr_i18n_file_version_url");if(!e)return{};const t=await fetch(e);if(!t.ok)throw new Error("Failed to load en-error.json");return await t.json()}async function wue(){const e=await yue();return{...QV,en:{...QV.en,errorMessages:e}}}async function Cue(){return rue({legacy:!1,locale:"en",fallbackLocale:"en",messages:await wue(),formatFallbackMessages:!0})}const bue=async()=>{const e=await Cue();return oQ(e.global),e},eB=32,Sue=Math.round(eB*16/9),Eue="arbo-thumbnails",_p="thumbnails";let Rp=null;const o_=new Map,s_=new Map;function tB(){return Rp||(Rp=new Promise((e,t)=>{const n=indexedDB.open(Eue,1);n.onupgradeneeded=()=>n.result.createObjectStore(_p),n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)}),Rp.catch(()=>Rp=null)),Rp}async function _ue(e,t){try{const n=await tB();return await new Promise((o,s)=>{const r=n.transaction(_p,"readonly").objectStore(_p).get(e);r.onsuccess=()=>{const i=r.result;o((i==null?void 0:i.url)===t&&i.blob instanceof Blob?i.blob:null)},r.onerror=()=>s(r.error)})}catch{return null}}async function Rue(e,t,n){try{const o=await tB();if(s_.get(e)!==t)return;await new Promise((s,r)=>{const i=o.transaction(_p,"readwrite");i.objectStore(_p).put({url:t,blob:n},e),i.oncomplete=()=>s(),i.onerror=()=>r(i.error)})}catch{}}function Tue(e){return new Promise(t=>{new xP(e,{width:Sue,height:eB,resize:"cover",quality:.8,success:t,error:()=>t(e)})})}function Due(e,t){s_.set(e,t);let n=o_.get(e);n||(n=new Map,o_.set(e,n));const o=n.get(t);if(o)return o;const s=(async()=>{const r=await _ue(e,t);if(r)return r;const i=await fetch(t);if(!i.ok)throw new Error(`Thumbnail request failed: ${i.status}`);const a=await Tue(await i.blob());return await Rue(e,t,a),a})().finally(()=>{n.delete(t),n.size===0&&(o_.delete(e),s_.delete(e))});return n.set(t,s),s}const Iue="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoAgMAAAAwzTx3AAAACVBMVEXz9fjX19fo6etc+oS8AAAINUlEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD24EAAAAAAAMj/tRFUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXYOWPjuGEgii45w4DKWQIDu4orAcEtB3Z0iWdUBpuAY4W2qnRACTgLiwVS/MUbJ7YV6AnEx1+Sp8FgMBgMBoPBYNDGy3sB+kD+3zfqnu9c4E4XM8v8oc554RKOLiYu0Pu6By7xoIuFCxzUNSsXOeliV344PRO4SP1L7tQxM9e9uMxJ/bJwEZ9STknCfglc5PGUBoBBN3OZW0w5yCt+bbDamBkw4/eGa5k1PPVKYG6osYibPWrpNRZxsyctvcaqYdgnK7fVWMCTfeeWGguZc1tzjYWr8aGpxiJG/MxNNVaHuqSxxiKebhOXeYoDxNNtba2xeC1eHdbTnkA82HdNKF0YiAf7Xt/BC6j6xhc/fv3++ufrsH5kXxO67jRbvZWEcpiFntVDPaOV0/tbz3UuVEvJpHS2uWf1ehVdtQ3ds3qofu+7FuOh4xJfP502rbds0OpqUd+R1ecY8ObUpzjMmFNf+OIOqu7qAe9A1X1DjbWnHlPOnHqqsaDqjkrMdlc9NRp76pvdmIvTC6i6oyIreKVpKLJsT53sji+pzmGqO2oo8ZjqnhpGN3vqcWC3p56qLKS6o8RfPk65ykKq+/8fqBzyLVlw9evyfhWrLLj65XJIVfaAVHdf/s4PqcpCqnttWEk5B62+8wdilYVWD3GFpSqLqO6yl6WcVGUR1X32stRdqrLI6jtHxCoLrL5x5BRy7gao7qJj5CZVWUB1H69sNec8rvrECS9VWRvqUsQzoLp7Wl21yuKp+/xF4EOssrDqOz8hjuz21GOVxVN3wodcTinn8NS9pC5WWVT1wE/cxJyzpx6rLJy6E9WlKgunLq+6VGXtqcecs6eeqiyaurjX5Rep0NSlVT9JrLKg6lu+6tmzCQvqp/wiFZq6q6pT/GcwdWVyy6osvvpR+swXpvqiqMeRHUxduTeXVVkwdeVmdD6yQ6pnjyDEKgupTpx4UCnnsNSVZ255lcVSVx4y5zmHqb5kZ5tQZTHVpyzgpYiHUo/RlVLO2qrTli1tPraCqi9pqxtLeJozv/wWFZa6E35PjbE297mjf1I54DHHl7jsb0Rka3L7XN1X5YNPHkzdUWJ+v9bc1l2ahJJy5tRn8DuyESXlQO/D/yPnjG0ch4EoahlQ4AJcgvpQCRNohLlMyfXBJpRfcslWuYGBAaRPcybl548WhpMHmp+PErmNzORvXxp5k79za+Qkf9N6zVDv179nYj9Vcc1QZ2m+Z2E/QXXNUOfmEi1Hh14d9aHOyMYtR3sy+pKxzsPHLceHbpHGDov+VPq7L981lrfmJGq5YRe3RYdVmrcqrcha+CXa7YuEBT/opvWlqoM+qphVlfYBlcUtx/pYUmKNHfJh9KflhnwF8dFY1gsgFrcc6+tGSWgs9wWQZsuRnqqwhMaSXgC5ov/8q7Uc6QkqueGUisZyXwDxj6zWcpynJe02yntNYzkvgMAol0rLcZ6MlvsoHxWN5b4A4p9YpeA5b0HYfbOyocZ6Vlb01+1XvQC6UKELbFYKaKxno0I3WMtW/wJkZ0U/r7+DSTGFFF1j9JUJXWAt27zwMcKEbt+PjpwKMU705T6h3wrZOdGddEWl8TChC25WxGcAZiVCN9ysWKPnDkb0CSe0YowRfVbPo9FzROjiKDihF8UQoVtlFT9aPUeIrp6myh586NV/EK8Y40GHRTxQ2Y0H3WrqVho9x4fuC1mksoUO/dRsz9GgC0hrtGWnQTcY30BlNzb0WT3Bll3Z0D8gKZUtLOgCwxtt2Q8WdKtOamtUvHChP1XzPceFDj/shsruLOgCBR+qbCFBt/oidjRUdqVCP9UTq6xQoasnobJGgi4wtuGWfSdBNyj4WGULEfqikLXVc0ToPrQ5lRUOdPE/8yprHOgGNR6r7M6DDiMbvH1SHnSosmjLvlKgC9LFKntQoBtoS6bnaNAVEqjsxoIO4xpu2ZUCXcBaMiq7MqAbFFmq50jQYVhjlTUS9FOrsVbPMaALoqHKYhjQDQo+pbKFAh1qLKOyBwU6kGUOUgkButQLPlLZjQDdoMVSB6l2BnQo+JzKFgJ0mMk5lT36Rxco+JzKSv/oBkOaU9mNAP1USEZldwJ0haRWN/3fPfofhaScRv92j+4JTBZDje77l+HQd//mcOhe8OOh47KO2R895sy23Ew36o4eKvxwo+5UJx06DGbmzRN+qce8ky038aGDo8VbVow9esyS1Vg+9DlAT9WhPHrMK1nwwazoMVNOY6dgVvSYZ1JjA+3pMlmNpfNY769QY+lkLgt18hmNL9iRxvIt6z6LA40lXNt+2bNjHARCIAqgExMLucfeyVh5qe0tzZ5SVxMaI2zomLxX0xDg8wl1Vp0am/BuezuSckvGgG8nWB2TMeAjlgPRnTLlmkXtmjrlmhfXPXON3a39x3rOox5x7v855Xusf52665l1v9dFHauxt5jZpVdjc+b7x9qpsUlDblfGa+wjJldGa+wzple2X3Va219TpzsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8GIPDgQAAAAAgPxfG0FVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVdqDQwIAAAAAQf9f+8IEAAAAAAAAwCmRg3Unf/8l+AAAAABJRU5ErkJggg==",xue="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoAgMAAAAwzTx3AAAACVBMVEXz9fjX19fk5OUH9i6SAAAGd0lEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD24EAAAAAAAMj/tRFUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXYuXvcCGEgDMODJQrScwSK3GKP4GI/ZKWiSZRjcAn326TZU0YRsOwPkcCuPN88Nxi9wRjwxhhjjDHGGLOPuyYZpXhvSHSRwjkkK737D5L1UrQGGQYpWYsMZymYwy4ar/YaWbyUK2IvbQudw27a/uIb7Kdsje+QKUipIsB6sSObFKpCtpOUqcFBeta5DgfpWedaHKVmGx9xlJolHodpWeIdEujYylZIoeLu1iCFirtbjRQqHtmJR++QQsWepsWk/0rwWfSeps3alUQFow+SpCl5OxezNiVOweiSqOTRMy/WtuBNfObdqbPRS0Q/updENe/o5VcPVt2qW3WK6sQrvN3XrbpVt+pWXWt14vu67easulXnqO5l9Y6Pkah6uJ8c6CmrO/wZGKtPGXvG6pgMNNX989GaQFM9rKPM+KpHzE5s1R0Wnq16g8WZpbpfI856lurh9YT4SFY94uZEVh2rgat6hZUnqb4x+pmkeng9IX7mql5j1XNV73CHq/rD6CTV/cZv3kaO6mFrdKvOUT3izomq+uPoHNU9b/Vg1a06e3W7r2uvbrs5xie3QP/kVmPVk1SfR29439IQv5ursApc1R3ve3jiry/S8n5z63Bj39dpqldYBLbqgsXAUt3L8zo3slQPTxXR852bc5h4vtOSt/9Tw1d9foIJjCejp+wj43l4cRH4pvwVhIi7XmTDdVRf/d+8H/qrb3IABpXV/Z7lLKis/sveHdtGDgNRGJYEbKACVIKSq4IlzAF8xIRKrg8mVwL7PSwM35jiCiC5kR73y+hs/Nvy2AZErXnDWBizOp7iiNVnPB0jVl/xJIzVpWpz8YzVteo9imHE6vgSx6u+4Isbr/qKL0JYXepeJ+4Jq2vlO7XHq45vcbTqC7650aqv+CZ81aXy0gTlq66VdyGF0aon/DdY9QXGjVV9hjnoqkvt1TBKV11rb3zzY1VPgBmq+oKf3EjVZ/x0sFWX6guwlK26Vl+A5UeqnpAZqTpycZzqM3IHWXWpv9xRyKpr/TV/nrr6r1iusYa5+gMh2glnkbh6dp5xdnBVl9MjPRRPOSNc1fUcMtrpzPNW3wDgsNNZ4K2efy5QiqzVFzx5OxUcVXU5b2/BTgWhqq5Fx2inM2Wtvmdf1RtKgbV6yhYXvMJaPfuqXvCKY6peLq7ennIFYaqu5eJqkxWUs/qeLS4bXgmc1bfsF7SElzirJ8A+tOA1R1Rdyv8yqT3zCgdRdS3/MhGsaUEZq9uwsKYFz1h9z76hEy4wVk/ZNzSuOJ7q8v9odJpx5eCpbpefGD89cEX5qufv39pxxfNVzzrHhEt81TfAOFyLNNXFHvDmN64dNNXtzWOVhK36jFqerfqKWoGt+o5qkaW6vT24lmOprnaoJFzVF9TzXNVX1Atc1R9oEEmqiyWs5Uiqq62xtYSqOlooU/UZLQJT9RVNSKqLjVHNcVRXW2OrCVH1hCbKU31Bm8BTfUYjjupiU9RzFNXVpqh30FRPaKQ01dHKs1Rf0Iyiutga2yAyVNfnEM0OkuobmglJ9YRmnqP6gg4M1WWa0SESVNdpRYeDovqODkJRfUMHT1EdPQJBdVnQJd6/uq7o4giqP9BFCKrv6OIJqid0CQTV0env7Uf/jU5/bj96v8/od/QZ/TN6pzDdUfqM/hm9j5/uaPuMPuDoO/A+ne7oAbxPpjsaePQVeN8x3dEMvM9Nd7QA74vTLaEHw28vfescxR7bt9NQbDR9Ow3FRtP3043iZ9s/9uvYCkAQCKKgj9D+TKzO2Cp9lsAasc60AHzuot+t429LEt8S+CDxLYEPOtdSufnO1VQuGGVLxtjgsbcMNMnKXrGsz974tvs+McZ39X2q8V19/xq6c1vb+OlLf+1H6NqWN+7I8mcOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADzswYEAAAAAAJD/ayOoqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkp7cEgAAAAAIOj/a1+YAAAAAAAAALgEoKO2OvzgJtMAAAAASUVORK5CYII=",Aue=["src"],Pue=["src"],kue=["src"],Fue=_t(ot({__name:"ThumbnailRender",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean}},setup(e){const t=e,n=X(()=>t.value),o=X(()=>t.id),s=X(()=>t.disabled),r=X(()=>t.readOnly),i=$("");let a=null;const l=$(!1),u=X(()=>n.value==null||n.value===""),c=X(()=>!u.value&&l.value),d=()=>{l.value=!0},h=()=>{a&&URL.revokeObjectURL(a),a=null},f=()=>{i.value="",h()},p=fd(),{openSceneHub:g}=p,v=X(()=>{const b=un.getInstance().getItem("ws.code"),y=un.getInstance().getItem("BASE_URL"),E=b||t.workspaceId;return es({type:"scene_hub",config:{baseDomain:y,ws_code:E,scene_id:String(t.id)}}).url}),w=b=>{try{if(b.ctrlKey||b.metaKey){window.open(v.value,"_blank");return}g(String(t.id))}catch{window.open(v.value,"_blank")}finally{S()}},S=()=>{var E,_,I,T,F,L;(E=t.params)==null||E.api.clearFocusedCell();const b=((I=(_=t.params)==null?void 0:_.column)==null?void 0:I.getColId())||"",y=((F=(T=t.params)==null?void 0:T.node)==null?void 0:F.rowIndex)||0;(L=t.params)==null||L.api.setFocusedCell(y,b)};return Qe(()=>[o.value,n.value],async([b,y],E,_)=>{let I=!0;if(_(()=>{I=!1,h()}),l.value=!1,i.value="",!(b==null||b===""||!y))try{const T=await Due(String(b),y);if(!I||b!==o.value||y!==n.value)return;a=URL.createObjectURL(T),i.value=a}catch(T){I&&b===o.value&&y===n.value&&(console.warn("Failed to load cached thumbnail; using the original URL.",T),i.value=y)}},{immediate:!0}),Vn(f),(b,y)=>(q(),de("div",{class:le(["thumbnail-wrapper",{disabled:s.value,"read-only":r.value}]),onClick:w},[u.value?(q(),de("img",{key:0,src:V(xue),alt:"No thumbnail"},null,8,Aue)):c.value?(q(),de("img",{key:1,src:V(Iue),alt:"Broken thumbnail"},null,8,Pue)):i.value?(q(),de("img",{key:2,src:i.value,alt:"Thumbnail",onError:d},null,40,kue)):Ye("",!0)],2))}}),[["__scopeId","data-v-1fd3dd73"]]),Oue={class:"left-section"},Mue={class:"create-count"},Nue={class:"modified-template-options"},Lue=["onClick"],Vue={class:"setting-count"},Bue={class:"field-label"},$ue={class:"field-label"},Hue={class:"status-selection"},Gue={class:"preview-section"},Uue={key:0,class:"preview-list"},Wue={key:0,class:"preview-more"},zue={key:1,style:{color:"var(--tessr-text-secondary, #6b6b6b)","align-items":"center",width:"100%","text-align":"center",display:"flex",flex:"1 1 0%"}},nB=1e3,oB=8,sB=7,jue=_t(ot({__name:"BulkCreateCount",props:{item:{},takeName:{},options:{default:()=>[{id:"number_up",name:"Number",icon:"ArrowLeft",description:{active:"Remove from the name",inactive:"Add a number that counts up",switch:"Switch to a number that counts up"}},{id:"number_down",name:"Number",icon:"ArrowRight",description:{active:"Remove from the name",inactive:"Add a number that counts down",switch:"Switch to a number that counts down"}},{id:"letter_up",name:"Letter",icon:"ArrowLeft",description:{active:"Remove from the name",inactive:"Add a letter that counts up",switch:"Switch to a letter that counts up"}},{id:"letter_down",name:"Letter",icon:"ArrowRight",description:{active:"Remove from the name",inactive:"Add a letter that counts down",switch:"Switch to a letter that counts down"}}]},getStatusFunc:{},workspaceId:{},entityId:{}},emits:["cancel","changed"],setup(e,{expose:t,emit:n}){const o=Kt,s=Io,r=$(null),i=$(null),a=["number","letter","name"],l={number_up:"1ā9",number_down:"9ā1",letter_up:"AāZ",letter_down:"ZāA",name:"Name"},u=$(null),c=$({}),d=(Y,re)=>{c.value[Y]=re instanceof HTMLElement?re:null},h=$(null),f=$("1"),p=e,g=$([p.takeName,{id:"number",text:"1ā9",direction:"up"}," "]),v=X(()=>{const Y=w.value;let re=1;const R="9999.",G={createCount:`${R}0`,input:`${R}1`,firstField:`${R}5`,stepField:`${R}6`,number_up:`${R}1`,number_down:`${R}2`,letter_up:`${R}3`,letter_down:`${R}4`,statusSelect:`${R}7`};return["number_up","number_down","letter_up","letter_down"].forEach((ce,Ee)=>{re++,G[ce]=`${R}${re}`}),Y?(re++,G.statusSelect=`${R}${re}`,re++,G.firstField=`${R}${re}`,re++,G.stepField=`${R}${re}`):(delete G.firstField,delete G.stepField),G}),w=X(()=>g.value.find(Y=>typeof Y!="string"&&(Y.id==="number"||Y.id==="letter"))),S=$("number"),b=$("up"),y=Fo({...Ei.number}),E=Fo({...Ei.number}),_=()=>{Object.assign(y,Ei[S.value]),Object.assign(E,Ei[S.value])};Qe(w,Y=>{if(!Y)return;const re=Y.id;re!==S.value&&(S.value=re,_()),b.value=Y.direction==="down"?"down":"up"},{immediate:!0,flush:"sync"});const I=X(()=>YO[b.value]),T=X(()=>{const Y=Number(f.value);return Number.isFinite(Y)?Math.min(nB,Math.max(0,Math.floor(Y))):0}),F=(Y,re)=>{const R=JO(S.value,Y,re);y[Y]=R,Mv(Y,R)&&(E[Y]=R)},L=$(null),x=$(null),P=$(null),k=(Y,re)=>{var G,J,ce,Ee;if(re.key==="Enter"||re.key==="Escape")return;if(re.key==="Tab"){re.preventDefault(),re.stopPropagation(),re.stopImmediatePropagation();const Ce=re.shiftKey;Y=="first"&&(Ce?(G=c.value.letter_down)==null||G.focus():(J=L.value)==null||J.focus()),Y=="step"&&(Ce?(ce=L.value)==null||ce.focus():(Ee=i.value)==null||Ee.focus());return}re.key.length===1&&!re.ctrlKey&&!re.metaKey&&!re.altKey&&!ZO(S.value,Y,re.key)&&re.preventDefault()},M=(Y,re)=>{var Ee;re.preventDefault();const R=re.target,G=((Ee=re.clipboardData)==null?void 0:Ee.getData("text/plain"))??"",J=R.selectionStart??R.value.length,ce=R.selectionEnd??R.value.length;R.value=R.value.slice(0,J)+G+R.value.slice(ce),F(Y,R.value),R.value=y[Y]},N=Y=>{if(Mv(Y,y[Y]))return;const re=Ei[S.value][Y];y[Y]=re,E[Y]=re},B=X(()=>w.value?CE({type:S.value,direction:b.value,first:E.first,step:E.step,count:T.value}):[]),z=X(()=>g.value.every(Y=>typeof Y=="string"&&!Y)),oe=X(()=>T.value===0||z.value?[]:Array.from({length:T.value}).map((Y,re)=>g.value.map(R=>typeof R=="string"?R:R.id==="name"?p.takeName:B.value[re]??"").join(""))),ie=X(()=>oe.value.length>oB?oe.value.length-sB:0),te=X(()=>oe.value.length>oB?oe.value.slice(0,sB):oe.value),se=Y=>{A.value=[Y];const re=Y.id.split("_")[0],R=Y.id.split("_")[1],G=l[Y.id],J=r.value;if(!J)return;const ce=Ce=>g.value.find(Ne=>typeof Ne!="string"&&Ce.includes(Ne.id));if(re==="name"){ce(["name"])?J.deleteTag("name"):J.insertTag({id:re,text:G,direction:void 0});return}const Ee=ce(["number","letter"]);if(Ee){const Ce=Ee.id===re,Ne=Ee.direction===R;if(Ce&&Ne){J.deleteTag(Ee.id);return}J.deleteTag(Ee.id),J.insertTag({id:re,text:G,direction:R})}else J.insertTag({id:re,text:G,direction:R})},Z=Y=>j(Y.id)?Y.description.active:!!w.value&&Y.description.switch?Y.description.switch:Y.description.inactive,A=$(null),j=Y=>{const[re,R]=Y.split("_");return g.value.some(G=>typeof G!="string"&&G.id===re&&G.direction===R)},ne=n,ge=X(()=>{const[Y]=g.value;return g.value.length===1&&typeof Y!="string"&&Y.id==="name"});X(()=>g.value.length===0||ge.value);const xe=()=>{const Y=g.value.map(re=>typeof re=="string"?{type:"text",value:re}:re.id==="name"?{type:"current_name"}:{type:"counter",value:y.first,direction:re.direction=="up"?"asc":"desc",format:re.id==="number"?"number":"letter",step:y.step});ne("changed",{data:Y,count:T.value,template_flow_status_id:u.value||void 0})};Qe([g,f,y,u],()=>{xe()},{deep:!0,immediate:!0}),t({reset:()=>{A.value=null,g.value=[]},focus:()=>{var Y;(Y=i.value)==null||Y.focus()}}),Xt(()=>{var Y;(Y=i.value)==null||Y.focus()});const K=Y=>{var re,R;Y.preventDefault(),Y.stopPropagation(),(re=i.value)==null||re.blur(),(R=h.value)==null||R.focus()};return(Y,re)=>(q(),de("div",{class:"bulk-rename-core",ref_key:"popupRef",ref:h,tabindex:"-1"},[Se("div",Oue,[Se("div",Mue,[re[11]||(re[11]=Se("span",null,"How many to create?",-1)),ze(ye(V(hl),{modelValue:f.value,"onUpdate:modelValue":re[0]||(re[0]=R=>f.value=R),type:"number","max-value":nB,"max-decimal-char":0,"show-clear":!1,ref_key:"counterRef",ref:i,placeholder:""},null,8,["modelValue"]),[[V(s),v.value.createCount]])]),ze(ye(VN,{modelValue:g.value,"onUpdate:modelValue":re[1]||(re[1]=R=>g.value=R),"allowed-tags":a,ref_key:"templateInputRef",ref:r,placeholder:"Enter name",onEscape:K},null,8,["modelValue"]),[[V(s),v.value.input]]),Se("div",Nue,[(q(!0),de(Pt,null,xn(e.options,R=>ze((q(),de("button",{onClick:G=>se(R),ref_for:!0,ref:G=>d(R.id,G),key:R.id,class:le([{active:j(R.id)},"template-option"])},[tt(at(R.name)+" ",1),R.icon?(q(),je(V(gt),{key:0,src:R.icon,style:{transform:"rotate(90deg)"}},null,8,["src"])):Ye("",!0)],10,Lue)),[[V(o),{content:Z(R),bypassOverflowCheck:!0,delay:[300,0],interactive:!1,hideOnClick:!1,appendTo:"parent"}],[V(s),`${v.value[R.id]}`]])),128))]),Se("div",Vue,[Se("span",Bue,at(I.value.first),1),ze((q(),je(V(hl),{ref_key:"firstFieldRef",ref:x,"model-value":y.first,disabled:!w.value,"max-length":V(yE),onInput:re[2]||(re[2]=R=>F("first",R)),onKeydown:re[3]||(re[3]=R=>k("first",R)),onPaste:re[4]||(re[4]=R=>M("first",R)),onBlur:re[5]||(re[5]=R=>N("first")),"show-clear":!1},{clear:we(()=>[...re[12]||(re[12]=[Se("div",null,null,-1)])]),_:1},8,["model-value","disabled","max-length"])),[[V(s),v.value.firstField]]),Se("span",$ue,at(I.value.step),1),ze(ye(V(hl),{"model-value":y.step,disabled:!w.value,"max-length":V(wE),onInput:re[6]||(re[6]=R=>F("step",R)),onKeydown:re[7]||(re[7]=R=>k("step",R)),onPaste:re[8]||(re[8]=R=>M("step",R)),onBlur:re[9]||(re[9]=R=>N("step")),"show-clear":!1,ref_key:"fieldStepRef",ref:L},null,8,["model-value","disabled","max-length"]),[[V(s),v.value.stepField]])]),Se("div",Hue,[re[13]||(re[13]=Se("span",null,"Status",-1)),ye(V(wL),{modelValue:u.value,"onUpdate:modelValue":re[10]||(re[10]=R=>u.value=R),"get-status-func":p.getStatusFunc,"workspace-id":p.workspaceId,id:p.entityId,style:{width:"100%"},"max-width":"372px",ref_key:"selectStatusRef",ref:P,"focus-index":v.value.statusSelect},null,8,["modelValue","get-status-func","workspace-id","id","focus-index"])])]),Se("div",Gue,[re[14]||(re[14]=Se("span",{class:"preview-title"},"Preview",-1)),te.value.length>0?(q(),de("ul",Uue,[(q(!0),de(Pt,null,xn(te.value,(R,G)=>(q(),de("li",{key:G},[ye($N,{text:R},null,8,["text"])]))),128)),ie.value>0?(q(),de("li",Wue," ⦠"+at(ie.value)+" more ",1)):Ye("",!0)])):(q(),de("div",zue," Add a name or a counter to see a preview. "))])],512))}}),[["__scopeId","data-v-2591552a"]]),rB={text:yl,id:void 0,assignees:Mse,status:KN,dateRange:Nse,isStarted:yl,isCompleted:yl,lastUpdated:yl,completedOn:yl,isDeleted:yl,isArchived:yl,isProcessing:yl,name:GN,options:CQ,metric:zN,__checkboxSelection:void 0,description:Vie,thumbnail:Fue},Kue={text:!1,id:!1,assignees:!0,status:!0,dateRange:!0,isStarted:!1,isCompleted:!1,lastUpdated:!1,completedOn:!1,isDeleted:!1,isArchived:!1,isProcessing:!1,name:!1,options:!0,metric:!1,__checkboxSelection:!1,description:!1,thumbnail:!1},que={text:null,id:void 0,assignees:oM,status:NN,dateRange:Lse,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:GN,options:UN,metric:void 0,__checkboxSelection:void 0,description:void 0,thumbnail:void 0},Yue={id:[100,100],assignees:[200,200],status:[200,200],dateRange:[255,255],isStarted:[150,150],isCompleted:[150,150],lastUpdated:[180,180],completedOn:[180,180],isDeleted:[void 0,void 0],isArchived:[void 0,void 0],isProcessing:[void 0,void 0],name:[350,500],options:[50,50],metric:[200,300],__checkboxSelection:[50,50],text:[200,300],description:[200,300],thumbnail:[82,82]},Xue={dateRange:{cellEditorPopupPosition:"under",cellEditorPopup:!1},name:{cellEditorPopupPosition:"over",cellEditor:!1,cellEditorPopup:!1},metric:{suppressKeyboardEvent:void 0,suppressNavigable:!1,suppressMovable:!1,cellClass:"ag-cell-optimized",editable:!0}},Zue=e=>{var t,n,o;if(e){if(Number((t=e.metric_type)==null?void 0:t.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number((n=e.metric_type)==null?void 0:n.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number((o=e.metric_type)==null?void 0:o.id)==3)return}},Ld=e=>{if(e)return Zue(e)};function iB(e,t){var s,r,i,a;const n=(s=t==null?void 0:t.data)==null?void 0:s.permissions;let o={disabled:!1,readOnly:!1,type:void 0};if(!t||!e)o={disabled:!1,readOnly:!0,type:void 0};else if(e==="options")o={disabled:!1,readOnly:!1,type:void 0};else if(e!=null&&e.includes("metric")){const l=`metric_permission_${e==null?void 0:e.replace("metric_","")}`;o={disabled:!1,readOnly:!((t==null?void 0:t.data)&&t.data[l]&&((r=t.data[l])==null?void 0:r.permission)==2&&!((i=t.colDef)!=null&&i.context.formula)&&!t.data.isLocked&&!t.data.isDeleted),type:Ld((a=t.colDef)==null?void 0:a.context)}}else{const u={assignees:(n==null?void 0:n.has_update_assignee_permission)??0,completedOn:0,name:(n==null?void 0:n.has_edit_permission)??0,permissions:0,status:(n==null?void 0:n.has_edit_template_flow_status_permission)??0,dateRange:(n==null?void 0:n.has_edit_date_permission)??0,isStarted:0,isDeleted:0,isArchived:0,isLocked:0,isProcessing:0,lastUpdated:0,id:0,isCompleted:0,options:1,disabled:0,description:(n==null?void 0:n.has_edit_permission)??0,thumbnail:1}[e]??0;o={disabled:u===-1,readOnly:u!==1,type:void 0}}return o}class r_{constructor(){Rn(this,"eGui");Rn(this,"params")}init(t){this.params=t}getGui(){var n,o,s,r,i;const t=document.createElement("div");return(n=this.params)!=null&&n.height&&t.style.setProperty("--height",(o=this.params)==null?void 0:o.height),(s=this.params)!=null&&s.width?t.style.setProperty("--width",(r=this.params)==null?void 0:r.width):(i=this.params)!=null&&i.fullwidth?t.style.setProperty("--width","100%"):t.style.setProperty("--width",`${Math.floor(Math.random()*50)+50}%`),t.className="ag-cell-skeleton",t.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation()}),this.eGui=t,t}refresh(t){return!1}getValue(){var t;return(t=this.params)==null?void 0:t.value}isPopup(t){return!1}getPopupPosition(){}destroy(){}}const aB=new Map;class Tp{static initialize(t){this.wrappers=t}static getWrappers(){if(!this.wrappers)throw new Error("CellRendererFactory: Not initialized. Please call CellRendererFactory.initialize() first.");return this.wrappers}static buildCommonCellParams(t,n){var u,c,d;const o=t.data||((u=t.node)==null?void 0:u.data),s=(c=t.colDef)==null?void 0:c.field,r=s&&o?o[s]:void 0,i=iB((d=t.colDef)==null?void 0:d.field,t),a=typeof n=="function"?n(t):n??{};return{...t,value:r,disabled:i==null?void 0:i.disabled,readOnly:i==null?void 0:i.readOnly,type:Ld(t.context),...a}}static resolveRendererComponent(t,n){let o;return t.includes("metric")&&rB.metric?Ld(n)==="rating"?o=kie:o=zN:o=rB[t]??void 0,o}static resolveEditorComponent(t,n){const o=t.includes("metric");let s;const r=Ld(n);return o&&["number","dropdown"].includes(r)?s=Wre:s=que[t],s}static canEditField(t,n){var r;if(n.data===void 0)return!1;const o=iB((r=n.colDef)==null?void 0:r.field,n),s=Kue[t]??!0;return!(o!=null&&o.disabled)&&!(o!=null&&o.readOnly)&&s&&(o==null?void 0:o.type)!=="rating"}static resolveSize(t){const[n=250,o=300]=Yue[t]??[];return{minWidth:n,maxWidth:o}}static buildHeaderComponentParams(t){return n=>typeof t=="function"?t(n):t??{}}static fromType(t){const{wrapVueCellEditor:n}=this.getWrappers(),o=String(t.field??""),s=this.resolveSize(o),r=Xue[o]??{},i=Ld(t.context),a=i==="number"||i==="rating",l=i=="rating"?t.context.range*24+20:s.minWidth;return{...t,headerName:t.headerName,...s,...t,cellEditorSelector:c=>{const d=this.resolveEditorComponent(o,t.context);return{component:n(d),params:this.buildCommonCellParams(c,t.cellRendererParams),popup:!a}},singleClickEdit:!0,cellEditorPopup:!a,cellEditorPopupPosition:a?void 0:"under",editable:c=>{let d;return c.data===void 0||c.data.isDeleted||c.node.data===void 0?d=!1:d=this.canEditField(o,c),d},minWidth:l,cellRendererSelector:c=>Jue(c,{component:n(this.resolveRendererComponent(o,t.context)),params:this.buildCommonCellParams(c,t.cellRendererParams)}),headerComponentParams:this.buildHeaderComponentParams(t.headerComponentParams),...r,cellClass:c=>`${i}--${c.colDef.field}`}}}Rn(Tp,"wrappers",null);const Jue=(e,t)=>{var s;const n=(s=e.colDef)==null?void 0:s.field,o=`${n}-${e.node.rowIndex}`;return aB.set(o,(aB.get(o)??0)+1),n!=null&&n.includes("metric")?e.value===void 0?{component:r_,params:{fullwidth:!1}}:t:e.data&&(n!=null&&n.includes("thumbnail"))||e.data&&e.value!==void 0?t:!n||n==="options"||n==="__checkboxSelection"?e.data?t:{component:r_,params:{fullwidth:!0,width:"24px",height:"24px"}}:!e.data||e.value===void 0?{component:r_,params:{fullwidth:!1}}:t},Que=_t(ot({__name:"Vue3Wrapper",props:{component:{},params:{},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},tooltip:{},isNoData:{type:Boolean,default:!1},workspaceId:{},entityId:{},axiosService:{},isSearching:{type:Boolean,default:!1},isFiltering:{type:Boolean,default:!1},sortType:{default:"default"},maxRating:{default:5},config:{}},setup(e,{expose:t}){const n=e,o=$(null),s=X(()=>{var a;return((a=n.component)==null?void 0:a.name)||"UnknownComponent"}),r=X(()=>{var a;return((a=n.component)==null?void 0:a.default)||n.component}),i=X(()=>({params:n.params,disabled:n.disabled,readOnly:n.readOnly,value:n.value,maxRating:n.maxRating,data:n.data,id:n.id,workspaceId:n.workspaceId,entityId:n.entityId,axiosService:n.axiosService,tooltip:n.tooltip,isSearching:n.isSearching,isFiltering:n.isFiltering,isNoData:n.isNoData,config:n.config}));return t({focus:()=>{var a;return(a=o.value)!=null&&a.focus?o.value.focus():console.warn(`Component ${s.value} does not have a focus method.`),!0},blur:()=>{var a,l;return(l=(a=o.value)==null?void 0:a.blur)==null||l.call(a),!0},trigger:(a,l)=>{var u;return(u=o.value)==null||u.$emit(a,l),!0}}),(a,l)=>(q(),je(OC(r.value),jt(i.value,{ref_key:"componentRef",ref:o}),null,16))}}),[["__cssModules",{$style:{skeleton:"_skeleton_7xde7_1",shimmer:"_shimmer_7xde7_16","skeleton-loading":"_skeleton-loading_7xde7_1"}}]]);function ece(e){return"stopEditing"in e}const tce=8,nce=e=>{if(!e)return;const t=e.__vueParentComponent,n=t==null?void 0:t.exposed;n&&typeof n.triggerFocus=="function"?n.triggerFocus():e.focus()};function lB(e){return class{constructor(){Rn(this,"container");Rn(this,"vNode",null);Rn(this,"componentInstance",null);Rn(this,"componsenExposed",null);Rn(this,"params");Rn(this,"isEditor",!1);Rn(this,"_destroyed",!1)}init(n){var l,u,c,d;if(!n){console.error("[Vue3CellWrapper] Missing params");return}const o=performance.now();this.params=n,this.isEditor=ece(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper"),this.container.style.width="100%",this.container.style.height="100%";const s=n.context.apiClass,r=n,i={component:e,params:Object.freeze(n),disabled:!1,readOnly:r.readOnly??!1,value:n.value,maxRating:r.maxRating??void 0,data:n.data,id:(l=n==null?void 0:n.data)==null?void 0:l.id,workspaceId:n.context.workspaceId,entityId:n.context.entityId,axiosService:s,tooltip:r.tooltip??void 0,isSearching:r.isSearching??!1,isFiltering:r.isFiltering??!1,isNoData:r.isNoData??!1,config:r.config,sceneId:(r==null?void 0:r.sceneId)||void 0};this.vNode=ye(Que,i),rb(this.vNode,this.container);const a=performance.now()-o;a>tce&&console.warn(`[Vue3CellWrapper] Slow render (${a.toFixed(1)}ms) for "${(u=n.colDef)==null?void 0:u.field}"`),this.componentInstance=(c=this.vNode.component)==null?void 0:c.proxy,this.componsenExposed=(d=this.vNode.component)==null?void 0:d.exposed}getGui(){return this.container}refresh(n){return!1}focusUi(){var n;(n=this.componsenExposed)!=null&&n.focus?this.componsenExposed.focus():nce(this.container)}getValue(){var n,o,s;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((s=(o=this.componentInstance).getValue)==null?void 0:s.call(o))??this.componentInstance.value:(console.warn("[Vue3CellWrapper] getValue() called but component instance not available"),(n=this.params)==null?void 0:n.value)}isPopup(n){var i,a,l,u,c;const o=(l=(a=(i=this.params)==null?void 0:i.colDef)==null?void 0:a.field)==null?void 0:l.includes("metric"),s=((u=this.params)==null?void 0:u.context)&&Ld(this.params.context);return o||(s==="number"||s==="rating")||!this.isEditor?!1:(c=this.componentInstance)!=null&&c.isPopup?this.componentInstance.isPopup():!0}getPopupPosition(){var o,s,r;return this.isEditor?(o=this.componentInstance)!=null&&o.getPopupPosition?this.componentInstance.getPopupPosition():((r=(s=this.params)==null?void 0:s.colDef)==null?void 0:r.cellEditorPopupPosition)??"under":void 0}afterGuiAttached(){!this.isEditor||this.componentInstance}destroy(){if(!this._destroyed&&(this._destroyed=!0,!!this.container))try{const n=this.componentInstance;if(n){try{typeof n.$destroy=="function"&&n.$destroy()}catch(s){console.warn("[Vue3CellWrapper] Error during $destroy:",s)}try{typeof n.destroy=="function"&&n.destroy()}catch(s){console.warn("[Vue3CellWrapper] Error during destroy():",s)}}(typeof queueMicrotask=="function"?queueMicrotask:s=>Promise.resolve().then(s))(()=>{try{rb(null,this.container)}catch(s){console.warn("[Vue3CellWrapper] Error during unmount:",s)}finally{this.container.textContent=""}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function My(e){return lB(e)}function uB(e){return lB(e)}var Wu=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,n){const o=t?this.allAsyncListeners:this.allSyncListeners;let s=o.get(e);return!s&&n&&(s=new Set,o.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,n=!1){this.getListeners(e,n,!0).add(t)}removeEventListener(e,t,n=!1){const o=this.getListeners(e,n,!1);o&&(o.delete(t),o.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const n=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:o}=this,s=a=>{const l=o?()=>o.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},r=this.getListeners(n,t,!1);if(((r==null?void 0:r.size)??0)>0){const a=new Set(r);for(const l of a)r!=null&&r.has(l)&&s(()=>l(e))}const i=this.getGlobalListeners(t);if(i.size>0){const a=new Set(i);for(const l of a)s(()=>l(n,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}};function Ia(e){return e==null||e===""?null:e}function ft(e){return e!=null&&e!==""}function Gn(e){return!ft(e)}function i_(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Dp(e,t){const n=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return n===o}function oce(e,t,n=!1){const o=e==null,s=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),o&&s)return 0;if(o)return-1;if(s)return 1;function r(i,a){return i>a?1:i<a?-1:0}if(typeof e!="string"||!n)return r(e,t);try{return e.localeCompare(t)}catch{return r(e,t)}}var sce=/[&<>"']/g,rce={"&":"&","<":"<",">":">",'"':""","'":"'"};function Vd(e){return(e==null?void 0:e.toString().toString())??null}function Ip(e){var t;return((t=Vd(e))==null?void 0:t.replace(sce,n=>rce[n]))??null}function Ai(e){return e.eRootDiv.getRootNode()}function Kn(e){return Ai(e).activeElement}function $o(e){const{gos:t,eRootDiv:n}=e;let o=null;const s=t.get("getDocument");return s&&ft(s)?o=s():n&&(o=n.ownerDocument),o&&ft(o)?o:document}function cB(e){const t=Kn(e);return t===null||t===$o(e).body}function dB(e){return $o(e).defaultView||window}function a_(e){let t=null,n=null;try{t=$o(e).fullscreenElement}catch{}finally{t||(t=Ai(e));const o=t.querySelector("body");o?n=o:t instanceof ShadowRoot?n=t:t instanceof Document?n=t==null?void 0:t.documentElement:n=t}return n}function ice(e){const t=a_(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function ace(e){const t=a_(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Qr(e,t,n){n==null||typeof n=="string"&&n==""?hB(e,t):Ir(e,t,n)}function Ir(e,t,n){e.setAttribute(fB(t),n.toString())}function hB(e,t){e.removeAttribute(fB(t))}function fB(e){return`aria-${e}`}function Dl(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function lce(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function uce(e){return e.getAttribute("aria-label")}function Bd(e,t){Qr(e,"label",t)}function xp(e,t){Qr(e,"labelledby",t)}function pB(e,t){Qr(e,"live",t)}function cce(e,t){Qr(e,"atomic",t)}function dce(e,t){Qr(e,"relevant",t)}function hce(e,t){Qr(e,"invalid",t)}function fce(e,t){Qr(e,"disabled",t)}function gB(e,t){Qr(e,"hidden",t)}function l_(e,t){Ir(e,"expanded",t)}function pce(e,t){Ir(e,"setsize",t)}function gce(e,t){Ir(e,"posinset",t)}function mce(e,t){Ir(e,"multiselectable",t)}function vce(e,t){Ir(e,"rowcount",t)}function Ny(e,t){Ir(e,"rowindex",t)}function yce(e,t){Ir(e,"rowspan",t)}function wce(e,t){Ir(e,"colcount",t)}function mB(e,t){Ir(e,"colindex",t)}function Cce(e,t){Ir(e,"colspan",t)}function bce(e,t){Ir(e,"sort",t)}function Sce(e){hB(e,"sort")}function vB(e,t){Qr(e,"selected",t)}function Ece(e,t){Qr(e,"controls",t)}function _ce(e,t){Ece(e,t.id),xp(t,e.id)}function yB(e,t){Qr(e,"owns",t)}function Ly(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Rce="[tabindex], input, select, button, textarea, [href]",wB="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Ap(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(wB)?!1:Pi(e)}function Un(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-hidden",!t),o||gB(e,!t)}function Tce(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-invisible",!t),o||gB(e,!t)}function Pp(e,t){const n="disabled",o=t?r=>r.setAttribute(n,""):r=>r.removeAttribute(n);o(e);const s=e.querySelectorAll("input")??[];for(const r of s)o(r)}function zu(e,t,n){let o=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n=="number"){if(++o>n)break}else if(e===n)break}return!1}function ju(e){const{height:t,width:n,borderTopWidth:o,borderRightWidth:s,borderBottomWidth:r,borderLeftWidth:i,paddingTop:a,paddingRight:l,paddingBottom:u,paddingLeft:c,marginTop:d,marginRight:h,marginBottom:f,marginLeft:p,boxSizing:g}=window.getComputedStyle(e),v=Number.parseFloat;return{height:v(t||"0"),width:v(n||"0"),borderTopWidth:v(o||"0"),borderRightWidth:v(s||"0"),borderBottomWidth:v(r||"0"),borderLeftWidth:v(i||"0"),paddingTop:v(a||"0"),paddingRight:v(l||"0"),paddingBottom:v(u||"0"),paddingLeft:v(c||"0"),marginTop:v(d||"0"),marginRight:v(h||"0"),marginBottom:v(f||"0"),marginLeft:v(p||"0"),boxSizing:g}}function u_(e){const t=ju(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function kp(e){const t=ju(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function CB(e){const{height:t,marginBottom:n,marginTop:o}=ju(e);return Math.floor(t+n+o)}function Vy(e){const{width:t,marginLeft:n,marginRight:o}=ju(e);return Math.floor(t+n+o)}function bB(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:o,borderRightWidth:s,borderBottomWidth:r}=ju(e);return{top:t.top+(n||0),left:t.left+(o||0),right:t.right+(s||0),bottom:t.bottom+(r||0)}}function By(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function $y(e,t,n){n&&(t*=-1),e.scrollLeft=t}function qo(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function ei(e){e!=null&&e.parentNode&&e.remove()}function SB(e){return!!e.offsetParent}function Pi(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!SB(e)||window.getComputedStyle(e).visibility!=="visible")}function c_(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function EB(e,t,n){n&&n.nextSibling===t||(e.firstChild?n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function _B(e,t){for(let n=0;n<t.length;n++){const o=t[n],s=e.children[n];s!==o&&e.insertBefore(o,s)}}function Dce(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Fp(e,t){if(t)for(const n of Object.keys(t)){const o=t[n];if(!(n!=null&&n.length)||o==null)continue;const s=Dce(n),r=o.toString(),i=r.replace(/\s*!important/g,""),a=i.length!=r.length?"important":void 0;e.style.setProperty(s,i,a)}}function Hy(e){return()=>{const t=e();return t?d_(t)||RB(t):!0}}function d_(e){return e.clientWidth<e.scrollWidth}function RB(e){return e.clientHeight<e.scrollHeight}function Gy(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):ki(e,t)}function ki(e,t){t=h_(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Op(e,t){t=h_(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function h_(e){return typeof e=="number"?`${e}px`:e}function f_(e){return e instanceof Node||e instanceof HTMLElement}function Js(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Il(e,t,n){const s=dB(e).ResizeObserver,r=s?new s(n):null;return r==null||r.observe(t),()=>r==null?void 0:r.disconnect()}function xa(e,t){const n=dB(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var TB="data-ref",p_;function DB(){return p_??(p_=document.createTextNode(" ")),p_.cloneNode()}function Mp(e){const{attrs:t,children:n,cls:o,ref:s,role:r,tag:i}=e,a=document.createElement(i);if(o&&(a.className=o),s&&a.setAttribute(TB,s),r&&a.setAttribute("role",r),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(n)if(typeof n=="string")a.textContent=n;else{let l=!0;for(const u of n)u&&(typeof u=="string"?(a.appendChild(document.createTextNode(u)),l=!1):typeof u=="function"?a.appendChild(u()):(l&&(a.appendChild(DB()),l=!1),a.append(Mp(u)),a.appendChild(DB())))}return a}var Ice=["touchstart","touchend","touchmove","touchcancel","scroll"],xce=["wheel"],g_={},IB=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof g_[n]=="boolean")return g_[n];const o=document.createElement(e[n]||"div");return n="on"+n,g_[n]=n in o}})();function Ace(e,t){return!t||!e?!1:kce(t).indexOf(e)>=0}function Pce(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function kce(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Pce(t)}function Fce(e,t,n){const o=Oce(t);let s;o!=null&&(s={passive:o}),e.addEventListener(t,n,s)}var Oce=e=>{const t=Ice.includes(e),n=xce.includes(e);if(t)return!0;if(n)return!1};function xB(e,t,n){if(n===0)return!1;const o=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(o,s)<=n}var Np=(e,t)=>{const n=e.identifier;for(let o=0,s=t.length;o<s;++o){const r=t[o];if(r.identifier===n)return r}return null};function Lp(e,t){return e.gos.isElementInThisInstance(t.target)}function Mce(e,t,n){const s=e.getBoundingClientRect().height,r=ice(n)-2,i=ace(n)-2;if(!e.offsetParent)return;const l=bB(e.offsetParent),{clientY:u,clientX:c}=t;let d=u-l.top-s/2,h=c-l.left-10;const f=$o(n),p=f.defaultView||window,g=p.pageYOffset||f.documentElement.scrollTop,v=p.pageXOffset||f.documentElement.scrollLeft;r>0&&h+e.clientWidth>r+v&&(h=r+v-e.clientWidth),h<0&&(h=0),i>0&&d+e.clientHeight>i+g&&(d=i+g-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var Uy=(e,...t)=>{for(const n of t){const[o,s,r,i]=n;o.addEventListener(s,r,i),e.push(n)}},m_=e=>{if(e){for(const[t,n,o,s]of e)t.removeEventListener(n,o,s);e.length=0}},xl=e=>{e.cancelable&&e.preventDefault()};function Nce(e,t){return t}function AB(e){return(e==null?void 0:e.getLocaleTextFunc())??Nce}function Lce(e,t,n,o){const s=t[n];return e.getLocaleTextFunc()(n,typeof s=="function"?s(o):s,o)}function Vce(e){return(t,n,o)=>e({key:t,defaultValue:n,variableValues:o})}function Bce(e){return(t,n,o)=>{let s=e==null?void 0:e[t];if(s&&(o!=null&&o.length)){let r=0;for(;!(r>=o.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",o[r++])}return s??n}}var Fi=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,n){this.localEventService||(this.localEventService=new Wu),this.localEventService.addEventListener(e,t,n)}removeEventListener(e,t,n){var o;(o=this.localEventService)==null||o.removeEventListener(e,t,n)}dispatchLocalEvent(e){var t;(t=this.localEventService)==null||t.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const n=[];for(const o of Object.keys(t)){const s=t[o];s&&n.push(this._setupListener(e,o,s))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let o;if($ce(e))e.__addEventListener(t,n),o=()=>(e.__removeEventListener(t,n),null);else{const s=Hce(e);e instanceof HTMLElement?Fce(e,t,n):s?e.addListener(t,n):e.addEventListener(t,n),o=s?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}setupPropertyListener(e,t){const{gos:n}=this;n.addPropertyEventListener(e,t);const o=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const n=e.join("-")+this.propertyListenerId++,o=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=s.changeSet.id}const r={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(r)};for(const s of e)this.setupPropertyListener(s,o)}getLocaleTextFunc(){return AB(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}createBean(e,t,n){return(t||this.stubContext).createBean(e,n)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function $ce(e){return e.__addEventListener!==void 0}function Hce(e){return e.eventServiceType==="global"}var qe=class extends Fi{},PB={};function v_(e,t){PB[t]||(e(),PB[t]=!0)}var Gce={pending:!1,funcs:[]},Uce={pending:!1,funcs:[]};function y_(e,t="setTimeout",n){const o=t==="raf"?Uce:Gce;if(o.funcs.push(e),o.pending)return;o.pending=!0;const s=()=>{const r=o.funcs.slice();o.funcs.length=0,o.pending=!1;for(const i of r)i()};t==="raf"?xa(n,s):window.setTimeout(s,0)}function Yo(e,t,n){let o;return function(...s){const r=this;window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(r,s)},n)}}function kB(e,t){let n=0;return function(...o){const s=this,r=Date.now();r-n<t||(n=r,e.apply(s,o))}}function Wce(e,t,n,o=100){const s=Date.now();let r=null,i=!1;const a=()=>{r!=null&&(window.clearInterval(r),r=null)};e.addDestroyFunc(a);const l=()=>{const u=Date.now()-s>o;(t()||u)&&(n(),i=!0,a())};l(),i||(r=window.setInterval(l,10))}var FB=new Set(["__proto__","constructor","prototype"]);function zce(e,t){if(e!=null){if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(n.toString(),e[n]);return}for(const n of Object.keys(e).filter(o=>!FB.has(o)))t(n,e[n])}}function vs(e,t,n=!0,o=!1){ft(t)&&zce(t,(s,r)=>{let i=e[s];i!==r&&(o&&i==null&&r!=null&&typeof r=="object"&&r.constructor===Object&&(i={},e[s]=i),OB(r)&&OB(i)&&!Array.isArray(i)?vs(i,r,n,o):(n||r!==void 0)&&(e[s]=r))})}function OB(e){return typeof e=="object"&&e!==null}var w_=class Ga{static applyGlobalGridOptions(t){if(!Ga.gridOptions)return{...t};let n={};return vs(n,Ga.gridOptions,!0,!0),Ga.mergeStrategy==="deep"?vs(n,t,!0,!0):n={...n,...t},Ga.gridOptions.context&&(n.context=Ga.gridOptions.context),t.context&&(Ga.mergeStrategy==="deep"&&n.context&&vs(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(Ga.mergeStrategy==="deep"){const o=jce(t);if(o&&typeof o=="object"&&typeof n=="object")return Ga.applyGlobalGridOptions({[t]:n})[t]}return n}};w_.gridOptions=void 0,w_.mergeStrategy="shallow";var C_=w_;function jce(e){var t;return(t=C_.gridOptions)==null?void 0:t[e]}var Kce={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,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,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!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,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!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,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},MB="https://www.ag-grid.com";function Al(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function Vp(e,...t){v_(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function $d(e,...t){v_(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var NB=new Set,Wy={},Hd={},zy,LB=!1,VB=!1,qce=!1;function Yce(e){const[t,n]=e.version.split(".")||[],[o,s]=zy.split(".")||[];return t===o&&n===s}function Xce(e){var o;zy||(zy=e.version);const t=s=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${s} Please update all modules to the same version.`;e.version?Yce(e)||$d(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${zy}.`)):$d(t(`'${e.moduleName}' is incompatible.`));const n=(o=e.validate)==null?void 0:o.call(e);n&&!n.isValid&&$d(`${n.message}`)}function Bp(e,t,n=!1){n||(LB=!0),Xce(e);const o=e.rowModels??["all"];NB.add(e);let s;t!==void 0?(VB=!0,Hd[t]===void 0&&(Hd[t]={}),s=Hd[t]):s=Wy;for(const r of o)s[r]===void 0&&(s[r]={}),s[r][e.moduleName]=e;if(e.dependsOn)for(const r of e.dependsOn)Bp(r,t,n)}function Zce(e){delete Hd[e]}function b_(e,t,n){const o=s=>{var r,i,a;return!!((r=Wy[s])!=null&&r[e])||!!((a=(i=Hd[t])==null?void 0:i[s])!=null&&a[e])};return o(n)||o("all")}function S_(){return VB}function Jce(e,t){const n=Hd[e]??{};return[...Object.values(Wy.all??{}),...Object.values(n.all??{}),...Object.values(Wy[t]??{}),...Object.values(n[t]??{})]}function Qce(){return new Set(NB)}function ede(){return LB}function BB(){return qce}var tde=class{static register(e){Bp(e,void 0)}static registerModules(e){for(const t of e)Bp(t,void 0)}},ct="34.3.1",$B=2e3,HB=100,GB="_version_",jy=null,Gd=`${MB}/javascript-data-grid`;function nde(e){jy=e}function ode(e){Gd=e}function UB(e,t,n){return(jy==null?void 0:jy(e,t))??[ade(e,t,n)]}function E_(e,t,n,o,s){e(`${o?"warning":"error"} #${t}`,...UB(t,n,s))}function sde(e){if(!e)return String(e);const t={};for(const n of Object.keys(e))typeof e[n]!="object"&&typeof e[n]!="function"&&(t[n]=e[n]);return JSON.stringify(t)}function rde(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=sde(e)),t}function Ky(e){return e===void 0?"undefined":e===null?"null":e}function __(e,t){return`${e}?${t.toString()}`}function ide(e,t,n){const o=Array.from(t.entries()).sort((r,i)=>i[1].length-r[1].length);let s=__(e,t);for(const[r,i]of o){if(r===GB)continue;const a=s.length-n;if(a<=0)break;const l="...",u=a+l.length,c=i.length-u>HB?i.slice(0,i.length-u)+l:i.slice(0,HB)+l;t.set(r,c),s=__(e,t)}return s}function WB(e,t){const n=new URLSearchParams;if(n.append(GB,ct),t)for(const r of Object.keys(t))n.append(r,rde(t[r]));const o=`${Gd}/errors/${e}`,s=__(o,n);return s.length<=$B?s:ide(o,n,$B)}var ade=(e,t,n)=>{const o=WB(e,t),s=`${n?n+`
|
|
194
194
|
`:""}Visit ${o}`;return BB()?s:`${s}${n?"":`
|
|
195
195
|
Alternatively register the ValidationModule to see the full message in the console.`}`};function Je(...e){E_(Vp,e[0],e[1],!0)}function _n(...e){E_($d,e[0],e[1],!1)}function $p(e,t,n){E_($d,e,t,!1,n)}function lde(e,t){const n=t[0];return`error #${n} `+UB(n,t[1],e).join(" ")}function Oi(...e){return lde(void 0,e)}function zB(e,t){return e.get("rowModelType")===t}function io(e,t){return zB(e,"clientSide")}function Ud(e,t){return zB(e,"serverSide")}function Xo(e,t){return e.get("domLayout")===t}function Ku(e){return Xy(e)!==void 0}function jB(e){return typeof e.get("getRowHeight")=="function"}function ude(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function Pl(e,t,n=!1,o){const{gos:s,environment:r}=e;if(o==null&&(o=r.getDefaultRowHeight()),jB(s)){if(n)return{height:o,estimated:!0};const l={node:t,data:t.data},u=s.getCallback("getRowHeight")(l);if(R_(u))return u===0&&Je(23),{height:Math.max(1,u),estimated:!1}}if(t.detail&&s.get("masterDetail"))return cde(s);const i=s.get("rowHeight");return{height:i&&R_(i)?i:o,estimated:!1}}function cde(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return R_(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function qu(e){const{environment:t,gos:n}=e,o=n.get("rowHeight");if(!o||Gn(o))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(Je(24),t.getDefaultRowHeight())}function R_(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function KB(e,t,n){const o=t[e.getDomDataKey()];return o?o[n]:void 0}function Yu(e,t,n,o){const s=e.getDomDataKey();let r=t[s];Gn(r)&&(r={},t[s]=r),r[n]=o}function Wd(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function qB(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Xo(e,"print"))}function Mi(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function T_(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function YB(e){return e.get("grandTotalRow")}function XB(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function ZB(e,t,n){return!!t.group&&!t.footer&&XB(e,n)}function zd(e){const t=e.getCallback("getRowId");return t===void 0?t:n=>{let o=t(n);return typeof o!="string"&&(v_(()=>Je(25,{id:o}),"getRowIdString"),o=String(o)),o}}function dde(e,t){const n=e.get("groupHideParentOfSingleChild");return!!(n===!0||n==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function hde(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function jd(e){return(e==null?void 0:e.checkboxes)??!0}function qy(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function Yy(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function D_(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function fde(e){return typeof e.get("rowSelection")!="string"}function Aa(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function JB(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const n=e.get("suppressRowClickSelection"),o=e.get("suppressRowDeselection");return n&&o?!1:n?"enableDeselection":o?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function pde(e){const t=JB(e);return t===!0||t==="enableSelection"}function gde(e){const t=JB(e);return t===!0||t==="enableDeselection"}function I_(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function Xy(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t==null?void 0:t.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function Hp(e){return Xy(e)==="multiRow"}function mde(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function Zy(e){const t=e.get("rowSelection");if(typeof t=="string"){const n=e.get("groupSelectsChildren"),o=e.get("groupSelectsFiltered");return n&&o?"filteredDescendants":n?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function QB(e,t=!0){const n=e.get("rowSelection");return typeof n!="object"?t?"all":void 0:n.mode==="multiRow"?n.selectAll:"all"}function vde(e){const t=e.get("rowSelection");return typeof t=="string"?!1:(t==null?void 0:t.mode)==="multiRow"?t.ctrlASelectsRows??!1:!1}function Gp(e){const t=Zy(e);return t==="descendants"||t==="filteredDescendants"}function e2(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function yde(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function Qs(e){return e.get("columnMenu")==="legacy"}function wde(e){return!Qs(e)}function Cde(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function Ot(e,t){return e.addCommon(t)}function t2({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var bde={resizable:!0,sortable:!0},Sde=0;function n2(){return Sde++}function kl(e){return e instanceof Xu}var Xu=class extends qe{constructor(e,t,n,o){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=n,this.primary=o,this.isColumn=!0,this.instanceId=n2(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new Wu,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Ip(n)}destroy(){var e;super.destroy(),(e=this.beans.rowSpanSvc)==null||e.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:n,colFlex:o}}=this;t==null||t.initCol(this);const s=e.hide;s!==void 0?this.visible=!s:this.visible=!e.initialHide,n==null||n.initCol(this),o==null||o.initCol(this)}setColDef(e,t,n){var s;const o=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),o&&((s=this.beans.rowSpanSvc)==null||s.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",n)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:n}}=this,o=e.get("suppressFieldDotNotation");this.fieldContainsDots=ft(t)&&t.includes(".")&&!o,this.tooltipFieldContainsDots=ft(n)&&n.includes(".")&&!o}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){var e;(e=this.beans.tooltipSvc)==null||e.initCol(this)}initRowSpan(){var e;this.colDef.spanRows&&((e=this.beans.rowSpanSvc)==null||e.register(this))}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:n=>{const o=e.recreateColDef(this.colDef);this.setColDef(o,o,n.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const n=e.width,o=e.initialWidth;return n!=null?t=n:o!=null?t=o:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){var t;return((t=this.beans.showRowGroupCols)==null?void 0:t.isRowGroupDisplayed(this,e))??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){var o,s,r;this.frameworkEventListenerService=(s=(o=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:s.call(o,this.frameworkEventListenerService,this.colEventSvc);const n=((r=this.frameworkEventListenerService)==null?void 0:r.wrap(e,t))??t;this.colEventSvc.addEventListener(e,n)}removeEventListener(e,t){var o;const n=((o=this.frameworkEventListenerService)==null?void 0:o.unwrap(e,t))??t;this.colEventSvc.removeEventListener(e,n)}createColumnFunctionCallbackParams(e){return Ot(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){var t;return((t=this.beans.cellNavigation)==null?void 0:t.isSuppressNavigable(this,e))??!1}isCellEditable(e){var t;return((t=this.beans.editSvc)==null?void 0:t.isCellEditable({rowNode:e,column:this}))??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){var t;return((t=this.beans.selectionSvc)==null?void 0:t.isCellCheckboxSelection(this,e))??!1}isSuppressPaste(e){var t;return this.isColumnFunc(e,((t=this.colDef)==null?void 0:t.suppressPaste)??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??bde[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const n=this.createColumnFunctionCallbackParams(e);return t(n)}return!1}createColumnEvent(e,t){return Ot(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return Gn(this.sort)}isSorting(){return ft(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){var e;return Je(261),!!((e=this.beans.colHover)!=null&&e.isHovered(this))}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}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(e,t){const n=e===!0;this.visible!==n&&(this.visible=n,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e!=null&&e.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!(e!=null&&e.isPadding()))return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let n=!0;for(;e;){if(!e.isPadding()){n=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:n}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return Ot(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(Gn(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)}getRowSpan(e){if(Gn(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.rowSpan(t);return Math.max(n,1)}setActualWidth(e,t,n=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),n||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,n){const o=this.createColumnEvent(e,t);n&&vs(o,n),this.colEventSvc.dispatchEvent(o)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function ss(e){return e instanceof Jy}var Jy=class extends qe{constructor(e,t,n,o){super(),this.colGroupDef=e,this.groupId=t,this.padding=n,this.level=o,this.isColumn=!1,this.expandable=!1,this.instanceId=n2(),this.expandableListenerRemoveCallback=null,this.expanded=!!(e!=null&&e.openByDefault)}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)kl(t)?e(t):ss(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)kl(t)?e.push(t):ss(t)&&t.addLeafColumns(e)}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,n=!1;const o=this.findChildrenRemovingPadding();for(let r=0,i=o.length;r<i;r++){const a=o[r];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,n=!0):l==="closed"?(t=!0,n=!0):(e=!0,t=!0)}const s=e&&t&&n;this.expandable!==s&&(this.expandable=s,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=n=>{for(const o of n)ss(o)&&o.isPadding()?t(o.children):e.push(o)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},Ede={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function o2(e,t,n){const o={},s=e.gos;return Object.assign(o,s.get("defaultColGroupDef")),Object.assign(o,t),s.validateColDef(o,n),o}var _de=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=i_(e);let n=0;for(;;){let o=e??t;if(o?n!==0&&(o+="_"+n):o=n,!this.existingKeys[o]){const s=String(o);return e&&n>0&&Je(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}n++}}};function kn(e){if(e!=null&&e.length)return e[e.length-1]}function Fl(e,t,n){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const o=e.length;if(o!==t.length)return!1;for(let s=0;s<o;s++)if(e[s]!==t[s]&&!(n!=null&&n(e[s],t[s])))return!1;return!0}function Up(e,t){if(e)for(const n of e)t(n)}function ti(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}function s2(e,t,n){for(let o=0;o<t.length;o++)ti(e,t[o]);for(let o=t.length-1;o>=0;o--)e.splice(n,0,t[o])}var Qy="ag-Grid-AutoColumn",r2="ag-Grid-SelectionColumn",i2="ag-Grid-RowNumbersColumn";function a2(e){const t=[],n=o=>{for(let s=0;s<o.length;s++){const r=o[s];kl(r)?t.push(r):ss(r)&&n(r.getChildren())}};return n(e),t}function Pa(e){return e.reduce((t,n)=>t+n.getActualWidth(),0)}function ew(e,t,n){const o={};if(!t)return;Oa(null,t,r=>{o[r.getInstanceId()]=r}),n&&Oa(null,n,r=>{o[r.getInstanceId()]=null});const s=Object.values(o).filter(r=>r!=null);e.context.destroyBeans(s)}function x_(e){return e.getId().startsWith(Qy)}function ka(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(r2))??!1}function Fa(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(i2))??!1}function Rde(e){return ka(e)||Fa(e)}function tw(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function Tde(e,t){return Fl(e,t,(n,o)=>n.getColId()===o.getColId())}function Dde(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function Kd(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Wp(e,t){const n=e===t,o=e.getColDef()===t,s=e.getColId()==t;return n||o||s}var Ide=(e,t)=>(n,o)=>{const s={value1:void 0,value2:void 0};let r=!1;return e&&(e[n]!==void 0&&(s.value1=e[n],r=!0),ft(o)&&e[o]!==void 0&&(s.value2=e[o],r=!0)),!r&&t&&(t[n]!==void 0&&(s.value1=t[n]),ft(o)&&t[o]!==void 0&&(s.value2=t[o])),s},xde=(e,t)=>{ss(e)&&e.setupExpandable(),e.originalParent=t};function Ade(e,t=null,n,o,s){const r=new _de,{existingCols:i,existingGroups:a,existingColKeys:l}=Pde(o);r.addExistingKeys(l);const u=l2(e,t,0,n,i,r,a,s),{colGroupSvc:c}=e,d=(c==null?void 0:c.findMaxDepth(u,0))??0,h=c?c.balanceColumnTree(u,0,d,r):u;return Oa(null,h,xde),{columnTree:h,treeDepth:d}}function Pde(e){const t=[],n=[],o=[];return e&&Oa(null,e,s=>{if(ss(s)){const r=s;n.push(r)}else{const r=s;o.push(r.getId()),t.push(r)}}),{existingCols:t,existingGroups:n,existingColKeys:o}}function l2(e,t,n,o,s,r,i,a){if(!t)return[];const{colGroupSvc:l}=e,u=new Array(t.length);for(let c=0;c<u.length;c++){const d=t[c];l&&Lde(d)?u[c]=l.createProvidedColumnGroup(o,d,n,s,r,i,a):u[c]=kde(e,o,d,s,r,a)}return u}function kde(e,t,n,o,s,r){var l;const i=Ode(n,o);i&&(o==null||o.splice(i.idx,1));let a=i==null?void 0:i.column;if(a){const u=A_(e,n,a.getColId());a.setColDef(u,n,r),Fde(e,a,u,r)}else{const u=s.getUniqueKey(n.colId,n.field),c=A_(e,n,u);a=new Xu(c,n,u,t),e.context.createBean(a)}return(l=e.dataTypeSvc)==null||l.addColumnListeners(a),a}function u2(e,t,n,o,s,r,i,a){const{sortSvc:l,pinnedCols:u,colFlex:c}=e;n!==void 0&&t.setVisible(!n,a),l&&(l.updateColSort(t,o,a),s!==void 0&&l.setColSortIndex(t,s)),r!==void 0&&(u==null||u.setColPinned(t,r)),i!==void 0&&(c==null||c.setColFlex(t,i))}function Fde(e,t,n,o){u2(e,t,n.hide,n.sort,n.sortIndex,n.pinned,n.flex,o);const s=t.getFlex();if(!(s!=null&&s>0))if(n.width!=null)t.setActualWidth(n.width,o);else{const r=t.getActualWidth();t.setActualWidth(r,o)}}function Ode(e,t){if(t)for(let n=0;n<t.length;n++){const o=t[n].getUserProvidedColDef();if(!o)continue;if(e.colId!=null){if(t[n].getId()===e.colId)return{idx:n,column:t[n]};continue}if(e.field!=null){if(o.field===e.field)return{idx:n,column:t[n]};continue}if(o===e)return{idx:n,column:t[n]}}}function A_(e,t,n,o){const{gos:s,dataTypeSvc:r}=e,i={},a=s.get("defaultColDef");vs(i,a,!1,!0);const l=Mde(e,i,t,n);l&&Nde(e,l,i);const u=i.cellDataType;vs(i,t,!1,!0),u!==void 0&&(i.cellDataType=u);const c=s.get("autoGroupColumnDef"),d=Mi(s);return t.rowGroup&&c&&d&&vs(i,{sort:c.sort,initialSort:c.initialSort},!1,!0),r&&(r.postProcess(i),r.validateColDef(i)),s.validateColDef(i,n,o),i}function Mde(e,t,n,o){var i;const s=(i=e.dataTypeSvc)==null?void 0:i.updateColDefAndGetColumnType(t,n,o),r=n.type??s??t.type;return t.type=r,r?tw(r):void 0}function Nde(e,t,n){if(!t.length)return;const o=Object.assign({},Ede),s=e.gos.get("columnTypes")||{};for(const r of Object.keys(s)){const i=s[r];r in o?Je(34,{key:r}):(i.type&&Je(35),o[r]=i)}for(const r of t){const i=o[r.trim()];i?vs(n,i,!1,!0):Je(36,{t:r})}}function Lde(e){return e.children!==void 0}function Oa(e,t,n){if(t)for(let o=0;o<t.length;o++){const s=t[o];ss(s)&&Oa(s,s.getChildren(),n),n(s,e)}}function c2(e,t){const n=[],o=[],s=[];return e.forEach(i=>{const a=i.getColDef().lockPosition;a==="right"?s.push(i):a==="left"||a===!0?n.push(i):o.push(i)}),t.get("enableRtl")?[...s,...o,...n]:[...n,...o,...s]}function d2(e,t){let n=!0;return Oa(null,t,o=>{if(!ss(o))return;const s=o,r=s.getColGroupDef();if(!(r==null?void 0:r.marryChildren))return;const a=[];for(const h of s.getLeafColumns()){const f=e.indexOf(h);a.push(f)}const l=Math.max.apply(Math,a),u=Math.min.apply(Math,a),c=l-u,d=s.getLeafColumns().length-1;c>d&&(n=!1)}),n}function h2(e,t){if(!e||e.length==0)return;const n=t(e[0]);for(let o=1;o<e.length;o++)if(n!==t(e[o]))return;return n}function f2(e,t,n){if(!t.length)return;const o=t.length===1?t[0]:null,s=h2(t,r=>r.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:o,source:n})}function Vde(e,t,n){if(!t.length)return;const o=t.length===1?t[0]:null,s=h2(t,r=>r.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:o,source:n})}function Bde(e,t,n,o){e.dispatchEvent({type:t,columns:n,column:n&&n.length==1?n[0]:null,source:o})}function qd(e,t,n,o,s=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:n,source:o})}function ni(e,t,n){var E;const{colModel:o,rowGroupColsSvc:s,pivotColsSvc:r,autoColSvc:i,selectionColSvc:a,colAnimation:l,visibleCols:u,pivotResultCols:c,environment:d,valueColsSvc:h,eventSvc:f,gos:p}=e,g=o.getColDefCols()??[],v=a==null?void 0:a.getColumns();if(!g.length&&!(v!=null&&v.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return Je(32),!1;const w=(_,I,T,F,L)=>{if(!_)return;const x=Ide(I,t.defaultState),P=x("flex").value1;if(u2(e,_,x("hide").value1,x("sort").value1,x("sortIndex").value1,x("pinned").value1,P,n),P==null){const k=x("width").value1;if(k!=null){const M=_.getColDef().minWidth??d.getDefaultColumnMinWidth();M!=null&&k>=M&&_.setActualWidth(k,n)}}L||!_.isPrimary()||(h==null||h.syncColumnWithState(_,n,x),s==null||s.syncColumnWithState(_,n,x,T),r==null||r.syncColumnWithState(_,n,x,F))},S=(_,I,T)=>{var se,Z;const F=p2(e,n),L=I.slice(),x={},P={},k=[],M=[],N=[];let B=0;const z=(s==null?void 0:s.columns.slice())??[],oe=(r==null?void 0:r.columns.slice())??[];for(const A of _){const j=A.colId;if(j.startsWith(Qy)){k.push(A),N.push(A);continue}if(ka(j)){M.push(A),N.push(A);continue}const ge=T(j);ge?(w(ge,A,x,P,!1),ti(L,ge)):(N.push(A),B+=1)}const ie=A=>w(A,null,x,P,!1);L.forEach(ie),s==null||s.sortColumns(m2.bind(s,x,z)),r==null||r.sortColumns(m2.bind(r,P,oe)),o.refreshCols(!1,n);const te=(A,j,ne=[])=>{for(const ge of j){const xe=A(ge.colId);ti(ne,xe),w(xe,ge,null,null,!0)}ne.forEach(ie)};return te(A=>(i==null?void 0:i.getColumn(A))??null,k,(se=i==null?void 0:i.getColumns())==null?void 0:se.slice()),te(A=>(a==null?void 0:a.getColumn(A))??null,M,(Z=a==null?void 0:a.getColumns())==null?void 0:Z.slice()),Hde(t,o,p),u.refresh(n),f.dispatchEvent({type:"columnEverythingChanged",source:n}),F(),{unmatchedAndAutoStates:N,unmatchedCount:B}};l==null||l.start();let{unmatchedAndAutoStates:b,unmatchedCount:y}=S(t.state||[],g,_=>o.getColDefCol(_));if(b.length>0||ft(t.defaultState)){const _=((E=c==null?void 0:c.getPivotResultCols())==null?void 0:E.list)??[];y=S(b,_,I=>(c==null?void 0:c.getPivotResultCol(I))??null).unmatchedCount}return l==null||l.finish(),y===0}function $de(e,t){var S,b;const{colModel:n,autoColSvc:o,selectionColSvc:s,eventSvc:r,gos:i}=e,a=n.getColDefCols();if(!(a!=null&&a.length))return;const l=n.getColDefColTree(),u=a2(l),c=[];let d=1e3,h=1e3;const f=y=>{const E=g2(y);Gn(E.rowGroupIndex)&&E.rowGroup&&(E.rowGroupIndex=d++),Gn(E.pivotIndex)&&E.pivot&&(E.pivotIndex=h++),c.push(E)};(S=o==null?void 0:o.getColumns())==null||S.forEach(f),(b=s==null?void 0:s.getColumns())==null||b.forEach(f),u==null||u.forEach(f),ni(e,{state:c},t);const p=(o==null?void 0:o.getColumns())??[],w=[...(s==null?void 0:s.getColumns())??[],...p,...a].map(y=>({colId:y.colId}));ni(e,{state:w,applyOrder:!0},t),r.dispatchEvent(Ot(i,{type:"columnsReset",source:t}))}function p2(e,t){const{rowGroupColsSvc:n,pivotColsSvc:o,valueColsSvc:s,colModel:r,sortSvc:i,eventSvc:a}=e,l={rowGroupColumns:(n==null?void 0:n.columns.slice())??[],pivotColumns:(o==null?void 0:o.columns.slice())??[],valueColumns:(s==null?void 0:s.columns.slice())??[]},u=nw(e),c={};for(const d of u)c[d.colId]=d;return()=>{const d=(_,I,T,F)=>{const L=I.map(F),x=T.map(F);if(Fl(L,x))return;const k=new Set(I);for(const N of T)k.delete(N)||k.add(N);const M=[...k];a.dispatchEvent({type:_,columns:M,column:M.length===1?M[0]:null,source:t})},h=_=>{const I=[];return r.forAllCols(T=>{const F=c[T.getColId()];F&&_(F,T)&&I.push(T)}),I},f=_=>_.getColId();d("columnRowGroupChanged",l.rowGroupColumns,(n==null?void 0:n.columns)??[],f),d("columnPivotChanged",l.pivotColumns,(o==null?void 0:o.columns)??[],f);const g=h((_,I)=>{const T=_.aggFunc!=null,F=T!=I.isValueActive(),L=T&&_.aggFunc!=I.getAggFunc();return F||L});g.length>0&&Bde(a,"columnValueChanged",g,t),qd(a,h((_,I)=>_.width!=I.getActualWidth()),!0,t),f2(a,h((_,I)=>_.pinned!=I.getPinned()),t),Vde(a,h((_,I)=>_.hide==I.isVisible()),t);const y=h((_,I)=>_.sort!=I.getSort()||_.sortIndex!=I.getSortIndex());y.length>0&&(i==null||i.dispatchSortChangedEvents(t,y));const E=nw(e);Ude(u,E,t,r,a)}}function nw(e){const{colModel:t,rowGroupColsSvc:n,pivotColsSvc:o}=e,s=t.getColDefCols();if(Gn(s)||!t.isAlive())return[];const r=n==null?void 0:n.columns,i=o==null?void 0:o.columns,a=[],l=c=>{const d=c.isRowGroupActive()&&r?r.indexOf(c):null,h=c.isPivotActive()&&i?i.indexOf(c):null,f=c.isValueActive()?c.getAggFunc():null,p=c.getSort()!=null?c.getSort():null,g=c.getSortIndex()!=null?c.getSortIndex():null;a.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:p,sortIndex:g,aggFunc:f,rowGroup:c.isRowGroupActive(),rowGroupIndex:d,pivot:c.isPivotActive(),pivotIndex:h,flex:c.getFlex()??null})};t.forAllCols(c=>l(c));const u=new Map(t.getCols().map((c,d)=>[c.getColId(),d]));return a.sort((c,d)=>{const h=u.has(c.colId)?u.get(c.colId):-1,f=u.has(d.colId)?u.get(d.colId):-1;return h-f}),a}function g2(e){const t=(p,g)=>p??g??null,n=e.getColDef(),o=t(n.sort,n.initialSort),s=t(n.sortIndex,n.initialSortIndex),r=t(n.hide,n.initialHide),i=t(n.pinned,n.initialPinned),a=t(n.width,n.initialWidth),l=t(n.flex,n.initialFlex);let u=t(n.rowGroupIndex,n.initialRowGroupIndex),c=t(n.rowGroup,n.initialRowGroup);u==null&&!c&&(u=null,c=null);let d=t(n.pivotIndex,n.initialPivotIndex),h=t(n.pivot,n.initialPivot);d==null&&!h&&(d=null,h=null);const f=t(n.aggFunc,n.initialAggFunc);return{colId:e.getColId(),sort:o,sortIndex:s,hide:r,pinned:i,width:a,flex:l,rowGroup:c,rowGroupIndex:u,pivot:h,pivotIndex:d,aggFunc:f}}function Hde(e,t,n){if(!e.applyOrder||!e.state)return;const o=[];for(const s of e.state)s.colId!=null&&o.push(s.colId);Gde(t.cols,o,t,n)}function Gde(e,t,n,o){if(e==null)return;let s=[];const r={};for(const a of t){if(r[a])continue;const l=e.map[a];l&&(s.push(l),r[a]=!0)}let i=0;for(const a of e.list){const l=a.getColId();if(r[l]!=null)continue;l.startsWith(Qy)?s.splice(i++,0,a):s.push(a)}if(s=c2(s,o),!d2(s,n.getColTree())){Je(39);return}e.list=s}function Ude(e,t,n,o,s){const r={};for(const c of t)r[c.colId]=c;const i={};for(const c of e)r[c.colId]&&(i[c.colId]=!0);const a=e.filter(c=>i[c.colId]),l=t.filter(c=>i[c.colId]),u=[];l.forEach((c,d)=>{const h=a==null?void 0:a[d];if(h&&h.colId!==c.colId){const f=o.getCol(h.colId);f&&u.push(f)}}),u.length&&s.dispatchEvent({type:"columnMoved",columns:u,column:u.length===1?u[0]:null,finished:!0,source:n})}var m2=(e,t,n,o)=>{const s=e[n.getId()],r=e[o.getId()],i=s!=null,a=r!=null;if(i&&a)return s-r;if(i)return-1;if(a)return 1;const l=t.indexOf(n),u=t.indexOf(o),c=l>=0,d=u>=0;return c&&d?l-u:c?-1:1},Wde=class extends qe{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(Kd(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Kd(e.source)))}createColsFromColDefs(e){var S,b,y;const{beans:t}=this,{valueCache:n,colAutosize:o,rowGroupColsSvc:s,pivotColsSvc:r,valueColsSvc:i,visibleCols:a,eventSvc:l,groupHierarchyColSvc:u}=t,c=this.colDefs?p2(t,e):void 0;n==null||n.expire();const d=(S=this.colDefCols)==null?void 0:S.list,h=(b=this.colDefCols)==null?void 0:b.tree,f=Ade(t,this.colDefs,!0,h,e);ew(t,(y=this.colDefCols)==null?void 0:y.tree,f.columnTree);const p=f.columnTree,g=f.treeDepth,v=a2(p),w={};for(const E of v)w[E.getId()]=E;this.colDefCols={tree:p,treeDepth:g,list:v,map:w},this.createColumnsForService([u],this.colDefCols,e),s==null||s.extractCols(e,d),r==null||r.extractCols(e,d),i==null||i.extractCols(e,d),this.ready=!0,this.refreshCols(!0,e),a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),c&&(this.changeEventsDispatching=!0,c(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(o==null||o.applyAutosizeStrategy())}refreshCols(e,t){var v;if(!this.colDefCols)return;const n=(v=this.cols)==null?void 0:v.tree;this.saveColOrder();const{autoColSvc:o,selectionColSvc:s,rowNumbersSvc:r,quickFilter:i,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:u,visibleCols:c,colViewport:d,eventSvc:h}=this.beans,f=this.selectCols(a,this.colDefCols);this.createColumnsForService([o,s,r],f,t);const p=ude(this.gos,this.showingPivotResult);(!e||p)&&this.restoreColOrder(f),this.positionLockedCols(f),l==null||l.refresh(),i==null||i.refreshCols(),this.setColSpanActive(),u==null||u.setAutoHeightActive(f),c.clear(),d.clear(),!Fl(n,this.cols.tree)&&h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,n){for(const o of e)o&&(o.createColumns(t,s=>{this.lastOrder=s(this.lastOrder),this.lastPivotOrder=s(this.lastPivotOrder)},n),o.addColumns(t))}selectCols(e,t){const n=(e==null?void 0:e.getPivotResultCols())??null;this.showingPivotResult=n!=null;const{map:o,list:s,tree:r,treeDepth:i}=n??t;return this.cols={list:s.slice(),map:{...o},tree:r.slice(),treeDepth:i},n&&(n.list.some(l=>{var u;return((u=this.cols)==null?void 0:u.map[l.getColId()])!==void 0})||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{valueColsSvc:e,selectionColSvc:t,gos:n}=this.beans,o=this.isPivotMode()&&!this.showingPivotResult,s=t==null?void 0:t.isSelectionColumnEnabled(),r=n.get("rowNumbers"),i=e==null?void 0:e.columns;return this.cols.list.filter(l=>{const u=x_(l);if(o){const c=i==null?void 0:i.includes(l);return u||c||s&&ka(l)||r&&Fa(l)}else return u||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,n){ni(this.beans,{state:e.map(o=>({colId:typeof o=="string"?o:o.getColId(),hide:!t}))},n)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const n=t.filter(d=>e.map[d.getId()]!=null);if(n.length===0)return;if(n.length===e.list.length){e.list=n;return}const o=d=>{const h=d.getOriginalParent();return h?h.getChildren().length>1?!0:o(h):!1};if(!n.some(d=>o(d))){const d=new Set(n);for(const h of e.list)d.has(h)||n.push(h);e.list=n;return}const s=new Map;for(let d=0;d<n.length;d++){const h=n[d];s.set(h,d)}const r=e.list.filter(d=>!s.has(d));if(r.length===0){e.list=n;return}const i=(d,h)=>{const f=h?h.getOriginalParent():d.getOriginalParent();if(!f)return null;let p=null,g=null;for(const v of f.getChildren())if(!(v===h||v===d)){if(v instanceof Xu){const w=s.get(v);if(w==null)continue;(p==null||p<w)&&(p=w,g=v);continue}v.forEachLeafColumn(w=>{const S=s.get(w);S!=null&&(p==null||p<S)&&(p=S,g=w)})}return g??i(d,f)},a=[],l=new Map;for(const d of r){const h=i(d,null);if(h==null){a.push(d);continue}const f=l.get(h);f===void 0?l.set(h,d):Array.isArray(f)?f.push(d):l.set(h,[f,d])}const u=new Array(e.list.length);let c=u.length-1;for(let d=a.length-1;d>=0;d--)u[c--]=a[d];for(let d=n.length-1;d>=0;d--){const h=n[d],f=l.get(h);if(f)if(Array.isArray(f))for(let p=f.length-1;p>=0;p--){const g=f[p];u[c--]=g}else u[c--]=f;u[c--]=h}e.list=u}positionLockedCols(e){e.list=c2(e.list,this.gos)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=((e=this.cols)==null?void 0:e.list)??null:this.lastOrder=((t=this.cols)==null?void 0:t.list)??null}getColumnDefs(e){var t,n;return this.colDefCols&&((n=this.beans.colDefFactory)==null?void 0:n.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,((t=this.cols)==null?void 0:t.list)??[],e))}setColSpanActive(){var e;this.colSpanActive=!!((e=this.cols)!=null&&e.list.some(t=>t.getColDef().colSpan!=null))}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);const{visibleCols:n,eventSvc:o}=this.beans;n.refresh(t),o.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){var t;const e=(t=this.beans.pivotColsSvc)==null?void 0:t.columns;return this.pivotMode&&!!(e!=null&&e.length)}recreateColumnDefs(e){var n;if(!this.cols)return;(n=this.beans.autoColSvc)==null||n.updateColumns(e);const t=Kd(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;ew(this.beans,(e=this.colDefCols)==null?void 0:e.tree),super.destroy()}getColTree(){var e;return((e=this.cols)==null?void 0:e.tree)??[]}getColDefColTree(){var e;return((e=this.colDefCols)==null?void 0:e.tree)??[]}getColDefCols(){var e;return((e=this.colDefCols)==null?void 0:e.list)??null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}forAllCols(e){var r,i,a,l,u;const{pivotResultCols:t,autoColSvc:n,selectionColSvc:o,groupHierarchyColSvc:s}=this.beans;Up((r=this.colDefCols)==null?void 0:r.list,e),Up((i=n==null?void 0:n.columns)==null?void 0:i.list,e),Up((a=o==null?void 0:o.columns)==null?void 0:a.list,e),Up((l=s==null?void 0:s.columns)==null?void 0:l.list,e),Up((u=t==null?void 0:t.getPivotResultCols())==null?void 0:u.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){var t;return((t=this.cols)==null?void 0:t.map[e])??null}getColFromCollection(e,t){if(t==null)return null;const{map:n,list:o}=t;if(typeof e=="string"&&n[e])return n[e];for(let a=0;a<o.length;a++)if(Wp(o[a],e))return o[a];const{autoColSvc:s,selectionColSvc:r,groupHierarchyColSvc:i}=this.beans;return(s==null?void 0:s.getColumn(e))??(r==null?void 0:r.getColumn(e))??(i==null?void 0:i.getColumn(e))??null}},v2=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let n;return typeof t!="number"?n=0:n=t+1,this.existingIds[e]=n,n}};function zp(e,t,n){return n&&e.addDestroyFunc(()=>t.destroyBean(n)),n??e}var dt=null;function y2(e){return typeof(e==null?void 0:e.getGui)=="function"}var w2=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){var o;if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){for(const r of s)this.toggleCss(r,t);return}}this.cssClassStates[e]!==t&&e.length&&((o=this.getGui())==null||o.classList.toggle(e,t),this.cssClassStates[e]=t)}},zde=0,jp=class extends Fi{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=zde++,this.cssManager=new w2(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(n=>[n.selector,n])),e&&this.setTemplate(e)}preConstruct(){var t,n;this.wireTemplate(this.getGui());const e="component-"+((n=(t=Object.getPrototypeOf(this))==null?void 0:t.constructor)==null?void 0:n.name);for(const o of this.css??[])this.beans.environment.addGlobalCSS(o,e)}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(TB):null}applyElementsToComponent(e,t,n,o=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===dt)this[t]=o??e;else{const r=n==null?void 0:n[t];if(!this.suppressDataRefValidation&&!r)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,t){const n=[];for(const o of e.childNodes??[])n.push(o);for(const o of n){if(!(o instanceof HTMLElement))continue;const s=this.createComponentFromElement(o,r=>{const i=r.getGui();if(i)for(const a of o.attributes??[])i.setAttribute(a.name,a.value)},t);if(s){if(s.addItems&&o.children.length){this.createChildComponentsFromTags(o,t);const r=Array.prototype.slice.call(o.children);s.addItems(r)}this.swapComponentForNode(s,e,o)}else o.childNodes&&this.createChildComponentsFromTags(o,t)}}createComponentFromElement(e,t,n){const o=e.nodeName,s=this.getDataRefAttribute(e),r=o.indexOf("AG-")===0,i=r?this.componentSelectors.get(o):null;let a=null;if(i){const l=n&&s?n[s]:void 0;a=new i.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(r)throw new Error(`selector: ${o}`);return this.applyElementsToComponent(e,s,n,a),a}swapComponentForNode(e,t,n){const o=e.getGui();t.replaceChild(o,n),t.insertBefore(document.createComment(n.nodeName),o),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const n of e)n.setAttribute("tabindex",t.toString())}setTemplate(e,t,n){let o;typeof e=="string"||e==null?o=c_(e):o=Mp(e),this.setTemplateFromElement(o,t,n)}setTemplateFromElement(e,t,n,o=!1){if(this.eGui=e,this.suppressDataRefValidation=o,t)for(let s=0;s<t.length;s++){const r=t[s];this.componentSelectors.set(r.selector,r)}this.wireTemplate(e,n)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let n=t;return e==null?null:(n||(n=this.eGui),f_(e)?{element:e,parent:n}:{element:e.getGui(),parent:n})}prependChild(e,t){const{element:n,parent:o}=this.getContainerAndElement(e,t)||{};!n||!o||o.insertAdjacentElement("afterbegin",n)}appendChild(e,t){const{element:n,parent:o}=this.getContainerAndElement(e,t)||{};!n||!o||o.appendChild(n)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:n}=t;Tce(this.eGui,e,{skipAriaHidden:n})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:n}=t;Un(this.eGui,e,{skipAriaHidden:n});const o={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(o)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,n){this.eGui.addEventListener(e,t,n),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},Cn=class extends jp{};function C2(e){return typeof e=="object"&&!!e.component}function jde(e,t){return new Yn(n=>{n(window.setInterval(e,t))})}var Yn=class Sg{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(n=>this.onDone(n),n=>this.onReject(n))}static all(t){return t.length?new Sg(n=>{let o=t.length;const s=new Array(o);t.forEach((r,i)=>{r.then(a=>{s[i]=a,o--,o===0&&n(s)})})}):Sg.resolve()}static resolve(t=null){return new Sg(n=>n(t))}then(t){return new Sg(n=>{this.status===1?n(t(this.resolution)):this.waiters.push(o=>n(t(o)))})}onDone(t){this.status=1,this.resolution=t;for(const n of this.waiters)n(t)}onReject(t){}};function Kde(e){return e?e.prototype&&"getGui"in e.prototype:!1}function b2(e,t,n,o){const{name:s}=n;let r,i,a,l,u,c;if(t){const d=t,h=d[s+"Selector"],f=h?h(o):null,p=g=>{typeof g=="string"?r=g:g!=null&&g!==!0&&(e.isFrameworkComponent(g)?a=g:i=g)};f?(p(f.component),l=f.params,u=f.popup,c=f.popupPosition):p(d[s])}return{compName:r,jsComp:i,fwComp:a,paramsFromSelector:l,popupFromSelector:u,popupPositionFromSelector:c}}var qde=class extends qe{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,n,o=!1){return this.getCompDetails(this.gridOptions,e,t,n,o)}getCompDetails(e,t,n,o,s=!1){var b;const{name:r,cellRenderer:i}=t;let{compName:a,jsComp:l,fwComp:u,paramsFromSelector:c,popupFromSelector:d,popupPositionFromSelector:h}=b2(this.beans.frameworkOverrides,e,t,o),f,p;const g=y=>{const E=this.registry.getUserComponent(r,y);E&&(l=E.componentFromFramework?void 0:E.component,u=E.componentFromFramework?E.component:void 0,f=E.params,p=E.processParams)};if(a!=null&&g(a),l==null&&u==null&&n!=null&&g(n),l&&i&&!Kde(l)&&(l=(b=this.agCompUtils)==null?void 0:b.adaptFunction(t,l)),!l&&!u){const{validation:y}=this.beans;s&&(a!==n||!n)?a?y!=null&&y.isProvidedUserComp(a)||_n(50,{compName:a}):n?y||_n(260,{...this.gos.getModuleErrorParams(),propName:r,compName:n}):_n(216,{name:r}):n&&!y&&_n(146,{comp:n});return}const v=this.mergeParams(e,t,o,c,f,p),w=l==null,S=l??u;return{componentFromFramework:w,componentClass:S,params:v,type:t,popupFromSelector:d,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(S,w,v,t)}}newAgStackInstance(e,t,n,o){var a;const s=!t;let r;s?r=new e:r=this.frameworkCompWrapper.wrap(e,o.mandatoryMethods,o.optionalMethods,o),this.createBean(r);const i=(a=r.init)==null?void 0:a.call(r,n);return i==null?Yn.resolve(r):i.then(()=>r)}mergeParams(e,t,n,o=null,s,r){const i={...n,...s},a=e,l=a==null?void 0:a[t.name+"Params"];if(typeof l=="function"){const u=l(n);vs(i,u)}else typeof l=="object"&&vs(i,l);return vs(i,o),r?r(i):i}},Yde={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},Xde={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Zde={name:"headerComponent",optionalMethods:["refresh"]},Jde={name:"innerHeaderComponent"},Qde={name:"innerHeaderGroupComponent"},ehe={name:"headerGroupComponent"},the={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},nhe={name:"loadingCellRenderer",cellRenderer:!0},ohe={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},she={name:"loadingOverlayComponent",optionalMethods:["refresh"]},rhe={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},ihe={name:"tooltipComponent"},P_={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},ahe={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},lhe={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},uhe={name:"loadingCellRenderer",cellRenderer:!0},che={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},dhe={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function hhe(e,t){return e.getCompDetailsFromGridOptions(Xde,"agDragAndDropImage",t,!0)}function fhe(e,t,n){return e.getCompDetails(t,Zde,"agColumnHeader",n)}function phe(e,t,n){return e.getCompDetails(t,Jde,void 0,n)}function ghe(e,t){const n=t.columnGroup.getColGroupDef();return e.getCompDetails(n,ehe,"agColumnGroupHeader",t)}function mhe(e,t,n){return e.getCompDetails(t,Qde,void 0,n)}function vhe(e,t){return e.getCompDetailsFromGridOptions(lhe,void 0,t,!0)}function yhe(e,t){return e.getCompDetailsFromGridOptions(uhe,"agLoadingCellRenderer",t,!0)}function whe(e,t){return e.getCompDetailsFromGridOptions(che,"agGroupRowRenderer",t,!0)}function Che(e,t){return e.getCompDetailsFromGridOptions(dhe,"agDetailCellRenderer",t,!0)}function S2(e,t,n){return e.getCompDetails(t,the,void 0,n)}function E2(e,t,n){return e.getCompDetails(t,nhe,"agSkeletonCellRenderer",n,!0)}function _2(e,t,n){return e.getCompDetails(t,ohe,"agCellEditor",n,!0)}function bhe(e,t,n,o){const s=t.filter;return C2(s)&&(t={filter:s.component,filterParams:t.filterParams}),e.getCompDetails(t,P_,o,n,!0)}function She(e,t,n){return e.getCompDetails(t,Yde,"agDateInput",n,!0)}function Ehe(e,t){return e.getCompDetailsFromGridOptions(she,"agLoadingOverlay",t,!0)}function _he(e,t){return e.getCompDetailsFromGridOptions(rhe,"agNoRowsOverlay",t,!0)}function Rhe(e,t){return e.getCompDetails(t.colDef,ihe,"agTooltipComponent",t,!0)}function The(e,t,n,o){return e.getCompDetails(t,ahe,o,n)}function R2(e,t){return b2(e,t,P_)}function k_(e,t,n){return e.mergeParams(t,P_,n)}function Kp(e){const t=e;return(t==null?void 0:t.getFrameworkComponentInstance)!=null?t.getFrameworkComponentInstance():e}function Dhe(e){return typeof e=="object"&&!!e.getComp}var Ve={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},F_=class extends jp{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;(e==null?void 0:e.isAlive())&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},O_,M_,N_,L_,V_,B_,$_;function Ol(){return O_===void 0&&(O_=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),O_}function T2(){return M_===void 0&&(M_=/(firefox)/i.test(navigator.userAgent)),M_}function D2(){return N_===void 0&&(N_=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),N_}function Zu(){return L_===void 0&&(L_=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),L_}function H_(e){if(!e)return null;const t=e.tabIndex,n=e.getAttribute("tabIndex");return t===-1&&(n===null||n===""&&!T2())?null:t.toString()}function Ihe(){if($_!==void 0)return $_;if(!document.body)return-1;let e=1e6;const t=T2()?6e6:1e9,n=document.createElement("div");for(document.body.appendChild(n);;){const o=e*2;if(n.style.height=o+"px",o>t||n.clientHeight!==o)break;e=o}return n.remove(),$_=e,e}function xhe(){return B_==null&&I2(),B_}function I2(){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 n=t.offsetWidth-t.clientWidth;n===0&&t.clientWidth===0&&(n=null),t.parentNode&&t.remove(),n!=null&&(B_=n,V_=n===0)}function x2(){return V_==null&&I2(),V_}var G_="T",Ahe=new RegExp(`[${G_} ]`),Phe=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${G_}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Ni(e,t){return e.toString().padStart(t,"0")}function er(e,t=!0,n=G_){if(!e)return null;let o=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>Ni(s,2)).join("-");return t&&(o+=n+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>Ni(s,2)).join(":")),o}function ow(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),Ni(e.getDate(),2),Ni(e.getHours(),2),`:${Ni(e.getMinutes(),2)}`,`:${Ni(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,Ni(e.getDate(),2)].map(String):null}var U_=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"},A2=["January","February","March","April","May","June","July","August","September","October","November","December"],W_=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function z_(e,t){if(t==null)return er(e,!1);const n=Ni(e.getFullYear(),4),o={YYYY:()=>n.slice(n.length-4,n.length),YY:()=>n.slice(n.length-2,n.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>A2[e.getMonth()],MMM:()=>A2[e.getMonth()].slice(0,3),MM:()=>Ni(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${U_(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${U_(e.getDate())}`,DD:()=>Ni(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>W_[e.getDay()],ddd:()=>W_[e.getDay()].slice(0,3),dd:()=>W_[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${U_(e.getDay())}`,d:()=>`${e.getDay()}`},s=new RegExp(Object.keys(o).join("|"),"g");return t.replace(s,r=>r in o?o[r]():r)}function sw(e,t=!1){return!!As(e,t)}function khe(e){return sw(e,!0)}function As(e,t=!1,n){if(!e||!n&&!Phe.test(e))return null;const[o,s]=e.split(Ahe);if(!o)return null;const r=o.split("-").map(f=>Number.parseInt(f,10));if(r.filter(f=>!isNaN(f)).length!==3)return null;const[i,a,l]=r,u=new Date(i,a-1,l);if(u.getFullYear()!==i||u.getMonth()!==a-1||u.getDate()!==l||!s&&t)return null;if(!s||s==="00:00:00")return u;const[c,d,h]=s.split(":").map(f=>Number.parseInt(f,10));if(c>=0&&c<24)u.setHours(c);else if(t)return null;if(d>=0&&d<60)u.setMinutes(d);else if(t)return null;if(h>=0&&h<60)u.setSeconds(h);else if(t)return null;return u}function j_(e){const{inputValue:t,allSuggestions:n,hideIrrelevant:o,filterByPercentageOfBestMatch:s}=e;let r=(n??[]).map((l,u)=>({value:l,relevance:Fhe(t,l),idx:u}));if(r.sort((l,u)=>l.relevance-u.relevance),o&&(r=r.filter(l=>l.relevance<Math.max(l.value.length,t.length))),r.length>0&&s&&s>0){const u=r[0].relevance*s;r=r.filter(c=>u-c.relevance<0)}const i=[],a=[];for(const l of r)i.push(l.value),a.push(l.idx);return{values:i,indices:a}}function Fhe(e,t){e.length<t.length&&([e,t]=[t,e]);let n=[],o=[];const s=e.length,r=t.length;for(let a=0;a<=r;a++)n[a]=a;let i=0;for(let a=1;a<=s;a++){o[0]=a;for(let l=1;l<=r;l++){const u=e[a-1],c=t[l-1];if(u.toLocaleLowerCase()===c.toLocaleLowerCase())++i,u===c&&++i,a>1&&l>1&&e[a-2].toLocaleLowerCase()===t[l-2].toLocaleLowerCase()&&(++i,e[a-2]===t[l-2]&&++i),a<s/2-10&&++i,o[l]=n[l-1];else{const d=o[l-1],h=n[l],f=n[l-1];o[l]=1+Math.min(d,h,f)}}[n,o]=[o,n]}return n[r]/(i+1)}function P2(e){var n;return e.altKey||e.ctrlKey||e.metaKey?!1:((n=e.key)==null?void 0:n.length)===1}var K_=!1,rw=0;function Ohe(e){rw>0||(e.addEventListener("keydown",iw),e.addEventListener("mousedown",iw))}function Mhe(e){rw>0||(e.removeEventListener("keydown",iw),e.removeEventListener("mousedown",iw))}function iw(e){const t=K_,n=e.type==="keydown";n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(K_=n)}function Nhe(e){const t=$o(e);return Ohe(t),rw++,()=>{rw--,Mhe(t)}}function Lhe(){return K_}function Yd(e,t,n=!1){const o=Rce;let s=wB;t&&(s+=", "+t),n&&(s+=', [tabindex="-1"]');const r=Array.prototype.slice.apply(e.querySelectorAll(o)).filter(l=>Pi(l)),i=Array.prototype.slice.apply(e.querySelectorAll(s));return i.length?((l,u)=>l.filter(c=>u.indexOf(c)===-1))(r,i):r}function Ju(e,t=!1,n=!1,o=!1){const s=Yd(e,o?".ag-tab-guard":null,n),r=t?kn(s):s[0];return r?(r.focus({preventScroll:!0}),!0):!1}function Qu(e,t,n,o){const s=Yd(t,n?':not([tabindex="-1"])':null),r=Kn(e);let i;n?i=s.findIndex(l=>l.contains(r)):i=s.indexOf(r);const a=i+(o?-1:1);return a<0||a>=s.length?null:s[a]}function k2(e,t=5){let n=0;for(;e&&H_(e)===null&&++n<=t;)e=e.parentElement;return H_(e)===null?null:e}var Vhe=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",Bhe=class extends jp{constructor(e,t,n){super(t,n),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(Vhe)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:n,labelAlignment:o,disabled:s}=this.config;s!=null&&this.setDisabled(s),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),n!=null&&this.setLabelWidth(n),this.setLabelAlignment(o||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;qo(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(Un(t,!1),Dl(t,"presentation")):(Un(t,!0),Dl(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const n=this.getGui().classList;return n.toggle("ag-label-align-left",e==="left"),n.toggle("ag-label-align-right",e==="right"),n.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:(Gy(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Pp(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},F2=class extends Bhe{constructor(e,t,n,o){super(e,t,n),this.className=o}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:n}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),n!=null&&this.onValueChange(n),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),n=this.getLabel();n==null||n==""||uce(e)!==null?xp(e,""):xp(e,t??"")}setAriaLabel(e){return Bd(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return ki(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.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function $he(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var ec=class extends F2{constructor(e,t,n="text",o="input"){super(e,(e==null?void 0:e.template)??$he(o),[],t),this.inputType=n,this.displayFieldTag=o,this.eLabel=dt,this.eWrapper=dt,this.eInput=dt}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:n,className:o}=this;e.classList.add(`${o}-label`),t.classList.add(`${o}-input-wrapper`),n.classList.add(`${o}-input`),this.addCss("ag-input-field"),n.id=n.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:r}=this.config;s!=null&&this.setInputName(s),r!=null&&this.setInputWidth(r),this.addInputListeners(),this.activateTabIndex([n])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,Js(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return Gy(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 Js(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Bd(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Pp(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Js(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Js(this.eInput,"autocomplete",t)}return this}},q_=class extends ec{constructor(e,t="ag-checkbox",n="checkbox"){super(e,t,n),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.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(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){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const n=this.eInput;n.checked=e,n.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,n){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:n});const o=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:o.id,name:o.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),n=this.selected=e.target.checked;this.refreshSelectedClass(n),this.dispatchChange(n,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},Y_={selector:"AG-CHECKBOX",component:q_},Hhe=class extends q_{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},tc=class extends ec{constructor(e,t="ag-text-field",n="text"){super(e,t,n)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const n=this.eInput;return n.value!==e&&(n.value=ft(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{P2(n)&&n.key&&!e.test(n.key)&&n.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:n=>{var s;const o=(s=n.clipboardData)==null?void 0:s.getData("text");o!=null&&o.split("").some(r=>!e.test(r))&&n.preventDefault()}})}},aw={selector:"AG-INPUT-TEXT-FIELD",component:tc},Ghe=class extends ec{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const n=super.setValue(e,t);return this.eInput.value=e,n}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},Uhe={selector:"AG-INPUT-TEXT-AREA",component:Ghe},X_=class extends tc{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const r=Number.parseFloat(e.value),i=isNaN(r)?"":this.normalizeValue(r.toString());this.value!==i&&this.setValue(i)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:n,max:o,step:s}=this.config;typeof t=="number"&&this.setPrecision(t),typeof n=="number"&&this.setMin(n),typeof o=="number"&&this.setMax(o),typeof s=="number"&&this.setStep(s)}onWheel(e){Kn(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const n=this.precision;if(n==null)return e;if(t){const s=Number.parseFloat(e).toFixed(n);return Number.parseFloat(s).toString()}const o=String(e).split(".");if(o.length>1){if(o[1].length<=n)return e;if(n>0)return`${o[0]}.${o[1].slice(0,n)}`}return o[0]}setMin(e){return this.min===e?this:(this.min=e,Js(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Js(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Js(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(n=>super.setValue(n,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,n){if(ft(n)){let o=this.isScientificNotation(n);if(o&&this.eInput.validity.valid)return e(n);if(!o){n=this.adjustPrecision(n);const s=this.normalizeValue(n);o=n!=s}if(o)return t(n)}return e(n)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},Whe={selector:"AG-INPUT-NUMBER-FIELD",component:X_},zhe=class extends tc{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Ol();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){Kn(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?er(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,Js(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?er(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,Js(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Js(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return As(this.getValue())??void 0}setDate(e,t){this.setValue(er(e??null,this.includeTime),t)}},O2={selector:"AG-INPUT-DATE-FIELD",component:zhe},jhe=".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}",Khe="ag-active-item",qhe=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}),Yhe=class extends jp{constructor(e,t,n){super(qhe(e,t)),this.label=t,this.value=n,this.eText=dt}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(Khe,e),vB(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const n=this.getGui();gce(n,e),pce(n,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>d_(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},Xhe=class extends jp{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(jhe)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case Ve.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const n=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(n)}break;case Ve.DOWN:case Ve.UP:e.preventDefault(),this.navigate(t);break;case Ve.PAGE_DOWN:case Ve.PAGE_UP:case Ve.PAGE_HOME:case Ve.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:n}=e,o=n??t;return this.options.push({value:t,text:o}),this.renderOption(t,o),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();qo(this.getGui()),this.listItems=[],this.refreshAriaRole()}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const n=this.options.findIndex(o=>o.value===e);if(n!==-1){const o=this.options[n];this.value=o.value,this.displayValue=o.text,this.highlightItem(this.listItems[n]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!Pi(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const n=this.getGui(),{scrollTop:o,clientHeight:s}=n,{offsetTop:r,offsetHeight:i}=t;(r+i>o+s||r<o)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){var e,t;(t=(e=this.highlightedItem)==null?void 0:e.tooltipFeature)==null||t.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){var e;(e=this.highlightedItem)==null||e.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const n=new Yhe(this.cssIdentifier,t,e);n.setParentComponent(this);const o=this.createManagedBean(n);this.listItems.push(o),this.getGui().appendChild(o.getGui())}navigate(e){const t=e===Ve.DOWN;let n;const{listItems:o,highlightedItem:s}=this;if(!s)n=t?o[0]:kn(o);else{let i=o.indexOf(s)+(t?1:-1);i=Math.min(Math.max(i,0),o.length-1),n=o[i]}this.highlightItem(n)}navigateToPage(e){const{listItems:t,highlightedItem:n}=this;if(!n||t.length===0)return;const o=t.indexOf(n),s=this.options.length-1,r=t[0].getHeight(),i=Math.floor(this.getGui().clientHeight/r);let a=-1;e===Ve.PAGE_HOME?a=0:e===Ve.PAGE_END?a=s:e===Ve.PAGE_DOWN?a=Math.min(o+i,s):e===Ve.PAGE_UP&&(a=Math.max(o-i,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){Dl(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((n,o)=>{n.setIndex(o+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},Zhe=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}",Jhe={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},Qhe=class extends F2{constructor(e){if(super(e,(e==null?void 0:e.template)||Jhe,(e==null?void 0:e.agComponents)||[],e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=dt,this.eWrapper=dt,this.eDisplayField=dt,this.eIcon=dt,this.registerCSS(Zhe),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:n,variableWidth:o,minPickerWidth:s,maxPickerWidth:r}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!o,n!=null&&this.setPickerMaxHeight(n),s!=null&&this.setPickerMinWidth(s),r!=null&&this.setPickerMaxWidth(r)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:n,inputWidth:o}=this.config;if(n){const s=this.beans.iconSvc.createIconNoSpan(n);s&&this.eIcon.appendChild(s)}o!=null&&this.setInputWidth(o)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),l_(e,!1),this.ariaRole&&Dl(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 Ve.UP:case Ve.DOWN:case Ve.ENTER:case Ve.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case Ve.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.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:n,pickerAriaLabelValue:o,modalPicker:s=!0},maxPickerHeight:r,minPickerWidth:i,maxPickerWidth:a,variableWidth:l,beans:u,eWrapper:c}=this,d={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const g=cB(u);this.beforeHidePicker(),g&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,o),anchorToElement:c};e.style.position="absolute";const h=u.popupSvc,f=h.addPopup(d);l?(i&&(e.style.minWidth=i),e.style.width=h_(Vy(c)),a&&(e.style.maxWidth=a)):Gy(e,a??Vy(c));const p=r??`${u_(h.getPopupParent())}px`;return e.style.setProperty("max-height",p),this.alignPickerToComponent(),f.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:n,gos:o},eWrapper:s,pickerComponent:r}=this,i=o.get("enableRtl")?"right":"left";n.positionPopupByComponent({type:t,eventSource:s,ePopup:r.getGui(),position:"under",alignSide:i,keepWithinBounds:!0,nudgeY:e})}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();l_(t,e);const n=this.eWrapper.classList;n.toggle("ag-picker-expanded",e),n.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(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return Gy(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()}},efe=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}",Z_=class extends Qhe{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(efe)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Hy(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:n}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),n&&t==null&&(this.eDisplayField.textContent=n),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new Xhe("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),_ce(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:o=>{o==null||o.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){var e;(e=this.listComponent)==null||e.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){var n;const{key:t}=e;switch(t===Ve.TAB&&this.hidePicker(),t){case Ve.ENTER:case Ve.UP:case Ve.DOWN:case Ve.PAGE_UP:case Ve.PAGE_DOWN:case Ve.PAGE_HOME:case Ve.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(n=this.listComponent)==null||n.handleKeyDown(e):super.onKeyDown(e);break;case Ve.ESCAPE:super.onKeyDown(e);break;case Ve.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return(e=this.listComponent)==null||e.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,n){const{listComponent:o,config:{placeholder:s},eDisplayField:r,tooltipFeature:i}=this;if(this.value===e||!o)return this;if(n||o.setValue(e,!0),o.getValue()===this.getValue())return this;let l=o.getDisplayValue();return l==null&&s&&(l=s),r.textContent=l,i==null||i.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},tfe={selector:"AG-SELECT",component:Z_},nfe=':where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}:where(.ag-root-wrapper,ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',J_=typeof window!="object"||!((GG=(HG=window==null?void 0:window.document)==null?void 0:HG.fonts)!=null&&GG.forEach),Xd=(e,t,n,o,s,r)=>{if(J_)return;o&&(e=`@layer ${CSS.escape(o)} { ${e} }`);let i=Zd.map.get(t);if(i||(i=[],Zd.map.set(t,i)),i.some(c=>c.css===e))return;const a=document.createElement("style");r&&a.setAttribute("nonce",r),a.dataset.agGlobalCss=n,a.textContent=e;const l={css:e,el:a,priority:s};let u;for(const c of i){if(c.priority>s)break;u=c}if(u){u.el.insertAdjacentElement("afterend",a);const c=i.indexOf(u);i.splice(c+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),i.push(l)},M2=(e,t,n,o)=>{Xd(nfe,e,"shared",t,0,n),o==null||o.forEach((s,r)=>s.forEach(i=>Xd(i,e,r,t,0,n)))},ofe=e=>{Zd.grids.add(e)},sfe=e=>{if(Zd.grids.delete(e),Zd.grids.size===0){Zd.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},N2,Zd=(N2=typeof window=="object"?window:{}).agStyleInjectionState??(N2.agStyleInjectionState={map:new WeakMap,grids:new Set}),Li=e=>new L2(e),Ml="$default",rfe=0,L2=class{constructor({feature:e,params:t,modeParams:n={},css:o,cssImports:s}){this.feature=e,this.css=o,this.cssImports=s,this.modeParams={[Ml]:{...n[Ml]??{},...t??{}},...n}}use(e,t,n){let o=this._inject;if(o==null){let{css:s}=this;if(s){const r=`ag-theme-${this.feature??"part"}-${++rfe}`;typeof s=="function"&&(s=s()),s=`:where(.${r}) {
|
|
196
196
|
${s}
|
|
@@ -250,7 +250,7 @@ See ${WB(e,t)}`;return Array.isArray(o)?o.concat(r):[o,r]}var Abe={1:"Charting A
|
|
|
250
250
|
`)}checkProperties(e,t,n,o,s){const r=["__ob__","__v_skip","__metadata__"],i=Zbe(Object.getOwnPropertyNames(e),[...r,...t,...n],n),a=Object.keys(i);for(const l of a){const u=i[l];let c=`invalid ${o} property '${l}' did you mean any of these: ${u.slice(0,8).join(", ")}.`;n.includes("context")&&(c+=`
|
|
251
251
|
If you are trying to annotate ${o} with application data, use the '${o}.context' property instead.`),Vp(c)}if(a.length>0&&s){const l=this.beans.frameworkOverrides.getDocLink(s);Vp(`to see all the valid ${o} properties please check: ${l}`)}}};function Zbe(e,t,n){const o={},s=e.filter(r=>!t.some(i=>i===r));if(s.length>0)for(const r of s)o[r]=j_({inputValue:r,allSuggestions:n}).values;return o}var Jbe=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),Qbe={moduleName:"Validation",version:ct,beans:[Xbe]};function UH(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var eSe=class extends qe{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){var n;const t=!!((n=this.filterManager)!=null&&n.isChildFilterPresent());this.filterNodes(t,e)}filterNodes(e,t){const n=(o,s)=>{o.hasChildren()&&e&&!s?o.childrenAfterFilter=o.childrenAfterGroup.filter(r=>{const i=r.childrenAfterFilter&&r.childrenAfterFilter.length>0,a=r.data&&this.filterManager.doesRowPassFilter({rowNode:r});return i||a}):o.childrenAfterFilter=o.childrenAfterGroup,UH(o)};if(this.doingTreeDataFiltering()){const o=(r,i)=>{if(r.childrenAfterGroup)for(let a=0;a<r.childrenAfterGroup.length;a++){const l=r.childrenAfterGroup[a],u=i||this.filterManager.doesRowPassFilter({rowNode:l});l.childrenAfterGroup?o(r.childrenAfterGroup[a],u):n(l,u)}n(r,i)},s=r=>o(r,!1);t.executeFromRootNode(s)}else{const o=s=>n(s,!1);t.forEachChangedNodeDepthFirst(o,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},tSe=class extends SR{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,n,o,s){this.comp=e;const r=zp(this,this.beans.context,s);this.eButtonShowMainFilter=n,this.eFloatingFilterBody=o,this.setGui(t,r),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(r),this.setupLeft(r),this.setupHover(r),this.setupFocus(r),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(r),this.setupUi(),r.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(r);const i=()=>this.onColDefChanged(r);r.addManagedListeners(this.column,{colDefChanged:i}),r.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&i()}}),r.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,n=e.colDef;return Ot(t.gos,{colDef:n,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,n=!!e.floatingFilter;this.active=t&&n}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=kr("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new eh(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.getLocaleTextFunc();Bd(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){var i;const{beans:t}=this;if(Kn(t)===this.eGui)return;const s=Qu(t,this.eGui,null,e.shiftKey);if(s){(i=t.headerNavigation)==null||i.scrollToColumn(this.column),e.preventDefault(),s.focus();return}const r=this.findNextColumnWithFloatingFilter(e.shiftKey);r&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:r},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let n=this.column;do if(n=e?t.getColBefore(n):t.getColAfter(n),!n)break;while(!n.getColDef().filter||!n.getColDef().floatingFilter);return n}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case Ve.UP:case Ve.DOWN:case Ve.LEFT:case Ve.RIGHT:if(t)return;nc(e);case Ve.ENTER:t&&Ju(this.eGui)&&e.preventDefault();break;case Ve.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const n=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),o=!!e.relatedTarget&&zu(e.relatedTarget,"ag-floating-filter");if(n&&o&&e.target===this.eGui){const s=this.lastFocusEvent,r=!!(s&&s.key===Ve.TAB);if(s&&r){const i=s.shiftKey;Ju(this.eGui,i)}}this.focusThis()}setupHover(e){var t;(t=this.beans.colHover)==null||t.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new bR(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){var e;this.suppressFilterButton=!((e=this.beans.menuSvc)!=null&&e.isFloatingFilterButtonEnabled(this.column)),this.highlightFilterButtonWhenActive=!Qs(this.gos)}setupUserComp(){var t;if(!this.active)return;const e=(t=this.beans.colFilter)==null?void 0:t.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){var t;const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;(t=this.beans.menuSvc)==null||t.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:n,gos:o}=this,s=r=>{if((r==null?void 0:r.source)==="filterDestroyed"&&(!this.isAlive()||!(t!=null&&t.isAlive())))return;const i=this.comp.getFloatingFilterComp();i&&i.then(a=>{if(a){if(o.get("enableFilterHandlers")){const c=r;let d="filter";c!=null&&c.afterFloatingFilter?d="ui":c!=null&&c.afterDataChange?d="dataChanged":(r==null?void 0:r.source)==="api"&&(d="api"),this.updateFloatingFilterParams(this.userCompDetails,d);return}const l=t==null?void 0:t.getCurrentFloatingFilterParentModel(n),u=r?{...r,columns:r.columns??[],source:r.source==="api"?"api":"columnFilter"}:null;a.onParentModelChanged(l,u)}})};[this.destroySyncListener]=e.addManagedListeners(n,{filterChanged:s}),t!=null&&t.isFilterActive(n)&&s(null)}setupWidth(e){const t=()=>{const n=`${this.column.getActualWidth()}px`;this.comp.setWidth(n)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){var e;if(!this.suppressFilterButton&&this.comp){const t=!!((e=this.beans.filterManager)!=null&&e.isFilterAllowed(this.column));this.comp.setButtonWrapperDisplayed(t),this.highlightFilterButtonWhenActive&&t&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const n=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const o=this.beans.colFilter,s=this.active?o==null?void 0:o.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,r=this.comp.getFloatingFilterComp();!r||!s?this.updateCompDetails(e,s,n):r.then(i=>{!i||o!=null&&o.areFilterCompsDifferent(this.userCompDetails??null,s)?this.updateCompDetails(e,s,n):this.updateFloatingFilterParams(s,"colDef")})}updateCompDetails(e,t,n){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),n&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){var o;if(!e)return;let n=e.params;(o=this.comp.getFloatingFilterComp())==null||o.then(s=>{var r;typeof(s==null?void 0:s.refresh)=="function"&&(this.gos.get("enableFilterHandlers")&&(n={...n,model:Ho(((r=this.beans.colFilter)==null?void 0:r.model)??{},this.column.getColId()),source:t}),s.refresh(n))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function nSe(e,t){var o;const n=e.colModel.getCol(t);if(!n){_n(12,{colKey:t});return}(o=e.menuSvc)==null||o.showColumnMenu({column:n,positionBy:"auto"})}function oSe(e){var t;(t=e.menuSvc)==null||t.hidePopupMenu()}var sSe={moduleName:"SharedMenu",version:ct,beans:[gge],apiFunctions:{showColumnMenu:nSe,hidePopupMenu:oSe}},rSe=class extends Nfe{postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getDefaultPopupParent(){return this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:n,event:o}=e,s=t.getBoundingClientRect(),r=this.getParentRect();this.setAlignedTo(t,n);let i=!1;const a=()=>{const l=this.keepXYWithinBounds(n,s.top-r.top,0),u=n.clientWidth>0?n.clientWidth:200;i||(n.style.minWidth=`${u}px`,i=!0);const d=r.right-r.left-u;let h;return this.gos.get("enableRtl")?(h=p(),h<0&&(h=f(),this.setAlignedStyles(n,"left")),h>d&&(h=0,this.setAlignedStyles(n,"right"))):(h=f(),h>d&&(h=p(),this.setAlignedStyles(n,"right")),h<0&&(h=0,this.setAlignedStyles(n,"left"))),{x:h,y:l};function f(){return s.right-r.left-2}function p(){return s.left-r.left-u}};this.positionPopup({ePopup:n,keepWithinBounds:!0,updatePosition:a,postProcessCallback:()=>this.callPostProcessPopup(e,"subMenu",n,t,o instanceof MouseEvent?o:void 0)})}callPostProcessPopup(e,t,n,o,s){const r=this.gos.getCallback("postProcessPopup");if(r){const{column:i,rowNode:a}=e;r({column:i,rowNode:a,ePopup:n,type:t,eventSource:o,mouseEvent:s})}}getActivePopups(){return this.popupList.map(e=>e.element)}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const n of this.popupList)t.applyThemeClasses(n.wrapper)}}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return La(e)}},Ow={moduleName:"Popup",version:ct,beans:[rSe]},iSe=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}:where(.ag-floating-filter-full-body)>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function aSe(e){const t=e.filterManager;return!!(t!=null&&t.isColumnFilterPresent())||!!(t!=null&&t.isAggregateFilterPresent())}function lSe(e,t){var n;return((n=e.filterManager)==null?void 0:n.getColumnFilterInstance(t))??Promise.resolve(void 0)}function uSe(e,t){var o;const n=e.colModel.getColDefCol(t);if(n)return(o=e.colFilter)==null?void 0:o.destroyFilter(n,"api")}function cSe(e,t){e.frameworkOverrides.wrapIncoming(()=>{var n;return(n=e.filterManager)==null?void 0:n.setFilterModel(t)})}function dSe(e){var t;return((t=e.filterManager)==null?void 0:t.getFilterModel())??{}}function hSe(e,t,n){const{gos:o,colModel:s,colFilter:r}=e;n&&!o.get("enableFilterHandlers")&&(Je(288),n=!1);const i=s.getColDefCol(t);return i?(r==null?void 0:r.getModelForColumn(i,n))??null:null}function fSe(e,t,n){var o;return((o=e.filterManager)==null?void 0:o.setColumnFilterModel(t,n))??Promise.resolve()}function pSe(e,t){var o;const n=e.colModel.getCol(t);if(!n){_n(12,{colKey:t});return}(o=e.menuSvc)==null||o.showFilterMenu({column:n,containerType:"columnFilter",positionBy:"auto"})}function gSe(e){var t;(t=e.menuSvc)==null||t.hideFilterMenu()}function mSe(e,t){var o;const n=e.colModel.getCol(t);if(!n){_n(12,{colKey:t});return}return(o=e.colFilter)==null?void 0:o.getHandler(n,!0)}function vSe(e,t){const{colModel:n,colFilter:o,gos:s}=e;if(!s.get("enableFilterHandlers")){Je(287);return}const{colId:r,action:i}=t;if(r){const a=n.getColById(r);a&&(o==null||o.updateModel(a,i))}else o==null||o.updateAllModels(i)}var ySe={filterHandler:()=>({doesFilterPass:()=>!0})},wSe=class extends qe{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...e$},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){var n,o;this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)});const e=this.gos,t={...((o=(n=e.get("initialState"))==null?void 0:n.filter)==null?void 0:o.filterModel)??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",n){const{colModel:o,dataTypeSvc:s,filterManager:r}=this.beans;if(s!=null&&s.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const i=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((u,c)=>{const d=e[c];i.push(this.setModelOnFilterWrapper(u,d)),l.delete(c)}),l.forEach(u=>{const c=o.getColDefCol(u)||o.getCol(u);if(!c){Je(62,{colId:u});return}if(!c.isFilterAllowed()){Je(63,{colId:u});return}const d=this.getOrCreateFilterWrapper(c,!0);if(!d){Je(64,{colId:u});return}i.push(this.setModelOnFilterWrapper(d,e[u],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{i.push(this.setModelOnFilterWrapper(l,null))});Yn.all(i).then(()=>{const l=this.getModel(!0),u=[];this.allColumnFilters.forEach((c,d)=>{const h=a?a[d]:null,f=l?l[d]:null;Dp(h,f)||u.push(c.column)}),u.length>0?r==null||r.onFilterChanged({columns:u,source:t}):n&&this.updateActive("filterChanged")})}getModel(e){var r;const t={},{allColumnFilters:n,initialModel:o,beans:{colModel:s}}=this;if(n.forEach((i,a)=>{const l=this.getModelFromFilterWrapper(i);ft(l)&&(t[a]=l)}),!e)for(const i of Object.keys(o)){const a=o[i];ft(a)&&!n.has(i)&&((r=s.getCol(i))!=null&&r.isFilterAllowed())&&(t[i]=a)}return t}setState(e,t,n="api"){if(this.state.clear(),t)for(const o of Object.keys(t)){const s=t[o];this.state.set(o,{model:Ho(this.model,o),state:s})}this.setModel(e,n,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let n=!1;return e.forEach((o,s)=>{const r=o.state;r!=null&&(n=!0,t[s]=r)}),n?t:void 0}getModelFromFilterWrapper(e){const n=e.column.getColId();if(e.isHandler)return Ho(this.model,n);const o=e.filter;return o?typeof o.getModel!="function"?(Je(66),null):o.getModel():Ho(this.initialModel,n)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){const e=u=>u?u.isFilterActive?u.isFilterActive():(Je(67),!1):!1,{colModel:t,gos:n}=this.beans,o=!!T_(n),s=u=>{if(!u.isPrimary())return!0;const d=!t.isPivotActive();return!u.isValueActive()||!d?!1:t.isPivotMode()?!0:o},r=[],i=[],a=(u,c,d)=>{c&&(s(u)?r.push(d):i.push(d))},l=[];return this.allColumnFilters.forEach(u=>{const c=u.column,d=c.getColId();if(u.isHandler)l.push(Yn.resolve().then(()=>{a(c,this.isHandlerActive(c),{colId:d,isHandler:!0,handler:u.handler,handlerParams:u.handlerParams})}));else{const h=Ll(u);h&&l.push(h.then(f=>{a(c,e(f),{colId:d,isHandler:!1,comp:f})}))}}),Yn.all(l).then(()=>{this.activeAggregateFilters=r,this.activeColumnFilters=i})}updateFilterFlagInColumns(e,t){var o;const n=[];return this.allColumnFilters.forEach(s=>{const r=s.column;if(s.isHandler)n.push(Yn.resolve().then(()=>{this.setColFilterActive(r,this.isHandlerActive(r),e,t)}));else{const i=Ll(s);i&&n.push(i.then(a=>{this.setColFilterActive(r,a.isFilterActive(),e,t)}))}}),(o=this.beans.groupFilter)==null||o.updateFilterFlags(e,t),Yn.all(n)}doFiltersPass(e,t,n){const{data:o,aggData:s}=e,r=n?this.activeAggregateFilters:this.activeColumnFilters,i=n?s:o,a=this.model;for(let l=0;l<r.length;l++){const u=r[l],{colId:c,isHandler:d}=u;if(c!==t)if(d){const{handler:h,handlerParams:f}=u;if(!h.doesFilterPass({node:e,data:i,model:Ho(a,c),handlerParams:f}))return!1}else{const h=u.comp;if(typeof h.doesFilterPass!="function"){_n(91);continue}if(!h.doesFilterPass({node:e,data:i}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t!=null&&t.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:n}=this.beans,o=()=>{this.isAlive()&&(n==null||n.onFilterChanged(e))};t.isRefreshInProgress()?setTimeout(o,0):o()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:n}=e,o=t==null?void 0:t.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",n).then(()=>{this.allColumnFilters.forEach(s=>{var a,l,u;const{column:r,isHandler:i}=s;o!==r.getColId()&&(i&&((l=(a=s.handler).onAnyFilterChanged)==null||l.call(a)),(u=Ll(s,i))==null||u.then(c=>{typeof(c==null?void 0:c.onAnyFilterChanged)=="function"&&c.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(n=>{var r,i;const o=n.isHandler;o&&((i=(r=n.handler).onNewRowsLoaded)==null||i.call(r));const s=Ll(n,o);s&&t.push(s.then(a=>{var l;(l=a.onNewRowsLoaded)==null||l.call(a)}))}),Yn.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:n,colModel:o}=this.beans;return(s,r)=>{const i=r?o.getCol(r):e;return i?n.getValue(i,s,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t!=null&&t.isHandler)return this.isHandlerActive(e);const n=t==null?void 0:t.filter;return n?n.isFilterActive():Ho(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=ft(Ho(this.model,e.getColId()));if(t)return t;const n=this.beans.groupFilter;return n!=null&&n.isGroupFilter(e)?n.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?Ll(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const n=Ll(t);return n?n.then(o=>({comp:o,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const n=this.getOrCreateFilterWrapper(e,t);return n!=null&&n.isHandler?n.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let n=this.cachedFilter(e);return!n&&t&&(n=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,n)),n}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>{var n;return(n=this.beans.dataTypeSvc)==null?void 0:n.getBaseDataType(e)},t)}getDefaultFilterFromDataType(e,t=!1){return yde(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":ipe(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,n,o,s,r){const i=()=>{const u=this.createFilterCompParams(e,s,r),c=o(u,s);return bhe(this.beans.userCompFactory,t,c,n)},a=i();return a?{compDetails:a,createFilterUi:u=>(u?i():a).newAgStackInstance()}:null}createFilterInstance(e,t,n,o){var d,h;const s=this.beans.selectableFilter;s!=null&&s.isSelectable(t)&&(t=s.getFilterDef(e,t));const{handler:r,handlerParams:i,handlerGenerator:a}=this.createHandler(e,t,n)??{},l=this.createFilterComp(e,t,n,o,!!r,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:r,handlerGenerator:a,handlerParams:i};const{compDetails:u,createFilterUi:c}=l;return this.isGlobalButtons&&((h=(d=u.params)==null?void 0:d.buttons)!=null&&h.length||Je(281,{colId:e.getColId()})),{compDetails:u,handler:r,handlerGenerator:a,handlerParams:i,createFilterUi:c}}createBaseFilterParams(e,t){const{filterManager:n,rowModel:o}=this.beans;return Ot(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:s=>(n==null?void 0:n.doesRowPassOtherFilters(e.getColId(),s))??!0,rowModel:o})}createFilterCompParams(e,t,n,o){const s=this.filterChangedCallbackFactory(e),r=this.createBaseFilterParams(e,o);if(r.filterChangedCallback=s,r.filterModifiedCallback=o?()=>{}:i=>this.filterModified(e,i),t){const i=r,a=e.getColId(),l=Ho(this.model,a);i.model=l,i.state=this.state.get(a)??{model:l},i.onModelChange=(u,c)=>{this.updateStoredModel(a,u),this.refreshHandlerAndUi(e,u,"ui",!1,c).then(()=>{s({...c,source:"columnFilter"})})},i.onStateChange=u=>{this.updateState(e,u),this.updateOrRefreshFilterUi(e)},i.onAction=(u,c,d)=>{this.updateModel(e,u,c),this.dispatchLocalEvent({type:"filterAction",column:e,action:u,event:d})},i.getHandler=()=>this.getHandler(e,!0),i.onUiChange=u=>this.filterUiChanged(e,u),i.source=n}return r}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,n){const o=t(),s={created:!0,create:t,filterParams:e.params,compDetails:e,promise:o};return o.then(n),s}createFilterWrapper(e){var a;const{compDetails:t,handler:n,handlerGenerator:o,handlerParams:s,createFilterUi:r}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),l=>l),i=e.getColId();if(n)return delete this.initialModel[i],(a=n.init)==null||a.call(n,{...s,source:"init",model:Ho(this.model,i)}),{column:e,isHandler:!0,handler:n,handlerGenerator:o,handlerParams:s,filterUi:this.createFilterUiForHandler(t,r)};if(r){const l={column:e,filterUi:null,isHandler:!1};return l.filterUi=this.createFilterUiLegacy(t,r,u=>{l.filter=u??void 0}),l}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,n){var f;const{gos:o,frameworkOverrides:s,registry:r}=this.beans;let i;const a=p=>{const g=p.filter;if(C2(g)){const v=g.handler;return v||(i=g.doesFilterPass,i?()=>({doesFilterPass:i}):void 0)}return typeof g=="string"?g:void 0},l=o.get("enableFilterHandlers"),u=l?a(t):void 0,c=p=>()=>this.createBean(r.createDynamicBean(p,!0));let d,h;if(typeof u=="string"){const p=(f=o.get("filterHandlers"))==null?void 0:f[u];p!=null?d=p:qfe.has(u)&&(d=c(u),h=u)}else d=u;if(!d){let p;const{compName:g,jsComp:v,fwComp:w}=R2(s,t);g?p=g:v==null&&w==null&&t.filter===!0&&(p=n),h=this.handlerMap[p],h&&(d=c(h))}return d?{filterHandler:d,handlerNameOrCallback:i??h}:l?(io(o)&&Je(277,{colId:e.getColId()}),ySe):void 0}createHandler(e,t,n){const o=this.createHandlerFunc(e,t,n);if(!o)return;const s=k_(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:r,filterHandler:i}=o,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,i,s);return{handler:a,handlerParams:l,handlerGenerator:r??i}}createHandlerFromFunc(e,t,n){const o=e.getColDef(),s=t(Ot(this.gos,{column:e,colDef:o})),r=this.createHandlerParams(e,n);return{handler:s,handlerParams:r}}createHandlerParams(e,t){const n=e.getColDef(),o=e.getColId(),s=this.filterChangedCallbackFactory(e);return Ot(this.gos,{colDef:n,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:r=>{var i;return((i=this.beans.filterManager)==null?void 0:i.doesRowPassOtherFilters(o,r))??!0},onModelChange:(r,i)=>{this.updateStoredModel(o,r),this.refreshHandlerAndUi(e,r,"handler",!1,i).then(()=>{s({...i,source:"columnFilter"})})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:n,groupFilter:o}=this.beans;this.allColumnFilters.forEach((r,i)=>{let a;r.column.isPrimary()?a=t.getColDefCol(i):a=t.getCol(i),!(a&&a===r.column)&&(e.push(r.column),this.disposeFilterWrapper(r,"columnChanged"),this.disposeColumnListener(i))});const s=o&&e.every(r=>o.isGroupFilter(r));e.length>0&&!s&&(n==null||n.onFilterChanged({columns:e,source:"api"}))}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const n=this.beans.groupFilter;return n!=null&&n.isGroupFilter(e)?n.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:n,frameworkOverrides:o,selectableFilter:s}=this.beans,r=h=>{const f=this.getOrCreateFilterUi(e);f!=null&&f.then(p=>{h(Kp(p))})},i=e.getColDef(),a=s!=null&&s.isSelectable(i)?s.getFilterDef(e,i):i,l=dpe(o,a,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",u=this.gos.get("enableFilterHandlers"),c=k_(n,a,this.createFilterCompParams(e,u,"init",!0)),d=Ot(this.gos,{column:e,filterParams:c,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:r,showParentFilter:t});if(u){const h=d,f=e.getColId(),p=this.filterChangedCallbackFactory(e);h.onUiChange=g=>this.floatingFilterUiChanged(e,g),h.model=Ho(this.model,f),h.onModelChange=(g,v)=>{this.updateStoredModel(f,g),this.refreshHandlerAndUi(e,g,"floating",!0,v).then(()=>{p({...v,source:"columnFilter"})})},h.getHandler=()=>this.getHandler(e,!0),h.source="init"}return The(n,i,d,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,n,o){const s="paramsUpdated";if(e.isHandler){const r=t.getColId();delete this.initialModel[r],this.state.delete(r);const i=e.filterUi,a=this.createFilterUiForHandler(n,o);e.filterUi=a;const l=this.eventSvc;i!=null&&i.created?i.promise.then(u=>{this.destroyBean(u),l.dispatchEvent({type:"filterDestroyed",source:s,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:s,column:t})}else this.destroyFilter(t,s)}destroyFilter(e,t="api"){const n=e.getColId(),o=this.allColumnFilters.get(n);this.disposeColumnListener(n),delete this.initialModel[n],o&&this.disposeFilterWrapper(o,t).then(s=>{var r;s&&this.isAlive()&&((r=this.beans.filterManager)==null||r.onFilterChanged({columns:[e],source:"api"}))})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let n=!1;const{column:o,isHandler:s,filterUi:r}=e,i=o.getColId();s&&(n=this.isHandlerActive(o),this.destroyBean(e.handler),delete this.model[i],this.state.delete(i));const a=()=>{this.setColFilterActive(o,!1,"filterDestroyed"),this.allColumnFilters.delete(i),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:o})};if(r){if(r.created)return r.promise.then(l=>(n=s?n:!!(l!=null&&l.isFilterActive()),this.destroyBean(l),a(),n));a()}return Yn.resolve(n)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:(t==null?void 0:t.source)??"columnFilter"})}}filterParamsChanged(e,t="api"){var v,w,S,b,y,E;const n=this.allColumnFilters.get(e);if(!n)return;const o=this.beans,s=n.column,r=s.getColDef(),i=s.isFilterAllowed(),a=this.getDefaultFilter(s),l=o.selectableFilter,u=l!=null&&l.isSelectable(r)?l.getFilterDef(s,r):r,c=i?this.createHandlerFunc(s,u,this.getDefaultFilter(s)):void 0,d=!!c,h=n.isHandler;if(h!=d){this.destroyFilter(s,"paramsUpdated");return}const{compDetails:f,createFilterUi:p}=(i?this.createFilterComp(s,u,a,_=>_,d,"colDef"):null)??{compDetails:null,createFilterUi:null},g=(f==null?void 0:f.params)??k_(o.userCompFactory,u,this.createFilterCompParams(s,d,"colDef"));if(h){const _=(c==null?void 0:c.handlerNameOrCallback)??(c==null?void 0:c.filterHandler),I=Ho(this.model,e);if(n.handlerGenerator!=_){const T=n.handler,{handler:F,handlerParams:L}=this.createHandlerFromFunc(s,c.filterHandler,g);n.handler=F,n.handlerParams=L,n.handlerGenerator=_,delete this.model[e],(v=F.init)==null||v.call(F,{...L,source:"init",model:null}),this.destroyBean(T),I!=null&&((w=this.beans.filterManager)==null||w.onFilterChanged({columns:[s],source:t}))}else{const T=this.createHandlerParams(s,f==null?void 0:f.params);n.handlerParams=T,(b=(S=n.handler).refresh)==null||b.call(S,{...T,source:"colDef",model:I})}}if(this.areFilterCompsDifferent(((y=n.filterUi)==null?void 0:y.compDetails)??null,f)||!n.filterUi||!f){this.destroyFilterUi(n,s,f,p);return}n.filterUi.filterParams=g,(E=Ll(n,h))==null||E.then(_=>{(_!=null&&_.refresh?_.refresh(g):!0)===!1?this.destroyFilterUi(n,s,f,p):this.dispatchLocalEvent({type:"filterParamsChanged",column:s,params:g})})}refreshHandlerAndUi(e,t,n,o,s){const r=this.cachedFilter(e);if(!r)return o&&this.getOrCreateFilterWrapper(e,!0),Yn.resolve();if(!r.isHandler)return Yn.resolve();const{filterUi:i,handler:a,handlerParams:l}=r;return Yfe(()=>{if(i){const{created:u,filterParams:c}=i;if(u)return i.promise.then(d=>d?{filter:d,filterParams:c}:void 0);i.refreshed=!0}return Yn.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},n,s)}setColumnFilterWrapper(e,t){const n=e.getColId();this.allColumnFilters.set(n,t),this.allColumnListeners.set(n,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(n)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:n}=e,{componentClass:o}=t;return!(n===o||(n==null?void 0:n.render)&&(o==null?void 0:o.render)&&n.render===o.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const n=this.getOrCreateFilterUi(t);return n?new Promise(o=>{n.then(s=>{o(Kp(s))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:n})=>{this.setModelForColumn(e,t).then(()=>n())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:o,model:s}=this,r=e.getColId(),i=o.get(r);return i?i.model??null:Ho(s,r)}const n=this.cachedFilter(e);return n?this.getModelFromFilterWrapper(n):null}setModelForColumn(e,t){var n;if((n=this.beans.dataTypeSvc)!=null&&n.isPendingInference){let o=()=>{};const s=new Promise(r=>{o=r});return this.columnModelUpdates.push({key:e,model:t,resolve:o}),s}return new Promise(o=>{this.setModelForColumnLegacy(e,t).then(s=>o(s))})}getStateForColumn(e){return this.state.get(e)??{model:Ho(this.model,e)}}setModelForColumnLegacy(e,t){const n=this.beans.colModel.getColDefCol(e),o=n?this.getOrCreateFilterWrapper(n,!0):null;return o?this.setModelOnFilterWrapper(o,t):Yn.resolve()}setColDefPropsForDataType(e,t,n){var c;const o=e.filter,s=o===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):o;if(typeof s!="string")return;let r,i;const a=this.beans,{filterParams:l,filterValueGetter:u}=e;s==="agMultiColumnFilter"?{filterParams:r,filterValueGetter:i}=((c=a.multiFilter)==null?void 0:c.getParamsForDataType(l,u,t,n))??{}:{filterParams:r,filterValueGetter:i}=ope(s,l,u,t,n,a,this.getLocaleTextFunc()),e.filterParams=r,i&&(e.filterValueGetter=i)}setColFilterActive(e,t,n,o){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",n)),e.dispatchColEvent("filterChanged",n,o)}setModelOnFilterWrapper(e,t,n){return new Yn(o=>{if(e.isHandler){const r=e.column,i=r.getColId(),a=this.model[i];if(this.updateStoredModel(i,t),n&&t===a){o();return}this.refreshHandlerAndUi(r,t,"api").then(()=>o());return}const s=Ll(e);if(s){s.then(r=>{if(typeof(r==null?void 0:r.setModel)!="function"){Je(65),o();return}(r.setModel(t)||Yn.resolve()).then(()=>o())});return}o()})}updateStoredModel(e,t){ft(t)?this.model[e]=t:delete this.model[e];const n=this.state.get(e),o={model:t,state:n==null?void 0:n.state};this.state.set(e,o)}filterModified(e,t){var n;(n=this.getOrCreateFilterUi(e))==null||n.then(o=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:o,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,n){var i;const o=e.getColId(),s=this.cachedFilter(e),r=()=>s==null?void 0:s.filterUi;o$(t,r,()=>Ho(this.model,o),()=>this.state.get(o),a=>this.updateState(e,a),a=>{var l,u;return(u=(l=r())==null?void 0:l.filterParams)==null?void 0:u.onModelChange(a,n)},s!=null&&s.isHandler?(i=s.handler.processModelToApply)==null?void 0:i.bind(s.handler):void 0)}updateAllModels(e,t){const n=[];this.allColumnFilters.forEach((o,s)=>{var i;const r=this.beans.colModel.getColDefCol(s);r&&o$(e,()=>o.filterUi,()=>Ho(this.model,s),()=>this.state.get(s),a=>this.updateState(r,a),a=>{this.updateStoredModel(s,a),this.dispatchLocalEvent({type:"filterAction",column:r,action:e}),n.push(this.refreshHandlerAndUi(r,a,"ui"))},o!=null&&o.isHandler?(i=o.handler.processModelToApply)==null?void 0:i.bind(o.handler):void 0)}),n.length&&Yn.all(n).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();n$(()=>{var n;return(n=this.cachedFilter(e))==null?void 0:n.filterUi},()=>Ho(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:n}=this;for(const s of n)if(s.source==="COLUMN_MENU")return!1;let o=!1;for(const s of e.keys()){const r=e.get(s);if(r.valid===!1)return!1;(r.model??null)!==Ho(t,s)&&(o=!0)}return o}hasUnappliedModel(e){var o;const{model:t,state:n}=this;return(((o=n.get(e))==null?void 0:o.model)??null)!==Ho(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const n=this.beans.filterPanelSvc;return n!=null&&n.isActive?!!n.getState(e.getColId()):!1}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function CSe(e){var t;return!!((t=e.filterManager)!=null&&t.isAnyFilterPresent())}function bSe(e,t="api"){var n;(n=e.filterManager)==null||n.onFilterChanged({source:t})}var SSe=class extends qe{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:o})=>this.onAdvFilterEnabledChanged(o),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:n}=this;this.alwaysPassFilter=n.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=n.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,n="api"){var o;this.isAdvFilterEnabled()||(o=this.colFilter)==null||o.setState(e,t,n)}setFilterModel(e,t="api",n){var o;if(this.isAdvFilterEnabled()){n||this.warnAdvFilters();return}(o=this.colFilter)==null||o.setModel(e,t)}getFilterModel(){var e;return((e=this.colFilter)==null?void 0:e.getModel())??{}}getFilterState(){var e;return(e=this.colFilter)==null?void 0:e.getState()}isColumnFilterPresent(){var e;return!!((e=this.colFilter)!=null&&e.isFilterPresent())}isAggregateFilterPresent(){var e;return!!((e=this.colFilter)!=null&&e.isAggFilterPresent())}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){var t,n;e?(t=this.colFilter)!=null&&t.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):(n=this.advancedFilter)!=null&&n.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){var e;return!!((e=this.advancedFilter)!=null&&e.isEnabled())}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){T_(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:n,columns:o=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):Yn.resolve()).then(()=>{var r;const s={source:t,type:"filterChanged",columns:o};n&&vs(s,n),this.eventSvc.dispatchEvent(s),(r=this.colFilter)==null||r.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){var e;return!!((e=this.colFilter)!=null&&e.isSuppressFlashingCellsBecauseFiltering())}isQuickFilterPresent(){var e;return!!((e=this.quickFilter)!=null&&e.isFilterPresent())}updateAggFiltering(){this.aggFiltering=!!T_(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){var n;const{rowNode:t}=e;return(n=this.alwaysPassFilter)!=null&&n.call(this,t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){var n;const{rowNode:t}=e;return(n=this.alwaysPassFilter)!=null&&n.call(this,t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){var t;return this.isAdvFilterEnabled()?!1:!!((t=this.colFilter)!=null&&t.isFilterAllowed(e))}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){var n;if(this.isAdvFilterEnabled()){if((n=this.beans.dataTypeSvc)!=null&&n.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){var e;return this.isAdvFilterEnabled()?!1:!!((e=this.colFilter)!=null&&e.hasFloatingFilters())}getColumnFilterInstance(e){var t;return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):((t=this.colFilter)==null?void 0:t.getFilterInstance(e))??Promise.resolve(void 0)}warnAdvFilters(){Je(68)}setupAdvFilterHeaderComp(e){var t;(t=this.advancedFilter)==null||t.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){var n;return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):((n=this.colFilter)==null?void 0:n.setModelForColumn(e,t))??Promise.resolve()}},ESe=class extends qe{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){var e;(e=this.hidePopup)==null||e.call(this)}showMenuAfterMouseEvent(e,t,n,o){e&&!e.isColumn||this.showPopup(e,s=>{var r;(r=this.popupSvc)==null||r.positionPopupUnderMouseEvent({column:e,type:n,mouseEvent:t,ePopup:s})},n,t.target,Qs(this.gos),o)}showMenuAfterButtonClick(e,t,n,o){if(e&&!e.isColumn)return;let s=-1,r="left";const i=Qs(this.gos);!i&&this.gos.get("enableRtl")&&(s=1,r="right");const a=i?void 0:4*s,l=i?void 0:4;this.showPopup(e,u=>{var c;(c=this.popupSvc)==null||c.positionPopupByComponent({type:n,eventSource:t,ePopup:u,nudgeX:a,nudgeY:l,alignSide:r,keepWithinBounds:!0,position:"under",column:e})},n,t,i,o)}showPopup(e,t,n,o,s,r){var g;const i=e?this.createBean(new tpe(e,"COLUMN_MENU")):void 0;if(this.activeMenu=i,!(i!=null&&i.hasFilter())||!e){_n(57);return}const a=lo({tag:"div",cls:`ag-menu${s?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:v=>this.trapFocusWithin(v,a)}),a.appendChild(i==null?void 0:i.getGui());let l;const u=()=>i==null?void 0:i.afterGuiDetached(),c=wde(this.gos)?o??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,d=v=>{D$(e,!1,"contextMenu");const w=v instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),w&&o&&Pi(o)){const S=k2(o);S==null||S.focus({preventScroll:!0})}u(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,n,e),r==null||r()},h=this.getLocaleTextFunc(),f=s&&n!=="columnFilter"?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),p=(g=this.popupSvc)==null?void 0:g.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:d,positionCallback:()=>t(a),anchorToElement:c,ariaLabel:f});p&&(this.hidePopup=l=p.hideFunc),i.afterInit().then(()=>{t(a),i.afterGuiAttached({container:n,hidePopup:l})}),D$(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,n,e)}trapFocusWithin(e,t){e.key!==Ve.TAB||e.defaultPrevented||Qu(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),Ju(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,n){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:n??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},_Se=class extends qe{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,n){if(!t)return;const o=e.getColDef(),{selectableFilter:s,valueSvc:r}=this.beans,i=n??(s==null?void 0:s.getFilterValueGetter(e.getColId()))??o.filterValueGetter;return i?this.executeFilterValueGetter(i,t.data,e,t,o):r.getValue(e,t)}executeFilterValueGetter(e,t,n,o,s){const{expressionSvc:r,valueSvc:i}=this.beans,a=Ot(this.gos,{data:t,node:o,column:n,colDef:s,getValue:i.getValueCallback.bind(i,o)});return typeof e=="function"?e(a):r==null?void 0:r.evaluate(e,a)}},RSe={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},TSe=class extends Cn{constructor(){super(RSe,[aw]),this.eFloatingFilterText=dt}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const n=e,o=n.getHandler();if(o.getModelAsString){const s=o.getModelAsString(n.model);this.eFloatingFilterText.setValue(s)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const n=t.getModelAsString(e);this.eFloatingFilterText.setValue(n)}})}refresh(e){this.init(e)}},QR=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const n=e.filterOptions??t;this.filterOptions!==n&&(this.filterOptions=n,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if(typeof t=="string")continue;const n=[["displayKey"],["displayName"],["predicate","test"]],o=s=>s.some(r=>t[r]!=null)?!0:(Je(72,{keys:s}),!1);if(!n.every(o)){this.filterOptions=e.filter(s=>s===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const n=t[0];if(typeof n=="string")return n;if(n.displayKey)return n.displayKey;Je(73)}else Je(74)}getCustomOption(e){return this.customFilterOptions[e]}};function ig(e,t,n){return n==null?e.splice(t):e.splice(t,n)}function Mw(e){return e==null||typeof e=="string"&&e.trim().length===0}function DSe(e){return e==="AND"||e==="OR"?e:"AND"}function ISe(e,t,n){if(e==null)return;const{predicate:o}=e;if(o!=null&&!t.some(s=>s==null))return o(t,n)}function xSe(e,t){let n=e.length;return n>t&&(e.splice(t),Je(78),n=t),n}function ag(e,t){const n=t.getCustomOption(e);if(n){const{numberOfInputs:s}=n;return s??1}return e&&["empty","notBlank","blank"].indexOf(e)>=0?0:e==="inRange"?2:1}var eT=class extends cpe{constructor(e,t,n){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=n,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);const t=new QR;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=DSe(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions();const t=this.getGui();this.isReadOnly()?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,n)=>{const o=n===0?e:this.optionsFactory.defaultOption;t.setValue(o,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const n=!e.operator,o=!t.operator;if(!n&&o||n&&!o)return!1;let r;if(n){const i=e,a=t;r=this.areSimpleModelsEqual(i,a)}else{const i=e,a=t;r=i.operator===a.operator&&Fl(i.conditions,a.conditions,(l,u)=>this.areSimpleModelsEqual(l,u))}return r}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),Yn.resolve();if(e.operator){const o=e;let s=o.conditions;s==null&&(s=[],Je(77));const r=xSe(s,this.maxNumConditions),i=this.getNumConditions();if(r<i)this.removeConditionsAndOperators(r);else if(r>i)for(let l=i;l<r;l++)this.createJoinOperatorPanel(),this.createOption();const a=o.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),s.forEach((l,u)=>{this.eTypes[u].setValue(l.type,!0),this.setConditionIntoUi(l,u)})}else{const o=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(o.type,!0),this.setConditionIntoUi(o,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),Yn.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(Je(79),t=1),this.maxNumConditions=t;let n=e.numAlwaysVisibleConditions??1;n<1&&(Je(80),n=1),n>t&&(Je(81),n=t),this.numAlwaysVisibleConditions=n}createOption(){const e=this.getGui(),t=this.createManagedBean(new Z_);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const n=this.createEValue();this.eConditionBodies.push(n),e.appendChild(n),this.putOptionsIntoDropdown(t),this.resetType(t);const o=this.getNumConditions()-1;this.forEachPositionInput(o,s=>this.resetInput(s)),this.addChangedListeners(t,o)}createJoinOperatorPanel(){const e=lo({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),n=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const o=this.eJoinPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(t,o,s),this.resetJoinOperatorOr(n,o,s),this.isReadOnly()||(t.onValueChange(this.listener),n.onValueChange(this.listener))}createJoinOperator(e,t,n){const o=this.createManagedBean(new Hhe);e.push(o);const s="ag-filter-condition-operator";return o.addCss(s),o.addCss(`${s}-${n}`),t.appendChild(o.getGui()),o}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const n of t)e.addOption(n);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,n=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:n?this.getLocaleTextFunc()(n.displayKey,n.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let n=0;n<this.getNumConditions();n++)this.isConditionUiComplete(n)?e=n:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const n=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<n){this.removeConditionsAndOperators(n+1);const o=e+1,s=n-o;s>0&&this.removeConditionsAndOperators(o,s),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((o,s)=>{const r=this.isConditionDisabled(s,e);o.setDisabled(r||this.filterListOptions.length<=1),s===1&&(Pp(this.eJoinPanels[0],r),this.eJoinAnds[0].setDisabled(r),this.eJoinOrs[0].setDisabled(r))}),this.eConditionBodies.forEach((o,s)=>{Un(o,this.isConditionBodyVisible(s))});const n=(t??this.getJoinOperator())==="OR";for(const o of this.eJoinAnds)o.setValue(!n,!0);for(const o of this.eJoinOrs)o.setValue(n,!0);this.forEachInput((o,s,r,i)=>{this.setElementDisplayed(o,s<i),this.setElementDisabled(o,this.isConditionDisabled(r,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:n,eConditionBodies:o,eJoinPanels:s,eJoinAnds:r,eJoinOrs:i}=this;this.removeComponents(n,e,t),this.removeElements(o,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(s,a,t),this.removeComponents(r,a,t),this.removeComponents(i,a,t)}removeElements(e,t,n){const o=ig(e,t,n);for(const s of o)ei(s)}removeComponents(e,t,n){const o=ig(e,t,n);for(const s of o)ei(s.getGui()),this.destroyBean(s)}afterGuiAttached(e){var t;if(super.afterGuiAttached(e),this.resetPlaceholder(),!(e!=null&&e.suppressFocus)){let n;if(!this.isReadOnly()){const o=this.getInputs(0)[0];o instanceof ec&&this.isConditionBodyVisible(0)?n=o.getInputElement():n=(t=this.eTypes[0])==null?void 0:t.getFocusableElement()}(n??this.getGui()).focus({preventScroll:!0})}}afterGuiDetached(){var i;super.afterGuiDetached();const e=this.params;if((i=this.beans.colFilter)!=null&&i.shouldKeepStateOnDetach(e.column))return;e.onStateChange({model:e.model});let t=-1,n=-1,o=!1;const s=this.getJoinOperator();for(let a=this.getNumConditions()-1;a>=0;a--)if(this.isConditionUiComplete(a))t===-1&&(t=a,n=a);else{const l=a>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(a-1),u=a<t;(l||u)&&(this.removeConditionsAndOperators(a,1),o=!0,u&&n--)}let r=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),r=!0),this.shouldAddNewConditionAtEnd(n===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),r=!0),r&&this.updateConditionStatusesAndValues(n,s),o&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=n}getModelAsString(e){var t,n;return((n=(t=this.params.getHandler())==null?void 0:t.getModelAsString)==null?void 0:n.call(t,e))??""}getPlaceholderText(e,t){let n=this.translate(e);if(typeof this.filterPlaceholder=="function"){const o=this.eTypes[t].getValue(),s=this.translate(o);n=this.filterPlaceholder({filterOptionKey:o,filterOption:s,placeholder:n})}else typeof this.filterPlaceholder=="string"&&(n=this.filterPlaceholder);return n}resetPlaceholder(){const e=this.getLocaleTextFunc();this.forEachInput((t,n,o,s)=>{if(!(t instanceof ec))return;const r=n===0&&s>1?"inRangeStart":n===0?"filterOoo":"inRangeEnd",i=n===0&&s>1?e("ariaFilterFromValue","Filter from value"):n===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(r,o)),t.setInputAriaLabel(i)})}setElementValue(e,t,n){e instanceof ec&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){y2(e)&&Un(e.getGui(),t)}setElementDisabled(e,t){y2(e)&&Pp(e.getGui(),t)}attachElementOnChange(e,t){e instanceof ec&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,n)=>{this.forEachPositionTypeInput(n,t,e)})}forEachPositionInput(e,t){const n=this.getConditionType(e);this.forEachPositionTypeInput(e,n,t)}forEachPositionTypeInput(e,t,n){const o=ag(t,this.optionsFactory),s=this.getInputs(e);for(let r=0;r<s.length;r++){const i=s[r];i!=null&&n(i,r,e,o)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return ag(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(n=>n==null))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,n)=>this.resetJoinOperatorAnd(t,n,this.joinOperatorId+n)),this.eJoinOrs.forEach((t,n)=>this.resetJoinOperatorOr(t,n,this.joinOperatorId+n)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const n=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(n).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),n)}resetJoinOperatorOr(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),n)}resetJoinOperator(e,t,n,o,s){this.updateJoinOperatorDisabled(e.setValue(n,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${s}`).setLabel(o),t)}updateJoinOperatorsDisabled(){const e=(t,n)=>this.updateJoinOperatorDisabled(t,n);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const n=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((o,s,r)=>{r===t&&this.setElementValue(o,n[s]!=null?n[s]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,n,o)=>{this.setElementValue(t,n===0&&o===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,n=>{this.attachElementOnChange(n,this.listener)}))}hasInvalidInputs(){return!1}isReadOnly(){return!!this.params.readOnly}},WH=class{constructor(e,t,n,o,s,r){this.alive=!0,this.context=e,this.eParent=s;const i=She(t,n,o);i&&i.newAgStackInstance().then(a=>{var c,d;if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;s.appendChild(a.getGui()),(c=a==null?void 0:a.afterGuiAttached)==null||c.call(a);const{tempValue:l,disabled:u}=this;l&&a.setDate(l),u!=null&&((d=a.setDisabled)==null||d.call(a,u)),r==null||r(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){var n;const t=this.dateComp;t?(n=t.setDisabled)==null||n.call(t,e):this.disabled=e}setDisplayed(e){Un(this.eParent,e)}setInputPlaceholder(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.setInputPlaceholder)==null||n.call(t,e)}setInputAriaLabel(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.setInputAriaLabel)==null||n.call(t,e)}afterGuiAttached(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.afterGuiAttached)==null||n.call(t,e)}updateParams(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.refresh)==null||n.call(t,e)}},tT=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function zH(e,t){const{dateFrom:n,dateTo:o,type:s}=e||{};return[n&&As(n,void 0,!0)||null,o&&As(o,void 0,!0)||null].slice(0,ag(s,t))}var jH=1e3,KH=1/0,ASe=class extends eT{constructor(){super("dateFilter",zH,tT),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=jH,this.maxValidYear=KH,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,u)=>{const c=e[l];if(c!=null)if(isNaN(c))Je(82,{param:l});else return c==null?u:Number(c);return u},n=t("minValidYear",jH),o=t("maxValidYear",KH);this.minValidYear=n,this.maxValidYear=o,n>o&&Je(83);const{minValidDate:s,maxValidDate:r}=e,i=s instanceof Date?s:As(s);this.minValidDate=i;const a=r instanceof Date?r:As(r);this.maxValidDate=a,i&&a&&i>a&&Je(84)}createDateCompWrapper(e){const{beans:{userCompFactory:t,context:n,gos:o},params:s}=this,r=new WH(n,t,s.colDef,Ot(o,{onDateChanged:()=>this.onUiChanged(),filterParams:s,location:"filter"}),e);return this.addDestroyFunc(()=>r.destroy()),r}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=lo({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,n,o){const s=lo({tag:"div",cls:`ag-filter-${o} ag-filter-date-${o}`});t.push(s),e.appendChild(s),n.push(this.createDateCompWrapper(s))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),ig(this.eConditionPanelsFrom,e,t),ig(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,n){const o=ig(e,t,n);for(const s of o)s.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:n,minValidYear:o,maxValidYear:s}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<o)return!1;if(n){if(e>n)return!1}else if(e.getUTCFullYear()>s)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((n,o,s,r)=>{s!==e||!t||o>=r||(t=t&&this.isValidDateValue(n.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),n={},o=this.getValues(e),s=this.params.useIsoSeparator?"T":" ";return o.length>0&&(n.dateFrom=er(o[0],!0,s)),o.length>1&&(n.dateTo=er(o[1],!0,s)),{dateFrom:null,dateTo:null,filterType:this.filterType,type:t,...n}}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),n=e("ariaFilterValue","Filter Value");this.forEachInput(o=>{o.setInputPlaceholder(t),o.setInputAriaLabel(n)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,o,s,r)=>{o<r&&t.push(n.getDate())}),t}translate(e){return e==="lessThan"?super.translate("before"):e==="greaterThan"?super.translate("after"):super.translate(e)}},qH=class extends qe{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,n=new QR;this.optionsFactory=n,n.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(n,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,n=this.optionsFactory;n.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:n,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:n}=t,o=[];if(n){const i=t;o.push(...i.conditions??[])}else o.push(t);const s=n&&n==="OR"?"some":"every",r=this.params.getValue(e.node);return o[s](i=>this.individualConditionPasses(e,i,r))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:n,maxNumConditions:o}}=e;if(t==null)return;let r=u$(t)?t.conditions:[t];const i=(n==null?void 0:n.map(c=>typeof c=="string"?c:c.displayKey))??this.defaultOptions;if(!(!r||r.every(c=>i.find(d=>d===c.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1;const u=this.filterType;if((r&&!r.every(c=>c.filterType===u)||t.filterType!==u)&&(r=r.map(c=>({...c,filterType:u})),l=!0),typeof o=="number"&&r&&r.length>o&&(r=r.slice(0,o),l=!0),l){const c=r.length>1?{...t,filterType:u,conditions:r}:{...r[0],filterType:u};this.params={...e,model:c},e.onModelChange(c)}}individualConditionPasses(e,t,n){const o=this.optionsFactory,s=this.mapValuesFromModel(t,o),r=o.getCustomOption(t.type),i=ISe(r,s,n);return i??(n==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(s,n,t,e))}},YH=class extends qH{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:n,includeBlanksInGreaterThan:o,includeBlanksInLessThan:s,includeBlanksInRange:r}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(n)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(o)return!0;break;case"lessThan":case"lessThanOrEqual":if(s)return!0;break;case"inRange":if(r)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,n){const o=n.type;if(!this.isValid(t))return o==="notEqual"||o==="notBlank";const s=this.comparator(),r=e[0]!=null?s(e[0],t):0;switch(o){case"equals":return r===0;case"notEqual":return r!==0;case"greaterThan":return r>0;case"greaterThanOrEqual":return r>=0;case"lessThan":return r<0;case"lessThanOrEqual":return r<=0;case"inRange":{const i=s(e[1],t);return this.params.filterParams.inRangeInclusive?r>=0&&i<=0:r>0&&i<0}case"blank":return Mw(t);case"notBlank":return!Mw(t);default:return Je(76,{filterModelType:o}),!0}}},XH={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},PSe={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},nT=class extends qe{constructor(e,t,n){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=n}getModelAsString(e,t){const n=this.getLocaleTextFunc(),o=t==="filterToolPanel";if(!e)return o?Vl(this,"filterSummaryInactive"):null;if(e.operator!=null){const r=e,a=(r.conditions??[]).map(u=>this.getModelAsString(u,t)),l=r.operator==="AND"?"andCondition":"orCondition";return a.join(` ${Vl(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return o?Vl(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):n(e.type,e.type);{const r=e,i=this.optionsFactory.getCustomOption(r.type),{displayKey:a,displayName:l,numberOfInputs:u}=i||{};return a&&l&&u===0?n(a,l):this.conditionToString(r,o,r.type==="inRange"||u===2,a,l)}}}updateParams(e){const{optionsFactory:t,filterParams:n}=e;this.optionsFactory=t,this.filterParams=n}conditionForToolPanel(e,t,n,o,s,r){let i;const a=this.getTypeKey(e);return a&&(i=Vl(this,a)),s&&r&&(i=this.getLocaleTextFunc()(s,r)),i!=null?t?`${i} ${Vl(this,"filterSummaryInRangeValues",[n(),o()])}`:`${i} ${n()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},ZH=class extends nT{constructor(e,t){super(e,t,n=>{const{dataTypeSvc:o,valueSvc:s}=this.beans,r=t.column,i=o==null?void 0:o.getDateFormatterFunction(r),a=i?i(n??void 0):n;return s.formatValue(r,null,a)}),this.filterTypeKeys=XH}conditionToString(e,t,n,o,s){const{type:r}=e,i=As(e.dateFrom),a=As(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,u=t?this.formatValue.bind(this):h=>z_(h,l),c=()=>i!==null?u(i):"null",d=()=>a!==null?u(a):"null";if(t){const h=this.conditionForToolPanel(r,n,c,d,o,s);if(h!=null)return h}return n?`${c()}-${d()}`:i!=null?u(i):`${r}`}};function kSe(e,t){const n=t;return n<e?-1:n>e?1:0}var FSe=class extends YH{constructor(){super(zH,tT),this.filterType="date",this.FilterModelFormatterClass=ZH}comparator(){return this.params.filterParams.comparator??kSe}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}},JH=class extends Cn{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let n;t?n=e.conditions[0]:n=e,this.lastType=n.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const n=e;return this.isTypeEditable(n.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const n=e;this.onModelUpdated(n.model)}}setParams(e){const t=new QR;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const n=this.optionsFactory.defaultOption;t||(this.lastType=n),this.readOnly=!!e.filterParams.readOnly;const o=this.isTypeEditable(n);this.setEditable(o)}refresh(e){this.params=e;const t=e,n=this.reactive;if((!n||t.source==="colDef")&&this.updateParams(e),n){const{source:o,model:s}=t;if(o==="dataChanged"||o==="ui")return;this.onModelUpdated(s)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t!=null&&t.afterFloatingFilter||t!=null&&t.afterDataChange||this.onModelUpdated(e)}hasSingleInput(e){var n;const t=(n=this.optionsFactory.getCustomOption(e))==null?void 0:n.numberOfInputs;return t==null||t==1}isTypeEditable(e){const t=["inRange","empty","blank","notBlank"];return!!e&&!this.readOnly&&this.hasSingleInput(e)&&t.indexOf(e)<0}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},OSe={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},MSe=class extends JH{constructor(){super(OSe,[aw]),this.eReadOnlyText=dt,this.eDateWrapper=dt,this.FilterModelFormatterClass=ZH,this.filterType="date",this.defaultOptions=tT}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const n=e?As(e.dateFrom):null;this.dateComp.setDate(n),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){Un(this.eDateWrapper,e),Un(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const n=t.model,o=er(e),s=o==null?null:{...n??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:o};t.onModelChange(s,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t==null||t.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=iR(e,this.defaultDebounceMs);return Ot(this.gos,{onDateChanged:Yo(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:n,params:o}=this;this.dateComp=new WH(e,t,o.column.getColDef(),this.getDateComponentParams(),n,s=>{s.setInputAriaLabel(this.getAriaLabel(o))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},NSe={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},LSe=class extends Cn{constructor(){super(NSe,[aw]),this.eDateInput=dt,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}setParams(e){var h;const t=this.eDateInput.getInputElement(),n=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=n&&Ol();const{minValidYear:o,maxValidYear:s,minValidDate:r,maxValidDate:i,buttons:a,includeTime:l,colDef:u}=e.filterParams||{},c=this.beans.dataTypeSvc,d=l??((h=c==null?void 0:c.getDateIncludesTimeFlag)==null?void 0:h.call(c,u.cellDataType))??!1;if(n?d?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text",r&&o&&Je(85),i&&s&&Je(86),r&&i){const[f,p]=[r,i].map(g=>g instanceof Date?g:As(g));f&&p&&f.getTime()>p.getTime()&&Je(87)}r?r instanceof Date?t.min=z_(r):t.min=r:o&&(t.min=`${o}-01-01`),i?i instanceof Date?t.max=z_(i):t.max=i:s&&(t.max=`${s}-12-31`),this.isApply=e.location==="floatingFilter"&&!!(a!=null&&a.includes("apply"))}refresh(e){this.params=e,this.setParams(e)}getDate(){return As(this.eDateInput.getValue())}setDate(e){var o;const t=this.params.filterParams.colDef.cellDataType,n=((o=this.beans.dataTypeSvc)==null?void 0:o.getDateIncludesTimeFlag(t))??!1;this.eDateInput.setValue(er(e,n))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e!=null&&e.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){var t;return((t=e==null?void 0:e.filterParams)==null?void 0:t.browserDatePicker)??!0}},oT=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function sT(e){const{allowedCharPattern:t}=e??{};return t??null}function rT(e){return e==null||isNaN(e)?null:e}function QH(e,t){const{filter:n,filterTo:o,type:s}=e||{};return[rT(n),rT(o)].slice(0,ag(s,t))}var VSe=class extends eT{constructor(){super("numberFilter",QH,oT),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}setElementValue(e,t,n){const{numberFormatter:o}=this.params,s=!n&&o?o(t??null):t;super.setElementValue(e,s)}createEValue(){const e=sT(this.params),t=lo({tag:"div",cls:"ag-filter-body",role:"presentation"});return this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,n,o){const s=this.createManagedBean(o?new tc({allowedCharPattern:o}):new X_);s.addCss(`ag-filter-${n}`),s.addCss("ag-filter-filter"),t.push(s),e.appendChild(s.getGui())}removeEValues(e,t){const n=o=>this.removeComponents(o,e,t);n(this.eValuesFrom),n(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(n,o,s,r)=>{o<r&&t.push(rT(this.stringToFloat(n.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}stringToFloat(e){if(typeof e=="number")return e;let t=Ia(e);t!=null&&t.trim()===""&&(t=null);const n=this.params.numberParser;return n?n(t):t==null||t.trim()==="-"?null:Number.parseFloat(t)}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(n.filter=o[0]),o.length>1&&(n.filterTo=o[1]),n}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{t.getInputElement().validity.valid||(e=!0)}),e}},eG=class extends nT{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=XH}conditionToString(e,t,n,o,s){const{filter:r,filterTo:i,type:a}=e,l=this.formatValue.bind(this);if(t){const u=this.conditionForToolPanel(a,n,()=>l(r),()=>l(i),o,s);if(u!=null)return u}return n?`${l(r)}-${l(i)}`:r!=null?l(r):`${a}`}},BSe=class extends YH{constructor(){super(QH,oT),this.filterType="number",this.FilterModelFormatterClass=eG}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},tG=class extends qe{constructor(e){super(),this.params=e,this.eInput=dt,this.onValueChanged=()=>{}}setupGui(e){var o;this.eInput=this.createManagedBean(new tc((o=this.params)==null?void 0:o.config));const t=this.eInput.getGui();e.appendChild(t);const n=s=>this.onValueChanged(s);this.addManagedListeners(t,{input:n,keydown:n})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t}){const{eInput:n}=this;n.setInputAriaLabel(e),t!==void 0&&n.setAutoComplete(t)}};function iT(e){const t=e==null?void 0:e.trim();return t===""?e:t}function nG(e,t){const{filter:n,filterTo:o,type:s}=e||{};return[n||null,o||null].slice(0,ag(s,t))}var $Se={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},oG=class extends JH{constructor(){super(...arguments),this.eFloatingFilterInputContainer=dt,this.defaultDebounceMs=500}postConstruct(){this.setTemplate($Se)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const t=e.browserAutoComplete??!1,{inputSvc:n,defaultDebounceMs:o,readOnly:s}=this;if(n.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:t}),this.applyActive=hw(e.filterParams),!s){const r=iR(e.filterParams,o),i=Yo(this,this.syncUpWithParentFilter.bind(this),r);n.setValueChangedListener(i)}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,n=t.getValue();qo(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(n,!0)}syncUpWithParentFilter(e){const t=e.key===Ve.ENTER,n=this.reactive;if(n&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:o,params:s,lastType:r}=this;let i=o.getValue();if(s.filterParams.trimInput&&(i=iT(i),o.setValue(i,!0)),n){const a=s,l=a.model,u=this.convertValue(i),c=u==null?null:{...l??{filterType:this.filterType,type:r??this.optionsFactory.defaultOption},filter:u};a.onModelChange(c,{afterFloatingFilter:!0})}else s.parentFilterInstance(a=>{a==null||a.onFloatingFilterChanged(r||null,i||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},HSe=class extends qe{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new X_),this.eTextInput=this.createManagedBean(new tc),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),n=this.eTextInput.getGui();e.appendChild(t),e.appendChild(n),this.setupListeners(t,o=>this.onValueChanged(o)),this.setupListeners(n,o=>this.onValueChanged(o))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},GSe=class extends oG{constructor(){super(...arguments),this.FilterModelFormatterClass=eG,this.filterType="number",this.defaultOptions=oT}updateParams(e){sT(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=sT(e.filterParams),this.allowedCharPattern?this.createManagedBean(new tG({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new HSe)}convertValue(e){return e?Number(e):null}},aT=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],USe=class extends eT{constructor(){super("textFilter",nG,aT),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(n.filter=o[0]),o.length>1&&(n.filterTo=o[1]),n}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,o,s,r)=>{o<r&&t.push(Ia(n.getValue()))}),t}createEValue(){const e=lo({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:n}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,n,"to"),e}createFromToElement(e,t,n){const o=this.createManagedBean(new tc);o.addCss(`ag-filter-${n}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui())}removeEValues(e,t){const n=r=>this.removeComponents(r,e,t),{eValuesFrom:o,eValuesTo:s}=this;n(o),n(s)}},sG=class extends nT{constructor(){super(...arguments),this.filterTypeKeys=PSe}conditionToString(e,t,n,o,s){const{filter:r,filterTo:i,type:a}=e;if(t){const l=c=>()=>Vl(this,"filterSummaryTextQuote",[c]),u=this.conditionForToolPanel(a,n,l(r),l(i),o,s);if(u!=null)return u}return n?`${r}-${i}`:r!=null?`${r}`:`${a}`}},WSe=({filterOption:e,value:t,filterText:n})=>{if(n==null)return!1;switch(e){case"contains":return t.includes(n);case"notContains":return!t.includes(n);case"equals":return t===n;case"notEqual":return t!=n;case"startsWith":return t.indexOf(n)===0;case"endsWith":{const o=t.lastIndexOf(n);return o>=0&&o===t.length-n.length}default:return!1}},zSe=e=>e,jSe=e=>e==null?null:e.toString().toLowerCase(),KSe=class extends qH{constructor(){super(nG,aT),this.filterType="text",this.FilterModelFormatterClass=sG}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??WSe,this.formatter=t.textFormatter??(t.caseSensitive?zSe:jSe)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,n,o){const s=e.map(h=>this.formatter(h))||[],r=this.formatter(t),{api:i,colDef:a,column:l,context:u,filterParams:{textFormatter:c}}=this.params;if(n.type==="blank")return Mw(t);if(n.type==="notBlank")return!Mw(t);const d={api:i,colDef:a,column:l,context:u,node:o.node,data:o.data,filterOption:n.type,value:r,textFormatter:c};return s.some(h=>this.matcher({...d,filterText:h}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=n=>{const o={...n},{filter:s,filterTo:r}=n;return s&&(o.filter=iT(s)??null),r&&(o.filterTo=iT(r)??null),o};return u$(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},qSe=class extends oG{constructor(){super(...arguments),this.FilterModelFormatterClass=sG,this.filterType="text",this.defaultOptions=aT}createFloatingFilterInputService(){return this.createManagedBean(new tG)}};function YSe(e){var t;return!!((t=e.quickFilter)!=null&&t.isFilterPresent())}function XSe(e){var t;return(t=e.quickFilter)==null?void 0:t.getText()}function ZSe(e){var t;(t=e.quickFilter)==null||t.resetCache()}var JSe=class extends qe{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",n=>this.setFilter(n.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){var l;const{autoColSvc:e,colModel:t,gos:n,pivotResultCols:o}=this.beans,s=t.isPivotMode(),r=e==null?void 0:e.getColumns(),i=t.getColDefCols();let a=(s&&!n.get("applyQuickFilterBeforePivotOrAgg")?(l=o==null?void 0:o.getPivotResultCols())==null?void 0:l.list:i)??[];r&&(a=a.concat(r)),this.colsToUse=n.get("includeHiddenColumnsInQuickFilter")?a:a.filter(u=>u.isVisible()||u.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(n=>t?this.doesRowPassCache(e,n):this.doesRowPassNoCache(e,n))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return ft(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){Je(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),n=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,n&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(n=>{const o=this.getTextForColumn(n,e);return ft(o)&&o.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let n;e?(this.checkGenerateAggText(t),n=t.quickFilterAggregateText):n=this.getAggText(t);const{quickFilterParts:o,matcher:s}=this;return s(o,n)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let n=this.beans.filterValueSvc.getValue(e,t);const o=e.getColDef();if(o.getQuickFilterText){const s=Ot(this.gos,{value:n,node:t,data:t.data,column:e,colDef:o});n=o.getQuickFilterText(s)}return ft(n)?n.toString().toUpperCase():null}getAggText(e){const t=[];for(const n of this.colsToUse){const o=this.getTextForColumn(n,e);ft(o)&&t.push(o)}return t.join(`
|
|
252
252
|
`)}},QSe={moduleName:"ClientSideRowModelFilter",version:ct,rowModels:["clientSide"],beans:[eSe]},lT={moduleName:"FilterCore",version:ct,beans:[SSe],apiFunctions:{isAnyFilterPresent:CSe,onFilterChanged:bSe},css:[iSe],dependsOn:[QSe]},rG={moduleName:"FilterValue",version:ct,beans:[_Se]},Nw={moduleName:"ColumnFilter",version:ct,beans:[wSe,ESe],dynamicBeans:{headerFilterCellCtrl:tSe},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:aSe,getColumnFilterInstance:lSe,destroyFilter:uSe,setFilterModel:cSe,getFilterModel:dSe,getColumnFilterModel:hSe,setColumnFilterModel:fSe,showColumnFilter:pSe,hideColumnFilter:gSe,getColumnFilterHandler:mSe,doFilterAction:vSe},dependsOn:[lT,Ow,rG,sSe]},eEe={moduleName:"CustomFilter",version:ct,userComponents:{agReadOnlyFloatingFilter:TSe},dependsOn:[Nw]},tEe={moduleName:"TextFilter",version:ct,dependsOn:[Nw],userComponents:{agTextColumnFilter:{classImp:USe,params:{useForm:!0}},agTextColumnFloatingFilter:qSe},dynamicBeans:{agTextColumnFilterHandler:KSe}},nEe={moduleName:"NumberFilter",version:ct,dependsOn:[Nw],userComponents:{agNumberColumnFilter:{classImp:VSe,params:{useForm:!0}},agNumberColumnFloatingFilter:GSe},dynamicBeans:{agNumberColumnFilterHandler:BSe}},oEe={moduleName:"DateFilter",version:ct,dependsOn:[Nw],userComponents:{agDateColumnFilter:{classImp:ASe,params:{useForm:!0}},agDateInput:LSe,agDateColumnFloatingFilter:MSe},dynamicBeans:{agDateColumnFilterHandler:FSe}},sEe={moduleName:"QuickFilterCore",version:ct,rowModels:["clientSide"],beans:[JSe],dependsOn:[lT,rG]},rEe={moduleName:"QuickFilter",version:ct,apiFunctions:{isQuickFilterPresent:YSe,getQuickFilter:XSe,resetQuickFilter:ZSe},dependsOn:[sEe]},iEe={moduleName:"ExternalFilter",version:ct,dependsOn:[lT]},aEe=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",uT=(e,t,n)=>{var a,l,u;const{editModelSvc:o}=e,s=(l=(a=o==null?void 0:o.getCellValidationModel())==null?void 0:a.getCellValidation(t))==null?void 0:l.errorMessages,r=(u=o==null?void 0:o.getRowValidationModel().getRowValidation(t))==null?void 0:u.errorMessages,i=s||r;return i!=null&&i.length?i.join(n("tooltipValidationErrorSeparator",". ")):void 0},lEe=class extends qe{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,n,o){e&&t.destroyBean(e);const s=this.gos,r=JR(s),{column:i,eGui:a}=t,l=i.getColDef();!o&&r&&!l.headerComponent&&(o=Hy(()=>a.querySelector(".ag-header-cell-text")));const u="header",d=this.beans.colNames.getDisplayNameForColumn(i,"header",!0),h=n??d,f={getGui:()=>a,getLocation:()=>u,getTooltipValue:()=>{var g;return n??((g=l==null?void 0:l.headerTooltipValueGetter)==null?void 0:g.call(l,Ot(s,{location:u,colDef:l,column:i,value:h,valueFormatted:d})))??(l==null?void 0:l.headerTooltip)},shouldDisplayTooltip:o,getAdditionalParams:()=>({column:i,colDef:i.getColDef()})};let p=this.createTooltipFeature(f);return p&&(p=t.createBean(p),t.setRefreshFunction("tooltip",()=>p.refreshTooltip())),p}setupHeaderGroupTooltip(e,t,n,o){e&&t.destroyBean(e);const s=this.gos,r=JR(s),{column:i,eGui:a}=t,l=i.getColGroupDef();!o&&r&&!(l!=null&&l.headerGroupComponent)&&(o=Hy(()=>a.querySelector(".ag-header-group-text")));const u="headerGroup",d=this.beans.colNames.getDisplayNameForColumnGroup(i,"header"),h=n??d,f={getGui:()=>a,getLocation:()=>u,getTooltipValue:()=>{var g;return n??((g=l==null?void 0:l.headerTooltipValueGetter)==null?void 0:g.call(l,Ot(s,{location:u,colDef:l,column:i,value:h,valueFormatted:d})))??(l==null?void 0:l.headerTooltip)},shouldDisplayTooltip:o,getAdditionalParams:()=>{const g={column:i};return l&&(g.colDef=l),g}},p=this.createTooltipFeature(f);return p&&t.createBean(p)}enableCellTooltipFeature(e,t,n){const{beans:o}=this,{gos:s,editSvc:r}=o,{column:i,rowNode:a}=e;let l="cell";const u=()=>{const f=!!!(r!=null&&r.isEditing(e))&&uT(o,e,this.getLocaleTextFunc());if(f)return l="cellEditor",f;l="cell";const p=i.getColDef(),g=a.data;if(p.tooltipField&&ft(g))return ng(g,p.tooltipField,i.isTooltipFieldContainsDots());const v=p.tooltipValueGetter;return v?v(Ot(s,{location:"cell",colDef:i.getColDef(),column:i,rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,value:e.value,valueFormatted:e.valueFormatted})):null},c=JR(s);n||(c&&!e.isCellRenderer()?n=()=>{const h=!!(r!=null&&r.isEditing(e));if(!h&&uT(o,e,this.getLocaleTextFunc()))return!0;if(!i.isTooltipEnabled())return!1;const g=Hy(()=>{const v=e.eGui;return v.children.length===0?v:v.querySelector(".ag-cell-value")});return!h&&g()}:n=()=>!(r!=null&&r.isEditing(e)));const d={getGui:()=>e.eGui,getLocation:()=>l,getTooltipValue:t!=null?()=>t:u,shouldDisplayTooltip:n,getAdditionalParams:()=>({column:i,colDef:i.getColDef(),rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(d,o)}setupFullWidthRowTooltip(e,t,n,o){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>n,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:o},r=this.beans,i=r.context;e&&t.destroyBean(e,i);const a=this.createTooltipFeature(s,r);if(a)return t.createBean(a,i)}setupCellEditorTooltip(e,t){var a,l;const{beans:n}=this,{context:o}=n,s=((a=t.getValidationElement)==null?void 0:a.call(t,!0))||!((l=t.isPopup)!=null&&l.call(t))&&e.eGui;if(!s)return;const r={getGui:()=>s,getTooltipValue:()=>uT(n,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{var p,g;const{editModelSvc:u}=n,c=(p=u==null?void 0:u.getRowValidationModel())==null?void 0:p.getRowValidationMap(),d=(g=u==null?void 0:u.getCellValidationModel())==null?void 0:g.getCellValidationMap(),h=!!c&&c.size>0,f=!!d&&d.size>0;return h||f}},i=this.createTooltipFeature(r,n);if(i)return e.createBean(i,o)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=ft(t.tooltipField)||ft(t.tooltipValueGetter)||ft(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},uEe=class extends Ffe{createTooltipComp(e,t){const n=Rhe(this.beans.userCompFactory,e);n==null||n.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){var e;(e=this.onColumnMovedEventCallback)==null||e.call(this),this.onColumnMovedEventCallback=void 0}},iG={moduleName:"Tooltip",version:ct,beans:[lEe],dynamicBeans:{tooltipFeature:j2,highlightTooltipFeature:Ofe,tooltipStateManager:uEe},userComponents:{agTooltipComponent:Lfe},dependsOn:[Ow],css:[aEe]},lh=class{constructor(e){this.cellValueChanges=e}},cT=class extends lh{constructor(e,t,n,o){super(e),this.initialRange=t,this.finalRange=n,this.ranges=o}},cEe=10,aG=class{constructor(e){this.actionStack=[],this.maxStackSize=e||cEe,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},dEe=class extends qe{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},n=this.activeCellEdit!==null&&U$(this.activeCellEdit,t),o=this.activeRowEdit!==null&&Ome(this.activeRowEdit,t);if(!(n||o||this.isPasting||this.isRangeInAction))return;const{rowPinned:r,rowIndex:i,column:a,oldValue:l,value:u}=e,c={rowPinned:r,rowIndex:i,columnId:a.getColId(),newValue:u,oldValue:l};this.cellValueChanges.push(c)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const n=e.get("undoRedoCellEditingLimit");if(n<=0)return;this.undoStack=new aG(n),this.redoStack=new aG(n),this.addListeners();const o=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:s=>{s.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:o,newColumnsLoaded:o,columnGroupOpened:o,columnRowGroupChanged:o,columnMoved:o,columnPinned:o,columnVisible:o,rowDragEnd:o}),t.whenReady(this,s=>{this.gridBodyCtrl=s.gridBodyCtrl})}getCurrentUndoStackSize(){var e;return((e=this.undoStack)==null?void 0:e.getCurrentStackSize())??0}getCurrentRedoStackSize(){var e;return((e=this.redoStack)==null?void 0:e.getCurrentStackSize())??0}undo(e){const{eventSvc:t,undoStack:n,redoStack:o}=this;t.dispatchEvent({type:"undoStarted",source:e});const s=this.undoRedo(n,o,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:s})}redo(e){const{eventSvc:t,undoStack:n,redoStack:o}=this;t.dispatchEvent({type:"redoStarted",source:e});const s=this.undoRedo(o,n,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:s})}undoRedo(e,t,n,o,s){if(!e)return!1;const r=e.pop();return r!=null&&r.cellValueChanges?(this.processAction(r,i=>i[o],s),r instanceof cT?this.processRange(r.ranges||[r[n]]):this.processCell(r.cellValueChanges),t.push(r),!0):!1}processAction(e,t,n){for(const o of e.cellValueChanges){const{rowIndex:s,rowPinned:r,columnId:i}=o,a={rowIndex:s,rowPinned:r},l=Va(this.beans,a);l.displayed&&l.setDataValue(i,t(o),n)}}processRange(e){let t;const n=this.beans.rangeSvc;n.removeAllCellRanges(!0),e.forEach((o,s)=>{if(!o)return;const r=o.startRow,i=o.endRow;s===e.length-1&&(t={rowPinned:r.rowPinned,rowIndex:r.rowIndex,columnId:o.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:i.rowIndex,rowEndPinned:i.rowPinned,columnStart:o.startColumn,columns:o.columns};n.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:n,rowPinned:o}=t,s={rowIndex:n,rowPinned:o},r=Va(this.beans,s),i={rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId};this.setLastFocusedCell(i)}setLastFocusedCell(e){const{rowIndex:t,columnId:n,rowPinned:o}=e,{colModel:s,focusSvc:r,rangeSvc:i}=this.beans,a=s.getCol(n);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const u={rowIndex:t,column:a,rowPinned:o};r.setFocusedCell({...u,forceBrowserFocus:!0}),i==null||i.setRangeToCell(u)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new lh(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const n=new lh(this.cellValueChanges);this.pushActionsToUndoStack(n)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new lh(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new cT(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:n}=this.beans;t&&Aa(n)?e=new cT(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new lh(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),(t==null?void 0:t.length)===0))return;const n=new lh(t??[]);this.pushActionsToUndoStack(n),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},hEe=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}",fEe={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},pEe=class extends Ew{constructor(){super(fEe,[Y_]),this.eEditor=dt}initialiseEditor(e){const t=e.value??void 0,n=this.eEditor;n.setValue(t),n.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(n,{fieldValueChanged:s=>this.setAriaLabel(s.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),n=Ly(t,e),o=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${o} (${n})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,n=this.getValue();return t?t({value:n,internalErrors:null,cellEditorParams:e}):null}},Lw=class extends Ew{constructor(e){super(),this.cellEditorInput=e,this.eEditor=dt}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:n}=this,{cellStartedEdit:o,eventKey:s,suppressPreventDefault:r}=e;n.getInputElement().setAttribute("title",""),t.init(n,e);let i,a=!0;o?(this.focusAfterAttached=!0,s===Ve.BACKSPACE||s===Ve.DELETE?i="":s&&s.length===1?r?a=!1:i=s:(i=t.getStartValue(),s!==Ve.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,i=t.getStartValue()),a&&i!=null&&n.setStartValue(i),this.addGuiEventListener("keydown",l=>{const{key:u}=l;(u===Ve.PAGE_UP||u===Ve.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){var o,s;const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;Ol()||t.getFocusableElement().focus();const n=t.getInputElement();this.highlightAllOnFocus?n.select():(s=(o=this.cellEditorInput).setCaret)==null||s.call(o)}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),n=e.getInputElement();t.focus(),n.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},gEe={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},mEe=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return gEe}getAgComponents(){return[O2]}init(e,t){var i,a;this.eEditor=e,this.params=t;const{min:n,max:o,step:s,colDef:r}=t;n!=null&&e.setMin(n),o!=null&&e.setMax(o),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((a=(i=this.getDataTypeService())==null?void 0:i.getDateIncludesTimeFlag)==null?void 0:a.call(i,r.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:n}=this,{min:o,max:s,getValidationErrors:r}=n;let i=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(o){const l=o instanceof Date?o:new Date(o);if(t<l){const u=l.toLocaleDateString();i.push(a("minDateValidation",`Date must be after ${u}`,[u]))}}if(s){const l=s instanceof Date?s:new Date(s);if(t>l){const u=l.toLocaleDateString();i.push(a("maxDateValidation",`Date must be before ${u}`,[u]))}}}return i.length||(i=null),r?r({value:t,cellEditorParams:n,internalErrors:i}):i}getValue(){const{eEditor:e,params:t}=this,n=e.getDate();return!ft(n)&&!ft(t.value)?t.value:n??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return er(e,this.includeTime??!1)}},vEe=class extends Lw{constructor(){super(new mEe(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},yEe={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},wEe=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return yEe}getAgComponents(){return[O2]}init(e,t){var i,a;this.eEditor=e,this.params=t;const{min:n,max:o,step:s,colDef:r}=t;n!=null&&e.setMin(n),o!=null&&e.setMax(o),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((a=(i=this.getDataTypeService())==null?void 0:i.getDateIncludesTimeFlag)==null?void 0:a.call(i,r.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,n=e.getInputElement().value,o=this.formatDate(this.parseDate(n??void 0)),{min:s,max:r,getValidationErrors:i}=t;let a=[];if(o){const l=new Date(o),u=this.getLocaleTextFunc();if(s){const c=new Date(s);if(l<c){const d=c.toLocaleDateString();a.push(u("minDateValidation",`Date must be after ${d}`,[d]))}}if(r){const c=new Date(r);if(l>c){const d=c.toLocaleDateString();a.push(u("maxDateValidation",`Date must be before ${d}`,[d]))}}}return a.length||(a=null),i?i({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,n=this.formatDate(t.getDate());return!ft(n)&&!ft(e.value)?e.value:e.parseValue(n??"")}getStartValue(){return er(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):As(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):er(e??null,this.includeTime??!1)??void 0}},CEe=class extends Lw{constructor(){super(new wEe(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},bEe={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},SEe=class extends Ew{constructor(){super(bEe,[Uhe]),this.eEditor=dt}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:n,eventKey:o,maxLength:s,cols:r,rows:i}=e;this.focusAfterAttached=n,t.getInputElement().setAttribute("title",""),t.setMaxLength(s||200).setCols(r||60).setRows(i||10);let a;n?(this.focusAfterAttached=!0,o===Ve.BACKSPACE||o===Ve.DELETE?a="":o&&o.length===1?a=o:(a=this.getStartValue(e),o!==Ve.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return(t==null?void 0:t.toString())??t}onKeyDown(e){const t=e.key;(t===Ve.LEFT||t===Ve.UP||t===Ve.RIGHT||t===Ve.DOWN||e.shiftKey&&t===Ve.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:n}=this,o=this.getLocaleTextFunc();e.setInputAriaLabel(o("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),n&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:n}=t,o=e.getValue();return!ft(o)&&!ft(n)?n:t.parseValue(o)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:n}=e,o=this.getLocaleTextFunc(),s=this.getValue();let r=[];return typeof s=="string"&&t!=null&&s.length>t&&r.push(o("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),r.length||(r=null),n?n({value:s,internalErrors:r,cellEditorParams:e}):r}},EEe={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},_Ee=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return EEe}getAgComponents(){return[Whe]}init(e,t){this.eEditor=e,this.params=t;const{max:n,min:o,precision:s,step:r}=t;n!=null&&e.setMax(n),o!=null&&e.setMin(o),s!=null&&e.setPrecision(s),r!=null&&e.setStep(r);const i=e.getInputElement();t.preventStepping?e.addManagedElementListeners(i,{keydown:this.preventStepping}):t.showStepperButtons&&i.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:n,getValidationErrors:o}=e,r=this.eEditor.getInputElement().valueAsNumber,i=this.getLocaleTextFunc();let a=[];return typeof r=="number"&&(t!=null&&r<t&&a.push(i("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),n!=null&&r>n&&a.push(i("maxValueValidation",`Must be less than or equal to ${n}.`,[String(n)]))),a.length||(a=null),o?o({value:r,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===Ve.UP||e.key===Ve.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();if(!ft(n)&&!ft(t.value))return t.value;let o=t.parseValue(n);if(o==null)return o;if(typeof o=="string"){if(o==="")return null;o=Number(o)}return isNaN(o)?null:o}getStartValue(){return this.params.value}setCaret(){Ol()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},REe=class extends Lw{constructor(){super(new _Ee(()=>this.getLocaleTextFunc()))}},TEe={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},DEe=class extends Ew{constructor(){super(TEe,[tfe]),this.eEditor=dt,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:n,gos:o}=this,{values:s,value:r,eventKey:i}=e;if(Gn(s)){Je(58);return}this.startedByEnter=i!=null?i===Ve.ENTER:!1;let a=!1;s.forEach(d=>{const h={value:d},f=n.formatValue(e.column,null,d),p=f!=null;h.text=p?f:d,t.addOption(h),a=a||r===d}),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:u,valueListMaxHeight:c}=e;l!=null&&t.setPickerGap(l),c!=null&&t.setPickerMaxHeight(c),u!=null&&t.setPickerMaxWidth(u),o.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:n}=e,o=this.getValue();let s=[];if(t&&!t.includes(o)){const r=this.getLocaleTextFunc();s.push(r("invalidSelectionValidation","Invalid selection."))}else s=null;return n?n({value:o,internalErrors:s,cellEditorParams:e}):s}},IEe={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},xEe=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return IEe}getAgComponents(){return[aw]}init(e,t){this.eEditor=e,this.params=t;const n=t.maxLength;n!=null&&e.setMaxLength(n)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:n}=e,o=this.getValue(),s=this.getLocaleTextFunc();let r=[];return t!=null&&typeof o=="string"&&o.length>t&&r.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),r.length||(r=null),n?n({value:o,cellEditorParams:e,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();return!ft(n)&&!ft(t.value)?t.value:t.parseValue(n)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){Ol()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),n=ft(t)&&t.length||0;n&&e.getInputElement().setSelectionRange(n,n)}},lG=class extends Lw{constructor(){super(new xEe(()=>this.getLocaleTextFunc()))}};function AEe(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function PEe(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function uG(e,t,n="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,n),"ensureVisible")}function cG(e,t,n){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,n),"ensureVisible")}function kEe(e,t,n=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,n),"ensureVisible")}function FEe(e){var t;(t=e.undoRedo)==null||t.undo("api")}function OEe(e){var t;(t=e.undoRedo)==null||t.redo("api")}function MEe(e,t){var n;return(n=e.editModelSvc)==null?void 0:n.getEditRowDataValue(t,{checkSiblings:!0})}function NEe(e){var o;const t=(o=e.editModelSvc)==null?void 0:o.getEditMap(),n=[];return t==null||t.forEach((s,r)=>{const{rowIndex:i,rowPinned:a}=r;s.forEach((l,u)=>{const{editorValue:c,pendingValue:d,sourceValue:h,state:f}=l,p=Ba(l);let g=c??d;g===Or&&(g=void 0);const v={newValue:g,oldValue:h,state:f,column:u,colId:u.getColId(),colKey:u.getColId(),rowIndex:i,rowPinned:a};(f==="editing"||f==="changed"&&p)&&n.push(v)})}),n}function LEe(e,t=!1){var o;const{editSvc:n}=e;if(n!=null&&n.isBatchEditing()){if(t)for(const s of((o=e.editModelSvc)==null?void 0:o.getEditPositions())??[])s.state==="editing"&&n.revertSingleCellEdit(s);else ic(e,{persist:!0});rh(e,void 0,{cancel:t})}else n==null||n.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function VEe(e,t){var o;const n=qn(e,t);return((o=e.editSvc)==null?void 0:o.isEditing(n))??!1}function BEe(e,t){const{key:n,colKey:o,rowIndex:s,rowPinned:r}=t,{editSvc:i,colModel:a}=e,l=a.getCol(o);if(!l){Je(12,{colKey:o});return}const c=Va(e,{rowIndex:s,rowPinned:r||null});if(!c){Je(290,{rowIndex:s,rowPinned:r});return}if(!l.isCellEditable(c))return;r==null&&cG(e,s),uG(e,o),i==null||i.startEditing({rowNode:c,column:l},{event:n?new KeyboardEvent("keydown",{key:n}):void 0,source:"api"})}function $Ee(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}function HEe(e){var t;return((t=e.undoRedo)==null?void 0:t.getCurrentUndoStackSize())??0}function GEe(e){var t;return((t=e.undoRedo)==null?void 0:t.getCurrentRedoStackSize())??0}var UEe={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},WEe=class extends F_{constructor(e){super(UEe),this.params=e}postConstruct(){Yu(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,n=o=>{pR(this.gos,o,t.node,t.column,!0)||t.onKeyDown(o)};this.addManagedElementListeners(e,{keydown:n})}};function zEe(e,{column:t},n,o,s="ui"){var u;if(n instanceof KeyboardEvent&&(n.key===Ve.TAB||n.key===Ve.ENTER||n.key===Ve.F2||n.key===Ve.BACKSPACE&&o))return!0;if((n==null?void 0:n.shiftKey)&&((u=e.rangeSvc)==null?void 0:u.getCellRanges().length)!=0)return!1;const i=t==null?void 0:t.getColDef(),a=jEe(e.gos,i),l=n==null?void 0:n.type;return l==="click"&&(n==null?void 0:n.detail)===1&&a===1||l==="dblclick"&&(n==null?void 0:n.detail)===2&&a===2?!0:s==="api"?o??!1:!1}function jEe(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t!=null&&t.singleClickEdit?1:2}function dT(e,{rowNode:t,column:n},o="ui"){const s=n.getColDef().editable,r=e.editModelSvc;return n.isColumnFunc(t,s)||!!r&&r.hasEdits({rowNode:t,column:n},{withOpenEditor:!0})}function KEe(e,t,n="ui"){const o=dT(e,t,n);return o===!0||n==="ui"?o:e.colModel.getCols().some(r=>dT(e,{rowNode:t.rowNode,column:r},n))}var Vw=(e,t=!1)=>{if(e!==void 0)return Ba(e)||t&&e.state==="editing"};function dG(e,t,n=!1){var o;return Vw((o=e.editModelSvc)==null?void 0:o.getEdit(t),n)}var hG=(e,t,n)=>{if(e)for(let o=0,s=e.length;o<s;++o){const r=e[o];if(r.data&&(Vw(t==null?void 0:t.getEdit({rowNode:r,column:n}))||Vw(t==null?void 0:t.getEdit({rowNode:r.pinnedSibling,column:n})))||hG(r.childrenAfterGroup,t,n))return!0}};function fG(e,t){const{column:n,rowNode:o}=t;return e.gos.get("groupTotalRow")&&!(o!=null&&o.footer)?!1:hG(o==null?void 0:o.childrenAfterGroup,e.editModelSvc,n)}function pG(e,{rowNode:t,column:n}){var o;if(t=t.pinnedSibling,!!t)return Vw((o=e.editModelSvc)==null?void 0:o.getEdit({rowNode:t,column:n}))}var qEe=class extends qe{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){var s;const{cellCtrl:e,editSvc:t,beans:n}=this;if(t!=null&&t.isBatchEditing()&&t.isEditing()){const r=dG(n,e)||fG(n,e)||pG(n,e);this.applyBatchingStyle(r)}else this.applyBatchingStyle(!1);const o=!!((s=this.editModelSvc)!=null&&s.getCellValidationModel().hasCellValidation(this.cellCtrl));this.cellComp.toggleCss("ag-cell-editing-error",o)}applyBatchingStyle(e){var t;this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&((t=this.editSvc)==null?void 0:t.isBatchEditing()))??!1)}},YEe=class extends qe{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){var i;const{rowCtrl:e,editModelSvc:t,beans:n}=this;let o=e.rowNode,s=t==null?void 0:t.getEditRow(o);const r=(i=this.editModelSvc)==null?void 0:i.getRowValidationModel().hasRowValidation({rowNode:o});if(!s&&o.pinnedSibling&&(o=o.pinnedSibling,s=t==null?void 0:t.getEditRow(o)),s){const a=Array.from(s.keys()).some(l=>{const u={rowNode:o,column:l};return dG(n,u,!0)||fG(n,u)||pG(n,u)});this.applyStyle(r,a);return}this.applyStyle(r)}applyStyle(e=!1,t=!1){var s,r;const n=((s=this.editSvc)==null?void 0:s.isBatchEditing())??!1,o=this.gos.get("editType")==="fullRow";(r=this.rowCtrl)==null||r.forEachGui(void 0,({rowComp:i})=>{i.toggleCss("ag-row-editing",o&&t),i.toggleCss("ag-row-batch-edit",o&&t&&n),i.toggleCss("ag-row-inline-editing",t),i.toggleCss("ag-row-not-inline-editing",!t),i.toggleCss("ag-row-editing-invalid",o&&t&&e)})}},XEe=({rowModel:e,pinnedRowModel:t,editModelSvc:n},o)=>{const s=new Set;e.forEachNode(r=>o.has(r)&&s.add(r)),t==null||t.forEachPinnedRow("top",r=>o.has(r)&&s.add(r)),t==null||t.forEachPinnedRow("bottom",r=>o.has(r)&&s.add(r));for(const r of o)s.has(r)||n.removeEdits({rowNode:r});return s},ZEe=({editModelSvc:e},t,n)=>{var o;for(const s of t)(o=e==null?void 0:e.getEditRow(s))==null||o.forEach((r,i)=>!n.has(i)&&e.removeEdits({rowNode:s,column:i}))},JEe=e=>()=>{const t=new Set(e.colModel.getCols()),n=e.editModelSvc.getEditMap(!0),o=new Set(n.keys());ZEe(e,XEe(e,o),t)},QEe=new Set(["undo","redo","paste","bulk","rangeSvc"]),e0e=new Set(["ui","api"]),gG={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},t0e=new Set(Object.keys(gG)),n0e=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),Bw={cancel:!0,source:"api"},o0e={cancel:!1,source:"api"},uh={checkSiblings:!0},lg={force:!0,suppressFlash:!0},s0e=class extends qe{constructor(){super(...arguments),this.beanName="editSvc",this.batch=!1,this.stopping=!1,this.committing=!1}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:o})=>{this.stopEditing(void 0,Bw),this.createStrategy(o)});const t=JEe(e),n=()=>{const o=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return o||s?this.stopEditing(void 0,Bw):this.isEditing()&&(this.isBatchEditing()?rh(e,this.model.getEditPositions()):this.stopEditing(void 0,o0e)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:n,filterChanged:n,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}setBatchEditing(e){e?(this.batch=!0,this.stopEditing(void 0,Bw)):(this.stopEditing(void 0,Bw),this.batch=!1)}createStrategy(e){const{beans:t,gos:n,strategy:o}=this,s=mG(n,e);if(o){if(o.beanName===s)return o;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(s,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,n,o="ui"){const s=zEe(this.beans,e,t,n,o);return s&&(this.strategy??(this.strategy=this.createStrategy())),s}shouldStopEditing(e,t,n="ui"){var o;return((o=this.strategy)==null?void 0:o.shouldStop(e,t,n))??null}shouldCancelEditing(e,t,n="ui"){var o;return((o=this.strategy)==null?void 0:o.shouldCancel(e,t,n))??null}validateEdit(){return wCe(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??uh)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){const{startedEdit:n=!0,event:o=null,source:s="ui",ignoreEventKey:r=!1,silent:i}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const a=qn(this.beans,e);if(a&&!a.comp){a.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const l=this.shouldStartEditing(e,o,n,s);if(l===!1&&s!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,s)&&!t.continueEditing&&this.stopEditing(void 0,{source:s}),l&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start({position:e,event:o,source:s,ignoreEventKey:r,startedEdit:n,silent:i})}stopEditing(e,t){var v,w,S;const{event:n,cancel:o,source:s="ui",forceCancel:r,forceStop:i}=t||{},{beans:a,model:l}=this;if(t0e.has(s)&&this.isBatchEditing())return this.bulkRefresh(e),!1;const u=this.committing?gG[s]:s;if(!(this.committing||this.isEditing(e)||this.isBatchEditing()&&l.hasEdits(e,uh))||!this.strategy||this.stopping)return!1;this.stopping=!0;const d=qn(a,e);d&&(d.onEditorAttachedFuncs=[]);let h=l.getEditMap(!0),f=!1;const p=!o&&(!!this.shouldStopEditing(e,n,u)||this.committing&&!this.batch)||(i??!1),g=o&&!!this.shouldCancelEditing(e,n,u)||(r??!1);if(p||g){ic(a,{persist:!0,isCancelling:g||o,isStopping:p});const b=l.getEditMap(),y=this.processEdits(b,o,s);(v=this.strategy)==null||v.stop(o,n);for(const E of y)l.clearEditValue(E);this.bulkRefresh(void 0,h);for(const E of l.getEditPositions(b)){const _=qn(a,E),I=Ba(E);_==null||_.refreshCell({force:!0,suppressFlash:!I})}h=b,f||(f=p)}else if(n instanceof KeyboardEvent&&this.batch&&((w=this.strategy)!=null&&w.midBatchInputsAllowed(e))&&this.isEditing(e,{withOpenEditor:!0})){const{key:b}=n,y=b===Ve.ENTER,E=b===Ve.ESCAPE,_=b===Ve.TAB;(y||_||E)&&(y||_?ic(a,{persist:!0}):E&&this.revertSingleCellEdit(d),this.isBatchEditing()?(S=this.strategy)==null||S.cleanupEditors():rh(a,l.getEditPositions(),{event:n,cancel:E}),n.preventDefault(),this.bulkRefresh(e,h,{suppressFlash:!0}),h=l.getEditMap())}else ic(a,{persist:!0}),h=l.getEditMap();return f&&e&&this.model.removeEdits(e),this.navigateAfterEdit(t,d==null?void 0:d.cellPosition),WR(a),this.model.hasEdits()||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()),this.bulkRefresh(),g&&this.beans.rowRenderer.refreshRows({rowNodes:Array.from(h.keys())}),this.isBatchEditing()&&(this.beans.rowRenderer.refreshRows({suppressFlash:!0,force:!0}),f&&p&&this.dispatchBatchEvent("batchEditingStopped",h)),this.stopping=!1,f}navigateAfterEdit(e,t){var u;if(!e||!t)return;const{event:n,suppressNavigateAfterEdit:o}=e;if(!(n instanceof KeyboardEvent)||o)return;const{key:r,shiftKey:i}=n,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if(r!==Ve.ENTER||!a)return;const l=i?Ve.UP:Ve.DOWN;(u=this.beans.navigation)==null||u.navigateToNextCell(null,l,t,!1)}processEdits(e,t=!1,n){const o=Array.from(e.keys()),s=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,r=[];for(const i of o){const a=e.get(i);for(const l of a.keys()){const u=a.get(l),c={rowNode:i,column:l},d=Ba(u);!t&&d&&!s&&(this.setNodeDataValue(i,l,u.pendingValue,void 0,n)||r.push(c))}}return r}setNodeDataValue(e,t,n,o,s="edit"){const{beans:r}=this,i=qn(r,{rowNode:e,column:t}),a=e0e.has(s)?"edit":s;i&&(i.suppressRefreshCell=!0),this.commitNextEdit();const l=e.setDataValue(t,n,a);return i&&(i.suppressRefreshCell=!1),o&&(i==null||i.refreshCell(lg)),l}setEditMap(e,t){var o;this.strategy??(this.strategy=this.createStrategy()),(o=this.strategy)==null||o.setEditMap(e,t),this.bulkRefresh();let n=lg;t!=null&&t.forceRefreshOfEditCellsOnly&&(n={...r0e(e),...lg}),this.beans.rowRenderer.refreshCells(n)}dispatchEditValuesChanged({rowNode:e,column:t},n={}){if(!e||!t||!n)return;const{pendingValue:o,sourceValue:s}=n,{rowIndex:r,rowPinned:i,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:r,rowPinned:i,column:t,source:"api",data:a,newValue:o,oldValue:s,value:o,colDef:t.getColDef()})}bulkRefresh(e={},t,n={}){var a;const{beans:o,gos:s}=this,{editModelSvc:r,rowModel:i}=o;io(s)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),n):t&&((a=r==null?void 0:r.getEditMap(!1))==null||a.forEach((l,u)=>{for(const c of l.keys())this.refCell({rowNode:u,column:c},l.get(c),n)})))}refCell({rowNode:e,column:t},n,o={}){var d,h,f;const{beans:s,gos:r}=this,i=new Set([e]),a=new Set,l=e.pinnedSibling;l&&i.add(l);const u=e.sibling;u&&a.add(u);let c=e.parent;for(;c;)(d=c.sibling)!=null&&d.footer&&r.get("groupTotalRow")||!c.parent&&c.sibling&&r.get("grandTotalRow")?a.add(c.sibling):a.add(c),c=c.parent;for(const p of i)this.dispatchEditValuesChanged({rowNode:p,column:t},n);for(const p of i)(h=qn(s,{rowNode:p,column:t}))==null||h.refreshCell(o);for(const p of a)(f=qn(s,{rowNode:p,column:t}))==null||f.refreshCell(o)}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{rowNode:n}=e,{gos:o,beans:s}=this;if(n.group){if(o.get("treeData")){if(!n.data&&!o.get("enableGroupEdit"))return!1}else if(!o.get("enableGroupEdit"))return!1}const r=mG(o)==="fullRow"?KEe(s,e,t):dT(s,e,t);return r&&(this.strategy??(this.strategy=this.createStrategy())),r}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,n=!0){var o,s,r,i;if(this.hasValidationErrors(e)){const a=qn(this.beans,e);return this.cellEditingInvalidCommitBlocks()?((o=t==null?void 0:t.preventDefault)==null||o.call(t),n&&(!(a!=null&&a.hasBrowserFocus())&&(a==null||a.focusCell()),(i=(r=(s=a==null?void 0:a.comp)==null?void 0:s.getCellEditor())==null?void 0:r.focusIn)==null||i.call(r)),"block-stop"):(a&&this.revertSingleCellEdit(a),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){var o,s,r,i;const n=qn(this.beans,e);(o=n==null?void 0:n.comp)!=null&&o.getCellEditor()&&(rh(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),sh(this.beans,e,{silent:!0}),ac(this.beans),n==null||n.refreshCell(lg),t&&(n==null||n.focusCell(),(i=(r=(s=n==null?void 0:n.comp)==null?void 0:s.getCellEditor())==null?void 0:r.focusIn)==null||i.call(r)))}hasValidationErrors(e){var o;ac(this.beans);const t=qn(this.beans,e);t&&(t.refreshCell(lg),(o=t.rowCtrl.rowEditStyleFeature)==null||o.applyRowStyles());let n=!1;return e!=null&&e.rowNode?(n||(n=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(n||(n=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(n||(n=this.model.getCellValidationModel().getCellValidationMap().size>0),n||(n=this.model.getRowValidationModel().getRowValidationMap().size>0)),n}moveToNextCell(e,t,n,o="ui"){var a;let s;const r=this.isEditing(),i=r&&this.checkNavWithValidation(void 0,n)==="block-stop";return e instanceof ih&&r&&(s=(a=this.strategy)==null?void 0:a.moveToNextEditingCell(e,t,n,o,i)),s===null||(s=s||!!this.beans.focusSvc.focusedHeader,s===!1&&!i&&this.stopEditing()),s}getCellDataValue({rowNode:e,column:t},n=!0){if(!e||!t)return;let o=this.model.getEdit({rowNode:e,column:t});const s=e.pinnedSibling;if(s){const i=this.model.getEdit({rowNode:s,column:t});i&&(o=i)}const r=n?(o==null?void 0:o.editorValue)??(o==null?void 0:o.pendingValue):o==null?void 0:o.pendingValue;return r===Or||!o?(o==null?void 0:o.sourceValue)??this.valueSvc.getValue(t,e,!1,"api"):r}addStopEditingWhenGridLosesFocus(e){fCe(this,this.beans,e)}createPopupEditorWrapper(e){return new WEe(e)}commitNextEdit(){this.committing=!0}setDataValue(e,t,n){var o;try{if((!this.isEditing()||this.committing)&&!n0e.has(n))return;const{beans:s}=this;this.strategy??(this.strategy=this.createStrategy());const r=this.isBatchEditing()?"ui":this.committing?n??"api":"api";if(!n||QEe.has(n))return Aw(s,e,t,n,void 0,{persist:!0}),this.setNodeDataValue(e.rowNode,e.column,t,!0,n);const i=this.model.getEdit(e);if(i){if(i.pendingValue===t)return!1;if(i.sourceValue!==t)return Aw(s,e,t,n,void 0,{persist:!0}),this.stopEditing(e,{source:r,suppressNavigateAfterEdit:!0}),!0;if(i.sourceValue===t)return(o=s.editModelSvc)==null||o.removeEdits(e),this.dispatchEditValuesChanged(e,{...i,pendingValue:t}),!0}return Aw(s,e,t,n,void 0,{persist:!0}),this.stopEditing(e,{source:r,suppressNavigateAfterEdit:!0}),!0}finally{this.committing=!1}}handleColDefChanged(e){mCe(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,uh))return;const{rowNode:o,column:s}=e,{compDetails:r,valueToDisplay:i}=t;if(r){const{params:l}=r;return l.data=this.model.getEditRowDataValue(o,uh),{compDetails:r}}const a=this.model.getEditRow(e.rowNode,uh);if(i!==void 0&&(a!=null&&a.has(s)))return{valueToDisplay:this.valueSvc.getValue(s,o)}}cleanupEditors(){var e;(e=this.strategy)==null||e.cleanupEditors()}dispatchCellEvent(e,t,n,o){var s;(s=this.strategy)==null||s.dispatchCellEvent(e,t,n,o)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return Ot(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},n){var u,c;if(!n||n.length===0)return;const{beans:o,rangeSvc:s,valueSvc:r}=this;ic(o,{persist:!0});const i=this.model.getEditMap(!0),a=(c=(u=i.get(e))==null?void 0:u.get(t))==null?void 0:c.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),n.forEach(d=>{if(s==null||s.forEachRowInRange(d,h=>{const f=Va(o,h);if(f===void 0)return;const p=i.get(f)??new Map;for(const g of d.columns)if(g&&this.isCellEditable({rowNode:f,column:g},"api")){const v=r.getValue(g,f,!0,"api");let w=r.parseValue(g,f??null,a,v);Number.isNaN(w)&&(w=null),p.set(g,{editorValue:void 0,pendingValue:w,sourceValue:v,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}p.size>0&&i.set(f,p)}),this.setEditMap(i),this.batch){this.cleanupEditors(),WR(o),this.bulkRefresh();return}this.commitNextEdit(),this.stopEditing(void 0,{source:"bulk"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(i)})}),this.bulkRefresh();const l=qn(o,{rowNode:e,column:t});l&&l.focusCell(!0)}createCellStyleFeature(e,t){return new qEe(e,t)}createRowStyleFeature(e,t){return new YEe(e,t)}setEditingCells(e,t){const{beans:n}=this,{colModel:o,valueSvc:s}=n,r=new Map;for(let{colId:i,column:a,colKey:l,rowIndex:u,rowPinned:c,newValue:d,state:h}of e){const f=i?o.getCol(i):l?o.getCol(l):a;if(!f)continue;const p=Va(n,{rowIndex:u,rowPinned:c});if(!p)continue;const g=s.getValue(f,p,!0,"api");if(!(t!=null&&t.forceRefreshOfEditCellsOnly)&&!Ba({pendingValue:d,sourceValue:g})&&h!=="editing")continue;let v=r.get(p);v||(v=new Map,r.set(p,v)),d===void 0&&(d=Or),v.set(f,{editorValue:void 0,pendingValue:d,sourceValue:g,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(r,t)}onCellFocused(e){var r;const t=qn(this.beans,e);if(!t||!this.isEditing(t,uh))return;const n=this.model.getEdit(t);if(!n||!Ba(n))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");(r=this.beans.ariaAnnounce)==null||r.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return qn(this.beans,e)}};function r0e(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(t=>Array.from(t.keys())))]:void 0}}function mG(e,t){return t??e.get("editType")??"singleCell"}var vG=class extends qe{postConstruct(){var e,t;this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:(e=this.onCellFocusChanged)==null?void 0:e.bind(this),cellFocusCleared:(t=this.onCellFocusChanged)==null?void 0:t.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const n=e.previousParams,{editSvc:o,beans:s}=this,r=e.type==="cellFocused"?e.sourceEvent:null;n&&(t=qn(s,n));const{gos:i,editModelSvc:a}=s,l=e.type==="cellFocusCleared";if(o.isEditing(void 0,{withOpenEditor:!0})){const{column:u,rowIndex:c,rowPinned:d}=e,h={column:u,rowNode:Va(s,{rowIndex:c,rowPinned:d})},f=i.get("invalidEditValueMode")==="block";if(f)return;const p=!f,g=!!(a!=null&&a.getCellValidationModel().hasCellValidation(h)),v=p&&g;(n||l?o.stopEditing(void 0,{cancel:v,source:l&&p?"api":void 0,event:r}):!0)||(o.isBatchEditing()?o.cleanupEditors():o.stopEditing(void 0,{source:"api"}))}t==null||t.refreshCell({suppressFlash:!0,force:!0})}stop(e,t){var s,r;const n=this.model.getEditPositions(),o={all:[],pass:[],fail:[]};for(const i of n){o.all.push(i);const a=this.model.getCellValidationModel().getCellValidation(i);if((((s=a==null?void 0:a.errorMessages)==null?void 0:s.length)??0)>0){o.fail.push(i);continue}o.pass.push(i)}if(e)for(const i of n)Pw(this.beans,i,{cancel:e}),this.model.stop(i);else{const i=this.processValidationResults(o);if(i.destroy.length>0)for(const a of i.destroy)Pw(this.beans,a,{event:t,cancel:e}),this.model.stop(a);if(i.keep.length>0)for(const a of i.keep){const l=qn(this.beans,a);(r=this.editSvc)!=null&&r.cellEditingInvalidCommitBlocks()||l&&this.editSvc.revertSingleCellEdit(l)}}return!0}cleanupEditors({rowNode:e}={},t){ic(this.beans,{persist:!1});const n=this.model.getEditPositions(),o=[];if(e)for(const s of n)s.rowNode!==e&&o.push(s);else for(const s of n)o.push(s);rh(this.beans,o),WR(this.beans,t)}setFocusOutOnEditor(e){var t,n,o;(o=(n=(t=e.comp)==null?void 0:t.getCellEditor())==null?void 0:n.focusOut)==null||o.call(n)}setFocusInOnEditor(e){const t=e.comp,n=t==null?void 0:t.getCellEditor();if(n!=null&&n.focusIn)n.focusIn();else{const o=this.beans.gos.get("editType")==="fullRow";e.focusCell(o),e.onEditorAttachedFuncs.push(()=>{var s,r;return(r=(s=t==null?void 0:t.getCellEditor())==null?void 0:s.focusIn)==null?void 0:r.call(s)})}}setupEditors(e){const{event:t,ignoreEventKey:n=!1,startedEdit:o,position:s,cells:r=this.model.getEditPositions()}=e,i=t instanceof KeyboardEvent&&!n&&t.key||void 0;gCe(this.beans,r,s,i,t,o)}dispatchCellEvent(e,t,n,o){const s=qn(this.beans,e);s&&this.eventSvc.dispatchEvent({...s.createEvent(t??null,n),...o})}dispatchRowEvent(e,t,n){if(n)return;const o=GR(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStop(e,t,n="ui"){const o=this.editSvc.isBatchEditing();return o&&n==="api"?!0:o&&(n==="ui"||n==="edit")?!1:n==="api"?!0:t instanceof KeyboardEvent&&!o?t.key===Ve.ENTER:null}shouldCancel(e,t,n="ui"){const o=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!o&&t.key===Ve.ESCAPE||o&&n==="api"||n==="api")}setEditMap(e,t){var o;t!=null&&t.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const n=[];if(e.forEach((s,r)=>{s.forEach((i,a)=>{i.state==="editing"&&n.push({...i,rowNode:r,column:a})})}),t!=null&&t.update&&(e=new Map([...this.model.getEditMap(),...e])),(o=this.model)==null||o.setEditMap(e),n.length>0){const s=n.at(-1),r=s.pendingValue===Or?void 0:s.pendingValue;this.start({position:s,event:new KeyboardEvent("keydown",{key:r}),source:"api"});const i=qn(this.beans,s);i&&this.setFocusInOnEditor(i)}}destroy(){this.cleanupEditors(),super.destroy()}},i0e=class extends vG{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}shouldStop(e,t,n="ui"){const{rowNode:o}=e||{};if(!GR(this.beans,{rowNode:this.rowNode}))return!0;const r=super.shouldStop({rowNode:this.rowNode},t,n);return r!==null?r:this.rowNode?o!==this.rowNode:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:n,startedEdit:o,event:s,ignoreEventKey:r}=e,{rowNode:i}=t;this.rowNode!==i&&super.cleanupEditors(t);const a=this.beans.visibleCols.allCols,l=[],u=[];for(const c of a)c.isCellEditable(i)&&u.push(c);if(u.length!=0){this.dispatchRowEvent({rowNode:i},"rowEditingStarted",n),this.startedRows.push(i);for(const c of u){const d={rowNode:i,column:c};l.push(d),this.model.hasEdits(d)||this.model.start(d)}this.rowNode=i,this.setupEditors({cells:l,position:t,startedEdit:o,event:s,ignoreEventKey:r})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){var s;const{rowNode:n}=this;if(n&&!this.model.hasRowEdits(n))return!1;const o=[];if(e||this.model.getEditMap().forEach((r,i)=>{if(!(!r||r.size===0)){for(const a of r.values())if(Ba(a)){o.push(i);break}}}),ac(this.beans),!e&&((s=this.editSvc)==null?void 0:s.checkNavWithValidation({rowNode:n}))==="block-stop")return!1;super.stop(e,t);for(const r of o)this.dispatchRowEvent({rowNode:r},"rowValueChanged");return this.cleanupEditors({rowNode:n},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,n=e.previousParams;if((n==null?void 0:n.rowIndex)===t||e.sourceEvent instanceof KeyboardEvent)return;const o=qn(this.beans,n);this.gos.get("invalidEditValueMode")==="block"&&o&&(this.model.getCellValidationModel().getCellValidation(o)||this.model.getRowValidationModel().getRowValidation(o))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);for(const n of this.startedRows)this.dispatchRowEvent({rowNode:n},"rowEditingStopped");this.startedRows.length=0}moveToNextEditingCell(e,t,n,o="ui",s=!1){var h,f,p,g;const r=e.cellPosition;let i;this.model.suspend(!0);try{i=(h=this.beans.navigation)==null?void 0:h.findNextCellToFocusOn(r,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(i===!1)return null;if(i==null)return!1;const a=i.cellPosition,l=e.isCellEditable(),u=i.isCellEditable(),c=a&&r.rowIndex===a.rowIndex&&r.rowPinned===a.rowPinned;l&&this.setFocusOutOnEditor(e),this.restoreEditors();const d=this.gos.get("suppressStartEditOnTab");return u&&!s?d?i.focusCell(!0,n):((f=i.comp)!=null&&f.getCellEditor()||sh(this.beans,i,{event:n,cellStartedEdit:!0}),this.setFocusInOnEditor(i),i.focusCell(!1,n)):(u&&s&&this.setFocusInOnEditor(i),i.focusCell(!0,n)),!c&&!s&&((p=this.editSvc)==null||p.stopEditing({rowNode:e.rowNode},{event:n}),this.cleanupEditors(i,!0),d?i.focusCell(!0,n):this.editSvc.startEditing(i,{startedEdit:!0,event:n,source:o,ignoreEventKey:!0})),(g=e.rowCtrl)==null||g.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:n},o)=>{var r;if(n!=="editing")return;const s=qn(this.beans,{rowNode:t,column:o});s&&!((r=s.comp)!=null&&r.getCellEditor())&&sh(this.beans,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},a0e=class extends vG{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,n="ui"){const o=super.shouldStop(e,t,n);if(o!==null)return o;const{rowNode:s,column:r}=e||{};return(!this.rowNode||!this.column)&&s&&r?null:this.rowNode!==s||this.column!==r}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:n,event:o,ignoreEventKey:s}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:n,event:o,ignoreEventKey:s})}dispatchRowEvent(e,t,n){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){return super.stop(e,t),this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:n}=this.beans,{rowIndex:o,column:s,rowPinned:r}=e,i=Va(this.beans,{rowIndex:o,rowPinned:r}),a=UR(s),l=t.getCol(a),u=e.previousParams;if(u){const c=UR(u.column);if((u==null?void 0:u.rowIndex)===o&&c===a&&(u==null?void 0:u.rowPinned)===r)return}n!=null&&n.isEditing({rowNode:i,column:l},{withOpenEditor:!0})&&e.type==="cellFocused"||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,n,o="ui",s=!1){var p,g,v,w,S,b;const r=this.beans.focusSvc.getFocusedCell();r&&(e=nh(this.beans,r)??e);const i=e.cellPosition;let a;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),s||(e.eGui.focus(),(g=this.editSvc)==null||g.stopEditing(e,{source:(p=this.editSvc)!=null&&p.isBatchEditing()?"ui":"api",event:n}));try{a=(v=this.beans.navigation)==null?void 0:v.findNextCellToFocusOn(i,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(a===!1)return null;if(a==null)return!1;const u=a.cellPosition,c=e.isCellEditable(),d=a.isCellEditable(),h=u&&i.rowIndex===u.rowIndex&&i.rowPinned===u.rowPinned;c&&!s&&this.setFocusOutOnEditor(e);const f=this.gos.get("suppressStartEditOnTab");if(!h&&!s&&(super.cleanupEditors(a,!0),f?a.focusCell(!0,n):this.editSvc.startEditing(a,{startedEdit:!0,event:n,source:o,ignoreEventKey:!0})),d&&!s){if(a.focusCell(!1,n),f)a.focusCell(!0,n);else if(!((w=a.comp)!=null&&w.getCellEditor())){const y=(S=this.editSvc)==null?void 0:S.isEditing(a,{withOpenEditor:!0});sh(this.beans,a,{event:n,cellStartedEdit:!0,silent:y}),this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else d&&s&&this.setFocusInOnEditor(a),a.focusCell(!0,n);return(b=e.rowCtrl)==null||b.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},Gl={moduleName:"EditCore",version:ct,beans:[hCe,s0e],apiFunctions:{getEditingCells:NEe,getEditRowValues:MEe,getCellEditorInstances:pCe,startEditingCell:BEe,stopEditing:LEe,isEditing:VEe,validateEdit:$Ee},dynamicBeans:{singleCell:a0e,fullRow:i0e},dependsOn:[Ow,iG],css:[hEe]},l0e={moduleName:"UndoRedoEdit",version:ct,beans:[dEe],apiFunctions:{undoCellEditing:FEe,redoCellEditing:OEe,getCurrentUndoSize:HEe,getCurrentRedoSize:GEe},dependsOn:[Gl]},u0e={moduleName:"TextEditor",version:ct,userComponents:{agCellEditor:lG,agTextCellEditor:lG},dependsOn:[Gl]},c0e={moduleName:"NumberEditor",version:ct,userComponents:{agNumberCellEditor:{classImp:REe}},dependsOn:[Gl]},d0e={moduleName:"DateEditor",version:ct,userComponents:{agDateCellEditor:vEe,agDateStringCellEditor:CEe},dependsOn:[Gl]},h0e={moduleName:"CheckboxEditor",version:ct,userComponents:{agCheckboxCellEditor:pEe},dependsOn:[Gl]},f0e={moduleName:"SelectEditor",version:ct,userComponents:{agSelectCellEditor:DEe},dependsOn:[Gl]},p0e={moduleName:"LargeTextEditor",version:ct,userComponents:{agLargeTextCellEditor:SEe},dependsOn:[Gl]},g0e={moduleName:"CustomEditor",version:ct,dependsOn:[Gl]},m0e=class extends qe{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,Kd(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),Dde(e))}createColumns(e,t){var h,f;const n=()=>{var p;ew(this.beans,(p=this.columns)==null?void 0:p.tree),this.columns=null},o=e.treeDepth,r=(((h=this.columns)==null?void 0:h.treeDepth)??-1)==o,i=this.generateSelectionCols();if(Tde(i,((f=this.columns)==null?void 0:f.list)??[])&&r)return;n();const{colGroupSvc:l}=this.beans,u=(l==null?void 0:l.findDepth(e.tree))??0,c=(l==null?void 0:l.balanceTreeForAutoCols(i,u))??[];this.columns={list:i,tree:c,treeDepth:u,map:{}},t(p=>{if(!p)return null;const g=p.filter(v=>!ka(v));return[...i,...g]})}updateColumns(e){var n;const t=Kd(e.source);for(const o of((n=this.columns)==null?void 0:n.list)??[]){const s=this.createSelectionColDef(e.currentValue);o.setColDef(s,null,t),ni(this.beans,{state:[{...s,colId:o.getColId()}]},t)}}getColumn(e){var t;return((t=this.columns)==null?void 0:t.list.find(n=>Wp(n,e)))??null}getColumns(){var e;return((e=this.columns)==null?void 0:e.list)??null}isSelectionColumnEnabled(){var i,a;const{gos:e,beans:t}=this,n=e.get("rowSelection");if(typeof n!="object"||!Ku(e))return!1;const o=(((a=(i=t.autoColSvc)==null?void 0:i.getColumns())==null?void 0:a.length)??0)>0;if(n.checkboxLocation==="autoGroupColumn"&&o)return!1;const s=!!jd(n),r=qy(n);return s||r}createSelectionColDef(e){const{gos:t}=this,n=e??t.get("selectionColumnDef"),o=t.get("enableRtl"),{rowSpan:s,spanRows:r,...i}=n??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:o?"right":"left",comparator(a,l,u,c){const d=u.isSelected(),h=c.isSelected();return d===h?0:d?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,...i,colId:r2,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const n=new Xu(e,null,t,!1);return this.createBean(n),[n]}onSelectionOptionsChanged(e,t,n){const o=t&&typeof t!="string"?jd(t):void 0,s=e&&typeof e!="string"?jd(e):void 0,r=o!==s,i=t&&typeof t!="string"?qy(t):void 0,a=e&&typeof e!="string"?qy(e):void 0,l=i!==a,u=Yy(e),c=Yy(t);(r||l||u!==c)&&this.beans.colModel.refreshAll(n)}destroy(){var e;ew(this.beans,(e=this.columns)==null?void 0:e.tree),super.destroy()}refreshVisibility(e,t,n){var l,u;if(!((l=this.columns)!=null&&l.list.length))return;const o=e.length+t.length+n.length;if(o===0)return;const s=this.columns.list[0];if(!s.isVisible())return;const r=()=>{let c;switch(s.pinned){case"left":case!0:c=e;break;case"right":c=n;break;default:c=t}c&&ti(c,s)};(((u=this.beans.rowNumbersSvc)==null?void 0:u.getColumn(i2))?2:1)===o&&r()}};function v0e(e,t){var i;if(!t.nodes.every(a=>a.rowPinned&&!Qp(a)?(Je(59),!1):a.id===void 0?(Je(60),!1):!0))return;const{nodes:o,source:s,newValue:r}=t;(i=e.selectionSvc)==null||i.setNodesSelected({nodes:o,source:s??"api",newValue:r})}function y0e(e,t,n="apiSelectAll"){var o;(o=e.selectionSvc)==null||o.selectAllRowNodes({source:n,selectAll:t})}function w0e(e,t,n="apiSelectAll"){var o;(o=e.selectionSvc)==null||o.deselectAllRowNodes({source:n,selectAll:t})}function C0e(e,t="apiSelectAllFiltered"){var n;(n=e.selectionSvc)==null||n.selectAllRowNodes({source:t,selectAll:"filtered"})}function b0e(e,t="apiSelectAllFiltered"){var n;(n=e.selectionSvc)==null||n.deselectAllRowNodes({source:t,selectAll:"filtered"})}function S0e(e,t="apiSelectAllCurrentPage"){var n;(n=e.selectionSvc)==null||n.selectAllRowNodes({source:t,selectAll:"currentPage"})}function E0e(e,t="apiSelectAllCurrentPage"){var n;(n=e.selectionSvc)==null||n.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function _0e(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedNodes())??[]}function R0e(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedRows())??[]}var T0e=class extends Bge{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:e}=this;this.mode=Xy(e),this.groupSelectsDescendants=Gp(e),this.groupSelectsFiltered=Zy(e)==="filteredDescendants",this.masterSelectsDetail=e2(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=Gp(e),n=Xy(e),o=Zy(e)==="filteredDescendants";this.masterSelectsDetail=e2(e)==="detail",(t!==this.groupSelectsDescendants||o!==this.groupSelectsFiltered||n!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=o,this.mode=n)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,n){if(this.isRowSelectionBlocked(t))return 0;const o=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,n);if(o==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in o)return o.reset?this.resetNodes():this.selectRange(o.deselect,!1,n),this.selectRange(o.select,!0,n);{const s=o.checkFilteredNodes?wG(o.node):o.newValue;return this.setNodesSelected({nodes:[o.node],newValue:s,clearSelection:o.clearSelection,keepDescendants:o.keepDescendants,event:e,source:n})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:n,nodes:o,event:s,source:r,keepDescendants:i=!1}){var u;if(o.length===0)return 0;const{gos:a}=this;if(!Ku(a)&&e)return Je(132),0;if(o.length>1&&!this.isMultiSelect())return Je(130),0;let l=0;for(let c=0;c<o.length;c++){const d=o[c],h=ch(d);if(h.rowPinned&&!Qp(h)){Je(59);continue}if(h.id===void 0){Je(60);continue}this.groupSelectsFiltered&&h.group&&!a.get("treeData")||this.selectRowNode(h,e,s,r)&&(this.detailSelection.delete(h.id),l++),this.groupSelectsDescendants&&((u=h.childrenAfterGroup)!=null&&u.length)&&(l+=this.selectChildren(h,e,r))}return n||(o.length===1&&r==="api"&&this.selectionCtx.setRoot(ch(o[0])),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(ch(o[0]),i,r)),l>0&&(this.updateGroupsFromChildrenSelections(r),this.dispatchSelectionChanged(r))),l}selectRange(e,t,n){let o=0;return e.forEach(s=>{const r=ch(s);if(r.group&&this.groupSelectsDescendants)return;this.selectRowNode(r,t,void 0,n)&&o++}),o>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n)),o}selectChildren(e,t,n){const o=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return o?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:n,nodes:o}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((n,o)=>{e(n)&&t.set(o,n)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:n,rowModel:o}=this.beans;if(!io(n))return!1;const s=o.rootNode;if(!s)return!1;t||(t=new tg(!0,s),t.active=!1);let r=!1;return t.forEachChangedNodeDepthFirst(i=>{if(i!==s){const a=this.calculateSelectedFromChildren(i);r=this.selectRowNode(i,a===null?!1:a,void 0,e)||r}}),r}clearOtherNodes(e,t,n){const o=new Map;let s=0;return this.selectedNodes.forEach(r=>{const i=r.id==e.id;if((t?!I0e(e,r):!0)&&!i){const l=this.selectedNodes.get(r.id);s+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:n}),this.groupSelectsDescendants&&r.parent&&o.set(r.parent.id,r.parent)}}),o.forEach(r=>{const i=this.calculateSelectedFromChildren(r);this.selectRowNode(r,i===null?!1:i,void 0,n)}),s}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&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)}createDaemonNode(e){if(!e.id)return;const t=new Nl(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!io(e))return;const n=t.getTopLevelNodes();if(n===null)return;const o=[];function s(r){for(let i=0,a=r.length;i<a;i++){const l=r[i];l.isSelected()?o.push(l):l.group&&l.childrenAfterGroup&&s(l.childrenAfterGroup)}}return s(n),o}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const n=io(this.gos);let o=!1;const s=r=>{const i=this.selectRowNode(ch(r),!1,void 0,e);o||(o=i)};if(t==="currentPage"||t==="filtered"){if(!n){_n(102);return}this.getNodesToSelect(t).forEach(s)}else this.selectedNodes.forEach(s),this.reset(e);if(this.selectionCtx.selectAll=!1,n&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(e);o||(o=r)}o&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,n=0;return this.getNodesToSelect(e).forEach(o=>{this.groupSelectsDescendants&&o.group||(o.isSelected()?t++:o.selectable&&n++)}),{selectedCount:t,notSelectedCount:n}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:n}=this.getSelectedCounts(e);return yG(t,n)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],n=s=>t.push(s);if(e==="currentPage")return this.forEachNodeOnPage(s=>{if(!s.group){n(s);return}if(!s.expanded&&!s.footer){const r=i=>{var a;n(i),(a=i.childrenAfterFilter)==null||a.forEach(r)};r(s);return}this.groupSelectsDescendants||n(s)}),t;const o=this.beans.rowModel;return e==="filtered"?(o.forEachNodeAfterFilter(n),t):(o.forEachNode(n),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:n}=this.beans,o=t.getFirstRow(),s=t.getLastRow();for(let r=o;r<=s;r++){const i=n.getRow(r);i&&e(i)}}selectAllRowNodes(e){const{gos:t,selectionCtx:n}=this;if(!Ku(t)){Je(132);return}if(fde(t)&&!Hp(t)){Je(130);return}if(!this.canSelectAll())return;const{source:o,selectAll:s}=e;let r=!1;if(this.getNodesToSelect(s).forEach(i=>{const a=this.selectRowNode(ch(i),!0,void 0,o);r||(r=a)}),n.selectAll=!0,io(t)&&this.groupSelectsDescendants){const i=this.updateGroupsFromChildrenSelections(o);r||(r=i)}r&&this.dispatchSelectionChanged(o)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,n){if(e||(e=[]),!Array.isArray(e)){_n(103);return}const o=new Set(e),s=[];this.beans.rowModel.forEachNode(r=>{o.has(r.id)&&s.push(r)}),n&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:s,source:t})}canSelectAll(){return io(this.beans.gos)}updateSelectable(e){var l;const{gos:t,rowModel:n}=this.beans;if(!Ku(t))return;const o="selectableChanged",s=e!==void 0,r=io(t)&&this.groupSelectsDescendants,i=[],a=u=>{var d;if(s&&!u.group)return;if(r&&u.group){const h=((d=u.childrenAfterGroup)==null?void 0:d.some(f=>f.selectable))??!1;this.setRowSelectable(u,h,!0);return}!this.updateRowSelectable(u,!0)&&u.isSelected()&&i.push(u)};if(r){if(e===void 0){const u=n.rootNode;e=u?new tg(!1,u):void 0}e==null||e.forEachChangedNodeDepthFirst(a,!s,!s)}else n.forEachNode(a);i.length&&this.setNodesSelected({nodes:i,newValue:!1,source:o}),!s&&r&&((l=this.updateGroupsFromChildrenSelections)==null||l.call(this,o))}updateSelectableAfterGrouping(e){var t;this.updateSelectable(e),this.groupSelectsDescendants&&((t=this.updateGroupsFromChildrenSelections)!=null&&t.call(this,"rowGroupChanged",e))&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){var r,i;if(!this.masterSelectsDetail)return;const n=(i=(r=e.detailNode)==null?void 0:r.detailGridInfo)==null?void 0:i.api;if(!n)return;const o=D0e(n);if(e.isSelected()!==o&&this.selectRowNode(e,o,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!o){const a=this.detailSelection.get(e.id)??new Set;for(const l of n.getSelectedNodes())a.add(l.id);this.detailSelection.set(e.id,a)}}setDetailSelectionState(e,t,n){if(this.masterSelectsDetail){if(!Hp(t)){Je(269);return}switch(e.isSelected()){case!0:{n.selectAll();break}case!1:{n.deselectAll();break}case void 0:{const o=this.detailSelection.get(e.id);if(o){const s=[];for(const r of o){const i=n.getRowNode(r);i&&s.push(i)}n.setNodesSelected({nodes:s,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function ch(e){return Qp(e)?e.pinnedSibling:e.footer?e.sibling:e}function D0e(e){let t=0,n=0;return e.forEachNode(o=>{o.isSelected()?t++:o.selectable&&n++}),yG(t,n)}function yG(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function I0e(e,t){let n=t.parent;for(;n;){if(n===e)return!0;n=n.parent}return!1}function wG(e){var o;const t=e.isSelected()===!1,n=((o=e.childrenAfterFilter)==null?void 0:o.some(wG))??!1;return t||n}var x0e={moduleName:"SharedRowSelection",version:ct,beans:[m0e],apiFunctions:{setNodesSelected:v0e,selectAll:y0e,deselectAll:w0e,selectAllFiltered:C0e,deselectAllFiltered:b0e,selectAllOnCurrentPage:S0e,deselectAllOnCurrentPage:E0e,getSelectedNodes:_0e,getSelectedRows:R0e}},A0e={moduleName:"RowSelection",version:ct,rowModels:["clientSide","infinite","viewport"],beans:[T0e],dependsOn:[x0e]};function P0e(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function k0e(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function CG(e){var t;(t=e.rowModel)==null||t.onRowHeightChanged()}function bG(e){var t,n;if((t=e.rowAutoHeight)!=null&&t.active){Je(3);return}(n=e.rowModel)==null||n.resetRowHeights()}function F0e(e,t,n){var s,r;const o=Obe(e);if(o){if(((s=e.rowGroupColsSvc)==null?void 0:s.columns.length)===0){if(t<0){_n(238);return}o.setRowCount(t,n);return}_n(28);return}(r=Fw(e))==null||r.setRowCount(t,n)}function O0e(e){var t;return Ud(e.gos)?e.rowModel.getBlockStates():((t=e.rowNodeBlockLoader)==null?void 0:t.getBlockState())??{}}function M0e(e){return e.rowModel.isLastRowIndexKnown()}var N0e={moduleName:"CsrmSsrmSharedApi",version:ct,apiFunctions:{expandAll:P0e,collapseAll:k0e}},L0e={moduleName:"RowModelSharedApi",version:ct,apiFunctions:{onRowHeightChanged:CG,resetRowHeights:bG}},V0e={moduleName:"SsrmInfiniteSharedApi",version:ct,apiFunctions:{setRowCount:F0e,getCacheBlockState:O0e,isLastRowIndexKnown:M0e}},B0e=class extends qe{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(o=>{var r;if(!o){_n(18),t||_n(20);return}if(this.isGridApi(o))return o;const s=o;return"current"in s?(r=s.current)==null?void 0:r.api:(s.api||_n(19),s.api)}).filter(o=>!!o&&!o.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(const t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const n=[];return e.columns?e.columns.forEach(o=>{n.push(t(o))}):e.column&&n.push(t(e.column)),n}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":Je(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const n of e.columnGroups){let o=null;n&&(o=t.getProvidedColGroup(n.getGroupId())),!(n&&!o)&&t.setColumnGroupOpened(o,n.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let n=null;const o=this.beans,{colResize:s,ctrlsSvc:r,colModel:i}=o;if(t&&(n=i.getColDefCol(t.getColId())),t&&!n)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const d=e.api.getColumnState().map(h=>({colId:h.colId}));ni(o,{state:d,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const d=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));ni(o,{state:d},"alignedGridChanged")}break;case"columnPinned":{const d=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));ni(o,{state:d},"alignedGridChanged")}break;case"columnResized":{const c=e,d={};for(const h of a)d[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()};for(const h of c.flexColumns??[])d[h.getId()]&&delete d[h.getId()];s==null||s.setColumnWidths(Object.values(d),!1,c.finished,"alignedGridChanged");break}}const u=r.getGridBodyCtrl().isVerticalScrollShowing();for(const c of this.getAlignedGridApis())c.setGridOption("alwaysShowVerticalScroll",u)}},$0e={moduleName:"AlignedGrids",version:ct,beans:[B0e],dependsOn:[rH]},H0e=class extends qe{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},SG(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){const{selectionSvc:t,pinnedRowModel:n,groupStage:o}=this.beans;t==null||t.reset("rowDataChanged"),n!=null&&n.isManual()&&n.reset(),this.dispatchRowDataUpdateStarted(e),this.allNodesMap=Object.create(null),this.nextId=0;const s=SG(this.rootNode),r=new Array(e.length);s._leafs=r;let i=0;const a=o==null?void 0:o.getNestedDataGetter(),l=a?new Set:null,u=(c,d)=>{const h=c.level+1;for(let f=0,p=d.length;f<p;++f){const g=d[f];if(!g)continue;const v=this.createRowNode(g,h);if(v.sourceRowIndex=i,r[i++]=v,l&&!l.has(g)){l.add(g),v.treeParent=c;const w=a(g);w&&u(v,w)}}};u(s,e),r.length=i}setImmutableRowData(e,t){var w;const{rootNode:n,gos:o}=this;this.dispatchRowDataUpdateStarted(t);const s=zd(o),r=e.changedRowNodes,{adds:i,updates:a}=r,l=new Set,u=[],c=(w=this.beans.groupStage)==null?void 0:w.getNestedDataGetter();let d=o.get("suppressMaintainUnsortedOrder")?void 0:!1,h=-1,f=!1;const p=(S,b)=>{if(!d&&d!==void 0){const y=S.sourceRowIndex;d=y<=h,h=y}S.data!==b&&(S.updateData(b),i.has(S)||a.add(S),!S.selectable&&S.isSelected()&&u.push(S))},g=(S,b,y)=>{for(let E=0,_=b.length;E<_;++E){const I=b[E];if(!I)continue;let T=this.getRowNode(s({data:I,level:y}));if(T?(p(T,I),f||(f=!!c&&T.treeParent!==S)):(T=this.createRowNode(I,y),i.add(T)),!c||l.has(T)){l.add(T);continue}l.add(T),T.treeParent=S;const F=c(I);F&&g(T,F,y+1)}};g(n,t,0);const v=this.deleteUnusedNodes(l,r,u)||d||i.size>0;if(v){const S=n._leafs??(n._leafs=[]);d===void 0?j0e(S,l,r):z0e(S,l)&&(r.reordered=!0)}(v||f||a.size)&&(e.rowDataUpdated=!0,this.deselect(u))}deleteUnusedNodes(e,{removals:t},n){const o=this.rootNode._leafs;for(let s=0,r=o.length;s<r;s++){const i=o[s];e.has(i)||(t.add(i),i.isSelected()&&n.push(i),this.deleteNode(i))}return t.size>0}updateRowData(e,t){var a;if(this.dispatchRowDataUpdateStarted(e.add),(a=this.beans.groupStage)!=null&&a.getNestedDataGetter())return Je(268),{remove:[],update:[],add:[]};const n=[],o=zd(this.gos),s=this.executeRemove(o,e,t,n),r=this.executeUpdate(o,e,t,n),i=this.executeAdd(e,t);return this.deselect(n),{remove:s,update:r,add:i}}executeRemove(e,{remove:t},{adds:n,updates:o,removals:s},r){const i=this.rootNode._leafs,a=i==null?void 0:i.length,l=t==null?void 0:t.length;if(!l||!a)return[];let u=0,c=a,d=0,h;const f=new Array(l);for(let p=0;p<l;++p){const g=this.lookupNode(e,t[p]);if(!g)continue;const v=g.sourceRowIndex;v<c&&(c=v),v>d&&(d=v),g.isSelected()&&r.push(g),this.deleteNode(g),n.delete(g)?(h??(h=new Set),h.add(g)):(o.delete(g),s.add(g)),f[u++]=g}return f.length=u,u&&W0e(i,c,d,s,h),f}executeUpdate(e,{update:t},{adds:n,updates:o},s){const r=t==null?void 0:t.length;if(!r)return[];const i=new Array(r);let a=0;for(let l=0;l<r;l++){const u=t[l],c=this.lookupNode(e,u);c&&(c.updateData(u),!c.selectable&&c.isSelected()&&s.push(c),i[a++]=c,n.has(c)||o.add(c))}return i.length=a,i}executeAdd(e,t){var n;const o=(n=this.rootNode)._leafs??(n._leafs=[]),s=o.length,r=e.add,i=r==null?void 0:r.length;if(!i)return[];const a=s+i;let l=this.sanitizeAddIndex(o,e.addIndex);if(l<s){for(let d=s-1,h=a-1;d>=l;--d){const f=o[d];f.sourceRowIndex=h,o[h--]=f}t.reordered=!0}o.length=a;const u=new Array(i),c=t.adds;for(let d=0;d<i;d++){const h=this.createRowNode(r[d],0);c.add(h),h.sourceRowIndex=l,o[l]=h,u[d]=h,l++}return u}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e!=null&&e.length?e[0]:null})}deselect(e){var o;const t="rowDataChanged",n=this.beans.selectionSvc;e.length&&(n==null||n.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t})),(o=n==null?void 0:n.updateGroupsFromChildrenSelections)==null||o.call(n,t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:(n==null?void 0:n.getSelectedNodes())??null,serverSideState:null})}createRowNode(e,t){const n=new Nl(this.beans);n.parent=this.rootNode,n.level=t,n.group=!1,n.expanded=!1,n.setDataAndId(e,String(this.nextId++));const o=n.id,s=this.allNodesMap;return s[o]&&Je(2,{nodeId:o}),s[o]=n,n}deleteNode(e){var s;e.clearRowTopAndRowIndex();const t=e.id,n=this.allNodesMap;n[t]===e&&delete n[t];const o=e.pinnedSibling;o&&((s=this.beans.pinnedRowModel)==null||s.pinRow(o,null))}lookupNode(e,t){if(!e)return U0e(this.rootNode._leafs,t);const n=e({data:t,level:0}),o=this.allNodesMap[n];return o||(_n(4,{id:n}),null)}sanitizeAddIndex(e,t){const n=e.length;if(typeof t!="number"||t<0||t>=n||Number.isNaN(t))return n;t=Math.ceil(t);const o=this.gos;return t>0&&o.get("treeData")&&o.get("getDataPath")&&(t=G0e(e,t)),t}},G0e=(e,t)=>{for(let n=0,o=e.length;n<o;n++){const s=e[n];if((s==null?void 0:s.rowIndex)==t-1)return n+1}return t},SG=e=>{var i;e.group=!0,e.level=-1,e.id="ROOT_NODE_ID",((i=e._leafs)==null?void 0:i.length)!==0&&(e._leafs=[]);const t=[],n=[],o=[],s=[];e.childrenAfterGroup=t,e.childrenAfterSort=n,e.childrenAfterAggFilter=o,e.childrenAfterFilter=s;const r=e.sibling;return r&&(r.childrenAfterGroup=t,r.childrenAfterSort=n,r.childrenAfterAggFilter=o,r.childrenAfterFilter=s,r.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},U0e=(e,t)=>{if(e)for(let n=0,o=e.length;n<o;n++){const s=e[n];if(s.data===t)return s}return _n(5,{data:t}),null},W0e=(e,t,n,o,s)=>{t=Math.max(0,t);for(let r=t,i=e.length;r<i;++r){const a=e[r];r<=n&&(o.has(a)||s!=null&&s.has(a))||(a.sourceRowIndex=t,e[t++]=a)}e.length=t},z0e=(e,t)=>{const n=t.size;e.length=n;let o=0,s=!1,r=!1;for(const i of t){const a=i.sourceRowIndex;a===o?r||(r=s):(a>=0?r=!0:s=!0,i.sourceRowIndex=o,e[o]=i),++o}return r},j0e=(e,t,{removals:n,adds:o})=>{const s=e.length;e.length=t.size;let r=0;for(let i=0;i<s;++i){const a=e[i];n.has(a)||(r!==i&&(a.sourceRowIndex=r,e[r]=a),++r)}for(const i of o)i.sourceRowIndex<0&&(i.sourceRowIndex=r,e[r++]=i);e.length=r},EG=e=>{const t=e.childrenAfterSort,n=e.sibling;if(n&&(n.childrenAfterSort=t),!!t)for(let o=0,s=t.length-1;o<=s;o++){const r=t[o],i=o===0,a=o===s;r.firstChild!==i&&(r.firstChild=i,r.dispatchRowEvent("firstChildChanged")),r.lastChild!==a&&(r.lastChild=a,r.dispatchRowEvent("lastChildChanged")),r.childIndex!==o&&(r.childIndex=o,r.dispatchRowEvent("childIndexChanged"))}},K0e=class extends qe{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e){const t=this.beans.sortSvc.getSortOptions(),n=t.length>0&&!!e.changedRowNodes&&this.gos.get("deltaSort");this.sort(t,n,e.changedRowNodes,e.changedPath)}sort(e,t,n,o){const{gos:s,colModel:r,rowGroupColsSvc:i,rowNodeSorter:a,rowRenderer:l,showRowGroupCols:u}=this.beans,c=s.get("groupMaintainOrder"),d=r.getCols().some(S=>S.isRowGroupActive()),h=i==null?void 0:i.columns,f=r.isPivotMode(),p=s.getCallback("postSortRows");let g=!1,v;const w=S=>{var _,I;const b=f&&S.leafGroup;let y=c&&d&&!S.leafGroup;y&&(v??(v=this.shouldSortContainsGroupCols(e)),y&&(y=!v));let E=null;if(y){let T=!1;if(h){const F=S.level+1;F<h.length&&(T=h[F].getSort()===null)}T||(E=X0e(S))}else!e.length||b||(t&&n?E=q0e(a,S,n,o,e):E=a.doFullSort(S.childrenAfterAggFilter,e));if(E||(E=((_=S.childrenAfterAggFilter)==null?void 0:_.slice(0))??[]),g||(g=((I=S.childrenAfterSort)==null?void 0:I[0])!==E[0]),S.childrenAfterSort=E,EG(S),p){const T={nodes:S.childrenAfterSort};p(T)}};if(o==null||o.forEachChangedNodeDepthFirst(w),g&&s.get("groupHideOpenParents")){const S=u==null?void 0:u.getShowRowGroupCols();S!=null&&S.length&&l.refreshCells({columns:S,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(Mi(this.gos)){for(let n=0;n<t;++n){const o=e[n].column;if(o.isPrimary()&&o.isRowGroupActive())return!0}return!1}for(let n=0;n<t;++n)if(e[n].column.getColDef().showRowGroup)return!0;return!1}},q0e=(e,t,n,o,s)=>{const r=t.childrenAfterAggFilter,i=t.childrenAfterSort;if(!i)return e.doFullSort(r,s);const a=new Set,l=[],{updates:u,adds:c}=n;for(let h=0,f=r.length;h<f;++h){const p=r[h];u.has(p)||c.has(p)||o&&!o.canSkip(p)?l.push({currentPos:l.length,rowNode:p}):a.add(p)}const d=i.filter(h=>a.has(h)).map((h,f)=>({currentPos:f,rowNode:h}));return l.sort((h,f)=>e.compareRowNodes(s,h,f)),Y0e(e,s,l,d)},Y0e=(e,t,n,o)=>{let s=0,r=0;const i=n.length,a=o.length,l=new Array(i+a);let u=0;for(;s<i&&r<a;){const c=n[s],d=o[r];e.compareRowNodes(t,c,d)<0?(l[u++]=c.rowNode,++s):(l[u++]=d.rowNode,++r)}for(;s<i;)l[u++]=n[s++].rowNode;for(;r<a;)l[u++]=o[r++].rowNode;return l},X0e=e=>{const t=e.childrenAfterSort,n=e.childrenAfterAggFilter,o=t==null?void 0:t.length,s=n==null?void 0:n.length;if(!o||!s)return null;const r=new Array(s),i=new Set;for(let l=0;l<s;++l)i.add(n[l]);let a=0;for(let l=0;l<o;++l){const u=t[l];i.delete(u)&&(r[a++]=u)}if(i.size===0&&a===o)return t;for(const l of i)r[a++]=l;return r.length=a,r},Z0e=class extends qe{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.rowDataUpdatedPending=!1,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingModel=!1,this.rowNodesCountReady=!1,this.stages=[],this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=Yo(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new Nl(e);this.rootNode=t,this.nodeManager=this.createBean(new H0e(t));const n=this.refreshModel.bind(this,{step:"group"}),o=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:o,columnRowGroupChanged:n,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:n,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,n=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(o=>!!o);this.stages=n;for(let o=n.length-1;o>=0;--o)for(const s of n[o].refreshProps)t.set(s,o);this.addManagedPropertyListeners([...t.keys()],o=>{var r;const s=(r=o.changeSet)==null?void 0:r.properties;s&&this.onPropChange(s)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,n,o){let s,r=!1;do{s=!1;const i=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(i,n),u=Math.min(a,o);for(let c=l;c<=u;c++){const d=this.getRow(c);if(d.rowHeightEstimated){const h=Pl(this.beans,d);d.setRowHeight(h.height),s=!0,r=!0}}s&&this.setRowTopAndRowIndex()}while(s);return r}onPropChange(e){const{nodeManager:t,gos:n,beans:o}=this,s=o.groupStage;if(!t)return;const r=new Set(e),i=s==null?void 0:s.onPropChange(r);let a;r.has("rowData")?a=n.get("rowData"):i&&(a=s==null?void 0:s.extractData()),a&&!Array.isArray(a)&&(a=null,Je(1));const l={step:"nothing",changedProps:r};a&&(!i&&!this.isEmpty()&&a.length>0&&n.exists("getRowId")&&!n.get("resetRowDataOnUpdate")?(l.keepRenderedRows=!0,l.animate=!n.get("suppressAnimationFrame"),l.changedRowNodes=new Rw,t.setImmutableRowData(l,a)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(a),this.rowNodesCountReady=!0));const u=l.rowDataUpdated?"group":this.getRefreshedStage(e);u&&(l.step=u,this.refreshModel(l))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:n}=this,o=t.length;let s=o;for(let r=0,i=e.length;r<i&&s;++r)s=Math.min(s,n.get(e[r])??s);return s<o?t[s].step:null}setRowTopAndRowIndex(e){const{beans:t,rowsToDisplay:n}=this,o=t.environment.getDefaultRowHeight();let s=0;const r=Xo(this.gos,"normal");for(let i=0,a=n.length;i<a;++i){const l=n[i],u=l.id;if(u!=null&&(e==null||e.add(u)),l.rowHeight==null){const c=Pl(t,l,r,o);l.setRowHeight(c.height,c.estimated)}l.setRowTop(s),l.setRowIndex(i),s+=l.rowHeight}}clearRowTopAndRowIndex(e,t){const n=e.active,o=i=>{(i==null?void 0:i.id)!=null&&!t.has(i.id)&&i.clearRowTopAndRowIndex()},s=i=>{o(i),o(i.detailNode),o(i.sibling);const a=i.childrenAfterGroup;if(!i.hasChildren()||!a)return;const l=i.level==-1;if(!(n&&!l&&!i.expanded))for(let c=0,d=a.length;c<d;++c)s(a[c])},r=this.rootNode;r&&s(r)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){var s,r;const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const o=(s=e.sibling)!=null&&s.displayed?1:0;return(((r=e.childrenAfterSort)==null?void 0:r.length)??0)+o}getTopLevelRowDisplayedIndex(e){const{beans:t,rootNode:n,rowsToDisplay:o}=this;if(!n||!o.length||o[0]===n)return e;const r=n.childrenAfterSort,i=l=>{let u=r[l];if(this.gos.get("groupHideOpenParents"))for(;u.expanded&&u.childrenAfterSort&&u.childrenAfterSort.length>0;)u=u.childrenAfterSort[0];return u.rowIndex},a=t.footerSvc;return a?a==null?void 0:a.getTopDisplayIndex(o,e,r,i):i(e)}getTopLevelIndexFromDisplayedIndex(e){var a;const{rootNode:t,rowsToDisplay:n}=this;if(!t||!n.length||n[0]===t)return e;let s=this.getRow(e);s.footer&&(s=s.sibling);let r=s.parent;for(;r&&r!==t;)s=r,r=s.parent;const i=((a=t.childrenAfterSort)==null?void 0:a.indexOf(s))??-1;return i>=0?i:e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:Wd(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const o=t.length===0||t.some(s=>s.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:o,keepRenderedRows:!0,animate:Wd(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:Wd(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new tg(!1,this.rootNode);return t.active=e,t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:n,rowDataUpdated:o}=e;return!(!t||n||!o||t.removals.size||t.adds.size)}refreshModel(e){var u,c;const{nodeManager:t,beans:n,eventSvc:o,started:s,refreshingModel:r}=this;if(!t)return;const i=!!e.rowDataUpdated,a=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&i));if(s&&i&&o.dispatchEvent({type:"rowDataUpdated"}),!s||r||n.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(e)){this.rowDataUpdatedPending||(this.rowDataUpdatedPending=i);return}switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.refreshingModel=!0,(u=n.masterDetailSvc)==null||u.refreshModel(e),i&&e.step!=="group"&&((c=n.colFilter)==null||c.refreshModel()),e.step){case"group":this.doGrouping(e);case"filter":this.doFilter(a);case"pivot":this.doPivot(a);case"aggregate":this.doAggregate(a);case"filter_aggregates":this.doFilterAggregates(a);case"sort":this.doSort(e.changedRowNodes,a);case"map":this.doRowsToDisplay()}const l=new Set;this.setRowTopAndRowIndex(l),this.clearRowTopAndRowIndex(a,l),this.refreshingModel=!1,o.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){var e,t,n;return!((t=(e=this.rootNode)==null?void 0:e._leafs)!=null&&t.length)||!((n=this.beans.colModel)!=null&&n.ready)}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let n=!1,o=!1;const s=[],r=Gp(this.gos);return this.forEachNodeAfterFilterAndSort(i=>{if(o)return;if(n&&(i===t||i===e)&&(o=!0,r&&i.group)){_G(s,i);return}if(!n){if(i!==t&&i!==e)return;n=!0,t===e&&(o=!0)}(!i.group||!r)&&s.push(i)}),s}getTopLevelNodes(){var e;return((e=this.rootNode)==null?void 0:e.childrenAfterGroup)??null}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay,n=t.length;if(this.isEmpty()||n===0)return-1;let o=0,s=n-1;if(e<=0)return 0;if(t[s].rowTop<=e)return s;let i=-1,a=-1;for(;;){const l=Math.floor((o+s)/2),u=t[l];if(this.isRowInPixel(u,e)||(u.rowTop<e?o=l+1:u.rowTop>e&&(s=l-1),i===o&&a===s))return l;i=o,a=s}}isRowInPixel(e,t){const n=e.rowTop,o=n+e.rowHeight;return n<=t&&o>t}forEachLeafNode(e){var n;const t=(n=this.rootNode)==null?void 0:n._leafs;if(t)for(let o=0,s=t.length;o<s;++o)e(t[o],o)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToDisplay;for(let n=0,o=t.length;n<o;++n)e(t[n],n)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,n=>n.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,n=>n.childrenAfterSort)}forEachPivotNode(e,t,n){const{colModel:o,rowGroupColsSvc:s}=this.beans;if(!o.isPivotMode())return;if(!(s!=null&&s.columns.length)){e(this.rootNode,0);return}const r=n?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,i=>i.leafGroup?null:i[r])}depthFirstSearchRowNodes(e,t=!1,n=r=>r.childrenAfterGroup,o=this.rootNode,s=0){let r=s;if(!o)return r;const i=o===this.rootNode;if(i||e(o,r++),o.hasChildren()&&!o.footer){const a=n(o);if(a){const l=this.beans.footerSvc;r=(l==null?void 0:l.addTotalRows(r,o,e,t,i,"top"))??r;for(const u of a)r=this.depthFirstSearchRowNodes(e,t,n,u,r);return(l==null?void 0:l.addTotalRows(r,o,e,t,i,"bottom"))??r}}return r}doAggregate(e){var n;const t=this.rootNode;t&&((n=this.beans.aggStage)==null||n.execute({rowNode:t,changedPath:e}))}doFilterAggregates(e){const t=this.rootNode,n=this.beans.filterAggStage;if(n){n.execute({rowNode:t,changedPath:e});return}t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){const n=this.beans.sortStage;if(n){n.execute({rowNode:this.rootNode,changedRowNodes:e,changedPath:t});return}t.forEachChangedNodeDepthFirst(o=>{o.childrenAfterSort=o.childrenAfterAggFilter.slice(0),EG(o)})}doGrouping(e){var s;const t=this.rootNode,n=this.beans.groupStage,o=n==null?void 0:n.execute({rowNode:t,changedRowNodes:e.changedRowNodes,changedPath:e.changedPath,afterColumnsChanged:!!e.afterColumnsChanged});if(o===void 0){const r=t._leafs;t.childrenAfterGroup=r,t.updateHasChildren();const i=t.sibling;i&&(i.childrenAfterGroup=r)}(o||e.rowDataUpdated)&&((s=this.beans.colFilter)==null||s.refreshModel()),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;if(t){t.execute({rowNode:this.rootNode,changedPath:e});return}e.forEachChangedNodeDepthFirst(n=>{n.childrenAfterFilter=n.childrenAfterGroup,UH(n)},!0)}doPivot(e){var t;(t=this.beans.pivotStage)==null||t.execute({rowNode:this.rootNode,changedPath:e})}getRowNode(e){var o,s;const t=(o=this.nodeManager)==null?void 0:o.getRowNode(e);return typeof t=="object"?t:typeof e=="string"&&e.indexOf(oR)===0?(s=this.beans.groupStage)==null?void 0:s.getNode(e):void 0}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const n=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),n)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){var a;const{nodeManager:e,beans:t,eventSvc:n,asyncTransactions:o}=this;if(!e)return;(a=t.valueCache)==null||a.onDataChanged();const s=[],r=[],i=new Rw;for(const{rowDataTransaction:l,callback:u}of o??[]){this.rowNodesCountReady=!0;const c=e.updateRowData(l,i);s.push(c),u&&r.push(u.bind(null,c))}this.commitTransactions(i),r.length>0&&setTimeout(()=>{for(let l=0,u=r.length;l<u;l++)r[l]()},0),s.length>0&&n.dispatchEvent({type:"asyncTransactionsFlushed",results:s}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){var s;const t=this.nodeManager;if(!t)return null;(s=this.beans.valueCache)==null||s.onDataChanged(),this.rowNodesCountReady=!0;const n=new Rw,o=t.updateRowData(e,n);return this.commitTransactions(n),o}commitTransactions(e){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:e,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{beans:e,rootNode:t}=this,n=e.flattenStage;if(n){this.rowsToDisplay=n.execute({rowNode:t});return}const o=this.rootNode.childrenAfterSort??[];for(const s of o)s.setUiLevel(0);this.rowsToDisplay=o}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);const n=e.sibling;n==null||n.setRowHeight(n.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const n=t.detailNode;n==null||n.setRowHeight(n.rowHeight,!0);const o=t.sibling;o==null||o.setRowHeight(o.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){var t;e.rowHeightChanged&&!((t=this.beans.rowAutoHeight)!=null&&t.active)&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},_G=(e,t)=>{const n=t.childrenAfterGroup;if(n)for(let o=0,s=n.length;o<s;++o){const r=n[o];r.data&&e.push(r),r.group&&_G(e,r)}};function J0e(e){var t;(t=e.expansionSvc)==null||t.onGroupExpandedOrCollapsed()}function Q0e(e,t){const n=Hl(e);n&&((!t||t==="everything")&&(t="group"),n.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function e_e(e){var t;return((t=Hl(e))==null?void 0:t.isEmpty())??!0}function t_e(e,t){var n;(n=Hl(e))==null||n.forEachLeafNode(t)}function n_e(e,t){var n;(n=Hl(e))==null||n.forEachNodeAfterFilter(t)}function o_e(e,t){var n;(n=Hl(e))==null||n.forEachNodeAfterFilterAndSort(t)}function s_e(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var n;return(n=Hl(e))==null?void 0:n.updateRowData(t)})}function r_e(e,t,n){e.frameworkOverrides.wrapIncoming(()=>{var o;return(o=Hl(e))==null?void 0:o.batchUpdateRowData(t,n)})}function i_e(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=Hl(e))==null?void 0:t.flushAsyncTransactions()})}function a_e(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}var RG={moduleName:"ClientSideRowModel",version:ct,rowModels:["clientSide"],beans:[Z0e,K0e],dependsOn:[OH]},l_e={moduleName:"ClientSideRowModelApi",version:ct,apiFunctions:{onGroupExpandedOrCollapsed:J0e,refreshClientSideRowModel:Q0e,isRowDataEmpty:e_e,forEachLeafNode:t_e,forEachNodeAfterFilter:n_e,forEachNodeAfterFilterAndSort:o_e,applyTransaction:s_e,applyTransactionAsync:r_e,flushAsyncTransactions:i_e,getBestCostNodeSelection:a_e,resetRowHeights:bG,onRowHeightChanged:CG},dependsOn:[N0e,L0e]},u_e=class extends qe{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:n,columnKeys:o,skipRowGroups:s,exportRowNumbers:r}=t,i=this.getColumnsToExport({allColumns:n,skipRowGroups:s,columnKeys:o,exportRowNumbers:r});return[this.prepareSession(i),this.prependContent(t),this.exportColumnGroups(t,i),this.exportHeaders(t,i),this.processPinnedTopRows(t,i),this.processRows(t,i),this.processPinnedBottomRows(t,i),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,n,o){var p;const s=t.shouldRowBeSkipped||(()=>!1),i=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!i,l=this.colModel.isPivotMode()?o.leafGroup:!o.group,u=!!o.footer,c=o.allChildrenCount===1&&((p=o.childrenAfterGroup)==null?void 0:p.length)===1&&dde(this.gos,o);if(!l&&!u&&(t.skipRowGroups||c||a)||t.onlySelected&&!o.isSelected()||t.skipPinnedTop&&o.rowPinned==="top"||t.skipPinnedBottom&&o.rowPinned==="bottom"||o.stub||o.level===-1&&!l&&!u||s(Ot(this.gos,{node:o})))return;const f=e.onNewBodyRow(o);if(n.forEach((g,v)=>{f.onColumn(g,v,o)}),t.getCustomContentBelowRow){const g=t.getCustomContentBelowRow(Ot(this.gos,{node:o}));g&&e.addCustomContent(g)}}appendContent(e){return t=>{const n=e.appendContent;return n&&t.addCustomContent(n),t}}prependContent(e){return t=>{const n=e.prependContent;return n&&t.addCustomContent(n),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return n=>{if(!e.skipColumnGroupHeaders){const o=new v2,{colGroupSvc:s}=this.beans,r=s?s.createColumnGroups({columns:t,idCreator:o,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(r,n,e.processGroupHeaderCallback)}return n}}exportHeaders(e,t){return n=>{if(!e.skipColumnHeaders){const o=n.onNewHeaderRow();t.forEach((s,r)=>{o.onColumn(s,r,void 0)})}return n}}processPinnedTopRows(e,t){return n=>{var s,r;const o=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(i=>i.rowPinned==="top").sort((i,a)=>i.rowIndex-a.rowIndex).map(i=>{var a;return(a=this.pinnedRowModel)==null?void 0:a.getPinnedTopRow(i.rowIndex)}).forEach(o):(s=this.pinnedRowModel)!=null&&s.isManual()||(r=this.pinnedRowModel)==null||r.forEachPinnedRow("top",o),n}}processRows(e,t){return n=>{var u;const o=this.rowModel,s=io(this.gos),r=Ud(this.gos),i=!s&&e.onlySelected,a=this.processRow.bind(this,n,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(c=>c.rowPinned==null).sort((c,d)=>c.rowIndex-d.rowIndex).map(c=>o.getRow(c.rowIndex)).forEach(a);else if(this.colModel.isPivotMode())s?o.forEachPivotNode(a,!0,l==="filteredAndSorted"):r?o.forEachNodeAfterFilterAndSort(a,!0):o.forEachNode(a);else if(e.onlySelectedAllPages||i){const c=((u=this.beans.selectionSvc)==null?void 0:u.getSelectedNodes())??[];this.replicateSortedOrder(c),c.forEach(a)}else l==="all"?o.forEachNode(a):s||r?o.forEachNodeAfterFilterAndSort(a,!0):o.forEachNode(a);return n}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:n}=this.beans;if(!t||!n)return;const o=t.getSortOptions(),s=(r,i)=>{var a,l;return r.rowIndex!=null&&i.rowIndex!=null?r.rowIndex-i.rowIndex:r.level===i.level?((a=r.parent)==null?void 0:a.id)===((l=i.parent)==null?void 0:l.id)?n.compareRowNodes(o,{rowNode:r,currentPos:r.rowIndex??-1},{rowNode:i,currentPos:i.rowIndex??-1}):s(r.parent,i.parent):r.level>i.level?s(r.parent,i):s(r,i.parent)};e.sort(s)}processPinnedBottomRows(e,t){return n=>{var s,r;const o=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(i=>i.rowPinned==="bottom").sort((i,a)=>i.rowIndex-a.rowIndex).map(i=>{var a;return(a=this.pinnedRowModel)==null?void 0:a.getPinnedBottomRow(i.rowIndex)}).forEach(o):(s=this.pinnedRowModel)!=null&&s.isManual()||(r=this.pinnedRowModel)==null||r.forEachPinnedRow("bottom",o),n}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:n=!1,exportRowNumbers:o=!1,columnKeys:s}=e,{colModel:r,gos:i,visibleCols:a}=this,l=r.isPivotMode(),u=h=>ka(h)?!1:!Fa(h)||o;if(s!=null&&s.length)return r.getColsForKeys(s).filter(u);const c=i.get("treeData");let d=[];return t&&!l?d=r.getCols():d=a.allCols,d=d.filter(h=>u(h)&&(n&&!c?!x_(h):!0)),d}recursivelyAddHeaderGroups(e,t,n){const o=[];for(const s of e){const r=s;if(r.getChildren)for(const i of r.getChildren()??[])o.push(i)}e.length>0&&ao(e[0])&&this.doAddHeaderHeader(t,e,n),o&&o.length>0&&this.recursivelyAddHeaderGroups(o,t,n)}doAddHeaderHeader(e,t,n){const o=e.onNewHeaderGroupingRow();let s=0;for(const r of t){const i=r;let a;n?a=n(Ot(this.gos,{columnGroup:i})):a=this.beans.colNames.getDisplayNameForColumnGroup(i,"header");const u=(i.isExpandable()?i.getLeafColumns():[]).reduce((c,d,h,f)=>{let p=kn(c);return d.getColumnGroupShow()==="open"?(!p||p[1]!=null)&&(p=[h],c.push(p)):p&&p[1]==null&&(p[1]=h-1),h===f.length-1&&p&&p[1]==null&&(p[1]=h),c},[]);o.onColumn(i,a||"",s++,i.getLeafColumns().length-1,u)}}},c_e={moduleName:"SharedExport",version:ct,beans:[u_e]},TG=`\r
|
|
253
|
-
`,d_e=class extends $be{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:n}=e;this.suppressQuotes=t,this.columnSeparator=n}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,TG),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((n,o)=>{o!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(n.data.value||""),n.mergeAcross&&this.appendEmptyCells(n.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,n,o){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(o)}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,n){t!=0&&(this.result+=this.columnSeparator);const o=this.extractRowCellValue(e,t,t,"csv",n);this.result+=this.putInQuotes(o.valueFormatted??o.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():(Je(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=TG),this.isFirstLine=!1}},h_e=class extends Bbe{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){Je(51);return}const t=this.getMergedParams(e),n=this.getData(t),o=new Blob(["\uFEFF",n],{type:"text/plain"}),s=typeof t.fileName=="function"?t.fileName(Ot(this.gos,{})):t.fileName;Hbe(this.getFileName(s),o)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const n=t?Object.assign({},e):this.getMergedParams(e);return this.getData(n)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:n,rowGroupColsSvc:o,valueSvc:s,gos:r}=this,{processCellCallback:i,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:u,suppressQuotes:c,columnSeparator:d}=e;return new d_e({colModel:t,colNames:n,valueSvc:s,gos:r,processCellCallback:i||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:u||void 0,suppressQuotes:c||!1,columnSeparator:d||",",rowGroupColsSvc:o})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function f_e(e,t){var n;return(n=e.csvCreator)==null?void 0:n.getDataAsCsv(t)}function p_e(e,t){var n;(n=e.csvCreator)==null||n.exportDataAsCsv(t)}var g_e={moduleName:"CsvExport",version:ct,beans:[h_e],apiFunctions:{getDataAsCsv:f_e,exportDataAsCsv:p_e},dependsOn:[c_e]},m_e=class extends qe{constructor(e,t,n){super(),this.id=e,this.parentCache=t,this.params=n,this.state="needsLoading",this.version=0,this.startRow=e*n.blockSize,this.endRow=this.startRow+n.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,n){this.successCommon(e,{rowData:t,rowCount:n})}isRequestMostRecentAndLive(e){const t=e===this.version,n=this.isAlive();return t&&n}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:n,beans:o,rowNodes:s}=this;for(let r=0;r<e;r++){const i=n+r,a=new Nl(o);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(i),a.setRowTop(t*i),s.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:n,state:o}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:n,pageStatus:o}}}setDataAndId(e,t,n){ft(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Gn(this.params.datasource.getRows)){Je(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:n,params:{sortModel:o,filterModel:s},gos:r}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,n),failCallback:this.pageLoadFailed.bind(this,n),sortModel:o,filterModel:s,context:Ot(r,{}).context}}forEachNode(e,t,n){this.rowNodes.forEach((o,s)=>{this.startRow+s<n&&e(o,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const n=e-this.startRow;return this.rowNodes[n]}processServerResult(e){const{rowNodes:t,beans:n}=this;t.forEach((s,r)=>{const i=e.rowData?e.rowData[r]:void 0;!s.id&&s.alreadyRendered&&i&&(t[r]=new Nl(n),t[r].setRowIndex(s.rowIndex),t[r].setRowTop(s.rowTop),t[r].setRowHeight(s.rowHeight),s.clearRowTopAndRowIndex()),this.setDataAndId(t[r],i,this.startRow+r)});const o=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,o)}destroy(){for(const e of this.rowNodes)e.clearRowTopAndRowIndex();super.destroy()}},v_e=2,y_e=class extends qe{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const n=Math.floor(e/this.params.blockSize);let o=this.blocks[n];if(!o){if(t)return;o=this.createBlock(n)}return o.getRow(e)}createBlock(e){const t=this.params,n=this.createBean(new m_e(e,this,t));return this.blocks[n.id]=n,this.blockCount++,this.purgeBlocksIfNeeded(n),t.rowNodeBlockLoader.addBlock(n),n}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(Al(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(i=>i!=e),n=(i,a)=>a.lastAccessed-i.lastAccessed;t.sort(n);const o=this.params.maxBlocksInCache>0,s=o?this.params.maxBlocksInCache-1:null,r=v_e-1;t.forEach((i,a)=>{const l=i.state==="needsLoading"&&a>=r,u=o?a>=s:!1;if(l||u){if(this.isBlockCurrentlyDisplayed(i)||this.isBlockFocused(i))return;this.removeBlockFromCache(i)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:n,endRow:o}=e;return t.rowIndex>=n&&t.rowIndex<o}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:n}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,n-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:n,overflowSize:o}=this.params,r=(e.id+1)*n+o;this.rowCount<r&&(this.rowCount=r)}}setRowCount(e,t){this.rowCount=e,ft(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const n of this.getBlocksInOrder())n.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(n,o)=>n.id-o.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const n=[];let o=-1,s=!1;const r={value:0};let i=!1;for(const l of this.getBlocksInOrder())if(!i){if(s&&o+1!==l.id){i=!0;continue}o=l.id,l.forEachNode(u=>{const c=u===e||u===t;(s||c)&&n.push(u),c&&(s=!s)},r,this.rowCount)}return i||s?[]:n}},w_e=class extends qe{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new Nl(e);this.rootNode=t,t.level=-1,this.rowHeight=qu(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=qu(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){var t;let e;this.cacheParams?e=!Dp(this.cacheParams.sortModel,((t=this.beans.sortSvc)==null?void 0:t.getSortModel())??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){var n;return((n=this.infiniteCache)==null?void 0:n.getRowNodesInRange(e,t))??[]}reset(){var n;if(!this.datasource)return;zd(this.gos)!=null||(n=this.beans.selectionSvc)==null||n.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:n,rowNodeBlockLoader:o,eventSvc:s,gos:r}=e;this.cacheParams={datasource:this.datasource,filterModel:(t==null?void 0:t.getFilterModel())??{},sortModel:(n==null?void 0:n.getSortModel())??[],rowNodeBlockLoader:o,initialRowCount:r.get("infiniteInitialRowCount"),maxBlocksInCache:r.get("maxBlocksInCache"),rowHeight:qu(e),overflowSize:r.get("cacheOverflowSize"),blockSize:r.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new y_e(this.cacheParams)),s.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(n=>{n.id===e&&(t=n)}),t}forEachNode(e){var t;(t=this.infiniteCache)==null||t.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),n=this.getRowCount()-1;return t>n?n:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){var e;(e=this.infiniteCache)==null||e.refreshCache()}purgeCache(){var e;(e=this.infiniteCache)==null||e.purgeCache()}isLastRowIndexKnown(){var e;return((e=this.infiniteCache)==null?void 0:e.isLastRowIndexKnown())??!1}setRowCount(e,t){var n;(n=this.infiniteCache)==null||n.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function C_e(e){var t;(t=Fw(e))==null||t.refreshCache()}function b_e(e){var t;(t=Fw(e))==null||t.purgeCache()}function S_e(e){var t;return(t=Fw(e))==null?void 0:t.getRowCount()}var E_e=class extends qe{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=hde(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=Yo(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){ti(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Al(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(n=>n.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const n of t)n.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:n,state:o}=t.getBlockStateJson();e[n]=o}),e}printCacheStatus(){Al(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},__e={moduleName:"InfiniteRowModelCore",version:ct,rowModels:["infinite"],beans:[w_e,E_e]},R_e={moduleName:"InfiniteRowModel",version:ct,apiFunctions:{refreshInfiniteCache:C_e,purgeInfiniteCache:b_e,getInfiniteRowCount:S_e},dependsOn:[__e,V0e]},T_e="ā",D_e="ā",I_e={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},x_e=class extends Cn{constructor(){super(I_e),this.eValue=dt,this.eDelta=dt,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const n=Math.abs(t),o=e.formatValue(n),s=ft(o)?o:n,r=t>=0,i=this.eDelta;r?i.textContent=T_e+s:i.textContent=D_e+s,i.classList.toggle("ag-value-change-delta-up",r),i.classList.toggle("ag-value-change-delta-down",!r)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),qo(this.eDelta)}refresh(e,t=!1){var u;const{value:n,valueFormatted:o}=e,{eValue:s,lastValue:r,beans:i}=this;if(n===r||(ft(o)?s.textContent=o:ft(n)?s.textContent=n:qo(s),(u=i.filterManager)!=null&&u.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n,l=r&&typeof r=="object"&&"toNumber"in r?r.toNumber():r;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return r&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=n,!0}},A_e=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",P_e={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},k_e=class extends Cn{constructor(){super(P_e),this.eCurrent=dt,this.refreshCount=0,this.registerCSS(A_e)}init(e){this.refresh(e,!0)}addSlideAnimation(){var s;this.refreshCount++;const e=this.refreshCount;(s=this.ePrevious)==null||s.remove();const{beans:t,eCurrent:n}=this,o=lo({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=o,o.textContent=n.textContent,this.getGui().insertBefore(o,n),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{var r;e===this.refreshCount&&((r=this.ePrevious)==null||r.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var s;let n=e.value;if(Gn(n)&&(n=""),n===this.lastValue||(s=this.beans.filterManager)!=null&&s.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=n;const o=this.eCurrent;return ft(e.valueFormatted)?o.textContent=e.valueFormatted:ft(e.value)?o.textContent=n:qo(o),!0}},F_e=class extends qe{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,n=this.beans.gos.get("cellFlashDuration"),o=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const r=Date.now(),i=r+n,a=r+n+o,l={phase:"flash",flashEndTime:i,fadeEndTime:a};s.set(e,l);const u=`ag-cell-${t}`,c=`${u}-animation`,{comp:d,eGui:{style:h}}=e;d.toggleCss(u,!0),d.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&i+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),n)}),this.nextAnimationTime=i)}advanceAnimations(){const e=Date.now();let t=null;for(const n of Object.keys(this.animations)){const o=this.animations[n],s=`ag-cell-${n}`,r=`${s}-animation`;for(const[i,a]of o){if(!i.isAlive()||!i.comp){o.delete(i);continue}const{phase:l,flashEndTime:u,fadeEndTime:c}=a,d=l==="flash"?u:c;if(!(e+15>=d)){t=Math.min(d,t??1/0);continue}const{comp:f,eGui:{style:p}}=i;switch(l){case"flash":f.toggleCss(s,!1),f.toggleCss(r,!0),p.transition=`background-color ${c-u}ms`,p.transitionDelay=`${u-e}ms`,t=Math.min(c,t??1/0),a.phase="fade";break;case"fade":f.toggleCss(s,!1),f.toggleCss(r,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),o.delete(i);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const n=kme(e.cellPosition);t.cells[n]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t==null?void 0:t.flashDuration,t==null?void 0:t.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function O_e(e,t={}){const{cellFlashSvc:n}=e;n&&e.frameworkOverrides.wrapIncoming(()=>{for(const o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))n.flashCell(o,t)})}var M_e={moduleName:"HighlightChanges",version:ct,beans:[F_e],userComponents:{agAnimateShowChangeCellRenderer:x_e,agAnimateSlideCellRenderer:k_e},apiFunctions:{flashCells:O_e}};function N_e(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function L_e(e,t,n){var o;return(o=e.stateSvc)==null?void 0:o.setState(t,n)}function DG(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=V_e(e)),e.version=ct,e}function V_e(e){return e.cellSelection=B_e(e,"rangeSelection"),e}function B_e(e,t){if(e&&typeof e=="object")return e[t]}var $_e=class extends qe{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Yo(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Yo(this,()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))},0),this.onRowSelectedDebounced=Yo(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:n}=this.beans;this.isClientSideRowModel=io(e);const o=DG(e.get("initialState")??{}),s=o.partialColumnState;delete o.partialColumnState,this.cachedState=o;const r=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>r(()=>this.setupStateOnGridReady(o))),(o.columnOrder||o.columnVisibility||o.columnSizing||o.columnPinning||o.columnGroup)&&(n==null||n.hideColumns("columnState"));const[i,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:u})=>{u==="gridInitializing"&&(i(),r(()=>{this.setupStateOnColumnsInitialised(o,!!s),n==null||n.revealColumns("columnState")}))},rowCountReady:()=>{a==null||a(),r(()=>this.setupStateOnRowCountReady(o))},firstDataRendered:()=>{l==null||l(),r(()=>this.setupStateOnFirstDataRendered(o))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const n=DG(e);delete n.partialColumnState,this.cachedState=n,this.startSuppressEvents();const o="api",s=t?new Set(t):void 0;this.setGridReadyState(n,o,s),this.setColumnsInitialisedState(n,o,!!s,s),this.setRowCountState(n,o,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(n,o,s),this.stopSuppressEvents(o)})}setGridReadyState(e,t,n){var o,s;t==="api"&&!(n!=null&&n.has("sideBar"))&&((s=(o=this.beans.sideBar)==null?void 0:o.comp)==null||s.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,n,o){this.setColumnState(e,t,n,o),this.setColumnGroupState(e,t,o),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const n=o=>()=>this.updateColumnState([o]);this.addManagedEventListeners({columnValueChanged:n("aggregation"),columnMoved:n("columnOrder"),columnPinned:n("columnPinning"),columnResized:n("columnSizing"),columnVisible:n("columnVisibility"),columnPivotChanged:n("pivot"),columnPivotModeChanged:n("pivot"),columnRowGroupChanged:n("rowGroup"),sortChanged:n("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,n){const{filter:o,rowGroupExpansion:s,ssrmRowGroupExpansion:r,rowSelection:i,pagination:a}=e,l=(c,d)=>!(n!=null&&n.has(c))&&(d||t==="api");l("filter",o)&&this.setFilterState(o),l("rowGroupExpansion",s)&&this.setRowGroupExpansionState(r,s,t),l("rowSelection",i)&&this.setRowSelectionState(i,t),l("pagination",a)&&this.setPaginationState(a,t);const u=this.updateCachedState.bind(this);u("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(u("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),u("rowGroupExpansion",void 0)):(u("rowGroupExpansion",this.getRowGroupExpansionState()),u("ssrmRowGroupExpansion",void 0)),u("rowSelection",this.getRowSelectionState()),u("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(t("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),t("rowGroupExpansion",void 0)):(t("rowGroupExpansion",this.getRowGroupExpansionState()),t("ssrmRowGroupExpansion",void 0))},o=()=>t("filter",this.getFilterState()),{gos:s,colFilter:r}=this.beans;this.addManagedEventListeners({filterChanged:o,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(n)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:i=>{(i.newPage||i.newPageSize)&&t("pagination",this.getPaginationState())}}),r&&this.addManagedListeners(r,{filterStateChanged:o})}setFirstDataRenderedState(e,t,n){const{scroll:o,cellSelection:s,focusedCell:r,columnOrder:i,rowPinning:a}=e,l=(d,h)=>!(n!=null&&n.has(d))&&(h||t==="api");l("focusedCell",r)&&this.setFocusedCellState(r),l("cellSelection",s)&&this.setCellSelectionState(s),l("scroll",o)&&this.setScrollState(o),l("rowPinning",a)&&this.setRowPinningState(a),this.setColumnPivotState(!!(i!=null&&i.orderedColIds),t);const u=this.updateCachedState.bind(this);u("sideBar",this.getSideBarState()),u("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();u("rangeSelection",c),u("cellSelection",c),u("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:n,cellFocusCleared:n,cellSelectionChanged:o=>{if(o.finished){const s=this.getRangeSelectionState();t("rangeSelection",s),t("cellSelection",s)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return Nbe(nw(e),e.colModel.isPivotMode())}setColumnState(e,t,n,o){const{sort:s,rowGroup:r,aggregation:i,pivot:a,columnPinning:l,columnVisibility:u,columnSizing:c,columnOrder:d}=e;let h=!1;const f=(x,P)=>{const k=!(o!=null&&o.has(x))&&!!(P||t==="api");return h||(h=k),k},p={},g=x=>{let P=p[x];return P||(P={colId:x},p[x]=P,P)},v={},w=f("sort",s);w&&(s==null||s.sortModel.forEach(({colId:x,sort:P},k)=>{const M=g(x);M.sort=P,M.sortIndex=k})),(w||!n)&&(v.sort=null,v.sortIndex=null);const S=f("rowGroup",r);S&&(r==null||r.groupColIds.forEach((x,P)=>{const k=g(x);k.rowGroup=!0,k.rowGroupIndex=P})),(S||!n)&&(v.rowGroup=null,v.rowGroupIndex=null);const b=f("aggregation",i);b&&(i==null||i.aggregationModel.forEach(({colId:x,aggFunc:P})=>{g(x).aggFunc=P})),(b||!n)&&(v.aggFunc=null);const y=f("pivot",a);y&&(a==null||a.pivotColIds.forEach((x,P)=>{const k=g(x);k.pivot=!0,k.pivotIndex=P}),this.gos.updateGridOptions({options:{pivotMode:!!(a!=null&&a.pivotMode)},source:t})),(y||!n)&&(v.pivot=null,v.pivotIndex=null);const E=f("columnPinning",l);if(E){for(const x of(l==null?void 0:l.leftColIds)??[])g(x).pinned="left";for(const x of(l==null?void 0:l.rightColIds)??[])g(x).pinned="right"}(E||!n)&&(v.pinned=null);const _=f("columnVisibility",u);if(_)for(const x of(u==null?void 0:u.hiddenColIds)??[])g(x).hide=!0;(_||!n)&&(v.hide=null);const I=f("columnSizing",c);if(I)for(const{colId:x,flex:P,width:k}of(c==null?void 0:c.columnSizingModel)??[]){const M=g(x);M.flex=P??null,M.width=k}(I||!n)&&(v.flex=null);const T=d==null?void 0:d.orderedColIds,F=!!(T!=null&&T.length)&&!(o!=null&&o.has("columnOrder")),L=F?T.map(x=>g(x)):Object.values(p);(L.length||h)&&(this.columnStates=L,ni(this.beans,{state:L,applyOrder:F,defaultState:v},t))}setColumnPivotState(e,t){const n=this.columnStates;this.columnStates=void 0;const o=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:r,colGroupSvc:i}=s;if(r!=null&&r.isPivotResultColsPresent()){if(n){const a=[];for(const l of n)r.getPivotResultCol(l.colId)&&a.push(l);ni(s,{state:a,applyOrder:e},t)}o&&(i==null||i.setColumnGroupState(o,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return Lbe(t)}setColumnGroupState(e,t,n){var a;const o=this.beans.colGroupSvc;if(!o||n!=null&&n.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set((a=e.columnGroup)==null?void 0:a.openColumnGroupIds),i=o.getColumnGroupState().map(({groupId:l})=>{const u=s.has(l);return u&&s.delete(l),{groupId:l,open:u}});for(const l of s)i.push({groupId:l,open:!0});i.length&&(this.columnGroupStates=i),o.setColumnGroupState(i,t)}getFilterState(){const e=this.beans.filterManager;let t=e==null?void 0:e.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const n=e==null?void 0:e.getFilterState(),o=(e==null?void 0:e.getAdvFilterModel())??void 0;return t||o||n?{filterModel:t,columnFilterState:n,advancedFilterModel:o}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:n,columnFilterState:o,advancedFilterModel:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(n!==void 0||o!==void 0)&&(t==null||t.setFilterState(n??null,o??null,"columnFilter")),s!==void 0&&(t==null||t.setAdvFilterModel(s??null,"advancedFilter"))}getRangeSelectionState(){var t;const e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(n=>{const{id:o,type:s,startRow:r,endRow:i,columns:a,startColumn:l}=n;return{id:o,type:s,startRow:r,endRow:i,colIds:a.map(u=>u.getColId()),startColId:l.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:n,colModel:o,visibleCols:s}=this.beans;if(!Aa(t)||!n)return;const r=[];for(const i of(e==null?void 0:e.cellRanges)??[]){const a=[];for(const u of i.colIds){const c=o.getCol(u);c&&a.push(c)}if(!a.length)continue;let l=o.getCol(i.startColId);if(!l){const u=s.allCols,c=new Set(a);l=u.find(d=>c.has(d))}r.push({...i,columns:a,startColumn:l})}n.setCellRanges(r)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(e==null?void 0:e.getHScrollPosition())??{left:0},{top:n}=(e==null?void 0:e.getVScrollPosition())??{top:0};return n||t?{top:n,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:n}=e??{top:0,left:0},{frameworkOverrides:o,rowRenderer:s,animationFrameSvc:r,ctrlsSvc:i}=this.beans;o.wrapIncoming(()=>{var a;i.get("center").setCenterViewportScrollLeft(n),(a=i.getScrollFeature())==null||a.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),r==null||r.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:n,rowPinned:o}=e;return{colId:t.getColId(),rowIndex:n,rowPinned:o}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:n}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:o,rowIndex:s,rowPinned:r}=e;t.setFocusedCell({column:n.getCol(o),rowIndex:s,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const n=e.getCurrentPage(),o=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!n&&!o))return{page:n,pageSize:o}}setPaginationState(e,t){const{pagination:n,gos:o}=this.beans;if(!n)return;const{pageSize:s,page:r}=e??{page:0,pageSize:o.get("paginationPageSize")},i=t==="gridInitializing";s&&!o.get("paginationAutoPageSize")&&n.setPageSize(s,i?"initialState":"pageSizeSelector"),typeof r=="number"&&(i?n.setPage(r):n.goToPage(r))}getRowSelectionState(){var o;const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((o=t==null?void 0:t.toggledNodes)!=null&&o.length)?void 0:t}setRowSelectionState(e,t){var n;(n=this.beans.selectionSvc)==null||n.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t,n){const o=this.beans.expansionSvc;if(!o)return;const s=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};o.setExpansionState(s,n)}updateColumnState(e){const t=this.getColumnState();let n=!1;const o=this.cachedState;for(const s of Object.keys(t)){const r=t[s];Dp(r,o[s])||(n=!0)}this.cachedState={...o,...t},n&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const n=this.cachedState[e];this.setCachedStateValue(e,t),Dp(t,n)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){var e;this.suppressEvents=!0,(e=this.beans.colAnimation)==null||e.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{var t;this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&((t=this.beans.colAnimation)==null||t.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},H_e={moduleName:"GridState",version:ct,beans:[$_e],apiFunctions:{getState:N_e,setState:L_e}};function G_e(e){return e.rowModel.isLastRowIndexKnown()}function U_e(e){var t;return((t=e.pagination)==null?void 0:t.getPageSize())??100}function W_e(e){var t;return((t=e.pagination)==null?void 0:t.getCurrentPage())??0}function z_e(e){var t;return((t=e.pagination)==null?void 0:t.getTotalPages())??1}function j_e(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function K_e(e){var t;(t=e.pagination)==null||t.goToNextPage()}function q_e(e){var t;(t=e.pagination)==null||t.goToPreviousPage()}function Y_e(e){var t;(t=e.pagination)==null||t.goToFirstPage()}function X_e(e){var t;(t=e.pagination)==null||t.goToLastPage()}function Z_e(e,t){var n;(n=e.pagination)==null||n.goToPage(t)}var J_e=class extends qe{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,n=()=>{const o=Math.max(qu(t),1),s=Math.floor(e/o);t.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?Yo(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},ug="paginationPageSizeSelector",Q_e={tag:"span",cls:"ag-paging-page-size"},eRe=class extends Cn{constructor(){super(Q_e),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.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(ug,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!(e!=null&&e.newPageSize))return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){qo(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(ug)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),n=!t||!e.includes(t);if(n){const s=this.gos.exists("paginationPageSize"),r=this.gos.get(ug)!==!0;Je(94,{pageSizeSet:s,pageSizesSet:r,pageSizeOptions:e,paginationPageSizeOption:t}),r||Je(95,{paginationPageSizeOption:t,paginationPageSizeSelector:ug}),e.unshift("")}const o=String(n?"":t);this.selectPageSizeComp?(Fl(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(o,!0)):this.createPageSizeSelectorComp(e,o),this.hasEmptyOption=n}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const n=this.getLocaleTextFunc(),o=n("pageSizeSelectorLabel","Page Size:"),s=n("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Z_).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(s).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(ug);return!Array.isArray(t)||!(t!=null&&t.length)?e:[...t].sort((n,o)=>n-o)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},tRe={selector:"AG-PAGE-SIZE-SELECTOR",component:eRe},nRe=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:var(--ag-pagination-panel-height);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}",oRe=class extends V${constructor(){super(),this.btFirst=dt,this.btPrevious=dt,this.btNext=dt,this.btLast=dt,this.lbRecordCount=dt,this.lbFirstRowOnPage=dt,this.lbLastRowOnPage=dt,this.lbCurrent=dt,this.lbTotal=dt,this.pageSizeComp=dt,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(nRe)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[tRe]);const{btFirst:t,btPrevious:n,btNext:o,btLast:s}=this;this.activateTabIndex([t,n,o,s]),t.insertAdjacentElement("afterbegin",kr(e?"last":"first",this.beans)),n.insertAdjacentElement("afterbegin",kr(e?"next":"previous",this.beans)),o.insertAdjacentElement("afterbegin",kr(e?"previous":"next",this.beans)),s.insertAdjacentElement("afterbegin",kr(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:r=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(r):Jpe(this.beans,r),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{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)}]){const{el:t,fn:n}=e;this.addManagedListeners(t,{click:n,keydown:o=>{(o.key===Ve.ENTER||o.key===Ve.SPACE)&&(o.preventDefault(),n())}})}Zpe(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):Vbe(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),n=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const o=this.isZeroPagesToDisplay(),s=e===n-1;this.nextButtonDisabled=s||o,this.lastButtonDisabled=!t||o||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){fce(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),n=this.pagination.getMasterRowCount(),o=e?n:null,s=this.pagination.getCurrentPage(),r=this.pagination.getPageSize();let i,a;this.isZeroPagesToDisplay()?i=a=0:(i=r*s+1,a=i+r-1,e&&a>o&&(a=o));const l=i+r-1,u=!e&&n<l,c=this.formatNumber(i);this.lbFirstRowOnPage.textContent=c;let d;const h=this.getLocaleTextFunc();u?d=h("pageLastRowUnknown","?"):d=this.formatNumber(a),this.lbLastRowOnPage.textContent=d;const p=t>0?s+1:0,g=this.formatNumber(p);this.lbCurrent.textContent=g;let v,w;if(e)v=this.formatNumber(t),w=this.formatNumber(o);else{const S=h("more","more");v=S,w=S}this.lbTotal.textContent=v,this.lbRecordCount.textContent=w,this.announceAriaStatus(c,d,w,g,v)}announceAriaStatus(e,t,n,o,s){var d,h;const r=this.getLocaleTextFunc(),i=r("page","Page"),a=r("to","to"),l=r("of","of"),u=`${e} ${a} ${t} ${l} ${n}`,c=`${i} ${o} ${l} ${s}`;u!==this.ariaRowStatus&&(this.ariaRowStatus=u,(d=this.ariaAnnounce)==null||d.announceValue(u,"paginationRow")),c!==this.ariaPageStatus&&(this.ariaPageStatus=c,(h=this.ariaAnnounce)==null||h.announceValue(c,"paginationPage"))}},sRe={selector:"AG-PAGINATION",component:oRe},rRe=class extends qe{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return sRe}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:n}=this.beans;n!=null&&n.isEditing()&&(n.isBatchEditing()?n.cleanupEditors():n.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){var n,o;if(!this.active)return;let t=e;this.paginateChildRows||(t=((o=(n=this.beans.rowModel).getTopLevelIndexFromDisplayedIndex)==null?void 0:o.call(n,e))??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.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 ft(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:ft(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:ft(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:ft(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const n=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}n!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const n=this.pageSize,o=t-1;this.totalPages=Math.floor(o/n)+1,this.adjustCurrentPageIfInvalid();const s=this.currentPage,r=n*s;let i=n*(s+1)-1;if(i>o&&(i=o),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(r),i===o)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(i+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:n}=this,o=e-1;this.totalPages=Math.floor(o/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*n,this.bottomDisplayedRowIndex=t*(n+1)-1,this.bottomDisplayedRowIndex>o&&(this.bottomDisplayedRowIndex=o)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:n=!1,newPageSize:o=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:n,newPageSize:o,keepRenderedRows:t})}},iRe={moduleName:"Pagination",version:ct,beans:[rRe,J_e],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:G_e,paginationGetPageSize:U_e,paginationGetCurrentPage:W_e,paginationGetTotalPages:z_e,paginationGetRowCount:j_e,paginationGoToNextPage:K_e,paginationGoToPreviousPage:q_e,paginationGoToFirstPage:Y_e,paginationGoToLastPage:X_e,paginationGoToPage:Z_e},dependsOn:[Ow]};function aRe(e,t={}){const n=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(n))}function IG(e,t,n,o,s){t&&(o&&t.parent&&t.parent.level!==-1&&IG(e,t.parent,n,o,s),t.setExpanded(n,void 0,s))}function lRe(e,t){return e.rowModel.getRowNode(t)}function uRe(e,t,n,o){e.rowRenderer.addRenderedRowListener(t,n,o)}function cRe(e){return e.rowRenderer.getRenderedNodes()}function dRe(e,t,n){e.rowModel.forEachNode(t,n)}function hRe(e){return e.rowRenderer.firstRenderedRow}function fRe(e){return e.rowRenderer.lastRenderedRow}function pRe(e,t){return e.rowModel.getRow(t)}function gRe(e){return e.rowModel.getRowCount()}var mRe={moduleName:"RowApi",version:ct,apiFunctions:{redrawRows:aRe,setRowNodeExpanded:IG,getRowNode:lRe,addRenderedRowListener:uRe,getRenderedNodes:cRe,forEachNode:dRe,getFirstDisplayedRowIndex:hRe,getLastDisplayedRowIndex:fRe,getDisplayedRowAtIndex:pRe,getDisplayedRowCount:gRe}},vRe={moduleName:"ScrollApi",version:ct,apiFunctions:{getVerticalPixelRange:AEe,getHorizontalPixelRange:PEe,ensureColumnVisible:uG,ensureIndexVisible:cG,ensureNodeVisible:kEe}};function yRe(e,t,n){if(!t)return;const o=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;n===null?o.removeAttribute(s):o.setAttribute(s,n)}function wRe(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function CRe(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function bRe(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function SRe(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function ERe(e){return{rowHeight:qu(e),headerHeight:Xp(e)}}function _Re(e,t={}){var r;const n=[];for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const a=i.getCellRenderer();a!=null&&n.push(Kp(a))}if((r=t.columns)!=null&&r.length)return n;const o=[],s=qR(t.rowNodes);for(const i of e.rowRenderer.getAllRowCtrls()){if(s&&!YR(i.rowNode,s)||!i.isFullWidth())continue;const a=i.getFullWidthCellRenderers();for(let l=0;l<a.length;l++){const u=a[l];u!=null&&o.push(Kp(u))}}return[...o,...n]}var RRe={moduleName:"RenderApi",version:ct,apiFunctions:{setGridAriaProperty:yRe,refreshCells:wRe,refreshHeader:CRe,isAnimationFrameQueueEmpty:bRe,flushAllAnimationFrames:SRe,getSizesForCurrentTheme:ERe,getCellRendererInstances:_Re}};function TRe(e,t){var n,o;typeof t=="number"?(n=e.colAutosize)==null||n.sizeColumnsToFit(t,"api"):(o=e.colAutosize)==null||o.sizeColumnsToFitGridBody(t)}function xG({colAutosize:e,visibleCols:t},n,o){Array.isArray(n)?e==null||e.autoSizeCols({colKeys:n,skipHeader:o,source:"api"}):e==null||e.autoSizeCols({...n,colKeys:n.colIds??t.allCols,source:"api"})}function DRe(e,t){var n;t&&typeof t=="object"?xG(e,t):(n=e.colAutosize)==null||n.autoSizeAllColumns({source:"api",skipHeader:t})}var IRe=class extends qe{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){var n;const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let o=!1;const s=t.type;if(s==="fitGridWidth"||s==="fitProvidedWidth")o=!0;else if(s==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const r=e.get("rowData");o=r!=null&&r.length>0&&io(e)}o&&((n=this.beans.colDelayRenderSvc)==null||n.hideColumns(s))}}autoSizeCols(e){const{eventSvc:t,visibleCols:n}=this.beans;this.innerAutoSizeCols(e).then(o=>{var u;const s=c=>qd(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return s(o);const r=AG(this.beans),i=c=>n.leftCols.some(d=>Wp(d,c)),a=c=>n.rightCols.some(d=>Wp(d,c)),l=e.colKeys.filter(c=>!ka(c)&&!Fa(c)&&!i(c)&&!a(c));this.sizeColumnsToFit(r,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:(u=e.columnLimits)==null?void 0:u.map(c=>({...c,key:c.colId})),colKeys:l,onlyScaleUp:!0}),s(o)})}innerAutoSizeCols(e){return new Promise((t,n)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,n));const{colKeys:o,skipHeader:s,skipHeaderGroups:r,stopAtGroup:i,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:u=[],source:c="api"}=e,{animationFrameSvc:d,renderStatus:h,colModel:f,autoWidthCalc:p,visibleCols:g}=this.beans;if(d==null||d.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,n)});return}this.timesDelayed=0;const v=new Set;let w=-1;const S=Object.fromEntries(u.map(({colId:E,..._})=>[E,_])),b=s??this.gos.get("skipHeaderOnAutoSize"),y=r??b;for(;w!==0;){w=0;const E=[];for(const _ of o){if(!_||Rde(_))continue;const I=f.getCol(_);if(!I||v.has(I))continue;const T=p.getPreferredWidthForColumn(I,b);if(T>0){const F=S[I.colId]??{};F.minWidth??(F.minWidth=l),F.maxWidth??(F.maxWidth=a);const L=xRe(I,T,F);I.setActualWidth(L,c),v.add(I),w++}E.push(I)}E.length&&g.refresh(c)}y||this.autoSizeColumnGroupsByColumns(o,c,i),t(v)})}autoSizeColumn(e,t,n){this.autoSizeCols({colKeys:[e],skipHeader:n,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,n){const{colModel:o,ctrlsSvc:s}=this.beans,r=new Set,i=o.getColsForKeys(e);for(const l of i){let u=l.getParent();for(;u&&u!=n;)u.isPadding()||r.add(u),u=u.getParent()}let a;for(const l of r){for(const u of s.getHeaderRowContainerCtrls())if(a=u.getHeaderCtrlForColumn(l),a)break;a==null||a.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const n=this.gos.get("skipHeaderOnAutoSize"),o=()=>{this.autoSizeColumn(t,"uiColumnResized",n)};e.addEventListener("dblclick",o);const s=new sc(e);return s.addEventListener("doubleTap",o),()=>{e.removeEventListener("dblclick",o),s.destroy()}}addColumnGroupResize(e,t,n){const o=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const r=[],i=t.getDisplayedLeafColumns();for(const a of i)a.getColDef().suppressAutoSize||r.push(a.getColId());r.length>0&&this.autoSizeCols({colKeys:r,skipHeader:o,stopAtGroup:t,source:"uiColumnResized"}),n()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const n=AG(this.beans);if(n>0){this.sizeColumnsToFit(n,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):Je(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",n,o){var p,g;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,n,o));return}const s={};for(const{key:v,...w}of(o==null?void 0:o.columnLimits)??[])s[typeof v=="string"?v:v.getColId()]=w;const r=this.beans.visibleCols.allCols;if(e<=0||!r.length)return;const i=Pa(r);if(o!=null&&o.onlyScaleUp&&i>e||e===i&&r.every(w=>{if(w.colDef.suppressSizeToFit)return!0;const S=s==null?void 0:s[w.getId()],b=(S==null?void 0:S.minWidth)??(o==null?void 0:o.defaultMinWidth),y=(S==null?void 0:S.maxWidth)??(o==null?void 0:o.defaultMaxWidth),E=w.getActualWidth();return(b==null||E>=b)&&(y==null||E<=y)}))return;const l=[],u=[];for(const v of r){const w=((p=o==null?void 0:o.colKeys)==null?void 0:p.some(S=>Wp(v,S)))??!0;v.getColDef().suppressSizeToFit||!w?u.push(v):l.push(v)}const c=l.slice(0);let d=!1;const h=v=>{ti(l,v),u.push(v)};for(const v of l){v.resetActualWidth(t);const w=s==null?void 0:s[v.getId()],S=(w==null?void 0:w.minWidth)??(o==null?void 0:o.defaultMinWidth),b=(w==null?void 0:w.maxWidth)??(o==null?void 0:o.defaultMaxWidth),y=v.getActualWidth();typeof S=="number"&&y<S?v.setActualWidth(S,t,!0):typeof b=="number"&&y>b&&v.setActualWidth(b,t,!0)}for(;!d;){d=!0;const v=e-Pa(u);if(v<=0)for(const w of l){const S=((g=s==null?void 0:s[w.getId()])==null?void 0:g.minWidth)??(o==null?void 0:o.defaultMinWidth)??w.minWidth;w.setActualWidth(S,t,!0)}else{const w=v/Pa(l);let S=v;for(let b=l.length-1;b>=0;b--){const y=l[b],E=s==null?void 0:s[y.getId()],_=(E==null?void 0:E.minWidth)??(o==null?void 0:o.defaultMinWidth),I=(E==null?void 0:E.maxWidth)??(o==null?void 0:o.defaultMaxWidth),T=y.getMinWidth(),F=y.getMaxWidth(),L=typeof _=="number"&&_>T?_:T,x=typeof I=="number"&&I<F?I:F;let P=Math.round(y.getActualWidth()*w);P<L?(P=L,h(y),d=!1):P>x?(P=x,h(y),d=!1):b===0&&(P=S),y.setActualWidth(P,t,!0),S-=P}}}for(const v of c)v.fireColumnWidthChangedEvent(t);const f=this.beans.visibleCols;f.setLeftValues(t),f.updateBodyWidths(),!n&&qd(this.eventSvc,c,!0,t)}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,n=e.get("autoSizeStrategy");(n==null?void 0:n.type)!=="fitGridWidth"&&(n==null?void 0:n.type)!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const o=n.type;if(o==="fitGridWidth"){const{columnLimits:s,defaultMinWidth:r,defaultMaxWidth:i}=n,a=s==null?void 0:s.map(({colId:l,minWidth:u,maxWidth:c})=>({key:l,minWidth:u,maxWidth:c}));this.sizeColumnsToFitGridBody({defaultMinWidth:r,defaultMaxWidth:i,columnLimits:a})}else o==="fitProvidedWidth"&&this.sizeColumnsToFit(n.width,"sizeColumnsToFit");t==null||t.revealColumns(o)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{var o;if(!this.isAlive())return;const n="autosizeColumns";e?this.autoSizeCols({...t,source:n,colKeys:e}):this.autoSizeAllColumns({...t,source:n}),(o=this.beans.colDelayRenderSvc)==null||o.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function xRe(e,t,n={}){const o=n.minWidth??e.getMinWidth();t<o&&(t=o);const s=n.maxWidth??e.getMaxWidth();return t>s&&(t=s),t}function AG({ctrlsSvc:e,scrollVisibleSvc:t}){const n=e.getGridBodyCtrl(),s=n.isVerticalScrollShowing()?t.getScrollbarWidth():0;return kp(n.eGridBody)-s}var ARe={moduleName:"ColumnAutoSize",version:ct,beans:[IRe],apiFunctions:{sizeColumnsToFit:TRe,autoSizeColumns:xG,autoSizeAllColumns:DRe},dependsOn:[tH]},PRe=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function kRe(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function FRe(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function ORe(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedTopRow(t)}function MRe(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedBottomRow(t)}function NRe(e,t,n){var o;return(o=e.pinnedRowModel)==null?void 0:o.forEachPinnedRow(t,n)}var LRe={moduleName:"PinnedRow",version:ct,beans:[Oge],css:[PRe],apiFunctions:{getPinnedTopRowCount:kRe,getPinnedBottomRowCount:FRe,getPinnedTopRow:ORe,getPinnedBottomRow:MRe,forEachPinnedRow:NRe},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},VRe=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){var n;const e=(n=this.firstNode.__autoHeights)==null?void 0:n[this.col.getColId()];if(e==null)return;let t=0;for(const o of this.spannedNodes)o!==this.lastNode&&(t+=o.rowHeight);return e-t}},BRe=class extends qe{constructor(e){super(),this.column=e}buildCache(e){var b;const{column:t,beans:{gos:n,pinnedRowModel:o,rowModel:s,valueSvc:r,pagination:i}}=this,{colDef:a}=t,l=this.getNodeMap(e),u=new Map,c=n.getCallback("isFullWidthRow"),d=a.equals,h=a.spanRows,f=typeof h=="function";let p=null,g=null,v;const w=(y,E)=>{p=y,g=null,v=E},S=y=>{const E=!y.isExpandable()&&!y.group&&!y.detail&&(c?!c({rowNode:y}):!0);if(y.rowIndex==null||!E){w(null,null);return}if(p==null||y.level!==p.level||y.footer||g&&y.rowIndex-1!==(g==null?void 0:g.getLastNode().rowIndex)){w(y,r.getValue(t,y));return}const _=r.getValue(t,y);if(f){const I=Ot(n,{valueA:v,nodeA:p,valueB:_,nodeB:y,column:t,colDef:a});if(!h(I)){w(y,_);return}}else if(d?!d(v,_):v!==_){w(y,_);return}if(!g){const I=l==null?void 0:l.get(p);(I==null?void 0:I.firstNode)===p?(I.reset(),g=I):g=new VRe(t,p),u.set(p,g)}g.addSpannedNode(y),u.set(y,g)};switch(e){case"center":(b=s.forEachDisplayedNode)==null||b.call(s,y=>{(!i||i.isRowInPage(y.rowIndex))&&S(y)}),this.centerValueNodeMap=u;break;case"top":o==null||o.forEachPinnedRow("top",S),this.topValueNodeMap=u;break;case"bottom":o==null||o.forEachPinnedRow("bottom",S),this.bottomValueNodeMap=u;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},$Re=class extends qe{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=Yo(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=Yo(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const n=this.createManagedBean(new BRe(e));this.spanningColumns.set(e,n),n.buildCache("top"),n.buildCache("bottom"),n.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t==null||t.createCtrls("top"),t==null||t.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t==null||t.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const n=this.spanningColumns.get(e);return n?n.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:n}=this.beans,o=e.column,s=e.rowIndex,r=this.spanningColumns.get(o);if(!r)return;let i;switch(e.rowPinned){case"top":i=t==null?void 0:t.getPinnedTopRow(s);break;case"bottom":i=t==null?void 0:t.getPinnedBottomRow(s);break;default:i=n.getRow(s)}if(i)return r.getCellSpan(i)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const n=this.spanningColumns.get(e);if(n)return n.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[n,o]of this.spanningColumns)if(o.isCellSpanning(e)){const s=o.getCellSpan(e);t(n,s)}}destroy(){super.destroy(),this.spanningColumns.clear()}},HRe=class extends ih{constructor(e,t,n){super(e.col,e.firstNode,n,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,n,o,s,r,i){this.eWrapper=n,super.setComp(e,t,n,o,s,r,i),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||Ny(e,t.rowIndex)}setAriaRowSpan(){yce(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(Sw(t)){this.focusedCellPosition=void 0;return}const n=this.isCellFocused();n||(this.focusedCellPosition=void 0),e&&n&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},GRe=class extends kw{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var o;const t=(o=this.beans.rowSpanSvc)==null?void 0:o.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new HRe(t,this,this.beans)}isCorrectCtrlForSpan(e){var o;const t=(o=this.beans.rowSpanSvc)==null?void 0:o.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},URe=class extends qe{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,n=this.getCtrlsMap(e),o=n.size,s=this.getAllRelevantRowControls(e),r=new Map;let i=!1;for(const l of s)l.isAlive()&&(t==null||t.forEachSpannedColumn(l.rowNode,(u,c)=>{if(r.has(c.firstNode))return;const d=n.get(c.firstNode);if(d){r.set(c.firstNode,d),n.delete(c.firstNode);return}i=!0;const h=new GRe(c.firstNode,this.beans,!1,!1,!1);r.set(c.firstNode,h)}));this.setCtrlsMap(e,r);const a=r.size===o;if(!(!i&&a)){for(const l of n.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,n=t==null?void 0:t.getCellSpanByPosition(e);if(!n)return;const o=this.getCtrlsMap(e.rowPinned).get(n.firstNode);if(o)return o.getAllCellCtrls().find(s=>s.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},WRe={moduleName:"CellSpan",version:ct,beans:[$Re,URe]},zRe=class extends qe{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,n=e.colDef,o=n.cellClassRules,s=this.getCellClassParams(e,n);jR(this.beans.expressionSvc,o===this.cellClassRules?void 0:this.cellClassRules,o,s,r=>t.toggleCss(r,!0),r=>t.toggleCss(r,!1)),this.cellClassRules=o}applyUserStyles(){const e=this.column,t=e.colDef,n=t.cellStyle;if(!n)return;let o;if(typeof n=="function"){const s=this.getCellClassParams(e,t);o=n(s)}else o=n;o&&this.cellComp.setUserStyles(o)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,n=e.colDef,o=this.getCellClassParams(e,n);for(const r of this.staticClasses)t.toggleCss(r,!1);const s=this.beans.cellStyles.getStaticCellClasses(n,o);this.staticClasses=s;for(const r of s)t.toggleCss(r,!0)}getCellClassParams(e,t){const{value:n,rowNode:o}=this.cellCtrl;return Ot(this.beans.gos,{value:n,data:o.data,node:o,colDef:t,column:e,rowIndex:o.rowIndex})}},jRe=class extends qe{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,n,o){jR(this.beans.expressionSvc,void 0,e.cellClassRules,t,n,o),this.processStaticCellClasses(e,t,n)}getStaticCellClasses(e,t){const{cellClass:n}=e;if(!n)return[];let o;return typeof n=="function"?o=n(t):o=n,typeof o=="string"&&(o=[o]),o||[]}createCellCustomStyleFeature(e,t){return new zRe(e,t)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(s=>{n(s)})}},KRe={moduleName:"CellStyle",version:ct,beans:[jRe]},qRe={moduleName:"RowStyle",version:ct,beans:[OCe]};function YRe(e,t){var n;return!!((n=e.colHover)!=null&&n.isHovered(t))}var XRe=class extends qe{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=n=>{const{beans:o,gos:s,element:r,columns:i}=this,a=o.colHover;if(n??!!s.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(r,{mouseover:a.setMouseOver.bind(a,i),mouseout:a.clearMouseOver.bind(a)});else{for(const u of this.destroyManagedListeners)u();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},ZRe="ag-column-hover",JRe=class extends qe{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,n){const o=()=>{const s=this.isHovered(n);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:o}),o()}onCellColumnHover(e,t){if(!t)return;const n=this.isHovered(e);t.toggleCss(ZRe,n)}addHeaderFilterColumnHoverListener(e,t,n,o){this.createHoverFeature(e,[n],o);const s=()=>{const r=this.isHovered(n);t.toggleCss("ag-column-hover",r)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,n){e.createManagedBean(new XRe(t,n))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},QRe={moduleName:"ColumnHover",version:ct,beans:[JRe],apiFunctions:{isColumnHovered:YRe}},eTe=class extends qe{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){var e,t;this.wrapSvc=(t=(e=this.beans.frameworkOverrides).createGlobalEventListenerWrapper)==null?void 0:t.call(e)}addListener(e,t){var r;const n=((r=this.wrapSvc)==null?void 0:r.wrap(e,t))??t,o=!xw.has(e),s=o?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(n),this.eventSvc.addListener(e,n,o)}removeListener(e,t){var r,i;const n=((r=this.wrapSvc)==null?void 0:r.unwrap(e,t))??t,o=this.asyncListeners.get(e),s=!!(o!=null&&o.delete(n));s||(i=this.syncListeners.get(e))==null||i.delete(n),this.eventSvc.removeListener(e,n,s)}addGlobalListener(e){var r;const t=((r=this.wrapSvc)==null?void 0:r.wrapGlobal(e))??e,n=(i,a)=>{xw.has(i)&&t(i,a)},o=(i,a)=>{xw.has(i)||t(i,a)};this.globalListenerPairs.set(e,{syncListener:n,asyncListener:o});const s=this.eventSvc;s.addGlobalListener(n,!1),s.addGlobalListener(o,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:n,globalListenerPairs:o}=this,s=(n==null?void 0:n.unwrapGlobal(e))??e;if(o.has(s)){const{syncListener:i,asyncListener:a}=o.get(s);t.removeGlobalListener(i,!1),t.removeGlobalListener(a,!0),o.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((n,o)=>{n.forEach(s=>this.eventSvc.removeListener(o,s,t)),n.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const n of e)this.eventSvc.removeGlobalListener(n,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:n,asyncListener:o})=>{t.removeGlobalListener(n,!1),t.removeGlobalListener(o,!0)}),e.clear()}};function tTe(e,t,n){var o;(o=e.apiEventSvc)==null||o.addListener(t,n)}function nTe(e,t,n){var o;(o=e.apiEventSvc)==null||o.removeListener(t,n)}function oTe(e,t){var n;(n=e.apiEventSvc)==null||n.addGlobalListener(t)}function sTe(e,t){var n;(n=e.apiEventSvc)==null||n.removeGlobalListener(t)}var rTe={moduleName:"EventApi",version:ct,apiFunctions:{addEventListener:tTe,addGlobalListener:oTe,removeEventListener:nTe,removeGlobalListener:sTe},beans:[eTe]},iTe={moduleName:"Locale",version:ct,beans:[Mbe]},aTe=class extends qe{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=Yo(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){var a,l,u,c;const{visibleCols:e,rowModel:t,rowSpanSvc:n,pinnedRowModel:o}=this.beans,s=e.autoHeightCols;let r=!1;const i=d=>{var p;const h=d.__autoHeights;let f=Pl(this.beans,d).height;for(const g of s){let v=h==null?void 0:h[g.getColId()];const w=n==null?void 0:n.getCellSpan(g,d);if(w){if(w.getLastNode()!==d)continue;if(v=(p=n==null?void 0:n.getCellSpan(g,d))==null?void 0:p.getLastNodeAutoHeight(),!v)return}if(v==null){if(this.colSpanSkipCell(g,d))continue;return}f=Math.max(v,f)}f!==d.rowHeight&&(d.setRowHeight(f),r=!0)};(a=o==null?void 0:o.forEachPinnedRow)==null||a.call(o,"top",i),(l=o==null?void 0:o.forEachPinnedRow)==null||l.call(o,"bottom",i),(u=t.forEachDisplayedNode)==null||u.call(t,i),r&&((c=t.onRowHeightChanged)==null||c.call(t))}setRowAutoHeight(e,t,n){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[n.getId()];return}const o=e.__autoHeights[n.getId()];e.__autoHeights[n.getId()]=t,o!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:n,colViewport:o,visibleCols:s}=this.beans;if(!n.colSpanActive)return!1;let r=[];switch(e.getPinned()){case"left":r=s.getLeftColsForRow(t);break;case"right":r=s.getRightColsForRow(t);break;case null:r=o.getColsWithinViewport(t);break}return!r.includes(e)}setupCellAutoHeight(e,t,n){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const o=t.parentElement,{rowNode:s,column:r}=e,i=this.beans,a=c=>{var S;if((S=this.beans.editSvc)!=null&&S.isEditing(e)||!e.isAlive()||!n.isAlive())return;const{paddingTop:d,paddingBottom:h,borderBottomWidth:f,borderTopWidth:p}=ju(o),g=d+h+f+p,w=t.offsetHeight+g;if(c<5){const b=$o(i),y=!(b!=null&&b.contains(t)),E=w==0;if(y||E){window.setTimeout(()=>a(c+1),0);return}}this.setRowAutoHeight(s,w,r)},l=()=>a(0);l();const u=Il(i,t,l);return n.addDestroyFunc(()=>{u(),this.setRowAutoHeight(s,void 0,r)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:n}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(n).filter(s=>s.isAutoHeight())),t.length!==0){if(!n.__autoHeights)return!1;for(const o of t){const s=n.__autoHeights[o.getColId()];if(!s||n.rowHeight<s)return!1}}return!0}},lTe={moduleName:"RowAutoHeight",version:ct,beans:[aTe]},uTe={moduleName:"AllCommunity",version:ct,dependsOn:[RG,g_e,R_e,Qbe,u0e,c0e,d0e,h0e,f0e,p0e,g0e,l0e,tEe,nEe,oEe,eEe,rEe,iEe,H_e,$0e,iRe,rH,mRe,vRe,RRe,ARe,qme,LRe,A0e,mbe,KRe,QRe,qRe,rTe,wbe,M_e,iG,iTe,lTe,Kme,l_e,WRe]};let PG=!1;PG||(tde.registerModules([uTe,RG]),PG=!0);class cTe{constructor(t,n){Rn(this,"gridApi",null);Rn(this,"container");Rn(this,"config");Rn(this,"eventListeners",new Map);this.container=t,this.config=n}init(){if(this.gridApi)throw new Error("Grid already initialized");const{onGridReady:t,onCellClicked:n,onCellFocused:o,onRowSelected:s,...r}=this.config,i={...r,onGridReady:a=>{this.gridApi=a.api,t&&t(a)},onCellClicked:a=>{n&&n(a)},onCellFocused:a=>{o&&o(a)},onRowSelected:a=>{s&&s(a)}};return this.gridApi=Pbe(this.container,i),this.gridApi}updateRowData(t){this.gridApi&&this.gridApi.setGridOption("rowData",t)}updateColumnDefs(t){this.gridApi&&this.gridApi.setGridOption("columnDefs",t)}setColumnWidth(t){var n;this.gridApi&&((n=this.gridApi)==null||n.applyColumnState({state:t,applyOrder:!1}))}updateDatasource(t){this.gridApi&&this.gridApi.setGridOption("datasource",t)}refreshInfiniteCache(){this.gridApi&&this.gridApi.refreshInfiniteCache()}sizeColumnsToFit(){this.gridApi}deselectAll(){this.gridApi&&this.gridApi.deselectAll()}getSelectedRows(){var t;return((t=this.gridApi)==null?void 0:t.getSelectedRows())||[]}setQuickFilterText(t){this.gridApi&&this.gridApi.setGridOption("quickFilterText",t)}getColumnState(){var t;return(t=this.gridApi)==null?void 0:t.getColumnState()}addEventListener(t,n){if(!this.gridApi)throw new Error("Grid not initialized");this.eventListeners.has(t)||this.eventListeners.set(t,new Set),this.eventListeners.get(t).add(n),this.gridApi.addEventListener(t,n)}addRow(t,n="bottom"){if(this.gridApi){const o={add:[t],addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(o),n==="bottom"){const s=this.gridApi.getDisplayedRowCount();s>0&&this.gridApi.ensureIndexVisible(s-1,"bottom")}}}addRows(t,n="bottom"){if(this.gridApi&&t.length>0){const o={add:t,addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(o),n==="bottom"){const s=this.gridApi.getDisplayedRowCount();s>0&&this.gridApi.ensureIndexVisible(s-1,"bottom")}}}destroy(){this.gridApi&&(this.eventListeners.forEach((t,n)=>{t.forEach(o=>{var s;(s=this.gridApi)==null||s.removeEventListener(n,o)})}),this.eventListeners.clear(),this.gridApi.destroy(),this.gridApi=null)}getApi(){return this.gridApi}switchTheme(t){document.body.dataset.agThemeMode=t==="dark"?"dark":"light"}}const dTe=dH.withParams({accentColor:"var(--primary-color)",backgroundColor:"#ffffff",borderColor:"#e5e7eb",borderRadius:4,browserColorScheme:"light",chromeBackgroundColor:"#f9fafb",columnBorder:!0,fontFamily:"inherit",fontSize:14,foregroundColor:"#111827",headerBackgroundColor:"#fff",headerFontSize:14,headerFontWeight:600,headerTextColor:"#374151",iconSize:16,rowBorder:!0,spacing:8,headerHeight:40,rowHeight:32,wrapperBorder:!0,wrapperBorderRadius:4},"light").withParams({accentColor:"var(--primary-color)",backgroundColor:"#1f2937",borderColor:"#374151",borderRadius:4,browserColorScheme:"dark",chromeBackgroundColor:"#111827",columnBorder:!0,fontFamily:"inherit",fontSize:14,foregroundColor:"#f9fafb",headerBackgroundColor:"#374151",headerFontSize:14,headerFontWeight:600,headerTextColor:"#f9fafb",iconSize:16,rowBorder:!0,spacing:8,headerHeight:40,rowHeight:32,wrapperBorder:!0,wrapperBorderRadius:4},"dark"),hTe=ot({__name:"AgTable",props:{statusBar:{},sideBar:{type:[Object,String,Array,Boolean,null]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:{},suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:{},tooltipShowDelay:{},tooltipHideDelay:{},tooltipMouseTrack:{type:Boolean},tooltipShowMode:{},tooltipInteraction:{type:Boolean},popupParent:{},copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:{},suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:{},defaultColDef:{},defaultColGroupDef:{},columnTypes:{},dataTypeDefinitions:{},maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:{},groupHeaderHeight:{},floatingFiltersHeight:{},pivotHeaderHeight:{},pivotGroupHeaderHeight:{},hidePaddedHeaderRows:{type:Boolean},allowDragFromColumnsToolPanel:{type:Boolean},suppressMovableColumns:{type:Boolean},suppressColumnMoveAnimation:{type:Boolean},suppressMoveWhenColumnDragging:{type:Boolean},suppressDragLeaveHidesColumns:{type:Boolean},suppressGroupChangesColumnVisibility:{type:[Boolean,String]},suppressMakeColumnVisibleAfterUnGroup:{type:Boolean},suppressRowGroupHidesColumns:{type:Boolean},colResizeDefault:{},suppressAutoSize:{type:Boolean},autoSizePadding:{},skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:{},components:{},editType:{},suppressStartEditOnTab:{type:Boolean},getFullRowEditValidationErrors:{type:Function},invalidEditValueMode:{},singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:{},defaultCsvExportParams:{},suppressCsvExport:{type:Boolean},defaultExcelExportParams:{},suppressExcelExport:{type:Boolean},excelStyles:{},findSearchValue:{},findOptions:{},quickFilterText:{},cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:{},advancedFilterBuilderParams:{},advancedFilterParams:{},suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableFilterHandlers:{type:Boolean},filterHandlers:{},enableCharts:{type:Boolean},chartThemes:{},customChartThemes:{},chartThemeOverrides:{},chartToolPanelsDef:{},chartMenuItems:{type:[Array,Function]},loadingCellRenderer:{},loadingCellRendererParams:{},loadingCellRendererSelector:{type:Function},localeText:{},masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:{},detailCellRenderer:{},detailCellRendererParams:{},detailRowHeight:{},detailRowAutoHeight:{type:Boolean},context:{},alignedGrids:{type:[Array,Function]},tabIndex:{},rowBuffer:{},valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:{},loadingOverlayComponent:{},loadingOverlayComponentParams:{},suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:{},noRowsOverlayComponent:{},noRowsOverlayComponentParams:{},suppressNoRowsOverlay:{type:Boolean},pagination:{type:Boolean},paginationPageSize:{},paginationPageSizeSelector:{type:[Array,Boolean]},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:{},pivotMaxGeneratedColumns:{},pivotDefaultExpanded:{},pivotColumnGroupTotals:{},pivotRowTotals:{},pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:{},suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:{},cellFadeDuration:{},allowShowChangeAfterFilter:{type:Boolean},domLayout:{},ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},rowDragInsertDelay:{},suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},dragAndDropImageComponent:{},dragAndDropImageComponentParams:{},fullWidthCellRenderer:{},fullWidthCellRendererParams:{},embedFullWidthRows:{type:Boolean},groupDisplayType:{},groupDefaultExpanded:{},autoGroupColumnDef:{},groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:{},groupAggFiltering:{type:[Boolean,Function]},groupTotalRow:{type:[String,Function]},grandTotalRow:{},suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:{},groupRowRenderer:{},groupRowRendererParams:{},treeData:{type:Boolean},treeDataChildrenField:{},treeDataParentIdField:{},rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},groupHierarchyConfig:{},pinnedTopRowData:{},pinnedBottomRowData:{},enableRowPinning:{type:[Boolean,String]},isRowPinnable:{type:Function},isRowPinned:{type:Function},rowModelType:{},rowData:{},asyncTransactionWaitMillis:{},suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:{},cacheOverflowSize:{},infiniteInitialRowCount:{},serverSideInitialRowCount:{},suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:{},maxBlocksInCache:{},maxConcurrentDatasourceRequests:{},blockLoadDebounceMillis:{},purgeClosedRowNodes:{type:Boolean},serverSideDatasource:{},serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:{},viewportDatasource:{},viewportRowModelPageSize:{},viewportRowModelBufferSize:{},alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:{},rowSelection:{},cellSelection:{type:[Boolean,Object]},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:{},rowNumbers:{type:[Boolean,Object]},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:{},suppressClearOnFillReduction:{type:Boolean},sortingOrder:{},accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:{},suppressMaintainUnsortedOrder:{type:Boolean},icons:{},rowHeight:{},rowStyle:{},rowClass:{},rowClassRules:{},suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:{},deltaSort:{type:Boolean},treeDataDisplayType:{},enableGroupEdit:{type:Boolean},initialState:{},reactiveCustomComponents:{type:Boolean},renderingMode:{},theme:{},loadThemeGoogleFonts:{type:Boolean},themeCssLayer:{},styleNonce:{},themeStyleContainer:{},getContextMenuItems:{type:Function},getMainMenuItems:{type:Function},postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:{type:Function},createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},getLocaleText:{type:Function},getDocument:{type:Function},paginationNumberFormatter:{type:Function},getGroupRowAgg:{type:Function},isGroupOpenByDefault:{type:Function},ssrmExpandAllAffectsAllRows:{type:Boolean},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:{type:Function},getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:{type:Function},isServerSideGroup:{type:Function},getServerSideGroupKey:{type:Function},getBusinessKeyForNode:{type:Function},getRowId:{type:Function},resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:{type:Function},isRowMaster:{type:Function},fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},onToolPanelVisibleChanged:{type:Function},onToolPanelSizeChanged:{type:Function},onColumnMenuVisibleChanged:{type:Function},onContextMenuVisibleChanged:{type:Function},onCutStart:{type:Function},onCutEnd:{type:Function},onPasteStart:{type:Function},onPasteEnd:{type:Function},onColumnVisible:{type:Function},onColumnPinned:{type:Function},onColumnResized:{type:Function},onColumnMoved:{type:Function},onColumnValueChanged:{type:Function},onColumnPivotModeChanged:{type:Function},onColumnPivotChanged:{type:Function},onColumnGroupOpened:{type:Function},onNewColumnsLoaded:{type:Function},onGridColumnsChanged:{type:Function},onDisplayedColumnsChanged:{type:Function},onVirtualColumnsChanged:{type:Function},onColumnEverythingChanged:{type:Function},onColumnsReset:{type:Function},onColumnHeaderMouseOver:{type:Function},onColumnHeaderMouseLeave:{type:Function},onColumnHeaderClicked:{type:Function},onColumnHeaderContextMenu:{type:Function},onComponentStateChanged:{type:Function},onCellValueChanged:{type:Function},onCellEditRequest:{type:Function},onRowValueChanged:{type:Function},onCellEditingStarted:{type:Function},onCellEditingStopped:{type:Function},onRowEditingStarted:{type:Function},onRowEditingStopped:{type:Function},onBulkEditingStarted:{type:Function},onBulkEditingStopped:{type:Function},onBatchEditingStarted:{type:Function},onBatchEditingStopped:{type:Function},onUndoStarted:{type:Function},onUndoEnded:{type:Function},onRedoStarted:{type:Function},onRedoEnded:{type:Function},onCellSelectionDeleteStart:{type:Function},onCellSelectionDeleteEnd:{type:Function},onRangeDeleteStart:{type:Function},onRangeDeleteEnd:{type:Function},onFillStart:{type:Function},onFillEnd:{type:Function},onFilterOpened:{type:Function},onFilterChanged:{type:Function},onFilterModified:{type:Function},onFilterUiChanged:{type:Function},onFloatingFilterUiChanged:{type:Function},onAdvancedFilterBuilderVisibleChanged:{type:Function},onFindChanged:{type:Function},onChartCreated:{type:Function},onChartRangeSelectionChanged:{type:Function},onChartOptionsChanged:{type:Function},onChartDestroyed:{type:Function},onCellKeyDown:{type:Function},onGridReady:{type:Function},onGridPreDestroyed:{type:Function},onFirstDataRendered:{type:Function},onGridSizeChanged:{type:Function},onModelUpdated:{type:Function},onVirtualRowRemoved:{type:Function},onViewportChanged:{type:Function},onBodyScroll:{type:Function},onBodyScrollEnd:{type:Function},onDragStarted:{type:Function},onDragStopped:{type:Function},onDragCancelled:{type:Function},onStateUpdated:{type:Function},onPaginationChanged:{type:Function},onRowDragEnter:{type:Function},onRowDragMove:{type:Function},onRowDragLeave:{type:Function},onRowDragEnd:{type:Function},onRowDragCancel:{type:Function},isRowValidDropPosition:{type:Function},onRowResizeStarted:{type:Function},onRowResizeEnded:{type:Function},onColumnRowGroupChanged:{type:Function},onRowGroupOpened:{type:Function},onExpandOrCollapseAll:{type:Function},onPivotMaxColumnsExceeded:{type:Function},onPinnedRowDataChanged:{type:Function},onPinnedRowsChanged:{type:Function},onRowDataUpdated:{type:Function},onAsyncTransactionsFlushed:{type:Function},onStoreRefreshed:{type:Function},onHeaderFocused:{type:Function},onCellClicked:{type:Function},onCellDoubleClicked:{type:Function},onCellFocused:{type:Function},onCellMouseOver:{type:Function},onCellMouseOut:{type:Function},onCellMouseDown:{type:Function},onRowClicked:{type:Function},onRowDoubleClicked:{type:Function},onRowSelected:{type:Function},onSelectionChanged:{type:Function},onCellContextMenu:{type:Function},onRangeSelectionChanged:{type:Function},onCellSelectionChanged:{type:Function},onTooltipShow:{type:Function},onTooltipHide:{type:Function},onSortChanged:{type:Function},height:{},isSorting:{type:Boolean}},emits:["onGridReady","row-clicked","cell-clicked","cell-focused","row-selected","on-scroll"],setup(e,{expose:t,emit:n}){const o=e,s=n,r=$(null);_E(r,()=>{var v;const g=(v=i.value)==null?void 0:v.getApi();g==null||g.clearFocusedCell()});const i=$(null),a=X(()=>({width:"100%",height:o.height||"500px"})),l=X(()=>({...o,theme:dTe}));function u(){var v;if(!r.value){console.warn("Grid container element not found");return}const g={...l.value,height:o.height};i.value=new cTe(r.value,g),i.value.init(),(v=i.value.getApi())==null||v.addEventListener("bodyScroll",()=>{s("on-scroll",new Event("scroll"))}),c()}function c(){var v;const g=((v=i.value)==null?void 0:v.getApi())??null;s("onGridReady",g)}function d(g){var w,S;if(!g)return;(w=i.value)==null||w.updateColumnDefs(g);const v=g.map(b=>b.field&&b.width&&!b.hide?{colId:b.field,width:b.width,flex:null}:null).filter(b=>b!==null);(S=i.value)==null||S.setColumnWidth(v)}function h(){var g;(g=i.value)==null||g.destroy(),i.value=null}function f(){var g;return((g=i.value)==null?void 0:g.getApi())||void 0}function p(){return i.value||null}return Qe(()=>o.columnDefs,(g,v)=>{const w=g==null?void 0:g.filter(b=>!b.hide).map(b=>b.field).join(","),S=v==null?void 0:v.filter(b=>!b.hide).map(b=>b.field).join(",");w!==S&&d(g)},{deep:!0}),Vn(()=>{h()}),t({gridApi:f,gridManager:p,syncColumnDefs:d}),Xt(()=>{u()}),Vn(()=>{h()}),(g,v)=>(q(),de("div",{ref_key:"gridContainerRef",ref:r,style:hn(a.value),class:le(["ag-theme-quartz",["ag-table-container",o.isSorting?"is-sorting":""]])},null,6))}});function lc(e){return uB(e)}const fTe=()=>[...[{headerName:"Thumbnail",field:"thumbnail",sortable:!1,filter:!1,pinned:"left",lockPinned:!0,suppressMovable:!0,headerComponent:lc(Sl),width:86,resizable:!1},{headerName:"Name",field:"name",sortable:!1,filter:!1,pinned:"left",lockPinned:!0,headerComponent:lc(Sl),suppressMovable:!0},{headerName:"Notes",field:"description",sortable:!1,filter:!1,suppressMovable:!1},{headerName:"Assignee",field:"assignees",sortable:!1,filter:!1,headerComponent:lc(Sl)},{headerName:"Status",field:"status",sortable:!1,filter:!1,headerComponent:lc(Sl)},{headerName:"Date Range",field:"dateRange",sortable:!1,filter:!1,headerComponent:lc(Sl)},{headerName:"Last Updated",field:"lastUpdated",sortable:!1,filter:!1,headerComponent:lc(Sl),cellRendererParams:n=>{var o,s,r;return{...n,value:(o=n==null?void 0:n.data)==null?void 0:o.lastUpdated.value,tooltip:((r=(s=n==null?void 0:n.data)==null?void 0:s.lastUpdated)==null?void 0:r.tooltip)||void 0,readOnly:!0}}},{headerName:"Completed On",field:"completedOn",sortable:!1,filter:!1,headerComponent:lc(Sl),cellRendererParams:n=>{var o,s,r;return{...n,value:(o=n==null?void 0:n.data)==null?void 0:o.completedOn.value,tooltip:((r=(s=n==null?void 0:n.data)==null?void 0:s.completedOn)==null?void 0:r.tooltip)||void 0,readOnly:!0}}}].map(n=>Tp.fromType(n))],$w={WIDTH:60,HEADER_CLASS:"ag-checkbox-header"},pTe=()=>({field:"__checkboxSelection",checkboxSelection:!0,headerCheckboxSelection:!0,pinned:"left",width:$w.WIDTH,minWidth:$w.WIDTH,maxWidth:$w.WIDTH,cellClass:"ag-checkbox-cell",headerClass:$w.HEADER_CLASS,headerComponent:My(zse),suppressMovable:!0}),kG="blank",gTe=[kG,"__checkboxSelection","options"],mTe=["uiColumnResized","uiColumnMoved","api"],vTe={headerName:"",field:"options",sortable:!1,filter:!1,editable:!0,pinned:"right",lockPosition:!0,suppressMovable:!0,resizable:!1},FG=(e,t)=>t!=null&&t.width?{...e,width:t.width,flex:void 0}:e,yTe=(e,t,n)=>{const{getCachedValue:o,setCachedValue:s}=bf({dbName:"item_table_column_configs",storeName:"column_configs"}),r=async()=>{const d=await o(t);if(!d||typeof d!="string")return null;try{const h=JSON.parse(d);return Array.isArray(h)?h:null}catch(h){return console.error("Failed to parse cached column config:",h),null}},i=$([]),a=pTe();let l=0;const u=async d=>{const h=++l,f=await r();if(h!==l)return;const p=new Map(f==null?void 0:f.map(k=>[k.field,k])),g=fTe(),v=Tp.fromType(vTe),w=!!f,b=((d==null?void 0:d.map(k=>{var M;return{headerName:k.name,field:`metric_${k.id}`,editable:((M=k==null?void 0:k.auth_permission)==null?void 0:M.permission)==2,sortable:!0,filter:!1,flex:1,context:{...k},hide:w?!p.has(`metric_${k.id}`):!(k.is_primary||k.is_point_metric),cellClass:"ag-cell-optimized",headerComponent:My(Sl),headerComponentParams:()=>({headerType:k.metric_type.code=="number"||k.metric_type.code=="formula"?"number":"default"})}}))||[]).map(k=>Tp.fromType(k)),y=[a,...g,...b,v],E=[],_=[],I=[];for(const k of y)k.pinned==="left"?E.push(k):k.pinned==="right"||k.field===kG?_.push(k):I.push(k);if(!f||f.length===0){i.value=y;return}const T=new Map(I.map(k=>[k.field,k])),F=[];for(const k of f)if(k.field&&T.has(k.field)){const M=T.get(k.field);F.push({...FG(M,k),hide:k.hide}),T.delete(k.field)}const L=Array.from(T.values()),x=[...F,...L].map(k=>({...k,lockPinned:!0})),P=k=>{const M=p.get(k.field),N=FG(k,M);return M&&M.hide!==void 0?{...N,hide:M.hide}:N};i.value=[...E.map(P),...x,..._.map(P)]};Qe(e,d=>u(d),{immediate:!0});const c=Cr((d,h)=>{if((d==null?void 0:d.source)!==void 0&&!mTe.includes(d.source))return;const f=n.value,p=f==null?void 0:f.getColumnDefs(),g=new Map;if(f==null||f.getColumnState().forEach(w=>{w.width&&g.set(w.colId,Number(w.width))}),i.value=p||i.value,!h)return;const v=(p??[]).filter(w=>w.field&&!gTe.includes(w.field)).map(w=>({field:w.field,hide:w.hide,width:g.get(w.field)||w.width,pinned:w.pinned}));s(t,JSON.stringify(v))},Si);return nD(()=>c.cancel()),{columnDefs:i,checkboxColumn:a,saveColumnConfig:c}},wTe=()=>{const e=un.getInstance().getItem("API_BASE_URL");return e!=null&&e.includes("v1")?e.slice(0,e.lastIndexOf("/v1")):String(e)},CTe=e=>{var P,k,M;const{showMessage:t,showErrorNetMessage:n}=Rs(),o=oo(),s={domainApi:wTe(),wsCode:un.getInstance().getItem("ws.code"),entityId:e.value.entityId},r=(M=(k=(P=o==null?void 0:o.appContext)==null?void 0:P.config)==null?void 0:k.globalProperties)==null?void 0:M.apiConfig;if(!r||s.domainApi===""||s.wsCode==="")throw new Error("API configuration is missing in useItems");const i=new ON(r,s);i.on("call-api",N=>{N.success?t(N.apiCode,"success"):n(N)});const a=Fo({}),l=$([]),u=$(!1),c=$(null),d=$(null),h=$(1),f=$(20);let p=Promise.resolve();const{setCachedUsers:g}=RJ(),v=N=>({workspaceId:e.value.workspaceId,entityIds:[e.value.entityId],orderBy:"id-asc",include_permission:"{include_permission}",include_permission_names:!0,q:N}),w=50,S=async(N,B,z)=>{if(!N.length)return[];const oe=B9(N,B);return(await Promise.all(oe.map(z))).flat()},b=async N=>{try{return(await i.getPermissionForItems({workspaceId:e.value.workspaceId,itemIds:N})).data.map(z=>[z==null?void 0:z.id,z.permission])}catch(B){return console.error("Failed to fetch item permissions chunk:",B),[]}},y=async(N,B)=>{try{const z=await i.getMetricValues({workspaceId:e.value.workspaceId,item_ids:N,per_page:N.length*B.length,metric_ids:B}),oe=z.data.map(te=>{const se=new Map(te.item_metrics.map(A=>[A.metric_id,{value:A.value,auth_permission:A==null?void 0:A.auth_permission}])),Z=Object.fromEntries(B.map(A=>[A,se.get(A)??null]));return[te==null?void 0:te.id,Z]}),ie=new Set(z.data.map(te=>te==null?void 0:te.id));for(const te of N)if(!ie.has(te)){const se=Object.fromEntries(B.map(Z=>[Z,{value:null,auth_permission:void 0}]));oe.push([te,se])}return oe}catch(z){return console.error("Failed to fetch a chunk of metric values:",z),N.map(ie=>[ie,Object.fromEntries(B.map(te=>[te,void 0]))])}},E=async N=>{try{const B=await i.getAssignedUser({workspaceId:e.value.workspaceId,item_ids:N,per_page:N.length}),z=B.data.flatMap(oe=>oe.assignees);return g(z),B.data.map(oe=>[oe==null?void 0:oe.id,oe==null?void 0:oe.assignees])}catch(B){return console.error("Failed to fetch a chunk of assigned users:",B),[]}},_=async N=>{if(!N.length)return console.warn("getPermissionForItems: Empty itemIds"),{};try{const B=await S(N,w,b);return Object.fromEntries(B)}catch(B){return console.error("Failed to fetch item permissions:",B),{}}},I=async(N,B)=>!N.length||!B.length?{}:(p=p.then(async()=>{try{const ie=[];let te=0;for(let Z=0;Z<B.length;Z+=5){te++;const A=B.slice(Z,Z+5),j=[];for(let ge=0;ge<A.length;ge++){const xe=A[ge],ue=await S(N,w,K=>y(K,[xe]));j.push(ue),await new Promise(K=>setTimeout(K,500))}ie.push(...j);const ne=Z+5>=B.length}const se={};for(const Z of ie.flat()){const[A,j]=Z;se[A]||(se[A]={}),Object.assign(se[A],j)}return se}catch(z){return console.error("Failed to fetch metric values:",z),{}}}),p),T=async N=>{if(!N.length)return console.warn("getAssignedUsers: Empty itemIds"),{};try{const B=await S(N,w,E);return Object.fromEntries(B)}catch(B){return console.error("Failed to fetch assigned users:",B),{}}};return{items:l,loading:u,error:c,pagination:d,currentPage:h,pageSize:f,cusorMap:a,fetchItems:async N=>{const{cursor:B,offset:z,size:oe,searchQuery:ie}=N;let te=[];u.value=!0,c.value=null;try{const se=await i.getAllItem_cursor({...N,cursor:B||void 0,offset:z||void 0,pageSize:oe||f.value,...v(ie),sortBy:N.sort_by});return l.value=se.data,d.value=se.meta,h.value=se.meta.current_page||0,te=se.data.map(Z=>Z==null?void 0:Z.id),se}catch(se){throw c.value=se,console.error("Failed to fetch items (cursor):",se),se}finally{const se=async()=>{try{const[Z,A]=await Promise.all([T(te),_(te)]);e.value.updateItemData({assignees:Z,permission:A},te);const j=await I(te,e.value.metricIds);e.value.setMetricValues(j,new Set(te),e.value.metricIds)}catch(Z){console.error("Post-fetch processing failed:",Z)}};u.value=!1,setTimeout(se)}},getAssignableStatus:async N=>{try{return await i.getAssignableStatus({workspaceId:e.value.workspaceId,itemIds:N})}catch(B){throw console.error("Failed to fetch assignable status:",B),B}},getMetricList:async N=>{try{return await i.getMetricList({workspaceId:e.value.workspaceId,entityId:N})}catch(B){throw console.error("Failed to fetch metric list:",B),B}},getMetricValues:I,getAssignedUsers:T}};function bTe(e){return{updateRowData:(o,s)=>{if(!e.value)return;const r=[],i=new Set,a=e.value.getColumnDefs();if(!a)return;const l=a.map(u=>{if(u.field&&u.field.startsWith("metric_")&&(u.hide===!1||u.hide===void 0))return u.field}).filter(Boolean);s.forEach(u=>{var d;const c=(d=e.value)==null?void 0:d.getRowNode(u);if(c){if(r.push(c),o.assignees){const h=hJ((o.assignees[u]||[]).map(bO));c.data.assignees=h,i.add("assignees")}o.permission&&(c.data.permissions=o.permission[u]),l.forEach(h=>{c.data[h]=c.data[h]??null})}}),i.add("assignees"),i.add("status"),i.add("dateRange"),i.add("moreActions"),i.add("name"),i.add("description"),e.value.refreshCells({rowNodes:r,columns:Array.from(i),force:!0})},setMetricValues:(o,s,r)=>{const i=e.value;if(!i)return;const a=new Map(Array.from(s).map(u=>[u,new Map(r.map(c=>[c,{value:null,auth_permission:void 0}]))]));Object.entries(o).forEach(([u,c])=>{Object.entries(c).forEach(([d,h])=>{var f;(f=a.get(u))==null||f.set(d,{value:h==null?void 0:h.value,auth_permission:h==null?void 0:h.auth_permission})})});const l=Array.from(a.entries()).map(([u,c])=>{const d=i.getRowNode(u);return d!=null&&d.data?(c.forEach((h,f)=>{const p=`metric_${f}`;d.data[p]=(h==null?void 0:h.value)||null;const g=`metric_permission_${f}`;d.data[p]=(h==null?void 0:h.value)||null,d.data[g]=(h==null?void 0:h.auth_permission)||null}),d):null});l.length>0&&i.refreshCells({rowNodes:l,columns:Array.from(r).map(u=>`metric_${u}`),force:!0})}}}function STe(e,t,n,o,s){let r=!0;return{async getRows(i){try{o(!0),r&&(s(!0),r=!1);const a=Math.floor(i.startRow/t)+1,{rows:l,total:u}=await e({page:a,pageSize:t,filterText:n(),sort_by:i.sortModel});let c=-1;Number.isFinite(u)?c=u:l.length<t&&(c=i.startRow+l.length),i.context={pageSize:t,text:n()},i.successCallback(l,c),o(!1),s(!1)}catch(a){console.error("Datasource fetch error:",a),i.failCallback(),o(!1),s(!1)}}}}function ETe(e){const{selectRowData:t,isSidebarOpen:n,quickFilterText:o,gridApi:s,fetcher:r}=e,i=$(!0),a=$(!0),l=$(!1),u=()=>{n.value=!n.value},c=v=>{if(i.value=!1,s.value=v,!v)return null;const{addEventListener:w,setGridOption:S}=v;if(!r)return console.error("Fetcher function is undefined"),null;const b=STe(r,e.perPage,()=>o.value,y=>{i.value=y},y=>{a.value=y});return S==null||S("datasource",b),w==null||w("selectionChanged",()=>{t.value=v.getSelectedRows()}),v||null},d=v=>{var w,S;if((w=s.value)==null||w.hideOverlay(),v!==void 0&&(o.value=v),(S=s.value)==null||S.deselectAll(),t.value=[],i.value=!0,!s.value||!r){console.error("Grid API or fetcher is not available"),i.value=!1;return}l.value=!0,a.value=!0,s.value.purgeInfiniteCache(),s.value.ensureIndexVisible(0,"top"),setTimeout(()=>{i.value=!1,setTimeout(()=>{l.value=!1},100)},300)},h=()=>{var v;(v=s.value)==null||v.deselectAll(),t.value=[]},f=Cr(v=>{d(v)},Si);return{isLoading:i,toggleSidebar:u,onGridReady:c,onSearch:f,handleUnSelect:h,firstLoad:a,cacheCleared:l,handleSelectAll:()=>{s.value},isSelectAll:$(!1)}}const _Te={changelog:{"1.0.1":{date:"2024-06-20",changes:["Fixed styling issues for archived and deleted rows."]},"1.0.0":{date:"2024-06-15",changes:["Initial release of the Item Table package."]},"0.0.1-alpha.8":{date:"2024-06-10",changes:["Improved performance of row updates.","Added support for custom cell renderers.","Add row hover effect for better UX.","Add loading skeleton for filter","Beta release with core functionalities implemented."]},"0.0.1-alpha.9":{date:"2024-06-05",changes:["Add row selection feature.","Fix bug with column resizing.","Optimize rendering for large datasets.","Implement getLog function to retrieve changelog entries based on version.","Display app version and changelog in the Item Table component tooltip.","Clean up unused autocomplete and memoized config composables.","Update styles for better consistency and readability."]},"0.0.1-alpha.11":{date:"2024-06-18",changes:["Add bulk process status display: items now show an hourglass icon and tooltip when being processed.","Update data model: added isProcessing and bulk_process properties to track item status.","Improve row focus: focused rows now flash for better visibility.","Set 'Last Updated' and 'Completed On' columns as read-only.","Fix: resolve visual fetching issue in useRemoteFiles composable.","Fix: use correct upload icon in PopupCreateScenes component.","Enhance data conversion to include processing status in item rows."]},"0.0.1-alpha.12":{date:"2024-06-12",changes:["feat: enhance Snackbar component and notification handling","Refactor Snackbar.vue for improved readability and styling, including color adjustments for icons and text.","Add showMessage function in notifications store to display messages based on API keys, improving notification management.","Introduce notificationMessage constant to centralize notification messages for various API actions, enhancing maintainability.","Remove unnecessary console logs from useRemoteFiles and improve logging in notification store for better debugging."]},"0.0.1-alpha.16":{date:"2024-06-20",changes:["Add onboarding tour feature and enhance UI components with new dependencies","Refactor UI components for improved styling and functionality","Updated RatingComponent.vue to streamline class bindings and improve accessibility attributes.","Enhanced SearchBox.vue by adding a clear event handler and simplifying icon rendering.","Modified AssigneeGroupEditor.vue and AssigneeGroupRenderer.vue to remove unnecessary size attributes from icons.","Adjusted DateRangeRenderer.vue to remove size attributes from icons for consistency.","Updated HeaderCheckbox.vue to set dropdown placement to 'bottom-start'.","Refined HeaderSorting.vue to simplify sort option labels and improve sorting logic.","Enhanced HeaderWrapper.vue to utilize reactive properties for sorting state.","Improved HyperLinkEditor.vue and HyperLinkInlineEditor.vue by removing size attributes from icons.","Updated PopupLayout.vue to use a CSS variable for box-shadow styling.","Refined Snackbar.vue to standardize icon colors and improve styling consistency.","Adjusted useTippy.ts to set default placement and arrow visibility for tooltips.","Modified notificationMessage.ts to remove error messages for list fetching.","Cleaned up notifications.ts by removing console logs for a cleaner codebase.","Updated sortStore.ts to comment out unnecessary console logs for better performance.","Enhanced styles.scss by defining new icon size variables and standardizing box-shadow styles."]},"0.0.99":{date:"2024-06-24",changes:["Fix: resolve issue with incorrect version display in Item Table component.","Update changelog retrieval logic to ensure accurate version matching.","Enhance tooltip display for app version and changelog in Item Table component."]}}},RTe=e=>{var t;return(t=Object.entries(_Te.changelog).find(([n,o])=>n===e))==null?void 0:t[1].changes},TTe={class:"visual-btn-visual"},DTe={class:"visual-btn--label"},ITe={key:0,class:"visual-btn--description"},xTe={key:1,class:"visual-btn--description"},Hw=_t(ot({__name:"VisualButton",props:{label:{},description:{},disabled:{type:Boolean}},emits:["onClick"],setup(e,{emit:t}){const n=e,o=()=>{n.disabled||s("onClick")},s=t;return(r,i)=>(q(),de("div",{class:le(["visual-btn",{"visual-btn--disabled":e.disabled}]),onClick:o},[Se("div",TTe,[kt(r.$slots,"visual",{},()=>[i[0]||(i[0]=Mz('<svg width="42" height="36" viewBox="0 0 42 36" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-c2003bd7><g clip-path="url(#clip0_4824_13082)" data-v-c2003bd7><path d="M5.14286 18V10.2857H18V18H5.14286ZM5.14286 23.1 429H18V30.8571H5.14286V23.1429ZM23.1429 30.8571V23.1429H36V30.8571H23.1429ZM36 18H23.1429V10.2857H36V18ZM5.14286 0C2.30625 0 0 2.30625 0 5.14286V30.8571C0 33.6937 2.30625 36 5.14286 36H36C38.8366 36 41.1429 33.6937 41.1429 30.8571V5.14286C41.1429 2.30625 38.8366 0 36 0H5.14286Z" fill="#D7D7D7" data-v-c2003bd7></path><path d="M0 5.14286C0 2.30625 2.30625 0 5.14286 0H36C38.8366 0 41.1429 2.30625 41.1429 5.14286V10.318H0V5.14286Z" fill="#A6A6A6" data-v-c2003bd7></path></g><defs data-v-c2003bd7><clipPath id="clip0_4824_13082" data-v-c2003bd7><rect width="41.1429" height="36" fill="white" data-v-c2003bd7></rect></clipPath></defs></svg>',1))],!0)]),Se("div",DTe,at(n.label),1),n.disabled?(q(),de("div",ITe," Coming soon ")):(q(),de("div",xTe,at(n.description),1))],2))}}),[["__scopeId","data-v-c2003bd7"]]),OG="xlsx_toolbox",MG="feedback_lockup_toolbox",ATe="TOOLBOX_EXPORT_DATA",PTe="https://app.arbocollab.com",kTe=1e3,NG=()=>sessionStorage.getItem("BASE_URL"),LG=(e,t="xlsx-mapping")=>{const n=Dn("switchInstance",void 0),o=`${t}:load`,s=`${t}:edit`,r=new Set;let i;const a=()=>{const h=t==="xlsx-mapping"?OG:MG,f={showLoad:!1};n?n(h,"",f):window.appManager.switchInstance(h,"",f)},l=(h,f)=>{const p=setTimeout(()=>{r.delete(p),window.postMessage({type:h,payload:f},`${NG()}`)},kTe);r.add(p)},u=h=>{if(!h)throw new Error("Payload is missing");a(),l(o,h)},c=(h,f)=>{if(!h)throw new Error("Error file is missing");a(),l(s,{file:h})},d=h=>{if((h==null?void 0:h.type)!==ATe)return;const{file:f,fileName:p}=h.payload;e({channel:t,file:new File([f],p,{type:f.type}),fileName:p});const g=t==="xlsx-mapping"?OG:MG;g=="xlsx_toolbox"&&window.appManager.hide(g)};return Xt(()=>{i=zne({target:window,allowedOrigins:[NG()||PTe],onMessage:d,onInvalidMessage:(h,f,p)=>{console.warn("Rejected postMessage:",f,p.origin)}})}),Vn(()=>{i==null||i(),r.forEach(clearTimeout),r.clear()}),{openToolbox:u,sendBackErrorFile:c}},FTe={class:"header-name"},OTe={class:"description"},MTe={key:0,class:"error-message"},NTe={class:"dynamic"},LTe={key:1,class:"choose-method-container"},VTe={key:3,class:"select-status-container"},BTe={key:4,class:"result-container"},$Te={key:5,class:"result-container"},HTe={key:0},GTe={key:3},VG="text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel",UTe=20,WTe=_t(ot({__name:"PopupToolboxUploader",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const o=Kt,s=X(()=>[1,2,6].includes(b.value)),r=X(()=>Sv()),i=X(()=>({1:{title:`Create ${r.value} in bulk`,description:""},2:{title:"Select status",description:"Choose the starting status for the new work."},3:{title:"Import successful",description:"Work will be created in background. Refresh to see updates."},4:{title:"Import failed",description:"Some data doesn't meet the requirements. Review it and try again."},6:{title:`Create ${r.value} by count`,description:""},7:{title:"Creation in progress",description:"Work will be created in the background. Refresh to see updates."},8:{title:"Create failed",description:""}})),a=["csv","xlsx","xls"],l=$({segments:[],count:0}),u=({data:R,count:G,template_flow_status_id:J})=>{console.log("handleChangeCreateWithCount called with data:",R,"count:",G,"template_flow_status_id:",J),l.value={segments:R,count:G,template_flow_status_id:J}},c=$(!1),d=async()=>{var R;if(!((R=v.value)!=null&&R.bulkCreate)){console.error("API services not available");return}c.value=!0;try{(await v.value.bulkCreate({workspaceId:f.workspaceId,entityId:f.entityId,payload:{...l.value,entity_id:f.entityId},filter:{}})).status===fs.ACCEPTED&&(b.value=7,g("import-success"))}catch(G){B(G),b.value=8}finally{c.value=!1}},h={"--popup-pt":"20px","--popup-pb":"20px","--popup-pl":"24px","--popup-pr":"24px"},f=e,p=X(()=>Sv()),g=n,{apiServices:v}=so(!1,f),w=1,S=$(),b=$(w),y=$(null),E=$(null),_=$(null),I=$(void 0),T=$(null),F=X(()=>i.value[b.value]),L=$(),x=()=>{var R;y.value=null,b.value=w,E.value=null,_.value=null,M.value=null,T.value=null,(R=L.value)==null||R.clear(),I.value=void 0,l.value={segments:[],count:0}},P=()=>{b.value=6},k=()=>{var R;x(),(R=S.value)==null||R.hide()};Qe([E,_],([R,G])=>{b.value===1&&R&&G&&(b.value=2)});const M=$(null),N=R=>Rs().getErrorMessageFromResponse(R),B=R=>{if(console.error(R),typeof R=="string"){M.value=R;return}const G=R.response,J=G==null?void 0:G.data,ce=N(J);M.value=ce??R.message},z=async(R,G)=>{var ce;if(!v.value||!f.workspaceId||!f.entityId){console.error("API services not available");return}K.value=!0;const J=new FormData;J.append("file",R),J.append("format",((ce=G??R.name)==null?void 0:ce.split(".").pop())??R.name.split(".").pop()??""),J.append("entity_id",f.entityId),J.append("template_flow_status_id",y.value??"");try{await v.value.addNewSceneViaImportFile(f.workspaceId,f.entityId,J),b.value=3,g("import-success")}catch(Ee){console.error("Error uploading file:",Ee),B(Ee||"An unknown error occurred during file upload."),b.value=4}finally{K.value=!1}},{openToolbox:oe,sendBackErrorFile:ie}=LG(({file:R,fileName:G,channel:J})=>{J==="xlsx-mapping"&&(_.value=R,I.value=G??R.name,b.value=2)}),te=$(null),se=async()=>{var R,G;b.value=6,await ht(),(G=(R=te.value)==null?void 0:R.focus)==null||G.call(R)},Z=async()=>{try{const R=await j();oe({template:R})}catch(R){console.error("Error opening toolbox:",R),Rs().showErrorNetMessage("Failed to open toolbox.")}},A=$(!1),j=async()=>{A.value=!0;const R=f.workspaceId,G=f.entityId;if(!R||!G||!v.value)return A.value=!1,Promise.reject(new Error("Workspace ID or Entity ID is missing"));try{const J=await v.value.downloadTemplate(R,G,!1);if(!J)throw new Error("No response from downloadTemplate API");return J}catch(J){return console.error("Error downloading template:",J),Promise.reject(J)}finally{A.value=!1}},ne=R=>{var ce;const G=((ce=R.name.split(".").pop())==null?void 0:ce.toLowerCase())??"",J=VG.split(",").map(Ee=>Ee.trim()).includes(R.type)||a.includes(G);return J||(console.error("Invalid file type:",R.type),Rs().addNotification({id:"invalid-file-type",message:"Invalid file type. Please upload a xlsx, xls, csv file.",type:"error"})),J},ge=async()=>{const R=document.createElement("input");R.type="file",R.accept=`${VG}, ${a.map(G=>`.${G}`).join(", ")}`,R.onchange=async()=>{var J;const G=(J=R.files)==null?void 0:J[0];if(G){if(!ne(G)){x();return}E.value=nv(G);try{const ce=await j();if(!ce){Rs().addNotification({id:"failed-download-template",message:"Failed to download template file.",type:"error"});return}oe({source:G,template:ce})}catch(ce){console.error("Error opening toolbox:",ce),Rs().addNotification({id:"failed-open-toolbox",message:"Failed to open toolbox.",type:"error"})}}},R.click()},xe=async R=>{var G;if(!((G=v.value)!=null&&G.getAssignableStatuses)){console.error("API services not available");return}return v.value.getAssignableStatuses(f.workspaceId,{entity_id:f.entityId,name_like:R.name_like,page:R.page,per_page:UTe})},ue=X(()=>{var R;return l.value.count==0||!((R=l.value.segments)!=null&&R.length)}),K=$(!1),Y=()=>{y.value=null,_.value&&I.value&&ie(_.value,I.value)},re=()=>{y.value&&_.value&&z(_.value,I.value)};return t({open:()=>{var R;return(R=S.value)==null?void 0:R.show()},close:()=>{var R;return(R=S.value)==null?void 0:R.hide()}}),(R,G)=>(q(),je(V(qN),jt({ref_key:"popupRef",ref:S,style:h,onHidden:x},{popupIndex:10,popupName:F.value.title,minWidth:"420px",showOverlay:!0,overlayOpacity:.5,closeOnOverlayClick:!1,closeOnEscape:!0,showCloseBtn:s.value}),Hh({header:we(()=>[Se("span",FTe,at(F.value.title),1)]),default:we(()=>[Se("div",{class:le(["modal-body",{"bulk-count":b.value===6,"choose-method":b.value===1}])},[Se("div",OTe,at(F.value.description),1),M.value&&b.value===4?(q(),de("div",MTe,[G[1]||(G[1]=tt(" Error code ",-1)),Se("span",NTe,at(M.value),1)])):Ye("",!0),b.value===1?(q(),de("div",LTe,[ye(Hw,{disabled:!1,label:"Create by count",description:"Enter how many to create.",onOnClick:se},{visual:we(()=>[ye(V(va),{src:"CreateByCount",size:65})]),_:1}),ye(Hw,{disabled:!1,label:"Start with a blank sheet",description:`Type or paste ${r.value} details
|
|
253
|
+
`,d_e=class extends $be{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:n}=e;this.suppressQuotes=t,this.columnSeparator=n}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,TG),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((n,o)=>{o!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(n.data.value||""),n.mergeAcross&&this.appendEmptyCells(n.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,n,o){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(o)}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,n){t!=0&&(this.result+=this.columnSeparator);const o=this.extractRowCellValue(e,t,t,"csv",n);this.result+=this.putInQuotes(o.valueFormatted??o.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():(Je(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=TG),this.isFirstLine=!1}},h_e=class extends Bbe{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){Je(51);return}const t=this.getMergedParams(e),n=this.getData(t),o=new Blob(["\uFEFF",n],{type:"text/plain"}),s=typeof t.fileName=="function"?t.fileName(Ot(this.gos,{})):t.fileName;Hbe(this.getFileName(s),o)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const n=t?Object.assign({},e):this.getMergedParams(e);return this.getData(n)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:n,rowGroupColsSvc:o,valueSvc:s,gos:r}=this,{processCellCallback:i,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:u,suppressQuotes:c,columnSeparator:d}=e;return new d_e({colModel:t,colNames:n,valueSvc:s,gos:r,processCellCallback:i||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:u||void 0,suppressQuotes:c||!1,columnSeparator:d||",",rowGroupColsSvc:o})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function f_e(e,t){var n;return(n=e.csvCreator)==null?void 0:n.getDataAsCsv(t)}function p_e(e,t){var n;(n=e.csvCreator)==null||n.exportDataAsCsv(t)}var g_e={moduleName:"CsvExport",version:ct,beans:[h_e],apiFunctions:{getDataAsCsv:f_e,exportDataAsCsv:p_e},dependsOn:[c_e]},m_e=class extends qe{constructor(e,t,n){super(),this.id=e,this.parentCache=t,this.params=n,this.state="needsLoading",this.version=0,this.startRow=e*n.blockSize,this.endRow=this.startRow+n.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,n){this.successCommon(e,{rowData:t,rowCount:n})}isRequestMostRecentAndLive(e){const t=e===this.version,n=this.isAlive();return t&&n}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:n,beans:o,rowNodes:s}=this;for(let r=0;r<e;r++){const i=n+r,a=new Nl(o);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(i),a.setRowTop(t*i),s.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:n,state:o}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:n,pageStatus:o}}}setDataAndId(e,t,n){ft(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Gn(this.params.datasource.getRows)){Je(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:n,params:{sortModel:o,filterModel:s},gos:r}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,n),failCallback:this.pageLoadFailed.bind(this,n),sortModel:o,filterModel:s,context:Ot(r,{}).context}}forEachNode(e,t,n){this.rowNodes.forEach((o,s)=>{this.startRow+s<n&&e(o,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const n=e-this.startRow;return this.rowNodes[n]}processServerResult(e){const{rowNodes:t,beans:n}=this;t.forEach((s,r)=>{const i=e.rowData?e.rowData[r]:void 0;!s.id&&s.alreadyRendered&&i&&(t[r]=new Nl(n),t[r].setRowIndex(s.rowIndex),t[r].setRowTop(s.rowTop),t[r].setRowHeight(s.rowHeight),s.clearRowTopAndRowIndex()),this.setDataAndId(t[r],i,this.startRow+r)});const o=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,o)}destroy(){for(const e of this.rowNodes)e.clearRowTopAndRowIndex();super.destroy()}},v_e=2,y_e=class extends qe{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const n=Math.floor(e/this.params.blockSize);let o=this.blocks[n];if(!o){if(t)return;o=this.createBlock(n)}return o.getRow(e)}createBlock(e){const t=this.params,n=this.createBean(new m_e(e,this,t));return this.blocks[n.id]=n,this.blockCount++,this.purgeBlocksIfNeeded(n),t.rowNodeBlockLoader.addBlock(n),n}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(Al(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(i=>i!=e),n=(i,a)=>a.lastAccessed-i.lastAccessed;t.sort(n);const o=this.params.maxBlocksInCache>0,s=o?this.params.maxBlocksInCache-1:null,r=v_e-1;t.forEach((i,a)=>{const l=i.state==="needsLoading"&&a>=r,u=o?a>=s:!1;if(l||u){if(this.isBlockCurrentlyDisplayed(i)||this.isBlockFocused(i))return;this.removeBlockFromCache(i)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:n,endRow:o}=e;return t.rowIndex>=n&&t.rowIndex<o}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:n}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,n-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:n,overflowSize:o}=this.params,r=(e.id+1)*n+o;this.rowCount<r&&(this.rowCount=r)}}setRowCount(e,t){this.rowCount=e,ft(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const n of this.getBlocksInOrder())n.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(n,o)=>n.id-o.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const n=[];let o=-1,s=!1;const r={value:0};let i=!1;for(const l of this.getBlocksInOrder())if(!i){if(s&&o+1!==l.id){i=!0;continue}o=l.id,l.forEachNode(u=>{const c=u===e||u===t;(s||c)&&n.push(u),c&&(s=!s)},r,this.rowCount)}return i||s?[]:n}},w_e=class extends qe{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new Nl(e);this.rootNode=t,t.level=-1,this.rowHeight=qu(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=qu(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){var t;let e;this.cacheParams?e=!Dp(this.cacheParams.sortModel,((t=this.beans.sortSvc)==null?void 0:t.getSortModel())??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){var n;return((n=this.infiniteCache)==null?void 0:n.getRowNodesInRange(e,t))??[]}reset(){var n;if(!this.datasource)return;zd(this.gos)!=null||(n=this.beans.selectionSvc)==null||n.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:n,rowNodeBlockLoader:o,eventSvc:s,gos:r}=e;this.cacheParams={datasource:this.datasource,filterModel:(t==null?void 0:t.getFilterModel())??{},sortModel:(n==null?void 0:n.getSortModel())??[],rowNodeBlockLoader:o,initialRowCount:r.get("infiniteInitialRowCount"),maxBlocksInCache:r.get("maxBlocksInCache"),rowHeight:qu(e),overflowSize:r.get("cacheOverflowSize"),blockSize:r.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new y_e(this.cacheParams)),s.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(n=>{n.id===e&&(t=n)}),t}forEachNode(e){var t;(t=this.infiniteCache)==null||t.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),n=this.getRowCount()-1;return t>n?n:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){var e;(e=this.infiniteCache)==null||e.refreshCache()}purgeCache(){var e;(e=this.infiniteCache)==null||e.purgeCache()}isLastRowIndexKnown(){var e;return((e=this.infiniteCache)==null?void 0:e.isLastRowIndexKnown())??!1}setRowCount(e,t){var n;(n=this.infiniteCache)==null||n.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function C_e(e){var t;(t=Fw(e))==null||t.refreshCache()}function b_e(e){var t;(t=Fw(e))==null||t.purgeCache()}function S_e(e){var t;return(t=Fw(e))==null?void 0:t.getRowCount()}var E_e=class extends qe{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=hde(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=Yo(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){ti(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Al(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(n=>n.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const n of t)n.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:n,state:o}=t.getBlockStateJson();e[n]=o}),e}printCacheStatus(){Al(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},__e={moduleName:"InfiniteRowModelCore",version:ct,rowModels:["infinite"],beans:[w_e,E_e]},R_e={moduleName:"InfiniteRowModel",version:ct,apiFunctions:{refreshInfiniteCache:C_e,purgeInfiniteCache:b_e,getInfiniteRowCount:S_e},dependsOn:[__e,V0e]},T_e="ā",D_e="ā",I_e={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},x_e=class extends Cn{constructor(){super(I_e),this.eValue=dt,this.eDelta=dt,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const n=Math.abs(t),o=e.formatValue(n),s=ft(o)?o:n,r=t>=0,i=this.eDelta;r?i.textContent=T_e+s:i.textContent=D_e+s,i.classList.toggle("ag-value-change-delta-up",r),i.classList.toggle("ag-value-change-delta-down",!r)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),qo(this.eDelta)}refresh(e,t=!1){var u;const{value:n,valueFormatted:o}=e,{eValue:s,lastValue:r,beans:i}=this;if(n===r||(ft(o)?s.textContent=o:ft(n)?s.textContent=n:qo(s),(u=i.filterManager)!=null&&u.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n,l=r&&typeof r=="object"&&"toNumber"in r?r.toNumber():r;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return r&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=n,!0}},A_e=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",P_e={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},k_e=class extends Cn{constructor(){super(P_e),this.eCurrent=dt,this.refreshCount=0,this.registerCSS(A_e)}init(e){this.refresh(e,!0)}addSlideAnimation(){var s;this.refreshCount++;const e=this.refreshCount;(s=this.ePrevious)==null||s.remove();const{beans:t,eCurrent:n}=this,o=lo({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=o,o.textContent=n.textContent,this.getGui().insertBefore(o,n),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{var r;e===this.refreshCount&&((r=this.ePrevious)==null||r.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var s;let n=e.value;if(Gn(n)&&(n=""),n===this.lastValue||(s=this.beans.filterManager)!=null&&s.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=n;const o=this.eCurrent;return ft(e.valueFormatted)?o.textContent=e.valueFormatted:ft(e.value)?o.textContent=n:qo(o),!0}},F_e=class extends qe{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,n=this.beans.gos.get("cellFlashDuration"),o=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const r=Date.now(),i=r+n,a=r+n+o,l={phase:"flash",flashEndTime:i,fadeEndTime:a};s.set(e,l);const u=`ag-cell-${t}`,c=`${u}-animation`,{comp:d,eGui:{style:h}}=e;d.toggleCss(u,!0),d.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&i+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),n)}),this.nextAnimationTime=i)}advanceAnimations(){const e=Date.now();let t=null;for(const n of Object.keys(this.animations)){const o=this.animations[n],s=`ag-cell-${n}`,r=`${s}-animation`;for(const[i,a]of o){if(!i.isAlive()||!i.comp){o.delete(i);continue}const{phase:l,flashEndTime:u,fadeEndTime:c}=a,d=l==="flash"?u:c;if(!(e+15>=d)){t=Math.min(d,t??1/0);continue}const{comp:f,eGui:{style:p}}=i;switch(l){case"flash":f.toggleCss(s,!1),f.toggleCss(r,!0),p.transition=`background-color ${c-u}ms`,p.transitionDelay=`${u-e}ms`,t=Math.min(c,t??1/0),a.phase="fade";break;case"fade":f.toggleCss(s,!1),f.toggleCss(r,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),o.delete(i);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const n=kme(e.cellPosition);t.cells[n]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t==null?void 0:t.flashDuration,t==null?void 0:t.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function O_e(e,t={}){const{cellFlashSvc:n}=e;n&&e.frameworkOverrides.wrapIncoming(()=>{for(const o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))n.flashCell(o,t)})}var M_e={moduleName:"HighlightChanges",version:ct,beans:[F_e],userComponents:{agAnimateShowChangeCellRenderer:x_e,agAnimateSlideCellRenderer:k_e},apiFunctions:{flashCells:O_e}};function N_e(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function L_e(e,t,n){var o;return(o=e.stateSvc)==null?void 0:o.setState(t,n)}function DG(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=V_e(e)),e.version=ct,e}function V_e(e){return e.cellSelection=B_e(e,"rangeSelection"),e}function B_e(e,t){if(e&&typeof e=="object")return e[t]}var $_e=class extends qe{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Yo(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Yo(this,()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))},0),this.onRowSelectedDebounced=Yo(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:n}=this.beans;this.isClientSideRowModel=io(e);const o=DG(e.get("initialState")??{}),s=o.partialColumnState;delete o.partialColumnState,this.cachedState=o;const r=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>r(()=>this.setupStateOnGridReady(o))),(o.columnOrder||o.columnVisibility||o.columnSizing||o.columnPinning||o.columnGroup)&&(n==null||n.hideColumns("columnState"));const[i,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:u})=>{u==="gridInitializing"&&(i(),r(()=>{this.setupStateOnColumnsInitialised(o,!!s),n==null||n.revealColumns("columnState")}))},rowCountReady:()=>{a==null||a(),r(()=>this.setupStateOnRowCountReady(o))},firstDataRendered:()=>{l==null||l(),r(()=>this.setupStateOnFirstDataRendered(o))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const n=DG(e);delete n.partialColumnState,this.cachedState=n,this.startSuppressEvents();const o="api",s=t?new Set(t):void 0;this.setGridReadyState(n,o,s),this.setColumnsInitialisedState(n,o,!!s,s),this.setRowCountState(n,o,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(n,o,s),this.stopSuppressEvents(o)})}setGridReadyState(e,t,n){var o,s;t==="api"&&!(n!=null&&n.has("sideBar"))&&((s=(o=this.beans.sideBar)==null?void 0:o.comp)==null||s.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,n,o){this.setColumnState(e,t,n,o),this.setColumnGroupState(e,t,o),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const n=o=>()=>this.updateColumnState([o]);this.addManagedEventListeners({columnValueChanged:n("aggregation"),columnMoved:n("columnOrder"),columnPinned:n("columnPinning"),columnResized:n("columnSizing"),columnVisible:n("columnVisibility"),columnPivotChanged:n("pivot"),columnPivotModeChanged:n("pivot"),columnRowGroupChanged:n("rowGroup"),sortChanged:n("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,n){const{filter:o,rowGroupExpansion:s,ssrmRowGroupExpansion:r,rowSelection:i,pagination:a}=e,l=(c,d)=>!(n!=null&&n.has(c))&&(d||t==="api");l("filter",o)&&this.setFilterState(o),l("rowGroupExpansion",s)&&this.setRowGroupExpansionState(r,s,t),l("rowSelection",i)&&this.setRowSelectionState(i,t),l("pagination",a)&&this.setPaginationState(a,t);const u=this.updateCachedState.bind(this);u("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(u("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),u("rowGroupExpansion",void 0)):(u("rowGroupExpansion",this.getRowGroupExpansionState()),u("ssrmRowGroupExpansion",void 0)),u("rowSelection",this.getRowSelectionState()),u("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(t("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),t("rowGroupExpansion",void 0)):(t("rowGroupExpansion",this.getRowGroupExpansionState()),t("ssrmRowGroupExpansion",void 0))},o=()=>t("filter",this.getFilterState()),{gos:s,colFilter:r}=this.beans;this.addManagedEventListeners({filterChanged:o,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(n)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:i=>{(i.newPage||i.newPageSize)&&t("pagination",this.getPaginationState())}}),r&&this.addManagedListeners(r,{filterStateChanged:o})}setFirstDataRenderedState(e,t,n){const{scroll:o,cellSelection:s,focusedCell:r,columnOrder:i,rowPinning:a}=e,l=(d,h)=>!(n!=null&&n.has(d))&&(h||t==="api");l("focusedCell",r)&&this.setFocusedCellState(r),l("cellSelection",s)&&this.setCellSelectionState(s),l("scroll",o)&&this.setScrollState(o),l("rowPinning",a)&&this.setRowPinningState(a),this.setColumnPivotState(!!(i!=null&&i.orderedColIds),t);const u=this.updateCachedState.bind(this);u("sideBar",this.getSideBarState()),u("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();u("rangeSelection",c),u("cellSelection",c),u("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:n,cellFocusCleared:n,cellSelectionChanged:o=>{if(o.finished){const s=this.getRangeSelectionState();t("rangeSelection",s),t("cellSelection",s)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return Nbe(nw(e),e.colModel.isPivotMode())}setColumnState(e,t,n,o){const{sort:s,rowGroup:r,aggregation:i,pivot:a,columnPinning:l,columnVisibility:u,columnSizing:c,columnOrder:d}=e;let h=!1;const f=(x,P)=>{const k=!(o!=null&&o.has(x))&&!!(P||t==="api");return h||(h=k),k},p={},g=x=>{let P=p[x];return P||(P={colId:x},p[x]=P,P)},v={},w=f("sort",s);w&&(s==null||s.sortModel.forEach(({colId:x,sort:P},k)=>{const M=g(x);M.sort=P,M.sortIndex=k})),(w||!n)&&(v.sort=null,v.sortIndex=null);const S=f("rowGroup",r);S&&(r==null||r.groupColIds.forEach((x,P)=>{const k=g(x);k.rowGroup=!0,k.rowGroupIndex=P})),(S||!n)&&(v.rowGroup=null,v.rowGroupIndex=null);const b=f("aggregation",i);b&&(i==null||i.aggregationModel.forEach(({colId:x,aggFunc:P})=>{g(x).aggFunc=P})),(b||!n)&&(v.aggFunc=null);const y=f("pivot",a);y&&(a==null||a.pivotColIds.forEach((x,P)=>{const k=g(x);k.pivot=!0,k.pivotIndex=P}),this.gos.updateGridOptions({options:{pivotMode:!!(a!=null&&a.pivotMode)},source:t})),(y||!n)&&(v.pivot=null,v.pivotIndex=null);const E=f("columnPinning",l);if(E){for(const x of(l==null?void 0:l.leftColIds)??[])g(x).pinned="left";for(const x of(l==null?void 0:l.rightColIds)??[])g(x).pinned="right"}(E||!n)&&(v.pinned=null);const _=f("columnVisibility",u);if(_)for(const x of(u==null?void 0:u.hiddenColIds)??[])g(x).hide=!0;(_||!n)&&(v.hide=null);const I=f("columnSizing",c);if(I)for(const{colId:x,flex:P,width:k}of(c==null?void 0:c.columnSizingModel)??[]){const M=g(x);M.flex=P??null,M.width=k}(I||!n)&&(v.flex=null);const T=d==null?void 0:d.orderedColIds,F=!!(T!=null&&T.length)&&!(o!=null&&o.has("columnOrder")),L=F?T.map(x=>g(x)):Object.values(p);(L.length||h)&&(this.columnStates=L,ni(this.beans,{state:L,applyOrder:F,defaultState:v},t))}setColumnPivotState(e,t){const n=this.columnStates;this.columnStates=void 0;const o=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:r,colGroupSvc:i}=s;if(r!=null&&r.isPivotResultColsPresent()){if(n){const a=[];for(const l of n)r.getPivotResultCol(l.colId)&&a.push(l);ni(s,{state:a,applyOrder:e},t)}o&&(i==null||i.setColumnGroupState(o,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return Lbe(t)}setColumnGroupState(e,t,n){var a;const o=this.beans.colGroupSvc;if(!o||n!=null&&n.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set((a=e.columnGroup)==null?void 0:a.openColumnGroupIds),i=o.getColumnGroupState().map(({groupId:l})=>{const u=s.has(l);return u&&s.delete(l),{groupId:l,open:u}});for(const l of s)i.push({groupId:l,open:!0});i.length&&(this.columnGroupStates=i),o.setColumnGroupState(i,t)}getFilterState(){const e=this.beans.filterManager;let t=e==null?void 0:e.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const n=e==null?void 0:e.getFilterState(),o=(e==null?void 0:e.getAdvFilterModel())??void 0;return t||o||n?{filterModel:t,columnFilterState:n,advancedFilterModel:o}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:n,columnFilterState:o,advancedFilterModel:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(n!==void 0||o!==void 0)&&(t==null||t.setFilterState(n??null,o??null,"columnFilter")),s!==void 0&&(t==null||t.setAdvFilterModel(s??null,"advancedFilter"))}getRangeSelectionState(){var t;const e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(n=>{const{id:o,type:s,startRow:r,endRow:i,columns:a,startColumn:l}=n;return{id:o,type:s,startRow:r,endRow:i,colIds:a.map(u=>u.getColId()),startColId:l.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:n,colModel:o,visibleCols:s}=this.beans;if(!Aa(t)||!n)return;const r=[];for(const i of(e==null?void 0:e.cellRanges)??[]){const a=[];for(const u of i.colIds){const c=o.getCol(u);c&&a.push(c)}if(!a.length)continue;let l=o.getCol(i.startColId);if(!l){const u=s.allCols,c=new Set(a);l=u.find(d=>c.has(d))}r.push({...i,columns:a,startColumn:l})}n.setCellRanges(r)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(e==null?void 0:e.getHScrollPosition())??{left:0},{top:n}=(e==null?void 0:e.getVScrollPosition())??{top:0};return n||t?{top:n,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:n}=e??{top:0,left:0},{frameworkOverrides:o,rowRenderer:s,animationFrameSvc:r,ctrlsSvc:i}=this.beans;o.wrapIncoming(()=>{var a;i.get("center").setCenterViewportScrollLeft(n),(a=i.getScrollFeature())==null||a.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),r==null||r.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:n,rowPinned:o}=e;return{colId:t.getColId(),rowIndex:n,rowPinned:o}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:n}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:o,rowIndex:s,rowPinned:r}=e;t.setFocusedCell({column:n.getCol(o),rowIndex:s,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const n=e.getCurrentPage(),o=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!n&&!o))return{page:n,pageSize:o}}setPaginationState(e,t){const{pagination:n,gos:o}=this.beans;if(!n)return;const{pageSize:s,page:r}=e??{page:0,pageSize:o.get("paginationPageSize")},i=t==="gridInitializing";s&&!o.get("paginationAutoPageSize")&&n.setPageSize(s,i?"initialState":"pageSizeSelector"),typeof r=="number"&&(i?n.setPage(r):n.goToPage(r))}getRowSelectionState(){var o;const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((o=t==null?void 0:t.toggledNodes)!=null&&o.length)?void 0:t}setRowSelectionState(e,t){var n;(n=this.beans.selectionSvc)==null||n.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t,n){const o=this.beans.expansionSvc;if(!o)return;const s=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};o.setExpansionState(s,n)}updateColumnState(e){const t=this.getColumnState();let n=!1;const o=this.cachedState;for(const s of Object.keys(t)){const r=t[s];Dp(r,o[s])||(n=!0)}this.cachedState={...o,...t},n&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const n=this.cachedState[e];this.setCachedStateValue(e,t),Dp(t,n)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){var e;this.suppressEvents=!0,(e=this.beans.colAnimation)==null||e.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{var t;this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&((t=this.beans.colAnimation)==null||t.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},H_e={moduleName:"GridState",version:ct,beans:[$_e],apiFunctions:{getState:N_e,setState:L_e}};function G_e(e){return e.rowModel.isLastRowIndexKnown()}function U_e(e){var t;return((t=e.pagination)==null?void 0:t.getPageSize())??100}function W_e(e){var t;return((t=e.pagination)==null?void 0:t.getCurrentPage())??0}function z_e(e){var t;return((t=e.pagination)==null?void 0:t.getTotalPages())??1}function j_e(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function K_e(e){var t;(t=e.pagination)==null||t.goToNextPage()}function q_e(e){var t;(t=e.pagination)==null||t.goToPreviousPage()}function Y_e(e){var t;(t=e.pagination)==null||t.goToFirstPage()}function X_e(e){var t;(t=e.pagination)==null||t.goToLastPage()}function Z_e(e,t){var n;(n=e.pagination)==null||n.goToPage(t)}var J_e=class extends qe{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,n=()=>{const o=Math.max(qu(t),1),s=Math.floor(e/o);t.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?Yo(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},ug="paginationPageSizeSelector",Q_e={tag:"span",cls:"ag-paging-page-size"},eRe=class extends Cn{constructor(){super(Q_e),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.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(ug,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!(e!=null&&e.newPageSize))return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){qo(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(ug)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),n=!t||!e.includes(t);if(n){const s=this.gos.exists("paginationPageSize"),r=this.gos.get(ug)!==!0;Je(94,{pageSizeSet:s,pageSizesSet:r,pageSizeOptions:e,paginationPageSizeOption:t}),r||Je(95,{paginationPageSizeOption:t,paginationPageSizeSelector:ug}),e.unshift("")}const o=String(n?"":t);this.selectPageSizeComp?(Fl(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(o,!0)):this.createPageSizeSelectorComp(e,o),this.hasEmptyOption=n}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const n=this.getLocaleTextFunc(),o=n("pageSizeSelectorLabel","Page Size:"),s=n("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Z_).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(s).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(ug);return!Array.isArray(t)||!(t!=null&&t.length)?e:[...t].sort((n,o)=>n-o)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},tRe={selector:"AG-PAGE-SIZE-SELECTOR",component:eRe},nRe=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:var(--ag-pagination-panel-height);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}",oRe=class extends V${constructor(){super(),this.btFirst=dt,this.btPrevious=dt,this.btNext=dt,this.btLast=dt,this.lbRecordCount=dt,this.lbFirstRowOnPage=dt,this.lbLastRowOnPage=dt,this.lbCurrent=dt,this.lbTotal=dt,this.pageSizeComp=dt,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(nRe)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[tRe]);const{btFirst:t,btPrevious:n,btNext:o,btLast:s}=this;this.activateTabIndex([t,n,o,s]),t.insertAdjacentElement("afterbegin",kr(e?"last":"first",this.beans)),n.insertAdjacentElement("afterbegin",kr(e?"next":"previous",this.beans)),o.insertAdjacentElement("afterbegin",kr(e?"previous":"next",this.beans)),s.insertAdjacentElement("afterbegin",kr(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:r=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(r):Jpe(this.beans,r),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{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)}]){const{el:t,fn:n}=e;this.addManagedListeners(t,{click:n,keydown:o=>{(o.key===Ve.ENTER||o.key===Ve.SPACE)&&(o.preventDefault(),n())}})}Zpe(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):Vbe(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),n=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const o=this.isZeroPagesToDisplay(),s=e===n-1;this.nextButtonDisabled=s||o,this.lastButtonDisabled=!t||o||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){fce(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),n=this.pagination.getMasterRowCount(),o=e?n:null,s=this.pagination.getCurrentPage(),r=this.pagination.getPageSize();let i,a;this.isZeroPagesToDisplay()?i=a=0:(i=r*s+1,a=i+r-1,e&&a>o&&(a=o));const l=i+r-1,u=!e&&n<l,c=this.formatNumber(i);this.lbFirstRowOnPage.textContent=c;let d;const h=this.getLocaleTextFunc();u?d=h("pageLastRowUnknown","?"):d=this.formatNumber(a),this.lbLastRowOnPage.textContent=d;const p=t>0?s+1:0,g=this.formatNumber(p);this.lbCurrent.textContent=g;let v,w;if(e)v=this.formatNumber(t),w=this.formatNumber(o);else{const S=h("more","more");v=S,w=S}this.lbTotal.textContent=v,this.lbRecordCount.textContent=w,this.announceAriaStatus(c,d,w,g,v)}announceAriaStatus(e,t,n,o,s){var d,h;const r=this.getLocaleTextFunc(),i=r("page","Page"),a=r("to","to"),l=r("of","of"),u=`${e} ${a} ${t} ${l} ${n}`,c=`${i} ${o} ${l} ${s}`;u!==this.ariaRowStatus&&(this.ariaRowStatus=u,(d=this.ariaAnnounce)==null||d.announceValue(u,"paginationRow")),c!==this.ariaPageStatus&&(this.ariaPageStatus=c,(h=this.ariaAnnounce)==null||h.announceValue(c,"paginationPage"))}},sRe={selector:"AG-PAGINATION",component:oRe},rRe=class extends qe{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return sRe}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:n}=this.beans;n!=null&&n.isEditing()&&(n.isBatchEditing()?n.cleanupEditors():n.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){var n,o;if(!this.active)return;let t=e;this.paginateChildRows||(t=((o=(n=this.beans.rowModel).getTopLevelIndexFromDisplayedIndex)==null?void 0:o.call(n,e))??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.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 ft(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:ft(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:ft(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:ft(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const n=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}n!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const n=this.pageSize,o=t-1;this.totalPages=Math.floor(o/n)+1,this.adjustCurrentPageIfInvalid();const s=this.currentPage,r=n*s;let i=n*(s+1)-1;if(i>o&&(i=o),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(r),i===o)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(i+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:n}=this,o=e-1;this.totalPages=Math.floor(o/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*n,this.bottomDisplayedRowIndex=t*(n+1)-1,this.bottomDisplayedRowIndex>o&&(this.bottomDisplayedRowIndex=o)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:n=!1,newPageSize:o=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:n,newPageSize:o,keepRenderedRows:t})}},iRe={moduleName:"Pagination",version:ct,beans:[rRe,J_e],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:G_e,paginationGetPageSize:U_e,paginationGetCurrentPage:W_e,paginationGetTotalPages:z_e,paginationGetRowCount:j_e,paginationGoToNextPage:K_e,paginationGoToPreviousPage:q_e,paginationGoToFirstPage:Y_e,paginationGoToLastPage:X_e,paginationGoToPage:Z_e},dependsOn:[Ow]};function aRe(e,t={}){const n=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(n))}function IG(e,t,n,o,s){t&&(o&&t.parent&&t.parent.level!==-1&&IG(e,t.parent,n,o,s),t.setExpanded(n,void 0,s))}function lRe(e,t){return e.rowModel.getRowNode(t)}function uRe(e,t,n,o){e.rowRenderer.addRenderedRowListener(t,n,o)}function cRe(e){return e.rowRenderer.getRenderedNodes()}function dRe(e,t,n){e.rowModel.forEachNode(t,n)}function hRe(e){return e.rowRenderer.firstRenderedRow}function fRe(e){return e.rowRenderer.lastRenderedRow}function pRe(e,t){return e.rowModel.getRow(t)}function gRe(e){return e.rowModel.getRowCount()}var mRe={moduleName:"RowApi",version:ct,apiFunctions:{redrawRows:aRe,setRowNodeExpanded:IG,getRowNode:lRe,addRenderedRowListener:uRe,getRenderedNodes:cRe,forEachNode:dRe,getFirstDisplayedRowIndex:hRe,getLastDisplayedRowIndex:fRe,getDisplayedRowAtIndex:pRe,getDisplayedRowCount:gRe}},vRe={moduleName:"ScrollApi",version:ct,apiFunctions:{getVerticalPixelRange:AEe,getHorizontalPixelRange:PEe,ensureColumnVisible:uG,ensureIndexVisible:cG,ensureNodeVisible:kEe}};function yRe(e,t,n){if(!t)return;const o=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;n===null?o.removeAttribute(s):o.setAttribute(s,n)}function wRe(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function CRe(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function bRe(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function SRe(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function ERe(e){return{rowHeight:qu(e),headerHeight:Xp(e)}}function _Re(e,t={}){var r;const n=[];for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const a=i.getCellRenderer();a!=null&&n.push(Kp(a))}if((r=t.columns)!=null&&r.length)return n;const o=[],s=qR(t.rowNodes);for(const i of e.rowRenderer.getAllRowCtrls()){if(s&&!YR(i.rowNode,s)||!i.isFullWidth())continue;const a=i.getFullWidthCellRenderers();for(let l=0;l<a.length;l++){const u=a[l];u!=null&&o.push(Kp(u))}}return[...o,...n]}var RRe={moduleName:"RenderApi",version:ct,apiFunctions:{setGridAriaProperty:yRe,refreshCells:wRe,refreshHeader:CRe,isAnimationFrameQueueEmpty:bRe,flushAllAnimationFrames:SRe,getSizesForCurrentTheme:ERe,getCellRendererInstances:_Re}};function TRe(e,t){var n,o;typeof t=="number"?(n=e.colAutosize)==null||n.sizeColumnsToFit(t,"api"):(o=e.colAutosize)==null||o.sizeColumnsToFitGridBody(t)}function xG({colAutosize:e,visibleCols:t},n,o){Array.isArray(n)?e==null||e.autoSizeCols({colKeys:n,skipHeader:o,source:"api"}):e==null||e.autoSizeCols({...n,colKeys:n.colIds??t.allCols,source:"api"})}function DRe(e,t){var n;t&&typeof t=="object"?xG(e,t):(n=e.colAutosize)==null||n.autoSizeAllColumns({source:"api",skipHeader:t})}var IRe=class extends qe{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){var n;const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let o=!1;const s=t.type;if(s==="fitGridWidth"||s==="fitProvidedWidth")o=!0;else if(s==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const r=e.get("rowData");o=r!=null&&r.length>0&&io(e)}o&&((n=this.beans.colDelayRenderSvc)==null||n.hideColumns(s))}}autoSizeCols(e){const{eventSvc:t,visibleCols:n}=this.beans;this.innerAutoSizeCols(e).then(o=>{var u;const s=c=>qd(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return s(o);const r=AG(this.beans),i=c=>n.leftCols.some(d=>Wp(d,c)),a=c=>n.rightCols.some(d=>Wp(d,c)),l=e.colKeys.filter(c=>!ka(c)&&!Fa(c)&&!i(c)&&!a(c));this.sizeColumnsToFit(r,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:(u=e.columnLimits)==null?void 0:u.map(c=>({...c,key:c.colId})),colKeys:l,onlyScaleUp:!0}),s(o)})}innerAutoSizeCols(e){return new Promise((t,n)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,n));const{colKeys:o,skipHeader:s,skipHeaderGroups:r,stopAtGroup:i,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:u=[],source:c="api"}=e,{animationFrameSvc:d,renderStatus:h,colModel:f,autoWidthCalc:p,visibleCols:g}=this.beans;if(d==null||d.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,n)});return}this.timesDelayed=0;const v=new Set;let w=-1;const S=Object.fromEntries(u.map(({colId:E,..._})=>[E,_])),b=s??this.gos.get("skipHeaderOnAutoSize"),y=r??b;for(;w!==0;){w=0;const E=[];for(const _ of o){if(!_||Rde(_))continue;const I=f.getCol(_);if(!I||v.has(I))continue;const T=p.getPreferredWidthForColumn(I,b);if(T>0){const F=S[I.colId]??{};F.minWidth??(F.minWidth=l),F.maxWidth??(F.maxWidth=a);const L=xRe(I,T,F);I.setActualWidth(L,c),v.add(I),w++}E.push(I)}E.length&&g.refresh(c)}y||this.autoSizeColumnGroupsByColumns(o,c,i),t(v)})}autoSizeColumn(e,t,n){this.autoSizeCols({colKeys:[e],skipHeader:n,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,n){const{colModel:o,ctrlsSvc:s}=this.beans,r=new Set,i=o.getColsForKeys(e);for(const l of i){let u=l.getParent();for(;u&&u!=n;)u.isPadding()||r.add(u),u=u.getParent()}let a;for(const l of r){for(const u of s.getHeaderRowContainerCtrls())if(a=u.getHeaderCtrlForColumn(l),a)break;a==null||a.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const n=this.gos.get("skipHeaderOnAutoSize"),o=()=>{this.autoSizeColumn(t,"uiColumnResized",n)};e.addEventListener("dblclick",o);const s=new sc(e);return s.addEventListener("doubleTap",o),()=>{e.removeEventListener("dblclick",o),s.destroy()}}addColumnGroupResize(e,t,n){const o=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const r=[],i=t.getDisplayedLeafColumns();for(const a of i)a.getColDef().suppressAutoSize||r.push(a.getColId());r.length>0&&this.autoSizeCols({colKeys:r,skipHeader:o,stopAtGroup:t,source:"uiColumnResized"}),n()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const n=AG(this.beans);if(n>0){this.sizeColumnsToFit(n,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):Je(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",n,o){var p,g;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,n,o));return}const s={};for(const{key:v,...w}of(o==null?void 0:o.columnLimits)??[])s[typeof v=="string"?v:v.getColId()]=w;const r=this.beans.visibleCols.allCols;if(e<=0||!r.length)return;const i=Pa(r);if(o!=null&&o.onlyScaleUp&&i>e||e===i&&r.every(w=>{if(w.colDef.suppressSizeToFit)return!0;const S=s==null?void 0:s[w.getId()],b=(S==null?void 0:S.minWidth)??(o==null?void 0:o.defaultMinWidth),y=(S==null?void 0:S.maxWidth)??(o==null?void 0:o.defaultMaxWidth),E=w.getActualWidth();return(b==null||E>=b)&&(y==null||E<=y)}))return;const l=[],u=[];for(const v of r){const w=((p=o==null?void 0:o.colKeys)==null?void 0:p.some(S=>Wp(v,S)))??!0;v.getColDef().suppressSizeToFit||!w?u.push(v):l.push(v)}const c=l.slice(0);let d=!1;const h=v=>{ti(l,v),u.push(v)};for(const v of l){v.resetActualWidth(t);const w=s==null?void 0:s[v.getId()],S=(w==null?void 0:w.minWidth)??(o==null?void 0:o.defaultMinWidth),b=(w==null?void 0:w.maxWidth)??(o==null?void 0:o.defaultMaxWidth),y=v.getActualWidth();typeof S=="number"&&y<S?v.setActualWidth(S,t,!0):typeof b=="number"&&y>b&&v.setActualWidth(b,t,!0)}for(;!d;){d=!0;const v=e-Pa(u);if(v<=0)for(const w of l){const S=((g=s==null?void 0:s[w.getId()])==null?void 0:g.minWidth)??(o==null?void 0:o.defaultMinWidth)??w.minWidth;w.setActualWidth(S,t,!0)}else{const w=v/Pa(l);let S=v;for(let b=l.length-1;b>=0;b--){const y=l[b],E=s==null?void 0:s[y.getId()],_=(E==null?void 0:E.minWidth)??(o==null?void 0:o.defaultMinWidth),I=(E==null?void 0:E.maxWidth)??(o==null?void 0:o.defaultMaxWidth),T=y.getMinWidth(),F=y.getMaxWidth(),L=typeof _=="number"&&_>T?_:T,x=typeof I=="number"&&I<F?I:F;let P=Math.round(y.getActualWidth()*w);P<L?(P=L,h(y),d=!1):P>x?(P=x,h(y),d=!1):b===0&&(P=S),y.setActualWidth(P,t,!0),S-=P}}}for(const v of c)v.fireColumnWidthChangedEvent(t);const f=this.beans.visibleCols;f.setLeftValues(t),f.updateBodyWidths(),!n&&qd(this.eventSvc,c,!0,t)}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,n=e.get("autoSizeStrategy");(n==null?void 0:n.type)!=="fitGridWidth"&&(n==null?void 0:n.type)!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const o=n.type;if(o==="fitGridWidth"){const{columnLimits:s,defaultMinWidth:r,defaultMaxWidth:i}=n,a=s==null?void 0:s.map(({colId:l,minWidth:u,maxWidth:c})=>({key:l,minWidth:u,maxWidth:c}));this.sizeColumnsToFitGridBody({defaultMinWidth:r,defaultMaxWidth:i,columnLimits:a})}else o==="fitProvidedWidth"&&this.sizeColumnsToFit(n.width,"sizeColumnsToFit");t==null||t.revealColumns(o)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{var o;if(!this.isAlive())return;const n="autosizeColumns";e?this.autoSizeCols({...t,source:n,colKeys:e}):this.autoSizeAllColumns({...t,source:n}),(o=this.beans.colDelayRenderSvc)==null||o.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function xRe(e,t,n={}){const o=n.minWidth??e.getMinWidth();t<o&&(t=o);const s=n.maxWidth??e.getMaxWidth();return t>s&&(t=s),t}function AG({ctrlsSvc:e,scrollVisibleSvc:t}){const n=e.getGridBodyCtrl(),s=n.isVerticalScrollShowing()?t.getScrollbarWidth():0;return kp(n.eGridBody)-s}var ARe={moduleName:"ColumnAutoSize",version:ct,beans:[IRe],apiFunctions:{sizeColumnsToFit:TRe,autoSizeColumns:xG,autoSizeAllColumns:DRe},dependsOn:[tH]},PRe=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function kRe(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function FRe(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function ORe(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedTopRow(t)}function MRe(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedBottomRow(t)}function NRe(e,t,n){var o;return(o=e.pinnedRowModel)==null?void 0:o.forEachPinnedRow(t,n)}var LRe={moduleName:"PinnedRow",version:ct,beans:[Oge],css:[PRe],apiFunctions:{getPinnedTopRowCount:kRe,getPinnedBottomRowCount:FRe,getPinnedTopRow:ORe,getPinnedBottomRow:MRe,forEachPinnedRow:NRe},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},VRe=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){var n;const e=(n=this.firstNode.__autoHeights)==null?void 0:n[this.col.getColId()];if(e==null)return;let t=0;for(const o of this.spannedNodes)o!==this.lastNode&&(t+=o.rowHeight);return e-t}},BRe=class extends qe{constructor(e){super(),this.column=e}buildCache(e){var b;const{column:t,beans:{gos:n,pinnedRowModel:o,rowModel:s,valueSvc:r,pagination:i}}=this,{colDef:a}=t,l=this.getNodeMap(e),u=new Map,c=n.getCallback("isFullWidthRow"),d=a.equals,h=a.spanRows,f=typeof h=="function";let p=null,g=null,v;const w=(y,E)=>{p=y,g=null,v=E},S=y=>{const E=!y.isExpandable()&&!y.group&&!y.detail&&(c?!c({rowNode:y}):!0);if(y.rowIndex==null||!E){w(null,null);return}if(p==null||y.level!==p.level||y.footer||g&&y.rowIndex-1!==(g==null?void 0:g.getLastNode().rowIndex)){w(y,r.getValue(t,y));return}const _=r.getValue(t,y);if(f){const I=Ot(n,{valueA:v,nodeA:p,valueB:_,nodeB:y,column:t,colDef:a});if(!h(I)){w(y,_);return}}else if(d?!d(v,_):v!==_){w(y,_);return}if(!g){const I=l==null?void 0:l.get(p);(I==null?void 0:I.firstNode)===p?(I.reset(),g=I):g=new VRe(t,p),u.set(p,g)}g.addSpannedNode(y),u.set(y,g)};switch(e){case"center":(b=s.forEachDisplayedNode)==null||b.call(s,y=>{(!i||i.isRowInPage(y.rowIndex))&&S(y)}),this.centerValueNodeMap=u;break;case"top":o==null||o.forEachPinnedRow("top",S),this.topValueNodeMap=u;break;case"bottom":o==null||o.forEachPinnedRow("bottom",S),this.bottomValueNodeMap=u;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},$Re=class extends qe{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=Yo(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=Yo(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const n=this.createManagedBean(new BRe(e));this.spanningColumns.set(e,n),n.buildCache("top"),n.buildCache("bottom"),n.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t==null||t.createCtrls("top"),t==null||t.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t==null||t.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const n=this.spanningColumns.get(e);return n?n.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:n}=this.beans,o=e.column,s=e.rowIndex,r=this.spanningColumns.get(o);if(!r)return;let i;switch(e.rowPinned){case"top":i=t==null?void 0:t.getPinnedTopRow(s);break;case"bottom":i=t==null?void 0:t.getPinnedBottomRow(s);break;default:i=n.getRow(s)}if(i)return r.getCellSpan(i)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const n=this.spanningColumns.get(e);if(n)return n.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[n,o]of this.spanningColumns)if(o.isCellSpanning(e)){const s=o.getCellSpan(e);t(n,s)}}destroy(){super.destroy(),this.spanningColumns.clear()}},HRe=class extends ih{constructor(e,t,n){super(e.col,e.firstNode,n,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,n,o,s,r,i){this.eWrapper=n,super.setComp(e,t,n,o,s,r,i),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||Ny(e,t.rowIndex)}setAriaRowSpan(){yce(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(Sw(t)){this.focusedCellPosition=void 0;return}const n=this.isCellFocused();n||(this.focusedCellPosition=void 0),e&&n&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},GRe=class extends kw{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var o;const t=(o=this.beans.rowSpanSvc)==null?void 0:o.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new HRe(t,this,this.beans)}isCorrectCtrlForSpan(e){var o;const t=(o=this.beans.rowSpanSvc)==null?void 0:o.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},URe=class extends qe{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,n=this.getCtrlsMap(e),o=n.size,s=this.getAllRelevantRowControls(e),r=new Map;let i=!1;for(const l of s)l.isAlive()&&(t==null||t.forEachSpannedColumn(l.rowNode,(u,c)=>{if(r.has(c.firstNode))return;const d=n.get(c.firstNode);if(d){r.set(c.firstNode,d),n.delete(c.firstNode);return}i=!0;const h=new GRe(c.firstNode,this.beans,!1,!1,!1);r.set(c.firstNode,h)}));this.setCtrlsMap(e,r);const a=r.size===o;if(!(!i&&a)){for(const l of n.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,n=t==null?void 0:t.getCellSpanByPosition(e);if(!n)return;const o=this.getCtrlsMap(e.rowPinned).get(n.firstNode);if(o)return o.getAllCellCtrls().find(s=>s.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},WRe={moduleName:"CellSpan",version:ct,beans:[$Re,URe]},zRe=class extends qe{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,n=e.colDef,o=n.cellClassRules,s=this.getCellClassParams(e,n);jR(this.beans.expressionSvc,o===this.cellClassRules?void 0:this.cellClassRules,o,s,r=>t.toggleCss(r,!0),r=>t.toggleCss(r,!1)),this.cellClassRules=o}applyUserStyles(){const e=this.column,t=e.colDef,n=t.cellStyle;if(!n)return;let o;if(typeof n=="function"){const s=this.getCellClassParams(e,t);o=n(s)}else o=n;o&&this.cellComp.setUserStyles(o)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,n=e.colDef,o=this.getCellClassParams(e,n);for(const r of this.staticClasses)t.toggleCss(r,!1);const s=this.beans.cellStyles.getStaticCellClasses(n,o);this.staticClasses=s;for(const r of s)t.toggleCss(r,!0)}getCellClassParams(e,t){const{value:n,rowNode:o}=this.cellCtrl;return Ot(this.beans.gos,{value:n,data:o.data,node:o,colDef:t,column:e,rowIndex:o.rowIndex})}},jRe=class extends qe{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,n,o){jR(this.beans.expressionSvc,void 0,e.cellClassRules,t,n,o),this.processStaticCellClasses(e,t,n)}getStaticCellClasses(e,t){const{cellClass:n}=e;if(!n)return[];let o;return typeof n=="function"?o=n(t):o=n,typeof o=="string"&&(o=[o]),o||[]}createCellCustomStyleFeature(e,t){return new zRe(e,t)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(s=>{n(s)})}},KRe={moduleName:"CellStyle",version:ct,beans:[jRe]},qRe={moduleName:"RowStyle",version:ct,beans:[OCe]};function YRe(e,t){var n;return!!((n=e.colHover)!=null&&n.isHovered(t))}var XRe=class extends qe{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=n=>{const{beans:o,gos:s,element:r,columns:i}=this,a=o.colHover;if(n??!!s.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(r,{mouseover:a.setMouseOver.bind(a,i),mouseout:a.clearMouseOver.bind(a)});else{for(const u of this.destroyManagedListeners)u();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},ZRe="ag-column-hover",JRe=class extends qe{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,n){const o=()=>{const s=this.isHovered(n);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:o}),o()}onCellColumnHover(e,t){if(!t)return;const n=this.isHovered(e);t.toggleCss(ZRe,n)}addHeaderFilterColumnHoverListener(e,t,n,o){this.createHoverFeature(e,[n],o);const s=()=>{const r=this.isHovered(n);t.toggleCss("ag-column-hover",r)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,n){e.createManagedBean(new XRe(t,n))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},QRe={moduleName:"ColumnHover",version:ct,beans:[JRe],apiFunctions:{isColumnHovered:YRe}},eTe=class extends qe{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){var e,t;this.wrapSvc=(t=(e=this.beans.frameworkOverrides).createGlobalEventListenerWrapper)==null?void 0:t.call(e)}addListener(e,t){var r;const n=((r=this.wrapSvc)==null?void 0:r.wrap(e,t))??t,o=!xw.has(e),s=o?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(n),this.eventSvc.addListener(e,n,o)}removeListener(e,t){var r,i;const n=((r=this.wrapSvc)==null?void 0:r.unwrap(e,t))??t,o=this.asyncListeners.get(e),s=!!(o!=null&&o.delete(n));s||(i=this.syncListeners.get(e))==null||i.delete(n),this.eventSvc.removeListener(e,n,s)}addGlobalListener(e){var r;const t=((r=this.wrapSvc)==null?void 0:r.wrapGlobal(e))??e,n=(i,a)=>{xw.has(i)&&t(i,a)},o=(i,a)=>{xw.has(i)||t(i,a)};this.globalListenerPairs.set(e,{syncListener:n,asyncListener:o});const s=this.eventSvc;s.addGlobalListener(n,!1),s.addGlobalListener(o,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:n,globalListenerPairs:o}=this,s=(n==null?void 0:n.unwrapGlobal(e))??e;if(o.has(s)){const{syncListener:i,asyncListener:a}=o.get(s);t.removeGlobalListener(i,!1),t.removeGlobalListener(a,!0),o.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((n,o)=>{n.forEach(s=>this.eventSvc.removeListener(o,s,t)),n.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const n of e)this.eventSvc.removeGlobalListener(n,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:n,asyncListener:o})=>{t.removeGlobalListener(n,!1),t.removeGlobalListener(o,!0)}),e.clear()}};function tTe(e,t,n){var o;(o=e.apiEventSvc)==null||o.addListener(t,n)}function nTe(e,t,n){var o;(o=e.apiEventSvc)==null||o.removeListener(t,n)}function oTe(e,t){var n;(n=e.apiEventSvc)==null||n.addGlobalListener(t)}function sTe(e,t){var n;(n=e.apiEventSvc)==null||n.removeGlobalListener(t)}var rTe={moduleName:"EventApi",version:ct,apiFunctions:{addEventListener:tTe,addGlobalListener:oTe,removeEventListener:nTe,removeGlobalListener:sTe},beans:[eTe]},iTe={moduleName:"Locale",version:ct,beans:[Mbe]},aTe=class extends qe{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=Yo(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){var a,l,u,c;const{visibleCols:e,rowModel:t,rowSpanSvc:n,pinnedRowModel:o}=this.beans,s=e.autoHeightCols;let r=!1;const i=d=>{var p;const h=d.__autoHeights;let f=Pl(this.beans,d).height;for(const g of s){let v=h==null?void 0:h[g.getColId()];const w=n==null?void 0:n.getCellSpan(g,d);if(w){if(w.getLastNode()!==d)continue;if(v=(p=n==null?void 0:n.getCellSpan(g,d))==null?void 0:p.getLastNodeAutoHeight(),!v)return}if(v==null){if(this.colSpanSkipCell(g,d))continue;return}f=Math.max(v,f)}f!==d.rowHeight&&(d.setRowHeight(f),r=!0)};(a=o==null?void 0:o.forEachPinnedRow)==null||a.call(o,"top",i),(l=o==null?void 0:o.forEachPinnedRow)==null||l.call(o,"bottom",i),(u=t.forEachDisplayedNode)==null||u.call(t,i),r&&((c=t.onRowHeightChanged)==null||c.call(t))}setRowAutoHeight(e,t,n){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[n.getId()];return}const o=e.__autoHeights[n.getId()];e.__autoHeights[n.getId()]=t,o!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:n,colViewport:o,visibleCols:s}=this.beans;if(!n.colSpanActive)return!1;let r=[];switch(e.getPinned()){case"left":r=s.getLeftColsForRow(t);break;case"right":r=s.getRightColsForRow(t);break;case null:r=o.getColsWithinViewport(t);break}return!r.includes(e)}setupCellAutoHeight(e,t,n){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const o=t.parentElement,{rowNode:s,column:r}=e,i=this.beans,a=c=>{var S;if((S=this.beans.editSvc)!=null&&S.isEditing(e)||!e.isAlive()||!n.isAlive())return;const{paddingTop:d,paddingBottom:h,borderBottomWidth:f,borderTopWidth:p}=ju(o),g=d+h+f+p,w=t.offsetHeight+g;if(c<5){const b=$o(i),y=!(b!=null&&b.contains(t)),E=w==0;if(y||E){window.setTimeout(()=>a(c+1),0);return}}this.setRowAutoHeight(s,w,r)},l=()=>a(0);l();const u=Il(i,t,l);return n.addDestroyFunc(()=>{u(),this.setRowAutoHeight(s,void 0,r)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:n}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(n).filter(s=>s.isAutoHeight())),t.length!==0){if(!n.__autoHeights)return!1;for(const o of t){const s=n.__autoHeights[o.getColId()];if(!s||n.rowHeight<s)return!1}}return!0}},lTe={moduleName:"RowAutoHeight",version:ct,beans:[aTe]},uTe={moduleName:"AllCommunity",version:ct,dependsOn:[RG,g_e,R_e,Qbe,u0e,c0e,d0e,h0e,f0e,p0e,g0e,l0e,tEe,nEe,oEe,eEe,rEe,iEe,H_e,$0e,iRe,rH,mRe,vRe,RRe,ARe,qme,LRe,A0e,mbe,KRe,QRe,qRe,rTe,wbe,M_e,iG,iTe,lTe,Kme,l_e,WRe]};let PG=!1;PG||(tde.registerModules([uTe,RG]),PG=!0);class cTe{constructor(t,n){Rn(this,"gridApi",null);Rn(this,"container");Rn(this,"config");Rn(this,"eventListeners",new Map);this.container=t,this.config=n}init(){if(this.gridApi)throw new Error("Grid already initialized");const{onGridReady:t,onCellClicked:n,onCellFocused:o,onRowSelected:s,...r}=this.config,i={...r,onGridReady:a=>{this.gridApi=a.api,t&&t(a)},onCellClicked:a=>{n&&n(a)},onCellFocused:a=>{o&&o(a)},onRowSelected:a=>{s&&s(a)}};return this.gridApi=Pbe(this.container,i),this.gridApi}updateRowData(t){this.gridApi&&this.gridApi.setGridOption("rowData",t)}updateColumnDefs(t){this.gridApi&&this.gridApi.setGridOption("columnDefs",t)}setColumnWidth(t){var n;this.gridApi&&((n=this.gridApi)==null||n.applyColumnState({state:t,applyOrder:!1}))}updateDatasource(t){this.gridApi&&this.gridApi.setGridOption("datasource",t)}refreshInfiniteCache(){this.gridApi&&this.gridApi.refreshInfiniteCache()}sizeColumnsToFit(){this.gridApi}deselectAll(){this.gridApi&&this.gridApi.deselectAll()}getSelectedRows(){var t;return((t=this.gridApi)==null?void 0:t.getSelectedRows())||[]}setQuickFilterText(t){this.gridApi&&this.gridApi.setGridOption("quickFilterText",t)}getColumnState(){var t;return(t=this.gridApi)==null?void 0:t.getColumnState()}addEventListener(t,n){if(!this.gridApi)throw new Error("Grid not initialized");this.eventListeners.has(t)||this.eventListeners.set(t,new Set),this.eventListeners.get(t).add(n),this.gridApi.addEventListener(t,n)}addRow(t,n="bottom"){if(this.gridApi){const o={add:[t],addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(o),n==="bottom"){const s=this.gridApi.getDisplayedRowCount();s>0&&this.gridApi.ensureIndexVisible(s-1,"bottom")}}}addRows(t,n="bottom"){if(this.gridApi&&t.length>0){const o={add:t,addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(o),n==="bottom"){const s=this.gridApi.getDisplayedRowCount();s>0&&this.gridApi.ensureIndexVisible(s-1,"bottom")}}}destroy(){this.gridApi&&(this.eventListeners.forEach((t,n)=>{t.forEach(o=>{var s;(s=this.gridApi)==null||s.removeEventListener(n,o)})}),this.eventListeners.clear(),this.gridApi.destroy(),this.gridApi=null)}getApi(){return this.gridApi}switchTheme(t){document.body.dataset.agThemeMode=t==="dark"?"dark":"light"}}const dTe=dH.withParams({accentColor:"var(--primary-color)",backgroundColor:"#ffffff",borderColor:"#e5e7eb",borderRadius:4,browserColorScheme:"light",chromeBackgroundColor:"#f9fafb",columnBorder:!0,fontFamily:"inherit",fontSize:14,foregroundColor:"#111827",headerBackgroundColor:"#fff",headerFontSize:14,headerFontWeight:600,headerTextColor:"#374151",iconSize:16,rowBorder:!0,spacing:8,headerHeight:40,rowHeight:32,wrapperBorder:!0,wrapperBorderRadius:4},"light").withParams({accentColor:"var(--primary-color)",backgroundColor:"#1f2937",borderColor:"#374151",borderRadius:4,browserColorScheme:"dark",chromeBackgroundColor:"#111827",columnBorder:!0,fontFamily:"inherit",fontSize:14,foregroundColor:"#f9fafb",headerBackgroundColor:"#374151",headerFontSize:14,headerFontWeight:600,headerTextColor:"#f9fafb",iconSize:16,rowBorder:!0,spacing:8,headerHeight:40,rowHeight:32,wrapperBorder:!0,wrapperBorderRadius:4},"dark"),hTe=ot({__name:"AgTable",props:{statusBar:{},sideBar:{type:[Object,String,Array,Boolean,null]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:{},suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:{},tooltipShowDelay:{},tooltipHideDelay:{},tooltipMouseTrack:{type:Boolean},tooltipShowMode:{},tooltipInteraction:{type:Boolean},popupParent:{},copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:{},suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:{},defaultColDef:{},defaultColGroupDef:{},columnTypes:{},dataTypeDefinitions:{},maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:{},groupHeaderHeight:{},floatingFiltersHeight:{},pivotHeaderHeight:{},pivotGroupHeaderHeight:{},hidePaddedHeaderRows:{type:Boolean},allowDragFromColumnsToolPanel:{type:Boolean},suppressMovableColumns:{type:Boolean},suppressColumnMoveAnimation:{type:Boolean},suppressMoveWhenColumnDragging:{type:Boolean},suppressDragLeaveHidesColumns:{type:Boolean},suppressGroupChangesColumnVisibility:{type:[Boolean,String]},suppressMakeColumnVisibleAfterUnGroup:{type:Boolean},suppressRowGroupHidesColumns:{type:Boolean},colResizeDefault:{},suppressAutoSize:{type:Boolean},autoSizePadding:{},skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:{},components:{},editType:{},suppressStartEditOnTab:{type:Boolean},getFullRowEditValidationErrors:{type:Function},invalidEditValueMode:{},singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:{},defaultCsvExportParams:{},suppressCsvExport:{type:Boolean},defaultExcelExportParams:{},suppressExcelExport:{type:Boolean},excelStyles:{},findSearchValue:{},findOptions:{},quickFilterText:{},cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:{},advancedFilterBuilderParams:{},advancedFilterParams:{},suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableFilterHandlers:{type:Boolean},filterHandlers:{},enableCharts:{type:Boolean},chartThemes:{},customChartThemes:{},chartThemeOverrides:{},chartToolPanelsDef:{},chartMenuItems:{type:[Array,Function]},loadingCellRenderer:{},loadingCellRendererParams:{},loadingCellRendererSelector:{type:Function},localeText:{},masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:{},detailCellRenderer:{},detailCellRendererParams:{},detailRowHeight:{},detailRowAutoHeight:{type:Boolean},context:{},alignedGrids:{type:[Array,Function]},tabIndex:{},rowBuffer:{},valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:{},loadingOverlayComponent:{},loadingOverlayComponentParams:{},suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:{},noRowsOverlayComponent:{},noRowsOverlayComponentParams:{},suppressNoRowsOverlay:{type:Boolean},pagination:{type:Boolean},paginationPageSize:{},paginationPageSizeSelector:{type:[Array,Boolean]},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:{},pivotMaxGeneratedColumns:{},pivotDefaultExpanded:{},pivotColumnGroupTotals:{},pivotRowTotals:{},pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:{},suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:{},cellFadeDuration:{},allowShowChangeAfterFilter:{type:Boolean},domLayout:{},ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},rowDragInsertDelay:{},suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},dragAndDropImageComponent:{},dragAndDropImageComponentParams:{},fullWidthCellRenderer:{},fullWidthCellRendererParams:{},embedFullWidthRows:{type:Boolean},groupDisplayType:{},groupDefaultExpanded:{},autoGroupColumnDef:{},groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:{},groupAggFiltering:{type:[Boolean,Function]},groupTotalRow:{type:[String,Function]},grandTotalRow:{},suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:{},groupRowRenderer:{},groupRowRendererParams:{},treeData:{type:Boolean},treeDataChildrenField:{},treeDataParentIdField:{},rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},groupHierarchyConfig:{},pinnedTopRowData:{},pinnedBottomRowData:{},enableRowPinning:{type:[Boolean,String]},isRowPinnable:{type:Function},isRowPinned:{type:Function},rowModelType:{},rowData:{},asyncTransactionWaitMillis:{},suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:{},cacheOverflowSize:{},infiniteInitialRowCount:{},serverSideInitialRowCount:{},suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:{},maxBlocksInCache:{},maxConcurrentDatasourceRequests:{},blockLoadDebounceMillis:{},purgeClosedRowNodes:{type:Boolean},serverSideDatasource:{},serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:{},viewportDatasource:{},viewportRowModelPageSize:{},viewportRowModelBufferSize:{},alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:{},rowSelection:{},cellSelection:{type:[Boolean,Object]},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:{},rowNumbers:{type:[Boolean,Object]},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:{},suppressClearOnFillReduction:{type:Boolean},sortingOrder:{},accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:{},suppressMaintainUnsortedOrder:{type:Boolean},icons:{},rowHeight:{},rowStyle:{},rowClass:{},rowClassRules:{},suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:{},deltaSort:{type:Boolean},treeDataDisplayType:{},enableGroupEdit:{type:Boolean},initialState:{},reactiveCustomComponents:{type:Boolean},renderingMode:{},theme:{},loadThemeGoogleFonts:{type:Boolean},themeCssLayer:{},styleNonce:{},themeStyleContainer:{},getContextMenuItems:{type:Function},getMainMenuItems:{type:Function},postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:{type:Function},createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},getLocaleText:{type:Function},getDocument:{type:Function},paginationNumberFormatter:{type:Function},getGroupRowAgg:{type:Function},isGroupOpenByDefault:{type:Function},ssrmExpandAllAffectsAllRows:{type:Boolean},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:{type:Function},getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:{type:Function},isServerSideGroup:{type:Function},getServerSideGroupKey:{type:Function},getBusinessKeyForNode:{type:Function},getRowId:{type:Function},resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:{type:Function},isRowMaster:{type:Function},fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},onToolPanelVisibleChanged:{type:Function},onToolPanelSizeChanged:{type:Function},onColumnMenuVisibleChanged:{type:Function},onContextMenuVisibleChanged:{type:Function},onCutStart:{type:Function},onCutEnd:{type:Function},onPasteStart:{type:Function},onPasteEnd:{type:Function},onColumnVisible:{type:Function},onColumnPinned:{type:Function},onColumnResized:{type:Function},onColumnMoved:{type:Function},onColumnValueChanged:{type:Function},onColumnPivotModeChanged:{type:Function},onColumnPivotChanged:{type:Function},onColumnGroupOpened:{type:Function},onNewColumnsLoaded:{type:Function},onGridColumnsChanged:{type:Function},onDisplayedColumnsChanged:{type:Function},onVirtualColumnsChanged:{type:Function},onColumnEverythingChanged:{type:Function},onColumnsReset:{type:Function},onColumnHeaderMouseOver:{type:Function},onColumnHeaderMouseLeave:{type:Function},onColumnHeaderClicked:{type:Function},onColumnHeaderContextMenu:{type:Function},onComponentStateChanged:{type:Function},onCellValueChanged:{type:Function},onCellEditRequest:{type:Function},onRowValueChanged:{type:Function},onCellEditingStarted:{type:Function},onCellEditingStopped:{type:Function},onRowEditingStarted:{type:Function},onRowEditingStopped:{type:Function},onBulkEditingStarted:{type:Function},onBulkEditingStopped:{type:Function},onBatchEditingStarted:{type:Function},onBatchEditingStopped:{type:Function},onUndoStarted:{type:Function},onUndoEnded:{type:Function},onRedoStarted:{type:Function},onRedoEnded:{type:Function},onCellSelectionDeleteStart:{type:Function},onCellSelectionDeleteEnd:{type:Function},onRangeDeleteStart:{type:Function},onRangeDeleteEnd:{type:Function},onFillStart:{type:Function},onFillEnd:{type:Function},onFilterOpened:{type:Function},onFilterChanged:{type:Function},onFilterModified:{type:Function},onFilterUiChanged:{type:Function},onFloatingFilterUiChanged:{type:Function},onAdvancedFilterBuilderVisibleChanged:{type:Function},onFindChanged:{type:Function},onChartCreated:{type:Function},onChartRangeSelectionChanged:{type:Function},onChartOptionsChanged:{type:Function},onChartDestroyed:{type:Function},onCellKeyDown:{type:Function},onGridReady:{type:Function},onGridPreDestroyed:{type:Function},onFirstDataRendered:{type:Function},onGridSizeChanged:{type:Function},onModelUpdated:{type:Function},onVirtualRowRemoved:{type:Function},onViewportChanged:{type:Function},onBodyScroll:{type:Function},onBodyScrollEnd:{type:Function},onDragStarted:{type:Function},onDragStopped:{type:Function},onDragCancelled:{type:Function},onStateUpdated:{type:Function},onPaginationChanged:{type:Function},onRowDragEnter:{type:Function},onRowDragMove:{type:Function},onRowDragLeave:{type:Function},onRowDragEnd:{type:Function},onRowDragCancel:{type:Function},isRowValidDropPosition:{type:Function},onRowResizeStarted:{type:Function},onRowResizeEnded:{type:Function},onColumnRowGroupChanged:{type:Function},onRowGroupOpened:{type:Function},onExpandOrCollapseAll:{type:Function},onPivotMaxColumnsExceeded:{type:Function},onPinnedRowDataChanged:{type:Function},onPinnedRowsChanged:{type:Function},onRowDataUpdated:{type:Function},onAsyncTransactionsFlushed:{type:Function},onStoreRefreshed:{type:Function},onHeaderFocused:{type:Function},onCellClicked:{type:Function},onCellDoubleClicked:{type:Function},onCellFocused:{type:Function},onCellMouseOver:{type:Function},onCellMouseOut:{type:Function},onCellMouseDown:{type:Function},onRowClicked:{type:Function},onRowDoubleClicked:{type:Function},onRowSelected:{type:Function},onSelectionChanged:{type:Function},onCellContextMenu:{type:Function},onRangeSelectionChanged:{type:Function},onCellSelectionChanged:{type:Function},onTooltipShow:{type:Function},onTooltipHide:{type:Function},onSortChanged:{type:Function},height:{},isSorting:{type:Boolean}},emits:["onGridReady","row-clicked","cell-clicked","cell-focused","row-selected","on-scroll"],setup(e,{expose:t,emit:n}){const o=e,s=n,r=$(null);_E(r,()=>{var v;const g=(v=i.value)==null?void 0:v.getApi();g==null||g.clearFocusedCell()});const i=$(null),a=X(()=>({width:"100%",height:o.height||"500px"})),l=X(()=>({...o,theme:dTe}));function u(){var v;if(!r.value){console.warn("Grid container element not found");return}const g={...l.value,height:o.height};i.value=new cTe(r.value,g),i.value.init(),(v=i.value.getApi())==null||v.addEventListener("bodyScroll",()=>{s("on-scroll",new Event("scroll"))}),c()}function c(){var v;const g=((v=i.value)==null?void 0:v.getApi())??null;s("onGridReady",g)}function d(g){var w,S;if(!g)return;(w=i.value)==null||w.updateColumnDefs(g);const v=g.map(b=>b.field&&b.width&&!b.hide?{colId:b.field,width:b.width,flex:null}:null).filter(b=>b!==null);(S=i.value)==null||S.setColumnWidth(v)}function h(){var g;(g=i.value)==null||g.destroy(),i.value=null}function f(){var g;return((g=i.value)==null?void 0:g.getApi())||void 0}function p(){return i.value||null}return Qe(()=>o.columnDefs,(g,v)=>{const w=g==null?void 0:g.filter(b=>!b.hide).map(b=>b.field).join(","),S=v==null?void 0:v.filter(b=>!b.hide).map(b=>b.field).join(",");w!==S&&d(g)},{deep:!0}),Vn(()=>{h()}),t({gridApi:f,gridManager:p,syncColumnDefs:d}),Xt(()=>{u()}),Vn(()=>{h()}),(g,v)=>(q(),de("div",{ref_key:"gridContainerRef",ref:r,style:hn(a.value),class:le(["ag-theme-quartz",["ag-table-container",o.isSorting?"is-sorting":""]])},null,6))}});function lc(e){return uB(e)}const fTe=()=>[...[{headerName:"Thumbnail",field:"thumbnail",sortable:!1,filter:!1,pinned:"left",lockPinned:!0,suppressMovable:!0,headerComponent:lc(Sl),width:86,resizable:!1},{headerName:"Name",field:"name",sortable:!1,filter:!1,pinned:"left",lockPinned:!0,headerComponent:lc(Sl),suppressMovable:!0},{headerName:"Notes",field:"description",sortable:!1,filter:!1,suppressMovable:!1},{headerName:"Assignee",field:"assignees",sortable:!1,filter:!1,headerComponent:lc(Sl)},{headerName:"Status",field:"status",sortable:!1,filter:!1,headerComponent:lc(Sl)},{headerName:"Date Range",field:"dateRange",sortable:!1,filter:!1,headerComponent:lc(Sl)},{headerName:"Last Updated",field:"lastUpdated",sortable:!1,filter:!1,headerComponent:lc(Sl),cellRendererParams:n=>{var o,s,r;return{...n,value:(o=n==null?void 0:n.data)==null?void 0:o.lastUpdated.value,tooltip:((r=(s=n==null?void 0:n.data)==null?void 0:s.lastUpdated)==null?void 0:r.tooltip)||void 0,readOnly:!0}}},{headerName:"Completed On",field:"completedOn",sortable:!1,filter:!1,headerComponent:lc(Sl),cellRendererParams:n=>{var o,s,r;return{...n,value:(o=n==null?void 0:n.data)==null?void 0:o.completedOn.value,tooltip:((r=(s=n==null?void 0:n.data)==null?void 0:s.completedOn)==null?void 0:r.tooltip)||void 0,readOnly:!0}}}].map(n=>Tp.fromType(n))],$w={WIDTH:60,HEADER_CLASS:"ag-checkbox-header"},pTe=()=>({field:"__checkboxSelection",checkboxSelection:!0,headerCheckboxSelection:!0,pinned:"left",width:$w.WIDTH,minWidth:$w.WIDTH,maxWidth:$w.WIDTH,cellClass:"ag-checkbox-cell",headerClass:$w.HEADER_CLASS,headerComponent:My(zse),suppressMovable:!0}),kG="blank",gTe=[kG,"__checkboxSelection","options"],mTe=["uiColumnResized","uiColumnMoved","api"],vTe={headerName:"",field:"options",sortable:!1,filter:!1,editable:!0,pinned:"right",lockPosition:!0,suppressMovable:!0,resizable:!1},FG=(e,t)=>t!=null&&t.width?{...e,width:t.width,flex:void 0}:e,yTe=(e,t,n)=>{const{getCachedValue:o,setCachedValue:s}=bf({dbName:"item_table_column_configs",storeName:"column_configs"}),r=async()=>{const d=await o(t);if(!d||typeof d!="string")return null;try{const h=JSON.parse(d);return Array.isArray(h)?h:null}catch(h){return console.error("Failed to parse cached column config:",h),null}},i=$([]),a=pTe();let l=0;const u=async d=>{const h=++l,f=await r();if(h!==l)return;const p=new Map(f==null?void 0:f.map(k=>[k.field,k])),g=fTe(),v=Tp.fromType(vTe),w=!!f,b=((d==null?void 0:d.map(k=>{var M;return{headerName:k.name,field:`metric_${k.id}`,editable:((M=k==null?void 0:k.auth_permission)==null?void 0:M.permission)==2,sortable:!0,filter:!1,flex:1,context:{...k},hide:w?!p.has(`metric_${k.id}`):!(k.is_primary||k.is_point_metric),cellClass:"ag-cell-optimized",headerComponent:My(Sl),headerComponentParams:()=>({headerType:k.metric_type.code=="number"||k.metric_type.code=="formula"?"number":"default"})}}))||[]).map(k=>Tp.fromType(k)),y=[a,...g,...b,v],E=[],_=[],I=[];for(const k of y)k.pinned==="left"?E.push(k):k.pinned==="right"||k.field===kG?_.push(k):I.push(k);if(!f||f.length===0){i.value=y;return}const T=new Map(I.map(k=>[k.field,k])),F=[];for(const k of f)if(k.field&&T.has(k.field)){const M=T.get(k.field);F.push({...FG(M,k),hide:k.hide}),T.delete(k.field)}const L=Array.from(T.values()),x=[...F,...L].map(k=>({...k,lockPinned:!0})),P=k=>{const M=p.get(k.field),N=FG(k,M);return M&&M.hide!==void 0?{...N,hide:M.hide}:N};i.value=[...E.map(P),...x,..._.map(P)]};Qe(e,d=>u(d),{immediate:!0});const c=Cr((d,h)=>{if((d==null?void 0:d.source)!==void 0&&!mTe.includes(d.source))return;const f=n.value,p=f==null?void 0:f.getColumnDefs(),g=new Map;if(f==null||f.getColumnState().forEach(w=>{w.width&&g.set(w.colId,Number(w.width))}),i.value=p||i.value,!h)return;const v=(p??[]).filter(w=>w.field&&!gTe.includes(w.field)).map(w=>({field:w.field,hide:w.hide,width:g.get(w.field)||w.width,pinned:w.pinned}));s(t,JSON.stringify(v))},Si);return nD(()=>c.cancel()),{columnDefs:i,checkboxColumn:a,saveColumnConfig:c}},wTe=()=>{const e=un.getInstance().getItem("API_BASE_URL");return e!=null&&e.includes("v1")?e.slice(0,e.lastIndexOf("/v1")):String(e)},CTe=e=>{var P,k,M;const{showMessage:t,showErrorNetMessage:n}=Rs(),o=oo(),s={domainApi:wTe(),wsCode:un.getInstance().getItem("ws.code"),entityId:e.value.entityId},r=(M=(k=(P=o==null?void 0:o.appContext)==null?void 0:P.config)==null?void 0:k.globalProperties)==null?void 0:M.apiConfig;if(!r||s.domainApi===""||s.wsCode==="")throw new Error("API configuration is missing in useItems");const i=new ON(r,s);i.on("call-api",N=>{N.success?t(N.apiCode,"success"):n(N)});const a=Fo({}),l=$([]),u=$(!1),c=$(null),d=$(null),h=$(1),f=$(20);let p=Promise.resolve();const{setCachedUsers:g}=RJ(),v=N=>({workspaceId:e.value.workspaceId,entityIds:[e.value.entityId],orderBy:"id-asc",include_permission:"{include_permission}",include_permission_names:!0,q:N}),w=50,S=async(N,B,z)=>{if(!N.length)return[];const oe=B9(N,B);return(await Promise.all(oe.map(z))).flat()},b=async N=>{try{return(await i.getPermissionForItems({workspaceId:e.value.workspaceId,itemIds:N})).data.map(z=>[z==null?void 0:z.id,z.permission])}catch(B){return console.error("Failed to fetch item permissions chunk:",B),[]}},y=async(N,B)=>{try{const z=await i.getMetricValues({workspaceId:e.value.workspaceId,item_ids:N,per_page:N.length*B.length,metric_ids:B}),oe=z.data.map(te=>{const se=new Map(te.item_metrics.map(A=>[A.metric_id,{value:A.value,auth_permission:A==null?void 0:A.auth_permission}])),Z=Object.fromEntries(B.map(A=>[A,se.get(A)??null]));return[te==null?void 0:te.id,Z]}),ie=new Set(z.data.map(te=>te==null?void 0:te.id));for(const te of N)if(!ie.has(te)){const se=Object.fromEntries(B.map(Z=>[Z,{value:null,auth_permission:void 0}]));oe.push([te,se])}return oe}catch(z){return console.error("Failed to fetch a chunk of metric values:",z),N.map(ie=>[ie,Object.fromEntries(B.map(te=>[te,void 0]))])}},E=async N=>{try{const B=await i.getAssignedUser({workspaceId:e.value.workspaceId,item_ids:N,per_page:N.length}),z=B.data.flatMap(oe=>oe.assignees);return g(z),B.data.map(oe=>[oe==null?void 0:oe.id,oe==null?void 0:oe.assignees])}catch(B){return console.error("Failed to fetch a chunk of assigned users:",B),[]}},_=async N=>{if(!N.length)return console.warn("getPermissionForItems: Empty itemIds"),{};try{const B=await S(N,w,b);return Object.fromEntries(B)}catch(B){return console.error("Failed to fetch item permissions:",B),{}}},I=async(N,B)=>!N.length||!B.length?{}:(p=p.then(async()=>{try{const ie=[];let te=0;for(let Z=0;Z<B.length;Z+=5){te++;const A=B.slice(Z,Z+5),j=[];for(let ge=0;ge<A.length;ge++){const xe=A[ge],ue=await S(N,w,K=>y(K,[xe]));j.push(ue),await new Promise(K=>setTimeout(K,500))}ie.push(...j);const ne=Z+5>=B.length}const se={};for(const Z of ie.flat()){const[A,j]=Z;se[A]||(se[A]={}),Object.assign(se[A],j)}return se}catch(z){return console.error("Failed to fetch metric values:",z),{}}}),p),T=async N=>{if(!N.length)return console.warn("getAssignedUsers: Empty itemIds"),{};try{const B=await S(N,w,E);return Object.fromEntries(B)}catch(B){return console.error("Failed to fetch assigned users:",B),{}}};return{items:l,loading:u,error:c,pagination:d,currentPage:h,pageSize:f,cusorMap:a,fetchItems:async N=>{const{cursor:B,offset:z,size:oe,searchQuery:ie}=N;let te=[];u.value=!0,c.value=null;try{const se=await i.getAllItem_cursor({...N,cursor:B||void 0,offset:z||void 0,pageSize:oe||f.value,...v(ie),sortBy:N.sort_by});return l.value=se.data,d.value=se.meta,h.value=se.meta.current_page||0,te=se.data.map(Z=>Z==null?void 0:Z.id),se}catch(se){throw c.value=se,console.error("Failed to fetch items (cursor):",se),se}finally{const se=async()=>{try{const[Z,A]=await Promise.all([T(te),_(te)]);e.value.updateItemData({assignees:Z,permission:A},te);const j=await I(te,e.value.metricIds);e.value.setMetricValues(j,new Set(te),e.value.metricIds)}catch(Z){console.error("Post-fetch processing failed:",Z)}};u.value=!1,setTimeout(se)}},getAssignableStatus:async N=>{try{return await i.getAssignableStatus({workspaceId:e.value.workspaceId,itemIds:N})}catch(B){throw console.error("Failed to fetch assignable status:",B),B}},getMetricList:async N=>{try{return await i.getMetricList({workspaceId:e.value.workspaceId,entityId:N})}catch(B){throw console.error("Failed to fetch metric list:",B),B}},getMetricValues:I,getAssignedUsers:T}};function bTe(e){return{updateRowData:(o,s)=>{if(!e.value)return;const r=[],i=new Set,a=e.value.getColumnDefs();if(!a)return;const l=a.map(u=>{if(u.field&&u.field.startsWith("metric_")&&(u.hide===!1||u.hide===void 0))return u.field}).filter(Boolean);s.forEach(u=>{var d;const c=(d=e.value)==null?void 0:d.getRowNode(u);if(c){if(r.push(c),o.assignees){const h=hJ((o.assignees[u]||[]).map(bO));c.data.assignees=h,i.add("assignees")}o.permission&&(c.data.permissions=o.permission[u]),l.forEach(h=>{c.data[h]=c.data[h]??null})}}),i.add("assignees"),i.add("status"),i.add("dateRange"),i.add("moreActions"),i.add("name"),i.add("description"),e.value.refreshCells({rowNodes:r,columns:Array.from(i),force:!0})},setMetricValues:(o,s,r)=>{const i=e.value;if(!i)return;const a=new Map(Array.from(s).map(u=>[u,new Map(r.map(c=>[c,{value:null,auth_permission:void 0}]))]));Object.entries(o).forEach(([u,c])=>{Object.entries(c).forEach(([d,h])=>{var f;(f=a.get(u))==null||f.set(d,{value:h==null?void 0:h.value,auth_permission:h==null?void 0:h.auth_permission})})});const l=Array.from(a.entries()).map(([u,c])=>{const d=i.getRowNode(u);return d!=null&&d.data?(c.forEach((h,f)=>{const p=`metric_${f}`;d.data[p]=(h==null?void 0:h.value)||null;const g=`metric_permission_${f}`;d.data[p]=(h==null?void 0:h.value)||null,d.data[g]=(h==null?void 0:h.auth_permission)||null}),d):null});l.length>0&&i.refreshCells({rowNodes:l,columns:Array.from(r).map(u=>`metric_${u}`),force:!0})}}}function STe(e,t,n,o,s){let r=!0;return{async getRows(i){try{o(!0),r&&(s(!0),r=!1);const a=Math.floor(i.startRow/t)+1,{rows:l,total:u}=await e({page:a,pageSize:t,filterText:n(),sort_by:i.sortModel});let c=-1;Number.isFinite(u)?c=u:l.length<t&&(c=i.startRow+l.length),i.context={pageSize:t,text:n()},i.successCallback(l,c),o(!1),s(!1)}catch(a){console.error("Datasource fetch error:",a),i.failCallback(),o(!1),s(!1)}}}}function ETe(e){const{selectRowData:t,isSidebarOpen:n,quickFilterText:o,gridApi:s,fetcher:r}=e,i=$(!0),a=$(!0),l=$(!1),u=()=>{n.value=!n.value},c=v=>{if(i.value=!1,s.value=v,!v)return null;const{addEventListener:w,setGridOption:S}=v;if(!r)return console.error("Fetcher function is undefined"),null;const b=STe(r,e.perPage,()=>o.value,y=>{i.value=y},y=>{a.value=y});return S==null||S("datasource",b),w==null||w("selectionChanged",()=>{t.value=v.getSelectedRows()}),v||null},d=v=>{var w,S;if((w=s.value)==null||w.hideOverlay(),v!==void 0&&(o.value=v),(S=s.value)==null||S.deselectAll(),t.value=[],i.value=!0,!s.value||!r){console.error("Grid API or fetcher is not available"),i.value=!1;return}l.value=!0,a.value=!0,s.value.purgeInfiniteCache(),s.value.ensureIndexVisible(0,"top"),setTimeout(()=>{i.value=!1,setTimeout(()=>{l.value=!1},100)},300)},h=()=>{var v;(v=s.value)==null||v.deselectAll(),t.value=[]},f=Cr(v=>{d(v)},Si);return{isLoading:i,toggleSidebar:u,onGridReady:c,onSearch:f,handleUnSelect:h,firstLoad:a,cacheCleared:l,handleSelectAll:()=>{s.value},isSelectAll:$(!1)}}const _Te={changelog:{"1.0.1":{date:"2024-06-20",changes:["Fixed styling issues for archived and deleted rows."]},"1.0.0":{date:"2024-06-15",changes:["Initial release of the Item Table package."]},"0.0.1-alpha.8":{date:"2024-06-10",changes:["Improved performance of row updates.","Added support for custom cell renderers.","Add row hover effect for better UX.","Add loading skeleton for filter","Beta release with core functionalities implemented."]},"0.0.1-alpha.9":{date:"2024-06-05",changes:["Add row selection feature.","Fix bug with column resizing.","Optimize rendering for large datasets.","Implement getLog function to retrieve changelog entries based on version.","Display app version and changelog in the Item Table component tooltip.","Clean up unused autocomplete and memoized config composables.","Update styles for better consistency and readability."]},"0.0.1-alpha.11":{date:"2024-06-18",changes:["Add bulk process status display: items now show an hourglass icon and tooltip when being processed.","Update data model: added isProcessing and bulk_process properties to track item status.","Improve row focus: focused rows now flash for better visibility.","Set 'Last Updated' and 'Completed On' columns as read-only.","Fix: resolve visual fetching issue in useRemoteFiles composable.","Fix: use correct upload icon in PopupCreateScenes component.","Enhance data conversion to include processing status in item rows."]},"0.0.1-alpha.12":{date:"2024-06-12",changes:["feat: enhance Snackbar component and notification handling","Refactor Snackbar.vue for improved readability and styling, including color adjustments for icons and text.","Add showMessage function in notifications store to display messages based on API keys, improving notification management.","Introduce notificationMessage constant to centralize notification messages for various API actions, enhancing maintainability.","Remove unnecessary console logs from useRemoteFiles and improve logging in notification store for better debugging."]},"0.0.1-alpha.16":{date:"2024-06-20",changes:["Add onboarding tour feature and enhance UI components with new dependencies","Refactor UI components for improved styling and functionality","Updated RatingComponent.vue to streamline class bindings and improve accessibility attributes.","Enhanced SearchBox.vue by adding a clear event handler and simplifying icon rendering.","Modified AssigneeGroupEditor.vue and AssigneeGroupRenderer.vue to remove unnecessary size attributes from icons.","Adjusted DateRangeRenderer.vue to remove size attributes from icons for consistency.","Updated HeaderCheckbox.vue to set dropdown placement to 'bottom-start'.","Refined HeaderSorting.vue to simplify sort option labels and improve sorting logic.","Enhanced HeaderWrapper.vue to utilize reactive properties for sorting state.","Improved HyperLinkEditor.vue and HyperLinkInlineEditor.vue by removing size attributes from icons.","Updated PopupLayout.vue to use a CSS variable for box-shadow styling.","Refined Snackbar.vue to standardize icon colors and improve styling consistency.","Adjusted useTippy.ts to set default placement and arrow visibility for tooltips.","Modified notificationMessage.ts to remove error messages for list fetching.","Cleaned up notifications.ts by removing console logs for a cleaner codebase.","Updated sortStore.ts to comment out unnecessary console logs for better performance.","Enhanced styles.scss by defining new icon size variables and standardizing box-shadow styles."]},"0.0.99":{date:"2024-06-24",changes:["Fix: resolve issue with incorrect version display in Item Table component.","Update changelog retrieval logic to ensure accurate version matching.","Enhance tooltip display for app version and changelog in Item Table component."]}}},RTe=e=>{var t;return(t=Object.entries(_Te.changelog).find(([n,o])=>n===e))==null?void 0:t[1].changes},TTe={class:"visual-btn-visual"},DTe={class:"visual-btn--label"},ITe={key:0,class:"visual-btn--description"},xTe={key:1,class:"visual-btn--description"},Hw=_t(ot({__name:"VisualButton",props:{label:{},description:{},disabled:{type:Boolean}},emits:["onClick"],setup(e,{emit:t}){const n=e,o=()=>{n.disabled||s("onClick")},s=t;return(r,i)=>(q(),de("div",{class:le(["visual-btn",{"visual-btn--disabled":e.disabled}]),onClick:o},[Se("div",TTe,[kt(r.$slots,"visual",{},()=>[i[0]||(i[0]=Mz('<svg width="42" height="36" viewBox="0 0 42 36" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-c2003bd7><g clip-path="url(#clip0_4824_13082)" data-v-c2003bd7><path d="M5.14286 18V10.2857H18V18H5.14286ZM5.14286 23.1 429H18V30.8571H5.14286V23.1429ZM23.1429 30.8571V23.1429H36V30.8571H23.1429ZM36 18H23.1429V10.2857H36V18ZM5.14286 0C2.30625 0 0 2.30625 0 5.14286V30.8571C0 33.6937 2.30625 36 5.14286 36H36C38.8366 36 41.1429 33.6937 41.1429 30.8571V5.14286C41.1429 2.30625 38.8366 0 36 0H5.14286Z" fill="#D7D7D7" data-v-c2003bd7></path><path d="M0 5.14286C0 2.30625 2.30625 0 5.14286 0H36C38.8366 0 41.1429 2.30625 41.1429 5.14286V10.318H0V5.14286Z" fill="#A6A6A6" data-v-c2003bd7></path></g><defs data-v-c2003bd7><clipPath id="clip0_4824_13082" data-v-c2003bd7><rect width="41.1429" height="36" fill="white" data-v-c2003bd7></rect></clipPath></defs></svg>',1))],!0)]),Se("div",DTe,at(n.label),1),n.disabled?(q(),de("div",ITe," Coming soon ")):(q(),de("div",xTe,at(n.description),1))],2))}}),[["__scopeId","data-v-c2003bd7"]]),OG="xlsx_toolbox",MG="feedback_lockup_toolbox",ATe="TOOLBOX_EXPORT_DATA",PTe="https://app.arbocollab.com",kTe=1e3,NG=()=>sessionStorage.getItem("BASE_URL"),LG=(e,t="xlsx-mapping")=>{const n=Dn("switchInstance",void 0),o=`${t}:load`,s=`${t}:edit`,r=new Set;let i;const a=()=>{const h=t==="xlsx-mapping"?OG:MG,f={showLoad:!1};n?n(h,"",f):window.appManager.switchInstance(h,"",f)},l=(h,f)=>{const p=setTimeout(()=>{r.delete(p),window.postMessage({type:h,payload:f},`${NG()}`)},kTe);r.add(p)},u=h=>{if(!h)throw new Error("Payload is missing");a(),l(o,h)},c=(h,f)=>{if(!h)throw new Error("Error file is missing");a(),l(s,{file:h})},d=h=>{if((h==null?void 0:h.type)!==ATe)return;const{file:f,fileName:p}=h.payload;e({channel:t,file:new File([f],p,{type:f.type}),fileName:p});const g=t==="xlsx-mapping"?OG:MG;g=="xlsx_toolbox"&&window.appManager.hide(g)};return Xt(()=>{i=zne({target:window,allowedOrigins:[NG()||PTe],onMessage:d,onInvalidMessage:(h,f,p)=>{console.warn("Rejected postMessage:",f,p.origin)}})}),Vn(()=>{i==null||i(),r.forEach(clearTimeout),r.clear()}),{openToolbox:u,sendBackErrorFile:c}},FTe={class:"header-name"},OTe={class:"description"},MTe={key:0,class:"error-message"},NTe={class:"dynamic"},LTe={key:1,class:"choose-method-container"},VTe={key:3,class:"select-status-container"},BTe={key:4,class:"result-container"},$Te={key:5,class:"result-container"},HTe={key:0},GTe={key:3},VG="text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel",UTe=20,WTe=_t(ot({__name:"PopupToolboxUploader",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const o=Kt,s=X(()=>[1,2,6].includes(b.value)),r=X(()=>Sv()),i=X(()=>({1:{title:`Create ${r.value} in bulk`,description:""},2:{title:"Select status",description:"Choose the starting status for the new work."},3:{title:"Import successful",description:"Work will be created in background. Refresh to see updates."},4:{title:"Import failed",description:"Some data doesn't meet the requirements. Review it and try again."},6:{title:`Create ${r.value} by count`,description:""},7:{title:"Creation in progress",description:"Work will be created in the background. Refresh to see updates."},8:{title:"Creation failed",description:""}})),a=["csv","xlsx","xls"],l=$({segments:[],count:0}),u=({data:R,count:G,template_flow_status_id:J})=>{console.log("handleChangeCreateWithCount called with data:",R,"count:",G,"template_flow_status_id:",J),l.value={segments:R,count:G,template_flow_status_id:J}},c=$(!1),d=async()=>{var R;if(!((R=v.value)!=null&&R.bulkCreate)){console.error("API services not available");return}c.value=!0;try{(await v.value.bulkCreate({workspaceId:f.workspaceId,entityId:f.entityId,payload:{...l.value,entity_id:f.entityId},filter:{}})).status===fs.ACCEPTED&&(b.value=7,g("import-success"))}catch(G){B(G),b.value=8}finally{c.value=!1}},h={"--popup-pt":"20px","--popup-pb":"20px","--popup-pl":"24px","--popup-pr":"24px"},f=e,p=X(()=>Sv()),g=n,{apiServices:v}=so(!1,f),w=1,S=$(),b=$(w),y=$(null),E=$(null),_=$(null),I=$(void 0),T=$(null),F=X(()=>i.value[b.value]),L=$(),x=()=>{var R;y.value=null,b.value=w,E.value=null,_.value=null,M.value=null,T.value=null,(R=L.value)==null||R.clear(),I.value=void 0,l.value={segments:[],count:0}},P=()=>{b.value=6},k=()=>{var R;x(),(R=S.value)==null||R.hide()};Qe([E,_],([R,G])=>{b.value===1&&R&&G&&(b.value=2)});const M=$(null),N=R=>Rs().getErrorMessageFromResponse(R),B=R=>{if(console.error(R),typeof R=="string"){M.value=R;return}const G=R.response,J=G==null?void 0:G.data,ce=N(J);M.value=ce??R.message},z=async(R,G)=>{var ce;if(!v.value||!f.workspaceId||!f.entityId){console.error("API services not available");return}K.value=!0;const J=new FormData;J.append("file",R),J.append("format",((ce=G??R.name)==null?void 0:ce.split(".").pop())??R.name.split(".").pop()??""),J.append("entity_id",f.entityId),J.append("template_flow_status_id",y.value??"");try{await v.value.addNewSceneViaImportFile(f.workspaceId,f.entityId,J),b.value=3,g("import-success")}catch(Ee){console.error("Error uploading file:",Ee),B(Ee||"An unknown error occurred during file upload."),b.value=4}finally{K.value=!1}},{openToolbox:oe,sendBackErrorFile:ie}=LG(({file:R,fileName:G,channel:J})=>{J==="xlsx-mapping"&&(_.value=R,I.value=G??R.name,b.value=2)}),te=$(null),se=async()=>{var R,G;b.value=6,await ht(),(G=(R=te.value)==null?void 0:R.focus)==null||G.call(R)},Z=async()=>{try{const R=await j();oe({template:R})}catch(R){console.error("Error opening toolbox:",R),Rs().showErrorNetMessage("Failed to open toolbox.")}},A=$(!1),j=async()=>{A.value=!0;const R=f.workspaceId,G=f.entityId;if(!R||!G||!v.value)return A.value=!1,Promise.reject(new Error("Workspace ID or Entity ID is missing"));try{const J=await v.value.downloadTemplate(R,G,!1);if(!J)throw new Error("No response from downloadTemplate API");return J}catch(J){return console.error("Error downloading template:",J),Promise.reject(J)}finally{A.value=!1}},ne=R=>{var ce;const G=((ce=R.name.split(".").pop())==null?void 0:ce.toLowerCase())??"",J=VG.split(",").map(Ee=>Ee.trim()).includes(R.type)||a.includes(G);return J||(console.error("Invalid file type:",R.type),Rs().addNotification({id:"invalid-file-type",message:"Invalid file type. Please upload a xlsx, xls, csv file.",type:"error"})),J},ge=async()=>{const R=document.createElement("input");R.type="file",R.accept=`${VG}, ${a.map(G=>`.${G}`).join(", ")}`,R.onchange=async()=>{var J;const G=(J=R.files)==null?void 0:J[0];if(G){if(!ne(G)){x();return}E.value=nv(G);try{const ce=await j();if(!ce){Rs().addNotification({id:"failed-download-template",message:"Failed to download template file.",type:"error"});return}oe({source:G,template:ce})}catch(ce){console.error("Error opening toolbox:",ce),Rs().addNotification({id:"failed-open-toolbox",message:"Failed to open toolbox.",type:"error"})}}},R.click()},xe=async R=>{var G;if(!((G=v.value)!=null&&G.getAssignableStatuses)){console.error("API services not available");return}return v.value.getAssignableStatuses(f.workspaceId,{entity_id:f.entityId,name_like:R.name_like,page:R.page,per_page:UTe})},ue=X(()=>{var R;return l.value.count==0||!((R=l.value.segments)!=null&&R.length)}),K=$(!1),Y=()=>{y.value=null,_.value&&I.value&&ie(_.value,I.value)},re=()=>{y.value&&_.value&&z(_.value,I.value)};return t({open:()=>{var R;return(R=S.value)==null?void 0:R.show()},close:()=>{var R;return(R=S.value)==null?void 0:R.hide()}}),(R,G)=>(q(),je(V(qN),jt({ref_key:"popupRef",ref:S,style:h,onHidden:x},{popupIndex:10,popupName:F.value.title,minWidth:"420px",showOverlay:!0,overlayOpacity:.5,closeOnOverlayClick:!1,closeOnEscape:!0,showCloseBtn:s.value}),Hh({header:we(()=>[Se("span",FTe,at(F.value.title),1)]),default:we(()=>[Se("div",{class:le(["modal-body",{"bulk-count":b.value===6,"choose-method":b.value===1}])},[Se("div",OTe,at(F.value.description),1),M.value&&b.value===4?(q(),de("div",MTe,[G[1]||(G[1]=tt(" Error code ",-1)),Se("span",NTe,at(M.value),1)])):Ye("",!0),b.value===1?(q(),de("div",LTe,[ye(Hw,{disabled:!1,label:"Create by count",description:"Enter how many to create.",onOnClick:se},{visual:we(()=>[ye(V(va),{src:"CreateByCount",size:65})]),_:1}),ye(Hw,{disabled:!1,label:"Start with a blank sheet",description:`Type or paste ${r.value} details
|
|
254
254
|
into a table.`,onOnClick:Z},{visual:we(()=>[ye(V(va),{src:"BlankSheet",size:65})]),_:1},8,["description"]),ye(Hw,{label:"Import from file",description:`Create ${r.value} from a CSV or
|
|
255
|
-
Excel file.`,onOnClick:ge},{visual:we(()=>[ye(V(va),{src:"UploadFile",size:65,"max-width":"65"})]),_:1},8,["description"])])):Ye("",!0),b.value===6?(q(),je(V(jue),{key:2,ref_key:"bulkCreateCountRef",ref:te,"get-status-func":xe,"workspace-id":f.workspaceId,"take-name":p.value,onChanged:u,"entity-id":f.entityId},null,8,["workspace-id","take-name","entity-id"])):b.value===2?(q(),de("div",VTe,[ye(V(wL),{modelValue:y.value,"onUpdate:modelValue":G[0]||(G[0]=J=>y.value=J),"get-status-func":xe,"workspace-id":f.workspaceId,id:f.entityId,style:{width:"100%"},"max-width":"372px",ref_key:"selectStatusRef",ref:L},null,8,["modelValue","workspace-id","id"])])):b.value===3||b.value===7?(q(),de("div",BTe,[ye(V(va),{src:"Success",width:240,height:180,ratio:"unset"})])):b.value===4||b.value===8?(q(),de("div",$Te,[ye(V(va),{src:"Failed",width:240,height:180,ratio:"unset"})])):Ye("",!0)],2)]),_:2},[b.value===2||b.value===4||b.value===3||b.value===6||b.value===7||b.value===8?{name:"footer",fn:we(()=>[b.value==6?ze((q(),de("div",HTe,[ye(V(St),{variant:"primary",loading:c.value,disabled:ue.value||c.value,onClick:d},{default:we(()=>[...G[2]||(G[2]=[tt(" Create ",-1)])]),_:1},8,["loading","disabled"])])),[[V(o),{content:ue.value?"Add a name or a counter first.":void 0,bypassOverflowCheck:!0}]]):Ye("",!0),b.value===4||b.value===8?(q(),je(V(St),{key:1,variant:"secondary",onClick:k},{default:we(()=>[...G[3]||(G[3]=[tt(" Close ",-1)])]),_:1})):b.value===3?(q(),je(V(St),{key:2,variant:"secondary",onClick:k},{default:we(()=>[...G[4]||(G[4]=[tt(" Got it ",-1)])]),_:1})):Ye("",!0),b.value===2?ze((q(),de("div",GTe,[ye(V(St),{loading:K.value,disabled:K.value||!y.value,onClick:re},{default:we(()=>[...G[5]||(G[5]=[tt(" Import ",-1)])]),_:1},8,["loading","disabled"])])),[[V(o),{content:K.value||!y.value?"Select a status first":void 0,bypassOverflowCheck:!0}]]):Ye("",!0),b.value===4?(q(),je(V(St),{key:4,onClick:Y},{default:we(()=>[...G[6]||(G[6]=[tt(" Try Again ",-1)])]),_:1})):Ye("",!0),b.value===8?(q(),je(V(St),{key:5,onClick:P},{default:we(()=>[...G[7]||(G[7]=[tt("Try Again",-1)])]),_:1})):Ye("",!0),b.value===7?(q(),je(V(St),{key:6,onClick:k,variant:"secondary"},{default:we(()=>[...G[8]||(G[8]=[tt(" Got it ",-1)])]),_:1})):Ye("",!0)]),key:"0"}:void 0]),1040))}}),[["__scopeId","data-v-81f75cd1"]]),zTe={class:"header-name"},jTe={class:"modal-body"},KTe={class:"description"},qTe={key:0,class:"error-message"},YTe={class:"dynamic"},XTe={key:1,class:"choose-method-container"},ZTe={key:2,class:"result-container"},JTe={key:3,class:"result-container"},QTe={key:2},BG="text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel",eDe=_t(ot({__name:"PopupBulkUpdate",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const o=Kt,s=X(()=>[1,2].includes(f.value)),r=X(()=>Sv()),i=X(()=>({1:{title:`Update ${r.value} in bulk`,description:""},2:{title:`Update ${r.value} in bulk`,description:""},3:{title:"Import successful",description:"Work will be created in background. Refresh to see updates."},4:{title:"Import failed",description:"Some data doesn't meet the requirements. Review it and try again."},5:{title:"Waiting for Toolbox",description:"Waiting for Toolbox"}})),a={"--popup-pt":"20px","--popup-pb":"20px","--popup-pl":"24px","--popup-pr":"24px"},l=e,u=n,{apiServices:c}=so(!1,l),d=1,h=$(),f=$(d),p=$(null),g=$(null),v=$(null),w=$(void 0),S=$(null),b=X(()=>i.value[f.value]),y=$(),E=()=>{var ie;p.value=null,f.value=d,g.value=null,v.value=null,_.value=null,S.value=null,(ie=y.value)==null||ie.clear(),w.value=void 0};Qe([g,v],([ie,te])=>{f.value===1&&ie&&te&&(f.value=2)});const _=$(null),I=ie=>Rs().getErrorMessageFromResponse(ie),T=ie=>{if(typeof ie=="string"){_.value=ie;return}const te=ie.response,se=te==null?void 0:te.data,Z=I(se);_.value=Z??ie.message,console.log("Error message set to:",{errorMsg:Z,message:ie})},F=async(ie,te)=>{var A;B.value=!0;const se=new FormData,Z=((A=ie.name.split(".").pop())==null?void 0:A.toString())||"";if(se.append("file",ie),se.append("format",Z),se.append("entity_id",l.entityId||""),!c.value){console.error("API services not available");return}try{await c.value.overwriteScenesViaImportFile(l.workspaceId,l.entityId,se),f.value=3,u("import-success")}catch(j){console.error("Error uploading file:",j),T(j),f.value=4}finally{B.value=!1,window.appManager.hide("feedback_lockup_toolbox")}},{openToolbox:L,sendBackErrorFile:x}=LG(({file:ie,fileName:te,channel:se})=>{se==="feedback-merge"&&(v.value=ie,w.value=te??ie.name,F(ie))},"feedback-merge"),P=$(!1),k=async()=>{P.value=!0;const ie=l.workspaceId,te=l.entityId;if(!ie||!te||!c.value)return console.error("Workspace ID or Entity ID is missing"),Promise.reject(new Error("Workspace ID or Entity ID is missing"));try{const se=await c.value.downloadExportedItemsFile(ie,te,!1);if(!se)throw new Error("No response from downloadTemplate API");return se}catch(se){return console.error("Error downloading template:",se),Promise.reject(se)}finally{P.value=!1}},M=ie=>{const te=BG.includes(ie.type);return te||(console.error("Invalid file type:",ie.type),Rs().addNotification({id:"invalid-file-type",message:"Invalid file type. Please upload a xlsx, xls, csv file.",type:"error"})),te},N=async()=>{const ie=document.createElement("input");ie.type="file",ie.accept=BG,ie.onchange=async()=>{var se;const te=(se=ie.files)==null?void 0:se[0];if(te){if(!M(te)){E();return}g.value=nv(te);try{const Z=await k();if(!Z){Rs().addNotification({id:"failed-download-template",message:"Failed to download file.",type:"error"});return}L({exportFile:Z,feedbackFile:te})}catch(Z){console.error("Error opening toolbox:",Z),Rs().addNotification({id:"failed-open-toolbox",message:"Failed to open toolbox.",type:"error"})}}},ie.click()},B=$(!1),z=()=>{p.value=null,v.value&&w.value&&x(v.value,w.value)},oe=()=>{p.value&&v.value&&(B.value=!0,F(v.value,w.value).finally(()=>{B.value=!1}))};return t({open:()=>{var ie;return(ie=h.value)==null?void 0:ie.show()},close:()=>{var ie;return(ie=h.value)==null?void 0:ie.hide()}}),(ie,te)=>(q(),je(V(qN),jt({ref_key:"popupRef",ref:h,style:a,onHidden:E},{popupIndex:10,popupName:b.value.title,minWidth:"420px",showOverlay:!0,overlayOpacity:.5,closeOnOverlayClick:!1,closeOnEscape:!0,showCloseBtn:s.value}),Hh({header:we(()=>[Se("span",zTe,at(b.value.title),1)]),default:we(()=>[Se("div",jTe,[Se("div",KTe,at(b.value.description),1),_.value&&f.value===4?(q(),de("div",qTe,[te[2]||(te[2]=tt(" Error code ",-1)),Se("span",YTe,at(_.value),1)])):Ye("",!0),f.value===1?(q(),de("div",XTe,[ye(Hw,{disabled:!1,label:"Import from file",description:`Update ${r.value} from a CSV or Excel file.`,onOnClick:N,style:{width:"100%"}},{visual:we(()=>[ye(V(va),{src:"UploadFile",size:65})]),_:1},8,["description"])])):f.value===3?(q(),de("div",ZTe,[ye(V(va),{src:"Success",width:240,height:180,ratio:"unset"})])):f.value===4?(q(),de("div",JTe,[ye(V(va),{src:"Failed",width:240,height:180,ratio:"unset"})])):Ye("",!0)])]),_:2},[f.value===4||f.value===3?{name:"footer",fn:we(()=>[f.value===4?(q(),je(V(St),{key:0,variant:"secondary",onClick:te[0]||(te[0]=()=>{var se;E(),(se=h.value)==null||se.hide()})},{default:we(()=>[...te[3]||(te[3]=[tt(" Close ",-1)])]),_:1})):f.value===3?(q(),je(V(St),{key:1,variant:"secondary",onClick:te[1]||(te[1]=()=>{var se;E(),(se=h.value)==null||se.hide()})},{default:we(()=>[...te[4]||(te[4]=[tt(" Got it ",-1)])]),_:1})):Ye("",!0),f.value===2?ze((q(),de("div",QTe,[ye(V(St),{loading:B.value,disabled:B.value||!p.value,onClick:oe},{default:we(()=>[...te[5]||(te[5]=[tt(" Import ",-1)])]),_:1},8,["loading","disabled"])])),[[V(o),{content:B.value||!p.value?"Select a status first":void 0,bypassOverflowCheck:!0}]]):Ye("",!0),f.value===4?(q(),je(V(St),{key:3,onClick:z},{default:we(()=>[...te[6]||(te[6]=[tt(" Try Again ",-1)])]),_:1})):Ye("",!0)]),key:"0"}:void 0]),1040))}}),[["__scopeId","data-v-9a73e40c"]]),tDe=_t(ot({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const n=$s,o=cE(),{setUserPermissions:s,setEntityPermissions:r}=o,{entityPermissions:i}=go(o),a=Kt,l=Io,u=Lv(),{entityData:c}=go(u),d={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},h=$(""),f=X(()=>{var Ke;const Pe=((Ke=i.value)==null?void 0:Ke.has_create_item_permission)==1||!1;return[{label:"Create in bulk",value:"import_scenes",type:"text",id:"import_scenes_option",hide:!Pe},{label:"Update in bulk",value:"bulk_update",type:"text",hide:!Pe,id:"bulk_update_option"}]}),p=e;Tp.initialize({wrapVueCellRenderer:My,wrapVueCellEditor:uB});const g=fd(),{switchInstanceFunc:v}=go(g);Xt(()=>{const Pe=oo();v.value=Pe==null?void 0:Pe.appContext.config.globalProperties.switchInstance;const Ke=new BroadcastChannel("focusable_channel");ht(()=>{setTimeout(()=>{Ke.postMessage("Focusable elements updated")},7e3)})});const w=$(null),S=$([]),b=Gf(),{rowCount:y}=go(b),E=$(!1),_=$(""),I=$(),T=iM(),{metricList:F}=go(T),L=$(""),x=$(!1),P=$(new Set),k=$(new Map),{apiServices:M}=so(!1,p),{columnDefs:N,checkboxColumn:B,saveColumnConfig:z}=yTe(F,p.entityId,w),oe=$();Qe(()=>N,()=>{var Pe;(Pe=oe.value)==null||Pe.updateColumnDefs(N.value)},{deep:!0});const ie=(Pe,Ke)=>{z(Pe,Ke)},{updateRowData:te,setMetricValues:se}=bTe(w),Z=X(()=>({isSearching:_.value.length>0,isFiltering:!(Object.keys(pe.value||{}).length==1&&Object.keys(pe.value)[0]=="preflight_status")&&Object.keys(pe.value||{}).length>0})),A=X(Cv),j=X(()=>N.value.filter(Pe=>{var Ke;return((Ke=Pe.field)==null?void 0:Ke.startsWith("metric_"))&&!Pe.hide}).map(Pe=>{var Ke;return((Ke=Pe.field)==null?void 0:Ke.replace("metric_",""))||""}));ci("timezone",A);const ne=X(()=>({autoFetch:!1,workspaceId:p.workspaceId,entityId:p.entityId,metricIds:j.value,updateItemData:te,setMetricValues:se})),{fetchItems:ge,getMetricList:xe,cusorMap:ue,getMetricValues:K}=CTe(ne),Y=X(()=>{if(!w.value)return!1;const Pe=w.value.getSelectedRows().length;return Pe>0&&Pe>=y.value.total}),re=X(()=>{var Pe;return((Pe=c.value)==null?void 0:Pe.name)||"Items"}),R=Pe=>{setTimeout(()=>{ht(()=>{var Ke,Mt;w.value&&(Pe?(Ke=w.value)==null||Ke.showNoRowsOverlay():(Mt=w.value)==null||Mt.hideOverlay())})},500)},G=(Pe,Ke)=>{var Mt;y.value.total=Pe.meta.total??0,(Mt=Pe.meta.next)!=null&&Mt.cursor&&(ue[Ke+1]=Pe.meta.next.cursor),L.value=Pe.meta["X-Tsr-signature"]||"",Pe.meta.total===0?R(!0):R(!1)},J=vE(),{setDefaultSort:ce}=J,Ee=$(null),{sortingAPIConfiguration:Ce,isSortingRunning:Ne}=go(J),pe=$({preflight_status:"1"}),H=X(()=>({...pe.value,search:_.value}));ci("filterParams",H);const W=$([]),be=X(()=>{var Pe;return((Pe=c.value)==null?void 0:Pe.name)||"Items"}),Ae=async({page:Pe,pageSize:Ke,filterText:Mt})=>{var uo,Zo,Os;(uo=w.value)==null||uo.hideOverlay();const Lt=ue[Pe],So=!Lt&&Pe>1?(Pe-1)*Ke:void 0,Xn=Ce.value;Xn.length>0&&(Ne.value=!0);try{const dc={cursor:Lt,size:Ke,searchQuery:Mt,offset:So,sort_by:Xn,...pe.value},Wl=await ge(dc);if(!Wl)return{rows:[],total:0};const Xi=(Os=(Zo=Wl.meta)==null?void 0:Zo.extra)==null?void 0:Os.default_sort;Xi&&ce(Xi);const gh=(Gw=>{const sn=Gw.data.map(hc=>EO(hc,A.value,be.value));return sn.forEach(hc=>{P.value.add(String(hc.id)),k.value.set(String(hc.id),{})}),sn})(Wl);return G(Wl,Pe),{rows:gh,total:y.value.total}}catch(dc){return console.error("Failed to fetch items:",dc),{rows:[],total:0}}finally{Ne.value=!1}},{isLoading:He,toggleSidebar:Te,onGridReady:Xe,handleUnSelect:ve,handleSelectAll:Be,onSearch:wt,firstLoad:Dt}=ETe({selectRowData:$([]),isSidebarOpen:E,quickFilterText:_,gridApi:w,perPage:d.ROWS_PER_PAGE,fetcher:Ae}),tn=$([]),en=Cr(()=>{var Xn;const Pe=((Xn=w.value)==null?void 0:Xn.getSelectedRows())||[],Ke=new Map(Pe.map(uo=>[uo.id,uo])),So=Pe.map(uo=>uo.id).map(uo=>{var Zo,Os;return[uo,(Os=(Zo=w.value)==null?void 0:Zo.getRowNode(uo))==null?void 0:Os.rowIndex]}).sort((uo,Zo)=>(uo[1]??0)-(Zo[1]??0)).map(([uo])=>Ke.get(uo));tn.value=So.filter(uo=>uo!==void 0)}),bn=Fo({columnsDisplay:[],rowsDisplay:{fromIndex:0,toIndex:0}}),Le=X(()=>({blockLoadDebounceMillis:1e3,columnDefs:N.value,rowModelType:"infinite",cacheBlockSize:d.ROWS_PER_PAGE,infiniteInitialRowCount:20,popupParent:document.getElementById("item-table-layout-id")||void 0,rowSelection:{mode:"multiRow",checkboxes:!1,enableClickSelection:!1,enableSelectionWithoutKeys:!1},pagination:!1,rowHeight:d.ROW_HEIGHT,suppressHorizontalScroll:!1,suppressColumnVirtualisation:!1,debounceVerticalScrollbar:!1,animateRows:!1,suppressAnimationFrame:!1,suppressScrollOnNewData:!0,suppressScrollWhenPopupsAreOpen:!1,rowBuffer:20,enableCellTextSelection:!1,suppressDragLeaveHidesColumns:!0,suppressMaxRenderedRowRestriction:!1,height:d.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:Ge,noRowsOverlayComponent:My(zre),noRowsOverlayComponentParams:()=>Z.value,defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:Pe=>Pe.data.id,rowClassRules:{"row-deleted":Pe=>{var Ke;return(Ke=Pe.data)==null?void 0:Ke.isDeleted},"row-locked":Pe=>{var Ke;return(Ke=Pe.data)==null?void 0:Ke.isLocked},"row-archived":Pe=>{var Ke;return(Ke=Pe.data)==null?void 0:Ke.isArchived},"row-process-locked":Pe=>{var Ke,Mt;return((Mt=(Ke=Pe.data)==null?void 0:Ke.isProcessing)==null?void 0:Mt.state)==0},"row-inactive":Pe=>{var Ke;return!((Ke=Pe.data)!=null&&Ke.id)},"row-empty":Pe=>!Pe.data},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:p.workspaceId,entityId:p.entityId,apiServices:M.value,sorting:Ne.value},onCellKeyDown:Pe=>{var Ke,Mt,Lt;if(Pe.data.isDeleted)return!1;if(((Ke=Pe==null?void 0:Pe.event)==null?void 0:Ke.key)==="Enter"){const{api:So,node:Xn,column:uo}=Pe,Zo=So.getCellRendererInstances({rowNodes:[Xn],columns:[uo]});if(Zo.length>0){const Os=Zo[0];Os&&typeof((Mt=Os.componsenExposed)==null?void 0:Mt.focus)=="function"&&((Lt=Os.componsenExposed)==null||Lt.focus())}}},isRowSelectable:Pe=>{var Ke,Mt;return!Pe.group&&((Mt=(Ke=Pe.data)==null?void 0:Ke.isProcessing)==null?void 0:Mt.state)!=0},suppressKeyboardEvent:Pe=>{var Lt;if((Lt=Pe.data)!=null&&Lt.isDeleted)return!0;const Ke=Pe.event.key,Mt=Pe.editing;return Mt&&Ke==="Tab"?!0:Mt&&Ke==="Enter"?!1:Ke==="Enter"?(Pe.event.preventDefault(),Pe.event.stopPropagation(),!0):Ke==="ArrowUp"||Ke==="ArrowDown"||Ke==="ArrowLeft"||Ke==="ArrowRight"||Ke==="Tab"||Ke==="Enter"},navigateToNextCell:()=>null,onBodyScroll:Pe=>{const Ke=Pe.api.getFirstDisplayedRowIndex(),Mt=Pe.api.getLastDisplayedRowIndex();bn.rowsDisplay.fromIndex=Ke,bn.rowsDisplay.toIndex=Mt,bn.columnsDisplay=Pe.api.getAllDisplayedVirtualColumns().map(Lt=>Lt.getColId())},onViewportChanged:Pe=>{bn.columnsDisplay=Pe.api.getAllDisplayedVirtualColumns().map(Ke=>Ke.getColId())},suppressHeaderFocus:!0,onCellEditingStarted(Pe){if(Pe.data.isDeleted&&Pe.api.stopEditing(),Pe.colDef.field=="options"){const Ke=Pe.api.getCellRendererInstances({rowNodes:[Pe.node],columns:[Pe.column]});Ke.length>0&&Ke[0].focusUi()}},tabToNextCell:Pe=>{let Ke=Pe.nextCellPosition;if(Ke&&Ke.column.getColId()==="ag-Grid-SelectionColumn"){const Mt=Pe.api.getAllDisplayedColumns(),Lt=Mt.indexOf(Ke.column),So=Pe.backwards?-1:1,Xn=Mt[Lt+So];if(Xn)return{rowIndex:Ke.rowIndex,column:Xn,rowPinned:Ke.rowPinned}}return Ke}}));function Ge(){if(!w.value)return;let Pe=0;w.value.forEachNode(Ke=>{Ke.data&&Pe++}),y.value.loaded=Math.min(Pe,y.value.total)}Qe(()=>Ce,()=>{w.value&&(L.value="",P.value.clear(),w.value.deselectAll(),Object.keys(ue).forEach(Pe=>delete ue[Number(Pe)]),w.value.purgeInfiniteCache(),w.value.ensureIndexVisible(0))},{deep:!0});const Rt=$(),Jt=$(),qt=()=>{is.showPopupOverwriteScenes=!0,ht(()=>{var Pe;(Pe=Jt.value)==null||Pe.open()})},nt=$(),Go=()=>{is.showPopupBulkUpdate=!0,ht(()=>{var Pe;(Pe=nt.value)==null||Pe.open()})},si=()=>{is.showPopupToolboxUploader=!0,ht(()=>{var Pe;(Pe=Rt.value)==null||Pe.open()})},tr=async()=>{Dt.value=!0,w.value&&(L.value="",P.value.clear(),Object.keys(ue).forEach(Pe=>delete ue[Number(Pe)]),await w.value.deselectAll(),await w.value.ensureIndexVisible(0,"top"),await w.value.purgeInfiniteCache(),await w.value.refreshInfiniteCache())},Mr=X(()=>un.getInstance().getItem("ITEM_TABLE_APP_VERSION")||""),Ui=$();X(()=>{var Pe;return(Pe=RTe(Mr.value))==null?void 0:Pe.map(Ke=>`<div>⢠${Ke}</div>`).join(`
|
|
256
|
-
`)});function Wi(Pe){var Ke;Pe==="new_scene"?(Ke=Ui.value)==null||Ke.show():Pe==="import_scenes"?si():Pe==="overwrite_scenes"?qt():Pe==="bulk_update"&&Go()}const zi=Pe=>{S.value=Pe.api.getSelectedRows().map(Ke=>Ke.id)},ji=Pe=>{const Ke=Xe(Pe);return Ke&&(Ke.addEventListener("modelUpdated",Ge),Ke.addEventListener("bodyScroll",()=>Ke.stopEditing()),Ke.addEventListener("selectionChanged",en),Ke.addEventListener("columnMoved",Lt=>ie(Lt,!0)),Ke.addEventListener("columnResized",Lt=>ie(Lt,!0)),Ke.addEventListener("firstDataRendered",()=>{Dt.value=!1}),!document.querySelector(".ag-body-viewport"))||Pe==null||Pe.setColumnsVisible(["ag-Grid-SelectionColumn"],!1),Ke},Fs=()=>{var Pe;h.value=(((Pe=document.getElementById("item-table-layout-id"))==null?void 0:Pe.clientHeight)??0)-78+"px"};Xt(()=>{ht(()=>{Fs()}),window.addEventListener("resize",Fs);function Pe(){requestAnimationFrame(Pe)}Pe()}),Vn(()=>{window.removeEventListener("resize",Fs)});const Ki=async({code:Pe,name:Ke})=>{await wt(Pe),setTimeout(()=>{var Mt;(Mt=I.value)==null||Mt.setValue(Ke)},300)},dh=Pe=>{if(!w.value)return;const Ke=w.value.getRowNode(Pe);Ke?(w.value.ensureIndexVisible(Number(Ke.rowIndex),"middle"),w.value.flashCells({rowNodes:[Ke],flashDuration:3e3,fadeDuration:1e3})):w.value.ensureIndexVisible(y.value.total-1,"bottom")},Nn=Pe=>Pe.metric_type.code==="number"?"number":"default",bo=async()=>{if(p.entityId)try{const Pe=await xe(p.entityId);F.value=Pe.data.map(Ke=>({...Ke,sortType:Nn(Ke)}))}catch(Pe){console.error("Failed to initialize metric list:",Pe),F.value=[]}},fT=async()=>{if(M.value)try{const Pe=await M.value.getUserPermission(p.workspaceId);s(Pe)}catch(Pe){console.error("Failed to fetch user permissions:",Pe)}},hh=async()=>{if(M.value)try{const Pe=await M.value.getEntityDetail(p.workspaceId,p.entityId);r(Pe.permission),c.value=Pe}catch(Pe){console.error("Failed to fetch entity details:",Pe)}},cc=Ey(),{setUser:fh}=cc,pT=async()=>{if(M.value)try{const Pe=await M.value.getMe();return fh(Pe),Pe}catch(Pe){console.error("Failed to fetch user details:",Pe)}},qi=async()=>{var Pe;if(M.value)try{const Ke=await M.value.getWorkspaces(p.workspaceId),Mt=(Pe=Ke.data[0])==null?void 0:Pe.ws_user_role_id;return Mt&&cc.setUserRoleId(Mt),Ke}catch(Ke){console.error("Failed to fetch workspace details:",Ke)}};Qe(()=>[p.entityId,p.workspaceId],async([Pe,Ke])=>{!Pe||!Ke||(pT(),qi(),bo(),fT(),hh())},{immediate:!0,deep:!0}),Qe(j,(Pe,Ke)=>{const Mt=Pe.filter(Lt=>!(Ke!=null&&Ke.includes(Lt)));Mt.length>0&&K(Array.from(P.value),Mt).then(Lt=>{se(Lt,P.value,Mt)})},{immediate:!0,deep:!0}),Qe(L,(Pe,Ke)=>{x.value=!!(Ke&&Pe&&Ke!==Pe)}),t({refreshTable:tr});const Ul=Pe=>{pe.value=Pe,tr()},Yi=Pe=>{W.value=Pe,tr()},ph=Pe=>{N.value=Pe||[],ie({},!0)},gT=X(()=>{var Lt;const Pe=un.getInstance().getItem("ws.terminology"),Ke=Pe?JSON.parse(Pe):null;return`New ${((Lt=Ke==null?void 0:Ke.find(So=>So.code==="scene"))==null?void 0:Lt.name)||"Scene"}`}),is=Fo({showPopupBulkUpdate:!1,showPopupToolboxUploader:!1,showPopupSceneCreator:!1,showPopupItemDetails:!1,showPopupOverwriteScenes:!1}),cg=Pe=>{var So,Xn;const Ke=Pe.data,{action:Mt,type:Lt}=Ke;console.log("App loader close event received:",Ke),Mt=="APP_LOADER:HIDE"&&(Lt==="xlsx_toolbox"||Lt==="feedback_lockup_toolbox")&&((So=Rt.value)==null||So.close(),(Xn=nt.value)==null||Xn.close())};return Xt(()=>{window.addEventListener("message",cg)}),Vn(()=>{window.removeEventListener("message",cg)}),(Pe,Ke)=>(q(),je(V(Vse),{"is-sidebar-open":E.value,onCloseSidebar:V(Te),onSidebarClear:V(Te),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:V(Te)},{"header-left":we(()=>{var Mt;return[((Mt=V(i))==null?void 0:Mt.has_create_item_permission)==1?(q(),je(V(u0),{key:0,variant:["primary"],options:f.value,onSelect:Wi,onHandleClick:Ke[1]||(Ke[1]=Lt=>Wi("new_scene")),id:"create_scene_dropdown",tabIndex:2},{prefix:we(()=>[ze(ye(V(St),{"data-focus-index":"1",id:"create_new_scene",variant:["primary"],onClick:Ke[0]||(Ke[0]=Lt=>Wi("new_scene")),label:gT.value},null,8,["label"]),[[V(l),1]])]),_:1},8,["options"])):Ye("",!0)]}),"header-actions":we(()=>[ye(V(Pie),{"onUpdate:assignees":Yi,onApplyFilter:Ul,loading:V(Dt),entityId:p.entityId},null,8,["loading","entityId"]),ze(ye(V(RE),{focusIndex:"4",modelValue:_.value,"onUpdate:modelValue":Ke[2]||(Ke[2]=Mt=>_.value=Mt),onSearch:V(wt),class:le(Pe.$style.itemSearchBox),onClear:Ke[3]||(Ke[3]=Mt=>V(wt)("")),id:"item_search_box",ref_key:"searchBoxRef",ref:I},null,8,["modelValue","onSearch","class"]),[[V(n),{isLoading:V(Dt),fullwidth:!0}]]),ze((q(),je(V(eM),{status:V(He)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":x.value},{default:we(()=>[ze((q(),je(V(St),{variant:["secondary","icon"],disabled:V(He),onClick:tr},{default:we(()=>[ye(V(gt),{src:"ArrowsRotate"})]),_:1},8,["disabled"])),[[V(l),5],[V(a),"Refresh"]])]),_:1},8,["status","show-badge"])),[[V(n),{isLoading:V(Dt),fullwidth:!0}]]),ze(ye(V(Gre),{"model-value":V(N),onChange:Ke[4]||(Ke[4]=Mt=>ph(Mt)),id:"table_customization",gridApi:w.value,ref_key:"tableCustomizationRef",ref:oe,"checkbox-column":V(B),tableHeight:h.value},null,8,["model-value","gridApi","checkbox-column","tableHeight"]),[[V(n),{isLoading:V(Dt),fullwidth:!0}]])]),grid:we(({availableHeight:Mt})=>[ye(V(hTe),jt({id:"item_table_main",ref_key:"agGrid",ref:Ee},Le.value,{height:Mt+"px",isSorting:V(Ne),onOnGridReady:ji,onSelectionChanged:zi}),null,16,["height","isSorting"])]),footer:we(()=>[Se("div",{class:le(Pe.$style.tableFooter),id:"table_footer"},[Se("span",null,[Ke[7]||(Ke[7]=tt(" Showing ",-1)),Se("b",null,at(V(y).loaded)+" of "+at(V(y).total),1)])],2)]),"new-row":we(()=>[ye(V(uie),{ref_key:"createNewSceneRef",ref:Ui,onSearchForCode:Ki,onFocusOnId:dh},null,512)]),"bulk-update-actions":we(()=>[!E.value&&S.value.length>0?ze((q(),je(V(Ase),{key:0,selectRowData:tn.value,"workspace-id":p.workspaceId,"entity-id":p.entityId,"grid-api":w.value,onUnselect:V(ve),onSelectAll:V(Be),"take-name":re.value,"selected-all":Y.value,"total-rows":V(y).total,"visible-rows":V(y).loaded,onUpdated:V(en),loading:V(He),onRefreshSelectedRow:V(en)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","onSelectAll","take-name","selected-all","total-rows","visible-rows","onUpdated","loading","onRefreshSelectedRow"])),[[dr,!E.value&&S.value.length>0]]):Ye("",!0)]),snackbar:we(()=>[ye(V(Zse))]),popup:we(()=>[is.showPopupToolboxUploader?(q(),je(WTe,{key:0,ref_key:"popupToolboxUploaderRef",ref:Rt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:tr,onHide:Ke[5]||(Ke[5]=Mt=>is.showPopupToolboxUploader=!1)},null,8,["workspace-id","entity-id"])):Ye("",!0),is.showPopupBulkUpdate?(q(),je(eDe,{key:1,ref_key:"popupBulkUpdateRef",ref:nt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:tr,onHide:Ke[6]||(Ke[6]=Mt=>is.showPopupBulkUpdate=!1)},null,8,["workspace-id","entity-id"])):Ye("",!0)]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1sow5_1",tableFooter:"_tableFooter_1sow5_7",footerStart:"_footerStart_1sow5_17",newRow:"_newRow_1sow5_25","warning-text":"_warning-text_1sow5_43","has-error":"_has-error_1sow5_48",itemSearchBox:"_itemSearchBox_1sow5_52","beta-tag":"_beta-tag_1sow5_56"}}]]),$G="0.1.242",nDe={key:0},oDe=_t(ot({__name:"app",setup(e){const t=X(()=>n.id.length===0||n.workspaceId.length===0),n=Fo({id:"",workspaceId:"",apiConfig:{}}),o=Rs(),{showMessage:s,showErrorNetMessage:r}=o,i=["basicInfor","importItems"],a=h=>{h.success?s(h.apiCode,"success"):i.includes(h.apiCode)||r(h)},l=$(null),u=()=>{const h=un.getInstance().getItem("API_BASE_URL");return h!=null&&h.includes("v1")?h.slice(0,h.lastIndexOf("/v1")):String(h)};Bh(()=>{var h,f,p;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",$G);try{if(l.value=oo(),!l.value)throw new Error("Current instance is null");n.id=((h=l.value)==null?void 0:h.appContext.config.globalProperties.id)||"",n.workspaceId=((f=l.value)==null?void 0:f.appContext.config.globalProperties.workspaceId)||un.getInstance().getItem("ws.code");const g={domainApi:u(),wsCode:un.getInstance().getItem("ws.code"),entityId:n.id};if(n.apiConfig=(p=l.value)==null?void 0:p.appContext.config.globalProperties.apiConfig,!g.entityId||!g.wsCode||!g.domainApi)throw new Error("API configuration is missing in dashboardConfig");const v=new ON(n.apiConfig,g);v.on("call-api",a),l.value.appContext.config.globalProperties.apiServices=v}catch(g){console.error("Error getting current instance:",g)}}),Vn(()=>{l.value.appContext.config.globalProperties.apiServices.off("call-api",a)});const c=X(()=>n.id),d=X(()=>n.workspaceId);return ci("workspaceId",d),ci("entityId",c),(h,f)=>(q(),de("div",{class:le(h.$style.dashboardPluginWrapper)},[t.value?(q(),de("span",nDe," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):c.value?(q(),je(V(tDe),{key:1,entityId:c.value,workspaceId:d.value},null,8,["entityId","workspaceId"])):Ye("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),hT=async(e={},t={})=>{const n=gI(oDe),o=n5();n.use(o);const s=["apiConfig","workspaceId","id"],r={};Object.entries(e).forEach(([a,l])=>{l!==void 0&&(n.config.globalProperties[a]=l,r[a]=l,s.includes(a)&&typeof l=="string"?sessionStorage.setItem(a,l):console.error(`[Config Error] Key "${a}" has an invalid value and will not be persisted.`))}),n.config.globalProperties.$arboConfig=r,Object.values(t).forEach(a=>{a&&typeof a.install=="function"&&n.use(a)}),n.config.errorHandler=(a,l,u)=>{console.error("[Vue Error]",a),u&&console.error("[Info]",u)},console.log(`%cArbo Dashboard Plugin v${$G}`,"color: #4CAF50; font-weight: bold;"),console.log(n.config.globalProperties),globalThis.window.$switchInstance=n.config.globalProperties.switchInstance,n.provide("switchInstance",n.config.globalProperties.switchInstance),n.directive("tooltip",Kt),n.directive("focusable",Io);const i=await bue();return n.use(i),n};globalThis.window!==void 0&&(globalThis.window.arboDashboard=hT),Ln.default=hT,Ln.initDashboard=hT,Object.defineProperties(Ln,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
255
|
+
Excel file.`,onOnClick:ge},{visual:we(()=>[ye(V(va),{src:"UploadFile",size:65,"max-width":"65"})]),_:1},8,["description"])])):Ye("",!0),b.value===6?(q(),je(V(jue),{key:2,ref_key:"bulkCreateCountRef",ref:te,"get-status-func":xe,"workspace-id":f.workspaceId,"take-name":p.value,onChanged:u,"entity-id":f.entityId},null,8,["workspace-id","take-name","entity-id"])):b.value===2?(q(),de("div",VTe,[ye(V(wL),{modelValue:y.value,"onUpdate:modelValue":G[0]||(G[0]=J=>y.value=J),"get-status-func":xe,"workspace-id":f.workspaceId,id:f.entityId,style:{width:"100%"},"max-width":"372px",ref_key:"selectStatusRef",ref:L},null,8,["modelValue","workspace-id","id"])])):b.value===3||b.value===7?(q(),de("div",BTe,[ye(V(va),{src:"Success",width:240,height:180,ratio:"unset"})])):b.value===4||b.value===8?(q(),de("div",$Te,[ye(V(va),{src:"Failed",width:240,height:180,ratio:"unset"})])):Ye("",!0)],2)]),_:2},[b.value===2||b.value===4||b.value===3||b.value===6||b.value===7||b.value===8?{name:"footer",fn:we(()=>[b.value==6?ze((q(),de("div",HTe,[ye(V(St),{variant:"primary",loading:c.value,disabled:ue.value||c.value,onClick:d},{default:we(()=>[...G[2]||(G[2]=[tt(" Create ",-1)])]),_:1},8,["loading","disabled"])])),[[V(o),{content:ue.value?"Add a name or a counter first.":void 0,bypassOverflowCheck:!0}]]):Ye("",!0),b.value===4||b.value===8?(q(),je(V(St),{key:1,variant:"secondary",onClick:k},{default:we(()=>[...G[3]||(G[3]=[tt(" Close ",-1)])]),_:1})):b.value===3?(q(),je(V(St),{key:2,variant:"secondary",onClick:k},{default:we(()=>[...G[4]||(G[4]=[tt(" Got it ",-1)])]),_:1})):Ye("",!0),b.value===2?ze((q(),de("div",GTe,[ye(V(St),{loading:K.value,disabled:K.value||!y.value,onClick:re},{default:we(()=>[...G[5]||(G[5]=[tt(" Import ",-1)])]),_:1},8,["loading","disabled"])])),[[V(o),{content:K.value||!y.value?"Select a status first":void 0,bypassOverflowCheck:!0}]]):Ye("",!0),b.value===4?(q(),je(V(St),{key:4,onClick:Y},{default:we(()=>[...G[6]||(G[6]=[tt(" Try Again ",-1)])]),_:1})):Ye("",!0),b.value===8?(q(),je(V(St),{key:5,onClick:P},{default:we(()=>[...G[7]||(G[7]=[tt("Try Again",-1)])]),_:1})):Ye("",!0),b.value===7?(q(),je(V(St),{key:6,onClick:k,variant:"secondary"},{default:we(()=>[...G[8]||(G[8]=[tt(" Got it ",-1)])]),_:1})):Ye("",!0)]),key:"0"}:void 0]),1040))}}),[["__scopeId","data-v-c89ed86e"]]),zTe={class:"header-name"},jTe={class:"modal-body"},KTe={class:"description"},qTe={key:0,class:"error-message"},YTe={class:"dynamic"},XTe={key:1,class:"choose-method-container"},ZTe={key:2,class:"result-container"},JTe={key:3,class:"result-container"},QTe={key:2},BG="text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel",eDe=_t(ot({__name:"PopupBulkUpdate",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const o=Kt,s=X(()=>[1,2].includes(f.value)),r=X(()=>Sv()),i=X(()=>({1:{title:`Update ${r.value} in bulk`,description:""},2:{title:`Update ${r.value} in bulk`,description:""},3:{title:"Import successful",description:"Work will be created in background. Refresh to see updates."},4:{title:"Import failed",description:"Some data doesn't meet the requirements. Review it and try again."},5:{title:"Waiting for Toolbox",description:"Waiting for Toolbox"}})),a={"--popup-pt":"20px","--popup-pb":"20px","--popup-pl":"24px","--popup-pr":"24px"},l=e,u=n,{apiServices:c}=so(!1,l),d=1,h=$(),f=$(d),p=$(null),g=$(null),v=$(null),w=$(void 0),S=$(null),b=X(()=>i.value[f.value]),y=$(),E=()=>{var ie;p.value=null,f.value=d,g.value=null,v.value=null,_.value=null,S.value=null,(ie=y.value)==null||ie.clear(),w.value=void 0};Qe([g,v],([ie,te])=>{f.value===1&&ie&&te&&(f.value=2)});const _=$(null),I=ie=>Rs().getErrorMessageFromResponse(ie),T=ie=>{if(typeof ie=="string"){_.value=ie;return}const te=ie.response,se=te==null?void 0:te.data,Z=I(se);_.value=Z??ie.message,console.log("Error message set to:",{errorMsg:Z,message:ie})},F=async(ie,te)=>{var A;B.value=!0;const se=new FormData,Z=((A=ie.name.split(".").pop())==null?void 0:A.toString())||"";if(se.append("file",ie),se.append("format",Z),se.append("entity_id",l.entityId||""),!c.value){console.error("API services not available");return}try{await c.value.overwriteScenesViaImportFile(l.workspaceId,l.entityId,se),f.value=3,u("import-success")}catch(j){console.error("Error uploading file:",j),T(j),f.value=4}finally{B.value=!1,window.appManager.hide("feedback_lockup_toolbox")}},{openToolbox:L,sendBackErrorFile:x}=LG(({file:ie,fileName:te,channel:se})=>{se==="feedback-merge"&&(v.value=ie,w.value=te??ie.name,F(ie))},"feedback-merge"),P=$(!1),k=async()=>{P.value=!0;const ie=l.workspaceId,te=l.entityId;if(!ie||!te||!c.value)return console.error("Workspace ID or Entity ID is missing"),Promise.reject(new Error("Workspace ID or Entity ID is missing"));try{const se=await c.value.downloadExportedItemsFile(ie,te,!1);if(!se)throw new Error("No response from downloadTemplate API");return se}catch(se){return console.error("Error downloading template:",se),Promise.reject(se)}finally{P.value=!1}},M=ie=>{const te=BG.includes(ie.type);return te||(console.error("Invalid file type:",ie.type),Rs().addNotification({id:"invalid-file-type",message:"Invalid file type. Please upload a xlsx, xls, csv file.",type:"error"})),te},N=async()=>{const ie=document.createElement("input");ie.type="file",ie.accept=BG,ie.onchange=async()=>{var se;const te=(se=ie.files)==null?void 0:se[0];if(te){if(!M(te)){E();return}g.value=nv(te);try{const Z=await k();if(!Z){Rs().addNotification({id:"failed-download-template",message:"Failed to download file.",type:"error"});return}L({exportFile:Z,feedbackFile:te})}catch(Z){console.error("Error opening toolbox:",Z),Rs().addNotification({id:"failed-open-toolbox",message:"Failed to open toolbox.",type:"error"})}}},ie.click()},B=$(!1),z=()=>{p.value=null,v.value&&w.value&&x(v.value,w.value)},oe=()=>{p.value&&v.value&&(B.value=!0,F(v.value,w.value).finally(()=>{B.value=!1}))};return t({open:()=>{var ie;return(ie=h.value)==null?void 0:ie.show()},close:()=>{var ie;return(ie=h.value)==null?void 0:ie.hide()}}),(ie,te)=>(q(),je(V(qN),jt({ref_key:"popupRef",ref:h,style:a,onHidden:E},{popupIndex:10,popupName:b.value.title,minWidth:"420px",showOverlay:!0,overlayOpacity:.5,closeOnOverlayClick:!1,closeOnEscape:!0,showCloseBtn:s.value}),Hh({header:we(()=>[Se("span",zTe,at(b.value.title),1)]),default:we(()=>[Se("div",jTe,[Se("div",KTe,at(b.value.description),1),_.value&&f.value===4?(q(),de("div",qTe,[te[2]||(te[2]=tt(" Error code ",-1)),Se("span",YTe,at(_.value),1)])):Ye("",!0),f.value===1?(q(),de("div",XTe,[ye(Hw,{disabled:!1,label:"Import from file",description:`Update ${r.value} from a CSV or Excel file.`,onOnClick:N,style:{width:"100%"}},{visual:we(()=>[ye(V(va),{src:"UploadFile",size:65})]),_:1},8,["description"])])):f.value===3?(q(),de("div",ZTe,[ye(V(va),{src:"Success",width:240,height:180,ratio:"unset"})])):f.value===4?(q(),de("div",JTe,[ye(V(va),{src:"Failed",width:240,height:180,ratio:"unset"})])):Ye("",!0)])]),_:2},[f.value===4||f.value===3?{name:"footer",fn:we(()=>[f.value===4?(q(),je(V(St),{key:0,variant:"secondary",onClick:te[0]||(te[0]=()=>{var se;E(),(se=h.value)==null||se.hide()})},{default:we(()=>[...te[3]||(te[3]=[tt(" Close ",-1)])]),_:1})):f.value===3?(q(),je(V(St),{key:1,variant:"secondary",onClick:te[1]||(te[1]=()=>{var se;E(),(se=h.value)==null||se.hide()})},{default:we(()=>[...te[4]||(te[4]=[tt(" Got it ",-1)])]),_:1})):Ye("",!0),f.value===2?ze((q(),de("div",QTe,[ye(V(St),{loading:B.value,disabled:B.value||!p.value,onClick:oe},{default:we(()=>[...te[5]||(te[5]=[tt(" Import ",-1)])]),_:1},8,["loading","disabled"])])),[[V(o),{content:B.value||!p.value?"Select a status first":void 0,bypassOverflowCheck:!0}]]):Ye("",!0),f.value===4?(q(),je(V(St),{key:3,onClick:z},{default:we(()=>[...te[6]||(te[6]=[tt(" Try Again ",-1)])]),_:1})):Ye("",!0)]),key:"0"}:void 0]),1040))}}),[["__scopeId","data-v-9a73e40c"]]),tDe=_t(ot({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const n=$s,o=cE(),{setUserPermissions:s,setEntityPermissions:r}=o,{entityPermissions:i}=go(o),a=Kt,l=Io,u=Lv(),{entityData:c}=go(u),d={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},h=$(""),f=X(()=>{var Ke;const Pe=((Ke=i.value)==null?void 0:Ke.has_create_item_permission)==1||!1;return[{label:"Create in bulk",value:"import_scenes",type:"text",id:"import_scenes_option",hide:!Pe},{label:"Update in bulk",value:"bulk_update",type:"text",hide:!Pe,id:"bulk_update_option"}]}),p=e;Tp.initialize({wrapVueCellRenderer:My,wrapVueCellEditor:uB});const g=fd(),{switchInstanceFunc:v}=go(g);Xt(()=>{const Pe=oo();v.value=Pe==null?void 0:Pe.appContext.config.globalProperties.switchInstance;const Ke=new BroadcastChannel("focusable_channel");ht(()=>{setTimeout(()=>{Ke.postMessage("Focusable elements updated")},7e3)})});const w=$(null),S=$([]),b=Gf(),{rowCount:y}=go(b),E=$(!1),_=$(""),I=$(),T=iM(),{metricList:F}=go(T),L=$(""),x=$(!1),P=$(new Set),k=$(new Map),{apiServices:M}=so(!1,p),{columnDefs:N,checkboxColumn:B,saveColumnConfig:z}=yTe(F,p.entityId,w),oe=$();Qe(()=>N,()=>{var Pe;(Pe=oe.value)==null||Pe.updateColumnDefs(N.value)},{deep:!0});const ie=(Pe,Ke)=>{z(Pe,Ke)},{updateRowData:te,setMetricValues:se}=bTe(w),Z=X(()=>({isSearching:_.value.length>0,isFiltering:!(Object.keys(pe.value||{}).length==1&&Object.keys(pe.value)[0]=="preflight_status")&&Object.keys(pe.value||{}).length>0})),A=X(Cv),j=X(()=>N.value.filter(Pe=>{var Ke;return((Ke=Pe.field)==null?void 0:Ke.startsWith("metric_"))&&!Pe.hide}).map(Pe=>{var Ke;return((Ke=Pe.field)==null?void 0:Ke.replace("metric_",""))||""}));ci("timezone",A);const ne=X(()=>({autoFetch:!1,workspaceId:p.workspaceId,entityId:p.entityId,metricIds:j.value,updateItemData:te,setMetricValues:se})),{fetchItems:ge,getMetricList:xe,cusorMap:ue,getMetricValues:K}=CTe(ne),Y=X(()=>{if(!w.value)return!1;const Pe=w.value.getSelectedRows().length;return Pe>0&&Pe>=y.value.total}),re=X(()=>{var Pe;return((Pe=c.value)==null?void 0:Pe.name)||"Items"}),R=Pe=>{setTimeout(()=>{ht(()=>{var Ke,Mt;w.value&&(Pe?(Ke=w.value)==null||Ke.showNoRowsOverlay():(Mt=w.value)==null||Mt.hideOverlay())})},500)},G=(Pe,Ke)=>{var Mt;y.value.total=Pe.meta.total??0,(Mt=Pe.meta.next)!=null&&Mt.cursor&&(ue[Ke+1]=Pe.meta.next.cursor),L.value=Pe.meta["X-Tsr-signature"]||"",Pe.meta.total===0?R(!0):R(!1)},J=vE(),{setDefaultSort:ce}=J,Ee=$(null),{sortingAPIConfiguration:Ce,isSortingRunning:Ne}=go(J),pe=$({preflight_status:"1"}),H=X(()=>({...pe.value,search:_.value}));ci("filterParams",H);const W=$([]),be=X(()=>{var Pe;return((Pe=c.value)==null?void 0:Pe.name)||"Items"}),Ae=async({page:Pe,pageSize:Ke,filterText:Mt})=>{var uo,Zo,Os;(uo=w.value)==null||uo.hideOverlay();const Lt=ue[Pe],So=!Lt&&Pe>1?(Pe-1)*Ke:void 0,Xn=Ce.value;Xn.length>0&&(Ne.value=!0);try{const dc={cursor:Lt,size:Ke,searchQuery:Mt,offset:So,sort_by:Xn,...pe.value},Wl=await ge(dc);if(!Wl)return{rows:[],total:0};const Xi=(Os=(Zo=Wl.meta)==null?void 0:Zo.extra)==null?void 0:Os.default_sort;Xi&&ce(Xi);const gh=(Gw=>{const sn=Gw.data.map(hc=>EO(hc,A.value,be.value));return sn.forEach(hc=>{P.value.add(String(hc.id)),k.value.set(String(hc.id),{})}),sn})(Wl);return G(Wl,Pe),{rows:gh,total:y.value.total}}catch(dc){return console.error("Failed to fetch items:",dc),{rows:[],total:0}}finally{Ne.value=!1}},{isLoading:He,toggleSidebar:Te,onGridReady:Xe,handleUnSelect:ve,handleSelectAll:Be,onSearch:wt,firstLoad:Dt}=ETe({selectRowData:$([]),isSidebarOpen:E,quickFilterText:_,gridApi:w,perPage:d.ROWS_PER_PAGE,fetcher:Ae}),tn=$([]),en=Cr(()=>{var Xn;const Pe=((Xn=w.value)==null?void 0:Xn.getSelectedRows())||[],Ke=new Map(Pe.map(uo=>[uo.id,uo])),So=Pe.map(uo=>uo.id).map(uo=>{var Zo,Os;return[uo,(Os=(Zo=w.value)==null?void 0:Zo.getRowNode(uo))==null?void 0:Os.rowIndex]}).sort((uo,Zo)=>(uo[1]??0)-(Zo[1]??0)).map(([uo])=>Ke.get(uo));tn.value=So.filter(uo=>uo!==void 0)}),bn=Fo({columnsDisplay:[],rowsDisplay:{fromIndex:0,toIndex:0}}),Le=X(()=>({blockLoadDebounceMillis:1e3,columnDefs:N.value,rowModelType:"infinite",cacheBlockSize:d.ROWS_PER_PAGE,infiniteInitialRowCount:20,popupParent:document.getElementById("item-table-layout-id")||void 0,rowSelection:{mode:"multiRow",checkboxes:!1,enableClickSelection:!1,enableSelectionWithoutKeys:!1},pagination:!1,rowHeight:d.ROW_HEIGHT,suppressHorizontalScroll:!1,suppressColumnVirtualisation:!1,debounceVerticalScrollbar:!1,animateRows:!1,suppressAnimationFrame:!1,suppressScrollOnNewData:!0,suppressScrollWhenPopupsAreOpen:!1,rowBuffer:20,enableCellTextSelection:!1,suppressDragLeaveHidesColumns:!0,suppressMaxRenderedRowRestriction:!1,height:d.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:Ge,noRowsOverlayComponent:My(zre),noRowsOverlayComponentParams:()=>Z.value,defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:Pe=>Pe.data.id,rowClassRules:{"row-deleted":Pe=>{var Ke;return(Ke=Pe.data)==null?void 0:Ke.isDeleted},"row-locked":Pe=>{var Ke;return(Ke=Pe.data)==null?void 0:Ke.isLocked},"row-archived":Pe=>{var Ke;return(Ke=Pe.data)==null?void 0:Ke.isArchived},"row-process-locked":Pe=>{var Ke,Mt;return((Mt=(Ke=Pe.data)==null?void 0:Ke.isProcessing)==null?void 0:Mt.state)==0},"row-inactive":Pe=>{var Ke;return!((Ke=Pe.data)!=null&&Ke.id)},"row-empty":Pe=>!Pe.data},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:p.workspaceId,entityId:p.entityId,apiServices:M.value,sorting:Ne.value},onCellKeyDown:Pe=>{var Ke,Mt,Lt;if(Pe.data.isDeleted)return!1;if(((Ke=Pe==null?void 0:Pe.event)==null?void 0:Ke.key)==="Enter"){const{api:So,node:Xn,column:uo}=Pe,Zo=So.getCellRendererInstances({rowNodes:[Xn],columns:[uo]});if(Zo.length>0){const Os=Zo[0];Os&&typeof((Mt=Os.componsenExposed)==null?void 0:Mt.focus)=="function"&&((Lt=Os.componsenExposed)==null||Lt.focus())}}},isRowSelectable:Pe=>{var Ke,Mt;return!Pe.group&&((Mt=(Ke=Pe.data)==null?void 0:Ke.isProcessing)==null?void 0:Mt.state)!=0},suppressKeyboardEvent:Pe=>{var Lt;if((Lt=Pe.data)!=null&&Lt.isDeleted)return!0;const Ke=Pe.event.key,Mt=Pe.editing;return Mt&&Ke==="Tab"?!0:Mt&&Ke==="Enter"?!1:Ke==="Enter"?(Pe.event.preventDefault(),Pe.event.stopPropagation(),!0):Ke==="ArrowUp"||Ke==="ArrowDown"||Ke==="ArrowLeft"||Ke==="ArrowRight"||Ke==="Tab"||Ke==="Enter"},navigateToNextCell:()=>null,onBodyScroll:Pe=>{const Ke=Pe.api.getFirstDisplayedRowIndex(),Mt=Pe.api.getLastDisplayedRowIndex();bn.rowsDisplay.fromIndex=Ke,bn.rowsDisplay.toIndex=Mt,bn.columnsDisplay=Pe.api.getAllDisplayedVirtualColumns().map(Lt=>Lt.getColId())},onViewportChanged:Pe=>{bn.columnsDisplay=Pe.api.getAllDisplayedVirtualColumns().map(Ke=>Ke.getColId())},suppressHeaderFocus:!0,onCellEditingStarted(Pe){if(Pe.data.isDeleted&&Pe.api.stopEditing(),Pe.colDef.field=="options"){const Ke=Pe.api.getCellRendererInstances({rowNodes:[Pe.node],columns:[Pe.column]});Ke.length>0&&Ke[0].focusUi()}},tabToNextCell:Pe=>{let Ke=Pe.nextCellPosition;if(Ke&&Ke.column.getColId()==="ag-Grid-SelectionColumn"){const Mt=Pe.api.getAllDisplayedColumns(),Lt=Mt.indexOf(Ke.column),So=Pe.backwards?-1:1,Xn=Mt[Lt+So];if(Xn)return{rowIndex:Ke.rowIndex,column:Xn,rowPinned:Ke.rowPinned}}return Ke}}));function Ge(){if(!w.value)return;let Pe=0;w.value.forEachNode(Ke=>{Ke.data&&Pe++}),y.value.loaded=Math.min(Pe,y.value.total)}Qe(()=>Ce,()=>{w.value&&(L.value="",P.value.clear(),w.value.deselectAll(),Object.keys(ue).forEach(Pe=>delete ue[Number(Pe)]),w.value.purgeInfiniteCache(),w.value.ensureIndexVisible(0))},{deep:!0});const Rt=$(),Jt=$(),qt=()=>{is.showPopupOverwriteScenes=!0,ht(()=>{var Pe;(Pe=Jt.value)==null||Pe.open()})},nt=$(),Go=()=>{is.showPopupBulkUpdate=!0,ht(()=>{var Pe;(Pe=nt.value)==null||Pe.open()})},si=()=>{is.showPopupToolboxUploader=!0,ht(()=>{var Pe;(Pe=Rt.value)==null||Pe.open()})},tr=async()=>{Dt.value=!0,w.value&&(L.value="",P.value.clear(),Object.keys(ue).forEach(Pe=>delete ue[Number(Pe)]),await w.value.deselectAll(),await w.value.ensureIndexVisible(0,"top"),await w.value.purgeInfiniteCache(),await w.value.refreshInfiniteCache())},Mr=X(()=>un.getInstance().getItem("ITEM_TABLE_APP_VERSION")||""),Ui=$();X(()=>{var Pe;return(Pe=RTe(Mr.value))==null?void 0:Pe.map(Ke=>`<div>⢠${Ke}</div>`).join(`
|
|
256
|
+
`)});function Wi(Pe){var Ke;Pe==="new_scene"?(Ke=Ui.value)==null||Ke.show():Pe==="import_scenes"?si():Pe==="overwrite_scenes"?qt():Pe==="bulk_update"&&Go()}const zi=Pe=>{S.value=Pe.api.getSelectedRows().map(Ke=>Ke.id)},ji=Pe=>{const Ke=Xe(Pe);return Ke&&(Ke.addEventListener("modelUpdated",Ge),Ke.addEventListener("bodyScroll",()=>Ke.stopEditing()),Ke.addEventListener("selectionChanged",en),Ke.addEventListener("columnMoved",Lt=>ie(Lt,!0)),Ke.addEventListener("columnResized",Lt=>ie(Lt,!0)),Ke.addEventListener("firstDataRendered",()=>{Dt.value=!1}),!document.querySelector(".ag-body-viewport"))||Pe==null||Pe.setColumnsVisible(["ag-Grid-SelectionColumn"],!1),Ke},Fs=()=>{var Pe;h.value=(((Pe=document.getElementById("item-table-layout-id"))==null?void 0:Pe.clientHeight)??0)-78+"px"};Xt(()=>{ht(()=>{Fs()}),window.addEventListener("resize",Fs);function Pe(){requestAnimationFrame(Pe)}Pe()}),Vn(()=>{window.removeEventListener("resize",Fs)});const Ki=async({code:Pe,name:Ke})=>{await wt(Pe),setTimeout(()=>{var Mt;(Mt=I.value)==null||Mt.setValue(Ke)},300)},dh=Pe=>{if(!w.value)return;const Ke=w.value.getRowNode(Pe);Ke?(w.value.ensureIndexVisible(Number(Ke.rowIndex),"middle"),w.value.flashCells({rowNodes:[Ke],flashDuration:3e3,fadeDuration:1e3})):w.value.ensureIndexVisible(y.value.total-1,"bottom")},Nn=Pe=>Pe.metric_type.code==="number"?"number":"default",bo=async()=>{if(p.entityId)try{const Pe=await xe(p.entityId);F.value=Pe.data.map(Ke=>({...Ke,sortType:Nn(Ke)}))}catch(Pe){console.error("Failed to initialize metric list:",Pe),F.value=[]}},fT=async()=>{if(M.value)try{const Pe=await M.value.getUserPermission(p.workspaceId);s(Pe)}catch(Pe){console.error("Failed to fetch user permissions:",Pe)}},hh=async()=>{if(M.value)try{const Pe=await M.value.getEntityDetail(p.workspaceId,p.entityId);r(Pe.permission),c.value=Pe}catch(Pe){console.error("Failed to fetch entity details:",Pe)}},cc=Ey(),{setUser:fh}=cc,pT=async()=>{if(M.value)try{const Pe=await M.value.getMe();return fh(Pe),Pe}catch(Pe){console.error("Failed to fetch user details:",Pe)}},qi=async()=>{var Pe;if(M.value)try{const Ke=await M.value.getWorkspaces(p.workspaceId),Mt=(Pe=Ke.data[0])==null?void 0:Pe.ws_user_role_id;return Mt&&cc.setUserRoleId(Mt),Ke}catch(Ke){console.error("Failed to fetch workspace details:",Ke)}};Qe(()=>[p.entityId,p.workspaceId],async([Pe,Ke])=>{!Pe||!Ke||(pT(),qi(),bo(),fT(),hh())},{immediate:!0,deep:!0}),Qe(j,(Pe,Ke)=>{const Mt=Pe.filter(Lt=>!(Ke!=null&&Ke.includes(Lt)));Mt.length>0&&K(Array.from(P.value),Mt).then(Lt=>{se(Lt,P.value,Mt)})},{immediate:!0,deep:!0}),Qe(L,(Pe,Ke)=>{x.value=!!(Ke&&Pe&&Ke!==Pe)}),t({refreshTable:tr});const Ul=Pe=>{pe.value=Pe,tr()},Yi=Pe=>{W.value=Pe,tr()},ph=Pe=>{N.value=Pe||[],ie({},!0)},gT=X(()=>{var Lt;const Pe=un.getInstance().getItem("ws.terminology"),Ke=Pe?JSON.parse(Pe):null;return`New ${((Lt=Ke==null?void 0:Ke.find(So=>So.code==="scene"))==null?void 0:Lt.name)||"Scene"}`}),is=Fo({showPopupBulkUpdate:!1,showPopupToolboxUploader:!1,showPopupSceneCreator:!1,showPopupItemDetails:!1,showPopupOverwriteScenes:!1}),cg=Pe=>{var So,Xn;const Ke=Pe.data,{action:Mt,type:Lt}=Ke;console.log("App loader close event received:",Ke),Mt=="APP_LOADER:HIDE"&&(Lt==="xlsx_toolbox"||Lt==="feedback_lockup_toolbox")&&((So=Rt.value)==null||So.close(),(Xn=nt.value)==null||Xn.close())};return Xt(()=>{window.addEventListener("message",cg)}),Vn(()=>{window.removeEventListener("message",cg)}),(Pe,Ke)=>(q(),je(V(Vse),{"is-sidebar-open":E.value,onCloseSidebar:V(Te),onSidebarClear:V(Te),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:V(Te)},{"header-left":we(()=>{var Mt;return[((Mt=V(i))==null?void 0:Mt.has_create_item_permission)==1?(q(),je(V(u0),{key:0,variant:["primary"],options:f.value,onSelect:Wi,onHandleClick:Ke[1]||(Ke[1]=Lt=>Wi("new_scene")),id:"create_scene_dropdown",tabIndex:2},{prefix:we(()=>[ze(ye(V(St),{"data-focus-index":"1",id:"create_new_scene",variant:["primary"],onClick:Ke[0]||(Ke[0]=Lt=>Wi("new_scene")),label:gT.value},null,8,["label"]),[[V(l),1]])]),_:1},8,["options"])):Ye("",!0)]}),"header-actions":we(()=>[ye(V(Pie),{"onUpdate:assignees":Yi,onApplyFilter:Ul,loading:V(Dt),entityId:p.entityId},null,8,["loading","entityId"]),ze(ye(V(RE),{focusIndex:"4",modelValue:_.value,"onUpdate:modelValue":Ke[2]||(Ke[2]=Mt=>_.value=Mt),onSearch:V(wt),class:le(Pe.$style.itemSearchBox),onClear:Ke[3]||(Ke[3]=Mt=>V(wt)("")),id:"item_search_box",ref_key:"searchBoxRef",ref:I},null,8,["modelValue","onSearch","class"]),[[V(n),{isLoading:V(Dt),fullwidth:!0}]]),ze((q(),je(V(eM),{status:V(He)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":x.value},{default:we(()=>[ze((q(),je(V(St),{variant:["secondary","icon"],disabled:V(He),onClick:tr},{default:we(()=>[ye(V(gt),{src:"ArrowsRotate"})]),_:1},8,["disabled"])),[[V(l),5],[V(a),"Refresh"]])]),_:1},8,["status","show-badge"])),[[V(n),{isLoading:V(Dt),fullwidth:!0}]]),ze(ye(V(Gre),{"model-value":V(N),onChange:Ke[4]||(Ke[4]=Mt=>ph(Mt)),id:"table_customization",gridApi:w.value,ref_key:"tableCustomizationRef",ref:oe,"checkbox-column":V(B),tableHeight:h.value},null,8,["model-value","gridApi","checkbox-column","tableHeight"]),[[V(n),{isLoading:V(Dt),fullwidth:!0}]])]),grid:we(({availableHeight:Mt})=>[ye(V(hTe),jt({id:"item_table_main",ref_key:"agGrid",ref:Ee},Le.value,{height:Mt+"px",isSorting:V(Ne),onOnGridReady:ji,onSelectionChanged:zi}),null,16,["height","isSorting"])]),footer:we(()=>[Se("div",{class:le(Pe.$style.tableFooter),id:"table_footer"},[Se("span",null,[Ke[7]||(Ke[7]=tt(" Showing ",-1)),Se("b",null,at(V(y).loaded)+" of "+at(V(y).total),1)])],2)]),"new-row":we(()=>[ye(V(uie),{ref_key:"createNewSceneRef",ref:Ui,onSearchForCode:Ki,onFocusOnId:dh},null,512)]),"bulk-update-actions":we(()=>[!E.value&&S.value.length>0?ze((q(),je(V(Ase),{key:0,selectRowData:tn.value,"workspace-id":p.workspaceId,"entity-id":p.entityId,"grid-api":w.value,onUnselect:V(ve),onSelectAll:V(Be),"take-name":re.value,"selected-all":Y.value,"total-rows":V(y).total,"visible-rows":V(y).loaded,onUpdated:V(en),loading:V(He),onRefreshSelectedRow:V(en)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","onSelectAll","take-name","selected-all","total-rows","visible-rows","onUpdated","loading","onRefreshSelectedRow"])),[[dr,!E.value&&S.value.length>0]]):Ye("",!0)]),snackbar:we(()=>[ye(V(Zse))]),popup:we(()=>[is.showPopupToolboxUploader?(q(),je(WTe,{key:0,ref_key:"popupToolboxUploaderRef",ref:Rt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:tr,onHide:Ke[5]||(Ke[5]=Mt=>is.showPopupToolboxUploader=!1)},null,8,["workspace-id","entity-id"])):Ye("",!0),is.showPopupBulkUpdate?(q(),je(eDe,{key:1,ref_key:"popupBulkUpdateRef",ref:nt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:tr,onHide:Ke[6]||(Ke[6]=Mt=>is.showPopupBulkUpdate=!1)},null,8,["workspace-id","entity-id"])):Ye("",!0)]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1sow5_1",tableFooter:"_tableFooter_1sow5_7",footerStart:"_footerStart_1sow5_17",newRow:"_newRow_1sow5_25","warning-text":"_warning-text_1sow5_43","has-error":"_has-error_1sow5_48",itemSearchBox:"_itemSearchBox_1sow5_52","beta-tag":"_beta-tag_1sow5_56"}}]]),$G="0.1.243",nDe={key:0},oDe=_t(ot({__name:"app",setup(e){const t=X(()=>n.id.length===0||n.workspaceId.length===0),n=Fo({id:"",workspaceId:"",apiConfig:{}}),o=Rs(),{showMessage:s,showErrorNetMessage:r}=o,i=["basicInfor","importItems"],a=h=>{h.success?s(h.apiCode,"success"):i.includes(h.apiCode)||r(h)},l=$(null),u=()=>{const h=un.getInstance().getItem("API_BASE_URL");return h!=null&&h.includes("v1")?h.slice(0,h.lastIndexOf("/v1")):String(h)};Bh(()=>{var h,f,p;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",$G);try{if(l.value=oo(),!l.value)throw new Error("Current instance is null");n.id=((h=l.value)==null?void 0:h.appContext.config.globalProperties.id)||"",n.workspaceId=((f=l.value)==null?void 0:f.appContext.config.globalProperties.workspaceId)||un.getInstance().getItem("ws.code");const g={domainApi:u(),wsCode:un.getInstance().getItem("ws.code"),entityId:n.id};if(n.apiConfig=(p=l.value)==null?void 0:p.appContext.config.globalProperties.apiConfig,!g.entityId||!g.wsCode||!g.domainApi)throw new Error("API configuration is missing in dashboardConfig");const v=new ON(n.apiConfig,g);v.on("call-api",a),l.value.appContext.config.globalProperties.apiServices=v}catch(g){console.error("Error getting current instance:",g)}}),Vn(()=>{l.value.appContext.config.globalProperties.apiServices.off("call-api",a)});const c=X(()=>n.id),d=X(()=>n.workspaceId);return ci("workspaceId",d),ci("entityId",c),(h,f)=>(q(),de("div",{class:le(h.$style.dashboardPluginWrapper)},[t.value?(q(),de("span",nDe," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):c.value?(q(),je(V(tDe),{key:1,entityId:c.value,workspaceId:d.value},null,8,["entityId","workspaceId"])):Ye("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),hT=async(e={},t={})=>{const n=gI(oDe),o=n5();n.use(o);const s=["apiConfig","workspaceId","id"],r={};Object.entries(e).forEach(([a,l])=>{l!==void 0&&(n.config.globalProperties[a]=l,r[a]=l,s.includes(a)&&typeof l=="string"?sessionStorage.setItem(a,l):console.error(`[Config Error] Key "${a}" has an invalid value and will not be persisted.`))}),n.config.globalProperties.$arboConfig=r,Object.values(t).forEach(a=>{a&&typeof a.install=="function"&&n.use(a)}),n.config.errorHandler=(a,l,u)=>{console.error("[Vue Error]",a),u&&console.error("[Info]",u)},console.log(`%cArbo Dashboard Plugin v${$G}`,"color: #4CAF50; font-weight: bold;"),console.log(n.config.globalProperties),globalThis.window.$switchInstance=n.config.globalProperties.switchInstance,n.provide("switchInstance",n.config.globalProperties.switchInstance),n.directive("tooltip",Kt),n.directive("focusable",Io);const i=await bue();return n.use(i),n};globalThis.window!==void 0&&(globalThis.window.arboDashboard=hT),Ln.default=hT,Ln.initDashboard=hT,Object.defineProperties(Ln,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|