@arbocollab/arbo-plugin-item-table 0.0.157 → 0.0.158
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 -7
- package/lib/umd/index.umd.js +3 -3
- package/package.json +1 -1
package/lib/es/index.es.js
CHANGED
|
@@ -40931,7 +40931,7 @@ const Bse = async () => {
|
|
|
40931
40931
|
}, ore = (e) => {
|
|
40932
40932
|
var t, n, o;
|
|
40933
40933
|
if (e) {
|
|
40934
|
-
if (
|
|
40934
|
+
if (Number((t = e.metric_type) == null ? void 0 : t.id) == 1)
|
|
40935
40935
|
return ["none", "not", "range"].includes(e.restricted_type) ? "number" : "dropdown";
|
|
40936
40936
|
if (Number((n = e.metric_type) == null ? void 0 : n.id) == 2)
|
|
40937
40937
|
return e.format_type == "icon" ? "rating" : "dropdown";
|
|
@@ -40939,7 +40939,7 @@ const Bse = async () => {
|
|
|
40939
40939
|
return;
|
|
40940
40940
|
}
|
|
40941
40941
|
}, xl = (e) => {
|
|
40942
|
-
if (
|
|
40942
|
+
if (e)
|
|
40943
40943
|
return ore(e);
|
|
40944
40944
|
};
|
|
40945
40945
|
function hx(e, t) {
|
|
@@ -40989,7 +40989,7 @@ function hx(e, t) {
|
|
|
40989
40989
|
type: void 0
|
|
40990
40990
|
};
|
|
40991
40991
|
}
|
|
40992
|
-
return
|
|
40992
|
+
return o;
|
|
40993
40993
|
}
|
|
40994
40994
|
class mf {
|
|
40995
40995
|
/**
|
|
@@ -41212,7 +41212,7 @@ function tL(e) {
|
|
|
41212
41212
|
* @returns Always returns false, indicating that the refresh was not handled and the cell should be re-rendered.
|
|
41213
41213
|
*/
|
|
41214
41214
|
refresh(n) {
|
|
41215
|
-
return !
|
|
41215
|
+
return !1;
|
|
41216
41216
|
}
|
|
41217
41217
|
getValue() {
|
|
41218
41218
|
var n, o, i;
|
|
@@ -83117,7 +83117,7 @@ const f_e = () => {
|
|
|
83117
83117
|
const [ee, se] = N;
|
|
83118
83118
|
$[ee] || ($[ee] = {}), Object.assign($[ee], se);
|
|
83119
83119
|
}
|
|
83120
|
-
return $;
|
|
83120
|
+
return console.log("Fetched metric values for items:", $), $;
|
|
83121
83121
|
} catch (G) {
|
|
83122
83122
|
return console.error("Failed to fetch metric values:", G), {};
|
|
83123
83123
|
}
|
|
@@ -83261,7 +83261,9 @@ function g_e(e) {
|
|
|
83261
83261
|
const d = r.getRowNode(u);
|
|
83262
83262
|
return d != null && d.data ? (c.forEach((h, f) => {
|
|
83263
83263
|
const p = `metric_${f}`;
|
|
83264
|
-
d.data[p] = h == null ? void 0 : h.value;
|
|
83264
|
+
d.data[p] = (h == null ? void 0 : h.value) || null;
|
|
83265
|
+
const m = `metric_permission_${f}`;
|
|
83266
|
+
d.data[p] = (h == null ? void 0 : h.value) || null, d.data[m] = (h == null ? void 0 : h.auth_permission) || null;
|
|
83265
83267
|
}), d) : null;
|
|
83266
83268
|
});
|
|
83267
83269
|
l.length > 0 && r.refreshCells({
|
|
@@ -84220,7 +84222,7 @@ const y_e = {
|
|
|
84220
84222
|
"beta-tag": "_beta-tag_1lefh_57"
|
|
84221
84223
|
}, N_e = {
|
|
84222
84224
|
$style: M_e
|
|
84223
|
-
}, L_e = /* @__PURE__ */ _t(x_e, [["__cssModules", N_e]]), FB = "0.0.
|
|
84225
|
+
}, L_e = /* @__PURE__ */ _t(x_e, [["__cssModules", N_e]]), FB = "0.0.158", V_e = { key: 0 }, B_e = /* @__PURE__ */ ht({
|
|
84224
84226
|
__name: "app",
|
|
84225
84227
|
setup(e) {
|
|
84226
84228
|
const t = K(() => 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 si(e,...t){return ku(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=ir("__translateVNode"),PS=ir("__datetimeParts"),AS=ir("__numberParts"),Xl=ir("__enableEmitter"),of=ir("__disableEmitter"),gO=ir("__setPluralRules"),mO=ir("__injectWithOption"),kS=ir("__dispose"),Zi={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={[Zi.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Zi.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Zi.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Zi.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`,[Zi.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",[Zi.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 Lu(e,...t){return Im(MQ[e],...t)}function sf(e){if(!tn(e)||qi(e))return e;for(const t in e)if(Ds(e,t))if(!t.includes("."))tn(e[t])&&sf(e[t]);else{const n=t.split("."),o=n.length-1;let i=e,s=!1;for(let r=0;r<o;r++){if(n[r]==="__proto__")throw new Error(`unsafe key: ${n[r]}`);if(n[r]in i||(i[n[r]]=Cn()),!tn(i[n[r]])){L.env.NODE_ENV!=="production"&&or(Lu(Zi.IGNORE_OBJ_FLATTEN,{key:n[r]})),s=!0;break}i=i[n[r]]}if(s||(qi(i)?Bk.includes(n[o])||delete e[t]:(i[n[o]]=e[t],delete e[t])),!qi(i)){const r=i[n[o]];tn(r)&&sf(r)}}return e}function OS(e,t){const{messages:n,__i18n:o,messageResolver:i,flatJson:s}=t,r=Yt(n)?n:$n(o)?Cn():{[e]:Cn()};if($n(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)}),i==null&&s)for(const a in r)Ds(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 i=Object.keys(o);i.length&&i.forEach(s=>{e.mergeLocaleMessage(s,o[s])});{if(tn(t.datetimeFormats)){const s=Object.keys(t.datetimeFormats);s.length&&s.forEach(r=>{e.mergeDateTimeFormat(r,t.datetimeFormats[r])})}if(tn(t.numberFormats)){const s=Object.keys(t.numberFormats);s.length&&s.forEach(r=>{e.mergeNumberFormat(r,t.numberFormats[r])})}}}function CO(e){return me(wl,null,e,0)}function Vu(){return So()}const wO="__INTLIFY_META__",bO=()=>[],NQ=()=>!1;let SO=0;function EO(e){return(t,n,o,i)=>e(n,o,Vu()||void 0,i)}const LQ=()=>{const e=Vu();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,i=e.flatJson,s=Rs?H:Vy;let r=sn(e.inheritLocale)?e.inheritLocale:!0;const a=s(t&&r?t.locale.value:pt(e.locale)?e.locale:tf),l=s(t&&r?t.fallbackLocale.value:pt(e.fallbackLocale)||$n(e.fallbackLocale)||Yt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a.value),c=s(OS(a.value,e)),u=s(Yt(e.datetimeFormats)?e.datetimeFormats:{[a.value]:{}}),d=s(Yt(e.numberFormats)?e.numberFormats:{[a.value]:{}});let h=t?t.missingWarn:sn(e.missingWarn)||Au(e.missingWarn)?e.missingWarn:!0,f=t?t.fallbackWarn:sn(e.fallbackWarn)||Au(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,S=t?t.warnHtmlMessage:sn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,C=!!e.escapeParameter;const R=t?t.modifiers:Yt(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:S,escapeParameter:C,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};de.datetimeFormats=u.value,de.numberFormats=d.value,de.__datetimeFormatters=Yt(T)?T.__datetimeFormatters:void 0,de.__numberFormatters=Yt(T)?T.__numberFormatters:void 0,L.env.NODE_ENV!=="production"&&(de.__v_emitter=Yt(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 I=K({get:()=>a.value,set:de=>{T.locale=de,a.value=de}}),D=K({get:()=>l.value,set:de=>{T.fallbackLocale=de,l.value=de,nf(T,a.value,de)}}),P=K(()=>c.value),A=K(()=>u.value),J=K(()=>d.value);function X(){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(Lu(Zi.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 si(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 se(...de){const[Fe,ut,Et]=de;if(Et&&!tn(Et))throw si(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)||$n(Fe))}function ie(...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)||$n(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=>$n(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)||$n(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)||$n(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=ge(ut),Bt=T.messageResolver(Et,de);return qi(Bt)||Yi(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 W(de){const Fe=U(de);return Fe??(t?t.tm(de)||{}:{})}function ge(de){return c.value[de]||{}}function Te(de,Fe){if(i){const ut={[de]:Fe};for(const Et in ut)Ds(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(i)for(const Et in ut)Ds(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 z(de,Fe){u.value[de]=Fe,T.datetimeFormats=u.value,sO(T,de,Fe)}function ae(de,Fe){u.value[de]=po(u.value[de]||{},Fe),T.datetimeFormats=u.value,sO(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&&Rs&&(st(t.locale,de=>{r&&(a.value=de,T.locale=de,nf(T,a.value,l.value))}),st(t.fallbackLocale,de=>{r&&(l.value=de,T.fallbackLocale=de,nf(T,a.value,l.value))}));const Le={id:SO,locale:I,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:P,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 S},set warnHtmlMessage(de){S=de,T.warnHtmlMessage=de},get escapeParameter(){return C},set escapeParameter(de){C=de,T.escapeParameter=de},t:ee,getLocaleMessage:ge,setLocaleMessage:Te,mergeLocaleMessage:Ne,getPostTranslationHandler:X,setPostTranslationHandler:G,getMissingHandler:te,setMissingHandler:V,[gO]:vt};return Le.datetimeFormats=A,Le.numberFormats=J,Le.rt=se,Le.te=mt,Le.tm=W,Le.d=ne,Le.n=ie,Le.getDateTimeFormat=B,Le.setDateTimeFormat=z,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},i=>{LS=i,i.on.visitComponentTree(({componentInstance:r,treeNode:a})=>{$Q(r,a,t)}),i.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__))}),i.addInspector({id:"vue-i18n-resource-inspector",label:NS["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:VQ["vue-i18n-resource-inspector"]}),i.on.getInspectorTree(r=>{r.app===e&&r.inspectorId==="vue-i18n-resource-inspector"&&jQ(r,t)});const s=new Map;i.on.getInspectorState(async r=>{if(r.app===e&&r.inspectorId==="vue-i18n-resource-inspector")if(i.unhighlightElement(),qQ(r,t),r.nodeId==="global"){if(!s.has(r.app)){const[a]=await i.getComponentInstances(r.app);s.set(r.app,a)}i.highlightElement(s.get(r.app))}else{const a=KQ(r.nodeId,t);a&&i.highlightElement(a)}}),i.on.editInspectorState(r=>{r.app===e&&r.inspectorId==="vue-i18n-resource-inspector"&&ZQ(r,t)}),i.addTimelineLayer({id:"vue-i18n-timeline",label:NS["vue-i18n-timeline"],color:BQ["vue-i18n-timeline"]}),n(!0)})}catch(i){console.error(i),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 i={label:`i18n (${RO(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(i)}}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):qi(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,i]of t.__instances){const s=t.mode==="composition"?i:i.__composer;n!==s&&e.rootNodes.push({id:s.id.toString(),label:`${RO(o)} Scope`})}}function KQ(e,t){let n=null;if(e!=="global"){for(const[o,i]of t.__instances.entries())if(i.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 i="Locale messages info",s=[{type:i,key:"messages",editable:!1,value:VS(e.messages.value)}];t[i]=s;{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)||$n(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)||$n(e.fallbackLocale)||Yt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=En(e.missing)?e.missing:void 0,i=sn(e.silentTranslationWarn)||Au(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,s=sn(e.silentFallbackWarn)||Au(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,r=sn(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=Yt(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(Yt(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,S=e.numberFormats,C=e.flatJson;return{locale:t,fallbackLocale:n,messages:p,flatJson:C,datetimeFormats:b,numberFormats:S,missing:o,missingWarn:i,fallbackWarn:s,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(i){t.locale.value=i},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(i){t.fallbackLocale.value=i},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(i){t.setMissingHandler(i)},get silentTranslationWarn(){return sn(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(i){t.missingWarn=sn(i)?!i:i},get silentFallbackWarn(){return sn(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(i){t.fallbackWarn=sn(i)?!i:i},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(i){t.fallbackFormat=i},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(i){t.setPostTranslationHandler(i)},get sync(){return t.inheritLocale},set sync(i){t.inheritLocale=i},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(i){t.warnHtmlMessage=i!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(i){t.escapeParameter=i},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...i){return Reflect.apply(t.t,t,[...i])},rt(...i){return Reflect.apply(t.rt,t,[...i])},te(i,s){return t.te(i,s)},tm(i){return t.tm(i)},getLocaleMessage(i){return t.getLocaleMessage(i)},setLocaleMessage(i,s){t.setLocaleMessage(i,s)},mergeLocaleMessage(i,s){t.mergeLocaleMessage(i,s)},d(...i){return Reflect.apply(t.d,t,[...i])},getDateTimeFormat(i){return t.getDateTimeFormat(i)},setDateTimeFormat(i,s){t.setDateTimeFormat(i,s)},mergeDateTimeFormat(i,s){t.mergeDateTimeFormat(i,s)},n(...i){return Reflect.apply(t.n,t,[...i])},getNumberFormat(i){return t.getNumberFormat(i)},setNumberFormat(i,s){t.setNumberFormat(i,s)},mergeNumberFormat(i,s){t.mergeNumberFormat(i,s)}};return o.__extender=n,L.env.NODE_ENV!=="production"&&(o.__enableEmitter=i=>{const s=t;s[Xl]&&s[Xl](i)},o.__disableEmitter=()=>{const i=t;i[of]&&i[of]()}),o}function JQ(e,t,n){return{beforeCreate(){const o=Vu();if(!o)throw si(Tn.UNEXPECTED_ERROR);const i=this.$options;if(i.i18n){const s=i.i18n;if(i.__i18n&&(s.__i18n=i.__i18n),s.__root=t,this===this.$root)this.$i18n=FO(e,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=BS(s);const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=FO(e,i);else{this.$i18n=BS({__i18n:i.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=e;i.__i18nGlobal&&yO(t,i,i),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$te=(s,r)=>this.$i18n.te(s,r),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),n.__setInstance(o,this.$i18n)},mounted(){if(L.env.NODE_ENV!=="production"&&this.$i18n){const o=Vu();if(!o)return;const i=this.$i18n;o.__VUE_I18N__=i.__composer;const s=this.__v_emitter=mS();i.__enableEmitter&&i.__enableEmitter(s),s.on("*",rf)}},unmounted(){const o=Vu();if(!o)throw si(Tn.UNEXPECTED_ERROR);const i=this.$i18n;L.env.NODE_ENV!=="production"&&o.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",rf),delete this.__v_emitter),this.$i18n&&(i.__disableEmitter&&i.__disableEmitter(),delete o.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,i.__disposer&&(i.__disposer(),delete i.__disposer,delete i.__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,i)=>[...o,...i.type===Ft?i.children:[i]],[]):t.reduce((n,o)=>{const i=e[o];return i&&(n[o]=i()),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,i=e.i18n||$S({useScope:e.scope,__useComponent:!0});return()=>{const s=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,s),l=i[IS](e.keypath,a,r),c=po(Cn(),o),u=pt(e.tag)||tn(e.tag)?e.tag:xO();return Vc(u,c,l)}}});function eee(e){return $n(e)&&!pt(e[0])}function PO(e,t,n,o){const{slots:i,attrs:s}=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];$n(l)?c=l.map((h,f)=>{const p=i[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(),s),d=pt(e.tag)||tn(e.tag)?e.tag:xO();return Vc(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(Lu(Zi.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));const{instance:a,value:l}=r;if(!a||!a.$)throw si(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);Rs&&e.global===c&&(r.__i18nWatcher=st(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),r.__composer=c,r.textContent=l},unmounted:r=>{Rs&&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(Yt(e)){if(!("path"in e))throw si(Tn.REQUIRED_VALUE,"path");return e}else throw si(Tn.INVALID_VALUE)}function OO(e){const{path:t,locale:n,args:o,choice:i,plural:s}=e,r={},a=o||{};return pt(n)&&(r.locale=n),ao(i)&&(r.plural=i),ao(s)&&(r.plural=s),[t,a,r]}function oee(e,t,...n){const o=Yt(n[0])?n[0]:{};(sn(o.globalInstall)?o.globalInstall:!0)&&([IO.name,"I18nT"].forEach(s=>e.component(s,IO)),[AO.name,"I18nN"].forEach(s=>e.component(s,AO)),[NO.name,"I18nD"].forEach(s=>e.component(s,NO))),e.directive("t",nee(t))}const iee=ir("global-vue-i18n");function see(e={}){const t=__VUE_I18N_LEGACY_API__&&sn(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__;L.env.NODE_ENV!=="production"&&t&&fS(Lu(Zi.DEPRECATE_LEGACY_MODE));const n=sn(e.globalInjection)?e.globalInjection:!0,o=new Map,[i,s]=ree(e,t),r=ir(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),Yt(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(s,s.__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 si(Tn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const v=mS();if(t){const w=s;w.__enableEmitter&&w.__enableEmitter(v)}else{const w=s;w[Xl]&&w[Xl](v)}v.on("*",rf)}},get global(){return s},dispose(){i.stop()},__instances:o,__getInstance:a,__setInstance:l,__deleteInstance:c};return u}function $S(e={}){const t=Vu();if(t==null)throw si(Tn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw si(Tn.NOT_INSTALLED);const n=aee(t),o=cee(n),i=vO(t),s=lee(e,i);if(s==="global")return yO(o,e,i),o;if(s==="parent"){let l=uee(n,t,e.__useComponent);return l==null&&(L.env.NODE_ENV!=="production"&&or(Lu(Zi.NOT_FOUND_PARENT_SCOPE)),l=o),l}const r=n;let a=r.__getInstance(t);if(a==null){const l=po({},e);"__i18n"in i&&(l.__i18n=i.__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"&&s==="local"&&or(Lu(Zi.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 si(Tn.UNEXPECTED_ERROR);return[n,o]}function aee(e){const t=yn(e.isCE?iee:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw si(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 i=t.root;let s=dee(t,n);for(;s!=null;){const r=e;if(e.mode==="composition")o=r.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const a=r.__getInstance(s);a!=null&&(o=a.__composer,n&&o&&!o[mO]&&(o=null))}if(o!=null||i===s)break;s=s.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 i=n;i[Xl]&&i[Xl](o),o.on("*",rf)}},t),Mc(()=>{const i=n;L.env.NODE_ENV!=="production"&&(o&&o.off("*",rf),i[of]&&i[of](),delete t.__VUE_I18N__),e.__deleteInstance(t);const s=i[kS];s&&(s(),delete i[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(i=>{const s=Object.getOwnPropertyDescriptor(t,i);if(!s)throw si(Tn.UNEXPECTED_ERROR);const r=an(s.value)?{get(){return s.value.value},set(a){s.value.value=a}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,i,r)}),e.config.globalProperties.$i18n=n,MO.forEach(i=>{const s=Object.getOwnPropertyDescriptor(t,i);if(!s||!s.value)throw si(Tn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${i}`,s)}),()=>{delete e.config.globalProperties.$i18n,MO.forEach(i=>{delete e.config.globalProperties[`$${i}`]})}}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,iO,(...o)=>n[PS](...o))}});if(kQ(),oQ(MJ),iQ(JJ),sQ(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),see({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)=>(j(),ue("div",{class:Z(t.$style["inform-layout"])},[e.state==="importing"?(j(),ue("div",{key:0,class:Z(t.$style["import-error"]),style:{width:"500px"}},[me(q(lm),{src:"UploadInProgress","max-height":180,"max-width":180})],2)):e.state==="error"?(j(),ue("div",{key:1,class:Z(t.$style["import-error"]),style:{width:"500px"}},[me(q(lm),{src:"Unsuccessful1","max-height":180,"max-width":180}),ye("span",{class:Z(t.$style["step-title"])}," File doesn’t meet requirements. Check file and try again. ",2),ye("div",vee,[ye("span",{class:Z(t.$style["step-description"])},"Error code",2),ye("span",{class:Z(t.$style["step-description"])},St(e.errorMessage),3)])],2)):e.state==="success"?(j(),ue(Ft,{key:2},[me(q(lm),{src:"Successful1","max-height":180,"max-width":180}),ye("span",{class:Z(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 i=(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},s=document.createElement("div");s.style.display="flex",s.style.flexDirection="column";const r=document.createElement("div"),a=document.createElement("div"),l=i("Valid formats:","normal","14px","#02C39A"),c=i("Invalid formats:","normal","14px","#FF5200"),u=i(" 2025.12.31, 2025-12-31, 2025/12/31 ","normal","14px",""),d=i(" 12.31.2025, 2025.31.12","normal","14px","");return r.appendChild(l),r.appendChild(u),a.appendChild(c),a.appendChild(d),s.appendChild(r),s.appendChild(a),s.outerHTML})(),o=cn;return(i,s)=>(j(),ue("div",{class:Z(i.$style["date-format-guide"])},[ye("span",{class:Z(i.$style["step-title-2"])},[s[0]||(s[0]=et(" Date format guide ",-1)),Xe(me(q(Ct),{src:"InfoCircle",color:"#A6A6A6"},null,512),[[q(o),{content:q(n)}]])],2),ye("div",{class:Z(i.$style["date-rule-section"])},[s[3]||(s[3]=ye("span",null,"Enter dates in one of these formats:",-1)),ye("ul",{class:Z(i.$style["step-description"])},[ye("li",{class:Z(i.$style["date-rule"])},[...s[1]||(s[1]=[ye("b",null,"DD MM YYYY",-1),et(" (Day-Month-Year) ",-1)])],2),ye("li",{class:Z(i.$style["date-rule"])},[...s[2]||(s[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),i=e,s=()=>{o.value&&o.value.show()},r=H(""),a=H("idle"),l=K(()=>({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,i),h=async I=>{var P,A;if(((P=d==null?void 0:d.value)==null?void 0:P.getStatuses)===void 0){console.error("API services not available",(A=d==null?void 0:d.value)==null?void 0:A.getStatuses);return}return await d.value.getStatuses(i.workspaceId,i.entityId,I)},f=H(!1),p=async()=>{f.value=!0;const I=i.workspaceId,D=i.entityId;if(!I||!D||!d.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await d.value.downloadTemplate(I,D))throw new Error("No response from downloadTemplate API")}catch(P){console.error("Error downloading template:",P)}f.value=!1},m=async I=>{var A,J,X;const D=new FormData,P=((A=I.name.split(".").pop())==null?void 0:A.toString())||"";if(D.append("file",I),D.append("format",P),D.append("entity_id",i.entityId||""),D.append("template_flow_status_id",R.value||""),!d.value||!i.workspaceId||!i.entityId){console.error("API services not available");return}try{await d.value.addNewSceneViaImportFile(i.workspaceId,i.entityId,D),v()}catch(G){throw console.error("Error uploading file:",G),w(((X=(J=G.response)==null?void 0:J.data)==null?void 0:X.message)||"An unknown error occurred during file upload."),G}},v=()=>{a.value="success"},w=I=>{r.value=I,a.value="error"},b=n,S=()=>{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:s});const R=H(null),_=K(()=>!u.value.file||!u.value.format||!u.value.isValid||!R.value),T=H(null),O=()=>{var I,D;(I=c.value)==null||I.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 I;O(),(I=o.value)==null||I.hide()};return(I,D)=>(j(),je(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"?(j(),je(LO,{key:0,state:a.value,"error-message":r.value},null,8,["state","error-message"])):(j(),ue("div",yee,[ye("div",{class:Z(I.$style["step-section"])},[ye("span",{class:Z(I.$style["step-title"])},"Step 1: Download sample file",2),ye("span",{class:Z(I.$style["step-description"])}," Get a sample file with all columns ready for editing. ",2),me(q(yt),{class:Z(I.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:f.value,onHandleClick:p},{prefix:_e(()=>[me(q(Ct),{src:"Download"})]),default:_e(()=>[D[2]||(D[2]=et(" Download sample file ",-1))]),_:1},8,["class","disabled"])],2),ye("div",{class:Z(I.$style["step-section"])},[ye("span",{class:Z(I.$style["step-title"])},"Step 2: Upload your file (.xlsx, .xls, .csv)",2),me(q(wk),{modelValue:u.value,"onUpdate:modelValue":D[0]||(D[0]=P=>u.value=P),ref_key:"filUploaderRef",ref:c},null,8,["modelValue"])],2),ye("div",{class:Z(I.$style["step-section"])},[ye("span",{class:Z(I.$style["step-title"])},"Step 3: Select status",2),ye("span",{class:Z(I.$style["step-description"])},"Choose a status for the new work.",2),me(q(lX),{ref_key:"statusRef",ref:T,modelValue:R.value,"onUpdate:modelValue":D[1]||(D[1]=P=>R.value=P),"get-status-func":h,"workspace-id":i.workspaceId,id:i.entityId},null,8,["modelValue","workspace-id","id"])],2),ye("div",{class:Z(I.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[me(VO)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:_e(()=>[me(q(yt),{style:{flex:"1"},variant:"secondary",onClick:x},{default:_e(()=>[...D[3]||(D[3]=[et(" Cancel ",-1)])]),_:1}),me(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(()=>[me(q(yt),{style:{flex:"1"},variant:"primary",onClick:S},{default:_e(()=>[...D[5]||(D[5]=[et(" Close ",-1)])]),_:1})]),key:"1"}:a.value=="error"?{name:"footer",fn:_e(()=>[me(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=>{var t,n,o;if(e){if(console.log("verifyMetric",{metricConfig:e}),Number((t=e.metric_type)==null?void 0:t.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number((n=e.metric_type)==null?void 0:n.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number((o=e.metric_type)==null?void 0:o.id)==3)return}},Jl=e=>{if(console.log("checkEditType",{metricConfig:e}),!!e)return _ee(e)};function HO(e,t){var i,s,r,a;const n=(i=t==null?void 0:t.data)==null?void 0:i.permissions;let o={disabled:!1,readOnly:!1,type:void 0};if(!t||!e)o={disabled:!1,readOnly:!0,type:void 0};else if(e==="options")o={disabled:!1,readOnly:!1,type:void 0};else if(e!=null&&e.includes("metric")){const l=`metric_permission_${e==null?void 0:e.replace("metric_","")}`;o={disabled:!1,readOnly:!((t==null?void 0:t.data)&&t.data[l]&&((s=t.data[l])==null?void 0:s.permission)==2&&!((r=t.colDef)!=null&&r.context.formula)),type:Jl((a=t.colDef)==null?void 0:a.context)}}else{const c={assignees:(n==null?void 0:n.has_update_assignee_permission)??0,completedOn:0,name:(n==null?void 0:n.has_edit_permission)??0,permissions:0,status:(n==null?void 0:n.has_edit_template_flow_status_permission)??0,dateRange:(n==null?void 0:n.has_edit_date_permission)??0,isStarted:0,isDeleted:0,isArchived:0,isProcessing:0,lastUpdated:0,id:0,isCompleted:0,options:1}[e]??0;o={disabled:c===-1,readOnly:c!==1,type:void 0}}return console.log("fieldPermission",{field:e,res:o}),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),i=(u=t.colDef)==null?void 0:u.field,s=i&&o?o[i]:void 0,r=HO((d=t.colDef)==null?void 0:d.field,t),a=typeof n=="function"?n(t):n??{};return{...t,value:s,disabled:r==null?void 0:r.disabled,readOnly:r==null?void 0:r.readOnly,type:Jl(t.context),...a}}static resolveRendererComponent(t,n){let o;return t.includes("metric")&&BO.metric?Jl(n)==="rating"?o=LX:o=kA:o=BO[t]??void 0,o}static resolveEditorComponent(t,n){const o=t.includes("metric");let i;const s=Jl(n);return o&&["number","dropdown"].includes(s)?i=uX:i=bee[t],i}static canEditField(t,n){var s;if(n.data===void 0)return!1;const o=HO((s=n.colDef)==null?void 0:s.field,n),i=wee[t]??!0;return!(o!=null&&o.disabled)&&!(o!=null&&o.readOnly)&&i&&(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??""),i=this.resolveSize(o),s=Eee[o]??{},r=Jl(t.context),a=r==="number"||r==="rating",l=r=="rating"?t.context.range*24+20:i.minWidth;return{...t,headerName:t.headerName,...i,...t,cellEditorSelector:u=>{const d=this.resolveEditorComponent(o,t.context);return Jl(t.context),{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),...s,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=K(()=>o.value=="MoreOption"?"100%":`${Math.floor(Math.random()*31)+60}%`),n=e,o=K(()=>{var a;return((a=n.component)==null?void 0:a.name)||"UnknownComponent"}),i=K(()=>{var a;return((a=n.component)==null?void 0:a.default)||n.component}),s=K(()=>o.value=="EmptyData"||"eGridHeader"in n.params?!1:o.value=="MoreOption"||o.value=="MoreOptionEditor"?!n.params.data:n.value===void 0),r=K(()=>({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)=>s.value?(j(),ue("div",{key:0,style:pn({"--width":t.value}),class:Z(a.$style.skeleton)},[ye("div",{class:Z(a.$style.shimmer)},null,2)],6)):(j(),je(HR(i.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 i=n.context.apiClass,s=n,r={component:e,params:Object.freeze(n),disabled:!1,readOnly:s.readOnly??!1,value:n.value,maxRating:s.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:i,tooltip:s.tooltip??void 0,isSearching:s.isSearching??!1,isFiltering:s.isFiltering??!1,isNoData:s.isNoData??!1};this.vNode=me(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,i;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((i=(o=this.componentInstance).getValue)==null?void 0:i.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"),i=((c=this.params)==null?void 0:c.context)&&Jl(this.params.context);return o||(i==="number"||i==="rating")||!this.isEditor?!1:(u=this.componentInstance)!=null&&u.isPopup?this.componentInstance.isPopup():!0}getPopupPosition(){var o,i,s;return this.isEditor?(o=this.componentInstance)!=null&&o.getPopupPosition?this.componentInstance.getPopupPosition():((s=(i=this.params)==null?void 0:i.colDef)==null?void 0:s.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(i){console.warn("[Vue3CellWrapper] Error during $destroy:",i)}try{typeof n.destroy=="function"&&n.destroy()}catch(i){console.warn("[Vue3CellWrapper] Error during destroy():",i)}}(typeof queueMicrotask=="function"?queueMicrotask:i=>Promise.resolve().then(i))(()=>{try{lD(null,this.container)}catch(i){console.warn("[Vue3CellWrapper] Error during unmount:",i)}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 Ql=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 i=o.get(e);return!i&&n&&(i=new Set,o.set(e,i)),i}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,i=a=>{const l=o?()=>o.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},s=this.getListeners(n,t,!1);if(((s==null?void 0:s.size)??0)>0){const a=new Set(s);for(const l of a)s!=null&&s.has(l)&&i(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)i(()=>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 it(e){return e!=null&&e!==""}function An(e){return!it(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,i=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),o&&i)return 0;if(o)return-1;if(i)return 1;function s(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!n)return s(e,t);try{return e.localeCompare(t)}catch{return s(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 i=t.get("getDocument");return i&&it(i)?o=i():n&&(o=n.ownerDocument),o&&it(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 Ts(e,t,n){n==null||typeof n=="string"&&n==""?zO(e,t):Xi(e,t,n)}function Xi(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){Ts(e,"label",t)}function uf(e,t){Ts(e,"labelledby",t)}function KO(e,t){Ts(e,"live",t)}function Mee(e,t){Ts(e,"atomic",t)}function Nee(e,t){Ts(e,"relevant",t)}function Lee(e,t){Ts(e,"invalid",t)}function Vee(e,t){Ts(e,"disabled",t)}function qO(e,t){Ts(e,"hidden",t)}function WS(e,t){Xi(e,"expanded",t)}function Bee(e,t){Xi(e,"setsize",t)}function Hee(e,t){Xi(e,"posinset",t)}function $ee(e,t){Xi(e,"multiselectable",t)}function Gee(e,t){Xi(e,"rowcount",t)}function Hm(e,t){Xi(e,"rowindex",t)}function Uee(e,t){Xi(e,"rowspan",t)}function Wee(e,t){Xi(e,"colcount",t)}function YO(e,t){Xi(e,"colindex",t)}function zee(e,t){Xi(e,"colspan",t)}function jee(e,t){Xi(e,"sort",t)}function Kee(e){zO(e,"sort")}function ZO(e,t){Ts(e,"selected",t)}function qee(e,t){Ts(e,"controls",t)}function Yee(e,t){qee(e,t.id),uf(t,e.id)}function XO(e,t){Ts(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?s=>s.setAttribute(n,""):s=>s.removeAttribute(n);o(e);const i=e.querySelectorAll("input")??[];for(const s of i)o(s)}function ec(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 tc(e){const{height:t,width:n,borderTopWidth:o,borderRightWidth:i,borderBottomWidth:s,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(i||"0"),borderBottomWidth:v(s||"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=tc(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function ff(e){const t=tc(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}=tc(e);return Math.floor(t+n+o)}function Gm(e){const{width:t,marginLeft:n,marginRight:o}=tc(e);return Math.floor(t+n+o)}function eM(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:o,borderRightWidth:i,borderBottomWidth:s}=tc(e);return{top:t.top+(n||0),left:t.left+(o||0),right:t.right+(i||0),bottom:t.bottom+(s||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 Fs(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],i=e.children[n];i!==o&&e.insertBefore(o,i)}}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 i=Jee(n),s=o.toString(),r=s.replace(/\s*!important/g,""),a=r.length!=s.length?"important":void 0;e.style.setProperty(i,r,a)}}function zm(e){return()=>{const t=e();return t?KS(t)||iM(t):!0}}function KS(e){return e.clientWidth<e.scrollWidth}function iM(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 Fi(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Ua(e,t,n){const i=WO(e).ResizeObserver,s=i?new i(n):null;return s==null||s.observe(t),()=>s==null?void 0:s.disconnect()}function Jr(e,t){const n=WO(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var sM="data-ref",ZS;function rM(){return ZS??(ZS=document.createTextNode(" ")),ZS.cloneNode()}function mf(e){const{attrs:t,children:n,cls:o,ref:i,role:s,tag:r}=e,a=document.createElement(r);if(o&&(a.className=o),i&&a.setAttribute(sM,i),s&&a.setAttribute("role",s),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 ite(e,t,n){const o=ste(t);let i;o!=null&&(i={passive:o}),e.addEventListener(t,n,i)}var ste=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),i=Math.abs(e.clientY-t.clientY);return Math.max(o,i)<=n}var vf=(e,t)=>{const n=e.identifier;for(let o=0,i=t.length;o<i;++o){const s=t[o];if(s.identifier===n)return s}return null};function yf(e,t){return e.gos.isElementInThisInstance(t.target)}function rte(e,t,n){const i=e.getBoundingClientRect().height,s=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-i/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;s>0&&h+e.clientWidth>s+v&&(h=s+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,i,s,r]=n;o.addEventListener(i,s,r),e.push(n)}},JS=e=>{if(e){for(const[t,n,o,i]of e)t.removeEventListener(n,o,i);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 i=t[n];return e.getLocaleTextFunc()(n,typeof i=="function"?i(o):i,o)}function cte(e){return(t,n,o)=>e({key:t,defaultValue:n,variableValues:o})}function ute(e){return(t,n,o)=>{let i=e==null?void 0:e[t];if(i&&(o!=null&&o.length)){let s=0;for(;!(s>=o.length||i.indexOf("${variable}")===-1);)i=i.replace("${variable}",o[s++])}return i??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 Ql),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 i=t[o];i&&n.push(this._setupListener(e,o,i))}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 i=hte(e);e instanceof HTMLElement?ite(e,t,n):i?e.addListener(t,n):e.addEventListener(t,n),o=i?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==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(i=>i!==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=i=>{if(i.changeSet){if(i.changeSet&&i.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=i.changeSet.id}const s={type:"propertyChanged",changeSet:i.changeSet,source:i.source};t(s)};for(const i of e)this.setupPropertyListener(i,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 i=()=>{const s=o.funcs.slice();o.funcs.length=0,o.pending=!1;for(const r of s)r()};t==="raf"?Jr(n,i):window.setTimeout(i,0)}function To(e,t,n){let o;return function(...i){const s=this;window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(s,i)},n)}}function dM(e,t){let n=0;return function(...o){const i=this,s=Date.now();s-n<t||(n=s,e.apply(i,o))}}function gte(e,t,n,o=100){const i=Date.now();let s=null,r=!1;const a=()=>{s!=null&&(window.clearInterval(s),s=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-i>o;(t()||c)&&(n(),r=!0,a())};l(),r||(s=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){it(t)&&mte(t,(i,s)=>{let r=e[i];r!==s&&(o&&r==null&&s!=null&&typeof s=="object"&&s.constructor===Object&&(r={},e[i]=r),fM(s)&&fM(r)&&!Array.isArray(r)?Zo(r,s,n,o):(n||s!==void 0)&&(e[i]=s))})}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,i]=Ym.split(".")||[];return t===o&&n===i}function bte(e){var o;Ym||(Ym=e.version);const t=i=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${i} 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 i;t!==void 0?(vM=!0,Gu[t]===void 0&&(Gu[t]={}),i=Gu[t]):i=qm;for(const s of o)i[s]===void 0&&(i[s]={}),i[s][e.moduleName]=e;if(e.dependsOn)for(const s of e.dependsOn)wf(s,t,n)}function Ste(e){delete Gu[e]}function o0(e,t,n){const o=i=>{var s,r,a;return!!((s=qm[i])!=null&&s[e])||!!((a=(r=Gu[t])==null?void 0:r[i])!=null&&a[e])};return o(n)||o("all")}function i0(){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 s0(e,t,n,o,i){e(`${o?"warning":"error"} #${t}`,...bM(t,n,i))}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((s,r)=>r[1].length-s[1].length);let i=r0(e,t);for(const[s,r]of o){if(s===wM)continue;const a=i.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(s,u),i=r0(e,t)}return i}function SM(e,t){const n=new URLSearchParams;if(n.append(wM,tt),t)for(const s of Object.keys(t))n.append(s,Pte(t[s]));const o=`${Uu}/errors/${e}`,i=r0(o,n);return i.length<=yM?i: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 i=(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},s=document.createElement("div");s.style.display="flex",s.style.flexDirection="column";const r=document.createElement("div"),a=document.createElement("div"),l=i("Valid formats:","normal","14px","#02C39A"),c=i("Invalid formats:","normal","14px","#FF5200"),u=i(" 2025.12.31, 2025-12-31, 2025/12/31 ","normal","14px",""),d=i(" 12.31.2025, 2025.31.12","normal","14px","");return r.appendChild(l),r.appendChild(u),a.appendChild(c),a.appendChild(d),s.appendChild(r),s.appendChild(a),s.outerHTML})(),o=cn;return(i,s)=>(j(),ue("div",{class:Z(i.$style["date-format-guide"])},[ye("span",{class:Z(i.$style["step-title-2"])},[s[0]||(s[0]=et(" Date format guide ",-1)),Xe(me(q(Ct),{src:"InfoCircle",color:"#A6A6A6"},null,512),[[q(o),{content:q(n)}]])],2),ye("div",{class:Z(i.$style["date-rule-section"])},[s[3]||(s[3]=ye("span",null,"Enter dates in one of these formats:",-1)),ye("ul",{class:Z(i.$style["step-description"])},[ye("li",{class:Z(i.$style["date-rule"])},[...s[1]||(s[1]=[ye("b",null,"DD MM YYYY",-1),et(" (Day-Month-Year) ",-1)])],2),ye("li",{class:Z(i.$style["date-rule"])},[...s[2]||(s[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),i=e,s=()=>{o.value&&o.value.show()},r=H(""),a=H("idle"),l=K(()=>({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,i),h=async I=>{var P,A;if(((P=d==null?void 0:d.value)==null?void 0:P.getStatuses)===void 0){console.error("API services not available",(A=d==null?void 0:d.value)==null?void 0:A.getStatuses);return}return await d.value.getStatuses(i.workspaceId,i.entityId,I)},f=H(!1),p=async()=>{f.value=!0;const I=i.workspaceId,D=i.entityId;if(!I||!D||!d.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await d.value.downloadTemplate(I,D))throw new Error("No response from downloadTemplate API")}catch(P){console.error("Error downloading template:",P)}f.value=!1},m=async I=>{var A,J,X;const D=new FormData,P=((A=I.name.split(".").pop())==null?void 0:A.toString())||"";if(D.append("file",I),D.append("format",P),D.append("entity_id",i.entityId||""),D.append("template_flow_status_id",R.value||""),!d.value||!i.workspaceId||!i.entityId){console.error("API services not available");return}try{await d.value.addNewSceneViaImportFile(i.workspaceId,i.entityId,D),v()}catch(G){throw console.error("Error uploading file:",G),w(((X=(J=G.response)==null?void 0:J.data)==null?void 0:X.message)||"An unknown error occurred during file upload."),G}},v=()=>{a.value="success"},w=I=>{r.value=I,a.value="error"},b=n,S=()=>{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:s});const R=H(null),_=K(()=>!u.value.file||!u.value.format||!u.value.isValid||!R.value),T=H(null),O=()=>{var I,D;(I=c.value)==null||I.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 I;O(),(I=o.value)==null||I.hide()};return(I,D)=>(j(),je(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"?(j(),je(LO,{key:0,state:a.value,"error-message":r.value},null,8,["state","error-message"])):(j(),ue("div",yee,[ye("div",{class:Z(I.$style["step-section"])},[ye("span",{class:Z(I.$style["step-title"])},"Step 1: Download sample file",2),ye("span",{class:Z(I.$style["step-description"])}," Get a sample file with all columns ready for editing. ",2),me(q(yt),{class:Z(I.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:f.value,onHandleClick:p},{prefix:_e(()=>[me(q(Ct),{src:"Download"})]),default:_e(()=>[D[2]||(D[2]=et(" Download sample file ",-1))]),_:1},8,["class","disabled"])],2),ye("div",{class:Z(I.$style["step-section"])},[ye("span",{class:Z(I.$style["step-title"])},"Step 2: Upload your file (.xlsx, .xls, .csv)",2),me(q(wk),{modelValue:u.value,"onUpdate:modelValue":D[0]||(D[0]=P=>u.value=P),ref_key:"filUploaderRef",ref:c},null,8,["modelValue"])],2),ye("div",{class:Z(I.$style["step-section"])},[ye("span",{class:Z(I.$style["step-title"])},"Step 3: Select status",2),ye("span",{class:Z(I.$style["step-description"])},"Choose a status for the new work.",2),me(q(lX),{ref_key:"statusRef",ref:T,modelValue:R.value,"onUpdate:modelValue":D[1]||(D[1]=P=>R.value=P),"get-status-func":h,"workspace-id":i.workspaceId,id:i.entityId},null,8,["modelValue","workspace-id","id"])],2),ye("div",{class:Z(I.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[me(VO)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:_e(()=>[me(q(yt),{style:{flex:"1"},variant:"secondary",onClick:x},{default:_e(()=>[...D[3]||(D[3]=[et(" Cancel ",-1)])]),_:1}),me(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(()=>[me(q(yt),{style:{flex:"1"},variant:"primary",onClick:S},{default:_e(()=>[...D[5]||(D[5]=[et(" Close ",-1)])]),_:1})]),key:"1"}:a.value=="error"?{name:"footer",fn:_e(()=>[me(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=>{var t,n,o;if(e){if(Number((t=e.metric_type)==null?void 0:t.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number((n=e.metric_type)==null?void 0:n.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number((o=e.metric_type)==null?void 0:o.id)==3)return}},Jl=e=>{if(e)return _ee(e)};function HO(e,t){var i,s,r,a;const n=(i=t==null?void 0:t.data)==null?void 0:i.permissions;let o={disabled:!1,readOnly:!1,type:void 0};if(!t||!e)o={disabled:!1,readOnly:!0,type:void 0};else if(e==="options")o={disabled:!1,readOnly:!1,type:void 0};else if(e!=null&&e.includes("metric")){const l=`metric_permission_${e==null?void 0:e.replace("metric_","")}`;o={disabled:!1,readOnly:!((t==null?void 0:t.data)&&t.data[l]&&((s=t.data[l])==null?void 0:s.permission)==2&&!((r=t.colDef)!=null&&r.context.formula)),type:Jl((a=t.colDef)==null?void 0:a.context)}}else{const c={assignees:(n==null?void 0:n.has_update_assignee_permission)??0,completedOn:0,name:(n==null?void 0:n.has_edit_permission)??0,permissions:0,status:(n==null?void 0:n.has_edit_template_flow_status_permission)??0,dateRange:(n==null?void 0:n.has_edit_date_permission)??0,isStarted:0,isDeleted:0,isArchived:0,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),i=(u=t.colDef)==null?void 0:u.field,s=i&&o?o[i]:void 0,r=HO((d=t.colDef)==null?void 0:d.field,t),a=typeof n=="function"?n(t):n??{};return{...t,value:s,disabled:r==null?void 0:r.disabled,readOnly:r==null?void 0:r.readOnly,type:Jl(t.context),...a}}static resolveRendererComponent(t,n){let o;return t.includes("metric")&&BO.metric?Jl(n)==="rating"?o=LX:o=kA:o=BO[t]??void 0,o}static resolveEditorComponent(t,n){const o=t.includes("metric");let i;const s=Jl(n);return o&&["number","dropdown"].includes(s)?i=uX:i=bee[t],i}static canEditField(t,n){var s;if(n.data===void 0)return!1;const o=HO((s=n.colDef)==null?void 0:s.field,n),i=wee[t]??!0;return!(o!=null&&o.disabled)&&!(o!=null&&o.readOnly)&&i&&(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??""),i=this.resolveSize(o),s=Eee[o]??{},r=Jl(t.context),a=r==="number"||r==="rating",l=r=="rating"?t.context.range*24+20:i.minWidth;return{...t,headerName:t.headerName,...i,...t,cellEditorSelector:u=>{const d=this.resolveEditorComponent(o,t.context);return Jl(t.context),{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),...s,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=K(()=>o.value=="MoreOption"?"100%":`${Math.floor(Math.random()*31)+60}%`),n=e,o=K(()=>{var a;return((a=n.component)==null?void 0:a.name)||"UnknownComponent"}),i=K(()=>{var a;return((a=n.component)==null?void 0:a.default)||n.component}),s=K(()=>o.value=="EmptyData"||"eGridHeader"in n.params?!1:o.value=="MoreOption"||o.value=="MoreOptionEditor"?!n.params.data:n.value===void 0),r=K(()=>({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)=>s.value?(j(),ue("div",{key:0,style:pn({"--width":t.value}),class:Z(a.$style.skeleton)},[ye("div",{class:Z(a.$style.shimmer)},null,2)],6)):(j(),je(HR(i.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 i=n.context.apiClass,s=n,r={component:e,params:Object.freeze(n),disabled:!1,readOnly:s.readOnly??!1,value:n.value,maxRating:s.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:i,tooltip:s.tooltip??void 0,isSearching:s.isSearching??!1,isFiltering:s.isFiltering??!1,isNoData:s.isNoData??!1};this.vNode=me(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!1}getValue(){var n,o,i;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((i=(o=this.componentInstance).getValue)==null?void 0:i.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"),i=((c=this.params)==null?void 0:c.context)&&Jl(this.params.context);return o||(i==="number"||i==="rating")||!this.isEditor?!1:(u=this.componentInstance)!=null&&u.isPopup?this.componentInstance.isPopup():!0}getPopupPosition(){var o,i,s;return this.isEditor?(o=this.componentInstance)!=null&&o.getPopupPosition?this.componentInstance.getPopupPosition():((s=(i=this.params)==null?void 0:i.colDef)==null?void 0:s.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(i){console.warn("[Vue3CellWrapper] Error during $destroy:",i)}try{typeof n.destroy=="function"&&n.destroy()}catch(i){console.warn("[Vue3CellWrapper] Error during destroy():",i)}}(typeof queueMicrotask=="function"?queueMicrotask:i=>Promise.resolve().then(i))(()=>{try{lD(null,this.container)}catch(i){console.warn("[Vue3CellWrapper] Error during unmount:",i)}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 Ql=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 i=o.get(e);return!i&&n&&(i=new Set,o.set(e,i)),i}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,i=a=>{const l=o?()=>o.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},s=this.getListeners(n,t,!1);if(((s==null?void 0:s.size)??0)>0){const a=new Set(s);for(const l of a)s!=null&&s.has(l)&&i(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)i(()=>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 it(e){return e!=null&&e!==""}function An(e){return!it(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,i=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),o&&i)return 0;if(o)return-1;if(i)return 1;function s(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!n)return s(e,t);try{return e.localeCompare(t)}catch{return s(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 i=t.get("getDocument");return i&&it(i)?o=i():n&&(o=n.ownerDocument),o&&it(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 Ts(e,t,n){n==null||typeof n=="string"&&n==""?zO(e,t):Xi(e,t,n)}function Xi(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){Ts(e,"label",t)}function uf(e,t){Ts(e,"labelledby",t)}function KO(e,t){Ts(e,"live",t)}function Mee(e,t){Ts(e,"atomic",t)}function Nee(e,t){Ts(e,"relevant",t)}function Lee(e,t){Ts(e,"invalid",t)}function Vee(e,t){Ts(e,"disabled",t)}function qO(e,t){Ts(e,"hidden",t)}function WS(e,t){Xi(e,"expanded",t)}function Bee(e,t){Xi(e,"setsize",t)}function Hee(e,t){Xi(e,"posinset",t)}function $ee(e,t){Xi(e,"multiselectable",t)}function Gee(e,t){Xi(e,"rowcount",t)}function Hm(e,t){Xi(e,"rowindex",t)}function Uee(e,t){Xi(e,"rowspan",t)}function Wee(e,t){Xi(e,"colcount",t)}function YO(e,t){Xi(e,"colindex",t)}function zee(e,t){Xi(e,"colspan",t)}function jee(e,t){Xi(e,"sort",t)}function Kee(e){zO(e,"sort")}function ZO(e,t){Ts(e,"selected",t)}function qee(e,t){Ts(e,"controls",t)}function Yee(e,t){qee(e,t.id),uf(t,e.id)}function XO(e,t){Ts(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?s=>s.setAttribute(n,""):s=>s.removeAttribute(n);o(e);const i=e.querySelectorAll("input")??[];for(const s of i)o(s)}function ec(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 tc(e){const{height:t,width:n,borderTopWidth:o,borderRightWidth:i,borderBottomWidth:s,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(i||"0"),borderBottomWidth:v(s||"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=tc(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function ff(e){const t=tc(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}=tc(e);return Math.floor(t+n+o)}function Gm(e){const{width:t,marginLeft:n,marginRight:o}=tc(e);return Math.floor(t+n+o)}function eM(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:o,borderRightWidth:i,borderBottomWidth:s}=tc(e);return{top:t.top+(n||0),left:t.left+(o||0),right:t.right+(i||0),bottom:t.bottom+(s||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 Fs(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],i=e.children[n];i!==o&&e.insertBefore(o,i)}}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 i=Jee(n),s=o.toString(),r=s.replace(/\s*!important/g,""),a=r.length!=s.length?"important":void 0;e.style.setProperty(i,r,a)}}function zm(e){return()=>{const t=e();return t?KS(t)||iM(t):!0}}function KS(e){return e.clientWidth<e.scrollWidth}function iM(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 Fi(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Ua(e,t,n){const i=WO(e).ResizeObserver,s=i?new i(n):null;return s==null||s.observe(t),()=>s==null?void 0:s.disconnect()}function Jr(e,t){const n=WO(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var sM="data-ref",ZS;function rM(){return ZS??(ZS=document.createTextNode(" ")),ZS.cloneNode()}function mf(e){const{attrs:t,children:n,cls:o,ref:i,role:s,tag:r}=e,a=document.createElement(r);if(o&&(a.className=o),i&&a.setAttribute(sM,i),s&&a.setAttribute("role",s),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 ite(e,t,n){const o=ste(t);let i;o!=null&&(i={passive:o}),e.addEventListener(t,n,i)}var ste=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),i=Math.abs(e.clientY-t.clientY);return Math.max(o,i)<=n}var vf=(e,t)=>{const n=e.identifier;for(let o=0,i=t.length;o<i;++o){const s=t[o];if(s.identifier===n)return s}return null};function yf(e,t){return e.gos.isElementInThisInstance(t.target)}function rte(e,t,n){const i=e.getBoundingClientRect().height,s=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-i/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;s>0&&h+e.clientWidth>s+v&&(h=s+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,i,s,r]=n;o.addEventListener(i,s,r),e.push(n)}},JS=e=>{if(e){for(const[t,n,o,i]of e)t.removeEventListener(n,o,i);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 i=t[n];return e.getLocaleTextFunc()(n,typeof i=="function"?i(o):i,o)}function cte(e){return(t,n,o)=>e({key:t,defaultValue:n,variableValues:o})}function ute(e){return(t,n,o)=>{let i=e==null?void 0:e[t];if(i&&(o!=null&&o.length)){let s=0;for(;!(s>=o.length||i.indexOf("${variable}")===-1);)i=i.replace("${variable}",o[s++])}return i??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 Ql),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 i=t[o];i&&n.push(this._setupListener(e,o,i))}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 i=hte(e);e instanceof HTMLElement?ite(e,t,n):i?e.addListener(t,n):e.addEventListener(t,n),o=i?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==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(i=>i!==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=i=>{if(i.changeSet){if(i.changeSet&&i.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=i.changeSet.id}const s={type:"propertyChanged",changeSet:i.changeSet,source:i.source};t(s)};for(const i of e)this.setupPropertyListener(i,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 i=()=>{const s=o.funcs.slice();o.funcs.length=0,o.pending=!1;for(const r of s)r()};t==="raf"?Jr(n,i):window.setTimeout(i,0)}function To(e,t,n){let o;return function(...i){const s=this;window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(s,i)},n)}}function dM(e,t){let n=0;return function(...o){const i=this,s=Date.now();s-n<t||(n=s,e.apply(i,o))}}function gte(e,t,n,o=100){const i=Date.now();let s=null,r=!1;const a=()=>{s!=null&&(window.clearInterval(s),s=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-i>o;(t()||c)&&(n(),r=!0,a())};l(),r||(s=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){it(t)&&mte(t,(i,s)=>{let r=e[i];r!==s&&(o&&r==null&&s!=null&&typeof s=="object"&&s.constructor===Object&&(r={},e[i]=r),fM(s)&&fM(r)&&!Array.isArray(r)?Zo(r,s,n,o):(n||s!==void 0)&&(e[i]=s))})}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,i]=Ym.split(".")||[];return t===o&&n===i}function bte(e){var o;Ym||(Ym=e.version);const t=i=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${i} 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 i;t!==void 0?(vM=!0,Gu[t]===void 0&&(Gu[t]={}),i=Gu[t]):i=qm;for(const s of o)i[s]===void 0&&(i[s]={}),i[s][e.moduleName]=e;if(e.dependsOn)for(const s of e.dependsOn)wf(s,t,n)}function Ste(e){delete Gu[e]}function o0(e,t,n){const o=i=>{var s,r,a;return!!((s=qm[i])!=null&&s[e])||!!((a=(r=Gu[t])==null?void 0:r[i])!=null&&a[e])};return o(n)||o("all")}function i0(){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 s0(e,t,n,o,i){e(`${o?"warning":"error"} #${t}`,...bM(t,n,i))}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((s,r)=>r[1].length-s[1].length);let i=r0(e,t);for(const[s,r]of o){if(s===wM)continue;const a=i.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(s,u),i=r0(e,t)}return i}function SM(e,t){const n=new URLSearchParams;if(n.append(wM,tt),t)for(const s of Object.keys(t))n.append(s,Pte(t[s]));const o=`${Uu}/errors/${e}`,i=r0(o,n);return i.length<=yM?i: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){s0(Cf,e[0],e[1],!0)}function vn(...e){s0($u,e[0],e[1],!1)}function bf(e,t,n){s0($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 nc(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:i,environment:s}=e;if(o==null&&(o=s.getDefaultRowHeight()),_M(i)){if(n)return{height:o,estimated:!0};const l={node:t,data:t.data},c=i.getCallback("getRowHeight")(l);if(a0(c))return c===0&&Ge(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&i.get("masterDetail"))return Nte(i);const r=i.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 oc(e){const{environment:t,gos:n}=e,o=n.get("rowHeight");if(!o||An(o))return t.getDefaultRowHeight();const i=t.refreshRowHeightVariable();return i!==-1?i:(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 ic(e,t,n,o){const i=e.getDomDataKey();let s=t[i];An(s)&&(s={},t[i]=s),s[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 xi(e){return e.get("columnMenu")==="legacy"}function zte(e){return!xi(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 Ql,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 i=e.hide;i!==void 0?this.visible=!i:this.visible=!e.initialHide,n==null||n.initCol(this),o==null||o.initCol(this)}setColDef(e,t,n){var i;const o=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),o&&((i=this.beans.rowSpanSvc)==null||i.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=it(t)&&t.includes(".")&&!o,this.tooltipFieldContainsDots=it(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,i,s;this.frameworkEventListenerService=(i=(o=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:i.call(o,this.frameworkEventListenerService,this.colEventSvc);const n=((s=this.frameworkEventListenerService)==null?void 0:s.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 it(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 s=0,r=o.length;s<r;s++){const a=o[s];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 i=e&&t&&n;this.expandable!==i&&(this.expandable=i,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={},i=e.gos;return Object.assign(o,i.get("defaultColGroupDef")),Object.assign(o,t),i.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 i=String(o);return e&&n>0&&Ge(273,{providedId:e,usedId:i}),this.existingKeys[i]=!0,i}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 i=0;i<o;i++)if(e[i]!==t[i]&&!(n!=null&&n(e[i],t[i])))return!1;return!0}function _f(e,t){if(e)for(const n of e)t(n)}function xs(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++)xs(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 i=0;i<o.length;i++){const s=o[i];Ka(s)?t.push(s):Ho(s)&&n(s.getChildren())}};return n(e),t}function ea(e){return e.reduce((t,n)=>t+n.getActualWidth(),0)}function iv(e,t,n){const o={};if(!t)return;oa(null,t,s=>{o[s.getInstanceId()]=s}),n&&oa(null,n,s=>{o[s.getInstanceId()]=null});const i=Object.values(o).filter(s=>s!=null);e.context.destroyBeans(i)}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 sv(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,i=e.getColId()==t;return n||o||i}var ene=(e,t)=>(n,o)=>{const i={value1:void 0,value2:void 0};let s=!1;return e&&(e[n]!==void 0&&(i.value1=e[n],s=!0),it(o)&&e[o]!==void 0&&(i.value2=e[o],s=!0)),!s&&t&&(t[n]!==void 0&&(i.value1=t[n]),it(o)&&t[o]!==void 0&&(i.value2=t[o])),i},tne=(e,t)=>{Ho(e)&&e.setupExpandable(),e.originalParent=t};function nne(e,t=null,n,o,i){const s=new Zte,{existingCols:r,existingGroups:a,existingColKeys:l}=one(o);s.addExistingKeys(l);const c=HM(e,t,0,n,r,s,a,i),{colGroupSvc:u}=e,d=(u==null?void 0:u.findMaxDepth(c,0))??0,h=u?u.balanceColumnTree(c,0,d,s):c;return oa(null,h,tne),{columnTree:h,treeDepth:d}}function one(e){const t=[],n=[],o=[];return e&&oa(null,e,i=>{if(Ho(i)){const s=i;n.push(s)}else{const s=i;o.push(s.getId()),t.push(s)}}),{existingCols:t,existingGroups:n,existingColKeys:o}}function HM(e,t,n,o,i,s,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,i,s,r,a):c[u]=ine(e,o,d,i,s,a)}return c}function ine(e,t,n,o,i,s){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,s),sne(e,a,c,s)}else{const c=i.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,i,s,r,a){const{sortSvc:l,pinnedCols:c,colFlex:u}=e;n!==void 0&&t.setVisible(!n,a),l&&(l.updateColSort(t,o,a),i!==void 0&&l.setColSortIndex(t,i)),s!==void 0&&(c==null||c.setColPinned(t,s)),r!==void 0&&(u==null||u.setColFlex(t,r))}function sne(e,t,n,o){$M(e,t,n.hide,n.sort,n.sortIndex,n.pinned,n.flex,o);const i=t.getFlex();if(!(i!=null&&i>0))if(n.width!=null)t.setActualWidth(n.width,o);else{const s=t.getActualWidth();t.setActualWidth(s,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:i,dataTypeSvc:s}=e,r={},a=i.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=i.get("autoGroupColumnDef"),d=hr(i);return t.rowGroup&&u&&d&&Zo(r,{sort:u.sort,initialSort:u.initialSort},!1,!0),s&&(s.postProcess(r),s.validateColDef(r)),i.validateColDef(r,n,o),r}function ane(e,t,n,o){var r;const i=(r=e.dataTypeSvc)==null?void 0:r.updateColDefAndGetColumnType(t,n,o),s=n.type??i??t.type;return t.type=s,s?sv(s):void 0}function lne(e,t,n){if(!t.length)return;const o=Object.assign({},Yte),i=e.gos.get("columnTypes")||{};for(const s of Object.keys(i)){const r=i[s];s in o?Ge(34,{key:s}):(r.type&&Ge(35),o[s]=r)}for(const s of t){const r=o[s.trim()];r?Zo(n,r,!1,!0):Ge(36,{t:s})}}function cne(e){return e.children!==void 0}function oa(e,t,n){if(t)for(let o=0;o<t.length;o++){const i=t[o];Ho(i)&&oa(i,i.getChildren(),n),n(i,e)}}function GM(e,t){const n=[],o=[],i=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?i.push(r):a==="left"||a===!0?n.push(r):o.push(r)}),t.get("enableRtl")?[...i,...o,...n]:[...n,...o,...i]}function UM(e,t){let n=!0;return oa(null,t,o=>{if(!Ho(o))return;const i=o,s=i.getColGroupDef();if(!(s==null?void 0:s.marryChildren))return;const a=[];for(const h of i.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=i.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,i=WM(t,s=>s.getPinned());e.dispatchEvent({type:"columnPinned",pinned:i??null,columns:t,column:o,source:n})}function une(e,t,n){if(!t.length)return;const o=t.length===1?t[0]:null,i=WM(t,s=>s.isVisible());e.dispatchEvent({type:"columnVisible",visible:i,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,i=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:i,finished:n,source:o})}function Is(e,t,n){var R;const{colModel:o,rowGroupColsSvc:i,pivotColsSvc:s,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,I)=>{if(!_)return;const D=ene(T,t.defaultState),P=D("flex").value1;if($M(e,_,D("hide").value1,D("sort").value1,D("sortIndex").value1,D("pinned").value1,P,n),P==null){const A=D("width").value1;if(A!=null){const J=_.getColDef().minWidth??d.getDefaultColumnMinWidth();J!=null&&A>=J&&_.setActualWidth(A,n)}}I||!_.isPrimary()||(h==null||h.syncColumnWithState(_,n,D),i==null||i.syncColumnWithState(_,n,D,O),s==null||s.syncColumnWithState(_,n,D,x))},b=(_,T,O)=>{var ee,se;const x=jM(e,n),I=T.slice(),D={},P={},A=[],J=[],X=[];let G=0;const te=(i==null?void 0:i.columns.slice())??[],V=(s==null?void 0:s.columns.slice())??[];for(const ne of _){const ie=ne.colId;if(ie.startsWith(ov)){A.push(ne),X.push(ne);continue}if(ta(ie)){J.push(ne),X.push(ne);continue}const fe=O(ie);fe?(w(fe,ne,D,P,!1),xs(I,fe)):(X.push(ne),G+=1)}const $=ne=>w(ne,null,D,P,!1);I.forEach($),i==null||i.sortColumns(qM.bind(i,D,te)),s==null||s.sortColumns(qM.bind(s,P,V)),o.refreshCols(!1,n);const N=(ne,ie,Q=[])=>{for(const fe of ie){const Re=ne(fe.colId);xs(Q,Re),w(Re,fe,null,null,!0)}Q.forEach($)};return N(ne=>(r==null?void 0:r.getColumn(ne))??null,A,(ee=r==null?void 0:r.getColumns())==null?void 0:ee.slice()),N(ne=>(a==null?void 0:a.getColumn(ne))??null,J,(se=a==null?void 0:a.getColumns())==null?void 0:se.slice()),fne(t,o,p),c.refresh(n),f.dispatchEvent({type:"columnEverythingChanged",source:n}),x(),{unmatchedAndAutoStates:X,unmatchedCount:G}};l==null||l.start();let{unmatchedAndAutoStates:S,unmatchedCount:C}=b(t.state||[],m,_=>o.getColDefCol(_));if(S.length>0||it(t.defaultState)){const _=((R=u==null?void 0:u.getPivotResultCols())==null?void 0:R.list)??[];C=b(S,_,T=>(u==null?void 0:u.getPivotResultCol(T))??null).unmatchedCount}return l==null||l.finish(),C===0}function hne(e,t){var b,S;const{colModel:n,autoColSvc:o,selectionColSvc:i,eventSvc:s,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),(S=i==null?void 0:i.getColumns())==null||S.forEach(f),c==null||c.forEach(f),Is(e,{state:u},t);const p=(o==null?void 0:o.getColumns())??[],w=[...(i==null?void 0:i.getColumns())??[],...p,...a].map(C=>({colId:C.colId}));Is(e,{state:w,applyOrder:!0},t),s.dispatchEvent(Dt(r,{type:"columnsReset",source:t}))}function jM(e,t){const{rowGroupColsSvc:n,pivotColsSvc:o,valueColsSvc:i,colModel:s,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:(n==null?void 0:n.columns.slice())??[],pivotColumns:(o==null?void 0:o.columns.slice())??[],valueColumns:(i==null?void 0:i.columns.slice())??[]},c=rv(e),u={};for(const d of c)u[d.colId]=d;return()=>{const d=(_,T,O,x)=>{const I=T.map(x),D=O.map(x);if(qa(I,D))return;const A=new Set(T);for(const X of O)A.delete(X)||A.add(X);const J=[...A];a.dispatchEvent({type:_,columns:J,column:J.length===1?J[0]:null,source:t})},h=_=>{const T=[];return s.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(),I=O&&_.aggFunc!=T.getAggFunc();return x||I});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,s,a)}}function rv(e){const{colModel:t,rowGroupColsSvc:n,pivotColsSvc:o}=e,i=t.getColDefCols();if(An(i)||!t.isAlive())return[];const s=n==null?void 0:n.columns,r=o==null?void 0:o.columns,a=[],l=u=>{const d=u.isRowGroupActive()&&s?s.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),i=t(n.sortIndex,n.initialSortIndex),s=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:i,hide:s,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 i of e.state)i.colId!=null&&o.push(i.colId);pne(t.cols,o,t,n)}function pne(e,t,n,o){if(e==null)return;let i=[];const s={};for(const a of t){if(s[a])continue;const l=e.map[a];l&&(i.push(l),s[a]=!0)}let r=0;for(const a of e.list){const l=a.getColId();if(s[l]!=null)continue;l.startsWith(ov)?i.splice(r++,0,a):i.push(a)}if(i=GM(i,o),!UM(i,n.getColTree())){Ge(39);return}e.list=i}function gne(e,t,n,o,i){const s={};for(const u of t)s[u.colId]=u;const r={};for(const u of e)s[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&&i.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:n})}var qM=(e,t,n,o)=>{const i=e[n.getId()],s=e[o.getId()],r=i!=null,a=s!=null;if(r&&a)return i-s;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,S,C;const{beans:t}=this,{valueCache:n,colAutosize:o,rowGroupColsSvc:i,pivotColsSvc:s,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=(S=this.colDefCols)==null?void 0:S.tree,f=nne(t,this.colDefs,!0,h,e);iv(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),i==null||i.extractCols(e,d),s==null||s.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:i,rowNumbersSvc:s,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,i,s],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,i=>{this.lastOrder=i(this.lastOrder),this.lastPivotOrder=i(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:i,tree:s,treeDepth:r}=n??t;return this.cols={list:i.slice(),map:{...o},tree:s.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,i=t==null?void 0:t.isSelectionColumnEnabled(),s=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||i&&ta(l)||s&&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){Is(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 i=new Map;for(let d=0;d<n.length;d++){const h=n[d];i.set(h,d)}const s=e.list.filter(d=>!i.has(d));if(s.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=i.get(v);if(w==null)continue;(p==null||p<w)&&(p=w,m=v);continue}v.forEachLeafColumn(w=>{const b=i.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 s){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;iv(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 s,r,a,l,c;const{pivotResultCols:t,autoColSvc:n,selectionColSvc:o,groupHierarchyColSvc:i}=this.beans;_f((s=this.colDefCols)==null?void 0:s.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=i==null?void 0:i.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:i,selectionColSvc:s,groupHierarchyColSvc:r}=this.beans;return(i==null?void 0:i.getColumn(e))??(s==null?void 0:s.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 i=(e||"").split(" ");if(i.length>1){for(const s of i)this.toggleCss(s,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(sM):null}applyElementsToComponent(e,t,n,o=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const i=this[t];if(i===nt)this[t]=o??e;else{const s=n==null?void 0:n[t];if(!this.suppressDataRefValidation&&!s)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${i}`)}}}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 i=this.createComponentFromElement(o,s=>{const r=s.getGui();if(r)for(const a of o.attributes??[])r.setAttribute(a.name,a.value)},t);if(i){if(i.addItems&&o.children.length){this.createChildComponentsFromTags(o,t);const s=Array.prototype.slice.call(o.children);i.addItems(s)}this.swapComponentForNode(i,e,o)}else o.childNodes&&this.createChildComponentsFromTags(o,t)}}createComponentFromElement(e,t,n){const o=e.nodeName,i=this.getDataRefAttribute(e),s=o.indexOf("AG-")===0,r=s?this.componentSelectors.get(o):null;let a=null;if(r){const l=n&&i?n[i]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(s)throw new Error(`selector: ${o}`);return this.applyElementsToComponent(e,i,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 i=0;i<t.length;i++){const s=t[i];this.componentSelectors.set(s.selector,s)}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 Gn(n=>{n(window.setInterval(e,t))})}var Gn=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 i=new Array(o);t.forEach((s,r)=>{s.then(a=>{i[r]=a,o--,o===0&&n(i)})})}):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:i}=n;let s,r,a,l,c,u;if(t){const d=t,h=d[i+"Selector"],f=h?h(o):null,p=m=>{typeof m=="string"?s=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[i])}return{compName:s,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,i=!1){var S;const{name:s,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(s,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=(S=this.agCompUtils)==null?void 0:S.adaptFunction(t,l)),!l&&!c){const{validation:C}=this.beans;i&&(a!==n||!n)?a?C!=null&&C.isProvidedUserComp(a)||vn(50,{compName:a}):n?C||vn(260,{...this.gos.getModuleErrorParams(),propName:s,compName:n}):vn(216,{name:s}):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 i=!t;let s;i?s=new e:s=this.frameworkCompWrapper.wrap(e,o.mandatoryMethods,o.optionalMethods,o),this.createBean(s);const r=(a=s.init)==null?void 0:a.call(s,n);return r==null?Gn.resolve(s):r.then(()=>s)}mergeParams(e,t,n,o=null,i,s){const r={...n,...i},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),s?s(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 i=t.filter;return JM(i)&&(t={filter:i.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 iN(){return v0===void 0&&(v0=/(firefox)/i.test(navigator.userAgent)),v0}function sN(){return y0===void 0&&(y0=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),y0}function rc(){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===""&&!iN())?null:t.toString()}function eoe(){if(S0!==void 0)return S0;if(!document.body)return-1;let e=1e6;const t=iN()?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 Ii(e,t=!0,n=_0){if(!e)return null;let o=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(i=>fr(i,2)).join("-");return t&&(o+=n+[e.getHours(),e.getMinutes(),e.getSeconds()].map(i=>fr(i,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 Ii(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()}`},i=new RegExp(Object.keys(o).join("|"),"g");return t.replace(i,s=>s in o?o[s]():s)}function lv(e,t=!1){return!!ri(e,t)}function ioe(e){return lv(e,!0)}function ri(e,t=!1,n){if(!e||!n&&!ooe.test(e))return null;const[o,i]=e.split(noe);if(!o)return null;const s=o.split("-").map(f=>Number.parseInt(f,10));if(s.filter(f=>!isNaN(f)).length!==3)return null;const[r,a,l]=s,c=new Date(r,a-1,l);if(c.getFullYear()!==r||c.getMonth()!==a-1||c.getDate()!==l||!i&&t)return null;if(!i||i==="00:00:00")return c;const[u,d,h]=i.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:i}=e;let s=(n??[]).map((l,c)=>({value:l,relevance:soe(t,l),idx:c}));if(s.sort((l,c)=>l.relevance-c.relevance),o&&(s=s.filter(l=>l.relevance<Math.max(l.value.length,t.length))),s.length>0&&i&&i>0){const c=s[0].relevance*i;s=s.filter(u=>c-u.relevance<0)}const r=[],a=[];for(const l of s)r.push(l.value),a.push(l.idx);return{values:r,indices:a}}function soe(e,t){e.length<t.length&&([e,t]=[t,e]);let n=[],o=[];const i=e.length,s=t.length;for(let a=0;a<=s;a++)n[a]=a;let r=0;for(let a=1;a<=i;a++){o[0]=a;for(let l=1;l<=s;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<i/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[s]/(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 i=JO;t&&(i+=", "+t),n&&(i+=', [tabindex="-1"]');const s=Array.prototype.slice.apply(e.querySelectorAll(o)).filter(l=>lr(l)),r=Array.prototype.slice.apply(e.querySelectorAll(i));return r.length?((l,c)=>l.filter(u=>c.indexOf(u)===-1))(s,r):s}function ac(e,t=!1,n=!1,o=!1){const i=Zu(e,o?".ag-tab-guard":null,n),s=t?wn(i):i[0];return s?(s.focus({preventScroll:!0}),!0):!1}function lc(e,t,n,o){const i=Zu(t,n?':not([tabindex="-1"])':null),s=Nn(e);let r;n?r=i.findIndex(l=>l.contains(s)):r=i.indexOf(s);const a=r+(o?-1:1);return a<0||a>=i.length?null:i[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:i}=this.config;i!=null&&this.setDisabled(i),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 cc=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:i,inputWidth:s}=this.config;i!=null&&this.setInputName(i),s!=null&&this.setInputWidth(s),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,Fi(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 Fi(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)Fi(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Fi(this.eInput,"autocomplete",t)}return this}},I0=class extends cc{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)}},uc=class extends cc{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=it(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 i;const o=(i=n.clipboardData)==null?void 0:i.getData("text");o!=null&&o.split("").some(s=>!e.test(s))&&n.preventDefault()}})}},dv={selector:"AG-INPUT-TEXT-FIELD",component:uc},poe=class extends cc{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 uc{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const s=Number.parseFloat(e.value),r=isNaN(s)?"":this.normalizeValue(s.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:n,max:o,step:i}=this.config;typeof t=="number"&&this.setPrecision(t),typeof n=="number"&&this.setMin(n),typeof o=="number"&&this.setMax(o),typeof i=="number"&&this.setStep(i)}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 i=Number.parseFloat(e).toFixed(n);return Number.parseFloat(i).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,Fi(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Fi(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Fi(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(it(n)){let o=this.isScientificNotation(n);if(o&&this.eInput.validity.valid)return e(n);if(!o){n=this.adjustPrecision(n);const i=this.normalizeValue(n);o=n!=i}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 uc{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?Ii(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,Fi(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?Ii(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,Fi(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Fi(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 ri(this.getValue())??void 0}setDate(e,t){this.setValue(Ii(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:i}=n,{offsetTop:s,offsetHeight:r}=t;(s+r>o+i||s<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:i}=this;if(!i)n=t?o[0]:wn(o);else{let r=o.indexOf(i)+(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),i=this.options.length-1,s=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/s);let a=-1;e===De.PAGE_HOME?a=0:e===De.PAGE_END?a=i:e===De.PAGE_DOWN?a=Math.min(o+r,i):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:i,maxPickerWidth:s}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!o,n!=null&&this.setPickerMaxHeight(n),i!=null&&this.setPickerMinWidth(i),s!=null&&this.setPickerMaxWidth(s)}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 i=this.beans.iconSvc.createIconNoSpan(n);i&&this.eIcon.appendChild(i)}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:i=!0},maxPickerHeight:s,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:c,eWrapper:u}=this,d={modal:i,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=s??`${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:i,pickerComponent:s}=this,r=o.get("enableRtl")?"right":"left";n.positionPopupByComponent({type:t,eventSource:i,ePopup:s.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:i},eDisplayField:s,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&&i&&(l=i),s.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,i,s)=>{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");s&&a.setAttribute("nonce",s),a.dataset.agGlobalCss=n,a.textContent=e;const l={css:e,el:a,priority:i};let c;for(const u of r){if(u.priority>i)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((i,s)=>i.forEach(r=>Xu(r,e,s,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:i}){this.feature=e,this.css=o,this.cssImports=i,this.modeParams={[Za]:{...n[Za]??{},...t??{}},...n}}use(e,t,n){let o=this._inject;if(o==null){let{css:i}=this;if(i){const s=`ag-theme-${this.feature??"part"}-${++Poe}`;typeof i=="function"&&(i=i()),i=`:where(.${s}) {
|
|
186
186
|
${i}
|
|
@@ -245,9 +245,9 @@ If you are trying to annotate ${o} with application data, use the '${o}.context'
|
|
|
245
245
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(i=>o.set(i)),o}static accessor(t){const o=(this[xV]=this[xV]={accessors:{}}).accessors,i=this.prototype;function s(r){const a=Yf(r);o[a]||(zye(i,r),o[a]=!0)}return Pe.isArray(t)?t.forEach(s):s(t),this}};ui.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Pe.reduceDescriptors(ui.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}}),Pe.freezeMethods(ui);function t_(e,t){const n=this||qf,o=t||n,i=ui.from(o.headers);let s=o.data;return Pe.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function IV(e){return!!(e&&e.__CANCEL__)}function gd(e,t,n){Ut.call(this,e??"canceled",Ut.ERR_CANCELED,t,n),this.name="CanceledError"}Pe.inherits(gd,Ut,{__CANCEL__:!0});function PV(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Ut("Request failed with status code "+n.status,[Ut.ERR_BAD_REQUEST,Ut.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function jye(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Kye(e,t){e=e||10;const n=new Array(e),o=new Array(e);let i=0,s=0,r;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=o[s];r||(r=c),n[i]=l,o[i]=c;let d=s,h=0;for(;d!==i;)h+=n[d++],d=d%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-r<t)return;const f=u&&c-u;return f?Math.round(h*1e3/f):void 0}}function qye(e,t){let n=0,o=1e3/t,i,s;const r=(c,u=Date.now())=>{n=u,i=null,s&&(clearTimeout(s),s=null),e(...c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=o?r(c,u):(i=c,s||(s=setTimeout(()=>{s=null,r(i)},o-d)))},()=>i&&r(i)]}const Xv=(e,t,n=3)=>{let o=0;const i=Kye(50,250);return qye(s=>{const r=s.loaded,a=s.lengthComputable?s.total:void 0,l=r-o,c=i(l),u=r<=a;o=r;const d={loaded:r,total:a,progress:a?r/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-r)/c:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},AV=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},kV=e=>(...t)=>Pe.asap(()=>e(...t)),Yye=Go.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Go.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Go.origin),Go.navigator&&/(msie|trident)/i.test(Go.navigator.userAgent)):()=>!0,Zye=Go.hasStandardBrowserEnv?{write(e,t,n,o,i,s,r){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];Pe.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),Pe.isString(o)&&a.push(`path=${o}`),Pe.isString(i)&&a.push(`domain=${i}`),s===!0&&a.push("secure"),Pe.isString(r)&&a.push(`SameSite=${r}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Xye(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Jye(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function OV(e,t,n){let o=!Xye(t);return e&&(o||n==!1)?Jye(e,t):t}const MV=e=>e instanceof ui?{...e}:e;function yc(e,t){t=t||{};const n={};function o(c,u,d,h){return Pe.isPlainObject(c)&&Pe.isPlainObject(u)?Pe.merge.call({caseless:h},c,u):Pe.isPlainObject(u)?Pe.merge({},u):Pe.isArray(u)?u.slice():u}function i(c,u,d,h){if(Pe.isUndefined(u)){if(!Pe.isUndefined(c))return o(void 0,c,d,h)}else return o(c,u,d,h)}function s(c,u){if(!Pe.isUndefined(u))return o(void 0,u)}function r(c,u){if(Pe.isUndefined(u)){if(!Pe.isUndefined(c))return o(void 0,c)}else return o(void 0,u)}function a(c,u,d){if(d in t)return o(c,u);if(d in e)return o(void 0,c)}const l={url:s,method:s,data:s,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(c,u,d)=>i(MV(c),MV(u),d,!0)};return Pe.forEach(Object.keys({...e,...t}),function(u){const d=l[u]||i,h=d(e[u],t[u],u);Pe.isUndefined(h)&&d!==a||(n[u]=h)}),n}const NV=e=>{const t=yc({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:r,auth:a}=t;if(t.headers=r=ui.from(r),t.url=RV(OV(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&r.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),Pe.isFormData(n)){if(Go.hasStandardBrowserEnv||Go.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if(Pe.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,d])=>{c.includes(u.toLowerCase())&&r.set(u,d)})}}if(Go.hasStandardBrowserEnv&&(o&&Pe.isFunction(o)&&(o=o(t)),o||o!==!1&&Yye(t.url))){const l=i&&s&&Zye.read(s);l&&r.set(i,l)}return t},Qye=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,o){const i=NV(e);let s=i.data;const r=ui.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,d,h,f,p;function m(){f&&f(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout;function w(){if(!v)return;const S=ui.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),R={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:S,config:e,request:v};PV(function(T){n(T),m()},function(T){o(T),m()},R),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(w)},v.onabort=function(){v&&(o(new Ut("Request aborted",Ut.ECONNABORTED,e,v)),v=null)},v.onerror=function(C){const R=C&&C.message?C.message:"Network Error",_=new Ut(R,Ut.ERR_NETWORK,e,v);_.event=C||null,o(_),v=null},v.ontimeout=function(){let C=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const R=i.transitional||TV;i.timeoutErrorMessage&&(C=i.timeoutErrorMessage),o(new Ut(C,R.clarifyTimeoutError?Ut.ETIMEDOUT:Ut.ECONNABORTED,e,v)),v=null},s===void 0&&r.setContentType(null),"setRequestHeader"in v&&Pe.forEach(r.toJSON(),function(C,R){v.setRequestHeader(R,C)}),Pe.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),a&&a!=="json"&&(v.responseType=i.responseType),c&&([h,p]=Xv(c,!0),v.addEventListener("progress",h)),l&&v.upload&&([d,f]=Xv(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(u=S=>{v&&(o(!S||S.type?new gd(null,e,v):S),v.abort(),v=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const b=jye(i.url);if(b&&Go.protocols.indexOf(b)===-1){o(new Ut("Unsupported protocol "+b+":",Ut.ERR_BAD_REQUEST,e));return}v.send(s||null)})},eCe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,i;const s=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;o.abort(u instanceof Ut?u:new gd(u instanceof Error?u.message:u))}};let r=t&&setTimeout(()=>{r=null,s(new Ut(`timeout ${t} of ms exceeded`,Ut.ETIMEDOUT))},t);const a=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=o;return l.unsubscribe=()=>Pe.asap(a),l}},tCe=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,i;for(;o<n;)i=o+t,yield e.slice(o,i),o=i},nCe=async function*(e,t){for await(const n of oCe(e))yield*tCe(n,t)},oCe=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},LV=(e,t,n,o)=>{const i=nCe(e,t);let s=0,r,a=l=>{r||(r=!0,o&&o(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){a(),l.close();return}let d=u.byteLength;if(n){let h=s+=d;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},VV=64*1024,{isFunction:Jv}=Pe,iCe=(({Request:e,Response:t})=>({Request:e,Response:t}))(Pe.global),{ReadableStream:BV,TextEncoder:HV}=Pe.global,$V=(e,...t)=>{try{return!!e(...t)}catch{return!1}},sCe=e=>{e=Pe.merge.call({skipUndefined:!0},iCe,e);const{fetch:t,Request:n,Response:o}=e,i=t?Jv(t):typeof fetch=="function",s=Jv(n),r=Jv(o);if(!i)return!1;const a=i&&Jv(BV),l=i&&(typeof HV=="function"?(p=>m=>p.encode(m))(new HV):async p=>new Uint8Array(await new n(p).arrayBuffer())),c=s&&a&&$V(()=>{let p=!1;const m=new n(Go.origin,{body:new BV,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!m}),u=r&&a&&$V(()=>Pe.isReadableStream(new o("").body)),d={stream:u&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!d[p]&&(d[p]=(m,v)=>{let w=m&&m[p];if(w)return w.call(m);throw new Ut(`Response type '${p}' is not supported`,Ut.ERR_NOT_SUPPORT,v)})});const h=async p=>{if(p==null)return 0;if(Pe.isBlob(p))return p.size;if(Pe.isSpecCompliantForm(p))return(await new n(Go.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(Pe.isArrayBufferView(p)||Pe.isArrayBuffer(p))return p.byteLength;if(Pe.isURLSearchParams(p)&&(p=p+""),Pe.isString(p))return(await l(p)).byteLength},f=async(p,m)=>{const v=Pe.toFiniteNumber(p.getContentLength());return v??h(m)};return async p=>{let{url:m,method:v,data:w,signal:b,cancelToken:S,timeout:C,onDownloadProgress:R,onUploadProgress:_,responseType:T,headers:O,withCredentials:x="same-origin",fetchOptions:I}=NV(p),D=t||fetch;T=T?(T+"").toLowerCase():"text";let P=eCe([b,S&&S.toAbortSignal()],C),A=null;const J=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let X;try{if(_&&c&&v!=="get"&&v!=="head"&&(X=await f(O,w))!==0){let ee=new n(m,{method:"POST",body:w,duplex:"half"}),se;if(Pe.isFormData(w)&&(se=ee.headers.get("content-type"))&&O.setContentType(se),ee.body){const[ne,ie]=AV(X,Xv(kV(_)));w=LV(ee.body,VV,ne,ie)}}Pe.isString(x)||(x=x?"include":"omit");const G=s&&"credentials"in n.prototype,te={...I,signal:P,method:v.toUpperCase(),headers:O.normalize().toJSON(),body:w,duplex:"half",credentials:G?x:void 0};A=s&&new n(m,te);let V=await(s?D(A,I):D(m,te));const $=u&&(T==="stream"||T==="response");if(u&&(R||$&&J)){const ee={};["status","statusText","headers"].forEach(Q=>{ee[Q]=V[Q]});const se=Pe.toFiniteNumber(V.headers.get("content-length")),[ne,ie]=R&&AV(se,Xv(kV(R),!0))||[];V=new o(LV(V.body,VV,ne,()=>{ie&&ie(),J&&J()}),ee)}T=T||"text";let N=await d[Pe.findKey(d,T)||"text"](V,p);return!$&&J&&J(),await new Promise((ee,se)=>{PV(ee,se,{data:N,headers:ui.from(V.headers),status:V.status,statusText:V.statusText,config:p,request:A})})}catch(G){throw J&&J(),G&&G.name==="TypeError"&&/Load failed|fetch/i.test(G.message)?Object.assign(new Ut("Network Error",Ut.ERR_NETWORK,p,A),{cause:G.cause||G}):Ut.from(G,G&&G.code,p,A)}}},rCe=new Map,GV=e=>{let t=e&&e.env||{};const{fetch:n,Request:o,Response:i}=t,s=[o,i,n];let r=s.length,a=r,l,c,u=rCe;for(;a--;)l=s[a],c=u.get(l),c===void 0&&u.set(l,c=a?new Map:sCe(t)),u=c;return c};GV();const n_={http:Fye,xhr:Qye,fetch:{get:GV}};Pe.forEach(n_,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const UV=e=>`- ${e}`,aCe=e=>Pe.isFunction(e)||e===null||e===!1;function lCe(e,t){e=Pe.isArray(e)?e:[e];const{length:n}=e;let o,i;const s={};for(let r=0;r<n;r++){o=e[r];let a;if(i=o,!aCe(o)&&(i=n_[(a=String(o)).toLowerCase()],i===void 0))throw new Ut(`Unknown adapter '${a}'`);if(i&&(Pe.isFunction(i)||(i=i.get(t))))break;s[a||"#"+r]=i}if(!i){const r=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?r.length>1?`since :
|
|
246
246
|
`+r.map(UV).join(`
|
|
247
247
|
`):" "+UV(r[0]):"as no adapter specified";throw new Ut("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i}const WV={getAdapter:lCe,adapters:n_};function o_(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gd(null,e)}function zV(e){return o_(e),e.headers=ui.from(e.headers),e.data=t_.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),WV.getAdapter(e.adapter||qf.adapter,e)(e).then(function(o){return o_(e),o.data=t_.call(e,e.transformResponse,o),o.headers=ui.from(o.headers),o},function(o){return IV(o)||(o_(e),o&&o.response&&(o.response.data=t_.call(e,e.transformResponse,o.response),o.response.headers=ui.from(o.response.headers))),Promise.reject(o)})}const jV="1.13.2",Qv={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Qv[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const KV={};Qv.transitional=function(t,n,o){function i(s,r){return"[Axios v"+jV+"] Transitional option '"+s+"'"+r+(o?". "+o:"")}return(s,r,a)=>{if(t===!1)throw new Ut(i(r," has been removed"+(n?" in "+n:"")),Ut.ERR_DEPRECATED);return n&&!KV[r]&&(KV[r]=!0,console.warn(i(r," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,r,a):!0}},Qv.spelling=function(t){return(n,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function cCe(e,t,n){if(typeof e!="object")throw new Ut("options must be an object",Ut.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let i=o.length;for(;i-- >0;){const s=o[i],r=t[s];if(r){const a=e[s],l=a===void 0||r(a,s,e);if(l!==!0)throw new Ut("option "+s+" must be "+l,Ut.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ut("Unknown option "+s,Ut.ERR_BAD_OPTION)}}const ey={assertOptions:cCe,validators:Qv},wr=ey.validators;let Cc=class{constructor(t){this.defaults=t||{},this.interceptors={request:new DV,response:new DV}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{o.stack?s&&!String(o.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(o.stack+=`
|
|
248
|
-
`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=yc(this.defaults,n);const{transitional:o,paramsSerializer:i,headers:s}=n;o!==void 0&&ey.assertOptions(o,{silentJSONParsing:wr.transitional(wr.boolean),forcedJSONParsing:wr.transitional(wr.boolean),clarifyTimeoutError:wr.transitional(wr.boolean)},!1),i!=null&&(Pe.isFunction(i)?n.paramsSerializer={serialize:i}:ey.assertOptions(i,{encode:wr.function,serialize:wr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ey.assertOptions(n,{baseUrl:wr.spelling("baseURL"),withXsrfToken:wr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let r=s&&Pe.merge(s.common,s[n.method]);s&&Pe.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=ui.concat(r,s);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const p=[zV.bind(this),void 0];for(p.unshift(...a),p.push(...c),h=p.length,u=Promise.resolve(n);d<h;)u=u.then(p[d++],p[d++]);return u}h=a.length;let f=n;for(;d<h;){const p=a[d++],m=a[d++];try{f=p(f)}catch(v){m.call(this,v);break}}try{u=zV.call(this,f)}catch(p){return Promise.reject(p)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=yc(this.defaults,t);const n=OV(t.baseURL,t.url,t.allowAbsoluteUrls);return RV(n,t.params,t.paramsSerializer)}};Pe.forEach(["delete","get","head","options"],function(t){Cc.prototype[t]=function(n,o){return this.request(yc(o||{},{method:t,url:n,data:(o||{}).data}))}}),Pe.forEach(["post","put","patch"],function(t){function n(o){return function(s,r,a){return this.request(yc(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:r}))}}Cc.prototype[t]=n(),Cc.prototype[t+"Form"]=n(!0)});let uCe=class IB{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(i=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](i);o._listeners=null}),this.promise.then=i=>{let s;const r=new Promise(a=>{o.subscribe(a),s=a}).then(i);return r.cancel=function(){o.unsubscribe(s)},r},t(function(s,r,a){o.reason||(o.reason=new gd(s,r,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new IB(function(i){t=i}),cancel:t}}};function dCe(e){return function(n){return e.apply(null,n)}}function hCe(e){return Pe.isObject(e)&&e.isAxiosError===!0}const i_={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(i_).forEach(([e,t])=>{i_[t]=e});function qV(e){const t=new Cc(e),n=uV(Cc.prototype.request,t);return Pe.extend(n,Cc.prototype,t,{allOwnKeys:!0}),Pe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return qV(yc(e,i))},n}const Jn=qV(qf);Jn.Axios=Cc,Jn.CanceledError=gd,Jn.CancelToken=uCe,Jn.isCancel=IV,Jn.VERSION=jV,Jn.toFormData=Yv,Jn.AxiosError=Ut,Jn.Cancel=Jn.CanceledError,Jn.all=function(t){return Promise.all(t)},Jn.spread=dCe,Jn.isAxiosError=hCe,Jn.mergeConfig=yc,Jn.AxiosHeaders=ui,Jn.formToJSON=e=>FV(Pe.isHTMLForm(e)?new FormData(e):e),Jn.getAdapter=WV.getAdapter,Jn.HttpStatusCode=i_,Jn.default=Jn;const{Axios:V_e,AxiosError:B_e,CanceledError:H_e,isCancel:$_e,CancelToken:G_e,VERSION:U_e,all:W_e,Cancel:z_e,isAxiosError:fCe,spread:j_e,toFormData:K_e,AxiosHeaders:q_e,HttpStatusCode:Y_e,formToJSON:Z_e,getAdapter:X_e,mergeConfig:J_e}=Jn,pCe=e=>{const n=`; ${document.cookie}`.split(`; ${e}=`);if(n.length===2){const o=n.pop();return(o==null?void 0:o.split(";").shift())??null}return null},gCe=6e4,YV=1e3/5;let ZV=0;const ty=[];let ny=!1;const s_=()=>{if(ny||ty.length===0)return;ny=!0;const t=Date.now()-ZV;if(t>=YV){const n=ty.shift();ZV=Date.now(),n==null||n(),ny=!1,ty.length>0&&s_()}else{const n=YV-t;setTimeout(()=>{ny=!1,s_()},n)}},mCe=()=>new Promise(e=>{ty.push(e),s_()}),vCe=(()=>{const e=Jn.create({timeout:gCe,headers:{"Content-Type":"application/json"}});return e.interceptors.request.use(async t=>{await mCe();const n=pCe("account.token");return n&&t.headers&&(t.headers.Authorization=`Bearer ${n}`),t.headers&&(t.headers["Access-Control-Allow-Origin"]="*",t.headers["Access-Control-Allow-Headers"]="*",t.headers["Accept-Language"]="*"),t},t=>Promise.reject(t)),e.interceptors.response.use(t=>t,async t=>{var o,i;const n=t.config;if(((o=t.response)==null?void 0:o.status)===429&&(!n._retryCount||n._retryCount<3)){n._retryCount=(n._retryCount||0)+1;const s=t.response.headers["retry-after"],r=s?parseInt(s)*1e3:Math.pow(2,n._retryCount)*1e3;return await new Promise(a=>setTimeout(a,r)),e(n)}return((i=t.response)==null?void 0:i.status)===401&&!n._retry&&(n._retry=!0),Promise.reject(t)}),e})();class Zf extends Error{constructor(t,n,o,i,s){super(t),this.name="ApiError",this.statusCode=n,this.code=o,this.details=i,this.type=s,Object.setPrototypeOf(this,Zf.prototype)}}const Xf=e=>{var t,n;if(fCe(e)){const o=(t=e.response)==null?void 0:t.status,i=(n=e.response)==null?void 0:n.data,s=(i==null?void 0:i.message)||e.message||"An unexpected error occurred",r=(i==null?void 0:i.code)||e.code,a=(i==null?void 0:i.details)||i;let l="UNKNOWN";return!o||e.code==="ERR_NETWORK"||e.code==="ECONNABORTED"?l=e.code==="ECONNABORTED"?"TIMEOUT":"NETWORK":o>=500?l="SERVER":o===Cu.UNAUTHORIZED||o===Cu.FORBIDDEN?l="AUTH":o===Cu.UNPROCESSABLE_ENTITY||o===Cu.BAD_REQUEST?l="VALIDATION":o>=Cu.BAD_REQUEST&&(l="CLIENT"),new Zf(s,o,r,a,l)}return e instanceof Error?new Zf(e.message,void 0,void 0,void 0,"UNKNOWN"):new Zf("An unknown error occurred",void 0,void 0,void 0,"UNKNOWN")};class yCe{constructor(){this.axios=vCe}buildUrl(t=""){const n=t.replace(/^\//,"");return!n.startsWith("http://")&&!n.startsWith("https://")?`/${n}`:n??""}buildQueryParams(t){const n=new URLSearchParams;Object.entries(t).forEach(([i,s])=>{s!=null&&s!==""&&(Array.isArray(s)?s.forEach(r=>n.append(i,String(r))):typeof s=="object"?n.append(i,JSON.stringify(s)):n.append(i,String(s)))});const o=n.toString();return o?`?${o}`:""}async get(t="",n,o){try{const i=this.buildUrl(t),s=n?this.buildQueryParams(n):"";return(await this.axios.get(`${i}${s}`,o)).data}catch(i){throw Xf(i)}}async post(t="",n,o,i){try{const s=this.buildUrl(t),r=n?this.buildQueryParams(n):"";return(await this.axios.post(`${s}${r}`,o,i)).data}catch(s){throw Xf(s)}}async put(t="",n,o){try{const i=this.buildUrl(t);return(await this.axios.put(i,n,o)).data}catch(i){throw Xf(i)}}async patch(t="",n,o){try{const i=this.buildUrl(t);return(await this.axios.patch(i,n,o)).data}catch(i){throw Xf(i)}}async delete(t="",n,o){try{const i=this.buildUrl(t);return(await this.axios.delete(i,{data:n,...o})).data}catch(i){throw Xf(i)}}}const CCe=({domainApi:e,wsCode:t,entityId:n})=>({list_cursor:{url:`${e}/v1/workspace/${t}/item/2`,method:"post",code:"list_cursor"},assignedUser:{url:`${e}/v1/workspace/${t}/item/2/assigned-users`,method:"post",code:"assignedUser"},metricValues:{url:`${e}/v1/workspace/${t}/item/2/metrics`,method:"post",code:"metricValues"},multipleAssignableUser:{url:`${e}/v1/workspace/${t}/item/2/assignable-users`,method:"post",code:"multipleAssignableUser"},assignableUser:{url:`${e}/v1/workspace/${t}/item/2/assignable-users`,method:"post",code:"assignableUser"},assignableStatus:{url:`${e}/v1/workspace/${t}/item/2/assignable-statuses`,method:"post",code:"assignableStatus"},delete_rendition:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-rendition`,method:"delete",code:"delete_rendition"},delete_thumbnail:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-thumbnail`,method:"delete",code:"delete_thumbnail"},archive_item:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"archive_item"},unarchive_item:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"unarchive_item"},removeAssignee:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-assignee`,method:"delete",code:"removeAssignee"},basicInfor:{url:`${e}/v1/workspace/${t}/tile/people/ws-user-roles/{userId}/basic-info`,method:"get",code:"basicInfor"},bulkDelete:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete`,method:"delete",code:"bulkDelete"},bulkArchive:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"bulkArchive"},bulkDateUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-date-update`,method:"put",code:"bulkDateUpdate"},bulkAssignUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-assignee-update`,method:"put",code:"bulkAssignUpdate"},bulkStatusUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-status-update`,method:"put",code:"bulkStatusUpdate"},bulkMetricUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-metric-update`,method:"put",code:"bulkMetricUpdate"},getPermission:{url:`${e}/v1/workspace/${t}/item/2/permissions`,method:"post",code:"getPermission"},getUserPermission:{url:`${e}/v1/workspace/${t}/permissions`,method:"get",code:"getUserPermission"},bulkUnarchive:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"bulkUnarchive"},downloadTemplate:{url:`${e}/v1/workspace/${t}/item/2/download-sample`,method:"get",code:"downloadTemplate"},importItems:{url:`${e}/v1/workspace/${t}/item/2/import-from-file`,method:"post",code:"importItems"},exportItems:{url:`${e}/v1/workspace/${t}/item/2/export`,method:"get",code:"exportItems"},updateFromFile:{url:`${e}/v1/workspace/${t}/item/2/update-from-file`,method:"post",code:"updateFromFile"},getStatuses:{url:`${e}/workspace/${t}/entities/${n}/template_flow_statuses`,method:"get",code:"getStatuses"},metricList:{url:`${e}/workspace/${t}/entities/${n}/metric`,method:"get",code:"metricList"},getEntityDetail:{url:`${e}/workspace/${t}/entities/${n}?include_permission=1`,method:"get",code:"getEntityDetail"},item:{url:`${e}/v1/workspace/${t}/item/2/update`,method:"put",code:"item"},createNewScene:{url:`${e}/workspace/${t}/items`,method:"post",code:"createNewScene"},me:{url:`${e}/v1/me`,method:"get",code:"me"},workspaces:{url:`${e}/v1/workspaces`,method:"get",code:"workspaces"},entityUserRoles:{url:`${e}/workspace/${t}/ws-user-roles`,method:"get",code:"entityUserRoles"},templateFlowStatuses:{url:`${e}/workspace/${t}/entities/${n}/template_flow_statuses`,method:"get",code:"templateFlowStatuses"}}),wCe=(e,t)=>{const n=new Blob([e]),o=globalThis.URL.createObjectURL(n),i=document.createElement("a");i.href=o,i.download=t,document.body.appendChild(i),i.click(),i.remove(),globalThis.URL.revokeObjectURL(o)};class XV extends yCe{constructor(t,n){const o=n==null?void 0:n.domainApi,i=(n==null?void 0:n.wsCode)||"w:yngazem",s=(n==null?void 0:n.entityId)||"";super(),this.events=Object.create(null);const r=CCe({domainApi:o,wsCode:i,entityId:s}),a={};Object.entries(r).forEach(([l,c])=>{const u=l;t[u]?a[u]=t[u]:(console.warn(`API config for ${u} is missing, using base config.`),a[u]=c)}),this.apiConfig=a}on(t,n){var o;((o=this.events)[t]??(o[t]=[])).push(n)}off(t,n){const o=this.events[t];o&&(this.events[t]=o.filter(i=>i!==n))}emit(t,...n){const o=this.events[t];o!=null&&o.length&&o.forEach(i=>{try{i(...n)}catch(s){console.error(`Error in event listener for ${t}:`,s)}})}buildHeaders(t){return typeof FormData<"u"&&t instanceof FormData?{"Content-Type":"multipart/form-data"}:{}}async _requestHandler({method:t,path:n,params:o,payload:i,code:s,responseType:r}){var c,u;const a=this.buildHeaders(i);let l;try{if(l=await this.axios.request({method:t,url:n,params:o,data:i,headers:a,responseType:r}),(((c=l.headers)==null?void 0:c["content-type"])||"").includes("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")){const h=((u=l.headers)==null?void 0:u["content-disposition"])||"",f=h.includes("filename=")?h.split("filename=")[1]:"exported_items.xlsx";wCe(l.data,f)}if(l.status>=400&&l.status<=500)throw new Error(`Client error (${l.status}): ${l.statusText}`);return this.emit("call-api",{apiCode:s,path:n,params:o,payload:i,res:l,success:!0}),l.data}catch(d){throw console.error("API Request Error:",d),this.emit("call-api",{path:n,params:o,payload:i,error:d,success:!1,apiCode:s,res:d==null?void 0:d.response}),d}}generateUrl(t,n){let o=t;return Object.entries(n).forEach(([i,s])=>{o=o.replace(`{${i}}`,String(s))}),o}async request(t,n,o={}){const{url:i,code:s,method:r}=this.apiConfig[t],a=this.generateUrl(i,n);return this._requestHandler({method:r,path:a,params:o.params,payload:o.payload,code:s,responseType:o.responseType})}async getAllItem_cursor(t){var s;const n=t.workspaceId,o={entity_ids:((s=t.entityIds)==null?void 0:s.join(","))||"",cursor:t.cursor||void 0,per_page:t.pageSize||t.perPage||20,offset:t.offset||void 0,search:t.search||t.q||void 0,include_signature:1,include:"last_updated_by,property",include_permission:"{include_permission}",assignee_any_ina:(t==null?void 0:t.assignee_any_ina)||"",assignee_all_ina:(t==null?void 0:t.assignee_all_ina)||void 0,with_not_assigned:t.with_not_assigned||void 0,status_ina:t.status_ina||void 0,status_eq:t.status_eq||void 0,start_date_gte:t.start_date_gte||void 0,start_date_lte:t.start_date_lte||void 0,start_date_btw:t.start_date_btw||void 0,due_date_gte:t.due_date_gte||void 0,due_date_lte:t.due_date_lte||void 0,due_date_btw:t.due_date_btw||void 0,condition_combine_type:t.condition_combine_type||"or",preflight_status:t.preflight_status||void 0},i=t.sortBy;return this.request("list_cursor",{workspaceId:n},{params:o,payload:{sort_by:i}})}async getAssignedUser(t){const n={item_ids:t.item_ids||[],metric_ids:t.metric_ids||[]},o={per_page:t.per_page};return this.request("assignedUser",{workspaceId:t.workspaceId},{params:o,payload:n})}async getMetricList({workspaceId:t,entityId:n,page:o,query:i,per_page:s}){return this.request("metricList",{workspaceId:t,entityId:n},{params:{status_ed:1,include:"metric_type",include_permission:1,per_page:s||20,page:o||1,name_like:i||void 0}})}async getMetricValues({workspaceId:t,item_ids:n,per_page:o,metric_ids:i}){const s={item_ids:n,metric_ids:i};return this.request("metricValues",{workspaceId:t},{params:{per_page:o,include_permission:1},payload:s})}async multipleAssignableUser(t){const n=t.workspaceId,o=t.itemIds,i={page:t.page||1,per_page:t.perPage,display_name_like:t.q||"",item_ids:o||[]};return this.request("multipleAssignableUser",{workspaceId:n},{payload:i})}async getAssignableStatus(t){const n=t.workspaceId,o={item_ids:t.itemIds||[],page:t.page||1,per_page:t.perPage||10,name_like:t.name_like||""};return this.request("assignableStatus",{workspaceId:n||""},{payload:o})}async updateSceneName({workspaceId:t,entityId:n,itemId:o,name:i}){const s={item_id:o,entity_id:n,name:i,include:"item_user_roles"};return this.request("item",{workspaceId:t,itemId:o},{payload:s})}async deleteScene(t,n,o){const i={item_ids:[o]};return this.request("bulkDelete",{workspaceId:t,entityId:n},{payload:i})}async deleteThumbnail({workspaceId:t,itemIds:n,entityId:o}){const i={item_ids:n,entity_id:o};return!n||n.length===0?i.item_ids=void 0:i.entity_id=void 0,this.request("delete_thumbnail",{workspaceId:t},{payload:i})}async deleteRendition({workspaceId:t,itemIds:n,deleteAll:o=!1,entityId:i}){const s={item_ids:n,delete_all:o?1:void 0,entity_id:i};return!n||n.length===0?s.item_ids=void 0:s.entity_id=void 0,this.request("delete_rendition",{workspaceId:t},{payload:s})}async archiveScene(t,n,o){const i={item_ids:o,status:0};return this.request("archive_item",{workspaceId:t,entityId:n},{payload:i})}async changeDate({workspaceId:t,itemIds:n,startDate:o,dueDate:i,entityId:s,filterParams:r}){const a={item_ids:n,start_date:o,due_date:i,entity_id:s};return this.request("bulkDateUpdate",{workspaceId:t},{payload:a,params:r})}async updateAssignee(t){const{workspaceId:n,itemIds:o,userIds:i,entityId:s}=t,r={item_ids:o,ws_user_role_ids:i,entity_id:s};return this.request("bulkAssignUpdate",{workspaceId:n},{payload:r,params:t.filterParams})}createUpdateEntityPayload(t){const{itemIds:n,userIds:o,entityId:i}=t,s={item_ids:n,ws_user_role_ids:o,entity_id:i};return!n||n.length===0?(s.item_ids=void 0,s.entity_id=i):(s.item_ids=n,s.entity_id=void 0),s}async removeAssignee(t){const n=this.createUpdateEntityPayload(t);return this.request("removeAssignee",{workspaceId:t.workspaceId},{payload:n,params:t.filterParams})}async replaceAssignee(t){const{workspaceId:n,itemIds:o,userIds:i,entityId:s}=t,r={item_ids:o,ws_user_role_ids:i,entity_id:s};return this.request("bulkAssignUpdate",{workspaceId:n},{params:{replace:1,...t.filterParams},payload:r})}async addAssignee({workspaceId:t,itemIds:n,userIds:o,entityId:i,filterParams:s}){const r={item_ids:n,ws_user_role_ids:o,entity_id:i};return this.request("bulkAssignUpdate",{workspaceId:t},{payload:r,params:s})}async unAssignAll(t){const{workspaceId:n,entityId:o,itemIds:i,filterParams:s}=t,r={item_ids:i,entity_id:o,ws_user_role_ids:[]};return!i||i.length===0?r.item_ids=void 0:r.entity_id=void 0,this.request("removeAssignee",{workspaceId:n,entityId:String(o)},{payload:r,params:s})}async createNewScene({workspaceId:t,entityId:n,name:o}){const i={entity_id:n,name:o};return this.request("createNewScene",{workspaceId:t},{payload:i})}async updateItemStatus(t){const{workspaceId:n,itemIds:o=[],statusId:i,entityId:s}=t,r={item_ids:o,template_flow_status_id:i};return o.length||(r.item_ids=void 0,r.entity_id=s),this.request("bulkStatusUpdate",{workspaceId:n},{payload:r,params:t.filterParams})}async getUserInformation(t,n){return this.request("basicInfor",{workspaceId:t,userId:n})}async bulkDeleteItems({workspaceId:t,itemIds:n,entityId:o}){const i={item_ids:n,entity_id:o};return!n||n.length===0?i.item_ids=void 0:i.entity_id=void 0,this.request("bulkDelete",{workspaceId:t},{payload:i})}async bulkUnarchiveItems({workspaceId:t,itemIds:n,entityId:o}){const i={item_ids:n,status:1,entity_id:o};return!n||n.length===0?i.item_ids=void 0:i.entity_id=void 0,this.request("bulkUnarchive",{workspaceId:t},{payload:i})}async bulkArchiveItems({workspaceId:t,itemIds:n,entityId:o}){const i={item_ids:n,status:0,entity_id:o};return!n||n.length===0?i.item_ids=void 0:i.entity_id=void 0,this.request("bulkArchive",{workspaceId:t},{payload:i})}async bulkUpdateMetric(t){const{workspaceId:n,itemIds:o,metricId:i,value:s,clear:r}=t,a={item_ids:o,metric_id:i,metric_value:s,clear:r??(s==null?1:0),entity_id:t.entityId};return t.itemIds===void 0?(delete a.item_ids,a.entity_id=String(t.entityId)):(a.item_ids=o,a.entity_id=void 0),this.request("bulkMetricUpdate",{workspaceId:n},{payload:a,params:t.filterParams})}async getPermissionForItems({workspaceId:t,itemIds:n}){const o={item_ids:n};return this.request("getPermission",{workspaceId:t},{payload:o,params:{per_page:500}})}async unarchiveScene(t,n,o){const i={item_ids:o,status:1};return this.request("unarchive_item",{workspaceId:t,entityId:n},{payload:i})}async getUserPermission(t){return this.request("getUserPermission",{workspaceId:t})}async getEntityDetail(t,n){return this.request("getEntityDetail",{workspaceId:t,entityId:n})}async downloadTemplate(t,n){return this.request("downloadTemplate",{workspaceId:t,entityId:n},{responseType:"blob",params:{format:"xlsx",entity_id:n}})}async downloadExportedItemsFile(t,n){return this.request("exportItems",{workspaceId:t,exportId:n},{responseType:"blob",params:{format:"xlsx",entity_id:n}})}async getStatuses(t,n,o){return this.request("getStatuses",{workspaceId:t,entityId:n},{params:o})}async addNewSceneViaImportFile(t,n,o){return this.request("importItems",{workspaceId:t,entityId:n},{payload:o})}async overwriteScenesViaImportFile(t,n,o){return this.request("updateFromFile",{workspaceId:t,entityId:n},{payload:o})}async getMe(){return this.request("me",{})}async getWorkspaces(t){const n={page:1,per_page:1,"ws_user_role>status_eq":1,include:"owner",include_ws:t};return this.request("workspaces",{},{params:n})}async getEntityUserRoles(t){const{workspaceId:n,page:o,per_page:i,display_name_like:s,include:r}=t;return this.request("entityUserRoles",{workspaceId:n},{params:{page:o,per_page:i,display_name_like:s,include:r}})}async getTemplateFlowStatuses(t){const{workspaceId:n,entityId:o}=t;return this.request("templateFlowStatuses",{workspaceId:n,entityId:o},{params:{per_page:100,page:t.page??1,all:1,name_like:t.name_like}})}}const bCe=()=>{const e=Hn.getInstance().getItem("API_BASE_URL");return e!=null&&e.includes("v1")?e.slice(0,e.lastIndexOf("/v1")):String(e)},SCe=e=>{var D,P,A;const{showMessage:t,showErrorNetMessage:n}=$h(),o=So(),i={domainApi:bCe(),wsCode:Hn.getInstance().getItem("ws.code"),entityId:e.value.entityId},s=(A=(P=(D=o==null?void 0:o.appContext)==null?void 0:D.config)==null?void 0:P.globalProperties)==null?void 0:A.apiConfig;if(!s||i.domainApi===""||i.wsCode==="")throw new Error("API configuration is missing in useItems");const r=new XV(s,i);r.on("call-api",J=>{J.success?t(J.apiCode,"success"):n(J)});const a=ki({}),l=H([]),c=H(!1),u=H(null),d=H(null),h=H(1),f=H(20),{setCachedUsers:p}=Q7(),m=J=>({workspaceId:e.value.workspaceId,entityIds:[e.value.entityId],orderBy:"id-asc",include_permission:"{include_permission}",include_permission_names:!0,q:J}),v=50,w=async(J,X,G)=>{if(!J.length)return[];const te=c4(J,X);return(await Promise.all(te.map(G))).flat()},b=async J=>{try{return(await r.getPermissionForItems({workspaceId:e.value.workspaceId,itemIds:J})).data.map(G=>[G.id,G.permission])}catch(X){return console.error("Failed to fetch item permissions chunk:",X),[]}},S=async(J,X)=>{try{const G=await r.getMetricValues({workspaceId:e.value.workspaceId,item_ids:J,per_page:J.length*X.length,metric_ids:X}),te=G.data.map($=>{const N=new Map($.item_metrics.map(se=>[se.metric_id,{value:se.value,auth_permission:se.auth_permission}])),ee=Object.fromEntries(X.map(se=>[se,N.get(se)??null]));return[$.id,ee]}),V=new Set(G.data.map($=>$.id));for(const $ of J)if(!V.has($)){const N=Object.fromEntries(X.map(ee=>[ee,{value:null,auth_permission:void 0}]));te.push([$,N])}return te}catch(G){return console.error("Failed to fetch a chunk of metric values:",G),J.map(V=>[V,Object.fromEntries(X.map($=>[$,void 0]))])}},C=async J=>{try{const X=await r.getAssignedUser({workspaceId:e.value.workspaceId,item_ids:J,per_page:J.length}),G=X.data.flatMap(te=>te.assignees);return p(G),X.data.map(te=>[te.id,te.assignees])}catch(X){return console.error("Failed to fetch a chunk of assigned users:",X),[]}},R=async J=>{if(!J.length)return console.warn("getPermissionForItems: Empty itemIds"),{};try{const X=await w(J,v,b);return Object.fromEntries(X)}catch(X){return console.error("Failed to fetch item permissions:",X),{}}},_=async(J,X)=>{if(!J.length||!X.length)return{};try{const V=[];for(let N=0;N<X.length;N+=4){const ee=X.slice(N,N+4),se=await Promise.all(ee.map(async ne=>await w(J,v,ie=>S(ie,[ne]))));V.push(...se),N+4<X.length&&await new Promise(ne=>setTimeout(ne,2e3))}const $={};for(const N of V.flat()){const[ee,se]=N;$[ee]||($[ee]={}),Object.assign($[ee],se)}return $}catch(G){return console.error("Failed to fetch metric values:",G),{}}},T=async J=>{if(!J.length)return console.warn("getAssignedUsers: Empty itemIds"),{};try{const X=await w(J,v,C);return Object.fromEntries(X)}catch(X){return console.error("Failed to fetch assigned users:",X),{}}};return{items:l,loading:c,error:u,pagination:d,currentPage:h,pageSize:f,cusorMap:a,fetchItems:async J=>{const{cursor:X,offset:G,size:te,searchQuery:V}=J;let $=[];c.value=!0,u.value=null;try{const N=await r.getAllItem_cursor({...J,cursor:X||void 0,offset:G||void 0,pageSize:te||f.value,...m(V),sortBy:J.sort_by});return l.value=N.data,d.value=N.meta,h.value=N.meta.current_page||0,$=N.data.map(ee=>ee.id),N}catch(N){throw u.value=N,console.error("Failed to fetch items (cursor):",N),N}finally{const N=async()=>{try{const[ee,se]=await Promise.all([T($),R($)]);e.value.updateItemData({assignees:ee,permission:se},$);const ne=await _($,e.value.metricIds);e.value.updateItemData({metricValues:ne},$)}catch(ee){console.error("Post-fetch processing failed:",ee)}};c.value=!1,setTimeout(N)}},getAssignableStatus:async J=>{try{return await r.getAssignableStatus({workspaceId:e.value.workspaceId,itemIds:J})}catch(X){throw console.error("Failed to fetch assignable status:",X),X}},getMetricList:async J=>{try{return await r.getMetricList({workspaceId:e.value.workspaceId,entityId:J})}catch(X){throw console.error("Failed to fetch metric list:",X),X}},getMetricValues:_,getAssignedUsers:T}};function ECe(e){return{updateRowData:(o,i)=>{if(!e.value)return;const s=[],r=new Map,a=new Set,l=e.value.getColumnDefs();if(!l)return;const c=l.map(u=>{if(u.field&&u.field.startsWith("metric_")&&(u.hide===!1||u.hide===void 0))return u.field}).filter(Boolean);i.forEach(u=>{var h;const d=(h=e.value)==null?void 0:h.getRowNode(u);if(d){if(s.push(d),o.assignees){const f=H7((o.assignees[u]||[]).map(rI));d.data.assignees=f,a.add("assignees")}if(o.permission&&(d.data.permissions=o.permission[u]),c.forEach(f=>{d.data[f]=d.data[f]??null}),o.metricValues&&o.metricValues[u]){const f=o.metricValues[u];Object.keys(f).forEach(p=>{const m=`metric_${p}`,v=`metric_permission_${p}`;d.data[m]=f[p].value||null,d.data[v]=f[p].auth_permission||null,r.set(m,!0),a.add(m)})}}}),a.add("assignees"),a.add("status"),a.add("dateRange"),a.add("moreActions"),a.add("name"),e.value.refreshCells({rowNodes:s,columns:Array.from(a),force:!0})},setMetricValues:(o,i,s)=>{const r=e.value;if(!r)return;const a=new Map(Array.from(i).map(c=>[c,new Map(s.map(u=>[u,{value:null,auth_permission:void 0}]))]));Object.entries(o).forEach(([c,u])=>{Object.entries(u).forEach(([d,h])=>{var f;(f=a.get(c))==null||f.set(d,{value:h==null?void 0:h.value,auth_permission:h.auth_permission})})});const l=Array.from(a.entries()).map(([c,u])=>{const d=r.getRowNode(c);return d!=null&&d.data?(u.forEach((h,f)=>{const p=`metric_${f}`;d.data[p]=h==null?void 0:h.value}),d):null});l.length>0&&r.refreshCells({rowNodes:l,columns:Array.from(s).map(c=>`metric_${c}`),force:!0})}}}function _Ce(e,t,n,o,i){let s=!0;return{async getRows(r){try{o(!0),s&&(i(!0),s=!1);const a=Math.floor(r.startRow/t)+1,{rows:l,total:c}=await e({page:a,pageSize:t,filterText:n(),sort_by:r.sortModel});let u=-1;Number.isFinite(c)?u=c:l.length<t&&(u=r.startRow+l.length),r.context={pageSize:t,text:n()},r.successCallback(l,u),o(!1),i(!1)}catch(a){console.error("Datasource fetch error:",a),r.failCallback(),o(!1),i(!1)}}}}function RCe(e){const{selectRowData:t,isSidebarOpen:n,quickFilterText:o,gridApi:i,fetcher:s}=e,r=H(!0),a=H(!0),l=H(!1),c=()=>{n.value=!n.value},u=v=>{if(r.value=!1,i.value=v,!v)return null;const{addEventListener:w,setGridOption:b}=v;if(!s)return console.error("Fetcher function is undefined"),null;const S=_Ce(s,e.perPage,()=>o.value,C=>{r.value=C},C=>{a.value=C});return b==null||b("datasource",S),w==null||w("selectionChanged",()=>{t.value=v.getSelectedRows()}),v||null},d=v=>{var w,b;if((w=i.value)==null||w.hideOverlay(),v!==void 0&&(o.value=v),(b=i.value)==null||b.deselectAll(),t.value=[],r.value=!0,!i.value||!s){console.error("Grid API or fetcher is not available"),r.value=!1;return}l.value=!0,a.value=!0,i.value.purgeInfiniteCache(),i.value.ensureIndexVisible(0,"top"),setTimeout(()=>{r.value=!1,setTimeout(()=>{l.value=!1},100)},300)},h=()=>{var v;(v=i.value)==null||v.deselectAll(),t.value=[]},f=Zs(v=>{d(v)},Ur),p=()=>{i.value},m=H(!1);return{isLoading:r,toggleSidebar:c,onGridReady:u,onSearch:f,handleUnSelect:h,firstLoad:a,cacheCleared:l,handleSelectAll:p,isSelectAll:m}}const DCe={changelog:{"1.0.1":{date:"2024-06-20",changes:["Fixed styling issues for archived and deleted rows."]},"1.0.0":{date:"2024-06-15",changes:["Initial release of the Item Table package."]},"0.0.1-alpha.8":{date:"2024-06-10",changes:["Improved performance of row updates.","Added support for custom cell renderers.","Add row hover effect for better UX.","Add loading skeleton for filter","Beta release with core functionalities implemented."]},"0.0.1-alpha.9":{date:"2024-06-05",changes:["Add row selection feature.","Fix bug with column resizing.","Optimize rendering for large datasets.","Implement getLog function to retrieve changelog entries based on version.","Display app version and changelog in the Item Table component tooltip.","Clean up unused autocomplete and memoized config composables.","Update styles for better consistency and readability."]},"0.0.1-alpha.11":{date:"2024-06-18",changes:["Add bulk process status display: items now show an hourglass icon and tooltip when being processed.","Update data model: added isProcessing and bulk_process properties to track item status.","Improve row focus: focused rows now flash for better visibility.","Set 'Last Updated' and 'Completed On' columns as read-only.","Fix: resolve visual fetching issue in useRemoteFiles composable.","Fix: use correct upload icon in PopupCreateScenes component.","Enhance data conversion to include processing status in item rows."]},"0.0.1-alpha.12":{date:"2024-06-12",changes:["feat: enhance Snackbar component and notification handling","Refactor Snackbar.vue for improved readability and styling, including color adjustments for icons and text.","Add showMessage function in notifications store to display messages based on API keys, improving notification management.","Introduce notificationMessage constant to centralize notification messages for various API actions, enhancing maintainability.","Remove unnecessary console logs from useRemoteFiles and improve logging in notification store for better debugging."]},"0.0.1-alpha.16":{date:"2024-06-20",changes:["Add onboarding tour feature and enhance UI components with new dependencies","Refactor UI components for improved styling and functionality","Updated RatingComponent.vue to streamline class bindings and improve accessibility attributes.","Enhanced SearchBox.vue by adding a clear event handler and simplifying icon rendering.","Modified AssigneeGroupEditor.vue and AssigneeGroupRenderer.vue to remove unnecessary size attributes from icons.","Adjusted DateRangeRenderer.vue to remove size attributes from icons for consistency.","Updated HeaderCheckbox.vue to set dropdown placement to 'bottom-start'.","Refined HeaderSorting.vue to simplify sort option labels and improve sorting logic.","Enhanced HeaderWrapper.vue to utilize reactive properties for sorting state.","Improved HyperLinkEditor.vue and HyperLinkInlineEditor.vue by removing size attributes from icons.","Updated PopupLayout.vue to use a CSS variable for box-shadow styling.","Refined Snackbar.vue to standardize icon colors and improve styling consistency.","Adjusted useTippy.ts to set default placement and arrow visibility for tooltips.","Modified notificationMessage.ts to remove error messages for list fetching.","Cleaned up notifications.ts by removing console logs for a cleaner codebase.","Updated sortStore.ts to comment out unnecessary console logs for better performance.","Enhanced styles.scss by defining new icon size variables and standardizing box-shadow styles."]},"0.0.99":{date:"2024-06-24",changes:["Fix: resolve issue with incorrect version display in Item Table component.","Update changelog retrieval logic to ensure accurate version matching.","Enhance tooltip display for app version and changelog in Item Table component."]}}},TCe=e=>{var t;return(t=Object.entries(DCe.changelog).find(([n,o])=>n===e))==null?void 0:t[1].changes},FCe={key:1},xCe=_t(dt({__name:"PopupOverwriteScenes",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const o=H(null),i=e,s=()=>{o.value&&o.value.show()},r=H(""),a=H("idle"),l=H({file:null,format:null}),{apiServices:c}=mo(!1,{}),u=H(!1),d=async()=>{u.value=!0;const T=i.workspaceId,O=i.entityId;if(!T||!O||!c.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await c.value.downloadExportedItemsFile(T,O))throw new Error("No response from downloadTemplate API")}catch(x){console.error("Error downloading template:",x)}u.value=!1},h=n,f=()=>{h("import-success"),b()},p=async T=>{var I,D,P;const O=new FormData,x=((I=T.name.split(".").pop())==null?void 0:I.toString())||"";if(O.append("file",T),O.append("format",x),O.append("entity_id",i.entityId||""),!c.value){console.error("API services not available");return}try{await c.value.overwriteScenesViaImportFile(i.workspaceId,i.entityId,O),m()}catch(A){throw console.error("Error uploading file:",A),v(((P=(D=A.response)==null?void 0:D.data)==null?void 0:P.message)||"An unknown error occurred during file upload."),A}},m=()=>{a.value="success"},v=T=>{r.value=T,a.value="error"},w=async()=>{!l.value||!l.value.file||await p(l.value.file)},b=()=>{var T;_(),(T=o.value)==null||T.hide()};t({close:b,open:s});const S=K(()=>({error:"Import failed",importing:"Import in progress",success:"Import successful",idle:"Update existing work"})[a.value]),C=K(()=>l.value.file?!1:(console.error("No file selected"),!0)),R=H(null),_=()=>{var T;(T=R.value)==null||T.clear(),r.value="",l.value={file:null,format:null},a.value="idle"};return(T,O)=>(j(),je(q(OA),{"popup-name":S.value,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:o,onHidden:_},Ld({default:_e(()=>[a.value==="importing"||a.value==="error"||a.value==="success"?(j(),je(LO,{key:0,state:a.value,"error-message":r.value,overwrite:!0},null,8,["state","error-message"])):(j(),ue("div",FCe,[ye("div",{class:Z(T.$style["step-section"])},[ye("span",{class:Z(T.$style["step-title"])},"Step 1: Download current data",2),ye("span",{class:Z(T.$style["step-description"])},[...O[1]||(O[1]=[et(" Download a file with all existing work and details. Edit it, then upload in Step 2. ",-1),ye("br",null,null,-1),ye("i",null,"Note: Empty cells and unchanged values will be skipped.",-1)])],2),me(q(yt),{class:Z(T.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:u.value,onHandleClick:d},{prefix:_e(()=>[me(q(Ct),{src:"Download"})]),default:_e(()=>[O[2]||(O[2]=et(" Download file ",-1))]),_:1},8,["class","disabled"])],2),ye("div",{class:Z(T.$style["step-section"])},[ye("span",{class:Z(T.$style["step-title"])},"Step 2: Upload updated file (.xlsx, .xls, .csv)",2),me(q(wk),{modelValue:l.value,"onUpdate:modelValue":O[0]||(O[0]=x=>l.value=x),ref_key:"filUploaderRef",ref:R},null,8,["modelValue"])],2),ye("div",{class:Z(T.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[me(VO)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:_e(()=>[me(q(yt),{style:{flex:"1"},variant:"secondary",onClick:b},{default:_e(()=>[...O[3]||(O[3]=[et(" Cancel ",-1)])]),_:1}),me(q(yt),{disabled:C.value,style:{flex:"1"},variant:"primary",onClick:w},{default:_e(()=>[...O[4]||(O[4]=[et(" Import ",-1)])]),_:1},8,["disabled"])]),key:"0"}:a.value==="success"?{name:"footer",fn:_e(()=>[me(q(yt),{style:{flex:"1"},variant:"primary",onClick:f},{default:_e(()=>[...O[5]||(O[5]=[et(" Close ",-1)])]),_:1})]),key:"1"}:{name:"footer",fn:_e(()=>[me(q(yt),{style:{flex:"1"},variant:"primary",onClick:_},{default:_e(()=>[...O[6]||(O[6]=[et(" Try Again ",-1)])]),_:1})]),key:"2"}]),1032,["popup-name"]))}}),[["__cssModules",{$style:{"step-section":"_step-section_13ctn_1","step-title":"_step-title_13ctn_11","step-title-2":"_step-title-2_13ctn_17","step-description":"_step-description_13ctn_23","date-format-guide":"_date-format-guide_13ctn_28","import-error":"_import-error_13ctn_39","drop-area":"_drop-area_13ctn_49","is-dragging":"_is-dragging_13ctn_49","drop-area-content":"_drop-area-content_13ctn_52",browse:"_browse_13ctn_61","download-sample-btn":"_download-sample-btn_13ctn_65"}}]]),ICe={style:{cursor:"help"}},PCe=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
248
|
+
`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=yc(this.defaults,n);const{transitional:o,paramsSerializer:i,headers:s}=n;o!==void 0&&ey.assertOptions(o,{silentJSONParsing:wr.transitional(wr.boolean),forcedJSONParsing:wr.transitional(wr.boolean),clarifyTimeoutError:wr.transitional(wr.boolean)},!1),i!=null&&(Pe.isFunction(i)?n.paramsSerializer={serialize:i}:ey.assertOptions(i,{encode:wr.function,serialize:wr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ey.assertOptions(n,{baseUrl:wr.spelling("baseURL"),withXsrfToken:wr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let r=s&&Pe.merge(s.common,s[n.method]);s&&Pe.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=ui.concat(r,s);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const p=[zV.bind(this),void 0];for(p.unshift(...a),p.push(...c),h=p.length,u=Promise.resolve(n);d<h;)u=u.then(p[d++],p[d++]);return u}h=a.length;let f=n;for(;d<h;){const p=a[d++],m=a[d++];try{f=p(f)}catch(v){m.call(this,v);break}}try{u=zV.call(this,f)}catch(p){return Promise.reject(p)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=yc(this.defaults,t);const n=OV(t.baseURL,t.url,t.allowAbsoluteUrls);return RV(n,t.params,t.paramsSerializer)}};Pe.forEach(["delete","get","head","options"],function(t){Cc.prototype[t]=function(n,o){return this.request(yc(o||{},{method:t,url:n,data:(o||{}).data}))}}),Pe.forEach(["post","put","patch"],function(t){function n(o){return function(s,r,a){return this.request(yc(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:r}))}}Cc.prototype[t]=n(),Cc.prototype[t+"Form"]=n(!0)});let uCe=class IB{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(i=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](i);o._listeners=null}),this.promise.then=i=>{let s;const r=new Promise(a=>{o.subscribe(a),s=a}).then(i);return r.cancel=function(){o.unsubscribe(s)},r},t(function(s,r,a){o.reason||(o.reason=new gd(s,r,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new IB(function(i){t=i}),cancel:t}}};function dCe(e){return function(n){return e.apply(null,n)}}function hCe(e){return Pe.isObject(e)&&e.isAxiosError===!0}const i_={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(i_).forEach(([e,t])=>{i_[t]=e});function qV(e){const t=new Cc(e),n=uV(Cc.prototype.request,t);return Pe.extend(n,Cc.prototype,t,{allOwnKeys:!0}),Pe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return qV(yc(e,i))},n}const Jn=qV(qf);Jn.Axios=Cc,Jn.CanceledError=gd,Jn.CancelToken=uCe,Jn.isCancel=IV,Jn.VERSION=jV,Jn.toFormData=Yv,Jn.AxiosError=Ut,Jn.Cancel=Jn.CanceledError,Jn.all=function(t){return Promise.all(t)},Jn.spread=dCe,Jn.isAxiosError=hCe,Jn.mergeConfig=yc,Jn.AxiosHeaders=ui,Jn.formToJSON=e=>FV(Pe.isHTMLForm(e)?new FormData(e):e),Jn.getAdapter=WV.getAdapter,Jn.HttpStatusCode=i_,Jn.default=Jn;const{Axios:V_e,AxiosError:B_e,CanceledError:H_e,isCancel:$_e,CancelToken:G_e,VERSION:U_e,all:W_e,Cancel:z_e,isAxiosError:fCe,spread:j_e,toFormData:K_e,AxiosHeaders:q_e,HttpStatusCode:Y_e,formToJSON:Z_e,getAdapter:X_e,mergeConfig:J_e}=Jn,pCe=e=>{const n=`; ${document.cookie}`.split(`; ${e}=`);if(n.length===2){const o=n.pop();return(o==null?void 0:o.split(";").shift())??null}return null},gCe=6e4,YV=1e3/5;let ZV=0;const ty=[];let ny=!1;const s_=()=>{if(ny||ty.length===0)return;ny=!0;const t=Date.now()-ZV;if(t>=YV){const n=ty.shift();ZV=Date.now(),n==null||n(),ny=!1,ty.length>0&&s_()}else{const n=YV-t;setTimeout(()=>{ny=!1,s_()},n)}},mCe=()=>new Promise(e=>{ty.push(e),s_()}),vCe=(()=>{const e=Jn.create({timeout:gCe,headers:{"Content-Type":"application/json"}});return e.interceptors.request.use(async t=>{await mCe();const n=pCe("account.token");return n&&t.headers&&(t.headers.Authorization=`Bearer ${n}`),t.headers&&(t.headers["Access-Control-Allow-Origin"]="*",t.headers["Access-Control-Allow-Headers"]="*",t.headers["Accept-Language"]="*"),t},t=>Promise.reject(t)),e.interceptors.response.use(t=>t,async t=>{var o,i;const n=t.config;if(((o=t.response)==null?void 0:o.status)===429&&(!n._retryCount||n._retryCount<3)){n._retryCount=(n._retryCount||0)+1;const s=t.response.headers["retry-after"],r=s?parseInt(s)*1e3:Math.pow(2,n._retryCount)*1e3;return await new Promise(a=>setTimeout(a,r)),e(n)}return((i=t.response)==null?void 0:i.status)===401&&!n._retry&&(n._retry=!0),Promise.reject(t)}),e})();class Zf extends Error{constructor(t,n,o,i,s){super(t),this.name="ApiError",this.statusCode=n,this.code=o,this.details=i,this.type=s,Object.setPrototypeOf(this,Zf.prototype)}}const Xf=e=>{var t,n;if(fCe(e)){const o=(t=e.response)==null?void 0:t.status,i=(n=e.response)==null?void 0:n.data,s=(i==null?void 0:i.message)||e.message||"An unexpected error occurred",r=(i==null?void 0:i.code)||e.code,a=(i==null?void 0:i.details)||i;let l="UNKNOWN";return!o||e.code==="ERR_NETWORK"||e.code==="ECONNABORTED"?l=e.code==="ECONNABORTED"?"TIMEOUT":"NETWORK":o>=500?l="SERVER":o===Cu.UNAUTHORIZED||o===Cu.FORBIDDEN?l="AUTH":o===Cu.UNPROCESSABLE_ENTITY||o===Cu.BAD_REQUEST?l="VALIDATION":o>=Cu.BAD_REQUEST&&(l="CLIENT"),new Zf(s,o,r,a,l)}return e instanceof Error?new Zf(e.message,void 0,void 0,void 0,"UNKNOWN"):new Zf("An unknown error occurred",void 0,void 0,void 0,"UNKNOWN")};class yCe{constructor(){this.axios=vCe}buildUrl(t=""){const n=t.replace(/^\//,"");return!n.startsWith("http://")&&!n.startsWith("https://")?`/${n}`:n??""}buildQueryParams(t){const n=new URLSearchParams;Object.entries(t).forEach(([i,s])=>{s!=null&&s!==""&&(Array.isArray(s)?s.forEach(r=>n.append(i,String(r))):typeof s=="object"?n.append(i,JSON.stringify(s)):n.append(i,String(s)))});const o=n.toString();return o?`?${o}`:""}async get(t="",n,o){try{const i=this.buildUrl(t),s=n?this.buildQueryParams(n):"";return(await this.axios.get(`${i}${s}`,o)).data}catch(i){throw Xf(i)}}async post(t="",n,o,i){try{const s=this.buildUrl(t),r=n?this.buildQueryParams(n):"";return(await this.axios.post(`${s}${r}`,o,i)).data}catch(s){throw Xf(s)}}async put(t="",n,o){try{const i=this.buildUrl(t);return(await this.axios.put(i,n,o)).data}catch(i){throw Xf(i)}}async patch(t="",n,o){try{const i=this.buildUrl(t);return(await this.axios.patch(i,n,o)).data}catch(i){throw Xf(i)}}async delete(t="",n,o){try{const i=this.buildUrl(t);return(await this.axios.delete(i,{data:n,...o})).data}catch(i){throw Xf(i)}}}const CCe=({domainApi:e,wsCode:t,entityId:n})=>({list_cursor:{url:`${e}/v1/workspace/${t}/item/2`,method:"post",code:"list_cursor"},assignedUser:{url:`${e}/v1/workspace/${t}/item/2/assigned-users`,method:"post",code:"assignedUser"},metricValues:{url:`${e}/v1/workspace/${t}/item/2/metrics`,method:"post",code:"metricValues"},multipleAssignableUser:{url:`${e}/v1/workspace/${t}/item/2/assignable-users`,method:"post",code:"multipleAssignableUser"},assignableUser:{url:`${e}/v1/workspace/${t}/item/2/assignable-users`,method:"post",code:"assignableUser"},assignableStatus:{url:`${e}/v1/workspace/${t}/item/2/assignable-statuses`,method:"post",code:"assignableStatus"},delete_rendition:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-rendition`,method:"delete",code:"delete_rendition"},delete_thumbnail:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-thumbnail`,method:"delete",code:"delete_thumbnail"},archive_item:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"archive_item"},unarchive_item:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"unarchive_item"},removeAssignee:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-assignee`,method:"delete",code:"removeAssignee"},basicInfor:{url:`${e}/v1/workspace/${t}/tile/people/ws-user-roles/{userId}/basic-info`,method:"get",code:"basicInfor"},bulkDelete:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete`,method:"delete",code:"bulkDelete"},bulkArchive:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"bulkArchive"},bulkDateUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-date-update`,method:"put",code:"bulkDateUpdate"},bulkAssignUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-assignee-update`,method:"put",code:"bulkAssignUpdate"},bulkStatusUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-status-update`,method:"put",code:"bulkStatusUpdate"},bulkMetricUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-metric-update`,method:"put",code:"bulkMetricUpdate"},getPermission:{url:`${e}/v1/workspace/${t}/item/2/permissions`,method:"post",code:"getPermission"},getUserPermission:{url:`${e}/v1/workspace/${t}/permissions`,method:"get",code:"getUserPermission"},bulkUnarchive:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"bulkUnarchive"},downloadTemplate:{url:`${e}/v1/workspace/${t}/item/2/download-sample`,method:"get",code:"downloadTemplate"},importItems:{url:`${e}/v1/workspace/${t}/item/2/import-from-file`,method:"post",code:"importItems"},exportItems:{url:`${e}/v1/workspace/${t}/item/2/export`,method:"get",code:"exportItems"},updateFromFile:{url:`${e}/v1/workspace/${t}/item/2/update-from-file`,method:"post",code:"updateFromFile"},getStatuses:{url:`${e}/workspace/${t}/entities/${n}/template_flow_statuses`,method:"get",code:"getStatuses"},metricList:{url:`${e}/workspace/${t}/entities/${n}/metric`,method:"get",code:"metricList"},getEntityDetail:{url:`${e}/workspace/${t}/entities/${n}?include_permission=1`,method:"get",code:"getEntityDetail"},item:{url:`${e}/v1/workspace/${t}/item/2/update`,method:"put",code:"item"},createNewScene:{url:`${e}/workspace/${t}/items`,method:"post",code:"createNewScene"},me:{url:`${e}/v1/me`,method:"get",code:"me"},workspaces:{url:`${e}/v1/workspaces`,method:"get",code:"workspaces"},entityUserRoles:{url:`${e}/workspace/${t}/ws-user-roles`,method:"get",code:"entityUserRoles"},templateFlowStatuses:{url:`${e}/workspace/${t}/entities/${n}/template_flow_statuses`,method:"get",code:"templateFlowStatuses"}}),wCe=(e,t)=>{const n=new Blob([e]),o=globalThis.URL.createObjectURL(n),i=document.createElement("a");i.href=o,i.download=t,document.body.appendChild(i),i.click(),i.remove(),globalThis.URL.revokeObjectURL(o)};class XV extends yCe{constructor(t,n){const o=n==null?void 0:n.domainApi,i=(n==null?void 0:n.wsCode)||"w:yngazem",s=(n==null?void 0:n.entityId)||"";super(),this.events=Object.create(null);const r=CCe({domainApi:o,wsCode:i,entityId:s}),a={};Object.entries(r).forEach(([l,c])=>{const u=l;t[u]?a[u]=t[u]:(console.warn(`API config for ${u} is missing, using base config.`),a[u]=c)}),this.apiConfig=a}on(t,n){var o;((o=this.events)[t]??(o[t]=[])).push(n)}off(t,n){const o=this.events[t];o&&(this.events[t]=o.filter(i=>i!==n))}emit(t,...n){const o=this.events[t];o!=null&&o.length&&o.forEach(i=>{try{i(...n)}catch(s){console.error(`Error in event listener for ${t}:`,s)}})}buildHeaders(t){return typeof FormData<"u"&&t instanceof FormData?{"Content-Type":"multipart/form-data"}:{}}async _requestHandler({method:t,path:n,params:o,payload:i,code:s,responseType:r}){var c,u;const a=this.buildHeaders(i);let l;try{if(l=await this.axios.request({method:t,url:n,params:o,data:i,headers:a,responseType:r}),(((c=l.headers)==null?void 0:c["content-type"])||"").includes("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")){const h=((u=l.headers)==null?void 0:u["content-disposition"])||"",f=h.includes("filename=")?h.split("filename=")[1]:"exported_items.xlsx";wCe(l.data,f)}if(l.status>=400&&l.status<=500)throw new Error(`Client error (${l.status}): ${l.statusText}`);return this.emit("call-api",{apiCode:s,path:n,params:o,payload:i,res:l,success:!0}),l.data}catch(d){throw console.error("API Request Error:",d),this.emit("call-api",{path:n,params:o,payload:i,error:d,success:!1,apiCode:s,res:d==null?void 0:d.response}),d}}generateUrl(t,n){let o=t;return Object.entries(n).forEach(([i,s])=>{o=o.replace(`{${i}}`,String(s))}),o}async request(t,n,o={}){const{url:i,code:s,method:r}=this.apiConfig[t],a=this.generateUrl(i,n);return this._requestHandler({method:r,path:a,params:o.params,payload:o.payload,code:s,responseType:o.responseType})}async getAllItem_cursor(t){var s;const n=t.workspaceId,o={entity_ids:((s=t.entityIds)==null?void 0:s.join(","))||"",cursor:t.cursor||void 0,per_page:t.pageSize||t.perPage||20,offset:t.offset||void 0,search:t.search||t.q||void 0,include_signature:1,include:"last_updated_by,property",include_permission:"{include_permission}",assignee_any_ina:(t==null?void 0:t.assignee_any_ina)||"",assignee_all_ina:(t==null?void 0:t.assignee_all_ina)||void 0,with_not_assigned:t.with_not_assigned||void 0,status_ina:t.status_ina||void 0,status_eq:t.status_eq||void 0,start_date_gte:t.start_date_gte||void 0,start_date_lte:t.start_date_lte||void 0,start_date_btw:t.start_date_btw||void 0,due_date_gte:t.due_date_gte||void 0,due_date_lte:t.due_date_lte||void 0,due_date_btw:t.due_date_btw||void 0,condition_combine_type:t.condition_combine_type||"or",preflight_status:t.preflight_status||void 0},i=t.sortBy;return this.request("list_cursor",{workspaceId:n},{params:o,payload:{sort_by:i}})}async getAssignedUser(t){const n={item_ids:t.item_ids||[],metric_ids:t.metric_ids||[]},o={per_page:t.per_page};return this.request("assignedUser",{workspaceId:t.workspaceId},{params:o,payload:n})}async getMetricList({workspaceId:t,entityId:n,page:o,query:i,per_page:s}){return this.request("metricList",{workspaceId:t,entityId:n},{params:{status_ed:1,include:"metric_type",include_permission:1,per_page:s||20,page:o||1,name_like:i||void 0}})}async getMetricValues({workspaceId:t,item_ids:n,per_page:o,metric_ids:i}){const s={item_ids:n,metric_ids:i};return this.request("metricValues",{workspaceId:t},{params:{per_page:o,include_permission:1},payload:s})}async multipleAssignableUser(t){const n=t.workspaceId,o=t.itemIds,i={page:t.page||1,per_page:t.perPage,display_name_like:t.q||"",item_ids:o||[]};return this.request("multipleAssignableUser",{workspaceId:n},{payload:i})}async getAssignableStatus(t){const n=t.workspaceId,o={item_ids:t.itemIds||[],page:t.page||1,per_page:t.perPage||10,name_like:t.name_like||""};return this.request("assignableStatus",{workspaceId:n||""},{payload:o})}async updateSceneName({workspaceId:t,entityId:n,itemId:o,name:i}){const s={item_id:o,entity_id:n,name:i,include:"item_user_roles"};return this.request("item",{workspaceId:t,itemId:o},{payload:s})}async deleteScene(t,n,o){const i={item_ids:[o]};return this.request("bulkDelete",{workspaceId:t,entityId:n},{payload:i})}async deleteThumbnail({workspaceId:t,itemIds:n,entityId:o}){const i={item_ids:n,entity_id:o};return!n||n.length===0?i.item_ids=void 0:i.entity_id=void 0,this.request("delete_thumbnail",{workspaceId:t},{payload:i})}async deleteRendition({workspaceId:t,itemIds:n,deleteAll:o=!1,entityId:i}){const s={item_ids:n,delete_all:o?1:void 0,entity_id:i};return!n||n.length===0?s.item_ids=void 0:s.entity_id=void 0,this.request("delete_rendition",{workspaceId:t},{payload:s})}async archiveScene(t,n,o){const i={item_ids:o,status:0};return this.request("archive_item",{workspaceId:t,entityId:n},{payload:i})}async changeDate({workspaceId:t,itemIds:n,startDate:o,dueDate:i,entityId:s,filterParams:r}){const a={item_ids:n,start_date:o,due_date:i,entity_id:s};return this.request("bulkDateUpdate",{workspaceId:t},{payload:a,params:r})}async updateAssignee(t){const{workspaceId:n,itemIds:o,userIds:i,entityId:s}=t,r={item_ids:o,ws_user_role_ids:i,entity_id:s};return this.request("bulkAssignUpdate",{workspaceId:n},{payload:r,params:t.filterParams})}createUpdateEntityPayload(t){const{itemIds:n,userIds:o,entityId:i}=t,s={item_ids:n,ws_user_role_ids:o,entity_id:i};return!n||n.length===0?(s.item_ids=void 0,s.entity_id=i):(s.item_ids=n,s.entity_id=void 0),s}async removeAssignee(t){const n=this.createUpdateEntityPayload(t);return this.request("removeAssignee",{workspaceId:t.workspaceId},{payload:n,params:t.filterParams})}async replaceAssignee(t){const{workspaceId:n,itemIds:o,userIds:i,entityId:s}=t,r={item_ids:o,ws_user_role_ids:i,entity_id:s};return this.request("bulkAssignUpdate",{workspaceId:n},{params:{replace:1,...t.filterParams},payload:r})}async addAssignee({workspaceId:t,itemIds:n,userIds:o,entityId:i,filterParams:s}){const r={item_ids:n,ws_user_role_ids:o,entity_id:i};return this.request("bulkAssignUpdate",{workspaceId:t},{payload:r,params:s})}async unAssignAll(t){const{workspaceId:n,entityId:o,itemIds:i,filterParams:s}=t,r={item_ids:i,entity_id:o,ws_user_role_ids:[]};return!i||i.length===0?r.item_ids=void 0:r.entity_id=void 0,this.request("removeAssignee",{workspaceId:n,entityId:String(o)},{payload:r,params:s})}async createNewScene({workspaceId:t,entityId:n,name:o}){const i={entity_id:n,name:o};return this.request("createNewScene",{workspaceId:t},{payload:i})}async updateItemStatus(t){const{workspaceId:n,itemIds:o=[],statusId:i,entityId:s}=t,r={item_ids:o,template_flow_status_id:i};return o.length||(r.item_ids=void 0,r.entity_id=s),this.request("bulkStatusUpdate",{workspaceId:n},{payload:r,params:t.filterParams})}async getUserInformation(t,n){return this.request("basicInfor",{workspaceId:t,userId:n})}async bulkDeleteItems({workspaceId:t,itemIds:n,entityId:o}){const i={item_ids:n,entity_id:o};return!n||n.length===0?i.item_ids=void 0:i.entity_id=void 0,this.request("bulkDelete",{workspaceId:t},{payload:i})}async bulkUnarchiveItems({workspaceId:t,itemIds:n,entityId:o}){const i={item_ids:n,status:1,entity_id:o};return!n||n.length===0?i.item_ids=void 0:i.entity_id=void 0,this.request("bulkUnarchive",{workspaceId:t},{payload:i})}async bulkArchiveItems({workspaceId:t,itemIds:n,entityId:o}){const i={item_ids:n,status:0,entity_id:o};return!n||n.length===0?i.item_ids=void 0:i.entity_id=void 0,this.request("bulkArchive",{workspaceId:t},{payload:i})}async bulkUpdateMetric(t){const{workspaceId:n,itemIds:o,metricId:i,value:s,clear:r}=t,a={item_ids:o,metric_id:i,metric_value:s,clear:r??(s==null?1:0),entity_id:t.entityId};return t.itemIds===void 0?(delete a.item_ids,a.entity_id=String(t.entityId)):(a.item_ids=o,a.entity_id=void 0),this.request("bulkMetricUpdate",{workspaceId:n},{payload:a,params:t.filterParams})}async getPermissionForItems({workspaceId:t,itemIds:n}){const o={item_ids:n};return this.request("getPermission",{workspaceId:t},{payload:o,params:{per_page:500}})}async unarchiveScene(t,n,o){const i={item_ids:o,status:1};return this.request("unarchive_item",{workspaceId:t,entityId:n},{payload:i})}async getUserPermission(t){return this.request("getUserPermission",{workspaceId:t})}async getEntityDetail(t,n){return this.request("getEntityDetail",{workspaceId:t,entityId:n})}async downloadTemplate(t,n){return this.request("downloadTemplate",{workspaceId:t,entityId:n},{responseType:"blob",params:{format:"xlsx",entity_id:n}})}async downloadExportedItemsFile(t,n){return this.request("exportItems",{workspaceId:t,exportId:n},{responseType:"blob",params:{format:"xlsx",entity_id:n}})}async getStatuses(t,n,o){return this.request("getStatuses",{workspaceId:t,entityId:n},{params:o})}async addNewSceneViaImportFile(t,n,o){return this.request("importItems",{workspaceId:t,entityId:n},{payload:o})}async overwriteScenesViaImportFile(t,n,o){return this.request("updateFromFile",{workspaceId:t,entityId:n},{payload:o})}async getMe(){return this.request("me",{})}async getWorkspaces(t){const n={page:1,per_page:1,"ws_user_role>status_eq":1,include:"owner",include_ws:t};return this.request("workspaces",{},{params:n})}async getEntityUserRoles(t){const{workspaceId:n,page:o,per_page:i,display_name_like:s,include:r}=t;return this.request("entityUserRoles",{workspaceId:n},{params:{page:o,per_page:i,display_name_like:s,include:r}})}async getTemplateFlowStatuses(t){const{workspaceId:n,entityId:o}=t;return this.request("templateFlowStatuses",{workspaceId:n,entityId:o},{params:{per_page:100,page:t.page??1,all:1,name_like:t.name_like}})}}const bCe=()=>{const e=Hn.getInstance().getItem("API_BASE_URL");return e!=null&&e.includes("v1")?e.slice(0,e.lastIndexOf("/v1")):String(e)},SCe=e=>{var D,P,A;const{showMessage:t,showErrorNetMessage:n}=$h(),o=So(),i={domainApi:bCe(),wsCode:Hn.getInstance().getItem("ws.code"),entityId:e.value.entityId},s=(A=(P=(D=o==null?void 0:o.appContext)==null?void 0:D.config)==null?void 0:P.globalProperties)==null?void 0:A.apiConfig;if(!s||i.domainApi===""||i.wsCode==="")throw new Error("API configuration is missing in useItems");const r=new XV(s,i);r.on("call-api",J=>{J.success?t(J.apiCode,"success"):n(J)});const a=ki({}),l=H([]),c=H(!1),u=H(null),d=H(null),h=H(1),f=H(20),{setCachedUsers:p}=Q7(),m=J=>({workspaceId:e.value.workspaceId,entityIds:[e.value.entityId],orderBy:"id-asc",include_permission:"{include_permission}",include_permission_names:!0,q:J}),v=50,w=async(J,X,G)=>{if(!J.length)return[];const te=c4(J,X);return(await Promise.all(te.map(G))).flat()},b=async J=>{try{return(await r.getPermissionForItems({workspaceId:e.value.workspaceId,itemIds:J})).data.map(G=>[G.id,G.permission])}catch(X){return console.error("Failed to fetch item permissions chunk:",X),[]}},S=async(J,X)=>{try{const G=await r.getMetricValues({workspaceId:e.value.workspaceId,item_ids:J,per_page:J.length*X.length,metric_ids:X}),te=G.data.map($=>{const N=new Map($.item_metrics.map(se=>[se.metric_id,{value:se.value,auth_permission:se.auth_permission}])),ee=Object.fromEntries(X.map(se=>[se,N.get(se)??null]));return[$.id,ee]}),V=new Set(G.data.map($=>$.id));for(const $ of J)if(!V.has($)){const N=Object.fromEntries(X.map(ee=>[ee,{value:null,auth_permission:void 0}]));te.push([$,N])}return te}catch(G){return console.error("Failed to fetch a chunk of metric values:",G),J.map(V=>[V,Object.fromEntries(X.map($=>[$,void 0]))])}},C=async J=>{try{const X=await r.getAssignedUser({workspaceId:e.value.workspaceId,item_ids:J,per_page:J.length}),G=X.data.flatMap(te=>te.assignees);return p(G),X.data.map(te=>[te.id,te.assignees])}catch(X){return console.error("Failed to fetch a chunk of assigned users:",X),[]}},R=async J=>{if(!J.length)return console.warn("getPermissionForItems: Empty itemIds"),{};try{const X=await w(J,v,b);return Object.fromEntries(X)}catch(X){return console.error("Failed to fetch item permissions:",X),{}}},_=async(J,X)=>{if(!J.length||!X.length)return{};try{const V=[];for(let N=0;N<X.length;N+=4){const ee=X.slice(N,N+4),se=await Promise.all(ee.map(async ne=>await w(J,v,ie=>S(ie,[ne]))));V.push(...se),N+4<X.length&&await new Promise(ne=>setTimeout(ne,2e3))}const $={};for(const N of V.flat()){const[ee,se]=N;$[ee]||($[ee]={}),Object.assign($[ee],se)}return console.log("Fetched metric values for items:",$),$}catch(G){return console.error("Failed to fetch metric values:",G),{}}},T=async J=>{if(!J.length)return console.warn("getAssignedUsers: Empty itemIds"),{};try{const X=await w(J,v,C);return Object.fromEntries(X)}catch(X){return console.error("Failed to fetch assigned users:",X),{}}};return{items:l,loading:c,error:u,pagination:d,currentPage:h,pageSize:f,cusorMap:a,fetchItems:async J=>{const{cursor:X,offset:G,size:te,searchQuery:V}=J;let $=[];c.value=!0,u.value=null;try{const N=await r.getAllItem_cursor({...J,cursor:X||void 0,offset:G||void 0,pageSize:te||f.value,...m(V),sortBy:J.sort_by});return l.value=N.data,d.value=N.meta,h.value=N.meta.current_page||0,$=N.data.map(ee=>ee.id),N}catch(N){throw u.value=N,console.error("Failed to fetch items (cursor):",N),N}finally{const N=async()=>{try{const[ee,se]=await Promise.all([T($),R($)]);e.value.updateItemData({assignees:ee,permission:se},$);const ne=await _($,e.value.metricIds);e.value.updateItemData({metricValues:ne},$)}catch(ee){console.error("Post-fetch processing failed:",ee)}};c.value=!1,setTimeout(N)}},getAssignableStatus:async J=>{try{return await r.getAssignableStatus({workspaceId:e.value.workspaceId,itemIds:J})}catch(X){throw console.error("Failed to fetch assignable status:",X),X}},getMetricList:async J=>{try{return await r.getMetricList({workspaceId:e.value.workspaceId,entityId:J})}catch(X){throw console.error("Failed to fetch metric list:",X),X}},getMetricValues:_,getAssignedUsers:T}};function ECe(e){return{updateRowData:(o,i)=>{if(!e.value)return;const s=[],r=new Map,a=new Set,l=e.value.getColumnDefs();if(!l)return;const c=l.map(u=>{if(u.field&&u.field.startsWith("metric_")&&(u.hide===!1||u.hide===void 0))return u.field}).filter(Boolean);i.forEach(u=>{var h;const d=(h=e.value)==null?void 0:h.getRowNode(u);if(d){if(s.push(d),o.assignees){const f=H7((o.assignees[u]||[]).map(rI));d.data.assignees=f,a.add("assignees")}if(o.permission&&(d.data.permissions=o.permission[u]),c.forEach(f=>{d.data[f]=d.data[f]??null}),o.metricValues&&o.metricValues[u]){const f=o.metricValues[u];Object.keys(f).forEach(p=>{const m=`metric_${p}`,v=`metric_permission_${p}`;d.data[m]=f[p].value||null,d.data[v]=f[p].auth_permission||null,r.set(m,!0),a.add(m)})}}}),a.add("assignees"),a.add("status"),a.add("dateRange"),a.add("moreActions"),a.add("name"),e.value.refreshCells({rowNodes:s,columns:Array.from(a),force:!0})},setMetricValues:(o,i,s)=>{const r=e.value;if(!r)return;const a=new Map(Array.from(i).map(c=>[c,new Map(s.map(u=>[u,{value:null,auth_permission:void 0}]))]));Object.entries(o).forEach(([c,u])=>{Object.entries(u).forEach(([d,h])=>{var f;(f=a.get(c))==null||f.set(d,{value:h==null?void 0:h.value,auth_permission:h.auth_permission})})});const l=Array.from(a.entries()).map(([c,u])=>{const d=r.getRowNode(c);return d!=null&&d.data?(u.forEach((h,f)=>{const p=`metric_${f}`;d.data[p]=(h==null?void 0:h.value)||null;const m=`metric_permission_${f}`;d.data[p]=(h==null?void 0:h.value)||null,d.data[m]=(h==null?void 0:h.auth_permission)||null}),d):null});l.length>0&&r.refreshCells({rowNodes:l,columns:Array.from(s).map(c=>`metric_${c}`),force:!0})}}}function _Ce(e,t,n,o,i){let s=!0;return{async getRows(r){try{o(!0),s&&(i(!0),s=!1);const a=Math.floor(r.startRow/t)+1,{rows:l,total:c}=await e({page:a,pageSize:t,filterText:n(),sort_by:r.sortModel});let u=-1;Number.isFinite(c)?u=c:l.length<t&&(u=r.startRow+l.length),r.context={pageSize:t,text:n()},r.successCallback(l,u),o(!1),i(!1)}catch(a){console.error("Datasource fetch error:",a),r.failCallback(),o(!1),i(!1)}}}}function RCe(e){const{selectRowData:t,isSidebarOpen:n,quickFilterText:o,gridApi:i,fetcher:s}=e,r=H(!0),a=H(!0),l=H(!1),c=()=>{n.value=!n.value},u=v=>{if(r.value=!1,i.value=v,!v)return null;const{addEventListener:w,setGridOption:b}=v;if(!s)return console.error("Fetcher function is undefined"),null;const S=_Ce(s,e.perPage,()=>o.value,C=>{r.value=C},C=>{a.value=C});return b==null||b("datasource",S),w==null||w("selectionChanged",()=>{t.value=v.getSelectedRows()}),v||null},d=v=>{var w,b;if((w=i.value)==null||w.hideOverlay(),v!==void 0&&(o.value=v),(b=i.value)==null||b.deselectAll(),t.value=[],r.value=!0,!i.value||!s){console.error("Grid API or fetcher is not available"),r.value=!1;return}l.value=!0,a.value=!0,i.value.purgeInfiniteCache(),i.value.ensureIndexVisible(0,"top"),setTimeout(()=>{r.value=!1,setTimeout(()=>{l.value=!1},100)},300)},h=()=>{var v;(v=i.value)==null||v.deselectAll(),t.value=[]},f=Zs(v=>{d(v)},Ur),p=()=>{i.value},m=H(!1);return{isLoading:r,toggleSidebar:c,onGridReady:u,onSearch:f,handleUnSelect:h,firstLoad:a,cacheCleared:l,handleSelectAll:p,isSelectAll:m}}const DCe={changelog:{"1.0.1":{date:"2024-06-20",changes:["Fixed styling issues for archived and deleted rows."]},"1.0.0":{date:"2024-06-15",changes:["Initial release of the Item Table package."]},"0.0.1-alpha.8":{date:"2024-06-10",changes:["Improved performance of row updates.","Added support for custom cell renderers.","Add row hover effect for better UX.","Add loading skeleton for filter","Beta release with core functionalities implemented."]},"0.0.1-alpha.9":{date:"2024-06-05",changes:["Add row selection feature.","Fix bug with column resizing.","Optimize rendering for large datasets.","Implement getLog function to retrieve changelog entries based on version.","Display app version and changelog in the Item Table component tooltip.","Clean up unused autocomplete and memoized config composables.","Update styles for better consistency and readability."]},"0.0.1-alpha.11":{date:"2024-06-18",changes:["Add bulk process status display: items now show an hourglass icon and tooltip when being processed.","Update data model: added isProcessing and bulk_process properties to track item status.","Improve row focus: focused rows now flash for better visibility.","Set 'Last Updated' and 'Completed On' columns as read-only.","Fix: resolve visual fetching issue in useRemoteFiles composable.","Fix: use correct upload icon in PopupCreateScenes component.","Enhance data conversion to include processing status in item rows."]},"0.0.1-alpha.12":{date:"2024-06-12",changes:["feat: enhance Snackbar component and notification handling","Refactor Snackbar.vue for improved readability and styling, including color adjustments for icons and text.","Add showMessage function in notifications store to display messages based on API keys, improving notification management.","Introduce notificationMessage constant to centralize notification messages for various API actions, enhancing maintainability.","Remove unnecessary console logs from useRemoteFiles and improve logging in notification store for better debugging."]},"0.0.1-alpha.16":{date:"2024-06-20",changes:["Add onboarding tour feature and enhance UI components with new dependencies","Refactor UI components for improved styling and functionality","Updated RatingComponent.vue to streamline class bindings and improve accessibility attributes.","Enhanced SearchBox.vue by adding a clear event handler and simplifying icon rendering.","Modified AssigneeGroupEditor.vue and AssigneeGroupRenderer.vue to remove unnecessary size attributes from icons.","Adjusted DateRangeRenderer.vue to remove size attributes from icons for consistency.","Updated HeaderCheckbox.vue to set dropdown placement to 'bottom-start'.","Refined HeaderSorting.vue to simplify sort option labels and improve sorting logic.","Enhanced HeaderWrapper.vue to utilize reactive properties for sorting state.","Improved HyperLinkEditor.vue and HyperLinkInlineEditor.vue by removing size attributes from icons.","Updated PopupLayout.vue to use a CSS variable for box-shadow styling.","Refined Snackbar.vue to standardize icon colors and improve styling consistency.","Adjusted useTippy.ts to set default placement and arrow visibility for tooltips.","Modified notificationMessage.ts to remove error messages for list fetching.","Cleaned up notifications.ts by removing console logs for a cleaner codebase.","Updated sortStore.ts to comment out unnecessary console logs for better performance.","Enhanced styles.scss by defining new icon size variables and standardizing box-shadow styles."]},"0.0.99":{date:"2024-06-24",changes:["Fix: resolve issue with incorrect version display in Item Table component.","Update changelog retrieval logic to ensure accurate version matching.","Enhance tooltip display for app version and changelog in Item Table component."]}}},TCe=e=>{var t;return(t=Object.entries(DCe.changelog).find(([n,o])=>n===e))==null?void 0:t[1].changes},FCe={key:1},xCe=_t(dt({__name:"PopupOverwriteScenes",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const o=H(null),i=e,s=()=>{o.value&&o.value.show()},r=H(""),a=H("idle"),l=H({file:null,format:null}),{apiServices:c}=mo(!1,{}),u=H(!1),d=async()=>{u.value=!0;const T=i.workspaceId,O=i.entityId;if(!T||!O||!c.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await c.value.downloadExportedItemsFile(T,O))throw new Error("No response from downloadTemplate API")}catch(x){console.error("Error downloading template:",x)}u.value=!1},h=n,f=()=>{h("import-success"),b()},p=async T=>{var I,D,P;const O=new FormData,x=((I=T.name.split(".").pop())==null?void 0:I.toString())||"";if(O.append("file",T),O.append("format",x),O.append("entity_id",i.entityId||""),!c.value){console.error("API services not available");return}try{await c.value.overwriteScenesViaImportFile(i.workspaceId,i.entityId,O),m()}catch(A){throw console.error("Error uploading file:",A),v(((P=(D=A.response)==null?void 0:D.data)==null?void 0:P.message)||"An unknown error occurred during file upload."),A}},m=()=>{a.value="success"},v=T=>{r.value=T,a.value="error"},w=async()=>{!l.value||!l.value.file||await p(l.value.file)},b=()=>{var T;_(),(T=o.value)==null||T.hide()};t({close:b,open:s});const S=K(()=>({error:"Import failed",importing:"Import in progress",success:"Import successful",idle:"Update existing work"})[a.value]),C=K(()=>l.value.file?!1:(console.error("No file selected"),!0)),R=H(null),_=()=>{var T;(T=R.value)==null||T.clear(),r.value="",l.value={file:null,format:null},a.value="idle"};return(T,O)=>(j(),je(q(OA),{"popup-name":S.value,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:o,onHidden:_},Ld({default:_e(()=>[a.value==="importing"||a.value==="error"||a.value==="success"?(j(),je(LO,{key:0,state:a.value,"error-message":r.value,overwrite:!0},null,8,["state","error-message"])):(j(),ue("div",FCe,[ye("div",{class:Z(T.$style["step-section"])},[ye("span",{class:Z(T.$style["step-title"])},"Step 1: Download current data",2),ye("span",{class:Z(T.$style["step-description"])},[...O[1]||(O[1]=[et(" Download a file with all existing work and details. Edit it, then upload in Step 2. ",-1),ye("br",null,null,-1),ye("i",null,"Note: Empty cells and unchanged values will be skipped.",-1)])],2),me(q(yt),{class:Z(T.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:u.value,onHandleClick:d},{prefix:_e(()=>[me(q(Ct),{src:"Download"})]),default:_e(()=>[O[2]||(O[2]=et(" Download file ",-1))]),_:1},8,["class","disabled"])],2),ye("div",{class:Z(T.$style["step-section"])},[ye("span",{class:Z(T.$style["step-title"])},"Step 2: Upload updated file (.xlsx, .xls, .csv)",2),me(q(wk),{modelValue:l.value,"onUpdate:modelValue":O[0]||(O[0]=x=>l.value=x),ref_key:"filUploaderRef",ref:R},null,8,["modelValue"])],2),ye("div",{class:Z(T.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[me(VO)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:_e(()=>[me(q(yt),{style:{flex:"1"},variant:"secondary",onClick:b},{default:_e(()=>[...O[3]||(O[3]=[et(" Cancel ",-1)])]),_:1}),me(q(yt),{disabled:C.value,style:{flex:"1"},variant:"primary",onClick:w},{default:_e(()=>[...O[4]||(O[4]=[et(" Import ",-1)])]),_:1},8,["disabled"])]),key:"0"}:a.value==="success"?{name:"footer",fn:_e(()=>[me(q(yt),{style:{flex:"1"},variant:"primary",onClick:f},{default:_e(()=>[...O[5]||(O[5]=[et(" Close ",-1)])]),_:1})]),key:"1"}:{name:"footer",fn:_e(()=>[me(q(yt),{style:{flex:"1"},variant:"primary",onClick:_},{default:_e(()=>[...O[6]||(O[6]=[et(" Try Again ",-1)])]),_:1})]),key:"2"}]),1032,["popup-name"]))}}),[["__cssModules",{$style:{"step-section":"_step-section_13ctn_1","step-title":"_step-title_13ctn_11","step-title-2":"_step-title-2_13ctn_17","step-description":"_step-description_13ctn_23","date-format-guide":"_date-format-guide_13ctn_28","import-error":"_import-error_13ctn_39","drop-area":"_drop-area_13ctn_49","is-dragging":"_is-dragging_13ctn_49","drop-area-content":"_drop-area-content_13ctn_52",browse:"_browse_13ctn_61","download-sample-btn":"_download-sample-btn_13ctn_65"}}]]),ICe={style:{cursor:"help"}},PCe=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
249
249
|
<rect width="32" height="32" rx="4" fill="#CCF3EB"/>
|
|
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=pi,o=Ib(),{setUserPermissions:i,setEntityPermissions:s}=o,{entityPermissions:r}=Ei(o),{addNotification:a}=$h(),l=cn,c=H(null),u={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},d=K(()=>{var We;const ke=((We=r.value)==null?void 0:We.has_create_item_permission)==1||!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}=Ei(m),w=H(!1),b=H(""),S=EA(),{metricList:C}=Ei(S),R=H(""),_=H(!1),T=H(new Set),O=H(new Map),{apiServices:x}=mo(!1,h),{columnDefs:I,checkboxColumn:D,saveColumnConfig:P}=Uve(C,h.entityId,f),A=H();st(()=>I,()=>{var ke;(ke=A.value)==null||ke.updateColumnDefs(I.value)},{deep:!0});const J=(ke,We)=>{P(ke,We)},{updateRowData:X,setMetricValues:G}=ECe(f),te=K(()=>({isSearching:b.value.length>0,isFiltering:Object.keys(mt.value||{}).length>0})),V=K(qw),$=K(()=>I.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_",""))||""}));Hs("timezone",V);const N=K(()=>({autoFetch:!1,workspaceId:h.workspaceId,entityId:h.entityId,metricIds:$.value,updateItemData:X})),{fetchItems:ee,getMetricList:se,cusorMap:ne,getMetricValues:ie}=SCe(N),Q=K(()=>{if(!f.value)return!1;const ke=f.value.getSelectedRows().length;return ke>0&&ke>=v.value.total}),fe=K(()=>{var ke;return((ke=c.value)==null?void 0:ke.name)||"Items"}),Re=(ke,We)=>{var Kt,Vn,da;v.value.total=ke.meta.total??0,(Kt=ke.meta.next)!=null&&Kt.cursor&&(ne[We+1]=ke.meta.next.cursor),R.value=ke.meta["X-Tsr-signature"]||"",ke.meta.total===0?(Vn=f.value)==null||Vn.showNoRowsOverlay():(da=f.value)==null||da.hideOverlay()},He=Ck(),Ee=H(null),{sortingAPIConfiguration:ot,isSortingRunning:vt}=Ei(He),mt=H({preflight_status:"1"});Hs("filterParams",mt);const U=H([]),W=async({page:ke,pageSize:We,filterText:Kt})=>{var Os;(Os=f.value)==null||Os.hideOverlay();const Vn=ne[ke],da=!Vn&&ke>1?(ke-1)*We:void 0,oy=ot.value;oy.length>0&&(vt.value=!0);try{const _r={cursor:Vn,size:We,searchQuery:Kt,offset:da,sort_by:oy,...mt.value},rs=await ee(_r);if(!rs)return{rows:[],total:0};const a_=(Rr=>{const Qf=Rr.data.map(as=>lI(as,V.value));return Qf.forEach(as=>{T.value.add(String(as.id)),O.value.set(String(as.id),{})}),Qf})(rs);return Re(rs,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:ge,toggleSidebar:Te,onGridReady:Ne,handleUnSelect:B,handleSelectAll:z,onSearch:ae,firstLoad:ve}=RCe({selectRowData:H([]),isSidebarOpen:w,quickFilterText:b,gridApi:f,perPage:u.ROWS_PER_PAGE,fetcher:W}),Ie=H([]),Ue=()=>{var ke;Ie.value=((ke=f.value)==null?void 0:ke.getSelectedRows())||[]},Le=ki({columnsDisplay:[],rowsDisplay:{fromIndex:0,toIndex:0}}),de=K(()=>({blockLoadDebounceMillis:1e3,columnDefs:I.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(),Kt=ke.api.getLastDisplayedRowIndex();Le.rowsDisplay.fromIndex=We,Le.rowsDisplay.toIndex=Kt,Le.columnsDisplay=ke.api.getAllDisplayedVirtualColumns().map(Vn=>Vn.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)}st(()=>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=K(()=>Hn.getInstance().getItem("ITEM_TABLE_APP_VERSION")||""),Qn=H(),Oe=K(()=>{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",Vn=>J(Vn,!0)),We.addEventListener("columnResized",Vn=>J(Vn,!0)),We.addEventListener("firstDataRendered",()=>{ve.value=!1}),!document.querySelector(".ag-body-viewport")),We},Ht=(ke,We)=>{if(!f.value)return;const Kt=f.value.getRowNode(ke);Kt?(f.value.ensureIndexVisible(Number(Kt.rowIndex),"middle"),f.value.flashCells({rowNodes:[Kt],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())){ge.value=!0;try{We=await x.value.createNewScene({workspaceId:h.workspaceId,entityId:h.entityId,name:ke}),v.value.total<50&&await jt()}catch(Kt){console.error("Error creating new scene:",Kt)}finally{ge.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:Kt=>{if(Kt.ctrlKey||Kt.metaKey){const Vn=Ci({type:"scene_hub",config:{ws_code:h.workspaceId,baseDomain:Hn.getInstance().getItem("BASE_URL")||"",scene_id:String(We==null?void 0:We.id)}}).url;window.open(Vn,"_blank");return}else qe("scene_hub",{id:String(We==null?void 0:We.id)},{showLoading:!1})},btnIcon:"CustomSceneHub"}],icon:PCe,type:"interactive"})}}},ks=ke=>ke.metric_type.code==="number"?"number":"default",il=async()=>{if(h.entityId)try{const ke=await se(h.entityId);C.value=ke.data.map(We=>({...We,sortType:ks(We)}))}catch(ke){console.error("Failed to initialize metric list:",ke),C.value=[]}},is=async()=>{if(x.value)try{const ke=await x.value.getUserPermission(h.workspaceId);i(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);s(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)}},ss=async()=>{var ke;if(x.value)try{const We=await x.value.getWorkspaces(h.workspaceId),Kt=(ke=We.data[0])==null?void 0:ke.ws_user_role_id;return Kt&&ua.setUserRoleId(Kt),We}catch(We){console.error("Failed to fetch workspace details:",We)}};st(()=>[h.entityId,h.workspaceId],async([ke,We])=>{!ke||!We||(Sr(),ss(),il(),is(),ca())},{immediate:!0,deep:!0}),st($,(ke,We)=>{const Kt=ke.filter(Vn=>!(We!=null&&We.includes(Vn)));Kt.length>0&&ie(Array.from(T.value),Kt).then(Vn=>{G(Vn,T.value,Kt)})},{immediate:!0,deep:!0}),st(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=>{I.value=ke||[]};return(ke,We)=>(j(),je(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(()=>{var Kt;return[ye("h1",{class:Z(ke.$style.tableTitle)},"Scenes",2),ye("div",{class:Z(ke.$style["beta-tag"])},"Beta",2),((Kt=q(r))==null?void 0:Kt.has_create_item_permission)==1?(j(),je(q(Vb),{key:0,variant:["primary"],options:d.value,onSelect:Be,onHandleClick:We[1]||(We[1]=Vn=>Be("new_scene")),id:"create_scene_dropdown"},{prefix:_e(()=>[me(q(yt),{id:"create_new_scene",variant:["primary"],onClick:We[0]||(We[0]=Vn=>Be("new_scene")),label:"New"})]),_:1},8,["options"])):Je("",!0),Xe((j(),ue("span",ICe,[et(St(Sn.value),1)])),[[q(l),Oe.value||""]])]}),"header-actions":_e(()=>[me(q(NX),{"onUpdate:assignees":md,onApplyFilter:Er,loading:q(ve)},null,8,["loading"]),Xe(me(q(Nb),{modelValue:b.value,"onUpdate:modelValue":We[2]||(We[2]=Kt=>b.value=Kt),onSearch:q(ae),class:Z(ke.$style.itemSearchBox),onClear:We[3]||(We[3]=Kt=>q(ae)("")),id:"item_search_box"},null,8,["modelValue","onSearch","class"]),[[q(n),{isLoading:q(ve),fullwidth:!0}]]),Xe((j(),je(q(vA),{status:q(ge)?"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(()=>[me(q(yt),{variant:"secondary",disabled:q(ge),onClick:jt},{prefix:_e(()=>[me(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(me(q(rX),{"model-value":q(I),onChange:We[4]||(We[4]=Kt=>Fn(Kt)),id:"table_customization",gridApi:f.value,ref_key:"tableCustomizationRef",ref:A,"checkbox-column":q(D)},null,8,["model-value","gridApi","checkbox-column"]),[[q(n),{isLoading:q(ve),fullwidth:!0}]])]),grid:_e(({availableHeight:Kt})=>[me(q(Vve),Jt({id:"item_table_main",ref_key:"agGrid",ref:Ee},de.value,{height:Kt+"px",isSorting:q(vt),onOnGridReady:It,onSelectionChanged:gt}),null,16,["height","isSorting"])]),footer:_e(()=>[ye("div",{class:Z(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(()=>[me(q(pX),{onCreateNewItem:wo,ref_key:"createNewSceneRef",ref:Qn},null,512)]),"bulk-update-actions":_e(()=>[Xe(me(q(xY),{selectRowData:Ie.value,"workspace-id":h.workspaceId,"entity-id":h.entityId,"grid-api":f.value,onUnselect:q(B),onSelectAll:q(z),"take-name":fe.value,"selected-all":Q.value,"total-rows":q(v).total,"visible-rows":q(v).loaded,onUpdated:Ue,loading:q(ge)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","onSelectAll","take-name","selected-all","total-rows","visible-rows","loading"]),[[Ws,!w.value&&p.value.length>0]])]),snackbar:_e(()=>[me(q(pZ))]),popup:_e(()=>[me(Cee,{ref_key:"popupCreateSceneRef",ref:ut,"workspace-id":h.workspaceId,"entity-id":h.entityId,onImportSuccess:jt},null,8,["workspace-id","entity-id"]),me(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",Vn=>J(Vn,!0)),We.addEventListener("columnResized",Vn=>J(Vn,!0)),We.addEventListener("firstDataRendered",()=>{ve.value=!1}),!document.querySelector(".ag-body-viewport")),We},Ht=(ke,We)=>{if(!f.value)return;const Kt=f.value.getRowNode(ke);Kt?(f.value.ensureIndexVisible(Number(Kt.rowIndex),"middle"),f.value.flashCells({rowNodes:[Kt],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())){ge.value=!0;try{We=await x.value.createNewScene({workspaceId:h.workspaceId,entityId:h.entityId,name:ke}),v.value.total<50&&await jt()}catch(Kt){console.error("Error creating new scene:",Kt)}finally{ge.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:Kt=>{if(Kt.ctrlKey||Kt.metaKey){const Vn=Ci({type:"scene_hub",config:{ws_code:h.workspaceId,baseDomain:Hn.getInstance().getItem("BASE_URL")||"",scene_id:String(We==null?void 0:We.id)}}).url;window.open(Vn,"_blank");return}else qe("scene_hub",{id:String(We==null?void 0:We.id)},{showLoading:!1})},btnIcon:"CustomSceneHub"}],icon:PCe,type:"interactive"})}}},ks=ke=>ke.metric_type.code==="number"?"number":"default",il=async()=>{if(h.entityId)try{const ke=await se(h.entityId);C.value=ke.data.map(We=>({...We,sortType:ks(We)}))}catch(ke){console.error("Failed to initialize metric list:",ke),C.value=[]}},is=async()=>{if(x.value)try{const ke=await x.value.getUserPermission(h.workspaceId);i(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);s(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)}},ss=async()=>{var ke;if(x.value)try{const We=await x.value.getWorkspaces(h.workspaceId),Kt=(ke=We.data[0])==null?void 0:ke.ws_user_role_id;return Kt&&ua.setUserRoleId(Kt),We}catch(We){console.error("Failed to fetch workspace details:",We)}};st(()=>[h.entityId,h.workspaceId],async([ke,We])=>{!ke||!We||(Sr(),ss(),il(),is(),ca())},{immediate:!0,deep:!0}),st($,(ke,We)=>{const Kt=ke.filter(Vn=>!(We!=null&&We.includes(Vn)));Kt.length>0&&ie(Array.from(T.value),Kt).then(Vn=>{G(Vn,T.value,Kt)})},{immediate:!0,deep:!0}),st(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=>{I.value=ke||[]};return(ke,We)=>(j(),je(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(()=>{var Kt;return[ye("h1",{class:Z(ke.$style.tableTitle)},"Scenes",2),ye("div",{class:Z(ke.$style["beta-tag"])},"Beta",2),((Kt=q(r))==null?void 0:Kt.has_create_item_permission)==1?(j(),je(q(Vb),{key:0,variant:["primary"],options:d.value,onSelect:Be,onHandleClick:We[1]||(We[1]=Vn=>Be("new_scene")),id:"create_scene_dropdown"},{prefix:_e(()=>[me(q(yt),{id:"create_new_scene",variant:["primary"],onClick:We[0]||(We[0]=Vn=>Be("new_scene")),label:"New"})]),_:1},8,["options"])):Je("",!0),Xe((j(),ue("span",ICe,[et(St(Sn.value),1)])),[[q(l),Oe.value||""]])]}),"header-actions":_e(()=>[me(q(NX),{"onUpdate:assignees":md,onApplyFilter:Er,loading:q(ve)},null,8,["loading"]),Xe(me(q(Nb),{modelValue:b.value,"onUpdate:modelValue":We[2]||(We[2]=Kt=>b.value=Kt),onSearch:q(ae),class:Z(ke.$style.itemSearchBox),onClear:We[3]||(We[3]=Kt=>q(ae)("")),id:"item_search_box"},null,8,["modelValue","onSearch","class"]),[[q(n),{isLoading:q(ve),fullwidth:!0}]]),Xe((j(),je(q(vA),{status:q(ge)?"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(()=>[me(q(yt),{variant:"secondary",disabled:q(ge),onClick:jt},{prefix:_e(()=>[me(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(me(q(rX),{"model-value":q(I),onChange:We[4]||(We[4]=Kt=>Fn(Kt)),id:"table_customization",gridApi:f.value,ref_key:"tableCustomizationRef",ref:A,"checkbox-column":q(D)},null,8,["model-value","gridApi","checkbox-column"]),[[q(n),{isLoading:q(ve),fullwidth:!0}]])]),grid:_e(({availableHeight:Kt})=>[me(q(Vve),Jt({id:"item_table_main",ref_key:"agGrid",ref:Ee},de.value,{height:Kt+"px",isSorting:q(vt),onOnGridReady:It,onSelectionChanged:gt}),null,16,["height","isSorting"])]),footer:_e(()=>[ye("div",{class:Z(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(()=>[me(q(pX),{onCreateNewItem:wo,ref_key:"createNewSceneRef",ref:Qn},null,512)]),"bulk-update-actions":_e(()=>[Xe(me(q(xY),{selectRowData:Ie.value,"workspace-id":h.workspaceId,"entity-id":h.entityId,"grid-api":f.value,onUnselect:q(B),onSelectAll:q(z),"take-name":fe.value,"selected-all":Q.value,"total-rows":q(v).total,"visible-rows":q(v).loaded,onUpdated:Ue,loading:q(ge)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","onSelectAll","take-name","selected-all","total-rows","visible-rows","loading"]),[[Ws,!w.value&&p.value.length>0]])]),snackbar:_e(()=>[me(q(pZ))]),popup:_e(()=>[me(Cee,{ref_key:"popupCreateSceneRef",ref:ut,"workspace-id":h.workspaceId,"entity-id":h.entityId,onImportSuccess:jt},null,8,["workspace-id","entity-id"]),me(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.158",kCe={key:0},OCe=_t(dt({__name:"app",setup(e){const t=K(()=>n.id.length===0||n.workspaceId.length===0),n=ki({id:"",workspaceId:"",apiConfig:{}}),o=$h(),{showMessage:i,showErrorNetMessage:s}=o,r=["basicInfor"],a=h=>{h.success?i(h.apiCode,"success"):r.includes(h.apiCode)||s(h)},l=H(null),c=()=>{const h=Hn.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)||Hn.getInstance().getItem("ws.code");const m={domainApi:c(),wsCode:Hn.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=K(()=>n.id),d=K(()=>n.workspaceId);return Hs("workspaceId",d),Hs("entityId",u),(h,f)=>(j(),ue("div",{class:Z(h.$style.dashboardPluginWrapper)},[t.value?(j(),ue("span",kCe," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):u.value?(j(),je(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 i=["apiConfig","workspaceId","id"],s={};Object.entries(e).forEach(([a,l])=>{l!==void 0&&(n.config.globalProperties[a]=l,s[a]=l,i.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=s,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"}})});
|