@pega/constellationjs 0.242.2 → 0.242.4
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/README.md +2 -3
- package/dist/bootstrap-shell.js +1 -1
- package/dist/bootstrap-shell.js.br +0 -0
- package/dist/bootstrap-shell.js.gz +0 -0
- package/dist/constellation-core-web.js +2 -2
- package/dist/constellation-core-web.js.br +0 -0
- package/dist/constellation-core-web.js.gz +0 -0
- package/dist/constellation-core-web.js.map +1 -1
- package/dist/constellation-core.727d573c.js +2 -0
- package/dist/constellation-core.727d573c.js.br +0 -0
- package/dist/constellation-core.727d573c.js.gz +0 -0
- package/dist/constellation-core.727d573c.js.map +1 -0
- package/dist/constellation-core.json +1 -0
- package/dist/js/531-web.js +2 -0
- package/dist/js/531-web.js.br +0 -0
- package/dist/js/531-web.js.gz +0 -0
- package/dist/js/531-web.js.map +1 -0
- package/dist/js/531.a391d043.js +2 -0
- package/dist/js/531.a391d043.js.br +0 -0
- package/dist/js/531.a391d043.js.gz +0 -0
- package/dist/js/531.a391d043.js.map +1 -0
- package/dist/lib_asset.json +1 -1
- package/package.json +8 -15
- package/dist/README.md +0 -55
- package/dist/constellation-core-web.js.LICENSE.txt +0 -2988
- package/dist/constellation-core.050c0e50.js +0 -2
- package/dist/constellation-core.050c0e50.js.br +0 -0
- package/dist/constellation-core.050c0e50.js.gz +0 -0
- package/dist/constellation-core.050c0e50.js.map +0 -1
- package/dist/js/vendors-node_modules_libphonenumber-js_index_js-web.js +0 -2
- package/dist/js/vendors-node_modules_libphonenumber-js_index_js-web.js.LICENSE.txt +0 -707
- package/dist/js/vendors-node_modules_libphonenumber-js_index_js-web.js.br +0 -0
- package/dist/js/vendors-node_modules_libphonenumber-js_index_js-web.js.gz +0 -0
- package/dist/js/vendors-node_modules_libphonenumber-js_index_js-web.js.map +0 -1
- package/dist/js/vendors-node_modules_libphonenumber-js_index_js.28c21f9a.js +0 -2
- package/dist/js/vendors-node_modules_libphonenumber-js_index_js.28c21f9a.js.LICENSE.txt +0 -707
- package/dist/js/vendors-node_modules_libphonenumber-js_index_js.28c21f9a.js.br +0 -0
- package/dist/js/vendors-node_modules_libphonenumber-js_index_js.28c21f9a.js.gz +0 -0
- package/dist/js/vendors-node_modules_libphonenumber-js_index_js.28c21f9a.js.map +0 -1
- /package/dist/{constellation-core.050c0e50.js.LICENSE.txt → constellation-core.727d573c.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see constellation-core-web.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e,t,s={"./src/access-privilege/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/environment-info/index.ts");const a=class{caseTypeAccessMap=new Map;constructor(){this.caseTypeAccessMap=r.default.getCaseTypeList().reduce(((e,t)=>(e.set(t.pyWorkTypeImplementationClassName,t.hasCreateAccess??!0),e)),new Map)}hasCreateAccess(e){return this.caseTypeAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}}},"./src/actions/api.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>H});var r=s("./src/case/remote-case.ts"),a=s("./src/constants.ts"),n=s("./src/context/context-processor.ts"),o=s("./src/messages/index.ts"),i=s("./src/router/route-parser.ts"),c=s("./src/router/routing-manager.ts"),l=s("./src/services/index.ts"),u=s("./src/service_broker/fetch.ts"),d=s("./src/store/state/actions/index.ts"),p=s("./src/contextree/treemanager.ts"),f=s("./src/container/container-utils.ts"),h=s("./src/store/state/middlewares/property-change-middleware.ts"),g=s("./src/store/state/state-manager.ts"),m=s("./src/utils/pubsub-utils.ts"),E=s("./src/utils/case-utils.ts"),A=s("./src/utils/form-handler.ts"),_=s("./src/case/open-process-action/action-creator.ts"),I=s("./src/case/open-assignment/action-creator.ts"),y=s("./src/case/delete-case-in-create-stage/action-creator.ts"),C=s("./src/case/save-and-close/action-creator.ts"),S=s("./src/refresh/refreshHelpers.ts"),b=s("./src/store/state/epics/util.ts"),T=s("./src/data/delete-data-object/action-creator.ts"),N=s("./src/datatype/index.ts"),v=s("./src/container/container-manager.ts"),R=s("./src/data/index.ts"),O=s("./src/utils/utils.ts"),D=s("./src/debug/debugger.ts"),x=s("./src/locale/locale-utils.ts"),P=s("./src/environment-info/index.ts"),M=s("./src/contextree/utils.ts"),w=s("./src/garbage-collector/index.ts"),j=s("./src/case/utils.ts"),L=s("./src/case/get-descendants/action-creator.ts"),U=s("./src/actions/processor.ts"),F=s("./src/actions/manager.ts"),k=s("./src/actions/sequencer.ts");const V=(e,t)=>{const s={},r=N.default.getLookUpDataPage(e),a=N.default.getDataPageKeys(r);if(a)for(const e of a)s[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];return{dataViewParameters:s,dataPageID:r,dataPageKeys:a}},G=(e,t)=>{const s=N.default.getSavableDataPage(e),r=N.default.getDataPageKeys(s);return r.forEach((e=>{e.isAlternateKeyStorage&&(e.keyName===e.linkedField||Object.keys(t).includes(e.linkedField))?e.keyName=t[e.linkedField]:e.isAlternateKeyStorage&&Object.keys(t).includes(e.keyName)&&e.keyName!==e.linkedField?(t[e.linkedField]=t[e.keyName],delete t[e.keyName]):e.keyName=t[e.keyName]})),{keys:t,dataPageID:s,dataPageKeys:r}},$=e=>{m.default.publish(a.publicConstants.PUB_SUB_EVENTS.EVENT_CANCEL,e)},B=(e,t,s)=>{const{callbacks:r}=s;return s.callbacks=null,e(t,s).then((e=>{"cancel"===e?r?.cancel?.():r?.submit?.()}))},H=class{constructor(e){this.c11nEnv=e}MSG_CLASSNAME_REQUIRED="className is required parameter";MSG_CLASSNAME_STRING="className must be a string";MSG_ACTION_ID_REQUIRED="actionID is required parameter";MSG_ACTION_ID_STRING="actionID must be a string";MSG_ACTION_NAME_REQUIRED="actionName is required parameter";MSG_ACTION_NAME_STRING="actionName must be a string";MSG_KEY_PROPERTIES_REQUIRED="keyProperties is required parameter";MSG_DATAVIEWID_REQUIRED="dataViewID is required parameter";MSG_DATAVIEWID_STRING="dataViewID must be a string";MSG_CONTAINERITEMID_REQUIRED="containerItemID is required parameter";MSG_CONTAINERITEMID_STRING="containerItemID must be a string";MSG_PAGENAME_REQUIRED="pageName is required parameter";MSG_PAGENAME_STRING="pageName must be string";MSG_INSIGHTID_REQUIRED="insightID is required parameter";MSG_DASHBOARDID_REQUIRED="DashboardID is required parameter";MSG_ACTIVE_SUGGESTION_UNATTENDED="You must accept or decline autofilled fields.";MSG_CASE_ID_REQUIRED="caseID is required parameter";MSG_CONTEXT_STRING="context must be string";shouldDeleteCaseInCreateStage=(e,t,s)=>!e&&t||s;getSaveActionPayload=(e,t=!1)=>{const s=e,r=s&&s.includes(a.default.MODAL),n=this.c11nEnv.getValue(a.publicConstants.CASE_INFO.CASE_INFO_ID),o=this.c11nEnv.getValue(a.publicConstants.CASE_INFO.ASSIGNMENT_ID),i=this.c11nEnv.getValue(a.publicConstants.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(a.publicConstants.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(a.publicConstants.CASE_INFO.ASSIGNMENTACTION_ID),c=this.c11nEnv.getContainerName(),l=this.c11nEnv.getValue(a.publicConstants.CASE_INFO.CASE_TYPE_ID),u=t?void 0:(0,A.isFormValid)(this.c11nEnv.getContextName()),d=this.c11nEnv.getValue("isProcessAction","isProcessAction");return U.default.buildActionObject({context:s,containerItemID:e,assignmentID:o,actionID:i,caseID:n,containerName:c,caseType:l,isModalAction:r,isFormValid:u,isProcessAction:d,saveOnly:t},this.c11nEnv)};actionsApiPromise=(e,t,s=!0)=>{let r,a,n=null;n=t&&null!==t.actionMgrID?t.actionMgrID:F.ActionManagerInstance.getNextActionMgrId();const o=new Promise(((e,t)=>{r=e,a=t}));return F.ActionManagerInstance.register(n,o,r,a,e,t,s),{actionMgrID:n,promise:o}};showDataObjectCreateView(e,t=a.publicConstants.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){const s=U.default.buildActionObject({viewName:t,className:e},this.c11nEnv),r=d.SHOW_PAGE,{promise:n}=this.actionsApiPromise(r,s);return g.dispatch({type:r,payload:{...s,containerName:a.publicConstants.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),n}cancelDataObject(e){if(!e)return Promise.reject(new Error("containerItemId is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=e;if(!(0,h.isContextDirty)(t))return new v.default(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0});const s=d.SHOW_CANCEL_ALERT,r=U.default.buildActionObject({containerItemID:e,context:t},this.c11nEnv),n=t&&t.includes(a.default.MODAL);g.dispatch({type:s,payload:{...r,isModalAction:n,isDataObject:!0,skipReleaseLockRequest:!0}});const{promise:o}=this.actionsApiPromise(s,r);return o.then((()=>{$({})}))}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));const{data:t}=g.getStore()?.getState()||{},s=t[e]?.dataInfo?.content?.classID;if(!s)return Promise.reject(new Error(a.default.DATA_CLASS_NOT_FOUND));const r=N.default.getSavableDataPage(s),n=d.CREATE_DATA_OBJECT,o=!!e&&e.includes(a.default.MODAL),i=U.default.buildActionObject({containerItemID:e,dataPageID:r},this.c11nEnv),{promise:c}=this.actionsApiPromise(n,i);return g.dispatch((0,R.createDataObjectAction)({...i,isModalAction:o,isFormValid:(0,A.isFormValid)(e)})),c}deleteDataObject(e,t){if(!e)return Promise.reject(new Error("className is required parameter"));if(!t)return Promise.reject(new Error("keys is required parameter"));const s=d.DELETE_DATA_OBJECT,r=N.default.getSavableDataPage(e),a=N.default.getDataPageKeys(r),n={};if(a)for(const e of a)n[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const o=U.default.buildActionObject({dataViewName:r,dataViewParameters:n},this.c11nEnv),{promise:i}=this.actionsApiPromise(s,o);return g.dispatch((0,T.deleteDataObjectAction)({...o})),i}getDataObjectView(e,t,s={viewName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!t)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));const r=d.VIEW_DATA_OBJECT,{dataPageID:n,dataViewParameters:o}=V(e,t),i=U.default.buildActionObject({dataLookUp:n,keyProperties:t,requestPayload:o,viewName:s.viewName||a.publicConstants.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:a.default.MODAL},this.c11nEnv),{promise:c}=this.actionsApiPromise(r,i);return g.dispatch((0,R.getDataObjectViewAction)({...i})),c}updateDataObject(e,t){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(!t)return Promise.reject(new Error("keys is required parameter"));const{data:s}=g.getStore()?.getState()||{},r=s[e]?.dataInfo?.content?.classID;if(!r)return Promise.reject(new Error(a.default.DATA_CLASS_NOT_FOUND));const{dataPageID:n,keys:o}=G(r,t),i=d.UPDATE_DATA_OBJECT,c=e&&e.includes(a.default.MODAL),l=U.default.buildActionObject({containerItemID:e,dataPageID:n,key:o},this.c11nEnv),{promise:u}=this.actionsApiPromise(i,l);return g.dispatch((0,R.updateDataObjectAction)({...l,isModalAction:c,isFormValid:(0,A.isFormValid)(e)})),u}openDataObjectAction(e,t,s,r){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!t)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));if(!s)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(!r)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));const n=d.OPEN_DATA_OBJECT_ACTION,{dataViewParameters:o,dataPageID:i,dataPageKeys:c}=V(e,t),l=U.default.buildActionObject({actionID:s,actionName:r,dataViewParameters:o,lookupDatapage:i,containerName:a.default.MODAL,dataViewPayload:c,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:u}=this.actionsApiPromise(n,l);return g.dispatch({type:n,payload:{...l}}),u}submitDataObjectAction(e,t,s){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));if(!t)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));if(!s)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));const{data:r}=g.getStore()?.getState()||{},n=r[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error(a.default.DATA_CLASS_NOT_FOUND));const o=(0,f.getParentContainerItem)(e),i=(0,f.getTargetFromContainerItemID)(o),c=(0,f.getContainerItemData)(i,o)||{},{resourceType:l="",key:u=""}=c,p=d.SUBMIT_DATA_OBJECT_ACTION,{dataPageID:h,keys:m}=G(n,t),E=U.default.buildActionObject({containerItemID:e,actionID:s,resourceType:l,key:u,keys:m,savableDatapage:h,containerName:a.default.MODAL,context:e},this.c11nEnv);E.context=e;const{promise:_}=this.actionsApiPromise(p,E);return g.dispatch({type:p,payload:{...E,isFormValid:(0,A.isFormValid)(e)}}),_}createWork(e,t={flowType:"",containerName:"",openCaseViewAfterCreate:!1,modalOptions:{dockable:!1},startingFields:Object,remoteCaseMeta:{},channelName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,"pyStartCase");const{dockable:s=!1}=t?.modalOptions||{};let n=d.CREATE_WORK;const o=U.default.buildActionObject({class:e,flowType:"pyStartCase",containerName:a.default.PRIMARY,openCaseViewAfterCreate:!0,...t,modalOptions:{isDockable:s}},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);if(t.channelName&&(o.headers=o.headers||{},o.headers[a.default.X_ORIGIN_CHANNEL]=t.channelName),r.default.isRemoteCase(e)){const{RemoteClassName:t,RemoteSystemID:s,name:a}=r.default.getRemoteCase(e);if(o.className=e,o.class=t,o.headers=o.headers||{},o.headers.RemoteSystemID=s,r.default.isTraditionalRemoteCase(e)){const s={className:e,name:a,action:d.CREATEWORK,remoteClassName:t};n=this.setTraditionalRemoteCaseParams(o,s)}}return D.default.getPreviewMode()&&(o.debugInfo={debugId:O.default.generateUniqueID()}),g.dispatch({type:n,payload:{...o}}),i}setTraditionalRemoteCaseParams(e,t){return e.className=t.className,e.isTraditionalRemoteCase=r.default.isTraditionalRemoteCase(t.className),e.remoteClassName=t.remoteClassName,e.action=t.action,e.viewName=r.REMOTE_CASE_VIEW,e.gadgetId=t.gadgetId??j.default.getUniqueGadgetId(),e.name=t.name,e.skipSemanticUrl=!0,d.SHOW_PAGE}getDataObjectActions(e,t){if(!e)return Promise.reject(new Error(this.MSG_DATAVIEWID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_DATAVIEWID_STRING));const s=d.GETDATAOBJECTACTIONS,r=U.default.buildActionObject({dataViewID:e,dataViewParameters:t},this.c11nEnv),{promise:a}=this.actionsApiPromise(s,r);return g.dispatch({type:s,payload:{...r}}),a}getDescendants(e,t){if(!e)return Promise.reject(new Error(this.MSG_CASE_ID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTEXT_STRING));const s=t||this.c11nEnv.getContextName(),r=d.GET_DESCENDANTS,a=U.default.buildActionObject({caseID:e,currentContext:s},this.c11nEnv),{promise:n}=this.actionsApiPromise(r,a),o=(0,L.getDescendantsAction)({...a,context:s});return g.dispatch(o),n}openWorkByHandle(e,t,s={}){if(!e)return Promise.reject(new Error("workID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("workID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,t);const n={insKey:e,acTargetName:s.targetContainer||a.default.PRIMARY,containerName:s.targetContainer||a.default.PRIMARY};let o=d.OPEN_WORK_BY_HANDLE;const i=U.default.buildActionObject(n,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);return s.channelName&&(i.headers=i.headers||{},i.headers[a.default.X_ORIGIN_CHANNEL]=s.channelName),i.className=t,r.default.isRemoteCase(t)&&(o=this.setRemoteCaseParamsForOpenCase(i,t,s.remoteCaseMeta)??o),D.default.getPreviewMode()&&![a.default.WORKAREA].includes(s.targetContainer)&&(i.debugInfo={debugId:O.default.generateUniqueID()}),g.dispatch({type:o,payload:{...s,...i}}),c}setRemoteCaseParamsForOpenCase(e,t,s={}){const{RemoteSystemID:a,RemoteClassName:n,name:o}=r.default.getRemoteCase(t);if(e.headers=e.headers||{},e.headers.RemoteSystemID=a,e.isRemoteCase=!0,e.remoteCaseClass=t,r.default.isTraditionalRemoteCase(t)){e.remoteCaseMeta=s;const r={className:t,name:o,action:d.OPENCASE,remoteClassName:n};return this.setTraditionalRemoteCaseParams(e,r)}}openAssignment(e,t,s={isActionFromToDoList:!1,isChild:!1,context:"",viewType:"",skipBrowserSemanticUrlUpdate:!1,containerName:"",channelName:"",remoteCaseMeta:{}}){if(!e)return Promise.reject(new Error("assignmentID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("assignmentID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.openAssignment)return window.pms.plugins.c11n.openAssignment(e,t);const n={assignmentID:e,doDeleteCaseSummary:!0,containerName:s.containerName,isActionFromToDoList:s.isActionFromToDoList,isChild:!1};s.isChild&&(n.containerName=a.default.PRIMARY,n.isChild=s.isChild);let o=I.OPEN_ASSIGNMENT;const i=U.default.buildActionObject(n,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);if(s.channelName&&(i.headers=i.headers||{},i.headers[a.default.X_ORIGIN_CHANNEL]=s.channelName),r.default.isRemoteCase(t)){const{RemoteClassName:e,RemoteSystemID:a,name:n}=r.default.getRemoteCase(t);if(i.headers=i.headers||{},i.headers.RemoteSystemID=a,r.default.isTraditionalRemoteCase(t)){i.remoteCaseMeta=s.remoteCaseMeta;const r={className:t,name:n,action:d.OPENASSIGNMENT,remoteClassName:e};o=this.setTraditionalRemoteCaseParams(i,r)}}i.className=t,i.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),D.default.getPreviewMode()&&![a.default.WORKAREA].includes(s.containerName)&&(i.debugInfo={debugId:O.default.generateUniqueID()});const l={context:i.context||s.context,containerName:i.containerName||s.containerName,targetContainerName:i.containerName||s.containerName,viewType:i.viewType||s.viewType,skipBrowserSemanticUrlUpdate:s.skipBrowserSemanticUrlUpdate};return g.dispatch({type:o,payload:{...i,...l}}),c}finishAssignment(e,t={outcomeID:"",jsActionQueryParams:{}}){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const s=(0,f.getDataContextName)(e);let r=s;if(s?.includes("/workarea")&&(r=s.substring(0,r?.lastIndexOf("/workarea"))),(0,A.isFormHasSuggestions)(s)){const e=[{type:"error",message:x.localeUtils.getLocaleValue(this.MSG_ACTIVE_SUGGESTION_UNATTENDED,"Messages")}];return(0,o.addMessages)({messages:e,context:r,category:a.publicConstants.PAGE}),Promise.reject({type:a.publicConstants.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}const n=d.FINISH_ASSIGNMENT,i=t?.isTriggeredFromDifferentContext,{caseID:c,assignments:l,localActionID:u,caseActions:p,caseInfo:h,businessID:m,caseTypeID:_,caseTypeName:I}=(0,E.getContainerDataForFinishAssignment)(e,this.c11nEnv,{isTriggeredFromDifferentContext:i}),y=(0,E.isAssignmentInCreateStage)(h);let C,S=!1;p?S="Case"===p.find((e=>e.ID===u))?.type:C=g.getDataObject(s);let{assignmentID:T}=(0,E.getContainerDataForFinishAssignment)(e,this.c11nEnv,{isTriggeredFromDifferentContext:i});C?.context_data?.actionType&&(S=C.context_data.actionType===a.default.CASE,T=T||C.context_data.assignmentID);const N=(0,E.getActionId)(l,T,u),[v,R]=c.split(" "),O={class:v,actionID:N,assignmentID:T,caseID:c,workID:R,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:S,doDeleteCaseSummary:!0,isInCreateStage:y,businessID:m,caseTypeID:_,caseTypeName:I};e?.includes(a.default.MODAL)&&(O.containerName=a.default.MODAL,O.isModalAction=!0),O.outcome=t.outcomeID,O.jsActionQueryParams=t.jsActionQueryParams,h?.isLocalAction&&(O.viewType=b.SCOPE_TYPES.FORM);const D=U.default.buildActionObject(O,this.c11nEnv),{promise:P}=this.actionsApiPromise(n,D),M=this.c11nEnv.getValue("isProcessAction","isProcessAction");return D.isProcessAction=M,k.default.executeOrQueueDeferredAction({type:n,payload:{...D,context:s}}),P}getNextWork(){const e=I.OPEN_ASSIGNMENT,t=U.default.buildActionObject({containerName:a.default.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:s}=this.actionsApiPromise(e,t);return g.dispatch({type:e,payload:{...t}}),s}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));const t=I.OPEN_ASSIGNMENT,s=this.c11nEnv.getValue(a.publicConstants.CASE_INFO.CASE_INFO_ID),r=this.c11nEnv.getCaseSummary().headers,n=U.default.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:o}=this.actionsApiPromise(t,n),i={type:t,payload:{...n,caseID:s,headers:r}};return g.dispatch(i),o}submitBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=d.SUBMIT_BULK_ACTION,s=this.c11nEnv.getValue(a.publicConstants.CASE_INFO.CASES),r=this.c11nEnv.getValue(a.publicConstants.CASE_INFO.ACTIVE_ACTION_ID),n={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(a.default.MODAL)&&(n.containerName=a.default.MODAL,n.isModalAction=!0);const o=U.default.buildActionObject(n,this.c11nEnv),{promise:i}=this.actionsApiPromise(t,o),c=(0,f.getDataContextName)(e);return g.dispatch({type:t,payload:{...o,context:c,cases:s,actionID:r,isFormValid:(0,A.isFormValid)(c),classID:this.c11nEnv.getCurrentClassID()}}),i}openBulkAction(e,t){if(!e)return Promise.reject(new Error("actionID is required parameter for openBulkAction"));if("string"!=typeof e)return Promise.reject(new TypeError("actionID must be a string openBulkAction"));const{selectedList:s}=t,r=t.type,a={selectedList:s,vcName:t.target,actionName:t?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:r,...t},n=d.OPEN_BULK_ACTION,o=U.default.buildActionObject(a,this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);return g.dispatch({type:n,payload:{...o}}),i}cancelBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=d.REMOVE_CONTAINER_ITEM,s={containerItemID:e,context:e,skipReleaseLockRequest:!0,target:`${a.default.APP.APP}/${a.default.MODAL}`,caseViewMode:a.default.PERFORM_MODE,deleteContext:!0};g.dispatch({type:t,payload:s});const{promise:r}=this.actionsApiPromise(t,s);return r}approveCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(g.dispatch({type:d.SET_PROPERTY,payload:{reference:a.publicConstants.CASE_INFO.APPROVALFLAG,value:a.default.APPROVED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}rejectCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(g.dispatch({type:d.SET_PROPERTY,payload:{reference:a.publicConstants.CASE_INFO.APPROVALFLAG,value:a.default.REJECTED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}resolveDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const[,t]=this.c11nEnv.getValue(a.publicConstants.CASE_INFO.DUPLICATECASEINSKEY).split(" "),s={type:d.SET_PROPERTY,payload:{reference:a.publicConstants.CASE_INFO.DUPLICATECASEFLAG,value:a.default.DUPLICATE,context:e}},r={type:d.SET_PROPERTY,payload:{reference:a.publicConstants.CASE_INFO.DUPLICATECASEID,value:t,context:e}};return g.dispatch([s,r]),this.finishAssignment(e)}ignoreDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t={type:d.SET_PROPERTY,payload:{reference:a.publicConstants.CASE_INFO.DUPLICATECASEFLAG,value:a.default.IGNORE,context:e}},s={type:d.SET_PROPERTY,payload:{reference:a.publicConstants.CASE_INFO.DUPLICATECASEID,value:"",context:e}},r={type:d.SET_PROPERTY,payload:{reference:a.publicConstants.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return g.dispatch([t,s,r]),this.finishAssignment(e)}openLocalAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const s=t.caseID||this.c11nEnv.getValue(a.publicConstants.CASE_INFO.CASE_INFO_ID);if(window.pms?.plugins?.c11n?.openLocalAction)return t.caseID=s,B(window.pms.plugins.c11n.openLocalAction,e,t);const r=t.assignKey||this.c11nEnv.getValue(a.publicConstants.CASE_INFO.ASSIGNMENT_ID),n=t.type,o={caseID:s,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,localActionType:n,...t},i=d.OPEN_LOCAL_ACTION,l=U.default.buildActionObject(o,this.c11nEnv),u=this.c11nEnv.getContextName(),{promise:p}=this.actionsApiPromise(i,l),h=(0,f.getChildContainers)(u)[0];let m,A=!1;if(!h)return m=u,g.dispatch({type:i,payload:{...l,contextName:u,continueExecution:A}}),p;m=(0,f.getActiveContainerItemName)(h);const _=(0,f.getContainerData)(h);if(_?.accessedOrder.forEach((e=>{s===_.items[e].key&&(A=!0,m=_.items[e].context)})),!A||m&&"review"===g.getStore()?.getState()?.data[m]?.context_data?.caseViewMode)return g.dispatch({type:i,payload:{...l,contextName:u,continueExecution:A}}),p;const I=m,y=I&&I.includes(a.default.MODAL),C=t.assignKey||this.c11nEnv.getValue(a.publicConstants.CASE_INFO.ASSIGNMENT_ID),S=g.getDataObject(m),b=S?.caseInfo?.assignments?S.caseInfo.assignments[0]?.actions[0]?.ID:void 0,T=this.c11nEnv.getContainerName(),N=this.c11nEnv.getValue(a.publicConstants.CASE_INFO.CASE_TYPE_ID),v=this.c11nEnv.getValue("isProcessAction","isProcessAction"),R=U.default.buildActionObject({context:I,containerItemID:m,assignmentID:C,actionID:b,caseID:s,containerName:T,caseType:N,isModalAction:y,isFormValid:!0,isProcessAction:v},this.c11nEnv);R.context=m;const O=(0,f.getDataContextName)(m),D=this.c11nEnv.getCaseSummary(),x=(0,E.isAssignmentInCreateStage)(D),P=U.default.buildActionObject({caseID:s,containerItemID:m,cancelContext:O},this.c11nEnv);let M={};return y?(P.acTargetName=a.default.MODAL,P.isInCreateStage=x,P.isModalAction=y,M={...P}):M={...P,acName:(0,c.getResolvedTargetName)(this.c11nEnv.getContainerName(),P.context)},g.dispatch({type:i,payload:{...l,contextName:u,saveActionPayload:R,cancelActionPayload:M,continueExecution:A}}),p}openProcessAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const s=this.c11nEnv.getValue(a.publicConstants.CASE_INFO.CASE_INFO_ID)||t.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return t.caseID=s,B(window.pms.plugins.c11n.openProcessAction,e,t);const r=this.c11nEnv.getValue(a.publicConstants.CASE_INFO.ASSIGNMENT_ID)||t.assignKey,n=t.type,o={caseID:s,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,processActionType:n,isProcessAction:!0,...t},i=_.OPEN_PROCESS_ACTION,c=U.default.buildActionObject(o,this.c11nEnv),{promise:l}=this.actionsApiPromise(i,c);return g.dispatch({type:i,payload:{...c}}),l}navigateToStep(e,t){if(!e)return Promise.reject(new Error("stepID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("stepID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const s=d.NAVIGATE_TO_STEP,r=this.c11nEnv.getValue(a.publicConstants.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(a.publicConstants.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(a.publicConstants.CASE_INFO.ASSIGNMENT_ID),n=(0,E.isAssignmentInCreateStage)(this.c11nEnv.getCaseSummary()),o={ID:r,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:t,doDeleteCaseSummary:!0,isInCreateStage:n};t&&t.includes(a.default.MODAL)&&(o.acTargetName=a.default.MODAL);const i=U.default.buildActionObject(o,this.c11nEnv),{promise:c}=this.actionsApiPromise(s,i),l=(0,f.getDataContextName)(t);return g.dispatch({type:s,payload:{...i,containerItemID:t,context:l}}),c}cancelAssignment(e,t){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:s}=a.publicConstants,r=d.CANCEL_ASSIGNMENT,n=(0,f.getDataContextName)(e),o=e&&e.includes(a.default.MODAL),i=this.c11nEnv.getCaseSummary(),l=(0,E.isAssignmentInCreateStage)(i),u=this.c11nEnv.getValue(s.CASE_INFO_ID),p=this.c11nEnv.getValue(s.ASSIGNMENT_ID),h=U.default.buildActionObject({caseID:u,containerItemID:e,context:n},this.c11nEnv);let m={};o?(h.acTargetName=a.default.MODAL,h.isInCreateStage=l,h.isModalAction=o,m={...h}):m={...h,acName:(0,c.getResolvedTargetName)(this.c11nEnv.getContainerName(),h.context)};const{promise:A}=this.actionsApiPromise(r,h);return g.dispatch({type:r,payload:m}),A.then((()=>{t||$({caseID:u,assignmentID:p,context:this.c11nEnv.getContextName()})}))}cancelLocalAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=a.publicConstants,s=e,r=d.SHOW_CANCEL_ALERT,n=e&&e.includes(a.default.MODAL),o=this.c11nEnv.getValue(t.CASE_INFO_ID),i=U.default.buildActionObject({caseID:o,containerItemID:e,context:s},this.c11nEnv);if(!(0,h.isContextDirty)(s))return new v.default(this.c11nEnv).removeContainerItem({containerItemID:e}).then((()=>{$({caseID:o,context:this.c11nEnv.getContextName()})}));g.dispatch({type:r,payload:{...i,isModalAction:n}});const{promise:c}=this.actionsApiPromise(r,i);return c}cancelCreateStageAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=a.publicConstants,s=d.SHOW_CANCEL_ALERT,r=e,n=r&&r.includes(a.default.MODAL),o=this.c11nEnv.getCaseSummary(),i=(0,E.isAssignmentInCreateStage)(o),c=this.c11nEnv.getValue(t.CASE_INFO_ID),l=U.default.buildActionObject({caseID:c,containerItemID:e,context:r},this.c11nEnv),u=this.c11nEnv.getValue("isProcessAction","isProcessAction"),p=P.default.isCoexistenceAppOfType(a.default.APP_TYPE.UIKIT);if(l.isProcessAction=u,i&&(n||p)&&!(0,E.isLocalAction)(o)){const t=this.c11nEnv.getValue("caseInfo.isFirstAssignment"),a=(0,h.isContextDirty)(r);if(this.shouldDeleteCaseInCreateStage(a,t,p))return this.deleteCaseInCreateStage(e);g.dispatch({type:s,payload:{...l,isModalAction:n,isChildCase:(0,E.isChildCase)(o),isInCreateStage:i}})}const{promise:f}=this.actionsApiPromise(s,l);return f.then((()=>{}))}saveAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=C.SAVE_AND_CLOSE,s=this.getSaveActionPayload(e,!0),{promise:r}=this.actionsApiPromise(t,s);return g.dispatch((0,C.saveAndCloseAction)(s)),r}saveAndClose(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=C.SAVE_AND_CLOSE,s=this.getSaveActionPayload(e),{promise:r}=this.actionsApiPromise(t,s);return g.dispatch((0,C.saveAndCloseAction)(s)),r}deleteCaseInCreateStage(e,t=!1){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const s=y.DELETE_CASE_IN_CREATE_STAGE,r=e,n=r&&r.includes(a.default.MODAL),o=this.c11nEnv.getValue(a.publicConstants.CASE_INFO.CASE_INFO_ID),i=this.c11nEnv.getValue(a.publicConstants.CASE_INFO.CASE_TYPE_ID),c=U.default.buildActionObject({caseID:o,caseType:i,containerItemID:e,context:r,ignoreCaseDeletion:t},this.c11nEnv),l=this.c11nEnv.getValue("isProcessAction","isProcessAction"),u=this.c11nEnv.getValue(a.publicConstants.CASE_INFO.PARENTCASEINFO);c.isProcessAction=l,c.parentCaseInfo=u;const d=`${a.default.APP.APP}/${f.CONTAINER_NAMES.PRIMARY}`,p=(0,b.getContext)(d,f.CONTAINER_NAMES.PRIMARY);c.parentContext=p,n&&(c.targetName=a.default.MODAL,c.containerName=f.CONTAINER_NAMES.MODAL,c.isModalAction=n),g.dispatch((0,y.deleteCaseInCreateStageAction)(c));const{promise:h}=this.actionsApiPromise(s,c);return h.then((()=>{$({caseID:o,context:this.c11nEnv.getContextName()})}))}getRecents(e){if(!e)return Promise.reject(new Error("maxResultsToFetch is required parameter"));if("number"!=typeof e)return Promise.reject(new TypeError("maxResultsToFetch must be number"));let{restApi:t}=i.default.getRestEndPoint("getRecents")||{};t=`${t}?maxResultsToFetch=${e}`;const s=l.default.getServerURL()+t;return(0,u.fetch)(s,{method:"GET",headers:{}})}updateRecents(e,t,s,r){const{restApi:a}=i.default.getRestEndPoint("updateRecents")||{},n=`${l.default.getServerURL()}${a}`,o={pyLabel:s,pyID:t,classID:e,ID:r};return(0,u.fetch)(n,{method:"PATCH",headers:{"Content-Type":"application/json"},body:o})}logout(){const{restApi:e}=i.default.getRestEndPoint("Logout")||{},t=`${l.default.getServerURL()}${e}`;return(0,u.fetch)(t,{method:"GET",headers:{}}).then((e=>(Object.keys(p.default.rootNodes).forEach((e=>{w.default.cleanCaches(e)})),p.default.rootNodes={},sessionStorage.clear(),g.resetStore(),Promise.resolve(e))))}invoke(e,t={}){const s={method:t.method||"GET",body:t.body};return(0,u.fetch)(e,s,this.c11nEnv.getContextName())}showCasePreview(e,t={}){this.loadView(e,"pyCasePreview",{container:f.CONTAINER_NAMES.PREVIEW,containerName:f.CONTAINER_NAMES.PREVIEW,context:a.publicConstants.APP.APP,...t})}showDataPreview(e,t,s={}){return e?"string"!=typeof e?Promise.reject(new TypeError("dataContext must be string")):t?"object"!=typeof t?Promise.reject(new TypeError("dataContextParameters must be an object")):this.showData("pyDataPreview",e,t,{container:f.CONTAINER_NAMES.PREVIEW,containerName:f.CONTAINER_NAMES.PREVIEW,context:a.publicConstants.APP.APP,...s,skipSemanticUrl:!0}):Promise.reject(new Error("dataContextParameters is required parameter")):Promise.reject(new Error("dataContext is required parameter"))}loadView(e,t,s){let n=U.default.buildActionObject({caseId:e,viewName:t,caseClassName:this.c11nEnv.getValue(a.publicConstants.CASE_INFO.CASE_TYPE_ID),RemoteSystemID:r.default.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);s||(s={containerName:this.c11nEnv.getContainerName(),updateData:!1}),s&&"object"==typeof s?(Object.hasOwn(s,"container")&&!Object.hasOwn(s,"containerName")&&(s.containerName=s.container),n={...n,...s}):n={...n,containerName:this.c11nEnv.getContainerName()};const o=d.LOAD_VIEW,{promise:i}=this.actionsApiPromise(o,n,!1);return g.dispatch({type:o,payload:{...n}}),i}showPage(e,t,s={containerName:"",skipSemanticUrl:""}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.showPage)return window.pms.plugins.c11n.showPage(e,t,s);const r=U.default.buildActionObject({viewName:e,className:t},this.c11nEnv),a=d.SHOW_PAGE,{promise:n}=this.actionsApiPromise(a,r);return D.default.getPreviewMode()&&(r.debugInfo={debugId:O.default.generateUniqueID()}),g.dispatch({type:a,payload:{...r,containerName:s.containerName||this.c11nEnv.getContainerName(),skipSemanticUrl:s.skipSemanticUrl}}),n}showInsight(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_INSIGHTID_REQUIRED));const s=U.default.buildActionObject({},this.c11nEnv),r=d.SHOW_INSIGHT,{promise:a}=this.actionsApiPromise(r,s);return g.dispatch({type:r,payload:{...s,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,insightID:e}}),a}showDashboard(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));const s=U.default.buildActionObject({},this.c11nEnv),r=d.SHOW_DASHBOARD,{promise:a}=this.actionsApiPromise(r,s);return g.dispatch({type:r,payload:{...s,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,dashboardID:e}}),a}showData(e,t,s,r={containerName:"",skipSemanticUrl:!1}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error("dataContext is required parameter"));if("string"!=typeof t)return Promise.reject(new TypeError("dataContext must be string"));const a=U.default.buildActionObject({pageName:e,dataContext:t,dataContextParameters:s},this.c11nEnv),n=d.SHOW_DATA,{promise:o}=this.actionsApiPromise(n,a);return g.dispatch({type:n,payload:{...a,...r,skipSemanticUrl:Boolean(r.skipSemanticUrl)}}),o}changeHandler(e,t){U.default.changeHandler(e,t)}eventHandler(e,t){U.default.eventHandler(e,t)}triggerFieldChange(e,t,s=!1){const r=this.c11nEnv.getContextName(),o=this.c11nEnv.getPageReference(),i=n.default.getContextPath(o,e);s||this.c11nEnv.getValidationApi().validate(t),this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(e,t);let c=this.c11nEnv.getValue(a.default.CLASS_ID);const l=e?e.split(".").filter((e=>!!e)):[];l.length>1&&(l.pop(),c=g.getValue(`.${l.join(".")}.classID`,o,r)),e=O.default.trimDotForProperty(e),g.dispatch({type:d.FIELD_CHANGE,payload:{reference:i,value:t,context:r,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:c}})}updateFieldValue(e,t,s={}){const{removePropertyFromChangedList:r=!1,isArrayDeepMerge:i=!0,contextPageReference:c="",isListEntry:l=!1,skipDirtyValidation:u=!1}=s,p=this.c11nEnv.getContextName();let f=this.c11nEnv.getPageReference();const h=c?.startsWith(f)?c.replace(f,""):c;f=c||f;const m=n.default.getContextPath(f,e);let E=!1;this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(h?`${h}${e}`:e,t,{isArrayDeepMerge:i}),this.c11nEnv.isBulkAction()&&(E=!0),e||(e=this.c11nEnv.getStateProps().value),(0,o.clearMessages)({type:a.publicConstants.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:f,context:p,isListEntry:l}),g.dispatch({type:d.SET_PROPERTY,payload:{reference:m,value:t,context:p,isArrayDeepMerge:i,skipDirtyValidation:u,...E&&{isStrictTracking:E},...r&&{removePropertyFromChangedList:r}}})}activateModalContainerItem(e){const t=d.ACTIVATE_MODAL_CONTAINER_ITEM,{context:s}=e,r=s&&s.includes(a.default.MODAL),n=U.default.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:s},this.c11nEnv);r&&(n.containerName=a.default.MODAL,n.isModalAction=r),g.dispatch({type:t,payload:n});const{promise:o}=this.actionsApiPromise(t,n);return o}refreshCaseView(e,t,s,r={}){const{promise:n,actionMgrID:o}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:i,propertyName:c,preserveClientChanges:l,classID:u,context:d,optionalPayload:p}=r,f={actionMgrID:o,caseViewAction:!0,preserveClientChanges:l,propertyName:c,classID:u,optionalPayload:p};r.refreshFor&&(f.refreshFor=r?.refreshFor);const h=d||this.c11nEnv.getContextName(),g=this.c11nEnv.getPageReference();return!this.c11nEnv.getValue(a.default.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)&&i&&((0,E.isAssignment)(h,g)||(0,E.isCaseWideAction)(h,g))?(0,S.refreshAssignment)(h,s,f):(0,S.dispatchCaseViewRefresh)(e,t,h,s,f),n}openEmbeddedDataModal(e,t,s,r,n,o){const i=d.OPEN_EMBEDDED_DATA_MODAL,c=t.getCaseInfo().getKey(),l=`${t.getPageReference().replace(a.publicConstants.CASE_INFO.CASE_INFO_CONTENT,"")}${s}[${r}]`,u={targetProperty:s,index:r,viewID:e,ID:c,actionType:n,interestPage:O.default.convertPageRefToClipboardPageNotation(l),heading:o},p=U.default.buildActionObject(u,this.c11nEnv),{promise:f}=this.actionsApiPromise(i,p);return g.dispatch({type:i,payload:{...p,containerName:a.publicConstants.MODAL,skipSemanticUrl:!0}}),f}submitEmbeddedDataModal(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=d.SUBMIT_EMBEDDED_DATA_MODAL,s=this.c11nEnv.getPageReference().replace(a.publicConstants.CASE_INFO.CASE_INFO_CONTENT,""),r=(0,f.getDataContextName)(e),n={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:this.c11nEnv.getValue(a.publicConstants.CASE_INFO.CASE_INFO_ID),viewID:this.c11nEnv.getValue(a.default.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME),isFormValid:(0,A.isFormValid)(r),interestPage:O.default.convertPageRefToClipboardPageNotation(s),parentContext:this.c11nEnv.getValue(a.default.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),isModalAction:!1,target:this.c11nEnv.getTarget()};e&&e.includes(a.default.MODAL)&&(n.containerName=a.default.MODAL,n.isModalAction=!0);const o=U.default.buildActionObject(n,this.c11nEnv),{promise:i}=this.actionsApiPromise(t,o);if((0,h.isContextDirty)(r)){const[e,t,s]=M.default.getPageListNameAndIndexFromPageName(this.c11nEnv.getPageReference());p.default.mutatePageList(this.c11nEnv.getValue(a.default.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),e,t,{type:d.CLEAR_MESSAGES,rowIndex:s}),g.dispatch({type:d.CLEAR_MESSAGES,payload:{pageReference:this.c11nEnv.getPageReference(),context:this.c11nEnv.getValue(a.default.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),isListEntry:!0}})}return k.default.executeOrQueueDeferredAction({type:t,payload:{...o,context:r}}),i}fillFormWithAI(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=(0,f.getDataContextName)(e),s=this.c11nEnv.getPageReference(),{promise:r,actionMgrID:a}=this.actionsApiPromise(d.FILL_FORM_WITH_AI),n={actionMgrID:a,isFillFormWithAI:!0,preserveClientChanges:!1};return(0,S.refreshAssignment)(t,s,n),r}}},"./src/actions/handler.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=new class{constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,t){this.actionHandlers[e]=t}}},"./src/actions/manager.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{ActionManagerInstance:()=>a});var r=s("./src/utils/loading-manager.ts");const a=new class{constructor(){this.counterActionMgrId=0,this.actionMgrActions=[]}getNextActionMgrId(){return this.counterActionMgrId+=1,this.counterActionMgrId.toString()}register(e,t,s,a,n="unknown",o,i=!0){if(void 0!==this.actionMgrActions[e])return null;const c={actionType:n,promise:t,resolve:s,reject:a,actionPayload:o};return this.actionMgrActions[e]=c,i&&r.IsLoadingManagerInstance.enableLoadingIndicator(c.actionPayload),e}actionManagerPromise=(e,t=null)=>{let s,r;null===t&&(t=this.getNextActionMgrId());const a=new Promise(((e,t)=>{s=e,r=t}));return this.register(t,a,s,r,e),{actionMgrID:t,promise:a}};resolveActionByID(e,t,s=!0){const a=this.actionMgrActions[e];let n=e;return a?(setTimeout((()=>{a.resolve(t)}),0),r.IsLoadingManagerInstance.disableLoadingIndicator(a.actionPayload,s)):n=null,n}rejectActionByID(e,t=!0,s){const a=this.actionMgrActions[e];let n=e;return a?(a.reject(s),r.IsLoadingManagerInstance.disableLoadingIndicator(a.actionPayload,t)):n=null,n}}},"./src/actions/processor.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./src/context/context-processor.ts"),a=s("./src/store/state/state-manager.ts"),n=s("./src/store/state/actions/index.ts"),o=s("./src/messages/index.ts"),i=s("./src/constants.ts"),c=s("./src/actions/handler.ts"),l=s("./src/actions/manager.ts");const u=class{static#e=[];static#t=!1;static getActionHandlers=(e,t,s)=>{const r=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[s]!==t||e.forEach((e=>{const t=c.default.getHandler(e.action),{config:s}=e;r.push({handler:t,config:s})})),r};static isEditable=e=>{const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t||"DATETIME"===t};static isNonKeyInput=e=>{const{tagName:t,type:s}=e;return"SELECT"===t||"checkbox"===s||"radio"===s};static#s=(e,t,s)=>{for(let r=0;r<e.length;r+=1){const a=e[r],n={actionHandler:a.handler,component:t,eventType:s,config:a.config};this.#e.push(n)}};static buildActionObject=(e,t)=>{const s={...e};return s.context=t.getContextName(),s.pageReference=t.getPageReference(),s.actionMgrID=l.ActionManagerInstance.getNextActionMgrId(),s};static#r=e=>{const t=e.actionHandler,s=e.component,{config:a}=e,n={};r.default.resolveProps(a,n,s),t&&(t(e.eventType,n,s),this.#a())};static#a=()=>{if(!this.#t){if(0===this.#e.length)return;const e=this.#e.shift();this.#r(e),e.config&&"true"===e.config.parallel&&this.#e.length>0&&this.#a()}};static#n=()=>{this.#a()};static#o=(e,t,s)=>{this.#s(e,t,s),this.#n()};static getFullRef=e=>{const t=e.getPageReference(),s=e.getComponentConfig().value;return r.default.getContextPath(t,s)};static#i(e,t){const s=e.getComponentConfig().behaviours||[];for(let r=0;r<s.length;r+=1){const{behaviour:a,actions:n}=s[r];if(n){const s=this.getActionHandlers(n,a,t);s&&s.length>0&&this.#o(s,e,t)}}}static changeHandler=(e,t)=>{const s=e.getStateProps().value,c=e.getContextName();if((0,o.clearMessages)({type:i.publicConstants.MESSAGES.MESSAGES_TYPE_ERROR,property:s,pageReference:e.getPageReference(),context:c}),t instanceof Event||t.nativeEvent instanceof Event||null!==t.value&&void 0===t.prop){let{target:s}=t;null===s&&t&&t.auxiliaryTarget&&(s=t.auxiliaryTarget);const r=void 0===s?t.value:"value"in s?s.value:s.innerText,o=this.getFullRef(e);(0,a.dispatch)({type:n.SET_PROPERTY,payload:{reference:o,value:r,context:c}}),void 0!==s&&this.isEditable(s)&&!this.isNonKeyInput(s)||(0,a.dispatch)({type:n.FIELD_CHANGE,payload:{reference:o,pageReference:e.getPageReference(),value:r,context:c,propertyName:e.getComponentConfig().value,classID:e.getValue(i.default.CLASS_ID)}})}else{const s=e.getPageReference(),o=e.getStateProps();for(const e of Object.keys(t)){const i=o[e],l=t[e];(0,a.dispatch)({type:n.SET_PROPERTY,payload:{reference:r.default.getContextPath(s,i),value:l,context:c}}),(0,a.dispatch)({type:n.FIELD_CHANGE,payload:{reference:r.default.getContextPath(s,i),value:l,context:c}})}}};static blurHandler=(e,t)=>{let{target:s}=t;null===s&&t&&t.auxiliaryTarget&&(s=t.auxiliaryTarget);const{value:r,validationValue:c}=s,l=this.getFullRef(e),u=e.getContextName();s.clearMessages&&(0,o.clearMessages)({type:i.publicConstants.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:u}),this.isEditable(s)&&(e.getValidationApi().validate("validationValue"in s?c:r),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,r),!this.isNonKeyInput(s)&&(0,a.dispatch)({type:n.FIELD_CHANGE,payload:{reference:l,pageReference:e.getPageReference(),value:r,context:u,propertyName:e.getComponentConfig().value,classID:e.getValue(i.default.CLASS_ID)}}))};static eventHandler=(e,t)=>{const{type:s}=t;switch(s){case"change":this.changeHandler(e,t);break;case"blur":this.blurHandler(e,t)}s&&this.#i(e,s)};static pause=()=>{this.#t=!0};static resume=()=>{this.#t=!1,this.#a()};static isQueueEmpty=()=>0===this.#e.length;static clearQueue=()=>{this.#e=[]};static getActionsQueue=()=>this.#e;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}}},"./src/actions/sequencer.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/store/state/state-manager.ts"),a=s("./src/store/state/actions/index.ts"),n=s("./src/utils/loading-manager.ts"),o=s("./src/utils/utils.ts");const i=new class{MISSING_CONTEXT_PARAM="context is required parameter";INVALID_CONTEXT_DETAILS="Invalid Context";INVALID_CONTEXT_OPERATION="Invalid Operation on Given Context";schedulePendingActionOnCompletion(e,t){const s=[],n=t.context_data?.blocking_action_counter??0,o=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let i=t.context_data?.is_deferred_action_in_progress??!1;if(n<=0){if(i)s.push({type:a.MERGE_DATA,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else{if(!(o.length>0))return;{const t=o.shift();i=!i,s.push({type:a.MERGE_DATA,payload:{context:e,data:{context_data:{deferred_action_queue:o,blocking_action_counter:n,is_deferred_action_in_progress:i}}}}),s.push(t)}}r.dispatch(s)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));const t=r.getDataObject(e?.payload?.context);if(t){const s=[],n=t.context_data?.blocking_action_counter??0,o=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let i=t.context_data?.is_deferred_action_in_progress??!1;return o.length<=0&&!i&&(n<=0?(s.push(e),i=!i):o.push(e),s.unshift({type:a.MERGE_DATA,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:o,blocking_action_counter:n,is_deferred_action_in_progress:i}}}}),r.dispatch(s)),Promise.resolve()}return Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}handleDeferredActionCompletion(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t=r.getDataObject(e);return t&&!0===t.context_data?.is_deferred_action_in_progress?(r.dispatch({type:a.MERGE_DATA,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}}),this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}registerBlockingAction(e){return e?r.getDataObject(e)?(r.dispatch({type:a.ALTER_BLOCKING_ACTION_COUNT,payload:{context:e,isInitiateBlockingAction:!0}}),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS)):Promise.reject(new Error(this.MISSING_CONTEXT_PARAM))}deRegisterBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t={...r.getDataObject(e)};return t.context_data={...t.context_data},t&&t.context_data?.blocking_action_counter>0?(r.dispatch({type:a.ALTER_BLOCKING_ACTION_COUNT,payload:{context:e,isInitiateBlockingAction:!1}}),t.context_data.blocking_action_counter-=t.context_data.blocking_action_counter,this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;const t=r.getDataObject(e);if(t){const s={...t};s.context_data={...s.context_data},s.context_data?.deferred_action_queue&&o.default.rejectPendingActions(s.context_data.deferred_action_queue)&&(s.context_data.deferred_action_queue=[]),s.context_data?.blocking_action_counter&&(s.context_data.blocking_action_counter=0),s.context_data?.is_deferred_action_in_progress&&(s.context_data.is_deferred_action_in_progress=!1),r.dispatch({type:a.MERGE_DATA,payload:{context:e,data:{...s}}}),n.IsLoadingManagerInstance.disableLoadingIndicator({context:e})}}}},"./src/actions/targetmap.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});class r{static actionsTargetMap=new Map;static getTargetViewContainerName=e=>{if(e){const t=e.toLowerCase();let s="primary";return this.actionsTargetMap.has(t)&&(s=this.actionsTargetMap.get(t)),s}return""};static buildActionTargetMap=e=>{e&&Object.keys(e).forEach((t=>{const s=e[t];s&&s.actions&&s.actions.forEach((e=>{this.actionsTargetMap.set(e.toLowerCase(),t)}))}))}}const a=r},"./src/analytics/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{createInsight:()=>N,default:()=>j,deleteInsight:()=>R,deleteScheduledInsight:()=>M,exportToCSV:()=>D,exportToExcel:()=>O,getDataObjects:()=>h,getDataPageObjects:()=>f,getDataViewMetadata:()=>C,getDefaultColumns:()=>g,getFieldsForDataSource:()=>m,getInsightByID:()=>b,getInsightIDs:()=>S,getInsightsByID:()=>T,getPrimaryFieldsForDataSource:()=>E,getPrimaryFieldsForInsights:()=>I,scheduleInsight:()=>x,translateStrings:()=>w,updateInsight:()=>v,updateScheduledInsight:()=>P});var r=s("./src/router/app-router.ts"),a=s("./src/service_broker/fetch.ts"),n=s("./src/data-view/data-api-utils.ts"),o=s("./src/utils/utils.ts"),i=s("./src/rules/rules-store.ts"),c=s("./src/data-view/index.ts");const l="getDataObjects",u="getInsightByID",d=["LocalList","RemoteList","PromptList","DataPage"];let p=null;function f(e=!0){if(p)return p;const t=n.default.getAppCacheKey("getDataPageObjects");if(e&&window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(t)));const{restApi:s,reqType:o}=(0,r.resolveRestApi)("getDataPages",{datapageRequestType:"explorable"});return p=(0,a.fetch)(s,{method:o,datapageRequestType:"explorable"}),p.then((e=>{p=null,window.sessionStorage.setItem(t,JSON.stringify(e))})),p}function h(){const e=n.default.getAppCacheKey(l);if(window.sessionStorage.getItem(e))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(e)));const{restApi:t,reqType:s}=(0,r.resolveRestApi)(l,{}),o=(0,a.fetch)(t,{method:s});return o.then((t=>{window.sessionStorage.setItem(e,JSON.stringify(t))})),o}function g(e){const t=n.default.getAppCacheKey(`DefaultColumns_${Object.values(e).join("_")}`);if(window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(t)));const{restApi:s,reqType:o}=(0,r.resolveRestApi)("getListData",{dataViewName:"D_pzGetDefaultColumns"}),i=(0,a.fetch)(s,{method:o,body:{dataViewParameters:e}});return i.then((e=>{window.sessionStorage.setItem(t,JSON.stringify(e))})),i}function m(e,t,s){if(!t){const t=(0,i.getDataPageMetadata)(e),s=Array.isArray(t?.rdFields)?t?.rdFields:t?.rdFields?.fields;return s?Promise.resolve({data:{data:s.map((e=>({pyFieldName:e})))}}):Promise.resolve({data:{data:[]}})}const r=n.default.getAppCacheKey(`RDColumns-${e}`);if(window.sessionStorage.getItem(r))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(r)));const a=n.default.getData("D_pxFieldsForDataSource",{dataViewParameters:{DataPageName:e}},s);return a.then((e=>{window.sessionStorage.setItem(r,JSON.stringify(e))})),a}function E(e="",t=""){const s=n.default.getAppCacheKey(`PFColumns-${e}${t}`);if(window.sessionStorage.getItem(s))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(s)));const r=n.default.getData("D_pxGetInitialFieldsForDataSource",{dataViewParameters:{DataPageName:e,ClassName:t}});return r.then((e=>{window.sessionStorage.setItem(s,JSON.stringify(e))})),r}const A={},_=e=>n.default.getAppCacheKey(`PrimaryFields-${e}`);async function I(e,t,s){const{allClasses:r,promisesToAwait:a,classesToFetch:o,isTopLevelClassPresent:i,joinedClassesToFetch:c}=function(e,t){const s=[],r=[];let a=!1;const n=[],o=[];return e&&o.push(e),t&&t.length>0&&o.push(...t),o.forEach((t=>{const o=_(t);window.sessionStorage.getItem(o)||(A[t]?r.push(A[t]):(s.push(t),t===e?a=!0:n.push(t)))})),{allClasses:o,promisesToAwait:r,classesToFetch:s,isTopLevelClassPresent:a,joinedClassesToFetch:n}}(e,s);return o.length&&a.push((async(e,t,s,r)=>{const a=n.default.getData("D_pxGetPrimaryFieldsForInsights",{dataViewParameters:{...t&&{topLevelClassID:t},...r&&{joinedClassIDs:r.join(",")},...s&&{topLevelDataPageID:s}}}).then((t=>{const s=t.data?.data||[],r={};e.forEach((e=>{r[e]=[]})),s.forEach((({classID:e,pyFieldName:t})=>{r[e].push(t)})),Object.entries(r).forEach((([e,t])=>{const s=_(e);window.sessionStorage.setItem(s,JSON.stringify(t))}))})).finally((()=>{e.forEach((e=>{delete A[e]}))}));return e.forEach((e=>{A[e]=a})),a})(o,i?e:void 0,i?t:void 0,c.length>0?c:void 0)),Promise.allSettled(a).then((()=>{const e={};return r.forEach((t=>{const s=_(t);if(window.sessionStorage.getItem(s))try{e[t]=JSON.parse(window.sessionStorage.getItem(s))}catch{}})),{data:e}}))}function y(e){let t;return e[1].category?t=e[1].category:e[0].indexOf(":")>0&&(t=e[0].substring(0,e[0].indexOf(":"))),t}function C(e,t,s){if(!t){const{sourceMetadata:t,sourceFields:s}=function(e){const t=(0,i.getDataPageMetadata)(e);if(t&&t.classID){let e=(0,i.getFieldsByClassName)(t.classID);const s=new Set(t.primaryFields),r=t.rdFields?.fields?.filter((e=>e.indexOf(".")>0));if(r&&!o.default.isEmpty(r)){const s=r.reduce(((e,s)=>{const r=(0,i.getEmbeddedPropertyMetadata)(s,t.classID);return e[s]=r,e}),{});e={...e,...s}}if(e&&Object.keys(e).length>0){const r=new Set(Array.isArray(t?.rdFields)?t?.rdFields:t?.rdFields?.fields),a=r.size>0||s.size>0;for(const t in e)e[t].type.startsWith("Page")||a&&!(r.size>0&&r.has(t)||s.size>0&&s.has(t))?delete e[t]:e[t]?.datasource&&d.includes(e[t].datasource.tableType)&&(e[t].fieldType="Picklist");return{sourceFields:e,sourceMetadata:t}}}return{}}(e);if(t&&s&&Object.keys(s).length>0){const e={data:{...t,fields:Object.entries(s).map((e=>({...e[1],fieldID:e[0],fieldType:e[1].fieldType?e[1].fieldType:e[1].isUserReference?"User reference":void 0,category:y(e),classID:e[1].associationClassID?e[1].associationClassID:e[1].classID})))}};return Promise.resolve(e)}}const r={dataSource:e,columns:[],parameters:{},associationFilter:s,matchPosition:"",ignoreCase:!1};return c.default.init(r).then((({dataSourceMetaData:e})=>Promise.resolve({data:e})))}function S(){const{restApi:e,reqType:t}=(0,r.resolveRestApi)("getInsightIDs");return(0,a.fetch)(e,{method:t})}function b(e){const t=(0,i.getInsight)(e);if(t)return Promise.resolve({data:{pyInsights:[t]}});const s={insightID:e},{restApi:n,reqType:o}=(0,r.resolveRestApi)(u,s);return(0,a.fetch)(n,{method:o})}function T(e){const t={insightID:e.join(",")},{restApi:s,reqType:n}=(0,r.resolveRestApi)(u,t);return(0,a.fetch)(s,{method:n})}function N(e){const{restApi:t,reqType:s}=(0,r.resolveRestApi)("createInsight");return(0,a.fetch)(t,{method:s,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}function v(e,t){const s={insightID:e},{restApi:n,reqType:o}=(0,r.resolveRestApi)("updateInsight",s),i=t.UpdateDateTime;return(0,a.fetch)(n,{method:o,body:JSON.stringify(t),headers:{"if-match":i,"Content-Type":"application/json"}})}function R(e){const t={insightID:e},{restApi:s,reqType:n}=(0,r.resolveRestApi)("deleteInsight",t);return(0,a.fetch)(s,{method:n})}function O(e){const{restApi:t,reqType:s}=(0,r.resolveRestApi)("exportToExcel");return(0,a.fetch)(t,{method:s,body:JSON.stringify(e)})}function D(e){const{restApi:t,reqType:s}=(0,r.resolveRestApi)("exportToCSV");return(0,a.fetch)(t,{method:s,body:JSON.stringify(e)})}const x=(e,t)=>{const s={insightID:e},{restApi:n,reqType:o}=(0,r.resolveRestApi)("scheduleInsight",s);return(0,a.fetch)(n,{method:o,body:JSON.stringify(t)})},P=(e,t,s)=>{const n={insightID:e,scheduleID:t},{restApi:o,reqType:i}=(0,r.resolveRestApi)("updateScheduledInsight",n);return(0,a.fetch)(o,{method:i,body:JSON.stringify(s)})},M=(e,t)=>{const s={insightID:e,scheduleID:t},{restApi:n,reqType:o}=(0,r.resolveRestApi)("deleteScheduledInsight",s);return(0,a.fetch)(n,{method:o})};function w(e){const{restApi:t,reqType:s}=(0,r.resolveRestApi)("translateStrings");return(0,a.fetch)(t,{method:s,body:JSON.stringify(e)})}const j={getDataObjects:h,getDataPageObjects:f,getDataViewMetadata:C,getDefaultColumns:g,getFieldsForDataSource:m,getPrimaryFieldsForDataSource:E,getPrimaryFieldsForInsights:I,getInsightIDs:S,getInsightByID:b,getInsightsByID:T,createInsight:N,updateInsight:v,deleteInsight:R,exportToExcel:O,exportToCSV:D,scheduleInsight:x,updateScheduledInsight:P,deleteScheduledInsight:M,translateStrings:w}},"./src/annotation/handlers/active-cases.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/annotation/index.ts"),a=s("./src/case/apis.ts");r.default.registerHandler("@ACTIVE_CASES",((e,t)=>a.default.getOpenedCaseItems(`${t.getContextName()}/${t.getContainerName()}`)))},"./src/annotation/handlers/address.ts":(e,t,s)=>{"use strict";s.r(t),s("./src/annotation/index.ts").default.registerHandler("@ADDRESS",((e,t)=>{const s=t.getValue(e)?.pyCountry;return s?`pyAddressForm_${s}`:"pyAddressForm"}))},"./src/annotation/handlers/associated.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/store/state/state-manager.ts"),a=s("./src/annotation/index.ts"),n=s("./src/constants.ts"),o=s("./src/utils/utils.ts"),i=s("./src/annotation/processor.ts"),c=s("./src/cascade/datapage-dependency-handler.ts");a.default.registerHandler("@ASSOCIATED",((e,t)=>{let s={};const a=[];let l="",u="";const d=t.getPageReference();if(e.startsWith(".")){l=`${d}.${e.substring(1)}`;const r=e?e.split(".").filter((e=>!!e)):[];r.length>1&&(r.pop(),u=r.join(".")),s=t.getFieldMetadata(e.substring(1))}else s=t.getFieldMetadata(e),l=e;const p=s?.datasource?.tableType,f=s?.datasource?.mode===n.default.READONLY,h=s?.datasource?.name||"",g=t.getComponentConfig();if(g&&g.deferDatasource&&(g.datasourceMetadata=`@FIELD_META ${e}`,t.setStateProps({datasourceMetadata:g.datasourceMetadata}),p===n.default.DATA_PAGE))return null;if(p===n.default.DECISION||p===n.default.RULE_REFERENCE)return function(e,t){const s=i.default.getPropertyName(e?.propertyForDisplayText),r=i.default.getPropertyName(e?.propertyForValue);return(t.getContextDataValue(`.${n.default.SUMMARY_OF_EXPRESSIONS}.${e?.name}`)||[])?.map((e=>({key:e[r]||e[`.${r}`],value:e[s]||e[`.${s}`]})))}(s?.datasource,t);if(p!==n.default.DATA_PAGE)return s?.datasource?.records;const m=i.default.getPropertyName(s?.datasource?.propertyForDisplayText),E=i.default.getPropertyName(s?.datasource?.propertyForValue),A=Array.isArray(s?.datasource?.parameters)?s?.datasource?.parameters:[],_=t.getContextName(),I=[];if(A.forEach((e=>{if(i.default.isProperty(e?.value)){let t=(0,r.getValue)(`.${o.default.getFullPropertyReference([u,i.default.getPropertyName(e.value)])}`,d,_);I.push(o.default.getFullPropertyReference([d,u,i.default.getPropertyName(e?.value)])),null!=t&&""!==t||(t=n.default.NULL_STRING),a.push(t)}else a.push(e?.value||n.default.NULL_STRING)})),_){const e=c.default.getContextObjectByName(_)||{};I.forEach((t=>{if(t in e){const s=e[t];e[t]=[...new Set([...s,l])]}else e[t]=[l]})),c.default.addContextName(_,e)}const y=function(e,t,s,a){let i="",c=s;if(t.join(n.default.HASH_DELIMITER)&&(i=o.default.getHashedString(t.join(n.default.HASH_DELIMITER)),c=s+n.default.UNDERSCORE_STRING+i),a){const e=(0,r.getSharedDataObject)(),t=e?e[s]?.[c]:{};return Array.isArray(t?.pxResults)?t.pxResults:[]}const l=(e.getDataObject()[s]||{})[c]||{};return Array.isArray(l?.pxResults)?l.pxResults:[]}(t,a,h,f);return y.map((e=>({key:e[E]||e[`.${E}`],value:e[m]||e[`.${m}`]})))}))},"./src/annotation/handlers/attachment.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/annotation/index.ts"),a=s("./src/attachment/index.ts"),n=s("./src/context/context-processor.ts");r.default.registerHandler("@ATTACHMENT",((e,t,s)=>{let r;return r=t?t.getValue(e):n.default.getLitePropertyValue(s),a.default.prepareAttachmentData(r)}))},"./src/annotation/handlers/case.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/annotation/index.ts"),a=s("./src/constants.ts");r.default.registerHandler("@CASE",((e,t)=>e===a.default.ID?t.getCaseInfo().getKey():e))},"./src/annotation/handlers/datasource.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/annotation/index.ts"),a=s("./src/annotation/processor.ts");r.default.registerHandler("@DATASOURCE",((e,t)=>{const s=t.getValue(e)||[],r=t.getComponentConfig(),n=Object.keys(r).find((t=>r[t]?.source?.includes(e)));if(n){const{fields:e,copyAll:t}=r[n],o=[];return s.forEach((s=>{const r={};t?Object.keys(s).forEach((e=>{const t=a.default.getPropertyName(e);r[t]=s[t]})):Object.keys(e).forEach((t=>{const n=a.default.getPropertyName(e[t]);r[t]=s[n]})),o.push(r)})),o}return[]}))},"./src/annotation/handlers/datatype.ts":(e,t,s)=>{"use strict";s.r(t),s("./src/annotation/index.ts").default.registerHandler("@DATATYPE",((e,t)=>t.getValue(e)))},"./src/annotation/handlers/environmentInfo.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/annotation/index.ts"),a=s("./src/environment-info/index.ts"),n=s("./src/constants.ts");r.default.registerHandler("@ENV",((e,t)=>{switch(e){case n.default.ENV_INFO_KEYS.APPLICATION_NAME:return a.default.getApplicationName();case n.default.ENV_INFO_KEYS.ACCESS_GROUP:return a.default.getAccessGroup();case n.default.ENV_INFO_KEYS.USER_NAME:return a.default.getOperatorName();case n.default.ENV_INFO_KEYS.USER_ID:return a.default.getOperatorIdentifier();case n.default.ENV_INFO_KEYS.APPLICATION_DESC:return t.getLocalizedValue(a.default.getApplicationLabel()||"");case n.default.ENV_INFO_KEYS.USER_IMAGE:return a.default.getOperatorImageInsKey();case n.default.ENV_INFO_KEYS.LOCALE:return a.default.getUseLocale();case n.default.ENV_INFO_KEYS.TIMEZONE:return a.default.getTimeZone();case n.default.ENV_INFO_KEYS.WORK_GROUP:return a.default.getOperatorWorkGroup();default:return e}}))},"./src/annotation/handlers/expression/definitions.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{OperatorHandlers:()=>u,expressionHandlers:()=>l,states:()=>d,supportedGrammar:()=>c});var r=s("./src/context/context-processor.ts"),a=s("./src/annotation/handlers/expression/parser.ts");const n="identifier",o={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e&&t},i={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e||t},c={">":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>t},">=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>=t},"<":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<t},"<=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<=t},"==":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e===t},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e!==t},"!":{operatorType:"unaryOperator",precedence:999,evaluate:e=>{let{value:t}=e;return"true"!==t&&"false"!==t||(t="true"===t),!t}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":o,AND:o,and:o,"||":i,OR:i,or:i,CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.includes(t)},NOT_CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.includes(t)},STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.startsWith(t)},NOT_STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.startsWith(t)},ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.endsWith(t)},NOT_ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.endsWith(t)},IS_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!e},IS_NOT_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!!e},IS_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>t.split(",").includes(e)},IS_NOT_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!t.split(",").includes(e)}},l={BinaryExpression:function(e){const t=[];let s="";return t[0]=this.evaluateAST(e.left),e.left.operationType===n&&this._context&&(s=this._context.getFieldMetadata(e.left.value.substring(1))?.type??""),t[1]=e.right?this.evaluateAST(e.right,s):"",this._grammar[e.operator].evaluate(t[0],t[1])},identifier:function(e){return this._localDataObject?this._localDataObject[e.value.substring(1)]??"":this._contextTreeNodeContext?r.default.getLitePropertyValue(this._contextTreeNodeContext,e.value):this._context.getValue(e.value)??""},literal:function(e,t){return void 0!==t&&""!==t&&"True-False"!==t||"true"!==e.value&&"false"!==e.value?e.value:"true"===e.value},UnaryExpression:function(e){return this._grammar[e.operator].evaluate(e.right)}},u={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:e.value})},binaryOperator:function(e){const{precedence:t}=this._grammar[e.value];let s=this._position._parent;for(;s&&s.operator&&this._grammar[s.operator].precedence>=t;)this._position=s,s=s._parent;const r={operationType:"BinaryExpression",operator:e.value,left:this._position};a.default._setParent(this._position,r),this._position=s,this.setPositionInAST(r)},identifier:function(e){const t={operationType:n,value:e.value};this.setPositionInAST(t)},literal:function(e){this.setPositionInAST({operationType:"literal",value:e.value})},subExpression:function(e){this.setPositionInAST(e)}},d={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:n},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:u.subExpression,endStates:{closeParenthesis:"expectBinOp"}}}},"./src/annotation/handlers/expression/expression.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/annotation/handlers/expression/definitions.ts"),a=s("./src/annotation/handlers/expression/parser.ts"),n=s("./src/annotation/handlers/expression/lexer.ts");const o=class{constructor(e,t){this._grammar={...r.supportedGrammar},this._expression=e,this._ast=null,this._context={},this._contextTreeNodeContext=null,this._localDataObject=t}buildAST(){const e=new n.default(this._grammar).tokenize(this._expression),t=new a.default(this._grammar);return t.addTokens(e),this._ast=t.buildAst(),this}evaluate(e,t){return this._context=e,this._contextTreeNodeContext=t,this.evaluateAST(this._ast)}evaluateAST(e,t){return r.expressionHandlers[e.operationType].call(this,e,t)}}},"./src/annotation/handlers/expression/index.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/annotation/index.ts"),a=s("./src/annotation/handlers/expression/utils.ts");r.default.registerHandler("@E",((e,t,s)=>{try{const r=(0,a.createExpression)(e),n=(0,a.buildAST)(r);return(0,a.evaluateExpression)(n,t,s)}catch(e){}return!0}))},"./src/annotation/handlers/expression/lexer.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});const r=["binaryOperator","unaryOperator","openParenthesis"],a=/^\s*$/,n=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,o=/\\\\/,i=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],c=["[a-zA-Z_.\\$][(0-9)a-zA-Z0-9_.\\$]*","[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}|[0-9]{4}-[0-9]{2}-[0-9]{2}","(?:(?:[0-9]*\\.[0-9]+)|[0-9]+)"],l=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;class u{constructor(e){this._grammar=e}static _isNegative(e){return r.some((t=>t===e[e.length-1].tokenType))}static _isWhitespace(e){return!!e.match(a)}static _createWordboundary(e){return(e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).match(n)&&(e=`\\b${e}\\b`),e}static _unquote(e){const[t]=e,s=new RegExp(`\\\\${t}`,"g");return e.substr(1,e.length-2).replace(s,t).replace(o,"\\")}_getSplitRegex(){if(!this._splitRegex){const e=Object.keys(this._grammar).sort(((e,t)=>t.length-e.length)).map((e=>u._createWordboundary(e)),this);this._splitRegex=new RegExp(`(${[i.join("|"),e.join("|"),c.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){const t=this._getSplitRegex();return e.split(t).filter((e=>e))}_createToken(e){const t={tokenType:"literal",value:e,element:e};return'"'===e[0]||"'"===e[0]?t.value=u._unquote(e):e.match(l)?t.value=parseFloat(e):"true"===e||"false"===e?t.value="true"===e:this._grammar[e]?t.tokenType=this._grammar[e].operatorType:e.match(n)&&(t.tokenType="identifier"),t}_getTokens(e){const t=[];let s=!1;for(let r=0;r<e.length;r+=1)u._isWhitespace(e[r])?t.length&&(t[t.length-1].element+=e[r]):"-"===e[r]&&u._isNegative(t)?s=!0:(s&&(e[r]=`-${e[r]}`,s=!1),t.push(this._createToken(e[r])));return t}tokenize(e){const t=this._splitExpression(e);return this._getTokens(t)}}const d=u},"./src/annotation/handlers/expression/parser.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./src/annotation/handlers/expression/definitions.ts");class a{constructor(e,t,s){this._grammar=e,this._state="expectOperand",this._tree=null,this._exprStr=t||"",this._endState=s||{}}static _setParent(e,t){Object.defineProperty(e,"_parent",{value:t,writable:!0})}_addToken(e){const t=r.states[this._state],s=this._exprStr;if(this._exprStr+=e.element,t.subHandler){this._subParser||this._startSubExpression(s);const t=this._subParser._addToken(e);t&&(this._endSubExpression(),this._state=t)}else{if(!t.operatorTypes[e.tokenType]){if(this._endState[e.tokenType])return this._endState[e.tokenType];throw new Error(`Token ${e.element} (${e.tokenType}) unexpected in expression: ${this._exprStr}`)}{const s=t.operatorTypes[e.tokenType],a=r.OperatorHandlers[e.tokenType];a&&a.call(this,e),s.toState&&(this._state=s.toState)}}return!1}addTokens(e){e.forEach(this._addToken,this)}buildAst(){return this._subParser&&this._endSubExpression(),this._state="complete",this._position?this._tree:null}_startSubExpression(e){const{endStates:t}=r.states[this._state];this._subParser=new a(this._grammar,e,t)}_endSubExpression(){r.states[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,a._setParent(e,this._position)):this._tree=e,this._position=e}}const n=a},"./src/annotation/handlers/expression/utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{buildAST:()=>n,createExpression:()=>a,evaluateExpression:()=>o,evaluateExpressionOnLocalData:()=>i});var r=s("./src/annotation/handlers/expression/expression.ts");const a=(e,t)=>{const s=e.replace(/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,(e=>e.replace("=","==")));return new r.default(s,t)},n=e=>!e||e.buildAST(),o=(e,t,s)=>!e||e.evaluate(t,s),i=(e,t,s)=>{const r=a(e,t),i=n(r);return o(i,s)}},"./src/annotation/handlers/field-label.ts":(e,t,s)=>{"use strict";s.r(t),s("./src/annotation/index.ts").default.registerHandler("@FL",((e,t)=>t.getLocalizedValue(t.getFieldMetadata(e)?.label)))},"./src/annotation/handlers/fieldmeta.ts":(e,t,s)=>{"use strict";s.r(t),s("./src/annotation/index.ts").default.registerHandler("@FIELD_META",((e,t)=>{let s,r={};if(r=e.startsWith(".")?t.getFieldMetadata(e.substring(1)):t.getFieldMetadata(e),r&&r.datasource&&r.datasource.parameters){let a="";const n=e.split(".").filter((e=>!!e));if(n.length>1&&(n.pop(),a=`.${n.join(".")}`),Array.isArray(r.datasource.parameters)){const e=[];r.datasource.parameters.forEach((s=>{const r={},{name:n,value:o}=s;r.name=n,"string"==typeof o&&o.startsWith("@P")?r.value=`@P ${a}${o.substring(3)}`:r.value=o,e.push(t.resolveConfigProps(r))})),s=e}else s=t.resolveConfigProps(r.datasource.parameters);r={...r,datasource:{...r.datasource,parameters:s}}}return r}))},"./src/annotation/handlers/filteredlist.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/annotation/index.ts"),a=s("./src/utils/utils.ts"),n=s("./src/annotation/handlers/expression/utils.ts");r.default.registerHandler("@FILTERED_LIST",((e,t)=>{const s=e.substring(1,e.indexOf("[")),r=e.substring(e.indexOf("]")+2),o=e.substring(e.indexOf("[")+1,e.indexOf("]"));if(!t)return null;const{useCustomContext:i}=t;let c;return a.default.isEmpty(i)?c=t.getValue(`.${s}`):(c=i,c=a.default.getIn(c,s)),c&&r.length>0?(o&&(c=c.filter((e=>(0,n.evaluateExpressionOnLocalData)(o,e)))),c.map((e=>a.default.getIn(e,r)))):null}))},"./src/annotation/handlers/gen-ai-coach.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/annotation/index.ts"),a=s("./src/rules/rules-store.ts");r.default.registerHandler("@GENAICOACH",((e,t)=>a.getGenAICoach(e,t.getCurrentClassID())))},"./src/annotation/handlers/index.ts":(e,t,s)=>{"use strict";s.r(t),s("./src/annotation/handlers/locale.ts"),s("./src/annotation/handlers/property.ts"),s("./src/annotation/handlers/expression/index.ts"),s("./src/annotation/handlers/when.ts"),s("./src/annotation/handlers/associated.ts"),s("./src/annotation/handlers/routinginfo.ts"),s("./src/annotation/handlers/environmentInfo.ts"),s("./src/annotation/handlers/datasource.ts"),s("./src/annotation/handlers/fieldmeta.ts"),s("./src/annotation/handlers/user.ts"),s("./src/annotation/handlers/active-cases.ts"),s("./src/annotation/handlers/locale-rule.ts"),s("./src/annotation/handlers/case.ts"),s("./src/annotation/handlers/shared.ts"),s("./src/annotation/handlers/paragraph.ts"),s("./src/annotation/handlers/filteredlist.ts"),s("./src/annotation/handlers/address.ts"),s("./src/annotation/handlers/datatype.ts"),s("./src/annotation/handlers/attachment.ts"),s("./src/annotation/handlers/field-label.ts"),s("./src/annotation/handlers/gen-ai-coach.ts"),s("./src/annotation/handlers/refresh.ts")},"./src/annotation/handlers/locale-rule.ts":(e,t,s)=>{"use strict";s.r(t),s("./src/annotation/index.ts").default.registerHandler("@LR",(e=>e))},"./src/annotation/handlers/locale.ts":(e,t,s)=>{"use strict";s.r(t),s("./src/annotation/index.ts").default.registerHandler("@L",((e,t)=>t.getLocalizedValue(e)))},"./src/annotation/handlers/paragraph.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/annotation/index.ts"),a=s("./src/dynamic-content/util.ts");r.default.registerHandler("@PARAGRAPH",((e,t)=>{const s=t.getLocalizedParagraphValue(e);return s?a.default.getParagraphStream(s,t):null}))},"./src/annotation/handlers/property.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/context/context-processor.ts");s("./src/annotation/index.ts").default.registerHandler("@P",((e,t,s)=>t?t.getValue(e):r.default.getLitePropertyValue(s)))},"./src/annotation/handlers/refresh.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/annotation/index.ts"),a=s("./src/refresh/refresh-manager.ts");r.default.registerHandler("@REFRESH",((e,t)=>{const s=t.getCaseInfo().getKey(),r=t.getContextName(),n=t.getPageReference();a.default.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),s,"",n,{autoDetectRefresh:!0,preserveClientChanges:!1,refreshFor:!0}),`${n}${e}`,`${r}/${n}`,r)}))},"./src/annotation/handlers/routinginfo.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/annotation/index.ts"),a=s("./src/router/routing-manager.ts");r.default.registerHandler("@ROUTING_INFO",((e,t)=>a.getRoutingInfo(t.getContainerName(),t.getContextName())))},"./src/annotation/handlers/shared.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/annotation/index.ts"),a=s("./src/store/state/utils.ts");r.default.registerHandler("@SHARED",(e=>a.default.getSharedState(e)))},"./src/annotation/handlers/user.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/annotation/index.ts"),a=s("./src/context/context-processor.ts");r.default.registerHandler("@USER",((e,t,s={})=>{const r=t?.getValue(e)||a.default.getLitePropertyValue(s,e),n=t?.getReferencedUser(r)||a.default.getReferencedUser(r,s);return{userId:r,userName:n?n.UserName:null}}))},"./src/annotation/handlers/when.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/annotation/index.ts"),a=s("./src/constants.ts"),n=s("./src/store/state/state-manager.ts");r.default.registerHandler("@W",((e,t,s)=>{let r;if(t)r=t.getContextDataValue(`.${a.default.SUMMARY_OF_WHEN_CONDITIONS}.${e}`);else{const{pageReference:t,context:o}=s??{};r=(0,n.getContextValue)(t,`.${a.default.SUMMARY_OF_WHEN_CONDITIONS}.${e}`,o)}return!0===r||"true"===r}))},"./src/annotation/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=new class{constructor(){this.handlers={}}registerHandler(e,t){this.handlers[e]=t}getHandler(e){return this.handlers[e]}}},"./src/annotation/processor.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/components-registry.ts"),a=s("./src/constants.ts"),n=s("./src/utils/utils.ts"),o=s("./src/annotation/index.ts");const i=class{static handleAnnotation(e,t,s){const r=e.indexOf(" "),a=-1===r?e:e.substring(0,r),n=o.default.getHandler(a);return n?n(e.substring(r+1),t,s):e}static trimAnnotation(e){if("string"!=typeof e)return e;const t=e.indexOf(" "),s=e.substring(0,t),r=e.substring(t+1);return o.default.getHandler(s)?r:e}static handleComponentMapping(e,t,s){const a=r.default.getComponent(t.type);if(!a||!a.mapping)return;const n=a.mapping(t.config);if(n&&n["@map"]){const t=n["@map"],{source:r}=t;if(!r)return;const a=s.getValue(r);if("function"==typeof t.advanced)t.advanced(e,a);else{const s=t.inputs_map;e[t.output_property]=[];const r=e[t.output_property];a.forEach((e=>{const t={};Object.keys(s).forEach((r=>{let a=s[r];a&&0===a.indexOf(".")?(a=a.substring(1),t[r]=e[a]):t[r]=a})),r.push(t)}))}}}static getPropertyName(e){if(e&&n.default.isString(e)){const t=e.startsWith(a.default.PROPERTY_ANNOTATION)||e.startsWith(a.default.ATTACHMENT_ANNOTATION)||e.startsWith(a.default.ASSOCIATED_PROPERTY_ANNOTATION),s=t?e.indexOf(" "):-1;return t?e.substring(s+2):e}return e}static getLeafPropertyName(e){if(n.default.isString(e)&&e?.startsWith(a.default.PROPERTY_ANNOTATION)){const t=this.getPropertyName(e),s=t.split(".");return s.length<2?t:s.pop()}return e}static isProperty(e){return n.default.isString(e)&&!!e?.startsWith(a.default.PROPERTY_ANNOTATION)}}},"./src/annotation/utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/annotation/processor.ts");const a=class{static getPropertyName(e){return r.default.getPropertyName(e)}static isProperty(e){return r.default.isProperty(e)}static getLeafPropertyName(e){return r.default.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}}},"./src/attachment/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./src/router/app-router.ts"),a=s("./src/service_broker/fetch.ts");const n="downloadAttachment",o={},i=e=>{const t=(0,a.getCancelTokenSource)();return o[e]=t,t},c=e=>{let t="document-doc";if(!e)return t;if(e.startsWith("audio"))t="audio";else if(e.startsWith("video"))t="video";else if(e.startsWith("image"))t="picture";else if(e.includes("pdf"))t="document-pdf";else{const[,s]=e.split("/"),r=e=>e.some((e=>s.includes(e)));r(["excel","spreadsheet"])?t="document-xls":r(["zip","compressed","gzip","rar","tar"])&&(t="document-compress")}return t},l=e=>{let t,s,r,a;return t=e.pyCategoryLabel?`${e.pyCategoryLabel},`:e.pyCategoryName?`${e.pyCategoryName},`:e.Category,s=e.pxCreateOpName?e.pxCreateOpName:e.pxCreateOperator?e.pxCreateOperator:e.CreateUser?.Name||"",r=e.pyFileName?e.pyFileName:e.FileExtension&&""!==e.FileExtension&&e.FileName.endsWith(e.FileExtension)?e.FileName.substring(0,e.FileName.lastIndexOf(e.FileExtension)-1):e.FileName,a=e.pyAttachName&&e.pyFileName?e.pyAttachName.startsWith(e.pyFileName)&&e.pyAttachName.split(".").length-1===e.pyFileName.split(".").length?e.pyAttachName.split(".").pop():"":e.FileExtension,{props:{meta:`${t} ${s}`,name:e.pyAttachName?e.pyAttachName:e.FileName,icon:c(e.pyMimeFileExtension||e.MimeType)},responseProps:{fileName:e.pyAttachName?e.pyAttachName:e.FileName,name:r,category:e.pyCategoryName?e.pyCategoryName:e.Category,extension:a,ID:e.pzInsKey?e.pzInsKey:e.ID,mimeType:e.pyMimeFileExtension?e.pyMimeFileExtension:e.MimeType,attachmentURL:e.pyAttachmentLink?e.pyAttachmentLink:e.AttachmentURL,createUser:s,createDateTime:e.pxCreateDateTime?e.pxCreateDateTime:e.CreateDateTime,responseType:e.responseType??(e.ID?"binary":null)}}},u={uploadAttachment:(e,t,s,n)=>{const c=new FormData;c.append("appendUniqueIdToFileName",!0),c.append("file",e);const{restApi:l,reqType:u}=(0,r.resolveRestApi)("uploadAttachment",{});return(0,a.fetch)(l,{method:u,headers:{"Content-Type":"multipart/form-data"},body:c,onUploadProgress:t,signal:i(e.ID).token},n).then((t=>({type:"File",category:e.category||"File",ID:t.data.ID,clientFileID:e.ID,filename:e.name}))).catch(s?s(a.isFetchCanceled,e):e=>{throw e.isHandled=!1,e}).finally((()=>delete o[e.ID]))},linkAttachmentsToCase:(e,t,s,n)=>{const o={};if("File"===s){const[e]=t,{clientFileID:s}=e;delete e.clientFileID,o.signal=i(s).token}const{restApi:c,reqType:l}=(0,r.resolveRestApi)("linkCaseAttachment",{caseID:e});return(0,a.fetch)(c,{...o,body:{attachments:t},method:l},n)},getCaseAttachments:(e,t,s=!1)=>{const{restApi:n,reqType:o}=(0,r.resolveRestApi)("getCaseAttachments",{caseID:e,includeThumbnail:s});return(0,a.fetch)(n,{method:o},t).then((e=>e.data.attachments))},getAttachmentCategories:(e,t,s)=>{const{restApi:n,reqType:o}=(0,r.resolveRestApi)("getAttachmentCategories",{caseID:e,type:t});return(0,a.fetch)(n,{method:o},s).then((e=>e.data))},downloadAttachment:(e,t,s)=>{const{restApi:o,reqType:i}=(0,r.resolveRestApi)(n,{attachmentID:e});return(0,a.fetch)(o,{method:i,..."binary"===s&&{responseType:"arraybuffer"}},t)},editAttachment:(e,t,s)=>{const{restApi:n,reqType:o}=(0,r.resolveRestApi)("editAttachment",{attachmentID:e});return(0,a.fetch)(n,{method:o,body:{...t}},s)},deleteAttachment:(e,t)=>{const{restApi:s,reqType:n}=(0,r.resolveRestApi)("deleteAttachment",{attachmentID:e});return(0,a.fetch)(s,{method:n},t)},downloadDocument:(e,t)=>{const{restApi:s,reqType:n}=(0,r.resolveRestApi)("downloadDocument",{documentID:e});return(0,a.fetch)(s,{method:n},t)},deleteDocument:(e,t,s)=>{const{restApi:n,reqType:o}=(0,r.resolveRestApi)("deleteDocument",{caseID:e,documentID:t});return(0,a.fetch)(n,{method:o},s)},getDocumentURL:e=>{const t=PCore.getEnvironmentInfo().getDocumentUrlDP()||"D_pxGetDocumentURL";return PCore.getDataPageUtils().getPageDataAsync(t,e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getDocumentURL API : ",t.response)}))},cancelRequest:e=>{o[e]&&(o[e].cancel(),delete o[e])},buildFilePropsFromResponse:l,getAttachmentURL:e=>{const{restApi:t}=(0,r.resolveRestApi)(n,{attachmentID:e});return t},prepareAttachmentData:e=>{let t=[];if(e&&Object.hasOwn(e,"pyCount")&&e.pyCount>0)t=e?.pxResults?.filter((e=>!!e.pzInsKey)).map((e=>l(e)))||[];else if(e&&"object"==typeof e){let s;s=Array.isArray(e)?e:[e],t=s?.filter((e=>e.ID&&e.FileName||e.pzInsKey)).map(l)}else t=[];return{hasUploadedFiles:t.length>0,categoryName:e?.pyCategoryName||t?.[0]?.responseProps?.category||"",attachments:t}}}},"./src/bootstrap/bootstrap-utils.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>O});var r=s("./src/store/index.ts"),a=s("./src/store/state/state-manager.ts"),n=s("./src/store/state/actions/action-creators.ts"),o=s("./src/rules/rules-store.ts"),i=s("./src/router/routing-manager.ts"),c=s("./src/utils/asset-loader.ts"),l=s("./src/utils/component-loader.ts"),u=s("./src/services/index.ts"),d=s("./src/observables/stream-observable.ts"),p=s("./src/components-registry.ts"),f=s("./src/actions/processor.ts"),h=s("./src/actions/handler.ts"),g=s("./src/interpreter/c11n-env.ts"),m=s("./src/utils/context-utils.ts"),E=s("./src/fields/field-default.ts"),A=s("./src/router/app-router.ts"),_=s("./src/actions/targetmap.ts"),I=s("./src/service_broker/fetch.ts"),y=s("./src/utils/dxapi-response-translator.ts"),C=s("./src/utils/utils.ts"),S=s("./src/constants.ts"),b=s("./src/utils/pubsub-utils.ts"),T=s("./src/case/apis.ts"),N=s("./src/mashup/apis.ts"),v=s("./src/store/state/epics/util.ts"),R=s("./src/container/container-utils.ts");const O=new class{createC11nEnv=e=>(0,g.createC11nEnv)(e);getContextUtils=()=>m;getRoutingManager=()=>i;getComponentsRegistry=()=>p.default;getStateManager=()=>a;getActionCreators=()=>n;getStreamObservable=()=>d;getActionProcessor=()=>f.default;getActionHandler=()=>h.default;renderApp=(e,t)=>{const s={context:S.default.APP.APP},a={...C.default.getIn(e,S.default.ROOT),options:s};(0,r.default)(e),d.publishResponse(e,s,!0);const n=this.createC11nEnv({meta:a,isRoot:!0});b.default.publish(S.publicConstants.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:n,domContainerID:t})};updateStoreWithUiRoot=async(e,t,s)=>{const r=(0,y.getTranslatedDXAPIResponse)(e),{data:a,uiResources:n={}}=e,o=C.default.getIn(n,S.default.CONTEXT_DATA);await(0,v.processViewResponse)(r,{},{},!1,!0);const i={...a,[S.default.CONTEXT_DATA]:o},{root:c}=n;(0,R.addRootContainerItem)(c,t,i,s)};fetchEndPointResource=(e,t,s)=>{(0,I.fetch)(e,{method:"GET"},S.default.APP.ROOT).then((async e=>{const{data:r,status:a}=e;200===a&&this.updateStoreWithUiRoot(r,t,s)}))};loadComponent=async(e,t,s)=>(0,l.default)(s).then((()=>{const s=this.createC11nEnv({meta:e,isRoot:!0});a.getStore()||(0,r.default)({}),b.default.publish(S.publicConstants.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:s,domContainerID:t})}));setStaticServerUrl=(e,t,s)=>{c.default.initServer(e,t,s)};loadView=async(e,t,s=[])=>{u.default.init();const r=(0,y.getTranslatedDXAPIResponse)(e),a=C.default.getIn(r,S.default.VIEWS),n=C.default.getIn(r,S.default.NAVIGATIONS),i=C.default.getIn(r,S.default.COMPONENTS)||[];i.push(...s);const d=C.default.getIn(r,S.default.STATIC_SERVER_URL),p=C.default.getIn(r,S.default.APPLICATION_DATA);a&&(0,o.updateViewStore)(a),n&&(0,o.updateNavigationStore)(n),(0,A.initializeApplicationLabel)(p),d&&c.default.initServer(d),await(0,l.default)(i,d).then((()=>this.renderApp(r,t)))};initAppShell=(e,t,s)=>{(0,A.init)(e),_.default.buildActionTargetMap(t),u.default.init(s)};initRoutingTable=(e,t)=>{(0,A.init)(e,!0),u.default.init(t)};setAppAlias=e=>{c.default.setAppAlias(e)};getHomeRestApi=e=>{const{restApi:t}=(0,A.getRestEndPoint)("home",{portalName:e});return u.default.getServerURL()+t};getViewRestApi=(e,t)=>{const{restApi:s}=(0,A.getViewRestEndPoint)(e,t);return u.default.getServerURL()+s};loadRootComponent=async(e,t,s=[],o,i,c)=>{const{config:{name:u}={}}=t;a.getStore()||(0,r.default)({}),c&&((0,R.removeContainer)(`${S.default.APP.ROOT}/${u}`),(0,R.getContainerAPI)().deleteContainerItem(`${S.default.APP.ROOT}/${u}`)),(0,R.getContainerAPI)().getContainerItems()?.length>1&&!u?.startsWith("hybrid_")&&"authoring-preview"!==u&&a.resetStore(),a.dispatch(n.mergeData({data:{},context:S.default.APP.ROOT}));const d=this.createC11nEnv({meta:t,options:{context:S.default.APP.ROOT,pageReference:"",target:`${S.default.APP.ROOT}/${u}`}}),p=d.getPConnect(),f=p.getContextName(),h=p.getContainerName(),g=p.getContainerManager(),m=`${f}/${h}`;(0,R.getActiveContainerItemName)(m)||"noPortal"===t.config?.renderingMode||g.initializeContainers({type:"single"});const E=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference",...s];return(0,l.default)(E).then((()=>{b.default.publish(S.publicConstants.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:d,domContainerID:e,componentName:"RootContainer",portalTarget:o,styleSheetTarget:i})}))};loadViewByName=(e,t,s,r)=>{let a=this.getViewRestApi(e,s);a===u.default.getServerURL()&&(a=this.getHomeRestApi(t)),this.fetchEndPointResource(a,r)};loadPortalView=(e,t)=>{const s=this.getHomeRestApi(e);this.fetchEndPointResource(s,t,!0)};configureForBrowserBookmark=e=>{(0,A.publishForBrowserBookmark)(e)};checkIfSemanticURL=()=>(0,A.isSemanticURL)();onPCoreReady=e=>{b.default.subscribe(S.publicConstants.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};setFieldsDefaultConfigs=e=>{E.default.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{u.default.setGoogleMapsAPIKey(e)};setFetchDefaultHeaders=e=>{(0,I.updateHeaders)(e)};setFetchAuthInfo=e=>{(0,I.updateAuthInfo)(e)};getCaseApi=()=>T.default;getMashupApi=()=>N.default;enableAppRouting=e=>{(0,A.enableAppRouting)(e)};initStore=()=>(0,r.default)({});getBootstrapConfig=async(e,t)=>{const s=`${t.token_type} ${t.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:s})}).then((e=>e.json()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,s=(0,g.createC11nEnv)({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return s.getPConnect().getContainerManager().initializeContainers({type:t,name:"primary",context:"app"}),{props:{getPConnect:s.getPConnect}}}}},"./src/cascade/datapage-dependency-handler.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=new class{constructor(){this._dataSourceMap={}}hasContextName(e){return e in this._dataSourceMap}addContextName(e,t){t&&Object.keys(t).length>0?this._dataSourceMap[e]=t:this._dataSourceMap[e]={}}getContextObjectByName(e){return e in this._dataSourceMap?this._dataSourceMap[e]:null}deleteContextName(e){this.hasContextName(e)&&delete this._dataSourceMap[e]}addOrUpdatePropertyInContext(e,t,s){if(this.hasContextName(e)){const r=this.getContextObjectByName(e);if(r)if(Array.isArray(s))r[t]=s;else{const e=r[t];r[t]=[...new Set([...e,s])]}}else{const r={};Array.isArray(s)?r[t]=s:r[t]=[s],this.addContextName(e,r)}}deletePropertyInContext(e,t){if(this.hasContextName(e)){const s=this.getContextObjectByName(e);s&&t in s&&delete s[t]}}getPropertyFromContext(e,t){if(this.hasContextName(e)){const s=this.getContextObjectByName(e);if(s&&t in s)return s[t]}return[]}getDependencies(e,t){const s=this.getPropertyFromContext(e,t),r=new Set(s);return s.forEach((e=>{r.add(e)})),[...r]}}},"./src/cascade/manager.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./src/store/state/state-manager.ts"),a=s("./src/rules/rules-store.ts"),n=s("./src/utils/utils.ts"),o=s("./src/annotation/processor.ts"),i=s("./src/deferload/manager.ts"),c=s("./src/constants.ts");class l{constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,t,s,r,a,o="singleRecord"){if(!e||!s||!r?.length)return;const i=s.startsWith(".")?`${t}.${s.substring(1)}`:s,c=this.cascadeResetSubscribers[e]||{},l=this._handlePageReference(t,s,a);r.forEach((e=>{if(!e)return;let t=e.startsWith(".")?e.substring(1):e;if(t=n.default.getFullPropertyReference([l,t]),t in c){const e=c[t];e.find((e=>e.propertyName===i))||e.push({propertyName:i,mode:o})}else c[t]=[{propertyName:i,mode:o}]})),Object.keys(c).length>0&&(this.cascadeResetSubscribers[e]=c)}deregisterResetDependencies(e,t,s,r,a){if(!e||!s||!r?.length)return;const o=s.startsWith(".")?`${t}.${s.substring(1)}`:s,i=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(t,s,a);r.forEach((e=>{if(e){let t=e.startsWith(".")?e.substring(1):e;if(t=n.default.getFullPropertyReference([c,t]),t in i){const e=i[t];n.default.removeExistingDependentProperty(e,o)}}})),Object.keys(i).length>0&&(this.cascadeResetSubscribers[e]=i)}getResetDependencies(e,t){return this.cascadeResetSubscribers[e]?.[t]||[]}purgeResetDependencies(e){e&&this.cascadeResetSubscribers[e]&&delete this.cascadeResetSubscribers[e]}registerFields(e,t,s,a,n){this.cascadeSubscribers[e]=this.cascadeSubscribers[e]||{},s?.forEach((s=>{this.cascadeSubscribers[e][`${t}${s}`]=this.cascadeSubscribers[e][`${t}${s}`]||{};const o=this.cascadeSubscribers[e][`${t}${s}`];if(!o[n]){o[n]=a;const i=r.getValue(s,t,e);o.previousValue="object"==typeof i?null:i}}))}registerListField(e,t,s,r,a){const n=l._getFieldsForList(e,t,s);n.length>0&&(this.registerFields(e,t,n,r,a),i.default.enableCascade(e))}unRegisterListField(e,t,s,r){const a=l._getFieldsForList(e,t,s);a.length>0&&this.unRegisterFields(e,t,a,r)}static _getFieldsForList(e,t,s){const n=[],i=a.getPropertyMetadata(s,r.getValue("classID",t,e));return i&&i.datasource&&i.datasource.parameters&&Object.values(i.datasource.parameters).forEach((e=>{if(o.default.isProperty(e)){const t=o.default.trimAnnotation(e);n.push(t)}})),n}unRegisterFields(e,t,s,r){this.cascadeSubscribers[e]&&s?.forEach((s=>{if(!this.cascadeSubscribers[e][`${t}${s}`])return;const a=this.cascadeSubscribers[e][`${t}${s}`];a[r]&&delete a[r]}))}triggerCascade(e,t,s,r){let a=!1;this.cascadeSubscribers[e]&&this.cascadeSubscribers[e][t]&&(Object.keys(this.cascadeSubscribers[e][t]).forEach((n=>{const o=this.cascadeSubscribers[e][t];"previousValue"!==n&&o.previousValue!==s&&(a=!0,r?r.add(o[n]):o[n](t,s))})),a&&(this.cascadeSubscribers[e][t].previousValue=s))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,t=[],s=[]){if(!e)return;const a=new Set;s.forEach((t=>{const s=r.getValue(t,"",e);this.triggerCascade(e,t,s,a)})),a.forEach((e=>{e()})),0!==this.listChangeSubscribers.length&&0!==t.length&&t.forEach((t=>{this.listChangeSubscribers.forEach((s=>{const a=r.getValue(t,"",e);s(e,t,a)}))}))}_getServerProperties(e,t,s,a,n){if("object"!=typeof e){n.push(s.replace(/\.(\d+)/g,"[$1]"));const o=/[a-zA-Z]+\.(\d+)\./g;if(0===this.listChangeSubscribers.length||!o.test(s))return;s=s.replace(/\.(\d+)/g,"[$1]");const i=r.getValue(s,"",t);if(void 0===i&&!e&&0!==e)return;return void(i!==e&&a.push(s))}const o=Object.keys(e??{});for(let r=0,i=o.length;r<i;r+=1){const i=o[r],c=`${s}.${i}`;this._getServerProperties(e[i],t,c,a,n)}}getServerProperties(e,t,s=c.default.CASE_INFO.CASE_INFO_CONTENT){const r=[],a=[],o=n.default.getIn(e,s);return o&&t?(this._getServerProperties(o,t,s,r,a),{changedListProperty:r,leafProperty:a}):{changedListProperty:r,leafProperty:a}}_handlePageReference(e,t,s){let r=e;return"Page"===s&&t.startsWith(".")&&t.match(/[.]/g).length>1&&(r=`${e}${t.substring(0,t.lastIndexOf("."))}`),r}registerForListChanges(e=(()=>{})){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}}const u=new l},"./src/case-follower/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{addCaseFollower:()=>n,default:()=>c,deleteCaseFollower:()=>o,getCaseFollowers:()=>i});var r=s("./src/rest-client/index.ts");const a={"Content-Type":"application/json"},n=(e,t,s)=>{const n={caseID:e},o=JSON.stringify({users:t.map((e=>({ID:e})))});return(0,r.invokeRestApi)("addCaseFollower",{body:o,queryPayload:n,headers:a},s)},o=(e,t,s)=>{const a={caseID:e,followerID:t};return(0,r.invokeRestApi)("deleteCaseFollower",{queryPayload:a},s)},i=(e,t)=>{const s={caseID:e};return(0,r.invokeRestApi)("getCaseFollowers",{queryPayload:s},t).then((e=>e.data.followers))},c={addCaseFollower:n,deleteCaseFollower:o,getCaseFollowers:i}},"./src/case/apis.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("./src/actions/manager.ts"),a=s("./src/router/app-router.ts"),n=s("./src/service_broker/fetch.ts"),o=s("./src/store/state/actions/index.ts"),i=s("./src/container/container-utils.ts"),c=s("./src/store/state/state-manager.ts"),l=s("./src/constants.ts");const{RESOURCE_TYPES:u}=l.publicConstants,d=class{static openCase(e,t,s,a={}){const n={insKey:e,acTargetName:s,actionMgrID:r.ActionManagerInstance.getNextActionMgrId(),context:t,...a},i=o.OPEN_WORK_BY_HANDLE;a&&a.channelName&&(n.headers={},n.headers[l.default.X_ORIGIN_CHANNEL]=a.channelName);const{promise:u}=r.ActionManagerInstance.actionManagerPromise(i,n.actionMgrID);return c.dispatch({type:i,payload:n}),u}static openAssignment(e,t,s,a={}){const n={assignmentID:e,vcName:s,doDeleteCaseSummary:!0,actionMgrID:r.ActionManagerInstance.getNextActionMgrId(),context:t,...a},i=o.OPEN_ASSIGNMENT;a&&a.channelName&&(n.headers={},n.headers[l.default.X_ORIGIN_CHANNEL]=a.channelName);const{promise:u}=r.ActionManagerInstance.actionManagerPromise(i,n.actionMgrID);return c.dispatch({type:i,payload:{...n}}),u}static createCase(e,t,s,a={}){const n=o.CREATE_WORK,i={class:e,acTargetName:s,actionMgrID:r.ActionManagerInstance.getNextActionMgrId(),context:t,...a};a&&a.channelName&&(i.headers={},i.headers[l.default.X_ORIGIN_CHANNEL]=a.channelName);const{promise:u}=r.ActionManagerInstance.actionManagerPromise(n,i.actionMgrID);return c.dispatch({type:n,payload:{...i}}),u}static getNextWork(e,t,s={}){const a=o.OPEN_ASSIGNMENT,n={isGetNextWork:!0,vcName:t,doDeleteCaseSummary:!0,actionMgrID:r.ActionManagerInstance.getNextActionMgrId(),context:e,...s},{promise:i}=r.ActionManagerInstance.actionManagerPromise(a,n.actionMgrID);return c.dispatch({type:a,payload:{...n}}),i}static getOpenedCaseItems(e){const t=[],s=(0,i.getContainerData)(e);if(s){const{items:r={}}=s,a=Object.keys(r),n=(0,i.getActiveContainerItemName)(e);a.forEach((s=>{if(r[s]&&(r[s].resourceType===u.CASE||r[s].resourceType===u.ASSIGNMENT)){const{key:a="",context:o}=r[s],i=r[s],l=a.substring(a.indexOf(" ")+1),u=c.getValue(".caseTypeID","caseInfo",o),d=n===s;t.push({...i,key:a,workID:a,caseID:l,className:u,context:o,containerItemID:s,target:e,active:d})}}))}return t}static getCaseDetails=e=>{const t={caseID:e},{restApi:s,reqType:r}=(0,a.resolveRestApi)(o.ACTION_OPENWORKBYHANDLE,t);return(0,n.fetch)(s,{method:r})};static getCaseBulkActions=async e=>{const{restApi:t,reqType:s}=(0,a.resolveRestApi)(o.ACTION_GET_BULK_ACTIONS),r=e.map((e=>({ID:e}))),i=r.length,c=i/5,l={},u=[];for(let e=0;e<i;e+=c)l.cases=r.slice(e,e+c),l.cases.length&&u.push((0,n.fetch)(t,{method:s,body:l}));const d=await Promise.all(u);let p=[];for(let e=0;e<d.length;e+=1)0!==e?p.length&&(p=p.filter((t=>d[e].data.availableActions.some((e=>t.ID===e.ID))))):p=d[e].data.availableActions;return p}}},"./src/case/cancel-assignment/action-creator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{CANCEL_ASSIGNMENT:()=>r,cancelAssignmentAction:()=>a});const r="CANCEL_ASSIGNMENT",a=e=>({type:r,payload:e})},"./src/case/cancel-assignment/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o,executeCancelAssignmentRequest:()=>n});var r=s("./src/store/state/actions/index.ts"),a=s("./src/case/release-lock/async-request.ts");const n=(e,t)=>{const{isModalAction:s}=t;return(0,a.executeReleaseLockRequest)({routeKey:r.ACTION_CANCEL_ASSIGNMENT,isModalAction:s,...e})},o=n},"./src/case/cancel-assignment/helper.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{addActionToUpdateParentContextCaseViewMode:()=>c,getContainerName:()=>i});var r=s("./src/store/state/actions/action-creators.ts"),a=s("./src/container/container-utils.ts"),n=s("./src/utils/context-utils.ts"),o=s("./src/case/common-helper.ts");const i=e=>{const{isModalAction:t,containerItemID:s}=e;return t?a.CONTAINER_NAMES.MODAL:(0,o.getContainerNameFromContainerItemID)(s)},c=async(e,t)=>{const{childContainerItemID:s,caseViewMode:o}=t,i=(0,n.getParentContextName)(s),c={context:(0,a.getDataContextName)(i),data:{context_data:{caseViewMode:o}}};e.push(r.postProcess(r.mergeData,c))}},"./src/case/cancel-assignment/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{cancelAssignment:()=>I,default:()=>y});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./node_modules/rxjs/dist/esm5/internal/observable/empty.js"),i=s("./src/constants.ts"),c=s("./src/store/state/actions/index.ts"),l=s("./src/actions/manager.ts"),u=s("./src/store/state/actions/action-creators.ts"),d=s("./src/container/container-utils.ts"),p=s("./src/store/state/epics/util.ts"),f=s("./src/store/state/state-manager.ts"),h=s("./src/router/routing-manager.ts"),g=s("./src/case/common-helper.ts"),m=s("./src/case/remote-case.ts"),E=s("./src/case/cancel-assignment/action-creator.ts"),A=s("./src/case/cancel-assignment/async-request.ts"),_=s("./src/case/cancel-assignment/helper.ts");const I=e=>{let t=0,s=[];return e.pipe((0,r.ofType)(E.CANCEL_ASSIGNMENT),(0,a.map)((e=>(({actionMgrID:t}=e.payload),e.payload))),(0,n.mergeMap)((e=>{const{isModalAction:s}=e;e.context||(e.context=(0,d.getDataContextName)(e.containerItemID));const{context:r}=e,a=(0,_.getContainerName)(e),n=(0,h.getResolvedTargetName)(a,r),{continueExecution:i}=(0,p.getDirtyDetails)(n);return i?(e.RemoteSystemID=m.default.getRemoteHeaderByContext(e.context)??void 0,(0,A.executeCancelAssignmentRequest)(e,{isModalAction:s})):(l.ActionManagerInstance.rejectActionByID(t),(0,o.empty)())})),(0,n.mergeMap)((async e=>{if(e&&e.type===c.ERROR)return s.push((0,p.processDataToDispatchErrorAction)(e)),s;const{actionInPayload:r,response:a}=e,{containerItemID:n,isModalAction:o,isInCreateStage:l}=r,f=(0,d.getTargetFromContainerItemID)(n),h=(0,d.getDataContextName)(n),m={target:o?`${i.default.APP.APP}/${i.default.MODAL}`:f,containerItemID:n,caseViewMode:o?i.default.PERFORM_MODE:i.default.REVIEW_MODE,context:h,actionMgrID:t,key:(0,g.getCaseInfoID)(a),skipReleaseLockRequest:!1};return l&&s.push(u.postProcess(u.updateContainerItem,m)),!o&&(0,g.isParentAndChildContextHoldingSameItem)(n)&&(0,_.addActionToUpdateParentContextCaseViewMode)(s,{childContainerItemID:n,caseViewMode:i.default.REVIEW_MODE}),m.skipReleaseLockRequest=!0,s.push(u.postProcess(u.removeContainerItem,m)),s})),(0,a.map)((()=>(f.dispatch(s),(0,g.promiseHandler)(s,t),s=[],s))))},y=I},"./src/case/case-info.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("./src/constants.ts"),a=s("./src/router/app-router.ts"),n=s("./src/service_broker/fetch.ts"),o=s("./src/utils/case-utils.ts"),i=s("./src/container/container-utils.ts"),c=s("./src/store/state/actions/index.ts"),l=s("./src/utils/context-utils.ts"),u=s("./src/store/state/state-manager.ts");const d=class{constructor(e){this.c11nEnv=e}async getCaseStages(e,t){const s={caseID:e},{restApi:r,reqType:o}=(0,a.resolveRestApi)(c.GET_CASE_STAGES,s);return(await(0,n.fetch)(r,{method:o},t)).data.stages}getCaseTypeName(){return this.c11nEnv.getValue(r.default.CASE_INFO.CASE_TYPE_NAME)}getName(){return this.c11nEnv.getValue(r.default.CASE_INFO.CASE_INFO_NAME)}getClassName(){return this.c11nEnv.getValue(r.default.CASE_INFO.CASE_TYPE_ID)}getAvailableProcesses(){return this.c11nEnv.getValue(r.default.CASE_INFO.AVAILABLEPROCESSES)}getKey(){return this.c11nEnv.getValue(r.default.CASE_INFO.CASE_INFO_ID)}getID(){const e=this.getKey();if(e){const[,t]=e.split(" ");return t||e}}getAssignmentID(){return this.c11nEnv.getValue(r.default.CASE_INFO.ASSIGNMENT_ID)}getActions(){return this.c11nEnv.getValue(r.default.CASE_INFO.ACTION_BUTTONS)}getActiveFlowActionID(){return this.c11nEnv.getValue(r.default.CASE_INFO.ACTIVE_ACTION_ID)||this.c11nEnv.getValue(r.default.CASE_INFO.ASSIGNMENTACTION_ID)}getParentCaseInfo(){return this.c11nEnv.getValue(r.default.CASE_INFO.PARENTCASEINFO)}isPerform(){return this.c11nEnv.getValue(`${r.default.CONTEXT_DATA}${r.default.CASE_VIEW_MODE_PROP}`)===r.default.PERFORM_MODE}isReview(){return this.c11nEnv.getValue(`${r.default.CONTEXT_DATA}${r.default.CASE_VIEW_MODE_PROP}`)===r.default.REVIEW_MODE}isAssignmentInCreateStage(){const e=this.c11nEnv.getValue(r.default.CASE_INFO.CASE_INFO);return(0,o.isAssignmentInCreateStage)(e)}isLocalAction(){const e=this.c11nEnv.getValue(r.default.CASE_INFO.CASE_INFO);return(0,o.isLocalAction)(e)}getCurrentAssignmentViewName(){let e=null,t=!1;if(this.c11nEnv.getValue("context_data.caseViewMode")===r.default.PERFORM_MODE){if(this.isLocalAction())return e;if(this.isAssignmentInCreateStage())t=!0;else{const t=this.c11nEnv.getTarget(),s=this.c11nEnv.getContextName(),a=(0,i.getContainerItemData)(t,s),{config:n}=t&&s?a&&a.view:this.c11nEnv.getMetadata();e=n?.type===r.default.VIEW?n?.name:null}(e&&e.startsWith(r.default.PROPERTY_ANNOTATION)||t)&&(e=this.c11nEnv.getValue(r.default.CASE_INFO.VIEW_NAME))}return e}getActionRefreshConditions(){const e=this.c11nEnv.getValue(r.default.CASE_INFO.ACTIVE_ACTION_ID),t=(0,l.getParentContextName)(this.c11nEnv.getContextName());let s;t&&(s=(0,u.getDataObject)(t));const a=s?.caseInfo?.availableActions,n=(0,u.getDataObject)(this.c11nEnv.getContextName())?.caseInfo?.refreshConditions;if(e){if(a){const t=a.find((t=>t.ID===e));return t?t.refreshConditions:n}return n}return this.c11nEnv.getValue(r.default.CASE_INFO.ACTION_REFRESH_CONDITIONS)}getBusinessID(){return this.c11nEnv.getValue(r.default.CASE_INFO.BUSINESS_ID)}getAssignments(){return this.c11nEnv.getValue(r.default.CASE_INFO.CASE_INFO)?.assignments}getChildAssignments(){return this.c11nEnv.getValue(r.default.CASE_INFO.CASE_INFO)?.childCases?.[0]?.assignments}isCaseWideLocalAction=()=>{const e=this.c11nEnv.getValue(r.default.CASE_INFO.ACTIVE_ACTION_ID),t=this.c11nEnv.getValue(r.default.CASE_INFO.CASE_INFO_ACTIONS);return!(!t||!e)&&"Case"===t.find((t=>t.ID===e))?.type};getAllAssignments(){const e=this.c11nEnv.getValue(r.default.CASE_INFO.CASE_INFO_ACTIONS),t=this.c11nEnv.getValue(r.default.CASE_INFO.ASSIGNMENT_LABEL),s=this.c11nEnv.getValue(r.default.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)||[],a=this.getChildAssignments()||[];let n=JSON.parse(JSON.stringify(a));n=n.map((e=>(e.isChild=!0,e)));const o=[...s,...n];let i=JSON.parse(JSON.stringify(o));return e&&!this.isPerform()&&(i=i.map((e=>(e.name=this.getActiveCaseActionName()||e?.name||t,e)))),i}getActiveCaseActionName(){const e=this.c11nEnv.getValue(r.default.CASE_INFO.CASE_INFO_ACTIONS),t=this.c11nEnv.getValue(r.default.CASE_INFO.ACTIVE_ACTION_ID);return e.find((e=>e.ID===t))?.name||""}getFirstCaseActionName(){return this.c11nEnv.getValue(r.default.CASE_INFO.CASE_INFO_ACTIONS)[0]?.name||""}hasAssignments(){const e=this.c11nEnv.getValue(r.default.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),t=this.getChildAssignments();return!!(e||t||this.isCaseWideLocalAction())}hasMessages=()=>!!this.c11nEnv.getValue("caseMessages");hasGetNextWorkLinks(){return!!this.c11nEnv.getValue(r.default.CASE_INFO.GETNEXTWORK)}}},"./src/case/common-events.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{publishAssignmentOpenedEvent:()=>c,publishAssignmentSubmissionDoneEvent:()=>n,publishCaseAssignmentIDUpdateEvent:()=>u,publishCaseOpenedEvent:()=>i,publishCasePreviewEvent:()=>l,publishEndOfAssignmentProcessingEvent:()=>o});var r=s("./src/utils/pubsub-utils.ts"),a=s("./src/constants.ts");const n=e=>{r.default.publish(a.default.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,e)},o=e=>{r.default.publish(a.default.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,e)},i=e=>{r.default.publish(a.default.PUB_SUB_EVENTS.CASE_EVENTS.CASE_OPENED,e)},c=e=>{r.default.publish(a.default.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,e)},l=e=>{r.default.publish(a.default.PUB_SUB_EVENTS.CASE_EVENTS.CASE_PREVIEW,e)},u=e=>{r.default.publish(a.default.PUB_SUB_EVENTS.CASE_EVENTS.CURRENT_ASSIGNMENT_UPDATED,e)}},"./src/case/common-helper.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{DXAPI_RESPONSE_DATA_READ_PATHS:()=>m,addActionToLoadCaseSummaryView:()=>V,addActionToRemoveContainerItem:()=>M,canLaunchCaseInModal:()=>k,deferCaseSummaryViewUpdate:()=>G,getCaseClassName:()=>R,getCaseFirstAssignmentID:()=>P,getCaseFirstFlowActionID:()=>x,getCaseInfo:()=>T,getCaseInfoID:()=>D,getContainerName:()=>E,getContainerNameFromContainerItemID:()=>A,getDisplayCaseID:()=>v,getNextAssignmentInfoID:()=>C,hasAssignments:()=>N,hasErrorActionType:()=>b,isActivateContainerItemActionType:()=>y,isCoexistenceCase:()=>F,isErrorActionType:()=>S,isModalContainer:()=>I,isNextStepInCreateStage:()=>O,isParentAndChildContextHoldingSameItem:()=>w,isWorkAreaContainer:()=>_,promiseHandler:()=>U,setLastRefreshTimeProperty:()=>L,updateKeyAndFlowName:()=>j});var r=s("./src/actions/targetmap.ts"),a=s("./src/constants.ts"),n=s("./src/container/container-utils.ts"),o=s("./src/store/state/actions/action-creators.ts"),i=s("./src/utils/context-utils.ts"),c=s("./src/environment-info/index.ts"),l=s("./src/utils/utils.ts"),u=s("./src/utils/case-utils.ts"),d=s("./src/store/state/actions/index.ts"),p=s("./src/store/state/state-manager.ts"),f=s("./src/actions/manager.ts"),h=s("./src/rules/rules-store.ts"),g=s("./src/case/common-events.ts");const m={CASE_INFO:`${a.default.DATA}.${a.default.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${a.default.DATA}.${a.default.CASE_INFO.CASE_TYPE_ID}`,NEXT_ASSIGNMENT_INFO_ID:`${a.default.DATA}.${a.default.NEXT_ASSIGNMENT_INFO_ID}`,ASSIGNMENTS:`${a.default.DATA}.${a.default.CASE_INFO.ASSIGNMENTS}`,CASE_INFO_ID:`${a.default.DATA}.${a.default.CASE_INFO.CASE_INFO_ID}`,CASE_FIRST_FLOW_ACTION_NAME:`${a.default.DATA}.${a.default.CASE_INFO.ASSIGNMENTACTION_ID}`,CASE_FIRST_ASSIGNMENT_ID:`${a.default.DATA}.${a.default.CASE_INFO.ASSIGNMENT_ID}`},E=(e,t)=>{const{vcName:s,containerName:a}=t;return a||s||r.default.getTargetViewContainerName(e)},A=e=>{const t=e.lastIndexOf(a.default.FORWARD_SLASH_STRING)+1,s=e.lastIndexOf(a.default.UNDERSCORE_STRING);return e.substring(t,s)},_=e=>e===n.CONTAINER_NAMES.WORKAREA,I=e=>e===n.CONTAINER_NAMES.MODAL,y=e=>e===d.ACTIVATE_CONTAINER_ITEM,C=e=>l.default.getIn(e,m.NEXT_ASSIGNMENT_INFO_ID,a.default.EMPTY_STRING),S=e=>e===d.ERROR,b=e=>e&&e.find((e=>e.type===d.ERROR)),T=e=>l.default.getIn(e,m.CASE_INFO,{}),N=e=>{const t=l.default.getIn(e,m.ASSIGNMENTS,[]);return t&&t.length>0},v=e=>e?e.split(" ").pop():void 0,R=e=>l.default.getIn(e,m.CASE_CLASS_NAME,a.default.EMPTY_STRING),O=e=>{const t=T(e);return(0,u.isAssignmentInCreateStage)(t)&&(0,u.didOperatorHasAssignment)(c.default.getOperatorIdentifier(),t)},D=e=>l.default.getIn(e,m.CASE_INFO_ID,a.default.EMPTY_STRING),x=e=>l.default.getIn(e,m.CASE_FIRST_FLOW_ACTION_NAME,a.default.EMPTY_STRING),P=e=>l.default.getIn(e,m.CASE_FIRST_ASSIGNMENT_ID,a.default.EMPTY_STRING),M=(e,t)=>{const{removeActionPayload:s,target:r}=t;if(s&&s.containerItemID){const{containerItemID:t,context:a}=s;e.push(o.postProcess(o.removeContainerItem,{containerItemID:t,context:a||(0,n.getDataContextName)(t),target:r}))}},w=e=>{const t=p.getStore();if(!e)return!1;const s=(0,i.getParentContextName)(e),r=(0,n.getTargetFromContainerItemID)(s),a=(0,n.getTargetFromContainerItemID)(e);if(!r||!a)return!1;const o=(0,n.getContainerItemData)(r,s),c=(0,n.getContainerItemData)(a,e);if(!o||!c)return!1;const{key:l}=o||{};let{key:u}=c||{};return u||(u=t?.getState().data?.[e]?.caseInfo?.ID),l&&u&&l===u},j=(e,t,s={})=>{const{skipFlowNameUpdate:r}=s,a=D(t);l.default.setIn(e,"key",a);const n=(0,u.isAssignmentInCreateStage)(T(t));if(!r&&N(t)){const s=P(t),[,r]=s.split("!");(0,g.publishCaseAssignmentIDUpdateEvent)({assignmentID:s,isInCreateStage:n}),l.default.setIn(e,"flowName",r)}},L=(e,t)=>{const{attachmentsExist:s}=t;s&&l.default.setIn(e,a.publicConstants.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),l.default.setIn(e,a.publicConstants.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())},U=(e,t,s)=>{let r=a.default.PROMISE_VALUE.RESOLVE;return b(e)?(r=a.default.PROMISE_VALUE.REJECT,s?f.ActionManagerInstance.rejectActionByID(t,!0,s):f.ActionManagerInstance.rejectActionByID(t)):f.ActionManagerInstance.resolveActionByID(t),r},F=e=>"true"===c.default.getCaseTypeList().filter((t=>t.pyWorkTypeImplementationClassName===e))?.[0]?.pyIsTraditionalUICase,k=()=>"true"===c.default?.environmentInfoObject?.pxMashupDetails?.pyLaunchCaseInModal,V=(e,t,s)=>{const{containerItemID:r,caseID:c}=t;if(r){const{caseClassName:l}=s,u=(0,i.getParentContextName)(r),d=(0,n.getTargetFromContainerItemID)(u),p=d&&(0,n.getContainerData)(d),f=d&&(0,n.getActiveContainerItemName)(d),h=(0,i.getTargetFromContext)(u);f&&p?.items?.[f]?.key===t?.caseID&&e.push(o.postProcess(o.loadView,{containerItemID:u,context:u,container:h,containerName:h,caseId:c,viewName:a.publicConstants.CASESUMMARY_VIEW_NAME,updateData:!0,viewLoadingContainer:{context:u},caseClassName:l}))}},G=(e,t)=>{const s=R(e?.response),r=T(e?.response),{caseTypeID:n}=r,o=c.default.getFeatureMap();(o?.deferUpdateCaseSummaryView??!Object.hasOwn(o,a.default.DEFER_UPDATE_CASESUMMARY_VIEW))&&n&&(0,h.isViewExists)(a.default.CASESUMMARY_VIEW_NAME,n)&&V(t,e?.actionInPayload,{caseClassName:s})}},"./src/case/create-work/action-creator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{CREATE_WORK:()=>r,createWorkAction:()=>a});const r="CREATE_WORK",a=e=>({type:r,payload:e})},"./src/case/create-work/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u,executeCreateWorkRequest:()=>l});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./src/store/state/epics/util.ts"),o=s("./src/utils/rxjs-utils.ts"),i=s("./src/rest-client/case-apis.ts"),c=s("./src/environment-info/index.ts");const l=(e,t)=>{const{class:s,context:l,viewType:u=n.SCOPE_TYPES.PAGE}=e,{removeActionPayload:d}=t;let p=e?.pageName?e?.pageName:c.default.getDefaultCasePage();return e.isTraditionalUICase&&(p="pyDetails"),(0,r.from)(i.default.createCase(s,{...e,pageName:p,viewType:u,context:l})).pipe((0,a.map)((({response:t,headers:s})=>({response:t,actionInPayload:e,headers:s,removeActionPayload:d}))),(0,o.logAndCatchError)("Error occurred during ajax call at createWork Epic : ",l))},u={executeCreateWorkRequest:l}},"./src/case/create-work/events.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i,publishCreateStageDoneEvent:()=>o,publishDisplayCreatedCaseToasterEvent:()=>n});var r=s("./src/utils/pubsub-utils.ts"),a=s("./src/constants.ts");const n=e=>{r.default.publish(a.default.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,e)},o=e=>{r.default.publish(a.default.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)},i={publishDisplayCreatedCaseToasterEvent:n,publishCreateStageDoneEvent:o}},"./src/case/create-work/helper.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{STATE_PATHS:()=>d,evaluateDirtyBeforeDxApiCall:()=>f,getCaseViewMode:()=>m,getContainerName:()=>p,isInCreateStage:()=>h,setDirectUrlUpdation:()=>g});var r=s("./src/actions/targetmap.ts"),a=s("./src/store/state/actions/index.ts"),n=s("./src/container/container-utils.ts"),o=s("./src/store/state/epics/util.ts"),i=s("./src/constants.ts"),c=s("./src/utils/utils.ts"),l=s("./src/environment-info/index.ts"),u=s("./src/utils/case-utils.ts");const d={NEXT_ASSIGNMENT_ID:"data.nextAssignmentInfo.ID",FIRST_ASSIGNMENT_ID:"data.caseInfo.assignments.0.ID",NEXT_ASSIGNMENT_INFO:"nextAssignmentInfo",NEXT_ASSIGNMENT_INFO_CONTEXT:"nextAssignmentInfo.context"},p=e=>{const{containerName:t,isInCreateStage:s}=e;return s?i.default.MODAL:t||r.default.getTargetViewContainerName(a.ACTION_CREATEWORK)},f=e=>(0,n.isContainerSingleMode)(e)?{continueExecution:!0,removeActionPayload:{}}:(0,o.getDirtyDetails)(e),h=e=>{const t=c.default.getIn(e,[i.default.DATA,i.default.CASE_INFO.CASE_INFO]);return(0,u.isAssignmentInCreateStage)(t)&&(0,u.didOperatorHasAssignment)(l.default.getOperatorIdentifier(),t)},g=(e,t)=>{const s=h(e),{skipBrowserSemanticUrlUpdate:r=!1,isTraditionalUICase:a}=t;c.default.setIn(e,["directUrlUpdation"],(!s||a)&&!r)},m=e=>e.confirmationNote?i.default.REVIEW_MODE:i.default.PERFORM_MODE},"./src/case/create-work/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>N});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/empty.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),i=s("./src/actions/manager.ts"),c=s("./src/constants.ts"),l=s("./src/router/routing-manager.ts"),u=s("./src/utils/dxapi-response-translator.ts"),d=s("./src/utils/rxjs-utils.ts"),p=s("./src/utils/utils.ts"),f=s("./src/store/state/actions/index.ts"),h=s("./src/container/container-utils.ts"),g=s("./src/store/state/epics/util.ts"),m=s("./src/case/common-helper.ts"),E=s("./src/router/app-router.ts"),A=s("./src/environment-info/index.ts"),_=s("./src/locale/locale-utils.ts"),I=s("./src/utils/broadcast-utils.ts"),y=s("./src/utils/case-utils.ts"),C=s("./src/case/create-work/helper.ts"),S=s("./src/case/create-work/async-request.ts"),b=s("./src/case/create-work/action-creator.ts"),T=s("./src/case/create-work/events.ts");const N=e=>{let t=0,s=[],N="",v=!1;return e.pipe((0,r.ofType)(b.CREATE_WORK),(0,d.throttleUntilChanged)(100),(0,n.map)((e=>(({actionMgrID:t}=e.payload),e.payload))),(0,o.mergeMap)((e=>{const{context:s}=e,r=(0,C.getContainerName)(e),n=(0,l.getResolvedTargetName)(r,s),{continueExecution:o,removeActionPayload:c}=(0,C.evaluateDirtyBeforeDxApiCall)(n);return v=(0,m.isCoexistenceCase)(e.class),o?(e.isTraditionalUICase=v,(0,S.executeCreateWorkRequest)(e,{removeActionPayload:c})):(i.ActionManagerInstance.rejectActionByID(t),(0,a.empty)())})),(0,o.mergeMap)((async e=>{if(e&&e.type===f.ERROR)return e.payload.context=(0,h.getRootContainerName)(),s.push((0,g.processDataToDispatchErrorAction)(e)),s;const{actionInPayload:r,response:n,headers:o,removeActionPayload:d}=e;let I;I=!(r.renderInline||A.default.getDefaultCasePage()||v)&&(0,C.isInCreateStage)(n),p.default.setIn(n.data,"caseInfo.isFirstAssignment",!0);const y=(0,C.getContainerName)({...r,isInCreateStage:I}),S=(0,l.getResolvedTargetName)(y,r.context),b=(0,g.getContext)(S,y,r.context);if(!(0,m.isModalContainer)(y)&&(0,h.isContainerSingleMode)(S)){const{continueExecution:e}=(0,g.getDirtyDetails)(S);if(!e)return i.ActionManagerInstance.rejectActionByID(t),(0,a.empty)()}if(!(r?.openCaseViewAfterCreate??1)&&!I){const e=p.default.getIn(n.data,"caseInfo.content");N=`${e.pyID} ${_.localeUtils.getLocaleValue("has been created.","Assignment")}`;const t=(0,m.getCaseFirstAssignmentID)(n),r=(0,m.getCaseClassName)(n);return(0,T.publishDisplayCreatedCaseToasterEvent)({toastMessage:N}),(0,T.publishCreateStageDoneEvent)({caseId:`${e.pyID}`,assignmentId:t,caseType:r}),s}const R=(0,u.getTranslatedDXAPIResponse)(n);let O=(0,E.getSemanticURL)("createWork",{caseClassName:(0,m.getCaseClassName)(R)});O=O.replace(/{.+?}/,String((0,m.getDisplayCaseID)((0,m.getCaseInfoID)(R)))),R.semanticURL=O,(0,C.setDirectUrlUpdation)(R,r);const D={acName:S,context:b};await(0,g.processViewResponse)(R,r,D);const x={target:S,context:b,containerItemID:b,headers:o,semanticURL:O,isInCreateStage:I,isMinimizable:I,caseViewMode:(0,C.getCaseViewMode)(R),assignmentContext:p.default.getIn(R,C.STATE_PATHS.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:p.default.getIn(R,C.STATE_PATHS.NEXT_ASSIGNMENT_INFO),resourceType:c.publicConstants.CASE,openCaseViewAfterCreate:r.openCaseViewAfterCreate,modalOptions:r.modalOptions,debugInfo:r.debugInfo};(0,m.updateKeyAndFlowName)(x,R);const P=(0,g.getActionPayload)(R,x);v&&(P.data.caseInfo.content.coexistenceAction="openAssignment");const M=(0,g.getActionBasedOnContainerMode)(S,P);return(0,g.isAddContainerAction)(M)&&(0,m.addActionToRemoveContainerItem)(s,{removeActionPayload:d,target:S}),s.push(M),(0,g.addPreviewResetAction)(s),s})),(0,n.map)((()=>{const e=(0,m.canLaunchCaseInModal)(),r=(0,y.isAssignmentInCreateStage)(p.default.getIn(s[0]?.payload,"data.caseInfo"));return v&&e&&r?I.default.postCreateCaseMessage(s[0]?.payload?.nextAssignmentInfo?.ID,g.dispatchCorrectActionIfChildOrRemote,s):(0,g.dispatchCorrectActionIfChildOrRemote)(s),(0,m.promiseHandler)(s,t),N="",s=[],s})))}},"./src/case/delete-case-in-create-stage/action-creator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{DELETE_CASE_IN_CREATE_STAGE:()=>r,deleteCaseInCreateStageAction:()=>a});const r="DELETE_CASE_IN_CREATE_STAGE",a=e=>({type:r,payload:e})},"./src/case/delete-case-in-create-stage/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d,executeDeleteCaseInCreateStageRequest:()=>u});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./src/router/app-router.ts"),o=s("./src/service_broker/fetch.ts"),i=s("./src/store/state/actions/index.ts"),c=s("./src/store/state/epics/util.ts"),l=s("./src/utils/rxjs-utils.ts");const u=e=>{const{caseID:t,context:s}=e,{restApi:u,reqType:d}=(0,n.resolveRestApi)(i.ACTION_DELETE_CASE_IN_CREATESTAGE,{ID:t});return(0,r.from)((0,o.fetch)(u,{method:d},s)).pipe((0,a.map)((t=>({response:t.data,actionInPayload:e,headers:(0,c.processHeaders)(t.headers)}))),(0,l.logAndCatchError)(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",s))},d={executeDeleteCaseInCreateStageRequest:u}},"./src/case/delete-case-in-create-stage/events.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o,publishCreateStageDeletedEvent:()=>n});var r=s("./src/utils/pubsub-utils.ts"),a=s("./src/constants.ts");const n=e=>{r.default.publish(a.default.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,e)},o={publishCreateStageDeletedEvent:n}},"./src/case/delete-case-in-create-stage/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>_});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),i=s("./src/router/routing-manager.ts"),c=s("./src/utils/case-utils.ts"),l=s("./src/store/state/actions/action-creators.ts"),u=s("./src/store/state/state-manager.ts"),d=s("./src/store/state/epics/util.ts"),p=s("./src/case/common-helper.ts"),f=s("./src/container/container-utils.ts"),h=s("./src/constants.ts"),g=s("./src/store/state/actions/index.ts"),m=s("./src/case/delete-case-in-create-stage/action-creator.ts"),E=s("./src/case/delete-case-in-create-stage/async-request.ts"),A=s("./src/case/delete-case-in-create-stage/events.ts");const _=(e,t)=>{let s,_=0,I=[];return e.pipe((0,r.ofType)(m.DELETE_CASE_IN_CREATE_STAGE),(0,a.map)((e=>(({actionMgrID:_,caseType:s}=e.payload),e.payload))),(0,n.mergeMap)((e=>e.ignoreCaseDeletion?(0,o.of)({actionInPayload:e}):(0,E.executeDeleteCaseInCreateStageRequest)(e))),(0,n.mergeMap)((async e=>{if(e&&(0,p.isErrorActionType)(e.type)){const{payload:t}=e,s=(0,d.processDataToDispatchErrorAction)({...e,...t,actionMgrID:_});return I.push(s),I}const{actionInPayload:s}=e,{context:r,isModalAction:a}=s,n=a?f.CONTAINER_NAMES.MODAL:f.CONTAINER_NAMES.PRIMARY,o=(0,i.getResolvedTargetName)(n,r);if(!a&&o){const e={acName:o,target:o,context:r},a=t.value.containers[o],{semanticURL:n}=(0,c.getLastActiveItem)(a);await(0,d.processViewResponse)({directUrlUpdation:!0,semanticURL:n},s,e)}if(s.isProcessAction&&s.parentCaseInfo){const e={insKey:s.parentCaseInfo.ID,className:s.parentCaseInfo.content.classID,context:s.parentContext,acTargetName:h.default.PRIMARY,isChild:!0},t={type:g.OPEN_WORK_BY_HANDLE,payload:{...e}};I.push(t)}const u={target:o,containerItemID:r,context:r,caseDeleted:!0};return I.push(l.postProcess(l.removeContainerItem,u)),I})),(0,a.map)((()=>(u.dispatch(I),(0,p.promiseHandler)(I,_)===h.default.PROMISE_VALUE.RESOLVE&&(0,A.publishCreateStageDeletedEvent)({caseType:s}),I=[],I))))}},"./src/case/finish-assignment/action-creator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{FINISH_ASSIGNMENT:()=>r,finishAssignmentAction:()=>a});const r="FINISH_ASSIGNMENT",a=e=>({type:r,payload:e})},"./src/case/finish-assignment/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g,executeFinishAssignmentRequest:()=>h});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./src/router/app-router.ts"),o=s("./src/service_broker/fetch.ts"),i=s("./src/store/state/epics/util.ts"),c=s("./src/utils/rxjs-utils.ts"),l=s("./src/constants.ts"),u=s("./src/environment-info/index.ts"),d=s("./src/utils/performance-utils.ts"),p=s("./src/utils/case-utils.ts"),f=s("./src/case/finish-assignment/helper.ts");const h=(e,t)=>{const{assignmentID:s,actionID:h,caseID:g,context:m,additionalHeaders:E={},isCaseWideAction:A,outcome:_,jsActionQueryParams:I}=e,{state$:y}=t,C=(0,f.getViewTypeForFinishAssignment)(e),S=(0,f.getActionNameForDxApiCall)(e),b={assignmentID:s,actionID:h,caseID:g,viewType:C};let{restApi:T}=(0,n.resolveRestApi)(S,b),{reqType:N}=(0,n.resolveRestApi)(S,b);C&&!T?.includes("viewType=")&&(T=T?.includes("?")?`${T}&viewType=${C}`:`${T}?viewType=${C}`),_&&!T?.includes("outcome")&&(T=T?.includes("?")?`${T}&outcome=${_}`:`${T}?outcome=${_}`),T=(0,p.appendJSActionQueryParams)(I,T),A&&(N="PATCH"),e.viewType=C;const{content:v,attachmentsExist:R}=(0,i.getSubmitData)(m);e.attachmentsExist=R;const O=y.value.data[m]?.caseInfo?.headers||{},{etag:D}=O,x={"if-match":D,...E};let P={};return u.default.getPerformanceDashboardVisibility()&&(P=d.default.getActionInfo(l.default.TOP_ACTION_LABEL.FINISHASSIGNMENT)),(0,r.from)((0,o.fetch)(T,{method:N,body:v,headers:x},m,P)).pipe((0,a.map)((t=>{const{data:s,headers:r}=t;return{response:s,actionInPayload:e,headers:(0,i.processHeaders)({...x,...r})}})),(0,c.logAndCatchError)("Error occurred during ajax call at finishAssignment Epic : ",m))},g=h},"./src/case/finish-assignment/events.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{publishCreateStageDoneEvent:()=>n,publishExpressLocalActionSubmitEvent:()=>o});var r=s("./src/utils/pubsub-utils.ts"),a=s("./src/constants.ts");const n=e=>{r.default.publish(a.default.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)},o=e=>{r.default.publish(a.default.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,e)}},"./src/case/finish-assignment/helper.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{addActionToActivateModalContainerItem:()=>N,addActionToMergeResponseDataToParentContext:()=>x,addActionToRefreshCasePreviewView:()=>D,addActionToRemoveCurrentModalContainerItem:()=>v,addActionsForFinishAssignmentLaunchedFromModal:()=>W,addActionsForFinishAssignmentOfNonCreateStages:()=>H,addActionsForLocalActionLaunchedFromPrimary:()=>V,addRemoveTransientItemAction:()=>M,canOpenCaseView:()=>R,canPerformCurrentAssignment:()=>Y,canUpdateAssignmentData:()=>G,createPayloadForOpenWorkByHandle:()=>w,createPayloadForRefreshAssignment:()=>k,createToastMessage:()=>U,getActionNameForDxApiCall:()=>T,getContainerIdByCaseId:()=>F,getPayloadForEndOfAssignmentProcessingEvent:()=>P,getViewTypeForFinishAssignment:()=>b,isModalLaunchedFromPreview:()=>j,isModalLaunchedFromPrimary:()=>L,mergeAdditionalButtonsOnError:()=>z,mutateErroneousFields:()=>K,processFinishAssignmentForCreateStage:()=>$,processFinishAssignmentWithOpenAssignment:()=>B,processLastAssignmentInCreateStageModal:()=>O,publishEventsForLocalActionFromPreviewView:()=>q});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/empty.js"),a=s("./src/container/container-utils.ts"),n=s("./src/store/state/epics/util.ts"),o=s("./src/store/state/actions/index.ts"),i=s("./src/store/state/actions/action-creators.ts"),c=s("./src/refresh/action-creator.ts"),l=s("./src/context/context-processor.ts"),u=s("./src/utils/utils.ts"),d=s("./src/constants.ts"),p=s("./src/router/routing-manager.ts"),f=s("./src/store/state/state-manager.ts"),h=s("./src/case/common-helper.ts"),g=s("./src/utils/context-utils.ts"),m=s("./src/actions/manager.ts"),E=s("./src/service_broker/header-processor.ts"),A=s("./src/case/common-events.ts"),_=s("./src/contextree/treemanager.ts"),I=s("./src/messages/index.ts"),y=s("./src/case/utils.ts"),C=s("./src/case/finish-assignment/events.ts");const{RESOURCE_TYPES:S}=d.publicConstants,b=e=>{const{isModalAction:t,viewType:s,isInCreateStage:r,isCaseWideAction:a}=e;return t&&r&&!a?n.SCOPE_TYPES.PAGE:s||n.SCOPE_TYPES.FORM},T=e=>{const{isCaseWideAction:t}=e;return t?o.ACTION_OPEN_CASE_WIDE_LOCAL_ACTION:o.ACTION_FINISHASSIGNMENT},N=(e,t)=>{const{containerItemID:s,context:r,actionMgrID:a,isInCreateStage:n,isModalAction:o}=t;if(n&&o){const t=(0,h.getContainerNameFromContainerItemID)(s),n=(0,p.getResolvedTargetName)(t,r);e.push(i.postProcess(i.activateContainerItem,{containerItemID:s,target:n,actionMgrID:a}))}},v=(e,t)=>{const{containerItemID:s,skipReleaseLockRequest:r}=t,n=(0,a.getDataContextName)(s),o=`${n?.includes("root")?d.default.APP.ROOT:d.default.APP.APP}/${a.CONTAINER_NAMES.MODAL}`;e.push(i.postProcess(i.removeContainerItem,{containerItemID:s,context:n,target:o,skipReleaseLockRequest:r}))},R=e=>f.getValue(".openCaseViewAfterCreate",d.default.CONTEXT_DATA,e)??!0,O=async(e,{translatedDXAPIResponse:t,actionInPayload:s},o)=>{const{caseID:c}=s,l=(0,h.getNextAssignmentInfoID)(t),u=(0,h.getCaseClassName)(t),{caseViewMode:p,headers:g,semanticURL:A,actionMgrID:_,directUrlUpdation:I,key:y,flowName:S,resourceType:b}=o;(0,C.publishCreateStageDoneEvent)({caseId:c,assignmentId:l,caseType:u}),v(e,{...s,skipReleaseLockRequest:!0});const T=`${s?.containerItemID.includes("root")?d.default.APP.ROOT:d.default.APP.APP}/${a.CONTAINER_NAMES.PRIMARY}`,N=(0,n.getContext)(T,a.CONTAINER_NAMES.PRIMARY),O=E.default.getCoreHeadersFromContext(s.context)||!1,D=(0,n.getActionPayload)(t,{target:T,context:N,containerItemID:N,caseViewMode:p,headers:g,semanticURL:A,key:y,flowName:S,resourceType:b,directUrlUpdation:I,debugInfo:O&&O.debugInfo&&{debugId:O.debugInfo[d.default.COREHEADER_APP_DEBUG_ID]}});if((0,a.isContainerSingleMode)(T)){const t=f.getDataObject(N),a=(0,h.getCaseInfoID)({data:t}),[,c]=a?a.split(" "):[],l=`You will lose unsaved changes for ${c}. Do you want to continue?`;if(!R(s.context))return e;{const{continueExecution:t}=(0,n.getDirtyDetails)(T,{dirtyMessage:l});if(!t)return o.directUrlUpdation=!1,m.ActionManagerInstance.rejectActionByID(_),(0,r.empty)();e.push(i.postProcess(i.replaceContainerItem,D))}}else e.push(i.postProcess(i.addContainerItem,D));return t.directUrlUpdation=I,t.semanticURL=A,await(0,n.processViewResponse)(t,{...D,acName:T},{acName:T,context:N}),e},D=(e,t,s)=>{const{containerItemID:r,caseID:n}=t;if(r&&/^app\/preview_[0-9]*/g.test(r)){const{caseClassName:t}=s,o=(0,g.getParentContextName)(r),c=(0,a.getDataContextName)(o);e.push(i.postProcess(i.loadView,{containerItemID:o,context:c,container:a.CONTAINER_NAMES.PREVIEW,containerName:a.CONTAINER_NAMES.PREVIEW,caseId:n,viewName:d.publicConstants.PREVIEW_VIEW_NAME,caseClassName:t,updateData:!0}))}},x=(e,t,{data:s,caseViewMode:r})=>{const{containerItemID:n}=t,c=(0,a.getDataContextName)(n);if(c&&(0,h.isParentAndChildContextHoldingSameItem)(n)){const t=(0,g.getParentContext)(c),a={data:s,caseViewMode:r,context:t};u.default.setIn(a.data,["context_data","caseViewMode"],r),e.push({type:o.DELETE_CASE_SUMMARY,payload:{context:t}});const l=y.default.getPropertiesToReplace(n);e.push(i.postProcess(i.mergeData,a,{propertiesToReplace:l}))}},P=(e,t)=>{const{isCaseWideAction:s,assignmentID:r,actionID:a}=t;return{isCaseWideAction:s,caseID:(0,h.getCaseInfoID)(e),assignmentID:s?null:r,actionID:s?a:null}},M=(e,{isModalAction:t,target:s,transientItemID:r})=>{if(t){const t=e.find((({type:e})=>e===o.REPLACE_CONTAINER_ITEM));t?.payload&&(s=t.payload.target,r=t.payload.containerItemID)}const a=i.removeAllTransientItems({target:s,containerItemID:r});a.payload.transientItems.length&&e.push(a)},w=(e,t,s)=>{if(t.isProcessAction&&(v(s,{...t,skipReleaseLockRequest:!0}),e)){const r=`${t?.containerItemID.includes("root")?d.default.APP.ROOT:d.default.APP.APP}/${a.CONTAINER_NAMES.PRIMARY}`,i=(0,n.getContext)(r,a.CONTAINER_NAMES.PRIMARY),c={insKey:e.ID,className:e.content.classID,context:i,acTargetName:d.default.PRIMARY,isChild:!0},l={type:o.OPEN_WORK_BY_HANDLE,payload:{...c}};s.push(l)}},j=e=>/^app\/preview_[0-9]*/g.test(e),L=(e,t)=>{const s=(0,g.getParentContextName)(e);return!j(e)&&(s===t||/^app\/primary_[0-9]*/g.test(s))},U=e=>{if(!R(e.context)){let t;const s=e?.caseTypeID,r=e?.caseTypeName;return t=e.businessID?e.businessID:e.workID,{caseID:t,caseTypeID:s,caseTypeName:r}}return{}},F=(e,t)=>{const s=(0,a.getTargetFromContainerItemID)(e);return(0,a.getContainerItemName)(s,t)},k=(e,t=!1,s=!1)=>{const r=m.ActionManagerInstance.getNextActionMgrId();return{ID:l.default.getPropertyValue(d.publicConstants.CASE_INFO.ASSIGNMENT_ID,"",e),actionID:l.default.getPropertyValue(d.publicConstants.CASE_INFO.ASSIGNMENTACTION_ID,"",e),context:e,caseWideAction:t,contextData:s,options:{actionMgrID:r}}},V=async(e,t,s,r,l,p,m,E,A)=>{const{headers:_}=A;if(e){const I=(0,a.isContainerSingleMode)((0,a.getTargetFromContainerItemID)(e));let y=!1;const C=(0,a.getTargetFromContainerItemID)(s),S=(0,a.getContainerData)(C),b=(0,a.getActiveContainerItemName)(C);b&&S?.items?.[b]?.key===A?.actionInPayload?.caseID&&(y=!0),v(l,{...r,skipReleaseLockRequest:!0});const T=(0,h.getContainerNameFromContainerItemID)(e),N={target:(0,a.getTargetFromContainerItemID)(e),containerItemID:e,context:e,containerName:T};t.doDeleteCaseSummary=r.doDeleteCaseSummary;const R=(0,g.getParentContext)(s),O=f.getDataObject(R),D=f.getDataObject(r.context),x=O?.caseInfo?.ID,P=D?.caseInfo?.ID;if(I&&x===P||!I&&""===m)l.push(i.postProcess(i.updateContainerItem,{...t,key:m,resourceType:"",...N}));else if(p){const o=(0,a.getTargetFromContainerItemID)(e),c=(0,a.getContainerItemName)(o,m);if(c)N.target=o,N.context=c,N.containerItemID=c,l.push(i.postProcess(i.updateContainerItem,{...t,key:m,resourceType:"",...N}));else{const e=(0,a.getChildContainers)(s)[0];if(r.target=e,r.context=(0,n.getContext)(e,d.default.WORKAREA,s),r?.context){r.containerItemID=r.context,l.push(i.postProcess(i.addContainerItem,{...r,...t}));const s=r.containerItemID;l.push(i.postProcess(i.activateContainerItem,{parentContainerTarget:e,containerItemID:s}))}}}if(r.target=(0,a.getTargetFromContainerItemID)(e),r.containerName=(0,h.getContainerNameFromContainerItemID)(e),r.context=e,r.containerItemID=e,u.default.setIn(t,"acName",N.target),await(0,n.processViewResponse)(E,t),y){const{data:e,caseViewMode:r}=t;s.includes(d.default.WORKAREA)&&(0,h.isParentAndChildContextHoldingSameItem)(s)&&(s=(0,g.getParentContext)(s));const a={data:e,caseViewMode:r,context:s};u.default.setIn(a.data,["context_data","caseViewMode"],r),l.push({type:o.DELETE_CASE_SUMMARY,payload:{context:s}}),l.push(i.postProcess(i.mergeData,a))}if(!p&&t.caseViewMode===d.default.PERFORM_MODE){const t=F(e,m),s={data:{caseInfo:{headers:_}},context:t};l.push(i.postProcess(i.mergeData,s)),l.push((0,c.refreshData)(k(t)))}}else{v(l,r);let e=!1;const c=(0,a.getTargetFromContainerItemID)(s),f=(0,a.getContainerData)(c),h=(0,a.getActiveContainerItemName)(c);if(h&&f?.items?.[h]?.key===A?.actionInPayload?.caseID&&(e=!0),p){const e=(0,a.getChildContainers)(s)[0];r.target=e,r.context=(0,n.getContext)(e,d.default.WORKAREA,s),r.containerItemID=r.context,l.push(i.postProcess(i.addContainerItem,{...r,...t}));const o=r.containerItemID;l.push(i.postProcess(i.activateContainerItem,{parentContainerTarget:e,containerItemID:o}))}if(e){const{data:e,caseViewMode:r}=t,a={data:e,caseViewMode:r,context:s};u.default.setIn(a.data,["context_data","caseViewMode"],r),l.push({type:o.DELETE_CASE_SUMMARY,payload:{context:s}}),l.push(i.postProcess(i.mergeData,a))}}},G=(e,t,s,r,n)=>{let o;const i=(0,a.getTargetFromContainerItemID)(t);return o=(0,a.isContainerMultipleMode)(i)?(0,a.getContainerItemName)(i,s.data?.caseInfo?.ID):(0,a.getActiveContainerItemName)(i),r&&e&&f.getContextValue(null,d.default.CASE_VIEW_MODE_PROP,o)===d.default.PERFORM_MODE&&n},$=async(e,t,s,r,n)=>{w(e.data.caseInfo.parentCaseInfo,t,n);const o=e?.data?.caseInfo?.parentCaseInfo?.ID;if(o){const s=(0,a.getTargetFromContainerItemID)(t?.context),r=(0,a.getContainerItemData)(s,t?.context)?.parentContext,n=(0,a.getTargetFromContainerItemID)(r);t?.isProcessAction&&(0,a.isContainerItemExists)(n,o)&&(0,a.updateParentLastUpdateTime)(r,e?.data?.caseInfo?.lastUpdateTime)}s.resourceType=S.CASE,s.directUrlUpdation=!0,t.isProcessAction||await O(n,{translatedDXAPIResponse:r,actionInPayload:t},s)},B=async(e,t,s)=>{const r={assignmentID:e?.data?.caseInfo?.assignments[0]?.ID,className:e?.data?.caseInfo?.content?.classID,containerName:a.CONTAINER_NAMES.PRIMARY,targetContainerName:a.CONTAINER_NAMES.PRIMARY,viewType:n.SCOPE_TYPES.PAGE,isLastStepInCreateStage:!0,context:s},i={type:o.OPEN_ASSIGNMENT,payload:{...r}};t.push(i)},H=async(e,t,s,r,a)=>{e.doDeleteCaseSummary=t.doDeleteCaseSummary,e.caseViewMode===d.default.REVIEW_MODE&&(e.flowName=" ",e.clearView=!0);const{containerItemID:o}=t,c=y.default.getPropertiesToReplace(o);a.push(i.postProcess(i.updateContainerItem,{...e,...r,propertiesToReplace:c})),u.default.setIn(e,"acName",r.target),await(0,n.processViewResponse)(s,e),x(a,t,e)},W=async(e,t,s,r,n,o,i,c)=>{const{isCaseWideAction:l,isInCreateStage:u,containerItemID:d}=e,p=(0,g.getParentContextName)(e.context),f=(0,h.isNextStepInCreateStage)(n),m=(0,h.getCaseClassName)(n),E=u&&!f&&!l,A=(0,a.getChildContainers)(p)[0],_=A?(0,a.getActiveContainerItemName)(A):p,I=(0,h.getContainerNameFromContainerItemID)(d),y=(0,a.getDataContextName)(d),C=Object.freeze({target:e.target,containerItemID:d,context:y,containerName:I});E&&!j(e.context)?await $(c,e,t,n,o):L(e.context,_)?await V(_,t,p,e,o,s,r,n,i):l&&!L(e.context,_)?(v(o,e),D(o,e,{caseClassName:m})):await H(t,e,n,C,o)},q=(e,t,s)=>{const{isModalAction:r,isCaseWideAction:a,caseID:n}=t,o=L(t.context,s),i=e?.data?.caseInfo?.stages||[],c=e?.data?.caseInfo?.stageID;(0,A.publishAssignmentSubmissionDoneEvent)({caseID:n,isModalAction:r,isModalLaunchedFromPrimaryValue:o,isCaseWideAction:a,stages:i,stageID:c})},Y=(e,t)=>{const{assignmentID:s}=t;return e?.data?.caseInfo?.assignments?.some((e=>e.ID===s&&"true"===e?.canPerform))},K=e=>{const t=e?.payload?.err?.errorDetails,s=e?.payload?.context;t?.forEach((e=>{e[d.default.ERROR_FIELD_IN_PAGE]=e[d.default.ERROR_FIELD_IN_PAGE].replace(/(\(\d\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`));const t=e[d.default.ERROR_FIELD_IN_PAGE].slice(1),r=e[d.default.ERROR_IN_PAGE_IDENTIFIER].slice(1);if(r){let a=t?`caseInfo.content.${t}`:"caseInfo.content";a=a.replace(/\(/g,"[").replace(/\)/g,"]");const n=(0,I.getMessagesPath)(r,a,d.default.PROPERTY),o={type:d.publicConstants.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue};_.default.mutateField(s,a,n[n.length-1],{messages:[o],type:d.publicConstants.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:n[n.length-1]})}}))},z=e=>{const t=e?.payload?.err?.response?.data?.displayButtonsOnErrors||[],s=e?.payload?.err?.response?.status;if(t&&424===s){Array.isArray(t)&&t.length>0&&t.forEach((e=>{e.isErrorButton=!0}));const s=e.payload.context,r=((e,t)=>(e.forEach((e=>{!0!==e.isErrorButton||t.some((t=>t.actionID===e.actionID))||(t=[...t,e])})),t))(t,f.getDataObject(s)?.caseInfo?.actionButtons?.secondary||[]),n={data:{caseInfo:{actionButtons:{secondary:r}}},target:(0,a.getTargetFromContainerItemID)(s),context:s};f.dispatch({type:o.MERGE_DATA,payload:n})}}},"./src/case/finish-assignment/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>x,finishAssignment:()=>D});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/switchMap.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),i=s("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),c=s("./src/store/state/epics/util.ts"),l=s("./src/utils/dxapi-response-translator.ts"),u=s("./src/store/state/state-manager.ts"),d=s("./src/store/state/actions/index.ts"),p=s("./src/constants.ts"),f=s("./src/utils/utils.ts"),h=s("./src/actions/manager.ts"),g=s("./src/actions/sequencer.ts"),m=s("./src/case/common-helper.ts"),E=s("./src/case/common-events.ts"),A=s("./src/router/app-router.ts"),_=s("./src/container/container-utils.ts"),I=s("./src/utils/context-utils.ts"),y=s("./src/environment-info/index.ts"),C=s("./src/utils/form-handler.ts"),S=s("./src/messages/index.ts"),b=s("./src/data-view/index.ts"),T=s("./src/case/finish-assignment/action-creator.ts"),N=s("./src/case/finish-assignment/async-request.ts"),v=s("./src/case/finish-assignment/helper.ts"),R=s("./src/case/finish-assignment/events.ts");const{RESOURCE_TYPES:O}=p.publicConstants,D=(e,t)=>{let s=0,D=[],x={},P="";return e.pipe((0,r.ofType)(T.FINISH_ASSIGNMENT),(0,a.switchMap)((e=>{const r=y.default.isCoexistenceAppOfType(p.default.APP_TYPE.UIKIT);if(({actionMgrID:s}=e.payload),P=e.payload.context,(0,S.clearMessages)({context:P,stateObj:u.getDataObject(P),clearContextMessages:!0}),!(0,C.isFormValid)(P)){const t={type:p.publicConstants.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return h.ActionManagerInstance.rejectActionByID(s,!0,t),g.default.handleDeferredActionCompletion(e.payload.context),(0,i.of)([])}return(0,i.of)(e.payload).pipe((0,n.mergeMap)((e=>{(0,v.addActionToActivateModalContainerItem)(D,e);const s={...e};return(0,N.executeFinishAssignmentRequest)(s,{state$:t})})),(0,n.mergeMap)((async e=>{if(e&&e.type===d.ERROR){(0,v.mergeAdditionalButtonsOnError)(e);const t=(0,c.processDataToDispatchErrorAction)(e);return D.push(t),D}b.default.clearContextedCache(P);const{headers:t,actionInPayload:a,response:n}=e,{containerItemID:o,context:i=(0,_.getDataContextName)(o),isModalAction:h,isInCreateStage:C}=a,S=(0,_.getTargetFromContainerItemID)(o);a.target=S;const T=(0,m.getContainerNameFromContainerItemID)(o),N=Object.freeze({target:a.target,containerItemID:o,context:i,containerName:T});f.default.setIn(n.data,"caseInfo.isFirstAssignment",!1),f.default.setIn(n.data,p.default.CASE_INFO_IS_LOCAL_ACTION,!1),n?.uiResources?.root?.config?.name&&"page"!==a.viewType&&f.default.setIn(n.data,"caseInfo.content.pyViewName",n?.uiResources?.root?.config?.name),(0,R.publishExpressLocalActionSubmitEvent)({submitResponse:n});let M=(0,l.getTranslatedDXAPIResponse)(n,{[p.publicConstants.STOPMERGEACTIONS]:!n.nextAssignmentInfo});const w=(0,m.getCaseClassName)(M),j=(0,I.getParentContextName)(a.context),L=(0,_.getChildContainers)(j)[0]?(0,_.getActiveContainerItemName)((0,_.getChildContainers)(j)[0]):j,U=(0,m.isNextStepInCreateStage)(M),F=C&&!U;!h||C||(0,v.isModalLaunchedFromPrimary)(a.context,L)||(M=(0,c.mergeCurrentModalContentToTarget)(M,u.getDataObject(o)));const k=(0,c.getActionPayload)(M,{headers:t,actionMgrID:s,directUrlUpdation:!1});let V,G;(0,m.setLastRefreshTimeProperty)(k.data,a),k.caseClassName=w,k.resourceType=O.ASSIGNMENT,k.headers=t;const $=M?.data?.caseInfo?.assignments?.some((e=>e.ID===a.assignmentID)),B=(0,v.canPerformCurrentAssignment)(M,a),H=(0,v.canUpdateAssignmentData)($,L,M,h,B),W=a?.actionID===p.publicConstants.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT;M?.data?.nextAssignmentInfo&&!W?(k.caseViewMode=p.default.PERFORM_MODE,V=(0,m.getCaseInfoID)(M),G=!0):H&&!W?(k.caseViewMode=p.default.PERFORM_MODE,V=(0,m.getCaseInfoID)(M),k.flowName=" ",k.deleteAssignmentSpecificResources=!1,G=!1):(k.caseViewMode=p.default.REVIEW_MODE,V="",G=!1);const q=(0,m.getCaseInfoID)(M);(0,m.updateKeyAndFlowName)(k,M,{skipFlowNameUpdate:k?.caseViewMode===p.default.REVIEW_MODE||H});const Y=(0,A.getSemanticURL)("createWork",{caseClassName:w}).replace(/{.+?}/,String((0,m.getDisplayCaseID)(q)));if(M.semanticURL=Y,k.semanticURL=Y,h?(await(0,v.addActionsForFinishAssignmentLaunchedFromModal)(a,k,G,V,M,D,e,n),F&&(x=(0,v.createToastMessage)(a))):C&&r&&!U?(y.default.setDefaultCasePage("pyDetails"),await(0,v.processFinishAssignmentWithOpenAssignment)(n,D,(0,I.getParentContextName)(i))):await(0,v.addActionsForFinishAssignmentOfNonCreateStages)(k,a,M,N,D),(0,m.deferCaseSummaryViewUpdate)(e,D),g.default.handleDeferredActionCompletion(P),(0,v.publishEventsForLocalActionFromPreviewView)(k,a,L),!M?.data?.nextAssignmentInfo){const e=(0,v.getPayloadForEndOfAssignmentProcessingEvent)(M,a);(0,E.publishEndOfAssignmentProcessingEvent)({...e,containerItemID:o})}return(0,v.addRemoveTransientItemAction)(D,{transientItemID:o,target:S,isModalAction:h}),D})),(0,o.map)((()=>{const e=D.find((e=>e.type===d.ERROR));return e?(g.default.handleDeferredActionCompletion(P),(0,v.mutateErroneousFields)(e),h.ActionManagerInstance.rejectActionByID(s)):h.ActionManagerInstance.resolveActionByID(s,x),(0,c.dispatchCorrectActionIfChildOrRemote)(D),D=[],x={},D})))})))},x=D},"./src/case/get-descendants/action-creator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{GET_DESCENDANTS:()=>r,getDescendantsAction:()=>a});const r="GET_DESCENDANTS",a=e=>({type:r,payload:e})},"./src/case/get-descendants/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g,executeGetDescendantsRequest:()=>h});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./src/utils/rxjs-utils.ts"),o=s("./src/router/app-router.ts"),i=s("./src/service_broker/fetch.ts"),c=s("./src/store/state/actions/index.ts"),l=s("./src/store/state/epics/util.ts"),u=s("./src/service_broker/header-processor.ts"),d=s("./src/environment-info/index.ts"),p=s("./src/constants.ts"),f=s("./src/utils/performance-utils.ts");const h=e=>{const{caseID:t,headers:s,debugInfo:h,context:g}=e,m=(0,o.resolveRestApi)(c.ACTION_GETDESCENDANTS,{caseID:t}),{restApi:E}=m,{reqType:A}=m;let _={};return d.default.getPerformanceDashboardVisibility()&&(_=f.default.getActionInfo(p.default.TOP_ACTION_LABEL.GETDESCENDANTS)),(0,r.from)((0,i.fetch)(E,{method:A,headers:{...s,...h&&{...u.default.addDebugHeaders(h)}}},g,_)).pipe((0,a.map)((t=>({actionInPayload:e,response:t.data,headers:(0,l.processHeaders)({...s,...t.headers})}))),(0,n.logAndCatchError)("Error ocurred during ajax call at getDescendants Epic : ",g))},g=h},"./src/case/get-descendants/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h,getDescendants:()=>f});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./src/store/state/state-manager.ts"),i=s("./src/store/state/epics/util.ts"),c=s("./src/store/state/actions/action-creators.ts"),l=s("./src/utils/utils.ts"),u=s("./src/case/common-helper.ts"),d=s("./src/case/get-descendants/async-request.ts"),p=s("./src/case/get-descendants/action-creator.ts");const f=e=>{let t=0,s=[];return e.pipe((0,r.ofType)(p.GET_DESCENDANTS),(0,a.map)((e=>(({actionMgrID:t}=e.payload),e.payload))),(0,n.mergeMap)((e=>(0,d.executeGetDescendantsRequest)(e))),(0,n.mergeMap)((async e=>{if(e&&(0,u.isErrorActionType)(e.type))return s.push((0,i.processDataToDispatchErrorAction)(e)),s;const{actionInPayload:t,response:r}=e,a={};l.default.setIn(a,"caseInfo.childCases",r?.childCases);const n={data:a,context:t?.context};return s.push((0,c.postProcess)(c.mergeData,n)),s})),(0,a.map)((()=>((0,o.dispatch)(s),(0,u.promiseHandler)(s,t),s=[],s))))},h=f},"./src/case/miscellaneous-actions.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{activateModalContainerItem:()=>g,showCreateStageCancelAlert:()=>h});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/interval.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/debounce.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),i=s("./src/actions/manager.ts"),c=s("./src/constants.ts"),l=s("./src/router/routing-manager.ts"),u=s("./src/utils/pubsub-utils.ts"),d=s("./src/store/state/actions/index.ts"),p=s("./src/store/state/actions/action-creators.ts"),f=s("./src/store/state/state-manager.ts");const h=e=>e.pipe((0,r.ofType)(d.SHOW_CANCEL_ALERT),(0,n.debounce)((()=>(0,a.interval)(100))),(0,o.map)((e=>{const{actionMgrID:t,isChildCase:s,isModalAction:r,isProcessAction:a,isDataObject:n,skipReleaseLockRequest:o,isInCreateStage:l}=e.payload;return i.ActionManagerInstance.resolveActionByID(t),u.default.publish(c.default.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:r,hideDelete:!a&&s,isDataObject:n,skipReleaseLockRequest:o,isInCreateStage:l}),[]}))),g=e=>e.pipe((0,r.ofType)(d.ACTIVATE_MODAL_CONTAINER_ITEM),(0,n.debounce)((()=>(0,a.interval)(100))),(0,o.map)((e=>{const{actionMgrID:t,context:s,containerName:r,containerItemID:a}=e.payload,n=(0,l.getResolvedTargetName)(r,s);return i.ActionManagerInstance.resolveActionByID(t),f.dispatch(p.postProcess(p.activateContainerItem,{containerItemID:a,target:n,doDeleteCaseSummary:!1})),[]})))},"./src/case/navigate-to-step/action-creator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{NAVIGATE_TO_STEP:()=>r,navigateToStepAction:()=>a});const r="NAVIGATE_TO_STEP",a=e=>({type:r,payload:e})},"./src/case/navigate-to-step/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p,executeNavigateToStepRequest:()=>d});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./src/router/app-router.ts"),o=s("./src/service_broker/fetch.ts"),i=s("./src/store/state/actions/index.ts"),c=s("./src/container/container-utils.ts"),l=s("./src/store/state/epics/util.ts"),u=s("./src/utils/rxjs-utils.ts");const d=(e,t)=>{const{ID:s,stepID:d,containerItemID:p,context:f=(0,c.getDataContextName)(p),isInCreateStage:h}=e,{state$:g}=t,m={ID:s,stepID:d,viewType:h?l.SCOPE_TYPES.PAGE:l.SCOPE_TYPES.FORM},{restApi:E,reqType:A}=(0,n.resolveRestApi)(i.ACTION_NAVIGATE_TO_STEP,m),{content:_}=(0,l.getSubmitData)(f),I=g.value.data[f].caseInfo.headers;return(0,r.from)((0,o.fetch)(`${E}`,{method:A,body:_,headers:{"if-match":I&&I.etag}},f)).pipe((0,a.map)((t=>({response:t.data,actionInPayload:e,headers:(0,l.processHeaders)({...I,...t.headers})}))),(0,u.logAndCatchError)("Error occurred during ajax call at navigateToStep Epic : ",f))},p=d},"./src/case/navigate-to-step/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>S,navigateToStep:()=>C});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/switchMap.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),i=s("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),c=s("./src/store/state/state-manager.ts"),l=s("./src/store/state/actions/action-creators.ts"),u=s("./src/store/state/epics/util.ts"),d=s("./src/utils/dxapi-response-translator.ts"),p=s("./src/case/common-helper.ts"),f=s("./src/case/common-events.ts"),h=s("./src/container/container-utils.ts"),g=s("./src/constants.ts"),m=s("./src/messages/index.ts"),E=s("./src/data-view/index.ts"),A=s("./src/utils/utils.ts"),_=s("./src/case/navigate-to-step/action-creator.ts"),I=s("./src/case/navigate-to-step/async-request.ts");const{RESOURCE_TYPES:y}=g.publicConstants,C=(e,t)=>{let s=0,g=[];return e.pipe((0,r.ofType)(_.NAVIGATE_TO_STEP),(0,a.switchMap)((e=>(({actionMgrID:s}=e.payload),(0,i.of)(e.payload).pipe((0,n.mergeMap)((e=>((0,m.clearContextMessagesInActiveWorkArea)(e.context),(0,I.executeNavigateToStepRequest)(e,{state$:t})))),(0,n.mergeMap)((async e=>{if(e&&(0,p.isErrorActionType)(e.type))return g.push((0,u.processDataToDispatchErrorAction)(e)),g;const{actionInPayload:t,response:s,headers:r}=e,{containerItemID:a,context:n=(0,h.getDataContextName)(a),isModalAction:o}=t;E.default.clearContextedCache(t.context);const i=(0,h.getTargetFromContainerItemID)(a),c=(0,p.getContainerNameFromContainerItemID)(a),m=Object.freeze({target:i,containerItemID:a,context:n,containerName:c}),_=s?.data?.caseInfo?.content,I=s?.uiResources?.root?.config?.name;_&&!_.pyViewName&&I&&"page"!==t.viewType&&A.default.setIn(_,"pyViewName",I);const C=(0,d.getTranslatedDXAPIResponse)(s),S={acName:i,...m};await(0,u.processViewResponse)(C,t,S);const b=(0,u.getActionPayload)(C,{...m,headers:r});b.doDeleteCaseSummary=t.doDeleteCaseSummary,b.resourceType=y.ASSIGNMENT,(0,p.updateKeyAndFlowName)(b,C),(0,p.setLastRefreshTimeProperty)(b.data,t);const T=C.data?.caseInfo?.stages,N=C.data?.caseInfo?.stageID;return(0,f.publishAssignmentSubmissionDoneEvent)({caseID:(0,p.getCaseInfoID)(C),isModalAction:o,stages:T,stageID:N}),(0,p.isParentAndChildContextHoldingSameItem)(a)&&(0,u.addActionsToParentContext)(b,g),g.push(l.postProcess(l.updateContainerItem,b)),(0,u.addPreviewResetAction)(g),g})),(0,o.map)((()=>(c.dispatch(g),(0,p.promiseHandler)(g,s),g=[],g))))))))},S=C},"./src/case/open-action-helper.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{executeOpenActionRequest:()=>R,getRouteKey:()=>v,postProcessOpenActionRequest:()=>D,processOpenActionRequest:()=>O});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/empty.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),i=s("./node_modules/rxjs/dist/esm5/internal/operators/tap.js"),c=s("./src/service_broker/fetch.ts"),l=s("./src/router/app-router.ts"),u=s("./src/utils/rxjs-utils.ts"),d=s("./src/store/state/epics/util.ts"),p=s("./src/store/state/actions/index.ts"),f=s("./src/actions/manager.ts"),h=s("./src/store/state/state-manager.ts"),g=s("./src/router/routing-manager.ts"),m=s("./src/utils/context-utils.ts"),E=s("./src/constants.ts"),A=s("./src/utils/dxapi-response-translator.ts"),_=s("./src/store/state/actions/action-creators.ts"),I=s("./src/container/container-utils.ts"),y=s("./src/store/state/middlewares/property-change-middleware.ts"),C=s("./src/case/common-helper.ts"),S=s("./src/case/save-and-close/action-creator.ts"),b=s("./src/case/open-local-action/helper.ts");const{LOCAL_ACTION_TYPE:T}=E.default,{RESOURCE_TYPES:N}=E.publicConstants,v=e=>{const t=e.localActionType.toLowerCase();return t===T.CASE_WIDE||t===T.EXPRESS?p.ACTION_OPEN_CASE_WIDE_LOCAL_ACTION:p.ACTION_OPEN_LOCAL_ACTION},R=(e,t)=>{const{actionID:s,assignmentID:a,caseID:o,context:i,openActionType:f,modalLoadingContainer:h}=e,{isProcessAction:g}=t,m=g?p.ACTION_OPEN_PROCESS_ACTION:v(e),A=d.SCOPE_TYPES.FORM,{reqType:_}=(0,l.resolveRestApi)(m,{caseID:o,ID:a,actionID:s,viewType:A});let{restApi:I}=(0,l.resolveRestApi)(m,{caseID:o,ID:a,actionID:s,viewType:A});e.actionType=m===p.ACTION_OPEN_CASE_WIDE_LOCAL_ACTION?E.default.CASE:E.default.ASSIGNMENT,I&&!I.includes("viewType=")&&(I=I.includes("?")?`${I}&viewType=${A}`:`${I}?viewType=${A}`);const y=h?.context??i;return(0,r.from)((0,c.fetch)(I,{method:_,headers:{}},y)).pipe((0,n.map)((t=>({response:t.data,actionInPayload:e,headers:(0,d.processHeaders)(t.headers)}))),(0,u.logAndCatchError)(`: Error occurred during ajax call at ${f} Epic : `,y))},O=(e,t)=>{const{isProcessAction:s}=t,c=s?p.ACTION_OPEN_PROCESS_ACTION:p.ACTION_OPEN_LOCAL_ACTION;let l;if(e.openActionType=c,"modal"===(0,C.getContainerName)(c,e)){l=(0,I.getChildContainers)(e.contextName)[0]?(0,I.getChildContainers)(e.contextName):(0,I.getTargetFromContainerItemID)(e.contextName);const s=l?(0,I.getActiveContainerItemName)(l):e.contextName,c=(0,I.getDataContextName)(s),u=(0,C.getContainerName)(e.openActionType,e),p=(0,g.getResolvedTargetName)(u,e.context),A=(0,m.buildModalContext)(e.context,(0,m.buildContextName)(u,e.context));if((0,h.dispatch)(_.addContainerItem({target:p,context:A,containerItemID:A,key:e.caseID,caseViewMode:E.default.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:"caseInfo.content",type:"view"}},data:{key:e.caseID,caseInfo:{ID:e.caseID}}})),(0,h.dispatch)(_.setLoading({context:A})),e.modalLoadingContainer={target:p,context:A},!(0,I.getChildContainers)(e.contextName)[0])return R(e,t);if(!e.continueExecution)return R(e,t);if(!(0,y.isContextDirty)(c))return R(e,t);e.saveActionPayload.modalLoadingContainer=e.modalLoadingContainer,e.saveActionPayload.canUpdateAvailableActions=!e.saveActionPayload.isModalAction;const T=(0,S.saveAndCloseAction)(e.saveActionPayload);return(0,r.from)([T]).pipe((0,o.mergeMap)((e=>(0,b.saveAssignment)(e))),(0,o.mergeMap)((s=>{if(1===s.length&&(0,C.isErrorActionType)(s[0].type)){const{continueExecution:s}=(0,d.getDirtyDetails)(l);if(!s)return f.ActionManagerInstance.rejectActionByID(e.actionMgrID),a.EMPTY.pipe((0,i.tap)((()=>(0,a.empty)()))).toPromise();if(s)return R(e,t)}return R(e,t)})),(0,n.map)((e=>e)))}return R(e,t)},D=async(e,t,{headers:s,actionInPayload:r})=>{const{context:a,actionName:n,openActionType:o,doDeleteCaseSummary:i,modalLoadingContainer:c}=r,l=(0,A.getTranslatedDXAPIResponse)(e),u=(0,C.getContainerName)(o,r),f=c?.target??(0,g.getResolvedTargetName)(u,a);let h,y,S=!1;!(0,I.hasContainerItems)(f)||(0,I.isContainerMultipleMode)(f)&&!(0,I.isContainerItemExists)(f,e.data.caseInfo.ID)?(y=(0,m.buildContextName)(u,a),(0,C.isModalContainer)(u)&&(y=(0,m.buildModalContext)(a,y)),h=y,S=!0):(h=(0,I.isContainerMultipleMode)(f)?(0,I.getContainerItemName)(f,e.data.caseInfo.ID):(0,I.getActiveContainerItemName)(f),y=(0,I.getDataContextName)(h));const b={acName:f,target:f,containerName:u,context:y};await(0,d.processViewResponse)(l,r,b);const T=l.uiResources?.root;let v;v=T?E.default.PERFORM_MODE:E.default.REVIEW_MODE;const R=(0,d.getActionPayload)(l,{target:f,context:y,containerItemID:h,caseViewMode:v,doDeleteCaseSummary:i,headers:s,actionName:n,isMinimizable:!1,isInCreateStage:(0,C.isModalContainer)(u),resourceType:N.ASSIGNMENT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,assignmentID:r.assignmentID,actionType:r.actionType});T&&(0,C.updateKeyAndFlowName)(R,l),(0,C.isModalContainer)(u)&&delete R.doDeleteCaseSummary,r.openActionType===p.ACTION_OPEN_BULK_ACTION&&(R.isBulkAction=!0,R.data.caseInfo.actionButtons.main[0].jsAction="submitBulkAction",R.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",R.data.caseInfo.cases=r.selectedList);const O=S?_.addContainerItem:_.updateContainerItem;if(t.push(_.postProcess(O,R)),S||t.push(_.postProcess(_.resetLoading,R)),S){const a=(0,I.getChildContainers)(r.contextName),n=(0,I.getContainerItemName)(a,e.data.caseInfo.ID);if(n){const e={data:{caseInfo:{headers:s}},context:n};t.push(_.postProcess(_.mergeData,e))}}return h!==(0,I.getActiveContainerItemName)(f)&&t.push(_.postProcess(_.activateContainerItem,{target:f,containerItemID:h})),(0,C.isParentAndChildContextHoldingSameItem)(h)&&!c?.context&&(0,d.addActionsToParentContext)(R,t),R.caseViewMode===E.default.REVIEW_MODE&&t.push(_.postProcess(_.removeContainerItem,R)),t}},"./src/case/open-assignment/action-creator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{OPEN_ASSIGNMENT:()=>r,openAssignmentAction:()=>a});const r="OPEN_ASSIGNMENT",a=e=>({type:r,payload:e})},"./src/case/open-assignment/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>I,executeOpenAssignmentRequest:()=>_});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),i=s("./src/utils/rxjs-utils.ts"),c=s("./src/router/app-router.ts"),l=s("./src/service_broker/fetch.ts"),u=s("./src/store/state/actions/index.ts"),d=s("./src/store/state/epics/util.ts"),p=s("./src/service_broker/header-processor.ts"),f=s("./src/utils/case-utils.ts"),h=s("./src/constants.ts"),g=s("./src/environment-info/index.ts"),m=s("./src/utils/performance-utils.ts"),E=s("./src/case/open-assignment/helper.ts");const A=({restUrl:e,reqType:t,requestHeaders:s,debugInfo:r,context:a,isGetNextWork:n,doNotMergeMessagesForStatusCode:o,assignmentID:i})=>{let c={};return g.default.getPerformanceDashboardVisibility()&&(c=m.default.getActionInfo(h.default.TOP_ACTION_LABEL.OPENASSIGNMENT,i)),(0,l.fetch)(e,{method:t,headers:{"if-match":s&&s.etag,...s,...r&&{...p.default.addDebugHeaders(r)}}},a,{doNotMergeHttpMessagesForStatusCode:n?o:"",...c})},_=(e,t)=>{const s=(0,E.getViewType)(e),{headers:l,context:p,assignmentID:m,isGetNextWork:_,debugInfo:I,isOpenStage:y,stageID:C,caseID:S,jsActionQueryParams:b,isLastStepInCreateStage:T}=e,{restApi:N,reqType:v}=_?(0,c.resolveRestApi)(u.ACTION_GETNEXTWORK,{viewType:s}):y?(0,c.resolveRestApi)(u.ACTION_OPENSTAGE,{caseID:S,stageID:C}):(0,c.resolveRestApi)(u.ACTION_OPENASSIGNMENT,{assignmentID:m,viewType:s}),{removeActionPayload:R}=t,O=g.default.getDefaultCasePage();let D="",x=e.pageName;e.isTraditionalUICase&&(x="pyDetails"),D=O?`${N}?viewType=${s}&pageName=${O}`:x?`${N}?viewType=${s}&pageName=${x}`:`${N}?viewType=${s}`,b&&Object.keys(b).forEach((e=>{D+=`&${e}=${b[e]}`}));const P=(0,E.addRemoteHeadersIfRequired)(e);return(0,r.from)(A({restUrl:D,reqType:v,requestHeaders:P,debugInfo:I,context:p,isGetNextWork:_,doNotMergeMessagesForStatusCode:"404",assignmentID:m})).pipe((0,n.map)((e=>g.default.isCoexistenceAppOfType(h.default.APP_TYPE.UIKIT)&&!T?(0,f.isAssignmentInCreateStage)(e.data.data.caseInfo)?e:(D=D.replaceAll(x,"pyDetails"),g.default.setDefaultCasePage("pyDetails"),{isReloadWithDifferentViewTypeRequired:!0,restUrl:D}):e)),(0,o.mergeMap)((e=>e?.isReloadWithDifferentViewTypeRequired?A({restUrl:D,reqType:v,requestHeaders:P,debugInfo:I,context:p,isGetNextWork:_,doNotMergeMessagesForStatusCode:"404",assignmentID:m}):(0,a.of)(e))),(0,n.map)((t=>{const{key:r,flowName:a}=(0,d.getKeyAndFlowName)(m);return{response:{...t.data,key:r,flowName:a},actionInPayload:e,viewType:s,removeActionPayload:R,headers:(0,d.processHeaders)({...l,...t.headers})}})),(0,i.logAndCatchError)("Error occurred during ajax call at openAssignment Epic : ",p))},I=_},"./src/case/open-assignment/helper.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{addActionToActivateContainerItem:()=>g,addRemoteHeadersIfRequired:()=>E,getContainerNameForCaseStage:()=>h,getViewType:()=>f,processAppropriateContainerItem:()=>A,setDirectUrlUpdation:()=>m,setIsFirstAssignmentForCoexistence:()=>_});var r=s("./src/constants.ts"),a=s("./src/store/state/epics/util.ts"),n=s("./src/store/state/actions/index.ts"),o=s("./src/store/state/actions/action-creators.ts"),i=s("./src/utils/case-utils.ts"),c=s("./src/case/common-helper.ts"),l=s("./src/container/container-utils.ts"),u=s("./src/router/app-router.ts"),d=s("./src/environment-info/index.ts");const{RESOURCE_TYPES:p}=r.publicConstants,f=(e,t=[])=>{const{viewType:s,containerName:r,targetContainerName:n,isChild:o}=e,l=(0,c.getCaseInfo)(t);return(0,i.isAssignmentInManualStage)(l)&&e?.stageID===l.stageID?a.SCOPE_TYPES.PAGE:s||(!(0,c.isWorkAreaContainer)(r)&&!(0,c.isWorkAreaContainer)(n)||o?a.SCOPE_TYPES.PAGE:a.SCOPE_TYPES.FORM)},h=(e,t)=>{const s=(0,c.getCaseInfo)(e);let a;a=!d.default.getDefaultCasePage()&&(0,i.isAssignmentInCreateStage)(s);const{isChild:o,containerName:l}=t,u=o&&a,p=a&&!t.isActionFromToDoList;return u||p?r.default.MODAL:l||(0,c.getContainerName)(n.ACTION_OPENASSIGNMENT,t)},g=async(e,t,s)=>{const{semanticURL:r,containerItemID:n,isParallelAssignment:i,insKey:c}=t,{target:u,actionInPayload:d}=s,{skipBrowserSemanticUrlUpdate:f=!1}=d,h=(0,l.getDataContextName)(n);await(0,a.processViewResponse)({directUrlUpdation:!f,semanticURL:r},d,{acName:u,target:u,context:h}),e.push(o.postProcess(o.activateContainerItem,{containerItemID:n,target:u,isParallelAssignment:i,insKey:c,resourceType:p.CASE,context:h,doDeleteCaseSummary:d.doDeleteCaseSummary}))},m=(e,t)=>{const s=(0,c.getCaseInfo)(e),r=(0,c.getCaseInfoID)(e),o=(0,i.isAssignmentInCreateStage)(s),{skipBrowserSemanticUrlUpdate:l=!1,viewType:d,isTraditionalUICase:p}=t,f=d===a.SCOPE_TYPES.PAGE&&(!o||p)&&!l,{caseTypeID:h}=s;if(f){const t=(0,u.getSemanticURL)(n.ACTION_OPENWORKBYHANDLE,{caseClassName:h}).replace(/{.+?}/,String((0,c.getDisplayCaseID)(r)));e.semanticURL=t,e.directUrlUpdation=!0}},E=e=>{let t=e?.headers??{};return e?.isRemote&&(t=(0,a.processHeaders)(t,e.remoteClassName)),t},A=(e,t,s,n,i,u,d)=>{(0,l.isContainerSingleMode)(t)&&(0,l.hasContainerItems)(t)?((e,t,s,n,i)=>{f(e,t)===a.SCOPE_TYPES.FORM?(s.caseViewMode=n||r.default.PERFORM_MODE,i.push(o.postProcess(o.updateContainerItem,s))):i.push(o.postProcess(o.replaceContainerItem,s))})(n,i,e,u,s):((e,t,s,r,n)=>{if((0,c.addActionToRemoveContainerItem)(e,{removeActionPayload:t,target:s}),(0,a.shouldReplaceActiveItem)(r.key,s))r.context=(0,l.getActiveContainerItemContext)(s),r.containerItemID=r.context,e.push(o.postProcess(o.replaceContainerItem,r));else if((n?.isChild||n?.isRemote)&&n?.isMultiDoc){const t=(0,l.getTargetFromContainerItemID)(n.context);r.target=t,r.context=n.context,r.containerItemID=n.context,e.push(o.postProcess(o.replaceContainerItem,r))}else{const t=(0,l.getTargetFromContainerItemID)(r.context),s=(0,l.getContainerItemName)(t,r.key);s?(r.target=t,r.context=s,r.containerItemID=s,e.push(o.postProcess(o.replaceContainerItem,r))):e.push(o.postProcess(o.addContainerItem,r))}})(s,d,t,e,n)},_=(e,t)=>{e.acTertiary&&(t.data.caseInfo.isFirstAssignment=e.acTertiary)}},"./src/case/open-assignment/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>v,openAssignment:()=>N});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),n=s("./node_modules/rxjs/dist/esm5/internal/observable/empty.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),i=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),c=s("./src/actions/manager.ts"),l=s("./src/constants.ts"),u=s("./src/router/routing-manager.ts"),d=s("./src/store/state/actions/index.ts"),p=s("./src/store/state/state-manager.ts"),f=s("./src/store/state/epics/util.ts"),h=s("./src/utils/dxapi-response-translator.ts"),g=s("./src/case/common-helper.ts"),m=s("./src/container/container-utils.ts"),E=s("./src/utils/utils.ts"),A=s("./src/utils/broadcast-utils.ts"),_=s("./src/utils/case-utils.ts"),I=s("./src/utils/context-utils.ts"),y=s("./src/case/common-events.ts"),C=s("./src/case/open-assignment/async-request.ts"),S=s("./src/case/open-assignment/helper.ts"),b=s("./src/case/open-assignment/action-creator.ts");const{RESOURCE_TYPES:T}=l.publicConstants,N=e=>{let t=0,s=[];const N=[];let v=!1,R=!1;return e.pipe((0,r.ofType)(b.OPEN_ASSIGNMENT),(0,o.map)((e=>(({actionMgrID:t}=e.payload),{...e.payload,insKey:e.payload.assignmentID}))),(0,i.mergeMap)((e=>{v=e.isGetNextWork;const{context:s}=e;let r;r=(e?.isChild||e?.isRemote)&&e?.isMultiDoc?f.SCOPE_TYPES.FORM:(0,S.getViewType)(e),e.viewType=r;const o=(0,g.getContainerName)(d.ACTION_OPENASSIGNMENT,e),i=(0,u.getResolvedTargetName)(o,s),{activate:l,activateContainerActionPayload:p}=(0,f.getActivationDetails)(T.ASSIGNMENT,i,e);if(l&&!e.isParallelCall)return(0,a.of)({type:d.ACTIVATE_CONTAINER_ITEM,activateContainerActionPayload:p,actionInPayload:e});const h=(0,m.getActiveContainerItemName)(i);let E;E=p?.isParallelAssignment?{continueExecution:!0,removeActionPayload:{}}:h?(0,f.getDirtyDetails)(i):{continueExecution:!0,removeActionPayload:{}};const{continueExecution:A,removeActionPayload:_}=E;return A?(R=(0,g.isCoexistenceCase)(e.className),e.isTraditionalUICase=R,(0,C.executeOpenAssignmentRequest)(e,{removeActionPayload:_})):(c.ActionManagerInstance.rejectActionByID(t),(0,n.empty)())})),(0,i.mergeMap)((async e=>{if(e?.type===d.ERROR){if(v){const{payload:t}=e,{err:s}=t,r=s.response.status;N.push({status:Number(r)})}return s.push((0,f.processDataToDispatchErrorAction)(e)),s}const{type:t,actionInPayload:r,response:a,viewType:n,headers:o,removeActionPayload:i,activateContainerActionPayload:c}=e;if("openStage"===a?.redirectInfo?.jsAction){const e=a?.redirectInfo?.stageID,t=b.OPEN_ASSIGNMENT,n=a?.data?.caseInfo?.ID;r.isOpenStage=!0,r.stageID=e,r.jsActionQueryParams=a?.redirectInfo?.jsActionQueryParams;const i={type:t,payload:{...r,caseID:n,headers:o}};return s.push(i),s}const{context:p,caseViewMode:m,debugInfo:A}=r;let C=(0,S.getContainerNameForCaseStage)(a,r);R=(0,g.isCoexistenceCase)(a?.data?.caseInfo?.caseTypeID),r.isTraditionalUICase=R,R&&(C=r.containerName);const T=(0,u.getResolvedTargetName)(C,p);if(t===d.ACTIVATE_CONTAINER_ITEM)return await(0,S.addActionToActivateContainerItem)(s,c,{actionInPayload:r,target:T}),(0,f.addPreviewResetAction)(s),s;const O=a?.data?.caseInfo?.content,D=a?.uiResources?.root?.config?.name;O&&!O.pyViewName&&D&&"page"!==r.viewType&&E.default.setIn(O,"pyViewName",D);const x=(0,h.getTranslatedDXAPIResponse)(a);(0,S.setDirectUrlUpdation)(x,r);const P=(0,f.getContext)(T,C,p),M={acName:T,target:T,context:P};await(0,f.processViewResponse)(x,r,M);const w={target:T,context:P,containerItemID:P,headers:o,parentContext:(0,I.getParentContextName)(r?.context),isMinimizable:(0,_.isAssignmentInCreateStage)(E.default.getIn(x,"data.caseInfo")),doDeleteCaseSummary:r.doDeleteCaseSummary,acTertiary:r.acTertiary,resourceType:l.publicConstants.CASE,debugInfo:A};(0,g.updateKeyAndFlowName)(w,x,{skipFlowNameUpdate:r?.caseViewMode===l.default.REVIEW_MODE});const j=(0,f.getActionPayload)(x,w);return r.isProcessAction&&(j.data.isProcessAction=r.isProcessAction),R&&(j.data.caseInfo.content.coexistenceAction="openAssignment"),(0,S.setIsFirstAssignmentForCoexistence)(r,j),(0,S.processAppropriateContainerItem)(j,T,s,r,a,m,i),n===f.SCOPE_TYPES.FORM&&(0,g.isParentAndChildContextHoldingSameItem)(j.containerItemID)&&(0,f.addActionsToParentContext)(j,s),(0,f.addPreviewResetAction)(s),(0,y.publishAssignmentOpenedEvent)({actionInContext:p,assignmentID:r.assignmentID,caseKey:j.key}),s})),(0,o.map)((()=>{const e=t,r=(0,g.canLaunchCaseInModal)(),a=(0,_.isAssignmentInCreateStage)(E.default.getIn(s[0]?.payload,"data.caseInfo"));return R&&r&&a?A.default.postCreateCaseMessage(s[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,p.dispatch,s):p.dispatch(s),(0,g.promiseHandler)(s,e,N),s[0]?.payload?.isParallelAssignment&&p.dispatch({type:b.OPEN_ASSIGNMENT,payload:{...s[0].payload,isParallelCall:!0}}),s=[],s})))},v=N},"./src/case/open-bulk-action/action-creator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{OPEN_BULK_ACTION:()=>r,openBulkAction:()=>a});const r="OPEN_BULK_ACTION",a=e=>({type:r,payload:e})},"./src/case/open-bulk-action/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d,executeOpenBulkActionRequest:()=>u});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./src/service_broker/fetch.ts"),o=s("./src/store/state/actions/index.ts"),i=s("./src/router/app-router.ts"),c=s("./src/utils/rxjs-utils.ts"),l=s("./src/store/state/epics/util.ts");const u=e=>{const{actionID:t,context:s,openActionType:u,caseTypeID:d,bulkContextID:p="",bulkContextType:f=""}=e,h=o.ACTION_OPEN_BULK_ACTION,{reqType:g,restApi:m}=(0,i.resolveRestApi)(h,{caseTypeID:d,actionID:t,bulkContextID:p,bulkContextType:f});return(0,r.from)((0,n.fetch)(m,{method:g},s)).pipe((0,a.map)((t=>({response:t.data,actionInPayload:e,headers:(0,l.processHeaders)(t.headers)}))),(0,c.logAndCatchError)(`: Error occurred during ajax call at ${u} Epic : `,s))},d={executeOpenBulkActionRequest:u}},"./src/case/open-bulk-action/events.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{subscribeBulkActionSubmitEvent:()=>o,unSubscribeBulkActionSubmitEvent:()=>n});var r=s("./src/utils/pubsub-utils.ts"),a=s("./src/constants.ts");const n=e=>{r.default.unsubscribe(a.default.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},o=(e,t)=>{r.default.subscribe(a.default.PUB_SUB_EVENTS.EVENT_BULKACTION,e,t)}},"./src/case/open-bulk-action/helper.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{processCallBacks:()=>p,processOpenBulkActionRequest:()=>d});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/empty.js"),a=s("./src/store/state/actions/index.ts"),n=s("./src/case/common-helper.ts"),o=s("./src/router/routing-manager.ts"),i=s("./src/store/state/epics/util.ts"),c=s("./src/actions/manager.ts"),l=s("./src/case/open-bulk-action/async-request.ts"),u=s("./src/case/open-bulk-action/events.ts");const d=(e,t)=>{const{context:s}=e,{actionMgrID:u}=t;e.openActionType=a.ACTION_OPEN_BULK_ACTION;const d=(0,n.getContainerName)(a.ACTION_OPEN_BULK_ACTION,e),p=(0,o.getResolvedTargetName)(d,s),{continueExecution:f}=(0,i.getDirtyDetails)(p);return f?(0,l.executeOpenBulkActionRequest)(e):(c.ActionManagerInstance.rejectActionByID(u),(0,r.empty)())},p=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{t.submit(e),(0,u.unSubscribeBulkActionSubmitEvent)("bulkActionSubmit")};(0,u.subscribeBulkActionSubmitEvent)(e,"bulkActionSubmit")}}},"./src/case/open-bulk-action/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./src/actions/manager.ts"),i=s("./src/case/open-action-helper.ts"),c=s("./src/case/common-helper.ts"),l=s("./src/store/state/epics/util.ts"),u=s("./src/utils/utils.ts"),d=s("./src/store/state/state-manager.ts"),p=s("./src/case/open-bulk-action/helper.ts"),f=s("./src/case/open-bulk-action/action-creator.ts");const h=e=>{let t=0,s=[];return e.pipe((0,r.ofType)(f.OPEN_BULK_ACTION),(0,a.map)((e=>(({actionMgrID:t}=e.payload),e.payload))),(0,n.mergeMap)((e=>(0,p.processOpenBulkActionRequest)(e,{actionMgrID:t}))),(0,n.mergeMap)((async e=>{if(e&&(0,c.isErrorActionType)(e.type)){const t=(0,l.processDataToDispatchErrorAction)(e);return s.push(t),s}const{actionInPayload:t,headers:r,response:a}=e,{actionID:n}=t;return u.default.setIn(a,"data.caseInfo.activeActionID",n),await(0,i.postProcessOpenActionRequest)(a,s,{headers:r,actionInPayload:t}),(0,p.processCallBacks)(t),s})),(0,a.map)((()=>(1===s.length&&(0,c.isErrorActionType)(s[0].type)?o.ActionManagerInstance.rejectActionByID(t):o.ActionManagerInstance.resolveActionByID(t),d.dispatch(s),s=[],s))))}},"./src/case/open-embedded-data-modal/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d,executeRequest:()=>u});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./src/service_broker/fetch.ts"),o=s("./src/router/app-router.ts"),i=s("./src/utils/rxjs-utils.ts"),c=s("./src/store/state/epics/util.ts"),l=s("./src/utils/utils.ts");const u=e=>{const{context:t}=e;let s={...(0,c.getSubmitData)(t).content,contextData:!1};const u=(0,c.getParentContextChangeSet)(t);l.default.isEmpty(u)||(s=(0,c.mergeObjectsAndConcatArrays)(u,s));const{restApi:d,reqType:p}=(0,o.resolveRestApi)("refreshCaseView",e);return s.interestPage=e.interestPage,(0,r.from)((0,n.fetch)(d,{method:p,body:s},t)).pipe((0,a.map)((t=>({actionInPayload:e,response:t.data,headers:(0,c.processHeaders)(t.headers)}))),(0,i.logAndCatchError)(": Error occurred during ajax call : ",t))},d={executeRequest:u}},"./src/case/open-embedded-data-modal/helper.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i,generateInstructions:()=>o});var r=s("./src/page-instructions/state-machine-manager.ts"),a=s("./src/page-instructions/state-machine/state-machine.ts"),n=s("./src/constants.ts");const o=(e,t,s,o,i)=>{i===n.default.RESOURCE_STATUS.CREATE&&(r.default.isStateMachineExist(e,t,s)||r.default.setStateMachine(e,s,t,new a.default(s,t,e)),r.default.getStateMachine(e,t,s).insert({},o+1,!0,{isDefault:!0}))},i={generateInstructions:o}},"./src/case/open-embedded-data-modal/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>_,openEmbeddedDataModal:()=>A});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./src/actions/manager.ts"),i=s("./src/router/routing-manager.ts"),c=s("./src/utils/dxapi-response-translator.ts"),l=s("./src/store/state/actions/index.ts"),u=s("./src/store/state/state-manager.ts"),d=s("./src/store/state/epics/util.ts"),p=s("./src/case/common-helper.ts"),f=s("./src/utils/context-utils.ts"),h=s("./src/messages/index.ts"),g=s("./src/constants.ts"),m=s("./src/case/open-embedded-data-modal/helper.ts"),E=s("./src/case/open-embedded-data-modal/async-request.ts");const A=e=>{let t=0,s=[],A="";return e.pipe((0,r.ofType)(l.OPEN_EMBEDDED_DATA_MODAL),(0,a.map)((e=>(({actionMgrID:t}=e.payload),e.payload))),(0,n.mergeMap)((e=>(0,E.executeRequest)(e))),(0,n.mergeMap)((async e=>{if(e&&e.type===l.ERROR)return s.push((0,d.processDataToDispatchErrorAction)(e)),{actionsOut:s,actionInPayload:{skipPageInstructions:!0}};const{actionInPayload:t,response:r}=e,a=t.containerName,n=(0,i.getResolvedTargetName)(a,t.context);let o=(0,d.getContext)(n,a,t.context);o=(0,f.buildModalContext)(t.context,o);const p=(0,c.getTranslatedDXAPIResponse)(r);p.key=t.ID,p.data?.caseInfo&&(p.data.caseInfo.ID=t.ID);const m={isMultiRecordData:!0,viewName:t.viewID,parentContext:t.context,interestPage:t.interestPage};p.uiResources.context_data.modalView=m;const E=(0,u.getDataObject)(t.context)?.context_data?.caseInfo,_=`${t.pageReference}${t.targetProperty}`,I=(0,h.getTableRowErrorMessages)(E,_.replace(g.publicConstants.CASE_INFO.CASE_INFO_CONTENT,"").slice(1),t.index);p.uiResources.context_data.caseInfo={...p.uiResources.context_data.caseInfo,content:{...p.uiResources.context_data.caseInfo?.content,...I?.content}};const y={acName:n,context:o};await(0,d.processViewResponse)(p,t,y);const C={target:n,context:o,containerItemID:o},S=(0,d.getActionPayload)(p,C);S.resourceStatus=t.actionType,S.isMultiRecordData=!0,S.parentContext=t.context,S.heading=t.heading;const b=(0,d.getActionBasedOnContainerMode)(n,S);return A=o,s.push(b),(0,d.addPreviewResetAction)(s),{actionsOut:s,actionInPayload:t}})),(0,a.map)((({actionInPayload:e})=>((0,p.hasErrorActionType)(s)?o.ActionManagerInstance.rejectActionByID(t):o.ActionManagerInstance.resolveActionByID(t),(0,u.dispatch)(s),s=[],e.skipPageInstructions||(0,m.generateInstructions)(A,e.pageReference,e.targetProperty,e.index,e.actionType),s))))},_=A},"./src/case/open-local-action/action-creator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{OPEN_LOCAL_ACTION:()=>r,openLocalAction:()=>a});const r="OPEN_LOCAL_ACTION",a=e=>({type:r,payload:e})},"./src/case/open-local-action/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n,processOpenLocalActionRequest:()=>a});var r=s("./src/case/open-action-helper.ts");const a=(e,t)=>(0,r.processOpenActionRequest)(e,t),n={processOpenLocalActionRequest:a}},"./src/case/open-local-action/events.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{subscribeExpressLocalActionSubmitEvent:()=>o,unSubscribeExpressLocalActionSubmitEvent:()=>n});var r=s("./src/utils/pubsub-utils.ts"),a=s("./src/constants.ts");const n=e=>{r.default.unsubscribe(a.default.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,e)},o=(e,t)=>{r.default.subscribe(a.default.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,e,t)}},"./src/case/open-local-action/helper.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h,processCallBacks:()=>p,saveAssignment:()=>f});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/switchMap.js"),o=s("./src/actions/manager.ts"),i=s("./src/case/save-and-close/action-creator.ts"),c=s("./src/store/state/state-manager.ts"),l=s("./src/case/save-and-close/index.ts"),u=s("./src/constants.ts"),d=s("./src/case/open-local-action/events.ts");const p=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{t.submit(e),(0,d.unSubscribeExpressLocalActionSubmitEvent)("expressLocalActionSubmit")};(0,d.subscribeExpressLocalActionSubmitEvent)(e,"expressLocalActionSubmit")}},f=e=>{let t,s=0;const d=[],p={value:c.getStore()?.getState()};return(0,a.of)(e).pipe((0,r.ofType)(i.SAVE_AND_CLOSE),(0,n.switchMap)((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:s,caseType:t}=e.payload),!r){const e={type:u.publicConstants.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return o.ActionManagerInstance.rejectActionByID(s,!0,e),(0,a.of)([])}const n={action:e,state$:p,actionMgrID:s,caseType:t,actionsOut:d};return(0,l.performSave)(n,!0)})))},h={processCallBacks:p}},"./src/case/open-local-action/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>E});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./node_modules/rxjs/dist/esm5/internal/observable/empty.js"),i=s("./src/store/state/state-manager.ts"),c=s("./src/store/state/epics/util.ts"),l=s("./src/store/state/actions/action-creators.ts"),u=s("./src/case/common-helper.ts"),d=s("./src/utils/utils.ts"),p=s("./src/case/open-action-helper.ts"),f=s("./src/constants.ts"),h=s("./src/case/open-local-action/helper.ts"),g=s("./src/case/open-local-action/action-creator.ts"),m=s("./src/case/open-local-action/async-request.ts");const E=e=>{let t=0,s=[];return e.pipe((0,r.ofType)(g.OPEN_LOCAL_ACTION),(0,a.map)((e=>(({actionMgrID:t}=e.payload),e.payload))),(0,n.mergeMap)((e=>(0,m.processOpenLocalActionRequest)(e,{actionMgrID:t}))),(0,n.mergeMap)((async e=>{if(!e)return o.EMPTY;if((0,u.isErrorActionType)(e.type)){const t=(0,c.processDataToDispatchErrorAction)(e);s.push(t);const{context_data:r}=i.getDataObject(e.payload.context)||{};return r?.isLoading&&s.push((0,l.postProcess)(l.resetLoading,e.payload)),s}const{actionInPayload:t,headers:r,response:a}=e,{actionID:n}=t;return d.default.setIn(a,"data.caseInfo.activeActionID",n),d.default.setIn(a.data,f.default.CASE_INFO_IS_LOCAL_ACTION,!0),t.refreshConditions&&d.default.setIn(a.data,f.default.CASE_INFO_REFRESH_CONDITIONS,t.refreshConditions),await(0,p.postProcessOpenActionRequest)(a,s,{headers:r,actionInPayload:t}),(0,h.processCallBacks)(t),s})),(0,a.map)((()=>(i.dispatch(s),(0,u.promiseHandler)(s,t),s=[],s))))}},"./src/case/open-process-action/action-creator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{OPEN_PROCESS_ACTION:()=>r,openProcessAction:()=>a});const r="OPEN_PROCESS_ACTION",a=e=>({type:r,payload:e})},"./src/case/open-process-action/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n,processOpenProcessActionRequest:()=>a});var r=s("./src/case/open-action-helper.ts");const a=(e,t)=>(0,r.processOpenActionRequest)(e,t),n={processOpenProcessActionRequest:a}},"./src/case/open-process-action/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./src/messages/index.ts"),i=s("./src/store/state/epics/util.ts"),c=s("./src/case/common-helper.ts"),l=s("./src/case/open-action-helper.ts"),u=s("./src/case/open-process-action/action-creator.ts"),d=s("./src/case/open-process-action/async-request.ts");const p=e=>{let t=0,s=[];return e.pipe((0,r.ofType)(u.OPEN_PROCESS_ACTION),(0,a.map)((e=>(({actionMgrID:t}=e.payload),e.payload))),(0,n.mergeMap)((e=>((0,o.clearContextMessagesInActiveWorkArea)(e.context),(0,d.processOpenProcessActionRequest)(e,{actionMgrID:t,isProcessAction:!0})))),(0,n.mergeMap)((async e=>{if(e&&(0,c.isErrorActionType)(e.type)){const t=(0,i.processDataToDispatchErrorAction)(e);return s.push(t),s}const{actionInPayload:t,headers:r,response:a}=e;return await(0,l.postProcessOpenActionRequest)(a,s,{headers:r,actionInPayload:t}),s})),(0,a.map)((()=>((0,i.dispatchCorrectActionIfChildOrRemote)(s),(0,c.promiseHandler)(s,t),s=[],s))))}},"./src/case/open-work-by-handle/action-creator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{OPEN_WORK_BY_HANDLE:()=>r,openWorkByHandleAction:()=>a});const r="OPEN_WORK_BY_HANDLE",a=e=>({type:r,payload:e})},"./src/case/open-work-by-handle/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g,executeOpenWorkByHandleRequest:()=>h});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./src/utils/rxjs-utils.ts"),o=s("./src/router/app-router.ts"),i=s("./src/service_broker/fetch.ts"),c=s("./src/store/state/actions/index.ts"),l=s("./src/store/state/epics/util.ts"),u=s("./src/service_broker/header-processor.ts"),d=s("./src/environment-info/index.ts"),p=s("./src/constants.ts"),f=s("./src/utils/performance-utils.ts");const h=(e,t)=>{const{insKey:s,headers:h,context:g,debugInfo:m,viewType:E}=e,{removeActionPayload:A}=t,_=e?.pageName?e?.pageName:d.default.getDefaultCasePage(),I=(0,o.resolveRestApi)(c.ACTION_OPENWORKBYHANDLE,{caseID:s,params:{pageName:_}});let{restApi:y}=I;const{reqType:C}=I;"none"===E&&(y=`${y?.split("viewType")[0]}viewType=none`);let S={};return d.default.getPerformanceDashboardVisibility()&&(S=f.default.getActionInfo(p.default.TOP_ACTION_LABEL.OPENWORKBYHANDLE)),(0,r.from)((0,i.fetch)(y,{method:C,headers:{...h,...m&&{...u.default.addDebugHeaders(m)}}},g,S)).pipe((0,a.map)((t=>({response:t.data,actionInPayload:e,headers:(0,l.processHeaders)({...h,...t.headers}),removeActionPayload:A}))),(0,n.logAndCatchError)("Error occurred during ajax call at openWorkByHandle Epic : ",g))},g=h},"./src/case/open-work-by-handle/helper.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{getOpenWorkByHandleSemanticURL:()=>d,handleWorkItemActivation:()=>u});var r=s("./src/router/app-router.ts"),a=s("./src/router/routing-manager.ts"),n=s("./src/store/state/actions/index.ts"),o=s("./src/store/state/actions/action-creators.ts"),i=s("./src/container/container-utils.ts"),c=s("./src/store/state/epics/util.ts"),l=s("./src/case/common-helper.ts");const u=async(e,t)=>{const{activateContainerActionPayload:{semanticURL:s,containerItemID:r},actionInPayload:u,actionInPayload:{context:d,skipBrowserSemanticUrlUpdate:p,doDeleteCaseSummary:f}}=t,h=(0,l.getContainerName)(n.ACTION_OPENWORKBYHANDLE,u),g=(0,a.getResolvedTargetName)(h,d),m=(0,i.getDataContextName)(r);await(0,c.processViewResponse)({directUrlUpdation:!p,semanticURL:s},u,{acName:g,containerName:h,target:g,context:m}),e.push(o.postProcess(o.activateContainerItem,{containerItemID:r,target:g,context:m,doDeleteCaseSummary:f}))},d=(e,t)=>{const{isRemoteCase:s,remoteCaseClass:a}=t,o=(0,l.getCaseInfoID)(e),i=s?a:(0,l.getCaseClassName)(e);let c=(0,r.getSemanticURL)(n.ACTION_OPENWORKBYHANDLE,{caseClassName:i});return c=c&&c.replace("{workID}",String((0,l.getDisplayCaseID)(o))),c}},"./src/case/open-work-by-handle/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b,openWorkByHandle:()=>S});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/empty.js"),n=s("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),i=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),c=s("./src/actions/manager.ts"),l=s("./src/constants.ts"),u=s("./src/router/routing-manager.ts"),d=s("./src/store/state/actions/index.ts"),p=s("./src/store/state/actions/action-creators.ts"),f=s("./src/store/state/state-manager.ts"),h=s("./src/store/state/epics/util.ts"),g=s("./src/utils/dxapi-response-translator.ts"),m=s("./src/case/common-helper.ts"),E=s("./src/case/common-events.ts"),A=s("./src/container/container-utils.ts"),_=s("./src/case/open-work-by-handle/async-request.ts"),I=s("./src/case/open-work-by-handle/helper.ts"),y=s("./src/case/open-work-by-handle/action-creator.ts");const{RESOURCE_TYPES:C}=l.publicConstants,S=e=>{let t=0,s=[];return e.pipe((0,r.ofType)(y.OPEN_WORK_BY_HANDLE),(0,o.map)((e=>(({actionMgrID:t}=e.payload),e.payload))),(0,i.mergeMap)((e=>{const{context:s,isChild:r,viewType:o}=e,i=(0,m.getContainerName)(d.ACTION_OPENWORKBYHANDLE,e),l=(0,u.getResolvedTargetName)(i,s);let p,f=!0;if("none"!==o){const e=(0,h.getDirtyDetails)(l);f=e.continueExecution,p=e.removeActionPayload}if(!f)return c.ActionManagerInstance.rejectActionByID(t),(0,a.empty)();const{activate:g,activateContainerActionPayload:E}=(0,h.getActivationDetails)(C.CASE,l,e);return g&&!r&&"none"!==o?(0,n.of)({type:d.ACTIVATE_CONTAINER_ITEM,activateContainerActionPayload:E,actionInPayload:e}):(0,_.executeOpenWorkByHandleRequest)(e,{removeActionPayload:p})})),(0,i.mergeMap)((async e=>{if(e&&(0,m.isErrorActionType)(e.type))return s.push((0,h.processDataToDispatchErrorAction)(e)),s;const t=f.getDataObject(e?.actionInPayload?.context),r=(0,m.isCoexistenceCase)(e?.actionInPayload.className);if("none"===e?.actionInPayload?.viewType){if("perform"!==t?.context_data?.caseViewMode){const t={data:{...(0,g.getTranslatedDXAPIResponse)(e?.response)?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};s.push({type:d.DELETE_CASE_SUMMARY,payload:{context:t.context,doDeleteConfirmationDetails:!1}}),r&&t.data.caseInfo?.content&&(t.data.caseInfo.content.coexistenceAction="openWorkByHandle"),s.push(p.postProcess(p.mergeData,t));const a=(0,A.getTargetFromContainerItemID)(e?.actionInPayload?.context),n=(0,m.getContainerNameFromContainerItemID)(e?.actionInPayload?.context),o=Object.freeze({target:a,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:n});if((0,m.isParentAndChildContextHoldingSameItem)(e?.actionInPayload?.context)){const t=(0,h.getActionPayload)(e?.response,{...o});(0,h.addActionsToParentContext)({...t,isArrayDeepMerge:!0},s)}}}else await(async(e,t,s)=>{const{actionInPayload:r,activateContainerActionPayload:a,type:n,response:o,removeActionPayload:i,headers:c}=e,{context:f,skipBrowserSemanticUrlUpdate:A,debugInfo:_}=r,y=(0,m.getContainerName)(d.ACTION_OPENWORKBYHANDLE,r),S=(0,u.getResolvedTargetName)(y,f);if((0,m.isActivateContainerItemActionType)(n))await(0,I.handleWorkItemActivation)(t,{activateContainerActionPayload:a,actionInPayload:r});else{const e=(0,h.getContext)(S,y,f,{buildNew:!0}),a=(0,g.getTranslatedDXAPIResponse)(o),n=(0,I.getOpenWorkByHandleSemanticURL)(a,r);a.semanticURL=n,a.directUrlUpdation=!A;const u={acName:S,context:e};await(0,h.processViewResponse)(a,r,u);const d=(0,h.getActionPayload)(a,{target:S,context:e,containerItemID:e,semanticURL:n,headers:c,debugInfo:_});d.caseViewMode=l.default.REVIEW_MODE,d.resourceType=C.CASE,s&&(d.data.caseInfo.content.coexistenceAction="openWorkByHandle"),(0,m.updateKeyAndFlowName)(d,a,{skipFlowNameUpdate:!0});const E=(0,h.getActionBasedOnContainerMode)(S,d);i.containerItemID&&(0,h.isAddContainerAction)(E)&&t.push(p.postProcess(p.removeContainerItem,{containerItemID:i.containerItemID,target:S})),t.push(E)}(0,h.addPreviewResetAction)(t);const b=r.insKey;(0,E.publishCaseOpenedEvent)({caseKey:b,actionInContext:f})})(e,s,r);return s})),(0,o.map)((()=>(f.dispatch(s),(0,m.promiseHandler)(s,t),s=[],s))))},b=S},"./src/case/release-lock/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f,executeReleaseLockRequest:()=>p});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./src/router/app-router.ts"),o=s("./src/service_broker/fetch.ts"),i=s("./src/store/state/actions/index.ts"),c=s("./src/store/state/epics/util.ts"),l=s("./src/debug/debugger.ts"),u=s("./src/utils/rxjs-utils.ts"),d=s("./src/constants.ts");const p=e=>{const t={},{routeKey:s,isModalAction:p,caseID:f,context:h,RemoteSystemID:g}=e;g&&(t.RemoteSystemID=g);const m=s||i.ACTION_RELEASE_ASSIGNMENT_LOCK,{restApi:E,reqType:A}=(0,n.resolveRestApi)(m,{ID:f,caseID:f,viewType:c.SCOPE_TYPES.PAGE});return l.default.getPreviewMode()&&(t[d.default.SKIPCOREHEADERS]=!0),(0,r.from)((0,o.fetch)(E,{method:A,headers:t},h,{includeRemoteSystemIdIfPresent:!!g})).pipe((0,a.map)((t=>p?{actionInPayload:e}:{response:t.data,actionInPayload:e,headers:(0,c.processHeaders)(t.headers)})),(0,u.logAndCatchError)(": Error occurred during ajax call at release lock request : ",h))},f=p},"./src/case/release-lock/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f,releaseLock:()=>p});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),i=s("./src/store/state/state-manager.ts"),c=s("./src/store/state/epics/util.ts"),l=s("./src/store/state/actions/index.ts"),u=s("./src/case/common-helper.ts"),d=s("./src/case/release-lock/async-request.ts");const p=e=>{let t=0,s=[];return e.pipe((0,r.ofType)(l.REMOVE_CONTAINER_ITEM,l.REPLACE_CONTAINER_ITEM),(0,n.map)((e=>(({actionMgrID:t}=e.payload),e.payload))),(0,o.mergeMap)((e=>{const{containerItemID:t,caseID:s,context:r,caseDeleted:n,skipReleaseLockRequest:o,caseViewMode:i,resourceType:c}=e;return t!==r||n||o||!s||"perform"===i||"CASE"!==c?(0,a.of)([]):(0,d.executeReleaseLockRequest)(e)})),(0,o.mergeMap)((e=>(e&&(0,u.isErrorActionType)(e.type)&&s.push((0,c.processDataToDispatchErrorAction)(e)),s))),(0,n.map)((()=>(i.dispatch(s),(0,u.promiseHandler)(s,t),s=[],s))))},f=p},"./src/case/remote-case.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{REMOTE_CASE_VIEW:()=>o,default:()=>c});var r=s("./src/context/context-processor.ts"),a=s("./src/constants.ts"),n=s("./src/environment-info/index.ts");const o="pyRemoteCaseDetails";class i{static remoteCaseMapping={};static setRemoteCaseMapping=e=>{this.remoteCaseMapping=e,this.setAdditionalParameters()};static getRemoteCaseMapping=()=>this.remoteCaseMapping;static getRemoteCase=e=>this.remoteCaseMapping?.[e];static isRemoteCase=e=>!!(e&&this.remoteCaseMapping&&this.remoteCaseMapping[e]);static getRemoteHeaderByContext=e=>r.default.getProperty(".RemoteSystemID",a.default.CASE_INFO.HEADERS,e);static getRemoteHeader=e=>this.remoteCaseMapping[e]?.RemoteSystemID;static injectRemoteCaseHeader=(e,t,s)=>{if(e&&e.RemoteSystemID)return;const r=this.getRemoteHeaderByContext(s);r?e.RemoteSystemID=r:t&&this.isRemoteCase(t.caseTypeID)&&(e.RemoteSystemID=this.getRemoteHeader(t.caseTypeID))};static isTraditionalRemoteCase=(e="")=>"Traditional"===i.getRemoteCase(e)?.RemoteApplicationType;static setAdditionalParameters=()=>{const e=n.default.environmentInfoObject?.pyRemoteCaseTypeList;e?.forEach((e=>{const t=this.getRemoteCase(e.pyWorkTypeImplementationClassName);t&&(t.name=e.pyWorkTypeName)}))}}const c=i},"./src/case/save-and-close/action-creator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{SAVE_AND_CLOSE:()=>r,saveAndCloseAction:()=>a});const r="SAVE_AND_CLOSE",a=e=>({type:r,payload:e})},"./src/case/save-and-close/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h,executeSaveAssignmentRequest:()=>f});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./src/router/app-router.ts"),o=s("./src/service_broker/fetch.ts"),i=s("./src/store/state/actions/index.ts"),c=s("./src/store/state/epics/util.ts"),l=s("./src/utils/rxjs-utils.ts"),u=s("./src/constants.ts"),d=s("./src/environment-info/index.ts"),p=s("./src/utils/performance-utils.ts");const f=(e,t)=>{const{assignmentID:s,actionID:f,context:h}=e,{restApi:g,reqType:m}=(0,n.resolveRestApi)(i.ACTION_SAVE,{assignmentID:s,actionID:f}),{content:E}=(0,c.getSubmitData)(h),A=t.value.data[h]?.caseInfo?.headers;let _={};return d.default.getPerformanceDashboardVisibility()&&(_=p.default.getActionInfo(u.default.TOP_ACTION_LABEL.SAVEANDCLOSE)),(0,r.from)((0,o.fetch)(g,{method:m,body:E,headers:{"if-match":A&&A.etag}},h,_)).pipe((0,a.map)((t=>({response:t.data,actionInPayload:e,headers:(0,c.processHeaders)(t.headers)}))),(0,l.logAndCatchError)(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",h))},h={executeSaveAssignmentRequest:f}},"./src/case/save-and-close/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b,performSave:()=>S});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),i=s("./node_modules/rxjs/dist/esm5/internal/operators/switchMap.js"),c=s("./src/router/routing-manager.ts"),l=s("./src/store/state/actions/action-creators.ts"),u=s("./src/store/state/state-manager.ts"),d=s("./src/store/state/epics/util.ts"),p=s("./src/case/common-helper.ts"),f=s("./src/case/release-lock/async-request.ts"),h=s("./src/constants.ts"),g=s("./src/container/container-utils.ts"),m=s("./src/store/state/actions/index.ts"),E=s("./src/utils/context-utils.ts"),A=s("./src/utils/dxapi-response-translator.ts"),_=s("./src/case/remote-case.ts"),I=s("./src/case/utils.ts"),y=s("./src/case/save-and-close/action-creator.ts"),C=s("./src/case/save-and-close/async-request.ts");const S=(e,t=!1)=>{const{action:s,state$:r,actionMgrID:i}=e;let y=[];return(0,a.of)(s.payload).pipe((0,n.mergeMap)((e=>(0,C.executeSaveAssignmentRequest)(e,r))),(0,n.mergeMap)((e=>{if(e&&(0,p.isErrorActionType)(e.type))return(0,a.of)(e);if(e.actionInPayload.isProcessAction&&e.response.data.caseInfo.parentCaseInfo){const t=`${e.actionInPayload?.containerItemID.includes("root")?h.default.APP.ROOT:h.default.APP.APP}/${g.CONTAINER_NAMES.PRIMARY}`,s=(0,d.getContext)(t,g.CONTAINER_NAMES.PRIMARY),r={insKey:e.response.data.caseInfo.parentCaseInfo.ID,className:e.response.data.caseInfo.parentCaseInfo.content.classID,context:s,acTargetName:h.default.PRIMARY,isChild:!0},a={type:m.OPEN_WORK_BY_HANDLE,payload:{...r}};y.push(a)}const{containerItemID:t}=e&&e.actionInPayload,r=(0,E.getParentContextName)(t),n=(0,g.getTargetFromContainerItemID)(r),o=(0,g.getContainerData)(n),i=(0,g.getActiveContainerItemName)(n);if(s.payload.canUpdateAvailableActions&&(0,A.updateAvailableActionsInResponse)(e.response),o?.items?.[i]?.key===e?.actionInPayload?.caseID){const s={context:r,data:{...e.response.data}},a=I.default.getPropertiesToReplace(t);y.push(l.postProcess(l.mergeData,s,{propertiesToReplace:a})),y.push(l.postProcess(l.updateContainerItem,{context:t}))}return(0,p.deferCaseSummaryViewUpdate)(e,y),e.actionInPayload.RemoteSystemID=_.default.getRemoteHeaderByContext(e.actionInPayload.context)??void 0,(0,f.executeReleaseLockRequest)(e.actionInPayload)})),(0,n.mergeMap)((async s=>{if(s&&(0,p.isErrorActionType)(s.type)){const{payload:t}=s,r=(0,d.processDataToDispatchErrorAction)({...s,...t,actionMgrID:i});y.push(r);const a=e.action.payload.modalLoadingContainer;if(a){const e=a.context,{context_data:t}=u.getDataObject(e)||{};t?.isLoading&&(0,g.closeContainerItem)(e)}return y}const{actionInPayload:r}=s,{context:a,containerName:n}=r,o={target:(0,c.getResolvedTargetName)(n,a),containerItemID:a,context:a};return t||y.push(l.postProcess(l.removeContainerItem,o)),y})),(0,o.map)((()=>(u.dispatch(y),(0,p.promiseHandler)(y,i),t||(y=[]),y))))},b=(e,t)=>{let s,a=0;return e.pipe((0,r.ofType)(y.SAVE_AND_CLOSE),(0,i.switchMap)((e=>{const{saveOnly:r}=e.payload;return({actionMgrID:a,caseType:s}=e.payload),S({action:e,state$:t,actionMgrID:a,caseType:s},r)})))}},"./src/case/submit-bulk-action/action-creator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{SUBMIT_BULK_ACTION:()=>r,submitBulkAction:()=>a});const r="SUBMIT_BULK_ACTION",a=e=>({type:r,payload:e})},"./src/case/submit-bulk-action/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f,executeSubmitBulkActionRequest:()=>p});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),o=s("./src/service_broker/fetch.ts"),i=s("./src/store/state/actions/index.ts"),c=s("./src/router/app-router.ts"),l=s("./src/utils/rxjs-utils.ts"),u=s("./src/store/state/epics/util.ts"),d=s("./src/store/state/utils.ts");const p=e=>{const{actionID:t,context:s,cases:p,classID:f}=e,{content:h}=(0,u.getSubmitData)(s,{nonEmptyAndChangedData:!0});let g=5;try{d.default.getSharedState("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults")?.find((e=>e.pyClassName===f))?.pyList.split(",").includes(t)&&(g=1)}catch(e){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',e)}const m=p.map((e=>({ID:e}))),E=m.length/g,A=i.ACTION_SUBMIT_BULK_ACTIONS,{reqType:_,restApi:I}=(0,c.resolveRestApi)(A,{actionID:t}),y=[],C=m.length;for(let t=0;t<C;t+=E)h.cases=m.slice(t,t+E),h.cases.length&&y.push((0,r.from)((0,o.fetch)(I,{method:_,body:h},s)).pipe((0,n.map)((t=>{const{data:s,headers:r}=t;return{response:s,actionInPayload:e,headers:(0,u.processHeaders)({...r})}})),(0,l.logAndCatchError)("Error occurred during ajax call at submitbulkaction Epic : ",s)));return(0,a.forkJoin)(y)},f={executeSubmitBulkActionRequest:p}},"./src/case/submit-bulk-action/events.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o,publishBulkActionSubmitEvent:()=>n});var r=s("./src/utils/pubsub-utils.ts"),a=s("./src/constants.ts");const n=e=>{r.default.publish(a.default.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},o={publishBulkActionSubmitEvent:n}},"./src/case/submit-bulk-action/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>A,submitBulkAction:()=>E});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/switchMap.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),i=s("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),c=s("./src/store/state/state-manager.ts"),l=s("./src/store/state/actions/action-creators.ts"),u=s("./src/actions/manager.ts"),d=s("./src/constants.ts"),p=s("./src/container/container-utils.ts"),f=s("./src/utils/context-utils.ts"),h=s("./src/case/submit-bulk-action/async-request.ts"),g=s("./src/case/submit-bulk-action/events.ts"),m=s("./src/case/submit-bulk-action/action-creator.ts");const E=e=>{let t,s=0,E=[],A="";return e.pipe((0,r.ofType)(m.SUBMIT_BULK_ACTION),(0,a.switchMap)((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:s}=e.payload),!r){const e={type:d.publicConstants.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return u.ActionManagerInstance.rejectActionByID(s,!0,e),(0,i.of)([])}return(0,i.of)(e.payload).pipe((0,n.mergeMap)((e=>(t=e,(0,h.executeSubmitBulkActionRequest)(t)))),(0,n.mergeMap)((e=>{let s=0,r=0;const a=[],{containerItemID:n,context:o}=t;return e.map((e=>{const{response:t}=e;s+=Number(t.successCount),r+=Number(t.failureCount),r&&t.results.map((e=>{"200"!==e.status&&e.error&&e.error.errorDetails&&e.error.errorDetails.forEach((t=>{a.push({ID:e.BusinessID,message:t.localizedValue})}))}))})),A=`${s} record(s) updated`,(0,g.publishBulkActionSubmitEvent)({submitResponse:e}),t.target=`${d.default.APP.APP}/${p.CONTAINER_NAMES.MODAL}`,E.push(l.postProcess(l.removeContainerItem,{containerItemID:n,context:o,target:t.target,skipReleaseLockRequest:!0})),r&&E.push(l.postProcess(l.addMessages,{messages:[{type:"error",message:`${r} records failed to update`,errorDetails:a,showHeader:!1}],context:(0,f.getParentContextName)(o)||o,category:"HTTP",showHeader:!1})),E})),(0,o.map)((()=>(u.ActionManagerInstance.resolveActionByID(s,A),c.dispatch(E),E=[],E))))})))},A=E},"./src/case/submit-embedded-data-modal/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y,submitEmbeddedDataModal:()=>I});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/switchMap.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),i=s("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),c=s("./src/store/state/state-manager.ts"),l=s("./src/store/state/actions/action-creators.ts"),u=s("./src/actions/manager.ts"),d=s("./src/constants.ts"),p=s("./src/store/state/epics/util.ts"),f=s("./src/page-instructions/index.ts"),h=s("./src/store/state/actions/index.ts"),g=s("./src/case/common-helper.ts"),m=s("./src/case/open-embedded-data-modal/async-request.ts"),E=s("./src/refresh/refreshHelpers.ts"),A=s("./src/context/context-processor.ts"),_=s("./src/actions/sequencer.ts");const I=e=>{let t,s="",I=[];return e.pipe((0,r.ofType)(h.SUBMIT_EMBEDDED_DATA_MODAL),(0,a.switchMap)((e=>{t=e.payload;const{isFormValid:r}=e.payload;if(({actionMgrID:s}=e.payload),!r){const t={type:d.publicConstants.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return u.ActionManagerInstance.rejectActionByID(s,!0,t),_.default.handleDeferredActionCompletion(e.payload.context),(0,i.of)([])}return(0,i.of)(e.payload).pipe((0,n.mergeMap)((e=>(t=e,(0,m.executeRequest)(t)))),(0,n.mergeMap)((async e=>{if(e&&e.type===h.ERROR){const t=(0,p.processDataToDispatchErrorAction)(e);return I.push(t),I}const{containerItemID:s,context:r}=t;return(0,f.mergeInstructions)(r,t.parentContext,d.publicConstants.CASE_INFO.CASE_INFO_CONTENT,!1),I.push((0,l.postProcess)(l.removeContainerItem,{containerItemID:s,context:r,target:t.target,skipReleaseLockRequest:!0})),I})),(0,o.map)((()=>{if((0,g.hasErrorActionType)(I))u.ActionManagerInstance.rejectActionByID(s),_.default.handleDeferredActionCompletion(t.context);else{u.ActionManagerInstance.resolveActionByID(s),_.default.handleDeferredActionCompletion(t.context);const{pageReference:r}=e.payload;if(A.default.getPropertyValue(d.default.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,r,t.parentContext)){const e=A.default.getPropertyValue(d.publicConstants.CASE_INFO.CASE_INFO_ID,r,t.parentContext),s=A.default.getPropertyValue(d.default.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,r,t.parentContext),a=t.pageReference?.substring(0,t.pageReference?.lastIndexOf(".")),n=a.replace(d.default.CASE_INFO.CASE_INFO_CONTENT,"");(0,E.dispatchCaseViewRefresh)(e,s,t.parentContext,n,{})}else(0,E.refreshAssignment)(t.parentContext,"caseInfo.content",{})}return(0,c.dispatch)(I),I=[],I})))})))},y=I},"./src/case/utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("./src/container/container-utils.ts"),a=s("./src/store/state/state-manager.ts"),n=s("./src/router/app-router.ts"),o=s("./src/service_broker/fetch.ts"),i=s("./src/store/state/actions/index.ts"),c=s("./src/utils/form-handler.ts"),l=s("./src/utils/utils.ts"),u=s("./src/case/remote-case.ts");const d=class{static isCaseActive(e,t){if(!e||!t)return!1;const s=(0,r.getContainerData)(t);if(s){const a=(0,r.getActiveContainerItemName)(t),{items:n={}}=s;return!(!a||!n[a]||n[a].key!==e)}return!1}static getCaseEditMetadata=(e,t)=>{const s={caseID:e,viewID:"pyEdit"},{restApi:r,reqType:a}=(0,n.resolveRestApi)("loadView",s);return(0,o.fetch)(r,{method:a},t)};static getCaseEditLock=(e,t)=>{const s={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:r,reqType:a}=(0,n.resolveRestApi)(i.ACTION_OPEN_CASE_WIDE_LOCAL_ACTION,s);return(0,o.fetch)(`${r}?viewType=page`,{method:a},t)};static updateCaseEditFieldsData=(e,t,s,r)=>{const a={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:c}=(0,n.resolveRestApi)(i.ACTION_OPEN_CASE_WIDE_LOCAL_ACTION,a),l=t[e];return(0,o.fetch)(`${c}?viewType=form`,{method:"PATCH",body:{content:{...l}},headers:{"if-match":s}},r)};static getCaseMessages=e=>a.getDataObject(e)?.caseMessages;static getPropertiesToReplace=e=>((0,c.getAttachmentsList)(e)||[]).filter((e=>!e.allowMultiple)).map((e=>e.fullPath));static getUniqueGadgetId=()=>l.default.generateUniqueID().substring(0,5);static getRemoteCaseMapping=()=>u.default.getRemoteCaseMapping();static isTraditionalRemoteCase=e=>u.default.isTraditionalRemoteCase(e);static getRemoteCaseKey=(e,t)=>{let s=t;try{e&&(s=e.slice(e.indexOf(" ")+1,e.indexOf("!")))}catch{}return s}}},"./src/coexistence/event.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o,publishConstellationLoadedEvent:()=>n});var r=s("./src/utils/pubsub-utils.ts"),a=s("./src/constants.ts");const n=()=>{r.default.publish(a.default.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})},o={publishConstellationLoadedEvent:n}},"./src/coexistence/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./src/container/container-utils.ts"),a=s("./src/form/form-utils.ts"),n=s("./src/interpreter/c11n-env.ts"),o=s("./src/constants.ts"),i=s("./src/case/common-helper.ts"),c=s("./src/utils/broadcast-utils.ts"),l=s("./src/coexistence/event.ts");const u=new class{activateContainerItemOnSwitch(e){const t=`${o.default.APP.APP}/${o.default.PRIMARY}`,s={target:t,containerItemID:(0,r.getContainerItemName)(t,e)};(0,n.createC11nEnv)({}).getPConnect().getContainerManager().activateContainerItem(s)}removeContainerItemOnClose(e){const t=`${o.default.APP.APP}/${o.default.PRIMARY}`,s={target:t,containerItemID:(0,r.getContainerItemName)(t,e)};(0,n.createC11nEnv)({}).getPConnect().getContainerManager().removeContainerItem(s)}showCasePreview(e,t){(0,n.createC11nEnv)({}).getPConnect().getActionsApi().showCasePreview(e,{caseClassName:t})}closeCasePreview(){(0,n.createC11nEnv)({}).getPConnect().getContainerManager().resetContainers({name:o.default.PREVIEW,context:o.default.APP.APP})}isFormDirty(e){const t=`${o.default.APP.APP}/${o.default.PRIMARY}`,s=(0,r.getContextByTargetAndKey)(t,e);return a.default.isStateModified(s)}getEventUtils(){return l.default}getBroadcastUtils(){return c.default}isTraditionalUICase(e){return(0,i.isCoexistenceCase)(e)}}},"./src/components-registry.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/utils/utils.ts");const a=new class{constructor(){this.componentMap={},this.overrideMap={},this.lazyMap={},this.customComponentLazyMap={}}register(e,t){this.componentMap[e]=t}registerLazyMap(e,t){this.lazyMap[e]=t}registerCustomComponentLazyMap(e,t){this.customComponentLazyMap[e]=t}getComponent(e){return this.componentMap[e]}getLazyComponent(e){return this.lazyMap[e]}getCustomComponent(e){return this.customComponentLazyMap[e]}mergeComponentsMap(e={}){r.default.copy(e,this.componentMap)}mergeOverrideMap(e={}){r.default.copy(e,this.overrideMap)}getOverrideMap(){return this.overrideMap}getLazyMap(){return this.lazyMap}}},"./src/constants.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a,publicConstants:()=>r});const r={APP:{APP:"app",ROOT:"root",PXREQUESTOR:"pxRequestor",PXUSERNAME:".pxUserName",OPERATORID:"OperatorID",USERNAME:"pxRequestor.pxUserName",PXUSERIDENTIFIER:".pxUserIdentifier",USERIDENTIFIER:"pxRequestor.pxUserIdentifier",PYIMAGEINSKEY:".pyImageInsKey",OPERATORID_IMG_INSKEY:"OperatorID.pyImageInsKey",OPERATORID_LOCALE:"OperatorID.pyUseLocale",APPLICATION_LABEL:"Application.pyLabel",APPLICATION_RULE_NAME:"Application.pyRuleName"},RESOURCE_TYPES:{ASSIGNMENT:"ASSIGNMENT",CASE:"CASE",DATA:"DATA",PAGE:"PAGE"},RESOURCE_STATUS:{CREATE:"CREATE",UPDATE:"UPDATE",OPEN_FLOW_ACTION:"OPEN_FLOW_ACTION"},VIEW_NAMES:{PY_CASE_TAB:"pyCaseTab",DATA_OBJECT_CREATE_VIEW:"Create",DATA_OBJECT_EDIT_VIEW:"pyEdit",PY_DATA_PREVIEW:"pyDataPreview",PY_DETAILS:"pyDetails"},CONTAINERS:{ROOT_CONTAINER:"RootContainer",VIEW_CONTAINER:"ViewContainer",FLOW_CONTAINER:"FlowContainer",MODAL_VIEW_CONTAINER:"ModalViewContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",HYBRID_VIEW_CONTAINER:"HybridViewContainer"},WORK_BASKET:{MY_WORK_LIST:"myWorkList",REPORTEE:"reportee",WORK_QUEUE:"workQueue",DATA_PAGES:{D__PY_GET_USER_WORK_LIST_BY_USER_ID:"D_pyGetUserWorkListByUserId",D__WORK_BASKET:"D_WorkBasket",D__PY_MY_WORK_LIST:"D_pyMyWorkList"}},CONTEXT_TREE_NODE_TYPES:{VIEW:"VIEW",FIELD:"FIELD",DECLARATIVE_TARGET:"DECLARATIVE_TARGET",WHEN:"WHEN",CONTEXT:"CONTEXT",PAGELIST:"PAGELIST"},WORKLIST:"worklist",WAIT:"wait",TODO:"todo",STANDARD_FLOW:"Standard",CASE:"CASE",ASSIGNMENT:"ASSIGNMENT",FIX_BROKEN_ASSIGNMENTS:"FixBrokenAssignments",PAGE:"PAGE",PZINSKEY:".pzInsKey",CREATE_DETAILS_VIEW_NAME:"pzCreateDetails",PREVIEW_VIEW_NAME:"pyCasePreview",CASESUMMARY_VIEW_NAME:"pyCaseSummary",APPSHELL_ACTIVE_CASES:"appshell-activecases",TRACE_ID:"x-b3-traceid",LOAD_VIEW_STRING:"View",PRIMARY:"primary",DEFER_UPDATE_CASESUMMARY_VIEW:"deferUpdateCaseSummaryView",NEXT_ASSIGNMENT_INFO_ID:"nextAssignmentInfo.ID",WORKCLASS:"Work-",DATA_INFO:{DATA_INFO_CONTENT:"dataInfo.content"},CASE_INFO:{CASE_INFO:"caseInfo",CASE_INFO_CONTENT:"caseInfo.content",CASE_INFO_NAME:"caseInfo.name",CASE_INFO_ID:"caseInfo.ID",CASE_INFO_CLASSID:"caseInfo.content.classID",CASE_TYPE_ID:"caseInfo.caseTypeID",CASE_TYPE_NAME:"caseInfo.caseTypeName",CASE_INFO_PZINSKEY:"caseInfo.content.pzInsKey",CASE_INFO_ACTIONS:"caseInfo.availableActions",VIEW_NAME:"caseInfo.content.pyViewName",ACTION_BUTTONS:"caseInfo.actionButtons",ACTIVE_ACTION_ID:"caseInfo.activeActionID",ASSIGNMENT_LABEL:"caseInfo.assignments[0].name",ASSIGNMENT_ID:"caseInfo.assignments[0].ID",ASSIGNMENTS:"caseInfo.assignments",INSTRUCTIONS:"caseInfo.assignments[0].instructions",NAVIGATION:"caseInfo.navigation",STAGES:"caseInfo.stages",STAGEID:"caseInfo.stageID",CASECLASS:"caseInfo.caseClass",AVAILABLEACTIONS:"caseInfo.availableActions",AVAILABLEPROCESSES:"caseInfo.availableProcesses",D_CASE_ASSIGNMENTS_RESULTS:"caseInfo.assignments",CHILD_ASSIGNMENTS:"caseInfo.childCases",ASSIGNMENTACTION_ID:"caseInfo.assignments[0].actions[0].ID",ISINCREATESTAGE:"caseInfo.isInCreateStage",APPROVALFLAG:"caseInfo.content.pyApprovalResult",DUPLICATECASEFLAG:"caseInfo.content.pyDuplicateCaseActions",DUPLICATECASEID:"caseInfo.content.pyDuplicateID",DUPLICATECASEINSKEY:"caseInfo.content.pyDuplicateCaseReference.pzInsKey",HEADERS:"caseInfo.headers",PARENTCASEINFO:"caseInfo.parentCaseInfo",REMOTESYSTEMID:"caseInfo.headers.RemoteSystemID",CASE_RELATED_CASE_TYPES:"caseInfo.relatedCaseTypes",CASES:"caseInfo.cases",GETNEXTWORK:"caseInfo.confirmationLinks.getNextWork",ACTION_REFRESH_CONDITIONS:"caseInfo.assignments[0].actions[0].refreshConditions",IS_LOCAL_ACTION:"caseInfo.isLocalAction",BUSINESS_ID:"caseInfo.businessID"},ACTIONS:{ACTION_ID:"actionID",ACTIONS:"availableActions",DELETEAVIALACTIONS:"deleteAvailActions",FLOWACTION:"FlowAction",DATA_PAGES:{D_PY_ADDITIONAL_CASE_ACTIONS:"D_pyAdditionalCaseActions"}},PROCESS:{FLOWPROBLEMS:"FlowProblems"},PAGE_TYPES:{PAGE:"page",LANDINGPAGE:"landingpage",LISTPAGE:"listpage"},LOCAL_ACTION_TYPE:{CASE_WIDE:"case",EXPRESS:"express",ASSIGNMENT:"Assignment",LOCAL_ACTION:"LocalAction"},LOCAL_ACTIONS:{TRANSFER_ASSIGNMENT:"pyTransferAssignment"},CONTENT:"content",MODAL:"modal",STOPMERGEACTIONS:"stopMergeActions",IS_CREATE_DATA_OBJECT:"isCreateDataObject",SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME:"context_data.caseInfo.content.summary_of_assignment__.lastSubmitTime",SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME:"context_data.caseInfo.content.summary_of_attachments__.lastRefreshTime",CONTEXT_DATA_ASSIGNMENTID:"context_data.assignmentID",BANNER_VARIANT_SUCCESS:"success",BANNER_VARIANT_WARNING:"warning",BANNER_VARIANT_URGENT:"urgent",BANNER_VARIANT_INFO:"info",MESSAGES:{MESSAGES_TYPE_SUCCESS:"success",MESSAGES_TYPE_INFO:"info",MESSAGES_TYPE_ERROR:"error"},PUB_SUB_EVENTS:{EVENT_RENDER_APP:"renderApp",EVENT_REAUTH:"reAuth",EVENT_FULL_REAUTH:"fullReAuth",EVENT_CUSTOM_REAUTH:"customReAuth",EVENT_CANCEL:"cancel",EVENT_MINIMIZE:"minimize",EVENT_EXPRESS_LOCALACTION:"expressLocalActionSubmit",EVENT_BULKACTION:"bulkActionSubmit",EVENT_SHOW_CANCEL_ALERT:"showCancelAlert",EVENT_SHOW_DELETE_ALERT:"showDeleteAlert",EVENT_DASHBOARD_FILTER_CHANGE:"dashboardFilterChange",EVENT_DASHBOARD_FILTER_CLEAR_ALL:"dashboardFilterClearAll",EVENT_PROMOTED_FILTERS_CHANGE:"promotedFiltersChange",EVENT_LOGOFF:"Logoff",EVENT_TRANSIENT_ITEMS:{UPDATE_PROMOTED_FILTERS:"updatePromotedFilters"},UI_EVENTS:{SHOW_PAGE_INIT:"showPageInit",SHOW_PAGE_DONE:"showPageDone",SHOW_PAGE_STARTED:"showPageStarted"},CASE_EVENTS:{CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW:"caseAttachmentsUpdateFromCaseview",CASE_FOLLOWER_UPDATED_BY_OPERATOR_FROM_CASEVIEW:"caseFollowerUpdateByOperatorFromCaseview",CASE_FOLLOWER_UPDATE_BY_OPERATOR_FROM_WIDGET:"caseFollowerUpdateByOperatorFromWidget",CASE_CREATED:"caseCreated",CREATE_STAGE_DONE:"caseCreatedDone",CREATE_STAGE_CANCELLED:"caseCancelled",CREATE_STAGE_SAVED:"caseSaved",CREATE_STAGE_DELETED:"caseDeleted",ASSIGNMENT_SUBMISSION:"assignmentSubmission",END_OF_ASSIGNMENT_PROCESSING:"endOfAssignmentProcessing",CLOSE_CONFIRM_VIEW:"closeConfirmView",CASE_OPENED:"caseOpened",CASE_CLOSED:"caseClosed",ASSIGNMENT_OPENED:"assignmentOpened",CASE_PREVIEW:"casePreview",CURRENT_ASSIGNMENT_UPDATED:"currentAssignmentUpdated",CASE_LOCK_EVENT:"caseLockEvent"},BOOTSTRAP_SHELL_EVENTS:{CONSTELLATION_LOADED:"CONSTELLATION_LOADED"},CONTAINER_EVENTS:{CLOSE_CONTAINER_ITEM:"CLOSE_CONTAINER_ITEM",CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM:"CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM"},DISPLAY_CASE_CREATED_TOASTER:"displayCaseCreatedToaster",DATA_EVENTS:{DATA_OBJECT_CREATED:"dataObjectCreated",DATA_OBJECT_DELETED:"dataObjectDeleted",DATA_OBJECT_UPDATED:"dataObjectUpdated"},FETCH_SUCCESS:"fetchSuccess",REVERSE_COEXISTENCE_EVENTS:{HANDLE_DISCARD:"handleDiscard",CHECK_IS_FORM_DIRTY:"checkIsFormDirty"},TIMEOUT_REMINDER:"sessionAboutToTimeout",RESET_TIMER:"resetInactivityTimer"},CONTAINER_TYPE:{MULTIPLE:"multiple",SINGLE:"single",HYBRID:"HybridViewContainer"},REMOTE_SYSTEM_ID:"RemoteSystemID",LIST_SELECTION_MODE:{MULTI:"multi",SINGLE:"single",MULTI_ON_HOVER:"multi_on_hover"},SUBMISSION_FAILURE_TYPE:{FORM_VALIDATION_ERROR:"formValidationError"},USER_SETTINGS:{UTILITY_PANEL_USER_STATE_PATH:"presentation.templates.CaseView.utilityPanelExpanded",SUMMARY_PANEL_USER_STATE_PATH:"presentation.templates.CaseView.summaryPanelExpanded",ASSIGNMENT_COLLAPSED_STATE_PATH:"presentation.templates.CaseView.assignmentWidgetCollapsed",CASE_VIEW_PATH:"presentation.templates.CaseView"},PROMISE_VALUE:{RESOLVE:"resolve",REJECT:"reject"},APP_TYPE:{UIKIT:"uikit",THEME_COSMOS:"themecosmos"},VIEW_TYPE:{PY_EMBEDASSIGNMENT:"pyEmbedAssignment",PY_DETAILS:"pyDetails"},START_PERFORMANCE_LOG:"start-performance-log",STOP_PERFORMANCE_LOG:"stop-performance-log",TOP_ACTION_LABEL:{CREATEWORK:"Create-Work",OPENASSIGNMENT:"Open-Assignment",OPENWORKBYHANDLE:"Open-Work-By-Handle",SAVEANDCLOSE:"Save-And-Close",SHOWDATA:"Show-Data",FINISHASSIGNMENT:"Finish-Assignment",GETDESCENDANTS:"Get-Descendants"}},a={CONTEXT:"context",AJAXCONTAINER:"primary",VIEW_CONTAINER:"ViewContainer",APP_SHELL:"AppShell",ROOT_CONTAINER:"RootContainer",HYBRID_VIEW_CONTAINER:"HybridViewContainer",MODAL_VIEW_CONTAINER:"ModalViewContainer",FLOW_CONTAINER:"FlowContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",OBJECT_PAGE:"ObjectPage",CASE_CREATE_STAGE:"CaseCreateStage",CASE_VIEW:"CaseView",VIEW:"view",CASE_PREVIEW:"CasePreview",CASE_STAGES:"Stages",CASEMESSAGES:"caseMessages",SUGGESTION:"suggestion",PREVIEW:"preview",TERTIARY:"tertiary",DEFAULT:"default",ACPRIMARY:"primary",ACTERTIARY:"tertiary",PERFORM_MODE:"perform",CASE_VIEW_MODE_PROP:".caseViewMode",REVIEW_MODE:"review",WORKAREA:"workarea",ACPRIMARY_NAME:"ACPRIMARY",ACTERTIARY_NAME:"ACTERTIARY",THREADNAMESEPARATOR:"/",JOINCHARACTER:"_",FORWARD_SLASH_STRING:"/",UNDERSCORE_STRING:"_",WORK_ID:"WORK_ID",EMPTY_STRING:"",PROPERTY_MESSAGES:"propertyMessages__",CONTEXT_MESSAGES:"contextMessages__",HTTP_MESSAGES:"httpMessages__",PAGE_MESSAGES:"pageMessages__",SUMMARY_OF_LISTS:"summary_of_lists__",SUMMARY_OF_GROUPS:"summary_of_groups__",SUMMARY_OF_MESSAGES:"summary_of_messages__",SUMMARY_OF_FIELD_VALUES:"summary_of_field_values__",SUMMARY_OF_WHEN_CONDITIONS:"summary_of_when_conditions__",SUMMARY_OF_EXPRESSIONS:"summary_of_expressions__",SUMMARY_OF_ASSOCIATED_LISTS:"summary_of_associated_lists__",CONTEXT_DATA:"context_data",TABLE:e=>`Table[${e}]`,HTTP:"HTTP",PROPERTY:"PROPERTY",PAGE_ERRORS:"page_level_errors",NO_MESSAGES:"No messages existing",PULSE_REFERENCE:"pulse.messages",IS_LOADING:"isLoading",APPROVED:"Approved",REJECTED:"Rejected",DUPLICATE:"Duplicate",IGNORE:"Ignore",PARAGRAPH:"PARAGRAPH",X_ORIGIN_CHANNEL:"x-origin-channel",AUTHORING_PREVIEW_CONTAINER:"root/authoring-preview",ERROR_FIELD_IN_PAGE:"erroneousInputOutputFieldInPage",ERROR_IN_PAGE_IDENTIFIER:"erroneousInputOutputIdentifier",UI_RESOURCES:"uiResources",UI_RESOURCES_CONTEXT_DATA:"uiResources.context_data",ACTION_BUTTONS:"uiResources.actionButtons",RESOURCES:"uiResources.resources",ROOT:"uiResources.root",CASE_INFO_IS_LOCAL_ACTION:"caseInfo.isLocalAction",DATA:"data",OPTIONS:"options",VIEWS:"uiResources.resources.views",NAVIGATIONS:"uiResources.resources.navigations",COMPONENTS:"uiResources.components",LOCALE_REFERENCES:"uiResources.localeReferences",STATIC_SERVER_URL:"staticServer",APPLICATION_DATA:"data.Application",REFERENCED_USERS:"referencedUsers",CASE_INFO_REFRESH_CONDITIONS:"caseInfo.refreshConditions",FIELD_LEVEL_SUCCESS:"success",FIELD_LEVEL_WARNING:"warning",FIELD_LEVEL_ERROR:"error",HASH_DELIMITER:"~^|^~",NULL_STRING:"null",DATA_PAGE:"DataPage",DECISION:"Decision",RULE_REFERENCE:"RuleReference",GET_PAGE_DATA:"getPageData",PROPERTY_ANNOTATION:"@P",FIELD_LABEL_ANNOTATION:"@FL",ATTACHMENT_ANNOTATION:"@ATTACHMENT",ASSOCIATED_PROPERTY_ANNOTATION:"@ASSOCIATED",CLASS_ANNOTATION:"@CLASS",ASSOCIATED:"associated",CLASS_ID:".classID",CLASSID:"classID",READONLY:"readonly",SHARED:"shared",RELOAD_IF_OLDER_THAN:"reloadIfOlderThan",RELOAD_ONCE_PER_INTERACTION:"reloadOncePerInteraction",PY_DETAILS:"pyDetails",LIST_ACTIONS:{INSERT:"INSERT",UPDATE:"UPDATE",DELETE:"DELETE",DELETE_ALL:"DELETE ALL",MOVE:"MOVE",SELECT:"SELECT",DESELECT:"DESELECT"},LIST_ACTIONS_TYPE:{SELECT_DESELECT:"SELECT_DESELECT",DESELECT_ALL:"DESELECT_ALL"},ENV_INFO_KEYS:{APPLICATION_NAME:"APPLICATION_NAME",APPLICATION_DESC:"APPLICATION_DESC",ACCESS_GROUP:"ACCESS_GROUP",USER_NAME:"USER_NAME",USER_ID:"USER_ID",USER_IMAGE:"USER_IMAGE",LOCALE:"LOCALE",TIMEZONE:"TIMEZONE",WORK_GROUP:"WORK_GROUP"},ID:"ID",SCALARLIST:"ScalarList",COREHEADERS:"coreHeaders",SKIPCOREHEADERS:"skipCoreHeaders",COREHEADER_APP_DEBUG_ID:"X-Pega-App-Debug-ID",COREHEADER_APP_DEBUG_LEVELS:"X-Pega-App-Debug-Levels",CONTEXT_DATA_MODAL_VIEW:{IS_MULTI_RECORD_DATA:"context_data.modalView.isMultiRecordData",VIEW_NAME:"context_data.modalView.viewName",PARENT_CONTEXT:"context_data.modalView.parentContext",INTERESTPAGE:"context_data.modalView.interestPage"},DATA_CLASS_NOT_FOUND:"Data object class not found",PRIORITY:{CRITICAL:100,HIGH:500,MEDIUM:1e3,LOW:2e3,TRIVIAL:3e3},...r}},"./src/container/container-manager.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var r=s("./src/store/state/state-manager.ts"),a=s("./src/utils/context-utils.ts"),n=s("./src/router/routing-manager.ts"),o=s("./src/store/state/actions/action-creators.ts"),i=s("./src/store/state/actions/index.ts"),c=s("./src/actions/manager.ts"),l=s("./src/constants.ts"),u=s("./src/container/container-utils.ts"),d=s("./src/container/flow-container.ts");const p=class{constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{const t=c.ActionManagerInstance.getNextActionMgrId();let s,r;const a=new Promise(((e,t)=>{s=e,r=t}));return c.ActionManagerInstance.register(t,a,s,r,e),{actionMgrID:t,promise:a}};initializeContainers(e){const t=i.INIT_CONTAINERS,s=this.c11nEnv,a={context:s.getContextName(),name:s.getContainerName(),type:l.default.CONTAINER_TYPE.SINGLE},{actionMgrID:n,promise:c}=this.containerManagerPromise(t),u={...a,...e,actionMgrID:n};return(0,r.dispatch)((0,o.initContainers)(u)),c}addContainerItem(e){const t=i.ADD_CONTAINER_ITEM,s=this.c11nEnv,c=s.getMetadata(),{children:u}=c||{};let d;u&&([d]=u);const p=s.getContextName(),f=s.getContainerName(),h=a.buildContextName(f,p,e?.containerType===l.default.CONTAINER_TYPE.SINGLE),g=n.getResolvedTargetName(f,p),m={root:{...d,config:{...d?.config,context:d?.config?.context||s.getPageReference?.()}},containerItemID:h,context:h,target:g,containerName:f};e=JSON.parse(JSON.stringify(e)),[l.default.WORKAREA].includes(f)&&delete e.data?.coreHeaders;const{actionMgrID:E,promise:A}=this.containerManagerPromise(t),_={...m,...e,actionMgrID:E};return(0,r.dispatch)((0,o.addContainerItem)(_)),A}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));const t=i.UPDATE_CONTAINER_ITEM,s={context:(0,u.getDataContextName)(e.containerItemID),target:(0,u.getTargetFromContainerItemID)(e.containerItemID)},{actionMgrID:a,promise:n}=this.containerManagerPromise(t),c={...s,...e,actionMgrID:a};return(0,r.dispatch)((0,o.updateContainerItem)(c)),n}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));const t=i.ACTIVATE_CONTAINER_ITEM,s={target:(0,u.getTargetFromContainerItemID)(e.containerItemID)},{actionMgrID:a,promise:n}=this.containerManagerPromise(t),c={...s,...e,actionMgrID:a};return(0,r.dispatch)((0,o.activateContainerItem)(c)),n}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));const t=i.REMOVE_CONTAINER_ITEM,s={context:(0,u.getDataContextName)(e.containerItemID),target:(0,u.getTargetFromContainerItemID)(e.containerItemID)},{actionMgrID:a,promise:n}=this.containerManagerPromise(t),c={...s,...e,actionMgrID:a};return(0,r.dispatch)((0,o.removeContainerItem)(c)),n}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));const t=i.RESET_CONTAINERS,s=(0,u.resetContainersPayload)(e),{actionMgrID:a,promise:n}=this.containerManagerPromise(t),c={...s,...e,actionMgrID:a};return(0,r.dispatch)((0,o.resetContainers)(c)),n}addTransientItem(e){const{id:t,data:s}=e,n=this.c11nEnv.getContextName(),i=a.getTransientContext(t,n),c=(0,u.getTransientItems)(n);return i&&c.includes(i)||(0,r.dispatch)((0,o.addTransientItem)({transientItemID:i,contextName:n,target:(0,u.getTargetFromContainerItemID)(n),data:s})),i}updateTransientData(e){const{transientItemID:t,data:s}=e,a=this.c11nEnv.getContextName();if(t){if(!(0,u.getTransientItems)(a).includes(t))return;(0,r.dispatch)((0,o.updateTransientData)({transientItemID:t,data:s}))}}removeTransientItem(e){const t=this.c11nEnv.getContextName(),{target:s=this.c11nEnv.getTarget(),containerItemID:a,transientItemID:n}=e;if(n&&a){if(!(0,u.getTransientItems)(t).includes(n))return;(0,r.dispatch)((0,o.removeTransientItem)({target:s,containerItemID:a,transientItemID:n}))}}createContainerPConnect(e,t,s,r=!1){d.default.createContainerPConnect(e,t,s,r)}hasContainerItems(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return(0,u.hasContainerItems)(`${e}/${t}`)}isContainerInitialized(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return(0,u.isContainerInitialized)(e,t)}}},"./src/container/container-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{CONTAINER_NAMES:()=>I,CONTAINER_TYPES:()=>_,addRootContainerItem:()=>X,areContainerItemsPresent:()=>N,clearTransientData:()=>re,closeContainerItem:()=>J,getActiveContainerItemContext:()=>j,getActiveContainerItemIDFromRoutingInfo:()=>ge,getActiveContainerItemName:()=>x,getActiveContext:()=>de,getChildContainerItems:()=>L,getChildContainers:()=>U,getChildContainersContexts:()=>F,getContainerAPI:()=>oe,getContainerAccessOrder:()=>T,getContainerData:()=>C,getContainerItemData:()=>S,getContainerItemName:()=>R,getContainerItems:()=>b,getContainerLimit:()=>B,getContainerParentContext:()=>he,getContainerType:()=>D,getContextByTargetAndKey:()=>fe,getDataContextName:()=>w,getFlowContainer:()=>Ee,getLeastRecentlyUsedNonDirtyContainerItemID:()=>K,getParentContainerItem:()=>me,getRootContainerName:()=>ue,getSuggestionContexts:()=>k,getTargetFromContainerItemID:()=>z,getTransientItems:()=>ee,hasContainerItems:()=>$,isContainerDirty:()=>Y,isContainerInitialized:()=>O,isContainerItemActive:()=>P,isContainerItemContextBeingUsedInOtherContainers:()=>Z,isContainerItemExists:()=>v,isContainerLimitReached:()=>W,isContainerMultipleMode:()=>G,isContainerSingleMode:()=>V,purgeTransientData:()=>ae,removeContainer:()=>ie,replaceTransientData:()=>se,resetContainersPayload:()=>q,setContainerLimit:()=>H,updateCaseContextEtag:()=>le,updateParentLastUpdateTime:()=>pe,updateRelatedContextEtag:()=>ce,updateTransientData:()=>te});var r=s("./src/router/app-router.ts"),a=s("./src/constants.ts"),n=s("./src/utils/context-utils.ts"),o=s("./src/router/routing-manager.ts"),i=s("./src/utils/logs-handler.ts"),c=s("./src/utils/utils.ts"),l=s("./src/locale/locale-utils.ts"),u=s("./src/environment-info/index.ts"),d=s("./src/store/state/actions/action-creators.ts"),p=s("./src/store/state/state-manager.ts"),f=s("./src/store/state/middlewares/property-change-middleware.ts"),h=s("./src/store/state/epics/util.ts"),g=s("./src/store/state/actions/index.ts"),m=s("./src/store/state/active-context.ts"),E=s("./src/container/flow-container.ts");const A={defaultLimit:16},_={SINGLE:"single",MULTIPLE:"multiple"},I={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},y=()=>(0,p.getStore)()?.getState()?.containers,C=e=>e?(0,p.getStore)()?.getState().containers[e]:(i.default.error("getContainerData: target is the required parameter"),null),S=(e,t)=>{if(!e||!t)return null;const s=y()?.[e];return s&&s.items&&s.items[t]||null},b=e=>e?(0,p.getStore)()?.getState().containers[e]?.items:(i.default.error("getContainerItems: target is the required parameter"),null),T=e=>e?(0,p.getStore)()?.getState().containers[e]?.accessedOrder||[]:(i.default.error("getContainerAccessOrder: target is the required parameter"),[]),N=e=>e?T(e)?.length>0||!1:(i.default.error("areContainerItemsPresent: target is the required parameter"),!1),v=(e,t,s)=>{if(!e||!t)return i.default.error("isContainerItemExists: target and key are required parameters"),!1;const r=y()?.[e],a=r&&r.items||null,n=s||((e,t)=>e===t);if(t&&a)for(const e in a)if(n(t,a[e].key))return!0;return!1},R=(e,t,s)=>{if(!e||!t)return i.default.error("getContainerItemName: target and key are required parameters"),null;const r=y()?.[e],a=r&&r.items||null,n=s||((e,t)=>e?.toLowerCase()===t?.toLowerCase());if(t&&a)for(const e in a)if(n(t,a[e].key))return e;return null},O=(e,t)=>{if(!e||!t)return i.default.error("isContainerInitialized: context and name are required parameters"),!1;const s=y();return s&&Object.prototype.hasOwnProperty.call(s,`${e}/${t}`)},D=(e,t)=>{if(!e||!t)return i.default.error("getContainerType: context and name are required parameters"),null;const s=y()?.[`${e}/${t}`];return s&&s.type},x=e=>{if(!e)return i.default.error("getActiveContainerItemName: target is the required parameter"),null;let t=null;const s=y();if(s&&s[e]){const r=s[e],{accessedOrder:a}=r;t=a&&a.length>0?a[a.length-1]:null}return t},P=(e,t,s)=>{if(!e||!t)return i.default.error("isContainerItemActive: target and key are required parameters"),!1;const r=R(e,t,s);return!!r&&r===x(e)},M=(e,t)=>{let s=null;const r=y();for(const a in r)if(Object.prototype.hasOwnProperty.call(r,a)&&r[a].items){const n=r[a].items[e];if(s=n?n[t]:null,s)break}return s},w=e=>e?M(e,"context"):(i.default.error("getDataContextName: containerItemName is required parameters"),null),j=e=>{if(!e)return i.default.error("getActiveContainerItemContext: target is required parameters"),null;let t=null;const s=y();if(s&&s[e]){const r=s[e],{accessedOrder:a}=r,n=a&&a.length>0?a[a.length-1]:null;t=w(n)}return t},L=e=>{if(!e)return i.default.error("getChildContainerItems: containerItemName is required parameters"),[];const t=e.endsWith("/")?e:`${e}/`;let s=[],r=!1;const a=y(),n=s=>{const a=[];return Object.keys(s).forEach((s=>{s.startsWith(t)&&s!==t&&a.push(s),s===e&&(r=!0)})),a};for(const e in a)if(Object.prototype.hasOwnProperty.call(a,e)&&a[e].items){const t=n(a[e].items);t&&t.length>0&&(s=s.concat(t)),s=s.sort()}return r?s:[]},U=e=>{if(!e)return i.default.error("getChildContainers: containerItemName is required parameters"),[];const t=[],s=y();for(const r in s)Object.prototype.hasOwnProperty.call(s,r)&&r.startsWith(e)&&r!==e&&t.push(r);return t},F=e=>{if(!e)return i.default.error("getChildContainersContexts: parentContainerItemID is required parameters"),[];const t=[],s=y();for(const r in s)Object.prototype.hasOwnProperty.call(s,r)&&r.startsWith(e)&&r!==e&&(T(r)||[]).forEach((s=>{w(s)!==e&&t.push(w(s))}));return t},k=e=>{const t=[...F(e),e],s=[],r=(0,p.getStore)()?.getState().data||{};return t.forEach((e=>{Object.prototype.hasOwnProperty.call(r,`${e}/${a.default.SUGGESTION}`)&&s.push(`${e}/${a.default.SUGGESTION}`)})),s},V=e=>e?e&&C(e)&&C(e).type===_.SINGLE:(i.default.error("isContainerSingleMode: target is required parameters"),null),G=e=>e?e&&C(e)&&C(e).type===_.MULTIPLE:(i.default.error("isContainerMultipleMode: target is required parameters"),null),$=e=>e?C(e)&&C(e).items&&Object.keys(C(e)?.items).length>0||!1:(i.default.error("hasContainerItems: target is required parameters"),!1),B=e=>e&&A[e]?A[e]:A.defaultLimit,H=(e,t=A.defaultLimit)=>{e?A[e]=t:i.default.error("setContainerLimit: target is required parameter")},W=e=>{if(!e)return i.default.error("isContainerLimitReached: target is required parameter"),!1;let t=!1;const s=C(e),{items:r={}}=s,a=Object.keys(r),n=B(e);return a&&a.length>0&&a.length>=n&&(t=!0),t},q=e=>{if(!e||!e.name||!e.context)return i.default.error("resetContainersPayload: containerInfo object should contain name and context"),null;const t=e?.name,s=C(`${e?.context}/${t}`),r=Array.isArray(s?.accessedOrder)&&s?.accessedOrder.map((e=>s?.items[`${e}`]?.context))||[],n=U(`${a.default.APP.APP}/${a.default.PREVIEW}`),o=F(`${a.default.APP.APP}/${a.default.PREVIEW}`);return{context:e?.context,name:t,containerItems:[...r,...o],childContainers:n}},Y=e=>{if(!e)return i.default.error("isContainerDirty: containerItemID is the required parameter"),!1;const t=w(e);return(0,f.isContextDirty)(t)||(0,h.areChildContextsInDirtyState)(e)},K=e=>{if(!e)return i.default.error("getLeastRecentlyUsedNonDirtyContainerItemID: target is required parameter"),null;let t;const s=C(e),{accessedOrder:r=[]}=s;for(let e=0;e<r.length;e+=1){const s=r[e];if(!Y(s)){t=s;break}}return t},z=e=>{if(!e)return i.default.error("getTargetFromContainerItemID: containerItemID is the required parameter"),null;const{containers:t}=(0,p.getStore)()?.getState()||{};for(const s in t)if(t[s]?.accessedOrder?.includes(e))return s;const s=e.lastIndexOf(a.default.UNDERSCORE_STRING);return e.substring(0,s)},J=(e,t={})=>{if(!e)return i.default.error("closeContainerItem: containerItemID is the required parameter"),Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));const s=z(e),n=w(e),{skipDirtyCheck:o}=t;let c=!0,u=[];if(Y(e)&&!o&&(c=window.confirm(l.localeUtils.getLocaleValue(f.FORM_DIRTY_MESSAGE,"Messages"))),c){const{accessedOrder:t=[],items:o={},type:i}=C(s);u=t.filter((t=>t!==e));const c=u[u.length-1],l=o[c]||{},{semanticURL:f=a.default.FORWARD_SLASH_STRING,context:h}=l;u.length>0&&f&&f!==a.default.FORWARD_SLASH_STRING?(0,r.parseResponse)({directUrlUpdation:!0,semanticURL:f,options:{containerItemID:c,context:h}}):(0,r.parseResponse)({directUrlUpdation:!0,semanticURL:a.default.FORWARD_SLASH_STRING,options:{}});const g={newAccessedOrder:u,containerType:i};(0,p.dispatch)((0,d.removeContainerItem)({containerItemID:e,context:n,target:s,containerInfo:g}))}return Promise.resolve({newAccessedOrder:u,removeItem:c})},X=(e,t,s,r)=>{const a="root",i=n.buildContextName(t,a,!0),c={root:e,containerItemID:i,context:r?"app":i,target:o.getResolvedTargetName(t,a),containerName:t},l={data:s,context:r?"app":i},u=[(0,d.addContainerItem)(c)];u.push((0,d.mergeData)(l)),(0,p.dispatch)(u)},Q=(e,t,s)=>{let r=T(e);r=r.filter((e=>e!==t));let a=!1;for(let e=0;e<r.length;e+=1)if(w(r[e])===s){a=!0;break}return a},Z=e=>{if(!e)return i.default.error("isContainerItemContextBeingUsedInOtherContainers: containerItemID is the required parameter"),!1;const t=y(),s=w(e),r=t?Object.keys(t):[];let a=!1;for(let t=0;t<r.length&&(a=Q(r[t],e,s),!a);t+=1);return a},ee=e=>{Array.isArray(e)||(e=[e]);const t=y()||{};return e.map((e=>{const s=z(e);return c.default.getIn(t,[s,"items",e,"transientItems"])||[]})).flat()},te=e=>{const{transientItemID:t,data:s,options:r}=e,a=c.default.deepClone((0,p.getStore)()?.getState().data[t]);r?.reset&&c.default.iterateLeafNodes(a,(e=>{"classID"!==e[e.length-1]&&c.default.setIn(a,e,"")})),(0,p.dispatch)((0,d.updateTransientData)({transientItemID:t,data:c.default.mergeDeep(s,a)}))},se=e=>{const{transientItemID:t,data:s}=e;(0,p.dispatch)((0,d.replaceTransientData)({transientItemID:t,data:s}))},re=e=>{const t=c.default.deepClone((0,p.getStore)()?.getState().data[e]);c.default.iterateLeafNodes(t,(e=>{"classID"!==e[e.length-1]&&c.default.setIn(t,e,"")})),(0,p.dispatch)((0,d.clearTransientData)({transientItemID:e,data:t}))},ae=e=>{const t=c.default.deepClone((0,p.getStore)()?.getState().data[e]);c.default.iterateLeafNodes(t,(e=>c.default.setIn(t,e,""))),(0,p.dispatch)((0,d.purgeTransientData)({transientItemID:e,data:t}))};class ne{static addContainerItems(e){this.items=e}static getContainerItems(){return this.items}static deleteContainerItem(e){const t=this?.items?.indexOf(e);void 0!==t&&-1!==t&&this.items.splice(t,1)}}const oe=()=>ne,ie=e=>{const t={containerName:e};t.childContainers=U(e),(0,p.dispatch)({type:g.REMOVE_CONTAINER,payload:t})},ce=(e,t)=>{const s=L(e),{key:r}=S(z(e),e),a=[];s.forEach((e=>{const{key:s}=S(z(e),e);if(s===r){const s={data:{caseInfo:{headers:{etag:t}}},target:z(e),context:e};a.push({type:g.MERGE_DATA,payload:s})}})),a.length&&(0,p.dispatch)(a)},le=(e,t)=>{const s=[],r={data:{caseInfo:{headers:{etag:t}}},target:z(e),context:e};s.push({type:g.MERGE_DATA,payload:r}),s.length&&(0,p.dispatch)(s)},ue=()=>u.default.isPortalLoaded?"app":"root",de=()=>m.default,pe=(e,t)=>{const s={data:{caseInfo:{lastUpdateTime:t}},target:z(e),context:e};(0,p.dispatch)({type:g.MERGE_DATA,payload:s})},fe=(e,t)=>{const s=R(e,t),r=R(`${s}/workarea`,t);return w(r)},he=e=>e?M(e,"parentContext"):(i.default.error("getContainerParentContext: containerItemName is required parameters"),null),ge=e=>{const{accessedOrder:t}=e;return t&&t.length>0?t[t.length-1]:""},me=e=>{if(e&&"string"==typeof e){const t=e.split("/");return t.pop(),t.join("/")}return null},Ee=()=>E.default},"./src/container/flow-container.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/constants.ts"),a=s("./src/annotation/utils.ts"),n=s("./src/store/state/state-manager.ts"),o=s("./src/interpreter/c11n-env.ts"),i=s("./src/container/container-utils.ts");const c=class{static createContainerPConnect(e,t,s,a=!1){const{accessedOrder:n,items:c}=e;if(n&&c){const e=n[n.length-1];if(c[e]?.view&&Object.keys(c[e].view).length>0){const n=c[e],l=e.substring(0,e.lastIndexOf("_")),{view:u,context:d}=n,{viewName:p,viewContext:f}=this.processRootViewDetails(u,n,t);if(!p)return null;const h={meta:u,options:{context:d,pageReference:f||t,containerName:s,containerItemID:e,parentPageReference:t,hasForm:a||s===i.CONTAINER_NAMES.WORKAREA||s===i.CONTAINER_NAMES.MODAL||p===r.default.CREATE_DETAILS_VIEW_NAME,target:l}};return(0,o.createC11nEnv)(h).getPConnect}}return null}static processRootViewDetails(e,t,s){const{config:{context:r,name:o}={}}=e,{context:i}=t;let c=o,l=r;const u=a.default.isProperty(o),d=a.default.isProperty(r);if(d){const e=a.default.getPropertyName(r);l=(0,n.getValue)(`.${e}`,e.startsWith(".")?s:"",i)}if(l||(l=s),u){const e=a.default.getPropertyName(o);c=(0,n.getValue)(`.${e}`,l,i)}return u&&d&&""!==c&&(c=o,l=r),{viewName:c,viewContext:l}}static addFlowContainerItem(e){const t=e.getContainerManager(),s=e.getContextName();let r,a;if("review"!==e.getValue("context_data.caseViewMode")){const e=s.substring(0,s.lastIndexOf("_")),t=(0,i.getActiveContainerItemName)(e),n=(0,i.getContainerItemData)(e,t);n&&({key:r,flowName:a}=n)}t.addContainerItem({semanticURL:"",key:r,flowName:a,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(s)})}}},"./src/context/context-processor.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var r=s("./src/utils/utils.ts"),a=s("./src/store/state/state-manager.ts"),n=s("./src/rules/rules-store.ts"),o=s("./src/annotation/processor.ts"),i=s("./src/constants.ts"),c=s("./src/store/state/actions/action-creators.ts");const l=i.default.SUMMARY_OF_LISTS,u=i.default.SUMMARY_OF_WHEN_CONDITIONS;class d{static updateData(e){Object.keys(e).forEach((t=>{a.dispatch((0,c.mergeData)({context:t,data:e[t]}))}))}static updateContextData(e){Object.keys(e).forEach((t=>{a.dispatch((0,c.mergeData)({context:t,data:e[t]}))}))}static resolveWhen(e,t){return!!t.getContextDataValue(`.${u}.${e}`)}static resolveFieldValue(e,t){return t.getLocalizedValue(e)}static resolveNavigation(e,t){return n.resolveNavigation([this.resolveName(e,t)])}static resolveView(e,t,s=""){const r=n.resolveView([this.resolveName(e,t)]);let a=[];return Array.isArray(r)&&r.length>0?(t&&(s||(s=t.getValue(i.default.CLASS_ID)),a=r.filter((e=>e[i.default.CLASSID]===s))),0===a.length?r[0]:a[0]):r}static resolveName(e,t){return e?.startsWith("param.")?(e=e.substring("param.".length),t.getContextDataValue(`.$parameters.${e}`)):(e?.startsWith("@")&&(e=o.default.handleAnnotation(e,t)),e)}static getContextPath(e,t){return"number"!=typeof t&&!t||"number"!=typeof(t=o.default.trimAnnotation(t))&&"string"!=typeof t?e:"number"==typeof t&&parseInt(t,10)===t?`${e}[${t}]`:t.startsWith(".")?e+t:`${t}`}static getRuleClass(e,t,s){let r;return t?r=t.startsWith(i.default.CLASS_ANNOTATION)?t.split(i.default.CLASS_ANNOTATION)[1].trim():this.resolveClassID(t,e.getPageReference(),e.getContextName()):s?.authorContext&&(r=s.ruleClass),r}static resolveReference(e,t){const{type:s}=e;let r;if("reference"===s){const{config:s}=e,a=s?.type,{ref:n,name:o,context:i}=s||{},c=this.getRuleClass(t,i,s);return"navigation"===a?r=this.resolveNavigation(n||o,t):"view"===a?r=this.resolveView(n||o,t,c||""):"widget"===a&&(r={type:"Widget",config:{name:o,ruleClass:c}}),r}return e}static resolvePropertyReference(e,t,s){return a.getValue(t,e,s)}static getProperty(e,t,s){let r=this.resolvePropertyReference(t,e,s);if(null==r||0===r.length){const n=a.lookupContextValue(`${t}.${l}`,e,s);n&&(r=this.resolvePropertyReference(t,n,s))}return r}static getPropertyValue(e,t,s){return e=o.default.trimAnnotation(e),this.getProperty(e,t,s)}static getReferencedUser(e,t){const s=d.getLitePropertyValue(t,"referencedUsers");if(Array.isArray(s)){const t=s.find((t=>t.UserID===e));if(t)return{userId:t.UserID,UserName:t.UserName}}return s?.[e]}static getLitePropertyValue(e,t){if(!e)return;const{useCustomContext:s,propertyName:r,hasSuggestions:a,pageReference:n,context:o}=e;let c=t||r;return s?(c=c?.startsWith?.(".")?c.substring(1):c,c?.split?.(".").reduce(((e,t)=>e?.[t]??void 0),s)):a?d.getPropertyValue(c,n,`${o}/${i.default.SUGGESTION}`):d.getPropertyValue(c,n,o)}static _handlePropString(e,t,s,r,a){s.startsWith("@")?e[t]=o.default.handleAnnotation(s,r,a):e[t]=s}static _resolveProps(e,t,s){e&&Object.keys(e).forEach((r=>{const a=e[r];"string"==typeof a?this._handlePropString(e,r,a,t,s):Array.isArray(a)?a.forEach((r=>{this._resolveProps("object"==typeof r?r:e[r],t,s)})):"object"==typeof a&&this._resolveProps(e[r],t,s)}))}static resolveProps(e,t,s){return e&&t?(r.default.mergeDeep(e,t),this._resolveProps(t,s,void 0),t):t}static resolveContextTreeNodeProps(e){const t={};return e?(r.default.mergeDeep(e,t),this._resolveProps(t,void 0,e),r.default.resolveStringBooleans(t)):t}static resolveClassID(e,t,s){const r=o.default.trimAnnotation(e);let n;for(n=r.startsWith(".")?`${t}${r}`:`${r}`;n;){const e=(0,a.getValue)(i.default.CLASS_ID,n,s);if(e)return e;n=n.substring(0,n.lastIndexOf("."))}return null}}const p=d},"./src/contextree/contextnode.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("./src/constants.ts"),a=s("./src/contextree/treenode.ts"),n=s("./src/contextree/whennode.ts"),o=s("./src/contextree/utils.ts");const{FIELD:i,WHEN:c,DECLARATIVE_TARGET:l,PAGELIST:u}=r.default.CONTEXT_TREE_NODE_TYPES,d=class{constructor(e,t,s={}){this.type=e,this.name=t,this.children=[],this.eventSubscribers=[],this.props=s,this.references=new Map([[i,new Map],[c,new Map],[l,new Map]])}addReference(e,t){if(this.references.has(t.type)){const s=this.references.get(t.type);s.set(e,t),this.references.set(t.type,s)}else if(t.type===u){const s=this.references.get(i);s.set(e,t),this.references.set(i,s)}}removePageListNodes(e,t){const s=this.children.filter((t=>t.name.startsWith(e))).filter((s=>{const r=o.default.getPageListIndex(s.name,e);return-1!==r&&+r>=t}));s.length>0&&s.forEach((e=>{this.removeChildNode(e.name,t)}))}removeChildNode(e,t){const s=this.children.findIndex((t=>t.name.startsWith(e)));if(-1!==s){const[t]=this.children.splice(s,1),r=t?.parent;r?.removeChildNode(e)}const r=this.references.get(i),a=this.references.get(l);[...r.keys(),...a.keys()].filter((t=>t.startsWith(e))).filter((e=>{const[,,s]=o.default.getPageListNameAndIndexFromPageName(e);return+s>=t})).forEach((e=>{r.get(e).parent?.removeChildren(),r.delete(e)}))}getReference(e,t){if(this.references.has(t))return this.references.get(t)?.get(e)}getNode(e,t,s){return this.children.find((r=>r.type===e&&r.name===t&&r.props.index===s))}addNode(e,t,s={}){let r=this.getNode(e,t,s.index);return r?r.props=s:(r=new a.default(e,t,s),r.parent=this,this.children.push(r)),r}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e){this.eventSubscribers.forEach((t=>{t(e)}))}removeReference(e,t,s){const r=this.references.get(t),a=r?.get(e);a?.props?.index===s&&r.delete(e)}removeNode(e,t){for(let s=this.children.length-1;s>=0;s-=1){const r=this.children[s];if(r.props.index===t&&r.name===e){this.children.splice(s,1);break}}}addWhen(e,t,s,r,a){if(!(s&&r&&e&&t))return;s.startsWith(".")&&(s=s.substring(1));const o=`${e}.${s}.${r}`,i=new n.default(t,s,r,a);this.references.get("WHEN")?.set(o,i)}}},"./src/contextree/treemanager.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var r=s("./src/constants.ts"),a=s("./src/contextree/treenode.ts"),n=s("./src/contextree/contextnode.ts"),o=s("./src/contextree/utils.ts");const{VIEW:i,FIELD:c,CONTEXT:l,DECLARATIVE_TARGET:u,WHEN:d}=r.publicConstants.CONTEXT_TREE_NODE_TYPES,p=new class{constructor(){this.rootNodes={}}_isContextNodeExist(e){return Object.keys(this.rootNodes).includes(e)}addContextNode(e){if(!this._isContextNodeExist(e)){const t=new n.default(l,e);this.rootNodes[e]=t}return this.rootNodes[e]}getContextNode(e){return e?this.rootNodes[e]:void 0}addPageNode(e,t){return this.addContextNode(e).addNode("PAGE",t)}_addParentViewNode(e,t,s){const r=this.addContextNode(e).addNode("PAGE",t);let a=r.getReference(s);return a||(a=r.addNode("VIEW",s),r.addReference(s,a)),a}pushChildPageNodeToParentView(e,t,s){const r=e.children;let a=!1;if(r)for(let e=0;e<r.length;e+=1)if(r[e].name===s){a=!0;break}a||r.push(t),t.parent=e}addViewNode(e,t,s,r){const a=this.addContextNode(e).addNode("PAGE",t);let n=null;n=r&&s!==r?this._addParentViewNode(e,t,r).addNode("VIEW",s):a.addNode("VIEW",s),a.addReference(s,n);const o=t.split(".");for(;o.length>0;){o.pop();const s=o.join("."),n=this.getContextNode(e)?.getNode("PAGE",s),i=n?.getReference(r);if(i){this.pushChildPageNodeToParentView(i,a,t);break}}return n}getViewNode(e,t,s){return this.getContextNode(e)?.getNode("PAGE",t)?.getReference(s)}addPageListNode(e,t,s,r,a){if(!r)return;r.startsWith(".")&&(r=r.substring(1));const n=this.addContextNode(e),o=n.addNode("PAGE",t)?.getReference(s)?.addNode("PAGELIST",`${t}.${r}`,a);return o&&n.addReference(`${t}.${r}`,o),o}updatePageListNode(e,t,s,r){s&&(s.startsWith(".")&&(s=s.substring(1)),this.addContextNode(e).removePageListNodes(`${t}.${s}`,r))}removeFieldNode(e,t,s,r,a){const n=this.getContextNode(e);n?.getNode("PAGE",t)?.getReference(s)?.removeNode(`${t}${r}`,a),n?.removeReference(`${t}${r}`,c,a),n?.removeReference(`${t}${r}`,u,a)}removeViewNode(e,t,s,r){const a=this.getContextNode(e)?.getNode("PAGE",t),n=a?.getReference(s);this.removeChildViewNodes(e,t,s,r);const o=n?.parent?.children?.findIndex((e=>e.name===s))??-1;o>-1&&n?.parent?.children.splice(o,1)}removeChildViewNodes(e,t,s,r){const a=this.getContextNode(e),n=a?.getNode("PAGE",t),o=n?.getReference(s);o?.children.forEach((n=>{"PAGE"===n.type?this.removeViewNode(e,n.name,s,r):n.type===i?this.removeChildViewNodes(e,t,n.name,r):(a.removeReference(n.name,c,n.props.index),a.removeReference(n.name,u,n.props.index),"PAGELIST"!==n.type&&"Address"!==n.props?.componentName||this.deleteAllListNodes(e,n.name))})),n?.references.delete(s)}deleteAllListNodes(e,t){const s=s=>{const r=this.getContextNode(e),a=r?.references?.get(s);if(a)for(const[e]of a)e.includes(t)&&r?.references?.get(s)?.delete(e)};s(c),s(u)}deleteListNode(e,t,s){const r=r=>{const a=this.getContextNode(e),n=a?.references?.get(r);if(n)for(const[e]of n)e.includes(`${t.join(".")}[${s}]`)&&a?.references?.get(r)?.delete(e)};r(c),r(u)}getPageListNode(e,t,s,r){const a=this.getContextNode(e)?.getNode("PAGE",t)?.getReference(s);return a?.children.find((e=>"PAGELIST"===e.type&&e.name===`${t}.${r}`))}getFieldNode(e,t,s,r){return this.getViewNode(e,t,s)?.getNode(c,r)}_findViewNode(e,t,s,r){let a=r.addNode("PAGE",t)?.getReference(s);if(a)return a;const n=t.split(".");for(;n.length>0;){n.pop();const e=n.join(".");if(a=r.addNode("PAGE",e)?.getReference(s),a)return a}return this.addViewNode(e,t,s)}addFieldNode(e,t,s,r,a,n={}){const o=this.addContextNode(e),i=this._findViewNode(e,t,s,o),{isDeclarativeTarget:l}=n;let d;if(d=l?i.addNode(u,`${t}${r}`,n):i.addNode(c,`${t}${r}`,n),d){const s=`${t}${r}`;if("Address"===d.props?.componentName&&this.deleteAllListNodes(e,d.name),o.addReference(s,d),d.value=a,d.setPreviousDefaultValue(),d.props.isInsideList){const e=t.substring(0,t.lastIndexOf("["));let s=o.getReference(e,c);s||(s=i.addNode(c,e,{}),o.addReference(e,s))}}return d}removeContextTreeNode(e){delete this.rootNodes[e]}onViewMutate(e,t,s,r){this.getViewNode(e,t,s)?.addEventListener(r)}mutateField(e,t,s,r){const n=this.getContextNode(e),[i,l,u]=o.default.getPageListNameAndIndexFromPageName(t);s.startsWith(".")&&(s=s.substring(1)),l&&this.mutatePageList(e,i,l,{...r,rowIndex:u},!0);const d=n?.getReference(`${t}.${s}`,c);d&&d instanceof a.default&&d.triggerEvent(r)}onPageListMutate(e,t,s,r,a){this.getPageListNode(e,t,s,r)?.addEventListener(a)}mutatePageList(e,t,s,r,n=!1){const o=this.getContextNode(e)?.getReference(`${t}.${s}`,c);o&&o instanceof a.default&&o.triggerEvent(r,n)}getFieldsList(e){return this.getContextNode(e)?.references.get(c)}getFieldReferencePreviousValue(e,t){let s=this.getContextNode(e)?.references?.get(c)?.get(t);return s||(s=this.getContextNode(e)?.references?.get(u)?.get(t)),s?.value}updateFieldNodeValue(e,t,s){const r=this.getContextNode(e)?.references?.get(c)?.get(t);r instanceof a.default&&r&&(r.previousValue=r.value,void 0===r.value&&(r.previousValue=s),r.value=s)}getContextReferences(e){if(!this.getContextNode(e))return;const t=this.getContextReferencesByType(e,c),s=this.getContextReferencesByType(e,u);return new Map([...t.entries(),...s.entries()])}getContextReferencesByType(e,t){return this.getContextNode(e)?.references.get(t)||new Map}isFieldExists(e,t){return!!this.getContextReferencesByType(e,c)?.get(t)||!!this.getContextReferencesByType(e,u)?.get(t)}addWhenNode(e,t,s,r,a,n){this.getContextNode(e)?.addWhen(t,s,r,a,n)}getDeclarativeTargets(e){const t=this.getContextNode(e)?.references?.get(u)||new Map,s=[];return t.forEach((e=>{const t=e?.props||{},{propertyName:r=""}=t,a=t.pageReference??"caseInfo.content";s.push({pageReference:a,name:r})})),s}getWhens(e){const t=this.getContextNode(e)?.references?.get(d)||new Map,s=[];return t.forEach((e=>{const t=e.subType,r=e.referenceName,a=e.name,n=e?.props?.pageReference??"caseInfo.content";s.push({name:a,pageReference:n,referenceName:r,type:t})})),s}}},"./src/contextree/treenode.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});class r{constructor(e,t,s={}){this.type=e,this.name=t,this.parent=null,this.children=[],this.eventSubscribers=[],this.value="",this.previousValue="|~#-old-#~|",this.props=s,this.references=new Map}addReference(e,t){this.references.set(e,t)}getReference(e){return e?this.references.get(e):void 0}getNode(e,t,s){return this.children.find((r=>r.type===e&&r.name===t&&r.props.index===s))}addNode(e,t,s={}){let a=this.getNode(e,t,s.index);return a?a.props=s:(a=new r(e,t,s),a.parent=this,this.children.push(a)),a}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e,t=!1){this.eventSubscribers.forEach((t=>{t(e)})),!t&&this.parent&&this.parent.triggerEvent(e)}setPreviousDefaultValue(){"|~#-old-#~|"===this.previousValue&&(this.previousValue=this.value)}removeReference(e,t){this.references.get(e)?.props?.index===t&&this.references.delete(e)}removeChildNode(e){const t=this.children.findIndex((t=>t.name.startsWith(e)));-1!==t&&this.children.splice(t,1)}removeChildren(){this.children.splice(0,this.children.length)}removeNode(e,t){for(let s=this.children.length-1;s>=0;s-=1){const r=this.children[s];if(r.props.index===t&&r.name===e){this.children.splice(s,1);break}}}}const a=r},"./src/contextree/utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});const r=/(([^.]+)\[\d+\])/g,a={getPageListNameAndIndexFromPageName:e=>{if((e?.split(".")??[]).length<3)return[e];const t=e?.match(r);if(!t)return[e];let s,a=t[t.length-1];return e=e?.split(a)[0],e=e?.substring(0,e.length-1),[a,s]=a.split("["),s=s?.split("]")[0],[e,a,s]},getPageListIndex:(e,t)=>{if(!e.startsWith(t))return-1;const s=e.slice(t.length).match(/\[([0-9]+)\]/);return s?parseInt(s[1],10):-1}}},"./src/contextree/whennode.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/constants.ts");const a=class{constructor(e,t,s,a={}){this.type=r.publicConstants.CONTEXT_TREE_NODE_TYPES.WHEN,this.subType=e,this.referenceName=t,this.name=s,this.props=a}}},"./src/data-view/buffer-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/utils/utils.ts");const a=e=>e.map((e=>e.field)),n=(e,t)=>{const s=e.query?.filter.filterConditions,r=t.query?.filter.filterConditions;let n=t.query?.filter.logic;const o=Object.keys(s).length;((e,t)=>((e,t)=>1===Object.keys(e).length&&Object.keys(e).length===Object.keys(t).length)(e,t)&&((e,t)=>"EQ"===t.F0.comparator&&(e.F0.comparator===t.F0.comparator||"IN"===e.F0.comparator))(e,t)&&e.F0.ignoreCase===t.F0.ignoreCase)(s,r)?("EQ"===s.F0.comparator&&(e=>{const t=e?.F0.rhs.value;e.F0.rhs={values:[t]},e.F0.comparator="IN"})(s),s.F0.rhs.values.push(r.F0.rhs.value)):(Object.keys(r).forEach(((e,t)=>{const a=`F${o+t}`;s[a]=r[e],n=n.replace(e,a)})),e.query?.filter.logic+=` OR ${n}`);const i=a(e.query?.select);a(t.query?.select).forEach((t=>{i.includes(t)||e.query?.select.push({field:t})}))},o=(e,t)=>{return s=e.query?.filter,a=t.query?.filter,Object.keys(s.filterConditions).length%Object.keys(a.filterConditions).length==0&&!Object.keys(a.filterConditions).some((e=>s.filterConditions[e].lhs.field!==a.filterConditions[e]?.lhs.field))&&(((e,t)=>e.dataViewParameters&&t.dataViewParameters&&Object.keys(t.dataViewParameters).length===Object.keys(e.dataViewParameters).length&&!Object.keys(e.dataViewParameters).some((s=>"string"==typeof t.dataViewParameters?.[s]?e.dataViewParameters?.[s]!==t.dataViewParameters?.[s]:!r.default.isEqual(e.dataViewParameters?.[s],t.dataViewParameters?.[s]))))(e,t)||((e,t)=>!e.dataViewParameters&&!t.dataViewParameters)(e,t));var s,a},i=(e,t)=>{const{data:s}=t,{dataViewCallMap:r,filterDataOnClient:a}=e;Object.keys(r).forEach((e=>{r[e].resolve({data:a(e,s)})}))},c=e=>({combiner:n,comparator:o,separator:i,...e})},"./src/data-view/buffered-data-queue.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=class{constructor(e,t,s,r,a=100,n=500){this.finalDataViewCall=e,this.combiner=t,this.comparator=s,this.separator=r,this.maxtime=a,this.maxsize=n,this.groupedDataViewArray=[]}findCombinableDataViewCall(e){return this.groupedDataViewArray.find((t=>this.comparator(t,e)))}dequeueAllDataViewCalls(){for(this.groupedDataViewArray.reverse();this.groupedDataViewArray.length>0;){const e=this.groupedDataViewArray.pop();this.finalDataViewCall(e).then((t=>{this.separator(e,t)}))}clearTimeout(this.timeoutId)}dequeueDataViewCallOnSizeExceed(e){const t=this.groupedDataViewArray.findIndex((t=>this.comparator(t,e)));this.groupedDataViewArray[t]&&(this.groupedDataViewArray.splice(t,1),this.finalDataViewCall(e).then((t=>{this.separator(e,t)})))}queueDataViewCall(e,t){let s,r,a=this.findCombinableDataViewCall(e);return s=new Promise((e=>{r=e})),a&&!a.dataViewCallMap[t]?(this.combiner(a,e),a.dataViewCallMap[t]={promise:s,resolve:r}):a?s=a.dataViewCallMap[t].promise:(a={...e,dataViewCallMap:{[t]:{promise:s,resolve:r}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[t]:{promise:s,resolve:r}}})),Object.keys(a.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(a):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>this.dequeueAllDataViewCalls()),this.maxtime)),s}}},"./src/data-view/buffered-data-view.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/data-view/buffered-data-queue.ts");const a=class{constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,t,s,a,n,o,i){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new r.default(t,s,n,a,o,i)),this.bufferedDataQueues[e]}}},"./src/data-view/data-api-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>A,getCaseEditLock:()=>m,getCaseEditMetadata:()=>g,getData:()=>f,getDataObjectView:()=>d,getDataViewMetadata:()=>h,getListCount:()=>p,getListDataView:()=>u,updateCaseEditFieldsData:()=>E});var r=s("./src/router/app-router.ts"),a=s("./src/service_broker/fetch.ts"),n=s("./src/constants.ts"),o=s("./src/case/utils.ts"),i=s("./src/container/container-utils.ts"),c=s("./src/utils/asset-loader.ts"),l=s("./src/environment-info/index.ts");const u=(e,t,s,n={})=>{const o={dataViewName:e},{skipClearErrorMessages:i,signal:c,doNotMergeMessagesForStatusCode:l}=n,{restApi:u,reqType:d}=(0,r.resolveRestApi)("getListData",o);return(0,a.fetch)(u,{method:d,body:t,...c&&{signal:c},...i&&{skipClearErrorMessages:i}},s,l)},d=(e,t,s,n,o={})=>{const{skipClearErrorMessages:i,signal:c,doNotMergeMessagesForStatusCode:l}=o,u={data_view_ID:e,view_ID:t},d={dataViewParameters:s},{restApi:p,reqType:f}=(0,r.resolveRestApi)("readDataObject",u);return(0,a.fetch)(p,{method:f,body:d,...c&&{signal:c},...i&&{skipClearErrorMessages:i}},n,l)},p=(e,t,s)=>{const n={dataViewName:e},{restApi:o,reqType:i}=(0,r.resolveRestApi)("getListDataCount",n);return(0,a.fetch)(o,{method:i,body:t},s)},f=(e,t,s,r)=>u(e,t,s,r),h=(e,t,s,n)=>{const o=!!s,i=!!n,c=o||i?"postDataViewMetadata":"getDataViewMetadata",l={dataViewName:e},{restApi:u,reqType:d}=(0,r.resolveRestApi)(c,l);return o?(0,a.fetch)(u,{method:d,body:{associationFilter:s}},t):i?(0,a.fetch)(u,{method:d,body:{propertyFilter:n}},t):(0,a.fetch)(u,{method:d},t)},g=(e,t)=>o.default.getCaseEditMetadata(e,t),m=(e,t)=>o.default.getCaseEditLock(e,t),E=(e,t,s,r)=>o.default.updateCaseEditFieldsData(e,t,s,r),A={getData:f,getListCount:p,getDataViewMetadata:h,getDataObjectView:d,getCaseEditMetadata:g,getCaseEditLock:m,updateCaseEditFieldsData:E,moveListRecords:(e,t)=>{const{sourceID:s,destinationID:n,context:o,listClass:i,viewName:c,viewClassName:l}=e,u={viewName:c,viewClassName:l},{restApi:d,reqType:p}=(0,r.resolveRestApi)("moveListRecords",u);return(0,a.fetch)(d,{method:p,body:{content:{sourceID:s,destinationID:n,context:o,listClass:i}}},t)},isTimeElapsed:(e,t,s="")=>{if(t){if(e&&s===n.default.RELOAD_IF_OLDER_THAN)return new Date(e).setSeconds(t)<Date.now();if(e&&s===n.default.RELOAD_ONCE_PER_INTERACTION)return!0}return!0},getAppCacheKey:e=>void 0!==(0,i.getChildContainers)("root").find((e=>e.includes("authoring-preview")))?`${n.default.AUTHORING_PREVIEW_CONTAINER}-${e}`:`${c.default.getAppAlias()}-${e}`,isDistinctResultsOnly:e=>{const t=l.default.getKeyMapping("pyGUID");return!e.some((e=>e.field===t))}}},"./src/data-view/dataview-epic.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d,fetchDataPage:()=>u});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),n=s("./src/constants.ts"),o=s("./src/store/state/actions/index.ts"),i=s("./src/store/state/actions/action-creators.ts"),c=s("./src/store/state/state-manager.ts"),l=s("./src/data-view/data-api-utils.ts");const u=e=>e.pipe((0,r.ofType)(o.FETCH_DATAPAGE),(0,a.mergeMap)((async e=>{const{context:t}=e.payload,s={},r={},a=Object.keys(e.payload.datapages).map((a=>{const o=e.payload.datapages[a];if(o.mode===n.default.READONLY&&o?.refreshStrategy){const{timeoutSecs:e="",type:t=""}=o?.refreshStrategy||{},s=(0,c.getSharedDataObject)()[o.name];if(s&&a in s){const r=s[a],{loadTime:n}=r;if(!l.default.isTimeElapsed(n,e,t))return}}return l.default.getData(o.name,{dataViewParameters:o.dataViewParameters},t).then((e=>{const t=o.mode===n.default.READONLY?r:s;t[o.name]?t[o.name][a]={pxResults:e.data.data,parameters:o.dataViewParameters,loadTime:e.data?.fetchDateTime}:t[o.name]={[a]:{pxResults:e.data.data,parameters:o.dataViewParameters,loadTime:e.data?.fetchDateTime}}})).catch((()=>{}))}));await Promise.allSettled(a);const o=[];return Object.keys(s).length&&o.push((0,i.mergeData)({context:t,data:s})),Object.keys(r).length&&o.push((0,i.addSharedData)({data:r,context:t})),(0,c.dispatch)(o),[]}))),d=[u]},"./src/data-view/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var r=s("./src/constants.ts"),a=s("./src/utils/utils.ts"),n=s("./src/datapage/index.ts"),o=s("./src/rules/rules-store.ts"),i=s("./src/data-view/data-api-utils.ts"),c=s("./src/data-view/buffered-data-view.ts"),l=s("./src/data-view/buffer-utils.ts");const u=(e,t)=>{try{window.sessionStorage.setItem(e,t)}catch(e){}};class d{constructor(e,t){this.isInitialised=!1,this.isQueryable=!0,this.dataSourceMetaData={},this.nonQueryableData=[],this.fetchedNQData=!1,this.previousSearchText=null,this.totalRecordCount=0,this.fetchedRecordCount=0,this.cache={},this.pageNumber=0,this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null,this.dataSource="",this.bufferInitialized=!1,e&&(this.listType=e.listType,this.dataSource=e.dataSource,e.enablePagination?(this.enablePagination=e.enablePagination,this.pageSize=e.pageSize):this.maxResultsDisplay=e.maxResultsDisplay,this.parameters=e.parameters,this.columns=e.columns,this.matchPosition=e.matchPosition,this.ignoreCase=!1!==e.ignoreCase,this.dataSourceMetaData=e.dataSourceMetaData,this.context=t)}static searchResultsCache={};static init(e,t){return new Promise(((s,n)=>{const c=[...e.columns.map((e=>e.value)),...Object.entries(e.parameters).map((([e,t])=>`${e}+${t}`))].join(r.default.HASH_DELIMITER),l=a.default.getHashedString(c),p=`${e.dataSource}_${l}`,f=i.default.getAppCacheKey(e.dataSource);if(window.sessionStorage.getItem(f)){const r=JSON.parse(window.sessionStorage.getItem(f));if(t&&d.searchResultsCache?.[t]?.[p])s(d.searchResultsCache[t][p]);else if("form"!==e.cacheLifeSpan&&d.searchResultsCache?.persisted?.[p])s(d.searchResultsCache.persisted[p]);else{const a=new d(e,t);JSON.stringify(r.associationFilter)===JSON.stringify(e.associationFilter)?(a.dataSourceMetaData=r.dataSourceMetaData,a.isQueryable=r.isQueryable,a.isInitialised=r.isInitialised,a.associationFilter=r.associationFilter,d.initializeCache(t,e,p,a),s(a)):(a.associationFilter=e.associationFilter,a.propertyFilter=e.propertyFilter,a.fetchMetaData(t).then((r=>{u(f,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),a.isQueryable=r.data.isQueryable,a.dataSourceMetaData=r.data,a.isInitialised=!0,d.initializeCache(t,e,p,a),s(a)})).catch((e=>{a.isInitialised=!1,n(e)})))}}else if(e.deferDatasource&&(0,o.getDataPageMetadata)(e.dataSource)){const r=new d(e,t),a=(0,o.getDataPageMetadata)(e.dataSource);r.isQueryable=!!a?.isQueryable,r.isInitialised=!0,r.dataSourceMetaData=a,u(f,JSON.stringify({isQueryable:a?.isQueryable,dataSourceMetaData:a,isInitialised:!0})),r.context=t,d.initializeCache(t,e,p,r),s(r)}else{const r=new d(e,t);r.associationFilter=e.associationFilter,r.propertyFilter=e.propertyFilter,r.fetchMetaData(t).then((a=>{u(f,JSON.stringify({isQueryable:a.data.isQueryable,dataSourceMetaData:a.data,isInitialised:!0,associationFilter:e.associationFilter})),r.isQueryable=a.data.isQueryable,r.dataSourceMetaData=a.data,r.isInitialised=!0,d.initializeCache(t,e,p,r),s(r)})).catch((e=>{r.isInitialised=!1,n(e)}))}}))}static bufferedDataView=new c.default;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage((0,l.default)(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete d.searchResultsCache[e]}static initializeCache(e,t,s,r){e&&"form"===t.cacheLifeSpan?.toLowerCase()?(void 0===d.searchResultsCache[e]&&(d.searchResultsCache[e]={}),d.searchResultsCache[e][s]=r):(void 0===d.searchResultsCache.persisted&&(d.searchResultsCache.persisted={}),d.searchResultsCache.persisted[s]=r)}fetchMetaData(e){return i.default.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){d.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,(e=>n.default.getDataAsync(this.dataSource,this.context,e.dataViewParameters,e.paging,e.query)),e.combiner,e.separator,e.comparator,e.waitTime,e.maxSize)}buildSchemaForQueryableBufferDP(e){return{...this.buildSchemaForQueryableDP(e),paging:void 0,filterDataOnClient:this.filterDataOnClient.bind(this)}}getData(e,t){if(this.isQueryable){if(this.bufferInitialized)try{const t=this.buildSchemaForQueryableBufferDP(e);return d.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(t,e)}catch{const s=this.buildSchemaForQueryableDP(e,t);return n.default.getDataAsync(this.dataSource,this.context,s.dataViewParameters,s.paging,s.query)}const s=this.buildSchemaForQueryableDP(e,t);return n.default.getDataAsync(this.dataSource,this.context,s.dataViewParameters,s.paging,s.query)}return this.fetchNonQueryableResults(e,t)}memoizedGetData(e,t){const s=e?.toLowerCase();if(this.enablePagination?s in this.cache&&this.pageNumber in this.cache[s]:s in this.cache)return this.enablePagination?this.cache[s][this.pageNumber]:this.cache[s];const r=this.getData(e,t);return this.enablePagination?(this.cache[s]=this.cache[s]||{},this.cache[s][this.pageNumber]=r):this.cache[s]=r,r}fetchData(e,t=!1,s){return this.isValidDatasource()&&this.isInitialised?(this.pageNumber=t?this.pageNumber:1,this.memoizedGetData(e,s)):Promise.reject(new Error)}fetchPaginatedData(e){return this.pageNumber+=1,this.fetchData(e,!0)}fetchNonQueryableResults(e,t){if(void 0===e)return Promise.resolve({data:[]});if(this.fetchedNQData)return Promise.resolve({data:this.filterDataOnClient(e,this.nonQueryableData,t)});if(this.isNQDataFetchInProgress)return this.fetchNQDataPromise?.then((()=>({data:this.filterDataOnClient(e,this.nonQueryableData,t)}))).catch((e=>Promise.reject(e)));if(this.dataSourceMetaData?.structure&&"list"===this.dataSourceMetaData.structure.toLowerCase()){const s=this.buildSchemaForNonQueryableDP();return this.fetchNQDataPromise=n.default.getDataAsync(this.dataSource,this.context,s.dataViewParameters),this.isNQDataFetchInProgress=!0,new Promise(((s,r)=>{this.fetchNQDataPromise?.then((r=>(this.nonQueryableData=[...r.data],this.fetchedNQData=!0,s({data:this.filterDataOnClient(e,this.nonQueryableData,t)})))).catch((e=>r(e))).finally((()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null}))}))}return Promise.resolve(null)}filterDataOnClient(e,t,s){const r=(s?.columns??this.columns)?.filter((e=>e.useForSearch)).map((e=>e.value));return t.reduce(((t,a)=>(Object.keys(a).every((n=>!(r?.includes(n)&&a[n]&&this.positionMatches(`${a[n]}`,e,s)&&(t.push({...a}),1)))),t)),[])}positionMatches(e,t,s){const r=s?.ignoreCase??this.ignoreCase,a=r?e.toLowerCase():e,n=r?t.toLowerCase():t;switch(s?.matchPosition??this.matchPosition){case"start":return a.startsWith(n);case"contains":return a.includes(n);case"equals":return a===n;default:return!1}}buildSelect(e){const t=[],s=[];return(e?.columns??this.columns)?.forEach((e=>{if(!s.includes(e.value)){s.push(e.value);const r={field:e.value};t.push(r)}})),t}buildFilters(e,t){const s=t?.matchPosition??this.matchPosition,r=t?.ignoreCase??this.ignoreCase,a={};let n=0;(t?.columns??this.columns)?.forEach((t=>{if(t.useForSearch){const o=`F${n}`;n+=1;const i={field:t.value},c={value:e};let l="CONTAINS";"start"===s?l="STARTS_WITH":"equals"===s&&(l="EQ");const u={...`${parseFloat(e)}`!==e==1&&{ignoreCase:r?"true":"false"},lhs:i,rhs:c,comparator:l};a[o]=u}}));const o=Object.keys(a).join(" OR ");return{filterConditions:a,logic:o}}buildQuery(e,t){const s=this.buildSelect(t);return e?{select:s,filter:this.buildFilters(e,t),...i.default.isDistinctResultsOnly(s)&&{distinctResultsOnly:"true"}}:{select:s,...i.default.isDistinctResultsOnly(s)&&{distinctResultsOnly:"true"}}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e,t){return{dataViewParameters:this.parameters,query:this.buildQuery(e,t),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}}const p=d},"./src/data/create-data-object/action-creator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{CREATE_DATA_OBJECT:()=>r,createDataObjectAction:()=>a});const r="CREATE_DATA_OBJECT",a=e=>({type:r,payload:e})},"./src/data/create-data-object/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./src/router/app-router.ts"),o=s("./src/service_broker/fetch.ts"),i=s("./src/store/state/epics/util.ts"),c=s("./src/store/state/actions/index.ts"),l=s("./src/utils/rxjs-utils.ts");const u=e=>{const{dataPageID:t,context:s,headers:u,containerItemID:d}=e,p={data_view_ID:t},{restApi:f,reqType:h}=(0,n.resolveRestApi)(c.ACTION_CREATE_DATA_OBJECT,p),{content:g}=(0,i.getSubmitData)(d);return(0,r.from)((0,o.fetch)(f,{method:h,headers:u,body:{data:g.content}},d)).pipe((0,a.map)((t=>({response:t.data,actionInPayload:e}))),(0,l.logAndCatchError)("Error occurred during ajax call at createDataObject Epic",s))}},"./src/data/create-data-object/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{createDataObject:()=>I,createDataObjectAction:()=>_.createDataObjectAction});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/switchMap.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),i=s("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),c=s("./src/utils/rxjs-utils.ts"),l=s("./src/store/state/actions/index.ts"),u=s("./src/actions/manager.ts"),d=s("./src/store/state/actions/action-creators.ts"),p=s("./src/store/state/state-manager.ts"),f=s("./src/router/routing-manager.ts"),h=s("./src/case/common-helper.ts"),g=s("./src/container/container-utils.ts"),m=s("./src/store/state/epics/util.ts"),E=s("./src/constants.ts"),A=s("./src/data/create-data-object/async-request.ts"),_=s("./src/data/create-data-object/action-creator.ts");const I=e=>{let t=0,s=[];return e.pipe((0,r.ofType)(l.CREATE_DATA_OBJECT),(0,c.throttleUntilChanged)(100),(0,a.switchMap)((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:E.publicConstants.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return u.ActionManagerInstance.rejectActionByID(t,!0,e),(0,i.of)([])}return(0,i.of)(e.payload).pipe((0,n.mergeMap)((e=>(0,A.default)(e))),(0,n.mergeMap)((async e=>{if(e&&e.type===l.ERROR){const{payload:r}=e,a=(0,m.processDataToDispatchErrorAction)({...e,...r,actionMgrID:t});return s.push(a),s}const{actionInPayload:r}=e,{containerItemID:a,isModalAction:n}=r,o=n?g.CONTAINER_NAMES.MODAL:g.CONTAINER_NAMES.PRIMARY,i={target:(0,f.getResolvedTargetName)(o,a),containerItemID:a,context:a};return s.push(d.postProcess(d.removeContainerItem,i)),s})),(0,o.map)((()=>(1===s.length&&(0,h.isErrorActionType)(s[0].type)?u.ActionManagerInstance.rejectActionByID(t):u.ActionManagerInstance.resolveActionByID(t),p.dispatch(s),s=[],s))))})))}},"./src/data/data-object-actions/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./src/router/app-router.ts"),o=s("./src/service_broker/fetch.ts"),i=s("./src/store/state/actions/index.ts"),c=s("./src/utils/rxjs-utils.ts");const l=e=>{const{dataViewID:t,dataViewParameters:s,context:l}=e,u={data_view_ID:t},{restApi:d,reqType:p}=(0,n.resolveRestApi)(i.GET_DATA_OBJECT_ACTIONS,u);return(0,r.from)((0,o.fetch)(d,{method:p,body:{dataViewParameters:s}},l)).pipe((0,a.map)((e=>({...e.data}))),(0,c.logAndCatchError)("Error occurred during ajax call at GET data object actions : ",e.context))}},"./src/data/data-object-actions/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./src/utils/rxjs-utils.ts"),i=s("./src/store/state/actions/index.ts"),c=s("./src/store/state/epics/util.ts"),l=s("./src/actions/manager.ts"),u=s("./src/case/common-helper.ts"),d=s("./src/store/state/state-manager.ts"),p=s("./src/data/data-object-actions/async-request.ts");const f=e=>{let t=0,s=[],f={};return e.pipe((0,r.ofType)(i.GETDATAOBJECTACTIONS),(0,o.throttleUntilChanged)(100),(0,a.map)((e=>(({actionMgrID:t}=e.payload),e.payload))),(0,n.mergeMap)((e=>(0,p.default)(e))),(0,n.mergeMap)((async e=>e&&e.type===i.ERROR?(s.push((0,c.processDataToDispatchErrorAction)(e)),s):(f=e,[]))),(0,a.map)((()=>(1===s.length&&(0,u.isErrorActionType)(s[0].type)?l.ActionManagerInstance.rejectActionByID(t):l.ActionManagerInstance.resolveActionByID(t,f),(0,d.dispatch)(s),s=[],s))))}},"./src/data/delete-data-object/ async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./src/store/state/actions/index.ts"),o=s("./src/utils/rxjs-utils.ts"),i=s("./src/router/app-router.ts"),c=s("./src/service_broker/fetch.ts");const l=e=>{const{dataViewName:t,context:s,dataViewParameters:l}=e,u={data_view_ID:t,dataViewParameters:encodeURIComponent(JSON.stringify(l))},{restApi:d,reqType:p}=(0,i.resolveRestApi)(n.ACTION_DELETE_DATA_OBJECT,u);return(0,r.from)((0,c.fetch)(d,{method:p},s)).pipe((0,a.map)((t=>({response:t.data,actionInPayload:e}))),(0,o.logAndCatchError)("Error occurred during ajax call at deleteDataObject Epic",s))}},"./src/data/delete-data-object/action-creator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{DELETE_DATA_OBJECT:()=>r,deleteDataObjectAction:()=>a});const r="DELETE_DATA_OBJECT",a=e=>({type:r,payload:e})},"./src/data/delete-data-object/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./src/utils/rxjs-utils.ts"),i=s("./src/store/state/actions/index.ts"),c=s("./src/store/state/epics/util.ts"),l=s("./src/actions/manager.ts"),u=s("./src/case/common-helper.ts"),d=s("./src/store/state/state-manager.ts"),p=s("./src/data/delete-data-object/ async-request.ts");const f=e=>{let t=0,s=[];return e.pipe((0,r.ofType)(i.DELETE_DATA_OBJECT),(0,o.throttleUntilChanged)(100),(0,a.map)((e=>(({actionMgrID:t}=e.payload),e.payload))),(0,n.mergeMap)((e=>(0,p.default)(e))),(0,n.mergeMap)((async e=>{if(e&&e.type===i.ERROR){const{payload:r}=e,a=(0,c.processDataToDispatchErrorAction)({...e,...r,actionMgrID:t});return s.push(a),s}return[]})),(0,a.map)((()=>(1===s.length&&(0,u.isErrorActionType)(s[0].type)?l.ActionManagerInstance.rejectActionByID(t):l.ActionManagerInstance.resolveActionByID(t),d.dispatch(s),s=[],s))))}},"./src/data/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{createDataObject:()=>r.createDataObject,createDataObjectAction:()=>r.createDataObjectAction,getDataObjectView:()=>a.getDataObjectView,getDataObjectViewAction:()=>a.getDataObjectViewAction,openDataObjectFlowAction:()=>o.openDataObjectFlowAction,submitDataObjectFlowAction:()=>i.submitDataObjectFlowAction,updateDataObject:()=>n.updateDataObject,updateDataObjectAction:()=>n.updateDataObjectAction});var r=s("./src/data/create-data-object/index.ts"),a=s("./src/data/view-data-object/index.ts"),n=s("./src/data/update-data-object/index.ts"),o=s("./src/data/open-data-object-action/index.ts"),i=s("./src/data/submit-data-object-action/index.ts")},"./src/data/open-data-object-action/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./src/router/app-router.ts"),o=s("./src/service_broker/fetch.ts"),i=s("./src/utils/rxjs-utils.ts");const c=e=>{const{lookupDatapage:t,context:s,headers:c,actionID:l,dataViewParameters:u}=e,d={data_view_ID:t,action_ID:l},{restApi:p,reqType:f}=(0,n.resolveRestApi)("openDataObjectAction",d);return(0,r.from)((0,o.fetch)(p,{method:f,headers:c,body:{dataViewParameters:u}},s)).pipe((0,a.map)((t=>({response:t.data,actionInPayload:e}))),(0,i.logAndCatchError)("Error occurred during ajax call at getDataObjectView Epic",s))}},"./src/data/open-data-object-action/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{openDataObjectFlowAction:()=>E});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./src/utils/rxjs-utils.ts"),i=s("./src/store/state/actions/index.ts"),c=s("./src/actions/manager.ts"),l=s("./src/store/state/actions/action-creators.ts"),u=s("./src/store/state/state-manager.ts"),d=s("./src/router/routing-manager.ts"),p=s("./src/case/common-helper.ts"),f=s("./src/store/state/epics/util.ts"),h=s("./src/constants.ts"),g=s("./src/utils/context-utils.ts"),m=s("./src/data/open-data-object-action/async-request.ts");const E=e=>{let t=0,s=[];return e.pipe((0,r.ofType)(i.OPEN_DATA_OBJECT_ACTION),(0,o.throttleUntilChanged)(100),(0,a.map)((e=>(({actionMgrID:t}=e.payload),e.payload))),(0,n.mergeMap)((e=>(0,m.default)(e))),(0,n.mergeMap)((async e=>{if(e&&e.type===i.ERROR){const{payload:r}=e,a=(0,f.processDataToDispatchErrorAction)({...e,...r,actionMgrID:t});return s.push(a),s}const{actionInPayload:r,response:a,headers:n={}}=e,{containerName:o,actionID:c,context:u,actionName:p}=r,m=(0,d.getResolvedTargetName)(o,r.context);let E=(0,g.buildContextName)(o,u);E=(0,g.buildModalContext)(u,E);const A={target:m,context:E,containerItemID:E,headers:n,resourceType:h.publicConstants.RESOURCE_TYPES.DATA,resourceStatus:h.publicConstants.RESOURCE_STATUS.OPEN_FLOW_ACTION,key:JSON.stringify(r.dataViewParameters),actionID:c,actionName:p},_={acName:m,context:u};await(0,f.processViewResponse)(a,r,_);const I=(0,f.getActionPayload)(a,A);return s.push(l.postProcess(l.addContainerItem,I)),s})),(0,a.map)((()=>(1===s.length&&(0,p.isErrorActionType)(s[0].type)?c.ActionManagerInstance.rejectActionByID(t):c.ActionManagerInstance.resolveActionByID(t),u.dispatch(s),s=[],s))))}},"./src/data/show-data/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./src/router/app-router.ts"),o=s("./src/service_broker/fetch.ts"),i=s("./src/store/state/actions/index.ts"),c=s("./src/store/state/epics/util.ts"),l=s("./src/utils/rxjs-utils.ts"),u=s("./src/constants.ts"),d=s("./src/environment-info/index.ts"),p=s("./src/utils/performance-utils.ts");const f=(e,t)=>{const{context:s,pageName:f,dataContext:h,dataContextParameters:g,semanticURL:m,skipSemanticUrl:E}=e,{removeActionPayload:A}=t,{restApi:_,reqType:I,body:y}=(0,n.resolveRestApi)(i.ACTION_SHOWDATA,{pageName:f,dataContext:h,dataContextParameters:g});let C={};return d.default.getPerformanceDashboardVisibility()&&(C=p.default.getActionInfo(u.default.TOP_ACTION_LABEL.SHOWDATA)),(0,r.from)((0,o.fetch)(_,{method:I,body:y},s,C)).pipe((0,a.map)((t=>({response:{...t.data,key:m,semanticURL:m},actionConfig:e,headers:(0,c.processHeaders)(t.headers),removeActionPayload:A,skipSemanticUrl:E}))),(0,l.logAndCatchError)("Error occurred during ajax call at showData Epic : ",e.context))}},"./src/data/show-data/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>S});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),n=s("./node_modules/rxjs/dist/esm5/internal/observable/empty.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/concatMap.js"),i=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),c=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),l=s("./src/actions/manager.ts"),u=s("./src/actions/targetmap.ts"),d=s("./src/constants.ts"),p=s("./src/utils/utils.ts"),f=s("./src/router/app-router.ts"),h=s("./src/router/routing-manager.ts"),g=s("./src/utils/dxapi-response-translator.ts"),m=s("./src/store/state/actions/index.ts"),E=s("./src/store/state/actions/action-creators.ts"),A=s("./src/container/container-utils.ts"),_=s("./src/store/state/state-manager.ts"),I=s("./src/store/state/epics/util.ts"),y=s("./src/data/show-data/async-request.ts");const{RESOURCE_TYPES:C}=d.publicConstants,S=e=>{let t,s=0,S=[];return e.pipe((0,r.ofType)(m.SHOW_DATA),(0,o.concatMap)((e=>(({actionMgrID:s}=e.payload),(0,a.of)(e.payload).pipe((0,i.mergeMap)((e=>((e,t)=>{const{context:s,pageName:r,dataContext:o,dataContextParameters:i,skipSemanticUrl:c=!1,isDeferLoaded:d=!1,parentAction:p="",resourceType:g}=e;let{containerName:E}=e;E||(E=u.default.getTargetViewContainerName(m.SHOW_PAGE));const A=(0,h.getResolvedTargetName)(E,s);let _="",S={},b=!1;if(!c){_=(0,f.getSemanticURL)(m.ACTION_SHOWDATA,{pageName:r,dataViewName:o},i);const{activate:s,activateContainerActionPayload:c}=(0,I.getActivationDetails)(C.PAGE,A,{semanticURL:_});if(s)return(0,a.of)({type:m.ACTIVATE_CONTAINER_ITEM,activateContainerActionPayload:c,actionConfig:e});if(({continueExecution:b,removeActionPayload:S}=(0,I.getDirtyDetails)(A)),!b)return l.ActionManagerInstance.rejectActionByID(t),(0,n.empty)()}return(0,y.default)({context:s,pageName:r,dataContext:o,dataContextParameters:i,semanticURL:_,skipSemanticUrl:c,containerName:E,isDeferLoaded:d,parentAction:p,resourceType:g},{removeActionPayload:S})})(e,s))),(0,i.mergeMap)((async e=>{if(e&&e.type===m.ERROR)return S.push((0,I.processDataToDispatchErrorAction)(e)),S;const{type:s,actionConfig:r,headers:a,response:n,skipSemanticUrl:o}=e;t=p.default.getIn(n,d.default.ROOT);const{containerName:i,parentAction:c,resourceType:l}=r,u=(0,h.getResolvedTargetName)(i,r.context);let f;if(r.isDeferLoaded){f=(0,g.getTranslatedDXAPIResponse)(n),f.directUrlUpdation=!o;const t={acName:u,context:r.context};await(0,I.processViewResponse)(f,r,t);const s={target:u,headers:a,context:r.context,containerItemID:e.containerItemID},i=(0,I.getActionPayload)(f,s);return S=E.postProcess(E.mergeData,i),S}if(s===m.ACTIVATE_CONTAINER_ITEM){const{activateContainerActionPayload:{semanticURL:t,containerItemID:s}}=e,a={acName:u,context:(0,A.getDataContextName)(s)};await(0,I.processViewResponse)({directUrlUpdation:!0,semanticURL:t},r,a,!0),S.push(E.postProcess(E.activateContainerItem,{target:u,containerItemID:s,resourceType:C.DATA}))}else if("DATA"===l&&c===m.SUBMIT_DATA_OBJECT_ACTION){const{context:e}=r,t=n?.data,s={context:e,data:t};S.push(E.postProcess(E.mergeData,s))}else{const t=(0,I.getContext)(u,i,r.context),{removeActionPayload:s}=e;f=(0,g.getTranslatedDXAPIResponse)(n),f.directUrlUpdation=!o;const c={acName:u,context:t};await(0,I.processViewResponse)(f,r,c);const l={target:u,context:t,containerItemID:t,headers:a},d=(0,I.getActionPayload)(f,l);d.resourceType=C.DATA;const p=(0,I.getActionBasedOnContainerMode)(u,d);s.containerItemID&&(0,I.isAddContainerAction)(p)&&S.push(E.postProcess(E.removeContainerItem,{containerItemID:s.containerItemID,target:u})),(0,I.addPreviewResetAction)(S),S.push(p)}return S})),(0,c.map)((()=>(l.ActionManagerInstance.resolveActionByID(s,t),_.dispatch(S),S=[],S))))))))}},"./src/data/submit-data-object-action/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./src/router/app-router.ts"),o=s("./src/service_broker/fetch.ts"),i=s("./src/store/state/epics/util.ts"),c=s("./src/utils/rxjs-utils.ts");const l=e=>{const{savableDatapage:t,context:s,headers:l,actionID:u,keys:d,containerItemID:p}=e,f={data_view_ID:t,action_ID:u},{restApi:h,reqType:g}=(0,n.resolveRestApi)("submitDataObjectAction",f),{content:m}=(0,i.getSubmitData)(p);return(0,r.from)((0,o.fetch)(h,{method:g,headers:l,body:{data:{...m?.content,...d},pageInstructions:m?.pageInstructions||[]}},s)).pipe((0,a.map)((t=>({response:t.data,actionInPayload:e}))),(0,c.logAndCatchError)("Error occurred during ajax call at getDataObjectView Epic",s))}},"./src/data/submit-data-object-action/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{submitDataObjectFlowAction:()=>y});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/switchMap.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),i=s("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),c=s("./src/utils/rxjs-utils.ts"),l=s("./src/store/state/actions/index.ts"),u=s("./src/actions/manager.ts"),d=s("./src/store/state/actions/action-creators.ts"),p=s("./src/store/state/state-manager.ts"),f=s("./src/router/routing-manager.ts"),h=s("./src/router/app-router.ts"),g=s("./src/case/common-helper.ts"),m=s("./src/store/state/epics/util.ts"),E=s("./src/constants.ts"),A=s("./src/messages/index.ts"),_=s("./src/utils/context-utils.ts"),I=s("./src/data/submit-data-object-action/async-request.ts");const y=e=>{let t=0,s=[];return e.pipe((0,r.ofType)(l.SUBMIT_DATA_OBJECT_ACTION),(0,c.throttleUntilChanged)(100),(0,a.switchMap)((e=>{const{isFormValid:r}=e.payload;({actionMgrID:t}=e.payload);const a=e.payload.context;if(!r){const e={type:E.publicConstants.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return u.ActionManagerInstance.rejectActionByID(t,!0,e),(0,i.of)([])}return(0,A.clearMessages)({context:a,stateObj:p.getDataObject(a),clearContextMessages:!0}),(0,i.of)(e.payload).pipe((0,n.mergeMap)((e=>(0,I.default)(e))),(0,n.mergeMap)((async e=>{if(e&&e.type===l.ERROR){const{payload:r}=e,a=(0,m.processDataToDispatchErrorAction)({...e,...r,actionMgrID:t});return s.push(a),s}const{actionInPayload:r,response:a,headers:n={}}=e,{containerName:o,containerItemID:i,resourceType:c,key:u}=r,g=(0,f.getResolvedTargetName)(o,r.context),A={acName:g,context:r.context};await(0,m.processViewResponse)(a,r,A);const I={key:u,target:g,resourceType:c,containerItemID:i,headers:n,context:r.context};return s=((e,t,s,r)=>{const{resourceType:a,key:n,containerItemID:o}=r,i=(0,m.getActionPayload)(s,t);i.resourceType=a||E.publicConstants.RESOURCE_TYPES.DATA;const c=(0,_.getParentContext)(o);e.push(d.postProcess(d.removeContainerItem,i));const u=p.getValue(".dataContext","dataInfo",c),f=p.getValue(".dataContextParameters","dataInfo",c),g={context:c,skipSemanticUrl:!0,resourceType:a,parentAction:l.SUBMIT_DATA_OBJECT_ACTION,dataContext:u,dataContextParameters:f},A=u&&f&&(0,h.getSemanticURL)(l.ACTION_SHOWDATA,{pageName:E.default.PY_DETAILS,dataViewName:u},f)||"";if(o?.includes(E.default.PREVIEW)){const t={type:l.SHOW_DATA,payload:{pageName:E.default.VIEW_NAMES.PY_DATA_PREVIEW,container:E.default.PREVIEW,containerName:E.default.PREVIEW,...g}};e.push(t)}else if(a!==E.default.PAGE&&n===A&&o?.includes(E.default.PRIMARY)){const t={type:l.SHOW_DATA,payload:{pageName:E.default.VIEW_NAMES.PY_DETAILS,containerName:"",...g}};e.push(t)}return e})(s,I,a,{key:u,resourceType:c,containerItemID:i}),s})),(0,o.map)((()=>(1===s.length&&(0,g.isErrorActionType)(s[0].type)?u.ActionManagerInstance.rejectActionByID(t):u.ActionManagerInstance.resolveActionByID(t),p.dispatch(s),s=[],s))))})))}},"./src/data/update-data-object/action-creator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{UPDATE_DATA_OBJECT:()=>r,updateDataObjectAction:()=>a});const r="UPDATE_DATA_OBJECT",a=e=>({type:r,payload:e})},"./src/data/update-data-object/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./src/router/app-router.ts"),o=s("./src/service_broker/fetch.ts"),i=s("./src/store/state/epics/util.ts"),c=s("./src/store/state/actions/index.ts"),l=s("./src/utils/rxjs-utils.ts");const u=e=>{const{dataPageID:t,context:s,headers:u,containerItemID:d,key:p}=e,f={data_view_ID:t},{restApi:h,reqType:g}=(0,n.resolveRestApi)(c.ACTION_UPDATE_DATA_OBJECT,f),{content:m}=(0,i.getSubmitData)(d);return(0,r.from)((0,o.fetch)(h,{method:g,headers:u,body:{data:{...m.content,...p},pageInstructions:m.pageInstructions||[]}},d)).pipe((0,a.map)((t=>({response:t.data,actionInPayload:e}))),(0,l.logAndCatchError)("Error occurred during ajax call at updateDataObject Epic",s))}},"./src/data/update-data-object/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{updateDataObject:()=>I,updateDataObjectAction:()=>_.updateDataObjectAction});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/switchMap.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),i=s("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),c=s("./src/utils/rxjs-utils.ts"),l=s("./src/store/state/actions/index.ts"),u=s("./src/actions/manager.ts"),d=s("./src/store/state/actions/action-creators.ts"),p=s("./src/store/state/state-manager.ts"),f=s("./src/router/routing-manager.ts"),h=s("./src/case/common-helper.ts"),g=s("./src/container/container-utils.ts"),m=s("./src/store/state/epics/util.ts"),E=s("./src/constants.ts"),A=s("./src/data/update-data-object/async-request.ts"),_=s("./src/data/update-data-object/action-creator.ts");const I=e=>{let t=0,s=[];return e.pipe((0,r.ofType)(l.UPDATE_DATA_OBJECT),(0,c.throttleUntilChanged)(100),(0,a.switchMap)((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:E.publicConstants.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return u.ActionManagerInstance.rejectActionByID(t,!0,e),(0,i.of)([])}return(0,i.of)(e.payload).pipe((0,n.mergeMap)((e=>(0,A.default)(e))),(0,n.mergeMap)((async e=>{if(e&&e.type===l.ERROR){const{payload:r}=e,a=(0,m.processDataToDispatchErrorAction)({...e,...r,actionMgrID:t});return s.push(a),s}const{actionInPayload:r}=e,{containerItemID:a,isModalAction:n}=r,o=n?g.CONTAINER_NAMES.MODAL:g.CONTAINER_NAMES.PRIMARY,i={target:(0,f.getResolvedTargetName)(o,a),containerItemID:a,context:a};return s.push(d.postProcess(d.removeContainerItem,i)),s})),(0,o.map)((()=>(1===s.length&&(0,h.isErrorActionType)(s[0].type)?u.ActionManagerInstance.rejectActionByID(t):u.ActionManagerInstance.resolveActionByID(t),p.dispatch(s),s=[],s))))})))}},"./src/data/view-data-object/action-creator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{VIEW_DATA_OBJECT:()=>r,getDataObjectViewAction:()=>a});const r="VIEW_DATA_OBJECT",a=e=>({type:r,payload:e})},"./src/data/view-data-object/async-request.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./src/router/app-router.ts"),o=s("./src/service_broker/fetch.ts"),i=s("./src/store/state/actions/index.ts"),c=s("./src/utils/rxjs-utils.ts");const l=e=>{const{dataLookUp:t,context:s,headers:l,viewName:u,requestPayload:d}=e,p={data_view_ID:t,view_ID:u},{restApi:f,reqType:h}=(0,n.resolveRestApi)(i.ACTION_GET_DATA_OBJECT_VIEW,p);return(0,r.from)((0,o.fetch)(f,{method:h,headers:l,body:{dataViewParameters:d}},s)).pipe((0,a.map)((t=>({response:t.data,actionInPayload:e}))),(0,c.logAndCatchError)("Error occurred during ajax call at getDataObjectView Epic",s))}},"./src/data/view-data-object/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{getDataObjectView:()=>E,getDataObjectViewAction:()=>m.getDataObjectViewAction});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./src/utils/rxjs-utils.ts"),i=s("./src/store/state/actions/index.ts"),c=s("./src/actions/manager.ts"),l=s("./src/store/state/actions/action-creators.ts"),u=s("./src/store/state/state-manager.ts"),d=s("./src/router/routing-manager.ts"),p=s("./src/case/common-helper.ts"),f=s("./src/store/state/epics/util.ts"),h=s("./src/constants.ts"),g=s("./src/data/view-data-object/async-request.ts"),m=s("./src/data/view-data-object/action-creator.ts");const E=e=>{let t=0,s=[];return e.pipe((0,r.ofType)(i.VIEW_DATA_OBJECT),(0,o.throttleUntilChanged)(100),(0,a.map)((e=>(({actionMgrID:t}=e.payload),e.payload))),(0,n.mergeMap)((e=>(0,g.default)(e))),(0,n.mergeMap)((async e=>{if(e&&e.type===i.ERROR){const{payload:r}=e,a=(0,f.processDataToDispatchErrorAction)({...e,...r,actionMgrID:t});return s.push(a),s}const{actionInPayload:r,response:a,headers:n={}}=e,{containerName:o}=r,c=(0,d.getResolvedTargetName)(o,r.context),u=(0,f.getContext)(c,o,r.context),p={acName:c,context:u};await(0,f.processViewResponse)(a,r,p);const g={target:c,context:u,containerItemID:u,headers:n},m=(0,f.getActionPayload)(a,g);return m.resourceType=h.publicConstants.RESOURCE_TYPES.DATA,m.resourceStatus=h.publicConstants.RESOURCE_STATUS.UPDATE,m.key=JSON.stringify(r.requestPayload),s.push(l.postProcess(l.addContainerItem,m)),s})),(0,a.map)((()=>(1===s.length&&(0,p.isErrorActionType)(s[0].type)?c.ActionManagerInstance.rejectActionByID(t):c.ActionManagerInstance.resolveActionByID(t),u.dispatch(s),s=[],s))))}},"./src/datapage/data.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/store/state/state-manager.ts");const a=class{constructor(){this.records=[],this.maxRecords=0,this.isDirty=!1}getRecords(e){if(e){const t=[],{pageNumber:s,pageSize:r}=e,a=s*r;let n=a-r;for(;n<a;n+=1){if(!this.records[n])return this.maxRecords===n?t:[];t.push(this.records[n])}return t}return this.records}mergeRecords(e,t){if(t){const{pageNumber:s,pageSize:r}=t,a=s*r;let n=0;for(let t=a-r+1-1;t<a;t+=1)this.records[t]=e[n],n+=1;if(e.length<r){const t=(s-1)*r+e.length;this.setMaxRecordsCount(t)}}else e||(e=[]),Array.isArray(this.records)&&Array.isArray(e)&&(this.records=(0,r.mergeDeep)(this.records,e,{isArrayDeepMerge:!1})),this.setMaxRecordsCount(this.records.length)}setMaxRecordsCount(e){this.maxRecords=e}getMaxRecordsCount(){return this.maxRecords}}},"./src/datapage/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var r=s("./src/constants.ts"),a=s("./src/utils/utils.ts"),n=s("./src/rules/rules-store.ts"),o=s("./src/data-view/data-api-utils.ts"),i=s("./src/messagingservice/manager.ts"),c=s("./src/cascade/manager.ts"),l=s("./src/service_broker/fetch.ts"),u=s("./src/router/app-router.ts"),d=s("./src/datapage/data.ts");const p=new class{constructor(){this.dataStore={},this.dataStoreMeta={},this.subscribers={},this.dataPageSubscribers={},this.isCacheEnabled=!0,this.subscribedDataPageNames=new Set}SUBSCRIPTION_STATUS_FAILED="FAILED";SUBSCRIPTION_STATUS_SUCCESS="SUCCESS";DATAPAGE_NOT_CACHED="Data Page Not Cached";DUPLICATE_SUBSCRIPTION_ID="Duplicate Subscription Id";MISSING_MANDATORY_FIELD="Missing Mandatory Field(s)";getData(e,t,s,r){const a=this.generateHash(e,t,r);if(this.dataStore[e]&&this.dataStore[e][a]){const t=this.dataStore[e][a];return t.isDirty?[]:t.getRecords(s)}return[]}generateHash(e,t,s){const o=n.getDataPageMetadata(e);let i=[];o||(i=Object.keys(t||{}).map((e=>({name:e}))));let c="",l=e;const u=[];return(o?.parameters||i).forEach((e=>{t?.[e.name]?u.push(t[e.name]):u.push(e.defaultValue??r.default.NULL_STRING)})),s&&u.push(JSON.stringify(s)),u.join(r.default.HASH_DELIMITER)&&(c=a.default.getHashedString(u.join(r.default.HASH_DELIMITER)),l=e+r.default.UNDERSCORE_STRING+c),l}async getDataAsync(e,t,s={},r,a,n={}){if(this.subscribeToMessageService(e),n.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),!this.isCacheable(e,a)||n.invalidateCache){const o=await this.fetchData(e,s,r,a,t,n),i=o?.data?.data??[];return{...o.data,data:i,pageNumber:o?.data?.pageNumber,pageSize:o?.data?.pageSize,queryStats:o?.data?.queryStats,status:o?.status}}const o=this.getData(e,s,r,a);if(o.length>0)return Promise.resolve({data:o});const i=await this.fetchData(e,s,r,a,t,n);return{...i.data,data:this.mergeDataStore(e,s,r,a,i),pageNumber:i?.data?.pageNumber,pageSize:i?.data?.pageSize,queryStats:i?.data?.queryStats,status:i?.status}}async getPageDataAsync(e,t,s={},a={}){this.subscribeToMessageService(e);const n=this.generateHash(e,s,null);if(a.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),this.isCacheable(e)&&this.dataStore[e]&&this.dataStore[e][n]){if(!a?.invalidateCache)return Promise.resolve(this.dataStore[e][n]);delete this.dataStore[e][n],this._removeDataStoreMetaEntry(e,s,n)}const{restApi:o,reqType:i}=(0,u.resolveRestApi)(r.default.GET_PAGE_DATA,{dataViewName:e,dataViewParameters:encodeURIComponent(JSON.stringify(s))}),c={method:i},d=o&&s&&0===Object.keys(s).length?o.split("?")[0]:o;return(0,l.fetch)(d,c,t).then((t=>(this.isCacheable(e)&&(this.dataStore[e]={...this.dataStore[e],[n]:t.data},this._addDataStoreMetaEntry(e,s,n)),t.data)))}subscribeToDataPageUpdates(e,t,s,r={}){if(!e||!t||!s)return!1;const a=this.generateHash(s,r,null);this.dataPageSubscribers[s]??={};const n=this.dataPageSubscribers[s];n[a]??={};const o=n[a];return!o[e]&&(o[e]??=t,!0)}unsubscribeToDataPageUpdates(e,t,s={}){if(!e||!t)return!1;const r=this.generateHash(t,s,null);return delete this.dataPageSubscribers[t]?.[r]?.[e],!0}_isDataPageCached(e,t){if(t&&a.default.isObjectEmpty(t))return!!this.dataStore[e];const s=this.generateHash(e,t,null);return!!this.dataStoreMeta[e]?.[s]?.length}updateDataPageStore(e={}){Object.keys(e).forEach((t=>{this.dataStore[t]||(this.dataStore[t]={});const s=e[t];Object.keys(s).forEach((s=>{if(this.dataStore[t][s])this.dataStore[t][s].mergeRecords(e[t][s].pxResults);else{const r=new d.default;this.dataStore[t][s]=r,r.mergeRecords(e[t][s].pxResults||[])}}))}))}_addDataStoreMetaEntry(e,t,s){const r=this.generateHash(e,t,null);this.dataStoreMeta[e]??={};const a=this.dataStoreMeta[e];a[r]??=[];const n=a[r];n.includes(s)||n.push(s)}_removeDataStoreMetaEntry(e,t,s){if(!e||t||s||(this.dataStoreMeta[e]={}),e&&t&&s){const r=this.generateHash(e,t,null);this.dataStoreMeta[e][r]=this.dataStoreMeta[e][r].filter((e=>e!==s))}}mergeDataStore(e,t,s,r,a){const n=this.generateHash(e,t,r),o=a?.data?.data;if(!o||0===o.length)return[];this.dataStore[e]||(this.dataStore[e]={}),this.dataStore[e][n]||(this.dataStore[e][n]=new d.default);const i=this.dataStore[e][n];return i.mergeRecords(o,s),i.isDirty=!1,this._addDataStoreMetaEntry(e,t,n),i.getRecords(s)}async fetchData(e,t,s,r,a,n){const{additionalApiParams:{useExtendedTimeout:i=!1,includeTotalCount:c=!1}={},...l}=n,u={dataViewParameters:t};return c&&(u.includeTotalCount=!0),i&&(u.useExtendedTimeout=!0),s&&(u.paging=s),r&&(u.query=r),o.default.getData(e,u,a,l)}isDataPage(e=""){return e.startsWith("D_")||e.startsWith("Declare_")}handleCascadeUpdate(){const{dataPageName:e,scope:t}=this;t.handleMessage({message:{datapage:e,parameters:""}})}subscribeToUpdate(e,t,s,r,a,n){this.subscribers[e]=this.subscribers[e]||{},this.subscribers[e].callback=this.subscribers[e].callback||{},n&&!this.subscribers[e].callback?.[n]&&(this.subscribers[e].callback[n]=a),this.subscribeToCascadeUpdates(e,t,s,r,n)}unsubscribe(e,t,s,r,a){delete this.subscribers[e]?.callback?.[a],t&&t.length>0&&c.default.unRegisterFields(s,r,t,a)}subscribeToCascadeUpdates(e,t,s,r,a){t&&t.length>0&&c.default.registerFields(s,r,t,this.handleCascadeUpdate.bind({dataPageName:e,scope:this}),a)}subscribeToMessageService(e){if(e&&this.subscribedDataPageNames.has(e))return;const t={matcher:"DATAPAGE_UPDATED",criteria:{datapage:e}};i.default.subscribe(t,this.handleMessage.bind(this)),this.subscribedDataPageNames.add(e)}handleMessage(e){const{msgId:t,message:s}=e,{datapage:r,parameters:a=""}=s,n=this.subscribers[r];this.markDataInstanceDirty(r,""===a?null:JSON.parse(a)),this._executeDataPageSubscriptions(e),!t&&n?.callback&&Object.keys(n.callback).forEach((t=>{n.callback?.[t](e.message)}))}markDataInstanceDirty(e,t){let s,r;t&&(s=this.generateHash(e,t,null),r=this.dataStoreMeta[e]?.[s],!r)||!this.dataStore[e]||Object.keys(this.dataStore[e]).filter((e=>!t||!r||r.includes(e))).forEach((t=>{this.dataStore[e][t].isDirty=!0}))}_executeDataPageSubscriptions(e){const{message:t}=e,{datapage:s,parameters:r}=t,a=r?JSON.parse(r):null;if(this.dataPageSubscribers[s])if(a){const t=[];t.push(this.generateHash(s,a,null)),t.push(this.generateHash(s,null,null)),t.forEach((t=>{const r=this.dataPageSubscribers[s]?.[t]??{};Object.keys(r).forEach((t=>{r[t](e.message)}))}))}else{const t=this.dataPageSubscribers[s];Object.keys(t).forEach((s=>{const r=t[s];Object.keys(r).forEach((r=>{t[s][r](e.message)}))}))}}isPerInteraction(e){return"reloadOncePerInteraction"===n.getDataPageMetadata(e)?.refreshStrategy?.type}isCacheable(e,t){return!(this.isPerInteraction(e)||!this.isCacheEnabled||t&&Object.keys(t).length>1)}disableCache(e){this.isCacheEnabled=!e}}},"./src/datatype/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/rules/rules-store.ts");const a=class{static getSavableDataPage(e){return r.getSavableDataPage(e)}static getLookUpDataPage(e){return r.getLookUpDataPage(e)}static getLookUpDataPageInfo(e){return r.getLookUpDataPageInfo(e)}static getDataPageKeys(e){return r.getDataPageKeys(e)}}},"./src/debug/debugger.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/debug/xray-runtime.ts");const a=new class{constructor(){this.xray=!1,this.onXRayCallback=null,this.xrayRuntime=new r.default(this),this.isPreview=!1,this.debugLevels="vcv=1;tracer=0;log=0"}onXRay(e){this.onXRayCallback=e}toggleXRay(e){this.xray=e,this.xrayRuntime.xrayInfo={},null!==this.onXRayCallback&&this.onXRayCallback(e)}enableXRay(){this.toggleXRay(!0)}disableXRay(){this.toggleXRay(!1)}toggle(){this.xray?this.toggleXRay(!1):this.toggleXRay(!0)}isXRayOn(){return this.xray}getXRayRuntime(){return this.xrayRuntime}setPreviewMode(){this.isPreview=!0}getPreviewMode(){return this.isPreview}enableTracer=()=>{this.debugLevels="vcv=1;tracer=1;log=0"};disableTracer=()=>{this.debugLevels="vcv=1;tracer=0;log=0"};getDebugLevels=()=>this.debugLevels}},"./src/debug/xray-runtime.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=class{constructor(e){this.xrayInfo={},this.xRayDebugger=e}startXRay(){if(!this.xRayDebugger.xray)return null;const e=`${Date.now()+Math.random()}`;return this.xrayInfo[e]={startTime:Date.now()/1e3},e}startXRayRestApi(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],restApisTime:{...this.xrayInfo[e]?this.xrayInfo[e].restApisTime:{},[t]:Date.now()}})}stopXRayRestApi(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],restApisTime:{...this.xrayInfo[e]?.restApisTime,[t]:(Date.now()-this.xrayInfo[e]?.restApisTime[t])/1e3}})}updateXRay(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],...t})}stopXRay(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],totalTime:Date.now()/1e3-this.xrayInfo[e].startTime},t().setXRayInfo(this.xrayInfo[e]),delete this.xrayInfo[e])}}},"./src/deferload/manager.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/refresh/refreshHelpers.ts");const a=new class{constructor(){this.components={}}_checkComponent(e,t){return!!this.components[t]?.[e]}start(e,t,s,r,a){const n={viewName:e,pageReference:s,contextName:r,isInProgress:!0,active:!0,caseKey:t};this.components[r]=this.components[r]||{},this.components[r][a]=n}stop(e,t){this._checkComponent(e,t)&&(this.components[t][e].isInProgress=!1)}remove(e,t){this._checkComponent(e,t)&&delete this.components[t][e]}removeContext(e){delete this.components[e]}enableCascade(e){this.components[e]&&Object.values(this.components[e]).forEach((e=>{e.isInProgress&&(e.cascade=!0)}))}activate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!0)}deactivate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!1)}refreshActiveComponents(e){e&&this.components[e]&&Object.keys(this.components[e]).forEach((t=>{this.refreshComponent(t,e)}))}refreshComponent(e,t){if(!this._checkComponent(e,t))return;const s=this.components[t][e];if(s.active&&s.cascade){const{caseKey:e,viewName:a,pageReference:n}=s;(0,r.dispatchCaseViewRefresh)(e,a,t,n,{})}}}},"./src/dynamic-content/parser.ts":(e,t,s)=>{"use strict";let r;s.r(t),s.d(t,{resolveParagraphContent:()=>n,resolveProperties:()=>a});const a=e=>{if(e){const t=(new DOMParser).parseFromString(e,"text/html").getElementsByTagName("pega-reference")[0].getAttribute("data-rule-id")??"";if(t){const e=r.getValue(t);return r.registerAdditionalProps({[t]:`@P ${t}`}),e}}},n=(e,t)=>{r=t;const s=e.replace(/<pega-reference(.*?)<\/pega-reference>/g,a);return/^(<p>)\s*(<\/p>)$/.test(s)?null:s}},"./src/dynamic-content/util.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/dynamic-content/parser.ts");const a=class{static getParagraphStream(e,t){return(0,r.resolveParagraphContent)(e,t)}}},"./src/environment-info/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/router/route-parser.ts"),a=s("./src/debug/debugger.ts"),n=s("./src/constants.ts"),o=s("./src/utils/utils.ts");const i=new class{constructor(){this.environmentInfoObject=null,this.isPortalLoaded=!1,this.pageName=null,this.KeyMapping={},this.isAssignmentHeaderHidden=!1,this.coexistenceMeta={appType:"",isCoexistence:!1},this.brandingInfo=null,this.cookieComplianceMethod="none",this.showPerformanceDashboard=!1,this.isExtraCallRequiredForDefaultHome="false"}setEnvironmentInfo(e){this.environmentInfoObject=e;const t=this.environmentInfoObject?.features||o.default.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...t,granularUIRefresh:t.granularUIRefresh||t.pyEnableGranularUIRefresh||!1}}getOperatorName(){return this.environmentInfoObject?.pxOperator?.pyUserName}getOperatorWorkGroup(){return this.environmentInfoObject?.pxOperator?.pyWorkGroup}getOperatorIdentifier(){return this.environmentInfoObject?.pxOperator?.pyUserIdentifier}getOperatorImageInsKey(){return this.environmentInfoObject?.pxOperator?.pyImageInsKey}getApplicationLabel(){return this.environmentInfoObject?.pxApplication?.pyLabel}getPortalName(){return r.default.getPortalName()}getApplicationName(){return this.environmentInfoObject?.pxApplication?.pyRuleName}getUseLocale(){return this.environmentInfoObject?.pxLocale?.pyUseLocale}getAccessGroup(){return this.environmentInfoObject?.pxOperator?.pyAccessGroup}getTimeZone(){return this.environmentInfoObject?.pxLocale?.pyTimeZone}getTheme(){return this.themeOverrides}setTheme(e){return this.themeOverrides=e,this.themeOverrides}getBrandingInfo(){return this.brandingInfo}setBrandingInfo(e){return this.brandingInfo=e,this.brandingInfo}getCookieComplianceMethod(){return this.cookieComplianceMethod}setCookieComplianceMethod(e){this.cookieComplianceMethod=e}setLocale(e){const t=e.replaceAll("-","_").split("_").slice(0,2);this.locale=t.join("-"),this.environmentInfoObject?.pxLocale&&(this.environmentInfoObject.pxLocale.pyUseLocale=this.locale)}getLocale=()=>this.locale;getEnvironmentKeys(){return Object.keys(n.default.ENV_INFO_KEYS)}getMaxAttachmentSize(){return this.environmentInfoObject?.pxApplication?.pyMaxAttachmentSize}getDefaultOperatorDP(){return this.environmentInfoObject?.pxApplication?.pyDefaultOperatorDP}getDocumentUrlDP(){return this.environmentInfoObject?.pxApplication?.pyDocumentUrlDP}getCaseInstanceListDP(){return this.environmentInfoObject?.pxApplication?.pyCaseInstanceListDP}getBaseLocale(){return this.environmentInfoObject?.pxApplication?.pyBaseLocale||"en-US"}getRenderingMode(){return this.environmentInfoObject?.renderingMode}getBuiltOnAppNames(){return this.environmentInfoObject?.pxApplication?.pyBuiltOnApplications}setPreviewMode(){a.default.setPreviewMode()}setDefaultCasePage(e){this.pageName=e}getDefaultCasePage(){return this.pageName}disableAssignmentHeader(e){this.isAssignmentHeaderHidden=e}isAssignmentHeaderDisabled(){return this.isAssignmentHeaderHidden}getDefaultPortal(){return this.environmentInfoObject?.pxOperator?.pyDefaultPortal}updateFeatureMap(e){const t=this.environmentInfoObject?.features;return this.environmentInfoObject&&e&&(this.environmentInfoObject?.features?this.environmentInfoObject.features={...t,...e}:this.environmentInfoObject.features={...e}),this.getFeatureMap()}getFeatureMap(){return this.environmentInfoObject?.features||{}}setKeyMapping(e){return this.KeyMapping=e,this.KeyMapping}getKeyMapping(e){const t=this.KeyMapping[e];return void 0!==t?t:null}setCoexistenceMeta(e){return e&&(this.coexistenceMeta=e),this.getCoexistenceMeta()}getCoexistenceMeta(){return this.coexistenceMeta}isCoexistenceAppOfType(e){return!(!this.coexistenceMeta.isCoexistence||this.coexistenceMeta.appType!==e)}getCaseTypeList(){return this.environmentInfoObject&&this.environmentInfoObject?.pyCaseTypeList||[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}getAvailableLocalePacks(){return this.environmentInfoObject?.pyAvailableLocalePacks?.map((e=>e.pyLabel))||[]}getPerformanceDashboardVisibility(){return this.showPerformanceDashboard}setPerformanceDashboardVisibility(e){this.showPerformanceDashboard=e}getIsExtraCallRequiredForDefaultHome(){return this.isExtraCallRequiredForDefaultHome}setIsExtraCallRequiredForDefaultHome(e){this.isExtraCallRequiredForDefaultHome=e}getInactivityTimeout(){const e=this.environmentInfoObject?.pxOperator?.pyAuthenticationTimeout;return e?Number(e):e}isUnifiedObject(){return this.environmentInfoObject?.features?.isUnifiedObject||!1}}},"./src/error-handler/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=new class{constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}}},"./src/events/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/constants.ts");const a=class{static getCaseEvent=()=>Object.freeze(r.publicConstants.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(r.publicConstants.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(r.publicConstants.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(r.publicConstants.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS)}},"./src/expression/declare-expression-handler.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/services/index.ts"),a=s("./src/context/context-processor.ts"),n=s("./src/store/state/actions/index.ts"),o=s("./src/store/state/state-manager.ts");const i=class{static handleExpression(e,t,s,a){const n={actionObject:{action:"decexp",params:{source:e,value:t,targets:s},context:this.getContext(e,a)}};r.default.fetchData(n).then((e=>e.json())).then((e=>{this.updateState(e,a)})).catch((e=>window.console.log(e)))}static getContext(e,t){const s=e.substring(0,e.indexOf("."));return{name:s,class:a.default.getPropertyValue(`${s}.pxObjClass`,null,t)||a.default.getPropertyValue(`${s}.pyClassName`,null,t)}}static updateState(e,t){Object.keys(e).forEach((s=>(0,o.dispatch)({type:n.SET_PROPERTY,payload:{context:t,reference:s,value:e[s]}})))}}},"./src/expression/expression-engine.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{evaluate:()=>u,handleChange:()=>c,hasDeclareExpression:()=>i,updateDeclareExpressions:()=>l});var r=s("./src/utils/utils.ts"),a=s("./src/annotation/handlers/expression/utils.ts"),n=s("./src/expression/declare-expression-handler.ts");const o={},i=(e,t)=>o[t]&&Object.prototype.hasOwnProperty.call(o[t],e),c=e=>{const{context:t}=e;i(e.reference,t)&&n.default.handleExpression(e.reference,e.value,o[t][e.reference],t)},l=(e={})=>{r.default.copy(e,o)},u=(e,t,s)=>(0,a.evaluateExpressionOnLocalData)(e,t,s?.pConnect.getPConnect())},"./src/feed/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/locale/locale-utils.ts"),a=s("./src/rest-client/index.ts"),n=s("./src/utils/view-resources.ts");const o={"Content-Type":"application/json"},i=new class{constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,t,s,o,i,c,l)=>{const{getLocaleValue:u}=r.localeUtils;l||(this.mentions=[]);let d="";o&&Array.isArray(o)&&o?.length>0&&(o.forEach((e=>{e.on&&(d=`${d}${e.id},`)})),""===d&&(d="ClearFilters"));let p="";l&&(p=c.getValue("pulse.pageLastEntry"));const f={filterForContext:e,feedID:t,feedClass:s,filterBy:d,pageSize:10,olderThan:p};for(let e=0;e<i.length;e+=1)i[e].cancel();const h=(0,a.getCancelTokenSource)();return i.push(h),(0,a.invokeRestApi)("getFeedMessages",{queryPayload:f,cancelTokenSource:h},c.getContextName()).then((async e=>{if(200===e.status&&e.data){i.pop();const t=[],s={};let r=!1;if(e?.data){if(e?.data?.data?.FeedList){const a=e.data.data.FeedList?.pxResults;Array.isArray(a)&&a?.length>0&&a.forEach(((e,a)=>{e.ID=""!==e.pzInsKey?e.pzInsKey:`message${a}`,t.push(e.ID),s[e.ID]=e,e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions)})),r||"pzPostDetails"===e.pyMessageViewReference||"pzPrivatePostDetails"===e.pyMessageViewReference||(r=!0)}))}if(r&&await(0,n.updateViewResources)({uiResources:e.data.uiResources}),!o&&(o=[{id:"All",label:u("All","Pulse"),on:!0,disabled:!1}],e?.data?.data?.FeedFilters)){const t=e.data.data.FeedFilters?.pxResults;let s=!0;t&&Array.isArray(t)&&t?.length>0&&(t.forEach((e=>{const t={id:e.pyFeedSourceReference,label:u(e.pyLabel,"Pulse"),disabled:!1,on:"true"===e.pySelected};t.on||(s=!1),o.push(t)})),o.find((e=>"All"===e.id)).on=s)}}if(l&&c.getValue("pulse.messageIDs")){let r=c.getValue("pulse.messageIDs"),a=c.getValue("pulse.messages");r=[...r,...t],a={...a,...s},Object.values(a).forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions)}))})),c.updateState({pulse:{messages:a,messageIDs:r,nextPageFirstEntry:e?.data?.nextPageFirstEntry||"",pageLastEntry:e?.data?.pageLastEntry||"",hideAttachment:e?.data?.hideAttachment||!1}})}else c.updateState({pulse:{messages:s,messageIDs:t,nextPageFirstEntry:e?.data?.nextPageFirstEntry||"",pageLastEntry:e?.data?.pageLastEntry||"",hideAttachment:e?.data?.hideAttachment||!1}});const a=[...new Map(this.mentions.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.prototype.hasOwnProperty.call(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[];return{feedFilters:o,caseMentions:a}}return c.reportError(`getFeeds call failed ${e.status}`,e.data),""})).catch((e=>{(0,a.isRequestCanceled)(e)||c.reportError(": Error occurred during ajax call at getFeeds API : ",e.response)}))};postMessage=(e,t,s=[],r=!1,n)=>{const i=JSON.stringify({context:e,parentMessageId:r?e:"",message:t,attachments:s});return(0,a.invokeRestApi)("postFeedMessages",{body:i,headers:o},n.getContextName()).then((t=>{if((201===t.status||200===t.status)&&t.data){const a=t?.data;if(r){a.parentMessageID=e;const{pxResults:t,caseMentions:o}=this.buildMessageObject(a,r,n,s.length>0);return n.updateState({pulse:{messages:{[e]:{pxResults:t}}}}),o}const{messages:o,messageIDs:i,caseMentions:c}=this.buildMessageObject(a,r,n,s.length>0);return n.updateState({pulse:{messages:o,messageIDs:i}}),c}return n.reportError(`postMessage call failed with status ${t.status}`,t),""})).catch((e=>{n.reportError(": Error occurred during ajax call at postMessage API : ",e.response)}))};editMessage=({messageID:e,parentMessageID:t,message:s,c11nEnv:r,isReply:n=!1})=>{const i=JSON.stringify({message:s}),c={messageID:e};return(0,a.invokeRestApi)("editFeedMessage",{queryPayload:c,body:i,headers:o},r.getContextName()).then((e=>{if(200===e?.status&&e?.data){const s=e?.data;if(n){s.parentMessageID=t;const{pxResults:e,caseMentions:a}=this.buildMessageObject(s,n,r,!1);return r.updateState({pulse:{messages:{[t]:{pxResults:e}}}}),a}const{messages:a,caseMentions:o}=this.buildMessageObject(s,n,r,!1);return r.updateState({pulse:{messages:a}}),o}return r.reportError(`editMessage call failed with status ${e.status}`,e),""})).catch((e=>{r.reportError(": Error occurred during ajax call at editMessage API : ",e.response)}))};buildMessageObject=(e,t,s,r=!1)=>{const a={ID:e?.ID||"",tags:e?.tags||[],pyHasAttachment:r,pzInsKey:e?.ID||"",pyMessage:e?.message||"",mentions:e?.mentions||[],postedByUser:e?.postedByUser,pxCreateDateTime:e?.postedTime||"",pxUpdateDateTime:e?.updatedTime||"",parentMessageID:e?.parentMessageID||"",pyIsEdited:"string"==typeof e?.isEdited?"true"===e?.isEdited:e?.isEdited||!1,pyFeed:{pyPostedOn:e?.postedTime||"",pyFeedTitle:e?.postedByUser?.name||"",pyIconType:"user",pyCommentContext:"pzInsKey",pyIconReference:"pi pi-case"},pyContext:"",pxIcon:"globe",pyMessageViewReference:"pzPostDetails"},n=s.getValue("pulse.messages");if(t){let{pxResults:e=[]}=Object.values(n)?.find((e=>e?.ID===a?.parentMessageID))||{};const t=e?.findIndex((e=>e?.pzInsKey===a?.ID));if(-1!==t){const s=[...e];s[t]={...s[t],...a},e=s}else e=[...e,a];return{pxResults:e,messages:{},messageIDs:[],caseMentions:this.getCaseMentions(e)}}const o=s.getValue("pulse.messageIDs");if(o){const e=o.includes(a.ID)?{...n[a.ID],...a}:a,t={...n,[a.ID]:e};return{messages:t,messageIDs:o.includes(a.ID)?o:[a.ID,...o],caseMentions:this.getCaseMentions(Object.values(t))}}};getCaseMentions=e=>{const t=e?.filter((e=>e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0))?.map((e=>e.mentions))?.concat(this.mentions);return[...new Map(t.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.prototype.hasOwnProperty.call(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[]};likeMessage=({pulseContext:e,likedBy:t,messageID:s,isReply:r,c11nEnv:n})=>{const i=t?"unlikeFeedMessages":"likeFeedMessages",c=JSON.stringify({ContextClass:e}),l={pulseContext:e};(0,a.invokeRestApi)(i,{body:c,queryPayload:l,headers:o},n.getContextName()).then((a=>{if(200===a.status)if(r){const r=n.getValue(`pulse.messages.${s}`),a=r?.pxResults&&Array.isArray(r?.pxResults)&&r.pxResults?.length>0&&r.pxResults?.map((s=>{if((s={...s}).pzInsKey===e){let e=0,r=!1;const a=s.pyLikes?s?.pyLikes?.pxLikeCount:0;t?(e=a-1,r=!1):(e=a+1,r=!0),s.pyLikes={pxLikeCount:e,pxIsLiked:r}}return s}));n.updateState({pulse:{messages:{[s]:{pxResults:a}}}})}else{const r={...n.getValue(`pulse.messages.${s}`)},a=r.pyLikes?r.pyLikes.pxLikeCount:0;let o=0,i=!1;t?(o=a-1,i=!1):(o=a+1,i=!0),r.pyLikes={pxLikeCount:o,pxIsLiked:i},n.updateState({pulse:{messages:{[e]:r}}})}else n.reportError(`likeMessage call failed with status ${a.status}`,a)})).catch((e=>{n.reportError(": Error occurred during ajax call at likeMessage API : ",e.response.data)}))};deleteMessage=(e,t,s,r)=>{let n=e;t&&(n=s);const o={messageID:n};(0,a.invokeRestApi)("deleteFeedMessage",{queryPayload:o},r.getContextName()).then((a=>{if(200===a.status)if(t){const t=r.getValue(`pulse.messages.${e}`),a=t?.pxResults&&Array.isArray(t?.pxResults)&&t.pxResults?.length>0&&t.pxResults?.filter((e=>e.pzInsKey!==s));r.updateState({pulse:{messages:{[e]:{pxResults:a}}}})}else{const t=r.getValue("pulse.messageIDs"),s=t&&Array.isArray(t)&&t?.length>0&&t?.filter((t=>t!==e)),a={...r.getValue("pulse.messages")};delete a[e],r.updateState({pulse:{messageIDs:s,messages:a}})}else r.reportError(`deleteMessage call failed with status ${a.status}`,a)})).catch((e=>{r.reportError(": Error occurred during ajax call at deleteMessage API : ",e.response)}))};getLikedUsers=(e,t)=>{const s={messageID:e};return(0,a.invokeRestApi)("getFeedMessageLikes",{queryPayload:s},t.getContextName()).then((e=>e?.data?.users)).catch((e=>{t.reportError(": Error occurred during ajax call at getLikedUsers API : ",e.response)}))};getMentionSuggestions=(e,t)=>{const{pulseContext:s,searchFor:r,mentionsType:n,listSize:o=5}=e,i={pulseContext:s,searchFor:r,mentionsType:n,listSize:o};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const c=(0,a.getCancelTokenSource)();return this.mentionsTagsCancelTokenSource.push(c),(0,a.invokeRestApi)("getMentionSuggestions",{queryPayload:i,cancelTokenSource:c},t.getContextName()).then((e=>(this.mentionsTagsCancelTokenSource=[],200===e.status&&e.data?e?.data:(t.reportError(`Get mention suggestions call failed ${e.status}`,e.data),[])))).catch((e=>{(0,a.isRequestCanceled)(e)||t.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",e.response.data)}))};getMentionTypes=e=>(0,a.invokeRestApi)("getMentionTypes",{},e.getContextName()).then((e=>e?.data)).catch((t=>{e.reportError(": Error occurred during ajax call at getMentionTypes API : ",t.response.data)}));getTagSuggestions=(e,t)=>{const{searchFor:s,listSize:r=5}=e,n={searchFor:s,listSize:r};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const o=(0,a.getCancelTokenSource)();return this.mentionsTagsCancelTokenSource.push(o),(0,a.invokeRestApi)("getTagSuggestions",{queryPayload:n,cancelTokenSource:o},t.getContextName()).then((e=>{this.mentionsTagsCancelTokenSource=[];let s=[];return 200===e.status&&e?.data?s=e?.data?.tags&&Array.isArray(e?.data?.tags)&&e.data.tags.length>0&&e.data.tags?.map((e=>`#${e}`)):t.reportError(`Get tag suggestions call failed ${e.status}`,e.data),s})).catch((e=>{(0,a.isRequestCanceled)(e)||t.reportError(": Error occurred during ajax call at getTagSuggestions API : ",e.response.data)}))}}},"./src/fields/field-default.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/utils/utils.ts");const a=new class{constructor(){this.fieldDefaults={}}updateFieldDefaults(e){e&&(Object.keys(this.fieldDefaults).length?r.default.mergeDeep(e,this.fieldDefaults):r.default.copy(e,this.fieldDefaults))}setFieldDefault(e,t,s){e&&t&&(this.fieldDefaults[e]=this.fieldDefaults[e]||{},this.fieldDefaults[e][t]=s)}getDefaultsforType(e){return this.fieldDefaults[e]}}},"./src/fields/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=class{static formatPageReference(e){const t=e?.split(".").map((e=>{if(e.includes("[")){const t=e.indexOf("["),s=e.indexOf("]"),r=e.substring(t+1,s),a=Number(r)+1;return`${e.substring(0,t)}(${a})${e.substring(s+1)}`}return e}));return t.join(".")}static getFieldLabel(e){let t=e?.label;if(!t&&e?.inheritedProps){const s=e?.inheritedProps;(s.showLabel??1)&&(t=s.label)}return t}}},"./src/form/form-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/store/state/middlewares/property-change-middleware.ts"),a=s("./src/utils/form-handler.ts"),n=s("./src/page-instructions/index.ts"),o=s("./src/validation/validator.ts"),i=s("./src/store/state/epics/util.ts");class c{static getChanges(e){return{...(0,r.getChanges)(e)}}static getSubmitData(e,t={}){const{isTransientContext:s=!1,includeDisabledFields:r=!1}=t,{content:a}=(0,i.getSubmitData)(e,{isTransientContext:s,includeDisabledFields:r});return a}static isStateModified(e){return(0,r.isContextDirty)(e)||(0,n.isPropertyDirtyPageInstruction)(e)||!(!e||!(0,r.isComplexObjectMerged)(e))}static isFormValid(e,t){return(0,a.isFormValid)(e,t)}static clearChangedProperties(e){return(0,n.clearInstructions)(e),(0,n.clearPageInstructionReferences)(e),(0,r.resetChangedProperties)(e)}static getEditableFields(e){return(0,a.getEditableFields)(e)}static setCustomValidator(e,t){o.default.register(e,t)}static isPropertyEditable(e,t){return c.getEditableFields(e).some((e=>e.name===t))}}const l=c},"./src/garbage-collector/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("./src/cascade/manager.ts"),a=s("./src/deferload/manager.ts"),n=s("./src/data-view/index.ts"),o=s("./src/utils/pubsub-utils.ts"),i=s("./src/utils/form-handler.ts"),c=s("./src/messagingservice/manager.ts"),l=s("./src/refresh/refresh-manager.ts"),u=s("./src/contextree/treemanager.ts");const d=class{static cleanCaches(e){r.default.purgeCascadeFields(e),a.default.removeContext(e),n.default.clearContextedCache(e),o.default.cleanContextSubscribers(e),(0,i.removeFormFieldsFromMap)(e),u.default.removeContextTreeNode(e),c.default.clearContext(e),l.default.deRegisterForRefresh(e)}}},"./src/genai-assistant/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/rest-client/index.ts");const a={createConversation:(e,t,s,a=[])=>{for(const e of a)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const n=(0,r.getCancelTokenSource)();a.push(n);const o={assistantID:t},i=JSON.stringify({contextID:e});return(0,r.invokeRestApi)("createConversation",{body:i,cancelTokenSource:n,queryPayload:o},s).then((e=>(a.pop(),e)))},sendMessage:(e,t,s,a)=>{const n={assistantID:e,conversationID:t},o=JSON.stringify({request:s});return(0,r.invokeRestApi)("sendMessage",{body:o,queryPayload:n},a)}}},"./src/initialiser/configurations/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/initialiser/configurations/service-config.ts");const a=class{constructor(e){this.routingInfo=e.routingInfo,this.actionModel=e.actionModel,this.additionalHeaders=e.additionalHeaders,this.tokens=e.tokens,this.semanticUrl=e.semanticUrl,this.queryParams=e.queryParams,this.noPortal=e.noPortal,this.timezone=e.timezone,this.noHistory=e.noHistory,this.viewName=e.viewName,this.theme=e.theme,this.fieldDefaults=e.fieldDefaults,this.restServerConfig=e.restServerConfig,this.dynamicLoadComponents=void 0===e.dynamicLoadComponents||e.dynamicLoadComponents,this.dynamicSemanticUrl=void 0===e.dynamicSemanticUrl||e.dynamicSemanticUrl,this.enableRouting=void 0===e.enableRouting||e.enableRouting,this.locale=e.locale,this.environmentInfo=e.environmentInfo,this.renderingMode=e.renderingMode||"FULL_PORTAL",this.remoteCaseMapping=e.remoteCaseMapping||{},this.envType=e.envType,this.serviceConfig=new r.default(e.serviceConfig),this.behaviorOverrides=e.behaviorOverrides,this.initBroadcast=!!e.initBroadcast,this.cookieComplianceMethod=e.cookieComplianceMethod??"none",this.isExtraCallRequiredForDefaultHome=e.isExtraCallRequiredForDefaultHome??"false"}}},"./src/initialiser/configurations/service-config.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=class{constructor(e){this.appAlias=e.appAlias,this.appAliasWithoutServlet=e.appAliasWithoutServlet,this.googleMapKey=e.googleMapKey,this.staticContentServer=e.staticContentServer,this.appStaticContentServer=e.appStaticContentServer||null,this.contextPath=e.contextPath,this.messagingService=e.messagingService||null,this.reAuthUrl=e.reAuthUrl||null}}},"./src/initialiser/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var r=s("./src/router/app-router.ts"),a=s("./src/store/index.ts"),n=s("./src/environment-info/index.ts"),o=s("./src/fields/field-default.ts"),i=s("./src/actions/targetmap.ts"),c=s("./src/services/index.ts"),l=s("./src/utils/asset-loader.ts"),u=s("./src/locale/locale-utils.ts"),d=s("./src/case/remote-case.ts"),p=s("./src/messagingservice/manager.ts"),f=s("./src/utils/navigation-utils.ts"),h=s("./src/coexistence/index.ts"),g=s("./src/service_broker/header-processor.ts"),m=s("./src/interpreter/c11n-env.ts"),E=s("./src/bootstrap/bootstrap-utils.js"),A=s("./src/runtime-params/index.ts"),_=s("./src/utils/pubsub-utils.ts"),I=s("./src/initialiser/configurations/index.ts"),y=s("./src/initialiser/init-localization/index.ts");const C="@P .viewConfig";let S=0;const b=new class{#c(e,t,s){(0,r.init)(e),i.default.buildActionTargetMap(t),c.default.init(s)}init(e){const t=new I.default(e),s={...t.environmentInfo,renderingMode:t.renderingMode};(0,r.enableAppRouting)(t.enableRouting),(0,a.default)({}),n.default.setTheme(t.theme),n.default.setCookieComplianceMethod(t.cookieComplianceMethod),n.default.setIsExtraCallRequiredForDefaultHome(t.isExtraCallRequiredForDefaultHome),o.default.updateFieldDefaults(t.fieldDefaults),g.default.setDefaultHeaders(t.additionalHeaders),this.#c(t.routingInfo,t.actionModel,{server:t.restServerConfig,reAuthUrl:t.serviceConfig.reAuthUrl}),l.default.setAppAlias(t.serviceConfig.appAliasWithoutServlet||t.serviceConfig.appAlias),c.default.setGoogleMapsAPIKey(t.serviceConfig.googleMapKey),l.default.initServer(t.serviceConfig.staticContentServer,t.serviceConfig.appStaticContentServer,t.tokens.C11NB2S),u.localeUtils.setTimezone(t.timezone),n.default.setEnvironmentInfo(s),n.default.setLocale(t.locale),d.default.setRemoteCaseMapping(t.remoteCaseMapping),p.default.setConnectionConfig({messagingService:t.serviceConfig.messagingService}),f.default.init(),t.initBroadcast&&h.default.getBroadcastUtils().init()}getBootstrapConfig=async(e,t)=>{const s=`${t.token_type} ${t.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:s})}).then((e=>e.json()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,s=(0,m.createC11nEnv)({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return s.getPConnect().getContainerManager().initializeContainers({type:t,name:"primary",context:"app"}),{props:{getPConnect:s.getPConnect}}};importReactRoot=async()=>{const e=[];return E.default.getComponentsRegistry().getComponent("ReactRoot").modules.forEach((t=>{e.push(t())})),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,t,s)=>{try{await function(e,t="true"){return new Promise(((s,r)=>{const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("src",e),a.setAttribute("async",t),a.onload=s(),a.onerror=()=>r(new Error("Failed to load resource from Design System")),document.body.appendChild(a)}))}(`${e}component/project/${t}/designsystems/${s}/componentsmap.js?v=${Date.now()}`)}catch(e){console.log(e)}};buildSemanticUrl=(e,t,s,r,a)=>{const n=new URLSearchParams(t);let o=!1;"true"===s&&(o=!0);let i=null,c=null;if(e){e.startsWith("/")&&(e=e.substring(1));const t=e.split("/");i=t[0],t.length>1&&t[1]&&(c=t[1])}else o=!1;let l=r;i&&(l=`${l}/${i}`),c&&(l=`${l}/${c}`),o&&(n.has("noPortal")||n.append("noPortal","true"),c&&a&&n.append("view",a));const u=n.toString();return l+=u?`?${u}`:"",l};initCoreConfig=e=>{const{routingInfo:t,serviceConfig:s,semanticUrl:r,queryParams:a,noPortal:o,noHistory:i,viewName:c,theme:l,restServerConfig:u,dynamicLoadComponents:d=!0,dynamicSemanticUrl:p=!0,renderingMode:f="FULL_PORTAL",envType:h,extras:g}=e,{appAlias:m,contextPath:E}=s;let A=window.location.origin;const _={};if(void 0!==u&&(A=u),E&&(A=`${A}${E}`),m&&"LAUNCHPAD"!==h&&(A=`${A}/${m}`),e.restServerConfig=A,!0===p){const e=this.buildSemanticUrl(r,a,o,A,c);!i&&e&&window.history.pushState({},"home",e)}else if("HYBRID"!==f){let e=window.location.href;e.indexOf("?")>0&&(e=e.substring(0,e.indexOf("?")),window.history.pushState({},"home",e)),_.dynamicSemanticUrl=!1}else console.log(`renderingMode :${f}`);!0!==d&&(_.dynamicLoadComponents=!1);let I=null;if(m){const e=m.indexOf("/app/");I=e>=0?m.substring(e+1):m}if(Object.keys(_).length>0&&window.PCore.setBehaviorOverrides(_),e.appAlias=I,l){let t="object"==typeof l?l:null;if(null===t)try{t=JSON.parse(l)}catch{t={}}e.theme=t}const y={...t,domain:`${window.location.protocol}//${window.location.host}`,searchParams:window.location.search};e.routingInfo=y,e.initBroadcast="true"===n.default.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence,!e.noPortal||"true"!==e.noPortal&&!0!==e.noPortal||(e.renderingMode="EMBED"),g?.cspNonce&&(window.__webpack_nonce__=g.cspNonce),this.init(e)};launchViewByName=(e,t,s,r,a,n,o,i)=>{S+=1;const c=i||`mashup${S}`,l={type:"RootContainer",config:{viewConfig:C,renderingMode:"view",name:c}};E.default.loadRootComponent(e,l,a,n,o).then((()=>E.default.loadViewByName(t,s,r,c)))};launchView=(e,t,s=[],r,a,n,o)=>{S+=1;const i="hybrid"===o?`hybrid_${S}`:o;S+=1;const c=i||`mashup${S}`,l={type:"RootContainer",config:{viewConfig:C,renderingMode:"portal",name:c}};A.default.setRuntimeParams(r),E.default.loadRootComponent(e,l,s,a,n).then((()=>E.default.updateStoreWithUiRoot(t,c)))};launchPortal=(e,t,s,r=[])=>{S+=1;const a=s||`portal${S}`,o={type:"RootContainer",config:{viewConfig:C,renderingMode:"portal",skeleton:"LoadingComponent",name:a}};r.push(o.config.skeleton),n.default.isPortalLoaded=!0,E.default.loadRootComponent(e,o,r).then((()=>E.default.loadPortalView(t,a)))};launchMashup=(e,t=!0)=>{if(t){const t=document.getElementsByTagName(e)[0]?.parentNode;if(t){const e=document.createElement("style");e.setAttribute("id","portal-less-styles"),e.innerHTML="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",t.appendChild(e)}}E.default.loadRootComponent(e,{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:"@ROUTING_INFO",name:"primary"}}]},[PCore.getConstants().LOAD_VIEW_STRING,"ViewContainer"]),window.parent!==window&&s("./src/initialiser lazy recursive ^.*constellation\\-mashup\\-bridge\\.js$")(`${window.PCore.getAssetLoader().getStaticServerUrl()}constellation-mashup-bridge.js`).then((e=>{e.mashup.init({resizing:"stretch"})}))};start=async(e,t)=>{const{appStaticContentServer:s}=e.serviceConfig,{ccV2LibId:r,environmentId:a,isAlternateDesignSystemEnabled:n,alternateDesignSystemName:o}=e;this.initCoreConfig(e);const i=async()=>(await this.importReactRoot(),r&&await l.default.importCustomComponentMap(r),"true"===n&&"other"!==o&&await this.importDesignSystemComponentMap(s,a,o),t&&t(),!0);return new Promise(((e,t)=>{(0,y.default)().then((async()=>{const t=E.default.getComponentsRegistry();"ReactRoot"in t.getLazyMap()?e(!0):t.getComponent("ReactRoot")?e(await i()):_.default.subscribe("component-map-loaded",(async()=>{e(await i())}))})).catch((e=>{t(e)}))}))};registerForDebugInfo=e=>{PCore.getEnvironmentInfo().setPreviewMode(),e&&PCore.getPubSubUtils().subscribe("fetchSuccess",(({debugInfo:t})=>{const s=t?.["X-Pega-App-Debug-ID"];e.postMessage({appDebugID:s})}),"fetchSuccess")};toggleTracerHeaders=e=>{e.addEventListener("message",(async e=>{const t=e?.data?.enableTracer;t?PCore.getDebugger().enableTracer():PCore.getDebugger().disableTracer()}))};loadEnvironmentInfo=async e=>{if(e.theme&&(!window.pms||"Android"!==window.pms.device.systemName))try{const t=JSON.parse(e.theme.definition);PCore.getEnvironmentInfo().setBrandingInfo(t.Branding),PCore.getEnvironmentInfo().setTheme(t.Theme)}catch{PCore.getEnvironmentInfo().setBrandingInfo({}),PCore.getEnvironmentInfo().setTheme({})}e.keyMapping&&PCore.getEnvironmentInfo().setKeyMapping(e.keyMapping),PCore.getEnvironmentInfo().setCookieComplianceMethod(e.cookieComplianceMethod??"none")}}},"./src/initialiser/init-localization/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/utils/asset-loader.ts"),a=s("./src/locale/locale-utils.ts"),n=s("./src/environment-info/index.ts"),o=s("./src/rest-client/index.ts");const i=async()=>{const e=n.default.getLocale(),t=n.default.getFeatureMap().localizationVersion||1;if("en-US"!==e)try{let s;s=2===t?[e]:[a.localeUtils.GENERIC_BUNDLE_KEY,a.localeUtils.MESSAGE_BUNDLE_KEY,a.localeUtils.FIELD_LABELS_BUNDLE_KEY];const i=s.map((async s=>{2===t?await(async e=>{const t=n.default.getFeatureMap().availableLanguagePacks||[];if(!e||!t.includes(e))return void console.warn(`current locale ${e} is not supported by application.`);const s={locale:e},r=await(0,o.invokeRestApi)("getLocalizationPack",{queryPayload:s});if((201===r.status||200===r.status)&&r.data){const e=r.data;Object.keys(e).forEach((t=>{a.localeUtils.setLocaleForRule(e[t],t)}))}})(s):a.localeUtils.isCurrentLocalePackAvailable()&&await(async(e,t)=>{const s=await r.default.getSvcLocale(t,`${e}.json`);if(s.ok&&e){const t=await s.json();a.localeUtils.setLocaleForRule(t,e)}})(s,e)}));await Promise.allSettled(i)}catch(e){console.warn(e)}}},"./src/interpreter/c11n-env.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{C11nEnv:()=>k,createC11nEnv:()=>V,default:()=>$,registerComponentCreator:()=>G});var r=s("./src/context/context-processor.ts"),a=s("./src/annotation/processor.ts"),n=s("./src/utils/asset-loader.ts"),o=s("./src/store/state/state-manager.ts"),i=s("./src/container/container-utils.ts"),c=s("./src/router/route-parser.ts"),l=s("./src/utils/utils.ts"),u=s("./src/validation/validation-api.ts"),d=s("./src/validation/validator.ts"),p=s("./src/locale/locale-utils.ts"),f=s("./src/utils/form-handler.ts"),h=s("./src/router/routing-manager.ts"),g=s("./src/constants.ts"),m=s("./src/actions/api.ts"),E=s("./src/container/container-manager.ts"),A=s("./src/services/index.ts"),_=s("./src/messages/index.ts"),I=s("./src/actions/manager.ts"),y=s("./src/rules/rules-store.ts"),C=s("./src/store/state/actions/action-creators.ts"),S=s("./src/case/case-info.ts"),b=s("./src/refresh/refreshHelpers.ts"),T=s("./src/utils/case-utils.ts"),N=s("./src/page-instructions/index.ts"),v=s("./src/case/apis.ts"),R=s("./src/annotation/utils.ts"),O=s("./src/fields/field-default.ts"),D=s("./src/store/state/utils.ts"),x=s("./src/store/state/middlewares/property-change-middleware.ts"),P=s("./src/contextree/treemanager.ts"),M=s("./src/environment-info/index.ts"),w=s("./src/interpreter/iterator/children.ts"),j=s("./src/interpreter/utils.ts");let L;const U=(e,t,s)=>{e&&(Object.keys(e).forEach((r=>{if("children"!==r){const n=e[r],o=a.default.trimAnnotation(n);if("string"!=typeof o&&"string"!=typeof n||!(l.default.isValidAnnotation(n)&&l.default.isPropertyRef(o)||n.startsWith("@W ")||n.startsWith("@E ")||n.startsWith("@ATTACHMENT "))){if(Array.isArray(o))o.forEach(((e,s)=>{const a={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||[],t[r][s]=Object.create({}),U(e,t[r][s],a)}));else if(o&&"object"==typeof o&&"exp"!==o.type){const e={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||{},U(o,t[r],e)}}else s&&s.parentKey&&(s.isObjHasValue=!0),t[r]=o}})),s&&!s.isObjHasValue&&delete s.parentStateObj[s.parentKey])},F=(e,t)=>{e._inheritedProps=e._inheritedProps||[],e.inheritedProps=[...e._inheritedProps,...l.default.deepClone(t.inheritedProps)]};class k{constructor(e){const{meta:t,isRoot:s,options:n={},useCustomContext:o}=e;this.meta=t,this._isRoot=s,this.options=n,this.useCustomContext=o,this._rawConfig=t?.config,this._isExpressionExist=!1,this._isWhenExist=!1,this._isValidatorExist=!1,this._pageReference="",this._referenceContext="",this._contextName="",this._stateProps={},this._actions={},this._children="",this._additionalRegisteredProps={},this._caseInfo=null,this.viewName=n.viewName,this.parentViewName=n.viewName??"",this._referenceList=n.referenceList||"",this._isInsideList=n.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=n.localeReference,this._containerTarget=n.target,this.xrayInfo={},this._readOnly=t?.config?.readOnly||n.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,this.index=e.index,this.categoryName=n.categoryName||"",n.inheritedConfig&&(this._inheritedConfig=l.default.deepClone(n.inheritedConfig)),t?.config?.inheritedProps&&F(this._inheritedConfig,t?.config),U(this._rawConfig,this._stateProps),this._isState=!l.default.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=l.default.isExpressionExist(this._rawConfig.config),this._isWhenExist=l.default.isWhenExist(this._rawConfig.config),this._isValidatorExist=d.default.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=g.publicConstants.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context,this._type=this.meta?.type;let i=this.options.pageReference;if(this.options.pageReference&&(i=a.default.handleAnnotation(this.options.pageReference,this)),this._pageReference=r.default.getContextPath(i||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),"reference"===this._type&&(this._rawConfig=t),"reference"===this._type&&l.default.isWhenExist({visibility:this.meta?.config?.visibility})&&(0,b.recordViewForRefresh)(this.viewName,this._contextName,this._pageReference),"reference"!==this._type&&t&&(this._rawConfig=r.default.resolveReference(t,this)),this._rawConfig){const e=this.getRawConfigProps();e&&(this._localeRuleName=a.default.trimAnnotation(e.localeReference)||n.localeReference,this._isExpressionExist=l.default.isExpressionExist(e),this._isWhenExist=l.default.isWhenExist(e),this._isValidatorExist=d.default.isValidatorExist(e)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===g.default.VIEW&&this._rawConfig.name&&(this.viewName=a.default.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&(0,b.inspectComponentForRefreshTargets)(this)}}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||""===this._pageReference){const t=a.default.trimAnnotation(this.getPropertyName());e=this.getFieldMetadata(t)?.isDeclarativeTarget||!1}return e}_getPropertyName(){const e=a.default.trimAnnotation(this.getPropertyName());return""===this._pageReference&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){const e=this._getPropertyName(),{value:t,label:s,required:r,readOnly:n,disabled:o,visibility:i,validationType:c,caption:l,allowMultiple:u}=this.getRawConfigProps();if(this.getValue(this._pageReference)||""===this._pageReference){const d="Address"===this._type&&this._rawConfig?.config?.associatedView?a.default.trimAnnotation(this._rawConfig.config.associatedView):"",p=s||l,f={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:a.default.trimAnnotation(t),label:p?.startsWith("@")?a.default.handleAnnotation(p,this,void 0):p,required:r,readOnly:n,disabled:o,visibility:i||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:t,validationType:c,componentName:this._rawConfig?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),index:this.index,allowMultiple:u,isDeclarativeTarget:this.isDeclarativeTarget()};P.default.addFieldNode(this._contextName,this._pageReference,(d||this.categoryName||this.viewName)??"",e,this.getValue(e),f)}}removeNode(){if(!this.isVisible())if(Object.hasOwn(this._rawConfig?.config??{},"value"))P.default.removeFieldNode(this._contextName,this._pageReference,this.viewName||"",a.default.trimAnnotation(this.getPropertyName()),this.index);else{const e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference;P.default.removeViewNode(this._contextName,e,this._rawConfig?.config?.name||this._rawConfig?.config?.id||"",this.index)}}addViewNode(){this._rawConfig?.type?.toLowerCase()===g.default.VIEW&&this._rawConfig.name&&this.viewName&&P.default.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName),"Group"===this._rawConfig?.type&&this._rawConfig?.config?.id&&P.default.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.id,this.parentViewName),"Address"===this._rawConfig?.type&&this._rawConfig?.config?.associatedView&&P.default.addViewNode(this._contextName,this._pageReference,a.default.trimAnnotation(this._rawConfig.config.associatedView),this.parentViewName),"deferload"===this._rawConfig?.type?.toLowerCase()&&this._rawConfig.config?.name&&P.default.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.parentViewName)}addWhenNode(){let e="",t="";const s=l.default.getWhenNames(this._rawConfig?.config),r=this.getRawConfigProps();if(r?.type&&r?.type?.toLowerCase()===g.default.VIEW)t=g.default.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{t=g.default.CONTEXT_TREE_NODE_TYPES.FIELD;const s=this.getPropertyName();e=a.default.isProperty(s)?a.default.trimAnnotation(s):""}e&&s.forEach((s=>{P.default.addWhenNode(this.getContextName(),this.getPageReference(),t,e,s,{pageReference:this.getPageReference(),context:this.getContextName()})}))}updateContextTree(){if(this.isVisible()&&(this.addViewNode(),this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&"DISPLAY_ONLY"!==this._inheritedConfig.displayMode&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode&&this.addFieldNode(),(this._rawConfig?.type?.toLowerCase()!==g.default.VIEW||"Editable"===this._rawConfig.config?.renderMode)&&this._rawConfig?.config?.referenceList)){const{value:e,label:t,required:s,readOnly:r,disabled:n,visibility:o,validationType:i,selectionMode:c,selectionList:l,selectionKey:u,referenceList:d,renderMode:p,caption:f}=this.getRawConfigProps(),h=t||f;P.default.addPageListNode(this._contextName,this._pageReference,this.viewName??"",a.default.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:a.default.trimAnnotation(this.getPropertyName()),label:h?.startsWith("@")?a.default.handleAnnotation(h,this,void 0):h,required:s,readOnly:r,disabled:n,visibility:o||this.options.visibility,skipRequiredValidation:this.options.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:e,validationType:i,componentName:this._rawConfig.type,type:this._rawConfig.config?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),selectionMode:c,selectionList:l,renderMode:p,referenceList:d,selectionKey:u,index:this.index});const g=this.getValue(a.default.trimAnnotation(this.getPropertyName()),this._pageReference)||[];P.default.updatePageListNode(this._contextName,this._pageReference,a.default.trimAnnotation(this.getPropertyName()),g.length)}this.isWhenExist()&&this.addWhenNode(),this.removeNode()}setXRayInfo(e){l.default.mergeDeep(e,this.xrayInfo)}getXRayInfo(){return this.xrayInfo}getStateProps(){return this._stateProps}setStateProps(e){l.default.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getCaseInfo(){return this._caseInfo||(this._caseInfo=new S.default(this)),this._caseInfo}getCaseLocaleReference(){const e=this.getCaseInfo(),t=e.getClassName();return p.localeUtils.getCaseLocaleReference(t,e.getCaseTypeName())}getListActions(){return(0,N.listActions)(this)}getReferenceList(){return this._referenceList}isInsideList(){return this._isInsideList||/\[\d+\]/g.test(this.getPageReference())}getRawMetadata(){return this.getMetadata()}setReferenceList(e){this._referenceList=e}getComponentConfig(){return this.getMetadata()?.config||{}}isExpressionExist(){return this._isExpressionExist}isWhenExist(){return this._isWhenExist}isConditionExist(){return this.isExpressionExist()||this.isWhenExist()}isBoundToState(){return this._isState}getPageReference(){return this._pageReference}getPropertyName(){const e=this.getComponentConfig();let t;return t="multi"===e.selectionMode?"selectionList":"single"===e.selectionMode&&e.selectionKey?"selectionKey":"Editable"===e.renderMode&&"Attachment"!==e.formatter?"referenceList":"Address"===this._type?"addressProp":"value",this.getComponentConfig()[t]}getFullReference(){const e=this.getPageReference(),t=this.getPropertyName();return r.default.getContextPath(e,t)}getContextName(){return this._contextName}getContainerName(){const{type:e}=this.getMetadata()||{},t=[g.default.CONTAINERS.ROOT_CONTAINER,g.default.CONTAINERS.VIEW_CONTAINER,g.default.CONTAINERS.FLOW_CONTAINER,g.default.CONTAINERS.MODAL_VIEW_CONTAINER,g.default.CONTAINERS.PREVIEW_VIEW_CONTAINER,g.default.CONTAINERS.HYBRID_VIEW_CONTAINER],{acTargetName:s=i.CONTAINER_NAMES.PRIMARY,name:r,routingInfo:a}=this.getComponentConfig();return(e&&t.includes(e)||"@ROUTING_INFO"===a)&&r?r:this.options.containerName||s}getTarget(){return this._containerTarget}getCurrentView(){return this.viewName}populateSuggestionProps(e){if(this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&this.getStateProps()?.value&&this.options.hasForm){const t=o?.getStore()?.getState()?.data[`${this.getContextName()}/${g.default.SUGGESTION}`],s=this.getStateProps()?.value,a=r.default.getContextPath(this.getPageReference(),s),n=t?D.default.getSuggestionsContext(this.getContextName()).getField(a):void 0;this._hasSuggestions=!!n,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){const t={...O.default.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig&&this._rawConfig.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(t),this.resolveConfigProps(t,e),l.default.resolveStringBooleans(e)}getRawConfigProps(){const e={...O.default.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(e),e}resolveConfigProps(e,t={}){return e&&(r.default.resolveProps(e,t,this),a.default.handleComponentMapping(t,{type:this.getComponentName(),config:e},this)),t}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),U(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach((e=>{delete this._additionalRegisteredProps[e]})),!0}populateAdditionalProps(e){const t=this.getComponentName(),s=this.getComponentConfig(),r=t===g.default.ROOT_CONTAINER&&"portal"!==e.renderingMode;if(t===g.default.MODAL_VIEW_CONTAINER||t===g.default.CASE_CREATE_STAGE){const t=i.getActiveContainerItemName(`${g.default.APP.APP}/${this.getContainerName()}`),s=_.getMessages({context:t,category:g.publicConstants.PAGE});e.pageMessages=s,this._stateProps.pageMessages=e.pageMessages}if(this.isEditable()){let{value:t}=this.getStateProps();void 0===t&&"multi"===this.getComponentConfig()?.selectionMode?t=this.getStateProps().selectionList||a.default.trimAnnotation(this.getRawConfigProps().selectionList):!t&&"Editable"===this.getComponentConfig()?.renderMode&&this.getStateProps().referenceList&&(t=this.getStateProps().referenceList);const s=_.getMessages({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:g.publicConstants.MESSAGES.MESSAGES_TYPE_ERROR}),r=_.getMessages({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:g.publicConstants.MESSAGES.MESSAGES_TYPE_INFO});if(s&&s[0]){const t=s.map((e=>p.localeUtils.getLocaleValue(e.message,"Messages")));e.validatemessage=t.join(". "),e.status=g.default.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status}r&&r[0]&&(e.infoMessage=r[0].message,e.status=g.default.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(t===g.default.ROOT_CONTAINER){const t=_.getRootContainerHttpMessages(r,i.getActiveContainerItemName(`${g.default.APP.APP}/${this.getContainerName()}`));e.httpMessages=t,this._stateProps.httpMessages=e.httpMessages;const s=D.default.getSharedState("isLoggedOut");e.isLoggedOut=s,this._stateProps.isLoggedOut=s;const a=_.getMessages({context:g.default.APP.ROOT,category:"PAGE"});e.pageMessages=a,this._stateProps.pageMessages=e.pageMessages}if(t===g.default.HYBRID_VIEW_CONTAINER){const t=_.getMessages({context:g.default.APP.APP,category:g.default.HTTP});e.httpMessages=t,this._stateProps.httpMessages=t}if(t===g.default.APP_SHELL&&e.portalDocMode===g.default.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=v.default.getOpenedCaseItems(`${g.publicConstants.APP.APP}/${g.default.PRIMARY}`),this._stateProps.activeCases=e.activeCases),t===g.default.APP_SHELL){const t=_.getMessages({context:g.default.APP.APP,category:"PAGE"});e.pageMessages=t,this._stateProps.pageMessages=e.pageMessages}if(e.value&&t===g.default.SCALARLIST&&(this._stateProps.value=e.value),t===g.default.APP_SHELL||t===g.default.MODAL_VIEW_CONTAINER||t===g.default.CASE_CREATE_STAGE||s.template===g.default.CASE_PREVIEW){let t=_.getMessages({context:g.default.APP.APP,category:"HTTP"});const s=_.getMessages({context:i.getActiveContainerItemName(`${g.default.APP.APP}/${this.getContainerName()}`),category:"HTTP"});t?s&&(t=t.concat(_.getMessages({context:i.getActiveContainerItemName(`${g.default.APP.APP}/${this.getContainerName()}`),category:"HTTP"}))):t=_.getMessages({context:i.getActiveContainerItemName(`${g.default.APP.APP}/${this.getContainerName()}`),category:"HTTP"}),e.httpMessages=t?t.map((e=>e.message)):t,this._stateProps.httpMessages=e.httpMessages,t?.forEach((t=>{t.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...t.errorDetails):t.errorDetails,this._stateProps.errorDetails=e.errorDetails),t.correlationID&&(e.correlationID=t.correlationID)}))}if(t===g.default.VIEW_CONTAINER||t===g.default.FLOW_CONTAINER||t===g.default.MODAL_VIEW_CONTAINER||t===g.default.PREVIEW_VIEW_CONTAINER||t===g.default.ROOT_CONTAINER){if(e.routingInfo=h.getRoutingInfo(this.getContainerName(),this._contextName),t===g.default.ROOT_CONTAINER&&(e.rootConfig=j.C11nEnvUtils.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,t===g.default.FLOW_CONTAINER){const t=_.getMessages({context:this.getContextName(),category:g.default.CASEMESSAGES}),s=this.getContextName();e.caseMessages=t,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;const r=i.getChildContainers(s)[0];if(r){const t=i.getActiveContainerItemName(r),s=o?.getStore()?.getState()?.data;s&&t&&(e.lastUpdateTime=s[t]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=s[t]?.caseInfo?.lastUpdateTime);const a=_.getMessages({context:t,category:g.publicConstants.PAGE}),n=_.getMessages({context:t,category:"HTTP"});e.httpMessages=n,e.pageMessages=a,this._stateProps.pageMessages=e.pageMessages,this._stateProps.httpMessages=e.httpMessages,n?.forEach((t=>{t.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...t.errorDetails):t.errorDetails,this._stateProps.errorDetails=e.errorDetails),t.correlationID&&(e.correlationID=t.correlationID)}))}}if(e.loadingInfo=this.getLoadingStatus(this.getContextName()),e.assignmentNames=this.getCaseInfo().getAssignments()?.map((e=>e.name)),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map((e=>e.name)),t===g.default.MODAL_VIEW_CONTAINER){const t=e.routingInfo?.accessedOrder||[],s=t[t.length-1];s&&(e.loadingInfo=this.getLoadingStatus(s))}this._stateProps.loadingInfo=e.loadingInfo,this._stateProps.assignmentNames=e.assignmentNames,this._stateProps.childAssignmentNames=e.childAssignmentNames}else s.template===g.default.CASE_VIEW||s.template===g.default.CASE_PREVIEW||s.template===g.default.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):t===g.default.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);this.populateFieldMetadata(e),this.updateContextTree()}isReadOnlyField(e,t){const s=R.default.isPropertyInternal(t),r=e.datasource,a=this.getComponentConfig().isSearchField,{isClassKey:n,isSpecial:o,isDeclarativeTarget:i}=e.fieldMetadata,c=e.listType!==g.default.ASSOCIATED;return!a&&(i||s||!r&&(n||o)&&c)}populateFieldMetadata(e){const{value:t,datasource:s,listType:r}=this.getComponentConfig();let n="",o="";if(r===g.default.ASSOCIATED?(n=s,o=g.default.ASSOCIATED_PROPERTY_ANNOTATION):(n=t,o=g.default.PROPERTY_ANNOTATION),n&&"string"==typeof n&&(n.includes(o)||n.includes(g.default.ATTACHMENT_ANNOTATION))){const t=a.default.getPropertyName(n),s=this.getFieldMetadata(t);s&&(e.fieldMetadata=s,this.isReadOnlyField(e,t)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})))}}resolvePropertyMetadata(e,t){if(!e)return e;const s=(0,y.getAdditionalInfo)(`${this._pageReference}.${t}`,this._contextName);return(s||null===s)&&(e.additionalInformation=s),e}getFieldMetadata(e){if(!e)return null;const t=e.split(".");if(t.length<2){let t=this.getValue(g.default.CLASS_ID);return!t&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(t=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata((0,y.getPropertyMetadata)(e,t),e)}return this.resolvePropertyMetadata((0,y.getPropertyMetadata)(t.pop(),this.getValue(`.${t.join(".")}${g.default.CLASS_ID}`)),e)}getCurrentPageFieldMetadata(e=null){let t=this.getPageReference().split(".");null!==e&&(t=e.split("."));const s=t.pop();return this.resolvePropertyMetadata((0,y.getPropertyMetadata)(s,this.getValue(`${t.join(".")}${g.default.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(g.default.CLASS_ID)}getCaseSummary(){const e={...this.getDataObject()[g.publicConstants.CASE_INFO.CASE_INFO]};return e.CaseID=e.CaseID||this.getValue(g.publicConstants.CASE_INFO.CASE_INFO_PZINSKEY),{...e,isCaseWideAction:()=>T.isCaseWideAction(this.getContextName(),this.getPageReference())}}getReferencedUser(e){const t=this.getValue("referencedUsers");if(Array.isArray(t)){const s=t.find((t=>t.UserID===e));if(s)return{userId:s.UserID,UserName:s.UserName}}return t&&t[e]?t[e]:null}getCaseStages(){return this.getDataObject()[g.publicConstants.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[g.publicConstants.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}resolveContextProps(e){const{value:t}=this.getStateProps();t&&(e.error=this.getContextDataValue(`${this.getPageReference()+t}.error`),e.validatemessage=this.getContextDataValue(`${this.getPageReference()+t}.validatemessage`))}isValidatorExist(){return!!this._isValidatorExist}getValidationApi(){return new u.default(this)}isEditable(){return this._rawConfig&&this._rawConfig.config&&!(this._inheritedConfig&&this._inheritedConfig.readOnly)&&(Object.hasOwn(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||"Editable"===this._rawConfig.config.renderMode&&this._rawConfig.config.referenceList)&&!("string"==typeof this._rawConfig.config?.value&&this._rawConfig.config.value.includes("@FILTERED_LIST"))&&!(Object.hasOwn(this._rawConfig.config,"readOnly")&&("true"===this._rawConfig.config.readOnly||!0===this._rawConfig.config.readOnly))&&!(Object.hasOwn(this._rawConfig.config,"disabled")&&!0===this._rawConfig.config.disabled)}isVisible(){return this._rawConfig?.config&&Object.hasOwn(this._rawConfig?.config,"visibility")&&"string"==typeof this._rawConfig?.config?.visibility?a.default.handleAnnotation(this._rawConfig?.config?.visibility,this):"string"!=typeof this.options?.visibility||a.default.handleAnnotation(this.options?.visibility,this)}isReadOnly(){return void 0!==this._readOnly&&("true"===this._readOnly||!0===this._readOnly||a.default.handleAnnotation(this._readOnly,this))}hasChildren(){return!!this._children}getComputedVisibility(){const e="reference"===this._type&&this.getReferencedView()?this.getReferencedViewPConnect().getPConnect():this;if(!1===this.getConfigProps().visibility)return!1;if(!1===this.getConfigProps().requiresVisibleChildren)return!0;const t=e.getConfigProps(),s={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]};let r=e._type&&s.includeTypes.includes(e._type)&&!s.excludeTemplates.includes(t.template);if(!!t.highlightedData&&t.highlightedData.length&&t.showHighlightedData&&(r=!1),!r)return!0;const a=e.getChildren();return!!a&&a.some((e=>e.getPConnect().getComputedVisibility()))}getChildrenIterator(){return this._children.setContext(this.getPageReference()),this._children}setAction(e,t){this._actions[e]=t}getComponentName(){return this._rawConfig&&this._rawConfig.type}isComponentRefreshable(){return!(!this._rawConfig||!this._rawConfig.isRefreshable)}getDataObject(e){return o.getDataObject(e||this.getContextName())}getImagePath(e){return`${n.default.getConstellationServiceUrl()}/v860/${n.default.getAppAlias()}/image/${e}?org=${c.default.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){const e=(0,w.default)(this._rawConfig,{pageReference:this._pageReference,context:this._contextName,localeReference:this._localeRuleName,hasForm:this.options.hasForm,isBulkAction:this.options.isBulkAction,containerName:this.getContainerName(),containerItemName:this.options.containerItemName,viewName:this.viewName,inheritedConfig:this._inheritedConfig,target:this._containerTarget,readOnly:this._readOnly,categoryName:"Group"===this._type?this._rawConfig?.config?.id:null}),t=[];for(;e?.hasNext();){const s=e.next();if(this.isBulkAction()){const e=s.getPConnect().getComponentName(),{template:t}=s.getPConnect().getConfigProps();if(!e||!0!==j.C11nEnvUtils.allowedComponetsForBulkProcessing[e]&&!0!==j.C11nEnvUtils.allowedComponetsForBulkProcessing[e]?.[t])continue}t.push(s)}return e?.resetIndex(),t}return[]}setInheritedProp(e,t){this._inheritedConfig[e]=t}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,t,s){const r=s||this.getLocaleRuleName(),a=this?.getMetadata();let n=null;const o=M.default.getLocale();if(a){const t=a?.type,s=["View","Region"],r=a?.config?.label??a?.config?.caption;if("en-US"!==o&&r?.startsWith(g.default.FIELD_LABEL_ANNOTATION)){const t=r.split(`${g.default.FIELD_LABEL_ANNOTATION} `).pop()?.split("."),s=t?.pop();let a=`${s}`;const o=this.getFieldMetadata(a),i=o?.classID||this.getValue(`.${t?.join(".")}${g.default.CLASS_ID}`),c=o?.definedOnClassID;return a=`${c||i}.${a}`,p.localeUtils.getLocaleValue(e,a,p.localeUtils.FIELD_LABELS_BUNDLE_KEY,n)}t&&!s.includes(t)&&(n=t)}return p.localeUtils.getLocaleValue(e,t,r,n)}getLocalizedParagraphValue(e){const t=this.getLocaleRuleNameFromKeys(this.getCurrentClassID(),g.default.PARAGRAPH,e);return p.localeUtils.getParagraphLocaleValue(t,this.getCurrentClassID(),e)}getLocaleRuleNameFromKeys(e,t,s){return`${e}!${t}!${s}`}getValue(e,t){return this.useCustomContext?(e=e.startsWith?.(".")?e.substring(1):e).split?.(".").reduce(((e,t)=>e?.[t]??void 0),this.useCustomContext):this._hasSuggestions&&this.getStateProps()?.value===e?r.default.getPropertyValue(e,this.getPageReference(),`${this._contextName}/${g.default.SUGGESTION}`):r.default.getPropertyValue(e,t||this.getPageReference(),this._contextName)}setInheritedConfig(e){if(!e)return;const{readOnly:t,displayMode:s,referenceType:r,hideLabel:a}=e;a&&(this._inheritedConfig.hideLabel=a),r&&(this._inheritedConfig.referenceType=r),s&&(this._inheritedConfig.displayMode=s),(this._inheritedConfig.readOnly||t)&&(this._inheritedConfig.readOnly=t),e.inheritedProps&&(e.inheritedProps?.forEach((e=>{"required"===e.prop&&(this._inheritedConfig[e.prop]=e.value)})),F(this._inheritedConfig,e))}getInheritedProps(){const e={},t={};return this._inheritedConfig.inheritedProps?.forEach((e=>{t[e.prop]=e.value})),r.default.resolveProps(t,e,this),e}setValue(e,t,s,r=!1,a={}){let n,i;const{isArrayDeepMerge:c}=a;this.isInsideList()&&this.getListActions().updateProperty(e,t),this.isBulkAction()&&(n=!0,t||(i=!0)),o.dispatch({type:"SET_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,initialValue:s,isImplicit:r,context:this.getContextName(),...void 0!==c&&{isArrayDeepMerge:c},...n&&{isStrictTracking:n},...i&&{removePropertyFromChangedList:i}}})}updateDirtyCheckChangeList(e,t){const s={reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName()};(0,x.updateChangeList)(s)}getContextDataValue(e,t){return o.getContextValue(t||this.getPageReference(),e,this._contextName)}updateState(e){const t=this._pageReference.indexOf(g.default.CASE_INFO.CASE_INFO_CONTENT),s=this._pageReference.indexOf(".");let r=g.default.CASE_INFO.CASE_INFO_CONTENT;0!==t&&(r=s>0?this._pageReference.substring(s):this._pageReference),o.dispatch((0,C.mergeData)({context:this._contextName,data:e,rootPageReference:r}))}replaceState(e,t,s={}){const{skipDirtyValidation:r=!1}=s;o.dispatch({type:"REPLACE_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName(),skipDirtyValidation:r}})}reportError(e,t,s){o.dispatch((0,C.error)(e,t||{},s))}getComponent(){return L({getPConnect:()=>this})}createComponent(e,t,s,n){let i=this._pageReference;if(t){const e=o.lookupContextValue(`${this.getPageReference()}.${g.default.SUMMARY_OF_LISTS}`,t,this._contextName);i=r.default.getContextPath(e||t,s)||t}else if(n&&n.pageReference){let e=n.pageReference;e=a.default.handleAnnotation(e,this),i=r.default.getContextPath(this._pageReference,e)||""}return L(V({meta:e,index:this.index,options:{containerName:this.getContainerName(),hasForm:this.options.hasForm,...e.options,pageReference:i,context:this._contextName,target:this._containerTarget,readOnly:this._readOnly||this._inheritedConfig?.readOnly,viewName:this.viewName}}),n)}getReferencedView(){if(this.meta)return r.default.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)||e.startsWith(g.default.CLASS_ANNOTATION)?this.getPageReference():`${this.getPageReference()}${e}`}getReferencedViewPConnect(e=!1){const t={...this.getComponentConfig()};return delete t?.name,delete t?.type,V({meta:this.getReferencedView(),options:{...e?this.options:void 0,...t,context:this.getContextName(),pageReference:t.context?this._resolvePageRef(t.context):this.getPageReference(),viewName:this.viewName}})}getContainerManager(){return new E.default(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new m.default(this)),this._actionsApi}getActionManager(){return I.ActionManagerInstance}getGoogleMapsAPIKey(){return A.default.getGoogleMapsAPIKey()}getServerURL(){return A.default.getServerURL()}getLoadingStatus(e){let t=null;return e?(t=o.getDataObject(e),t=t?t.context_data:null):t=this.getDataObject().context_data,!!t&&!!t.isLoading&&t.isLoading}clearErrorMessages(e){e?.property?_.clearMessages({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName()}):e?.context?_.clearMessages({type:"error",...e}):(_.clearMessages({type:"error",...e,context:g.default.APP.APP}),_.clearMessages({type:"error",...e,context:i.getActiveContainerItemName(`${g.default.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return o.lookupContextValue(`${this.getPageReference()}.${g.default.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,t,s){delete e?.classID,this.setValue(t,e,void 0,void 0,{isArrayDeepMerge:!1}),(0,f.addPageFieldToForm)(this.getContextName(),`${this.getPageReference()}${t}`,this),s&&(0,N.generatePageInstructionsForNestedPayload)(e,t,this)}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=D.default.getSuggestionsContext(this.getContextName()),s=this.getStateProps()?.value||e,a=r.default.getContextPath(this.getPageReference(),s),n=t.getField(a);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(s,n),this.getActionsApi().triggerFieldChange(s,n),t.removeField(a)}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=this.getStateProps()?.value||e,s=r.default.getContextPath(this.getPageReference(),t);this._hasSuggestions=!1,D.default.getSuggestionsContext(this.getContextName()).removeField(s)}}}function V(e){const t=new k(e);return{getPConnect:()=>t}}function G(e){L=e}const $={createC11nEnv:V,registerComponentCreator:G}},"./src/interpreter/iterator/children.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/constants.ts"),a=s("./src/store/state/state-manager.ts"),n=s("./src/interpreter/c11n-env.ts"),o=s("./src/interpreter/iterator/repeat-data.ts");class i{constructor(e,t){this.children=e,this.index=0,this.options=t}hasNext(){return this.index<this.children.length}next(){if(!this.hasNext())throw new Error("No Children");const e=this.children[this.index];return this.index+=1,(0,n.createC11nEnv)({meta:e,index:this.index,options:this.options})}resetIndex(){this.index=0}}const c=(e,t)=>{const s=!!e?.repeat;if(e?.["repeat-self"])return new o.default(e,e.context||"",t);if(s){const s=(0,a.lookupContextValue)(`${t.context}.${r.default.SUMMARY_OF_LISTS}`,e.pageReference,t.context);return new o.default(e.children[0],s||e.context,t)}return e?.children?new i(e.children,t):void 0}},"./src/interpreter/iterator/repeat-data.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./src/context/context-processor.ts"),a=s("./src/interpreter/c11n-env.ts");const n=class{constructor(e,t,s){this.meta=e,this.datasource=t,this.index=0,this.options=s,this.datasourceObj=r.default.getPropertyValue(t,s.pageReference,s.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");const e=r.default.getContextPath(this.datasource,this.index);return this.index+=1,(0,a.createC11nEnv)({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}}},"./src/interpreter/utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{C11nEnvUtils:()=>a,c11EnvUtils:()=>n});var r=s("./src/annotation/utils.ts");class a{static allowedComponetsForBulkProcessing={Currency:!0,TextInput:!0,Phone:!0,Percentage:!0,Email:!0,Integer:!0,Decimal:!0,URL:!0,SemanticLink:!0,Checkbox:!0,RadioButtons:!0,DateTime:!0,Date:!0,Time:!0,Text:!0,TextArea:!0,RichText:!0,Dropdown:!0,Search:!0,Location:!0,Attachment:!0,AutoComplete:!0,MultiSelect:!0,UserReference:!0,Region:!0,TextContent:!0,View:{Forms:!0,DefaultForm:!0,OneColumn:!0,TwoColumn:!0,ThreeColumn:!0}};static getItemView(e,t){const s=[];if(e&&["portal","view"].includes(t)){const{accessedOrder:t,items:r}=e;if(t&&r){const e=t[t.length-1];r[e]&&r[e].view&&Object.keys(r[e].view).length>0&&s.push(r[e])}}return s}static getDependentProperties=e=>{let t=[];return e._rawConfig?.config?.parameters?t=Object.values(e._rawConfig?.config?.parameters||{}):e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters&&(t=(e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters||[]).map((e=>e?.value))),t.filter((e=>r.default.isProperty(e))).map((e=>r.default.getPropertyName(e)))}}const n=new a;Object.freeze(n)},"./src/locale/locale-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{LocaleUtils:()=>i,localeUtils:()=>c});var r=s("./src/environment-info/index.ts"),a=s("./src/utils/asset-loader.ts"),n=s("./src/utils/utils.ts"),o=s("./src/locale/parse-utils.ts");class i{GENERIC_BUNDLE_KEY="@BASECLASS!GENERIC!PYGENERICFIELDS";FIELD_LABELS_BUNDLE_KEY="@BASECLASS!LABEL!PYFIELDLABELS";GENERIC_BUNDLE_KEY_LP="GENERIC!GENERICFIELDS";MESSAGE_BUNDLE_KEY="@BASECLASS!MESSAGE!PYMESSAGES";BASE_CLASS="@BASECLASS";DATA_PAGE_LOCALECONTEXT="datapage";constructor(){this.localeStore={},this.getLocaleValue=this.getLocaleValue.bind(this)}setLocaleForRule=(e,t)=>{const s=e.LocaleContent||e;this.localeStore[t]=s};getLocaleForRule(e=this.#l()){return this.localeStore[e]}resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,t,s,r){s||(s=this.#l());let a=!1;e&&"string"==typeof e&&(a=e.includes("@P ")),a&&(e=o.default.formatLocaleKey(e));const n=this.#u(e,s,t,r);return a?o.default.replaceWithValue(n[e]||e):n[e]||e}#u(e,t,s,r){t!==this.FIELD_LABELS_BUNDLE_KEY&&(s=s?`${s}.fields`:"fields");let a=this.localeStore[t.toUpperCase()],o=a?n.default.getIn(a,s,{}):{};return!o[e]&&r&&(a=this.localeStore[this.#l().toUpperCase()],o=a?n.default.getIn(a,`${r}.${s}`,{}):{}),o}#l(){return 2===r.default.getFeatureMap().localizationVersion?this.GENERIC_BUNDLE_KEY_LP:this.GENERIC_BUNDLE_KEY}getParagraphLocaleValue(e,t,s){const r=this.localeStore[e.toUpperCase()];return r?decodeURIComponent(atob(r.content).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")):PCore.getMetadataUtils().getParagraph(s,t)}getPortalLocaleReference(e){return e?`PORTAL!${e}`.toUpperCase():`PORTAL!${r.default.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e,t){return e?2===this.getLocalizationVersion()?`CASE!${e}`.toUpperCase():t?`${e}!CASE!${t}`.toUpperCase():null:null}getLocalizationVersion(){return r.default.getFeatureMap().localizationVersion||1}async getLocaleJsons(e){if(!this.isCurrentLocalePackAvailable())return[];const t=r.default.getUseLocale(),s=[],n=PCore.getLocaleUtils().localeStore;if((e=(e=e.filter((e=>!n[e]))).map((e=>e.toUpperCase()))).length>0){const r=e.map((e=>({localeRuleKey:e,promise:a.default.getSvcLocale(t,`${e}.json`)}))),n=await Promise.allSettled(r.map((e=>e.promise)));await Promise.all(n.map((async(e,t)=>{if("fulfilled"===e.status){const a=r[t];let n;try{n=await e.value.json()}catch{n=null}n&&s.push({localeRuleKey:a.localeRuleKey,jsonData:n})}})))}return s}async loadLocaleResources(e){const t=r.default.getUseLocale(),s=r.default.getBaseLocale(),a=t!==s||"en-US"!==s;if(r.default&&t&&a&&e?.length>0)try{(await this.getLocaleJsons(e)).forEach((e=>{this.setLocaleForRule(e.jsonData,e.localeRuleKey)}))}catch(e){console.warn(e)}}setTimezone(e){this.timezone=e}getTimeZoneInUse(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}isCurrentLocalePackAvailable(){const e=r.default.getLocale();return e&&r.default.getAvailableLocalePacks()?.includes(e)}}const c=new i},"./src/locale/parse-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=class{static regex=/\{@P[^}]*\s*:\s*[^}]*\}/g;static subRegex=/:'[a-zA-Z0-9!@#$&()\\-`.+,/\s"]*'/;static keyMap={};static formatLocaleKey(e){let t=0,s="";for(;t<=e.length;){const r=e.indexOf("{@P ",t);if(-1===r){s+=e.substring(t,e.length);break}s+=e.substring(t,r);const a=e.indexOf("}",t),n=e.substring(r,a+1),[o,i]=this.getKeyAndValue(n);this.addKeyToMap(o,i),s+=`${n.split(":")[0]}}`,t=a+1}return s}static getKeyAndValue(e){const t=e.indexOf(":"),s=e.indexOf("}");return[`${e.substring(0,t)}}`,e.substring(t+1,s)]}static addKeyToMap(e,t){this.keyMap[e]=t}static replaceWithValue(e){let t=0,s="";for(;t<=e.length;){const r=e.indexOf("{@P ",t);if(-1===r){s+=e.substring(t,e.length);break}s+=e.substring(t,r);const a=e.indexOf("}",t),n=e.substring(r,a+1);s+=this.keyMap[n],t=a+1}return s}}},"./src/mashup/apis.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./src/case/apis.ts"),a=s("./src/store/state/actions/index.ts"),n=s("./src/actions/manager.ts"),o=s("./src/store/state/state-manager.ts"),i=s("./src/constants.ts"),c=s("./src/environment-info/index.ts"),l=s("./src/interpreter/c11n-env.ts");const u=class{static openCase(e,t=i.publicConstants.APP.APP,s={}){return s.renderInline=!0,s.pageName?c.default.setDefaultCasePage(s.pageName):(c.default.setDefaultCasePage(i.default.PY_DETAILS),s.pageName=i.default.PY_DETAILS),s?.disableAssignmentHeader?c.default.disableAssignmentHeader(s.disableAssignmentHeader):c.default.disableAssignmentHeader(!1),r.default.openCase(e,t,i.default.PRIMARY,s)}static createCase(e,t=i.publicConstants.APP.APP,s={}){return s.renderInline=!0,s.pageName?c.default.setDefaultCasePage(s.pageName):(c.default.setDefaultCasePage(i.default.PY_DETAILS),s.pageName=i.default.PY_DETAILS),s?.disableAssignmentHeader?c.default.disableAssignmentHeader(s.disableAssignmentHeader):c.default.disableAssignmentHeader(!1),r.default.createCase(e,t,i.default.PRIMARY,s)}static getNextWork(e=i.publicConstants.APP.APP,t={}){return t.renderInline=!0,t.pageName?c.default.setDefaultCasePage(t.pageName):(c.default.setDefaultCasePage(i.default.PY_DETAILS),t.pageName=i.default.PY_DETAILS),t?.disableAssignmentHeader?c.default.disableAssignmentHeader(t.disableAssignmentHeader):c.default.disableAssignmentHeader(!1),r.default.getNextWork(e,i.default.PRIMARY,t)}static openAssignment(e,t=i.publicConstants.APP.APP,s={}){return s.renderInline=!0,s.pageName?c.default.setDefaultCasePage(s.pageName):(c.default.setDefaultCasePage(i.default.PY_DETAILS),s.pageName=i.default.PY_DETAILS),s?.disableAssignmentHeader?c.default.disableAssignmentHeader(s.disableAssignmentHeader):c.default.disableAssignmentHeader(!1),r.default.openAssignment(e,t,i.default.PRIMARY,s)}static openPage(e,t,s=i.publicConstants.APP.APP,r={}){const l=a.SHOW_PAGE;r?.defaultCasePage?c.default.setDefaultCasePage(r.defaultCasePage):c.default.setDefaultCasePage(i.default.PY_DETAILS),r?.disableAssignmentHeader?c.default.disableAssignmentHeader(r.disableAssignmentHeader):c.default.disableAssignmentHeader(!1);const u={viewName:e,className:t,acTargetName:i.default.PRIMARY,actionMgrID:n.ActionManagerInstance.getNextActionMgrId(),context:s},{promise:d}=n.ActionManagerInstance.actionManagerPromise(l,u.actionMgrID);return o.dispatch({type:l,payload:{...u}}),d}static getCurrentContextAPI(e,t=i.publicConstants.APP.APP){const s={meta:{config:{}},options:{context:t,pageReference:e,containerName:i.default.PRIMARY}};return(0,l.createC11nEnv)(s).getPConnect()}}},"./src/messages/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{MESSAGES_PATH:()=>l,addMessages:()=>m,clearContextMessagesInActiveWorkArea:()=>I,clearMessages:()=>g,default:()=>y,getAllMessagesPaths:()=>E,getMessages:()=>h,getMessagesPath:()=>u,getRootContainerHttpMessages:()=>_,getTableRowErrorMessages:()=>d,getValidationErrorMessages:()=>A,reorderMessages:()=>f});var r=s("./src/container/container-utils.ts"),a=s("./src/store/state/state-manager.ts"),n=s("./src/store/state/actions/index.ts"),o=s("./src/utils/utils.ts"),i=s("./src/constants.ts"),c=s("./src/contextree/treemanager.ts");const l={CONTENT_FIELDS_PATH:[i.default.CONTEXT_DATA,i.default.CASE_INFO.CASE_INFO,i.default.CONTENT],FIELD_MESSAGES_PATH:[i.default.CONTEXT_DATA,i.default.CASE_INFO.CASE_INFO,i.default.CONTENT,i.default.SUMMARY_OF_MESSAGES,i.default.PROPERTY_MESSAGES],PAGE_MESSAGES_PATH:[i.default.CONTEXT_DATA,i.default.SUMMARY_OF_MESSAGES,i.default.PAGE_MESSAGES],HTTP_MESSAGES_PATH:[i.default.CONTEXT_DATA,i.default.SUMMARY_OF_MESSAGES,i.default.HTTP_MESSAGES],CASE_MESSAGE_PATH:[i.default.CASEMESSAGES]},u=(e="",t="",s,r)=>{let a,n=[];null!==e&&(a=(e=>e?.startsWith(".")?e.substring(1).split("."):e.split("."))(e));const o=t&&t.startsWith(".")?t.substr(1):t;if(s===i.default.PROPERTY&&e||e){n=[i.default.CONTEXT_DATA,...o.split(".")];for(let e=0;e<a.length-1;e+=1)n.push(a[e]);n.push(i.default.SUMMARY_OF_MESSAGES,i.default.PROPERTY_MESSAGES,a[a.length-1])}else s===i.publicConstants.PAGE?n=[...l.PAGE_MESSAGES_PATH]:s===i.default.HTTP?n=[...l.HTTP_MESSAGES_PATH]:s===i.default.CASEMESSAGES?n=[...l.CASE_MESSAGE_PATH]:r&&(n=[i.default.CONTEXT_DATA,...o.split(".")]);return n.filter(Boolean)},d=(e,t,s)=>{const r={content:{}},a=`${t}[${s}]`,n=o.default.getIn(e?.content,a.split("."));return n&&o.default.setIn(r.content,a.split("."),{...n}),r},p=(e,t,s,r,a,n,c={})=>{const l=((e,t,s)=>t<s?e.filter((e=>parseInt(e.match(/\d+/)?.[0],10)>t&&parseInt(e.match(/\d+/)?.[0],10)<=s)):e.filter((e=>parseInt(e.match(/\d+/)?.[0],10)<t&&parseInt(e.match(/\d+/)?.[0],10)>=s)))(s,r,a),u=r>a?"up":"down";l&&l?.length>0&&l?.forEach((s=>{const r=parseInt(s.match(/\d+/)?.[0],10),a=`${n}[${r}]`;c[`${n}[${r+("up"===u?1:-1)}]`]=o.default.getIn(e[t],[i.default.CONTEXT_DATA,...a.split(".")]),o.default.deleteIn(e[t],[i.default.CONTEXT_DATA,...a.split(".")])}));const d=Object.keys(c);d.length>0&&d.forEach((s=>{o.default.setIn(e[t],[i.default.CONTEXT_DATA,...s.split(".")],c[s])}))},f=(e,t,s,r,a)=>{const n=o.default.deepClone(o.default.getIn(e,[`${t}`])),c=o.default.getIn(n,[i.default.CONTEXT_DATA,i.default.CASE_INFO.CASE_INFO]);if(!c)return;const l=s.substring(0,s.lastIndexOf(".")),u=s.substring(s.lastIndexOf(".")+1),f=((e,t,s)=>{const r=o.default.getIn(e,[i.default.CONTEXT_DATA,...s.split(".")]);return Object.keys(r).filter((e=>e.includes(`${t}[`)))})(n,u,l);if(0!==f.length)if(d(c,u,r).content[`${u}[${r}]`]){const c={},l=`${s}[${r}]`,u=o.default.getIn(n,[i.default.CONTEXT_DATA,...l.split(".")]);c[`${s}[${a}]`]=u,o.default.deleteIn(e[t],[i.default.CONTEXT_DATA,...l.split(".")]),p(e,t,f,r,a,s,c)}else p(e,t,f,r,a,s)},h=e=>{const{type:t,property:s,category:r,context:n,pageReference:l}=e;let d;s&&(d=s.slice(1));const p=a.getDataObject(n);let f=[];const h=o.default.getIn(p,u(d,l,r));return t&&"all"!==t?(h&&Array.isArray(h)&&h.length>0&&(f=h.filter((e=>e.type===t))),t===i.publicConstants.MESSAGES.MESSAGES_TYPE_ERROR&&f.length>0&&s&&c.default.mutateField(n,l,s,{messages:[...f],type:i.publicConstants.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:s}),f):h},g=e=>{const{property:t,pageReference:s,category:r,context:o,type:i,isListEntry:l,clearContextMessages:u,deletingIndex:d}=e,p={context:o,type:i};t&&!l?(c.default.mutateField(o,s,t,{type:n.CLEAR_MESSAGES,fieldName:t}),p.property=t,p.pageReference=s):l?(p.pageReference=s,p.isListEntry=l,p.deletingIndex=d):p.category=r,u?a.dispatch({type:n.CLEAR_MESSAGES,payload:{stateObj:e.stateObj,context:o}}):a.dispatch({type:n.CLEAR_MESSAGES,payload:p})},m=e=>{const{messages:t,property:s,pageReference:r,category:o,context:i}=e,c={messages:t,context:i};s?(c.property=s,c.pageReference=r):c.category=o,a.dispatch({type:n.ADD_MESSAGES,payload:c})},E=(e,t,s)=>{for(const r of Object.keys(e))t.push(r),r===i.default.SUMMARY_OF_MESSAGES?s.push([...t]):"object"==typeof e[r]&&E(e[r],t,s),t.pop();return s},A=e=>{const t=a.getDataObject(e),s=[],r=o.default.getIn(t,[...l.CONTENT_FIELDS_PATH])||{};return E(r,[],[]).forEach((e=>{const t=o.default.getIn(r,[...e,i.default.PROPERTY_MESSAGES]);t&&Object.keys(t).forEach((e=>{t[e].forEach((e=>{e.type===i.default.MESSAGES.MESSAGES_TYPE_ERROR&&(e.fieldLabel?s.push({label:`${e.fieldLabel}:`,description:e.message}):s.push(e.message))}))}))})),s},_=(e,t)=>{let s=h({context:i.default.APP.ROOT,category:"HTTP"});if(e){const e=h({context:t,category:"HTTP"});s?e&&(s=s.concat(h({context:t,category:"HTTP"}))):s=h({context:t,category:"HTTP"})}return s},I=e=>{let t=null;t=(0,r.getChildContainers)(e)[0]?(0,r.getActiveContainerItemName)((0,r.getChildContainers)(e)[0]):e,t&&g({context:t,stateObj:a.getDataObject(t),clearContextMessages:!0})},y={addMessages:m,getValidationErrorMessages:A,getMessages:h,clearMessages:g,getRootContainerHttpMessages:_,clearContextMessagesInActiveWorkArea:I}},"./src/messagingservice/atomic-subscription.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./node_modules/lodash.difference/index.js"),a=s.n(r),n=s("./src/messagingservice/manager.ts");const o=class{constructor(e,t){this.atomicSubscribers={},this.connectionsCount=1,this.connected=!1,this.matcher=e,this.criteria=t}_handleAtomicMessage({message:e}){Object.keys(this.atomicSubscribers).forEach((t=>{const s=this.atomicSubscribers[t],r=Object.keys(s.criteria),n=Object.keys(e);0===a()(r,n).length&&s.callback(e)}))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t){if(!this.connected){const e={matcher:this.matcher,criteria:this.criteria};n.default.subscribe(e,this._handleAtomicMessage.bind(this)),this.connected=!0}const s=this._getAutoGenId();return this.atomicSubscribers[s]={criteria:e,callback:t},s}unsubscribe(e){delete this.atomicSubscribers[e]}}},"./src/messagingservice/case-subscription.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/messagingservice/atomic-subscription.ts");const a=new class{constructor(){this.subscriptions={}}getOrCreateSubscription(e){if(!this.subscriptions[e]){const t={caseId:e};this.subscriptions[e]=new r.default("CASE",t)}return this.subscriptions[e]}}},"./src/messagingservice/manager.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/utils/asset-loader.ts"),a=s("./src/utils/utils.ts"),n=s("./src/messagingservice/message-subscriber.ts"),o=s("./src/messagingservice/user-presence.ts"),i=s("./src/messagingservice/case-subscription.ts");class c{static subscribers={};static connectionsCount=0;static webSocket=null;static connectionConfig=null;static inProgressSubscriptions=[];static inProgressMessages=[];static isServiceAlive=null;static serviceAliveHandler=null;static userPresence=new o.default;static refreshB2SOffset=10;static initConnection(e){if(!e)return;const{messagingService:t}=e;if(!t||t&&t.length<=6)return;const s=r.default.b2sJWT;if(!s||s.length<4)return;this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close());const a=t.endsWith("/")?t+"ws":t+"/ws";try{const e=new WebSocket(`${a}`);this.webSocket=e,e.addEventListener("open",this.handleOnOpen.bind(this)),e.addEventListener("message",this.handleOnMessage.bind(this)),e.addEventListener("error",this.handleOnError.bind(this)),e.addEventListener("close",this.handleOnClose.bind(this))}catch(e){console.log(e)}}static handleOnError(e){this.getTokenExpiryTime()<=0&&(clearInterval(this.reInitInterval),this.reInitInterval=void 0),console.log("web socket connection error event: ",e)}static handleOnClose(e){null!==this.serviceAliveHandler&&(clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=null),e&&4001===e.code||this.connectionConfig?.disableReInit||this.reInitInterval||this.getTokenExpiryTime()<=0||this.reInitialization()}static handleOnOpen(){if(clearInterval(this.reInitInterval),this.reInitInterval=void 0,null!==this.webSocket&&1===this.webSocket.readyState){const e=r.default.b2sJWT;if(!e||e.length<4)return;this.publishMessage({token:e})}}static handleOnMessage(e){if(null!==e&&"ALIVE"===e.data)null===this.isServiceAlive&&this.checkLiveliness(8e3),this.isServiceAlive=!0;else{let t=null;try{t=JSON.parse(e.data)}catch(t){console.error("Invalid data received from messaging service",e.data)}if(t&&t.msgId&&this.webSocket.send(`{"ack":"${t.msgId}"}`),t&&t.filter){const{matcher:e,criteria:s}=t.filter;delete s.environmentID,Object.keys(this.subscribers).forEach((r=>{const n=this.subscribers[r];n.filter.matcher===e&&a.default.isEqual(n.filter.criteria,s)&&n.messageHandler(t)}))}else if(t&&t.tokenExpiryTime){this.setTokenExpiryTime(t);const e=1e3*(this.getTokenExpiryTime()-this.refreshB2SOffset);setTimeout((()=>this.refreshB2STokenReInit()),e);let s=[];this.inProgressSubscriptions.forEach((({messageSubscriber:e,id:t})=>{s?.includes(t)||(s?.push(t),this.subscribeToSocket(e,t))})),this.inProgressSubscriptions=[],this.inProgressMessages.forEach((e=>{this.publishMessage(e)})),this.inProgressMessages=[],s=null}else console.error("filter missing from received data from messaging service",e.data)}}static reInitialization(e){this.reInitInterval||(Object.keys(this.subscribers).forEach((e=>{this.inProgressSubscriptions.push({messageSubscriber:this.subscribers[e],id:e})})),e?this.initConnection(this.connectionConfig):this.reInitInterval=setInterval((()=>{this.initConnection(this.connectionConfig)}),5e3))}static checkLiveliness(e){!1===this.isServiceAlive?this.reInitialization(!0):this.isServiceAlive=!1,null!==this.serviceAliveHandler&&clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=setTimeout((()=>{this.checkLiveliness(e)}),e)}static setConnectionConfig(e){this.connectionConfig=e}static cleanSocketListeners(){null!==this.webSocket&&(this.webSocket.removeEventListener("open",this.handleOnOpen.bind(this)),this.webSocket.removeEventListener("message",this.handleOnMessage.bind(this)),this.webSocket.removeEventListener("error",this.handleOnError.bind(this)),this.webSocket.removeEventListener("close",this.handleOnClose.bind(this)))}static disconnect(){null!==this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close(),this.webSocket=null)}static subscribe(e,t,s,r){this.connectionsCount+=1;const a=r||`${Date.now()}_${this.connectionsCount}`,o=new n.default(e,t,s);return null!==this.webSocket&&1===this.webSocket.readyState?(this.subscribeToSocket(o,a),a):(this.inProgressSubscriptions.push({messageSubscriber:o,id:a}),null===this.webSocket&&this.initConnection(this.connectionConfig),a)}static subscribeToSocket(e,t){this.subscribers[t]=e;const s={filter:e.filter,subscribe:{id:t}};this.webSocket.send(JSON.stringify(s))}static unsubscribe(e){if(this.subscribers[e]){delete this.subscribers[e];const t={unsubscribe:{id:e}};null!==this.webSocket&&1===this.webSocket.readyState&&this.webSocket.send(JSON.stringify(t))}}static publishMessage(e){null!==this.webSocket?null===this.webSocket||1!==this.webSocket.readyState?this.inProgressMessages.push(e):this.webSocket.send(JSON.stringify(e)):console.error("Web socket not initialized.")}static getUserPresence=()=>this.userPresence;static getCaseSubscription=e=>i.default.getOrCreateSubscription(e);static refreshB2STokenReInit=async()=>{const e={body:{B2SToken:r.default.b2sJWT}};PCore.getRestClient().invokeRestApi("refreshB2S",e).then((e=>{const{newB2SToken:t}=e.data;t&&t.length>30?(r.default.b2sJWT=t,this.setTokenExpiryTime({tokenExpiryTime:Math.round(Date.now()/1e3)+60}),this.webSocket.close()):console.log("refreshB2S: invalid b2s length")})).catch((e=>{console.log(`refreshB2S: error occurred while fetching: ${e}`)}))};static getTokenExpiryTime=()=>{const e=Math.round(Date.now()/1e3);return this.tokenExpiryTime-e};static setTokenExpiryTime=e=>{this.tokenExpiryTime=e.tokenExpiryTime};static clearContext(e){Object.keys(this.subscribers).forEach((t=>{this.subscribers[t].contextName===e&&this.unsubscribe(t)})),this.userPresence.clearContext(e)}}const l=c},"./src/messagingservice/message-subscriber.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=class{constructor(e,t,s){this.filter=e,this.messageHandler=t,this.contextName=s}}},"./src/messagingservice/user-presence.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/messagingservice/manager.ts");const a=class{constructor(){this.users={},this.connected=!1,this.connectionsCount=1}_handleUserPresence({message:e}){const{state:t,updateById:s}=e,r=this.users[s];r&&(r.state=t,Object.keys(r.subscribers).forEach((e=>{r.subscribers[e]?.callback({state:r.state})})))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t,s){const a=this._getAutoGenId(),n=this.users[e];if(n)return n.subscribers[a]={callback:t,contextName:s},a;this.users[e]={subscribers:{[a]:{callback:t,contextName:s}}};const o={matcher:"PRESENCE",criteria:{userId:e}};return r.default.subscribe(o,this._handleUserPresence.bind(this)),a}unsubscribe(e,t){const s={matcher:"PRESENCE",unsubscribeUsers:{users:[e]}};this.users[e]&&this.users[e].subscribers&&(delete this.users[e].subscribers[t],0===Object.keys(this.users[e].subscribers).length&&(delete this.users[e],r.default.publishMessage(s)))}getUserState(e){return this.users[e]&&this.users[e].state}clearContext(e){Object.keys(this.users).forEach((t=>{Object.keys(this.users[t].subscribers).forEach((s=>{this.users[t].subscribers[s].contextName===e&&this.unsubscribe(t,s)}))}))}}},"./src/modules/module-registry.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=class{static registerModule(e,t,s){s[e]=()=>t}}},"./src/observables/stream-observable.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{publishExpressions:()=>c,publishResponse:()=>l});var r=s("./src/rules/rules-store.ts"),a=s("./src/expression/expression-engine.ts"),n=s("./src/router/app-router.ts"),o=s("./src/utils/utils.ts"),i=s("./src/constants.ts");const c=(e,t)=>{e.DeclareExpressions&&(0,a.updateDeclareExpressions)({[t.context]:e.DeclareExpressions})},l=(e,t,s=!1)=>{const a=o.default.getIn(e,i.default.RESOURCES);a&&((e=>{e&&(0,r.updateStores)(e)})(a),c(a,t)),s||(0,n.parseResponse)({...e,options:t})}},"./src/page-instructions/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{addPageInstructionReferences:()=>E,clearInstructions:()=>S,clearPageInstructionReferences:()=>_,deletePage:()=>M,generatePageInstructionsForNestedPayload:()=>w,getChangedInstructions:()=>C,getInstructions:()=>y,getPageInstructionReferences:()=>A,initDefaultPageInstructions:()=>D,isPropertyDirtyPageInstruction:()=>O,listActions:()=>L,mergeInstructions:()=>j,replacePage:()=>P,setVisibility:()=>I});var r=s("./src/utils/utils.ts"),a=s("./src/store/state/state-manager.ts"),n=s("./src/store/state/actions/action-creators.ts"),o=s("./src/constants.ts"),i=s("./src/utils/form-handler.ts"),c=s("./src/fields/index.ts"),l=s("./src/messages/index.ts"),u=s("./src/page-instructions/state-machine/state-machine.ts"),d=s("./src/page-instructions/state-machine-manager.ts");const p={},f={},h={},g=(e,t,s)=>{const r=e.getContextName();p[r]||(p[r]={}),p[r][t]||(p[r][t]={content:[]}),f[r]||(f[r]=[],h[r]=[]),d.default.isStateMachineExist(r,s,t)||d.default.setStateMachine(r,t,s,new u.default(t,s,r))},m=e=>c.default.formatPageReference(e),E=(e,t)=>{const s=f[e],r=h[e],a=(0,i.getNormalizedPropertyName)(t),n=a?.substring(0,a.indexOf("["));r?.indexOf(n)<0&&h[e].push(n),s?.indexOf(a)<0&&f[e].push(a)},A=e=>f[e]||[],_=e=>{delete f[e]},I=(e,t=!0)=>{const s=e.getContextName(),{selectionMode:r,selectionList:a,renderMode:n,referenceList:i}=e.getComponentConfig();let c;if(r===o.default.LIST_SELECTION_MODE.MULTI&&a?c=a:"Editable"===n&&i&&(c=e.getStateProps().referenceList),c){c=m(c);const r=d.default.getStateMachine(s,"",`${e.getPageReference()}${c}`);r&&(r.visibility=t)}},y=e=>d.default.buildPageInstructionsByContext(e),C=e=>d.default.buildPageInstructionsByContext(e,!0),S=e=>{d.default.clearStateMachines(e),delete p[e]},b=(e,t,s,r)=>{let[,a]=t.split(`${e}[${r}]`);""!==a&&void 0!==a&&(a=a.startsWith(".")?a.substring(1):a,Object.keys(s).forEach((e=>{s[`${a}.${e}`]=s[e],delete s[e]})))},T=(e,t,s,a,n)=>{const{skipStateUpdate:i=!1}=n||{},c=s.getContextName(),l=s.getReferenceList(),u=a||s.getPageReference(),p=m(l);g(s,p,u),E(c,`${l}[${t}]`),b(l,u,e,t);const f={instruction:o.default.LIST_ACTIONS.INSERT,content:{...r.default.unflatten(e)}};delete JSON.parse(JSON.stringify(f)).content.classID,d.default.getStateMachine(c,u,p).insert(e,t+1,i,{})},N=(e,t)=>{const[,s]=e.split("."),r=t?.split(".").pop();return s===r},v=(e,t,s)=>{const a={};return Object.values(e).forEach((e=>{if(N(e,s)){const s=r.default.getPropertyName(e),n=s.substr(s.indexOf(".")+1).split(".");if(n.length>1){let e=r.default.getIn(t,n)??"";if(!e){const s=`!P!${n.join(":")}`;e=r.default.getIn(t,s)??""}r.default.setIn(a,n,e)}else{const e=r.default.getIn(t,n)??"";a[n[n.length-1]]=e}}})),a},R=(e,t,s,r,a)=>{const n=e.getValue(t)||{};s&&Object.keys(n).length>0&&e.clearErrorMessages({property:r?a:e.getStateProps().value})},O=e=>{if(!e)return!1;const t=C(e);return Array.isArray(t)&&t.length>0},D=(e,t,s,r)=>{const a=e.getContextName(),n=e.getPageReference(),o=m(t);g(e,o,n),d.default.getStateMachine(a,n,o).initPageInstructions(e,s,r)},x=(e,t,s)=>{const{skipStateUpdate:r=!1}=s,a=e.getPageReference(),n=m(t);g(e,t,a),d.default.getStateMachine(e.getContextName(),a,n).deleteAll(r)},P=(e,t,s)=>{const a=e.getPageReference(),n=e.getContextName();g(e,t,a),E(n,r.default.buildInstructionPageReference(a,t)),d.default.getStateMachine(n,a,t).replacePage(s)},M=(e,t)=>{const s=e.getPageReference(),a=e.getContextName();g(e,t,s),E(a,r.default.buildInstructionPageReference(s,t)),d.default.getStateMachine(a,s,t).deletePage()},w=(e,t,s)=>{const r=(e,t)=>{Object.entries(e).forEach((([e,a])=>{if(Array.isArray(a)){const r=PCore.createPConnect({options:{pageReference:s.getPageReference(),context:s.getContextName(),referenceList:`${t}.${e}`}}).getPConnect();x(r,`${t}.${e}`,{skipStateUpdate:!0});for(let e=0;e<a.length;e+=1)T(a[e],e,r,void 0,{})}else"object"==typeof a&&r(a,`${t}.${e}`)}))};r(e,t)},j=(e,t,s,a)=>{y(e).forEach((e=>{const n=r.default.convertClipboardPageToPageRefNotation(e.target);d.default.isStateMachineExist(t,s,n)||d.default.setStateMachine(t,n,s,new u.default(n,s,t));const o=d.default.getStateMachine(t,s,n);switch(e.instruction.toLowerCase()){case"insert":o.insert(e.content,e.listIndex,a,{});break;case"update":o.update(e.content,e.listIndex,a,{});break;case"delete":e.listIndex?o.delete(e.listIndex,a):o.deletePage();break;case"replace":o.replacePage(e.content);break;case"move":o.move(e.listIndex,e.listMoveToIndex);break;case"delete all":o.deleteAll()}}))},L=e=>({insert:(t,s,r,a)=>T(t,s,e,r,a),update:(t,s,r)=>((e,t,s=0,r={})=>{const{skipStateUpdate:a=!0,pageRef:n}=r,i=t.getContextName();let c=t.getReferenceList();const l=n||t.getPageReference();c||(c=((e,t)=>{const s=e.indexOf(o.publicConstants.CONTENT)+o.publicConstants.CONTENT.length,r=e.lastIndexOf(`[${t}]`);return e.substring(s,r)})(l,s));const u=m(c);g(t,u,l),E(i,`${c}[${s}]`),b(c,l,e,s),d.default.getStateMachine(i,l,u).update(e,s+1,a,r)})(t,e,s,r),updateProperty:(t,s,r)=>((e,t,s,r)=>{const a=s.getPageReference(),{stateMachineTarget:n}=d.default.getStateMachineObjByPath(`${a}${e}`,s.getContextName(),!0);if(!n){let e=a.substring(0,a.lastIndexOf("["));const t=e.substring(e.lastIndexOf("."));e=e.substring(0,e.lastIndexOf(".")),e&&t&&g(s,t,e)}d.default.executeStateMachine(s.getContextName(),`${a}${e}`,t,!0,r)})(t,s,e,r),deleteEntry:(t,s)=>((e,t,s)=>{const r=t.getContextName(),a=t.getReferenceList(),n=s||t.getPageReference(),i=`${n+a}[${e}]`,c=m(a);(0,l.clearMessages)({type:o.publicConstants.MESSAGES.MESSAGES_TYPE_ERROR,pageReference:i,context:r,isListEntry:!0,deletingIndex:e}),g(t,c,n),E(r,`${a}[${e}]`),d.default.getStateMachine(r,n,c).delete(e+1);const u=d.default.getUnConnectedStateMachines(r)||{};Object.keys(u).forEach((e=>{e.includes(`${n}${c}`)&&(u[e]=null)}))})(t,e,s),reorder:(t,s)=>((e,t,s)=>{const r=s.getContextName(),a=s.getReferenceList(),n=s.getPageReference(),o=m(a);g(s,o,n),E(r,`${a}[${t}]`),d.default.getStateMachine(r,n,o).move(e+1,t+1)})(t,s,e),setSelectedRows:(t,s={skipPageInstructions:!1})=>((e,t,s)=>new Promise((i=>{const{skipPageInstructions:c=!1}=s,{selectionMode:l,selectionList:u,required:p}=t.getConfigProps(),f=l===o.default.LIST_SELECTION_MODE.MULTI,h=t.getContextName();let E=t.getPageReference(),A=((e,t,s)=>e?s.substring(1):t.substring(t.lastIndexOf(".")+1))(f,E,u);const _=t.getRawMetadata();let I=null;const y=(e=>e?.config?.dataRelationshipContext&&"SimpleTableSelect"===e.type&&"single"===e.config?.selectionMode)(_);y&&(A=_?.config?.dataRelationshipContext,I=E.concat(".").concat(A),E=I);const C=((e,t,s)=>e?`${t}${s}`:t)(f,E,u),S=((e,t,s,r)=>t?e.getFieldMetadata(`${s}`):e.getCurrentPageFieldMetadata(r))(t,f,A,I),{datasource:{parameters:b={}}}=S,T={...b};if(((e,t,s)=>{t?.descriptors?.length&&!s&&t.descriptors.forEach((t=>{const s=r.default.getPropertyName(t),a=s.substr(s.indexOf(".")+1).split(".");e[a.join(".")]=t}))})(T,S,f),f){let s=u;s=m(s);const r=t.getValue(C)||[];g(t,s,E);const i=[];let l=r.length;e.forEach((e=>{const t=v(b,e,A),a={};if(Object.prototype.hasOwnProperty.call(e,"displayProperty")){const t=e.displayProperty;a[t]=e[t]}const n=Object.entries(t);let u=r.findIndex((e=>n.every((([t,s])=>e[t]===s))));if(-1===u?(u=l,e.$selected&&(l+=1)):l=l?l-1:0,!c){const r=d.default.getStateMachine(h,E,s);e.$selected?r.insert(t,u+1,!0,{}):r.delete(u+1,!0)}i.push({instruction:e.$selected?o.default.LIST_ACTIONS.SELECT:o.default.LIST_ACTIONS.DESELECT,listIndex:u,content:{...t,...a}})})),a.dispatch((0,n.listAction)({instruction:o.default.LIST_ACTIONS_TYPE.SELECT_DESELECT,context:h,referenceList:`${E}.${A}`,actions:i}))}else{const s=v(T,e[0],A),r=(N=E.split(/\[\d+\]/gm)).length>1?N.pop():"";Object.keys(s).forEach((e=>{t.getActionsApi().updateFieldValue(`.${e}`,s[`${e}`],y?{contextPageReference:E}:{})})),t.getActionsApi().triggerFieldChange(r,s)}var N;R(t,C,p,f,A),i()})))(t,e,s),getSelectedRows:(t=!1)=>((e,t)=>{const{selectionMode:s,selectionList:r}=t.getConfigProps(),a=[];let n=t.getPageReference();const i=s===o.default.LIST_SELECTION_MODE.MULTI;let c=i?r.substring(1):n.substring(n.lastIndexOf(".")+1);const l=t.getRawMetadata();let u=null;l?.config?.dataRelationshipContext&&"SimpleTableSelect"===l.type&&"single"===l.config?.selectionMode&&(c=l.config.dataRelationshipContext,u=n.concat(".").concat(c),n=u);const d=i?`${n}${r}`:n;let p=t.getValue(d)||[];if(Array.isArray(p)||(p=[p]),e)return Promise.resolve(p);const{datasource:{parameters:f={}}={}}=i?t.getFieldMetadata(`${c}`):t.getCurrentPageFieldMetadata(u);return p.forEach((e=>{const t=Object.values(f).reduce(((t,s)=>{const r=s.substring(s.lastIndexOf(".")+1);return N(s,c)&&e[r]?`${t}${e[r]}`:t}),"");t.trim()&&a.push(t.trim())})),Promise.resolve(a)})(t,e),clearSelectedRows:()=>function(e){const{selectionList:t,required:s}=e.getConfigProps(),r=e.getContextName(),a=e.getPageReference(),n=t,o=`${a}${t}`;return new Promise((t=>{let i=n;i=m(i),g(e,i,a),d.default.getStateMachine(r,a,i).deleteAll(),R(e,o,s,!0,n),t()}))}(e),setVisibility:t=>I(e,t),initDefaultPageInstructions:(t,s,r)=>D(e,t,s,r),deleteAll:(t,s={})=>x(e,t,s),replacePage:(t,s)=>P(e,t,s),deletePage:t=>M(e,t)})},"./src/page-instructions/state-machine-manager.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/utils/form-handler.ts"),a=s("./src/utils/utils.ts"),n=s("./src/cascade/manager.ts"),o=s("./src/form/form-utils.ts"),i=s("./src/contextree/treemanager.ts");const c=new class{constructor(){this.states={},this.unConnectedStates={}}getStateMachine(e,t,s){return this.states?.[e]?.[`${t}${s}`]||this.unConnectedStates?.[e]?.[`${t}${s}`]}isStateMachineExist(e,t,s){return!!this.states?.[e]?.[`${t}${s}`]||!!this.unConnectedStates?.[e]?.[`${t}${s}`]}getUnConnectedStateMachines(e){return this.unConnectedStates?.[e]}setStateMachine(e,t,s,r){const a=`${s}${t}`,{stateMachine:n}=this.getStateMachineObjByPath(a,e,!0);if(n&&n.targetPageReference!==r.targetPageReference)return n.addChild(r),this.unConnectedStates[e]||(this.unConnectedStates[e]={}),this.unConnectedStates[e][a]||(this.unConnectedStates[e][a]={}),void(this.unConnectedStates[e][a]=r);this.states[e]||(this.states[e]={}),this.states[e][a]||(this.states[e][a]={}),this.states[e][a]=r}buildPageInstructionsByContext(e,t){const s=this.getStateMachinesByContext(e)||{},r=[];return Object.keys(s).sort().forEach((a=>{const n=i.default.getContextReferences(e)?.get(a),o=s[a];if(n){const e=o.buildSubmitPageInstructions(t);r.push(...e)}})),r}buildClientChangeList(e){const t=this.getStateMachinesByContext(e)||{};let s={};const r={};return Object.keys(t).forEach((e=>{const r=t[e].getChangeList();s={...s,...r}})),a.default.flatten(s,"",r),r}getStateMachinesByContext(e){return e?this.states?.[e]:void 0}clearStateMachines(e){this.states[e]={},this.unConnectedStates[e]={}}removeStateMachine(e,t){delete this.states[e]?.[t]}getStateMachineObjByPath(e,t,s){const r=/\[\d+\]$/gm;let a=null;for(;e&&!this.isStateMachineExist(t,"",e);)a=null,s&&e.endsWith("]")?(a=e.match(r),a=a?.[a.length-1]?.substring(1,a[a.length-1].length-1),[e]=e.split(r)):e=e.substring(0,e.lastIndexOf("."));return e?{stateMachineTarget:e,stateMachine:this.getStateMachine(t,"",e),index:a}:{}}executeStateMachine(e,t,s,n=!0,o={}){const{stateMachineTarget:i,index:c}=this.getStateMachineObjByPath(t,e,n);if(!i)return!1;let[,l]=t.split(i);if(!l)return!1;null!==c&&([,l]=l.split(/^\[\d+\]/gm));const u={[(0,r.getNormalizedPropertyName)(l)]:s},d=this.getStateMachine(e,"",i);return null!==c?d.update(u,Number(c)+1,o.skipStateUpdate??!0,o):d.updatePage(a.default.unflatten(u)),!0}registerForServerChanges(){n.default.registerForListChanges(((e,t,s)=>{!t.includes(".classID")&&o.default.isPropertyEditable(e,t)&&this.executeStateMachine(e,t,s)}))}unRegisterForServerChanges(){n.default.unRegisterForListChanges()}}},"./src/page-instructions/state-machine/state-machine.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g});var r=s("./src/store/state/state-manager.ts"),a=s("./src/utils/utils.ts"),n=s("./src/utils/form-handler.ts"),o=s("./src/store/state/actions/action-creators.ts"),i=s("./src/page-instructions/state-machine/states/insert.ts"),c=s("./src/page-instructions/state-machine/states/update.ts"),l=s("./src/page-instructions/state-machine/states/delete.ts"),u=s("./src/page-instructions/state-machine/states/delete-all.ts"),d=s("./src/page-instructions/state-machine/states/move.ts"),p=s("./src/page-instructions/state-machine/states/replace-page.ts"),f=s("./src/page-instructions/state-machine/states/delete-page.ts"),h=s("./src/page-instructions/state-machine/state-node.ts");const g=class{constructor(e,t,s){this.target=e,this.pageReference=t,this.contextName=s,this.root=null,this.current=null,this.changeList={},this.targetPageReference=t+e,this.children=[],this.visibility=!0}addChild(e){null===this.current&&this.insertNode({}),this.current.childrenStateMachines.push(e)}insertNode(e){const t=new h.default(e);null===this.root&&(this.root=t),null!==this.current&&(t.previous=this.current,this.current.next=t),this.current=t}buildChildSumbitPageInstructions(e,t){let s=[];return e.childrenStateMachines.forEach((e=>{e.visibility&&(s=s.concat(e.buildSubmitPageInstructions(t)))})),s}buildSubmitPageInstructions(e=!1){let t=this.root,s=[];for(;t;)!t.instruction.instruction||e&&t.automatic||s.push(t.instruction),s=[...s,...this.buildChildSumbitPageInstructions(t,e)],t=t.next;return s}initPageInstructions(e,t,s){const r=e.getValue(this.target)||[];t?r.forEach(((e,r)=>{t.forEach((t=>{const a=(0,n.getNormalizedPropertyName)(t),o={};let i=!0;s&&(o[(0,n.getNormalizedPropertyName)(s)]=crypto.randomUUID(),i=!1);const c={[a]:e[a],...o};this.update(c,r+1,i,{isDefault:!0})}))})):r.forEach(((e,t)=>{if(s&&!e[(0,n.getNormalizedPropertyName)(s)]){const e={};e[(0,n.getNormalizedPropertyName)(s)]=crypto.randomUUID(),this.update(e,t+1,!1,{isDefault:!0})}}))}getChangeList(){return this.changeList}initChangeList(e){this.changeList[this.targetPageReference]=this.changeList[this.targetPageReference]||[],this.changeList[this.targetPageReference][e]=this.changeList[this.targetPageReference][e]||{}}update(e,t,s,n){const o=c.default.execute(this.contextName,this.target,t,e,this.pageReference,s),{isDefault:i=!1,skipPageinstruction:l}=n;if(!l){if(this.initChangeList(t-1),!i){const s=this.changeList?.[this.targetPageReference]?.[t-1].content;this.changeList[this.targetPageReference][t-1]=r.mergeDeep(a.default.deepClone(s),e,n)}if(this.current?.automatic!==i||this.current?.instruction?.listIndex!==t||"UPDATE"!==this.current?.instruction.instruction)this.insertNode(o),i&&(this.current.automatic=!0);else{const t=this.current.instruction.content;this.current.instruction.content=r.mergeDeep(a.default.deepClone(t),a.default.unflatten(e),n)}}}delete(e,t){const s=l.default.execute(this.target,e,this.pageReference);this.changeList[this.targetPageReference]?.splice(e-1,1),this.insertNode(s),t||r.dispatch((0,o.listAction)({instruction:"DELETE",listIndex:e-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}insert(e,t,s,n){const{instruction:c,actionPayload:l={content:{}},displayPropertPayload:u={}}=i.default.execute(this.target,t,e,this.pageReference),{isDefault:d=!1}=n;if(this.initChangeList(t-1),!d){const s=this.changeList?.[this.targetPageReference]?.[t-1].content;this.changeList[this.targetPageReference][t-1]=r.mergeDeep(a.default.deepClone(s),e,n)}this.insertNode(c),s||(l.content={...l.content,...u},r.dispatch((0,o.listAction)({...l,listIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))),d&&(this.current.automatic=!0)}replacePage(e){const t=p.default.execute(this.contextName,this.target,e,this.pageReference);this.insertNode(t)}deletePage(){const e=f.default.execute(this.target,this.pageReference);this.insertNode(e)}move(e,t){const s=this.changeList[this.targetPageReference]?.splice(e-1,1);this.changeList[this.targetPageReference]?.splice(t-1,0,s[0]);const a=d.default.execute(this.target,e,t,this.pageReference);this.insertNode(a),r.dispatch((0,o.listAction)({listIndex:e-1,listMoveToIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,instruction:"MOVE"}))}deleteAll(e){const t=u.default.getDeleteAllInstruction(this.pageReference,this.target);this.changeList[this.targetPageReference]=[],this.insertNode(t),u.default.execute(this.contextName,this.target,this.pageReference,e)}updatePage(e){const t=this.current.instruction.content;this.current.instruction.content=r.mergeDeep(a.default.deepClone(t),e)}}},"./src/page-instructions/state-machine/state-node.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=class{constructor(e){this.next=null,this.automatic=!1,this.instruction=e,this.previous=null,this.childrenStateMachines=[]}}},"./src/page-instructions/state-machine/states/delete-all.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/store/state/state-manager.ts"),a=s("./src/store/state/actions/action-creators.ts"),n=s("./src/utils/utils.ts");const o=class{static getDeleteAllInstruction(e,t){return{instruction:"DELETE ALL",target:n.default.buildInstructionPageReference(e,t)}}static execute(e,t,s,n){n||r.dispatch((0,a.listAction)({instruction:"DESELECT_ALL",context:e,referenceList:`${s}${t}`}))}}},"./src/page-instructions/state-machine/states/delete-page.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/utils/utils.ts");const a=class{static execute(e,t){return{target:r.default.buildInstructionPageReference(t,e),instruction:"DELETE"}}}},"./src/page-instructions/state-machine/states/delete.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/utils/utils.ts");const a=class{static execute(e,t,s){return{target:r.default.buildInstructionPageReference(s,e),listIndex:t,instruction:"DELETE"}}}},"./src/page-instructions/state-machine/states/insert.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/utils/utils.ts");const a=class{static execute(e,t,s,a){const n={};Object.prototype.hasOwnProperty.call(s,"nonFormProperties")&&(s.nonFormProperties.forEach((e=>{n[e]=s[e],delete s[e]})),delete s.nonFormProperties);const o={instruction:"INSERT",content:{...r.default.unflatten(s)}},i=JSON.parse(JSON.stringify(o));return delete i.content.classID,{instruction:{target:r.default.buildInstructionPageReference(a,e),content:{...i.content},listIndex:t,instruction:"INSERT"},actionPayload:o,displayPropertPayload:n}}}},"./src/page-instructions/state-machine/states/move.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/utils/utils.ts");const a=class{static execute(e,t,s,a){return{target:r.default.buildInstructionPageReference(a,e),listMoveToIndex:s,listIndex:t,instruction:"MOVE"}}}},"./src/page-instructions/state-machine/states/replace-page.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/utils/utils.ts");const a=class{static execute(e,t,s,a){return{content:{...{...r.default.unflatten(s)}},target:r.default.buildInstructionPageReference(a,t),instruction:"REPLACE"}}}},"./src/page-instructions/state-machine/states/update.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/store/state/state-manager.ts"),a=s("./src/store/state/actions/action-creators.ts"),n=s("./src/utils/utils.ts");const o=class{static execute(e,t,s,o,i,c){const l={instruction:"UPDATE",content:{...n.default.unflatten(o)}},u={content:{...l.content},target:n.default.buildInstructionPageReference(i,t),listIndex:s,instruction:"UPDATE"};return c||r.dispatch((0,a.listAction)({...l,listIndex:s-1,context:e,referenceList:`${i}${t}`})),u}}},"./src/page-instructions/utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}}},"./src/performance-manager/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/constants.ts"),a=s("./src/utils/pubsub-utils.ts"),n=s("./src/utils/utils.ts"),o=s("./src/services/index.ts"),i=s("./src/store/state/state-manager.ts");class c{static portalRegex=/(?<=v2\/pages\/)(.*?)(?=\?pageClass=)/;#d=0;#p=0;#f;#h=[];constructor(){this.#f=!1,a.default.subscribe(r.default.START_PERFORMANCE_LOG,(()=>{this.#f=!0,this.clearStorage(),this.#d=Date.now()}),r.default.START_PERFORMANCE_LOG),a.default.subscribe(r.default.STOP_PERFORMANCE_LOG,(()=>{this.#f=!1,this.#p=Date.now(),this.#g()}),r.default.STOP_PERFORMANCE_LOG)}static getCategory(e){return e.includes("v2/cases")||e.includes("v2/assignments")?"Case":e.includes("v2/data_views")?"DataPage":e.includes("v2/pages")?"Page":""}static getPortalLabel(e,t){return((0,i.getValue)(".pyPrimaryNavPages","pyPortal",t)||[]).find((t=>t.pyRuleName===e))?.pyLabel??e}static extractAssignmentLabel(e,t,s){e.label===r.default.TOP_ACTION_LABEL.OPENASSIGNMENT&&void 0===e.assignmentLabel&&(e.assignmentLabel=s?.data?.data?.caseInfo?.assignments.find((e=>e.ID===t))?.name??"")}#m(e,t,s,r){if(e<0)return;const a=this.#h[t].serviceCalls[e],n=Date.now();a.endTime=n,a.totalTimeTaken=n-a.startTime,a.httpMethod=r.config?.method,s?a.status="CANCELLED":"headers"in r&&(a.status=r.status,a.responseBytes=r.headers["content-length"])}#E(e,t,s,a,o){let i="";s||(i=e.match(c.portalRegex)[0]?.split(" ")[0]);const l=`${t||i}${r.default.HASH_DELIMITER}${o.startTime}`,u=n.default.getHashedString(l);o.urlUniqueID=u;const d={label:t||`${c.getPortalLabel(i,a)} Portal`,actionUniqueID:u,serviceCalls:[o]};return this.#h.push(d),{actionUniqueID:u,urlUniqueID:u,topLevelAction:s}}#A(e,t,s){const r=this.#h[e];c.extractAssignmentLabel(r,t,s);const a=s.data?.data?.caseInfo?.content;a&&(r.caseLabel=a.pyLabel,r.caseID=a.pyID)}buildActionsList(e){const{url:t,topLevelAction:s,userAction:a,actionLabel:i,context:l}=e;let u={};if(this.#f){const e={url:t.split(o.default.getServerURL()??"")[1],startTime:Date.now(),context:l,category:c.getCategory(t)};if(s&&a)u=this.#E(t,i,!0,l,e);else if(c.portalRegex.test(t))u=this.#E(t,i,!1,l,e);else if(this.#h.length>0){const a=this.#h[this.#h.length-1].serviceCalls,o=`${t}${r.default.HASH_DELIMITER}${e.startTime}${r.default.HASH_DELIMITER}${a.length}`,i=n.default.getHashedString(o);e.urlUniqueID=i,a.push(e),u.actionUniqueID=this.#h[this.#h.length-1].actionUniqueID,u.urlUniqueID=i,u.topLevelAction=s}}return u}reformActionList(e,t,s,r){const a=t.config,{actionUniqueID:n,urlUniqueID:i,topLevelAction:c,assignmentID:l}=a;if(this.#f){const a=this.#h.findIndex((e=>e.actionUniqueID===n));if(a>=0){c&&s&&"data"in t&&this.#A(a,l,t),e=e.split(o.default.getServerURL()??"")[1];const n=this.#h[a].serviceCalls.findIndex((t=>t.url===e&&t.urlUniqueID===i));this.#m(n,a,r,t)}}}#g(){if(0===this.#h.length)return;const e={version:"1.0.0",recordedTime:this.#p-this.#d,totalActions:this.#h.length,startTime:this.#d,userActions:this.#h};localStorage.setItem("performanceData",JSON.stringify(e))}clearStorage(){localStorage.removeItem("performanceData"),this.#h=[]}}const l=new c},"./src/personalization/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>m});var r=s("./src/router/app-router.ts"),a=s("./src/service_broker/fetch.ts"),n=s("./src/rules/rules-store.ts");function o(e=[]){return e.reduce(((e,t)=>(e[t.personalizationID]={name:t.name,personalizationState:JSON.parse(t.personalizationState||"{}")},e)),{})}const i="create",c="update",l="delete";function u(e,t,s,r){const a=(0,n.getPersonalizationMetadata)(t);if(a){switch(e){case i:case c:{const{markAsDefault:e,...t}=r;Object.entries(t).length>0&&(a.allPersonalizations[s]=t),e&&(a.defaultPersonalization=s);break}case l:delete a.allPersonalizations[s],a.defaultPersonalization===s&&(a.defaultPersonalization="");break;default:return null}return a}return null}const d={},p=e=>{const t=(0,n.getPersonalizationMetadata)(e);if(t)return Array.isArray(t.allPersonalizations)&&(t.allPersonalizations=o(t.allPersonalizations)),Promise.resolve(t);const{restApi:s,reqType:i}=(0,r.resolveRestApi)("getUIListPersonalizations",{listID:e});return(0,a.fetch)(s,{method:i,body:{}}).then((e=>{const{data:t}=e;return{allPersonalizations:o(t.allPersonalizations),defaultPersonalization:t.defaultPersonalization}}))},f=(e,t,s)=>{const{restApi:n,reqType:o}=(0,r.resolveRestApi)("createListPersonalization",{listID:e});return u(i,e,t,s),(0,a.fetch)(n,{method:o,body:{...s,personalizationState:JSON.stringify(s.personalizationState)}}).then((e=>{const s=e.data;return d[t]=s,e}))},h=(e,t,s)=>{const n=d[t]||t;u(c,e,t,s);const{restApi:o,reqType:i}=(0,r.resolveRestApi)("updateListPersonalization",{listID:e,personalizationID:n})||{};return(0,a.fetch)(o,{method:i,body:{...s,personalizationState:JSON.stringify(s.personalizationState)}})},g=(e,t)=>{const s=d[t]||t;u(l,e,t);const{restApi:n,reqType:o}=(0,r.resolveRestApi)("deleteListPersonalization",{listID:e,personalizationID:s});return(0,a.fetch)(n,{method:o,body:{}}).then((e=>(d[t]&&delete d[t],e)))},m=function(e){return e?{createPersonalization:f.bind(null,e),updatePersonalization:h.bind(null,e),deletePersonalization:g.bind(null,e),fetchPersonalizations:p.bind(null,e)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}}},"./src/pubsub/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/pubsub/subject.ts");const a=new class{constructor(){this.subscribers={}}publish(e,t){this.subscribers[e]?.forEach((e=>{e.callback(t)}))}unsubscribe(e,t,s){const r=this.subscribers[e]||[];let a=0,n=-1;r.forEach((e=>{e.id===t&&e.contextName===s&&(n=a),a+=1})),r.splice(n,1)}unsubscribeAllWithEventType(e){this.subscribers[e]=[]}subscribe(e,t,s,a,n){this.subscribers[e]=this.subscribers[e]||[];let o=!1;if(n&&this.subscribers[e].forEach((e=>{o=e.id===t&&e.contextName===a})),!o){const n=new r.default(e,t,s,a);this.subscribers[e].push(n)}}clearContext(e){const t=this.subscribers;Object.keys(t).forEach((t=>{const s=this.subscribers[t],r=[];s.forEach((t=>{t.contextName!==e&&r.push(t)})),this.subscribers[t]=r}))}}},"./src/pubsub/subject.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=class{constructor(e,t,s,r){this.eventType=e,this.callback=s,this.contextName=r,this.id=t}}},"./src/refresh/action-creator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{fillFormWithAI:()=>o,refreshData:()=>n});var r=s("./src/store/state/actions/index.ts"),a=s("./src/refresh/index.ts");const n=e=>({type:a.default.REFRESH_DATA,payload:e}),o=e=>({type:r.FILL_FORM_WITH_AI,payload:e})},"./src/refresh/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r={REFRESH_DATA:"REFRESH_DATA",WHENS:"WHENS",DECLARE_EXPRESSIONS:"DECLARE_EXPRESSIONS",REFRESH:"refresh",REFRESH_CASE_DATA:"refreshCaseData",REFRESH_ASSIGNMENT_DATA:"refreshAssignmentData",REFRESH_CASE_VIEW:"refreshCaseView",RECALCULATE:"recalculate",RECALCULATE_CASE_DATA:"recalculateCaseData",RECALCULATE_ASSIGNMENT_DATA:"recalculateAssignmentData"}},"./src/refresh/refresh-epic.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>D});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),o=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),i=s("./src/utils/rxjs-utils.ts"),c=s("./src/router/app-router.ts"),l=s("./src/constants.ts"),u=s("./src/store/state/state-manager.ts"),d=s("./src/actions/targetmap.ts"),p=s("./src/utils/utils.ts"),f=s("./src/case/utils.ts"),h=s("./src/utils/dxapi-response-translator.ts"),g=s("./src/router/routing-manager.ts"),m=s("./src/actions/manager.ts"),E=s("./src/store/state/actions/index.ts"),A=s("./src/store/state/actions/action-creators.ts"),_=s("./src/page-instructions/state-machine-manager.ts"),I=s("./src/store/state/epics/util.ts"),y=s("./src/service_broker/fetch.ts"),C=s("./src/rules/rules-store.ts"),S=s("./src/actions/sequencer.ts"),b=s("./src/environment-info/index.ts"),T=s("./src/refresh/refreshHelpers.ts"),N=s("./src/refresh/index.ts");const v={},{VIEW:R,FIELD:O}=l.default.CONTEXT_TREE_NODE_TYPES,D=[(e,t)=>e.pipe((0,r.ofType)(N.default.REFRESH_DATA,E.FILL_FORM_WITH_AI),(0,a.map)((e=>e.payload)),(0,n.mergeMap)((e=>{const{context:s,contextData:r,options:n}=e,{propertyName:l="",classID:u=""}=n,d=(0,I.getSubmitData)(s,{skipUUID:!1});let f=[],h=[],g=!1;b.default.getFeatureMap().granularUIRefresh?(({fieldsWithDeclarativeTargets:f=[],whens:h=[]}=(0,T.getItemsToRecalculate)(s)),g=h.some((e=>e.type===R))):g=!0;const m=h.filter((e=>e.type===O)),E=p.default.getPropertyName(l),A=E?E.split("."):[],_=A.pop(),D=A.join("."),x=[];if(D){const e=C.getPropertyMetadata(D,u);if(e&&"copy"===e.dataRetrievalType){const e=p.default.getIn(d,`content.content.${D}`)||{};Object.keys(e).length>0&&Object.keys(e).filter((e=>e!==_)).forEach((t=>{delete e[t],x.push(`${D}`)}))}}e.serverPrecedenceFields=x;let P={...d.content,contextData:r};const M=(0,I.getParentContextChangeSet)(s);p.default.isEmpty(M)||(P=(0,I.mergeObjectsAndConcatArrays)(M,P));const w=((e,t)=>{const{caseWideAction:s,caseViewAction:r,fieldsWithDeclarativeTargets:a,fieldsWithWhen:n,isViewsWithWhen:o,interestPage:i,options:l}=e;let u={};const{optionalPayload:d}=l;d&&(t.content={...d});let p={...t},f=N.default.REFRESH;return r?(u=(0,c.resolveRestApi)(N.default.REFRESH_CASE_VIEW,e),p={...p,interestPage:i}):o&&s?u=(0,c.resolveRestApi)(N.default.REFRESH_CASE_DATA,e):o&&!s?u=(0,c.resolveRestApi)(N.default.REFRESH_ASSIGNMENT_DATA,e):(a.length>0||n.length>0)&&(p={...p,calculations:{fields:a,whens:n}},u=s?(0,c.resolveRestApi)(N.default.RECALCULATE_CASE_DATA,e):(0,c.resolveRestApi)(N.default.RECALCULATE_ASSIGNMENT_DATA,e),f=N.default.RECALCULATE),{restAPI:u,requestBody:p,requestType:f}})({...e,fieldsWithDeclarativeTargets:f,fieldsWithWhen:m,isViewsWithWhen:g},P);S.default.registerBlockingAction(s).catch((()=>{}));const{restAPI:j,requestBody:L,requestType:U}=w;(e={...e,requestType:U}).requestType=U;const{reqType:F,restApi:k}=j,V=t.value.data[s]?.caseInfo?.headers,G={reqHeaders:V,context:s,method:F,body:L,url:(0,T.appendQueryParamsForRefreshAPI)(e,k)};return(0,o.from)(((e,t)=>{const{context:s}=e;e.reqHeaders&&e.reqHeaders.etag&&(e.headers={"if-match":e.reqHeaders.etag});const r=(e=>{const{ID:t,actionID:s,context:r}=e;return`${t}.${r}.${s}`})(t);if((0,y.getActiveRequestCountPerContext)(r)>0&&v[r]){const t=[];v[r].forEach(((s,r)=>{s.url===e.url&&(t.push(r),s.cancelConfig.cancel())})),t.forEach((e=>{v[r].splice(e,1)}))}const a=(0,y.getCancelTokenSource)();return e.signal=a.token,e.cancelConfig=a,v[r]?v[r].push(e):v[r]=[e],(0,y.fetch)(e.url,e,s,{cancelContext:r}).then((e=>(delete v[r],e))).catch((e=>{throw e&&"ERR_CANCELED"!==e.code&&delete v[r],e}))})(G,e)).pipe((0,a.map)((t=>({response:{...t.data||{}},actionConfig:e,actionMgrID:e.options.actionMgrID,headers:(0,I.processHeaders)(t.headers)}))),(0,i.logAndCatchError)(": Error occurred during fetch call at refreshData Epic : ",e.context,e?.options?.actionMgrID))})),(0,n.mergeMap)((async e=>{if(e&&e.type===E.ERROR)return S.default.deRegisterBlockingAction(e.payload?.context).catch((()=>{})),(0,I.processDataToDispatchErrorAction)(e);const{actionConfig:t,response:s,actionMgrID:r}=e,{context:a,serverPrecedenceFields:n,requestType:o}=t,i=d.default.getTargetViewContainerName(E.ACTION_SHOWVIEW),c=(0,g.getResolvedTargetName)(i,a),p={acName:c,context:a},y=(0,h.getTranslatedDXAPIResponse)(s,{[l.publicConstants.STOPMERGEACTIONS]:!0,[l.publicConstants.ACTIONS.DELETEAVIALACTIONS]:!0});y.directUrlUpdation=!1,o===N.default.REFRESH&&await(0,I.processViewResponse)(y,t,p);const C={target:c,context:a},b=(0,I.getActionPayload)(y,C);b.preserveClientChanges=void 0===t.options.preserveClientChanges||t.options.preserveClientChanges;const T=f.default.getPropertiesToReplace(a),v=A.postProcess(A.mergeData,b,{serverPrecedenceFields:n,propertiesToReplace:T});return _.default.registerForServerChanges(),u.dispatch(v),m.ActionManagerInstance.resolveActionByID(r,b),_.default.unRegisterForServerChanges(),S.default.deRegisterBlockingAction(a).catch((()=>{})),[]})))]},"./src/refresh/refresh-manager.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/constants.ts"),a=s("./src/utils/utils.ts");class n{constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,t,s,r,a){void 0===e[t]&&(e[t]={}),e[t][s]=[{uniqueHash:r,callback:a}]}registerForRefresh(e,t,s,o,i){const c=o.split("/").join(r.default.HASH_DELIMITER),l=a.default.getHashedString(c);"PROP_CHANGE"===e?this.propChangeRefreshMap?.[i]?.[s]?this.propChangeRefreshMap[i][s].some((e=>e.uniqueHash===l))||this.propChangeRefreshMap[i][s].push({uniqueHash:l,callback:t}):n.initializeRefreshCache(this.propChangeRefreshMap,i,s,l,t):this.refreshMap?.[i]?.[`${e}-${s}`]?this.refreshMap[i][`${e}-${s}`].some((e=>e.uniqueHash===l))||this.refreshMap[i][`${e}-${s}`].push({uniqueHash:l,callback:t}):n.initializeRefreshCache(this.refreshMap,i,`${e}-${s}`,l,t)}triggerRefreshForType(e,t,s){"PROP_CHANGE"===e?this.propChangeRefreshMap?.[s]?.[t]&&this.propChangeRefreshMap[s][t].forEach((e=>e.callback())):this.refreshMap?.[s]?.[`${e}-${t}`]&&this.refreshMap[s][`${e}-${t}`].forEach((e=>e.callback()))}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}}const o=new n},"./src/refresh/refreshHelpers.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{appendQueryParamsForRefreshAPI:()=>b,checkDataSourceParamForDeclarativeTargets:()=>I,dispatchCaseViewRefresh:()=>m,dispatchRefreshData:()=>g,getItemsToRecalculate:()=>T,inspectComponentForRefreshTargets:()=>y,recordViewForRefresh:()=>E,refreshAssignment:()=>C,refreshOnPropertyChange:()=>S,refreshTargetViewsList:()=>f,removeViewsFromTargetList:()=>h,shouldViewRefresh:()=>A});var r=s("./src/constants.ts"),a=s("./src/store/state/state-manager.ts"),n=s("./src/rules/rules-store.ts"),o=s("./src/annotation/processor.ts"),i=s("./src/context/context-processor.ts"),c=s("./src/utils/case-utils.ts"),l=s("./src/actions/manager.ts"),u=s("./src/utils/utils.ts"),d=s("./src/contextree/treemanager.ts"),p=s("./src/refresh/action-creator.ts");const f={},h=e=>{e&&f[e]&&delete f[e]},g=(e,t,s,r,n)=>{if(!(e&&s&&t))return;const o=n.actionMgrID||l.ActionManagerInstance.getNextActionMgrId(),i={ID:e,actionID:t,context:s,caseWideAction:r,options:{...n,actionMgrID:o}};n.isFillFormWithAI?(0,a.dispatch)((0,p.fillFormWithAI)(i)):(0,a.dispatch)((0,p.refreshData)(i))},m=(e,t,s,r,n)=>{if(!(e&&s&&t))return;r&&(r=u.default.convertPageRefToClipboardPageNotation(r));const o={ID:e,viewID:t,context:s,options:n,caseViewAction:!0,interestPage:r};(0,a.dispatch)((0,p.refreshData)(o))},E=(e,t,s)=>{f[t]||(f[t]={}),e&&!f[t][e]&&(f[t][e]={pageReference:s})},A=e=>f[e]&&Object.keys(f[e]).length>0&&c.isPerform(e),_=(e,t)=>{const s={pageName:(a=t.substring(t.lastIndexOf(" ")+1)).substring(0,a.lastIndexOf(".")),propertyName:a.substring(a.lastIndexOf(".")+1)};var a;return!!n.getPropertyMetadata(s.propertyName,e.getValue(r.default.CLASS_ID,s.pageName))?.isDeclarativeTarget},I=(e,t)=>{let s=!1;if(Array.isArray(t)){const r=t=>{const r=t.value;return r.startsWith("@P")&&(s=_(e,r)),s};t.some(r)}else if("object"==typeof t)for(const r in t)if(t[r].startsWith("@P")&&(s=_(e,t[r]),s))break;return s},y=e=>{let t=!1;if(e.isWhenExist())t=!0;else{const s=e.getRawMetadata()?.config?.value;if(s){const a=n.getPropertyMetadata(o.default.getLeafPropertyName(s),i.default.resolveClassID(s,e.getPageReference(),e.getContextName()));t=!!a?.isDeclarativeTarget,!t&&a?.datasource?.parameters&&(t=I(e,a?.datasource?.parameters)),t||(t=a?.datasource?.tableType===r.default.DECISION)}}t&&E(e.getCurrentView(),e.getContextName(),e.getPageReference())},C=(e,t,s)=>{const a=c.isCaseWideAction(e,t),n=i.default.getPropertyValue(r.publicConstants.CASE_INFO.ACTIVE_ACTION_ID,t,e)?i.default.getPropertyValue(r.publicConstants.CASE_INFO.ACTIVE_ACTION_ID,t,e):i.default.getPropertyValue(r.publicConstants.CASE_INFO.ASSIGNMENTACTION_ID,t,e);let o;o=a?i.default.getPropertyValue(r.publicConstants.CASE_INFO.CASE_INFO_ID,t,e):i.default.getPropertyValue(r.publicConstants.CASE_INFO.ASSIGNMENT_ID,t,e)?i.default.getPropertyValue(r.publicConstants.CASE_INFO.ASSIGNMENT_ID,t,e):i.default.getPropertyValue(r.publicConstants.CONTEXT_DATA_ASSIGNMENTID,t,e),g(o,n,e,a,s)},S=e=>{const{context:t,pageReference:s}=e;if(A(t))if(i.default.getPropertyValue(r.default.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,s,t)){const e=i.default.getPropertyValue(r.publicConstants.CASE_INFO.CASE_INFO_ID,s,t),a=i.default.getPropertyValue(r.default.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,s,t),n=i.default.getPropertyValue(r.default.CONTEXT_DATA_MODAL_VIEW.INTERESTPAGE,s,t);m(e,a,t,n,{})}else C(t,s,{})},b=(e,t)=>{const{requestType:s}=e;return e?.options?.refreshFor&&"refresh"===s&&(t+=`?refreshFor=${e?.options?.refreshFor}`),e?.options?.isFillFormWithAI&&"refresh"===s&&(t+="?fillFormWithAI=true"),t},T=e=>{const t=(e=>{const t=[];return d.default.getDeclarativeTargets(e).forEach((({name:e,pageReference:s})=>{const r=s.split(".");r.shift();let a=r.join(".");e&&a&&(a=u.default.convertPageRefToClipboardPageNotation(a),t.push({name:e,context:a}))})),t})(e),s=(e=>{const t=[];return d.default.getWhens(e).forEach((({name:e,type:s,pageReference:r})=>{const a=r.split(".");a.shift();let n=a.join(".");e&&n&&(n=u.default.convertPageRefToClipboardPageNotation(n),t.push({name:e,context:n,type:s}))})),t})(e);return{fieldsWithDeclarativeTargets:t,whens:s}}},"./src/related-cases/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/rest-client/index.ts");const a={addRelatedCases:(e,t,s)=>{const a={caseID:e},n=JSON.stringify({cases:t});return(0,r.invokeRestApi)("addRelatedCases",{body:n,queryPayload:a},s)},removeRelatedCase:(e,t,s)=>{const a={caseID:e,relatedCaseID:t};return(0,r.invokeRestApi)("removeRelatedCase",{queryPayload:a},s)},getRelatedCases:(e,t)=>{const s={caseID:e};return(0,r.invokeRestApi)("getRelatedCases",{queryPayload:s},t).then((e=>e.data.relatedCases))}}},"./src/rest-client/case-apis.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/store/state/epics/util.ts"),a=s("./src/constants.ts"),n=s("./src/service_broker/header-processor.ts"),o=s("./src/environment-info/index.ts"),i=s("./src/utils/performance-utils.ts"),c=s("./src/rest-client/index.ts");const l=class{static createCase(e,t){const{caseInfo:s,startingFields:l,flowType:u,viewType:d=r.SCOPE_TYPES.PAGE,pageName:p,context:f=a.default.APP.APP,debugInfo:h,headers:g}=t;let m={};s&&s.content&&(m=s.content);const E={caseTypeID:e,content:{...m,...l},processID:u};let A={};return o.default.getPerformanceDashboardVisibility()&&(A=i.default.getActionInfo(a.default.TOP_ACTION_LABEL.CREATEWORK)),c.invokeRestApi("createWork",{body:E,queryPayload:{caseClassName:e,viewType:d,params:{pageName:p}},headers:{...g,...h&&{...n.default.addDebugHeaders(h)}}},f,A).then((t=>({response:t.data,requestPayload:E,headers:(0,r.processHeaders)(t.headers,e,g)})))}}},"./src/rest-client/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{doesRestApiExist:()=>p,getCancelTokenSource:()=>f,getCaseApi:()=>m,getHeaderProcessor:()=>l,invokeCustomRestApi:()=>d,invokeRestApi:()=>u,isRequestCanceled:()=>h,registerInterceptor:()=>g});var r=s("./src/service_broker/fetch.ts"),a=s("./src/service_broker/header-processor.ts"),n=s("./src/router/app-router.ts"),o=s("./src/router/route-parser.ts"),i=s("./src/services/index.ts"),c=s("./src/rest-client/case-apis.ts");const l=()=>({registerHeader:(...e)=>a.default.registerHeader(...e),unRegisterHeader:(...e)=>a.default.unRegisterHeader(...e),getRegisteredHeaders:()=>a.default.getRegisteredHeaders()}),u=(e,{body:t={},queryPayload:s={},cancelTokenSource:a,headers:o={},responseType:i},c,l)=>{const{restApi:u,reqType:d}=(0,n.resolveRestApi)(e,s),p={method:d,headers:o,body:t,...i&&{responseType:i}};return a&&(p.signal=a.token),(0,r.fetch)(u,p,c,l??{})},d=(e,{method:t="GET",body:s={},headers:a={},withoutDefaultHeaders:n=!1},o)=>{e.startsWith("http:")||e.startsWith("https:")||(e=i.default.getServerURL()+e);const c={method:t,headers:a,body:s,withoutDefaultHeaders:n};return(0,r.fetch)(e,c,o)},p=e=>o.default.doesRestApiExist(e),f=()=>(0,r.getCancelTokenSource)(),h=e=>(0,r.isFetchCanceled)(e),g=e=>{(0,r.setInterceptor)(e)},m=()=>c.default},"./src/router/app-router.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{addRoutes:()=>W,enableAppRouting:()=>S,getDefaultRoute:()=>$,getRestEndPoint:()=>N,getSemanticURL:()=>T,getViewRestEndPoint:()=>k,init:()=>H,initializeApplicationLabel:()=>q,isAppRoutingEnabled:()=>b,isSemanticURL:()=>F,isValidSemanticURL:()=>V,parseResponse:()=>w,publishForBrowserBookmark:()=>B,publishForBrowserHistory:()=>U,resolveRestApi:()=>v,resolveSemanticURL:()=>M,routeProcessor:()=>P,setDefaultRoute:()=>G,updateDocumentTitle:()=>Y});var r=s("./src/services/index.ts"),a=s("./src/store/state/actions/action-creators.ts"),n=s("./src/store/state/state-manager.ts"),o=s("./src/utils/context-utils.ts"),i=s("./src/utils/utils.ts"),c=s("./src/environment-info/index.ts"),l=s("./src/case/remote-case.ts"),u=s("./src/store/state/actions/index.ts"),d=s("./src/case/utils.ts"),p=s("./src/router/browser-router.ts"),f=s("./src/router/route-parser.ts"),h=s("./src/router/routing-manager.ts"),g=s("./src/router/helper.ts"),m=s("./src/router/utils.ts");const E="replace",A=["portal","noPortal","preview","debug","devtool"];let _="",I="Home",y="",C=!0;const S=e=>(C=e,C),b=()=>C,T=(e,t,s)=>f.default.getSemanticURL(e,t,s),N=(e,t)=>f.default.getRestEndPoint(e,t),v=(e,t)=>{let s=r.default.getServerURL();const a=N(e,t);return a?(a.restApi?.startsWith("/")||(a.restApi=`/${a.restApi}`),s?.endsWith("/")&&(s=s.substring(0,s.length-1)),a.restApi=s+a.restApi,a):{}},R=(e,t,s)=>{const{root:r,resources:a}=e,{views:n}=a,{config:o}=r;let c="";if(s)c=s;else{const e=n[o.name];let t=e;Array.isArray(e)&&e.length>0&&([t]=e),c=t.config.urlPath}const l=c.match(m.GlobalTOKEN);if(l){const e=i.default.getIn(t,o.context);c=c.replace(l[0],e.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:"add"}},O=(e,t,s)=>{let r,a;r=(0,m.trimURL)(t)?`${e}/${t}`:e;const n=(0,m.trimURL)(s.pxURLPath);n&&(r=`${r}/${n}`);try{a=new URL(r).searchParams,r=r.includes("?")?r.split("?")[0]:r}catch(e){return console.log("Invalid url",e),""}const o=r.split("/"),i=o[o.length-1],c=new URLSearchParams(p.getQueryParams());if(i.toLowerCase()!==I.toLowerCase()||c.has("noPortal")||(r=`${e}/${t}`),!f.default.isDefaultPortal()){const e=f.default.getPortalName();c.has("portal")?c.set("portal",e):c.append("portal",e)}return a=((e,t)=>{for(const[s,r]of t.entries())!e.has(s)&&A.includes(s)&&e.append(s,r);return e})(a,c),a.toString()&&(r+=`?${a.toString()}`),r},D=(e,{urlPathObjParam:t,infoParam:s,optionsParam:r},a=!1)=>{let n,o,i;if(!1===window.PCore.getBehaviorOverride("dynamicSemanticUrl"))return;if(a)n=t,o=s,i=r;else{const{uiResources:s,data:r}=e;({options:i}=e),n=t&&t.pxURLPath&&(0,m.isDynamicPattern)(t.pxURLPath)?R(s,r,t.pxURLPath):t||R(s,r),o=f.default.getEndPointInfo(n.pxURLPath),n.pxURLPath=o.urlPath}const c=O(_,f.default.getApplicationPath(),n),{title:l}=((e,t,s)=>{if(e=e&&""!==e?e:f.default.getApplicationName(),e=(0,m.capitalizeFirstLetter)(e),s===`${_}/${t}/`)return{title:e};const r=new URL(s).pathname.replace(`${t}/`,""),a=r.split("/");return(0,m.hasNumber)(r)?{title:`${e} - ${a[a.length-1]}`}:{title:`${e} - ${a[0]}`}})(y,f.default.getApplicationPath(),c),u=p.getStateForSemanticURL(o,{...i,title:l});"add"===n.historyAction?p.addToHistory(u,l,c):n.historyAction===E&&p.replaceHistory(u,l,c)},x=e=>{let t=null;e.directUrlUpdation&&(t={historyAction:"add",pxURLPath:""},t.pxURLPath=e.semanticURL),D(e,{urlPathObjParam:t,infoParam:null,optionsParam:null},!1)},P=e=>{x(e)},M=e=>{const t={pxURLPath:e};return O(_,f.default.getApplicationPath(),t)},w=e=>{const{uiResources:t}=e;b()&&(e.directUrlUpdation||(e=>{if(e&&e.root){const{root:t}=e,{resources:s}=e,{views:r}=s,a=t.config,n=a.type,o=a.name;if("VIEW"===n.toUpperCase()){const e=r[o];let t=e;Array.isArray(e)&&e.length>0&&([t]=e);const s=t.config;if(s.type){const e=s.type;return!(!s.urlPath||"PAGE"!==e.toUpperCase())}}return!1}return!1})(t))&&x(e)},j=e=>{const t={routeEndpoint:e.routeEndpoint,requestType:e.requestType,payload:e.payload,routeKey:e.routeKey,options:null};return e.options&&(t.options=e.options),t},L=(e,t,s)=>{const{caseClassName:r,workID:o}=e.payload,{containerName:i,context:c}=t,{RemoteClassGroup:p,RemoteSystemID:f,name:h}=l.default.getRemoteCase(r),g={...e,headers:{RemoteSystemID:f},className:r,isTraditionalRemoteCase:!0,action:u.OPENCASE,viewName:l.REMOTE_CASE_VIEW,gadgetId:d.default.getUniqueGadgetId(),context:s??c,skipSemanticUrl:!0,insKey:`${p} ${o}`,containerName:i,name:h};(0,n.dispatch)(a.showPage(g))},U=e=>{const t=p.getStateForBackForwardNav(e);t&&(l.default.isTraditionalRemoteCase(t.payload?.caseClassName)?L({...t},t.options):(0,n.dispatch)(a.showHistory(j(t))))},F=()=>f.default.getApplicationPath()!==p.getPathNameOfUrl(),k=(e,t)=>{let s={restApi:""};try{if(F()&&!t){const t=p.getPathNameOfUrl(),r=f.default.processUrl(t,!0),a=f.default._getMatchedRouteInRoutingTable(r)||"",n=f.default.getRoutingInfo(),o=f.default.processUrl(t,!1).split("/"),i=o[o.length-1];let{caseID:c}=n&&n.routes[a].payload;c=c.replace("{workID}",i),s=f.default.getRestEndPoint("loadView",{caseID:c,viewID:e})||{}}else s=f.default.getRestEndPoint("showView",{page:e,pageClass:t})||{}}catch(e){}return s},V=()=>{if(F()){const e=f.default.processUrl(p.getPathNameOfUrl(),!0);return!!f.default._getMatchedRouteInRoutingTable(e)}return!1},G=e=>{I=e},$=()=>I,B=e=>{const{acName:t,context:s,defaultViewLabel:r}=e,i=(e=>{const t=f.default.getRoutingInfo(),s=e.split(" ").join(""),r=e.split(" ").join("-").toLowerCase(),a=(0,m.convertToKebabCase)(e);return t?.routes[s]?s:t?.routes[r]?r:t?.routes[a]?a:e})(r);G(i),f.default.setDefaultRoute(i);const u=o.buildContextName(t,s),d=h.getResolvedTargetName(t,s),A="true"===c.default.getIsExtraCallRequiredForDefaultHome(),_={historyAction:E,pxURLPath:""};let y;const C={acName:d,context:u,actionConfig:{context:u}};if(A||!A&&F()){const t=(0,g.getSemanticURLWithRelatedQueryParams)(p.getPathNameWithQueryParams());y=f.default.getEndPointInfo(t),_.pxURLPath=y.urlPath,void 0!==y.payload?.pageClass&&(y.payload.pageClass=(0,n.getStore)()?.getState()?.data?.app?.pyPortal?.classID);const s="showHistory",r={routeEndpoint:y.routeEndpoint,requestType:y.requestType,payload:y.payload,options:C,routeKey:y.routeKey};l.default.isTraditionalRemoteCase(y?.payload?.caseClassName)?L(r,e,C.context):(0,n.dispatch)(a[s](j(r)))}else y=f.default.getEndPointInfo(I),_.pxURLPath="";D(null,{urlPathObjParam:_,infoParam:y,optionsParam:C},!0)},H=(e,t=!1)=>{_=e.domain,!1===t&&b()&&(p.addEventListenerForHistory(U),p.addEventListenerForRefresh()),f.default.init(e,I)},W=e=>{f.default.addRoutes(e)},q=e=>{e&&(y=e.pyLabel)},Y=e=>{p.updateDocumentTitle(e)}},"./src/router/browser-router.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{addEventListenerForHistory:()=>l,addEventListenerForRefresh:()=>u,addToHistory:()=>o,getFullUrl:()=>f,getPathNameOfUrl:()=>d,getPathNameWithQueryParams:()=>p,getQueryParams:()=>h,getStateForBackForwardNav:()=>c,getStateForSemanticURL:()=>n,replaceHistory:()=>i,sendMessageToConsole:()=>g,updateDocumentTitle:()=>a});var r=s("./src/router/utils.ts");const a=e=>{window.document.title=e},n=(e,t)=>(void 0!==e&&(e.options=t),{stateObj:e}),o=(e,t,s)=>{try{window.history.pushState(e,t,s),window.scrollTo(0,0)}catch(e){throw new Error("Error- Unable to Add to Browser History")}},i=(e,t,s)=>{try{window.history.replaceState(e,t,s)}catch(e){throw new Error("Error- Unable to Replace Browser History")}},c=e=>e.state?e.state.stateObj:null,l=e=>{window.addEventListener("popstate",(t=>e(t)))},u=()=>{window.onbeforeunload=()=>null},d=()=>(0,r.trimURL)(window.location.pathname),p=()=>(0,r.trimURL)(window.location.pathname+window.location.search),f=()=>window.location.href,h=()=>window.location.search,g=(e,t,s)=>{switch(s){case"warning":t?console.warn(e,t):console.warn(e);break;case"error":t?console.error(e,t):console.error(e);break;default:t?console.log(e,t):console.error(e)}}},"./src/router/helper.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{getSemanticURLWithRelatedQueryParams:()=>r});const r=e=>{if(e.indexOf("?")>0){const[t,s]=e.split("?"),r=new URLSearchParams(s),a=new Map;for(const[e,t]of r)"portal"!==e&&"noPortal"!==e&&"debug"!==e&&a.set(e,t);const n=new URLSearchParams(a).toString();return n?`${t}?${n}`:t}return e}},"./src/router/route-parser.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var r=s("./src/case/remote-case.ts"),a=s("./src/utils/utils.ts"),n=s("./src/container/container-utils.ts"),o=s("./src/case/common-helper.ts"),i=s("./src/constants.ts"),c=s("./src/environment-info/index.ts"),l=s("./src/router/utils.ts"),u=s("./src/router/browser-router.ts"),d=s("./src/router/app-router.ts");const p=new class{constructor(){this.staticRoutesList=[],this.dynamicRoutesList=[],this.reqContextName="",this.defaultViewUrlPath="",this.portalName=""}init=(e,t)=>{e&&e.routes&&e.routesMeta?(this.routingInfo=e,this.appRoutes=e.routes,this.appRoutesMeta=e.routesMeta,this.reqContextName=e.reqContextName,this.reqServletPath=e.reqServletPath,this.appName=e.appName,this.appAlias=e.appAlias,this.orgName=e.orgName,this.defaultViewUrlPath=t,this._createStaticDynamicRoutesList(this.appRoutes),this.appDelimeter=e.appDelimeter,this.reqServletNameReal=e.pxReqServletNameReal,this.bDefaultPortal=e.isDefaultPortal,this.portalName=e.portalName,this.ignoreFromEndPoint=["reactMode=dev","reactMode=prod"]):console.error("Routing info is not appropriate. Missing routes and routesMeta objects in routingInfo",JSON.stringify(e))};addRoutes=e=>{e?.routes&&e.routesMeta&&(this.appRoutes={...this.appRoutes,...e.routes},this.appRoutesMeta={...this.appRoutesMeta,...e.routesMeta},this.routingInfo&&(this.routingInfo.routes={...this.routingInfo.routes,...e.routes},this.routingInfo.routesMeta={...this.routingInfo.routesMeta,...e.routesMeta}),this._createStaticDynamicRoutesList(e.routes))};setDefaultRoute=e=>{this.defaultViewUrlPath=e};_createStaticDynamicRoutesList=e=>{Object.keys(e).forEach((e=>{(0,l.isDynamicPattern)(e)?this.dynamicRoutesList?.push(e):this.staticRoutesList?.push(e)}))};_getDynamicKeyName=e=>{const t=e.indexOf("{")+1,s=e.lastIndexOf("}");return e.slice(t,s)};isDefaultPortal=()=>"false"!=`${this.bDefaultPortal}`;getPortalName=()=>this.portalName;getApplicationPath=()=>(0,l.trimURL)(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>(0,l.trimURL)(this.reqContextName);getRoutingInfo=()=>this.routingInfo;processUrl=(e,t)=>{t&&(e=e.toLowerCase()),e&&(e=decodeURIComponent(e));const s=new RegExp(this.getApplicationPath(),"i");return e=e.replace(s,""),(0,l.trimURL)(e)};getEndPointInfo=e=>{this.ignoreFromEndPoint?.forEach((t=>{e.includes(t)&&(e=e.substring(0,e.indexOf(t)))}));let t=this.processUrl(e,!0),s=this._getMatchedRouteInRoutingTable(t);void 0===s&&(t=this.processUrl(this.defaultViewUrlPath,!0),s=this._getMatchedRouteInRoutingTable(t)||"");const{routeKey:a,payload:n}=this.appRoutes[s],{reqType:o,endPoint:i,params:c}=this.appRoutesMeta?.[a].restApi||{},l={...n},{caseClassName:u,caseID:d}=l;if(r.default.isRemoteCase(u)){const{RemoteClassGroup:e,RemoteSystemID:t}=r.default.getRemoteCase(u);l.caseID=d?.replace(u,e?.toUpperCase()),l.RemoteSystemID=t}const p={routeKey:a,requestType:o,routeEndpoint:i,payload:{...c,...l}};return this._resolveRoute(p,this.processUrl(e,!1),s)};getSemanticURL(e,t,s){return this.buildSemanticURL(e,t,s)}getResolvedSemanticURL(e,t,s={}){const r=this.getSemanticURL(e,t,s);let a=r;(0,l.isDynamicPattern)(r)&&r.match(l.GlobalTOKEN)?.forEach((e=>{const t=this._getDynamicKeyName(e);s[t]&&(a=a.replace(e,s[t]))}));const n=(0,d.resolveSemanticURL)(a),o=new URL(n);return this.isDefaultPortal()||this.getPortalName()&&!(0,l.isPortalParamExists)(o.searchParams)&&o.searchParams.append("portal",this.getPortalName()),o.toString()}updateSemanticURLAndDocumentTitle(e){const{key:t,actionName:s,caseClassName:r,isRemoteCase:a}=e;if(a&&!r)return;const l=this.getSemanticURL(s,{caseClassName:r}).replace(/{.+?}/,String((0,o.getDisplayCaseID)(t))),u=`${i.publicConstants.APP.APP}${i.default.FORWARD_SLASH_STRING}${i.publicConstants.PRIMARY}`,p={semanticURL:l,directUrlUpdation:!0,options:{acName:u,context:(0,n.getActiveContainerItemContext)(u)}};(0,d.routeProcessor)(p);const f=r.substring(r.lastIndexOf("-")+1),h=t.substring(t.lastIndexOf(" ")+1),g=c.default.environmentInfoObject?.pxApplication?.pyLabel,m=`${f} (${h}) - ${g}`;(0,d.updateDocumentTitle)(m)}buildSemanticURL(e,t,s){const{urlPattern:r}=this.appRoutesMeta?.[e]||{},n=r?.split("/").length,o=r?.split("/"),i=Object.keys(this.appRoutes).filter((e=>n===e.split("/").length)).filter((e=>{const t=e.split("?")[0].split("/");return o?.every(((e,s)=>e.startsWith("{")||e===t[s]))}));if(1===i.length)return this._getQueryParamsResolvedURL(i[0],s);if(0===Object.keys(t).length)return"";const c=i.find((e=>{const r=this.appRoutes[e].payload,n={...s};delete n.dataViewName,delete n.dataContext;const o=r.dataViewKeys||r.dataContextParameters||{},i=Object.keys(t).every((e=>t[e]===r[e]));return!!i&&(a.default.isEmpty(o)||a.default.isEmpty(n)?i:Object.keys(n).every((e=>Object.prototype.hasOwnProperty.call(o,e))))}));return c?this._getQueryParamsResolvedURL(c,s):""}_getQueryParamsResolvedURL(e,t,s=!1){const[r,a]=e.includes("?")?e.split("?"):[e];if(a){const e={};for(const[s,r]of Object.entries(t))e[s.toLowerCase()]=r;const n=new URLSearchParams(a),o={};for(const[r,a]of n.entries())if("string"==typeof a&&(0,l.isDynamicPattern)(a)){const n=this._getDynamicKeyName(a);o[r]=s?t[n]||e[n.toLowerCase()]:t[n]}else"string"==typeof a&&(o[r]=a);return`${r}?${new URLSearchParams(o).toString()}`}return r}_getQueryParamsObject(e){const t={},s=new URLSearchParams(e);for(const[e,r]of s.entries())t[e]=r;return t}getRestEndPoint(e,t){try{return this._buildRestApi(e,t)}catch(e){return console.error(e),null}}_buildRestApi(e,t){if(e&&this.appRoutesMeta?.[e]){const{reqType:s,body:r}=this.appRoutesMeta[e].restApi;let{endPoint:a}=this.appRoutesMeta[e].restApi;t?.params&&t.params.pageName&&(a=`${a}&pageName=${t.params.pageName}`);const n=a.match(l.GlobalTOKEN);if(n)for(let e=0;e<n.length;e+=1){const s=n[e].replace("{","").replace("}",""),r=new RegExp(n[e],"g");a=a.replace(r,t?.[s])}if(r){let e={};return Object.keys(r).forEach((s=>{this._isSpecialInstruction(s)&&(e={...e,...this._processInstruction(s,r[s],t)})})),{restApi:a,reqType:s,body:e}}return{restApi:a,reqType:s}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,t,s){const r={};return"@COPY"===e&&t.forEach((e=>{r[e]=s[e]})),r}doesRestApiExist(e){return!(!this.appRoutesMeta||!this.appRoutesMeta[e])}_resolveRoute=(e,t,s)=>{const r=[],[a,n]=t.includes("?")?t.split("?"):[t],[o,i]=s.includes("?")?s.split("?"):[s],c=a.split("/"),u=o.split("/"),d={};for(let e=0;e<u.length;e+=1)r[e]=u[e],(0,l.isDynamicPattern)(u[e])&&(d[this._getDynamicKeyName(u[e])]=c[e],r[e]=c[e]);const p=this._getQueryParamsObject(i),f=this._getQueryParamsObject(n),h={};for(const[e,t]of Object.entries(f))h[e.toLowerCase()]=t;for(const e in p)(0,l.isDynamicPattern)(p[e])?d[e]=f[e]||h[e.toLowerCase()]:d[e]=p[e];let g;n&&(g=this._getQueryParamsResolvedURL(s,f,!0));const m=this._resolvePayload(e,d,s);return{...this._resolveRouteEndPoint(m,s),urlPath:g||r.join("/")}};_resolveRouteEndPoint=(e,t)=>{let{routeEndpoint:s}=e;if(!(0,l.isDynamicPattern)(s))return e;const r={};if(r[t]=e,void 0!==e.payload){const t=s.match(l.GlobalTOKEN);for(let a=0;a<t.length;a+=1){const n=t[a],o=this._getDynamicKeyName(n);if(void 0!==e.payload[o]){const t=e.payload[o];s=s.replace(n,t)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${o}} in routeEndpoint- ${o} is missing in payload`,r)}}else this._sendWarningAndErrorMessages("Unable to resolve dynamic token(s) in routeEndpoint- payload is missing in routing table for-",r);return{...e,routeEndpoint:s}};_resolvePayload=(e,t,s)=>{if(void 0===e.payload)return e;const r={...e.payload,...this._resolvePayloadRecursive(e.payload,t)};return{...e,payload:r}};_resolvePayloadRecursive(e,t){const s={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let a=e[r];if("string"==typeof a&&(0,l.isDynamicPattern)(a)){const e=a.match(l.GlobalTOKEN);for(let s=0;s<e.length;s+=1){const r=e[s],n=this._getDynamicKeyName(r);if(void 0!==t[n]){const e=t[n];a=a.replace(r,e)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${n}} in payload- {${n}} is missing in semantic url construct`)}s[r]=a}else"object"==typeof a&&(s[r]=this._resolvePayloadRecursive(a,t))}return s}_getMatchedRouteInRoutingTable=e=>{let t=this._findMatchedRouteInStaticList(e);return void 0!==t?t:(t=this._findMatchedRouteInDynamicList(e),void 0!==t?t:void 0)};_findMatchedRouteInStaticList=e=>this.staticRoutesList?.find((t=>t.toLowerCase()===e.toLowerCase()));_findMatchedRouteInDynamicList=e=>{const[t,s]=e.includes("?")?e.split("?"):[e],r=t.split("/");return this.dynamicRoutesList?.find((e=>{const[t,a]=e.includes("?")?e.split("?"):[e],n=t.split("/");if(n.length!==r.length)return!1;let o=0;for(o=0;o<n.length;o+=1){const e=n[o].toLowerCase();if(!(0,l.isDynamicPattern)(e)&&e!==r[o]&&(0,l.getPlural)(e)!==r[o])return!1}if(a){const e=new URLSearchParams(s.toLowerCase()),t=new URLSearchParams(a.toLowerCase()),r=new Set,n=new Set,o=/\{[a-zA-Z]+\}/;for(const t of e.keys())r.add(t);for(const e of t.keys())n.add(e);if(n.size!==r.size)return!1;for(const s of r){if(!n.has(s))return!1;const r=t.get(s);if(e.get(s)!==r&&!o.test(r))return!1}}return!0}))};_sendWarningAndErrorMessages=(e,t)=>{(0,u.sendMessageToConsole)(e,t,"warning"),(0,u.sendMessageToConsole)("Error in Generated Routing Table",null,"error"),(0,u.sendMessageToConsole)("Back | Forward for this page may NOT work as intended",null,"warning"),(0,u.sendMessageToConsole)("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}}},"./src/router/routing-manager.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{getResolvedTargetName:()=>c,getRoutingInfo:()=>l,getSemanticURLFromRoutingInfo:()=>u});var r=s("./src/container/container-utils.ts"),a=s("./src/utils/context-utils.ts"),n=s("./src/constants.ts"),o=s("./src/store/state/actions/index.ts"),i=s("./src/router/route-parser.ts");const c=(e,t)=>{if(!e||!t)return null;let s,o=n.default.EMPTY_STRING;return t&&(o=`${t}${n.default.FORWARD_SLASH_STRING}${e}`,s=(0,r.getContainerData)(o),s||t.includes("/")?s||(o=c(e,(0,a.getParentContextName)(t))):o=`${t}${n.default.FORWARD_SLASH_STRING}${e}`),o},l=(e,t)=>{const s=c(e,t);return s&&(0,r.getContainerData)(s)?(0,r.getContainerData)(s):{}},u=(e,t)=>i.default.getSemanticURL(o.ACTION_SHOWVIEW,{page:e},t)},"./src/router/routing-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/router/app-router.ts");const a=new class{addRoutes=e=>(0,r.addRoutes)(e)}},"./src/router/semanticurl-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./src/store/state/actions/index.ts"),a=s("./src/router/route-parser.ts");const n={getResolvedSemanticURL:(e,t,s)=>a.default.getResolvedSemanticURL(e,t,s),getActions:()=>({ACTION_OPENWORKBYHANDLE:r.ACTION_OPENWORKBYHANDLE,ACTION_SHOWDATA:r.ACTION_SHOWDATA,ACTION_SHOWVIEW:r.ACTION_SHOWVIEW}),updateSemanticURLAndDocumentTitle:e=>a.default.updateSemanticURLAndDocumentTitle(e)}},"./src/router/utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{GlobalTOKEN:()=>a,TOKEN:()=>r,capitalizeFirstLetter:()=>l,convertToKebabCase:()=>d,getPlural:()=>i,hasNumber:()=>c,isDynamicPattern:()=>n,isPortalParamExists:()=>u,trimURL:()=>o});const r=/{(.*?)}/i,a=/{(.*?)}/g,n=e=>null!==e.match(r),o=e=>(e&&(e.startsWith("/")&&(e=e.substring(1,e.length)),e.endsWith("/")&&(e=e.substring(0,e.length-1))),e),i=e=>{const t=e[e.length-1],s=e[e.length-2];if("y"!==t.toLowerCase())return`${e}s`;switch(s.toLowerCase()){case"a":case"e":case"i":case"o":case"u":return`${e}s`;default:return`${e=e.substring(0,e.length-1)}ies`}},c=e=>/\d/.test(e),l=e=>{let t=e.split(" ");return t=t.map((e=>e.charAt(0).toUpperCase()+e.slice(1))),t.join(" ")},u=e=>e.toString().includes("portal="),d=e=>{const t=e.replace(/(?=[A-Z][a-z])/g,"-").toLowerCase();return t.startsWith("-")?t.substring(1):t}},"./src/rules/rules-store.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{getAdditionalInfo:()=>k,getDataPageKeys:()=>L,getDataPageMetadata:()=>R,getEmbeddedPropertyMetadata:()=>y,getFieldParameters:()=>P,getFieldsByClassName:()=>x,getGenAICoach:()=>w,getInsight:()=>D,getLookUpDataPage:()=>U,getLookUpDataPageInfo:()=>F,getParagraph:()=>M,getPersonalizationMetadata:()=>O,getPropertyMetadata:()=>I,getResolvedFieldMetadata:()=>V,getSavableDataPage:()=>j,isViewExists:()=>N,mergeStore:()=>_,resolveNavigation:()=>v,resolveView:()=>T,updateNavigationStore:()=>S,updateStores:()=>b,updateViewStore:()=>C});var r=s("./src/utils/utils.ts"),a=s("./src/constants.ts"),n=s("./src/locale/locale-utils.ts"),o=s("./src/dynamic-content/util.ts"),i=s("./src/interpreter/c11n-env.ts"),c=s("./src/annotation/processor.ts");s("./src/annotation/handlers/index.ts");const l={},u={},d={},p={},f={},h={},g={},m={},E={},A={},_=(e={},t={})=>{0!==Object.keys(t).length?Object.keys(e).forEach((s=>{const r=e[s],a=t[s];if(a){const e=Array.isArray(a)?a:[a];(Array.isArray(r)?r:[r]).forEach((t=>{const s=e.findIndex((e=>e.classID===t.classID));if(-1===s)e.push(t);else{const r={isDeclarativeTarget:!1},a={...e[s],...r,...t};e[s]=a}})),t[s]=1===e.length?e[0]:e}else t[s]=r})):r.default.copy(e,t)},I=(e,t="")=>{if(!e)return null;const s=p[e];if(!s)return null;if(!t)return Array.isArray(s)?[...s]:s;let r;return r=Array.isArray(s)?s.find((e=>e.classID.toLowerCase()===t.toLowerCase()))||null:s.classID.toLowerCase()===t.toLowerCase()||("Page"===s.type||"Page List"===s.type)&&s?.pageClass?.toLowerCase()===t.toLowerCase()?s:null,r},y=(e,t,s,r=[])=>{if(!t||!e)return null;if(!e.includes(".")){let a;const n=I(e,t);return r.length&&(a=r.join(".")),{...n,embeddedType:s,category:a}}const[a,...n]=e.split("."),o=I(a,t);return o&&r.push(o.label),y(n.join("."),o?.pageClass,o?.type,r)},C=e=>{_(e,u)},S=e=>{_(e,d)},b=e=>{if(e.views&&_(e.views,u),e.navigations&&_(e.navigations,d),e.personalizations&&_(e.personalizations,h),e.insights&&_(e.insights,g),e.paragraphs&&_(e.paragraphs,l),e.dataTypes&&_(e.dataTypes,m),e.datapages&&_(e.datapages,E),e.genAICoaches&&_(e.genAICoaches,A),e.fields){Object.keys(e.fields).forEach((t=>{const s=e.fields[t];if(Array.isArray(s)){if(e.datapages&&s.forEach((t=>{t.datasource&&"DataPage"===t.datasource.tableType&&(t.datasource.mode=e.datapages[t.datasource.name].mode)})),1===s.length){const[r]=s;e.fields[t]=r}}else e.datapages&&s.datasource&&"DataPage"===s.datasource.tableType&&(s.datasource.mode=e.datapages[s.datasource.name].mode)}));const{datapages:t={}}=e;Object.keys(t).forEach((e=>{f[e]=t[e]}))}_(e.fields,p)},T=e=>u[e],N=(e,t)=>{const s=u[e];return Array.isArray(s)?s.some((e=>e.classID===t)):s?.classID===t},v=e=>d[e],R=e=>e in f?f[e]:null,O=e=>e in h?h[e]:null,D=e=>e in g?g[e]:null,x=e=>{const t={};return Object.keys(p).forEach((s=>{const a=p[s];let n;Array.isArray(a)?n=a.find((t=>e===t.classID)):e===a.classID&&(n=a),n&&(t[s]=r.default.deepClone(n))})),t},P=(e,t)=>{const s=I(e,t)?.datasource?.parameters;return s?r.default.deepClone(s):null},M=(e,t)=>{let s=null;const a=l[e];return a&&(Array.isArray(a)?s=a.find((e=>e.classID===t)):a.classID===t&&(s=a)),s?r.default.deepClone(s).content:null},w=(e,t)=>{let s=null;const a=A[e];return a&&(Array.isArray(a)?s=a.find((e=>e.classID===t)):a.classID===t&&(s=a)),s?r.default.deepClone(s):null},j=e=>{if(e in m){const{savableDataPage:t}=m[e];return t}return null},L=e=>{const t=E[e];if(!t)return null;const{classID:s,isAlternateKeyStorage:r,parameters:a}=t;if(r)return a.map((e=>({keyName:e.name,isAlternateKeyStorage:r,linkedField:e.linkedField})));const n=m[s];return n?n.classKeys.map((e=>({keyName:e,isAlternateKeyStorage:r}))):[]},U=e=>{if(e in m){const{lookupDataPage:t}=m[e];return t}return null},F=e=>{if(Object.prototype.hasOwnProperty.call(m,e)){const{lookupDataPageInfo:t}=m[e];return t}return null},k=(e,t)=>{const s=e.split("."),r=s.pop(),l=new i.C11nEnv({options:{pageReference:`${s.join(".")}`,context:t}}),u=I(r,l.getCurrentClassID())?.additionalInformation;if(!u?.includes("@PARAGRAPH"))return u;const d=c.default.trimAnnotation(u),p=l.getCurrentClassID(),f=l.getLocaleRuleNameFromKeys(p,a.default.PARAGRAPH,d),h=n.localeUtils.getParagraphLocaleValue(f,p,d);return h?o.default.getParagraphStream(h,l):null},V=(e,t)=>{const s=e.split("."),r=s.pop(),a=new i.C11nEnv({options:{pageReference:`${s.join(".")}`,context:t}}),n=I(r,a.getCurrentClassID()),o={};return a._classID=a.getCurrentClassID(),a.resolveConfigProps(n,o),o}},"./src/runtime-params/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=new class{constructor(){this.runtimeParams={},this.runtimeParamsMap={}}setRuntimeParams(e){this.runtimeParams=e}getRuntimeParams(){return this.runtimeParams}setRuntimeParam(e,t){this.runtimeParamsMap[e]=t}getRuntimeParam(e){return this.runtimeParamsMap[e]}}},"./src/service_broker/embed/auth.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/service_broker/fetch.ts"),a=s("./src/router/route-parser.ts");class n{constructor(e,t=!0){this.config=e,t?(this.ssKeyConfig=e,this.reloadConfig()):this.updateConfig(e,!1)}static init(e,t=!0){return new n(e,t)}updateConfig(e,t=!0){t?window.sessionStorage.setItem(this.ssKeyConfig,JSON.stringify(this.config)):(0,r.updateAuthConfig)(e)}reloadConfig(e=!0){if(e){const e=window.sessionStorage.getItem(this.ssKeyConfig);this.config=e?JSON.parse(e):null}else this.config=(0,r.getAuthConfig)()}async buildAuthorizeUrl(e){e=e||window.btoa(location.origin);let{sessionIndex:t}=this.config;const{password:s}=this.config,r=this.config.clientId?this.config.clientId:this.config.client_id,n=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,o=this.config.authorizeUri?this.config.authorizeUri:this.config.endPoints.authorize,i=this.config.authService?this.config.authService:this.config.authentication_service||"pega",c=this.config.appAlias?this.config.appAlias:a.default.getApplicationAlias(),l=this.config.userIdentifier?this.config.userIdentifier:this.config.user_identifier;t=t||this.config.tokenInfo.session_index;const u=t?`&session_index=${t}`:`${l}`?`&UserIdentifier=${l}`:`${s}`?`&Password=${window.atob(s)}`:"",d=new Uint8Array(64);window.crypto?.getRandomValues(d),this.config.codeVerifier=this.base64UrlSafeEncode(d),this.updateConfig(this.config,!1);const p=c?`+app.alias.${c.replace(/^app\//,"")}`:"";return this.getCodeChallenge(this.config.codeVerifier)?.then((t=>`${o}?client_id=${r}&response_type=code&redirect_uri=${n}&scope=openid${p}&state=${e}&code_challenge=${t}&code_challenge_method=S256&authentication_service=${i}&enable_psyncId=true${u}`))?.catch((()=>null))}getTokenAndFinish=e=>{window.removeEventListener("message",this.authMessageHandler,!1),this.getToken(e,!1).then((()=>{})).catch((e=>{console.log(e)}))};authMessageHandler=e=>{if(e.origin!==this.getRedirectUriOrigin())return;if(!e.data||!e.data.type||"PegaAuth"!==e.data.type)return;const t=e.data.code.toString();this.getTokenAndFinish(t)};getRedirectUriOrigin=()=>{let{redirectUri:e}=this.config;e=e||this.config.redirect_uri;const t=e.indexOf("//"),s=-1!==t?e.indexOf("/",t+2):-1;return-1!==s?e.substring(0,s):e};getToken(e,t){this.reloadConfig(t);const s=this.config.clientId?this.config.clientId:this.config.client_id,a=this.config.clientSecret?this.config.clientSecret:this.config.client_secret,n=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,o=this.config.tokenUri?this.config.tokenUri:this.config.endPoints.token,{codeVerifier:i}=this.config,c=window.location.search,l=new URLSearchParams(c),u=e||l.get("code"),d=new URLSearchParams;return d.append("client_id",s),a&&d.append("client_secret",a),d.append("grant_type","authorization_code"),d.append("code",u),d.append("redirect_uri",n),d.append("code_verifier",i),this.config?.secureCookie&&d.append("send_token_as_cookie","true"),(0,r.fetch)(o,{method:"POST",headers:new Headers({"content-type":"application/x-www-form-urlencoded"}),body:d.toString()}).then((e=>e.data)).then((e=>{e.eA=Date.now()+1e3*e.expires_in;let s=!1;if(this.config.codeVerifier&&(delete this.config.codeVerifier,s=!0),e.session_index&&(this.config.session_index=e.session_index,s=!0),s){this.updateConfig(this.config,t),this.config?.secureCookie?(0,r.updateHeaders)({pzCTkn:e?.csrf}):((0,r.updateAuthInfo)({tokenInfo:e}),(0,r.updateHeaders)({Authorization:`${e?.token_type} ${e?.access_token}`}));const{onTokenRetrieval:s}=this.config;s&&"function"==typeof s&&s(e),window.postMessage("oAuthSuccess")}return e})).catch((()=>null))}sha256Hash(e){return window.crypto?.subtle?.digest("SHA-256",(new TextEncoder).encode(e))}encode64(e){return window.btoa(new Uint8Array(e).reduce(((e,t)=>e+String.fromCharCode(t)),""))}base64UrlSafeEncode(e){return this.encode64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}getCodeChallenge(e){return this.sha256Hash(e)?.then((e=>this.base64UrlSafeEncode(e))).catch((e=>{console.log(e)})).finally((()=>null))}}const o=n},"./src/service_broker/fetch-errorHandler.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/messages/index.ts"),a=s("./src/utils/pubsub-utils.ts"),n=s("./src/constants.ts"),o=s("./src/service_broker/webtoken-service.ts"),i=s("./src/service_broker/fetch.ts"),c=s("./src/service_broker/utils.ts");const l=(e,t,s,l)=>{if(e.config&&(0,c.isUpdateSessionRequest)(e.config.url,s))return Promise.reject(e);if(e.response&&e.response.status&&401===e.response.status&&!t.getUpdateSessionStatus()){if(a.default.unsubscribeAllWithEventType(i.UPDATE_SESSION),t.setUpdateSessionStatus(!0),"custom"===s?.authType){a.default.publish(n.publicConstants.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);const{url:s,config:r,context:o}=(0,c.extractConfigFromError)(e);return(0,i.waitForUpdateSession)(s,r,o,t)}return(0,o.reissueWebToken)(e,t,s)}if(e.response&&e.response.status&&401===e.response.status&&t.getUpdateSessionStatus()){const{url:t,config:s,context:r}=(0,c.extractConfigFromError)(e);return(0,i.fetch)(t,s,r)}if(e.response&&e.response.status&&422!==e.response.status&&424!==e.response.status&&e.config.headers.context&&e.response.data&&!l){const t=e.response.data.errorDetails&&e.response.data.errorDetails.map((t=>((e,t)=>t[n.publicConstants.TRACE_ID]?{type:"error",message:e.localizedValue||e.message,correlationID:t[n.publicConstants.TRACE_ID]}:{type:"error",message:e.localizedValue||e.message})(t,e.response.headers)));let s=e.config.headers.context;return s&&s.includes("/workarea")&&!s.includes("/modal")&&(s=s.substring(0,s.lastIndexOf("/workarea"))),(0,r.addMessages)({messages:t,category:"HTTP",context:s}),Promise.reject(e)}return Promise.reject(e)}},"./src/service_broker/fetch.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{UPDATE_SESSION:()=>A,fetch:()=>v,getActiveRequestCountPerContext:()=>D,getAuthConfig:()=>L,getAuthInfo:()=>U,getCancelTokenSource:()=>x,isFetchCanceled:()=>P,newTimeout:()=>y,resetFetchStatus:()=>F,setInterceptor:()=>N,updateAuthConfig:()=>j,updateAuthInfo:()=>w,updateHeaders:()=>M,waitForUpdateSession:()=>R});var r=s("./node_modules/axios/lib/axios.js"),a=s("./node_modules/rxjs/dist/esm5/internal/lastValueFrom.js"),n=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/tap.js"),i=s("./src/messages/index.ts"),c=s("./src/utils/pubsub-utils.ts"),l=s("./src/constants.ts"),u=s("./src/performance-manager/index.ts"),d=s("./src/environment-info/index.ts"),p=s("./src/router/route-parser.ts"),f=s("./src/service_broker/fetch-errorHandler.ts"),h=s("./src/service_broker/fetchStatus.ts"),g=s("./src/service_broker/utils.ts"),m=s("./src/service_broker/header-processor.ts"),E=s("./src/service_broker/inactivityTimeout.ts");const A="updateSession",_={},I=new h.default,y=new E.default;let C={},S={},b={},T="";const N=e=>{C=e},v=(e,t,s="root",i={})=>{const{doNotMergeHttpMessagesForStatusCode:f=null,cancelContext:h=s,includeRemoteSystemIdIfPresent:E=!0,actionLabel:A="",assignmentID:C=""}=i;let{topLevelAction:b=!1}=i;const N=b;b||(b=t.topLevelAction||!1),T=f,null===e&&window.console.error("Error: url passed to Service Broker fetch is null (or) undefined");const{body:v,signal:O,withoutDefaultHeaders:D=!1,...x}=t;let P={};d.default.getPerformanceDashboardVisibility()&&(P={assignmentID:C,...u.default.buildActionsList({url:e,topLevelAction:b,userAction:N,actionLabel:A,context:s})});const{Authorization:M,pzCTkn:w,...j}=t.headers||{};D||m.default.injectCoreAdditionalHeaders(j,t.body,s,{includeRemoteSystemIdIfPresent:E}),h&&_[h]>=0?_[h]+=1:h&&void 0===_[h]&&(_[h]=1);let L=D?{...j}:{...m.default.getDefaultHeaders(),...m.default.getRegisteredHeaders(),...j,context:s};if(e&&(0,g.isUpdateSessionRequest)(e,S)&&I.getUpdateSessionStatus()||!I.getUpdateSessionStatus()){(0,g.isUpdateSessionRequest)(e,S)&&"OAuth2.0"===S?.authType&&(L={...j});const{restApi:t}=p.default.doesRestApiExist("Logout")&&p.default.getRestEndPoint("Logout")||{restApi:null};return(!t||e&&!e.endsWith(t))&&y.setTimerID(y.resetInactiveTimeout(y.getTimerID())),(0,a.lastValueFrom)((0,n.from)((0,r.default)({context:s,...x,url:e,data:v,...O&&void 0===O.aborted&&{cancelToken:O},...O&&void 0!==O.aborted&&{signal:O},headers:L,withCredentials:!("OAuth2.0"!==S?.authType||!S.secureCookie)||void 0,...P})).pipe((0,o.tap)((()=>{const e=m.default.getCoreHeadersFromContext(L.context);var t;e&&(t={...e},c.default.publish(l.default.PUB_SUB_EVENTS.FETCH_SUCCESS,t))}))))}return R(e,t,s,I)},R=(e,t,s,r)=>new Promise(((a,n)=>{c.default.subscribe(A,(o=>{r.setUpdateSessionStatus(!o.updateStatus),"success"===o.updateStatus?v(e,t,s).then((e=>a(e))).catch((e=>n(e))):n(o.updateStatus.error)}),A)})),O=e=>{_[e]>0&&(_[e]-=1,0===_[e]&&delete _[e])};r.default.interceptors.request.use((e=>(C.request&&(e=C.request(e)),e)),(e=>Promise.reject(e))),r.default.interceptors.response.use((e=>{const t=e.config.url;if(d.default.getPerformanceDashboardVisibility()&&u.default.reformActionList(t,e,!0,!1),202===e.status&&e.config.headers.context&&e.data?.caseInfo?.errorMessage){const t=[{type:"error",message:e.data.caseInfo.errorMessage}];let s=e.config.headers.context;return s&&s.includes("/workarea")&&(s=s.substring(0,s.lastIndexOf("/workarea"))),(0,i.addMessages)({messages:t,category:"HTTP",context:s}),Promise.reject(e)}return e.config.headers&&e.config.headers.context&&(e.config.skipClearErrorMessages||((0,i.getMessages)({type:"error",category:"HTTP",context:e.config.headers.context}).length>0&&(0,i.clearMessages)({type:"error",category:"HTTP",context:e.config.headers.context}),(0,i.getMessages)({type:"error",category:e.config.headers.context===l.default.APP.APP?"PAGE":"",context:e.config.headers.context}).length>0&&(0,i.clearMessages)({type:"error",category:"PAGE",context:e.config.headers.context})),O(e.config.headers.context)),C.response&&(e=C.response(e)),e}),(e=>{if(e.config&&e.config.headers&&e.config.headers.context&&O(e.config.headers.context),d.default.getPerformanceDashboardVisibility()){const t=e.config.url,s=r.default.isCancel(e);u.default.reformActionList(t,s?e:e.response,!1,s)}return!e.response||!e.response.status||401!==e.response.status||e.config&&(0,g.isUpdateSessionRequest)(e.config.url,S)||c.default.subscribe(A,(e=>{I.setUpdateSessionStatus(!e.updateStatus)}),A),(0,f.default)(e,I,S,e.response&&e.response.status&&e.response.status===Number(T)?T:null)}));const D=e=>_[e],x=()=>r.default.CancelToken.source(),P=e=>r.default.isCancel(e),M=e=>{m.default.setDefaultHeaders(e)},w=e=>{S={...S,...e}},j=e=>{b={...b,...e}},L=()=>({...b}),U=()=>({...S}),F=()=>{I.setUpdateSessionStatus(!1)}},"./src/service_broker/fetchStatus.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=class{constructor(){this.updateSessionInProgress=!1}getUpdateSessionStatus=()=>this.updateSessionInProgress;setUpdateSessionStatus=e=>{this.updateSessionInProgress=e}}},"./src/service_broker/header-processor.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/case/remote-case.ts"),a=s("./src/constants.ts"),n=s("./src/context/context-processor.ts"),o=s("./src/debug/debugger.ts");const i=new class{constructor(){this.externalHeaders={},this.defaultHeaders={},this.SPECIAL_CHARS={SLASH:"/"}}registerHeader(e,t){return!this.defaultHeaders[e]&&(this.externalHeaders[e]=t,!0)}unRegisterHeader(e){this.externalHeaders[e]&&delete this.externalHeaders[e]}getRegisteredHeaders(){return this.externalHeaders}setDefaultHeaders(e){this.defaultHeaders={...this.defaultHeaders,...e}}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[a.default.COREHEADER_APP_DEBUG_ID]:e.debugId,[a.default.COREHEADER_APP_DEBUG_LEVELS]:o.default.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;const t=n.default.getProperty(a.default.COREHEADERS,"",e);return t?{...t,debugInfo:o.default.getPreviewMode()&&{...t.debugInfo,[a.default.COREHEADER_APP_DEBUG_LEVELS]:o.default.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,t,s){const r=this.getCoreHeadersFromContext(s);if(r){const t=Object.keys(e);if(t.includes(a.default.SKIPCOREHEADERS))return void delete e[a.default.SKIPCOREHEADERS];const s=Object.assign({},...Object.values(r));Object.keys({...s}).forEach((r=>{t.includes(r)||(e[r]=s[r])}))}}injectCoreAdditionalHeaders(e,t,s,a){a?.includeRemoteSystemIdIfPresent&&r.default.injectRemoteCaseHeader(e,t,s),this.processCoreHeaders(e,t,s)}}},"./src/service_broker/inactivityTimeout.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./src/constants.ts"),a=s("./src/utils/pubsub-utils.ts");class n{constructor(){this.timerID=void 0,this.expiryBuffer=45,this.timeoutWarned=!1}setTimerID=e=>{this.timerID=e};getTimerID=()=>this.timerID;resetInactiveTimeout=e=>{const t=window.PCore?.getEnvironmentInfo().getInactivityTimeout();if(this.timeoutWarned&&(a.default.unsubscribe(r.publicConstants.PUB_SUB_EVENTS.RESET_TIMER,"resetCallback"),this.timeoutWarned=!1),t)return e&&clearTimeout(e),this.startInactivityTimeout(t>60?t:60)};startInactivityTimeout=e=>{const t=setTimeout((()=>{a.default.publish(r.publicConstants.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(t),a.default.subscribe(r.publicConstants.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0}),1e3*(e-this.expiryBuffer));return this.setTimerID(t),t}}},"./src/service_broker/utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g,extractConfigFromError:()=>h,getJWTServerDetails:()=>p,getReAuthenticationURL:()=>u,isOnline:()=>c,isUpdateSessionRequest:()=>f,redirectToLogin:()=>d,revokeTokens:()=>l});var r=s("./src/services/index.ts"),a=s("./src/utils/pubsub-utils.ts"),n=s("./src/constants.ts"),o=s("./src/service_broker/fetch.ts"),i=s("./src/service_broker/embed/auth.ts");const c=()=>navigator&&navigator.onLine,l=async()=>new Promise((async(e,t)=>{const s=(0,o.getAuthInfo)();if(!s?.tokenInfo)return void t(new Error("Missing token information."));const{access_token:r,refresh_token:a=null}=s.tokenInfo,{revoke:n}=s.endPoints,{client_id:i,client_secret:c,secureCookie:l}=s,u={"content-type":"application/x-www-form-urlencoded"};c&&(u.authorization=`Basic ${window.btoa(`${i}:${c}`)}`);const d=new URLSearchParams;c||d.append("client_id",i),l&&d.append("send_token_as_cookie","true");const p=a?"refresh_token":"access_token",f="access_token"===p?r:a;!l&&f&&d.append("token",f),d.append("token_type_hint",p),await(0,o.fetch)(n,{method:"POST",headers:new Headers(u),credentials:l?"include":"omit",body:d.toString(),withoutDefaultHeaders:!0}),(0,o.updateHeaders)({Authorization:null}),(0,o.updateAuthInfo)({tokenInfo:null}),e()})),u=async e=>{const t={};if("OAuth2.0"===e?.authType){const s=new i.default(e,!1);t.reauthUrl=await s.buildAuthorizeUrl(),t.redirectOrigin=s.getRedirectUriOrigin(),window.addEventListener("message",s.authMessageHandler,!1)}else t.reauthUrl=r.default.getServerURL()+(r.default.getReAuthURL()?`${r.default.getReAuthURL()}`:"/?reAuth=true");return t},d=(e,t)=>{u(t).then((t=>{const s={openReauthMessageModal:!0,reAuthenticationURL:t.reauthUrl,url:e,redirectOrigin:t.redirectOrigin};a.default.publish(n.publicConstants.PUB_SUB_EVENTS.EVENT_REAUTH,s)}))},p=e=>{let t="",s={},i={},c=!0;if("OAuth2.0"===e?.authType){t=e.endPoints.token;const r=new URLSearchParams;(!e.tokenInfo.refresh_token||e.tokenInfo.refresh_token&&e.tokenInfo.refresh_token.length<=0)&&(c=!1),r.append("client_id",e.client_id),r.append("grant_type","refresh_token"),e.clientSecret&&r.append("client_secret",e.clientSecret),e.secureCookie&&r.append("send_token_as_cookie","true"),e.tokenInfo?.refresh_token&&r.append("refresh_token",e.tokenInfo.refresh_token),s={method:"POST",body:r.toString(),headers:{"content-type":"application/x-www-form-urlencoded"}},i={success:t=>{const{data:s}=t,r={access_token:s?.access_token,refresh_token:s?.refresh_token};(0,o.updateAuthInfo)({tokenInfo:{...e.tokenInfo,...r}}),e.secureCookie?(0,o.updateHeaders)({pzCTkn:s?.csrf}):(0,o.updateHeaders)({Authorization:`${s?.token_type} ${s?.access_token}`});const{onTokenRetrieval:a}=e;a&&"function"==typeof a&&a(s)},failure:t=>{if(e.popupReauth)return d(t,e);a.default.publish(n.publicConstants.PUB_SUB_EVENTS.EVENT_FULL_REAUTH,e)}}}else t=`${r.default.getServerURL()}/updateSession`,s={method:"GET",headers:{}},i={failure:d};return{url:t,config:s,callback:i,isRefreshTokenPresent:c}},f=(e,t)=>"OAuth2.0"===t?.authType?e?.includes(t.endPoints.token):e?.includes("updateSession"),h=e=>{const{config:t}=e,s=t.headers&&t.headers.context;return t.data&&(t.body=t.data),{url:t.url,config:t,context:s}},g={getJWTServerDetails:p,getReAuthenticationURL:u,isUpdateSessionRequest:f,redirectToLogin:d,revokeTokens:l,extractConfigFromError:h}},"./src/service_broker/webtoken-service.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i,reissueWebToken:()=>o});var r=s("./src/utils/pubsub-utils.ts"),a=s("./src/service_broker/fetch.ts"),n=s("./src/service_broker/utils.ts");const o=(e,t,s)=>{const{config:o}=e,{url:i,config:c,callback:l,isRefreshTokenPresent:u}=(0,n.getJWTServerDetails)(s),d=o.headers&&o.headers.context;o.data&&(o.body=o.data);const p=(0,a.waitForUpdateSession)(o.url,o,d,t);return u?(0,a.fetch)(i,c).then((e=>(t.setUpdateSessionStatus(!1),l?.success?.(e,o),r.default.publish("updateSession",{updateStatus:"success"}),p.then((e=>Promise.resolve(e))).catch((e=>Promise.reject(e)))))).catch((e=>e&&e.config&&(0,n.isUpdateSessionRequest)(e.config.url,s)?(l?.failure?.(o.url,s),p):Promise.reject(e))):(l?.failure?.(o.url,s),p)},i=o},"./src/services/index.ts":(e,t,s)=>{"use strict";let r,a,n;s.r(t),s.d(t,{default:()=>o});const o={init:e=>{e&&(r=e=e||{"base-server":"http://localhost:1080/prweb/","data-end-point":"api/v1/stream/data","action-end-point":"api/v1/stream/action"},r.BASEURL=e.server,r.ACTIONURL=e["action-end-point"],r.DATAURL=e["data-end-point"],n=e.reAuthUrl)},getAPIURL:e=>`${r.BASEURL}${r[e]}`,getReAuthURL:()=>n,getServerURL:()=>r.BASEURL,getRouteURL:e=>r[e],fetchData:e=>fetch(`${r.BASEURL}${r.ACTIONURL}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),setGoogleMapsAPIKey:e=>{a=e},getGoogleMapsAPIKey:()=>a}},"./src/stakeholders/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{createParticipant:()=>c,default:()=>p,deleteParticipant:()=>u,getParticipant:()=>i,getParticipantRoles:()=>o,getParticipants:()=>n,getRoleView:()=>d,updateParticipant:()=>l});var r=s("./src/rest-client/index.ts"),a=s("./src/stakeholders/utils.ts");const n=(e,t)=>{const s={caseID:e};return(0,r.invokeRestApi)("getAllParticipants",{queryPayload:s},t.getContextName()).then((e=>e?.data?.data.content.pyParticipants)).catch((e=>{t.reportError(": Error occurred during ajax call at getParticipants API : ",e.response)}))},o=(e,t)=>{const s={caseID:e};return(0,r.invokeRestApi)("getParticipantRoles",{queryPayload:s},t.getContextName()).then((e=>e?.data?.participant_roles)).catch((e=>{t.reportError(": Error occurred during ajax call at getParticipantRoles API : ",e.response)}))},i=(e,t,s)=>{const a={caseID:e,participantID:t};return(0,r.invokeRestApi)("getParticipant",{queryPayload:a},s.getContextName()).then((e=>e?.data)).catch((e=>{s.reportError(": Error occurred during ajax call at getParticipant API : ",e.response)}))},c=async(e,t,s,n)=>{const o={caseID:e},i={...s,participantRoleID:t},c={"if-match":n.getCaseSummary().headers.etag};return new Promise(((e,t)=>{(0,r.invokeRestApi)("createParticipant",{body:i,queryPayload:o,headers:c},n.getContextName()).then((t=>{(0,a.updateETagToReduxStore)(t.headers,n),e()})).catch((e=>{n.reportError(": Error occurred during ajax call at createParticipant API : ",e.response),t(e.response)}))}))},l=async(e,t,s,n)=>{const o={caseID:e,participantID:t},i={"if-match":n.getCaseSummary().headers.etag};return new Promise(((e,t)=>{(0,r.invokeRestApi)("updateParticipant",{body:s,queryPayload:o,headers:i},n.getContextName()).then((t=>{(0,a.updateETagToReduxStore)(t.headers,n),e()})).catch((e=>{n.reportError(": Error occurred during ajax call at updateParticipant API : ",e.response),t(e.response)}))}))},u=(e,t,s)=>{const n={caseID:e,participantID:t},o={"if-match":s.getCaseSummary().headers.etag};return new Promise(((e,t)=>{(0,r.invokeRestApi)("deleteParticipant",{queryPayload:n,headers:o},s.getContextName()).then((t=>{(0,a.updateETagToReduxStore)(t.headers,s),e()})).catch((e=>{s.reportError(": Error occurred during ajax call at deleteParticipant API : ",e.response),t(e.response)}))}))},d=(e,t,s)=>{const a={caseID:e,participant_roleID:t};return(0,r.invokeRestApi)("getParticipantRoleView",{queryPayload:a},s.getContextName()).then((e=>e?.data)).catch((e=>{s.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)}))},p={getParticipants:n,getRoleView:d,getParticipantRoles:o,getParticipant:i,createParticipant:c,updateParticipant:l,deleteParticipant:u}},"./src/stakeholders/utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{updateETagToReduxStore:()=>a});var r=s("./src/container/container-utils.ts");const a=(e,t)=>{r.updateRelatedContextEtag(t.getContextName(),e.etag),r.updateCaseContextEtag(t.getContextName(),e.etag)}},"./src/store/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g});var r=s("./node_modules/redux/dist/redux.mjs"),a=s("./node_modules/redux-observable/dist/esm/createEpicMiddleware.js"),n=s("./node_modules/@manaflair/redux-batch/index.js"),o=s("./src/store/state/reducers/index.ts"),i=s("./src/store/state/epics/index.ts"),c=s("./src/store/state/middlewares/property-change-middleware.ts"),l=s("./src/store/state/middlewares/validation-middleware.ts"),u=s("./src/store/state/middlewares/datapage-middleware.ts"),d=s("./src/store/state/middlewares/pubsub-middleware.ts"),p=s("./src/store/state/middlewares/datareference-middleware.ts"),f=s("./src/store/state/state-manager.ts");const h=(0,a.createEpicMiddleware)(),g=e=>{const t=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||r.compose;if(null!==(0,f.getStore)())(0,f.resetStore)();else{const s=(0,r.createStore)((0,o.getRootReducer)(e),t(n.reduxBatch,(0,r.applyMiddleware)(c.default.propertyChangeMiddleware,l.default,u.default,p.default,h,d.default),n.reduxBatch));h.run(i.default),(0,f.setStore)(s)}}},"./src/store/state/actions/action-creators.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{activateContainerItem:()=>x,addContainerItem:()=>y,addMessages:()=>P,addSharedData:()=>$,addTransientItem:()=>C,addWork:()=>E,clearTransientData:()=>b,createWork:()=>d.createWorkAction,error:()=>G,finishAssignment:()=>U,initContainers:()=>_,listAction:()=>H,loadView:()=>g,mergeData:()=>f,openAssignment:()=>F,openWorkByHandle:()=>A,postProcess:()=>V,purgeTransientData:()=>N,removeAllTransientItems:()=>w,removeContainerItem:()=>M,removeSharedData:()=>B,removeTransientItem:()=>j,replaceContainerItem:()=>L,replaceTransientData:()=>T,resetContainers:()=>I,resetLoading:()=>O,setLoading:()=>R,setSharedProperty:()=>q,setStateProperty:()=>Y,showCasePreview:()=>W,showHarness:()=>h,showHistory:()=>k,showPage:()=>m,upMergeAndRemoveContainerItem:()=>D,updateContainerItem:()=>v,updateTransientData:()=>S});var r=s("./src/actions/processor.ts"),a=s("./src/container/container-utils.ts"),n=s("./src/store/state/state-manager.ts"),o=s("./src/utils/utils.ts"),i=s("./src/constants.ts"),c=s("./src/store/state/middlewares/property-change-middleware.ts"),l=s("./src/contextree/utils.ts"),u=s("./src/store/state/actions/index.ts"),d=s("./src/case/create-work/action-creator.ts");const p=(e,t,s,r="")=>{const a=[];Object.keys(e).forEach((n=>{"object"==typeof e[n]&&n.includes("[")?function(e,t,s,r,a,n){const o=r.substring(0,r.indexOf("[")),i=r.substring(r.indexOf("[")+1,r.indexOf("]"));Array.isArray(t[o])&&(t[o]?.splice(+i,1,e[r]),n.push(o),s.add(`${a}.${r}`))}(e,t,s,n,r,a):e[n]&&"object"==typeof e[n]?(t[n]||(t[n]=Array.isArray(e[n])?[]:{}),p(e[n],t[n],s,`${r}.${n}`)):t[n]=e[n]})),function(e,t,s){Object.keys(e).forEach((r=>{(Array.isArray(e[r])&&!s.includes(r)||!Array.isArray(e[r])&&!Object.hasOwn(t,r))&&delete e[r]}))}(t,e,a)},f=(e,t={})=>{const{serverPrecedenceFields:s=[],propertiesToReplace:r=[]}=t,{context:a,data:d,isArrayDeepMerge:f,preserveClientChanges:h=!1}=e,g=(0,c.getChanges)(a,!0);(0,c.mergeListChanges)(a,g);const m=(0,n.getDataObject)(a);let E={};if(m&&d){E=JSON.parse(JSON.stringify(m));const e=JSON.parse(JSON.stringify(d)),t=new Set;p(g,E,t),((e,t,s)=>{const r=new Set;e.forEach((e=>{e=o.default.trimDotForProperty(e);const[a,n,i]=l.default.getPageListNameAndIndexFromPageName(e);a&&n&&i&&!r.has(`${a}.${n}`)&&((o.default.getIn(s,`${a}.${n}`)||[]).forEach(((e,s)=>{s!==+i&&o.default.setIn(t,`${a}.${n}[${s}]`,e)})),r.add(`${a}.${n}`))}))})(t,E,e)}!function(e,t){const s=o.default.getIn(e,i.default.REFERENCED_USERS,[]),r=o.default.getIn(t,i.default.REFERENCED_USERS,[]);if(!Array.isArray(s)||!Array.isArray(r))return;const a=new Map;for(const e of[...r,...s])if(a.has(e.UserID)){const t=a.get(e.UserID);a.set(e.UserID,{...t,...e})}else a.set(e.UserID,e);s.length=0;for(const e of a.values())s.push(e)}(d,m);const A={caseInfo:{content:{...E?.caseInfo?.content}}};let _=d;return h?(s.forEach((e=>{o.default.deleteIn(A,`caseInfo.content.${e}`)})),_=(0,n.mergeDeep)(d,A,{isArrayDeepMerge:!f})):(0,c.updateServerChangedProperties)(a,d),{type:u.MERGE_DATA,payload:{...e,data:_,...r.length>0?{propertiesToReplace:r}:null}}},h=e=>({type:u.SHOW_HARNESS,payload:e}),g=e=>({type:u.LOAD_VIEW,payload:e}),m=e=>({type:u.SHOW_PAGE,payload:e}),E=e=>({type:u.ADD_WORK,payload:e}),A=e=>({type:u.OPEN_WORK_BY_HANDLE,payload:e}),_=e=>({type:u.INIT_CONTAINERS,payload:e}),I=e=>({type:u.RESET_CONTAINERS,payload:e}),y=e=>({type:u.ADD_CONTAINER_ITEM,payload:e}),C=e=>({type:u.ADD_TRANSIENT_ITEM,payload:e}),S=e=>({type:u.UPDATE_TRANSIENT_DATA,payload:e}),b=e=>({type:u.CLEAR_TRANSIENT_DATA,payload:e}),T=e=>({type:u.REPLACE_TRANSIENT_DATA,payload:e}),N=e=>({type:u.PURGE_TRANSIENT_DATA,payload:e}),v=e=>{const{containerItemID:t}=e;return e.suggestionContexts=(0,a.getSuggestionContexts)(t),{type:u.UPDATE_CONTAINER_ITEM,payload:e}},R=e=>{const{context:t}=e;return{type:u.SET_LOADING,payload:{context:t}}},O=e=>{const{context:t}=e;return{type:u.RESET_LOADING,payload:{context:t}}},D=e=>({type:u.UPMERGE_AND_REMOVE_CONTAINER_ITEM,payload:e}),x=e=>({type:u.ACTIVATE_CONTAINER_ITEM,payload:e}),P=e=>({type:u.ADD_MESSAGES,payload:e}),M=e=>{const{context:t,containerItemID:s}=e;let r=t;return r||(r=(0,a.getDataContextName)(s)),e.context=r,e.deleteContext=!(0,a.isContainerItemContextBeingUsedInOtherContainers)(s),e.childContainers=(0,a.getChildContainers)(s),e.childContainersContexts=(0,a.getChildContainersContexts)(s),e.transientItems=(0,a.getTransientItems)([...e.childContainersContexts,s]),e.suggestionContexts=(0,a.getSuggestionContexts)(s),s===t&&(e.caseID=(0,n.getValue)(i.default.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=(0,n.getValue)(i.default.CASE_INFO.REMOTESYSTEMID,"",t)),{type:u.REMOVE_CONTAINER_ITEM,payload:e}},w=e=>{const{containerItemID:t}=e;return e.transientItems=(0,a.getTransientItems)([...(0,a.getChildContainersContexts)(t),t]),{type:u.REMOVE_ALL_TRANSIENT_ITEMS,payload:e}},j=e=>{const{transientItemID:t}=e;return e.transientItems=[t],{type:u.REMOVE_TRANSIENT_ITEM,payload:e}},L=e=>{const{context:t,containerItemID:s}=e;let r=t;return r||(r=(0,a.getDataContextName)(s)),e.context=r,e.childContainers=(0,a.getChildContainers)(s),e.childContainersContexts=(0,a.getChildContainersContexts)(s),e.transientItems=(0,a.getTransientItems)([...e.childContainersContexts,s]),e.suggestionContexts=(0,a.getSuggestionContexts)(s),s===t&&(e.caseID=(0,n.getValue)(i.default.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=(0,n.getValue)(i.default.CASE_INFO.REMOTESYSTEMID,"",t)),{type:u.REPLACE_CONTAINER_ITEM,payload:e}},U=e=>({type:u.FINISH_ASSIGNMENT,payload:e}),F=e=>({type:u.OPEN_ASSIGNMENT,payload:e}),k=e=>({type:u.SHOW_HISTORY,payload:e}),V=(e,...t)=>(r.default.resume(),e(...t)),G=(e,t,s,r,a)=>({type:u.ERROR,payload:{msg:e,err:t,context:s,formFields:r,actionMgrID:a}}),$=e=>({type:u.ADD_SHARED_DATA,payload:e}),B=e=>({type:u.REMOVE_SHARED_DATA,payload:e}),H=e=>({type:u.LIST_ACTION,payload:e}),W=e=>({type:u.SHOW_CASE_PREVIEW,payload:e}),q=e=>({type:u.SET_SHARED_PROPERTY,payload:e}),Y=e=>({type:u.SET_PROPERTY,payload:e})},"./src/store/state/actions/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{ACTION_ADDWORK:()=>Se,ACTION_CANCEL_ASSIGNMENT:()=>be,ACTION_CREATEWORK:()=>Ie,ACTION_CREATE_DATA_OBJECT:()=>Ue,ACTION_DELETE_CASE_IN_CREATESTAGE:()=>Oe,ACTION_DELETE_DATA_OBJECT:()=>ke,ACTION_FINISHASSIGNMENT:()=>Ce,ACTION_GETDESCENDANTS:()=>ge,ACTION_GETNEXTWORK:()=>$e,ACTION_GET_BULK_ACTIONS:()=>je,ACTION_GET_DATA_OBJECT_VIEW:()=>Ve,ACTION_NAVIGATE_TO_STEP:()=>De,ACTION_OPENASSIGNMENT:()=>Ee,ACTION_OPENSTAGE:()=>Ae,ACTION_OPENWORKBYHANDLE:()=>he,ACTION_OPEN_BULK_ACTION:()=>we,ACTION_OPEN_CASE_WIDE_LOCAL_ACTION:()=>Me,ACTION_OPEN_LOCAL_ACTION:()=>xe,ACTION_OPEN_PROCESS_ACTION:()=>Pe,ACTION_RELEASE_ASSIGNMENT_LOCK:()=>Re,ACTION_RETRIEVE_ASSIGNMENT:()=>_e,ACTION_SAVE:()=>ve,ACTION_SAVE_AND_CLOSE:()=>Ne,ACTION_SHOWDASHBOARD:()=>fe,ACTION_SHOWDATA:()=>de,ACTION_SHOWHARNESS:()=>ye,ACTION_SHOWINSIGHT:()=>pe,ACTION_SHOWVIEW:()=>ue,ACTION_SUBMIT_BULK_ACTIONS:()=>Le,ACTION_UPDATE_DATA_OBJECT:()=>Ge,ACTIVATE_CONTAINER_ITEM:()=>re,ACTIVATE_MODAL_CONTAINER_ITEM:()=>ie,ADD_CONTAINER_ITEM:()=>K,ADD_DOCUMENT:()=>S,ADD_MESSAGES:()=>Ke,ADD_SHARED_DATA:()=>Qe,ADD_SUGGESTION_CONTEXT:()=>le,ADD_TRANSIENT_ITEM:()=>J,ADD_WORK:()=>I,ALTER_BLOCKING_ACTION_COUNT:()=>rt,CANCEL_ASSIGNMENT:()=>O,CLEAR_ERRORS:()=>He,CLEAR_FIELD_MESSAGES:()=>qe,CLEAR_MESSAGES:()=>ze,CLEAR_PAGE_MESSAGES:()=>We,CLEAR_TRANSIENT_DATA:()=>ee,CLOSE_CONTAINER:()=>c,CREATEWORK:()=>ft,CREATE_DATA_OBJECT:()=>at,CREATE_WORK:()=>y,DELETE_CASE_IN_CREATESTAGE:()=>x,DELETE_CASE_SUMMARY:()=>st,DELETE_DATA_OBJECT:()=>nt,ERROR:()=>W,ERRORS:()=>Be,FETCH_DATAPAGE:()=>Xe,FIELD_CHANGE:()=>n,FILL_FORM_WITH_AI:()=>pt,FINISH_ASSIGNMENT:()=>v,GETDATAOBJECTACTIONS:()=>$,GET_CASE_STAGES:()=>me,GET_DATA:()=>k,GET_DATA_OBJECT_ACTIONS:()=>Fe,GET_DESCENDANTS:()=>M,GET_MESSAGES:()=>Ye,HOME:()=>m,INIT_CONTAINERS:()=>q,LIST_ACTION:()=>et,LOAD_VIEW:()=>u,LOCAL_ACTION:()=>i,MERGE_DATA:()=>V,NAVIGATE_TO_STEP:()=>w,OPENASSIGNMENT:()=>ht,OPENCASE:()=>gt,OPEN_ASSIGNMENT:()=>P,OPEN_BULK_ACTION:()=>F,OPEN_DATA_OBJECT_ACTION:()=>ct,OPEN_EMBEDDED_DATA_MODAL:()=>ut,OPEN_LOCAL_ACTION:()=>L,OPEN_STAGE:()=>p,OPEN_WORK_BY_HANDLE:()=>C,POST_PROCESS:()=>H,PURGE_TRANSIENT_DATA:()=>te,REMOVE_ALL_TRANSIENT_ITEMS:()=>Z,REMOVE_CONTAINER:()=>ce,REMOVE_CONTAINER_ITEM:()=>z,REMOVE_DOCUMENT:()=>N,REMOVE_ITEM:()=>G,REMOVE_SHARED_DATA:()=>Ze,REMOVE_TRANSIENT_ITEM:()=>Q,REPLACE_CONTAINER_ITEM:()=>oe,REPLACE_DOCUMENT:()=>T,REPLACE_PROPERTY:()=>a,REPLACE_TRANSIENT_DATA:()=>se,RESET_CONTAINERS:()=>Y,RESET_LOADING:()=>A,RESET_STORE:()=>Je,RUN_SCRIPT:()=>l,SAVE_AND_CLOSE:()=>R,SET_LOADING:()=>E,SET_PROPERTY:()=>r,SET_SHARED_PROPERTY:()=>_,SHOW_CANCEL_ALERT:()=>Te,SHOW_CASE_PREVIEW:()=>tt,SHOW_CREATE_STAGE_CANCEL_ALERT:()=>j,SHOW_DASHBOARD:()=>g,SHOW_DATA:()=>f,SHOW_HARNESS:()=>o,SHOW_HISTORY:()=>B,SHOW_INSIGHT:()=>h,SHOW_PAGE:()=>d,SUBMIT_BULK_ACTION:()=>U,SUBMIT_DATA_OBJECT_ACTION:()=>lt,SUBMIT_EMBEDDED_DATA_MODAL:()=>dt,UPDATE_CONTAINER_ITEM:()=>ae,UPDATE_DATA_OBJECT:()=>it,UPDATE_DOCUMENT:()=>b,UPDATE_TRANSIENT_DATA:()=>X,UPDATE_WORKLIST:()=>D,UPMERGE_AND_REMOVE_CONTAINER_ITEM:()=>ne,VIEW_DATA_OBJECT:()=>ot});const r="SET_PROPERTY",a="REPLACE_PROPERTY",n="FIELD_CHANGE",o="SHOW_HARNESS",i="LOCAL_ACTION",c="CLOSE_CONTAINER",l="RUN_SCRIPT",u="LOAD_VIEW",d="SHOW_PAGE",p="OPEN_STAGE",f="SHOW_DATA",h="SHOW_INSIGHT",g="SHOW_DASHBOARD",m="HOME",E="SET_LOADING",A="RESET_LOADING",_="SET_SHARED_PROPERTY",I="ADD_WORK",y="CREATE_WORK",C="OPEN_WORK_BY_HANDLE",S="ADD_DOCUMENT",b="UPDATE_DOCUMENT",T="REPLACE_DOCUMENT",N="REMOVE_DOCUMENT",v="FINISH_ASSIGNMENT",R="SAVE_AND_CLOSE",O="CANCEL_ASSIGNMENT",D="UPDATE_WORKLIST",x="DELETE_CASE_IN_CREATESTAGE",P="OPEN_ASSIGNMENT",M="GET_DESCENDANTS",w="NAVIGATE_TO_STEP",j="SHOW_CREATE_STAGE_CANCEL_ALERT",L="OPEN_LOCAL_ACTION",U="SUBMIT_BULK_ACTION",F="OPEN_BULK_ACTION",k="GET_DATA",V="MERGE_DATA",G="REMOVE_ITEM",$="GET_DATAOBJECT_ACTIONS",B="SHOW_HISTORY",H="POST_PROCESS",W="ERROR",q="INIT_CONTAINERS",Y="RESET_CONTAINERS",K="ADD_CONTAINER_ITEM",z="REMOVE_CONTAINER_ITEM",J="ADD_TRANSIENT_ITEM",X="UPDATE_TRANSIENT_DATA",Q="REMOVE_TRANSIENT_ITEM",Z="REMOVE_ALL_TRANSIENT_ITEMS",ee="CLEAR_TRANSIENT_DATA",te="PURGE_TRANSIENT_DATA",se="REPLACE_TRANSIENT_DATA",re="ACTIVATE_CONTAINER_ITEM",ae="UPDATE_CONTAINER_ITEM",ne="UPMERGE_AND_REMOVE_CONTAINER_ITEM",oe="REPLACE_CONTAINER_ITEM",ie="ACTIVATE_MODAL_CONTAINER_ITEM",ce="REMOVE_CONTAINER",le="ADD_SUGGESTION_CONTEXT",ue="showView",de="showData",pe="showInsight",fe="showDashboard",he="openWorkByHandle",ge="getDescendants",me="getCaseStages",Ee="openAssignment",Ae="openStage",_e="retrieveAssignment",Ie="createNewWork",ye="showHarness",Ce="finishAssignment",Se="addWork",be="cancelAssignment",Te="SHOW_CANCEL_ALERT",Ne="saveAndClose",ve="save",Re="releaseAssignmentLock",Oe="deleteCaseInCreateStage",De="navigateToStep",xe="openLocalAction",Pe="openProcessAction",Me="caseWideActions",we="openBulkAction",je="getBulkActions",Le="performBulkAction",Ue="createDataObject",Fe="getDataObjectActions",ke="deleteDataObject",Ve="readDataObject",Ge="updateDataObject",$e="getNextWork",Be="ERRORS",He="CLEAR_ERRORS",We="CLEAR_PAGE_MESSAGES",qe="CLEAR_FIELD_MESSAGES",Ye="GET_MESSAGES",Ke="ADD_MESSAGES",ze="CLEAR_MESSAGES",Je="RESET_STORE",Xe="FETCH_DATAPAGE",Qe="ADD_SHARED_DATA",Ze="REMOVE_SHARED_DATA",et="LIST_ACTION",tt="SHOW_CASE_PREVIEW",st="DELETE_CASE_SUMMARY",rt="ALTER_BLOCKING_ACTION_COUNT",at="CREATE_DATA_OBJECT",nt="DELETE_DATA_OBJECT",ot="VIEW_DATA_OBJECT",it="UPDATE_DATA_OBJECT",ct="OPEN_DATA_OBJECT_ACTION",lt="SUBMIT_DATA_OBJECT_ACTION",ut="OPEN_EMBEDDED_DATA_MODAL",dt="SUBMIT_EMBEDDED_DATA_MODAL",pt="FILL_FORM_WITH_AI",ft="createWork",ht="openAssignment",gt="openCase"},"./src/store/state/active-context.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/constants.ts"),a=s("./src/context/context-processor.ts"),n=s("./src/container/container-utils.ts");const o=new class{getCoreheaders(e){const t=`${r.publicConstants.APP.APP}${r.default.FORWARD_SLASH_STRING}${r.default.PRIMARY}`,s=(0,n.getActiveContainerItemName)(t),o=(0,n.getDataContextName)(s),i=a.default.getProperty(r.default.COREHEADERS,"",o);if(i&&e in i)return i[e]}}},"./src/store/state/epics/case-epic.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>I});var r=s("./src/case/create-work/index.ts"),a=s("./src/case/open-assignment/index.ts"),n=s("./src/case/open-work-by-handle/index.ts"),o=s("./src/case/finish-assignment/index.ts"),i=s("./src/case/cancel-assignment/index.ts"),c=s("./src/case/navigate-to-step/index.ts"),l=s("./src/case/delete-case-in-create-stage/index.ts"),u=s("./src/case/save-and-close/index.ts"),d=s("./src/case/open-local-action/index.ts"),p=s("./src/case/open-bulk-action/index.ts"),f=s("./src/case/submit-bulk-action/index.ts"),h=s("./src/case/open-process-action/index.ts"),g=s("./src/case/release-lock/index.ts"),m=s("./src/case/miscellaneous-actions.ts"),E=s("./src/case/open-embedded-data-modal/index.ts"),A=s("./src/case/submit-embedded-data-modal/index.ts"),_=s("./src/case/get-descendants/index.ts");const I=[r.default,a.openAssignment,n.openWorkByHandle,d.default,p.default,f.submitBulkAction,h.default,o.finishAssignment,c.navigateToStep,i.cancelAssignment,g.releaseLock,u.default,l.default,m.showCreateStageCancelAlert,m.activateModalContainerItem,E.openEmbeddedDataModal,A.submitEmbeddedDataModal,_.getDescendants]},"./src/store/state/epics/dashboard-epic.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>_});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),i=s("./node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js"),c=s("./src/actions/manager.ts"),l=s("./src/actions/targetmap.ts"),u=s("./src/constants.ts"),d=s("./src/router/app-router.ts"),p=s("./src/router/routing-manager.ts"),f=s("./src/service_broker/fetch.ts"),h=s("./src/utils/dxapi-response-translator.ts"),g=s("./src/utils/rxjs-utils.ts"),m=s("./src/store/state/actions/index.ts"),E=s("./src/store/state/state-manager.ts"),A=s("./src/store/state/epics/util.ts");const _=[e=>{let t=0,s=[];return e.pipe((0,r.ofType)(m.SHOW_DASHBOARD),(0,n.map)((e=>(({actionMgrID:t}=e.payload),e.payload))),(0,o.mergeMap)((e=>{const{context:t,skipSemanticUrl:s=!1,dashboardID:r}=e;let o="";s||(o=(0,d.getSemanticURL)(m.ACTION_SHOWDASHBOARD,{dashboardID:r}),o=o.replace("{dashboardID}",r));const{restApi:i,reqType:c}=(0,d.resolveRestApi)(m.ACTION_SHOWDASHBOARD,{dashboardID:r});return(0,a.from)((0,f.fetch)(i,{method:c},t)).pipe((0,n.map)((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:o,semanticURL:o},actionConfig:e,skipSemanticUrl:s}})),(0,g.logAndCatchError)(": Error occurred during ajax call at showPage Epic : ",e.context))})),(0,o.mergeMap)((async e=>{if(e&&e.type===m.ERROR)return s.push((0,A.processDataToDispatchErrorAction)(e)),s;const{actionConfig:t,skipSemanticUrl:r}=e,a=l.default.getTargetViewContainerName(m.SHOW_PAGE),n=(0,p.getResolvedTargetName)(a,t.context),o=(0,A.getContext)(n,a,t.context),{response:i}=e,c=(0,h.getTranslatedDXAPIResponse)(i);c.directUrlUpdation=!r;const d={acName:n,context:o},f=!r,g=r;await(0,A.processViewResponse)(c,t,d,f,g);const E={target:n,context:o,containerItemID:o},_=(0,A.getActionPayload)(c,E);_.resourceType=u.publicConstants.PAGE;const I=(0,A.getActionBasedOnContainerMode)(n,_);return s.push(I)})),(0,n.map)((()=>{c.ActionManagerInstance.resolveActionByID(t),E.dispatch(s),s=[]})),(0,i.ignoreElements)())}]},"./src/store/state/epics/data-epic.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/data/show-data/index.ts"),a=s("./src/data/index.ts"),n=s("./src/data/delete-data-object/index.ts"),o=s("./src/data/data-object-actions/index.ts");const i=[r.default,a.createDataObject,a.getDataObjectView,a.updateDataObject,n.default,o.default,a.openDataObjectFlowAction,a.submitDataObjectFlowAction]},"./src/store/state/epics/history-epic.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>x});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),i=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),c=s("./src/store/state/actions/index.ts"),l=s("./src/case/remote-case.ts"),u=s("./src/store/state/state-manager.ts"),d=s("./src/utils/rxjs-utils.ts"),p=s("./src/services/index.ts"),f=s("./src/utils/component-loader.ts"),h=s("./src/locale/locale-utils.ts"),g=s("./src/observables/stream-observable.ts"),m=s("./src/service_broker/fetch.ts"),E=s("./src/constants.ts"),A=s("./src/router/app-router.ts"),_=s("./src/utils/utils.ts"),I=s("./src/utils/dxapi-response-translator.ts"),y=s("./src/container/container-utils.ts"),C=s("./src/utils/pubsub-utils.ts"),S=s("./src/service_broker/header-processor.ts"),b=s("./src/debug/debugger.ts"),T=s("./src/store/state/epics/util.ts");const{RESOURCE_TYPES:{CASE:N,DATA:v}}=E.publicConstants;let R=[],O=!1;const D={},x=[e=>e.pipe((0,r.ofType)(c.SHOW_HISTORY),(0,n.debounceTime)(200),(0,o.map)((e=>e.payload)),(0,i.mergeMap)((e=>{O=!1,C.default.subscribe(E.publicConstants.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{O=!0}));const t=b.default.getPreviewMode()&&S.default.addDebugHeaders({debugId:_.default.generateUniqueID()});D.dataContext=e.payload.dataViewName,D.dataContextParameters=e.payload.dataViewKeys;const{context:s,requestType:r,routeKey:n}=e;let{routeEndpoint:i}=e;i=i&&i.indexOf("viewType={viewType}")>0?i.replace("{viewType}","page"):i&&i.indexOf('viewType=""')>0?i.replace('viewType=""','viewType="page"'):i;const c=p.default.getServerURL()+i,u=e.options.context;let f;const h={},g=e?.payload?.caseClassName;if(l.default.isRemoteCase(g)){const{RemoteSystemID:e}=l.default.getRemoteCase(g);h.RemoteSystemID=e}if("POST"===r){let l;switch(f=e.payload,i.indexOf("viewType=")<0&&(i=`${i}?viewType=page`),(0,T.getResourceType)(n)){case N:l={caseTypeID:f.caseTypeID,processID:f.processID,content:{}};break;case v:l=D;break;default:l=f}return(0,a.from)((0,m.fetch)(c,{method:r,body:l,headers:{...h,...t}},s)).pipe((0,o.map)((t=>({response:{...t.data},payload:e,headers:(0,T.processHeaders)(t.headers)}))),(0,d.logAndCatchError)(": Error occurred during ajax call at historyEpic : ",e))}return(0,a.from)((0,m.fetch)(c,{method:"GET",headers:{...h,...t}},u.substring(0,u.lastIndexOf("/")))).pipe((0,o.map)((s=>({response:s.data,payload:e,headers:{...(0,T.processHeaders)(s.headers),...t}}))))})),(0,i.mergeMap)((async e=>{if(O)return R;if(C.default.subscribe(E.publicConstants.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{O=!0})),e&&e.type===c.ERROR)return(0,T.processDataToDispatchErrorAction)(e);const{headers:t={},response:s,payload:r}=e,a=(0,I.getTranslatedDXAPIResponse)(s,{[E.publicConstants.STOPMERGEACTIONS]:!s.nextAssignmentInfo}),n=r.options.acName,o=(0,y.isContainerSingleMode)(n)&&(0,y.hasContainerItems)(n)?(0,y.getActiveContainerItemName)(n):e.payload.options.context,i=o;t.RemoteSystemID=r?.payload?.RemoteSystemID;const l={target:n,context:o,containerItemID:i,headers:t,debugInfo:{debugId:t[E.default.COREHEADER_APP_DEBUG_ID]}};let u="";const d=r?.payload?.page;let p=r?.payload?.pageClass;r.payload&&r.payload.caseName&&r.payload.workID&&(u=(0,A.getSemanticURL)(c.ACTION_OPENWORKBYHANDLE,{caseName:e.payload.payload.caseName}),u=u&&u.replace("{workID}",e.payload.payload.workID)||"",p=r?.payload?.caseClassName),C.default.publish(E.publicConstants.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:d,pageClass:p});const m=_.default.getIn(a,E.default.LOCALE_REFERENCES);await h.localeUtils.loadLocaleResources(m);const S=_.default.getIn(a,E.default.COMPONENTS);S&&await(0,f.default)(S),(0,g.publishResponse)(a,r.options.actionConfig,!0),C.default.publish(E.publicConstants.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:n,pageName:d,pageClass:p});let b=(0,T.getActionPayload)(a,l);const N=(0,T.getResourceType)(e.payload.routeKey);return b=(0,T.getUpdatedPayloadBasedOnResourceType)(N,{...s.data,semanticURL:u,caseViewMode:E.default.REVIEW_MODE},b),R.push((0,T.getActionBasedOnContainerMode)(n,b)),(0,T.addPreviewResetAction)(R),R})),(0,o.map)((()=>(O||u.dispatch(R),R=[],O=!1,R))),(0,d.logAndCatchError)("Error occurred"))]},"./src/store/state/epics/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var r=s("./node_modules/redux-observable/dist/esm/combineEpics.js"),a=s("./src/refresh/refresh-epic.ts"),n=s("./src/data-view/dataview-epic.ts"),o=s("./src/store/state/epics/case-epic.ts"),i=s("./src/store/state/epics/ui-epic.ts"),c=s("./src/store/state/epics/data-epic.ts"),l=s("./src/store/state/epics/history-epic.ts"),u=s("./src/store/state/epics/misc-epic.ts"),d=s("./src/store/state/epics/insight-epic.ts"),p=s("./src/store/state/epics/dashboard-epic.ts");const f=(0,r.combineEpics)(...a.default,...o.default,...i.default,...l.default,...c.default,...n.default,...u.default,...d.default,...p.default)},"./src/store/state/epics/insight-epic.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>_});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),i=s("./node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js"),c=s("./src/actions/manager.ts"),l=s("./src/actions/targetmap.ts"),u=s("./src/constants.ts"),d=s("./src/router/app-router.ts"),p=s("./src/router/routing-manager.ts"),f=s("./src/service_broker/fetch.ts"),h=s("./src/utils/dxapi-response-translator.ts"),g=s("./src/utils/rxjs-utils.ts"),m=s("./src/store/state/actions/index.ts"),E=s("./src/store/state/state-manager.ts"),A=s("./src/store/state/epics/util.ts");const _=[e=>{let t=0,s=[];return e.pipe((0,r.ofType)(m.SHOW_INSIGHT),(0,n.map)((e=>(({actionMgrID:t}=e.payload),e.payload))),(0,o.mergeMap)((e=>{const{context:t,skipSemanticUrl:s=!1,insightID:r}=e;let o="";s||(o=(0,d.getSemanticURL)(m.ACTION_SHOWINSIGHT,{insightID:"{insightID}"}),o=o.replace("{insightID}",r));const{restApi:i,reqType:c}=(0,d.resolveRestApi)(m.ACTION_SHOWINSIGHT,{insightID:r});return(0,a.from)((0,f.fetch)(i,{method:c},t)).pipe((0,n.map)((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:o,semanticURL:o},actionConfig:e,skipSemanticUrl:s}})),(0,g.logAndCatchError)(": Error occurred during ajax call at showPage Epic : ",e.context))})),(0,o.mergeMap)((async e=>{if(e&&e.type===m.ERROR)return s.push((0,A.processDataToDispatchErrorAction)(e)),s;const{actionConfig:t,skipSemanticUrl:r}=e,a=l.default.getTargetViewContainerName(m.SHOW_PAGE),n=(0,p.getResolvedTargetName)(a,t.context),o=(0,A.getContext)(n,a,t.context),{response:i}=e,c=(0,h.getTranslatedDXAPIResponse)(i);c.directUrlUpdation=!r;const d={acName:n,context:o},f=!r,g=r;await(0,A.processViewResponse)(c,t,d,f,g);const E={target:n,context:o,containerItemID:o},_=(0,A.getActionPayload)(c,E);_.resourceType=u.publicConstants.PAGE;const I=(0,A.getActionBasedOnContainerMode)(n,_);return s.push(I),(0,A.addPreviewResetAction)(s),s})),(0,n.map)((()=>{c.ActionManagerInstance.resolveActionByID(t),E.dispatch(s),s=[]})),(0,i.ignoreElements)())}]},"./src/store/state/epics/misc-epic.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js"),o=s("./node_modules/lodash.isequal/index.js"),i=s.n(o),c=s("./src/store/state/actions/index.ts"),l=s("./src/actions/manager.ts"),u=s("./src/store/state/reducers/index.ts"),d=s("./src/store/state/state-manager.ts");const p=[e=>{let t=0;return e.pipe((0,r.ofType)(c.RESET_STORE),(0,a.map)((e=>(({actionMgrID:t}=e.payload),e.payload))),(0,a.map)((()=>{const e=(0,d.getStore)()?.getState(),s=(0,u.getInitialState)();return i()(e,s)&&t>0?l.ActionManagerInstance.resolveActionByID(t,{}):l.ActionManagerInstance.rejectActionByID(t),[]})),(0,n.ignoreElements)())}]},"./src/store/state/epics/ui-epic.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>O});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),n=s("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),o=s("./node_modules/rxjs/dist/esm5/internal/observable/empty.js"),i=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),c=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),l=s("./node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js"),u=s("./src/actions/manager.ts"),d=s("./src/actions/targetmap.ts"),p=s("./src/case/remote-case.ts"),f=s("./src/constants.ts"),h=s("./src/router/app-router.ts"),g=s("./src/router/routing-manager.ts"),m=s("./src/service_broker/fetch.ts"),E=s("./src/utils/dxapi-response-translator.ts"),A=s("./src/utils/rxjs-utils.ts"),_=s("./src/utils/utils.ts"),I=s("./src/store/state/actions/index.ts"),y=s("./src/store/state/actions/action-creators.ts"),C=s("./src/container/container-utils.ts"),S=s("./src/store/state/state-manager.ts"),b=s("./src/case/common-events.ts"),T=s("./src/utils/pubsub-utils.ts"),N=s("./src/service_broker/header-processor.ts"),v=s("./src/store/state/epics/util.ts");const{RESOURCE_TYPES:R}=f.publicConstants,O=[e=>e.pipe((0,r.ofType)(I.LOAD_VIEW),(0,i.map)((e=>e.payload)),(0,c.mergeMap)((e=>{const t={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===C.CONTAINER_NAMES.PREVIEW&&e.context&&e.caseId&&!e.updateData){const t=(0,g.getResolvedTargetName)(C.CONTAINER_NAMES.PREVIEW,e.context),s=(0,v.getContext)(t,C.CONTAINER_NAMES.PREVIEW,e.context,{buildNew:!0}),r=decodeURI(e.caseId);S.dispatch(y.addContainerItem({...e,context:s,target:t,containerItemID:s,key:r,caseViewMode:f.default.REVIEW_MODE,root:{type:"reference",config:{context:"caseInfo.content",name:e.viewName,type:"view"}},data:{key:r,caseInfo:{ID:r,progress:!0,error:!1,caseTypeID:e.caseClassName,content:{classID:e.caseClassName}}}})),e.viewLoadingContainer={target:t,context:s}}const s={};if(t.RemoteSystemID)s.RemoteSystemID=t.RemoteSystemID;else if(p.default.isRemoteCase(t.caseClassName)){const{RemoteSystemID:e}=p.default.getRemoteCase(t.caseClassName);s.RemoteSystemID=e}let{restApi:r,reqType:n}=(0,h.resolveRestApi)("loadView",t);return e.viewContext===R.PAGE&&({restApi:r,reqType:n}=(0,h.resolveRestApi)(I.ACTION_SHOWVIEW,{page:e.viewName,pageClass:e.pageClass})),(0,a.from)((0,m.fetch)(r,{method:n,headers:s},e.context)).pipe((0,i.map)((t=>{const s=decodeURI(e.caseId);let r="";return"string"==typeof t.data?t.data?r=JSON.parse(t.data):(console.error("response data is empty!!"),r={}):r=t.data,{response:{...r,key:s},actionConfig:e,headers:(0,v.processHeaders)(t.headers),rootView:_.default.getIn(r,f.default.ROOT)}})),(0,A.logAndCatchError)(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))})),(0,c.mergeMap)((async e=>{const t={};if(e?.type===I.ERROR){if(t.actionsOut=(0,v.processDataToDispatchErrorAction)(e),e?.payload?.context?.includes(C.CONTAINER_NAMES.PREVIEW)){const s={...S.getDataObject(e.payload.context),caseInfo:{progress:!1,error:!0}},r=(0,g.getResolvedTargetName)(C.CONTAINER_NAMES.PREVIEW,e.payload.context);t.actionsOut=y.postProcess(y.updateContainerItem,{key:s.key,target:r,containerName:C.CONTAINER_NAMES.PREVIEW,context:e.payload.context,containerItemID:e.payload.context,data:s})}return t}try{t.actionMgrID=e?.actionConfig?.actionMgrID,t.rootView=e?.rootView;const{actionConfig:s,response:r,headers:a}=e,{containerItemID:n,containerName:o}=s,{target:i,context:c}=(e=>{const{containerName:t,updateData:s,viewLoadingContainer:r}=e,a=t||d.default.getTargetViewContainerName(I.ACTION_SHOWVIEW),n=r?.target??(0,g.getResolvedTargetName)(a,e.context);return{target:n,context:r?.context??(t===C.CONTAINER_NAMES.PREVIEW&&s?e.context:(0,v.getContext)(n,a,e.context,{buildNew:!!t}))}})(s);s.context=c;const l={acName:i,context:c};let u={};u=o===C.CONTAINER_NAMES.PREVIEW?(0,E.getTranslatedDXAPIResponse)(r):(0,E.getTranslatedDXAPIResponse)(r,{[f.publicConstants.STOPMERGEACTIONS]:!0,[f.publicConstants.ACTIONS.DELETEAVIALACTIONS]:!0}),u.directUrlUpdation=!1,await(0,v.processViewResponse)(u,s,l);const p={...s,target:i,context:c,containerItemID:n||c,headers:a},h=(0,v.getActionPayload)(u,p);if(h.resourceType=R.CASE,o&&!h.updateData){h.caseViewMode=f.default.REVIEW_MODE;const e=(0,C.getTargetFromContainerItemID)(h?.context);((e,t,s,r,a)=>{e&&a===C.CONTAINER_NAMES.PREVIEW?(s.data.caseInfo.progress=!1,delete s.root,r.actionsOut=y.postProcess(y.updateContainerItem,{...s,containerName:a})):e?(r.actionsOut=[],r.actionsOut.push(y.postProcess(y.activateContainerItem,{target:t,containerItemID:e}))):r.actionsOut=y.postProcess(y.addContainerItem,{...s,containerName:a})})((0,C.getContainerItemName)(e,h.key),e,h,t,o)}else h.preserveClientChanges=!0,t.actionsOut=[],o===C.CONTAINER_NAMES.PREVIEW&&t.actionsOut.push({type:I.DELETE_CASE_SUMMARY,payload:{context:c}}),t.actionsOut.push(y.postProcess(y.mergeData,h))}catch(e){console.error(e),t.rootView={type:"error",payload:e}}const{caseId:s,context:r,viewName:a}=e.actionConfig;return"pyCasePreview"===a&&(0,b.publishCasePreviewEvent)({caseId:s,context:r}),t})),(0,i.map)((({rootView:e,actionsOut:t,actionMgrID:s=0})=>(u.ActionManagerInstance.resolveActionByID(s,e),t)))),e=>{let t=0,s=[];return e.pipe((0,r.ofType)(I.SHOW_PAGE),(0,i.map)((e=>(({actionMgrID:t}=e.payload),e.payload))),(0,c.mergeMap)((e=>{T.default.publish(f.publicConstants.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);const{debugInfo:s,context:r,viewName:c,className:l,skipSemanticUrl:p=!1,containerName:E=d.default.getTargetViewContainerName(I.ACTION_SHOWVIEW)}=e,_=s&&{...N.default.addDebugHeaders(s)},y=(0,g.getResolvedTargetName)(E,r);let S="",b={},O=!0;if(!p){if(S=(0,h.getSemanticURL)(I.ACTION_SHOWVIEW,{page:c}),y&&S){const{activate:t,activateContainerActionPayload:s}=(0,v.getActivationDetails)(R.PAGE,y,{semanticURL:S});if(t)return(0,n.of)({type:I.ACTIVATE_CONTAINER_ITEM,activateContainerActionPayload:s,actionConfig:e})}if((0,C.getActiveContainerItemName)(y)&&({continueExecution:O,removeActionPayload:b}=(0,v.getDirtyDetails)(y)),!O)return u.ActionManagerInstance.rejectActionByID(t),(0,o.empty)()}const{restApi:D,reqType:x}=(0,h.resolveRestApi)(I.ACTION_SHOWVIEW,{page:c,pageClass:l});return(0,a.from)((0,m.fetch)(D,{method:x,headers:_},r)).pipe((0,i.map)((t=>{let s={};return s="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...s,key:S,semanticURL:S},actionConfig:e,headers:(0,v.processHeaders)(t.headers),removeActionPayload:b,skipSemanticUrl:p}})),(0,A.logAndCatchError)(": Error ocurred during ajax call at showPage Epic : ",e.context))})),(0,c.mergeMap)((async e=>{if(e&&e.type===I.ERROR)return s.push((0,v.processDataToDispatchErrorAction)(e)),s;let{type:t}=e;const{actionConfig:r,skipSemanticUrl:a}=e,n=r.containerName||d.default.getTargetViewContainerName(I.SHOW_PAGE),o=(0,g.getResolvedTargetName)(n,r.context);T.default.publish(f.publicConstants.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className});const{remoteCasePayload:i,updatedType:c}=(0,v.updateTraditionalRemoteCaseAction)(t,e,r,o);if(t=c??t,t===I.ACTIVATE_CONTAINER_ITEM){const{activateContainerActionPayload:{semanticURL:t,containerItemID:a}}=e,n={acName:o,context:(0,C.getDataContextName)(a)};r.isTraditionalRemoteCase||await(0,v.processViewResponse)({directUrlUpdation:!0,semanticURL:t},r,n,!0),s.push(y.postProcess(y.activateContainerItem,{target:o,containerItemID:a}))}else{const t=(0,v.getContext)(o,n,r.context),{response:c,headers:l={},removeActionPayload:u}=e,d=(0,E.getTranslatedDXAPIResponse)(c,{isCreateDataObject:r.isCreateDataObject});d.directUrlUpdation=!a;const p={acName:o,context:t};await(0,v.processViewResponse)(d,r,p);const h={target:o,context:t,containerItemID:t,headers:l,debugInfo:r.debugInfo},g=(0,v.getActionPayload)(d,h);g.resourceType=f.publicConstants.PAGE,r.isCreateDataObject&&(g.resourceType=f.publicConstants.RESOURCE_TYPES.DATA,g.resourceStatus=f.publicConstants.RESOURCE_STATUS.CREATE,delete g.data.caseInfo),(0,v.setTraditionalRemoteCasePayloadParams)(r,i,g);const m=(0,v.getActionBasedOnContainerMode)(o,g);u.containerItemID&&(0,v.isAddContainerAction)(m)&&s.push(y.postProcess(y.removeContainerItem,{containerItemID:u.containerItemID,target:o})),s.push(m),(0,v.addPreviewResetAction)(s)}return T.default.publish(f.publicConstants.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:o,pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),s})),(0,i.map)((()=>{u.ActionManagerInstance.resolveActionByID(t),S.dispatch(s),s=[]})),(0,l.ignoreElements)())}]},"./src/store/state/epics/util.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{SCOPE_TYPES:()=>O,addActionsToParentContext:()=>Z,addPreviewResetAction:()=>X,areChildContextsInDirtyState:()=>W,convertLiteralKey:()=>P,dispatchCorrectActionIfChildOrRemote:()=>ee,getActionBasedOnContainerMode:()=>$,getActionPayload:()=>w,getActivationDetails:()=>K,getContext:()=>B,getDirtyDetails:()=>q,getIdFromInsKey:()=>L,getKeyAndFlowName:()=>F,getParentContextChangeSet:()=>re,getResourceType:()=>Q,getSubmitData:()=>M,getUpdatedPayloadBasedOnResourceType:()=>te,getWorkIDFromInsKey:()=>U,isAddContainerAction:()=>H,mergeCurrentModalContentToTarget:()=>J,mergeObjectsAndConcatArrays:()=>se,performResetContainer:()=>z,processDataToDispatchErrorAction:()=>G,processErrorResponse:()=>V,processHeaders:()=>x,processViewResponse:()=>j,setTraditionalRemoteCasePayloadParams:()=>ne,shouldReplaceActiveItem:()=>k,updateTraditionalRemoteCaseAction:()=>ae});var r=s("./node_modules/lodash.mergewith/index.js"),a=s.n(r),n=s("./node_modules/lodash.get/index.js"),o=s.n(n),i=s("./src/observables/stream-observable.ts"),c=s("./src/router/app-router.ts"),l=s("./src/router/routing-manager.ts"),u=s("./src/utils/component-loader.ts"),d=s("./src/constants.ts"),p=s("./src/container/container-utils.ts"),f=s("./src/utils/utils.ts"),h=s("./src/store/state/actions/index.ts"),g=s("./src/store/state/actions/action-creators.ts"),m=s("./src/actions/manager.ts"),E=s("./src/utils/form-handler.ts"),A=s("./src/store/state/middlewares/property-change-middleware.ts"),_=s("./src/utils/context-utils.ts"),I=s("./src/page-instructions/index.ts"),y=s("./src/case/remote-case.ts"),C=s("./src/store/state/state-manager.ts"),S=s("./src/case/common-helper.ts"),b=s("./src/locale/locale-utils.ts"),T=s("./src/rules/rules-store.ts"),N=s("./src/environment-info/index.ts"),v=s("./src/case/utils.ts");const{RESOURCE_TYPES:R}=d.publicConstants,O={PAGE:"page",FORM:"form"},D={[R.CASE]:[h.ACTION_CREATEWORK,h.ACTION_OPENWORKBYHANDLE,h.ACTION_OPENASSIGNMENT],[R.PAGE]:[h.ACTION_SHOWVIEW,h.ACTION_SHOWINSIGHT],[R.DATA]:[h.ACTION_SHOWDATA]},x=(e,t,s={})=>{if(!e)return{};const r={etag:e.etag},{RemoteSystemID:a}=s;return e[d.publicConstants.REMOTE_SYSTEM_ID]||e[d.publicConstants.REMOTE_SYSTEM_ID.toLowerCase()]||a?r.RemoteSystemID=e[d.publicConstants.REMOTE_SYSTEM_ID]||e[d.publicConstants.REMOTE_SYSTEM_ID.toLowerCase()]||a:t&&y.default.isRemoteCase(t)&&(r.RemoteSystemID=y.default.getRemoteHeader(t)),r},P=e=>{if(!e)return"";const t=e.split(".");let s,r="";for(s of t)if(s){if(s.includes("[")&&s.includes("]"))return r+=`['${s.substring(0,s.lastIndexOf("["))}']`,r;r+=`['${s}']`}return r},M=(e,t={})=>{const{onlyChangedData:s=!1,nonEmptyAndChangedData:r=!1,skipUUID:n=!0,isTransientContext:i=!1,includeDisabledFields:c=!1}=t;let l={};l=(0,E.getFormContent)(e,{isTransientContext:i,includeDisabledFields:c}),s&&(delete l?.caseInfo?.content,i&&(l={}));const u=(0,A.getChanges)(e,!1);!i&&r&&((e,t)=>{Object.entries(e?.caseInfo?.content).forEach((([s,r])=>{const a=C.getDataObject(t),n=o()(a,d.publicConstants.CASE_INFO.CASE_INFO_CLASSID);("True-False"===(0,T.getPropertyMetadata)(s,n)?.type&&!r||""===r)&&delete e.caseInfo.content[s]}))})(l,e);const p=a()(u,l);let h={},g=!1;({content:h,attachmentsExist:g}=((e,t)=>{let s={},r=!1;return(e||t?.caseInfo)&&(s=e?{...t}:{...t?.caseInfo},t?.caseInfo?.attachments&&(r=!0)),{content:s,attachmentsExist:r}})(i,p));const m=[...(0,I.getInstructions)(e)];return n&&m.forEach((e=>{delete e.content?.EmbedListUUID__})),h.pageInstructions=m,(0,I.getPageInstructionReferences)(e).forEach((e=>{if(h?.content){const t=e?.replace(d.default.CASE_INFO.CASE_INFO_CONTENT,"");f.default.deleteIn(h.content,P(t))}})),!i&&p?.dataInfo?(h={...p.dataInfo,pageInstructions:h.pageInstructions},{content:h}):{content:h,attachmentsExist:g}},w=(e,t)=>{let s,r,a={};const n=f.default.getIn(e,d.default.UI_RESOURCES),o=f.default.getIn(e,"confirmationNote");n?(s=f.default.getIn(e,d.default.UI_RESOURCES_CONTEXT_DATA),r=f.default.getIn(e,d.default.ROOT),a=f.default.getIn(e,d.default.ACTION_BUTTONS)):o&&(r={});const{data:i={},Errors:c,semanticURL:l,key:u,flowName:p}=e,h=f.default.getIn(e,"nextAssignmentInfo",null),g=f.default.getIn(e,"nextAssignmentInfo.context",""),m=f.default.getIn(e,"confirmationLinks",null),{isInCreateStage:E,openCaseViewAfterCreate:A,debugInfo:_}=t;return{data:{...i,key:u,flowName:p,coreHeaders:_&&{debugInfo:{[d.default.COREHEADER_APP_DEBUG_ID]:_.debugId}},caseInfo:{...i.caseInfo,actionButtons:a,headers:t.headers},[d.default.CONTEXT_DATA]:E?{...i[d.default.CONTEXT_DATA],...s,openCaseViewAfterCreate:A,errors:c}:{...i[d.default.CONTEXT_DATA],...s,errors:c}},semanticURL:l,nextAssignmentInfo:h,assignmentContext:g,confirmationLinks:m,key:u,root:r,...t}},j=async(e,t,s,r=!1,a=!1)=>{const n=f.default.getIn(e,d.default.LOCALE_REFERENCES);await b.localeUtils.loadLocaleResources(n);const o=f.default.getIn(e,d.default.COMPONENTS);if(o)try{await(0,u.default)(o)}catch(e){console.error(e)}const l={actionConfig:t,...s};r?(0,c.parseResponse)({...e,options:l,directUrlUpdation:!0}):(0,i.publishResponse)(e,l,a)},L=e=>{const t=e&&e.match(/\S+(?=!)/);return t?t[0]:""},U=(e="")=>{const t=e.indexOf(" "),s=e.indexOf("!");return e.substring(t+1,s)},F=e=>{if(e){const[,t]=e.split("!");return{key:U(e),flowName:t}}return{}},k=(e,t)=>{const s=(0,p.getActiveContainerItemName)(t);let r=null;return s&&(r=p.getContainerItemData(t,s)),r?.key===e&&(0,p.isContainerMultipleMode)(t)},V=(e,t)=>{const s=[],r=[];return e.forEach((e=>{((e,t,s,r)=>{switch(!0){case Boolean(e[d.default.ERROR_IN_PAGE_IDENTIFIER]&&e[d.default.ERROR_FIELD_IN_PAGE]):{const a=`${e[d.default.ERROR_FIELD_IN_PAGE]}`.replace(/(\(\d\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`)),n=`${a}${e[d.default.ERROR_IN_PAGE_IDENTIFIER]}`,o=f.default.deepClone(e);o[d.default.ERROR_FIELD_IN_PAGE]=a,t.includes(n.slice(1))||t.includes(n.substring(n.indexOf(".")+1,n.indexOf("[")))?r.push(o):s.push(e);break}case Boolean(e[d.default.ERROR_IN_PAGE_IDENTIFIER]&&!e[d.default.ERROR_FIELD_IN_PAGE]):{const a=e[d.default.ERROR_IN_PAGE_IDENTIFIER].slice(1);t.includes(a)?r.push(e):s.push(e);break}default:s.push(e)}})(e,t,s,r)})),{fieldErrors:r,pageErrors:s}},G=e=>{const{payload:t}=e,{err:s,context:r,actionMgrID:a}=t,n=s&&s.response?s.response.data:"",o=(0,E.getVisibleFormFields)(r);return a&&m.ActionManagerInstance.rejectActionByID(a),g.postProcess(g.error,"Error action triggered",n,r,o)},$=(e,t)=>(0,p.isContainerSingleMode)(e)&&(0,p.hasContainerItems)(e)?g.postProcess(g.replaceContainerItem,t):g.postProcess(g.addContainerItem,t),B=(e,t,s=d.default.APP.APP,r={})=>{let a=null;const{buildNew:n=!0}=r;return(0,p.isContainerSingleMode)(e)?a=(0,p.hasContainerItems)(e)?(0,p.getActiveContainerItemName)(e):(0,_.buildContextName)(t,s):(0,p.isContainerMultipleMode)(e)&&((0,p.hasContainerItems)(e)&&!n?a=(0,p.getActiveContainerItemContext)(e):(0,p.hasContainerItems)(e)&&!n||(a=(0,_.buildContextName)(t,s))),a},H=e=>e&&e.type===h.ADD_CONTAINER_ITEM,W=e=>{let t=!1;const s=p.getChildContainersContexts(e);for(let e=0;e<s.length;e+=1){const r=s[e];if(r&&(0,A.isContextDirty)(r)){t=!0;break}}return t},q=(e,t={})=>{let s=!1,r=!1,a={},n=!0,o=!1,i=!1;const{showConfirmDialogForMaxDocumentLimitReached:c=!1,dirtyMessage:l,skipChildDirtyState:u=!1}=t;if(p.isContainerSingleMode(e)){const t=p.getActiveContainerItemName(e),r=p.getDataContextName(t);(0,A.isContextDirty)(r)&&(s=!0),u||s||(s=W(t))}else if(p.isContainerMultipleMode(e)&&p.isContainerLimitReached(e)){let t=p.getLeastRecentlyUsedNonDirtyContainerItemID(e);t||(t=p.getActiveContainerItemName(e),r=!0),a.containerItemID=t,a.context=p.getDataContextName(t)}if(s){const e=l||A.FORM_DIRTY_MESSAGE;o=window.confirm(b.localeUtils.getLocaleValue(e,"Messages"))}if(!o&&s&&(a={},n=!1),r){const e=b.localeUtils.getLocaleValue(A.MAX_DOCUMENT_LIMIT_REACHED,"Messages");c?i=window.confirm(e):(window.alert(e),n=!1)}return!i&&r&&(a={},n=!1),{continueExecution:n,removeActionPayload:a}},Y=(e,t)=>{let s=!1;const r=N.default.isCoexistenceAppOfType(d.default.APP_TYPE.UIKIT),{insKey:a,isParallelCall:n,skipFlowNameCheck:o}=t;if(!a)return{};const[,i]=a.split("!")||"",c=o?a:U(a),u=p.getContainerItemName(e,c);let f={},h=!1;if(u&&!r&&(s=!0,f=p.getContainerItemData(e,u),!o)){let e=f?.flowName;const t=(0,S.getContainerNameFromContainerItemID)(u),r=p.getChildContainerItems(u);if(r.length){const s=(0,l.getResolvedTargetName)(t,r[0]);e=p.getContainerItemData(s,r[0])?.flowName}else s=e===i;(e!==i||n)&&(h=!0)}return{activate:s,activateContainerActionPayload:{target:e,isParallelAssignment:h,containerItemID:u,semanticURL:f.semanticURL,insKey:a}}},K=(e,t,s)=>e===R.PAGE?((e,t={})=>{let s=!1;const{semanticURL:r}=t,a=p.getContainerItemName(e,r);return a&&(s=!0),{activate:s,activateContainerActionPayload:{target:e,containerItemID:a,semanticURL:r}}})(t,s):e===R.ASSIGNMENT?Y(t,s):e===R.CASE?Y(t,{...s,skipFlowNameCheck:!0}):{},z=()=>g.postProcess(g.resetContainers,p.resetContainersPayload({context:d.publicConstants.APP.APP,name:d.default.PREVIEW})),J=(e,t)=>(e?.data?.caseInfo&&t?.caseInfo?.content&&(e.data.caseInfo.content=t?.caseInfo?.content),e),X=(e=[])=>{(0,p.hasContainerItems)(`${d.default.APP.APP}/${d.default.PREVIEW}`)&&e.push(z())},Q=e=>{let t;for(const s of Object.keys(D))if(D[s].includes(e)){t=s;break}return t},Z=(e,t)=>{const{data:s={},context:r,caseViewMode:a}=e,n={data:{...s},caseViewMode:a,context:(0,_.getParentContextName)(r)};f.default.deleteIn(n.data,"shared"),f.default.setIn(n.data,["context_data","caseViewMode"],a),t.push({type:h.DELETE_CASE_SUMMARY,payload:{context:n.context}}),t.push(g.postProcess(g.mergeData,n))},ee=e=>{if(Array.isArray(e)&&e.length>0){const t=(e=>{const t=e[0];for(const t of e)if("other"===t?.payload?.nextAssignmentInfo?.context||"remote"===t?.payload?.nextAssignmentInfo?.context)return t;return t})(e),s=f.default.getIn(t,["payload","assignmentContext"]);if("other"===s||"remote"===s){const r=f.default.getIn(t,["payload","nextAssignmentInfo","ID"]);if(t?.payload?.isProcessAction){const s={acName:f.default.getIn(t,["payload","target"]),caseID:t.payload.data.caseInfo.ID,containerItemID:f.default.getIn(t,["payload","context"]),context:f.default.getIn(t,["payload","context"])},r={type:h.CANCEL_ASSIGNMENT,payload:{...s}};e.push(r),e=e.filter((e=>delete e?.payload?.data?.caseMessages)),C.dispatch(e),e=e.filter((e=>e.type!==h.CANCEL_ASSIGNMENT))}const a=((e,t,s)=>({assignmentID:e,vcName:d.default.PRIMARY,targetContainerName:f.default.getIn(t,["payload","target"]),context:f.default.getIn(t,["payload","context"]),..."other"===s&&{isChild:!0},isProcessAction:t?.payload?.isProcessAction,..."remote"===s&&{isRemote:!0},..."remote"===s&&{remoteClassName:t.payload.nextAssignmentInfo.className}}))(r,t,s);p.isContainerSingleMode(a.targetContainerName)||t?.payload?.containerName!==d.default.WORKAREA||(a.isMultiDoc=!0,e=[]);const n={type:h.OPEN_ASSIGNMENT,payload:{...a}};e.push(n),C.dispatch(e)}else C.dispatch(e)}},te=(e,t,s)=>{if(e===R.CASE){if(t?.caseInfo?.assignments&&t?.caseInfo?.assignments.length>0){const{key:e,flowName:r}=F(t.caseInfo.assignments[0].ID);s.key=e||t.caseInfo.ID,s.flowName=r}else s.flowName="",s.key=t?.caseInfo?.ID||t.semanticURL;s.resourceType=e,s.semanticURL=t.semanticURL,s.caseViewMode=d.default.REVIEW_MODE}else s.resourceType=e,s.semanticURL=t.semanticURL;return s},se=(e,t)=>a()(e,t,(function(e,t){if(Array.isArray(e))return e.concat(t)})),re=e=>{let t={},s=p.getContainerParentContext(e);for(;s;){const e=M(s);t=se(e.content,t),s=p.getContainerParentContext(s)}return t},ae=(e,t,s,r)=>{let a={},n=e;if(s.isTraditionalRemoteCase){a={...s};const e=p.getContainerItemName(r,a.insKey);e&&(t.activateContainerActionPayload={containerItemID:e},n=h.ACTIVATE_CONTAINER_ITEM)}return{remoteCasePayload:a,updatedType:n}},ne=(e,t,s)=>{e.isTraditionalRemoteCase&&(s.resourceType=d.publicConstants.CASE,s.key=v.default.getRemoteCaseKey(t.assignmentID,t.insKey),s.data.caseInfo={...s.data.caseInfo,...t,classID:t.className,target:s.target,containerItemID:s.containerItemID,caseTypeID:t.className,content:{pyLabel:t.name}},s.isTraditionalRemoteCase=!0,s.className=t.className)}},"./src/store/state/middlewares/datapage-middleware.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p,getSharedPageUsageMap:()=>d});var r=s("./src/utils/utils.ts"),a=s("./src/store/state/actions/index.ts"),n=s("./src/store/state/actions/action-creators.ts"),o=s("./src/store/state/state-manager.ts"),i=s("./src/constants.ts");const c={},l=e=>{const t=r.default.getIn(c,[i.default.CONTEXT,e],[]),s=[];t.forEach((t=>{const a=t.substr(0,t.lastIndexOf("_")),n=r.default.getIn(c,[a,t],[]),o=n&&n.length>0&&n.indexOf(e);if(o>-1&&n.splice(o,1),!n||n&&0===n.length){r.default.deleteIn(c,[a,t]);const e=r.default.getIn(c,[a]);e&&0===Object.keys(e).length&&r.default.deleteIn(c,[a]),s.push({dataPageName:a,dataPageNameWithHash:t})}})),r.default.deleteIn(c,[i.default.CONTEXT,e]);const a=r.default.getIn(c,[i.default.CONTEXT]);(!a||a&&0===Object.keys(a).length)&&r.default.deleteIn(c,[i.default.CONTEXT]),s.length>0&&(0,o.dispatch)((0,n.removeSharedData)({dataPagesToBeRemoved:s}))},u=(e={},t)=>{Object.keys(e).forEach((s=>{const a=r.default.getIn(e,[s],{});Object.keys(a).forEach((e=>{((e,t,s)=>{const a=r.default.getIn(c,[i.default.CONTEXT,s]);if(r.default.getIn(c,[e])){const a=r.default.getIn(c,[e,t],[]);r.default.setIn(c,[e,t],[...new Set([...a,s])])}else r.default.setIn(c,[e,t],[s]);a?r.default.setIn(c,[i.default.CONTEXT,s],[...new Set([...a,t])]):r.default.setIn(c,[i.default.CONTEXT,s],[t])})(s,e,t)}))}))},d=()=>c,p=()=>e=>t=>{const{payload:{data:s={},context:r=null,childContainersContexts:n=[]}={},type:o}=t;if(n&&n.length>0&&(o===a.REPLACE_CONTAINER_ITEM||o===a.REMOVE_CONTAINER_ITEM)&&n.forEach((e=>{l(e)})),o===a.ADD_CONTAINER_ITEM||o===a.MERGE_DATA||o===a.ADD_SHARED_DATA){const e=o===a.ADD_SHARED_DATA?s:s.shared;u(e,r)}else o===a.REPLACE_CONTAINER_ITEM?(l(r),u(s.shared,r)):o===a.REMOVE_CONTAINER_ITEM&&l(r);e(t)}},"./src/store/state/middlewares/datareference-middleware.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./src/page-instructions/index.ts"),a=s("./src/store/state/actions/index.ts");const n=()=>e=>t=>{const{payload:{context:s=null,transientItemID:n=null}={},type:o}=t;!s||o!==a.ADD_CONTAINER_ITEM&&o!==a.UPDATE_CONTAINER_ITEM&&o!==a.REPLACE_CONTAINER_ITEM&&o!==a.REMOVE_CONTAINER_ITEM||((0,r.clearInstructions)(s),(0,r.clearPageInstructionReferences)(s)),n&&o===a.CLEAR_TRANSIENT_DATA&&((0,r.clearInstructions)(n),(0,r.clearPageInstructionReferences)(n)),e(t)}},"./src/store/state/middlewares/property-change-middleware.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{FORM_DIRTY_MESSAGE:()=>S,MAX_DOCUMENT_LIMIT_REACHED:()=>b,default:()=>L,getChanges:()=>T,isComplexObjectMerged:()=>R,isContextDirty:()=>M,mergeListChanges:()=>N,resetChangedProperties:()=>j,updateChangeList:()=>P,updateServerChangedProperties:()=>x});var r=s("./src/expression/expression-engine.ts"),a=s("./src/store/state/actions/index.ts"),n=s("./src/constants.ts"),o=s("./src/store/state/state-manager.ts"),i=s("./src/cascade/datapage-dependency-handler.ts"),c=s("./src/rules/rules-store.ts"),l=s("./src/utils/utils.ts"),u=s("./src/refresh/refreshHelpers.ts"),d=s("./src/utils/form-handler.ts"),p=s("./src/annotation/utils.ts"),f=s("./src/cascade/manager.ts"),h=s("./src/page-instructions/index.ts"),g=s("./src/page-instructions/utils.ts"),m=s("./src/page-instructions/state-machine-manager.ts"),E=s("./src/refresh/refresh-manager.ts"),A=s("./src/contextree/treemanager.ts");const{APP:_}=n.default;let I={},y={},C={};const S="You will lose unsaved changes. Do you want to continue?",b="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",T=(e=_.APP,t,s)=>{let r=[],a=[];t||(r=(0,d.getVisibleFormFields)(e,!0)),s||(a=(0,d.getReadOnlyFormFields)(e));const n={};((e,t)=>{const s=y[t]||{};Object.keys(s).forEach((t=>{Object.hasOwn(s,t)&&l.default.buildObject(t,e,s[t].value)}))})(n,e);const o=I[e]||{};return Object.keys(o).forEach((e=>{const s=!t&&r.includes(e)||t;Object.prototype.hasOwnProperty.call(o,e)&&s&&!a.includes(e)&&l.default.buildObject(e,n,o[e].value)})),n},N=(e,t={})=>{const s=m.default.buildClientChangeList(e)||{};Object.keys(s).forEach((e=>{l.default.buildObject(e,t,s[e])}))},v=e=>{const{context:t}=e,s=e.reference.startsWith(".")?e.reference.substr(1):e.reference;delete I[t]?.[s],delete y[t]?.[s]},R=e=>C[e],O=(e,t)=>{const{context:s,initialValue:r="",isStrictTracking:a}=t,n=t.reference.startsWith(".")?t.reference.substr(1):t.reference;e[n]?e[n].previousValue=(0,o.getValue)(t.reference,null,s):(e[n]={initialValue:r||(0,o.getValue)(t.reference,null,s)},e[n].previousValue=e[n].initialValue),e[n].value=t.value,a&&e[n].value===e[n].initialValue&&v(t)},D=e=>{const{payload:t}=e,{context:s}=t,r=t.reference.startsWith(".")?t.reference.substr(1):t.reference;A.default.isFieldExists(s,r)||(y[s]=y[s]||{},O(y[s],t)),I[s]=I[s]||{},O(I[s],t)},x=(e,t)=>{const s=I[e]||{};Object.keys(s).forEach((e=>{l.default.hasIn(t,e)&&(s[e].value=l.default.getIn(t,e))}))},P=({value:e,context:t,reference:s})=>{if(g.default.isPageInstruction(s))return;const r=s?.startsWith(".")?s?.substr(1):s;I[t]=I[t]||{},I[t][r]||(I[t][r]={initialValue:(0,o.getValue)(r,null,t)}),I[t][r].value=e},M=e=>{const t=(0,h.getChangedInstructions)(e)||{};return e&&I[e]&&Object.keys(I[e]).some((t=>I[e][t].initialValue!==I[e][t].value))||Object.keys(t).length>0},w=(e,t)=>{if(!e||!t)return!1;const s=I[e]&&I[e][t];return!!s&&s.previousValue!==s.value},j=e=>{e&&I[e]?(I[e]={},y[e]={}):"all"===e&&(I={},y={},C={}),C[e]&&(C[e]=!1)},L={propertyChangeMiddleware:()=>e=>t=>{const{type:s,payload:d={}}=t||{};if(s===a.FIELD_CHANGE&&((0,r.handleChange)(d),(e=>{const{context:t,pageReference:s,value:r,reference:u}=e;f.default.triggerCascade(t,u,r);const d=i.default.getDependencies(t,u),h=f.default.getResetDependencies(t,u),E={context:t,datapages:{}};[...d,...h].forEach((e=>{const s=l.default.getPropertyNameFromDependency(e);if("multiRecord"===e.mode){const e=s.split("."),r=`.${e.pop()}`,a=e.join(".");m.default.getStateMachine(t,a,r).deleteAll()}else g.default.isPageInstruction(s)&&m.default.executeStateMachine(t,s,""),(0,o.dispatch)({type:a.SET_PROPERTY,payload:{reference:s,value:"",context:t,isArrayDeepMerge:!0,isImplicit:!0}})})),d.forEach((r=>{let a=s;r.startsWith(s)||(a="");const i=r.replace(`${a}`,"").split(".").filter((e=>!!e));i.pop();const u=i.join("."),d=(0,o.getValue)(`.${u}`,a,t)?.classID||e.classID,f=(0,c.getPropertyMetadata)(r.split(".").pop(),d),{datasource:h}=f,g={};let m=[];h.parameters.forEach((e=>{e?.value?(g[e.name]=p.default.isProperty(e.value)?(0,o.getValue)(`.${l.default.getFullPropertyReference([u,l.default.getPropertyName(e.value)])}`,a,t):e.value,void 0===g[e.name]||null===g[e.name]||""===g[e.name]?(g[e.name]="",m.push(n.default.NULL_STRING)):m.push(g[e.name])):(g[e.name]="",m.push(n.default.NULL_STRING))})),m=h.name.concat(n.default.UNDERSCORE_STRING,l.default.getHashedString(m.join(n.default.HASH_DELIMITER)));const{name:A}=h,_=(0,c.getDataPageMetadata)(A);E.datapages[m]={mode:h.mode,propertyName:r,name:h.name,dataViewParameters:g,refreshStrategy:_?.refreshStrategy}})),d.length&&(0,o.dispatch)({type:a.FETCH_DATAPAGE,payload:E})})(d),(w(d.context,d.reference)||(0,h.isPropertyDirtyPageInstruction)(d.context))&&u.refreshOnPropertyChange(d),E.default.triggerRefreshForType("PROP_CHANGE",d.reference,d.context)),s===a.LIST_ACTION){const{context:e,referenceList:t}=d;u.refreshOnPropertyChange({context:e,pageReference:t})}if(s===a.SET_PROPERTY||s===a.REPLACE_PROPERTY){const{reference:e,isImplicit:s,context:r,skipDirtyValidation:a=!1}=d;A.default.updateFieldNodeValue(r,e,d.value),g.default.isPageInstruction(e)||a?a||(C[`${r}`]=!0):D(t),(d.removePropertyFromChangedList||s)&&v(d)}if(s===a.CLEAR_TRANSIENT_DATA||s===a.PURGE_TRANSIENT_DATA){const{transientItemID:e,data:t}=d;l.default.iterateLeafNodes(t,(t=>{v({context:e,value:"",reference:t.join(".")})}))}const _=[a.UPDATE_CONTAINER_ITEM,a.REMOVE_CONTAINER_ITEM,a.REPLACE_CONTAINER_ITEM];s&&_.includes(s)&&(j(d.context),f.default.purgeResetDependencies(d.context),u.removeViewsFromTargetList(d.context),(d.childContainersContexts||[]).forEach((e=>{j(e)})),(d.transientItems||[]).forEach((e=>{j(e)}))),e(t)},getChanges:T,recordChange:D,isDirty:()=>Object.keys(I).some((e=>M(e))),isPropertyDirty:w,isContextDirty:M,resetChangedProperties:j,deleteRecordedChange:v,isComplexObjectMerged:R}},"./src/store/state/middlewares/pubsub-middleware.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/constants.ts"),a=s("./src/utils/pubsub-utils.ts"),n=s("./src/utils/utils.ts"),o=s("./src/store/state/actions/index.ts"),i=s("./src/garbage-collector/index.ts");const c=e=>t=>s=>{const{type:c,payload:{target:l,containerItemID:u,context:d,childContainersContexts:p=[],containerInfo:{newAccessedOrder:f,containerType:h}={}}={}}=s,{PUB_SUB_EVENTS:g}=r.publicConstants;if(c===o.REMOVE_CONTAINER_ITEM){const{resourceType:t,key:s,context:o}=n.default.getIn(e.getState(),["containers",l,"items",u])||{},i={resourceType:t,key:s,context:o,containerItemID:u};a.default.publish(g.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,i),l===`${r.publicConstants.APP.APP}/${r.default.PRIMARY}`&&h===r.default.CONTAINER_TYPE.MULTIPLE&&a.default.publish(g.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:s,newAccessedOrder:f})}p&&p.length>0&&(c===o.REPLACE_CONTAINER_ITEM||c===o.REMOVE_CONTAINER_ITEM)&&p.forEach((e=>{i.default.cleanCaches(e)})),c!==o.REPLACE_CONTAINER_ITEM&&c!==o.REMOVE_CONTAINER_ITEM||i.default.cleanCaches(d),t(s)}},"./src/store/state/middlewares/validation-middleware.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/store/state/actions/index.ts"),a=s("./src/utils/form-handler.ts"),n=s("./src/contextree/treemanager.ts");const o=()=>e=>t=>{const{type:s="",payload:o={}}=t||{},{category:i,context:c,transientItemID:l}=o;"HTTP"!==i&&[r.ADD_CONTAINER_ITEM,r.UPDATE_CONTAINER_ITEM,r.REMOVE_CONTAINER_ITEM,r.REPLACE_CONTAINER_ITEM,r.UPDATE_TRANSIENT_DATA,r.REPLACE_TRANSIENT_DATA].includes(s)&&((0,a.removeFormFieldsFromMap)(c||l),n.default.removeContextTreeNode(c||l)),e(t)}},"./src/store/state/reducers/data/case-reducer.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var r=s("./node_modules/immer/dist/immer.mjs"),a=s("./src/store/state/state-manager.ts"),n=s("./src/store/state/actions/index.ts"),o=s("./src/constants.ts"),i=s("./src/utils/utils.ts"),c=s("./src/store/state/reducers/helper.ts");const l=(e,t=[])=>{t.forEach((t=>i.default.deleteIn(e,t)))},u=(e,t=[])=>{t.forEach((t=>i.default.deleteIn(e,t)))},d=(e,t=[])=>{t.forEach((t=>{i.default.deleteIn(e,t)}))},p=(e,t,s={})=>{const{deleteAssignmentSpecificResources:r=!0,doDeleteConfirmationDetails:a=!0}=s;i.default.deleteIn(e,[t,"nextAssignmentInfo"]),i.default.deleteIn(e,[t,"caseInfo","availableActions"]),i.default.deleteIn(e,[t,"caseInfo","availableProcesses"]),i.default.deleteIn(e,[t,"caseInfo","activeActionID"]),i.default.deleteIn(e,[t,"caseInfo","assignments"]),i.default.deleteIn(e,[t,"caseInfo","childCases"]),a&&(i.default.deleteIn(e,[t,"caseInfo","confirmationLinks"]),i.default.deleteIn(e,[t,"caseMessages"])),r&&(i.default.deleteIn(e,[t,"caseInfo","actionButtons"]),i.default.deleteIn(e,[t,"caseInfo","navigation"]))},f=(e,t)=>(0,r.produce)(e||{},(e=>{switch(t.type){case n.ADD_CONTAINER_ITEM:{if(!t.payload.data||e[t.payload.context])return e;t.payload.doDeleteCaseSummary&&p(e,t.payload.context);const{target:s}=t.payload;return!s||-1===s.indexOf(o.default.WORKAREA)&&-1===s.indexOf(o.default.MODAL)?e[t.payload.containerItemID]=t.payload.data:e[t.payload.context]=t.payload.data,(0,c.setCaseViewMode)(e,t.payload),(0,c.setActionTypeAndAssignmentId)(e,t.payload),(0,c.processSharedData)(e,t.payload),(0,c.deleteBlockingActionCounter)(e,t.payload),e}case n.UPDATE_CONTAINER_ITEM:{t.payload.doDeleteCaseSummary&&p(e,t.payload.context,{deleteAssignmentSpecificResources:t.payload.deleteAssignmentSpecificResources});const{target:s,propertiesToReplace:r=[]}=t.payload;return!s||-1===s.indexOf(o.default.WORKAREA)&&-1===s.indexOf(o.default.MODAL)?e[t.payload.containerItemID]=(0,a.mergeDeep)(e[t.payload.containerItemID],t.payload.data,{propertiesToReplace:[...r]}):e[t.payload.context]=(0,a.mergeDeep)(e[t.payload.context],t.payload.data,{propertiesToReplace:[...r]}),(t.payload.actionType||t.payload.assignmentID)&&(0,c.setActionTypeAndAssignmentId)(e,t.payload),(0,c.setCaseViewMode)(e,t.payload),(0,c.processSharedData)(e,t.payload),u(e,t.payload.suggestionContexts),e}case n.REMOVE_CONTAINER_ITEM:{const{childContainersContexts:s=[]}=t.payload;return((e,t)=>{const{containerItemID:s,context:r,deleteContext:a}=t;a&&i.default.deleteIn(e,[r]),i.default.deleteIn(e,[s])})(e,t.payload),d(e,s),l(e,t.payload.transientItems),u(e,t.payload.suggestionContexts),e}case n.RESET_CONTAINERS:{const{containerItems:s}=t.payload;return Array.isArray(s)?s.forEach((t=>{i.default.deleteIn(e,[t])})):i.default.deleteIn(e,[s]),e}case n.UPMERGE_AND_REMOVE_CONTAINER_ITEM:{const{context:s,contextToBeRemoved:r,data:n,childContainersContextsToBeRemoved:o}=t.payload;return p(e,t.payload.context),(0,c.setCaseViewMode)(e,t.payload),e[s]=(0,a.mergeDeep)(e[s],e[r]),e[s]=(0,a.mergeDeep)(e[s],n),i.default.deleteIn(e,[r]),d(e,o),(0,c.processSharedData)(e,t.payload),e}case n.REPLACE_CONTAINER_ITEM:{const{payload:{context:s,pulseReplace:r=!0,childContainersContexts:n=[]}}=t;let{payload:{data:o}}=t;const p=i.default.getIn(e[s],"pulse");let f=i.default.getIn(e[s],"OperatorID"),h=i.default.getIn(e[s],"pxRequestor");return h&&o.pxRequestor&&(h=i.default.mergeDeep(h,o.pxRequestor)),f&&o.OperatorID&&(f=i.default.mergeDeep(f,o.OperatorID)),!r&&p&&(o=(0,a.updateValue)(o,"pulse",p),o=(0,a.updateValue)(o,"OperatorID",f),o=(0,a.updateValue)(o,"pxRequestor",h)),i.default.setIn(e,s,o),(0,c.setCaseViewMode)(e,t.payload),(0,c.processSharedData)(e,t.payload),d(e,n),l(e,t.payload.transientItems),u(e,t.payload.suggestionContexts),e}case n.DELETE_CASE_SUMMARY:{const{context:s,doDeleteConfirmationDetails:r=!0}=t.payload;return p(e,s,{doDeleteConfirmationDetails:r}),e}case n.ADD_TRANSIENT_ITEM:{const{transientItemID:s,data:r}=t.payload;return i.default.setIn(e,s,r)}case n.REMOVE_TRANSIENT_ITEM:case n.REMOVE_ALL_TRANSIENT_ITEMS:{const{transientItems:s}=t.payload;return s.forEach((t=>i.default.deleteIn(e,t))),e}case n.UPDATE_TRANSIENT_DATA:case n.CLEAR_TRANSIENT_DATA:{const{transientItemID:s,data:r}=t.payload;return(0,a.mergeDeep)(i.default.getIn(e,s),r),e}case n.PURGE_TRANSIENT_DATA:{const{transientItemID:s,data:r}=t.payload;for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&i.default.deleteIn(e,[s,t]);return e}case n.REPLACE_TRANSIENT_DATA:{const{transientItemID:s,data:r}=t.payload;return i.default.deleteIn(e,s),i.default.setIn(e,s,r)}case n.SET_SHARED_PROPERTY:{const{key:s,value:r}=t.payload;return i.default.setIn(e,`${o.default.SHARED}.${s}`,r),e}case n.ADD_SUGGESTION_CONTEXT:{const{context:s,data:r}=t.payload;return i.default.setIn(e,s,r)}default:return e}}))},"./src/store/state/reducers/data/error-reducer.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{addFieldErrors:()=>E,buildPageErrors:()=>A,default:()=>_});var r=s("./node_modules/immer/dist/immer.mjs"),a=s("./src/store/state/actions/index.ts"),n=s("./src/store/state/reducers/index.ts"),o=s("./src/constants.ts"),i=s("./src/utils/utils.ts"),c=s("./src/store/state/epics/util.ts"),l=s("./src/messages/index.ts"),u=s("./src/container/container-utils.ts"),d=s("./src/utils/context-utils.ts");const p=/\[(\d+)\]$/gi,f=/(\d+)/gi,h=/\[.\]$/gi,g=(e,t,s,r=[o.default.CONTEXT_DATA,o.default.CASE_INFO.CASE_INFO,o.default.CONTENT])=>{const a=i.default.getIn(t,r);if(a){const t=[],n=(0,l.getAllMessagesPaths)(a,[],t);for(const t of n)i.default.setIn(e[s],[...r,...t],{})}},m=(e,t,s,r)=>{const{property:a,pageReference:n,category:c,type:u}=r.payload,d=i.default.getIn(e[t],s);if(d&&c===o.default.CASEMESSAGES)i.default.setIn(e[t],(0,l.getMessagesPath)(a,n,c),"");else if(d&&d.length>0&&Array.isArray(d)){const r=d.filter((e=>e.type!==u));s&&s.length>0&&i.default.setIn(e[t],(0,l.getMessagesPath)(a,n,c),r)}},E=(e,t,s)=>{s.forEach((s=>{((e,t,s)=>{const r=s[o.default.ERROR_FIELD_IN_PAGE].slice(1),a=s[o.default.ERROR_IN_PAGE_IDENTIFIER].slice(1);if(a){let n=r?`caseInfo.content.${r}`:"caseInfo.content";n=n.replace(/\(/g,"[").replace(/\)/g,"]");const c=(0,l.getMessagesPath)(a,n,o.default.PROPERTY),u={type:o.publicConstants.MESSAGES.MESSAGES_TYPE_ERROR,message:s.localizedValue},d=i.default.getIn(e[t],c,[]);if(i.default.isContains(d,u))return;i.default.setIn(e[t],c,[...d,u])}})(e,t,s)}))},A=e=>{const t=[];return e.forEach((e=>{t.push({type:o.publicConstants.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue})})),t},_=(e,t)=>(0,r.produce)(e||(0,n.getInitialState)().data,(e=>{switch(t.type){case a.ERROR:return t.payload.err.errorDetails&&("Validation fail"===t.payload.err.errorClassification||t.payload.err.displayButtonsOnErrors.length>0)?function(e,t){const{err:s,formFields:r}=t.payload;let{context:a}=t.payload;const{fieldErrors:n,pageErrors:p}=(0,c.processErrorResponse)(s.errorDetails,r);if(i.default.setIn(e,[a,...l.MESSAGES_PATH.FIELD_MESSAGES_PATH],{}),i.default.setIn(e,[a,...l.MESSAGES_PATH.PAGE_MESSAGES_PATH],[]),n.forEach((t=>{if(t[o.default.ERROR_FIELD_IN_PAGE]){const s=t[o.default.ERROR_FIELD_IN_PAGE].slice(1);if(s){const t=function(e){let t=null;const s=e.lastIndexOf(".");return s<0?null:(t=e.substring(0,s),t?`caseInfo.content.${t}`.replace(/\(/g,"[").replace(/\)/g,"]"):t)}(s);if(!t)return!1;const r=s.substring(s.lastIndexOf(".")+1),n=(0,l.getMessagesPath)(r,t,o.default.PROPERTY);i.default.setIn(e,[a,...n],[])}}})),n.length>0&&E(e,a,n),p.length>0){const t=A(p);e[a]||(a=o.default.APP.APP),i.default.setIn(e,[a,...l.MESSAGES_PATH.PAGE_MESSAGES_PATH],t)}else a.includes&&a.includes(u.CONTAINER_NAMES.WORKAREA)&&(a=(0,d.getParentContextName)(a)),i.default.deleteIn(e,[a,...l.MESSAGES_PATH.PAGE_MESSAGES_PATH]);return e}(e,t):e;case a.UPDATE_CONTAINER_ITEM:{const{context:s}=t.payload,r=[s,...l.MESSAGES_PATH.FIELD_MESSAGES_PATH],a=[s,...l.MESSAGES_PATH.PAGE_MESSAGES_PATH];if(i.default.setIn(e,r,{}),i.default.setIn(e,a,[]),s&&s.includes(u.CONTAINER_NAMES.WORKAREA)){const t=[(0,d.getParentContext)(s),...l.MESSAGES_PATH.PAGE_MESSAGES_PATH];i.default.setIn(e,t,[])}return e}case a.CLEAR_MESSAGES:{const{isListEntry:s}=t.payload;return s?((e,t)=>{const{property:s,pageReference:r,category:a,isListEntry:n,deletingIndex:o,stateObj:c}=t.payload,{context:u}=t.payload;if(c)return g(e,c,u),e;const d=(0,l.getMessagesPath)(s,r,a,n);if(Number.isInteger(o)){i.default.deleteIn(e[u],d);const t=d.slice(0,d.length-1);let s=i.default.getIn(e[u],t)||{};const r=Object.keys(s);s=r.map((e=>s[e])),s.forEach(((s,a)=>{const n=r[a].match(p);if(n?.length){const c=parseInt(n[0].match(f)[0],10);c>o&&(i.default.deleteIn(e[u],t.concat(r[a])),i.default.setIn(e[u],t.concat(r[a].replace(h,`[${c-1}]`)),s))}}))}else i.default.setIn(e[u],d,{});return e})(e,t):((e,t)=>{const{property:s,pageReference:r,category:a,isListEntry:n,stateObj:i}=t.payload,{context:c}=t.payload;let p=c;if(i)return g(e,i,c),e;const f=(0,l.getMessagesPath)(s,r,a,n);return a===o.default.PAGE&&c?.includes(u.CONTAINER_NAMES.WORKAREA)&&(p=(0,d.getParentContextName)(c)),m(e,p,f,t),m(e,c,f,t),e})(e,t)}case a.ADD_MESSAGES:{const{messages:s,property:r,pageReference:a,context:n,category:o}=t.payload,c=(0,l.getMessagesPath)(r,a,o);return s&&s.length>0&&Array.isArray(s)&&c&&c.length>0&&i.default.setIn(e[n],(0,l.getMessagesPath)(r,a,o),s),e}default:return e}}))},"./src/store/state/reducers/data/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{dataReducer:()=>u,default:()=>d});var r=s("./src/store/state/reducers/index.ts"),a=s("./src/store/state/actions/index.ts"),n=s("./src/store/state/reducers/data/case-reducer.ts"),o=s("./src/store/state/reducers/data/ui-reducer.ts"),i=s("./src/store/state/reducers/data/error-reducer.ts"),c=s("./src/store/state/reducers/data/list-reducer.ts");const l=[o.default,n.default,i.default,c.default],u=(e,t)=>(e||(e=(0,r.getInitialState)().data),t.type===a.RESET_STORE?(0,r.getInitialState)().data:(l.forEach((s=>{e=s(e,t)})),e)),d=u},"./src/store/state/reducers/data/list-reducer.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("./node_modules/immer/dist/immer.mjs"),a=s("./src/constants.ts"),n=s("./src/utils/utils.ts"),o=s("./src/store/state/actions/index.ts"),i=s("./src/store/state/state-manager.ts"),c=s("./src/page-instructions/index.ts"),l=s("./src/messages/index.ts"),u=s("./src/contextree/treemanager.ts");const d=(e,t)=>(0,r.produce)(e,(e=>{if(t.type===o.LIST_ACTION){const{instruction:s,actions:r,context:o,referenceList:d,listIndex:p,listMoveToIndex:f,content:h={}}=t.payload,g=(0,i.getReferenceTokens)(d);switch(s){case a.default.LIST_ACTIONS.INSERT:((e,t,s,r,a)=>{n.default.setIn(e[t],[...s,r],a)})(e,o,g,p,h);break;case a.default.LIST_ACTIONS.UPDATE:((e,t,s,r,a)=>{const o=(0,i.mergeDeep)(n.default.getIn(e[t],[...s,r],{}),a);n.default.setIn(e[t],[...s,r],o)})(e,o,g,p,h);break;case a.default.LIST_ACTIONS.DELETE:((e,t,s,r)=>{const a=n.default.getIn(e[t],s,[]);a.splice(r,1),n.default.setIn(e[t],s,a),u.default.deleteListNode(t,s,a.length)})(e,o,g,p);break;case a.default.LIST_ACTIONS.MOVE:((e,t,s,r,a)=>{const o=n.default.getIn(e[t],[...s,r],{}),i=n.default.getIn(e[t],s,[]);i.splice(r,1),i.splice(a,0,o),n.default.setIn(e[t],s,i),(0,l.reorderMessages)(e,t,s?.join("."),r,a)})(e,o,g,p,f);break;case a.default.LIST_ACTIONS_TYPE.SELECT_DESELECT:((e,t,s,r)=>{const o=n.default.getIn(e[t],s)||[];r.forEach((e=>{const{instruction:r,content:n,listIndex:i}=e;if(r===a.default.LIST_ACTIONS.SELECT){o[i]=n;const e=s?.join(".");(0,c.addPageInstructionReferences)(t,e)}else delete o[i]})),n.default.setIn(e[t],s,o.filter(Boolean))})(e,o,g,r);break;case a.default.LIST_ACTIONS_TYPE.DESELECT_ALL:((e,t,s)=>{n.default.setIn(e[t],s,[])})(e,o,g)}}return e}))},"./src/store/state/reducers/data/ui-reducer.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./node_modules/immer/dist/immer.mjs"),a=s("./src/utils/utils.ts"),n=s("./src/store/state/state-manager.ts"),o=s("./src/store/state/actions/index.ts"),i=s("./src/store/state/reducers/helper.ts");const c=(e,t)=>(0,r.produce)(e,(e=>{switch(t.type){case o.MERGE_DATA:{const{propertiesToReplace:s=[]}=t.payload;return e[t.payload.context]=n.mergeDeep(e[t.payload.context],t.payload.data,{isArrayDeepMerge:t.payload.isArrayDeepMerge,propertiesToReplace:[...s]}),(0,i.setCaseViewMode)(e,t.payload,!0),(0,i.processSharedData)(e,t.payload),e}case o.SET_PROPERTY:{const{context:s,reference:r,value:a,isArrayDeepMerge:o}=t.payload;return n.updateValue(e[s],r,a,{isArrayDeepMerge:o}),e}case o.REPLACE_PROPERTY:{const{context:s,reference:r,value:a}=t.payload;return n.replaceValue(e[s],r,a),e}case o.REMOVE_ITEM:return n.removeItem(e[t.payload.context],t.payload.reference),e;case o.SET_LOADING:return a.default.setIn(e[t.payload.context],"context_data.isLoading",!0),e;case o.RESET_LOADING:return a.default.setIn(e[t.payload.context],"context_data.isLoading",!1),e;case o.ADD_SHARED_DATA:{const{data:s}=t.payload;return(0,i.processSharedData)(e,{data:{shared:s}}),e}case o.REMOVE_SHARED_DATA:{const{dataPagesToBeRemoved:s=[]}=t.payload;return s.forEach((t=>{const{dataPageName:s,dataPageNameWithHash:r}=t;a.default.deleteIn(e.shared,[s,r]);const n=a.default.getIn(e.shared,[s]);n&&0===Object.keys(n).length&&a.default.deleteIn(e.shared,[s])})),e}case o.ALTER_BLOCKING_ACTION_COUNT:{const s=a.default.getIn(e[t.payload.context].context_data,"blocking_action_counter",0);return t.payload.isInitiateBlockingAction?a.default.setIn(e[t.payload.context].context_data,"blocking_action_counter",s+1):a.default.setIn(e[t.payload.context].context_data,"blocking_action_counter",s-1),e}default:return e}}))},"./src/store/state/reducers/helper.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{deleteBlockingActionCounter:()=>u,processSharedData:()=>i,setActionTypeAndAssignmentId:()=>l,setCaseViewMode:()=>c});var r=s("./src/utils/utils.ts"),a=s("./src/constants.ts"),n=s("./src/datapage/index.ts"),o=s("./src/container/container-utils.ts");const i=(e,t)=>{const{data:{shared:s={}}={},context:o}=t;((e,t)=>{n.default.updateDataPageStore(t),Object.keys(t).forEach((s=>{r.default.getIn(e,[a.default.SHARED,s])?Object.keys(t[s]).forEach((n=>{r.default.setIn(e,[a.default.SHARED,s,n],t[s][n])})):r.default.setIn(e,[a.default.SHARED,s],t[s])}))})(e,s),o&&r.default.deleteIn(e,[o,"shared"])},c=(e,t,s=!1)=>{const{context:n,caseViewMode:i=(s?void 0:a.default.PERFORM_MODE),containerName:c}=t;c!==o.CONTAINER_NAMES.WORKAREA&&i&&r.default.setIn(e,[n,"context_data","caseViewMode"],i)},l=(e,t)=>{const{context:s}=t;r.default.setIn(e,[s,"context_data","actionType"],t.actionType),r.default.setIn(e,[s,"context_data","assignmentID"],t.assignmentID)},u=(e,t)=>{const{context:s}=t;r.default.deleteIn(e,[s,"context_data","blocking_action_counter"]),r.default.deleteIn(e,[s,"context_data","deferred_action_queue"])}},"./src/store/state/reducers/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{getInitialState:()=>l,getRootReducer:()=>u,setInitialState:()=>c});var r=s("./node_modules/redux/dist/redux.mjs"),a=s("./src/constants.ts"),n=s("./src/store/state/reducers/data/index.ts"),o=s("./src/store/state/reducers/routing/index.ts");let i={};const c=e=>{const t=e.Data||e.data,{uiResources:s={}}=e,r=s[a.default.CONTEXT_DATA]||e[a.default.CONTEXT_DATA];i={data:{[a.default.APP.APP]:{...t,[a.default.CONTEXT_DATA]:r}},containers:{}}},l=()=>i,u=e=>(c(e),(0,r.combineReducers)({data:n.dataReducer,containers:o.default}))},"./src/store/state/reducers/routing/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var r=s("./node_modules/lodash.mergewith/index.js"),a=s.n(r),n=s("./node_modules/immer/dist/immer.mjs"),o=s("./src/utils/utils.ts"),i=s("./src/store/state/actions/index.ts"),c=s("./src/store/state/reducers/index.ts"),l=s("./src/actions/manager.ts");const u=(e,t=[])=>{t.forEach((t=>{o.default.deleteIn(e,[t])}))},d=(e,t)=>{const{type:s,payload:r}=t,a=s===i.UPDATE_CONTAINER_ITEM,{target:n,context:c,semanticURL:l="",root:d,containerItemID:p,childContainers:f,flowName:h,resourceType:g="",key:m="",clearView:E=!1}=r;return d?o.default.setIn(e,[n,"items",p,"view"],d):E&&o.default.deleteIn(e,[n,"items",p,"view"]),c&&o.default.setIn(e,[n,"items",p,"context"],c),h&&o.default.setIn(e,[n,"items",p,"flowName"],h),(!a||a&&m)&&o.default.setIn(e,[n,"items",p,"key"],m.trim()),(!a||a&&l)&&o.default.setIn(e,[n,"items",p,"semanticURL"],l),(!a||a&&g)&&o.default.setIn(e,[n,"items",p,"resourceType"],g),u(e,f),e},p=(e,t)=>(e||(e=(0,c.getInitialState)().containers),t.type===i.RESET_STORE?(0,c.getInitialState)().containers:(0,n.produce)(e,(e=>{switch(t.type){case i.INIT_CONTAINERS:{const{context:s,name:r,type:a,actionMgrID:n}=t.payload,i=`${s}/${r}`;let c=null;return l.ActionManagerInstance.resolveActionByID(n,null,!1),e[i]||(c={type:a,accessedOrder:[],items:{}},o.default.setIn(e,[i],c)),e}case i.REMOVE_CONTAINER:{const{containerName:s,childContainers:r=[]}=t.payload;return o.default.deleteIn(e,[s]),r.forEach((t=>{o.default.deleteIn(e,[t])})),e}case i.RESET_CONTAINERS:{const{context:s,name:r,actionMgrID:a,childContainers:n}=t.payload,i=`${s}/${r}`;return l.ActionManagerInstance.resolveActionByID(a,null,!1),o.default.setIn(e,[i,"accessedOrder"],[]),o.default.setIn(e,[i,"items"],{}),Array.isArray(n)&&n.forEach((t=>{o.default.deleteIn(e,[t])})),e}case i.ADD_CONTAINER_ITEM:{const{target:s,context:r,isInCreateStage:n,isBulkAction:o,semanticURL:i,root:c,containerItemID:u,actionMgrID:p,key:f,flowName:h,resourceType:g,actionName:m,isMinimizable:E,showProgress:A,progressMessage:_,modalOptions:I,resourceStatus:y,actionID:C,isMultiRecordData:S,acTertiary:b,parentContext:T,heading:N,isTraditionalRemoteCase:v}=t.payload,R=e[s],O=R&&R.type,D=R&&R.accessedOrder||[],x=R&&R.items||{};let P=null;return e[s]&&"single"===O&&D.length>0?d(e,t):(P={accessedOrder:[...D,u],items:{...x,[u]:{view:c,semanticURL:i,key:f,flowName:h,context:r,isInCreateStage:n,resourceType:g,actionName:m,isMinimizable:E,...o&&{isBulkAction:o},showProgress:A,progressMessage:_,modalOptions:I,isTraditionalRemoteCase:v,resourceStatus:y,...C&&{actionID:C},...b&&{acTertiary:b},...S&&{isMultiRecordData:S},...T&&{parentContext:T},heading:N}}},l.ActionManagerInstance.resolveActionByID(p,null,!1),e[s]=a()(e[s],P),e)}case i.UPDATE_CONTAINER_ITEM:{const{actionMgrID:s,data:r}=t.payload;let a=e;try{a=d(e,t),l.ActionManagerInstance.resolveActionByID(s,r,!1)}catch{l.ActionManagerInstance.rejectActionByID(s,!1)}return a}case i.REPLACE_CONTAINER_ITEM:return((e,t)=>{const{actionMgrID:s,data:r,target:a,containerItemID:n}=t.payload;let i=e;try{const c=e&&e[a]?.type;let u=e&&e[a]?.accessedOrder||[];u="single"===c?u.length>0?u:[...u,n]:u.includes(n)?u:[...u,n],o.default.setIn(e,[a,"items",n,"transientItems"],[]),o.default.setIn(e,[a,"accessedOrder"],u),i=d(e,t),l.ActionManagerInstance.resolveActionByID(s,r,!1)}catch{l.ActionManagerInstance.rejectActionByID(s,!1)}return i})(e,t);case i.ACTIVATE_CONTAINER_ITEM:{const{target:s,containerItemID:r,actionMgrID:a}=t.payload;try{const t=o.default.getIn(e,[s,"accessedOrder"]).filter((e=>e!==r));t.push(r),o.default.setIn(e,[s,"accessedOrder"],t),l.ActionManagerInstance.resolveActionByID(a,null,!1)}catch{l.ActionManagerInstance.rejectActionByID(a,!1)}return e}case i.UPMERGE_AND_REMOVE_CONTAINER_ITEM:case i.REMOVE_CONTAINER_ITEM:{const{target:s,containerItemID:r,actionMgrID:a,childContainers:n}=t.payload;try{const t=o.default.getIn(e,[s,"accessedOrder"]).filter((e=>e!==r));o.default.setIn(e,[s,"accessedOrder"],t),o.default.deleteIn(e,[s,"items",r]),u(e,n),l.ActionManagerInstance.resolveActionByID(a,null,!1)}catch{l.ActionManagerInstance.rejectActionByID(a,!1)}return e}case i.ADD_TRANSIENT_ITEM:{const{transientItemID:s,target:r,contextName:a}=t.payload,n=o.default.getIn(e,[r,"items",a,"transientItems"])??[];return o.default.setIn(e,[r,"items",a,"transientItems"],[...n,s])}case i.REMOVE_ALL_TRANSIENT_ITEMS:{const{target:s,containerItemID:r}=t.payload;return o.default.deleteIn(e,[s,"items",r,"transientItems"]),e}case i.REMOVE_TRANSIENT_ITEM:{const{target:s,transientItemID:r,containerItemID:a}=t.payload,n=(o.default.getIn(e,[s,"items",a,"transientItems"])??[]).filter((e=>e!==r));return o.default.setIn(e,[s,"items",a,"transientItems"],n)}default:return e}})))},"./src/store/state/state-manager.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{dispatch:()=>h,getActionType:()=>y,getContextValue:()=>_,getDataObject:()=>g,getReferenceTokens:()=>d,getSharedDataObject:()=>m,getStore:()=>f,getValue:()=>A,isMergeable:()=>S,lookupContextValue:()=>I,mergeDeep:()=>b,removeItem:()=>C,replaceValue:()=>N,resetStore:()=>v,setStore:()=>p,updateValue:()=>T});var r=s("./node_modules/lodash.mergewith/index.js"),a=s.n(r),n=s("./src/utils/utils.ts"),o=s("./src/constants.ts"),i=s("./src/cascade/manager.ts"),c=s("./src/actions/manager.ts"),l=s("./src/store/state/actions/index.ts");let u=null;const d=e=>e?.split(/\.(?![^[]+\])|\[|\]/g).filter(Boolean),p=e=>{u=e},f=()=>u,h=e=>{if(!e)return;let t=[],s=[];Array.isArray(e)||"MERGE_DATA"!==e.type||({changedListProperty:t,leafProperty:s}=i.default.getServerProperties(e.payload.data,e.payload.context,e.payload.rootPageReference)),f()?.dispatch(e),Array.isArray(e)||"MERGE_DATA"!==e.type||i.default.handleServerChanges(e.payload.context,t,s)},g=e=>f()?.getState().data?.[e],m=()=>f()?.getState().data[o.default.SHARED],E=(e,t,s)=>{if(!(r=e)||r.startsWith('"')||r.startsWith("'"))return(e=>e&&e.trim().substring(1,e.length-1))(e);var r;const a=e?.startsWith(".")?t+e:e,o=d(a);return n.default.getIn(s,o)},A=(e,t,s)=>E(e,t,g(s)),_=(e,t,s)=>E(t,e?`${o.default.CONTEXT_DATA}.${e}`:`${o.default.CONTEXT_DATA}`,g(s)),I=(e,t,s)=>((e,t,s)=>{const r=d(`${t}.${s}`);return n.default.getIn(e,r)})(g(s),`${o.default.CONTEXT_DATA}.${e}`,t),y=e=>{const{context:t}=e,s=f()?.getState().data[t];if(s)return l.UPDATE_DOCUMENT;const{action:r}=e;return["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"].includes(r)?l.ADD_CONTAINER_ITEM:l.UPDATE_DOCUMENT},C=(e,t)=>{const s=d(t);return n.default.deleteIn(e,s)},S=e=>!Array.isArray(e)&&"object"==typeof e,b=(e,t,s={})=>{const{isArrayDeepMerge:r,propertiesToReplace:o=[]}=s;Array.isArray(e)&&!t&&(t=[]),Array.isArray(o)&&o.length>0&&o.forEach((t=>{n.default.setIn(e,t,{})}));const i=(e,t)=>{if(S(e)&&null!==t&&"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)return a()(e,t,i);if(Array.isArray(e)&&null!==t&&Array.isArray(t)){if(r)return a()(e,t,i);{const s=t.length;if(void 0===r&&s===e.length)return a()(e,t,i)}}return""===t&&e&&"object"==typeof e?e:t};return i(e,t)},T=(e,t,s,r={isArrayDeepMerge:!0})=>{const{isArrayDeepMerge:a}=r,o=d(t);if("object"==typeof s){const t=b(n.default.getIn(e,o),s,{isArrayDeepMerge:a});return n.default.setIn(e,o,t)}return n.default.setIn(e,o,s)},N=(e,t,s)=>{const r=d(t);return n.default.setIn(e,r,s)},v=()=>{const e=l.RESET_STORE,{promise:t,actionMgrID:s}=c.ActionManagerInstance.actionManagerPromise(e);return h({type:e,payload:{actionMgrID:s}}),t}},"./src/store/state/suggestions-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/constants.ts"),a=s("./src/store/state/actions/index.ts"),n=s("./src/store/state/state-manager.ts"),o=s("./src/store/state/actions/action-creators.ts");class i{constructor(e){i._instance=this,this.context=`${e}/${r.default.SUGGESTION}`,(0,n.getStore)()?.getState().data?.[this.context]||(0,n.dispatch)({type:a.ADD_SUGGESTION_CONTEXT,payload:{context:this.context,data:{}}})}getField(e){return(0,n.getValue)(e,"",this.context)}setField(e,t){(0,n.dispatch)({type:a.SET_PROPERTY,payload:{reference:e,value:t,context:this.context}})}removeField(e){(0,n.dispatch)({type:a.REMOVE_ITEM,payload:{reference:e,context:this.context}})}setState(e){(0,n.dispatch)((0,o.mergeData)({context:this.context,data:e,isArrayDeepMerge:!0}))}}const c=i},"./src/store/state/utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/utils/utils.ts"),a=s("./src/store/state/state-manager.ts"),n=s("./src/store/state/actions/action-creators.ts"),o=s("./src/store/state/suggestions-utils.ts");const i=class{static getSharedState(e){const t=e.startsWith(".")?e.substring(1):e,s=(0,a.getSharedDataObject)();return s?r.default.getIn(s,t):null}static setSharedState(e,t){e&&(0,a.dispatch)((0,n.setSharedProperty)({key:e,value:t}))}static updateState(e,t,s,r={}){const{isArrayDeepMerge:o=!0,pageReference:i}=r;if(!e||!t)return;const c=i?`${i}.${t}`:t;(0,a.dispatch)((0,n.setStateProperty)({context:e,reference:c,value:s,isArrayDeepMerge:o}))}static getSuggestionsContext(e){return new o.default(e)}}},"./src/tags/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l,getTaggedCases:()=>n,getTags:()=>o,postTags:()=>i,removeTag:()=>c});var r=s("./src/rest-client/index.ts"),a=s("./src/datapage/index.ts");const n=(e,t)=>{const s={caseID:e,viewID:"pyTaggedCases"};return(0,r.invokeRestApi)("loadView",{queryPayload:s},t.getContextName()).then((e=>e?.data)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)}))},o=(e,t)=>{const s={caseID:e};return(0,r.invokeRestApi)("getCaseTags",{queryPayload:s},t.getContextName()).then((e=>e?.data?.tagsList)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTags API : ",e.response)}))},i=(e,t,s)=>{const a={caseID:e},n=JSON.stringify({tags:t});return(0,r.invokeRestApi)("addTagsToCase",{body:n,queryPayload:a},s.getContextName()).then((e=>e?.data?.results)).catch((e=>{s.reportError(": Error occurred during ajax call at postTags API : ",e.response)}))},c=(e,t,s)=>{const a={caseID:e,tagID:t};return(0,r.invokeRestApi)("deleteCaseTag",{queryPayload:a},s.getContextName()).catch((e=>{s.reportError(": Error occurred during ajax call at removeTag API : ",e.response)}))},l={getTaggedCases:n,getTags:o,postTags:i,removeTag:c,getTagsLandingPageURL:e=>a.default.getPageDataAsync("D_pxGetTagsLandingPageURL",e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",t.response)}))}},"./src/user/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i,getOperatorDetails:()=>o});var r=s("./src/router/app-router.ts"),a=s("./src/rest-client/index.ts");const n="operatorDetails",o=(e,t=!1)=>{const{reqType:s}=(0,r.resolveRestApi)(n,{});if("GET"===s){const t={encodedOperatorId:encodeURIComponent(`{"opname":"${e}"}`)};return(0,a.invokeRestApi)(n,{queryPayload:t})}return t?(0,a.invokeRestApi)("operatorDetailsByBusinessID",{body:{dataViewParameters:{BusinessID:e}}}):(0,a.invokeRestApi)(n,{body:{dataViewParameters:{ID:e}}})},i={getOperatorDetails:o}},"./src/utils/asset-loader.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/environment-info/index.ts"),a=s("./src/router/app-router.ts");const n="text/javascript",o=new class{constructor(){this.loaderObj={},this.staticServerURL="",this.appStaticUrl=null,this.pegaOnlyUrl=!1,this.loadedAssets={},this.componentsConfig=null,this.appAlias="",this.b2sJWT=null,this.ccV2LibId="",this.imageBlobUrlCache={}}getTypes={SCRIPT:"script",STYLE:"link"};getStaticServerUrl(){return this.staticServerURL}setCCV2LibId(e){this.ccV2LibId=e}getCCV2LibId(){return this.ccV2LibId}async getThemeSchemaJSON(){const e=`${this.staticServerURL}themeOverrides.schema.json`;return fetch(e).then((e=>e.json()))}getConstellationServiceUrl(){return this.staticServerURL?.endsWith("/")?this.staticServerURL.substring(0,this.staticServerURL.length-1):this.staticServerURL}setAppAlias(e){this.appAlias=e}getAppAlias(){return this.appAlias}async getSvcComponentsConfig(e,t={}){let s="",r=0;return e.forEach((e=>{s+=`${0===r?"?":"&"}field${r}=${e.field}&value${r}=${e.value}`,r+=1})),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,s,t):this.getSvcComponentsConfigCombinedUrl(e,s,t)}async getSvcComponentsConfigSeparatedUrls(e,t,s){const a=r.default.getBuiltOnAppNames(),n=this.loadAndFilterPegaComponentsConfig(e,a);let o=Promise.resolve([]);!0!==s.skipLoadCustomerComponents&&(o=this.loadAndCustomerComponentsConfig(t));const i=this.fetchSDKComponent(t),c=[];if(await Promise.all([n,o,i]).then((e=>{const t=this.mergeComponentList(e);c.push(...t)})),s.alternateDesignSystemURL&&1===c.length){const r=await this.getSvcComponentsConfigADS(e,t,s);c[0].alternateDesignSystemConfig=r}return{data:{components:c}}}mergeComponentList=e=>{const[t=[],s=[],r=[]]=e,a=[...t,...s];return this.appStaticUrl?a.map((e=>{const{name:t,type:s,subtype:a}=e,n=r.reduce(((e,r)=>(t===r.name&&s===r.type&&a===r.subtype&&(e=r),e)),{});return Object.keys(n).length>0?{...e,alternateDesignSystemConfig:{...n}}:e})):a};async fetchSDKComponent(e){if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const t=`${this.appStaticUrl}v102/${this.appAlias}/componentslist-ext${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}return Promise.resolve([])}async loadAndFilterPegaComponentsConfig(e,t){return this.loadPegaComponentsConfig().then((()=>{const s=[];return this.componentsConfig&&this.componentsConfig.forEach((r=>{let a=!0;e.forEach((e=>{Array.isArray(r[e.field])?r[e.field].includes(e.value)||(a=!1):r[e.field]!==e.value&&(a=!1)})),a&&this.checkForBuiltOnSupport(t,r.allowedApplications)&&s.push(r)})),s}))}async loadPegaComponentsConfig(){let e=null;if(null===this.componentsConfig){const t=`${this.staticServerURL}components/componentsconfig.json?v=${(new Date).getTime()}`;e=fetch(t,{method:"GET"}).then((e=>e.json())).then((async e=>{this.componentsConfig=e,this.ccV2LibId&&await this.loadLibraryComponentsConfig(this.ccV2LibId).then((e=>{e&&e.length>0&&(this.componentsConfig=(this.componentsConfig||[]).concat(e))})).catch((e=>{console.error(`Exception while appending custom component config from library ${this.ccV2LibId} : ${e}`)}))})).catch()}else e=Promise.resolve();return e}async loadLibraryComponentsConfig(e){let t=null;return t=fetch(`${this.appStaticUrl}v100/componentlib/componentsconfig/${e}?v=${Date.now()}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>{if(!e.ok)throw console.error("Error while fetching custom component config/library component config"),new Error(e.statusText);return e})).then((e=>e.json())).then((e=>Promise.resolve(e))).catch((t=>(console.error(`Exception while fetching custom component config from library ${e} : ${t}`),{error:t.message}))),t}async loadAndCustomerComponentsConfig(e){let t=null;if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const s=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;t=fetch(s,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}else t=Promise.resolve([]);return t}checkForBuiltOnSupport(e,t){if(!e||!t||0===e.length||0===t.length)return!0;const s=e.split(",");return 0===s.length||s.some((function(e){return-1!==t.indexOf(e)}))}async getSvcComponentsConfigCombinedUrl(e,t,s){const r=`${this.staticServerURL}v102/${this.appAlias}/componentslist${t}`,a=await fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>({data:e})));if(!0===s.skipLoadCustomerComponents&&a?.data?.components?.length>0&&(a.data.components=a.data.components.filter((e=>void 0===e.componentKey))),s.alternateDesignSystemURL&&1===a?.data?.components?.length){const r=await this.getSvcComponentsConfigADS(e,t,s);a.data.components[0].alternateDesignSystemConfig=r}return a}getSvcComponentsConfigADS(e,t,s){const r=`${s.alternateDesignSystemURL}${s.alternateDesignSystemURL?.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(r,{method:"GET"}).then((e=>{if(e.ok)return e.json();throw new Error(e.statusText)})).catch((e=>({error:e.message})))}getSvcImage(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).catch()}getSvcImageUrl(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return void 0===this.imageBlobUrlCache[t]&&(this.imageBlobUrlCache[t]=fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).then((e=>window.URL.createObjectURL(e))).catch()),this.imageBlobUrlCache[t]}getSvcLocale(e,t){const s=`${this.appStaticUrl}v102/${this.appAlias}/locales/${e}/${t}`;return fetch(s,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}})}getSvcComponent(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>{if(!e.ok)throw Error(e.statusText);return e})).then((e=>e.text())).then((e=>e)).catch()}async importCustomComponentMap(e){fetch(`${this.appStaticUrl}v100/componentlib/componentsmap/${e}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>(e.ok||console.error("Error while fetching custom component map"),e))).then((e=>e.text())).then((t=>{this.setCCV2LibId(e);const s=document.createElement("script");s.src=window.URL.createObjectURL(new Blob([t],{type:n})),s.onload=()=>console.log("Custom component lib map loaded"),s.onerror=()=>console.error("Error while appending custom component map"),document.head.appendChild(s)})).catch((e=>{console.error("Exception while appending custom component map : "),console.error(e)}))}loadSvcComponent(e){return new Promise(((t,s)=>{this.getSvcComponent(e).then((r=>{const a=document.createElement("script");a.src=window.URL.createObjectURL(new Blob([r],{type:n})),a.onload=()=>t(e),a.onerror=()=>s(e),document.head.appendChild(a)})).catch((()=>{s(e)}))}))}initServer(e,t,s){console.log(`asset-loader.initServer(${e}, ${t})`),this.appStaticUrl=null,this.staticServerURL=null,this.pegaOnlyUrl=!1,this.componentsConfig=null,e&&t&&"no-appstatic"!==t&&"no-cdn"!==t?(this.appStaticUrl=t.endsWith("/")?t:`${t}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0):e&&t&&"no-appstatic"===t?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0):e&&t&&"no-cdn"===t&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL),console.log(`asset-loader.initServer() staticServerURL=${this.staticServerURL}, appStaticUrl=${this.appStaticUrl}, pegaOnlyUrl=${this.pegaOnlyUrl})`),this.b2sJWT=s}register(e,t){this.loaderObj[e]=t}getLoader(e){let t;return t=e?this.loaderObj[e]:(e,t)=>new Promise(((s,r)=>{const a=document.createElement(t);"script"===t?(a.onload=()=>{s(e)},a.onerror=()=>{r(e)},a.type=n,a.charset="UTF-8",a.async=!1,a.src=e):(a.type="text/css",a.rel="stylesheet",a.href=e),document.head.appendChild(a)})).catch((e=>{console.log(e)})),t}loadAssets(e,t){const{isDevServerMode:s}=t;if(!e)return Promise.resolve();const r=[];return e.forEach((e=>{const t=Object.keys(e)[0];let a=s?Object.values(e)[0]:this.getStaticServerUrl();a=a.endsWith("/")?a:`${a}/`,this.loadedAssets[t]||(t.includes(".js")?r.push(this.getLoader()(a+t,this.getTypes.SCRIPT)):t.includes(".css")&&this.getLoader()(a+t,this.getTypes.STYLE),this.loadedAssets[t]=!0)})),Promise.all(r)}getAssetsFromIsolations(e){const t=this.b2sJWT?.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")||"",r=decodeURIComponent(s.g.atob(t).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")),n=JSON.parse(r)?.tenant_id,{restApi:o,reqType:i}=(0,a.getRestEndPoint)("getAssetsFromIsolations",{isolationID:n,assetPath:e})||{},c=`${this.appStaticUrl}${o}`;return fetch(c,{method:i,credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob()))}}},"./src/utils/asynchronous-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./node_modules/rxjs/dist/esm5/internal/Subject.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js");const n=new class{getDebouncedSubject(e){return(new r.Subject).pipe((0,a.debounceTime)(e))}}},"./src/utils/authentication-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d,getAuthInstance:()=>c,revokeTokens:()=>l,setAuthorizationHeader:()=>u,setTokens:()=>i});var r=s("./src/service_broker/fetch.ts"),a=s("./src/service_broker/utils.ts"),n=s("./src/service_broker/embed/auth.ts"),o=s("./src/utils/pubsub-utils.ts");const i=e=>{(0,r.updateAuthInfo)({tokenInfo:e}),e?.csrf&&!e?.access_token?(0,r.updateHeaders)({pzCTkn:e?.csrf}):(0,r.updateHeaders)({Authorization:`${e?.token_type} ${e?.access_token}`}),setTimeout((()=>o.default.publish("updateSession",{updateStatus:"success"})),0)},c=e=>n.default.init(e),l=async()=>(0,a.revokeTokens)(),u=e=>{(0,r.updateHeaders)({Authorization:e}),setTimeout((()=>o.default.publish("updateSession",{updateStatus:"success"})),0)},d={setTokens:i,revokeTokens:l,getAuthInstance:c,setAuthorizationHeader:u}},"./src/utils/broadcast-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/constants.ts"),a=s("./src/interpreter/c11n-env.ts"),n=s("./src/container/container-utils.ts"),o=s("./src/router/route-parser.ts"),i=s("./src/utils/pubsub-utils.ts");class c{static OPEN_ASSIGNMENT_ACTION="openAssignment";static DIRTY_POPUP_C11N="displayDirtyPopupFromConstellation";static HANDLE_INFINITY_DISCARD="handleDiscardInInfinity";static OPEN_ASSIGNMENT_MODAL="openAssignmentInModal";static DISPLAY_DIRTY_POPUP="displayDirtyPopup";static LOAD_PREVIEW="loadPreview";static UPDATE_COEXISTENCE_DRILLDOWN_CASE="updateCoexistenceDrilldownCase";static OPEN_WORK_ITEM="openWorkItem";static OPEN_WORK_BY_HANDLE="openWorkByHandle";static GET_NEXT_WORK_ACTION="getNextWork";static CLOSE_CONTAINER_ACTION="closeContainer";constructor(){this.broadcastChannel=null,this.callback=null,this.isReverseCoexistenceCase=!1,this.broadcastEventToIframe=!1,this.isDirtyDialogActive=!1,this.onCreateCallback=null,this.openAssignmentParams=null}getGlobalObject=()=>s.g;getUniqueId=()=>this.getGlobalObject().uniqueId;setUniqueId=()=>{this.getGlobalObject().uniqueId=(new Date).getTime()};initBroadcastChannel=()=>{this.setUniqueId(),this.broadcastChannel=new BroadcastChannel("coexistence"),this.broadcastChannel.onmessage=e=>{switch(e.data.action){case c.DISPLAY_DIRTY_POPUP:this.broadcastEventToIframe=e.data.fromInfinity,this.isDirtyDialogActive||(e.data.isFormDirty?(i.default.publish(r.default.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0):this.callback?.call(this));break;case c.LOAD_PREVIEW:this.loadPreview(e);break;case c.UPDATE_COEXISTENCE_DRILLDOWN_CASE:this.updateCoexistenceDrilldownCase(e);break;case c.OPEN_ASSIGNMENT_ACTION:this.openAssignment(e);break;case c.GET_NEXT_WORK_ACTION:this.getNextWork(e);break;case c.OPEN_WORK_BY_HANDLE:this.openWorkByHandle(e);break;case c.CLOSE_CONTAINER_ACTION:this.closeContainer(e)}}};loadPreview=e=>{const{pyID:t,caseClassName:s,uniqueId:r}=e.data;r===this.getUniqueId()&&(0,a.createC11nEnv)({}).getPConnect().getActionsApi().showCasePreview(t,{caseClassName:s})};navigateToDefaultPage=()=>{const e=(0,a.createC11nEnv)({isRoot:!0}),t=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages;let s;Array.isArray(t)&&t[0]&&(s=t[0]);const r=s?.pyClassName||"Data-Portal",n=s?.pyRuleName||"pyHome";e.getPConnect().getActionsApi().showPage(n,r)};closeContainer=e=>{const{uniqueId:t}=e.data;t===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{const{key:t,caseClassName:s,actionApi:r,caseLabel:n}=e.data;let i=r;r===c.OPEN_WORK_ITEM&&(i=c.OPEN_WORK_BY_HANDLE),o.default.updateSemanticURLAndDocumentTitle({key:t,caseClassName:s,actionName:i}),(0,a.createC11nEnv)({}).getPConnect().getActionsApi().updateRecents(s,t.substring(t.lastIndexOf(" ")+1),n,t)};openAssignment=e=>{const{pzInsKey:t,uniqueId:s}=e.data;s===this.getUniqueId()&&(this.onCreateCallback&&this.openAssignmentParams&&(t?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=t:this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle",this.onCreateCallback.call(this,this.openAssignmentParams)),this.onCreateCallback=null,this.openAssignmentParams=null)};getNextWork=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId()){const e=`${r.publicConstants.APP.APP}${r.default.FORWARD_SLASH_STRING}${r.publicConstants.PRIMARY}`;(0,a.createC11nEnv)({meta:{},options:{context:(0,n.getActiveContainerItemContext)(e)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{const{key:t,caseClassName:s,uniqueId:o}=e.data;if(o===this.getUniqueId()){const e=`${r.publicConstants.APP.APP}${r.default.FORWARD_SLASH_STRING}${r.publicConstants.PRIMARY}`;(0,a.createC11nEnv)({meta:{},options:{context:(0,n.getActiveContainerItemContext)(e)}}).getPConnect().getActionsApi().openWorkByHandle(t,s)}};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),i.default.subscribe(r.publicConstants.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),i.default.subscribe(r.publicConstants.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{i.default.unsubscribeAllWithEventType(r.publicConstants.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),i.default.unsubscribeAllWithEventType(r.publicConstants.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD),this.setReverseCoexistenceCaseLoaded(!1),this.isDirtyDialogActive=!1};init=(e=!0)=>{null===this.broadcastChannel&&this.initBroadcastChannel(),e&&this.subscribeEvents()};destroy=()=>{this.destroyBroadcastChannel(),this.unsubscribeEvents()};setCallBackFunction=e=>{this.callback=e};setReverseCoexistenceCaseLoaded=e=>{this.isReverseCoexistenceCase=e};setIsDirtyDialogActive=e=>{this.isDirtyDialogActive=e};getBroadCastChannel=()=>this.broadcastChannel;getCallBackFunction=()=>this.callback;isReverseCoexistenceCaseLoaded=()=>this.isReverseCoexistenceCase;postDirtyPopupMessage=({callBackFunction:e})=>{this.broadcastChannel?.postMessage({action:c.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:c.HANDLE_INFINITY_DISCARD,uniqueId:this.getUniqueId()}),this.broadcastEventToIframe=!1):(this.callback?.call(this),this.callback=null),this.isDirtyDialogActive=!1};postCreateCaseMessage=(e,t,s)=>{null===this.broadcastChannel&&this.init(!1),this.broadcastChannel?.postMessage({action:c.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=t,this.openAssignmentParams=s}}const l=new c},"./src/utils/case-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{appendJSActionQueryParams:()=>_,didOperatorHasAssignment:()=>l,getActionId:()=>E,getAssignmentActionID:()=>u,getContainerDataForFinishAssignment:()=>A,getLastActiveItem:()=>d,isAssignment:()=>g,isAssignmentInCreateStage:()=>i,isAssignmentInManualStage:()=>c,isCaseWideAction:()=>f,isChildCase:()=>m,isLocalAction:()=>p,isPerform:()=>h});var r=s("./src/constants.ts"),a=s("./src/context/context-processor.ts"),n=s("./src/store/state/state-manager.ts"),o=s("./src/utils/utils.ts");const i=e=>{if(e){const{stageID:t,stages:s=[]}=e,r=s.length;for(let e=0;e<r;e+=1)if(s[e].ID===t)return"create"===s[e].transitionType&&"active"===s[e].visited_status}return!1},c=e=>{if(e){const{stageID:t,stages:s=[]}=e,r=s.length;for(let e=0;e<r;e+=1)if(s[e].ID===t)return"manual"===s[e].transitionType}return!1},l=(e,t)=>{if(e&&t){const s=o.default.getIn(t,["assignments","0","assigneeInfo"],{}),{ID:r,type:a}=s;return"worklist"===a?.toLowerCase()&&r===e}return!1},u=(e,t)=>{if(!Array.isArray(e)||!t)throw new Error("Invalid parameters passed to getAssignmentActionID API");return e.find((e=>e.ID===t))?.actions?.[0]?.ID},d=e=>{const{accessedOrder:t,items:s}=e;if(t&&t.length>1){const e=s[t[t.length-2]],{semanticURL:r}=e;if(r)return e}return{semanticURL:""}},p=e=>{const{activeActionID:t,availableActions:s}=e||{};if(t&&s){const e=s.find((e=>e.ID===t));return Boolean(e)}return!1},f=(e,t)=>{const s=a.default.getPropertyValue(r.publicConstants.CASE_INFO.ACTIVE_ACTION_ID,t,e),o=a.default.getPropertyValue(r.publicConstants.CASE_INFO.AVAILABLEACTIONS,t,e);let i=!1;if(o&&s){const e=o.find((e=>e.ID===s));e&&(i=e.type.toLowerCase()===r.publicConstants.LOCAL_ACTION_TYPE.CASE_WIDE.toLowerCase())}return e&&!o&&(i=(0,n.getDataObject)(e)?.context_data?.actionType===r.default.CASE),i},h=e=>(0,n.getContextValue)(null,r.default.CASE_VIEW_MODE_PROP,e)===r.default.PERFORM_MODE&&(e.includes(r.default.WORKAREA)||e.includes(r.default.MODAL)),g=(e,t)=>h(e)&&!f(e,t),m=e=>{const t=e?.parentCaseInfo?.ID;return Boolean(e&&t)},E=(e,t,s)=>{let a;const n=e?.find((e=>e.ID===t))?.actions,o=n?.filter((e=>e.ID===r.default.FIX_BROKEN_ASSIGNMENTS))||[];return a=s&&o?.length>0?o[0].ID:s||u(e,t),a},A=(e,t,s)=>{let a,o,i,c,l,u,d,p,f;const h=(0,n.getDataObject)(e);return s?.isTriggeredFromDifferentContext?(a=h.caseInfo.assignments[0].ID,o=h.caseInfo.ID,i=h.caseInfo.assignments,c=h.caseInfo.activeActionID,l=h.caseInfo.availableActions,u=h.caseInfo,d=h.caseInfo.businessID,p=h.caseInfo.caseTypeID,f=h.caseInfo.caseTypeName):(a=t.getValue(r.publicConstants.CASE_INFO.ASSIGNMENT_ID),o=t.getValue(r.publicConstants.CASE_INFO.CASE_INFO_ID),i=t.getValue(r.publicConstants.CASE_INFO.ASSIGNMENTS),c=t.getValue(r.publicConstants.CASE_INFO.ACTIVE_ACTION_ID),l=t.getValue(r.publicConstants.CASE_INFO.AVAILABLEACTIONS),u=t.getValue(r.publicConstants.CASE_INFO.CASE_INFO),d=t.getValue(r.publicConstants.CASE_INFO.BUSINESS_ID),p=t.getValue(r.publicConstants.CASE_INFO.CASE_TYPE_ID),f=t.getValue(r.publicConstants.CASE_INFO.CASE_TYPE_NAME)),{assignmentID:a,caseID:o,assignments:i,localActionID:c,caseActions:l,caseInfo:u,businessID:d,caseTypeID:p,caseTypeName:f}},_=(e,t)=>(e&&Object.keys(e).forEach((s=>{t+=`&${s}=${e[s]}`})),t)},"./src/utils/component-loader.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/components-registry.ts"),a=s("./src/utils/asset-loader.ts");const n="component-loader",o={},i=async(e,t)=>{const s=a.default.getLoader(),i=t||a.default.staticServerURL;if(!e||window.PCore&&!1===window.PCore.getBehaviorOverride("dynamicLoadComponents"))return Promise.resolve();if(a.default.getLoader(n))return a.default.getLoader(n)(e,i);const c=[];return e.forEach((e=>{if(o[e])return;const t=r.default.getComponent(e);if(t)(t.scripts||[]).forEach((e=>{const t=e.startsWith("http")?e:i+e;c.push(s(t,a.default.getTypes.SCRIPT))})),(t.styles||[]).forEach((e=>{c.push(s(i+e,a.default.getTypes.STYLE))})),o[e]=!0;else{const t=`${a.default.getConstellationServiceUrl()}/v860/${a.default.getAppAlias()}/component/${e}.js`;c.push(s(t,a.default.getTypes.SCRIPT))}})),Promise.all(c)}},"./src/utils/context-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{buildContextName:()=>c,buildModalContext:()=>p,buildTransientContextName:()=>l,getContainerIdFromContext:()=>h,getParentContext:()=>f,getParentContextName:()=>i,getTargetFromContext:()=>d,getTransientContext:()=>u});var r=s("./src/constants.ts"),a=s("./src/container/container-utils.ts");const n={},o=new Map,i=e=>{let t=r.default.EMPTY_STRING;return t=e&&e.includes(r.default.FORWARD_SLASH_STRING)?e.substring(0,e.lastIndexOf("/")):e,t},c=(e,t,s=!1)=>{let o=r.default.EMPTY_STRING;if(t&&e){let l=`${t}${r.default.FORWARD_SLASH_STRING}${e}`;const u=(0,a.getContainerData)(l);if(u||t!==r.default.APP.APP&&t!==r.default.APP.ROOT)if(u){if(s&&n[l])return o=`${l}${r.default.UNDERSCORE_STRING}${n[l]}`,o;n[l]?n[l]+=1:n[l]=1,o=`${l}${r.default.UNDERSCORE_STRING}${n[l]}`}else o=c(e,i(t));else l=`${t}${r.default.FORWARD_SLASH_STRING}${r.default.PRIMARY}`,n[l]?n[l]+=1:n[l]=1,o=`${l}${r.default.UNDERSCORE_STRING}${n[l]}`}return o},l=(e,t)=>{if(e&&t){const s=(o[t]?.[e]??0)+1;return o[t]||(o[t]={}),o[t][e]=s,`${t}${r.default.FORWARD_SLASH_STRING}${e}_${s}`}return""},u=(e,t)=>{if(e&&t){const s=o[t]?.[e];return s?`${t}${r.default.FORWARD_SLASH_STRING}${e}_${s}`:l(e,t)}return""},d=e=>{let t=r.default.EMPTY_STRING;return e&&(t=e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("_")).toLowerCase()),t},p=(e,t)=>{if(null===e)return t;const[,s]=t.split(r.default.FORWARD_SLASH_STRING);return e+r.default.FORWARD_SLASH_STRING+s},f=e=>{const t=e.indexOf(r.default.FORWARD_SLASH_STRING),s=e.lastIndexOf(r.default.FORWARD_SLASH_STRING);return t===s?e:e.substring(0,s)},h=e=>{const t=e.split(r.default.FORWARD_SLASH_STRING);return 2===t.length?e:t[0]+r.default.FORWARD_SLASH_STRING+t[2]}},"./src/utils/dxapi-response-translator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o,getTranslatedDXAPIResponse:()=>n,updateAvailableActionsInResponse:()=>a});var r=s("./src/constants.ts");const a=(e,t)=>{e.data=e.data??{};const{assignments:s,availableActions:r=[]}=e.data.caseInfo??{};s&&Array.isArray(s)&&s.length>0&&s[0].actions&&Array.isArray(s[0].actions)&&!t?.stopMergeActions&&(s[0].actions.forEach((e=>{"Assignment"!==e.type&&"LocalAction"!==e.type||r.push(e)})),e.data.caseInfo=e.data.caseInfo??{},e.data.caseInfo.availableActions=r)},n=(e,t)=>{if(e.confirmationLinks&&(e.data=e.data??{},e.data.caseInfo=e.data.caseInfo??{},e.data.caseInfo.confirmationLinks=e.confirmationLinks),!e.uiResources&&e.confirmationNote){let t=e;const{confirmationNote:s}=t;return t=((e,t)=>{const s=[e];return t.data=t.data??{},t.data.caseMessages=s,t})(s,t),t}if(!e.uiResources||!e.data||!e?.uiResources?.root)return e;const s=e,{uiResources:{actionButtons:n,navigation:o},nextAssignmentInfo:i}=s;if(s.data&&s.data.caseInfo&&(n&&(s.data.caseInfo.actionButtons=n),o&&(s.data.caseInfo.navigation=o),t&&t[r.publicConstants.ACTIONS.DELETEAVIALACTIONS]&&delete s.data.caseInfo.availableActions,a(s,t),e.confirmationNote)){const{confirmationNote:e}=s,t=[e];s.data.caseMessages=t}return t&&t.isCreateDataObject&&(s.data=s.data??{},s.data.dataInfo={},s.data.dataInfo.content=s.data.pyPortal,s.uiResources.root.config.context="dataInfo.content",s.uiResources.context_data.dataInfo=s.uiResources.context_data.dataInfo??{},s.uiResources.context_data.dataInfo.content=s.uiResources.context_data.dataInfo.content??{},s.uiResources.context_data.dataInfo.content=s.uiResources.context_data?.pyPortal,delete s.data.pyPortal,delete s.key),i&&(s.data=s.data??{},s.data.nextAssignmentInfo=i),s},o={getTranslatedDXAPIResponse:n}},"./src/utils/form-handler.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{addPageFieldToForm:()=>f,getAttachmentsList:()=>I,getEditableFields:()=>v,getEditableFormFieldsReferenceList:()=>_,getFormContent:()=>y,getNormalizedPropertyName:()=>d,getReadOnlyFormFields:()=>N,getResolvedContextTreeNodeProps:()=>C,getVisibleFormFields:()=>T,isFormHasSuggestions:()=>b,isFormValid:()=>S,removeFormFieldsFromMap:()=>p});var r=s("./src/store/state/state-manager.ts"),a=s("./src/page-instructions/state-machine-manager.ts"),n=s("./src/constants.ts"),o=s("./src/context/context-processor.ts"),i=s("./src/contextree/treemanager.ts"),c=s("./src/validation/validator.ts"),l=s("./src/utils/utils.ts");const u={},d=e=>e.startsWith(".")?e.substring(1):e,p=e=>{delete u[e]},f=(e,t,s)=>{const r=d(t);u[e]?u[e].fieldOrder[r]=s:u[e]={fieldOrder:{[r]:s}}},h=(e,t={})=>{const{includeDisabledFields:s=!1}=t,r=o.default.resolveContextTreeNodeProps(e),a=!0!==r.readOnly&&!1!==r.visibility&&(s||!0!==r.disabled),n="string"==typeof e?.value&&e?.value.includes("@FILTERED_LIST"),i=(e=>e.selectionList||e.selectionKey||"Editable"===e.renderMode&&e.referenceList)(e);return(e?.value||i)&&!n&&a},g=(e,t,s,a,n)=>{let o=((0,r.getValue)(`.attachmentsList.${t?.replace(".","")}`,"context_data",s)||[]).filter((e=>`${a.pageReference}.${e.label}`===n));return o=l.default.buildAttachmentsFormData(o),o.length>0&&(e=[...e,...o]),e},m=(e,t,s,r,n)=>(a.default.executeStateMachine(e,r,o.default.getLitePropertyValue(s,t))||n.push(r),n),E=e=>{const{attachmentPageInstructionEnabled:t=!1}=PCore.getEnvironmentInfo().environmentInfoObject?.features?.form||{},s=e.pageReference?.replace(n.publicConstants.CASE_INFO.CASE_INFO_CONTENT,"")?.replace(n.publicConstants.DATA_INFO.DATA_INFO_CONTENT,"");return"Attachment"===e.componentName&&t&&""!==s},A=(e,t,s)=>{const r=t.isInsideList,{ignoreFieldsInsideList:a=!0}=s;return(!r||r&&!a)&&!Array.isArray(o.default.getLitePropertyValue(t,e))&&"Address"!==t.componentName},_=(e,t={})=>{let s=[],r=[];const a=[],n=i.default.getContextReferences(e);if(!n)return{formInputs:s,attachments:r,formPageFields:a};if(({attachmentList:r,editableFormFieldsReferenceList:s}=((e,t,s)=>{const{includeDisabledFields:r=!1}=s;let a=[],n=[];for(const[i,c]of e){const e=o.default.resolveContextTreeNodeProps(c.props),l=e.propertyName;if(h(c.props,{includeDisabledFields:r})){const r=E(e);"Attachment"!==e.componentName||r?!r&&A(i,e,s)&&(a=m(t,l,e,i,a)):n=g(n,l,t,e,i)}}return{attachmentList:n,editableFormFieldsReferenceList:a}})(n,e,t)),u[e])for(const t in u[e].fieldOrder)Object.hasOwn(u[e].fieldOrder,t)&&a.push(t);return{formInputs:s,attachments:r,formPageFields:a}},I=e=>{let t=[];const s=i.default.getContextReferences(e);if(s)for(const[e,r]of s){const s=r?.props;if(h(s)&&"Attachment"===s?.componentName){const r="true"===s?.allowMultiple;t=[...t,{type:"File",allowMultiple:r,fullPath:e}]}}return t},y=(e,t={})=>{const s={},a=(0,r.getDataObject)(e),{ignoreFieldsInsideList:n=!0,isTransientContext:o=!1,includeDisabledFields:i=!1}=t;if(o||a?.caseInfo?.content){const{formInputs:t,attachments:r,formPageFields:c}=_(e,{ignoreFieldsInsideList:n,includeDisabledFields:i});r&&r.length>0&&l.default.buildObject("caseInfo.attachments",s,r),((e,t,s)=>{e.forEach((e=>{let r=l.default.getIn(t,e);"object"==typeof r&&(r=l.default.deepClone(r),delete r?.classID),l.default.buildObject(e,s,r)}))})(c,a,s),t&&t.length>0?t.forEach((e=>{l.default.buildObject(e,s,l.default.getIn(a,e))})):o||l.default.buildObject("caseInfo.content",s,{})}if(!o&&a?.dataInfo?.content){const{formInputs:t}=_(e,{ignoreFieldsInsideList:n});t.forEach((e=>{l.default.buildObject(e,s,l.default.getIn(a,e))}))}return s},C=(e,t,s)=>{const r=""===t&&s?.startsWith(".")?s.substring(1,s.length):s,a=i.default.getContextReferences(e)?.get(`${t}${r}`)?.props;return a?o.default.resolveContextTreeNodeProps(a):a},S=(e,t)=>{const s=i.default.getContextReferences(e);let r=!0;if(!s)return r;for(const[e,a]of s){const s=o.default.resolveContextTreeNodeProps(a.props);if(h(a.props)&&(!t||e.includes(t))){const e=c.default.validate(s.componentName?.toLowerCase(),s.propertyName,o.default.getLitePropertyValue(s,s.propertyName),s);r&&(r=!e.message)}}return r},b=e=>{const t=i.default.getContextReferences(e);if(t)for(const[,e]of t)if(o.default.resolveContextTreeNodeProps(e.props).hasSuggestions)return!0;return!1},T=(e,t=!1)=>{const s=i.default.getContextReferences(e),r=[];if(s)for(const[e,a]of s)if(!1!==o.default.resolveContextTreeNodeProps(a.props).visibility){const s=8,a=t?e:e.substring(e.indexOf("content")+s);r.push(a)}return r},N=e=>{const t=i.default.getContextReferences(e),s=[];if(t)for(const[e,r]of t)!0===o.default.resolveContextTreeNodeProps(r.props).readOnly&&s.push(e);return s},v=e=>{const t=[],s=i.default.getContextReferences(e);if(s)for(const[e,r]of s){const s=o.default.resolveContextTreeNodeProps(r.props);h(r.props)&&"Attachment"!==s.componentName&&"multirecordlist"!==s.type&&t.push({name:e,label:s.label,type:s.componentName?.toLowerCase()})}return t}},"./src/utils/loading-manager.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{IsLoadingManagerInstance:()=>n});var r=s("./src/store/state/actions/index.ts"),a=s("./src/store/state/state-manager.ts");const n=new class{constructor(){this.contextArray={},this.pauseDuration=2e3,this.waitingToPutUpIndicator=!1}getLoadingContext(e){let t=null;return e&&(({context:t}=e),t||(t=e.containerItemID),t||(t=e.contextName)),t}enableLoadingIndicator(e,t=!0){const s=this.getLoadingContext(e);s&&(this.addToContextArray(s),this.waitingToPutUpIndicator||(this.waitingToPutUpIndicator=!0,this.pauseBeforeShowing(s).then((e=>{t&&void 0!==this.contextArray[e]&&this.contextArray[e]>0&&(0,a.dispatch)({type:r.SET_LOADING,payload:{context:e}})}))))}pauseBeforeShowing=e=>new Promise((t=>setTimeout((()=>t(e)),this.pauseDuration)));disableLoadingIndicator(e,t=!0){const s=this.getLoadingContext(e);s&&(this.waitingToPutUpIndicator=!1,this.removeFromContextArray(s),t&&void 0!==this.contextArray[s]&&0===this.contextArray[s]&&(0,a.dispatch)({type:r.RESET_LOADING,payload:{context:s}}))}addToContextArray=e=>{void 0===this.contextArray[e]&&(this.contextArray[e]=0),this.contextArray[e]+=1};removeFromContextArray=e=>{void 0!==this.contextArray[e]&&this.contextArray[e]>0&&(this.contextArray[e]-=1)}}},"./src/utils/logs-handler.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=new class{error=e=>{console.error(e)}}},"./src/utils/navigation-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./src/rest-client/index.ts"),a=s("./src/router/app-router.ts"),n=s("./src/service_broker/fetch.ts"),o=s("./src/environment-info/index.ts"),i=s("./src/constants.ts"),c=s("./src/utils/pubsub-utils.ts"),l=s("./src/utils/utils.ts");const u=new class{#_;constructor(){this.userSettings={},this.componentCache={},this.contextMapToClearOnCancel={},this.#_=!1}getNormalizedKey(e){return e?.toString().trim().replace(/\s/g,"-").toLowerCase()}setComponentState=(e,t)=>{sessionStorage?sessionStorage.setItem(this.getNormalizedKey(e),JSON.stringify(t)):console.error("Session Storage not found")};getComponentState=e=>{const t=sessionStorage.getItem(this.getNormalizedKey(e));return(t?l.default.isValidJson(t):void 0)||t};removeComponentState=e=>{sessionStorage.removeItem(this.getNormalizedKey(e))};fetchUserSettings=async()=>{if((0,r.doesRestApiExist)("getUserSettings")){const{restApi:e,reqType:t}=(0,a.resolveRestApi)("getUserSettings");(0,n.fetch)(e,{method:t,headers:{}}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong while fetching getUserSettings");this.userSettings=e.data})).catch((e=>console.error(e)))}};init=()=>{o.default.getUserSettings()?this.userSettings=o.default.getUserSettings():this.fetchUserSettings()};getUserSettings=e=>{if(!e)throw new Error("path is required parameter");if("string"!=typeof e)throw new TypeError("path must be string");return l.default.getIn(this.userSettings,e,{})};setUserSettings=async(e,t)=>{if(!e)return Promise.reject(new Error("path is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("path must be string"));if(null==t||""===t)return Promise.reject(new Error("value is required parameter"));let s;if(!(0,r.doesRestApiExist)("updateUserSettings"))return Promise.resolve("updateUserSettings route is not available");s=(0,a.resolveRestApi)("updateUserSettings");const{restApi:o,reqType:i}=s;return(0,n.fetch)(o,{method:i,body:l.default.setIn({},e,t)}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong");this.userSettings=e.data})).catch((e=>{console.error(e)}))};setComponentCache(e,t,s={}){if("string"!=typeof e||!e?.trim())return;const r=s.clearOnCancelForContext;if(r&&(Object.hasOwn(this.contextMapToClearOnCancel,r)?this.contextMapToClearOnCancel[r].add(this.getNormalizedKey(e)):this.contextMapToClearOnCancel[r]=new Set([this.getNormalizedKey(e)])),this.componentCache[this.getNormalizedKey(e)]=t,!this.#_){this.#_=!0;const e=e=>{const{context:t}=e||{};(this.contextMapToClearOnCancel[t]||new Set).forEach((e=>{this.resetComponentCache(e)})),delete this.contextMapToClearOnCancel[t]};c.default.subscribe(i.default.PUB_SUB_EVENTS.EVENT_CANCEL,e,"RESET_COMPONENT_CACHE")}}getComponentCache(e){return"string"==typeof e&&e?.trim()?Object.hasOwn(this.componentCache,this.getNormalizedKey(e))?this.componentCache[this.getNormalizedKey(e)]:void 0:null}resetComponentCache(e){return!("string"!=typeof e||!e?.trim()||!Object.hasOwn(this.componentCache,this.getNormalizedKey(e))||(delete this.componentCache[this.getNormalizedKey(e)],0))}}},"./src/utils/performance-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./src/constants.ts");const a=[r.default.TOP_ACTION_LABEL.CREATEWORK,r.default.TOP_ACTION_LABEL.OPENASSIGNMENT,r.default.TOP_ACTION_LABEL.FINISHASSIGNMENT,r.default.TOP_ACTION_LABEL.OPENWORKBYHANDLE,r.default.TOP_ACTION_LABEL.SAVEANDCLOSE,r.default.TOP_ACTION_LABEL.SHOWDATA],n={getActionInfo:(e,t)=>{let s={};return a.includes(e)&&(s={topLevelAction:!0,actionLabel:e}),e===r.default.TOP_ACTION_LABEL.OPENASSIGNMENT&&(s.assignmentID=t),s}}},"./src/utils/pubsub-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/pubsub/index.ts");const a=class{static subscribe(e,t,s,a=!1,n="app"){r.default.subscribe(e,s,t,n,a)}static subscribeOnce(e,t,s){this.subscribe(e,t,s,!0)}static publish(e,t){r.default.publish(e,t)}static unsubscribe(e,t,s="app"){r.default.unsubscribe(e,t,s)}static unsubscribeAllWithEventType(e){r.default.unsubscribeAllWithEventType(e)}static cleanContextSubscribers(e){r.default.clearContext(e)}}},"./src/utils/rxjs-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{continueRequestUntil:()=>g,logAndCatchError:()=>h,throttleUntilChanged:()=>m});var r=s("./node_modules/redux-observable/dist/esm/operators.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/catchError.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/filter.js"),i=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),c=s("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),l=s("./node_modules/rxjs/dist/esm5/internal/Observable.js"),u=s("./node_modules/rxjs/dist/esm5/internal/observable/empty.js"),d=s("./node_modules/lodash.isequal/index.js"),p=s.n(d),f=s("./src/store/state/actions/action-creators.ts");const h=(e,t,s)=>(0,a.catchError)((r=>("ERR_CANCELED"!==r?.code&&console.error(e,r),(0,c.of)(f.error(e,r,t,null,s))))),g=(e,t,s)=>(0,n.takeUntil)(e.pipe((0,r.ofType)("CANCEL_ACTION"),(0,o.filter)((e=>{let r=!1;return s&&s(e,t)&&(t.signal.cancel("cancel"),r=!0),r})))),m=(e,t)=>s=>new l.Observable((r=>{let a={},n=0;return s.pipe((0,i.mergeMap)((s=>{const r=Date.now();let o;return o=t||p(),o&&o(s,a)&&r-n<e?(0,u.empty)():(a=s,n=r,(0,c.of)(s))}))).subscribe(r)}))},"./src/utils/utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var r=s("./node_modules/polycrc/polycrc.js"),a=s("./node_modules/lodash.unset/index.js"),n=s.n(a),o=s("./node_modules/lodash.has/index.js"),i=s.n(o),c=s("./node_modules/lodash.get/index.js"),l=s.n(c),u=s("./node_modules/lodash.set/index.js"),d=s.n(u),p=s("./node_modules/lodash.isequal/index.js"),f=s.n(p),h=s("./node_modules/lodash.mergewith/index.js"),g=s.n(h),m=s("./node_modules/lodash.isempty/index.js"),E=s.n(m),A=s("./src/store/state/state-manager.ts"),_=s("./src/constants.ts"),I=s("./src/fields/index.ts"),y=s("./src/actions/manager.ts"),C=s("./src/annotation/processor.ts");class S{static mergeDeep(e,t){return g()(t,e)}static hasIn(e,t){return i()(e,t)}static getIn(e,t,s){return l()(e,t,s)}static setIn(e,t,s){return d()(e,t,s)}static deleteIn(e,t){return n()(e,t)}static isObjectEmpty(e){return!e||0===Object.entries(e).length}static isEmpty(e){return E()(e)}static deepClone(e={}){return JSON.parse(JSON.stringify(e))}static copy(e,t){Object.keys(e).forEach((s=>{t[s]=e[s]}))}static isPropertyRef(e){if(!e||-1===e.indexOf("."))return!1;let t=0;const s=e.length;for(;t<s;t+=1)if(" @#$%=!<>/\\".includes(e[t]))return!1;return!0}static isWhenExist(e){const t=["visibility","disabled","readOnly","required"];let s=!1;for(const r in e)t.includes(r)&&"string"==typeof e[r]&&e[r]?.startsWith("@W ")&&(s=!0);return s||"multirecordlist"!==e?.type||"Editable"!==e?.renderMode||(s=Object.keys(e?.allowActions??{}).some((t=>"string"==typeof e?.allowActions?.[t]&&e.allowActions[t]?.startsWith("@W ")))),s}static getWhenNames(e){const t=["visibility","disabled","readOnly","required"];let s="";const r=new Set;for(const a in e)t.includes(a)&&"string"==typeof e[a]&&e[a]?.startsWith("@W ")&&(s=C.default.trimAnnotation(e[a]),r.add(s));return"multirecordlist"===e?.type&&"Editable"===e?.renderMode&&Object.keys(e?.allowActions??{}).forEach((t=>{"string"==typeof e?.allowActions[t]&&e.allowActions[t]?.startsWith("@W ")&&(s=C.default.trimAnnotation(e.allowActions[t]),r.add(s))})),[...r]}static isExpressionExist(e){const t=["disabled","visibility","readOnly","required"];let s=!1;for(const r in e)t.includes(r)&&"string"==typeof e[r]&&e[r]?.startsWith("@E ")&&(s=!0);return s}static buildDataObject(e,t){let s={};const r=s;return t.indexOf(".")>0?t.split(".").forEach((e=>{if(e.includes("[")){const[t]=e.split("[");s[t]=[],s=s[t],e=e.substring(e.indexOf("[")+1,e.lastIndexOf("]"))}s[e]={},s=s[e]})):(s[t]={},s=s[t]),Object.keys(e).forEach((t=>{let r=t;t.startsWith(".")&&(r=t.substring(1)),s[r]=e[t]})),r}static buildObject=(e,t,s)=>{if(void 0===s)return;const r=e.split(".");let a=0;for(;a<r.length-1;a+=1){const e=r[a];e?.toString().length&&!t[e]&&(t[e]={}),t[e]&&(t=t[e])}"object"==typeof s?(t[r[a]]||(t[r[a]]=Array.isArray(s)?[]:{}),(0,A.mergeDeep)(t[r[a]],s,{isArrayDeepMerge:!0})):t[r[a]]=s};static getHashedString(e){return(0,r.crc32)(e).toString(16)}static getPropertyName(e){if(e){const t=e.startsWith("@P"),s=t?e.indexOf(" "):-1;return t?e.substring(s+2):e}return e}static getPropertyNameFromDependency(e){return"string"==typeof e?e:e.propertyName}static isValidJson(e){try{return JSON.parse(e)}catch(e){return console.error("not a Valid JSON",e),!1}}static isEqual(e,t){return f()(e,t)}static isContains(e,t){const s=Object.keys(e);for(let r=0;r<s.length;r+=1)if(e[s[r]]&&S.isEqual(e[s[r]],t))return!0;return!1}static removeExistingDependentProperty(e,t){const s=e.findIndex((e=>e.propertyName===t));s>=0&&e.splice(s,1)}static getFullPropertyReference(e){return Array.isArray(e)?e.filter((e=>!!e)).join("."):null}static iterateLeafNodes(e,t){const s=(e,r=[])=>{Object.entries(e).forEach((([a,n])=>{r.push(Array.isArray(e)?Number(a):a),Array.isArray(n)?n.forEach(((e,t)=>{r.push(t),s(e,r),r.pop()})):"object"==typeof n?s(n,r):t(r.slice(),n),r.pop()}))};s(e)}static resolveStringBooleans(e){const t=["required","readOnly","visibility"];return Object.keys(e).forEach((s=>{t.includes(s)&&"string"==typeof e[s]&&(e[s]="true"===e[s])})),e}static generateUniqueID(){return crypto.randomUUID()}static unflatten(e){const t={};return Object.entries(e).forEach((([e,s])=>{const r=e.split(".");let a;r.reduce(((e,t,n)=>(a=e[t]?e[t]:Number.isNaN(Number(r[n+1]))?r.length-1===n?s:{}:[],e[t]=a,e[t])),t)})),t}static flatten(e,t,s){t||(t=""),Array.isArray(e)?e.forEach(((e,r)=>{S.flatten(e,`${t}[${r}]`,s)})):"object"==typeof e&&null!==e?Object.keys(e).forEach((r=>{const a=t?`${t}.${r}`:r;S.flatten(e[r],a,s)})):s[t]=e}static buildInstructionPageReference(e,t){const s=`${e}${t}`.replace(_.default.CASE_INFO.CASE_INFO_CONTENT,"").replace(_.default.DATA_INFO.DATA_INFO_CONTENT,"");return I.default.formatPageReference(s)}static buildAttachmentsFormData(e){return e.map((e=>{if(e.delete){let t="";return t=e.responseProps.ID?e.responseProps.ID:e.responseProps.pzInsKey,{type:"File",attachmentFieldName:e.label,delete:!0,pzInsKey:t}}return{type:"File",attachmentFieldName:e.label,category:e.category,ID:e.handle,clientFileID:e.ID}}))}static convertPageRefToClipboardPageNotation(e){return e.replace(/\[\d+\]/g,(e=>e.replace(/\d+/g,(e=>`${parseInt(e,10)+1}`)).replace("[","(").replace("]",")")))}static convertClipboardPageToPageRefNotation(e){return e.replace(/\(\d+\)/g,(e=>e.replace(/\d+/g,(e=>""+(parseInt(e,10)-1))).replace("(","[").replace(")","]")))}static isString(e){return"string"==typeof e}static rejectPendingActions(e){return e.forEach((e=>e.payload.actionMgrID&&y.ActionManagerInstance.rejectActionByID(e.payload.actionMgrID))),!0}static isValidAnnotation(e){const t=new Set(["@DATASOURCE","@ACTIVE_CASES","@ADDRESS","@ASSOCIATED","@ATTACHMENT","@CASE","@FILTERED_LIST","@PARAGRAPH","@P","@ROUTING_INFO","@USER","@W","@E","@SHARED"]),s=e.indexOf(" "),r=e.substring(0,s);return t.has(r)}static trimDotForProperty(e){return"string"==typeof e&&e.startsWith(".")?e.substring(1):e}static convertObjectWithStringToBoolean(e){if(e&&!Array.isArray(e)&&"object"==typeof e)return Object.keys(e).forEach((t=>{let s;const r=e[t];s="string"==typeof r?"true"===r||"false"!==r&&r:r,e[t]=s})),e}}const b=S},"./src/utils/view-resources.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{fetchViewResources:()=>d,updateViewResources:()=>u});var r=s("./src/constants.ts"),a=s("./src/observables/stream-observable.ts"),n=s("./src/context/context-processor.ts"),o=s("./src/locale/locale-utils.ts"),i=s("./src/utils/utils.ts"),c=s("./src/utils/dxapi-response-translator.ts"),l=s("./src/utils/component-loader.ts");const u=async e=>{const t=(0,c.getTranslatedDXAPIResponse)(e),s=i.default.getIn(t,r.default.COMPONENTS);a.publishResponse(t,{},!0);const n=i.default.getIn(t,r.default.LOCALE_REFERENCES);await o.localeUtils.loadLocaleResources(n||[]),await(0,l.default)(s)},d=(e,t,s)=>n.default.resolveView(e,t,s)},"./src/validation/validation-api.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./src/utils/form-handler.ts"),a=s("./src/validation/validator.ts");const n=class{constructor(e){this.c11nEnv=e}validate(e,t){const{value:s}=this.c11nEnv.getStateProps();if(!t&&!(t=s)){const e=this.c11nEnv.getComponentConfig(),s=this.c11nEnv.getStateProps();t="multi"===e.selectionMode?s.selectionList:"Editable"===e.renderMode?s.referenceList:"single"===e.selectionMode?s.selectionKey:s.value}const n=(0,r.getResolvedContextTreeNodeProps)(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),t),{message:o}=a.default.validate(this.c11nEnv.getComponentName()?.toLowerCase(),t,e,n);return o?{status:!1,message:o}:{status:!0}}}},"./src/validation/validator.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/messages/index.ts"),a=s("./src/constants.ts"),n=s("./src/fields/field-default.ts"),o=s("./src/store/state/state-manager.ts"),i=s("./src/fields/index.ts");class c{constructor(){this.validators={}}register(e,t){this.validators[e]=t}getValidator(e){return this.validators[e]}validateRequired(e,t,s,r,n,l){const{required:u,value:d}=l;let p=null;if("true"===u||!0===u){let u=r;switch(e){case"radiobuttons":u=d;break;case"attachment":{const e=s?.replace(a.publicConstants.CASE_INFO.CASE_INFO_CONTENT,"").replace(a.publicConstants.DATA_INFO.DATA_INFO_CONTENT,"");u=((0,o.getValue)(`.attachmentsList${e}.${t?.replace(".","")}`,"context_data",n)||[]).filter((e=>!e.delete)),0===u?.length&&(u="");break}case"checkbox":u&&"false"!==u||(u="");break;default:"string"==typeof u&&(u=u.trim())}p=this.getValidator("required")(u),c.messageDispatcher(t,s,n,p,i.default.getFieldLabel(l))}return p}validateType(e,t,s,r,a,o){let i=null;const l={pageReference:s,context:a,property:t,target:o?.target,required:o?.required};let u=n.default.getDefaultsforType(o?.componentName)?.["client-validations"];!1!==u&&e&&this.getValidator(e)&&(i=this.getValidator(e)(r,l),""!==r&&c.messageDispatcher(t,s,a,i,o?.label));const d=o?.validationType;return u=d&&n.default.getDefaultsforType(d)?.["client-validations"],!1!==u&&d&&this.getValidator(d)&&(i=this.getValidator(d)(r,l),c.messageDispatcher(t,s,a,i,o?.label)),i}validate(e,t,s,r={}){const{context:a,disabled:n,readOnly:o,pageReference:i,skipRequiredValidation:c}=r;let l=null;return n||o||(c||(l=this.validateRequired(e,t,i,s,a,r)),l||(l=this.validateType(e,t,i,s,a,r))),{message:l}}static messageDispatcher(e,t,s,n,o){if(n){const i=[];i.push({type:a.publicConstants.MESSAGES.MESSAGES_TYPE_ERROR,fieldLabel:o,message:n}),(0,r.addMessages)({messages:i,property:e,pageReference:t,context:s})}}isValidatorExist(e){return!!e.validatetype}}const l=new c},"./src/validation/validators/datetime.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/validation/validator.ts"),a=s("./src/locale/locale-utils.ts");const n=(e,t)=>{switch(t){case"invalid":return a.localeUtils.getLocaleValue(`Incorrect ${e}`,"Messages");case"incomplete":return a.localeUtils.getLocaleValue(`Incomplete ${e}`,"Messages");default:return null}};r.default.register("datetime",(e=>n("DateTime",e))),r.default.register("date",(e=>n("Date",e))),r.default.register("time",(e=>n("Time",e)))},"./src/validation/validators/email.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/validation/validator.ts"),a=s("./src/locale/locale-utils.ts");r.default.register("email",(e=>{let t=null;return e&&!function(e){const t="\\x5c[\\x00-\\x7f]",s=`([^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+|\\x5b([^\\x0d\\x5b-\\x5d\\x80-\\xff]|${t})*\\x5d)`,r=`([^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+|\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|${t})*\\x22)`;return new RegExp(`^${r}(\\x2e${r})*\\x40${s}(\\x2e${s})*$`).test(e)}(e)&&(t=a.localeUtils.getLocaleValue("Enter a valid email address","Messages")),t}))},"./src/validation/validators/integer.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/validation/validator.ts"),a=s("./src/locale/locale-utils.ts");r.default.register("integer",(e=>{let t=null;return e&&!/^(-)?\d+$/.test(e)&&(t=a.localeUtils.getLocaleValue("Invalid number","Messages")),t}))},"./src/validation/validators/phone.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/constants.ts"),a=s("./src/validation/validator.ts"),n=s("./src/locale/locale-utils.ts");setTimeout((()=>{s.e("vendors-node_modules_libphonenumber-js_index_js").then(s.bind(s,"./node_modules/libphonenumber-js/index.js")).then((({isPossiblePhoneNumber:e})=>{a.default.register("phone",(t=>{let s=null;t&&!/^\+?\d+$/.test(t)&&(s=n.localeUtils.getLocaleValue("Enter a valid phone number","Messages"));const r=t?.startsWith("+");return t&&r&&(e(t)||(s=n.localeUtils.getLocaleValue("Enter a valid phone number","Messages"))),s}))}))}),r.default.PRIORITY.TRIVIAL)},"./src/validation/validators/required.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/validation/validator.ts"),a=s("./src/locale/locale-utils.ts");r.default.register("required",(e=>Array.isArray(e)&&0===e.length||null==e||""===e?a.localeUtils.getLocaleValue("Cannot be blank","Messages"):null))},"./src/validation/validators/url.ts":(e,t,s)=>{"use strict";s.r(t);var r=s("./src/validation/validator.ts"),a=s("./src/locale/locale-utils.ts");r.default.register("url",(e=>{let t=null;return e&&!function(e){let t;try{t=new URL(e)}catch{return!1}return"http:"===t.protocol||"https:"===t.protocol||"ftp:"===t.protocol}(e)&&(t=a.localeUtils.getLocaleValue("Enter a valid url","Messages")),t}))},"./src/validation/validators/validators.ts":(e,t,s)=>{"use strict";s.r(t),s("./src/validation/validators/email.ts"),s("./src/validation/validators/integer.ts"),s("./src/validation/validators/required.ts"),s("./src/validation/validators/url.ts"),s("./src/validation/validators/phone.ts"),s("./src/validation/validators/datetime.ts")},"./src/view-rule/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./src/router/app-router.ts"),a=s("./src/service_broker/fetch.ts");const n={createViewRule:(e,t)=>{const{restApi:s,reqType:n}=(0,r.resolveRestApi)("createViewRuleByID");return(0,a.fetch)(s,{method:n,body:e},t).then((e=>e.data))},getViewRule:(e,t)=>{const{restApi:s,reqType:n}=(0,r.resolveRestApi)("getViewRuleByID",{ID:e});return(0,a.fetch)(s,{method:n},t).then((e=>e.data))},updateViewRule:(e,t,s)=>{const{restApi:n,reqType:o}=(0,r.resolveRestApi)("updateViewRuleByID",{ID:e});return(0,a.fetch)(n,{method:o,body:t},s).then((e=>e.data))},deleteViewRule:(e,t)=>{const{restApi:s,reqType:n}=(0,r.resolveRestApi)("deleteViewRuleByID",{ID:e});return(0,a.fetch)(s,{method:n},t).then((e=>e.data))}}},"./node_modules/@manaflair/redux-batch/build/core/index.js":(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s("./node_modules/@manaflair/redux-batch/build/core/reduxBatch.js");Object.defineProperty(t,"reduxBatch",{enumerable:!0,get:function(){return r.reduxBatch}})},"./node_modules/@manaflair/redux-batch/build/core/reduxBatch.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduxBatch=function(e){var t=[],s=void 0;function r(){t===s&&(t=t.slice())}function a(e){if("function"!=typeof e)throw new Error("Invalid listener, expected a function");var s=!0;return r(),t.push(e),function(){s&&(r(),t.splice(t.indexOf(e),1),s=!1)}}function n(){for(var e=t,r=0;r<e.length;++r)s=e,e[r]()}return function(){var t=e.apply(void 0,arguments),s=!1,r=!1;function o(e){return Array.isArray(e)?e.map((function(e){return o(e)})):t.dispatch(e)}function i(e){var t=r;t||(s=!1,r=!0);var a=o(e),i=s&&!t;return t||(s=!1,r=!1),i&&n(),a}return t.subscribe((function(){r?s=!0:n()})),Object.assign({},t,{dispatch:i,subscribe:a})}}},"./node_modules/@manaflair/redux-batch/index.js":(e,t,s)=>{e.exports=s("./node_modules/@manaflair/redux-batch/build/core/index.js")},"./node_modules/lodash.difference/index.js":(e,t,s)=>{var r="__lodash_hash_undefined__",a=/^\[object .+?Constructor\]$/,n="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g,o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();function c(e,t,s){switch(s.length){case 0:return e.call(t);case 1:return e.call(t,s[0]);case 2:return e.call(t,s[0],s[1]);case 3:return e.call(t,s[0],s[1],s[2])}return e.apply(t,s)}function l(e,t){return!(!e||!e.length)&&function(e,t,s){if(t!=t)return function(e,t,s,r){for(var a=e.length,n=-1;++n<a;)if(t(e[n],n,e))return n;return-1}(e,p);for(var r=-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}(e,t)>-1}function u(e,t,s){for(var r=-1,a=e?e.length:0;++r<a;)if(s(t,e[r]))return!0;return!1}function d(e,t){for(var s=-1,r=t.length,a=e.length;++s<r;)e[a+s]=t[s];return e}function p(e){return e!=e}function f(e,t){return e.has(t)}var h,g=Array.prototype,m=Function.prototype,E=Object.prototype,A=i["__core-js_shared__"],_=(h=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+h:"",I=m.toString,y=E.hasOwnProperty,C=E.toString,S=RegExp("^"+I.call(y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=i.Symbol,T=E.propertyIsEnumerable,N=g.splice,v=b?b.isConcatSpreadable:void 0,R=Math.max,O=F(i,"Map"),D=F(Object,"create");function x(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function P(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function w(e){var t=-1,s=e?e.length:0;for(this.__data__=new M;++t<s;)this.add(e[t])}function j(e,t){for(var s,r,a=e.length;a--;)if((s=e[a][0])===(r=t)||s!=s&&r!=r)return a;return-1}function L(e,t,s,r,a){var n=-1,o=e.length;for(s||(s=k),a||(a=[]);++n<o;){var i=e[n];t>0&&s(i)?t>1?L(i,t-1,s,r,a):d(a,i):r||(a[a.length]=i)}return a}function U(e,t){var s,r,a=e.__data__;return("string"==(r=typeof(s=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==s:null===s)?a["string"==typeof t?"string":"hash"]:a.map}function F(e,t){var s=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!q(e)||_&&_ in e)return!1;var t=W(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?S:a;return t.test(function(e){if(null!=e){try{return I.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(s)?s:void 0}function k(e){return B(e)||function(e){return H(e)&&y.call(e,"callee")&&(!T.call(e,"callee")||"[object Arguments]"==C.call(e))}(e)||!!(v&&e&&e[v])}x.prototype.clear=function(){this.__data__=D?D(null):{}},x.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},x.prototype.get=function(e){var t=this.__data__;if(D){var s=t[e];return s===r?void 0:s}return y.call(t,e)?t[e]:void 0},x.prototype.has=function(e){var t=this.__data__;return D?void 0!==t[e]:y.call(t,e)},x.prototype.set=function(e,t){return this.__data__[e]=D&&void 0===t?r:t,this},P.prototype.clear=function(){this.__data__=[]},P.prototype.delete=function(e){var t=this.__data__,s=j(t,e);return!(s<0||(s==t.length-1?t.pop():N.call(t,s,1),0))},P.prototype.get=function(e){var t=this.__data__,s=j(t,e);return s<0?void 0:t[s][1]},P.prototype.has=function(e){return j(this.__data__,e)>-1},P.prototype.set=function(e,t){var s=this.__data__,r=j(s,e);return r<0?s.push([e,t]):s[r][1]=t,this},M.prototype.clear=function(){this.__data__={hash:new x,map:new(O||P),string:new x}},M.prototype.delete=function(e){return U(this,e).delete(e)},M.prototype.get=function(e){return U(this,e).get(e)},M.prototype.has=function(e){return U(this,e).has(e)},M.prototype.set=function(e,t){return U(this,e).set(e,t),this},w.prototype.add=w.prototype.push=function(e){return this.__data__.set(e,r),this},w.prototype.has=function(e){return this.__data__.has(e)};var V,G,$=(V=function(e,t){return H(e)?function(e,t,s,r){var a,n=-1,o=l,i=!0,c=e.length,d=[],p=t.length;if(!c)return d;s&&(t=function(e,t){for(var s=-1,r=e?e.length:0,a=Array(r);++s<r;)a[s]=t(e[s],s,e);return a}(t,(a=s,function(e){return a(e)}))),r?(o=u,i=!1):t.length>=200&&(o=f,i=!1,t=new w(t));e:for(;++n<c;){var h=e[n],g=s?s(h):h;if(h=r||0!==h?h:0,i&&g==g){for(var m=p;m--;)if(t[m]===g)continue e;d.push(h)}else o(t,g,r)||d.push(h)}return d}(e,L(t,1,H,!0)):[]},G=R(void 0===G?V.length-1:G,0),function(){for(var e=arguments,t=-1,s=R(e.length-G,0),r=Array(s);++t<s;)r[t]=e[G+t];t=-1;for(var a=Array(G+1);++t<G;)a[t]=e[t];return a[G]=r,c(V,this,a)}),B=Array.isArray;function H(e){return function(e){return!!e&&"object"==typeof e}(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!W(e)}(e)}function W(e){var t=q(e)?C.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=$},"./node_modules/lodash.get/index.js":(e,t,s)=>{var r,a="__lodash_hash_undefined__",n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/,i=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,d="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g,p="object"==typeof self&&self&&self.Object===Object&&self,f=d||p||Function("return this")(),h=Array.prototype,g=Function.prototype,m=Object.prototype,E=f["__core-js_shared__"],A=(r=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",_=g.toString,I=m.hasOwnProperty,y=m.toString,C=RegExp("^"+_.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=f.Symbol,b=h.splice,T=w(f,"Map"),N=w(Object,"create"),v=S?S.prototype:void 0,R=v?v.toString:void 0;function O(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function D(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function x(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function P(e,t){for(var s,r,a=e.length;a--;)if((s=e[a][0])===(r=t)||s!=s&&r!=r)return a;return-1}function M(e,t){var s,r,a=e.__data__;return("string"==(r=typeof(s=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==s:null===s)?a["string"==typeof t?"string":"hash"]:a.map}function w(e,t){var s=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!k(e)||A&&A in e)return!1;var t=function(e){var t=k(e)?y.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?C:u;return t.test(function(e){if(null!=e){try{return _.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(s)?s:void 0}O.prototype.clear=function(){this.__data__=N?N(null):{}},O.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},O.prototype.get=function(e){var t=this.__data__;if(N){var s=t[e];return s===a?void 0:s}return I.call(t,e)?t[e]:void 0},O.prototype.has=function(e){var t=this.__data__;return N?void 0!==t[e]:I.call(t,e)},O.prototype.set=function(e,t){return this.__data__[e]=N&&void 0===t?a:t,this},D.prototype.clear=function(){this.__data__=[]},D.prototype.delete=function(e){var t=this.__data__,s=P(t,e);return!(s<0||(s==t.length-1?t.pop():b.call(t,s,1),0))},D.prototype.get=function(e){var t=this.__data__,s=P(t,e);return s<0?void 0:t[s][1]},D.prototype.has=function(e){return P(this.__data__,e)>-1},D.prototype.set=function(e,t){var s=this.__data__,r=P(s,e);return r<0?s.push([e,t]):s[r][1]=t,this},x.prototype.clear=function(){this.__data__={hash:new O,map:new(T||D),string:new O}},x.prototype.delete=function(e){return M(this,e).delete(e)},x.prototype.get=function(e){return M(this,e).get(e)},x.prototype.has=function(e){return M(this,e).has(e)},x.prototype.set=function(e,t){return M(this,e).set(e,t),this};var j=U((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(V(e))return R?R.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var s=[];return i.test(e)&&s.push(""),e.replace(c,(function(e,t,r,a){s.push(r?a.replace(l,"$1"):t||e)})),s}));function L(e){if("string"==typeof e||V(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function U(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var s=function(){var r=arguments,a=t?t.apply(this,r):r[0],n=s.cache;if(n.has(a))return n.get(a);var o=e.apply(this,r);return s.cache=n.set(a,o),o};return s.cache=new(U.Cache||x),s}U.Cache=x;var F=Array.isArray;function k(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function V(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==y.call(e)}e.exports=function(e,t,s){var r=null==e?void 0:function(e,t){var s;t=function(e,t){if(F(e))return!1;var s=typeof e;return!("number"!=s&&"symbol"!=s&&"boolean"!=s&&null!=e&&!V(e))||o.test(e)||!n.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:F(s=t)?s:j(s);for(var r=0,a=t.length;null!=e&&r<a;)e=e[L(t[r++])];return r&&r==a?e:void 0}(e,t);return void 0===r?s:r}},"./node_modules/lodash.has/index.js":(e,t,s)=>{var r,a="__lodash_hash_undefined__",n=9007199254740991,o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/,c=/^\./,l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,d=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,f="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g,h="object"==typeof self&&self&&self.Object===Object&&self,g=f||h||Function("return this")(),m=Array.prototype,E=Function.prototype,A=Object.prototype,_=g["__core-js_shared__"],I=(r=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",y=E.toString,C=A.hasOwnProperty,S=A.toString,b=RegExp("^"+y.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),T=g.Symbol,N=A.propertyIsEnumerable,v=m.splice,R=F(g,"Map"),O=F(Object,"create"),D=T?T.prototype:void 0,x=D?D.toString:void 0;function P(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function w(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function j(e,t){for(var s,r,a=e.length;a--;)if((s=e[a][0])===(r=t)||s!=s&&r!=r)return a;return-1}function L(e,t){return null!=e&&C.call(e,t)}function U(e,t){var s,r,a=e.__data__;return("string"==(r=typeof(s=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==s:null===s)?a["string"==typeof t?"string":"hash"]:a.map}function F(e,t){var s=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!W(e)||I&&I in e)return!1;var t=B(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?b:d;return t.test(function(e){if(null!=e){try{return y.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(s)?s:void 0}P.prototype.clear=function(){this.__data__=O?O(null):{}},P.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},P.prototype.get=function(e){var t=this.__data__;if(O){var s=t[e];return s===a?void 0:s}return C.call(t,e)?t[e]:void 0},P.prototype.has=function(e){var t=this.__data__;return O?void 0!==t[e]:C.call(t,e)},P.prototype.set=function(e,t){return this.__data__[e]=O&&void 0===t?a:t,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(e){var t=this.__data__,s=j(t,e);return!(s<0||(s==t.length-1?t.pop():v.call(t,s,1),0))},M.prototype.get=function(e){var t=this.__data__,s=j(t,e);return s<0?void 0:t[s][1]},M.prototype.has=function(e){return j(this.__data__,e)>-1},M.prototype.set=function(e,t){var s=this.__data__,r=j(s,e);return r<0?s.push([e,t]):s[r][1]=t,this},w.prototype.clear=function(){this.__data__={hash:new P,map:new(R||M),string:new P}},w.prototype.delete=function(e){return U(this,e).delete(e)},w.prototype.get=function(e){return U(this,e).get(e)},w.prototype.has=function(e){return U(this,e).has(e)},w.prototype.set=function(e,t){return U(this,e).set(e,t),this};var k=G((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Y(e))return x?x.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var s=[];return c.test(e)&&s.push(""),e.replace(l,(function(e,t,r,a){s.push(r?a.replace(u,"$1"):t||e)})),s}));function V(e){if("string"==typeof e||Y(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function G(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var s=function(){var r=arguments,a=t?t.apply(this,r):r[0],n=s.cache;if(n.has(a))return n.get(a);var o=e.apply(this,r);return s.cache=n.set(a,o),o};return s.cache=new(G.Cache||w),s}G.Cache=w;var $=Array.isArray;function B(e){var t=W(e)?S.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function H(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}function W(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function q(e){return!!e&&"object"==typeof e}function Y(e){return"symbol"==typeof e||q(e)&&"[object Symbol]"==S.call(e)}e.exports=function(e,t){return null!=e&&function(e,t,s){var r;t=function(e,t){if($(e))return!1;var s=typeof e;return!("number"!=s&&"symbol"!=s&&"boolean"!=s&&null!=e&&!Y(e))||i.test(e)||!o.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:$(r=t)?r:k(r);for(var a,c=-1,l=t.length;++c<l;){var u=V(t[c]);if(!(a=null!=e&&s(e,u)))break;e=e[u]}return a||!!(l=e?e.length:0)&&H(l)&&function(e,t){return!!(t=null==t?n:t)&&("number"==typeof e||p.test(e))&&e>-1&&e%1==0&&e<t}(u,l)&&($(e)||function(e){return function(e){return q(e)&&function(e){return null!=e&&H(e.length)&&!B(e)}(e)}(e)&&C.call(e,"callee")&&(!N.call(e,"callee")||"[object Arguments]"==S.call(e))}(e))}(e,t,L)}},"./node_modules/lodash.isempty/index.js":(e,t,s)=>{e=s.nmd(e);var r,a,n,o="[object Map]",i="[object Promise]",c="[object Set]",l="[object WeakMap]",u="[object DataView]",d=/^\[object .+?Constructor\]$/,p="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g,f="object"==typeof self&&self&&self.Object===Object&&self,h=p||f||Function("return this")(),g=t&&!t.nodeType&&t,m=g&&e&&!e.nodeType&&e,E=m&&m.exports===g,A=Function.prototype,_=Object.prototype,I=h["__core-js_shared__"],y=(r=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",C=A.toString,S=_.hasOwnProperty,b=_.toString,T=RegExp("^"+C.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=E?h.Buffer:void 0,v=_.propertyIsEnumerable,R=N?N.isBuffer:void 0,O=(a=Object.keys,n=Object,function(e){return a(n(e))}),D=G(h,"DataView"),x=G(h,"Map"),P=G(h,"Promise"),M=G(h,"Set"),w=G(h,"WeakMap"),j=!v.call({valueOf:1},"valueOf"),L=B(D),U=B(x),F=B(P),k=B(M),V=B(w);function G(e,t){var s=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!K(e)||function(e){return!!y&&y in e}(e))return!1;var t=Y(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?T:d;return t.test(B(e))}(s)?s:void 0}var $=function(e){return b.call(e)};function B(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(D&&$(new D(new ArrayBuffer(1)))!=u||x&&$(new x)!=o||P&&$(P.resolve())!=i||M&&$(new M)!=c||w&&$(new w)!=l)&&($=function(e){var t=b.call(e),s="[object Object]"==t?e.constructor:void 0,r=s?B(s):void 0;if(r)switch(r){case L:return u;case U:return o;case F:return i;case k:return c;case V:return l}return t});var H=Array.isArray;function W(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!Y(e)}var q=R||function(){return!1};function Y(e){var t=K(e)?b.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function K(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(W(e)&&(H(e)||"string"==typeof e||"function"==typeof e.splice||q(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&W(e)}(e)&&S.call(e,"callee")&&(!v.call(e,"callee")||"[object Arguments]"==b.call(e))}(e)))return!e.length;var t=$(e);if(t==o||t==c)return!e.size;if(j||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_)}(e))return!O(e).length;for(var s in e)if(S.call(e,s))return!1;return!0}},"./node_modules/lodash.isequal/index.js":(e,t,s)=>{e=s.nmd(e);var r="__lodash_hash_undefined__",a=9007199254740991,n="[object Arguments]",o="[object Array]",i="[object Boolean]",c="[object Date]",l="[object Error]",u="[object Function]",d="[object Map]",p="[object Number]",f="[object Object]",h="[object Promise]",g="[object RegExp]",m="[object Set]",E="[object String]",A="[object WeakMap]",_="[object ArrayBuffer]",I="[object DataView]",y=/^\[object .+?Constructor\]$/,C=/^(?:0|[1-9]\d*)$/,S={};S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S[n]=S[o]=S[_]=S[i]=S[I]=S[c]=S[l]=S[u]=S[d]=S[p]=S[f]=S[g]=S[m]=S[E]=S[A]=!1;var b="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g,T="object"==typeof self&&self&&self.Object===Object&&self,N=b||T||Function("return this")(),v=t&&!t.nodeType&&t,R=v&&e&&!e.nodeType&&e,O=R&&R.exports===v,D=O&&b.process,x=function(){try{return D&&D.binding&&D.binding("util")}catch(e){}}(),P=x&&x.isTypedArray;function M(e,t){for(var s=-1,r=null==e?0:e.length;++s<r;)if(t(e[s],s,e))return!0;return!1}function w(e){var t=-1,s=Array(e.size);return e.forEach((function(e,r){s[++t]=[r,e]})),s}function j(e){var t=-1,s=Array(e.size);return e.forEach((function(e){s[++t]=e})),s}var L,U,F,k=Array.prototype,V=Function.prototype,G=Object.prototype,$=N["__core-js_shared__"],B=V.toString,H=G.hasOwnProperty,W=(L=/[^.]+$/.exec($&&$.keys&&$.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"",q=G.toString,Y=RegExp("^"+B.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),K=O?N.Buffer:void 0,z=N.Symbol,J=N.Uint8Array,X=G.propertyIsEnumerable,Q=k.splice,Z=z?z.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=K?K.isBuffer:void 0,se=(U=Object.keys,F=Object,function(e){return U(F(e))}),re=Re(N,"DataView"),ae=Re(N,"Map"),ne=Re(N,"Promise"),oe=Re(N,"Set"),ie=Re(N,"WeakMap"),ce=Re(Object,"create"),le=Pe(re),ue=Pe(ae),de=Pe(ne),pe=Pe(oe),fe=Pe(ie),he=z?z.prototype:void 0,ge=he?he.valueOf:void 0;function me(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function Ee(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function Ae(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function _e(e){var t=-1,s=null==e?0:e.length;for(this.__data__=new Ae;++t<s;)this.add(e[t])}function Ie(e){var t=this.__data__=new Ee(e);this.size=t.size}function ye(e,t){for(var s=e.length;s--;)if(Me(e[s][0],t))return s;return-1}function Ce(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Z&&Z in Object(e)?function(e){var t=H.call(e,Z),s=e[Z];try{e[Z]=void 0;var r=!0}catch(e){}var a=q.call(e);return r&&(t?e[Z]=s:delete e[Z]),a}(e):function(e){return q.call(e)}(e)}function Se(e){return Ve(e)&&Ce(e)==n}function be(e,t,s,r,a){return e===t||(null==e||null==t||!Ve(e)&&!Ve(t)?e!=e&&t!=t:function(e,t,s,r,a,u){var h=je(e),A=je(t),y=h?o:De(e),C=A?o:De(t),S=(y=y==n?f:y)==f,b=(C=C==n?f:C)==f,T=y==C;if(T&&Le(e)){if(!Le(t))return!1;h=!0,S=!1}if(T&&!S)return u||(u=new Ie),h||Ge(e)?Te(e,t,s,r,a,u):function(e,t,s,r,a,n,o){switch(s){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!n(new J(e),new J(t)));case i:case c:case p:return Me(+e,+t);case l:return e.name==t.name&&e.message==t.message;case g:case E:return e==t+"";case d:var u=w;case m:var f=1&r;if(u||(u=j),e.size!=t.size&&!f)return!1;var h=o.get(e);if(h)return h==t;r|=2,o.set(e,t);var A=Te(u(e),u(t),r,a,n,o);return o.delete(e),A;case"[object Symbol]":if(ge)return ge.call(e)==ge.call(t)}return!1}(e,t,y,s,r,a,u);if(!(1&s)){var N=S&&H.call(e,"__wrapped__"),v=b&&H.call(t,"__wrapped__");if(N||v){var R=N?e.value():e,O=v?t.value():t;return u||(u=new Ie),a(R,O,s,r,u)}}return!!T&&(u||(u=new Ie),function(e,t,s,r,a,n){var o=1&s,i=Ne(e),c=i.length;if(c!=Ne(t).length&&!o)return!1;for(var l=c;l--;){var u=i[l];if(!(o?u in t:H.call(t,u)))return!1}var d=n.get(e);if(d&&n.get(t))return d==t;var p=!0;n.set(e,t),n.set(t,e);for(var f=o;++l<c;){var h=e[u=i[l]],g=t[u];if(r)var m=o?r(g,h,u,t,e,n):r(h,g,u,e,t,n);if(!(void 0===m?h===g||a(h,g,s,r,n):m)){p=!1;break}f||(f="constructor"==u)}if(p&&!f){var E=e.constructor,A=t.constructor;E==A||!("constructor"in e)||!("constructor"in t)||"function"==typeof E&&E instanceof E&&"function"==typeof A&&A instanceof A||(p=!1)}return n.delete(e),n.delete(t),p}(e,t,s,r,a,u))}(e,t,s,r,be,a))}function Te(e,t,s,r,a,n){var o=1&s,i=e.length,c=t.length;if(i!=c&&!(o&&c>i))return!1;var l=n.get(e);if(l&&n.get(t))return l==t;var u=-1,d=!0,p=2&s?new _e:void 0;for(n.set(e,t),n.set(t,e);++u<i;){var f=e[u],h=t[u];if(r)var g=o?r(h,f,u,t,e,n):r(f,h,u,e,t,n);if(void 0!==g){if(g)continue;d=!1;break}if(p){if(!M(t,(function(e,t){if(o=t,!p.has(o)&&(f===e||a(f,e,s,r,n)))return p.push(t);var o}))){d=!1;break}}else if(f!==h&&!a(f,h,s,r,n)){d=!1;break}}return n.delete(e),n.delete(t),d}function Ne(e){return function(e,t,s){var r=t(e);return je(e)?r:function(e,t){for(var s=-1,r=t.length,a=e.length;++s<r;)e[a+s]=t[s];return e}(r,s(e))}(e,$e,Oe)}function ve(e,t){var s,r,a=e.__data__;return("string"==(r=typeof(s=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==s:null===s)?a["string"==typeof t?"string":"hash"]:a.map}function Re(e,t){var s=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ke(e)||function(e){return!!W&&W in e}(e))&&(Ue(e)?Y:y).test(Pe(e))}(s)?s:void 0}me.prototype.clear=function(){this.__data__=ce?ce(null):{},this.size=0},me.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},me.prototype.get=function(e){var t=this.__data__;if(ce){var s=t[e];return s===r?void 0:s}return H.call(t,e)?t[e]:void 0},me.prototype.has=function(e){var t=this.__data__;return ce?void 0!==t[e]:H.call(t,e)},me.prototype.set=function(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=ce&&void 0===t?r:t,this},Ee.prototype.clear=function(){this.__data__=[],this.size=0},Ee.prototype.delete=function(e){var t=this.__data__,s=ye(t,e);return!(s<0||(s==t.length-1?t.pop():Q.call(t,s,1),--this.size,0))},Ee.prototype.get=function(e){var t=this.__data__,s=ye(t,e);return s<0?void 0:t[s][1]},Ee.prototype.has=function(e){return ye(this.__data__,e)>-1},Ee.prototype.set=function(e,t){var s=this.__data__,r=ye(s,e);return r<0?(++this.size,s.push([e,t])):s[r][1]=t,this},Ae.prototype.clear=function(){this.size=0,this.__data__={hash:new me,map:new(ae||Ee),string:new me}},Ae.prototype.delete=function(e){var t=ve(this,e).delete(e);return this.size-=t?1:0,t},Ae.prototype.get=function(e){return ve(this,e).get(e)},Ae.prototype.has=function(e){return ve(this,e).has(e)},Ae.prototype.set=function(e,t){var s=ve(this,e),r=s.size;return s.set(e,t),this.size+=s.size==r?0:1,this},_e.prototype.add=_e.prototype.push=function(e){return this.__data__.set(e,r),this},_e.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.clear=function(){this.__data__=new Ee,this.size=0},Ie.prototype.delete=function(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s},Ie.prototype.get=function(e){return this.__data__.get(e)},Ie.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.set=function(e,t){var s=this.__data__;if(s instanceof Ee){var r=s.__data__;if(!ae||r.length<199)return r.push([e,t]),this.size=++s.size,this;s=this.__data__=new Ae(r)}return s.set(e,t),this.size=s.size,this};var Oe=ee?function(e){return null==e?[]:(e=Object(e),function(t,s){for(var r=-1,a=null==t?0:t.length,n=0,o=[];++r<a;){var i=t[r];c=i,X.call(e,c)&&(o[n++]=i)}var c;return o}(ee(e)))}:function(){return[]},De=Ce;function xe(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||C.test(e))&&e>-1&&e%1==0&&e<t}function Pe(e){if(null!=e){try{return B.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Me(e,t){return e===t||e!=e&&t!=t}(re&&De(new re(new ArrayBuffer(1)))!=I||ae&&De(new ae)!=d||ne&&De(ne.resolve())!=h||oe&&De(new oe)!=m||ie&&De(new ie)!=A)&&(De=function(e){var t=Ce(e),s=t==f?e.constructor:void 0,r=s?Pe(s):"";if(r)switch(r){case le:return I;case ue:return d;case de:return h;case pe:return m;case fe:return A}return t});var we=Se(function(){return arguments}())?Se:function(e){return Ve(e)&&H.call(e,"callee")&&!X.call(e,"callee")},je=Array.isArray,Le=te||function(){return!1};function Ue(e){if(!ke(e))return!1;var t=Ce(e);return t==u||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Fe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function ke(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ve(e){return null!=e&&"object"==typeof e}var Ge=P?function(e){return function(t){return e(t)}}(P):function(e){return Ve(e)&&Fe(e.length)&&!!S[Ce(e)]};function $e(e){return null!=(t=e)&&Fe(t.length)&&!Ue(t)?function(e,t){var s=je(e),r=!s&&we(e),a=!s&&!r&&Le(e),n=!s&&!r&&!a&&Ge(e),o=s||r||a||n,i=o?function(e,t){for(var s=-1,r=Array(e);++s<e;)r[s]=t(s);return r}(e.length,String):[],c=i.length;for(var l in e)!t&&!H.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||n&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||xe(l,c))||i.push(l);return i}(e):function(e){if(s=(t=e)&&t.constructor,t!==("function"==typeof s&&s.prototype||G))return se(e);var t,s,r=[];for(var a in Object(e))H.call(e,a)&&"constructor"!=a&&r.push(a);return r}(e);var t}e.exports=function(e,t){return be(e,t)}},"./node_modules/lodash.mergewith/index.js":(e,t,s)=>{e=s.nmd(e);var r="__lodash_hash_undefined__",a=9007199254740991,n="[object Arguments]",o="[object Function]",i="[object Object]",c=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[n]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[o]=u["[object Map]"]=u["[object Number]"]=u[i]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var d="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g,p="object"==typeof self&&self&&self.Object===Object&&self,f=d||p||Function("return this")(),h=t&&!t.nodeType&&t,g=h&&e&&!e.nodeType&&e,m=g&&g.exports===h,E=m&&d.process,A=function(){try{return g&&g.require&&g.require("util").types||E&&E.binding&&E.binding("util")}catch(e){}}(),_=A&&A.isTypedArray;function I(e,t,s){switch(s.length){case 0:return e.call(t);case 1:return e.call(t,s[0]);case 2:return e.call(t,s[0],s[1]);case 3:return e.call(t,s[0],s[1],s[2])}return e.apply(t,s)}var y,C,S,b=Array.prototype,T=Function.prototype,N=Object.prototype,v=f["__core-js_shared__"],R=T.toString,O=N.hasOwnProperty,D=(y=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",x=N.toString,P=R.call(Object),M=RegExp("^"+R.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),w=m?f.Buffer:void 0,j=f.Symbol,L=f.Uint8Array,U=(w&&w.allocUnsafe,C=Object.getPrototypeOf,S=Object,function(e){return C(S(e))}),F=Object.create,k=N.propertyIsEnumerable,V=b.splice,G=j?j.toStringTag:void 0,$=function(){try{var e=ce(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),B=w?w.isBuffer:void 0,H=Math.max,W=Date.now,q=ce(f,"Map"),Y=ce(Object,"create"),K=function(){function e(){}return function(t){if(!Ie(t))return{};if(F)return F(t);e.prototype=t;var s=new e;return e.prototype=void 0,s}}();function z(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function J(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function X(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function Q(e){var t=this.__data__=new J(e);this.size=t.size}function Z(e,t,s){(void 0!==s&&!fe(e[t],s)||void 0===s&&!(t in e))&&se(e,t,s)}function ee(e,t,s){var r=e[t];O.call(e,t)&&fe(r,s)&&(void 0!==s||t in e)||se(e,t,s)}function te(e,t){for(var s=e.length;s--;)if(fe(e[s][0],t))return s;return-1}function se(e,t,s){"__proto__"==t&&$?$(e,t,{configurable:!0,enumerable:!0,value:s,writable:!0}):e[t]=s}z.prototype.clear=function(){this.__data__=Y?Y(null):{},this.size=0},z.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},z.prototype.get=function(e){var t=this.__data__;if(Y){var s=t[e];return s===r?void 0:s}return O.call(t,e)?t[e]:void 0},z.prototype.has=function(e){var t=this.__data__;return Y?void 0!==t[e]:O.call(t,e)},z.prototype.set=function(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=Y&&void 0===t?r:t,this},J.prototype.clear=function(){this.__data__=[],this.size=0},J.prototype.delete=function(e){var t=this.__data__,s=te(t,e);return!(s<0||(s==t.length-1?t.pop():V.call(t,s,1),--this.size,0))},J.prototype.get=function(e){var t=this.__data__,s=te(t,e);return s<0?void 0:t[s][1]},J.prototype.has=function(e){return te(this.__data__,e)>-1},J.prototype.set=function(e,t){var s=this.__data__,r=te(s,e);return r<0?(++this.size,s.push([e,t])):s[r][1]=t,this},X.prototype.clear=function(){this.size=0,this.__data__={hash:new z,map:new(q||J),string:new z}},X.prototype.delete=function(e){var t=ie(this,e).delete(e);return this.size-=t?1:0,t},X.prototype.get=function(e){return ie(this,e).get(e)},X.prototype.has=function(e){return ie(this,e).has(e)},X.prototype.set=function(e,t){var s=ie(this,e),r=s.size;return s.set(e,t),this.size+=s.size==r?0:1,this},Q.prototype.clear=function(){this.__data__=new J,this.size=0},Q.prototype.delete=function(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s},Q.prototype.get=function(e){return this.__data__.get(e)},Q.prototype.has=function(e){return this.__data__.has(e)},Q.prototype.set=function(e,t){var s=this.__data__;if(s instanceof J){var r=s.__data__;if(!q||r.length<199)return r.push([e,t]),this.size=++s.size,this;s=this.__data__=new X(r)}return s.set(e,t),this.size=s.size,this};function re(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":G&&G in Object(e)?function(e){var t=O.call(e,G),s=e[G];try{e[G]=void 0;var r=!0}catch(e){}var a=x.call(e);return r&&(t?e[G]=s:delete e[G]),a}(e):function(e){return x.call(e)}(e)}function ae(e){return ye(e)&&re(e)==n}function ne(e,t,s,r,a){e!==t&&function(e,t,s){for(var r=-1,a=Object(e),n=s(e),o=n.length;o--;){var i=n[++r];if(!1===t(a[i],i,a))break}}(t,(function(n,o){if(a||(a=new Q),Ie(n))!function(e,t,s,r,a,n,o){var c=de(e,s),l=de(t,s),u=o.get(l);if(u)Z(e,s,u);else{var d,p,f,h,g,m=n?n(c,l,s+"",e,t,o):void 0,E=void 0===m;if(E){var A=ge(l),_=!A&&Ee(l),I=!A&&!_&&Ce(l);m=l,A||_||I?ge(c)?m=c:ye(g=c)&&me(g)?m=function(e,t){var s=-1,r=e.length;for(t||(t=Array(r));++s<r;)t[s]=e[s];return t}(c):_?(E=!1,m=function(e,t){return e.slice()}(l)):I?(E=!1,h=new(f=(d=l).buffer).constructor(f.byteLength),new L(h).set(new L(f)),p=h,m=new d.constructor(p,d.byteOffset,d.length)):m=[]:function(e){if(!ye(e)||re(e)!=i)return!1;var t=U(e);if(null===t)return!0;var s=O.call(t,"constructor")&&t.constructor;return"function"==typeof s&&s instanceof s&&R.call(s)==P}(l)||he(l)?(m=c,he(c)?m=function(e){return function(e,t,s,r){var a=!s;s||(s={});for(var n=-1,o=t.length;++n<o;){var i=t[n],c=void 0;void 0===c&&(c=e[i]),a?se(s,i,c):ee(s,i,c)}return s}(e,Se(e))}(c):Ie(c)&&!Ae(c)||(m=function(e){return"function"!=typeof e.constructor||ue(e)?{}:K(U(e))}(l))):E=!1}E&&(o.set(l,m),a(m,l,r,n,o),o.delete(l)),Z(e,s,m)}}(e,t,o,s,ne,r,a);else{var c=r?r(de(e,o),n,o+"",e,t,a):void 0;void 0===c&&(c=n),Z(e,o,c)}}),Se)}var oe=$?function(e,t){return $(e,"toString",{configurable:!0,enumerable:!1,value:(s=t,function(){return s}),writable:!0});var s}:Ne;function ie(e,t){var s,r,a=e.__data__;return("string"==(r=typeof(s=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==s:null===s)?a["string"==typeof t?"string":"hash"]:a.map}function ce(e,t){var s=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ie(e)||function(e){return!!D&&D in e}(e))&&(Ae(e)?M:c).test(function(e){if(null!=e){try{return R.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(s)?s:void 0}function le(e,t){var s=typeof e;return!!(t=null==t?a:t)&&("number"==s||"symbol"!=s&&l.test(e))&&e>-1&&e%1==0&&e<t}function ue(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||N)}function de(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var pe=function(e){var t=0,s=0;return function(){var r=W(),a=16-(r-s);if(s=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(oe);function fe(e,t){return e===t||e!=e&&t!=t}var he=ae(function(){return arguments}())?ae:function(e){return ye(e)&&O.call(e,"callee")&&!k.call(e,"callee")},ge=Array.isArray;function me(e){return null!=e&&_e(e.length)&&!Ae(e)}var Ee=B||function(){return!1};function Ae(e){if(!Ie(e))return!1;var t=re(e);return t==o||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function _e(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Ie(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ye(e){return null!=e&&"object"==typeof e}var Ce=_?function(e){return function(t){return e(t)}}(_):function(e){return ye(e)&&_e(e.length)&&!!u[re(e)]};function Se(e){return me(e)?function(e,t){var s=ge(e),r=!s&&he(e),a=!s&&!r&&Ee(e),n=!s&&!r&&!a&&Ce(e),o=s||r||a||n,i=o?function(e,t){for(var s=-1,r=Array(e);++s<e;)r[s]=t(s);return r}(e.length,String):[],c=i.length;for(var l in e)!t&&!O.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||n&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||le(l,c))||i.push(l);return i}(e,!0):function(e){if(!Ie(e))return function(e){var t=[];if(null!=e)for(var s in Object(e))t.push(s);return t}(e);var t=ue(e),s=[];for(var r in e)("constructor"!=r||!t&&O.call(e,r))&&s.push(r);return s}(e)}var be,Te=(be=function(e,t,s,r){ne(e,t,s,r)},function(e,t){return pe(function(e,t,s){return t=H(void 0===t?e.length-1:t,0),function(){for(var r=arguments,a=-1,n=H(r.length-t,0),o=Array(n);++a<n;)o[a]=r[t+a];a=-1;for(var i=Array(t+1);++a<t;)i[a]=r[a];return i[t]=s(o),I(e,this,i)}}(e,t,Ne),e+"")}((function(e,t){var s=-1,r=t.length,a=r>1?t[r-1]:void 0,n=r>2?t[2]:void 0;for(a=be.length>3&&"function"==typeof a?(r--,a):void 0,n&&function(e,t,s){if(!Ie(s))return!1;var r=typeof t;return!!("number"==r?me(s)&&le(t,s.length):"string"==r&&t in s)&&fe(s[t],e)}(t[0],t[1],n)&&(a=r<3?void 0:a,r=1),e=Object(e);++s<r;){var o=t[s];o&&be(e,o,s,a)}return e})));function Ne(e){return e}e.exports=Te},"./node_modules/lodash.set/index.js":(e,t,s)=>{var r,a="__lodash_hash_undefined__",n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/,i=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,p="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g,f="object"==typeof self&&self&&self.Object===Object&&self,h=p||f||Function("return this")(),g=Array.prototype,m=Function.prototype,E=Object.prototype,A=h["__core-js_shared__"],_=(r=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",I=m.toString,y=E.hasOwnProperty,C=E.toString,S=RegExp("^"+I.call(y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=h.Symbol,T=g.splice,N=L(h,"Map"),v=L(Object,"create"),R=b?b.prototype:void 0,O=R?R.toString:void 0;function D(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function x(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function P(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function M(e,t,s){var r=e[t];y.call(e,t)&&G(r,s)&&(void 0!==s||t in e)||(e[t]=s)}function w(e,t){for(var s=e.length;s--;)if(G(e[s][0],t))return s;return-1}function j(e,t){var s,r,a=e.__data__;return("string"==(r=typeof(s=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==s:null===s)?a["string"==typeof t?"string":"hash"]:a.map}function L(e,t){var s=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!B(e)||_&&_ in e)return!1;var t=function(e){var t=B(e)?C.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?S:u;return t.test(function(e){if(null!=e){try{return I.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(s)?s:void 0}function U(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||d.test(e))&&e>-1&&e%1==0&&e<t}D.prototype.clear=function(){this.__data__=v?v(null):{}},D.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},D.prototype.get=function(e){var t=this.__data__;if(v){var s=t[e];return s===a?void 0:s}return y.call(t,e)?t[e]:void 0},D.prototype.has=function(e){var t=this.__data__;return v?void 0!==t[e]:y.call(t,e)},D.prototype.set=function(e,t){return this.__data__[e]=v&&void 0===t?a:t,this},x.prototype.clear=function(){this.__data__=[]},x.prototype.delete=function(e){var t=this.__data__,s=w(t,e);return!(s<0||(s==t.length-1?t.pop():T.call(t,s,1),0))},x.prototype.get=function(e){var t=this.__data__,s=w(t,e);return s<0?void 0:t[s][1]},x.prototype.has=function(e){return w(this.__data__,e)>-1},x.prototype.set=function(e,t){var s=this.__data__,r=w(s,e);return r<0?s.push([e,t]):s[r][1]=t,this},P.prototype.clear=function(){this.__data__={hash:new D,map:new(N||x),string:new D}},P.prototype.delete=function(e){return j(this,e).delete(e)},P.prototype.get=function(e){return j(this,e).get(e)},P.prototype.has=function(e){return j(this,e).has(e)},P.prototype.set=function(e,t){return j(this,e).set(e,t),this};var F=V((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(H(e))return O?O.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var s=[];return i.test(e)&&s.push(""),e.replace(c,(function(e,t,r,a){s.push(r?a.replace(l,"$1"):t||e)})),s}));function k(e){if("string"==typeof e||H(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function V(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var s=function(){var r=arguments,a=t?t.apply(this,r):r[0],n=s.cache;if(n.has(a))return n.get(a);var o=e.apply(this,r);return s.cache=n.set(a,o),o};return s.cache=new(V.Cache||P),s}function G(e,t){return e===t||e!=e&&t!=t}V.Cache=P;var $=Array.isArray;function B(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==C.call(e)}e.exports=function(e,t,s){return null==e?e:function(e,t,s,r){if(!B(e))return e;t=function(e,t){if($(e))return!1;var s=typeof e;return!("number"!=s&&"symbol"!=s&&"boolean"!=s&&null!=e&&!H(e))||o.test(e)||!n.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return $(e)?e:F(e)}(t);for(var a=-1,i=t.length,c=i-1,l=e;null!=l&&++a<i;){var u=k(t[a]),d=s;if(a!=c){var p=l[u];void 0===(d=r?r(p,u,l):void 0)&&(d=B(p)?p:U(t[a+1])?[]:{})}M(l,u,d),l=l[u]}return e}(e,t,s)}},"./node_modules/lodash.unset/index.js":(e,t,s)=>{var r,a="__lodash_hash_undefined__",n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/,i=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,d="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g,p="object"==typeof self&&self&&self.Object===Object&&self,f=d||p||Function("return this")(),h=Array.prototype,g=Function.prototype,m=Object.prototype,E=f["__core-js_shared__"],A=(r=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",_=g.toString,I=m.hasOwnProperty,y=m.toString,C=RegExp("^"+_.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=f.Symbol,b=h.splice,T=j(f,"Map"),N=j(Object,"create"),v=S?S.prototype:void 0,R=v?v.toString:void 0;function O(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function D(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function x(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function P(e,t){for(var s,r,a=e.length;a--;)if((s=e[a][0])===(r=t)||s!=s&&r!=r)return a;return-1}function M(e){return V(e)?e:U(e)}function w(e,t){var s,r,a=e.__data__;return("string"==(r=typeof(s=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==s:null===s)?a["string"==typeof t?"string":"hash"]:a.map}function j(e,t){var s=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!G(e)||A&&A in e)return!1;var t=function(e){var t=G(e)?y.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?C:u;return t.test(function(e){if(null!=e){try{return _.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(s)?s:void 0}function L(e,t){if(V(e))return!1;var s=typeof e;return!("number"!=s&&"symbol"!=s&&"boolean"!=s&&null!=e&&!$(e))||o.test(e)||!n.test(e)||null!=t&&e in Object(t)}O.prototype.clear=function(){this.__data__=N?N(null):{}},O.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},O.prototype.get=function(e){var t=this.__data__;if(N){var s=t[e];return s===a?void 0:s}return I.call(t,e)?t[e]:void 0},O.prototype.has=function(e){var t=this.__data__;return N?void 0!==t[e]:I.call(t,e)},O.prototype.set=function(e,t){return this.__data__[e]=N&&void 0===t?a:t,this},D.prototype.clear=function(){this.__data__=[]},D.prototype.delete=function(e){var t=this.__data__,s=P(t,e);return!(s<0||(s==t.length-1?t.pop():b.call(t,s,1),0))},D.prototype.get=function(e){var t=this.__data__,s=P(t,e);return s<0?void 0:t[s][1]},D.prototype.has=function(e){return P(this.__data__,e)>-1},D.prototype.set=function(e,t){var s=this.__data__,r=P(s,e);return r<0?s.push([e,t]):s[r][1]=t,this},x.prototype.clear=function(){this.__data__={hash:new O,map:new(T||D),string:new O}},x.prototype.delete=function(e){return w(this,e).delete(e)},x.prototype.get=function(e){return w(this,e).get(e)},x.prototype.has=function(e){return w(this,e).has(e)},x.prototype.set=function(e,t){return w(this,e).set(e,t),this};var U=k((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if($(e))return R?R.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var s=[];return i.test(e)&&s.push(""),e.replace(c,(function(e,t,r,a){s.push(r?a.replace(l,"$1"):t||e)})),s}));function F(e){if("string"==typeof e||$(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function k(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var s=function(){var r=arguments,a=t?t.apply(this,r):r[0],n=s.cache;if(n.has(a))return n.get(a);var o=e.apply(this,r);return s.cache=n.set(a,o),o};return s.cache=new(k.Cache||x),s}k.Cache=x;var V=Array.isArray;function G(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function $(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==y.call(e)}e.exports=function(e,t){return null==e||function(e,t){e=function(e,t){return 1==t.length?e:function(e,t){for(var s=0,r=(t=L(t,e)?[t]:M(t)).length;null!=e&&s<r;)e=e[F(t[s++])];return s&&s==r?e:void 0}(e,function(e,t,s){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(s=s>a?a:s)<0&&(s+=a),a=t>s?0:s-t>>>0,t>>>=0;for(var n=Array(a);++r<a;)n[r]=e[r+t];return n}(t,0,-1))}(e,t=L(t,e)?[t]:M(t));var s,r,a=F((r=(s=t)?s.length:0)?s[r-1]:void 0);return!(null!=e&&I.call(e,a))||delete e[a]}(e,t)}},"./node_modules/polycrc/polycrc.js":e=>{class t{constructor(e,t,s,r,a){this.converter=c(),this.width=e,this.poly=t,this.xor_in=s,this.reflected_xor_in=l(s,e),this.xor_out=r,this.reflect=a,this.msb_mask=1<<this.width-1,this.mask=this.msb_mask-1<<1|1,this.crc_shift=this.width<8?8-this.width:0,this.shifted_xor_in=this.xor_in<<this.crc_shift;let n=this.gen_table();this.table=n,8!==this.width||this.xor_in||this.xor_out||this.reflect||(this.calculate=function(e){e=this.converter.validate_buffer(e);let t=0;for(let s=0;s<e.length;s++)t=n[t^e[s]];return t})}calculate(e){let t;e=this.converter.validate_buffer(e);let{table:s,width:r,crc_shift:a,mask:n}=this;if(this.reflect){t=this.reflected_xor_in;for(let r=0;r<e.length;r++)t=(s[255&(t^e[r])]^t>>>8)&n}else{t=this.shifted_xor_in;for(let o=0;o<e.length;o++)t=s[255&(t>>r-8+a^e[o])]<<a^t<<8-a&n<<a;t>>=a}return t^=this.xor_out,t>>>0}calculate_no_table(e){e=this.converter.validate_buffer(e);let t=this.xor_in;for(let s=0;s<e.length;s++){let r=e[s];this.reflect&&(r=l(r,8));for(let e=0;e<8;e++){let s=t&this.msb_mask;r&128>>e&&(s^=this.msb_mask),t<<=1,s&&(t^=this.poly)}t&=this.mask}return this.reflect&&(t=l(t,this.width)),t^=this.xor_out,t>>>0}gen_table(){let e=[];for(let t=0;t<256;t++){let s=t;this.reflect&&(s=l(s,8)),s<<=this.width-8+this.crc_shift;for(let e=0;e<8;e++)0!=(s&this.msb_mask<<this.crc_shift)?(s<<=1,s^=this.poly<<this.crc_shift):s<<=1;this.reflect&&(s=l(s>>this.crc_shift,this.width)<<this.crc_shift),s=s>>this.crc_shift&this.mask,e[t]=s>>>0}return new Int32Array(e)}print_table(){let e=this.table,t=Math.ceil(this.width/4),s=t<4?4:3,r=e.length>>s,a=1<<s,n="";for(let o=0;o<r;o++){let r="";for(let n=0;n<a;n++){let a=e[o<<s|n];a="000000000"+a.toString(16),a=a.substr(a.length-t),r+="0x"+a+", "}n+=" "+r+"\n"}return n="[\n"+n.slice(0,-3)+"\n]",n}}const s="undefined"!=typeof Buffer,r="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,a=void 0!==typeof BigInt&&BigInt(256);class n{validate_buffer(e){switch(typeof e){case"number":{if(!Number.isSafeInteger(e)||e<0)throw Error(`number data must be a nonnegative safe integer, not ${e}`);if(this.fromUInt32&&e<=4294967295)return this.fromUInt32(e);const t=[];for(;e>0||t.length<4;)t.unshift(e%256),e=Math.floor(e/256);return this.fromByteArray(t)}case"string":return this.fromString(e);case"bigint":{if(e<0)throw Error(`bigint data must be nonnegative, not ${e}`);const t=[];for(;e>0||t.length<4;)t.unshift(Number(e%a)),e/=a;return this.fromByteArray(t)}default:if(s&&Buffer.isBuffer(e))return e;if(r){if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new Uint8Array(e)}throw new Error(`Unrecognized data type ${typeof e}: ${e}`)}}}class o extends n{fromUInt32(e){const t=Buffer.alloc(4);return t.writeUInt32BE(e),t}fromByteArray=Buffer.from.bind(Buffer);fromString=Buffer.from.bind(Buffer)}class i extends n{fromByteArray=Uint8Array.from.bind(Uint8Array);fromString(e){return new TextEncoder("utf-8").encode(e)}}function c(e=!1){if(r&&(e||!s))return new i;if(s)return new o;throw Error("either need TypedArrays or Buffer")}function l(e,t){let s=0;for(let r=0;r<t;r++)s=s<<1|1&e,e>>=1;return s}const u={crc1:new t(1,1,0,0,!1),crc6:new t(6,47,0,0,!1),crc8:new t(8,7,0,0,!1),crc10:new t(10,563,0,0,!1),crc16:new t(16,32773,0,0,!0),crc24:new t(24,8801531,11994318,0,!1),crc32:new t(32,79764919,4294967295,4294967295,!0),crc32c:new t(32,517762881,4294967295,4294967295,!0)};function d(e){}e.exports={CRC:t,crc:function(e,s,r,a,n){let o=new t(e,s,r,a,n);return o.calculate.bind(o)},makeBufferConverter:c,models:u,crc1:d,crc6:d,crc8:d,crc10:d,crc16:d,crc24:d,crc32:d,crc32c:d};for(let t in u){let s=u[t];e.exports[t]=s.calculate.bind(s)}},"./node_modules/redux-observable/dist/esm/StateObservable.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{StateObservable:()=>n});var r=s("./node_modules/redux-observable/node_modules/tslib/tslib.es6.js"),a=s("./node_modules/rxjs/dist/esm5/internal/Subject.js"),n=function(e){function t(t,s){var r=e.call(this,(function(e){var t=r.__notifier.subscribe(e);return t&&!t.closed&&e.next(r.value),t}))||this;return r.__notifier=new a.Subject,r.value=s,t.subscribe((function(e){e!==r.value&&(r.value=e,r.__notifier.next(e))})),r}return(0,r.__extends)(t,e),t}(s("./node_modules/rxjs/dist/esm5/internal/Observable.js").Observable)},"./node_modules/redux-observable/dist/esm/combineEpics.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{combineEpics:()=>a});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/merge.js");function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var s=function(){for(var t=[],s=0;s<arguments.length;s++)t[s]=arguments[s];return r.merge.apply(void 0,e.map((function(e){var s=e.apply(void 0,t);if(!s)throw new TypeError('combineEpics: one of the provided Epics "'+(e.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return s})))};try{Object.defineProperty(s,"name",{value:"combineEpics("+e.map((function(e){return e.name||"<anonymous>"})).join(", ")+")"})}catch(e){}return s}},"./node_modules/redux-observable/dist/esm/createEpicMiddleware.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{createEpicMiddleware:()=>p});var r=s("./node_modules/rxjs/dist/esm5/internal/scheduler/queue.js"),a=s("./node_modules/rxjs/dist/esm5/internal/Subject.js"),n=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/observeOn.js"),i=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),c=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),l=s("./node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js"),u=s("./node_modules/redux-observable/dist/esm/StateObservable.js"),d=s("./node_modules/redux-observable/dist/esm/utils/console.js");function p(e){void 0===e&&(e={});var t=new(0,r.queueScheduler.constructor)(r.queueScheduler.schedulerActionCtor);if("function"==typeof e)throw new TypeError("Providing your root Epic to `createEpicMiddleware(rootEpic)` is no longer supported, instead use `epicMiddleware.run(rootEpic)`\n\nLearn more: https://redux-observable.js.org/MIGRATION.html#setting-up-the-middleware");var s,p=new a.Subject,f=function(r){s&&(0,d.warn)("this middleware is already associated with a store. createEpicMiddleware should be called for every store.\n\nLearn more: https://goo.gl/2GQ7Da"),s=r;var f=new a.Subject,h=new a.Subject,g=f.asObservable().pipe((0,o.observeOn)(t)),m=new u.StateObservable(h.pipe((0,o.observeOn)(t)),s.getState());return p.pipe((0,i.map)((function(t){var s=t(g,m,e.dependencies);if(!s)throw new TypeError('Your root Epic "'+(t.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return s})),(0,c.mergeMap)((function(e){return(0,n.from)(e).pipe((0,l.subscribeOn)(t),(0,o.observeOn)(t))}))).subscribe(s.dispatch),function(e){return function(t){var r=e(t);return h.next(s.getState()),f.next(t),r}}};return f.run=function(e){s||(0,d.warn)("epicMiddleware.run(rootEpic) called before the middleware has been setup by redux. Provide the epicMiddleware instance to createStore() first."),p.next(e)},f}},"./node_modules/redux-observable/dist/esm/operators.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{ofType:()=>o});var r=s("./node_modules/rxjs/dist/esm5/internal/operators/filter.js"),a=s("./node_modules/redux-observable/dist/esm/utils/console.js"),n=function(e,t){return e===t||"function"==typeof t&&e===t.toString()};function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var s=e.length;return 0===s&&(0,a.warn)("ofType was called without any types!"),e.some((function(e){return null==e}))&&(0,a.warn)("ofType was called with one or more undefined or null values!"),(0,r.filter)(1===s?function(t){return n(t.type,e[0])}:function(t){for(var r=0;r<s;r++)if(n(t.type,e[r]))return!0;return!1})}},"./node_modules/redux-observable/dist/esm/utils/console.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{deprecate:()=>o,resetDeprecationsSeen:()=>a,warn:()=>i});var r={},a=function(){r={}},n="object"==typeof console&&"function"==typeof console.warn?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return console.warn.apply(console,e)}:function(){},o=function(e){r[e]||(r[e]=!0,n("redux-observable | DEPRECATION: "+e))},i=function(e){n("redux-observable | WARNING: "+e)}},"./node_modules/redux-observable/node_modules/tslib/tslib.es6.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{__assign:()=>n,__asyncDelegator:()=>y,__asyncGenerator:()=>I,__asyncValues:()=>C,__await:()=>_,__awaiter:()=>u,__classPrivateFieldGet:()=>v,__classPrivateFieldSet:()=>R,__createBinding:()=>p,__decorate:()=>i,__exportStar:()=>f,__extends:()=>a,__generator:()=>d,__importDefault:()=>N,__importStar:()=>T,__makeTemplateObject:()=>S,__metadata:()=>l,__param:()=>c,__read:()=>g,__rest:()=>o,__spread:()=>m,__spreadArray:()=>A,__spreadArrays:()=>E,__values:()=>h});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])},r(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function s(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}var n=function(){return n=Object.assign||function(e){for(var t,s=1,r=arguments.length;s<r;s++)for(var a in t=arguments[s])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};function o(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(s[r[a]]=e[r[a]])}return s}function i(e,t,s,r){var a,n=arguments.length,o=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,s,r);else for(var i=e.length-1;i>=0;i--)(a=e[i])&&(o=(n<3?a(o):n>3?a(t,s,o):a(t,s))||o);return n>3&&o&&Object.defineProperty(t,s,o),o}function c(e,t){return function(s,r){t(s,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,s,r){return new(s||(s=Promise))((function(a,n){function o(e){try{c(r.next(e))}catch(e){n(e)}}function i(e){try{c(r.throw(e))}catch(e){n(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,i)}c((r=r.apply(e,t||[])).next())}))}function d(e,t){var s,r,a,n,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return n={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function i(n){return function(i){return function(n){if(s)throw new TypeError("Generator is already executing.");for(;o;)try{if(s=1,r&&(a=2&n[0]?r.return:n[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,n[1])).done)return a;switch(r=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return o.label++,{value:n[1],done:!1};case 5:o.label++,r=n[1],n=[0];continue;case 7:n=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==n[0]&&2!==n[0])){o=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){o.label=n[1];break}if(6===n[0]&&o.label<a[1]){o.label=a[1],a=n;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(n);break}a[2]&&o.ops.pop(),o.trys.pop();continue}n=t.call(e,o)}catch(e){n=[6,e],r=0}finally{s=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,i])}}}var p=Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]};function f(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||p(t,e,s)}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,s=t&&e[t],r=0;if(s)return s.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var s="function"==typeof Symbol&&e[Symbol.iterator];if(!s)return e;var r,a,n=s.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}}return o}function m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function E(){for(var e=0,t=0,s=arguments.length;t<s;t++)e+=arguments[t].length;var r=Array(e),a=0;for(t=0;t<s;t++)for(var n=arguments[t],o=0,i=n.length;o<i;o++,a++)r[a]=n[o];return r}function A(e,t){for(var s=0,r=t.length,a=e.length;s<r;s++,a++)e[a]=t[s];return e}function _(e){return this instanceof _?(this.v=e,this):new _(e)}function I(e,t,s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,a=s.apply(e,t||[]),n=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(e){a[e]&&(r[e]=function(t){return new Promise((function(s,r){n.push([e,t,s,r])>1||i(e,t)}))})}function i(e,t){try{(s=a[e](t)).value instanceof _?Promise.resolve(s.value.v).then(c,l):u(n[0][2],s)}catch(e){u(n[0][3],e)}var s}function c(e){i("next",e)}function l(e){i("throw",e)}function u(e,t){e(t),n.shift(),n.length&&i(n[0][0],n[0][1])}}function y(e){var t,s;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,a){t[r]=e[r]?function(t){return(s=!s)?{value:_(e[r](t)),done:"return"===r}:a?a(t):t}:a}}function C(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,s=e[Symbol.asyncIterator];return s?s.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(s){t[s]=e[s]&&function(t){return new Promise((function(r,a){!function(e,t,s,r){Promise.resolve(r).then((function(t){e({value:t,done:s})}),t)}(r,a,(t=e[s](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var b=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function T(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&p(t,e,s);return b(t,e),t}function N(e){return e&&e.__esModule?e:{default:e}}function v(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function R(e,t,s){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,s),s}},"./node_modules/rxjs/dist/esm5/internal/NotificationFactories.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{COMPLETE_NOTIFICATION:()=>r,createNotification:()=>o,errorNotification:()=>a,nextNotification:()=>n});var r=o("C",void 0,void 0);function a(e){return o("E",void 0,e)}function n(e){return o("N",e,void 0)}function o(e,t,s){return{kind:e,value:t,error:s}}},"./node_modules/rxjs/dist/esm5/internal/Observable.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Observable:()=>u});var r=s("./node_modules/rxjs/dist/esm5/internal/Subscriber.js"),a=s("./node_modules/rxjs/dist/esm5/internal/Subscription.js"),n=s("./node_modules/rxjs/dist/esm5/internal/symbol/observable.js"),o=s("./node_modules/rxjs/dist/esm5/internal/util/pipe.js"),i=s("./node_modules/rxjs/dist/esm5/internal/config.js"),c=s("./node_modules/rxjs/dist/esm5/internal/util/isFunction.js"),l=s("./node_modules/rxjs/dist/esm5/internal/util/errorContext.js"),u=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var s=new e;return s.source=this,s.operator=t,s},e.prototype.subscribe=function(e,t,s){var n,o=this,i=(n=e)&&n instanceof r.Subscriber||function(e){return e&&(0,c.isFunction)(e.next)&&(0,c.isFunction)(e.error)&&(0,c.isFunction)(e.complete)}(n)&&(0,a.isSubscription)(n)?e:new r.SafeSubscriber(e,t,s);return(0,l.errorContext)((function(){var e=o,t=e.operator,s=e.source;i.add(t?t.call(i,s):s?o._subscribe(i):o._trySubscribe(i))})),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var s=this;return new(t=d(t))((function(t,a){var n=new r.SafeSubscriber({next:function(t){try{e(t)}catch(e){a(e),n.unsubscribe()}},error:a,complete:t});s.subscribe(n)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[n.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,o.pipeFromArray)(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=d(e))((function(e,s){var r;t.subscribe((function(e){return r=e}),(function(e){return s(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function d(e){var t;return null!==(t=null!=e?e:i.config.Promise)&&void 0!==t?t:Promise}},"./node_modules/rxjs/dist/esm5/internal/Scheduler.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Scheduler:()=>a});var r=s("./node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js"),a=function(){function e(t,s){void 0===s&&(s=e.now),this.schedulerActionCtor=t,this.now=s}return e.prototype.schedule=function(e,t,s){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(s,t)},e.now=r.dateTimestampProvider.now,e}()},"./node_modules/rxjs/dist/esm5/internal/Subject.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{AnonymousSubject:()=>u,Subject:()=>l});var r=s("./node_modules/tslib/tslib.es6.mjs"),a=s("./node_modules/rxjs/dist/esm5/internal/Observable.js"),n=s("./node_modules/rxjs/dist/esm5/internal/Subscription.js"),o=s("./node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js"),i=s("./node_modules/rxjs/dist/esm5/internal/util/arrRemove.js"),c=s("./node_modules/rxjs/dist/esm5/internal/util/errorContext.js"),l=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return(0,r.__extends)(t,e),t.prototype.lift=function(e){var t=new u(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new o.ObjectUnsubscribedError},t.prototype.next=function(e){var t=this;(0,c.errorContext)((function(){var s,a;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var n=(0,r.__values)(t.currentObservers),o=n.next();!o.done;o=n.next())o.value.next(e)}catch(e){s={error:e}}finally{try{o&&!o.done&&(a=n.return)&&a.call(n)}finally{if(s)throw s.error}}}}))},t.prototype.error=function(e){var t=this;(0,c.errorContext)((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var s=t.observers;s.length;)s.shift().error(e)}}))},t.prototype.complete=function(){var e=this;(0,c.errorContext)((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,s=this,r=s.hasError,a=s.isStopped,o=s.observers;return r||a?n.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new n.Subscription((function(){t.currentObservers=null,(0,i.arrRemove)(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,s=t.hasError,r=t.thrownError,a=t.isStopped;s?e.error(r):a&&e.complete()},t.prototype.asObservable=function(){var e=new a.Observable;return e.source=this,e},t.create=function(e,t){return new u(e,t)},t}(a.Observable),u=function(e){function t(t,s){var r=e.call(this)||this;return r.destination=t,r.source=s,r}return(0,r.__extends)(t,e),t.prototype.next=function(e){var t,s;null===(s=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===s||s.call(t,e)},t.prototype.error=function(e){var t,s;null===(s=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===s||s.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,s;return null!==(s=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==s?s:n.EMPTY_SUBSCRIPTION},t}(l)},"./node_modules/rxjs/dist/esm5/internal/Subscriber.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{EMPTY_OBSERVER:()=>_,SafeSubscriber:()=>m,Subscriber:()=>p});var r=s("./node_modules/tslib/tslib.es6.mjs"),a=s("./node_modules/rxjs/dist/esm5/internal/util/isFunction.js"),n=s("./node_modules/rxjs/dist/esm5/internal/Subscription.js"),o=s("./node_modules/rxjs/dist/esm5/internal/config.js"),i=s("./node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js"),c=s("./node_modules/rxjs/dist/esm5/internal/util/noop.js"),l=s("./node_modules/rxjs/dist/esm5/internal/NotificationFactories.js"),u=s("./node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js"),d=s("./node_modules/rxjs/dist/esm5/internal/util/errorContext.js"),p=function(e){function t(t){var s=e.call(this)||this;return s.isStopped=!1,t?(s.destination=t,(0,n.isSubscription)(t)&&t.add(s)):s.destination=_,s}return(0,r.__extends)(t,e),t.create=function(e,t,s){return new m(e,t,s)},t.prototype.next=function(e){this.isStopped?A((0,l.nextNotification)(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?A((0,l.errorNotification)(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?A(l.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(n.Subscription),f=Function.prototype.bind;function h(e,t){return f.call(e,t)}var g=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){E(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){E(e)}else E(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){E(e)}},e}(),m=function(e){function t(t,s,r){var n,i,c=e.call(this)||this;return(0,a.isFunction)(t)||!t?n={next:null!=t?t:void 0,error:null!=s?s:void 0,complete:null!=r?r:void 0}:c&&o.config.useDeprecatedNextContext?((i=Object.create(t)).unsubscribe=function(){return c.unsubscribe()},n={next:t.next&&h(t.next,i),error:t.error&&h(t.error,i),complete:t.complete&&h(t.complete,i)}):n=t,c.destination=new g(n),c}return(0,r.__extends)(t,e),t}(p);function E(e){o.config.useDeprecatedSynchronousErrorHandling?(0,d.captureError)(e):(0,i.reportUnhandledError)(e)}function A(e,t){var s=o.config.onStoppedNotification;s&&u.timeoutProvider.setTimeout((function(){return s(e,t)}))}var _={closed:!0,next:c.noop,error:function(e){throw e},complete:c.noop}},"./node_modules/rxjs/dist/esm5/internal/Subscription.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{EMPTY_SUBSCRIPTION:()=>c,Subscription:()=>i,isSubscription:()=>l});var r=s("./node_modules/tslib/tslib.es6.mjs"),a=s("./node_modules/rxjs/dist/esm5/internal/util/isFunction.js"),n=s("./node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js"),o=s("./node_modules/rxjs/dist/esm5/internal/util/arrRemove.js"),i=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,s,o,i;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var l=(0,r.__values)(c),d=l.next();!d.done;d=l.next())d.value.remove(this)}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}else c.remove(this);var p=this.initialTeardown;if((0,a.isFunction)(p))try{p()}catch(e){i=e instanceof n.UnsubscriptionError?e.errors:[e]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=(0,r.__values)(f),g=h.next();!g.done;g=h.next()){var m=g.value;try{u(m)}catch(e){i=null!=i?i:[],e instanceof n.UnsubscriptionError?i=(0,r.__spreadArray)((0,r.__spreadArray)([],(0,r.__read)(i)),(0,r.__read)(e.errors)):i.push(e)}}}catch(e){s={error:e}}finally{try{g&&!g.done&&(o=h.return)&&o.call(h)}finally{if(s)throw s.error}}}if(i)throw new n.UnsubscriptionError(i)}},e.prototype.add=function(t){var s;if(t&&t!==this)if(this.closed)u(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(s=this._finalizers)&&void 0!==s?s:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&(0,o.arrRemove)(t,e)},e.prototype.remove=function(t){var s=this._finalizers;s&&(0,o.arrRemove)(s,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),c=i.EMPTY;function l(e){return e instanceof i||e&&"closed"in e&&(0,a.isFunction)(e.remove)&&(0,a.isFunction)(e.add)&&(0,a.isFunction)(e.unsubscribe)}function u(e){(0,a.isFunction)(e)?e():e.unsubscribe()}},"./node_modules/rxjs/dist/esm5/internal/config.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{config:()=>r});var r={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},"./node_modules/rxjs/dist/esm5/internal/lastValueFrom.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{lastValueFrom:()=>a});var r=s("./node_modules/rxjs/dist/esm5/internal/util/EmptyError.js");function a(e,t){var s="object"==typeof t;return new Promise((function(a,n){var o,i=!1;e.subscribe({next:function(e){o=e,i=!0},error:n,complete:function(){i?a(o):s?a(t.defaultValue):n(new r.EmptyError)}})}))}},"./node_modules/rxjs/dist/esm5/internal/observable/empty.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{EMPTY:()=>a,empty:()=>n});var r=s("./node_modules/rxjs/dist/esm5/internal/Observable.js"),a=new r.Observable((function(e){return e.complete()}));function n(e){return e?function(e){return new r.Observable((function(t){return e.schedule((function(){return t.complete()}))}))}(e):a}},"./node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{forkJoin:()=>u});var r=s("./node_modules/rxjs/dist/esm5/internal/Observable.js"),a=s("./node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js"),n=s("./node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"),o=s("./node_modules/rxjs/dist/esm5/internal/util/args.js"),i=s("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"),c=s("./node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js"),l=s("./node_modules/rxjs/dist/esm5/internal/util/createObject.js");function u(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var s=(0,o.popResultSelector)(e),u=(0,a.argsArgArrayOrObject)(e),d=u.args,p=u.keys,f=new r.Observable((function(e){var t=d.length;if(t)for(var s=new Array(t),r=t,a=t,o=function(t){var o=!1;(0,n.innerFrom)(d[t]).subscribe((0,i.createOperatorSubscriber)(e,(function(e){o||(o=!0,a--),s[t]=e}),(function(){return r--}),void 0,(function(){r&&o||(a||e.next(p?(0,l.createObject)(p,s):s),e.complete())})))},c=0;c<t;c++)o(c);else e.complete()}));return s?f.pipe((0,c.mapOneOrManyArgs)(s)):f}},"./node_modules/rxjs/dist/esm5/internal/observable/from.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{from:()=>n});var r=s("./node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js");function n(e,t){return t?(0,r.scheduled)(e,t):(0,a.innerFrom)(e)}},"./node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{fromArrayLike:()=>E,fromAsyncIterable:()=>I,fromInteropObservable:()=>m,fromIterable:()=>_,fromPromise:()=>A,fromReadableStreamLike:()=>y,innerFrom:()=>g});var r=s("./node_modules/tslib/tslib.es6.mjs"),a=s("./node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js"),n=s("./node_modules/rxjs/dist/esm5/internal/util/isPromise.js"),o=s("./node_modules/rxjs/dist/esm5/internal/Observable.js"),i=s("./node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js"),c=s("./node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js"),l=s("./node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js"),u=s("./node_modules/rxjs/dist/esm5/internal/util/isIterable.js"),d=s("./node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js"),p=s("./node_modules/rxjs/dist/esm5/internal/util/isFunction.js"),f=s("./node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js"),h=s("./node_modules/rxjs/dist/esm5/internal/symbol/observable.js");function g(e){if(e instanceof o.Observable)return e;if(null!=e){if((0,i.isInteropObservable)(e))return m(e);if((0,a.isArrayLike)(e))return E(e);if((0,n.isPromise)(e))return A(e);if((0,c.isAsyncIterable)(e))return I(e);if((0,u.isIterable)(e))return _(e);if((0,d.isReadableStreamLike)(e))return y(e)}throw(0,l.createInvalidObservableTypeError)(e)}function m(e){return new o.Observable((function(t){var s=e[h.observable]();if((0,p.isFunction)(s.subscribe))return s.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function E(e){return new o.Observable((function(t){for(var s=0;s<e.length&&!t.closed;s++)t.next(e[s]);t.complete()}))}function A(e){return new o.Observable((function(t){e.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,f.reportUnhandledError)}))}function _(e){return new o.Observable((function(t){var s,a;try{for(var n=(0,r.__values)(e),o=n.next();!o.done;o=n.next()){var i=o.value;if(t.next(i),t.closed)return}}catch(e){s={error:e}}finally{try{o&&!o.done&&(a=n.return)&&a.call(n)}finally{if(s)throw s.error}}t.complete()}))}function I(e){return new o.Observable((function(t){(function(e,t){var s,a,n,o;return(0,r.__awaiter)(this,void 0,void 0,(function(){var i,c;return(0,r.__generator)(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),s=(0,r.__asyncValues)(e),l.label=1;case 1:return[4,s.next()];case 2:if((a=l.sent()).done)return[3,4];if(i=a.value,t.next(i),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return c=l.sent(),n={error:c},[3,11];case 6:return l.trys.push([6,,9,10]),a&&!a.done&&(o=s.return)?[4,o.call(s)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(n)throw n.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function y(e){return I((0,d.readableStreamLikeToAsyncGenerator)(e))}},"./node_modules/rxjs/dist/esm5/internal/observable/interval.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{interval:()=>n});var r=s("./node_modules/rxjs/dist/esm5/internal/scheduler/async.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/timer.js");function n(e,t){return void 0===e&&(e=0),void 0===t&&(t=r.asyncScheduler),e<0&&(e=0),(0,a.timer)(e,e,t)}},"./node_modules/rxjs/dist/esm5/internal/observable/merge.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{merge:()=>c});var r=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"),n=s("./node_modules/rxjs/dist/esm5/internal/observable/empty.js"),o=s("./node_modules/rxjs/dist/esm5/internal/util/args.js"),i=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js");function c(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var s=(0,o.popScheduler)(e),c=(0,o.popNumber)(e,1/0),l=e;return l.length?1===l.length?(0,a.innerFrom)(l[0]):(0,r.mergeAll)(c)((0,i.from)(l,s)):n.EMPTY}},"./node_modules/rxjs/dist/esm5/internal/observable/of.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{of:()=>n});var r=s("./node_modules/rxjs/dist/esm5/internal/util/args.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/from.js");function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var s=(0,r.popScheduler)(e);return(0,a.from)(e,s)}},"./node_modules/rxjs/dist/esm5/internal/observable/timer.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{timer:()=>i});var r=s("./node_modules/rxjs/dist/esm5/internal/Observable.js"),a=s("./node_modules/rxjs/dist/esm5/internal/scheduler/async.js"),n=s("./node_modules/rxjs/dist/esm5/internal/util/isScheduler.js"),o=s("./node_modules/rxjs/dist/esm5/internal/util/isDate.js");function i(e,t,s){void 0===e&&(e=0),void 0===s&&(s=a.async);var i=-1;return null!=t&&((0,n.isScheduler)(t)?s=t:i=t),new r.Observable((function(t){var r=(0,o.isValidDate)(e)?+e-s.now():e;r<0&&(r=0);var a=0;return s.schedule((function(){t.closed||(t.next(a++),0<=i?this.schedule(void 0,i):t.complete())}),r)}))}},"./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{OperatorSubscriber:()=>n,createOperatorSubscriber:()=>a});var r=s("./node_modules/tslib/tslib.es6.mjs");function a(e,t,s,r,a){return new n(e,t,s,r,a)}var n=function(e){function t(t,s,r,a,n,o){var i=e.call(this,t)||this;return i.onFinalize=n,i.shouldUnsubscribe=o,i._next=s?function(e){try{s(e)}catch(e){t.error(e)}}:e.prototype._next,i._error=a?function(e){try{a(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,i._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,i}return(0,r.__extends)(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var s=this.closed;e.prototype.unsubscribe.call(this),!s&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(s("./node_modules/rxjs/dist/esm5/internal/Subscriber.js").Subscriber)},"./node_modules/rxjs/dist/esm5/internal/operators/catchError.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{catchError:()=>o});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"),n=s("./node_modules/rxjs/dist/esm5/internal/util/lift.js");function o(e){return(0,n.operate)((function(t,s){var n,i=null,c=!1;i=t.subscribe((0,a.createOperatorSubscriber)(s,void 0,void 0,(function(a){n=(0,r.innerFrom)(e(a,o(e)(t))),i?(i.unsubscribe(),i=null,n.subscribe(s)):c=!0}))),c&&(i.unsubscribe(),i=null,n.subscribe(s))}))}},"./node_modules/rxjs/dist/esm5/internal/operators/concatMap.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{concatMap:()=>n});var r=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),a=s("./node_modules/rxjs/dist/esm5/internal/util/isFunction.js");function n(e,t){return(0,a.isFunction)(t)?(0,r.mergeMap)(e,t,1):(0,r.mergeMap)(e,1)}},"./node_modules/rxjs/dist/esm5/internal/operators/debounce.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{debounce:()=>i});var r=s("./node_modules/rxjs/dist/esm5/internal/util/lift.js"),a=s("./node_modules/rxjs/dist/esm5/internal/util/noop.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"),o=s("./node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js");function i(e){return(0,r.operate)((function(t,s){var r=!1,i=null,c=null,l=function(){if(null==c||c.unsubscribe(),c=null,r){r=!1;var e=i;i=null,s.next(e)}};t.subscribe((0,n.createOperatorSubscriber)(s,(function(t){null==c||c.unsubscribe(),r=!0,i=t,c=(0,n.createOperatorSubscriber)(s,l,a.noop),(0,o.innerFrom)(e(t)).subscribe(c)}),(function(){l(),s.complete()}),void 0,(function(){i=c=null})))}))}},"./node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{debounceTime:()=>o});var r=s("./node_modules/rxjs/dist/esm5/internal/scheduler/async.js"),a=s("./node_modules/rxjs/dist/esm5/internal/util/lift.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js");function o(e,t){return void 0===t&&(t=r.asyncScheduler),(0,a.operate)((function(s,r){var a=null,o=null,i=null,c=function(){if(a){a.unsubscribe(),a=null;var e=o;o=null,r.next(e)}};function l(){var s=i+e,n=t.now();if(n<s)return a=this.schedule(void 0,s-n),void r.add(a);c()}s.subscribe((0,n.createOperatorSubscriber)(r,(function(s){o=s,i=t.now(),a||(a=t.schedule(l,e),r.add(a))}),(function(){c(),r.complete()}),void 0,(function(){o=a=null})))}))}},"./node_modules/rxjs/dist/esm5/internal/operators/filter.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{filter:()=>n});var r=s("./node_modules/rxjs/dist/esm5/internal/util/lift.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js");function n(e,t){return(0,r.operate)((function(s,r){var n=0;s.subscribe((0,a.createOperatorSubscriber)(r,(function(s){return e.call(t,s,n++)&&r.next(s)})))}))}},"./node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{ignoreElements:()=>o});var r=s("./node_modules/rxjs/dist/esm5/internal/util/lift.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"),n=s("./node_modules/rxjs/dist/esm5/internal/util/noop.js");function o(){return(0,r.operate)((function(e,t){e.subscribe((0,a.createOperatorSubscriber)(t,n.noop))}))}},"./node_modules/rxjs/dist/esm5/internal/operators/map.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{map:()=>n});var r=s("./node_modules/rxjs/dist/esm5/internal/util/lift.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js");function n(e,t){return(0,r.operate)((function(s,r){var n=0;s.subscribe((0,a.createOperatorSubscriber)(r,(function(s){r.next(e.call(t,s,n++))})))}))}},"./node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{mergeAll:()=>n});var r=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),a=s("./node_modules/rxjs/dist/esm5/internal/util/identity.js");function n(e){return void 0===e&&(e=1/0),(0,r.mergeMap)(a.identity,e)}},"./node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{mergeInternals:()=>o});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"),a=s("./node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js");function o(e,t,s,o,i,c,l,u){var d=[],p=0,f=0,h=!1,g=function(){!h||d.length||p||t.complete()},m=function(e){return p<o?E(e):d.push(e)},E=function(e){c&&t.next(e),p++;var u=!1;(0,r.innerFrom)(s(e,f++)).subscribe((0,n.createOperatorSubscriber)(t,(function(e){null==i||i(e),c?m(e):t.next(e)}),(function(){u=!0}),void 0,(function(){if(u)try{p--;for(var e=function(){var e=d.shift();l?(0,a.executeSchedule)(t,l,(function(){return E(e)})):E(e)};d.length&&p<o;)e();g()}catch(e){t.error(e)}})))};return e.subscribe((0,n.createOperatorSubscriber)(t,m,(function(){h=!0,g()}))),function(){null==u||u()}}},"./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{mergeMap:()=>c});var r=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),a=s("./node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"),n=s("./node_modules/rxjs/dist/esm5/internal/util/lift.js"),o=s("./node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js"),i=s("./node_modules/rxjs/dist/esm5/internal/util/isFunction.js");function c(e,t,s){return void 0===s&&(s=1/0),(0,i.isFunction)(t)?c((function(s,n){return(0,r.map)((function(e,r){return t(s,e,n,r)}))((0,a.innerFrom)(e(s,n)))}),s):("number"==typeof t&&(s=t),(0,n.operate)((function(t,r){return(0,o.mergeInternals)(t,r,e,s)})))}},"./node_modules/rxjs/dist/esm5/internal/operators/observeOn.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{observeOn:()=>o});var r=s("./node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js"),a=s("./node_modules/rxjs/dist/esm5/internal/util/lift.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js");function o(e,t){return void 0===t&&(t=0),(0,a.operate)((function(s,a){s.subscribe((0,n.createOperatorSubscriber)(a,(function(s){return(0,r.executeSchedule)(a,e,(function(){return a.next(s)}),t)}),(function(){return(0,r.executeSchedule)(a,e,(function(){return a.complete()}),t)}),(function(s){return(0,r.executeSchedule)(a,e,(function(){return a.error(s)}),t)})))}))}},"./node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{subscribeOn:()=>a});var r=s("./node_modules/rxjs/dist/esm5/internal/util/lift.js");function a(e,t){return void 0===t&&(t=0),(0,r.operate)((function(s,r){r.add(e.schedule((function(){return s.subscribe(r)}),t))}))}},"./node_modules/rxjs/dist/esm5/internal/operators/switchMap.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{switchMap:()=>o});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"),a=s("./node_modules/rxjs/dist/esm5/internal/util/lift.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js");function o(e,t){return(0,a.operate)((function(s,a){var o=null,i=0,c=!1,l=function(){return c&&!o&&a.complete()};s.subscribe((0,n.createOperatorSubscriber)(a,(function(s){null==o||o.unsubscribe();var c=0,u=i++;(0,r.innerFrom)(e(s,u)).subscribe(o=(0,n.createOperatorSubscriber)(a,(function(e){return a.next(t?t(s,e,u,c++):e)}),(function(){o=null,l()})))}),(function(){c=!0,l()})))}))}},"./node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{takeUntil:()=>i});var r=s("./node_modules/rxjs/dist/esm5/internal/util/lift.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"),n=s("./node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"),o=s("./node_modules/rxjs/dist/esm5/internal/util/noop.js");function i(e){return(0,r.operate)((function(t,s){(0,n.innerFrom)(e).subscribe((0,a.createOperatorSubscriber)(s,(function(){return s.complete()}),o.noop)),!s.closed&&t.subscribe(s)}))}},"./node_modules/rxjs/dist/esm5/internal/operators/tap.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{tap:()=>i});var r=s("./node_modules/rxjs/dist/esm5/internal/util/isFunction.js"),a=s("./node_modules/rxjs/dist/esm5/internal/util/lift.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"),o=s("./node_modules/rxjs/dist/esm5/internal/util/identity.js");function i(e,t,s){var i=(0,r.isFunction)(e)||t||s?{next:e,error:t,complete:s}:e;return i?(0,a.operate)((function(e,t){var s;null===(s=i.subscribe)||void 0===s||s.call(i);var r=!0;e.subscribe((0,n.createOperatorSubscriber)(t,(function(e){var s;null===(s=i.next)||void 0===s||s.call(i,e),t.next(e)}),(function(){var e;r=!1,null===(e=i.complete)||void 0===e||e.call(i),t.complete()}),(function(e){var s;r=!1,null===(s=i.error)||void 0===s||s.call(i,e),t.error(e)}),(function(){var e,t;r&&(null===(e=i.unsubscribe)||void 0===e||e.call(i)),null===(t=i.finalize)||void 0===t||t.call(i)})))})):o.identity}},"./node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{scheduleArray:()=>a});var r=s("./node_modules/rxjs/dist/esm5/internal/Observable.js");function a(e,t){return new r.Observable((function(s){var r=0;return t.schedule((function(){r===e.length?s.complete():(s.next(e[r++]),s.closed||this.schedule())}))}))}},"./node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{scheduleAsyncIterable:()=>n});var r=s("./node_modules/rxjs/dist/esm5/internal/Observable.js"),a=s("./node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js");function n(e,t){if(!e)throw new Error("Iterable cannot be null");return new r.Observable((function(s){(0,a.executeSchedule)(s,t,(function(){var r=e[Symbol.asyncIterator]();(0,a.executeSchedule)(s,t,(function(){r.next().then((function(e){e.done?s.complete():s.next(e.value)}))}),0,!0)}))}))}},"./node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{scheduleIterable:()=>i});var r=s("./node_modules/rxjs/dist/esm5/internal/Observable.js"),a=s("./node_modules/rxjs/dist/esm5/internal/symbol/iterator.js"),n=s("./node_modules/rxjs/dist/esm5/internal/util/isFunction.js"),o=s("./node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js");function i(e,t){return new r.Observable((function(s){var r;return(0,o.executeSchedule)(s,t,(function(){r=e[a.iterator](),(0,o.executeSchedule)(s,t,(function(){var e,t,a;try{t=(e=r.next()).value,a=e.done}catch(e){return void s.error(e)}a?s.complete():s.next(t)}),0,!0)})),function(){return(0,n.isFunction)(null==r?void 0:r.return)&&r.return()}}))}},"./node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{scheduleObservable:()=>o});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/observeOn.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js");function o(e,t){return(0,r.innerFrom)(e).pipe((0,n.subscribeOn)(t),(0,a.observeOn)(t))}},"./node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{schedulePromise:()=>o});var r=s("./node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/observeOn.js"),n=s("./node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js");function o(e,t){return(0,r.innerFrom)(e).pipe((0,n.subscribeOn)(t),(0,a.observeOn)(t))}},"./node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{scheduleReadableStreamLike:()=>n});var r=s("./node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js"),a=s("./node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js");function n(e,t){return(0,r.scheduleAsyncIterable)((0,a.readableStreamLikeToAsyncGenerator)(e),t)}},"./node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{scheduled:()=>m});var r=s("./node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js"),a=s("./node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js"),n=s("./node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js"),o=s("./node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js"),i=s("./node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js"),c=s("./node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js"),l=s("./node_modules/rxjs/dist/esm5/internal/util/isPromise.js"),u=s("./node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js"),d=s("./node_modules/rxjs/dist/esm5/internal/util/isIterable.js"),p=s("./node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js"),f=s("./node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js"),h=s("./node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js"),g=s("./node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js");function m(e,t){if(null!=e){if((0,c.isInteropObservable)(e))return(0,r.scheduleObservable)(e,t);if((0,u.isArrayLike)(e))return(0,n.scheduleArray)(e,t);if((0,l.isPromise)(e))return(0,a.schedulePromise)(e,t);if((0,p.isAsyncIterable)(e))return(0,i.scheduleAsyncIterable)(e,t);if((0,d.isIterable)(e))return(0,o.scheduleIterable)(e,t);if((0,h.isReadableStreamLike)(e))return(0,g.scheduleReadableStreamLike)(e,t)}throw(0,f.createInvalidObservableTypeError)(e)}},"./node_modules/rxjs/dist/esm5/internal/scheduler/Action.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Action:()=>a});var r=s("./node_modules/tslib/tslib.es6.mjs"),a=function(e){function t(t,s){return e.call(this)||this}return(0,r.__extends)(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(s("./node_modules/rxjs/dist/esm5/internal/Subscription.js").Subscription)},"./node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{AsyncAction:()=>i});var r=s("./node_modules/tslib/tslib.es6.mjs"),a=s("./node_modules/rxjs/dist/esm5/internal/scheduler/Action.js"),n=s("./node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js"),o=s("./node_modules/rxjs/dist/esm5/internal/util/arrRemove.js"),i=function(e){function t(t,s){var r=e.call(this,t,s)||this;return r.scheduler=t,r.work=s,r.pending=!1,r}return(0,r.__extends)(t,e),t.prototype.schedule=function(e,t){var s;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,a=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(a,r,t)),this.pending=!0,this.delay=t,this.id=null!==(s=this.id)&&void 0!==s?s:this.requestAsyncId(a,this.id,t),this},t.prototype.requestAsyncId=function(e,t,s){return void 0===s&&(s=0),n.intervalProvider.setInterval(e.flush.bind(e,this),s)},t.prototype.recycleAsyncId=function(e,t,s){if(void 0===s&&(s=0),null!=s&&this.delay===s&&!1===this.pending)return t;null!=t&&n.intervalProvider.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var s=this._execute(e,t);if(s)return s;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var s,r=!1;try{this.work(e)}catch(e){r=!0,s=e||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),s},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,s=this.scheduler,r=s.actions;this.work=this.state=this.scheduler=null,this.pending=!1,(0,o.arrRemove)(r,this),null!=t&&(this.id=this.recycleAsyncId(s,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(a.Action)},"./node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{AsyncScheduler:()=>n});var r=s("./node_modules/tslib/tslib.es6.mjs"),a=s("./node_modules/rxjs/dist/esm5/internal/Scheduler.js"),n=function(e){function t(t,s){void 0===s&&(s=a.Scheduler.now);var r=e.call(this,t,s)||this;return r.actions=[],r._active=!1,r}return(0,r.__extends)(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var s;this._active=!0;do{if(s=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,s){for(;e=t.shift();)e.unsubscribe();throw s}}},t}(a.Scheduler)},"./node_modules/rxjs/dist/esm5/internal/scheduler/QueueAction.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{QueueAction:()=>a});var r=s("./node_modules/tslib/tslib.es6.mjs"),a=function(e){function t(t,s){var r=e.call(this,t,s)||this;return r.scheduler=t,r.work=s,r}return(0,r.__extends)(t,e),t.prototype.schedule=function(t,s){return void 0===s&&(s=0),s>0?e.prototype.schedule.call(this,t,s):(this.delay=s,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,s){return s>0||this.closed?e.prototype.execute.call(this,t,s):this._execute(t,s)},t.prototype.requestAsyncId=function(t,s,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,s,r):(t.flush(this),0)},t}(s("./node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js").AsyncAction)},"./node_modules/rxjs/dist/esm5/internal/scheduler/QueueScheduler.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{QueueScheduler:()=>a});var r=s("./node_modules/tslib/tslib.es6.mjs"),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.__extends)(t,e),t}(s("./node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js").AsyncScheduler)},"./node_modules/rxjs/dist/esm5/internal/scheduler/async.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{async:()=>n,asyncScheduler:()=>a});var r=s("./node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js"),a=new(s("./node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js").AsyncScheduler)(r.AsyncAction),n=a},"./node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{dateTimestampProvider:()=>r});var r={now:function(){return(r.delegate||Date).now()},delegate:void 0}},"./node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{intervalProvider:()=>a});var r=s("./node_modules/tslib/tslib.es6.mjs"),a={setInterval:function(e,t){for(var s=[],n=2;n<arguments.length;n++)s[n-2]=arguments[n];var o=a.delegate;return(null==o?void 0:o.setInterval)?o.setInterval.apply(o,(0,r.__spreadArray)([e,t],(0,r.__read)(s))):setInterval.apply(void 0,(0,r.__spreadArray)([e,t],(0,r.__read)(s)))},clearInterval:function(e){var t=a.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0}},"./node_modules/rxjs/dist/esm5/internal/scheduler/queue.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{queue:()=>n,queueScheduler:()=>a});var r=s("./node_modules/rxjs/dist/esm5/internal/scheduler/QueueAction.js"),a=new(s("./node_modules/rxjs/dist/esm5/internal/scheduler/QueueScheduler.js").QueueScheduler)(r.QueueAction),n=a},"./node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{timeoutProvider:()=>a});var r=s("./node_modules/tslib/tslib.es6.mjs"),a={setTimeout:function(e,t){for(var s=[],n=2;n<arguments.length;n++)s[n-2]=arguments[n];var o=a.delegate;return(null==o?void 0:o.setTimeout)?o.setTimeout.apply(o,(0,r.__spreadArray)([e,t],(0,r.__read)(s))):setTimeout.apply(void 0,(0,r.__spreadArray)([e,t],(0,r.__read)(s)))},clearTimeout:function(e){var t=a.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0}},"./node_modules/rxjs/dist/esm5/internal/symbol/iterator.js":(e,t,s)=>{"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}s.r(t),s.d(t,{getSymbolIterator:()=>r,iterator:()=>a});var a=r()},"./node_modules/rxjs/dist/esm5/internal/symbol/observable.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{observable:()=>r});var r="function"==typeof Symbol&&Symbol.observable||"@@observable"},"./node_modules/rxjs/dist/esm5/internal/util/EmptyError.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{EmptyError:()=>r});var r=(0,s("./node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js").createErrorClass)((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}))},"./node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{ObjectUnsubscribedError:()=>r});var r=(0,s("./node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js").createErrorClass)((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}))},"./node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{UnsubscriptionError:()=>r});var r=(0,s("./node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js").createErrorClass)((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}))},"./node_modules/rxjs/dist/esm5/internal/util/args.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{popNumber:()=>c,popResultSelector:()=>o,popScheduler:()=>i});var r=s("./node_modules/rxjs/dist/esm5/internal/util/isFunction.js"),a=s("./node_modules/rxjs/dist/esm5/internal/util/isScheduler.js");function n(e){return e[e.length-1]}function o(e){return(0,r.isFunction)(n(e))?e.pop():void 0}function i(e){return(0,a.isScheduler)(n(e))?e.pop():void 0}function c(e,t){return"number"==typeof n(e)?e.pop():t}},"./node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{argsArgArrayOrObject:()=>i});var r=Array.isArray,a=Object.getPrototypeOf,n=Object.prototype,o=Object.keys;function i(e){if(1===e.length){var t=e[0];if(r(t))return{args:t,keys:null};if((i=t)&&"object"==typeof i&&a(i)===n){var s=o(t);return{args:s.map((function(e){return t[e]})),keys:s}}}var i;return{args:e,keys:null}}},"./node_modules/rxjs/dist/esm5/internal/util/arrRemove.js":(e,t,s)=>{"use strict";function r(e,t){if(e){var s=e.indexOf(t);0<=s&&e.splice(s,1)}}s.r(t),s.d(t,{arrRemove:()=>r})},"./node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js":(e,t,s)=>{"use strict";function r(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}s.r(t),s.d(t,{createErrorClass:()=>r})},"./node_modules/rxjs/dist/esm5/internal/util/createObject.js":(e,t,s)=>{"use strict";function r(e,t){return e.reduce((function(e,s,r){return e[s]=t[r],e}),{})}s.r(t),s.d(t,{createObject:()=>r})},"./node_modules/rxjs/dist/esm5/internal/util/errorContext.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{captureError:()=>o,errorContext:()=>n});var r=s("./node_modules/rxjs/dist/esm5/internal/config.js"),a=null;function n(e){if(r.config.useDeprecatedSynchronousErrorHandling){var t=!a;if(t&&(a={errorThrown:!1,error:null}),e(),t){var s=a,n=s.errorThrown,o=s.error;if(a=null,n)throw o}}else e()}function o(e){r.config.useDeprecatedSynchronousErrorHandling&&a&&(a.errorThrown=!0,a.error=e)}},"./node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js":(e,t,s)=>{"use strict";function r(e,t,s,r,a){void 0===r&&(r=0),void 0===a&&(a=!1);var n=t.schedule((function(){s(),a?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(n),!a)return n}s.r(t),s.d(t,{executeSchedule:()=>r})},"./node_modules/rxjs/dist/esm5/internal/util/identity.js":(e,t,s)=>{"use strict";function r(e){return e}s.r(t),s.d(t,{identity:()=>r})},"./node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{isArrayLike:()=>r});var r=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},"./node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{isAsyncIterable:()=>a});var r=s("./node_modules/rxjs/dist/esm5/internal/util/isFunction.js");function a(e){return Symbol.asyncIterator&&(0,r.isFunction)(null==e?void 0:e[Symbol.asyncIterator])}},"./node_modules/rxjs/dist/esm5/internal/util/isDate.js":(e,t,s)=>{"use strict";function r(e){return e instanceof Date&&!isNaN(e)}s.r(t),s.d(t,{isValidDate:()=>r})},"./node_modules/rxjs/dist/esm5/internal/util/isFunction.js":(e,t,s)=>{"use strict";function r(e){return"function"==typeof e}s.r(t),s.d(t,{isFunction:()=>r})},"./node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{isInteropObservable:()=>n});var r=s("./node_modules/rxjs/dist/esm5/internal/symbol/observable.js"),a=s("./node_modules/rxjs/dist/esm5/internal/util/isFunction.js");function n(e){return(0,a.isFunction)(e[r.observable])}},"./node_modules/rxjs/dist/esm5/internal/util/isIterable.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{isIterable:()=>n});var r=s("./node_modules/rxjs/dist/esm5/internal/symbol/iterator.js"),a=s("./node_modules/rxjs/dist/esm5/internal/util/isFunction.js");function n(e){return(0,a.isFunction)(null==e?void 0:e[r.iterator])}},"./node_modules/rxjs/dist/esm5/internal/util/isPromise.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{isPromise:()=>a});var r=s("./node_modules/rxjs/dist/esm5/internal/util/isFunction.js");function a(e){return(0,r.isFunction)(null==e?void 0:e.then)}},"./node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{isReadableStreamLike:()=>o,readableStreamLikeToAsyncGenerator:()=>n});var r=s("./node_modules/tslib/tslib.es6.mjs"),a=s("./node_modules/rxjs/dist/esm5/internal/util/isFunction.js");function n(e){return(0,r.__asyncGenerator)(this,arguments,(function(){var t,s,a;return(0,r.__generator)(this,(function(n){switch(n.label){case 0:t=e.getReader(),n.label=1;case 1:n.trys.push([1,,9,10]),n.label=2;case 2:return[4,(0,r.__await)(t.read())];case 3:return s=n.sent(),a=s.value,s.done?[4,(0,r.__await)(void 0)]:[3,5];case 4:return[2,n.sent()];case 5:return[4,(0,r.__await)(a)];case 6:return[4,n.sent()];case 7:return n.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function o(e){return(0,a.isFunction)(null==e?void 0:e.getReader)}},"./node_modules/rxjs/dist/esm5/internal/util/isScheduler.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{isScheduler:()=>a});var r=s("./node_modules/rxjs/dist/esm5/internal/util/isFunction.js");function a(e){return e&&(0,r.isFunction)(e.schedule)}},"./node_modules/rxjs/dist/esm5/internal/util/lift.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{hasLift:()=>a,operate:()=>n});var r=s("./node_modules/rxjs/dist/esm5/internal/util/isFunction.js");function a(e){return(0,r.isFunction)(null==e?void 0:e.lift)}function n(e){return function(t){if(a(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}},"./node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{mapOneOrManyArgs:()=>o});var r=s("./node_modules/tslib/tslib.es6.mjs"),a=s("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),n=Array.isArray;function o(e){return(0,a.map)((function(t){return function(e,t){return n(t)?e.apply(void 0,(0,r.__spreadArray)([],(0,r.__read)(t))):e(t)}(e,t)}))}},"./node_modules/rxjs/dist/esm5/internal/util/noop.js":(e,t,s)=>{"use strict";function r(){}s.r(t),s.d(t,{noop:()=>r})},"./node_modules/rxjs/dist/esm5/internal/util/pipe.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{pipe:()=>a,pipeFromArray:()=>n});var r=s("./node_modules/rxjs/dist/esm5/internal/util/identity.js");function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(e)}function n(e){return 0===e.length?r.identity:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}},"./node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{reportUnhandledError:()=>n});var r=s("./node_modules/rxjs/dist/esm5/internal/config.js"),a=s("./node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js");function n(e){a.timeoutProvider.setTimeout((function(){var t=r.config.onUnhandledError;if(!t)throw e;t(e)}))}},"./node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js":(e,t,s)=>{"use strict";function r(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}s.r(t),s.d(t,{createInvalidObservableTypeError:()=>r})},"./src/initialiser lazy recursive ^.*constellation\\-mashup\\-bridge\\.js$":e=>{function t(e){return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}t.keys=()=>[],t.resolve=t,t.id="./src/initialiser lazy recursive ^.*constellation\\-mashup\\-bridge\\.js$",e.exports=t},"./node_modules/immer/dist/immer.mjs":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Immer:()=>q,applyPatches:()=>re,castDraft:()=>oe,castImmutable:()=>ie,createDraft:()=>ae,current:()=>K,enableMapSet:()=>X,enablePatches:()=>J,finishDraft:()=>ne,freeze:()=>S,immerable:()=>a,isDraft:()=>l,isDraftable:()=>u,nothing:()=>r,original:()=>f,produce:()=>Z,produceWithPatches:()=>ee,setAutoFreeze:()=>te,setUseStrictShallowCopy:()=>se});var r=Symbol.for("immer-nothing"),a=Symbol.for("immer-draftable"),n=Symbol.for("immer-state"),o=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}];function i(e,...t){{const s=o[e],r="function"==typeof s?s.apply(null,t):s;throw new Error(`[Immer] ${r}`)}}var c=Object.getPrototypeOf;function l(e){return!!e&&!!e[n]}function u(e){return!!e&&(p(e)||Array.isArray(e)||!!e[a]||!!e.constructor?.[a]||_(e)||I(e))}var d=Object.prototype.constructor.toString();function p(e){if(!e||"object"!=typeof e)return!1;const t=c(e);if(null===t)return!0;const s=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return s===Object||"function"==typeof s&&Function.toString.call(s)===d}function f(e){return l(e)||i(15,e),e[n].base_}function h(e,t){0===g(e)?Reflect.ownKeys(e).forEach((s=>{t(s,e[s],e)})):e.forEach(((s,r)=>t(r,s,e)))}function g(e){const t=e[n];return t?t.type_:Array.isArray(e)?1:_(e)?2:I(e)?3:0}function m(e,t){return 2===g(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function E(e,t){return 2===g(e)?e.get(t):e[t]}function A(e,t,s){const r=g(e);2===r?e.set(t,s):3===r?e.add(s):e[t]=s}function _(e){return e instanceof Map}function I(e){return e instanceof Set}function y(e){return e.copy_||e.base_}function C(e,t){if(_(e))return new Map(e);if(I(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const s=p(e);if(!0===t||"class_only"===t&&!s){const t=Object.getOwnPropertyDescriptors(e);delete t[n];let s=Reflect.ownKeys(t);for(let r=0;r<s.length;r++){const a=s[r],n=t[a];!1===n.writable&&(n.writable=!0,n.configurable=!0),(n.get||n.set)&&(t[a]={configurable:!0,writable:!0,enumerable:n.enumerable,value:e[a]})}return Object.create(c(e),t)}{const t=c(e);if(null!==t&&s)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function S(e,t=!1){return T(e)||l(e)||!u(e)||(g(e)>1&&(e.set=e.add=e.clear=e.delete=b),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>S(t,!0)))),e}function b(){i(2)}function T(e){return Object.isFrozen(e)}var N,v={};function R(e){const t=v[e];return t||i(0,e),t}function O(e,t){v[e]||(v[e]=t)}function D(){return N}function x(e,t){t&&(R("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function P(e){M(e),e.drafts_.forEach(j),e.drafts_=null}function M(e){e===N&&(N=e.parent_)}function w(e){return N={drafts_:[],parent_:N,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function j(e){const t=e[n];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function L(e,t){t.unfinalizedDrafts_=t.drafts_.length;const s=t.drafts_[0];return void 0!==e&&e!==s?(s[n].modified_&&(P(t),i(4)),u(e)&&(e=U(t,e),t.parent_||k(t,e)),t.patches_&&R("Patches").generateReplacementPatches_(s[n].base_,e,t.patches_,t.inversePatches_)):e=U(t,s,[]),P(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==r?e:void 0}function U(e,t,s){if(T(t))return t;const r=t[n];if(!r)return h(t,((a,n)=>F(e,r,t,a,n,s))),t;if(r.scope_!==e)return t;if(!r.modified_)return k(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let a=t,n=!1;3===r.type_&&(a=new Set(t),t.clear(),n=!0),h(a,((a,o)=>F(e,r,t,a,o,s,n))),k(e,t,!1),s&&e.patches_&&R("Patches").generatePatches_(r,s,e.patches_,e.inversePatches_)}return r.copy_}function F(e,t,s,r,a,n,o){if(a===s&&i(5),l(a)){const o=U(e,a,n&&t&&3!==t.type_&&!m(t.assigned_,r)?n.concat(r):void 0);if(A(s,r,o),!l(o))return;e.canAutoFreeze_=!1}else o&&s.add(a);if(u(a)&&!T(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;U(e,a),t&&t.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(s,r)||k(e,a)}}function k(e,t,s=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&S(t,s)}var V={get(e,t){if(t===n)return e;const s=y(e);if(!m(s,t))return function(e,t,s){const r=B(t,s);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,s,t);const r=s[t];return e.finalized_||!u(r)?r:r===$(e.base_,t)?(W(e),e.copy_[t]=Y(r,e)):r},has:(e,t)=>t in y(e),ownKeys:e=>Reflect.ownKeys(y(e)),set(e,t,s){const r=B(y(e),t);if(r?.set)return r.set.call(e.draft_,s),!0;if(!e.modified_){const r=$(y(e),t),i=r?.[n];if(i&&i.base_===s)return e.copy_[t]=s,e.assigned_[t]=!1,!0;if(((a=s)===(o=r)?0!==a||1/a==1/o:a!=a&&o!=o)&&(void 0!==s||m(e.base_,t)))return!0;W(e),H(e)}var a,o;return e.copy_[t]===s&&(void 0!==s||t in e.copy_)||Number.isNaN(s)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=s,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==$(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,W(e),H(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const s=y(e),r=Reflect.getOwnPropertyDescriptor(s,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:s[t]}:r},defineProperty(){i(11)},getPrototypeOf:e=>c(e.base_),setPrototypeOf(){i(12)}},G={};function $(e,t){const s=e[n];return(s?y(s):e)[t]}function B(e,t){if(!(t in e))return;let s=c(e);for(;s;){const e=Object.getOwnPropertyDescriptor(s,t);if(e)return e;s=c(s)}}function H(e){e.modified_||(e.modified_=!0,e.parent_&&H(e.parent_))}function W(e){e.copy_||(e.copy_=C(e.base_,e.scope_.immer_.useStrictShallowCopy_))}h(V,((e,t)=>{G[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),G.deleteProperty=function(e,t){return isNaN(parseInt(t))&&i(13),G.set.call(this,e,t,void 0)},G.set=function(e,t,s){return"length"!==t&&isNaN(parseInt(t))&&i(14),V.set.call(this,e[0],t,s,e[0])};var q=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,s)=>{if("function"==typeof e&&"function"!=typeof t){const s=t;t=e;const r=this;return function(e=s,...a){return r.produce(e,(e=>t.call(this,e,...a)))}}let a;if("function"!=typeof t&&i(6),void 0!==s&&"function"!=typeof s&&i(7),u(e)){const r=w(this),n=Y(e,void 0);let o=!0;try{a=t(n),o=!1}finally{o?P(r):M(r)}return x(r,s),L(a,r)}if(!e||"object"!=typeof e){if(a=t(e),void 0===a&&(a=e),a===r&&(a=void 0),this.autoFreeze_&&S(a,!0),s){const t=[],r=[];R("Patches").generateReplacementPatches_(e,a,t,r),s(t,r)}return a}i(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...s)=>this.produceWithPatches(t,(t=>e(t,...s)));let s,r;return[this.produce(e,t,((e,t)=>{s=e,r=t})),s,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){u(e)||i(8),l(e)&&(e=K(e));const t=w(this),s=Y(e,void 0);return s[n].isManual_=!0,M(t),s}finishDraft(e,t){const s=e&&e[n];s&&s.isManual_||i(9);const{scope_:r}=s;return x(r,t),L(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let s;for(s=t.length-1;s>=0;s--){const r=t[s];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}s>-1&&(t=t.slice(s+1));const r=R("Patches").applyPatches_;return l(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};function Y(e,t){const s=_(e)?R("MapSet").proxyMap_(e,t):I(e)?R("MapSet").proxySet_(e,t):function(e,t){const s=Array.isArray(e),r={type_:s?1:0,scope_:t?t.scope_:D(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,n=V;s&&(a=[r],n=G);const{revoke:o,proxy:i}=Proxy.revocable(a,n);return r.draft_=i,r.revoke_=o,i}(e,t);return(t?t.scope_:D()).drafts_.push(s),s}function K(e){return l(e)||i(10,e),z(e)}function z(e){if(!u(e)||T(e))return e;const t=e[n];let s;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,s=C(e,t.scope_.immer_.useStrictShallowCopy_)}else s=C(e,!0);return h(s,((e,t)=>{A(s,e,z(t))})),t&&(t.finalized_=!1),s}function J(){o.push('Sets cannot have "replace" patches.',(function(e){return"Unsupported patch operation: "+e}),(function(e){return"Cannot apply patch, path doesn't resolve: "+e}),"Patching reserved attributes like __proto__, prototype and constructor is not allowed");const e="replace",t="add",s="remove";function n(e){if(!u(e))return e;if(Array.isArray(e))return e.map(n);if(_(e))return new Map(Array.from(e.entries()).map((([e,t])=>[e,n(t)])));if(I(e))return new Set(Array.from(e).map(n));const t=Object.create(c(e));for(const s in e)t[s]=n(e[s]);return m(e,a)&&(t[a]=e[a]),t}function d(e){return l(e)?n(e):e}O("Patches",{applyPatches_:function(r,a){return a.forEach((a=>{const{path:o,op:c}=a;let l=r;for(let e=0;e<o.length-1;e++){const t=g(l);let s=o[e];"string"!=typeof s&&"number"!=typeof s&&(s=""+s),0!==t&&1!==t||"__proto__"!==s&&"constructor"!==s||i(19),"function"==typeof l&&"prototype"===s&&i(19),l=E(l,s),"object"!=typeof l&&i(18,o.join("/"))}const u=g(l),d=n(a.value),p=o[o.length-1];switch(c){case e:switch(u){case 2:return l.set(p,d);case 3:i(16);default:return l[p]=d}case t:switch(u){case 1:return"-"===p?l.push(d):l.splice(p,0,d);case 2:return l.set(p,d);case 3:return l.add(d);default:return l[p]=d}case s:switch(u){case 1:return l.splice(p,1);case 2:return l.delete(p);case 3:return l.delete(a.value);default:return delete l[p]}default:i(17,c)}})),r},generatePatches_:function(r,a,n,o){switch(r.type_){case 0:case 2:return function(r,a,n,o){const{base_:i,copy_:c}=r;h(r.assigned_,((r,l)=>{const u=E(i,r),p=E(c,r),f=l?m(i,r)?e:t:s;if(u===p&&f===e)return;const h=a.concat(r);n.push(f===s?{op:f,path:h}:{op:f,path:h,value:p}),o.push(f===t?{op:s,path:h}:f===s?{op:t,path:h,value:d(u)}:{op:e,path:h,value:d(u)})}))}(r,a,n,o);case 1:return function(r,a,n,o){let{base_:i,assigned_:c}=r,l=r.copy_;l.length<i.length&&([i,l]=[l,i],[n,o]=[o,n]);for(let t=0;t<i.length;t++)if(c[t]&&l[t]!==i[t]){const s=a.concat([t]);n.push({op:e,path:s,value:d(l[t])}),o.push({op:e,path:s,value:d(i[t])})}for(let e=i.length;e<l.length;e++){const s=a.concat([e]);n.push({op:t,path:s,value:d(l[e])})}for(let e=l.length-1;i.length<=e;--e){const t=a.concat([e]);o.push({op:s,path:t})}}(r,a,n,o);case 3:return function(e,r,a,n){let{base_:o,copy_:i}=e,c=0;o.forEach((e=>{if(!i.has(e)){const o=r.concat([c]);a.push({op:s,path:o,value:e}),n.unshift({op:t,path:o,value:e})}c++})),c=0,i.forEach((e=>{if(!o.has(e)){const o=r.concat([c]);a.push({op:t,path:o,value:e}),n.unshift({op:s,path:o,value:e})}c++}))}(r,a,n,o)}},generateReplacementPatches_:function(t,s,a,n){a.push({op:e,path:[],value:s===r?void 0:s}),n.push({op:e,path:[],value:t})}})}function X(){class e extends Map{constructor(e,t){super(),this[n]={type_:2,parent_:t,scope_:t?t.scope_:D(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:e,draft_:this,isManual_:!1,revoked_:!1}}get size(){return y(this[n]).size}has(e){return y(this[n]).has(e)}set(e,s){const r=this[n];return a(r),y(r).has(e)&&y(r).get(e)===s||(t(r),H(r),r.assigned_.set(e,!0),r.copy_.set(e,s),r.assigned_.set(e,!0)),this}delete(e){if(!this.has(e))return!1;const s=this[n];return a(s),t(s),H(s),s.base_.has(e)?s.assigned_.set(e,!1):s.assigned_.delete(e),s.copy_.delete(e),!0}clear(){const e=this[n];a(e),y(e).size&&(t(e),H(e),e.assigned_=new Map,h(e.base_,(t=>{e.assigned_.set(t,!1)})),e.copy_.clear())}forEach(e,t){y(this[n]).forEach(((s,r,a)=>{e.call(t,this.get(r),r,this)}))}get(e){const s=this[n];a(s);const r=y(s).get(e);if(s.finalized_||!u(r))return r;if(r!==s.base_.get(e))return r;const o=Y(r,s);return t(s),s.copy_.set(e,o),o}keys(){return y(this[n]).keys()}values(){const e=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const t=e.next();return t.done?t:{done:!1,value:this.get(t.value)}}}}entries(){const e=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const t=e.next();if(t.done)return t;const s=this.get(t.value);return{done:!1,value:[t.value,s]}}}}[Symbol.iterator](){return this.entries()}}function t(e){e.copy_||(e.assigned_=new Map,e.copy_=new Map(e.base_))}class s extends Set{constructor(e,t){super(),this[n]={type_:3,parent_:t,scope_:t?t.scope_:D(),modified_:!1,finalized_:!1,copy_:void 0,base_:e,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return y(this[n]).size}has(e){const t=this[n];return a(t),t.copy_?!!t.copy_.has(e)||!(!t.drafts_.has(e)||!t.copy_.has(t.drafts_.get(e))):t.base_.has(e)}add(e){const t=this[n];return a(t),this.has(e)||(r(t),H(t),t.copy_.add(e)),this}delete(e){if(!this.has(e))return!1;const t=this[n];return a(t),r(t),H(t),t.copy_.delete(e)||!!t.drafts_.has(e)&&t.copy_.delete(t.drafts_.get(e))}clear(){const e=this[n];a(e),y(e).size&&(r(e),H(e),e.copy_.clear())}values(){const e=this[n];return a(e),r(e),e.copy_.values()}entries(){const e=this[n];return a(e),r(e),e.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(e,t){const s=this.values();let r=s.next();for(;!r.done;)e.call(t,r.value,r.value,this),r=s.next()}}function r(e){e.copy_||(e.copy_=new Set,e.base_.forEach((t=>{if(u(t)){const s=Y(t,e);e.drafts_.set(t,s),e.copy_.add(s)}else e.copy_.add(t)})))}function a(e){e.revoked_&&i(3,JSON.stringify(y(e)))}O("MapSet",{proxyMap_:function(t,s){return new e(t,s)},proxySet_:function(e,t){return new s(e,t)}})}var Q=new q,Z=Q.produce,ee=Q.produceWithPatches.bind(Q),te=Q.setAutoFreeze.bind(Q),se=Q.setUseStrictShallowCopy.bind(Q),re=Q.applyPatches.bind(Q),ae=Q.createDraft.bind(Q),ne=Q.finishDraft.bind(Q);function oe(e){return e}function ie(e){return e}},"./node_modules/redux/dist/redux.mjs":(e,t,s)=>{"use strict";s.r(t),s.d(t,{__DO_NOT_USE__ActionTypes:()=>n,applyMiddleware:()=>g,bindActionCreators:()=>f,combineReducers:()=>d,compose:()=>h,createStore:()=>c,isAction:()=>m,isPlainObject:()=>o,legacy_createStore:()=>l});var r=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),a=()=>Math.random().toString(36).substring(7).split("").join("."),n={INIT:`@@redux/INIT${a()}`,REPLACE:`@@redux/REPLACE${a()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${a()}`};function o(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function i(e){let t=typeof e;return t=function(e){if(void 0===e)return"undefined";if(null===e)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";const s=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(s){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return s}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}(e),t}function c(e,t,s){if("function"!=typeof e)throw new Error(`Expected the root reducer to be a function. Instead, received: '${i(e)}'`);if("function"==typeof t&&"function"==typeof s||"function"==typeof s&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof t&&void 0===s&&(s=t,t=void 0),void 0!==s){if("function"!=typeof s)throw new Error(`Expected the enhancer to be a function. Instead, received: '${i(s)}'`);return s(c)(e,t)}let a=e,l=t,u=new Map,d=u,p=0,f=!1;function h(){d===u&&(d=new Map,u.forEach(((e,t)=>{d.set(t,e)})))}function g(){if(f)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return l}function m(e){if("function"!=typeof e)throw new Error(`Expected the listener to be a function. Instead, received: '${i(e)}'`);if(f)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let t=!0;h();const s=p++;return d.set(s,e),function(){if(t){if(f)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");t=!1,h(),d.delete(s),u=null}}}function E(e){if(!o(e))throw new Error(`Actions must be plain objects. Instead, the actual type was: '${i(e)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if("string"!=typeof e.type)throw new Error(`Action "type" property must be a string. Instead, the actual type was: '${i(e.type)}'. Value was: '${e.type}' (stringified)`);if(f)throw new Error("Reducers may not dispatch actions.");try{f=!0,l=a(l,e)}finally{f=!1}return(u=d).forEach((e=>{e()})),e}function A(e){if("function"!=typeof e)throw new Error(`Expected the nextReducer to be a function. Instead, received: '${i(e)}`);a=e,E({type:n.REPLACE})}function _(){const e=m;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(`Expected the observer to be an object. Instead, received: '${i(t)}'`);function s(){const e=t;e.next&&e.next(g())}return s(),{unsubscribe:e(s)}},[r](){return this}}}E({type:n.INIT});const I={dispatch:E,subscribe:m,getState:g,replaceReducer:A,[r]:_};return I}function l(e,t,s){return c(e,t,s)}function u(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function d(e){const t=Object.keys(e),s={};for(let r=0;r<t.length;r++){const a=t[r];void 0===e[a]&&u(`No reducer provided for key "${a}"`),"function"==typeof e[a]&&(s[a]=e[a])}const r=Object.keys(s);let a,c;a={};try{!function(e){Object.keys(e).forEach((t=>{const s=e[t];if(void 0===s(void 0,{type:n.INIT}))throw new Error(`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(void 0===s(void 0,{type:n.PROBE_UNKNOWN_ACTION()}))throw new Error(`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${n.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)}))}(s)}catch(e){c=e}return function(e={},t){if(c)throw c;{const r=function(e,t,s,r){const a=Object.keys(t),c=s&&s.type===n.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===a.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!o(e))return`The ${c} has unexpected type of "${i(e)}". Expected argument to be an object with the following keys: "${a.join('", "')}"`;const l=Object.keys(e).filter((e=>!t.hasOwnProperty(e)&&!r[e]));return l.forEach((e=>{r[e]=!0})),s&&s.type===n.REPLACE?void 0:l.length>0?`Unexpected ${l.length>1?"keys":"key"} "${l.join('", "')}" found in ${c}. Expected to find one of the known reducer keys instead: "${a.join('", "')}". Unexpected keys will be ignored.`:void 0}(e,s,t,a);r&&u(r)}let l=!1;const d={};for(let a=0;a<r.length;a++){const n=r[a],o=s[n],i=e[n],c=o(i,t);if(void 0===c){const e=t&&t.type;throw new Error(`When called with an action of type ${e?`"${String(e)}"`:"(unknown type)"}, the slice reducer for key "${n}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}d[n]=c,l=l||c!==i}return l=l||r.length!==Object.keys(e).length,l?d:e}}function p(e,t){return function(...s){return t(e.apply(this,s))}}function f(e,t){if("function"==typeof e)return p(e,t);if("object"!=typeof e||null===e)throw new Error(`bindActionCreators expected an object or a function, but instead received: '${i(e)}'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?`);const s={};for(const r in e){const a=e[r];"function"==typeof a&&(s[r]=p(a,t))}return s}function h(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...s)=>e(t(...s))))}function g(...e){return t=>(s,r)=>{const a=t(s,r);let n=()=>{throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const o={getState:a.getState,dispatch:(e,...t)=>n(e,...t)},i=e.map((e=>e(o)));return n=h(...i)(a.dispatch),{...a,dispatch:n}}}function m(e){return o(e)&&"type"in e&&"string"==typeof e.type}},"./node_modules/axios/lib/adapters/adapters.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("./node_modules/axios/lib/utils.js"),a=s("./node_modules/axios/lib/helpers/null.js"),n=s("./node_modules/axios/lib/adapters/xhr.js"),o=s("./node_modules/axios/lib/adapters/fetch.js"),i=s("./node_modules/axios/lib/core/AxiosError.js");const c={http:a.default,xhr:n.default,fetch:o.default};r.default.forEach(c,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const l=e=>`- ${e}`,u=e=>r.default.isFunction(e)||null===e||!1===e,d={getAdapter:e=>{e=r.default.isArray(e)?e:[e];const{length:t}=e;let s,a;const n={};for(let r=0;r<t;r++){let t;if(s=e[r],a=s,!u(s)&&(a=c[(t=String(s)).toLowerCase()],void 0===a))throw new i.default(`Unknown adapter '${t}'`);if(a)break;n[t||"#"+r]=a}if(!a){const e=Object.entries(n).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let s=t?e.length>1?"since :\n"+e.map(l).join("\n"):" "+l(e[0]):"as no adapter specified";throw new i.default("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return a},adapters:c}},"./node_modules/axios/lib/adapters/fetch.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y});var r=s("./node_modules/axios/lib/platform/index.js"),a=s("./node_modules/axios/lib/utils.js"),n=s("./node_modules/axios/lib/core/AxiosError.js"),o=s("./node_modules/axios/lib/helpers/composeSignals.js"),i=s("./node_modules/axios/lib/helpers/trackStream.js"),c=s("./node_modules/axios/lib/core/AxiosHeaders.js"),l=s("./node_modules/axios/lib/helpers/progressEventReducer.js"),u=s("./node_modules/axios/lib/helpers/resolveConfig.js"),d=s("./node_modules/axios/lib/core/settle.js");const p="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,f=p&&"function"==typeof ReadableStream,h=p&&("function"==typeof TextEncoder?(g=new TextEncoder,e=>g.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var g;const m=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},E=f&&m((()=>{let e=!1;const t=new Request(r.default.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),A=f&&m((()=>a.default.isReadableStream(new Response("").body))),_={stream:A&&(e=>e.body)};var I;p&&(I=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!_[e]&&(_[e]=a.default.isFunction(I[e])?t=>t[e]():(t,s)=>{throw new n.default(`Response type '${e}' is not supported`,n.default.ERR_NOT_SUPPORT,s)})})));const y=p&&(async e=>{let{url:t,method:s,data:r,signal:p,cancelToken:f,timeout:g,onDownloadProgress:m,onUploadProgress:I,responseType:y,headers:C,withCredentials:S="same-origin",fetchOptions:b}=(0,u.default)(e);y=y?(y+"").toLowerCase():"text";let T,N,[v,R]=p||f||g?(0,o.default)([p,f],g):[];const O=()=>{!T&&setTimeout((()=>{v&&v.unsubscribe()})),T=!0};let D;try{if(I&&E&&"get"!==s&&"head"!==s&&0!==(D=await(async(e,t)=>{const s=a.default.toFiniteNumber(e.getContentLength());return null==s?(async e=>null==e?0:a.default.isBlob(e)?e.size:a.default.isSpecCompliantForm(e)?(await new Request(e).arrayBuffer()).byteLength:a.default.isArrayBufferView(e)||a.default.isArrayBuffer(e)?e.byteLength:(a.default.isURLSearchParams(e)&&(e+=""),a.default.isString(e)?(await h(e)).byteLength:void 0))(t):s})(C,r))){let e,s=new Request(t,{method:"POST",body:r,duplex:"half"});if(a.default.isFormData(r)&&(e=s.headers.get("content-type"))&&C.setContentType(e),s.body){const[e,t]=(0,l.progressEventDecorator)(D,(0,l.progressEventReducer)((0,l.asyncDecorator)(I)));r=(0,i.trackStream)(s.body,65536,e,t,h)}}a.default.isString(S)||(S=S?"include":"omit"),N=new Request(t,{...b,signal:v,method:s.toUpperCase(),headers:C.normalize().toJSON(),body:r,duplex:"half",credentials:S});let n=await fetch(N);const o=A&&("stream"===y||"response"===y);if(A&&(m||o)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=n[t]}));const t=a.default.toFiniteNumber(n.headers.get("content-length")),[s,r]=m&&(0,l.progressEventDecorator)(t,(0,l.progressEventReducer)((0,l.asyncDecorator)(m),!0))||[];n=new Response((0,i.trackStream)(n.body,65536,s,(()=>{r&&r(),o&&O()}),h),e)}y=y||"text";let u=await _[a.default.findKey(_,y)||"text"](n,e);return!o&&O(),R&&R(),await new Promise(((t,s)=>{(0,d.default)(t,s,{data:u,headers:c.default.from(n.headers),status:n.status,statusText:n.statusText,config:e,request:N})}))}catch(t){if(O(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new n.default("Network Error",n.default.ERR_NETWORK,e,N),{cause:t.cause||t});throw n.default.from(t,t&&t.code,e,N)}})},"./node_modules/axios/lib/adapters/xhr.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var r=s("./node_modules/axios/lib/utils.js"),a=s("./node_modules/axios/lib/core/settle.js"),n=s("./node_modules/axios/lib/defaults/transitional.js"),o=s("./node_modules/axios/lib/core/AxiosError.js"),i=s("./node_modules/axios/lib/cancel/CanceledError.js"),c=s("./node_modules/axios/lib/helpers/parseProtocol.js"),l=s("./node_modules/axios/lib/platform/index.js"),u=s("./node_modules/axios/lib/core/AxiosHeaders.js"),d=s("./node_modules/axios/lib/helpers/progressEventReducer.js"),p=s("./node_modules/axios/lib/helpers/resolveConfig.js");const f="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,s){const f=(0,p.default)(e);let h=f.data;const g=u.default.from(f.headers).normalize();let m,E,A,_,I,{responseType:y,onUploadProgress:C,onDownloadProgress:S}=f;function b(){_&&_(),I&&I(),f.cancelToken&&f.cancelToken.unsubscribe(m),f.signal&&f.signal.removeEventListener("abort",m)}let T=new XMLHttpRequest;function N(){if(!T)return;const r=u.default.from("getAllResponseHeaders"in T&&T.getAllResponseHeaders()),n={data:y&&"text"!==y&&"json"!==y?T.response:T.responseText,status:T.status,statusText:T.statusText,headers:r,config:e,request:T};(0,a.default)((function(e){t(e),b()}),(function(e){s(e),b()}),n),T=null}T.open(f.method.toUpperCase(),f.url,!0),T.timeout=f.timeout,"onloadend"in T?T.onloadend=N:T.onreadystatechange=function(){T&&4===T.readyState&&(0!==T.status||T.responseURL&&0===T.responseURL.indexOf("file:"))&&setTimeout(N)},T.onabort=function(){T&&(s(new o.default("Request aborted",o.default.ECONNABORTED,e,T)),T=null)},T.onerror=function(){s(new o.default("Network Error",o.default.ERR_NETWORK,e,T)),T=null},T.ontimeout=function(){let t=f.timeout?"timeout of "+f.timeout+"ms exceeded":"timeout exceeded";const r=f.transitional||n.default;f.timeoutErrorMessage&&(t=f.timeoutErrorMessage),s(new o.default(t,r.clarifyTimeoutError?o.default.ETIMEDOUT:o.default.ECONNABORTED,e,T)),T=null},void 0===h&&g.setContentType(null),"setRequestHeader"in T&&r.default.forEach(g.toJSON(),(function(e,t){T.setRequestHeader(t,e)})),r.default.isUndefined(f.withCredentials)||(T.withCredentials=!!f.withCredentials),y&&"json"!==y&&(T.responseType=f.responseType),S&&([A,I]=(0,d.progressEventReducer)(S,!0),T.addEventListener("progress",A)),C&&T.upload&&([E,_]=(0,d.progressEventReducer)(C),T.upload.addEventListener("progress",E),T.upload.addEventListener("loadend",_)),(f.cancelToken||f.signal)&&(m=t=>{T&&(s(!t||t.type?new i.default(null,e,T):t),T.abort(),T=null)},f.cancelToken&&f.cancelToken.subscribe(m),f.signal&&(f.signal.aborted?m():f.signal.addEventListener("abort",m)));const v=(0,c.default)(f.url);v&&-1===l.default.protocols.indexOf(v)?s(new o.default("Unsupported protocol "+v+":",o.default.ERR_BAD_REQUEST,e)):T.send(h||null)}))}},"./node_modules/axios/lib/axios.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y});var r=s("./node_modules/axios/lib/utils.js"),a=s("./node_modules/axios/lib/helpers/bind.js"),n=s("./node_modules/axios/lib/core/Axios.js"),o=s("./node_modules/axios/lib/core/mergeConfig.js"),i=s("./node_modules/axios/lib/defaults/index.js"),c=s("./node_modules/axios/lib/helpers/formDataToJSON.js"),l=s("./node_modules/axios/lib/cancel/CanceledError.js"),u=s("./node_modules/axios/lib/cancel/CancelToken.js"),d=s("./node_modules/axios/lib/cancel/isCancel.js"),p=s("./node_modules/axios/lib/env/data.js"),f=s("./node_modules/axios/lib/helpers/toFormData.js"),h=s("./node_modules/axios/lib/core/AxiosError.js"),g=s("./node_modules/axios/lib/helpers/spread.js"),m=s("./node_modules/axios/lib/helpers/isAxiosError.js"),E=s("./node_modules/axios/lib/core/AxiosHeaders.js"),A=s("./node_modules/axios/lib/adapters/adapters.js"),_=s("./node_modules/axios/lib/helpers/HttpStatusCode.js");const I=function e(t){const s=new n.default(t),i=(0,a.default)(n.default.prototype.request,s);return r.default.extend(i,n.default.prototype,s,{allOwnKeys:!0}),r.default.extend(i,s,null,{allOwnKeys:!0}),i.create=function(s){return e((0,o.default)(t,s))},i}(i.default);I.Axios=n.default,I.CanceledError=l.default,I.CancelToken=u.default,I.isCancel=d.default,I.VERSION=p.VERSION,I.toFormData=f.default,I.AxiosError=h.default,I.Cancel=I.CanceledError,I.all=function(e){return Promise.all(e)},I.spread=g.default,I.isAxiosError=m.default,I.mergeConfig=o.default,I.AxiosHeaders=E.default,I.formToJSON=e=>(0,c.default)(r.default.isHTMLForm(e)?new FormData(e):e),I.getAdapter=A.default.getAdapter,I.HttpStatusCode=_.default,I.default=I;const y=I},"./node_modules/axios/lib/cancel/CancelToken.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./node_modules/axios/lib/cancel/CanceledError.js");class a{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const s=this;this.promise.then((e=>{if(!s._listeners)return;let t=s._listeners.length;for(;t-- >0;)s._listeners[t](e);s._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{s.subscribe(e),t=e})).then(e);return r.cancel=function(){s.unsubscribe(t)},r},e((function(e,a,n){s.reason||(s.reason=new r.default(e,a,n),t(s.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new a((function(t){e=t})),cancel:e}}}const n=a},"./node_modules/axios/lib/cancel/CanceledError.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./node_modules/axios/lib/core/AxiosError.js");function a(e,t,s){r.default.call(this,null==e?"canceled":e,r.default.ERR_CANCELED,t,s),this.name="CanceledError"}s("./node_modules/axios/lib/utils.js").default.inherits(a,r.default,{__CANCEL__:!0});const n=a},"./node_modules/axios/lib/cancel/isCancel.js":(e,t,s)=>{"use strict";function r(e){return!(!e||!e.__CANCEL__)}s.r(t),s.d(t,{default:()=>r})},"./node_modules/axios/lib/core/Axios.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var r=s("./node_modules/axios/lib/utils.js"),a=s("./node_modules/axios/lib/helpers/buildURL.js"),n=s("./node_modules/axios/lib/core/InterceptorManager.js"),o=s("./node_modules/axios/lib/core/dispatchRequest.js"),i=s("./node_modules/axios/lib/core/mergeConfig.js"),c=s("./node_modules/axios/lib/core/buildFullPath.js"),l=s("./node_modules/axios/lib/helpers/validator.js"),u=s("./node_modules/axios/lib/core/AxiosHeaders.js");const d=l.default.validators;class p{constructor(e){this.defaults=e,this.interceptors={request:new n.default,response:new n.default}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const s=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?s&&!String(e.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+s):e.stack=s}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=(0,i.default)(this.defaults,t);const{transitional:s,paramsSerializer:a,headers:n}=t;void 0!==s&&l.default.assertOptions(s,{silentJSONParsing:d.transitional(d.boolean),forcedJSONParsing:d.transitional(d.boolean),clarifyTimeoutError:d.transitional(d.boolean)},!1),null!=a&&(r.default.isFunction(a)?t.paramsSerializer={serialize:a}:l.default.assertOptions(a,{encode:d.function,serialize:d.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let c=n&&r.default.merge(n.common,n[t.method]);n&&r.default.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete n[e]})),t.headers=u.default.concat(c,n);const p=[];let f=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(f=f&&e.synchronous,p.unshift(e.fulfilled,e.rejected))}));const h=[];let g;this.interceptors.response.forEach((function(e){h.push(e.fulfilled,e.rejected)}));let m,E=0;if(!f){const e=[o.default.bind(this),void 0];for(e.unshift.apply(e,p),e.push.apply(e,h),m=e.length,g=Promise.resolve(t);E<m;)g=g.then(e[E++],e[E++]);return g}m=p.length;let A=t;for(E=0;E<m;){const e=p[E++],t=p[E++];try{A=e(A)}catch(e){t.call(this,e);break}}try{g=o.default.call(this,A)}catch(e){return Promise.reject(e)}for(E=0,m=h.length;E<m;)g=g.then(h[E++],h[E++]);return g}getUri(e){e=(0,i.default)(this.defaults,e);const t=(0,c.default)(e.baseURL,e.url);return(0,a.default)(t,e.params,e.paramsSerializer)}}r.default.forEach(["delete","get","head","options"],(function(e){p.prototype[e]=function(t,s){return this.request((0,i.default)(s||{},{method:e,url:t,data:(s||{}).data}))}})),r.default.forEach(["post","put","patch"],(function(e){function t(t){return function(s,r,a){return this.request((0,i.default)(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:s,data:r}))}}p.prototype[e]=t(),p.prototype[e+"Form"]=t(!0)}));const f=p},"./node_modules/axios/lib/core/AxiosError.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./node_modules/axios/lib/utils.js");function a(e,t,s,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),s&&(this.config=s),r&&(this.request=r),a&&(this.response=a)}r.default.inherits(a,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r.default.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const n=a.prototype,o={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{o[e]={value:e}})),Object.defineProperties(a,o),Object.defineProperty(n,"isAxiosError",{value:!0}),a.from=(e,t,s,o,i,c)=>{const l=Object.create(n);return r.default.toFlatObject(e,l,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),a.call(l,e.message,t,s,o,i),l.cause=e,l.name=e.name,c&&Object.assign(l,c),l};const i=a},"./node_modules/axios/lib/core/AxiosHeaders.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./node_modules/axios/lib/utils.js"),a=s("./node_modules/axios/lib/helpers/parseHeaders.js");const n=Symbol("internals");function o(e){return e&&String(e).trim().toLowerCase()}function i(e){return!1===e||null==e?e:r.default.isArray(e)?e.map(i):String(e)}function c(e,t,s,a,n){return r.default.isFunction(a)?a.call(this,t,s):(n&&(t=s),r.default.isString(t)?r.default.isString(a)?-1!==t.indexOf(a):r.default.isRegExp(a)?a.test(t):void 0:void 0)}class l{constructor(e){e&&this.set(e)}set(e,t,s){const n=this;function c(e,t,s){const a=o(t);if(!a)throw new Error("header name must be a non-empty string");const c=r.default.findKey(n,a);(!c||void 0===n[c]||!0===s||void 0===s&&!1!==n[c])&&(n[c||t]=i(e))}const l=(e,t)=>r.default.forEach(e,((e,s)=>c(e,s,t)));if(r.default.isPlainObject(e)||e instanceof this.constructor)l(e,t);else if(r.default.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))l((0,a.default)(e),t);else if(r.default.isHeaders(e))for(const[t,r]of e.entries())c(r,t,s);else null!=e&&c(t,e,s);return this}get(e,t){if(e=o(e)){const s=r.default.findKey(this,e);if(s){const e=this[s];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=s.exec(e);)t[r[1]]=r[2];return t}(e);if(r.default.isFunction(t))return t.call(this,e,s);if(r.default.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=o(e)){const s=r.default.findKey(this,e);return!(!s||void 0===this[s]||t&&!c(0,this[s],s,t))}return!1}delete(e,t){const s=this;let a=!1;function n(e){if(e=o(e)){const n=r.default.findKey(s,e);!n||t&&!c(0,s[n],n,t)||(delete s[n],a=!0)}}return r.default.isArray(e)?e.forEach(n):n(e),a}clear(e){const t=Object.keys(this);let s=t.length,r=!1;for(;s--;){const a=t[s];e&&!c(0,this[a],a,e,!0)||(delete this[a],r=!0)}return r}normalize(e){const t=this,s={};return r.default.forEach(this,((a,n)=>{const o=r.default.findKey(s,n);if(o)return t[o]=i(a),void delete t[n];const c=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,s)=>t.toUpperCase()+s))}(n):String(n).trim();c!==n&&delete t[n],t[c]=i(a),s[c]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return r.default.forEach(this,((s,a)=>{null!=s&&!1!==s&&(t[a]=e&&r.default.isArray(s)?s.join(", "):s)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const s=new this(e);return t.forEach((e=>s.set(e))),s}static accessor(e){const t=(this[n]=this[n]={accessors:{}}).accessors,s=this.prototype;function a(e){const a=o(e);t[a]||(function(e,t){const s=r.default.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+s,{value:function(e,s,a){return this[r].call(this,t,e,s,a)},configurable:!0})}))}(s,e),t[a]=!0)}return r.default.isArray(e)?e.forEach(a):a(e),this}}l.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),r.default.reduceDescriptors(l.prototype,(({value:e},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[s]=e}}})),r.default.freezeMethods(l);const u=l},"./node_modules/axios/lib/core/InterceptorManager.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./node_modules/axios/lib/utils.js");const a=class{constructor(){this.handlers=[]}use(e,t,s){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!s&&s.synchronous,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){r.default.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}},"./node_modules/axios/lib/core/buildFullPath.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./node_modules/axios/lib/helpers/isAbsoluteURL.js"),a=s("./node_modules/axios/lib/helpers/combineURLs.js");function n(e,t){return e&&!(0,r.default)(t)?(0,a.default)(e,t):t}},"./node_modules/axios/lib/core/dispatchRequest.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./node_modules/axios/lib/core/transformData.js"),a=s("./node_modules/axios/lib/cancel/isCancel.js"),n=s("./node_modules/axios/lib/defaults/index.js"),o=s("./node_modules/axios/lib/cancel/CanceledError.js"),i=s("./node_modules/axios/lib/core/AxiosHeaders.js"),c=s("./node_modules/axios/lib/adapters/adapters.js");function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new o.default(null,e)}function u(e){return l(e),e.headers=i.default.from(e.headers),e.data=r.default.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),c.default.getAdapter(e.adapter||n.default.adapter)(e).then((function(t){return l(e),t.data=r.default.call(e,e.transformResponse,t),t.headers=i.default.from(t.headers),t}),(function(t){return(0,a.default)(t)||(l(e),t&&t.response&&(t.response.data=r.default.call(e,e.transformResponse,t.response),t.response.headers=i.default.from(t.response.headers))),Promise.reject(t)}))}},"./node_modules/axios/lib/core/mergeConfig.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./node_modules/axios/lib/utils.js"),a=s("./node_modules/axios/lib/core/AxiosHeaders.js");const n=e=>e instanceof a.default?{...e}:e;function o(e,t){t=t||{};const s={};function a(e,t,s){return r.default.isPlainObject(e)&&r.default.isPlainObject(t)?r.default.merge.call({caseless:s},e,t):r.default.isPlainObject(t)?r.default.merge({},t):r.default.isArray(t)?t.slice():t}function o(e,t,s){return r.default.isUndefined(t)?r.default.isUndefined(e)?void 0:a(void 0,e,s):a(e,t,s)}function i(e,t){if(!r.default.isUndefined(t))return a(void 0,t)}function c(e,t){return r.default.isUndefined(t)?r.default.isUndefined(e)?void 0:a(void 0,e):a(void 0,t)}function l(s,r,n){return n in t?a(s,r):n in e?a(void 0,s):void 0}const u={url:i,method:i,data:i,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:l,headers:(e,t)=>o(n(e),n(t),!0)};return r.default.forEach(Object.keys(Object.assign({},e,t)),(function(a){const n=u[a]||o,i=n(e[a],t[a],a);r.default.isUndefined(i)&&n!==l||(s[a]=i)})),s}},"./node_modules/axios/lib/core/settle.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./node_modules/axios/lib/core/AxiosError.js");function a(e,t,s){const a=s.config.validateStatus;s.status&&a&&!a(s.status)?t(new r.default("Request failed with status code "+s.status,[r.default.ERR_BAD_REQUEST,r.default.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s)):e(s)}},"./node_modules/axios/lib/core/transformData.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./node_modules/axios/lib/utils.js"),a=s("./node_modules/axios/lib/defaults/index.js"),n=s("./node_modules/axios/lib/core/AxiosHeaders.js");function o(e,t){const s=this||a.default,o=t||s,i=n.default.from(o.headers);let c=o.data;return r.default.forEach(e,(function(e){c=e.call(s,c,i.normalize(),t?t.status:void 0)})),i.normalize(),c}},"./node_modules/axios/lib/defaults/index.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("./node_modules/axios/lib/utils.js"),a=s("./node_modules/axios/lib/core/AxiosError.js"),n=s("./node_modules/axios/lib/defaults/transitional.js"),o=s("./node_modules/axios/lib/helpers/toFormData.js"),i=s("./node_modules/axios/lib/helpers/toURLEncodedForm.js"),c=s("./node_modules/axios/lib/platform/index.js"),l=s("./node_modules/axios/lib/helpers/formDataToJSON.js");const u={transitional:n.default,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const s=t.getContentType()||"",a=s.indexOf("application/json")>-1,n=r.default.isObject(e);if(n&&r.default.isHTMLForm(e)&&(e=new FormData(e)),r.default.isFormData(e))return a?JSON.stringify((0,l.default)(e)):e;if(r.default.isArrayBuffer(e)||r.default.isBuffer(e)||r.default.isStream(e)||r.default.isFile(e)||r.default.isBlob(e)||r.default.isReadableStream(e))return e;if(r.default.isArrayBufferView(e))return e.buffer;if(r.default.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(n){if(s.indexOf("application/x-www-form-urlencoded")>-1)return(0,i.default)(e,this.formSerializer).toString();if((c=r.default.isFileList(e))||s.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return(0,o.default)(c?{"files[]":e}:e,t&&new t,this.formSerializer)}}return n||a?(t.setContentType("application/json",!1),function(e,t,s){if(r.default.isString(e))try{return(0,JSON.parse)(e),r.default.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||u.transitional,s=t&&t.forcedJSONParsing,n="json"===this.responseType;if(r.default.isResponse(e)||r.default.isReadableStream(e))return e;if(e&&r.default.isString(e)&&(s&&!this.responseType||n)){const s=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw a.default.from(e,a.default.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:c.default.classes.FormData,Blob:c.default.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};r.default.forEach(["delete","get","head","post","put","patch"],(e=>{u.headers[e]={}}));const d=u},"./node_modules/axios/lib/defaults/transitional.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},"./node_modules/axios/lib/env/data.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{VERSION:()=>r});const r="1.7.4"},"./node_modules/axios/lib/helpers/AxiosURLSearchParams.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./node_modules/axios/lib/helpers/toFormData.js");function a(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function n(e,t){this._pairs=[],e&&(0,r.default)(e,this,t)}const o=n.prototype;o.append=function(e,t){this._pairs.push([e,t])},o.toString=function(e){const t=e?function(t){return e.call(this,t,a)}:a;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const i=n},"./node_modules/axios/lib/helpers/HttpStatusCode.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});const r={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};Object.entries(r).forEach((([e,t])=>{r[t]=e}));const a=r},"./node_modules/axios/lib/helpers/bind.js":(e,t,s)=>{"use strict";function r(e,t){return function(){return e.apply(t,arguments)}}s.r(t),s.d(t,{default:()=>r})},"./node_modules/axios/lib/helpers/buildURL.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./node_modules/axios/lib/utils.js"),a=s("./node_modules/axios/lib/helpers/AxiosURLSearchParams.js");function n(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function o(e,t,s){if(!t)return e;const o=s&&s.encode||n,i=s&&s.serialize;let c;if(c=i?i(t,s):r.default.isURLSearchParams(t)?t.toString():new a.default(t,s).toString(o),c){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+c}return e}},"./node_modules/axios/lib/helpers/combineURLs.js":(e,t,s)=>{"use strict";function r(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}s.r(t),s.d(t,{default:()=>r})},"./node_modules/axios/lib/helpers/composeSignals.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./node_modules/axios/lib/cancel/CanceledError.js"),a=s("./node_modules/axios/lib/core/AxiosError.js");const n=(e,t)=>{let s,n=new AbortController;const o=function(e){if(!s){s=!0,c();const t=e instanceof Error?e:this.reason;n.abort(t instanceof a.default?t:new r.default(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{o(new a.default(`timeout ${t} of ms exceeded`,a.default.ETIMEDOUT))}),t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e&&(e.removeEventListener?e.removeEventListener("abort",o):e.unsubscribe(o))})),e=null)};e.forEach((e=>e&&e.addEventListener&&e.addEventListener("abort",o)));const{signal:l}=n;return l.unsubscribe=c,[l,()=>{i&&clearTimeout(i),i=null}]}},"./node_modules/axios/lib/helpers/cookies.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./node_modules/axios/lib/utils.js");const a=s("./node_modules/axios/lib/platform/index.js").default.hasStandardBrowserEnv?{write(e,t,s,a,n,o){const i=[e+"="+encodeURIComponent(t)];r.default.isNumber(s)&&i.push("expires="+new Date(s).toGMTString()),r.default.isString(a)&&i.push("path="+a),r.default.isString(n)&&i.push("domain="+n),!0===o&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}}},"./node_modules/axios/lib/helpers/formDataToJSON.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./node_modules/axios/lib/utils.js");const a=function(e){function t(e,s,a,n){let o=e[n++];if("__proto__"===o)return!0;const i=Number.isFinite(+o),c=n>=e.length;return o=!o&&r.default.isArray(a)?a.length:o,c?(r.default.hasOwnProp(a,o)?a[o]=[a[o],s]:a[o]=s,!i):(a[o]&&r.default.isObject(a[o])||(a[o]=[]),t(e,s,a[o],n)&&r.default.isArray(a[o])&&(a[o]=function(e){const t={},s=Object.keys(e);let r;const a=s.length;let n;for(r=0;r<a;r++)n=s[r],t[n]=e[n];return t}(a[o])),!i)}if(r.default.isFormData(e)&&r.default.isFunction(e.entries)){const s={};return r.default.forEachEntry(e,((e,a)=>{t(function(e){return r.default.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),a,s,0)})),s}return null}},"./node_modules/axios/lib/helpers/isAbsoluteURL.js":(e,t,s)=>{"use strict";function r(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}s.r(t),s.d(t,{default:()=>r})},"./node_modules/axios/lib/helpers/isAxiosError.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./node_modules/axios/lib/utils.js");function a(e){return r.default.isObject(e)&&!0===e.isAxiosError}},"./node_modules/axios/lib/helpers/isURLSameOrigin.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./node_modules/axios/lib/utils.js");const a=s("./node_modules/axios/lib/platform/index.js").default.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let s;function a(s){let r=s;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return s=a(window.location.href),function(e){const t=r.default.isString(e)?a(e):e;return t.protocol===s.protocol&&t.host===s.host}}():function(){return!0}},"./node_modules/axios/lib/helpers/null.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=null},"./node_modules/axios/lib/helpers/parseHeaders.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});const r=s("./node_modules/axios/lib/utils.js").default.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),a=e=>{const t={};let s,a,n;return e&&e.split("\n").forEach((function(e){n=e.indexOf(":"),s=e.substring(0,n).trim().toLowerCase(),a=e.substring(n+1).trim(),!s||t[s]&&r[s]||("set-cookie"===s?t[s]?t[s].push(a):t[s]=[a]:t[s]=t[s]?t[s]+", "+a:a)})),t}},"./node_modules/axios/lib/helpers/parseProtocol.js":(e,t,s)=>{"use strict";function r(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}s.r(t),s.d(t,{default:()=>r})},"./node_modules/axios/lib/helpers/progressEventReducer.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{asyncDecorator:()=>c,progressEventDecorator:()=>i,progressEventReducer:()=>o});var r=s("./node_modules/axios/lib/helpers/speedometer.js"),a=s("./node_modules/axios/lib/helpers/throttle.js"),n=s("./node_modules/axios/lib/utils.js");const o=(e,t,s=3)=>{let n=0;const o=(0,r.default)(50,250);return(0,a.default)((s=>{const r=s.loaded,a=s.lengthComputable?s.total:void 0,i=r-n,c=o(i);n=r,e({loaded:r,total:a,progress:a?r/a:void 0,bytes:i,rate:c||void 0,estimated:c&&a&&r<=a?(a-r)/c:void 0,event:s,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),s)},i=(e,t)=>{const s=null!=e;return[r=>t[0]({lengthComputable:s,total:e,loaded:r}),t[1]]},c=e=>(...t)=>n.default.asap((()=>e(...t)))},"./node_modules/axios/lib/helpers/resolveConfig.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("./node_modules/axios/lib/platform/index.js"),a=s("./node_modules/axios/lib/utils.js"),n=s("./node_modules/axios/lib/helpers/isURLSameOrigin.js"),o=s("./node_modules/axios/lib/helpers/cookies.js"),i=s("./node_modules/axios/lib/core/buildFullPath.js"),c=s("./node_modules/axios/lib/core/mergeConfig.js"),l=s("./node_modules/axios/lib/core/AxiosHeaders.js"),u=s("./node_modules/axios/lib/helpers/buildURL.js");const d=e=>{const t=(0,c.default)({},e);let s,{data:d,withXSRFToken:p,xsrfHeaderName:f,xsrfCookieName:h,headers:g,auth:m}=t;if(t.headers=g=l.default.from(g),t.url=(0,u.default)((0,i.default)(t.baseURL,t.url),e.params,e.paramsSerializer),m&&g.set("Authorization","Basic "+btoa((m.username||"")+":"+(m.password?unescape(encodeURIComponent(m.password)):""))),a.default.isFormData(d))if(r.default.hasStandardBrowserEnv||r.default.hasStandardBrowserWebWorkerEnv)g.setContentType(void 0);else if(!1!==(s=g.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];g.setContentType([e||"multipart/form-data",...t].join("; "))}if(r.default.hasStandardBrowserEnv&&(p&&a.default.isFunction(p)&&(p=p(t)),p||!1!==p&&(0,n.default)(t.url))){const e=f&&h&&o.default.read(h);e&&g.set(f,e)}return t}},"./node_modules/axios/lib/helpers/speedometer.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=function(e,t){e=e||10;const s=new Array(e),r=new Array(e);let a,n=0,o=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),l=r[o];a||(a=c),s[n]=i,r[n]=c;let u=o,d=0;for(;u!==n;)d+=s[u++],u%=e;if(n=(n+1)%e,n===o&&(o=(o+1)%e),c-a<t)return;const p=l&&c-l;return p?Math.round(1e3*d/p):void 0}}},"./node_modules/axios/lib/helpers/spread.js":(e,t,s)=>{"use strict";function r(e){return function(t){return e.apply(null,t)}}s.r(t),s.d(t,{default:()=>r})},"./node_modules/axios/lib/helpers/throttle.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=function(e,t){let s,r,a=0,n=1e3/t;const o=(t,n=Date.now())=>{a=n,s=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),i=t-a;i>=n?o(e,t):(s=e,r||(r=setTimeout((()=>{r=null,o(s)}),n-i)))},()=>s&&o(s)]}},"./node_modules/axios/lib/helpers/toFormData.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./node_modules/axios/lib/utils.js"),a=s("./node_modules/axios/lib/core/AxiosError.js"),n=s("./node_modules/axios/lib/helpers/null.js");function o(e){return r.default.isPlainObject(e)||r.default.isArray(e)}function i(e){return r.default.endsWith(e,"[]")?e.slice(0,-2):e}function c(e,t,s){return e?e.concat(t).map((function(e,t){return e=i(e),!s&&t?"["+e+"]":e})).join(s?".":""):t}const l=r.default.toFlatObject(r.default,{},null,(function(e){return/^is[A-Z]/.test(e)})),u=function(e,t,s){if(!r.default.isObject(e))throw new TypeError("target must be an object");t=t||new(n.default||FormData);const u=(s=r.default.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!r.default.isUndefined(t[e])}))).metaTokens,d=s.visitor||m,p=s.dots,f=s.indexes,h=(s.Blob||"undefined"!=typeof Blob&&Blob)&&r.default.isSpecCompliantForm(t);if(!r.default.isFunction(d))throw new TypeError("visitor must be a function");function g(e){if(null===e)return"";if(r.default.isDate(e))return e.toISOString();if(!h&&r.default.isBlob(e))throw new a.default("Blob is not supported. Use a Buffer instead.");return r.default.isArrayBuffer(e)||r.default.isTypedArray(e)?h&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function m(e,s,a){let n=e;if(e&&!a&&"object"==typeof e)if(r.default.endsWith(s,"{}"))s=u?s:s.slice(0,-2),e=JSON.stringify(e);else if(r.default.isArray(e)&&function(e){return r.default.isArray(e)&&!e.some(o)}(e)||(r.default.isFileList(e)||r.default.endsWith(s,"[]"))&&(n=r.default.toArray(e)))return s=i(s),n.forEach((function(e,a){!r.default.isUndefined(e)&&null!==e&&t.append(!0===f?c([s],a,p):null===f?s:s+"[]",g(e))})),!1;return!!o(e)||(t.append(c(a,s,p),g(e)),!1)}const E=[],A=Object.assign(l,{defaultVisitor:m,convertValue:g,isVisitable:o});if(!r.default.isObject(e))throw new TypeError("data must be an object");return function e(s,a){if(!r.default.isUndefined(s)){if(-1!==E.indexOf(s))throw Error("Circular reference detected in "+a.join("."));E.push(s),r.default.forEach(s,(function(s,n){!0===(!(r.default.isUndefined(s)||null===s)&&d.call(t,s,r.default.isString(n)?n.trim():n,a,A))&&e(s,a?a.concat(n):[n])})),E.pop()}}(e),t}},"./node_modules/axios/lib/helpers/toURLEncodedForm.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./node_modules/axios/lib/utils.js"),a=s("./node_modules/axios/lib/helpers/toFormData.js"),n=s("./node_modules/axios/lib/platform/index.js");function o(e,t){return(0,a.default)(e,new n.default.classes.URLSearchParams,Object.assign({visitor:function(e,t,s,a){return n.default.isNode&&r.default.isBuffer(e)?(this.append(t,e.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}},"./node_modules/axios/lib/helpers/trackStream.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{readBytes:()=>a,streamChunk:()=>r,trackStream:()=>n});const r=function*(e,t){let s=e.byteLength;if(!t||s<t)return void(yield e);let r,a=0;for(;a<s;)r=a+t,yield e.slice(a,r),a=r},a=async function*(e,t,s){for await(const a of e)yield*r(ArrayBuffer.isView(a)?a:await s(String(a)),t)},n=(e,t,s,r,n)=>{const o=a(e,t,n);let i,c=0,l=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return l(),void e.close();let a=r.byteLength;if(s){let e=c+=a;s(e)}e.enqueue(new Uint8Array(r))}catch(e){throw l(e),e}},cancel:e=>(l(e),o.return())},{highWaterMark:2})}},"./node_modules/axios/lib/helpers/validator.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./node_modules/axios/lib/env/data.js"),a=s("./node_modules/axios/lib/core/AxiosError.js");const n={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{n[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}}));const o={};n.transitional=function(e,t,s){function n(e,t){return"[Axios v"+r.VERSION+"] Transitional option '"+e+"'"+t+(s?". "+s:"")}return(s,r,i)=>{if(!1===e)throw new a.default(n(r," has been removed"+(t?" in "+t:"")),a.default.ERR_DEPRECATED);return t&&!o[r]&&(o[r]=!0,console.warn(n(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(s,r,i)}};const i={assertOptions:function(e,t,s){if("object"!=typeof e)throw new a.default("options must be an object",a.default.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let n=r.length;for(;n-- >0;){const o=r[n],i=t[o];if(i){const t=e[o],s=void 0===t||i(t,o,e);if(!0!==s)throw new a.default("option "+o+" must be "+s,a.default.ERR_BAD_OPTION_VALUE)}else if(!0!==s)throw new a.default("Unknown option "+o,a.default.ERR_BAD_OPTION)}},validators:n}},"./node_modules/axios/lib/platform/browser/classes/Blob.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r="undefined"!=typeof Blob?Blob:null},"./node_modules/axios/lib/platform/browser/classes/FormData.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r="undefined"!=typeof FormData?FormData:null},"./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./node_modules/axios/lib/helpers/AxiosURLSearchParams.js");const a="undefined"!=typeof URLSearchParams?URLSearchParams:r.default},"./node_modules/axios/lib/platform/browser/index.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js"),a=s("./node_modules/axios/lib/platform/browser/classes/FormData.js"),n=s("./node_modules/axios/lib/platform/browser/classes/Blob.js");const o={isBrowser:!0,classes:{URLSearchParams:r.default,FormData:a.default,Blob:n.default},protocols:["http","https","file","blob","url","data"]}},"./node_modules/axios/lib/platform/common/utils.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{hasBrowserEnv:()=>r,hasStandardBrowserEnv:()=>a,hasStandardBrowserWebWorkerEnv:()=>o,origin:()=>i});const r="undefined"!=typeof window&&"undefined"!=typeof document,a=(n="undefined"!=typeof navigator&&navigator.product,r&&["ReactNative","NativeScript","NS"].indexOf(n)<0);var n;const o="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,i=r&&window.location.href||"http://localhost"},"./node_modules/axios/lib/platform/index.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./node_modules/axios/lib/platform/browser/index.js");const a={...s("./node_modules/axios/lib/platform/common/utils.js"),...r.default}},"./node_modules/axios/lib/utils.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>Y});var r=s("./node_modules/axios/lib/helpers/bind.js");const{toString:a}=Object.prototype,{getPrototypeOf:n}=Object,o=(i=Object.create(null),e=>{const t=a.call(e);return i[t]||(i[t]=t.slice(8,-1).toLowerCase())});var i;const c=e=>(e=e.toLowerCase(),t=>o(t)===e),l=e=>t=>typeof t===e,{isArray:u}=Array,d=l("undefined"),p=c("ArrayBuffer"),f=l("string"),h=l("function"),g=l("number"),m=e=>null!==e&&"object"==typeof e,E=e=>{if("object"!==o(e))return!1;const t=n(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},A=c("Date"),_=c("File"),I=c("Blob"),y=c("FileList"),C=c("URLSearchParams"),[S,b,T,N]=["ReadableStream","Request","Response","Headers"].map(c);function v(e,t,{allOwnKeys:s=!1}={}){if(null==e)return;let r,a;if("object"!=typeof e&&(e=[e]),u(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{const a=s?Object.getOwnPropertyNames(e):Object.keys(e),n=a.length;let o;for(r=0;r<n;r++)o=a[r],t.call(null,e[o],o,e)}}function R(e,t){t=t.toLowerCase();const s=Object.keys(e);let r,a=s.length;for(;a-- >0;)if(r=s[a],t===r.toLowerCase())return r;return null}const O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,D=e=>!d(e)&&e!==O,x=(P="undefined"!=typeof Uint8Array&&n(Uint8Array),e=>P&&e instanceof P);var P;const M=c("HTMLFormElement"),w=(({hasOwnProperty:e})=>(t,s)=>e.call(t,s))(Object.prototype),j=c("RegExp"),L=(e,t)=>{const s=Object.getOwnPropertyDescriptors(e),r={};v(s,((s,a)=>{let n;!1!==(n=t(s,a,e))&&(r[a]=n||s)})),Object.defineProperties(e,r)},U="abcdefghijklmnopqrstuvwxyz",F="0123456789",k={DIGIT:F,ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+F},V=c("AsyncFunction"),G=($="function"==typeof setImmediate,B=h(O.postMessage),$?setImmediate:B?(H=`axios@${Math.random()}`,W=[],O.addEventListener("message",(({source:e,data:t})=>{e===O&&t===H&&W.length&&W.shift()()}),!1),e=>{W.push(e),O.postMessage(H,"*")}):e=>setTimeout(e));var $,B,H,W;const q="undefined"!=typeof queueMicrotask?queueMicrotask.bind(O):"undefined"!=typeof process&&process.nextTick||G,Y={isArray:u,isArrayBuffer:p,isBuffer:function(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&h(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||h(e.append)&&("formdata"===(t=o(e))||"object"===t&&h(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&p(e.buffer),t},isString:f,isNumber:g,isBoolean:e=>!0===e||!1===e,isObject:m,isPlainObject:E,isReadableStream:S,isRequest:b,isResponse:T,isHeaders:N,isUndefined:d,isDate:A,isFile:_,isBlob:I,isRegExp:j,isFunction:h,isStream:e=>m(e)&&h(e.pipe),isURLSearchParams:C,isTypedArray:x,isFileList:y,forEach:v,merge:function e(){const{caseless:t}=D(this)&&this||{},s={},r=(r,a)=>{const n=t&&R(s,a)||a;E(s[n])&&E(r)?s[n]=e(s[n],r):E(r)?s[n]=e({},r):u(r)?s[n]=r.slice():s[n]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&v(arguments[e],r);return s},extend:(e,t,s,{allOwnKeys:a}={})=>(v(t,((t,a)=>{s&&h(t)?e[a]=(0,r.default)(t,s):e[a]=t}),{allOwnKeys:a}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,s,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),s&&Object.assign(e.prototype,s)},toFlatObject:(e,t,s,r)=>{let a,o,i;const c={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)i=a[o],r&&!r(i,e,t)||c[i]||(t[i]=e[i],c[i]=!0);e=!1!==s&&n(e)}while(e&&(!s||s(e,t))&&e!==Object.prototype);return t},kindOf:o,kindOfTest:c,endsWith:(e,t,s)=>{e=String(e),(void 0===s||s>e.length)&&(s=e.length),s-=t.length;const r=e.indexOf(t,s);return-1!==r&&r===s},toArray:e=>{if(!e)return null;if(u(e))return e;let t=e.length;if(!g(t))return null;const s=new Array(t);for(;t-- >0;)s[t]=e[t];return s},forEachEntry:(e,t)=>{const s=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=s.next())&&!r.done;){const s=r.value;t.call(e,s[0],s[1])}},matchAll:(e,t)=>{let s;const r=[];for(;null!==(s=e.exec(t));)r.push(s);return r},isHTMLForm:M,hasOwnProperty:w,hasOwnProp:w,reduceDescriptors:L,freezeMethods:e=>{L(e,((t,s)=>{if(h(e)&&-1!==["arguments","caller","callee"].indexOf(s))return!1;const r=e[s];h(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")}))}))},toObjectSet:(e,t)=>{const s={},r=e=>{e.forEach((e=>{s[e]=!0}))};return u(e)?r(e):r(String(e).split(t)),s},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,s){return t.toUpperCase()+s})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:R,global:O,isContextDefined:D,ALPHABET:k,generateString:(e=16,t=k.ALPHA_DIGIT)=>{let s="";const{length:r}=t;for(;e--;)s+=t[Math.random()*r|0];return s},isSpecCompliantForm:function(e){return!!(e&&h(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),s=(e,r)=>{if(m(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const a=u(e)?[]:{};return v(e,((e,t)=>{const n=s(e,r+1);!d(n)&&(a[t]=n)})),t[r]=void 0,a}}return e};return s(e,0)},isAsyncFn:V,isThenable:e=>e&&(m(e)||h(e))&&h(e.then)&&h(e.catch),setImmediate:G,asap:q}},"./node_modules/tslib/tslib.es6.mjs":(e,t,s)=>{"use strict";s.r(t),s.d(t,{__addDisposableResource:()=>w,__assign:()=>n,__asyncDelegator:()=>T,__asyncGenerator:()=>b,__asyncValues:()=>N,__await:()=>S,__awaiter:()=>h,__classPrivateFieldGet:()=>x,__classPrivateFieldIn:()=>M,__classPrivateFieldSet:()=>P,__createBinding:()=>m,__decorate:()=>i,__disposeResources:()=>L,__esDecorate:()=>l,__exportStar:()=>E,__extends:()=>a,__generator:()=>g,__importDefault:()=>D,__importStar:()=>O,__makeTemplateObject:()=>v,__metadata:()=>f,__param:()=>c,__propKey:()=>d,__read:()=>_,__rest:()=>o,__runInitializers:()=>u,__setFunctionName:()=>p,__spread:()=>I,__spreadArray:()=>C,__spreadArrays:()=>y,__values:()=>A,default:()=>U});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])},r(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function s(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}var n=function(){return n=Object.assign||function(e){for(var t,s=1,r=arguments.length;s<r;s++)for(var a in t=arguments[s])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};function o(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(s[r[a]]=e[r[a]])}return s}function i(e,t,s,r){var a,n=arguments.length,o=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,s,r);else for(var i=e.length-1;i>=0;i--)(a=e[i])&&(o=(n<3?a(o):n>3?a(t,s,o):a(t,s))||o);return n>3&&o&&Object.defineProperty(t,s,o),o}function c(e,t){return function(s,r){t(s,r,e)}}function l(e,t,s,r,a,n){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var i,c=r.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?r.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),p=!1,f=s.length-1;f>=0;f--){var h={};for(var g in r)h[g]="access"===g?{}:r[g];for(var g in r.access)h.access[g]=r.access[g];h.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");n.push(o(e||null))};var m=(0,s[f])("accessor"===c?{get:d.get,set:d.set}:d[l],h);if("accessor"===c){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(i=o(m.get))&&(d.get=i),(i=o(m.set))&&(d.set=i),(i=o(m.init))&&a.unshift(i)}else(i=o(m))&&("field"===c?a.unshift(i):d[l]=i)}u&&Object.defineProperty(u,r.name,d),p=!0}function u(e,t,s){for(var r=arguments.length>2,a=0;a<t.length;a++)s=r?t[a].call(e,s):t[a].call(e);return r?s:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,s){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:s?"".concat(s," ",t):t})}function f(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,s,r){return new(s||(s=Promise))((function(a,n){function o(e){try{c(r.next(e))}catch(e){n(e)}}function i(e){try{c(r.throw(e))}catch(e){n(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,i)}c((r=r.apply(e,t||[])).next())}))}function g(e,t){var s,r,a,n,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return n={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function i(i){return function(c){return function(i){if(s)throw new TypeError("Generator is already executing.");for(;n&&(n=0,i[0]&&(o=0)),o;)try{if(s=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{s=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}var m=Object.create?function(e,t,s,r){void 0===r&&(r=s);var a=Object.getOwnPropertyDescriptor(t,s);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,a)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]};function E(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||m(t,e,s)}function A(e){var t="function"==typeof Symbol&&Symbol.iterator,s=t&&e[t],r=0;if(s)return s.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(e,t){var s="function"==typeof Symbol&&e[Symbol.iterator];if(!s)return e;var r,a,n=s.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}}return o}function I(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_(arguments[t]));return e}function y(){for(var e=0,t=0,s=arguments.length;t<s;t++)e+=arguments[t].length;var r=Array(e),a=0;for(t=0;t<s;t++)for(var n=arguments[t],o=0,i=n.length;o<i;o++,a++)r[a]=n[o];return r}function C(e,t,s){if(s||2===arguments.length)for(var r,a=0,n=t.length;a<n;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}function S(e){return this instanceof S?(this.v=e,this):new S(e)}function b(e,t,s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,a=s.apply(e,t||[]),n=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(e){a[e]&&(r[e]=function(t){return new Promise((function(s,r){n.push([e,t,s,r])>1||i(e,t)}))})}function i(e,t){try{(s=a[e](t)).value instanceof S?Promise.resolve(s.value.v).then(c,l):u(n[0][2],s)}catch(e){u(n[0][3],e)}var s}function c(e){i("next",e)}function l(e){i("throw",e)}function u(e,t){e(t),n.shift(),n.length&&i(n[0][0],n[0][1])}}function T(e){var t,s;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,a){t[r]=e[r]?function(t){return(s=!s)?{value:S(e[r](t)),done:!1}:a?a(t):t}:a}}function N(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,s=e[Symbol.asyncIterator];return s?s.call(e):(e=A(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(s){t[s]=e[s]&&function(t){return new Promise((function(r,a){!function(e,t,s,r){Promise.resolve(r).then((function(t){e({value:t,done:s})}),t)}(r,a,(t=e[s](t)).done,t.value)}))}}}function v(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var R=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&m(t,e,s);return R(t,e),t}function D(e){return e&&e.__esModule?e:{default:e}}function x(e,t,s,r){if("a"===s&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?r:"a"===s?r.call(e):r?r.value:t.get(e)}function P(e,t,s,r,a){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?a.call(e,s):a?a.value=s:t.set(e,s),s}function M(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function w(e,t,s){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r;if(s){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if("function"!=typeof r)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:s})}else s&&e.stack.push({async:!0});return t}var j="function"==typeof SuppressedError?SuppressedError:function(e,t,s){var r=new Error(s);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function L(e){function t(t){e.error=e.hasError?new j(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function s(){for(;e.stack.length;){var r=e.stack.pop();try{var a=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(a).then(s,(function(e){return t(e),s()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}const U={__extends:a,__assign:n,__rest:o,__decorate:i,__param:c,__metadata:f,__awaiter:h,__generator:g,__createBinding:m,__exportStar:E,__values:A,__read:_,__spread:I,__spreadArrays:y,__spreadArray:C,__await:S,__asyncGenerator:b,__asyncDelegator:T,__asyncValues:N,__makeTemplateObject:v,__importStar:O,__importDefault:D,__classPrivateFieldGet:x,__classPrivateFieldSet:P,__classPrivateFieldIn:M,__addDisposableResource:w,__disposeResources:L}}},r={};function a(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={id:e,loaded:!1,exports:{}};return s[e](n,n.exports,a),n.loaded=!0,n.exports}a.m=s,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var s in t)a.o(t,s)&&!a.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,s)=>(a.f[s](e,t),t)),[])),a.u=e=>"js/"+e+"-web.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="constellation-corejs-library:",a.l=(s,r,n,o)=>{if(e[s])e[s].push(r);else{var i,c;if(void 0!==n)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==s||d.getAttribute("data-webpack")==t+n){i=d;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.setAttribute("data-webpack",t+n),i.src=s),e[s]=[r];var p=(t,r)=>{i.onerror=i.onload=null,clearTimeout(f);var a=e[s];if(delete e[s],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach((e=>e(r))),t)return t(r)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),c&&document.head.appendChild(i)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var s=t.getElementsByTagName("script");s.length&&(e=s[s.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{var e={"constellation-core":0};a.f.j=(t,s)=>{var r=a.o(e,t)?e[t]:void 0;if(0!==r)if(r)s.push(r[2]);else{var n=new Promise(((s,a)=>r=e[t]=[s,a]));s.push(r[2]=n);var o=a.p+a.u(t),i=new Error;a.l(o,(s=>{if(a.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var n=s&&("load"===s.type?"missing":s.type),o=s&&s.target&&s.target.src;i.message="Loading chunk "+t+" failed.\n("+n+": "+o+")",i.name="ChunkLoadError",i.type=n,i.request=o,r[1](i)}}),"chunk-"+t,t)}};var t=(t,s)=>{var r,n,[o,i,c]=s,l=0;if(o.some((t=>0!==e[t]))){for(r in i)a.o(i,r)&&(a.m[r]=i[r]);c&&c(a)}for(t&&t(s);l<o.length;l++)n=o[l],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0},s=self.webpackChunkconstellation_corejs_library=self.webpackChunkconstellation_corejs_library||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))})();var n={};(()=>{"use strict";a.r(n),a.d(n,{default:()=>ue});var e=a("./node_modules/lodash.isequal/index.js"),t=a.n(e),s=a("./src/initialiser/index.ts"),r=a("./src/store/state/state-manager.ts"),o=a("./src/container/container-utils.ts"),i=a("./src/locale/locale-utils.ts"),c=a("./src/attachment/index.ts"),l=a("./src/view-rule/index.ts"),u=a("./src/case-follower/index.ts"),d=a("./src/related-cases/index.ts"),p=a("./src/user/index.ts"),f=a("./src/feed/index.ts"),h=a("./src/tags/index.ts"),g=a("./src/stakeholders/index.ts"),m=a("./src/environment-info/index.ts"),E=a("./src/runtime-params/index.ts"),A=a("./src/personalization/index.ts"),_=a("./src/data-view/index.ts"),I=a("./src/data-view/data-api-utils.ts"),y=a("./src/analytics/index.ts"),C=a("./src/router/routing-utils.ts"),S=a("./src/case/remote-case.ts"),b=a("./src/interpreter/c11n-env.ts"),T=a("./src/router/app-router.ts"),N=a("./src/modules/module-registry.ts"),v=a("./src/messages/index.ts"),R=a("./src/coexistence/index.ts"),O=a("./src/constants.ts"),D=a("./src/mashup/apis.ts"),x=a("./src/events/index.ts"),P=a("./src/router/semanticurl-utils.ts"),M=a("./src/error-handler/index.ts"),w=a("./src/form/form-utils.ts"),j=a("./src/annotation/utils.ts"),L=a("./src/fields/index.ts"),U=a("./src/messagingservice/manager.ts"),F=a("./src/rules/rules-store.ts"),k=a("./src/datapage/index.ts"),V=a("./src/datatype/index.ts"),G=a("./src/cascade/manager.ts"),$=a("./src/debug/debugger.ts"),B=a("./src/deferload/manager.ts"),H=a("./src/case/utils.ts"),W=a("./src/store/state/utils.ts"),q=a("./src/expression/expression-engine.ts"),Y=a("./src/refresh/refresh-manager.ts"),K=a("./src/actions/sequencer.ts"),z=a("./src/rest-client/index.ts"),J=a("./src/fields/field-default.ts"),X=a("./src/utils/authentication-utils.ts"),Q=a("./src/utils/navigation-utils.ts"),Z=a("./src/utils/view-resources.ts"),ee=a("./src/utils/pubsub-utils.ts"),te=a("./src/utils/asynchronous-utils.ts"),se=a("./src/utils/asset-loader.ts"),re=(a("./src/validation/validators/validators.ts"),a("./src/annotation/handlers/index.ts"),a("./src/bootstrap/bootstrap-utils.js")),ae=a("./src/contextree/treemanager.ts"),ne=a("./src/performance-manager/index.ts"),oe=a("./src/genai-assistant/index.ts"),ie=a("./src/access-privilege/index.ts");class ce{constructor(){ce.behaviorOverrides={}}static behaviorOverrides={};getPCoreVersion=()=>"24.2.0";onPCoreReady=e=>re.default.onPCoreReady(e);getComponentsRegistry=()=>re.default.getComponentsRegistry();checkIfSemanticURL=()=>re.default.checkIfSemanticURL();isValidSemanticURL=()=>T.isValidSemanticURL();getRoutingUtils=()=>C.default;getViewResources=()=>Z;configureForBrowserBookmark=e=>re.default.configureForBrowserBookmark(e);getStore=()=>r.getStore();resetStore=()=>r.resetStore();getMessageManager=()=>v.default;getCoexistenceManager=()=>R.default;getStoreValue=(e,t,s)=>r.getValue(e,t,s);getContainerUtils=()=>o;getAnnotationUtils=()=>j.default;getFieldUtils=()=>L.default;getFieldDefaultUtils=()=>J.default;getAssetLoader=()=>se.default;getAttachmentUtils=()=>c.default;getViewRuleApi=()=>l.default;getFeedUtils=()=>f.default;getTagUtils=()=>h.default;getGenAIAssistantUtils=()=>oe.default;getStakeholderUtils=()=>g.default;getUserApi=()=>p.default;getCaseFollowerApi=()=>u.default;getCaseUtils=()=>H.default;getStateUtils=()=>W.default;getRelatedCasesApi=()=>d.default;getPersonalizationUtils=A.default;getDataApi=()=>_.default;getDataApiUtils=()=>I.default;getAnalyticsUtils=()=>y.default;getLocaleUtils=()=>i.localeUtils;registerLocaleManager=e=>{const t=this.getLocaleUtils();Object.keys(e).forEach((s=>{t[s]=e[s]}))};setBehaviorOverrides=e=>{ce.behaviorOverrides=e};setBehaviorOverride=(e,t)=>{ce.behaviorOverrides[e]=t};getBehaviorOverrides=()=>ce.behaviorOverrides;getBehaviorOverride=e=>ce.behaviorOverrides[e];getAsynchronousUtils=()=>te.default;createPConnect=e=>(0,b.createC11nEnv)(e);getPubSubUtils=()=>ee.default;registerComponentCreator=e=>{(0,b.registerComponentCreator)(e)};getConstants=()=>Object.freeze(O.publicConstants);getEvents=()=>x.default;getRestClient=()=>z;getMashupApi=()=>D.default;getEnvironmentInfo=()=>m.default;getRuntimeParamsAPI=()=>E.default;getSemanticUrlUtils=()=>P.default;getRemoteCaseUtils=()=>S.default;getNavigationUtils=()=>Q.default;registerModule=(e,t)=>N.default.registerModule(e,t,this);getErrorHandler=()=>M.default;getFormUtils=()=>w.default;getMessagingServiceManager=()=>U.default;getMetadataUtils=()=>F;getDataPageUtils=()=>k.default;getDataTypeUtils=()=>V.default;getCascadeManager=()=>G.default;isDeepEqual=(e,s)=>t()(e,s);getAuthUtils=()=>X.default;getDebugger=()=>$.default;getDeferLoadManager=()=>B.default;getExpressionEngine=()=>q;getActionsSequencer=()=>K.default;getRefreshManager=()=>Y.default;getInitialiser=()=>s.default;getBootstrapUtils=()=>re.default;getContextTreeManager=()=>ae.default;getPerformanceManager=()=>ne.default;getAccessPrivilege=()=>ie.default.getInstance()}const le=new ce;a.g.PCore=le;const ue=le})()})();
|
|
1
|
+
(()=>{var e,t,n={933:(e,t,n)=>{"use strict";var r=n(515);Object.defineProperty(t,"reduxBatch",{enumerable:!0,get:function(){return r.reduxBatch}})},515:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduxBatch=function(e){var t=[],n=void 0;function r(){t===n&&(t=t.slice())}function s(e){if("function"!=typeof e)throw new Error("Invalid listener, expected a function");var n=!0;return r(),t.push(e),function(){n&&(r(),t.splice(t.indexOf(e),1),n=!1)}}function a(){for(var e=t,r=0;r<e.length;++r)n=e,e[r]()}return function(){var t=e.apply(void 0,arguments),n=!1,r=!1;function o(e){return Array.isArray(e)?e.map((function(e){return o(e)})):t.dispatch(e)}return t.subscribe((function(){r?n=!0:a()})),Object.assign({},t,{dispatch:function(e){var t=r;t||(n=!1,r=!0);var s=o(e),i=n&&!t;return t||(n=!1,r=!1),i&&a(),s},subscribe:s})}}},923:(e,t,n)=>{e.exports=n(933)},924:(e,t,n)=>{var r="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",o="[object Function]",i="[object GeneratorFunction]",c=/^\[object .+?Constructor\]$/,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,d=l||u||Function("return this")();function p(e,t){return!!(e?e.length:0)&&function(e,t,n){if(t!=t)return function(e,t,n,r){var s=e.length,a=n+(r?1:-1);for(;r?a--:++a<s;)if(t(e[a],a,e))return a;return-1}(e,f,n);var r=n-1,s=e.length;for(;++r<s;)if(e[r]===t)return r;return-1}(e,t,0)>-1}function h(e,t,n){for(var r=-1,s=e?e.length:0;++r<s;)if(n(t,e[r]))return!0;return!1}function g(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e}function f(e){return e!=e}function m(e,t){return e.has(t)}var y,I=Array.prototype,E=Function.prototype,A=Object.prototype,_=d["__core-js_shared__"],S=(y=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",C=E.toString,T=A.hasOwnProperty,N=A.toString,P=RegExp("^"+C.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=d.Symbol,R=A.propertyIsEnumerable,b=I.splice,O=D?D.isConcatSpreadable:void 0,v=Math.max,x=G(d,"Map"),w=G(Object,"create");function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.__data__=new U;++t<n;)this.add(e[t])}function j(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function V(e,t,n,r){var s,a=-1,o=p,i=!0,c=e.length,l=[],u=t.length;if(!c)return l;n&&(t=function(e,t){for(var n=-1,r=e?e.length:0,s=Array(r);++n<r;)s[n]=t(e[n],n,e);return s}(t,(s=n,function(e){return s(e)}))),r?(o=h,i=!1):t.length>=200&&(o=m,i=!1,t=new F(t));e:for(;++a<c;){var d=e[a],g=n?n(d):d;if(d=r||0!==d?d:0,i&&g==g){for(var f=u;f--;)if(t[f]===g)continue e;l.push(d)}else o(t,g,r)||l.push(d)}return l}function k(e,t,n,r,s){var a=-1,o=e.length;for(n||(n=W),s||(s=[]);++a<o;){var i=e[a];t>0&&n(i)?t>1?k(i,t-1,n,r,s):g(s,i):r||(s[s.length]=i)}return s}function $(e){if(!Q(e)||(t=e,S&&S in t))return!1;var t,n=J(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?P:c;return n.test(function(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function B(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return $(n)?n:void 0}function W(e){return Y(e)||function(e){return X(e)&&T.call(e,"callee")&&(!R.call(e,"callee")||N.call(e)==a)}(e)||!!(O&&e&&e[O])}M.prototype.clear=function(){this.__data__=w?w(null):{}},M.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},M.prototype.get=function(e){var t=this.__data__;if(w){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},M.prototype.has=function(e){var t=this.__data__;return w?void 0!==t[e]:T.call(t,e)},M.prototype.set=function(e,t){return this.__data__[e]=w&&void 0===t?r:t,this},L.prototype.clear=function(){this.__data__=[]},L.prototype.delete=function(e){var t=this.__data__,n=j(t,e);return!(n<0)&&(n==t.length-1?t.pop():b.call(t,n,1),!0)},L.prototype.get=function(e){var t=this.__data__,n=j(t,e);return n<0?void 0:t[n][1]},L.prototype.has=function(e){return j(this.__data__,e)>-1},L.prototype.set=function(e,t){var n=this.__data__,r=j(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},U.prototype.clear=function(){this.__data__={hash:new M,map:new(x||L),string:new M}},U.prototype.delete=function(e){return B(this,e).delete(e)},U.prototype.get=function(e){return B(this,e).get(e)},U.prototype.has=function(e){return B(this,e).has(e)},U.prototype.set=function(e,t){return B(this,e).set(e,t),this},F.prototype.add=F.prototype.push=function(e){return this.__data__.set(e,r),this},F.prototype.has=function(e){return this.__data__.has(e)};var H,q,z=(H=function(e,t){return X(e)?V(e,k(t,1,X,!0)):[]},q=v(void 0===q?H.length-1:q,0),function(){for(var e=arguments,t=-1,n=v(e.length-q,0),r=Array(n);++t<n;)r[t]=e[q+t];t=-1;for(var s=Array(q+1);++t<q;)s[t]=e[t];return s[q]=r,function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(H,this,s)});var Y=Array.isArray;function K(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}(e.length)&&!J(e)}function X(e){return function(e){return!!e&&"object"==typeof e}(e)&&K(e)}function J(e){var t=Q(e)?N.call(e):"";return t==o||t==i}function Q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=z},174:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a="[object Function]",o="[object GeneratorFunction]",i="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,u=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,g="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,m=g||f||Function("return this")();var y,I=Array.prototype,E=Function.prototype,A=Object.prototype,_=m["__core-js_shared__"],S=(y=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",C=E.toString,T=A.hasOwnProperty,N=A.toString,P=RegExp("^"+C.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=m.Symbol,R=I.splice,b=k(m,"Map"),O=k(Object,"create"),v=D?D.prototype:void 0,x=v?v.toString:void 0;function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function F(e,t){var n;t=function(e,t){if(W(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||q(e))return!0;return l.test(e)||!c.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:W(n=t)?n:$(n);for(var r=0,s=t.length;null!=e&&r<s;)e=e[B(t[r++])];return r&&r==s?e:void 0}function j(e){if(!H(e)||(t=e,S&&S in t))return!1;var t,n=function(e){var t=H(e)?N.call(e):"";return t==a||t==o}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?P:h;return n.test(function(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function V(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function k(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return j(n)?n:void 0}w.prototype.clear=function(){this.__data__=O?O(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(O){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return O?void 0!==t[e]:T.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=O&&void 0===t?r:t,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(e){var t=this.__data__,n=U(t,e);return!(n<0)&&(n==t.length-1?t.pop():R.call(t,n,1),!0)},M.prototype.get=function(e){var t=this.__data__,n=U(t,e);return n<0?void 0:t[n][1]},M.prototype.has=function(e){return U(this.__data__,e)>-1},M.prototype.set=function(e,t){var n=this.__data__,r=U(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new w,map:new(b||M),string:new w}},L.prototype.delete=function(e){return V(this,e).delete(e)},L.prototype.get=function(e){return V(this,e).get(e)},L.prototype.has=function(e){return V(this,e).has(e)},L.prototype.set=function(e,t){return V(this,e).set(e,t),this};var $=G((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(q(e))return x?x.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(d,(function(e,t,r,s){n.push(r?s.replace(p,"$1"):t||e)})),n}));function B(e){if("string"==typeof e||q(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function G(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(G.Cache||L),n}G.Cache=L;var W=Array.isArray;function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function q(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&N.call(e)==i}e.exports=function(e,t,n){var r=null==e?void 0:F(e,t);return void 0===r?n:r}},207:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a=9007199254740991,o="[object Arguments]",i="[object Function]",c="[object GeneratorFunction]",l="[object Symbol]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d=/^\w*$/,p=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,g=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,m=/^(?:0|[1-9]\d*)$/,y="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,I="object"==typeof self&&self&&self.Object===Object&&self,E=y||I||Function("return this")();var A,_=Array.prototype,S=Function.prototype,C=Object.prototype,T=E["__core-js_shared__"],N=(A=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",P=S.toString,D=C.hasOwnProperty,R=C.toString,b=RegExp("^"+P.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=E.Symbol,v=C.propertyIsEnumerable,x=_.splice,w=W(E,"Map"),M=W(Object,"create"),L=O?O.prototype:void 0,U=L?L.toString:void 0;function F(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function V(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function k(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function $(e,t){return null!=e&&D.call(e,t)}function B(e){if(!Q(e)||(t=e,N&&N in t))return!1;var t,n=X(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?b:f;return n.test(function(e){if(null!=e){try{return P.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function G(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function W(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return B(n)?n:void 0}function H(e,t,n){var r;t=function(e,t){if(K(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||ee(e))return!0;return d.test(e)||!u.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:K(r=t)?r:q(r);for(var s,i=-1,c=t.length;++i<c;){var l=z(t[i]);if(!(s=null!=e&&n(e,l)))break;e=e[l]}return s||!!(c=e?e.length:0)&&J(c)&&function(e,t){return t=null==t?a:t,!!t&&("number"==typeof e||m.test(e))&&e>-1&&e%1==0&&e<t}(l,c)&&(K(e)||function(e){return function(e){return Z(e)&&function(e){return null!=e&&J(e.length)&&!X(e)}(e)}(e)&&D.call(e,"callee")&&(!v.call(e,"callee")||R.call(e)==o)}(e))}F.prototype.clear=function(){this.__data__=M?M(null):{}},F.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},F.prototype.get=function(e){var t=this.__data__;if(M){var n=t[e];return n===r?void 0:n}return D.call(t,e)?t[e]:void 0},F.prototype.has=function(e){var t=this.__data__;return M?void 0!==t[e]:D.call(t,e)},F.prototype.set=function(e,t){return this.__data__[e]=M&&void 0===t?r:t,this},j.prototype.clear=function(){this.__data__=[]},j.prototype.delete=function(e){var t=this.__data__,n=k(t,e);return!(n<0)&&(n==t.length-1?t.pop():x.call(t,n,1),!0)},j.prototype.get=function(e){var t=this.__data__,n=k(t,e);return n<0?void 0:t[n][1]},j.prototype.has=function(e){return k(this.__data__,e)>-1},j.prototype.set=function(e,t){var n=this.__data__,r=k(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},V.prototype.clear=function(){this.__data__={hash:new F,map:new(w||j),string:new F}},V.prototype.delete=function(e){return G(this,e).delete(e)},V.prototype.get=function(e){return G(this,e).get(e)},V.prototype.has=function(e){return G(this,e).has(e)},V.prototype.set=function(e,t){return G(this,e).set(e,t),this};var q=Y((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ee(e))return U?U.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return p.test(e)&&n.push(""),e.replace(h,(function(e,t,r,s){n.push(r?s.replace(g,"$1"):t||e)})),n}));function z(e){if("string"==typeof e||ee(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function Y(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(Y.Cache||V),n}Y.Cache=V;var K=Array.isArray;function X(e){var t=Q(e)?R.call(e):"";return t==i||t==c}function J(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Z(e){return!!e&&"object"==typeof e}function ee(e){return"symbol"==typeof e||Z(e)&&R.call(e)==l}e.exports=function(e,t){return null!=e&&H(e,t,$)}},828:(e,t,n)=>{e=n.nmd(e);var r=9007199254740991,s="[object Arguments]",a="[object Function]",o="[object GeneratorFunction]",i="[object Map]",c="[object Promise]",l="[object Set]",u="[object WeakMap]",d="[object DataView]",p=/^\[object .+?Constructor\]$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,f=h||g||Function("return this")(),m=t&&!t.nodeType&&t,y=m&&e&&!e.nodeType&&e,I=y&&y.exports===m;var E,A,_,S=Function.prototype,C=Object.prototype,T=f["__core-js_shared__"],N=(E=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",P=S.toString,D=C.hasOwnProperty,R=C.toString,b=RegExp("^"+P.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=I?f.Buffer:void 0,v=C.propertyIsEnumerable,x=O?O.isBuffer:void 0,w=(A=Object.keys,_=Object,function(e){return A(_(e))}),M=q(f,"DataView"),L=q(f,"Map"),U=q(f,"Promise"),F=q(f,"Set"),j=q(f,"WeakMap"),V=!v.call({valueOf:1},"valueOf"),k=Y(M),$=Y(L),B=Y(U),G=Y(F),W=Y(j);function H(e){if(!ee(e)||function(e){return!!N&&N in e}(e))return!1;var t=Z(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?b:p;return t.test(Y(e))}function q(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return H(n)?n:void 0}var z=function(e){return R.call(e)};function Y(e){if(null!=e){try{return P.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function K(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&J(e)}(e)&&D.call(e,"callee")&&(!v.call(e,"callee")||R.call(e)==s)}(M&&z(new M(new ArrayBuffer(1)))!=d||L&&z(new L)!=i||U&&z(U.resolve())!=c||F&&z(new F)!=l||j&&z(new j)!=u)&&(z=function(e){var t=R.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?Y(n):void 0;if(r)switch(r){case k:return d;case $:return i;case B:return c;case G:return l;case W:return u}return t});var X=Array.isArray;function J(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Z(e)}var Q=x||function(){return!1};function Z(e){var t=ee(e)?R.call(e):"";return t==a||t==o}function ee(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(J(e)&&(X(e)||"string"==typeof e||"function"==typeof e.splice||Q(e)||K(e)))return!e.length;var t=z(e);if(t==i||t==l)return!e.size;if(V||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||C)}(e))return!w(e).length;for(var n in e)if(D.call(e,n))return!1;return!0}},722:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",s=1,a=2,o=9007199254740991,i="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",p="[object Error]",h="[object Function]",g="[object GeneratorFunction]",f="[object Map]",m="[object Number]",y="[object Null]",I="[object Object]",E="[object Promise]",A="[object Proxy]",_="[object RegExp]",S="[object Set]",C="[object String]",T="[object Symbol]",N="[object Undefined]",P="[object WeakMap]",D="[object ArrayBuffer]",R="[object DataView]",b=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,v={};v["[object Float32Array]"]=v["[object Float64Array]"]=v["[object Int8Array]"]=v["[object Int16Array]"]=v["[object Int32Array]"]=v["[object Uint8Array]"]=v["[object Uint8ClampedArray]"]=v["[object Uint16Array]"]=v["[object Uint32Array]"]=!0,v[i]=v[c]=v[D]=v[u]=v[R]=v[d]=v[p]=v[h]=v[f]=v[m]=v[I]=v[_]=v[S]=v[C]=v[P]=!1;var x="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,w="object"==typeof self&&self&&self.Object===Object&&self,M=x||w||Function("return this")(),L=t&&!t.nodeType&&t,U=L&&e&&!e.nodeType&&e,F=U&&U.exports===L,j=F&&x.process,V=function(){try{return j&&j.binding&&j.binding("util")}catch(e){}}(),k=V&&V.isTypedArray;function $(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function B(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function G(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var W,H,q,z=Array.prototype,Y=Function.prototype,K=Object.prototype,X=M["__core-js_shared__"],J=Y.toString,Q=K.hasOwnProperty,Z=(W=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+W:"",ee=K.toString,te=RegExp("^"+J.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=F?M.Buffer:void 0,re=M.Symbol,se=M.Uint8Array,ae=K.propertyIsEnumerable,oe=z.splice,ie=re?re.toStringTag:void 0,ce=Object.getOwnPropertySymbols,le=ne?ne.isBuffer:void 0,ue=(H=Object.keys,q=Object,function(e){return H(q(e))}),de=Ve(M,"DataView"),pe=Ve(M,"Map"),he=Ve(M,"Promise"),ge=Ve(M,"Set"),fe=Ve(M,"WeakMap"),me=Ve(Object,"create"),ye=Ge(de),Ie=Ge(pe),Ee=Ge(he),Ae=Ge(ge),_e=Ge(fe),Se=re?re.prototype:void 0,Ce=Se?Se.valueOf:void 0;function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function De(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Pe;++t<n;)this.add(e[t])}function Re(e){var t=this.__data__=new Ne(e);this.size=t.size}function be(e,t){var n=qe(e),r=!n&&He(e),s=!n&&!r&&ze(e),a=!n&&!r&&!s&&Qe(e),o=n||r||s||a,i=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=i.length;for(var l in e)!t&&!Q.call(e,l)||o&&("length"==l||s&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Be(l,c))||i.push(l);return i}function Oe(e,t){for(var n=e.length;n--;)if(We(e[n][0],t))return n;return-1}function ve(e){return null==e?void 0===e?N:y:ie&&ie in Object(e)?function(e){var t=Q.call(e,ie),n=e[ie];try{e[ie]=void 0;var r=!0}catch(e){}var s=ee.call(e);r&&(t?e[ie]=n:delete e[ie]);return s}(e):function(e){return ee.call(e)}(e)}function xe(e){return Je(e)&&ve(e)==i}function we(e,t,n,r,o){return e===t||(null==e||null==t||!Je(e)&&!Je(t)?e!=e&&t!=t:function(e,t,n,r,o,l){var h=qe(e),g=qe(t),y=h?c:$e(e),E=g?c:$e(t),A=(y=y==i?I:y)==I,N=(E=E==i?I:E)==I,P=y==E;if(P&&ze(e)){if(!ze(t))return!1;h=!0,A=!1}if(P&&!A)return l||(l=new Re),h||Qe(e)?Ue(e,t,n,r,o,l):function(e,t,n,r,o,i,c){switch(n){case R:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case D:return!(e.byteLength!=t.byteLength||!i(new se(e),new se(t)));case u:case d:case m:return We(+e,+t);case p:return e.name==t.name&&e.message==t.message;case _:case C:return e==t+"";case f:var l=B;case S:var h=r&s;if(l||(l=G),e.size!=t.size&&!h)return!1;var g=c.get(e);if(g)return g==t;r|=a,c.set(e,t);var y=Ue(l(e),l(t),r,o,i,c);return c.delete(e),y;case T:if(Ce)return Ce.call(e)==Ce.call(t)}return!1}(e,t,y,n,r,o,l);if(!(n&s)){var b=A&&Q.call(e,"__wrapped__"),O=N&&Q.call(t,"__wrapped__");if(b||O){var v=b?e.value():e,x=O?t.value():t;return l||(l=new Re),o(v,x,n,r,l)}}if(!P)return!1;return l||(l=new Re),function(e,t,n,r,a,o){var i=n&s,c=Fe(e),l=c.length,u=Fe(t),d=u.length;if(l!=d&&!i)return!1;var p=l;for(;p--;){var h=c[p];if(!(i?h in t:Q.call(t,h)))return!1}var g=o.get(e);if(g&&o.get(t))return g==t;var f=!0;o.set(e,t),o.set(t,e);var m=i;for(;++p<l;){var y=e[h=c[p]],I=t[h];if(r)var E=i?r(I,y,h,t,e,o):r(y,I,h,e,t,o);if(!(void 0===E?y===I||a(y,I,n,r,o):E)){f=!1;break}m||(m="constructor"==h)}if(f&&!m){var A=e.constructor,_=t.constructor;A==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof A&&A instanceof A&&"function"==typeof _&&_ instanceof _||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,o,l)}(e,t,n,r,we,o))}function Me(e){return!(!Xe(e)||function(e){return!!Z&&Z in e}(e))&&(Ye(e)?te:b).test(Ge(e))}function Le(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||K,t!==r)return ue(e);var t,n,r,s=[];for(var a in Object(e))Q.call(e,a)&&"constructor"!=a&&s.push(a);return s}function Ue(e,t,n,r,o,i){var c=n&s,l=e.length,u=t.length;if(l!=u&&!(c&&u>l))return!1;var d=i.get(e);if(d&&i.get(t))return d==t;var p=-1,h=!0,g=n&a?new De:void 0;for(i.set(e,t),i.set(t,e);++p<l;){var f=e[p],m=t[p];if(r)var y=c?r(m,f,p,t,e,i):r(f,m,p,e,t,i);if(void 0!==y){if(y)continue;h=!1;break}if(g){if(!$(t,(function(e,t){if(s=t,!g.has(s)&&(f===e||o(f,e,n,r,i)))return g.push(t);var s}))){h=!1;break}}else if(f!==m&&!o(f,m,n,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h}function Fe(e){return function(e,t,n){var r=t(e);return qe(e)?r:function(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e}(r,n(e))}(e,Ze,ke)}function je(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function Ve(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Me(n)?n:void 0}Te.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},Te.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Te.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===r?void 0:n}return Q.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},Te.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?r:t,this},Ne.prototype.clear=function(){this.__data__=[],this.size=0},Ne.prototype.delete=function(e){var t=this.__data__,n=Oe(t,e);return!(n<0)&&(n==t.length-1?t.pop():oe.call(t,n,1),--this.size,!0)},Ne.prototype.get=function(e){var t=this.__data__,n=Oe(t,e);return n<0?void 0:t[n][1]},Ne.prototype.has=function(e){return Oe(this.__data__,e)>-1},Ne.prototype.set=function(e,t){var n=this.__data__,r=Oe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Pe.prototype.clear=function(){this.size=0,this.__data__={hash:new Te,map:new(pe||Ne),string:new Te}},Pe.prototype.delete=function(e){var t=je(this,e).delete(e);return this.size-=t?1:0,t},Pe.prototype.get=function(e){return je(this,e).get(e)},Pe.prototype.has=function(e){return je(this,e).has(e)},Pe.prototype.set=function(e,t){var n=je(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},De.prototype.add=De.prototype.push=function(e){return this.__data__.set(e,r),this},De.prototype.has=function(e){return this.__data__.has(e)},Re.prototype.clear=function(){this.__data__=new Ne,this.size=0},Re.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Re.prototype.get=function(e){return this.__data__.get(e)},Re.prototype.has=function(e){return this.__data__.has(e)},Re.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ne){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Pe(r)}return n.set(e,t),this.size=n.size,this};var ke=ce?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,s=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[s++]=o)}return a}(ce(e),(function(t){return ae.call(e,t)})))}:function(){return[]},$e=ve;function Be(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||O.test(e))&&e>-1&&e%1==0&&e<t}function Ge(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function We(e,t){return e===t||e!=e&&t!=t}(de&&$e(new de(new ArrayBuffer(1)))!=R||pe&&$e(new pe)!=f||he&&$e(he.resolve())!=E||ge&&$e(new ge)!=S||fe&&$e(new fe)!=P)&&($e=function(e){var t=ve(e),n=t==I?e.constructor:void 0,r=n?Ge(n):"";if(r)switch(r){case ye:return R;case Ie:return f;case Ee:return E;case Ae:return S;case _e:return P}return t});var He=xe(function(){return arguments}())?xe:function(e){return Je(e)&&Q.call(e,"callee")&&!ae.call(e,"callee")},qe=Array.isArray;var ze=le||function(){return!1};function Ye(e){if(!Xe(e))return!1;var t=ve(e);return t==h||t==g||t==l||t==A}function Ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Je(e){return null!=e&&"object"==typeof e}var Qe=k?function(e){return function(t){return e(t)}}(k):function(e){return Je(e)&&Ke(e.length)&&!!v[ve(e)]};function Ze(e){return null!=(t=e)&&Ke(t.length)&&!Ye(t)?be(e):Le(e);var t}e.exports=function(e,t){return we(e,t)}},431:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",o="[object AsyncFunction]",i="[object Function]",c="[object GeneratorFunction]",l="[object Null]",u="[object Object]",d="[object Proxy]",p="[object Undefined]",h=/^\[object .+?Constructor\]$/,g=/^(?:0|[1-9]\d*)$/,f={};f["[object Float32Array]"]=f["[object Float64Array]"]=f["[object Int8Array]"]=f["[object Int16Array]"]=f["[object Int32Array]"]=f["[object Uint8Array]"]=f["[object Uint8ClampedArray]"]=f["[object Uint16Array]"]=f["[object Uint32Array]"]=!0,f[a]=f["[object Array]"]=f["[object ArrayBuffer]"]=f["[object Boolean]"]=f["[object DataView]"]=f["[object Date]"]=f["[object Error]"]=f[i]=f["[object Map]"]=f["[object Number]"]=f[u]=f["[object RegExp]"]=f["[object Set]"]=f["[object String]"]=f["[object WeakMap]"]=!1;var m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,y="object"==typeof self&&self&&self.Object===Object&&self,I=m||y||Function("return this")(),E=t&&!t.nodeType&&t,A=E&&e&&!e.nodeType&&e,_=A&&A.exports===E,S=_&&m.process,C=function(){try{var e=A&&A.require&&A.require("util").types;return e||S&&S.binding&&S.binding("util")}catch(e){}}(),T=C&&C.isTypedArray;var N,P,D,R=Array.prototype,b=Function.prototype,O=Object.prototype,v=I["__core-js_shared__"],x=b.toString,w=O.hasOwnProperty,M=(N=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+N:"",L=O.toString,U=x.call(Object),F=RegExp("^"+x.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=_?I.Buffer:void 0,V=I.Symbol,k=I.Uint8Array,$=j?j.allocUnsafe:void 0,B=(P=Object.getPrototypeOf,D=Object,function(e){return P(D(e))}),G=Object.create,W=O.propertyIsEnumerable,H=R.splice,q=V?V.toStringTag:void 0,z=function(){try{var e=Ee(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Y=j?j.isBuffer:void 0,K=Math.max,X=Date.now,J=Ee(I,"Map"),Q=Ee(Object,"create"),Z=function(){function e(){}return function(t){if(!ve(t))return{};if(G)return G(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function re(e){var t=this.__data__=new te(e);this.size=t.size}function se(e,t){var n=Pe(e),r=!n&&Ne(e),s=!n&&!r&&Re(e),a=!n&&!r&&!s&&we(e),o=n||r||s||a,i=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=i.length;for(var l in e)!t&&!w.call(e,l)||o&&("length"==l||s&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ae(l,c))||i.push(l);return i}function ae(e,t,n){(void 0!==n&&!Te(e[t],n)||void 0===n&&!(t in e))&&ce(e,t,n)}function oe(e,t,n){var r=e[t];w.call(e,t)&&Te(r,n)&&(void 0!==n||t in e)||ce(e,t,n)}function ie(e,t){for(var n=e.length;n--;)if(Te(e[n][0],t))return n;return-1}function ce(e,t,n){"__proto__"==t&&z?z(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}ee.prototype.clear=function(){this.__data__=Q?Q(null):{},this.size=0},ee.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ee.prototype.get=function(e){var t=this.__data__;if(Q){var n=t[e];return n===r?void 0:n}return w.call(t,e)?t[e]:void 0},ee.prototype.has=function(e){var t=this.__data__;return Q?void 0!==t[e]:w.call(t,e)},ee.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Q&&void 0===t?r:t,this},te.prototype.clear=function(){this.__data__=[],this.size=0},te.prototype.delete=function(e){var t=this.__data__,n=ie(t,e);return!(n<0)&&(n==t.length-1?t.pop():H.call(t,n,1),--this.size,!0)},te.prototype.get=function(e){var t=this.__data__,n=ie(t,e);return n<0?void 0:t[n][1]},te.prototype.has=function(e){return ie(this.__data__,e)>-1},te.prototype.set=function(e,t){var n=this.__data__,r=ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ne.prototype.clear=function(){this.size=0,this.__data__={hash:new ee,map:new(J||te),string:new ee}},ne.prototype.delete=function(e){var t=Ie(this,e).delete(e);return this.size-=t?1:0,t},ne.prototype.get=function(e){return Ie(this,e).get(e)},ne.prototype.has=function(e){return Ie(this,e).has(e)},ne.prototype.set=function(e,t){var n=Ie(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},re.prototype.clear=function(){this.__data__=new te,this.size=0},re.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var n=this.__data__;if(n instanceof te){var r=n.__data__;if(!J||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ne(r)}return n.set(e,t),this.size=n.size,this};var le,ue=function(e,t,n){for(var r=-1,s=Object(e),a=n(e),o=a.length;o--;){var i=a[le?o:++r];if(!1===t(s[i],i,s))break}return e};function de(e){return null==e?void 0===e?p:l:q&&q in Object(e)?function(e){var t=w.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(e){}var s=L.call(e);r&&(t?e[q]=n:delete e[q]);return s}(e):function(e){return L.call(e)}(e)}function pe(e){return xe(e)&&de(e)==a}function he(e){return!(!ve(e)||function(e){return!!M&&M in e}(e))&&(be(e)?F:h).test(function(e){if(null!=e){try{return x.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function ge(e){if(!ve(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=_e(e),n=[];for(var r in e)("constructor"!=r||!t&&w.call(e,r))&&n.push(r);return n}function fe(e,t,n,r,s){e!==t&&ue(t,(function(a,o){if(s||(s=new re),ve(a))!function(e,t,n,r,s,a,o){var i=Se(e,n),c=Se(t,n),l=o.get(c);if(l)return void ae(e,n,l);var d=a?a(i,c,n+"",e,t,o):void 0,p=void 0===d;if(p){var h=Pe(c),g=!h&&Re(c),f=!h&&!g&&we(c);d=c,h||g||f?Pe(i)?d=i:xe(A=i)&&De(A)?d=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(i):g?(p=!1,d=function(e,t){if(t)return e.slice();var n=e.length,r=$?$(n):new e.constructor(n);return e.copy(r),r}(c,!0)):f?(p=!1,m=c,y=!0?(I=m.buffer,E=new I.constructor(I.byteLength),new k(E).set(new k(I)),E):m.buffer,d=new m.constructor(y,m.byteOffset,m.length)):d=[]:function(e){if(!xe(e)||de(e)!=u)return!1;var t=B(e);if(null===t)return!0;var n=w.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&x.call(n)==U}(c)||Ne(c)?(d=i,Ne(i)?d=function(e){return function(e,t,n,r){var s=!n;n||(n={});var a=-1,o=t.length;for(;++a<o;){var i=t[a],c=r?r(n[i],e[i],i,n,e):void 0;void 0===c&&(c=e[i]),s?ce(n,i,c):oe(n,i,c)}return n}(e,Me(e))}(i):ve(i)&&!be(i)||(d=function(e){return"function"!=typeof e.constructor||_e(e)?{}:Z(B(e))}(c))):p=!1}var m,y,I,E;var A;p&&(o.set(c,d),s(d,c,r,a,o),o.delete(c));ae(e,n,d)}(e,t,o,n,fe,r,s);else{var i=r?r(Se(e,o),a,o+"",e,t,s):void 0;void 0===i&&(i=a),ae(e,o,i)}}),Me)}function me(e,t){return Ce(function(e,t,n){return t=K(void 0===t?e.length-1:t,0),function(){for(var r=arguments,s=-1,a=K(r.length-t,0),o=Array(a);++s<a;)o[s]=r[t+s];s=-1;for(var i=Array(t+1);++s<t;)i[s]=r[s];return i[t]=n(o),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,i)}}(e,t,Fe),e+"")}var ye=z?function(e,t){return z(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Fe;function Ie(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function Ee(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return he(n)?n:void 0}function Ae(e,t){var n=typeof e;return!!(t=null==t?s:t)&&("number"==n||"symbol"!=n&&g.test(e))&&e>-1&&e%1==0&&e<t}function _e(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||O)}function Se(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ce=function(e){var t=0,n=0;return function(){var r=X(),s=16-(r-n);if(n=r,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ye);function Te(e,t){return e===t||e!=e&&t!=t}var Ne=pe(function(){return arguments}())?pe:function(e){return xe(e)&&w.call(e,"callee")&&!W.call(e,"callee")},Pe=Array.isArray;function De(e){return null!=e&&Oe(e.length)&&!be(e)}var Re=Y||function(){return!1};function be(e){if(!ve(e))return!1;var t=de(e);return t==i||t==c||t==o||t==d}function Oe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}function ve(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xe(e){return null!=e&&"object"==typeof e}var we=T?function(e){return function(t){return e(t)}}(T):function(e){return xe(e)&&Oe(e.length)&&!!f[de(e)]};function Me(e){return De(e)?se(e,!0):ge(e)}var Le,Ue=(Le=function(e,t,n,r){fe(e,t,n,r)},me((function(e,t){var n=-1,r=t.length,s=r>1?t[r-1]:void 0,a=r>2?t[2]:void 0;for(s=Le.length>3&&"function"==typeof s?(r--,s):void 0,a&&function(e,t,n){if(!ve(n))return!1;var r=typeof t;return!!("number"==r?De(n)&&Ae(t,n.length):"string"==r&&t in n)&&Te(n[t],e)}(t[0],t[1],a)&&(s=r<3?void 0:s,r=1),e=Object(e);++n<r;){var o=t[n];o&&Le(e,o,n,s)}return e})));function Fe(e){return e}e.exports=Ue},8:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a=9007199254740991,o="[object Function]",i="[object GeneratorFunction]",c="[object Symbol]",l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,d=/^\./,p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g,g=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,y="object"==typeof self&&self&&self.Object===Object&&self,I=m||y||Function("return this")();var E,A=Array.prototype,_=Function.prototype,S=Object.prototype,C=I["__core-js_shared__"],T=(E=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",N=_.toString,P=S.hasOwnProperty,D=S.toString,R=RegExp("^"+N.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=I.Symbol,O=A.splice,v=G(I,"Map"),x=G(Object,"create"),w=b?b.prototype:void 0,M=w?w.toString:void 0;function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e,t,n){var r=e[t];P.call(e,t)&&Y(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function V(e,t){for(var n=e.length;n--;)if(Y(e[n][0],t))return n;return-1}function k(e){if(!X(e)||(t=e,T&&T in t))return!1;var t,n=function(e){var t=X(e)?D.call(e):"";return t==o||t==i}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?R:g;return n.test(function(e){if(null!=e){try{return N.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function $(e,t,n,r){if(!X(e))return e;t=function(e,t){if(K(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||J(e))return!0;return u.test(e)||!l.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return K(e)?e:H(e)}(t);for(var s=-1,a=t.length,o=a-1,i=e;null!=i&&++s<a;){var c=q(t[s]),d=n;if(s!=o){var p=i[c];void 0===(d=r?r(p,c,i):void 0)&&(d=X(p)?p:W(t[s+1])?[]:{})}j(i,c,d),i=i[c]}return e}function B(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return k(n)?n:void 0}function W(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||f.test(e))&&e>-1&&e%1==0&&e<t}L.prototype.clear=function(){this.__data__=x?x(null):{}},L.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},L.prototype.get=function(e){var t=this.__data__;if(x){var n=t[e];return n===r?void 0:n}return P.call(t,e)?t[e]:void 0},L.prototype.has=function(e){var t=this.__data__;return x?void 0!==t[e]:P.call(t,e)},L.prototype.set=function(e,t){return this.__data__[e]=x&&void 0===t?r:t,this},U.prototype.clear=function(){this.__data__=[]},U.prototype.delete=function(e){var t=this.__data__,n=V(t,e);return!(n<0)&&(n==t.length-1?t.pop():O.call(t,n,1),!0)},U.prototype.get=function(e){var t=this.__data__,n=V(t,e);return n<0?void 0:t[n][1]},U.prototype.has=function(e){return V(this.__data__,e)>-1},U.prototype.set=function(e,t){var n=this.__data__,r=V(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},F.prototype.clear=function(){this.__data__={hash:new L,map:new(v||U),string:new L}},F.prototype.delete=function(e){return B(this,e).delete(e)},F.prototype.get=function(e){return B(this,e).get(e)},F.prototype.has=function(e){return B(this,e).has(e)},F.prototype.set=function(e,t){return B(this,e).set(e,t),this};var H=z((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(J(e))return M?M.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return d.test(e)&&n.push(""),e.replace(p,(function(e,t,r,s){n.push(r?s.replace(h,"$1"):t||e)})),n}));function q(e){if("string"==typeof e||J(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function z(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(z.Cache||F),n}function Y(e,t){return e===t||e!=e&&t!=t}z.Cache=F;var K=Array.isArray;function X(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function J(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&D.call(e)==c}e.exports=function(e,t,n){return null==e?e:$(e,t,n)}},795:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a="[object Function]",o="[object GeneratorFunction]",i="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,u=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,g="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,m=g||f||Function("return this")();var y,I=Array.prototype,E=Function.prototype,A=Object.prototype,_=m["__core-js_shared__"],S=(y=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",C=E.toString,T=A.hasOwnProperty,N=A.toString,P=RegExp("^"+C.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=m.Symbol,R=I.splice,b=$(m,"Map"),O=$(Object,"create"),v=D?D.prototype:void 0,x=v?v.toString:void 0;function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function F(e){if(!z(e)||(t=e,S&&S in t))return!1;var t,n=function(e){var t=z(e)?N.call(e):"";return t==a||t==o}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?P:h;return n.test(function(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function j(e,t){e=function(e,t){return 1==t.length?e:function(e,t){for(var n=0,r=(t=B(t,e)?[t]:V(t)).length;null!=e&&n<r;)e=e[W(t[n++])];return n&&n==r?e:void 0}(e,function(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(s);++r<s;)a[r]=e[r+t];return a}(t,0,-1))}(e,t=B(t,e)?[t]:V(t));var n,r,s=W((r=(n=t)?n.length:0)?n[r-1]:void 0);return!(null!=e&&T.call(e,s))||delete e[s]}function V(e){return q(e)?e:G(e)}function k(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function $(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return F(n)?n:void 0}function B(e,t){if(q(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Y(e))||(l.test(e)||!c.test(e)||null!=t&&e in Object(t))}w.prototype.clear=function(){this.__data__=O?O(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(O){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return O?void 0!==t[e]:T.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=O&&void 0===t?r:t,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(e){var t=this.__data__,n=U(t,e);return!(n<0)&&(n==t.length-1?t.pop():R.call(t,n,1),!0)},M.prototype.get=function(e){var t=this.__data__,n=U(t,e);return n<0?void 0:t[n][1]},M.prototype.has=function(e){return U(this.__data__,e)>-1},M.prototype.set=function(e,t){var n=this.__data__,r=U(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new w,map:new(b||M),string:new w}},L.prototype.delete=function(e){return k(this,e).delete(e)},L.prototype.get=function(e){return k(this,e).get(e)},L.prototype.has=function(e){return k(this,e).has(e)},L.prototype.set=function(e,t){return k(this,e).set(e,t),this};var G=H((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Y(e))return x?x.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(d,(function(e,t,r,s){n.push(r?s.replace(p,"$1"):t||e)})),n}));function W(e){if("string"==typeof e||Y(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function H(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(H.Cache||L),n}H.Cache=L;var q=Array.isArray;function z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Y(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&N.call(e)==i}e.exports=function(e,t){return null==e||j(e,t)}},386:e=>{class t{constructor(e,t,n,r,s){this.converter=c(),this.width=e,this.poly=t,this.xor_in=n,this.reflected_xor_in=l(n,e),this.xor_out=r,this.reflect=s,this.msb_mask=1<<this.width-1,this.mask=this.msb_mask-1<<1|1,this.crc_shift=this.width<8?8-this.width:0,this.shifted_xor_in=this.xor_in<<this.crc_shift;let a=this.gen_table();this.table=a,8!==this.width||this.xor_in||this.xor_out||this.reflect||(this.calculate=function(e){e=this.converter.validate_buffer(e);let t=0;for(let n=0;n<e.length;n++)t=a[t^e[n]];return t})}calculate(e){let t;e=this.converter.validate_buffer(e);let{table:n,width:r,crc_shift:s,mask:a}=this;if(this.reflect){t=this.reflected_xor_in;for(let r=0;r<e.length;r++){t=(n[255&(t^e[r])]^t>>>8)&a}}else{t=this.shifted_xor_in;for(let o=0;o<e.length;o++)t=n[255&(t>>r-8+s^e[o])]<<s^t<<8-s&a<<s;t>>=s}return t^=this.xor_out,t>>>0}calculate_no_table(e){e=this.converter.validate_buffer(e);let t=this.xor_in;for(let n=0;n<e.length;n++){let r=e[n];this.reflect&&(r=l(r,8));for(let e=0;e<8;e++){let n=t&this.msb_mask;r&128>>e&&(n^=this.msb_mask),t<<=1,n&&(t^=this.poly)}t&=this.mask}return this.reflect&&(t=l(t,this.width)),t^=this.xor_out,t>>>0}gen_table(){let e=[];for(let t=0;t<256;t++){let n=t;this.reflect&&(n=l(n,8)),n<<=this.width-8+this.crc_shift;for(let e=0;e<8;e++)0!=(n&this.msb_mask<<this.crc_shift)?(n<<=1,n^=this.poly<<this.crc_shift):n<<=1;this.reflect&&(n=l(n>>this.crc_shift,this.width)<<this.crc_shift),n=n>>this.crc_shift&this.mask,e[t]=n>>>0}return new Int32Array(e)}print_table(){let e=this.table,t=Math.ceil(this.width/4),n=t<4?4:3,r=e.length>>n,s=1<<n,a="";for(let o=0;o<r;o++){let r="";for(let a=0;a<s;a++){let s=e[o<<n|a];s="000000000"+s.toString(16),s=s.substr(s.length-t),r+="0x"+s+", "}a+=" "+r+"\n"}return a="[\n"+a.slice(0,-3)+"\n]",a}}const n="undefined"!=typeof Buffer,r="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,s=void 0!==typeof BigInt&&BigInt(256);class a{validate_buffer(e){switch(typeof e){case"number":{if(!Number.isSafeInteger(e)||e<0)throw Error(`number data must be a nonnegative safe integer, not ${e}`);if(this.fromUInt32&&e<=4294967295)return this.fromUInt32(e);const t=[];for(;e>0||t.length<4;)t.unshift(e%256),e=Math.floor(e/256);return this.fromByteArray(t)}case"string":return this.fromString(e);case"bigint":{if(e<0)throw Error(`bigint data must be nonnegative, not ${e}`);const t=[];for(;e>0||t.length<4;)t.unshift(Number(e%s)),e/=s;return this.fromByteArray(t)}default:if(n&&Buffer.isBuffer(e))return e;if(r){if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new Uint8Array(e)}throw new Error(`Unrecognized data type ${typeof e}: ${e}`)}}}class o extends a{fromUInt32(e){const t=Buffer.alloc(4);return t.writeUInt32BE(e),t}fromByteArray=Buffer.from.bind(Buffer);fromString=Buffer.from.bind(Buffer)}class i extends a{fromByteArray=Uint8Array.from.bind(Uint8Array);fromString(e){return new TextEncoder("utf-8").encode(e)}}function c(e=!1){if(r&&(e||!n))return new i;if(n)return new o;throw Error("either need TypedArrays or Buffer")}function l(e,t){let n=0;for(let r=0;r<t;r++)n=n<<1|1&e,e>>=1;return n}const u={crc1:new t(1,1,0,0,!1),crc6:new t(6,47,0,0,!1),crc8:new t(8,7,0,0,!1),crc10:new t(10,563,0,0,!1),crc16:new t(16,32773,0,0,!0),crc24:new t(24,8801531,11994318,0,!1),crc32:new t(32,79764919,4294967295,4294967295,!0),crc32c:new t(32,517762881,4294967295,4294967295,!0)};function d(e){}e.exports={CRC:t,crc:function(e,n,r,s,a){let o=new t(e,n,r,s,a);return o.calculate.bind(o)},makeBufferConverter:c,models:u,crc1:d,crc6:d,crc8:d,crc10:d,crc16:d,crc24:d,crc32:d,crc32c:d};for(let t in u){let n=u[t];e.exports[t]=n.calculate.bind(n)}},849:e=>{function t(e){return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}t.keys=()=>[],t.resolve=t,t.id=849,e.exports=t}},r={};function s(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={id:e,loaded:!1,exports:{}};return n[e](a,a.exports,s),a.loaded=!0,a.exports}s.m=n,s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>"js/"+e+"-web.js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="constellation-corejs-library:",s.l=(n,r,a,o)=>{if(e[n])e[n].push(r);else{var i,c;if(void 0!==a)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==n||d.getAttribute("data-webpack")==t+a){i=d;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,s.nc&&i.setAttribute("nonce",s.nc),i.setAttribute("data-webpack",t+a),i.src=n),e[n]=[r];var p=(t,r)=>{i.onerror=i.onload=null,clearTimeout(h);var s=e[n];if(delete e[n],i.parentNode&&i.parentNode.removeChild(i),s&&s.forEach((e=>e(r))),t)return t(r)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),c&&document.head.appendChild(i)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})(),(()=>{var e={290:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var a=new Promise(((n,s)=>r=e[t]=[n,s]));n.push(r[2]=a);var o=s.p+s.u(t),i=new Error;s.l(o,(n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var a=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;i.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",i.name="ChunkLoadError",i.type=a,i.request=o,r[1](i)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,a,[o,i,c]=n,l=0;if(o.some((t=>0!==e[t]))){for(r in i)s.o(i,r)&&(s.m[r]=i[r]);if(c)c(s)}for(t&&t(n);l<o.length;l++)a=o[l],s.o(e,a)&&e[a]&&e[a][0](),e[a]=0},n=self.webpackChunkconstellation_corejs_library=self.webpackChunkconstellation_corejs_library||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),(()=>{"use strict";var e={};s.r(e),s.d(e,{buildContextName:()=>H,buildModalContext:()=>K,buildTransientContextName:()=>q,getContainerIdFromContext:()=>J,getParentContext:()=>X,getParentContextName:()=>W,getTargetFromContext:()=>Y,getTransientContext:()=>z});var t={};s.r(t),s.d(t,{getResolvedTargetName:()=>mt,getRoutingInfo:()=>yt,getSemanticURLFromRoutingInfo:()=>It});var n={};s.r(n),s.d(n,{evaluate:()=>Yt,handleChange:()=>qt,hasDeclareExpression:()=>Ht,updateDeclareExpressions:()=>zt});var r={};s.r(r),s.d(r,{publishExpressions:()=>vr,publishResponse:()=>xr});var a={};s.r(a),s.d(a,{hasBrowserEnv:()=>Aa,hasStandardBrowserEnv:()=>_a,hasStandardBrowserWebWorkerEnv:()=>Ca,origin:()=>Ta});var o={};s.r(o),s.d(o,{CONTAINER_NAMES:()=>td,CONTAINER_TYPES:()=>ed,addRootContainerItem:()=>xd,areContainerItemsPresent:()=>id,clearTransientData:()=>jd,closeContainerItem:()=>vd,getActiveContainerItemContext:()=>md,getActiveContainerItemIDFromRoutingInfo:()=>Xd,getActiveContainerItemName:()=>pd,getActiveContext:()=>qd,getChildContainerItems:()=>yd,getChildContainers:()=>Id,getChildContainersContexts:()=>Ed,getContainerAPI:()=>$d,getContainerAccessOrder:()=>od,getContainerData:()=>rd,getContainerItemData:()=>sd,getContainerItemName:()=>ld,getContainerItems:()=>ad,getContainerLimit:()=>Td,getContainerParentContext:()=>Kd,getContainerType:()=>dd,getContextByTargetAndKey:()=>Yd,getDataContextName:()=>fd,getFlowContainer:()=>Qd,getLeastRecentlyUsedNonDirtyContainerItemID:()=>bd,getParentContainerItem:()=>Jd,getRootContainerName:()=>Hd,getSuggestionContexts:()=>Ad,getTargetFromContainerItemID:()=>Od,getTransientItems:()=>Ld,hasContainerItems:()=>Cd,isContainerDirty:()=>Rd,isContainerInitialized:()=>ud,isContainerItemActive:()=>hd,isContainerItemContextBeingUsedInOtherContainers:()=>Md,isContainerItemExists:()=>cd,isContainerLimitReached:()=>Pd,isContainerMultipleMode:()=>Sd,isContainerSingleMode:()=>_d,purgeTransientData:()=>Vd,removeContainer:()=>Bd,replaceTransientData:()=>Fd,resetContainersPayload:()=>Dd,setContainerLimit:()=>Nd,updateCaseContextEtag:()=>Wd,updateParentLastUpdateTime:()=>zd,updateRelatedContextEtag:()=>Gd,updateTransientData:()=>Ud});var i={};s.r(i),s.d(i,{getAdditionalInfo:()=>Xp,getDataPageKeys:()=>zp,getDataPageMetadata:()=>Vp,getEmbeddedPropertyMetadata:()=>xp,getFieldParameters:()=>Gp,getFieldsByClassName:()=>Bp,getGenAICoach:()=>Hp,getInsight:()=>$p,getLookUpDataPage:()=>Yp,getLookUpDataPageInfo:()=>Kp,getParagraph:()=>Wp,getPersonalizationMetadata:()=>kp,getPropertyMetadata:()=>vp,getResolvedFieldMetadata:()=>Jp,getSavableDataPage:()=>qp,isViewExists:()=>Fp,mergeStore:()=>Op,resolveNavigation:()=>jp,resolveView:()=>Up,updateNavigationStore:()=>Mp,updateStores:()=>Lp,updateViewStore:()=>wp});var c={};s.r(c),s.d(c,{dispatch:()=>sh,getActionType:()=>dh,getContextValue:()=>lh,getDataObject:()=>ah,getReferenceTokens:()=>th,getSharedDataObject:()=>oh,getStore:()=>rh,getValue:()=>ch,isMergeable:()=>hh,lookupContextValue:()=>uh,mergeDeep:()=>gh,removeItem:()=>ph,replaceValue:()=>mh,resetStore:()=>yh,setStore:()=>nh,updateValue:()=>fh});var l={};s.r(l),s.d(l,{activateContainerItem:()=>zh,addContainerItem:()=>Fh,addMessages:()=>Yh,addSharedData:()=>sg,addTransientItem:()=>jh,addWork:()=>wh,clearTransientData:()=>kh,createWork:()=>Dh,error:()=>rg,finishAssignment:()=>Zh,initContainers:()=>Lh,listAction:()=>og,loadView:()=>vh,mergeData:()=>bh,openAssignment:()=>eg,openWorkByHandle:()=>Mh,postProcess:()=>ng,purgeTransientData:()=>Bh,removeAllTransientItems:()=>Xh,removeContainerItem:()=>Kh,removeSharedData:()=>ag,removeTransientItem:()=>Jh,replaceContainerItem:()=>Qh,replaceTransientData:()=>$h,resetContainers:()=>Uh,resetLoading:()=>Hh,setLoading:()=>Wh,setSharedProperty:()=>cg,setStateProperty:()=>lg,showCasePreview:()=>ig,showHarness:()=>Oh,showHistory:()=>tg,showPage:()=>xh,upMergeAndRemoveContainerItem:()=>qh,updateContainerItem:()=>Gh,updateTransientData:()=>Vh});var u={};s.r(u),s.d(u,{doesRestApiExist:()=>Bm,getCancelTokenSource:()=>Gm,getCaseApi:()=>qm,getHeaderProcessor:()=>Vm,invokeCustomRestApi:()=>$m,invokeRestApi:()=>km,isRequestCanceled:()=>Wm,registerInterceptor:()=>Hm});var d={};s.r(d),s.d(d,{fetchViewResources:()=>DE,updateViewResources:()=>PE});var p=s(722),h=s.n(p);let g,f,m;const y=e=>{e&&(g=e=e||{"base-server":"http://localhost:1080/prweb/","data-end-point":"api/v1/stream/data","action-end-point":"api/v1/stream/action"},g.BASEURL=e.server,g.ACTIONURL=e["action-end-point"],g.DATAURL=e["data-end-point"],m=e.reAuthUrl)},I=()=>m,E=()=>g.BASEURL,A=e=>fetch(`${g.BASEURL}${g.ACTIONURL}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),_=e=>{f=e},S=()=>f;var C=s(386),T=s(795),N=s.n(T),P=s(207),D=s.n(P),R=s(174),b=s.n(R),O=s(8),v=s.n(O),x=s(431),w=s.n(x),M=s(828),L=s.n(M);const U=new class{constructor(){this.needsMapping=!1}getNeedsMapping(){return this.needsMapping}setNeedsMapping(e){this.needsMapping=e}map(e){return this.needsMapping?this.replacer(e):e}analyseResponse(e){e?.data?.objectInfo&&window?.PCore?.getEnvironmentInfo()?.isUnifiedObject()?this.setNeedsMapping(!0):this.setNeedsMapping(!1)}replacer(e){return this.needsMapping&&(e=e.replace("caseInfo","objectInfo").replace("caseTypeName","objectTypeName").replace("caseTypeID","objectTypeID")),e}},F={APP:{APP:"app",ROOT:"root",PXREQUESTOR:"pxRequestor",PXUSERNAME:".pxUserName",OPERATORID:"OperatorID",USERNAME:"pxRequestor.pxUserName",PXUSERIDENTIFIER:".pxUserIdentifier",USERIDENTIFIER:"pxRequestor.pxUserIdentifier",PYIMAGEINSKEY:".pyImageInsKey",OPERATORID_IMG_INSKEY:"OperatorID.pyImageInsKey",OPERATORID_LOCALE:"OperatorID.pyUseLocale",APPLICATION_LABEL:"Application.pyLabel",APPLICATION_RULE_NAME:"Application.pyRuleName"},RESOURCE_TYPES:{ASSIGNMENT:"ASSIGNMENT",CASE:"CASE",DATA:"DATA",PAGE:"PAGE"},RESOURCE_STATUS:{CREATE:"CREATE",UPDATE:"UPDATE",OPEN_FLOW_ACTION:"OPEN_FLOW_ACTION"},VIEW_NAMES:{PY_CASE_TAB:"pyCaseTab",DATA_OBJECT_CREATE_VIEW:"Create",DATA_OBJECT_EDIT_VIEW:"pyEdit",PY_DATA_PREVIEW:"pyDataPreview",PY_DETAILS:"pyDetails"},CONTAINERS:{ROOT_CONTAINER:"RootContainer",VIEW_CONTAINER:"ViewContainer",FLOW_CONTAINER:"FlowContainer",MODAL_VIEW_CONTAINER:"ModalViewContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",HYBRID_VIEW_CONTAINER:"HybridViewContainer"},WORK_BASKET:{MY_WORK_LIST:"myWorkList",REPORTEE:"reportee",WORK_QUEUE:"workQueue",DATA_PAGES:{D__PY_GET_USER_WORK_LIST_BY_USER_ID:"D_pyGetUserWorkListByUserId",D__WORK_BASKET:"D_WorkBasket",D__PY_MY_WORK_LIST:"D_pyMyWorkList"}},CONTEXT_TREE_NODE_TYPES:{VIEW:"VIEW",FIELD:"FIELD",DECLARATIVE_TARGET:"DECLARATIVE_TARGET",WHEN:"WHEN",CONTEXT:"CONTEXT",PAGELIST:"PAGELIST"},WORKLIST:"worklist",WAIT:"wait",TODO:"todo",STANDARD_FLOW:"Standard",CASE:"CASE",ASSIGNMENT:"ASSIGNMENT",FIX_BROKEN_ASSIGNMENTS:"FixBrokenAssignments",PAGE:"PAGE",PZINSKEY:".pzInsKey",CREATE_DETAILS_VIEW_NAME:"pzCreateDetails",PREVIEW_VIEW_NAME:"pyCasePreview",CASESUMMARY_VIEW_NAME:"pyCaseSummary",APPSHELL_ACTIVE_CASES:"appshell-activecases",TRACE_ID:"x-b3-traceid",LOAD_VIEW_STRING:"View",PRIMARY:"primary",DEFER_UPDATE_CASESUMMARY_VIEW:"deferUpdateCaseSummaryView",NEXT_ASSIGNMENT_INFO_ID:"nextAssignmentInfo.ID",WORKCLASS:"Work-",DATA_INFO:{DATA_INFO_CONTENT:"dataInfo.content"},CASE_INFO:{CASE_INFO:"caseInfo",CASE_INFO_CONTENT:"caseInfo.content",CASE_INFO_NAME:"caseInfo.name",CASE_INFO_ID:"caseInfo.ID",CASE_INFO_CLASSID:"caseInfo.content.classID",CASE_TYPE_ID:"caseInfo.caseTypeID",CASE_TYPE_NAME:"caseInfo.caseTypeName",CASE_INFO_PZINSKEY:"caseInfo.content.pzInsKey",CASE_INFO_ACTIONS:"caseInfo.availableActions",VIEW_NAME:"caseInfo.content.pyViewName",ACTION_BUTTONS:"caseInfo.actionButtons",ACTIVE_ACTION_ID:"caseInfo.activeActionID",ASSIGNMENT_LABEL:"caseInfo.assignments[0].name",ASSIGNMENT_ID:"caseInfo.assignments[0].ID",ASSIGNMENTS:"caseInfo.assignments",INSTRUCTIONS:"caseInfo.assignments[0].instructions",NAVIGATION:"caseInfo.navigation",STAGES:"caseInfo.stages",STAGEID:"caseInfo.stageID",CASECLASS:"caseInfo.caseClass",AVAILABLEACTIONS:"caseInfo.availableActions",AVAILABLEPROCESSES:"caseInfo.availableProcesses",D_CASE_ASSIGNMENTS_RESULTS:"caseInfo.assignments",CHILD_ASSIGNMENTS:"caseInfo.childCases",ASSIGNMENTACTION_ID:"caseInfo.assignments[0].actions[0].ID",ISINCREATESTAGE:"caseInfo.isInCreateStage",APPROVALFLAG:"caseInfo.content.pyApprovalResult",DUPLICATECASEFLAG:"caseInfo.content.pyDuplicateCaseActions",DUPLICATECASEID:"caseInfo.content.pyDuplicateID",DUPLICATECASEINSKEY:"caseInfo.content.pyDuplicateCaseReference.pzInsKey",HEADERS:"caseInfo.headers",PARENTCASEINFO:"caseInfo.parentCaseInfo",REMOTESYSTEMID:"caseInfo.headers.RemoteSystemID",CASE_RELATED_CASE_TYPES:"caseInfo.relatedCaseTypes",CASES:"caseInfo.cases",GETNEXTWORK:"caseInfo.confirmationLinks.getNextWork",ACTION_REFRESH_CONDITIONS:"caseInfo.assignments[0].actions[0].refreshConditions",IS_LOCAL_ACTION:"caseInfo.isLocalAction",BUSINESS_ID:"caseInfo.businessID",IS_FIRST_ASSIGNMENT:"caseInfo.isFirstAssignment"},ACTIONS:{ACTION_ID:"actionID",ACTIONS:"availableActions",DELETEAVIALACTIONS:"deleteAvailActions",FLOWACTION:"FlowAction",DATA_PAGES:{D_PY_ADDITIONAL_CASE_ACTIONS:"D_pyAdditionalCaseActions"}},PROCESS:{FLOWPROBLEMS:"FlowProblems"},PAGE_TYPES:{PAGE:"page",LANDINGPAGE:"landingpage",LISTPAGE:"listpage"},LOCAL_ACTION_TYPE:{CASE_WIDE:"case",EXPRESS:"express",ASSIGNMENT:"Assignment",LOCAL_ACTION:"LocalAction"},LOCAL_ACTIONS:{TRANSFER_ASSIGNMENT:"pyTransferAssignment"},CONTENT:"content",MODAL:"modal",STOPMERGEACTIONS:"stopMergeActions",IS_CREATE_DATA_OBJECT:"isCreateDataObject",SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME:"context_data.caseInfo.content.summary_of_assignment__.lastSubmitTime",SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME:"context_data.caseInfo.content.summary_of_attachments__.lastRefreshTime",CONTEXT_DATA_ASSIGNMENTID:"context_data.assignmentID",BANNER_VARIANT_SUCCESS:"success",BANNER_VARIANT_WARNING:"warning",BANNER_VARIANT_URGENT:"urgent",BANNER_VARIANT_INFO:"info",MESSAGES:{MESSAGES_TYPE_SUCCESS:"success",MESSAGES_TYPE_INFO:"info",MESSAGES_TYPE_ERROR:"error"},PUB_SUB_EVENTS:{EVENT_RENDER_APP:"renderApp",EVENT_REAUTH:"reAuth",EVENT_FULL_REAUTH:"fullReAuth",EVENT_CUSTOM_REAUTH:"customReAuth",EVENT_CANCEL:"cancel",EVENT_MINIMIZE:"minimize",EVENT_EXPRESS_LOCALACTION:"expressLocalActionSubmit",EVENT_BULKACTION:"bulkActionSubmit",EVENT_SHOW_CANCEL_ALERT:"showCancelAlert",EVENT_SHOW_DELETE_ALERT:"showDeleteAlert",EVENT_DASHBOARD_FILTER_CHANGE:"dashboardFilterChange",EVENT_DASHBOARD_FILTER_CLEAR_ALL:"dashboardFilterClearAll",EVENT_PROMOTED_FILTERS_CHANGE:"promotedFiltersChange",EVENT_LOGOFF:"Logoff",EVENT_TRANSIENT_ITEMS:{UPDATE_PROMOTED_FILTERS:"updatePromotedFilters"},UI_EVENTS:{SHOW_PAGE_INIT:"showPageInit",SHOW_PAGE_DONE:"showPageDone",SHOW_PAGE_STARTED:"showPageStarted"},CASE_EVENTS:{CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW:"caseAttachmentsUpdateFromCaseview",CASE_FOLLOWER_UPDATED_BY_OPERATOR_FROM_CASEVIEW:"caseFollowerUpdateByOperatorFromCaseview",CASE_FOLLOWER_UPDATE_BY_OPERATOR_FROM_WIDGET:"caseFollowerUpdateByOperatorFromWidget",CASE_CREATED:"caseCreated",CREATE_STAGE_DONE:"caseCreatedDone",CREATE_STAGE_CANCELLED:"caseCancelled",CREATE_STAGE_SAVED:"caseSaved",CREATE_STAGE_DELETED:"caseDeleted",ASSIGNMENT_SUBMISSION:"assignmentSubmission",END_OF_ASSIGNMENT_PROCESSING:"endOfAssignmentProcessing",CLOSE_CONFIRM_VIEW:"closeConfirmView",CASE_OPENED:"caseOpened",CASE_CLOSED:"caseClosed",ASSIGNMENT_OPENED:"assignmentOpened",CASE_PREVIEW:"casePreview",CURRENT_ASSIGNMENT_UPDATED:"currentAssignmentUpdated",CASE_LOCK_EVENT:"caseLockEvent"},BOOTSTRAP_SHELL_EVENTS:{CONSTELLATION_LOADED:"CONSTELLATION_LOADED"},CONTAINER_EVENTS:{CLOSE_CONTAINER_ITEM:"CLOSE_CONTAINER_ITEM",CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM:"CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM"},DISPLAY_CASE_CREATED_TOASTER:"displayCaseCreatedToaster",DATA_EVENTS:{DATA_OBJECT_CREATED:"dataObjectCreated",DATA_OBJECT_DELETED:"dataObjectDeleted",DATA_OBJECT_UPDATED:"dataObjectUpdated"},FETCH_SUCCESS:"fetchSuccess",REVERSE_COEXISTENCE_EVENTS:{HANDLE_DISCARD:"handleDiscard",CHECK_IS_FORM_DIRTY:"checkIsFormDirty"},TIMEOUT_REMINDER:"sessionAboutToTimeout",RESET_TIMER:"resetInactivityTimer"},CONTAINER_TYPE:{MULTIPLE:"multiple",SINGLE:"single",HYBRID:"HybridViewContainer"},REMOTE_SYSTEM_ID:"RemoteSystemID",LIST_SELECTION_MODE:{MULTI:"multi",SINGLE:"single",MULTI_ON_HOVER:"multi_on_hover"},SUBMISSION_FAILURE_TYPE:{FORM_VALIDATION_ERROR:"formValidationError"},USER_SETTINGS:{UTILITY_PANEL_USER_STATE_PATH:"presentation.templates.CaseView.utilityPanelExpanded",SUMMARY_PANEL_USER_STATE_PATH:"presentation.templates.CaseView.summaryPanelExpanded",ASSIGNMENT_COLLAPSED_STATE_PATH:"presentation.templates.CaseView.assignmentWidgetCollapsed",CASE_VIEW_PATH:"presentation.templates.CaseView"},PROMISE_VALUE:{RESOLVE:"resolve",REJECT:"reject"},APP_TYPE:{UIKIT:"uikit",THEME_COSMOS:"themecosmos"},VIEW_TYPE:{PY_EMBEDASSIGNMENT:"pyEmbedAssignment",PY_DETAILS:"pyDetails"},START_PERFORMANCE_LOG:"start-performance-log",STOP_PERFORMANCE_LOG:"stop-performance-log",TOP_ACTION_LABEL:{CREATEWORK:"Create-Work",OPENASSIGNMENT:"Open-Assignment",OPENWORKBYHANDLE:"Open-Work-By-Handle",SAVEANDCLOSE:"Save-And-Close",SHOWDATA:"Show-Data",FINISHASSIGNMENT:"Finish-Assignment",GETDESCENDANTS:"Get-Descendants"}},j={CONTEXT:"context",AJAXCONTAINER:"primary",VIEW_CONTAINER:"ViewContainer",APP_SHELL:"AppShell",ROOT_CONTAINER:"RootContainer",HYBRID_VIEW_CONTAINER:"HybridViewContainer",MODAL_VIEW_CONTAINER:"ModalViewContainer",FLOW_CONTAINER:"FlowContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",OBJECT_PAGE:"ObjectPage",CASE_CREATE_STAGE:"CaseCreateStage",CASE_VIEW:"CaseView",VIEW:"view",CASE_PREVIEW:"CasePreview",CASE_STAGES:"Stages",CASEMESSAGES:"caseMessages",SUGGESTION:"suggestion",PREVIEW:"preview",TERTIARY:"tertiary",DEFAULT:"default",ACPRIMARY:"primary",ACTERTIARY:"tertiary",PERFORM_MODE:"perform",CASE_VIEW_MODE_PROP:".caseViewMode",REVIEW_MODE:"review",WORKAREA:"workarea",ACPRIMARY_NAME:"ACPRIMARY",ACTERTIARY_NAME:"ACTERTIARY",THREADNAMESEPARATOR:"/",JOINCHARACTER:"_",FORWARD_SLASH_STRING:"/",UNDERSCORE_STRING:"_",WORK_ID:"WORK_ID",EMPTY_STRING:"",PROPERTY_MESSAGES:"propertyMessages__",CONTEXT_MESSAGES:"contextMessages__",HTTP_MESSAGES:"httpMessages__",PAGE_MESSAGES:"pageMessages__",SUMMARY_OF_LISTS:"summary_of_lists__",SUMMARY_OF_GROUPS:"summary_of_groups__",SUMMARY_OF_MESSAGES:"summary_of_messages__",SUMMARY_OF_FIELD_VALUES:"summary_of_field_values__",SUMMARY_OF_WHEN_CONDITIONS:"summary_of_when_conditions__",SUMMARY_OF_EXPRESSIONS:"summary_of_expressions__",SUMMARY_OF_ASSOCIATED_LISTS:"summary_of_associated_lists__",CONTEXT_DATA:"context_data",TABLE:e=>`Table[${e}]`,HTTP:"HTTP",PROPERTY:"PROPERTY",PAGE_ERRORS:"page_level_errors",NO_MESSAGES:"No messages existing",PULSE_REFERENCE:"pulse.messages",IS_LOADING:"isLoading",APPROVED:"Approved",REJECTED:"Rejected",DUPLICATE:"Duplicate",IGNORE:"Ignore",PARAGRAPH:"PARAGRAPH",X_ORIGIN_CHANNEL:"x-origin-channel",AUTHORING_PREVIEW_CONTAINER:"root/authoring-preview",ERROR_FIELD_IN_PAGE:"erroneousInputOutputFieldInPage",ERROR_IN_PAGE_IDENTIFIER:"erroneousInputOutputIdentifier",UI_RESOURCES:"uiResources",UI_RESOURCES_CONTEXT_DATA:"uiResources.context_data",ACTION_BUTTONS:"uiResources.actionButtons",RESOURCES:"uiResources.resources",ROOT:"uiResources.root",CASE_INFO_IS_LOCAL_ACTION:"caseInfo.isLocalAction",DATA:"data",OPTIONS:"options",VIEWS:"uiResources.resources.views",NAVIGATIONS:"uiResources.resources.navigations",COMPONENTS:"uiResources.components",LOCALE_REFERENCES:"uiResources.localeReferences",STATIC_SERVER_URL:"staticServer",APPLICATION_DATA:"data.Application",REFERENCED_USERS:"referencedUsers",CASE_INFO_REFRESH_CONDITIONS:"caseInfo.refreshConditions",FIELD_LEVEL_SUCCESS:"success",FIELD_LEVEL_WARNING:"warning",FIELD_LEVEL_ERROR:"error",HASH_DELIMITER:"~^|^~",NULL_STRING:"null",DATA_PAGE:"DataPage",DECISION:"Decision",RULE_REFERENCE:"RuleReference",GET_PAGE_DATA:"getPageData",PROPERTY_ANNOTATION:"@P",FIELD_LABEL_ANNOTATION:"@FL",ATTACHMENT_ANNOTATION:"@ATTACHMENT",ASSOCIATED_PROPERTY_ANNOTATION:"@ASSOCIATED",CLASS_ANNOTATION:"@CLASS",ASSOCIATED:"associated",CLASS_ID:".classID",CLASSID:"classID",READONLY:"readonly",SHARED:"shared",RELOAD_IF_OLDER_THAN:"reloadIfOlderThan",RELOAD_ONCE_PER_INTERACTION:"reloadOncePerInteraction",PY_DETAILS:"pyDetails",LIST_ACTIONS:{INSERT:"INSERT",UPDATE:"UPDATE",DELETE:"DELETE",DELETE_ALL:"DELETE ALL",MOVE:"MOVE",SELECT:"SELECT",DESELECT:"DESELECT"},LIST_ACTIONS_TYPE:{SELECT_DESELECT:"SELECT_DESELECT",DESELECT_ALL:"DESELECT_ALL"},ENV_INFO_KEYS:{APPLICATION_NAME:"APPLICATION_NAME",APPLICATION_DESC:"APPLICATION_DESC",ACCESS_GROUP:"ACCESS_GROUP",USER_NAME:"USER_NAME",USER_ID:"USER_ID",USER_IMAGE:"USER_IMAGE",LOCALE:"LOCALE",TIMEZONE:"TIMEZONE",WORK_GROUP:"WORK_GROUP"},ID:"ID",SCALARLIST:"ScalarList",COREHEADERS:"coreHeaders",SKIPCOREHEADERS:"skipCoreHeaders",COREHEADER_APP_DEBUG_ID:"X-Pega-App-Debug-ID",COREHEADER_APP_DEBUG_LEVELS:"X-Pega-App-Debug-Levels",CONTEXT_DATA_MODAL_VIEW:{IS_MULTI_RECORD_DATA:"context_data.modalView.isMultiRecordData",VIEW_NAME:"context_data.modalView.viewName",PARENT_CONTEXT:"context_data.modalView.parentContext",INTERESTPAGE:"context_data.modalView.interestPage"},DATA_CLASS_NOT_FOUND:"Data object class not found",PRIORITY:{CRITICAL:100,HIGH:500,MEDIUM:1e3,LOW:2e3,TRIVIAL:3e3},...F,getProperty:e=>U.map(e)},V="pyRemoteCaseDetails";class k{static remoteCaseMapping={};static setRemoteCaseMapping=e=>{this.remoteCaseMapping=e,this.setAdditionalParameters()};static getRemoteCaseMapping=()=>this.remoteCaseMapping;static getRemoteCase=e=>this.remoteCaseMapping?.[e];static isRemoteCase=e=>!!(e&&this.remoteCaseMapping&&this.remoteCaseMapping[e]);static getRemoteHeaderByContext=e=>Ch.getProperty(".RemoteSystemID",j.CASE_INFO.HEADERS,e);static getRemoteHeader=e=>this.remoteCaseMapping[e]?.RemoteSystemID;static injectRemoteCaseHeader=(e,t,n)=>{if(e&&e.RemoteSystemID)return;const r=this.getRemoteHeaderByContext(n);r?e.RemoteSystemID=r:t&&this.isRemoteCase(t.caseTypeID)&&(e.RemoteSystemID=this.getRemoteHeader(t.caseTypeID))};static isTraditionalRemoteCase=(e="")=>"Traditional"===k.getRemoteCase(e)?.RemoteApplicationType;static setAdditionalParameters=()=>{const e=cp.environmentInfoObject?.pyRemoteCaseTypeList;e?.forEach((e=>{const t=this.getRemoteCase(e.pyWorkTypeImplementationClassName);t&&(t.name=e.pyWorkTypeName)}))}}const $=k,B={},G=new Map,W=e=>{let t=j.EMPTY_STRING;return t=e&&e.includes(j.FORWARD_SLASH_STRING)?e.substring(0,e.lastIndexOf("/")):e,t},H=(e,t,n=!1)=>{let r=j.EMPTY_STRING;if(t&&e){let s=`${t}${j.FORWARD_SLASH_STRING}${e}`;const a=rd(s);if(a||t!==j.APP.APP&&t!==j.APP.ROOT)if(a){if(n&&B[s])return r=`${s}${j.UNDERSCORE_STRING}${B[s]}`,r;B[s]?B[s]+=1:B[s]=1,r=`${s}${j.UNDERSCORE_STRING}${B[s]}`}else r=H(e,W(t));else s=`${t}${j.FORWARD_SLASH_STRING}${j.PRIMARY}`,B[s]?B[s]+=1:B[s]=1,r=`${s}${j.UNDERSCORE_STRING}${B[s]}`}return r},q=(e,t)=>{if(e&&t){const n=(G[t]?.[e]??0)+1;return G[t]||(G[t]={}),G[t][e]=n,`${t}${j.FORWARD_SLASH_STRING}${e}_${n}`}return""},z=(e,t)=>{if(e&&t){const n=G[t]?.[e];return n?`${t}${j.FORWARD_SLASH_STRING}${e}_${n}`:q(e,t)}return""},Y=e=>{let t=j.EMPTY_STRING;return e&&(t=e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("_")).toLowerCase()),t},K=(e,t)=>{if(null===e)return t;const[,n]=t.split(j.FORWARD_SLASH_STRING);return e+j.FORWARD_SLASH_STRING+n},X=e=>{const t=e.indexOf(j.FORWARD_SLASH_STRING),n=e.lastIndexOf(j.FORWARD_SLASH_STRING);return t===n?e:e.substring(0,n)},J=e=>{const t=e.split(j.FORWARD_SLASH_STRING);return 2===t.length?e:t[0]+j.FORWARD_SLASH_STRING+t[2]},Q="SET_PROPERTY",Z="REPLACE_PROPERTY",ee="FIELD_CHANGE",te="LOAD_VIEW",ne="SHOW_PAGE",re="SHOW_DATA",se="SHOW_INSIGHT",ae="SHOW_DASHBOARD",oe="SET_LOADING",ie="RESET_LOADING",ce="SET_SHARED_PROPERTY",le="CREATE_WORK",ue="OPEN_WORK_BY_HANDLE",de="UPDATE_DOCUMENT",pe="FINISH_ASSIGNMENT",he="CANCEL_ASSIGNMENT",ge="OPEN_ASSIGNMENT",fe="MERGE_DATA",me="REMOVE_ITEM",ye="GET_DATAOBJECT_ACTIONS",Ie="SHOW_HISTORY",Ee="ERROR",Ae="INIT_CONTAINERS",_e="RESET_CONTAINERS",Se="ADD_CONTAINER_ITEM",Ce="REMOVE_CONTAINER_ITEM",Te="ADD_TRANSIENT_ITEM",Ne="UPDATE_TRANSIENT_DATA",Pe="REMOVE_TRANSIENT_ITEM",De="REMOVE_ALL_TRANSIENT_ITEMS",Re="CLEAR_TRANSIENT_DATA",be="PURGE_TRANSIENT_DATA",Oe="REPLACE_TRANSIENT_DATA",ve="ACTIVATE_CONTAINER_ITEM",xe="UPDATE_CONTAINER_ITEM",we="UPMERGE_AND_REMOVE_CONTAINER_ITEM",Me="REPLACE_CONTAINER_ITEM",Le="ACTIVATE_MODAL_CONTAINER_ITEM",Ue="REMOVE_CONTAINER",Fe="ADD_SUGGESTION_CONTEXT",je="showView",Ve="showData",ke="showInsight",$e="showDashboard",Be="openWorkByHandle",Ge="openAssignment",We="createNewWork",He="SHOW_CANCEL_ALERT",qe="openLocalAction",ze="openProcessAction",Ye="caseWideActions",Ke="openBulkAction",Xe="performBulkAction",Je="ADD_MESSAGES",Qe="CLEAR_MESSAGES",Ze="RESET_STORE",et="FETCH_DATAPAGE",tt="ADD_SHARED_DATA",nt="REMOVE_SHARED_DATA",rt="LIST_ACTION",st="DELETE_CASE_SUMMARY",at="ALTER_BLOCKING_ACTION_COUNT",ot="CREATE_DATA_OBJECT",it="DELETE_DATA_OBJECT",ct="VIEW_DATA_OBJECT",lt="UPDATE_DATA_OBJECT",ut="OPEN_DATA_OBJECT_ACTION",dt="SUBMIT_DATA_OBJECT_ACTION",pt="OPEN_EMBEDDED_DATA_MODAL",ht="SUBMIT_EMBEDDED_DATA_MODAL",gt="FILL_FORM_WITH_AI",ft="openCase",mt=(e,t)=>{if(!e||!t)return null;let n,r=j.EMPTY_STRING;return t&&(r=`${t}${j.FORWARD_SLASH_STRING}${e}`,n=rd(r),n||t.includes("/")?n||(r=mt(e,W(t))):r=`${t}${j.FORWARD_SLASH_STRING}${e}`),r},yt=(e,t)=>{const n=mt(e,t);return n&&rd(n)?rd(n):{}},It=(e,t)=>ip.getSemanticURL(je,{page:e},t);const Et=new class{error=e=>{console.error(e)}};class At{constructor(e,t,n){this._grammar=e,this._state="expectOperand",this._tree=null,this._exprStr=t||"",this._endState=n||{}}static _setParent(e,t){Object.defineProperty(e,"_parent",{value:t,writable:!0})}_addToken(e){const t=Rt[this._state],n=this._exprStr;if(this._exprStr+=e.element,t.subHandler){this._subParser||this._startSubExpression(n);const t=this._subParser._addToken(e);t&&(this._endSubExpression(),this._state=t)}else{if(!t.operatorTypes[e.tokenType]){if(this._endState[e.tokenType])return this._endState[e.tokenType];throw new Error(`Token ${e.element} (${e.tokenType}) unexpected in expression: ${this._exprStr}`)}{const n=t.operatorTypes[e.tokenType],r=Dt[e.tokenType];r&&r.call(this,e),n.toState&&(this._state=n.toState)}}return!1}addTokens(e){e.forEach(this._addToken,this)}buildAst(){return this._subParser&&this._endSubExpression(),this._state="complete",this._position?this._tree:null}_startSubExpression(e){const{endStates:t}=Rt[this._state];this._subParser=new At(this._grammar,e,t)}_endSubExpression(){Rt[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,At._setParent(e,this._position)):this._tree=e,this._position=e}}const _t=At,St="identifier",Ct={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e&&t},Tt={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e||t},Nt={">":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>t},">=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>=t},"<":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<t},"<=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<=t},"==":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e===t},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e!==t},"!":{operatorType:"unaryOperator",precedence:999,evaluate:e=>{let{value:t}=e;return"true"!==t&&"false"!==t||(t="true"===t),!t}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":Ct,AND:Ct,and:Ct,"||":Tt,OR:Tt,or:Tt,CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.includes(t)},NOT_CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.includes(t)},STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.startsWith(t)},NOT_STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.startsWith(t)},ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.endsWith(t)},NOT_ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.endsWith(t)},IS_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!e},IS_NOT_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!!e},IS_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>t.split(",").includes(e)},IS_NOT_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!t.split(",").includes(e)}},Pt={BinaryExpression:function(e){const t=[];let n="";return t[0]=this.evaluateAST(e.left),e.left.operationType===St&&this._context&&(n=this._context.getFieldMetadata(e.left.value.substring(1))?.type??""),t[1]=e.right?this.evaluateAST(e.right,n):"",this._grammar[e.operator].evaluate(t[0],t[1])},identifier:function(e){return this._localDataObject?this._localDataObject[e.value.substring(1)]??"":this._contextTreeNodeContext?Ch.getLitePropertyValue(this._contextTreeNodeContext,e.value):this._context.getValue(e.value)??""},literal:function(e,t){return!(void 0===t||""===t||"True-False"===t)||"true"!==e.value&&"false"!==e.value?e.value:"true"===e.value},UnaryExpression:function(e){return this._grammar[e.operator].evaluate(e.right)}},Dt={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:e.value})},binaryOperator:function(e){const{precedence:t}=this._grammar[e.value];let n=this._position._parent;for(;n&&n.operator&&this._grammar[n.operator].precedence>=t;)this._position=n,n=n._parent;const r={operationType:"BinaryExpression",operator:e.value,left:this._position};_t._setParent(this._position,r),this._position=n,this.setPositionInAST(r)},identifier:function(e){const t={operationType:St,value:e.value};this.setPositionInAST(t)},literal:function(e){this.setPositionInAST({operationType:"literal",value:e.value})},subExpression:function(e){this.setPositionInAST(e)}},Rt={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:St},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:Dt.subExpression,endStates:{closeParenthesis:"expectBinOp"}}},bt=["binaryOperator","unaryOperator","openParenthesis"],Ot=/^\s*$/,vt=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,xt=/\\\\/,wt=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],Mt=["[a-zA-Z_.\\$][(0-9)a-zA-Z0-9_.\\$]*","[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}|[0-9]{4}-[0-9]{2}-[0-9]{2}","(?:(?:[0-9]*\\.[0-9]+)|[0-9]+)"],Lt=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;class Ut{constructor(e){this._grammar=e}static _isNegative(e){return bt.some((t=>t===e[e.length-1].tokenType))}static _isWhitespace(e){return!!e.match(Ot)}static _createWordboundary(e){return(e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).match(vt)&&(e=`\\b${e}\\b`),e}static _unquote(e){const[t]=e,n=new RegExp(`\\\\${t}`,"g");return e.substr(1,e.length-2).replace(n,t).replace(xt,"\\")}_getSplitRegex(){if(!this._splitRegex){const e=Object.keys(this._grammar).sort(((e,t)=>t.length-e.length)).map((e=>Ut._createWordboundary(e)),this);this._splitRegex=new RegExp(`(${[wt.join("|"),e.join("|"),Mt.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){const t=this._getSplitRegex();return e.split(t).filter((e=>e))}_createToken(e){const t={tokenType:"literal",value:e,element:e};return'"'===e[0]||"'"===e[0]?t.value=Ut._unquote(e):e.match(Lt)?t.value=parseFloat(e):"true"===e||"false"===e?t.value="true"===e:this._grammar[e]?t.tokenType=this._grammar[e].operatorType:e.match(vt)&&(t.tokenType="identifier"),t}_getTokens(e){const t=[];let n=!1;for(let r=0;r<e.length;r+=1)Ut._isWhitespace(e[r])?t.length&&(t[t.length-1].element+=e[r]):"-"===e[r]&&Ut._isNegative(t)?n=!0:(n&&(e[r]=`-${e[r]}`,n=!1),t.push(this._createToken(e[r])));return t}tokenize(e){const t=this._splitExpression(e);return this._getTokens(t)}}const Ft=Ut;const jt=class{constructor(e,t){this._grammar={...Nt},this._expression=e,this._ast=null,this._context={},this._contextTreeNodeContext=null,this._localDataObject=t}buildAST(){const e=new Ft(this._grammar).tokenize(this._expression),t=new _t(this._grammar);return t.addTokens(e),this._ast=t.buildAst(),this}evaluate(e,t){return this._context=e,this._contextTreeNodeContext=t,this.evaluateAST(this._ast)}evaluateAST(e,t){return Pt[e.operationType].call(this,e,t)}},Vt=(e,t)=>{const n=e.replace(/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,(e=>e.replace("=","==")));return new jt(n,t)},kt=e=>!e||e.buildAST(),$t=(e,t,n)=>!e||e.evaluate(t,n),Bt=(e,t,n)=>{const r=Vt(e,t),s=kt(r);return $t(s,n)};const Gt=class{static handleExpression(e,t,n,r){const s=this.getContext(e,r);A({actionObject:{action:"decexp",params:{source:e,value:t,targets:n},context:s}}).then((e=>e.json())).then((e=>{this.updateState(e,r)})).catch((e=>window.console.log(e)))}static getContext(e,t){const n=e.substring(0,e.indexOf("."));return{name:n,class:Ch.getPropertyValue(`${n}.pxObjClass`,null,t)||Ch.getPropertyValue(`${n}.pyClassName`,null,t)}}static updateState(e,t){Object.keys(e).forEach((n=>sh({type:Q,payload:{context:t,reference:n,value:e[n]}})))}},Wt={},Ht=(e,t)=>Wt[t]&&Object.prototype.hasOwnProperty.call(Wt[t],e),qt=e=>{const{context:t}=e;Ht(e.reference,t)&&Gt.handleExpression(e.reference,e.value,Wt[t][e.reference],t)},zt=(e={})=>{Eh.copy(e,Wt)},Yt=(e,t,n)=>Bt(e,t,n?.pConnect.getPConnect());const Kt=new class{constructor(){this._dataSourceMap={}}hasContextName(e){return e in this._dataSourceMap}addContextName(e,t){t&&Object.keys(t).length>0?this._dataSourceMap[e]=t:this._dataSourceMap[e]={}}getContextObjectByName(e){return e in this._dataSourceMap?this._dataSourceMap[e]:null}deleteContextName(e){this.hasContextName(e)&&delete this._dataSourceMap[e]}addOrUpdatePropertyInContext(e,t,n){if(this.hasContextName(e)){const r=this.getContextObjectByName(e);if(r)if(Array.isArray(n))r[t]=n;else{const e=r[t];r[t]=[...new Set([...e,n])]}}else{const r={};Array.isArray(n)?r[t]=n:r[t]=[n],this.addContextName(e,r)}}deletePropertyInContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);n&&t in n&&delete n[t]}}getPropertyFromContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);if(n&&t in n)return n[t]}return[]}getDependencies(e,t){const n=this.getPropertyFromContext(e,t),r=new Set(n);return n.forEach((e=>{r.add(e)})),[...r]}};const Xt=new class{constructor(){this.componentMap={},this.overrideMap={},this.lazyMap={},this.customComponentLazyMap={}}register(e,t){this.componentMap[e]=t}registerLazyMap(e,t){this.lazyMap[e]=t}registerCustomComponentLazyMap(e,t){this.customComponentLazyMap[e]=t}getComponent(e){return this.componentMap[e]}getLazyComponent(e){return this.lazyMap[e]}getCustomComponent(e){return this.customComponentLazyMap[e]}mergeComponentsMap(e={}){Eh.copy(e,this.componentMap)}mergeOverrideMap(e={}){Eh.copy(e,this.overrideMap)}getOverrideMap(){return this.overrideMap}getLazyMap(){return this.lazyMap}};const Jt=new class{constructor(){this.handlers={}}registerHandler(e,t){this.handlers[e]=t}getHandler(e){return this.handlers[e]}};const Qt=class{static handleAnnotation(e,t,n){const r=e.indexOf(" "),s=-1===r?e:e.substring(0,r),a=Jt.getHandler(s);return a?a(e.substring(r+1),t,n):e}static trimAnnotation(e){if("string"!=typeof e)return e;const t=e.indexOf(" "),n=e.substring(0,t),r=e.substring(t+1);return Jt.getHandler(n)?r:e}static handleComponentMapping(e,t,n){const r=Xt.getComponent(t.type);if(!r||!r.mapping)return;const s=r.mapping(t.config);if(s&&s["@map"]){const t=s["@map"],{source:r}=t;if(!r)return;const a=n.getValue(r);if("function"==typeof t.advanced)t.advanced(e,a);else{const n=t.inputs_map;e[t.output_property]=[];const r=e[t.output_property];a.forEach((e=>{const t={};Object.keys(n).forEach((r=>{let s=n[r];s&&0===s.indexOf(".")?(s=s.substring(1),t[r]=e[s]):t[r]=s})),r.push(t)}))}}}static getPropertyName(e){if(e&&Eh.isString(e)){const t=e.startsWith(j.PROPERTY_ANNOTATION)||e.startsWith(j.ATTACHMENT_ANNOTATION)||e.startsWith(j.ASSOCIATED_PROPERTY_ANNOTATION),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getLeafPropertyName(e){if(Eh.isString(e)&&!!e?.startsWith(j.PROPERTY_ANNOTATION)){const t=this.getPropertyName(e),n=t.split(".");return n.length<2?t:n.pop()}return e}static isProperty(e){return Eh.isString(e)&&!!e?.startsWith(j.PROPERTY_ANNOTATION)}},Zt=e=>{if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1){if(n[e].ID===t)return"create"===n[e].transitionType&&"active"===n[e].visited_status}}return!1},en=(e,t)=>{if(e&&t){const n=Eh.getIn(t,["assignments","0","assigneeInfo"],{}),{ID:r,type:s}=n;return"worklist"===s?.toLowerCase()&&r===e}return!1},tn=e=>{const{activeActionID:t,availableActions:n}=e||{};if(t&&n){const e=n.find((e=>e.ID===t));return Boolean(e)}return!1},nn=(e,t)=>{const n=Ch.getPropertyValue(F.CASE_INFO.ACTIVE_ACTION_ID,t,e),r=Ch.getPropertyValue(F.CASE_INFO.AVAILABLEACTIONS,t,e);let s=!1;if(r&&n){const e=r.find((e=>e.ID===n));e&&(s=e.type.toLowerCase()===F.LOCAL_ACTION_TYPE.CASE_WIDE.toLowerCase())}if(e&&!r){const t=ah(e);s=t?.context_data?.actionType===j.CASE}return s},rn=e=>lh(null,j.CASE_VIEW_MODE_PROP,e)===j.PERFORM_MODE&&(e.includes(j.WORKAREA)||e.includes(j.MODAL)),sn=e=>{const t=e?.parentCaseInfo?.ID;return Boolean(e&&t)},an=(e,t,n)=>{let r;const s=e?.find((e=>e.ID===t))?.actions,a=s?.filter((e=>e.ID===j.FIX_BROKEN_ASSIGNMENTS))||[];return r=n&&a?.length>0?a[0].ID:n||((e,t)=>{if(!Array.isArray(e)||!t)throw new Error("Invalid parameters passed to getAssignmentActionID API");return e.find((e=>e.ID===t))?.actions?.[0]?.ID})(e,t),r},on=(e,t,n)=>{let r,s,a,o,i,c,l,u,d;const p=ah(e);return n?.isTriggeredFromDifferentContext?(r=p.caseInfo.assignments[0].ID,s=p.caseInfo.ID,a=p.caseInfo.assignments,o=p.caseInfo.activeActionID,i=p.caseInfo.availableActions,c=p.caseInfo,l=p.caseInfo.businessID,u=p.caseInfo.caseTypeID,d=p.caseInfo.caseTypeName):(r=t.getValue(F.CASE_INFO.ASSIGNMENT_ID),s=t.getValue(F.CASE_INFO.CASE_INFO_ID),a=t.getValue(F.CASE_INFO.ASSIGNMENTS),o=t.getValue(F.CASE_INFO.ACTIVE_ACTION_ID),i=t.getValue(F.CASE_INFO.AVAILABLEACTIONS),c=t.getValue(F.CASE_INFO.CASE_INFO),l=t.getValue(F.CASE_INFO.BUSINESS_ID),u=t.getValue(F.CASE_INFO.CASE_TYPE_ID),d=t.getValue(F.CASE_INFO.CASE_TYPE_NAME)),{assignmentID:r,caseID:s,assignments:a,localActionID:o,caseActions:i,caseInfo:c,businessID:l,caseTypeID:u,caseTypeName:d}};const cn=new class{constructor(){this.contextArray={},this.pauseDuration=2e3,this.waitingToPutUpIndicator=!1}getLoadingContext(e){let t=null;return e&&(({context:t}=e),t||(t=e.containerItemID),t||(t=e.contextName)),t}enableLoadingIndicator(e,t=!0){const n=this.getLoadingContext(e);n&&(this.addToContextArray(n),this.waitingToPutUpIndicator||(this.waitingToPutUpIndicator=!0,this.pauseBeforeShowing(n).then((e=>{t&&void 0!==this.contextArray[e]&&this.contextArray[e]>0&&sh({type:oe,payload:{context:e}})}))))}pauseBeforeShowing=e=>new Promise((t=>setTimeout((()=>t(e)),this.pauseDuration)));disableLoadingIndicator(e,t=!0){const n=this.getLoadingContext(e);n&&(this.waitingToPutUpIndicator=!1,this.removeFromContextArray(n),t&&void 0!==this.contextArray[n]&&0===this.contextArray[n]&&sh({type:ie,payload:{context:n}}))}addToContextArray=e=>{void 0===this.contextArray[e]&&(this.contextArray[e]=0),this.contextArray[e]+=1};removeFromContextArray=e=>{void 0!==this.contextArray[e]&&this.contextArray[e]>0&&(this.contextArray[e]-=1)}};const ln=new class{constructor(){this.counterActionMgrId=0,this.actionMgrActions=[]}getNextActionMgrId(){return this.counterActionMgrId+=1,this.counterActionMgrId.toString()}register(e,t,n,r,s="unknown",a,o=!0){if(void 0!==this.actionMgrActions[e])return null;const i={actionType:s,promise:t,resolve:n,reject:r,actionPayload:a};return this.actionMgrActions[e]=i,o&&cn.enableLoadingIndicator(i.actionPayload),e}actionManagerPromise=(e,t=null)=>{let n,r;null===t&&(t=this.getNextActionMgrId());const s=new Promise(((e,t)=>{n=e,r=t}));return this.register(t,s,n,r,e),{actionMgrID:t,promise:s}};resolveActionByID(e,t,n=!0){const r=this.actionMgrActions[e];let s=e;return r?(setTimeout((()=>{r.resolve(t)}),0),cn.disableLoadingIndicator(r.actionPayload,n)):s=null,s}rejectActionByID(e,t=!0,n){const r=this.actionMgrActions[e];let s=e;return r?(r.reject(n),cn.disableLoadingIndicator(r.actionPayload,t)):s=null,s}};class un{constructor(e,t,n={}){this.type=e,this.name=t,this.parent=null,this.children=[],this.eventSubscribers=[],this.value="",this.previousValue="|~#-old-#~|",this.props=n,this.references=new Map}addReference(e,t){this.references.set(e,t)}getReference(e){return e?this.references.get(e):void 0}getNode(e,t,n){return this.children.find((r=>r.type===e&&r.name===t&&r.props.index===n))}addNode(e,t,n={}){let r=this.getNode(e,t,n.index);return r?r.props=n:(r=new un(e,t,n),r.parent=this,this.children.push(r)),r}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e,t=!1){this.eventSubscribers.forEach((t=>{t(e)})),!t&&this.parent&&this.parent.triggerEvent(e)}setPreviousDefaultValue(){"|~#-old-#~|"===this.previousValue&&(this.previousValue=this.value)}removeReference(e,t){const n=this.references.get(e);n?.props?.index===t&&this.references.delete(e)}removeChildNode(e){const t=this.children.findIndex((t=>t.name.startsWith(e)));-1!==t&&this.children.splice(t,1)}removeChildren(){this.children.splice(0,this.children.length)}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const r=this.children[n];if(r.props.index===t&&r.name===e){this.children.splice(n,1);break}}}}const dn=un;const pn=class{constructor(e,t,n,r={}){this.type=F.CONTEXT_TREE_NODE_TYPES.WHEN,this.subType=e,this.referenceName=t,this.name=n,this.props=r}},hn=/(([^.]+)\[\d+\])/g,gn=e=>{if((e?.split(".")??[]).length<3)return[e];const t=e?.match(hn);if(!t)return[e];let n,r=t[t.length-1];return e=e?.split(r)[0],e=e?.substring(0,e.length-1),[r,n]=r.split("["),n=n?.split("]")[0],[e,r,n]},fn=(e,t)=>{if(!e.startsWith(t))return-1;const n=e.slice(t.length).match(/\[([0-9]+)\]/);return n?parseInt(n[1],10):-1},{FIELD:mn,WHEN:yn,DECLARATIVE_TARGET:In,PAGELIST:En}=j.CONTEXT_TREE_NODE_TYPES;const An=class{constructor(e,t,n={}){this.type=e,this.name=t,this.children=[],this.eventSubscribers=[],this.props=n,this.references=new Map([[mn,new Map],[yn,new Map],[In,new Map]])}addReference(e,t){if(this.references.has(t.type)){const n=this.references.get(t.type);n.set(e,t),this.references.set(t.type,n)}else{if(t.type===En){const n=this.references.get(mn);n.set(e,t),this.references.set(mn,n)}}}removePageListNodes(e,t){const n=this.children.filter((t=>t.name.startsWith(e))).filter((n=>{const r=fn(n.name,e);return-1!==r&&+r>=t}));n.length>0&&n.forEach((e=>{this.removeChildNode(e.name,t)}))}removeChildNode(e,t){const n=this.children.findIndex((t=>t.name.startsWith(e)));if(-1!==n){const[t]=this.children.splice(n,1),r=t?.parent;r?.removeChildNode(e)}const r=this.references.get(mn),s=this.references.get(In);[...r.keys(),...s.keys()].filter((t=>t.startsWith(e))).filter((e=>{const[,,n]=gn(e);return+n>=t})).forEach((e=>{const t=r.get(e).parent;t?.removeChildren(),r.delete(e)}))}getReference(e,t){if(this.references.has(t))return this.references.get(t)?.get(e)}getNode(e,t,n){return this.children.find((r=>r.type===e&&r.name===t&&r.props.index===n))}addNode(e,t,n={}){let r=this.getNode(e,t,n.index);return r?r.props=n:(r=new dn(e,t,n),r.parent=this,this.children.push(r)),r}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e){this.eventSubscribers.forEach((t=>{t(e)}))}removeReference(e,t,n){const r=this.references.get(t),s=r?.get(e);s?.props?.index===n&&r.delete(e)}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const r=this.children[n];if(r.props.index===t&&r.name===e){this.children.splice(n,1);break}}}addWhen(e,t,n,r,s){if(!(n&&r&&e&&t))return;n.startsWith(".")&&(n=n.substring(1));const a=`${e}.${n}.${r}`,o=new pn(t,n,r,s),i=this.references.get("WHEN");i?.set(a,o)}},{VIEW:_n,FIELD:Sn,CONTEXT:Cn,DECLARATIVE_TARGET:Tn,WHEN:Nn}=F.CONTEXT_TREE_NODE_TYPES;const Pn=new class{constructor(){this.rootNodes={}}_isContextNodeExist(e){return Object.keys(this.rootNodes).includes(e)}addContextNode(e){if(!this._isContextNodeExist(e)){const t=new An(Cn,e);this.rootNodes[e]=t}return this.rootNodes[e]}getContextNode(e){return e?this.rootNodes[e]:void 0}addPageNode(e,t){return this.addContextNode(e).addNode("PAGE",t)}_addParentViewNode(e,t,n){const r=this.addContextNode(e).addNode("PAGE",t);let s=r.getReference(n);return s||(s=r.addNode("VIEW",n),r.addReference(n,s)),s}pushChildPageNodeToParentView(e,t,n){const r=e.children;let s=!1;if(r)for(let e=0;e<r.length;e+=1)if(r[e].name===n){s=!0;break}s||r.push(t),t.parent=e}addViewNode(e,t,n,r){const s=this.addContextNode(e).addNode("PAGE",t);let a=null;if(r&&n!==r){a=this._addParentViewNode(e,t,r).addNode("VIEW",n)}else a=s.addNode("VIEW",n);s.addReference(n,a);const o=t.split(".");for(;o.length>0;){o.pop();const n=o.join("."),a=this.getContextNode(e)?.getNode("PAGE",n),i=a?.getReference(r);if(i){this.pushChildPageNodeToParentView(i,s,t);break}}return a}getViewNode(e,t,n){return this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n)}addPageListNode(e,t,n,r,s){if(!r)return;r.startsWith(".")&&(r=r.substring(1));const a=this.addContextNode(e),o=a.addNode("PAGE",t)?.getReference(n)?.addNode("PAGELIST",`${t}.${r}`,s);return o&&a.addReference(`${t}.${r}`,o),o}updatePageListNode(e,t,n,r){if(!n)return;n.startsWith(".")&&(n=n.substring(1));this.addContextNode(e).removePageListNodes(`${t}.${n}`,r)}removeFieldNode(e,t,n,r,s){const a=this.getContextNode(e);a?.getNode("PAGE",t)?.getReference(n)?.removeNode(`${t}${r}`,s),a?.removeReference(`${t}${r}`,Sn,s),a?.removeReference(`${t}${r}`,Tn,s)}removeViewNode(e,t,n,r){const s=this.getContextNode(e),a=s?.getNode("PAGE",t),o=a?.getReference(n);this.removeChildViewNodes(e,t,n,r);const i=o?.parent?.children?.findIndex((e=>e.name===n))??-1;i>-1&&o?.parent?.children.splice(i,1)}removeChildViewNodes(e,t,n,r){const s=this.getContextNode(e),a=s?.getNode("PAGE",t),o=a?.getReference(n);o?.children.forEach((a=>{"PAGE"===a.type?this.removeViewNode(e,a.name,n,r):a.type===_n?this.removeChildViewNodes(e,t,a.name,r):(s.removeReference(a.name,Sn,a.props.index),s.removeReference(a.name,Tn,a.props.index),"PAGELIST"!==a.type&&"Address"!==a.props?.componentName||this.deleteAllListNodes(e,a.name))})),a?.references.delete(n)}deleteAllListNodes(e,t){const n=n=>{const r=this.getContextNode(e),s=r?.references?.get(n);if(s)for(const[e]of s)e.includes(t)&&r?.references?.get(n)?.delete(e)};n(Sn),n(Tn)}deleteListNode(e,t,n){const r=r=>{const s=this.getContextNode(e),a=s?.references?.get(r);if(a)for(const[e]of a)e.includes(`${t.join(".")}[${n}]`)&&s?.references?.get(r)?.delete(e)};r(Sn),r(Tn)}getPageListNode(e,t,n,r){const s=this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n);return s?.children.find((e=>"PAGELIST"===e.type&&e.name===`${t}.${r}`))}getFieldNode(e,t,n,r){return this.getViewNode(e,t,n)?.getNode(Sn,r)}_findViewNode(e,t,n,r){let s=r.addNode("PAGE",t)?.getReference(n);if(s)return s;const a=t.split(".");for(;a.length>0;){a.pop();const e=a.join(".");if(s=r.addNode("PAGE",e)?.getReference(n),s)return s}return this.addViewNode(e,t,n)}addFieldNode(e,t,n,r,s,a={}){const o=this.addContextNode(e),i=this._findViewNode(e,t,n,o),{isDeclarativeTarget:c}=a;let l;if(l=c?i.addNode(Tn,`${t}${r}`,a):i.addNode(Sn,`${t}${r}`,a),l){const n=`${t}${r}`;if("Address"===l.props?.componentName&&this.deleteAllListNodes(e,l.name),o.addReference(n,l),l.value=s,l.setPreviousDefaultValue(),l.props.isInsideList){const e=t.substring(0,t.lastIndexOf("["));let n=o.getReference(e,Sn);n||(n=i.addNode(Sn,e,{}),o.addReference(e,n))}}return l}removeContextTreeNode(e){delete this.rootNodes[e]}onViewMutate(e,t,n,r){this.getViewNode(e,t,n)?.addEventListener(r)}mutateField(e,t,n,r){const s=this.getContextNode(e),[a,o,i]=gn(t);n.startsWith(".")&&(n=n.substring(1)),o&&this.mutatePageList(e,a,o,{...r,rowIndex:i},!0);const c=s?.getReference(`${t}.${n}`,Sn);c&&c instanceof dn&&c.triggerEvent(r)}onPageListMutate(e,t,n,r,s){this.getPageListNode(e,t,n,r)?.addEventListener(s)}mutatePageList(e,t,n,r,s=!1){const a=this.getContextNode(e),o=a?.getReference(`${t}.${n}`,Sn);o&&o instanceof dn&&o.triggerEvent(r,s)}getFieldsList(e){const t=this.getContextNode(e);return t?.references.get(Sn)}getFieldReferencePreviousValue(e,t){let n=this.getContextNode(e)?.references?.get(Sn)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(Tn)?.get(t)),n?.value}updateFieldNodeValue(e,t,n){const r=this.getContextNode(e)?.references?.get(Sn)?.get(t);r instanceof dn&&r&&(r.previousValue=r.value,void 0===r.value&&(r.previousValue=n),r.value=n)}getContextReferences(e){if(!this.getContextNode(e))return;const t=this.getContextReferencesByType(e,Sn),n=this.getContextReferencesByType(e,Tn);return new Map([...t.entries(),...n.entries()])}getContextReferencesByType(e,t){return this.getContextNode(e)?.references.get(t)||new Map}isFieldExists(e,t){return!!this.getContextReferencesByType(e,Sn)?.get(t)||!!this.getContextReferencesByType(e,Tn)?.get(t)}addWhenNode(e,t,n,r,s,a){const o=this.getContextNode(e);o?.addWhen(t,n,r,s,a)}getDeclarativeTargets(e){const t=this.getContextNode(e),n=t?.references?.get(Tn)||new Map,r=[];return n.forEach((e=>{const t=e?.props||{},{propertyName:n=""}=t,s=t.pageReference??F.CASE_INFO.CASE_INFO_CONTENT;r.push({pageReference:s,name:n})})),r}getWhens(e){const t=this.getContextNode(e),n=t?.references?.get(Nn)||new Map,r=[];return n.forEach((e=>{const t=e.subType,n=e.referenceName,s=e.name,a=e?.props?.pageReference??F.CASE_INFO.CASE_INFO_CONTENT;r.push({name:s,pageReference:a,referenceName:n,type:t})})),r}},Dn={REFRESH_DATA:"REFRESH_DATA",WHENS:"WHENS",DECLARE_EXPRESSIONS:"DECLARE_EXPRESSIONS",REFRESH:"refresh",REFRESH_CASE_DATA:"refreshCaseData",REFRESH_ASSIGNMENT_DATA:"refreshAssignmentData",REFRESH_CASE_VIEW:"refreshCaseView",RECALCULATE:"recalculate",RECALCULATE_CASE_DATA:"recalculateCaseData",RECALCULATE_ASSIGNMENT_DATA:"recalculateAssignmentData"},Rn=e=>({type:Dn.REFRESH_DATA,payload:e}),bn={},On=(e,t,n,r,s)=>{if(!(e&&n&&t))return;const a=s.actionMgrID||ln.getNextActionMgrId(),o={ID:e,actionID:t,context:n,caseWideAction:r,options:{...s,actionMgrID:a}};s.isFillFormWithAI?sh((e=>({type:gt,payload:e}))(o)):sh(Rn(o))},vn=(e,t,n,r,s)=>{if(!(e&&n&&t))return;r&&(r=Eh.convertPageRefToClipboardPageNotation(r));sh(Rn({ID:e,viewID:t,context:n,options:s,caseViewAction:!0,interestPage:r}))},xn=(e,t,n)=>{bn[t]||(bn[t]={}),e&&!bn[t][e]&&(bn[t][e]={pageReference:n})},wn=(e,t)=>{const n={pageName:(r=t.substring(t.lastIndexOf(" ")+1)).substring(0,r.lastIndexOf(".")),propertyName:r.substring(r.lastIndexOf(".")+1)};var r;const s=vp(n.propertyName,e.getValue(j.CLASS_ID,n.pageName));return!!s?.isDeclarativeTarget},Mn=e=>{let t=!1;if(e.isWhenExist())t=!0;else{const n=e.getRawMetadata()?.config?.value;if(n){const r=vp(Qt.getLeafPropertyName(n),Ch.resolveClassID(n,e.getPageReference(),e.getContextName()));t=!!r?.isDeclarativeTarget,!t&&r?.datasource?.parameters&&(t=((e,t)=>{let n=!1;if(Array.isArray(t)){const r=t=>{const r=t.value;return r.startsWith("@P")&&(n=wn(e,r)),n};t.some(r)}else if("object"==typeof t)for(const r in t)if(t[r].startsWith("@P")&&(n=wn(e,t[r]),n))break;return n})(e,r?.datasource?.parameters)),t||(t=r?.datasource?.tableType===j.DECISION)}}t&&xn(e.getCurrentView(),e.getContextName(),e.getPageReference())},Ln=(e,t,n)=>{const r=nn(e,t),s=Ch.getPropertyValue(F.CASE_INFO.ACTIVE_ACTION_ID,t,e)?Ch.getPropertyValue(F.CASE_INFO.ACTIVE_ACTION_ID,t,e):Ch.getPropertyValue(F.CASE_INFO.ASSIGNMENTACTION_ID,t,e);let a;a=r?Ch.getPropertyValue(F.CASE_INFO.CASE_INFO_ID,t,e):Ch.getPropertyValue(F.CASE_INFO.ASSIGNMENT_ID,t,e)?Ch.getPropertyValue(F.CASE_INFO.ASSIGNMENT_ID,t,e):Ch.getPropertyValue(F.CONTEXT_DATA_ASSIGNMENTID,t,e),On(a,s,e,r,n)},Un=e=>{const{context:t,pageReference:n}=e,r=(e=>bn[e]&&Object.keys(bn[e]).length>0&&rn(e))(t);if(!r)return;if(Ch.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,n,t)){const e=Ch.getPropertyValue(F.CASE_INFO.CASE_INFO_ID,n,t),r=Ch.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,n,t),s=Ch.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.INTERESTPAGE,n,t);vn(e,r,t,s,{})}else Ln(t,n,{})},Fn=(e,t)=>{const{requestType:n}=e;return e?.options?.refreshFor&&"refresh"===n&&(t+=`?refreshFor=${e?.options?.refreshFor}`),e?.options?.isFillFormWithAI&&"refresh"===n&&(t+="?fillFormWithAI=true"),t},jn=e=>{const t=(e=>{const t=[];return Pn.getDeclarativeTargets(e).forEach((({name:e,pageReference:n})=>{const r=n.split(".");r.shift();let s=r.join(".");e&&s&&(s=Eh.convertPageRefToClipboardPageNotation(s),t.push({name:e,context:s}))})),t})(e),n=(e=>{const t=[];return Pn.getWhens(e).forEach((({name:e,type:n,pageReference:r})=>{const s=r.split(".");s.shift();let a=s.join(".");e&&a&&(a=Eh.convertPageRefToClipboardPageNotation(a),t.push({name:e,context:a,type:n}))})),t})(e);return{fieldsWithDeclarativeTargets:t,whens:n}};const Vn=class{static formatPageReference(e){const t=e?.split(".").map((e=>{if(e.includes("[")){const t=e.indexOf("["),n=e.indexOf("]"),r=e.substring(t+1,n),s=Number(r)+1;return`${e.substring(0,t)}(${s})${e.substring(n+1)}`}return e}));return t.join(".")}static getFieldLabel(e){let t=e?.label;if(!t&&e?.inheritedProps){const n=e?.inheritedProps;(n.showLabel??1)&&(t=n.label)}return t}},kn={CONTENT_FIELDS_PATH:[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT],FIELD_MESSAGES_PATH:[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT,j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES],PAGE_MESSAGES_PATH:[j.CONTEXT_DATA,j.SUMMARY_OF_MESSAGES,j.PAGE_MESSAGES],HTTP_MESSAGES_PATH:[j.CONTEXT_DATA,j.SUMMARY_OF_MESSAGES,j.HTTP_MESSAGES],CASE_MESSAGE_PATH:[j.CASEMESSAGES]},$n=(e="",t="",n,r)=>{let s,a=[];null!==e&&(s=(e=>e?.startsWith(".")?e.substring(1).split("."):e.split("."))(e));const o=t&&t.startsWith(".")?t.substr(1):t;if(n===j.PROPERTY&&e||e){a=[j.CONTEXT_DATA,...o.split(".")];for(let e=0;e<s.length-1;e+=1)a.push(s[e]);a.push(j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES,s[s.length-1])}else n===F.PAGE?a=[...kn.PAGE_MESSAGES_PATH]:n===j.HTTP?a=[...kn.HTTP_MESSAGES_PATH]:n===j.CASEMESSAGES?a=[...kn.CASE_MESSAGE_PATH]:r&&(a=[j.CONTEXT_DATA,...o.split(".")]);return a.filter(Boolean)},Bn=(e,t,n)=>{const r={content:{}},s=`${t}[${n}]`,a=Eh.getIn(e?.content,s.split("."));return a&&Eh.setIn(r.content,s.split("."),{...a}),r},Gn=(e,t,n,r,s,a,o={})=>{const i=((e,t,n)=>t<n?e.filter((e=>parseInt(e.match(/\d+/)?.[0],10)>t&&parseInt(e.match(/\d+/)?.[0],10)<=n)):e.filter((e=>parseInt(e.match(/\d+/)?.[0],10)<t&&parseInt(e.match(/\d+/)?.[0],10)>=n)))(n,r,s),c=r>s?"up":"down";i&&i?.length>0&&i?.forEach((n=>{const r=parseInt(n.match(/\d+/)?.[0],10),s=`${a}[${r}]`;o[`${a}[${r+("up"===c?1:-1)}]`]=Eh.getIn(e[t],[j.CONTEXT_DATA,...s.split(".")]),Eh.deleteIn(e[t],[j.CONTEXT_DATA,...s.split(".")])}));const l=Object.keys(o);l.length>0&&l.forEach((n=>{Eh.setIn(e[t],[j.CONTEXT_DATA,...n.split(".")],o[n])}))},Wn=(e,t,n,r,s)=>{const a=Eh.deepClone(Eh.getIn(e,[`${t}`])),o=Eh.getIn(a,[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO]);if(!o)return;const i=n.substring(0,n.lastIndexOf(".")),c=n.substring(n.lastIndexOf(".")+1),l=((e,t,n)=>{const r=Eh.getIn(e,[j.CONTEXT_DATA,...n.split(".")]);return Object.keys(r).filter((e=>e.includes(`${t}[`)))})(a,c,i);if(0===l.length)return;if(Bn(o,c,r).content[`${c}[${r}]`]){const o={},i=`${n}[${r}]`,c=Eh.getIn(a,[j.CONTEXT_DATA,...i.split(".")]);o[`${n}[${s}]`]=c,Eh.deleteIn(e[t],[j.CONTEXT_DATA,...i.split(".")]),Gn(e,t,l,r,s,n,o)}else Gn(e,t,l,r,s,n)},Hn=e=>{const{type:t,property:n,category:r,context:s,pageReference:a}=e;let o;n&&(o=n.slice(1));const i=ah(s);let c=[];const l=Eh.getIn(i,$n(o,a,r));return t&&"all"!==t?(l&&Array.isArray(l)&&l.length>0&&(c=l.filter((e=>e.type===t))),t===F.MESSAGES.MESSAGES_TYPE_ERROR&&c.length>0&&n&&Pn.mutateField(s,a,n,{messages:[...c],type:F.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:n}),c):l},qn=e=>{const{property:t,pageReference:n,category:r,context:s,type:a,isListEntry:o,clearContextMessages:i,deletingIndex:c}=e,l={context:s,type:a};t&&!o?(Pn.mutateField(s,n,t,{type:Qe,fieldName:t}),l.property=t,l.pageReference=n):o?(l.pageReference=n,l.isListEntry=o,l.deletingIndex=c):l.category=r,sh(i?{type:Qe,payload:{stateObj:e.stateObj,context:s}}:{type:Qe,payload:l})},zn=e=>{const{messages:t,property:n,pageReference:r,category:s,context:a}=e,o={messages:t,context:a};n?(o.property=n,o.pageReference=r):o.category=s,sh({type:Je,payload:o})},Yn=(e,t,n)=>{for(const r of Object.keys(e)){if(t.push(r),r===j.SUMMARY_OF_MESSAGES)n.push([...t]);else{"object"===typeof e[r]&&Yn(e[r],t,n)}t.pop()}return n},Kn=(e,t)=>{let n=Hn({context:j.APP.ROOT,category:"HTTP"});if(e){const e=Hn({context:t,category:"HTTP"});n?e&&(n=n.concat(Hn({context:t,category:"HTTP"}))):n=Hn({context:t,category:"HTTP"})}return n},Xn=e=>{let t=null;t=Id(e)[0]?pd(Id(e)[0]):e,t&&qn({context:t,stateObj:ah(t),clearContextMessages:!0})},Jn={addMessages:zn,getValidationErrorMessages:e=>{const t=ah(e),n=[],r=Eh.getIn(t,[...kn.CONTENT_FIELDS_PATH])||{};return Yn(r,[],[]).forEach((e=>{const t=Eh.getIn(r,[...e,j.PROPERTY_MESSAGES]);t&&Object.keys(t).forEach((e=>{t[e].forEach((e=>{e.type===j.MESSAGES.MESSAGES_TYPE_ERROR&&(e.fieldLabel?n.push({label:`${e.fieldLabel}:`,description:e.message}):n.push(e.message))}))}))})),n},getMessages:Hn,clearMessages:qn,getRootContainerHttpMessages:Kn,clearContextMessagesInActiveWorkArea:Xn},Qn=Jn;const Zn=class{static execute(e,t,n,r){const s={};Object.prototype.hasOwnProperty.call(n,"nonFormProperties")&&(n.nonFormProperties.forEach((e=>{s[e]=n[e],delete n[e]})),delete n.nonFormProperties);const a={instruction:"INSERT",content:{...Eh.unflatten(n)}},o=JSON.parse(JSON.stringify(a));delete o.content.classID;return{instruction:{target:Eh.buildInstructionPageReference(r,e),content:{...o.content},listIndex:t,instruction:"INSERT"},actionPayload:a,displayPropertPayload:s}}};const er=class{static execute(e,t,n,r,s,a){const o={instruction:"UPDATE",content:{...Eh.unflatten(r)}},i={content:{...o.content},target:Eh.buildInstructionPageReference(s,t),listIndex:n,instruction:"UPDATE"};return a||sh(og({...o,listIndex:n-1,context:e,referenceList:`${s}${t}`})),i}};const tr=class{static execute(e,t,n){return{target:Eh.buildInstructionPageReference(n,e),listIndex:t,instruction:"DELETE"}}};const nr=class{static getDeleteAllInstruction(e,t){return{instruction:"DELETE ALL",target:Eh.buildInstructionPageReference(e,t)}}static execute(e,t,n,r){r||sh(og({instruction:"DESELECT_ALL",context:e,referenceList:`${n}${t}`}))}};const rr=class{static execute(e,t,n,r){return{target:Eh.buildInstructionPageReference(r,e),listMoveToIndex:n,listIndex:t,instruction:"MOVE"}}};const sr=class{static execute(e,t,n,r){return{content:{...{...Eh.unflatten(n)}},target:Eh.buildInstructionPageReference(r,t),instruction:"REPLACE"}}};const ar=class{static execute(e,t){return{target:Eh.buildInstructionPageReference(t,e),instruction:"DELETE"}}};const or=class{constructor(e){this.next=null,this.automatic=!1,this.instruction=e,this.previous=null,this.childrenStateMachines=[]}};const ir=class{constructor(e,t,n){this.target=e,this.pageReference=t,this.contextName=n,this.root=null,this.current=null,this.changeList={},this.targetPageReference=t+e,this.children=[],this.visibility=!0}addChild(e){null===this.current&&this.insertNode({}),this.current.childrenStateMachines.push(e)}insertNode(e){const t=new or(e);null===this.root&&(this.root=t),null!==this.current&&(t.previous=this.current,this.current.next=t),this.current=t}buildChildSumbitPageInstructions(e,t){let n=[];return e.childrenStateMachines.forEach((e=>{e.visibility&&(n=n.concat(e.buildSubmitPageInstructions(t)))})),n}buildSubmitPageInstructions(e=!1){let t=this.root,n=[];for(;t;)!t.instruction.instruction||e&&t.automatic||n.push(t.instruction),n=[...n,...this.buildChildSumbitPageInstructions(t,e)],t=t.next;return n}initPageInstructions(e,t,n){const r=e.getValue(this.target)||[];t?r.forEach(((e,r)=>{t.forEach((t=>{const s=Jc(t),a={};let o=!0;n&&(a[Jc(n)]=crypto.randomUUID(),o=!1);const i={[s]:e[s],...a};this.update(i,r+1,o,{isDefault:!0})}))})):r.forEach(((e,t)=>{if(n&&!e[Jc(n)]){const e={};e[Jc(n)]=crypto.randomUUID(),this.update(e,t+1,!1,{isDefault:!0})}}))}getChangeList(){return this.changeList}initChangeList(e){this.changeList[this.targetPageReference]=this.changeList[this.targetPageReference]||[],this.changeList[this.targetPageReference][e]=this.changeList[this.targetPageReference][e]||{}}update(e,t,n,r){const s=er.execute(this.contextName,this.target,t,e,this.pageReference,n),{isDefault:a=!1,skipPageinstruction:o}=r;if(!o){if(this.initChangeList(t-1),!a){const n=this.changeList?.[this.targetPageReference]?.[t-1].content;this.changeList[this.targetPageReference][t-1]=gh(Eh.deepClone(n),e,r)}if(this.current?.automatic!==a||this.current?.instruction?.listIndex!==t||"UPDATE"!==this.current?.instruction.instruction)this.insertNode(s),a&&(this.current.automatic=!0);else{const t=this.current.instruction.content;this.current.instruction.content=gh(Eh.deepClone(t),Eh.unflatten(e),r)}}}delete(e,t){const n=tr.execute(this.target,e,this.pageReference);this.changeList[this.targetPageReference]?.splice(e-1,1),this.insertNode(n),t||sh(og({instruction:"DELETE",listIndex:e-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}insert(e,t,n,r){const{instruction:s,actionPayload:a={content:{}},displayPropertPayload:o={}}=Zn.execute(this.target,t,e,this.pageReference),{isDefault:i=!1}=r;if(this.initChangeList(t-1),!i){const n=this.changeList?.[this.targetPageReference]?.[t-1].content;this.changeList[this.targetPageReference][t-1]=gh(Eh.deepClone(n),e,r)}this.insertNode(s),n||(a.content={...a.content,...o},sh(og({...a,listIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))),i&&(this.current.automatic=!0)}replacePage(e){const t=sr.execute(this.contextName,this.target,e,this.pageReference);this.insertNode(t)}deletePage(){const e=ar.execute(this.target,this.pageReference);this.insertNode(e)}move(e,t){const n=this.changeList[this.targetPageReference]?.splice(e-1,1);this.changeList[this.targetPageReference]?.splice(t-1,0,n[0]);const r=rr.execute(this.target,e,t,this.pageReference);this.insertNode(r),sh(og({listIndex:e-1,listMoveToIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,instruction:"MOVE"}))}deleteAll(e){const t=nr.getDeleteAllInstruction(this.pageReference,this.target);this.changeList[this.targetPageReference]=[],this.insertNode(t),nr.execute(this.contextName,this.target,this.pageReference,e)}updatePage(e){const t=this.current.instruction.content;this.current.instruction.content=gh(Eh.deepClone(t),e)}},cr={},lr={},ur={},dr=(e,t,n)=>{const r=e.getContextName();cr[r]||(cr[r]={}),cr[r][t]||(cr[r][t]={content:[]}),lr[r]||(lr[r]=[],ur[r]=[]),Kc.isStateMachineExist(r,n,t)||Kc.setStateMachine(r,t,n,new ir(t,n,r))},pr=e=>Vn.formatPageReference(e),hr=(e,t)=>{const n=lr[e],r=ur[e],s=Jc(t),a=s?.substring(0,s.indexOf("["));r?.indexOf(a)<0&&ur[e].push(a),n?.indexOf(s)<0&&lr[e].push(s)},gr=e=>{delete lr[e]},fr=e=>Kc.buildPageInstructionsByContext(e),mr=e=>Kc.buildPageInstructionsByContext(e,!0),yr=e=>{Kc.clearStateMachines(e),delete cr[e]},Ir=(e,t,n,r)=>{let[,s]=t.split(`${e}[${r}]`);""!==s&&void 0!==s&&(s=s.startsWith(".")?s.substring(1):s,Object.keys(n).forEach((e=>{n[`${s}.${e}`]=n[e],delete n[e]})))},Er=(e,t,n,r,s)=>{const{skipStateUpdate:a=!1}=s||{},o=n.getContextName(),i=n.getReferenceList(),c=r||n.getPageReference(),l=pr(i);dr(n,l,c),hr(o,`${i}[${t}]`),Ir(i,c,e,t);const u={instruction:j.LIST_ACTIONS.INSERT,content:{...Eh.unflatten(e)}};delete JSON.parse(JSON.stringify(u)).content.classID;Kc.getStateMachine(o,c,l).insert(e,t+1,a,{})},Ar=(e,t,n=0,r={})=>{const{skipStateUpdate:s=!0,pageRef:a}=r,o=t.getContextName();let i=t.getReferenceList();const c=a||t.getPageReference();i||(i=((e,t)=>{const n=e.indexOf(F.CONTENT)+F.CONTENT.length,r=e.lastIndexOf(`[${t}]`);return e.substring(n,r)})(c,n));const l=pr(i);dr(t,l,c),hr(o,`${i}[${n}]`),Ir(i,c,e,n);Kc.getStateMachine(o,c,l).update(e,n+1,s,r)},_r=(e,t)=>{const[,n]=e.split("."),r=t?.split(".").pop();return n===r},Sr=(e,t,n)=>{const r={};return Object.values(e).forEach((e=>{if(_r(e,n)){const n=Eh.getPropertyName(e),s=n.substr(n.indexOf(".")+1).split(".");if(s.length>1){let e=Eh.getIn(t,s)??"";if(!e){const n=`!P!${s.join(":")}`;e=Eh.getIn(t,n)??""}Eh.setIn(r,s,e)}else{const e=Eh.getIn(t,s)??"";r[s[s.length-1]]=e}}})),r},Cr=(e,t,n,r,s)=>{const a=e.getValue(t)||{};n&&Object.keys(a).length>0&&e.clearErrorMessages({property:r?s:e.getStateProps().value})},Tr=(e,t,n)=>new Promise((r=>{const{skipPageInstructions:s=!1}=n,{selectionMode:a,selectionList:o,required:i}=t.getConfigProps(),c=a===j.LIST_SELECTION_MODE.MULTI,l=t.getContextName();let u=t.getPageReference(),d=((e,t,n)=>e?n.substring(1):t.substring(t.lastIndexOf(".")+1))(c,u,o);const p=t.getRawMetadata();let h=null;const g=(e=>e?.config?.dataRelationshipContext&&"SimpleTableSelect"===e.type&&"single"===e.config?.selectionMode)(p);g&&(d=p?.config?.dataRelationshipContext,h=u.concat(".").concat(d),u=h);const f=((e,t,n)=>e?`${t}${n}`:t)(c,u,o),m=((e,t,n,r)=>t?e.getFieldMetadata(`${n}`):e.getCurrentPageFieldMetadata(r))(t,c,d,h),{datasource:{parameters:y={}}}=m,I={...y};if(((e,t,n)=>{t?.descriptors?.length&&!n&&t.descriptors.forEach((t=>{const n=Eh.getPropertyName(t),r=n.substr(n.indexOf(".")+1).split(".");e[r.join(".")]=t}))})(I,m,c),c){let n=o;n=pr(n);const r=t.getValue(f)||[];dr(t,n,u);const a=[];let i=r.length;e.forEach((e=>{const t=Sr(y,e,d),o={};if(Object.prototype.hasOwnProperty.call(e,"displayProperty")){const t=e.displayProperty;o[t]=e[t]}const c=Object.entries(t);let p=r.findIndex((e=>c.every((([t,n])=>e[t]===n))));if(-1===p?(p=i,e.$selected&&(i+=1)):i=i?i-1:0,!s){const r=Kc.getStateMachine(l,u,n);e.$selected?r.insert(t,p+1,!0,{}):r.delete(p+1,!0)}a.push({instruction:e.$selected?j.LIST_ACTIONS.SELECT:j.LIST_ACTIONS.DESELECT,listIndex:p,content:{...t,...o}})})),sh(og({instruction:j.LIST_ACTIONS_TYPE.SELECT_DESELECT,context:l,referenceList:`${u}.${d}`,actions:a}))}else{const n=Sr(I,e[0],d),r=(e=>e.length>1?e.pop():"")(u.split(/\[\d+\]/gm));Object.keys(n).forEach((e=>{t.getActionsApi().updateFieldValue(`.${e}`,n[`${e}`],g?{contextPageReference:u}:{})})),t.getActionsApi().triggerFieldChange(r,n)}Cr(t,f,i,c,d),r()})),Nr=e=>{if(!e)return!1;const t=mr(e);return Array.isArray(t)&&t.length>0};const Pr=(e,t,n)=>{const{skipStateUpdate:r=!1}=n,s=e.getPageReference(),a=pr(t);dr(e,t,s);Kc.getStateMachine(e.getContextName(),s,a).deleteAll(r)},Dr=e=>({insert:(t,n,r,s)=>Er(t,n,e,r,s),update:(t,n,r)=>Ar(t,e,n,r),updateProperty:(t,n,r)=>((e,t,n,r)=>{const s=n.getPageReference(),{stateMachineTarget:a}=Kc.getStateMachineObjByPath(`${s}${e}`,n.getContextName(),!0);if(!a){let e=s.substring(0,s.lastIndexOf("["));const t=e.substring(e.lastIndexOf("."));e=e.substring(0,e.lastIndexOf(".")),e&&t&&dr(n,t,e)}Kc.executeStateMachine(n.getContextName(),`${s}${e}`,t,!0,r)})(t,n,e,r),deleteEntry:(t,n)=>((e,t,n)=>{const r=t.getContextName(),s=t.getReferenceList(),a=n||t.getPageReference(),o=`${a+s}[${e}]`,i=pr(s);qn({type:F.MESSAGES.MESSAGES_TYPE_ERROR,pageReference:o,context:r,isListEntry:!0,deletingIndex:e}),dr(t,i,a),hr(r,`${s}[${e}]`),Kc.getStateMachine(r,a,i).delete(e+1);const c=Kc.getUnConnectedStateMachines(r)||{};Object.keys(c).forEach((e=>{e.includes(`${a}${i}`)&&(c[e]=null)}))})(t,e,n),reorder:(t,n)=>((e,t,n)=>{const r=n.getContextName(),s=n.getReferenceList(),a=n.getPageReference(),o=pr(s);dr(n,o,a),hr(r,`${s}[${t}]`),Kc.getStateMachine(r,a,o).move(e+1,t+1)})(t,n,e),setSelectedRows:(t,n={skipPageInstructions:!1})=>Tr(t,e,n),getSelectedRows:(t=!1)=>((e,t)=>{const{selectionMode:n,selectionList:r}=t.getConfigProps(),s=[];let a=t.getPageReference();const o=n===j.LIST_SELECTION_MODE.MULTI;let i=o?r.substring(1):a.substring(a.lastIndexOf(".")+1);const c=t.getRawMetadata();let l=null;c?.config?.dataRelationshipContext&&"SimpleTableSelect"===c.type&&"single"===c.config?.selectionMode&&(i=c.config.dataRelationshipContext,l=a.concat(".").concat(i),a=l);const u=o?`${a}${r}`:a;let d=t.getValue(u)||[];if(Array.isArray(d)||(d=[d]),e)return Promise.resolve(d);const{datasource:{parameters:p={}}={}}=o?t.getFieldMetadata(`${i}`):t.getCurrentPageFieldMetadata(l);return d.forEach((e=>{const t=Object.values(p).reduce(((t,n)=>{const r=n.substring(n.lastIndexOf(".")+1);return _r(n,i)&&e[r]?`${t}${e[r]}`:t}),"");t.trim()&&s.push(t.trim())})),Promise.resolve(s)})(t,e),clearSelectedRows:()=>function(e){const{selectionList:t,required:n}=e.getConfigProps(),r=e.getContextName(),s=e.getPageReference(),a=t,o=`${s}${t}`;return new Promise((t=>{let i=a;i=pr(i),dr(e,i,s),Kc.getStateMachine(r,s,i).deleteAll(),Cr(e,o,n,!0,a),t()}))}(e),setVisibility:t=>((e,t=!0)=>{const n=e.getContextName(),{selectionMode:r,selectionList:s,renderMode:a,referenceList:o}=e.getComponentConfig();let i;if(r===j.LIST_SELECTION_MODE.MULTI&&s?i=s:"Editable"===a&&o&&(i=e.getStateProps().referenceList),i){i=pr(i);const r=Kc.getStateMachine(n,"",`${e.getPageReference()}${i}`);r&&(r.visibility=t)}})(e,t),initDefaultPageInstructions:(t,n,r)=>((e,t,n,r)=>{const s=e.getContextName(),a=e.getPageReference(),o=pr(t);dr(e,o,a),Kc.getStateMachine(s,a,o).initPageInstructions(e,n,r)})(e,t,n,r),deleteAll:(t,n={})=>Pr(e,t,n),replacePage:(t,n)=>((e,t,n)=>{const r=e.getPageReference(),s=e.getContextName();dr(e,t,r),hr(s,Eh.buildInstructionPageReference(r,t)),Kc.getStateMachine(s,r,t).replacePage(n)})(e,t,n),deletePage:t=>((e,t)=>{const n=e.getPageReference(),r=e.getContextName();dr(e,t,n),hr(r,Eh.buildInstructionPageReference(n,t)),Kc.getStateMachine(r,n,t).deletePage()})(e,t)});const Rr=new class{constructor(){this.fieldDefaults={}}updateFieldDefaults(e){e&&(Object.keys(this.fieldDefaults).length?Eh.mergeDeep(e,this.fieldDefaults):Eh.copy(e,this.fieldDefaults))}setFieldDefault(e,t,n){e&&t&&(this.fieldDefaults[e]=this.fieldDefaults[e]||{},this.fieldDefaults[e][t]=n)}getDefaultsforType(e){return this.fieldDefaults[e]}};class br{constructor(){this.validators={}}register(e,t){this.validators[e]=t}getValidator(e){return this.validators[e]}validateRequired(e,t,n,r,s,a){const{required:o,value:i}=a;let c=null;if(!("true"!==o&&!0!==o)){let o=r;switch(e){case"radiobuttons":o=i;break;case"attachment":{const e=n?.replace(F.CASE_INFO.CASE_INFO_CONTENT,"").replace(F.DATA_INFO.DATA_INFO_CONTENT,"");o=(ch(`.attachmentsList${e}.${t?.replace(".","")}`,"context_data",s)||[]).filter((e=>!e.delete)),0===o?.length&&(o="");break}case"checkbox":o&&"false"!==o||(o="");break;default:"string"==typeof o&&(o=o.trim())}c=this.getValidator("required")(o),br.messageDispatcher(t,n,s,c,Vn.getFieldLabel(a))}return c}validateType(e,t,n,r,s,a){let o=null;const i={pageReference:n,context:s,property:t,target:a?.target,required:a?.required};let c=Rr.getDefaultsforType(a?.componentName)?.["client-validations"];!1!==c&&e&&this.getValidator(e)&&(o=this.getValidator(e)(r,i),""!==r&&br.messageDispatcher(t,n,s,o,a?.label));const l=a?.validationType;return c=l&&Rr.getDefaultsforType(l)?.["client-validations"],!1!==c&&l&&this.getValidator(l)&&(o=this.getValidator(l)(r,i),br.messageDispatcher(t,n,s,o,a?.label)),o}validate(e,t,n,r={}){const{context:s,disabled:a,readOnly:o,pageReference:i,skipRequiredValidation:c}=r;let l=null;return a||o||(c||(l=this.validateRequired(e,t,i,n,s,r)),l||(l=this.validateType(e,t,i,n,s,r))),{message:l}}static messageDispatcher(e,t,n,r,s){if(r){const a=[];a.push({type:F.MESSAGES.MESSAGES_TYPE_ERROR,fieldLabel:s,message:r}),zn({messages:a,property:e,pageReference:t,context:n})}}isValidatorExist(e){return!!e.validatetype}}const Or=new br,vr=(e,t)=>{e.DeclareExpressions&&zt({[t.context]:e.DeclareExpressions})},xr=(e,t,n=!1)=>{const r=Eh.getIn(e,j.RESOURCES);r&&((e=>{e&&Lp(e)})(r),vr(r,t)),n||Rg({...e,options:t})},wr="text/javascript";const Mr=new class{constructor(){this.loaderObj={},this.staticServerURL="",this.appStaticUrl=null,this.pegaOnlyUrl=!1,this.loadedAssets={},this.componentsConfig=null,this.appAlias="",this.b2sJWT=null,this.ccV2LibId="",this.imageBlobUrlCache={}}getTypes={SCRIPT:"script",STYLE:"link"};getStaticServerUrl(){return this.staticServerURL}setCCV2LibId(e){this.ccV2LibId=e}getCCV2LibId(){return this.ccV2LibId}async getThemeSchemaJSON(){const e=`${this.staticServerURL}themeOverrides.schema.json`;return fetch(e).then((e=>e.json()))}getConstellationServiceUrl(){return this.staticServerURL?.endsWith("/")?this.staticServerURL.substring(0,this.staticServerURL.length-1):this.staticServerURL}setAppAlias(e){this.appAlias=e}getAppAlias(){return this.appAlias}async getSvcComponentsConfig(e,t={}){let n="",r=0;return e.forEach((e=>{n+=`${0===r?"?":"&"}field${r}=${e.field}&value${r}=${e.value}`,r+=1})),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,n,t):this.getSvcComponentsConfigCombinedUrl(e,n,t)}async getSvcComponentsConfigSeparatedUrls(e,t,n){const r=cp.getBuiltOnAppNames(),s=this.loadAndFilterPegaComponentsConfig(e,r);let a=Promise.resolve([]);!0!==n.skipLoadCustomerComponents&&(a=this.loadAndCustomerComponentsConfig(t));const o=this.fetchSDKComponent(t),i=[];if(await Promise.all([s,a,o]).then((e=>{const t=this.mergeComponentList(e);i.push(...t)})),n.alternateDesignSystemURL&&1===i.length){const r=await this.getSvcComponentsConfigADS(e,t,n);i[0].alternateDesignSystemConfig=r}return{data:{components:i}}}mergeComponentList=e=>{const[t=[],n=[],r=[]]=e,s=[...t,...n];return this.appStaticUrl?s.map((e=>{const{name:t,type:n,subtype:s}=e,a=r.reduce(((e,r)=>(t===r.name&&n===r.type&&s===r.subtype&&(e=r),e)),{});return Object.keys(a).length>0?{...e,alternateDesignSystemConfig:{...a}}:e})):s};async fetchSDKComponent(e){if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const t=`${this.appStaticUrl}v102/${this.appAlias}/componentslist-ext${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}return Promise.resolve([])}async loadAndFilterPegaComponentsConfig(e,t){return this.loadPegaComponentsConfig().then((()=>{const n=[];return this.componentsConfig&&this.componentsConfig.forEach((r=>{let s=!0;e.forEach((e=>{Array.isArray(r[e.field])?r[e.field].includes(e.value)||(s=!1):r[e.field]!==e.value&&(s=!1)})),s&&this.checkForBuiltOnSupport(t,r.allowedApplications)&&n.push(r)})),n}))}async loadPegaComponentsConfig(){let e=null;if(null===this.componentsConfig){const t=`${this.staticServerURL}components/componentsconfig.json?v=${(new Date).getTime()}`;e=fetch(t,{method:"GET"}).then((e=>e.json())).then((async e=>{this.componentsConfig=e,this.ccV2LibId&&await this.loadLibraryComponentsConfig(this.ccV2LibId).then((e=>{e&&e.length>0&&(this.componentsConfig=(this.componentsConfig||[]).concat(e))})).catch((e=>{console.error(`Exception while appending custom component config from library ${this.ccV2LibId} : ${e}`)}))})).catch()}else e=Promise.resolve();return e}async loadLibraryComponentsConfig(e){let t=null;return t=fetch(`${this.appStaticUrl}v100/componentlib/componentsconfig/${e}?v=${Date.now()}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>{if(!e.ok)throw console.error("Error while fetching custom component config/library component config"),new Error(e.statusText);return e})).then((e=>e.json())).then((e=>Promise.resolve(e))).catch((t=>(console.error(`Exception while fetching custom component config from library ${e} : ${t}`),{error:t.message}))),t}async loadAndCustomerComponentsConfig(e){let t=null;if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const n=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;t=fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}else t=Promise.resolve([]);return t}checkForBuiltOnSupport(e,t){if(!e||!t||0===e.length||0===t.length)return!0;const n=e.split(",");return 0===n.length||n.some((function(e){return-1!==t.indexOf(e)}))}async getSvcComponentsConfigCombinedUrl(e,t,n){const r=`${this.staticServerURL}v102/${this.appAlias}/componentslist${t}`,s=await fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>({data:e})));if(!0===n.skipLoadCustomerComponents&&s?.data?.components?.length>0&&(s.data.components=s.data.components.filter((e=>void 0===e.componentKey))),n.alternateDesignSystemURL&&1===s?.data?.components?.length){const r=await this.getSvcComponentsConfigADS(e,t,n);s.data.components[0].alternateDesignSystemConfig=r}return s}getSvcComponentsConfigADS(e,t,n){const r=`${n.alternateDesignSystemURL}${n.alternateDesignSystemURL?.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(r,{method:"GET"}).then((e=>{if(e.ok)return e.json();throw new Error(e.statusText)})).catch((e=>({error:e.message})))}getSvcImage(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).catch()}getSvcImageUrl(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return void 0===this.imageBlobUrlCache[t]&&(this.imageBlobUrlCache[t]=fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).then((e=>window.URL.createObjectURL(e))).catch()),this.imageBlobUrlCache[t]}getSvcLocale(e,t){const n=`${this.appStaticUrl}v102/${this.appAlias}/locales/${e}/${t}`;return fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}})}getSvcComponent(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>{if(!e.ok)throw Error(e.statusText);return e})).then((e=>e.text())).then((e=>e)).catch()}async importCustomComponentMap(e){fetch(`${this.appStaticUrl}v100/componentlib/componentsmap/${e}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>(e.ok||console.error("Error while fetching custom component map"),e))).then((e=>e.text())).then((t=>{this.setCCV2LibId(e);const n=document.createElement("script");n.src=window.URL.createObjectURL(new Blob([t],{type:wr})),n.onload=()=>console.log("Custom component lib map loaded"),n.onerror=()=>console.error("Error while appending custom component map"),document.head.appendChild(n)})).catch((e=>{console.error("Exception while appending custom component map : "),console.error(e)}))}loadSvcComponent(e){return new Promise(((t,n)=>{this.getSvcComponent(e).then((r=>{const s=document.createElement("script");s.src=window.URL.createObjectURL(new Blob([r],{type:wr})),s.onload=()=>t(e),s.onerror=()=>n(e),document.head.appendChild(s)})).catch((()=>{n(e)}))}))}initServer(e,t,n){console.log(`asset-loader.initServer(${e}, ${t})`),this.appStaticUrl=null,this.staticServerURL=null,this.pegaOnlyUrl=!1,this.componentsConfig=null,e&&t&&"no-appstatic"!==t&&"no-cdn"!==t?(this.appStaticUrl=t.endsWith("/")?t:`${t}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0):e&&t&&"no-appstatic"===t?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0):e&&t&&"no-cdn"===t&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL),console.log(`asset-loader.initServer() staticServerURL=${this.staticServerURL}, appStaticUrl=${this.appStaticUrl}, pegaOnlyUrl=${this.pegaOnlyUrl})`),this.b2sJWT=n}register(e,t){this.loaderObj[e]=t}getLoader(e){let t;const n=(e,t)=>new Promise(((n,r)=>{const s=document.createElement(t);"script"===t?(s.onload=()=>{n(e)},s.onerror=()=>{r(e)},s.type=wr,s.charset="UTF-8",s.async=!1,s.src=e):(s.type="text/css",s.rel="stylesheet",s.href=e),document.head.appendChild(s)})).catch((e=>{console.log(e)}));return t=e?this.loaderObj[e]:n,t}loadAssets(e,t){const{isDevServerMode:n}=t;if(!e)return Promise.resolve();const r=[];return e.forEach((e=>{const t=Object.keys(e)[0];let s=n?Object.values(e)[0]:this.getStaticServerUrl();s=s.endsWith("/")?s:`${s}/`,this.loadedAssets[t]||(t.includes(".js")?r.push(this.getLoader()(s+t,this.getTypes.SCRIPT)):t.includes(".css")&&this.getLoader()(s+t,this.getTypes.STYLE),this.loadedAssets[t]=!0)})),Promise.all(r)}getAssetsFromIsolations(e){const t=this.b2sJWT?.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")||"",n=decodeURIComponent(s.g.atob(t).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")),r=JSON.parse(n),a=r?.tenant_id,{restApi:o,reqType:i}=Ag("getAssetsFromIsolations",{isolationID:a,assetPath:e})||{},c=`${this.appStaticUrl}${o}`;return fetch(c,{method:i,credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob()))}},Lr="component-loader",Ur={},Fr=async(e,t)=>{const n=Mr.getLoader(),r=t||Mr.staticServerURL;if(!e||window.PCore&&!1===window.PCore.getBehaviorOverride("dynamicLoadComponents"))return Promise.resolve();if(Mr.getLoader(Lr))return Mr.getLoader(Lr)(e,r);const s=[];return e.forEach((e=>{if(Ur[e])return;const t=Xt.getComponent(e);if(!t){const t=`${Mr.getConstellationServiceUrl()}/v860/${Mr.getAppAlias()}/component/${e}.js`;return void s.push(n(t,Mr.getTypes.SCRIPT))}(t.scripts||[]).forEach((e=>{const t=e.startsWith("http")?e:r+e;s.push(n(t,Mr.getTypes.SCRIPT))}));(t.styles||[]).forEach((e=>{s.push(n(r+e,Mr.getTypes.STYLE))})),Ur[e]=!0})),Promise.all(s)};class jr{static actionsTargetMap=new Map;static getTargetViewContainerName=e=>{if(e){const t=e.toLowerCase();let n="primary";return this.actionsTargetMap.has(t)&&(n=this.actionsTargetMap.get(t)),n}return""};static buildActionTargetMap=e=>{e&&Object.keys(e).forEach((t=>{const n=e[t];n&&n.actions&&n.actions.forEach((e=>{this.actionsTargetMap.set(e.toLowerCase(),t)}))}))}}const Vr=jr;const kr=class{constructor(e,t,n,r){this.eventType=e,this.callback=n,this.contextName=r,this.id=t}};const $r=new class{constructor(){this.subscribers={}}publish(e,t){this.subscribers[e]?.forEach((e=>{e.callback(t)}))}unsubscribe(e,t,n){const r=this.subscribers[e]||[];let s=0,a=-1;r.forEach((e=>{e.id===t&&e.contextName===n&&(a=s),s+=1})),r.splice(a,1)}unsubscribeAllWithEventType(e){this.subscribers[e]=[]}subscribe(e,t,n,r,s){this.subscribers[e]=this.subscribers[e]||[];let a=!1;if(s&&this.subscribers[e].forEach((e=>{a=e.id===t&&e.contextName===r})),!a){const s=new kr(e,t,n,r);this.subscribers[e].push(s)}}clearContext(e){const t=this.subscribers;Object.keys(t).forEach((t=>{const n=this.subscribers[t],r=[];n.forEach((t=>{t.contextName!==e&&r.push(t)})),this.subscribers[t]=r}))}};const Br=class{static subscribe(e,t,n,r=!1,s="app"){$r.subscribe(e,n,t,s,r)}static subscribeOnce(e,t,n){this.subscribe(e,t,n,!0)}static publish(e,t){$r.publish(e,t)}static unsubscribe(e,t,n="app"){$r.unsubscribe(e,t,n)}static unsubscribeAllWithEventType(e){$r.unsubscribeAllWithEventType(e)}static cleanContextSubscribers(e){$r.clearContext(e)}},Gr=e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,e)},Wr={CASE_INFO:`${j.DATA}.${j.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${j.DATA}.${j.CASE_INFO.CASE_TYPE_ID}`,NEXT_ASSIGNMENT_INFO_ID:`${j.DATA}.${j.NEXT_ASSIGNMENT_INFO_ID}`,ASSIGNMENTS:`${j.DATA}.${j.CASE_INFO.ASSIGNMENTS}`,CASE_INFO_ID:`${j.DATA}.${j.CASE_INFO.CASE_INFO_ID}`,CASE_FIRST_FLOW_ACTION_NAME:`${j.DATA}.${j.CASE_INFO.ASSIGNMENTACTION_ID}`,CASE_FIRST_ASSIGNMENT_ID:`${j.DATA}.${j.CASE_INFO.ASSIGNMENT_ID}`},Hr=(e,t)=>{const{vcName:n,containerName:r}=t;return r||n||Vr.getTargetViewContainerName(e)},qr=e=>{const t=e.lastIndexOf(j.FORWARD_SLASH_STRING)+1,n=e.lastIndexOf(j.UNDERSCORE_STRING);return e.substring(t,n)},zr=e=>e===td.WORKAREA,Yr=e=>e===td.MODAL,Kr=e=>e===Ee,Xr=e=>e&&e.find((e=>e.type===Ee)),Jr=e=>Eh.getIn(e,Wr.CASE_INFO,{}),Qr=e=>e?e.split(" ").pop():void 0,Zr=e=>Eh.getIn(e,Wr.CASE_CLASS_NAME,j.EMPTY_STRING),es=e=>{const t=Jr(e);return Zt(t)&&en(cp.getOperatorIdentifier(),t)},ts=e=>Eh.getIn(e,Wr.CASE_INFO_ID,j.EMPTY_STRING),ns=e=>Eh.getIn(e,Wr.CASE_FIRST_ASSIGNMENT_ID,j.EMPTY_STRING),rs=(e,t)=>{const{removeActionPayload:n,target:r}=t;if(n&&n.containerItemID){const{containerItemID:t,context:s}=n;e.push(ng(Kh,{containerItemID:t,context:s||fd(t),target:r}))}},ss=e=>{const t=rh();if(!e)return!1;const n=W(e),r=Od(n),s=Od(e);if(!r||!s)return!1;const a=sd(r,n),o=sd(s,e);if(!a||!o)return!1;const{key:i}=a||{};let{key:c}=o||{};return c||(c=t?.getState().data?.[e]?.caseInfo?.ID),i&&c&&i===c},as=(e,t,n={})=>{const{skipFlowNameUpdate:r}=n,s=ts(t);Eh.setIn(e,"key",s);const a=Zt(Jr(t));if(!r&&(e=>{const t=Eh.getIn(e,Wr.ASSIGNMENTS,[]);return t&&t.length>0})(t)){const n=ns(t),[,r]=n.split("!");(e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CURRENT_ASSIGNMENT_UPDATED,e)})({assignmentID:n,isInCreateStage:a}),Eh.setIn(e,"flowName",r)}},os=(e,t)=>{const{attachmentsExist:n}=t;n&&Eh.setIn(e,F.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),Eh.setIn(e,F.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())},is=(e,t,n)=>{let r=j.PROMISE_VALUE.RESOLVE;return Xr(e)?(r=j.PROMISE_VALUE.REJECT,n?ln.rejectActionByID(t,!0,n):ln.rejectActionByID(t)):ln.resolveActionByID(t),r},cs=e=>{const t=cp.getCaseTypeList();return"true"===t.filter((t=>t.pyWorkTypeImplementationClassName===e))?.[0]?.pyIsTraditionalUICase},ls=()=>"true"===cp?.environmentInfoObject?.pxMashupDetails?.pyLaunchCaseInModal,us=(e,t)=>{const n=Zr(e?.response),r=Jr(e?.response),{caseTypeID:s}=r,a=cp.getFeatureMap();(a?.deferUpdateCaseSummaryView??!Object.hasOwn(a,j.DEFER_UPDATE_CASESUMMARY_VIEW))&&s&&Fp(j.CASESUMMARY_VIEW_NAME,s)&&((e,t,n)=>{const{containerItemID:r,caseID:s}=t;if(r){const{caseClassName:a}=n,o=W(r),i=Od(o),c=i&&rd(i),l=i&&pd(i),u=Y(o);l&&c?.items?.[l]?.key===t?.caseID&&e.push(ng(vh,{containerItemID:o,context:o,container:u,containerName:u,caseId:s,viewName:F.CASESUMMARY_VIEW_NAME,updateData:!0,viewLoadingContainer:{context:o},caseClassName:a}))}})(t,e?.actionInPayload,{caseClassName:n})};function ds(e,t){return function(){return e.apply(t,arguments)}}const{toString:ps}=Object.prototype,{getPrototypeOf:hs}=Object,gs=(fs=Object.create(null),e=>{const t=ps.call(e);return fs[t]||(fs[t]=t.slice(8,-1).toLowerCase())});var fs;const ms=e=>(e=e.toLowerCase(),t=>gs(t)===e),ys=e=>t=>typeof t===e,{isArray:Is}=Array,Es=ys("undefined");const As=ms("ArrayBuffer");const _s=ys("string"),Ss=ys("function"),Cs=ys("number"),Ts=e=>null!==e&&"object"==typeof e,Ns=e=>{if("object"!==gs(e))return!1;const t=hs(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Ps=ms("Date"),Ds=ms("File"),Rs=ms("Blob"),bs=ms("FileList"),Os=ms("URLSearchParams"),[vs,xs,ws,Ms]=["ReadableStream","Request","Response","Headers"].map(ms);function Ls(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,s;if("object"!=typeof e&&(e=[e]),Is(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let o;for(r=0;r<a;r++)o=s[r],t.call(null,e[o],o,e)}}function Us(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,s=n.length;for(;s-- >0;)if(r=n[s],t===r.toLowerCase())return r;return null}const Fs="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,js=e=>!Es(e)&&e!==Fs;const Vs=(ks="undefined"!=typeof Uint8Array&&hs(Uint8Array),e=>ks&&e instanceof ks);var ks;const $s=ms("HTMLFormElement"),Bs=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Gs=ms("RegExp"),Ws=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ls(n,((n,s)=>{let a;!1!==(a=t(n,s,e))&&(r[s]=a||n)})),Object.defineProperties(e,r)},Hs="abcdefghijklmnopqrstuvwxyz",qs="0123456789",zs={DIGIT:qs,ALPHA:Hs,ALPHA_DIGIT:Hs+Hs.toUpperCase()+qs};const Ys=ms("AsyncFunction"),Ks=(Xs="function"==typeof setImmediate,Js=Ss(Fs.postMessage),Xs?setImmediate:Js?(Qs=`axios@${Math.random()}`,Zs=[],Fs.addEventListener("message",(({source:e,data:t})=>{e===Fs&&t===Qs&&Zs.length&&Zs.shift()()}),!1),e=>{Zs.push(e),Fs.postMessage(Qs,"*")}):e=>setTimeout(e));var Xs,Js,Qs,Zs;const ea="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Fs):"undefined"!=typeof process&&process.nextTick||Ks,ta={isArray:Is,isArrayBuffer:As,isBuffer:function(e){return null!==e&&!Es(e)&&null!==e.constructor&&!Es(e.constructor)&&Ss(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Ss(e.append)&&("formdata"===(t=gs(e))||"object"===t&&Ss(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&As(e.buffer),t},isString:_s,isNumber:Cs,isBoolean:e=>!0===e||!1===e,isObject:Ts,isPlainObject:Ns,isReadableStream:vs,isRequest:xs,isResponse:ws,isHeaders:Ms,isUndefined:Es,isDate:Ps,isFile:Ds,isBlob:Rs,isRegExp:Gs,isFunction:Ss,isStream:e=>Ts(e)&&Ss(e.pipe),isURLSearchParams:Os,isTypedArray:Vs,isFileList:bs,forEach:Ls,merge:function e(){const{caseless:t}=js(this)&&this||{},n={},r=(r,s)=>{const a=t&&Us(n,s)||s;Ns(n[a])&&Ns(r)?n[a]=e(n[a],r):Ns(r)?n[a]=e({},r):Is(r)?n[a]=r.slice():n[a]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Ls(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(Ls(t,((t,r)=>{n&&Ss(t)?e[r]=ds(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let s,a,o;const i={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)o=s[a],r&&!r(o,e,t)||i[o]||(t[o]=e[o],i[o]=!0);e=!1!==n&&hs(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:gs,kindOfTest:ms,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Is(e))return e;let t=e.length;if(!Cs(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:$s,hasOwnProperty:Bs,hasOwnProp:Bs,reduceDescriptors:Ws,freezeMethods:e=>{Ws(e,((t,n)=>{if(Ss(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];Ss(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return Is(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Us,global:Fs,isContextDefined:js,ALPHABET:zs,generateString:(e=16,t=zs.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&Ss(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Ts(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const s=Is(e)?[]:{};return Ls(e,((e,t)=>{const a=n(e,r+1);!Es(a)&&(s[t]=a)})),t[r]=void 0,s}}return e};return n(e,0)},isAsyncFn:Ys,isThenable:e=>e&&(Ts(e)||Ss(e))&&Ss(e.then)&&Ss(e.catch),setImmediate:Ks,asap:ea};function na(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}ta.inherits(na,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ta.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ra=na.prototype,sa={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{sa[e]={value:e}})),Object.defineProperties(na,sa),Object.defineProperty(ra,"isAxiosError",{value:!0}),na.from=(e,t,n,r,s,a)=>{const o=Object.create(ra);return ta.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),na.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};const aa=na;function oa(e){return ta.isPlainObject(e)||ta.isArray(e)}function ia(e){return ta.endsWith(e,"[]")?e.slice(0,-2):e}function ca(e,t,n){return e?e.concat(t).map((function(e,t){return e=ia(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const la=ta.toFlatObject(ta,{},null,(function(e){return/^is[A-Z]/.test(e)}));const ua=function(e,t,n){if(!ta.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=ta.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!ta.isUndefined(t[e])}))).metaTokens,s=n.visitor||l,a=n.dots,o=n.indexes,i=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ta.isSpecCompliantForm(t);if(!ta.isFunction(s))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(ta.isDate(e))return e.toISOString();if(!i&&ta.isBlob(e))throw new aa("Blob is not supported. Use a Buffer instead.");return ta.isArrayBuffer(e)||ta.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,s){let i=e;if(e&&!s&&"object"==typeof e)if(ta.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(ta.isArray(e)&&function(e){return ta.isArray(e)&&!e.some(oa)}(e)||(ta.isFileList(e)||ta.endsWith(n,"[]"))&&(i=ta.toArray(e)))return n=ia(n),i.forEach((function(e,r){!ta.isUndefined(e)&&null!==e&&t.append(!0===o?ca([n],r,a):null===o?n:n+"[]",c(e))})),!1;return!!oa(e)||(t.append(ca(s,n,a),c(e)),!1)}const u=[],d=Object.assign(la,{defaultVisitor:l,convertValue:c,isVisitable:oa});if(!ta.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!ta.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),ta.forEach(n,(function(n,a){!0===(!(ta.isUndefined(n)||null===n)&&s.call(t,n,ta.isString(a)?a.trim():a,r,d))&&e(n,r?r.concat(a):[a])})),u.pop()}}(e),t};function da(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function pa(e,t){this._pairs=[],e&&ua(e,this,t)}const ha=pa.prototype;ha.append=function(e,t){this._pairs.push([e,t])},ha.toString=function(e){const t=e?function(t){return e.call(this,t,da)}:da;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ga=pa;function fa(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ma(e,t,n){if(!t)return e;const r=n&&n.encode||fa,s=n&&n.serialize;let a;if(a=s?s(t,n):ta.isURLSearchParams(t)?t.toString():new ga(t,n).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}const ya=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ta.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Ia={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ea={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ga,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Aa="undefined"!=typeof window&&"undefined"!=typeof document,_a=(Sa="undefined"!=typeof navigator&&navigator.product,Aa&&["ReactNative","NativeScript","NS"].indexOf(Sa)<0);var Sa;const Ca="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ta=Aa&&window.location.href||"http://localhost",Na={...a,...Ea};const Pa=function(e){function t(e,n,r,s){let a=e[s++];if("__proto__"===a)return!0;const o=Number.isFinite(+a),i=s>=e.length;if(a=!a&&ta.isArray(r)?r.length:a,i)return ta.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!o;r[a]&&ta.isObject(r[a])||(r[a]=[]);return t(e,n,r[a],s)&&ta.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}(r[a])),!o}if(ta.isFormData(e)&&ta.isFunction(e.entries)){const n={};return ta.forEachEntry(e,((e,r)=>{t(function(e){return ta.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const Da={transitional:Ia,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,s=ta.isObject(e);s&&ta.isHTMLForm(e)&&(e=new FormData(e));if(ta.isFormData(e))return r?JSON.stringify(Pa(e)):e;if(ta.isArrayBuffer(e)||ta.isBuffer(e)||ta.isStream(e)||ta.isFile(e)||ta.isBlob(e)||ta.isReadableStream(e))return e;if(ta.isArrayBufferView(e))return e.buffer;if(ta.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ua(e,new Na.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Na.isNode&&ta.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=ta.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ua(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),function(e,t,n){if(ta.isString(e))try{return(t||JSON.parse)(e),ta.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Da.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(ta.isResponse(e)||ta.isReadableStream(e))return e;if(e&&ta.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw aa.from(e,aa.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Na.classes.FormData,Blob:Na.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ta.forEach(["delete","get","head","post","put","patch"],(e=>{Da.headers[e]={}}));const Ra=Da,ba=ta.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Oa=Symbol("internals");function va(e){return e&&String(e).trim().toLowerCase()}function xa(e){return!1===e||null==e?e:ta.isArray(e)?e.map(xa):String(e)}function wa(e,t,n,r,s){return ta.isFunction(r)?r.call(this,t,n):(s&&(t=n),ta.isString(t)?ta.isString(r)?-1!==t.indexOf(r):ta.isRegExp(r)?r.test(t):void 0:void 0)}class Ma{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function s(e,t,n){const s=va(t);if(!s)throw new Error("header name must be a non-empty string");const a=ta.findKey(r,s);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=xa(e))}const a=(e,t)=>ta.forEach(e,((e,n)=>s(e,n,t)));if(ta.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(ta.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,r,s;return e&&e.split("\n").forEach((function(e){s=e.indexOf(":"),n=e.substring(0,s).trim().toLowerCase(),r=e.substring(s+1).trim(),!n||t[n]&&ba[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(ta.isHeaders(e))for(const[t,r]of e.entries())s(r,t,n);else null!=e&&s(t,e,n);return this}get(e,t){if(e=va(e)){const n=ta.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(ta.isFunction(t))return t.call(this,e,n);if(ta.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=va(e)){const n=ta.findKey(this,e);return!(!n||void 0===this[n]||t&&!wa(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function s(e){if(e=va(e)){const s=ta.findKey(n,e);!s||t&&!wa(0,n[s],s,t)||(delete n[s],r=!0)}}return ta.isArray(e)?e.forEach(s):s(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const s=t[n];e&&!wa(0,this[s],s,e,!0)||(delete this[s],r=!0)}return r}normalize(e){const t=this,n={};return ta.forEach(this,((r,s)=>{const a=ta.findKey(n,s);if(a)return t[a]=xa(r),void delete t[s];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(s):String(s).trim();o!==s&&delete t[s],t[o]=xa(r),n[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ta.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&ta.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Oa]=this[Oa]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=va(e);t[r]||(!function(e,t){const n=ta.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,s){return this[r].call(this,t,e,n,s)},configurable:!0})}))}(n,e),t[r]=!0)}return ta.isArray(e)?e.forEach(r):r(e),this}}Ma.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ta.reduceDescriptors(Ma.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),ta.freezeMethods(Ma);const La=Ma;function Ua(e,t){const n=this||Ra,r=t||n,s=La.from(r.headers);let a=r.data;return ta.forEach(e,(function(e){a=e.call(n,a,s.normalize(),t?t.status:void 0)})),s.normalize(),a}function Fa(e){return!(!e||!e.__CANCEL__)}function ja(e,t,n){aa.call(this,null==e?"canceled":e,aa.ERR_CANCELED,t,n),this.name="CanceledError"}ta.inherits(ja,aa,{__CANCEL__:!0});const Va=ja;function ka(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new aa("Request failed with status code "+n.status,[aa.ERR_BAD_REQUEST,aa.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const $a=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s,a=0,o=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),l=r[o];s||(s=c),n[a]=i,r[a]=c;let u=o,d=0;for(;u!==a;)d+=n[u++],u%=e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),c-s<t)return;const p=l&&c-l;return p?Math.round(1e3*d/p):void 0}};const Ba=function(e,t){let n,r,s=0,a=1e3/t;const o=(t,a=Date.now())=>{s=a,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),i=t-s;i>=a?o(e,t):(n=e,r||(r=setTimeout((()=>{r=null,o(n)}),a-i)))},()=>n&&o(n)]},Ga=(e,t,n=3)=>{let r=0;const s=$a(50,250);return Ba((n=>{const a=n.loaded,o=n.lengthComputable?n.total:void 0,i=a-r,c=s(i);r=a;e({loaded:a,total:o,progress:o?a/o:void 0,bytes:i,rate:c||void 0,estimated:c&&o&&a<=o?(o-a)/c:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),n)},Wa=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ha=e=>(...t)=>ta.asap((()=>e(...t))),qa=Na.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=ta.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},za=Na.hasStandardBrowserEnv?{write(e,t,n,r,s,a){const o=[e+"="+encodeURIComponent(t)];ta.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),ta.isString(r)&&o.push("path="+r),ta.isString(s)&&o.push("domain="+s),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ya(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ka=e=>e instanceof La?{...e}:e;function Xa(e,t){t=t||{};const n={};function r(e,t,n){return ta.isPlainObject(e)&&ta.isPlainObject(t)?ta.merge.call({caseless:n},e,t):ta.isPlainObject(t)?ta.merge({},t):ta.isArray(t)?t.slice():t}function s(e,t,n){return ta.isUndefined(t)?ta.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function a(e,t){if(!ta.isUndefined(t))return r(void 0,t)}function o(e,t){return ta.isUndefined(t)?ta.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(n,s,a){return a in t?r(n,s):a in e?r(void 0,n):void 0}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:i,headers:(e,t)=>s(Ka(e),Ka(t),!0)};return ta.forEach(Object.keys(Object.assign({},e,t)),(function(r){const a=c[r]||s,o=a(e[r],t[r],r);ta.isUndefined(o)&&a!==i||(n[r]=o)})),n}const Ja=e=>{const t=Xa({},e);let n,{data:r,withXSRFToken:s,xsrfHeaderName:a,xsrfCookieName:o,headers:i,auth:c}=t;if(t.headers=i=La.from(i),t.url=ma(Ya(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),ta.isFormData(r))if(Na.hasStandardBrowserEnv||Na.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(!1!==(n=i.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}if(Na.hasStandardBrowserEnv&&(s&&ta.isFunction(s)&&(s=s(t)),s||!1!==s&&qa(t.url))){const e=a&&o&&za.read(o);e&&i.set(a,e)}return t},Qa="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Ja(e);let s=r.data;const a=La.from(r.headers).normalize();let o,i,c,l,u,{responseType:d,onUploadProgress:p,onDownloadProgress:h}=r;function g(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let f=new XMLHttpRequest;function m(){if(!f)return;const r=La.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());ka((function(e){t(e),g()}),(function(e){n(e),g()}),{data:d&&"text"!==d&&"json"!==d?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f}),f=null}f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout,"onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(m)},f.onabort=function(){f&&(n(new aa("Request aborted",aa.ECONNABORTED,e,f)),f=null)},f.onerror=function(){n(new aa("Network Error",aa.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||Ia;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new aa(t,s.clarifyTimeoutError?aa.ETIMEDOUT:aa.ECONNABORTED,e,f)),f=null},void 0===s&&a.setContentType(null),"setRequestHeader"in f&&ta.forEach(a.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),ta.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),d&&"json"!==d&&(f.responseType=r.responseType),h&&([c,u]=Ga(h,!0),f.addEventListener("progress",c)),p&&f.upload&&([i,l]=Ga(p),f.upload.addEventListener("progress",i),f.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(o=t=>{f&&(n(!t||t.type?new Va(null,e,f):t),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===Na.protocols.indexOf(y)?n(new aa("Unsupported protocol "+y+":",aa.ERR_BAD_REQUEST,e)):f.send(s||null)}))},Za=(e,t)=>{let n,r=new AbortController;const s=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof aa?t:new Va(t instanceof Error?t.message:t))}};let a=t&&setTimeout((()=>{s(new aa(`timeout ${t} of ms exceeded`,aa.ETIMEDOUT))}),t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach((e=>{e&&(e.removeEventListener?e.removeEventListener("abort",s):e.unsubscribe(s))})),e=null)};e.forEach((e=>e&&e.addEventListener&&e.addEventListener("abort",s)));const{signal:i}=r;return i.unsubscribe=o,[i,()=>{a&&clearTimeout(a),a=null}]},eo=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,s=0;for(;s<n;)r=s+t,yield e.slice(s,r),s=r},to=(e,t,n,r,s)=>{const a=async function*(e,t,n){for await(const r of e)yield*eo(ArrayBuffer.isView(r)?r:await n(String(r)),t)}(e,t,s);let o,i=0,c=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await a.next();if(t)return c(),void e.close();let s=r.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw c(e),e}},cancel:e=>(c(e),a.return())},{highWaterMark:2})},no="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,ro=no&&"function"==typeof ReadableStream,so=no&&("function"==typeof TextEncoder?(ao=new TextEncoder,e=>ao.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var ao;const oo=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},io=ro&&oo((()=>{let e=!1;const t=new Request(Na.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),co=ro&&oo((()=>ta.isReadableStream(new Response("").body))),lo={stream:co&&(e=>e.body)};var uo;no&&(uo=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!lo[e]&&(lo[e]=ta.isFunction(uo[e])?t=>t[e]():(t,n)=>{throw new aa(`Response type '${e}' is not supported`,aa.ERR_NOT_SUPPORT,n)})})));const po=async(e,t)=>{const n=ta.toFiniteNumber(e.getContentLength());return null==n?(async e=>null==e?0:ta.isBlob(e)?e.size:ta.isSpecCompliantForm(e)?(await new Request(e).arrayBuffer()).byteLength:ta.isArrayBufferView(e)||ta.isArrayBuffer(e)?e.byteLength:(ta.isURLSearchParams(e)&&(e+=""),ta.isString(e)?(await so(e)).byteLength:void 0))(t):n},ho=no&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:a,timeout:o,onDownloadProgress:i,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:p}=Ja(e);l=l?(l+"").toLowerCase():"text";let h,g,[f,m]=s||a||o?Za([s,a],o):[];const y=()=>{!h&&setTimeout((()=>{f&&f.unsubscribe()})),h=!0};let I;try{if(c&&io&&"get"!==n&&"head"!==n&&0!==(I=await po(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(ta.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=Wa(I,Ga(Ha(c)));r=to(n.body,65536,e,t,so)}}ta.isString(d)||(d=d?"include":"omit"),g=new Request(t,{...p,signal:f,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:d});let s=await fetch(g);const a=co&&("stream"===l||"response"===l);if(co&&(i||a)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=ta.toFiniteNumber(s.headers.get("content-length")),[n,r]=i&&Wa(t,Ga(Ha(i),!0))||[];s=new Response(to(s.body,65536,n,(()=>{r&&r(),a&&y()}),so),e)}l=l||"text";let o=await lo[ta.findKey(lo,l)||"text"](s,e);return!a&&y(),m&&m(),await new Promise(((t,n)=>{ka(t,n,{data:o,headers:La.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:g})}))}catch(t){if(y(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new aa("Network Error",aa.ERR_NETWORK,e,g),{cause:t.cause||t});throw aa.from(t,t&&t.code,e,g)}}),go={http:null,xhr:Qa,fetch:ho};ta.forEach(go,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const fo=e=>`- ${e}`,mo=e=>ta.isFunction(e)||null===e||!1===e,yo=e=>{e=ta.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let a=0;a<t;a++){let t;if(n=e[a],r=n,!mo(n)&&(r=go[(t=String(n)).toLowerCase()],void 0===r))throw new aa(`Unknown adapter '${t}'`);if(r)break;s[t||"#"+a]=r}if(!r){const e=Object.entries(s).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(fo).join("\n"):" "+fo(e[0]):"as no adapter specified";throw new aa("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function Io(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Va(null,e)}function Eo(e){Io(e),e.headers=La.from(e.headers),e.data=Ua.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return yo(e.adapter||Ra.adapter)(e).then((function(t){return Io(e),t.data=Ua.call(e,e.transformResponse,t),t.headers=La.from(t.headers),t}),(function(t){return Fa(t)||(Io(e),t&&t.response&&(t.response.data=Ua.call(e,e.transformResponse,t.response),t.response.headers=La.from(t.response.headers))),Promise.reject(t)}))}const Ao="1.7.4",_o={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{_o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const So={};_o.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.4] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,s,a)=>{if(!1===e)throw new aa(r(s," has been removed"+(t?" in "+t:"")),aa.ERR_DEPRECATED);return t&&!So[s]&&(So[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,s,a)}};const Co={assertOptions:function(e,t,n){if("object"!=typeof e)throw new aa("options must be an object",aa.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],o=t[a];if(o){const t=e[a],n=void 0===t||o(t,a,e);if(!0!==n)throw new aa("option "+a+" must be "+n,aa.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new aa("Unknown option "+a,aa.ERR_BAD_OPTION)}},validators:_o},To=Co.validators;class No{constructor(e){this.defaults=e,this.interceptors={request:new ya,response:new ya}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Xa(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:s}=t;void 0!==n&&Co.assertOptions(n,{silentJSONParsing:To.transitional(To.boolean),forcedJSONParsing:To.transitional(To.boolean),clarifyTimeoutError:To.transitional(To.boolean)},!1),null!=r&&(ta.isFunction(r)?t.paramsSerializer={serialize:r}:Co.assertOptions(r,{encode:To.function,serialize:To.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=s&&ta.merge(s.common,s[t.method]);s&&ta.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete s[e]})),t.headers=La.concat(a,s);const o=[];let i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,d=0;if(!i){const e=[Eo.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);d<u;)l=l.then(e[d++],e[d++]);return l}u=o.length;let p=t;for(d=0;d<u;){const e=o[d++],t=o[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{l=Eo.call(this,p)}catch(e){return Promise.reject(e)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(e){return ma(Ya((e=Xa(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}ta.forEach(["delete","get","head","options"],(function(e){No.prototype[e]=function(t,n){return this.request(Xa(n||{},{method:e,url:t,data:(n||{}).data}))}})),ta.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,s){return this.request(Xa(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}No.prototype[e]=t(),No.prototype[e+"Form"]=t(!0)}));const Po=No;class Do{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,s){n.reason||(n.reason=new Va(e,r,s),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Do((function(t){e=t})),cancel:e}}}const Ro=Do;const bo={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};Object.entries(bo).forEach((([e,t])=>{bo[t]=e}));const Oo=bo;const vo=function e(t){const n=new Po(t),r=ds(Po.prototype.request,n);return ta.extend(r,Po.prototype,n,{allOwnKeys:!0}),ta.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Xa(t,n))},r}(Ra);vo.Axios=Po,vo.CanceledError=Va,vo.CancelToken=Ro,vo.isCancel=Fa,vo.VERSION=Ao,vo.toFormData=ua,vo.AxiosError=aa,vo.Cancel=vo.CanceledError,vo.all=function(e){return Promise.all(e)},vo.spread=function(e){return function(t){return e.apply(null,t)}},vo.isAxiosError=function(e){return ta.isObject(e)&&!0===e.isAxiosError},vo.mergeConfig=Xa,vo.AxiosHeaders=La,vo.formToJSON=e=>Pa(ta.isHTMLForm(e)?new FormData(e):e),vo.getAdapter=yo,vo.HttpStatusCode=Oo,vo.default=vo;const xo=vo;function wo(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Mo=wo((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));var Lo=function(e,t){return Lo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Lo(e,t)};function Uo(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Lo(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Fo(e,t,n,r){return new(n||(n=Promise))((function(s,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function i(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,i)}c((r=r.apply(e,t||[])).next())}))}function jo(e,t){var n,r,s,a,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,i[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&i[0]?r.return:i[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,i[1])).done)return s;switch(r=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(s=o.trys,(s=s.length>0&&s[s.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){o.label=i[1];break}if(6===i[0]&&o.label<s[1]){o.label=s[1],s=i;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(i);break}s[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}Object.create;function Vo(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ko(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,s,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){s={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(s)throw s.error}}return o}function $o(e,t,n){if(n||2===arguments.length)for(var r,s=0,a=t.length;s<a;s++)!r&&s in t||(r||(r=Array.prototype.slice.call(t,0,s)),r[s]=t[s]);return e.concat(r||Array.prototype.slice.call(t))}function Bo(e){return this instanceof Bo?(this.v=e,this):new Bo(e)}function Go(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,s=n.apply(e,t||[]),a=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(e){s[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||i(e,t)}))})}function i(e,t){try{(n=s[e](t)).value instanceof Bo?Promise.resolve(n.value.v).then(c,l):u(a[0][2],n)}catch(e){u(a[0][3],e)}var n}function c(e){i("next",e)}function l(e){i("throw",e)}function u(e,t){e(t),a.shift(),a.length&&i(a[0][0],a[0][1])}}function Wo(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Vo(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,s){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,s,(t=e[n](t)).done,t.value)}))}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;var Ho=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function qo(e){return"function"==typeof e}function zo(e){return qo(null==e?void 0:e.then)}var Yo=wo((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function Ko(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Xo=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,s;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=Vo(a),i=o.next();!i.done;i=o.next()){i.value.remove(this)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this);var c=this.initialTeardown;if(qo(c))try{c()}catch(e){s=e instanceof Yo?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=Vo(l),d=u.next();!d.done;d=u.next()){var p=d.value;try{Zo(p)}catch(e){s=null!=s?s:[],e instanceof Yo?s=$o($o([],ko(s)),ko(e.errors)):s.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(s)throw new Yo(s)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Zo(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Ko(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&Ko(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),Jo=Xo.EMPTY;function Qo(e){return e instanceof Xo||e&&"closed"in e&&qo(e.remove)&&qo(e.add)&&qo(e.unsubscribe)}function Zo(e){qo(e)?e():e.unsubscribe()}var ei={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ti={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var s=ti.delegate;return(null==s?void 0:s.setTimeout)?s.setTimeout.apply(s,$o([e,t],ko(n))):setTimeout.apply(void 0,$o([e,t],ko(n)))},clearTimeout:function(e){var t=ti.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function ni(e){ti.setTimeout((function(){var t=ei.onUnhandledError;if(!t)throw e;t(e)}))}function ri(){}var si=ai("C",void 0,void 0);function ai(e,t,n){return{kind:e,value:t,error:n}}var oi=null;function ii(e){if(ei.useDeprecatedSynchronousErrorHandling){var t=!oi;if(t&&(oi={errorThrown:!1,error:null}),e(),t){var n=oi,r=n.errorThrown,s=n.error;if(oi=null,r)throw s}}else e()}var ci=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Qo(t)&&t.add(n)):n.destination=fi,n}return Uo(t,e),t.create=function(e,t,n){return new pi(e,t,n)},t.prototype.next=function(e){this.isStopped?gi(function(e){return ai("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?gi(ai("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?gi(si,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Xo),li=Function.prototype.bind;function ui(e,t){return li.call(e,t)}var di=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){hi(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){hi(e)}else hi(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){hi(e)}},e}(),pi=function(e){function t(t,n,r){var s,a,o=e.call(this)||this;qo(t)||!t?s={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:o&&ei.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return o.unsubscribe()},s={next:t.next&&ui(t.next,a),error:t.error&&ui(t.error,a),complete:t.complete&&ui(t.complete,a)}):s=t;return o.destination=new di(s),o}return Uo(t,e),t}(ci);function hi(e){var t;ei.useDeprecatedSynchronousErrorHandling?(t=e,ei.useDeprecatedSynchronousErrorHandling&&oi&&(oi.errorThrown=!0,oi.error=t)):ni(e)}function gi(e,t){var n=ei.onStoppedNotification;n&&ti.setTimeout((function(){return n(e,t)}))}var fi={closed:!0,next:ri,error:function(e){throw e},complete:ri},mi="function"==typeof Symbol&&Symbol.observable||"@@observable";function yi(e){return e}function Ii(e){return 0===e.length?yi:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var Ei=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,s=this,a=(r=e)&&r instanceof ci||function(e){return e&&qo(e.next)&&qo(e.error)&&qo(e.complete)}(r)&&Qo(r)?e:new pi(e,t,n);return ii((function(){var e=s,t=e.operator,n=e.source;a.add(t?t.call(a,n):n?s._subscribe(a):s._trySubscribe(a))})),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=Ai(t))((function(t,r){var s=new pi({next:function(t){try{e(t)}catch(e){r(e),s.unsubscribe()}},error:r,complete:t});n.subscribe(s)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[mi]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ii(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Ai(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function Ai(e){var t;return null!==(t=null!=e?e:ei.Promise)&&void 0!==t?t:Promise}function _i(e){return qo(e[mi])}function Si(e){return Symbol.asyncIterator&&qo(null==e?void 0:e[Symbol.asyncIterator])}function Ci(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var Ti="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Ni(e){return qo(null==e?void 0:e[Ti])}function Pi(e){return Go(this,arguments,(function(){var t,n,r;return jo(this,(function(s){switch(s.label){case 0:t=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,Bo(t.read())];case 3:return n=s.sent(),r=n.value,n.done?[4,Bo(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,Bo(r)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function Di(e){return qo(null==e?void 0:e.getReader)}function Ri(e){if(e instanceof Ei)return e;if(null!=e){if(_i(e))return s=e,new Ei((function(e){var t=s[mi]();if(qo(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(Ho(e))return r=e,new Ei((function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()}));if(zo(e))return n=e,new Ei((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,ni)}));if(Si(e))return bi(e);if(Ni(e))return t=e,new Ei((function(e){var n,r;try{for(var s=Vo(t),a=s.next();!a.done;a=s.next()){var o=a.value;if(e.next(o),e.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}e.complete()}));if(Di(e))return bi(Pi(e))}var t,n,r,s;throw Ci(e)}function bi(e){return new Ei((function(t){(function(e,t){var n,r,s,a;return Fo(this,void 0,void 0,(function(){var o,i;return jo(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=Wo(e),c.label=1;case 1:return[4,n.next()];case 2:if((r=c.sent()).done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i=c.sent(),s={error:i},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function Oi(e,t,n,r,s){void 0===r&&(r=0),void 0===s&&(s=!1);var a=t.schedule((function(){n(),s?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(a),!s)return a}function vi(e){return function(t){if(function(e){return qo(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}function xi(e,t,n,r,s){return new wi(e,t,n,r,s)}var wi=function(e){function t(t,n,r,s,a,o){var i=e.call(this,t)||this;return i.onFinalize=a,i.shouldUnsubscribe=o,i._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,i._error=s?function(e){try{s(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,i._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,i}return Uo(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(ci);function Mi(e,t){return void 0===t&&(t=0),vi((function(n,r){n.subscribe(xi(r,(function(n){return Oi(r,e,(function(){return r.next(n)}),t)}),(function(){return Oi(r,e,(function(){return r.complete()}),t)}),(function(n){return Oi(r,e,(function(){return r.error(n)}),t)})))}))}function Li(e,t){return void 0===t&&(t=0),vi((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}function Ui(e,t){if(!e)throw new Error("Iterable cannot be null");return new Ei((function(n){Oi(n,t,(function(){var r=e[Symbol.asyncIterator]();Oi(n,t,(function(){r.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function Fi(e,t){if(null!=e){if(_i(e))return function(e,t){return Ri(e).pipe(Li(t),Mi(t))}(e,t);if(Ho(e))return function(e,t){return new Ei((function(n){var r=0;return t.schedule((function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())}))}))}(e,t);if(zo(e))return function(e,t){return Ri(e).pipe(Li(t),Mi(t))}(e,t);if(Si(e))return Ui(e,t);if(Ni(e))return function(e,t){return new Ei((function(n){var r;return Oi(n,t,(function(){r=e[Ti](),Oi(n,t,(function(){var e,t,s;try{t=(e=r.next()).value,s=e.done}catch(e){return void n.error(e)}s?n.complete():n.next(t)}),0,!0)})),function(){return qo(null==r?void 0:r.return)&&r.return()}}))}(e,t);if(Di(e))return function(e,t){return Ui(Pi(e),t)}(e,t)}throw Ci(e)}function ji(e,t){return t?Fi(e,t):Ri(e)}function Vi(e,t,n){var r=qo(e)||t||n?{next:e,error:t,complete:n}:e;return r?vi((function(e,t){var n;null===(n=r.subscribe)||void 0===n||n.call(r);var s=!0;e.subscribe(xi(t,(function(e){var n;null===(n=r.next)||void 0===n||n.call(r,e),t.next(e)}),(function(){var e;s=!1,null===(e=r.complete)||void 0===e||e.call(r),t.complete()}),(function(e){var n;s=!1,null===(n=r.error)||void 0===n||n.call(r,e),t.error(e)}),(function(){var e,t;s&&(null===(e=r.unsubscribe)||void 0===e||e.call(r)),null===(t=r.finalize)||void 0===t||t.call(r)})))})):yi}class ki{static portalRegex=/(?<=v2\/pages\/)(.*?)(?=\?pageClass=)/;#e=0;#t=0;#n;#r=[];constructor(){this.#n=!1,Br.subscribe(j.START_PERFORMANCE_LOG,(()=>{this.#n=!0,this.clearStorage(),this.#e=Date.now()}),j.START_PERFORMANCE_LOG),Br.subscribe(j.STOP_PERFORMANCE_LOG,(()=>{this.#n=!1,this.#t=Date.now(),this.#s()}),j.STOP_PERFORMANCE_LOG)}static getCategory(e){return e.includes("v2/cases")||e.includes("v2/assignments")?"Case":e.includes("v2/data_views")?"DataPage":e.includes("v2/pages")?"Page":""}static getPortalLabel(e,t){const n=ch(".pyPrimaryNavPages","pyPortal",t)||[];return n.find((t=>t.pyRuleName===e))?.pyLabel??e}static extractAssignmentLabel(e,t,n){e.label===j.TOP_ACTION_LABEL.OPENASSIGNMENT&&void 0===e.assignmentLabel&&(e.assignmentLabel=n?.data?.data?.caseInfo?.assignments.find((e=>e.ID===t))?.name??"")}#a(e,t,n,r){if(e<0)return;const s=this.#r[t].serviceCalls[e],a=Date.now();s.endTime=a,s.totalTimeTaken=a-s.startTime,s.httpMethod=r.config?.method,n?s.status="CANCELLED":"headers"in r&&(s.status=r.status,s.responseBytes=r.headers["content-length"])}#o(e,t,n,r,s){let a="";if(!n){const t=e.match(ki.portalRegex)[0];a=t?.split(" ")[0]}const o=`${t||a}${j.HASH_DELIMITER}${s.startTime}`,i=Eh.getHashedString(o);s.urlUniqueID=i;const c={label:t||`${ki.getPortalLabel(a,r)} Portal`,actionUniqueID:i,serviceCalls:[s]};return this.#r.push(c),{actionUniqueID:i,urlUniqueID:i,topLevelAction:n}}#i(e,t,n){const r=this.#r[e];ki.extractAssignmentLabel(r,t,n);const s=n.data?.data?.caseInfo?.content;s&&(r.caseLabel=s.pyLabel,r.caseID=s.pyID)}buildActionsList(e){const{url:t,topLevelAction:n,userAction:r,actionLabel:s,context:a}=e;let o={};if(this.#n){const e={url:t.split(E()??"")[1],startTime:Date.now(),context:a,category:ki.getCategory(t)};if(n&&r)o=this.#o(t,s,!0,a,e);else if(ki.portalRegex.test(t))o=this.#o(t,s,!1,a,e);else if(this.#r.length>0){const r=this.#r[this.#r.length-1].serviceCalls,s=`${t}${j.HASH_DELIMITER}${e.startTime}${j.HASH_DELIMITER}${r.length}`,a=Eh.getHashedString(s);e.urlUniqueID=a,r.push(e),o.actionUniqueID=this.#r[this.#r.length-1].actionUniqueID,o.urlUniqueID=a,o.topLevelAction=n}}return o}reformActionList(e,t,n,r){const s=t.config,{actionUniqueID:a,urlUniqueID:o,topLevelAction:i,assignmentID:c}=s;if(this.#n){const s=this.#r.findIndex((e=>e.actionUniqueID===a));if(s>=0){i&&n&&"data"in t&&this.#i(s,c,t),e=e.split(E()??"")[1];const a=this.#r[s].serviceCalls.findIndex((t=>t.url===e&&t.urlUniqueID===o));this.#a(a,s,r,t)}}}#s(){if(0===this.#r.length)return;const e={version:"1.0.0",recordedTime:this.#t-this.#e,totalActions:this.#r.length,startTime:this.#e,userActions:this.#r};localStorage.setItem("performanceData",JSON.stringify(e))}clearStorage(){localStorage.removeItem("performanceData"),this.#r=[]}}const $i=new ki;class Bi{constructor(e,t=!0){this.config=e,t?(this.ssKeyConfig=e,this.reloadConfig()):this.updateConfig(e,!1)}static init(e,t=!0){return new Bi(e,t)}updateConfig(e,t=!0){t?window.sessionStorage.setItem(this.ssKeyConfig,JSON.stringify(this.config)):Ec(e)}reloadConfig(e=!0){if(e){const e=window.sessionStorage.getItem(this.ssKeyConfig);this.config=e?JSON.parse(e):null}else this.config=Ac()}async buildAuthorizeUrl(e){e=e||window.btoa(location.origin);let{sessionIndex:t}=this.config;const{password:n}=this.config,r=this.config.clientId?this.config.clientId:this.config.client_id,s=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,a=this.config.authorizeUri?this.config.authorizeUri:this.config.endPoints.authorize,o=this.config.authService?this.config.authService:this.config.authentication_service||"pega",i=this.config.appAlias?this.config.appAlias:ip.getApplicationAlias(),c=this.config.userIdentifier?this.config.userIdentifier:this.config.user_identifier;t=t||this.config.tokenInfo.session_index;const l=t?`&session_index=${t}`:`${c}`?`&UserIdentifier=${c}`:`${n}`?`&Password=${window.atob(n)}`:"",u=new Uint8Array(64);window.crypto?.getRandomValues(u),this.config.codeVerifier=this.base64UrlSafeEncode(u),this.updateConfig(this.config,!1);const d=i?`+app.alias.${i.replace(/^app\//,"")}`:"";return this.getCodeChallenge(this.config.codeVerifier)?.then((t=>`${a}?client_id=${r}&response_type=code&redirect_uri=${s}&scope=openid${d}&state=${e}&code_challenge=${t}&code_challenge_method=S256&authentication_service=${o}&enable_psyncId=true${l}`))?.catch((()=>null))}getTokenAndFinish=e=>{window.removeEventListener("message",this.authMessageHandler,!1),this.getToken(e,!1).then((()=>{})).catch((e=>{console.log(e)}))};authMessageHandler=e=>{if(e.origin!==this.getRedirectUriOrigin())return;if(!e.data||!e.data.type||"PegaAuth"!==e.data.type)return;const t=e.data.code.toString();this.getTokenAndFinish(t)};getRedirectUriOrigin=()=>{let{redirectUri:e}=this.config;e=e||this.config.redirect_uri;const t=e.indexOf("//"),n=-1!==t?e.indexOf("/",t+2):-1;return-1!==n?e.substring(0,n):e};getToken(e,t){this.reloadConfig(t);const n=this.config.clientId?this.config.clientId:this.config.client_id,r=this.config.clientSecret?this.config.clientSecret:this.config.client_secret,s=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,a=this.config.tokenUri?this.config.tokenUri:this.config.endPoints.token,{codeVerifier:o}=this.config,i=window.location.search,c=new URLSearchParams(i),l=e||c.get("code"),u=new URLSearchParams;return u.append("client_id",n),r&&u.append("client_secret",r),u.append("grant_type","authorization_code"),u.append("code",l),u.append("redirect_uri",s),u.append("code_verifier",o),this.config?.secureCookie&&u.append("send_token_as_cookie","true"),pc(a,{method:"POST",headers:new Headers({"content-type":"application/x-www-form-urlencoded"}),body:u.toString()}).then((e=>e.data)).then((e=>{e.eA=Date.now()+1e3*e.expires_in;let n=!1;if(this.config.codeVerifier&&(delete this.config.codeVerifier,n=!0),e.session_index&&(this.config.session_index=e.session_index,n=!0),n){this.updateConfig(this.config,t),this.config?.secureCookie?yc({pzCTkn:e?.csrf}):(Ic({tokenInfo:e}),yc({Authorization:`${e?.token_type} ${e?.access_token}`}));const{onTokenRetrieval:n}=this.config;n&&"function"==typeof n&&n(e),window.postMessage("oAuthSuccess")}return e})).catch((()=>null))}sha256Hash(e){return window.crypto?.subtle?.digest("SHA-256",(new TextEncoder).encode(e))}encode64(e){return window.btoa(new Uint8Array(e).reduce(((e,t)=>e+String.fromCharCode(t)),""))}base64UrlSafeEncode(e){return this.encode64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}getCodeChallenge(e){return this.sha256Hash(e)?.then((e=>this.base64UrlSafeEncode(e))).catch((e=>{console.log(e)})).finally((()=>null))}}const Gi=Bi,Wi=async()=>new Promise((async(e,t)=>{const n=_c();if(!n?.tokenInfo)return void t(new Error("Missing token information."));const{access_token:r,refresh_token:s=null}=n.tokenInfo,{revoke:a}=n.endPoints,{client_id:o,client_secret:i,secureCookie:c}=n,l={"content-type":"application/x-www-form-urlencoded"};i&&(l.authorization=`Basic ${window.btoa(`${o}:${i}`)}`);const u=new URLSearchParams;i||u.append("client_id",o),c&&u.append("send_token_as_cookie","true");const d=s?"refresh_token":"access_token",p="access_token"===d?r:s;!c&&p&&u.append("token",p),u.append("token_type_hint",d),await pc(a,{method:"POST",headers:new Headers(l),credentials:c?"include":"omit",body:u.toString(),withoutDefaultHeaders:!0}),yc({Authorization:null}),Ic({tokenInfo:null}),e()})),Hi=async e=>{const t={};if("OAuth2.0"===e?.authType){const n=new Gi(e,!1);t.reauthUrl=await n.buildAuthorizeUrl(),t.redirectOrigin=n.getRedirectUriOrigin(),window.addEventListener("message",n.authMessageHandler,!1)}else t.reauthUrl=E()+(I()?`${I()}`:"/?reAuth=true");return t},qi=(e,t)=>{Hi(t).then((t=>{const n={openReauthMessageModal:!0,reAuthenticationURL:t.reauthUrl,url:e,redirectOrigin:t.redirectOrigin};Br.publish(F.PUB_SUB_EVENTS.EVENT_REAUTH,n)}))},zi=e=>{let t="",n={},r={},s=!0;if("OAuth2.0"===e?.authType){t=e.endPoints.token;const a=new URLSearchParams;(!e.tokenInfo.refresh_token||e.tokenInfo.refresh_token&&e.tokenInfo.refresh_token.length<=0)&&(s=!1),a.append("client_id",e.client_id),a.append("grant_type","refresh_token"),e.clientSecret&&a.append("client_secret",e.clientSecret),e.secureCookie&&a.append("send_token_as_cookie","true"),e.tokenInfo?.refresh_token&&a.append("refresh_token",e.tokenInfo.refresh_token),n={method:"POST",body:a.toString(),headers:{"content-type":"application/x-www-form-urlencoded"}},r={success:t=>{const{data:n}=t,r={access_token:n?.access_token,refresh_token:n?.refresh_token};Ic({tokenInfo:{...e.tokenInfo,...r}}),e.secureCookie?yc({pzCTkn:n?.csrf}):yc({Authorization:`${n?.token_type} ${n?.access_token}`});const{onTokenRetrieval:s}=e;s&&"function"==typeof s&&s(n)},failure:t=>{if(e.popupReauth)return qi(t,e);Br.publish(F.PUB_SUB_EVENTS.EVENT_FULL_REAUTH,e)}}}else t=`${E()}/updateSession`,n={method:"GET",headers:{}},r={failure:qi};return{url:t,config:n,callback:r,isRefreshTokenPresent:s}},Yi=(e,t)=>"OAuth2.0"===t?.authType?e?.includes(t.endPoints.token):e?.includes("updateSession"),Ki=e=>{const{config:t}=e,n=t.headers&&t.headers.context;return t.data&&(t.body=t.data),{url:t.url,config:t,context:n}},Xi=(e,t,n)=>{const{config:r}=e,{url:s,config:a,callback:o,isRefreshTokenPresent:i}=zi(n),c=r.headers&&r.headers.context;r.data&&(r.body=r.data);const l=hc(r.url,r,c,t);return i?pc(s,a).then((e=>(t.setUpdateSessionStatus(!1),o?.success?.(e,r),Br.publish("updateSession",{updateStatus:"success"}),l.then((e=>Promise.resolve(e))).catch((e=>Promise.reject(e)))))).catch((e=>e&&e.config&&Yi(e.config.url,n)?(o?.failure?.(r.url,n),l):Promise.reject(e))):(o?.failure?.(r.url,n),l)},Ji=(e,t,n,r)=>{if(e.config&&Yi(e.config.url,n))return Promise.reject(e);if(e.response&&e.response.status&&401===e.response.status&&!t.getUpdateSessionStatus()){if(Br.unsubscribeAllWithEventType(rc),t.setUpdateSessionStatus(!0),"custom"===n?.authType){Br.publish(F.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);const{url:n,config:r,context:s}=Ki(e);return hc(n,r,s,t)}return Xi(e,t,n)}if(e.response&&e.response.status&&401===e.response.status&&t.getUpdateSessionStatus()){const{url:t,config:n,context:r}=Ki(e);return pc(t,n,r)}if(e.response&&e.response.status&&422!==e.response.status&&424!==e.response.status&&e.config.headers.context&&e.response.data&&!r){const t=e.response.data.errorDetails&&e.response.data.errorDetails.map((t=>((e,t)=>t[F.TRACE_ID]?{type:"error",message:e.localizedValue||e.message,correlationID:t[F.TRACE_ID]}:{type:"error",message:e.localizedValue||e.message})(t,e.response.headers)));let n=e.config.headers.context;return n&&n.includes("/workarea")&&!n.includes("/modal")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),zn({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return Promise.reject(e)};const Qi=class{constructor(){this.updateSessionInProgress=!1}getUpdateSessionStatus=()=>this.updateSessionInProgress;setUpdateSessionStatus=e=>{this.updateSessionInProgress=e}};const Zi=class{constructor(e){this.xrayInfo={},this.xRayDebugger=e}startXRay(){if(!this.xRayDebugger.xray)return null;const e=`${Date.now()+Math.random()}`;return this.xrayInfo[e]={startTime:Date.now()/1e3},e}startXRayRestApi(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],restApisTime:{...this.xrayInfo[e]?this.xrayInfo[e].restApisTime:{},[t]:Date.now()}})}stopXRayRestApi(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],restApisTime:{...this.xrayInfo[e]?.restApisTime,[t]:(Date.now()-this.xrayInfo[e]?.restApisTime[t])/1e3}})}updateXRay(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],...t})}stopXRay(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],totalTime:Date.now()/1e3-this.xrayInfo[e].startTime},t().setXRayInfo(this.xrayInfo[e]),delete this.xrayInfo[e])}};const ec=new class{constructor(){this.xray=!1,this.onXRayCallback=null,this.xrayRuntime=new Zi(this),this.isPreview=!1,this.debugLevels="vcv=1;tracer=0;log=0"}onXRay(e){this.onXRayCallback=e}toggleXRay(e){this.xray=e,this.xrayRuntime.xrayInfo={},null!==this.onXRayCallback&&this.onXRayCallback(e)}enableXRay(){this.toggleXRay(!0)}disableXRay(){this.toggleXRay(!1)}toggle(){this.xray?this.toggleXRay(!1):this.toggleXRay(!0)}isXRayOn(){return this.xray}getXRayRuntime(){return this.xrayRuntime}setPreviewMode(){this.isPreview=!0}getPreviewMode(){return this.isPreview}enableTracer=()=>{this.debugLevels="vcv=1;tracer=1;log=0"};disableTracer=()=>{this.debugLevels="vcv=1;tracer=0;log=0"};getDebugLevels=()=>this.debugLevels};const tc=new class{constructor(){this.externalHeaders={},this.defaultHeaders={},this.SPECIAL_CHARS={SLASH:"/"}}registerHeader(e,t){return!this.defaultHeaders[e]&&(this.externalHeaders[e]=t,!0)}unRegisterHeader(e){this.externalHeaders[e]&&delete this.externalHeaders[e]}getRegisteredHeaders(){return this.externalHeaders}setDefaultHeaders(e){this.defaultHeaders={...this.defaultHeaders,...e}}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[j.COREHEADER_APP_DEBUG_ID]:e.debugId,[j.COREHEADER_APP_DEBUG_LEVELS]:ec.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;const t=Ch.getProperty(j.COREHEADERS,"",e);return t?{...t,debugInfo:ec.getPreviewMode()&&{...t.debugInfo,[j.COREHEADER_APP_DEBUG_LEVELS]:ec.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,t,n){const r=this.getCoreHeadersFromContext(n);if(r){const t=Object.keys(e);if(t.includes(j.SKIPCOREHEADERS))return void delete e[j.SKIPCOREHEADERS];const n=Object.assign({},...Object.values(r));Object.keys({...n}).forEach((r=>{t.includes(r)||(e[r]=n[r])}))}}injectCoreAdditionalHeaders(e,t,n,r){r?.includeRemoteSystemIdIfPresent&&$.injectRemoteCaseHeader(e,t,n),this.processCoreHeaders(e,t,n)}},nc=tc;const rc="updateSession",sc={},ac=new Qi,oc=new class{constructor(){this.timerID=void 0,this.expiryBuffer=45,this.timeoutWarned=!1}setTimerID=e=>{this.timerID=e};getTimerID=()=>this.timerID;resetInactiveTimeout=e=>{const t=window.PCore?.getEnvironmentInfo().getInactivityTimeout();if(this.timeoutWarned&&(Br.unsubscribe(F.PUB_SUB_EVENTS.RESET_TIMER,"resetCallback"),this.timeoutWarned=!1),t)return e&&clearTimeout(e),this.startInactivityTimeout(t>60?t:60)};startInactivityTimeout=e=>{const t=setTimeout((()=>{Br.publish(F.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(t),Br.subscribe(F.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0}),1e3*(e-this.expiryBuffer));return this.setTimerID(t),t}};let ic={},cc={},lc={},uc="";const dc=e=>{ic=e},pc=(e,t,n="root",r={})=>{const{doNotMergeHttpMessagesForStatusCode:s=null,cancelContext:a=n,includeRemoteSystemIdIfPresent:o=!0,actionLabel:i="",assignmentID:c=""}=r;let{topLevelAction:l=!1}=r;const u=l;l||(l=t.topLevelAction||!1),uc=s,null===e&&window.console.error("Error: url passed to Service Broker fetch is null (or) undefined");const{body:d,signal:p,withoutDefaultHeaders:h=!1,...g}=t;let f={};cp.getPerformanceDashboardVisibility()&&(f={assignmentID:c,...$i.buildActionsList({url:e,topLevelAction:l,userAction:u,actionLabel:i,context:n})});const{Authorization:m,pzCTkn:y,...I}=t.headers||{};h||nc.injectCoreAdditionalHeaders(I,t.body,n,{includeRemoteSystemIdIfPresent:o}),a&&sc[a]>=0?sc[a]+=1:a&&void 0===sc[a]&&(sc[a]=1);let E=h?{...I}:{...nc.getDefaultHeaders(),...nc.getRegisteredHeaders(),...I,context:n};if(e&&Yi(e,cc)&&ac.getUpdateSessionStatus()||!ac.getUpdateSessionStatus()){Yi(e,cc)&&"OAuth2.0"===cc?.authType&&(E={...I});const{restApi:t}=ip.doesRestApiExist("Logout")&&ip.getRestEndPoint("Logout")||{restApi:null};return(!t||e&&!e.endsWith(t))&&oc.setTimerID(oc.resetInactiveTimeout(oc.getTimerID())),function(e,t){var n="object"==typeof t;return new Promise((function(r,s){var a,o=!1;e.subscribe({next:function(e){a=e,o=!0},error:s,complete:function(){o?r(a):n?r(t.defaultValue):s(new Mo)}})}))}(ji(xo({context:n,...g,url:e,data:d,...p&&void 0===p.aborted&&{cancelToken:p},...p&&void 0!==p.aborted&&{signal:p},headers:E,withCredentials:!("OAuth2.0"!==cc?.authType||!cc.secureCookie)||void 0,...f})).pipe(Vi((()=>{const e=nc.getCoreHeadersFromContext(E.context);e&&(e=>{Br.publish(j.PUB_SUB_EVENTS.FETCH_SUCCESS,e)})({...e})}))))}return hc(e,t,n,ac)},hc=(e,t,n,r)=>new Promise(((s,a)=>{Br.subscribe(rc,(o=>{r.setUpdateSessionStatus(!o.updateStatus),"success"===o.updateStatus?pc(e,t,n).then((e=>s(e))).catch((e=>a(e))):a(o.updateStatus.error)}),rc)})),gc=e=>{sc[e]>0&&(sc[e]-=1,0===sc[e]&&delete sc[e])};xo.interceptors.request.use((e=>(ic.request&&(e=ic.request(e)),e)),(e=>Promise.reject(e))),xo.interceptors.response.use((e=>{const t=e.config.url;if(cp.getPerformanceDashboardVisibility()&&$i.reformActionList(t,e,!0,!1),202===e.status&&e.config.headers.context&&e.data?.caseInfo?.errorMessage){const t=[{type:"error",message:e.data.caseInfo.errorMessage}];let n=e.config.headers.context;return n&&n.includes("/workarea")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),zn({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return e.config.headers&&e.config.headers.context&&(e.config.skipClearErrorMessages||(Hn({type:"error",category:"HTTP",context:e.config.headers.context}).length>0&&qn({type:"error",category:"HTTP",context:e.config.headers.context}),Hn({type:"error",category:e.config.headers.context===j.APP.APP?"PAGE":"",context:e.config.headers.context}).length>0&&qn({type:"error",category:"PAGE",context:e.config.headers.context})),gc(e.config.headers.context)),ic.response&&(e=ic.response(e)),e}),(e=>{if(e.config&&e.config.headers&&e.config.headers.context&&gc(e.config.headers.context),cp.getPerformanceDashboardVisibility()){const t=e.config.url,n=xo.isCancel(e);$i.reformActionList(t,n?e:e.response,!1,n)}return!e.response||!e.response.status||401!==e.response.status||e.config&&Yi(e.config.url,cc)||Br.subscribe(rc,(e=>{ac.setUpdateSessionStatus(!e.updateStatus)}),rc),Ji(e,ac,cc,e.response&&e.response.status&&e.response.status===Number(uc)?uc:null)}));const fc=()=>xo.CancelToken.source(),mc=e=>xo.isCancel(e),yc=e=>{nc.setDefaultHeaders(e)},Ic=e=>{cc={...cc,...e}},Ec=e=>{lc={...lc,...e}},Ac=()=>({...lc}),_c=()=>({...cc});const Sc=class{static isCaseActive(e,t){if(!e||!t)return!1;const n=rd(t);if(n){const r=pd(t),{items:s={}}=n;return!(!r||!s[r]||s[r].key!==e)}return!1}static getCaseEditMetadata=(e,t)=>{const n={caseID:e,viewID:"pyEdit"},{restApi:r,reqType:s}=_g("loadView",n);return pc(r,{method:s},t)};static getCaseEditLock=(e,t)=>{const n={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:r,reqType:s}=_g(Ye,n);return pc(`${r}?viewType=page`,{method:s},t)};static updateCaseEditFieldsData=(e,t,n,r)=>{const s={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:a}=_g(Ye,s),o=t[e];return pc(`${a}?viewType=form`,{method:"PATCH",body:{content:{...o}},headers:{"if-match":n}},r)};static getCaseMessages=e=>ah(e)?.caseMessages;static getPropertiesToReplace=e=>(al(e)||[]).filter((e=>!e.allowMultiple)).map((e=>e.fullPath));static getUniqueGadgetId=()=>Eh.generateUniqueID().substring(0,5);static getRemoteCaseMapping=()=>$.getRemoteCaseMapping();static isTraditionalRemoteCase=e=>$.isTraditionalRemoteCase(e);static getRemoteCaseKey=(e,t)=>{let n=t;try{e&&(n=e.slice(e.indexOf(" ")+1,e.indexOf("!")))}catch{}return n}},{RESOURCE_TYPES:Cc}=F,Tc={PAGE:"page",FORM:"form"},Nc={[Cc.CASE]:[We,Be,Ge],[Cc.PAGE]:[je,ke],[Cc.DATA]:[Ve]},Pc=(e,t,n={})=>{if(!e)return{};const r={etag:e.etag},{RemoteSystemID:s}=n;return e[F.REMOTE_SYSTEM_ID]||e[F.REMOTE_SYSTEM_ID.toLowerCase()]||s?r.RemoteSystemID=e[F.REMOTE_SYSTEM_ID]||e[F.REMOTE_SYSTEM_ID.toLowerCase()]||s:t&&$.isRemoteCase(t)&&(r.RemoteSystemID=$.getRemoteHeader(t)),r},Dc=(e,t={})=>{const{onlyChangedData:n=!1,nonEmptyAndChangedData:r=!1,skipUUID:s=!0,isTransientContext:a=!1,includeDisabledFields:o=!1}=t;let i={};i=ol(e,{isTransientContext:a,includeDisabledFields:o}),n&&(delete i?.caseInfo?.content,a&&(i={}));const c=Al(e,!1);!a&&r&&((e,t)=>{Object.entries(e?.caseInfo?.content).forEach((([n,r])=>{const s=ah(t),a=b()(s,F.CASE_INFO.CASE_INFO_CLASSID),o=vp(n,a);("True-False"===o?.type&&!r||""===r)&&delete e.caseInfo.content[n]}))})(i,e);const l=w()(c,i);let u={},d=!1;({content:u,attachmentsExist:d}=((e,t)=>{let n={},r=!1;return(e||t?.caseInfo)&&(n=e?{...t}:{...t?.caseInfo},t?.caseInfo?.attachments&&(r=!0)),{content:n,attachmentsExist:r}})(a,l));const p=[...fr(e)];s&&p.forEach((e=>{delete e.content?.EmbedListUUID__})),u.pageInstructions=p;return(lr[e]||[]).forEach((e=>{if(u?.content){const t=e?.replace(j.CASE_INFO.CASE_INFO_CONTENT,"");Eh.deleteIn(u.content,(e=>{if(!e)return"";const t=e.split(".");let n,r="";for(n of t)if(n){if(n.includes("[")&&n.includes("]"))return r+=`['${n.substring(0,n.lastIndexOf("["))}']`,r;r+=`['${n}']`}return r})(t))}})),!a&&l?.dataInfo?(u={...l.dataInfo,pageInstructions:u.pageInstructions},{content:u}):{content:u,attachmentsExist:d}},Rc=(e,t)=>{let n,r,s={};const a=Eh.getIn(e,j.UI_RESOURCES),o=Eh.getIn(e,"confirmationNote");a?(n=Eh.getIn(e,j.UI_RESOURCES_CONTEXT_DATA),r=Eh.getIn(e,j.ROOT),s=Eh.getIn(e,j.ACTION_BUTTONS)):o&&(r={});const{data:i={},Errors:c,semanticURL:l,key:u,flowName:d}=e,p=Eh.getIn(e,"nextAssignmentInfo",null),h=Eh.getIn(e,"nextAssignmentInfo.context",""),g=Eh.getIn(e,"confirmationLinks",null),{isInCreateStage:f,openCaseViewAfterCreate:m,debugInfo:y}=t;return{data:{...i,key:u,flowName:d,coreHeaders:y&&{debugInfo:{[j.COREHEADER_APP_DEBUG_ID]:y.debugId}},caseInfo:{...i.caseInfo,actionButtons:s,headers:t.headers},[j.CONTEXT_DATA]:f?{...i[j.CONTEXT_DATA],...n,openCaseViewAfterCreate:m,errors:c}:{...i[j.CONTEXT_DATA],...n,errors:c}},semanticURL:l,nextAssignmentInfo:p,assignmentContext:h,confirmationLinks:g,key:u,root:r,...t}},bc=async(e,t,n,r=!1,s=!1)=>{const a=Eh.getIn(e,j.LOCALE_REFERENCES);await up.loadLocaleResources(a);const o=Eh.getIn(e,j.COMPONENTS);if(o)try{await Fr(o)}catch(e){console.error(e)}const i={actionConfig:t,...n};r?Rg({...e,options:i,directUrlUpdation:!0}):xr(e,i,s)},Oc=(e="")=>{const t=e.indexOf(" "),n=e.indexOf("!");return e.substring(t+1,n)},vc=e=>{if(e){const[,t]=e.split("!");return{key:Oc(e),flowName:t}}return{}},xc=(e,t)=>{const n=[],r=[];return e.forEach((e=>{((e,t,n,r)=>{switch(!0){case Boolean(e[j.ERROR_IN_PAGE_IDENTIFIER]&&e[j.ERROR_FIELD_IN_PAGE]):{const s=`${e[j.ERROR_FIELD_IN_PAGE]}`.replace(/(\(\d\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`)),a=`${s}${e[j.ERROR_IN_PAGE_IDENTIFIER]}`,o=Eh.deepClone(e);o[j.ERROR_FIELD_IN_PAGE]=s,t.includes(a.slice(1))||t.includes(a.substring(a.indexOf(".")+1,a.indexOf("[")))?r.push(o):n.push(e);break}case Boolean(e[j.ERROR_IN_PAGE_IDENTIFIER]&&!e[j.ERROR_FIELD_IN_PAGE]):{const s=e[j.ERROR_IN_PAGE_IDENTIFIER].slice(1);t.includes(s)?r.push(e):n.push(e);break}default:n.push(e)}})(e,t,n,r)})),{fieldErrors:r,pageErrors:n}},wc=e=>{const{payload:t}=e,{err:n,context:r,actionMgrID:s}=t,a=n&&n.response?n.response.data:"",o=cl(r);return s&&ln.rejectActionByID(s),ng(rg,"Error action triggered",a,r,o)},Mc=(e,t)=>_d(e)&&Cd(e)?ng(Qh,t):ng(Fh,t),Lc=(e,t,n=j.APP.APP,r={})=>{let s=null;const{buildNew:a=!0}=r;return _d(e)?s=Cd(e)?pd(e):H(t,n):Sd(e)&&(Cd(e)&&!a?s=md(e):Cd(e)&&!a||(s=H(t,n))),s},Uc=e=>e&&e.type===Se,Fc=e=>{let t=!1;const n=Ed(e);for(let e=0;e<n.length;e+=1){const r=n[e];if(r&&Nl(r)){t=!0;break}}return t},jc=(e,t={})=>{let n=!1,r=!1,s={},a=!0,o=!1,i=!1;const{showConfirmDialogForMaxDocumentLimitReached:c=!1,dirtyMessage:l,skipChildDirtyState:u=!1}=t;if(_d(e)){const t=pd(e),r=fd(t);Nl(r)&&(n=!0),u||n||(n=Fc(t))}else if(Sd(e)&&Pd(e)){let t=bd(e);t||(t=pd(e),r=!0),s.containerItemID=t,s.context=fd(t)}if(n){const e=l||Il;o=window.confirm(up.getLocaleValue(e,"Messages"))}if(!o&&n&&(s={},a=!1),r){const e=up.getLocaleValue(El,"Messages");c?i=window.confirm(e):(window.alert(e),a=!1)}return!i&&r&&(s={},a=!1),{continueExecution:a,removeActionPayload:s}},Vc=(e,t)=>{let n=!1;const r=cp.isCoexistenceAppOfType(j.APP_TYPE.UIKIT),{insKey:s,isParallelCall:a,skipFlowNameCheck:o}=t;if(!s)return{};const[,i]=s.split("!")||"",c=o?s:Oc(s),l=ld(e,c);let u={},d=!1;if(l&&!r&&(n=!0,u=sd(e,l),!o)){let e=u?.flowName;const t=qr(l),r=yd(l);if(r.length){const n=mt(t,r[0]);e=sd(n,r[0])?.flowName}else n=e===i;(e!==i||a)&&(d=!0)}return{activate:n,activateContainerActionPayload:{target:e,isParallelAssignment:d,containerItemID:l,semanticURL:u.semanticURL,insKey:s}}},kc=(e,t,n)=>e===Cc.PAGE?((e,t={})=>{let n=!1;const{semanticURL:r}=t,s=ld(e,r);return s&&(n=!0),{activate:n,activateContainerActionPayload:{target:e,containerItemID:s,semanticURL:r}}})(t,n):e===Cc.ASSIGNMENT?Vc(t,n):e===Cc.CASE?Vc(t,{...n,skipFlowNameCheck:!0}):{},$c=(e=[])=>{Cd(`${j.APP.APP}/${j.PREVIEW}`)&&e.push(ng(Uh,Dd({context:F.APP.APP,name:j.PREVIEW})))},Bc=e=>{let t;for(const n of Object.keys(Nc))if(Nc[n].includes(e)){t=n;break}return t},Gc=(e,t)=>{const{data:n={},context:r,caseViewMode:s}=e,a={data:{...n},caseViewMode:s,context:W(r)};Eh.deleteIn(a.data,"shared"),Eh.setIn(a.data,["context_data","caseViewMode"],s),t.push({type:st,payload:{context:a.context}}),t.push(ng(bh,a))},Wc=e=>{if(Array.isArray(e)&&e.length>0){const t=(e=>{const t=e[0];for(const t of e)if("other"===t?.payload?.nextAssignmentInfo?.context||"remote"===t?.payload?.nextAssignmentInfo?.context)return t;return t})(e),n=Eh.getIn(t,["payload","assignmentContext"]);if("other"===n||"remote"===n){const r=Eh.getIn(t,["payload","nextAssignmentInfo","ID"]);if(t?.payload?.isProcessAction){const n={acName:Eh.getIn(t,["payload","target"]),caseID:t.payload.data.caseInfo.ID,containerItemID:Eh.getIn(t,["payload","context"]),context:Eh.getIn(t,["payload","context"])},r={type:he,payload:{...n}};e.push(r),e=e.filter((e=>delete e?.payload?.data?.caseMessages)),sh(e),e=e.filter((e=>e.type!==he))}const s=((e,t,n)=>({assignmentID:e,vcName:j.PRIMARY,targetContainerName:Eh.getIn(t,["payload","target"]),context:Eh.getIn(t,["payload","context"]),..."other"===n&&{isChild:!0},isProcessAction:t?.payload?.isProcessAction,..."remote"===n&&{isRemote:!0},..."remote"===n&&{remoteClassName:t.payload.nextAssignmentInfo.className}}))(r,t,n);_d(s.targetContainerName)||t?.payload?.containerName!==j.WORKAREA||(s.isMultiDoc=!0,e=[]);const a={type:ge,payload:{...s}};e.push(a),sh(e)}else sh(e)}},Hc=(e,t)=>w()(e,t,(function(e,t){if(Array.isArray(e))return e.concat(t)})),qc=e=>{let t={},n=Kd(e);for(;n;){const e=Dc(n);t=Hc(e.content,t),n=Kd(n)}return t};class zc{static getChanges(e){return{...Al(e)}}static getSubmitData(e,t={}){const{isTransientContext:n=!1,includeDisabledFields:r=!1}=t,{content:s}=Dc(e,{isTransientContext:n,includeDisabledFields:r});return s}static isStateModified(e){return Nl(e)||Nr(e)||!(!e||!Sl(e))}static isFormValid(e,t){return il(e,t)}static clearChangedProperties(e){return yr(e),gr(e),Dl(e)}static getEditableFields(e){return ll(e)}static setCustomValidator(e,t){Or.register(e,t)}static isPropertyEditable(e,t){return zc.getEditableFields(e).some((e=>e.name===t))}}const Yc=zc;const Kc=new class{constructor(){this.states={},this.unConnectedStates={}}getStateMachine(e,t,n){return this.states?.[e]?.[`${t}${n}`]||this.unConnectedStates?.[e]?.[`${t}${n}`]}isStateMachineExist(e,t,n){return!!this.states?.[e]?.[`${t}${n}`]||!!this.unConnectedStates?.[e]?.[`${t}${n}`]}getUnConnectedStateMachines(e){return this.unConnectedStates?.[e]}setStateMachine(e,t,n,r){const s=`${n}${t}`,{stateMachine:a}=this.getStateMachineObjByPath(s,e,!0);if(a&&a.targetPageReference!==r.targetPageReference)return a.addChild(r),this.unConnectedStates[e]||(this.unConnectedStates[e]={}),this.unConnectedStates[e][s]||(this.unConnectedStates[e][s]={}),void(this.unConnectedStates[e][s]=r);this.states[e]||(this.states[e]={}),this.states[e][s]||(this.states[e][s]={}),this.states[e][s]=r}buildPageInstructionsByContext(e,t){const n=this.getStateMachinesByContext(e)||{},r=[];return Object.keys(n).sort().forEach((s=>{const a=Pn.getContextReferences(e)?.get(s),o=n[s];if(a){const e=o.buildSubmitPageInstructions(t);r.push(...e)}})),r}buildClientChangeList(e){const t=this.getStateMachinesByContext(e)||{};let n={};const r={};return Object.keys(t).forEach((e=>{const r=t[e].getChangeList();n={...n,...r}})),Eh.flatten(n,"",r),r}getStateMachinesByContext(e){return e?this.states?.[e]:void 0}clearStateMachines(e){this.states[e]={},this.unConnectedStates[e]={}}removeStateMachine(e,t){delete this.states[e]?.[t]}getStateMachineObjByPath(e,t,n){const r=/\[\d+\]$/gm;let s=null;for(;e&&!this.isStateMachineExist(t,"",e);)s=null,n&&e.endsWith("]")?(s=e.match(r),s=s?.[s.length-1]?.substring(1,s[s.length-1].length-1),[e]=e.split(r)):e=e.substring(0,e.lastIndexOf("."));return e?{stateMachineTarget:e,stateMachine:this.getStateMachine(t,"",e),index:s}:{}}executeStateMachine(e,t,n,r=!0,s={}){const{stateMachineTarget:a,index:o}=this.getStateMachineObjByPath(t,e,r);if(!a)return!1;let[,i]=t.split(a);if(!i)return!1;null!==o&&([,i]=i.split(/^\[\d+\]/gm));const c={[Jc(i)]:n},l=this.getStateMachine(e,"",a);return null!==o?l.update(c,Number(o)+1,s.skipStateUpdate??!0,s):l.updatePage(Eh.unflatten(c)),!0}registerForServerChanges(){Zp.registerForListChanges(((e,t,n)=>{!t.includes(".classID")&&Yc.isPropertyEditable(e,t)&&this.executeStateMachine(e,t,n)}))}unRegisterForServerChanges(){Zp.unRegisterForListChanges()}},Xc={},Jc=e=>e.startsWith(".")?e.substring(1):e,Qc=e=>{delete Xc[e]},Zc=(e,t={})=>{const{includeDisabledFields:n=!1}=t,r=Ch.resolveContextTreeNodeProps(e),s=!0!==r.readOnly&&!1!==r.visibility&&(n||!0!==r.disabled),a="string"==typeof e?.value&&e?.value.includes("@FILTERED_LIST"),o=(e=>e.selectionList||e.selectionKey||"Editable"===e.renderMode&&e.referenceList)(e);return(e?.value||o)&&!a&&s},el=(e,t,n,r,s)=>{let a=(ch(`.attachmentsList.${t?.replace(".","")}`,"context_data",n)||[]).filter((e=>`${r.pageReference}.${e.label}`===s));return a=Eh.buildAttachmentsFormData(a),a.length>0&&(e=[...e,...a]),e},tl=(e,t,n,r,s)=>(Kc.executeStateMachine(e,r,Ch.getLitePropertyValue(n,t))||s.push(r),s),nl=e=>{const t=e.pageReference?.replace(F.CASE_INFO.CASE_INFO_CONTENT,"")?.replace(F.DATA_INFO.DATA_INFO_CONTENT,"");return"Attachment"===e.componentName&&""!==t},rl=(e,t,n)=>{const r=t.isInsideList,{ignoreFieldsInsideList:s=!0}=n;return(!r||r&&!s)&&!Array.isArray(Ch.getLitePropertyValue(t,e))&&"Address"!==t.componentName},sl=(e,t={})=>{let n=[],r=[];const s=[],a=Pn.getContextReferences(e);if(!a)return{formInputs:n,attachments:r,formPageFields:s};if(({attachmentList:r,editableFormFieldsReferenceList:n}=((e,t,n)=>{const{includeDisabledFields:r=!1}=n;let s=[],a=[];for(const[o,i]of e){const e=Ch.resolveContextTreeNodeProps(i.props),c=e.propertyName;if(Zc(i.props,{includeDisabledFields:r})){const r=nl(e);"Attachment"!==e.componentName||r?!r&&rl(o,e,n)&&(s=tl(t,c,e,o,s)):a=el(a,c,t,e,o)}}return{attachmentList:a,editableFormFieldsReferenceList:s}})(a,e,t)),Xc[e])for(const t in Xc[e].fieldOrder)Object.hasOwn(Xc[e].fieldOrder,t)&&s.push(t);return{formInputs:n,attachments:r,formPageFields:s}},al=e=>{let t=[];const n=Pn.getContextReferences(e);if(n)for(const[e,r]of n){const n=r?.props;if(Zc(n)&&"Attachment"===n?.componentName){const r="true"===n?.allowMultiple;t=[...t,{type:"File",allowMultiple:r,fullPath:e}]}}return t},ol=(e,t={})=>{const n={},r=ah(e),{ignoreFieldsInsideList:s=!0,isTransientContext:a=!1,includeDisabledFields:o=!1}=t;if(a||r?.caseInfo?.content){const{formInputs:t,attachments:i,formPageFields:c}=sl(e,{ignoreFieldsInsideList:s,includeDisabledFields:o});i&&i.length>0&&Eh.buildObject("caseInfo.attachments",n,i),((e,t,n)=>{e.forEach((e=>{let r=Eh.getIn(t,e);"object"==typeof r&&(r=Eh.deepClone(r),delete r?.classID),Eh.buildObject(e,n,r)}))})(c,r,n),t&&t.length>0?t.forEach((e=>{Eh.buildObject(e,n,Eh.getIn(r,e))})):a||Eh.buildObject(F.CASE_INFO.CASE_INFO_CONTENT,n,{})}if(!a&&r?.dataInfo?.content){const{formInputs:t}=sl(e,{ignoreFieldsInsideList:s});t.forEach((e=>{Eh.buildObject(e,n,Eh.getIn(r,e))}))}return n},il=(e,t)=>{const n=Pn.getContextReferences(e);let r=!0;if(!n)return r;for(const[e,s]of n){const n=Ch.resolveContextTreeNodeProps(s.props);if(Zc(s.props)&&(!t||e.includes(t))){const e=Or.validate(n.componentName?.toLowerCase(),n.propertyName,Ch.getLitePropertyValue(n,n.propertyName),n);r&&(r=!e.message)}}return r},cl=(e,t=!1)=>{const n=Pn.getContextReferences(e),r=[];if(n)for(const[e,s]of n){if(!1!==Ch.resolveContextTreeNodeProps(s.props).visibility){const n=8,s=t?e:e.substring(e.indexOf("content")+n);r.push(s)}}return r},ll=e=>{const t=[],n=Pn.getContextReferences(e);if(n)for(const[e,r]of n){const n=Ch.resolveContextTreeNodeProps(r.props);Zc(r.props)&&"Attachment"!==n.componentName&&"multirecordlist"!==n.type&&t.push({name:e,label:n.label,type:n.componentName?.toLowerCase()})}return t};const ul=class{static getPropertyName(e){return Qt.getPropertyName(e)}static isProperty(e){return Qt.isProperty(e)}static getLeafPropertyName(e){return Qt.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}};const dl=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}};class pl{constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,t,n,r,s){void 0===e[t]&&(e[t]={}),e[t][n]=[{uniqueHash:r,callback:s}]}registerForRefresh(e,t,n,r,s){const a=r.split("/").join(j.HASH_DELIMITER),o=Eh.getHashedString(a);if("PROP_CHANGE"===e)if(this.propChangeRefreshMap?.[s]?.[n]){this.propChangeRefreshMap[s][n].some((e=>e.uniqueHash===o))||this.propChangeRefreshMap[s][n].push({uniqueHash:o,callback:t})}else pl.initializeRefreshCache(this.propChangeRefreshMap,s,n,o,t);else if(this.refreshMap?.[s]?.[`${e}-${n}`]){this.refreshMap[s][`${e}-${n}`].some((e=>e.uniqueHash===o))||this.refreshMap[s][`${e}-${n}`].push({uniqueHash:o,callback:t})}else pl.initializeRefreshCache(this.refreshMap,s,`${e}-${n}`,o,t)}triggerRefreshForType(e,t,n){"PROP_CHANGE"===e?this.propChangeRefreshMap?.[n]?.[t]&&this.propChangeRefreshMap[n][t].forEach((e=>e.callback())):this.refreshMap?.[n]?.[`${e}-${t}`]&&this.refreshMap[n][`${e}-${t}`].forEach((e=>e.callback()))}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}}const hl=new pl,{APP:gl}=j;let fl={},ml={},yl={};const Il="You will lose unsaved changes. Do you want to continue?",El="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",Al=(e=gl.APP,t,n)=>{let r=[],s=[];t||(r=cl(e,!0)),n||(s=(e=>{const t=Pn.getContextReferences(e),n=[];if(t)for(const[e,r]of t)!0===Ch.resolveContextTreeNodeProps(r.props).readOnly&&n.push(e);return n})(e));const a={};((e,t)=>{const n=ml[t]||{};Object.keys(n).forEach((t=>{Object.hasOwn(n,t)&&Eh.buildObject(t,e,n[t].value)}))})(a,e);const o=fl[e]||{};return Object.keys(o).forEach((e=>{const n=!t&&r.includes(e)||t;Object.prototype.hasOwnProperty.call(o,e)&&n&&!s.includes(e)&&Eh.buildObject(e,a,o[e].value)})),a},_l=e=>{const{context:t}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;delete fl[t]?.[n],delete ml[t]?.[n]},Sl=e=>yl[e],Cl=(e,t)=>{const{context:n,initialValue:r="",isStrictTracking:s}=t,a=t.reference.startsWith(".")?t.reference.substr(1):t.reference;e[a]?e[a].previousValue=ch(t.reference,null,n):(e[a]={initialValue:r||ch(t.reference,null,n)},e[a].previousValue=e[a].initialValue),e[a].value=t.value,s&&e[a].value===e[a].initialValue&&_l(t)},Tl=e=>{const{payload:t}=e,{context:n}=t,r=t.reference.startsWith(".")?t.reference.substr(1):t.reference;Pn.isFieldExists(n,r)||(ml[n]=ml[n]||{},Cl(ml[n],t)),fl[n]=fl[n]||{},Cl(fl[n],t)},Nl=e=>{const t=mr(e)||{};return e&&fl[e]&&Object.keys(fl[e]).some((t=>fl[e][t].initialValue!==fl[e][t].value))||Object.keys(t).length>0},Pl=(e,t)=>{if(!e||!t)return!1;const n=fl[e]&&fl[e][t];return!!n&&n.previousValue!==n.value},Dl=e=>{e&&fl[e]?(fl[e]={},ml[e]={}):"all"===e&&(fl={},ml={},yl={}),yl[e]&&(yl[e]=!1)},Rl=()=>e=>t=>{const{type:n,payload:r={}}=t||{};if(n===ee&&(qt(r),(e=>{const{context:t,pageReference:n,value:r,reference:s}=e;Zp.triggerCascade(t,s,r);const a=Kt.getDependencies(t,s),o=Zp.getResetDependencies(t,s),i={context:t,datapages:{}};[...a,...o].forEach((e=>{const n=Eh.getPropertyNameFromDependency(e);if("multiRecord"===e.mode){const e=n.split("."),r=`.${e.pop()}`,s=e.join(".");Kc.getStateMachine(t,s,r).deleteAll()}else dl.isPageInstruction(n)&&Kc.executeStateMachine(t,n,""),sh({type:Q,payload:{reference:n,value:"",context:t,isArrayDeepMerge:!0,isImplicit:!0}})})),a.forEach((r=>{let s=n;r.startsWith(n)||(s="");const a=r.replace(`${s}`,"").split(".").filter((e=>!!e));a.pop();const o=a.join("."),c=ch(`.${o}`,s,t)?.classID||e.classID,l=vp(r.split(".").pop(),c),{datasource:u}=l,d={};let p=[];u.parameters.forEach((e=>{e?.value?(d[e.name]=ul.isProperty(e.value)?ch(`.${Eh.getFullPropertyReference([o,Eh.getPropertyName(e.value)])}`,s,t):e.value,void 0===d[e.name]||null===d[e.name]||""===d[e.name]?(d[e.name]="",p.push(j.NULL_STRING)):p.push(d[e.name])):(d[e.name]="",p.push(j.NULL_STRING))})),p=u.name.concat(j.UNDERSCORE_STRING,Eh.getHashedString(p.join(j.HASH_DELIMITER)));const{name:h}=u,g=Vp(h);i.datapages[p]={mode:u.mode,propertyName:r,name:u.name,dataViewParameters:d,refreshStrategy:g?.refreshStrategy}})),a.length&&sh({type:et,payload:i})})(r),(Pl(r.context,r.reference)||Nr(r.context))&&Un(r),hl.triggerRefreshForType("PROP_CHANGE",r.reference,r.context)),n===rt){const{context:e,referenceList:t}=r;Un({context:e,pageReference:t})}if(n===Q||n===Z){const{reference:e,isImplicit:n,context:s,skipDirtyValidation:a=!1}=r;Pn.updateFieldNodeValue(s,e,r.value),dl.isPageInstruction(e)||a?a||(yl[`${s}`]=!0):Tl(t),(r.removePropertyFromChangedList||n)&&_l(r)}if(n===Re||n===be){const{transientItemID:e,data:t}=r;Eh.iterateLeafNodes(t,(t=>{_l({context:e,value:"",reference:t.join(".")})}))}if(n&&[xe,Ce,Me,De].includes(n)){Dl(r.context),Zp.purgeResetDependencies(r.context),(e=>{e&&bn[e]&&delete bn[e]})(r.context);(r.childContainersContexts||[]).forEach((e=>{Dl(e)}));(r.transientItems||[]).forEach((e=>{Dl(e)}))}e(t)};const bl=new class{getCoreheaders(e){const t=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${j.PRIMARY}`,n=pd(t),r=fd(n),s=Ch.getProperty(j.COREHEADERS,"",r);if(s&&e in s)return s[e]}};const Ol=class{constructor(e){this.c11nEnv=e}validate(e,t){const{value:n}=this.c11nEnv.getStateProps();if(!t&&!(t=n)){const e=this.c11nEnv.getComponentConfig(),n=this.c11nEnv.getStateProps();t="multi"===e.selectionMode?n.selectionList:"Editable"===e.renderMode?n.referenceList:"single"===e.selectionMode?n.selectionKey:n.value}const r=((e,t,n)=>{const r=""===t&&n?.startsWith(".")?n.substring(1,n.length):n,s=Pn.getContextReferences(e)?.get(`${t}${r}`)?.props;return s?Ch.resolveContextTreeNodeProps(s):s})(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),t),{message:s}=Or.validate(this.c11nEnv.getComponentName()?.toLowerCase(),t,e,r);return s?{status:!1,message:s}:{status:!0}}},vl="OPEN_PROCESS_ACTION",xl="OPEN_ASSIGNMENT",wl="DELETE_CASE_IN_CREATE_STAGE",Ml="SAVE_AND_CLOSE",Ll=e=>({type:Ml,payload:e});const Ul=class{static getSavableDataPage(e){return qp(e)}static getLookUpDataPage(e){return Yp(e)}static getLookUpDataPageInfo(e){return Kp(e)}static getDataPageKeys(e){return zp(e)}};const Fl=class{constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{const t=ln.getNextActionMgrId();let n,r;const s=new Promise(((e,t)=>{n=e,r=t}));return ln.register(t,s,n,r,e),{actionMgrID:t,promise:s}};initializeContainers(e){const t=Ae,n=this.c11nEnv,r={context:n.getContextName(),name:n.getContainerName(),type:j.CONTAINER_TYPE.SINGLE},{actionMgrID:s,promise:a}=this.containerManagerPromise(t),o={...r,...e,actionMgrID:s};return sh(Lh(o)),a}addContainerItem(e){const t=Se,n=this.c11nEnv,r=n.getMetadata(),{children:s}=r||{};let a;s&&([a]=s);const o=n.getContextName(),i=n.getContainerName(),c=H(i,o,e?.containerType===j.CONTAINER_TYPE.SINGLE),l=mt(i,o),u={root:{...a,config:{...a?.config,context:a?.config?.context||n.getPageReference?.()}},containerItemID:c,context:c,target:l,containerName:i};e=JSON.parse(JSON.stringify(e)),[j.WORKAREA].includes(i)&&delete e.data?.coreHeaders;const{actionMgrID:d,promise:p}=this.containerManagerPromise(t),h={...u,...e,actionMgrID:d};return sh(Fh(h)),p}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));const t=xe,n={context:fd(e.containerItemID),target:Od(e.containerItemID)},{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return sh(Gh(a)),s}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));const t=ve,n={target:Od(e.containerItemID)},{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return sh(zh(a)),s}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));const t=Ce,n={context:fd(e.containerItemID),target:Od(e.containerItemID)},{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return sh(Kh(a)),s}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));const t=_e,n=Dd(e),{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return sh(Uh(a)),s}addTransientItem(e){const{id:t,data:n}=e,r=this.c11nEnv.getContextName(),s=z(t,r),a=Ld(r);return s&&a.includes(s)||sh(jh({transientItemID:s,contextName:r,target:Od(r),data:n})),s}updateTransientData(e){const{transientItemID:t,data:n}=e,r=this.c11nEnv.getContextName();if(t){if(!Ld(r).includes(t))return;sh(Vh({transientItemID:t,data:n}))}}removeTransientItem(e){const t=this.c11nEnv.getContextName(),{target:n=this.c11nEnv.getTarget(),containerItemID:r,transientItemID:s}=e;if(s&&r){if(!Ld(t).includes(s))return;sh(Jh({target:n,containerItemID:r,transientItemID:s}))}}createContainerPConnect(e,t,n,r=!1){Qu.createContainerPConnect(e,t,n,r)}hasContainerItems(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return Cd(`${e}/${t}`)}isContainerInitialized(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return ud(e,t)}};var jl=function(e,t){return e===t||"function"==typeof t&&e===t.toString()};function Vl(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,r,s=e.length;return n=1===s?function(t){return jl(t.type,e[0])}:function(t){for(var n=0;n<s;n++)if(jl(t.type,e[n]))return!0;return!1},vi((function(e,t){var s=0;e.subscribe(xi(t,(function(e){return n.call(r,e,s++)&&t.next(e)})))}))}function kl(e,t){return vi((function(n,r){var s=null,a=0,o=!1,i=function(){return o&&!s&&r.complete()};n.subscribe(xi(r,(function(n){null==s||s.unsubscribe();var o=0,c=a++;Ri(e(n,c)).subscribe(s=xi(r,(function(e){return r.next(t?t(n,e,c,o++):e)}),(function(){s=null,i()})))}),(function(){o=!0,i()})))}))}function $l(e,t){return vi((function(n,r){var s=0;n.subscribe(xi(r,(function(n){r.next(e.call(t,n,s++))})))}))}function Bl(e,t,n){return void 0===n&&(n=1/0),qo(t)?Bl((function(n,r){return $l((function(e,s){return t(n,e,r,s)}))(Ri(e(n,r)))}),n):("number"==typeof t&&(n=t),vi((function(t,r){return function(e,t,n,r,s,a,o,i){var c=[],l=0,u=0,d=!1,p=function(){!d||c.length||l||t.complete()},h=function(e){return l<r?g(e):c.push(e)},g=function(e){a&&t.next(e),l++;var i=!1;Ri(n(e,u++)).subscribe(xi(t,(function(e){null==s||s(e),a?h(e):t.next(e)}),(function(){i=!0}),void 0,(function(){if(i)try{l--;for(var e=function(){var e=c.shift();o?Oi(t,o,(function(){return g(e)})):g(e)};c.length&&l<r;)e();p()}catch(e){t.error(e)}})))};return e.subscribe(xi(t,h,(function(){d=!0,p()}))),function(){null==i||i()}}(t,r,e,n)})))}function Gl(e){return e&&qo(e.schedule)}function Wl(e){return e[e.length-1]}function Hl(e){return Gl(Wl(e))?e.pop():void 0}function ql(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ji(e,Hl(e))}function zl(e){return vi((function(t,n){var r,s=null,a=!1;s=t.subscribe(xi(n,void 0,void 0,(function(o){r=Ri(e(o,zl(e)(t))),s?(s.unsubscribe(),s=null,r.subscribe(n)):a=!0}))),a&&(s.unsubscribe(),s=null,r.subscribe(n))}))}var Yl=new Ei((function(e){return e.complete()}));function Kl(e){return e?function(e){return new Ei((function(t){return e.schedule((function(){return t.complete()}))}))}(e):Yl}const Xl=(e,t,n)=>zl((r=>("ERR_CANCELED"!==r?.code&&console.error(e,r),ql(rg(e,r,t,null,n))))),Jl=(e,t)=>n=>new Ei((r=>{let s={},a=0;return n.pipe(Bl((n=>{const r=Date.now();let o;return o=t||h(),o&&o(n,s)&&r-a<e?Kl():(s=n,a=r,ql(n))}))).subscribe(r)})),Ql=e=>{const{dataPageID:t,context:n,headers:r,containerItemID:s}=e,a={data_view_ID:t},{restApi:o,reqType:i}=_g("createDataObject",a),{content:c}=Dc(s);return ji(pc(o,{method:i,headers:r,body:{data:c.content}},s)).pipe($l((t=>({response:t.data,actionInPayload:e}))),Xl("Error occurred during ajax call at createDataObject Epic",n))},Zl=e=>{const{dataLookUp:t,context:n,headers:r,viewName:s,requestPayload:a}=e,o={data_view_ID:t,view_ID:s},{restApi:i,reqType:c}=_g("readDataObject",o);return ji(pc(i,{method:c,headers:r,body:{dataViewParameters:a}},n)).pipe($l((t=>({response:t.data,actionInPayload:e}))),Xl("Error occurred during ajax call at getDataObjectView Epic",n))},eu=e=>{const{dataPageID:t,context:n,headers:r,containerItemID:s,key:a}=e,o={data_view_ID:t},{restApi:i,reqType:c}=_g("updateDataObject",o),{content:l}=Dc(s);return ji(pc(i,{method:c,headers:r,body:{data:{...l.content,...a},pageInstructions:l.pageInstructions||[]}},s)).pipe($l((t=>({response:t.data,actionInPayload:e}))),Xl("Error occurred during ajax call at updateDataObject Epic",n))},tu=e=>{const{lookupDatapage:t,context:n,headers:r,actionID:s,dataViewParameters:a}=e,o={data_view_ID:t,action_ID:s},{restApi:i,reqType:c}=_g("openDataObjectAction",o);return ji(pc(i,{method:c,headers:r,body:{dataViewParameters:a}},n)).pipe($l((t=>({response:t.data,actionInPayload:e}))),Xl("Error occurred during ajax call at getDataObjectView Epic",n))},nu=e=>{const{savableDatapage:t,context:n,headers:r,actionID:s,keys:a,containerItemID:o}=e,i={data_view_ID:t,action_ID:s},{restApi:c,reqType:l}=_g("submitDataObjectAction",i),{content:u}=Dc(o);return ji(pc(c,{method:l,headers:r,body:{data:{...u?.content,...a},pageInstructions:u?.pageInstructions||[]}},n)).pipe($l((t=>({response:t.data,actionInPayload:e}))),Xl("Error occurred during ajax call at getDataObjectView Epic",n))};const ru=new class{constructor(){this.components={}}_checkComponent(e,t){return!!this.components[t]?.[e]}start(e,t,n,r,s){const a={viewName:e,pageReference:n,contextName:r,isInProgress:!0,active:!0,caseKey:t};this.components[r]=this.components[r]||{},this.components[r][s]=a}stop(e,t){this._checkComponent(e,t)&&(this.components[t][e].isInProgress=!1)}remove(e,t){this._checkComponent(e,t)&&delete this.components[t][e]}removeContext(e){delete this.components[e]}enableCascade(e){this.components[e]&&Object.values(this.components[e]).forEach((e=>{e.isInProgress&&(e.cascade=!0)}))}activate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!0)}deactivate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!1)}refreshActiveComponents(e){e&&this.components[e]&&Object.keys(this.components[e]).forEach((t=>{this.refreshComponent(t,e)}))}refreshComponent(e,t){if(!this._checkComponent(e,t))return;const n=this.components[t][e];if(n.active&&n.cascade){const{caseKey:e,viewName:r,pageReference:s}=n;vn(e,r,t,s,{})}}},su="postDataViewMetadata",au={getData:(e,t,n,r)=>((e,t,n,r={})=>{const s={dataViewName:e},{skipClearErrorMessages:a,signal:o,doNotMergeMessagesForStatusCode:i}=r,{restApi:c,reqType:l}=_g("getListData",s);return pc(c,{method:l,body:t,...o&&{signal:o},...a&&{skipClearErrorMessages:a}},n,i)})(e,t,n,r),getListCount:(e,t,n)=>{const r={dataViewName:e},{restApi:s,reqType:a}=_g("getListDataCount",r);return pc(s,{method:a,body:t},n)},getDataViewMetadata:(e,t,n,r)=>{const s=!!n,a=!!r,o=ip.doesRestApiExist(su),i=(s||a)&&o?su:"getDataViewMetadata",c={dataViewName:e},{restApi:l,reqType:u}=_g(i,c);if(o){if(s)return pc(l,{method:u,body:{associationFilter:n}},t);if(a)return pc(l,{method:u,body:{propertyFilter:r}},t)}return pc(l,{method:u},t)},getDataObjectView:(e,t,n,r,s={})=>{const{skipClearErrorMessages:a,signal:o,doNotMergeMessagesForStatusCode:i}=s,c={data_view_ID:e,view_ID:t},l={dataViewParameters:n},{restApi:u,reqType:d}=_g("readDataObject",c);return pc(u,{method:d,body:l,...o&&{signal:o},...a&&{skipClearErrorMessages:a}},r,i)},getCaseEditMetadata:(e,t)=>Sc.getCaseEditMetadata(e,t),getCaseEditLock:(e,t)=>Sc.getCaseEditLock(e,t),updateCaseEditFieldsData:(e,t,n,r)=>Sc.updateCaseEditFieldsData(e,t,n,r),moveListRecords:(e,t)=>{const{sourceID:n,destinationID:r,context:s,listClass:a,viewName:o,viewClassName:i}=e,c={viewName:o,viewClassName:i},{restApi:l,reqType:u}=_g("moveListRecords",c);return pc(l,{method:u,body:{content:{sourceID:n,destinationID:r,context:s,listClass:a}}},t)},isTimeElapsed:(e,t,n="")=>{if(t){if(e&&n===j.RELOAD_IF_OLDER_THAN)return new Date(e).setSeconds(t)<Date.now();if(e&&n===j.RELOAD_ONCE_PER_INTERACTION)return!0}return!0},getAppCacheKey:e=>void 0!==Id("root").find((e=>e.includes("authoring-preview")))?`${j.AUTHORING_PREVIEW_CONTAINER}-${e}`:`${Mr.getAppAlias()}-${e}`,isDistinctResultsOnly:e=>{const t=cp.getKeyMapping("pyGUID");return!e.some((e=>e.field===t))}};const ou=class{constructor(e,t,n){this.filter=e,this.messageHandler=t,this.contextName=n}};const iu=class{constructor(){this.users={},this.connected=!1,this.connectionsCount=1}_handleUserPresence({message:e}){const{state:t,updateById:n}=e,r=this.users[n];r&&(r.state=t,Object.keys(r.subscribers).forEach((e=>{r.subscribers[e]?.callback({state:r.state})})))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t,n){const r=this._getAutoGenId(),s=this.users[e];if(s)return s.subscribers[r]={callback:t,contextName:n},r;this.users[e]={subscribers:{[r]:{callback:t,contextName:n}}};const a={matcher:"PRESENCE",criteria:{userId:e}};return hu.subscribe(a,this._handleUserPresence.bind(this)),r}unsubscribe(e,t){const n={matcher:"PRESENCE",unsubscribeUsers:{users:[e]}};this.users[e]&&this.users[e].subscribers&&(delete this.users[e].subscribers[t],0===Object.keys(this.users[e].subscribers).length&&(delete this.users[e],hu.publishMessage(n)))}getUserState(e){return this.users[e]&&this.users[e].state}clearContext(e){Object.keys(this.users).forEach((t=>{Object.keys(this.users[t].subscribers).forEach((n=>{this.users[t].subscribers[n].contextName===e&&this.unsubscribe(t,n)}))}))}};var cu=s(924),lu=s.n(cu);const uu=class{constructor(e,t){this.atomicSubscribers={},this.connectionsCount=1,this.connected=!1,this.matcher=e,this.criteria=t}_handleAtomicMessage({message:e}){Object.keys(this.atomicSubscribers).forEach((t=>{const n=this.atomicSubscribers[t],r=Object.keys(n.criteria),s=Object.keys(e);0===lu()(r,s).length&&n.callback(e)}))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t){if(!this.connected){const e={matcher:this.matcher,criteria:this.criteria};hu.subscribe(e,this._handleAtomicMessage.bind(this)),this.connected=!0}const n=this._getAutoGenId();return this.atomicSubscribers[n]={criteria:e,callback:t},n}unsubscribe(e){delete this.atomicSubscribers[e]}};const du=new class{constructor(){this.subscriptions={}}getOrCreateSubscription(e){if(!this.subscriptions[e]){const t={caseId:e};this.subscriptions[e]=new uu("CASE",t)}return this.subscriptions[e]}};class pu{static subscribers={};static connectionsCount=0;static webSocket=null;static connectionConfig=null;static inProgressSubscriptions=[];static inProgressMessages=[];static isServiceAlive=null;static serviceAliveHandler=null;static userPresence=new iu;static refreshB2SOffset=10;static initConnection(e){if(!e)return;const{messagingService:t}=e;if(!t||t&&t.length<=6)return;const n=Mr.b2sJWT;if(!n||n.length<4)return;this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close());const r=t.endsWith("/")?t+"ws":t+"/ws";try{const e=new WebSocket(`${r}`);this.webSocket=e,e.addEventListener("open",this.handleOnOpen.bind(this)),e.addEventListener("message",this.handleOnMessage.bind(this)),e.addEventListener("error",this.handleOnError.bind(this)),e.addEventListener("close",this.handleOnClose.bind(this))}catch(e){console.log(e)}}static handleOnError(e){this.getTokenExpiryTime()<=0&&(clearInterval(this.reInitInterval),this.reInitInterval=void 0),console.log("web socket connection error event: ",e)}static handleOnClose(e){null!==this.serviceAliveHandler&&(clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=null),e&&4001===e.code||this.connectionConfig?.disableReInit||this.reInitInterval||this.getTokenExpiryTime()<=0||this.reInitialization()}static handleOnOpen(){if(clearInterval(this.reInitInterval),this.reInitInterval=void 0,null!==this.webSocket&&1===this.webSocket.readyState){const e=Mr.b2sJWT;if(!e||e.length<4)return;this.publishMessage({token:e})}}static handleOnMessage(e){if(null!==e&&"ALIVE"===e.data)null===this.isServiceAlive&&this.checkLiveliness(8e3),this.isServiceAlive=!0;else{let t=null;try{t=JSON.parse(e.data)}catch(t){console.error("Invalid data received from messaging service",e.data)}if(t&&t.msgId&&this.webSocket.send(`{"ack":"${t.msgId}"}`),t&&t.filter){const{matcher:e,criteria:n}=t.filter;delete n.environmentID,Object.keys(this.subscribers).forEach((r=>{const s=this.subscribers[r];s.filter.matcher===e&&Eh.isEqual(s.filter.criteria,n)&&s.messageHandler(t)}))}else if(t&&t.tokenExpiryTime){this.setTokenExpiryTime(t);const e=1e3*(this.getTokenExpiryTime()-this.refreshB2SOffset);setTimeout((()=>this.refreshB2STokenReInit()),e);let n=[];this.inProgressSubscriptions.forEach((({messageSubscriber:e,id:t})=>{n?.includes(t)||(n?.push(t),this.subscribeToSocket(e,t))})),this.inProgressSubscriptions=[],this.inProgressMessages.forEach((e=>{this.publishMessage(e)})),this.inProgressMessages=[],n=null}else console.error("filter missing from received data from messaging service",e.data)}}static reInitialization(e){this.reInitInterval||(Object.keys(this.subscribers).forEach((e=>{this.inProgressSubscriptions.push({messageSubscriber:this.subscribers[e],id:e})})),e?this.initConnection(this.connectionConfig):this.reInitInterval=setInterval((()=>{this.initConnection(this.connectionConfig)}),5e3))}static checkLiveliness(e){!1===this.isServiceAlive?this.reInitialization(!0):this.isServiceAlive=!1,null!==this.serviceAliveHandler&&clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=setTimeout((()=>{this.checkLiveliness(e)}),e)}static setConnectionConfig(e){this.connectionConfig=e}static cleanSocketListeners(){null!==this.webSocket&&(this.webSocket.removeEventListener("open",this.handleOnOpen.bind(this)),this.webSocket.removeEventListener("message",this.handleOnMessage.bind(this)),this.webSocket.removeEventListener("error",this.handleOnError.bind(this)),this.webSocket.removeEventListener("close",this.handleOnClose.bind(this)))}static disconnect(){null!==this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close(),this.webSocket=null)}static subscribe(e,t,n,r){this.connectionsCount+=1;const s=r||`${Date.now()}_${this.connectionsCount}`,a=new ou(e,t,n);return null!==this.webSocket&&1===this.webSocket.readyState?(this.subscribeToSocket(a,s),s):(this.inProgressSubscriptions.push({messageSubscriber:a,id:s}),null===this.webSocket&&this.initConnection(this.connectionConfig),s)}static subscribeToSocket(e,t){this.subscribers[t]=e;const n={filter:e.filter,subscribe:{id:t}};this.webSocket.send(JSON.stringify(n))}static unsubscribe(e){if(this.subscribers[e]){delete this.subscribers[e];const t={unsubscribe:{id:e}};null!==this.webSocket&&1===this.webSocket.readyState&&this.webSocket.send(JSON.stringify(t))}}static publishMessage(e){null!==this.webSocket?null===this.webSocket||1!==this.webSocket.readyState?this.inProgressMessages.push(e):this.webSocket.send(JSON.stringify(e)):console.error("Web socket not initialized.")}static getUserPresence=()=>this.userPresence;static getCaseSubscription=e=>du.getOrCreateSubscription(e);static refreshB2STokenReInit=async()=>{const e={body:{B2SToken:Mr.b2sJWT}};PCore.getRestClient().invokeRestApi("refreshB2S",e).then((e=>{const{newB2SToken:t}=e.data;t&&t.length>30?(Mr.b2sJWT=t,this.setTokenExpiryTime({tokenExpiryTime:Math.round(Date.now()/1e3)+60}),this.webSocket.close()):console.log("refreshB2S: invalid b2s length")})).catch((e=>{console.log(`refreshB2S: error occurred while fetching: ${e}`)}))};static getTokenExpiryTime=()=>{const e=Math.round(Date.now()/1e3);return this.tokenExpiryTime-e};static setTokenExpiryTime=e=>{this.tokenExpiryTime=e.tokenExpiryTime};static clearContext(e){Object.keys(this.subscribers).forEach((t=>{this.subscribers[t].contextName===e&&this.unsubscribe(t)})),this.userPresence.clearContext(e)}}const hu=pu;const gu=class{constructor(){this.records=[],this.maxRecords=0,this.isDirty=!1}getRecords(e){if(e){const t=[],{pageNumber:n,pageSize:r}=e,s=n*r;let a=s-r;for(;a<s;a+=1){if(!this.records[a])return this.maxRecords===a?t:[];t.push(this.records[a])}return t}return this.records}mergeRecords(e,t){if(t){const{pageNumber:n,pageSize:r}=t,s=n*r;let a=0;for(let t=s-r+1-1;t<s;t+=1)this.records[t]=e[a],a+=1;if(e.length<r){const t=(n-1)*r+e.length;this.setMaxRecordsCount(t)}}else e||(e=[]),Array.isArray(this.records)&&Array.isArray(e)&&(this.records=gh(this.records,e,{isArrayDeepMerge:!1})),this.setMaxRecordsCount(this.records.length)}setMaxRecordsCount(e){this.maxRecords=e}getMaxRecordsCount(){return this.maxRecords}};const fu=new class{constructor(){this.dataStore={},this.dataStoreMeta={},this.subscribers={},this.dataPageSubscribers={},this.isCacheEnabled=!0,this.subscribedDataPageNames=new Set}SUBSCRIPTION_STATUS_FAILED="FAILED";SUBSCRIPTION_STATUS_SUCCESS="SUCCESS";DATAPAGE_NOT_CACHED="Data Page Not Cached";DUPLICATE_SUBSCRIPTION_ID="Duplicate Subscription Id";MISSING_MANDATORY_FIELD="Missing Mandatory Field(s)";getData(e,t,n,r){const s=this.generateHash(e,t,r);if(this.dataStore[e]&&this.dataStore[e][s]){const t=this.dataStore[e][s];return t.isDirty?[]:t.getRecords(n)}return[]}generateHash(e,t,n){const r=Vp(e);let s=[];r||(s=Object.keys(t||{}).map((e=>({name:e}))));let a="",o=e;const i=[];return(r?.parameters||s).forEach((e=>{t?.[e.name]?i.push(t[e.name]):i.push(e.defaultValue??j.NULL_STRING)})),n&&i.push(JSON.stringify(n)),i.join(j.HASH_DELIMITER)&&(a=Eh.getHashedString(i.join(j.HASH_DELIMITER)),o=e+j.UNDERSCORE_STRING+a),o}async getDataAsync(e,t,n={},r,s,a={}){if(this.subscribeToMessageService(e),a.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),!this.isCacheable(e,s)||a.invalidateCache){const o=await this.fetchData(e,n,r,s,t,a),i=o?.data?.data??[];return{...o.data,data:i,pageNumber:o?.data?.pageNumber,pageSize:o?.data?.pageSize,queryStats:o?.data?.queryStats,status:o?.status}}const o=this.getData(e,n,r,s);if(o.length>0)return Promise.resolve({data:o});const i=await this.fetchData(e,n,r,s,t,a);return{...i.data,data:this.mergeDataStore(e,n,r,s,i),pageNumber:i?.data?.pageNumber,pageSize:i?.data?.pageSize,queryStats:i?.data?.queryStats,status:i?.status}}async getPageDataAsync(e,t,n={},r={}){this.subscribeToMessageService(e);const s=this.generateHash(e,n,null);if(r.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),this.isCacheable(e)&&this.dataStore[e]&&this.dataStore[e][s]){if(!r?.invalidateCache)return Promise.resolve(this.dataStore[e][s]);delete this.dataStore[e][s],this._removeDataStoreMetaEntry(e,n,s)}const{restApi:a,reqType:o}=_g(j.GET_PAGE_DATA,{dataViewName:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))}),i={method:o},c=a&&n&&0===Object.keys(n).length?a.split("?")[0]:a;return pc(c,i,t).then((t=>(this.isCacheable(e)&&(this.dataStore[e]={...this.dataStore[e],[s]:t.data},this._addDataStoreMetaEntry(e,n,s)),t.data)))}subscribeToDataPageUpdates(e,t,n,r={}){if(!e||!t||!n)return!1;const s=this.generateHash(n,r,null);this.dataPageSubscribers[n]??={};const a=this.dataPageSubscribers[n];a[s]??={};const o=a[s];return!o[e]&&(o[e]??=t,!0)}unsubscribeToDataPageUpdates(e,t,n={}){if(!e||!t)return!1;const r=this.generateHash(t,n,null);return delete this.dataPageSubscribers[t]?.[r]?.[e],!0}_isDataPageCached(e,t){if(t&&Eh.isObjectEmpty(t))return!!this.dataStore[e];const n=this.generateHash(e,t,null);return!!this.dataStoreMeta[e]?.[n]?.length}updateDataPageStore(e={}){Object.keys(e).forEach((t=>{this.dataStore[t]||(this.dataStore[t]={});const n=e[t];Object.keys(n).forEach((n=>{if(this.dataStore[t][n]){this.dataStore[t][n].mergeRecords(e[t][n].pxResults)}else{const r=new gu;this.dataStore[t][n]=r,r.mergeRecords(e[t][n].pxResults||[])}}))}))}_addDataStoreMetaEntry(e,t,n){const r=this.generateHash(e,t,null);this.dataStoreMeta[e]??={};const s=this.dataStoreMeta[e];s[r]??=[];const a=s[r];a.includes(n)||a.push(n)}_removeDataStoreMetaEntry(e,t,n){if(!e||t||n||(this.dataStoreMeta[e]={}),e&&t&&n){const r=this.generateHash(e,t,null);this.dataStoreMeta[e][r]=this.dataStoreMeta[e][r].filter((e=>e!==n))}}mergeDataStore(e,t,n,r,s){const a=this.generateHash(e,t,r),o=s?.data?.data;if(!o||0===o.length)return[];this.dataStore[e]||(this.dataStore[e]={}),this.dataStore[e][a]||(this.dataStore[e][a]=new gu);const i=this.dataStore[e][a];return i.mergeRecords(o,n),i.isDirty=!1,this._addDataStoreMetaEntry(e,t,a),i.getRecords(n)}async fetchData(e,t,n,r,s,a){const{additionalApiParams:{useExtendedTimeout:o=!1,includeTotalCount:i=!1}={},...c}=a,l={dataViewParameters:t};return i&&(l.includeTotalCount=!0),o&&(l.useExtendedTimeout=!0),n&&(l.paging=n),r&&(l.query=r),au.getData(e,l,s,c)}isDataPage(e=""){return e.startsWith("D_")||e.startsWith("Declare_")}handleCascadeUpdate(){const{dataPageName:e,scope:t}=this;t.handleMessage({message:{datapage:e,parameters:""}})}subscribeToUpdate(e,t,n,r,s,a){this.subscribers[e]=this.subscribers[e]||{},this.subscribers[e].callback=this.subscribers[e].callback||{},a&&!this.subscribers[e].callback?.[a]&&(this.subscribers[e].callback[a]=s),this.subscribeToCascadeUpdates(e,t,n,r,a)}unsubscribe(e,t,n,r,s){delete this.subscribers[e]?.callback?.[s],t&&t.length>0&&Zp.unRegisterFields(n,r,t,s)}subscribeToCascadeUpdates(e,t,n,r,s){t&&t.length>0&&Zp.registerFields(n,r,t,this.handleCascadeUpdate.bind({dataPageName:e,scope:this}),s)}subscribeToMessageService(e){if(e&&this.subscribedDataPageNames.has(e))return;const t={matcher:"DATAPAGE_UPDATED",criteria:{datapage:e}};hu.subscribe(t,this.handleMessage.bind(this)),this.subscribedDataPageNames.add(e)}handleMessage(e){const{msgId:t,message:n}=e,{datapage:r,parameters:s=""}=n,a=this.subscribers[r];this.markDataInstanceDirty(r,""===s?null:JSON.parse(s)),this._executeDataPageSubscriptions(e),!t&&a?.callback&&Object.keys(a.callback).forEach((t=>{a.callback?.[t](e.message)}))}markDataInstanceDirty(e,t){let n,r;if((!t||(n=this.generateHash(e,t,null),r=this.dataStoreMeta[e]?.[n],r))&&this.dataStore[e]){Object.keys(this.dataStore[e]).filter((e=>!t||!r||r.includes(e))).forEach((t=>{this.dataStore[e][t].isDirty=!0}))}}_executeDataPageSubscriptions(e){const{message:t}=e,{datapage:n,parameters:r}=t,s=r?JSON.parse(r):null;if(this.dataPageSubscribers[n])if(s){const t=[];t.push(this.generateHash(n,s,null)),t.push(this.generateHash(n,null,null)),t.forEach((t=>{const r=this.dataPageSubscribers[n]?.[t]??{};Object.keys(r).forEach((t=>{r[t](e.message)}))}))}else{const t=this.dataPageSubscribers[n];Object.keys(t).forEach((n=>{const r=t[n];Object.keys(r).forEach((r=>{t[n][r](e.message)}))}))}}isPerInteraction(e){const t=Vp(e);return"reloadOncePerInteraction"===t?.refreshStrategy?.type}isCacheable(e,t){return!(this.isPerInteraction(e)||!this.isCacheEnabled)&&!(t&&Object.keys(t).length>1)}disableCache(e){this.isCacheEnabled=!e}};const mu=class{constructor(e,t,n,r,s=100,a=500){this.finalDataViewCall=e,this.combiner=t,this.comparator=n,this.separator=r,this.maxtime=s,this.maxsize=a,this.groupedDataViewArray=[]}findCombinableDataViewCall(e){return this.groupedDataViewArray.find((t=>this.comparator(t,e)))}dequeueAllDataViewCalls(){for(this.groupedDataViewArray.reverse();this.groupedDataViewArray.length>0;){const e=this.groupedDataViewArray.pop();this.finalDataViewCall(e).then((t=>{this.separator(e,t)}))}clearTimeout(this.timeoutId)}dequeueDataViewCallOnSizeExceed(e){const t=this.groupedDataViewArray.findIndex((t=>this.comparator(t,e)));this.groupedDataViewArray[t]&&(this.groupedDataViewArray.splice(t,1),this.finalDataViewCall(e).then((t=>{this.separator(e,t)})))}queueDataViewCall(e,t){let n,r,s=this.findCombinableDataViewCall(e);return n=new Promise((e=>{r=e})),s&&!s.dataViewCallMap[t]?(this.combiner(s,e),s.dataViewCallMap[t]={promise:n,resolve:r}):s?n=s.dataViewCallMap[t].promise:(s={...e,dataViewCallMap:{[t]:{promise:n,resolve:r}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[t]:{promise:n,resolve:r}}})),Object.keys(s.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(s):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>this.dequeueAllDataViewCalls()),this.maxtime)),n}};const yu=class{constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,t,n,r,s,a,o){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new mu(t,n,s,r,a,o)),this.bufferedDataQueues[e]}},Iu=(e,t)=>((e,t)=>1===Object.keys(e).length&&Object.keys(e).length===Object.keys(t).length)(e,t)&&((e,t)=>"EQ"===t.F0.comparator&&(e.F0.comparator===t.F0.comparator||"IN"===e.F0.comparator))(e,t)&&e.F0.ignoreCase===t.F0.ignoreCase,Eu=e=>e.map((e=>e.field)),Au=(e,t)=>{const n=(e.query?.filter).filterConditions,r=(t.query?.filter).filterConditions;let s=(t.query?.filter).logic;const a=Object.keys(n).length;Iu(n,r)?("EQ"===n.F0.comparator&&(e=>{const t=e?.F0.rhs.value;e.F0.rhs={values:[t]},e.F0.comparator="IN"})(n),n.F0.rhs.values.push(r.F0.rhs.value)):(Object.keys(r).forEach(((e,t)=>{const o=`F${a+t}`;n[o]=r[e],s=s.replace(e,o)})),(e.query?.filter).logic+=` OR ${s}`);const o=Eu(e.query?.select);Eu(t.query?.select).forEach((t=>{o.includes(t)||(e.query?.select).push({field:t})}))},_u=(e,t)=>((e,t)=>Object.keys(e.filterConditions).length%Object.keys(t.filterConditions).length==0&&!Object.keys(t.filterConditions).some((n=>e.filterConditions[n].lhs.field!==t.filterConditions[n]?.lhs.field)))(e.query?.filter,t.query?.filter)&&(((e,t)=>e.dataViewParameters&&t.dataViewParameters&&Object.keys(t.dataViewParameters).length===Object.keys(e.dataViewParameters).length&&!Object.keys(e.dataViewParameters).some((n=>"string"==typeof t.dataViewParameters?.[n]?e.dataViewParameters?.[n]!==t.dataViewParameters?.[n]:!Eh.isEqual(e.dataViewParameters?.[n],t.dataViewParameters?.[n]))))(e,t)||((e,t)=>!e.dataViewParameters&&!t.dataViewParameters)(e,t)),Su=(e,t)=>{const{data:n}=t,{dataViewCallMap:r,filterDataOnClient:s}=e;Object.keys(r).forEach((e=>{r[e].resolve({data:s(e,n)})}))},Cu=e=>({combiner:Au,comparator:_u,separator:Su,...e}),Tu=(e,t)=>{try{window.sessionStorage.setItem(e,t)}catch(e){}};class Nu{constructor(e,t){this.isInitialised=!1,this.isQueryable=!0,this.dataSourceMetaData={},this.nonQueryableData=[],this.fetchedNQData=!1,this.previousSearchText=null,this.totalRecordCount=0,this.fetchedRecordCount=0,this.cache={},this.pageNumber=0,this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null,this.dataSource="",this.bufferInitialized=!1,e&&(this.listType=e.listType,this.dataSource=e.dataSource,e.enablePagination?(this.enablePagination=e.enablePagination,this.pageSize=e.pageSize):this.maxResultsDisplay=e.maxResultsDisplay,this.parameters=e.parameters,this.columns=e.columns,this.matchPosition=e.matchPosition,this.ignoreCase=!1!==e.ignoreCase,this.dataSourceMetaData=e.dataSourceMetaData,this.context=t)}static searchResultsCache={};static init(e,t){return new Promise(((n,r)=>{const s=[...e.columns.map((e=>e.value)),...Object.entries(e.parameters).map((([e,t])=>`${e}+${t}`)),e.matchPosition,e.maxResultsDisplay].join(j.HASH_DELIMITER),a=Eh.getHashedString(s),o=`${e.dataSource}_${a}`,i=au.getAppCacheKey(e.dataSource);if(window.sessionStorage.getItem(i)){const s=JSON.parse(window.sessionStorage.getItem(i));if(t&&Nu.searchResultsCache?.[t]?.[o])n(Nu.searchResultsCache[t][o]);else if("form"!==e.cacheLifeSpan&&Nu.searchResultsCache?.persisted?.[o])n(Nu.searchResultsCache.persisted[o]);else{const a=new Nu(e,t);JSON.stringify(s.associationFilter)===JSON.stringify(e.associationFilter)?(a.dataSourceMetaData=s.dataSourceMetaData,a.isQueryable=s.isQueryable,a.isInitialised=s.isInitialised,a.associationFilter=s.associationFilter,Nu.initializeCache(t,e,o,a),n(a)):(a.associationFilter=e.associationFilter,a.propertyFilter=e.propertyFilter,a.fetchMetaData(t).then((r=>{Tu(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),a.isQueryable=r.data.isQueryable,a.dataSourceMetaData=r.data,a.isInitialised=!0,Nu.initializeCache(t,e,o,a),n(a)})).catch((e=>{a.isInitialised=!1,r(e)})))}}else if(e.deferDatasource&&Vp(e.dataSource)){const r=new Nu(e,t),s=Vp(e.dataSource);r.isQueryable=!!s?.isQueryable,r.isInitialised=!0,r.dataSourceMetaData=s,Tu(i,JSON.stringify({isQueryable:s?.isQueryable,dataSourceMetaData:s,isInitialised:!0})),r.context=t,Nu.initializeCache(t,e,o,r),n(r)}else{const s=new Nu(e,t);s.associationFilter=e.associationFilter,s.propertyFilter=e.propertyFilter,s.fetchMetaData(t).then((r=>{Tu(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),s.isQueryable=r.data.isQueryable,s.dataSourceMetaData=r.data,s.isInitialised=!0,Nu.initializeCache(t,e,o,s),n(s)})).catch((e=>{s.isInitialised=!1,r(e)}))}}))}static bufferedDataView=new yu;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage(Cu(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete Nu.searchResultsCache[e]}static initializeCache(e,t,n,r){e&&"form"===t.cacheLifeSpan?.toLowerCase()?(void 0===Nu.searchResultsCache[e]&&(Nu.searchResultsCache[e]={}),Nu.searchResultsCache[e][n]=r):(void 0===Nu.searchResultsCache.persisted&&(Nu.searchResultsCache.persisted={}),Nu.searchResultsCache.persisted[n]=r)}fetchMetaData(e){return au.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){Nu.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,(e=>fu.getDataAsync(this.dataSource,this.context,e.dataViewParameters,e.paging,e.query)),e.combiner,e.separator,e.comparator,e.waitTime,e.maxSize)}buildSchemaForQueryableBufferDP(e){return{...this.buildSchemaForQueryableDP(e),paging:void 0,filterDataOnClient:this.filterDataOnClient.bind(this)}}getData(e,t){if(this.isQueryable){if(this.bufferInitialized)try{const t=this.buildSchemaForQueryableBufferDP(e);return Nu.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(t,e)}catch{const n=this.buildSchemaForQueryableDP(e,t);return fu.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}const n=this.buildSchemaForQueryableDP(e,t);return fu.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}return this.fetchNonQueryableResults(e,t)}memoizedGetData(e,t){const n=e?.toLowerCase();if(this.enablePagination?n in this.cache&&this.pageNumber in this.cache[n]:n in this.cache)return this.enablePagination?this.cache[n][this.pageNumber]:this.cache[n];const r=this.getData(e,t);return this.enablePagination?(this.cache[n]=this.cache[n]||{},this.cache[n][this.pageNumber]=r):this.cache[n]=r,r}fetchData(e,t=!1,n){return this.isValidDatasource()&&this.isInitialised?(this.pageNumber=t?this.pageNumber:1,this.memoizedGetData(e,n)):Promise.reject(new Error)}fetchPaginatedData(e){return this.pageNumber+=1,this.fetchData(e,!0)}fetchNonQueryableResults(e,t){if(void 0===e)return Promise.resolve({data:[]});if(this.fetchedNQData)return Promise.resolve({data:this.filterDataOnClient(e,this.nonQueryableData,t)});if(this.isNQDataFetchInProgress)return this.fetchNQDataPromise?.then((()=>({data:this.filterDataOnClient(e,this.nonQueryableData,t)}))).catch((e=>Promise.reject(e)));if(this.dataSourceMetaData?.structure&&"list"===this.dataSourceMetaData.structure.toLowerCase()){const n=this.buildSchemaForNonQueryableDP();return this.fetchNQDataPromise=fu.getDataAsync(this.dataSource,this.context,n.dataViewParameters),this.isNQDataFetchInProgress=!0,new Promise(((n,r)=>{this.fetchNQDataPromise?.then((r=>(this.nonQueryableData=[...r.data],this.fetchedNQData=!0,n({data:this.filterDataOnClient(e,this.nonQueryableData,t)})))).catch((e=>r(e))).finally((()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null}))}))}return Promise.resolve(null)}filterDataOnClient(e,t,n){const r=(n?.columns??this.columns)?.filter((e=>e.useForSearch)).map((e=>e.value));return t.reduce(((t,s)=>(Object.keys(s).every((a=>!(r?.includes(a)&&s[a]&&this.positionMatches(`${s[a]}`,e,n))||(t.push({...s}),!1))),t)),[])}positionMatches(e,t,n){const r=n?.ignoreCase??this.ignoreCase,s=r?e.toLowerCase():e,a=r?t.toLowerCase():t;switch(n?.matchPosition??this.matchPosition){case"start":return s.startsWith(a);case"contains":return s.includes(a);case"equals":return s===a;default:return!1}}buildSelect(e){const t=[],n=[];return(e?.columns??this.columns)?.forEach((e=>{if(!n.includes(e.value)){n.push(e.value);const r={field:e.value};t.push(r)}})),t}buildFilters(e,t){const n=t?.matchPosition??this.matchPosition,r=t?.ignoreCase??this.ignoreCase,s={};let a=0;(t?.columns??this.columns)?.forEach((t=>{if(t.useForSearch){const o=`F${a}`;a+=1;const i={field:t.value},c={value:e};let l="CONTAINS";"start"===n?l="STARTS_WITH":"equals"===n&&(l="EQ");const u={...`${parseFloat(e)}`!==e==!0&&{ignoreCase:r?"true":"false"},lhs:i,rhs:c,comparator:l};s[o]=u}}));const o=Object.keys(s).join(" OR ");return{filterConditions:s,logic:o}}buildQuery(e,t){const n=this.buildSelect(t);return e?{select:n,filter:this.buildFilters(e,t),...au.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}:{select:n,...au.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e,t){return{dataViewParameters:this.parameters,query:this.buildQuery(e,t),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}}const Pu=Nu;const Du=class{static cleanCaches(e){Zp.purgeCascadeFields(e),ru.removeContext(e),Pu.clearContextedCache(e),Br.cleanContextSubscribers(e),Qc(e),Pn.removeContextTreeNode(e),hu.clearContext(e),hl.deRegisterForRefresh(e)}},Ru="GET_DESCENDANTS";const bu=new class{MISSING_CONTEXT_PARAM="context is required parameter";INVALID_CONTEXT_DETAILS="Invalid Context";INVALID_CONTEXT_OPERATION="Invalid Operation on Given Context";schedulePendingActionOnCompletion(e,t){const n=[],r=t.context_data?.blocking_action_counter??0,s=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let a=t.context_data?.is_deferred_action_in_progress??!1;if(r<=0){if(a)n.push({type:fe,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else{if(!(s.length>0))return;{const t=s.shift();a=!a,n.push({type:fe,payload:{context:e,data:{context_data:{deferred_action_queue:s,blocking_action_counter:r,is_deferred_action_in_progress:a}}}}),n.push(t)}}sh(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));const t=ah(e?.payload?.context);if(t){const n=[],r=t.context_data?.blocking_action_counter??0,s=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let a=t.context_data?.is_deferred_action_in_progress??!1;return s.length<=0&&!a&&(r<=0?(n.push(e),a=!a):s.push(e),n.unshift({type:fe,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:s,blocking_action_counter:r,is_deferred_action_in_progress:a}}}}),sh(n)),Promise.resolve()}return Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}handleDeferredActionCompletion(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t=ah(e);return t&&!0===t.context_data?.is_deferred_action_in_progress?(sh({type:fe,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}}),this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}registerBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));return ah(e)?(sh({type:at,payload:{context:e,isInitiateBlockingAction:!0}}),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}deRegisterBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t={...ah(e)};return t.context_data={...t.context_data},t&&t.context_data?.blocking_action_counter>0?(sh({type:at,payload:{context:e,isInitiateBlockingAction:!1}}),t.context_data.blocking_action_counter-=t.context_data.blocking_action_counter,this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;const t=ah(e);if(t){const n={...t};n.context_data={...n.context_data},n.context_data?.deferred_action_queue&&Eh.rejectPendingActions(n.context_data.deferred_action_queue)&&(n.context_data.deferred_action_queue=[]),n.context_data?.blocking_action_counter&&(n.context_data.blocking_action_counter=0),n.context_data?.is_deferred_action_in_progress&&(n.context_data.is_deferred_action_in_progress=!1),sh({type:fe,payload:{context:e,data:{...n}}}),cn.disableLoadingIndicator({context:e})}}},Ou=(e,t)=>{const n={},r=Ul.getLookUpDataPage(e),s=Ul.getDataPageKeys(r);if(s)for(const e of s)n[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];return{dataViewParameters:n,dataPageID:r,dataPageKeys:s}},vu=(e,t)=>{const n=Ul.getSavableDataPage(e),r=Ul.getDataPageKeys(n);return r.forEach((e=>{e.isAlternateKeyStorage&&(e.keyName===e.linkedField||Object.keys(t).includes(e.linkedField))?e.keyName=t[e.linkedField]:e.isAlternateKeyStorage&&Object.keys(t).includes(e.keyName)&&e.keyName!==e.linkedField?(t[e.linkedField]=t[e.keyName],delete t[e.keyName]):e.keyName=t[e.keyName]})),{keys:t,dataPageID:n,dataPageKeys:r}},xu=e=>{Br.publish(F.PUB_SUB_EVENTS.EVENT_CANCEL,e)},wu=(e,t,n)=>{const{callbacks:r}=n;return n.callbacks=null,e(t,n).then((e=>{"cancel"===e?r?.cancel?.():r?.submit?.()}))};const Mu=class{constructor(e){this.c11nEnv=e}MSG_CLASSNAME_REQUIRED="className is required parameter";MSG_CLASSNAME_STRING="className must be a string";MSG_ACTION_ID_REQUIRED="actionID is required parameter";MSG_ACTION_ID_STRING="actionID must be a string";MSG_ACTION_NAME_REQUIRED="actionName is required parameter";MSG_ACTION_NAME_STRING="actionName must be a string";MSG_KEY_PROPERTIES_REQUIRED="keyProperties is required parameter";MSG_DATAVIEWID_REQUIRED="dataViewID is required parameter";MSG_DATAVIEWID_STRING="dataViewID must be a string";MSG_CONTAINERITEMID_REQUIRED="containerItemID is required parameter";MSG_CONTAINERITEMID_STRING="containerItemID must be a string";MSG_PAGENAME_REQUIRED="pageName is required parameter";MSG_PAGENAME_STRING="pageName must be string";MSG_INSIGHTID_REQUIRED="insightID is required parameter";MSG_DASHBOARDID_REQUIRED="DashboardID is required parameter";MSG_ACTIVE_SUGGESTION_UNATTENDED="You must accept or decline autofilled fields.";MSG_CASE_ID_REQUIRED="caseID is required parameter";MSG_CONTEXT_STRING="context must be string";shouldDeleteCaseInCreateStage=(e,t,n)=>!e&&t||n;getSaveActionPayload=(e,t=!1)=>{const n=e,r=n&&n.includes(j.MODAL),s=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),a=this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),o=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENTACTION_ID),i=this.c11nEnv.getContainerName(),c=this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID),l=t?void 0:il(this.c11nEnv.getContextName()),u=this.c11nEnv.getValue("isProcessAction","isProcessAction");return Nh.buildActionObject({context:n,containerItemID:e,assignmentID:a,actionID:o,caseID:s,containerName:i,caseType:c,isModalAction:r,isFormValid:l,isProcessAction:u,saveOnly:t},this.c11nEnv)};actionsApiPromise=(e,t,n=!0)=>{let r,s,a=null;a=t&&null!==t.actionMgrID?t.actionMgrID:ln.getNextActionMgrId();const o=new Promise(((e,t)=>{r=e,s=t}));return ln.register(a,o,r,s,e,t,n),{actionMgrID:a,promise:o}};showDataObjectCreateView(e,t=F.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){const n=Nh.buildActionObject({viewName:t,className:e},this.c11nEnv),r=ne,{promise:s}=this.actionsApiPromise(r,n);return sh({type:r,payload:{...n,containerName:F.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),s}cancelDataObject(e){if(!e)return Promise.reject(new Error("containerItemId is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=e;if(!Nl(t)){return new Fl(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}const n=He,r=Nh.buildActionObject({containerItemID:e,context:t},this.c11nEnv),s=t&&t.includes(j.MODAL);sh({type:n,payload:{...r,isModalAction:s,isDataObject:!0,skipReleaseLockRequest:!0}});const{promise:a}=this.actionsApiPromise(n,r);return a.then((()=>{xu({})}))}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));const{data:t}=rh()?.getState()||{},n=t[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));const r=Ul.getSavableDataPage(n),s=ot,a=!!e&&e.includes(j.MODAL),o=Nh.buildActionObject({containerItemID:e,dataPageID:r},this.c11nEnv),{promise:i}=this.actionsApiPromise(s,o);return sh({type:"CREATE_DATA_OBJECT",payload:{...o,isModalAction:a,isFormValid:il(e)}}),i}deleteDataObject(e,t){if(!e)return Promise.reject(new Error("className is required parameter"));if(!t)return Promise.reject(new Error("keys is required parameter"));const n=it,r=Ul.getSavableDataPage(e),s=Ul.getDataPageKeys(r),a={};if(s)for(const e of s)a[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const o=Nh.buildActionObject({dataViewName:r,dataViewParameters:a},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);return sh({type:"DELETE_DATA_OBJECT",payload:{...o}}),i}getDataObjectView(e,t,n={viewName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!t)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));const r=ct,{dataPageID:s,dataViewParameters:a}=Ou(e,t),o=Nh.buildActionObject({dataLookUp:s,keyProperties:t,requestPayload:a,viewName:n.viewName||F.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:j.MODAL},this.c11nEnv),{promise:i}=this.actionsApiPromise(r,o);return sh({type:"VIEW_DATA_OBJECT",payload:{...o}}),i}updateDataObject(e,t){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(!t)return Promise.reject(new Error("keys is required parameter"));const{data:n}=rh()?.getState()||{},r=n[e]?.dataInfo?.content?.classID;if(!r)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));const{dataPageID:s,keys:a}=vu(r,t),o=lt,i=e&&e.includes(j.MODAL),c=Nh.buildActionObject({containerItemID:e,dataPageID:s,key:a},this.c11nEnv),{promise:l}=this.actionsApiPromise(o,c);return sh({type:"UPDATE_DATA_OBJECT",payload:{...c,isModalAction:i,isFormValid:il(e)}}),l}openDataObjectAction(e,t,n,r){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!t)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(!r)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));const s=ut,{dataViewParameters:a,dataPageID:o,dataPageKeys:i}=Ou(e,t),c=Nh.buildActionObject({actionID:n,actionName:r,dataViewParameters:a,lookupDatapage:o,containerName:j.MODAL,dataViewPayload:i,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:l}=this.actionsApiPromise(s,c);return sh({type:s,payload:{...c}}),l}submitDataObjectAction(e,t,n){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));if(!t)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));const{data:r}=rh()?.getState()||{},s=r[e]?.dataInfo?.content?.classID;if(!s)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));const a=Jd(e),o=Od(a),i=sd(o,a)||{},{resourceType:c="",key:l=""}=i,u=dt,{dataPageID:d,keys:p}=vu(s,t),h=Nh.buildActionObject({containerItemID:e,actionID:n,resourceType:c,key:l,keys:p,savableDatapage:d,containerName:j.MODAL,context:e},this.c11nEnv);h.context=e;const{promise:g}=this.actionsApiPromise(u,h);return sh({type:u,payload:{...h,isFormValid:il(e)}}),g}createWork(e,t={flowType:"",containerName:"",openCaseViewAfterCreate:!1,modalOptions:{dockable:!1},startingFields:Object,remoteCaseMeta:{},channelName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,"pyStartCase");const{dockable:n=!1}=t?.modalOptions||{};let r=le;const s=Nh.buildActionObject({class:e,flowType:"pyStartCase",containerName:j.PRIMARY,openCaseViewAfterCreate:!0,...t,modalOptions:{isDockable:n}},this.c11nEnv),{promise:a}=this.actionsApiPromise(r,s);if(t.channelName&&(s.headers=s.headers||{},s.headers[j.X_ORIGIN_CHANNEL]=t.channelName),$.isRemoteCase(e)){const{RemoteClassName:t,RemoteSystemID:n,name:a}=$.getRemoteCase(e);if(s.className=e,s.class=t,s.headers=s.headers||{},s.headers.RemoteSystemID=n,$.isTraditionalRemoteCase(e)){const n={className:e,name:a,action:"createWork",remoteClassName:t};r=this.setTraditionalRemoteCaseParams(s,n)}}return ec.getPreviewMode()&&(s.debugInfo={debugId:Eh.generateUniqueID()}),sh({type:r,payload:{...s}}),a}setTraditionalRemoteCaseParams(e,t){return e.className=t.className,e.isTraditionalRemoteCase=$.isTraditionalRemoteCase(t.className),e.remoteClassName=t.remoteClassName,e.action=t.action,e.viewName=V,e.gadgetId=t.gadgetId??Sc.getUniqueGadgetId(),e.name=t.name,e.skipSemanticUrl=!0,ne}getDataObjectActions(e,t){if(!e)return Promise.reject(new Error(this.MSG_DATAVIEWID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_DATAVIEWID_STRING));const n=ye,r=Nh.buildActionObject({dataViewID:e,dataViewParameters:t},this.c11nEnv),{promise:s}=this.actionsApiPromise(n,r);return sh({type:n,payload:{...r}}),s}getDescendants(e,t){if(!e)return Promise.reject(new Error(this.MSG_CASE_ID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTEXT_STRING));const n=t||this.c11nEnv.getContextName(),r=Nh.buildActionObject({caseID:e,currentContext:n},this.c11nEnv),{promise:s}=this.actionsApiPromise("GET_DESCENDANTS",r),a=(o={...r,context:n},{type:Ru,payload:o});var o;return sh(a),s}openWorkByHandle(e,t,n={}){if(!e)return Promise.reject(new Error("workID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("workID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,t);const r={insKey:e,acTargetName:n.targetContainer||j.PRIMARY,containerName:n.targetContainer||j.PRIMARY};let s=ue;const a=Nh.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(s,a);return n.channelName&&(a.headers=a.headers||{},a.headers[j.X_ORIGIN_CHANNEL]=n.channelName),a.className=t,$.isRemoteCase(t)&&(s=this.setRemoteCaseParamsForOpenCase(a,t,n.remoteCaseMeta)??s),ec.getPreviewMode()&&![j.WORKAREA].includes(n.targetContainer)&&(a.debugInfo={debugId:Eh.generateUniqueID()}),sh({type:s,payload:{...n,...a}}),o}setRemoteCaseParamsForOpenCase(e,t,n={}){const{RemoteSystemID:r,RemoteClassName:s,name:a}=$.getRemoteCase(t);if(e.headers=e.headers||{},e.headers.RemoteSystemID=r,e.isRemoteCase=!0,e.remoteCaseClass=t,$.isTraditionalRemoteCase(t)){e.remoteCaseMeta=n;const r={className:t,name:a,action:ft,remoteClassName:s};return this.setTraditionalRemoteCaseParams(e,r)}}openAssignment(e,t,n={isActionFromToDoList:!1,isChild:!1,context:"",viewType:"",skipBrowserSemanticUrlUpdate:!1,containerName:"",channelName:"",remoteCaseMeta:{}}){if(!e)return Promise.reject(new Error("assignmentID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("assignmentID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.openAssignment)return window.pms.plugins.c11n.openAssignment(e,t);const r={assignmentID:e,doDeleteCaseSummary:!0,containerName:n.containerName,isActionFromToDoList:n.isActionFromToDoList,isChild:!1};n.isChild&&(r.containerName=j.PRIMARY,r.isChild=n.isChild);let s=xl;const a=Nh.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(s,a);if(n.channelName&&(a.headers=a.headers||{},a.headers[j.X_ORIGIN_CHANNEL]=n.channelName),$.isRemoteCase(t)){const{RemoteClassName:e,RemoteSystemID:r,name:o}=$.getRemoteCase(t);if(a.headers=a.headers||{},a.headers.RemoteSystemID=r,$.isTraditionalRemoteCase(t)){a.remoteCaseMeta=n.remoteCaseMeta;const r={className:t,name:o,action:"openAssignment",remoteClassName:e};s=this.setTraditionalRemoteCaseParams(a,r)}}a.className=t,a.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),ec.getPreviewMode()&&![j.WORKAREA].includes(n.containerName)&&(a.debugInfo={debugId:Eh.generateUniqueID()});const i={context:a.context||n.context,containerName:a.containerName||n.containerName,targetContainerName:a.containerName||n.containerName,viewType:a.viewType||n.viewType,skipBrowserSemanticUrlUpdate:n.skipBrowserSemanticUrlUpdate};return sh({type:s,payload:{...a,...i}}),o}finishAssignment(e,t={outcomeID:"",jsActionQueryParams:{}}){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n=fd(e);let r=n;if(n?.includes("/workarea")&&(r=n.substring(0,r?.lastIndexOf("/workarea"))),(e=>{const t=Pn.getContextReferences(e);if(t)for(const[,e]of t)if(Ch.resolveContextTreeNodeProps(e.props).hasSuggestions)return!0;return!1})(n)){const e=[{type:"error",message:up.getLocaleValue(this.MSG_ACTIVE_SUGGESTION_UNATTENDED,"Messages")}];return zn({messages:e,context:r,category:F.PAGE}),Promise.reject({type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}const s=pe,a=t?.isTriggeredFromDifferentContext,{caseID:o,assignments:i,localActionID:c,caseActions:l,caseInfo:u,businessID:d,caseTypeID:p,caseTypeName:h}=on(e,this.c11nEnv,{isTriggeredFromDifferentContext:a}),g=Zt(u);let f,m=!1;if(l){const e=l.find((e=>e.ID===c));m="Case"===e?.type}else f=ah(n);let{assignmentID:y}=on(e,this.c11nEnv,{isTriggeredFromDifferentContext:a});f?.context_data?.actionType&&(m=f.context_data.actionType===j.CASE,y=y||f.context_data.assignmentID);const I=an(i,y,c),[E,A]=o.split(" "),_={class:E,actionID:I,assignmentID:y,caseID:o,workID:A,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:m,doDeleteCaseSummary:!0,isInCreateStage:g,businessID:d,caseTypeID:p,caseTypeName:h};e?.includes(j.MODAL)&&(_.containerName=j.MODAL,_.isModalAction=!0),_.outcome=t.outcomeID,_.jsActionQueryParams=t.jsActionQueryParams,u?.isLocalAction&&(_.viewType=Tc.FORM);const S=Nh.buildActionObject(_,this.c11nEnv),{promise:C}=this.actionsApiPromise(s,S),T=this.c11nEnv.getValue("isProcessAction","isProcessAction");return S.isProcessAction=T,bu.executeOrQueueDeferredAction({type:s,payload:{...S,context:n}}),C}getNextWork(){const e=xl,t=Nh.buildActionObject({containerName:j.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:n}=this.actionsApiPromise(e,t);return sh({type:e,payload:{...t}}),n}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));const t=xl,n=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),r=this.c11nEnv.getCaseSummary().headers,s=Nh.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:a}=this.actionsApiPromise(t,s),o={type:t,payload:{...s,caseID:n,headers:r}};return sh(o),a}submitBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t="SUBMIT_BULK_ACTION",n=this.c11nEnv.getValue(F.CASE_INFO.CASES),r=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID),s={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(j.MODAL)&&(s.containerName=j.MODAL,s.isModalAction=!0);const a=Nh.buildActionObject(s,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,a),i=fd(e);return sh({type:t,payload:{...a,context:i,cases:n,actionID:r,isFormValid:il(i),classID:this.c11nEnv.getCurrentClassID()}}),o}submitBulkActionAsync(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t="SUBMIT_BULK_ACTION_ASYNC",n=this.c11nEnv.getValue(F.CASE_INFO.CASES),r=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID),s={containerName:e.includes(j.MODAL)?j.MODAL:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1,isModalAction:e.includes(j.MODAL)},a=Nh.buildActionObject(s,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,a),i=fd(e);return sh({type:t,payload:{...a,context:i,cases:n,actionID:r,isFormValid:il(i),classID:this.c11nEnv.getCurrentClassID()}}),o}openBulkAction(e,t){if(!e)return Promise.reject(new Error("actionID is required parameter for openBulkAction"));if("string"!=typeof e)return Promise.reject(new TypeError("actionID must be a string openBulkAction"));const{selectedList:n,runningMode:r}=t,s=t.type,a={selectedList:n,vcName:t.target,actionName:t?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:s,runningMode:r,...t},o="OPEN_BULK_ACTION",i=Nh.buildActionObject(a,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);return sh({type:o,payload:{...i}}),c}cancelBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=Ce,n={containerItemID:e,context:e,skipReleaseLockRequest:!0,target:`${j.APP.APP}/${j.MODAL}`,caseViewMode:j.PERFORM_MODE,deleteContext:!0};sh({type:t,payload:n});const{promise:r}=this.actionsApiPromise(t,n);return r}approveCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(sh({type:Q,payload:{reference:F.CASE_INFO.APPROVALFLAG,value:j.APPROVED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}rejectCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(sh({type:Q,payload:{reference:F.CASE_INFO.APPROVALFLAG,value:j.REJECTED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}resolveDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const[,t]=this.c11nEnv.getValue(F.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEFLAG,value:j.DUPLICATE,context:e}},r={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEID,value:t,context:e}};return sh([n,r]),this.finishAssignment(e)}ignoreDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEFLAG,value:j.IGNORE,context:e}},n={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEID,value:"",context:e}},r={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return sh([t,n,r]),this.finishAssignment(e)}openLocalAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const n=t.caseID||this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID);if(window.pms?.plugins?.c11n?.openLocalAction)return t.caseID=n,wu(window.pms.plugins.c11n.openLocalAction,e,t);const r=t.assignKey||this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),s=t.type,a={caseID:n,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,localActionType:s,...t},o="OPEN_LOCAL_ACTION",i=Nh.buildActionObject(a,this.c11nEnv),c=this.c11nEnv.getContextName(),{promise:l}=this.actionsApiPromise(o,i),u=Id(c)[0];let d,p=!1;if(!u)return d=c,sh({type:o,payload:{...i,contextName:c,continueExecution:p}}),l;d=pd(u);const h=rd(u);if(h?.accessedOrder.forEach((e=>{n===h.items[e].key&&(p=!0,d=h.items[e].context)})),!p||d&&"review"===rh()?.getState()?.data[d]?.context_data?.caseViewMode)return sh({type:o,payload:{...i,contextName:c,continueExecution:p}}),l;const g=d,f=g&&g.includes(j.MODAL),m=t.assignKey||this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),y=ah(d),I=y?.caseInfo?.assignments?y.caseInfo.assignments[0]?.actions[0]?.ID:void 0,E=this.c11nEnv.getContainerName(),A=this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID),_=this.c11nEnv.getValue("isProcessAction","isProcessAction"),S=Nh.buildActionObject({context:g,containerItemID:d,assignmentID:m,actionID:I,caseID:n,containerName:E,caseType:A,isModalAction:f,isFormValid:!0,isProcessAction:_},this.c11nEnv);S.context=d;const C=fd(d),T=this.c11nEnv.getCaseSummary(),N=Zt(T),P=Nh.buildActionObject({caseID:n,containerItemID:d,cancelContext:C},this.c11nEnv);let D={};return f?(P.acTargetName=j.MODAL,P.isInCreateStage=N,P.isModalAction=f,D={...P}):D={...P,acName:mt(this.c11nEnv.getContainerName(),P.context)},sh({type:o,payload:{...i,contextName:c,saveActionPayload:S,cancelActionPayload:D,continueExecution:p}}),l}openProcessAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const n=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID)||t.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return t.caseID=n,wu(window.pms.plugins.c11n.openProcessAction,e,t);const r=this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID)||t.assignKey,s=t.type,a={caseID:n,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,processActionType:s,isProcessAction:!0,...t},o=vl,i=Nh.buildActionObject(a,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);return sh({type:o,payload:{...i}}),c}navigateToStep(e,t){if(!e)return Promise.reject(new Error("stepID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("stepID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n="NAVIGATE_TO_STEP",r=this.c11nEnv.getValue(F.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(F.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),s=Zt(this.c11nEnv.getCaseSummary()),a={ID:r,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:t,doDeleteCaseSummary:!0,isInCreateStage:s};t&&t.includes(j.MODAL)&&(a.acTargetName=j.MODAL);const o=Nh.buildActionObject(a,this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o),c=fd(t);return sh({type:n,payload:{...o,containerItemID:t,context:c}}),i}cancelAssignment(e,t){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:n}=F,r=he,s=fd(e),a=e&&e.includes(j.MODAL),o=this.c11nEnv.getCaseSummary(),i=Zt(o),c=this.c11nEnv.getValue(n.CASE_INFO_ID),l=this.c11nEnv.getValue(n.ASSIGNMENT_ID),u=Nh.buildActionObject({caseID:c,containerItemID:e,context:s},this.c11nEnv);let d={};a?(u.acTargetName=j.MODAL,u.isInCreateStage=i,u.isModalAction=a,d={...u}):d={...u,acName:mt(this.c11nEnv.getContainerName(),u.context)};const{promise:p}=this.actionsApiPromise(r,u);return sh({type:r,payload:d}),p.then((()=>{t||xu({caseID:c,assignmentID:l,context:this.c11nEnv.getContextName()})}))}cancelLocalAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=F,n=e,r=He,s=e&&e.includes(j.MODAL),a=this.c11nEnv.getValue(t.CASE_INFO_ID),o=Nh.buildActionObject({caseID:a,containerItemID:e,context:n},this.c11nEnv);if(!Nl(n)){return new Fl(this.c11nEnv).removeContainerItem({containerItemID:e}).then((()=>{xu({caseID:a,context:this.c11nEnv.getContextName()})}))}sh({type:r,payload:{...o,isModalAction:s}});const{promise:i}=this.actionsApiPromise(r,o);return i}cancelCreateStageAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=F,n=He,r=e,s=r&&r.includes(j.MODAL),a=this.c11nEnv.getCaseSummary(),o=Zt(a),i=this.c11nEnv.getValue(t.CASE_INFO_ID),c=Nh.buildActionObject({caseID:i,containerItemID:e,context:r},this.c11nEnv),l=this.c11nEnv.getValue("isProcessAction","isProcessAction"),u=cp.isCoexistenceAppOfType(j.APP_TYPE.UIKIT);if(c.isProcessAction=l,o&&(s||u)&&!tn(a)){const t=this.c11nEnv.getValue(j.CASE_INFO.IS_FIRST_ASSIGNMENT),i=Nl(r);if(this.shouldDeleteCaseInCreateStage(i,t,u))return this.deleteCaseInCreateStage(e);sh({type:n,payload:{...c,isModalAction:s,isChildCase:sn(a),isInCreateStage:o}})}const{promise:d}=this.actionsApiPromise(n,c);return d.then((()=>{}))}saveAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=Ml,n=this.getSaveActionPayload(e,!0),{promise:r}=this.actionsApiPromise(t,n);return sh(Ll(n)),r}saveAndClose(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=Ml,n=this.getSaveActionPayload(e),{promise:r}=this.actionsApiPromise(t,n);return sh(Ll(n)),r}deleteCaseInCreateStage(e,t=!1){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n=wl,r=e,s=r&&r.includes(j.MODAL),a=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),o=this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID),i=Nh.buildActionObject({caseID:a,caseType:o,containerItemID:e,context:r,ignoreCaseDeletion:t},this.c11nEnv),c=this.c11nEnv.getValue("isProcessAction","isProcessAction"),l=this.c11nEnv.getValue(F.CASE_INFO.PARENTCASEINFO);i.isProcessAction=c,i.parentCaseInfo=l;const u=`${j.APP.APP}/${td.PRIMARY}`,d=Lc(u,td.PRIMARY);i.parentContext=d,s&&(i.targetName=j.MODAL,i.containerName=td.MODAL,i.isModalAction=s),sh((e=>({type:wl,payload:e}))(i));const{promise:p}=this.actionsApiPromise(n,i);return p.then((()=>{xu({caseID:a,context:this.c11nEnv.getContextName()})}))}getRecents(e){if(!e)return Promise.reject(new Error("maxResultsToFetch is required parameter"));if("number"!=typeof e)return Promise.reject(new TypeError("maxResultsToFetch must be number"));let{restApi:t}=ip.getRestEndPoint("getRecents")||{};t=`${t}?maxResultsToFetch=${e}`;const n=E()+t;return pc(n,{method:"GET",headers:{}})}updateRecents(e,t,n,r){const{restApi:s}=ip.getRestEndPoint("updateRecents")||{},a=`${E()}${s}`;return pc(a,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:n,pyID:t,classID:e,ID:r}})}logout(){const{restApi:e}=ip.getRestEndPoint("Logout")||{},t=`${E()}${e}`;return pc(t,{method:"GET",headers:{}}).then((e=>(Object.keys(Pn.rootNodes).forEach((e=>{Du.cleanCaches(e)})),Pn.rootNodes={},sessionStorage.clear(),yh(),Promise.resolve(e))))}invoke(e,t={}){const n={method:t.method||"GET",body:t.body};return pc(e,n,this.c11nEnv.getContextName())}showCasePreview(e,t={}){this.loadView(e,"pyCasePreview",{container:td.PREVIEW,containerName:td.PREVIEW,context:F.APP.APP,...t})}showDataPreview(e,t,n={}){return e?"string"!=typeof e?Promise.reject(new TypeError("dataContext must be string")):t?"object"!=typeof t?Promise.reject(new TypeError("dataContextParameters must be an object")):this.showData("pyDataPreview",e,t,{container:td.PREVIEW,containerName:td.PREVIEW,context:F.APP.APP,...n,skipSemanticUrl:!0}):Promise.reject(new Error("dataContextParameters is required parameter")):Promise.reject(new Error("dataContext is required parameter"))}loadView(e,t,n){let r=Nh.buildActionObject({caseId:e,viewName:t,caseClassName:this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID),RemoteSystemID:$.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);n||(n={containerName:this.c11nEnv.getContainerName(),updateData:!1}),n&&"object"==typeof n?(Object.hasOwn(n,"container")&&!Object.hasOwn(n,"containerName")&&(n.containerName=n.container),r={...r,...n}):r={...r,containerName:this.c11nEnv.getContainerName()};const s=te,{promise:a}=this.actionsApiPromise(s,r,!1);return sh({type:s,payload:{...r}}),a}showPage(e,t,n={containerName:"",skipSemanticUrl:""}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.showPage)return window.pms.plugins.c11n.showPage(e,t,n);const r=Nh.buildActionObject({viewName:e,className:t},this.c11nEnv),s=ne,{promise:a}=this.actionsApiPromise(s,r);return ec.getPreviewMode()&&(r.debugInfo={debugId:Eh.generateUniqueID()}),sh({type:s,payload:{...r,containerName:n.containerName||this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl}}),a}showInsight(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_INSIGHTID_REQUIRED));const n=Nh.buildActionObject({},this.c11nEnv),r=se,{promise:s}=this.actionsApiPromise(r,n);return sh({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,insightID:e}}),s}showDashboard(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));const n=Nh.buildActionObject({},this.c11nEnv),r=ae,{promise:s}=this.actionsApiPromise(r,n);return sh({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,dashboardID:e}}),s}showData(e,t,n,r={containerName:"",skipSemanticUrl:!1}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error("dataContext is required parameter"));if("string"!=typeof t)return Promise.reject(new TypeError("dataContext must be string"));const s=Nh.buildActionObject({pageName:e,dataContext:t,dataContextParameters:n},this.c11nEnv),a=re,{promise:o}=this.actionsApiPromise(a,s);return sh({type:a,payload:{...s,...r,skipSemanticUrl:Boolean(r.skipSemanticUrl)}}),o}changeHandler(e,t){Nh.changeHandler(e,t)}eventHandler(e,t){Nh.eventHandler(e,t)}triggerFieldChange(e,t,n=!1){const r=this.c11nEnv.getContextName(),s=this.c11nEnv.getPageReference(),a=Ch.getContextPath(s,e);n||this.c11nEnv.getValidationApi().validate(t),this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(e,t);let o=this.c11nEnv.getValue(j.CLASS_ID);const i=e?e.split(".").filter((e=>!!e)):[];i.length>1&&(i.pop(),o=ch(`.${i.join(".")}.classID`,s,r)),e=Eh.trimDotForProperty(e),sh({type:ee,payload:{reference:a,value:t,context:r,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:o}})}updateFieldValue(e,t,n={}){const{removePropertyFromChangedList:r=!1,isArrayDeepMerge:s=!0,contextPageReference:a="",isListEntry:o=!1,skipDirtyValidation:i=!1}=n,c=this.c11nEnv.getContextName();let l=this.c11nEnv.getPageReference();const u=a?.startsWith(l)?a.replace(l,""):a;l=a||l;const d=Ch.getContextPath(l,e);let p=!1;this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(u?`${u}${e}`:e,t,{isArrayDeepMerge:s}),this.c11nEnv.isBulkAction()&&(p=!0),e||(e=this.c11nEnv.getStateProps().value),qn({type:F.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:l,context:c,isListEntry:o}),sh({type:Q,payload:{reference:d,value:t,context:c,isArrayDeepMerge:s,skipDirtyValidation:i,...p&&{isStrictTracking:p},...r&&{removePropertyFromChangedList:r}}})}activateModalContainerItem(e){const t=Le,{context:n}=e,r=n&&n.includes(j.MODAL),s=Nh.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);r&&(s.containerName=j.MODAL,s.isModalAction=r),sh({type:t,payload:s});const{promise:a}=this.actionsApiPromise(t,s);return a}refreshCaseView(e,t,n,r={}){const{promise:s,actionMgrID:a}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:o,propertyName:i,preserveClientChanges:c,classID:l,context:u,optionalPayload:d}=r,p={actionMgrID:a,caseViewAction:!0,preserveClientChanges:c,propertyName:i,classID:l,optionalPayload:d};r.refreshFor&&(p.refreshFor=r?.refreshFor);const h=u||this.c11nEnv.getContextName(),g=this.c11nEnv.getPageReference();return!this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)&&o&&(((e,t)=>rn(e)&&!nn(e,t))(h,g)||nn(h,g))?Ln(h,n,p):vn(e,t,h,n,p),s}openEmbeddedDataModal(e,t,n,r,s,a){const o=pt,i=t.getCaseInfo().getKey(),c=`${t.getPageReference().replace(F.CASE_INFO.CASE_INFO_CONTENT,"")}${n}[${r}]`,l={targetProperty:n,index:r,viewID:e,ID:i,actionType:s,interestPage:Eh.convertPageRefToClipboardPageNotation(c),heading:a},u=Nh.buildActionObject(l,this.c11nEnv),{promise:d}=this.actionsApiPromise(o,u);if(cp.getFeatureMap().granularUIRefresh){(t.getMetadata().config.children[0].children||[]).forEach((e=>{const n=Qt.trimAnnotation(e.config.value),r=vp(n.startsWith(".")?n.replace(".",""):n,e.config.classID);if(r?.isDeclarativeTarget){const e=t.getPageReference();Pn.addFieldNode(t.getContextName(),e+c,t.viewName,n,"",{isDeclarativeTarget:!0,propertyName:n,pageReference:e+c})}}))}return sh({type:o,payload:{...u,containerName:F.MODAL,skipSemanticUrl:!0}}),d}submitEmbeddedDataModal(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=ht,n=this.c11nEnv.getPageReference().replace(F.CASE_INFO.CASE_INFO_CONTENT,""),r=fd(e),s={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),viewID:this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME),isFormValid:il(r),interestPage:Eh.convertPageRefToClipboardPageNotation(n),parentContext:this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),isModalAction:!1,target:this.c11nEnv.getTarget()};e&&e.includes(j.MODAL)&&(s.containerName=j.MODAL,s.isModalAction=!0);const a=Nh.buildActionObject(s,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,a);if(Nl(r)){const[e,t,n]=gn(this.c11nEnv.getPageReference());Pn.mutatePageList(this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),e,t,{type:Qe,rowIndex:n}),sh({type:Qe,payload:{pageReference:this.c11nEnv.getPageReference(),context:this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),isListEntry:!0}})}return bu.executeOrQueueDeferredAction({type:t,payload:{...a,context:r}}),o}fillFormWithAI(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=fd(e),n=this.c11nEnv.getPageReference(),{promise:r,actionMgrID:s}=this.actionsApiPromise(gt);return Ln(t,n,{actionMgrID:s,isFillFormWithAI:!0,preserveClientChanges:!1}),r}};const Lu=class{constructor(e){this.c11nEnv=e}async getCaseStages(e,t){const n={caseID:e},{restApi:r,reqType:s}=_g("getCaseStages",n);return(await pc(r,{method:s},t)).data.stages}getCaseTypeName(){return this.c11nEnv.getValue(j.CASE_INFO.CASE_TYPE_NAME)}getName(){return this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO_NAME)}getClassName(){return this.c11nEnv.getValue(j.CASE_INFO.CASE_TYPE_ID)}getAvailableProcesses(){return this.c11nEnv.getValue(j.CASE_INFO.AVAILABLEPROCESSES)}getKey(){return this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO_ID)}getID(){const e=this.getKey();if(e){const[,t]=e.split(" ");return t||e}}getAssignmentID(){return this.c11nEnv.getValue(j.CASE_INFO.ASSIGNMENT_ID)}getActions(){return this.c11nEnv.getValue(j.CASE_INFO.ACTION_BUTTONS)}getActiveFlowActionID(){return this.c11nEnv.getValue(j.CASE_INFO.ACTIVE_ACTION_ID)||this.c11nEnv.getValue(j.CASE_INFO.ASSIGNMENTACTION_ID)}getParentCaseInfo(){return this.c11nEnv.getValue(j.CASE_INFO.PARENTCASEINFO)}isPerform(){return this.c11nEnv.getValue(`${j.CONTEXT_DATA}${j.CASE_VIEW_MODE_PROP}`)===j.PERFORM_MODE}isReview(){return this.c11nEnv.getValue(`${j.CONTEXT_DATA}${j.CASE_VIEW_MODE_PROP}`)===j.REVIEW_MODE}isAssignmentInCreateStage(){const e=this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO);return Zt(e)}isLocalAction(){const e=this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO);return tn(e)}getCurrentAssignmentViewName(){let e=null,t=!1;if(this.c11nEnv.getValue("context_data.caseViewMode")===j.PERFORM_MODE){if(this.isLocalAction())return e;if(this.isAssignmentInCreateStage())t=!0;else{const t=this.c11nEnv.getTarget(),n=this.c11nEnv.getContextName(),r=sd(t,n),{config:s}=t&&n?r&&r.view:this.c11nEnv.getMetadata();e=s?.type===j.VIEW?s?.name:null}(e&&e.startsWith(j.PROPERTY_ANNOTATION)||t)&&(e=this.c11nEnv.getValue(j.CASE_INFO.VIEW_NAME))}return e}getActionRefreshConditions(){const e=this.c11nEnv.getValue(j.CASE_INFO.ACTIVE_ACTION_ID),t=W(this.c11nEnv.getContextName());let n;t&&(n=ah(t));const r=n?.caseInfo?.availableActions,s=ah(this.c11nEnv.getContextName()),a=s?.caseInfo?.refreshConditions;if(e){if(r){const t=r.find((t=>t.ID===e));return t?t.refreshConditions:a}return a}return this.c11nEnv.getValue(j.CASE_INFO.ACTION_REFRESH_CONDITIONS)}getBusinessID(){return this.c11nEnv.getValue(j.CASE_INFO.BUSINESS_ID)}getAssignments(){return this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO)?.assignments}getChildAssignments(){return this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO)?.childCases?.[0]?.assignments}isCaseWideLocalAction=()=>{const e=this.c11nEnv.getValue(j.CASE_INFO.ACTIVE_ACTION_ID),t=this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO_ACTIONS);if(t&&e){const n=t.find((t=>t.ID===e));return"Case"===n?.type}return!1};getAllAssignments(){const e=this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO_ACTIONS),t=this.c11nEnv.getValue(j.CASE_INFO.ASSIGNMENT_LABEL),n=this.c11nEnv.getValue(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)||[],r=this.getChildAssignments()||[];let s=JSON.parse(JSON.stringify(r));s=s.map((e=>(e.isChild=!0,e)));const a=[...n,...s];let o=JSON.parse(JSON.stringify(a));return e&&!this.isPerform()&&(o=o.map((e=>(e.name=this.getActiveCaseActionName()||e?.name||t,e)))),o}getActiveCaseActionName(){const e=this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO_ACTIONS),t=this.c11nEnv.getValue(j.CASE_INFO.ACTIVE_ACTION_ID),n=e.find((e=>e.ID===t));return n?.name||""}getFirstCaseActionName(){const e=this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO_ACTIONS);return e[0]?.name||""}hasAssignments(){const e=this.c11nEnv.getValue(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),t=this.getChildAssignments();return!!(e||t||this.isCaseWideLocalAction())}hasMessages=()=>!!this.c11nEnv.getValue("caseMessages");hasGetNextWorkLinks(){return!!this.c11nEnv.getValue(j.CASE_INFO.GETNEXTWORK)}},{RESOURCE_TYPES:Uu}=F;const Fu=class{static openCase(e,t,n,r={}){const s={insKey:e,acTargetName:n,actionMgrID:ln.getNextActionMgrId(),context:t,...r},a=ue;r&&r.channelName&&(s.headers={},s.headers[j.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=ln.actionManagerPromise(a,s.actionMgrID);return sh({type:a,payload:s}),o}static openAssignment(e,t,n,r={}){const s={assignmentID:e,vcName:n,doDeleteCaseSummary:!0,actionMgrID:ln.getNextActionMgrId(),context:t,...r},a=ge;r&&r.channelName&&(s.headers={},s.headers[j.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=ln.actionManagerPromise(a,s.actionMgrID);return sh({type:a,payload:{...s}}),o}static createCase(e,t,n,r={}){const s=le,a={class:e,acTargetName:n,actionMgrID:ln.getNextActionMgrId(),context:t,...r};r&&r.channelName&&(a.headers={},a.headers[j.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=ln.actionManagerPromise(s,a.actionMgrID);return sh({type:s,payload:{...a}}),o}static getNextWork(e,t,n={}){const r=ge,s={isGetNextWork:!0,vcName:t,doDeleteCaseSummary:!0,actionMgrID:ln.getNextActionMgrId(),context:e,...n},{promise:a}=ln.actionManagerPromise(r,s.actionMgrID);return sh({type:r,payload:{...s}}),a}static getOpenedCaseItems(e){const t=[],n=rd(e);if(n){const{items:r={}}=n,s=Object.keys(r),a=pd(e);s.forEach((n=>{if(r[n]&&(r[n].resourceType===Uu.CASE||r[n].resourceType===Uu.ASSIGNMENT)){const{key:s="",context:o}=r[n],i=r[n],c=s.substring(s.indexOf(" ")+1),l=ch(".caseTypeID",j.CASE_INFO.CASE_INFO,o),u=a===n;t.push({...i,key:s,workID:s,caseID:c,className:l,context:o,containerItemID:n,target:e,active:u})}}))}return t}static getCaseDetails=e=>{const t={caseID:e},{restApi:n,reqType:r}=_g(Be,t);return pc(n,{method:r})};static getCaseBulkActions=async e=>{const{restApi:t,reqType:n}=_g("getBulkActions"),r=e.map((e=>({ID:e}))),s=r.length,a=s/5,o={},i=[];for(let e=0;e<s;e+=a)o.cases=r.slice(e,e+a),o.cases.length&&i.push(pc(t,{method:n,body:o}));const c=await Promise.all(i);let l=[];for(let e=0;e<c.length;e+=1)0!==e?l.length&&(l=l.filter((t=>c[e].data.availableActions.some((e=>t.ID===e.ID))))):l=c[e].data.availableActions;return l};static getCaseBulkActionsByCaseTypeID=async e=>{const t={casetypeID:e},{restApi:n,reqType:r}=_g("getCaseBulkActions",t),s=await pc(n,{method:r});let a=[];return s.data?.availableActions?.length&&(a=s.data.availableActions),a}};class ju{constructor(e){ju._instance=this,this.context=`${e}/${j.SUGGESTION}`,rh()?.getState().data?.[this.context]||sh({type:Fe,payload:{context:this.context,data:{}}})}getField(e){return ch(e,"",this.context)}setField(e,t){sh({type:Q,payload:{reference:e,value:t,context:this.context}})}removeField(e){sh({type:me,payload:{reference:e,context:this.context}})}setState(e){sh(bh({context:this.context,data:e,isArrayDeepMerge:!0}))}}const Vu=ju;const ku=class{static getSharedState(e){const t=e.startsWith(".")?e.substring(1):e,n=oh();return n?Eh.getIn(n,t):null}static setSharedState(e,t){e&&sh(cg({key:e,value:t}))}static updateState(e,t,n,r={}){const{isArrayDeepMerge:s=!0,pageReference:a}=r;if(!e||!t)return;sh(lg({context:e,reference:a?`${a}.${t}`:t,value:n,isArrayDeepMerge:s}))}static getSuggestionsContext(e){return new Vu(e)}};const $u=class{constructor(e,t,n){this.meta=e,this.datasource=t,this.index=0,this.options=n,this.datasourceObj=Ch.getPropertyValue(t,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");const e=Ch.getContextPath(this.datasource,this.index);return this.index+=1,Xu({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}};class Bu{constructor(e,t){this.children=e,this.index=0,this.options=t}hasNext(){return this.index<this.children.length}next(){if(!this.hasNext())throw new Error("No Children");const e=this.children[this.index];return this.index+=1,Xu({meta:e,index:this.index,options:this.options})}resetIndex(){this.index=0}}const Gu=(e,t)=>{const n=!!e?.repeat;if(!!e?.["repeat-self"])return new $u(e,e.context||"",t);if(n){const n=uh(`${t.context}.${j.SUMMARY_OF_LISTS}`,e.pageReference,t.context);return new $u(e.children[0],n||e.context,t)}return e?.children?new Bu(e.children,t):void 0};class Wu{static allowedComponetsForBulkProcessing={Currency:!0,TextInput:!0,Phone:!0,Percentage:!0,Email:!0,Integer:!0,Decimal:!0,URL:!0,SemanticLink:!0,Checkbox:!0,RadioButtons:!0,DateTime:!0,Date:!0,Time:!0,Text:!0,TextArea:!0,RichText:!0,Dropdown:!0,Search:!0,Location:!0,Attachment:!0,AutoComplete:!0,MultiSelect:!0,UserReference:!0,Region:!0,TextContent:!0,View:{Forms:!0,DefaultForm:!0,OneColumn:!0,TwoColumn:!0,ThreeColumn:!0}};static getItemView(e,t){const n=[];if(e&&["portal","view"].includes(t)){const{accessedOrder:t,items:r}=e;if(t&&r){const e=t[t.length-1];r[e]&&r[e].view&&Object.keys(r[e].view).length>0&&n.push(r[e])}}return n}static getDependentProperties=e=>{let t=[];return e._rawConfig?.config?.parameters?t=Object.values(e._rawConfig?.config?.parameters||{}):e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters&&(t=(e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters||[]).map((e=>e?.value))),t.filter((e=>ul.isProperty(e))).map((e=>ul.getPropertyName(e)))}}const Hu=new Wu;let qu;Object.freeze(Hu);const zu=(e,t,n)=>{e&&(Object.keys(e).forEach((r=>{if("children"!==r){const s=e[r],a=Qt.trimAnnotation(s);if("string"!=typeof a&&"string"!=typeof s||!(Eh.isValidAnnotation(s)&&Eh.isPropertyRef(a)||s.startsWith("@W ")||s.startsWith("@E ")||s.startsWith("@ATTACHMENT "))){if(Array.isArray(a))a.forEach(((e,n)=>{const s={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||[],t[r][n]=Object.create({}),zu(e,t[r][n],s)}));else if(a&&"object"==typeof a&&"exp"!==a.type){const e={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||{},zu(a,t[r],e)}}else n&&n.parentKey&&(n.isObjHasValue=!0),t[r]=a}})),n&&!n.isObjHasValue&&delete n.parentStateObj[n.parentKey])},Yu=(e,t)=>{e._inheritedProps=e._inheritedProps||[],e.inheritedProps=[...e._inheritedProps,...Eh.deepClone(t.inheritedProps)]};class Ku{constructor(e){const{meta:t,isRoot:n,options:r={},useCustomContext:s}=e;this.meta=t,this._isRoot=n,this.options=r,this.useCustomContext=s,this._rawConfig=t?.config,this._isExpressionExist=!1,this._isWhenExist=!1,this._isValidatorExist=!1,this._pageReference="",this._referenceContext="",this._contextName="",this._stateProps={},this._actions={},this._children="",this._additionalRegisteredProps={},this._caseInfo=null,this.viewName=r.viewName,this.parentViewName=r.viewName??"",this._referenceList=r.referenceList||"",this._isInsideList=r.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=r.localeReference,this._containerTarget=r.target,this.xrayInfo={},this._readOnly=t?.config?.readOnly||r.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,this.index=e.index,this.categoryName=r.categoryName||"",r.inheritedConfig&&(this._inheritedConfig=Eh.deepClone(r.inheritedConfig)),t?.config?.inheritedProps&&Yu(this._inheritedConfig,t?.config),zu(this._rawConfig,this._stateProps),this._isState=!Eh.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=Eh.isExpressionExist(this._rawConfig.config),this._isWhenExist=Eh.isWhenExist(this._rawConfig.config),this._isValidatorExist=Or.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=F.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context,this._type=this.meta?.type;let a=this.options.pageReference;if(this.options.pageReference&&(a=Qt.handleAnnotation(this.options.pageReference,this)),this._pageReference=Ch.getContextPath(a||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),"reference"===this._type&&(this._rawConfig=t),"reference"===this._type&&Eh.isWhenExist({visibility:this.meta?.config?.visibility})&&xn(this.viewName,this._contextName,this._pageReference),"reference"!==this._type&&t&&(this._rawConfig=Ch.resolveReference(t,this)),this._rawConfig){const e=this.getRawConfigProps();e&&(this._localeRuleName=Qt.trimAnnotation(e.localeReference)||r.localeReference,this._isExpressionExist=Eh.isExpressionExist(e),this._isWhenExist=Eh.isWhenExist(e),this._isValidatorExist=Or.isValidatorExist(e)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===j.VIEW&&this._rawConfig.name&&(this.viewName=Qt.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&Mn(this)}}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||""===this._pageReference){const t=Qt.trimAnnotation(this.getPropertyName()),n=this.getFieldMetadata(t);e=n?.isDeclarativeTarget||!1}return e}_getPropertyName(){const e=Qt.trimAnnotation(this.getPropertyName());return""===this._pageReference&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){const e=this._getPropertyName(),{value:t,label:n,required:r,readOnly:s,disabled:a,visibility:o,validationType:i,caption:c,allowMultiple:l}=this.getRawConfigProps();if(this.getValue(this._pageReference)||""===this._pageReference){const u="Address"===this._type&&this._rawConfig?.config?.associatedView?Qt.trimAnnotation(this._rawConfig.config.associatedView):"",d=n||c,p={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:Qt.trimAnnotation(t),label:d?.startsWith("@")?Qt.handleAnnotation(d,this,void 0):d,required:r,readOnly:s,disabled:a,visibility:o||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:t,validationType:i,componentName:this._rawConfig?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),index:this.index,allowMultiple:l,isDeclarativeTarget:this.isDeclarativeTarget()};Pn.addFieldNode(this._contextName,this._pageReference,(u||this.categoryName||this.viewName)??"",e,this.getValue(e),p)}}removeNode(){if(!this.isVisible())if(Object.hasOwn(this._rawConfig?.config??{},"value"))Pn.removeFieldNode(this._contextName,this._pageReference,this.viewName||"",Qt.trimAnnotation(this.getPropertyName()),this.index);else{const e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference;Pn.removeViewNode(this._contextName,e,this._rawConfig?.config?.name||this._rawConfig?.config?.id||"",this.index)}}addViewNode(){this._rawConfig?.type?.toLowerCase()===j.VIEW&&this._rawConfig.name&&this.viewName&&Pn.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName),"Group"===this._rawConfig?.type&&this._rawConfig?.config?.id&&Pn.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.id,this.parentViewName),"Address"===this._rawConfig?.type&&this._rawConfig?.config?.associatedView&&Pn.addViewNode(this._contextName,this._pageReference,Qt.trimAnnotation(this._rawConfig.config.associatedView),this.parentViewName),"deferload"===this._rawConfig?.type?.toLowerCase()&&this._rawConfig.config?.name&&Pn.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.parentViewName)}addWhenNode(){let e="",t="";const n=Eh.getWhenNames(this._rawConfig?.config),r=this.getRawConfigProps();if(r?.type&&r?.type?.toLowerCase()===j.VIEW)t=j.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{t=j.CONTEXT_TREE_NODE_TYPES.FIELD;const n=this.getPropertyName();e=Qt.isProperty(n)?Qt.trimAnnotation(n):""}e&&n.forEach((n=>{Pn.addWhenNode(this.getContextName(),this.getPageReference(),t,e,n,{pageReference:this.getPageReference(),context:this.getContextName()})}))}updateContextTree(){if(this.isVisible()&&(this.addViewNode(),this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&"DISPLAY_ONLY"!==this._inheritedConfig.displayMode&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode&&this.addFieldNode(),(this._rawConfig?.type?.toLowerCase()!==j.VIEW||"Editable"===this._rawConfig.config?.renderMode)&&this._rawConfig?.config?.referenceList)){const{value:e,label:t,required:n,readOnly:r,disabled:s,visibility:a,validationType:o,selectionMode:i,selectionList:c,selectionKey:l,referenceList:u,renderMode:d,caption:p}=this.getRawConfigProps(),h=t||p;Pn.addPageListNode(this._contextName,this._pageReference,this.viewName??"",Qt.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:Qt.trimAnnotation(this.getPropertyName()),label:h?.startsWith("@")?Qt.handleAnnotation(h,this,void 0):h,required:n,readOnly:r,disabled:s,visibility:a||this.options.visibility,skipRequiredValidation:this.options.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:e,validationType:o,componentName:this._rawConfig.type,type:this._rawConfig.config?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),selectionMode:i,selectionList:c,renderMode:d,referenceList:u,selectionKey:l,index:this.index});const g=this.getValue(Qt.trimAnnotation(this.getPropertyName()),this._pageReference)||[];Pn.updatePageListNode(this._contextName,this._pageReference,Qt.trimAnnotation(this.getPropertyName()),g.length)}this.isWhenExist()&&this.addWhenNode(),this.removeNode()}setXRayInfo(e){Eh.mergeDeep(e,this.xrayInfo)}getXRayInfo(){return this.xrayInfo}getStateProps(){return this._stateProps}setStateProps(e){Eh.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getCaseInfo(){return this._caseInfo||(this._caseInfo=new Lu(this)),this._caseInfo}getCaseLocaleReference(){const e=this.getCaseInfo(),t=e.getClassName();return up.getCaseLocaleReference(t,e.getCaseTypeName())}getListActions(){return Dr(this)}getReferenceList(){return this._referenceList}isInsideList(){return this._isInsideList||/\[\d+\]/g.test(this.getPageReference())}getRawMetadata(){return this.getMetadata()}setReferenceList(e){this._referenceList=e}getComponentConfig(){return this.getMetadata()?.config||{}}isExpressionExist(){return this._isExpressionExist}isWhenExist(){return this._isWhenExist}isConditionExist(){return this.isExpressionExist()||this.isWhenExist()}isBoundToState(){return this._isState}getPageReference(){return this._pageReference}getPropertyName(){const e=this.getComponentConfig();let t;return t="multi"===e.selectionMode?"selectionList":"single"===e.selectionMode&&e.selectionKey?"selectionKey":"Editable"===e.renderMode&&"Attachment"!==e.formatter?"referenceList":"Address"===this._type?"addressProp":"value",this.getComponentConfig()[t]}getFullReference(){const e=this.getPageReference(),t=this.getPropertyName();return Ch.getContextPath(e,t)}getContextName(){return this._contextName}getContainerName(){const{type:e}=this.getMetadata()||{},t=[j.CONTAINERS.ROOT_CONTAINER,j.CONTAINERS.VIEW_CONTAINER,j.CONTAINERS.FLOW_CONTAINER,j.CONTAINERS.MODAL_VIEW_CONTAINER,j.CONTAINERS.PREVIEW_VIEW_CONTAINER,j.CONTAINERS.HYBRID_VIEW_CONTAINER],{acTargetName:n=td.PRIMARY,name:r,routingInfo:s}=this.getComponentConfig();return(e&&t.includes(e)||"@ROUTING_INFO"===s)&&r?r:this.options.containerName||n}getTarget(){return this._containerTarget}getCurrentView(){return this.viewName}populateSuggestionProps(e){if(this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&this.getStateProps()?.value&&this.options.hasForm){const t=c?.getStore()?.getState()?.data[`${this.getContextName()}/${j.SUGGESTION}`],n=this.getStateProps()?.value,r=Ch.getContextPath(this.getPageReference(),n),s=t?ku.getSuggestionsContext(this.getContextName()).getField(r):void 0;this._hasSuggestions=!!s,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){const t={...Rr.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig&&this._rawConfig.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(t),this.resolveConfigProps(t,e),Eh.resolveStringBooleans(e)}getRawConfigProps(){const e={...Rr.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(e),e}resolveConfigProps(e,t={}){return e&&(Ch.resolveProps(e,t,this),Qt.handleComponentMapping(t,{type:this.getComponentName(),config:e},this)),t}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),zu(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach((e=>{delete this._additionalRegisteredProps[e]})),!0}populateAdditionalProps(e){const t=this.getComponentName(),n=this.getComponentConfig(),r=t===j.ROOT_CONTAINER&&"portal"!==e.renderingMode;if(t===j.MODAL_VIEW_CONTAINER||t===j.CASE_CREATE_STAGE){const t=pd(`${j.APP.APP}/${this.getContainerName()}`),n=Hn({context:t,category:F.PAGE});e.pageMessages=n,this._stateProps.pageMessages=e.pageMessages}if(this.isEditable()){let{value:t}=this.getStateProps();void 0===t&&"multi"===this.getComponentConfig()?.selectionMode?t=this.getStateProps().selectionList||Qt.trimAnnotation(this.getRawConfigProps().selectionList):!t&&"Editable"===this.getComponentConfig()?.renderMode&&this.getStateProps().referenceList&&(t=this.getStateProps().referenceList);const n=Hn({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:F.MESSAGES.MESSAGES_TYPE_ERROR}),r=Hn({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:F.MESSAGES.MESSAGES_TYPE_INFO});if(n&&n[0]){const t=n.map((e=>up.getLocaleValue(e.message,"Messages")));e.validatemessage=t.join(". "),e.status=j.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status}r&&r[0]&&(e.infoMessage=r[0].message,e.status=j.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(t===j.ROOT_CONTAINER){const t=Kn(r,pd(`${j.APP.APP}/${this.getContainerName()}`));e.httpMessages=t,this._stateProps.httpMessages=e.httpMessages;const n=ku.getSharedState("isLoggedOut");e.isLoggedOut=n,this._stateProps.isLoggedOut=n;const s=Hn({context:j.APP.ROOT,category:"PAGE"});e.pageMessages=s,this._stateProps.pageMessages=e.pageMessages}if(t===j.HYBRID_VIEW_CONTAINER){const t=Hn({context:j.APP.APP,category:j.HTTP});e.httpMessages=t,this._stateProps.httpMessages=t}if(t===j.APP_SHELL&&e.portalDocMode===j.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=Fu.getOpenedCaseItems(`${F.APP.APP}/${j.PRIMARY}`),this._stateProps.activeCases=e.activeCases),t===j.APP_SHELL){const t=Hn({context:j.APP.APP,category:"PAGE"});e.pageMessages=t,this._stateProps.pageMessages=e.pageMessages}if(e.value&&t===j.SCALARLIST&&(this._stateProps.value=e.value),t===j.APP_SHELL||t===j.MODAL_VIEW_CONTAINER||t===j.CASE_CREATE_STAGE||n.template===j.CASE_PREVIEW){let t=Hn({context:j.APP.APP,category:"HTTP"});const n=Hn({context:pd(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"});t?n&&(t=t.concat(Hn({context:pd(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"}))):t=Hn({context:pd(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"}),e.httpMessages=t?t.map((e=>e.message)):t,this._stateProps.httpMessages=e.httpMessages,t?.forEach((t=>{t.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...t.errorDetails):t.errorDetails,this._stateProps.errorDetails=e.errorDetails),t.correlationID&&(e.correlationID=t.correlationID)}))}if(t===j.VIEW_CONTAINER||t===j.FLOW_CONTAINER||t===j.MODAL_VIEW_CONTAINER||t===j.PREVIEW_VIEW_CONTAINER||t===j.ROOT_CONTAINER){if(e.routingInfo=yt(this.getContainerName(),this._contextName),t===j.ROOT_CONTAINER&&(e.rootConfig=Wu.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,t===j.FLOW_CONTAINER){const t=Hn({context:this.getContextName(),category:j.CASEMESSAGES}),n=this.getContextName();e.caseMessages=t,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;const r=Id(n)[0];if(r){const t=pd(r),n=c?.getStore()?.getState()?.data;n&&t&&(e.lastUpdateTime=n[t]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=n[t]?.caseInfo?.lastUpdateTime);const s=Hn({context:t,category:F.PAGE}),a=Hn({context:t,category:"HTTP"});e.httpMessages=a,e.pageMessages=s,this._stateProps.pageMessages=e.pageMessages,this._stateProps.httpMessages=e.httpMessages,a?.forEach((t=>{t.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...t.errorDetails):t.errorDetails,this._stateProps.errorDetails=e.errorDetails),t.correlationID&&(e.correlationID=t.correlationID)}))}}if(e.loadingInfo=this.getLoadingStatus(this.getContextName()),e.assignmentNames=this.getCaseInfo().getAssignments()?.map((e=>e.name)),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map((e=>e.name)),t===j.MODAL_VIEW_CONTAINER){const t=e.routingInfo?.accessedOrder||[],n=t[t.length-1];n&&(e.loadingInfo=this.getLoadingStatus(n))}this._stateProps.loadingInfo=e.loadingInfo,this._stateProps.assignmentNames=e.assignmentNames,this._stateProps.childAssignmentNames=e.childAssignmentNames}else n.template===j.CASE_VIEW||n.template===j.CASE_PREVIEW||n.template===j.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):t===j.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);this.populateFieldMetadata(e),this.updateContextTree()}isReadOnlyField(e,t){const n=ul.isPropertyInternal(t),r=e.datasource,s=this.getComponentConfig().isSearchField,{isClassKey:a,isSpecial:o,isDeclarativeTarget:i}=e.fieldMetadata,c=e.listType!==j.ASSOCIATED;return!s&&(i||n||!r&&(a||o)&&c)}getPropertyDetails(e,t,n){return e===j.ASSOCIATED?{propertyValue:t,propertyAnnotation:j.ASSOCIATED_PROPERTY_ANNOTATION}:{propertyValue:n,propertyAnnotation:j.PROPERTY_ANNOTATION}}updateConfigData(e,t,n){e.fieldMetadata=t,this.isReadOnlyField(e,n)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})),e.fieldMetadata?.isReadOnly&&(e.readOnly=!0,this.registerAdditionalProps({readOnly:!0}))}populateFieldMetadata(e){const{value:t,datasource:n,listType:r}=this.getComponentConfig(),{propertyValue:s,propertyAnnotation:a}=this.getPropertyDetails(r,n,t);if(s&&"string"==typeof s&&(s.includes(a)||s.includes(j.ATTACHMENT_ANNOTATION))){const t=Qt.getPropertyName(s),n=this.getFieldMetadata(t);n&&this.updateConfigData(e,n,t)}}resolvePropertyMetadata(e,t){if(!e)return e;const n=Xp(`${this._pageReference}.${t}`,this._contextName);return(n||null===n)&&(e.additionalInformation=n),e}getFieldMetadata(e){if(!e)return null;const t=e.split(".");if(t.length<2){let t=this.getValue(j.CLASS_ID);return!t&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(t=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata(vp(e,t),e)}return this.resolvePropertyMetadata(vp(t.pop(),this.getValue(`.${t.join(".")}${j.CLASS_ID}`)),e)}getCurrentPageFieldMetadata(e=null){let t=this.getPageReference().split(".");null!==e&&(t=e.split("."));const n=t.pop();return this.resolvePropertyMetadata(vp(n,this.getValue(`${t.join(".")}${j.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(j.CLASS_ID)}getCaseSummary(){const e={...this.getDataObject()[F.CASE_INFO.CASE_INFO]};return e.CaseID=e.CaseID||this.getValue(F.CASE_INFO.CASE_INFO_PZINSKEY),{...e,isCaseWideAction:()=>nn(this.getContextName(),this.getPageReference())}}getReferencedUser(e){const t=this.getValue("referencedUsers");if(Array.isArray(t)){const n=t.find((t=>t.UserID===e));if(n)return{userId:n.UserID,UserName:n.UserName}}return t&&t[e]?t[e]:null}getCaseStages(){return this.getDataObject()[F.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[F.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}resolveContextProps(e){const{value:t}=this.getStateProps();t&&(e.error=this.getContextDataValue(`${this.getPageReference()+t}.error`),e.validatemessage=this.getContextDataValue(`${this.getPageReference()+t}.validatemessage`))}isValidatorExist(){return!!this._isValidatorExist}getValidationApi(){return new Ol(this)}isEditable(){return this._rawConfig&&this._rawConfig.config&&!(this._inheritedConfig&&this._inheritedConfig.readOnly)&&(Object.hasOwn(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||"Editable"===this._rawConfig.config.renderMode&&this._rawConfig.config.referenceList)&&!("string"==typeof this._rawConfig.config?.value&&this._rawConfig.config.value.includes("@FILTERED_LIST"))&&!(Object.hasOwn(this._rawConfig.config,"readOnly")&&("true"===this._rawConfig.config.readOnly||!0===this._rawConfig.config.readOnly))&&!(Object.hasOwn(this._rawConfig.config,"disabled")&&!0===this._rawConfig.config.disabled)}isVisible(){return this._rawConfig?.config&&Object.hasOwn(this._rawConfig?.config,"visibility")&&"string"==typeof this._rawConfig?.config?.visibility?Qt.handleAnnotation(this._rawConfig?.config?.visibility,this):"string"!=typeof this.options?.visibility||Qt.handleAnnotation(this.options?.visibility,this)}isReadOnly(){return void 0!==this._readOnly&&("true"===this._readOnly||!0===this._readOnly||Qt.handleAnnotation(this._readOnly,this))}hasChildren(){return!!this._children}getComputedVisibility(){const e="reference"===this._type&&!!this.getReferencedView()?this.getReferencedViewPConnect().getPConnect():this;if(!1===this.getConfigProps().visibility)return!1;if(!1===this.getConfigProps().requiresVisibleChildren)return!0;const t=e.getConfigProps(),n={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]};let r=e._type&&n.includeTypes.includes(e._type)&&!n.excludeTemplates.includes(t.template);if(!!t.highlightedData&&t.highlightedData.length&&t.showHighlightedData&&(r=!1),!r)return!0;const s=e.getChildren();return!!s&&s.some((e=>e.getPConnect().getComputedVisibility()))}getChildrenIterator(){return this._children.setContext(this.getPageReference()),this._children}setAction(e,t){this._actions[e]=t}getComponentName(){return this._rawConfig&&this._rawConfig.type}isComponentRefreshable(){return!(!this._rawConfig||!this._rawConfig.isRefreshable)}getDataObject(e){return ah(e||this.getContextName())}getImagePath(e){return`${Mr.getConstellationServiceUrl()}/v860/${Mr.getAppAlias()}/image/${e}?org=${ip.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){const e=Gu(this._rawConfig,{pageReference:this._pageReference,context:this._contextName,localeReference:this._localeRuleName,hasForm:this.options.hasForm,isBulkAction:this.options.isBulkAction,containerName:this.getContainerName(),containerItemName:this.options.containerItemName,viewName:this.viewName,inheritedConfig:this._inheritedConfig,target:this._containerTarget,readOnly:this._readOnly,categoryName:"Group"===this._type?this._rawConfig?.config?.id:null}),t=[];for(;e?.hasNext();){const n=e.next();if(this.isBulkAction()){const e=n.getPConnect().getComponentName(),{template:t}=n.getPConnect().getConfigProps();if(!e||!0!==Wu.allowedComponetsForBulkProcessing[e]&&!0!==Wu.allowedComponetsForBulkProcessing[e]?.[t])continue}t.push(n)}return e?.resetIndex(),t}return[]}setInheritedProp(e,t){this._inheritedConfig[e]=t}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,t,n){const r=n||this.getLocaleRuleName(),s=this?.getMetadata();let a=null;const o=cp.getLocale();if(s){const t=s?.type,n=["View","Region"],r=s?.config?.label??s?.config?.caption;if("en-US"!==o&&r?.startsWith(j.FIELD_LABEL_ANNOTATION)){const t=r.split(`${j.FIELD_LABEL_ANNOTATION} `).pop(),n=t?.split("."),s=n?.pop();let o=`${s}`;const i=this.getFieldMetadata(o),c=i?.classID||this.getValue(`.${n?.join(".")}${j.CLASS_ID}`),l=i?.definedOnClassID;return o=`${l||c}.${o}`,up.getLocaleValue(e,o,up.FIELD_LABELS_BUNDLE_KEY,a)}t&&!n.includes(t)&&(a=t)}return up.getLocaleValue(e,t,r,a)}getLocalizedParagraphValue(e){const t=this.getLocaleRuleNameFromKeys(this.getCurrentClassID(),j.PARAGRAPH,e);return up.getParagraphLocaleValue(t,this.getCurrentClassID(),e)}getLocaleRuleNameFromKeys(e,t,n){return`${e}!${t}!${n}`}getValue(e,t){return this.useCustomContext?(e=e.startsWith?.(".")?e.substring(1):e,e.split?.(".").reduce(((e,t)=>e?.[t]??void 0),this.useCustomContext)):this._hasSuggestions&&this.getStateProps()?.value===e?Ch.getPropertyValue(e,this.getPageReference(),`${this._contextName}/${j.SUGGESTION}`):Ch.getPropertyValue(e,t||this.getPageReference(),this._contextName)}setInheritedConfig(e){if(!e)return;const{readOnly:t,displayMode:n,referenceType:r,hideLabel:s}=e;s&&(this._inheritedConfig.hideLabel=s),r&&(this._inheritedConfig.referenceType=r),n&&(this._inheritedConfig.displayMode=n),(this._inheritedConfig.readOnly||t)&&(this._inheritedConfig.readOnly=t),e.inheritedProps&&(e.inheritedProps?.forEach((e=>{"required"===e.prop&&(this._inheritedConfig[e.prop]=e.value)})),Yu(this._inheritedConfig,e))}getInheritedProps(){const e={},t={};return this._inheritedConfig.inheritedProps?.forEach((e=>{t[e.prop]=e.value})),Ch.resolveProps(t,e,this),e}setValue(e,t,n,r=!1,s={}){let a,o;const{isArrayDeepMerge:i}=s;this.isInsideList()&&this.getListActions().updateProperty(e,t),this.isBulkAction()&&(a=!0,t||(o=!0)),sh({type:"SET_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,initialValue:n,isImplicit:r,context:this.getContextName(),...void 0!==i&&{isArrayDeepMerge:i},...a&&{isStrictTracking:a},...o&&{removePropertyFromChangedList:o}}})}updateDirtyCheckChangeList(e,t){(({value:e,context:t,reference:n})=>{if(dl.isPageInstruction(n))return;const r=n?.startsWith(".")?n?.substr(1):n;fl[t]=fl[t]||{},fl[t][r]||(fl[t][r]={initialValue:ch(r,null,t)}),fl[t][r].value=e})({reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName()})}getContextDataValue(e,t){return lh(t||this.getPageReference(),e,this._contextName)}updateState(e){const t=this._pageReference.indexOf(j.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf(".");let r=j.CASE_INFO.CASE_INFO_CONTENT;0!==t&&(r=n>0?this._pageReference.substring(n):this._pageReference),sh(bh({context:this._contextName,data:e,rootPageReference:r}))}replaceState(e,t,n={}){const{skipDirtyValidation:r=!1}=n;sh({type:"REPLACE_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName(),skipDirtyValidation:r}})}reportError(e,t,n){sh(rg(e,t||{},n))}getComponent(){return qu({getPConnect:()=>this})}createComponent(e,t,n,r){let s=this._pageReference;if(t){const e=uh(`${this.getPageReference()}.${j.SUMMARY_OF_LISTS}`,t,this._contextName);s=Ch.getContextPath(e||t,n)||t}else if(r&&r.pageReference){let e=r.pageReference;e=Qt.handleAnnotation(e,this),s=Ch.getContextPath(this._pageReference,e)||""}return qu(Xu({meta:e,index:this.index,options:{containerName:this.getContainerName(),hasForm:this.options.hasForm,...e.options,pageReference:s,context:this._contextName,target:this._containerTarget,readOnly:this._readOnly||this._inheritedConfig?.readOnly,viewName:this.viewName}}),r)}getReferencedView(){if(this.meta)return Ch.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)||e.startsWith(j.CLASS_ANNOTATION)?this.getPageReference():`${this.getPageReference()}${e}`}getReferencedViewPConnect(e=!1){const t={...this.getComponentConfig()};return delete t?.name,delete t?.type,Xu({meta:this.getReferencedView(),options:{...e?this.options:void 0,...t,context:this.getContextName(),pageReference:t.context?this._resolvePageRef(t.context):this.getPageReference(),viewName:this.viewName}})}getContainerManager(){return new Fl(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new Mu(this)),this._actionsApi}getActionManager(){return ln}getGoogleMapsAPIKey(){return S()}getServerURL(){return E()}getLoadingStatus(e){let t=null;return e?(t=ah(e),t=t?t.context_data:null):t=this.getDataObject().context_data,!!t&&(!!t.isLoading&&t.isLoading)}clearErrorMessages(e){e?.property?qn({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName()}):e?.context?qn({type:"error",...e}):(qn({type:"error",...e,context:j.APP.APP}),qn({type:"error",...e,context:pd(`${j.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return uh(`${this.getPageReference()}.${j.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,t,n){delete e?.classID,this.setValue(t,e,void 0,void 0,{isArrayDeepMerge:!1}),((e,t,n)=>{const r=Jc(t);Xc[e]?Xc[e].fieldOrder[r]=n:Xc[e]={fieldOrder:{[r]:n}}})(this.getContextName(),`${this.getPageReference()}${t}`,this),n&&((e,t,n)=>{const r=(e,t)=>{Object.entries(e).forEach((([e,s])=>{if(Array.isArray(s)){const r=PCore.createPConnect({options:{pageReference:n.getPageReference(),context:n.getContextName(),referenceList:`${t}.${e}`}}).getPConnect();Pr(r,`${t}.${e}`,{skipStateUpdate:!0});for(let e=0;e<s.length;e+=1)Er(s[e],e,r,void 0,{})}else"object"==typeof s&&r(s,`${t}.${e}`)}))};r(e,t)})(e,t,this)}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=ku.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,r=Ch.getContextPath(this.getPageReference(),n),s=t.getField(r);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,s),this.getActionsApi().triggerFieldChange(n,s),t.removeField(r)}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=this.getStateProps()?.value||e,n=Ch.getContextPath(this.getPageReference(),t);this._hasSuggestions=!1,ku.getSuggestionsContext(this.getContextName()).removeField(n)}}}function Xu(e){const t=new Ku(e);return{getPConnect:()=>t}}function Ju(e){qu=e}const Qu=class{static createContainerPConnect(e,t,n,r=!1){const{accessedOrder:s,items:a}=e;if(s&&a){const e=s[s.length-1];if(a[e]?.view&&Object.keys(a[e].view).length>0){const s=a[e],o=e.substring(0,e.lastIndexOf("_")),{view:i,context:c}=s,{viewName:l,viewContext:u}=this.processRootViewDetails(i,s,t);if(!l)return null;return Xu({meta:i,options:{context:c,pageReference:u||t,containerName:n,containerItemID:e,parentPageReference:t,hasForm:r||n===td.WORKAREA||n===td.MODAL||l===j.CREATE_DETAILS_VIEW_NAME,target:o}}).getPConnect}}return null}static processRootViewDetails(e,t,n){const{config:{context:r,name:s}={}}=e,{context:a}=t;let o=s,i=r;const c=ul.isProperty(s),l=ul.isProperty(r);if(l){const e=ul.getPropertyName(r);i=ch(`.${e}`,e.startsWith(".")?n:"",a)}if(i||(i=n),c){const e=ul.getPropertyName(s);o=ch(`.${e}`,i,a)}return c&&l&&""!==o&&(o=s,i=r),{viewName:o,viewContext:i}}static addFlowContainerItem(e){const t=e.getContainerManager(),n=e.getContextName();let r,s;if("review"!==e.getValue("context_data.caseViewMode")){const e=n.substring(0,n.lastIndexOf("_")),t=pd(e),a=sd(e,t);a&&({key:r,flowName:s}=a)}t.addContainerItem({semanticURL:"",key:r,flowName:s,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(n)})}},Zu={defaultLimit:16},ed={SINGLE:"single",MULTIPLE:"multiple"},td={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},nd=()=>rh()?.getState()?.containers,rd=e=>e?rh()?.getState().containers[e]:(Et.error("getContainerData: target is the required parameter"),null),sd=(e,t)=>{if(!e||!t)return null;const n=nd(),r=n?.[e];return r&&r.items&&r.items[t]||null},ad=e=>e?rh()?.getState().containers[e]?.items:(Et.error("getContainerItems: target is the required parameter"),null),od=e=>e?rh()?.getState().containers[e]?.accessedOrder||[]:(Et.error("getContainerAccessOrder: target is the required parameter"),[]),id=e=>e?od(e)?.length>0||!1:(Et.error("areContainerItemsPresent: target is the required parameter"),!1),cd=(e,t,n)=>{if(!e||!t)return Et.error("isContainerItemExists: target and key are required parameters"),!1;const r=nd(),s=r?.[e],a=s&&s.items||null,o=n||((e,t)=>e===t);if(t&&a)for(const e in a)if(o(t,a[e].key))return!0;return!1},ld=(e,t,n)=>{if(!e||!t)return Et.error("getContainerItemName: target and key are required parameters"),null;const r=nd(),s=r?.[e],a=s&&s.items||null,o=n||((e,t)=>e?.toLowerCase()===t?.toLowerCase());if(t&&a)for(const e in a)if(o(t,a[e].key))return e;return null},ud=(e,t)=>{if(!e||!t)return Et.error("isContainerInitialized: context and name are required parameters"),!1;const n=nd();return n&&Object.prototype.hasOwnProperty.call(n,`${e}/${t}`)},dd=(e,t)=>{if(!e||!t)return Et.error("getContainerType: context and name are required parameters"),null;const n=nd(),r=n?.[`${e}/${t}`];return r&&r.type},pd=e=>{if(!e)return Et.error("getActiveContainerItemName: target is the required parameter"),null;let t=null;const n=nd();if(n&&n[e]){const r=n[e],{accessedOrder:s}=r;t=s&&s.length>0?s[s.length-1]:null}return t},hd=(e,t,n)=>{if(!e||!t)return Et.error("isContainerItemActive: target and key are required parameters"),!1;const r=ld(e,t,n);return!!r&&r===pd(e)},gd=(e,t)=>{let n=null;const r=nd();for(const s in r)if(Object.prototype.hasOwnProperty.call(r,s)&&r[s].items){const a=r[s].items[e];if(n=a?a[t]:null,n)break}return n},fd=e=>e?gd(e,"context"):(Et.error("getDataContextName: containerItemName is required parameters"),null),md=e=>{if(!e)return Et.error("getActiveContainerItemContext: target is required parameters"),null;let t=null;const n=nd();if(n&&n[e]){const r=n[e],{accessedOrder:s}=r,a=s&&s.length>0?s[s.length-1]:null;t=fd(a)}return t},yd=e=>{if(!e)return Et.error("getChildContainerItems: containerItemName is required parameters"),[];const t=e.endsWith("/")?e:`${e}/`;let n=[],r=!1;const s=nd(),a=n=>{const s=[];return Object.keys(n).forEach((n=>{n.startsWith(t)&&n!==t&&s.push(n),n===e&&(r=!0)})),s};for(const e in s)if(Object.prototype.hasOwnProperty.call(s,e)&&s[e].items){const t=a(s[e].items);t&&t.length>0&&(n=n.concat(t)),n=n.sort()}return r?n:[]},Id=e=>{if(!e)return Et.error("getChildContainers: containerItemName is required parameters"),[];const t=[],n=nd();for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&r.startsWith(e)&&r!==e&&t.push(r);return t},Ed=e=>{if(!e)return Et.error("getChildContainersContexts: parentContainerItemID is required parameters"),[];const t=[],n=nd();for(const r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&r.startsWith(e)&&r!==e){(od(r)||[]).forEach((n=>{fd(n)!==e&&t.push(fd(n))}))}return t},Ad=e=>{const t=[...Ed(e),e],n=[],r=rh()?.getState().data||{};return t.forEach((e=>{Object.prototype.hasOwnProperty.call(r,`${e}/${j.SUGGESTION}`)&&n.push(`${e}/${j.SUGGESTION}`)})),n},_d=e=>e?e&&rd(e)&&rd(e).type===ed.SINGLE:(Et.error("isContainerSingleMode: target is required parameters"),null),Sd=e=>e?e&&rd(e)&&rd(e).type===ed.MULTIPLE:(Et.error("isContainerMultipleMode: target is required parameters"),null),Cd=e=>e?rd(e)&&rd(e).items&&Object.keys(rd(e)?.items).length>0||!1:(Et.error("hasContainerItems: target is required parameters"),!1),Td=e=>e&&Zu[e]?Zu[e]:Zu.defaultLimit,Nd=(e,t=Zu.defaultLimit)=>{e?Zu[e]=t:Et.error("setContainerLimit: target is required parameter")},Pd=e=>{if(!e)return Et.error("isContainerLimitReached: target is required parameter"),!1;let t=!1;const n=rd(e),{items:r={}}=n,s=Object.keys(r),a=Td(e);return s&&s.length>0&&s.length>=a&&(t=!0),t},Dd=e=>{if(!e||!e.name||!e.context)return Et.error("resetContainersPayload: containerInfo object should contain name and context"),null;const t=e?.name,n=rd(`${e?.context}/${t}`),r=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map((e=>n?.items[`${e}`]?.context))||[],s=Id(`${j.APP.APP}/${j.PREVIEW}`),a=Ed(`${j.APP.APP}/${j.PREVIEW}`);return{context:e?.context,name:t,containerItems:[...r,...a],childContainers:s}},Rd=e=>{if(!e)return Et.error("isContainerDirty: containerItemID is the required parameter"),!1;const t=fd(e);return Nl(t)||Fc(e)},bd=e=>{if(!e)return Et.error("getLeastRecentlyUsedNonDirtyContainerItemID: target is required parameter"),null;let t;const n=rd(e),{accessedOrder:r=[]}=n;for(let e=0;e<r.length;e+=1){const n=r[e];if(!Rd(n)){t=n;break}}return t},Od=e=>{if(!e)return Et.error("getTargetFromContainerItemID: containerItemID is the required parameter"),null;const{containers:t}=rh()?.getState()||{};for(const n in t)if(t[n]?.accessedOrder?.includes(e))return n;const n=e.lastIndexOf(j.UNDERSCORE_STRING);return e.substring(0,n)},vd=(e,t={})=>{if(!e)return Et.error("closeContainerItem: containerItemID is the required parameter"),Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));const n=Od(e),r=fd(e),{skipDirtyCheck:s}=t;let a=!0,o=[];if(Rd(e)&&!s&&(a=window.confirm(up.getLocaleValue(Il,"Messages"))),a){const{accessedOrder:t=[],items:s={},type:a}=rd(n);o=t.filter((t=>t!==e));const i=o[o.length-1],c=s[i]||{},{semanticURL:l=j.FORWARD_SLASH_STRING,context:u}=c;o.length>0&&l&&l!==j.FORWARD_SLASH_STRING?Rg({directUrlUpdation:!0,semanticURL:l,options:{containerItemID:i,context:u}}):Rg({directUrlUpdation:!0,semanticURL:j.FORWARD_SLASH_STRING,options:{}});sh(Kh({containerItemID:e,context:r,target:n,containerInfo:{newAccessedOrder:o,containerType:a}}))}return Promise.resolve({newAccessedOrder:o,removeItem:a})},xd=(e,t,n,r)=>{const s="root",a=H(t,s,!0),o=mt(t,s),i={data:n,context:r?"app":a},c=[Fh({root:e,containerItemID:a,context:r?"app":a,target:o,containerName:t})];c.push(bh(i)),sh(c)},wd=(e,t,n)=>{let r=od(e);r=r.filter((e=>e!==t));let s=!1;for(let e=0;e<r.length;e+=1){if(fd(r[e])===n){s=!0;break}}return s},Md=e=>{if(!e)return Et.error("isContainerItemContextBeingUsedInOtherContainers: containerItemID is the required parameter"),!1;const t=nd(),n=fd(e),r=t?Object.keys(t):[];let s=!1;for(let t=0;t<r.length&&(s=wd(r[t],e,n),!s);t+=1);return s},Ld=e=>{Array.isArray(e)||(e=[e]);const t=nd()||{};return e.map((e=>{const n=Od(e);return Eh.getIn(t,[n,"items",e,"transientItems"])||[]})).flat()},Ud=e=>{const{transientItemID:t,data:n,options:r}=e,s=Eh.deepClone(rh()?.getState().data[t]);r?.reset&&Eh.iterateLeafNodes(s,(e=>{"classID"!==e[e.length-1]&&Eh.setIn(s,e,"")})),sh(Vh({transientItemID:t,data:Eh.mergeDeep(n,s)}))},Fd=e=>{const{transientItemID:t,data:n}=e;sh($h({transientItemID:t,data:n}))},jd=e=>{const t=Eh.deepClone(rh()?.getState().data[e]);Eh.iterateLeafNodes(t,(e=>{"classID"!==e[e.length-1]&&Eh.setIn(t,e,"")})),sh(kh({transientItemID:e,data:t}))},Vd=e=>{const t=Eh.deepClone(rh()?.getState().data[e]);Eh.iterateLeafNodes(t,(e=>Eh.setIn(t,e,""))),sh(Bh({transientItemID:e,data:t}))};class kd{static addContainerItems(e){this.items=e}static getContainerItems(){return this.items}static deleteContainerItem(e){const t=this?.items?.indexOf(e);void 0!==t&&-1!==t&&this.items.splice(t,1)}}const $d=()=>kd,Bd=e=>{const t={containerName:e};t.childContainers=Id(e),sh({type:Ue,payload:t})},Gd=(e,t)=>{const n=yd(e),{key:r}=sd(Od(e),e),s=[];n.forEach((e=>{const{key:n}=sd(Od(e),e);if(n===r){const n={data:{caseInfo:{headers:{etag:t}}},target:Od(e),context:e};s.push({type:fe,payload:n})}})),s.length&&sh(s)},Wd=(e,t)=>{const n=[],r={data:{caseInfo:{headers:{etag:t}}},target:Od(e),context:e};n.push({type:fe,payload:r}),n.length&&sh(n)},Hd=()=>cp.isPortalLoaded?"app":"root",qd=()=>bl,zd=(e,t)=>{const n={data:{caseInfo:{lastUpdateTime:t}},target:Od(e),context:e};sh({type:fe,payload:n})},Yd=(e,t)=>{const n=ld(e,t),r=ld(`${n}/workarea`,t);return fd(r)},Kd=e=>e?gd(e,"parentContext"):(Et.error("getContainerParentContext: containerItemName is required parameters"),null),Xd=e=>{const{accessedOrder:t}=e;return t&&t.length>0?t[t.length-1]:""},Jd=e=>{if(e&&"string"==typeof e){const t=e.split("/");return t.pop(),t.join("/")}return null},Qd=()=>Qu,Zd=/{(.*?)}/i,ep=/{(.*?)}/g,tp=e=>null!==e.match(Zd),np=e=>(e&&(e.startsWith("/")&&(e=e.substring(1,e.length)),e.endsWith("/")&&(e=e.substring(0,e.length-1))),e),rp=e=>{const t=e[e.length-1],n=e[e.length-2];if("y"!==t.toLowerCase())return`${e}s`;switch(n.toLowerCase()){case"a":case"e":case"i":case"o":case"u":return`${e}s`;default:return`${e=e.substring(0,e.length-1)}ies`}},sp=()=>np(window.location.pathname),ap=(e,t,n)=>{switch(n){case"warning":t?console.warn(e,t):console.warn(e);break;case"error":t?console.error(e,t):console.error(e);break;default:t?console.log(e,t):console.error(e)}};const op=new class{constructor(){this.staticRoutesList=[],this.dynamicRoutesList=[],this.reqContextName="",this.defaultViewUrlPath="",this.portalName=""}init=(e,t)=>{e&&e.routes&&e.routesMeta?(this.routingInfo=e,this.appRoutes=e.routes,this.appRoutesMeta=e.routesMeta,this.reqContextName=e.reqContextName,this.reqServletPath=e.reqServletPath,this.appName=e.appName,this.appAlias=e.appAlias,this.orgName=e.orgName,this.defaultViewUrlPath=t,this._createStaticDynamicRoutesList(this.appRoutes),this.appDelimeter=e.appDelimeter,this.reqServletNameReal=e.pxReqServletNameReal,this.bDefaultPortal=e.isDefaultPortal,this.portalName=e.portalName,this.ignoreFromEndPoint=["reactMode=dev","reactMode=prod"]):console.error("Routing info is not appropriate. Missing routes and routesMeta objects in routingInfo",JSON.stringify(e))};addRoutes=e=>{e?.routes&&e.routesMeta&&(this.appRoutes={...this.appRoutes,...e.routes},this.appRoutesMeta={...this.appRoutesMeta,...e.routesMeta},this.routingInfo&&(this.routingInfo.routes={...this.routingInfo.routes,...e.routes},this.routingInfo.routesMeta={...this.routingInfo.routesMeta,...e.routesMeta}),this._createStaticDynamicRoutesList(e.routes))};setDefaultRoute=e=>{this.defaultViewUrlPath=e};_createStaticDynamicRoutesList=e=>{Object.keys(e).forEach((e=>{tp(e)?this.dynamicRoutesList?.push(e):this.staticRoutesList?.push(e)}))};_getDynamicKeyName=e=>{const t=e.indexOf("{")+1,n=e.lastIndexOf("}");return e.slice(t,n)};isDefaultPortal=()=>"false"!=`${this.bDefaultPortal}`;getPortalName=()=>this.portalName;getApplicationPath=()=>np(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>np(this.reqContextName);getRoutingInfo=()=>this.routingInfo;processUrl=(e,t)=>{t&&(e=e.toLowerCase()),e&&(e=decodeURIComponent(e));const n=new RegExp(this.getApplicationPath(),"i");return e=e.replace(n,""),np(e)};getEndPointInfo=e=>{this.ignoreFromEndPoint?.forEach((t=>{e.includes(t)&&(e=e.substring(0,e.indexOf(t)))}));let t=this.processUrl(e,!0),n=this._getMatchedRouteInRoutingTable(t);void 0===n&&(t=this.processUrl(this.defaultViewUrlPath,!0),n=this._getMatchedRouteInRoutingTable(t)||"");const{routeKey:r,payload:s}=this.appRoutes[n],{reqType:a,endPoint:o,params:i}=this.appRoutesMeta?.[r].restApi||{},c={...s},{caseClassName:l,caseID:u}=c;if($.isRemoteCase(l)){const{RemoteClassGroup:e,RemoteSystemID:t}=$.getRemoteCase(l);c.caseID=u?.replace(l,e?.toUpperCase()),c.RemoteSystemID=t}const d={routeKey:r,requestType:a,routeEndpoint:o,payload:{...i,...c}};return this._resolveRoute(d,this.processUrl(e,!1),n)};getSemanticURL(e,t,n){return this.buildSemanticURL(e,t,n)}getResolvedSemanticURL(e,t,n={}){const r=this.getSemanticURL(e,t,n);let s=r;if(tp(r)){const e=r.match(ep);e?.forEach((e=>{const t=this._getDynamicKeyName(e);n[t]&&(s=s.replace(e,n[t]))}))}const a=Dg(s),o=new URL(a);return this.isDefaultPortal()||this.getPortalName()&&!o.searchParams.toString().includes("portal=")&&o.searchParams.append("portal",this.getPortalName()),o.toString()}updateSemanticURLAndDocumentTitle(e){const{key:t,actionName:n,caseClassName:r,isRemoteCase:s}=e;if(s&&!r)return;const a=this.getSemanticURL(n,{caseClassName:r}).replace(/{.+?}/,String(Qr(t))),o=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`,i={semanticURL:a,directUrlUpdation:!0,options:{acName:o,context:md(o)}};Pg(i);const c=r.substring(r.lastIndexOf("-")+1),l=t.substring(t.lastIndexOf(" ")+1),u=cp.environmentInfoObject?.pxApplication?.pyLabel;Lg(`${c} (${l}) - ${u}`)}buildSemanticURL(e,t,n){const{urlPattern:r}=this.appRoutesMeta?.[e]||{},s=r?.split("/").length,a=r?.split("/"),o=Object.keys(this.appRoutes).filter((e=>s===e.split("/").length)).filter((e=>{const t=e.split("?")[0].split("/");return a?.every(((e,n)=>e.startsWith("{")||e===t[n]))}));if(1===o.length)return this._getQueryParamsResolvedURL(o[0],n);if(0===Object.keys(t).length)return"";const i=o.find((e=>{const r=this.appRoutes[e].payload,s={...n};delete s.dataViewName,delete s.dataContext;const a=r.dataViewKeys||r.dataContextParameters||{},o=Object.keys(t).every((e=>t[e]===r[e]));return!!o&&(Eh.isEmpty(a)||Eh.isEmpty(s)?o:Object.keys(s).every((e=>Object.prototype.hasOwnProperty.call(a,e))))}));return i?this._getQueryParamsResolvedURL(i,n):""}_getQueryParamsResolvedURL(e,t,n=!1){const[r,s]=e.includes("?")?e.split("?"):[e];if(s){const e={};for(const[n,r]of Object.entries(t))e[n.toLowerCase()]=r;const a=new URLSearchParams(s),o={};for(const[r,s]of a.entries())if("string"==typeof s&&tp(s)){const a=this._getDynamicKeyName(s);o[r]=n?t[a]||e[a.toLowerCase()]:t[a]}else"string"==typeof s&&(o[r]=s);return`${r}?${new URLSearchParams(o).toString()}`}return r}_getQueryParamsObject(e){const t={},n=new URLSearchParams(e);for(const[e,r]of n.entries())t[e]=r;return t}getRestEndPoint(e,t){try{return this._buildRestApi(e,t)}catch(e){return console.error(e),null}}_buildRestApi(e,t){if(e&&this.appRoutesMeta?.[e]){const{reqType:n,body:r}=this.appRoutesMeta[e].restApi;let{endPoint:s}=this.appRoutesMeta[e].restApi;t?.params&&t.params.pageName&&(s=`${s}&pageName=${t.params.pageName}`);const a=s.match(ep);if(a)for(let e=0;e<a.length;e+=1){const n=a[e].replace("{","").replace("}",""),r=new RegExp(a[e],"g");s=s.replace(r,t?.[n])}if(r){let e={};return Object.keys(r).forEach((n=>{this._isSpecialInstruction(n)&&(e={...e,...this._processInstruction(n,r[n],t)})})),{restApi:s,reqType:n,body:e}}return{restApi:s,reqType:n}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,t,n){const r={};return"@COPY"===e&&t.forEach((e=>{r[e]=n[e]})),r}doesRestApiExist(e){return!(!this.appRoutesMeta||!this.appRoutesMeta[e])}_resolveRoute=(e,t,n)=>{const r=[],[s,a]=t.includes("?")?t.split("?"):[t],[o,i]=n.includes("?")?n.split("?"):[n],c=s.split("/"),l=o.split("/"),u={};for(let e=0;e<l.length;e+=1)if(r[e]=l[e],tp(l[e])){u[this._getDynamicKeyName(l[e])]=c[e],r[e]=c[e]}const d=this._getQueryParamsObject(i),p=this._getQueryParamsObject(a),h={};for(const[e,t]of Object.entries(p))h[e.toLowerCase()]=t;for(const e in d)tp(d[e])?u[e]=p[e]||h[e.toLowerCase()]:u[e]=d[e];let g;a&&(g=this._getQueryParamsResolvedURL(n,p,!0));const f=this._resolvePayload(e,u,n);return{...this._resolveRouteEndPoint(f,n),urlPath:g||r.join("/")}};_resolveRouteEndPoint=(e,t)=>{let{routeEndpoint:n}=e;if(!tp(n))return e;const r={};if(r[t]=e,void 0!==e.payload){const t=n.match(ep);for(let s=0;s<t.length;s+=1){const a=t[s],o=this._getDynamicKeyName(a);if(void 0!==e.payload[o]){const t=e.payload[o];n=n.replace(a,t)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${o}} in routeEndpoint- ${o} is missing in payload`,r)}}else this._sendWarningAndErrorMessages("Unable to resolve dynamic token(s) in routeEndpoint- payload is missing in routing table for-",r);return{...e,routeEndpoint:n}};_resolvePayload=(e,t,n)=>{if(void 0===e.payload)return e;const r={...e.payload,...this._resolvePayloadRecursive(e.payload,t)};return{...e,payload:r}};_resolvePayloadRecursive(e,t){const n={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let s=e[r];if("string"==typeof s&&tp(s)){const e=s.match(ep);for(let n=0;n<e.length;n+=1){const r=e[n],a=this._getDynamicKeyName(r);if(void 0!==t[a]){const e=t[a];s=s.replace(r,e)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${a}} in payload- {${a}} is missing in semantic url construct`)}n[r]=s}else"object"==typeof s&&(n[r]=this._resolvePayloadRecursive(s,t))}return n}_getMatchedRouteInRoutingTable=e=>{let t=this._findMatchedRouteInStaticList(e);return void 0!==t?t:(t=this._findMatchedRouteInDynamicList(e),void 0!==t?t:void 0)};_findMatchedRouteInStaticList=e=>this.staticRoutesList?.find((t=>t.toLowerCase()===e.toLowerCase()));_findMatchedRouteInDynamicList=e=>{const[t,n]=e.includes("?")?e.split("?"):[e],r=t.split("/");return this.dynamicRoutesList?.find((e=>{const[t,s]=e.includes("?")?e.split("?"):[e],a=t.split("/");if(a.length!==r.length)return!1;let o=0;for(o=0;o<a.length;o+=1){const e=a[o].toLowerCase();if(!tp(e)&&e!==r[o]&&rp(e)!==r[o])return!1}if(s){const e=new URLSearchParams(n.toLowerCase()),t=new URLSearchParams(s.toLowerCase()),r=new Set,a=new Set,o=/\{[a-zA-Z]+\}/;for(const t of e.keys())r.add(t);for(const e of t.keys())a.add(e);if(a.size!==r.size)return!1;for(const n of r){if(!a.has(n))return!1;const r=t.get(n);if(e.get(n)!==r&&!o.test(r))return!1}}return!0}))};_sendWarningAndErrorMessages=(e,t)=>{ap(e,t,"warning"),ap("Error in Generated Routing Table",null,"error"),ap("Back | Forward for this page may NOT work as intended",null,"warning"),ap("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},ip=op;const cp=new class{constructor(){this.environmentInfoObject=null,this.isPortalLoaded=!1,this.pageName=null,this.KeyMapping={},this.isAssignmentHeaderHidden=!1,this.coexistenceMeta={appType:"",isCoexistence:!1},this.brandingInfo=null,this.cookieComplianceMethod="none",this.showPerformanceDashboard=!1,this.isExtraCallRequiredForDefaultHome="false"}setEnvironmentInfo(e){this.environmentInfoObject=e;const t=this.environmentInfoObject?.features||Eh.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...t,granularUIRefresh:t.granularUIRefresh||t.pyEnableGranularUIRefresh||!1}}getOperatorName(){return this.environmentInfoObject?.pxOperator?.pyUserName}getOperatorWorkGroup(){return this.environmentInfoObject?.pxOperator?.pyWorkGroup}getOperatorIdentifier(){return this.environmentInfoObject?.pxOperator?.pyUserIdentifier}getOperatorImageInsKey(){return this.environmentInfoObject?.pxOperator?.pyImageInsKey}getApplicationLabel(){return this.environmentInfoObject?.pxApplication?.pyLabel}getPortalName(){return ip.getPortalName()}getApplicationName(){return this.environmentInfoObject?.pxApplication?.pyRuleName}getUseLocale(){return this.environmentInfoObject?.pxLocale?.pyUseLocale}getAccessGroup(){return this.environmentInfoObject?.pxOperator?.pyAccessGroup}getTimeZone(){return this.environmentInfoObject?.pxLocale?.pyTimeZone}getTheme(){return this.themeOverrides}setTheme(e){return this.themeOverrides=e,this.themeOverrides}getBrandingInfo(){return this.brandingInfo}setBrandingInfo(e){return this.brandingInfo=e,this.brandingInfo}getCookieComplianceMethod(){return this.cookieComplianceMethod}setCookieComplianceMethod(e){this.cookieComplianceMethod=e}setLocale(e){const t=e.replaceAll("-","_").split("_").slice(0,2);this.locale=t.join("-"),this.environmentInfoObject?.pxLocale&&(this.environmentInfoObject.pxLocale.pyUseLocale=this.locale)}getLocale=()=>this.locale;getEnvironmentKeys(){return Object.keys(j.ENV_INFO_KEYS)}getMaxAttachmentSize(){return this.environmentInfoObject?.pxApplication?.pyMaxAttachmentSize}getDefaultOperatorDP(){return this.environmentInfoObject?.pxApplication?.pyDefaultOperatorDP}getDocumentUrlDP(){return this.environmentInfoObject?.pxApplication?.pyDocumentUrlDP}getCaseInstanceListDP(){return this.environmentInfoObject?.pxApplication?.pyCaseInstanceListDP}getBaseLocale(){return this.environmentInfoObject?.pxApplication?.pyBaseLocale||"en-US"}getRenderingMode(){return this.environmentInfoObject?.renderingMode}getBuiltOnAppNames(){return this.environmentInfoObject?.pxApplication?.pyBuiltOnApplications}setPreviewMode(){ec.setPreviewMode()}setDefaultCasePage(e){this.pageName=e}getDefaultCasePage(){return this.pageName}disableAssignmentHeader(e){this.isAssignmentHeaderHidden=e}isAssignmentHeaderDisabled(){return this.isAssignmentHeaderHidden}getDefaultPortal(){return this.environmentInfoObject?.pxOperator?.pyDefaultPortal}updateFeatureMap(e){const t=this.environmentInfoObject?.features;return this.environmentInfoObject&&e&&(this.environmentInfoObject?.features?this.environmentInfoObject.features={...t,...e}:this.environmentInfoObject.features={...e}),this.getFeatureMap()}getFeatureMap(){return this.environmentInfoObject?.features||{}}setKeyMapping(e){return this.KeyMapping=e,this.KeyMapping}getKeyMapping(e){const t=this.KeyMapping[e];return void 0!==t?t:null}setCoexistenceMeta(e){return e&&(this.coexistenceMeta=e),this.getCoexistenceMeta()}getCoexistenceMeta(){return this.coexistenceMeta}isCoexistenceAppOfType(e){return!(!this.coexistenceMeta.isCoexistence||this.coexistenceMeta.appType!==e)}getCaseTypeList(){return this.environmentInfoObject&&this.environmentInfoObject?.pyCaseTypeList||[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}getAvailableLocalePacks(){return this.environmentInfoObject?.pyAvailableLocalePacks?.map((e=>e.pyLabel))||[]}getPerformanceDashboardVisibility(){return this.showPerformanceDashboard}setPerformanceDashboardVisibility(e){this.showPerformanceDashboard=e}getIsExtraCallRequiredForDefaultHome(){return this.isExtraCallRequiredForDefaultHome}setIsExtraCallRequiredForDefaultHome(e){this.isExtraCallRequiredForDefaultHome=e}getInactivityTimeout(){const e=this.environmentInfoObject?.pxOperator?.pyAuthenticationTimeout;return e?Number(e):e}isUnifiedObject(){return this.environmentInfoObject?.features?.isUnifiedObject||!1}getRuntime(){return"undefined"!=typeof window&&window.document?"Browser":"Native"}};const lp=class{static regex=/\{@P[^}]*\s*:\s*[^}]*\}/g;static subRegex=/:'[a-zA-Z0-9!@#$&()\\-`.+,/\s"]*'/;static keyMap={};static formatLocaleKey(e){let t=0,n="";for(;t<=e.length;){const r=e.indexOf("{@P ",t);if(-1===r){n+=e.substring(t,e.length);break}n+=e.substring(t,r);const s=e.indexOf("}",t),a=e.substring(r,s+1),[o,i]=this.getKeyAndValue(a);this.addKeyToMap(o,i),n+=`${a.split(":")[0]}}`,t=s+1}return n}static getKeyAndValue(e){const t=e.indexOf(":"),n=e.indexOf("}");return[`${e.substring(0,t)}}`,e.substring(t+1,n)]}static addKeyToMap(e,t){this.keyMap[e]=t}static replaceWithValue(e){let t=0,n="";for(;t<=e.length;){const r=e.indexOf("{@P ",t);if(-1===r){n+=e.substring(t,e.length);break}n+=e.substring(t,r);const s=e.indexOf("}",t),a=e.substring(r,s+1);n+=this.keyMap[a],t=s+1}return n}};const up=new class{GENERIC_BUNDLE_KEY="@BASECLASS!GENERIC!PYGENERICFIELDS";FIELD_LABELS_BUNDLE_KEY="@BASECLASS!LABEL!PYFIELDLABELS";GENERIC_BUNDLE_KEY_LP="GENERIC!GENERICFIELDS";MESSAGE_BUNDLE_KEY="@BASECLASS!MESSAGE!PYMESSAGES";BASE_CLASS="@BASECLASS";DATA_PAGE_LOCALECONTEXT="datapage";constructor(){this.localeStore={},this.getLocaleValue=this.getLocaleValue.bind(this)}setLocaleForRule=(e,t)=>{const n=e.LocaleContent||e;this.localeStore[t]=n};getLocaleForRule(e=this.#c()){return this.localeStore[e]}resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,t,n,r){n||(n=this.#c());let s=!1;e&&"string"==typeof e&&(s=e.includes("@P ")),s&&(e=lp.formatLocaleKey(e));const a=this.#l(e,n,t,r);return s?lp.replaceWithValue(a[e]||e):a[e]||e}#l(e,t,n,r){t!==this.FIELD_LABELS_BUNDLE_KEY&&(n=n?`${n}.fields`:"fields");let s=this.localeStore[t.toUpperCase()],a=s?Eh.getIn(s,n,{}):{};return!a[e]&&r&&(s=this.localeStore[this.#c().toUpperCase()],a=s?Eh.getIn(s,`${r}.${n}`,{}):{}),a}#c(){return 2===cp.getFeatureMap().localizationVersion?this.GENERIC_BUNDLE_KEY_LP:this.GENERIC_BUNDLE_KEY}getParagraphLocaleValue(e,t,n){const r=this.localeStore[e.toUpperCase()];return r?decodeURIComponent(atob(r.content).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")):PCore.getMetadataUtils().getParagraph(n,t)}getPortalLocaleReference(e){return e?`PORTAL!${e}`.toUpperCase():`PORTAL!${cp.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e,t){if(!e)return null;return 2===this.getLocalizationVersion()?`CASE!${e}`.toUpperCase():t?`${e}!CASE!${t}`.toUpperCase():null}getLocalizationVersion(){return cp.getFeatureMap().localizationVersion||1}async getLocaleJsons(e){if(!this.isCurrentLocalePackAvailable())return[];const t=cp.getUseLocale(),n=[],r=PCore.getLocaleUtils().localeStore;if((e=(e=e.filter((e=>!r[e]))).map((e=>e.toUpperCase()))).length>0){const r=e.map((e=>({localeRuleKey:e,promise:Mr.getSvcLocale(t,`${e}.json`)}))),s=await Promise.allSettled(r.map((e=>e.promise)));await Promise.all(s.map((async(e,t)=>{if("fulfilled"===e.status){const s=r[t];let a;try{a=await e.value.json()}catch{a=null}a&&n.push({localeRuleKey:s.localeRuleKey,jsonData:a})}})))}return n}async loadLocaleResources(e){const t=cp.getUseLocale(),n=cp.getBaseLocale();if(cp&&t&&(t!==n||"en-US"!==n)&&e?.length>0)try{(await this.getLocaleJsons(e)).forEach((e=>{this.setLocaleForRule(e.jsonData,e.localeRuleKey)}))}catch(e){console.warn(e)}}setTimezone(e){this.timezone=e}getTimeZoneInUse(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}isCurrentLocalePackAvailable(){const e=cp.getLocale();return e&&cp.getAvailableLocalePacks()?.includes(e)}};let dp;const pp=e=>{if(e){const t=(new DOMParser).parseFromString(e,"text/html").getElementsByTagName("pega-reference")[0].getAttribute("data-rule-id")??"";if(t){const e=dp.getValue(t);return dp.registerAdditionalProps({[t]:`@P ${t}`}),e}}};const hp=class{static getParagraphStream(e,t){return((e,t)=>{dp=t;const n=e.replace(/<pega-reference(.*?)<\/pega-reference>/g,pp);return/^(<p>)\s*(<\/p>)$/.test(n)?null:n})(e,t)}};Jt.registerHandler("@L",((e,t)=>t.getLocalizedValue(e))),Jt.registerHandler("@P",((e,t,n)=>t?t.getValue(e):Ch.getLitePropertyValue(n))),Jt.registerHandler("@E",((e,t,n)=>{try{const r=Vt(e),s=kt(r);return $t(s,t,n)}catch(e){}return!0})),Jt.registerHandler("@W",((e,t,n)=>{let r;if(t)r=t.getContextDataValue(`.${j.SUMMARY_OF_WHEN_CONDITIONS}.${e}`);else{const{pageReference:t,context:s}=n??{};r=lh(t,`.${j.SUMMARY_OF_WHEN_CONDITIONS}.${e}`,s)}return!0===r||"true"===r})),Jt.registerHandler("@ASSOCIATED",((e,t)=>{let n={};const r=[];let s="",a="";const o=t.getPageReference();if(e.startsWith(".")){s=`${o}.${e.substring(1)}`;const r=e?e.split(".").filter((e=>!!e)):[];r.length>1&&(r.pop(),a=r.join(".")),n=t.getFieldMetadata(e.substring(1))}else n=t.getFieldMetadata(e),s=e;const i=n?.datasource?.tableType,c=n?.datasource?.mode===j.READONLY,l=n?.datasource?.name||"",u=t.getComponentConfig();if(u&&u.deferDatasource&&(u.datasourceMetadata=`@FIELD_META ${e}`,t.setStateProps({datasourceMetadata:u.datasourceMetadata}),i===j.DATA_PAGE))return null;if(i===j.DECISION||i===j.RULE_REFERENCE)return function(e,t){const n=Qt.getPropertyName(e?.propertyForDisplayText),r=Qt.getPropertyName(e?.propertyForValue),s=t.getContextDataValue(`.${j.SUMMARY_OF_EXPRESSIONS}.${e?.name}`)||[];return s?.map((e=>({key:e[r]||e[`.${r}`],value:e[n]||e[`.${n}`]})))}(n?.datasource,t);if(i!==j.DATA_PAGE)return n?.datasource?.records;const d=Qt.getPropertyName(n?.datasource?.propertyForDisplayText),p=Qt.getPropertyName(n?.datasource?.propertyForValue),h=Array.isArray(n?.datasource?.parameters)?n?.datasource?.parameters:[],g=t.getContextName(),f=[];if(h.forEach((e=>{if(Qt.isProperty(e?.value)){let t=ch(`.${Eh.getFullPropertyReference([a,Qt.getPropertyName(e.value)])}`,o,g);f.push(Eh.getFullPropertyReference([o,a,Qt.getPropertyName(e?.value)])),null!=t&&""!==t||(t=j.NULL_STRING),r.push(t)}else r.push(e?.value||j.NULL_STRING)})),g){const e=Kt.getContextObjectByName(g)||{};f.forEach((t=>{if(t in e){const n=e[t];e[t]=[...new Set([...n,s])]}else e[t]=[s]})),Kt.addContextName(g,e)}const m=function(e,t,n,r){let s="",a=n;if(t.join(j.HASH_DELIMITER)&&(s=Eh.getHashedString(t.join(j.HASH_DELIMITER)),a=n+j.UNDERSCORE_STRING+s),r){const e=oh(),t=e?e[n]?.[a]:{};return Array.isArray(t?.pxResults)?t.pxResults:[]}const o=(e.getDataObject()[n]||{})[a]||{};return Array.isArray(o?.pxResults)?o.pxResults:[]}(t,r,l,c);return m.map((e=>({key:e[p]||e[`.${p}`],value:e[d]||e[`.${d}`]})))})),Jt.registerHandler("@ROUTING_INFO",((e,t)=>yt(t.getContainerName(),t.getContextName()))),Jt.registerHandler("@ENV",((e,t)=>{switch(e){case j.ENV_INFO_KEYS.APPLICATION_NAME:return cp.getApplicationName();case j.ENV_INFO_KEYS.ACCESS_GROUP:return cp.getAccessGroup();case j.ENV_INFO_KEYS.USER_NAME:return cp.getOperatorName();case j.ENV_INFO_KEYS.USER_ID:return cp.getOperatorIdentifier();case j.ENV_INFO_KEYS.APPLICATION_DESC:return t.getLocalizedValue(cp.getApplicationLabel()||"");case j.ENV_INFO_KEYS.USER_IMAGE:return cp.getOperatorImageInsKey();case j.ENV_INFO_KEYS.LOCALE:return cp.getUseLocale();case j.ENV_INFO_KEYS.TIMEZONE:return cp.getTimeZone();case j.ENV_INFO_KEYS.WORK_GROUP:return cp.getOperatorWorkGroup();default:return e}})),Jt.registerHandler("@DATASOURCE",((e,t)=>{const n=t.getValue(e)||[],r=t.getComponentConfig(),s=Object.keys(r).find((t=>r[t]?.source?.includes(e)));if(s){const{fields:e,copyAll:t}=r[s],a=[];return n.forEach((n=>{const r={};t?Object.keys(n).forEach((e=>{const t=Qt.getPropertyName(e);r[t]=n[t]})):Object.keys(e).forEach((t=>{const s=Qt.getPropertyName(e[t]);r[t]=n[s]})),a.push(r)})),a}return[]})),Jt.registerHandler("@FIELD_META",((e,t)=>{let n,r={};if(r=e.startsWith(".")?t.getFieldMetadata(e.substring(1)):t.getFieldMetadata(e),r&&r.datasource&&r.datasource.parameters){let s="";const a=e.split(".").filter((e=>!!e));if(a.length>1&&(a.pop(),s=`.${a.join(".")}`),Array.isArray(r.datasource.parameters)){const e=[];r.datasource.parameters.forEach((n=>{const r={},{name:a,value:o}=n;r.name=a,"string"==typeof o&&o.startsWith("@P")?r.value=`@P ${s}${o.substring(3)}`:r.value=o,e.push(t.resolveConfigProps(r))})),n=e}else n=t.resolveConfigProps(r.datasource.parameters);r={...r,datasource:{...r.datasource,parameters:n}}}return r})),Jt.registerHandler("@USER",((e,t,n={})=>{const r=t?.getValue(e)||Ch.getLitePropertyValue(n,e),s=t?.getReferencedUser(r)||Ch.getReferencedUser(r,n);return{userId:r,userName:s?s.UserName:null}})),Jt.registerHandler("@ACTIVE_CASES",((e,t)=>Fu.getOpenedCaseItems(`${t.getContextName()}/${t.getContainerName()}`))),Jt.registerHandler("@LR",(e=>e)),Jt.registerHandler("@CASE",((e,t)=>e===j.ID?t.getCaseInfo().getKey():e)),Jt.registerHandler("@SHARED",(e=>ku.getSharedState(e))),Jt.registerHandler("@PARAGRAPH",((e,t)=>{const n=t.getLocalizedParagraphValue(e);return n?hp.getParagraphStream(n,t):null})),Jt.registerHandler("@FILTERED_LIST",((e,t)=>{const n=e.substring(1,e.indexOf("[")),r=e.substring(e.indexOf("]")+2),s=e.substring(e.indexOf("[")+1,e.indexOf("]"));if(!t)return null;const{useCustomContext:a}=t;let o;return Eh.isEmpty(a)?o=t.getValue(`.${n}`):(o=a,o=Eh.getIn(o,n)),o&&r.length>0?(s&&(o=o.filter((e=>Bt(s,e)))),o.map((e=>Eh.getIn(e,r)))):null})),Jt.registerHandler("@ADDRESS",((e,t)=>{const n=t.getValue(e)?.pyCountry;return n?`pyAddressForm_${n}`:"pyAddressForm"})),Jt.registerHandler("@DATATYPE",((e,t)=>t.getValue(e)));const gp="downloadAttachment",fp={},mp=e=>{const t=fc();return fp[e]=t,t},yp=e=>{let t="document-doc";if(!e)return t;if(e.startsWith("audio"))t="audio";else if(e.startsWith("video"))t="video";else if(e.startsWith("image"))t="picture";else if(e.includes("pdf"))t="document-pdf";else{const[,n]=e.split("/"),r=e=>e.some((e=>n.includes(e)));r(["excel","spreadsheet"])?t="document-xls":r(["zip","compressed","gzip","rar","tar"])&&(t="document-compress")}return t},Ip=e=>{let t,n,r,s;return t=e.pyCategoryLabel?`${e.pyCategoryLabel},`:e.pyCategoryName?`${e.pyCategoryName},`:e.Category,n=e.pxCreateOpName?e.pxCreateOpName:e.pxCreateOperator?e.pxCreateOperator:e.CreateUser?.Name||"",r=e.pyFileName?e.pyFileName:e.FileExtension&&""!==e.FileExtension&&e.FileName.endsWith(e.FileExtension)?e.FileName.substring(0,e.FileName.lastIndexOf(e.FileExtension)-1):e.FileName,s=e.pyAttachName&&e.pyFileName?e.pyAttachName.startsWith(e.pyFileName)&&e.pyAttachName.split(".").length-1===e.pyFileName.split(".").length?e.pyAttachName.split(".").pop():"":e.FileExtension,{props:{meta:`${t} ${n}`,name:e.pyAttachName?e.pyAttachName:e.FileName,icon:yp(e.pyMimeFileExtension||e.MimeType)},responseProps:{fileName:e.pyAttachName?e.pyAttachName:e.FileName,name:r,category:e.pyCategoryName?e.pyCategoryName:e.Category,extension:s,ID:e.pzInsKey?e.pzInsKey:e.ID,mimeType:e.pyMimeFileExtension?e.pyMimeFileExtension:e.MimeType,attachmentURL:e.pyAttachmentLink?e.pyAttachmentLink:e.AttachmentURL,createUser:n,createDateTime:e.pxCreateDateTime?e.pxCreateDateTime:e.CreateDateTime,responseType:e.responseType??(e.ID?"binary":null)}}},Ep={uploadAttachment:(e,t,n,r)=>{const s=new FormData;s.append("appendUniqueIdToFileName",!0),s.append("file",e);const{restApi:a,reqType:o}=_g("uploadAttachment",{});return pc(a,{method:o,headers:{"Content-Type":"multipart/form-data"},body:s,onUploadProgress:t,signal:mp(e.ID).token},r).then((t=>({type:"File",category:e.category||"File",ID:t.data.ID,clientFileID:e.ID,filename:e.name}))).catch(n?n(mc,e):e=>{throw e.isHandled=!1,e}).finally((()=>delete fp[e.ID]))},linkAttachmentsToCase:(e,t,n,r)=>{const s={};if("File"===n){const[e]=t,{clientFileID:n}=e;delete e.clientFileID,s.signal=mp(n).token}const{restApi:a,reqType:o}=_g("linkCaseAttachment",{caseID:e});return pc(a,{...s,body:{attachments:t},method:o},r)},getCaseAttachments:(e,t,n=!1)=>{const{restApi:r,reqType:s}=_g("getCaseAttachments",{caseID:e,includeThumbnail:n});return pc(r,{method:s},t).then((e=>e.data.attachments))},getAttachmentCategories:(e,t,n)=>{const{restApi:r,reqType:s}=_g("getAttachmentCategories",{caseID:e,type:t});return pc(r,{method:s},n).then((e=>e.data))},downloadAttachment:(e,t,n)=>{const{restApi:r,reqType:s}=_g(gp,{attachmentID:e});return pc(r,{method:s,..."binary"===n&&{responseType:"arraybuffer"}},t)},editAttachment:(e,t,n)=>{const{restApi:r,reqType:s}=_g("editAttachment",{attachmentID:e});return pc(r,{method:s,body:{...t}},n)},deleteAttachment:(e,t)=>{const{restApi:n,reqType:r}=_g("deleteAttachment",{attachmentID:e});return pc(n,{method:r},t)},downloadDocument:(e,t)=>{const{restApi:n,reqType:r}=_g("downloadDocument",{documentID:e});return pc(n,{method:r},t)},deleteDocument:(e,t,n)=>{const{restApi:r,reqType:s}=_g("deleteDocument",{caseID:e,documentID:t});return pc(r,{method:s},n)},getDocumentURL:e=>{const t=PCore.getEnvironmentInfo().getDocumentUrlDP()||"D_pxGetDocumentURL";return PCore.getDataPageUtils().getPageDataAsync(t,e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getDocumentURL API : ",t.response)}))},cancelRequest:e=>{fp[e]&&(fp[e].cancel(),delete fp[e])},buildFilePropsFromResponse:Ip,getAttachmentURL:e=>{const{restApi:t}=_g(gp,{attachmentID:e});return t},prepareAttachmentData:e=>{let t=[];if(e&&Object.hasOwn(e,"pyCount")&&e.pyCount>0)t=e?.pxResults?.filter((e=>!!e.pzInsKey)).map((e=>Ip(e)))||[];else if(e&&"object"==typeof e){let n;n=Array.isArray(e)?e:[e],t=n?.filter((e=>e.ID&&e.FileName||e.pzInsKey)).map(Ip)}else t=[];return{hasUploadedFiles:t.length>0,categoryName:e?.pyCategoryName||t?.[0]?.responseProps?.category||"",attachments:t}}};Jt.registerHandler("@ATTACHMENT",((e,t,n)=>{let r;return r=t?t.getValue(e):Ch.getLitePropertyValue(n),Ep.prepareAttachmentData(r)})),Jt.registerHandler("@FL",((e,t)=>t.getLocalizedValue(t.getFieldMetadata(e)?.label))),Jt.registerHandler("@GENAICOACH",((e,t)=>Hp(e,t.getCurrentClassID()))),Jt.registerHandler("@REFRESH",((e,t)=>{const n=t.getCaseInfo().getKey(),r=t.getContextName(),s=t.getPageReference();hl.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),n,"",s,{autoDetectRefresh:!0,preserveClientChanges:!1,refreshFor:!0}),`${s}${e}`,`${r}/${s}`,r)}));const Ap={},_p={},Sp={},Cp={},Tp={},Np={},Pp={},Dp={},Rp={},bp={},Op=(e={},t={})=>{0!==Object.keys(t).length?Object.keys(e).forEach((n=>{const r=e[n],s=t[n];if(s){const e=Array.isArray(s)?s:[s];(Array.isArray(r)?r:[r]).forEach((t=>{const n=e.findIndex((e=>e.classID===t.classID));if(-1===n)e.push(t);else{const r={isDeclarativeTarget:!1},s={...e[n],...r,...t};e[n]=s}})),t[n]=1===e.length?e[0]:e}else t[n]=r})):Eh.copy(e,t)},vp=(e,t="")=>{if(!e)return null;const n=Cp[e];if(!n)return null;if(!t)return Array.isArray(n)?[...n]:n;let r;return r=Array.isArray(n)?n.find((e=>e.classID.toLowerCase()===t.toLowerCase()))||null:n.classID.toLowerCase()===t.toLowerCase()||("Page"===n.type||"Page List"===n.type)&&n?.pageClass?.toLowerCase()===t.toLowerCase()?n:null,r},xp=(e,t,n,r=[])=>{if(!t||!e)return null;if(!e.includes(".")){let s;const a=vp(e,t);return r.length&&(s=r.join(".")),{...a,embeddedType:n,category:s}}const[s,...a]=e.split("."),o=vp(s,t);return o&&r.push(o.label),xp(a.join("."),o?.pageClass,o?.type,r)},wp=e=>{Op(e,_p)},Mp=e=>{Op(e,Sp)},Lp=e=>{if(e.views&&Op(e.views,_p),e.navigations&&Op(e.navigations,Sp),e.personalizations&&Op(e.personalizations,Np),e.insights&&Op(e.insights,Pp),e.paragraphs&&Op(e.paragraphs,Ap),e.dataTypes&&Op(e.dataTypes,Dp),e.datapages&&Op(e.datapages,Rp),e.genAICoaches&&Op(e.genAICoaches,bp),e.fields){Object.keys(e.fields).forEach((t=>{const n=e.fields[t];if(Array.isArray(n)){if(e.datapages&&n.forEach((t=>{t.datasource&&"DataPage"===t.datasource.tableType&&(t.datasource.mode=e.datapages[t.datasource.name].mode)})),1===n.length){const[r]=n;e.fields[t]=r}}else e.datapages&&n.datasource&&"DataPage"===n.datasource.tableType&&(n.datasource.mode=e.datapages[n.datasource.name].mode)}));const{datapages:t={}}=e;Object.keys(t).forEach((e=>{Tp[e]=t[e]}))}Op(e.fields,Cp)},Up=e=>_p[e],Fp=(e,t)=>{const n=_p[e];return Array.isArray(n)?n.some((e=>e.classID===t)):n?.classID===t},jp=e=>Sp[e],Vp=e=>e in Tp?Tp[e]:null,kp=e=>e in Np?Np[e]:null,$p=e=>e in Pp?Pp[e]:null,Bp=e=>{const t={};return Object.keys(Cp).forEach((n=>{const r=Cp[n];let s;Array.isArray(r)?s=r.find((t=>e===t.classID)):e===r.classID&&(s=r),s&&(t[n]=Eh.deepClone(s))})),t},Gp=(e,t)=>{const n=vp(e,t)?.datasource?.parameters;return n?Eh.deepClone(n):null},Wp=(e,t)=>{let n=null;const r=Ap[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?Eh.deepClone(n).content:null},Hp=(e,t)=>{let n=null;const r=bp[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?Eh.deepClone(n):null},qp=e=>{if(e in Dp){const{savableDataPage:t}=Dp[e];return t}return null},zp=e=>{const t=Rp[e];if(!t)return null;const{classID:n,isAlternateKeyStorage:r,parameters:s}=t;if(r)return s.map((e=>({keyName:e.name,isAlternateKeyStorage:r,linkedField:e.linkedField})));const a=Dp[n];return a?a.classKeys.map((e=>({keyName:e,isAlternateKeyStorage:r}))):[]},Yp=e=>{if(e in Dp){const{lookupDataPage:t}=Dp[e];return t}return null},Kp=e=>{if(Object.prototype.hasOwnProperty.call(Dp,e)){const{lookupDataPageInfo:t}=Dp[e];return t}return null},Xp=(e,t)=>{const n=e.split("."),r=n.pop(),s=new Ku({options:{pageReference:`${n.join(".")}`,context:t}}),a=vp(r,s.getCurrentClassID())?.additionalInformation;if(!a?.includes("@PARAGRAPH"))return a;const o=Qt.trimAnnotation(a),i=s.getCurrentClassID(),c=s.getLocaleRuleNameFromKeys(i,j.PARAGRAPH,o),l=up.getParagraphLocaleValue(c,i,o);return l?hp.getParagraphStream(l,s):null},Jp=(e,t)=>{const n=e.split("."),r=n.pop(),s=new Ku({options:{pageReference:`${n.join(".")}`,context:t}}),a=vp(r,s.getCurrentClassID()),o={};return s._classID=s.getCurrentClassID(),s.resolveConfigProps(a,o),o};class Qp{constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,t,n,r,s,a="singleRecord"){if(!e||!n||!r?.length)return;const o=n.startsWith(".")?`${t}.${n.substring(1)}`:n,i=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(t,n,s);r.forEach((e=>{if(!e)return;let t=e.startsWith(".")?e.substring(1):e;if(t=Eh.getFullPropertyReference([c,t]),t in i){const e=i[t];e.find((e=>e.propertyName===o))||e.push({propertyName:o,mode:a})}else i[t]=[{propertyName:o,mode:a}]})),Object.keys(i).length>0&&(this.cascadeResetSubscribers[e]=i)}deregisterResetDependencies(e,t,n,r,s){if(!e||!n||!r?.length)return;const a=n.startsWith(".")?`${t}.${n.substring(1)}`:n,o=this.cascadeResetSubscribers[e]||{},i=this._handlePageReference(t,n,s);r.forEach((e=>{if(e){let t=e.startsWith(".")?e.substring(1):e;if(t=Eh.getFullPropertyReference([i,t]),t in o){const e=o[t];Eh.removeExistingDependentProperty(e,a)}}})),Object.keys(o).length>0&&(this.cascadeResetSubscribers[e]=o)}getResetDependencies(e,t){return this.cascadeResetSubscribers[e]?.[t]||[]}purgeResetDependencies(e){e&&this.cascadeResetSubscribers[e]&&delete this.cascadeResetSubscribers[e]}registerFields(e,t,n,r,s){this.cascadeSubscribers[e]=this.cascadeSubscribers[e]||{},n?.forEach((n=>{this.cascadeSubscribers[e][`${t}${n}`]=this.cascadeSubscribers[e][`${t}${n}`]||{};const a=this.cascadeSubscribers[e][`${t}${n}`];if(!a[s]){a[s]=r;const o=ch(n,t,e);a.previousValue="object"==typeof o?null:o}}))}registerListField(e,t,n,r,s){const a=Qp._getFieldsForList(e,t,n);a.length>0&&(this.registerFields(e,t,a,r,s),ru.enableCascade(e))}unRegisterListField(e,t,n,r){const s=Qp._getFieldsForList(e,t,n);s.length>0&&this.unRegisterFields(e,t,s,r)}static _getFieldsForList(e,t,n){const r=[],s=vp(n,ch("classID",t,e));return s&&s.datasource&&s.datasource.parameters&&Object.values(s.datasource.parameters).forEach((e=>{if(Qt.isProperty(e)){const t=Qt.trimAnnotation(e);r.push(t)}})),r}unRegisterFields(e,t,n,r){this.cascadeSubscribers[e]&&n?.forEach((n=>{if(!this.cascadeSubscribers[e][`${t}${n}`])return;const s=this.cascadeSubscribers[e][`${t}${n}`];s[r]&&delete s[r]}))}triggerCascade(e,t,n,r){let s=!1;this.cascadeSubscribers[e]&&this.cascadeSubscribers[e][t]&&(Object.keys(this.cascadeSubscribers[e][t]).forEach((a=>{const o=this.cascadeSubscribers[e][t];"previousValue"!==a&&o.previousValue!==n&&(s=!0,r?r.add(o[a]):o[a](t,n))})),s&&(this.cascadeSubscribers[e][t].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,t=[],n=[]){if(!e)return;const r=new Set;n.forEach((t=>{const n=ch(t,"",e);this.triggerCascade(e,t,n,r)})),r.forEach((e=>{e()})),0!==this.listChangeSubscribers.length&&0!==t.length&&t.forEach((t=>{this.listChangeSubscribers.forEach((n=>{const r=ch(t,"",e);n(e,t,r)}))}))}_getServerProperties(e,t,n,r,s){if("object"!=typeof e){s.push(n.replace(/\.(\d+)/g,"[$1]"));const a=/[a-zA-Z]+\.(\d+)\./g;if(0===this.listChangeSubscribers.length||!a.test(n))return;n=n.replace(/\.(\d+)/g,"[$1]");const o=ch(n,"",t);if(void 0===o&&!e&&0!==e)return;return void(o!==e&&r.push(n))}const a=Object.keys(e??{});for(let o=0,i=a.length;o<i;o+=1){const i=a[o],c=`${n}.${i}`;this._getServerProperties(e[i],t,c,r,s)}}getServerProperties(e,t,n=j.CASE_INFO.CASE_INFO_CONTENT){const r=[],s=[],a=Eh.getIn(e,n);return a&&t?(this._getServerProperties(a,t,n,r,s),{changedListProperty:r,leafProperty:s}):{changedListProperty:r,leafProperty:s}}_handlePageReference(e,t,n){let r=e;if("Page"===n&&t.startsWith(".")&&t.match(/[.]/g).length>1){r=`${e}${t.substring(0,t.lastIndexOf("."))}`}return r}registerForListChanges(e=(()=>{})){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}}const Zp=new Qp;let eh=null;const th=e=>e?.split(/\.(?![^[]+\])|\[|\]/g).filter(Boolean),nh=e=>{eh=e},rh=()=>eh,sh=e=>{if(!e)return;let t=[],n=[];Array.isArray(e)||"MERGE_DATA"!==e.type||({changedListProperty:t,leafProperty:n}=Zp.getServerProperties(e.payload.data,e.payload.context,e.payload.rootPageReference)),rh()?.dispatch(e),Array.isArray(e)||"MERGE_DATA"!==e.type||Zp.handleServerChanges(e.payload.context,t,n)},ah=e=>rh()?.getState().data?.[e],oh=()=>rh()?.getState().data[j.SHARED],ih=(e,t,n)=>{if(!(r=e)||r.startsWith('"')||r.startsWith("'"))return(e=>e&&e.trim().substring(1,e.length-1))(e);var r;const s=e?.startsWith(".")?t+e:e,a=th(s);return Eh.getIn(n,a)},ch=(e,t,n)=>ih(e,t,ah(n)),lh=(e,t,n)=>ih(t,e?`${j.CONTEXT_DATA}.${e}`:`${j.CONTEXT_DATA}`,ah(n)),uh=(e,t,n)=>((e,t,n)=>{const r=th(`${t}.${n}`);return Eh.getIn(e,r)})(ah(n),`${j.CONTEXT_DATA}.${e}`,t),dh=e=>{const{context:t}=e,n=rh()?.getState().data[t];if(n)return de;const{action:r}=e;return["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"].includes(r)?Se:de},ph=(e,t)=>{const n=th(t);return Eh.deleteIn(e,n)},hh=e=>!Array.isArray(e)&&"object"==typeof e,gh=(e,t,n={})=>{const{isArrayDeepMerge:r,propertiesToReplace:s=[]}=n;Array.isArray(e)&&!t&&(t=[]),Array.isArray(s)&&s.length>0&&s.forEach((t=>{Eh.setIn(e,t,{})}));const a=(e,t)=>{if(hh(e)&&null!==t&&"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)return w()(e,t,a);if(Array.isArray(e)&&null!==t&&Array.isArray(t)){if(r)return w()(e,t,a);{const n=t.length;if(void 0===r&&n===e.length)return w()(e,t,a)}}return""===t&&e&&"object"==typeof e?e:t};return a(e,t)},fh=(e,t,n,r={isArrayDeepMerge:!0})=>{const{isArrayDeepMerge:s}=r,a=th(t);if("object"==typeof n){const t=gh(Eh.getIn(e,a),n,{isArrayDeepMerge:s});return Eh.setIn(e,a,t)}return Eh.setIn(e,a,n)},mh=(e,t,n)=>{const r=th(t);return Eh.setIn(e,r,n)},yh=()=>{const e=Ze,{promise:t,actionMgrID:n}=ln.actionManagerPromise(e);return sh({type:e,payload:{actionMgrID:n}}),t};class Ih{static mergeDeep(e,t){return w()(t,e)}static hasIn(e,t){return D()(e,t)}static getIn(e,t,n){return b()(e,t,n)}static setIn(e,t,n){return v()(e,t,n)}static deleteIn(e,t){return N()(e,t)}static isObjectEmpty(e){return!e||0===Object.entries(e).length}static isEmpty(e){return L()(e)}static deepClone(e={}){return JSON.parse(JSON.stringify(e))}static copy(e,t){Object.keys(e).forEach((n=>{t[n]=e[n]}))}static isPropertyRef(e){if(!e||-1===e.indexOf("."))return!1;let t=0;const n=e.length;for(;t<n;t+=1)if(" @#$%=!<>/\\".includes(e[t]))return!1;return!0}static isWhenExist(e){const t=["visibility","disabled","readOnly","required"];let n=!1;for(const r in e)t.includes(r)&&"string"==typeof e[r]&&e[r]?.startsWith("@W ")&&(n=!0);return n||"multirecordlist"!==e?.type||"Editable"!==e?.renderMode||(n=Object.keys(e?.allowActions??{}).some((t=>"string"==typeof e?.allowActions?.[t]&&e.allowActions[t]?.startsWith("@W ")))),n}static getWhenNames(e){const t=["visibility","disabled","readOnly","required"];let n="";const r=new Set;for(const s in e)t.includes(s)&&"string"==typeof e[s]&&e[s]?.startsWith("@W ")&&(n=Qt.trimAnnotation(e[s]),r.add(n));return"multirecordlist"===e?.type&&"Editable"===e?.renderMode&&Object.keys(e?.allowActions??{}).forEach((t=>{"string"==typeof e?.allowActions[t]&&e.allowActions[t]?.startsWith("@W ")&&(n=Qt.trimAnnotation(e.allowActions[t]),r.add(n))})),[...r]}static isExpressionExist(e){const t=["disabled","visibility","readOnly","required"];let n=!1;for(const r in e)t.includes(r)&&"string"==typeof e[r]&&e[r]?.startsWith("@E ")&&(n=!0);return n}static buildDataObject(e,t){let n={};const r=n;if(t.indexOf(".")>0){t.split(".").forEach((e=>{if(e.includes("[")){const[t]=e.split("[");n[t]=[],n=n[t],e=e.substring(e.indexOf("[")+1,e.lastIndexOf("]"))}n[e]={},n=n[e]}))}else n[t]={},n=n[t];return Object.keys(e).forEach((t=>{let r=t;t.startsWith(".")&&(r=t.substring(1)),n[r]=e[t]})),r}static buildObject=(e,t,n)=>{if(void 0===n)return;const r=e.split(".");let s=0;for(;s<r.length-1;s+=1){const e=r[s];e?.toString().length&&!t[e]&&(t[e]={}),t[e]&&(t=t[e])}"object"==typeof n?(t[r[s]]||(t[r[s]]=Array.isArray(n)?[]:{}),gh(t[r[s]],n,{isArrayDeepMerge:!0})):t[r[s]]=n};static getHashedString(e){return(0,C.crc32)(e).toString(16)}static getPropertyName(e){if(e){const t=e.startsWith("@P"),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getPropertyNameFromDependency(e){return"string"==typeof e?e:e.propertyName}static isValidJson(e){try{return JSON.parse(e)}catch(e){return console.error("not a Valid JSON",e),!1}}static isEqual(e,t){return h()(e,t)}static isContains(e,t){const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(e[n[r]]&&Ih.isEqual(e[n[r]],t))return!0;return!1}static removeExistingDependentProperty(e,t){const n=e.findIndex((e=>e.propertyName===t));n>=0&&e.splice(n,1)}static getFullPropertyReference(e){return Array.isArray(e)?e.filter((e=>!!e)).join("."):null}static iterateLeafNodes(e,t){const n=(e,r=[])=>{Object.entries(e).forEach((([s,a])=>{r.push(Array.isArray(e)?Number(s):s),Array.isArray(a)?a.forEach(((e,t)=>{r.push(t),n(e,r),r.pop()})):"object"==typeof a?n(a,r):t(r.slice(),a),r.pop()}))};n(e)}static resolveStringBooleans(e){const t=["required","readOnly","visibility"];return Object.keys(e).forEach((n=>{t.includes(n)&&"string"==typeof e[n]&&(e[n]="true"===e[n])})),e}static generateUniqueID(){return crypto.randomUUID()}static unflatten(e){const t={};return Object.entries(e).forEach((([e,n])=>{const r=e.split(".");let s;r.reduce(((e,t,a)=>(s=e[t]?e[t]:Number.isNaN(Number(r[a+1]))?r.length-1===a?n:{}:[],e[t]=s,e[t])),t)})),t}static flatten(e,t,n){t||(t=""),Array.isArray(e)?e.forEach(((e,r)=>{Ih.flatten(e,`${t}[${r}]`,n)})):"object"==typeof e&&null!==e?Object.keys(e).forEach((r=>{const s=t?`${t}.${r}`:r;Ih.flatten(e[r],s,n)})):n[t]=e}static buildInstructionPageReference(e,t){const n=`${e}${t}`.replace(j.CASE_INFO.CASE_INFO_CONTENT,"").replace(j.DATA_INFO.DATA_INFO_CONTENT,"");return Vn.formatPageReference(n)}static buildAttachmentsFormData(e){return e.map((e=>{if(e.delete){let t="";return t=e.responseProps.ID?e.responseProps.ID:e.responseProps.pzInsKey,{type:"File",attachmentFieldName:e.label,delete:!0,pzInsKey:t}}return{type:"File",attachmentFieldName:e.label,category:e.category,ID:e.handle,clientFileID:e.ID}}))}static convertPageRefToClipboardPageNotation(e){return e.replace(/\[\d+\]/g,(e=>e.replace(/\d+/g,(e=>`${parseInt(e,10)+1}`)).replace("[","(").replace("]",")")))}static convertClipboardPageToPageRefNotation(e){return e.replace(/\(\d+\)/g,(e=>e.replace(/\d+/g,(e=>""+(parseInt(e,10)-1))).replace("(","[").replace(")","]")))}static isString(e){return"string"==typeof e}static rejectPendingActions(e){return e.forEach((e=>e.payload.actionMgrID&&ln.rejectActionByID(e.payload.actionMgrID))),!0}static isValidAnnotation(e){const t=new Set(["@DATASOURCE","@ACTIVE_CASES","@ADDRESS","@ASSOCIATED","@ATTACHMENT","@CASE","@FILTERED_LIST","@PARAGRAPH","@P","@ROUTING_INFO","@USER","@W","@E","@SHARED"]),n=e.indexOf(" "),r=e.substring(0,n);return t.has(r)}static trimDotForProperty(e){return"string"==typeof e&&e.startsWith(".")?e.substring(1):e}static convertObjectWithStringToBoolean(e){if(e&&!Array.isArray(e)&&"object"==typeof e)return Object.keys(e).forEach((t=>{let n;const r=e[t];n="string"==typeof r?"true"===r||"false"!==r&&r:r,e[t]=n})),e}}const Eh=Ih,Ah=j.SUMMARY_OF_LISTS,_h=j.SUMMARY_OF_WHEN_CONDITIONS;class Sh{static updateData(e){Object.keys(e).forEach((t=>{sh(bh({context:t,data:e[t]}))}))}static updateContextData(e){Object.keys(e).forEach((t=>{sh(bh({context:t,data:e[t]}))}))}static resolveWhen(e,t){return!!t.getContextDataValue(`.${_h}.${e}`)}static resolveFieldValue(e,t){return t.getLocalizedValue(e)}static resolveNavigation(e,t){return jp([this.resolveName(e,t)])}static resolveView(e,t,n=""){const r=Up([this.resolveName(e,t)]);let s=[];return Array.isArray(r)&&r.length>0?(t&&(n||(n=t.getValue(j.CLASS_ID)),s=r.filter((e=>e[j.CLASSID]===n))),0===s.length?r[0]:s[0]):r}static resolveName(e,t){return e?.startsWith("param.")?(e=e.substring(6),t.getContextDataValue(`.$parameters.${e}`)):(e?.startsWith("@")&&(e=Qt.handleAnnotation(e,t)),e)}static getContextPath(e,t){return("number"==typeof t||t)&&("number"==typeof(t=Qt.trimAnnotation(t))||"string"==typeof t)?"number"==typeof t&&parseInt(t,10)===t?`${e}[${t}]`:t.startsWith(".")?e+t:`${t}`:e}static getRuleClass(e,t,n){let r;return t?r=t.startsWith(j.CLASS_ANNOTATION)?t.split(j.CLASS_ANNOTATION)[1].trim():this.resolveClassID(t,e.getPageReference(),e.getContextName()):n?.authorContext&&(r=n.ruleClass),r}static resolveReference(e,t){const{type:n}=e;let r;if("reference"===n){const{config:n}=e,s=n?.type,{ref:a,name:o,context:i}=n||{},c=this.getRuleClass(t,i,n);return"navigation"===s?r=this.resolveNavigation(a||o,t):"view"===s?r=this.resolveView(a||o,t,c||""):"widget"===s&&(r={type:"Widget",config:{name:o,ruleClass:c}}),r}return e}static resolvePropertyReference(e,t,n){return ch(t,e,n)}static getProperty(e,t,n){let r=this.resolvePropertyReference(t,e,n);if(null==r||0===r.length){const s=uh(`${t}.${Ah}`,e,n);s&&(r=this.resolvePropertyReference(t,s,n))}return r}static getPropertyValue(e,t,n){return e=Qt.trimAnnotation(e),this.getProperty(e,t,n)}static getReferencedUser(e,t){const n=Sh.getLitePropertyValue(t,"referencedUsers");if(Array.isArray(n)){const t=n.find((t=>t.UserID===e));if(t)return{userId:t.UserID,UserName:t.UserName}}return n?.[e]}static getLitePropertyValue(e,t){if(!e)return;const{useCustomContext:n,propertyName:r,hasSuggestions:s,pageReference:a,context:o}=e;let i=t||r;return n?(i=i?.startsWith?.(".")?i.substring(1):i,i?.split?.(".").reduce(((e,t)=>e?.[t]??void 0),n)):s?Sh.getPropertyValue(i,a,`${o}/${j.SUGGESTION}`):Sh.getPropertyValue(i,a,o)}static _handlePropString(e,t,n,r,s){n.startsWith("@")?e[t]=Qt.handleAnnotation(n,r,s):e[t]=n}static _resolveProps(e,t,n){e&&Object.keys(e).forEach((r=>{const s=e[r];"string"==typeof s?this._handlePropString(e,r,s,t,n):Array.isArray(s)?s.forEach((r=>{this._resolveProps("object"==typeof r?r:e[r],t,n)})):"object"==typeof s&&this._resolveProps(e[r],t,n)}))}static resolveProps(e,t,n){return e&&t?(Eh.mergeDeep(e,t),this._resolveProps(t,n,void 0),t):t}static resolveContextTreeNodeProps(e){const t={};return e?(Eh.mergeDeep(e,t),this._resolveProps(t,void 0,e),Eh.resolveStringBooleans(t)):t}static resolveClassID(e,t,n){const r=Qt.trimAnnotation(e);let s;for(s=r.startsWith(".")?`${t}${r}`:`${r}`;s;){const e=ch(j.CLASS_ID,s,n);if(e)return e;s=s.substring(0,s.lastIndexOf("."))}return null}}const Ch=Sh;const Th=new class{constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,t){this.actionHandlers[e]=t}};const Nh=class{static#u=[];static#d=!1;static getActionHandlers=(e,t,n)=>{const r=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==t||e.forEach((e=>{const t=Th.getHandler(e.action),{config:n}=e;r.push({handler:t,config:n})})),r};static isEditable=e=>{const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t||"DATETIME"===t};static isNonKeyInput=e=>{const{tagName:t,type:n}=e;return"SELECT"===t||"checkbox"===n||"radio"===n};static#p=(e,t,n)=>{for(let r=0;r<e.length;r+=1){const s=e[r],a={actionHandler:s.handler,component:t,eventType:n,config:s.config};this.#u.push(a)}};static buildActionObject=(e,t)=>{const n={...e};return n.context="Browser"===cp.getRuntime()?t.getContextName():n.context,n.pageReference=t.getPageReference(),n.actionMgrID=ln.getNextActionMgrId(),n};static#h=e=>{const t=e.actionHandler,n=e.component,{config:r}=e,s={};Ch.resolveProps(r,s,n),t&&(t(e.eventType,s,n),this.#g())};static#g=()=>{if(!this.#d){if(0===this.#u.length)return;const e=this.#u.shift();this.#h(e),e.config&&"true"===e.config.parallel&&this.#u.length>0&&this.#g()}};static#f=()=>{this.#g()};static#m=(e,t,n)=>{this.#p(e,t,n),this.#f()};static getFullRef=e=>{const t=e.getPageReference(),n=e.getComponentConfig().value;return Ch.getContextPath(t,n)};static#y(e,t){const n=e.getComponentConfig().behaviours||[];for(let r=0;r<n.length;r+=1){const{behaviour:s,actions:a}=n[r];if(a){const n=this.getActionHandlers(a,s,t);n&&n.length>0&&this.#m(n,e,t)}}}static changeHandler=(e,t)=>{const n=e.getStateProps().value,r=e.getContextName();qn({type:F.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:r});if(("Browser"===cp.getRuntime()?t?.nativeEvent instanceof Event||t instanceof Event:!!t?.nativeEvent)||null!==t.value&&void 0===t.prop){let{target:n}=t;null===n&&t&&t.auxiliaryTarget&&(n=t.auxiliaryTarget);const s=void 0===n?t.value:"value"in n?n.value:n.innerText,a=this.getFullRef(e);sh({type:Q,payload:{reference:a,value:s,context:r}}),void 0!==n&&this.isEditable(n)&&!this.isNonKeyInput(n)||sh({type:ee,payload:{reference:a,pageReference:e.getPageReference(),value:s,context:r,propertyName:e.getComponentConfig().value,classID:e.getValue(j.CLASS_ID)}})}else{const n=e.getPageReference(),s=e.getStateProps();for(const e of Object.keys(t)){const a=s[e],o=t[e];sh({type:Q,payload:{reference:Ch.getContextPath(n,a),value:o,context:r}}),sh({type:ee,payload:{reference:Ch.getContextPath(n,a),value:o,context:r}})}}};static blurHandler=(e,t)=>{let{target:n}=t;null===n&&t&&t.auxiliaryTarget&&(n=t.auxiliaryTarget);const{value:r,validationValue:s}=n,a=this.getFullRef(e),o=e.getContextName();n.clearMessages&&qn({type:F.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:o}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?s:r),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,r),!this.isNonKeyInput(n)&&sh({type:ee,payload:{reference:a,pageReference:e.getPageReference(),value:r,context:o,propertyName:e.getComponentConfig().value,classID:e.getValue(j.CLASS_ID)}}))};static eventHandler=(e,t)=>{const{type:n}=t;switch(n){case"change":this.changeHandler(e,t);break;case"blur":this.blurHandler(e,t)}n&&this.#y(e,n)};static pause=()=>{this.#d=!0};static resume=()=>{this.#d=!1,this.#g()};static isQueueEmpty=()=>0===this.#u.length;static clearQueue=()=>{this.#u=[]};static getActionsQueue=()=>this.#u;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},Ph="CREATE_WORK",Dh=e=>({type:Ph,payload:e});const Rh=(e,t,n,r="")=>{const s=[];Object.keys(e).forEach((a=>{"object"==typeof e[a]&&a.includes("[")?function(e,t,n,r,s,a){const o=r.substring(0,r.indexOf("[")),i=r.substring(r.indexOf("[")+1,r.indexOf("]"));Array.isArray(t[o])&&(t[o]?.splice(+i,1,e[r]),a.push(o),n.add(`${s}.${r}`))}(e,t,n,a,r,s):e[a]&&"object"==typeof e[a]?(t[a]||(t[a]=Array.isArray(e[a])?[]:{}),Rh(e[a],t[a],n,`${r}.${a}`)):t[a]=e[a]})),function(e,t,n){Object.keys(e).forEach((r=>{(Array.isArray(e[r])&&!n.includes(r)||!Array.isArray(e[r])&&!Object.hasOwn(t,r))&&delete e[r]}))}(t,e,s)},bh=(e,t={})=>{const{serverPrecedenceFields:n=[],propertiesToReplace:r=[]}=t,{context:s,data:a,isArrayDeepMerge:o,preserveClientChanges:i=!1}=e,c=Al(s,!0);((e,t={})=>{const n=Kc.buildClientChangeList(e)||{};Object.keys(n).forEach((e=>{Eh.buildObject(e,t,n[e])}))})(s,c);const l=ah(s);let u={};if(l&&a){u=JSON.parse(JSON.stringify(l));const e=JSON.parse(JSON.stringify(a)),t=new Set;Rh(c,u,t),((e,t,n)=>{const r=new Set;e.forEach((e=>{e=Eh.trimDotForProperty(e);const[s,a,o]=gn(e);s&&a&&o&&!r.has(`${s}.${a}`)&&((Eh.getIn(n,`${s}.${a}`)||[]).forEach(((e,n)=>{n!==+o&&Eh.setIn(t,`${s}.${a}[${n}]`,e)})),r.add(`${s}.${a}`))}))})(t,u,e)}!function(e,t){const n=Eh.getIn(e,j.REFERENCED_USERS);let r;if(void 0!==n){if(!Array.isArray(n)&&"object"==typeof n)return r=Eh.getIn(t,j.REFERENCED_USERS,{}),void Eh.setIn(e,j.REFERENCED_USERS,{...r,...n});r=Eh.getIn(t,j.REFERENCED_USERS,[]);const s=new Map;for(const e of[...r,...n])if(s.has(e.UserID)){const t=s.get(e.UserID);s.set(e.UserID,{...t,...e})}else s.set(e.UserID,e);n.length=0;for(const e of s.values())n.push(e)}}(a,l);const d={caseInfo:{content:{...u?.caseInfo?.content}}};let p=a;return i?(n.forEach((e=>{Eh.deleteIn(d,`caseInfo.content.${e}`)})),p=gh(a,d,{isArrayDeepMerge:!o})):((e,t)=>{const n=fl[e]||{};Object.keys(n).forEach((e=>{Eh.hasIn(t,e)&&(n[e].value=Eh.getIn(t,e))}))})(s,a),{type:fe,payload:{...e,data:p,...r.length>0?{propertiesToReplace:r}:null}}},Oh=e=>({type:"SHOW_HARNESS",payload:e}),vh=e=>({type:te,payload:e}),xh=e=>({type:ne,payload:e}),wh=e=>({type:"ADD_WORK",payload:e}),Mh=e=>({type:ue,payload:e}),Lh=e=>({type:Ae,payload:e}),Uh=e=>({type:_e,payload:e}),Fh=e=>({type:Se,payload:e}),jh=e=>({type:Te,payload:e}),Vh=e=>({type:Ne,payload:e}),kh=e=>({type:Re,payload:e}),$h=e=>({type:Oe,payload:e}),Bh=e=>({type:be,payload:e}),Gh=e=>{const{containerItemID:t}=e;return e.suggestionContexts=Ad(t),{type:xe,payload:e}},Wh=e=>{const{context:t}=e;return{type:oe,payload:{context:t}}},Hh=e=>{const{context:t}=e;return{type:ie,payload:{context:t}}},qh=e=>({type:we,payload:e}),zh=e=>({type:ve,payload:e}),Yh=e=>({type:Je,payload:e}),Kh=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=fd(n)),e.context=r,e.deleteContext=!Md(n),e.childContainers=Id(n),e.childContainersContexts=Ed(n),e.transientItems=Ld([...e.childContainersContexts,n]),e.suggestionContexts=Ad(n),n===t&&(e.caseID=ch(j.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=ch(j.CASE_INFO.REMOTESYSTEMID,"",t)),{type:Ce,payload:e}},Xh=e=>{const{containerItemID:t}=e;return e.transientItems=Ld([...Ed(t),t]),{type:De,payload:e}},Jh=e=>{const{transientItemID:t}=e;return e.transientItems=[t],{type:Pe,payload:e}},Qh=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=fd(n)),e.context=r,e.childContainers=Id(n),e.childContainersContexts=Ed(n),e.transientItems=Ld([...e.childContainersContexts,n]),e.suggestionContexts=Ad(n),n===t&&(e.caseID=ch(j.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=ch(j.CASE_INFO.REMOTESYSTEMID,"",t)),{type:Me,payload:e}},Zh=e=>({type:pe,payload:e}),eg=e=>({type:ge,payload:e}),tg=e=>({type:Ie,payload:e}),ng=(e,...t)=>(Nh.resume(),e(...t)),rg=(e,t,n,r,s)=>({type:Ee,payload:{msg:e,err:t,context:n,formFields:r,actionMgrID:s}}),sg=e=>({type:tt,payload:e}),ag=e=>({type:nt,payload:e}),og=e=>({type:rt,payload:e}),ig=e=>({type:"SHOW_CASE_PREVIEW",payload:e}),cg=e=>({type:ce,payload:e}),lg=e=>({type:Q,payload:e}),ug="add",dg="replace",pg=["portal","noPortal","preview","debug","devtool"];let hg="",gg="Home",fg="",mg=!0;const yg=e=>(mg=e,mg),Ig=()=>mg,Eg=(e,t,n)=>ip.getSemanticURL(e,t,n),Ag=(e,t)=>ip.getRestEndPoint(e,t),_g=(e,t)=>{let n=E();const r=Ag(e,t);return r?(r.restApi?.startsWith("/")||(r.restApi=`/${r.restApi}`),n?.endsWith("/")&&(n=n.substring(0,n.length-1)),r.restApi=n+r.restApi,r):{}},Sg=(e,t,n)=>{const{root:r,resources:s}=e,{views:a}=s,{config:o}=r,i=ug;let c="";if(n)c=n;else{const e=a[o.name];let t=e;Array.isArray(e)&&e.length>0&&([t]=e);c=t.config.urlPath}const l=c.match(ep);if(l){const e=Eh.getIn(t,o.context);c=c.replace(l[0],e.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:i}},Cg=(e,t,n)=>{let r,s;r=np(t)?`${e}/${t}`:e;const a=np(n.pxURLPath);a&&(r=`${r}/${a}`);try{s=new URL(r).searchParams,r=r.includes("?")?r.split("?")[0]:r}catch(e){return console.log("Invalid url",e),""}const o=r.split("/"),i=o[o.length-1],c=new URLSearchParams(window.location.search);if(i.toLowerCase()!==gg.toLowerCase()||c.has("noPortal")||(r=`${e}/${t}`),!ip.isDefaultPortal()){const e=ip.getPortalName();c.has("portal")?c.set("portal",e):c.append("portal",e)}return s=((e,t)=>{for(const[n,r]of t.entries())!e.has(n)&&pg.includes(n)&&e.append(n,r);return e})(s,c),s.toString()&&(r+=`?${s.toString()}`),r},Tg=(e,{urlPathObjParam:t,infoParam:n,optionsParam:r},s=!1)=>{let a,o,i;if(!1===window.PCore.getBehaviorOverride("dynamicSemanticUrl"))return;if(s)a=t,o=n,i=r;else{const{uiResources:n,data:r}=e;({options:i}=e),a=t&&t.pxURLPath&&tp(t.pxURLPath)?Sg(n,r,t.pxURLPath):t||Sg(n,r),o=ip.getEndPointInfo(a.pxURLPath),a.pxURLPath=o.urlPath}const c=Cg(hg,ip.getApplicationPath(),a),{title:l}=((e,t,n)=>{if(e=(e=>{let t=e.split(" ");return t=t.map((e=>e.charAt(0).toUpperCase()+e.slice(1))),t.join(" ")})(e=e&&""!==e?e:ip.getApplicationName()),n===`${hg}/${t}/`)return{title:e};const r=new URL(n).pathname.replace(`${t}/`,""),s=r.split("/");return/\d/.test(r)?{title:`${e} - ${s[s.length-1]}`}:{title:`${e} - ${s[0]}`}})(fg,ip.getApplicationPath(),c),u=((e,t)=>(void 0!==e&&(e.options=t),{stateObj:e}))(o,{...i,title:l});a.historyAction===ug?((e,t,n)=>{try{window.history.pushState(e,t,n),window.scrollTo(0,0)}catch(e){throw new Error("Error- Unable to Add to Browser History")}})(u,l,c):a.historyAction===dg&&((e,t,n)=>{try{window.history.replaceState(e,t,n)}catch(e){throw new Error("Error- Unable to Replace Browser History")}})(u,l,c)},Ng=e=>{let t=null;e.directUrlUpdation&&(t={historyAction:ug,pxURLPath:""},t.pxURLPath=e.semanticURL),Tg(e,{urlPathObjParam:t,infoParam:null,optionsParam:null},!1)},Pg=e=>{Ng(e)},Dg=e=>{const t={pxURLPath:e};return Cg(hg,ip.getApplicationPath(),t)},Rg=e=>{const{uiResources:t}=e;Ig()&&(e.directUrlUpdation||(e=>{if(e&&e.root){const{root:t}=e,{resources:n}=e,{views:r}=n,s=t.config,a=s.type,o=s.name;if("VIEW"===a.toUpperCase()){const e=r[o];let t=e;Array.isArray(e)&&e.length>0&&([t]=e);const n=t.config;if(n.type){const e=n.type;return!(!n.urlPath||"PAGE"!==e.toUpperCase())}}return!1}return!1})(t))&&Ng(e)},bg=e=>{const t={routeEndpoint:e.routeEndpoint,requestType:e.requestType,payload:e.payload,routeKey:e.routeKey,options:null};return e.options&&(t.options=e.options),t},Og=(e,t,n)=>{const{caseClassName:r,workID:s}=e.payload,{containerName:a,context:o}=t,{RemoteClassGroup:i,RemoteSystemID:c,name:u}=$.getRemoteCase(r),d={...e,headers:{RemoteSystemID:c},className:r,isTraditionalRemoteCase:!0,action:ft,viewName:V,gadgetId:Sc.getUniqueGadgetId(),context:n??o,skipSemanticUrl:!0,insKey:`${i?.toUpperCase()} ${s}`,containerName:a,name:u};sh(l.showPage(d))},vg=e=>{const t=(e=>e.state?e.state.stateObj:null)(e);t&&($.isTraditionalRemoteCase(t.payload?.caseClassName)?Og({...t},t.options):sh(l.showHistory(bg(t))))},xg=()=>ip.getApplicationPath()!==sp(),wg=e=>{const{acName:t,context:n,defaultViewLabel:r}=e,s=(e=>{const t=ip.getRoutingInfo(),n=e.split(" ").join(""),r=e.split(" ").join("-").toLowerCase(),s=(e=>{const t=e.replace(/(?=[A-Z][a-z])/g,"-").toLowerCase();return t.startsWith("-")?t.substring(1):t})(e);return t?.routes[n]?n:t?.routes[r]?r:t?.routes[s]?s:e})(r);(e=>{gg=e})(s),ip.setDefaultRoute(s);const a=H(t,n),o=mt(t,n),i="true"===cp.getIsExtraCallRequiredForDefaultHome(),c={historyAction:dg,pxURLPath:""};let u;const d={acName:o,context:a,actionConfig:{context:a}};if(i||!i&&xg()){const t=(e=>{if(e.indexOf("?")>0){const[t,n]=e.split("?"),r=new URLSearchParams(n),s=new Map;for(const[e,t]of r)"portal"!==e&&"noPortal"!==e&&"debug"!==e&&s.set(e,t);const a=new URLSearchParams(s).toString();return a?`${t}?${a}`:t}return e})(np(window.location.pathname+window.location.search));u=ip.getEndPointInfo(t),c.pxURLPath=u.urlPath,void 0!==u.payload?.pageClass&&(u.payload.pageClass=rh()?.getState()?.data?.app?.pyPortal?.classID);const n="showHistory",r={routeEndpoint:u.routeEndpoint,requestType:u.requestType,payload:u.payload,options:d,routeKey:u.routeKey};$.isTraditionalRemoteCase(u?.payload?.caseClassName)?Og(r,e,d.context):sh(l[n](bg(r)))}else u=ip.getEndPointInfo(gg),c.pxURLPath="";Tg(null,{urlPathObjParam:c,infoParam:u,optionsParam:d},!0)},Mg=(e,t=!1)=>{var n;hg=e.domain,!1===t&&Ig()&&(n=vg,window.addEventListener("popstate",(e=>n(e))),window.onbeforeunload=()=>null),ip.init(e,gg)},Lg=e=>{(e=>{window.document.title=e})(e)};function Ug(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Fg=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),jg=()=>Math.random().toString(36).substring(7).split("").join("."),Vg={INIT:`@@redux/INIT${jg()}`,REPLACE:`@@redux/REPLACE${jg()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${jg()}`};function kg(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function $g(e,t,n){if("function"!=typeof e)throw new Error(Ug(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Ug(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Ug(1));return n($g)(e,t)}let r=e,s=t,a=new Map,o=a,i=0,c=!1;function l(){o===a&&(o=new Map,a.forEach(((e,t)=>{o.set(t,e)})))}function u(){if(c)throw new Error(Ug(3));return s}function d(e){if("function"!=typeof e)throw new Error(Ug(4));if(c)throw new Error(Ug(5));let t=!0;l();const n=i++;return o.set(n,e),function(){if(t){if(c)throw new Error(Ug(6));t=!1,l(),o.delete(n),a=null}}}function p(e){if(!kg(e))throw new Error(Ug(7));if(void 0===e.type)throw new Error(Ug(8));if("string"!=typeof e.type)throw new Error(Ug(17));if(c)throw new Error(Ug(9));try{c=!0,s=r(s,e)}finally{c=!1}return(a=o).forEach((e=>{e()})),e}p({type:Vg.INIT});return{dispatch:p,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Ug(10));r=e,p({type:Vg.REPLACE})},[Fg]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(Ug(11));function n(){const e=t;e.next&&e.next(u())}n();return{unsubscribe:e(n)}},[Fg](){return this}}}}}function Bg(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const s=t[r];0,"function"==typeof e[s]&&(n[s]=e[s])}const r=Object.keys(n);let s;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:Vg.INIT}))throw new Error(Ug(12));if(void 0===n(void 0,{type:Vg.PROBE_UNKNOWN_ACTION()}))throw new Error(Ug(13))}))}(n)}catch(e){s=e}return function(e={},t){if(s)throw s;let a=!1;const o={};for(let s=0;s<r.length;s++){const i=r[s],c=n[i],l=e[i],u=c(l,t);if(void 0===u){t&&t.type;throw new Error(Ug(14))}o[i]=u,a=a||u!==l}return a=a||r.length!==Object.keys(e).length,a?o:e}}function Gg(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}var Wg=function(e){function t(t,n){return e.call(this)||this}return Uo(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(Xo),Hg={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var s=Hg.delegate;return(null==s?void 0:s.setInterval)?s.setInterval.apply(s,$o([e,t],ko(n))):setInterval.apply(void 0,$o([e,t],ko(n)))},clearInterval:function(e){var t=Hg.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},qg=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return Uo(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,s=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(s,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(s,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),Hg.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&Hg.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=e||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Ko(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(Wg),zg=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return Uo(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.flush(this),0)},t}(qg),Yg={now:function(){return(Yg.delegate||Date).now()},delegate:void 0},Kg=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=Yg.now,e}(),Xg=function(e){function t(t,n){void 0===n&&(n=Kg.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return Uo(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(Kg),Jg=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Uo(t,e),t}(Xg))(zg),Qg=wo((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Zg=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return Uo(t,e),t.prototype.lift=function(e){var t=new ef(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Qg},t.prototype.next=function(e){var t=this;ii((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var s=Vo(t.currentObservers),a=s.next();!a.done;a=s.next()){a.value.next(e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;ii((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;ii((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,s=n.isStopped,a=n.observers;return r||s?Jo:(this.currentObservers=null,a.push(e),new Xo((function(){t.currentObservers=null,Ko(a,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,s=t.isStopped;n?e.error(r):s&&e.complete()},t.prototype.asObservable=function(){var e=new Ei;return e.source=this,e},t.create=function(e,t){return new ef(e,t)},t}(Ei),ef=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return Uo(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:Jo},t}(Zg),tf=function(e,t){return tf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},tf(e,t)};Object.create;Object.create;var nf=function(e){function t(t,n){var r=e.call(this,(function(e){var t=r.__notifier.subscribe(e);return t&&!t.closed&&e.next(r.value),t}))||this;return r.__notifier=new Zg,r.value=n,t.subscribe((function(e){e!==r.value&&(r.value=e,r.__notifier.next(e))})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}tf(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Ei);var rf=s(923),sf=Symbol.for("immer-nothing"),af=Symbol.for("immer-draftable"),of=Symbol.for("immer-state");function cf(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var lf=Object.getPrototypeOf;function uf(e){return!!e&&!!e[of]}function df(e){return!!e&&(hf(e)||Array.isArray(e)||!!e[af]||!!e.constructor?.[af]||If(e)||Ef(e))}var pf=Object.prototype.constructor.toString();function hf(e){if(!e||"object"!=typeof e)return!1;const t=lf(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===pf}function gf(e,t){0===ff(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,r)=>t(r,n,e)))}function ff(e){const t=e[of];return t?t.type_:Array.isArray(e)?1:If(e)?2:Ef(e)?3:0}function mf(e,t){return 2===ff(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function yf(e,t,n){const r=ff(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function If(e){return e instanceof Map}function Ef(e){return e instanceof Set}function Af(e){return e.copy_||e.base_}function _f(e,t){if(If(e))return new Map(e);if(Ef(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=hf(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[of];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const s=n[r],a=t[s];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(lf(e),t)}{const t=lf(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function Sf(e,t=!1){return Tf(e)||uf(e)||!df(e)||(ff(e)>1&&(e.set=e.add=e.clear=e.delete=Cf),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>Sf(t,!0)))),e}function Cf(){cf(2)}function Tf(e){return Object.isFrozen(e)}var Nf,Pf={};function Df(e){const t=Pf[e];return t||cf(0),t}function Rf(){return Nf}function bf(e,t){t&&(Df("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Of(e){vf(e),e.drafts_.forEach(wf),e.drafts_=null}function vf(e){e===Nf&&(Nf=e.parent_)}function xf(e){return Nf={drafts_:[],parent_:Nf,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function wf(e){const t=e[of];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Mf(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[of].modified_&&(Of(t),cf(4)),df(e)&&(e=Lf(t,e),t.parent_||Ff(t,e)),t.patches_&&Df("Patches").generateReplacementPatches_(n[of].base_,e,t.patches_,t.inversePatches_)):e=Lf(t,n,[]),Of(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==sf?e:void 0}function Lf(e,t,n){if(Tf(t))return t;const r=t[of];if(!r)return gf(t,((s,a)=>Uf(e,r,t,s,a,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return Ff(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let s=t,a=!1;3===r.type_&&(s=new Set(t),t.clear(),a=!0),gf(s,((s,o)=>Uf(e,r,t,s,o,n,a))),Ff(e,t,!1),n&&e.patches_&&Df("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Uf(e,t,n,r,s,a,o){if(uf(s)){const o=Lf(e,s,a&&t&&3!==t.type_&&!mf(t.assigned_,r)?a.concat(r):void 0);if(yf(n,r,o),!uf(o))return;e.canAutoFreeze_=!1}else o&&n.add(s);if(df(s)&&!Tf(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Lf(e,s),t&&t.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(n,r)||Ff(e,s)}}function Ff(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Sf(t,n)}var jf={get(e,t){if(t===of)return e;const n=Af(e);if(!mf(n,t))return function(e,t,n){const r=$f(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!df(r)?r:r===kf(e.base_,t)?(Gf(e),e.copy_[t]=Wf(r,e)):r},has:(e,t)=>t in Af(e),ownKeys:e=>Reflect.ownKeys(Af(e)),set(e,t,n){const r=$f(Af(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=kf(Af(e),t),o=r?.[of];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((s=n)===(a=r)?0!==s||1/s==1/a:s!=s&&a!=a)&&(void 0!==n||mf(e.base_,t)))return!0;Gf(e),Bf(e)}var s,a;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==kf(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Gf(e),Bf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=Af(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){cf(11)},getPrototypeOf:e=>lf(e.base_),setPrototypeOf(){cf(12)}},Vf={};function kf(e,t){const n=e[of];return(n?Af(n):e)[t]}function $f(e,t){if(!(t in e))return;let n=lf(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=lf(n)}}function Bf(e){e.modified_||(e.modified_=!0,e.parent_&&Bf(e.parent_))}function Gf(e){e.copy_||(e.copy_=_f(e.base_,e.scope_.immer_.useStrictShallowCopy_))}gf(jf,((e,t)=>{Vf[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Vf.deleteProperty=function(e,t){return Vf.set.call(this,e,t,void 0)},Vf.set=function(e,t,n){return jf.set.call(this,e[0],t,n,e[0])};function Wf(e,t){const n=If(e)?Df("MapSet").proxyMap_(e,t):Ef(e)?Df("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Rf(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=jf;n&&(s=[r],a=Vf);const{revoke:o,proxy:i}=Proxy.revocable(s,a);return r.draft_=i,r.revoke_=o,i}(e,t);return(t?t.scope_:Rf()).drafts_.push(n),n}function Hf(e){if(!df(e)||Tf(e))return e;const t=e[of];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=_f(e,t.scope_.immer_.useStrictShallowCopy_)}else n=_f(e,!0);return gf(n,((e,t)=>{yf(n,e,Hf(t))})),t&&(t.finalized_=!1),n}var qf=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...s){return r.produce(e,(e=>t.call(this,e,...s)))}}let r;if("function"!=typeof t&&cf(6),void 0!==n&&"function"!=typeof n&&cf(7),df(e)){const s=xf(this),a=Wf(e,void 0);let o=!0;try{r=t(a),o=!1}finally{o?Of(s):vf(s)}return bf(s,n),Mf(r,s)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===sf&&(r=void 0),this.autoFreeze_&&Sf(r,!0),n){const t=[],s=[];Df("Patches").generateReplacementPatches_(e,r,t,s),n(t,s)}return r}cf(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){df(e)||cf(8),uf(e)&&(e=function(e){uf(e)||cf(10);return Hf(e)}(e));const t=xf(this),n=Wf(e,void 0);return n[of].isManual_=!0,vf(t),n}finishDraft(e,t){const n=e&&e[of];n&&n.isManual_||cf(9);const{scope_:r}=n;return bf(r,t),Mf(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=Df("Patches").applyPatches_;return uf(e)?r(e,t):this.produce(e,(e=>r(e,t)))}},zf=qf.produce;qf.produceWithPatches.bind(qf),qf.setAutoFreeze.bind(qf),qf.setUseStrictShallowCopy.bind(qf),qf.applyPatches.bind(qf),qf.createDraft.bind(qf),qf.finishDraft.bind(qf);const Yf=(e,t)=>{const{data:{shared:n={}}={},context:r}=t;((e,t)=>{fu.updateDataPageStore(t),Object.keys(t).forEach((n=>{Eh.getIn(e,[j.SHARED,n])?Object.keys(t[n]).forEach((r=>{Eh.setIn(e,[j.SHARED,n,r],t[n][r])})):Eh.setIn(e,[j.SHARED,n],t[n])}))})(e,n),r&&Eh.deleteIn(e,[r,"shared"])},Kf=(e,t,n=!1)=>{const{context:r,caseViewMode:s=(n?void 0:j.PERFORM_MODE),containerName:a}=t;a!==td.WORKAREA&&s&&Eh.setIn(e,[r,"context_data","caseViewMode"],s)},Xf=(e,t)=>{const{context:n}=t;Eh.setIn(e,[n,"context_data","actionType"],t.actionType),Eh.setIn(e,[n,"context_data","assignmentID"],t.assignmentID)},Jf=(e,t=[])=>{t.forEach((t=>Eh.deleteIn(e,t)))},Qf=(e,t=[])=>{t.forEach((t=>Eh.deleteIn(e,t)))},Zf=(e,t=[])=>{t.forEach((t=>{Eh.deleteIn(e,t)}))},em=(e,t,n={})=>{const{deleteAssignmentSpecificResources:r=!0,doDeleteConfirmationDetails:s=!0}=n;Eh.deleteIn(e,[t,"nextAssignmentInfo"]),Eh.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"availableActions"]),Eh.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"availableProcesses"]),Eh.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"activeActionID"]),Eh.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"assignments"]),Eh.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"childCases"]),s&&(Eh.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"confirmationLinks"]),Eh.deleteIn(e,[t,"caseMessages"])),r&&(Eh.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"actionButtons"]),Eh.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"navigation"]))},tm=(e,t)=>zf(e||{},(e=>{switch(t.type){case Se:{if(!t.payload.data||e[t.payload.context])return e;t.payload.doDeleteCaseSummary&&em(e,t.payload.context);const{target:n}=t.payload;return!n||-1===n.indexOf(j.WORKAREA)&&-1===n.indexOf(j.MODAL)?e[t.payload.containerItemID]=t.payload.data:e[t.payload.context]=t.payload.data,Kf(e,t.payload),Xf(e,t.payload),Yf(e,t.payload),((e,t)=>{const{context:n}=t;Eh.deleteIn(e,[n,"context_data","blocking_action_counter"]),Eh.deleteIn(e,[n,"context_data","deferred_action_queue"])})(e,t.payload),e}case xe:{t.payload.doDeleteCaseSummary&&em(e,t.payload.context,{deleteAssignmentSpecificResources:t.payload.deleteAssignmentSpecificResources});const{target:n,propertiesToReplace:r=[]}=t.payload;return!n||-1===n.indexOf(j.WORKAREA)&&-1===n.indexOf(j.MODAL)?e[t.payload.containerItemID]=gh(e[t.payload.containerItemID],t.payload.data,{propertiesToReplace:[...r]}):e[t.payload.context]=gh(e[t.payload.context],t.payload.data,{propertiesToReplace:[...r]}),(t.payload.actionType||t.payload.assignmentID)&&Xf(e,t.payload),Kf(e,t.payload),Yf(e,t.payload),Qf(e,t.payload.suggestionContexts),e}case Ce:{const{childContainersContexts:n=[]}=t.payload;return((e,t)=>{const{containerItemID:n,context:r,deleteContext:s}=t;s&&Eh.deleteIn(e,[r]),Eh.deleteIn(e,[n])})(e,t.payload),Zf(e,n),Jf(e,t.payload.transientItems),Qf(e,t.payload.suggestionContexts),e}case _e:{const{containerItems:n}=t.payload;return Array.isArray(n)?n.forEach((t=>{Eh.deleteIn(e,[t])})):Eh.deleteIn(e,[n]),e}case we:{const{context:n,contextToBeRemoved:r,data:s,childContainersContextsToBeRemoved:a}=t.payload;return em(e,t.payload.context),Kf(e,t.payload),e[n]=gh(e[n],e[r]),e[n]=gh(e[n],s),Eh.deleteIn(e,[r]),Zf(e,a),Yf(e,t.payload),e}case Me:{const{payload:{context:n,pulseReplace:r=!0,childContainersContexts:s=[]}}=t;let{payload:{data:a}}=t;const o=Eh.getIn(e[n],"pulse");let i=Eh.getIn(e[n],"OperatorID"),c=Eh.getIn(e[n],"pxRequestor");return c&&a.pxRequestor&&(c=Eh.mergeDeep(c,a.pxRequestor)),i&&a.OperatorID&&(i=Eh.mergeDeep(i,a.OperatorID)),!r&&o&&(a=fh(a,"pulse",o),a=fh(a,"OperatorID",i),a=fh(a,"pxRequestor",c)),Eh.setIn(e,n,a),Kf(e,t.payload),Yf(e,t.payload),Zf(e,s),Jf(e,t.payload.transientItems),Qf(e,t.payload.suggestionContexts),e}case st:{const{context:n,doDeleteConfirmationDetails:r=!0}=t.payload;return em(e,n,{doDeleteConfirmationDetails:r}),e}case Te:{const{transientItemID:n,data:r}=t.payload;return Eh.setIn(e,n,r)}case Pe:case De:{const{transientItems:n}=t.payload;return n.forEach((t=>Eh.deleteIn(e,t))),e}case Ne:case Re:{const{transientItemID:n,data:r}=t.payload;return gh(Eh.getIn(e,n),r),e}case be:{const{transientItemID:n,data:r}=t.payload;for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&Eh.deleteIn(e,[n,t]);return e}case Oe:{const{transientItemID:n,data:r}=t.payload;return Eh.deleteIn(e,n),Eh.setIn(e,n,r)}case ce:{const{key:n,value:r}=t.payload;return Eh.setIn(e,`${j.SHARED}.${n}`,r),e}case Fe:{const{context:n,data:r}=t.payload;return Eh.setIn(e,n,r)}default:return e}})),nm=(e,t)=>zf(e,(e=>{switch(t.type){case fe:{const{propertiesToReplace:n=[]}=t.payload;return e[t.payload.context]=gh(e[t.payload.context],t.payload.data,{isArrayDeepMerge:t.payload.isArrayDeepMerge,propertiesToReplace:[...n]}),Kf(e,t.payload,!0),Yf(e,t.payload),e}case Q:{const{context:n,reference:r,value:s,isArrayDeepMerge:a}=t.payload;return fh(e[n],r,s,{isArrayDeepMerge:a}),e}case Z:{const{context:n,reference:r,value:s}=t.payload;return mh(e[n],r,s),e}case me:return ph(e[t.payload.context],t.payload.reference),e;case oe:return Eh.setIn(e[t.payload.context],"context_data.isLoading",!0),e;case ie:return Eh.setIn(e[t.payload.context],"context_data.isLoading",!1),e;case tt:{const{data:n}=t.payload;return Yf(e,{data:{shared:n}}),e}case nt:{const{dataPagesToBeRemoved:n=[]}=t.payload;return n.forEach((t=>{const{dataPageName:n,dataPageNameWithHash:r}=t;Eh.deleteIn(e.shared,[n,r]);const s=Eh.getIn(e.shared,[n]);s&&0===Object.keys(s).length&&Eh.deleteIn(e.shared,[n])})),e}case at:{const n=Eh.getIn(e[t.payload.context].context_data,"blocking_action_counter",0);return t.payload.isInitiateBlockingAction?Eh.setIn(e[t.payload.context].context_data,"blocking_action_counter",n+1):Eh.setIn(e[t.payload.context].context_data,"blocking_action_counter",n-1),e}default:return e}})),rm=/\[(\d+)\]$/gi,sm=/(\d+)/gi,am=/\[.\]$/gi,om=(e,t,n,r=[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT])=>{const s=Eh.getIn(t,r);if(s){const t=Yn(s,[],[]);for(const s of t)Eh.setIn(e[n],[...r,...s],{})}},im=(e,t,n,r)=>{const{property:s,pageReference:a,category:o,type:i}=r.payload,c=Eh.getIn(e[t],n);if(c&&o===j.CASEMESSAGES)Eh.setIn(e[t],$n(s,a,o),"");else if(c&&c.length>0&&Array.isArray(c)){const r=c.filter((e=>e.type!==i));n&&n.length>0&&Eh.setIn(e[t],$n(s,a,o),r)}};const cm=(e,t,n)=>{n.forEach((n=>{((e,t,n)=>{const r=n[j.ERROR_FIELD_IN_PAGE].slice(1),s=n[j.ERROR_IN_PAGE_IDENTIFIER].slice(1);if(s){let a=r?`caseInfo.content.${r}`:"caseInfo.content";a=a.replace(/\(/g,"[").replace(/\)/g,"]");const o=$n(s,a,j.PROPERTY),i={type:F.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue},c=Eh.getIn(e[t],o,[]);if(Eh.isContains(c,i))return;Eh.setIn(e[t],o,[...c,i])}})(e,t,n)}))};function lm(e,t){const{err:n,formFields:r}=t.payload;let{context:s}=t.payload;const{fieldErrors:a,pageErrors:o}=xc(n.errorDetails,r);if(Eh.setIn(e,[s,...kn.FIELD_MESSAGES_PATH],{}),Eh.setIn(e,[s,...kn.PAGE_MESSAGES_PATH],[]),a.forEach((t=>{if(t[j.ERROR_FIELD_IN_PAGE]){const n=t[j.ERROR_FIELD_IN_PAGE].slice(1);if(n){const t=function(e){let t=null;const n=e.lastIndexOf(".");return n<0?null:(t=e.substring(0,n),t?`caseInfo.content.${t}`.replace(/\(/g,"[").replace(/\)/g,"]"):t)}(n);if(!t)return!1;const r=n.substring(n.lastIndexOf(".")+1),a=$n(r,t,j.PROPERTY);Eh.setIn(e,[s,...a],[])}}})),a.length>0&&cm(e,s,a),o.length>0){const t=(e=>{const t=[];return e.forEach((e=>{t.push({type:F.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue})})),t})(o);e[s]||(s=j.APP.APP),Eh.setIn(e,[s,...kn.PAGE_MESSAGES_PATH],t)}else s.includes&&s.includes(td.WORKAREA)&&(s=W(s)),Eh.deleteIn(e,[s,...kn.PAGE_MESSAGES_PATH]);return e}const um=(e,t)=>zf(e||Im().data,(e=>{switch(t.type){case Ee:return t.payload.err.errorDetails&&("Validation fail"===t.payload.err.errorClassification||(t.payload.err?.displayButtonsOnErrors?.length??0)>0)?lm(e,t):e;case xe:{const{context:n}=t.payload,r=[n,...kn.FIELD_MESSAGES_PATH],s=[n,...kn.PAGE_MESSAGES_PATH];if(Eh.setIn(e,r,{}),Eh.setIn(e,s,[]),n&&n.includes(td.WORKAREA)){const t=[X(n),...kn.PAGE_MESSAGES_PATH];Eh.setIn(e,t,[])}return e}case Qe:{const{isListEntry:n}=t.payload;return n?((e,t)=>{const{property:n,pageReference:r,category:s,isListEntry:a,deletingIndex:o,stateObj:i}=t.payload,{context:c}=t.payload;if(i)return om(e,i,c),e;const l=$n(n,r,s,a);if(Number.isInteger(o)){Eh.deleteIn(e[c],l);const t=l.slice(0,l.length-1);let n=Eh.getIn(e[c],t)||{};const r=Object.keys(n);n=r.map((e=>n[e])),n.forEach(((n,s)=>{const a=r[s].match(rm);if(a?.length){const i=parseInt(a[0].match(sm)[0],10);i>o&&(Eh.deleteIn(e[c],t.concat(r[s])),Eh.setIn(e[c],t.concat(r[s].replace(am,`[${i-1}]`)),n))}}))}else Eh.setIn(e[c],l,{});return e})(e,t):((e,t)=>{const{property:n,pageReference:r,category:s,isListEntry:a,stateObj:o}=t.payload,{context:i}=t.payload;let c=i;if(o)return om(e,o,i),e;const l=$n(n,r,s,a);return s===j.PAGE&&i?.includes(td.WORKAREA)&&(c=W(i)),im(e,c,l,t),im(e,i,l,t),e})(e,t)}case Je:{const{messages:n,property:r,pageReference:s,context:a,category:o}=t.payload,i=$n(r,s,o);return n&&n.length>0&&Array.isArray(n)&&i&&i.length>0&&Eh.setIn(e[a],$n(r,s,o),n),e}default:return e}})),dm=(e,t)=>zf(e,(e=>{if(t.type===rt){const{instruction:n,actions:r,context:s,referenceList:a,listIndex:o,listMoveToIndex:i,content:c={}}=t.payload,l=th(a);switch(n){case j.LIST_ACTIONS.INSERT:((e,t,n,r,s)=>{Eh.setIn(e[t],[...n,r],s)})(e,s,l,o,c);break;case j.LIST_ACTIONS.UPDATE:((e,t,n,r,s)=>{const a=gh(Eh.getIn(e[t],[...n,r],{}),s);Eh.setIn(e[t],[...n,r],a)})(e,s,l,o,c);break;case j.LIST_ACTIONS.DELETE:((e,t,n,r)=>{const s=Eh.getIn(e[t],n,[]);s.splice(r,1),Eh.setIn(e[t],n,s),Pn.deleteListNode(t,n,s.length)})(e,s,l,o);break;case j.LIST_ACTIONS.MOVE:((e,t,n,r,s)=>{const a=Eh.getIn(e[t],[...n,r],{}),o=Eh.getIn(e[t],n,[]);o.splice(r,1),o.splice(s,0,a),Eh.setIn(e[t],n,o),Wn(e,t,n?.join("."),r,s)})(e,s,l,o,i);break;case j.LIST_ACTIONS_TYPE.SELECT_DESELECT:((e,t,n,r)=>{const s=Eh.getIn(e[t],n)||[];r.forEach((e=>{const{instruction:r,content:a,listIndex:o}=e;if(r===j.LIST_ACTIONS.SELECT){s[o]=a;const e=n?.join(".");hr(t,e)}else delete s[o]})),Eh.setIn(e[t],n,s.filter(Boolean))})(e,s,l,r);break;case j.LIST_ACTIONS_TYPE.DESELECT_ALL:((e,t,n)=>{Eh.setIn(e[t],n,[])})(e,s,l)}}return e})),pm=[nm,tm,um,dm],hm=(e,t)=>(e||(e=Im().data),t.type===Ze?Im().data:(pm.forEach((n=>{e=n(e,t)})),e)),gm=(e,t=[])=>{t.forEach((t=>{Eh.deleteIn(e,[t])}))},fm=(e,t)=>{const{type:n,payload:r}=t,s=n===xe,{target:a,context:o,semanticURL:i="",root:c,containerItemID:l,childContainers:u,flowName:d,resourceType:p="",key:h="",clearView:g=!1}=r;return c?Eh.setIn(e,[a,"items",l,"view"],c):g&&Eh.deleteIn(e,[a,"items",l,"view"]),o&&Eh.setIn(e,[a,"items",l,"context"],o),d&&Eh.setIn(e,[a,"items",l,"flowName"],d),(!s||s&&h)&&Eh.setIn(e,[a,"items",l,"key"],h.trim()),(!s||s&&i)&&Eh.setIn(e,[a,"items",l,"semanticURL"],i),(!s||s&&p)&&Eh.setIn(e,[a,"items",l,"resourceType"],p),gm(e,u),e},mm=(e,t)=>(e||(e=Im().containers),t.type===Ze?Im().containers:zf(e,(e=>{switch(t.type){case Ae:{const{context:n,name:r,type:s,actionMgrID:a}=t.payload,o=`${n}/${r}`;let i=null;return ln.resolveActionByID(a,null,!1),e[o]?e:(i={type:s,accessedOrder:[],items:{}},Eh.setIn(e,[o],i),e)}case Ue:{const{containerName:n,childContainers:r=[]}=t.payload;return Eh.deleteIn(e,[n]),r.forEach((t=>{Eh.deleteIn(e,[t])})),e}case _e:{const{context:n,name:r,actionMgrID:s,childContainers:a}=t.payload,o=`${n}/${r}`;return ln.resolveActionByID(s,null,!1),Eh.setIn(e,[o,"accessedOrder"],[]),Eh.setIn(e,[o,"items"],{}),Array.isArray(a)&&a.forEach((t=>{Eh.deleteIn(e,[t])})),e}case Se:{const{target:n,context:r,isInCreateStage:s,isBulkAction:a,semanticURL:o,root:i,containerItemID:c,actionMgrID:l,key:u,flowName:d,resourceType:p,actionName:h,isMinimizable:g,showProgress:f,progressMessage:m,modalOptions:y,resourceStatus:I,actionID:E,isMultiRecordData:A,acTertiary:_,parentContext:S,heading:C,isTraditionalRemoteCase:T}=t.payload,N=e[n],P=N&&N.type,D=N&&N.accessedOrder||[],R=N&&N.items||{};let b=null;return e[n]&&"single"===P&&D.length>0?fm(e,t):(b={accessedOrder:[...D,c],items:{...R,[c]:{view:i,semanticURL:o,key:u,flowName:d,context:r,isInCreateStage:s,resourceType:p,actionName:h,isMinimizable:g,...a&&{isBulkAction:a},showProgress:f,progressMessage:m,modalOptions:y,isTraditionalRemoteCase:T,resourceStatus:I,...E&&{actionID:E},..._&&{acTertiary:_},...A&&{isMultiRecordData:A},...S&&{parentContext:S},heading:C}}},ln.resolveActionByID(l,null,!1),e[n]=w()(e[n],b),e)}case xe:{const{actionMgrID:n,data:r}=t.payload;let s=e;try{s=fm(e,t),ln.resolveActionByID(n,r,!1)}catch{ln.rejectActionByID(n,!1)}return s}case Me:return((e,t)=>{const{actionMgrID:n,data:r,target:s,containerItemID:a}=t.payload;let o=e;try{const i=e&&e[s]?.type;let c=e&&e[s]?.accessedOrder||[];c="single"===i?c.length>0?c:[...c,a]:c.includes(a)?c:[...c,a],Eh.setIn(e,[s,"items",a,"transientItems"],[]),Eh.setIn(e,[s,"accessedOrder"],c),o=fm(e,t),ln.resolveActionByID(n,r,!1)}catch{ln.rejectActionByID(n,!1)}return o})(e,t);case ve:{const{target:n,containerItemID:r,actionMgrID:s}=t.payload;try{const t=Eh.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));t.push(r),Eh.setIn(e,[n,"accessedOrder"],t),ln.resolveActionByID(s,null,!1)}catch{ln.rejectActionByID(s,!1)}return e}case we:case Ce:{const{target:n,containerItemID:r,actionMgrID:s,childContainers:a}=t.payload;try{const t=Eh.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));Eh.setIn(e,[n,"accessedOrder"],t),Eh.deleteIn(e,[n,"items",r]),gm(e,a),ln.resolveActionByID(s,null,!1)}catch{ln.rejectActionByID(s,!1)}return e}case Te:{const{transientItemID:n,target:r,contextName:s}=t.payload,a=Eh.getIn(e,[r,"items",s,"transientItems"])??[];return Eh.setIn(e,[r,"items",s,"transientItems"],[...a,n])}case De:{const{target:n,containerItemID:r}=t.payload;return Eh.deleteIn(e,[n,"items",r,"transientItems"]),e}case Pe:{const{target:n,transientItemID:r,containerItemID:s}=t.payload,a=(Eh.getIn(e,[n,"items",s,"transientItems"])??[]).filter((e=>e!==r));return Eh.setIn(e,[n,"items",s,"transientItems"],a)}default:return e}})));let ym={};const Im=()=>ym,Em=e=>((e=>{const t=e.Data||e.data,{uiResources:n={}}=e,r=n[j.CONTEXT_DATA]||e[j.CONTEXT_DATA];ym={data:{[j.APP.APP]:{...t,[j.CONTEXT_DATA]:r}},containers:{}}})(e),Bg({data:hm,containers:mm}));function Am(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Hl(e),r=function(e,t){return"number"==typeof Wl(e)?e.pop():t}(e,1/0),s=e;return s.length?1===s.length?Ri(s[0]):function(e){return void 0===e&&(e=1/0),Bl(yi,e)}(r)(ji(s,n)):Yl}const _m=(e,t)=>{e.data=e.data??{};const{assignments:n,availableActions:r=[]}=e.data.caseInfo??{};if(n&&Array.isArray(n)&&n.length>0&&n[0].actions&&Array.isArray(n[0].actions)&&!t?.stopMergeActions){n[0].actions.forEach((e=>{"Assignment"!==e.type&&"LocalAction"!==e.type||r.push(e)})),e.data.caseInfo=e.data.caseInfo??{},e.data.caseInfo.availableActions=r}},Sm=(e,t)=>{if(e.confirmationLinks&&(e.data=e.data??{},e.data.caseInfo=e.data.caseInfo??{},e.data.caseInfo.confirmationLinks=e.confirmationLinks),!e.uiResources&&e.confirmationNote){let t=e;const{confirmationNote:n}=t;return t=((e,t)=>{const n=[e];return t.data=t.data??{},t.data.caseMessages=n,t})(n,t),t}if(!e.uiResources||!e.data||!e?.uiResources?.root)return e;const n=e,{uiResources:{actionButtons:r,navigation:s},nextAssignmentInfo:a}=n;if(n.data&&n.data.caseInfo&&(r&&(n.data.caseInfo.actionButtons=r),s&&(n.data.caseInfo.navigation=s),t&&t[F.ACTIONS.DELETEAVIALACTIONS]&&delete n.data.caseInfo.availableActions,_m(n,t),e.confirmationNote)){const{confirmationNote:e}=n,t=[e];n.data.caseMessages=t}return t&&t.isCreateDataObject&&(n.data=n.data??{},n.data.dataInfo={},n.data.dataInfo.content=n.data.pyPortal,n.uiResources.root.config.context="dataInfo.content",n.uiResources.context_data.dataInfo=n.uiResources.context_data.dataInfo??{},n.uiResources.context_data.dataInfo.content=n.uiResources.context_data.dataInfo.content??{},n.uiResources.context_data.dataInfo.content=n.uiResources.context_data?.pyPortal,delete n.data.pyPortal,delete n.key),a&&(n.data=n.data??{},n.data.nextAssignmentInfo=a),n},Cm={},{VIEW:Tm,FIELD:Nm}=j.CONTEXT_TREE_NODE_TYPES,Pm=(e,t)=>{const{context:n}=e;e.reqHeaders&&e.reqHeaders.etag&&(e.headers={"if-match":e.reqHeaders.etag});const r=(e=>{const{ID:t,actionID:n,context:r}=e;return`${t}.${r}.${n}`})(t);if((e=>sc[e])(r)>0&&Cm[r]){const t=[];Cm[r].forEach(((n,r)=>{n.url===e.url&&(t.push(r),n.cancelConfig.cancel())})),t.forEach((e=>{Cm[r].splice(e,1)}))}const s=fc();return e.signal=s.token,e.cancelConfig=s,Cm[r]?Cm[r].push(e):Cm[r]=[e],pc(e.url,e,n,{cancelContext:r}).then((e=>(delete Cm[r],e))).catch((e=>{throw e&&"ERR_CANCELED"!==e.code&&delete Cm[r],e}))},Dm=[(e,t)=>e.pipe(Vl(Dn.REFRESH_DATA,gt),$l((e=>e.payload)),Bl((e=>{const{context:n,contextData:r,options:s}=e,{propertyName:a="",classID:o=""}=s,i=Dc(n,{skipUUID:!1});let c=[],l=[],u=!1;cp.getFeatureMap().granularUIRefresh?(({fieldsWithDeclarativeTargets:c=[],whens:l=[]}=jn(n)),u=l.some((e=>e.type===Tm))):u=!0;const d=l.filter((e=>e.type===Nm)),p=Eh.getPropertyName(a),h=p?p.split("."):[],g=h.pop(),f=h.join("."),m=[];if(f){const e=vp(f,o);if(e&&"copy"===e.dataRetrievalType){const e=Eh.getIn(i,`content.content.${f}`)||{};if(Object.keys(e).length>0){Object.keys(e).filter((e=>e!==g)).forEach((t=>{delete e[t],m.push(`${f}`)}))}}}e.serverPrecedenceFields=m;let y={...i.content,contextData:r};const I=qc(n);Eh.isEmpty(I)||(y=Hc(I,y));const E=((e,t)=>{const{caseWideAction:n,caseViewAction:r,fieldsWithDeclarativeTargets:s,fieldsWithWhen:a,isViewsWithWhen:o,interestPage:i,options:c}=e;let l={};const{optionalPayload:u}=c;u&&(t.content={...u});let d={...t},p=Dn.REFRESH;return r?(l=_g(Dn.REFRESH_CASE_VIEW,e),d={...d,interestPage:i}):o&&n?l=_g(Dn.REFRESH_CASE_DATA,e):o&&!n?l=_g(Dn.REFRESH_ASSIGNMENT_DATA,e):(s.length>0||a.length>0)&&(d={...d,calculations:{fields:s,whens:a}},l=_g(n?Dn.RECALCULATE_CASE_DATA:Dn.RECALCULATE_ASSIGNMENT_DATA,e),p=Dn.RECALCULATE),{restAPI:l,requestBody:d,requestType:p}})({...e,fieldsWithDeclarativeTargets:c,fieldsWithWhen:d,isViewsWithWhen:u},y);bu.registerBlockingAction(n).catch((()=>{}));const{restAPI:A,requestBody:_,requestType:S}=E;(e={...e,requestType:S}).requestType=S;const{reqType:C,restApi:T}=A,N=t.value.data[n]?.caseInfo?.headers,P={reqHeaders:N,context:n,method:C,body:_,url:Fn(e,T)};return ji(Pm(P,e)).pipe($l((t=>({response:{...t.data||{}},actionConfig:e,actionMgrID:e.options.actionMgrID,headers:Pc(t.headers)}))),Xl(": Error occurred during fetch call at refreshData Epic : ",e.context,e?.options?.actionMgrID))})),Bl((async e=>{if(e&&e.type===Ee)return bu.deRegisterBlockingAction(e.payload?.context).catch((()=>{})),wc(e);const{actionConfig:t,response:n,actionMgrID:r}=e,{context:s,serverPrecedenceFields:a,requestType:o}=t,i=Vr.getTargetViewContainerName(je),c=mt(i,s),l={acName:c,context:s},u=Sm(n,{[F.STOPMERGEACTIONS]:!0,[F.ACTIONS.DELETEAVIALACTIONS]:!0});u.directUrlUpdation=!1,o===Dn.REFRESH&&await bc(u,t,l);const d=Rc(u,{target:c,context:s});d.preserveClientChanges=void 0===t.options.preserveClientChanges||t.options.preserveClientChanges;const p=Sc.getPropertiesToReplace(s),h=ng(bh,d,{serverPrecedenceFields:a,propertiesToReplace:p});return Kc.registerForServerChanges(),sh(h),ln.resolveActionByID(r,d),Kc.unRegisterForServerChanges(),bu.deRegisterBlockingAction(s).catch((()=>{})),[]})))],Rm=Dm,bm=[e=>e.pipe(Vl(et),Bl((async e=>{const{context:t}=e.payload,n={},r={},s=Object.keys(e.payload.datapages).map((s=>{const a=e.payload.datapages[s];if(a.mode===j.READONLY&&a?.refreshStrategy){const{timeoutSecs:e="",type:t=""}=a?.refreshStrategy||{},n=oh()[a.name];if(n&&s in n){const r=n[s],{loadTime:a}=r;if(!au.isTimeElapsed(a,e,t))return}}return au.getData(a.name,{dataViewParameters:a.dataViewParameters},t).then((e=>{const t=a.mode===j.READONLY?r:n;t[a.name]?t[a.name][s]={pxResults:e.data.data,parameters:a.dataViewParameters,loadTime:e.data?.fetchDateTime}:t[a.name]={[s]:{pxResults:e.data.data,parameters:a.dataViewParameters,loadTime:e.data?.fetchDateTime}}})).catch((()=>{}))}));await Promise.allSettled(s);const a=[];return Object.keys(n).length&&a.push(bh({context:t,data:n})),Object.keys(r).length&&a.push(sg({data:r,context:t})),sh(a),[]})))],Om=bm;class vm{static OPEN_ASSIGNMENT_ACTION="openAssignment";static DIRTY_POPUP_C11N="displayDirtyPopupFromConstellation";static HANDLE_INFINITY_DISCARD="handleDiscardInInfinity";static OPEN_ASSIGNMENT_MODAL="openAssignmentInModal";static DISPLAY_DIRTY_POPUP="displayDirtyPopup";static LOAD_PREVIEW="loadPreview";static UPDATE_COEXISTENCE_DRILLDOWN_CASE="updateCoexistenceDrilldownCase";static OPEN_WORK_ITEM="openWorkItem";static OPEN_WORK_BY_HANDLE="openWorkByHandle";static GET_NEXT_WORK_ACTION="getNextWork";static CLOSE_CONTAINER_ACTION="closeContainer";constructor(){this.broadcastChannel=null,this.callback=null,this.isReverseCoexistenceCase=!1,this.broadcastEventToIframe=!1,this.isDirtyDialogActive=!1,this.onCreateCallback=null,this.openAssignmentParams=null}getGlobalObject=()=>s.g;getUniqueId=()=>this.getGlobalObject().uniqueId;setUniqueId=()=>{this.getGlobalObject().uniqueId=(new Date).getTime()};initBroadcastChannel=()=>{this.setUniqueId(),this.broadcastChannel=new BroadcastChannel("coexistence"),this.broadcastChannel.onmessage=e=>{switch(e.data.action){case vm.DISPLAY_DIRTY_POPUP:this.broadcastEventToIframe=e.data.fromInfinity,this.isDirtyDialogActive||(e.data.isFormDirty?(Br.publish(j.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0):this.callback?.call(this));break;case vm.LOAD_PREVIEW:this.loadPreview(e);break;case vm.UPDATE_COEXISTENCE_DRILLDOWN_CASE:this.updateCoexistenceDrilldownCase(e);break;case vm.OPEN_ASSIGNMENT_ACTION:this.openAssignment(e);break;case vm.GET_NEXT_WORK_ACTION:this.getNextWork(e);break;case vm.OPEN_WORK_BY_HANDLE:this.openWorkByHandle(e);break;case vm.CLOSE_CONTAINER_ACTION:this.closeContainer(e)}}};loadPreview=e=>{const{pyID:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){Xu({}).getPConnect().getActionsApi().showCasePreview(t,{caseClassName:n})}};navigateToDefaultPage=()=>{const e=Xu({isRoot:!0}),t=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages;let n;Array.isArray(t)&&t[0]&&(n=t[0]);const r=n?.pyClassName||"Data-Portal",s=n?.pyRuleName||"pyHome";e.getPConnect().getActionsApi().showPage(s,r)};closeContainer=e=>{const{uniqueId:t}=e.data;t===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{const{key:t,caseClassName:n,actionApi:r,caseLabel:s}=e.data;let a=r;r===vm.OPEN_WORK_ITEM&&(a=vm.OPEN_WORK_BY_HANDLE),ip.updateSemanticURLAndDocumentTitle({key:t,caseClassName:n,actionName:a});Xu({}).getPConnect().getActionsApi().updateRecents(n,t.substring(t.lastIndexOf(" ")+1),s,t)};openAssignment=e=>{const{pzInsKey:t,uniqueId:n}=e.data;n===this.getUniqueId()&&(this.onCreateCallback&&this.openAssignmentParams&&(t?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=t:this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle",this.onCreateCallback.call(this,this.openAssignmentParams)),this.onCreateCallback=null,this.openAssignmentParams=null)};getNextWork=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId()){const e=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`;Xu({meta:{},options:{context:md(e)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{const{key:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){const e=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`;Xu({meta:{},options:{context:md(e)}}).getPConnect().getActionsApi().openWorkByHandle(t,n)}};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),Br.subscribe(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),Br.subscribe(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{Br.unsubscribeAllWithEventType(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),Br.unsubscribeAllWithEventType(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD),this.setReverseCoexistenceCaseLoaded(!1),this.isDirtyDialogActive=!1};init=(e=!0)=>{null===this.broadcastChannel&&this.initBroadcastChannel(),e&&this.subscribeEvents()};destroy=()=>{this.destroyBroadcastChannel(),this.unsubscribeEvents()};setCallBackFunction=e=>{this.callback=e};setReverseCoexistenceCaseLoaded=e=>{this.isReverseCoexistenceCase=e};setIsDirtyDialogActive=e=>{this.isDirtyDialogActive=e};getBroadCastChannel=()=>this.broadcastChannel;getCallBackFunction=()=>this.callback;isReverseCoexistenceCaseLoaded=()=>this.isReverseCoexistenceCase;postDirtyPopupMessage=({callBackFunction:e})=>{this.broadcastChannel?.postMessage({action:vm.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:vm.HANDLE_INFINITY_DISCARD,uniqueId:this.getUniqueId()}),this.broadcastEventToIframe=!1):(this.callback?.call(this),this.callback=null),this.isDirtyDialogActive=!1};postCreateCaseMessage=(e,t,n)=>{null===this.broadcastChannel&&this.init(!1),this.broadcastChannel?.postMessage({action:vm.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=t,this.openAssignmentParams=n}}const xm=new vm,wm="nextAssignmentInfo",Mm="nextAssignmentInfo.context",Lm=e=>{const{containerName:t,isInCreateStage:n}=e;return n?j.MODAL:t||Vr.getTargetViewContainerName(We)},Um=e=>{const t=Eh.getIn(e,[j.DATA,j.CASE_INFO.CASE_INFO]);return Zt(t)&&en(cp.getOperatorIdentifier(),t)},Fm=[j.TOP_ACTION_LABEL.CREATEWORK,j.TOP_ACTION_LABEL.OPENASSIGNMENT,j.TOP_ACTION_LABEL.FINISHASSIGNMENT,j.TOP_ACTION_LABEL.OPENWORKBYHANDLE,j.TOP_ACTION_LABEL.SAVEANDCLOSE,j.TOP_ACTION_LABEL.SHOWDATA],jm={getActionInfo:(e,t)=>{let n={};return Fm.includes(e)&&(n={topLevelAction:!0,actionLabel:e}),e===j.TOP_ACTION_LABEL.OPENASSIGNMENT&&(n.assignmentID=t),n}},Vm=()=>({registerHeader:(...e)=>nc.registerHeader(...e),unRegisterHeader:(...e)=>nc.unRegisterHeader(...e),getRegisteredHeaders:()=>nc.getRegisteredHeaders()}),km=(e,{body:t={},queryPayload:n={},cancelTokenSource:r,headers:s={},responseType:a},o,i)=>{const{restApi:c,reqType:l}=_g(e,n),u={method:l,headers:s,body:t,...a&&{responseType:a}};return r&&(u.signal=r.token),pc(c,u,o,i??{})},$m=(e,{method:t="GET",body:n={},headers:r={},withoutDefaultHeaders:s=!1},a)=>{e.startsWith("http:")||e.startsWith("https:")||(e=E()+e);return pc(e,{method:t,headers:r,body:n,withoutDefaultHeaders:s},a)},Bm=e=>ip.doesRestApiExist(e),Gm=()=>fc(),Wm=e=>mc(e),Hm=e=>{dc(e)},qm=()=>zm;const zm=class{static createCase(e,t){const{caseInfo:n,startingFields:r,flowType:s,viewType:a=Tc.PAGE,pageName:o,context:i=j.APP.APP,debugInfo:c,headers:l}=t;let u={};n&&n.content&&(u=n.content);const d={caseTypeID:e,content:{...u,...r},processID:s};let p={};return cp.getPerformanceDashboardVisibility()&&(p=jm.getActionInfo(j.TOP_ACTION_LABEL.CREATEWORK)),km("createWork",{body:d,queryPayload:{caseClassName:e,viewType:a,params:{pageName:o}},headers:{...l,...c&&{...nc.addDebugHeaders(c)}}},i,p).then((t=>({response:t.data,requestPayload:d,headers:Pc(t.headers,e,l)})))}},Ym=(e,t)=>{const{class:n,context:r,viewType:s=Tc.PAGE}=e,{removeActionPayload:a}=t;let o=e?.pageName?e?.pageName:cp.getDefaultCasePage();return e.isTraditionalUICase&&(o="pyDetails"),ji(zm.createCase(n,{...e,pageName:o,viewType:s,context:r})).pipe($l((({response:t,headers:n})=>({response:t,actionInPayload:e,headers:n,removeActionPayload:a}))),Xl("Error occurred during ajax call at createWork Epic : ",r))},Km=e=>{Br.publish(j.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,e)},Xm=e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)},Jm=e=>{let t=0,n=[],r="",s=!1;return e.pipe(Vl(Ph),Jl(100),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>{const{context:n}=e,r=Lm(e),a=mt(r,n),{continueExecution:o,removeActionPayload:i}=(e=>_d(e)?{continueExecution:!0,removeActionPayload:{}}:jc(e))(a);return s=cs(e.class),o?(e.isTraditionalUICase=s,Ym(e,{removeActionPayload:i})):(ln.rejectActionByID(t),Kl())})),Bl((async e=>{if(e&&e.type===Ee)return e.payload.context=Hd(),n.push(wc(e)),n;const{actionInPayload:a,response:o,headers:i,removeActionPayload:c}=e;let l;l=!(a.renderInline||cp.getDefaultCasePage()||s)&&Um(o),Eh.setIn(o.data,F.CASE_INFO.IS_FIRST_ASSIGNMENT,!0);const u=Lm({...a,isInCreateStage:l}),d=mt(u,a.context),p=Lc(d,u,a.context);if(!Yr(u)&&_d(d)){const{continueExecution:e}=jc(d);if(!e)return ln.rejectActionByID(t),Kl()}if(!(a?.openCaseViewAfterCreate??!0)&&!l){const e=Eh.getIn(o.data,F.CASE_INFO.CASE_INFO_CONTENT);r=`${e.pyID} ${up.getLocaleValue("has been created.","Assignment")}`;const t=ns(o),s=Zr(o);return Km({toastMessage:r}),Xm({caseId:`${e.pyID}`,assignmentId:t,caseType:s}),n}const h=Sm(o);let g=Eg("createWork",{caseClassName:Zr(h)});g=g.replace(/{.+?}/,String(Qr(ts(h)))),h.semanticURL=g,((e,t)=>{const n=Um(e),{skipBrowserSemanticUrlUpdate:r=!1,isTraditionalUICase:s}=t;Eh.setIn(e,["directUrlUpdation"],(!n||s)&&!r)})(h,a);const f={acName:d,context:p};await bc(h,a,f);const m={target:d,context:p,containerItemID:p,headers:i,semanticURL:g,isInCreateStage:l,isMinimizable:l,caseViewMode:h.confirmationNote?j.REVIEW_MODE:j.PERFORM_MODE,assignmentContext:Eh.getIn(h,Mm),nextAssignmentInfo:Eh.getIn(h,wm),resourceType:F.CASE,openCaseViewAfterCreate:a.openCaseViewAfterCreate,modalOptions:a.modalOptions,debugInfo:a.debugInfo};as(m,h);const y=Rc(h,m);s&&(y.data.caseInfo.content.coexistenceAction="openAssignment");const I=Mc(d,y);return Uc(I)&&rs(n,{removeActionPayload:c,target:d}),n.push(I),$c(n),n})),$l((()=>{const e=ls(),a=Zt(Eh.getIn(n[0]?.payload,"data.caseInfo"));return s&&e&&a?xm.postCreateCaseMessage(n[0]?.payload?.nextAssignmentInfo?.ID,Wc,n):Wc(n),is(n,t),r="",n=[],n})))},{RESOURCE_TYPES:Qm}=F,Zm=(e,t=[])=>{const{viewType:n,containerName:r,targetContainerName:s,isChild:a}=e,o=Jr(t);return(e=>{if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1)if(n[e].ID===t)return"manual"===n[e].transitionType}return!1})(o)&&e?.stageID===o.stageID?Tc.PAGE:n||(!zr(r)&&!zr(s)||a?Tc.PAGE:Tc.FORM)},ey=(e,t,n,r,s)=>{if(rs(e,{removeActionPayload:t,target:n}),((e,t)=>{const n=pd(t);let r=null;return n&&(r=sd(t,n)),r?.key===e&&Sd(t)})(r.key,n))r.context=md(n),r.containerItemID=r.context,e.push(ng(Qh,r));else if((s?.isChild||s?.isRemote)&&s?.isMultiDoc){const t=Od(s.context);r.target=t,r.context=s.context,r.containerItemID=s.context,e.push(ng(Qh,r))}else{const t=Od(r.context),n=ld(t,r.key);n?(r.target=t,r.context=n,r.containerItemID=n,e.push(ng(Qh,r))):e.push(ng(Fh,r))}},ty=(e,t,n,r,s,a,o)=>{_d(t)&&Cd(t)?((e,t,n,r,s)=>{Zm(e,t)===Tc.FORM?(n.caseViewMode=r||j.PERFORM_MODE,s.push(ng(Gh,n))):s.push(ng(Qh,n))})(r,s,e,a,n):ey(n,o,t,e,r)},ny=({restUrl:e,reqType:t,requestHeaders:n,debugInfo:r,context:s,isGetNextWork:a,doNotMergeMessagesForStatusCode:o,assignmentID:i})=>{let c={};return cp.getPerformanceDashboardVisibility()&&(c=jm.getActionInfo(j.TOP_ACTION_LABEL.OPENASSIGNMENT,i)),pc(e,{method:t,headers:{"if-match":n&&n.etag,...n,...r&&{...nc.addDebugHeaders(r)}}},s,{doNotMergeHttpMessagesForStatusCode:a?o:"",...c})},ry=(e,t)=>{const n=Zm(e),{headers:r,context:s,assignmentID:a,isGetNextWork:o,debugInfo:i,isOpenStage:c,stageID:l,caseID:u,jsActionQueryParams:d,isLastStepInCreateStage:p}=e,{restApi:h,reqType:g}=o?_g("getNextWork",{viewType:n}):c?_g("openStage",{caseID:u,stageID:l}):_g(Ge,{assignmentID:a,viewType:n}),{removeActionPayload:f}=t,m=cp.getDefaultCasePage();let y="",I=e.pageName;e.isTraditionalUICase&&(I="pyDetails"),y=m?`${h}?viewType=${n}&pageName=${m}`:I?`${h}?viewType=${n}&pageName=${I}`:`${h}?viewType=${n}`,d&&Object.keys(d).forEach((e=>{y+=`&${e}=${d[e]}`}));const E=(e=>{let t=e?.headers??{};return e?.isRemote&&(t=Pc(t,e.remoteClassName)),t})(e);return ji(ny({restUrl:y,reqType:g,requestHeaders:E,debugInfo:i,context:s,isGetNextWork:o,doNotMergeMessagesForStatusCode:"404",assignmentID:a})).pipe($l((e=>{if(cp.isCoexistenceAppOfType(j.APP_TYPE.UIKIT)&&!p){return Zt(e.data.data.caseInfo)?e:(y=y.replaceAll(I,"pyDetails"),cp.setDefaultCasePage("pyDetails"),{isReloadWithDifferentViewTypeRequired:!0,restUrl:y})}return e})),Bl((e=>e?.isReloadWithDifferentViewTypeRequired?ny({restUrl:y,reqType:g,requestHeaders:E,debugInfo:i,context:s,isGetNextWork:o,doNotMergeMessagesForStatusCode:"404",assignmentID:a}):ql(e))),$l((t=>{const{key:s,flowName:o}=vc(a);return{response:{...t.data,key:s,flowName:o},actionInPayload:e,viewType:n,removeActionPayload:f,headers:Pc({...r,...t.headers})}})),Xl("Error occurred during ajax call at openAssignment Epic : ",s))},{RESOURCE_TYPES:sy}=F,ay=e=>{const t="Browser"===cp.getRuntime();let n=0,r=[];const s=[];let a=!1,o=!1;return e.pipe(Vl(xl),$l((e=>(({actionMgrID:n}=e.payload),{...e.payload,...t?{insKey:e.payload.assignmentID}:{assignmentID:e.payload.assignmentID}}))),Bl((e=>{a=e.isGetNextWork;const{context:t}=e;let r;r=(e?.isChild||e?.isRemote)&&e?.isMultiDoc?Tc.FORM:Zm(e),e.viewType=r;const s=Hr(Ge,e),i=mt(s,t),{activate:c,activateContainerActionPayload:l}=kc(sy.ASSIGNMENT,i,e);if(c&&!e.isParallelCall)return ql({type:ve,activateContainerActionPayload:l,actionInPayload:e});const u=pd(i);let d;d=l?.isParallelAssignment?{continueExecution:!0,removeActionPayload:{}}:u?jc(i):{continueExecution:!0,removeActionPayload:{}};const{continueExecution:p,removeActionPayload:h}=d;return p?(o=cs(e.className),e.isTraditionalUICase=o,ry(e,{removeActionPayload:h})):(ln.rejectActionByID(n),Kl())})),Bl((async e=>{if(e?.type===Ee){if(a){const{payload:t}=e,{err:n}=t,r=n.response.status;s.push({status:Number(r)})}return r.push(wc(e)),r}const{type:t,actionInPayload:n,response:i,viewType:c,headers:l,removeActionPayload:u,activateContainerActionPayload:d}=e;if("openStage"===i?.redirectInfo?.jsAction){const e=i?.redirectInfo?.stageID,t=xl,s=i?.data?.caseInfo?.ID;n.isOpenStage=!0,n.stageID=e,n.jsActionQueryParams=i?.redirectInfo?.jsActionQueryParams;const a={type:t,payload:{...n,caseID:s,headers:l}};return r.push(a),r}const{context:p,caseViewMode:h,debugInfo:g}=n;let f=((e,t)=>{const n=Jr(e);let r;r=!cp.getDefaultCasePage()&&Zt(n);const{isChild:s,containerName:a}=t,o=s&&r,i=r&&!t.isActionFromToDoList;return o||i?j.MODAL:a||Hr(Ge,t)})(i,n);o=cs(i?.data?.caseInfo?.caseTypeID),n.isTraditionalUICase=o,o&&(f=n.containerName);const m=mt(f,p);if(t===ve)return await(async(e,t,n)=>{const{semanticURL:r,containerItemID:s,isParallelAssignment:a,insKey:o}=t,{target:i,actionInPayload:c}=n,{skipBrowserSemanticUrlUpdate:l=!1}=c,u=fd(s);await bc({directUrlUpdation:!l,semanticURL:r},c,{acName:i,target:i,context:u}),e.push(ng(zh,{containerItemID:s,target:i,isParallelAssignment:a,insKey:o,resourceType:Qm.CASE,context:u,doDeleteCaseSummary:c.doDeleteCaseSummary}))})(r,d,{actionInPayload:n,target:m}),$c(r),r;const y=i?.data?.caseInfo?.content,I=i?.uiResources?.root?.config?.name;y&&!y.pyViewName&&I&&"page"!==n.viewType&&Eh.setIn(y,"pyViewName",I);const E=Sm(i);((e,t)=>{const n=Jr(e),r=ts(e),s=Zt(n),{skipBrowserSemanticUrlUpdate:a=!1,viewType:o,isTraditionalUICase:i}=t,c=o===Tc.PAGE&&(!s||i)&&!a,{caseTypeID:l}=n;if(c){const t=Eg(Be,{caseClassName:l}).replace(/{.+?}/,String(Qr(r)));e.semanticURL=t,e.directUrlUpdation=!0}})(E,n);const A=Lc(m,f,p),_={acName:m,target:m,context:A};await bc(E,n,_);const S={target:m,context:A,containerItemID:A,headers:l,parentContext:W(n?.context),isMinimizable:Zt(Eh.getIn(E,"data.caseInfo")),doDeleteCaseSummary:n.doDeleteCaseSummary,acTertiary:n.acTertiary,resourceType:F.CASE,debugInfo:g};as(S,E,{skipFlowNameUpdate:n?.caseViewMode===j.REVIEW_MODE});const C=Rc(E,S);return n.isProcessAction&&(C.data.isProcessAction=n.isProcessAction),o&&(C.data.caseInfo.content.coexistenceAction="openAssignment"),((e,t)=>{e.acTertiary&&(t.data.caseInfo.isFirstAssignment=e.acTertiary)})(n,C),ty(C,m,r,n,i,h,u),c===Tc.FORM&&ss(C.containerItemID)&&Gc(C,r),$c(r),(e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,e)})({actionInContext:p,assignmentID:n.assignmentID,caseKey:C.key}),r})),$l((()=>{const e=n,t=ls(),a=Zt(Eh.getIn(r[0]?.payload,"data.caseInfo"));return o&&t&&a?xm.postCreateCaseMessage(r[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,sh,r):sh(r),is(r,e,s),r[0]?.payload?.isParallelAssignment&&sh({type:xl,payload:{...r[0].payload,isParallelCall:!0}}),r=[],r})))},oy=(e,t)=>{const{insKey:n,headers:r,context:s,debugInfo:a,viewType:o}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:cp.getDefaultCasePage(),l=_g(Be,{caseID:n,params:{pageName:c}});let{restApi:u}=l;const{reqType:d}=l;"none"===o&&(u=`${u?.split("viewType")[0]}viewType=none`);let p={};return cp.getPerformanceDashboardVisibility()&&(p=jm.getActionInfo(j.TOP_ACTION_LABEL.OPENWORKBYHANDLE)),ji(pc(u,{method:d,headers:{...r,...a&&{...nc.addDebugHeaders(a)}}},s,p)).pipe($l((t=>({response:t.data,actionInPayload:e,headers:Pc({...r,...t.headers}),removeActionPayload:i}))),Xl("Error occurred during ajax call at openWorkByHandle Epic : ",s))},iy="OPEN_WORK_BY_HANDLE",{RESOURCE_TYPES:cy}=F,ly=async(e,t,n)=>{const{actionInPayload:r,activateContainerActionPayload:s,type:a,response:o,removeActionPayload:i,headers:c}=e,{context:l,skipBrowserSemanticUrlUpdate:u,debugInfo:d}=r,p=Hr(Be,r),h=mt(p,l);if(a===ve)await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:r},actionInPayload:s,actionInPayload:{context:a,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=Hr(Be,s),l=mt(c,a),u=fd(r);await bc({directUrlUpdation:!o,semanticURL:n},s,{acName:l,containerName:c,target:l,context:u}),e.push(ng(zh,{containerItemID:r,target:l,context:u,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:s,actionInPayload:r});else{const e=Lc(h,p,l,{buildNew:!0}),s=Sm(o),a=((e,t)=>{const{isRemoteCase:n,remoteCaseClass:r}=t,s=ts(e),a=n?r:Zr(e);let o=Eg(Be,{caseClassName:a});return o=o&&o.replace("{workID}",String(Qr(s))),o})(s,r);s.semanticURL=a,s.directUrlUpdation=!u;const g={acName:h,context:e};await bc(s,r,g);const f=Rc(s,{target:h,context:e,containerItemID:e,semanticURL:a,headers:c,debugInfo:d});f.caseViewMode=j.REVIEW_MODE,f.resourceType=cy.CASE,n&&(f.data.caseInfo.content.coexistenceAction="openWorkByHandle"),as(f,s,{skipFlowNameUpdate:!0});const m=Mc(h,f);i.containerItemID&&Uc(m)&&t.push(ng(Kh,{containerItemID:i.containerItemID,target:h})),t.push(m)}$c(t);(e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CASE_OPENED,e)})({caseKey:r.insKey,actionInContext:l})},uy=e=>{let t=0,n=[];return e.pipe(Vl(iy),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>{const{context:n,isChild:r,viewType:s}=e,a=Hr(Be,e),o=mt(a,n);let i,c=!0;if("none"!==s){const e=jc(o);c=e.continueExecution,i=e.removeActionPayload}if(!c)return ln.rejectActionByID(t),Kl();const{activate:l,activateContainerActionPayload:u}=kc(cy.CASE,o,e);return l&&!r&&"none"!==s?ql({type:ve,activateContainerActionPayload:u,actionInPayload:e}):oy(e,{removeActionPayload:i})})),Bl((async e=>{if(e&&Kr(e.type))return n.push(wc(e)),n;const t=ah(e?.actionInPayload?.context),r=cs(e?.actionInPayload.className);if("none"===e?.actionInPayload?.viewType){if("perform"!==t?.context_data?.caseViewMode){const t=Sm(e?.response),s={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:st,payload:{context:s.context,doDeleteConfirmationDetails:!1}}),r&&s.data.caseInfo?.content&&(s.data.caseInfo.content.coexistenceAction="openWorkByHandle"),n.push(ng(bh,s));const a=Od(e?.actionInPayload?.context),o=qr(e?.actionInPayload?.context),i=Object.freeze({target:a,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:o});if(ss(e?.actionInPayload?.context)){const t=Rc(e?.response,{...i});Gc({...t,isArrayDeepMerge:!0},n)}}}else await ly(e,n,r);return n})),$l((()=>(sh(n),is(n,t),n=[],n))))},dy="FINISH_ASSIGNMENT",{RESOURCE_TYPES:py}=F,hy=(e,t)=>{const{containerItemID:n,skipReleaseLockRequest:r}=t,s=fd(n),a=`${s?.includes("root")?j.APP.ROOT:j.APP.APP}/${td.MODAL}`;e.push(ng(Kh,{containerItemID:n,context:s,target:a,skipReleaseLockRequest:r}))},gy=e=>ch(".openCaseViewAfterCreate",j.CONTEXT_DATA,e)??!0,fy=async(e,{translatedDXAPIResponse:t,actionInPayload:n},r)=>{const{caseID:s}=n,a=(o=t,Eh.getIn(o,Wr.NEXT_ASSIGNMENT_INFO_ID,j.EMPTY_STRING));var o;const i=Zr(t),{caseViewMode:c,headers:l,semanticURL:u,actionMgrID:d,directUrlUpdation:p,key:h,flowName:g,resourceType:f}=r;(e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)})({caseId:s,assignmentId:a,caseType:i}),hy(e,{...n,skipReleaseLockRequest:!0});const m=`${n?.containerItemID.includes("root")?j.APP.ROOT:j.APP.APP}/${td.PRIMARY}`,y=Lc(m,td.PRIMARY),I=nc.getCoreHeadersFromContext(n.context)||!1,E=Rc(t,{target:m,context:y,containerItemID:y,caseViewMode:c,headers:l,semanticURL:u,key:h,flowName:g,resourceType:f,directUrlUpdation:p,debugInfo:I&&I.debugInfo&&{debugId:I.debugInfo[j.COREHEADER_APP_DEBUG_ID]}});if(_d(m)){const t=ah(y),s=ts({data:t}),[,a]=s?s.split(" "):[],o=`You will lose unsaved changes for ${a}. Do you want to continue?`;if(!gy(n.context))return e;{const{continueExecution:t}=jc(m,{dirtyMessage:o});if(!t)return r.directUrlUpdation=!1,ln.rejectActionByID(d),Kl();e.push(ng(Qh,E))}}else e.push(ng(Fh,E));return t.directUrlUpdation=p,t.semanticURL=u,await bc(t,{...E,acName:m},{acName:m,context:y}),e},my=e=>/^app\/preview_[0-9]*/g.test(e),yy=(e,t)=>{const n=W(e);return!my(e)&&(n===t||/^app\/primary_[0-9]*/g.test(n))},Iy=async(e,t,n,r,s,a,o,i,c)=>{const{headers:l}=c;if(e){const u=_d(Od(e));let d=!1;const p=Od(n),h=rd(p),g=pd(p);g&&h?.items?.[g]?.key===c?.actionInPayload?.caseID&&(d=!0),hy(s,{...r,skipReleaseLockRequest:!0});const f=qr(e),m={target:Od(e),containerItemID:e,context:e,containerName:f};t.doDeleteCaseSummary=r.doDeleteCaseSummary;const y=X(n),I=ah(y),E=ah(r.context),A=I?.caseInfo?.ID,_=E?.caseInfo?.ID;if(u&&A===_||!u&&""===o)(void 0===t?.data?.caseInfo?.content||void 0!==t.data.caseInfo.content&&"object"==typeof t.data.caseInfo.content&&0===Object.keys(t.data.caseInfo.content).length)&&(t.root=void 0,delete t.data?.caseMessages),s.push(ng(Gh,{...t,key:o,resourceType:"",...m}));else if(a){const a=Od(e),i=ld(a,o);if(i)m.target=a,m.context=i,m.containerItemID=i,s.push(ng(Gh,{...t,key:o,resourceType:"",...m}));else{const e=Id(n)[0];if(r.target=e,r.context=Lc(e,j.WORKAREA,n),r?.context){r.containerItemID=r.context,s.push(ng(Fh,{...r,...t}));const n=r.containerItemID;s.push(ng(zh,{parentContainerTarget:e,containerItemID:n}))}}}if(r.target=Od(e),r.containerName=qr(e),r.context=e,r.containerItemID=e,Eh.setIn(t,"acName",m.target),await bc(i,t),d){const{data:e,caseViewMode:r}=t;n.includes(j.WORKAREA)&&ss(n)&&(n=X(n));const a={data:e,caseViewMode:r,context:n};Eh.setIn(a.data,["context_data","caseViewMode"],r),s.push({type:st,payload:{context:n}}),s.push(ng(bh,a))}if(!a&&t.caseViewMode===j.PERFORM_MODE){const t=((e,t)=>{const n=Od(e);return ld(n,t)})(e,o),n={data:{caseInfo:{headers:l}},context:t};s.push(ng(bh,n)),s.push(Rn(((e,t=!1,n=!1)=>{const r=ln.getNextActionMgrId();return{ID:Ch.getPropertyValue(F.CASE_INFO.ASSIGNMENT_ID,"",e),actionID:Ch.getPropertyValue(F.CASE_INFO.ASSIGNMENTACTION_ID,"",e),context:e,caseWideAction:t,contextData:n,options:{actionMgrID:r}}})(t)))}}else{hy(s,r);let e=!1;const o=Od(n),i=rd(o),l=pd(o);if(l&&i?.items?.[l]?.key===c?.actionInPayload?.caseID&&(e=!0),a){const e=Id(n)[0];r.target=e,r.context=Lc(e,j.WORKAREA,n),r.containerItemID=r.context,s.push(ng(Fh,{...r,...t}));const a=r.containerItemID;s.push(ng(zh,{parentContainerTarget:e,containerItemID:a}))}if(e){const{data:e,caseViewMode:r}=t,a={data:e,caseViewMode:r,context:n};Eh.setIn(a.data,["context_data","caseViewMode"],r),s.push({type:st,payload:{context:n}}),s.push(ng(bh,a))}}},Ey=async(e,t,n,r,s)=>{((e,t,n)=>{if(t.isProcessAction&&(hy(n,{...t,skipReleaseLockRequest:!0}),e)){const r=`${t?.containerItemID.includes("root")?j.APP.ROOT:j.APP.APP}/${td.PRIMARY}`,s=Lc(r,td.PRIMARY),a={insKey:e.ID,className:e.content.classID,context:s,acTargetName:j.PRIMARY,isChild:!0},o={type:ue,payload:{...a}};n.push(o)}})(e.data.caseInfo.parentCaseInfo,t,s);const a=e?.data?.caseInfo?.parentCaseInfo?.ID;if(a){const n=Od(t?.context),r=sd(n,t?.context)?.parentContext,s=Od(r);t?.isProcessAction&&cd(s,a)&&zd(r,e?.data?.caseInfo?.lastUpdateTime)}n.resourceType=py.CASE,n.directUrlUpdation=!0,t.isProcessAction||await fy(s,{translatedDXAPIResponse:r,actionInPayload:t},n)},Ay=async(e,t,n,r,s)=>{e.doDeleteCaseSummary=t.doDeleteCaseSummary,e.caseViewMode===j.REVIEW_MODE&&(e.flowName=" ",e.clearView=!0);const{containerItemID:a}=t,o=Sc.getPropertiesToReplace(a);s.push(ng(Gh,{...e,...r,propertiesToReplace:o})),Eh.setIn(e,"acName",r.target),await bc(n,e),((e,t,{data:n,caseViewMode:r})=>{const{containerItemID:s}=t,a=fd(s);if(a&&ss(s)){const t=X(a),o={data:n,caseViewMode:r,context:t};Eh.setIn(o.data,["context_data","caseViewMode"],r),e.push({type:st,payload:{context:t}});const i=Sc.getPropertiesToReplace(s);e.push(ng(bh,o,{propertiesToReplace:i}))}})(s,t,e)},_y=async(e,t,n,r,s,a,o,i)=>{const{isCaseWideAction:c,isInCreateStage:l,containerItemID:u}=e,d=W(e.context),p=es(s),h=Zr(s),g=l&&!p&&!c,f=Id(d)[0],m=f?pd(f):d,y=qr(u),I=fd(u),E=Object.freeze({target:e.target,containerItemID:u,context:I,containerName:y});g&&!my(e.context)?await Ey(i,e,t,s,a):yy(e.context,m)?await Iy(m,t,d,e,a,n,r,s,o):c&&!yy(e.context,m)?(hy(a,e),((e,t,n)=>{const{containerItemID:r,caseID:s}=t;if(r&&/^app\/preview_[0-9]*/g.test(r)){const{caseClassName:t}=n,a=W(r),o=fd(a);e.push(ng(vh,{containerItemID:a,context:o,container:td.PREVIEW,containerName:td.PREVIEW,caseId:s,viewName:F.PREVIEW_VIEW_NAME,caseClassName:t,updateData:!0}))}})(a,e,{caseClassName:h})):await Ay(t,e,s,E,a)},Sy=(e,t)=>{const{assignmentID:n,actionID:r,caseID:s,context:a,additionalHeaders:o={},isCaseWideAction:i,outcome:c,jsActionQueryParams:l}=e,{state$:u}=t,d=(e=>{const{isModalAction:t,viewType:n,isInCreateStage:r,isCaseWideAction:s}=e;return t&&r&&!s?Tc.PAGE:n||Tc.FORM})(e),p=(e=>{const{isCaseWideAction:t}=e;return t?Ye:"finishAssignment"})(e),h={assignmentID:n,actionID:r,caseID:s,viewType:d};let{restApi:g}=_g(p,h),{reqType:f}=_g(p,h);d&&!g?.includes("viewType=")&&(g=g?.includes("?")?`${g}&viewType=${d}`:`${g}?viewType=${d}`),c&&!g?.includes("outcome")&&(g=g?.includes("?")?`${g}&outcome=${c}`:`${g}?outcome=${c}`),g=((e,t)=>(e&&Object.keys(e).forEach((n=>{t+=`&${n}=${e[n]}`})),t))(l,g),i&&(f="PATCH"),e.viewType=d;const{content:m,attachmentsExist:y}=Dc(a);e.attachmentsExist=y;const I=u.value.data[a]?.caseInfo?.headers||{},{etag:E}=I,A={"if-match":E,...o};let _={};return cp.getPerformanceDashboardVisibility()&&(_=jm.getActionInfo(j.TOP_ACTION_LABEL.FINISHASSIGNMENT)),ji(pc(g,{method:f,body:m,headers:A},a,_)).pipe($l((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:Pc({...A,...r})}})),Xl("Error occurred during ajax call at finishAssignment Epic : ",a))},{RESOURCE_TYPES:Cy}=F,Ty=(e,t)=>{let n=0,r=[],s={},a="";return e.pipe(Vl(dy),kl((e=>{const o=cp.isCoexistenceAppOfType(j.APP_TYPE.UIKIT);if(({actionMgrID:n}=e.payload),a=e.payload.context,qn({context:a,stateObj:ah(a),clearContextMessages:!0}),!il(a)){const t={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(n,!0,t),bu.handleDeferredActionCompletion(e.payload.context),ql([])}return ql(e.payload).pipe(Bl((e=>{((e,t)=>{const{containerItemID:n,context:r,actionMgrID:s,isInCreateStage:a,isModalAction:o}=t;if(a&&o){const t=qr(n),a=mt(t,r);e.push(ng(zh,{containerItemID:n,target:a,actionMgrID:s}))}})(r,e);const n={...e};return Sy(n,{state$:t})})),Bl((async e=>{if(e&&e.type===Ee){(e=>{const t=e?.payload?.err?.response?.data?.displayButtonsOnErrors||[],n=e?.payload?.err?.response?.status;if(Array.isArray(t)&&t.length>0&&424===n){t.forEach((e=>{e.isErrorButton=!0}));const n=e.payload.context,r=ah(n),s=((e,t)=>(e.forEach((e=>{!0!==e.isErrorButton||t.some((t=>t.actionID===e.actionID))||(t=[...t,e])})),t))(t,r?.caseInfo?.actionButtons?.secondary||[]),a={data:{caseInfo:{actionButtons:{secondary:s}}},target:Od(n),context:n};sh({type:fe,payload:a})}})(e);const t=wc(e);return r.push(t),r}Pu.clearContextedCache(a);const{headers:t,actionInPayload:i,response:c}=e,{containerItemID:l,context:u=fd(l),isModalAction:d,isInCreateStage:p}=i,h=Od(l);i.target=h;const g=qr(l),f=Object.freeze({target:i.target,containerItemID:l,context:u,containerName:g});Eh.setIn(c.data,j.CASE_INFO.IS_FIRST_ASSIGNMENT,!1),Eh.setIn(c.data,j.CASE_INFO_IS_LOCAL_ACTION,!1),c?.uiResources?.root?.config?.name&&"page"!==i.viewType&&Eh.setIn(c.data,j.CASE_INFO.VIEW_NAME,c?.uiResources?.root?.config?.name),(e=>{Br.publish(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,e)})({submitResponse:c});let m=Sm(c,{[F.STOPMERGEACTIONS]:!c.nextAssignmentInfo});const y=Zr(m),I=W(i.context),E=Id(I)[0]?pd(Id(I)[0]):I,A=es(m),_=p&&!A;!d||p||yy(i.context,E)||(m=((e,t)=>(e?.data?.caseInfo&&t?.caseInfo?.content&&(e.data.caseInfo.content=t?.caseInfo?.content),e))(m,ah(l)));const S=Rc(m,{headers:t,actionMgrID:n,directUrlUpdation:!1});let C,T;os(S.data,i),S.caseClassName=y,S.resourceType=Cy.ASSIGNMENT,S.headers=t;const N=m?.data?.caseInfo?.assignments?.some((e=>e.ID===i.assignmentID)),P=((e,t)=>{const{assignmentID:n}=t;return e?.data?.caseInfo?.assignments?.some((e=>e.ID===n&&"true"===e?.canPerform))})(m,i),D=((e,t,n,r,s)=>{let a;const o=Od(t);return a=Sd(o)?ld(o,n.data?.caseInfo?.ID):pd(o),r&&e&&lh(null,j.CASE_VIEW_MODE_PROP,a)===j.PERFORM_MODE&&s})(N,E,m,d,P),R=i?.actionID===F.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT;m?.data?.nextAssignmentInfo&&!R?(S.caseViewMode=j.PERFORM_MODE,C=ts(m),T=!0):D&&!R?(S.caseViewMode=j.PERFORM_MODE,C=ts(m),S.flowName=" ",S.deleteAssignmentSpecificResources=!1,T=!1):(S.caseViewMode=j.REVIEW_MODE,C="",T=!1);const b=ts(m);as(S,m,{skipFlowNameUpdate:S?.caseViewMode===j.REVIEW_MODE||D});const O=Eg("createWork",{caseClassName:y}).replace(/{.+?}/,String(Qr(b)));if(m.semanticURL=O,S.semanticURL=O,d?(await _y(i,S,T,C,m,r,e,c),_&&(s=(e=>{if(!gy(e.context)){let t;const n=e?.caseTypeID,r=e?.caseTypeName;return t=e.businessID?e.businessID:e.workID,{caseID:t,caseTypeID:n,caseTypeName:r}}return{}})(i))):p&&o&&!A?(cp.setDefaultCasePage("pyDetails"),await(async(e,t,n)=>{const r={assignmentID:e?.data?.caseInfo?.assignments[0]?.ID,className:e?.data?.caseInfo?.content?.classID,containerName:td.PRIMARY,targetContainerName:td.PRIMARY,viewType:Tc.PAGE,isLastStepInCreateStage:!0,context:n},s={type:ge,payload:{...r}};t.push(s)})(c,r,W(u))):await Ay(S,i,m,f,r),us(e,r),bu.handleDeferredActionCompletion(a),((e,t,n)=>{const{isModalAction:r,isCaseWideAction:s,caseID:a}=t,o=yy(t.context,n),i=e?.data?.caseInfo?.stages||[],c=e?.data?.caseInfo?.stageID;Gr({caseID:a,isModalAction:r,isModalLaunchedFromPrimaryValue:o,isCaseWideAction:s,stages:i,stageID:c})})(S,i,E),!m?.data?.nextAssignmentInfo){const e=((e,t)=>{const{isCaseWideAction:n,assignmentID:r,actionID:s}=t;return{isCaseWideAction:n,caseID:ts(e),assignmentID:n?null:r,actionID:n?s:null}})(m,i);(e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,e)})({...e,containerItemID:l})}return((e,{isModalAction:t,target:n,transientItemID:r})=>{if(t){const t=e.find((({type:e})=>e===Me));t?.payload&&(n=t.payload.target,r=t.payload.containerItemID)}const s=Xh({target:n,containerItemID:r});s.payload.transientItems.length&&e.push(s)})(r,{transientItemID:l,target:h,isModalAction:d}),r})),$l((()=>{const e=r.find((e=>e.type===Ee));return e?(bu.handleDeferredActionCompletion(a),(e=>{const t=e?.payload?.err?.errorDetails,n=e?.payload?.context;t?.forEach((e=>{e[j.ERROR_FIELD_IN_PAGE]=e[j.ERROR_FIELD_IN_PAGE].replace(/(\(\d\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`));const t=e[j.ERROR_FIELD_IN_PAGE].slice(1),r=e[j.ERROR_IN_PAGE_IDENTIFIER].slice(1);if(r){let s=t?`caseInfo.content.${t}`:"caseInfo.content";s=s.replace(/\(/g,"[").replace(/\)/g,"]");const a=$n(r,s,j.PROPERTY),o={type:F.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue};Pn.mutateField(n,s,a[a.length-1],{messages:[o],type:F.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:a[a.length-1]})}}))})(e),ln.rejectActionByID(n)):ln.resolveActionByID(n,s),Wc(r),r=[],s={},r})))})))},Ny="CANCEL_ASSIGNMENT",Py=e=>{const t={},{routeKey:n,isModalAction:r,caseID:s,context:a,RemoteSystemID:o}=e;o&&(t.RemoteSystemID=o);const i=n||"releaseAssignmentLock",{restApi:c,reqType:l}=_g(i,{ID:s,caseID:s,viewType:Tc.PAGE});return ec.getPreviewMode()&&(t[j.SKIPCOREHEADERS]=!0),ji(pc(c,{method:l,headers:t},a,{includeRemoteSystemIdIfPresent:!!o})).pipe($l((t=>r?{actionInPayload:e}:{response:t.data,actionInPayload:e,headers:Pc(t.headers)})),Xl(": Error occurred during ajax call at release lock request : ",a))},Dy=(e,t)=>{const{isModalAction:n}=t;return Py({routeKey:"cancelAssignment",isModalAction:n,...e})},Ry=e=>{let t=0,n=[];return e.pipe(Vl(Ny),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>{const{isModalAction:n}=e;e.context||(e.context=fd(e.containerItemID));const{context:r}=e,s=(e=>{const{isModalAction:t,containerItemID:n}=e;return t?td.MODAL:qr(n)})(e),a=mt(s,r),{continueExecution:o}=jc(a);return o?(e.RemoteSystemID=$.getRemoteHeaderByContext(e.context)??void 0,Dy(e,{isModalAction:n})):(ln.rejectActionByID(t),Kl())})),Bl((async e=>{if(e&&e.type===Ee)return n.push(wc(e)),n;const{actionInPayload:r,response:s}=e,{containerItemID:a,isModalAction:o,isInCreateStage:i}=r,c=Od(a),l=fd(a),u={target:o?`${j.APP.APP}/${j.MODAL}`:c,containerItemID:a,caseViewMode:o?j.PERFORM_MODE:j.REVIEW_MODE,context:l,actionMgrID:t,key:ts(s),skipReleaseLockRequest:!1};return i&&n.push(ng(Gh,u)),!o&&ss(a)&&(async(e,t)=>{const{childContainerItemID:n,caseViewMode:r,referencedUsers:s}=t,a=W(n),o={context:fd(a),data:{referencedUsers:s,context_data:{caseViewMode:r}}};e.push(ng(bh,o))})(n,{childContainerItemID:a,caseViewMode:j.REVIEW_MODE,referencedUsers:s?.data.referencedUsers}),u.skipReleaseLockRequest=!0,n.push(ng(Kh,u)),n})),$l((()=>(sh(n),is(n,t),n=[],n))))},by="NAVIGATE_TO_STEP",Oy=(e,t)=>{const{ID:n,stepID:r,containerItemID:s,context:a=fd(s),isInCreateStage:o}=e,{state$:i}=t,c={ID:n,stepID:r,viewType:o?Tc.PAGE:Tc.FORM},{restApi:l,reqType:u}=_g("navigateToStep",c),{content:d}=Dc(a),p=i.value.data[a].caseInfo.headers;return ji(pc(`${l}`,{method:u,body:d,headers:{"if-match":p&&p.etag}},a)).pipe($l((t=>({response:t.data,actionInPayload:e,headers:Pc({...p,...t.headers})}))),Xl("Error occurred during ajax call at navigateToStep Epic : ",a))},{RESOURCE_TYPES:vy}=F,xy=(e,t)=>{let n=0,r=[];return e.pipe(Vl(by),kl((e=>(({actionMgrID:n}=e.payload),ql(e.payload).pipe(Bl((e=>(Xn(e.context),Oy(e,{state$:t})))),Bl((async e=>{if(e&&Kr(e.type))return r.push(wc(e)),r;const{actionInPayload:t,response:n,headers:s}=e,{containerItemID:a,context:o=fd(a),isModalAction:i}=t;Pu.clearContextedCache(t.context);const c=Od(a),l=qr(a),u=Object.freeze({target:c,containerItemID:a,context:o,containerName:l}),d=n?.data?.caseInfo?.content,p=n?.uiResources?.root?.config?.name;d&&!d.pyViewName&&p&&"page"!==t.viewType&&Eh.setIn(d,"pyViewName",p);const h=Sm(n),g={acName:c,...u};await bc(h,t,g);const f=Rc(h,{...u,headers:s});f.doDeleteCaseSummary=t.doDeleteCaseSummary,f.resourceType=vy.ASSIGNMENT,as(f,h),os(f.data,t);const m=h.data?.caseInfo?.stages,y=h.data?.caseInfo?.stageID;return Gr({caseID:ts(h),isModalAction:i,stages:m,stageID:y}),ss(a)&&Gc(f,r),r.push(ng(Gh,f)),$c(r),r})),$l((()=>(sh(r),is(r,n),r=[],r))))))))},wy=e=>{const{caseID:t,context:n}=e,{restApi:r,reqType:s}=_g("deleteCaseInCreateStage",{ID:t});return ji(pc(r,{method:s},n)).pipe($l((t=>({response:t.data,actionInPayload:e,headers:Pc(t.headers)}))),Xl(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",n))},My=e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,e)},Ly=(e,t)=>{let n,r=0,s=[];return e.pipe(Vl(wl),$l((e=>(({actionMgrID:r,caseType:n}=e.payload),e.payload))),Bl((e=>e.ignoreCaseDeletion?ql({actionInPayload:e}):wy(e))),Bl((async e=>{if(e&&Kr(e.type)){const{payload:t}=e,n=wc({...e,...t,actionMgrID:r});return s.push(n),s}const{actionInPayload:n}=e,{context:a,isModalAction:o}=n,i=o?td.MODAL:td.PRIMARY,c=mt(i,a);if(!o&&c){const e={acName:c,target:c,context:a},r=t.value.containers[c],{semanticURL:s}=(e=>{const{accessedOrder:t,items:n}=e;if(t&&t.length>1){const e=n[t[t.length-2]],{semanticURL:r}=e;if(r)return e}return{semanticURL:""}})(r);await bc({directUrlUpdation:!0,semanticURL:s},n,e)}if(n.isProcessAction&&n.parentCaseInfo){const e={insKey:n.parentCaseInfo.ID,className:n.parentCaseInfo.content.classID,context:n.parentContext,acTargetName:j.PRIMARY,isChild:!0},t={type:ue,payload:{...e}};s.push(t)}const l={target:c,containerItemID:a,context:a,caseDeleted:!0};return s.push(ng(Kh,l)),s})),$l((()=>(sh(s),is(s,r)===j.PROMISE_VALUE.RESOLVE&&My({caseType:n}),s=[],s))))},Uy=(e,t)=>{const{assignmentID:n,actionID:r,context:s}=e,{restApi:a,reqType:o}=_g("save",{assignmentID:n,actionID:r}),{content:i}=Dc(s),c=t.value.data[s]?.caseInfo?.headers;let l={};return cp.getPerformanceDashboardVisibility()&&(l=jm.getActionInfo(j.TOP_ACTION_LABEL.SAVEANDCLOSE)),ji(pc(a,{method:o,body:i,headers:{"if-match":c&&c.etag}},s,l)).pipe($l((t=>({response:t.data,actionInPayload:e,headers:Pc(t.headers)}))),Xl(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",s))},Fy=(e,t=!1)=>{const{action:n,state$:r,actionMgrID:s}=e;let a=[];return ql(n.payload).pipe(Bl((e=>Uy(e,r))),Bl((e=>{if(e&&Kr(e.type))return ql(e);if(e.actionInPayload.isProcessAction&&e.response.data.caseInfo.parentCaseInfo){const t=`${e.actionInPayload?.containerItemID.includes("root")?j.APP.ROOT:j.APP.APP}/${td.PRIMARY}`,n=Lc(t,td.PRIMARY),r={insKey:e.response.data.caseInfo.parentCaseInfo.ID,className:e.response.data.caseInfo.parentCaseInfo.content.classID,context:n,acTargetName:j.PRIMARY,isChild:!0},s={type:ue,payload:{...r}};a.push(s)}const{containerItemID:t}=e&&e.actionInPayload,r=W(t),s=Od(r),o=rd(s),i=pd(s);if(n.payload.canUpdateAvailableActions&&_m(e.response),o?.items?.[i]?.key===e?.actionInPayload?.caseID){const n={context:r,data:{...e.response.data}},s=Sc.getPropertiesToReplace(t);a.push(ng(bh,n,{propertiesToReplace:s})),a.push(ng(Gh,{context:t}))}return us(e,a),e.actionInPayload.RemoteSystemID=$.getRemoteHeaderByContext(e.actionInPayload.context)??void 0,Py(e.actionInPayload)})),Bl((async n=>{if(n&&Kr(n.type)){const{payload:t}=n,r=wc({...n,...t,actionMgrID:s});a.push(r);const o=e.action.payload.modalLoadingContainer;if(o){const e=o.context,{context_data:t}=ah(e)||{};t?.isLoading&&vd(e)}return a}const{actionInPayload:r}=n,{context:o,containerName:i}=r,c={target:mt(i,o),containerItemID:o,context:o};return t||a.push(ng(Kh,c)),a})),$l((()=>(sh(a),is(a,s),t||(a=[]),a))))},jy=(e,t)=>{let n,r=0;return e.pipe(Vl(Ml),kl((e=>{const{saveOnly:s}=e.payload;({actionMgrID:r,caseType:n}=e.payload);return Fy({action:e,state$:t,actionMgrID:r,caseType:n},s)})))},Vy=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="expressLocalActionSubmit",Br.unsubscribe(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n)};n=e,r="expressLocalActionSubmit",Br.subscribe(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n,r)}var n,r},{LOCAL_ACTION_TYPE:ky}=j,{RESOURCE_TYPES:$y}=F,By=(e,t)=>{const{actionID:n,assignmentID:r,caseID:s,context:a,openActionType:o,modalLoadingContainer:i}=e,{isProcessAction:c}=t,l=c?ze:(e=>{const t=e.localActionType.toLowerCase();return t===ky.CASE_WIDE||t===ky.EXPRESS?Ye:qe})(e),u=Tc.FORM,{reqType:d}=_g(l,{caseID:s,ID:r,actionID:n,viewType:u});let{restApi:p}=_g(l,{caseID:s,ID:r,actionID:n,viewType:u});e.actionType=l===Ye?j.CASE:j.ASSIGNMENT,p&&!p.includes("viewType=")&&(p=p.includes("?")?`${p}&viewType=${u}`:`${p}?viewType=${u}`);const h=i?.context??a;return ji(pc(p,{method:d,headers:{}},h)).pipe($l((t=>({response:t.data,actionInPayload:e,headers:Pc(t.headers)}))),Xl(`: Error occurred during ajax call at ${o} Epic : `,h))},Gy=(e,t)=>{const{isProcessAction:n}=t,r=n?ze:qe;e.openActionType=r;let s;if("modal"===Hr(r,e)){s=Id(e.contextName)[0]?Id(e.contextName):Od(e.contextName);const n=s?pd(s):e.contextName,r=fd(n),a=Hr(e.openActionType,e),o=mt(a,e.context),i=K(e.context,H(a,e.context));if(sh(Fh({target:o,context:i,containerItemID:i,key:e.caseID,caseViewMode:j.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:j.CASE_INFO.CASE_INFO_CONTENT,type:"view"}},data:{key:e.caseID,caseInfo:{ID:e.caseID}}})),sh(Wh({context:i})),e.modalLoadingContainer={target:o,context:i},!Id(e.contextName)[0])return By(e,t);if(!e.continueExecution)return By(e,t);if(!Nl(r))return By(e,t);e.saveActionPayload.modalLoadingContainer=e.modalLoadingContainer,e.saveActionPayload.canUpdateAvailableActions=!e.saveActionPayload.isModalAction;return ji([Ll(e.saveActionPayload)]).pipe(Bl((e=>(e=>{let t,n=0;const r=[],s={value:rh()?.getState()};return ql(e).pipe(Vl(Ml),kl((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n,caseType:t}=e.payload),!a){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(n,!0,e),ql([])}return Fy({action:e,state$:s,actionMgrID:n,caseType:t,actionsOut:r},!0)})))})(e))),Bl((n=>{if(1===n.length&&Kr(n[0].type)){const{continueExecution:n}=jc(s);if(!n)return ln.rejectActionByID(e.actionMgrID),Yl.pipe(Vi((()=>Kl()))).toPromise();if(n)return By(e,t)}return By(e,t)})),$l((e=>e)))}return By(e,t)},Wy=async(e,t,{headers:n,actionInPayload:r})=>{const{context:s,actionName:a,openActionType:o,doDeleteCaseSummary:i,modalLoadingContainer:c}=r,l=Sm(e),u=Hr(o,r),d=c?.target??mt(u,s);let p,h,g=!1;!Cd(d)||Sd(d)&&!cd(d,e.data.caseInfo.ID)?(h=H(u,s),Yr(u)&&(h=K(s,h)),p=h,g=!0):(p=Sd(d)?ld(d,e.data.caseInfo.ID):pd(d),h=fd(p));const f={acName:d,target:d,containerName:u,context:h};await bc(l,r,f),(void 0===l?.data?.caseInfo?.content||void 0!==l.data.caseInfo.content&&"object"==typeof l.data.caseInfo.content&&0===Object.keys(l.data.caseInfo.content).length)&&delete l.data?.caseMessages;const m=l.uiResources?.root;let y;y=m?j.PERFORM_MODE:j.REVIEW_MODE;const I=Rc(l,{target:d,context:h,containerItemID:p,caseViewMode:y,doDeleteCaseSummary:i,headers:n,actionName:a,isMinimizable:!1,isInCreateStage:Yr(u),resourceType:$y.ASSIGNMENT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,assignmentID:r.assignmentID,actionType:r.actionType});m&&as(I,l),Yr(u)&&delete I.doDeleteCaseSummary,r.openActionType===Ke&&(I.isBulkAction=!0,I.data.caseInfo.actionButtons.main[0].jsAction="async"===r.runningMode?"submitBulkActionAsync":"submitBulkAction",I.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",I.data.caseInfo.cases=r.selectedList);const E=g?Fh:Gh;if(t.push(ng(E,I)),g||t.push(ng(Hh,I)),g){const s=Id(r.contextName),a=ld(s,e.data.caseInfo.ID);if(a){const e={data:{caseInfo:{headers:n}},context:a};t.push(ng(bh,e))}}return p!==pd(d)&&t.push(ng(zh,{target:d,containerItemID:p})),ss(p)&&!c?.context&&Gc(I,t),I.caseViewMode===j.REVIEW_MODE&&t.push(ng(Kh,I)),t},Hy="OPEN_LOCAL_ACTION",qy=(e,t)=>Gy(e,t),zy=e=>{let t=0,n=[];return e.pipe(Vl(Hy),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>qy(e,{actionMgrID:t}))),Bl((async e=>{if(!e)return Yl;if(Kr(e.type)){const t=wc(e);n.push(t);const{context_data:r}=ah(e.payload.context)||{};return r?.isLoading&&n.push(ng(Hh,e.payload)),n}const{actionInPayload:t,headers:r,response:s}=e,{actionID:a}=t;return Eh.setIn(s,"data.caseInfo.activeActionID",a),Eh.setIn(s.data,j.CASE_INFO_IS_LOCAL_ACTION,!0),t.refreshConditions&&Eh.setIn(s.data,j.CASE_INFO_REFRESH_CONDITIONS,t.refreshConditions),await Wy(s,n,{headers:r,actionInPayload:t}),Vy(t),n})),$l((()=>(sh(n),is(n,t),n=[],n))))},Yy=e=>{const{actionID:t,context:n,openActionType:r,caseTypeID:s,bulkContextID:a="",bulkContextType:o=""}=e,i=Ke,{reqType:c,restApi:l}=_g(i,{caseTypeID:s,actionID:t,bulkContextID:a,bulkContextType:o});return ji(pc(l,{method:c},n)).pipe($l((t=>({response:t.data,actionInPayload:e,headers:Pc(t.headers)}))),Xl(`: Error occurred during ajax call at ${r} Epic : `,n))},Ky=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="bulkActionSubmit",Br.unsubscribe(j.PUB_SUB_EVENTS.EVENT_BULKACTION,n)};n=e,r="bulkActionSubmit",Br.subscribe(j.PUB_SUB_EVENTS.EVENT_BULKACTION,n,r)}var n,r},Xy="OPEN_BULK_ACTION",Jy=e=>{let t=0,n=[];return e.pipe(Vl(Xy),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>((e,t)=>{const{context:n}=e,{actionMgrID:r}=t;e.openActionType=Ke;const s=Hr(Ke,e),a=mt(s,n),{continueExecution:o}=jc(a);return o?Yy(e):(ln.rejectActionByID(r),Kl())})(e,{actionMgrID:t}))),Bl((async e=>{if(e&&Kr(e.type)){const t=wc(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:s}=e,{actionID:a}=t;return Eh.setIn(s,"data.caseInfo.activeActionID",a),await Wy(s,n,{headers:r,actionInPayload:t}),Ky(t),n})),$l((()=>(1===n.length&&Kr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),sh(n),n=[],n))))};var Qy=Array.isArray,Zy=Object.getPrototypeOf,eI=Object.prototype,tI=Object.keys;function nI(e){if(1===e.length){var t=e[0];if(Qy(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&Zy(r)===eI){var n=tI(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var r;return{args:e,keys:null}}var rI=Array.isArray;function sI(e){return $l((function(t){return function(e,t){return rI(t)?e.apply(void 0,$o([],ko(t))):e(t)}(e,t)}))}function aI(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return qo(Wl(e))?e.pop():void 0}(e),r=nI(e),s=r.args,a=r.keys,o=new Ei((function(e){var t=s.length;if(t)for(var n=new Array(t),r=t,o=t,i=function(t){var i=!1;Ri(s[t]).subscribe(xi(e,(function(e){i||(i=!0,o--),n[t]=e}),(function(){return r--}),void 0,(function(){r&&i||(o||e.next(a?function(e,t){return e.reduce((function(e,n,r){return e[n]=t[r],e}),{})}(a,n):n),e.complete())})))},c=0;c<t;c++)i(c);else e.complete()}));return n?o.pipe(sI(n)):o}const oI=e=>{const{actionID:t,context:n,cases:r,classID:s}=e,{content:a}=Dc(n,{nonEmptyAndChangedData:!0});let o=5;try{const e=ku.getSharedState("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults");e?.find((e=>e.pyClassName===s))?.pyList.split(",").includes(t)&&(o=1)}catch(e){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',e)}const i=r.map((e=>({ID:e}))),c=i.length/o,l=Xe,{reqType:u,restApi:d}=_g(l,{actionID:t}),p=[],h=i.length;for(let t=0;t<h;t+=c)a.cases=i.slice(t,t+c),a.cases.length&&p.push(ji(pc(d,{method:u,body:a},n)).pipe($l((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:Pc({...r})}})),Xl("Error occurred during ajax call at submitbulkaction Epic : ",n)));return aI(p)},iI=e=>{Br.publish(j.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},cI="SUBMIT_BULK_ACTION",lI=e=>{let t,n=0,r=[],s="";return e.pipe(Vl(cI),kl((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(n,!0,e),ql([])}return ql(e.payload).pipe(Bl((e=>(t=e,oI(t)))),Bl((e=>{let n=0,a=0;const o=[],{containerItemID:i,context:c}=t;return e.map((e=>{const{response:t}=e;n+=Number(t.successCount),a+=Number(t.failureCount),a&&t.results.map((e=>{"200"!==e.status&&e.error&&e.error.errorDetails&&e.error.errorDetails.forEach((t=>{o.push({ID:e.BusinessID,message:t.localizedValue})}))}))})),s=`${n} record(s) updated`,iI({submitResponse:e}),t.target=`${j.APP.APP}/${td.MODAL}`,r.push(ng(Kh,{containerItemID:i,context:c,target:t.target,skipReleaseLockRequest:!0})),a&&r.push(ng(Yh,{messages:[{type:"error",message:`${a} records failed to update`,errorDetails:o,showHeader:!1}],context:W(c)||c,category:"HTTP",showHeader:!1})),r})),$l((()=>(ln.resolveActionByID(n,s),sh(r),r=[],r))))})))},uI=e=>{const{actionID:t,context:n,cases:r}=e,{content:s}=Dc(n,{nonEmptyAndChangedData:!0});s.cases=r.map((e=>({ID:e})));const a=Xe,{reqType:o,restApi:i}=_g(a,{actionID:t,runningMode:"async"});return ji(pc(i,{method:o,body:s},n)).pipe($l((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:Pc({...r})}})),Xl("Error occurred during ajax call at submitbulkaction Epic : ",n))},dI=e=>{Br.publish(j.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},pI="SUBMIT_BULK_ACTION_ASYNC",hI=e=>{let t,n=0,r=[],s="";return e.pipe(Vl(pI),kl((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(n,!0,e),ql([])}return ql(e.payload).pipe(kl((e=>(t=e,uI(t)))),$l((e=>{const n=[],{containerItemID:a,context:o}=t,{response:i}=e,c=Number(i.failureCount)||0;return c>0&&i.results.forEach((({status:e,error:t,BusinessID:r})=>{"200"!==e&&t&&t.errorDetails&&t.errorDetails.forEach((({localizedValue:e})=>{n.push({ID:r,message:e})}))})),s="Processing bulk actions",dI({submitResponse:i}),t.target=`${j.APP.APP}/${td.MODAL}`,r.push(ng(Kh,{containerItemID:a,context:o,target:t.target,skipReleaseLockRequest:!0})),c&&r.push(ng(Yh,{messages:[{type:"error",message:1===c?"1 record failed to update":`${c} records failed to update`,errorDetails:n,showHeader:!1}],context:W(o)||o,category:"HTTP",showHeader:!1})),r})),$l((()=>(ln.resolveActionByID(n,s),sh(r),r=[],r))))})))},gI=(e,t)=>Gy(e,t),fI=e=>{let t=0,n=[];return e.pipe(Vl(vl),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>(Xn(e.context),gI(e,{actionMgrID:t,isProcessAction:!0})))),Bl((async e=>{if(e&&Kr(e.type)){const t=wc(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:s}=e;return await Wy(s,n,{headers:r,actionInPayload:t}),n})),$l((()=>(Wc(n),is(n,t),n=[],n))))},mI=e=>{let t=0,n=[];return e.pipe(Vl(Ce,Me),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>{const{containerItemID:t,caseID:n,context:r,caseDeleted:s,skipReleaseLockRequest:a}=e,o=ah(t),i=o?.context_data?.caseViewMode,c=i===j.PERFORM_MODE;return t!==r||s||a||!(n&&c)?ql([]):Py(e)})),Bl((e=>(e&&Kr(e.type)&&n.push(wc(e)),n))),$l((()=>(sh(n),is(n,t),n=[],n))))};var yI=new Xg(qg),II=yI;function EI(e,t,n){void 0===e&&(e=0),void 0===n&&(n=II);var r=-1;return null!=t&&(Gl(t)?n=t:r=t),new Ei((function(t){var s,a=(s=e)instanceof Date&&!isNaN(s)?+e-n.now():e;a<0&&(a=0);var o=0;return n.schedule((function(){t.closed||(t.next(o++),0<=r?this.schedule(void 0,r):t.complete())}),a)}))}function AI(e,t){return void 0===e&&(e=0),void 0===t&&(t=yI),e<0&&(e=0),EI(e,e,t)}function _I(e){return vi((function(t,n){var r=!1,s=null,a=null,o=function(){if(null==a||a.unsubscribe(),a=null,r){r=!1;var e=s;s=null,n.next(e)}};t.subscribe(xi(n,(function(t){null==a||a.unsubscribe(),r=!0,s=t,a=xi(n,o,ri),Ri(e(t)).subscribe(a)}),(function(){o(),n.complete()}),void 0,(function(){s=a=null})))}))}const SI=(e,t,n,r,s)=>{if(s!==j.RESOURCE_STATUS.CREATE)return;Kc.isStateMachineExist(e,t,n)||Kc.setStateMachine(e,n,t,new ir(n,t,e));Kc.getStateMachine(e,t,n).insert({},r+1,!0,{isDefault:!0})},CI=e=>{const{context:t}=e;let n={...Dc(t).content,contextData:!1};const r=qc(t);Eh.isEmpty(r)||(n=Hc(r,n));const{restApi:s,reqType:a}=_g("refreshCaseView",e);return n.interestPage=e.interestPage,ji(pc(s,{method:a,body:n},t)).pipe($l((t=>({actionInPayload:e,response:t.data,headers:Pc(t.headers)}))),Xl(": Error occurred during ajax call : ",t))},TI=e=>{let t=0,n=[],r="";return e.pipe(Vl(pt),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>CI(e))),Bl((async e=>{if(e&&e.type===Ee)return n.push(wc(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0}};const{actionInPayload:t,response:s}=e,a=t.containerName,o=mt(a,t.context);let i=Lc(o,a,t.context);i=K(t.context,i);const c=Sm(s);c.key=t.ID,c.data?.caseInfo&&(c.data.caseInfo.ID=t.ID);const l={isMultiRecordData:!0,viewName:t.viewID,parentContext:t.context,interestPage:t.interestPage};c.uiResources.context_data.modalView=l;const u=ah(t.context)?.context_data?.caseInfo,d=`${t.pageReference}${t.targetProperty}`,p=Bn(u,d.replace(F.CASE_INFO.CASE_INFO_CONTENT,"").slice(1),t.index);c.uiResources.context_data.caseInfo={...c.uiResources.context_data.caseInfo,content:{...c.uiResources.context_data.caseInfo?.content,...p?.content}};const h={acName:o,context:i};await bc(c,t,h);const g=Rc(c,{target:o,context:i,containerItemID:i});g.resourceStatus=t.actionType,g.isMultiRecordData=!0,g.parentContext=t.context,g.heading=t.heading;const f=Mc(o,g);return r=i,n.push(f),$c(n),{actionsOut:n,actionInPayload:t}})),$l((({actionInPayload:e})=>(Xr(n)?ln.rejectActionByID(t):ln.resolveActionByID(t),sh(n),n=[],e.skipPageInstructions||SI(r,e.pageReference,e.targetProperty,e.index,e.actionType),n))))},NI=e=>{let t,n="",r=[];return e.pipe(Vl(ht),kl((e=>{t=e.payload;const{isFormValid:s}=e.payload;if(({actionMgrID:n}=e.payload),!s){const t={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(n,!0,t),bu.handleDeferredActionCompletion(e.payload.context),ql([])}return ql(e.payload).pipe(Bl((e=>(t=e,CI(t)))),Bl((async e=>{if(e&&e.type===Ee){const t=wc(e);return r.push(t),r}const{containerItemID:n,context:s}=t;var a,o,i,c;return a=s,o=t.parentContext,i=F.CASE_INFO.CASE_INFO_CONTENT,c=!1,fr(a).forEach((e=>{const t=Eh.convertClipboardPageToPageRefNotation(e.target);Kc.isStateMachineExist(o,i,t)||Kc.setStateMachine(o,t,i,new ir(t,i,o));const n=Kc.getStateMachine(o,i,t);switch(e.instruction.toLowerCase()){case"insert":n.insert(e.content,e.listIndex,c,{});break;case"update":n.update(e.content,e.listIndex,c,{});break;case"delete":e.listIndex?n.delete(e.listIndex,c):n.deletePage();break;case"replace":n.replacePage(e.content);break;case"move":n.move(e.listIndex,e.listMoveToIndex);break;case"delete all":n.deleteAll()}})),r.push(ng(Kh,{containerItemID:n,context:s,target:t.target,skipReleaseLockRequest:!0})),r})),$l((()=>{if(Xr(r))ln.rejectActionByID(n),bu.handleDeferredActionCompletion(t.context);else{ln.resolveActionByID(n),bu.handleDeferredActionCompletion(t.context);const{pageReference:r}=e.payload;if(Ch.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,r,t.parentContext)){const e=Ch.getPropertyValue(F.CASE_INFO.CASE_INFO_ID,r,t.parentContext),n=Ch.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,r,t.parentContext),s=t.pageReference?.substring(0,t.pageReference?.lastIndexOf(".")),a=s.replace(j.CASE_INFO.CASE_INFO_CONTENT,"");vn(e,n,t.parentContext,a,{})}else Ln(t.parentContext,j.CASE_INFO.CASE_INFO_CONTENT,{})}return sh(r),r=[],r})))})))},PI=e=>{const{caseID:t,headers:n,debugInfo:r,context:s}=e,a=_g("getDescendants",{caseID:t}),{restApi:o}=a,{reqType:i}=a;let c={};return cp.getPerformanceDashboardVisibility()&&(c=jm.getActionInfo(j.TOP_ACTION_LABEL.GETDESCENDANTS)),ji(pc(o,{method:i,headers:{...n,...r&&{...nc.addDebugHeaders(r)}}},s,c)).pipe($l((t=>({actionInPayload:e,response:t.data,headers:Pc({...n,...t.headers})}))),Xl("Error ocurred during ajax call at getDescendants Epic : ",s))},DI=e=>{let t=0,n=[];return e.pipe(Vl(Ru),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>PI(e))),Bl((async e=>{if(e&&Kr(e.type))return n.push(wc(e)),n;const{actionInPayload:t,response:r}=e,s={};Eh.setIn(s,"caseInfo.childCases",r?.childCases);const a={data:s,context:t?.context};return n.push(ng(bh,a)),n})),$l((()=>(sh(n),is(n,t),n=[],n))))},RI=[Jm,ay,uy,zy,Jy,lI,hI,fI,Ty,xy,Ry,mI,jy,Ly,e=>e.pipe(Vl(He),_I((()=>AI(100))),$l((e=>{const{actionMgrID:t,isChildCase:n,isModalAction:r,isProcessAction:s,isDataObject:a,skipReleaseLockRequest:o,isInCreateStage:i}=e.payload;return ln.resolveActionByID(t),Br.publish(j.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:r,hideDelete:!s&&n,isDataObject:a,skipReleaseLockRequest:o,isInCreateStage:i}),[]}))),e=>e.pipe(Vl(Le),_I((()=>AI(100))),$l((e=>{const{actionMgrID:t,context:n,containerName:r,containerItemID:s}=e.payload,a=mt(r,n);return ln.resolveActionByID(t),sh(ng(zh,{containerItemID:s,target:a,doDeleteCaseSummary:!1})),[]}))),TI,NI,DI],bI=RI;function OI(){return vi((function(e,t){e.subscribe(xi(t,ri))}))}const{RESOURCE_TYPES:vI}=F,xI=[e=>e.pipe(Vl(te),$l((e=>e.payload)),Bl((e=>{const t={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===td.PREVIEW&&e.context&&e.caseId&&!e.updateData){const t=mt(td.PREVIEW,e.context),n=Lc(t,td.PREVIEW,e.context,{buildNew:!0}),r=decodeURI(e.caseId);sh(Fh({...e,context:n,target:t,containerItemID:n,key:r,caseViewMode:j.REVIEW_MODE,root:{type:"reference",config:{context:j.CASE_INFO.CASE_INFO_CONTENT,name:e.viewName,type:"view"}},data:{key:r,caseInfo:{ID:r,progress:!0,error:!1,caseTypeID:e.caseClassName,content:{classID:e.caseClassName}}}})),e.viewLoadingContainer={target:t,context:n}}const n={};if(t.RemoteSystemID)n.RemoteSystemID=t.RemoteSystemID;else if($.isRemoteCase(t.caseClassName)){const{RemoteSystemID:e}=$.getRemoteCase(t.caseClassName);n.RemoteSystemID=e}let{restApi:r,reqType:s}=_g("loadView",t);return e.viewContext===vI.PAGE&&({restApi:r,reqType:s}=_g(je,{page:e.viewName,pageClass:e.pageClass})),ji(pc(r,{method:s,headers:n},e.context)).pipe($l((t=>{const n=decodeURI(e.caseId);let r="";return"string"==typeof t.data?t.data?r=JSON.parse(t.data):(console.error("response data is empty!!"),r={}):r=t.data,{response:{...r,key:n},actionConfig:e,headers:Pc(t.headers),rootView:Eh.getIn(r,j.ROOT)}})),Xl(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))})),Bl((async e=>{const t={};if(e?.type===Ee){if(t.actionsOut=wc(e),e?.payload?.context?.includes(td.PREVIEW)){const n={...ah(e.payload.context),caseInfo:{progress:!1,error:!0}},r=mt(td.PREVIEW,e.payload.context);t.actionsOut=ng(Gh,{key:n.key,target:r,containerName:td.PREVIEW,context:e.payload.context,containerItemID:e.payload.context,data:n})}return t}try{t.actionMgrID=e?.actionConfig?.actionMgrID,t.rootView=e?.rootView;const{actionConfig:n,response:r,headers:s}=e,{containerItemID:a,containerName:o}=n,{target:i,context:c}=(e=>{const{containerName:t,updateData:n,viewLoadingContainer:r}=e,s=t||Vr.getTargetViewContainerName(je),a=r?.target??mt(s,e.context);return{target:a,context:r?.context??(t===td.PREVIEW&&n?e.context:Lc(a,s,e.context,{buildNew:!!t}))}})(n);n.context=c;const l={acName:i,context:c};let u={};u=o===td.PREVIEW?Sm(r):Sm(r,{[F.STOPMERGEACTIONS]:!0,[F.ACTIONS.DELETEAVIALACTIONS]:!0}),u.directUrlUpdation=!1,await bc(u,n,l);const d={...n,target:i,context:c,containerItemID:a||c,headers:s},p=Rc(u,d);if(p.resourceType=vI.CASE,o&&!p.updateData){p.caseViewMode=j.REVIEW_MODE;const e=Od(p?.context);((e,t,n,r,s)=>{e&&s===td.PREVIEW?(n.data.caseInfo.progress=!1,delete n.root,r.actionsOut=ng(Gh,{...n,containerName:s})):e?(r.actionsOut=[],r.actionsOut.push(ng(zh,{target:t,containerItemID:e}))):r.actionsOut=ng(Fh,{...n,containerName:s})})(ld(e,p.key),e,p,t,o)}else p.preserveClientChanges=!0,t.actionsOut=[],o===td.PREVIEW&&t.actionsOut.push({type:st,payload:{context:c}}),t.actionsOut.push(ng(bh,p))}catch(e){console.error(e),t.rootView={type:"error",payload:e}}const{caseId:n,context:r,viewName:s}=e.actionConfig;return"pyCasePreview"===s&&(e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CASE_PREVIEW,e)})({caseId:n,context:r}),t})),$l((({rootView:e,actionsOut:t,actionMgrID:n=0})=>(ln.resolveActionByID(n,e),t)))),e=>{let t=0,n=[];return e.pipe(Vl(ne),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>{Br.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);const{debugInfo:n,context:r,viewName:s,className:a,skipSemanticUrl:o=!1,containerName:i=Vr.getTargetViewContainerName(je)}=e,c=n&&{...nc.addDebugHeaders(n)},l=mt(i,r);let u="",d={},p=!0;if(!o){if(u=Eg(je,{page:s}),l&&u){const{activate:t,activateContainerActionPayload:n}=kc(vI.PAGE,l,{semanticURL:u});if(t)return ql({type:ve,activateContainerActionPayload:n,actionConfig:e})}if(pd(l)&&({continueExecution:p,removeActionPayload:d}=jc(l)),!p)return ln.rejectActionByID(t),Kl()}const{restApi:h,reqType:g}=_g(je,{page:s,pageClass:a});return ji(pc(h,{method:g,headers:c},r)).pipe($l((t=>{let n={};return n="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...n,key:u,semanticURL:u},actionConfig:e,headers:Pc(t.headers),removeActionPayload:d,skipSemanticUrl:o}})),Xl(": Error ocurred during ajax call at showPage Epic : ",e.context))})),Bl((async e=>{if(e&&e.type===Ee)return n.push(wc(e)),n;let{type:t}=e;const{actionConfig:r,skipSemanticUrl:s}=e,a=r.containerName||Vr.getTargetViewContainerName(ne),o=mt(a,r.context);Br.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className});const{remoteCasePayload:i,updatedType:c}=((e,t,n,r)=>{let s={},a=e;if(n.isTraditionalRemoteCase){s={...n};const e=ld(r,s.insKey);e&&(t.activateContainerActionPayload={containerItemID:e},a=ve)}return{remoteCasePayload:s,updatedType:a}})(t,e,r,o);if(t=c??t,t===ve){const{activateContainerActionPayload:{semanticURL:t,containerItemID:s}}=e,a={acName:o,context:fd(s)};r.isTraditionalRemoteCase||await bc({directUrlUpdation:!0,semanticURL:t},r,a,!0),n.push(ng(zh,{target:o,containerItemID:s}))}else{const t=Lc(o,a,r.context),{response:c,headers:l={},removeActionPayload:u}=e,d=Sm(c,{isCreateDataObject:r.isCreateDataObject});d.directUrlUpdation=!s;const p={acName:o,context:t};await bc(d,r,p);const h={target:o,context:t,containerItemID:t,headers:l,debugInfo:r.debugInfo},g=Rc(d,h);g.resourceType=F.PAGE,r.isCreateDataObject&&(g.resourceType=F.RESOURCE_TYPES.DATA,g.resourceStatus=F.RESOURCE_STATUS.CREATE,delete g.data.caseInfo),((e,t,n)=>{e.isTraditionalRemoteCase&&(n.resourceType=F.CASE,n.key=Sc.getRemoteCaseKey(t.assignmentID,t.insKey),n.data.caseInfo={...n.data.caseInfo,...t,classID:t.className,target:n.target,containerItemID:n.containerItemID,caseTypeID:t.className,content:{pyLabel:t.name,pyID:Qr(t.insKey)}},n.isTraditionalRemoteCase=!0,n.className=t.className)})(r,i,g);const f=Mc(o,g);u.containerItemID&&Uc(f)&&n.push(ng(Kh,{containerItemID:u.containerItemID,target:o})),n.push(f),$c(n)}return Br.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:o,pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),n})),$l((()=>{ln.resolveActionByID(t),sh(n),n=[]})),OI())}],wI=xI;const MI=(e,t)=>{const{context:n,pageName:r,dataContext:s,dataContextParameters:a,semanticURL:o,skipSemanticUrl:i}=e,{removeActionPayload:c}=t,{restApi:l,reqType:u,body:d}=_g(Ve,{pageName:r,dataContext:s,dataContextParameters:a});let p={};return cp.getPerformanceDashboardVisibility()&&(p=jm.getActionInfo(j.TOP_ACTION_LABEL.SHOWDATA)),ji(pc(l,{method:u,body:d},n,p)).pipe($l((t=>({response:{...t.data,key:o,semanticURL:o},actionConfig:e,headers:Pc(t.headers),removeActionPayload:c,skipSemanticUrl:i}))),Xl("Error occurred during ajax call at showData Epic : ",e.context))},{RESOURCE_TYPES:LI}=F,UI=e=>{let t,n=0,r=[];return e.pipe(Vl(re),(s=e=>(({actionMgrID:n}=e.payload),ql(e.payload).pipe(Bl((e=>((e,t)=>{const{context:n,pageName:r,dataContext:s,dataContextParameters:a,skipSemanticUrl:o=!1,isDeferLoaded:i=!1,parentAction:c="",resourceType:l}=e;let{containerName:u}=e;u||(u=Vr.getTargetViewContainerName(ne));const d=mt(u,n);let p="",h={},g=!1;if(!o){p=Eg(Ve,{pageName:r,dataViewName:s},a);const{activate:n,activateContainerActionPayload:o}=kc(LI.PAGE,d,{semanticURL:p});if(n)return ql({type:ve,activateContainerActionPayload:o,actionConfig:e});if(({continueExecution:g,removeActionPayload:h}=jc(d)),!g)return ln.rejectActionByID(t),Kl()}return MI({context:n,pageName:r,dataContext:s,dataContextParameters:a,semanticURL:p,skipSemanticUrl:o,containerName:u,isDeferLoaded:i,parentAction:c,resourceType:l},{removeActionPayload:h})})(e,n))),Bl((async e=>{if(e&&e.type===Ee)return r.push(wc(e)),r;const{type:n,actionConfig:s,headers:a,response:o,skipSemanticUrl:i}=e;t=Eh.getIn(o,j.ROOT);const{containerName:c,parentAction:l,resourceType:u}=s,d=mt(c,s.context);let p;if(s.isDeferLoaded){p=Sm(o),p.directUrlUpdation=!i;const t={acName:d,context:s.context};await bc(p,s,t);const n={target:d,headers:a,context:s.context,containerItemID:e.containerItemID},c=Rc(p,n);return r=ng(bh,c),r}if(n===ve){const{activateContainerActionPayload:{semanticURL:t,containerItemID:n}}=e,a={acName:d,context:fd(n)};await bc({directUrlUpdation:!0,semanticURL:t},s,a,!0),r.push(ng(zh,{target:d,containerItemID:n,resourceType:LI.DATA}))}else if("DATA"===u&&l===dt){const{context:e}=s,t=o?.data,n={context:e,data:t};r.push(ng(bh,n))}else{const t=Lc(d,c,s.context),{removeActionPayload:n}=e;p=Sm(o),p.directUrlUpdation=!i;const l={acName:d,context:t};await bc(p,s,l);const u=Rc(p,{target:d,context:t,containerItemID:t,headers:a});u.resourceType=LI.DATA;const h=Mc(d,u);n.containerItemID&&Uc(h)&&r.push(ng(Kh,{containerItemID:n.containerItemID,target:d})),$c(r),r.push(h)}return r})),$l((()=>(ln.resolveActionByID(n,t),sh(r),r=[],r))))),qo(a)?Bl(s,a,1):Bl(s,1)));var s,a},FI=e=>{const{dataViewName:t,context:n,dataViewParameters:r}=e,s={data_view_ID:t,dataViewParameters:encodeURIComponent(JSON.stringify(r))},{restApi:a,reqType:o}=_g("deleteDataObject",s);return ji(pc(a,{method:o},n)).pipe($l((t=>({response:t.data,actionInPayload:e}))),Xl("Error occurred during ajax call at deleteDataObject Epic",n))},jI=e=>{let t=0,n=[];return e.pipe(Vl(it),Jl(100),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>FI(e))),Bl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,s=wc({...e,...r,actionMgrID:t});return n.push(s),n}return[]})),$l((()=>(1===n.length&&Kr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),sh(n),n=[],n))))},VI=e=>{const{dataViewID:t,dataViewParameters:n,context:r}=e,s={data_view_ID:t},{restApi:a,reqType:o}=_g("getDataObjectActions",s);return ji(pc(a,{method:o,body:{dataViewParameters:n}},r)).pipe($l((e=>({...e.data}))),Xl("Error occurred during ajax call at GET data object actions : ",e.context))},kI=e=>{let t=0,n=[];let r={};return e.pipe(Vl(ye),Jl(100),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>VI(e))),Bl((async e=>e&&e.type===Ee?(n.push(wc(e)),n):(r=e,[]))),$l((()=>(1===n.length&&Kr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t,r),sh(n),n=[],n))))},$I=[UI,e=>{let t=0,n=[];return e.pipe(Vl(ot),Jl(100),kl((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(t,!0,e),ql([])}return ql(e.payload).pipe(Bl((e=>Ql(e))),Bl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,s=wc({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r}=e,{containerItemID:s,isModalAction:a}=r,o=a?td.MODAL:td.PRIMARY,i={target:mt(o,s),containerItemID:s,context:s};return n.push(ng(Kh,i)),n})),$l((()=>(1===n.length&&Kr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),sh(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(Vl(ct),Jl(100),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>Zl(e))),Bl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,s=wc({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r,response:s,headers:a={}}=e,{containerName:o}=r,i=mt(o,r.context),c=Lc(i,o,r.context),l={acName:i,context:c};await bc(s,r,l);const u=Rc(s,{target:i,context:c,containerItemID:c,headers:a});return u.resourceType=F.RESOURCE_TYPES.DATA,u.resourceStatus=F.RESOURCE_STATUS.UPDATE,u.key=JSON.stringify(r.requestPayload),n.push(ng(Fh,u)),n})),$l((()=>(1===n.length&&Kr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),sh(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Vl(lt),Jl(100),kl((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(t,!0,e),ql([])}return ql(e.payload).pipe(Bl((e=>eu(e))),Bl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,s=wc({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r}=e,{containerItemID:s,isModalAction:a}=r,o=a?td.MODAL:td.PRIMARY,i={target:mt(o,s),containerItemID:s,context:s};return n.push(ng(Kh,i)),n})),$l((()=>(1===n.length&&Kr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),sh(n),n=[],n))))})))},jI,kI,e=>{let t=0,n=[];return e.pipe(Vl(ut),Jl(100),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>tu(e))),Bl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,s=wc({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r,response:s,headers:a={}}=e,{containerName:o,actionID:i,context:c,actionName:l}=r,u=mt(o,r.context);let d=H(o,c);d=K(c,d);const p={target:u,context:d,containerItemID:d,headers:a,resourceType:F.RESOURCE_TYPES.DATA,resourceStatus:F.RESOURCE_STATUS.OPEN_FLOW_ACTION,key:JSON.stringify(r.dataViewParameters),actionID:i,actionName:l},h={acName:u,context:c};await bc(s,r,h);const g=Rc(s,p);return n.push(ng(Fh,g)),n})),$l((()=>(1===n.length&&Kr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),sh(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Vl(dt),Jl(100),kl((e=>{const{isFormValid:r}=e.payload;({actionMgrID:t}=e.payload);const s=e.payload.context;if(!r){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(t,!0,e),ql([])}return qn({context:s,stateObj:ah(s),clearContextMessages:!0}),ql(e.payload).pipe(Bl((e=>nu(e))),Bl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,s=wc({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r,response:s,headers:a={}}=e,{containerName:o,containerItemID:i,resourceType:c,key:l}=r,u=mt(o,r.context),d={acName:u,context:r.context};await bc(s,r,d);const p={key:l,target:u,resourceType:c,containerItemID:i,headers:a,context:r.context};return n=((e,t,n,r)=>{const{resourceType:s,key:a,containerItemID:o}=r,i=Rc(n,t);i.resourceType=s||F.RESOURCE_TYPES.DATA;const c=X(o);e.push(ng(Kh,i));const l=ch(".dataContext","dataInfo",c),u=ch(".dataContextParameters","dataInfo",c),d={context:c,skipSemanticUrl:!0,resourceType:s,parentAction:dt,dataContext:l,dataContextParameters:u},p=l&&u&&Eg(Ve,{pageName:j.PY_DETAILS,dataViewName:l},u)||"";if(o?.includes(j.PREVIEW)){const t={type:re,payload:{pageName:j.VIEW_NAMES.PY_DATA_PREVIEW,container:j.PREVIEW,containerName:j.PREVIEW,...d}};e.push(t)}else if(s!==j.PAGE&&a===p&&o?.includes(j.PRIMARY)){const t={type:re,payload:{pageName:j.VIEW_NAMES.PY_DETAILS,containerName:"",...d}};e.push(t)}return e})(n,p,s,{key:l,resourceType:c,containerItemID:i}),n})),$l((()=>(1===n.length&&Kr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),sh(n),n=[],n))))})))}],BI=$I;function GI(e,t){return void 0===t&&(t=yI),vi((function(n,r){var s=null,a=null,o=null,i=function(){if(s){s.unsubscribe(),s=null;var e=a;a=null,r.next(e)}};function c(){var n=o+e,a=t.now();if(a<n)return s=this.schedule(void 0,n-a),void r.add(s);i()}n.subscribe(xi(r,(function(n){a=n,o=t.now(),s||(s=t.schedule(c,e),r.add(s))}),(function(){i(),r.complete()}),void 0,(function(){a=s=null})))}))}const{RESOURCE_TYPES:{CASE:WI,DATA:HI}}=F;let qI=[],zI=!1;const YI={},KI=[e=>e.pipe(Vl(Ie),GI(200),$l((e=>e.payload)),Bl((e=>{zI=!1,Br.subscribe(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{zI=!0}));const t=ec.getPreviewMode()&&nc.addDebugHeaders({debugId:Eh.generateUniqueID()});YI.dataContext=e.payload.dataViewName,YI.dataContextParameters=e.payload.dataViewKeys;const{context:n,requestType:r,routeKey:s}=e;let{routeEndpoint:a}=e;a=a&&a.indexOf("viewType={viewType}")>0?a.replace("{viewType}","page"):a&&a.indexOf('viewType=""')>0?a.replace('viewType=""','viewType="page"'):a;const o=E()+a,i=e.options.context;let c;const l={},u=e?.payload?.caseClassName;if($.isRemoteCase(u)){const{RemoteSystemID:e}=$.getRemoteCase(u);l.RemoteSystemID=e}if("POST"===r){c=e.payload,a.indexOf("viewType=")<0&&(a=`${a}?viewType=page`);let i;switch(Bc(s)){case WI:i={caseTypeID:c.caseTypeID,processID:c.processID,content:{}};break;case HI:i=YI;break;default:i=c}return ji(pc(o,{method:r,body:i,headers:{...l,...t}},n)).pipe($l((t=>({response:{...t.data},payload:e,headers:Pc(t.headers)}))),Xl(": Error occurred during ajax call at historyEpic : ",e))}return ji(pc(o,{method:"GET",headers:{...l,...t}},i.substring(0,i.lastIndexOf("/")))).pipe($l((n=>({response:n.data,payload:e,headers:{...Pc(n.headers),...t}}))))})),Bl((async e=>{if(zI)return qI;if(Br.subscribe(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{zI=!0})),e&&e.type===Ee)return wc(e);const{headers:t={},response:n,payload:r}=e,s=Sm(n,{[F.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),a=r.options.acName,o=_d(a)&&Cd(a)?pd(a):e.payload.options.context,i=o;t.RemoteSystemID=r?.payload?.RemoteSystemID;const c={target:a,context:o,containerItemID:i,headers:t,debugInfo:{debugId:t[j.COREHEADER_APP_DEBUG_ID]}};let l="";const u=r?.payload?.page;let d=r?.payload?.pageClass;r.payload&&r.payload.caseName&&r.payload.workID&&(l=Eg(Be,{caseName:e.payload.payload.caseName}),l=l&&l.replace("{workID}",e.payload.payload.workID)||"",d=r?.payload?.caseClassName),Br.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:u,pageClass:d});const p=Eh.getIn(s,j.LOCALE_REFERENCES);await up.loadLocaleResources(p);const h=Eh.getIn(s,j.COMPONENTS);h&&await Fr(h),xr(s,r.options.actionConfig,!0),Br.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:a,pageName:u,pageClass:d});let g=Rc(s,c);return g=((e,t,n)=>{if(e===Cc.CASE){if(t?.caseInfo?.assignments&&t?.caseInfo?.assignments.length>0){const{key:e,flowName:r}=vc(t.caseInfo.assignments[0].ID);n.key=e||t.caseInfo.ID,n.flowName=r}else n.flowName="",n.key=t?.caseInfo?.ID||t.semanticURL;n.resourceType=e,n.semanticURL=t.semanticURL,n.caseViewMode=j.REVIEW_MODE}else n.resourceType=e,n.semanticURL=t.semanticURL;return n})(Bc(e.payload.routeKey),{...n.data,semanticURL:l,caseViewMode:j.REVIEW_MODE},g),qI.push(Mc(a,g)),$c(qI),qI})),$l((()=>(zI||sh(qI),qI=[],zI=!1,qI))),Xl("Error occurred"))],XI=[e=>{let t=0,n=[];return e.pipe(Vl(se),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>{const{context:t,skipSemanticUrl:n=!1,insightID:r}=e;let s="";n||(s=Eg(ke,{insightID:"{insightID}"}),s=s.replace("{insightID}",r));const{restApi:a,reqType:o}=_g(ke,{insightID:r});return ji(pc(a,{method:o},t)).pipe($l((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:s,semanticURL:s},actionConfig:e,skipSemanticUrl:n}})),Xl(": Error occurred during ajax call at showPage Epic : ",e.context))})),Bl((async e=>{if(e&&e.type===Ee)return n.push(wc(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,s=Vr.getTargetViewContainerName(ne),a=mt(s,t.context),o=Lc(a,s,t.context),{response:i}=e,c=Sm(i);c.directUrlUpdation=!r;const l={acName:a,context:o},u=!r,d=r;await bc(c,t,l,u,d);const p=Rc(c,{target:a,context:o,containerItemID:o});p.resourceType=F.PAGE;const h=Mc(a,p);return n.push(h),$c(n),n})),$l((()=>{ln.resolveActionByID(t),sh(n),n=[]})),OI())}],JI=[e=>{let t=0,n=[];return e.pipe(Vl(ae),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>{const{context:t,skipSemanticUrl:n=!1,dashboardID:r}=e;let s="";n||(s=Eg($e,{dashboardID:r}),s=s.replace("{dashboardID}",r));const{restApi:a,reqType:o}=_g($e,{dashboardID:r});return ji(pc(a,{method:o},t)).pipe($l((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:s,semanticURL:s},actionConfig:e,skipSemanticUrl:n}})),Xl(": Error occurred during ajax call at showPage Epic : ",e.context))})),Bl((async e=>{if(e&&e.type===Ee)return n.push(wc(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,s=Vr.getTargetViewContainerName(ne),a=mt(s,t.context),o=Lc(a,s,t.context),{response:i}=e,c=Sm(i);c.directUrlUpdation=!r;const l={acName:a,context:o},u=!r,d=r;await bc(c,t,l,u,d);const p=Rc(c,{target:a,context:o,containerItemID:o});p.resourceType=F.PAGE;const h=Mc(a,p);return n.push(h)})),$l((()=>{ln.resolveActionByID(t),sh(n),n=[]})),OI())}],QI=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Am.apply(void 0,e.map((function(e){var n=e.apply(void 0,t);if(!n)throw new TypeError('combineEpics: one of the provided Epics "'+(e.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return n})))};try{Object.defineProperty(n,"name",{value:"combineEpics("+e.map((function(e){return e.name||"<anonymous>"})).join(", ")+")"})}catch(e){}return n}(...Rm,...bI,...wI,...KI,...BI,...Om,...[e=>{let t=0;return e.pipe(Vl(Ze),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),$l((()=>{const e=rh()?.getState(),n=Im();return h()(e,n)&&t>0?ln.resolveActionByID(t,{}):ln.rejectActionByID(t),[]})),OI())}],...XI,...JI),ZI=()=>e=>t=>{const{type:n="",payload:r={}}=t||{},{category:s,context:a,transientItemID:o}=r;"HTTP"!==s&&[Se,xe,Ce,Me,Ne,Oe].includes(n)&&(Qc(a||o),Pn.removeContextTreeNode(a||o)),e(t)},eE={},tE=e=>{const t=Eh.getIn(eE,[j.CONTEXT,e],[]),n=[];t.forEach((t=>{const r=t.substr(0,t.lastIndexOf("_")),s=Eh.getIn(eE,[r,t],[]),a=s&&s.length>0&&s.indexOf(e);if(a>-1&&s.splice(a,1),!s||s&&0===s.length){Eh.deleteIn(eE,[r,t]);const e=Eh.getIn(eE,[r]);e&&0===Object.keys(e).length&&Eh.deleteIn(eE,[r]),n.push({dataPageName:r,dataPageNameWithHash:t})}})),Eh.deleteIn(eE,[j.CONTEXT,e]);const r=Eh.getIn(eE,[j.CONTEXT]);(!r||r&&0===Object.keys(r).length)&&Eh.deleteIn(eE,[j.CONTEXT]),n.length>0&&sh(ag({dataPagesToBeRemoved:n}))},nE=(e={},t)=>{Object.keys(e).forEach((n=>{const r=Eh.getIn(e,[n],{});Object.keys(r).forEach((e=>{((e,t,n)=>{const r=Eh.getIn(eE,[j.CONTEXT,n]);if(Eh.getIn(eE,[e])){const r=Eh.getIn(eE,[e,t],[]);Eh.setIn(eE,[e,t],[...new Set([...r,n])])}else Eh.setIn(eE,[e,t],[n]);r?Eh.setIn(eE,[j.CONTEXT,n],[...new Set([...r,t])]):Eh.setIn(eE,[j.CONTEXT,n],[t])})(n,e,t)}))}))},rE=()=>e=>t=>{const{payload:{data:n={},context:r=null,childContainersContexts:s=[]}={},type:a}=t;if(s&&s.length>0&&(a===Me||a===Ce)&&s.forEach((e=>{tE(e)})),a===Se||a===fe||a===tt){const e=a===tt?n:n.shared;nE(e,r)}else a===Me?(tE(r),nE(n.shared,r)):a===Ce&&tE(r);e(t)},sE=e=>t=>n=>{const{type:r,payload:{target:s,containerItemID:a,context:o,childContainersContexts:i=[],containerInfo:{newAccessedOrder:c,containerType:l}={}}={}}=n,{PUB_SUB_EVENTS:u}=F;if(r===Ce){const{resourceType:t,key:n,context:r}=Eh.getIn(e.getState(),["containers",s,"items",a])||{},o={resourceType:t,key:n,context:r,containerItemID:a};Br.publish(u.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,o),s===`${F.APP.APP}/${j.PRIMARY}`&&l===j.CONTAINER_TYPE.MULTIPLE&&Br.publish(u.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:n,newAccessedOrder:c})}i&&i.length>0&&(r===Me||r===Ce)&&i.forEach((e=>{Du.cleanCaches(e)})),r!==Me&&r!==Ce||Du.cleanCaches(o),t(n)},aE=()=>e=>t=>{const{payload:{context:n=null,transientItemID:r=null}={},type:s}=t;!n||s!==Se&&s!==xe&&s!==Me&&s!==Ce||(yr(n),gr(n)),r&&s===Re&&(yr(r),gr(r)),e(t)},oE=function(e){void 0===e&&(e={});var t,n=new(0,Jg.constructor)(Jg.schedulerActionCtor),r=new Zg,s=function(s){t=s;var a=new Zg,o=new Zg,i=a.asObservable().pipe(Mi(n)),c=new nf(o.pipe(Mi(n)),t.getState());return r.pipe($l((function(t){var n=t(i,c,e.dependencies);if(!n)throw new TypeError('Your root Epic "'+(t.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return n})),Bl((function(e){return ji(e).pipe(Li(n),Mi(n))}))).subscribe(t.dispatch),function(e){return function(n){var r=e(n);return o.next(t.getState()),a.next(n),r}}};return s.run=function(e){r.next(e)},s}(),iE=e=>{const t=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Gg;if(null!==rh())yh();else{const n=$g(Em(e),t(rf.reduxBatch,function(...e){return t=>(n,r)=>{const s=t(n,r);let a=()=>{throw new Error(Ug(15))};const o={getState:s.getState,dispatch:(e,...t)=>a(e,...t)},i=e.map((e=>e(o)));return a=Gg(...i)(s.dispatch),{...s,dispatch:a}}}(Rl,ZI,rE,aE,oE,sE),rf.reduxBatch));oE.run(QI),nh(n)}};const cE=new class{#I;constructor(){this.userSettings={},this.componentCache={},this.contextMapToClearOnCancel={},this.#I=!1}getNormalizedKey(e){return e?.toString().trim().replace(/\s/g,"-").toLowerCase()}setComponentState=(e,t)=>{sessionStorage?sessionStorage.setItem(this.getNormalizedKey(e),JSON.stringify(t)):console.error("Session Storage not found")};getComponentState=e=>{const t=sessionStorage.getItem(this.getNormalizedKey(e)),n=t?Eh.isValidJson(t):void 0;return n||t};removeComponentState=e=>{sessionStorage.removeItem(this.getNormalizedKey(e))};fetchUserSettings=async()=>{if(Bm("getUserSettings")){const{restApi:e,reqType:t}=_g("getUserSettings");pc(e,{method:t,headers:{}}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong while fetching getUserSettings");this.userSettings=e.data})).catch((e=>console.error(e)))}};init=()=>{cp.getUserSettings()?this.userSettings=cp.getUserSettings():this.fetchUserSettings()};getUserSettings=e=>{if(!e)throw new Error("path is required parameter");if("string"!=typeof e)throw new TypeError("path must be string");return Eh.getIn(this.userSettings,e,{})};setUserSettings=async(e,t)=>{if(!e)return Promise.reject(new Error("path is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("path must be string"));if(null==t||""===t)return Promise.reject(new Error("value is required parameter"));let n;if(!Bm("updateUserSettings"))return Promise.resolve("updateUserSettings route is not available");n=_g("updateUserSettings");const{restApi:r,reqType:s}=n;return pc(r,{method:s,body:Eh.setIn({},e,t)}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong");this.userSettings=e.data})).catch((e=>{console.error(e)}))};setComponentCache(e,t,n={}){if("string"!=typeof e||!e?.trim())return;const r=n.clearOnCancelForContext;if(r&&(Object.hasOwn(this.contextMapToClearOnCancel,r)?this.contextMapToClearOnCancel[r].add(this.getNormalizedKey(e)):this.contextMapToClearOnCancel[r]=new Set([this.getNormalizedKey(e)])),this.componentCache[this.getNormalizedKey(e)]=t,!this.#I){this.#I=!0;const e=e=>{const{context:t}=e||{};(this.contextMapToClearOnCancel[t]||new Set).forEach((e=>{this.resetComponentCache(e)})),delete this.contextMapToClearOnCancel[t]};Br.subscribe(j.PUB_SUB_EVENTS.EVENT_CANCEL,e,"RESET_COMPONENT_CACHE")}}getComponentCache(e){return"string"==typeof e&&e?.trim()?Object.hasOwn(this.componentCache,this.getNormalizedKey(e))?this.componentCache[this.getNormalizedKey(e)]:void 0:null}resetComponentCache(e){return!("string"!=typeof e||!e?.trim())&&(!!Object.hasOwn(this.componentCache,this.getNormalizedKey(e))&&(delete this.componentCache[this.getNormalizedKey(e)],!0))}},lE={publishConstellationLoadedEvent:()=>{Br.publish(j.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})}};const uE=new class{activateContainerItemOnSwitch(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n={target:t,containerItemID:ld(t,e)};Xu({}).getPConnect().getContainerManager().activateContainerItem(n)}removeContainerItemOnClose(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n={target:t,containerItemID:ld(t,e)};Xu({}).getPConnect().getContainerManager().removeContainerItem(n)}showCasePreview(e,t){Xu({}).getPConnect().getActionsApi().showCasePreview(e,{caseClassName:t})}closeCasePreview(){Xu({}).getPConnect().getContainerManager().resetContainers({name:j.PREVIEW,context:j.APP.APP})}isFormDirty(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n=Yd(t,e);return Yc.isStateModified(n)}getEventUtils(){return lE}getBroadcastUtils(){return xm}isTraditionalUICase(e){return cs(e)}};const dE=class{static openCase(e,t=F.APP.APP,n={}){return n.renderInline=!0,n.pageName?cp.setDefaultCasePage(n.pageName):(cp.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?cp.disableAssignmentHeader(n.disableAssignmentHeader):cp.disableAssignmentHeader(!1),Fu.openCase(e,t,j.PRIMARY,n)}static createCase(e,t=F.APP.APP,n={}){return n.renderInline=!0,n.pageName?cp.setDefaultCasePage(n.pageName):(cp.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?cp.disableAssignmentHeader(n.disableAssignmentHeader):cp.disableAssignmentHeader(!1),Fu.createCase(e,t,j.PRIMARY,n)}static getNextWork(e=F.APP.APP,t={}){return t.renderInline=!0,t.pageName?cp.setDefaultCasePage(t.pageName):(cp.setDefaultCasePage(j.PY_DETAILS),t.pageName=j.PY_DETAILS),t?.disableAssignmentHeader?cp.disableAssignmentHeader(t.disableAssignmentHeader):cp.disableAssignmentHeader(!1),Fu.getNextWork(e,j.PRIMARY,t)}static openAssignment(e,t=F.APP.APP,n={}){return n.renderInline=!0,n.pageName?cp.setDefaultCasePage(n.pageName):(cp.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?cp.disableAssignmentHeader(n.disableAssignmentHeader):cp.disableAssignmentHeader(!1),Fu.openAssignment(e,t,j.PRIMARY,n)}static openPage(e,t,n=F.APP.APP,r={}){const s=ne;r?.defaultCasePage?cp.setDefaultCasePage(r.defaultCasePage):cp.setDefaultCasePage(j.PY_DETAILS),r?.disableAssignmentHeader?cp.disableAssignmentHeader(r.disableAssignmentHeader):cp.disableAssignmentHeader(!1);const a={viewName:e,className:t,acTargetName:j.PRIMARY,actionMgrID:ln.getNextActionMgrId(),context:n},{promise:o}=ln.actionManagerPromise(s,a.actionMgrID);return sh({type:s,payload:{...a}}),o}static getCurrentContextAPI(e,t=F.APP.APP){return Xu({meta:{config:{}},options:{context:t,pageReference:e,containerName:j.PRIMARY}}).getPConnect()}};const pE=new class{createC11nEnv=e=>Xu(e);getContextUtils=()=>e;getRoutingManager=()=>t;getComponentsRegistry=()=>Xt;getStateManager=()=>c;getActionCreators=()=>l;getStreamObservable=()=>r;getActionProcessor=()=>Nh;getActionHandler=()=>Th;renderApp=(e,t)=>{const n={context:j.APP.APP},r={...Eh.getIn(e,j.ROOT),options:n};iE(e),xr(e,n,!0);const s=this.createC11nEnv({meta:r,isRoot:!0});Br.publish(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:s,domContainerID:t})};updateStoreWithUiRoot=async(e,t,n)=>{const r=Sm(e),{data:s,uiResources:a={}}=e,o=Eh.getIn(a,j.CONTEXT_DATA);await bc(r,{},{},!1,!0);const i={...s,[j.CONTEXT_DATA]:o},{root:c}=a;xd(c,t,i,n)};fetchEndPointResource=(e,t,n)=>{pc(e,{method:"GET"},j.APP.ROOT).then((async e=>{const{data:r,status:s}=e;200===s&&this.updateStoreWithUiRoot(r,t,n)}))};loadComponent=async(e,t,n)=>Fr(n).then((()=>{const n=this.createC11nEnv({meta:e,isRoot:!0});rh()||iE({}),Br.publish(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:n,domContainerID:t})}));setStaticServerUrl=(e,t,n)=>{Mr.initServer(e,t,n)};loadView=async(e,t,n=[])=>{y();const r=Sm(e),s=Eh.getIn(r,j.VIEWS),a=Eh.getIn(r,j.NAVIGATIONS),o=Eh.getIn(r,j.COMPONENTS)||[];o.push(...n);const i=Eh.getIn(r,j.STATIC_SERVER_URL),c=Eh.getIn(r,j.APPLICATION_DATA);s&&wp(s),a&&Mp(a),(e=>{e&&(fg=e.pyLabel)})(c),i&&Mr.initServer(i),await Fr(o,i).then((()=>this.renderApp(r,t)))};initAppShell=(e,t,n)=>{Mg(e),Vr.buildActionTargetMap(t),y(n)};initRoutingTable=(e,t)=>{Mg(e,!0),y(t)};setAppAlias=e=>{Mr.setAppAlias(e)};getHomeRestApi=e=>{const{restApi:t}=Ag("home",{portalName:e});return E()+t};getViewRestApi=(e,t)=>{const{restApi:n}=((e,t)=>{let n={restApi:""};try{if(xg()&&!t){const t=sp(),r=ip.processUrl(t,!0),s=ip._getMatchedRouteInRoutingTable(r)||"",a=ip.getRoutingInfo(),o=ip.processUrl(t,!1).split("/"),i=o[o.length-1];let{caseID:c}=a&&a.routes[s].payload;c=c.replace("{workID}",i),n=ip.getRestEndPoint("loadView",{caseID:c,viewID:e})||{}}else n=ip.getRestEndPoint("showView",{page:e,pageClass:t})||{}}catch(e){}return n})(e,t);return E()+n};loadRootComponent=async(e,t,n=[],r,s,a)=>{const{config:{name:o}={}}=t;rh()||iE({}),a&&(Bd(`${j.APP.ROOT}/${o}`),$d().deleteContainerItem(`${j.APP.ROOT}/${o}`)),$d().getContainerItems()?.length>1&&!o?.startsWith("hybrid_")&&"authoring-preview"!==o&&yh(),sh(bh({data:{},context:j.APP.ROOT}));const i=this.createC11nEnv({meta:t,options:{context:j.APP.ROOT,pageReference:"",target:`${j.APP.ROOT}/${o}`}}),c=i.getPConnect(),l=c.getContextName(),u=c.getContainerName(),d=c.getContainerManager();pd(`${l}/${u}`)||"noPortal"===t.config?.renderingMode||d.initializeContainers({type:"single"});const p=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference",...n];return Fr(p).then((()=>{Br.publish(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:i,domContainerID:e,componentName:"RootContainer",portalTarget:r,styleSheetTarget:s})}))};loadViewByName=(e,t,n,r)=>{let s=this.getViewRestApi(e,n);s===E()&&(s=this.getHomeRestApi(t)),this.fetchEndPointResource(s,r)};loadPortalView=(e,t)=>{const n=this.getHomeRestApi(e);this.fetchEndPointResource(n,t,!0)};configureForBrowserBookmark=e=>{wg(e)};checkIfSemanticURL=()=>xg();onPCoreReady=e=>{Br.subscribe(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};setFieldsDefaultConfigs=e=>{Rr.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{_(e)};setFetchDefaultHeaders=e=>{yc(e)};setFetchAuthInfo=e=>{Ic(e)};getCaseApi=()=>Fu;getMashupApi=()=>dE;enableAppRouting=e=>{yg(e)};initStore=()=>iE({});getBootstrapConfig=async(e,t)=>{const n=`${t.token_type} ${t.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then((e=>e.json()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=Xu({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:t,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}}};const hE=new class{constructor(){this.runtimeParams={},this.runtimeParamsMap={}}setRuntimeParams(e){this.runtimeParams=e}getRuntimeParams(){return this.runtimeParams}setRuntimeParam(e,t){this.runtimeParamsMap[e]=t}getRuntimeParam(e){return this.runtimeParamsMap[e]}};const gE=class{constructor(e){this.appAlias=e.appAlias,this.appAliasWithoutServlet=e.appAliasWithoutServlet,this.googleMapKey=e.googleMapKey,this.staticContentServer=e.staticContentServer,this.appStaticContentServer=e.appStaticContentServer||null,this.contextPath=e.contextPath,this.messagingService=e.messagingService||null,this.reAuthUrl=e.reAuthUrl||null}};const fE=class{constructor(e){this.routingInfo=e.routingInfo,this.actionModel=e.actionModel,this.additionalHeaders=e.additionalHeaders,this.tokens=e.tokens,this.semanticUrl=e.semanticUrl,this.queryParams=e.queryParams,this.noPortal=e.noPortal,this.timezone=e.timezone,this.noHistory=e.noHistory,this.viewName=e.viewName,this.theme=e.theme,this.fieldDefaults=e.fieldDefaults,this.restServerConfig=e.restServerConfig,this.dynamicLoadComponents=void 0===e.dynamicLoadComponents||e.dynamicLoadComponents,this.dynamicSemanticUrl=void 0===e.dynamicSemanticUrl||e.dynamicSemanticUrl,this.enableRouting=void 0===e.enableRouting||e.enableRouting,this.locale=e.locale,this.environmentInfo=e.environmentInfo,this.renderingMode=e.renderingMode||"FULL_PORTAL",this.remoteCaseMapping=e.remoteCaseMapping||{},this.envType=e.envType,this.serviceConfig=new gE(e.serviceConfig),this.behaviorOverrides=e.behaviorOverrides,this.initBroadcast=!!e.initBroadcast,this.cookieComplianceMethod=e.cookieComplianceMethod??"none",this.isExtraCallRequiredForDefaultHome=e.isExtraCallRequiredForDefaultHome??"false"}},mE=async()=>{const e=cp.getLocale(),t=cp.getFeatureMap().localizationVersion||1;if("en-US"!==e)try{let n;n=2===t?[e]:[up.GENERIC_BUNDLE_KEY,up.MESSAGE_BUNDLE_KEY,up.FIELD_LABELS_BUNDLE_KEY];const r=n.map((async n=>{2===t?await(async e=>{const t=cp.getFeatureMap().availableLanguagePacks||[];if(!e||!t.includes(e))return void console.warn(`current locale ${e} is not supported by application.`);const n={locale:e},r=await km("getLocalizationPack",{queryPayload:n});if((201===r.status||200===r.status)&&r.data){const e=r.data;Object.keys(e).forEach((t=>{up.setLocaleForRule(e[t],t)}))}})(n):up.isCurrentLocalePackAvailable()&&await(async(e,t)=>{const n=await Mr.getSvcLocale(t,`${e}.json`);if(n.ok&&e){const t=await n.json();up.setLocaleForRule(t,e)}})(n,e)}));await Promise.allSettled(r)}catch(e){console.warn(e)}},yE="@P .viewConfig";let IE=0;const EE=new class{#E(e,t,n){Mg(e),Vr.buildActionTargetMap(t),y(n)}init(e){const t=new fE(e),n={...t.environmentInfo,renderingMode:t.renderingMode};yg(t.enableRouting),iE({}),cp.setTheme(t.theme),cp.setCookieComplianceMethod(t.cookieComplianceMethod),cp.setIsExtraCallRequiredForDefaultHome(t.isExtraCallRequiredForDefaultHome),Rr.updateFieldDefaults(t.fieldDefaults),nc.setDefaultHeaders(t.additionalHeaders),this.#E(t.routingInfo,t.actionModel,{server:t.restServerConfig,reAuthUrl:t.serviceConfig.reAuthUrl}),Mr.setAppAlias(t.serviceConfig.appAliasWithoutServlet||t.serviceConfig.appAlias),_(t.serviceConfig.googleMapKey),Mr.initServer(t.serviceConfig.staticContentServer,t.serviceConfig.appStaticContentServer,t.tokens.C11NB2S),up.setTimezone(t.timezone),cp.setEnvironmentInfo(n),cp.setLocale(t.locale),$.setRemoteCaseMapping(t.remoteCaseMapping),hu.setConnectionConfig({messagingService:t.serviceConfig.messagingService}),cE.init(),t.initBroadcast&&uE.getBroadcastUtils().init()}getBootstrapConfig=async(e,t)=>{const n=`${t.token_type} ${t.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then((e=>e.json()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=Xu({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:t,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}};importReactRoot=async()=>{const e=[];return pE.getComponentsRegistry().getComponent("ReactRoot").modules.forEach((t=>{e.push(t())})),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,t,n)=>{try{await function(e,t="true"){return new Promise(((n,r)=>{const s=document.createElement("script");s.setAttribute("type","text/javascript"),s.setAttribute("src",e),s.setAttribute("async",t),s.onload=n(),s.onerror=()=>r(new Error("Failed to load resource from Design System")),document.body.appendChild(s)}))}(`${e}component/project/${t}/designsystems/${n}/componentsmap.js?v=${Date.now()}`)}catch(e){console.log(e)}};buildSemanticUrl=(e,t,n,r,s)=>{const a=new URLSearchParams(t);let o=!1;"true"===n&&(o=!0);let i=null,c=null;if(e){e.startsWith("/")&&(e=e.substring(1));const t=e.split("/");i=t[0],t.length>1&&t[1]&&(c=t[1])}else o=!1;let l=r;i&&(l=`${l}/${i}`),c&&(l=`${l}/${c}`),o&&(a.has("noPortal")||a.append("noPortal","true"),c&&s&&a.append("view",s));const u=a.toString();return l+=u?`?${u}`:"",l};initCoreConfig=e=>{const{routingInfo:t,serviceConfig:n,semanticUrl:r,queryParams:s,noPortal:a,noHistory:o,viewName:i,theme:c,restServerConfig:l,dynamicLoadComponents:u=!0,dynamicSemanticUrl:d=!0,renderingMode:p="FULL_PORTAL",envType:h,extras:g}=e,{appAlias:f,contextPath:m}=n;let y=window.location.origin;const I={};if(void 0!==l&&(y=l),m&&(y=`${y}${m}`),f&&"LAUNCHPAD"!==h&&(y=`${y}/${f}`),e.restServerConfig=y,!0===d){const e=this.buildSemanticUrl(r,s,a,y,i);!o&&e&&window.history.pushState({},"home",e)}else if("HYBRID"!==p){let e=window.location.href;e.indexOf("?")>0&&(e=e.substring(0,e.indexOf("?")),window.history.pushState({},"home",e)),I.dynamicSemanticUrl=!1}else console.log(`renderingMode :${p}`);!0!==u&&(I.dynamicLoadComponents=!1);let E=null;if(f){const e=f.indexOf("/app/");E=e>=0?f.substring(e+1):f}if(Object.keys(I).length>0&&window.PCore.setBehaviorOverrides(I),e.appAlias=E,c){let t="object"==typeof c?c:null;if(null===t)try{t=JSON.parse(c)}catch{t={}}e.theme=t}const A={...t,domain:`${window.location.protocol}//${window.location.host}`,searchParams:window.location.search};e.routingInfo=A,e.initBroadcast="true"===cp.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence,!e.noPortal||"true"!==e.noPortal&&!0!==e.noPortal||(e.renderingMode="EMBED"),g?.cspNonce&&(window.__webpack_nonce__=g.cspNonce),this.init(e)};launchViewByName=(e,t,n,r,s,a,o,i)=>{IE+=1;const c=i||`mashup${IE}`,l={type:"RootContainer",config:{viewConfig:yE,renderingMode:"view",name:c}};pE.loadRootComponent(e,l,s,a,o).then((()=>pE.loadViewByName(t,n,r,c)))};launchView=(e,t,n=[],r,s,a,o)=>{IE+=1;const i="hybrid"===o?`hybrid_${IE}`:o;IE+=1;const c=i||`mashup${IE}`,l={type:"RootContainer",config:{viewConfig:yE,renderingMode:"portal",name:c}};hE.setRuntimeParams(r),pE.loadRootComponent(e,l,n,s,a).then((()=>pE.updateStoreWithUiRoot(t,c)))};launchPortal=(e,t,n,r=[])=>{IE+=1;const s=n||`portal${IE}`,a={type:"RootContainer",config:{viewConfig:yE,renderingMode:"portal",skeleton:"LoadingComponent",name:s}};r.push(a.config.skeleton),cp.isPortalLoaded=!0,pE.loadRootComponent(e,a,r).then((()=>pE.loadPortalView(t,s)))};launchMashup=(e,t=!0)=>{const n={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:"@ROUTING_INFO",name:"primary"}}]};if(t){const t=document.getElementsByTagName(e)[0]?.parentNode;if(t){const e=document.createElement("style");e.setAttribute("id","portal-less-styles"),e.innerHTML="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",t.appendChild(e)}}pE.loadRootComponent(e,n,[PCore.getConstants().LOAD_VIEW_STRING,"ViewContainer"]),window.parent!==window&&s(849)(`${window.PCore.getAssetLoader().getStaticServerUrl()}constellation-mashup-bridge.js`).then((e=>{e.mashup.init({resizing:"stretch"})}))};start=async(e,t)=>{const{appStaticContentServer:n}=e.serviceConfig,{ccV2LibId:r,environmentId:s,isAlternateDesignSystemEnabled:a,alternateDesignSystemName:o}=e;this.initCoreConfig(e);const i=async()=>(await this.importReactRoot(),r&&await Mr.importCustomComponentMap(r),"true"===a&&"other"!==o&&await this.importDesignSystemComponentMap(n,s,o),t&&t(),!0);return new Promise(((e,t)=>{mE().then((async()=>{const t=pE.getComponentsRegistry();"ReactRoot"in t.getLazyMap()?e(!0):t.getComponent("ReactRoot")?e(await i()):Br.subscribe("component-map-loaded",(async()=>{e(await i())}))})).catch((e=>{t(e)}))}))};registerForDebugInfo=e=>{PCore.getEnvironmentInfo().setPreviewMode(),e&&PCore.getPubSubUtils().subscribe("fetchSuccess",(({debugInfo:t})=>{const n=t?.["X-Pega-App-Debug-ID"];e.postMessage({appDebugID:n})}),"fetchSuccess")};toggleTracerHeaders=e=>{e.addEventListener("message",(async e=>{const t=e?.data?.enableTracer;t?PCore.getDebugger().enableTracer():PCore.getDebugger().disableTracer()}))};loadEnvironmentInfo=async e=>{if(e.theme&&(!window.pms||"Android"!==window.pms.device.systemName))try{const t=JSON.parse(e.theme.definition);PCore.getEnvironmentInfo().setBrandingInfo(t.Branding),PCore.getEnvironmentInfo().setTheme(t.Theme)}catch{PCore.getEnvironmentInfo().setBrandingInfo({}),PCore.getEnvironmentInfo().setTheme({})}e.keyMapping&&PCore.getEnvironmentInfo().setKeyMapping(e.keyMapping),PCore.getEnvironmentInfo().setCookieComplianceMethod(e.cookieComplianceMethod??"none")}},AE={createViewRule:(e,t)=>{const{restApi:n,reqType:r}=_g("createViewRuleByID");return pc(n,{method:r,body:e},t).then((e=>e.data))},getViewRule:(e,t)=>{const{restApi:n,reqType:r}=_g("getViewRuleByID",{ID:e});return pc(n,{method:r},t).then((e=>e.data))},updateViewRule:(e,t,n)=>{const{restApi:r,reqType:s}=_g("updateViewRuleByID",{ID:e});return pc(r,{method:s,body:t},n).then((e=>e.data))},deleteViewRule:(e,t)=>{const{restApi:n,reqType:r}=_g("deleteViewRuleByID",{ID:e});return pc(n,{method:r},t).then((e=>e.data))}},_E={"Content-Type":"application/json"},SE={addCaseFollower:(e,t,n)=>{const r={caseID:e},s=JSON.stringify({users:t.map((e=>({ID:e})))});return km("addCaseFollower",{body:s,queryPayload:r,headers:_E},n)},deleteCaseFollower:(e,t,n)=>km("deleteCaseFollower",{queryPayload:{caseID:e,followerID:t}},n),getCaseFollowers:(e,t)=>km("getCaseFollowers",{queryPayload:{caseID:e}},t).then((e=>e.data.followers))},CE={addRelatedCases:(e,t,n)=>{const r={caseID:e},s=JSON.stringify({cases:t});return km("addRelatedCases",{body:s,queryPayload:r},n)},removeRelatedCase:(e,t,n)=>km("removeRelatedCase",{queryPayload:{caseID:e,relatedCaseID:t}},n),getRelatedCases:(e,t)=>km("getRelatedCases",{queryPayload:{caseID:e}},t).then((e=>e.data.relatedCases))},TE="operatorDetails",NE={getOperatorDetails:(e,t=!1)=>{const{reqType:n}=_g(TE,{});if("GET"===n){const t={encodedOperatorId:encodeURIComponent(`{"opname":"${e}"}`)};return km(TE,{queryPayload:t})}return t?km("operatorDetailsByBusinessID",{body:{dataViewParameters:{BusinessID:e}}}):km(TE,{body:{dataViewParameters:{ID:e}}})}},PE=async e=>{const t=Sm(e),n=Eh.getIn(t,j.COMPONENTS);xr(t,{},!0);const r=Eh.getIn(t,j.LOCALE_REFERENCES);await up.loadLocaleResources(r||[]),await Fr(n)},DE=(e,t,n)=>Ch.resolveView(e,t,n),RE={"Content-Type":"application/json"};const bE=new class{constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,t,n,r,s,a,o)=>{const{getLocaleValue:i}=up;o||(this.mentions=[]);let c="";r&&Array.isArray(r)&&r?.length>0&&(r.forEach((e=>{e.on&&(c=`${c}${e.id},`)})),""===c&&(c="ClearFilters"));let l="";o&&(l=a.getValue("pulse.pageLastEntry"));const u={filterForContext:e,feedID:t,feedClass:n,filterBy:c,pageSize:10,olderThan:l};for(let e=0;e<s.length;e+=1)s[e].cancel();const d=Gm();return s.push(d),km("getFeedMessages",{queryPayload:u,cancelTokenSource:d},a.getContextName()).then((async e=>{if(200===e.status&&e.data){s.pop();const t=[],n={};let c=!1;if(e?.data){if(e?.data?.data?.FeedList){const r=e.data.data.FeedList?.pxResults;Array.isArray(r)&&r?.length>0&&r.forEach(((e,r)=>{e.ID=""!==e.pzInsKey?e.pzInsKey:`message${r}`,t.push(e.ID),n[e.ID]=e,e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions)})),c||"pzPostDetails"===e.pyMessageViewReference||"pzPrivatePostDetails"===e.pyMessageViewReference||(c=!0)}))}if(c&&await PE({uiResources:e.data.uiResources}),!r&&(r=[{id:"All",label:i("All","Pulse"),on:!0,disabled:!1}],e?.data?.data?.FeedFilters)){const t=e.data.data.FeedFilters?.pxResults;let n=!0;t&&Array.isArray(t)&&t?.length>0&&(t.forEach((e=>{const t={id:e.pyFeedSourceReference,label:i(e.pyLabel,"Pulse"),disabled:!1,on:"true"===e.pySelected};t.on||(n=!1),r.push(t)})),r.find((e=>"All"===e.id)).on=n)}}if(o&&a.getValue("pulse.messageIDs")){let r=a.getValue("pulse.messageIDs"),s=a.getValue("pulse.messages");r=[...r,...t],s={...s,...n},Object.values(s).forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions)}))})),a.updateState({pulse:{messages:s,messageIDs:r,nextPageFirstEntry:e?.data?.nextPageFirstEntry||"",pageLastEntry:e?.data?.pageLastEntry||"",hideAttachment:e?.data?.hideAttachment||!1}})}else a.updateState({pulse:{messages:n,messageIDs:t,nextPageFirstEntry:e?.data?.nextPageFirstEntry||"",pageLastEntry:e?.data?.pageLastEntry||"",hideAttachment:e?.data?.hideAttachment||!1}});const l=[...new Map(this.mentions.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.prototype.hasOwnProperty.call(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[];return{feedFilters:r,caseMentions:l}}return a.reportError(`getFeeds call failed ${e.status}`,e.data),""})).catch((e=>{Wm(e)||a.reportError(": Error occurred during ajax call at getFeeds API : ",e.response)}))};postMessage=(e,t,n=[],r=!1,s)=>{const a=JSON.stringify({context:e,parentMessageId:r?e:"",message:t,attachments:n});return km("postFeedMessages",{body:a,headers:RE},s.getContextName()).then((t=>{if((201===t.status||200===t.status)&&t.data){const a=t?.data;if(r){a.parentMessageID=e;const{pxResults:t,caseMentions:o}=this.buildMessageObject(a,r,s,n.length>0);return s.updateState({pulse:{messages:{[e]:{pxResults:t}}}}),o}const{messages:o,messageIDs:i,caseMentions:c}=this.buildMessageObject(a,r,s,n.length>0);return s.updateState({pulse:{messages:o,messageIDs:i}}),c}return s.reportError(`postMessage call failed with status ${t.status}`,t),""})).catch((e=>{s.reportError(": Error occurred during ajax call at postMessage API : ",e.response)}))};editMessage=({messageID:e,parentMessageID:t,message:n,c11nEnv:r,isReply:s=!1})=>{const a=JSON.stringify({message:n});return km("editFeedMessage",{queryPayload:{messageID:e},body:a,headers:RE},r.getContextName()).then((e=>{if(200===e?.status&&e?.data){const n=e?.data;if(s){n.parentMessageID=t;const{pxResults:e,caseMentions:a}=this.buildMessageObject(n,s,r,!1);return r.updateState({pulse:{messages:{[t]:{pxResults:e}}}}),a}const{messages:a,caseMentions:o}=this.buildMessageObject(n,s,r,!1);return r.updateState({pulse:{messages:a}}),o}return r.reportError(`editMessage call failed with status ${e.status}`,e),""})).catch((e=>{r.reportError(": Error occurred during ajax call at editMessage API : ",e.response)}))};buildMessageObject=(e,t,n,r=!1)=>{const s={ID:e?.ID||"",tags:e?.tags||[],pyHasAttachment:r,pzInsKey:e?.ID||"",pyMessage:e?.message||"",mentions:e?.mentions||[],postedByUser:e?.postedByUser,pxCreateDateTime:e?.postedTime||"",pxUpdateDateTime:e?.updatedTime||"",parentMessageID:e?.parentMessageID||"",pyIsEdited:"string"==typeof e?.isEdited?"true"===e?.isEdited:e?.isEdited||!1,pyFeed:{pyPostedOn:e?.postedTime||"",pyFeedTitle:e?.postedByUser?.name||"",pyIconType:"user",pyCommentContext:"pzInsKey",pyIconReference:"pi pi-case"},pyContext:"",pxIcon:"globe",pyMessageViewReference:"pzPostDetails"},a=n.getValue("pulse.messages");if(t){let{pxResults:e=[]}=Object.values(a)?.find((e=>e?.ID===s?.parentMessageID))||{};const t=e?.findIndex((e=>e?.pzInsKey===s?.ID));if(-1!==t){const n=[...e];n[t]={...n[t],...s},e=n}else e=[...e,s];return{pxResults:e,messages:{},messageIDs:[],caseMentions:this.getCaseMentions(e)}}const o=n.getValue("pulse.messageIDs");if(o){const e=o.includes(s.ID)?{...a[s.ID],...s}:s,t={...a,[s.ID]:e};return{messages:t,messageIDs:o.includes(s.ID)?o:[s.ID,...o],caseMentions:this.getCaseMentions(Object.values(t))}}};getCaseMentions=e=>{const t=e?.filter((e=>e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0))?.map((e=>e.mentions))?.concat(this.mentions);return[...new Map(t.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.prototype.hasOwnProperty.call(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[]};likeMessage=({pulseContext:e,likedBy:t,messageID:n,isReply:r,c11nEnv:s})=>{const a=t?"unlikeFeedMessages":"likeFeedMessages",o=JSON.stringify({ContextClass:e});km(a,{body:o,queryPayload:{pulseContext:e},headers:RE},s.getContextName()).then((a=>{if(200===a.status)if(r){const r=s.getValue(`pulse.messages.${n}`),a=r?.pxResults&&Array.isArray(r?.pxResults)&&r.pxResults?.length>0&&r.pxResults?.map((n=>{if((n={...n}).pzInsKey===e){let e=0,r=!1;const s=n.pyLikes?n?.pyLikes?.pxLikeCount:0;t?(e=s-1,r=!1):(e=s+1,r=!0),n.pyLikes={pxLikeCount:e,pxIsLiked:r}}return n}));s.updateState({pulse:{messages:{[n]:{pxResults:a}}}})}else{const r={...s.getValue(`pulse.messages.${n}`)},a=r.pyLikes?r.pyLikes.pxLikeCount:0;let o=0,i=!1;t?(o=a-1,i=!1):(o=a+1,i=!0),r.pyLikes={pxLikeCount:o,pxIsLiked:i},s.updateState({pulse:{messages:{[e]:r}}})}else s.reportError(`likeMessage call failed with status ${a.status}`,a)})).catch((e=>{s.reportError(": Error occurred during ajax call at likeMessage API : ",e.response.data)}))};deleteMessage=(e,t,n,r)=>{let s=e;t&&(s=n);km("deleteFeedMessage",{queryPayload:{messageID:s}},r.getContextName()).then((s=>{if(200===s.status)if(t){const t=r.getValue(`pulse.messages.${e}`),s=t?.pxResults&&Array.isArray(t?.pxResults)&&t.pxResults?.length>0&&t.pxResults?.filter((e=>e.pzInsKey!==n));r.updateState({pulse:{messages:{[e]:{pxResults:s}}}})}else{const t=r.getValue("pulse.messageIDs"),n=t&&Array.isArray(t)&&t?.length>0&&t?.filter((t=>t!==e)),s={...r.getValue("pulse.messages")};delete s[e],r.updateState({pulse:{messageIDs:n,messages:s}})}else r.reportError(`deleteMessage call failed with status ${s.status}`,s)})).catch((e=>{r.reportError(": Error occurred during ajax call at deleteMessage API : ",e.response)}))};getLikedUsers=(e,t)=>km("getFeedMessageLikes",{queryPayload:{messageID:e}},t.getContextName()).then((e=>e?.data?.users)).catch((e=>{t.reportError(": Error occurred during ajax call at getLikedUsers API : ",e.response)}));getMentionSuggestions=(e,t)=>{const{pulseContext:n,searchFor:r,mentionsType:s,listSize:a=5}=e,o={pulseContext:n,searchFor:r,mentionsType:s,listSize:a};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const i=Gm();return this.mentionsTagsCancelTokenSource.push(i),km("getMentionSuggestions",{queryPayload:o,cancelTokenSource:i},t.getContextName()).then((e=>(this.mentionsTagsCancelTokenSource=[],200===e.status&&e.data?e?.data:(t.reportError(`Get mention suggestions call failed ${e.status}`,e.data),[])))).catch((e=>{Wm(e)||t.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",e.response.data)}))};getMentionTypes=e=>km("getMentionTypes",{},e.getContextName()).then((e=>e?.data)).catch((t=>{e.reportError(": Error occurred during ajax call at getMentionTypes API : ",t.response.data)}));getTagSuggestions=(e,t)=>{const{searchFor:n,listSize:r=5}=e,s={searchFor:n,listSize:r};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const a=Gm();return this.mentionsTagsCancelTokenSource.push(a),km("getTagSuggestions",{queryPayload:s,cancelTokenSource:a},t.getContextName()).then((e=>{this.mentionsTagsCancelTokenSource=[];let n=[];return 200===e.status&&e?.data?n=e?.data?.tags&&Array.isArray(e?.data?.tags)&&e.data.tags.length>0&&e.data.tags?.map((e=>`#${e}`)):t.reportError(`Get tag suggestions call failed ${e.status}`,e.data),n})).catch((e=>{Wm(e)||t.reportError(": Error occurred during ajax call at getTagSuggestions API : ",e.response.data)}))}},OE={getTaggedCases:(e,t)=>km("loadView",{queryPayload:{caseID:e,viewID:"pyTaggedCases"}},t.getContextName()).then((e=>e?.data)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)})),getTags:(e,t)=>km("getCaseTags",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.tagsList)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTags API : ",e.response)})),postTags:(e,t,n)=>{const r={caseID:e},s=JSON.stringify({tags:t});return km("addTagsToCase",{body:s,queryPayload:r},n.getContextName()).then((e=>e?.data?.results)).catch((e=>{n.reportError(": Error occurred during ajax call at postTags API : ",e.response)}))},removeTag:(e,t,n)=>km("deleteCaseTag",{queryPayload:{caseID:e,tagID:t}},n.getContextName()).catch((e=>{n.reportError(": Error occurred during ajax call at removeTag API : ",e.response)})),getTagsLandingPageURL:e=>fu.getPageDataAsync("D_pxGetTagsLandingPageURL",e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",t.response)}))},vE=(e,t)=>{Gd(t.getContextName(),e.etag),Wd(t.getContextName(),e.etag)},xE={getParticipants:(e,t)=>km("getAllParticipants",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.data.content.pyParticipants)).catch((e=>{t.reportError(": Error occurred during ajax call at getParticipants API : ",e.response)})),getRoleView:(e,t,n)=>km("getParticipantRoleView",{queryPayload:{caseID:e,participant_roleID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)})),getParticipantRoles:(e,t)=>km("getParticipantRoles",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.participant_roles)).catch((e=>{t.reportError(": Error occurred during ajax call at getParticipantRoles API : ",e.response)})),getParticipant:(e,t,n)=>km("getParticipant",{queryPayload:{caseID:e,participantID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error occurred during ajax call at getParticipant API : ",e.response)})),createParticipant:async(e,t,n,r)=>{const s={caseID:e},a={...n,participantRoleID:t},o={"if-match":r.getCaseSummary().headers.etag};return new Promise(((e,t)=>{km("createParticipant",{body:a,queryPayload:s,headers:o},r.getContextName()).then((t=>{vE(t.headers,r),e()})).catch((e=>{r.reportError(": Error occurred during ajax call at createParticipant API : ",e.response),t(e.response)}))}))},updateParticipant:async(e,t,n,r)=>{const s={caseID:e,participantID:t},a={"if-match":r.getCaseSummary().headers.etag};return new Promise(((e,t)=>{km("updateParticipant",{body:n,queryPayload:s,headers:a},r.getContextName()).then((t=>{vE(t.headers,r),e()})).catch((e=>{r.reportError(": Error occurred during ajax call at updateParticipant API : ",e.response),t(e.response)}))}))},deleteParticipant:(e,t,n)=>{const r={caseID:e,participantID:t},s={"if-match":n.getCaseSummary().headers.etag};return new Promise(((e,t)=>{km("deleteParticipant",{queryPayload:r,headers:s},n.getContextName()).then((t=>{vE(t.headers,n),e()})).catch((e=>{n.reportError(": Error occurred during ajax call at deleteParticipant API : ",e.response),t(e.response)}))}))}};function wE(e=[]){return e.reduce(((e,t)=>(e[t.personalizationID]={name:t.name,personalizationState:JSON.parse(t.personalizationState||"{}")},e)),{})}const ME="create",LE="update",UE="delete";function FE(e,t,n,r){const s=kp(t);if(s){switch(e){case ME:case LE:{const{markAsDefault:e,...t}=r;Object.entries(t).length>0&&(s.allPersonalizations[n]=t),e&&(s.defaultPersonalization=n);break}case UE:delete s.allPersonalizations[n],s.defaultPersonalization===n&&(s.defaultPersonalization="");break;default:return null}return s}return null}const jE={},VE=e=>{const t=kp(e);if(t)return Array.isArray(t.allPersonalizations)&&(t.allPersonalizations=wE(t.allPersonalizations)),Promise.resolve(t);const{restApi:n,reqType:r}=_g("getUIListPersonalizations",{listID:e});return pc(n,{method:r,body:{}}).then((e=>{const{data:t}=e;return{allPersonalizations:wE(t.allPersonalizations),defaultPersonalization:t.defaultPersonalization}}))},kE=(e,t,n)=>{const{restApi:r,reqType:s}=_g("createListPersonalization",{listID:e});return FE(ME,e,t,n),pc(r,{method:s,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}}).then((e=>{const n=e.data;return jE[t]=n,e}))},$E=(e,t,n)=>{const r=jE[t]||t;FE(LE,e,t,n);const{restApi:s,reqType:a}=_g("updateListPersonalization",{listID:e,personalizationID:r})||{};return pc(s,{method:a,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}})},BE=(e,t)=>{const n=jE[t]||t;FE(UE,e,t);const{restApi:r,reqType:s}=_g("deleteListPersonalization",{listID:e,personalizationID:n});return pc(r,{method:s,body:{}}).then((e=>(jE[t]&&delete jE[t],e)))};const GE=function(e){return e?{createPersonalization:kE.bind(null,e),updatePersonalization:$E.bind(null,e),deletePersonalization:BE.bind(null,e),fetchPersonalizations:VE.bind(null,e)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}},WE="getDataObjects",HE="getInsightByID",qE=["LocalList","RemoteList","PromptList","DataPage"];let zE=null;const YE={},KE=e=>au.getAppCacheKey(`PrimaryFields-${e}`);function XE(e){let t;return e[1].category?t=e[1].category:e[0].indexOf(":")>0&&(t=e[0].substring(0,e[0].indexOf(":"))),t}const JE={getDataObjects:function(){const e=au.getAppCacheKey(WE);if(window.sessionStorage.getItem(e))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(e)));const{restApi:t,reqType:n}=_g(WE,{}),r=pc(t,{method:n});return r.then((t=>{window.sessionStorage.setItem(e,JSON.stringify(t))})),r},getDataPageObjects:function(e=!0){if(zE)return zE;const t=au.getAppCacheKey("getDataPageObjects");if(e&&window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(t)));const{restApi:n,reqType:r}=_g("getDataPages",{datapageRequestType:"explorable"});return zE=pc(n,{method:r,datapageRequestType:"explorable"}),zE.then((e=>{zE=null,window.sessionStorage.setItem(t,JSON.stringify(e))})),zE},getDataViewMetadata:function(e,t,n){if(!t){const{sourceMetadata:t,sourceFields:n}=function(e){const t=Vp(e);if(t&&t.classID){let e=Bp(t.classID);const n=new Set(t.primaryFields),r=t.rdFields?.fields?.filter((e=>e.indexOf(".")>0));if(r&&!Eh.isEmpty(r)){const n=r.reduce(((e,n)=>{const r=xp(n,t.classID);return e[n]=r,e}),{});e={...e,...n}}if(e&&Object.keys(e).length>0){const r=new Set(Array.isArray(t?.rdFields)?t?.rdFields:t?.rdFields?.fields),s=r.size>0||n.size>0;for(const t in e)e[t].type.startsWith("Page")||s&&!(r.size>0&&r.has(t)||n.size>0&&n.has(t))?delete e[t]:e[t]?.datasource&&qE.includes(e[t].datasource.tableType)&&(e[t].fieldType="Picklist");return{sourceFields:e,sourceMetadata:t}}}return{}}(e);if(t&&n&&Object.keys(n).length>0){const e={data:{...t,fields:Object.entries(n).map((e=>({...e[1],fieldID:e[0],fieldType:e[1].fieldType?e[1].fieldType:e[1].isUserReference?"User reference":void 0,category:XE(e),classID:e[1].associationClassID?e[1].associationClassID:e[1].classID})))}};return Promise.resolve(e)}}const r={dataSource:e,columns:[],parameters:{},associationFilter:n,matchPosition:"",ignoreCase:!1};return Pu.init(r).then((({dataSourceMetaData:e})=>Promise.resolve({data:e})))},getDefaultColumns:function(e){const t=au.getAppCacheKey(`DefaultColumns_${Object.values(e).join("_")}`);if(window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(t)));const{restApi:n,reqType:r}=_g("getListData",{dataViewName:"D_pzGetDefaultColumns"}),s=pc(n,{method:r,body:{dataViewParameters:e}});return s.then((e=>{window.sessionStorage.setItem(t,JSON.stringify(e))})),s},getFieldsForDataSource:function(e,t,n){if(!t){const t=Vp(e),n=Array.isArray(t?.rdFields)?t?.rdFields:t?.rdFields?.fields;return n?Promise.resolve({data:{data:n.map((e=>({pyFieldName:e})))}}):Promise.resolve({data:{data:[]}})}const r=au.getAppCacheKey(`RDColumns-${e}`);if(window.sessionStorage.getItem(r))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(r)));const s=au.getData("D_pxFieldsForDataSource",{dataViewParameters:{DataPageName:e}},n);return s.then((e=>{window.sessionStorage.setItem(r,JSON.stringify(e))})),s},getPrimaryFieldsForDataSource:function(e="",t=""){const n=au.getAppCacheKey(`PFColumns-${e}${t}`);if(window.sessionStorage.getItem(n))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(n)));const r=au.getData("D_pxGetInitialFieldsForDataSource",{dataViewParameters:{DataPageName:e,ClassName:t}});return r.then((e=>{window.sessionStorage.setItem(n,JSON.stringify(e))})),r},getPrimaryFieldsForInsights:async function(e,t,n){const{allClasses:r,promisesToAwait:s,classesToFetch:a,isTopLevelClassPresent:o,joinedClassesToFetch:i}=function(e,t){const n=[],r=[];let s=!1;const a=[],o=[];return e&&o.push(e),t&&t.length>0&&o.push(...t),o.forEach((t=>{const o=KE(t);window.sessionStorage.getItem(o)||(YE[t]?r.push(YE[t]):(n.push(t),t===e?s=!0:a.push(t)))})),{allClasses:o,promisesToAwait:r,classesToFetch:n,isTopLevelClassPresent:s,joinedClassesToFetch:a}}(e,n);return a.length&&s.push((async(e,t,n,r)=>{const s=au.getData("D_pxGetPrimaryFieldsForInsights",{dataViewParameters:{...t&&{topLevelClassID:t},...r&&{joinedClassIDs:r.join(",")},...n&&{topLevelDataPageID:n}}}).then((t=>{const n=t.data?.data||[],r={};e.forEach((e=>{r[e]=[]})),n.forEach((({classID:e,pyFieldName:t})=>{r[e].push(t)})),Object.entries(r).forEach((([e,t])=>{const n=KE(e);window.sessionStorage.setItem(n,JSON.stringify(t))}))})).finally((()=>{e.forEach((e=>{delete YE[e]}))}));return e.forEach((e=>{YE[e]=s})),s})(a,o?e:void 0,o?t:void 0,i.length>0?i:void 0)),Promise.allSettled(s).then((()=>{const e={};return r.forEach((t=>{const n=KE(t);if(window.sessionStorage.getItem(n))try{e[t]=JSON.parse(window.sessionStorage.getItem(n))}catch{}})),{data:e}}))},getInsightIDs:function(){const{restApi:e,reqType:t}=_g("getInsightIDs");return pc(e,{method:t})},getInsightByID:function(e){const t=$p(e);if(t)return Promise.resolve({data:{pyInsights:[t]}});const n={insightID:e},{restApi:r,reqType:s}=_g(HE,n);return pc(r,{method:s})},getInsightsByID:function(e){const t={insightID:e.join(",")},{restApi:n,reqType:r}=_g(HE,t);return pc(n,{method:r})},createInsight:function(e){const{restApi:t,reqType:n}=_g("createInsight");return pc(t,{method:n,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})},updateInsight:function(e,t){const n={insightID:e},{restApi:r,reqType:s}=_g("updateInsight",n),a=t.UpdateDateTime;return pc(r,{method:s,body:JSON.stringify(t),headers:{"if-match":a,"Content-Type":"application/json"}})},deleteInsight:function(e){const t={insightID:e},{restApi:n,reqType:r}=_g("deleteInsight",t);return pc(n,{method:r})},exportToExcel:function(e){const{restApi:t,reqType:n}=_g("exportToExcel");return pc(t,{method:n,body:JSON.stringify(e)})},exportToCSV:function(e){const{restApi:t,reqType:n}=_g("exportToCSV");return pc(t,{method:n,body:JSON.stringify(e)})},scheduleInsight:(e,t)=>{const n={insightID:e},{restApi:r,reqType:s}=_g("scheduleInsight",n);return pc(r,{method:s,body:JSON.stringify(t)})},updateScheduledInsight:(e,t,n)=>{const r={insightID:e,scheduleID:t},{restApi:s,reqType:a}=_g("updateScheduledInsight",r);return pc(s,{method:a,body:JSON.stringify(n)})},deleteScheduledInsight:(e,t)=>{const n={insightID:e,scheduleID:t},{restApi:r,reqType:s}=_g("deleteScheduledInsight",n);return pc(r,{method:s})},translateStrings:function(e){const{restApi:t,reqType:n}=_g("translateStrings");return pc(t,{method:n,body:JSON.stringify(e)})}};const QE=new class{addRoutes=e=>{return t=e,void ip.addRoutes(t);var t}};const ZE=class{static registerModule(e,t,n){n[e]=()=>t}};const eA=class{static getCaseEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS)},tA={getResolvedSemanticURL:(e,t,n)=>ip.getResolvedSemanticURL(e,t,n),getActions:()=>({ACTION_OPENWORKBYHANDLE:Be,ACTION_SHOWDATA:Ve,ACTION_SHOWVIEW:je}),updateSemanticURLAndDocumentTitle:e=>ip.updateSemanticURLAndDocumentTitle(e)};const nA=new class{constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},rA={setTokens:e=>{Ic({tokenInfo:e}),yc(e?.csrf&&!e?.access_token?{pzCTkn:e?.csrf}:{Authorization:`${e?.token_type} ${e?.access_token}`}),setTimeout((()=>Br.publish("updateSession",{updateStatus:"success"})),0)},revokeTokens:async()=>Wi(),getAuthInstance:e=>Gi.init(e),setAuthorizationHeader:e=>{yc({Authorization:e}),setTimeout((()=>Br.publish("updateSession",{updateStatus:"success"})),0)}};const sA=new class{getDebouncedSubject(e){return(new Zg).pipe(GI(e))}};Or.register("email",(e=>{let t=null;return e&&!function(e){const t="[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+",n="\\x5c[\\x00-\\x7f]",r=`(${t}|\\x5b([^\\x0d\\x5b-\\x5d\\x80-\\xff]|${n})*\\x5d)`,s=`(${t}|\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|${n})*\\x22)`;return new RegExp(`^${s}(\\x2e${s})*\\x40${r}(\\x2e${r})*$`).test(e)}(e)&&(t=up.getLocaleValue("Enter a valid email address","Messages")),t})),Or.register("integer",(e=>{let t=null;return e&&!/^(-)?\d+$/.test(e)&&(t=up.getLocaleValue("Invalid number","Messages")),t})),Or.register("required",(e=>Array.isArray(e)&&0===e.length||null==e||""===e?up.getLocaleValue("Cannot be blank","Messages"):null)),Or.register("url",(e=>{let t=null;return e&&!function(e){let t;try{t=new URL(e)}catch{return!1}return"http:"===t.protocol||"https:"===t.protocol||"ftp:"===t.protocol}(e)&&(t=up.getLocaleValue("Enter a valid url","Messages")),t})),setTimeout((()=>{s.e(531).then(s.bind(s,531)).then((({isPossiblePhoneNumber:e})=>{Or.register("phone",(t=>{let n=null;t&&!/^\+?\d+$/.test(t)&&(n=up.getLocaleValue("Enter a valid phone number","Messages"));const r=t?.startsWith("+");if(t&&r){e(t)||(n=up.getLocaleValue("Enter a valid phone number","Messages"))}return n}))}))}),j.PRIORITY.TRIVIAL);const aA=(e,t)=>{switch(t){case"invalid":return up.getLocaleValue(`Incorrect ${e}`,"Messages");case"incomplete":return up.getLocaleValue(`Incomplete ${e}`,"Messages");default:return null}};Or.register("datetime",(e=>aA("DateTime",e))),Or.register("date",(e=>aA("Date",e))),Or.register("time",(e=>aA("Time",e)));const oA={createConversation:(e,t,n,r=[])=>{for(const e of r)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const s=Gm();r.push(s);const a={assistantID:t},o=JSON.stringify({contextID:e});return km("createConversation",{body:o,cancelTokenSource:s,queryPayload:a},n).then((e=>(r.pop(),e)))},sendMessage:(e,t,n,r)=>{const s={assistantID:e,conversationID:t},a=JSON.stringify({request:n});return km("sendMessage",{body:a,queryPayload:s},r)}};const iA=class{caseTypeAccessMap=new Map;constructor(){this.caseTypeAccessMap=cp.getCaseTypeList().reduce(((e,t)=>(e.set(t.pyWorkTypeImplementationClassName,t.hasCreateAccess??!0),e)),new Map)}hasCreateAccess(e){return this.caseTypeAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}};class cA{constructor(){cA.behaviorOverrides={}}static behaviorOverrides={};getPCoreVersion=()=>"24.2.0";onPCoreReady=e=>pE.onPCoreReady(e);getComponentsRegistry=()=>pE.getComponentsRegistry();checkIfSemanticURL=()=>pE.checkIfSemanticURL();isValidSemanticURL=()=>(()=>{if(xg()){const e=ip.processUrl(sp(),!0);return!!ip._getMatchedRouteInRoutingTable(e)}return!1})();getRoutingUtils=()=>QE;getViewResources=()=>d;configureForBrowserBookmark=e=>pE.configureForBrowserBookmark(e);getStore=()=>rh();resetStore=()=>yh();getMessageManager=()=>Qn;getCoexistenceManager=()=>uE;getStoreValue=(e,t,n)=>ch(e,t,n);getContainerUtils=()=>o;getAnnotationUtils=()=>ul;getFieldUtils=()=>Vn;getFieldDefaultUtils=()=>Rr;getAssetLoader=()=>Mr;getAttachmentUtils=()=>Ep;getViewRuleApi=()=>AE;getFeedUtils=()=>bE;getTagUtils=()=>OE;getGenAIAssistantUtils=()=>oA;getStakeholderUtils=()=>xE;getUserApi=()=>NE;getCaseFollowerApi=()=>SE;getCaseUtils=()=>Sc;getStateUtils=()=>ku;getRelatedCasesApi=()=>CE;getPersonalizationUtils=GE;getDataApi=()=>Pu;getDataApiUtils=()=>au;getAnalyticsUtils=()=>JE;getLocaleUtils=()=>up;registerLocaleManager=e=>{const t=this.getLocaleUtils();Object.keys(e).forEach((n=>{t[n]=e[n]}))};setBehaviorOverrides=e=>{cA.behaviorOverrides=e};setBehaviorOverride=(e,t)=>{cA.behaviorOverrides[e]=t};getBehaviorOverrides=()=>cA.behaviorOverrides;getBehaviorOverride=e=>cA.behaviorOverrides[e];getAsynchronousUtils=()=>sA;createPConnect=e=>Xu(e);getPubSubUtils=()=>Br;registerComponentCreator=e=>{Ju(e)};getConstants=()=>Object.freeze(F);getEvents=()=>eA;getRestClient=()=>u;getMashupApi=()=>dE;getEnvironmentInfo=()=>cp;getRuntimeParamsAPI=()=>hE;getSemanticUrlUtils=()=>tA;getRemoteCaseUtils=()=>$;getNavigationUtils=()=>cE;registerModule=(e,t)=>ZE.registerModule(e,t,this);getErrorHandler=()=>nA;getFormUtils=()=>Yc;getMessagingServiceManager=()=>hu;getMetadataUtils=()=>i;getDataPageUtils=()=>fu;getDataTypeUtils=()=>Ul;getCascadeManager=()=>Zp;isDeepEqual=(e,t)=>h()(e,t);getAuthUtils=()=>rA;getDebugger=()=>ec;getDeferLoadManager=()=>ru;getExpressionEngine=()=>n;getActionsSequencer=()=>bu;getRefreshManager=()=>hl;getInitialiser=()=>EE;getBootstrapUtils=()=>pE;getContextTreeManager=()=>Pn;getPerformanceManager=()=>$i;getAccessPrivilege=()=>iA.getInstance()}const lA=new cA;s.g.PCore=lA})()})();
|
|
2
|
+
//# sourceMappingURL=constellation-core-web.js.map
|