@arbocollab/arbo-plugin-item-table 0.0.153 → 0.0.154
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 +9 -13
- package/lib/umd/index.umd.js +2 -2
- package/package.json +1 -1
package/lib/es/index.es.js
CHANGED
|
@@ -40945,7 +40945,7 @@ const Bse = async () => {
|
|
|
40945
40945
|
return ore(e);
|
|
40946
40946
|
};
|
|
40947
40947
|
function hx(e, t) {
|
|
40948
|
-
var i, s, r
|
|
40948
|
+
var i, s, r;
|
|
40949
40949
|
const n = (i = t == null ? void 0 : t.data) == null ? void 0 : i.permissions;
|
|
40950
40950
|
console.log("checkPermissionDisabled", { field: e, cellParam: t, permissions: n });
|
|
40951
40951
|
let o = { disabled: !1, readOnly: !1, type: void 0 };
|
|
@@ -40962,16 +40962,12 @@ function hx(e, t) {
|
|
|
40962
40962
|
type: void 0
|
|
40963
40963
|
};
|
|
40964
40964
|
else if (e != null && e.includes("metric")) {
|
|
40965
|
-
const
|
|
40966
|
-
|
|
40967
|
-
"check permission for metric field",
|
|
40968
|
-
l,
|
|
40969
|
-
(s = t.data[l]) == null ? void 0 : s.permission
|
|
40970
|
-
), o = {
|
|
40965
|
+
const a = `metric_permission_${e == null ? void 0 : e.replace("metric_", "")}`;
|
|
40966
|
+
o = {
|
|
40971
40967
|
disabled: !1,
|
|
40972
|
-
readOnly: ((
|
|
40968
|
+
readOnly: ((s = t.data[a]) == null ? void 0 : s.permission) !== 2 && !((r = t.colDef) != null && r.context.formula),
|
|
40973
40969
|
type: su(t.context)
|
|
40974
|
-
}
|
|
40970
|
+
};
|
|
40975
40971
|
} else if (!n)
|
|
40976
40972
|
o = {
|
|
40977
40973
|
disabled: !1,
|
|
@@ -40979,7 +40975,7 @@ function hx(e, t) {
|
|
|
40979
40975
|
type: void 0
|
|
40980
40976
|
};
|
|
40981
40977
|
else {
|
|
40982
|
-
const
|
|
40978
|
+
const l = {
|
|
40983
40979
|
assignees: (n == null ? void 0 : n.has_update_assignee_permission) ?? 0,
|
|
40984
40980
|
completedOn: 0,
|
|
40985
40981
|
name: (n == null ? void 0 : n.has_edit_date_permission) ?? 0,
|
|
@@ -40997,8 +40993,8 @@ function hx(e, t) {
|
|
|
40997
40993
|
/* editable */
|
|
40998
40994
|
}[e] ?? 0;
|
|
40999
40995
|
o = {
|
|
41000
|
-
disabled:
|
|
41001
|
-
readOnly:
|
|
40996
|
+
disabled: l === -1,
|
|
40997
|
+
readOnly: l !== 1,
|
|
41002
40998
|
type: void 0
|
|
41003
40999
|
};
|
|
41004
41000
|
}
|
|
@@ -84229,7 +84225,7 @@ const y_e = {
|
|
|
84229
84225
|
"beta-tag": "_beta-tag_1lefh_57"
|
|
84230
84226
|
}, N_e = {
|
|
84231
84227
|
$style: M_e
|
|
84232
|
-
}, L_e = /* @__PURE__ */ _t(x_e, [["__cssModules", N_e]]), FB = "0.0.
|
|
84228
|
+
}, L_e = /* @__PURE__ */ _t(x_e, [["__cssModules", N_e]]), FB = "0.0.154", V_e = { key: 0 }, B_e = /* @__PURE__ */ ht({
|
|
84233
84229
|
__name: "app",
|
|
84234
84230
|
setup(e) {
|
|
84235
84231
|
const t = W(() => n.id.length === 0 || n.workspaceId.length === 0), n = es({
|
package/lib/umd/index.umd.js
CHANGED
|
@@ -180,7 +180,7 @@ ${c}`:l)}else throw r},onCacheKey:r=>BX(t,n,r)}}function SQ(e){if(pt(e))return e
|
|
|
180
180
|
*/const AQ="11.2.8";function kQ(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Yl().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Yl().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Yl().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Yl().__INTLIFY_PROD_DEVTOOLS__=!1)}const Tn={UNEXPECTED_RETURN_TYPE:HJ,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function is(e,...t){return Au(e,null,L.env.NODE_ENV!=="production"?{messages:OQ,args:t}:void 0)}const OQ={[Tn.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Tn.INVALID_ARGUMENT]:"Invalid argument",[Tn.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Tn.NOT_INSTALLED]:"Need to install with `app.use` function",[Tn.UNEXPECTED_ERROR]:"Unexpected error",[Tn.REQUIRED_VALUE]:"Required in value: {0}",[Tn.INVALID_VALUE]:"Invalid value",[Tn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Tn.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Tn.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Tn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},IS=sr("__translateVNode"),PS=sr("__datetimeParts"),AS=sr("__numberParts"),Xl=sr("__enableEmitter"),of=sr("__disableEmitter"),gO=sr("__setPluralRules"),mO=sr("__injectWithOption"),kS=sr("__dispose"),Zs={FALLBACK_TO_ROOT:QJ,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_LEGACY_MODE:11,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:12,DUPLICATE_USE_I18N_CALLING:13},MQ={[Zs.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Zs.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Zs.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Zs.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead.
|
|
181
181
|
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[Zs.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",[Zs.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."};function Nu(e,...t){return Im(MQ[e],...t)}function sf(e){if(!tn(e)||qs(e))return e;for(const t in e)if(Di(e,t))if(!t.includes("."))tn(e[t])&&sf(e[t]);else{const n=t.split("."),o=n.length-1;let s=e,i=!1;for(let r=0;r<o;r++){if(n[r]==="__proto__")throw new Error(`unsafe key: ${n[r]}`);if(n[r]in s||(s[n[r]]=Cn()),!tn(s[n[r]])){L.env.NODE_ENV!=="production"&&or(Nu(Zs.IGNORE_OBJ_FLATTEN,{key:n[r]})),i=!0;break}s=s[n[r]]}if(i||(qs(s)?Bk.includes(n[o])||delete e[t]:(s[n[o]]=e[t],delete e[t])),!qs(s)){const r=s[n[o]];tn(r)&&sf(r)}}return e}function OS(e,t){const{messages:n,__i18n:o,messageResolver:s,flatJson:i}=t,r=qt(n)?n:Hn(o)?Cn():{[e]:Cn()};if(Hn(o)&&o.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;l?(r[l]=r[l]||Cn(),km(c,r[l])):km(c,r)}else pt(a)&&km(JSON.parse(a),r)}),s==null&&i)for(const a in r)Di(r,a)&&sf(r[a]);return r}function vO(e){return e.type}function yO(e,t,n){let o=tn(t.messages)?t.messages:Cn();"__i18nGlobal"in n&&(o=OS(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const s=Object.keys(o);s.length&&s.forEach(i=>{e.mergeLocaleMessage(i,o[i])});{if(tn(t.datetimeFormats)){const i=Object.keys(t.datetimeFormats);i.length&&i.forEach(r=>{e.mergeDateTimeFormat(r,t.datetimeFormats[r])})}if(tn(t.numberFormats)){const i=Object.keys(t.numberFormats);i.length&&i.forEach(r=>{e.mergeNumberFormat(r,t.numberFormats[r])})}}}function CO(e){return ge(wl,null,e,0)}function Lu(){return So()}const wO="__INTLIFY_META__",bO=()=>[],NQ=()=>!1;let SO=0;function EO(e){return(t,n,o,s)=>e(n,o,Lu()||void 0,s)}const LQ=()=>{const e=Lu();let t=null;return e&&(t=vO(e)[wO])?{[wO]:t}:null};function MS(e={}){const{__root:t,__injectWithOption:n}=e,o=t===void 0,s=e.flatJson,i=Ri?H:Vy;let r=sn(e.inheritLocale)?e.inheritLocale:!0;const a=i(t&&r?t.locale.value:pt(e.locale)?e.locale:tf),l=i(t&&r?t.fallbackLocale.value:pt(e.fallbackLocale)||Hn(e.fallbackLocale)||qt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a.value),c=i(OS(a.value,e)),u=i(qt(e.datetimeFormats)?e.datetimeFormats:{[a.value]:{}}),d=i(qt(e.numberFormats)?e.numberFormats:{[a.value]:{}});let h=t?t.missingWarn:sn(e.missingWarn)||Pu(e.missingWarn)?e.missingWarn:!0,f=t?t.fallbackWarn:sn(e.fallbackWarn)||Pu(e.fallbackWarn)?e.fallbackWarn:!0,p=t?t.fallbackRoot:sn(e.fallbackRoot)?e.fallbackRoot:!0,m=!!e.fallbackFormat,v=En(e.missing)?e.missing:null,w=En(e.missing)?EO(e.missing):null,b=En(e.postTranslation)?e.postTranslation:null,E=t?t.warnHtmlMessage:sn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,C=!!e.escapeParameter;const R=t?t.modifiers:qt(e.modifiers)?e.modifiers:{};let _=e.pluralRules||t&&t.pluralRules,T;T=(()=>{o&&Xk(null);const de={version:AQ,locale:a.value,fallbackLocale:l.value,messages:c.value,modifiers:R,pluralRules:_,missing:w===null?void 0:w,missingWarn:h,fallbackWarn:f,fallbackFormat:m,unresolving:!0,postTranslation:b===null?void 0:b,warnHtmlMessage:E,escapeParameter:C,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};de.datetimeFormats=u.value,de.numberFormats=d.value,de.__datetimeFormatters=qt(T)?T.__datetimeFormatters:void 0,de.__numberFormatters=qt(T)?T.__numberFormatters:void 0,L.env.NODE_ENV!=="production"&&(de.__v_emitter=qt(T)?T.__v_emitter:void 0);const Fe=cQ(de);return o&&Xk(Fe),Fe})(),nf(T,a.value,l.value);function x(){return[a.value,l.value,c.value,u.value,d.value]}const A=W({get:()=>a.value,set:de=>{T.locale=de,a.value=de}}),D=W({get:()=>l.value,set:de=>{T.fallbackLocale=de,l.value=de,nf(T,a.value,de)}}),I=W(()=>c.value),P=W(()=>u.value),J=W(()=>d.value);function Z(){return En(b)?b:null}function G(de){b=de,T.postTranslation=de}function te(){return v}function V(de){de!==null&&(w=EO(de)),v=de,T.missing=w}function $(de,Fe){return de!=="translate"||!Fe.resolvedMessage}const N=(de,Fe,ut,Et,Bt,bn)=>{x();let jt;try{L.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,o||(T.fallbackContext=t?lQ():void 0),jt=de(T)}finally{L.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,o||(T.fallbackContext=void 0)}if(ut!=="translate exists"&&ao(jt)&&jt===Nm||ut==="translate exists"&&!jt){const[Sn,Qn]=Fe();if(L.env.NODE_ENV!=="production"&&t&&pt(Sn)&&$(ut,Qn)&&(p&&(Vm(f,Sn)||Qk(h,Sn))&&or(Nu(Zs.FALLBACK_TO_ROOT,{key:Sn,type:ut})),L.env.NODE_ENV!=="production")){const{__v_emitter:Oe}=T;Oe&&p&&Oe.emit("fallback",{type:ut,key:Sn,to:"global",groupId:`${ut}:${Sn}`})}return t&&p?Et(t):Bt(Sn)}else{if(bn(jt))return jt;throw is(Tn.UNEXPECTED_RETURN_TYPE)}};function ee(...de){return N(Fe=>Reflect.apply(dO,null,[Fe,...de]),()=>FS(...de),"translate",Fe=>Reflect.apply(Fe.t,Fe,[...de]),Fe=>Fe,Fe=>pt(Fe))}function ie(...de){const[Fe,ut,Et]=de;if(Et&&!tn(Et))throw is(Tn.INVALID_ARGUMENT);return ee(Fe,ut,po({resolvedMessage:!0},Et||{}))}function ne(...de){return N(Fe=>Reflect.apply(oO,null,[Fe,...de]),()=>DS(...de),"datetime format",Fe=>Reflect.apply(Fe.d,Fe,[...de]),()=>Lm,Fe=>pt(Fe)||Hn(Fe))}function se(...de){return N(Fe=>Reflect.apply(rO,null,[Fe,...de]),()=>TS(...de),"number format",Fe=>Reflect.apply(Fe.n,Fe,[...de]),()=>Lm,Fe=>pt(Fe)||Hn(Fe))}function Q(de){return de.map(Fe=>pt(Fe)||ao(Fe)||sn(Fe)?CO(String(Fe)):Fe)}const Re={normalize:Q,interpolate:de=>de,type:"vnode"};function He(...de){return N(Fe=>{let ut;const Et=Fe;try{Et.processor=Re,ut=Reflect.apply(dO,null,[Et,...de])}finally{Et.processor=null}return ut},()=>FS(...de),"translate",Fe=>Fe[IS](...de),Fe=>[CO(Fe)],Fe=>Hn(Fe))}function Ee(...de){return N(Fe=>Reflect.apply(rO,null,[Fe,...de]),()=>TS(...de),"number format",Fe=>Fe[AS](...de),bO,Fe=>pt(Fe)||Hn(Fe))}function ot(...de){return N(Fe=>Reflect.apply(oO,null,[Fe,...de]),()=>DS(...de),"datetime format",Fe=>Fe[PS](...de),bO,Fe=>pt(Fe)||Hn(Fe))}function vt(de){_=de,T.pluralRules=_}function mt(de,Fe){return N(()=>{if(!de)return!1;const ut=pt(Fe)?Fe:a.value,Et=me(ut),Bt=T.messageResolver(Et,de);return qs(Bt)||Ys(Bt)||pt(Bt)},()=>[de],"translate exists",ut=>Reflect.apply(ut.te,ut,[de,Fe]),NQ,ut=>sn(ut))}function U(de){let Fe=null;const ut=Gk(T,l.value,a.value);for(let Et=0;Et<ut.length;Et++){const Bt=c.value[ut[Et]]||{},bn=T.messageResolver(Bt,de);if(bn!=null){Fe=bn;break}}return Fe}function z(de){const Fe=U(de);return Fe??(t?t.tm(de)||{}:{})}function me(de){return c.value[de]||{}}function Te(de,Fe){if(s){const ut={[de]:Fe};for(const Et in ut)Di(ut,Et)&&sf(ut[Et]);Fe=ut[de]}c.value[de]=Fe,T.messages=c.value}function Ne(de,Fe){c.value[de]=c.value[de]||{};const ut={[de]:Fe};if(s)for(const Et in ut)Di(ut,Et)&&sf(ut[Et]);Fe=ut[de],km(Fe,c.value[de]),T.messages=c.value}function B(de){return u.value[de]||{}}function j(de,Fe){u.value[de]=Fe,T.datetimeFormats=u.value,iO(T,de,Fe)}function ae(de,Fe){u.value[de]=po(u.value[de]||{},Fe),T.datetimeFormats=u.value,iO(T,de,Fe)}function ve(de){return d.value[de]||{}}function Ie(de,Fe){d.value[de]=Fe,T.numberFormats=d.value,lO(T,de,Fe)}function Ue(de,Fe){d.value[de]=po(d.value[de]||{},Fe),T.numberFormats=d.value,lO(T,de,Fe)}SO++,t&&Ri&&(it(t.locale,de=>{r&&(a.value=de,T.locale=de,nf(T,a.value,l.value))}),it(t.fallbackLocale,de=>{r&&(l.value=de,T.fallbackLocale=de,nf(T,a.value,l.value))}));const Le={id:SO,locale:A,fallbackLocale:D,get inheritLocale(){return r},set inheritLocale(de){r=de,de&&t&&(a.value=t.locale.value,l.value=t.fallbackLocale.value,nf(T,a.value,l.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:I,get modifiers(){return R},get pluralRules(){return _||{}},get isGlobal(){return o},get missingWarn(){return h},set missingWarn(de){h=de,T.missingWarn=h},get fallbackWarn(){return f},set fallbackWarn(de){f=de,T.fallbackWarn=f},get fallbackRoot(){return p},set fallbackRoot(de){p=de},get fallbackFormat(){return m},set fallbackFormat(de){m=de,T.fallbackFormat=m},get warnHtmlMessage(){return E},set warnHtmlMessage(de){E=de,T.warnHtmlMessage=de},get escapeParameter(){return C},set escapeParameter(de){C=de,T.escapeParameter=de},t:ee,getLocaleMessage:me,setLocaleMessage:Te,mergeLocaleMessage:Ne,getPostTranslationHandler:Z,setPostTranslationHandler:G,getMissingHandler:te,setMissingHandler:V,[gO]:vt};return Le.datetimeFormats=P,Le.numberFormats=J,Le.rt=ie,Le.te=mt,Le.tm=z,Le.d=ne,Le.n=se,Le.getDateTimeFormat=B,Le.setDateTimeFormat=j,Le.mergeDateTimeFormat=ae,Le.getNumberFormat=ve,Le.setNumberFormat=Ie,Le.mergeNumberFormat=Ue,Le[mO]=n,Le[IS]=He,Le[PS]=ot,Le[AS]=Ee,L.env.NODE_ENV!=="production"&&(Le[Xl]=de=>{T.__v_emitter=de},Le[of]=()=>{T.__v_emitter=void 0}),Le}const _O="vue-i18n: composer properties",NS={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},VQ={"vue-i18n-resource-inspector":"Search for scopes ..."},BQ={"vue-i18n-timeline":16764185};let LS;async function HQ(e,t){return new Promise((n,o)=>{try{PQ({id:"vue-devtools-plugin-vue-i18n",label:NS["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:[_O],app:e},s=>{LS=s,s.on.visitComponentTree(({componentInstance:r,treeNode:a})=>{$Q(r,a,t)}),s.on.inspectComponent(({componentInstance:r,instanceData:a})=>{r.__VUE_I18N__&&a&&(t.mode==="legacy"?r.__VUE_I18N__!==t.global.__composer&&DO(a,r.__VUE_I18N__):DO(a,r.__VUE_I18N__))}),s.addInspector({id:"vue-i18n-resource-inspector",label:NS["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:VQ["vue-i18n-resource-inspector"]}),s.on.getInspectorTree(r=>{r.app===e&&r.inspectorId==="vue-i18n-resource-inspector"&&jQ(r,t)});const i=new Map;s.on.getInspectorState(async r=>{if(r.app===e&&r.inspectorId==="vue-i18n-resource-inspector")if(s.unhighlightElement(),qQ(r,t),r.nodeId==="global"){if(!i.has(r.app)){const[a]=await s.getComponentInstances(r.app);i.set(r.app,a)}s.highlightElement(i.get(r.app))}else{const a=KQ(r.nodeId,t);a&&s.highlightElement(a)}}),s.on.editInspectorState(r=>{r.app===e&&r.inspectorId==="vue-i18n-resource-inspector"&&ZQ(r,t)}),s.addTimelineLayer({id:"vue-i18n-timeline",label:NS["vue-i18n-timeline"],color:BQ["vue-i18n-timeline"]}),n(!0)})}catch(s){console.error(s),o(!1)}})}function RO(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function $Q(e,t,n){const o=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.__VUE_I18N__&&e.__VUE_I18N__!==o){const s={label:`i18n (${RO(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(s)}}function DO(e,t){const n=_O;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:VS(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 VS(e){const t={};return Object.keys(e).forEach(n=>{const o=e[n];En(o)&&"source"in o?t[n]=zQ(o):qs(o)&&o.loc&&o.loc.source?t[n]=o.loc.source:tn(o)?t[n]=VS(o):t[n]=o}),t}const GQ={"<":"<",">":">",'"':""","&":"&"};function UQ(e){return e.replace(/[<>"&]/g,WQ)}function WQ(e){return GQ[e]||e}function zQ(e){return{_custom:{type:"function",display:`<span>ƒ</span> ${e.source?`("${UQ(e.source)}")`:"(?)"}`}}}function jQ(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 i=t.mode==="composition"?s:s.__composer;n!==i&&e.rootNodes.push({id:i.id.toString(),label:`${RO(o)} Scope`})}}function KQ(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 TO(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 qQ(e,t){const n=TO(e.nodeId,t);return n&&(e.state=YQ(n)),null}function YQ(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",i=[{type:s,key:"messages",editable:!1,value:VS(e.messages.value)}];t[s]=i;{const r="Datetime formats info",a=[{type:r,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];t[r]=a;const l="Datetime formats info",c=[{type:l,key:"numberFormats",editable:!1,value:e.numberFormats.value}];t[l]=c}return t}function rf(e,t){if(LS){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),LS.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 ZQ(e,t){const n=TO(e.nodeId,t);if(n){const[o]=e.path;o==="locale"&&pt(e.state.value)?n.locale.value=e.state.value:o==="fallbackLocale"&&(pt(e.state.value)||Hn(e.state.value)||tn(e.state.value))?n.fallbackLocale.value=e.state.value:o==="inheritLocale"&&sn(e.state.value)&&(n.inheritLocale=e.state.value)}}function XQ(e){const t=pt(e.locale)?e.locale:tf,n=pt(e.fallbackLocale)||Hn(e.fallbackLocale)||qt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=En(e.missing)?e.missing:void 0,s=sn(e.silentTranslationWarn)||Pu(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,i=sn(e.silentFallbackWarn)||Pu(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,r=sn(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=qt(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,u=En(e.postTranslation)?e.postTranslation:void 0,d=pt(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,f=sn(e.sync)?e.sync:!0;let p=e.messages;if(qt(e.sharedMessages)){const R=e.sharedMessages;p=Object.keys(R).reduce((T,O)=>{const x=T[O]||(T[O]={});return po(x,R[O]),T},p||{})}const{__i18n:m,__root:v,__injectWithOption:w}=e,b=e.datetimeFormats,E=e.numberFormats,C=e.flatJson;return{locale:t,fallbackLocale:n,messages:p,flatJson:C,datetimeFormats:b,numberFormats:E,missing:o,missingWarn:s,fallbackWarn:i,fallbackRoot:r,fallbackFormat:a,modifiers:l,pluralRules:c,postTranslation:u,warnHtmlMessage:d,escapeParameter:h,messageResolver:e.messageResolver,inheritLocale:f,__i18n:m,__root:v,__injectWithOption:w}}function BS(e={}){const t=MS(XQ(e)),{__extender:n}=e,o={id:t.id,get locale(){return t.locale.value},set locale(s){t.locale.value=s},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(s){t.fallbackLocale.value=s},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(s){t.setMissingHandler(s)},get silentTranslationWarn(){return sn(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(s){t.missingWarn=sn(s)?!s:s},get silentFallbackWarn(){return sn(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(s){t.fallbackWarn=sn(s)?!s:s},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(s){t.fallbackFormat=s},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(s){t.setPostTranslationHandler(s)},get sync(){return t.inheritLocale},set sync(s){t.inheritLocale=s},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){t.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(s){t.escapeParameter=s},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...s){return Reflect.apply(t.t,t,[...s])},rt(...s){return Reflect.apply(t.rt,t,[...s])},te(s,i){return t.te(s,i)},tm(s){return t.tm(s)},getLocaleMessage(s){return t.getLocaleMessage(s)},setLocaleMessage(s,i){t.setLocaleMessage(s,i)},mergeLocaleMessage(s,i){t.mergeLocaleMessage(s,i)},d(...s){return Reflect.apply(t.d,t,[...s])},getDateTimeFormat(s){return t.getDateTimeFormat(s)},setDateTimeFormat(s,i){t.setDateTimeFormat(s,i)},mergeDateTimeFormat(s,i){t.mergeDateTimeFormat(s,i)},n(...s){return Reflect.apply(t.n,t,[...s])},getNumberFormat(s){return t.getNumberFormat(s)},setNumberFormat(s,i){t.setNumberFormat(s,i)},mergeNumberFormat(s,i){t.mergeNumberFormat(s,i)}};return o.__extender=n,L.env.NODE_ENV!=="production"&&(o.__enableEmitter=s=>{const i=t;i[Xl]&&i[Xl](s)},o.__disableEmitter=()=>{const s=t;s[of]&&s[of]()}),o}function JQ(e,t,n){return{beforeCreate(){const o=Lu();if(!o)throw is(Tn.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const i=s.i18n;if(s.__i18n&&(i.__i18n=s.__i18n),i.__root=t,this===this.$root)this.$i18n=FO(e,i);else{i.__injectWithOption=!0,i.__extender=n.__vueI18nExtend,this.$i18n=BS(i);const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=FO(e,s);else{this.$i18n=BS({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&yO(t,s,s),this.$t=(...i)=>this.$i18n.t(...i),this.$rt=(...i)=>this.$i18n.rt(...i),this.$te=(i,r)=>this.$i18n.te(i,r),this.$d=(...i)=>this.$i18n.d(...i),this.$n=(...i)=>this.$i18n.n(...i),this.$tm=i=>this.$i18n.tm(i),n.__setInstance(o,this.$i18n)},mounted(){if(L.env.NODE_ENV!=="production"&&this.$i18n){const o=Lu();if(!o)return;const s=this.$i18n;o.__VUE_I18N__=s.__composer;const i=this.__v_emitter=mS();s.__enableEmitter&&s.__enableEmitter(i),i.on("*",rf)}},unmounted(){const o=Lu();if(!o)throw is(Tn.UNEXPECTED_ERROR);const s=this.$i18n;L.env.NODE_ENV!=="production"&&o.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",rf),delete this.__v_emitter),this.$i18n&&(s.__disableEmitter&&s.__disableEmitter(),delete o.__VUE_I18N__)),delete this.$t,delete this.$rt,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 FO(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[gO](t.pluralizationRules||e.pluralizationRules);const n=OS(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 HS={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function QQ({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,s)=>[...o,...s.type===Ft?s.children:[s]],[]):t.reduce((n,o)=>{const s=e[o];return s&&(n[o]=s()),n},Cn())}function xO(){return Ft}const IO=dt({name:"i18n-t",props:po({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>ao(e)||!isNaN(e)}},HS),setup(e,t){const{slots:n,attrs:o}=t,s=e.i18n||$S({useScope:e.scope,__useComponent:!0});return()=>{const i=Object.keys(n).filter(d=>d[0]!=="_"),r=Cn();e.locale&&(r.locale=e.locale),e.plural!==void 0&&(r.plural=pt(e.plural)?+e.plural:e.plural);const a=QQ(t,i),l=s[IS](e.keypath,a,r),c=po(Cn(),o),u=pt(e.tag)||tn(e.tag)?e.tag:xO();return Lc(u,c,l)}}});function eee(e){return Hn(e)&&!pt(e[0])}function PO(e,t,n,o){const{slots:s,attrs:i}=t;return()=>{const r={part:!0};let a=Cn();e.locale&&(r.locale=e.locale),pt(e.format)?r.key=e.format:tn(e.format)&&(pt(e.format.key)&&(r.key=e.format.key),a=Object.keys(e.format).reduce((h,f)=>n.includes(f)?po(Cn(),h,{[f]:e.format[f]}):h,Cn()));const l=o(e.value,r,a);let c=[r.key];Hn(l)?c=l.map((h,f)=>{const p=s[h.type],m=p?p({[h.type]:h.value,index:f,parts:l}):[h.value];return eee(m)&&(m[0].key=`${h.type}-${f}`),m}):pt(l)&&(c=[l]);const u=po(Cn(),i),d=pt(e.tag)||tn(e.tag)?e.tag:xO();return Lc(d,u,c)}}const AO=dt({name:"i18n-n",props:po({value:{type:Number,required:!0},format:{type:[String,Object]}},HS),setup(e,t){const n=e.i18n||$S({useScope:e.scope,__useComponent:!0});return PO(e,t,aO,(...o)=>n[AS](...o))}});function tee(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 nee(e){const t=r=>{L.env.NODE_ENV!=="production"&&fS(Nu(Zs.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));const{instance:a,value:l}=r;if(!a||!a.$)throw is(Tn.UNEXPECTED_ERROR);const c=tee(e,a.$),u=kO(l);return[Reflect.apply(c.t,c,[...OO(u)]),c]};return{created:(r,a)=>{const[l,c]=t(a);Ri&&e.global===c&&(r.__i18nWatcher=it(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),r.__composer=c,r.textContent=l},unmounted:r=>{Ri&&r.__i18nWatcher&&(r.__i18nWatcher(),r.__i18nWatcher=void 0,delete r.__i18nWatcher),r.__composer&&(r.__composer=void 0,delete r.__composer)},beforeUpdate:(r,{value:a})=>{if(r.__composer){const l=r.__composer,c=kO(a);r.textContent=Reflect.apply(l.t,l,[...OO(c)])}},getSSRProps:r=>{const[a]=t(r);return{textContent:a}}}}function kO(e){if(pt(e))return{path:e};if(qt(e)){if(!("path"in e))throw is(Tn.REQUIRED_VALUE,"path");return e}else throw is(Tn.INVALID_VALUE)}function OO(e){const{path:t,locale:n,args:o,choice:s,plural:i}=e,r={},a=o||{};return pt(n)&&(r.locale=n),ao(s)&&(r.plural=s),ao(i)&&(r.plural=i),[t,a,r]}function oee(e,t,...n){const o=qt(n[0])?n[0]:{};(sn(o.globalInstall)?o.globalInstall:!0)&&([IO.name,"I18nT"].forEach(i=>e.component(i,IO)),[AO.name,"I18nN"].forEach(i=>e.component(i,AO)),[NO.name,"I18nD"].forEach(i=>e.component(i,NO))),e.directive("t",nee(t))}const see=sr("global-vue-i18n");function iee(e={}){const t=__VUE_I18N_LEGACY_API__&&sn(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__;L.env.NODE_ENV!=="production"&&t&&fS(Nu(Zs.DEPRECATE_LEGACY_MODE));const n=sn(e.globalInjection)?e.globalInjection:!0,o=new Map,[s,i]=ree(e,t),r=sr(L.env.NODE_ENV!=="production"?"vue-i18n":"");function a(d){return o.get(d)||null}function l(d,h){o.set(d,h)}function c(d){o.delete(d)}const u={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(d,...h){if(L.env.NODE_ENV!=="production"&&(d.__VUE_I18N__=u),d.__VUE_I18N_SYMBOL__=r,d.provide(d.__VUE_I18N_SYMBOL__,u),qt(h[0])){const m=h[0];u.__composerExtend=m.__composerExtend,u.__vueI18nExtend=m.__vueI18nExtend}let f=null;!t&&n&&(f=pee(d,u.global)),__VUE_I18N_FULL_INSTALL__&&oee(d,u,...h),__VUE_I18N_LEGACY_API__&&t&&d.mixin(JQ(i,i.__composer,u));const p=d.unmount;if(d.unmount=()=>{f&&f(),u.dispose(),p()},L.env.NODE_ENV!=="production"){if(!await HQ(d,u))throw is(Tn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const v=mS();if(t){const w=i;w.__enableEmitter&&w.__enableEmitter(v)}else{const w=i;w[Xl]&&w[Xl](v)}v.on("*",rf)}},get global(){return i},dispose(){s.stop()},__instances:o,__getInstance:a,__setInstance:l,__deleteInstance:c};return u}function $S(e={}){const t=Lu();if(t==null)throw is(Tn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw is(Tn.NOT_INSTALLED);const n=aee(t),o=cee(n),s=vO(t),i=lee(e,s);if(i==="global")return yO(o,e,s),o;if(i==="parent"){let l=uee(n,t,e.__useComponent);return l==null&&(L.env.NODE_ENV!=="production"&&or(Nu(Zs.NOT_FOUND_PARENT_SCOPE)),l=o),l}const r=n;let a=r.__getInstance(t);if(a==null){const l=po({},e);"__i18n"in s&&(l.__i18n=s.__i18n),o&&(l.__root=o),a=MS(l),r.__composerExtend&&(a[kS]=r.__composerExtend(a)),hee(r,t,a),r.__setInstance(t,a)}else L.env.NODE_ENV!=="production"&&i==="local"&&or(Nu(Zs.DUPLICATE_USE_I18N_CALLING));return a}function ree(e,t){const n=Fy(),o=__VUE_I18N_LEGACY_API__&&t?n.run(()=>BS(e)):n.run(()=>MS(e));if(o==null)throw is(Tn.UNEXPECTED_ERROR);return[n,o]}function aee(e){const t=yn(e.isCE?see:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw is(e.isCE?Tn.NOT_INSTALLED_WITH_PROVIDE:Tn.UNEXPECTED_ERROR);return t}function lee(e,t){return Pm(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function cee(e){return e.mode==="composition"?e.global:e.global.__composer}function uee(e,t,n=!1){let o=null;const s=t.root;let i=dee(t,n);for(;i!=null;){const r=e;if(e.mode==="composition")o=r.__getInstance(i);else if(__VUE_I18N_LEGACY_API__){const a=r.__getInstance(i);a!=null&&(o=a.__composer,n&&o&&!o[mO]&&(o=null))}if(o!=null||s===i)break;i=i.parent}return o}function dee(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function hee(e,t,n){let o=null;ln(()=>{if(L.env.NODE_ENV!=="production"){t.__VUE_I18N__=n,o=mS();const s=n;s[Xl]&&s[Xl](o),o.on("*",rf)}},t),Oc(()=>{const s=n;L.env.NODE_ENV!=="production"&&(o&&o.off("*",rf),s[of]&&s[of](),delete t.__VUE_I18N__),e.__deleteInstance(t);const i=s[kS];i&&(i(),delete s[kS])},t)}const fee=["locale","fallbackLocale","availableLocales"],MO=["t","rt","d","n","tm","te"];function pee(e,t){const n=Object.create(null);return fee.forEach(s=>{const i=Object.getOwnPropertyDescriptor(t,s);if(!i)throw is(Tn.UNEXPECTED_ERROR);const r=an(i.value)?{get(){return i.value.value},set(a){i.value.value=a}}:{get(){return i.get&&i.get()}};Object.defineProperty(n,s,r)}),e.config.globalProperties.$i18n=n,MO.forEach(s=>{const i=Object.getOwnPropertyDescriptor(t,s);if(!i||!i.value)throw is(Tn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,i)}),()=>{delete e.config.globalProperties.$i18n,MO.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}const NO=dt({name:"i18n-d",props:po({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},HS),setup(e,t){const n=e.i18n||$S({useScope:e.scope,__useComponent:!0});return PO(e,t,sO,(...o)=>n[PS](...o))}});if(kQ(),oQ(MJ),sQ(JJ),iQ(Gk),L.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=Yl();e.__INTLIFY__=!0,NJ(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}L.env.NODE_ENV;async function gee(){return await Promise.resolve(KA),iee({legacy:!1,locale:"en",fallbackLocale:"en",messages:{en:{errorMessages:KA}}})}const mee=async()=>{const e=await gee();return uZ(e.global),e},vee={style:{color:"#ff5200"}},LO=_t(dt({__name:"ImportVisual",props:{state:{},errorMessage:{},overwrite:{type:Boolean}},setup(e){return(t,n)=>(K(),ue("div",{class:X(t.$style["inform-layout"])},[e.state==="importing"?(K(),ue("div",{key:0,class:X(t.$style["import-error"]),style:{width:"500px"}},[ge(q(lm),{src:"UploadInProgress","max-height":180,"max-width":180})],2)):e.state==="error"?(K(),ue("div",{key:1,class:X(t.$style["import-error"]),style:{width:"500px"}},[ge(q(lm),{src:"Unsuccessful1","max-height":180,"max-width":180}),ye("span",{class:X(t.$style["step-title"])}," File doesn’t meet requirements. Check file and try again. ",2),ye("div",vee,[ye("span",{class:X(t.$style["step-description"])},"Error code",2),ye("span",{class:X(t.$style["step-description"])},St(e.errorMessage),3)])],2)):e.state==="success"?(K(),ue(Ft,{key:2},[ge(q(lm),{src:"Successful1","max-height":180,"max-width":180}),ye("span",{class:X(t.$style["step-title"]),style:{"white-space":"pre-wrap","align-items":"center","text-align":"center"}},St(e.overwrite?`Existing data will be overwritten in the background.
|
|
182
182
|
Refresh to see updates.`:`Work will be created in background.
|
|
183
|
-
Refresh to see updates.`),3)],64)):Je("",!0)],2))}}),[["__cssModules",{$style:{"inform-layout":"_inform-layout_1og33_1","import-error":"_import-error_1og33_11","step-title":"_step-title_1og33_22","step-description":"_step-description_1og33_27"}}]]),VO=_t(dt({__name:"DateRule",setup(e){const n=(()=>{const s=(h,f,p,m)=>{const v=document.createElement("span");return v.textContent=h,v.style.fontWeight=f,v.style.fontSize=p,v.style.color=m,v},i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column";const r=document.createElement("div"),a=document.createElement("div"),l=s("Valid formats:","normal","14px","#02C39A"),c=s("Invalid formats:","normal","14px","#FF5200"),u=s(" 2025.12.31, 2025-12-31, 2025/12/31 ","normal","14px",""),d=s(" 12.31.2025, 2025.31.12","normal","14px","");return r.appendChild(l),r.appendChild(u),a.appendChild(c),a.appendChild(d),i.appendChild(r),i.appendChild(a),i.outerHTML})(),o=cn;return(s,i)=>(K(),ue("div",{class:X(s.$style["date-format-guide"])},[ye("span",{class:X(s.$style["step-title-2"])},[i[0]||(i[0]=et(" Date format guide ",-1)),Xe(ge(q(Ct),{src:"InfoCircle",color:"#A6A6A6"},null,512),[[q(o),{content:q(n)}]])],2),ye("div",{class:X(s.$style["date-rule-section"])},[i[3]||(i[3]=ye("span",null,"Enter dates in one of these formats:",-1)),ye("ul",{class:X(s.$style["step-description"])},[ye("li",{class:X(s.$style["date-rule"])},[...i[1]||(i[1]=[ye("b",null,"DD MM YYYY",-1),et(" (Day-Month-Year) ",-1)])],2),ye("li",{class:X(s.$style["date-rule"])},[...i[2]||(i[2]=[ye("b",null,"YYYY MM DD",-1),et(" (Year-Month-Day) ",-1)])],2)],2)],2)],2))}}),[["__cssModules",{$style:{"date-format-guide":"_date-format-guide_ef59d_1","step-title-2":"_step-title-2_ef59d_13","date-rule-section":"_date-rule-section_ef59d_25","step-description":"_step-description_ef59d_29","date-rule":"_date-rule_ef59d_25"}}]]),yee={key:1},Cee=_t(dt({__name:"PopupCreateScenes",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const o=H(null),s=e,i=()=>{o.value&&o.value.show()},r=H(""),a=H("idle"),l=W(()=>({error:"Import failed",importing:"Import in progress",success:"Import successful",idle:"Create new work"})[a.value]),c=H(null),u=H({file:null,format:null}),{apiServices:d}=mo(!1,s),h=async A=>{var I,P;if(((I=d==null?void 0:d.value)==null?void 0:I.getStatuses)===void 0){console.error("API services not available",(P=d==null?void 0:d.value)==null?void 0:P.getStatuses);return}return await d.value.getStatuses(s.workspaceId,s.entityId,A)},f=H(!1),p=async()=>{f.value=!0;const A=s.workspaceId,D=s.entityId;if(!A||!D||!d.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await d.value.downloadTemplate(A,D))throw new Error("No response from downloadTemplate API")}catch(I){console.error("Error downloading template:",I)}f.value=!1},m=async A=>{var P,J,Z;const D=new FormData,I=((P=A.name.split(".").pop())==null?void 0:P.toString())||"";if(D.append("file",A),D.append("format",I),D.append("entity_id",s.entityId||""),D.append("template_flow_status_id",R.value||""),!d.value||!s.workspaceId||!s.entityId){console.error("API services not available");return}try{await d.value.addNewSceneViaImportFile(s.workspaceId,s.entityId,D),v()}catch(G){throw console.error("Error uploading file:",G),w(((Z=(J=G.response)==null?void 0:J.data)==null?void 0:Z.message)||"An unknown error occurred during file upload."),G}},v=()=>{a.value="success"},w=A=>{r.value=A,a.value="error"},b=n,E=()=>{b("import-success"),x()},C=async()=>{if(!u.value||!u.value.file){console.error("No file to upload");return}a.value="importing",await m(u.value.file)};t({open:i});const R=H(null),_=W(()=>!u.value.file||!u.value.format||!u.value.isValid||!R.value),T=H(null),O=()=>{var A,D;(A=c.value)==null||A.clear(),r.value="",u.value={file:null,format:null},R.value=null,(D=T==null?void 0:T.value)==null||D.clear(),a.value="idle"},x=()=>{var A;O(),(A=o.value)==null||A.hide()};return(A,D)=>(K(),Ke(q(OA),{"popup-name":l.value,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:o,onHidden:O},Ld({default:_e(()=>[a.value==="importing"||a.value==="error"||a.value==="success"?(K(),Ke(LO,{key:0,state:a.value,"error-message":r.value},null,8,["state","error-message"])):(K(),ue("div",yee,[ye("div",{class:X(A.$style["step-section"])},[ye("span",{class:X(A.$style["step-title"])},"Step 1: Download sample file",2),ye("span",{class:X(A.$style["step-description"])}," Get a sample file with all columns ready for editing. ",2),ge(q(yt),{class:X(A.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:f.value,onHandleClick:p},{prefix:_e(()=>[ge(q(Ct),{src:"Download"})]),default:_e(()=>[D[2]||(D[2]=et(" Download sample file ",-1))]),_:1},8,["class","disabled"])],2),ye("div",{class:X(A.$style["step-section"])},[ye("span",{class:X(A.$style["step-title"])},"Step 2: Upload your file (.xlsx, .xls, .csv)",2),ge(q(wk),{modelValue:u.value,"onUpdate:modelValue":D[0]||(D[0]=I=>u.value=I),ref_key:"filUploaderRef",ref:c},null,8,["modelValue"])],2),ye("div",{class:X(A.$style["step-section"])},[ye("span",{class:X(A.$style["step-title"])},"Step 3: Select status",2),ye("span",{class:X(A.$style["step-description"])},"Choose a status for the new work.",2),ge(q(lX),{ref_key:"statusRef",ref:T,modelValue:R.value,"onUpdate:modelValue":D[1]||(D[1]=I=>R.value=I),"get-status-func":h,"workspace-id":s.workspaceId,id:s.entityId},null,8,["modelValue","workspace-id","id"])],2),ye("div",{class:X(A.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[ge(VO)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:_e(()=>[ge(q(yt),{style:{flex:"1"},variant:"secondary",onClick:x},{default:_e(()=>[...D[3]||(D[3]=[et(" Cancel ",-1)])]),_:1}),ge(q(yt),{disabled:_.value,style:{flex:"1"},variant:"primary",onClick:C},{default:_e(()=>[...D[4]||(D[4]=[et(" Import ",-1)])]),_:1},8,["disabled"])]),key:"0"}:a.value==="success"?{name:"footer",fn:_e(()=>[ge(q(yt),{style:{flex:"1"},variant:"primary",onClick:E},{default:_e(()=>[...D[5]||(D[5]=[et(" Close ",-1)])]),_:1})]),key:"1"}:a.value=="error"?{name:"footer",fn:_e(()=>[ge(q(yt),{style:{flex:"1"},variant:"primary",onClick:O},{default:_e(()=>[...D[6]||(D[6]=[et(" Try Again ",-1)])]),_:1})]),key:"2"}:void 0]),1032,["popup-name"]))}}),[["__cssModules",{$style:{"step-section":"_step-section_jt1wo_1","step-title":"_step-title_jt1wo_11","step-title-2":"_step-title-2_jt1wo_17","step-description":"_step-description_jt1wo_23","date-format-guide":"_date-format-guide_jt1wo_28","import-error":"_import-error_jt1wo_39","drop-area":"_drop-area_jt1wo_49","is-dragging":"_is-dragging_jt1wo_49","drop-area-content":"_drop-area-content_jt1wo_52",browse:"_browse_jt1wo_61","download-sample-btn":"_download-sample-btn_jt1wo_65"}}]]),BO={text:Ma,id:void 0,assignees:OY,status:zY,dateRange:MY,isStarted:Ma,isCompleted:Ma,lastUpdated:Ma,completedOn:Ma,isDeleted:Ma,isArchived:Ma,isProcessing:Ma,name:IA,options:Mq,metric:kA,__checkboxSelection:void 0},wee={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},bee={text:null,id:void 0,assignees:CA,status:FA,dateRange:NY,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:IA,options:PA,metric:void 0,__checkboxSelection:void 0},See={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]},Eee={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}},_ee=e=>{if(Number(e.metric_type.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number(e.metric_type.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number(e.metric_type.id)==3)return},Vu=e=>{var t;if(((t=e==null?void 0:e.auth_permission)==null?void 0:t.permission)==2)return _ee(e)};function HO(e,t){var s,i,r,a;const n=(s=t==null?void 0:t.data)==null?void 0:s.permissions;console.log("checkPermissionDisabled",{field:e,cellParam:t,permissions:n});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_","")}`;console.log("check permission for metric field",l,(i=t.data[l])==null?void 0:i.permission),o={disabled:!1,readOnly:((r=t.data[l])==null?void 0:r.permission)!==2&&!((a=t.colDef)!=null&&a.context.formula),type:Vu(t.context)},console.log("metric permission",o)}else if(!n)o={disabled:!1,readOnly:!0,type:void 0};else{const c={assignees:(n==null?void 0:n.has_update_assignee_permission)??0,completedOn:0,name:(n==null?void 0:n.has_edit_date_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,isProcessing:0,lastUpdated:0,id:0,isCompleted:0,options:1}[e]??0;o={disabled:c===-1,readOnly:c!==1,type:void 0}}return o}class af{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 c,u,d;const o=t.data||((c=t.node)==null?void 0:c.data),s=(u=t.colDef)==null?void 0:u.field,i=s&&o?o[s]:void 0,r=HO((d=t.colDef)==null?void 0:d.field,t),a=typeof n=="function"?n(t):n??{};return{...t,value:i,disabled:r==null?void 0:r.disabled,readOnly:r==null?void 0:r.readOnly,type:Vu(t.context),...a}}static resolveRendererComponent(t,n){let o;return t.includes("metric")&&BO.metric?Vu(n)==="rating"?o=LX:o=kA:o=BO[t]??void 0,o}static resolveEditorComponent(t,n){const o=t.includes("metric");let s;const i=Vu(n);return o&&["number","dropdown"].includes(i)?s=uX:s=bee[t],s}static canEditField(t,n){var i;if(n.data===void 0)return!1;const o=HO((i=n.colDef)==null?void 0:i.field,n),s=wee[t]??!0;return!(o!=null&&o.disabled)&&!(o!=null&&o.readOnly)&&s&&(o==null?void 0:o.type)!=="rating"}static resolveSize(t){const[n=200,o=300]=See[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),i=Eee[o]??{},r=Vu(t.context),a=r==="number"||r==="rating",l=r=="rating"?t.context.range*24+20:s.minWidth;return{...t,headerName:t.headerName,...s,...t,cellEditorSelector:u=>{const d=this.resolveEditorComponent(o,t.context);return{component:n(d),params:this.buildCommonCellParams(u,t.cellRendererParams),popup:!a}},singleClickEdit:!0,cellEditorPopup:!a,cellEditorPopupPosition:a?void 0:"under",editable:u=>{let d;return u.data===void 0||u.node.data===void 0?d=!1:d=this.canEditField(o,u),d},minWidth:l,cellRendererSelector:u=>({component:n(this.resolveRendererComponent(o,t.context)),params:this.buildCommonCellParams(u,t.cellRendererParams)}),headerComponentParams:this.buildHeaderComponentParams(t.headerComponentParams),...i,cellClass:u=>`${r}--${u.colDef.field}`}}}go(af,"wrappers",null);const Ree=_t(dt({__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}},setup(e){const t=W(()=>o.value=="MoreOption"?"100%":`${Math.floor(Math.random()*31)+60}%`),n=e,o=W(()=>{var a;return((a=n.component)==null?void 0:a.name)||"UnknownComponent"}),s=W(()=>{var a;return((a=n.component)==null?void 0:a.default)||n.component}),i=W(()=>o.value=="EmptyData"||"eGridHeader"in n.params?!1:o.value=="MoreOption"||o.value=="MoreOptionEditor"?!n.params.data:n.value===void 0),r=W(()=>({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}));return(a,l)=>i.value?(K(),ue("div",{key:0,style:pn({"--width":t.value}),class:X(a.$style.skeleton)},[ye("div",{class:X(a.$style.shimmer)},null,2)],6)):(K(),Ke(HR(s.value),Dy(Jt({key:1},r.value)),null,16))}}),[["__cssModules",{$style:{skeleton:"_skeleton_pqal2_1","skeleton-loading":"_skeleton-loading_pqal2_1",shimmer:"_shimmer_pqal2_15"}}]]);function Dee(e){return"stopEditing"in e}const Tee=8;function $O(e){return class{constructor(){go(this,"container");go(this,"vNode",null);go(this,"componentInstance",null);go(this,"params");go(this,"isEditor",!1);go(this,"_destroyed",!1)}init(n){var l,c,u;if(!n){console.error("[Vue3CellWrapper] Missing params");return}const o=performance.now();this.params=n,this.isEditor=Dee(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,i=n,r={component:e,params:Object.freeze(n),disabled:!1,readOnly:i.readOnly??!1,value:n.value,maxRating:i.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:i.tooltip??void 0,isSearching:i.isSearching??!1,isFiltering:i.isFiltering??!1,isNoData:i.isNoData??!1};this.vNode=ge(Ree,r),lD(this.vNode,this.container);const a=performance.now()-o;a>Tee&&console.warn(`[Vue3CellWrapper] Slow render (${a.toFixed(1)}ms) for "${(c=n.colDef)==null?void 0:c.field}"`),this.componentInstance=(u=this.vNode.component)==null?void 0:u.proxy}getGui(){return this.container}refresh(n){return!0}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 r,a,l,c,u;const o=(l=(a=(r=this.params)==null?void 0:r.colDef)==null?void 0:a.field)==null?void 0:l.includes("metric"),s=((c=this.params)==null?void 0:c.context)&&Vu(this.params.context);return o||(s==="number"||s==="rating")||!this.isEditor?!1:(u=this.componentInstance)!=null&&u.isPopup?this.componentInstance.isPopup():!0}getPopupPosition(){var o,s,i;return this.isEditor?(o=this.componentInstance)!=null&&o.getPopupPosition?this.componentInstance.getPopupPosition():((i=(s=this.params)==null?void 0:s.colDef)==null?void 0:i.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{lD(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 Bm(e){return $O(e)}function GO(e){return $O(e)}var Jl=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()},i=this.getListeners(n,t,!1);if(((i==null?void 0:i.size)??0)>0){const a=new Set(i);for(const l of a)i!=null&&i.has(l)&&s(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);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 Xr(e){return e==null||e===""?null:e}function st(e){return e!=null&&e!==""}function An(e){return!st(e)}function GS(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function lf(e,t){const n=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return n===o}function Fee(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 i(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!n)return i(e,t);try{return e.localeCompare(t)}catch{return i(e,t)}}var xee=/[&<>"']/g,Iee={"&":"&","<":"<",">":">",'"':""","'":"'"};function Bu(e){return(e==null?void 0:e.toString().toString())??null}function cf(e){var t;return((t=Bu(e))==null?void 0:t.replace(xee,n=>Iee[n]))??null}function ar(e){return e.eRootDiv.getRootNode()}function Nn(e){return ar(e).activeElement}function yo(e){const{gos:t,eRootDiv:n}=e;let o=null;const s=t.get("getDocument");return s&&st(s)?o=s():n&&(o=n.ownerDocument),o&&st(o)?o:document}function UO(e){const t=Nn(e);return t===null||t===yo(e).body}function WO(e){return yo(e).defaultView||window}function US(e){let t=null,n=null;try{t=yo(e).fullscreenElement}catch{}finally{t||(t=ar(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 Pee(e){const t=US(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function Aee(e){const t=US(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Ti(e,t,n){n==null||typeof n=="string"&&n==""?zO(e,t):Xs(e,t,n)}function Xs(e,t,n){e.setAttribute(jO(t),n.toString())}function zO(e,t){e.removeAttribute(jO(t))}function jO(e){return`aria-${e}`}function Ga(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function kee(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Oee(e){return e.getAttribute("aria-label")}function Hu(e,t){Ti(e,"label",t)}function uf(e,t){Ti(e,"labelledby",t)}function KO(e,t){Ti(e,"live",t)}function Mee(e,t){Ti(e,"atomic",t)}function Nee(e,t){Ti(e,"relevant",t)}function Lee(e,t){Ti(e,"invalid",t)}function Vee(e,t){Ti(e,"disabled",t)}function qO(e,t){Ti(e,"hidden",t)}function WS(e,t){Xs(e,"expanded",t)}function Bee(e,t){Xs(e,"setsize",t)}function Hee(e,t){Xs(e,"posinset",t)}function $ee(e,t){Xs(e,"multiselectable",t)}function Gee(e,t){Xs(e,"rowcount",t)}function Hm(e,t){Xs(e,"rowindex",t)}function Uee(e,t){Xs(e,"rowspan",t)}function Wee(e,t){Xs(e,"colcount",t)}function YO(e,t){Xs(e,"colindex",t)}function zee(e,t){Xs(e,"colspan",t)}function jee(e,t){Xs(e,"sort",t)}function Kee(e){zO(e,"sort")}function ZO(e,t){Ti(e,"selected",t)}function qee(e,t){Ti(e,"controls",t)}function Yee(e,t){qee(e,t.id),uf(t,e.id)}function XO(e,t){Ti(e,"owns",t)}function $m(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Zee="[tabindex], input, select, button, textarea, [href]",JO="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function df(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(JO)?!1:lr(e)}function kn(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-hidden",!t),o||qO(e,!t)}function Xee(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-invisible",!t),o||qO(e,!t)}function hf(e,t){const n="disabled",o=t?i=>i.setAttribute(n,""):i=>i.removeAttribute(n);o(e);const s=e.querySelectorAll("input")??[];for(const i of s)o(i)}function Ql(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 ec(e){const{height:t,width:n,borderTopWidth:o,borderRightWidth:s,borderBottomWidth:i,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:u,marginTop:d,marginRight:h,marginBottom:f,marginLeft:p,boxSizing:m}=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(i||"0"),borderLeftWidth:v(r||"0"),paddingTop:v(a||"0"),paddingRight:v(l||"0"),paddingBottom:v(c||"0"),paddingLeft:v(u||"0"),marginTop:v(d||"0"),marginRight:v(h||"0"),marginBottom:v(f||"0"),marginLeft:v(p||"0"),boxSizing:m}}function zS(e){const t=ec(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function ff(e){const t=ec(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function QO(e){const{height:t,marginBottom:n,marginTop:o}=ec(e);return Math.floor(t+n+o)}function Gm(e){const{width:t,marginLeft:n,marginRight:o}=ec(e);return Math.floor(t+n+o)}function eM(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:o,borderRightWidth:s,borderBottomWidth:i}=ec(e);return{top:t.top+(n||0),left:t.left+(o||0),right:t.right+(s||0),bottom:t.bottom+(i||0)}}function Um(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function Wm(e,t,n){n&&(t*=-1),e.scrollLeft=t}function Do(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function Fi(e){e!=null&&e.parentNode&&e.remove()}function tM(e){return!!e.offsetParent}function lr(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!tM(e)||window.getComputedStyle(e).visibility!=="visible")}function jS(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function nM(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 oM(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 Jee(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function pf(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=Jee(n),i=o.toString(),r=i.replace(/\s*!important/g,""),a=r.length!=i.length?"important":void 0;e.style.setProperty(s,r,a)}}function zm(e){return()=>{const t=e();return t?KS(t)||sM(t):!0}}function KS(e){return e.clientWidth<e.scrollWidth}function sM(e){return e.clientHeight<e.scrollHeight}function jm(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):cr(e,t)}function cr(e,t){t=qS(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function gf(e,t){t=qS(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function qS(e){return typeof e=="number"?`${e}px`:e}function YS(e){return e instanceof Node||e instanceof HTMLElement}function Fs(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Ua(e,t,n){const s=WO(e).ResizeObserver,i=s?new s(n):null;return i==null||i.observe(t),()=>i==null?void 0:i.disconnect()}function Jr(e,t){const n=WO(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var iM="data-ref",ZS;function rM(){return ZS??(ZS=document.createTextNode(" ")),ZS.cloneNode()}function mf(e){const{attrs:t,children:n,cls:o,ref:s,role:i,tag:r}=e,a=document.createElement(r);if(o&&(a.className=o),s&&a.setAttribute(iM,s),i&&a.setAttribute("role",i),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 c of n)c&&(typeof c=="string"?(a.appendChild(document.createTextNode(c)),l=!1):typeof c=="function"?a.appendChild(c()):(l&&(a.appendChild(rM()),l=!1),a.append(mf(c)),a.appendChild(rM())))}return a}var Qee=["touchstart","touchend","touchmove","touchcancel","scroll"],ete=["wheel"],XS={},aM=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof XS[n]=="boolean")return XS[n];const o=document.createElement(e[n]||"div");return n="on"+n,XS[n]=n in o}})();function tte(e,t){return!t||!e?!1:ote(t).indexOf(e)>=0}function nte(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function ote(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():nte(t)}function ste(e,t,n){const o=ite(t);let s;o!=null&&(s={passive:o}),e.addEventListener(t,n,s)}var ite=e=>{const t=Qee.includes(e),n=ete.includes(e);if(t)return!0;if(n)return!1};function lM(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 vf=(e,t)=>{const n=e.identifier;for(let o=0,s=t.length;o<s;++o){const i=t[o];if(i.identifier===n)return i}return null};function yf(e,t){return e.gos.isElementInThisInstance(t.target)}function rte(e,t,n){const s=e.getBoundingClientRect().height,i=Pee(n)-2,r=Aee(n)-2;if(!e.offsetParent)return;const l=eM(e.offsetParent),{clientY:c,clientX:u}=t;let d=c-l.top-s/2,h=u-l.left-10;const f=yo(n),p=f.defaultView||window,m=p.pageYOffset||f.documentElement.scrollTop,v=p.pageXOffset||f.documentElement.scrollLeft;i>0&&h+e.clientWidth>i+v&&(h=i+v-e.clientWidth),h<0&&(h=0),r>0&&d+e.clientHeight>r+m&&(d=r+m-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var Km=(e,...t)=>{for(const n of t){const[o,s,i,r]=n;o.addEventListener(s,i,r),e.push(n)}},JS=e=>{if(e){for(const[t,n,o,s]of e)t.removeEventListener(n,o,s);e.length=0}},Wa=e=>{e.cancelable&&e.preventDefault()};function ate(e,t){return t}function cM(e){return(e==null?void 0:e.getLocaleTextFunc())??ate}function lte(e,t,n,o){const s=t[n];return e.getLocaleTextFunc()(n,typeof s=="function"?s(o):s,o)}function cte(e){return(t,n,o)=>e({key:t,defaultValue:n,variableValues:o})}function ute(e){return(t,n,o)=>{let s=e==null?void 0:e[t];if(s&&(o!=null&&o.length)){let i=0;for(;!(i>=o.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",o[i++])}return s??n}}var ur=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 Jl),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(dte(e))e.__addEventListener(t,n),o=()=>(e.__removeEventListener(t,n),null);else{const s=hte(e);e instanceof HTMLElement?ste(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 i={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(i)};for(const s of e)this.setupPropertyListener(s,o)}getLocaleTextFunc(){return cM(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 dte(e){return e.__addEventListener!==void 0}function hte(e){return e.eventServiceType==="global"}var Ve=class extends ur{},uM={};function QS(e,t){uM[t]||(e(),uM[t]=!0)}var fte={pending:!1,funcs:[]},pte={pending:!1,funcs:[]};function e0(e,t="setTimeout",n){const o=t==="raf"?pte:fte;if(o.funcs.push(e),o.pending)return;o.pending=!0;const s=()=>{const i=o.funcs.slice();o.funcs.length=0,o.pending=!1;for(const r of i)r()};t==="raf"?Jr(n,s):window.setTimeout(s,0)}function To(e,t,n){let o;return function(...s){const i=this;window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(i,s)},n)}}function dM(e,t){let n=0;return function(...o){const s=this,i=Date.now();i-n<t||(n=i,e.apply(s,o))}}function gte(e,t,n,o=100){const s=Date.now();let i=null,r=!1;const a=()=>{i!=null&&(window.clearInterval(i),i=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-s>o;(t()||c)&&(n(),r=!0,a())};l(),r||(i=window.setInterval(l,10))}var hM=new Set(["__proto__","constructor","prototype"]);function mte(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=>!hM.has(o)))t(n,e[n])}}function Zo(e,t,n=!0,o=!1){st(t)&&mte(t,(s,i)=>{let r=e[s];r!==i&&(o&&r==null&&i!=null&&typeof i=="object"&&i.constructor===Object&&(r={},e[s]=r),fM(i)&&fM(r)&&!Array.isArray(r)?Zo(r,i,n,o):(n||i!==void 0)&&(e[s]=i))})}function fM(e){return typeof e=="object"&&e!==null}var t0=class ga{static applyGlobalGridOptions(t){if(!ga.gridOptions)return{...t};let n={};return Zo(n,ga.gridOptions,!0,!0),ga.mergeStrategy==="deep"?Zo(n,t,!0,!0):n={...n,...t},ga.gridOptions.context&&(n.context=ga.gridOptions.context),t.context&&(ga.mergeStrategy==="deep"&&n.context&&Zo(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(ga.mergeStrategy==="deep"){const o=vte(t);if(o&&typeof o=="object"&&typeof n=="object")return ga.applyGlobalGridOptions({[t]:n})[t]}return n}};t0.gridOptions=void 0,t0.mergeStrategy="shallow";var n0=t0;function vte(e){var t;return(t=n0.gridOptions)==null?void 0:t[e]}var yte={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},pM="https://www.ag-grid.com";function za(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function Cf(e,...t){QS(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function $u(e,...t){QS(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var gM=new Set,qm={},Gu={},Ym,mM=!1,vM=!1,Cte=!1;function wte(e){const[t,n]=e.version.split(".")||[],[o,s]=Ym.split(".")||[];return t===o&&n===s}function bte(e){var o;Ym||(Ym=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?wte(e)||$u(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Ym}.`)):$u(t(`'${e.moduleName}' is incompatible.`));const n=(o=e.validate)==null?void 0:o.call(e);n&&!n.isValid&&$u(`${n.message}`)}function wf(e,t,n=!1){n||(mM=!0),bte(e);const o=e.rowModels??["all"];gM.add(e);let s;t!==void 0?(vM=!0,Gu[t]===void 0&&(Gu[t]={}),s=Gu[t]):s=qm;for(const i of o)s[i]===void 0&&(s[i]={}),s[i][e.moduleName]=e;if(e.dependsOn)for(const i of e.dependsOn)wf(i,t,n)}function Ste(e){delete Gu[e]}function o0(e,t,n){const o=s=>{var i,r,a;return!!((i=qm[s])!=null&&i[e])||!!((a=(r=Gu[t])==null?void 0:r[s])!=null&&a[e])};return o(n)||o("all")}function s0(){return vM}function Ete(e,t){const n=Gu[e]??{};return[...Object.values(qm.all??{}),...Object.values(n.all??{}),...Object.values(qm[t]??{}),...Object.values(n[t]??{})]}function _te(){return new Set(gM)}function Rte(){return mM}function Dte(){return Cte}var Tte=class{static register(e){wf(e,void 0)}static registerModules(e){for(const t of e)wf(t,void 0)}},tt="34.3.1",yM=2e3,CM=100,wM="_version_",Zm=null,Uu=`${pM}/javascript-data-grid`;function Fte(e){Zm=e}function xte(e){Uu=e}function bM(e,t,n){return(Zm==null?void 0:Zm(e,t))??[kte(e,t,n)]}function i0(e,t,n,o,s){e(`${o?"warning":"error"} #${t}`,...bM(t,n,s))}function Ite(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 Pte(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=Ite(e)),t}function Xm(e){return e===void 0?"undefined":e===null?"null":e}function r0(e,t){return`${e}?${t.toString()}`}function Ate(e,t,n){const o=Array.from(t.entries()).sort((i,r)=>r[1].length-i[1].length);let s=r0(e,t);for(const[i,r]of o){if(i===wM)continue;const a=s.length-n;if(a<=0)break;const l="...",c=a+l.length,u=r.length-c>CM?r.slice(0,r.length-c)+l:r.slice(0,CM)+l;t.set(i,u),s=r0(e,t)}return s}function SM(e,t){const n=new URLSearchParams;if(n.append(wM,tt),t)for(const i of Object.keys(t))n.append(i,Pte(t[i]));const o=`${Uu}/errors/${e}`,s=r0(o,n);return s.length<=yM?s:Ate(o,n,yM)}var kte=(e,t,n)=>{const o=SM(e,t);return`${`${n?n+`
|
|
183
|
+
Refresh to see updates.`),3)],64)):Je("",!0)],2))}}),[["__cssModules",{$style:{"inform-layout":"_inform-layout_1og33_1","import-error":"_import-error_1og33_11","step-title":"_step-title_1og33_22","step-description":"_step-description_1og33_27"}}]]),VO=_t(dt({__name:"DateRule",setup(e){const n=(()=>{const s=(h,f,p,m)=>{const v=document.createElement("span");return v.textContent=h,v.style.fontWeight=f,v.style.fontSize=p,v.style.color=m,v},i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column";const r=document.createElement("div"),a=document.createElement("div"),l=s("Valid formats:","normal","14px","#02C39A"),c=s("Invalid formats:","normal","14px","#FF5200"),u=s(" 2025.12.31, 2025-12-31, 2025/12/31 ","normal","14px",""),d=s(" 12.31.2025, 2025.31.12","normal","14px","");return r.appendChild(l),r.appendChild(u),a.appendChild(c),a.appendChild(d),i.appendChild(r),i.appendChild(a),i.outerHTML})(),o=cn;return(s,i)=>(K(),ue("div",{class:X(s.$style["date-format-guide"])},[ye("span",{class:X(s.$style["step-title-2"])},[i[0]||(i[0]=et(" Date format guide ",-1)),Xe(ge(q(Ct),{src:"InfoCircle",color:"#A6A6A6"},null,512),[[q(o),{content:q(n)}]])],2),ye("div",{class:X(s.$style["date-rule-section"])},[i[3]||(i[3]=ye("span",null,"Enter dates in one of these formats:",-1)),ye("ul",{class:X(s.$style["step-description"])},[ye("li",{class:X(s.$style["date-rule"])},[...i[1]||(i[1]=[ye("b",null,"DD MM YYYY",-1),et(" (Day-Month-Year) ",-1)])],2),ye("li",{class:X(s.$style["date-rule"])},[...i[2]||(i[2]=[ye("b",null,"YYYY MM DD",-1),et(" (Year-Month-Day) ",-1)])],2)],2)],2)],2))}}),[["__cssModules",{$style:{"date-format-guide":"_date-format-guide_ef59d_1","step-title-2":"_step-title-2_ef59d_13","date-rule-section":"_date-rule-section_ef59d_25","step-description":"_step-description_ef59d_29","date-rule":"_date-rule_ef59d_25"}}]]),yee={key:1},Cee=_t(dt({__name:"PopupCreateScenes",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const o=H(null),s=e,i=()=>{o.value&&o.value.show()},r=H(""),a=H("idle"),l=W(()=>({error:"Import failed",importing:"Import in progress",success:"Import successful",idle:"Create new work"})[a.value]),c=H(null),u=H({file:null,format:null}),{apiServices:d}=mo(!1,s),h=async A=>{var I,P;if(((I=d==null?void 0:d.value)==null?void 0:I.getStatuses)===void 0){console.error("API services not available",(P=d==null?void 0:d.value)==null?void 0:P.getStatuses);return}return await d.value.getStatuses(s.workspaceId,s.entityId,A)},f=H(!1),p=async()=>{f.value=!0;const A=s.workspaceId,D=s.entityId;if(!A||!D||!d.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await d.value.downloadTemplate(A,D))throw new Error("No response from downloadTemplate API")}catch(I){console.error("Error downloading template:",I)}f.value=!1},m=async A=>{var P,J,Z;const D=new FormData,I=((P=A.name.split(".").pop())==null?void 0:P.toString())||"";if(D.append("file",A),D.append("format",I),D.append("entity_id",s.entityId||""),D.append("template_flow_status_id",R.value||""),!d.value||!s.workspaceId||!s.entityId){console.error("API services not available");return}try{await d.value.addNewSceneViaImportFile(s.workspaceId,s.entityId,D),v()}catch(G){throw console.error("Error uploading file:",G),w(((Z=(J=G.response)==null?void 0:J.data)==null?void 0:Z.message)||"An unknown error occurred during file upload."),G}},v=()=>{a.value="success"},w=A=>{r.value=A,a.value="error"},b=n,E=()=>{b("import-success"),x()},C=async()=>{if(!u.value||!u.value.file){console.error("No file to upload");return}a.value="importing",await m(u.value.file)};t({open:i});const R=H(null),_=W(()=>!u.value.file||!u.value.format||!u.value.isValid||!R.value),T=H(null),O=()=>{var A,D;(A=c.value)==null||A.clear(),r.value="",u.value={file:null,format:null},R.value=null,(D=T==null?void 0:T.value)==null||D.clear(),a.value="idle"},x=()=>{var A;O(),(A=o.value)==null||A.hide()};return(A,D)=>(K(),Ke(q(OA),{"popup-name":l.value,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:o,onHidden:O},Ld({default:_e(()=>[a.value==="importing"||a.value==="error"||a.value==="success"?(K(),Ke(LO,{key:0,state:a.value,"error-message":r.value},null,8,["state","error-message"])):(K(),ue("div",yee,[ye("div",{class:X(A.$style["step-section"])},[ye("span",{class:X(A.$style["step-title"])},"Step 1: Download sample file",2),ye("span",{class:X(A.$style["step-description"])}," Get a sample file with all columns ready for editing. ",2),ge(q(yt),{class:X(A.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:f.value,onHandleClick:p},{prefix:_e(()=>[ge(q(Ct),{src:"Download"})]),default:_e(()=>[D[2]||(D[2]=et(" Download sample file ",-1))]),_:1},8,["class","disabled"])],2),ye("div",{class:X(A.$style["step-section"])},[ye("span",{class:X(A.$style["step-title"])},"Step 2: Upload your file (.xlsx, .xls, .csv)",2),ge(q(wk),{modelValue:u.value,"onUpdate:modelValue":D[0]||(D[0]=I=>u.value=I),ref_key:"filUploaderRef",ref:c},null,8,["modelValue"])],2),ye("div",{class:X(A.$style["step-section"])},[ye("span",{class:X(A.$style["step-title"])},"Step 3: Select status",2),ye("span",{class:X(A.$style["step-description"])},"Choose a status for the new work.",2),ge(q(lX),{ref_key:"statusRef",ref:T,modelValue:R.value,"onUpdate:modelValue":D[1]||(D[1]=I=>R.value=I),"get-status-func":h,"workspace-id":s.workspaceId,id:s.entityId},null,8,["modelValue","workspace-id","id"])],2),ye("div",{class:X(A.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[ge(VO)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:_e(()=>[ge(q(yt),{style:{flex:"1"},variant:"secondary",onClick:x},{default:_e(()=>[...D[3]||(D[3]=[et(" Cancel ",-1)])]),_:1}),ge(q(yt),{disabled:_.value,style:{flex:"1"},variant:"primary",onClick:C},{default:_e(()=>[...D[4]||(D[4]=[et(" Import ",-1)])]),_:1},8,["disabled"])]),key:"0"}:a.value==="success"?{name:"footer",fn:_e(()=>[ge(q(yt),{style:{flex:"1"},variant:"primary",onClick:E},{default:_e(()=>[...D[5]||(D[5]=[et(" Close ",-1)])]),_:1})]),key:"1"}:a.value=="error"?{name:"footer",fn:_e(()=>[ge(q(yt),{style:{flex:"1"},variant:"primary",onClick:O},{default:_e(()=>[...D[6]||(D[6]=[et(" Try Again ",-1)])]),_:1})]),key:"2"}:void 0]),1032,["popup-name"]))}}),[["__cssModules",{$style:{"step-section":"_step-section_jt1wo_1","step-title":"_step-title_jt1wo_11","step-title-2":"_step-title-2_jt1wo_17","step-description":"_step-description_jt1wo_23","date-format-guide":"_date-format-guide_jt1wo_28","import-error":"_import-error_jt1wo_39","drop-area":"_drop-area_jt1wo_49","is-dragging":"_is-dragging_jt1wo_49","drop-area-content":"_drop-area-content_jt1wo_52",browse:"_browse_jt1wo_61","download-sample-btn":"_download-sample-btn_jt1wo_65"}}]]),BO={text:Ma,id:void 0,assignees:OY,status:zY,dateRange:MY,isStarted:Ma,isCompleted:Ma,lastUpdated:Ma,completedOn:Ma,isDeleted:Ma,isArchived:Ma,isProcessing:Ma,name:IA,options:Mq,metric:kA,__checkboxSelection:void 0},wee={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},bee={text:null,id:void 0,assignees:CA,status:FA,dateRange:NY,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:IA,options:PA,metric:void 0,__checkboxSelection:void 0},See={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]},Eee={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}},_ee=e=>{if(Number(e.metric_type.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number(e.metric_type.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number(e.metric_type.id)==3)return},Vu=e=>{var t;if(((t=e==null?void 0:e.auth_permission)==null?void 0:t.permission)==2)return _ee(e)};function HO(e,t){var s,i,r;const n=(s=t==null?void 0:t.data)==null?void 0:s.permissions;console.log("checkPermissionDisabled",{field:e,cellParam:t,permissions:n});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 a=`metric_permission_${e==null?void 0:e.replace("metric_","")}`;o={disabled:!1,readOnly:((i=t.data[a])==null?void 0:i.permission)!==2&&!((r=t.colDef)!=null&&r.context.formula),type:Vu(t.context)}}else if(!n)o={disabled:!1,readOnly:!0,type:void 0};else{const l={assignees:(n==null?void 0:n.has_update_assignee_permission)??0,completedOn:0,name:(n==null?void 0:n.has_edit_date_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,isProcessing:0,lastUpdated:0,id:0,isCompleted:0,options:1}[e]??0;o={disabled:l===-1,readOnly:l!==1,type:void 0}}return o}class af{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 c,u,d;const o=t.data||((c=t.node)==null?void 0:c.data),s=(u=t.colDef)==null?void 0:u.field,i=s&&o?o[s]:void 0,r=HO((d=t.colDef)==null?void 0:d.field,t),a=typeof n=="function"?n(t):n??{};return{...t,value:i,disabled:r==null?void 0:r.disabled,readOnly:r==null?void 0:r.readOnly,type:Vu(t.context),...a}}static resolveRendererComponent(t,n){let o;return t.includes("metric")&&BO.metric?Vu(n)==="rating"?o=LX:o=kA:o=BO[t]??void 0,o}static resolveEditorComponent(t,n){const o=t.includes("metric");let s;const i=Vu(n);return o&&["number","dropdown"].includes(i)?s=uX:s=bee[t],s}static canEditField(t,n){var i;if(n.data===void 0)return!1;const o=HO((i=n.colDef)==null?void 0:i.field,n),s=wee[t]??!0;return!(o!=null&&o.disabled)&&!(o!=null&&o.readOnly)&&s&&(o==null?void 0:o.type)!=="rating"}static resolveSize(t){const[n=200,o=300]=See[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),i=Eee[o]??{},r=Vu(t.context),a=r==="number"||r==="rating",l=r=="rating"?t.context.range*24+20:s.minWidth;return{...t,headerName:t.headerName,...s,...t,cellEditorSelector:u=>{const d=this.resolveEditorComponent(o,t.context);return{component:n(d),params:this.buildCommonCellParams(u,t.cellRendererParams),popup:!a}},singleClickEdit:!0,cellEditorPopup:!a,cellEditorPopupPosition:a?void 0:"under",editable:u=>{let d;return u.data===void 0||u.node.data===void 0?d=!1:d=this.canEditField(o,u),d},minWidth:l,cellRendererSelector:u=>({component:n(this.resolveRendererComponent(o,t.context)),params:this.buildCommonCellParams(u,t.cellRendererParams)}),headerComponentParams:this.buildHeaderComponentParams(t.headerComponentParams),...i,cellClass:u=>`${r}--${u.colDef.field}`}}}go(af,"wrappers",null);const Ree=_t(dt({__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}},setup(e){const t=W(()=>o.value=="MoreOption"?"100%":`${Math.floor(Math.random()*31)+60}%`),n=e,o=W(()=>{var a;return((a=n.component)==null?void 0:a.name)||"UnknownComponent"}),s=W(()=>{var a;return((a=n.component)==null?void 0:a.default)||n.component}),i=W(()=>o.value=="EmptyData"||"eGridHeader"in n.params?!1:o.value=="MoreOption"||o.value=="MoreOptionEditor"?!n.params.data:n.value===void 0),r=W(()=>({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}));return(a,l)=>i.value?(K(),ue("div",{key:0,style:pn({"--width":t.value}),class:X(a.$style.skeleton)},[ye("div",{class:X(a.$style.shimmer)},null,2)],6)):(K(),Ke(HR(s.value),Dy(Jt({key:1},r.value)),null,16))}}),[["__cssModules",{$style:{skeleton:"_skeleton_pqal2_1","skeleton-loading":"_skeleton-loading_pqal2_1",shimmer:"_shimmer_pqal2_15"}}]]);function Dee(e){return"stopEditing"in e}const Tee=8;function $O(e){return class{constructor(){go(this,"container");go(this,"vNode",null);go(this,"componentInstance",null);go(this,"params");go(this,"isEditor",!1);go(this,"_destroyed",!1)}init(n){var l,c,u;if(!n){console.error("[Vue3CellWrapper] Missing params");return}const o=performance.now();this.params=n,this.isEditor=Dee(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,i=n,r={component:e,params:Object.freeze(n),disabled:!1,readOnly:i.readOnly??!1,value:n.value,maxRating:i.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:i.tooltip??void 0,isSearching:i.isSearching??!1,isFiltering:i.isFiltering??!1,isNoData:i.isNoData??!1};this.vNode=ge(Ree,r),lD(this.vNode,this.container);const a=performance.now()-o;a>Tee&&console.warn(`[Vue3CellWrapper] Slow render (${a.toFixed(1)}ms) for "${(c=n.colDef)==null?void 0:c.field}"`),this.componentInstance=(u=this.vNode.component)==null?void 0:u.proxy}getGui(){return this.container}refresh(n){return!0}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 r,a,l,c,u;const o=(l=(a=(r=this.params)==null?void 0:r.colDef)==null?void 0:a.field)==null?void 0:l.includes("metric"),s=((c=this.params)==null?void 0:c.context)&&Vu(this.params.context);return o||(s==="number"||s==="rating")||!this.isEditor?!1:(u=this.componentInstance)!=null&&u.isPopup?this.componentInstance.isPopup():!0}getPopupPosition(){var o,s,i;return this.isEditor?(o=this.componentInstance)!=null&&o.getPopupPosition?this.componentInstance.getPopupPosition():((i=(s=this.params)==null?void 0:s.colDef)==null?void 0:i.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{lD(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 Bm(e){return $O(e)}function GO(e){return $O(e)}var Jl=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()},i=this.getListeners(n,t,!1);if(((i==null?void 0:i.size)??0)>0){const a=new Set(i);for(const l of a)i!=null&&i.has(l)&&s(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);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 Xr(e){return e==null||e===""?null:e}function st(e){return e!=null&&e!==""}function An(e){return!st(e)}function GS(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function lf(e,t){const n=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return n===o}function Fee(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 i(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!n)return i(e,t);try{return e.localeCompare(t)}catch{return i(e,t)}}var xee=/[&<>"']/g,Iee={"&":"&","<":"<",">":">",'"':""","'":"'"};function Bu(e){return(e==null?void 0:e.toString().toString())??null}function cf(e){var t;return((t=Bu(e))==null?void 0:t.replace(xee,n=>Iee[n]))??null}function ar(e){return e.eRootDiv.getRootNode()}function Nn(e){return ar(e).activeElement}function yo(e){const{gos:t,eRootDiv:n}=e;let o=null;const s=t.get("getDocument");return s&&st(s)?o=s():n&&(o=n.ownerDocument),o&&st(o)?o:document}function UO(e){const t=Nn(e);return t===null||t===yo(e).body}function WO(e){return yo(e).defaultView||window}function US(e){let t=null,n=null;try{t=yo(e).fullscreenElement}catch{}finally{t||(t=ar(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 Pee(e){const t=US(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function Aee(e){const t=US(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Ti(e,t,n){n==null||typeof n=="string"&&n==""?zO(e,t):Xs(e,t,n)}function Xs(e,t,n){e.setAttribute(jO(t),n.toString())}function zO(e,t){e.removeAttribute(jO(t))}function jO(e){return`aria-${e}`}function Ga(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function kee(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Oee(e){return e.getAttribute("aria-label")}function Hu(e,t){Ti(e,"label",t)}function uf(e,t){Ti(e,"labelledby",t)}function KO(e,t){Ti(e,"live",t)}function Mee(e,t){Ti(e,"atomic",t)}function Nee(e,t){Ti(e,"relevant",t)}function Lee(e,t){Ti(e,"invalid",t)}function Vee(e,t){Ti(e,"disabled",t)}function qO(e,t){Ti(e,"hidden",t)}function WS(e,t){Xs(e,"expanded",t)}function Bee(e,t){Xs(e,"setsize",t)}function Hee(e,t){Xs(e,"posinset",t)}function $ee(e,t){Xs(e,"multiselectable",t)}function Gee(e,t){Xs(e,"rowcount",t)}function Hm(e,t){Xs(e,"rowindex",t)}function Uee(e,t){Xs(e,"rowspan",t)}function Wee(e,t){Xs(e,"colcount",t)}function YO(e,t){Xs(e,"colindex",t)}function zee(e,t){Xs(e,"colspan",t)}function jee(e,t){Xs(e,"sort",t)}function Kee(e){zO(e,"sort")}function ZO(e,t){Ti(e,"selected",t)}function qee(e,t){Ti(e,"controls",t)}function Yee(e,t){qee(e,t.id),uf(t,e.id)}function XO(e,t){Ti(e,"owns",t)}function $m(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Zee="[tabindex], input, select, button, textarea, [href]",JO="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function df(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(JO)?!1:lr(e)}function kn(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-hidden",!t),o||qO(e,!t)}function Xee(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-invisible",!t),o||qO(e,!t)}function hf(e,t){const n="disabled",o=t?i=>i.setAttribute(n,""):i=>i.removeAttribute(n);o(e);const s=e.querySelectorAll("input")??[];for(const i of s)o(i)}function Ql(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 ec(e){const{height:t,width:n,borderTopWidth:o,borderRightWidth:s,borderBottomWidth:i,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:u,marginTop:d,marginRight:h,marginBottom:f,marginLeft:p,boxSizing:m}=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(i||"0"),borderLeftWidth:v(r||"0"),paddingTop:v(a||"0"),paddingRight:v(l||"0"),paddingBottom:v(c||"0"),paddingLeft:v(u||"0"),marginTop:v(d||"0"),marginRight:v(h||"0"),marginBottom:v(f||"0"),marginLeft:v(p||"0"),boxSizing:m}}function zS(e){const t=ec(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function ff(e){const t=ec(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function QO(e){const{height:t,marginBottom:n,marginTop:o}=ec(e);return Math.floor(t+n+o)}function Gm(e){const{width:t,marginLeft:n,marginRight:o}=ec(e);return Math.floor(t+n+o)}function eM(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:o,borderRightWidth:s,borderBottomWidth:i}=ec(e);return{top:t.top+(n||0),left:t.left+(o||0),right:t.right+(s||0),bottom:t.bottom+(i||0)}}function Um(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function Wm(e,t,n){n&&(t*=-1),e.scrollLeft=t}function Do(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function Fi(e){e!=null&&e.parentNode&&e.remove()}function tM(e){return!!e.offsetParent}function lr(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!tM(e)||window.getComputedStyle(e).visibility!=="visible")}function jS(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function nM(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 oM(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 Jee(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function pf(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=Jee(n),i=o.toString(),r=i.replace(/\s*!important/g,""),a=r.length!=i.length?"important":void 0;e.style.setProperty(s,r,a)}}function zm(e){return()=>{const t=e();return t?KS(t)||sM(t):!0}}function KS(e){return e.clientWidth<e.scrollWidth}function sM(e){return e.clientHeight<e.scrollHeight}function jm(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):cr(e,t)}function cr(e,t){t=qS(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function gf(e,t){t=qS(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function qS(e){return typeof e=="number"?`${e}px`:e}function YS(e){return e instanceof Node||e instanceof HTMLElement}function Fs(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Ua(e,t,n){const s=WO(e).ResizeObserver,i=s?new s(n):null;return i==null||i.observe(t),()=>i==null?void 0:i.disconnect()}function Jr(e,t){const n=WO(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var iM="data-ref",ZS;function rM(){return ZS??(ZS=document.createTextNode(" ")),ZS.cloneNode()}function mf(e){const{attrs:t,children:n,cls:o,ref:s,role:i,tag:r}=e,a=document.createElement(r);if(o&&(a.className=o),s&&a.setAttribute(iM,s),i&&a.setAttribute("role",i),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 c of n)c&&(typeof c=="string"?(a.appendChild(document.createTextNode(c)),l=!1):typeof c=="function"?a.appendChild(c()):(l&&(a.appendChild(rM()),l=!1),a.append(mf(c)),a.appendChild(rM())))}return a}var Qee=["touchstart","touchend","touchmove","touchcancel","scroll"],ete=["wheel"],XS={},aM=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof XS[n]=="boolean")return XS[n];const o=document.createElement(e[n]||"div");return n="on"+n,XS[n]=n in o}})();function tte(e,t){return!t||!e?!1:ote(t).indexOf(e)>=0}function nte(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function ote(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():nte(t)}function ste(e,t,n){const o=ite(t);let s;o!=null&&(s={passive:o}),e.addEventListener(t,n,s)}var ite=e=>{const t=Qee.includes(e),n=ete.includes(e);if(t)return!0;if(n)return!1};function lM(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 vf=(e,t)=>{const n=e.identifier;for(let o=0,s=t.length;o<s;++o){const i=t[o];if(i.identifier===n)return i}return null};function yf(e,t){return e.gos.isElementInThisInstance(t.target)}function rte(e,t,n){const s=e.getBoundingClientRect().height,i=Pee(n)-2,r=Aee(n)-2;if(!e.offsetParent)return;const l=eM(e.offsetParent),{clientY:c,clientX:u}=t;let d=c-l.top-s/2,h=u-l.left-10;const f=yo(n),p=f.defaultView||window,m=p.pageYOffset||f.documentElement.scrollTop,v=p.pageXOffset||f.documentElement.scrollLeft;i>0&&h+e.clientWidth>i+v&&(h=i+v-e.clientWidth),h<0&&(h=0),r>0&&d+e.clientHeight>r+m&&(d=r+m-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var Km=(e,...t)=>{for(const n of t){const[o,s,i,r]=n;o.addEventListener(s,i,r),e.push(n)}},JS=e=>{if(e){for(const[t,n,o,s]of e)t.removeEventListener(n,o,s);e.length=0}},Wa=e=>{e.cancelable&&e.preventDefault()};function ate(e,t){return t}function cM(e){return(e==null?void 0:e.getLocaleTextFunc())??ate}function lte(e,t,n,o){const s=t[n];return e.getLocaleTextFunc()(n,typeof s=="function"?s(o):s,o)}function cte(e){return(t,n,o)=>e({key:t,defaultValue:n,variableValues:o})}function ute(e){return(t,n,o)=>{let s=e==null?void 0:e[t];if(s&&(o!=null&&o.length)){let i=0;for(;!(i>=o.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",o[i++])}return s??n}}var ur=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 Jl),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(dte(e))e.__addEventListener(t,n),o=()=>(e.__removeEventListener(t,n),null);else{const s=hte(e);e instanceof HTMLElement?ste(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 i={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(i)};for(const s of e)this.setupPropertyListener(s,o)}getLocaleTextFunc(){return cM(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 dte(e){return e.__addEventListener!==void 0}function hte(e){return e.eventServiceType==="global"}var Ve=class extends ur{},uM={};function QS(e,t){uM[t]||(e(),uM[t]=!0)}var fte={pending:!1,funcs:[]},pte={pending:!1,funcs:[]};function e0(e,t="setTimeout",n){const o=t==="raf"?pte:fte;if(o.funcs.push(e),o.pending)return;o.pending=!0;const s=()=>{const i=o.funcs.slice();o.funcs.length=0,o.pending=!1;for(const r of i)r()};t==="raf"?Jr(n,s):window.setTimeout(s,0)}function To(e,t,n){let o;return function(...s){const i=this;window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(i,s)},n)}}function dM(e,t){let n=0;return function(...o){const s=this,i=Date.now();i-n<t||(n=i,e.apply(s,o))}}function gte(e,t,n,o=100){const s=Date.now();let i=null,r=!1;const a=()=>{i!=null&&(window.clearInterval(i),i=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-s>o;(t()||c)&&(n(),r=!0,a())};l(),r||(i=window.setInterval(l,10))}var hM=new Set(["__proto__","constructor","prototype"]);function mte(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=>!hM.has(o)))t(n,e[n])}}function Zo(e,t,n=!0,o=!1){st(t)&&mte(t,(s,i)=>{let r=e[s];r!==i&&(o&&r==null&&i!=null&&typeof i=="object"&&i.constructor===Object&&(r={},e[s]=r),fM(i)&&fM(r)&&!Array.isArray(r)?Zo(r,i,n,o):(n||i!==void 0)&&(e[s]=i))})}function fM(e){return typeof e=="object"&&e!==null}var t0=class ga{static applyGlobalGridOptions(t){if(!ga.gridOptions)return{...t};let n={};return Zo(n,ga.gridOptions,!0,!0),ga.mergeStrategy==="deep"?Zo(n,t,!0,!0):n={...n,...t},ga.gridOptions.context&&(n.context=ga.gridOptions.context),t.context&&(ga.mergeStrategy==="deep"&&n.context&&Zo(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(ga.mergeStrategy==="deep"){const o=vte(t);if(o&&typeof o=="object"&&typeof n=="object")return ga.applyGlobalGridOptions({[t]:n})[t]}return n}};t0.gridOptions=void 0,t0.mergeStrategy="shallow";var n0=t0;function vte(e){var t;return(t=n0.gridOptions)==null?void 0:t[e]}var yte={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},pM="https://www.ag-grid.com";function za(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function Cf(e,...t){QS(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function $u(e,...t){QS(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var gM=new Set,qm={},Gu={},Ym,mM=!1,vM=!1,Cte=!1;function wte(e){const[t,n]=e.version.split(".")||[],[o,s]=Ym.split(".")||[];return t===o&&n===s}function bte(e){var o;Ym||(Ym=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?wte(e)||$u(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Ym}.`)):$u(t(`'${e.moduleName}' is incompatible.`));const n=(o=e.validate)==null?void 0:o.call(e);n&&!n.isValid&&$u(`${n.message}`)}function wf(e,t,n=!1){n||(mM=!0),bte(e);const o=e.rowModels??["all"];gM.add(e);let s;t!==void 0?(vM=!0,Gu[t]===void 0&&(Gu[t]={}),s=Gu[t]):s=qm;for(const i of o)s[i]===void 0&&(s[i]={}),s[i][e.moduleName]=e;if(e.dependsOn)for(const i of e.dependsOn)wf(i,t,n)}function Ste(e){delete Gu[e]}function o0(e,t,n){const o=s=>{var i,r,a;return!!((i=qm[s])!=null&&i[e])||!!((a=(r=Gu[t])==null?void 0:r[s])!=null&&a[e])};return o(n)||o("all")}function s0(){return vM}function Ete(e,t){const n=Gu[e]??{};return[...Object.values(qm.all??{}),...Object.values(n.all??{}),...Object.values(qm[t]??{}),...Object.values(n[t]??{})]}function _te(){return new Set(gM)}function Rte(){return mM}function Dte(){return Cte}var Tte=class{static register(e){wf(e,void 0)}static registerModules(e){for(const t of e)wf(t,void 0)}},tt="34.3.1",yM=2e3,CM=100,wM="_version_",Zm=null,Uu=`${pM}/javascript-data-grid`;function Fte(e){Zm=e}function xte(e){Uu=e}function bM(e,t,n){return(Zm==null?void 0:Zm(e,t))??[kte(e,t,n)]}function i0(e,t,n,o,s){e(`${o?"warning":"error"} #${t}`,...bM(t,n,s))}function Ite(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 Pte(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=Ite(e)),t}function Xm(e){return e===void 0?"undefined":e===null?"null":e}function r0(e,t){return`${e}?${t.toString()}`}function Ate(e,t,n){const o=Array.from(t.entries()).sort((i,r)=>r[1].length-i[1].length);let s=r0(e,t);for(const[i,r]of o){if(i===wM)continue;const a=s.length-n;if(a<=0)break;const l="...",c=a+l.length,u=r.length-c>CM?r.slice(0,r.length-c)+l:r.slice(0,CM)+l;t.set(i,u),s=r0(e,t)}return s}function SM(e,t){const n=new URLSearchParams;if(n.append(wM,tt),t)for(const i of Object.keys(t))n.append(i,Pte(t[i]));const o=`${Uu}/errors/${e}`,s=r0(o,n);return s.length<=yM?s:Ate(o,n,yM)}var kte=(e,t,n)=>{const o=SM(e,t);return`${`${n?n+`
|
|
184
184
|
`:""}Visit ${o}`}${n?"":`
|
|
185
185
|
Alternatively register the ValidationModule to see the full message in the console.`}`};function Ge(...e){i0(Cf,e[0],e[1],!0)}function vn(...e){i0($u,e[0],e[1],!1)}function bf(e,t,n){i0($u,e,t,!1,n)}function Ote(e,t){const n=t[0];return`error #${n} `+bM(n,t[1],e).join(" ")}function dr(...e){return Ote(void 0,e)}function EM(e,t){return e.get("rowModelType")===t}function Yn(e,t){return EM(e,"clientSide")}function Wu(e,t){return EM(e,"serverSide")}function Fo(e,t){return e.get("domLayout")===t}function tc(e){return ev(e)!==void 0}function _M(e){return typeof e.get("getRowHeight")=="function"}function Mte(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function ja(e,t,n=!1,o){const{gos:s,environment:i}=e;if(o==null&&(o=i.getDefaultRowHeight()),_M(s)){if(n)return{height:o,estimated:!0};const l={node:t,data:t.data},c=s.getCallback("getRowHeight")(l);if(a0(c))return c===0&&Ge(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&s.get("masterDetail"))return Nte(s);const r=s.get("rowHeight");return{height:r&&a0(r)?r:o,estimated:!1}}function Nte(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return a0(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function nc(e){const{environment:t,gos:n}=e,o=n.get("rowHeight");if(!o||An(o))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(Ge(24),t.getDefaultRowHeight())}function a0(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function RM(e,t,n){const o=t[e.getDomDataKey()];return o?o[n]:void 0}function oc(e,t,n,o){const s=e.getDomDataKey();let i=t[s];An(i)&&(i={},t[s]=i),i[n]=o}function zu(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function DM(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Fo(e,"print"))}function hr(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function l0(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function TM(e){return e.get("grandTotalRow")}function FM(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function xM(e,t,n){return!!t.group&&!t.footer&&FM(e,n)}function ju(e){const t=e.getCallback("getRowId");return t===void 0?t:n=>{let o=t(n);return typeof o!="string"&&(QS(()=>Ge(25,{id:o}),"getRowIdString"),o=String(o)),o}}function Lte(e,t){const n=e.get("groupHideParentOfSingleChild");return!!(n===!0||n==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function Vte(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function Ku(e){return(e==null?void 0:e.checkboxes)??!0}function Jm(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function Qm(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function c0(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function Bte(e){return typeof e.get("rowSelection")!="string"}function Qr(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function IM(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 Hte(e){const t=IM(e);return t===!0||t==="enableSelection"}function $te(e){const t=IM(e);return t===!0||t==="enableDeselection"}function u0(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function ev(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 Sf(e){return ev(e)==="multiRow"}function Gte(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function tv(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 PM(e,t=!0){const n=e.get("rowSelection");return typeof n!="object"?t?"all":void 0:n.mode==="multiRow"?n.selectAll:"all"}function Ute(e){const t=e.get("rowSelection");return typeof t=="string"?!1:(t==null?void 0:t.mode)==="multiRow"?t.ctrlASelectsRows??!1:!1}function Ef(e){const t=tv(e);return t==="descendants"||t==="filteredDescendants"}function AM(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function Wte(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function xs(e){return e.get("columnMenu")==="legacy"}function zte(e){return!xs(e)}function jte(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function Dt(e,t){return e.addCommon(t)}function kM({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var Kte={resizable:!0,sortable:!0},qte=0;function OM(){return qte++}function Ka(e){return e instanceof sc}var sc=class extends Ve{constructor(e,t,n,o){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=n,this.primary=o,this.isColumn=!0,this.instanceId=OM(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new Jl,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=cf(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=st(t)&&t.includes(".")&&!o,this.tooltipFieldContainsDots=st(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,i;this.frameworkEventListenerService=(s=(o=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:s.call(o,this.frameworkEventListenerService,this.colEventSvc);const n=((i=this.frameworkEventListenerService)==null?void 0:i.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 Dt(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]??Kte[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 Dt(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 An(this.sort)}isSorting(){return st(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 Ge(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 Dt(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(An(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)}getRowSpan(e){if(An(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&&Zo(o,n),this.colEventSvc.dispatchEvent(o)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function Ho(e){return e instanceof nv}var nv=class extends Ve{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=OM(),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)Ka(t)?e(t):Ho(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)Ka(t)?e.push(t):Ho(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 i=0,r=o.length;i<r;i++){const a=o[i];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)Ho(o)&&o.isPadding()?t(o.children):e.push(o)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},Yte={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function MM(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 Zte=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=GS(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&&Ge(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}n++}}};function wn(e){if(e!=null&&e.length)return e[e.length-1]}function qa(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 _f(e,t){if(e)for(const n of e)t(n)}function xi(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}function NM(e,t,n){for(let o=0;o<t.length;o++)xi(e,t[o]);for(let o=t.length-1;o>=0;o--)e.splice(n,0,t[o])}var ov="ag-Grid-AutoColumn",LM="ag-Grid-SelectionColumn",VM="ag-Grid-RowNumbersColumn";function BM(e){const t=[],n=o=>{for(let s=0;s<o.length;s++){const i=o[s];Ka(i)?t.push(i):Ho(i)&&n(i.getChildren())}};return n(e),t}function ea(e){return e.reduce((t,n)=>t+n.getActualWidth(),0)}function sv(e,t,n){const o={};if(!t)return;oa(null,t,i=>{o[i.getInstanceId()]=i}),n&&oa(null,n,i=>{o[i.getInstanceId()]=null});const s=Object.values(o).filter(i=>i!=null);e.context.destroyBeans(s)}function d0(e){return e.getId().startsWith(ov)}function ta(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(LM))??!1}function na(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(VM))??!1}function Xte(e){return ta(e)||na(e)}function iv(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function Jte(e,t){return qa(e,t,(n,o)=>n.getColId()===o.getColId())}function Qte(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function qu(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Rf(e,t){const n=e===t,o=e.getColDef()===t,s=e.getColId()==t;return n||o||s}var ene=(e,t)=>(n,o)=>{const s={value1:void 0,value2:void 0};let i=!1;return e&&(e[n]!==void 0&&(s.value1=e[n],i=!0),st(o)&&e[o]!==void 0&&(s.value2=e[o],i=!0)),!i&&t&&(t[n]!==void 0&&(s.value1=t[n]),st(o)&&t[o]!==void 0&&(s.value2=t[o])),s},tne=(e,t)=>{Ho(e)&&e.setupExpandable(),e.originalParent=t};function nne(e,t=null,n,o,s){const i=new Zte,{existingCols:r,existingGroups:a,existingColKeys:l}=one(o);i.addExistingKeys(l);const c=HM(e,t,0,n,r,i,a,s),{colGroupSvc:u}=e,d=(u==null?void 0:u.findMaxDepth(c,0))??0,h=u?u.balanceColumnTree(c,0,d,i):c;return oa(null,h,tne),{columnTree:h,treeDepth:d}}function one(e){const t=[],n=[],o=[];return e&&oa(null,e,s=>{if(Ho(s)){const i=s;n.push(i)}else{const i=s;o.push(i.getId()),t.push(i)}}),{existingCols:t,existingGroups:n,existingColKeys:o}}function HM(e,t,n,o,s,i,r,a){if(!t)return[];const{colGroupSvc:l}=e,c=new Array(t.length);for(let u=0;u<c.length;u++){const d=t[u];l&&cne(d)?c[u]=l.createProvidedColumnGroup(o,d,n,s,i,r,a):c[u]=sne(e,o,d,s,i,a)}return c}function sne(e,t,n,o,s,i){var l;const r=rne(n,o);r&&(o==null||o.splice(r.idx,1));let a=r==null?void 0:r.column;if(a){const c=h0(e,n,a.getColId());a.setColDef(c,n,i),ine(e,a,c,i)}else{const c=s.getUniqueKey(n.colId,n.field),u=h0(e,n,c);a=new sc(u,n,c,t),e.context.createBean(a)}return(l=e.dataTypeSvc)==null||l.addColumnListeners(a),a}function $M(e,t,n,o,s,i,r,a){const{sortSvc:l,pinnedCols:c,colFlex:u}=e;n!==void 0&&t.setVisible(!n,a),l&&(l.updateColSort(t,o,a),s!==void 0&&l.setColSortIndex(t,s)),i!==void 0&&(c==null||c.setColPinned(t,i)),r!==void 0&&(u==null||u.setColFlex(t,r))}function ine(e,t,n,o){$M(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 i=t.getActualWidth();t.setActualWidth(i,o)}}function rne(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 h0(e,t,n,o){const{gos:s,dataTypeSvc:i}=e,r={},a=s.get("defaultColDef");Zo(r,a,!1,!0);const l=ane(e,r,t,n);l&&lne(e,l,r);const c=r.cellDataType;Zo(r,t,!1,!0),c!==void 0&&(r.cellDataType=c);const u=s.get("autoGroupColumnDef"),d=hr(s);return t.rowGroup&&u&&d&&Zo(r,{sort:u.sort,initialSort:u.initialSort},!1,!0),i&&(i.postProcess(r),i.validateColDef(r)),s.validateColDef(r,n,o),r}function ane(e,t,n,o){var r;const s=(r=e.dataTypeSvc)==null?void 0:r.updateColDefAndGetColumnType(t,n,o),i=n.type??s??t.type;return t.type=i,i?iv(i):void 0}function lne(e,t,n){if(!t.length)return;const o=Object.assign({},Yte),s=e.gos.get("columnTypes")||{};for(const i of Object.keys(s)){const r=s[i];i in o?Ge(34,{key:i}):(r.type&&Ge(35),o[i]=r)}for(const i of t){const r=o[i.trim()];r?Zo(n,r,!1,!0):Ge(36,{t:i})}}function cne(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];Ho(s)&&oa(s,s.getChildren(),n),n(s,e)}}function GM(e,t){const n=[],o=[],s=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?s.push(r):a==="left"||a===!0?n.push(r):o.push(r)}),t.get("enableRtl")?[...s,...o,...n]:[...n,...o,...s]}function UM(e,t){let n=!0;return oa(null,t,o=>{if(!Ho(o))return;const s=o,i=s.getColGroupDef();if(!(i==null?void 0:i.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),c=Math.min.apply(Math,a),u=l-c,d=s.getLeafColumns().length-1;u>d&&(n=!1)}),n}function WM(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 zM(e,t,n){if(!t.length)return;const o=t.length===1?t[0]:null,s=WM(t,i=>i.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:o,source:n})}function une(e,t,n){if(!t.length)return;const o=t.length===1?t[0]:null,s=WM(t,i=>i.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:o,source:n})}function dne(e,t,n,o){e.dispatchEvent({type:t,columns:n,column:n&&n.length==1?n[0]:null,source:o})}function Yu(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 Ii(e,t,n){var R;const{colModel:o,rowGroupColsSvc:s,pivotColsSvc:i,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:c,pivotResultCols:u,environment:d,valueColsSvc:h,eventSvc:f,gos:p}=e,m=o.getColDefCols()??[],v=a==null?void 0:a.getColumns();if(!m.length&&!(v!=null&&v.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return Ge(32),!1;const w=(_,T,O,x,A)=>{if(!_)return;const D=ene(T,t.defaultState),I=D("flex").value1;if($M(e,_,D("hide").value1,D("sort").value1,D("sortIndex").value1,D("pinned").value1,I,n),I==null){const P=D("width").value1;if(P!=null){const J=_.getColDef().minWidth??d.getDefaultColumnMinWidth();J!=null&&P>=J&&_.setActualWidth(P,n)}}A||!_.isPrimary()||(h==null||h.syncColumnWithState(_,n,D),s==null||s.syncColumnWithState(_,n,D,O),i==null||i.syncColumnWithState(_,n,D,x))},b=(_,T,O)=>{var ee,ie;const x=jM(e,n),A=T.slice(),D={},I={},P=[],J=[],Z=[];let G=0;const te=(s==null?void 0:s.columns.slice())??[],V=(i==null?void 0:i.columns.slice())??[];for(const ne of _){const se=ne.colId;if(se.startsWith(ov)){P.push(ne),Z.push(ne);continue}if(ta(se)){J.push(ne),Z.push(ne);continue}const fe=O(se);fe?(w(fe,ne,D,I,!1),xi(A,fe)):(Z.push(ne),G+=1)}const $=ne=>w(ne,null,D,I,!1);A.forEach($),s==null||s.sortColumns(qM.bind(s,D,te)),i==null||i.sortColumns(qM.bind(i,I,V)),o.refreshCols(!1,n);const N=(ne,se,Q=[])=>{for(const fe of se){const Re=ne(fe.colId);xi(Q,Re),w(Re,fe,null,null,!0)}Q.forEach($)};return N(ne=>(r==null?void 0:r.getColumn(ne))??null,P,(ee=r==null?void 0:r.getColumns())==null?void 0:ee.slice()),N(ne=>(a==null?void 0:a.getColumn(ne))??null,J,(ie=a==null?void 0:a.getColumns())==null?void 0:ie.slice()),fne(t,o,p),c.refresh(n),f.dispatchEvent({type:"columnEverythingChanged",source:n}),x(),{unmatchedAndAutoStates:Z,unmatchedCount:G}};l==null||l.start();let{unmatchedAndAutoStates:E,unmatchedCount:C}=b(t.state||[],m,_=>o.getColDefCol(_));if(E.length>0||st(t.defaultState)){const _=((R=u==null?void 0:u.getPivotResultCols())==null?void 0:R.list)??[];C=b(E,_,T=>(u==null?void 0:u.getPivotResultCol(T))??null).unmatchedCount}return l==null||l.finish(),C===0}function hne(e,t){var b,E;const{colModel:n,autoColSvc:o,selectionColSvc:s,eventSvc:i,gos:r}=e,a=n.getColDefCols();if(!(a!=null&&a.length))return;const l=n.getColDefColTree(),c=BM(l),u=[];let d=1e3,h=1e3;const f=C=>{const R=KM(C);An(R.rowGroupIndex)&&R.rowGroup&&(R.rowGroupIndex=d++),An(R.pivotIndex)&&R.pivot&&(R.pivotIndex=h++),u.push(R)};(b=o==null?void 0:o.getColumns())==null||b.forEach(f),(E=s==null?void 0:s.getColumns())==null||E.forEach(f),c==null||c.forEach(f),Ii(e,{state:u},t);const p=(o==null?void 0:o.getColumns())??[],w=[...(s==null?void 0:s.getColumns())??[],...p,...a].map(C=>({colId:C.colId}));Ii(e,{state:w,applyOrder:!0},t),i.dispatchEvent(Dt(r,{type:"columnsReset",source:t}))}function jM(e,t){const{rowGroupColsSvc:n,pivotColsSvc:o,valueColsSvc:s,colModel:i,sortSvc:r,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())??[]},c=rv(e),u={};for(const d of c)u[d.colId]=d;return()=>{const d=(_,T,O,x)=>{const A=T.map(x),D=O.map(x);if(qa(A,D))return;const P=new Set(T);for(const Z of O)P.delete(Z)||P.add(Z);const J=[...P];a.dispatchEvent({type:_,columns:J,column:J.length===1?J[0]:null,source:t})},h=_=>{const T=[];return i.forAllCols(O=>{const x=u[O.getColId()];x&&_(x,O)&&T.push(O)}),T},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 m=h((_,T)=>{const O=_.aggFunc!=null,x=O!=T.isValueActive(),A=O&&_.aggFunc!=T.getAggFunc();return x||A});m.length>0&&dne(a,"columnValueChanged",m,t),Yu(a,h((_,T)=>_.width!=T.getActualWidth()),!0,t),zM(a,h((_,T)=>_.pinned!=T.getPinned()),t),une(a,h((_,T)=>_.hide==T.isVisible()),t);const C=h((_,T)=>_.sort!=T.getSort()||_.sortIndex!=T.getSortIndex());C.length>0&&(r==null||r.dispatchSortChangedEvents(t,C));const R=rv(e);gne(c,R,t,i,a)}}function rv(e){const{colModel:t,rowGroupColsSvc:n,pivotColsSvc:o}=e,s=t.getColDefCols();if(An(s)||!t.isAlive())return[];const i=n==null?void 0:n.columns,r=o==null?void 0:o.columns,a=[],l=u=>{const d=u.isRowGroupActive()&&i?i.indexOf(u):null,h=u.isPivotActive()&&r?r.indexOf(u):null,f=u.isValueActive()?u.getAggFunc():null,p=u.getSort()!=null?u.getSort():null,m=u.getSortIndex()!=null?u.getSortIndex():null;a.push({colId:u.getColId(),width:u.getActualWidth(),hide:!u.isVisible(),pinned:u.getPinned(),sort:p,sortIndex:m,aggFunc:f,rowGroup:u.isRowGroupActive(),rowGroupIndex:d,pivot:u.isPivotActive(),pivotIndex:h,flex:u.getFlex()??null})};t.forAllCols(u=>l(u));const c=new Map(t.getCols().map((u,d)=>[u.getColId(),d]));return a.sort((u,d)=>{const h=c.has(u.colId)?c.get(u.colId):-1,f=c.has(d.colId)?c.get(d.colId):-1;return h-f}),a}function KM(e){const t=(p,m)=>p??m??null,n=e.getColDef(),o=t(n.sort,n.initialSort),s=t(n.sortIndex,n.initialSortIndex),i=t(n.hide,n.initialHide),r=t(n.pinned,n.initialPinned),a=t(n.width,n.initialWidth),l=t(n.flex,n.initialFlex);let c=t(n.rowGroupIndex,n.initialRowGroupIndex),u=t(n.rowGroup,n.initialRowGroup);c==null&&!u&&(c=null,u=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:i,pinned:r,width:a,flex:l,rowGroup:u,rowGroupIndex:c,pivot:h,pivotIndex:d,aggFunc:f}}function fne(e,t,n){if(!e.applyOrder||!e.state)return;const o=[];for(const s of e.state)s.colId!=null&&o.push(s.colId);pne(t.cols,o,t,n)}function pne(e,t,n,o){if(e==null)return;let s=[];const i={};for(const a of t){if(i[a])continue;const l=e.map[a];l&&(s.push(l),i[a]=!0)}let r=0;for(const a of e.list){const l=a.getColId();if(i[l]!=null)continue;l.startsWith(ov)?s.splice(r++,0,a):s.push(a)}if(s=GM(s,o),!UM(s,n.getColTree())){Ge(39);return}e.list=s}function gne(e,t,n,o,s){const i={};for(const u of t)i[u.colId]=u;const r={};for(const u of e)i[u.colId]&&(r[u.colId]=!0);const a=e.filter(u=>r[u.colId]),l=t.filter(u=>r[u.colId]),c=[];l.forEach((u,d)=>{const h=a==null?void 0:a[d];if(h&&h.colId!==u.colId){const f=o.getCol(h.colId);f&&c.push(f)}}),c.length&&s.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:n})}var qM=(e,t,n,o)=>{const s=e[n.getId()],i=e[o.getId()],r=s!=null,a=i!=null;if(r&&a)return s-i;if(r)return-1;if(a)return 1;const l=t.indexOf(n),c=t.indexOf(o),u=l>=0,d=c>=0;return u&&d?l-c:u?-1:1},mne=class extends Ve{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(qu(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),qu(e.source)))}createColsFromColDefs(e){var b,E,C;const{beans:t}=this,{valueCache:n,colAutosize:o,rowGroupColsSvc:s,pivotColsSvc:i,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:c}=t,u=this.colDefs?jM(t,e):void 0;n==null||n.expire();const d=(b=this.colDefCols)==null?void 0:b.list,h=(E=this.colDefCols)==null?void 0:E.tree,f=nne(t,this.colDefs,!0,h,e);sv(t,(C=this.colDefCols)==null?void 0:C.tree,f.columnTree);const p=f.columnTree,m=f.treeDepth,v=BM(p),w={};for(const R of v)w[R.getId()]=R;this.colDefCols={tree:p,treeDepth:m,list:v,map:w},this.createColumnsForService([c],this.colDefCols,e),s==null||s.extractCols(e,d),i==null||i.extractCols(e,d),r==null||r.extractCols(e,d),this.ready=!0,this.refreshCols(!0,e),a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),u&&(this.changeEventsDispatching=!0,u(),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:i,quickFilter:r,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:c,visibleCols:u,colViewport:d,eventSvc:h}=this.beans,f=this.selectCols(a,this.colDefCols);this.createColumnsForService([o,s,i],f,t);const p=Mte(this.gos,this.showingPivotResult);(!e||p)&&this.restoreColOrder(f),this.positionLockedCols(f),l==null||l.refresh(),r==null||r.refreshCols(),this.setColSpanActive(),c==null||c.setAutoHeightActive(f),u.clear(),d.clear(),!qa(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:i,treeDepth:r}=n??t;return this.cols={list:s.slice(),map:{...o},tree:i.slice(),treeDepth:r},n&&(n.list.some(l=>{var c;return((c=this.cols)==null?void 0:c.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(),i=n.get("rowNumbers"),r=e==null?void 0:e.columns;return this.cols.list.filter(l=>{const c=d0(l);if(o){const u=r==null?void 0:r.includes(l);return c||u||s&&ta(l)||i&&na(l)}else return c||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,n){Ii(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 i=e.list.filter(d=>!s.has(d));if(i.length===0){e.list=n;return}const r=(d,h)=>{const f=h?h.getOriginalParent():d.getOriginalParent();if(!f)return null;let p=null,m=null;for(const v of f.getChildren())if(!(v===h||v===d)){if(v instanceof sc){const w=s.get(v);if(w==null)continue;(p==null||p<w)&&(p=w,m=v);continue}v.forEachLeafColumn(w=>{const b=s.get(w);b!=null&&(p==null||p<b)&&(p=b,m=w)})}return m??r(d,f)},a=[],l=new Map;for(const d of i){const h=r(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 c=new Array(e.list.length);let u=c.length-1;for(let d=a.length-1;d>=0;d--)c[u--]=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 m=f[p];c[u--]=m}else c[u--]=f;c[u--]=h}e.list=c}positionLockedCols(e){e.list=GM(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=qu(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;sv(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 i,r,a,l,c;const{pivotResultCols:t,autoColSvc:n,selectionColSvc:o,groupHierarchyColSvc:s}=this.beans;_f((i=this.colDefCols)==null?void 0:i.list,e),_f((r=n==null?void 0:n.columns)==null?void 0:r.list,e),_f((a=o==null?void 0:o.columns)==null?void 0:a.list,e),_f((l=s==null?void 0:s.columns)==null?void 0:l.list,e),_f((c=t==null?void 0:t.getPivotResultCols())==null?void 0:c.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(Rf(o[a],e))return o[a];const{autoColSvc:s,selectionColSvc:i,groupHierarchyColSvc:r}=this.beans;return(s==null?void 0:s.getColumn(e))??(i==null?void 0:i.getColumn(e))??(r==null?void 0:r.getColumn(e))??null}},YM=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 Df(e,t,n){return n&&e.addDestroyFunc(()=>t.destroyBean(n)),n??e}var nt=null;function ZM(e){return typeof(e==null?void 0:e.getGui)=="function"}var XM=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 i of s)this.toggleCss(i,t);return}}this.cssClassStates[e]!==t&&e.length&&((o=this.getGui())==null||o.classList.toggle(e,t),this.cssClassStates[e]=t)}},vne=0,Tf=class extends ur{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=vne++,this.cssManager=new XM(()=>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(iM):null}applyElementsToComponent(e,t,n,o=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===nt)this[t]=o??e;else{const i=n==null?void 0:n[t];if(!this.suppressDataRefValidation&&!i)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,i=>{const r=i.getGui();if(r)for(const a of o.attributes??[])r.setAttribute(a.name,a.value)},t);if(s){if(s.addItems&&o.children.length){this.createChildComponentsFromTags(o,t);const i=Array.prototype.slice.call(o.children);s.addItems(i)}this.swapComponentForNode(s,e,o)}else o.childNodes&&this.createChildComponentsFromTags(o,t)}}createComponentFromElement(e,t,n){const o=e.nodeName,s=this.getDataRefAttribute(e),i=o.indexOf("AG-")===0,r=i?this.componentSelectors.get(o):null;let a=null;if(r){const l=n&&s?n[s]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(i)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=jS(e):o=mf(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 i=t[s];this.componentSelectors.set(i.selector,i)}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),YS(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;Xee(this.eGui,e,{skipAriaHidden:n})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:n}=t;kn(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)}},fn=class extends Tf{};function JM(e){return typeof e=="object"&&!!e.component}function yne(e,t){return new $n(n=>{n(window.setInterval(e,t))})}var $n=class up{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 up(n=>{let o=t.length;const s=new Array(o);t.forEach((i,r)=>{i.then(a=>{s[r]=a,o--,o===0&&n(s)})})}):up.resolve()}static resolve(t=null){return new up(n=>n(t))}then(t){return new up(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 Cne(e){return e?e.prototype&&"getGui"in e.prototype:!1}function QM(e,t,n,o){const{name:s}=n;let i,r,a,l,c,u;if(t){const d=t,h=d[s+"Selector"],f=h?h(o):null,p=m=>{typeof m=="string"?i=m:m!=null&&m!==!0&&(e.isFrameworkComponent(m)?a=m:r=m)};f?(p(f.component),l=f.params,c=f.popup,u=f.popupPosition):p(d[s])}return{compName:i,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:u}}var wne=class extends Ve{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 E;const{name:i,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:c,paramsFromSelector:u,popupFromSelector:d,popupPositionFromSelector:h}=QM(this.beans.frameworkOverrides,e,t,o),f,p;const m=C=>{const R=this.registry.getUserComponent(i,C);R&&(l=R.componentFromFramework?void 0:R.component,c=R.componentFromFramework?R.component:void 0,f=R.params,p=R.processParams)};if(a!=null&&m(a),l==null&&c==null&&n!=null&&m(n),l&&r&&!Cne(l)&&(l=(E=this.agCompUtils)==null?void 0:E.adaptFunction(t,l)),!l&&!c){const{validation:C}=this.beans;s&&(a!==n||!n)?a?C!=null&&C.isProvidedUserComp(a)||vn(50,{compName:a}):n?C||vn(260,{...this.gos.getModuleErrorParams(),propName:i,compName:n}):vn(216,{name:i}):n&&!C&&vn(146,{comp:n});return}const v=this.mergeParams(e,t,o,u,f,p),w=l==null,b=l??c;return{componentFromFramework:w,componentClass:b,params:v,type:t,popupFromSelector:d,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(b,w,v,t)}}newAgStackInstance(e,t,n,o){var a;const s=!t;let i;s?i=new e:i=this.frameworkCompWrapper.wrap(e,o.mandatoryMethods,o.optionalMethods,o),this.createBean(i);const r=(a=i.init)==null?void 0:a.call(i,n);return r==null?$n.resolve(i):r.then(()=>i)}mergeParams(e,t,n,o=null,s,i){const r={...n,...s},a=e,l=a==null?void 0:a[t.name+"Params"];if(typeof l=="function"){const c=l(n);Zo(r,c)}else typeof l=="object"&&Zo(r,l);return Zo(r,o),i?i(r):r}},bne={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},Sne={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Ene={name:"headerComponent",optionalMethods:["refresh"]},_ne={name:"innerHeaderComponent"},Rne={name:"innerHeaderGroupComponent"},Dne={name:"headerGroupComponent"},Tne={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Fne={name:"loadingCellRenderer",cellRenderer:!0},xne={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},Ine={name:"loadingOverlayComponent",optionalMethods:["refresh"]},Pne={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},Ane={name:"tooltipComponent"},f0={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},kne={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},One={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Mne={name:"loadingCellRenderer",cellRenderer:!0},Nne={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Lne={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function Vne(e,t){return e.getCompDetailsFromGridOptions(Sne,"agDragAndDropImage",t,!0)}function Bne(e,t,n){return e.getCompDetails(t,Ene,"agColumnHeader",n)}function Hne(e,t,n){return e.getCompDetails(t,_ne,void 0,n)}function $ne(e,t){const n=t.columnGroup.getColGroupDef();return e.getCompDetails(n,Dne,"agColumnGroupHeader",t)}function Gne(e,t,n){return e.getCompDetails(t,Rne,void 0,n)}function Une(e,t){return e.getCompDetailsFromGridOptions(One,void 0,t,!0)}function Wne(e,t){return e.getCompDetailsFromGridOptions(Mne,"agLoadingCellRenderer",t,!0)}function zne(e,t){return e.getCompDetailsFromGridOptions(Nne,"agGroupRowRenderer",t,!0)}function jne(e,t){return e.getCompDetailsFromGridOptions(Lne,"agDetailCellRenderer",t,!0)}function eN(e,t,n){return e.getCompDetails(t,Tne,void 0,n)}function tN(e,t,n){return e.getCompDetails(t,Fne,"agSkeletonCellRenderer",n,!0)}function nN(e,t,n){return e.getCompDetails(t,xne,"agCellEditor",n,!0)}function Kne(e,t,n,o){const s=t.filter;return JM(s)&&(t={filter:s.component,filterParams:t.filterParams}),e.getCompDetails(t,f0,o,n,!0)}function qne(e,t,n){return e.getCompDetails(t,bne,"agDateInput",n,!0)}function Yne(e,t){return e.getCompDetailsFromGridOptions(Ine,"agLoadingOverlay",t,!0)}function Zne(e,t){return e.getCompDetailsFromGridOptions(Pne,"agNoRowsOverlay",t,!0)}function Xne(e,t){return e.getCompDetails(t.colDef,Ane,"agTooltipComponent",t,!0)}function Jne(e,t,n,o){return e.getCompDetails(t,kne,o,n)}function oN(e,t){return QM(e,t,f0)}function p0(e,t,n){return e.mergeParams(t,f0,n)}function Ff(e){const t=e;return(t==null?void 0:t.getFrameworkComponentInstance)!=null?t.getFrameworkComponentInstance():e}function Qne(e){return typeof e=="object"&&!!e.getComp}var De={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"},g0=class extends Tf{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()}},m0,v0,y0,C0,w0,b0,S0;function Ya(){return m0===void 0&&(m0=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),m0}function sN(){return v0===void 0&&(v0=/(firefox)/i.test(navigator.userAgent)),v0}function iN(){return y0===void 0&&(y0=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),y0}function ic(){return C0===void 0&&(C0=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),C0}function E0(e){if(!e)return null;const t=e.tabIndex,n=e.getAttribute("tabIndex");return t===-1&&(n===null||n===""&&!sN())?null:t.toString()}function eoe(){if(S0!==void 0)return S0;if(!document.body)return-1;let e=1e6;const t=sN()?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(),S0=e,e}function toe(){return b0==null&&rN(),b0}function rN(){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&&(b0=n,w0=n===0)}function aN(){return w0==null&&rN(),w0}var _0="T",noe=new RegExp(`[${_0} ]`),ooe=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${_0}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function fr(e,t){return e.toString().padStart(t,"0")}function Is(e,t=!0,n=_0){if(!e)return null;let o=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>fr(s,2)).join("-");return t&&(o+=n+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>fr(s,2)).join(":")),o}function av(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),fr(e.getDate(),2),fr(e.getHours(),2),`:${fr(e.getMinutes(),2)}`,`:${fr(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,fr(e.getDate(),2)].map(String):null}var R0=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"},lN=["January","February","March","April","May","June","July","August","September","October","November","December"],D0=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function T0(e,t){if(t==null)return Is(e,!1);const n=fr(e.getFullYear(),4),o={YYYY:()=>n.slice(n.length-4,n.length),YY:()=>n.slice(n.length-2,n.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>lN[e.getMonth()],MMM:()=>lN[e.getMonth()].slice(0,3),MM:()=>fr(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${R0(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${R0(e.getDate())}`,DD:()=>fr(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>D0[e.getDay()],ddd:()=>D0[e.getDay()].slice(0,3),dd:()=>D0[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${R0(e.getDay())}`,d:()=>`${e.getDay()}`},s=new RegExp(Object.keys(o).join("|"),"g");return t.replace(s,i=>i in o?o[i]():i)}function lv(e,t=!1){return!!rs(e,t)}function soe(e){return lv(e,!0)}function rs(e,t=!1,n){if(!e||!n&&!ooe.test(e))return null;const[o,s]=e.split(noe);if(!o)return null;const i=o.split("-").map(f=>Number.parseInt(f,10));if(i.filter(f=>!isNaN(f)).length!==3)return null;const[r,a,l]=i,c=new Date(r,a-1,l);if(c.getFullYear()!==r||c.getMonth()!==a-1||c.getDate()!==l||!s&&t)return null;if(!s||s==="00:00:00")return c;const[u,d,h]=s.split(":").map(f=>Number.parseInt(f,10));if(u>=0&&u<24)c.setHours(u);else if(t)return null;if(d>=0&&d<60)c.setMinutes(d);else if(t)return null;if(h>=0&&h<60)c.setSeconds(h);else if(t)return null;return c}function F0(e){const{inputValue:t,allSuggestions:n,hideIrrelevant:o,filterByPercentageOfBestMatch:s}=e;let i=(n??[]).map((l,c)=>({value:l,relevance:ioe(t,l),idx:c}));if(i.sort((l,c)=>l.relevance-c.relevance),o&&(i=i.filter(l=>l.relevance<Math.max(l.value.length,t.length))),i.length>0&&s&&s>0){const c=i[0].relevance*s;i=i.filter(u=>c-u.relevance<0)}const r=[],a=[];for(const l of i)r.push(l.value),a.push(l.idx);return{values:r,indices:a}}function ioe(e,t){e.length<t.length&&([e,t]=[t,e]);let n=[],o=[];const s=e.length,i=t.length;for(let a=0;a<=i;a++)n[a]=a;let r=0;for(let a=1;a<=s;a++){o[0]=a;for(let l=1;l<=i;l++){const c=e[a-1],u=t[l-1];if(c.toLocaleLowerCase()===u.toLocaleLowerCase())++r,c===u&&++r,a>1&&l>1&&e[a-2].toLocaleLowerCase()===t[l-2].toLocaleLowerCase()&&(++r,e[a-2]===t[l-2]&&++r),a<s/2-10&&++r,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[i]/(r+1)}function cN(e){var n;return e.altKey||e.ctrlKey||e.metaKey?!1:((n=e.key)==null?void 0:n.length)===1}var x0=!1,cv=0;function roe(e){cv>0||(e.addEventListener("keydown",uv),e.addEventListener("mousedown",uv))}function aoe(e){cv>0||(e.removeEventListener("keydown",uv),e.removeEventListener("mousedown",uv))}function uv(e){const t=x0,n=e.type==="keydown";n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(x0=n)}function loe(e){const t=yo(e);return roe(t),cv++,()=>{cv--,aoe(t)}}function coe(){return x0}function Zu(e,t,n=!1){const o=Zee;let s=JO;t&&(s+=", "+t),n&&(s+=', [tabindex="-1"]');const i=Array.prototype.slice.apply(e.querySelectorAll(o)).filter(l=>lr(l)),r=Array.prototype.slice.apply(e.querySelectorAll(s));return r.length?((l,c)=>l.filter(u=>c.indexOf(u)===-1))(i,r):i}function rc(e,t=!1,n=!1,o=!1){const s=Zu(e,o?".ag-tab-guard":null,n),i=t?wn(s):s[0];return i?(i.focus({preventScroll:!0}),!0):!1}function ac(e,t,n,o){const s=Zu(t,n?':not([tabindex="-1"])':null),i=Nn(e);let r;n?r=s.findIndex(l=>l.contains(i)):r=s.indexOf(i);const a=r+(o?-1:1);return a<0||a>=s.length?null:s[a]}function uN(e,t=5){let n=0;for(;e&&E0(e)===null&&++n<=t;)e=e.parentElement;return E0(e)===null?null:e}var uoe=".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)}",doe=class extends Tf{constructor(e,t,n){super(t,n),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(uoe)}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;Do(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(kn(t,!1),Ga(t,"presentation")):(kn(t,!0),Ga(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:(jm(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return hf(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},dN=class extends doe{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==""||Oee(e)!==null?uf(e,""):uf(e,t??"")}setAriaLabel(e){return Hu(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 cr(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 hoe(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 lc=class extends dN{constructor(e,t,n="text",o="input"){super(e,(e==null?void 0:e.template)??hoe(o),[],t),this.inputType=n,this.displayFieldTag=o,this.eLabel=nt,this.eWrapper=nt,this.eInput=nt}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:i}=this.config;s!=null&&this.setInputName(s),i!=null&&this.setInputWidth(i),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,Fs(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return jm(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 Fs(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Hu(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return hf(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Fs(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Fs(this.eInput,"autocomplete",t)}return this}},I0=class extends lc{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)}},P0={selector:"AG-CHECKBOX",component:I0},foe=class extends I0{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)}},cc=class extends lc{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=st(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{cN(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(i=>!e.test(i))&&n.preventDefault()}})}},dv={selector:"AG-INPUT-TEXT-FIELD",component:cc},poe=class extends lc{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}},goe={selector:"AG-INPUT-TEXT-AREA",component:poe},A0=class extends cc{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const i=Number.parseFloat(e.value),r=isNaN(i)?"":this.normalizeValue(i.toString());this.value!==r&&this.setValue(r)},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){Nn(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,Fs(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Fs(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Fs(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(st(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")}},moe={selector:"AG-INPUT-NUMBER-FIELD",component:A0},voe=class extends cc{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Ya();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){Nn(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?Is(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,Fs(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?Is(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,Fs(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Fs(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 rs(this.getValue())??void 0}setDate(e,t){this.setValue(Is(e??null,this.includeTime),t)}},hN={selector:"AG-INPUT-DATE-FIELD",component:voe},yoe=".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)}}",Coe="ag-active-item",woe=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}),boe=class extends Tf{constructor(e,t,n){super(woe(e,t)),this.label=t,this.value=n,this.eText=nt}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(Coe,e),ZO(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const n=this.getGui();Hee(n,e),Bee(n,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>KS(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)}))}},Soe=class extends Tf{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(yoe)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case De.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const n=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(n)}break;case De.DOWN:case De.UP:e.preventDefault(),this.navigate(t);break;case De.PAGE_DOWN:case De.PAGE_UP:case De.PAGE_HOME:case De.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();Do(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(!lr(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const n=this.getGui(),{scrollTop:o,clientHeight:s}=n,{offsetTop:i,offsetHeight:r}=t;(i+r>o+s||i<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 boe(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===De.DOWN;let n;const{listItems:o,highlightedItem:s}=this;if(!s)n=t?o[0]:wn(o);else{let r=o.indexOf(s)+(t?1:-1);r=Math.min(Math.max(r,0),o.length-1),n=o[r]}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,i=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/i);let a=-1;e===De.PAGE_HOME?a=0:e===De.PAGE_END?a=s:e===De.PAGE_DOWN?a=Math.min(o+r,s):e===De.PAGE_UP&&(a=Math.max(o-r,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){Ga(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"})}},Eoe=".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}}",_oe={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"}}]}]},Roe=class extends dN{constructor(e){if(super(e,(e==null?void 0:e.template)||_oe,(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=nt,this.eWrapper=nt,this.eDisplayField=nt,this.eIcon=nt,this.registerCSS(Eoe),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:i}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!o,n!=null&&this.setPickerMaxHeight(n),s!=null&&this.setPickerMinWidth(s),i!=null&&this.setPickerMaxWidth(i)}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()),WS(e,!1),this.ariaRole&&Ga(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 De.UP:case De.DOWN:case De.ENTER:case De.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case De.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:i,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:c,eWrapper:u}=this,d={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const m=UO(c);this.beforeHidePicker(),m&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,o),anchorToElement:u};e.style.position="absolute";const h=c.popupSvc,f=h.addPopup(d);l?(r&&(e.style.minWidth=r),e.style.width=qS(Gm(u)),a&&(e.style.maxWidth=a)):jm(e,a??Gm(u));const p=i??`${zS(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:i}=this,r=o.get("enableRtl")?"right":"left";n.positionPopupByComponent({type:t,eventSource:s,ePopup:i.getGui(),position:"under",alignSide:r,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();WS(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 jm(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()}},Doe=".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)}",k0=class extends Roe{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(Doe)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:zm(()=>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 Soe("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),Yee(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===De.TAB&&this.hidePicker(),t){case De.ENTER:case De.UP:case De.DOWN:case De.PAGE_UP:case De.PAGE_DOWN:case De.PAGE_HOME:case De.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(n=this.listComponent)==null||n.handleKeyDown(e):super.onKeyDown(e);break;case De.ESCAPE:super.onKeyDown(e);break;case De.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:i,tooltipFeature:r}=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),i.textContent=l,r==null||r.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},Toe={selector:"AG-SELECT",component:k0},Foe=':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}}',O0=typeof window!="object"||!((eB=(QV=window==null?void 0:window.document)==null?void 0:QV.fonts)!=null&&eB.forEach),Xu=(e,t,n,o,s,i)=>{if(O0)return;o&&(e=`@layer ${CSS.escape(o)} { ${e} }`);let r=Ju.map.get(t);if(r||(r=[],Ju.map.set(t,r)),r.some(u=>u.css===e))return;const a=document.createElement("style");i&&a.setAttribute("nonce",i),a.dataset.agGlobalCss=n,a.textContent=e;const l={css:e,el:a,priority:s};let c;for(const u of r){if(u.priority>s)break;c=u}if(c){c.el.insertAdjacentElement("afterend",a);const u=r.indexOf(c);r.splice(u+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),r.push(l)},fN=(e,t,n,o)=>{Xu(Foe,e,"shared",t,0,n),o==null||o.forEach((s,i)=>s.forEach(r=>Xu(r,e,i,t,0,n)))},xoe=e=>{Ju.grids.add(e)},Ioe=e=>{if(Ju.grids.delete(e),Ju.grids.size===0){Ju.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},pN,Ju=(pN=typeof window=="object"?window:{}).agStyleInjectionState??(pN.agStyleInjectionState={map:new WeakMap,grids:new Set}),pr=e=>new gN(e),Za="$default",Poe=0,gN=class{constructor({feature:e,params:t,modeParams:n={},css:o,cssImports:s}){this.feature=e,this.css=o,this.cssImports=s,this.modeParams={[Za]:{...n[Za]??{},...t??{}},...n}}use(e,t,n){let o=this._inject;if(o==null){let{css:s}=this;if(s){const i=`ag-theme-${this.feature??"part"}-${++Poe}`;typeof s=="function"&&(s=s()),s=`:where(.${i}) {
|
|
186
186
|
${s}
|
|
@@ -250,4 +250,4 @@ If you are trying to annotate ${o} with application data, use the '${o}.context'
|
|
|
250
250
|
<path d="M11 9C9.89688 9 9 9.89688 9 11V21C9 22.1031 9.89688 23 11 23H21C22.1031 23 23 22.1031 23 21V11C23 9.89688 22.1031 9 21 9H11ZM19.5312 14.5312L15.5312 18.5312C15.2375 18.825 14.7625 18.825 14.4719 18.5312L12.4719 16.5312C12.1781 16.2375 12.1781 15.7625 12.4719 15.4719C12.7656 15.1813 13.2406 15.1781 13.5312 15.4719L15 16.9406L18.4688 13.4688C18.7625 13.175 19.2375 13.175 19.5281 13.4688C19.8187 13.7625 19.8219 14.2375 19.5281 14.5281L19.5312 14.5312Z" fill="#00A18D"/>
|
|
251
251
|
</svg>
|
|
252
252
|
`,ACe=_t(dt({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const n=ps,o=Ib(),{setUserPermissions:s,setEntityPermissions:i}=o,{entityPermissions:r}=Es(o),{addNotification:a}=$h(),l=cn,c=H(null),u={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},d=W(()=>{var We;const ke=((We=r.value)==null?void 0:We.has_create_item_permission)===1;return[{label:"Create manually",value:"new_scene",icon:"Plus",type:"icon",id:"create_new_scene",hide:!ke},{label:"Import from CSV or Excel",value:"import_scenes",icon:"FileImport",type:"icon",hide:!ke,id:"import_scenes_option"},{label:"Update existing (CSV or Excel)",value:"overwrite_scenes",icon:"FilePen",type:"icon",hide:!ke,id:"overwrite_scenes_option"}]}),h=e;af.initialize({wrapVueCellRenderer:Bm,wrapVueCellEditor:GO});const f=H(null),p=H([]),m=cm(),{rowCount:v}=Es(m),w=H(!1),b=H(""),E=EA(),{metricList:C}=Es(E),R=H(""),_=H(!1),T=H(new Set),O=H(new Map),{apiServices:x}=mo(!1,h),{columnDefs:A,checkboxColumn:D,saveColumnConfig:I}=Uve(C,h.entityId,f),P=H();it(()=>A,()=>{var ke;(ke=P.value)==null||ke.updateColumnDefs(A.value)},{deep:!0});const J=(ke,We)=>{I(ke,We)},{updateRowData:Z,setMetricValues:G}=ECe(f),te=W(()=>({isSearching:b.value.length>0,isFiltering:Object.keys(mt.value||{}).length>0})),V=W(qw),$=W(()=>A.value.filter(ke=>{var We;return((We=ke.field)==null?void 0:We.startsWith("metric_"))&&!ke.hide}).map(ke=>{var We;return((We=ke.field)==null?void 0:We.replace("metric_",""))||""}));Hi("timezone",V);const N=W(()=>({autoFetch:!1,workspaceId:h.workspaceId,entityId:h.entityId,metricIds:$.value,updateItemData:Z})),{fetchItems:ee,getMetricList:ie,cusorMap:ne,getMetricValues:se}=SCe(N),Q=W(()=>{if(!f.value)return!1;const ke=f.value.getSelectedRows().length;return ke>0&&ke>=v.value.total}),fe=W(()=>{var ke;return((ke=c.value)==null?void 0:ke.name)||"Items"}),Re=(ke,We)=>{var Yt,Kn,da;v.value.total=ke.meta.total??0,(Yt=ke.meta.next)!=null&&Yt.cursor&&(ne[We+1]=ke.meta.next.cursor),R.value=ke.meta["X-Tsr-signature"]||"",ke.meta.total===0?(Kn=f.value)==null||Kn.showNoRowsOverlay():(da=f.value)==null||da.hideOverlay()},He=Ck(),Ee=H(null),{sortingAPIConfiguration:ot,isSortingRunning:vt}=Es(He),mt=H({preflight_status:"1"});Hi("filterParams",mt);const U=H([]),z=async({page:ke,pageSize:We,filterText:Yt})=>{var Oi;(Oi=f.value)==null||Oi.hideOverlay();const Kn=ne[ke],da=!Kn&&ke>1?(ke-1)*We:void 0,oy=ot.value;oy.length>0&&(vt.value=!0);try{const _r={cursor:Kn,size:We,searchQuery:Yt,offset:da,sort_by:oy,...mt.value},ri=await ee(_r);if(!ri)return{rows:[],total:0};const a_=(Rr=>{const Qf=Rr.data.map(ai=>lI(ai,V.value));return Qf.forEach(ai=>{T.value.add(String(ai.id)),O.value.set(String(ai.id),{})}),Qf})(ri);return Re(ri,ke),{rows:a_,total:v.value.total}}catch(_r){return console.error("Failed to fetch items:",_r),{rows:[],total:0}}finally{vt.value=!1}},{isLoading:me,toggleSidebar:Te,onGridReady:Ne,handleUnSelect:B,handleSelectAll:j,onSearch:ae,firstLoad:ve}=RCe({selectRowData:H([]),isSidebarOpen:w,quickFilterText:b,gridApi:f,perPage:u.ROWS_PER_PAGE,fetcher:z}),Ie=H([]),Ue=()=>{var ke;Ie.value=((ke=f.value)==null?void 0:ke.getSelectedRows())||[]},Le=ks({columnsDisplay:[],rowsDisplay:{fromIndex:0,toIndex:0}}),de=W(()=>({blockLoadDebounceMillis:1e3,columnDefs:A.value,rowModelType:"infinite",cacheBlockSize:u.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:u.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:u.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:Fe,noRowsOverlayComponent:Bm(dX),noRowsOverlayComponentParams:()=>te.value,defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:ke=>ke.data.id,getRowClass:ke=>{if(!ke.data)return["row-empty"];const We=["row-highlight"];return ke.data.id||We.push("row-inactive"),ke.data.isDeleted&&We.push("row-deleted"),ke.data.isArchived&&We.push("row-archived"),We},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:h.workspaceId,entityId:h.entityId,apiServices:x.value,sorting:vt.value},suppressKeyboardEvent:ke=>{const We=ke.event.key;return ke.editing&&We==="Enter"?!1:We==="Enter"?(ke.event.preventDefault(),ke.event.stopPropagation(),!0):We==="ArrowUp"||We==="ArrowDown"||We==="ArrowLeft"||We==="ArrowRight"||We==="Tab"||We==="Enter"},navigateToNextCell:()=>null,onBodyScroll:ke=>{const We=ke.api.getFirstDisplayedRowIndex(),Yt=ke.api.getLastDisplayedRowIndex();Le.rowsDisplay.fromIndex=We,Le.rowsDisplay.toIndex=Yt,Le.columnsDisplay=ke.api.getAllDisplayedVirtualColumns().map(Kn=>Kn.getColId())},onViewportChanged:ke=>{Le.columnsDisplay=ke.api.getAllDisplayedVirtualColumns().map(We=>We.getColId())},suppressHeaderFocus:!0}));function Fe(){if(!f.value)return;let ke=0;f.value.forEachNode(We=>{We.data&&ke++}),v.value.loaded=Math.min(ke,v.value.total)}it(()=>ot,()=>{f.value&&(R.value="",T.value.clear(),f.value.deselectAll(),Object.keys(ne).forEach(ke=>delete ne[Number(ke)]),f.value.purgeInfiniteCache(),f.value.ensureIndexVisible(0),f.value.refreshCells({force:!0}))},{deep:!0});const ut=H(),Et=H(),Bt=()=>{var ke;(ke=Et.value)==null||ke.open()},bn=()=>{var ke;(ke=ut.value)==null||ke.open()},jt=async()=>{ve.value=!0,f.value&&(R.value="",T.value.clear(),Object.keys(ne).forEach(ke=>delete ne[Number(ke)]),await f.value.deselectAll(),await f.value.ensureIndexVisible(0,"top"),await f.value.purgeInfiniteCache(),await f.value.refreshInfiniteCache())},Sn=W(()=>Bn.getInstance().getItem("ITEM_TABLE_APP_VERSION")||""),Qn=H(),Oe=W(()=>{var ke;return(ke=TCe(Sn.value))==null?void 0:ke.map(We=>`<div>• ${We}</div>`).join(`
|
|
253
|
-
`)});function Be(ke){var We;ke==="new_scene"?(We=Qn.value)==null||We.show():ke==="import_scenes"?bn():ke==="overwrite_scenes"&&Bt()}const gt=ke=>{p.value=ke.api.getSelectedRows().map(We=>We.id)},It=ke=>{const We=Ne(ke);return We&&(We.addEventListener("modelUpdated",Fe),We.addEventListener("bodyScroll",()=>We.stopEditing()),We.addEventListener("selectionChanged",Ue),We.addEventListener("columnMoved",Kn=>J(Kn,!0)),We.addEventListener("columnResized",Kn=>J(Kn,!0)),We.addEventListener("firstDataRendered",()=>{ve.value=!1}),!document.querySelector(".ag-body-viewport")),We},Ht=(ke,We)=>{if(!f.value)return;const Yt=f.value.getRowNode(ke);Yt?(f.value.ensureIndexVisible(Number(Yt.rowIndex),"middle"),f.value.flashCells({rowNodes:[Yt],flashDuration:3e3,fadeDuration:1e3})):f.value.ensureIndexVisible(v.value.total-1,"bottom")},qe=yn("switchInstance"),wo=async ke=>{let We;if(!(!x.value||!ke.trim())){me.value=!0;try{We=await x.value.createNewScene({workspaceId:h.workspaceId,entityId:h.entityId,name:ke}),v.value.total<50&&await jt()}catch(Yt){console.error("Error creating new scene:",Yt)}finally{me.value=!1,We!=null&&We.id&&a({id:String(We==null?void 0:We.id),message:`${ke} created successfully`,actions:[{label:"View",variant:"secondary",action:()=>{Ht(String(We==null?void 0:We.id))}},{label:"Scene Hub",variant:"primary",action:Yt=>{if(Yt.ctrlKey||Yt.metaKey){const Kn=Cs({type:"scene_hub",config:{ws_code:h.workspaceId,baseDomain:Bn.getInstance().getItem("BASE_URL")||"",scene_id:String(We==null?void 0:We.id)}}).url;window.open(Kn,"_blank");return}else qe("scene_hub",{id:String(We==null?void 0:We.id)},{showLoading:!1})},btnIcon:"CustomSceneHub"}],icon:PCe,type:"interactive"})}}},ki=ke=>ke.metric_type.code==="number"?"number":"default",sl=async()=>{if(h.entityId)try{const ke=await ie(h.entityId);C.value=ke.data.map(We=>({...We,sortType:ki(We)}))}catch(ke){console.error("Failed to initialize metric list:",ke),C.value=[]}},si=async()=>{if(x.value)try{const ke=await x.value.getUserPermission(h.workspaceId);s(ke)}catch(ke){console.error("Failed to fetch user permissions:",ke)}},ca=async()=>{if(x.value)try{const ke=await x.value.getEntityDetail(h.workspaceId,h.entityId);i(ke.permission),c.value=ke}catch(ke){console.error("Failed to fetch entity details:",ke)}},ua=hS(),{setUser:br}=ua,Sr=async()=>{if(x.value)try{const ke=await x.value.getMe();return br(ke),ke}catch(ke){console.error("Failed to fetch user details:",ke)}},ii=async()=>{var ke;if(x.value)try{const We=await x.value.getWorkspaces(h.workspaceId),Yt=(ke=We.data[0])==null?void 0:ke.ws_user_role_id;return Yt&&ua.setUserRoleId(Yt),We}catch(We){console.error("Failed to fetch workspace details:",We)}};it(()=>[h.entityId,h.workspaceId],async([ke,We])=>{!ke||!We||(Sr(),ii(),sl(),si(),ca())},{immediate:!0,deep:!0}),it($,(ke,We)=>{const Yt=ke.filter(Kn=>!(We!=null&&We.includes(Kn)));Yt.length>0&&se(Array.from(T.value),Yt).then(Kn=>{G(Kn,T.value,Yt)})},{immediate:!0,deep:!0}),it(R,(ke,We)=>{_.value=!!(We&&ke&&We!==ke)}),t({refreshTable:jt});const Er=ke=>{mt.value=ke,jt()},md=ke=>{U.value=ke,jt()},Fn=ke=>{A.value=ke||[]};return(ke,We)=>(K(),Ke(q(LY),{"is-sidebar-open":w.value,onCloseSidebar:q(Te),onSidebarClear:q(Te),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:q(Te)},{"header-left":_e(()=>[ye("h1",{class:X(ke.$style.tableTitle)},"Scenes",2),ye("div",{class:X(ke.$style["beta-tag"])},"Beta",2),ge(q(Vb),{variant:["primary"],options:d.value,onSelect:Be,onHandleClick:We[1]||(We[1]=Yt=>Be("new_scene")),id:"create_scene_dropdown"},{prefix:_e(()=>[ge(q(yt),{id:"create_new_scene",variant:["primary"],onClick:We[0]||(We[0]=Yt=>Be("new_scene")),label:"New"})]),_:1},8,["options"]),Xe((K(),ue("span",ICe,[et(St(Sn.value),1)])),[[q(l),Oe.value||""]])]),"header-actions":_e(()=>[ge(q(NX),{"onUpdate:assignees":md,onApplyFilter:Er,loading:q(ve)},null,8,["loading"]),Xe(ge(q(Nb),{modelValue:b.value,"onUpdate:modelValue":We[2]||(We[2]=Yt=>b.value=Yt),onSearch:q(ae),class:X(ke.$style.itemSearchBox),onClear:We[3]||(We[3]=Yt=>q(ae)("")),id:"item_search_box"},null,8,["modelValue","onSearch","class"]),[[q(n),{isLoading:q(ve),fullwidth:!0}]]),Xe((K(),Ke(q(vA),{status:q(me)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":_.value},{default:_e(()=>[ge(q(yt),{variant:"secondary",disabled:q(me),onClick:jt},{prefix:_e(()=>[ge(q(Ct),{src:"ArrowsRotate"})]),default:_e(()=>[We[5]||(We[5]=et(" Refresh ",-1))]),_:1},8,["disabled"])]),_:1},8,["status","show-badge"])),[[q(n),{isLoading:q(ve),fullwidth:!0}]]),Xe(ge(q(rX),{"model-value":q(A),onChange:We[4]||(We[4]=Yt=>Fn(Yt)),id:"table_customization",gridApi:f.value,ref_key:"tableCustomizationRef",ref:P,"checkbox-column":q(D)},null,8,["model-value","gridApi","checkbox-column"]),[[q(n),{isLoading:q(ve),fullwidth:!0}]])]),grid:_e(({availableHeight:Yt})=>[ge(q(Vve),Jt({id:"item_table_main",ref_key:"agGrid",ref:Ee},de.value,{height:Yt+"px",isSorting:q(vt),onOnGridReady:It,onSelectionChanged:gt}),null,16,["height","isSorting"])]),footer:_e(()=>[ye("div",{class:X(ke.$style.tableFooter),id:"table_footer"},[ye("span",null,[We[6]||(We[6]=et(" Showing ",-1)),ye("b",null,St(q(v).loaded)+" of "+St(q(v).total),1)])],2)]),"new-row":_e(()=>[ge(q(pX),{onCreateNewItem:wo,ref_key:"createNewSceneRef",ref:Qn},null,512)]),"bulk-update-actions":_e(()=>[Xe(ge(q(xY),{selectRowData:Ie.value,"workspace-id":h.workspaceId,"entity-id":h.entityId,"grid-api":f.value,onUnselect:q(B),onSelectAll:q(j),"take-name":fe.value,"selected-all":Q.value,"total-rows":q(v).total,"visible-rows":q(v).loaded,onUpdated:Ue,loading:q(me)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","onSelectAll","take-name","selected-all","total-rows","visible-rows","loading"]),[[Wi,!w.value&&p.value.length>0]])]),snackbar:_e(()=>[ge(q(pZ))]),popup:_e(()=>[ge(Cee,{ref_key:"popupCreateSceneRef",ref:ut,"workspace-id":h.workspaceId,"entity-id":h.entityId,onImportSuccess:jt},null,8,["workspace-id","entity-id"]),ge(xCe,{ref_key:"popupOverwriteScenesRef",ref:Et,"workspace-id":h.workspaceId,"entity-id":h.entityId,onImportSuccess:jt},null,8,["workspace-id","entity-id"])]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1lefh_1",tableFooter:"_tableFooter_1lefh_7",footerStart:"_footerStart_1lefh_17",newRow:"_newRow_1lefh_25","warning-text":"_warning-text_1lefh_44","has-error":"_has-error_1lefh_49",itemSearchBox:"_itemSearchBox_1lefh_53","beta-tag":"_beta-tag_1lefh_57"}}]]),JV="0.0.
|
|
253
|
+
`)});function Be(ke){var We;ke==="new_scene"?(We=Qn.value)==null||We.show():ke==="import_scenes"?bn():ke==="overwrite_scenes"&&Bt()}const gt=ke=>{p.value=ke.api.getSelectedRows().map(We=>We.id)},It=ke=>{const We=Ne(ke);return We&&(We.addEventListener("modelUpdated",Fe),We.addEventListener("bodyScroll",()=>We.stopEditing()),We.addEventListener("selectionChanged",Ue),We.addEventListener("columnMoved",Kn=>J(Kn,!0)),We.addEventListener("columnResized",Kn=>J(Kn,!0)),We.addEventListener("firstDataRendered",()=>{ve.value=!1}),!document.querySelector(".ag-body-viewport")),We},Ht=(ke,We)=>{if(!f.value)return;const Yt=f.value.getRowNode(ke);Yt?(f.value.ensureIndexVisible(Number(Yt.rowIndex),"middle"),f.value.flashCells({rowNodes:[Yt],flashDuration:3e3,fadeDuration:1e3})):f.value.ensureIndexVisible(v.value.total-1,"bottom")},qe=yn("switchInstance"),wo=async ke=>{let We;if(!(!x.value||!ke.trim())){me.value=!0;try{We=await x.value.createNewScene({workspaceId:h.workspaceId,entityId:h.entityId,name:ke}),v.value.total<50&&await jt()}catch(Yt){console.error("Error creating new scene:",Yt)}finally{me.value=!1,We!=null&&We.id&&a({id:String(We==null?void 0:We.id),message:`${ke} created successfully`,actions:[{label:"View",variant:"secondary",action:()=>{Ht(String(We==null?void 0:We.id))}},{label:"Scene Hub",variant:"primary",action:Yt=>{if(Yt.ctrlKey||Yt.metaKey){const Kn=Cs({type:"scene_hub",config:{ws_code:h.workspaceId,baseDomain:Bn.getInstance().getItem("BASE_URL")||"",scene_id:String(We==null?void 0:We.id)}}).url;window.open(Kn,"_blank");return}else qe("scene_hub",{id:String(We==null?void 0:We.id)},{showLoading:!1})},btnIcon:"CustomSceneHub"}],icon:PCe,type:"interactive"})}}},ki=ke=>ke.metric_type.code==="number"?"number":"default",sl=async()=>{if(h.entityId)try{const ke=await ie(h.entityId);C.value=ke.data.map(We=>({...We,sortType:ki(We)}))}catch(ke){console.error("Failed to initialize metric list:",ke),C.value=[]}},si=async()=>{if(x.value)try{const ke=await x.value.getUserPermission(h.workspaceId);s(ke)}catch(ke){console.error("Failed to fetch user permissions:",ke)}},ca=async()=>{if(x.value)try{const ke=await x.value.getEntityDetail(h.workspaceId,h.entityId);i(ke.permission),c.value=ke}catch(ke){console.error("Failed to fetch entity details:",ke)}},ua=hS(),{setUser:br}=ua,Sr=async()=>{if(x.value)try{const ke=await x.value.getMe();return br(ke),ke}catch(ke){console.error("Failed to fetch user details:",ke)}},ii=async()=>{var ke;if(x.value)try{const We=await x.value.getWorkspaces(h.workspaceId),Yt=(ke=We.data[0])==null?void 0:ke.ws_user_role_id;return Yt&&ua.setUserRoleId(Yt),We}catch(We){console.error("Failed to fetch workspace details:",We)}};it(()=>[h.entityId,h.workspaceId],async([ke,We])=>{!ke||!We||(Sr(),ii(),sl(),si(),ca())},{immediate:!0,deep:!0}),it($,(ke,We)=>{const Yt=ke.filter(Kn=>!(We!=null&&We.includes(Kn)));Yt.length>0&&se(Array.from(T.value),Yt).then(Kn=>{G(Kn,T.value,Yt)})},{immediate:!0,deep:!0}),it(R,(ke,We)=>{_.value=!!(We&&ke&&We!==ke)}),t({refreshTable:jt});const Er=ke=>{mt.value=ke,jt()},md=ke=>{U.value=ke,jt()},Fn=ke=>{A.value=ke||[]};return(ke,We)=>(K(),Ke(q(LY),{"is-sidebar-open":w.value,onCloseSidebar:q(Te),onSidebarClear:q(Te),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:q(Te)},{"header-left":_e(()=>[ye("h1",{class:X(ke.$style.tableTitle)},"Scenes",2),ye("div",{class:X(ke.$style["beta-tag"])},"Beta",2),ge(q(Vb),{variant:["primary"],options:d.value,onSelect:Be,onHandleClick:We[1]||(We[1]=Yt=>Be("new_scene")),id:"create_scene_dropdown"},{prefix:_e(()=>[ge(q(yt),{id:"create_new_scene",variant:["primary"],onClick:We[0]||(We[0]=Yt=>Be("new_scene")),label:"New"})]),_:1},8,["options"]),Xe((K(),ue("span",ICe,[et(St(Sn.value),1)])),[[q(l),Oe.value||""]])]),"header-actions":_e(()=>[ge(q(NX),{"onUpdate:assignees":md,onApplyFilter:Er,loading:q(ve)},null,8,["loading"]),Xe(ge(q(Nb),{modelValue:b.value,"onUpdate:modelValue":We[2]||(We[2]=Yt=>b.value=Yt),onSearch:q(ae),class:X(ke.$style.itemSearchBox),onClear:We[3]||(We[3]=Yt=>q(ae)("")),id:"item_search_box"},null,8,["modelValue","onSearch","class"]),[[q(n),{isLoading:q(ve),fullwidth:!0}]]),Xe((K(),Ke(q(vA),{status:q(me)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":_.value},{default:_e(()=>[ge(q(yt),{variant:"secondary",disabled:q(me),onClick:jt},{prefix:_e(()=>[ge(q(Ct),{src:"ArrowsRotate"})]),default:_e(()=>[We[5]||(We[5]=et(" Refresh ",-1))]),_:1},8,["disabled"])]),_:1},8,["status","show-badge"])),[[q(n),{isLoading:q(ve),fullwidth:!0}]]),Xe(ge(q(rX),{"model-value":q(A),onChange:We[4]||(We[4]=Yt=>Fn(Yt)),id:"table_customization",gridApi:f.value,ref_key:"tableCustomizationRef",ref:P,"checkbox-column":q(D)},null,8,["model-value","gridApi","checkbox-column"]),[[q(n),{isLoading:q(ve),fullwidth:!0}]])]),grid:_e(({availableHeight:Yt})=>[ge(q(Vve),Jt({id:"item_table_main",ref_key:"agGrid",ref:Ee},de.value,{height:Yt+"px",isSorting:q(vt),onOnGridReady:It,onSelectionChanged:gt}),null,16,["height","isSorting"])]),footer:_e(()=>[ye("div",{class:X(ke.$style.tableFooter),id:"table_footer"},[ye("span",null,[We[6]||(We[6]=et(" Showing ",-1)),ye("b",null,St(q(v).loaded)+" of "+St(q(v).total),1)])],2)]),"new-row":_e(()=>[ge(q(pX),{onCreateNewItem:wo,ref_key:"createNewSceneRef",ref:Qn},null,512)]),"bulk-update-actions":_e(()=>[Xe(ge(q(xY),{selectRowData:Ie.value,"workspace-id":h.workspaceId,"entity-id":h.entityId,"grid-api":f.value,onUnselect:q(B),onSelectAll:q(j),"take-name":fe.value,"selected-all":Q.value,"total-rows":q(v).total,"visible-rows":q(v).loaded,onUpdated:Ue,loading:q(me)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","onSelectAll","take-name","selected-all","total-rows","visible-rows","loading"]),[[Wi,!w.value&&p.value.length>0]])]),snackbar:_e(()=>[ge(q(pZ))]),popup:_e(()=>[ge(Cee,{ref_key:"popupCreateSceneRef",ref:ut,"workspace-id":h.workspaceId,"entity-id":h.entityId,onImportSuccess:jt},null,8,["workspace-id","entity-id"]),ge(xCe,{ref_key:"popupOverwriteScenesRef",ref:Et,"workspace-id":h.workspaceId,"entity-id":h.entityId,onImportSuccess:jt},null,8,["workspace-id","entity-id"])]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1lefh_1",tableFooter:"_tableFooter_1lefh_7",footerStart:"_footerStart_1lefh_17",newRow:"_newRow_1lefh_25","warning-text":"_warning-text_1lefh_44","has-error":"_has-error_1lefh_49",itemSearchBox:"_itemSearchBox_1lefh_53","beta-tag":"_beta-tag_1lefh_57"}}]]),JV="0.0.154",kCe={key:0},OCe=_t(dt({__name:"app",setup(e){const t=W(()=>n.id.length===0||n.workspaceId.length===0),n=ks({id:"",workspaceId:"",apiConfig:{}}),o=$h(),{showMessage:s,showErrorNetMessage:i}=o,r=["basicInfor"],a=h=>{h.success?s(h.apiCode,"success"):r.includes(h.apiCode)||i(h)},l=H(null),c=()=>{const h=Bn.getInstance().getItem("API_BASE_URL");return h!=null&&h.includes("v1")?h.slice(0,h.lastIndexOf("/v1")):String(h)};Np(()=>{var h,f,p;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",JV);try{if(l.value=So(),!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)||Bn.getInstance().getItem("ws.code");const m={domainApi:c(),wsCode:Bn.getInstance().getItem("ws.code"),entityId:n.id};if(n.apiConfig=(p=l.value)==null?void 0:p.appContext.config.globalProperties.apiConfig,!m.entityId||!m.wsCode||!m.domainApi)throw new Error("API configuration is missing in dashboardConfig");const v=new XV(n.apiConfig,m);v.on("call-api",a),l.value.appContext.config.globalProperties.apiServices=v}catch(m){console.error("Error getting current instance:",m)}}),co(()=>{l.value.appContext.config.globalProperties.apiServices.off("call-api",a)});const u=W(()=>n.id),d=W(()=>n.workspaceId);return Hi("workspaceId",d),Hi("entityId",u),(h,f)=>(K(),ue("div",{class:X(h.$style.dashboardPluginWrapper)},[t.value?(K(),ue("span",kCe," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):u.value?(K(),Ke(q(ACe),{key:1,entityId:u.value,workspaceId:d.value},null,8,["entityId","workspaceId"])):Je("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),r_=async(e={},t={})=>{const n=cD(OCe),o=_q();n.use(o);const s=["apiConfig","workspaceId","id"],i={};Object.entries(e).forEach(([a,l])=>{l!==void 0&&(n.config.globalProperties[a]=l,i[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=i,Object.values(t).forEach(a=>{a&&typeof a.install=="function"&&n.use(a)}),n.config.errorHandler=(a,l,c)=>{console.error("[Vue Error]",a),c&&console.error("[Info]",c)},console.log(`%cArbo Dashboard Plugin v${JV}`,"color: #4CAF50; font-weight: bold;"),console.log(n.config.globalProperties),globalThis.window.$switchInstance=n.config.globalProperties.switchInstance,n.provide("switchInstance",n.config.globalProperties.switchInstance);const r=await mee();return n.use(r),n};globalThis.window!==void 0&&(globalThis.window.arboDashboard=r_),xn.default=r_,xn.initDashboard=r_,Object.defineProperties(xn,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|