@pega/constellationjs 0.2612.1 → 0.2612.2
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/dist/ConstellationJS Engine License.pdf +0 -0
- package/dist/ConstellationJS Engine License.txt +167 -0
- package/dist/bootstrap-shell.js +1 -0
- package/dist/bootstrap-shell.js.br +0 -0
- package/dist/bootstrap-shell.js.gz +0 -0
- package/dist/constellation-core-react-native.js +2 -0
- package/dist/constellation-core-react-native.js.br +0 -0
- package/dist/constellation-core-react-native.js.gz +0 -0
- package/dist/constellation-core-react-native.js.map +1 -0
- package/dist/constellation-core-web.js +2 -0
- package/dist/constellation-core-web.js.LICENSE.txt +124 -0
- 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 -0
- package/dist/constellation-core.797b019a.js +2 -0
- package/dist/constellation-core.797b019a.js.LICENSE.txt +124 -0
- package/dist/constellation-core.797b019a.js.br +0 -0
- package/dist/constellation-core.797b019a.js.gz +0 -0
- package/dist/constellation-core.797b019a.js.map +1 -0
- package/dist/constellation-core.json +1 -0
- package/dist/js/libphonenumber-web.js +2 -0
- package/dist/js/libphonenumber-web.js.br +0 -0
- package/dist/js/libphonenumber-web.js.gz +0 -0
- package/dist/js/libphonenumber-web.js.map +1 -0
- package/dist/js/libphonenumber.c2686009.js +2 -0
- package/dist/js/libphonenumber.c2686009.js.br +0 -0
- package/dist/js/libphonenumber.c2686009.js.gz +0 -0
- package/dist/js/libphonenumber.c2686009.js.map +1 -0
- package/dist/lib_asset.json +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(()=>{var e,t,n={953:e=>{class t{constructor(e,t,n,s,r){this.converter=c(),this.width=e,this.poly=t,this.xor_in=n,this.reflected_xor_in=l(n,e),this.xor_out=s,this.reflect=r,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:s,crc_shift:r,mask:a}=this;if(this.reflect){t=this.reflected_xor_in;for(let s=0;s<e.length;s++){t=(n[255&(t^e[s])]^t>>>8)&a}}else{t=this.shifted_xor_in;for(let o=0;o<e.length;o++)t=n[255&(t>>s-8+r^e[o])]<<r^t<<8-r&a<<r;t>>=r}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 s=e[n];this.reflect&&(s=l(s,8));for(let e=0;e<8;e++){let n=t&this.msb_mask;s&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,s=e.length>>n,r=1<<n,a="";for(let o=0;o<s;o++){let s="";for(let a=0;a<r;a++){let r=e[o<<n|a];r="000000000"+r.toString(16),r=r.substr(r.length-t),s+="0x"+r+", "}a+=" "+s+"\n"}return a="[\n"+a.slice(0,-3)+"\n]",a}}const n="undefined"!=typeof Buffer,s="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r=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%r)),e/=r;return this.fromByteArray(t)}default:if(n&&Buffer.isBuffer(e))return e;if(s){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(s&&(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 s=0;s<t;s++)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,s,r,a){let o=new t(e,n,s,r,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)}},754: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=754,e.exports=t}},s={};function r(e){var t=s[e];if(void 0!==t)return t.exports;var a=s[e]={exports:{}};return n[e](a,a.exports,r),a.exports}r.m=n,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>"js/libphonenumber-web.js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="constellation-corejs-library:",r.l=(n,s,a,o)=>{if(e[n])e[n].push(s);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,r.nc&&i.setAttribute("nonce",r.nc),i.setAttribute("data-webpack",t+a),i.src=n),e[n]=[s];var p=(t,s)=>{i.onerror=i.onload=null,clearTimeout(g);var r=e[n];if(delete e[n],i.parentNode&&i.parentNode.removeChild(i),r&&r.forEach((e=>e(s))),t)return t(s)},g=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)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var s=n.length-1;s>-1&&(!e||!/^http(s?):/.test(e));)e=n[s--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={388:0};r.f.j=(t,n)=>{var s=r.o(e,t)?e[t]:void 0;if(0!==s)if(s)n.push(s[2]);else{var a=new Promise(((n,r)=>s=e[t]=[n,r]));n.push(s[2]=a);var o=r.p+r.u(t),i=new Error;r.l(o,(n=>{if(r.o(e,t)&&(0!==(s=e[t])&&(e[t]=void 0),s)){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,s[1](i)}}),"chunk-"+t,t)}};var t=(t,n)=>{var s,a,[o,i,c]=n,l=0;if(o.some((t=>0!==e[t]))){for(s in i)r.o(i,s)&&(r.m[s]=i[s]);if(c)c(r)}for(t&&t(n);l<o.length;l++)a=o[l],r.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={};r.r(e),r.d(e,{buildContextName:()=>Hs,buildModalContext:()=>Ks,buildTransientContextName:()=>qs,getContainerIdFromContext:()=>Js,getParentContext:()=>Qs,getParentContextName:()=>Ws,getTargetFromContext:()=>Ys,getTransientContext:()=>zs});var t={};r.r(t),r.d(t,{getResolvedTargetName:()=>Va,getRoutingInfo:()=>ka,getSemanticURLFromRoutingInfo:()=>Ba});var n={};r.r(n),r.d(n,{evaluate:()=>yo,handleChange:()=>Io,hasDeclareExpression:()=>mo,updateDeclareExpressions:()=>Eo});var s={};r.r(s),r.d(s,{hasBrowserEnv:()=>ic,hasStandardBrowserEnv:()=>lc,hasStandardBrowserWebWorkerEnv:()=>uc,navigator:()=>cc,origin:()=>dc});var a={};r.r(a),r.d(a,{publishExpressions:()=>Qp,publishMetadata:()=>Kp,publishResponse:()=>Jp});var o={};r.r(o),r.d(o,{doesRestApiExist:()=>sg,getCancelTokenSource:()=>rg,getCaseApi:()=>ig,getHeaderProcessor:()=>eg,invokeCustomRestApi:()=>ng,invokeRestApi:()=>tg,isRequestCanceled:()=>ag,registerInterceptor:()=>og});var i={};r.r(i),r.d(i,{fetchViewResources:()=>im,refreshViewByName:()=>um,updateViewResources:()=>om});var c={};r.r(c),r.d(c,{CONTAINER_NAMES:()=>my,CONTAINER_TYPES:()=>fy,addRootContainerItem:()=>Xy,areContainerItemsPresent:()=>Ny,cleanupTransientContainer:()=>oA,clearContainerItems:()=>cA,clearTransientData:()=>rA,closeContainerItem:()=>Jy,getActiveContainerItemContext:()=>Uy,getActiveContainerItemIDFromRoutingInfo:()=>EA,getActiveContainerItemName:()=>xy,getActiveContext:()=>hA,getChildContainerItemId:()=>Ay,getChildContainerItems:()=>Fy,getChildContainers:()=>jy,getChildContainersContexts:()=>Vy,getContainerAPI:()=>lA,getContainerAccessOrder:()=>_y,getContainerData:()=>yy,getContainerItemByKey:()=>Ry,getContainerItemData:()=>Cy,getContainerItemName:()=>Py,getContainerItems:()=>Sy,getContainerLimit:()=>Wy,getContainerParentContext:()=>IA,getContainerType:()=>vy,getContextByTargetAndKey:()=>mA,getDataContextName:()=>Ly,getFlowContainer:()=>AA,getLeastRecentlyUsedNonDirtyContainerItemID:()=>Ky,getParentContainerItem:()=>yA,getRootContainerName:()=>gA,getSuggestionContexts:()=>ky,getTargetFromContainerItemID:()=>Qy,getTransientItems:()=>tA,hasContainerItems:()=>Gy,isContainerDirty:()=>Yy,isContainerInitialized:()=>by,isContainerItemActive:()=>wy,isContainerItemContextBeingUsedInOtherContainers:()=>eA,isContainerItemExists:()=>Ty,isContainerItemExistsWithoutKey:()=>Dy,isContainerLimitReached:()=>qy,isContainerMultipleMode:()=>$y,isContainerSingleMode:()=>By,purgeTransientData:()=>aA,removeContainer:()=>uA,replaceTransientData:()=>sA,resetContainersPayload:()=>zy,setContainerLimit:()=>Hy,updateCaseContextEtag:()=>pA,updateParentLastUpdateTime:()=>fA,updateRelatedContextEtag:()=>dA,updateTransientData:()=>nA});var l={};r.r(l),r.d(l,{beginDesignerRefresh:()=>pC,endDesignerRefresh:()=>gC,getAIAgent:()=>PC,getAdditionalInfo:()=>xC,getDataPageKeys:()=>RC,getDataPageMetadata:()=>yC,getDesignerViewStoreVersion:()=>dC,getEditableFieldConfigUtil:()=>MC,getEmbeddedPropertyMetadata:()=>lC,getFieldParameters:()=>_C,getFieldsByClassName:()=>SC,getFormat:()=>TC,getGenAICoach:()=>DC,getInsight:()=>CC,getLocaleUtilsForLanguage:()=>iC,getLocalizationServiceFromStore:()=>cC,getLookUpDataPage:()=>bC,getLookUpDataPageInfo:()=>vC,getParagraph:()=>NC,getPersonalizationMetadata:()=>AC,getPropertyMetadata:()=>oC,getResolvedFieldMetadata:()=>wC,getSavableDataPage:()=>OC,isViewExists:()=>IC,mergeStore:()=>aC,resolveNavigation:()=>EC,resolveView:()=>mC,updateNavigationStore:()=>hC,updateStores:()=>fC,updateViewStore:()=>uC});var u={};r.r(u),r.d(u,{dispatch:()=>BC,doesContextExist:()=>nS,getActionType:()=>YC,getContextValue:()=>qC,getDataObject:()=>$C,getReferenceTokens:()=>jC,getSharedDataObject:()=>GC,getStore:()=>kC,getValue:()=>HC,isMergeable:()=>QC,lookupContextValue:()=>zC,mergeDeep:()=>XC,performReplaceAndRearrange:()=>JC,removeItem:()=>KC,replaceValue:()=>eS,resetStore:()=>tS,setStore:()=>VC,updateValue:()=>ZC});var d={};r.r(d),r.d(d,{activateContainerItem:()=>wS,addContainerItem:()=>_S,addMessages:()=>MS,addSharedData:()=>WS,addTransientItem:()=>NS,addWork:()=>yS,clearTransientData:()=>DS,createWork:()=>gS,error:()=>GS,finishAssignment:()=>VS,initContainers:()=>CS,listAction:()=>qS,loadView:()=>IS,mergeData:()=>fS,openAssignment:()=>kS,openWorkByHandle:()=>AS,postProcess:()=>$S,purgeTransientData:()=>OS,removeAllTransientItems:()=>US,removeContainerItem:()=>LS,removeSharedData:()=>HS,removeTransientItem:()=>FS,replaceContainerItem:()=>jS,replaceTransientData:()=>PS,resetContainers:()=>SS,resetLoading:()=>vS,setLoading:()=>bS,setSharedProperty:()=>YS,setStateProperty:()=>KS,showCasePreview:()=>zS,showHarness:()=>mS,showHistory:()=>BS,showPage:()=>ES,upMergeAndRemoveContainerItem:()=>xS,updateContainerItem:()=>RS,updateTransientData:()=>TS});var p={};r.r(p),r.d(p,{buildResizeMessage:()=>qR,mashup:()=>zR});const g=function(){this.__data__=[],this.size=0};const h=function(e,t){return e===t||e!=e&&t!=t};const f=function(e,t){for(var n=e.length;n--;)if(h(e[n][0],t))return n;return-1};var m=Array.prototype.splice;const I=function(e){var t=this.__data__,n=f(t,e);return!(n<0)&&(n==t.length-1?t.pop():m.call(t,n,1),--this.size,!0)};const E=function(e){var t=this.__data__,n=f(t,e);return n<0?void 0:t[n][1]};const y=function(e){return f(this.__data__,e)>-1};const A=function(e,t){var n=this.__data__,s=f(n,e);return s<0?(++this.size,n.push([e,t])):n[s][1]=t,this};function C(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}C.prototype.clear=g,C.prototype.delete=I,C.prototype.get=E,C.prototype.has=y,C.prototype.set=A;const S=C;const _=function(){this.__data__=new S,this.size=0};const N=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};const T=function(e){return this.__data__.get(e)};const D=function(e){return this.__data__.has(e)};const P="object"==typeof global&&global&&global.Object===Object&&global;var O="object"==typeof self&&self&&self.Object===Object&&self;const R=P||O||Function("return this")();const b=R.Symbol;var v=Object.prototype,x=v.hasOwnProperty,w=v.toString,M=b?b.toStringTag:void 0;const L=function(e){var t=x.call(e,M),n=e[M];try{e[M]=void 0;var s=!0}catch(e){}var r=w.call(e);return s&&(t?e[M]=n:delete e[M]),r};var U=Object.prototype.toString;const F=function(e){return U.call(e)};var j=b?b.toStringTag:void 0;const V=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":j&&j in Object(e)?L(e):F(e)};const k=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const B=function(e){if(!k(e))return!1;var t=V(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const $=R["__core-js_shared__"];var G,W=(G=/[^.]+$/.exec($&&$.keys&&$.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"";const H=function(e){return!!W&&W in e};var q=Function.prototype.toString;const z=function(e){if(null!=e){try{return q.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var Y=/^\[object .+?Constructor\]$/,K=Function.prototype,Q=Object.prototype,J=K.toString,X=Q.hasOwnProperty,Z=RegExp("^"+J.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const ee=function(e){return!(!k(e)||H(e))&&(B(e)?Z:Y).test(z(e))};const te=function(e,t){return null==e?void 0:e[t]};const ne=function(e,t){var n=te(e,t);return ee(n)?n:void 0};const se=ne(R,"Map");const re=ne(Object,"create");const ae=function(){this.__data__=re?re(null):{},this.size=0};const oe=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var ie=Object.prototype.hasOwnProperty;const ce=function(e){var t=this.__data__;if(re){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ie.call(t,e)?t[e]:void 0};var le=Object.prototype.hasOwnProperty;const ue=function(e){var t=this.__data__;return re?void 0!==t[e]:le.call(t,e)};const de=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=re&&void 0===t?"__lodash_hash_undefined__":t,this};function pe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}pe.prototype.clear=ae,pe.prototype.delete=oe,pe.prototype.get=ce,pe.prototype.has=ue,pe.prototype.set=de;const ge=pe;const he=function(){this.size=0,this.__data__={hash:new ge,map:new(se||S),string:new ge}};const fe=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const me=function(e,t){var n=e.__data__;return fe(t)?n["string"==typeof t?"string":"hash"]:n.map};const Ie=function(e){var t=me(this,e).delete(e);return this.size-=t?1:0,t};const Ee=function(e){return me(this,e).get(e)};const ye=function(e){return me(this,e).has(e)};const Ae=function(e,t){var n=me(this,e),s=n.size;return n.set(e,t),this.size+=n.size==s?0:1,this};function Ce(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}Ce.prototype.clear=he,Ce.prototype.delete=Ie,Ce.prototype.get=Ee,Ce.prototype.has=ye,Ce.prototype.set=Ae;const Se=Ce;const _e=function(e,t){var n=this.__data__;if(n instanceof S){var s=n.__data__;if(!se||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new Se(s)}return n.set(e,t),this.size=n.size,this};function Ne(e){var t=this.__data__=new S(e);this.size=t.size}Ne.prototype.clear=_,Ne.prototype.delete=N,Ne.prototype.get=T,Ne.prototype.has=D,Ne.prototype.set=_e;const Te=Ne;const De=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const Pe=function(e){return this.__data__.has(e)};function Oe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Se;++t<n;)this.add(e[t])}Oe.prototype.add=Oe.prototype.push=De,Oe.prototype.has=Pe;const Re=Oe;const be=function(e,t){for(var n=-1,s=null==e?0:e.length;++n<s;)if(t(e[n],n,e))return!0;return!1};const ve=function(e,t){return e.has(t)};const xe=function(e,t,n,s,r,a){var o=1&n,i=e.length,c=t.length;if(i!=c&&!(o&&c>i))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,p=!0,g=2&n?new Re:void 0;for(a.set(e,t),a.set(t,e);++d<i;){var h=e[d],f=t[d];if(s)var m=o?s(f,h,d,t,e,a):s(h,f,d,e,t,a);if(void 0!==m){if(m)continue;p=!1;break}if(g){if(!be(t,(function(e,t){if(!ve(g,t)&&(h===e||r(h,e,n,s,a)))return g.push(t)}))){p=!1;break}}else if(h!==f&&!r(h,f,n,s,a)){p=!1;break}}return a.delete(e),a.delete(t),p};const we=R.Uint8Array;const Me=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,s){n[++t]=[s,e]})),n};const Le=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var Ue=b?b.prototype:void 0,Fe=Ue?Ue.valueOf:void 0;const je=function(e,t,n,s,r,a,o){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new we(e),new we(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return h(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var i=Me;case"[object Set]":var c=1&s;if(i||(i=Le),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;s|=2,o.set(e,t);var u=xe(i(e),i(t),s,r,a,o);return o.delete(e),u;case"[object Symbol]":if(Fe)return Fe.call(e)==Fe.call(t)}return!1};const Ve=function(e,t){for(var n=-1,s=t.length,r=e.length;++n<s;)e[r+n]=t[n];return e};const ke=Array.isArray;const Be=function(e,t,n){var s=t(e);return ke(e)?s:Ve(s,n(e))};const $e=function(e,t){for(var n=-1,s=null==e?0:e.length,r=0,a=[];++n<s;){var o=e[n];t(o,n,e)&&(a[r++]=o)}return a};const Ge=function(){return[]};var We=Object.prototype.propertyIsEnumerable,He=Object.getOwnPropertySymbols;const qe=He?function(e){return null==e?[]:(e=Object(e),$e(He(e),(function(t){return We.call(e,t)})))}:Ge;const ze=function(e,t){for(var n=-1,s=Array(e);++n<e;)s[n]=t(n);return s};const Ye=function(e){return null!=e&&"object"==typeof e};const Ke=function(e){return Ye(e)&&"[object Arguments]"==V(e)};var Qe=Object.prototype,Je=Qe.hasOwnProperty,Xe=Qe.propertyIsEnumerable;const Ze=Ke(function(){return arguments}())?Ke:function(e){return Ye(e)&&Je.call(e,"callee")&&!Xe.call(e,"callee")};const et=function(){return!1};var tt="object"==typeof exports&&exports&&!exports.nodeType&&exports,nt=tt&&"object"==typeof module&&module&&!module.nodeType&&module,st=nt&&nt.exports===tt?R.Buffer:void 0;const rt=(st?st.isBuffer:void 0)||et;var at=/^(?:0|[1-9]\d*)$/;const ot=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&at.test(e))&&e>-1&&e%1==0&&e<t};const it=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var ct={};ct["[object Float32Array]"]=ct["[object Float64Array]"]=ct["[object Int8Array]"]=ct["[object Int16Array]"]=ct["[object Int32Array]"]=ct["[object Uint8Array]"]=ct["[object Uint8ClampedArray]"]=ct["[object Uint16Array]"]=ct["[object Uint32Array]"]=!0,ct["[object Arguments]"]=ct["[object Array]"]=ct["[object ArrayBuffer]"]=ct["[object Boolean]"]=ct["[object DataView]"]=ct["[object Date]"]=ct["[object Error]"]=ct["[object Function]"]=ct["[object Map]"]=ct["[object Number]"]=ct["[object Object]"]=ct["[object RegExp]"]=ct["[object Set]"]=ct["[object String]"]=ct["[object WeakMap]"]=!1;const lt=function(e){return Ye(e)&&it(e.length)&&!!ct[V(e)]};const ut=function(e){return function(t){return e(t)}};var dt="object"==typeof exports&&exports&&!exports.nodeType&&exports,pt=dt&&"object"==typeof module&&module&&!module.nodeType&&module,gt=pt&&pt.exports===dt&&P.process,ht=function(){try{var e=pt&&pt.require&&pt.require("util").types;return e||gt&>.binding&>.binding("util")}catch(e){}}();var ft=ht&&ht.isTypedArray;const mt=ft?ut(ft):lt;var It=Object.prototype.hasOwnProperty;const Et=function(e,t){var n=ke(e),s=!n&&Ze(e),r=!n&&!s&&rt(e),a=!n&&!s&&!r&&mt(e),o=n||s||r||a,i=o?ze(e.length,String):[],c=i.length;for(var l in e)!t&&!It.call(e,l)||o&&("length"==l||r&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ot(l,c))||i.push(l);return i};var yt=Object.prototype;const At=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||yt)};const Ct=function(e,t){return function(n){return e(t(n))}};const St=Ct(Object.keys,Object);var _t=Object.prototype.hasOwnProperty;const Nt=function(e){if(!At(e))return St(e);var t=[];for(var n in Object(e))_t.call(e,n)&&"constructor"!=n&&t.push(n);return t};const Tt=function(e){return null!=e&&it(e.length)&&!B(e)};const Dt=function(e){return Tt(e)?Et(e):Nt(e)};const Pt=function(e){return Be(e,Dt,qe)};var Ot=Object.prototype.hasOwnProperty;const Rt=function(e,t,n,s,r,a){var o=1&n,i=Pt(e),c=i.length;if(c!=Pt(t).length&&!o)return!1;for(var l=c;l--;){var u=i[l];if(!(o?u in t:Ot.call(t,u)))return!1}var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var g=!0;a.set(e,t),a.set(t,e);for(var h=o;++l<c;){var f=e[u=i[l]],m=t[u];if(s)var I=o?s(m,f,u,t,e,a):s(f,m,u,e,t,a);if(!(void 0===I?f===m||r(f,m,n,s,a):I)){g=!1;break}h||(h="constructor"==u)}if(g&&!h){var E=e.constructor,y=t.constructor;E==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof E&&E instanceof E&&"function"==typeof y&&y instanceof y||(g=!1)}return a.delete(e),a.delete(t),g};const bt=ne(R,"DataView");const vt=ne(R,"Promise");const xt=ne(R,"Set");const wt=ne(R,"WeakMap");var Mt="[object Map]",Lt="[object Promise]",Ut="[object Set]",Ft="[object WeakMap]",jt="[object DataView]",Vt=z(bt),kt=z(se),Bt=z(vt),$t=z(xt),Gt=z(wt),Wt=V;(bt&&Wt(new bt(new ArrayBuffer(1)))!=jt||se&&Wt(new se)!=Mt||vt&&Wt(vt.resolve())!=Lt||xt&&Wt(new xt)!=Ut||wt&&Wt(new wt)!=Ft)&&(Wt=function(e){var t=V(e),n="[object Object]"==t?e.constructor:void 0,s=n?z(n):"";if(s)switch(s){case Vt:return jt;case kt:return Mt;case Bt:return Lt;case $t:return Ut;case Gt:return Ft}return t});const Ht=Wt;var qt="[object Arguments]",zt="[object Array]",Yt="[object Object]",Kt=Object.prototype.hasOwnProperty;const Qt=function(e,t,n,s,r,a){var o=ke(e),i=ke(t),c=o?zt:Ht(e),l=i?zt:Ht(t),u=(c=c==qt?Yt:c)==Yt,d=(l=l==qt?Yt:l)==Yt,p=c==l;if(p&&rt(e)){if(!rt(t))return!1;o=!0,u=!1}if(p&&!u)return a||(a=new Te),o||mt(e)?xe(e,t,n,s,r,a):je(e,t,c,n,s,r,a);if(!(1&n)){var g=u&&Kt.call(e,"__wrapped__"),h=d&&Kt.call(t,"__wrapped__");if(g||h){var f=g?e.value():e,m=h?t.value():t;return a||(a=new Te),r(f,m,n,s,a)}}return!!p&&(a||(a=new Te),Rt(e,t,n,s,r,a))};const Jt=function e(t,n,s,r,a){return t===n||(null==t||null==n||!Ye(t)&&!Ye(n)?t!=t&&n!=n:Qt(t,n,s,r,e,a))};const Xt=function(e,t){return Jt(e,t)};let Zt,en,tn;const nn=e=>{e&&(Zt=e=e||{"base-server":"http://localhost:1080/prweb/","data-end-point":"api/v1/stream/data","action-end-point":"api/v1/stream/action"},Zt.BASEURL=e.server,Zt.ACTIONURL=e["action-end-point"],Zt.DATAURL=e["data-end-point"],tn=e.reAuthUrl)},sn=()=>tn,rn=()=>Zt.BASEURL,an=e=>fetch(`${Zt.BASEURL}${Zt.ACTIONURL}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),on=e=>{en=e},cn=()=>en;var ln=r(953);const un=function(e){return"symbol"==typeof e||Ye(e)&&"[object Symbol]"==V(e)};var dn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pn=/^\w*$/;const gn=function(e,t){if(ke(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!un(e))||(pn.test(e)||!dn.test(e)||null!=t&&e in Object(t))};function hn(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var s=arguments,r=t?t.apply(this,s):s[0],a=n.cache;if(a.has(r))return a.get(r);var o=e.apply(this,s);return n.cache=a.set(r,o)||a,o};return n.cache=new(hn.Cache||Se),n}hn.Cache=Se;const fn=hn;const mn=function(e){var t=fn(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t};var In=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,En=/\\(\\)?/g;const yn=mn((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(In,(function(e,n,s,r){t.push(s?r.replace(En,"$1"):n||e)})),t}));const An=function(e,t){for(var n=-1,s=null==e?0:e.length,r=Array(s);++n<s;)r[n]=t(e[n],n,e);return r};var Cn=b?b.prototype:void 0,Sn=Cn?Cn.toString:void 0;const _n=function e(t){if("string"==typeof t)return t;if(ke(t))return An(t,e)+"";if(un(t))return Sn?Sn.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n};const Nn=function(e){return null==e?"":_n(e)};const Tn=function(e,t){return ke(e)?e:gn(e,t)?[e]:yn(Nn(e))};const Dn=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};const Pn=function(e){if("string"==typeof e||un(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};const On=function(e,t){for(var n=0,s=(t=Tn(t,e)).length;null!=e&&n<s;)e=e[Pn(t[n++])];return n&&n==s?e:void 0};const Rn=function(e,t,n){var s=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(r);++s<r;)a[s]=e[s+t];return a};const bn=function(e,t){return t.length<2?e:On(e,Rn(t,0,-1))};var vn=Object.prototype.hasOwnProperty;const xn=function(e,t){var n=-1,s=(t=Tn(t,e)).length;if(!s)return!0;for(;++n<s;){var r=Pn(t[n]);if("__proto__"===r&&!vn.call(e,"__proto__"))return!1;if(("constructor"===r||"prototype"===r)&&n<s-1)return!1}var a=bn(e,t);return null==a||delete a[Pn(Dn(t))]};const wn=function(e,t){return null==e||xn(e,t)};var Mn=Object.prototype.hasOwnProperty;const Ln=function(e,t){return null!=e&&Mn.call(e,t)};const Un=function(e,t,n){for(var s=-1,r=(t=Tn(t,e)).length,a=!1;++s<r;){var o=Pn(t[s]);if(!(a=null!=e&&n(e,o)))break;e=e[o]}return a||++s!=r?a:!!(r=null==e?0:e.length)&&it(r)&&ot(o,r)&&(ke(e)||Ze(e))};const Fn=function(e,t){return null!=e&&Un(e,t,Ln)};const jn=function(e,t,n){var s=null==e?void 0:On(e,t);return void 0===s?n:s};const Vn=function(){try{var e=ne(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();const kn=function(e,t,n){"__proto__"==t&&Vn?Vn(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var Bn=Object.prototype.hasOwnProperty;const $n=function(e,t,n){var s=e[t];Bn.call(e,t)&&h(s,n)&&(void 0!==n||t in e)||kn(e,t,n)};const Gn=function(e,t,n,s){if(!k(e))return e;for(var r=-1,a=(t=Tn(t,e)).length,o=a-1,i=e;null!=i&&++r<a;){var c=Pn(t[r]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(r!=o){var u=i[c];void 0===(l=s?s(u,c,i):void 0)&&(l=k(u)?u:ot(t[r+1])?[]:{})}$n(i,c,l),i=i[c]}return e};const Wn=function(e,t,n){return null==e?e:Gn(e,t,n)};const Hn=function(e,t,n){(void 0!==n&&!h(e[t],n)||void 0===n&&!(t in e))&&kn(e,t,n)};const qn=function(e){return function(t,n,s){for(var r=-1,a=Object(t),o=s(t),i=o.length;i--;){var c=o[e?i:++r];if(!1===n(a[c],c,a))break}return t}}();var zn="object"==typeof exports&&exports&&!exports.nodeType&&exports,Yn=zn&&"object"==typeof module&&module&&!module.nodeType&&module,Kn=Yn&&Yn.exports===zn?R.Buffer:void 0,Qn=Kn?Kn.allocUnsafe:void 0;const Jn=function(e,t){if(t)return e.slice();var n=e.length,s=Qn?Qn(n):new e.constructor(n);return e.copy(s),s};const Xn=function(e){var t=new e.constructor(e.byteLength);return new we(t).set(new we(e)),t};const Zn=function(e,t){var n=t?Xn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};const es=function(e,t){var n=-1,s=e.length;for(t||(t=Array(s));++n<s;)t[n]=e[n];return t};var ts=Object.create;const ns=function(){function e(){}return function(t){if(!k(t))return{};if(ts)return ts(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const ss=Ct(Object.getPrototypeOf,Object);const rs=function(e){return"function"!=typeof e.constructor||At(e)?{}:ns(ss(e))};const as=function(e){return Ye(e)&&Tt(e)};var os=Function.prototype,is=Object.prototype,cs=os.toString,ls=is.hasOwnProperty,us=cs.call(Object);const ds=function(e){if(!Ye(e)||"[object Object]"!=V(e))return!1;var t=ss(e);if(null===t)return!0;var n=ls.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&cs.call(n)==us};const ps=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};const gs=function(e,t,n,s){var r=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var i=t[a],c=s?s(n[i],e[i],i,n,e):void 0;void 0===c&&(c=e[i]),r?kn(n,i,c):$n(n,i,c)}return n};const hs=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var fs=Object.prototype.hasOwnProperty;const ms=function(e){if(!k(e))return hs(e);var t=At(e),n=[];for(var s in e)("constructor"!=s||!t&&fs.call(e,s))&&n.push(s);return n};const Is=function(e){return Tt(e)?Et(e,!0):ms(e)};const Es=function(e){return gs(e,Is(e))};const ys=function(e,t,n,s,r,a,o){var i=ps(e,n),c=ps(t,n),l=o.get(c);if(l)Hn(e,n,l);else{var u=a?a(i,c,n+"",e,t,o):void 0,d=void 0===u;if(d){var p=ke(c),g=!p&&rt(c),h=!p&&!g&&mt(c);u=c,p||g||h?ke(i)?u=i:as(i)?u=es(i):g?(d=!1,u=Jn(c,!0)):h?(d=!1,u=Zn(c,!0)):u=[]:ds(c)||Ze(c)?(u=i,Ze(i)?u=Es(i):k(i)&&!B(i)||(u=rs(c))):d=!1}d&&(o.set(c,u),r(u,c,s,a,o),o.delete(c)),Hn(e,n,u)}};const As=function e(t,n,s,r,a){t!==n&&qn(n,(function(o,i){if(a||(a=new Te),k(o))ys(t,n,i,s,e,r,a);else{var c=r?r(ps(t,i),o,i+"",t,n,a):void 0;void 0===c&&(c=o),Hn(t,i,c)}}),Is)};const Cs=function(e){return e};const Ss=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)};var _s=Math.max;const Ns=function(e,t,n){return t=_s(void 0===t?e.length-1:t,0),function(){for(var s=arguments,r=-1,a=_s(s.length-t,0),o=Array(a);++r<a;)o[r]=s[t+r];r=-1;for(var i=Array(t+1);++r<t;)i[r]=s[r];return i[t]=n(o),Ss(e,this,i)}};const Ts=function(e){return function(){return e}};const Ds=Vn?function(e,t){return Vn(e,"toString",{configurable:!0,enumerable:!1,value:Ts(t),writable:!0})}:Cs;var Ps=Date.now;const Os=function(e){var t=0,n=0;return function(){var s=Ps(),r=16-(s-n);if(n=s,r>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Ds);const Rs=function(e,t){return Os(Ns(e,t,Cs),e+"")};const bs=function(e,t,n){if(!k(n))return!1;var s=typeof t;return!!("number"==s?Tt(n)&&ot(t,n.length):"string"==s&&t in n)&&h(n[t],e)};const vs=function(e){return Rs((function(t,n){var s=-1,r=n.length,a=r>1?n[r-1]:void 0,o=r>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(r--,a):void 0,o&&bs(n[0],n[1],o)&&(a=r<3?void 0:a,r=1),t=Object(t);++s<r;){var i=n[s];i&&e(t,i,s,a)}return t}))}((function(e,t,n,s){As(e,t,n,s)}));var xs=Object.prototype.hasOwnProperty;const ws=function(e){if(null==e)return!0;if(Tt(e)&&(ke(e)||"string"==typeof e||"function"==typeof e.splice||rt(e)||mt(e)||Ze(e)))return!e.length;var t=Ht(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(At(e))return!Nt(e).length;for(var n in e)if(xs.call(e,n))return!1;return!0};class Ms{static setNamespaceSupport=(e=!1)=>{Ms.namespaceEnabled=e};static isNamespaceEnabled=()=>Ms.namespaceEnabled??!1;static getNamespaceList=()=>{const e=globalThis.PCore,t=e?.getEnvironmentInfo?.();if(t&&"function"==typeof t.getFeatureMap)return t.getFeatureMap()?.namespaceList};static getQualifiedName=(e,t)=>{if(!Ms.isNamespaceEnabled())return e;const n=Ms.getNamespaceList();if(Array.isArray(n)){if(n.some((t=>{const n=`${t}__`;return e.startsWith(n)})))return e}return`${t}__${e}`};static getDefaultQualifiedName=e=>Ms.getQualifiedName(e,"PegaPlatform");static namespacePrefixedRuleName(e,t){return t?Ms.getQualifiedName(e,t):Ms.getDefaultQualifiedName(e)}static getQualifiedNameForComplexRuleReferences(e,t){const{namespace:n,marker:s}=t??{},r=`${s??"caseInfo.content"}.`,a=e.lastIndexOf(r);if(-1!==a){return e.slice(0,a+r.length)+e.slice(a+r.length).split(".").map((e=>Ms.namespacePrefixedRuleName(e,n))).join(".")}if(e.includes(".")){const t=e.startsWith("."),s=(t?e.slice(1):e).split(".").filter(Boolean).map((e=>Ms.namespacePrefixedRuleName(e,n))).join(".");return t?`.${s}`:s}return Ms.namespacePrefixedRuleName(e,n)}}const Ls=Ms;const Us=new class{constructor(){this.needsMapping=!1}getNeedsMapping(){return this.needsMapping}setNeedsMapping(e){this.needsMapping=e}map(e){return this.needsMapping?this.replacer(e):e}transformObjectToCase(e){let t,n=!1;try{const n=this.replaceToCase(JSON.stringify(e));t=JSON.parse(n)}catch(e){console.error("not a Valid JSON",e),n=!0}return n?e:t}transformCaseData(e){const t=e?.data?.caseInfo,n=e?.uiResources;return{data:{objectInfo:{content:{...t?.content}}},uiResources:{...n}}}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}replaceToCase(e){return e.replace("objectInfo","caseInfo").replace("objectTypeName","caseTypeName").replace("objectTypeID","caseTypeID")}},Fs={APP:{APP:"app",ROOT:"root",INFINITY_RUNTIME:"Infinity",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",OBJECT:"OBJECT"},RESOURCE_STATUS:{CREATE:"CREATE",UPDATE:"UPDATE",OPEN_FLOW_ACTION:"OPEN_FLOW_ACTION"},VIEW_NAMES:{PY_CASE_TAB:Ls.getDefaultQualifiedName("pyCaseTab"),DATA_OBJECT_CREATE_VIEW:Ls.getDefaultQualifiedName("Create"),DATA_OBJECT_EDIT_VIEW:Ls.getDefaultQualifiedName("pyEdit"),PY_DATA_PREVIEW:Ls.getDefaultQualifiedName("pyDataPreview"),PY_DETAILS:Ls.getDefaultQualifiedName("pyDetails"),OBJECT_CREATE_VIEW:"Create",SUBSCRIPT_CREATE_VIEW:Ls.getDefaultQualifiedName("SubscriptView")},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:Ls.getDefaultQualifiedName("D_pyGetUserWorkListByUserId"),D__WORK_BASKET:Ls.getDefaultQualifiedName("D_WorkBasket"),D__PY_MY_WORK_LIST:Ls.getDefaultQualifiedName("D_pyMyWorkList"),D__PY_ASSIGNMENTS_DATA:"D_pyAssignmentsData"}},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:Ls.getDefaultQualifiedName("pzCreateDetails"),PREVIEW_VIEW_NAME:Ls.getDefaultQualifiedName("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:"dataInfo",DATA_INFO_CONTENT:"dataInfo.content",DATA_INFO_CONTEXT_KEY:"dataInfo.contextKey"},OBJECT_INFO:{OBJECT_INFO:"objectInfo",OBJECT_INFO_ID:"objectInfo.ID",OBJECT_INFO_CONTENT:"objectInfo.content",ACTIVE_ACTION_ID:"objectInfo.activeActionID",OBJECT_INFO_CONTENT_CLASS_ID:"objectInfo.content.classID"},CASE_INFO:{CASE_INFO:"caseInfo",CASE_INFO_COLLABORATORS:"caseInfo.collaborators",CASE_INFO_CONTENT:"caseInfo.content",CASE_INFO_ENCRYPTED_CONTENT:"caseInfo.encryptedContent",CASE_INFO_NAME:"caseInfo.name",CASE_INFO_ID:"caseInfo.ID",CASE_INFO_CLASSID:"caseInfo.content.classID",CASE_INFO_CLASSNAME:"caseInfo.className",CASE_TYPE_ID:"caseInfo.caseTypeID",CASE_TYPE_NAME:"caseInfo.caseTypeName",CASE_INFO_PZINSKEY:Ls.getQualifiedNameForComplexRuleReferences("caseInfo.content.pzInsKey"),CASE_INFO_ACTIONS:"caseInfo.availableActions",VIEW_NAME:Ls.getQualifiedNameForComplexRuleReferences("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:Ls.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyApprovalResult"),DUPLICATECASEFLAG:Ls.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyDuplicateCaseActions"),DUPLICATECASEID:Ls.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyDuplicateID"),DUPLICATECASEINSKEY:Ls.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyDuplicateCaseReference.pzInsKey"),HEADERS:"caseInfo.headers",PARENTCASEINFO:"caseInfo.parentCaseInfo",REMOTESYSTEMID:"caseInfo.headers.RemoteSystemID",CASE_RELATED_CASE_TYPES:"caseInfo.relatedCaseTypes",CASES:"caseInfo.cases",IS_ASSIGNMENT:"caseInfo.isAssignment",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",CASE_INFO_ATTACHMENTS:"caseInfo.attachments"},ACTIONS:{ACTION_ID:"actionID",ACTIONS:"availableActions",DELETEAVIALACTIONS:"deleteAvailActions",FLOWACTION:"FlowAction",DATA_PAGES:{D_PY_ADDITIONAL_CASE_ACTIONS:Ls.getDefaultQualifiedName("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:Ls.getDefaultQualifiedName("pyTransferAssignment")},CONTENT:"content",MODAL:"modal",ACTIONAREA:"actionarea",STOPMERGEACTIONS:"stopMergeActions",IS_CREATE_DATA_OBJECT:"isCreateDataObject",SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME:Ls.getQualifiedNameForComplexRuleReferences("context_data.caseInfo.content.summary_of_assignment__.lastSubmitTime"),SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME:Ls.getQualifiedNameForComplexRuleReferences("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",INVALID_INPUTS:"Invalid inputs",VALIDATION_FAIL:"Validation fail",MESSAGES:{MESSAGES_TYPE_SUCCESS:"success",MESSAGES_TYPE_INFO:"info",MESSAGES_TYPE_ERROR:"error"},PUB_SUB_EVENTS:{EVENT_RENDER_APP:"renderApp",EVENT_UNMOUNT_APP:"unmountApp",EVENT_REAUTH:"reAuth",EVENT_FULL_REAUTH:"fullReAuth",EVENT_CUSTOM_REAUTH:"customReAuth",EVENT_CLOSE_REAUTH_MODAL:"closeReAuthModal",EVENT_CANCEL:"cancel",EVENT_MINIMIZE:"minimize",EVENT_EXPRESS_LOCALACTION:"expressLocalActionSubmit",EVENT_BULKACTION:"bulkActionSubmit",EVENT_FINISH_ASSIGNMENT_DONE:"finishAssignmentDone",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_LOCALACTION_SUBMISSION:"localActionSubmit",EVENT_PREVIEW_DISMISS:"previewDismiss",EVENT_LOGOFF:"Logoff",EVENT_TRANSIENT_ITEMS:{UPDATE_PROMOTED_FILTERS:"updatePromotedFilters"},UI_EVENTS:{INSPECTOR:"inspector",INSPECTOR_SHOW_ALL:"inspectorShowAll",UI_DESIGNER:"uiDesigner",UI_DESIGNER_TOOLBAR_EXPANDED:"uiDesignerToolbarExpanded",SHOW_PAGE_INIT:"showPageInit",SHOW_PAGE_DONE:"showPageDone",SHOW_PAGE_STARTED:"showPageStarted",THEME_CHANGE:"themeChange",THEME_MODE_CHANGE:"themeModeChange",NAV_ORIENTATION_CHANGE:"navOrientationChange",CASE_VIEW_TEMPLATE_CHANGE:"caseViewTemplateChange",MULTI_STEP_NAV_DISPLAY_CHANGE:"multiStepNavDisplayChange",CASE_STAGE_DISPLAY_CHANGE:"caseStageDisplayChange"},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_VIEW_OPENED_AFTER_CREATE:"caseViewOpenedAfterCreate",CASE_CLOSED:"caseClosed",ASSIGNMENT_OPENED:"assignmentOpened",CASE_PREVIEW:"casePreview",CURRENT_ASSIGNMENT_UPDATED:"currentAssignmentUpdated",CASE_LOCK_EVENT:"caseLockEvent",GET_NEXT_WORK:"getNextWork",SAVE_ASSIGNMENT_COMPLETE:"saveAssignmentComplete",CASE_LOAD:"caseLoad",CASE_UNLOAD:"caseUnload",CASE_EDIT_OPEN:"caseEditOpen",CASE_EDIT_CLOSE:"caseEditClose",CREATE_CASE_MODAL_OPEN:"createCaseModalOpen",CREATE_CASE_MODAL_CLOSE:"createCaseModalClose"},ASSIGNMENT_EVENTS:{ASSIGNMENT_LOAD:"assignmentLoad",ASSIGNMENT_UNLOAD:"assignmentUnload"},WORK_EVENTS:{WORK_DELETED:"workDeleted"},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",DISPLAY_CASE_SUBMITTED_TOASTER:"displayCaseSubmittedToaster",DATA_EVENTS:{DATA_OBJECT_CREATED:"dataObjectCreated",DATA_OBJECT_DELETED:"dataObjectDeleted",DATA_OBJECT_UPDATED:"dataObjectUpdated"},FETCH_SUCCESS:"fetchSuccess",FETCH_FAILURE:"fetchFailure",REVERSE_COEXISTENCE_EVENTS:{HANDLE_DISCARD:"handleDiscard",CHECK_IS_FORM_DIRTY:"checkIsFormDirty"},TIMEOUT_REMINDER:"sessionAboutToTimeout",RESET_TIMER:"resetInactivityTimer",PEGA_EMBED_CUSTOM:"pegaEmbedCustom",SUGGESTION_PROCESSED:"suggestion_processed",ERROR_ON_FINISH_ASSIGNMENT:"errorOnFinishAssignment",URL_NAVIGATION:"urlNavigation",ON_REFRESH_START:"onRefreshStart",ON_REFRESH_COMPLETE:"onRefreshComplete",ON_REFRESH_ERROR:"onRefreshError",EVENT_LOCALE_CHANGED:"localeChanged"},ERROR_TYPE:{CLIENT:"client",SERVER:"server"},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",PORTAL_AGENT_SPLIT_VIEW_PATH:"presentation.templates.GenAICoach",PORTAL_AGENT_WIDTH_PATH:"presentation.templates.GenAICoach.agentPanelWidth"},PROMISE_VALUE:{RESOLVE:"resolve",REJECT:"reject"},APP_TYPE:{UIKIT:"uikit",THEME_COSMOS:"themecosmos"},PORTAL_TYPE:{WSS:"wss"},VIEW_TYPE:{PY_EMBEDASSIGNMENT:Ls.getDefaultQualifiedName("pyEmbedAssignment"),PY_DETAILS:Ls.getDefaultQualifiedName("pyDetails")},ACTION:"action",CONTEXT_DATA_MODAL_VIEW:{CONTEXT_DATA_MODAL_VIEW:"context_data.modalView",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",EDIT_TYPE:"context_data.modalView.editType",ACTION_ID:"context_data.modalView.actionID"},FEED:{MESSAGE_VIEW_REFERENCE:Ls.getDefaultQualifiedName("messageViewReference"),PARENT_MESSAGE_ID:Ls.getDefaultQualifiedName("parentMessageID"),PX_RESULTS:Ls.getDefaultQualifiedName("pxResults"),NAME:Ls.getDefaultQualifiedName("name"),POSTED_BY_USER:Ls.getDefaultQualifiedName("postedByUser"),UPDATED_TIME:Ls.getDefaultQualifiedName("updatedTime"),POST_MESSAGE:Ls.getDefaultQualifiedName("PostMessage"),PZ_INS_KEY:Ls.getDefaultQualifiedName("pzInsKey"),PZ_PRIVATE_POST_DETAILS:Ls.getDefaultQualifiedName("pzPrivatePostDetails"),PY_SELECTED:Ls.getDefaultQualifiedName("pySelected"),PY_LABEL:Ls.getDefaultQualifiedName("pyLabel"),PY_RECIPIENTS:Ls.getDefaultQualifiedName("pyRecipients"),MENTIONS:Ls.getDefaultQualifiedName("mentions"),PY_IS_DELETE_ENABLED:Ls.getDefaultQualifiedName("pyIsDeleteEnabled"),TAGS:Ls.getDefaultQualifiedName("tags"),PZ_POST_DETAILS:Ls.getDefaultQualifiedName("pzPostDetails"),PY_FEED_SOURCE_REFERENCE:Ls.getDefaultQualifiedName("pyFeedSourceReference"),IS_EDITED:Ls.getDefaultQualifiedName("isEdited"),PY_LIKES:Ls.getDefaultQualifiedName("pyLikes"),PY_POST_TYPE:Ls.getDefaultQualifiedName("pyPostType"),POSTED_TIME:Ls.getDefaultQualifiedName("postedTime"),PY_MESSAGE_VIEW_REFERENCE:Ls.getDefaultQualifiedName("pyMessageViewReference"),ID:Ls.getDefaultQualifiedName("ID"),PY_COMMENT_CONTEXT:Ls.getDefaultQualifiedName("pyCommentContext"),PX_LIKE_COUNT:Ls.getDefaultQualifiedName("pxLikeCount"),MESSAGE:Ls.getDefaultQualifiedName("message")},CASE_VIEW_MODE:{PERFORM:"perform",REVIEW:"review",CONFIRM:"confirm"}},js={CONTEXT:"context",AJAXCONTAINER:"primary",VIEW_CONTAINER:"ViewContainer",APP_SHELL:"AppShell",ROOT_CONTAINER:"RootContainer",HYBRID:"hybrid",HYBRID_VIEW_CONTAINER:"HybridViewContainer",HYRBID_ROOT_CONTAINERNAME:"hybridRootContainerName",MODAL_VIEW_CONTAINER:"ModalViewContainer",FLOW_CONTAINER:"FlowContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",OBJECT_PAGE:"ObjectPage",CASE_CREATE_STAGE:"CaseCreateStage",CASE_VIEW:"CaseView",RULE_VIEW:"RuleView",SELF_SERVICE_CASE_VIEW:"SelfServiceCaseView",VIEW:"view",CASE_PREVIEW:"CasePreview",RULE_PREVIEW:"RulePreview",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",OBJECTACTIONCONTAINER:"ObjectActionContainer",ACPRIMARY_NAME:"ACPRIMARY",ACTERTIARY_NAME:"ACTERTIARY",THREADNAMESEPARATOR:"/",JOINCHARACTER:"_",FORWARD_SLASH_STRING:"/",UNDERSCORE_STRING:"_",DOUBLE_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_DYNAMIC_WHENS:"summary_of_dynamic_whens__",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",CUSTOM_ERROR:"custom error",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",EMBED:"EMBED",ERROR_FIELD_IN_PAGE:"erroneousInputOutputFieldInPage",ERROR_IN_PAGE_IDENTIFIER:"erroneousInputOutputIdentifier",ON_REFRESH_ERROR:"onRefreshError",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",OBJECT_INFO_IS_LOCAL_ACTION:"objectInfo.isObjectWideAction",DATA:"data",OPTIONS:"options",VIEWS:"uiResources.resources.views",NAVIGATIONS:"uiResources.resources.navigations",COMPONENTS:"uiResources.components",UI_RESOURCES_ROOT_CONTEXT:"uiResources.root.config.context",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",PARAGRAPH_ANNOTATION:"@PARAGRAPH",FORMAT_ANNOTATION:"@FORMAT",ASSOCIATED_PROPERTY_ANNOTATION:"@ASSOCIATED",CLASS_ASSOCIATION_ANNOTATION:"@CA",FILTERED_LIST_ANNOTATION:"@FILTERED_LIST",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:Ls.getDefaultQualifiedName("pyDetails"),PY_CONFIRM:Ls.getDefaultQualifiedName("pyConfirm"),LIST_ACTIONS:{ADD:"ADD",INSERT:"INSERT",UPDATE:"UPDATE",DELETE:"DELETE",DELETE_ALL:"DELETE ALL",MOVE:"MOVE",SELECT:"SELECT",DESELECT:"DESELECT",REPLACE:"REPLACE",DELETEPAGE:"DELETEPAGE"},LIST_ACTIONS_TYPE:{SELECT_DESELECT:"SELECT_DESELECT",DESELECT_ALL:"DESELECT_ALL"},ENV_INFO_KEYS:{APPLICATION_NAME:"APPLICATION_NAME",APPLICATION_DESC:"APPLICATION_DESC",APPLICATION_ID:"APPLICATION_ID",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",EMBEDDED_DATA_MODAL:{SHOW_ROW:"showRow",SUBMIT_ROW:"submitRow",EDIT_TYPE:"editType",ACTION_NAME:"actionName",REFRESH_CONDITIONS:"caseInfo.refreshConditions"},LOCALIZATION_V2:2,DATA_CLASS_NOT_FOUND:"Data object class not found",PRIORITY:{CRITICAL:100,HIGH:500,MEDIUM:1e3,LOW:2e3,TRIVIAL:3e3,PING:6500},...Fs,getProperty:e=>Us.map(e),getDefaultQualifiedName:e=>Ls.getDefaultQualifiedName(e)},Vs=Ls.getDefaultQualifiedName("pyRemoteCaseDetails");class ks{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=>cS.getProperty(".RemoteSystemID",js.CASE_INFO.HEADERS,e);static getRemoteHeader=e=>this.remoteCaseMapping[e]?.RemoteSystemID;static injectRemoteCaseHeader=(e,t,n)=>{if(e&&e.RemoteSystemID)return;const s=this.getRemoteHeaderByContext(n);s?e.RemoteSystemID=s:t&&this.isRemoteCase(t.caseTypeID)&&(e.RemoteSystemID=this.getRemoteHeader(t.caseTypeID))};static isTraditionalRemoteCase=(e="")=>"Traditional"===ks.getRemoteCase(e)?.RemoteApplicationType;static setAdditionalParameters=()=>{const e=PA.environmentInfoObject?.pyRemoteCaseTypeList;e?.forEach((e=>{const t=this.getRemoteCase(e.pyWorkTypeImplementationClassName);t&&(t.name=e.pyWorkTypeName)}))};static getRemoteAppPlatformVersion=e=>{if(!e)return;const t=PA.environmentInfoObject?.pyRemoteAppPlatformVersion;if(t){return JSON.parse(t)[e]}};static isRemoteCaseVersionDifferent=e=>{if(!this.isRemoteCase(e))return!1;const t=this.getRemoteHeader(e);if(!t)return!1;const n=this.getRemoteAppPlatformVersion(t);return Boolean(n)};static getRemoteHeaderFromSourceClass=e=>{const t=Object.values(this.remoteCaseMapping).find((t=>t.RemoteClassName===e));return t?.RemoteSystemID};static getRemoteCaseClassBySourceClass=e=>{if(e)for(const[t,n]of Object.entries(this.remoteCaseMapping))if(n.RemoteClassName===e)return t}}const Bs=ks,$s={},Gs=new Map,Ws=e=>{let t=js.EMPTY_STRING;return t=e&&e.includes(js.FORWARD_SLASH_STRING)?e.substring(0,e.lastIndexOf("/")):e,t},Hs=(e,t,n=!1)=>{let s=js.EMPTY_STRING;if(t&&e){let r=`${t}${js.FORWARD_SLASH_STRING}${e}`;const a=yy(r);if(a||t!==js.APP.APP&&t!==js.APP.ROOT)if(a){if(n&&$s[r])return s=`${r}${js.UNDERSCORE_STRING}${$s[r]}`,s;$s[r]?$s[r]+=1:$s[r]=1,s=`${r}${js.UNDERSCORE_STRING}${$s[r]}`}else s=Hs(e,Ws(t));else r=`${t}${js.FORWARD_SLASH_STRING}${js.PRIMARY}`,$s[r]?$s[r]+=1:$s[r]=1,s=`${r}${js.UNDERSCORE_STRING}${$s[r]}`}return s},qs=(e,t)=>{if(e&&t){const n=(Gs[t]?.[e]??0)+1;return Gs[t]||(Gs[t]={}),Gs[t][e]=n,`${t}${js.FORWARD_SLASH_STRING}${e}_${n}`}return""},zs=(e,t)=>{if(e&&t){const n=Gs[t]?.[e];return n?`${t}${js.FORWARD_SLASH_STRING}${e}_${n}`:qs(e,t)}return""},Ys=e=>{let t=js.EMPTY_STRING;return e&&(t=e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("_")).toLowerCase()),t},Ks=(e,t)=>{if(null===e)return t;const[,n]=t.split(js.FORWARD_SLASH_STRING);return e+js.FORWARD_SLASH_STRING+n},Qs=e=>{const t=e.indexOf(js.FORWARD_SLASH_STRING),n=e.lastIndexOf(js.FORWARD_SLASH_STRING);return t===n?e:e.substring(0,n)},Js=e=>{const t=e.split(js.FORWARD_SLASH_STRING);return 2===t.length?e:t[0]+js.FORWARD_SLASH_STRING+t[2]},Xs="SET_PROPERTY",Zs="REPLACE_PROPERTY",er="FIELD_CHANGE",tr="LOAD_VIEW",nr="SHOW_PAGE",sr="SHOW_DATA",rr="SHOW_INSIGHT",ar="SHOW_DASHBOARD",or="SET_LOADING",ir="RESET_LOADING",cr="APP_OFFLINE",lr="APP_ONLINE",ur="SET_SHARED_PROPERTY",dr="CREATE_WORK",pr="OPEN_WORK_BY_HANDLE",gr="UPDATE_DOCUMENT",hr="FINISH_ASSIGNMENT",fr="SAVE_AND_CLOSE",mr="CANCEL_ASSIGNMENT",Ir="OPEN_ASSIGNMENT",Er="NAVIGATE_TO_STEP",yr="OPEN_LOCAL_ACTION",Ar="OPEN_PROCESS_ACTION",Cr="MERGE_DATA",Sr="REMOVE_ITEM",_r="GET_DATAOBJECT_ACTIONS",Nr="SHOW_HISTORY",Tr="ERROR",Dr="INIT_CONTAINERS",Pr="RESET_CONTAINERS",Or="ADD_CONTAINER_ITEM",Rr="REMOVE_CONTAINER_ITEM",br="ADD_TRANSIENT_ITEM",vr="UPDATE_TRANSIENT_DATA",xr="REMOVE_TRANSIENT_ITEM",wr="REMOVE_ALL_TRANSIENT_ITEMS",Mr="CLEAR_TRANSIENT_DATA",Lr="PURGE_TRANSIENT_DATA",Ur="REPLACE_TRANSIENT_DATA",Fr="ACTIVATE_CONTAINER_ITEM",jr="UPDATE_CONTAINER_ITEM",Vr="UPMERGE_AND_REMOVE_CONTAINER_ITEM",kr="REPLACE_CONTAINER_ITEM",Br="ACTIVATE_MODAL_CONTAINER_ITEM",$r="REMOVE_CONTAINER",Gr="ADD_SUGGESTION_CONTEXT",Wr="showView",Hr="showData",qr="showInsight",zr="showDashboard",Yr="openWorkByHandle",Kr="openAssignment",Qr="createNewWork",Jr="finishAssignment",Xr="SHOW_CANCEL_ALERT",Zr="deleteCaseInCreateStage",ea="openLocalAction",ta="openProcessAction",na="caseWideActions",sa="executeCaseWideActions",ra="openBulkAction",aa="performBulkAction",oa="launchAssignment",ia="ADD_MESSAGES",ca="CLEAR_MESSAGES",la="RESET_STORE",ua="FETCH_DATAPAGE",da="ADD_SHARED_DATA",pa="REMOVE_SHARED_DATA",ga="LIST_ACTION",ha="DELETE_CASE_SUMMARY",fa="ALTER_BLOCKING_ACTION_COUNT",ma="SET_APP_LOCALE",Ia="CREATE_DATA_OBJECT",Ea="DELETE_DATA_OBJECT",ya="VIEW_DATA_OBJECT",Aa="UPDATE_DATA_OBJECT",Ca="OPEN_DATA_OBJECT_ACTION",Sa="SUBMIT_DATA_OBJECT_ACTION",_a="OPEN_EMBEDDED_DATA_MODAL",Na="GET_EMBEDDED_DATA_VIEW",Ta="SUBMIT_EMBEDDED_DATA_MODAL",Da="SUBMIT_SUBSCRIPT",Pa="FILL_FORM_WITH_AI",Oa="createWork",Ra="openAssignment",ba="openCase",va="EXECUTE_OBJECT_WIDE_ACTION",xa="CREATE_EXTERNAL_CASE",wa="DELETE_WORK",Ma="createObject",La="getObject",Ua="getObjectWideAction",Fa="createExternalObject",ja="retrieveActionViewForNewCase",Va=(e,t)=>{if(!e||!t)return null;let n,s=js.EMPTY_STRING;return t&&(s=`${t}${js.FORWARD_SLASH_STRING}${e}`,n=yy(s),n||t.includes("/")?n||(s=Va(e,Ws(t))):s=`${t}${js.FORWARD_SLASH_STRING}${e}`),s},ka=(e,t)=>{const n=Va(e,t);return n&&yy(n)?yy(n):{}},Ba=(e,t)=>TA.getSemanticURL(Wr,{page:e},t);class $a{constructor(e,t,n){this._grammar=e,this._state="expectOperand",this._exprStr=t||"",this._endState=n||{},this._subParser=null}static _setParent(e,t){Object.defineProperty(e,"_parent",{value:t,writable:!0})}_addToken(e){const t=Ja[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],s=Qa[e.tokenType];s&&s.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}=Ja[this._state];this._subParser=new $a(this._grammar,e,t)}_endSubExpression(){Ja[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 Ga=$a,Wa="identifier",Ha={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>"object"!=typeof e&&"object"!=typeof t&&(e&&t)},qa={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>"object"!=typeof e&&"object"!=typeof t&&(e||t)},za=(e,t,n)=>{const s=""===e,r=""===t||null==t;if(s&&r)return n;if("boolean"==typeof t){const r=!!(!s&&"false"!==e&&"0"!==e)&&Boolean(e);return n?r===t:r!==t}return s!==r?!n:n?e===t:e!==t},Ya={">":{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)=>"object"!=typeof e&&"object"!=typeof t&&za(e,t,!0)},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>"object"==typeof e||"object"==typeof t||za(e,t,!1)},"!":{operatorType:"unaryOperator",precedence:999,evaluate:e=>{const t="object"==typeof e?e.value:e;return"true"===t||"false"===t?"true"!==t:!t}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":Ha,AND:Ha,and:Ha,"||":qa,OR:qa,or:qa,CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>String(e).includes(String(t))},NOT_CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!String(e).includes(String(t))},STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>String(e).startsWith(String(t))},NOT_STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!String(e).startsWith(String(t))},ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>String(e).endsWith(String(t))},NOT_ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!String(e).endsWith(String(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)=>String(t).split(",").includes(String(e))},IS_NOT_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!String(t).split(",").includes(String(e))}},Ka={BinaryExpression:function(e){const t=[],n=e.right,s=e.operator??"",r=e.left;if(!r)return!1;let a="boolean"==typeof r.value?"True-False":"";t[0]=this.evaluateAST(r),a||r.operationType!==Wa||(a=((e,t,n)=>{if("string"!=typeof e.value)return"";const s=e.value.substring(1),r=t?.getFieldMetadata(s)?.type??"";if(r)return r;const{pageReference:a,context:o}=n??{};if(!a||!o)return"";const i=cS.resolveClassID(e.value,a,o),c=oC(s,i);return c&&!Array.isArray(c)?c.type??"":""})(r,this._context,this._contextTreeNodeContext)),t[1]=n?this.evaluateAST(n,a):"";const o=this._grammar[s];return!!o?.evaluate&&o.evaluate(t[0],t[1])},identifier:function(e){const t="string"==typeof e.value?e.value:"";if(this._localDataObject)return rS.getIn(this._localDataObject,t?t.substring(1).split("."):[])??"";if(this._contextTreeNodeContext)return cS.getLitePropertyValue(this._contextTreeNodeContext,t)??"";if(!this._context)return"";const n=this._context.getFieldMetadata(t)?.type??"",s=this._context.getValue(t)??"";if("Decimal"===n&&"string"==typeof s){const e=parseFloat(s);return Number.isNaN(e)?"":e}return s},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){const t=e.operator,n=e.right;if(!t||!n)return!1;const s=this._grammar[t];return!!s?.evaluate&&s.evaluate(n)}},Qa={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:String(e.value)})},binaryOperator:function(e){const t=String(e.value),{precedence:n}=this._grammar[t];let s=this._position._parent;const r=s?s.operator:null,a=r?this._grammar[r]:null,o=a?a.precedence:null;if(o&&n)for(;s?.operator&&o>=n;)this._position=s,s=s._parent;const i={operationType:"BinaryExpression",operator:t,left:this._position};Ga._setParent(this._position,i),s?(this._position=s,this.setPositionInAST(i)):(this._tree=i,this._position=i)},identifier:function(e){const t={operationType:Wa,value:e.value};this.setPositionInAST(t)},literal:function(e){this.setPositionInAST({operationType:"literal",value:e.value})},subExpression:function(e){var t;"object"==typeof(t=e)&&null!==t&&"operationType"in t&&this.setPositionInAST(e)}},Ja={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:Wa},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:Qa.subExpression,endStates:{closeParenthesis:"expectBinOp"}}},Xa=["binaryOperator","unaryOperator","openParenthesis"],Za=/^\s*$/,eo=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,to=/\\\\/,no=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],so=["[a-zA-Z_.$][a-zA-Z0-9_.$]*(?:\\(\\d+\\))?(?:\\.[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]+)"],ro=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;class ao{constructor(e){this._grammar=e}static _isNegative(e){return Xa.some((t=>t===e[e.length-1].tokenType))}static _isWhitespace(e){return!!e.match(Za)}static _createWordboundary(e){return(e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).match(eo)&&(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(to,"\\")}_getSplitRegex(){if(!this._splitRegex){const e=Object.keys(this._grammar).sort(((e,t)=>t.length-e.length)).map((e=>ao._createWordboundary(e)),this);this._splitRegex=new RegExp(`(${[no.join("|"),e.join("|"),so.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){const t=this._getSplitRegex();return e.split(t).filter((e=>e.trim()))}_createToken(e){const t={tokenType:"literal",value:e,element:e};return e.startsWith('"')||e.startsWith("'")?t.value=ao._unquote(e):e.match(ro)?t.value=parseFloat(e):"true"===e||"false"===e?t.value="true"===e:this._grammar[e]?t.tokenType=this._grammar[e].operatorType:e.match(eo)&&(t.tokenType="identifier"),t}_getTokens(e){const t=[];let n=!1;for(let s=0;s<e.length;s+=1)ao._isWhitespace(e[s])?t.length&&(t[t.length-1].element+=e[s]):"-"===e[s]&&ao._isNegative(t)?n=!0:(n&&(e[s]=`-${e[s]}`,n=!1),t.push(this._createToken(e[s])));return t}tokenize(e){const t=this._splitExpression(e);return this._getTokens(t)}}const oo=ao;const io=class{constructor(e,t){this._grammar={...Ya},this._expression=e,this._ast=null,this._contextTreeNodeContext=null,this._localDataObject=t}buildAST(){const e=new oo(this._grammar).tokenize(this._expression),t=new Ga(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 go(e.operationType,Ka)&&Ka[e.operationType].call(this,e,t)}},co=(e,t)=>{const n=e.replace(/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,(e=>e.replace("=","==")));return new io(n,t)},lo=e=>!e||e.buildAST(),uo=(e,t,n)=>!e||e.evaluate(t,n),po=(e,t,n)=>{const s=co(e,t),r=lo(s);return uo(r,n)},go=(e,t)=>e in t;const ho=class{static handleExpression(e,t,n,s){const r=this.getContext(e,s);an({actionObject:{action:"decexp",params:{source:e,value:t,targets:n},context:r}}).then((e=>e.json())).then((e=>{this.updateState(e,s)})).catch((e=>window.console.log(e)))}static getContext(e,t){const n=e.substring(0,e.indexOf("."));return{name:n,class:cS.getPropertyValue(`${n}.${Ls.getDefaultQualifiedName("pxObjClass")}`,null,t)||cS.getPropertyValue(`${n}.${Ls.getDefaultQualifiedName("pyClassName")}`,null,t)}}static updateState(e,t){Object.keys(e).forEach((n=>BC({type:Xs,payload:{context:t,reference:n,value:e[n]}})))}},fo={},mo=(e,t)=>fo[t]&&Object.hasOwn(fo[t],e),Io=e=>{const{context:t}=e;mo(e.reference,t)&&ho.handleExpression(e.reference,e.value,fo[t][e.reference],t)},Eo=(e={})=>{rS.copy(e,fo)},yo=(e,t,n)=>po(e,t,n?.pConnect.getPConnect());const Ao=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 s=this.getContextObjectByName(e);if(s)if(Array.isArray(n))s[t]=n;else{const e=s[t];s[t]=[...new Set([...e,n])]}}else{const s={};Array.isArray(n)?s[t]=n:s[t]=[n],this.addContextName(e,s)}}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),s=new Set(n);return n.forEach((e=>{s.add(e)})),[...s]}};const Co=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={}){rS.copy(e,this.componentMap)}mergeOverrideMap(e={}){rS.copy(e,this.overrideMap)}getOverrideMap(){return this.overrideMap}getLazyMap(){return this.lazyMap}};const So=new class{constructor(){this.handlers={}}registerHandler(e,t){this.handlers[e]=t}getHandler(e){return this.handlers[e]}},_o=/^@\w+\s+(.+)$/s;const No=class{static handleAnnotation(e,t,n){const s=e.indexOf(" "),r=-1===s?e:e.substring(0,s),a=So.getHandler(r);if(!a)return e;const o=e.match(_o);return a((o?o[1]:"").trim(),t,n)}static trimAnnotation(e){if("string"!=typeof e)return e;const t=e.indexOf(" "),n=e.substring(0,t),s=e.substring(t+1);return So.getHandler(n)?s:e}static handleComponentMapping(e,t,n){const s=Co.getComponent(t.type);if(!s?.mapping)return;const r=s.mapping(t.config);if(r&&r["@map"]){const t=r["@map"],{source:s}=t;if(!s)return;const a=n.getValue(s);if("function"==typeof t.advanced)t.advanced(e,a);else{const n=t.inputs_map;e[t.output_property]=[];const s=e[t.output_property];a.forEach((e=>{const t={};Object.keys(n).forEach((s=>{let r=n[s];r?.startsWith(".")?(r=r.substring(1),t[s]=e[r]):t[s]=r})),s.push(t)}))}}}static getPropertyName(e=""){if(e&&rS.isString(e)){const t=e.startsWith(js.PROPERTY_ANNOTATION)||e.startsWith(js.ATTACHMENT_ANNOTATION)||e.startsWith(js.ASSOCIATED_PROPERTY_ANNOTATION)||e.startsWith(js.CLASS_ASSOCIATION_ANNOTATION)||e.startsWith(js.FILTERED_LIST_ANNOTATION),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getLeafPropertyName(e){if(rS.isString(e)&&!!e?.startsWith(js.PROPERTY_ANNOTATION)){const t=this.getPropertyName(e),n=t.split(".");return n.length<2?t:n.pop()}return e}static isProperty(e){return rS.isString(e)&&!!e?.startsWith(js.PROPERTY_ANNOTATION)}};function To(e,t){return function(){return e.apply(t,arguments)}}const{toString:Do}=Object.prototype,{getPrototypeOf:Po}=Object,{iterator:Oo,toStringTag:Ro}=Symbol,bo=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),vo=e=>"string"==typeof e&&("__proto__"===e||"constructor"===e||"prototype"===e),xo=(e,t,n)=>e===Object.prototype||!n&&null===t,wo=(e,t)=>{let n=e;const s=[];for(;null!=n;){if(-1!==s.indexOf(n))return!1;s.push(n);const r=Po(n);if(xo(n,r,n===e))return!1;if(bo(n,t))return!0;n=r}return!1},Mo=(Lo=Object.create(null),e=>{const t=Do.call(e);return Lo[t]||(Lo[t]=t.slice(8,-1).toLowerCase())});var Lo;const Uo=e=>(e=e.toLowerCase(),t=>Mo(t)===e),Fo=e=>t=>typeof t===e,{isArray:jo}=Array,Vo=Fo("undefined");function ko(e){return null!==e&&!Vo(e)&&null!==e.constructor&&!Vo(e.constructor)&&Go(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Bo=Uo("ArrayBuffer");const $o=Fo("string"),Go=Fo("function"),Wo=Fo("number"),Ho=e=>null!==e&&"object"==typeof e,qo=e=>{if(!Ho(e))return!1;const t=Po(e);return!(null!==t&&t!==Object.prototype&&null!==Po(t)||wo(e,Ro)||wo(e,Oo))},zo=Uo("Date"),Yo=Uo("File"),Ko=Uo("Blob"),Qo=Uo("FileList"),Jo=Uo("Set");const Xo="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},Zo=void 0!==Xo.FormData?Xo.FormData:void 0,ei=Uo("URLSearchParams"),[ti,ni,si,ri]=["ReadableStream","Request","Response","Headers"].map(Uo);function ai(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let s,r;if("object"!=typeof e&&(e=[e]),jo(e))for(s=0,r=e.length;s<r;s++)t.call(null,e[s],s,e);else{if(ko(e))return;const r=n?Object.getOwnPropertyNames(e):Object.keys(e),a=r.length;let o;for(s=0;s<a;s++)o=r[s],t.call(null,e[o],o,e)}}function oi(e,t){if(ko(e))return null;t=t.toLowerCase();const n=Object.keys(e);let s,r=n.length;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const ii="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ci=e=>!Vo(e)&&e!==ii;const li=(ui="undefined"!=typeof Uint8Array&&Po(Uint8Array),e=>ui&&e instanceof ui);var ui;const di=Uo("HTMLFormElement"),{propertyIsEnumerable:pi}=Object.prototype,gi=Uo("RegExp"),hi=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};ai(n,((n,r)=>{let a;!1!==(a=t(n,r,e))&&(s[r]=a||n)})),Object.defineProperties(e,s)};const fi=Uo("AsyncFunction"),mi=(Ii="function"==typeof setImmediate,Ei=Go(ii.postMessage),Ii?setImmediate:Ei?(yi=`axios@${Math.random()}`,Ai=[],ii.addEventListener("message",(({source:e,data:t})=>{e===ii&&t===yi&&Ai.length&&Ai.shift()()}),!1),e=>{Ai.push(e),ii.postMessage(yi,"*")}):e=>setTimeout(e));var Ii,Ei,yi,Ai;const Ci="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ii):"undefined"!=typeof process&&process.nextTick||mi,Si=e=>null!=e&&Go(e[Oo]),_i={isArray:jo,isArrayBuffer:Bo,isBuffer:ko,isFormData:e=>{if(!e)return!1;if(Zo&&e instanceof Zo)return!0;const t=Po(e);if(!t||t===Object.prototype)return!1;if(!Go(e.append))return!1;const n=Mo(e);return"formdata"===n||"object"===n&&Go(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Bo(e.buffer),t},isString:$o,isNumber:Wo,isBoolean:e=>!0===e||!1===e,isObject:Ho,isPlainObject:qo,isEmptyObject:e=>{if(!Ho(e)||ko(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:ti,isRequest:ni,isResponse:si,isHeaders:ri,isUndefined:Vo,isDate:zo,isFile:Yo,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:Ko,isRegExp:gi,isFunction:Go,isStream:e=>Ho(e)&&Go(e.pipe),isURLSearchParams:ei,isTypedArray:li,isFileList:Qo,forEach:ai,merge:function e(...t){const{caseless:n,skipUndefined:s}=ci(this)&&this||{},r={},a=(t,a)=>{if("__proto__"===a||"constructor"===a||"prototype"===a)return;const o=n&&"string"==typeof a&&oi(r,a)||a,i=bo(r,o)?r[o]:void 0;qo(i)&&qo(t)?r[o]=e(i,t):qo(t)?r[o]=e({},t):jo(t)?r[o]=t.slice():s&&Vo(t)||(r[o]=t)};for(let e=0,n=t.length;e<n;e++){const n=t[e];if(!n||ko(n))continue;if(ai(n,a),"object"!=typeof n||jo(n))continue;const s=Object.getOwnPropertySymbols(n);for(let e=0;e<s.length;e++){const t=s[e];pi.call(n,t)&&a(n[t],t)}}return r},extend:(e,t,n,{allOwnKeys:s}={})=>(ai(t,((t,s)=>{n&&Go(t)?Object.defineProperty(e,s,{__proto__:null,value:To(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})}),{allOwnKeys:s}),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,s)=>{e.prototype=Object.create(t.prototype,s),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,s)=>{let r,a,o;const i={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),a=r.length;a-- >0;)o=r[a],s&&!s(o,e,t)||i[o]||(t[o]=e[o],i[o]=!0);e=!1!==n&&Po(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Mo,kindOfTest:Uo,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return-1!==s&&s===n},toArray:e=>{if(!e)return null;if(jo(e))return e;let t=e.length;if(!Wo(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Oo]).call(e);let s;for(;(s=n.next())&&!s.done;){const n=s.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const s=[];for(;null!==(n=e.exec(t));)s.push(n);return s},isHTMLForm:di,hasOwnProperty:bo,hasOwnProp:bo,hasOwnInPrototypeChain:wo,getSafeProp:(e,t)=>null!=e&&wo(e,t)?e[t]:void 0,toSafeFlatObject:e=>{if(null==e||"object"!=typeof e&&"function"!=typeof e)return e;const t=Po(e);if(null===t&&(e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every((t=>{if(vo(t))return!1;const n=Object.getOwnPropertyDescriptor(e,t);return!!n&&n.configurable&&!0===n.writable}))})(e))return e;const n=Object.create(null),s=Object.create(null),r=[];let a=e;for(;null!=a&&-1===r.indexOf(a);){r.push(a);const o=a===e?t:Po(a);if(xo(a,o,a===e))break;const i=Object.getOwnPropertyNames(a);Object.getOwnPropertySymbols&&i.push(...Object.getOwnPropertySymbols(a));for(const t of i)vo(t)||bo(s,t)||(n[t]=e[t],s[t]=!0);a=o}return n},reduceDescriptors:hi,freezeMethods:e=>{hi(e,((t,n)=>{if(Go(e)&&["arguments","caller","callee"].includes(n))return!1;const s=e[n];Go(s)&&(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={},s=e=>{e.forEach((e=>{n[e]=!0}))};return jo(e)?s(e):s(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:oi,global:ii,isContextDefined:ci,isSpecCompliantForm:function(e){return!!(e&&Go(e.append)&&"FormData"===e[Ro]&&e[Oo])},toJSONObject:e=>{const t=new WeakSet,n=e=>{if(Ho(e)){if(t.has(e))return;if(ko(e))return e;if(!("toJSON"in e)){let s;if(t.add(e),Jo(e)){s=[];for(const t of e){const e=n(t);!Vo(e)&&s.push(e)}}else s=jo(e)?[]:{},ai(e,((e,t)=>{const r=n(e);!Vo(r)&&(s[t]=r)}));return t.delete(e),s}}return e};return n(e)},isAsyncFn:fi,isThenable:e=>e&&(Ho(e)||Go(e))&&Go(e.then)&&Go(e.catch),setImmediate:mi,asap:Ci,isIterable:Si,isSafeIterable:e=>null!=e&&wo(e,Oo)&&Si(e)},Ni=_i.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"]);const Ti=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Di=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Pi(e,t){return _i.isArray(e)?e.map((e=>Pi(e,t))):function(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(t,""))}function Oi(e){const t=Object.create(null);return _i.forEach(e.toJSON(),((e,n)=>{t[n]=(e=>Pi(e,Di))(e)})),t}const Ri=Symbol("internals");function bi(e){return e&&String(e).trim().toLowerCase()}function vi(e){return!1===e||null==e?e:_i.isArray(e)?e.map(vi):(e=>Pi(e,Ti))(String(e))}const xi=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function wi(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}function Mi(e,t,n,s,r){return _i.isFunction(s)?s.call(this,t,n):(r&&(t=n),_i.isString(t)?_i.isString(s)?-1!==t.indexOf(s):_i.isRegExp(s)?s.test(t):void 0:void 0)}class Li{constructor(e){e&&this.set(e)}set(e,t,n){const s=this;function r(e,t,n){const r=bi(t);if(!r)return;const a=_i.findKey(s,r);(!a||void 0===s[a]||!0===n||void 0===n&&!1!==s[a])&&(s[a||t]=vi(e))}const a=(e,t)=>_i.forEach(e,((e,n)=>r(e,n,t)));if(_i.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(_i.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,s,r;return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),s=e.substring(r+1).trim();const a=_i.hasOwnProp(t,n);!n||a&&_i.hasOwnProp(Ni,n)||("set-cookie"===n?a?t[n].push(s):t[n]=[s]:t[n]=a?t[n]+", "+s:s)})),t})(e),t);else if(_i.isObject(e)&&_i.isSafeIterable(e)){let n,s,r=Object.create(null);for(const t of e){if(!_i.isArray(t))throw new TypeError("Object iterator must return a key-value pair");s=t[0],_i.hasOwnProp(r,s)?(n=r[s],r[s]=_i.isArray(n)?[...n,t[1]]:[n,t[1]]):r[s]=t[1]}a(r,t)}else null!=e&&r(t,e,n);return this}get(e,t){if(e=bi(e)){const n=_i.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 s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}(e);if(_i.isFunction(t))return t.call(this,e,n);if(_i.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=bi(e)){const n=_i.findKey(this,e);return!(!n||void 0===this[n]||t&&!Mi(0,this[n],n,t))}return!1}delete(e,t){const n=this;let s=!1;function r(e){if(e=bi(e)){const r=_i.findKey(n,e);!r||t&&!Mi(0,n[r],r,t)||(delete n[r],s=!0)}}return _i.isArray(e)?e.forEach(r):r(e),s}clear(e){const t=Object.keys(this);let n=t.length,s=!1;for(;n--;){const r=t[n];e&&!Mi(0,this[r],r,e,!0)||(delete this[r],s=!0)}return s}normalize(e){const t=this,n={};return _i.forEach(this,((s,r)=>{const a=_i.findKey(n,r);if(a)return t[a]=vi(s),void delete t[r];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(r):String(r).trim();o!==r&&delete t[r],t[o]=vi(s),n[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return _i.forEach(this,((n,s)=>{null!=n&&!1!==n&&(t[s]=e&&_i.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")}getSetCookie(){const e=this.get("set-cookie");return _i.isArray(e)?e:null==e||!1===e?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return function(e){const t=Object.create(null),n=String(e);let s=0,r=!1,a=!1;function o(e){const r=wi(n.slice(s,e)),a=r.indexOf("=");if(a<1)return;const o=wi(r.slice(0,a));if(!xi.test(o))return;const i=o.toLowerCase();if("__proto__"===i||"constructor"===i||"prototype"===i)return;const c=wi(r.slice(a+1));t[i]=function(e){const t=e.length-1;if(t<1||34!==e.charCodeAt(0)||34!==e.charCodeAt(t))return e;let n="";for(let s=1;s<t;s++){const r=e.charCodeAt(s);if(34===r)return e;if(92===r&&(s+=1,s>=t))return e;n+=e[s]}return n}(c)}for(let e=0;e<n.length;e++){const t=n.charCodeAt(e);r?a?a=!1:92===t?a=!0:34===t&&(r=!1):34===t?r=!0:44!==t&&59!==t||(o(e),s=e+1)}return o(n.length),t}(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Ri]=this[Ri]={accessors:{}}).accessors,n=this.prototype;function s(e){const s=bi(e);t[s]||(!function(e,t){const n=_i.toCamelCase(" "+t);["get","set","has"].forEach((s=>{Object.defineProperty(e,s+n,{__proto__:null,value:function(e,n,r){return this[s].call(this,t,e,n,r)},configurable:!0})}))}(n,e),t[s]=!0)}return _i.isArray(e)?e.forEach(s):s(e),this}}Li.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_i.reduceDescriptors(Li.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),_i.freezeMethods(Li);const Ui=Li,Fi="[REDACTED ****]";function ji(e,t){const n=new Set(t.map((e=>String(e).toLowerCase()))),s=[],r=e=>{if(null===e||"object"!=typeof e)return e;if(_i.isBuffer(e))return e;if(-1!==s.indexOf(e))return;let t;if(e instanceof Ui&&(e=e.toJSON()),s.push(e),_i.isArray(e))t=[],e.forEach(((e,n)=>{const s=r(e);_i.isUndefined(s)||(t[n]=s)}));else{if(!_i.isPlainObject(e)&&function(e){if(_i.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(_i.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return s.pop(),e;t=Object.create(null);for(const[s,a]of Object.entries(e)){const e=n.has(s.toLowerCase())?Fi:r(a);_i.isUndefined(e)||(t[s]=e)}}return s.pop(),t};return r(e)}function Vi(e){try{return String(e)}catch(e){return""}}class ki extends Error{static from(e,t,n,s,r,a){let o=e.message;!o&&_i.isArray(e.errors)&&e.errors.length&&(o=function(e){return e.errors.map((e=>{try{return e&&e.message?Vi(e.message):Vi(e)}catch(e){return""}})).filter(Boolean).join("; ")||e.name||"AggregateError"}(e));const i=new ki(o,t||e.code,n,s,r);return Object.defineProperty(i,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),i.name=e.name,null!=e.status&&null==i.status&&(i.status=e.status),a&&Object.assign(i,a),i}constructor(e,t,n,s,r){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),r&&(this.response=r,this.status=r.status)}toJSON(){const e=this.config,t=e&&_i.hasOwnProp(e,"redact")?e.redact:void 0,n=_i.isArray(t)&&t.length>0?ji(e,t):_i.toJSONObject(e);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:n,code:this.code,status:this.status}}}ki.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ki.ERR_BAD_OPTION="ERR_BAD_OPTION",ki.ECONNABORTED="ECONNABORTED",ki.ETIMEDOUT="ETIMEDOUT",ki.ECONNREFUSED="ECONNREFUSED",ki.ERR_NETWORK="ERR_NETWORK",ki.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ki.ERR_DEPRECATED="ERR_DEPRECATED",ki.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ki.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ki.ERR_CANCELED="ERR_CANCELED",ki.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ki.ERR_INVALID_URL="ERR_INVALID_URL",ki.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Bi=ki,$i=null;function Gi(e){return _i.isPlainObject(e)||_i.isArray(e)}function Wi(e){return _i.endsWith(e,"[]")?e.slice(0,-2):e}function Hi(e,t,n){return e?e.concat(t).map((function(e,t){return e=Wi(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const qi=_i.toFlatObject(_i,{},null,(function(e){return/^is[A-Z]/.test(e)}));const zi=function(e,t,n){if(!_i.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const s=(e,t)=>{const s=_i.getSafeProp(n,e);return _i.isUndefined(s)?t:s},r=s("metaTokens",!0),a=s("visitor")||h,o=s("dots",!1),i=s("indexes",!1),c=s("Blob")||"undefined"!=typeof Blob&&Blob,l=s("maxDepth",100),u=c&&_i.isSpecCompliantForm(t),d=[];if(!_i.isFunction(a))throw new TypeError("visitor must be a function");function p(e){if(null===e)return"";if(_i.isDate(e))return e.toISOString();if(_i.isBoolean(e))return e.toString();if(!u&&_i.isBlob(e))throw new Bi("Blob is not supported. Use a Buffer instead.");if(_i.isArrayBuffer(e)||_i.isTypedArray(e)){if(u&&"function"==typeof c)return new c([e]);throw new Bi("Blob is not supported. Use a Buffer instead.",Bi.ERR_NOT_SUPPORT)}return e}function g(e){if(e>l)throw new Bi("Object is too deeply nested ("+e+" levels). Max depth: "+l,Bi.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(e,n,s){let a=e;if(_i.isReactNative(t)&&_i.isReactNativeBlob(e))return t.append(Hi(s,n,o),p(e)),!1;if(e&&!s&&"object"==typeof e)if(_i.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=function(e,t){if(l===1/0)return JSON.stringify(e);const n=[];return JSON.stringify(e,(function(e,s){if(!_i.isObject(s))return s;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(s),g(t+n.length-1),s}))}(e,1);else if(_i.isArray(e)&&function(e){return _i.isArray(e)&&!e.some(Gi)}(e)||(_i.isFileList(e)||_i.endsWith(n,"[]"))&&(a=_i.toArray(e)))return n=Wi(n),a.forEach((function(e,s){!_i.isUndefined(e)&&null!==e&&t.append(!0===i?Hi([n],s,o):null===i?n:n+"[]",p(e))})),!1;return!!Gi(e)||(t.append(Hi(s,n,o),p(e)),!1)}const f=Object.assign(qi,{defaultVisitor:h,convertValue:p,isVisitable:Gi});if(!_i.isObject(e))throw new TypeError("data must be an object");return function e(n,s,r=0){if(!_i.isUndefined(n)){if(g(r),-1!==d.indexOf(n))throw new Error("Circular reference detected in "+s.join("."));d.push(n),_i.forEach(n,(function(n,o){!0===(!(_i.isUndefined(n)||null===n)&&a.call(t,n,_i.isString(o)?o.trim():o,s,f))&&e(n,s?s.concat(o):[o],r+1)})),d.pop()}}(e),t};function Yi(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,(function(e){return t[e]}))}function Ki(e,t){this._pairs=[],e&&zi(e,this,t)}const Qi=Ki.prototype;Qi.append=function(e,t){this._pairs.push([e,t])},Qi.toString=function(e){const t=e?t=>e.call(this,t,Yi):Yi;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Ji=Ki;function Xi(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Zi(e,t,n){if(!t)return e;e=e||"";const s=_i.isFunction(n)?{serialize:n}:n,r=_i.getSafeProp(s,"encode")||Xi,a=_i.getSafeProp(s,"serialize");let o;if(o=a?a(t,s):_i.isURLSearchParams(t)?t.toString():new Ji(t,s).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const ec=Symbol("internals");function tc(e){return e?e.length:0}function nc(e){if(e)for(;e.length&&null===e[e.length-1];)e.pop()}function sc(e,t){const n=e.handlers,s=tc(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):s!==t.handlersLength&&(s?t.handlerEntries.forEach((function(e,s){n[e.index]!==e.handler&&t.handlerEntries.delete(s)})):t.handlerEntries.clear()),t.handlersLength=s}const rc=class{constructor(){this.handlers=[],this[ec]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,t,n){const s={fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null},r=this[ec];null==this.handlers&&(this.handlers=[]),sc(this,r);const a=r.nextId++;return this.handlers.push(s),r.handlerEntries.set(a,{handler:s,index:this.handlers.length-1}),r.handlersLength=this.handlers.length,a}eject(e){const t=this[ec];sc(this,t);const n=t.handlerEntries.get(e);if(n){if(t.handlerEntries.delete(e),this.handlers[n.index]!==n.handler)return;this.handlers[n.index]=null,t.iterationDepth||(nc(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],sc(this,this[ec]))}forEach(e){const t=this[ec];sc(this,t),t.iterationDepth++;try{_i.forEach(this.handlers,(function(t){null!==t&&e(t)}))}finally{--t.iterationDepth||(sc(this,t),nc(this.handlers),t.handlersLength=tc(this.handlers))}}},ac={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},oc={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Ji,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ic="undefined"!=typeof window&&"undefined"!=typeof document,cc="object"==typeof navigator&&navigator||void 0,lc=ic&&(!cc||["ReactNative","NativeScript","NS"].indexOf(cc.product)<0),uc="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,dc=ic&&window.location.href||"http://localhost",pc={...s,...oc};const gc=100;function hc(e){if(e>gc)throw new Bi("FormData field is too deeply nested ("+e+" levels). Max depth: "+gc,Bi.ERR_FORM_DATA_DEPTH_EXCEEDED)}const fc=function(e){function t(e,n,s,r){hc(r);let a=e[r++];if("__proto__"===a)return!0;const o=Number.isFinite(+a),i=r>=e.length;if(a=!a&&_i.isArray(s)?s.length:a,i)return _i.hasOwnProp(s,a)?s[a]=_i.isArray(s[a])?s[a].concat(n):[s[a],n]:s[a]=n,!o;_i.hasOwnProp(s,a)&&_i.isObject(s[a])||(s[a]=[]);return t(e,n,s[a],r)&&_i.isArray(s[a])&&(s[a]=function(e){const t={},n=Object.keys(e);let s;const r=n.length;let a;for(s=0;s<r;s++)a=n[s],t[a]=e[a];return t}(s[a])),!o}if(_i.isFormData(e)&&_i.isFunction(e.entries)){const n={};return _i.forEachEntry(e,((e,s)=>{t(function(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let s;for(;null!==(s=n.exec(e));)hc(t.length),t.push("[]"===s[0]?"":s[1]||s[0]);return t}(e),s,n,0)})),n}return null},mc=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Ic=(e,t)=>null!=e&&_i.hasOwnProp(e,t)?e[t]:void 0;const Ec={transitional:ac,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",s=n.indexOf("application/json")>-1,r=_i.isObject(e);r&&_i.isHTMLForm(e)&&(e=new FormData(e));if(_i.isFormData(e))return s?JSON.stringify(fc(e)):e;if(_i.isArrayBuffer(e)||_i.isBuffer(e)||_i.isStream(e)||_i.isFile(e)||_i.isBlob(e)||_i.isReadableStream(e))return e;if(_i.isArrayBufferView(e))return e.buffer;if(_i.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(r){const t=Ic(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return zi(e,new pc.classes.URLSearchParams,{visitor:function(e,t,n,s){return pc.isNode&&_i.isBuffer(e)?(this.append(t,e.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((a=_i.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=Ic(this,"env"),s=n&&n.FormData;return zi(a?{"files[]":e}:e,s&&new s,t)}}return r||s?(t.setContentType("application/json",!1),function(e,t,n){if(_i.isString(e))try{return(t||JSON.parse)(e),_i.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=Ic(this,"transitional")||Ec.transitional,n=t&&t.forcedJSONParsing,s=Ic(this,"responseType"),r="json"===s;if(_i.isResponse(e)||_i.isReadableStream(e))return e;if(e&&_i.isString(e)&&(n&&!s||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,Ic(this,"parseReviver"))}catch(e){if(n){if("SyntaxError"===e.name)throw Bi.from(e,Bi.ERR_BAD_RESPONSE,this,null,Ic(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pc.classes.FormData,Blob:pc.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_i.forEach(mc,(e=>{Ec.headers[e]={}}));const yc=Ec;function Ac(e,t){const n=this||yc,s=t||n,r=Ui.from(s.headers);let a=s.data;return _i.forEach(e,(function(e){a=e.call(n,a,r.normalize(),t?t.status:void 0)})),r.normalize(),a}function Cc(e){return!(!e||!e.__CANCEL__)}const Sc=class extends Bi{constructor(e,t,n){super(null==e?"canceled":e,Bi.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function _c(e,t,n){const s=n.config.validateStatus;n.status&&s&&!s(n.status)?t(new Bi("Request failed with status code "+n.status,n.status>=400&&n.status<500?Bi.ERR_BAD_REQUEST:Bi.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}const Nc=/[\t\n\r]/g;function Tc(e){if("string"!=typeof e)return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(Nc,"")}function Dc(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}const Pc=function(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r,a=0,o=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),l=s[o];r||(r=c),n[a]=i,s[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-r<t)return;const p=l&&c-l;return p?Math.round(1e3*d/p):void 0}};const Oc=function(e,t){let n,s,r=0,a=1e3/t;const o=(t,a=Date.now())=>{r=a,n=null,s&&(clearTimeout(s),s=null),e(...t)};return[(...e)=>{const t=Date.now(),i=t-r;i>=a?o(e,t):(n=e,s||(s=setTimeout((()=>{s=null,o(n)}),a-i)))},()=>n&&o(n),(...e)=>o(e)]},Rc=(e,t,n=3)=>{let s=0;const r=Pc(50,250);return Oc((n=>{if(!n||!_i.isNumber(n.loaded))return;const a=n.loaded,o=n.lengthComputable?n.total:void 0,i=Math.max(0,null!=o?Math.min(a,o):a),c=Math.max(0,i-s),l=r(c);s=Math.max(s,i);e({loaded:i,total:o,progress:o?i/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-i)/l:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),n)},bc=(e,t)=>{const n=null!=e;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},vc=(e,t=_i.asap)=>(...n)=>t((()=>e(...n))),xc=pc.hasStandardBrowserEnv?(wc=new URL(pc.origin),Mc=pc.navigator&&/(msie|trident)/i.test(pc.navigator.userAgent),e=>(e=new URL(e,pc.origin),wc.protocol===e.protocol&&wc.host===e.host&&(Mc||wc.port===e.port))):()=>!0;var wc,Mc;const Lc=pc.hasStandardBrowserEnv?{write(e,t,n,s,r,a,o){if("undefined"==typeof document)return;const i=[`${e}=${encodeURIComponent(t)}`];_i.isNumber(n)&&i.push(`expires=${new Date(n).toUTCString()}`),_i.isString(s)&&i.push(`path=${s}`),_i.isString(r)&&i.push(`domain=${r}`),!0===a&&i.push("secure"),_i.isString(o)&&i.push(`SameSite=${o}`),document.cookie=i.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const s=t[n].replace(/^\s+/,""),r=s.indexOf("=");if(-1!==r&&s.slice(0,r)===e)try{return decodeURIComponent(s.slice(r+1))}catch(e){return s.slice(r+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};const Uc=/^https?:(?!\/\/)/i;function Fc(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Fi}@`),n=t.indexOf("#"),s=(-1===n?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Fi}`);return-1===n?s:`${s}#${r=t.slice(n+1),r?r.replace(/(^|&)([^=&]*=)?[^&]+/g,((e,t,n="")=>`${t}${n}${Fi}`)):r}`;var r}function jc(e,t){if("string"==typeof e){const n=Tc(e);if(Uc.test(n))throw new Bi(`Invalid URL ${JSON.stringify(Fc(n))}: missing "//" after protocol`,Bi.ERR_INVALID_URL,t)}}function Vc(e,t,n,s){jc(t,s);let r=!("string"==typeof(a=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a));var a;return e&&(r||!1===n)?(jc(e,s),function(e,t){if(!t)return e;let n=e.length;for(;n>0&&47===e.charCodeAt(n-1);)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}(e,t)):t}const kc=e=>e instanceof Ui?{...e}:e,Bc=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter((t=>Object.getOwnPropertyDescriptor(e,t).enumerable))):Object.keys(e);function $c(e,t){e=e||{},t=t||{};const n=Object.create(null);function s(e,t,n,s){return _i.isPlainObject(e)&&_i.isPlainObject(t)?_i.merge.call({caseless:s},e,t):_i.isPlainObject(t)?_i.merge({},t):_i.isArray(t)?t.slice():t}function r(e,t,n,r){return _i.isUndefined(t)?_i.isUndefined(e)?void 0:s(void 0,e,0,r):s(e,t,0,r)}function a(e,t){if(!_i.isUndefined(t))return s(void 0,t)}function o(e,t){return _i.isUndefined(t)?_i.isUndefined(e)?void 0:s(void 0,e):s(void 0,t)}function i(n,r,a){return _i.hasOwnProp(t,a)?s(n,r):_i.hasOwnProp(e,a)?s(void 0,n):void 0}Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutErrorMessage: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,allowedSocketPaths:o,responseEncoding:o,validateStatus:i,headers:(e,t,n)=>r(kc(e),kc(t),0,!0)};return _i.forEach(Bc({...e,...t}),(function(s){if("__proto__"===s||"constructor"===s||"prototype"===s)return;const a=_i.hasOwnProp(c,s)?c[s]:r,o=a(_i.hasOwnProp(e,s)?e[s]:void 0,_i.hasOwnProp(t,s)?t[s]:void 0,s);_i.isUndefined(o)&&a!==i||(n[s]=o)})),_i.hasOwnProp(t,"validateStatus")&&_i.isUndefined(t.validateStatus)&&!1===function(n){const s=_i.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!_i.isUndefined(s)){if(!_i.isPlainObject(s))return;if(_i.hasOwnProp(s,n))return s[n]}const r=_i.hasOwnProp(e,"transitional")?e.transitional:void 0;if(_i.isPlainObject(r)&&_i.hasOwnProp(r,n))return r[n]}("validateStatusUndefinedResolves")&&(_i.hasOwnProp(e,"validateStatus")?n.validateStatus=s(void 0,e.validateStatus):delete n.validateStatus),n}const Gc=["content-type","content-length"];const Wc=function(e){const t=$c({},e),n=e=>_i.hasOwnProp(t,e)?t[e]:void 0,s=n("data");let r=n("withXSRFToken");const a=n("xsrfHeaderName"),o=n("xsrfCookieName");let i=n("headers");const c=n("auth"),l=n("baseURL"),u=n("allowAbsoluteUrls"),d=n("url");if(t.headers=i=Ui.from(i),t.url=Zi(Vc(l,d,u,t),n("params"),n("paramsSerializer")),c){const t=_i.getSafeProp(c,"username")||"",n=_i.getSafeProp(c,"password")||"";try{i.set("Authorization","Basic "+btoa(t+":"+(n?encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,((e,t)=>String.fromCharCode(parseInt(t,16)))):"")))}catch(t){throw Bi.from(t,Bi.ERR_BAD_OPTION_VALUE,e)}}if(_i.isFormData(s)){const e=_i.getSafeProp(s,"getHeaders");pc.hasStandardBrowserEnv||pc.hasStandardBrowserWebWorkerEnv||_i.isReactNative(s)?i.setContentType(void 0):_i.isFunction(e)&&function(e,t,n){"content-only"===n?Object.entries(t||{}).forEach((([t,n])=>{Gc.includes(t.toLowerCase())&&e.set(t,n)})):e.set(t)}(i,e.call(s),n("formDataHeaderPolicy"))}if(pc.hasStandardBrowserEnv){_i.isFunction(r)&&(r=r(t));if(!0===r||null==r&&xc(t.url)){const e=a&&o&&Lc.read(o);e&&i.set(a,e)}}return t},Hc="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const s=Wc(e);let r=s.data;const a=Ui.from(s.headers).normalize();let o,i,c,l,u,d,{responseType:p,onUploadProgress:g,onDownloadProgress:h}=s;function f(){l&&l(),u&&u(),s.cancelToken&&s.cancelToken.unsubscribe(o),s.signal&&s.signal.removeEventListener("abort",o)}let m=new XMLHttpRequest;function I(r){if(!m)return;if(!(0!==m.status||"file"===(Dc(Tc(s.url))||Dc(pc.origin))||m.responseURL&&m.responseURL.startsWith("file:")))return n(new Bi("Request aborted",Bi.ECONNABORTED,e,m)),f(),void(m=null);try{r?d&&d(r):u&&u()}catch(e){setTimeout((()=>{throw e}))}if(!m)return;const a=Ui.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());_c((function(e){t(e),f()}),(function(e){n(e),f()}),{data:p&&"text"!==p&&"json"!==p?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:a,config:e,request:m}),m=null}m.open(s.method.toUpperCase(),s.url,!0),m.timeout=s.timeout,"onloadend"in m?m.onloadend=I:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&m.responseURL.startsWith("file:"))&&setTimeout(I)},m.onabort=function(){m&&(n(new Bi("Request aborted",Bi.ECONNABORTED,e,m)),f(),m=null)},m.onerror=function(t){const s=t&&t.message?t.message:"Network Error",r=new Bi(s,Bi.ERR_NETWORK,e,m);r.event=t||null,n(r),f(),m=null},m.ontimeout=function(){let t=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const r=s.transitional||ac;s.timeoutErrorMessage&&(t=s.timeoutErrorMessage),n(new Bi(t,r.clarifyTimeoutError?Bi.ETIMEDOUT:Bi.ECONNABORTED,e,m)),f(),m=null},void 0===r&&a.setContentType(null),"setRequestHeader"in m&&_i.forEach(Oi(a),(function(e,t){m.setRequestHeader(t,e)})),_i.isUndefined(s.withCredentials)||(m.withCredentials=!!s.withCredentials),p&&"json"!==p&&(m.responseType=s.responseType),h&&([c,u,d]=Rc(h,!0),m.addEventListener("progress",c)),g&&m.upload&&([i,l]=Rc(g),m.upload.addEventListener("progress",i),m.upload.addEventListener("loadend",l)),(s.cancelToken||s.signal)&&(o=t=>{m&&(n(!t||t.type?new Sc(null,e,m):t),m.abort(),f(),m=null)},s.cancelToken&&s.cancelToken.subscribe(o),s.signal&&(s.signal.aborted?o():s.signal.addEventListener("abort",o)));const E=Dc(s.url);if(E&&!pc.protocols.includes(E))return n(new Bi("Unsupported protocol "+E+":",Bi.ERR_BAD_REQUEST,e)),void f();m.send(r||null)}))},qc=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let s=!1;const r=function(e){if(!s){s=!0,o();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Bi?t:new Sc(t instanceof Error?t.message:t))}};let a=t&&setTimeout((()=>{a=null,r(new Bi(`timeout of ${t}ms exceeded`,Bi.ETIMEDOUT))}),t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(r):e.removeEventListener("abort",r)})),e=null)};e.forEach((e=>{s||(e.aborted?r.call(e):e.addEventListener("abort",r,{once:!0}))}));const{signal:i}=n;return i.unsubscribe=()=>_i.asap(o),i},zc=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let s,r=0;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},Yc=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Kc=(e,t,n,s)=>{const r=async function*(e,t){for await(const n of Yc(e))yield*zc(n,t)}(e,t);let a,o=0,i=e=>{a||(a=!0,s&&s(e))};return new ReadableStream({async pull(e){try{const{done:t,value:s}=await r.next();if(t)return i(),void e.close();let a=s.byteLength;if(n){let e=o+=a;n(e)}e.enqueue(new Uint8Array(s))}catch(e){throw i(e),e}},cancel:e=>(i(e),r.return())},{highWaterMark:2})},Qc=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Jc=(e,t,n)=>t+2<n&&Qc(e.charCodeAt(t+1))&&Qc(e.charCodeAt(t+2)),Xc=e=>e<=57?e-48:(223&e)-55,Zc=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||43===e||47===e||45===e||95===e,el=e=>{const t=e.length;let n=0;return t>0&&61===e.charCodeAt(t-1)&&(n++,t>1&&61===e.charCodeAt(t-2)&&n++),Math.floor(3*(t-n)/4)},tl=e=>{const t=e.length;let n=0,s=0,r=!1;for(let o=0;o<t;o++){let i=e.charCodeAt(o);37===i&&Jc(e,o,t)&&(i=16*Xc(e.charCodeAt(o+1))+Xc(e.charCodeAt(o+2)),o+=2),9!==(a=i)&&10!==a&&12!==a&&13!==a&&32!==a&&(61!==i?!Zc(i)||s>0?r=!0:n++:s++)}var a;return r||s>2||s>0&&(n+s)%4!=0||n%4==1?el(e):(e=>{const t=e%4;return 3*Math.floor(e/4)+(2===t?1:3===t?2:0)})(n)},nl=(e,t)=>{if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const s=e.slice(5,n),r=e.slice(n+1);if(/;base64/i.test(s))return t(r);let a=0;for(let e=0,t=r.length;e<t;e++){const n=r.charCodeAt(e);if(37===n&&Jc(r,e,t))a+=1,e+=2;else if(n<128)a+=1;else if(n<2048)a+=2;else if(n>=55296&&n<=56319&&e+1<t){const t=r.charCodeAt(e+1);t>=56320&&t<=57343?(a+=4,e++):a+=3}else a+=3}return a};const sl="1.20.0",rl={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:al}=_i,ol=e=>{if(!_i.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},il=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},cl=e=>{const t=void 0!==_i.global&&null!==_i.global?_i.global:globalThis,{ReadableStream:n,TextEncoder:s}=t;e=_i.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:r,Request:a,Response:o}=e,i=r?al(r):"function"==typeof fetch,c=al(a),l=al(o);if(!i)return!1;const u=i&&al(n),d=i&&("function"==typeof s?(p=new s,e=>p.encode(e)):async e=>new Uint8Array(await new a(e).arrayBuffer()));var p;const g=c&&u&&il((()=>{let e=!1;const t=new a(pc.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),s=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!s})),h=l&&u&&il((()=>_i.isReadableStream(new o("").body))),f={stream:h&&(e=>e.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!f[e]&&(f[e]=(t,n)=>{let s=t&&t[e];if(s)return s.call(t);throw new Bi(`Response type '${e}' is not supported`,Bi.ERR_NOT_SUPPORT,n)})}));const m=async e=>{if(null==e)return 0;if(_i.isBlob(e))return e.size;if(_i.isSpecCompliantForm(e)){const t=new a(pc.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return _i.isArrayBufferView(e)||_i.isArrayBuffer(e)?e.byteLength:(_i.isURLSearchParams(e)&&(e+=""),_i.isString(e)?(await d(e)).byteLength:void 0)};return async e=>{let{url:t,method:n,data:i,signal:l,cancelToken:d,timeout:p,onDownloadProgress:I,onUploadProgress:E,responseType:y,headers:A,withCredentials:C="same-origin",fetchOptions:S,maxContentLength:_,maxBodyLength:N,maxRedirects:T}=Wc(e);const D=_i.isNumber(_)&&_>-1,P=_i.isNumber(N)&&N>-1;let O=r||fetch;y=y?(y+"").toLowerCase():"text";let R=qc([l,d&&d.toAbortSignal()],p),b=null;const v=R&&R.unsubscribe&&(()=>{R.unsubscribe()});let x,w=null;const M=()=>new Bi("Request body larger than maxBodyLength limit",Bi.ERR_BAD_REQUEST,e,b);try{let r;const l=(U="auth",_i.hasOwnProp(e,U)?e[U]:void 0);if(l){const e=_i.getSafeProp(l,"username")||"";r={username:e,password:_i.getSafeProp(l,"password")||""}}if((e=>{const t=e.indexOf("://");let n=e;return-1!==t&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")})(t)){const e=new URL(t,pc.origin);if(!r&&(e.username||e.password)){const t=ol(e.username);r={username:t,password:ol(e.password)}}(e.username||e.password)&&(e.username="",e.password="",t=e.href)}if(r&&(A.delete("authorization"),A.set("Authorization","Basic "+btoa((L=(r.username||"")+":"+(r.password||""),encodeURIComponent(L).replace(/%([0-9A-F]{2})/gi,((e,t)=>String.fromCharCode(parseInt(t,16)))))))),D&&"string"==typeof t&&t.startsWith("data:")){const n=function(e){const t="string"==typeof e?e.indexOf("#"):-1;return nl(-1===t?e:e.slice(0,t),tl)}(t);if(n>_)throw new Bi("maxContentLength size of "+_+" exceeded",Bi.ERR_BAD_RESPONSE,e,b)}if(P&&"get"!==n&&"head"!==n){const e=await m(i);if("number"==typeof e&&isFinite(e)&&(x=e,e>N))throw M()}const d=P&&(_i.isReadableStream(i)||_i.isStream(i)),p=(e,t,n)=>Kc(e,65536,(e=>{if(P&&e>N)throw w=M();t&&t(e)}),n);if(g&&"get"!==n&&"head"!==n&&(E||d)){if(x=null==x?await(async(e,t)=>{const n=_i.toFiniteNumber(e.getContentLength());return null==n?m(t):n})(A,i):x,0!==x||d){let e,n=new a(t,{method:"POST",body:i,duplex:"half"});if(_i.isFormData(i)&&(e=n.headers.get("content-type"))&&A.setContentType(e),n.body){const[e,t]=E&&bc(x,Rc(vc(E)))||[];i=p(n.body,e,t)}}}else if(d&&!c&&u&&"get"!==n&&"head"!==n)i=p(i);else if(d&&c&&!g&&"get"!==n&&"head"!==n)throw new Bi("Stream request bodies are not supported by the current fetch implementation",Bi.ERR_NOT_SUPPORT,e,b);_i.isString(C)||(C=C?"include":"omit");const F=c&&"credentials"in a.prototype;if(_i.isFormData(i)){const e=A.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&A.delete("content-type")}A.set("User-Agent","axios/"+sl,!1);const j=null==S?S:Object.assign(Object.create(null),S);j&&(delete j.body,delete j.headers,delete j.method,delete j.signal,delete j.duplex,delete j.credentials);const V=Object.assign(Object.create(null),j,{signal:R,method:n.toUpperCase(),headers:Oi(A.normalize()),body:i,duplex:"half",credentials:F?C:void 0});c&&(_i.forEach(rl,((e,t)=>{void 0===V[t]&&(V[t]=e)})),void 0===V.signal&&(V.signal=null),void 0===V.body&&(V.body=null)),0===T&&(V.redirect="manual",j&&(j.redirect="manual")),b=c&&new a(t,V);let k=await(c?O(b,j):O(t,V));const B=Ui.from(k.headers);if(D){const t=_i.toFiniteNumber(B.getContentLength());if(null!=t&&t>_)throw new Bi("maxContentLength size of "+_+" exceeded",Bi.ERR_BAD_RESPONSE,e,b)}const $=h&&("stream"===y||"response"===y);if(h&&k.body&&(I||D||$&&v)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=k[e]}));const n=_i.toFiniteNumber(B.getContentLength()),[s,r]=I&&bc(n,Rc(vc(I),!0))||[];let a=0;const i=t=>{if(D&&(a=t,a>_))throw new Bi("maxContentLength size of "+_+" exceeded",Bi.ERR_BAD_RESPONSE,e,b);s&&s(t)};k=new o(Kc(k.body,65536,i,(()=>{r&&r(),v&&v()})),t)}y=y||"text";let G=await f[_i.findKey(f,y)||"text"](k,e);if(D&&!h&&!$){let t;if(null!=G&&("number"==typeof G.byteLength?t=G.byteLength:"number"==typeof G.size?t=G.size:"string"==typeof G&&(t="function"==typeof s?(new s).encode(G).byteLength:G.length)),"number"==typeof t&&t>_)throw new Bi("maxContentLength size of "+_+" exceeded",Bi.ERR_BAD_RESPONSE,e,b)}return!$&&v&&v(),await new Promise(((t,n)=>{_c(t,n,{data:G,headers:Ui.from(k.headers),status:k.status,statusText:k.statusText,config:e,request:b})}))}catch(t){if(v&&v(),R&&R.aborted&&R.reason instanceof Bi){const n=R.reason;throw n.config=e,b&&(n.request=b),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(w)throw b&&!w.request&&(w.request=b),w;if(t instanceof Bi)throw b&&!t.request&&(t.request=b),t;if(t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message)){const n=new Bi("Network Error",Bi.ERR_NETWORK,e,b,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw Bi.from(t,t&&t.code,e,b,t&&t.response)}var L,U}},ll=new Map,ul=e=>{let t=e&&e.env||{};const{fetch:n,Request:s,Response:r}=t,a=[s,r,n];let o,i,c=a.length,l=ll;for(;c--;)o=a[c],i=l.get(o),void 0===i&&l.set(o,i=c?new Map:cl(t)),l=i;return i},dl=(ul(),{http:$i,xhr:Hc,fetch:{get:ul}});_i.forEach(dl,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}}));const pl=e=>`- ${e}`,gl=e=>_i.isFunction(e)||null===e||!1===e;const hl={getAdapter:function(e,t){e=_i.isArray(e)?e:[e];const{length:n}=e;let s,r;const a={};for(let o=0;o<n;o++){let n;if(s=e[o],r=s,!gl(s)&&(r=dl[(n=String(s)).toLowerCase()],void 0===r))throw new Bi(`Unknown adapter '${n}'`);if(r&&(_i.isFunction(r)||(r=r.get(t))))break;a[n||"#"+o]=r}if(!r){const e=Object.entries(a).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let t=n?e.length>1?"since :\n"+e.map(pl).join("\n"):" "+pl(e[0]):"as no adapter specified";throw new Bi("There is no suitable adapter to dispatch the request "+t,Bi.ERR_NOT_SUPPORT)}return r},adapters:dl};function fl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Sc(null,e)}function ml(e){const t=_i.toSafeFlatObject(e);fl(t),t.headers=Ui.from(_i.getSafeProp(t,"headers")),t.data=Ac.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return hl.getAdapter(t.adapter||yc.adapter,t)(t).then((function(e){fl(t),t.response=e;try{e.data=Ac.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=Ui.from(e.headers),e}),(function(e){if(!Cc(e)&&(fl(t),e&&e.response)){t.response=e.response;try{e.response.data=Ac.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=Ui.from(e.response.headers)}return Promise.reject(e)}))}const Il={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Il[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const El={};Il.transitional=function(e,t,n){function s(e,t){return"[Axios v"+sl+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,a)=>{if(!1===e)throw new Bi(s(r," has been removed"+(t?" in "+t:"")),Bi.ERR_DEPRECATED);return t&&!El[r]&&(El[r]=!0,console.warn(s(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},Il.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const yl={assertOptions:function(e,t,n){if("object"!=typeof e||null===e)throw new Bi("options must be an object",Bi.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const a=s[r],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){const t=e[a],n=void 0===t||o(t,a,e);if(!0!==n)throw new Bi("option "+a+" must be "+n,Bi.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Bi("Unknown option "+a,Bi.ERR_BAD_OPTION)}},validators:Il},Al=yl.validators;class Cl{constructor(e){this.defaults=e||{},this.interceptors={request:new rc,response:new rc}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error)try{let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack;let s="";if("string"==typeof n){const e=n.indexOf("\n");s=-1===e?"":n.slice(e+1)}if(e.stack){if(s){const t=s.indexOf("\n"),n=-1===t?-1:s.indexOf("\n",t+1),r=-1===n?"":s.slice(n+1);String(e.stack).endsWith(r)||(e.stack+="\n"+s)}}else e.stack=s}catch(e){}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=$c(this.defaults,t);const{transitional:n,paramsSerializer:s,headers:r}=t;void 0!==n&&yl.assertOptions(n,{silentJSONParsing:Al.transitional(Al.boolean),forcedJSONParsing:Al.transitional(Al.boolean),clarifyTimeoutError:Al.transitional(Al.boolean),legacyInterceptorReqResOrdering:Al.transitional(Al.boolean),advertiseZstdAcceptEncoding:Al.transitional(Al.boolean),validateStatusUndefinedResolves:Al.transitional(Al.boolean)},!1),null!=s&&(_i.isFunction(s)?t.paramsSerializer={serialize:s}:yl.assertOptions(s,{encode:Al.function,serialize:Al.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),yl.assertOptions(t,{baseUrl:Al.spelling("baseURL"),withXsrfToken:Al.spelling("withXSRFToken")},!0),t.method=(_i.getSafeProp(t,"method")||_i.getSafeProp(this.defaults,"method")||"get").toLowerCase();let a=r&&_i.merge(r.common,r[t.method]);r&&_i.forEach(mc.concat("common"),(e=>{delete r[e]})),t.headers=Ui.concat(a,r);const o=[];let i=!0;this.interceptors.request.forEach((function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;i=i&&e.synchronous;const n=t.transitional||ac;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(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=[ml.bind(this),void 0];for(e.unshift(...o),e.push(...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<u;){const e=o[d++],t=o[d++];try{p=e?e(p):p}catch(e){if(!t){l=Promise.reject(e);break}try{const n=t.call(this,e);_i.isThenable(n)&&(l=Promise.resolve(n).then((()=>ml.call(this,p))))}catch(e){l=Promise.reject(e)}break}}if(!l)try{l=ml.call(this,p)}catch(e){l=Promise.reject(e)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(e){return Zi(Vc((e=$c(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}}_i.forEach(["delete","get","head","options"],(function(e){Cl.prototype[e]=function(t,n){return this.request($c(n||{},{method:e,url:t,data:n&&_i.hasOwnProp(n,"data")?n.data:void 0}))}})),_i.forEach(["post","put","patch","query"],(function(e){function t(t){return function(n,s,r){return this.request($c(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:s}))}}Cl.prototype[e]=t(),"query"!==e&&(Cl.prototype[e+"Form"]=t(!0))}));const Sl=Cl;class _l{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 s=new Promise((e=>{n.subscribe(e),t=e})).then(e);return s.cancel=function(){n.unsubscribe(t)},s},e((function(e,s,r){n.reason||(n.reason=new Sc(e,s,r),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)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new _l((function(t){e=t})),cancel:e}}}const Nl=_l;const Tl={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,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent: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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Tl).forEach((([e,t])=>{void 0===Tl[t]&&(Tl[t]=e)}));const Dl=Tl;const Pl=function e(t){const n=new Sl(t),s=To(Sl.prototype.request,n);return _i.extend(s,Sl.prototype,n,{allOwnKeys:!0}),_i.extend(s,n,null,{allOwnKeys:!0}),s.create=function(n){return e($c(t,n))},s}(yc);Pl.Axios=Sl,Pl.CanceledError=Sc,Pl.CancelToken=Nl,Pl.isCancel=Cc,Pl.VERSION=sl,Pl.toFormData=zi,Pl.AxiosError=Bi,Pl.Cancel=Pl.CanceledError,Pl.all=function(e){return Promise.all(e)},Pl.spread=function(e){return function(t){return e.apply(null,t)}},Pl.isAxiosError=function(e){return _i.isObject(e)&&!0===e.isAxiosError},Pl.mergeConfig=$c,Pl.AxiosHeaders=Ui,Pl.formToJSON=e=>fc(_i.isHTMLForm(e)?new FormData(e):e),Pl.getAdapter=hl.getAdapter,Pl.HttpStatusCode=Dl,Pl.default=Pl;const Ol=Pl;function Rl(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 bl=Rl((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));var vl=function(e,t){return vl=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])},vl(e,t)};function xl(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}vl(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function wl(e,t,n,s){return new(n||(n=Promise))((function(r,a){function o(e){try{c(s.next(e))}catch(e){a(e)}}function i(e){try{c(s.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,i)}c((s=s.apply(e,t||[])).next())}))}function Ml(e,t){var n,s,r,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=i(0),o.throw=i(1),o.return=i(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,i[0]&&(a=0)),a;)try{if(n=1,s&&(r=2&i[0]?s.return:i[0]?s.throw||((r=s.return)&&r.call(s),0):s.next)&&!(r=r.call(s,i[1])).done)return r;switch(s=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,s=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],s=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}Object.create;function Ll(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],s=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ul(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var s,r,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(s=a.next()).done;)o.push(s.value)}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o}function Fl(e,t,n){if(n||2===arguments.length)for(var s,r=0,a=t.length;r<a;r++)!s&&r in t||(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}function jl(e){return this instanceof jl?(this.v=e,this):new jl(e)}function Vl(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,r=n.apply(e,t||[]),a=[];return s=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",(function(e){return function(t){return Promise.resolve(t).then(e,l)}})),s[Symbol.asyncIterator]=function(){return this},s;function o(e,t){r[e]&&(s[e]=function(t){return new Promise((function(n,s){a.push([e,t,n,s])>1||i(e,t)}))},t&&(s[e]=t(s[e])))}function i(e,t){try{(n=r[e](t)).value instanceof jl?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 kl(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Ll(e),t={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(n){t[n]=e[n]&&function(t){return new Promise((function(s,r){(function(e,t,n,s){Promise.resolve(s).then((function(t){e({value:t,done:n})}),t)})(s,r,(t=e[n](t)).done,t.value)}))}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;var Bl=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function $l(e){return"function"==typeof e}function Gl(e){return $l(null==e?void 0:e.then)}var Wl=Rl((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 Hl(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var ql=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,n,s,r;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=Ll(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($l(c))try{c()}catch(e){r=e instanceof Wl?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=Ll(l),d=u.next();!d.done;d=u.next()){var p=d.value;try{Kl(p)}catch(e){r=null!=r?r:[],e instanceof Wl?r=Fl(Fl([],Ul(r)),Ul(e.errors)):r.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(s=u.return)&&s.call(u)}finally{if(n)throw n.error}}}if(r)throw new Wl(r)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Kl(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)&&Hl(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&Hl(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),zl=ql.EMPTY;function Yl(e){return e instanceof ql||e&&"closed"in e&&$l(e.remove)&&$l(e.add)&&$l(e.unsubscribe)}function Kl(e){$l(e)?e():e.unsubscribe()}var Ql={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Jl={setTimeout:function(e,t){for(var n=[],s=2;s<arguments.length;s++)n[s-2]=arguments[s];var r=Jl.delegate;return(null==r?void 0:r.setTimeout)?r.setTimeout.apply(r,Fl([e,t],Ul(n))):setTimeout.apply(void 0,Fl([e,t],Ul(n)))},clearTimeout:function(e){var t=Jl.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Xl(e){Jl.setTimeout((function(){var t=Ql.onUnhandledError;if(!t)throw e;t(e)}))}function Zl(){}var eu=tu("C",void 0,void 0);function tu(e,t,n){return{kind:e,value:t,error:n}}var nu=null;function su(e){if(Ql.useDeprecatedSynchronousErrorHandling){var t=!nu;if(t&&(nu={errorThrown:!1,error:null}),e(),t){var n=nu,s=n.errorThrown,r=n.error;if(nu=null,s)throw r}}else e()}var ru=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Yl(t)&&t.add(n)):n.destination=du,n}return xl(t,e),t.create=function(e,t,n){return new cu(e,t,n)},t.prototype.next=function(e){this.isStopped?uu(function(e){return tu("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?uu(tu("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?uu(eu,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}(ql),au=Function.prototype.bind;function ou(e,t){return au.call(e,t)}var iu=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){lu(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){lu(e)}else lu(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){lu(e)}},e}(),cu=function(e){function t(t,n,s){var r,a,o=e.call(this)||this;$l(t)||!t?r={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=s?s:void 0}:o&&Ql.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return o.unsubscribe()},r={next:t.next&&ou(t.next,a),error:t.error&&ou(t.error,a),complete:t.complete&&ou(t.complete,a)}):r=t;return o.destination=new iu(r),o}return xl(t,e),t}(ru);function lu(e){var t;Ql.useDeprecatedSynchronousErrorHandling?(t=e,Ql.useDeprecatedSynchronousErrorHandling&&nu&&(nu.errorThrown=!0,nu.error=t)):Xl(e)}function uu(e,t){var n=Ql.onStoppedNotification;n&&Jl.setTimeout((function(){return n(e,t)}))}var du={closed:!0,next:Zl,error:function(e){throw e},complete:Zl},pu="function"==typeof Symbol&&Symbol.observable||"@@observable";function gu(e){return e}function hu(e){return 0===e.length?gu:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var fu=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 s,r=this,a=(s=e)&&s instanceof ru||function(e){return e&&$l(e.next)&&$l(e.error)&&$l(e.complete)}(s)&&Yl(s)?e:new cu(e,t,n);return su((function(){var e=r,t=e.operator,n=e.source;a.add(t?t.call(a,n):n?r._subscribe(a):r._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=mu(t))((function(t,s){var r=new cu({next:function(t){try{e(t)}catch(e){s(e),r.unsubscribe()}},error:s,complete:t});n.subscribe(r)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[pu]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return hu(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=mu(e))((function(e,n){var s;t.subscribe((function(e){return s=e}),(function(e){return n(e)}),(function(){return e(s)}))}))},e.create=function(t){return new e(t)},e}();function mu(e){var t;return null!==(t=null!=e?e:Ql.Promise)&&void 0!==t?t:Promise}function Iu(e){return $l(e[pu])}function Eu(e){return Symbol.asyncIterator&&$l(null==e?void 0:e[Symbol.asyncIterator])}function yu(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 Au="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Cu(e){return $l(null==e?void 0:e[Au])}function Su(e){return Vl(this,arguments,(function(){var t,n,s;return Ml(this,(function(r){switch(r.label){case 0:t=e.getReader(),r.label=1;case 1:r.trys.push([1,,9,10]),r.label=2;case 2:return[4,jl(t.read())];case 3:return n=r.sent(),s=n.value,n.done?[4,jl(void 0)]:[3,5];case 4:return[2,r.sent()];case 5:return[4,jl(s)];case 6:return[4,r.sent()];case 7:return r.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function _u(e){return $l(null==e?void 0:e.getReader)}function Nu(e){if(e instanceof fu)return e;if(null!=e){if(Iu(e))return r=e,new fu((function(e){var t=r[pu]();if($l(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(Bl(e))return s=e,new fu((function(e){for(var t=0;t<s.length&&!e.closed;t++)e.next(s[t]);e.complete()}));if(Gl(e))return n=e,new fu((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,Xl)}));if(Eu(e))return Tu(e);if(Cu(e))return t=e,new fu((function(e){var n,s;try{for(var r=Ll(t),a=r.next();!a.done;a=r.next()){var o=a.value;if(e.next(o),e.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(s=r.return)&&s.call(r)}finally{if(n)throw n.error}}e.complete()}));if(_u(e))return Tu(Su(e))}var t,n,s,r;throw yu(e)}function Tu(e){return new fu((function(t){(function(e,t){var n,s,r,a;return wl(this,void 0,void 0,(function(){var o,i;return Ml(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=kl(e),c.label=1;case 1:return[4,n.next()];case 2:if((s=c.sent()).done)return[3,4];if(o=s.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(),r={error:i},[3,11];case 6:return c.trys.push([6,,9,10]),s&&!s.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(r)throw r.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function Du(e,t,n,s,r){void 0===s&&(s=0),void 0===r&&(r=!1);var a=t.schedule((function(){n(),r?e.add(this.schedule(null,s)):this.unsubscribe()}),s);if(e.add(a),!r)return a}function Pu(e){return function(t){if(function(e){return $l(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 Ou(e,t,n,s,r){return new Ru(e,t,n,s,r)}var Ru=function(e){function t(t,n,s,r,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=r?function(e){try{r(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,i._complete=s?function(){try{s()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,i}return xl(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}(ru);function bu(e,t){return void 0===t&&(t=0),Pu((function(n,s){n.subscribe(Ou(s,(function(n){return Du(s,e,(function(){return s.next(n)}),t)}),(function(){return Du(s,e,(function(){return s.complete()}),t)}),(function(n){return Du(s,e,(function(){return s.error(n)}),t)})))}))}function vu(e,t){return void 0===t&&(t=0),Pu((function(n,s){s.add(e.schedule((function(){return n.subscribe(s)}),t))}))}function xu(e,t){if(!e)throw new Error("Iterable cannot be null");return new fu((function(n){Du(n,t,(function(){var s=e[Symbol.asyncIterator]();Du(n,t,(function(){s.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function wu(e,t){if(null!=e){if(Iu(e))return function(e,t){return Nu(e).pipe(vu(t),bu(t))}(e,t);if(Bl(e))return function(e,t){return new fu((function(n){var s=0;return t.schedule((function(){s===e.length?n.complete():(n.next(e[s++]),n.closed||this.schedule())}))}))}(e,t);if(Gl(e))return function(e,t){return Nu(e).pipe(vu(t),bu(t))}(e,t);if(Eu(e))return xu(e,t);if(Cu(e))return function(e,t){return new fu((function(n){var s;return Du(n,t,(function(){s=e[Au](),Du(n,t,(function(){var e,t,r;try{t=(e=s.next()).value,r=e.done}catch(e){return void n.error(e)}r?n.complete():n.next(t)}),0,!0)})),function(){return $l(null==s?void 0:s.return)&&s.return()}}))}(e,t);if(_u(e))return function(e,t){return xu(Su(e),t)}(e,t)}throw yu(e)}function Mu(e,t){return t?wu(e,t):Nu(e)}function Lu(e){return Pu((function(t,n){var s,r=null,a=!1;r=t.subscribe(Ou(n,void 0,void 0,(function(o){s=Nu(e(o,Lu(e)(t))),r?(r.unsubscribe(),r=null,s.subscribe(n)):a=!0}))),a&&(r.unsubscribe(),r=null,s.subscribe(n))}))}class Uu{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((s=>s.type===e&&s.name===t&&s.props.index===n))}addNode(e,t,n={}){let s=this.getNode(e,t,n.index);return s?s.props=n:(s=new Uu(e,t,n),s.parent=this,this.children.push(s)),s}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 s=this.children[n];if(s.props.index===t&&s.name===e){this.children.splice(n,1);break}}}}const Fu=Uu;const ju=class{constructor(e,t,n,s={}){this.type=Fs.CONTEXT_TREE_NODE_TYPES.WHEN,this.subType=e,this.referenceName=t,this.name=n,this.props=s}},Vu=/(([^.]+)\[\d+\])/g,ku=e=>{if((e?.split(".")??[]).length<3)return[e];const t=e?.match(Vu);if(!t)return[e];let n,s=t[t.length-1];return e=e?.split(s)[0],e=e?.substring(0,e.length-1),[s,n]=s.split("["),n=n?.split("]")[0],[e,s,n]},Bu=(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:$u,WHEN:Gu,DECLARATIVE_TARGET:Wu,PAGELIST:Hu}=js.CONTEXT_TREE_NODE_TYPES;let qu;const zu=class{constructor(e,t,n={}){this.type=e,this.name=t,this.children=[],this.eventSubscribers=[],this.props=n,this.references=new Map([[$u,new Map],[Gu,new Map],[Wu,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===Hu){const n=this.references.get($u);n.set(e,t),this.references.set($u,n)}}}removePageListNodes(e,t){const n=this.children.filter((t=>t.name.startsWith(e))).filter((n=>{const s=Bu(n.name,e);return-1!==s&&+s>=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),s=t?.parent;s?.removeChildNode(e)}const s=this.references.get($u),r=this.references.get(Wu);[...s.keys(),...r.keys()].filter((t=>t.startsWith(e))).filter((e=>{const[,,n]=ku(e);return+n>=t})).forEach((e=>{const t=s.get(e),n=t?.parent;n?.removeChildren(),s.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((s=>s.type===e&&s.name===t&&s.props.index===n))}addNode(e,t,n={}){let s=this.getNode(e,t,n.index);return s?s.props=n:(s=new Fu(e,t,n),s.parent=this,this.children.push(s)),s}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e){this.eventSubscribers.forEach((t=>{t(e)}))}removeReference(e,t,n){const s=this.references.get(t),r=s?.get(e);if(r?.props?.index===n){const n=r?.props?.context;t===$u&&n&&qu?.(n,e),s.delete(e)}}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const s=this.children[n];if(s.props.index===t&&s.name===e){this.children.splice(n,1);break}}}addWhen(e,t,n,s,r){if(!(n&&s&&e&&t))return;n.startsWith(".")&&(n=n.substring(1));const a=`${e}.${n}.${s}`,o=new ju(t,n,s,r),i=this.references.get("WHEN");i?.set(a,o)}},{VIEW:Yu,FIELD:Ku,CONTEXT:Qu,DECLARATIVE_TARGET:Ju,WHEN:Xu}=Fs.CONTEXT_TREE_NODE_TYPES;const Zu=new class{constructor(){this.rootNodes={}}_isContextNodeExist(e){return Object.keys(this.rootNodes).includes(e)}addContextNode(e){if(!this._isContextNodeExist(e)){const t=new zu(Qu,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 s=this.addContextNode(e).addNode("PAGE",t);let r=s.getReference(n);return r||(r=s.addNode("VIEW",n),s.addReference(n,r)),r}pushChildPageNodeToParentView(e,t,n){const s=e.children;let r=!1;if(s)for(let e=0;e<s.length;e+=1)if(s[e].name===n){r=!0;break}r||s.push(t),t.parent=e}addViewNode(e,t,n,s,r={}){const a=this.addContextNode(e).addNode("PAGE",t);let o=null;if(s&&n!==s){o=this._addParentViewNode(e,t,s).addNode("VIEW",n,r)}else o=a.addNode("VIEW",n,r);a.addReference(n,o);const i=t.split(".");for(;i.length>0;){i.pop();const n=i.join("."),r=this.getContextNode(e)?.getNode("PAGE",n),o=r?.getReference(s);if(o){this.pushChildPageNodeToParentView(o,a,t);break}}return o}getViewNode(e,t,n){return this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n)}addPageListNode(e,t,n,s,r){if(!s)return;s.startsWith(".")&&(s=s.substring(1));const a=this.addContextNode(e),o=a.addNode("PAGE",t)?.getReference(n)?.addNode("PAGELIST",`${t}.${s}`,r);return o&&a.addReference(`${t}.${s}`,o),o}updatePageListNode(e,t,n,s){if(!n)return;n.startsWith(".")&&(n=n.substring(1));this.addContextNode(e).removePageListNodes(`${t}.${n}`,s)}removeFieldNode(e,t,n,s,r){const a=this.getContextNode(e);a?.getNode("PAGE",t)?.getReference(n)?.removeNode(`${t}${s}`,r),a?.removeReference(`${t}${s}`,Ku,r),a?.removeReference(`${t}${s}`,Ju,r)}removeViewNode(e,t,n,s,r={}){const a=this.getContextNode(e),o=a?.getNode("PAGE",t),i=o?.getReference(n);if("visibility"in r&&i?.props&&"visibility"in i.props&&r.visibility!==i.props.visibility)return;this.removeChildViewNodes(e,t,n,s);const c=i?.parent?.children?.findIndex((e=>e.name===n))??-1;c>-1&&i?.parent?.children.splice(c,1)}removeChildViewNodes(e,t,n,s){const r=this.getContextNode(e),a=r?.getNode("PAGE",t),o=a?.getReference(n);o?.children.forEach((a=>{"PAGE"===a.type?this.removeViewNode(e,a.name,n,s):a.type===Yu?this.removeChildViewNodes(e,t,a.name,s):(r.removeReference(a.name,Ku,a.props.index),r.removeReference(a.name,Ju,a.props.index),"PAGELIST"!==a.type&&"Address"!==a.props?.componentName||this.deleteAllListNodes(e,a.name))})),a?.references.delete(n)}deleteAllListNodes(e,t,n=!0){const s=s=>{const r=this.getContextNode(e),a=r?.references?.get(s);if(a)for(const[e]of a)(n&&e===t||e.startsWith(`${t}.`)||e.startsWith(`${t}[`))&&r?.references?.get(s)?.delete(e)};s(Ku),s(Ju)}deleteListNode(e,t,n){const s=s=>{const r=this.getContextNode(e),a=r?.references?.get(s);if(a)for(const[e]of a)e.includes(`${t.join(".")}[${n}]`)&&r?.references?.get(s)?.delete(e)};s(Ku),s(Ju)}getPageListNode(e,t,n,s){const r=this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n);return r?.children.find((e=>"PAGELIST"===e.type&&e.name===`${t}.${s}`))}getFieldNode(e,t,n,s){return this.getViewNode(e,t,n)?.getNode(Ku,s)}_findViewNode(e,t,n,s){let r=s.addNode("PAGE",t)?.getReference(n);if(r)return r;const a=t.split(".");for(;a.length>0;){a.pop();const e=a.join(".");if(r=s.addNode("PAGE",e)?.getReference(n),r)return r}return this.addViewNode(e,t,n)}addFieldNode(e,t,n,s,r,a={}){const o=this.addContextNode(e),i=this._findViewNode(e,t,n,o),c=this.createFieldNode(i,t,s,a);return c&&this.updateFieldNode(o,i,c,e,t,s,r),c}createFieldNode(e,t,n,s){const{isDeclarativeTarget:r}=s;return r?e.addNode(Ju,`${t}${n}`,s):e.addNode(Ku,`${t}${n}`,s)}updateFieldNode(e,t,n,s,r,a,o){const i=`${r}${a}`;"Address"===n.props?.componentName&&this.deleteAllListNodes(s,n.name),e.addReference(i,n),n.value=o,n.setPreviousDefaultValue(),n.props.isInsideList&&this.handleFieldInsideList(e,t,s,r,a)}handleFieldInsideList(e,t,n,s,r){const a=Qy(n),o=Cy(a,n)||{},i=`${s}${r}`;let c=null;if(o?.subscriptFieldName||o?.isPageGroup)c=s.substring(0,s.lastIndexOf(`.${o?.index??""}`))||i.substring(0,i.lastIndexOf(`.${o?.index}`)),this.createListNodeIfNotExist(e,t,c);else{const n=s.substring(0,s.lastIndexOf("["))||i.substring(0,i.lastIndexOf("["));this.createListNodeIfNotExist(e,t,n)}}createListNodeIfNotExist(e,t,n){let s=e.getReference(n,Ku);s||(s=t.addNode(Ku,n,{}),e.addReference(n,s))}removeContextTreeNode(e){delete this.rootNodes[e]}onViewMutate(e,t,n,s){this.getViewNode(e,t,n)?.addEventListener(s)}mutateField(e,t,n,s){const r=this.getContextNode(e),[a,o,i]=ku(t);n.startsWith(".")&&(n=n.substring(1)),o&&this.mutatePageList(e,a,o,{...s,rowIndex:i});const c=r?.getReference(`${t}.${n}`,Ku);c&&c instanceof Fu&&c.triggerEvent(s)}onPageListMutate(e,t,n,s,r){this.getPageListNode(e,t,n,s)?.addEventListener(r)}mutatePageList(e,t,n,s,r=!1){const a=this.getContextNode(e),o=a?.getReference(`${t}.${n}`,Ku);o&&o instanceof Fu&&o.triggerEvent(s,r)}getFieldsList(e){const t=this.getContextNode(e);return t?.references.get(Ku)}getFieldReferenceForProperty(e,t){let n=this.getContextNode(e)?.references?.get(Ku)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(Ju)?.get(t)),n}getFieldReferencePreviousValue(e,t){let n=this.getContextNode(e)?.references?.get(Ku)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(Ju)?.get(t)),n?.value}updateFieldNodeValue(e,t,n){const s=this.getContextNode(e)?.references?.get(Ku)?.get(t);s instanceof Fu&&s&&(s.previousValue=s.value,void 0===s.value&&(s.previousValue=n),s.value=n)}getContextReferences(e){if(!this.getContextNode(e))return;const t=this.getContextReferencesByType(e,Ku),n=this.getContextReferencesByType(e,Ju);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,Ku)?.get(t)||!!this.getContextReferencesByType(e,Ju)?.get(t)}addWhenNode(e,t,n,s,r,a){const o=this.getContextNode(e);o?.addWhen(t,n,s,r,a)}getDeclarativeTargets(e){const t=this.getContextNode(e),n=t?.references?.get(Ju)||new Map,s=[];return n.forEach((e=>{const t=e?.props||{},{propertyName:n=""}=t,r=t.pageReference??Fs.CASE_INFO.CASE_INFO_CONTENT;s.push({pageReference:r,name:n})})),s}getWhens(e){const t=this.getContextNode(e),n=t?.references?.get(Xu)||new Map,s=[];return n.forEach((e=>{const t=e.subType,n=e.referenceName,r=e.name,a=e?.props?.pageReference??Fs.CASE_INFO.CASE_INFO_CONTENT;s.push({name:r,pageReference:a,referenceName:n,type:t})})),s}},ed={CONTENT_FIELDS_PATH:[js.CONTEXT_DATA,js.CASE_INFO.CASE_INFO,js.CONTENT],DATA_OBJECT_CONTENT_FIELDS_PATH:[js.CONTEXT_DATA,js.DATA_INFO.DATA_INFO,js.CONTENT],OBJECT_CONTENT_FIELDS_PATH:[js.CONTEXT_DATA,js.OBJECT_INFO.OBJECT_INFO,js.CONTENT],FIELD_MESSAGES_PATH:[js.CONTEXT_DATA,js.CASE_INFO.CASE_INFO,js.CONTENT,js.SUMMARY_OF_MESSAGES,js.PROPERTY_MESSAGES],DATA_OBJECT_FIELD_MESSAGES_PATH:[js.CONTEXT_DATA,js.DATA_INFO.DATA_INFO,js.CONTENT,js.SUMMARY_OF_MESSAGES,js.PROPERTY_MESSAGES],OBJECT_FIELD_MESSAGES_PATH:[js.CONTEXT_DATA,js.OBJECT_INFO.OBJECT_INFO,js.CONTENT,js.SUMMARY_OF_MESSAGES,js.PROPERTY_MESSAGES],PAGE_MESSAGES_PATH:[js.CONTEXT_DATA,js.SUMMARY_OF_MESSAGES,js.PAGE_MESSAGES],HTTP_MESSAGES_PATH:[js.CONTEXT_DATA,js.SUMMARY_OF_MESSAGES,js.HTTP_MESSAGES],CASE_MESSAGE_PATH:[js.CASEMESSAGES]},td=(e="",t="",n,s)=>{let r=[],a=[];null!==e&&(a=(e=>e?.startsWith(".")?e.substring(1).split("."):e.split("."))(e));const o=t&&t.startsWith(".")?t.substr(1):t;if(n===js.PROPERTY&&e||e){r=[js.CONTEXT_DATA,...o.split(".")];for(let e=0;e<a.length-1;e+=1)r.push(a[e]);r.push(js.SUMMARY_OF_MESSAGES,js.PROPERTY_MESSAGES,a[a.length-1])}else n===Fs.PAGE?r=[...ed.PAGE_MESSAGES_PATH]:n===js.HTTP?r=[...ed.HTTP_MESSAGES_PATH]:n===js.CASEMESSAGES?r=[...ed.CASE_MESSAGE_PATH]:s&&(r=[js.CONTEXT_DATA,...o.split(".")]);return r.filter(Boolean)},nd=(e,t,n)=>{const s={content:{}},r=`${t.split(".").slice(2).join(".")}[${n}]`,a=rS.getIn(e?.content,r.split("."));return a&&rS.setIn(s.content,r.split("."),{...a}),s},sd=(e,t,n,s,r,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,s,r),c=s>r?"up":"down";i&&i?.length>0&&i?.forEach((n=>{const s=parseInt(n.match(/\d+/)?.[0],10),r=`${a}[${s}]`;o[`${a}[${s+("up"===c?1:-1)}]`]=rS.getIn(e[t],[js.CONTEXT_DATA,...r.split(".")]),rS.deleteIn(e[t],[js.CONTEXT_DATA,...r.split(".")])}));const l=Object.keys(o);l.length>0&&l.forEach((n=>{rS.setIn(e[t],[js.CONTEXT_DATA,...n.split(".")],o[n])}))},rd=(e,t,n,s,r)=>{const a=rS.deepClone(rS.getIn(e,[`${t}`])),o=rS.getIn(a,[js.CONTEXT_DATA,js.CASE_INFO.CASE_INFO]);if(!o)return;const i=(e=>{const t=[];let n=0;for(;n<e.length;)n+1<e.length&&!Number.isNaN(parseInt(e[n+1],10))?(t.push(`${e[n]}[${e[n+1]}]`),n+=2):(t.push(e[n]),n+=1);return t.join(".")})(n.split(".")),c=i.substring(0,i.lastIndexOf(".")),l=((e,t,n)=>{const s=rS.getIn(e,[js.CONTEXT_DATA,...n.split(".")],{});return Object.keys(s).filter((e=>e.includes(`${t}[`)))})(a,i.substring(i.lastIndexOf(".")+1),c);if(0===l.length)return;const u=nd(o,i,s).content;if(u&&Object.keys(u).length>0){const n={},o=`${i}[${s}]`,c=rS.getIn(a,[js.CONTEXT_DATA,...o.split(".")]);n[`${i}[${r}]`]=c,rS.deleteIn(e[t],[js.CONTEXT_DATA,...o.split(".")]),sd(e,t,l,s,r,i,n)}else sd(e,t,l,s,r,i)},ad=e=>{const{type:t,property:n,category:s,context:r,pageReference:a}=e;let o;n&&(o=n.slice(1));const i=$C(r);let c=[];const l=rS.getIn(i,td(o,a,s));return t&&"all"!==t?(l&&Array.isArray(l)&&l.length>0&&(c=l.filter((e=>e.type===t))),t===Fs.MESSAGES.MESSAGES_TYPE_ERROR&&c.length>0&&n&&Zu.mutateField(r,a,n,{messages:[...c],type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:n}),c):l},od=e=>{const{property:t,pageReference:n,category:s,context:r,type:a,subType:o,isListEntry:i,clearContextMessages:c,deletingIndex:l}=e,u={context:r,type:a,subType:o};t&&!i?(Zu.mutateField(r,n,t,{type:ca,fieldName:t}),u.property=t,u.pageReference=n):i?(u.pageReference=n,u.isListEntry=i,u.deletingIndex=l):u.category=s,BC(c?{type:ca,payload:{stateObj:e.stateObj,context:r}}:{type:ca,payload:u})},id=e=>{const{messages:t,property:n,pageReference:s,category:r,context:a}=e,o={messages:t,context:a};n?(o.property=n,o.pageReference=s):o.category=r,BC({type:ia,payload:o})},cd=(e,t,n)=>{for(const s of Object.keys(e)){if(t.push(s),s===js.SUMMARY_OF_MESSAGES)n.push([...t]);else{"object"===typeof e[s]&&cd(e[s],t,n)}t.pop()}return n},ld=(e,t)=>{let n=ad({context:js.APP.ROOT,category:"HTTP"});if(PA.getRenderingMode()===js.EMBED){const e=ad({context:js.APP.APP,category:"HTTP"});e&&(n=n?n.concat(e):e)}if(e){const e=ad({context:t,category:"HTTP"});n?e&&(n=n.concat(ad({context:t,category:"HTTP"}))):n=ad({context:t,category:"HTTP"})}return n},ud=e=>{let t=null;t=jy(e)[0]?xy(jy(e)[0]):e,t&&od({context:t,stateObj:$C(t),clearContextMessages:!0})},dd=e=>(rS.getIn($C(e),ed.PAGE_MESSAGES_PATH)??[]).some((e=>e.subType===js.CUSTOM_ERROR)),pd={addMessages:id,getValidationErrorMessages:(e,t)=>{const n=$C(e),s=(e=>{let t=ed.CONTENT_FIELDS_PATH;e?.objectInfo?t=YI.isObjectCaseType(e?.objectInfo?.objectTypeID)?ed.OBJECT_CONTENT_FIELDS_PATH:t:e?.dataInfo?.content&&(t=ed.DATA_OBJECT_CONTENT_FIELDS_PATH);return t})(n),r=rS.getIn(n,[...s])||{},a=[];return cd(r,[],[]).forEach((e=>{const n=rS.getIn(r,[...e,js.PROPERTY_MESSAGES]);n&&Object.keys(n).forEach((e=>{n[e].forEach((e=>{if(e.type===js.MESSAGES.MESSAGES_TYPE_ERROR){const n=t?.getLocalizedMessage(e.message)??e.message;e.fieldLabel?a.push({label:`${e.fieldLabel}:`,description:n}):a.push(n)}}))}))})),a},getMessages:ad,clearMessages:od,getRootContainerHttpMessages:ld,clearContextMessagesInActiveWorkArea:ud,clearContextMessages:e=>{const{context:t}=e;BC({type:ca,payload:{clearAll:!0,context:t}})},isCustomPageErrorExist:dd};const gd=class{constructor(e,t,n,s){this.eventType=e,this.callback=n,this.contextName=s,this.id=t}};const hd=new class{constructor(){this.subscribers={}}publish(e,t){(this.subscribers[e]||[]).slice().forEach((e=>{e.callback(t)}))}unsubscribe(e,t,n){const s=this.subscribers[e]||[];let r=0,a=-1;s.forEach((e=>{e.id===t&&e.contextName===n&&(a=r),r+=1})),-1!==a&&s.splice(a,1)}unsubscribeAllWithEventType(e){this.subscribers[e]=[]}subscribe(e,t,n,s,r){this.subscribers[e]=this.subscribers[e]||[];let a=!1;if(r&&this.subscribers[e].forEach((e=>{a=e.id===t&&e.contextName===s})),!a){const r=new gd(e,t,n,s);this.subscribers[e].push(r)}}clearContext(e){const t=this.subscribers;Object.keys(t).forEach((t=>{const n=this.subscribers[t],s=[];n.forEach((t=>{t.contextName!==e&&s.push(t)})),this.subscribers[t]=s}))}};const fd=class{static subscribe(e,t,n,s=!1,r="app"){hd.subscribe(e,n,t,r,s)}static subscribeOnce(e,t,n){this.subscribe(e,t,n,!0)}static publish(e,t){hd.publish(e,t)}static unsubscribe(e,t,n="app"){hd.unsubscribe(e,t,n)}static unsubscribeAllWithEventType(e){hd.unsubscribeAllWithEventType(e)}static cleanContextSubscribers(e){hd.clearContext(e)}};const md=new class{override=null;discoveredOffline=!1;subscribers=new Set;constructor(){"function"==typeof globalThis.addEventListener&&(globalThis.addEventListener("online",this.handleOnline),globalThis.addEventListener("offline",this.handleOffline))}isOnline(){return null!==this.override?this.override:!this.discoveredOffline&&("undefined"==typeof navigator||!("onLine"in navigator)||navigator.onLine)}setOnlineOverride(e){const t=this.isOnline();this.override=e;const n=this.isOnline();n!==t&&this.notifyAll(n)}onStatusChange(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}reportNetworkFailure(){null===this.override&&(this.discoveredOffline||(this.discoveredOffline=!0,this.notifyAll(!1)))}reportNetworkRecovery(){null===this.override&&this.discoveredOffline&&(this.discoveredOffline=!1,this.notifyAll(!0))}handleOnline=()=>{null===this.override&&(this.discoveredOffline=!1,this.notifyAll(!0))};handleOffline=()=>{null===this.override&&this.notifyAll(!1)};notifyAll(e){BC({type:e?lr:cr,payload:{context:"app"}}),this.subscribers.forEach((t=>{t(e)}))}};const Id=new class{#e;#t;#n;#s;constructor(){this.#e="undefined"!=typeof localStorage&&"true"===localStorage.getItem("inspectorFlag"),this.#t=!1,this.#n=!1,this.#s=!1,this.isPreview=!1,this.debugLevels="vcv=1;tracer=0;log=0;metric=1"}#r(){return this.#n&&this.#s}toggleXRay(e){console.warn("The toggleXRay method is deprecated. Please use the toggleInspector method going forward."),e&&!this.inspectorEnabled&&this.toggleInspector(),!e&&this.inspectorEnabled&&this.toggleInspector()}get inspectorEnabled(){return this.#e}get inspectorShowAll(){return this.#t}toggleInspector(){const e="undefined"!=typeof localStorage?localStorage:null,t="true"===e?.getItem("inspectorFlag");!t&&this.#r()||(this.#e=!t,e?.setItem("inspectorFlag",this.#e.toString()),fd.publish(js.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR,this.#e))}disableInspectorIfEnabled(){if(!this.#e)return;this.#e=!1;const e="undefined"!=typeof localStorage?localStorage:null;e?.setItem("inspectorFlag",this.#e.toString()),fd.publish(js.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR,this.#e)}toggleInspectorShowAll(){this.#t=!this.#t,fd.publish(js.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR_SHOW_ALL,this.#t)}get uiDesignerEnabled(){return this.#n}setDesignerToolbarExpanded(e){this.#s=e,fd.publish(js.PUB_SUB_EVENTS.UI_EVENTS.UI_DESIGNER_TOOLBAR_EXPANDED,e)}get uiDesignerToolbarExpanded(){return this.#s}toggleUIDesigner(){this.#n=!this.#n,this.#n||(this.#s=!1),fd.publish(js.PUB_SUB_EVENTS.UI_EVENTS.UI_DESIGNER,this.#n),fd.publish(js.PUB_SUB_EVENTS.UI_EVENTS.UI_DESIGNER_TOOLBAR_EXPANDED,this.#s)}setPreviewMode(){this.isPreview=!0}getPreviewMode(){return this.isPreview}enableTracer=()=>{this.debugLevels="vcv=1;tracer=1;log=0;metric=1"};disableTracer=()=>{this.debugLevels="vcv=1;tracer=0;log=0;metric=1"};getDebugLevels=()=>this.debugLevels};class Ed{constructor(e,t=!0){this.config=e,t?(this.ssKeyConfig=e,this.reloadConfig()):this.updateConfig(e,!1)}static init(e,t=!0){return new Ed(e,t)}updateConfig(e,t=!0){t?window.sessionStorage.setItem(this.ssKeyConfig,JSON.stringify(this.config)):Jd(e)}reloadConfig(e=!0){if(e){const e=window.sessionStorage.getItem(this.ssKeyConfig);this.config=e?JSON.parse(e):null}else this.config=Xd()}async buildAuthorizeUrl(e){e=e||window.btoa(window.location.origin);let{sessionIndex:t}=this.config;const{password:n}=this.config,s=this.config.clientId?this.config.clientId:this.config.client_id,r=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:TA.getApplicationAlias(),c=this.config.userIdentifier?this.config.userIdentifier:this.config.user_identifier;t=t||this.config.tokenInfo?.session_index;let l="";t?l=`&session_index=${t}`:`${c}`?l=`&UserIdentifier=${c}`:n&&(l=`&Password=${window.atob(n)}`);const 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=${s}&response_type=code&redirect_uri=${r}&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=e.indexOf("/",t+2);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,s=this.config.clientSecret?this.config.clientSecret:this.config.client_secret,r=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 n&&u.append("client_id",n),s&&u.append("client_secret",s),u.append("grant_type","authorization_code"),u.append("code",l),r&&u.append("redirect_uri",r),o&&u.append("code_verifier",o),this.config?.secureCookie&&u.append("send_token_as_cookie","true"),Wd(a,{method:"POST",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?Kd({pzCTkn:e?.csrf}):(Qd({tokenInfo:e}),Kd({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 yd=Ed,Ad=async()=>new Promise((async(e,t)=>{const n=Zd();if(!("tokenInfo"in n)||!n?.tokenInfo)return void t(new Error("Missing token information."));const{access_token:s,refresh_token:r=null}=n.tokenInfo,a=n.endPoints?.revoke,{client_id:o="",client_secret:i="",secureCookie:c,serverType:l}=n,u="launchpad"===l,d={"content-type":"application/x-www-form-urlencoded"};i&&!u&&(d.authorization=`Basic ${window.btoa(`${o}:${i}`)}`);const p=new URLSearchParams;i?u&&(p.append("client_id",o),p.append("client_secret",i)):p.append("client_id",o),c&&p.append("send_token_as_cookie","true");const g=r?"refresh_token":"access_token",h="access_token"===g?s:r;!c&&h&&p.append("token",h),p.append("token_type_hint",g),a&&await Wd(a,{method:"POST",headers:d,withCredentials:c,body:p.toString(),withoutDefaultHeaders:!0}),Kd({Authorization:null}),Qd({tokenInfo:null}),e()})),Cd=async e=>{const t={};if("OAuth2.0"===e?.authType){const n=new yd(e,!1);t.reauthUrl=await n.buildAuthorizeUrl(),t.redirectOrigin=n.getRedirectUriOrigin(),window.addEventListener("message",n.authMessageHandler,!1)}else t.reauthUrl=rn()+(sn()?`${sn()}`:"/?reAuth=true");return t},Sd=(e,t)=>{Cd(t).then((t=>{const n={openReauthMessageModal:!0,reAuthenticationURL:t.reauthUrl,url:e,redirectOrigin:t.redirectOrigin};fd.publish(Fs.PUB_SUB_EVENTS.EVENT_REAUTH,n)}))},_d=e=>{let t="",n={},s={},r=!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)&&(r=!1),a.append("client_id",e.client_id),a.append("grant_type","refresh_token"),e.client_secret&&a.append("client_secret",e.client_secret),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"}},s={success:t=>{const{data:n}=t,s={access_token:n?.access_token,refresh_token:n?.refresh_token};Qd({tokenInfo:{...e.tokenInfo,...s}}),e.secureCookie?Kd({pzCTkn:n?.csrf}):Kd({Authorization:`${n?.token_type} ${n?.access_token}`});const{onTokenRetrieval:r}=e;r&&"function"==typeof r&&r(n)},failure:t=>{if(e.popupReauth)return Sd(t,e);fd.publish(Fs.PUB_SUB_EVENTS.EVENT_FULL_REAUTH,e)}}}else t=`${rn()}/updateSession`,n={method:"GET",headers:{}},s={failure:Sd};return{url:t,config:n,callback:s,isRefreshTokenPresent:r}},Nd=(e,t)=>"OAuth2.0"===t?.authType?e?.includes(t.endPoints.token):e?.includes("updateSession"),Td=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}},Dd=e=>{const{url:t,config:n,callback:s}=_d(e);return Wd(t,n).then((e=>{s?.success?.(e),fd.publish("updateSession",{updateStatus:"success"}),fd.publish("OnUpdateSession",{})})).catch((e=>{throw e}))},Pd=(e,t,n)=>{const{config:s}=e,{url:r,config:a,callback:o,isRefreshTokenPresent:i}=_d(n),c=s?.headers&&s.headers.context;s?.data&&(s.body=s.data);const l=Hd(s.url,s,c,t);return i?Wd(r,a).then((e=>new Promise(((n,r)=>{setTimeout((()=>{t.setUpdateSessionStatus(!1),t.latestUpdateSessionTimeStamp=Date.now(),o?.success?.(e,s),fd.publish("updateSession",{updateStatus:"success"}),fd.publish("OnUpdateSession",{}),l.then((e=>{n(e)})).catch((e=>{r(e)}))}),0)})))).catch((e=>e&&e.config&&Nd(e.config.url,n)?(o?.failure?.(s.url,n),l):Promise.reject(e))):(o?.failure?.(s.url,n),l)},Od=new Set(["resource is stale","resource is locked","resource in the wrong state","resource not found"]),Rd=e=>"object"==typeof e&&null!==e,bd=(e,t)=>{if(!(e=>!!e&&Od.has(e.toLowerCase()))(t))return e;if(e&&e.includes("/workarea")&&!e.includes("/modal")){const t=e.lastIndexOf("/workarea");if(-1!==t)return e.slice(0,t)}return e},vd=(e,t,n,s)=>{if(e.config&&Nd(e.config.url,n))return Promise.reject(e);if(e.response&&e.response.status&&401===e.response.status&&!e.config.isExternalUrl&&!t.getUpdateSessionStatus()&&e.config.fetchTimeStamp>t.latestUpdateSessionTimeStamp){if(fd.unsubscribeAllWithEventType(Md),t.setUpdateSessionStatus(!0),"custom"===n?.authType){fd.publish(Fs.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);const{url:n,config:s,context:r}=Td(e);return Hd(n,s,r,t)}return Pd(e,t,n)}if(e.response&&e.response.status&&401===e.response.status&&!e.config.isExternalUrl&&t.getUpdateSessionStatus()){const{url:t,config:n,context:s}=Td(e);return Wd(t,n,s)}const r=(e=>{if(e instanceof ArrayBuffer)try{const t=(new TextDecoder).decode(e),n=JSON.parse(t);return Rd(n)?n:{}}catch{return{}}return Rd(e)?e:{}})(e.response?.data);if(e.response&&e.response.status&&422!==e.response.status&&424!==e.response.status&&(400!==e.response.status||r.errorClassification!==Fs.INVALID_INPUTS)&&e.config.headers.context&&e.response.data&&!s){const t=r.errorDetails&&r.errorDetails.map((t=>((e,t)=>t[Fs.TRACE_ID]?{type:"error",message:e.localizedValue||e.message,correlationID:t[Fs.TRACE_ID]}:{type:"error",message:e.localizedValue||e.message})(t,e.response.headers))),n=bd(e.config.headers.context,r.errorClassification);return id({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return Promise.reject(e)};const xd=class{constructor(){this.updateSessionInProgress=!1,this.latestUpdateSessionTimeStamp=Date.now()}getUpdateSessionStatus=()=>this.updateSessionInProgress;setUpdateSessionStatus=e=>{this.updateSessionInProgress=e}};const wd=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){e?.Prefer&&this.defaultHeaders.Prefer&&(e.Prefer=`${this.defaultHeaders.Prefer},${e.Prefer}`),this.defaultHeaders={...this.defaultHeaders,...e}}setRequestContext(e){if(!e||0===e.length)return;const t=new URLSearchParams(window.location.search),n=this.buildHeaderMapFromRequestContext(e,t);this.registerHeadersFromMap(n)}buildHeaderMapFromRequestContext(e,t){const n={};return e?.forEach((e=>{Array.isArray(e.IncludeInHeaders)&&e.IncludeInHeaders.forEach((s=>{const r=s.Value,a=t.get(e.Key);a&&(n[r]||(n[r]=[]),n[r].push(`${e.Key}=${a}`))}))})),n}registerHeadersFromMap(e){Object.entries(e).forEach((([e,t])=>{t.length>0&&this.registerHeader(e,t.join("; "))}))}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[js.COREHEADER_APP_DEBUG_ID]:e.debugId,[js.COREHEADER_APP_DEBUG_LEVELS]:Id.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;const t=cS.getProperty(js.COREHEADERS,"",e);return t?{...t,debugInfo:Id.getPreviewMode()&&{...t.debugInfo,[js.COREHEADER_APP_DEBUG_LEVELS]:Id.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,t,n){const s=this.getCoreHeadersFromContext(n);if(s){const t=Object.keys(e);if(t.includes(js.SKIPCOREHEADERS))return void delete e[js.SKIPCOREHEADERS];const n=Object.assign({},...Object.values(s));Object.keys({...n}).forEach((s=>{t.includes(s)||(e[s]=n[s])}))}}injectCoreAdditionalHeaders(e,t,n,s){s?.includeRemoteSystemIdIfPresent&&Bs.injectRemoteCaseHeader(e,t,n),this.processCoreHeaders(e,t,n)}};const Md="updateSession",Ld={},Ud=new xd,Fd=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&&(fd.unsubscribe(Fs.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((()=>{fd.publish(Fs.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(t),fd.subscribe(Fs.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0}),1e3*(e-this.expiryBuffer));return this.setTimerID(t),t}};let jd={},Vd={},kd={},Bd="";const $d=e=>(e=>"ERR_NETWORK"===e.code||"ECONNABORTED"===e.code||"Network Offline"===e.message||!0===e.isOffline)(e)?($C(e.config?.headers?.context)?.isLoading&&BC({type:ir,payload:{context:e.config?.headers?.context}}),md.reportNetworkFailure(),Promise.reject(new Error("Network Offline"))):((e=>"Network Offline"!==e.message&&Boolean($C(js.APP.APP)?.context_data?.isOffline))(e)&&md.reportNetworkRecovery(),!e.response&&e.cause?.response&&(e.response=e.cause.response),(e=>Boolean(e.response&&401===e.response.status&&!e.config?.isExternalUrl&&(!e.config||!Nd(e.config.url,Vd))))(e)&&fd.subscribe(Md,(e=>{Ud.setUpdateSessionStatus(!e.updateStatus)}),Md),vd(e,Ud,Vd,(e=>e.response&&e.response.status&&e.response.status===Number(Bd)?Bd:null)(e))),Gd=e=>{if("OAuth2.0"===e?.authType&&e.secureCookie||e.customCookies)return!0},Wd=(e,t,n="root",s={})=>{const{doNotMergeHttpMessagesForStatusCode:r=null,cancelContext:a=n,includeRemoteSystemIdIfPresent:o=!0}=s;Bd=r,null===e&&window.console.error("Error: url passed to Service Broker fetch is null (or) undefined");const{body:i,signal:c,responseType:l,adapter:u,withoutDefaultHeaders:d=!1,...p}=t,{Authorization:g,pzCTkn:h,...f}=t.headers||{};d||wd.injectCoreAdditionalHeaders(f,t.body,n,{includeRemoteSystemIdIfPresent:o}),a&&Ld[a]>=0?Ld[a]+=1:a&&void 0===Ld[a]&&(Ld[a]=1);let m=d?{...f}:{...wd.getDefaultHeaders(),...wd.getRegisteredHeaders(),...f,context:n};if(p.isExternalUrl=(e=>!e?.startsWith(rn()||""))(e||""),p.fetchTimeStamp=Date.now(),e&&Nd(e,Vd)&&Ud.getUpdateSessionStatus()||!Ud.getUpdateSessionStatus()||p.isExternalUrl){Nd(e,Vd)&&"OAuth2.0"===Vd?.authType&&(m={...f});const{restApi:t}=TA.doesRestApiExist("Logout")&&TA.getRestEndPoint("Logout")||{restApi:null};return(!t||e&&!e.endsWith(t))&&Fd.setTimerID(Fd.resetInactiveTimeout(Fd.getTimerID())),function(e,t){var n="object"==typeof t;return new Promise((function(s,r){var a,o=!1;e.subscribe({next:function(e){a=e,o=!0},error:r,complete:function(){o?s(a):n?s(t.defaultValue):r(new bl)}})}))}(Mu(Ol({context:n,...p,url:e,data:i,...c&&void 0===c.aborted&&{cancelToken:c},...c&&void 0!==c.aborted&&{signal:c},responseType:l,adapter:u,headers:m,withCredentials:Gd(Vd)})).pipe((A=$l(I=()=>{const e=wd.getCoreHeadersFromContext(m.context);var t;e&&(t={...e},fd.publish(js.PUB_SUB_EVENTS.FETCH_SUCCESS,t))})||E||y?{next:I,error:E,complete:y}:I)?Pu((function(e,t){var n;null===(n=A.subscribe)||void 0===n||n.call(A);var s=!0;e.subscribe(Ou(t,(function(e){var n;null===(n=A.next)||void 0===n||n.call(A,e),t.next(e)}),(function(){var e;s=!1,null===(e=A.complete)||void 0===e||e.call(A),t.complete()}),(function(e){var n;s=!1,null===(n=A.error)||void 0===n||n.call(A,e),t.error(e)}),(function(){var e,t;s&&(null===(e=A.unsubscribe)||void 0===e||e.call(A)),null===(t=A.finalize)||void 0===t||t.call(A)})))})):gu,Lu((e=>{const t=m,n=!!t?.[js.COREHEADER_APP_DEBUG_ID]?{debugInfo:{[js.COREHEADER_APP_DEBUG_ID]:t?.[js.COREHEADER_APP_DEBUG_ID],[js.COREHEADER_APP_DEBUG_LEVELS]:Id.getDebugLevels()}}:wd.getCoreHeadersFromContext(m.context);var s;throw n&&(s={...n,error:e},fd.publish(js.PUB_SUB_EVENTS.FETCH_FAILURE,s)),e}))))}var I,E,y,A;return Hd(e,t,n,Ud)},Hd=(e,t,n,s)=>new Promise(((r,a)=>{fd.subscribe(Md,(o=>{s.setUpdateSessionStatus(!o.updateStatus),"success"===o.updateStatus?Wd(e,t,n).then((e=>r(e))).catch((e=>a(e))):a(o.updateStatus.error)}),Md)})),qd=e=>{Ld[e]>0&&(Ld[e]-=1,0===Ld[e]&&delete Ld[e])};Ol.interceptors.request.use((e=>md.isOnline()?(jd?.request&&(e=jd.request(e)),e):($C(e.context)?.isLoading&&BC({type:ir,payload:{context:e.context}}),BC({type:cr,payload:{context:"app"}}),Promise.reject(new Error("Network Offline")))),(e=>Promise.reject(e))),Ol.interceptors.response.use((e=>{if(202===e.status&&e.config.headers.context&&e.data?.caseInfo&&"object"==typeof e.data.caseInfo&&"errorMessage"in e.data.caseInfo){const t=[{type:"error",message:String(e.data.caseInfo.errorMessage)}];let n=e.config.headers.context;return n&&n.includes("/workarea")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),id({messages:t,category:"HTTP",context:n}),Promise.reject(e)}if(e.config.headers&&e.config.headers.context){if(!e.config.skipClearErrorMessages){ad({type:"error",category:"HTTP",context:e.config.headers.context}).length>0&&od({type:"error",category:"HTTP",context:e.config.headers.context}),ad({type:"error",category:e.config.headers.context===js.APP.APP?"PAGE":"",context:e.config.headers.context}).length>0&&od({type:"error",category:"PAGE",context:e.config.headers.context});e.config.headers.context.slice(e.config.headers.context.lastIndexOf("/")+1).startsWith("primary")&&(ad({type:"error",category:"HTTP",context:js.APP.APP}).length>0&&od({type:"error",category:"HTTP",context:js.APP.APP}),ad({type:"error",category:"PAGE",context:js.APP.APP}).length>0&&od({type:"error",category:"PAGE",context:js.APP.APP}))}qd(e.config.headers.context)}return jd?.response&&(e=jd.response(e)),e}),(e=>(e.config&&e.config.headers&&e.config.headers.context&&qd(e.config.headers.context),jd?.error?Promise.resolve(jd.error(e)).then((t=>((e,t)=>{if("boolean"==typeof t)return t?$d(e):Promise.reject(e);if((n=t)&&"object"==typeof n&&("continueWithDefaultErrorHandler"in n||"error"in n)){const n=t.error??e;return t.continueWithDefaultErrorHandler??1?$d((e=>!(!e||"object"!=typeof e)&&"isAxiosError"in e&&"config"in e)(n)?n:e):Promise.reject(n)}var n;return $d(e)})(e,t))):$d(e))));const zd=()=>Ol.CancelToken.source(),Yd=e=>Ol.isCancel(e),Kd=e=>{wd.setDefaultHeaders(e)},Qd=e=>{Vd={...Vd,...e}},Jd=e=>{kd={...kd,...e}},Xd=()=>({...kd}),Zd=()=>({...Vd});const ep=class{static formatPageReference(e){const t=e?.split(".").map((e=>{if(e.includes("[")){const t=e.indexOf("["),n=e.indexOf("]"),s=e.substring(t+1,n),r=Number(s)+1;return`${e.substring(0,t)}(${r})${e.substring(n+1)}`}return e}));return t.join(".")}static formatePageReferenceToArrayIndex(e){const t=e?.split(".").map((e=>{if(e.includes("(")){const t=e.indexOf("("),n=e.indexOf(")"),s=e.substring(t+1,n),r=Number(s);if(!Number.isNaN(r)){const s=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}};const tp=class{static execute(e,t,n,s){const r=!PA.isInfinityRuntime(),a={};Object.hasOwn(n,"nonFormProperties")&&(n.nonFormProperties.forEach((e=>{a[e]=n[e],delete n[e]})),delete n.nonFormProperties);const o={instruction:"string"==typeof t?"ADD":"INSERT",content:{...rS.unflatten(n)}},i=JSON.parse(JSON.stringify(o)),c=i.content.classID||i.content["@class"];delete i.content.classID;return{instruction:{target:rS.buildInstructionPageReference(s,e),content:{...r&&c?{"@class":c}:{},...i.content},["string"==typeof t?"groupIndex":"listIndex"]:t,instruction:"string"==typeof t?"ADD":"INSERT"},actionPayload:o,displayPropertPayload:a}}};const np=class{static execute(e,t,n,s,r,a,o,i){const c=!PA.isInfinityRuntime(),l="string"==typeof n?`${t}(${n})`:`${t}[${n-1}]`,u=HC(".classID",`${r}${l}`,e)||HC(".@class",`${r}${l}`,e),d={instruction:"UPDATE",content:{...rS.unflatten(s)},isDefault:i},p={content:{...c&&u?{"@class":u}:{},...d.content},target:rS.buildInstructionPageReference(r,t),["string"==typeof n?"groupIndex":"listIndex"]:n,instruction:"UPDATE"};return a||BC(qS({...d,["string"==typeof n?"groupIndex":"listIndex"]:"string"==typeof n?n:n-1,context:e,referenceList:`${r}${t}`,skipDirtyValidation:o})),p}};const sp=class{static execute(e,t,n){return{target:rS.buildInstructionPageReference(n,e),["string"==typeof t?"groupIndex":"listIndex"]:t,instruction:"DELETE"}}};const rp=class{static getDeleteAllInstruction(e,t){return{instruction:"DELETE ALL",target:rS.buildInstructionPageReference(e,t)}}static execute(e,t,n,s){s||BC(qS({instruction:"DESELECT_ALL",context:e,referenceList:`${n}${t}`}))}};const ap=class{static execute(e,t,n,s){return{target:rS.buildInstructionPageReference(s,e),listMoveToIndex:n,listIndex:t,instruction:"MOVE"}}};const op=class{static execute(e,t,n){const s=!PA.isInfinityRuntime(),r={instruction:"REPLACE",content:{...rS.unflatten(t)}},a=r.content.classID||r.content["@class"];delete r.content.classID;return{instruction:{target:rS.buildInstructionPageReference(n,e),content:{...s&&a?{"@class":a}:{},...r.content},instruction:"REPLACE"},actionPayload:r}}};const ip=class{static execute(e,t){return{target:rS.buildInstructionPageReference(t,e),instruction:"DELETE"}}};const cp=class{constructor(e){this.next=null,this.automatic=!1,this.instruction=e,this.previous=null,this.childrenStateMachines=[]}};const lp=class{constructor(e,t,n){this.target=e,this.pageReference=t,this.contextName=n,this.root=null,this.current=null,this.changeList={},this.hasEncryptedContent=!1,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 cp(e);null===this.root&&(this.root=t),null!==this.current&&(t.previous=this.current,this.current.next=t),this.current=t}applyEncryptedContent(e){void 0!==e&&(this.current.instruction.encryptedContent=e)}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 s=e.getValue(this.target)||[];if(Array.isArray(s)){if(t)return void s.forEach(((e,s)=>{t.forEach((t=>{const r=wI(t),a={};let o=!0;n&&(a[wI(n)]=crypto.randomUUID(),o=!1);const i={[r]:rS.getIn(e,r),...a};this.update(i,s+1,o,{isDefault:!0,skipDirtyValidation:!0})}))}));s.forEach(((e,t)=>{if(n&&!e[wI(n)]){const e={};e[wI(n)]=crypto.randomUUID(),this.update(e,t+1,!1,{isDefault:!0,skipDirtyValidation:!0})}}))}t&&s&&"object"==typeof s&&!Array.isArray(s)&&Object.keys(s).length>0&&this.processObjectRows(s,t,n)}processObjectRows(e,t,n){Object.keys(e).forEach((s=>{const r=e[s];t.forEach((e=>{const t=wI(e),a={};let o=!0;n&&(a[wI(n)]=crypto.randomUUID(),o=!1);const i={[`${t}`]:rS.getIn(r,t),...a};this.update(i,s,o,{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,s){const{isDefault:r=!1,skipPageinstruction:a,skipDirtyValidation:o=!1,encryptedContent:i}=s,c=np.execute(this.contextName,this.target,t,e,this.pageReference,n,o,r);if(!a){if("string"==typeof t?this.initChangeList(t):this.initChangeList(t-1),!r){const n=this.changeList?.[this.targetPageReference]?.["string"==typeof t?t:t-1].content;this.changeList[this.targetPageReference]["string"==typeof t?t:t-1]=XC(rS.deepClone(n),e,s)}if(this.current?.automatic===r&&(this.current?.instruction?.groupIndex===t||this.current?.instruction?.listIndex===t)&&"UPDATE"===this.current?.instruction.instruction){const t=this.current.instruction.content;return this.current.instruction.content=XC(rS.deepClone(t),rS.unflatten(e),s),void this.applyEncryptedContent(i)}this.insertNode(c),this.applyEncryptedContent(i),r&&(this.current.automatic=!0)}}delete(e,t){const n=sp.execute(this.target,e,this.pageReference);this.changeList[this.targetPageReference]?.splice(e-1,1),this.insertNode(n),t||BC(qS({instruction:"DELETE",listIndex:"string"==typeof e?e:e-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}insert(e,t,n,s){const{instruction:r,actionPayload:a={content:{}},displayPropertPayload:o={}}=tp.execute(this.target,t,e,this.pageReference),{isDefault:i=!1,encryptedContent:c,skipDirtyValidation:l=!1}=s;if(this.initChangeList("string"==typeof t?t:t-1),!i){const n=this.changeList?.[this.targetPageReference]?.["string"==typeof t?t:t-1].content;this.changeList[this.targetPageReference]["string"==typeof t?t:t-1]=XC(rS.deepClone(n),e,s)}this.root&&!this.root.instruction?.instruction&&this.current&&!this.current.instruction?.instruction?this.root.instruction=r:this.insertNode(r),this.applyEncryptedContent(c),n||(a.content={...a.content,...o},BC(qS({...a,["string"==typeof t?"groupIndex":"listIndex"]:"string"==typeof t?t:t-1,c11nEnv:s.c11nEnv,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,skipDirtyValidation:l}))),i&&(this.current.automatic=!0)}replacePage(e,t,n,s,r){const a=s??this.pageReference,o=n??this.target,{instruction:i,actionPayload:c}=op.execute(o,e,a);this.insertNode(i),this.applyEncryptedContent(r),t||BC(qS({...c,context:this.contextName,referenceList:`${a}${rS.convertClipboardPageToPageRefNotation(o)}`}))}deletePage(e){const t=ip.execute(this.target,this.pageReference);this.insertNode(t),e||BC(qS({instruction:"DELETEPAGE",context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}move(e,t){const n=this.changeList[this.targetPageReference]?.splice(e-1,1);this.changeList[this.targetPageReference]?.splice(t-1,0,n[0]);const s=ap.execute(this.target,e,t,this.pageReference);this.insertNode(s),BC(qS({listIndex:e-1,listMoveToIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,instruction:"MOVE"}))}deleteAll(e){const t=rp.getDeleteAllInstruction(this.pageReference,this.target);this.changeList[this.targetPageReference]=[],this.insertNode(t),rp.execute(this.contextName,this.target,this.pageReference,e)}updatePage(e){if(!this.current?.instruction||!e)return;const t=this.current.instruction.content||{};this.current.instruction.content=XC(rS.deepClone(t),e)}},up={},dp={},pp={},gp=(e,t,n)=>{up[e]||(up[e]={}),up[e][t]||(up[e][t]={content:[]}),dp[e]||(dp[e]=[],pp[e]=[]),vI.isStateMachineExist(e,n,t)||vI.setStateMachine(e,t,n,new lp(t,n,e))},hp=e=>ep.formatPageReference(e),fp=(e,t)=>{const n=dp[e],s=pp[e],r=wI(t),a=r?.substring(0,r.indexOf("["));s?.indexOf(a)<0&&pp[e].push(a),n?.indexOf(r)<0&&dp[e].push(r)},mp=e=>{delete dp[e]},Ip=e=>vI.buildPageInstructionsByContext(e),Ep=e=>{vI.clearStateMachines(e),delete up[e]},yp=(e,t,n,s)=>{let[,r]=t.split(`${e}[${s}]`);""!==r&&void 0!==r&&(r=r.startsWith(".")?r.substring(1):r,Object.keys(n).forEach((e=>{n[`${r}.${e}`]=n[e],delete n[e]})))},Ap=(e,t,n,s,r)=>{const{skipStateUpdate:a=!1,insertIfEmpty:o=!1,skipDirtyValidation:i=!1}=r||{},c=n.getContextName(),l=n.getReferenceList(),u=s||n.getPageReference(),d=hp(l);gp(c,d,u),fp(c,`${l}[${t}]`),yp(l,u,e,t);const p={instruction:js.LIST_ACTIONS.INSERT,content:{...rS.unflatten(e)}};delete JSON.parse(JSON.stringify(p)).content.classID;const g=vI.getStateMachine(c,u,d);o&&g?.root||g.insert(e,t+1,a,{c11nEnv:n,skipDirtyValidation:i})},Cp=(e,t,n=0,s={})=>{const{skipStateUpdate:r=!0,pageRef:a}=s,o=t.getContextName();let i=t.getReferenceList();const c=a||t.getPageReference();i||(i=((e,t)=>{const n=e.indexOf(Fs.CONTENT)+Fs.CONTENT.length,s=e.lastIndexOf(`[${t}]`);return e.substring(n,s)})(c,n));const l=hp(i);gp(o,l,c),fp(o,`${i}[${n}]`),yp(i,c,e,n);vI.getStateMachine(o,c,l).update(e,n+1,r,s)},Sp=(e,t)=>{const[,n]=e.split("."),s=t?.split(".").pop();return n===s},_p=e=>{const t=rS.getPropertyName(e),n=t.indexOf(".");return n>=0?t.slice(n+1):t},Np=(e,t,n)=>{const s={};return Object.values(e).forEach((e=>{if(Sp(e,n)){const n=_p(e).split(".");if(n.length>1){let e=rS.getIn(t,n)??"";if(!e){const s=`!P!${n.join(":")}`;e=rS.getIn(t,s)??""}rS.setIn(s,n,e)}else{const e=rS.getIn(t,n)??"";s[n[n.length-1]]=e}}})),s},Tp=(e,t,n,s,r)=>{const a=e.getValue(t)||{};n&&Object.keys(a).length>0&&e.clearErrorMessages({property:s?r:e.getStateProps().value})},Dp=(e,t,n)=>new Promise((s=>{const{skipPageInstructions:r=!1}=n,{selectionMode:a,selectionList:o,required:i}=t.getConfigProps(),c=a===js.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 g=null;const h=(e=>e?.config?.dataRelationshipContext&&"SimpleTableSelect"===e.type&&"single"===e.config?.selectionMode)(p);h&&(d=p?.config?.dataRelationshipContext,g=u.concat(".").concat(d),u=g);const f=((e,t,n)=>e?`${t}${n}`:t)(c,u,o),m=((e,t,n,s)=>t?e.getFieldMetadata(`${n}`):e.getCurrentPageFieldMetadata(s))(t,c,d,g),{datasource:{parameters:I={}}}=m,E={...I};if(((e,t,n)=>{t?.descriptors?.length&&!n&&t.descriptors.forEach((t=>{e[_p(t)]=t}))})(E,m,c),c){let n=o;n=hp(n);const s=t.getValue(f)||[];gp(t.getContextName(),n,u);const a=[];let i=s.length;e.forEach((e=>{const t=Np(I,e,d),o={};if(Object.hasOwn(e,"displayProperty")){const t=e.displayProperty;o[t]=e[t]}const c=Object.entries(t);let p=s.findIndex((e=>c.every((([t,n])=>e[t]===n))));if(-1===p?(p=i,e.$selected&&(i+=1)):i=i?i-1:0,!r){const s=vI.getStateMachine(l,u,n);e.$selected?s.insert(t,p+1,!0,{}):s.delete(p+1,!0)}a.push({instruction:e.$selected?js.LIST_ACTIONS.SELECT:js.LIST_ACTIONS.DESELECT,listIndex:p,content:{...t,...o}})})),BC(qS({instruction:js.LIST_ACTIONS_TYPE.SELECT_DESELECT,context:l,referenceList:`${u}.${d}`,actions:a}))}else{const n=Np(E,e[0],d),s=((e,t)=>{const{selectionKey:n,renderMode:s,referenceList:r,value:a}=e.getRawConfigProps()??{};let o=a;if(n?o=n:"Editable"===s&&(o=r),!o||"string"!=typeof o)return;const i=wI(rS.getPropertyName(o));return i.trim()?i.startsWith(`${t}.`)?`.${i.substring(t.length+1)}`:`.${i}`:void 0})(t,d),r={...h?{contextPageReference:u}:{},...s?{associatedProperty:s}:{}},a=p?.config?.compositeKeys||[];if(t.getRawConfigProps().onlyAllowRefreshOnCompositeKeys&&a.length){const s=a?.reduce(((e,t)=>(e[_p(t)]=t,e)),{})||{},o=Np(s,e[0],d);Object.keys(o).forEach((e=>{delete n[e],t.getActionsApi().updateFieldValue(`.${e}`,o[e],r),t.getActionsApi().triggerFieldChange(`.${d}.${e}`,o[e])}));const i=(e=>e.length>1&&e.pop()||"")(u.split(/\[\d+\]/gm));t.getActionsApi().updateFieldValue(i,n,r),t.getActionsApi().triggerFieldChange(i,n)}else Object.keys(n).forEach((e=>{t.getActionsApi().updateFieldValue(`.${e}`,n[e],r),t.getActionsApi().triggerFieldChange(`.${d}.${e}`,n[e])}))}Tp(t,f,i,c,d),s()})),Pp=e=>{if(!e)return!1;const t=(n=e,vI.buildPageInstructionsByContext(n,!0));var n;return Array.isArray(t)&&t.length>0};const Op=(e,t,n={})=>{const{skipStateUpdate:s=!1}=n,r=e.getPageReference(),a=hp(t);gp(e.getContextName(),t,r);vI.getStateMachine(e.getContextName(),r,a).deleteAll(s);const o=vI.getUnConnectedStateMachines(e.getContextName())||{};Object.keys(o).forEach((e=>{e.includes(`${r}${a}`)&&e!==`${r}${a}`&&(o[e]=null)}))},Rp=e=>({insert:(t,n,s,r)=>Ap(t,n,e,s,r),update:(t,n,s)=>Cp(t,e,n,s),updateProperty:(t,n,s)=>((e,t,n,s={})=>{const r=n.getPageReference(),{stateMachineTarget:a}=vI.getStateMachineObjByPath(`${r}${e}`,n.getContextName(),`${r}${e}`.endsWith("]"));if(!a){let e=r.substring(0,r.lastIndexOf("["));e||(e=r.substring(0,r.lastIndexOf(".")));const t=e.substring(e.lastIndexOf("."));e=e.substring(0,e.lastIndexOf(".")),e&&t&&gp(n.getContextName(),t,e)}vI.executeStateMachine(n.getContextName(),`${r}${e}`,t,!0,s)})(t,n,e,s),deleteEntry:(t,n,s)=>((e,t,n,s)=>{const{skipStateUpdate:r=!1}=s||{},a=t.getContextName(),o=t.getReferenceList(),i=n||t.getPageReference(),c=`${i+o}[${e}]`,l=hp(o);od({type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,pageReference:c,context:a,isListEntry:!0,deletingIndex:e}),gp(a,l,i),fp(a,`${o}[${e}]`);const u=vI.getStateMachine(a,i,l);"string"==typeof e?u.delete(e,r):u.delete(e+1,r);const d=vI.getUnConnectedStateMachines(a)||{};Object.keys(d).forEach((e=>{e.includes(`${i}${l}`)&&e!==`${i}${l}`&&(d[e]=null)}))})(t,e,n,s),reorder:(t,n)=>((e,t,n)=>{const s=n.getContextName(),r=n.getReferenceList(),a=n.getPageReference(),o=hp(r);gp(s,o,a),Zu.deleteAllListNodes(s,`${a}${o}`,!1),fp(s,`${r}[${t}]`),vI.getStateMachine(s,a,o).move(e+1,t+1);const i=vI.getUnConnectedStateMachines(s)||{};Object.keys(i)?.forEach((e=>{e.includes(`${a}${o}`)&&e!==`${a}${o}`&&delete i[e]}))})(t,n,e),setSelectedRows:(t,n={skipPageInstructions:!1})=>Dp(t,e,n),getSelectedRows:(t=!1)=>((e,t)=>{const{selectionMode:n,selectionList:s}=t.getConfigProps(),r=[];let a=t.getPageReference();const o=n===js.LIST_SELECTION_MODE.MULTI;let i=o?s.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}${s}`: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 s=n.substring(n.lastIndexOf(".")+1);return Sp(n,i)&&e[s]?`${t}${e[s]}`:t}),"");t.trim()&&r.push(t.trim())})),Promise.resolve(r)})(t,e),clearSelectedRows:()=>function(e){const{selectionList:t,required:n}=e.getConfigProps(),s=e.getContextName(),r=e.getPageReference(),a=t,o=`${r}${t}`;return new Promise((t=>{let i=a;i=hp(i),gp(s,i,r),vI.getStateMachine(s,r,i).deleteAll(),Tp(e,o,n,!0,a),t()}))}(e),setVisibility:t=>((e,t=!0)=>{const n=e.getContextName(),{selectionMode:s,selectionList:r,renderMode:a,referenceList:o}=e.getComponentConfig();let i;if(s===js.LIST_SELECTION_MODE.MULTI&&r?i=r:"Editable"===a&&o&&(i=e.getStateProps().referenceList),i){i=hp(i);const s=vI.getStateMachine(n,"",`${e.getPageReference()}${i}`);s&&(s.visibility=t)}})(e,t),initDefaultPageInstructions:(t,n,s)=>((e,t,n,s)=>{const r=e.getContextName(),a=e.getPageReference(),o=hp(t);gp(r,o,a),vI.getStateMachine(r,a,o).initPageInstructions(e,n,s)})(e,t,n,s),deleteAll:(t,n)=>Op(e,t,n),replacePage:(t,n,s)=>((e,t,n,s)=>{const{skipStateUpdate:r=!1}=s||{},a=e.getPageReference(),o=e.getContextName();gp(o,t,a),fp(o,rS.buildInstructionPageReference(a,t)),vI.getStateMachine(o,a,t).replacePage(n,r)})(e,t,n,s),deletePage:(t,n)=>((e,t,n)=>{const{skipStateUpdate:s=!1}=n||{},r=e.getPageReference(),a=e.getContextName();gp(a,t,r),fp(a,rS.buildInstructionPageReference(r,t)),vI.getStateMachine(a,r,t).deletePage(s)})(e,t,n)});const bp=new class{constructor(){this.fieldDefaults={}}updateFieldDefaults(e){e&&(Object.keys(this.fieldDefaults).length?rS.mergeDeep(e,this.fieldDefaults):rS.copy(e,this.fieldDefaults))}setFieldDefault(e,t,n){e&&t&&(this.fieldDefaults[e]=this.fieldDefaults[e]||{},"object"==typeof this.fieldDefaults[e]&&null!==this.fieldDefaults[e]&&(this.fieldDefaults[e][t]=n))}getDefaultsforType(e){return this.fieldDefaults[e]}},vp="downloadAttachment",xp={};function wp(e,t){const n=Ls.getDefaultQualifiedName(t);return n!==t&&n in e?e[n]:e[t]}const Mp=e=>{const t=zd();return xp[e]=t,t};function Lp(e){const t=new URL(e,window.location.origin),n=PA.environmentInfoObject?.encCSRFToken;return n&&t.searchParams.set("pzencv1zzz",n),t.searchParams.set("mode","stream"),t.toString()}async function Up(e){const t=function(){if("undefined"!=typeof window&&"showSaveFilePicker"in window)return window.showSaveFilePicker}();if(!t)return null;try{const n=await t({suggestedName:e}),s=await n.createWritable();return{fh:n,writable:s}}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return null;throw e}}async function Fp(e,t,n){const s=await Up(t);if(s)try{const t=await async function(e,t){let n;await Wd(e,{method:"GET",adapter:async e=>(n=e,{data:null,status:204,statusText:"No Content",headers:{},config:e}),withoutDefaultHeaders:!1},t,{includeRemoteSystemIdIfPresent:!0});const s={};return Object.entries(n?.headers??{}).forEach((([e,t])=>{"string"==typeof t&&(s[e]=t)})),s}(e,n),r=await fetch(e,{method:"GET",headers:t});if(!r.ok)throw new Error(`Download failed: ${r.status}`);if(!r.body)throw new Error("Download response has no body");await r.body.pipeTo(s.writable)}catch(e){throw await s.writable.abort().catch((()=>{})),e}}const jp=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("/"),s=e=>e.some((e=>n.includes(e)));s(["excel","spreadsheet"])?t="document-xls":s(["zip","compressed","gzip","rar","tar"])&&(t="document-compress")}return t},Vp=e=>{const t=wp(e,"pyCategoryLabel"),n=wp(e,"pyCategoryName"),s=wp(e,"Category"),r=wp(e,"pxCreateOpName"),a=wp(e,"pxCreateOperator"),o=e.CreateUser,i=wp(e,"pyFileName"),c=wp(e,"FileName"),l=wp(e,"FileExtension"),u=wp(e,"pyAttachName"),d=wp(e,"pyMimeFileExtension"),p=wp(e,"MimeType"),g=wp(e,"pzInsKey"),h=wp(e,"ID"),f=wp(e,"pyAttachmentLink"),m=wp(e,"AttachmentURL"),I=wp(e,"pxAttachmentCreateTime"),E=wp(e,"pxCreateDateTime"),y=wp(e,"CreateDateTime"),A=wp(e,"pxStorageType"),C=wp(e,"pyFileSize"),S=wp(e,"error"),_=wp(e,"thumbnail"),N=wp(e,"pyIsLargeAttachment"),T=wp(e,"IsLargeAttachment");let D,P,O,R;return D=t?`${t},`:n?`${n},`:s,P=r||(a||o?.Name||""),O=i||(l&&""!==l&&c?.endsWith(l)?c.substring(0,c.lastIndexOf(l)-1):c),R=u&&i?u.startsWith(i)&&u.split(".").length-1===i.split(".").length?u.split(".").pop():"":l??"",{props:{meta:`${D} ${P}`,name:u??c??"",icon:jp(d??p??""),error:S??null,thumbnail:_??null},responseProps:{fileName:u??c??"",name:O??"",category:n??s??"",extension:R,ID:g??h??"",mimeType:d??p??"",attachmentURL:f??m??"",createUser:P??"",createDateTime:I??E??y??"",responseType:e.responseType??(h?"binary":null),localAttachment:!!e.localAttachment,storageType:A??void 0,fileSize:C??void 0,isLargeAttachment:void 0!==N?"true"===N:T}}},kp=e=>{let t=[],n=!1;if(e&&Object.hasOwn(e,Ls.getDefaultQualifiedName("pyCount"))){n=!0;const s=wp(e,"pxResults");t=Array.isArray(s)?s.filter((e=>!!wp(e,"pzInsKey"))).map((e=>Vp(e))):[]}else if(e&&"object"==typeof e){let n;n=Array.isArray(e)?e:[e],t=n?.filter((e=>wp(e,"ID")&&wp(e,"FileName")||wp(e,"pzInsKey"))).map(Vp)}else t=[];const s=e?wp(e,"pyCategoryName"):void 0;return{hasUploadedFiles:t.length>0,categoryName:("string"==typeof s?s:"")||t?.[0]?.responseProps?.category||"",attachments:t,isOldAttachment:n}},Bp={uploadAttachment:(e,t,n,s,r,a)=>{const o=new FormData;o.append("appendUniqueIdToFileName","true"),o.append("file",e),r&&o.append("contextID",r),a&&o.append("category",a);const{restApi:i,reqType:c}=i_("uploadAttachment",{}),l={"Content-Type":"multipart/form-data"};return Boolean(PA?.environmentInfoObject?.pyFeatures?.pyEnableStreamingForRepositories)&&(l["x-pega-stream-support"]="repository-stream"),Wd(i,{method:c,headers:l,body:o,onUploadProgress:t,signal:Mp(e.ID).token},s).then((t=>({type:"File",category:e.category||"File",ID:t.data.ID,clientFileID:e.ID,filename:e.name}))).catch(n?n(Yd,e):e=>{throw e.isHandled=!1,e}).finally((()=>delete xp[e.ID]))},linkAttachmentsToCase:(e,t,n,s)=>{const r={};if("File"===n){const[e]=t,{clientFileID:n}=e;delete e.clientFileID,n&&(r.signal=Mp(n).token)}const{restApi:a,reqType:o}=i_("linkCaseAttachment",{caseID:e});return Wd(a,{...r,body:{attachments:t},method:o},s)},getCaseAttachments:(e,t,n=!1)=>{const{restApi:s,reqType:r}=i_("getCaseAttachments",{caseID:e,includeThumbnail:n});return Wd(s,{method:r},t).then((e=>e.data.attachments))},getAttachmentCategories:(e,t,n)=>{const{restApi:s,reqType:r}=i_("getAttachmentCategories",{caseID:e,type:t});return Wd(s,{method:r},n).then((e=>e.data))},downloadAttachment:(e,t,n,s,r)=>{e=e.replace(/\//g,"_");const{restApi:a,reqType:o}=i_(vp,{attachmentID:e}),i=r&&a?(()=>{const e=new URL(a,window.location.origin);return e.searchParams.set("encoding",r),e.toString()})():a;return function(e){const t=PA.environmentInfoObject;return!(!t?.pyFeatures?.pyEnableStreamingForRepositories||"repository"!==e?.toLowerCase()||"EMBED"===t?.renderingMode&&!PA.isPegaMobile())}(s)&&a?async function(e){return await Dd(Zd()),{data:Lp(e)}}(a):Wd(i,{method:o,..."binary"===n&&!r&&{responseType:"arraybuffer"}},t)},editAttachment:(e,t,n)=>{const{restApi:s,reqType:r}=i_("editAttachment",{attachmentID:e});return Wd(s,{method:r,body:{...t}},n)},deleteAttachment:(e,t)=>{const{restApi:n,reqType:s}=i_("deleteAttachment",{attachmentID:e});return Wd(n,{method:s},t)},downloadDocument:(e,t)=>{const{restApi:n,reqType:s}=i_("downloadDocument",{documentID:e});return Wd(n,{method:s},t)},deleteDocument:(e,t,n)=>{const{restApi:s,reqType:r}=i_("deleteDocument",{caseID:e,documentID:t});return Wd(s,{method:r},n)},getDocumentURL:e=>{const t=PCore.getEnvironmentInfo().getDocumentUrlDP()||Ls.getDefaultQualifiedName("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=>{xp[e]&&(xp[e].cancel(),delete xp[e])},buildFilePropsFromResponse:Vp,getAttachmentURL:e=>{const{restApi:t}=i_(vp,{attachmentID:e});return t},prepareAttachmentData:kp,validateAttachments:(e,t)=>{let n=e;if((e=>null!==e&&"object"==typeof e&&"hasUploadedFiles"in e&&"boolean"==typeof e.hasUploadedFiles)(t)){const{attachments:e}=t;0===e.length&&(n="")}else{const{attachments:e}=kp(t);0===e.length&&(n="")}return n},streamDownloadAttachment:async(e,t,n)=>{if(!PA.environmentInfoObject?.pyFeatures?.pyEnableStreamingForRepositories)return;e=e.replace(/\//g,"_");const{restApi:s}=i_(vp,{attachmentID:e});s&&(await Dd(Zd()),await Fp(Lp(s),t,n))}};let $p=!1;const Gp=e=>{$p=e},Wp=new Map,Hp=(e,t)=>{Wp.set(e,t)},qp=e=>{Wp.delete(e)};class zp{constructor(){this.validators={}}static messageDispatcher(e,t,n,s,r,a){if(s){const o=[];o.push({type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,fieldLabel:r,message:s,...a??{}}),id({messages:o,property:e,pageReference:t,context:n})}}register(e,t){this.validators[e]=t}getValidator(e){return this.validators[e]}validateRequired(e,t,n,s,r,a){const{required:o,value:i}=a;let c=null;if(!("true"!==o&&!0!==o)){let o=s;switch(e){case"radiobuttons":o=i;break;case"attachment":o=Bp.validateAttachments(s,i);break;case"checkbox":o&&"false"!==o||(o="");break;default:"string"==typeof o&&(o=o.trim())}c=this.getValidator("required")(o),zp.messageDispatcher(t,n,r,c,ep.getFieldLabel(a),{subType:"required"})}return c}validateType(e,t,n,s,r,a){let o=null;const i={pageReference:n,context:r,property:t,...a};let c=bp.getDefaultsforType(a?.componentName||"")?.["client-validations"];!1!==c&&e&&this.getValidator(e)&&(o=this.getValidator(e)(s,i),(""!==s||bp.getDefaultsforType(a?.componentName||"")?.showErrorWhenEmpty)&&zp.messageDispatcher(t,n,r,o,a?.label));const l=a?.validationType;return c=l&&bp.getDefaultsforType(l)?.["client-validations"],!1!==c&&l&&this.getValidator(l)&&(o=this.getValidator(l)(s,i),zp.messageDispatcher(t,n,r,o,a?.label)),o}validate(e,t,n,s={}){const{context:r,disabled:a,readOnly:o,pageReference:i,skipRequiredValidation:c}=s;let l=null;return a||o||(c||$p||(l=this.validateRequired(e,t,i,n,r,s)),l||(l=this.validateType(e,t,i,n,r,s))),{message:l}}isValidatorExist(e){return!!e.validatetype}}const Yp=new zp,Kp=e=>{e&&fC(e)},Qp=(e,t)=>{e.DeclareExpressions&&t.context&&Eo({[t.context]:e.DeclareExpressions})},Jp=(e,t,n=!1)=>{const s=rS.getIn(e,js.RESOURCES);s&&(Kp(s),Qp(s,t)),n||f_({...e,options:t})};class Xp{static createCase(e,t){const{caseInfo:n,startingFields:s,flowType:r,viewType:a=tI.PAGE,pageName:o,context:i=js.APP.APP,debugInfo:c,headers:l,theType:u,retrieveActionViewForNewObject:d=!1}=t;let p={};n&&n.content&&(p=n.content);const{content:g={},pageInstructions:h}=Xp.getExternalCaseOrObjectContent(e,d,i);let f={[Xp.getKeyBasedOnWorkType(e)]:e,content:{...p,...s,...g}};if(f={...f,...h&&{pageInstructions:h},...!YI.isObjectCaseType(e)&&{processID:r}},"CREATE_EXTERNAL_CASE"===u){const e=$C(i)?.caseInfo?.content;if(e){const t=rS.pruneKeys(e,new Set(["pxObjClass",Ls.getDefaultQualifiedName("pxObjClass"),"EmbedListUUID__",Ls.getDefaultQualifiedName("EmbedListUUID__")]),!1);f.content[js.getDefaultQualifiedName("pyAddCaseContextPage")]=t}}const m=Xp.getObjectTypeViewPayload(d,e);return tg(YI.getRouteKeyForCreateWork(e,d),{body:f,queryPayload:{...m,...YI.isExternalCaseType(e)?{casetypeID:e}:{caseClassName:e},viewType:a,params:{pageName:o}},headers:{...l,...c&&{...wd.addDebugHeaders(c)}}},i).then((t=>({response:t.data,requestPayload:f,headers:sI(t.headers,e,l)})))}static getObjectTypeViewPayload=(e,t)=>e?YI.shouldUseUnifiedHandling()?{casetypeID:t,actionID:js.getDefaultQualifiedName(js.VIEW_NAMES.OBJECT_CREATE_VIEW)}:{objectTypeID:t,actionID:js.getDefaultQualifiedName(js.VIEW_NAMES.OBJECT_CREATE_VIEW)}:{};static getExternalCaseOrObjectContent=(e,t,n)=>{const s=YI.isExternalObject(e),r=YI.isExternalCaseType(e);if((r||s)&&!t){const e=rI(n,{isExternalObject:Boolean(!r&&s)}),{content:t,pageInstructions:a}=e.content;return{content:t,pageInstructions:a}}return{}};static getKeyBasedOnWorkType=e=>YI.shouldUseUnifiedHandling()?"caseTypeID":YI.isObjectCaseType(e)?"objectTypeID":"caseTypeID"}const Zp=Xp,eg=()=>({registerHeader:(...e)=>wd.registerHeader(...e),unRegisterHeader:(...e)=>wd.unRegisterHeader(...e),getRegisteredHeaders:()=>wd.getRegisteredHeaders()}),tg=(e,{body:t={},queryPayload:n={},cancelTokenSource:s,headers:r={},responseType:a},o,i)=>{const{restApi:c,reqType:l}=i_(e,n),u={method:l,headers:r,body:t,...a&&{responseType:a}};s&&(u.signal=s.token);const d="createWork"===e?YI.appendExcludeQueryParamToUrl(c):c;return Wd(d,u,o,i??{})},ng=(e,{method:t="GET",body:n={},headers:s={},withoutDefaultHeaders:r=!1},a)=>{e.startsWith("http:")||e.startsWith("https:")||(e=rn()+e);return Wd(e,{method:t,headers:s,body:n,withoutDefaultHeaders:r},a)},sg=e=>TA.doesRestApiExist(e),rg=()=>zd(),ag=e=>Yd(e),og=e=>{jd=e},ig=()=>Zp,cg=new Set;function lg(e){try{const t=new URL(e);"https:"!==t.protocol&&"http:"!==t.protocol||cg.add(t.origin)}catch{}}function ug(e){let t,n;try{t=new URL(e,window.location.href).origin}catch{throw new Error("Blocked: malformed URL")}try{n=window.location.origin??new URL(window.location.href).origin}catch{n=""}if(t!==n&&!cg.has(t))throw new Error(`Blocked: untrusted script origin "${t}"`)}const dg="getCustomComponent",pg="text/javascript";function gg(e){let t;try{t=new URL(e).protocol}catch{throw new Error("Component fetch blocked: malformed dev server URL")}if("http:"!==t&&"https:"!==t)throw new Error(`Component fetch blocked: unsupported dev server URL scheme "${t}"`)}const hg=new class{getTypes={SCRIPT:"script",STYLE:"link"};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={}}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="",s=0;return e.forEach((e=>{n+=`${0===s?"?":"&"}field${s}=${e.field}&value${s}=${e.value}`,s+=1})),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,n,t):this.getSvcComponentsConfigCombinedUrl(e,n,t)}async getSvcComponentsConfigSeparatedUrls(e,t,n){const s=PA.getBuiltOnAppNames(),r=this.loadAndFilterPegaComponentsConfig(e,s);let a=Promise.resolve([]);!0!==n.skipLoadCustomerComponents&&(a=this.loadAndCustomerComponentsConfig(t,e));const o=[],i=PA.environmentInfoObject?.pyInfinityStaticService;if(i){const e=[],t=await Promise.all([r,a]),[n,s]=t,i=[];for(const t of s)!0===t.isSdkOverridden?e.push(t.componentDefinition):i.push(t.componentDefinition);const c=this.mergeComponentList([n,i,e]);o.push(...c)}else{const e=this.fetchSDKComponent(t);await Promise.all([r,a,e]).then((e=>{const t=this.mergeComponentList(e);o.push(...t)}))}if(n.alternateDesignSystemURL&&1===o.length){const s=await this.getSvcComponentsConfigADS(e,t,n);o[0].alternateDesignSystemConfig=s}return{data:{components:o}}}mergeComponentList=e=>{const[t=[],n=[],s=[]]=e,r=[...t,...n];return this.appStaticUrl?r.map((e=>{const{name:t,type:n,subtype:r}=e,a=s.reduce(((e,s)=>(t===s.name&&n===s.type&&r===s.subtype&&(e=s),e)),{});return Object.keys(a).length>0?{...e,alternateDesignSystemConfig:{...a}}:e})):r};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((s=>{let r=!0;e.forEach((e=>{Array.isArray(s[e.field])?s[e.field].includes(e.value)||(r=!1):s[e.field]!==e.value&&(r=!1)})),r&&this.checkForBuiltOnSupport(t,s.allowedApplications)&&n.push(s)})),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,t){let n=null;const s=PA.environmentInfoObject?.pyInfinityStaticService;if(s){const e={};t.forEach(((t,n)=>{e[`field${n}`]=t.field,e[`value${n}`]=t.value})),n=PCore.getDataPageUtils().getDataAsync(Ls.getDefaultQualifiedName("D_pzGetComponentsConfig"),"",e).then((e=>e.data.map((e=>({componentDefinition:JSON.parse(e.pxComponentDefinition),isSdkOverridden:void 0!==e.pyIsSDKOverridden&&e.pyIsSDKOverridden})))))}else if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const t=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;n=fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}else n=Promise.resolve([]);return n}checkForBuiltOnSupport(e,t){if(!e||!t||0===e.length||0===t.length)return!0;const n=e.split(",");return 0===n.length||n.some((e=>t.includes(e)))}async getSvcComponentsConfigCombinedUrl(e,t,n){const s=`${this.staticServerURL}v102/${this.appAlias}/componentslist${t}`,r=await fetch(s,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>({data:e})));if(!0===n.skipLoadCustomerComponents&&r?.data?.components?.length>0&&(r.data.components=r.data.components.filter((e=>void 0===e.componentKey))),n.alternateDesignSystemURL&&1===r?.data?.components?.length){const s=await this.getSvcComponentsConfigADS(e,t,n);r.data.components[0].alternateDesignSystemConfig=s}return r}getSvcComponentsConfigADS(e,t,n){const s=`${n.alternateDesignSystemURL}${n.alternateDesignSystemURL?.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(s,{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){try{const t=PA.environmentInfoObject?.pyInfinityStaticService,{callUrlKey:n,queryPayload:s,callUrl:r}=this.buildImageRequest(e,t);return this.imageBlobUrlCache[r]||(this.imageBlobUrlCache[r]=this.fetchImage(n,s,r,t)),this.imageBlobUrlCache[r]}catch(e){return Promise.resolve(null)}}buildImageRequest(e,t){let n,s="getBinaryFile",r=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;if(t){const t=/DATA-CONTENT-IMAGE\s([^!]*)!.*\/OPERATORIMAGES\//i,a=e.match(t);if(a){const e=a[1]?.trim();if(!e)throw console.warn("AssetLoader.buildImageRequest: operator image key is missing user id"),new Error("AssetLoader.buildImageRequest: operator image key is missing user id");s="getOperatorImage",n={user_ID:e.toLowerCase()}}else n={fileID:e};r=i_(s,n)?.restApi||r}return{callUrlKey:s,queryPayload:n,callUrl:r}}fetchImage(e,t,n,s){return s?tg(e,{queryPayload:t}).then((e=>{const n=this.decodeBase64ToByteArray(e.data),s=this.getMimeTypeFromKey(t?.fileID||t?.user_ID||""),r=new Blob([n],{type:s});return window.URL.createObjectURL(r)})).catch((e=>{throw console.error("Error fetching image:",e),e})):fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).then((e=>window.URL.createObjectURL(e))).catch()}decodeBase64ToByteArray(e){const t=atob(e),n=t.length,s=new Uint8Array(n);for(let e=0;e<n;e+=1)s[e]=t.charCodeAt(e);return s}getMimeTypeFromKey(e){const t={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif"},n=e.toLowerCase().split("!").pop()||"";return t[n]?t[n]:"application/octet-stream"}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}`}})}getSvcAvailableLocales(){const e=`${this.appStaticUrl}v102/app/${this.appAlias}/locales/getLocaleCodes`;return fetch(e,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).catch((()=>[]))}async getSvcComponent(e){try{const t=PA.environmentInfoObject?.pyC11nDXCBDevURL;if(t){const e=t.replace(/\/+$/,"");gg(e);const n=await fetch(`${e}/index.js`);if(!n.ok)throw new Error(n.statusText);return await n.text()}const n=PA.environmentInfoObject?.pyInfinityStaticService;if(n){const t=PA.environmentInfoObject?.pxApplication?.pxUpdateDateTime,n=t?rS.parsePegaDateTimeToTimestamp(t):null,s=`${e}${n?`?v=${n}`:""}`;return(await tg(dg,{queryPayload:{componentName:s}})).data}const s=await fetch(`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}});if(!s.ok)throw new Error(s.statusText);return await s.text()}catch(e){throw console.error("Error fetching service component:",e),e}}async importCustomComponentMap(e,t){try{const n=PA.environmentInfoObject?.pyInfinityStaticService,s=PA.environmentInfoObject?.pyC11nDXCBDevURL;let r=`${this.appStaticUrl}v100/componentlib/componentsmap/${e}`;if(s){gg(s);const e=s.replace(/\/+$/,"");r=`${e}/index.js`}if(n&&!s){const n=PA.environmentInfoObject?.pxApplication?.pxUpdateDateTime,s=rS.parsePegaDateTimeToTimestamp(n),r=rS.parsePegaDateTimeToTimestamp(t),a=[];s&&a.push(`v=${s}`),r&&a.push(`libV=${r}`);const o=a.length?`${e}?${a.join("&")}`:e,i=await tg(dg,{queryPayload:{componentName:o}});return void await this.appendCustomScriptToHead(i.data)}if(n||s){if("undefined"==typeof document)return;return void await new Promise(((e,t)=>{const n=document.createElement("script");n.src=r,n.type="text/javascript";const s=setTimeout((()=>{t(new Error(`Timed out waiting for custom component script to load: ${r}`))}),3e4);n.onload=()=>{clearTimeout(s),e()},n.onerror=()=>{clearTimeout(s),t(new Error("Error while appending custom component map"))},document.head.appendChild(n)}))}const a=await fetch(r,{headers:{Authorization:`Bearer ${this.b2sJWT}`}});a.ok||console.error("Error while fetching custom component map");const o=await a.text();this.setCCV2LibId(e),await this.appendCustomScriptToHead(o)}catch(e){console.error("Exception while appending custom component map (or load blocked):",e)}}async appendCustomScriptToHead(e){if("undefined"!=typeof document)try{await new Promise(((t,n)=>{const s=document.createElement("script");s.src=window.URL.createObjectURL(new Blob([e],{type:pg}));const r=setTimeout((()=>{n(new Error("Timed out waiting for custom component script to load"))}),3e4);s.onload=()=>{clearTimeout(r),t()},s.onerror=()=>{clearTimeout(r),n(new Error("Error while appending custom component map"))},document.head.appendChild(s)}))}catch(e){console.error("Exception appendCustomScriptToHead:",e)}}loadSvcComponent(e){return new Promise(((t,n)=>{this.getSvcComponent(e).then((s=>{if("undefined"==typeof document)return void n(e);const r=document.createElement("script");r.src=window.URL.createObjectURL(new Blob([s],{type:pg})),r.onload=()=>t(e),r.onerror=()=>n(e),document.head.appendChild(r)})).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,cg.clear(),e&&t&&"no-appstatic"!==t&&"no-cdn"!==t?(this.appStaticUrl=t.endsWith("/")?t:`${t}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0,lg(this.staticServerURL),lg(this.appStaticUrl)):e&&t&&"no-appstatic"===t?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0,lg(this.staticServerURL)):e&&t&&"no-cdn"===t&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,lg(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,s)=>{if("undefined"==typeof document)return void s(e);const r=document.createElement(t);if("script"===t){const t=r;t.onload=()=>{n(e)},t.onerror=()=>{s(e)},t.type=pg,t.charset="UTF-8",t.async=!1,t.src=e}else{const t=r;t.type="text/css",t.rel="stylesheet",t.href=e}document.head.appendChild(r)})).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 s=[];return e.forEach((e=>{const t=Object.keys(e)[0];let r=n?Object.values(e)[0]:this.getStaticServerUrl();r=r.endsWith("/")?r:`${r}/`,this.loadedAssets[t]||(t.includes(".js")?s.push(this.getLoader()(r+t,this.getTypes.SCRIPT)):t.includes(".css")&&this.getLoader()(r+t,this.getTypes.STYLE),this.loadedAssets[t]=!0)})),Promise.all(s)}getAssetsFromIsolations(e){const t=this.b2sJWT?.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")||"",n=decodeURIComponent(r.g.atob(t).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")),s=JSON.parse(n),a=s?.tenant_id,{restApi:o,reqType:i}=o_("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()))}},fg="component-loader",mg={},Ig=async(e,t)=>{if(!e?.length||!1===window.PCore?.getBehaviorOverride("dynamicLoadComponents"))return Promise.resolve();const n=hg.getLoader(),s=t||hg.staticServerURL;if(hg.getLoader(fg))return hg.getLoader(fg)(e,s);const r=new Set(Object.keys(mg)),a=e.flatMap((e=>{if(r.has(e))return[];const t=Co.getComponent(e);if(!t){const t=`${hg.getConstellationServiceUrl()}/v860/${hg.getAppAlias()}/component/${e}.js`;return r.add(e),[n(t,hg.getTypes.SCRIPT)]}const a=(t.scripts||[]).map((e=>n(e.startsWith("http")?e:`${s}${e}`,hg.getTypes.SCRIPT))),o=(t.styles||[]).map((e=>n(`${s}${e}`,hg.getTypes.STYLE)));return r.add(e),[...a,...o]}));return Promise.all(a.map((e=>e.catch((e=>console.error("Error loading asset:",e))))))},Eg="component-state-lru-index";function yg(e){return"object"==typeof e&&null!==e&&"key"in e&&"accessedAt"in e&&"string"==typeof e.key&&"number"==typeof e.accessedAt}function Ag(){try{const e=sessionStorage.getItem(Eg);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(yg):[]}catch{return[]}}function Cg(e){try{sessionStorage.setItem(Eg,JSON.stringify(e))}catch{}}function Sg(e){const t=Ag().filter((t=>t.key!==e));t.unshift({key:e,accessedAt:Date.now()}),Cg(t)}const _g=()=>"undefined"!=typeof sessionStorage?sessionStorage:null;const Ng=new class{#a;constructor(){this.userSettings={},this.componentCache={},this.contextMapToClearOnCancel={},this.#a=!1}getNormalizedKey(e){return e?.toString().trim().replace(/\s/g,"-").toLowerCase()}setComponentState=(e,t,n)=>{_g()?n?.managed&&"FULL_PORTAL"!==PA.getRenderingMode()||(_g()?.setItem(this.getNormalizedKey(e),JSON.stringify(t)),n?.managed&&(Sg(this.getNormalizedKey(e)),function(e){const t=Ag();if(t.length<=100)return[];const n=[],s=t.slice(0,100),r=t.slice(100);for(const t of r){try{e(t.key)}catch{}n.push(t.key)}Cg(s)}((e=>{_g()?.removeItem(e)})))):console.error("Session Storage not found")};getComponentState=(e,t)=>{if(t?.managed&&"FULL_PORTAL"!==PA.getRenderingMode())return;const n=_g()?.getItem(this.getNormalizedKey(e))??null,s=n?rS.isValidJson(n):void 0;return t?.managed&&null!=(s??n)&&Sg(this.getNormalizedKey(e)),s||n};removeComponentState=(e,t)=>{t?.managed&&"FULL_PORTAL"!==PA.getRenderingMode()||(_g()?.removeItem(this.getNormalizedKey(e)),t?.managed&&function(e){const t=Ag(),n=t.filter((t=>t.key!==e));n.length!==t.length&&Cg(n)}(this.getNormalizedKey(e)))};fetchUserSettings=async()=>{if(sg("getUserSettings")){const{restApi:e,reqType:t}=i_("getUserSettings");Wd(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=()=>{PA.getUserSettings()?this.userSettings=PA.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 rS.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(!sg("updateUserSettings"))return Promise.resolve("updateUserSettings route is not available");n=i_("updateUserSettings");const{restApi:s,reqType:r}=n;return Wd(s,{method:r,body:rS.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 s=n.clearOnCancelForContext;if(s&&(Object.hasOwn(this.contextMapToClearOnCancel,s)?this.contextMapToClearOnCancel[s].add(this.getNormalizedKey(e)):this.contextMapToClearOnCancel[s]=new Set([this.getNormalizedKey(e)])),this.componentCache[this.getNormalizedKey(e)]=t,!this.#a){this.#a=!0;const e=e=>{const{context:t}=e||{};(this.contextMapToClearOnCancel[t]||new Set).forEach((e=>{this.resetComponentCache(e)})),delete this.contextMapToClearOnCancel[t]};fd.subscribe(js.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}getURLParam(e,t){let n=new URL(globalThis.location.href).searchParams.get(e);return n?(n=t?atob(n):n,n):null}setURLParam(e,t,n){if(!PA.shouldUseURLParams())return;const s=new URL(globalThis.location.href);if(t=n?btoa(t):t,s.searchParams.get(e)===t)return;s.searchParams.set(e,t);globalThis.history.pushState({type:"ui-navigation"},"",s)}setURLParams(e){const t=new URL(globalThis.location.href);Object.entries(e).forEach((([e,n])=>{t.searchParams.set(e,n)}));globalThis.history.pushState({type:"update-history"},"",t)}resetComponentCache(e){return!("string"!=typeof e||!e?.trim())&&(!!Object.hasOwn(this.componentCache,this.getNormalizedKey(e))&&(delete this.componentCache[this.getNormalizedKey(e)],!0))}};const Tg=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=>{md.isOnline()&&t&&void 0!==this.contextArray[e]&&this.contextArray[e]>0&&BC({type:or,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]&&BC({type:ir,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 Dg=new class{constructor(){this.counterActionMgrId=0,this.actionMgrActions={}}getNextActionMgrId(){return this.counterActionMgrId+=1,this.counterActionMgrId.toString()}register(e,t,n,s,r="unknown",a,o=!0){if(void 0!==this.actionMgrActions[e])return null;const i={actionType:r,promise:t,resolve:n,reject:s,actionPayload:a};return this.actionMgrActions[e]=i,o&&Tg.enableLoadingIndicator(i.actionPayload),e}actionManagerPromise=(e,t="")=>{let n,s;""===t&&(t=this.getNextActionMgrId());const r=new Promise(((e,t)=>{n=e,s=t}));if(!n||!s)throw new Error("resolveFn or rejectFn is not defined.");return this.register(t,r,n,s,e),{actionMgrID:t,promise:r}};resolveActionByID(e,t,n=!0){const s=this.actionMgrActions[e];let r=e;return s?(setTimeout((()=>{s.resolve(t)}),0),Tg.disableLoadingIndicator(s.actionPayload,n)):r=null,r}rejectActionByID(e,t=!0,n){const s=this.actionMgrActions[e];let r=e;return s?(s.reject(n),Tg.disableLoadingIndicator(s.actionPayload,t)):r=null,r}setRemoteCaseHeaderByContext(e,t){t&&(e.headers=e.headers||{},e.headers.RemoteSystemID=t)}setTraditionalRemoteCaseParams(e,t){return e.className=t.className,e.isTraditionalRemoteCase=Bs.isTraditionalRemoteCase(t.className),e.remoteClassName=t.remoteClassName,e.action=t.action,e.viewName=Vs,e.gadgetId=t.gadgetId??YI.getUniqueGadgetId(),e.name=t.name,e.isRemoteCase=!0,e.skipSemanticUrl=!0,nr}};class Pg{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 Og=Pg,Rg=(e,t,n,s)=>TA.getResolvedSemanticURL(e,t,n,s),bg={getResolvedSemanticURL:Rg,getActions:()=>({ACTION_OPENWORKBYHANDLE:Yr,ACTION_SHOWDATA:Hr,ACTION_SHOWVIEW:Wr,ACTION_GETOBJECT:La,ACTION_SHOWINSIGHT:qr,ACTION_SHOWDASHBOARD:zr}),updateSemanticURLAndDocumentTitle:(e,t)=>TA.updateSemanticURLAndDocumentTitle(e,t),getSemanticURLForToaster:(e,t,n=!1,s)=>Rg(n?La:Yr,{caseClassName:e},{[n?"objectID":"workID"]:t},s)},vg={CASE_INFO:`${js.DATA}.${js.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${js.DATA}.${js.CASE_INFO.CASE_TYPE_ID}`,CASE_TYPE_NAME:`${js.DATA}.${js.CASE_INFO.CASE_TYPE_NAME}`,CASE_INFO_ID:`${js.DATA}.${js.CASE_INFO.CASE_INFO_ID}`,BUSINESS_ID:`${js.DATA}.${js.CASE_INFO.BUSINESS_ID}`},xg=e=>rS.getIn(e,js.getProperty(vg.CASE_CLASS_NAME),js.EMPTY_STRING),wg=e=>rS.getIn(e,js.getProperty(vg.CASE_INFO_ID),js.EMPTY_STRING),Mg=(e,t)=>{const n=wg(t);rS.setIn(e,"key",n)},Lg=e=>rS.getIn(e,js.getProperty(vg.CASE_INFO),{}),Ug=e=>{const t=kC();if(!e)return!1;const n=Ws(e),s=Qy(n),r=Qy(e);if(!s||!r)return!1;const a=Cy(s,n),o=Cy(r,e);if(!a||!o)return!1;const{key:i}=a;let{key:c}=o;return c||(c=t?.getState().data?.[e]?.objectInfo?.ID),i&&c&&i===c},Fg=e=>{const t=wg(e),n=rS.getIn(e,js.getProperty(vg.BUSINESS_ID),js.EMPTY_STRING),s=t.toLowerCase().includes(n.toLowerCase())?n:t,r=xg(e),a=(o=e,rS.getIn(o,js.getProperty(vg.CASE_TYPE_NAME),js.EMPTY_STRING));var o;return{businessID:n,caseType:r,resolvedURL:bg.getSemanticURLForToaster(r,s,YI.isObjectCaseType(r)),caseTypeName:a}};const jg=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 s=$I(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),t),{message:r}=Yp.validate(this.c11nEnv.getComponentName()?.toLowerCase(),t,e,s);return r?{status:!1,message:r}:{status:!0}}validateEmail(e,t={}){const n=Yp.getValidator("email");if(!n)return{status:"success"};const s=n(e,t);return s?{status:"failure",message:s}:{status:"success"}}},Vg="OPEN_PROCESS_ACTION",kg="OPEN_ASSIGNMENT",Bg="DELETE_CASE_IN_CREATE_STAGE",$g="SAVE_AND_CLOSE",Gg=e=>({type:$g,payload:e}),Wg="DELETE_WORK",Hg=e=>({type:Wg,payload:e});const qg=class{static getSavableDataPage(e){return OC(e)}static getLookUpDataPage(e){return bC(e)}static getLookUpDataPageInfo(e){return vC(e)}static getDataPageKeys(e){return RC(e)}};const zg=class{static getPropertyName(e){return No.getPropertyName(e)}static isProperty(e){return No.isProperty(e)}static getLeafPropertyName(e){return No.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}};class Yg{static createContainerPConnect(e,t,n,s=!1){const{accessedOrder:r,items:a}=e;if(r&&a){const e=r[r.length-1];if(a[e]?.view&&Object.keys(a[e].view).length>0){const r=a[e],o=e.substring(0,e.lastIndexOf("_")),{view:i,context:c}=r,{viewName:l,viewContext:u}=this.processRootViewDetails(i,r,t);if(!l)return null;return Cm({meta:i,options:{context:c,pageReference:u||t,containerName:n,containerItemID:e,parentPageReference:t,hasForm:s||n===my.WORKAREA||n===my.MODAL||l===js.CREATE_DETAILS_VIEW_NAME,target:o}}).getPConnect}}return null}static processRootViewDetails(e,t,n){const{config:{context:s,name:r}={}}=e,{context:a}=t;let o=r,i=s;const c=zg.isProperty(r),l=zg.isProperty(s);if(l){const e=zg.getPropertyName(s);i=HC(`.${e}`,e.startsWith(".")?n:"",a)}if(i||(i=n),c){const e=zg.getPropertyName(r);o=HC(`.${e}`,i,a)}return c&&l&&""!==o&&(o=r,i=s),{viewName:o,viewContext:i}}static addFlowContainerItem(e){const t=e.getContainerManager(),n=e.getContextName();let s,r;if("review"!==e.getValue("context_data.caseViewMode")){const e=n.substring(0,n.lastIndexOf("_")),t=xy(e),a=Cy(e,t);a&&({key:s,flowName:r}=a)}t.addContainerItem({semanticURL:"",key:s,flowName:r,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(n)})}static hasContainerItems=e=>{const t=e.getContextName(),n=e.getContainerName();return PCore.getContainerUtils().hasContainerItems(`${t}/${n}`)};static hasGetNextWorkLinks=e=>e.getValue(js.CASE_INFO.GETNEXTWORK);static getActiveCaseActionName=e=>{const t=e.getValue(js.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(js.CASE_INFO.ACTIVE_ACTION_ID),s=t.find((e=>e.ID===n));return s?.name||""};static getFirstCaseActionName=e=>{const t=e.getValue(js.CASE_INFO.CASE_INFO_ACTIONS);return t[0]?.name||""};static hasNotificationMessages=e=>!!e.getValue("caseMessages");static isCaseWideLocalAction=e=>{const t=e.getValue(js.CASE_INFO.ACTIVE_ACTION_ID),n=e.getValue(js.CASE_INFO.CASE_INFO_ACTIONS);if(n&&t){const e=n.find((e=>e.ID===t));return"Case"===e?.type}return!1};static getChildCaseAssignments=e=>{const t=e.getValue(js.CASE_INFO.CHILD_ASSIGNMENTS);let n=[];return t&&t.length>0&&t.forEach((({assignments:e=[],Name:t,caseTypeID:s})=>{const r=e.map((e=>({...e,caseName:t,caseTypeID:s})));n=n.concat(r)})),n};static hasAssignments=e=>{const t=e.getValue(js.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),n=Yg.getChildCaseAssignments(e);return!!(Array.isArray(n)&&n.length>0||Array.isArray(t)&&t.length>0||Yg.isCaseWideLocalAction(e))};static showBanner=e=>{const t=e();return Yg.hasNotificationMessages(t)||!Yg.hasAssignments(t)};static showTodo=e=>"perform"!==e.getValue("context_data.caseViewMode");static isRenderWithToDoWrapper=(e,t)=>{const n=e(),{showWithToDo:s}=t;return s&&(!Yg.isCaseWideLocalAction(n)||Yg.showTodo(n))};static getToDoAssignments=e=>{const t=e.getValue(js.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(js.CASE_INFO.ASSIGNMENT_LABEL),s=e.getValue(js.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)||[],r=Yg.getChildCaseAssignments(e)||[];let a=JSON.parse(JSON.stringify(r));a=a.map((e=>(e.isChild=!0,e)));const o=[...s,...a];let i=JSON.parse(JSON.stringify(o));return t&&!Yg.showTodo(e)&&(i=i.map((t=>(t.name=Yg.getActiveCaseActionName(e)||t?.name||n,t)))),i}}const Kg=Yg;const Qg=class{constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{const t=Dg.getNextActionMgrId();let n,s;const r=new Promise(((e,t)=>{n=e,s=t}));if(!n||!s)throw new Error("resolveFn or rejectFn is not defined.");return Dg.register(t,r,n,s,e),{actionMgrID:t,promise:r}};initializeContainers(e){const t=Dr,n=this.c11nEnv,s={context:n.getContextName(),name:n.getContainerName(),type:js.CONTAINER_TYPE.SINGLE},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),o={...s,...e,actionMgrID:r};return BC(CS(o)),a}addContainerItem(e){const t=Or,n=this.c11nEnv,s=n.getMetadata(),{children:r}=s||{};let a;Array.isArray(r)&&r.length>0&&([a]=r);const o=n.getContextName(),i=n.getContainerName(),c=Hs(i,o,e?.containerType===js.CONTAINER_TYPE.SINGLE),l=Va(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)),[js.WORKAREA].includes(i)&&delete e.data?.coreHeaders;const{actionMgrID:d,promise:p}=this.containerManagerPromise(t),g={...u,...e,actionMgrID:d};return BC(_S(g)),p}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));const t=jr,n={context:Ly(e.containerItemID),target:Qy(e.containerItemID)},{actionMgrID:s,promise:r}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:s};return BC(RS(a)),r}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));const t=Fr,n={target:Qy(e.containerItemID)},{actionMgrID:s,promise:r}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:s};return BC(wS(a)),r}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));const t=Rr,n={context:Ly(e.containerItemID),target:Qy(e.containerItemID)},{actionMgrID:s,promise:r}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:s};return BC(LS(a)),r}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));const t=Pr,n=zy(e),{actionMgrID:s,promise:r}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:s};return BC(SS(a)),r}addTransientItem(e){const{id:t,data:n,sourceContainerItemId:s}=e,r=this.c11nEnv.getContextName(),a=zs(t,r),o=tA(r);if(a&&o.includes(a))return a;let i=n;if(s){const e=$C(s);if(!e)throw new Error(`addTransientItem: source container item "${s}" not found in store`);i=rS.deepClone(e)}return BC(NS({transientItemID:a,contextName:r,target:Qy(r),data:i})),a}updateTransientData(e){const{transientItemID:t,data:n}=e,s=this.c11nEnv.getContextName();if(t){if(!tA(s).includes(t))return;BC(TS({transientItemID:t,data:n}))}}removeTransientItem(e){const t=this.c11nEnv.getContextName(),{target:n=this.c11nEnv.getTarget(),containerItemID:s,transientItemID:r}=e;if(r&&s){if(!tA(t).includes(r))return;BC(FS({target:n,containerItemID:s,transientItemID:r}))}}createContainerPConnect(e,t,n,s=!1){Kg.createContainerPConnect(e,t,n,s)}hasContainerItems(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return Gy(`${e}/${t}`)}isContainerInitialized(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return by(e,t)}};function Jg(e,t){return Pu((function(n,s){var r=null,a=0,o=!1,i=function(){return o&&!r&&s.complete()};n.subscribe(Ou(s,(function(n){null==r||r.unsubscribe();var o=0,c=a++;Nu(e(n,c)).subscribe(r=Ou(s,(function(e){return s.next(t?t(n,e,c,o++):e)}),(function(){r=null,i()})))}),(function(){o=!0,i()})))}))}function Xg(e,t){return Pu((function(n,s){var r=0;n.subscribe(Ou(s,(function(n){s.next(e.call(t,n,r++))})))}))}function Zg(e,t,n){return void 0===n&&(n=1/0),$l(t)?Zg((function(n,s){return Xg((function(e,r){return t(n,e,s,r)}))(Nu(e(n,s)))}),n):("number"==typeof t&&(n=t),Pu((function(t,s){return function(e,t,n,s,r,a,o,i){var c=[],l=0,u=0,d=!1,p=function(){!d||c.length||l||t.complete()},g=function(e){return l<s?h(e):c.push(e)},h=function(e){a&&t.next(e),l++;var i=!1;Nu(n(e,u++)).subscribe(Ou(t,(function(e){null==r||r(e),a?g(e):t.next(e)}),(function(){i=!0}),void 0,(function(){if(i)try{l--;for(var e=function(){var e=c.shift();o?Du(t,o,(function(){return h(e)})):h(e)};c.length&&l<s;)e();p()}catch(e){t.error(e)}})))};return e.subscribe(Ou(t,g,(function(){d=!0,p()}))),function(){null==i||i()}}(t,s,e,n)})))}function eh(e){return e&&$l(e.schedule)}function th(e){return e[e.length-1]}function nh(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return eh(th(e))?e.pop():void 0}(e);return Mu(e,n)}var sh=Rl((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),rh=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 xl(t,e),t.prototype.lift=function(e){var t=new ah(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new sh},t.prototype.next=function(e){var t=this;su((function(){var n,s;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var r=Ll(t.currentObservers),a=r.next();!a.done;a=r.next()){a.value.next(e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(s=r.return)&&s.call(r)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;su((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;su((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,s=n.hasError,r=n.isStopped,a=n.observers;return s||r?zl:(this.currentObservers=null,a.push(e),new ql((function(){t.currentObservers=null,Hl(a,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,s=t.thrownError,r=t.isStopped;n?e.error(s):r&&e.complete()},t.prototype.asObservable=function(){var e=new fu;return e.source=this,e},t.create=function(e,t){return new ah(e,t)},t}(fu),ah=function(e){function t(t,n){var s=e.call(this)||this;return s.destination=t,s.source=n,s}return xl(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:zl},t}(rh),oh=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return xl(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,s=e._value;if(t)throw n;return this._throwIfClosed(),s},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(rh);function ih(e,t){return Pu((function(n,s){var r=0;n.subscribe(Ou(s,(function(n){return e.call(t,n,r++)&&s.next(n)})))}))}class ch extends oh{constructor(e,t){super(t)}}const lh=(...e)=>ih((t=>e.includes(t.type)));var uh=new fu((function(e){return e.complete()}));function dh(e){return e?function(e){return new fu((function(t){return e.schedule((function(){return t.complete()}))}))}(e):uh}const ph=(e,t,n)=>Lu((s=>("ERR_CANCELED"!==s?.code&&console.error(e,s),nh(GS(e,s,t,null,n))))),gh=(e,t)=>n=>new fu((s=>{let r={},a=0;return n.pipe(Zg((n=>{const s=Date.now();let o;return o=t||Xt,o&&o(n,r)&&s-a<e?dh():(r=n,a=s,nh(n))}))).subscribe(s)})),hh=e=>{const{dataPageID:t,context:n,headers:s,containerItemID:r}=e,a={data_view_ID:t},{restApi:o,reqType:i}=i_("createDataObject",a),{content:c}=rI(r);return Mu(Wd(o,{method:i,headers:s,body:{data:c.content,pageInstructions:c?.pageInstructions}},r)).pipe(Xg((t=>({response:t.data,actionInPayload:e}))),ph("Error occurred during ajax call at createDataObject Epic",n))},fh=e=>{const{dataLookUp:t,context:n,headers:s,viewName:r,requestPayload:a}=e,o={data_view_ID:t,view_ID:r},{restApi:i,reqType:c}=i_("readDataObject",o);return Mu(Wd(i,{method:c,headers:s,body:{dataViewParameters:a}},n)).pipe(Xg((t=>({response:t.data,headers:sI(t.headers),actionInPayload:e}))),ph("Error occurred during ajax call at getDataObjectView Epic",n))},mh=e=>{const{dataPageID:t,context:n,headers:s,containerItemID:r,key:a}=e,o={data_view_ID:t},{restApi:i,reqType:c}=i_("updateDataObject",o),{content:l}=rI(r);return Mu(Wd(i,{method:c,headers:{...s,"if-match":e?.etag},body:{data:{...l.content,...a},pageInstructions:l.pageInstructions||[]}},r)).pipe(Xg((t=>({response:t.data,actionInPayload:e}))),ph("Error occurred during ajax call at updateDataObject Epic",n))},Ih=e=>{const{lookupDatapage:t,context:n,headers:s,actionID:r,dataViewParameters:a}=e,o={data_view_ID:t,action_ID:r},{restApi:i,reqType:c}=i_("openDataObjectAction",o);return Mu(Wd(i,{method:c,headers:s,body:{dataViewParameters:a}},n)).pipe(Xg((t=>({response:t.data,headers:sI(t.headers),actionInPayload:e}))),ph("Error occurred during ajax call at getDataObjectView Epic",n))},Eh=e=>{const{savableDatapage:t,context:n,headers:s,actionID:r,keys:a,containerItemID:o,jsActionQueryParams:i}=e,c={data_view_ID:t,action_ID:r};let{restApi:l}=i_("submitDataObjectAction",c);const{reqType:u}=i_("submitDataObjectAction",c),{content:d}=rI(o);return l=oE(i,l),Mu(Wd(l,{method:u,headers:{...s,"if-match":e?.etag},body:{data:{...d?.content,...a},pageInstructions:d?.pageInstructions||[]}},n)).pipe(Xg((t=>({response:t.data,actionInPayload:e}))),ph("Error occurred during ajax call at getDataObjectView Epic",n))};const yh=new class{constructor(){this.components={}}_checkComponent(e,t){return!!this.components[t]?.[e]}start(e,t,n,s,r){const a={viewName:e,pageReference:n,contextName:s,isInProgress:!0,active:!0,caseKey:t};this.components[s]=this.components[s]||{},this.components[s][r]=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:s,pageReference:r}=n;dE(e,s,t,r,{})}}},Ah="postDataViewMetadata",Ch={getData:(e,t,n,s)=>((e,t,n,s={})=>{const r={dataViewName:e},{skipClearErrorMessages:a,signal:o,doNotMergeMessagesForStatusCode:i}=s,{restApi:c,reqType:l}=i_("getListData",r);return Wd(c,{method:l,body:t,...o&&{signal:o},...a&&{skipClearErrorMessages:a}},n,i)})(e,t,n,s),getListCount:(e,t,n)=>{const s={dataViewName:e},{restApi:r,reqType:a}=i_("getListDataCount",s);return Wd(r,{method:a,body:t},n)},getDataViewMetadata:(e,t,n,s)=>{const r=!!n,a=!!s,o=TA.doesRestApiExist(Ah),i=(r||a)&&o?Ah:"getDataViewMetadata",c={dataViewName:e},{restApi:l,reqType:u}=i_(i,c);if(o){if(r)return Wd(l,{method:u,body:{associationFilter:n}},t);if(a)return Wd(l,{method:u,body:{propertyFilter:s}},t)}return Wd(l,{method:u},t)},getDataObjectView:(e,t,n,s,r={})=>{const{skipClearErrorMessages:a,signal:o,doNotMergeMessagesForStatusCode:i}=r,c={data_view_ID:e,view_ID:t},l={dataViewParameters:n},{restApi:u,reqType:d}=i_("readDataObject",c);return Wd(u,{method:d,body:l,...o&&{signal:o},...a&&{skipClearErrorMessages:a}},s,i)},getCaseEditMetadata:(e,t)=>YI.getCaseEditMetadata(e,t),getCaseEditLock:(e,t)=>YI.getCaseEditLock(e,t),updateCaseEditFieldsData:(e,t,n,s)=>YI.updateCaseEditFieldsData(e,t,n,s),moveListRecords:(e,t)=>{const{sourceID:n,destinationID:s,context:r,listClass:a,viewName:o,viewClassName:i}=e,c={viewName:o,viewClassName:i},{restApi:l,reqType:u}=i_("moveListRecords",c);return Wd(l,{method:u,body:{content:{sourceID:n,destinationID:s,context:r,listClass:a}}},t)},isTimeElapsed:(e,t,n="")=>{if(t){if(e&&n===js.RELOAD_IF_OLDER_THAN)return new Date(e).setSeconds(t)<Date.now();if(e&&n===js.RELOAD_ONCE_PER_INTERACTION)return!0}return!0},getAppCacheKey:e=>void 0!==jy("root").find((e=>e.includes("authoring-preview")))?`${js.AUTHORING_PREVIEW_CONTAINER}-${e}`:`${hg.getAppAlias()}-${e}`,isDistinctResultsOnly:e=>{const t=PA.getKeyMapping("pyGUID");return!e.some((e=>e.field===t))}},Sh=/{(.*?)}/i,_h=/{(.*?)}/g,Nh=e=>null!==e.match(Sh),Th=e=>(e&&(e.startsWith("/")&&(e=e.substring(1,e.length)),e.endsWith("/")&&(e=e.substring(0,e.length-1))),e),Dh=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`}},Ph=e=>e.replaceAll("+","%20"),Oh=["portal","noPortal","debug","activeTab","contextParam","lang"],Rh=e=>{if(e.indexOf("?")>0){const[t,n]=e.split("?"),s=new URLSearchParams(n),r=new Map;for(const[e,t]of s)Oh.includes(e)||r.set(e,t);const a=Ph(new URLSearchParams(Array.from(r.entries())).toString());return a?`${t}?${a}`:t}return e},bh=(e,t)=>e.includes("/assignments")?((e,t)=>{const n=e.split("/"),s=n.indexOf("assignments"),r=n.slice(s-2).join("/"),a=n[n.length-1],o=o_(Kr,{assignmentID:a});return{routeEndpoint:o?.restApi,requestType:o?.reqType,payload:{assignmentID:a},options:t,routeKey:oa,urlPath:r}})(e,t):TA.getEndPointInfo(e),vh=()=>{const e=PA.environmentInfoObject?.pyExecutionRuntimeName;return"Infinity"===e};const xh=class{constructor(e,t,n){this.filter=e,this.messageHandler=t,this.contextName=n}};const wh=class{constructor(){this.users={},this.connected=!1,this.connectionsCount=1}_handleUserPresence({message:e}){const{state:t,updateById:n}=e,s=this.users[n];s&&(s.state=t,Object.keys(s.subscribers).forEach((e=>{s.subscribers[e]?.callback({state:s.state})})))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t,n){const s=this._getAutoGenId(),r=this.users[e];if(r)return r.subscribers[s]={callback:t,contextName:n},s;this.users[e]={subscribers:{[s]:{callback:t,contextName:n}}};const a={matcher:"PRESENCE",criteria:{userId:e}};return sf.subscribe(a,this._handleUserPresence.bind(this)),s}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],sf.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)}))}))}};const Mh=function(e,t,n,s){for(var r=e.length,a=n+(s?1:-1);s?a--:++a<r;)if(t(e[a],a,e))return a;return-1};const Lh=function(e){return e!=e};const Uh=function(e,t,n){for(var s=n-1,r=e.length;++s<r;)if(e[s]===t)return s;return-1};const Fh=function(e,t,n){return t==t?Uh(e,t,n):Mh(e,Lh,n)};const jh=function(e,t){return!!(null==e?0:e.length)&&Fh(e,t,0)>-1};const Vh=function(e,t,n){for(var s=-1,r=null==e?0:e.length;++s<r;)if(n(t,e[s]))return!0;return!1};const kh=function(e,t,n,s){var r=-1,a=jh,o=!0,i=e.length,c=[],l=t.length;if(!i)return c;n&&(t=An(t,ut(n))),s?(a=Vh,o=!1):t.length>=200&&(a=ve,o=!1,t=new Re(t));e:for(;++r<i;){var u=e[r],d=null==n?u:n(u);if(u=s||0!==u?u:0,o&&d==d){for(var p=l;p--;)if(t[p]===d)continue e;c.push(u)}else a(t,d,s)||c.push(u)}return c};var Bh=b?b.isConcatSpreadable:void 0;const $h=function(e){return ke(e)||Ze(e)||!!(Bh&&e&&e[Bh])};const Gh=function e(t,n,s,r,a){var o=-1,i=t.length;for(s||(s=$h),a||(a=[]);++o<i;){var c=t[o];n>0&&s(c)?n>1?e(c,n-1,s,r,a):Ve(a,c):r||(a[a.length]=c)}return a};const Wh=Rs((function(e,t){return as(e)?kh(e,Gh(t,1,as,!0)):[]}));const Hh=class{constructor(e,t){this.atomicSubscribers={},this.connectionsCount=0,this.connected=!1,this.matcher=e,this.criteria=t,this.messagingServiceSubscriptionID=""}_handleAtomicMessage({message:e}){Object.keys(this.atomicSubscribers).forEach((t=>{const n=this.atomicSubscribers[t];if(!n)return;const s=Object.keys(n.criteria),r=Object.keys(e);0===Wh(s,r).length&&n.callback(e)}))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t){const n=this._getAutoGenId();if(!this.messagingServiceSubscriptionID){this.messagingServiceSubscriptionID=n;const e={matcher:this.matcher,criteria:this.criteria},t=sf.subscribe(e,this._handleAtomicMessage.bind(this),void 0,n);this.messagingServiceSubscriptionID=t||n,this.connected=!0}return this.atomicSubscribers[n]={criteria:e,callback:t},n}unsubscribe(e){delete this.atomicSubscribers[e],0===Object.keys(this.atomicSubscribers).length&&(this.connected=!1,this.messagingServiceSubscriptionID&&(sf.unsubscribe(this.messagingServiceSubscriptionID),this.messagingServiceSubscriptionID=""))}};const qh=new class{constructor(){this.subscriptions={}}getOrCreateSubscription(e){if(!this.subscriptions[e]){const t={caseId:e};this.subscriptions[e]=new Hh("CASE",t)}return this.subscriptions[e]}};const zh=class{static transformReference(e){return e.replace(/^[^.]*\./,"caseInfo.content.")}static extractReferenceParts(e){const t=e.split("."),n=t.pop()||"";return{pageReference:t.join("."),propertyName:n}}static getContextPath(e){return e.includes("workarea")?e:Uy(`${e}/workarea`)||""}static publishCaseValuesUpdate(e,t){const n=this.getContextPath(t.actionInContext);Object.entries(e.message).forEach((([e,t])=>{const s=this.transformReference(e),{pageReference:r,propertyName:a}=this.extractReferenceParts(s);e.match(/\.\w+\[\d+\]\.\w+/)&&vI.executeStateMachine(n,s,t,!0,{skipStateUpdate:!0});BC([{type:Xs,payload:{reference:s,value:t,context:n}},{type:er,payload:{reference:s,value:t,context:n,pageReference:r,propertyName:a}}])}))}},{RESOURCE_TYPES:Yh}=Fs;const Kh=class{static openCase(e,t,n,s={}){const r={insKey:e,acTargetName:n,actionMgrID:Dg.getNextActionMgrId(),context:t,...s},a=pr;s&&s.channelName?r.headers={[js.X_ORIGIN_CHANNEL]:s.channelName}:PA.isWSSPortal()&&(r.headers={[js.X_ORIGIN_CHANNEL]:"WSS"});const{promise:o}=Dg.actionManagerPromise(a,r.actionMgrID);return BC({type:a,payload:r}),o}static openAssignment(e,t,n,s={}){const r={assignmentID:e,vcName:n,doDeleteCaseSummary:!0,actionMgrID:Dg.getNextActionMgrId(),context:t,...s},a=Ir;s&&s.channelName?r.headers={[js.X_ORIGIN_CHANNEL]:s.channelName}:PA.isWSSPortal()&&(r.headers={[js.X_ORIGIN_CHANNEL]:"WSS"});const{promise:o}=Dg.actionManagerPromise(a,r.actionMgrID);return BC({type:a,payload:{...r}}),o}static createCase(e,t,n,s={}){const r=dr,a={class:e,acTargetName:n,actionMgrID:Dg.getNextActionMgrId(),context:t,...s};s&&s.channelName?a.headers={[js.X_ORIGIN_CHANNEL]:s.channelName}:PA.isWSSPortal()&&(a.headers={[js.X_ORIGIN_CHANNEL]:"WSS"});const{promise:o}=Dg.actionManagerPromise(r,a.actionMgrID);return BC({type:r,payload:{...a}}),o}static getNextWork(e,t,n={}){const s=Ir,r={isGetNextWork:!0,vcName:t,doDeleteCaseSummary:!0,actionMgrID:Dg.getNextActionMgrId(),context:e,...n},{promise:a}=Dg.actionManagerPromise(s,r.actionMgrID);return BC({type:s,payload:{...r}}),a}static getOpenedCaseItems(e){const t=[],n=yy(e);if(n){const{items:s={}}=n,r=Object.keys(s),a=xy(e);r.forEach((n=>{if(s[n]&&(s[n].resourceType===Yh.CASE||s[n].resourceType===Yh.ASSIGNMENT||s[n].resourceType===Yh.OBJECT)){const{key:r="",context:o}=s[n],i=s[n],c=r.substring(r.indexOf(" ")+1),l=HC(".caseTypeID",js.CASE_INFO.CASE_INFO,o),u=a===n;t.push({...i,key:r,workID:r,caseID:c,className:l,context:o,containerItemID:n,target:e,active:u})}}))}return t}static getCaseDetails=(e,t)=>{if(!e)return Promise.reject(new Error("Case ID is required"));const n={caseID:e},{restApi:s,reqType:r}=i_(Yr,n),a={},o=Bs.getRemoteHeaderFromSourceClass(t??"");return o&&(a.RemoteSystemID=o),Wd(s,{method:r,headers:a})};static getCaseBulkActions=async e=>{const{restApi:t,reqType:n}=i_("getBulkActions"),s=e.map((e=>({ID:e}))),r=s.length,a=r/5,o={},i=[];for(let e=0;e<r;e+=a)o.cases=s.slice(e,e+a),o.cases.length&&i.push(Wd(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=c[e].data.availableActions:l.length&&(l=l.filter((t=>c[e].data.availableActions.some((e=>t.ID===e.ID)))));return l};static getCaseBulkActionsByCaseTypeID=async e=>{const t={casetypeID:e},{restApi:n,reqType:s}=i_("getCaseBulkActions",t),r=await Wd(n,{method:s});let a=[];return r.data?.availableActions?.length&&(a=r.data.availableActions),a};static getAssignmentBulkActions=async e=>{const{restApi:t,reqType:n}=i_("getAssignmentBulkActions"),s={assignments:e.map((e=>({ID:e})))},r=await Wd(t,{method:n,body:s});return r.data?.availableActions??[]}};class Qh{static CLOSE_CONTAINER_ITEM_EVENT=Fs.PUB_SUB_EVENTS.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM;static objectRedirectionSubIds={};static truncateNamespace(e){let t=e;return!Ls.isNamespaceEnabled()&&e&&e.includes("__")&&(t=e.substring(e.indexOf("__")+2)),t}static handleOpenObject(e){const{ObjectID:t}=e;let n;({ActionName:n}=e),n=this.truncateNamespace(n);const s=Ng.getComponentCache("lastActionID")||"";if("string"==typeof s&&s?.toLowerCase()!==n?.toLowerCase())return;let r=!1;const a=xy("app/modal");a&&(r=Cy("app/modal",a)?.isMinimizable??!1),!a||r?Kh.openCase(t,js.APP.APP,js.PRIMARY,{isAutoRedirection:!0}):fd.subscribe(this.CLOSE_CONTAINER_ITEM_EVENT,(e=>{e?.containerItemID===a&&(fd.unsubscribe(this.CLOSE_CONTAINER_ITEM_EVENT,"closeContainerItemForRedirection"),Kh.openCase(t,js.APP.APP,js.PRIMARY,{isAutoRedirection:!0}))}),"closeContainerItemForRedirection",!0)}static handleRefreshObject(e){Kh.openCase(e,js.APP.APP,js.PRIMARY,{forceRefresh:!0})}static handleObjectRedirection(e,t){const{message:n,filter:s}=e,{caseId:r,currUserID:a}=t;if(s?.criteria?.CurrentObjectID!==r||s?.criteria?.UserID?.toLowerCase()!==a?.toLowerCase())return;const{RedirectionType:o}=n||{};switch(o){case"OpenObject":this.handleOpenObject(n);break;case"RefreshObject":this.handleRefreshObject(r)}}static subscribeToRedirection(e){const t=PA.getOperatorIdentifier()||"",n={matcher:"REDIRECTION",criteria:{CurrentObjectID:e,UserID:t?.toLowerCase()}},s=sf.subscribe(n,(n=>{this.handleObjectRedirection(n,{caseId:e,currUserID:t})}));this.objectRedirectionSubIds[e]=s}static unsubscribeToRedirection(e){sf.unsubscribe(this.objectRedirectionSubIds[e]),delete this.objectRedirectionSubIds[e]}static subscribeToEvent(e,t){let n=null;if(e===js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD?n=e=>{const{caseId:t}=e;this.objectRedirectionSubIds[t]||this.subscribeToRedirection(t)}:e===js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD&&(n=e=>{const{caseId:t}=e;this.objectRedirectionSubIds[t]&&this.unsubscribeToRedirection(t)}),!n)throw new Error(`Unhandled eventKey: ${e}`);fd.subscribe(e,n,t)}static unsubscribeToEvent(e,t){fd.unsubscribe(e,t)}static subscribeToCaseEvents(){this.subscribeToEvent(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,"case_open_for_redirection"),this.subscribeToEvent(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,"case_close_for_redirection")}static unsubscribeToCaseEvents(){this.unsubscribeToEvent(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,"case_open_for_redirection"),this.unsubscribeToEvent(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,"case_close_for_redirection")}}const Jh=Qh,Xh=e=>{if("number"==typeof e)return Number.isFinite(e)?e:void 0;if("string"==typeof e&&""!==e.trim()){const t=Number(e);return Number.isFinite(t)?t:void 0}},Zh=()=>{const e=PA.getFeatureMap()?.pyMessageSequencingDelayInMS;if("number"!=typeof e&&"string"!=typeof e)return 100;const t=Number(e);return Number.isFinite(t)&&t>0&&t<=3e3?t:100};class ef{streams=new Map;arrivalCounter=0;enqueue(e,t,n){const{sequenceStreamId:s}=e,r={sequenceNumber:Xh(e.sequenceNumber),timestamp:Xh(e.timestamp),arrival:this.arrivalCounter,data:t};this.arrivalCounter+=1;const a=this.streams.get(s);if(a)return a.entries.push(r),void(a.entries.length>=20&&(console.warn(`SequencingBuffer: stream "${s}" reached 20 held messages; delivering now, later messages may arrive out of order`),this.flushStream(s)));this.streams.set(s,{entries:[r],dispatch:n,timer:setTimeout((()=>this.flushStream(s)),Zh())})}flushAll(){Array.from(this.streams.keys()).forEach((e=>this.flushStream(e)))}flushStream(e){const t=this.streams.get(e);t&&(clearTimeout(t.timer),this.streams.delete(e),ef.sortEntries(e,t.entries),t.entries.forEach((n=>{try{t.dispatch(n.data)}catch(t){console.error(`SequencingBuffer: delivering a message of stream "${e}" failed`,t)}})))}static sortEntries(e,t){t.every((e=>void 0!==e.sequenceNumber))?t.sort(ef.compareBySequenceNumber):t.every((e=>void 0!==e.timestamp))?t.sort(ef.compareByTimestamp):console.warn(`SequencingBuffer: stream "${e}" delivered in receiving order because ${ef.describeViolation(t)}`)}static describeViolation(e){return e.some((e=>void 0===e.sequenceNumber&&void 0===e.timestamp))?"a message has no ordering key":"messages mix sequenceNumber-only and timestamp-only ordering keys"}static compareBySequenceNumber(e,t){return e.sequenceNumber!==t.sequenceNumber?(e.sequenceNumber??0)-(t.sequenceNumber??0):e.timestamp!==t.timestamp?void 0===e.timestamp?1:void 0===t.timestamp?-1:e.timestamp-t.timestamp:e.arrival-t.arrival}static compareByTimestamp(e,t){return e.timestamp!==t.timestamp?(e.timestamp??0)-(t.timestamp??0):e.arrival-t.arrival}}const tf=new ef;class nf{static subscribers={};static connectionsCount=0;static webSocket=null;static connectionConfig=null;static inProgressSubscriptions=[];static inProgressMessages=[];static isServiceAlive=null;static serviceAliveHandler=null;static userPresence=new wh;static refreshB2SOffset=10;static agentSubscribeIdMap=new Map;static filterKeyToSubscriberIdMap=new Map;static get offlineEnabled(){return"undefined"!=typeof navigator&&(navigator.userAgent||"").includes("pxUsesOffline")}static isAuthenticated=!1;static initConnection(e){if(!e)return;const{messagingService:t}=e;if(!t||t&&t.length<=6)return;const n=hg.b2sJWT;if(!n||n.length<4)return;this.webSocket&&(tf.flushAll(),this.webSocket.close(),this.cleanSocketListeners());const s=t.endsWith("/")?t+"ws":t+"/ws";try{const e=new WebSocket(`${s}`);this.webSocket=e,this.boundHandleOnOpen=this.handleOnOpen.bind(this),this.boundHandleOnMessage=this.handleOnMessage.bind(this),this.boundHandleOnError=this.handleOnError.bind(this),this.boundHandleOnClose=this.handleOnClose.bind(this),e.addEventListener("open",this.boundHandleOnOpen),e.addEventListener("message",this.boundHandleOnMessage),e.addEventListener("error",this.boundHandleOnError),e.addEventListener("close",this.boundHandleOnClose)}catch(e){console.log(e)}}static handleOnError(e){this.getTokenExpiryTime()<=0&&(clearInterval(this.reInitInterval),this.reInitInterval=void 0,this.isAuthenticated=!1),console.error("web socket error - readyState:",this.webSocket?.readyState,"| isTrusted:",e?.isTrusted)}static handleOnClose(e){tf.flushAll(),null!==this.serviceAliveHandler&&(clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=null),this.isAuthenticated=!1,console.debug("web socket closed - code:",e?.code,"| wasClean:",e?.wasClean),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=hg.b2sJWT;if(!e||e.length<4)return;this.publishMessage({token:e})}}static unsubscribeAgentMessageCaseValues(e){if(e.assignmentID){const t=nf.agentSubscribeIdMap.get(e.assignmentID);nf.unsubscribe(t??""),nf.agentSubscribeIdMap.delete(e.assignmentID)}}static subscribeAgentMessageCaseValues(e){const t={matcher:"COACH_UPDATE",criteria:{caseId:e.caseKey,assignmentId:e.assignmentID}},n=nf.subscribe(t,(t=>{zh.publishCaseValuesUpdate(t,e)}));nf.agentSubscribeIdMap.set(e.assignmentID,n)}static handleOnMessage(e){if(null!==e&&"ALIVE"===e.data)null===this.isServiceAlive&&this.checkLiveliness(js.PRIORITY.PING),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}"}`),(e=>!!e?.filter)(t))"string"==typeof t.sequencing?.sequenceStreamId&&""!==t.sequencing.sequenceStreamId?tf.enqueue(t.sequencing,t,(e=>this.dispatchMessage(e,!0))):(t.sequencing&&console.warn("Message has a sequencing block without a usable sequenceStreamId; delivering it without ordering"),this.dispatchMessage(t));else if(t?.tokenExpiryTime){fd.subscribe(js.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,nf.subscribeAgentMessageCaseValues),fd.subscribe(js.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_UNLOAD,nf.unsubscribeAgentMessageCaseValues),this.isAuthenticated=!0,this.setTokenExpiryTime({tokenExpiryTime:t.tokenExpiryTime});const e=1e3*(this.getTokenExpiryTime()-this.refreshB2SOffset);setTimeout((()=>this.refreshB2STokenReInit()),e),this.inProgressSubscriptions.forEach((({messageSubscriber:e,id:t})=>{this.subscribeToSocket(e,t)})),this.inProgressSubscriptions=[],this.inProgressMessages.forEach((e=>{this.publishMessage(e)})),this.inProgressMessages=[]}else console.error("filter missing from received data from messaging service",e.data)}}static dispatchMessage(e,t=!1){const{matcher:n,criteria:s}=e.filter;delete s.environmentID,s.productionLevel&&delete s.productionLevel,this.dispatchToSubscribers(n,s,e,t)}static dispatchToSubscribers(e,t,n,s=!1){Object.keys(this.subscribers).forEach((r=>{const a=this.subscribers[r];if(a?.filter&&a.filter.matcher===e&&rS.isEqual(a.filter.criteria,t)){if(!s)return void a.messageHandler(n);try{a.messageHandler(n)}catch(e){console.error(`Subscriber "${r}" failed while handling a sequenced message`,e)}}}))}static reInitialization(e){this.reInitInterval||(Object.keys(this.subscribers).forEach((e=>{this.unsubscribe(e,!0)})),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)}),5500))}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.boundHandleOnOpen),this.webSocket.removeEventListener("message",this.boundHandleOnMessage),this.webSocket.removeEventListener("error",this.boundHandleOnError),this.webSocket.removeEventListener("close",this.boundHandleOnClose))}static disconnect(){null!==this.webSocket&&(this.cleanSocketListeners(),tf.flushAll(),this.webSocket.close(),this.webSocket=null)}static getFilterKey(e){return`${e.matcher}:${JSON.stringify(e.criteria)}`}static findExistingSubscriberId(e){return this.filterKeyToSubscriberIdMap.get(this.getFilterKey(e))}static subscribe(e,t,n,s){this.connectionsCount+=1;const r=s||`${Date.now()}_${this.connectionsCount}`;if("COACH_UPDATE"===e.matcher){const t=this.findExistingSubscriberId(e);if(t)return t}const a=new xh(e,t,n);return null!==this.webSocket&&1===this.webSocket.readyState&&this.isAuthenticated?(this.subscribeToSocket(a,r),r):(this.inProgressSubscriptions.push({messageSubscriber:a,id:r}),e&&this.filterKeyToSubscriberIdMap.set(this.getFilterKey(e),r),this.offlineEnabled&&(this.subscribers[r]=a),null===this.webSocket&&this.initConnection(this.connectionConfig),r)}static subscribeToSocket(e,t){this.subscribers[t]=e,e.filter&&this.filterKeyToSubscriberIdMap.set(this.getFilterKey(e.filter),t);if(Object.keys(this.subscribers).filter((t=>this.subscribers[t]===e)).length>1)return;const n={filter:e.filter,subscribe:{id:t}};this.webSocket?.send(JSON.stringify(n))}static unsubscribe(e,t){if(this.subscribers[e]){if(!t){const t=this.subscribers[e].filter;t&&this.filterKeyToSubscriberIdMap.delete(this.getFilterKey(t)),delete this.subscribers[e]}const n={unsubscribe:{id:e}};null!==this.webSocket&&1===this.webSocket.readyState&&this.webSocket.send(JSON.stringify(n))}this.offlineEnabled&&!t&&this.removeFromInProgressSubscriptions(e)}static removeFromInProgressSubscriptions(e){const t=this.inProgressSubscriptions.findIndex((t=>t.id===e));if(-1!==t){const e=this.inProgressSubscriptions[t].messageSubscriber.filter;e&&this.filterKeyToSubscriberIdMap.delete(this.getFilterKey(e)),this.inProgressSubscriptions.splice(t,1)}}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 dispatchLocalMessage(e){const{matcher:t,criteria:n,message:s={}}=e,{environmentID:r,productionLevel:a,...o}=n,i={msgId:`local_${Date.now()}`,filter:{matcher:t,criteria:o},message:s};this.dispatchToSubscribers(t,o,i)}static getCaseSubscription=e=>qh.getOrCreateSubscription(e);static initObjectRedirectionSubscription=()=>Jh.subscribeToCaseEvents();static refreshB2STokenReInit=async()=>{if(vh()){const e={body:{B2SToken:hg.b2sJWT}};tg("refreshB2S",e).then((e=>{const{newB2SToken:t}=e.data;t&&t.length>30?(hg.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}`)}))}else if(!sg("refreshB2S")){ng("/uas/api/v1/isolations/token/websocket-ticket",{method:"GET",withoutDefaultHeaders:!1},"").then((e=>{const{token:t}=e.data;t&&(hg.b2sJWT=t,this.setTokenExpiryTime({tokenExpiryTime:Math.round(Date.now()/1e3)+60}),this.webSocket?.close())})).catch((e=>{console.error(`websocket-ticket: 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 sf=nf;const rf=class{constructor(){this.records=[],this.maxRecords=0,this.isDirty=!1}getRecords(e){if(Number.isInteger(e?.pageNumber)&&Number.isInteger(e?.pageSize)){const t=[],{pageNumber:n,pageSize:s}=e,r=n*s;let a=r-s;for(;a<r;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(Number.isInteger(t?.pageNumber)&&Number.isInteger(t?.pageSize)){const{pageNumber:n,pageSize:s}=t,r=n*s;let a=0;for(let t=r-s+1-1;t<r;t+=1)this.records[t]=e[a],a+=1;if(e.length<s){const t=(n-1)*s+e.length;this.setMaxRecordsCount(t)}}else e||(e=[]),Array.isArray(this.records)&&Array.isArray(e)&&(this.records=XC(this.records,e,{isArrayDeepMerge:!1})),this.setMaxRecordsCount(this.records.length)}setMaxRecordsCount(e){this.maxRecords=e}getMaxRecordsCount(){return this.maxRecords}};const af=new class{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)";constructor(){this.dataStore={},this.dataStoreMeta={},this.subscribers={},this.dataPageSubscribers={},this.isCacheEnabled=!0,this.subscribedDataPageNames=new Map}getDataViewParameters(e,t){if(!e||!t)return e;if(!t.parameters)return{};const n=Array.isArray(t.parameters)?t.parameters:[t.parameters],s=new Set(n.map((e=>e.name))),r={};return Object.keys(e).forEach((t=>{s.has(t)&&(r[t]=e[t])})),r}resolveParameterValue(e,t,n,s,r){return rS.resolveParameterValue(e,t,n,s,r)}formatParameterValue(e,t,n,s,r){return rS.formatParameterValue(e,t,n,s,r)}resolveAndFormatParameters(e,t,n,s,r){return rS.resolveAndFormatParameters(e,t,n,s,r)}getData(e,t,n,s){const r=this.generateHash(e,t,s);if(this.dataStore[e]&&this.dataStore[e][r]){const t=this.dataStore[e][r];return t.isDirty?[]:t.getRecords(n)}return[]}async getDataAsync(e,t,n={},s,r,a={}){const o=yC(e),i=this.getDataViewParameters(n,o);a.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e));const c={skipClearErrorMessages:!0,...a};if(!this.isCacheable(e,r)||a.invalidateCache){const n=await this.fetchData(e,i,s,r,t,c);return{...n.data,data:this.isCacheable(e,r)?this.mergeDataStore(e,i,s,r,n):n.data?.data??[],pageNumber:n?.data?.pageNumber,pageSize:n?.data?.pageSize,queryStats:n?.data?.queryStats,status:n?.status}}const l=this.getData(e,i,s,r);if(l.length>0)return Promise.resolve({data:l});const u=await this.fetchData(e,i,s,r,t,c);return{...u.data,data:this.mergeDataStore(e,i,s,r,u),pageNumber:u?.data?.pageNumber,pageSize:u?.data?.pageSize,queryStats:u?.data?.queryStats,status:u?.status}}async getPageDataAsync(e,t,n={},s={}){const r=this.generateHash(e,n,null);if(s.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),this.isCacheable(e)&&this.dataStore[e]&&this.dataStore[e][r]){if(!s?.invalidateCache)return Promise.resolve(this.dataStore[e][r]);delete this.dataStore[e][r],this._removeDataStoreMetaEntry(e,n,r)}const{restApi:a,reqType:o}=i_(js.GET_PAGE_DATA,{dataViewName:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))}),i={method:o,...s.skipClearErrorMessages&&{skipClearErrorMessages:s.skipClearErrorMessages}};if(s.enableStreaming){const e=s.streamOptions||{};Object.assign(i,{responseType:"stream",adapter:"fetch",headers:{Accept:"text/event-stream"},...e})}const c=a&&n&&0===Object.keys(n).length?a.split("?")[0]:a;return Wd(c,i,t).then((t=>(this.isCacheable(e)&&(this.dataStore[e]={...this.dataStore[e],[r]:t.data},this._addDataStoreMetaEntry(e,n,r)),s.enableStreaming?t:t.data)))}subscribeToDataPageUpdates(e,t,n,s={}){if(!e||!t||!n)return!1;const r=this.generateHash(n,s,null);this.dataPageSubscribers[n]??={};const a=this.dataPageSubscribers[n];a[r]??={};const o=a[r];return this.subscribeToMessageService(n,e),!o[e]&&(o[e]??=t,!0)}unsubscribeToDataPageUpdates(e,t,n={}){if(!e||!t)return!1;const s=this.generateHash(t,n,null);delete this.dataPageSubscribers[t]?.[s]?.[e];const r=this.subscribedDataPageNames.get(t)??0;return r<=1?(this.subscribedDataPageNames.delete(t),e&&sf.unsubscribe(e)):this.subscribedDataPageNames.set(t,r-1),!0}unsubscribeToDatapageUpdates(e,t,n={}){return this.unsubscribeToDataPageUpdates(e,t??"",n)}_isDataPageCached(e,t){if(t&&rS.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],s=Ls.getDefaultQualifiedName("pxResults");Object.keys(n).forEach((n=>{if(this.dataStore[t][n]){this.dataStore[t][n].mergeRecords(e[t][n][s])}else{const r=new rf;this.dataStore[t][n]=r,r.mergeRecords(e[t][n][s]||[])}}))}))}_addDataStoreMetaEntry(e,t,n){const s=this.generateHash(e,t,null);this.dataStoreMeta[e]??={};const r=this.dataStoreMeta[e];r[s]??=[];const a=r[s];a.includes(n)||a.push(n)}_removeDataStoreMetaEntry(e,t,n){if(!e||t||n||(this.dataStoreMeta[e]={}),e&&t&&n){const s=this.generateHash(e,t,null);this.dataStoreMeta[e][s]=this.dataStoreMeta[e][s].filter((e=>e!==n))}}mergeDataStore(e,t,n,s,r){const a=this.generateHash(e,t,s),o=r?.data?.data;if(!o||0===o.length)return[];this.dataStore[e]||(this.dataStore[e]={}),this.dataStore[e][a]||(this.dataStore[e][a]=new rf);const i=this.dataStore[e][a];return i.mergeRecords(o,n),i.isDirty=!1,this._addDataStoreMetaEntry(e,t,a),i.getRecords(n)}isDataPage(e=""){return e.startsWith("D_")||e.startsWith("Declare_")||e.startsWith(Ls.getDefaultQualifiedName("D_"))||e.startsWith(Ls.getDefaultQualifiedName("Declare_"))}subscribeToUpdate(e,t,n,s,r,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]=r),this.subscribeToCascadeUpdates(e,t,n,s,a)}unsubscribe(e,t,n,s,r){delete this.subscribers[e]?.callback?.[r],t&&t.length>0&&UC.unRegisterFields(n,s,t,r)}handleMessage(e){const{msgId:t,message:n}=e,{datapage:s,parameters:r=""}=n,a=this.subscribers[s];this.markDataInstanceDirty(s,""===r?null:JSON.parse(r)),t&&this._executeDataPageSubscriptions(e),!t&&a?.callback&&Object.keys(a.callback).forEach((t=>{a.callback?.[t](e.message)}))}markDataInstanceDirty(e,t){let n,s;if((!t||(n=this.generateHash(e,t,null),s=this.dataStoreMeta[e]?.[n],s?.push(this.generateHash(e,null)),s))&&this.dataStore[e]){Object.keys(this.dataStore[e]).filter((e=>!t||!s||s.includes(e))).forEach((t=>{this.dataStore[e][t].isDirty=!0}))}}_executeDataPageSubscriptions(e){const{message:t}=e,{datapage:n,parameters:s}=t,r=s?JSON.parse(s):null;if(this.dataPageSubscribers[n])if(r){const t=[];t.push(this.generateHash(n,r,null)),t.push(this.generateHash(n,null,null)),t.forEach((t=>{const s=this.dataPageSubscribers[n]?.[t]??{};Object.keys(s).forEach((t=>{s[t](e.message)}))}))}else{const t=this.dataPageSubscribers[n];Object.keys(t).forEach((n=>{const s=t[n];Object.keys(s).forEach((s=>{t[n][s](e.message)}))}))}}isPerInteraction(e){const t=yC(e);return!t||"reloadOncePerInteraction"===t.refreshStrategy?.type}disableCache(e){this.isCacheEnabled=!e}generateHash(e,t,n){const s=yC(e);let r=[];s||(r=Object.keys(t||{}).map((e=>({name:e}))));const a=s?.parameters||r;let o="",i=e;const c=[];return Array.isArray(a)&&a.forEach((e=>{t?.[e.name]?c.push(t[e.name]):c.push(e.defaultValue??js.NULL_STRING)})),n&&c.push(JSON.stringify(n)),c.join(js.HASH_DELIMITER)&&(o=rS.getHashedString(c.join(js.HASH_DELIMITER)),i=e+js.UNDERSCORE_STRING+o),i}async fetchData(e,t,n,s,r,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),s&&(l.query=s),Ch.getData(e,l,r,c)}handleCascadeUpdate(){const{dataPageName:e,scope:t}=this;t.handleMessage({message:{datapage:e,parameters:""}})}subscribeToCascadeUpdates(e,t,n,s,r){t&&t.length>0&&UC.registerFields(n,s,t,this.handleCascadeUpdate.bind({dataPageName:e,scope:this}),r)}subscribeToMessageService(e,t){if(e&&this.subscribedDataPageNames.has(e)){const t=this.subscribedDataPageNames.get(e)??0;return void this.subscribedDataPageNames.set(e,t+1)}const n={matcher:"DATAPAGE_UPDATED",criteria:{datapage:e}};sf.subscribe(n,this.handleMessage.bind(this),void 0,t),this.subscribedDataPageNames.set(e,1)}isCacheable(e,t){return!(this.isPerInteraction(e)||!this.isCacheEnabled)&&!(t&&Object.keys(t).length>1)}};const of=class{constructor(e,t,n,s,r=100,a=500){this.finalDataViewCall=e,this.combiner=t,this.comparator=n,this.separator=s,this.maxtime=r,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,s,r=this.findCombinableDataViewCall(e);return n=new Promise((e=>{s=e})),r&&!r.dataViewCallMap[t]?(this.combiner(r,e),r.dataViewCallMap[t]={promise:n,resolve:s}):r?n=r.dataViewCallMap[t].promise:(r={...e,dataViewCallMap:{[t]:{promise:n,resolve:s}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[t]:{promise:n,resolve:s}}})),Object.keys(r.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(r):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>this.dequeueAllDataViewCalls()),this.maxtime)),n}};const cf=class{constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,t,n,s,r,a,o){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new of(t,n,r,s,a,o)),this.bufferedDataQueues[e]}},lf=(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,uf=e=>e.map((e=>e.field)),df=(e,t)=>{const n=(e.query?.filter).filterConditions,s=(t.query?.filter).filterConditions;let r=(t.query?.filter).logic;const a=Object.keys(n).length;lf(n,s)?("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(s.F0.rhs?.value)):(Object.keys(s).forEach(((e,t)=>{const o=`F${a+t}`;n[o]=s[e],r=r.replace(e,o)})),(e.query?.filter).logic+=` OR ${r}`);const o=uf(e.query?.select);uf(t.query?.select).forEach((t=>{o.includes(t)||(e.query?.select).push({field:t})}))},pf=(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]:!rS.isEqual(e.dataViewParameters?.[n],t.dataViewParameters?.[n]))))(e,t)||((e,t)=>!e.dataViewParameters&&!t.dataViewParameters)(e,t)),gf=(e,t)=>{const{data:n}=t,{dataViewCallMap:s,filterDataOnClient:r}=e;Object.keys(s).forEach((e=>{s[e].resolve({data:r(e,n)})}))},hf=e=>({combiner:df,comparator:pf,separator:gf,...e}),ff=(e,t)=>{if("undefined"!=typeof window)try{window.sessionStorage.setItem(e,t)}catch(e){}},mf=(e,t="",n="IS_NULL")=>({comparator:n,lhs:{field:e},...t&&{rhs:{value:t}}}),If=e=>null!=e&&"object"==typeof e&&!("then"in e);class Ef{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=new Map,this.keyCache=new Map,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,s)=>{const r=[...e.columns.map((e=>e.value)),...Object.entries(e.parameters).map((([e,t])=>`${e}+${t}`)),e.matchPosition,e.maxResultsDisplay].join(js.HASH_DELIMITER),a=rS.getHashedString(r),o=`${e.dataSource}_${a}`,i=`__dataviewmetadata__${e.dataSource}`,c=Ch.getAppCacheKey(i);if("undefined"!=typeof window&&window.sessionStorage.getItem(c)){const r=JSON.parse(`${window.sessionStorage.getItem(c)}`);if(t&&Ef.searchResultsCache?.[t]?.[o])n(Ef.searchResultsCache[t][o]);else if("form"!==e.cacheLifeSpan&&Ef.searchResultsCache?.persisted?.[o])n(Ef.searchResultsCache.persisted[o]);else{const a=new Ef(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,Ef.initializeCache(t,e,o,a),n(a)):(a.associationFilter=e.associationFilter,a.propertyFilter=e.propertyFilter,a.fetchMetaData(t).then((s=>{ff(c,JSON.stringify({isQueryable:s.data.isQueryable,dataSourceMetaData:s.data,isInitialised:!0,associationFilter:e.associationFilter})),a.isQueryable=s.data.isQueryable,a.dataSourceMetaData=s.data,a.isInitialised=!0,Ef.initializeCache(t,e,o,a),n(a)})).catch((e=>{a.isInitialised=!1,s(e)})))}}else if(e.deferDatasource&&yC(e.dataSource)){const s=new Ef(e,t),r=yC(e.dataSource);s.isQueryable=!!r?.isQueryable,s.isInitialised=!0,s.dataSourceMetaData=r,ff(c,JSON.stringify({isQueryable:r?.isQueryable,dataSourceMetaData:r,isInitialised:!0})),s.context=t,Ef.initializeCache(t,e,o,s),n(s)}else{const r=new Ef(e,t);r.associationFilter=e.associationFilter,r.propertyFilter=e.propertyFilter,r.fetchMetaData(t).then((s=>{ff(c,JSON.stringify({isQueryable:s.data.isQueryable,dataSourceMetaData:s.data,isInitialised:!0,associationFilter:e.associationFilter})),r.isQueryable=s.data.isQueryable,r.dataSourceMetaData=s.data,r.isInitialised=!0,Ef.initializeCache(t,e,o,r),n(r)})).catch((e=>{r.isInitialised=!1,s(e)}))}}))}static bufferedDataView=new cf;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage(hf(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete Ef.searchResultsCache[e]}static initializeCache(e,t,n,s){e&&"form"===t.cacheLifeSpan?.toLowerCase()?(void 0===Ef.searchResultsCache[e]&&(Ef.searchResultsCache[e]={}),Ef.searchResultsCache[e][n]=s):(void 0===Ef.searchResultsCache.persisted&&(Ef.searchResultsCache.persisted={}),Ef.searchResultsCache.persisted[n]=s)}fetchMetaData(e){return Ch.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){Ef.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,(e=>af.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)}}buildQueryWithKeys=(e,t,n)=>{const s=this.buildSelect(n),r=((e=[],t={},n="")=>{if(!e.length||!Object.keys(t))return;const s={};return e.forEach(((e,n)=>{const r=t[e];let a;a=r?mf(e,r,"EQ"):mf(e),s[`T${n+1}`]=a})),{logic:Object.keys(s).join(` ${n} `),filterConditions:s}})(e,t,"AND");return{select:s,...r&&{filter:r},...Ch.isDistinctResultsOnly(s)&&{distinctResultsOnly:"true"}}};buildSchemaForQueryableDPWithKeys=(e,t,n)=>({dataViewParameters:this.parameters,query:this.buildQueryWithKeys(e,t,n),paging:this.buildPageOptions()});getRowDataByKeys=async(e,t,n)=>this.memoizedGetRowDataByKeys(e,t,n);buildKeyCacheKey(e,t,n){const s=e.map((e=>[e,t[e]??""])),r=n?.columns?.map((e=>e.value));return JSON.stringify({filterEntries:s,columns:r,pageNumber:this.pageNumber})}memoizedGetRowDataByKeys(e,t,n){const s=this.buildKeyCacheKey(e,t,n);(n?.invalidateCache||n?.purgeDataPageCache)&&this.keyCache.delete(s);const r=this.keyCache.get(s);if(r)return r;const a=this.isQueryable?this.buildSchemaForQueryableDPWithKeys(e,t,n):this.buildSchemaForNonQueryableDP(),o=af.getDataAsync(this.dataSource,this.context,a.dataViewParameters,this.isQueryable?a.paging:void 0,this.isQueryable?a.query:void 0,{...n}).catch((e=>(this.keyCache.delete(s),Promise.reject(e))));return this.keyCache.set(s,o),o}getData(e,t){if(this.isQueryable){if(this.bufferInitialized)try{const t=this.buildSchemaForQueryableBufferDP(e);return Ef.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(t,e)}catch{const n=this.buildSchemaForQueryableDP(e,t);return af.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}const n=this.buildSchemaForQueryableDP(e,t);return af.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query,{...t})}return this.fetchNonQueryableResults(e,t)}getCachedResult(e,t){if(this.enablePagination&&If(t)&&t.has(this.pageNumber))return t.get(this.pageNumber);const n=this.cache.get(e);return this.enablePagination||!n||If(n)?void 0:n}handleCacheError(e,t){if(this.enablePagination){const t=this.cache.get(e);t&&If(t)&&t.delete(this.pageNumber)}else this.cache.delete(e);return Promise.reject(t)}storeCacheResult(e,t){if(this.enablePagination){let n=this.cache.get(e);n&&If(n)||(n=new Map,this.cache.set(e,n)),n.set(this.pageNumber,t)}else this.cache.set(e,t)}isResultCached(e){if(!this.isInitialised||!this.isValidDatasource()||this.context&&!nS(this.context))return!1;const t=e.toLowerCase(),n=this.cache.get(t);return!!n&&(!this.enablePagination||If(n)&&n.has(this.pageNumber))}memoizedGetData(e,t){const n=e?.toLowerCase(),s=this.cache.get(n);if(this.isResultCached(e)&&s){const e=this.getCachedResult(n,s);if(e)return e}const r=this.getData(e,t).catch((e=>this.handleCacheError(n,e)));return this.storeCacheResult(n,r),r}fetchData(e,t=!1,n){return this.isValidDatasource()?this.context&&!nS(this.context)?Promise.resolve({data:[]}):this.isInitialised?(this.pageNumber=t?this.pageNumber:1,this.memoizedGetData(e??"",n)):Promise.reject(new Error):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&&this.fetchNQDataPromise)return this.fetchNQDataPromise.then((()=>({data:this.filterDataOnClient(e,this.nonQueryableData,t)}))).catch((e=>Promise.reject(e)));if(this.dataSourceMetaData&&"structure"in this.dataSourceMetaData&&"list"===this.dataSourceMetaData.structure?.toLowerCase()){const n=this.buildSchemaForNonQueryableDP();return this.fetchNQDataPromise=af.getDataAsync(this.dataSource,this.context,n.dataViewParameters,void 0,void 0,t),this.isNQDataFetchInProgress=!0,new Promise(((n,s)=>{this.fetchNQDataPromise?.then((s=>(this.nonQueryableData=[...s.data],this.fetchedNQData=!0,n({data:this.filterDataOnClient(e,this.nonQueryableData,t)})))).catch((e=>s(e))).finally((()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null}))}))}return Promise.resolve(null)}filterDataOnClient(e,t,n){const s=(n?.columns??this.columns)?.filter((e=>e.useForSearch)).map((e=>e.value));return t.reduce(((t,r)=>{const a=s?.some((t=>{const s=Ef.resolveEmbeddedPath(t),a=rS.getIn(r,s);return null!=a&&this.positionMatches(`${a}`,e,n)}));return a&&t.push({...r}),t}),[])}static resolveEmbeddedPath(e){return e.startsWith("!P!")||e.startsWith("!PL!")?e.substring(e.lastIndexOf("!")+1).replace(/:/g,"."):e}positionMatches(e,t,n){const s=n?.ignoreCase??this.ignoreCase,r=s?e.toLowerCase():e,a=s?t.toLowerCase():t;switch(n?.matchPosition??this.matchPosition){case"start":return r.startsWith(a);case"contains":return r.includes(a);case"equals":return r===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 s={field:e.value};t.push(s)}})),t}buildFilters(e,t){const n=t?.matchPosition??this.matchPosition,s=t?.ignoreCase??this.ignoreCase,r={};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:s?"true":"false"},lhs:i,rhs:c,comparator:l};r[o]=u}}));const o=Object.keys(r).join(" OR ");return{filterConditions:r,logic:o}}buildQuery(e,t){const n=this.buildSelect(t);return e?{select:n,filter:this.buildFilters(e,t),...Ch.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}:{select:n,...Ch.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 yf=Ef;class Af{constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,t,n,s,r){void 0===e[t]&&(e[t]={}),e[t][n]=[{uniqueHash:s,callback:r}]}registerForRefresh(e,t,n,s,r){n=rS.convertClipboardPageToPageRefNotation(n);const a=s.split("/").join(js.HASH_DELIMITER),o=rS.getHashedString(a);if("PROP_CHANGE"===e)if(this.propChangeRefreshMap?.[r]?.[n]){this.propChangeRefreshMap[r][n].some((e=>e.uniqueHash===o))||this.propChangeRefreshMap[r][n].push({uniqueHash:o,callback:t})}else Af.initializeRefreshCache(this.propChangeRefreshMap,r,n,o,t);else if(this.refreshMap?.[r]?.[`${e}-${n}`]){this.refreshMap[r][`${e}-${n}`].some((e=>e.uniqueHash===o))||this.refreshMap[r][`${e}-${n}`].push({uniqueHash:o,callback:t})}else Af.initializeRefreshCache(this.refreshMap,r,`${e}-${n}`,o,t)}triggerPropChangeRefresh(e,t){const n=this.propChangeRefreshMap?.[t];if(!n)return!1;const s=cS.getPropertyValue(js.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,e,t),{interestPage:r=""}=s||{},a=e=>rS.convertPageRefToClipboardPageNotation(e).replace(`${js.CASE_INFO?.CASE_INFO_CONTENT}${r}`,"");if(n[e]){const t=a(e);return n[e].forEach((e=>e.callback(t))),!0}const o=Zu.getContextReferences(t)?.get(e),i=o&&cS.resolveContextTreeNodeProps(o.props)||{},{contextPageRef:c}=i;if(c&&n[c]){const e=a(c);return n[c].forEach((t=>t.callback(e))),!0}for(const t of Object.keys(n)){let s;if(rS.segmentsMatch(t,e)?s=e:c&&rS.segmentsMatch(t,c)&&(s=c),s){const e=a(s);return n[t].forEach((t=>t.callback(e))),!0}}return!1}triggerRefreshForType(e,t,n){return"PROP_CHANGE"===e?this.triggerPropChangeRefresh(t,n):!!this.refreshMap?.[n]?.[`${e}-${t}`]&&(this.refreshMap[n][`${e}-${t}`].forEach((e=>e.callback())),!0)}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}}const Cf=new Af;const Sf=class{static cleanCaches(e){UC.purgeCascadeFields(e),yh.removeContext(e),yf.clearContextedCache(e),fd.cleanContextSubscribers(e),MI(e),Zu.removeContextTreeNode(e),sf.clearContext(e),Cf.deRegisterForRefresh(e)}},_f="GET_DESCENDANTS",Nf={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",REFRESH_EXTERNAL_OBJECT:"refreshExternalObjectData",REFRESH_EXTERNAL_CASE_DATA:"refreshExternalCaseData"};const Tf=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]}},Df=e=>{fd.publish(js.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,e)},Pf=e=>{fd.publish(js.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,e)},Of=e=>{fd.publish(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_OPENED,e),fd.publish(js.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,e)},Rf=e=>{fd.publish(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE,e)},bf=e=>{fd.publish(js.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,e)},vf=e=>{fd.publish(js.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_UNLOAD,e)};const xf=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=[],s=t.context_data?.blocking_action_counter??0,r=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let a=t.context_data?.is_deferred_action_in_progress??!1;if(s<=0){if(a)n.push({type:Cr,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else{if(!(r.length>0))return;{const t=r.shift();a=!a,n.push({type:Cr,payload:{context:e,data:{context_data:{deferred_action_queue:r,blocking_action_counter:s,is_deferred_action_in_progress:a}}}}),t&&n.push(t)}}BC(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));const t=$C(e?.payload?.context);if(t){const n=[],s=t.context_data?.blocking_action_counter??0,r=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let a=t.context_data?.is_deferred_action_in_progress??!1;return r.length<=0&&!a&&(s<=0?(n.push(e),a=!a):r.push(e),n.unshift({type:Cr,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:r,blocking_action_counter:s,is_deferred_action_in_progress:a}}}}),BC(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=$C(e);return t&&!0===t.context_data?.is_deferred_action_in_progress?(BC({type:Cr,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 $C(e)?(BC({type:fa,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={...$C(e)};return t.context_data={...t.context_data},t&&t.context_data?.blocking_action_counter>0?(BC({type:fa,payload:{context:e,isInitiateBlockingAction:!1}}),t.context_data.blocking_action_counter-=1,this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;const t=$C(e);if(t){const n={...t};n.context_data={...n.context_data},n.context_data?.deferred_action_queue&&rS.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),BC({type:Cr,payload:{context:e,data:{...n}}}),Tg.disableLoadingIndicator({context:e})}}isDeferredActionInProgress(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t=$C(e);return!(!t||!0!==t.context_data?.is_deferred_action_in_progress)}},wf=(e,t)=>{const n={},s=qg.getLookUpDataPage(e),r=qg.getDataPageKeys(s);if(r)for(const e of r)n[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];return{dataViewParameters:n,dataPageID:s,dataPageKeys:r}},Mf=(e,t)=>{const n=qg.getSavableDataPage(e),s=qg.getDataPageKeys(n);return s?.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:s}},Lf=e=>{fd.publish(Fs.PUB_SUB_EVENTS.EVENT_CANCEL,e)},Uf=(e,t,n)=>YI.shouldUseUnifiedHandling()||(e=>{if(e.includes(js.ACTIONAREA))return!0;const t=yA(e),n=xy(`${t}/${js.ACTIONAREA}`);return Boolean(n?.includes(js.ACTIONAREA))})(e)?hr:rE(t,n??!1),Ff=(e,t,n)=>{const{callbacks:s}=n;return n.callbacks=null,e(t,n).then((e=>{"cancel"===e?s?.cancel?.():s?.submit?.()}))},jf=(e,t,n)=>n||t!==js.ACTION?e.getValue(Fs.CASE_INFO.ACTIVE_ACTION_ID):e.getValue(Fs.CASE_INFO.ASSIGNMENTACTION_ID),Vf=(e,t)=>{t&&(e.remoteCaseMeta=t)};const kf=class{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";MSG_SUBSCRIPT_VIEW_REQUIRED="subscriptView is required";constructor(e){this.c11nEnv=e}shouldDeleteCaseInCreateStage=(e,t,n)=>!e&&t||n;getCaseID=e=>e.caseID||this.c11nEnv.getValue(js.getProperty(Fs.CASE_INFO.CASE_INFO_ID))||e?.links?.open?.href?.split("/")?.[2];getSaveActionPayload=(e,t=!1,n=!1)=>{const s=e,r=s&&s.includes(js.MODAL),a=this.c11nEnv.getValue(Fs.CASE_INFO.CASE_INFO_ID),o=this.c11nEnv.getValue(Fs.CASE_INFO.ASSIGNMENT_ID),i=this.c11nEnv.getValue(Fs.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(Fs.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(Fs.CASE_INFO.ASSIGNMENTACTION_ID),c=this.c11nEnv.getContainerName(),l=this.c11nEnv.getValue(Fs.CASE_INFO.CASE_TYPE_ID),u=t?void 0:GI(this.c11nEnv.getContextName()),d=this.c11nEnv.getValue("isProcessAction","isProcessAction");return dS.buildActionObject({context:s,containerItemID:e,assignmentID:o,actionID:i,caseID:a,containerName:c,caseType:l,isModalAction:r,isFormValid:u,isProcessAction:d,saveOnly:t,autosave:n},this.c11nEnv)};actionsApiPromise=(e,t,n=!0)=>{let s,r,a="";a=t&&null!==t.actionMgrID?t.actionMgrID||"":Dg.getNextActionMgrId();const o=new Promise(((e,t)=>{s=e,r=t}));if(!s||!r)throw new Error("resolveFn or rejectFn is not defined.");return Dg.register(a,o,s,r,e,t,n),{actionMgrID:a,promise:o}};showDataObjectCreateView(e,t=Fs.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){const n=dS.buildActionObject({viewName:t,className:e},this.c11nEnv),s=nr,{promise:r}=this.actionsApiPromise(s,n);return BC({type:s,payload:{...n,containerName:Fs.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),r}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(!cy(t)){return new Qg(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}const n=Xr,s=dS.buildActionObject({containerItemID:e,context:t},this.c11nEnv),r=t&&t.includes(js.MODAL);BC({type:n,payload:{...s,isModalAction:r,isDataObject:!0,skipReleaseLockRequest:!0}});const{promise:a}=this.actionsApiPromise(n,s);return a.then((()=>{Lf({})}))}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));const{data:t}=kC()?.getState()||{},n=t[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error(js.DATA_CLASS_NOT_FOUND));if(mC(Fs.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW)){const t=this.handleSubscript.call(this,e,this.c11nEnv);if(t)return t}const s=qg.getSavableDataPage(n),r=Ia,a=!!e&&e.includes(js.MODAL),o=dS.buildActionObject({containerItemID:e,dataPageID:s},this.c11nEnv),{promise:i}=this.actionsApiPromise(r,o);return BC({type:"CREATE_DATA_OBJECT",payload:{...o,isModalAction:a,isFormValid:GI(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=Ea,s=qg.getSavableDataPage(e),r=qg.getDataPageKeys(s),a={};if(r)for(const e of r)a[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const o=dS.buildActionObject({dataViewName:s,dataViewParameters:a},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);return BC({type:"DELETE_DATA_OBJECT",payload:{...o}}),i}getDataObjectView(e,t,n={viewName:"",readOnly:!1,actionName:""}){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 s=ya,{dataPageID:r,dataViewParameters:a}=wf(e,t),o=dS.buildActionObject({dataLookUp:r,keyProperties:t,requestPayload:a,viewName:n.viewName||Fs.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:js.MODAL,readOnly:n.readOnly,actionName:n.actionName},this.c11nEnv),{promise:i}=this.actionsApiPromise(s,o);return BC({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}=kC()?.getState()||{},s=n[e]?.dataInfo?.content?.classID;if(!s)return Promise.reject(new Error(js.DATA_CLASS_NOT_FOUND));const{dataPageID:r,keys:a}=Mf(s,t),o=Aa,i=e&&e.includes(js.MODAL),c=dS.buildActionObject({containerItemID:e,dataPageID:r,key:a},this.c11nEnv),l=n[e]?.caseInfo?.headers?.etag,{promise:u}=this.actionsApiPromise(o,c);return BC({type:"UPDATE_DATA_OBJECT",payload:{...c,isModalAction:i,isFormValid:GI(e),etag:l}}),u}openDataObjectAction(e,t,n,s){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(!s)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));const r=Ca,{dataViewParameters:a,dataPageID:o,dataPageKeys:i}=wf(e,t),c=dS.buildActionObject({actionID:n,actionName:s,dataViewParameters:a,lookupDatapage:o,containerName:js.MODAL,dataViewPayload:i,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:l}=this.actionsApiPromise(r,c);return BC({type:r,payload:{...c}}),l}submitDataObjectAction(e,t,n,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(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));const{data:r}=kC()?.getState()||{},a=r[e]?.dataInfo?.content?.classID;if(!a)return Promise.reject(new Error(js.DATA_CLASS_NOT_FOUND));const o=s?.jsActionQueryParams,i=yA(e),c=Qy(i),l=Cy(c,i)||{},{resourceType:u="",key:d=""}=l,p=Sa,{dataPageID:g,keys:h}=Mf(a,t),f=dS.buildActionObject({containerItemID:e,actionID:n,resourceType:u,key:d,keys:h,savableDatapage:g,containerName:js.MODAL,context:e,jsActionQueryParams:o},this.c11nEnv);f.context=e;const m=r[e]?.caseInfo?.headers?.etag,{promise:I}=this.actionsApiPromise(p,f);return BC({type:p,payload:{...f,isFormValid:GI(e),etag:m}}),I}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(e=Bs.getRemoteCaseClassBySourceClass(e)??e,window.pms?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,Ls.getDefaultQualifiedName("pyStartCase"),t);const{dockable:n=!1}=t?.modalOptions||{};let s=t.theType?t.theType:(e=>{const t=YI.shouldUseUnifiedHandling();return YI.isExternalCaseType(e)?xa:YI.isExternalObject(e)?t?xa:"CREATE_EXTERNAL_OBJECT":t?dr:YI.isObjectCaseType(e)?"CREATE_OBJECT":dr})(e);const r=dS.buildActionObject({class:e,flowType:Ls.getDefaultQualifiedName("pyStartCase"),containerName:js.PRIMARY,openCaseViewAfterCreate:!0,...t,theType:s,modalOptions:{isDockable:n}},this.c11nEnv);Vf(r,t.remoteCaseMeta);const{promise:a}=this.actionsApiPromise(s,r);if(r.headers={...r.headers},t.channelName?r.headers[js.X_ORIGIN_CHANNEL]=t.channelName:PA.isWSSPortal()&&(r.headers[js.X_ORIGIN_CHANNEL]="WSS"),s=this.handleRemoteCaseForCreateWork(e,r,s),Id.getPreviewMode()){r.debugInfo={debugId:rS.generateUniqueID()};const e=wd.getCoreHeadersFromContext(r?.context||""),t=String(e?.debugInfo?.[js.COREHEADER_APP_DEBUG_ID]||"");t&&s!==dr&&(r.debugInfo={debugId:t})}return BC({type:s,payload:{...r}}),a}handleRemoteCaseForCreateWork(e,t,n){if(Bs.isRemoteCase(e)){const{RemoteClassName:n,RemoteSystemID:s,name:r}=Bs.getRemoteCase(e);if(t.className=e,t.class=n,Dg.setRemoteCaseHeaderByContext(t,s),Bs.isTraditionalRemoteCase(e)||Bs.isRemoteCaseVersionDifferent(e)){const s={className:e,name:r,action:Oa,remoteClassName:n};return Dg.setTraditionalRemoteCaseParams(t,s)}}return n}createCase(e,t={}){return this.createWork(e,{...t,theType:"CREATE_WORK"})}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=_r,s=dS.buildActionObject({dataViewID:e,dataViewParameters:t},this.c11nEnv),{promise:r}=this.actionsApiPromise(n,s);return BC({type:n,payload:{...s}}),r}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(),s=dS.buildActionObject({caseID:e,currentContext:n},this.c11nEnv),{promise:r}=this.actionsApiPromise("GET_DESCENDANTS",s),a=(o={...s,context:n},{type:_f,payload:o});var o;return BC(a),r}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(t=Bs.getRemoteCaseClassBySourceClass(t)??t,window.pms?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,t);const s={insKey:e,acTargetName:n.targetContainer||js.PRIMARY,containerName:n.targetContainer||js.PRIMARY};let r=YI.shouldUseUnifiedHandling()||!YI.isObjectCaseType(t)?pr:"GET_OBJECT";const a=dS.buildActionObject(s,this.c11nEnv);Vf(a,n.remoteCaseMeta);const{promise:o}=this.actionsApiPromise(r,a);return a.headers={...a.headers},n.channelName?a.headers[js.X_ORIGIN_CHANNEL]=n.channelName:PA.isWSSPortal()&&(a.headers[js.X_ORIGIN_CHANNEL]="WSS"),a.className=t,Bs.isRemoteCase(t)&&(r=this.setRemoteCaseParamsForOpenCase(a,t,r,n.remoteCaseMeta)),Id.getPreviewMode()&&n.targetContainer!==js.WORKAREA&&(a.debugInfo={debugId:rS.generateUniqueID()}),BC({type:r,payload:{...n,...a}}),o}setRemoteCaseParamsForOpenCase(e,t,n,s={}){const{RemoteSystemID:r,RemoteClassName:a,name:o}=Bs.getRemoteCase(t);if(Dg.setRemoteCaseHeaderByContext(e,r),e.isRemoteCase=!0,e.remoteCaseClass=t,e.remoteCaseMeta=s,Bs.isTraditionalRemoteCase(t)||Bs.getRemoteAppPlatformVersion(r??"")){const n={className:t,name:o,action:ba,remoteClassName:a};return Dg.setTraditionalRemoteCaseParams(e,n)}return n}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(t=Bs.getRemoteCaseClassBySourceClass(t)??t,window.pms?.plugins?.c11n?.openAssignment)return window.pms.plugins.c11n.openAssignment(e,t);const s={assignmentID:e,doDeleteCaseSummary:!0,containerName:n.containerName,isActionFromToDoList:n.isActionFromToDoList,isChild:!1,...void 0!==n.renderInline&&{renderInline:n.renderInline},...void 0!==n.pageName&&{pageName:n.pageName}};n.isChild&&(s.containerName=js.PRIMARY,s.isChild=n.isChild);let r=kg;const a=dS.buildActionObject(s,this.c11nEnv);Vf(a,n.remoteCaseMeta);const{promise:o}=this.actionsApiPromise(r,a);if(a.headers=a.headers||{},n.channelName?a.headers[js.X_ORIGIN_CHANNEL]=n.channelName:PA.isWSSPortal()&&(a.headers[js.X_ORIGIN_CHANNEL]="WSS"),Bs.isRemoteCase(t)){const{RemoteClassName:e,RemoteSystemID:s,name:o}=Bs.getRemoteCase(t);if(Dg.setRemoteCaseHeaderByContext(a,s),a.remoteCaseMeta=n.remoteCaseMeta,Bs.isTraditionalRemoteCase(t)||Bs.getRemoteAppPlatformVersion(s??"")){const n={className:t,name:o,action:Ra,remoteClassName:e};r=Dg.setTraditionalRemoteCaseParams(a,n)}}a.className=t,a.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),Id.getPreviewMode()&&![js.WORKAREA].includes(n.containerName)&&(a.debugInfo={debugId:rS.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 BC({type:r,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));e.endsWith(js.ACTIONAREA)&&(e=xy(e)||e);const n=Ly(e);let s=n;if(n?.includes(`/${js.WORKAREA}`)&&(s=n.substring(0,s?.lastIndexOf(`/${js.WORKAREA}`))),WI(n)){const e=[{type:"error",message:this.c11nEnv.getLocalizationService().getLocalizedMessage(this.MSG_ACTIVE_SUGGESTION_UNATTENDED)}];return id({messages:e,context:s,category:Fs.PAGE}),Promise.reject({type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}const r=t?.isTriggeredFromDifferentContext,{caseID:a,assignments:o,localActionID:i,caseActions:c,caseInfo:l,businessID:u,caseTypeID:d,caseTypeName:p}=aE(e,this.c11nEnv,{isTriggeredFromDifferentContext:r}),g=QI(l);let h,f=!1;const m=c?.find((e=>e.ID===i));m?f="Case"===m?.type:h=$C(n);let{assignmentID:I}=aE(e,this.c11nEnv,{isTriggeredFromDifferentContext:r});h?.context_data?.actionType&&(f=h.context_data.actionType===js.CASE,I=I||h.context_data.assignmentID);const E=sE(o,I,i,l?.activeActionID),[y,A]=a.split(" "),C={class:y,actionID:E,assignmentID:I,caseID:a,workID:A,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:f,doDeleteCaseSummary:!0,isInCreateStage:g,businessID:u,caseTypeID:d,caseTypeName:p};e?.includes(js.MODAL)&&(C.containerName=js.MODAL,C.isModalAction=!0),C.outcome=t.outcomeID,C.jsActionQueryParams=t.jsActionQueryParams,l?.isLocalAction&&(C.viewType=tI.FORM);const S=Uf(e,d,l?.isObjectWideAction),_=dS.buildActionObject(C,this.c11nEnv),{promise:N}=this.actionsApiPromise(S,_);return _.isProcessAction=this.c11nEnv.getValue("isProcessAction","isProcessAction")||$C(n).context_data.isProcessAction,_.headers??={},PA.isWSSPortal()&&(_.headers[js.X_ORIGIN_CHANNEL]="WSS"),xf.executeOrQueueDeferredAction({type:S,payload:{..._,context:n}}),N}getNextWork(){if("HYBRID"===PA.getRenderingMode())return fd.publish(Fs.PUB_SUB_EVENTS.CASE_EVENTS.GET_NEXT_WORK,{userIdentifier:PA.getOperatorIdentifier()}),Promise.resolve();const e=kg,t=dS.buildActionObject({containerName:js.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:n}=this.actionsApiPromise(e,t);return BC({type:e,payload:{...t}}),n}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));const t=kg,n=this.c11nEnv.getValue(Fs.CASE_INFO.CASE_INFO_ID),s=this.c11nEnv.getCaseSummary().headers,r=dS.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:a}=this.actionsApiPromise(t,r),o={type:t,payload:{...r,caseID:n,headers:s}};return BC(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(Fs.CASE_INFO.CASES),s=this.c11nEnv.getValue(Fs.CASE_INFO.ACTIVE_ACTION_ID),r=this.c11nEnv.getValue(Fs.CASE_INFO.IS_ASSIGNMENT),a={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(js.MODAL)&&(a.containerName=js.MODAL,a.isModalAction=!0);const o=dS.buildActionObject(a,this.c11nEnv),{promise:i}=this.actionsApiPromise(t,o),c=Ly(e);return BC({type:t,payload:{...o,context:c,cases:n,actionID:s,isAssignment:r,isFormValid:GI(c),classID:this.c11nEnv.getCurrentClassID()}}),i}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(Fs.CASE_INFO.CASES),s=this.c11nEnv.getValue(Fs.CASE_INFO.ACTIVE_ACTION_ID),r={containerName:e.includes(js.MODAL)?js.MODAL:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1,isModalAction:e.includes(js.MODAL)},a=dS.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,a),i=Ly(e);return BC({type:t,payload:{...a,context:i,cases:n,actionID:s,isFormValid:GI(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"));if(window.pms?.plugins?.c11n?.openBulkAction){const{callbacks:n}=t;return t.callbacks=null,window.pms.plugins.c11n.openBulkAction(e,t).then((e=>{"cancel"===e?n?.cancel?.():n?.submit?.()}))}const{selectedList:n,runningMode:s}=t,r=t.type,a={selectedList:n,vcName:t.target,actionName:t?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:r,runningMode:s,...t},o="OPEN_BULK_ACTION",i=dS.buildActionObject(a,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);return BC({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));return new Qg(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}approveCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(BC({type:Xs,payload:{reference:Fs.CASE_INFO.APPROVALFLAG,value:js.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)):(BC({type:Xs,payload:{reference:Fs.CASE_INFO.APPROVALFLAG,value:js.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(Fs.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:Xs,payload:{reference:Fs.CASE_INFO.DUPLICATECASEFLAG,value:js.DUPLICATE,context:e}},s={type:Xs,payload:{reference:Fs.CASE_INFO.DUPLICATECASEID,value:t,context:e}};return BC([n,s]),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:Xs,payload:{reference:Fs.CASE_INFO.DUPLICATECASEFLAG,value:js.IGNORE,context:e}},n={type:Xs,payload:{reference:Fs.CASE_INFO.DUPLICATECASEID,value:"",context:e}},s={type:Xs,payload:{reference:Fs.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return BC([t,n,s]),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=this.getCaseID(t);if(window.pms?.plugins?.c11n?.openLocalAction)return t.caseID=n,Ff(window.pms.plugins.c11n.openLocalAction,e,t);const s=t.assignKey||this.c11nEnv.getValue(Fs.CASE_INFO.ASSIGNMENT_ID),r=t.type,a={caseID:n,assignmentID:s,vcName:t.target,actionName:t?.name,assignKey:s,actionID:e,doDeleteCaseSummary:!0,localActionType:r,...t},o=t.containerName===js.ACTIONAREA?yr:(e=>YI.shouldUseUnifiedHandling()||"Object"!==e.type&&!YI.isObjectCaseType(e?.caseClassName||"")&&!window.location.href.includes("/objects/")?yr:"OPEN_OBJECT_ACTION")(t),i=dS.buildActionObject(a,this.c11nEnv);t.containerName!==js.ACTIONAREA&&t.containerName!==js.WORKAREA||(i.skipMergeAssignmentsAndActions=!1);const{promise:c}=this.actionsApiPromise(o,i),l=this.c11nEnv.getContextName(),u=jy(l)[0];let d;if(d=xy(u),d?.includes("actionarea")&&o===yr)return BC({type:o,payload:{...i}}),c;if("Object"===t.type)return BC({type:o,payload:{...i}}),c;const p=xy(u),g=n!==this.c11nEnv.getValue(js.getProperty(Fs.CASE_INFO.CASE_INFO_ID))&&p&&Bs.getRemoteHeaderByContext(p)||Bs.getRemoteHeaderByContext(l);if(Dg.setRemoteCaseHeaderByContext(i,g),!u)return d=l,BC({type:o,payload:{...i,contextName:l,continueExecution:!1}}),c;const{continueExecution:h,containerItemID:f}=Ay(l,n,u);if(d=f,!h||d&&"review"===kC()?.getState()?.data[d]?.context_data?.caseViewMode)return BC({type:o,payload:{...i,contextName:l,continueExecution:h}}),c;const m=d,I=m&&m.includes(js.MODAL),E=t.assignKey||this.c11nEnv.getValue(Fs.CASE_INFO.ASSIGNMENT_ID),y=$C(d),A=y?.caseInfo?.assignments?y.caseInfo.assignments[0]?.actions[0]?.ID:void 0,C=this.c11nEnv.getContainerName(),S=this.c11nEnv.getValue(Fs.CASE_INFO.CASE_TYPE_ID),_=this.c11nEnv.getValue("isProcessAction","isProcessAction"),N=dS.buildActionObject({context:m,containerItemID:d,assignmentID:E,actionID:A,caseID:n,containerName:C,caseType:S,isModalAction:I,isFormValid:!0,isProcessAction:_},this.c11nEnv);N.context=d;const T=Ly(d),D=this.c11nEnv.getCaseSummary(),P=QI(D),O=dS.buildActionObject({caseID:n,containerItemID:d,cancelContext:T},this.c11nEnv);let R={};return I?(O.acTargetName=js.MODAL,O.isInCreateStage=P,O.isModalAction=I,R={...O}):R={...O,acName:Va(this.c11nEnv.getContainerName(),O.context)},BC({type:o,payload:{...i,contextName:l,saveActionPayload:N,cancelActionPayload:R,continueExecution:h}}),c}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(Fs.CASE_INFO.CASE_INFO_ID)||t.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return t.caseID=n,Ff(window.pms.plugins.c11n.openProcessAction,e,t);const s=this.c11nEnv.getValue(Fs.CASE_INFO.ASSIGNMENT_ID)||t.assignKey,r=t.type,a={caseID:n,assignmentID:s,vcName:t.target,actionName:t?.name,assignKey:s,actionID:e,doDeleteCaseSummary:!0,processActionType:r,isProcessAction:!0,...t},o=Vg,i=dS.buildActionObject(a,this.c11nEnv),c=this.c11nEnv.getContextName(),l=jy(c)[0];let u=Bs.getRemoteHeaderByContext(c);if(!u&&l){const e=yy(l);e?.accessedOrder.forEach((s=>{(t.caseID||n)===e.items[s].key&&(u=Bs.getRemoteHeaderByContext(e.items[s].context))}))}Dg.setRemoteCaseHeaderByContext(i,u);const{promise:d}=this.actionsApiPromise(o,i),{containerItemID:p}=Ay(c,n,l);return BC({type:o,payload:{...i,saveContainerItemID:p}}),d}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=Er,s=this.c11nEnv.getValue(Fs.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(Fs.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(Fs.CASE_INFO.ASSIGNMENT_ID),r=QI(this.c11nEnv.getCaseSummary()),a=this.c11nEnv.getValue(Fs.CASE_INFO.CASE_INFO_ID),o={ID:s,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:t,doDeleteCaseSummary:!0,isInCreateStage:r,caseID:a};t&&t.includes(js.MODAL)&&(o.acTargetName=js.MODAL);const i=dS.buildActionObject(o,this.c11nEnv),{promise:c}=this.actionsApiPromise(n,i),l=Ly(t);return BC({type:n,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:n}=Fs,s=mr,r=Ly(e),a=e&&e.includes(js.MODAL),o=this.c11nEnv.getCaseSummary(),i=QI(o),c=this.c11nEnv.getValue(js.getProperty(n.CASE_INFO_ID)),l=this.c11nEnv.getValue(n.ASSIGNMENT_ID),u=dS.buildActionObject({caseID:c,containerItemID:e,context:r},this.c11nEnv);let d={};a?(u.acTargetName=js.MODAL,u.isInCreateStage=i,u.isModalAction=a,d={...u}):d={...u,acName:Va(this.c11nEnv.getContainerName(),u.context)};const{promise:p}=this.actionsApiPromise(s,u);return BC({type:s,payload:d}),p.then((()=>{t||Lf({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}=Fs,n=e,s=Xr,r=e&&e.includes(js.MODAL),a=this.c11nEnv.getValue(t.CASE_INFO_ID),o=dS.buildActionObject({caseID:a,containerItemID:e,context:n},this.c11nEnv);if(!cy(n)){return new Qg(this.c11nEnv).removeContainerItem({containerItemID:e}).then((()=>{Rf(a),Lf({caseID:a,context:this.c11nEnv.getContextName()})}))}BC({type:s,payload:{...o,isModalAction:r}});const{promise:i}=this.actionsApiPromise(s,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}=Fs,n=Xr,s=e,r=s&&s.includes(js.MODAL),a=this.c11nEnv.getCaseSummary(),o=this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.CASE_TYPE_ID)),i=QI(a),c=this.c11nEnv.getValue(js.getProperty(t.CASE_INFO_ID)),l=dS.buildActionObject({caseID:c,containerItemID:e,context:s},this.c11nEnv),u=this.c11nEnv.getValue("isProcessAction","isProcessAction"),d=PA.isCoexistenceAppOfType(js.APP_TYPE.UIKIT);l.isProcessAction=u;const p=PA.getRenderingMode();if(i&&(r||d||"EMBED"===p)&&!KI(a)){const t=this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.IS_FIRST_ASSIGNMENT)),c=cy(s);if(this.shouldDeleteCaseInCreateStage(c,t,d)){const t=!0===Boolean(YI.isExternalObject(o));return this.deleteCaseInCreateStage(e,t)}BC({type:n,payload:{...l,isModalAction:r,isChildCase:tE(a),isInCreateStage:i}})}const{promise:g}=this.actionsApiPromise(n,l);return g.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=$g,n=this.getSaveActionPayload(e,!0),{promise:s}=this.actionsApiPromise(t,n);return xf.executeOrQueueDeferredAction(Gg(n)),s}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=$g,n=this.getSaveActionPayload(e),{promise:s}=this.actionsApiPromise(t,n);return BC(Gg(n)),s}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=Bg,s=e,r=s&&s.includes(js.MODAL),a=this.c11nEnv.getValue(js.getProperty(Fs.CASE_INFO.CASE_INFO_ID)),o=this.c11nEnv.getValue(js.getProperty(Fs.CASE_INFO.CASE_TYPE_ID)),i=dS.buildActionObject({caseID:a,caseType:o,containerItemID:e,context:s,ignoreCaseDeletion:t},this.c11nEnv),c=this.c11nEnv.getValue("isProcessAction","isProcessAction"),l=this.c11nEnv.getValue(js.getProperty(Fs.CASE_INFO.PARENTCASEINFO));i.isProcessAction=c,i.parentCaseInfo=l;const u=`${js.APP.APP}/${my.PRIMARY}`,d=gI(u,my.PRIMARY);i.parentContext=d,r&&(i.targetName=js.MODAL,i.containerName=my.MODAL,i.isModalAction=r),BC((e=>({type:Bg,payload:e}))(i));const{promise:p}=this.actionsApiPromise(n,i);return p.then((()=>{Lf({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}=TA.getRestEndPoint("getRecents")||{};t=`${t}?maxResultsToFetch=${e}`;const n=rn()+t;return Wd(n,{method:"GET",headers:{}})}updateRecents(e,t,n,s){const{restApi:r}=TA.getRestEndPoint("updateRecents")||{},a=`${rn()}${r}`;return Wd(a,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:n,pyID:t,classID:e,ID:s}})}logout(){const{restApi:e}=TA.getRestEndPoint("Logout")||{},t=`${rn()}${e}`;return Wd(t,{method:"GET",headers:{}}).then((e=>(Object.keys(Zu.rootNodes).forEach((e=>{Sf.cleanCaches(e)})),Zu.rootNodes={},sessionStorage.clear(),tS(),Promise.resolve(e))))}invoke(e,t={}){const n={method:t.method||"GET",body:t.body};return Wd(e,n,this.c11nEnv.getContextName())}showCasePreview(e,t={}){this.loadView(e,Ls.getDefaultQualifiedName("pyCasePreview"),{container:my.PREVIEW,containerName:my.PREVIEW,context:Fs.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(Ls.getDefaultQualifiedName("pyDataPreview"),e,t,{container:my.PREVIEW,containerName:my.PREVIEW,context:Fs.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 s=dS.buildActionObject({caseId:e,viewName:t,caseClassName:this.c11nEnv.getValue(js.getProperty(Fs.CASE_INFO.CASE_TYPE_ID)),RemoteSystemID:Bs.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),s={...s,...n}):s={...s,containerName:this.c11nEnv.getContainerName()};const r=tr,{promise:a}=this.actionsApiPromise(r,s,!1);return BC({type:r,payload:{...s}}),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 s=dS.buildActionObject({viewName:e,className:t},this.c11nEnv),r=nr,{promise:a}=this.actionsApiPromise(r,s);return Id.getPreviewMode()&&(s.debugInfo={debugId:rS.generateUniqueID()}),BC({type:r,payload:{...s,...n,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=dS.buildActionObject({},this.c11nEnv),s=rr,{promise:r}=this.actionsApiPromise(s,n);return BC({type:s,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,insightID:e}}),r}showDashboard(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));const n=dS.buildActionObject({},this.c11nEnv),s=ar,{promise:r}=this.actionsApiPromise(s,n);return BC({type:s,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,dashboardID:e}}),r}showData(e,t,n,s={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 r=dS.buildActionObject({pageName:e,dataContext:t,dataContextParameters:n,RemoteSystemID:Bs.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv),a=sr;s?.containerName||(s.containerName="HYBRID"===PA.getRenderingMode()?Tf.getRuntimeParam(js.HYRBID_ROOT_CONTAINERNAME):Og.getTargetViewContainerName(a));const{promise:o}=this.actionsApiPromise(a,r);return BC({type:a,payload:{...r,...s,skipSemanticUrl:Boolean(s.skipSemanticUrl)}}),o}changeHandler(e,t){dS.changeHandler(e,t)}eventHandler(e,t){dS.eventHandler(e,t)}triggerFieldChange(e,t,n=!1,s={skipDirtyValidation:!1,skipPageInstructionGeneration:!1}){const r=this.c11nEnv.getContextName(),a=this.c11nEnv.getPageReference(),o=cS.getContextPath(a,e);n||this.c11nEnv.getValidationApi().validate(t),this.c11nEnv.isInsideList()&&!s.skipPageInstructionGeneration&&this.c11nEnv.getListActions().updateProperty(e,t,s);let i=this.c11nEnv.getValue(js.CLASS_ID);const c=e?e.split(".").filter((e=>!!e)):[];c.length>1&&(c.pop(),i=HC(`.${c.join(".")}.classID`,a,r)),e=rS.trimDotForProperty(e),BC({type:er,payload:{reference:o,value:t,context:r,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:i}})}updateFieldValue(e,t,n={}){const{removePropertyFromChangedList:s=!1,isArrayDeepMerge:r=!0,contextPageReference:a="",isListEntry:o=!1,skipDirtyValidation:i=!1,associatedProperty:c,skipPageInstructionGeneration:l=!1}=n,u=this.c11nEnv.getContextName();let d=this.c11nEnv.getPageReference();const p=a?.startsWith(d)?a.replace(d,""):a;d=a||d;const g=cS.getContextPath(d,e);let h=!1;this.c11nEnv.isInsideList()&&!l&&this.c11nEnv.getListActions().updateProperty(p?`${p}${e}`:e,t,{isArrayDeepMerge:r,skipDirtyValidation:i}),this.c11nEnv.isBulkAction()&&(h=!0),e||(e=this.c11nEnv.getStateProps().value),od({type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:d,context:u,isListEntry:o}),BC({type:Xs,payload:{reference:g,value:t,context:u,isArrayDeepMerge:r,skipDirtyValidation:i,...h&&{isStrictTracking:h},...s&&{removePropertyFromChangedList:s},...c&&{associatedProperty:`${d}${c}`}}})}activateModalContainerItem(e){const t=Br,{context:n}=e,s=n&&n.includes(js.MODAL),r=dS.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);s&&(r.containerName=js.MODAL,r.isModalAction=s),BC({type:t,payload:r});const{promise:a}=this.actionsApiPromise(t,r);return a}refreshCaseView(e,t,n,s={}){const{promise:r,actionMgrID:a}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:o,propertyName:i,preserveClientChanges:c,classID:l,context:u,optionalPayload:d,isArrayDeepMerge:p}=s,g={actionMgrID:a,caseViewAction:!0,preserveClientChanges:c,propertyName:i,classID:l,isArrayDeepMerge:p,optionalPayload:d};s.refreshFor&&(g.refreshFor=s?.refreshFor),s.resetForm&&(g.resetForm=s?.resetForm),s.skipPayloadGeneration&&(g.skipPayloadGeneration=s?.skipPayloadGeneration);const h=u||this.c11nEnv.getContextName(),f=this.c11nEnv.getPageReference(),m=this.c11nEnv.getValue(js.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW),{isMultiRecordData:I,editType:E}=m||{};if(o&&I&&E===js.ACTION){const t=this.c11nEnv.getValue(Fs.CASE_INFO.ASSIGNMENT_ID),{actionID:n,interestPage:s,interestPageActionID:r,isLocalAction:a}=m;pE(e,t,n,h,s,r,a,I,E,g)}else!I&&o&&(eE(h,f)||XI(h,f))?yE(h,n,g):dE(e,t,h,n,g);return r}refreshEmbeddedDataWithAction(e,t,n,s,r,a,o,i,c={}){const{promise:l}=this.actionsApiPromise(Nf.REFRESH_DATA),u=this.c11nEnv.getContextName();return pE(e,t,n,u,s||this.c11nEnv.getPageReference(),r,a,o,i,c),l}openEmbeddedDataModal(e,t,n,s,r,a,o,i,c=!1,l=Fs.MODAL){const u=_a;let d=t.getCaseInfo().getKey();const p=t.getValue(Fs.CASE_INFO.IS_LOCAL_ACTION),g=t.getValue(Fs.CASE_INFO.ASSIGNMENT_ID),h=jf(t,o,p),f=t.getPageReference();let m="string"==typeof s?`${t.getPageReference().replace(js.getProperty(Fs.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${s}`:`${t.getPageReference().replace(js.getProperty(Fs.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${s}]`;f.startsWith(Fs.OBJECT_INFO.OBJECT_INFO)&&!d&&(d=t.getCaseInfo().getObjectKey(),m=`${t.getPageReference().replace(Fs.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${s}]`);const I=t.getMetadata(),E=Array.isArray(I?.config?.children)&&I.config.children[0]?.children||[],y={readOnly:c,targetProperty:n,index:s,viewID:e,ID:d,actionType:r,interestPage:rS.convertPageRefToClipboardPageNotation(m),heading:a,editType:o,interestPageActionID:o===js.ACTION?i:void 0,actionID:h,isLocalAction:p,operationFlag:js.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:"string"==typeof s,assignmentID:p||o!==js.ACTION?void 0:g,columns:E},A=dS.buildActionObject(y,this.c11nEnv);if(o===js.ACTION){const e=rS.getETag(A.context);A.headers={"If-Match":e}}const{promise:C}=this.actionsApiPromise(u,A);return PA.getFeatureMap().granularUIRefresh&&E.forEach((e=>{const n=No.trimAnnotation(e.config.value),s=oC(n.startsWith(".")?n.replace(".",""):n,e.config.classID);s&&!Array.isArray(s)&&s.isDeclarativeTarget&&Zu.addFieldNode(t.getContextName(),f+m,t.viewName??"",n,"",{isDeclarativeTarget:!0,propertyName:n,pageReference:f+m})})),BC({type:u,payload:{...A,containerName:l,skipSemanticUrl:!0}}),C}getEmbeddedDataView(e,t,n,s,r,a="",o="",i=!1,c=""){const l=Na;let u=t.getCaseInfo().getKey();const d=t.getValue(Fs.CASE_INFO.IS_LOCAL_ACTION),p=t.getValue(Fs.CASE_INFO.ASSIGNMENT_ID),g=jf(t,a,d),h=t.getPageReference();let f="string"==typeof s?`${t.getPageReference().replace(js.getProperty(Fs.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${s}`:`${t.getPageReference().replace(js.getProperty(Fs.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${s}]`;h.startsWith(Fs.OBJECT_INFO.OBJECT_INFO)&&!u&&(u=t.getCaseInfo().getObjectKey(),f=`${t.getPageReference().replace(Fs.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${s}]`);const m={readOnly:i,targetProperty:n,index:s,viewID:e,ID:u,actionType:r,interestPage:rS.convertPageRefToClipboardPageNotation(f),editType:a,interestPageActionID:a===js.ACTION?o:void 0,actionID:g,isLocalAction:d,operationFlag:js.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:"string"==typeof s,assignmentID:d||a!==js.ACTION?void 0:p,containerName:c},I=dS.buildActionObject(m,this.c11nEnv);if(a===js.ACTION){const e=rS.getETag(I.context);I.headers={"If-Match":e}}const{promise:E}=this.actionsApiPromise(l,I);return BC({type:l,payload:{...I,skipSemanticUrl:!0}}),E}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=Ta;let n=this.c11nEnv.getValue(js.getProperty(Fs.CASE_INFO.CASE_INFO_ID));const s=this.c11nEnv.getValue(js.getProperty(Fs.CASE_INFO.ASSIGNMENT_ID));let r=this.c11nEnv.getPageReference().replace(js.getProperty(Fs.CASE_INFO.CASE_INFO_CONTENT),"");const a=Ly(e),o=this.c11nEnv.getValue(js.getProperty(js.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW)),{interestPageActionID:i,editType:c,isLocalAction:l,actionID:u,viewName:d,parentContext:p}=o;r.startsWith(Fs.OBJECT_INFO.OBJECT_INFO)&&!n&&(n=this.c11nEnv.getValue(Fs.OBJECT_INFO.OBJECT_INFO_ID),r=this.c11nEnv.getPageReference().replace(Fs.OBJECT_INFO.OBJECT_INFO_CONTENT,"")),od({context:a,stateObj:$C(a),clearContextMessages:!0});const g={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:n,viewID:d,isFormValid:GI(a),interestPage:rS.convertPageRefToClipboardPageNotation(r),parentContext:p,isModalAction:!1,target:this.c11nEnv.getTarget(),editType:c,actionID:u,operationFlag:js.EMBEDDED_DATA_MODAL.SUBMIT_ROW,interestPageActionID:i,isLocalAction:l,assignmentID:s};e&&e.includes(js.MODAL)&&(g.containerName=js.MODAL,g.isModalAction=!0);const h=dS.buildActionObject(g,this.c11nEnv);if(c===js.ACTION){const e=rS.getETag(h.context);h.headers={"If-Match":e}}const{promise:f}=this.actionsApiPromise(t,h);if(cy(a)){const[e,t,n]=ku(this.c11nEnv.getPageReference());Zu.mutatePageList(p,e,t,{type:ca,rowIndex:n}),BC({type:ca,payload:{pageReference:this.c11nEnv.getPageReference(),context:p,isListEntry:!0}})}return xf.executeOrQueueDeferredAction({type:t,payload:{...h,context:a}}),f}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=Ly(e),n=this.c11nEnv.getPageReference(),{promise:s,actionMgrID:r}=this.actionsApiPromise(Pa);return yE(t,n,{actionMgrID:r,isFillFormWithAI:!0,preserveClientChanges:!1}),s}handleSubscript(e,t){if(!mC(Fs.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW))return Promise.reject(new Error(this.MSG_SUBSCRIPT_VIEW_REQUIRED));const n=Da,s=dS.buildActionObject({containerItemID:e},t);BC({type:n,payload:{...s,isDataObject:!0,skipReleaseLockRequest:!0,isFormValid:GI(e),context:e}});const{promise:r}=this.actionsApiPromise(n,s);return r}showSubscriptCreateView(e,t,n,s=Fs.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW){const r=dS.buildActionObject({viewName:s,className:e,referenceListStr:t,subscriptName:n},this.c11nEnv),a=nr,{promise:o}=this.actionsApiPromise(a,r);return BC({type:a,payload:{...r,containerName:Fs.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),o}deleteWork(e,t,n){if(!e)return Promise.reject(new Error("workId is required parameter"));const s=wa,r=YI.isExternalCaseType(t),a=dS.buildActionObject({workId:e,caseTypeID:t,isExternalCase:r,...n?.skipDeleteConfirmation&&{skipDeleteConfirmation:!0},...n?.enableBackNavigation&&{enableBackNavigation:!0}},this.c11nEnv),{promise:o}=this.actionsApiPromise(s,a);return BC(Hg({...a})),o}deleteDataRecord(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=wa,s=dS.buildActionObject({className:e,keys:t},this.c11nEnv),{promise:r}=this.actionsApiPromise(n,s);return BC(Hg({...s})),r}};const Bf=class{constructor(e){this.c11nEnv=e}buildRemoteCaseHeaders(e,t){const n={};if(e){const s=Bs.getRemoteCaseClassBySourceClass(e)??e;Bs.injectRemoteCaseHeader(n,{caseTypeID:s},t)}return n}async getCaseStages(e,t,n){const s={caseID:e},{restApi:r,reqType:a}=i_("getCaseStages",s),{caseTypeID:o}=n||{},i=this.buildRemoteCaseHeaders(o,t);return(await Wd(r,{method:a,headers:i},t)).data.stages}async getCaseActions(e,t,n){const s={caseID:e},{restApi:r,reqType:a}=i_("getActions",s),{caseTypeID:o}=n||{},i=this.buildRemoteCaseHeaders(o,t);return(await Wd(r,{method:a,headers:i},t)).data}getCaseTypeName(){return this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.CASE_TYPE_NAME))}getName(){return this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.CASE_INFO_NAME))}getClassName(){return this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.CASE_TYPE_ID))}getAvailableProcesses(){return this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.AVAILABLEPROCESSES))}getKey(){return this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.CASE_INFO_ID))}getObjectKey(){return this.c11nEnv.getValue(js.OBJECT_INFO.OBJECT_INFO_ID)}getID(){const e=this.getKey();if(e){const[,t]=e.split(" ");return t||e}}getAssignmentID(){return this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.ASSIGNMENT_ID))}getActions(){return this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.ACTION_BUTTONS))}getActiveFlowActionID(){return this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.ACTIVE_ACTION_ID))||this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.ASSIGNMENTACTION_ID))}getParentCaseInfo(){return this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.PARENTCASEINFO))}isPerform(){return this.c11nEnv.getValue(`${js.CONTEXT_DATA}${js.CASE_VIEW_MODE_PROP}`)===js.PERFORM_MODE}isReview(){return this.c11nEnv.getValue(`${js.CONTEXT_DATA}${js.CASE_VIEW_MODE_PROP}`)===js.REVIEW_MODE}isAssignmentInCreateStage(){const e=this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.CASE_INFO));return QI(e)}isReviewAfterCreateStage(){if(!this.isReview())return!1;const e=this.c11nEnv.getContextName(),t=Vy(e)[0];if(!t)return!1;const n=kC()?.getState().data[t]?.caseInfo?.stages;if(!Array.isArray(n))return!1;const s=[...n].reverse().find((e=>"object"==typeof e&&null!==e&&"visited_status"in e&&"transitionType"in e&&"completed"===e.visited_status));return"create"===s?.transitionType}isLocalAction(){const e=this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.CASE_INFO));return KI(e)}getCurrentAssignmentViewName(){let e=null,t=!1;if(this.c11nEnv.getValue("context_data.caseViewMode")===js.PERFORM_MODE){if(this.isLocalAction())return e;if(this.isAssignmentInCreateStage())t=!0;else{const t=this.c11nEnv.getTarget(),n=this.c11nEnv.getContextName(),s=Cy(t,n),{config:r}=t&&n?s&&s.view:this.c11nEnv.getMetadata();e=r?.type===js.VIEW?r?.name:null}(e&&e.startsWith(js.PROPERTY_ANNOTATION)||t)&&(e=this.c11nEnv.getValue(Ls.getQualifiedNameForComplexRuleReferences(js.getProperty(js.CASE_INFO.VIEW_NAME))))}return e}getValueByPath(e,t){let n=e;if((t=t.replace("@P ","").trim()).includes(Ls.getDefaultQualifiedName("pyViewContext"))){const t=e.caseInfo?.content??{},s=t[Ls.getDefaultQualifiedName("pyViewContext")];if(!s)return n.caseInfo.content;if("string"==typeof s&&s.includes("(")&&s.includes(")")){const e=s.substring(1,s.indexOf("(")),n=parseInt(s.substring(s.indexOf("(")+1,s.indexOf(")")),10)-1;if(Array.isArray(t[e]))return t[e][n];const r=e.split(".").reduce(((e,t)=>e?.[t]),t);if(Array.isArray(r))return r[n]}}const s=t.split(/[.[\]]/).filter((e=>e));for(const e of s)if("object"==typeof n&&null!==n&&e in n)n=n[e];else{if(!Array.isArray(n)||Number.isNaN(Number(e)))return;n=n[parseInt(e,10)-1]}return n}getCurrentAssignmentViewClassName(){const e=this.c11nEnv.getTarget(),t=this.c11nEnv.getContextName(),n=Cy(e,t),{config:s}=e&&t&&n?n.view:this.c11nEnv.getMetadata(),r=this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.CASE_INFO)),a=s?.type===js.VIEW?s.context:null;if(a){const e=this.getValueByPath({caseInfo:r},a);if("object"==typeof e&&null!==e&&"classID"in e)return e.classID}return null}getActionRefreshConditions(){if(this.c11nEnv.getValue(js.getProperty(js.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)))return this.c11nEnv.getValue(js.getProperty(js.EMBEDDED_DATA_MODAL.REFRESH_CONDITIONS));const e=this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.ACTIVE_ACTION_ID)),t=Ws(this.c11nEnv.getContextName());let n;t&&(n=$C(t));const s=n?.caseInfo?.availableActions,r=$C(this.c11nEnv.getContextName()),a=r?.caseInfo?.refreshConditions;if(e){if(s){const t=s.find((t=>t.ID===e));return t?t.refreshConditions:a}return a}return this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.ACTION_REFRESH_CONDITIONS))}getBusinessID(){return this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.BUSINESS_ID))}getAssignments(){return this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.CASE_INFO))?.assignments}getChildAssignments(){return this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.CASE_INFO))?.childCases?.[0]?.assignments}isCaseWideLocalAction=()=>{const e=this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.ACTIVE_ACTION_ID)),t=this.c11nEnv.getValue(js.getProperty(js.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(js.getProperty(js.CASE_INFO.CASE_INFO_ACTIONS)),t=this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.ASSIGNMENT_LABEL)),n=this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS))||[],s=this.getChildAssignments()||[];let r=JSON.parse(JSON.stringify(s));r=r.map((e=>(e.isChild=!0,e)));const a=[...n,...r];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(js.getProperty(js.CASE_INFO.CASE_INFO_ACTIONS)),t=this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.ACTIVE_ACTION_ID)),n=e.find((e=>e.ID===t));return n?.name||""}getFirstCaseActionName(){const e=this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.CASE_INFO_ACTIONS));return e[0]?.name||""}hasAssignments(){const e=this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)),t=this.getChildAssignments();return!!(e||t||this.isCaseWideLocalAction())}hasMessages=()=>!!this.c11nEnv.getValue("caseMessages");hasGetNextWorkLinks(){return!!this.c11nEnv.getValue(js.getProperty(js.CASE_INFO.GETNEXTWORK))}isObjectWideAction(){const e=this.c11nEnv.getValue(js.OBJECT_INFO.OBJECT_INFO);return KI(e)}getCaseCollaborators=(e=!0)=>{const t=this.c11nEnv.getValue(js.CASE_INFO.CASE_INFO_COLLABORATORS)||[];if(e){const e=PA.getOperatorIdentifier();return t.filter((t=>t.ID!==e))}return t}};const $f=class{constructor(e){this.c11nEnv=e}getContextKey(){return this.c11nEnv.getValue(js.getProperty(js.DATA_INFO.DATA_INFO_CONTEXT_KEY))}};class Gf{constructor(e){Gf._instance=this,this.context=`${e}/${js.SUGGESTION}`,kC()?.getState().data?.[this.context]||BC({type:Gr,payload:{context:this.context,data:{}}})}getField(e){return HC(e,"",this.context)}setField(e,t){BC({type:Xs,payload:{reference:e,value:t,context:this.context}})}removeField(e,t={}){BC({type:Sr,payload:{reference:e,context:this.context,...t}}),fd.publish(js.PUB_SUB_EVENTS.SUGGESTION_PROCESSED,{reference:e,context:this.context,...t})}setState(e){BC(fS({context:this.context,data:e,isArrayDeepMerge:!0}))}}const Wf=Gf;const Hf=class{static getSharedState(e){const t=e.startsWith(".")?e.substring(1):e,n=GC();return n?rS.getIn(n,t):null}static setSharedState(e,t){e&&BC(YS({key:e,value:t}))}static updateState(e,t,n,s={}){const{isArrayDeepMerge:r=!0,pageReference:a,removePropertyFromChangedList:o=!1,skipDirtyValidation:i=!1}=s;if(!e||!t)return;BC(KS({context:e,reference:a?`${a}.${t}`:t,value:n,isArrayDeepMerge:r,removePropertyFromChangedList:o,skipDirtyValidation:i}))}static getSuggestionsContext(e){return new Wf(e)}static triggerRefresh(e,t){AE({context:e,pageReference:t})}};class qf{static getParagraphStream(e,t,n){return((e,t,n)=>{if(!e)return e;const s=(new DOMParser).parseFromString(e,"text/html"),r=s.querySelectorAll("pega-reference");for(const e of r){const n=e.getAttribute("data-rule-id");if(n){const r=t.getValue(n),a=s.createTextNode(r??"");e.replaceWith(a),t.registerAdditionalProps({[n]:`@P ${n}`})}else e.replaceWith("")}let a;return a="simple"===n?rS.decodeHtmlEntities(s?.body?.textContent||""):s?.body?.innerHTML||"",/^(<p>)\s*(<\/p>)$/.test(a)?null:a})(e,t,n)}static isDecisionParagraph(e,t){const n=NC(e,t);return!!n?.useDecision}static processParagraph(e,t){const n=t.getCurrentClassID(),s=NC(e,n);let r;if(s?.useDecision){const n=s.dynamicContents.length;for(let a=0;a<n-1;a+=1)if(cS.resolveWhen(s.dynamicContents[a].when,t)){r=s.dynamicContents[a],e=`${e}#${r.when}`;break}r||(r=s.dynamicContents.pop())}else r=s;const a=s?.definedOnClassID,o=xA().getParagraphLocaleValue(a||n,e);return o?qf.getParagraphStream(o.content,t,o?.category||r?.category||s?.category):r?.content?qf.getParagraphStream(r.content,t,r?.category||s?.category):null}static processBannerDecisionParagraph(e,t){const n=t.getCurrentClassID(),s=NC(e,n);let r;if(s?.useDecision){const n=s.dynamicContents.length;for(let a=0;a<n-1;a+=1)if(cS.resolveWhen(s.dynamicContents[a].when,t)){r=s.dynamicContents[a],e=`${e}#${r.when}`;break}r||(r=s.dynamicContents.pop())}else r=s;const a=s?.definedOnClassID,o=xA().getParagraphLocaleValue(a||n,e);let i=null;return o?i=qf.getParagraphStream(o.content,t,o.category||r?.category||s?.category):r?.content&&(i=qf.getParagraphStream(r.content,t,r?.category||s?.category)),{htmlContent:i,messageType:r?.messageType,dismissBanner:r?.dismissBanner,isBanner:r?.isBanner}}static getParagraphProperties(e,t){const n=t.getCurrentClassID(),s=NC(e,n);return{useDecision:s?.useDecision,isBanner:s?.isBanner,messageType:s?.messageType,dismissBanner:s?.dismissBanner}}static isADecisionParagraph(e,t){return this.getParagraphProperties(e,t).useDecision}static isBanner(e,t){return this.getParagraphProperties(e,t).isBanner}static getParagraphMessageType(e,t){return this.getParagraphProperties(e,t).messageType}static isDismissibleBanner(e,t){return this.getParagraphProperties(e,t).dismissBanner}static hasDecisionBannerContent(e,t){const n=t.getCurrentClassID(),s=NC(e,n);return!(!s?.useDecision||!s?.dynamicContents)&&s.dynamicContents.some((e=>e.isBanner))}}const zf=qf;class Yf{constructor(e){this.fieldType=e}applyFallback(e){const t=bp.getDefaultsforType(this.fieldType);e.currencyISOCode=e.currencyISOCode||t?.currencyISOCode||"USD"}}class Kf{static getStrategy(e){switch(e){case"Currency":case"Decimal":case"Integer":case"Percentage":return new Yf(e);default:return}}}const Qf="DATAPAGE",Jf="VIEW",Xf="FIELD",Zf="CASE",em="PARAGRAPH",tm=(e,t,n,s)=>{const r=[Jf,Xf,em],a=[Qf,em].includes(e)&&s?`#${s}`:"",o=e===Qf?"@BASECLASS":n;return e===Qf||r.includes(e)?`${o}!${e}!${t}${a}`.toUpperCase():`${e}!${t}${a}`.toUpperCase()};class nm{static COMMON_LABELS="COMMONLABELS";static MESSAGES="MESSAGES";static COMPONENT_FIELDS="COMPONENTFIELDS";lookupList=[];constructor(e,t){this.localeReference=t,this.locale=e}getLocalizedText(e,t){const n=[...this.localeReference?[this.localeReference.toUpperCase()]:[],...this.lookupList,nm.COMPONENT_FIELDS,nm.COMMON_LABELS],s=this.#o(e,n)||e;return(t?this.#i(s,t):s)||e}getLocalizedMessage(e,t){const n=this.#o(e,[nm.MESSAGES,nm.COMMON_LABELS])??e;return(t?this.#i(n,t):n)||e}getLocalizedDataPage(e,t,n,s){if(!t||!n||!e)return e;const r=[tm(Qf,t,void 0,n),nm.COMMON_LABELS,...this.lookupList],a=this.#o(e,r)??e;return(s?this.#i(a,s):a)||e}#i(e,t){return 0===t.length?e:e.replace(/\{(\d+)\}/g,((e,n)=>t[""+(Number(n)-1)]??e))}#o(e,t=this.lookupList){if(0===t.length)return;const n=iC(this.locale);for(const s of t){const t=this.#c(e,n.localeStore[s]);if(t)return t}}#c(e,t={}){const n=t[e];if("string"==typeof n)return n}setLookupList(e){Array.isArray(e)&&(this.lookupList=e)}}const sm=e=>Us.getNeedsMapping()||e?.info===Fs.OBJECT_INFO.OBJECT_INFO?Fs.OBJECT_INFO.OBJECT_INFO:Fs.CASE_INFO.CASE_INFO,rm=(e,t)=>{const n=sm(t);e.data=e.data??{};const{assignments:s,availableActions:r=[]}=e.data[n]??{};if(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[n]=e.data[n]??{},e.data[n].availableActions=r}},am=(e,t)=>{const n=sm(t),s=Ym();if(e.confirmationLinks&&(e.data=e.data??{},e.data[n]=e.data[n]??{},e.data[n].confirmationLinks=e.confirmationLinks),!e.uiResources&&e.confirmationNote){let t=e;const{confirmationNote:n}=t;return void 0===s||s||rm(t),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 r=e,{uiResources:{actionButtons:a,navigation:o,settings:i},nextAssignmentInfo:c}=r;if(a&&a.main&&(a.main=a.main.map((e=>"createWork"===e.jsAction?{...e,jsAction:"createCase"}:e))),r.data&&r.data[n]&&(a&&(r.data[n].actionButtons=a),o&&(r.data[n].navigation=o),i&&(r.data[n].settings=i),t&&t[Fs.ACTIONS.DELETEAVIALACTIONS]&&delete r.data[n].availableActions,void 0===s||s||rm(r,t),e.confirmationNote)){const{confirmationNote:e}=r,t=[e];r.data.caseMessages=t}return t&&t.isCreateDataObject&&(r.data=r.data??{},r.data.dataInfo={},r.data.dataInfo.content=r.data.pyPortal,r.uiResources.root.config.context="dataInfo.content",r.uiResources.context_data.dataInfo=r.uiResources.context_data.dataInfo??{},r.uiResources.context_data.dataInfo.content=r.uiResources.context_data.dataInfo.content??{},r.uiResources.context_data.dataInfo.content=r.uiResources.context_data?.pyPortal,delete r.data.pyPortal,delete r.key),c&&(r.data=r.data??{},r.data.nextAssignmentInfo=c),r},om=async e=>{const t=am(e),n=rS.getIn(t,js.COMPONENTS);Jp(t,{},!0),await Ig(n)},im=(e,t,n)=>cS.resolveView(e,t,n),cm=(e,t,n,s)=>{const r=e[t];if(!r)return!1;const a=rS.getIn(r,Fs.CASE_INFO.CASE_INFO_CLASSID);return rS.getIn(r,js.CASE_INFO.VIEW_NAME)===n&&(!s||a===s)},lm=e=>{const{accessedOrder:t,items:n}=e;if(!t||!n)return null;const s=t[t.length-1];return s?n[s]?.context??null:null},um=(e,t="",n="")=>{let s=n||null;if(!s){const n=`${Fs.APP.APP}/primary`;s=((e,t)=>{const n=kC();if(!n)return null;const s=n.getState(),{data:r,containers:a}=s;if(!a||!r)return null;const o=`${Fs.APP.APP}/primary`;if(a[o]){const n=lm(a[o]);if(n&&cm(r,n,e,t))return n}for(const n of Object.keys(a)){if(n===o)continue;const s=lm(a[n]);if(s&&cm(r,s,e,t))return s}return null})(e,t),s||(s=Uy(n))}if(!s)return Promise.reject(new Error(`Unable to find an active context for view "${e}".`));const r=$C(s);if(!r)return Promise.reject(new Error(`No data found for context "${s}".`));const a=rS.getIn(r,Fs.CASE_INFO.CASE_INFO_ID)||"",o=Cm({options:{context:s,pageReference:Fs.CASE_INFO.CASE_INFO_CONTENT}});return pC(),o.getPConnect().getActionsApi().refreshCaseView(a,e,"",{autoDetectRefresh:!0,preserveClientChanges:!1}).finally((()=>{gC()}))};let dm=function(e){return e.CURRENCY="Currency",e.PERCENTAGE="Percentage",e.DECIMAL="Decimal",e.INTEGER="Integer",e.TEXT_SINGLE_LINE="Text (single line)",e.TEXT_PARAGRAPH="Text (paragraph)",e.EMAIL="Email",e.URL="URL",e.PHONE="Phone",e.PICKLIST="Picklist",e.USER_REFERENCE="User Reference",e.BOOLEAN="Boolean",e.DATE_AND_TIME="Date & time",e.DATE_ONLY="Date only",e.TIME_ONLY="Time only",e.IDENTIFIER="Identifier",e.DOUBLE="Double",e.TEXT_ENCRYPTED="Text Encrypted",e.PASSWORD="Password",e}({});const pm=class{constructor(e,t,n){this.meta=e,this.datasource=t,this.index=0,this.options=n,this.datasourceObj=cS.getPropertyValue(t,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");const e=cS.getContextPath(this.datasource,this.index);return this.index+=1,Cm({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}};class gm{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.index,t=this.children[e];this.index+=1;const n=t?._relativePath??`${this.options?.relativePath??""}.children[${e}]`;return Cm({meta:t,index:this.index,options:{...this.options,relativePath:n}})}resetIndex(){this.index=0}}const hm=(e,t)=>{const n=!!e?.repeat;if(!!e?.["repeat-self"])return new pm(e,e.context||"",t);if(n){const n=zC(`${t.context}.${js.SUMMARY_OF_LISTS}`,e.pageReference,t.context);return new pm(e.children[0],n||e.context,t)}return e?.children?new gm(e.children,t):void 0};class fm{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:s}=e;if(t&&s){const e=t[t.length-1];s[e]&&s[e].view&&Object.keys(s[e].view).length>0&&n.push(s[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=>zg.isProperty(e))).map((e=>zg.getPropertyName(e)))}}const mm=new fm;let Im;Object.freeze(mm);const Em=(e,t,n)=>{e&&(Object.keys(e).forEach((s=>{if("children"!==s){const r=e[s],a=No.trimAnnotation(r);if("string"!=typeof a&&"string"!=typeof r||!(rS.isValidAnnotation(r)&&rS.isPropertyRef(a)||r.startsWith("@W ")||r.startsWith("@DW ")||r.startsWith("@E ")||r.startsWith("@PARAGRAPH ")||r.startsWith("@ATTACHMENT "))){if(Array.isArray(a))a.forEach(((e,n)=>{const r={parentStateObj:t,parentKey:s,isObjHasValue:!!t[s]};t[s]=t[s]||[],t[s][n]=Object.create({}),Em(e,t[s][n],r)}));else if(a&&"object"==typeof a&&"exp"!==a.type){const e={parentStateObj:t,parentKey:s,isObjHasValue:!!t[s]};t[s]=t[s]||{},Em(a,t[s],e)}}else n&&n.parentKey&&(n.isObjHasValue=!0),r.startsWith("@PARAGRAPH ")?t[s]=r:t[s]=a}})),n&&!n.isObjHasValue&&delete n.parentStateObj[n.parentKey])},ym=(e,t)=>{e._inheritedProps=e._inheritedProps||[],e.inheritedProps=[...e._inheritedProps,...rS.deepClone(t.inheritedProps)]};class Am{constructor(e){const{meta:t,isRoot:n,options:s={},useCustomContext:r}=e;this.meta=t,this._isRoot=n,this.options=s,this.useCustomContext=r,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._dataInfo=null,this.viewName=s.viewName,this.parentViewName=s.viewName??"",this._referenceList=s.referenceList||"",this._isInsideList=s.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=s.localeReference,this._containerTarget=s.target,this._readOnly=t?.config?.readOnly||s.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,this.index=e.index,this.categoryName=s.categoryName||"",this._relativePath=s.relativePath??"",s.inheritedConfig&&(this._inheritedConfig=rS.deepClone(s.inheritedConfig)),t?.config?.inheritedProps&&ym(this._inheritedConfig,t?.config),this.meta?.config?.value&&"string"==typeof this.meta?.config?.value&&this.meta?.config?.value?.startsWith("@P ")&&this.meta?.config?.value?.includes("(")&&(this.meta.config.value=ep.formatePageReferenceToArrayIndex(this.meta.config.value)),Em(this._rawConfig,this._stateProps),this._isState=!rS.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=rS.isExpressionExist(this._rawConfig.config),this._isWhenExist=rS.isWhenExist(this._rawConfig.config),this._isValidatorExist=Yp.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=Fs.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context||"",this._type=this.meta?.type;let a=this.options.pageReference;this.options.pageReference&&(a=No.handleAnnotation(this.options.pageReference,this)),this._pageReference=cS.getContextPath(a||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),"reference"===this._type&&(this._rawConfig=t);const o="reference"===this._type&&rS.isWhenExist({visibility:this.meta?.config?.visibility}),i=this._checkAndSetDecisionParagraph("instructions",this._rawConfig?.instructions);let c=!1;if("reference"!==this._type&&t&&(this._rawConfig=cS.resolveReference(t,this)),this._rawConfig){const e=this.getRawConfigProps();e&&(this._localeRuleName=No.trimAnnotation(e.localeReference)||s.localeReference,this._isExpressionExist=rS.isExpressionExist(e),this._isWhenExist=rS.isWhenExist(e),this._isValidatorExist=Yp.isValidatorExist(e),c=this._checkAndSetDecisionParagraph("label",e?.label)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===js.VIEW&&this._rawConfig.name&&(this.viewName=No.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&IE(this)}(o||i||c)&&gE(this.viewName,this._contextName,this._pageReference)}_checkAndSetDecisionParagraph(e,t){let n=!1;if(t&&t.startsWith(js.PARAGRAPH_ANNOTATION)){const s=No.trimAnnotation(t);n=zf.isDecisionParagraph(s,this.getCurrentClassID()),n&&this.setStateProps({[e]:t})}return n}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||""===this._pageReference){const t=No.trimAnnotation(this.getPropertyName()),n=this.getFieldMetadata(t);e=n?.isDeclarativeTarget||!1}return e}_getPropertyName(){const e=No.trimAnnotation(this.getPropertyName());return""===this._pageReference&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){const e=this._getPropertyName(),{value:t,contextPage:n,label:s,required:r,readOnly:a,disabled:o,visibility:i,validationType:c,caption:l,allowMultiple:u,useRFC822Validation:d}=this.getRawConfigProps();if(this.getValue(this._pageReference)||""===this._pageReference){const p="Address"===this._type&&this._rawConfig?.config?.associatedView?No.trimAnnotation(this._rawConfig.config.associatedView):"",g=s||l,h=this._rawConfig?.type,f={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:No.trimAnnotation(t),label:g?.startsWith("@")?No.handleAnnotation(g,this,void 0):g,required:r,readOnly:a,disabled:o,visibility:i||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:t,validationType:c,...n&&{contextPageRef:`${this._pageReference}${No.trimAnnotation(n)}`},componentName:h,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),index:this.index,allowMultiple:u,isDeclarativeTarget:this.isDeclarativeTarget(),...this._type===dm.EMAIL&&{useRFC822Validation:d}};Zu.addFieldNode(this._contextName,this._pageReference,(p||this.categoryName||this.viewName)??"",e,this.getValue(e),f)}}removeNode(){if(Object.hasOwn(this._rawConfig?.config??{},"value")&&"Address"!==this._type)Zu.removeFieldNode(this._contextName,this._pageReference,this.viewName||"",No.trimAnnotation(this.getPropertyName()),this.index);else if("Address"===this._type&&this._rawConfig?.config?.associatedView)Zu.removeViewNode(this._contextName,this._pageReference,No.trimAnnotation(this._rawConfig.config.associatedView),this.index);else{const e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference,t={visibility:this.options?.visibility??this._rawConfig?.config?.visibility??this._rawConfig?.config?.referenceVisibility};Zu.removeViewNode(this._contextName,e,this._rawConfig?.config?.name||this._rawConfig?.config?.id||"",this.index,t)}}addViewNode(){if(!this.isReadOnly()){if(this._rawConfig?.type?.toLowerCase()===js.VIEW&&this._rawConfig.name&&this.viewName){const e={visibility:this.options?.visibility??this._rawConfig.config?.visibility??this._rawConfig.config?.referenceVisibility};Zu.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName,e)}"Group"===this._rawConfig?.type&&this._rawConfig?.config?.id&&Zu.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.id,this.parentViewName),"Address"===this._rawConfig?.type&&this._rawConfig?.config?.associatedView&&Zu.addViewNode(this._contextName,this._pageReference,No.trimAnnotation(this._rawConfig.config.associatedView),this.parentViewName),"deferload"===this._rawConfig?.type?.toLowerCase()&&this._rawConfig.config?.name&&Zu.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.parentViewName)}}addWhenNode(){let e="",t="";const n=rS.getWhenNames(this._rawConfig?.config),s=this.getRawConfigProps();if(s?.type&&s?.type?.toLowerCase()===js.VIEW)t=js.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{t=js.CONTEXT_TREE_NODE_TYPES.FIELD;const n=this.getPropertyName();e=No.isProperty(n)?No.trimAnnotation(n):""}e&&n.forEach((n=>{Zu.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()!==js.VIEW||"Editable"===this._rawConfig.config?.renderMode)&&this._rawConfig?.config?.referenceList&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode)){const{value:e,label:t,required:n,contextPage:s,readOnly:r,disabled:a,visibility:o,validationType:i,selectionMode:c,selectionList:l,selectionKey:u,referenceList:d,renderMode:p,caption:g,uniqueField:h}=this.getRawConfigProps(),f=t||g;let m=[];["Multiselect","Checkbox"].includes(this._rawConfig.type)&&(m=this.getSelfReferencingDatapageKeys()),Zu.addPageListNode(this._contextName,this._pageReference,this.viewName??"",No.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:No.trimAnnotation(this.getPropertyName()),label:f?.startsWith("@")?No.handleAnnotation(f,this,void 0):f,required:n,readOnly:r,disabled:a,...s&&{contextPageRef:`${this._pageReference}${No.trimAnnotation(s)}`},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,uniqueField:h,selfReferencingDatapageKeys:["Multiselect","Checkbox"].includes(this._rawConfig.type)?m:void 0});const I=this.getValue(No.trimAnnotation(this.getPropertyName()),this._pageReference)||[];Zu.updatePageListNode(this._contextName,this._pageReference,No.trimAnnotation(this.getPropertyName()),I.length)}this.isWhenExist()&&this.addWhenNode(),this.isVisible()||this.removeNode()}getStateProps(){return this._stateProps}setStateProps(e){rS.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getSharedDataPageForReferenceList(){const e=this.getCaseInfo().getClassName(),t=this.getCurrentView();if(!t||!e)return;const n=im(t,this,e);if(!n)return;const s=this.getRawMetadata()?.config?.referenceList;if(!s)return;let r={};"object"==typeof n.config?.parameters&&null!==n.config.parameters&&(r=n.config.parameters);const a=rS.generateDataPageHashWithParameters(r,s,this),o=GC(),i=o?o[s]?.[a]:{};return Array.isArray(i?.[Ls.getDefaultQualifiedName("pxResults")])?i[Ls.getDefaultQualifiedName("pxResults")]:void 0}getCaseInfo(){return this._caseInfo||(this._caseInfo=new Bf(this)),this._caseInfo}getDataInfo(){return this._dataInfo||(this._dataInfo=new $f(this)),this._dataInfo}getCaseLocaleReference(e){const t=this.getRawConfigProps(),n=e||this.getValue(js.getProperty(js.CASE_INFO.CASE_TYPE_ID))||this.getValue(js.CLASS_ID,js.getProperty(js.DATA_INFO.DATA_INFO_CONTENT))||t?.referenceClass||t?.className;return n?tm(Zf,n):null}getListActions(){return Rp(this)}getReferenceList(){return this._referenceList}isInsideList(){return this._isInsideList||/\[\d+\]/g.test(this.getPageReference())||/\[\d+\]/g.test(this.getPropertyName())}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?"referenceList":"Address"===this._type?"addressProp":"value",this.getComponentConfig()[t]}getFullReference(){const e=this.getPageReference(),t=this.getPropertyName();return cS.getContextPath(e,t)}getContextName(){return this._contextName}getContainerName(){const{type:e}=this.getMetadata()||{},t=[js.CONTAINERS.ROOT_CONTAINER,js.CONTAINERS.VIEW_CONTAINER,js.CONTAINERS.FLOW_CONTAINER,js.CONTAINERS.MODAL_VIEW_CONTAINER,js.CONTAINERS.PREVIEW_VIEW_CONTAINER,js.CONTAINERS.HYBRID_VIEW_CONTAINER],{acTargetName:n=my.PRIMARY,name:s,routingInfo:r}=this.getComponentConfig();return(e&&t.includes(e)||"@ROUTING_INFO"===r)&&s?s: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=u?.getStore()?.getState()?.data[`${this.getContextName()}/${js.SUGGESTION}`],n=this.getStateProps()?.value,s=cS.getContextPath(this.getPageReference(),n),r=t?Hf.getSuggestionsContext(this.getContextName()).getField(s):void 0;this._hasSuggestions=!!r,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){const t={...bp.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig},n=Kf.getStrategy(this._type);return n?.applyFallback(t),this.populateSuggestionProps(t),this.resolveConfigProps(t,e),rS.resolveStringBooleans(e)}getLocalizationService(e){const t=this.getComponentName(),n=e||("View"===t?this._rawConfig?.config?.template:t),s=PA.getLocale()??"en-US",r=new nm(s,n),a=this.getCaseLocaleReference();return r.setLookupList(["APP!APPLICATION"]),a&&r.setLookupList([a]),r}getRawConfigProps(){const{_deepProps:e,...t}={...bp.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(t),t}resolveConfigProps(e,t={}){return e&&(cS.resolveProps(e,t,this),No.handleComponentMapping(t,{type:this.getComponentName()||"",config:e},this)),t}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),Em(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach((e=>{delete this._additionalRegisteredProps[e]})),!0}populateAdditionalProps(e){const t=e=>e?.map((e=>({...e,message:this.getLocalizationService()?.getLocalizedMessage(e.message)??e.message}))),n=this.getComponentName(),s=this.getComponentConfig(),r=n===js.ROOT_CONTAINER&&"portal"!==e.renderingMode;if(n===js.MODAL_VIEW_CONTAINER||n===js.CASE_CREATE_STAGE||n===js.OBJECTACTIONCONTAINER){const n=xy(`${js.APP.APP}/${this.getContainerName()}`),s=ad({context:n,category:Fs.PAGE});e.pageMessages=t(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||No.trimAnnotation(this.getRawConfigProps().selectionList):!t&&"Editable"===this.getComponentConfig()?.renderMode&&this.getStateProps().referenceList&&(t=this.getStateProps().referenceList);const n=ad({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:Fs.MESSAGES.MESSAGES_TYPE_ERROR}),s=ad({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:Fs.MESSAGES.MESSAGES_TYPE_INFO});if(n&&n[0]){e.validatemessage=n.map((e=>this.getLocalizationService().getLocalizedMessage(e.message).replace(/\.$/,""))).join(". ")+(n[n.length-1].message.endsWith(".")?".":""),e.status=js.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status;const s=n?.find((e=>"error"===e.type&&"required"===e.subType));s&&!e.required&&this.isVisible()&&this.clearErrorMessages({property:t,subType:"required"})}s&&s[0]&&(e.infoMessage=s[0].message,e.status=js.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(n===js.ROOT_CONTAINER){const n=ld(r,xy(`${js.APP.APP}/${this.getContainerName()}`));e.httpMessages=Array.isArray(n)?t(n):n,this._stateProps.httpMessages=e.httpMessages;const s=Hf.getSharedState("isLoggedOut");e.isLoggedOut=s,this._stateProps.isLoggedOut=s;const a=ad({context:js.APP.ROOT,category:"PAGE"});e.pageMessages=t(a),this._stateProps.pageMessages=e.pageMessages}if(n===js.HYBRID_VIEW_CONTAINER){const n=ad({context:js.APP.APP,category:js.HTTP});e.httpMessages=t(n),this._stateProps.httpMessages=n}if(n===js.APP_SHELL&&e.portalDocMode===js.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=Kh.getOpenedCaseItems(`${Fs.APP.APP}/${js.PRIMARY}`),this._stateProps.activeCases=e.activeCases),n===js.APP_SHELL){const n=js.APP.APP,s=xy(`${n}/${this.getContainerName()}`),r=[...ad({context:n,category:"PAGE"})||[],...ad({context:s,category:"PAGE"})||[]],a=r.length>0?r:void 0;e.pageMessages=a&&t(a),this._stateProps.pageMessages=e.pageMessages}if(e.value&&n===js.SCALARLIST&&(this._stateProps.value=e.value),n===js.APP_SHELL||n===js.MODAL_VIEW_CONTAINER||n===js.CASE_CREATE_STAGE||s.template===js.CASE_PREVIEW||s.template===js.RULE_PREVIEW){let t=ad({context:js.APP.APP,category:"HTTP"});const n="HYBRID"===PA.getRenderingMode()?`${this.getContextName()}/${this.getContainerName()}`:`${js.APP.APP}/${this.getContainerName()}`,s=ad({context:xy(n),category:"HTTP"});t?s&&(t=t.concat(ad({context:xy(n),category:"HTTP"}))):t=ad({context:xy(n),category:"HTTP"}),e.httpMessages=t?t.map((e=>this.getLocalizationService().getLocalizedMessage(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(n===js.VIEW_CONTAINER||n===js.FLOW_CONTAINER||n===js.MODAL_VIEW_CONTAINER||n===js.PREVIEW_VIEW_CONTAINER||n===js.ROOT_CONTAINER||n===js.OBJECTACTIONCONTAINER){if(e.routingInfo=ka(this.getContainerName(),this._contextName),n===js.ROOT_CONTAINER&&(e.rootConfig=fm.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,n===js.FLOW_CONTAINER||n===js.OBJECTACTIONCONTAINER){const n=ad({context:this.getContextName(),category:js.CASEMESSAGES}),s=this.getContextName();e.caseMessages=n,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;const r=jy(s)[0];if(r){const n=xy(r),s=u?.getStore()?.getState()?.data;s&&n&&(e.lastUpdateTime=s[n]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=s[n]?.caseInfo?.lastUpdateTime);const a=ad({context:n,category:Fs.PAGE}),o=ad({context:n,category:"HTTP"});e.httpMessages=t(o),e.pageMessages=t(a),this._stateProps.pageMessages=e.pageMessages,this._stateProps.httpMessages=e.httpMessages,o?.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.isAppOffline=$C(js.APP.APP).context_data?.isOffline,e.assignmentNames=this.getCaseInfo().getAssignments()?.map((e=>e.name)),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map((e=>e.name)),n===js.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.isAppOffline=e.isAppOffline,this._stateProps.assignmentNames=e.assignmentNames,this._stateProps.childAssignmentNames=e.childAssignmentNames}else s.template===js.CASE_VIEW||s.template===js.RULE_VIEW||s.template===js.SELF_SERVICE_CASE_VIEW||s.template===js.CASE_PREVIEW||s.template===js.RULE_PREVIEW||s.template===js.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):n===js.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);const a=this.getInheritedProps()?.shouldAutoRefresh;a&&this.meta?.config?.value?.includes("@P")&&void 0===this.meta.config._autoRefresh_&&(this.meta.config._autoRefresh_=`@REFRESH ${this.meta.config?.value.split("@P ")[1]}`),this.populateFieldMetadata(e),this.updateContextTree()}populateFieldMetadata(e){const{value:t,datasource:n,listType:s}=this.getComponentConfig(),{propertyValue:r,propertyAnnotation:a}=this.getPropertyDetails(s,n,t);if(r&&"string"==typeof r&&(r.includes(a)||r.includes(js.ATTACHMENT_ANNOTATION))){const t=No.getPropertyName(r),n=this.getFieldMetadata(t);n&&this.updateConfigData(e,n,t)}}resolvePropertyMetadata(e,t){if(!e)return e;const n=xC(`${this._pageReference}.${t}`,this._contextName);if(e?.additionalInformation&&this.setStateProps({additionalInformation:n}),!Array.isArray(e)){e.additionalInformation=n;const{inputFormat:t}=e;if("string"==typeof t&&t.startsWith("@")){const n=No.handleAnnotation(t,this);"object"==typeof n&&null!==n&&"pattern"in n&&"string"==typeof n.pattern?e.inputFormat={pattern:n.pattern}:e.inputFormat=null}}return e}getFieldMetadata(e){if(!e)return null;const t=e.split(".");if(t.length<2){let t=this.getValue(js.CLASS_ID);return!t&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(t=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata(oC(e,t),e)}const n=t.pop(),s=t.join(".")?".":"";let r=this.getValue(`${s}${t.join(".")}${js.CLASS_ID}`);return r||(r=rS.resolvePageClass(e,this.getCurrentClassID())),this.resolvePropertyMetadata(oC(n,r),e)}getCurrentPageFieldMetadata(e=null){let t=this.getPageReference().split(".");null!==e&&(t=e.split("."));const n=t.pop();return this.resolvePropertyMetadata(oC(n,this.getValue(`${t.join(".")}${js.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(js.CLASS_ID)}getCaseSummary(){const e={...this.getDataObject()[js.getProperty(Fs.CASE_INFO.CASE_INFO)]};return e.CaseID=e.CaseID||this.getValue(js.getProperty(Fs.CASE_INFO.CASE_INFO_PZINSKEY)),{...e,isCaseWideAction:()=>XI(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()[Fs.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[Fs.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}getRelativePath(){return this._relativePath}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 jg(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?No.handleAnnotation(this._rawConfig?.config?.visibility,this):"string"!=typeof this.options?.visibility||No.handleAnnotation(this.options?.visibility,this)}isReadOnly(){return void 0!==this._readOnly&&("true"===this._readOnly||!0===this._readOnly||"string"==typeof this._readOnly&&!0===No.handleAnnotation(this._readOnly,this))}hasChildren(){return!!this._children}getComputedVisibility(e=[]){const t="reference"===this._type&&!!this.getReferencedView(),n=t?this.getReferencedViewPConnect().getPConnect():this;if(t){const t=`${this.getRawMetadata()?.config?.name}!${this._ruleClass}`;if(e.includes(t))return!1;e.push(t)}if(!1===this.getConfigProps().visibility)return!1;if(!1===n.getConfigProps().requiresVisibleChildren||!1===this.getConfigProps().requiresVisibleChildren)return!0;const s=n.getConfigProps(),r={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]};let a=n._type&&r.includeTypes.includes(n._type)&&!r.excludeTemplates.includes(s.template);if(!!s.highlightedData&&s.highlightedData.length&&s.showHighlightedData&&(a=!1),!a)return!0;const o=n.getChildren();return!!o&&o.some((t=>t.getPConnect().getComputedVisibility(e)))}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 $C(e||this.getContextName())}getImagePath(e){return`${hg.getConstellationServiceUrl()}/v860/${hg.getAppAlias()}/image/${e}?org=${TA.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){const e=this.options?.inheritedProps?.find((e=>"shouldAutoRefresh"===e?.prop));e&&(this._inheritedConfig._inheritedProps=[...this._inheritedConfig._inheritedProps||[],e]);const t=hm(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,relativePath:this._relativePath}),n=[];for(;t?.hasNext();){const e=t.next();this.isBulkAction()&&this.#l(e)||n.push(e)}return t?.resetIndex(),n}return[]}setInheritedProp(e,t,n=!1){this._inheritedConfig[e]=t;const s=Object.hasOwn(this._inheritedConfig._deepProps??{},e);(n||s)&&(this._inheritedConfig._deepProps={...this._inheritedConfig._deepProps,[e]:t})}getDeepInheritedProps(){return{...this._inheritedConfig?._deepProps}}getDeepInheritedConfig(){const e=this.getDeepInheritedProps();return Object.keys(e).length>0?{...e,_deepProps:e}:void 0}#u(e){const t=this.getDeepInheritedConfig();return t?{...e,inheritedConfig:{...e.inheritedConfig,...t}}:e}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,t,n){const s=n||this.getLocaleRuleName(),r=s&&t?`${s}#${t}`:s,a=this.getLocalizationService(r).getLocalizedText(e);return a===e?this.getLocalizationService().getLocalizedText(e):a}getLocaleRuleNameFromKeys(e,t,n){return`${e}!${t}!${n}`}getValue(e,t){return e=e?.replace(/\((\d+)\)/g,((e,t)=>`[${parseInt(t,10)-1}]`)),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?cS.getPropertyValue(e,this.getPageReference(),`${this._contextName}/${js.SUGGESTION}`):cS.getPropertyValue(e,t||this.getPageReference(),this._contextName)}setInheritedConfig(e){if(!e)return;const{readOnly:t,displayMode:n,referenceType:s,hideLabel:r}=e;r&&(this._inheritedConfig.hideLabel=r),s&&(this._inheritedConfig.referenceType=s),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)})),ym(this._inheritedConfig,e))}getInheritedProps(){const e={},t={};return this._inheritedConfig.inheritedProps?.forEach((e=>{t[e.prop]=e.value})),cS.resolveProps(t,e,this),e}setValue(e,t,n,s=!1,r={}){if(!rS.isValidPropertyReference(e))return;let a,o;const{isArrayDeepMerge:i}=r;this.isInsideList()&&this.getListActions().updateProperty(e,t),this.isBulkAction()&&(a=!0,t||(o=!0)),BC({type:"SET_PROPERTY",payload:{reference:cS.getContextPath(this.getPageReference(),e),value:t,initialValue:n,isImplicit:s,context:this.getContextName(),...void 0!==i&&{isArrayDeepMerge:i},...a&&{isStrictTracking:a},...o&&{removePropertyFromChangedList:o}}})}updateDirtyCheckChangeList(e,t){const n={reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName()};iy(n)}getContextDataValue(e,t){return qC(t||this.getPageReference(),e,this._contextName)}updateState(e){const t=this._pageReference.indexOf(js.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf(".");let s=js.CASE_INFO.CASE_INFO_CONTENT;0!==t&&(s=n>0?this._pageReference.substring(n):this._pageReference),BC(fS({context:this._contextName,data:e,rootPageReference:s}))}replaceState(e,t,n={}){if(!rS.isValidPropertyReference(e))return;const{skipDirtyValidation:s=!1}=n;BC({type:"REPLACE_PROPERTY",payload:{reference:cS.getContextPath(this.getPageReference(),e),value:t,context:this.getContextName(),skipDirtyValidation:s}})}reportError(e,t,n){BC(GS(e,t||{},n,t?.formFields))}getComponent(){return Im({getPConnect:()=>this})}createComponent(e,t,n,s){let r=this._pageReference;if(t){const e=zC(`${this.getPageReference()}.${js.SUMMARY_OF_LISTS}`,t,this._contextName);r=cS.getContextPath(e||t,n)||t}else if(s&&s.pageReference){let e=s.pageReference;e=No.handleAnnotation(e,this),r=cS.getContextPath(this._pageReference,e)||""}return Im(Cm({meta:e,index:this.index,options:this.#u({containerName:this.getContainerName(),hasForm:this.options.hasForm,...e.options,pageReference:r,context:this._contextName,target:this._containerTarget,readOnly:this._readOnly||this._inheritedConfig?.readOnly,viewName:this.viewName}),useCustomContext:this.useCustomContext}),s)}getReferencedView(){if(this.meta)return cS.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)||e.startsWith(js.CLASS_ANNOTATION)?this.getPageReference():`${this.getPageReference()}${e}`}getReferencedViewPConnect(e=!1){const t={...this.getComponentConfig()},n=this.options?.inheritedConfig?._inheritedProps?.find((e=>"shouldAutoRefresh"===e.prop));return n&&!t?.inheritedProps?.some((e=>"shouldAutoRefresh"===e.prop))&&t?.inheritedProps?.push(n),delete t?.name,delete t?.type,Cm({meta:this.getReferencedView(),options:this.#u({...e?this.options:void 0,...t,context:this.getContextName(),pageReference:t.context?this._resolvePageRef(t.context):this.getPageReference(),viewName:this.viewName})})}getContainerManager(){return new Qg(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new kf(this)),this._actionsApi}getActionManager(){return Dg}doesContextExist(e){return nS(e??this.getContextName())}getGoogleMapsAPIKey(){return cn()}getServerURL(){return rn()}getLoadingStatus(e){let t=null;return e?(t=$C(e),t=t?t.context_data:null):t=this.getDataObject().context_data,!!t&&(!!t.isLoading&&t.isLoading)}clearErrorMessages(e){e?.property?od({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName(),...e.subType&&{subType:e.subType}}):e?.context?od({type:"error",...e}):(od({type:"error",...e,context:js.APP.APP}),od({type:"error",...e,context:xy(`${js.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return zC(`${this.getPageReference()}.${js.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,t,n){delete e?.classID,this.replaceState(t,e),n?((e,t,n)=>{const s=(e,t)=>{Object.entries(e).forEach((([e,r])=>{if(Array.isArray(r)){const s=PCore.createPConnect({options:{pageReference:n.getPageReference(),context:n.getContextName(),referenceList:`${t}.${e}`}}).getPConnect();Op(s,`${t}.${e}`,{skipStateUpdate:!0});for(let e=0;e<r.length;e+=1)Ap(r[e],e,s,void 0,{})}else"object"==typeof r&&s(r,`${t}.${e}`)}))};s(e,t)})(e,t,this):LI(this.getContextName(),`${this.getPageReference()}${t}`,this.getStateProps()?.value??"")}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=Hf.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,s=cS.getContextPath(this.getPageReference(),n),r=t.getField(s);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,r),this.getActionsApi().triggerFieldChange(n,r),t.removeField(s,{actionPerformed:"accepted"})}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=this.getStateProps()?.value||e,n=cS.getContextPath(this.getPageReference(),t);this._hasSuggestions=!1,Hf.getSuggestionsContext(this.getContextName()).removeField(n,{actionPerformed:"ignored"});const s=Ao.getDependencies(this._contextName,n);s?.forEach((e=>{Hf.getSuggestionsContext(this.getContextName()).removeField(e,{actionPerformed:"ignored"})}))}}getSelfReferencingDatapageKeys(){const e=[],t=this.getPropertyName(),n=this.getFieldMetadata(t),{datasource:{parameters:s={}}={}}=n||{};return Object.values(s).forEach((n=>{const[,s]=n.split("."),r=t?.split(".").pop();s===r&&e.push(n.substring(n.lastIndexOf(".")+1))})),e}isReadOnlyField(){const{value:e,datasource:t,listType:n}=this.getComponentConfig(),{propertyValue:s,propertyAnnotation:r}=this.getPropertyDetails(n,t,e);if(!s||"string"!=typeof s||!s.includes(r)&&!s.includes(js.ATTACHMENT_ANNOTATION))return!1;const a=No.getPropertyName(s),o=this.getFieldMetadata(a);if(!o)return!1;const i={...this.getComponentConfig(),fieldMetadata:o,template:this._rawConfig?.config?.template};return this.#d(i,a)}#d(e,t){const n=zg.isPropertyInternal(t),s=e.datasource,r=this.getComponentConfig().isSearchField,{isClassKey:a,isSpecial:o,isDeclarativeTarget:i}=e.fieldMetadata??{},c="DataReference"===e.template||"ObjectReference"===this.meta?.type,l=e.listType!==js.ASSOCIATED;return!r&&!!(i||n||!s&&(a&&!c||o)&&l)}getPropertyDetails(e,t,n){return e===js.ASSOCIATED?{propertyValue:t,propertyAnnotation:js.ASSOCIATED_PROPERTY_ANNOTATION}:{propertyValue:n,propertyAnnotation:js.PROPERTY_ANNOTATION}}updateConfigData(e,t,n){e.fieldMetadata=t,t.additionalInformation&&(e.additionalInformation=t?.additionalInformation),t.inputFormat&&"string"!=typeof t.inputFormat&&(e.inputFormat=t.inputFormat),this.#d(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}))}#l(e){const t=e.getPConnect().getComponentName(),n=e.getPConnect().getConfigProps().template;return!(!0===fm.allowedComponetsForBulkProcessing[t]||!0===fm.allowedComponetsForBulkProcessing[t]?.[n])}}function Cm(e){const t=new Am(e);return{getPConnect:()=>t}}function Sm(e){Im=e}const _m={CASE_INFO:`${js.DATA}.${js.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${js.DATA}.${js.CASE_INFO.CASE_TYPE_ID}`,NEXT_ASSIGNMENT_INFO_ID:`${js.DATA}.${js.NEXT_ASSIGNMENT_INFO_ID}`,ASSIGNMENTS:`${js.DATA}.${js.CASE_INFO.ASSIGNMENTS}`,CASE_INFO_ID:`${js.DATA}.${js.CASE_INFO.CASE_INFO_ID}`,CASE_FIRST_FLOW_ACTION_NAME:`${js.DATA}.${js.CASE_INFO.ASSIGNMENTACTION_ID}`,CASE_FIRST_ASSIGNMENT_ID:`${js.DATA}.${js.CASE_INFO.ASSIGNMENT_ID}`},Nm=(e,t)=>{const{vcName:n,containerName:s}=t;return s||n||Og.getTargetViewContainerName(e)},Tm=e=>{const t=e.lastIndexOf(js.FORWARD_SLASH_STRING)+1,n=e.lastIndexOf(js.UNDERSCORE_STRING);return e.substring(t,n)},Dm=e=>e===my.WORKAREA,Pm=e=>e===my.MODAL,Om=e=>e===Fr,Rm=e=>e===Tr,bm=e=>e&&e.find((e=>e.type===Tr)),vm=e=>rS.getIn(e,_m.CASE_INFO,{}),xm=e=>e?e.split(" ").pop():void 0,wm=e=>rS.getIn(e,_m.CASE_CLASS_NAME,js.EMPTY_STRING),Mm=(e,t=!1)=>{const n=t?Lg(e):vm(e);return QI(n)&&JI(PA.getOperatorIdentifier(),n)},Lm=e=>rS.getIn(e,_m.CASE_INFO_ID,js.EMPTY_STRING),Um=e=>rS.getIn(e,_m.CASE_FIRST_ASSIGNMENT_ID,js.EMPTY_STRING),Fm=(e,t)=>{const{removeActionPayload:n,target:s}=t;if(n&&n.containerItemID){const{containerItemID:t,context:r}=n;e.push($S(LS,{containerItemID:t,context:r||Ly(t),target:s}))}},jm=e=>{const t=e.context;if(YI.shouldUseUnifiedHandling()){const e=Qy(t),{accessedOrder:n=[],type:s}=yy(e),r=n.filter((e=>e!==t));BC(LS({containerItemID:t,context:t,target:e,containerInfo:{newAccessedOrder:r,containerType:s}}))}else Jy(t,{skipDirtyCheck:!0})},Vm=e=>{const t=kC();if(!e)return!1;const n=Ws(e),s=Qy(n),r=Qy(e);if(!s||!r)return!1;const a=Cy(s,n),o=Cy(r,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},km=(e,t,n={})=>{const{skipFlowNameUpdate:s}=n,r=Lm(t);rS.setIn(e,"key",r);const a=QI(vm(t));if(!s&&(e=>{const t=rS.getIn(e,_m.ASSIGNMENTS,[]);return t&&t.length>0})(t)){const n=Um(t),[,s]=n.split("!");o={assignmentID:n,isInCreateStage:a},fd.publish(js.PUB_SUB_EVENTS.CASE_EVENTS.CURRENT_ASSIGNMENT_UPDATED,o),rS.setIn(e,"flowName",s)}var o},Bm=(e,t)=>{const{attachmentsExist:n}=t;n&&rS.setIn(e,Fs.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),rS.setIn(e,Fs.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())},$m=(e,t,n)=>{let s=js.PROMISE_VALUE.RESOLVE;return bm(e)?(s=js.PROMISE_VALUE.REJECT,n?Dg.rejectActionByID(t,!0,n):Dg.rejectActionByID(t)):Dg.resolveActionByID(t),s},Gm=e=>YI.isCoexistenceCase(e),Wm=()=>"true"===PA?.environmentInfoObject?.pxMashupDetails?.pyLaunchCaseInModal,Hm=(e,t,n,s)=>{const{containerItemID:r}=t;if(r){const{caseClassName:a,skipAssignmentsUpdate:o}=s,i=Ws(r),c=Qy(i),l=c&&yy(c),u=c&&xy(c),d=Ys(i),p=n?.data?.caseInfo?.ID;u&&l?.items?.[u]?.key===t?.caseID&&e.push($S(IS,{containerItemID:i,context:i,container:d,containerName:d,caseId:p,viewName:js.getDefaultQualifiedName(Fs.CASESUMMARY_VIEW_NAME),updateData:!0,viewLoadingContainer:{context:i},caseClassName:a,...void 0!==o&&{skipAssignmentsUpdate:o}}))}},qm=async(e,t)=>{const{context:n,containerItemID:s,shouldUpdateCaseActionsInParentContext:r}=e,a=t?.data?.caseInfo?.ID?Lm(t):void 0;if(!n||!a)return;const o=a?`${a}_actionsLoading`:"actionsLoading";try{const i=new Am({}),c=new Bf(i);Ng.setComponentCache(o,!0);const l=t?.data?.caseInfo?.caseTypeID?wm(t):void 0,u=await c.getCaseActions(a,n,{caseTypeID:l});rm(t);const d=rS.getIn(t.data,js.getProperty(js.CASE_INFO.CASE_INFO_ACTIONS)),p=Array.isArray(u.availableProcesses)&&u.availableProcesses.length>0?{availableProcesses:u.availableProcesses}:[],g=u?.availableActions,h=["pyUpdateCaseDetails"],f=Array.isArray(g)&&g.find((e=>h.includes(e.ID))),m={data:{caseInfo:{availableActions:[...u.availableActions,...void 0!==d?d:[]],...p,editActions:f?[f]:[]}}};Ng.setComponentCache(o,!1),BC($S(fS,{context:n,...m})),!0===r&&s&&(async(e,t)=>{const{containerItemID:n,caseID:s}=t;if(n){const t=Ws(n),r=Qy(t),a=r&&yy(r),o=r&&xy(r);o&&a?.items?.[o]?.key===s&&BC($S(fS,{context:t,...e}))}})(m,e)}catch(e){Ng.setComponentCache(o,!1),console.error("Error fetching case actions:",e)}},zm=(e,t)=>{const n=wm(e?.response),s=vm(e?.response),{caseTypeID:r}=s,a=PA.getFeatureMap();(a?.deferUpdateCaseSummaryView??!Object.hasOwn(a,js.DEFER_UPDATE_CASESUMMARY_VIEW))&&r&&Hm(t,e?.actionInPayload,e?.response,{caseClassName:n,skipAssignmentsUpdate:!e?.actionInPayload?.context?.includes(js.PREVIEW)})},Ym=()=>PA.isOptimizedCaseLoadingEnabled(),Km=(e,t)=>{Ym()&&qm(t,e)},Qm=e=>$C(e)?.context_data?.caseViewMode,Jm=e=>!(!Ng.getComponentCache("redirectionInProgress")||!e)&&($m([],e),!0);const Xm=new class{confirmHandler=null;registerConfirmHandler(e){this.confirmHandler=e||null}confirm(e){return this.confirmHandler?this.confirmHandler(e):Promise.resolve(window.confirm(e))}},Zm=Xm,{RESOURCE_TYPES:eI}=Fs,tI={PAGE:"page",FORM:"form"},nI={[eI.CASE]:[Qr,Yr,Kr],[eI.OBJECT]:[Ma,La,Fa],[eI.PAGE]:[Wr,qr],[eI.DATA]:[Hr],ASSIGNMENT:[oa]},sI=(e,t,n={})=>{if(!e)return{};const s={etag:e.etag},{RemoteSystemID:r}=n;return e[Fs.REMOTE_SYSTEM_ID]||e[Fs.REMOTE_SYSTEM_ID.toLowerCase()]||r?s.RemoteSystemID=e[Fs.REMOTE_SYSTEM_ID]||e[Fs.REMOTE_SYSTEM_ID.toLowerCase()]||r:t&&Bs.isRemoteCase(t)&&(s.RemoteSystemID=Bs.getRemoteHeader(t)),s},rI=(e,t={})=>{const{onlyChangedData:n=!1,nonEmptyAndChangedData:s=!1,skipUUID:r=!0,isTransientContext:a=!1,includeDisabledFields:o=!1,isObjectWideAction:i,isExternalObject:c}=t;let l={};l=BI(e,{isTransientContext:a,includeDisabledFields:o,isObjectWideAction:i,isExternalObject:c}),n&&(delete l?.caseInfo?.content,a&&(l={}));const u=ty(e,!1),d=$C(e),p=jn(d,js.CASE_INFO.CASE_INFO_ENCRYPTED_CONTENT),g=void 0!==p;!a&&s&&((e,t)=>{Object.entries(e?.caseInfo?.content).forEach((([n,s])=>{const r=$C(t),a=jn(r,Fs.CASE_INFO.CASE_INFO_CLASSID),o=oC(n,a);("True-False"===o?.type&&!s||""===s)&&delete e.caseInfo.content[n]}))})(l,e);const h=vs(u,l);let f={};({content:f}=((e,t,n=!1,s=!1)=>{let r={};const a=YI.shouldUseUnifiedHandling()||!n&&!s?t?.caseInfo:t?.objectInfo;return(e||a)&&(r=e?{...t}:{...a}),{content:r}})(a,h,i,c));const m=[...Ip(e)];if(r){const e=Ls.getDefaultQualifiedName("EmbedListUUID__");m.forEach((t=>{delete t.content?.EmbedListUUID__,delete t.content?.[e]}))}f.pageInstructions=m;if((dp[e]||[]).forEach((e=>{if(f?.content){const t=e?.replace(js.getProperty(js.CASE_INFO.CASE_INFO_CONTENT),"");rS.deleteIn(f.content,(e=>{if(!e)return"";const t=e.split(".");let n,s="";for(n of t)if(n){if(n.includes("[")&&n.includes("]"))return s+=`['${n.substring(0,n.lastIndexOf("["))}']`,s;s+=`['${n}']`}return s})(t))}})),g&&(f.encryptedContent=p),!a&&h?.dataInfo)return f={...h.dataInfo,pageInstructions:f.pageInstructions},{content:f};const I=HC(Ls.getQualifiedNameForComplexRuleReferences(".pzAdditionalPayload"),js.CASE_INFO.CASE_INFO_CONTENT,e);return f.content&&I&&(f.content[Ls.getDefaultQualifiedName("pzAdditionalPayload")]=I),{content:f}},aI=(e,t)=>{let n,s,r={};const a=rS.getIn(e,js.UI_RESOURCES),o=rS.getIn(e,"confirmationNote");a?(n=rS.getIn(e,js.UI_RESOURCES_CONTEXT_DATA),s=rS.getIn(e,js.ROOT),r=rS.getIn(e,js.ACTION_BUTTONS)):o&&!t.isActiveWorkAreaPrimaryAndWorkareaAbsent&&(s={});const{data:i={},Errors:c,flowName:l}=e;let{semanticURL:u,key:d}=e;const p=i?.objectInfo?.ID;p&&(d=d||p,u=u||`objects/${p}`);const g=rS.getIn(e,"nextAssignmentInfo",null),h=rS.getIn(e,"nextAssignmentInfo.context",""),f=rS.getIn(e,"confirmationLinks",null),{isInCreateStage:m,openCaseViewAfterCreate:I,debugInfo:E,isExternalObjectCreationFlow:y,isExternalCaseCreationFlow:A}=t;return{data:{...i,key:d,flowName:l,coreHeaders:E&&{debugInfo:{[js.COREHEADER_APP_DEBUG_ID]:E.debugId}},[js.getProperty(js.CASE_INFO.CASE_INFO)]:{...i[js.getProperty(js.CASE_INFO.CASE_INFO)],actionButtons:r,headers:t.headers},[js.CONTEXT_DATA]:m?{...i[js.CONTEXT_DATA],...n,openCaseViewAfterCreate:I,errors:c,...y&&{isExternalObjectCreationFlow:y},...A&&{isExternalCaseCreationFlow:A}}:{...i[js.CONTEXT_DATA],...n,errors:c}},semanticURL:u,nextAssignmentInfo:g,assignmentContext:h,confirmationLinks:f,key:d,root:s,...t}},oI=async(e,t,n,s=!1,r=!1)=>{const a=rS.getIn(e,js.COMPONENTS);if(a)try{await Ig(a)}catch(e){console.error(e)}const o={actionConfig:t,...n};s?f_({...e,options:o,directUrlUpdation:!0}):Jp(e,o,r)},iI=(e="")=>{const t=e.indexOf(" "),n=e.indexOf("!");return e.substring(t+1,n)},cI=e=>{if(e){const[,t]=e.split("!");return{key:iI(e),flowName:t}}return{}},lI=(e,t,n,s)=>{switch(!0){case Boolean(e[js.ERROR_IN_PAGE_IDENTIFIER]&&e[js.ERROR_FIELD_IN_PAGE]):{const r=`${e[js.ERROR_FIELD_IN_PAGE]}`.replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`)),a=`${r}${e[js.ERROR_IN_PAGE_IDENTIFIER]}`,o=rS.deepClone(e);o[js.ERROR_FIELD_IN_PAGE]=r,t.includes(a.slice(1))||t.includes(a.substring(a.indexOf(".")+1,a.indexOf("[")))||t.includes(a.substring(a.indexOf(".")+1,a.indexOf("(")))?s.push(o):n.push(e);break}case Boolean(e[js.ERROR_IN_PAGE_IDENTIFIER]&&!e[js.ERROR_FIELD_IN_PAGE]):{const r=e[js.ERROR_IN_PAGE_IDENTIFIER].slice(1);t.includes(r)?s.push(e):n.push(e);break}default:n.push(e)}},uI=e=>{const{payload:t}=e,{err:n,context:s,actionMgrID:r}=t,a=n&&n.response?n.response.data:"",o=HI(s);return r&&Dg.rejectActionByID(r,!0,n),$S(GS,"Error action triggered",a,s,o)},dI=(e,t)=>By(e)&&Gy(e)?$S(jS,t):$S(_S,t),pI=(e,t)=>{t&&e.caseInfo?.content&&(e.caseInfo.content.remoteCaseMeta=t)},gI=(e,t,n=js.APP.APP,s={})=>{let r=null;const{buildNew:a=!0}=s;return By(e)?r=Gy(e)?xy(e):Hs(t,n):$y(e)&&(Gy(e)&&!a?r=Uy(e):Gy(e)&&!a||(r=Hs(t,n))),r},hI=e=>e&&e.type===Or,fI=e=>{let t=!1;const n=Vy(e);for(let e=0;e<n.length;e+=1){const s=n[e];if(s&&cy(s)){t=!0;break}}return t},mI=async(e,t={})=>{let n=!1,s=!1,r={},a=!0,o=!1,i=!1;const{showConfirmDialogForMaxDocumentLimitReached:c=!1,dirtyMessage:l,skipChildDirtyState:u=!1,loadingContext:d}=t,p=xA();if(By(e)){const t=xy(e);if(!t)return{continueExecution:a,removeActionPayload:r};const s=Ly(t);cy(s)&&(n=!0),u||n||(n=fI(t))}else if($y(e)&&qy(e)){let t=Ky(e);t||(t=xy(e),s=!0),r.containerItemID=t,r.context=Ly(t)}if(n){const t={context:d||e};Tg.disableLoadingIndicator(t);const n=l||ZE;o=await Zm.confirm(p.getLocaleValue(n,"Messages")),Tg.enableLoadingIndicator(t)}if(!o&&n&&(r={},a=!1),s){const t={context:d||e};Tg.disableLoadingIndicator(t);const n=p.getLocaleValue(ey,"Messages");c?i=await Zm.confirm(n):(await Zm.confirm(n),a=!1),Tg.enableLoadingIndicator(t)}return!i&&s&&(r={},a=!1),{continueExecution:a,removeActionPayload:r}},II=(e,t)=>{let n=!1;const s=PA.isCoexistenceAppOfType(js.APP_TYPE.UIKIT),{insKey:r,isParallelCall:a,skipFlowNameCheck:o}=t;if(!r)return{};const[,i]=r.split("!")||"",c=o?r:iI(r),l=Py(e,c);let u={},d=!1;if(l&&!s&&((e,t)=>{const n=Cy(e,t);return n?.resourceType})(e,l)===t?.type&&(n=!0,u=Cy(e,l),!o)){let e=u?.flowName;const t=Tm(l),s=Fy(l);if(s.length){const n=((e,t)=>e?.includes(js.WORKAREA)?js.WORKAREA:t)(s[0],t),r=Va(n,s[0]);e=Cy(r,s[0])?.flowName}else n=e===i;(e!==i||a)&&(d=!0)}return n=((e,t)=>!t&&e)(n,t.forceRefresh),{activate:n,activateContainerActionPayload:{target:e,isParallelAssignment:d,containerItemID:l,semanticURL:u.semanticURL,insKey:r}}},EI=(e,t,n)=>e===eI.PAGE?((e,t={})=>{let n=!1;const{semanticURL:s}=t,r=Py(e,s);return r&&(n=!0),{activate:n,activateContainerActionPayload:{target:e,containerItemID:r,semanticURL:s}}})(t,n):e===eI.ASSIGNMENT?II(t,{...n,type:e}):e===eI.CASE||e===eI.OBJECT?II(t,{...n,skipFlowNameCheck:!0,type:e}):{},yI=e=>{if(e){const t=(e=>{const t=Sy(e);if(!t)return null;for(const[e,n]of Object.entries(t))if(!n.key&&n.resourceType===Fs.PAGE)return e;return null})(e);if(t)return{activate:!0,activateContainerActionPayload:{target:e,containerItemID:t,semanticURL:""}}}return{activate:!1}},AI=(e,t,n)=>{const{semanticURL:s,isDefaultNavPage:r}=((e,t)=>{const n=a_(Wr,{page:e,pageClass:t}),s=kC()?.getState()?.data?.app?.pyPortal?.pyPrimaryNavPages,r=Array.isArray(s)?s[0]:void 0;return{semanticURL:n,isDefaultNavPage:!(r?.pyRuleName!==e||r?.pyClassName!==t)}})(e,t);if(n&&s&&!r){const e=EI(eI.PAGE,n,{semanticURL:s});if(e.activate)return{semanticURL:s,activate:!0,activateContainerActionPayload:e.activateContainerActionPayload}}if(r){const e=yI(n);return e.activate?{semanticURL:s,...e}:{semanticURL:"",activate:!1}}return{semanticURL:s,activate:!1}},CI=(e,t)=>(e?.data?.caseInfo&&t?.caseInfo?.content&&(e.data.caseInfo.content=t?.caseInfo?.content),e),SI=(e=[])=>{Gy(`${js.APP.APP}/${js.PREVIEW}`)&&e.push($S(SS,zy({context:Fs.APP.APP,name:js.PREVIEW})))},_I=e=>{let t;for(const n of Object.keys(nI))if(nI[n].includes(e)){t=n;break}return t},NI=(e,t,n="",s={})=>{const{data:r={},context:a,caseViewMode:o,skipMergeAssignmentsAndActions:i=!0}=e,c={data:{...r},caseViewMode:o,context:Ws(a)};rS.deleteIn(c.data,"shared"),rS.setIn(c.data,["context_data","caseViewMode"],o),t.push({type:ha,payload:{context:c.context,skipMergeAssignmentsAndActions:i}});const l=n&&![Fs.CASE_INFO.CASE_INFO_CONTENT,Fs.DATA_INFO.DATA_INFO_CONTENT].includes(n),{propertiesToReplace:u=[]}=s;t.push($S(fS,{...c,...l&&{uiRootReference:n}},...u.length>0?[{propertiesToReplace:u}]:[]))},TI=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=rS.getIn(t,["payload","assignmentContext"]);if("other"===n||"remote"===n){const s=rS.getIn(t,["payload","nextAssignmentInfo","ID"]);if(t?.payload?.isProcessAction){const n={acName:rS.getIn(t,["payload","target"]),caseID:t.payload.data.caseInfo.ID,containerItemID:rS.getIn(t,["payload","context"]),context:rS.getIn(t,["payload","context"])},s={type:mr,payload:{...n}};e.push(s),e=e.filter((e=>delete e?.payload?.data?.caseMessages)),BC(e),e=e.filter((e=>e.type!==mr))}const r=((e,t,n)=>({assignmentID:e,vcName:js.PRIMARY,targetContainerName:rS.getIn(t,["payload","target"]),context:rS.getIn(t,["payload","context"]),..."other"===n&&{isChild:!0},isProcessAction:t?.payload?.isProcessAction,..."remote"===n&&{isRemote:!0},..."remote"===n&&{remoteClassName:t.payload.nextAssignmentInfo.className}}))(s,t,n);By(r.targetContainerName)||t?.payload?.containerName!==js.WORKAREA||(r.isMultiDoc=!0,e=[]);const a={type:Ir,payload:{...r}};e.push(a),BC(e)}else BC(e)}},DI=(e,t)=>vs(e,t,(function(e,t){if(Array.isArray(e))return e.concat(t)})),PI=e=>{let t={},n=IA(e);for(;n;){const e=rI(n);t=DI(e.content,t),n=IA(n)}return t},OI=e=>{e?.containerItemID&&Hf.updateState(e.containerItemID,"traditionalGadgetId",YI.getUniqueGadgetId(),{skipDirtyValidation:!0})};class RI{static getChanges(e){return{...ty(e)}}static getSubmitData(e,t){const{isTransientContext:n=!1,includeDisabledFields:s=!1,onlyChangedData:r=!1}=t||{},{content:a}=rI(e,{isTransientContext:n,includeDisabledFields:s,onlyChangedData:r});return a}static isStateModified(e){return cy(e)}static hasUnsavedChanges(e){return cy(e)||Pp(e??null)}static resetComplexObjectDirtyStatus(e){return ry(e)}static isFormValid(e,t){return GI(e,t)}static clearChangedProperties(e){return Ep(e),mp(e),uy(e)}static getEditableFields(e){return qI(e)}static setCustomValidator(e,t){Yp.register(e,t)}static isPropertyEditable(e,t){return RI.getEditableFields(e).some((e=>e.name===t))}}const bI=RI;const vI=new class{constructor(){this.states={},this.unConnectedStates={}}getStateMachine(e,t,n){return this.states?.[e]?.[`${t}${n}`]||this.unConnectedStates?.[e]?.[`${t}${n}`]}getAllStateMachines(e,t,n){return{states:this.states?.[e]?.[`${t}${n}`],unConnectedStates:this.unConnectedStates?.[e]?.[`${t}${n}`]}}getAllStateMachinesByContext(e){return{states:this.states?.[e],unConnectedStates:this.unConnectedStates?.[e]}}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,s){const r=`${n}${t}`,{stateMachine:a}=this.getStateMachineObjByPath(r,e,!0,!0),o=(t,n,s=!1)=>{const r=s?this.states:this.unConnectedStates;r[e]||(r[e]={}),r[e][t]||(r[e][t]={}),r[e][t]=n};if(a&&a.targetPageReference!==s.targetPageReference)return a.addChild(s),void o(r,s);const i=Object.entries(this.states[e]||{}).filter((([e])=>{if(e.includes(r)){const t=e.substring(0,r.length).length;return e.substring(t).startsWith("[")||e.substring(t).startsWith(".")}return!1})).reduce(((e,[t,n])=>({...e,[t]:n})),{});Object.keys(i)?.length?(Object.entries(i).forEach((([t,n])=>{delete this.states[e][t],s.addChild(n),o(t,n)})),this.states[e][r]=s):o(r,s,!0)}buildPageInstructionsByContext(e,t){const n=this.getStateMachinesByContext(e)||{},s=[];return Object.keys(n).sort().forEach((r=>{const a=Zu.getContextReferences(e)?.get(r),o=a&&cS.resolveContextTreeNodeProps(a.props)||{},i=n[r];if(a&&!0!==o.readOnly){const e=i.buildSubmitPageInstructions(t);s.push(...e)}else if(i.hasEncryptedContent){const e=i.buildSubmitPageInstructions(t).filter((e=>void 0!==e.encryptedContent));s.push(...e)}else a||this.setStateMachineEmpty(e,r)})),s}buildClientChangeList(e){const t=this.getStateMachinesByContext(e)||{};let n={};const s={};return Object.keys(t).forEach((e=>{const s=t[e].getChangeList();n={...n,...s}})),rS.flatten(n,"",s),s}getStateMachinesByContext(e){return e?this.states?.[e]:void 0}clearStateMachines(e){this.states[e]={},this.unConnectedStates[e]={}}setStateMachineEmpty(e,t){const n=this.getStateMachine(e,t,"");n.root=null,n.current=null,n.hasEncryptedContent=!1;const s=this.getUnConnectedStateMachines(e)||{};Object.keys(s).forEach((e=>{e.includes(t)&&delete s[e]}))}removeStateMachine(e,t){delete this.states[e]?.[t]}createStateMachine(e,t){let n=e.substring(0,e.lastIndexOf("["));const s=n.substring(n.lastIndexOf("."));n=n.substring(0,n.lastIndexOf(".")),n&&s&&gp(t,s,n)}getStateMachineObjByPath(e,t,n,s=!1){const r=/\[\d+\]$/gm,a=e;let o;for(;e&&!this.isStateMachineExist(t,"",e);){const i=Qy(t),c=Cy(i,t)||{},l=c?.isPageGroup||c?.subscriptFieldName||"string"==typeof c?.index;if(o=null,n&&e.endsWith("]")){if(o=e.match(r),o=o?.[o.length-1]?.substring(1,o[o.length-1].length-1),[e]=e.split(r),!s&&!this.isStateMachineExist(t,"",e)){this.createStateMachine(a,t);break}}else{if(c?.index&&e.includes(c.index)&&l){const t=e.split(".");o=t[3],e=t.slice(0,3).join(".");break}e=e.substring(0,e.lastIndexOf("."))}}return e?{stateMachineTarget:e,stateMachine:this.getStateMachine(t,"",e),index:o}:{}}executeStateMachine(e,t,n,s=!0,r={}){const{stateMachineTarget:a,index:o}=this.getStateMachineObjByPath(t,e,s);if(!a)return!1;const i=Qy(e),c=Cy(i,e)||{};let[,l]=t.split(a);if(!l)return!1;const u=c?.subscriptFieldName&&t.includes(c?.index)||c?.isPageGroup;null!==o&&([,l]=u?l.split(/(?=\.\w+)/):l.split(/^\[\d+\]/gm));const d={[wI(l)]:n},p=this.getStateMachine(e,"",a);if(null!==o)if(u){const t=Ip(e);"CREATE"===c?.resourceStatus&&t.forEach((e=>{"UPDATE"!==e.instruction||e.groupIndex!==c.index||e.content[c.subscriptFieldName]||p.update({[c.subscriptFieldName]:c.index},o,r.skipStateUpdate??!0,r)})),p?.update(d,o,r.skipStateUpdate??!0,r)}else p?.update(d,Number(o)+1,r.skipStateUpdate??!0,r);else p?.updatePage(rS.unflatten(d));return!0}setUniqueField(e,t,n){const s=Zu.getContextReferences(e)?.get(n)?.props?.uniqueField;s&&(t.content||(t.content={}),t.content[wI(s)]=crypto.randomUUID())}getBasePageReference(e){return HC(Fs.DATA_INFO.DATA_INFO_CONTENT,"",e)?Fs.DATA_INFO.DATA_INFO_CONTENT:Fs.CASE_INFO.CASE_INFO_CONTENT}mergeServerPageInstructions(e,t){t.forEach((t=>{if(t.target){const n=rS.convertClipboardPageToPageRefNotation(t.target),s=`${this.getBasePageReference(e)}${n}`;if(!this.isStateMachineExist(e,s,"")){const t=s.substring(s.lastIndexOf(".")),n=s.substring(0,s.lastIndexOf("."));gp(e,t,n)}const r=this.getStateMachine(e,s,"");"INSERT"===t.instruction&&this.setUniqueField(e,t,s),void 0!==t.encryptedContent&&r&&(r.hasEncryptedContent=!0),r?.insertNode(t)}}))}registerForServerChanges(){UC.registerForListChanges(((e,t,n)=>{setTimeout((()=>{this.generatePageInstructions(e,t,n)}),0)}))}registerForServerChangesSync(){UC.registerForListChanges(((e,t,n)=>{this.generatePageInstructions(e,t,n)}))}generatePageInstructions(e,t,n){const s="].";if(!t.includes(".classID")&&bI.isPropertyEditable(e,t)&&this.executeStateMachine(e,t,n),!t.includes(".classID")&&t.includes(s)){const r=t.substring(0,t.lastIndexOf("[")),a=bI.getEditableFields(e);if(["multiselect","checkbox"].includes(a.find((e=>e.name===r))?.type)){const a=Zu.getContextReferences(e),o=a?.get(r),i=t.substring(t.lastIndexOf(s)+2);o?.props.selfReferencingDatapageKeys?.includes(i)&&this.executeStateMachine(e,t,n)}}}unRegisterForServerChanges(){UC.unRegisterForListChanges()}},xI={},wI=e=>e.startsWith(".")?e.substring(1):e,MI=e=>{delete xI[e]},LI=(e,t,n)=>{const s=wI(t);xI[e]?xI[e].fieldOrder[s]=n:xI[e]={fieldOrder:{[s]:n}}},UI=(e,t={})=>{const{includeDisabledFields:n=!1}=t,s=cS.resolveContextTreeNodeProps(e),r=!0!==s.readOnly&&!1!==s.visibility&&(n||!0!==s.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&&r},FI=(e,t,n,s,r)=>(vI.executeStateMachine(e,s,cS.getLitePropertyValue(n,t))||r.push(s),r),jI=(e,t,n)=>{const s=t.isInsideList,{ignoreFieldsInsideList:r=!0}=n;return(!s||s&&!r)&&!Array.isArray(cS.getLitePropertyValue(t,e))&&!(t.componentName&&["Address","Attachment"].includes(t.componentName))},VI=(e,t={})=>{let n=[];const s=[],r=Zu.getContextReferences(e);return r?(({editableFormFieldsReferenceList:n}=((e,t,n)=>{const{includeDisabledFields:s=!1}=n;let r=[];for(const[a,o]of e){const e=cS.resolveContextTreeNodeProps(o.props),i=e.propertyName;UI(o.props,{includeDisabledFields:s})&&jI(a,e,n)&&(r=FI(t,i,e,a,r))}return{editableFormFieldsReferenceList:r}})(r,e,t)),xI[e]&&s.push(...Object.keys(xI[e].fieldOrder??{})),{formInputs:n,formPageFields:s}):{formInputs:n,formPageFields:s}},kI=e=>{let t=[];const n=Zu.getContextReferences(e);if(n)for(const[e,s]of n){const n=s?.props;if(UI(n)&&"Attachment"===n?.componentName){const s="true"===n?.allowMultiple;t=[...t,{type:"File",allowMultiple:s,fullPath:e}]}}return t},BI=(e,t={})=>{const n={},s=$C(e),{ignoreFieldsInsideList:r=!0,isTransientContext:a=!1,includeDisabledFields:o=!1,isObjectWideAction:i=!1,isExternalObject:c=!1}=t,l=((e,t,n)=>YI.shouldUseUnifiedHandling()||!e&&!t?n?.caseInfo:n?.objectInfo)(i,c,s);if(a||l){const{formInputs:t,formPageFields:i}=VI(e,{ignoreFieldsInsideList:r,includeDisabledFields:o});((e,t,n)=>{e.forEach((e=>{let s=rS.getIn(t,e);"object"==typeof s&&(s=rS.deepClone(s),delete s?.classID),rS.buildObject(e,n,s)}))})(i,s,n),t&&t.length>0?t.forEach((e=>{rS.buildObject(e,n,rS.getIn(s,e))})):a||rS.buildObject(Fs.CASE_INFO.CASE_INFO_CONTENT,n,{})}if(!a&&s?.dataInfo?.content){const{formInputs:t}=VI(e,{ignoreFieldsInsideList:r});t.forEach((e=>{rS.buildObject(e,n,rS.getIn(s,e))}))}return n},$I=(e,t,n)=>{const s=""===t&&n?.startsWith(".")?n.substring(1,n.length):n,r=Zu.getContextReferences(e)?.get(`${t}${s}`)?.props;return r?cS.resolveContextTreeNodeProps(r):r},GI=(e,t)=>{const n=Zu.getContextReferences(e);let s=!0;if(!n)return s;for(const[e,r]of n){const n=cS.resolveContextTreeNodeProps(r.props);if(UI(r.props)&&(!t||e.includes(t))){const e=Yp.validate(n.componentName?.toLowerCase(),n.propertyName,cS.getLitePropertyValue(n,n.propertyName),n);s&&(s=!e.message)}}return s},WI=e=>{const t=Zu.getContextReferences(e);if(t)for(const[,e]of t){if(cS.resolveContextTreeNodeProps(e.props).hasSuggestions)return!0}return!1},HI=(e,t=!1)=>{const n=Zu.getContextReferences(e),s=[];if(n)for(const[e,r]of n){if(!1!==cS.resolveContextTreeNodeProps(r.props).visibility){const n=8,r=t?e:e.substring(e.indexOf("content")+n);s.push(r)}}return s},qI=e=>{const t=[],n=Zu.getContextReferences(e);if(n)for(const[e,s]of n){const n=cS.resolveContextTreeNodeProps(s.props);UI(s.props)&&"Attachment"!==n.componentName&&"multirecordlist"!==n.type&&t.push({name:e,label:n.label,type:n.componentName?.toLowerCase()})}return t};class zI{static getCaseInlineEditAction(e){return e?PA.getInlineEditActions(e):[]}static isCaseActive(e,t){if(!e||!t)return!1;const n=yy(t);if(n){const s=xy(t),{items:r={}}=n;return!(!s||!r[s]||r[s].key!==e)}return!1}static getCaseEditMetadata=(e,t)=>{const n={caseID:e,viewID:Ls.getDefaultQualifiedName("pyEdit")},{restApi:s,reqType:r}=i_("loadView",n);return Wd(s,{method:r},t)};static getCaseView=(e,t,n,s={})=>{const{signal:r}=s,a={caseID:e,viewID:t},{restApi:o,reqType:i}=i_("loadView",a);return Wd(o,{method:i,...r&&{signal:r}},n)};static isExternalCaseType=e=>{let t;return this.shouldUseUnifiedHandling()?(t=PA.getCaseTypeList()?.find((t=>t.DisplayMandatoryInputsForObject&&t.pyWorkTypeImplementationClassName===e)),!!t):(t=PA.getCaseTypeList()?.find((t=>"Case"===t.objectType&&t.DisplayMandatoryInputsForObject&&t.pyWorkTypeImplementationClassName===e)),!!t)};static getCaseEditLock=(e,t,n)=>{const s={caseID:e,actionID:this.getCaseInlineEditAction(n)[0]??Ls.getDefaultQualifiedName("pyUpdateCaseDetails")},{restApi:r,reqType:a}=i_(na,s);return Wd(`${r}?viewType=page`,{method:a},t)};static updateCaseEditFieldsData=(e,t,n,s,r)=>{const a=this.getCaseInlineEditAction(r),o=a.length?a:[Ls.getDefaultQualifiedName("pyUpdateCaseDetails")],i=t[e],c=(t,n)=>{const[r,...a]=t;return((t,n)=>{const r={caseID:e,actionID:t},{restApi:a}=i_(na,r);return Wd(`${a}?viewType=form`,{method:"PATCH",body:{content:{...i}},headers:{"if-match":n}},s)})(r,n).then((e=>a.length>0?c(a,e.headers.etag):e))};return c(o,n)};static getCaseMessages=e=>$C(e)?.caseMessages;static getPropertiesToReplace=e=>(kI(e)||[]).map((e=>({path:e.fullPath,allowMultiple:e.allowMultiple})));static getPropertiesToReArrange=e=>(kI(e)||[]).filter((e=>e.allowMultiple)).map((e=>e.fullPath));static getUniqueGadgetId=()=>rS.generateUniqueID().substring(0,5);static getRemoteCaseMapping=()=>Bs.getRemoteCaseMapping();static isTraditionalRemoteCase=e=>Bs.isTraditionalRemoteCase(e);static isCoexistenceCase=e=>!!e&&(PA.getCaseTypeList()?.some((t=>t.pyWorkTypeImplementationClassName===e&&"true"===t.pyIsTraditionalUICase))??!1);static isRemoteCase=e=>Bs.isRemoteCase(e);static isRemoteCaseVersionDifferent=e=>Bs.isRemoteCaseVersionDifferent(e);static getRemoteCaseKey=(e,t)=>{let n=t;try{e&&(n=e.slice(e.indexOf(" ")+1,e.indexOf("!")))}catch{}return n};static isObjectCaseType=e=>{const t=PA.getCaseTypeList()?.filter((t=>t.pyWorkTypeImplementationClassName===e));return t&&t.length>0&&"Object"===t[0].objectType};static isExternalObject=e=>{const t=PA.getCaseTypeList()?.filter((t=>t.pyWorkTypeImplementationClassName===e)),{DisplayMandatoryInputsForObject:n,objectType:s}=t?.[0]||{};return t&&t.length>0&&n&&"Object"===s};static getRouteKeyForCreateWork=(e,t=!1)=>this.isExternalCaseType(e)&&t?ja:this.isExternalObject(e)&&t?this.shouldUseUnifiedHandling()?ja:"retrieveActionViewForNewObject":this.shouldUseUnifiedHandling()?Oa:this.isObjectCaseType(e)?Ma:Oa;static shouldUseUnifiedHandling=()=>!0;static shouldAppendExcludeQueryParam=()=>PA.isOptimizedCaseLoadingEnabled();static appendExcludeQueryParamToUrl=e=>{if(!e)return e;if(!this.shouldAppendExcludeQueryParam())return e;let t=e;if(t.includes("excludeAdditionalActions=true"))return t=t.replace("excludeAdditionalActions=true","exclude=availableActions,availableProcesses,assignments"),t;const n=t.includes("?")?"&":"?";return`${t}${n}exclude=availableActions,availableProcesses`};static setTraditionalGadgetId=e=>{e.traditionalGadgetId=zI.getUniqueGadgetId()}}const YI=zI,KI=e=>{const{activeActionID:t,availableActions:n}=e||{};if(t&&n){const e=n.find((e=>e.ID===t));return Boolean(e)}return!1},QI=e=>{if(YI.shouldUseUnifiedHandling()&&YI.isObjectCaseType(String(e?.caseTypeID))&&!KI(e))return!0;if(YI.isObjectCaseType(String(e?.objectTypeID))&&!KI(e))return!0;if(e){const{stageID:t,stages:n=[]}=e,s=n.length;for(let e=0;e<s;e+=1){if(n[e].ID===t)return"create"===n[e].transitionType&&"active"===n[e].visited_status}}return!1},JI=(e,t)=>{if(e&&t){const n=rS.getIn(t,["assignments","0","assigneeInfo"],{}),{ID:s,type:r}=n;return"worklist"===r?.toLowerCase()&&s===e}return!1},XI=(e,t)=>{const n=cS.getPropertyValue(Fs.CASE_INFO.ACTIVE_ACTION_ID,t,e),s=cS.getPropertyValue(Fs.CASE_INFO.AVAILABLEACTIONS,t,e);let r=!1;if(s&&n){const e=s.find((e=>e.ID===n));e&&(r=e.type.toLowerCase()===Fs.LOCAL_ACTION_TYPE.CASE_WIDE.toLowerCase())}if(e&&!s){const t=$C(e);r=t?.context_data?.actionType===js.CASE}return r},ZI=e=>qC(null,js.CASE_VIEW_MODE_PROP,e)===js.PERFORM_MODE&&(e.includes(js.WORKAREA)||e.includes(js.MODAL)||e.includes(js.ACTIONAREA)),eE=(e,t)=>ZI(e)&&!XI(e,t),tE=e=>{const t=e?.parentCaseInfo?.ID;return Boolean(e&&t)},nE=(e,t,n)=>{let s;const r=e?.find((e=>e.ID===t))?.actions,a=r?.filter((e=>e.ID===js.FIX_BROKEN_ASSIGNMENTS))||[];return s=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),s},sE=(e,t,n,s)=>{let r;return r=e?nE(e,t,n):s||Ls.getDefaultQualifiedName("Create"),r},rE=(e,t)=>YI.shouldUseUnifiedHandling()?hr:YI.isObjectCaseType(e)||t?va:hr,aE=(e,t,n)=>{let s,r,a,o,i,c,l,u,d;const p=$C(e),g=p?.caseInfo?.caseTypeID||p?.objectInfo?.objectTypeID,h=YI.shouldUseUnifiedHandling();return n?.isTriggeredFromDifferentContext||e.includes(js.ACTIONAREA)?(s=e.includes(js.ACTIONAREA)?void 0:p.caseInfo?.assignments?.[0]?.ID,r=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):!h&&p?.objectInfo&&YI.isObjectCaseType(g)?(r=p.objectInfo.ID,o=p.objectInfo.activeActionID,i=p.objectInfo.availableActions,c=p.objectInfo,l=p.objectInfo.businessID,u=p.objectInfo.objectTypeID,d=p.objectInfo.objectTypeName):(s=t.getValue(js.getProperty(Fs.CASE_INFO.ASSIGNMENT_ID)),r=t.getValue(js.getProperty(Fs.CASE_INFO.CASE_INFO_ID)),a=t.getValue(js.getProperty(Fs.CASE_INFO.ASSIGNMENTS)),o=t.getValue(js.getProperty(Fs.CASE_INFO.ACTIVE_ACTION_ID)),i=t.getValue(js.getProperty(Fs.CASE_INFO.AVAILABLEACTIONS)),c=t.getValue(js.getProperty(Fs.CASE_INFO.CASE_INFO)),l=t.getValue(js.getProperty(Fs.CASE_INFO.BUSINESS_ID)),u=t.getValue(js.getProperty(Fs.CASE_INFO.CASE_TYPE_ID)),d=t.getValue(js.getProperty(Fs.CASE_INFO.CASE_TYPE_NAME))),{assignmentID:s,caseID:r,assignments:a,localActionID:o,caseActions:i,caseInfo:c,businessID:l,caseTypeID:u,caseTypeName:d}},oE=(e,t)=>{if(Object.keys(e??{}).length>0&&t?.startsWith("http")){const n=new URL(t),s=new URLSearchParams(n.search);return Object.keys(e).forEach((t=>{s.append(t,String(e[t]))})),n.search=s.toString(),n.toString()}return t},iE=(e,t="case")=>{const n=e?.payload?.err?.response?.data?.displayButtonsOnErrors||[],s=e?.payload?.err?.response?.status;if(Array.isArray(n)&&n.length>0&&424===s){n.forEach((e=>{e.isErrorButton=!0}));const s=e.payload.context,r=$C(s),a=((e,t)=>(e.forEach((e=>{!0!==e.isErrorButton||t.some((t=>t.actionID===e.actionID))||(t=[...t,e])})),t))(n,r?.caseInfo?.actionButtons?.secondary||[]),o={data:{["dataObject"===t?Fs.DATA_INFO.DATA_INFO:Fs.CASE_INFO.CASE_INFO]:{actionButtons:{secondary:a}}},target:Qy(s),context:s};BC({type:Cr,payload:o})}},cE=e=>({type:Nf.REFRESH_DATA,payload:e}),lE={},uE=(e,t,n,s,r,a,o,i,c,l)=>{if(!(e&&s&&t))return;const u=l.actionMgrID||Dg.getNextActionMgrId(),d={ID:e,actionID:t,objectTypeID:n,context:s,caseWideAction:r,isObjectType:a,isExternalObject:o,isExternalCase:i,casetypeID:c,options:{...l,actionMgrID:u}};l.isFillFormWithAI?BC((e=>({type:Pa,payload:e}))(d)):BC(cE(d))},dE=(e,t,n,s,r)=>{if(!(e&&n&&t))return;s&&(s=rS.convertPageRefToClipboardPageNotation(s));BC(cE({ID:e,viewID:t,context:n,options:r,caseViewAction:!0,interestPage:s}))},pE=(e,t,n,s,r,a,o,i,c,l={})=>{if(!((e||t)&&s&&n&&r))return;r&&(r=rS.convertPageRefToClipboardPageNotation(r));const u={ID:o||c!==js.ACTION?e:t,actionID:n,context:s,options:l,interestPage:r,interestPageActionID:a,isLocalAction:o,isMultiRecordData:i,editType:c};BC(cE(u))},gE=(e,t,n)=>{lE[t]||(lE[t]={}),e&&!lE[t][e]&&(lE[t][e]={pageReference:n})},hE=(e,t,n)=>{const s={pageName:(r=t.substring(t.lastIndexOf(" ")+1)).substring(0,r.lastIndexOf(".")),propertyName:r.substring(r.lastIndexOf(".")+1)};var r;const a=oC(s.propertyName,n||e.getValue(js.CLASS_ID,s.pageName));return!!a?.isDeclarativeTarget},fE=(e,t,n)=>{const s=n||e.getRawMetadata()?.config?.value;let r=!1;if(s){const n=No.trimAnnotation(s);let a;a=t?rS.resolvePageClass(n,t):cS.resolveClassID(s,e.getPageReference(),e.getContextName());const o=oC(No.getLeafPropertyName(s),a);if(r=!!o?.isDeclarativeTarget,!r&&o?.additionalInformation){const e=No.trimAnnotation(o?.additionalInformation);r=zf.isDecisionParagraph(e,o.classID)}!r&&o?.datasource?.parameters&&(r=((e,t,n)=>{let s=!1;if(Array.isArray(t)){const r=t=>{const r=t.value;return r.startsWith("@P")&&(s=hE(e,r,n)),s};t.some(r)}else if("object"==typeof t)for(const r of Object.keys(t))if(t[r].startsWith("@P")&&(s=hE(e,t[r],n),s))break;return s})(e,o?.datasource?.parameters,t)),r||(r=o?.datasource?.tableType===js.DECISION)}return r},mE=(e,t)=>{const n=n=>(e=>"string"==typeof e&&e.startsWith(js.PROPERTY_ANNOTATION))(n)&&fE(e,t,n),s=e=>!(!e||"object"!=typeof e)&&Object.values(e).some((e=>n(e)||s(e)));return s(e.getRawMetadata()?.config)},IE=e=>{(e.isWhenExist()||mE(e))&&gE(e.getCurrentView(),e.getContextName(),e.getPageReference())},EE=e=>{if(!e)return!1;const t=kC()?.getState()?.data?.[e],n=t?.caseInfo?.caseTypeID||t?.objectInfo?.objectTypeID;return YI.isObjectCaseType(n)},yE=(e,t,n)=>{const s=XI(e,t);let r,a,o="",i="";const c=n=>cS.getPropertyValue(n,t,e)||"",l=YI.shouldUseUnifiedHandling(),u=c(Fs.CASE_INFO.CASE_INFO_CLASSID)||c(Fs.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID)||n?.classID||"",d=YI.isObjectCaseType(u)||t.startsWith(js.OBJECT_INFO.OBJECT_INFO),p=YI.isExternalCaseType(c(Fs.CASE_INFO.CASE_INFO_CLASSID)),g=YI.isExternalObject(u),h=c(js.getProperty(Fs.CASE_INFO.BUSINESS_ID));if(d&&EE(e)&&!p)o=u,n.isObjectWideAction=!0,r=c(l?Fs.CASE_INFO.ACTIVE_ACTION_ID:Fs.OBJECT_INFO.ACTIVE_ACTION_ID),r||(r=js.getDefaultQualifiedName(js.VIEW_NAMES.OBJECT_CREATE_VIEW)),a=c(js.getProperty(Fs.CASE_INFO.CASE_INFO_ID))||o;else if(p&&!h)r=js.getDefaultQualifiedName(js.VIEW_NAMES.OBJECT_CREATE_VIEW),a=c(Fs.CASE_INFO.CASE_INFO_CLASSID),i=c(Fs.CASE_INFO.CASE_TYPE_ID);else if(r=c(Fs.CASE_INFO.ACTIVE_ACTION_ID)||c(Fs.CASE_INFO.ASSIGNMENTACTION_ID),s)a=c(js.getProperty(Fs.CASE_INFO.CASE_INFO_ID));else{a=c(js.getProperty(Fs.CASE_INFO.ASSIGNMENT_ID))||c(js.getProperty(Fs.CONTEXT_DATA_ASSIGNMENTID))}uE(a,r,o,e,s,d,g,p,i,n)},AE=e=>{const{context:t,pageReference:n}=e,s=(e=>lE[e]&&Object.keys(lE[e]).length>0&&ZI(e))(t);if(!s)return;const r=cS.getPropertyValue(js.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,n,t),{isMultiRecordData:a,editType:o}=r||{};if(a){const e=cS.getPropertyValue(Fs.CASE_INFO.CASE_INFO_ID,n,t),s=cS.getPropertyValue(Fs.CASE_INFO.ASSIGNMENT_ID,n,t),{interestPage:i,interestPageActionID:c,actionID:l,isLocalAction:u,viewName:d}=r;o===js.ACTION?pE(e,s,l,t,i,c,u,a,o):dE(e,d,t,i,{})}else yE(t,n,{})},CE=(e,t)=>{const{requestType:n}=e;if(e?.options?.refreshFor&&"refresh"===n){t+=`?refreshFor=${e.options.refreshFor.replace(/\[(\d+)\]/g,((e,t)=>`(${parseInt(t,10)+1})`))}`}return e?.options?.isFillFormWithAI&&"refresh"===n&&(t+="?fillFormWithAI=true"),t},SE=(e,t)=>{const n=e.url===t.url,s=e.interestPage===t.interestPage;return n&&s},_E=(e,t)=>{const n=e.url?.includes("/refresh?refreshFor="),s=t.url?.includes("/refresh?refreshFor="),r=e.url?.endsWith("/refresh")&&!n,a=t.url?.endsWith("/refresh")&&!s;if(r&&a)return SE(e,t);if(r&&s)return!0;if(n){if(a)return"CANCEL_REFRESH";if(s)return SE(e,t)}return!1},NE=e=>{const t=(e=>{const t=[];return Zu.getDeclarativeTargets(e).forEach((({name:e,pageReference:n})=>{const s=n.split(".");s.shift();let r=s.join(".");e&&r&&(r=rS.convertPageRefToClipboardPageNotation(r),t.push({name:e,context:r}))})),t})(e),n=(e=>{const t=[];return Zu.getWhens(e).forEach((({name:e,type:n,pageReference:s})=>{const r=s.split(".");r.shift();let a=r.join(".");e&&a&&(a=rS.convertPageRefToClipboardPageNotation(a),t.push({name:e,context:a,type:n}))})),t})(e);return{fieldsWithDeclarativeTargets:t,whens:n}};const TE=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}},DE={IDLE:"idle",SAVING:"saving",SKIPPED:"skipped",ERROR:"error"},PE='input[type="text"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"], input[type="url"], input[type="password"], input[type="date"], input[type="time"], input[type="month"], input[type="week"], input[type="datetime-local"], input:not([type])',OE=`${PE}, textarea, [contenteditable="true"]`,RE=new Map,bE=new Map,vE=new Set,xE=new Map,wE=new Map,ME=new Set,LE=(e,t)=>{xE.get(e)?.forEach((e=>e(t)))},UE=(e,t)=>{const n=bE.get(e);void 0!==n&&clearTimeout(n),bE.set(e,setTimeout((()=>{bE.delete(e),t()}),(()=>{const e=Number(PA.getFeatureMap()?.pyAutoSaveDurationInMS);return e>0?e:5e3})()))},FE=e=>{const t=Ws(e),n=Qy(t);return!n||!$y(n)||xy(n)===t},jE=async e=>{if(vE.has(e))return;if(ME.has(e))return;const t=RE.get(e);if(!t)return;if(!FE(e))return;const n="undefined"!=typeof document?document.activeElement:null;if(n&&n===(e=>Wp.get(e)??null)(e)&&n.matches(PE))return void UE(e,(()=>jE(e).catch((()=>{}))));(e=>{const t=wE.get(e);if(t&&0!==t.size){for(const[n,s]of t)vI.executeStateMachine(e,n,s,!0,{skipStateUpdate:!1,skipDirtyValidation:!1})||BC(KS({reference:n,value:s,context:e,isImplicit:!1,skipDirtyValidation:!1}));wE.delete(e)}})(e);let s=!1;Gp(!0);try{if(!bI.hasUnsavedChanges(e))return;s=bI.isFormValid(e)}finally{Gp(!1)}if(s){vE.add(e),LE(e,DE.SAVING);try{await((e,t)=>{const n=e,s=n.includes(js.MODAL),r=HC(Fs.CASE_INFO.CASE_INFO_ID,null,n),a=HC(Fs.CASE_INFO.ASSIGNMENT_ID,null,n),o=HC(Fs.CASE_INFO.ACTIVE_ACTION_ID,null,n)||HC(Fs.CASE_INFO.ASSIGNMENTACTION_ID,null,n),i=HC(Fs.CASE_INFO.CASE_TYPE_ID,null,n),c=HC("isProcessAction","isProcessAction",n),l=Dg.getNextActionMgrId(),u={context:n,containerItemID:e,assignmentID:a,actionID:o,caseID:r,containerName:t,caseType:i,isModalAction:s,isFormValid:void 0,isProcessAction:c,saveOnly:!0,autosave:!0,actionMgrID:l};let d,p;const g=new Promise(((e,t)=>{d=e,p=t}));if(!d||!p)throw new Error("Promise executor did not synchronously assign resolveFn/rejectFn.");return Dg.register(l,g,d,p,$g,u,!0),xf.executeOrQueueDeferredAction(Gg(u)),g})(e,t.containerName),bI.clearChangedProperties(e),LE(e,DE.IDLE)}catch{LE(e,DE.ERROR)}finally{vE.delete(e)}}else LE(e,DE.SKIPPED)},VE=()=>{if("undefined"==typeof document)return;const e=document.activeElement;if(e?.matches(OE))for(const e of RE.keys())bE.has(e)&&FE(e)&&UE(e,(()=>jE(e).catch((()=>{}))))},kE=VE,BE=e=>{"Tab"===e.key&&VE()},$E=e=>{const{target:t}=e;if("undefined"!=typeof Element&&t instanceof Element&&t.matches(PE))for(const e of RE.keys())bE.has(e)&&FE(e)&&(Hp(e,t),UE(e,(()=>jE(e).catch((()=>{})))))},GE=e=>RE.has(e),WE=e=>{const t=bE.get(e);void 0!==t&&clearTimeout(t),bE.delete(e),vE.delete(e),RE.delete(e),ME.delete(e),wE.delete(e),qp(e),0===RE.size&&"undefined"!=typeof document&&(document.removeEventListener("pointerdown",kE),document.removeEventListener("keydown",BE),document.removeEventListener("input",$E,{capture:!0}))},HE=e=>{const t=`${e}/`;for(const e of[...RE.keys()])e.startsWith(t)&&WE(e)},qE=e=>{const t=bE.get(e);void 0!==t&&(clearTimeout(t),bE.delete(e))},zE=e=>{RE.has(e)&&(ME.has(e)||UE(e,(()=>jE(e).catch((()=>{})))))},YE=e=>{ME.delete(e),bI.hasUnsavedChanges(e)&&zE(e)},{APP:KE}=js;let QE={},JE={},XE={};const ZE="You will lose unsaved changes. Do you want to continue?",ey="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",ty=(e=KE.APP,t,n)=>{let s=[],r=[];t||(s=HI(e,!0)),n||(r=(e=>{const t=Zu.getContextReferences(e),n=[];if(t)for(const[e,s]of t)!0===cS.resolveContextTreeNodeProps(s.props).readOnly&&n.push(e);return n})(e));const a={};((e,t,n)=>{const s=JE[t]||{};Object.keys(s).forEach((t=>{const r=s[t].associatedProperty;Object.hasOwn(s,t)&&(void 0===r||n.includes(r))&&rS.buildObject(t,e,s[t].value)}))})(a,e,s);const o=QE[e]||{};return Object.keys(o).forEach((e=>{const n=!t&&s.includes(e)||t;Object.hasOwn(o,e)&&n&&!r.includes(e)&&rS.buildObject(e,a,o[e].value)})),a},ny=e=>{const{context:t}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;delete QE[t]?.[n],delete JE[t]?.[n]};qu=(e,t)=>{ny({context:e,reference:t});const n=t.lastIndexOf(".");n<1||n===t.length-1||od({type:js.MESSAGES.MESSAGES_TYPE_ERROR,context:e,pageReference:t.slice(0,n),property:t.slice(n)})};const sy=e=>e&&XE[e],ry=e=>{e&&XE[e]&&(XE[e]=!1)},ay=(e,t)=>{const{context:n,initialValue:s="",isStrictTracking:r,associatedProperty:a}=t,o=t.reference.startsWith(".")?t.reference.substr(1):t.reference;e[o]?e[o].previousValue=HC(t.reference,null,n):(e[o]={initialValue:s||HC(t.reference,null,n)},e[o].previousValue=e[o].initialValue),e[o].value=t.value,a&&(e[o].associatedProperty=a),r&&e[o].value===e[o].initialValue&&ny(t)},oy=e=>{const{payload:t}=e,{context:n}=t,s=t.reference.startsWith(".")?t.reference.substr(1):t.reference;Zu.isFieldExists(n,s)||(JE[n]=JE[n]||{},ay(JE[n],t)),QE[n]=QE[n]||{},ay(QE[n],t)},iy=({value:e,context:t,reference:n})=>{const s=Qy(t),r=Cy(s,t)||{};if(TE.isPageInstruction(n)||r?.subscriptFieldName)return;const a=n?.startsWith(".")?n?.substr(1):n;QE[t]=QE[t]||{};QE[t][a]||(QE[t][a]={initialValue:HC(a,null,t)}),QE[t][a].value=e},cy=e=>e&&QE[e]&&Object.keys(QE[e]).some((t=>QE[e][t].initialValue!==QE[e][t].value))||!!sy(e),ly=(e,t)=>{if(!e||!t)return!1;const n=QE[e]&&QE[e][t];return!!n&&n.previousValue!==n.value},uy=e=>{e&&QE[e]?(QE[e]={},JE[e]={}):"all"===e&&(QE={},JE={},XE={}),XE[e]&&(XE[e]=!1),qp(e)},dy=(e,t,n=new Set)=>{if(n.has(t))return;n.add(t);[...Ao.getDependencies(e,t),...UC.getResetDependencies(e,t)].forEach((t=>{const s=rS.getPropertyNameFromDependency(t);if("object"==typeof t&&"multiRecord"===t.mode){const t=s.split("."),n=`.${t.pop()}`,r=t.join(".");if(vI.isStateMachineExist(e,r,n)){vI.getStateMachine(e,r,n).deleteAll()}else if(GE(e)){vI.setStateMachine(e,n,r,new lp(n,r,e));const t=vI.getStateMachine(e,r,n);t?.deleteAll(!1)}}else TE.isPageInstruction(s)&&vI.executeStateMachine(e,s,""),BC({type:Xs,payload:{reference:s,value:"",context:e,isArrayDeepMerge:!0,isImplicit:!0}});dy(e,s,n)}))},py={propertyChangeMiddleware:()=>e=>t=>{const{type:n,payload:s={}}=t||{};if(n===er&&(Io(s),(e=>{const{context:t,pageReference:n,value:s,reference:r}=e;UC.triggerCascade(t,r,s);const a=Ao.getDependencies(t,r),o={context:t,datapages:{}};dy(t,r),a.forEach((s=>{let r=n;s.startsWith(n)||(r="");const a=s.replace(`${r}`,"").split(".").filter((e=>!!e));a.pop();const i=a.join("."),c=HC(`.${i}`,r,t)?.classID||e.classID,l=oC(s.split(".").pop(),c),{datasource:u}=l,d={},p=[];u.parameters.forEach((e=>{e?.value?(d[e.name]=zg.isProperty(e.value)?HC(`.${rS.getFullPropertyReference([i,rS.getPropertyName(e.value)])}`,r,t):e.value,void 0===d[e.name]||null===d[e.name]||""===d[e.name]?(d[e.name]="",p.push(js.NULL_STRING)):p.push(d[e.name])):(d[e.name]="",p.push(js.NULL_STRING))}));const g=u.name.concat(js.UNDERSCORE_STRING,rS.getHashedString(p.join(js.HASH_DELIMITER))),{name:h}=u,f=yC(h);o.datapages[g]={mode:u.mode,propertyName:s,name:u.name,dataViewParameters:d,refreshStrategy:f?.refreshStrategy}})),a.length&&BC({type:ua,payload:o})})(s),xf.registerBlockingAction(s.context).catch((()=>{})),setTimeout((()=>{(ly(s.context,s.reference)||Pp(s.context))&&AE(s),Cf.triggerRefreshForType("PROP_CHANGE",s.reference,s.context),xf.deRegisterBlockingAction(s.context).catch((()=>{}))}),0)),n===ga&&!s?.isDefault){const{context:e,referenceList:t,c11nEnv:n,listIndex:r,instruction:a,skipDirtyValidation:o=!1}=s;0===r&&"INSERT"===a&&n&&(e=>{let t=!1;const n=e?.getRawMetadata()?.config;n?.type&&"multirecordlist"===n.type&&n?.contextClass&&(t=function e(t,n){for(const s of n){const n=Cm({meta:s}).getPConnect();if(n.isWhenExist()||mE(n,t))return!0;if(s.children&&e(t,s.children))return!0}return!1}(n.contextClass,n.children??[])),t&&gE(e.getCurrentView(),e.getContextName(),e.getPageReference())})(n),setTimeout((()=>{Cf.triggerRefreshForType("PROP_CHANGE",t,e)||AE({context:e,pageReference:t})}),0),o||(XE[`${e}`]=!0)}if(n===Xs||n===Zs){const{reference:e,isImplicit:n,context:r,skipDirtyValidation:a=!1}=s;Zu.updateFieldNodeValue(r,e,s.value),TE.isPageInstruction(e)||a?a||(XE[`${r}`]=!0):oy(t),(s.removePropertyFromChangedList||n)&&ny(s)}if(n===Mr||n===Lr){const{transientItemID:e,data:t}=s;rS.iterateLeafNodes(t,(t=>{ny({context:e,reference:t.join(".")})}))}if(n&&[jr,Rr,kr,wr].includes(n)){uy(s.context),UC.purgeResetDependencies(s.context),(r=s.context)&&lE[r]&&delete lE[r];(s.childContainersContexts||[]).forEach((e=>{uy(e)}));(s.transientItems||[]).forEach((e=>{uy(e)}))}var r;e(t)},getChanges:ty,recordChange:oy,isDirty:()=>Object.keys(QE).some((e=>cy(e))),isPropertyDirty:ly,isContextDirty:cy,resetChangedProperties:uy,deleteRecordedChange:ny,isComplexObjectMerged:sy,resetComplexObjectDirtyStatus:ry};const gy=new class{getCoreheaders(e){const t=`${Fs.APP.APP}${js.FORWARD_SLASH_STRING}${js.PRIMARY}`,n=xy(t),s=Ly(n),r=cS.getProperty(js.COREHEADERS,"",s);if(r&&e in r)return r[e]}},hy={defaultLimit:16},fy={SINGLE:"single",MULTIPLE:"multiple"},my={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},Iy=()=>kC()?.getState()?.containers;function Ey(e){return"string"==typeof e&&""!==e.trim()}const yy=e=>Ey(e)?kC()?.getState().containers[e]:null,Ay=(e,t,n)=>{if(!n)return{continueExecution:!1,containerItemID:e};const s=yy(n);let r=!1,a=e;return s?.accessedOrder.forEach((e=>{t===s.items[e].key&&(r=!0,a=s.items[e].context)})),{continueExecution:r,containerItemID:a}},Cy=(e,t)=>{if(!Ey(e)||!Ey(t))return null;const n=Iy(),s=n?.[e];return s&&s.items&&s.items[t]||null},Sy=e=>Ey(e)?kC()?.getState().containers[e]?.items:null,_y=e=>Ey(e)&&kC()?.getState().containers[e]?.accessedOrder||[],Ny=e=>Ey(e)&&_y(e)?.length>0||!1,Ty=(e,t,n)=>{if(!Ey(e)||!Ey(t))return!1;const s=Iy(),r=s?.[e],a=r&&r.items||null,o=n||((e,t)=>e===t);if(t&&a)for(const e of Object.keys(a))if(o(t,a[e].key))return!0;return!1},Dy=e=>{const{containers:t}=kC()?.getState()||{};return!(!t||!Ey(e))&&Object.keys(t).some((n=>t[n]?.accessedOrder?.includes(e)))},Py=(e,t,n)=>{if(!Ey(e)||!Ey(t))return null;const s=Iy(),r=s?.[e],a=r&&r.items||null,o=n||((e,t)=>e?.toLowerCase()===t?.toLowerCase());if(t&&a)for(const e of Object.keys(a))if(o(t,a[e].key))return e;return null},Oy=(e,t)=>{if(e&&t)for(const r of Object.keys(t))if(n=e,s=t[r].key,n?.toLowerCase()===s?.toLowerCase())return t[r];var n,s;return null},Ry=e=>{if(!Ey(e))return null;const t=Iy()??{};for(const n of Object.keys(t))if(t[n]){const s=t[n].items??null,r=Oy(e,s);if(r)return r}return null},by=(e,t)=>{if(!Ey(e)||!Ey(t))return!1;const n=Iy();return n&&Object.hasOwn(n,`${e}/${t}`)},vy=(e,t)=>{if(!Ey(e)||!Ey(t))return null;const n=Iy(),s=n?.[`${e}/${t}`];return s&&s.type},xy=e=>{if(!Ey(e))return null;let t=null;const n=Iy();if(n&&n[e]){const s=n[e],{accessedOrder:r}=s;t=r&&r.length>0?r[r.length-1]:null}return t},wy=(e,t,n)=>{if(!Ey(e)||!Ey(t))return!1;const s=Py(e,t,n);return!!s&&s===xy(e)},My=(e,t)=>{let n=null;const s=Iy();if(!s)return null;for(const r of Object.keys(s))if(s[r].items){const a=s[r].items[e];if(n=a?a[t]:null,n)break}return n},Ly=e=>Ey(e)?My(e,"context"):null,Uy=e=>{if(!Ey(e))return null;let t=null;const n=Iy();if(n&&n[e]){const s=n[e],{accessedOrder:r}=s,a=r&&r.length>0?r[r.length-1]:null;t=Ly(a)}return t},Fy=e=>{if(!Ey(e))return[];const t=e.endsWith("/")?e:`${e}/`;let n=[],s=!1;const r=Iy();if(!r)return[];const a=n=>{const r=[];return Object.keys(n).forEach((n=>{n.startsWith(t)&&n!==t&&r.push(n),n===e&&(s=!0)})),r};for(const e of Object.keys(r))if(r[e].items){const t=a(r[e].items);t&&t.length>0&&(n=n.concat(t)),n=n.sort()}return s?n:[]},jy=e=>{if(!Ey(e))return[];const t=[],n=Iy();if(!n)return[];const s=`${e}${js.FORWARD_SLASH_STRING}`;for(const e of Object.keys(n))e.startsWith(s)&&t.push(e);return t},Vy=e=>{if(!Ey(e))return[];const t=[],n=Iy();if(!n)return[];const s=`${e}${js.FORWARD_SLASH_STRING}`;for(const r of Object.keys(n))if(r.startsWith(s)){(_y(r)||[]).forEach((n=>{Ly(n)!==e&&t.push(Ly(n))}))}return t},ky=e=>{const t=[...Vy(e),e],n=[],s=kC()?.getState().data||{};return t.forEach((e=>{Object.hasOwn(s,`${e}/${js.SUGGESTION}`)&&n.push(`${e}/${js.SUGGESTION}`)})),n},By=e=>Ey(e)?e&&yy(e)&&yy(e).type===fy.SINGLE:null,$y=e=>Ey(e)?e&&yy(e)&&yy(e).type===fy.MULTIPLE:null,Gy=e=>Ey(e)&&yy(e)&&yy(e).items&&Object.keys(yy(e)?.items).length>0||!1,Wy=e=>e&&hy[e]?hy[e]:hy.defaultLimit,Hy=(e,t=hy.defaultLimit)=>{Ey(e)&&(hy[e]=t)},qy=e=>{if(!Ey(e))return!1;let t=!1;const n=yy(e),{items:s={}}=n,r=Object.keys(s),a=Wy(e);return r&&r.length>0&&r.length>=a&&(t=!0),t},zy=e=>{if(!e||!Ey(e.name)||!Ey(e.context))return null;const t=e?.name,n=yy(`${e?.context}/${t}`),s=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map((e=>n?.items[`${e}`]?.context))||[],r=jy(`${js.APP.APP}/${js.PREVIEW}`),a=Vy(`${js.APP.APP}/${js.PREVIEW}`);return{context:e?.context,name:t,containerItems:[...s,...a],childContainers:r}},Yy=e=>{if(!Ey(e))return!1;const t=Ly(e);return cy(t)||fI(e)},Ky=e=>{if(!Ey(e))return null;let t;const n=yy(e),{accessedOrder:s=[]}=n;for(let e=0;e<s.length;e+=1){const n=s[e];if(!Yy(n)){t=n;break}}return t},Qy=e=>{if(!Ey(e))return null;const{containers:t}=kC()?.getState()||{};if(t)for(const n of Object.keys(t))if(t[n]?.accessedOrder?.includes(e))return n;const n=e.lastIndexOf(js.UNDERSCORE_STRING);return e.slice(0,n)},Jy=async(e,t={})=>{if(!Ey(e))return Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));const n=Qy(e),s=Ly(e),{skipDirtyCheck:r}=t;let a=!0,o=[];if(Yy(e)&&!r&&(Tg.disableLoadingIndicator({context:s}),a=await Zm.confirm(xA().getLocaleValue(ZE,"Messages")),Tg.enableLoadingIndicator({context:s})),a){const{accessedOrder:r=[],items:a={},type:i}=yy(n);o=r.filter((t=>t!==e));const c=o[o.length-1],l=a[c]||{},{semanticURL:u=js.FORWARD_SLASH_STRING,context:d}=l;o.length>0&&u&&u!==js.FORWARD_SLASH_STRING?f_({directUrlUpdation:!0,semanticURL:u,options:{containerItemID:c,context:d}}):f_({directUrlUpdation:!0,semanticURL:js.FORWARD_SLASH_STRING,options:{}});BC(LS({containerItemID:e,context:s,target:n,containerInfo:{newAccessedOrder:o,containerType:i},...void 0!==t.eventName?{eventName:t.eventName}:{}}))}return{newAccessedOrder:o,removeItem:a}},Xy=(e,t,n,s)=>{const r="root",a=Hs(t,r,!0),o=Va(t,r),i={data:n,context:s?"app":a},c=[_S({root:e,containerItemID:a,context:s?"app":a,target:o,containerName:t})];c.push(fS(i)),BC(c)},Zy=(e,t,n)=>{let s=_y(e);s=s.filter((e=>e!==t));let r=!1;for(let e=0;e<s.length;e+=1){if(Ly(s[e])===n){r=!0;break}}return r},eA=e=>{if(!Ey(e))return!1;const t=Iy(),n=Ly(e),s=t?Object.keys(t):[];let r=!1;for(let t=0;t<s.length&&(r=Zy(s[t],e,n),!r);t+=1);return r},tA=e=>{Array.isArray(e)||(e=[e]);const t=Iy()||{};return e.map((e=>{const n=Qy(e);return rS.getIn(t,[n,"items",e,"transientItems"])||[]})).flat()},nA=e=>{const{transientItemID:t,data:n,options:s}=e,r=rS.deepClone(kC()?.getState().data[t]);s?.reset&&rS.iterateLeafNodes(r,(e=>{"classID"!==e[e.length-1]&&rS.setIn(r,e,"")})),BC(TS({transientItemID:t,data:rS.mergeDeep(n,r)}))},sA=e=>{const{transientItemID:t,data:n}=e;BC(PS({transientItemID:t,data:n}))},rA=e=>{const t=rS.deepClone(kC()?.getState().data[e]);rS.iterateLeafNodes(t,(e=>{"classID"!==e[e.length-1]&&rS.setIn(t,e,"")})),BC(DS({transientItemID:e,data:t}))},aA=e=>{const t=rS.deepClone(kC()?.getState().data[e]);rS.iterateLeafNodes(t,(e=>rS.setIn(t,e,""))),BC(OS({transientItemID:e,data:t}))},oA=e=>{kC()?.getState().data[e]&&aA(e);const t=e.lastIndexOf("/"),n=t>0?e.substring(0,t):e,s=Qy(n);BC(FS({transientItemID:e,containerItemID:n,target:s}))};class iA{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 cA=(e,t={})=>{if(!Ey(e))return;const n=yy(e),s=Array.isArray(n?.accessedOrder)?n.accessedOrder:[];if(0===s.length)return;const{remove:r,keep:a}=t;let o;if(void 0!==a){const e=new Set(a);o=s.filter((t=>!e.has(t)))}else if(void 0!==r){const e=new Set(r);o=s.filter((t=>e.has(t)))}else o=[...s];for(const t of o){const n=Ly(t),s=tA(t);BC(LS({containerItemID:t,context:n,target:e,...s.length>0&&{transientItems:s}}))}},lA=()=>iA,uA=e=>{const t={containerName:e};t.childContainers=jy(e),BC({type:$r,payload:t})},dA=(e,t)=>{const n=Fy(e),{key:s}=Cy(Qy(e),e),r=[];n.forEach((e=>{const{key:n}=Cy(Qy(e),e);if(n===s){const n={data:{caseInfo:{headers:{etag:t}}},target:Qy(e),context:e};r.push({type:Cr,payload:n})}})),r.length&&BC(r)},pA=(e,t)=>{const n=[],s={data:{caseInfo:{headers:{etag:t}}},target:Qy(e),context:e};n.push({type:Cr,payload:s}),n.length&&BC(n)},gA=()=>PA.isPortalLoaded?"app":"root",hA=()=>gy,fA=(e,t)=>{const n={data:{caseInfo:{lastUpdateTime:t}},target:Qy(e),context:e};BC({type:Cr,payload:n})},mA=(e,t)=>{const n=Py(e,t),s=Py(`${n}/workarea`,t);return Ly(s)},IA=e=>Ey(e)?My(e,"parentContext"):null,EA=e=>{const{accessedOrder:t}=e;return t&&t.length>0?t[t.length-1]:""},yA=e=>{if(e&&"string"==typeof e){const t=e.split("/");return t.pop(),t.join("/")}return null},AA=()=>Kg,CA=()=>"undefined"==typeof window?"":Th(window.location.pathname),SA=()=>"undefined"==typeof window?"":Th(window.location.pathname+window.location.search),_A=(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 NA=new class{staticRoutesList=[];constructor(){this.staticRoutesList=[],this.dynamicRoutesList=[],this.reqContextName="",this.defaultViewUrlPath="",this.staticRoutePage="",this.defaultClassName="",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.defaultClassName="",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};setStaticRoutePage=e=>{this.staticRoutePage=e};getStaticRoutePage=()=>this.staticRoutePage||"";setDefaultClassName=e=>{this.defaultClassName=e};_createStaticDynamicRoutesList=e=>{Object.keys(e).forEach((t=>{Nh(t)?this.dynamicRoutesList?.push(t):this.staticRoutesList?.push({[t]:e[t]})}))};_getDynamicKeyName=e=>{const t=e.indexOf("{")+1,n=e.lastIndexOf("}");return e.slice(t,n)};isDefaultPortal=()=>"false"!=`${this.bDefaultPortal}`;getPortalName=()=>this.portalName;getApplicationPath=()=>Th(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>Th(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,"")).startsWith("/")&&vh()&&"PREVIEW"!==PA.getRenderingMode()&&this.setDefaultClassName(""),Th(e)};stripIgnoredParams(e){return this.ignoreFromEndPoint?.forEach((t=>{e.includes(t)&&(e=e.substring(0,e.indexOf(t)))})),e}getRouteDetails=(e,t)=>{if(!t)return this.appRoutes[e];let n="",s={caseClassName:"",caseID:"",RemoteSystemID:void 0,page:""};return Object.keys(this.appRoutes||{}).forEach((t=>{const r=this.appRoutes[t];r&&r.payload&&r.payload.page===e&&(n=r.routeKey,s={...r.payload})})),!n&&this.appRoutes&&this.appRoutes[e]&&(n=this.appRoutes[e].routeKey,s={...this.appRoutes[e].payload}),{routeKey:n,payload:s}};transformRemoteCasePayload(e){const{caseClassName:t,caseID:n}=e;if(!Bs.isRemoteCase(t))return e;const{RemoteClassGroup:s,RemoteSystemID:r}=Bs.getRemoteCase(t??"");return{...e,caseID:n?.replace(t??"",s?.toUpperCase()),RemoteSystemID:r}}getEndPointInfo=e=>{e=this.stripIgnoredParams(e);const t=vh();let n=this.processUrl(e,!0),s=this._getMatchedRouteInRoutingTable(n,t?this.defaultClassName:void 0);s||(n=this.processUrl(this.defaultViewUrlPath,!t),s=this._getMatchedRouteInRoutingTable(n,t?this.defaultClassName:void 0)||"");const{routeKey:r,payload:a}=this.getRouteDetails(s,t);if(!this.appRoutesMeta?.[r]?.restApi)return null;const{reqType:o,endPoint:i,params:c}=this.appRoutesMeta[r].restApi,l={routeKey:r,requestType:o,routeEndpoint:i,payload:{...c,...this.transformRemoteCasePayload(a)}};return this._resolveRoute(l,this.processUrl(e,!1),s)};getSemanticURL(e,t,n){return this.buildSemanticURL(e,t,n)}getResolvedSemanticURL(e,t,n={},s){const r=this.getSemanticURL(e,t,n);let a=r;if(Nh(r)){const e=r.match(_h);e?.forEach((e=>{const t=this._getDynamicKeyName(e);n[t]&&(a=a.replace(e,String(n[t])))}))}const o=h_(a,s),i=new URL(o);return this.isDefaultPortal()||!this.getPortalName()||i.searchParams.toString().includes("portal=")||i.searchParams.append("portal",this.getPortalName()),s&&!i.searchParams.has("lang")&&i.searchParams.append("lang",s),Ph(i.toString())}buildDocumentTitle(e,t,n){const s=n??"";return PA.getCaseLabelFirstInTitle()?e&&t?`${e} (${t}) - ${s}`:s:e&&t?`${t}: ${e} - ${s}`:s}updateSemanticURLAndDocumentTitle(e,t){const{key:n,actionName:s,caseClassName:r,isRemoteCase:a,name:o}=e;if(a&&!r)return;const i=this.getSemanticURL(s,{caseClassName:r}).replace(/{.+?}/,String(xm(n))),c=`${Fs.APP.APP}${js.FORWARD_SLASH_STRING}${Fs.PRIMARY}`,l={semanticURL:i,directUrlUpdation:!0,options:{acName:c,context:Uy(c)}},u=CA();i&&!u.includes(i)&&g_(l,t);const d=n.substring(n.lastIndexOf(" ")+1),p=PA.environmentInfoObject?.pxApplication?.pyLabel,g=this.buildDocumentTitle(o,d,p);__(g)}buildSemanticURL(e,t,n){const{urlPattern:s}=this.appRoutesMeta?.[e]||{},r=s?.split("/").length,a=s?.split("/");this.setDefaultClassName(t?.pageClass||this.defaultClassName);const o=Object.keys(this.appRoutes).filter((e=>r===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 s=this.appRoutes[e].payload,r={...n};delete r.dataViewName,delete r.dataContext;const a=s.dataViewKeys||s.dataContextParameters||{},o=Object.keys(t).every((e=>t[e]===s[e]));return!!o&&(rS.isEmpty(a)||rS.isEmpty(r)?o:Object.keys(r).every((e=>Object.hasOwn(a,e))))}));return i?this._getQueryParamsResolvedURL(i,n):o.includes("cases/{id}")&&n?.id?"cases/{id}":""}_getQueryParamsResolvedURL(e,t,n=!1){const[s,r]=e.includes("?")?e.split("?"):[e];if(r&&t&&Object.keys(t).length>0){const e={};for(const[n,s]of Object.entries(t))e[n.toLowerCase()]=s;const a=new URLSearchParams(r),o={};for(const[s,r]of a.entries())if("string"==typeof r&&Nh(r)){const a=this._getDynamicKeyName(r),i=a.toLowerCase(),c=n?e:t,l=n?t[a]??c[i]:c[a];null!=l&&(o[s]=l)}else"string"==typeof r&&(o[s]=r);const i=new URLSearchParams(Object.entries(o).map((([e,t])=>[e,String(t??"")])));return`${s}?${Ph(i.toString())}`}return s}_getQueryParamsObject(e){const t={};if(!e)return t;for(const n of e.split("&")){const e=n.indexOf("=");if(-1!==e){const s=n.slice(0,e),r=n.slice(e+1);try{t[decodeURIComponent(s)]=decodeURIComponent(r)}catch{t[s]=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:s}=this.appRoutesMeta[e].restApi;let{endPoint:r}=this.appRoutesMeta[e].restApi;t?.params&&t.params.pageName&&(r=`${r}&pageName=${t.params.pageName}`);const a=r.match(_h);if(a)for(let e=0;e<a.length;e+=1){const n=a[e].replace("{","").replace("}",""),s=new RegExp(a[e],"g");r=r.replace(s,t?.[n])}if(s){let e={};return Object.keys(s).forEach((n=>{if(t&&this._isSpecialInstruction(n)){const r=s[n];Array.isArray(r)&&r.every((e=>"string"==typeof e))&&(e={...e,...this._processInstruction(n,r,t)})}})),{restApi:r,reqType:n,body:e}}return{restApi:r,reqType:n}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,t,n){const s={};return"@COPY"===e&&t.forEach((e=>{s[e]=n?.[e]})),s}doesRestApiExist(e){return!(!this.appRoutesMeta||!this.appRoutesMeta[e])}_resolveMatchedRouteQueryParams=(e,t,n,s)=>{if(!e)return;const r=t.indexOf("?"),a=-1!==r?t.substring(r+1):void 0;if(a){const e=`${n.join("/")}?${a}`;return this._getQueryParamsResolvedURL(e,s,!0)}};_resolveRoute=(e,t,n)=>{const s=[],[r,a]=t.includes("?")?t.split("?"):[t],[o,i]=n.includes("?")?n.split("?"):[n],c=r.split("/"),l=o.split("/"),u={};for(let e=0;e<l.length;e+=1)if(s[e]=l[e],Nh(l[e])){u[this._getDynamicKeyName(l[e])]=c[e],s[e]=c[e]}const d=this._getQueryParamsObject(i),p=this._getQueryParamsObject(a),g={};for(const[e,t]of Object.entries(p))g[e.toLowerCase()]=t;for(const e of Object.keys(d))Nh(d[e])?u[e]=p[e]||g[e.toLowerCase()]:u[e]=d[e];const h=this._resolveMatchedRouteQueryParams(a,n,s,p),f=this._resolvePayload(e,u,n);return{...this._resolveRouteEndPoint(f,n),urlPath:h||s.join("/")}};_resolveRouteEndPoint=(e,t)=>{let{routeEndpoint:n}=e;if(!Nh(n))return e;const s={};if(s[t]=e,void 0!==e.payload){const t=n.match(_h);for(let r=0;r<t.length;r+=1){const a=t[r],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`,s)}}else this._sendWarningAndErrorMessages("Unable to resolve dynamic token(s) in routeEndpoint- payload is missing in routing table for-",s);return{...e,routeEndpoint:n}};_resolvePayload=(e,t,n)=>{if(void 0===e.payload)return e;const s={...e.payload,...this._resolvePayloadRecursive(e.payload,t)};return{...e,payload:s}};_resolvePayloadRecursive(e,t){if(Array.isArray(e))return e.map((e=>this._resolvePayloadRecursive(e,t))).flat();const n={};for(const s of Object.keys(e)){let r=e[s];if("string"==typeof r&&Nh(r)){const e=r.match(_h)??[];for(const n of e){const e=this._getDynamicKeyName(n);void 0!==t[e]?r=r.replace(n,t[e]):this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${e}} in payload - {${e}} is missing in semantic url construct`)}n[s]=r}else n[s]=r&&"object"==typeof r?this._resolvePayloadRecursive(r,t):r}return n}_getMatchedRouteInRoutingTable=(e,t)=>{const[n]=e.includes("?")?e.split("?"):[e];let s=this._findMatchedRouteInStaticList(n,t);return void 0!==s?s:(s=this._findMatchedRouteInDynamicList(e),void 0!==s?s:void 0)};_findMatchedRouteInStaticList=(e,t)=>{if(!this.staticRoutesList||!e)return;const n=e.toLowerCase(),s=t?.toLowerCase();if(vh()){const e=this._findMatchingRouteByClass(n,s);if(!e)return;const t=Object.values(e)[0],r=t?.payload?.page||"";return this.setStaticRoutePage(r),Object.keys(e)[0]}return this._findInStaticList(n)};_findMatchingRouteByClass=(e,t)=>{if(this.staticRoutesList)return this.staticRoutesList.find((n=>Object.entries(n).some((([n,s])=>{if(!s)return!1;const r=s.payload?.page?.toLowerCase(),a=s.payload?.pageClass?.toLowerCase(),o=r===e||n.toLowerCase()===e;return t?o&&a===t:o}))))};_findInStaticList=e=>{if(!this.staticRoutesList)return;const t=this.staticRoutesList.find((t=>Object.keys(t)[0].toLowerCase()===e));return t?Object.keys(t)[0]:void 0};_findMatchedRouteInDynamicList=e=>{const[t,n]=e.includes("?")?e.split("?"):[e],s=t.split("/");return this.dynamicRoutesList?.find((e=>{const[t,r]=e.includes("?")?e.split("?"):[e],a=t.split("/");if(a.length!==s.length)return!1;let o=0;for(o=0;o<a.length;o+=1){const e=a[o].toLowerCase();if(!Nh(e)&&e!==s[o]&&Dh(e)!==s[o])return!1}if(r){const e=new URLSearchParams(n.toLowerCase()),t=new URLSearchParams(r.toLowerCase()),s=new Set,a=new Set,o=/\{[a-zA-Z]+\}/;for(const t of e.keys())s.add(t);for(const e of t.keys())a.add(e);if(a.size!==s.size)return!1;for(const n of s){if(!a.has(n))return!1;const s=t.get(n);if(e.get(n)!==s&&!o.test(s??""))return!1}}return!0}))};_sendWarningAndErrorMessages=(e,t)=>{_A(e,t,"warning"),_A("Error in Generated Routing Table",null,"error"),_A("Back | Forward for this page may NOT work as intended",null,"warning"),_A("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},TA=NA;const DA=new class{constructor(){this.languagePacks=[]}getLocalizationBundles(e=PA.getLocale()){return(this.languagePacks.find((t=>t.pyLangCode===e))?.pyBundles??this.languagePacks.find((e=>e.pyLangCode===js.DEFAULT.toUpperCase()))?.pyBundles??[]).sort(((e,t)=>e.pyOrder-t.pyOrder))}async loadLocaleBundle(e){const t=e.map((e=>af.getPageDataAsync("D_pzBundlesForLocalization","",{locale:e,onlyApp:"false"},{invalidateCache:!0}))),n=(await Promise.allSettled(t)).filter((e=>"fulfilled"===e.status)).flatMap((e=>e.value.pyLanguagePacks));this.setLanguagePack(n)}setLanguagePack(e){e.forEach((e=>{const t=this.languagePacks.findIndex((t=>t.pyLangCode===e.pyLangCode));-1!==t?this.languagePacks[t]=e:this.languagePacks.push(e)}))}};const PA=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.isExtraCallRequiredForDefaultHome="false",this.enablePriorityAndUrgencyImprovements=!1}setEnvironmentInfo(e){const t=e?.pxOperator?.pyUserName,n=t?rS.decodeHtmlEntities(t):void 0,s={...e,pxOperator:e.pxOperator?{...e.pxOperator,...n?{pyUserName:n}:{}}:e.pxOperator};this.environmentInfoObject=s;const r=this.environmentInfoObject?.features||rS.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...r,granularUIRefresh:r.granularUIRefresh||r.pyEnableGranularUIRefresh||!1},this.environmentInfoObject.pyGenAIEnabled=!!this.environmentInfoObject.pyGenAIEnabled,Ls.setNamespaceSupport(this.getFeatureMap()?.isNamespaceEnabled);const a=e.requestContext;if(Array.isArray(a)&&a.length>0){const e=a.filter((e=>e.IncludeInURL)).map((e=>e.Key));e.length>0&&N_(e)}DA.setLanguagePack(this.environmentInfoObject.pyLanguagePacks||[])}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 TA.getPortalName()}setCaseLabelFirstInTitle(e=!0){this.caseLabelFirstInTitle=e}getCaseLabelFirstInTitle(){return this.caseLabelFirstInTitle}getApplicationName(){return this.environmentInfoObject?.pxApplication?.pyRuleName}getUseLocale(){return this.environmentInfoObject?.pxLocale?.pyUseLocale}getAccessGroup(){return this.environmentInfoObject?.pxOperator?.pyAccessGroup}getApplicationID(){return this.environmentInfoObject?.pxApplication?.pyRuleId}getTimeZone(){return this.environmentInfoObject?.pxLocale?.pyTimeZone?.trim()||void 0}getTheme(e){return"dark"===e?.type?this.darkThemeOverrides:this.themeOverrides}setTheme(e,t){return"dark"===t?.type?this.darkThemeOverrides=e:this.themeOverrides=e,fd.publish(js.PUB_SUB_EVENTS.UI_EVENTS.THEME_CHANGE,e),"dark"===t?.type?this.darkThemeOverrides:this.themeOverrides}getNavOrientation(){return this.navOrientation??this.environmentInfoObject?.pyNavOrientation}setNavOrientation(e){return this.navOrientation=e,fd.publish(js.PUB_SUB_EVENTS.UI_EVENTS.NAV_ORIENTATION_CHANGE,e),this.navOrientation}setIsWebEmbed(e){return this.isWebEmbed=e,this.isWebEmbed}isWSSPortal(){return this.environmentInfoObject?.pyPortalTemplate===js.PORTAL_TYPE.WSS}isDefaultWSSPortal(){return this.isWSSPortal()&&!this.environmentInfoObject?.pyFullObjectDisplayTemplate}isInfinityRuntime(){return"Infinity"===this.environmentInfoObject?.pyExecutionRuntimeName}isGenAIEnabled(){return!!this.environmentInfoObject?.pyGenAIEnabled}getRewriteGenAIDP(){return this.environmentInfoObject?.pyRewriteGenAIDP}isBlueprintExperience(){return!!this.environmentInfoObject?.features?.fromBlueprintExperience}getBrandingInfo(e){return"dark"===e?.type?this.brandingInfoDark:this.brandingInfo}setBrandingInfo(e,t){return"dark"===t?.type?this.brandingInfoDark=e: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(js.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}isPegaMobile(){return!!window.pms?.plugins?.c11n_spa||!!window.pms?.plugins?.c11n}isOfflineEnabled(){return"undefined"!=typeof navigator&&(navigator.userAgent||"").includes("pxUsesOffline")}shouldUseURLParams(){return"FULL_PORTAL"===this.environmentInfoObject?.renderingMode&&this.getFeatureMap()?.pyUseURLParams}getBuiltOnAppNames(){return this.environmentInfoObject?.pxApplication?.pyBuiltOnApplications}setPreviewMode(){Id.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)}isOptimizedCaseLoadingEnabled(){return this.getFeatureMap().pyEnableOptimizedCaseLoading||this.getFeatureMap().optimizedCaseLoading||!1}isOpenCasePageAfterCreateInMultiDocEnabled(){return this.getFeatureMap().pyOpenCasePageAfterCreateInMultiDoc??!0}getCaseTypeList(){return this.environmentInfoObject&&this.environmentInfoObject?.pyCaseTypeList||[]}getClassesAccessList(){return this.environmentInfoObject?.pyClassesAccessList?.pxResults??[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}getLocalizationVersion(){const e=this.getFeatureMap().pyLocalizationVersion,t=this.getFeatureMap().localizationVersion;return void 0!==t?t:void 0!==e?parseInt(e,10):1}getLocalizationBundles(e=this.locale){return DA.getLocalizationBundles(e)}getAvailableLocalePacks(){return this.getFeatureMap()?.availableLanguagePacks||void 0}getIsExtraCallRequiredForDefaultHome(){return this.isExtraCallRequiredForDefaultHome}setIsExtraCallRequiredForDefaultHome(e){this.isExtraCallRequiredForDefaultHome=e}getEnablePriorityAndUrgencyImprovements(){return this.enablePriorityAndUrgencyImprovements}setEnablePriorityAndUrgencyImprovements(e){this.enablePriorityAndUrgencyImprovements=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"}getInlineEditActions(e){return this.environmentInfoObject?.pyInlineEditActions?.filter((t=>t.pyClassName===e)).map((e=>e.pyActionName))??[]}getInlineEditActionViews(e){return this.environmentInfoObject?.pyInlineEditActions?.filter((t=>t.pyClassName===e)).map((e=>e.pyViewName))??[]}getFullObjectDisplayTemplate(){return this.environmentInfoObject?.pyFullObjectDisplayTemplate??void 0}setFullObjectDisplayTemplate(e){this.environmentInfoObject&&(this.environmentInfoObject.pyFullObjectDisplayTemplate=e),fd.publish(js.PUB_SUB_EVENTS.UI_EVENTS.CASE_VIEW_TEMPLATE_CHANGE,e)}getMultiStepNavDisplay(){return this.environmentInfoObject?.pyMultiStepNavDisplay??void 0}setMultiStepNavDisplay(e){this.environmentInfoObject&&(this.environmentInfoObject.pyMultiStepNavDisplay=e),fd.publish(js.PUB_SUB_EVENTS.UI_EVENTS.MULTI_STEP_NAV_DISPLAY_CHANGE,e)}getCaseStageDisplay(){return this.environmentInfoObject?.pyCaseStageDisplay??void 0}setCaseStageDisplay(e){this.environmentInfoObject&&(this.environmentInfoObject.pyCaseStageDisplay=e),fd.publish(js.PUB_SUB_EVENTS.UI_EVENTS.CASE_STAGE_DISPLAY_CHANGE,e)}},OA=e=>"fulfilled"===e.status,RA=async(e=PA.getLocale())=>{try{await(async e=>{const t=PA.getAvailableLocalePacks(),n=PA.getLocalizationBundles(e);let s;if(e&&t&&t.includes(e)?s=[tg("getLocalizationPack",{queryPayload:{locale:e}})]:n.length>0&&(s=n.map((e=>tg("getLocalizationPack",{queryPayload:{version:e.pyBundleVersion,bundle:e.pyBundleName}})))),!s||0===s.length)return;const r=200,a=201,o=await Promise.allSettled(s),i=iC(e??"en-US");o.filter(OA).forEach((({value:e})=>{if([r,a].includes(e.status)&&e.data){const t=e.data;Object.keys(t).forEach((e=>{i.setLocaleForRule(t[e],e)}))}}))})(e)}catch(e){console.warn(e)}};const bA=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 s=e.indexOf("{@P ",t);if(-1===s){n+=e.substring(t,e.length);break}n+=e.substring(t,s);const r=e.indexOf("}",t),a=e.substring(s,r+1),[o,i]=this.getKeyAndValue(a);this.addKeyToMap(o,i),n+=`${a.split(":")[0]}}`,t=r+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 s=e.indexOf("{@P ",t);if(-1===s){n+=e.substring(t,e.length);break}n+=e.substring(t,s);const r=e.indexOf("}",t),a=e.substring(s,r+1);n+=this.keyMap[a],t=r+1}return n}};class vA{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,s=t.toUpperCase();s.startsWith("@BASECLASS!DATAPAGE!")&&s.split(/[!#]/).length<4?Object.entries(n).forEach((([e,t])=>{null!==t&&"object"==typeof t&&"fields"in t&&this.updateLocaleStore(t,`${s}#${e}`.toUpperCase())})):"GENERIC!GENERICFIELDS"===s?Object.entries(n).forEach((([e,t])=>{null!==t&&"object"==typeof t&&this.sanitizeLocaleField(t,e.toUpperCase())})):this.sanitizeLocaleField(n,s)};updateLocaleStore=(e,t)=>{const n=e.fields||e,s=this.localeStore[t];s?rS.mergeDeep(n,s):n&&"object"==typeof n&&(this.localeStore[t]=n)};sanitizeLocaleField=(e,t)=>{["DASHBOARDSMANAGER","DATAEXPLORER","INSIGHT"].includes(t.toUpperCase())&&Object.entries(e).forEach((([,e])=>{null!==e&&"object"==typeof e&&"fields"in e&&this.updateLocaleStore(e,t)})),this.updateLocaleStore(e,t)};getLocaleForRule(e){return this.localeStore[e]}resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,t,n,s){const r=this.#p(n,t),a=this.#g(e);a&&(e=bA.formatLocaleKey(e));const o=r?this.localeStore[r.toUpperCase()]??{}:{},i=s?this.localeStore[s.toUpperCase()]??{}:{};return"MESSAGES"===n?.toUpperCase()&&"string"==typeof e?this.getLocalizedErrorMessage(o,e)||e:a?bA.replaceWithValue(o[e]||i[e]||e):o[e]||i[e]||e}#p(e,t){return e?.toUpperCase().startsWith("@BASECLASS!DATAPAGE!")?t?`${e}#${t}`:e:e||t}getParagraphLocaleValue(e,t){const n=`${e}!${js.PARAGRAPH}!${t}`,s=this.localeStore[n.toUpperCase()];return s?{category:s.category,content:decodeURIComponent(atob(s.content).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join(""))}:null}getPortalLocaleReference(e){return 2!==PA.getLocalizationVersion()?"":e?`PORTAL!${e}`.toUpperCase():`PORTAL!${PA.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e){return e?`CASE!${e}`.toUpperCase():null}getLocalizationVersion(){return 2}async getLocaleJsons(e){if(!await this.isCurrentLocalePackAvailable())return[];const t=PA.getUseLocale(),n=[],s=PCore.getLocaleUtils().localeStore;if((e=(e=e.filter((e=>!s[e]))).map((e=>e.toUpperCase()))).length>0){const s=e.map((e=>({localeRuleKey:e,promise:hg.getSvcLocale(t,`${e}.json`)}))),r=await Promise.allSettled(s.map((e=>e.promise)));await Promise.all(r.map((async(e,t)=>{if("fulfilled"===e.status){const r=s[t];let a;try{a=await e.value.json()}catch{a=null}a&&n.push({localeRuleKey:r.localeRuleKey,jsonData:a})}})))}return n}async loadLocaleResources(e){await DA.loadLocaleBundle(e),await Promise.all(e.map((e=>RA(e))))}setTimezone(e){this.timezone=e}getTimeZoneInUse(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}matchPatternWithText(e,t){let n=t;const s=[];for(let t=0;t<e.length;){const r=e[t];if(0!==r.length){const e=n.indexOf(r);if(-1===e)return null;if(t>0){const t=n.slice(0,e);s.push(t)}n=n.slice(e+r.length)}t+=1}return n&&s.push(n),s}getLocalizedErrorMessage(e,t){let n="";if(e[t])return e[t];for(const s of Object.keys(e)){const r=s.split(/\{\d+\}/),a=this.matchPatternWithText(r,t);if(a){const t=e[s];if(n=this.replacePlaceHolders(a,t),n)return n}}return n}replacePlaceHolders(e,t){for(let n=0;n<e.length;){if(!t.includes(`{${n+1}}`))return"";t=t.replace(`{${n+1}}`,e[n]),n+=1}return t}async isCurrentLocalePackAvailable(){const e=PA.getLocale();return this.availableLangPacks||(this.availableLangPacks=await hg.getSvcAvailableLocales()),e&&this.availableLangPacks.includes(e)}getBaseComponentLabels=()=>this.getLocaleForRule("COSMOSFIELDS");#g(e){let t=!1;return e&&"string"==typeof e&&(t=e.includes("@P ")),t}}const xA=e=>{const t=e??PA.getLocale()??"en-US";return iC(t)};So.registerHandler("@L",((e,t)=>t?t.getLocalizationService(t.getLocaleRuleName()).getLocalizedText(e):e)),So.registerHandler("@P",((e,t,n)=>n?cS.getLitePropertyValue(n):t.getValue(e))),So.registerHandler("@E",((e,t,n)=>{try{const s=co(e),r=lo(s);return uo(r,t,n)}catch(e){}return!0})),So.registerHandler("@W",((e,t,n)=>{let s;if(n){const{pageReference:t,context:r}=n;s=qC(t,`.${js.SUMMARY_OF_WHEN_CONDITIONS}.${e}`,r)}else s=t.getContextDataValue(`.${js.SUMMARY_OF_WHEN_CONDITIONS}.${e}`);return!0===s||"true"===s})),So.registerHandler("@ASSOCIATED",((e,t)=>{let n={};const s=[];let r="",a="";const o=t.getPageReference();if(e.startsWith(".")){r=`${o}.${e.substring(1)}`;const s=e.split(".").filter((e=>!!e));s.length>1&&(s.pop(),a=s.join(".")),n=t.getFieldMetadata(e.substring(1))}else n=t.getFieldMetadata(e),r=e;const i=n?.datasource?.tableType,c=n?.datasource?.mode===js.READONLY,l=n?.datasource?.name||"",u=t.getComponentConfig();if(u&&u.deferDatasource&&("object"==typeof u.datasourceMetadata&&null!==u.datasourceMetadata||(u.datasourceMetadata=`@FIELD_META ${e}`,t.setStateProps({datasourceMetadata:u.datasourceMetadata})),i===js.DATA_PAGE))return null;if(i===js.DECISION||i===js.RULE_REFERENCE)return function(e,t){const n=No.getPropertyName(e?.propertyForDisplayText??""),s=No.getPropertyName(e?.propertyForValue??""),r=t.getContextDataValue(`.${js.SUMMARY_OF_EXPRESSIONS}.${e?.name}`)||[];return r?.map((e=>({key:e[s]||e[`.${s}`],value:e[n]||e[`.${n}`]})))}(n?.datasource,t);if(i!==js.DATA_PAGE){const e=t.getLocalizationService(n?.localeReference);return n?.datasource?.records?.map((t=>({key:t.key,value:e.getLocalizedText(t.value)})))}const d=No.getPropertyName(n?.datasource?.propertyForDisplayText),p=No.getPropertyName(n?.datasource?.propertyForValue),g=Array.isArray(n?.datasource?.parameters)?n?.datasource?.parameters:[],h=t.getContextName(),f=[];if(g.forEach((e=>{if(No.isProperty(e?.value)){let t=HC(`.${rS.getFullPropertyReference([a,No.getPropertyName(e.value)])}`,o,h);f.push(rS.getFullPropertyReference([o,a,No.getPropertyName(e?.value)])),null!=t&&""!==t||(t=js.NULL_STRING),s.push(t)}else s.push(e?.value||js.NULL_STRING)})),h){const e=Ao.getContextObjectByName(h)||{};f.forEach((t=>{if(t in e){const n=e[t];e[t]=[...new Set([...n,r])]}else e[t]=[r]})),Ao.addContextName(h,e)}const m=function(e,t,n,s){let r="",a=n;if(t.join(js.HASH_DELIMITER)&&(r=rS.getHashedString(t.join(js.HASH_DELIMITER)),a=n+js.UNDERSCORE_STRING+r),s){const e=GC(),t=e?e[n]?.[a]:{};return Array.isArray(t?.[Ls.getDefaultQualifiedName("pxResults")])?t[Ls.getDefaultQualifiedName("pxResults")]:[]}const o=e.getDataObject(),i=o?.[n]||{},c=i?.[a]||{};return Array.isArray(c?.[Ls.getDefaultQualifiedName("pxResults")])?c[Ls.getDefaultQualifiedName("pxResults")]:[]}(t,s,l,c),I=t.getLocalizationService();return m.map((e=>{let t=e[d]||e[`.${d}`];var n;return"string"==typeof t&&(n=t,t=I.getLocalizedDataPage(n,l,d)),{key:e[p]||e[`.${p}`],value:t}}))})),So.registerHandler("@ROUTING_INFO",((e,t)=>ka(t.getContainerName(),t.getContextName()))),So.registerHandler("@ENV",((e,t)=>{switch(e){case js.ENV_INFO_KEYS.APPLICATION_NAME:return PA.getApplicationName();case js.ENV_INFO_KEYS.ACCESS_GROUP:return PA.getAccessGroup();case js.ENV_INFO_KEYS.APPLICATION_ID:return PA.getApplicationID()||PA.getApplicationName();case js.ENV_INFO_KEYS.USER_NAME:return PA.getOperatorName();case js.ENV_INFO_KEYS.USER_ID:return PA.getOperatorIdentifier();case js.ENV_INFO_KEYS.APPLICATION_DESC:return t.getLocalizationService().getLocalizedText(PA.getApplicationLabel()||"");case js.ENV_INFO_KEYS.USER_IMAGE:return PA.getOperatorImageInsKey();case js.ENV_INFO_KEYS.LOCALE:return PA.getUseLocale();case js.ENV_INFO_KEYS.TIMEZONE:return PA.getTimeZone();case js.ENV_INFO_KEYS.WORK_GROUP:return PA.getOperatorWorkGroup();default:return e}})),So.registerHandler("@DATASOURCE",((e,t)=>{const n=t.getSharedDataPageForReferenceList()||t.getValue(e)||[],s=t.getComponentConfig(),r=Object.keys(s).find((t=>s[t]?.source?.includes(e)));if(r){const{fields:e,copyAll:t,filterDownloadedFields:a}=s[r],o=[];return n.forEach((n=>{const s={};t||a?Object.keys(n).forEach((e=>{const t=No.getPropertyName(e);s[t]=n[t]})):Object.keys(e).forEach((t=>{const r=No.getPropertyName(e[t]);s[t]=n[r]})),o.push(s)})),o}return[]})),So.registerHandler("@FIELD_META",((e,t)=>{let n,s={};if(s=e.startsWith(".")?t.getFieldMetadata(e.substring(1)):t.getFieldMetadata(e),s&&s.datasource&&s.datasource.parameters){let r="";const a=e.split(".").filter((e=>!!e));if(a.length>1&&(a.pop(),r=`.${a.join(".")}`),Array.isArray(s.datasource.parameters)){const e=[];s.datasource.parameters.forEach((n=>{const s={},{name:a,value:o}=n;s.name=a,"string"==typeof o&&o.startsWith("@P")?s.value=`@P ${r}${o.substring(3)}`:s.value=o,e.push(t.resolveConfigProps(s))})),n=e}else n=t.resolveConfigProps(s.datasource.parameters);s={...s,datasource:{...s.datasource,parameters:n}}}return s})),So.registerHandler("@USER",((e,t,n)=>{const s=n?cS.getLitePropertyValue(n,e):t.getValue(e),r=n?cS.getReferencedUser(s,n):t.getReferencedUser(s);return{userId:s,userName:r?r.UserName:null}})),So.registerHandler("@ACTIVE_CASES",((e,t)=>Kh.getOpenedCaseItems(`${t.getContextName()}/${t.getContainerName()}`))),So.registerHandler("@LR",(e=>e)),So.registerHandler("@CASE",((e,t)=>e===js.ID?t.getCaseInfo().getKey():e)),So.registerHandler("@SHARED",(e=>Hf.getSharedState(e))),So.registerHandler("@PARAGRAPH",((e,t)=>{const{useDecision:n,isBanner:s,messageType:r,dismissBanner:a}=zf.getParagraphProperties(e,t),o=zf.hasDecisionBannerContent(e,t);return n&&o?zf.processBannerDecisionParagraph(e,t):s?{htmlContent:zf.processParagraph(e,t),messageType:r,dismissBanner:a}:zf.processParagraph(e,t)})),So.registerHandler("@FORMAT",((e,t)=>{const n=t.getCurrentClassID(),s=TC(e,n);if(!s?.dynamicContents?.length)return null;const{dynamicContents:r}=s;for(let e=0;e<r.length-1;e+=1)if(cS.resolveWhen(r[e].when,t))return{pattern:r[e].content};return{pattern:r[r.length-1].content}})),So.registerHandler("@FILTERED_LIST",((e,t)=>{const n=e.substring(1,e.indexOf("[")),s=e.substring(e.indexOf("]")+2),r=e.substring(e.indexOf("[")+1,e.indexOf("]"));if(!t)return null;const{useCustomContext:a}=t;let o;return rS.isEmpty(a)?o=t.getValue(`.${n}`):(o=a,o=rS.getIn(o,n)),o&&s.length>0?(r&&(o=o.filter((e=>po(r,e)))),o.map((e=>rS.getIn(e,s)))):null})),So.registerHandler("@ADDRESS",((e,t)=>{const n=t.getValue(e)?.[Ls.getDefaultQualifiedName("pyCountry")];return n?`${PCore.getDefaultQualifiedName("pyAddressForm")}_${n}`:PCore.getDefaultQualifiedName("pyAddressForm")})),So.registerHandler("@DATATYPE",((e,t)=>t.getValue(e))),So.registerHandler("@ATTACHMENT",((e,t,n)=>{let s;return s=n?cS.getLitePropertyValue(n):t.getValue(e),Bp.prepareAttachmentData(s)}));const wA=e=>{const t=e.lastIndexOf(".");return t<0?e:e.slice(t+1)};function MA(e,t){const n=e.authorContext;if("string"!=typeof n||!n)return!1;return(n.startsWith(".")?n.substring(1):n)===t}function LA(e,t){const n=e.config;if(!n?.name||"string"!=typeof n.name)return null;const s=t(n.name);return s?Array.isArray(s)?s.find((e=>e.classID===n.ruleClass))??null:s:null}function UA(e,t,n,s="root",r=[]){if(e.config&&function(e,t){const n="string"!=typeof(s=e.value)?null:s.startsWith("@")?s.replace(/^@\w+\s+\./,""):null;var s;return!!n&&n===t}(e.config,t)&&r.push({type:e?.type,config:e.config,path:s}),!e.children)return r;for(let a=0;a<e.children.length;a+=1){const o=e.children[a],i=`${s}.children[${a}]`,c="reference"===o.type?LA(o,n):o;c&&UA(c,t,n,i,r)}return r}So.registerHandler("@FL",((e,t)=>{const n=(e=>e.startsWith(".")?e.slice(1):e)(e),s=t.getFieldMetadata(n);return s&&s.label?t.getLocalizationService(s.localeReference).getLocalizedText(s.label):wA(n)})),So.registerHandler("@DEFERRED",((e,t)=>{const n=t.getFieldMetadata(e);return n?.isDeclarativeTarget?{isDeferred:!0,propertyName:e}:t.getValue(e)})),So.registerHandler("@GENAICOACH",((e,t)=>DC(e,t.getCurrentClassID()))),So.registerHandler("@AIAGENT",((e,t)=>{const n=PC(e,t.getCurrentClassID());if(n)return n;const s=t.getComponentConfig();if(s){const n=s?.coaches?.find((t=>t?.config?.coach?.substring(9)===e&&t?.config?.ruleNamespace))?.config;if(n?.label){const s={label:n.label};t.resolveConfigProps({label:n.label},s);const r=s.label;return{insName:PA.getFeatureMap()?.isNamespaceEnabled&&e.includes(js.DOUBLE_UNDERSCORE_STRING)?e:`${n.ruleNamespace}${js.DOUBLE_UNDERSCORE_STRING}${e}`,label:t.getLocalizedValue(r),type:"agent"}}}return null})),So.registerHandler("@REFRESH",((e,t)=>{const n=t.getCaseInfo().getKey(),s=t.getContextName(),r=t.getPageReference();Cf.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),n,"",r,{autoDetectRefresh:!0,preserveClientChanges:!1,refreshFor:`${r.replace("caseInfo.content","")}${e}`,resetForm:!0}),`${r}${e}`,`${s}/${r}`,s)})),So.registerHandler("@DW",((e,t,n)=>{let s;const r=`${js.CONTEXT_DATA}.${js.SUMMARY_OF_DYNAMIC_WHENS}.${e}`;if(n){const{context:e}=n??{};s=HC(r,null,e)}else s=t.getValue(r);return!0===s||"true"===s})),So.registerHandler("@CA",((e,t,n)=>n?cS.getLitePropertyValue(n):t.getValue(e)));const FA=new Set(["autocomplete","dropdown"]),jA=["displayAs","hideLabel","linkReference","localeReference","matchPosition","referenceType","selectionMode"];function VA(e,t,n){const s=t.config,r=function(e){const t=e.config??{},n={};return jA.forEach((e=>{void 0!==t[e]&&(n[e]=t[e])})),void 0===t.contextClass&&void 0===t.targetObjectClass||(n.contextClass=t.contextClass??t.targetObjectClass),void 0!==t.referenceList&&(n.referenceList=t.referenceList),n.parameters=t.parameters,n}(e),a=function(e){const t=e.inheritedProps;return Array.isArray(t)?t.reduce(((e,t)=>("object"!=typeof t||null===t||Array.isArray(t)||"prop"in t&&"string"==typeof t.prop&&"value"in t&&(e[t.prop]=t.value),e)),{}):{}}(n),o={...s??{},...r,...a};return"AutoComplete"===t.type&&void 0!==r.referenceList&&(o.datasource=r.referenceList),o}function kA(e,t,n,s){try{if(!e.name||"string"!=typeof e.name)return null;const t=s(e.name);let r;if(Array.isArray(t))r=t;else{if(!t)return null;r=[t]}const a=r.find((t=>t.classID===e.ruleClass));if(!a||!function(e){const t=e.config;return!!t&&"DataReference"===t.template&&"string"==typeof t.displayAs&&FA.has(t.displayAs.toLowerCase())}(a))return null;const o=function(e){const t=e?.children;return Array.isArray(t)&&t.length>0?t[0]:null}(a);return o?{type:o.type,config:VA(a,o,e),path:n}:null}catch{return null}}function BA(e,t,n,s="root",r=[]){if(e.config&&MA(e.config,t)){const t=kA(e.config,e.type,s,n);t&&r.push(t)}if(!e.children)return r;for(let a=0;a<e.children.length;a+=1){const o=e.children[a],i=`${s}.children[${a}]`,c="reference"!==o.type||o.config&&MA(o.config,t)?o:LA(o,n);c&&BA(c,t,n,i,r)}return r}function $A(e,t,n){const s=PA.getInlineEditActionViews(t),r=function(e,t){if(!e||"object"!=typeof e)return null;if(Array.isArray(e))return e.find((e=>e.classID===t))??null;return e}(n(s&&s.length>0?s[0]:Ls.getDefaultQualifiedName("pyEdit")),t);if(!r)return[];const a=UA(r,e,n,"root");return a.length>0?a:BA(r,e,n)}const GA={},WA={},HA={};let qA=0,zA=!1;const YA={},KA={},QA={},JA={},XA={},ZA={},eC={},tC={},nC={},sC={},rC={},aC=(e={},t={})=>{0!==Object.keys(t).length?Object.keys(e).forEach((n=>{const s=e[n],r=t[n];r?((e,t,n,s)=>{const r=Array.isArray(n)?n:[n];(Array.isArray(s)?s:[s]).forEach((e=>{const t=r.findIndex((t=>t.classID===e.classID));if(-1===t)r.push(e);else{const n={isDeclarativeTarget:!1},s={...r[t],...n,...e};r[t]=s}})),t[e]=1===r.length?r[0]:r})(n,t,r,s):t[n]=s})):rS.copy(e,t)},oC=(e,t="")=>{if(!e)return null;const n=KA[e];if(!n)return null;if(!t)return rS.deepClone(n);let s;return s=Array.isArray(n)?n.find((e=>e.classID.toLowerCase()===t.toLowerCase()||e.associationClassID?.toLowerCase()===t.toLowerCase()))||null:n.classID.toLowerCase()===t.toLowerCase()||n.associationClassID?.toLowerCase()===t.toLowerCase()||("Page"===n.type||"Page List"===n.type)&&n?.pageClass?.toLowerCase()===t.toLowerCase()?n:null,s?rS.deepClone(s):null},iC=e=>(sC[e]||(sC[e]=new vA),sC[e]),cC=(e,t)=>(rC[e]||(rC[e]=t()),rC[e]),lC=(e,t,n,s=[])=>{if(!t||!e)return null;if(!e.includes(".")){let r;const a=oC(e,t);return s.length&&(r=s.join(".")),{...a,embeddedType:n,category:r}}const[r,...a]=e.split("."),o=oC(r,t);return o&&s.push(o.label),lC(a.join("."),o?.pageClass,o?.type,s)},uC=e=>{0!==Object.keys(e).length&&(aC(e,HA),zA&&(qA+=1))},dC=()=>qA,pC=()=>{zA=!0},gC=()=>{zA=!1},hC=e=>{aC(e,YA)},fC=e=>{(e=>{e.views&&Object.keys(e.views).length>0&&(aC(e.views,HA),zA&&(qA+=1)),e.navigations&&aC(e.navigations,YA),e.personalizations&&aC(e.personalizations,JA),e.insights&&aC(e.insights,XA),e.paragraphs&&aC(e.paragraphs,GA),e.formats&&aC(e.formats,WA),e.dataTypes&&aC(e.dataTypes,ZA),e.datapages&&aC(e.datapages,eC),e.genAICoaches&&aC(e.genAICoaches,tC),e.AIAgents&&aC(e.AIAgents,nC)})(e),(e=>{const t=e.fields||{};Object.keys(t).forEach((n=>{const s=t[n];if(Array.isArray(s)){if(s.forEach((t=>{e.datapages&&t.datasource&&"DataPage"===t.datasource.tableType&&(t.datasource.mode=e.datapages?.[t.datasource.name].mode);const s=tm(Xf,n,t.definedOnClassID??t.classID);t.localeReference=s})),1===s.length){const[e]=s;t[n]=e}}else e.datapages&&s?.datasource&&"DataPage"===s.datasource.tableType&&(s.datasource.mode=e.datapages[s.datasource.name].mode)}))})(e);const{datapages:t={}}=e;Object.keys(t).forEach((e=>{QA[e]=t[e]})),aC(e.fields,KA)},mC=e=>HA[e],IC=(e,t)=>{const n=HA[e];return Array.isArray(n)?n.some((e=>e.classID===t)):n?.classID===t},EC=e=>YA[e],yC=e=>e in QA?QA[e]:null,AC=e=>e in JA?JA[e]:null,CC=e=>e in XA?XA[e]:null,SC=e=>{const t={};return Object.keys(KA).forEach((n=>{const s=KA[n];let r;Array.isArray(s)?r=s.find((t=>e===t.classID)):e===s.classID&&(r=s),r&&(t[n]=rS.deepClone(r))})),t},_C=(e,t)=>{const n=oC(e,t),s=n?.datasource?.parameters;return s?rS.deepClone(s):null},NC=(e,t)=>{let n=null;const s=GA[e];return s&&(Array.isArray(s)?n=s.find((e=>e.classID===t)):s.classID===t&&(n=s)),n?rS.deepClone(n):null},TC=(e,t)=>{let n=null;const s=WA[e];return s&&(Array.isArray(s)?n=s.find((e=>e.classID===t)):s.classID===t&&(n=s)),n?rS.deepClone(n):null},DC=(e,t)=>{let n=null;const s=tC[e];return s&&(Array.isArray(s)?n=s.find((e=>e.classID===t)):s.classID===t&&(n=s)),n?rS.deepClone(n):null},PC=(e,t)=>{let n=null;const s=nC[e];return s&&(Array.isArray(s)?n=s.find((e=>e.classID===t)):s.classID===t&&(n=s)),n?rS.deepClone(n):null},OC=e=>{if(e in ZA){const{savableDataPage:t}=ZA[e];return t}return null},RC=e=>{const t=eC[e];if(!t)return null;const{classID:n,isAlternateKeyStorage:s,parameters:r}=t;if(s)return r.map((e=>({keyName:e.name,isAlternateKeyStorage:s,linkedField:e.linkedField})));const a=ZA[n];return a?a.classKeys.map((e=>({keyName:e,isAlternateKeyStorage:s}))):[]},bC=e=>{if(e in ZA){const{lookupDataPage:t}=ZA[e];return t}return null},vC=e=>{if(Object.hasOwn(ZA,e)){const{lookupDataPageInfo:t}=ZA[e];return t}return null},xC=(e,t)=>{const n=e.split("."),s=n.pop(),r=new Am({options:{pageReference:`${n.join(".")}`,context:t}}),a=oC(s,r.getCurrentClassID())?.additionalInformation;if(!a?.includes("@PARAGRAPH"))return a;const o=No.trimAnnotation(a);return zf.processParagraph(o,r)},wC=(e,t)=>{const n=e.split("."),s=n.pop(),r=new Am({options:{pageReference:`${n.join(".")}`,context:t}}),a=oC(s,r.getCurrentClassID()),o={};return r._classID=r.getCurrentClassID(),r.resolveConfigProps(a,o),o},MC=(e,t)=>$A(e,t,mC);class LC{constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,t,n,s,r,a="singleRecord"){if(!e||!n||!s?.length)return;const o=n.startsWith(".")?`${t}.${n.substring(1)}`:n,i=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(t,n,r);s.forEach((e=>{if(!e)return;let t=e.startsWith(".")?e.substring(1):e;if(t=rS.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,s,r){if(!e||!n||!s?.length)return;const a=n.startsWith(".")?`${t}.${n.substring(1)}`:n,o=this.cascadeResetSubscribers[e]||{},i=this._handlePageReference(t,n,r);s.forEach((e=>{if(e){let t=e.startsWith(".")?e.substring(1):e;if(t=rS.getFullPropertyReference([i,t]),t in o){const e=o[t];rS.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,s,r){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[r]){a[r]=s;const o=HC(n,t,e);a.previousValue="object"==typeof o?null:o}}))}registerListField(e,t,n,s,r){const a=LC._getFieldsForList(e,t,n);a.length>0&&(this.registerFields(e,t,a,s,r),yh.enableCascade(e))}unRegisterListField(e,t,n,s){const r=LC._getFieldsForList(e,t,n);r.length>0&&this.unRegisterFields(e,t,r,s)}static _getFieldsForList(e,t,n){const s=[],r=oC(n,HC("classID",t,e));return r&&!Array.isArray(r)&&r.datasource&&r.datasource.parameters&&Object.values(r.datasource.parameters).forEach((e=>{if(No.isProperty(e)){const t=No.trimAnnotation(e);s.push(t)}})),s}unRegisterFields(e,t,n,s){this.cascadeSubscribers[e]&&n?.forEach((n=>{if(!this.cascadeSubscribers[e][`${t}${n}`])return;const r=this.cascadeSubscribers[e][`${t}${n}`];r[s]&&delete r[s]}))}triggerCascade(e,t,n,s){let r=!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&&(r=!0,s?s.add(o[a]):o[a](t,n))})),r&&(this.cascadeSubscribers[e][t].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,t=[],n=[]){if(!e)return;const s=new Set;n.forEach((t=>{const n=HC(t,"",e);this.triggerCascade(e,t,n,s)})),s.forEach((e=>{e()})),0!==this.listChangeSubscribers.length&&0!==t.length&&t.forEach((t=>{this.listChangeSubscribers.forEach((n=>{const s=HC(t,"",e);n(e,t,s)}))}))}_updateChangedProperties(e,t,n,s,r,a,o,i){const c=n&&i.some((e=>s.startsWith(e)));if(e!==t||c){const e=s.lastIndexOf("."),t=s.substring(0,e),i=s.substring(e),c=pd.getMessages({type:"error",property:i,context:r,pageReference:t});if(c?.length>0&&o.push(s),!n)return;a.push(s)}}isChangedListPropertyExist(e){let t=!0;return 0!==this.listChangeSubscribers.length&&rS.isValidPageListProperty(e)||(t=!1),t}_getServerProperties(e,t,n,s,r,a,o){if("object"!=typeof e){r.push(n.replace(/\.(\d+)/g,"[$1]"));const i=this.isChangedListPropertyExist(n);n=n.replace(/\.(\d+)/g,"[$1]");const c=HC(n,"",t);if(void 0===c&&!e&&0!==e)return;return void this._updateChangedProperties(c,e,i,n,t,s,a,o)}const i=Object.keys(e??{});for(let c=0,l=i.length;c<l;c+=1){const l=i[c],u=`${n}.${l}`;if(Array.isArray(e[l])){const n=HC(u,"",t);n&&n?.length===e[l].length||o.push(u.replace(/\.(\d+)/g,"[$1]"))}this._getServerProperties(e[l],t,u,s,r,a,o)}}getServerProperties(e,t,n=js.CASE_INFO.CASE_INFO_CONTENT){const s=[],r=[],a=[],o=rS.getIn(e,n);return o&&t?(this._getServerProperties(o,t,n,s,a,r,[]),{changedListProperty:s,leafProperty:a,changedPropertyWithError:r}):{changedListProperty:s,leafProperty:a,changedPropertyWithError:r}}_handlePageReference(e,t,n){let s=e;if("Page"===n&&t.startsWith(".")&&t.slice(1).includes(".")){s=`${e}${t.substring(0,t.lastIndexOf("."))}`}return s}registerForListChanges(e=(()=>{})){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}}const UC=new LC;let FC=null;const jC=e=>e?.split(/\.(?![^[]+\])|\[|\]/g).filter(Boolean),VC=e=>{FC=e},kC=()=>FC,BC=e=>{if(!e)return;let t=[],n=[],s=[];if(Array.isArray(e)||"MERGE_DATA"!==e.type||({changedListProperty:t,leafProperty:n,changedPropertyWithError:s}=UC.getServerProperties(e.payload.data,e.payload.context,e.payload.rootPageReference)),FC?.dispatch(e),!Array.isArray(e)&&"MERGE_DATA"===e.type){if(s.length&&!e.payload.skipValidation){s.map((e=>{const t=e.lastIndexOf(".");return{property:e.substring(t),pageReference:e.substring(0,t)}})).forEach((({property:t,pageReference:n})=>{pd.clearMessages({type:"error",property:t,pageReference:n,context:e.payload.context});const s=Zu.getFieldReferenceForProperty(e.payload.context,`${n}${t}`);if(s){const e=cS.resolveContextTreeNodeProps(s.props);Yp.validate(e.componentName?.toLowerCase(),e.propertyName,cS.getLitePropertyValue(e,e.propertyName),e)}}))}UC.handleServerChanges(e.payload.context,t,n)}},$C=e=>kC()?.getState().data?.[e],GC=()=>kC()?.getState().data[js.SHARED],WC=(e,t,n)=>{if(!(s=e)||s.startsWith('"')||s.startsWith("'"))return(e=>e&&e.trim().substring(1,e.length-1))(e);var s;const r=e?.startsWith(".")?t+e:e,a=jC(r);return rS.getIn(n,a)},HC=(e,t,n)=>WC(e,t,$C(n)),qC=(e,t,n)=>WC(t,e?`${js.CONTEXT_DATA}.${e}`:`${js.CONTEXT_DATA}`,$C(n)),zC=(e,t,n)=>((e,t,n)=>{const s=jC(`${t}.${n}`);return rS.getIn(e,s)})($C(n),`${js.CONTEXT_DATA}.${e}`,t),YC=e=>{const{context:t}=e,n=kC()?.getState().data[t];if(n)return gr;const{action:s}=e;return["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"].includes(s)?Or:gr},KC=(e,t)=>{const n=jC(t);return rS.deleteIn(e,n)},QC=e=>!Array.isArray(e)&&"object"==typeof e,JC=(e,t=[],n=[])=>{Array.isArray(t)&&t.length>0&&t.forEach((t=>{t.allowMultiple?t.allowMultiple&&!n.includes(t.path)&&rS.setIn(e,t.path,[]):rS.setIn(e,t.path,{})})),n.length>0&&rS.rearrangeProperties(n,e)},XC=(e,t,n={})=>{const{isArrayDeepMerge:s,propertiesToReplace:r=[],propertiesToReArrange:a=[]}=n;Array.isArray(e)&&!t&&(t=[]),JC(e,r,a);const o=(e,t)=>{if(QC(e)&&null!==t&&"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)return Array.isArray(t)?t:vs(e,t,o);if(Array.isArray(e)&&null!==t&&Array.isArray(t)){if(s)return vs(e,t,o);{const n=t.length;if(void 0===s&&n===e.length)return vs(e,t,o)}}return""===t&&e&&"object"==typeof e?e:t};return o(e,t)},ZC=(e,t,n,s={isArrayDeepMerge:!0})=>{const{isArrayDeepMerge:r}=s,a=jC(t);if("object"==typeof n){const t=XC(rS.getIn(e,a),n,{isArrayDeepMerge:r});return rS.setIn(e,a,t)}return rS.setIn(e,a,n)},eS=(e,t,n)=>{const s=jC(t);return rS.setIn(e,s,n)},tS=()=>{const e=la,{promise:t,actionMgrID:n}=Dg.actionManagerPromise(e);return BC({type:e,payload:{actionMgrID:n}}),t},nS=e=>{const t=kC()?.getState();return!!t?.data?.[e]};class sS{static mergeDeep(e,t){return vs(t,e)}static hasIn(e,t){return Fn(e,t)}static getIn(e,t,n){return jn(e,t,n)}static setIn(e,t,n){return Wn(e,t,n)}static deleteIn(e,t){return wn(e,t)}static isObjectEmpty(e){return!e||0===Object.entries(e).length}static isEmpty(e){return ws(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||!e.includes("."))return!1;for(let t=0;t<e.length;t+=1)if(" @#$%=!<>/\\".includes(e[t]))return!1;return!0}static isValidPropertyReference(e){return"string"==typeof e&&(""===e||""!==e.trim())}static isWhenExist(e){const t=["visibility","disabled","readOnly","required"];let n=!1;for(const s of Object.keys(e)){const r=e[s];r&&"object"==typeof r&&!Array.isArray(r)?n=n||sS.isWhenExist(r):t.includes(s)&&"string"==typeof r&&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 s=new Set;if(e&&Object.keys(e).forEach((r=>{const a=e[r];t.includes(r)&&"string"==typeof a&&a.startsWith("@W ")&&(n=No.trimAnnotation(a),s.add(n))})),"multirecordlist"===e?.type&&"Editable"===e?.renderMode){const t=e?.allowActions??{};Object.keys(t).forEach((e=>{"string"==typeof t[e]&&t[e]?.startsWith("@W ")&&(n=No.trimAnnotation(t[e]),s.add(n))}))}return[...s]}static isExpressionExist(e){const t=["disabled","visibility","readOnly","required"];let n=!1;for(const s of Object.keys(e))t.includes(s)&&"string"==typeof e[s]&&e[s]?.startsWith("@E ")&&(n=!0);return n}static buildDataObject(e,t){let n={};const s=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 s=t;t.startsWith(".")&&(s=t.substring(1)),n[s]=e[t]})),s}static buildObject=(e,t,n)=>{if(void 0===n)return;const s=e.split(".");let r=0;for(;r<s.length-1;r+=1){const e=s[r];e?.toString().length&&!t[e]&&(t[e]={}),t[e]&&(t=t[e])}"object"==typeof n?(t[s[r]]||(t[s[r]]=Array.isArray(n)?[]:{}),XC(t[s[r]],n,{isArrayDeepMerge:!0})):t[s[r]]=n};static getHashedString(e){return(0,ln.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 Xt(e,t)}static isContains(e,t){const n=Object.keys(e);for(let s=0;s<n.length;s+=1)if(e[n[s]]&&sS.isEqual(e[n[s]],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("."):""}static iterateLeafNodes(e,t){const n=(e,s=[])=>{Object.entries(e).forEach((([r,a])=>{s.push(Array.isArray(e)?Number(r):r),Array.isArray(a)?a.forEach(((e,t)=>{s.push(t),n(e,s),s.pop()})):"object"==typeof a?n(a,s):t(s.slice(),a),s.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(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();const e="undefined"!=typeof performance&&"function"==typeof performance.now?performance.now().toString(36).replace(".",""):Math.random().toString(36).slice(2);return`${Date.now().toString(36)}${e}`}static unflatten(e){const t={};return Object.entries(e).forEach((([e,n])=>{const s=e.split(".");let r;s.reduce(((e,t,a)=>(r=e[t]?e[t]:Number.isNaN(Number(s[a+1]))?s.length-1===a?n:{}:[],e[t]=r,e[t])),t)})),t}static flatten(e,t,n){t||(t=""),Array.isArray(e)?e.forEach(((e,s)=>{sS.flatten(e,`${t}[${s}]`,n)})):"object"==typeof e&&null!==e?Object.keys(e).forEach((s=>{const r=t?`${t}.${s}`:s;sS.flatten(e[s],r,n)})):n[t]=e}static buildInstructionPageReference(e,t){const n=e.startsWith(js.OBJECT_INFO.OBJECT_INFO)?`${e}${t}`.replace(js.OBJECT_INFO.OBJECT_INFO_CONTENT,""):`${e}${t}`.replace(js.CASE_INFO.CASE_INFO_CONTENT,"").replace(js.DATA_INFO.DATA_INFO_CONTENT,"");return ep.formatPageReference(n)}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 segmentsMatch=(e,t)=>{const n=e.split("."),s=t.split(".");return n.length===s.length&&n.every(((e,t)=>{if(e===s[t])return!0;if(e.endsWith("()")){const n=e.slice(0,-2),r=s[t];return r.startsWith(n)&&/^\[\d+\]$/.test(r.slice(n.length))}return!1}))};static isString(e){return"string"==typeof e}static rejectPendingActions(e){return e.forEach((e=>e.payload.actionMgrID&&Dg.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","@CA"]),n=e.indexOf(" "),s=e.substring(0,n);return t.has(s)}static trimDotForProperty(e){return"string"==typeof e&&e.startsWith(".")?e.substring(1):e}static decodeHtmlEntities(e){if("undefined"!=typeof document){const t=document.createElement("textarea");return t.innerHTML=e,t.value}let t=e;return Object.entries({"&":"&","<":"<",">":">",""":'"',"'":"'","'":"'","/":"/","/":"/"}).forEach((([e,n])=>{t=t.split(e).join(n)})),t=t.replace(/&#(\d+);/g,((e,t)=>String.fromCharCode(parseInt(t,10)))),t=t.replace(/&#x([a-f\d]+);/gi,((e,t)=>String.fromCharCode(parseInt(t,16)))),t}static convertObjectWithStringToBoolean(e){if(e&&!Array.isArray(e)&&"object"==typeof e)return Object.keys(e).forEach((t=>{let n;const s=e[t];"string"==typeof s?n="true"===s||"false"!==s&&s:"object"==typeof s?(n=s,sS.convertObjectWithStringToBoolean(s)):n=s,e[t]=n})),e}static rearrangeProperties(e,t){e.forEach((e=>{let n=sS.getIn(t,e);if(!n)return;const s=Object.hasOwn(n,Ls.getDefaultQualifiedName("pyCount"));if(s&&(n=n.pxResults),!n)return;const r=n.filter((e=>!e.error)),a=n.filter((e=>e.error));sS.setIn(t,s?`${e}.pxResults`:e,[...r,...a])}))}static getETag(e){if(!e)return;let t=e;const n=t?.split("/")||[],s=["workarea","modal","actionarea"],r=n.findIndex((e=>s.some((t=>e.startsWith(t)))));return-1!==r&&(t=n.slice(0,r+1).join("/")),kC()?.getState()?.data[t]?.caseInfo?.headers?.etag}static PAGELIST_PATH_REGEX=/^(?!.*\.\.)(?!\d)\w+(\.\w+)*\.\d+(\.\w+)+$/;static isValidPageListProperty(e){return sS.PAGELIST_PATH_REGEX.test(e)}static generateDataPageHashWithParameters(e,t,n){const s=[];let r="";const a=n.getPageReference(),o=n.getContextName();Object.keys(e).forEach((t=>{const n=e[t];let r=No.isProperty(n)?HC(`.${No.getPropertyName(n)}`,a,o):n;null!=r&&""!==r||(r=js.NULL_STRING),s.push(r)}));let i=t;const c=s.join(js.HASH_DELIMITER);return c&&(r=sS.getHashedString(c),i=t+js.UNDERSCORE_STRING+r),i}static parsePegaDateTimeToTimestamp(e){if(!e)return null;const t=e.replace(" GMT","").match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})\.(\d{3})$/);if(!t){const t=new Date(e).getTime();return Number.isNaN(t)?null:t}const[,n,s,r,a,o,i,c]=t.map(Number);return new Date(n,s-1,r,a,o,i,c).getTime()}static formatToUTCDate(e,t){if(!e)return e;const n=new Date(e);if(Number.isNaN(n.getTime()))return e;const s=(e,t=2)=>String(e).padStart(t,"0"),r=n.getUTCFullYear(),a=s(n.getUTCMonth()+1),o=s(n.getUTCDate());if("Date"===t)return`${r}${a}${o}`;return`${r}${a}${o}T${s(n.getUTCHours())}${s(n.getUTCMinutes())}${s(n.getUTCSeconds())}.${s(n.getUTCMilliseconds(),3)} GMT`}static isLeafProperty(e){return Boolean(e)&&!e.includes(".")}static getMetadataType(e,t,n){const s=sS.isLeafProperty(e)?oC(e,t):n.getFieldMetadata(e);return Array.isArray(s)?s[0]?.type:s?.type}static toStringParameterValue(e){return"string"==typeof e?e:e instanceof Date?e.toISOString():null}static resolveParameterValue(e,t,n,s,r){if(n&&Object.hasOwn(n,e))return n[e];if(!zg.isProperty(t))return t;const a=null!==r?zg.getPropertyName(t):zg.getLeafPropertyName(t);return s.getValue(`.${a}`)}static formatParameterValue(e,t,n,s,r){if(!zg.isProperty(t))return e;const a=null!==s?zg.getPropertyName(t):zg.getLeafPropertyName(t);if(!a)return e;const o=sS.getMetadataType(a,r,n);if(!o)return e;const i=sS.toStringParameterValue(e);return"Date"===o?i?i.includes("T")?sS.formatToUTCDate(i,"Date"):sS.formatToUTCDate(`${i}T00:00:00Z`,"Date"):e:"DateTime"===o&&i?sS.formatToUTCDate(i,"DateTime"):e}static resolveAndFormatParameters(e,t,n,s,r){const a={};for(const o of Object.keys(e)){const i=e[o];if("string"!=typeof i)a[o]=i;else{const e=sS.resolveParameterValue(o,i,r,t,n);a[o]=sS.formatParameterValue(e,i,t,n,s)}}return a}static normalizePropertyRef(e){const t=e.replace(/\[\d+\]/g,"");return t.startsWith(".")?t.substring(1):t}static resolvePageClass(e,t){if(!t)return;const n=(e=this.normalizePropertyRef(e)).split(".");let s;s=n.length>1?n.slice(0,-1):n;let r=t;for(const e of s){const t=oC(e,r);if(!t)return;if(Array.isArray(t)&&t[0]?.pageClass?r=t[0].pageClass:!Array.isArray(t)&&t.pageClass&&(r=t.pageClass),!r)return}return r}static isNestedObject(e){return ds(e)&&!Array.isArray(e)}static pruneKeys=(e,t,n=!1)=>{if(!k(e))return e;const s=t instanceof Set?t:new Set(t);return n?(sS.isNestedObject(e)?Object.keys(e).forEach((t=>{const n=e[t];if(s.has(t)){const n=Object.getOwnPropertyDescriptor(e,t);n&&n.configurable?delete e[t]:Reflect.set(e,t,void 0)}else n&&(ds(n)||Array.isArray(n))&&sS.pruneKeys(n,s,!0)})):Array.isArray(e)&&e.forEach((e=>{(ds(e)||Array.isArray(e))&&sS.pruneKeys(e,s,!0)})),e):Array.isArray(e)?e.map((e=>ds(e)||Array.isArray(e)?sS.pruneKeys(e,s,!1):e)):sS.isNestedObject(e)?Object.keys(e).reduce(((t,n)=>{if(!s.has(n)){const r=e[n];t[n]=ds(r)||Array.isArray(r)?sS.pruneKeys(r,s,!1):r}return t}),{}):e}}const rS=sS,aS=js.SUMMARY_OF_LISTS,oS=js.SUMMARY_OF_WHEN_CONDITIONS;class iS{static updateData(e){Object.keys(e).forEach((t=>{BC(fS({context:t,data:e[t]}))}))}static updateContextData(e){Object.keys(e).forEach((t=>{BC(fS({context:t,data:e[t]}))}))}static resolveWhen(e,t){return!!t.getContextDataValue(`.${oS}.${e}`)}static resolveFieldValue(e,t){return t.getLocalizedValue(e)}static resolveNavigation(e,t){const n=this.resolveName(e,t);return EC("string"==typeof n?n:"")}static resolveView(e,t,n=""){const s=mC(this.resolveName(e,t));let r=[];if(Array.isArray(s)&&s.length>0){if(t&&s.length>1){if(n||(n=t.getValue(js.CLASS_ID)||""),!n)return;r=s.filter((e=>e[js.CLASSID]===n))}return 0===r.length?s[0]:r[0]}return s}static resolveName(e,t){return e&&"string"==typeof e&&e.startsWith("param.")?(e=e.substring(6),t.getContextDataValue(`.$parameters.${e}`)):(e&&"string"==typeof e&&e.startsWith("@")&&(e=No.handleAnnotation(e,t)),e)}static getContextPath(e,t){return("number"==typeof t||t)&&("number"==typeof(t=No.trimAnnotation(t))||"string"==typeof t)?"number"==typeof t&&Number.isInteger(t)?`${e}[${t}]`:"string"==typeof t&&t.startsWith(".")?e+t:t:e}static getRuleClass(e,t,n){let s;if(t)s=t.startsWith(js.CLASS_ANNOTATION)?t.split(js.CLASS_ANNOTATION)[1].trim():this.resolveClassID(t,e.getPageReference(),e.getContextName(),e.getValue(js.CASE_INFO.CASE_INFO_CLASSID));else if(n?.authorContext){const t=e.getFieldMetadata(n.authorContext);if(t){const e=["refer","copy"].includes(t.dataRetrievalType),n="Page List"===t.type;s=e&&n?t.pageClass:t.classID}s||(s=n.ruleClass)}return s}static resolveReference(e,t){const{type:n}=e;let s;if("reference"===n){const{config:n}=e,r=n?.type,{ref:a,name:o,context:i}=n||{},c=this.getRuleClass(t,i,n);return t&&(t._ruleClass=c),"navigation"===r?s=this.resolveNavigation(a||o,t):"view"===r?s=this.resolveView(a||o,t,c||""):"widget"===r&&(s={type:"Widget",config:{name:o,ruleClass:c}}),s}return e}static resolvePropertyReference(e,t,n){return HC(t,e,n)}static getProperty(e,t,n){let s=this.resolvePropertyReference(t,e,n);if(null==s||0===s.length){const r=zC(`${t}.${aS}`,e,n);r&&(s=this.resolvePropertyReference(t,r,n))}return s}static getPropertyValue(e,t,n){return e=No.trimAnnotation(e),this.getProperty(e,t,n)}static getReferencedUser(e,t){const n=iS.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:s,hasSuggestions:r,pageReference:a,context:o}=e;let i=t||s||"";return n?(i=i.startsWith(".")?i.substring(1):i,i.split(".").reduce(((e,t)=>e?.[t]??void 0),n)):r&&i===s?iS.getPropertyValue(i,a,o?`${o}/${js.SUGGESTION}`:void 0):iS.getPropertyValue(i,a,o||void 0)}static _handlePropString(e,t,n,s,r){n.startsWith("@")?e[t]=No.handleAnnotation(n,s,r):e[t]=n}static _resolveProps(e,t,n){e&&Object.keys(e).forEach((s=>{const r=e[s];"string"==typeof r?this._handlePropString(e,s,r,t,n):Array.isArray(r)?r.forEach((s=>{this._resolveProps("object"==typeof s?s:e[s],t,n)})):"object"==typeof r&&this._resolveProps(e[s],t,n)}))}static resolveProps(e,t,n){return e&&t?(rS.mergeDeep(e,t),this._resolveProps(t,n,void 0),t):t}static resolveContextTreeNodeProps(e){const t={};return e?(rS.mergeDeep(e,t),this._resolveProps(t,void 0,e),rS.resolveStringBooleans(t)):t}static resolvePropertyPageClass(e,t){const n=rS.resolvePageClass(e,t),s=e.substring(e.lastIndexOf(".")+1),r=oC(s,n);let a;if(r)return a=Array.isArray(r)?r[0]?.pageClass:r.pageClass,a}static resolveClassID(e,t,n,s){const r=No.trimAnnotation(e);let a=r.startsWith(".")?`${t}${r}`:r;for(;a;){const e=HC(js.CLASS_ID,a,n);if(e)return e;if(s){const e=this.resolvePropertyPageClass(r,s);if(e)return e}const t=a.lastIndexOf(".");if(-1===t)break;a=a.substring(0,t)}return null}}const cS=iS;const lS=new class{constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,t){this.actionHandlers[e]=t}},uS=lS;const dS=class{static#h=[];static#f=!1;static getActionHandlers=(e,t,n)=>{const s=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==t||e.forEach((e=>{const t=uS.getHandler(e.action),{config:n}=e;s.push({handler:t,config:n})})),s};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#m=(e,t,n)=>{for(let s=0;s<e.length;s+=1){const r=e[s],a={actionHandler:r.handler,component:t,eventType:n,config:r.config};this.#h.push(a)}};static buildActionObject=(e,t)=>{const n={...e};return n.context="Browser"===PA.getRuntime()?t.getContextName():n.context,n.pageReference=t.getPageReference(),n.actionMgrID=Dg.getNextActionMgrId(),n};static#I=e=>{const t=e.actionHandler,n=e.component,{config:s}=e,r={};cS.resolveProps(s,r,n),t&&(t(e.eventType,r,n),this.#E())};static#E=()=>{if(!this.#f){if(0===this.#h.length)return;const e=this.#h.shift();if(!e)return;this.#I(e),e.config&&"true"===e.config.parallel&&this.#h.length>0&&this.#E()}};static#y=()=>{this.#E()};static#A=(e,t,n)=>{this.#m(e,t,n),this.#y()};static getFullRef=e=>{const t=e.getPageReference(),n=e.getComponentConfig().value;return cS.getContextPath(t,n)};static#C(e,t){const n=e.getComponentConfig().behaviours||[];for(let s=0;s<n.length;s+=1){const{behaviour:r,actions:a}=n[s];if(a){const n=this.getActionHandlers(a,r,t);n&&n.length>0&&this.#A(n,e,t)}}}static changeHandler=(e,t)=>{const n=e.getStateProps().value,s=e.getContextName();od({type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:s});if(!("Browser"===PA.getRuntime()?"nativeEvent"in t&&t.nativeEvent instanceof Event||t instanceof Event:"nativeEvent"in t&&!!t.nativeEvent||t instanceof Event)&&"value"in t&&(null===t.value||"prop"in t&&void 0!==t.prop)){if("object"==typeof(r=t)&&null!==r){const n=e.getPageReference(),r=e.getStateProps();for(const e of Object.keys(t)){const a=r[e],o=t[e];BC({type:Xs,payload:{reference:cS.getContextPath(n,a),value:o,context:s}}),BC({type:er,payload:{reference:cS.getContextPath(n,a),value:o,context:s}})}}}else{let n,{target:r}=t;null===r&&t&&"auxiliaryTarget"in t&&t.auxiliaryTarget&&(r=t.auxiliaryTarget),n=void 0===r?"value"in t?t.value:void 0:"value"in r?r.value:r.innerText;const a=this.getFullRef(e);BC({type:Xs,payload:{reference:a,value:n,context:s}}),void 0!==r&&this.isEditable(r)&&!this.isNonKeyInput(r)||BC({type:er,payload:{reference:a,pageReference:e.getPageReference(),value:n,context:s,propertyName:e.getComponentConfig().value,classID:e.getValue(js.CLASS_ID)}})}var r};static blurHandler=(e,t)=>{let{target:n}=t;null===n&&t&&"auxiliaryTarget"in t&&(n=t.auxiliaryTarget);const{value:s,validationValue:r}=n,a=this.getFullRef(e),o=e.getContextName();n.clearMessages&&od({type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:o}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?r:s),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,s),this.isNonKeyInput(n)||BC({type:er,payload:{reference:a,pageReference:e.getPageReference(),value:s,context:o,propertyName:e.getComponentConfig().value,classID:e.getValue(js.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.#C(e,n)};static pause=()=>{this.#f=!0};static resume=()=>{this.#f=!1,this.#E()};static isQueueEmpty=()=>0===this.#h.length;static clearQueue=()=>{this.#h=[]};static getActionsQueue=()=>this.#h;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},pS="CREATE_WORK",gS=e=>({type:pS,payload:e});const hS=(e,t,n,s,r="")=>{const a=[];Object.keys(e).forEach((o=>{"object"==typeof e[o]&&o.includes("[")?function(e,t,n,s,r,a,o){const i=s.substring(0,s.indexOf("[")),c=s.substring(s.indexOf("[")+1,s.indexOf("]"));let l=t[i];const u=`${rS.trimDotForProperty(r)}.${i}`;o.includes(u)&&Object.hasOwn(l,Ls.getDefaultQualifiedName("pyCount"))&&(l=l.pxResults),Array.isArray(l)&&(l?.splice(+c,1,e[s]),a.push(i),n.add(`${r}.${s}`))}(e,t,n,o,r,a,s):e[o]&&"object"==typeof e[o]?(t[o]||(t[o]=Array.isArray(e[o])?[]:{}),hS(e[o],t[o],n,s,`${r}.${o}`)):t[o]=e[o]})),function(e,t,n){Object.keys(e).forEach((s=>{(Array.isArray(e[s])&&!n.includes(s)||!Array.isArray(e[s])&&!Object.hasOwn(t,s))&&delete e[s]}))}(t,e,a)},fS=(e,t={})=>{const{serverPrecedenceFields:n=[],propertiesToReplace:s=[],propertiesToReArrange:r=[]}=t,{context:a,data:o,isArrayDeepMerge:i,preserveClientChanges:c=!1}=e,l=ty(a,!0),u=$C(a);let d={};if(u&&o){d=JSON.parse(JSON.stringify(u));const e=JSON.parse(JSON.stringify(o));r.length>0&&rS.rearrangeProperties(r,d);const t=new Set;hS(l,d,t,r),((e,t,n)=>{const s=new Set;e.forEach((e=>{e=rS.trimDotForProperty(e);const[r,a,o]=ku(e);if(r&&a&&o&&!s.has(`${r}.${a}`)){const e=rS.getIn(n,`${r}.${a}`)||[];Array.isArray(e)&&e.forEach(((e,n)=>{n!==+o&&rS.setIn(t,`${r}.${a}[${n}]`,e)})),s.add(`${r}.${a}`)}}))})(t,d,e)}!function(e,t){const n=rS.getIn(e,js.REFERENCED_USERS);let s;if(void 0!==n){if(!Array.isArray(n)&&"object"==typeof n)return s=rS.getIn(t,js.REFERENCED_USERS,{}),void rS.setIn(e,js.REFERENCED_USERS,{...s,...n});s=rS.getIn(t,js.REFERENCED_USERS,[]);const r=new Map;for(const e of[...s,...n])if(r.has(e.UserID)){const t=r.get(e.UserID);r.set(e.UserID,{...t,...e})}else r.set(e.UserID,e);n.length=0;for(const e of r.values())n.push(e)}}(o,u);const p=rS.getIn(e?.data,js.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),g=YI.isExternalObject(p),h=g?{[js.OBJECT_INFO.OBJECT_INFO]:{[js.CONTENT]:{...d[js.OBJECT_INFO.OBJECT_INFO]?.[js.CONTENT]}}}:{[js.CASE_INFO.CASE_INFO]:{[js.CONTENT]:{...d[js.CASE_INFO.CASE_INFO]?.[js.CONTENT]}}},f=g?js.OBJECT_INFO.OBJECT_INFO_CONTENT:js.CASE_INFO.CASE_INFO_CONTENT;let m=o;return c?(n.forEach((e=>{const t=`${f}.${e}`;rS.deleteIn(h,t)})),m=XC(o,h,{isArrayDeepMerge:i??!0})):((e,t)=>{const n=QE[e]||{};Object.keys(n).forEach((e=>{rS.hasIn(t,e)&&(n[e].value=rS.getIn(t,e))}))})(a,o),{type:Cr,payload:{...e,data:m,...s.length>0?{propertiesToReplace:s}:null,...r.length>0?{propertiesToReArrange:r}:null}}},mS=e=>({type:"SHOW_HARNESS",payload:e}),IS=e=>({type:tr,payload:e}),ES=e=>({type:nr,payload:e}),yS=e=>({type:"ADD_WORK",payload:e}),AS=e=>({type:pr,payload:e}),CS=e=>({type:Dr,payload:e}),SS=e=>({type:Pr,payload:e}),_S=e=>({type:Or,payload:e}),NS=e=>({type:br,payload:e}),TS=e=>({type:vr,payload:e}),DS=e=>({type:Mr,payload:e}),PS=e=>({type:Ur,payload:e}),OS=e=>({type:Lr,payload:e}),RS=e=>{const{containerItemID:t}=e;e.suggestionContexts=ky(t);const n=e?.data?.caseInfo?.content,s=Object.keys(n||{}).length>0;return e.propertiesToReplace||(e.propertiesToReplace=s?YI.getPropertiesToReplace(t):[]),{type:jr,payload:e}},bS=e=>{const{context:t}=e;return{type:or,payload:{context:t}}},vS=e=>{const{context:t}=e;return{type:ir,payload:{context:t}}},xS=e=>({type:Vr,payload:e}),wS=e=>({type:Fr,payload:e}),MS=e=>({type:ia,payload:e}),LS=e=>{const{context:t,containerItemID:n}=e;let s=t;return s||(s=Ly(n)),e.context=s,e.deleteContext=!eA(n),e.childContainers=jy(n),e.childContainersContexts=Vy(n),e.transientItems=tA([...e.childContainersContexts,n]),e.suggestionContexts=ky(n),n===t&&(e.caseID=HC(js.CASE_INFO.CASE_INFO_ID,"",t)||HC(js.OBJECT_INFO.OBJECT_INFO_ID,"",t),e.RemoteSystemID=HC(js.CASE_INFO.REMOTESYSTEMID,"",t)),{type:Rr,payload:e}},US=e=>{const{containerItemID:t}=e;return e.transientItems=tA([...Vy(t),t]),{type:wr,payload:e}},FS=e=>{const{transientItemID:t}=e;return e.transientItems=[t],{type:xr,payload:e}},jS=e=>{const{context:t,containerItemID:n}=e;let s=t;if(s||(s=Ly(n)),e.context=s,e.childContainers=jy(n),e.childContainersContexts=Vy(n),e.transientItems=tA([...e.childContainersContexts,n]),e.suggestionContexts=ky(n),n===t){e.caseID=HC(js.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=HC(js.CASE_INFO.REMOTESYSTEMID,"",t);const n=HC(js.CASE_INFO.CASE_INFO_CLASSNAME,"",t);Bs.isTraditionalRemoteCase(n)&&(e.skipReleaseLockRequest=!0)}return{type:kr,payload:e}},VS=e=>({type:hr,payload:e}),kS=e=>({type:Ir,payload:e}),BS=e=>({type:Nr,payload:e}),$S=(e,...t)=>(dS.resume(),e(...t)),GS=(e,t,n,s,r)=>({type:Tr,payload:{msg:e,err:t,context:n,formFields:s,actionMgrID:r}}),WS=e=>({type:da,payload:e}),HS=e=>({type:pa,payload:e}),qS=e=>({type:ga,payload:e}),zS=e=>({type:"SHOW_CASE_PREVIEW",payload:e}),YS=e=>({type:ur,payload:e}),KS=e=>({type:Xs,payload:e}),QS="add",JS="replace",XS=["portal","noPortal","preview","debug","devtool","activeTab","contextParam","lang"];let ZS="",e_="Home",t_="",n_=!0;const s_=e=>(n_=e,n_),r_=()=>n_,a_=(e,t,n)=>TA.getSemanticURL(e,t,n),o_=(e,t)=>TA.getRestEndPoint(e,t),i_=(e,t)=>{let n=rn();const s=o_(e,t);return s?(s.restApi?.startsWith("/")||(s.restApi=`/${s.restApi}`),n?.endsWith("/")&&(n=n.substring(0,n.length-1)),s.restApi=n+s.restApi,s):{}},c_=(e,t,n)=>{const{root:s,resources:r}=e,{views:a}=r,{config:o}=s,i=QS;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(_h);if(l){const e=rS.getIn(t,o.context);c=c.replace(l[0],e.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:i}},l_=(e,t)=>{const n=`${e}/${t}`;if(!("EMBED"===PA.getRenderingMode()))return n;const s=TA.getRoutingInfo()?.authServiceAlias;if(!s)return n;const r=encodeURIComponent(s);let a;try{a=new URL(n)}catch{return n}const o=a.pathname.split("/").filter(Boolean),i=o.findIndex((e=>"app"===e.toLowerCase()));if(i<0)return n;"prauth"!==o[i-1]?.toLowerCase()&&o.splice(i,0,"PRAuth");const c=o.findIndex((e=>"app"===e.toLowerCase()))+2;return c!==o.length&&o[c]===r||o.splice(c,0,r),a.pathname=`/${o.join("/")}`,a.toString().replace(/\/$/,"")},u_=(e,t,n,s)=>{let r,a;r=Th(t)?l_(e,t):e;const o=Th(n?.pxURLPath||"");o&&(r=`${r}/${o}`);try{a=new URL(r).searchParams,r=r.includes("?")?r.split("?")[0]:r}catch(e){return console.log("Invalid url",e),""}const i=r.split("/"),c=i[i.length-1],l=new URLSearchParams("undefined"==typeof window?"":window.location.search);if(vh()?(r=((e,t,n,s,r)=>{const a=TA.getStaticRoutePage(),o=e_?.toLowerCase(),i=a?.toLowerCase(),c=s?.toLowerCase();return i!==o&&c!==o||r.has("noPortal")?e:l_(t,n)})(r,e,t,c,l),TA.setStaticRoutePage("")):c.toLowerCase()!==e_.toLowerCase()||l.has("noPortal")||(r=l_(e,t)),!TA.isDefaultPortal()){const e=TA.getPortalName();l.has("portal")?l.set("portal",e):l.append("portal",e)}a=((e,t,n)=>{for(const[n,s]of t.entries())!e.has(n)&&XS.includes(n)&&e.append(n,s);n&&!e.has("lang")&&e.append("lang",n);const s=TA.getRoutingInfo()?.embedQueryParams;if(s)for(const[t,n]of Object.entries(s))e.has(t)||e.append(t,String(n));return e})(a,l,s);const u=Ph(a.toString());return u&&(r+=`?${u}`),r},d_=(e,{urlPathObjParam:t,infoParam:n,optionsParam:s,queryParam:r},a=!1,o)=>{let i,c,l;if(!1===window.PCore.getBehaviorOverride("dynamicSemanticUrl"))return;if(a)i=t,c=n,l=s;else{const{uiResources:n,data:s}=e;({options:l}=e),i=t&&t.pxURLPath&&Nh(t.pxURLPath)?c_(n,s,t.pxURLPath):t||c_(n,s),c=TA.getEndPointInfo(i.pxURLPath),i.pxURLPath=c.urlPath}let u=u_(ZS,TA.getApplicationPath(),i,o);const{title:d}=((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:TA.getApplicationName()),n===`${ZS}/${t}/`)return{title:e};const s=new URL(n).pathname.replace(`${t}/`,""),r=s.split("/");return/\d/.test(s)?{title:`${e} - ${r[r.length-1]}`}:{title:`${e} - ${r[0]}`}})(t_,TA.getApplicationPath(),u),p=((e,t)=>(void 0!==e&&(e.options=t),{stateObj:e}))(c,{...l,title:d});i?.historyAction===QS?((e,t,n)=>{if("undefined"!=typeof window)try{window.history.pushState(e,t,n),window.scrollTo(0,0)}catch(e){throw new Error("Error- Unable to Add to Browser History")}})(p,d,u):i?.historyAction===JS&&(r&&(u+=`?${r}`),((e,t,n)=>{if("undefined"!=typeof window)try{window.history.replaceState(e,t,n)}catch(e){throw new Error("Error- Unable to Replace Browser History")}})(p,d,u))},p_=(e,t)=>{let n=null;e.directUrlUpdation&&(n={historyAction:QS,pxURLPath:""},n.pxURLPath=e.semanticURL),d_(e,{urlPathObjParam:n,infoParam:null,optionsParam:null},!1,t)},g_=(e,t)=>{p_(e,t)},h_=(e,t)=>{const n={pxURLPath:e};return u_(ZS,TA.getApplicationPath(),n,t)},f_=e=>{const{uiResources:t}=e;r_()&&(e.directUrlUpdation||(e=>{if(e&&e.root){const{root:t}=e,{resources:n}=e,{views:s}=n,r=t.config,a=r.type,o=r.name;if("VIEW"===a.toUpperCase()){const e=s[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))&&p_(e)},m_=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},I_=(e,t,n)=>{const{caseClassName:s,workID:r}=e.payload,{containerName:a,context:o}=t,{RemoteClassGroup:i,RemoteSystemID:c,name:l}=Bs.getRemoteCase(s),u={...e,headers:{RemoteSystemID:c},className:s,isTraditionalRemoteCase:Bs.isTraditionalRemoteCase(s),isRemoteCase:Bs.isRemoteCase(s),action:ba,viewName:Vs,gadgetId:YI.getUniqueGadgetId(),context:n??o,skipSemanticUrl:!0,insKey:`${i?.toUpperCase()} ${r}`,containerName:a,name:l};BC(d.showPage(u))};let E_=!1;const y_=async e=>{if(E_)return void(E_=!1);const t=(e=>"ui-navigation"===e.state?.type?(fd.publish(Fs.PUB_SUB_EVENTS.URL_NAVIGATION,e.state),null):e.state?e.state.stateObj:null)(e);if(t){const e=gA(),n=xy(`${e}/primary`);if(n&&Yy(n)){const e=xA().getLocaleValue(ZE,"Messages");if(!await Zm.confirm(e))return E_=!0,void window.history.go(1)}Bs.isRemoteCase(t.payload?.caseClassName)?I_({...t},t.options):BC(d.showHistory(m_(t)))}},A_=()=>TA.getApplicationPath()!==CA(),C_=e=>{const{acName:t,context:n,defaultViewLabel:s,ruleName:r,className:a}=e,o=((e,t)=>{const n=TA.getRoutingInfo();if(vh()&&Object.values(n?.routes??{}).find((n=>n?.payload?.pageClass===t&&n?.payload?.page===e)))return e;const s=e.split(" ").join(""),r=e.split(" ").join("-").toLowerCase(),a=(e=>{const t=e.replace(/(?=[A-Z][a-z])/g,"-").toLowerCase();return t.startsWith("-")?t.substring(1):t})(e);return n?.routes?.[s]?s:n?.routes?.[r]?r:n?.routes?.[a]?a:e})(r||s,a);(e=>{e_=e})(o),TA.setDefaultRoute(o),TA.setDefaultClassName(a);const i=Hs(t,n),c=Va(t,n),l=(()=>{const e=PA.getIsExtraCallRequiredForDefaultHome();return!0===e||"true"===e})(),u={historyAction:JS,pxURLPath:""};let p,g=null;const h={acName:c,context:i,actionConfig:{context:i}};if(l||!l&&A_()){const t=Rh(SA());PA.shouldUseURLParams()&&(g=t.includes("?")?t.split("?")[1]:null),p=bh(t,h),u.pxURLPath=p.urlPath,void 0!==p.payload?.pageClass&&(p.payload.pageClass=kC()?.getState()?.data?.app?.pyPortal?.classID);const n="showHistory",s={routeEndpoint:p.routeEndpoint,requestType:p.requestType,payload:p.payload,options:h,routeKey:p.routeKey};f=p?.payload?.caseClassName,f&&Bs.isRemoteCase(f)&&(Bs.isTraditionalRemoteCase(f)||Bs.isRemoteCaseVersionDifferent(f))?I_(s,e,h.context):BC(d[n](m_(s)))}else p=TA.getEndPointInfo(e_),u.pxURLPath="";var f;d_(null,{urlPathObjParam:u,infoParam:p,optionsParam:h,queryParam:g},!0)},S_=(e,t=!1)=>{var n;ZS=e.domain,!1===t&&r_()&&(n=y_,"undefined"!=typeof window&&window.addEventListener("popstate",(e=>n(e))),"undefined"!=typeof window&&(window.onbeforeunload=()=>null)),TA.init(e,e_)},__=e=>{(e=>{"undefined"!=typeof window&&(window.document.title=e)})(e)},N_=e=>{for(const t of e)XS.includes(t)||XS.push(t)};var T_=Symbol.for("immer-nothing"),D_=Symbol.for("immer-draftable"),P_=Symbol.for("immer-state");function O_(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var R_=Object,b_=R_.getPrototypeOf,v_="constructor",x_="prototype",w_="configurable",M_="enumerable",L_="writable",U_="value",F_=e=>!!e&&!!e[P_];function j_(e){return!!e&&(B_(e)||z_(e)||!!e[D_]||!!e[v_]?.[D_]||Y_(e)||K_(e))}var V_=R_[x_][v_].toString(),k_=new WeakMap;function B_(e){if(!e||!Q_(e))return!1;const t=b_(e);if(null===t||t===R_[x_])return!0;const n=R_.hasOwnProperty.call(t,v_)&&t[v_];if(n===Object)return!0;if(!J_(n))return!1;let s=k_.get(n);return void 0===s&&(s=Function.toString.call(n),k_.set(n,s)),s===V_}function $_(e,t,n=!0){if(0===G_(e)){(n?Reflect.ownKeys(e):R_.keys(e)).forEach((n=>{t(n,e[n],e)}))}else e.forEach(((n,s)=>t(s,n,e)))}function G_(e){const t=e[P_];return t?t.type_:z_(e)?1:Y_(e)?2:K_(e)?3:0}var W_=(e,t,n=G_(e))=>2===n?e.has(t):R_[x_].hasOwnProperty.call(e,t),H_=(e,t,n=G_(e))=>2===n?e.get(t):e[t],q_=(e,t,n,s=G_(e))=>{2===s?e.set(t,n):3===s?e.add(n):e[t]=n};var z_=Array.isArray,Y_=e=>e instanceof Map,K_=e=>e instanceof Set,Q_=e=>"object"==typeof e,J_=e=>"function"==typeof e,X_=e=>"boolean"==typeof e;var Z_=e=>e.copy_||e.base_,eN=e=>e.modified_?e.copy_:e.base_;function tN(e,t){if(Y_(e))return new Map(e);if(K_(e))return new Set(e);if(z_(e))return Array[x_].slice.call(e);const n=B_(e);if(!0===t||"class_only"===t&&!n){const t=R_.getOwnPropertyDescriptors(e);delete t[P_];let n=Reflect.ownKeys(t);for(let s=0;s<n.length;s++){const r=n[s],a=t[r];!1===a[L_]&&(a[L_]=!0,a[w_]=!0),(a.get||a.set)&&(t[r]={[w_]:!0,[L_]:!0,[M_]:a[M_],[U_]:e[r]})}return R_.create(b_(e),t)}{const t=b_(e);if(null!==t&&n)return{...e};const s=R_.create(t);return R_.assign(s,e)}}function nN(e,t=!1){return rN(e)||F_(e)||!j_(e)||(G_(e)>1&&R_.defineProperties(e,{set:sN,add:sN,clear:sN,delete:sN}),R_.freeze(e),t&&$_(e,((e,t)=>{nN(t,!0)}),!1)),e}var sN={[U_]:function(){O_(2)}};function rN(e){return null===e||!Q_(e)||R_.isFrozen(e)}var aN="MapSet",oN="Patches",iN="ArrayMethods",cN={};function lN(e){const t=cN[e];return t||O_(0),t}var uN,dN=e=>!!cN[e];var pN=()=>uN;function gN(e,t){t&&(e.patchPlugin_=lN(oN),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function hN(e){fN(e),e.drafts_.forEach(IN),e.drafts_=null}function fN(e){e===uN&&(uN=e.parent_)}var mN=e=>uN={drafts_:[],parent_:uN,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:dN(aN)?lN(aN):void 0,arrayMethodsPlugin_:dN(iN)?lN(iN):void 0};function IN(e){const t=e[P_];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function EN(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[P_].modified_&&(hN(t),O_(4)),j_(e)&&(e=yN(t,e));const{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(n[P_].base_,e,t)}else e=yN(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&nN(t,n)}(t,e,!0),hN(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==T_?e:void 0}function yN(e,t){if(rN(t))return t;const n=t[P_];if(!n){return DN(t,e.handledSet_,e)}if(!CN(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;){t.pop()(e)}NN(n,e)}return n.copy_}function AN(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var CN=(e,t)=>e.scope_===t,SN=[];function _N(e,t,n,s){const r=Z_(e),a=e.type_;if(void 0!==s){if(H_(r,s,a)===t)return void q_(r,s,n,a)}if(!e.draftLocations_){const t=e.draftLocations_=new Map;$_(r,((e,n)=>{if(F_(n)){const s=t.get(n)||[];s.push(e),t.set(n,s)}}))}const o=e.draftLocations_.get(t)??SN;for(const e of o)q_(r,e,n,a)}function NN(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const s=n.getPath(e);s&&n.generatePatches_(e,s,t)}AN(e)}}function TN(e,t,n){const{scope_:s}=e;if(F_(n)){const r=n[P_];CN(r,s)&&r.callbacks_.push((function(){xN(e);const s=eN(r);_N(e,n,s,t)}))}else j_(n)&&e.callbacks_.push((function(){const r=Z_(e);3===e.type_?r.has(n)&&DN(n,s.handledSet_,s):H_(r,t,e.type_)===n&&s.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&DN(H_(e.copy_,t,e.type_),s.handledSet_,s)}))}function DN(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||F_(e)||t.has(e)||!j_(e)||rN(e)||(t.add(e),$_(e,((s,r)=>{if(F_(r)){const t=r[P_];if(CN(t,n)){const n=eN(t);q_(e,s,n,e.type_),AN(t)}}else j_(r)&&DN(r,t,n)}))),e}var PN={get(e,t){if(t===P_)return e;let n=e.scope_.arrayMethodsPlugin_;const s=1===e.type_&&"string"==typeof t;if(s&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const r=Z_(e);if(!W_(r,t,e.type_))return function(e,t,n){const s=bN(t,n);return s?U_ in s?s[U_]:s.get?.call(e.draft_):void 0}(e,r,t);const a=r[t];if(e.finalized_||!j_(a))return a;if(s&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return a;if(a===RN(e.base_,t)||function(e,t,n){if(1!==e.type_||!e.allIndicesReassigned_||e.assigned_?.get(t)||!j_(n)||n[P_])return!1;return e.baseRefs_.has(n)}(e,t,a)){xN(e);const n=1===e.type_?+t:t,s=wN(e.scope_,a,e,n);return e.copy_[n]=s}return a},has:(e,t)=>t in Z_(e),ownKeys:e=>Reflect.ownKeys(Z_(e)),set(e,t,n){const s=bN(Z_(e),t);if(s?.set)return s.set.call(e.draft_,n),!0;if(!e.modified_){const s=RN(Z_(e),t),o=s?.[P_];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(((r=n)===(a=s)?0!==r||1/r==1/a:r!=r&&a!=a)&&(void 0!==n||W_(e.base_,t,e.type_)))return!0;xN(e),vN(e)}var r,a;return e.copy_[t]===n&&(void 0!==n||W_(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),TN(e,t,n)),!0},deleteProperty:(e,t)=>(xN(e),void 0!==RN(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),vN(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=Z_(e),s=Reflect.getOwnPropertyDescriptor(n,t);return s?{[L_]:!0,[w_]:1!==e.type_||"length"!==t,[M_]:s[M_],[U_]:n[t]}:s},defineProperty(){O_(11)},getPrototypeOf:e=>b_(e.base_),setPrototypeOf(){O_(12)}},ON={};for(let e in PN){let t=PN[e];ON[e]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function RN(e,t){const n=e[P_];return(n?Z_(n):e)[t]}function bN(e,t){if(!(t in e))return;let n=b_(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=b_(n)}}function vN(e){e.modified_||(e.modified_=!0,e.parent_&&vN(e.parent_))}function xN(e){e.copy_||(e.assigned_=new Map,e.copy_=tN(e.base_,e.scope_.immer_.useStrictShallowCopy_))}ON.deleteProperty=function(e,t){return ON.set.call(this,e,t,void 0)},ON.set=function(e,t,n){return PN.set.call(this,e[0],t,n,e[0])};function wN(e,t,n,s){const[r,a]=Y_(t)?lN(aN).proxyMap_(t,n):K_(t)?lN(aN).proxySet_(t,n):function(e,t){const n=z_(e),s={type_:n?1:0,scope_:t?t.scope_:pN(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let r=s,a=PN;n&&(r=[s],a=ON);const{revoke:o,proxy:i}=Proxy.revocable(r,a);return s.draft_=i,s.revoke_=o,[i,s]}(t,n);return(n?.scope_??pN()).drafts_.push(r),a.callbacks_=n?.callbacks_??[],a.key_=s,n&&void 0!==s?function(e,t,n){e.callbacks_.push((function(s){const r=t;if(!r||!CN(r,s))return;s.mapSetPlugin_?.fixSetContents(r);const a=eN(r);_N(e,r.draft_??r,a,n),NN(r,s)}))}(n,a,s):a.callbacks_.push((function(e){e.mapSetPlugin_?.fixSetContents(a);const{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)})),r}function MN(e){if(!j_(e)||rN(e))return e;const t=e[P_];let n,s=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=tN(e,t.scope_.immer_.useStrictShallowCopy_),s=t.scope_.immer_.shouldUseStrictIteration()}else n=tN(e,!0);return $_(n,((e,t)=>{q_(n,e,MN(t))}),s),t&&(t.finalized_=!1),n}globalThis.Iterator;var LN=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(J_(e)&&!J_(t)){const n=t;t=e;const s=this;return function(e=n,...r){return s.produce(e,(e=>t.call(this,e,...r)))}}let s;if(J_(t)||O_(6),void 0===n||J_(n)||O_(7),j_(e)){const r=mN(this),a=wN(r,e,void 0);let o=!0;try{s=t(a),o=!1}finally{o?hN(r):fN(r)}return gN(r,n),EN(s,r)}if(!e||!Q_(e)){if(s=t(e),void 0===s&&(s=e),s===T_&&(s=void 0),this.autoFreeze_&&nN(s,!0),n){const t=[],r=[];lN(oN).generateReplacementPatches_(e,s,{patches_:t,inversePatches_:r}),n(t,r)}return s}O_(1)},this.produceWithPatches=(e,t)=>{if(J_(e))return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,s;return[this.produce(e,t,((e,t)=>{n=e,s=t})),n,s]},X_(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),X_(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),X_(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){j_(e)||O_(8),F_(e)&&(e=function(e){F_(e)||O_(10);return MN(e)}(e));const t=mN(this),n=wN(t,e,void 0);return n[P_].isManual_=!0,fN(t),n}finishDraft(e,t){const n=e&&e[P_];n&&n.isManual_||O_(9);const{scope_:s}=n;return gN(s,t),EN(void 0,s)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(0===s.path.length&&"replace"===s.op){e=s.value;break}}n>-1&&(t=t.slice(n+1));const s=lN(oN).applyPatches_;return F_(e)?s(e,t):this.produce(e,(e=>s(e,t)))}},UN=LN.produce;function FN(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 jN=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),VN=()=>Math.random().toString(36).substring(7).split("").join("."),kN={INIT:`@@redux/INIT${VN()}`,REPLACE:`@@redux/REPLACE${VN()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${VN()}`};function BN(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 $N(e,t,n){if("function"!=typeof e)throw new Error(FN(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(FN(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(FN(1));return n($N)(e,t)}let s=e,r=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(FN(3));return r}function d(e){if("function"!=typeof e)throw new Error(FN(4));if(c)throw new Error(FN(5));let t=!0;l();const n=i++;return o.set(n,e),function(){if(t){if(c)throw new Error(FN(6));t=!1,l(),o.delete(n),a=null}}}function p(e){if(!BN(e))throw new Error(FN(7));if(void 0===e.type)throw new Error(FN(8));if("string"!=typeof e.type)throw new Error(FN(17));if(c)throw new Error(FN(9));try{c=!0,r=s(r,e)}finally{c=!1}return(a=o).forEach((e=>{e()})),e}p({type:kN.INIT});return{dispatch:p,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(FN(10));s=e,p({type:kN.REPLACE})},[jN]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(FN(11));function n(){const e=t;e.next&&e.next(u())}n();return{unsubscribe:e(n)}},[jN](){return this}}}}}function GN(e){const t=Object.keys(e),n={};for(let s=0;s<t.length;s++){const r=t[s];0,"function"==typeof e[r]&&(n[r]=e[r])}const s=Object.keys(n);let r;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:kN.INIT}))throw new Error(FN(12));if(void 0===n(void 0,{type:kN.PROBE_UNKNOWN_ACTION()}))throw new Error(FN(13))}))}(n)}catch(e){r=e}return function(e={},t){if(r)throw r;let a=!1;const o={};for(let r=0;r<s.length;r++){const i=s[r],c=n[i],l=e[i],u=c(l,t);if(void 0===u){t&&t.type;throw new Error(FN(14))}o[i]=u,a=a||u!==l}return a=a||s.length!==Object.keys(e).length,a?o:e}}function WN(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function HN(e){return({dispatch:t,getState:n})=>s=>r=>"function"==typeof r?r(t,n,e):s(r)}var qN=HN(),zN=HN,YN="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?WN:WN.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function KN(e,t){function n(...n){if(t){let s=t(...n);if(!s)throw new Error(aT(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>function(e){return BN(e)&&"type"in e&&"string"==typeof e.type}(t)&&t.type===e,n}var QN=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function JN(e){return j_(e)?UN(e,(()=>{})):e}var XN="RTK_autoBatch",ZN=e=>t=>{setTimeout(t,e)},eT=(e={type:"raf"})=>t=>(...n)=>{const s=t(...n);let r=!0,a=!1,o=!1;const i=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?(l=window.requestAnimationFrame,u=100,e=>{let t=!1;const n=()=>{t||(t=!0,cancelAnimationFrame(s),clearTimeout(r),e())},s=l(n),r=setTimeout(n,u)}):ZN(10):"callback"===e.type?e.queueNotification:ZN(e.timeout);var l,u;const d=()=>{o=!1,a&&(a=!1,i.forEach((e=>e())))};return Object.assign({},s,{subscribe(e){const t=s.subscribe((()=>r&&e()));return i.add(e),()=>{t(),i.delete(e)}},dispatch(e){try{return r=!e?.meta?.[XN],a=!r,a&&(o||(o=!0,c(d))),s.dispatch(e)}finally{r=!0}}})};function tT(e){const t=function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:r=!0}=e??{};let a=new QN;return t&&("boolean"==typeof t?a.push(qN):a.push(zN(t.extraArgument))),a},{reducer:n,middleware:s,devTools:r=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o,enhancers:i}=e||{};let c,l;if("function"==typeof n)c=n;else{if(!BN(n))throw new Error(aT(1));c=GN(n)}l="function"==typeof s?s(t):t();let u=WN;r&&(u=YN({trace:!1,..."object"==typeof r&&r}));const d=function(...e){return t=>(n,s)=>{const r=t(n,s);let a=()=>{throw new Error(FN(15))};const o={getState:r.getState,dispatch:(e,...t)=>a(e,...t)},i=e.map((e=>e(o)));return a=WN(...i)(r.dispatch),{...r,dispatch:a}}}(...l),p=(e=>function(t){const{autoBatch:n=!0}=t??{};let s=new QN(e);return n&&s.push(eT("object"==typeof n?n:void 0)),s})(d);return $N(c,o,u(..."function"==typeof i?i(p):p()))}function nT(e){const t={},n=[];let s;const r={addCase(e,n){const s="string"==typeof e?e:e.type;if(!s)throw new Error(aT(28));if(s in t)throw new Error(aT(29));return t[s]=n,r},addAsyncThunk:(e,s)=>(s.pending&&(t[e.pending.type]=s.pending),s.rejected&&(t[e.rejected.type]=s.rejected),s.fulfilled&&(t[e.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:e.settled,reducer:s.settled}),r),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),r),addDefaultCase:e=>(s=e,r)};return e(r),[t,n,s]}function sT(e,t){let n,[s,r,a]=nT(t);if("function"==typeof e)n=()=>JN(e());else{const t=JN(e);n=()=>t}function o(e=n(),t){let o=[s[t.type],...r.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===o.filter((e=>!!e)).length&&(o=[a]),o.reduce(((e,n)=>{if(n){if(F_(e)){const s=n(e,t);return void 0===s?e:s}if(j_(e))return UN(e,(e=>n(e,t)));{const s=n(e,t);if(void 0===s){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return s}}return e}),e)}return o.getInitialState=n,o}var{assign:rT}=Object;function aT(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const oT=e=>{let t=new Set,n=t;const s=()=>{t===n&&(t=new Set(t))},r=e=>{let n=!0;return s(),t.add(e),()=>{n&&(s(),t.delete(e),n=!1)}},a=()=>{const e=Array.from(t);n=t,e.forEach((e=>e()))};return(...t)=>{const n=e(...t);let s=!1,o=!1;const i=e=>Array.isArray(e)?e.map(i):n.dispatch(e);return n.subscribe((()=>{o?s=!0:a()})),{...n,dispatch:e=>{const t=o;t||(s=!1,o=!0);const n=i(e),r=s&&!t;return t||(s=!1,o=!1),r&&a(),n},subscribe:r}}},iT=(e,t)=>{const{data:{shared:n={}}={},context:s}=t;((e,t)=>{af.updateDataPageStore(t),Object.keys(t).forEach((n=>{rS.getIn(e,[js.SHARED,n])?Object.keys(t[n]).forEach((s=>{rS.setIn(e,[js.SHARED,n,s],t[n][s])})):rS.setIn(e,[js.SHARED,n],t[n])}))})(e,n),s&&rS.deleteIn(e,[s,"shared"])},cT=(e,t,n=!1)=>{const{context:s,caseViewMode:r=(n?void 0:js.PERFORM_MODE),containerName:a}=t;a!==my.WORKAREA&&r&&rS.setIn(e,[s,"context_data","caseViewMode"],r)},lT=(e,t)=>{const{context:n}=t;rS.setIn(e,[n,"context_data","actionType"],t.actionType),rS.setIn(e,[n,"context_data","assignmentID"],t.assignmentID)},uT=e=>null!==e&&"object"==typeof e,dT=(e,t=[])=>{t.forEach((t=>rS.deleteIn(e,t)))},pT=(e,t=[])=>{t.forEach((t=>rS.deleteIn(e,t)))},gT=(e,t=[])=>{t.forEach((t=>{rS.deleteIn(e,t)}))},hT=(e,t,n={})=>{const{deleteAssignmentSpecificResources:s=!0,doDeleteConfirmationDetails:r=!0,skipMergeAssignmentsAndActions:a=!0}=n;rS.deleteIn(e,[t,"nextAssignmentInfo"]),a&&(rS.deleteIn(e,[t,js.CASE_INFO.CASE_INFO,"availableActions"]),rS.deleteIn(e,[t,js.CASE_INFO.CASE_INFO,"availableProcesses"]),rS.deleteIn(e,[t,js.CASE_INFO.CASE_INFO,"assignments"])),rS.deleteIn(e,[t,js.CASE_INFO.CASE_INFO,"activeActionID"]),rS.deleteIn(e,[t,js.CASE_INFO.CASE_INFO,"childCases"]),r&&(rS.deleteIn(e,[t,js.CASE_INFO.CASE_INFO,"confirmationLinks"]),rS.deleteIn(e,[t,"caseMessages"])),s&&(rS.deleteIn(e,[t,js.CASE_INFO.CASE_INFO,"actionButtons"]),rS.deleteIn(e,[t,js.CASE_INFO.CASE_INFO,"navigation"]))},fT=sT({},(e=>{e.addCase(Or,((e,t)=>{if(!t.payload.data||e[t.payload.context])return;t.payload.doDeleteCaseSummary&&hT(e,t.payload.context);const{target:n}=t.payload;n&&(n.includes(js.WORKAREA)||n.includes(js.MODAL))?e[t.payload.context]=t.payload.data:e[t.payload.containerItemID]=t.payload.data,cT(e,t.payload),lT(e,t.payload),iT(e,t.payload),((e,t)=>{const{context:n}=t;rS.deleteIn(e,[n,"context_data","blocking_action_counter"]),rS.deleteIn(e,[n,"context_data","deferred_action_queue"])})(e,t.payload)})).addCase(jr,((e,t)=>{t.payload.doDeleteCaseSummary&&hT(e,t.payload.context,{deleteAssignmentSpecificResources:t.payload.deleteAssignmentSpecificResources});const{target:n,propertiesToReplace:s=[]}=t.payload;if(n&&(n.includes(js.WORKAREA)||n.includes(js.MODAL))){const n=e[t.payload.context];uT(n)&&(e[t.payload.context]=XC(n,t.payload.data,{propertiesToReplace:[...s]}))}else{const n=e[t.payload.containerItemID];uT(n)&&(e[t.payload.containerItemID]=XC(n,t.payload.data,{propertiesToReplace:[...s]}))}(t.payload.actionType||t.payload.assignmentID)&&lT(e,t.payload),cT(e,t.payload),iT(e,t.payload),pT(e,t.payload.suggestionContexts)})).addCase(Rr,((e,t)=>{const{childContainersContexts:n=[]}=t.payload;((e,t)=>{const{containerItemID:n,context:s,deleteContext:r}=t;r&&rS.deleteIn(e,[s]),rS.deleteIn(e,[n])})(e,t.payload),gT(e,n),dT(e,t.payload.transientItems),pT(e,t.payload.suggestionContexts)})).addCase(Pr,((e,t)=>{const{containerItems:n}=t.payload;Array.isArray(n)?n.forEach((t=>{rS.deleteIn(e,[t])})):rS.deleteIn(e,[n])})).addCase(Vr,((e,t)=>{const{context:n,contextToBeRemoved:s,data:r,childContainersContextsToBeRemoved:a}=t.payload;hT(e,t.payload.context),cT(e,t.payload);const o=e[n],i=e[s];if(!uT(o)||!uT(i))return;const c=XC(o,i);uT(c)&&(e[n]=XC(c,r),rS.deleteIn(e,[s]),gT(e,a),iT(e,t.payload))})).addCase(kr,((e,t)=>{const{context:n,pulseReplace:s=!0,childContainersContexts:r=[]}=t.payload;let{data:a}=t.payload;const o=rS.getIn(e[n],"pulse");let i=rS.getIn(e[n],"OperatorID"),c=rS.getIn(e[n],"pxRequestor");c&&a.pxRequestor&&(c=rS.mergeDeep(c,a.pxRequestor)),i&&a.OperatorID&&(i=rS.mergeDeep(i,a.OperatorID)),!s&&o&&(a=ZC(a,"pulse",o),a=ZC(a,"OperatorID",i),a=ZC(a,"pxRequestor",c)),rS.setIn(e,n,a),cT(e,t.payload),iT(e,t.payload),gT(e,r),dT(e,t.payload.transientItems),pT(e,t.payload.suggestionContexts)})).addCase(ha,((e,t)=>{const{context:n,doDeleteConfirmationDetails:s=!0,skipMergeAssignmentsAndActions:r=!0}=t.payload;hT(e,n,{doDeleteConfirmationDetails:s,skipMergeAssignmentsAndActions:r})})).addCase(br,((e,t)=>{const{transientItemID:n,data:s}=t.payload;rS.setIn(e,n,s)})).addCase(xr,((e,t)=>{const{transientItems:n}=t.payload;n.forEach((t=>rS.deleteIn(e,t)))})).addCase(wr,((e,t)=>{const{transientItems:n}=t.payload;n.forEach((t=>rS.deleteIn(e,t)))})).addCase(vr,((e,t)=>{const{transientItemID:n,data:s}=t.payload;XC(rS.getIn(e,n),s)})).addCase(Mr,((e,t)=>{const{transientItemID:n,data:s}=t.payload;XC(rS.getIn(e,n),s)})).addCase(Lr,((e,t)=>{const{transientItemID:n,data:s}=t.payload;Object.keys(s??{}).forEach((t=>{rS.deleteIn(e,[n,t])}))})).addCase(Ur,((e,t)=>{const{transientItemID:n,data:s}=t.payload;rS.deleteIn(e,n),rS.setIn(e,n,s)})).addCase(ur,((e,t)=>{const{key:n,value:s}=t.payload;rS.setIn(e,`${js.SHARED}.${n}`,s)})).addCase(Gr,((e,t)=>{const{context:n,data:s}=t.payload;return rS.setIn(e,n,s)}))}));function mT(e){if("object"==typeof e&&null!==e&&"payload"in e&&"object"==typeof e.payload&&null!==e.payload){const t=e.payload.context;return"string"==typeof t?t:void 0}}const IT=KN(ma),ET=sT({},(e=>{e.addCase(Cr,((e,t)=>{const{propertiesToReplace:n=[],propertiesToReArrange:s=[],uiRootReference:r="",interestPath:a}=t.payload,o=r&&"string"==typeof t.payload.context?`${t.payload.context}.${r}`:t.payload.context,i="string"==typeof o?jC(o):[],c={isArrayDeepMerge:t.payload.isArrayDeepMerge,propertiesToReplace:[...n],propertiesToReArrange:[...s]};if(r&&i.length)rS.setIn(e,i,XC(rS.getIn(e,i),rS.getIn(t.payload.data,jC(r)),c));else if(a){const r=rS.getIn(e[t.payload.context],a),o=rS.getIn(t.payload.data,a),i=XC(r,o,{isArrayDeepMerge:!0}),c=rS.getIn(t.payload.data.context_data,a);JC(e[t.payload.context],[...n],[...s]),rS.setIn(e[t.payload.context],a,i),e[t.payload.context]&&c&&rS.setIn(e[t.payload.context].context_data,a,XC(rS.getIn(e[t.payload.context].context_data,a),c,{isArrayDeepMerge:!0}))}else e[t.payload.context]=XC(e[t.payload.context],t.payload.data,c);cT(e,t.payload,!0),iT(e,t.payload)})).addCase(Xs,((e,t)=>{const{context:n,reference:s,value:r,isArrayDeepMerge:a}=t.payload;ZC(e[n],s,r,{isArrayDeepMerge:a})})).addCase(Zs,((e,t)=>{const{context:n,reference:s,value:r}=t.payload;eS(e[n],s,r)})).addCase(Sr,((e,t)=>{KC(e[t.payload.context],t.payload.reference)})).addCase(or,((e,t)=>{rS.setIn(e[t.payload.context],"context_data.isLoading",!0)})).addCase(ir,((e,t)=>{rS.setIn(e[t.payload.context],"context_data.isLoading",!1)})).addCase(cr,((e,t)=>{const n=mT(t);n&&(e[n]||(e[n]={}),rS.setIn(e[n],"context_data.isOffline",!0))})).addCase(lr,((e,t)=>{const n=mT(t);n&&(e[n]||(e[n]={}),rS.setIn(e[n],"context_data.isOffline",!1))})).addCase(da,((e,t)=>{const{data:n}=t.payload;iT(e,{data:{shared:n}})})).addCase(pa,((e,t)=>{const{dataPagesToBeRemoved:n=[]}=t.payload;n.forEach((t=>{const{dataPageName:n,dataPageNameWithHash:s}=t;rS.deleteIn(e.shared,[n,s]);const r=rS.getIn(e.shared,[n]);r&&0===Object.keys(r).length&&rS.deleteIn(e.shared,[n])}))})).addCase(fa,((e,t)=>{const n=rS.getIn(e[t.payload.context].context_data,"blocking_action_counter",0);t.payload.isInitiateBlockingAction?rS.setIn(e[t.payload.context].context_data,"blocking_action_counter",n+1):rS.setIn(e[t.payload.context].context_data,"blocking_action_counter",n-1)})).addCase(IT,((e,t)=>{e.locale=rS.getIn(t.payload,"locale","")}))})),yT=/\[(\d+)\]$/gi,AT=/(\d+)/gi,CT=/\[\d+\]$/,ST=(e,t,n,s=[js.CONTEXT_DATA,js.CASE_INFO.CASE_INFO,js.CONTENT])=>{const r=rS.getIn(t,s);if(r){const t=cd(r,[],[]);for(const r of t)rS.setIn(e[n],[...s,...r],{})}},_T=(e,t,n,s)=>{const{property:r,pageReference:a,category:o,type:i,subType:c}=s.payload,l=rS.getIn(e[t],n);if(l&&o===js.CASEMESSAGES)rS.setIn(e[t],td(r,a,o),"");else if(l&&l.length>0&&Array.isArray(l)){let s;s=c?l.filter((e=>!(e.type===i&&e.subType===c))):l.filter((e=>e.type!==i)),n&&n.length>0&&rS.setIn(e[t],td(r,a,o),s)}},NT=(e,t)=>{const{property:n,pageReference:s,category:r,isListEntry:a,deletingIndex:o,stateObj:i}=t.payload,{context:c}=t.payload;if(i)return ST(e,i,c),e;const l=td(n,s,r,a);if(Number.isInteger(o)){rS.deleteIn(e[c],l);const t=l.slice(0,l.length-1);let n=rS.getIn(e[c],t)||{};const s=(u=Object.keys(n),[...u].sort(((e,t)=>{const n=e.match(yT),s=t.match(yT);if(!n&&!s)return e.localeCompare(t);if(!n&&s)return-1;if(n?.length&&s?.length){const e=n[0].match(AT),t=s[0].match(AT);if(e?.length&&t?.length)return parseInt(e[0],10)-parseInt(t[0],10)}return 1})));n=s.map((e=>n[e])),n.forEach(((n,r)=>{const a=s[r].match(yT);if(a?.length){const i=parseInt(a[0].match(AT)[0],10);i>o&&(rS.deleteIn(e[c],t.concat(s[r])),rS.setIn(e[c],t.concat(s[r].replace(CT,`[${i-1}]`)),n))}}))}else rS.setIn(e[c],l,{});var u;return e};function TT(e,t){const n=rS.getIn(e,t);return void 0!==n?.dataInfo?.content}const DT=(e,t)=>{const n=rS.getIn(e,t);return!0===YI.isObjectCaseType(n?.objectInfo?.objectTypeID)};function PT(e,t){let n=ed.FIELD_MESSAGES_PATH;return TT(e,t)?n=ed.DATA_OBJECT_FIELD_MESSAGES_PATH:DT(e,t)&&(n=ed.OBJECT_FIELD_MESSAGES_PATH),n}const OT=(e,t,n)=>{n.forEach((n=>{((e,t,n)=>{const s=rS.getIn(n,js.ERROR_FIELD_IN_PAGE).slice(1),r=rS.getIn(n,js.ERROR_IN_PAGE_IDENTIFIER).slice(1);if(r){let a="caseInfo.content";TT(e,t)?a="dataInfo.content":DT(e,t)&&(a="objectInfo.content");let o=s?`${a}.${s}`:a;o=o.replace(/\(/g,"[").replace(/\)/g,"]");const i=td(r,o,js.PROPERTY),c=rS.getIn(e[t],`${o}.classID`),l=oC(r,c),u=PA.getLocale()??"en-US",d=new nm(u,l?.localeReference),p={type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue,...l?.label&&{fieldLabel:d.getLocalizedText(l.label)}},g=rS.getIn(e[t],i,[]);if(rS.isContains(g,p))return;rS.setIn(e[t],i,[...g,p])}})(e,t,n)}))};function RT(e,t){const{err:n,formFields:s}=t.payload;let{context:r}=t.payload;const{fieldErrors:a,pageErrors:o}=((e,t)=>{const n=new Map(t.map(((e,t)=>[e,t]))),s=e=>n.get((e=>{const t=(e.erroneousInputOutputFieldInPage||"").replace(/^\./,""),n=(e.erroneousInputOutputIdentifier||"").replace(/^\./,"");return t?`${t}.${n}`:n})(e))??Number.MAX_SAFE_INTEGER,r=e.slice().sort(((e,t)=>s(e)-s(t))),a=[],o=[];for(const e of r)lI(e,t,a,o);return{fieldErrors:o,pageErrors:a}})(n.errorDetails,s),i=PT(e,r);if(rS.setIn(e,[r,...i],{}),rS.setIn(e,[r,...ed.PAGE_MESSAGES_PATH],[]),a.forEach((t=>{const n=rS.getIn(t,js.ERROR_FIELD_IN_PAGE);if(n){const t=n.slice(1);if(t){const n=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)}(t);if(!n)return!1;const s=t.substring(t.lastIndexOf(".")+1),a=td(s,n,js.PROPERTY);rS.setIn(e,[r,...a],[])}}})),a.length>0&&OT(e,r,a),o.length>0){const t=(e=>{const t=[];return e.forEach((e=>{const n=e.erroneousInputOutputFieldInPage?.replace(/^\./,"");t.push({type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue,...n&&{fieldInPage:n}})})),t})(o);e[r]||(r=js.APP.APP),rS.setIn(e,[r,...ed.PAGE_MESSAGES_PATH],t)}else r.includes&&r.includes(my.WORKAREA)&&(r=Ws(r)),rS.deleteIn(e,[r,...ed.PAGE_MESSAGES_PATH]);return e}const bT=sT({},(e=>{e.addCase(Tr,((e,t)=>t.payload.err.errorDetails&&(t.payload.err.errorClassification===Fs.VALIDATION_FAIL||t.payload.err.errorClassification===Fs.INVALID_INPUTS||(t.payload.err?.displayButtonsOnErrors?.length??0)>0)?RT(e,t):e)).addCase(jr,((e,t)=>{const{context:n}=t.payload,s=[n,...PT(e,n)],r=[n,...ed.PAGE_MESSAGES_PATH];if(rS.setIn(e,s,{}),rS.setIn(e,r,[]),n&&n.includes(my.WORKAREA)){const t=[Qs(n),...ed.PAGE_MESSAGES_PATH];rS.setIn(e,t,[])}})).addCase(ca,((e,t)=>{const{isListEntry:n,clearAll:s,context:r}=t.payload;return s?(rS.deleteIn(e,[r,js.CONTEXT_DATA]),e):n?NT(e,t):((e,t)=>{const{property:n,pageReference:s,category:r,isListEntry:a,stateObj:o}=t.payload,{context:i}=t.payload;let c=i;if(o)return ST(e,o,i),e;const l=td(n,s,r,a);return r===js.PAGE&&i?.includes(my.WORKAREA)&&(c=Ws(i)),_T(e,c,l,t),_T(e,i,l,t),e})(e,t)})).addCase(ia,((e,t)=>{const{messages:n,property:s,pageReference:r,context:a,category:o}=t.payload,i=td(s,r,o);n&&n.length>0&&Array.isArray(n)&&i&&i.length>0&&rS.setIn(e[a],td(s,r,o),n)}))})),vT=(e,t,n,s,r)=>{rS.setIn(e[t],[...n,s],r)},xT=[ET,fT,bT,sT({},(e=>{e.addCase(ga,((e,t)=>{const{instruction:n,actions:s,context:r,referenceList:a,listIndex:o,groupIndex:i,listMoveToIndex:c,content:l={}}=t.payload,u=jC(a);switch(n){case js.LIST_ACTIONS.ADD:vT(e,r,u,i,l);break;case js.LIST_ACTIONS.INSERT:vT(e,r,u,o,l);break;case js.LIST_ACTIONS.UPDATE:((e,t,n,s,r)=>{const a=XC(rS.getIn(e[t],[...n,s],{}),r);rS.setIn(e[t],[...n,s],a)})(e,r,u,o??i,l);break;case js.LIST_ACTIONS.DELETE:((e,t,n,s,r)=>{const a=rS.getIn(e[t],n,[]);"string"==typeof s?delete a[s]:a.splice(s,1),rS.setIn(e[t],n,a),Zu.deleteListNode(t,[r],a.length)})(e,r,u,o??i,a);break;case js.LIST_ACTIONS.MOVE:((e,t,n,s,r)=>{const a=rS.getIn(e[t],[...n,s],{}),o=rS.getIn(e[t],n,[]);o.splice(s,1),o.splice(r,0,a),rS.setIn(e[t],n,o),rd(e,t,n?.join("."),s,r)})(e,r,u,o,c);break;case js.LIST_ACTIONS_TYPE.SELECT_DESELECT:((e,t,n,s)=>{const r=rS.getIn(e[t],n)||[];s.forEach((e=>{const{instruction:s,content:a,listIndex:o}=e;if(s===js.LIST_ACTIONS.SELECT){r[o]=a;const e=n?.join(".");fp(t,e)}else delete r[o]})),rS.setIn(e[t],n,r.filter(Boolean))})(e,r,u,s);break;case js.LIST_ACTIONS_TYPE.DESELECT_ALL:((e,t,n)=>{rS.setIn(e[t],n,[])})(e,r,u);break;case js.LIST_ACTIONS.REPLACE:((e,t,n,s)=>{rS.setIn(e[t],n,s)})(e,r,u,l);break;case js.LIST_ACTIONS.DELETEPAGE:((e,t,n)=>{rS.setIn(e[t],n,{})})(e,r,u)}}))}))],wT=(e,t)=>(e||(e=VT().data),t.type===la?VT().data:(xT.forEach((n=>{e=n(e,t)})),e)),MT={},LT=(e,t=[])=>{t.forEach((t=>{rS.deleteIn(e,[t])}))},UT=(e,t)=>{const{type:n,payload:s}=t,r=n===jr,{target:a,context:o,semanticURL:i="",root:c,containerItemID:l,childContainers:u,flowName:d,resourceType:p="",key:g="",clearView:h=!1}=s;return c?rS.setIn(e,[a,"items",l,"view"],c):h&&rS.deleteIn(e,[a,"items",l,"view"]),o&&rS.setIn(e,[a,"items",l,"context"],o),d&&rS.setIn(e,[a,"items",l,"flowName"],d),(!r||r&&g)&&rS.setIn(e,[a,"items",l,"key"],g.trim()),((e,t,n,s)=>{""===e&&rS.deleteIn(t,[n,"items",s,"key"])})(g,e,a,l),(!r||r&&i)&&rS.setIn(e,[a,"items",l,"semanticURL"],i),(!r||r&&p)&&rS.setIn(e,[a,"items",l,"resourceType"],p),LT(e,u),e},FT=sT(MT,(e=>{e.addCase(la,(()=>MT)).addCase(Dr,((e,t)=>{const{context:n,name:s,type:r,actionMgrID:a}=t.payload,o=`${n}/${s}`;if(Dg.resolveActionByID(a,null,!1),e[o])return e;rS.setIn(e,[o],{type:r,accessedOrder:[],items:{}})})).addCase($r,((e,t)=>{const{containerName:n,childContainers:s=[]}=t.payload;rS.deleteIn(e,[n]),s.forEach((t=>{rS.deleteIn(e,[t])}))})).addCase(Pr,((e,t)=>{const{context:n,name:s,actionMgrID:r,childContainers:a}=t.payload,o=`${n}/${s}`;Dg.resolveActionByID(r,null,!1),rS.setIn(e,[o,"accessedOrder"],[]),rS.setIn(e,[o,"items"],{}),Array.isArray(a)&&a.forEach((t=>{rS.deleteIn(e,[t])}))})).addCase(Or,((e,t)=>{const{target:n,context:s,isInCreateStage:r,isBulkAction:a,semanticURL:o,root:i,containerItemID:c,actionMgrID:l,key:u,flowName:d,resourceType:p,actionName:g,isMinimizable:h,showProgress:f,progressMessage:m,modalOptions:I,resourceStatus:E,actionID:y,isMultiRecordData:A,acTertiary:C,parentContext:S,heading:_,isTraditionalRemoteCase:N,readOnly:T,referenceList:D,subscriptName:P,subscriptFieldName:O,pageGroupName:R,isPageGroup:b,index:v,isDeleteConfirmation:x,workId:w,caseTypeID:M,className:L,keys:U,enableBackNavigation:F}=t.payload,j=e[n],V=j&&j.type,k=j&&j.accessedOrder||[],B=j&&j.items||{};if(e[n]&&"single"===V&&k.length>0)return UT(e,t);const $={accessedOrder:[...k,c],items:{...B,[c]:{view:i,semanticURL:o,key:u,flowName:d,readOnly:T,context:s,isInCreateStage:r,resourceType:p,actionName:g,isMinimizable:h,...a&&{isBulkAction:a},showProgress:f,progressMessage:m,modalOptions:I,isTraditionalRemoteCase:N,resourceStatus:E,referenceList:D,subscriptName:P,subscriptFieldName:O,pageGroupName:R,isPageGroup:b,index:v,...y&&{actionID:y},...C&&{acTertiary:C},...A&&{isMultiRecordData:A},...S&&{parentContext:S},...x&&{isDeleteConfirmation:x,workId:w,caseTypeID:M,className:L,keys:U,enableBackNavigation:F},heading:_}}};Dg.resolveActionByID(l,null,!1),e[n]=vs(e[n],$)})).addCase(jr,((e,t)=>{const{actionMgrID:n,data:s}=t.payload;try{UT(e,t),Dg.resolveActionByID(n,s,!1)}catch{Dg.rejectActionByID(n,!1)}})).addCase(kr,((e,t)=>((e,t)=>{const{actionMgrID:n,data:s,target:r,containerItemID:a}=t.payload;let o=e;try{const i=e&&e[r]?.type;let c=e&&e[r]?.accessedOrder||[];c="single"===i?c.length>0?c:[...c,a]:c.includes(a)?c:[...c,a],rS.setIn(e,[r,"items",a,"transientItems"],[]),rS.setIn(e,[r,"accessedOrder"],c),o=UT(e,t),Dg.resolveActionByID(n,s,!1)}catch{Dg.rejectActionByID(n,!1)}return o})(e,t))).addCase(Fr,((e,t)=>{const{target:n,containerItemID:s,actionMgrID:r}=t.payload;try{const t=rS.getIn(e,[n,"accessedOrder"]).filter((e=>e!==s));t.push(s),rS.setIn(e,[n,"accessedOrder"],t),Dg.resolveActionByID(r,null,!1)}catch{Dg.rejectActionByID(r,!1)}})).addCase(Vr,((e,t)=>{const{target:n,containerItemID:s,actionMgrID:r,childContainers:a}=t.payload;try{const t=rS.getIn(e,[n,"accessedOrder"]).filter((e=>e!==s));rS.setIn(e,[n,"accessedOrder"],t),rS.deleteIn(e,[n,"items",s]),LT(e,a),Dg.resolveActionByID(r,null,!1)}catch{Dg.rejectActionByID(r,!1)}})).addCase(Rr,((e,t)=>{const{target:n,containerItemID:s,actionMgrID:r,childContainers:a}=t.payload;try{const t=rS.getIn(e,[n,"accessedOrder"]).filter((e=>e!==s));rS.setIn(e,[n,"accessedOrder"],t),rS.deleteIn(e,[n,"items",s]),LT(e,a),Dg.resolveActionByID(r,null,!1)}catch{Dg.rejectActionByID(r,!1)}})).addCase(br,((e,t)=>{const{transientItemID:n,target:s,contextName:r}=t.payload,a=rS.getIn(e,[s,"items",r,"transientItems"])??[];rS.setIn(e,[s,"items",r,"transientItems"],[...a,n])})).addCase(wr,((e,t)=>{const{target:n,containerItemID:s}=t.payload;rS.deleteIn(e,[n,"items",s,"transientItems"])})).addCase(xr,((e,t)=>{const{target:n,transientItemID:s,containerItemID:r}=t.payload,a=(rS.getIn(e,[n,"items",r,"transientItems"])??[]).filter((e=>e!==s));rS.setIn(e,[n,"items",r,"transientItems"],a)}))}));let jT={};const VT=()=>jT,kT=e=>((e=>{const t=e.Data||e.data,{uiResources:n={}}=e,s=n[js.CONTEXT_DATA]||e[js.CONTEXT_DATA];jT={data:{locale:PA.getLocale(),[js.APP.APP]:{...t,[js.CONTEXT_DATA]:s}},containers:{}}})(e),{data:wT,containers:FT}),BT=(e,t=!1)=>e===js.ACTION?t?Nf.REFRESH_CASE_DATA:Nf.REFRESH_ASSIGNMENT_DATA:Nf.REFRESH_CASE_VIEW,$T=(e,t,n)=>{const s=[];t&&n&&s.push({page:t,actionID:n});let r=e;for(;r;){const e=cS.getPropertyValue(js.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,"",r);if(!e?.isMultiRecordData||e.editType!==js.ACTION||!e.interestPage||!e.interestPageActionID)break;e.interestPage!==t&&s.unshift({page:e.interestPage,actionID:e.interestPageActionID}),r=e.parentContext}return s},GT=e=>{const{context:t}=e;let n={...rI(t).content,contextData:!1};const s=PI(t);rS.isEmpty(s)||(n=DI(s,n));const r=BT(e.editType,e.isLocalAction),{restApi:a,reqType:o}=i_(r,{ID:e.isLocalAction||e.editType!==js.ACTION?e.ID:e.assignmentID,actionID:e.actionID,viewID:e.viewID});let i=a;return e.editType===js.ACTION&&(i+=`?operation=${e.operationFlag}`,n.interestPageActionID=e.interestPageActionID,PA.getFeatureMap()?.pyEnableOptimisationForEmbedTable&&(n.actionIdArrayToBeProcessed=$T(t,e.interestPage,e.interestPageActionID))),n.interestPage=e.interestPage,Mu(Wd(i,{method:o,body:n,headers:e.headers},t)).pipe(Xg((t=>({actionInPayload:e,response:t.data,headers:sI(t.headers)}))),ph(": Error occurred during ajax call : ",t))},WT={},{VIEW:HT,FIELD:qT}=js.CONTEXT_TREE_NODE_TYPES,zT=(e,t,n)=>{const s=t.value.data[n]?.objectInfo?.headers,r=t.value.data[n]?.caseInfo?.headers;return!YI.shouldUseUnifiedHandling()&&e&&s?s:r},YT=e=>Ld[e]>0&&WT[e],KT=(e,t)=>{const{caseWideAction:n,caseViewAction:s,fieldsWithDeclarativeTargets:r,fieldsWithWhen:a,isViewsWithWhen:o,interestPage:i,options:c,isMultiRecordData:l,editType:u,isLocalAction:d,interestPageActionID:p,context:g}=e,{optionalPayload:h}=c;h&&(t.content={...h});let f={},m={...t},I=Nf.REFRESH;if(s||l&&u===js.ACTION){const t=BT(u,d);l&&u===js.ACTION&&(m.interestPageActionID=p,PA.getFeatureMap()?.pyEnableOptimisationForEmbedTable&&(m.actionIdArrayToBeProcessed=$T(g))),f=i_(t,e),m={...m,interestPage:i}}else o?f=((e,t)=>{const{isObjectType:n,isExternalObject:s,actionID:r,context:a,isExternalCase:o,casetypeID:i}=e,c=js.getDefaultQualifiedName(js.VIEW_NAMES.OBJECT_CREATE_VIEW);if(t||n&&EE(a)){let t=s&&r===c?Nf.REFRESH_EXTERNAL_OBJECT:Nf.REFRESH_CASE_DATA;const n=YI.shouldUseUnifiedHandling();return s&&r===c&&n&&(t=Nf.REFRESH_EXTERNAL_CASE_DATA),i_(t,e)}return i_(o&&i&&r===c?Nf.REFRESH_EXTERNAL_CASE_DATA:Nf.REFRESH_ASSIGNMENT_DATA,e)})(e,n):(r.length>0||a.length>0)&&({restAPI:f,requestBody:m,requestType:I}=((e,t,n,s,r)=>(r={...r,calculations:{fields:t,whens:n}},{restAPI:i_(s?Nf.RECALCULATE_CASE_DATA:Nf.RECALCULATE_ASSIGNMENT_DATA,e),requestBody:r,requestType:Nf.RECALCULATE}))(e,r,a,n,m));return{restAPI:f,requestBody:m,requestType:I}},QT=[(e,t)=>e.pipe(lh(Nf.REFRESH_DATA,Pa),Xg((e=>e.payload)),ih((e=>!Jm(e?.options?.actionMgrID))),Zg((e=>{const{context:n,contextData:s,options:r,isObjectType:a}=e,{propertyName:o="",classID:i="",isObjectWideAction:c,skipPayloadGeneration:l}=r,u=l?{content:{}}:rI(n,{skipUUID:!1,isObjectWideAction:c});let d=[],p=[],g=!1;PA.getFeatureMap().granularUIRefresh?(({fieldsWithDeclarativeTargets:d=[],whens:p=[]}=NE(n)),g=p.some((e=>e.type===HT))):g=!0;const h=p.filter((e=>e.type===qT)),f=rS.getPropertyName(o),m=f?f.split("."):[],I=m.pop(),E=m.join("."),y=[];E&&((e,t,n,s,r)=>{const a=oC(e,t);if(!a||"copy"!==a.dataRetrievalType)return;const o=rS.getIn(n,`content.content.${e}`);if(!o||"object"!=typeof o)return;(s?Object.keys(o).filter((e=>e!==s)):Object.keys(o)).length>0&&r.push(e)})(E,i,u,I,y),e.serverPrecedenceFields=y;let A={...u.content,contextData:s};const C=PI(n);rS.isEmpty(C)||(A=DI(C,A));const S=KT({...e,fieldsWithDeclarativeTargets:d,fieldsWithWhen:h,isViewsWithWhen:g},A);xf.registerBlockingAction(n).catch((()=>{}));const{restAPI:_,requestBody:N,requestType:T}=S;(e={...e,requestType:T}).requestType=T;const{reqType:D,restApi:P}=_,O={...zT(a,t,n)};O&&!O.etag&&e.isMultiRecordData&&e.editType===js.ACTION&&(O.etag=rS.getETag(e.context));return Mu(((e,t)=>{const{context:n}=e;(e=>{const{reqHeaders:t}=e;t&&(e.headers=e.headers||{},t.etag&&(e.headers["if-match"]=t.etag))})(e);const s=(e=>{const{ID:t,actionID:n,context:s}=e;return`${t}.${s}.${n}`})(t);if(t.interestPage&&(e.interestPage=t.interestPage),YT(s)){const t=[];for(let n=0;n<WT[s].length;){const r=WT[s][n],a=_E(r,e);if("CANCEL_REFRESH"===a){const e=new Error;return e.code="ERR_CANCELED",Promise.reject(e)}!0===a&&(t.push(n),r.cancelConfig?.cancel()),n+=1}t.forEach((e=>{WT[s].splice(e,1)}))}const r=zd();return e.signal=r.token,e.cancelConfig=r,WT[s]?WT[s].push(e):WT[s]=[e],fd.publish(Fs.PUB_SUB_EVENTS.ON_REFRESH_START,{context:n}),Wd(e.url,e,n,{cancelContext:s}).then((e=>(delete WT[s],e))).catch((e=>{throw e&&"ERR_CANCELED"!==e.code&&delete WT[s],e}))})({reqHeaders:O,context:n,method:D,body:N,url:CE(e,P)},e)).pipe(Xg((t=>{const s=((e,t,n)=>{const s=YI.shouldUseUnifiedHandling(),r=YI.isObjectCaseType(t)||n;if(s||!r)return e;const a=rS.getIn(e?.data,Fs.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID);return YI.isExternalObject(a)?e:Us.transformCaseData(e)})(t?.data,r?.classID,a);return r?.resetForm&&Zu.removeContextTreeNode(n),{response:{...s},actionConfig:e,actionMgrID:e.options.actionMgrID,headers:sI(t.headers)}})),ph(": Error occurred during fetch call at refreshData Epic : ",e.context,e?.options?.actionMgrID))})),Zg((async e=>{if(e&&e.type===Tr)return xf.deRegisterBlockingAction(e.payload?.context).catch((()=>{})),"ERR_CANCELED"===e.payload?.err?.code?[]:(fd.publish(js.ON_REFRESH_ERROR,{context:e.payload?.context}),uI(e));const{actionConfig:t,response:n,actionMgrID:s}=e,{context:r,serverPrecedenceFields:a,requestType:o}=t,i=Og.getTargetViewContainerName(Wr),c=Va(i,r),l={acName:c,context:r},u=am(n,{[Fs.STOPMERGEACTIONS]:!0,[Fs.ACTIONS.DELETEAVIALACTIONS]:!0});u.directUrlUpdation=!1,o===Nf.REFRESH&&await oI(u,t,l);const d=aI(u,{target:c,context:r});t.interestPage&&(d.interestPath=`caseInfo.content${rS.convertClipboardPageToPageRefNotation(t.interestPage)}`),d.isArrayDeepMerge=t.options?.isArrayDeepMerge,d.preserveClientChanges=void 0===t.options?.preserveClientChanges||t.options.preserveClientChanges;const p=YI.getPropertiesToReArrange(r),g=$S(fS,d,{serverPrecedenceFields:a,propertiesToReArrange:p}),h=g.payload?.data?.pageInstructions;return h?.length>0&&(delete g.payload?.data?.pageInstructions,vI.mergeServerPageInstructions(r,h)),BC(g),Dg.resolveActionByID(s,d),fd.publish(Fs.PUB_SUB_EVENTS.ON_REFRESH_COMPLETE,{context:r}),xf.deRegisterBlockingAction(r).catch((()=>{})),[]})))],JT=[e=>e.pipe(lh(ua),Zg((async e=>{const{context:t}=e.payload,n={},s={},r=Object.keys(e.payload.datapages).map((r=>{const a=e.payload.datapages[r];if(a.mode===js.READONLY&&a?.refreshStrategy){const{timeoutSecs:e="",type:t=""}=a?.refreshStrategy||{},n=GC()[a.name];if(n&&r in n){const s=n[r],{loadTime:a}=s;if(!Ch.isTimeElapsed(a,e,t))return}}return Ch.getData(a.name,{dataViewParameters:a.dataViewParameters},t).then((e=>{const t=a.mode===js.READONLY?s:n;t[a.name]?t[a.name][r]={pxResults:e.data.data,parameters:a.dataViewParameters,loadTime:e.data?.fetchDateTime}:t[a.name]={[r]:{pxResults:e.data.data,parameters:a.dataViewParameters,loadTime:e.data?.fetchDateTime}}})).catch((()=>{}))}));await Promise.allSettled(r);const a=[];return Object.keys(n).length&&a.push(fS({context:t,data:n})),Object.keys(s).length&&a.push(WS({data:s,context:t})),BC(a),[]})))];class XT{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";static CANCEL_CASE="cancelCase";static CREATE_WORK="createWork";constructor(){this.broadcastChannel=null,this.callback=null,this.isReverseCoexistenceCase=!1,this.broadcastEventToIframe=!1,this.isDirtyDialogActive=!1,this.onCreateCallback=null,this.openAssignmentParams=null}getGlobalObject=()=>r.g;getUniqueId=()=>this.getGlobalObject().uniqueId;setUniqueId=()=>{this.getGlobalObject().uniqueId=(new Date).getTime()};initBroadcastChannel=()=>{this.setUniqueId(),this.broadcastChannel=new BroadcastChannel("coexistence"),this.broadcastChannel.onmessage=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId())switch(e.data.action){case XT.DISPLAY_DIRTY_POPUP:this.displayDirtyPopup(e);break;case XT.LOAD_PREVIEW:this.loadPreview(e);break;case XT.UPDATE_COEXISTENCE_DRILLDOWN_CASE:this.updateCoexistenceDrilldownCase(e);break;case XT.OPEN_ASSIGNMENT_ACTION:this.openAssignment(e);break;case XT.GET_NEXT_WORK_ACTION:this.getNextWork(e);break;case XT.OPEN_WORK_BY_HANDLE:this.openWorkByHandle(e);break;case XT.CLOSE_CONTAINER_ACTION:this.closeContainer(e);break;case XT.CANCEL_CASE:this.handleCaseCancel();break;case XT.CREATE_WORK:this.createWork(e)}}};displayDirtyPopup=e=>{this.broadcastEventToIframe=e.data.fromInfinity,this.isDirtyDialogActive||(e.data.isFormDirty?(fd.publish(js.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0):this.callback?.call(this))};handleCaseCancel=()=>{const e=jy(Fs.APP.APP),t=e[e.length-1],n=xy(t),s=$C(n)?.caseInfo?.ID;if(s&&n&&Cm({}).getPConnect().getActionsApi().getDescendants(s,n),Vm(n)){const e=yA(n);e&&Cm({}).getPConnect().getActionsApi().getDescendants(s,e)}};loadPreview=e=>{const{pyID:t,caseClassName:n,uniqueId:s}=e.data;if(s===this.getUniqueId()){Cm({}).getPConnect().getActionsApi().showCasePreview(t,{caseClassName:n})}};navigateToDefaultPage=()=>{const e=`${Fs.APP.APP}${js.FORWARD_SLASH_STRING}${Fs.PRIMARY}`;if(!0!==By(e))return;const t=Ls.getDefaultQualifiedName("Data-Portal"),n=Ls.getDefaultQualifiedName("pyHome"),s=Cm({isRoot:!0}),r=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages;let a;Array.isArray(r)&&r[0]&&(a=r[0]);const o=a?.pyClassName||t,i=a?.pyRuleName||n;s.getPConnect().getActionsApi().showPage(i,o)};closeContainer=e=>{const{uniqueId:t}=e.data;t===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{const{key:t,caseClassName:n,actionApi:s,caseLabel:r,uniqueId:a}=e.data;if(a!==this.getUniqueId())return;let o=s;s===XT.OPEN_WORK_ITEM&&(o=XT.OPEN_WORK_BY_HANDLE),TA.updateSemanticURLAndDocumentTitle({key:t,caseClassName:n,actionName:o,name:r});Cm({}).getPConnect().getActionsApi().updateRecents(n,t.substring(t.lastIndexOf(" ")+1),r,t)};openAssignment=e=>{const{pzInsKey:t,caseClassName:n,uniqueId:s}=e.data;if(s===this.getUniqueId()){if(this.onCreateCallback&&this.openAssignmentParams&&(t&&this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=t:this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data&&(this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle"),t)){Cm({}).getPConnect().getActionsApi().openAssignment(t,n,{containerName:Fs.PRIMARY,context:Fs.APP.APP})}this.onCreateCallback=null,this.openAssignmentParams=null}};getNextWork=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId()){const e=`${Fs.APP.APP}${js.FORWARD_SLASH_STRING}${Fs.PRIMARY}`;Cm({meta:{},options:{context:Uy(e)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{const{key:t,caseClassName:n,uniqueId:s}=e.data;if(s===this.getUniqueId()){const e=`${Fs.APP.APP}${js.FORWARD_SLASH_STRING}${Fs.PRIMARY}`;Cm({meta:{},options:{context:Uy(e)}}).getPConnect().getActionsApi().openWorkByHandle(t,n)}};createWork=e=>{const{strClassName:t,uniqueId:n,strFlowParams:s,caseInitProperties:r}=e.data;if(n===this.getUniqueId()){const e=`${Fs.APP.APP}${js.FORWARD_SLASH_STRING}${Fs.PRIMARY}`,n=Cm({meta:{},options:{context:Uy(e)}}),a=new URLSearchParams((r+s).slice(1)),o=this.setStartingFields(a);n.getPConnect().getActionsApi().createWork(t,{startingFields:o})}};setStartingFields=e=>{const t={};return e.forEach(((e,n)=>{n&&(t[n]=e)})),t};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),fd.subscribe(Fs.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),fd.subscribe(Fs.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{fd.unsubscribeAllWithEventType(Fs.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),fd.unsubscribeAllWithEventType(Fs.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:XT.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:XT.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:XT.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=t,this.openAssignmentParams=n}}const ZT=new XT,eD="nextAssignmentInfo",tD="nextAssignmentInfo.context",nD=e=>{const{containerName:t,isInCreateStage:n}=e;return n?js.MODAL:t||Og.getTargetViewContainerName(Qr)},sD=async(e,t)=>{if(By(e))return{continueExecution:!0,removeActionPayload:{},dirtyCheckPerformed:!1};return{...await mI(e,t),dirtyCheckPerformed:!0}},rD=e=>{if(YI.shouldUseUnifiedHandling()&&!PA.isInfinityRuntime())return e?.uiResources?.root?.config?.name===Ls.getDefaultQualifiedName("pzCreateDetails")||!1;const t=rS.getIn(e,[js.DATA,js.CASE_INFO.CASE_INFO]);return QI(t)&&JI(PA.getOperatorIdentifier(),t)},aD=(e,t)=>{const{class:n,context:s,viewType:r=tI.PAGE}=e,{removeActionPayload:a}=t;let o=e?.pageName?e?.pageName:PA.getDefaultCasePage();return e.isTraditionalUICase&&(o=Ls.getDefaultQualifiedName("pyDetails")),Mu(Zp.createCase(n,{...e,pageName:o,viewType:r,context:s})).pipe(Xg((({response:t,headers:n})=>(Us.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:a}))),ph("Error occurred during ajax call at createWork Epic : ",s))},oD=e=>{fd.publish(js.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,e)},iD=e=>{fd.publish(js.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)},cD=e=>{fd.publish(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_VIEW_OPENED_AFTER_CREATE,e)},lD=e=>{let t,n=0,s=[],r={},a=!1,o=!1;return e.pipe(lh(pS),gh(100),Xg((e=>(({actionMgrID:n}=e.payload),e.payload))),Zg((e=>{const{context:s}=e;if(t=e.class,o=!1,YI.isExternalCaseType(t)&&(od({context:s,stateObj:$C(s),clearContextMessages:!0}),!GI(s))){const e={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return Dg.rejectActionByID(n,!0,e),dh()}const r=nD(e),i=Va(r,s);return a=Gm(t),Mu(sD(i,{loadingContext:s})).pipe(Zg((({continueExecution:t,removeActionPayload:s,dirtyCheckPerformed:r})=>t?(o=r,e.isTraditionalUICase=a,aD(e,{removeActionPayload:s})):(Dg.rejectActionByID(n),uh))))})),Zg((async e=>{if(e?.type===Tr)return e.payload.context=((e,t)=>YI.isExternalCaseType(e)&&t?t:gA())(t,e.payload.context),s.push(uI(e)),s;const{actionInPayload:i,response:c,headers:l,removeActionPayload:u}=e,d=YI.isExternalCaseType(i.class);let p=rD(c);(i.renderInline||PA.getDefaultCasePage()||a)&&(p=!1),rS.setIn(c.data,Fs.CASE_INFO.IS_FIRST_ASSIGNMENT,!0);const g=nD({...i,isInCreateStage:p}),h=Va(g,i.context),f=gI(h,g,i.context),{openCaseViewAfterCreate:m}=i;if(!o&&((e,t,n)=>!Pm(e)&&By(t)&&(n??!0))(g,h,m)){const{continueExecution:e}=await mI(h,{loadingContext:i.context});if(!e)return Dg.rejectActionByID(n),s}const I=i?.openCaseViewAfterCreate??!0,E=am(c);if(!I&&!p&&!(e=>$y(e)&&PA.isOpenCasePageAfterCreateInMultiDocEnabled())(h)){const e=Um(c),{businessID:t,caseType:n,resolvedURL:a,caseTypeName:o}=Fg(c);return r={caseId:t,label:o,href:a},oD(r),iD({caseId:t,assignmentId:e,caseType:n,ID:Lm(E)}),d&&jm(i),s}const y=String(xm(Lm(E)));let A=a_("createWork",{caseClassName:wm(E)});A=A.replace(/{.+?}/,y),E.semanticURL=A,Ng.setComponentCache(y,wd.addDebugHeaders(i.debugInfo)),((e,t)=>{const n=rD(e),{skipBrowserSemanticUrlUpdate:s=!1,isTraditionalUICase:r}=t,a=r&&!Wm();rS.setIn(e,["directUrlUpdation"],(!n||a)&&!s)})(E,i);const C={acName:h,context:f},S=Qm(f);await oI(E,i,C);const _={target:h,context:f,containerItemID:f,headers:l,semanticURL:A,isInCreateStage:p,isMinimizable:p,caseViewMode:E.confirmationNote?js.REVIEW_MODE:js.PERFORM_MODE,currentCaseViewMode:S,assignmentContext:rS.getIn(E,tD),nextAssignmentInfo:rS.getIn(E,eD),resourceType:Fs.CASE,openCaseViewAfterCreate:i.openCaseViewAfterCreate,modalOptions:i.modalOptions,debugInfo:i.debugInfo};km(_,E);const N=aI(E,_);pI(N.data,i.remoteCaseMeta),a&&(delete N.data.caseInfo.actionButtons,N.data.caseInfo.content.coexistenceAction="openAssignment"),YI.setTraditionalGadgetId(N.data);const T=dI(h,N);return hI(T)&&Fm(s,{removeActionPayload:u,target:h}),d&&jm(i),s.push(T),Km(E,_),cD({caseId:y}),s})),Xg((()=>{const e=Wm(),t=QI(rS.getIn(s[0]?.payload,"data.caseInfo"));return a&&e&&t?ZT.postCreateCaseMessage(s[0]?.payload?.nextAssignmentInfo?.ID,TI,s):TI(s),$m(s,n),r={},s=[],s})))},{RESOURCE_TYPES:uD}=Fs,dD=(e,t)=>{const{containerItemID:n,context:s,actionMgrID:r,isInCreateStage:a,isModalAction:o}=t;if(a&&o){const t=Tm(n),a=Va(t,s);e.push($S(wS,{containerItemID:n,target:a,actionMgrID:r}))}},pD=(e,t)=>{const{containerItemID:n,skipReleaseLockRequest:s,isInCreateStage:r,isProcessAction:a}=t,o=Ly(n),i=`${o?.includes("root")?js.APP.ROOT:js.APP.APP}/${my.MODAL}`;e.push($S(LS,{containerItemID:n,context:o,target:i,skipReleaseLockRequest:s,isInCreateStage:r,isProcessAction:a}))},gD=e=>HC(".openCaseViewAfterCreate",js.CONTEXT_DATA,e)??!0,hD=async(e,{translatedDXAPIResponse:t,actionInPayload:n},s,r,a)=>{const{caseID:o}=n,i=(c=t,rS.getIn(c,_m.NEXT_ASSIGNMENT_INFO_ID,js.EMPTY_STRING));var c;const l=r?xg(t):wm(t),{caseViewMode:u,headers:d,semanticURL:p,actionMgrID:g,directUrlUpdation:h,key:f,flowName:m,resourceType:I}=s,E=Qy(n?.context),y=Cy(E,n?.context)?.acTertiary;Object.assign(a,{caseId:o,assignmentId:i,caseType:l,isSubmitFromBlendedUI:y}),pD(e,{...n,skipReleaseLockRequest:!0});const A=`${n?.containerItemID.includes("root")?js.APP.ROOT:js.APP.APP}/${my.PRIMARY}`,C=gI(A,my.PRIMARY),S=wd.getCoreHeadersFromContext(n.context)||!1,_=aI(t,{target:A,context:C,containerItemID:C,caseViewMode:u,headers:d,semanticURL:p,key:f,flowName:m,resourceType:I,directUrlUpdation:h,debugInfo:S&&S.debugInfo&&{debugId:S.debugInfo[js.COREHEADER_APP_DEBUG_ID]},shouldUpdateCaseActionsInParentContext:!0});if(By(A)){const t=$C(C),r=Lm({data:t}),[,a]=r?r.split(" "):[],o=`You will lose unsaved changes for ${a}. Do you want to continue?`;if(!gD(n.context))return e;{const{continueExecution:t}=await mI(A,{dirtyMessage:o});if(!t)return s.directUrlUpdation=!1,Dg.rejectActionByID(g),dh();_.currentCaseViewMode=Qm(_?.context),e.push($S(jS,_)),n.__deferCaseActionsPayload=_}}else{if(!((e,t)=>$y(e)&&(gD(t)||PA.isOpenCasePageAfterCreateInMultiDocEnabled()))(A,n.context))return e;e.push($S(_S,_))}return t.directUrlUpdation=h,t.semanticURL=p,await oI(t,{..._,acName:A},{acName:A,context:C}),e},fD=(e,{isModalAction:t,target:n,transientItemID:s})=>{if(t){const t=e.find((({type:e})=>e===kr));t?.payload&&(n=t.payload.target,s=t.payload.containerItemID)}const r=US({target:n,containerItemID:s});r.payload.transientItems.length&&e.push(r)},mD=e=>/^app\/preview_[0-9]*/g.test(e),ID=(e,t)=>{const n=Ws(e);return!mD(e)&&(n===t||/^app\/primary_[0-9]*/g.test(n))},ED=e=>{if(!gD(e.context)){let t;const n=e?.caseTypeID,s=e?.caseTypeName;return t=e.businessID?e.businessID:e.workID,{caseID:t,caseTypeID:n,caseTypeName:s}}return{}},yD=(e,t,n,s)=>{const{data:r,caseViewMode:a}=t,o={data:r,caseViewMode:a,context:n};if(rS.setIn(o.data,["context_data","caseViewMode"],a),e.push({type:ha,payload:{context:n}}),s){const t={data:Us.transformObjectToCase(r),caseViewMode:a,context:n};e.push($S(fS,t))}e.push($S(fS,o))},AD=async(e,t,n,s,r,a,o,i,c,l)=>{const{headers:u}=c,d=l?js.OBJECT_INFO.OBJECT_INFO:js.CASE_INFO.CASE_INFO;if(e){if("object"!=typeof c?.response?.uiResources?.root){const t=(e,t)=>{const n=e.findIndex((e=>e.ID===t));if(-1!==n){const[t]=e.splice(n,1);e.unshift(t)}return e},n=$C(e),s=c?.response?.data?.caseInfo?.assignments??[],r=n?.caseInfo?.assignments??[],a=Qm(e)===js.PERFORM_MODE,o=s[0]?.ID!==r[0]?.ID,i=s.length>0&&r.length>0;a&&o&&i&&c?.response?.data?.caseInfo?.assignments&&(c.response.data.caseInfo.assignments=t(s,r[0]?.ID))}const p=By(Qy(e));let g=!1;const h=Qy(n),f=yy(h),m=xy(h);m&&f?.items?.[m]?.key===c?.actionInPayload?.caseID&&(g=!0),pD(r,{...s,skipReleaseLockRequest:!0});const I=Tm(e),E={target:Qy(e),containerItemID:e,context:e,containerName:I};t.doDeleteCaseSummary=s.doDeleteCaseSummary;const y=Qs(n),A=$C(y),C=$C(s.context),S=A[d]?.ID,_=C[d]?.ID,N=$C(e)?.caseInfo?.ID;if(p&&S===_||!p&&(""===o||E.containerItemID.includes(js.WORKAREA)&&t.caseViewMode===js.REVIEW_MODE&&N===t.data?.caseInfo?.ID||!a&&t.root&&0===Object.keys(t.root).length&&N===t.data?.caseInfo?.ID))if((void 0===t?.data[d]?.content||void 0!==t.data[d].content&&"object"==typeof t.data[d].content&&0===Object.keys(t.data[d].content).length)&&(t.root=void 0,delete t.data?.caseMessages),e.includes(js.WORKAREA)&&t.caseViewMode===js.REVIEW_MODE&&((e,t)=>{const n=e?.assignmentID,s=t?.data?.caseInfo?.assignments??[],r=s[0]?.ID;return n!==r})(s,i)&&(t.flowName=" ",t.clearView=!0,t.root?.config?.name!==js.PY_CONFIRM&&(t.root=void 0)),e.includes(js.ACTIONAREA))r.push($S(fS,{...t,key:o,resourceType:"",...E}));else{const e=Cy(E.target,E.containerItemID);e?.resourceType!==uD.PAGE&&r.push($S(RS,{...t,key:o,resourceType:"",...E}))}else if(a){const a=Qy(e),i=Py(a,o);if(i)E.target=a,E.context=i,E.containerItemID=i,r.push($S(RS,{...t,key:o,resourceType:"",...E}));else{const e=jy(n)[0];if(s.target=e,s.context=gI(e,js.WORKAREA,n),s?.context){s.containerItemID=s.context,r.push($S(_S,{...s,...t}));const n=s.containerItemID;r.push($S(wS,{parentContainerTarget:e,containerItemID:n}))}}}if(s.target=Qy(e),s.containerName=Tm(e),s.context=e,s.containerItemID=e,s.shouldUpdateCaseActionsInParentContext=!0,rS.setIn(t,"acName",E.target),await oI(i,t),s.__deferCaseActionsPayload=s,g&&(n.includes(js.WORKAREA)&&Vm(n)&&(n=Qs(n)),yD(r,t,n,l)),!a&&t.caseViewMode===js.PERFORM_MODE){const t=((e,t)=>{const n=Qy(e);return Py(n,t)})(e,o),n={data:{[d]:{headers:u}},context:t};r.push($S(fS,n)),r.push(cE(((e,t=!1,n=!1)=>{const s=Dg.getNextActionMgrId();return{ID:cS.getPropertyValue(Fs.CASE_INFO.ASSIGNMENT_ID,"",e),actionID:cS.getPropertyValue(Fs.CASE_INFO.ASSIGNMENTACTION_ID,"",e),context:e,caseWideAction:t,contextData:n,options:{actionMgrID:s}}})(t)))}}else{pD(r,s);let e=!1;const o=Qy(n),i=yy(o),u=xy(o);if(u&&i?.items?.[u]?.key===c?.actionInPayload?.caseID&&(e=!0),a){const e=jy(n)[0];s.target=e,s.context=gI(e,js.WORKAREA,n),s.containerItemID=s.context,r.push($S(_S,{...s,...t}));const a=s.containerItemID;r.push($S(wS,{parentContainerTarget:e,containerItemID:a}))}e&&yD(r,t,n,l)}},CD=async(e,t,n,s,r,a,o)=>{const i=a?"objectInfo":"caseInfo";((e,t,n)=>{if(t.isProcessAction&&(pD(n,{...t,skipReleaseLockRequest:!0}),e)){const s=`${t?.containerItemID.includes("root")?js.APP.ROOT:js.APP.APP}/${my.PRIMARY}`,r=gI(s,my.PRIMARY),a={insKey:e.ID,className:e.content.classID,context:r,acTargetName:js.PRIMARY,isChild:!0},o={type:pr,payload:{...a}};n.push(o)}})(e.data[i].parentCaseInfo,t,r);const c=e?.data[i]?.parentCaseInfo?.ID;if(c){const n=Qy(t?.context),s=Cy(n,t?.context)?.parentContext,r=Qy(s);t?.isProcessAction&&Ty(r,c)&&fA(s,e?.data[i]?.lastUpdateTime)}n.resourceType=uD.CASE,n.directUrlUpdation=!0,t.isProcessAction||await hD(r,{translatedDXAPIResponse:s,actionInPayload:t},n,a,o)},SD=async(e,t,n,s,r)=>{e.doDeleteCaseSummary=t.doDeleteCaseSummary,e.caseViewMode===js.REVIEW_MODE&&(e.flowName=" ",e.clearView=!0);const{containerItemID:a}=t;By(Qy(a))||rS.setIn(e.data,["context_data","caseViewMode"],e.caseViewMode);const o=YI.getPropertiesToReplace(a);r.push($S(RS,{...e,...s,propertiesToReplace:o})),rS.setIn(e,"acName",s.target),await oI(n,e),((e,t,n)=>{const{containerItemID:s}=t,r=Ly(s),{data:a,caseViewMode:o}=n;if(r&&Vm(s)){const n=Qs(r),i={data:a,caseViewMode:o,context:n};rS.setIn(i.data,["context_data","caseViewMode"],o),e.push({type:ha,payload:{context:n}});const c=YI.getPropertiesToReplace(s);e.push($S(fS,i,{propertiesToReplace:c})),t.shouldUpdateCaseActionsInParentContext=!0,t.__deferCaseActionsPayload=t}})(r,t,e)},_D=async(e,t,n,s,r,a,o,i,c,l={})=>{const{isCaseWideAction:u,isInCreateStage:d,containerItemID:p}=e,g=Ws(e.context),h=Mm(r,c),f=c?xg(r):wm(r),m=d&&!h&&!u,I=jy(g)[0],E=I?xy(I):g,y=Tm(p),A=Ly(p),C=Object.freeze({target:e.target,containerItemID:p,context:A,containerName:y});m&&!mD(e.context)?await CD(i,e,t,r,a,c,l):ID(e.context,E)?await AD(E,t,g,e,a,n,s,r,o,c):!u&&!c||ID(e.context,E)?await SD(t,e,r,C,a):(pD(a,e),((e,t,n)=>{const{containerItemID:s,caseID:r}=t;if(s&&/^app\/preview_[0-9]*/g.test(s)){const{caseClassName:t}=n,a=Ws(s),o=Ly(a);e.push($S(IS,{containerItemID:a,context:o,container:my.PREVIEW,containerName:my.PREVIEW,caseId:r,viewName:Fs.PREVIEW_VIEW_NAME,caseClassName:t,updateData:!0}))}})(a,e,{caseClassName:f}))},ND=(e,t,n)=>{const{isModalAction:s,isCaseWideAction:r,caseID:a}=t,o=ID(t.context,n),i=e?.data?.caseInfo?.stages,c=e?.data?.caseInfo?.stageID;Df({caseID:a,isModalAction:s,isModalLaunchedFromPrimaryValue:o,isCaseWideAction:r,stages:i,stageID:c})},TD=e=>{const t=e?.payload?.err?.errorDetails,n=e?.payload?.context;t?.forEach((e=>{e[js.ERROR_FIELD_IN_PAGE]=e[js.ERROR_FIELD_IN_PAGE].replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`));const t=e[js.ERROR_FIELD_IN_PAGE].slice(1),s=e[js.ERROR_IN_PAGE_IDENTIFIER],r=s.startsWith(".")?s.slice(1):s;if(r){let a=t?`caseInfo.content.${t}`:"caseInfo.content";a=js.getProperty(a.replace(/\(/g,"[").replace(/\)/g,"]"));const o=td(r,a,js.PROPERTY),i={type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue};Zu.mutateField(n,a,o[o.length-1],{messages:[i],type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:s})}}))},DD=e=>{const t=$C("app")?.pyPortal?.pyPrimaryNavPages,n=Array.isArray(t)?t[0]:null;return n?(bI.clearChangedProperties(e),[{type:nr,payload:{className:n.pyClassName,containerName:js.PRIMARY,context:js.APP.APP,pageReference:"pyPortal",viewName:n.pyRuleName,skipSemanticUrl:""}}]):[]},PD=e=>{const{containerName:t,isInCreateStage:n}=e;return n?js.MODAL:t||Og.getTargetViewContainerName(Ma)},OD=e=>e?.uiResources?.root?.config?.name===Ls.getDefaultQualifiedName("pzCreateDetails")||!1,RD=(e,t)=>{const n=OD(e),{skipBrowserSemanticUrlUpdate:s=!1}=t;rS.setIn(e,["directUrlUpdation"],!n&&!s)},bD=e=>e.confirmationNote?js.REVIEW_MODE:js.PERFORM_MODE,vD=(e,t)=>{let n;return n=!e.renderInline&&!PA.getDefaultCasePage()&&OD(t),n},xD=e=>{const{containerName:t,isInCreateStage:n}=e;return n?js.MODAL:t||Og.getTargetViewContainerName(Fa)},wD=(e,t)=>{const{class:n,context:s,viewType:r=tI.PAGE}=e,{removeActionPayload:a}=t,o=e?.pageName?e?.pageName:PA.getDefaultCasePage();return Mu(Zp.createCase(n,{...e,pageName:o,viewType:r,context:s,retrieveActionViewForNewObject:!0})).pipe(Xg((({response:t,headers:n})=>(Us.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:a}))),ph("Error occurred during ajax call at createObject Epic : ",s))},MD="CREATE_EXTERNAL_CASE",LD=e=>{let t=0,n=[],s=!1;return e.pipe(lh(MD),gh(100),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),Zg((e=>{const{context:n}=e,r=xD(e),a=Va(r,n);return s=!1,Mu(sD(a,{loadingContext:n})).pipe(Zg((({continueExecution:n,removeActionPayload:r,dirtyCheckPerformed:a})=>n?(s=a,wD(e,{removeActionPayload:r})):(Dg.rejectActionByID(t),uh))))})),Zg((async e=>{if(e&&e.type===Tr)return e.payload.context=gA(),n.push(uI(e)),n;const{actionInPayload:r,response:a,headers:o,removeActionPayload:i}=e,c=vD(r,a);rS.setIn(a.data,js.getProperty(js.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const l=xD({...r,isInCreateStage:c}),u=Va(l,r.context),d=gI(u,l,r.context);if(!s&&!Pm(l)&&By(u)){const{continueExecution:e}=await mI(u,{loadingContext:r.context});if(!e)return Dg.rejectActionByID(t),n}const p=am(a);let g=a_(Oa,{caseClassName:wm(p)});g=g.replace(/{.+?}/,String(xm(Lm(p)))),p.semanticURL=g,RD(p,r);const h={acName:u,context:d};await oI(p,r,h);const f={target:u,context:d,headers:o,semanticURL:g,caseViewMode:bD(p),containerItemID:d,isInCreateStage:c,isMinimizable:c,assignmentContext:rS.getIn(p,tD),nextAssignmentInfo:rS.getIn(p,eD),resourceType:Fs.RESOURCE_TYPES.CASE,openCaseViewAfterCreate:r.openCaseViewAfterCreate,modalOptions:r.modalOptions,debugInfo:r.debugInfo,isExternalCaseCreationFlow:!0};km(f,p);const m=aI(p,f),I=dI(u,m);return hI(I)&&Fm(n,{removeActionPayload:i,target:u}),n.push(I),SI(n),n})),Xg((()=>(TI(n),$m(n,t),n=[],n))))},{RESOURCE_TYPES:UD}=Fs,FD=(e,t={})=>{const{viewType:n,containerName:s,targetContainerName:r,isChild:a}=e,o=vm(t);return(e=>{if(e){const{stageID:t,stages:n=[]}=e,s=n.length;for(let e=0;e<s;e+=1)if(n[e].ID===t)return"manual"===n[e].transitionType}return!1})(o)&&e?.stageID===o.stageID?tI.PAGE:n||(!Dm(s)&&!Dm(r)||a?tI.PAGE:tI.FORM)},jD=(e,t,n,s,r)=>{if(Fm(e,{removeActionPayload:t,target:n}),((e,t)=>{const n=xy(t);let s=null;return n&&(s=Cy(t,n)),s?.key===e&&$y(t)})(s.key,n))s.context=Uy(n),s.containerItemID=s.context,e.push($S(jS,s));else if((r?.isChild||r?.isRemote)&&r?.isMultiDoc){const t=Qy(r.context);s.target=t,s.context=r.context,s.containerItemID=r.context,e.push($S(jS,s))}else{const t=Qy(s.context),n=Py(t,s.key);n?(s.target=t,s.context=n,s.containerItemID=n,e.push($S(jS,s))):e.push($S(_S,s))}},VD=(e,t,n,s,r,a,o)=>{By(t)&&Gy(t)?((e,t,n,s,r)=>{FD(e,t)===tI.FORM?(n.caseViewMode=s||js.PERFORM_MODE,r.push($S(RS,n))):r.push($S(jS,n))})(s,r,e,a,n):jD(n,o,t,e,s)},kD=(e,t,n)=>{if(!(e&&t&&(e=>{const{inlineViewType:t,caseTypeID:n,RedirectURL:s}=e;if(t&&t.toLowerCase().includes("remote"))return!1;const r=Bs.getRemoteCaseClassBySourceClass(n)??n;return!Bs.isRemoteCase(r)&&!!s})(t)&&t.RedirectURL))return!1;try{const e=new URL(t.RedirectURL);if("https:"===e.protocol)return globalThis.open(e.href,"_blank","noopener,noreferrer"),Dg.resolveActionByID(n),!0}catch{}return!1},BD=({restUrl:e,reqType:t,requestHeaders:n,debugInfo:s,context:r,isGetNextWork:a,doNotMergeMessagesForStatusCode:o})=>{const i=YI.appendExcludeQueryParamToUrl(e);return Wd(i,{method:t,headers:{"if-match":n&&n.etag,...n,...s&&{...wd.addDebugHeaders(s)}}},r,{doNotMergeHttpMessagesForStatusCode:a?o:""})},$D=(e,t)=>{const n=FD(e),{headers:s,context:r,assignmentID:a,isGetNextWork:o,debugInfo:i,isOpenStage:c,stageID:l,caseID:u,jsActionQueryParams:d,isLastStepInCreateStage:p}=e;let g,h;({restApi:g,reqType:h}=o?i_("getNextWork",{viewType:n}):c?i_("openStage",{caseID:u,stageID:l}):i_(Kr,{assignmentID:a,viewType:n}));const{removeActionPayload:f}=t,m=PA.getDefaultCasePage();let I="",E=e.pageName;e.isTraditionalUICase&&(E=Ls.getDefaultQualifiedName("pyDetails")),I=m?`${g}?viewType=${n}&pageName=${m}`:E?`${g}?viewType=${n}&pageName=${E}`:`${g}?viewType=${n}`,d&&Object.keys(d).forEach((e=>{I+=`&${e}=${d[e]}`}));const y=(e=>{let t=e?.headers??{};return e?.isRemote&&(t=sI(t,e.remoteClassName)),t})(e);return Mu(BD({restUrl:I,reqType:h,requestHeaders:y,debugInfo:i,context:r,isGetNextWork:o,doNotMergeMessagesForStatusCode:"404"})).pipe(Xg((e=>{if(PA.isCoexistenceAppOfType(js.APP_TYPE.UIKIT)&&!p){return QI(e.data.data.caseInfo)?e:(I=E?I.replaceAll(E,Ls.getDefaultQualifiedName("pyDetails")):I,PA.setDefaultCasePage(Ls.getDefaultQualifiedName("pyDetails")),{isReloadWithDifferentViewTypeRequired:!0,restUrl:I})}return e})),Zg((e=>e?.isReloadWithDifferentViewTypeRequired?BD({restUrl:I,reqType:h,requestHeaders:y,debugInfo:i,context:r,isGetNextWork:o,doNotMergeMessagesForStatusCode:"404"}):nh(e))),Xg((t=>{const{key:r,flowName:o}=cI(a);return Us.analyseResponse(t),{response:{...t.data,key:r,flowName:o},actionInPayload:e,viewType:n,removeActionPayload:f,headers:sI({...s,...t.headers})}})),ph("Error occurred during ajax call at openAssignment Epic : ",r))},{RESOURCE_TYPES:GD}=Fs,WD=e=>{const t="Browser"===PA.getRuntime();let n=0,s=[];const r=[];let a=!1,o=!1;return e.pipe(lh(kg),Xg((e=>(({actionMgrID:n}=e.payload),{...e.payload,...t?{insKey:e.payload.assignmentID}:{assignmentID:e.payload.assignmentID}}))),Zg((e=>{a=e.isGetNextWork;const{context:t}=e;let s;s=(e?.isChild||e?.isRemote)&&e?.isMultiDoc?tI.FORM:FD(e),e.viewType=s;const r=Nm(Kr,e),i=Va(r,t),{activate:c,activateContainerActionPayload:l}=EI(GD.ASSIGNMENT,i,e);if(c&&!e.isParallelCall)return nh({type:Fr,activateContainerActionPayload:l,actionInPayload:e});const u=xy(i);let d;return d=l?.isParallelAssignment?Promise.resolve({continueExecution:!0,removeActionPayload:{}}):u?mI(i,{loadingContext:t}):Promise.resolve({continueExecution:!0,removeActionPayload:{}}),Mu(d).pipe(Zg((({continueExecution:t,removeActionPayload:s})=>t?(o=Gm(e.className),e.isTraditionalUICase=o,PA.isWSSPortal()&&(e.headers={...e.headers,[js.X_ORIGIN_CHANNEL]:"WSS"}),$D(e,{removeActionPayload:s})):(Dg.rejectActionByID(n),uh))))})),Zg((async e=>{if(e?.type===Tr){if(a){const{payload:t}=e,{err:n}=t,s=n.response.status;r.push({status:Number(s)})}return s.push(uI(e)),s}const{type:t,actionInPayload:i,response:c,viewType:l,headers:u,removeActionPayload:d,activateContainerActionPayload:p}=e;if("openStage"===c?.redirectInfo?.jsAction){const e=c?.redirectInfo?.stageID,t=kg,n=c?.data?.caseInfo?.ID;i.isOpenStage=!0,i.stageID=e,i.jsActionQueryParams=c?.redirectInfo?.jsActionQueryParams;const r={type:t,payload:{...i,caseID:n,headers:u}};return s.push(r),s}if(kD(a,c?.data?.caseInfo,n))return s;const{context:g,caseViewMode:h,debugInfo:f}=i,m=c?.data?.caseInfo?.assignments?.find((e=>e.ID===i.assignmentID));i.caseViewMode=((e,t)=>e&&"false"===String(e.canPerform)?js.REVIEW_MODE:t??js.PERFORM_MODE)(m,h);const I=c?.data?.caseInfo?.caseTypeID;o=Gm(I),i.isTraditionalUICase=o;let E=((e,t)=>{const n=vm(e);let s;s=!PA.getDefaultCasePage()&&QI(n);const{isChild:r,containerName:a,isTraditionalUICase:o}=t,i=r&&s,c=s&&!t.isActionFromToDoList;return!i&&!c||o||t.renderInline?a||Nm(Kr,t):js.MODAL})(c,i);o&&(E=i.containerName??E);const y=Va(E,g);if(t===Fr)return await(async(e,t,n)=>{const{semanticURL:s,containerItemID:r,isParallelAssignment:a,insKey:o}=t,{target:i,actionInPayload:c}=n,{skipBrowserSemanticUrlUpdate:l=!1}=c,u=Ly(r);await oI({directUrlUpdation:!l,semanticURL:s},c,{acName:i,target:i,context:u}),e.push($S(wS,{containerItemID:r,target:i,isParallelAssignment:a,insKey:o,resourceType:UD.CASE,context:u,doDeleteCaseSummary:c.doDeleteCaseSummary}))})(s,p,{actionInPayload:i,target:y}),s;const A=c?.data?.caseInfo?.content,C=c?.data?.caseInfo?.ID,S=c?.uiResources?.root?.config?.name,_=c?.uiResources?.root?.config?.context;A&&!A[Ls.getDefaultQualifiedName("pyViewName")]&&S&&"page"!==i.viewType&&(rS.setIn(A,Ls.getDefaultQualifiedName("pyViewName"),S),rS.setIn(A,Ls.getDefaultQualifiedName("pyViewContext"),_));const N=am(c);((e,t)=>{const n=vm(e),s=Lm(e),r=QI(n),{skipBrowserSemanticUrlUpdate:a=!1,viewType:o,isTraditionalUICase:i}=t,c=i&&!Wm(),l=o===tI.PAGE&&(!r||c)&&!a,{caseTypeID:u}=n;if(l){const t=a_(Yr,{caseClassName:u}).replace(/{.+?}/,String(xm(s)));e.semanticURL=t,e.directUrlUpdation=!0}})(N,i);const T=gI(y,E,g),D={...i.debugInfo,debugId:i.debugInfo?.debugId??wd.getCoreHeadersFromContext(g)?.debugInfo?.[js.COREHEADER_APP_DEBUG_ID]};D.debugId&&Ng.setComponentCache(C,wd.addDebugHeaders(D));const P={acName:y,target:y,context:T};await oI(N,i,P);const O={target:y,context:T,containerItemID:T,headers:u,parentContext:Ws(i?.context),isMinimizable:QI(rS.getIn(N,"data.caseInfo")),doDeleteCaseSummary:i.doDeleteCaseSummary,acTertiary:i.acTertiary,resourceType:Fs.ASSIGNMENT,debugInfo:f,shouldUpdateCaseActionsInParentContext:!0,caseID:C};km(O,N,{skipFlowNameUpdate:i?.caseViewMode===js.REVIEW_MODE});const R=aI(N,O);var b;return pI(R.data,i.remoteCaseMeta),i.isProcessAction&&(R.data.isProcessAction=i.isProcessAction),((e,t)=>{e&&(delete t.data.caseInfo.actionButtons,t.data.caseInfo.content.coexistenceAction="openAssignment")})(o,R),YI.setTraditionalGadgetId(R.data),((e,t)=>{e.acTertiary&&(t.data.caseInfo.isFirstAssignment=e.acTertiary)})(i,R),R.caseViewMode=i.caseViewMode,VD(R,y,s,i,c,h,d),((e,t)=>{if(e=Bs.getRemoteCaseClassBySourceClass(e)??e,Bs.isRemoteCase(e)){const{RemoteClassName:n,RemoteSystemID:s,name:r}=Bs.getRemoteCase(e);if(t.headers?.RemoteSystemID||Dg.setRemoteCaseHeaderByContext(t,s),Bs.isTraditionalRemoteCase(e)||Bs.getRemoteAppPlatformVersion(s)){t.assignmentID=t.assignments?.[0]?.ID;const s={className:e,name:r,action:Ra,remoteClassName:n};Dg.setTraditionalRemoteCaseParams(t,s)}}})(I,R.data.caseInfo),l===tI.FORM&&Vm(R.containerItemID)&&(R.skipMergeAssignmentsAndActions=!1,NI(R,s,_)),Km(N,O),b={actionInContext:g,assignmentID:i.assignmentID,caseKey:R.key},fd.publish(js.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,b),s})),Xg((()=>{const e=n,t=Wm(),a=QI(rS.getIn(s[0]?.payload,"data.caseInfo"));return o&&t&&a?ZT.postCreateCaseMessage(s[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,BC,s):BC(s),$m(s,e,r),s[0]?.payload?.isParallelAssignment&&BC({type:kg,payload:{...s[0].payload,isParallelCall:!0}}),s=[],s})))};const HD=(e,t)=>{const{insKey:n,headers:s,context:r,debugInfo:a,viewType:o}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:PA.getDefaultCasePage(),l=i_(Yr,{caseID:n,params:{pageName:c}});let{restApi:u}=l;const{reqType:d}=l;return"none"===o&&(u=`${u?.split("viewType")[0]}viewType=none`),u=YI.appendExcludeQueryParamToUrl(u),Mu(Wd(u,{method:d,headers:{...s,...a&&{...wd.addDebugHeaders(a)}}},r)).pipe(Xg((t=>(Us.analyseResponse(t),{response:t.data,actionInPayload:e,headers:sI({...s,...t.headers}),removeActionPayload:i}))),ph("Error occurred during ajax call at openWorkByHandle Epic : ",r))},qD="OPEN_WORK_BY_HANDLE",{RESOURCE_TYPES:zD}=Fs,YD=async(e,t,n)=>{const s=t?.containerItemID||null,r=s&&jy(s)[0]?xy(jy(s)[0]):s,a=r||s,o=Ly(a)||a,i=Qy(o)||Qy(a),c=o?Qm(o):void 0,l=r?$C(r)?.caseInfo?.ID:void 0,u=e?.insKey;if(!(o&&a&&c===js.REVIEW_MODE&&r!==s&&l&&u&&l===u))return;let d;try{d=await(p=HD({...e,context:o,viewType:"none"},{removeActionPayload:void 0}),h="object"==typeof g,new Promise((function(e,t){var n=new cu({next:function(t){e(t),n.unsubscribe()},error:t,complete:function(){h?e(g.defaultValue):t(new bl)}});p.subscribe(n)})))}catch(e){return}var p,g,h;if(!d||Rm(d.type))return;const f=am(d.response),m=[{path:js.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}],I={...f?.data,caseInfo:{...f?.data?.caseInfo??{},assignments:f?.data?.caseInfo?.assignments??[]}};n.push($S(jS,{containerItemID:a,target:i,context:o,data:I,caseViewMode:js.REVIEW_MODE,isArrayDeepMerge:!0,propertiesToReplace:m}))},KD=async(e,t,n)=>{const{actionInPayload:s,activateContainerActionPayload:r,type:a,response:o,removeActionPayload:i,headers:c}=e,{context:l,skipBrowserSemanticUrlUpdate:u,debugInfo:d}=s,p=Nm(Yr,s),g=Va(p,l);if(Om(a))await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:s},actionInPayload:r,actionInPayload:{context:a,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=Nm(Yr,r),l=Va(c,a),u=Ly(s);await oI({directUrlUpdation:!o,semanticURL:n},r,{acName:l,containerName:c,target:l,context:u}),e.push($S(wS,{containerItemID:s,target:l,context:u,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:r,actionInPayload:s}),await YD(s,r,t);else{const r=gI(g,p,l,{buildNew:!0}),a=am(o),h=((e,t)=>{const{isRemoteCase:n,remoteCaseClass:s}=t,r=Lm(e),a=n?s:wm(e);let o=a_(Yr,{caseClassName:a},{id:t?.insKey});return o=o?.replace("{workID}",String(xm(r)))?.replace("{id}",t?.insKey),o})(a,s);a.semanticURL=h,a.directUrlUpdation=!u;const f={acName:g,context:r};await oI(a,s,f);const m=aI(a,{target:g,context:r,containerItemID:r,semanticURL:h,headers:c,debugInfo:d});m.caseViewMode=js.REVIEW_MODE,m.resourceType=zD.CASE,pI(m.data,s.remoteCaseMeta),n&&(m.data.caseInfo.content.coexistenceAction="openWorkByHandle",m.data.caseID=m.data.caseInfo.ID),YI.setTraditionalGadgetId(m.data),km(m,a,{skipFlowNameUpdate:!0}),m.currentCaseViewMode=Qm(e?.actionInPayload?.context);const I=dI(g,m);i.containerItemID&&hI(I)&&t.push($S(LS,{containerItemID:i.containerItemID,target:g})),t.push(I),Km(a,m)}const h=s.insKey;Of({caseKey:h,actionInContext:l})},QD=e=>{let t=0,n=[],s=!1;return e.pipe(lh(qD),Xg((e=>(({actionMgrID:t,isAutoRedirection:s=!1}=e.payload),e.payload))),Zg((e=>{const{context:n,isChild:r,viewType:a}=e,o=Nm(Yr,e),i=Va(o,n);let{activate:c,activateContainerActionPayload:l}=EI(zD.CASE,i,e);const u=By(i);if(!c&&!u&&e.insKey&&i){const t=((e,t)=>{const n=Py(e,t);if(!n)return null;const s=Cy(e,n);if(s?.resourceType!==zD.ASSIGNMENT||"string"!=typeof s?.context||""===s.context)return null;const r="string"==typeof s.semanticURL?s.semanticURL.trim():"";return r?{target:e,containerItemID:n,semanticURL:r,insKey:t}:null})(i,e.insKey);t&&(c=!0,l=t)}const d=c&&!r&&"none"!==a;return Mu("none"===a||d?Promise.resolve({continueExecution:!0,removeActionPayload:void 0}):mI(i,{loadingContext:n})).pipe(Zg((({continueExecution:n,removeActionPayload:r})=>n?d?(OI(l),nh({type:Fr,activateContainerActionPayload:l,actionInPayload:e})):(s&&Ng.setComponentCache("redirectionInProgress",!0),HD(e,{removeActionPayload:r})):(Dg.rejectActionByID(t),uh))))})),Zg((async e=>{if(e&&Rm(e.type))return n.push(uI(e)),n;const t=$C(e?.actionInPayload?.context),s=Gm(e?.actionInPayload.className);if("none"===e?.actionInPayload?.viewType){if("perform"!==t?.context_data?.caseViewMode){const t=am(e?.response),r={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:ha,payload:{context:r.context,doDeleteConfirmationDetails:!1}}),s&&r.data.caseInfo?.content&&(r.data.caseInfo.content.coexistenceAction="openWorkByHandle",r.data.caseID=r.data.caseInfo.ID),pI(r.data,e.actionInPayload.remoteCaseMeta),YI.setTraditionalGadgetId(r.data),n.push($S(fS,r));const a=Qy(e?.actionInPayload?.context),o=Tm(e?.actionInPayload?.context),i=Object.freeze({target:a,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:o});if(Vm(e?.actionInPayload?.context)){const t=aI(e?.response,{...i});NI({...t,isArrayDeepMerge:!0},n)}e.actionInPayload.shouldUpdateCaseActionsInParentContext=!0,e.actionInPayload.containerItemID=e?.actionInPayload?.context,e.actionInPayload.caseID=e?.actionInPayload?.insKey,Km(t,e?.actionInPayload)}}else await KD(e,n,s);return n})),Xg((()=>(s&&Ng.setComponentCache("redirectionInProgress",!1),BC(n),$m(n,t),n=[],n))))},JD="FINISH_ASSIGNMENT",XD=(e,t)=>{const{assignmentID:n,actionID:s,caseID:r,context:a,additionalHeaders:o={},outcome:i,jsActionQueryParams:c,headers:l}=e,{state$:u}=t,d=(e=>{const{isModalAction:t,viewType:n,isInCreateStage:s,isCaseWideAction:r}=e;return t&&s&&!r?tI.PAGE:n||tI.FORM})(e),p=(e=>{const{isCaseWideAction:t,caseTypeID:n}=e;return YI.shouldUseUnifiedHandling()?t||YI.isObjectCaseType(n)?sa:Jr:t?sa:Jr})(e),g={assignmentID:n,actionID:s,caseID:r,viewType:d};let{restApi:h}=i_(p,g);const{reqType:f}=i_(p,g);d&&!h?.includes("viewType=")&&(h=h?.includes("?")?`${h}&viewType=${d}`:`${h}?viewType=${d}`),i&&!h?.includes("outcome")&&(h=h?.includes("?")?`${h}&outcome=${i}`:`${h}?outcome=${i}`),h=oE(c,h),h=YI.appendExcludeQueryParamToUrl(h),e.viewType=d;const{content:m}=rI(a),I=u.value.data[a]?.caseInfo?.headers||{},{etag:E}=I,y={"if-match":E,...l,...o};return Mu(Wd(h,{method:f,body:m,headers:y},a)).pipe(Xg((t=>{const{data:n,headers:s}=t;return Us.analyseResponse(n),{response:n,actionInPayload:e,headers:sI({...y,...s})}})),ph("Error occurred during ajax call at finishAssignment Epic : ",a))},ZD=e=>{fd.publish(js.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,e)},eP=e=>{fd.publish(js.PUB_SUB_EVENTS.ERROR_ON_FINISH_ASSIGNMENT,e)},{RESOURCE_TYPES:tP}=Fs,nP=e=>{const t=kC()?.getState()?.data,n=t?Object.keys(t).find((e=>e.includes(js.WORKAREA))):void 0;return/^app\/primary(_\d+)?$/.test(e)&&!n},sP=(e,t)=>{let n,s=0,r=[],a={},o="",i={},c=!1,l=!1;return e.pipe(lh(JD),Zg((e=>{let u,d;const p=PA.isCoexistenceAppOfType(js.APP_TYPE.UIKIT);if(({actionMgrID:s}=e.payload),o=e.payload.context,od({context:o,stateObj:$C(o),clearContextMessages:!0}),!GI(o)||dd(o)){const t={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return Dg.rejectActionByID(s,!0,t),xf.handleDeferredActionCompletion(e.payload.context).then((()=>{eP({errorType:Fs.ERROR_TYPE.CLIENT})})),nh([])}return nh(e.payload).pipe(Zg((e=>{Ng.setComponentCache("lastActionID",e?.actionID),dD(r,e);const n={...e};return XD(n,{state$:t})})),Zg((async e=>{if(e&&e.type===Tr){iE(e);const t=uI(e);return r.push(t),r}yf.clearContextedCache(o);const{headers:t,actionInPayload:g,response:h}=e,{containerItemID:f,context:m=Ly(f),isModalAction:I,isInCreateStage:E}=g;c=g.isCaseWideAction,l=g.isProcessAction;const y=Qy(f);g.target=y;const A=Tm(f),C=Object.freeze({target:g.target,containerItemID:f,context:m,containerName:A});rS.setIn(h.data,js.CASE_INFO.IS_FIRST_ASSIGNMENT,!1),rS.setIn(h.data,js.CASE_INFO_IS_LOCAL_ACTION,!1),h?.uiResources?.root?.config?.name&&"page"!==g.viewType&&rS.setIn(h.data,js.CASE_INFO.VIEW_NAME,h?.uiResources?.root?.config?.name),ZD({submitResponse:h});let S=am(h,{[Fs.STOPMERGEACTIONS]:!h.nextAssignmentInfo});const _=wm(S),N=Ws(g.context),T=jy(N)[0]?xy(jy(N)[0]):N,D=Mm(S),P=E&&!D;!I||E||ID(g.context,T)||(S=CI(S,$C(f)));const O=aI(S,{headers:t,actionMgrID:s,directUrlUpdation:!1,isActiveWorkAreaPrimaryAndWorkareaAbsent:nP(T||"")});Bm(O.data,g),O.caseClassName=_,O.resourceType=tP.ASSIGNMENT,O.headers=t;const R=S?.uiResources?.root;if("AutoClose"===R?.type){const e=kC()?.getState()?.data?.[C.context]?.caseInfo,{ID:t,name:n,content:s}=e;return r=await(async e=>{const{target:t,containerItemID:n,context:s}=e,r=Uy("app/primary"),a=Cy(t,n)?.parentContext,o=Boolean(t)&&$y(t),i=$y("app/primary");if(o&&a!==js.APP.APP){if(await Jy(n,{skipDirtyCheck:!0}),0===_y(t).length)return DD(s)}else{if(!r||!i||a)return DD(s);await Jy(r,{skipDirtyCheck:!0,eventName:"Dismiss case"})}return[]})(g),b={ID:t,caseName:n,content:s,status:vm(S).status},fd.publish(js.PUB_SUB_EVENTS.DISPLAY_CASE_SUBMITTED_TOASTER,b),r}var b;let v,x;const w=S?.data?.caseInfo?.assignments?.some((e=>e.ID===g.assignmentID)),M=((e,t)=>{const{assignmentID:n}=t;return e?.data?.caseInfo?.assignments?.some((e=>e.ID===n&&"true"===e?.canPerform))})(S,g),L=((e,t,n,s,r)=>{let a;const o=Qy(t);a=$y(o)?Py(o,n.data?.caseInfo?.ID):xy(o);let i=!0;if(e&&a){const e=cS.getPropertyValue(Fs.CASE_INFO.ASSIGNMENTACTION_ID,"",a),t=cS.getPropertyValue(Fs.CASE_INFO.ASSIGNMENT_ID,"",a);if(e){const s=n?.data?.caseInfo?.assignments?.find((e=>e.ID===t)),r=s?.actions;r&&!r.some((t=>t?.ID===e))&&(i=!1)}}return s&&e&&i&&qC(null,js.CASE_VIEW_MODE_PROP,a)===js.PERFORM_MODE&&r})(w,T,S,I,M),U=g?.actionID===Fs.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT;if(S?.data?.nextAssignmentInfo&&!U)O.caseViewMode=js.PERFORM_MODE,v=Lm(S),x=!0;else if(L&&!U)S?.confirmationNote&&S?.uiResources?.root?.config?.name===js.PY_CONFIRM?O.caseViewMode=js.REVIEW_MODE:O.caseViewMode=js.PERFORM_MODE,v=Lm(S),O.flowName=" ",O.deleteAssignmentSpecificResources=!1,x=!1;else{O.caseViewMode=js.REVIEW_MODE,rS.setIn(O.data,"context_data.caseViewMode",js.REVIEW_MODE);const e=By(Qy(T)),t=(e=>{if(e){const{stageID:t,stages:n=[]}=e,s=n.length;for(let e=0;e<s;e+=1)if(n[e].ID===t)return"resolution"===n[e].transitionType}return!1})(S?.data?.caseInfo);v=!S?.confirmationNote||!t&&S?.uiResources?.root?.config?.name!==js.PY_CONFIRM||e?"":Lm(S),x=!1}const F=Lm(S);km(O,S,{skipFlowNameUpdate:O?.caseViewMode===js.REVIEW_MODE||L});const j=a_("createWork",{caseClassName:_}).replace(/{.+?}/,String(xm(F)));if(S.semanticURL=j,O.semanticURL=j,I?(await _D(g,O,x,v,S,r,e,h,!1,i),P&&(a=ED(g))):E&&p&&!D?(PA.setDefaultCasePage(js.PY_DETAILS),await(async(e,t,n)=>{const s={assignmentID:e?.data?.caseInfo?.assignments[0]?.ID,className:e?.data?.caseInfo?.content?.classID,containerName:my.PRIMARY,targetContainerName:my.PRIMARY,viewType:tI.PAGE,isLastStepInCreateStage:!0,context:n},r={type:Ir,payload:{...s}};t.push(r)})(h,r,Ws(m))):await SD(O,g,S,C,r),T?.includes(js.ACTIONAREA)&&m===T){uy(m);const e=$C(T);r=[{type:yr,payload:{actionID:e.caseInfo.activeActionID,context:T,containerItemID:f,target:Qy(T),actionMgrID:Dg.getNextActionMgrId(),containerName:js.ACTIONAREA,localActionType:Fs.LOCAL_ACTION_TYPE.CASE_WIDE,caseID:e.caseInfo.ID}}]}if(zm(e,r),xf.handleDeferredActionCompletion(o).catch((()=>{})),ND(O,g,T),!S?.data?.nextAssignmentInfo){const e=((e,t)=>{const{isCaseWideAction:n,assignmentID:s,actionID:r}=t;return{isCaseWideAction:n,caseID:Lm(e),assignmentID:n?null:s,actionID:r||null}})(S,g);Pf({...e,containerItemID:f})}return fD(r,{transientItemID:f,target:y,isModalAction:I}),u=S,d=g,n=g,r})),Xg((()=>{const t=r.find((e=>e.type===Tr));var p;if(t?(xf.handleDeferredActionCompletion(o).then((()=>{eP({errorType:Fs.ERROR_TYPE.SERVER})})).catch((()=>{})),TD(t),Dg.rejectActionByID(s)):Dg.resolveActionByID(s,a),i?.caseId&&(p=i,fd.publish(js.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,p)),TI(r),Ym()&&u&&d&&Km(u,d.__deferCaseActionsPayload??d),!t&&(c||l)){const t=e.payload.caseID;Rf(t),(e=>{fd.publish(js.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION,e)})({updateState:!0})}return!t&&n&&(e=>{fd.publish(js.PUB_SUB_EVENTS.EVENT_FINISH_ASSIGNMENT_DONE,e)})(n),r=[],a={},i={},r})))})))},rP="CANCEL_ASSIGNMENT",aP=e=>{const t={},{routeKey:n,isModalAction:s,caseID:r,context:a,RemoteSystemID:o}=e;o&&(t.RemoteSystemID=o);const i=n||"releaseAssignmentLock",{restApi:c,reqType:l}=i_(i,{ID:r,caseID:r,viewType:tI.PAGE}),u=Ng.getComponentCache(r),d=u&&"object"==typeof u?u:{},p=YI.appendExcludeQueryParamToUrl(c);return Mu(Wd(p,{method:l,headers:{...t,...d}},a,{includeRemoteSystemIdIfPresent:!!o})).pipe(Xg((t=>(Ng.resetComponentCache(r),s?{actionInPayload:e}:{response:t.data,actionInPayload:e,headers:sI(t.headers)}))),ph(": Error occurred during ajax call at release lock request : ",a))},oP=(e,t)=>{const{isModalAction:n}=t;return aP({routeKey:"cancelAssignment",isModalAction:n,...e})},iP=e=>{let t=0,n=[];return e.pipe(lh(rP),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),Zg((e=>{const{isModalAction:n}=e;e.context||(e.context=Ly(e.containerItemID));const{context:s}=e,r=(e=>{const{isModalAction:t,containerItemID:n}=e;return t?my.MODAL:Tm(n)})(e),a=Va(r,s);return Mu(mI(a,{loadingContext:s})).pipe(Zg((({continueExecution:s})=>s?(e.RemoteSystemID=Bs.getRemoteHeaderByContext(e.context)??void 0,Mu(oP(e,{isModalAction:n}))):(Dg.rejectActionByID(t),uh))))})),Zg((e=>{if(e&&e.type===Tr)return n.push(uI(e)),Mu([n]);const{actionInPayload:s,response:r}=e,{containerItemID:a,isModalAction:o,isInCreateStage:i}=s;r?.data.caseInfo&&(r.data.caseInfo.availableProcesses=r.data.caseInfo.availableProcesses??[]);const c=Qy(a),l=Ly(a),u={target:o?`${js.APP.APP}/${js.MODAL}`:c,containerItemID:a,caseViewMode:o?js.PERFORM_MODE:js.REVIEW_MODE,context:l,actionMgrID:t,key:Lm(r),skipReleaseLockRequest:!1};return i&&n.push($S(RS,u)),!o&&Vm(a)&&(async(e,t)=>{const{childContainerItemID:n,caseViewMode:s,referencedUsers:r,response:a}=t,o=Ws(n),i=Ly(o);let c=!1;const l=a?.data?.caseInfo;l&&(c=Object.prototype.hasOwnProperty.call(l,"assignments"),l.assignments??=[]);const u={context:i,data:{...a.data,referencedUsers:r,context_data:{caseViewMode:s}}},d=[];c&&d.push({path:js.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}),d.length>0?e.push($S(fS,u,{propertiesToReplace:d})):e.push($S(fS,u))})(n,{childContainerItemID:a,caseViewMode:js.REVIEW_MODE,referencedUsers:r?.data.referencedUsers,response:r}),u.skipReleaseLockRequest=!0,e.actionInPayload.shouldUpdateCaseActionsInParentContext=!0,Km(e?.response,e?.actionInPayload),n.push($S(LS,u)),Mu([n])})),Xg((()=>(BC(n),$m(n,t),n=[],n))))},cP="NAVIGATE_TO_STEP",lP=(e,t)=>{const{ID:n,stepID:s,containerItemID:r,context:a=Ly(r),isInCreateStage:o}=e,{state$:i}=t,c={ID:n,stepID:s,viewType:o?tI.PAGE:tI.FORM},{restApi:l,reqType:u}=i_("navigateToStep",c),{content:d}=rI(a),p=i.value.data[a].caseInfo.headers,g=YI.appendExcludeQueryParamToUrl(l);return Mu(Wd(`${g}`,{method:u,body:d,headers:{"if-match":p&&p.etag}},a)).pipe(Xg((t=>({response:t.data,actionInPayload:e,headers:sI({...p,...t.headers})}))),ph("Error occurred during ajax call at navigateToStep Epic : ",a))},{RESOURCE_TYPES:uP}=Fs,dP=(e,t)=>{let n=0,s=[];return e.pipe(lh(cP),Jg((e=>{let r,a;return({actionMgrID:n}=e.payload),nh(e.payload).pipe(Zg((e=>(ud(e.context),lP(e,{state$:t})))),Zg((async e=>{if(e&&Rm(e.type))return s.push(uI(e)),s;const{actionInPayload:t,response:n,headers:o}=e,{containerItemID:i,context:c=Ly(i),isModalAction:l}=t;yf.clearContextedCache(t.context);const u=Qy(i),d=Tm(i),p=Object.freeze({target:u,containerItemID:i,context:c,containerName:d}),g=n?.data?.caseInfo?.content,h=n?.uiResources?.root?.config?.name,f=n?.uiResources?.root?.config?.context;g&&!g[Ls.getDefaultQualifiedName("pyViewName")]&&h&&"page"!==t.viewType&&(rS.setIn(g,Ls.getDefaultQualifiedName("pyViewName"),h),rS.setIn(g,Ls.getDefaultQualifiedName("pyViewContext"),f)),r=am(n);const m={acName:u,...p};await oI(r,t,m),a=aI(r,{...p,headers:o}),n?.nextAssignmentInfo||(a.caseViewMode=js.REVIEW_MODE),zm(e,s),a.doDeleteCaseSummary=t.doDeleteCaseSummary,a.resourceType=uP.ASSIGNMENT,a.caseID=Lm(r),km(a,r),Bm(a.data,t);const I=r.data?.caseInfo?.stages,E=r.data?.caseInfo?.stageID;if(Df({caseID:Lm(r),isModalAction:l,stages:I,stageID:E}),Vm(i)){const e=YI.getPropertiesToReplace(i);NI(a,s,"",{propertiesToReplace:e})}return s.push($S(RS,a)),a.shouldUpdateCaseActionsInParentContext=!0,s})),Xg((()=>(BC(s),r&&a&&Km(r,a),$m(s,n),s=[],s))))})))},pP=e=>{const{caseID:t,context:n}=e,{restApi:s,reqType:r}=i_(Zr,{ID:t});return Mu(Wd(s,{method:r},n)).pipe(Xg((t=>(Us.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:sI(t.headers)}))),ph(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",n))},gP=e=>{fd.publish(js.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,e)},hP=(e,t)=>{let n,s=0,r=[];return e.pipe(lh(Bg),Xg((e=>(({actionMgrID:s,caseType:n}=e.payload),e.payload))),Zg((e=>e.ignoreCaseDeletion?nh({actionInPayload:e}):pP(e))),Zg((async e=>{if(e&&Rm(e.type)){const{payload:t}=e,n=uI({...e,...t,actionMgrID:s});return r.push(n),r}const{actionInPayload:n}=e,{context:a,isModalAction:o}=n,i=o?my.MODAL:my.PRIMARY,c=Va(i,a);if(!o&&c){const e={acName:c,target:c,context:a},s=t.value.containers[c],{semanticURL:r}=(e=>{const{accessedOrder:t,items:n}=e;if(t&&t.length>1){const e=n[t[t.length-2]],{semanticURL:s}=e;if(s)return e}return{semanticURL:""}})(s);await oI({directUrlUpdation:!0,semanticURL:r},n,e)}if(n.isProcessAction&&n.parentCaseInfo){const e={insKey:n.parentCaseInfo.ID,className:n.parentCaseInfo.content.classID,context:n.parentContext,acTargetName:js.PRIMARY,isChild:!0},t={type:pr,payload:{...e}};r.push(t)}const l={target:c,containerItemID:a,context:a,caseDeleted:!0};return r.push($S(LS,l)),r})),Xg((()=>(BC(r),$m(r,s)===js.PROMISE_VALUE.RESOLVE&&gP({caseType:n}),r=[],r))))};function fP(e,t){return $l(t)?Zg(e,t,1):Zg(e,1)}const mP=(e,t)=>{const{assignmentID:n,actionID:s,context:r}=e,{restApi:a,reqType:o}=i_("save",{assignmentID:n,actionID:s}),{content:i}=rI(r),c=t.value.data[r]?.caseInfo?.headers,l=YI.appendExcludeQueryParamToUrl(a);return Mu(Wd(l,{method:o,body:i,headers:{"if-match":c&&c.etag}},r)).pipe(Xg((t=>({response:t.data,actionInPayload:e,headers:sI(t.headers)}))),ph(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",r))},IP=(e,t=!1)=>{const{action:n,state$:s,actionMgrID:r}=e,a=!0===n.payload.autosave;let o=[];return nh(n.payload).pipe(Zg((e=>mP(e,s))),fP((e=>{if(e&&Rm(e.type))return nh(e);const{containerItemID:t}=e&&e.actionInPayload,s=Ws(t),r=Qy(s),i=yy(r),c=jy(s)[0];let l=c?xy(c):s;!By(Qy(l))&&({containerItemID:l}=Ay(l,e.actionInPayload.caseID,c));const u=xy(r);n.payload.canUpdateAvailableActions&&rm(e.response);const d=Bs.getRemoteHeaderByContext(e.actionInPayload.context),p={...e.actionInPayload,RemoteSystemID:null===d?void 0:d};if(l&&o.push($S(fS,{context:l,data:{caseInfo:{...e.response.data?.caseInfo||{},headers:e.headers}}})),i?.items?.[u]?.key===e?.actionInPayload?.caseID){const n={context:s,data:{...e.response.data,caseInfo:{...e.response.data?.caseInfo||{},headers:e.headers}}},r=YI.getPropertiesToReplace(t);o.push($S(fS,n,{propertiesToReplace:r}))}return a||o.push($S(RS,{context:t})),zm(e,o),aP(p)})),Zg((async n=>{if(n&&Rm(n.type)){const{payload:t}=n,s=uI({...n,...t,actionMgrID:r});o.push(s);const a=e.action.payload.modalLoadingContainer;if(a){const e=a.context,{context_data:t}=$C(e)||{};t?.isLoading&&Jy(e)}return o}const{actionInPayload:s,response:i}=n,{context:c,containerName:l}=s,u={target:Va(l,c),containerItemID:c,context:c};return s.shouldUpdateCaseActionsInParentContext=!0,Km(i,s),t||a||o.push($S(LS,u)),o})),Xg((()=>{var e;return BC(o),$m(o,r),a||(e={context:n.payload.context,assignmentID:n.payload.assignmentID},fd.publish(js.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,e)),t||(o=[]),xf.isDeferredActionInProgress(n.payload.context)&&xf.handleDeferredActionCompletion(n.payload.context),o})))},EP=(e,t)=>{let n,s=0;return e.pipe(lh($g),Jg((e=>{const{saveOnly:r}=e.payload;({actionMgrID:s,caseType:n}=e.payload);return IP({action:e,state$:t,actionMgrID:s,caseType:n},r)})))},yP=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="expressLocalActionSubmit",fd.unsubscribe(js.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n)};n=e,s="expressLocalActionSubmit",fd.subscribe(js.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n,s)}var n,s},{LOCAL_ACTION_TYPE:AP}=js,{RESOURCE_TYPES:CP}=Fs,SP=(e,t)=>{const{actionID:n,assignmentID:s,caseID:r,context:a,openActionType:o,modalLoadingContainer:i,headers:c}=e,{isProcessAction:l}=t,u=l?ta:(e=>{const t=e.localActionType?.toLowerCase();return t===AP.CASE_WIDE||t===AP.EXPRESS||t&&e.isPromotedAction?na:ea})(e),d=tI.FORM,{reqType:p}=i_(u,{caseID:r,ID:s,actionID:n,viewType:d});let{restApi:g}=i_(u,{caseID:r,ID:s,actionID:n,viewType:d});e.actionType=u===na?js.CASE:js.ASSIGNMENT,g&&!g.includes("viewType=")&&(g=g.includes("?")?`${g}&viewType=${d}`:`${g}?viewType=${d}`),g=YI.appendExcludeQueryParamToUrl(g);const h=i?.context??a;return Mu(Wd(g,{method:p,headers:c},h)).pipe(Xg((t=>({response:t.data,actionInPayload:e,headers:sI(t.headers,"",e.headers)}))),ph(`: Error occurred during ajax call at ${o} Epic : `,h))},_P=(e,t)=>{const{isProcessAction:n}=t,s=n?ta:ea;e.openActionType=s;let r;if("modal"===Nm(s,e)){if(!md.isOnline()||e.isAppOffline)return Dg.rejectActionByID(e.actionMgrID),Promise.resolve();r=jy(e.contextName)[0]?jy(e.contextName)[0]:Qy(e.contextName);const n=r?xy(r):e.contextName,s=Ly(n),a=Nm(e.openActionType,e),o=Va(a,e.context),i=Ks(e.context,Hs(a,e.context));if(BC(_S({target:o,context:i,containerItemID:i,key:e.caseID,caseViewMode:js.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:js.CASE_INFO.CASE_INFO_CONTENT,type:"view"}},data:{key:e.caseID,caseInfo:{ID:e.caseID}},headers:{...e.headers}})),BC(bS({context:i})),e.modalLoadingContainer={target:o,context:i},!jy(e.contextName)[0])return SP(e,t);if(!e.continueExecution)return SP(e,t);if(!cy(s))return SP(e,t);e.saveActionPayload.modalLoadingContainer=e.modalLoadingContainer,e.saveActionPayload.canUpdateAvailableActions=!e.saveActionPayload.isModalAction;return Mu([Gg(e.saveActionPayload)]).pipe(Zg((e=>(e=>{let t,n=0;const s=[],r={value:kC()?.getState()};return nh(e).pipe(lh($g),Jg((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n,caseType:t}=e.payload),!a){const e={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return Dg.rejectActionByID(n,!0,e),nh([])}return IP({action:e,state$:r,actionMgrID:n,caseType:t,actionsOut:s},!0)})))})(e))),Zg((n=>1===n.length&&Rm(n[0].type)?Mu(mI(r,{loadingContext:e.context})).pipe(Zg((({continueExecution:n})=>n?SP(e,t):(Dg.rejectActionByID(e.actionMgrID),uh)))):SP(e,t))),Xg((e=>e)))}return SP(e,t)},NP=async(e,t,{headers:n,actionInPayload:s})=>{const{context:r,actionName:a,openActionType:o,doDeleteCaseSummary:i,modalLoadingContainer:c,skipMergeAssignmentsAndActions:l}=s,u=am(e),d=Nm(o,s),p=c?.target??Va(d,r);let g,h,f=!1;!Gy(p)||$y(p)&&!Ty(p,e.data.caseInfo.ID)?(h=Hs(d,r),Pm(d)&&(h=Ks(r,h)),g=h,f=!0):(g=$y(p)?Py(p,e.data.caseInfo.ID):xy(p),h=Ly(g));const m={acName:p,target:p,containerName:d,context:h};await oI(u,s,m),(void 0===u?.data?.caseInfo?.content||void 0!==u.data.caseInfo.content&&"object"==typeof u.data.caseInfo.content&&0===Object.keys(u.data.caseInfo.content).length)&&delete u.data?.caseMessages;const I=u.uiResources?.root;let E;E=I?js.PERFORM_MODE:js.REVIEW_MODE;const y=aI(u,{target:p,context:h,containerItemID:g,caseViewMode:E,doDeleteCaseSummary:i,headers:n,actionName:a,isMinimizable:!1,isInCreateStage:Pm(d),resourceType:CP.ASSIGNMENT,isProcessAction:s.isProcessAction,showProgress:s.showProgress,progressMessage:s.progressMessage,assignmentID:s.assignmentID,actionType:s.actionType,skipMergeAssignmentsAndActions:l});let A;if(I&&km(y,u),Pm(d)&&delete y.doDeleteCaseSummary,s.openActionType===ra&&(y.isBulkAction=!0,y.data.caseInfo.actionButtons.main[0].jsAction="async"===s.runningMode?"submitBulkActionAsync":"submitBulkAction",y.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",y.data.caseInfo.cases=s.selectedList,y.data.caseInfo.isAssignment=s.isAssignment),A=f?_S:s.isProcessAction||(e=>e.containerItemID?.includes(js.ACTIONAREA)&&e.context?.includes(js.ACTIONAREA))(s)?jS:RS,y.data.context_data.isProcessAction=s.isProcessAction,t.push($S(A,y)),f||t.push($S(vS,y)),f){const r=jy(s.contextName),a=Py(r,e.data.caseInfo.ID);if(a){const e={data:{caseInfo:{headers:n}},context:a};t.push($S(fS,e))}}g!==xy(p)&&t.push($S(wS,{target:p,containerItemID:g})),Vm(g)&&!c?.context&&NI(y,t);const C="other"===y.nextAssignmentInfo?.context;!s.isProcessAction||Gm(y.nextAssignmentInfo?.className)||C||zm({response:u,actionInPayload:{...s,containerItemID:g}},t),y.caseViewMode===js.REVIEW_MODE&&t.push($S(LS,y)),y.shouldUpdateCaseActionsInParentContext=!0;return rS.getIn(e.data,["caseInfo","isLocalAction"])||Km(u,y),t},TP="OPEN_LOCAL_ACTION",DP=(e,t)=>_P(e,t),PP=e=>{let t=0,n=[];return e.pipe(lh(TP),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),ih((()=>!Jm(t))),Zg((e=>DP(e,{actionMgrID:t}))),Zg((async e=>{if(!e)return uh;if(Rm(e.type)){const t=uI(e);n.push(t);const{context_data:s}=$C(e.payload.context)||{};return s?.isLoading&&n.push($S(vS,e.payload)),n}const{actionInPayload:t,headers:s,response:r}=e,{actionID:a}=t;rS.setIn(r,"data.caseInfo.activeActionID",a);return(e=>{fd.publish(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN,e)})(rS.getIn(r,"data.caseInfo.ID")),rS.setIn(r.data,js.CASE_INFO_IS_LOCAL_ACTION,!0),t.refreshConditions&&rS.setIn(r.data,js.CASE_INFO_REFRESH_CONDITIONS,t.refreshConditions),await NP(r,n,{headers:s,actionInPayload:t}),yP(t),n})),Xg((()=>(BC(n),$m(n,t),n=[],n))))},OP=e=>{const{actionID:t,context:n,openActionType:s,caseTypeID:r,bulkContextID:a="",bulkContextType:o=""}=e,i=ra,{reqType:c,restApi:l}=i_(i,{caseTypeID:r,actionID:t,bulkContextID:a,bulkContextType:o});return Mu(Wd(l,{method:c},n)).pipe(Xg((t=>({response:t.data,actionInPayload:e,headers:sI(t.headers)}))),ph(`: Error occurred during ajax call at ${s} Epic : `,n))},RP=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="bulkActionSubmit",fd.unsubscribe(js.PUB_SUB_EVENTS.EVENT_BULKACTION,n)};n=e,s="bulkActionSubmit",fd.subscribe(js.PUB_SUB_EVENTS.EVENT_BULKACTION,n,s)}var n,s},bP="OPEN_BULK_ACTION",vP=e=>{let t=0,n=[];return e.pipe(lh(bP),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),Zg((e=>((e,t)=>{const{context:n}=e,{actionMgrID:s}=t;e.openActionType=ra;const r=Nm(ra,e),a=Va(r,n);return Mu(mI(a,{loadingContext:n})).pipe(Zg((({continueExecution:t})=>t?OP(e):(Dg.rejectActionByID(s),uh))))})(e,{actionMgrID:t}))),Zg((async e=>{if(e&&Rm(e.type??"")){const t=uI(e);return n.push(t),n}const{actionInPayload:t,headers:s,response:r}=e,{actionID:a}=t;return rS.setIn(r,"data.caseInfo.activeActionID",a),await NP(r,n,{headers:s,actionInPayload:t}),RP(t),n})),Xg((()=>(1===n.length&&Rm(n[0].type)?Dg.rejectActionByID(t):Dg.resolveActionByID(t),BC(n),n=[],n))))};var xP=Array.isArray,wP=Object.getPrototypeOf,MP=Object.prototype,LP=Object.keys;function UP(e){if(1===e.length){var t=e[0];if(xP(t))return{args:t,keys:null};if((s=t)&&"object"==typeof s&&wP(s)===MP){var n=LP(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var s;return{args:e,keys:null}}var FP=Array.isArray;function jP(e){return Xg((function(t){return function(e,t){return FP(t)?e.apply(void 0,Fl([],Ul(t))):e(t)}(e,t)}))}function VP(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return $l(th(e))?e.pop():void 0}(e),s=UP(e),r=s.args,a=s.keys,o=new fu((function(e){var t=r.length;if(t)for(var n=new Array(t),s=t,o=t,i=function(t){var i=!1;Nu(r[t]).subscribe(Ou(e,(function(e){i||(i=!0,o--),n[t]=e}),(function(){return s--}),void 0,(function(){s&&i||(o||e.next(a?function(e,t){return e.reduce((function(e,n,s){return e[n]=t[s],e}),{})}(a,n):n),e.complete())})))},c=0;c<t;c++)i(c);else e.complete()}));return n?o.pipe(jP(n)):o}const kP=e=>{const{actionID:t,context:n,cases:s,classID:r,isAssignment:a}=e,{content:o}=rI(n,{nonEmptyAndChangedData:!0});let i=5;try{const e=Hf.getSharedState(Ls.getQualifiedNameForComplexRuleReferences("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults"));e?.find((e=>e[Ls.getDefaultQualifiedName("pyClassName")]===r))?.pyList.split(",").includes(t)&&(i=1)}catch(e){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',e)}const c=s.map((e=>({ID:e}))),l=c.length/i,u=a?"performAssignmentBulkAction":aa,{reqType:d,restApi:p}=i_(u,{actionID:t}),g=[],h=c.length;for(let t=0;t<h;t+=l){const s=c.slice(t,t+l);a?o.assignments=s:o.cases=s,s.length&&g.push(Mu(Wd(p,{method:d,body:o},n)).pipe(Xg((t=>{const{data:n,headers:s}=t;return{response:n,actionInPayload:e,headers:sI({...s})}})),ph("Error occurred during ajax call at submitbulkaction Epic : ",n)))}return VP(g)},BP=e=>{fd.publish(js.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},$P="SUBMIT_BULK_ACTION",GP=e=>{let t,n=0,s=[],r="";return e.pipe(lh($P),Jg((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const e={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return Dg.rejectActionByID(n,!0,e),nh([])}return nh(e.payload).pipe(Zg((e=>(t=e,kP(t)))),Zg((e=>{let n=0,a=0;const o=[],{containerItemID:i,context:c}=t;return e.forEach((e=>{const{response:t}=e;n+=Number(t.successCount),a+=Number(t.failureCount),a&&t.results.forEach((e=>{"200"!==e.status&&e.error&&e.error.errorDetails&&e.error.errorDetails.forEach((t=>{o.push({ID:e.BusinessID,message:t.localizedValue})}))}))})),r=`${n} record(s) updated`,BP({submitResponse:e}),t.target="HYBRID"===PA.getRenderingMode()?Qy(i):`${js.APP.APP}/${my.MODAL}`,s.push($S(LS,{containerItemID:i,context:c,target:t.target,skipReleaseLockRequest:!0})),a&&s.push($S(MS,{messages:[{type:"error",message:1===a?"1 record failed to update":`${a} records failed to update`,errorDetails:o,showHeader:!1}],context:Ws(c)||c,category:"HTTP",showHeader:!1})),s})),Xg((()=>(Dg.resolveActionByID(n,r),BC(s),s=[],s))))})))},WP=e=>{const{actionID:t,context:n,cases:s}=e,{content:r}=rI(n,{nonEmptyAndChangedData:!0});r.cases=s.map((e=>({ID:e})));const a=aa,{reqType:o,restApi:i}=i_(a,{actionID:t,runningMode:"async"});return Mu(Wd(i,{method:o,body:r},n)).pipe(Xg((t=>{const{data:n,headers:s}=t;return{response:n,actionInPayload:e,headers:sI({...s})}})),ph("Error occurred during ajax call at submitbulkactionasync Epic : ",n))},HP=e=>{fd.publish(js.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},qP="SUBMIT_BULK_ACTION_ASYNC",zP=e=>{let t,n=0,s=[],r={};return e.pipe(lh(qP),Jg((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const e={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return Dg.rejectActionByID(n,!0,e),nh([])}return nh(e.payload).pipe(Jg((e=>(t=e,WP(t)))),Xg((e=>{const{containerItemID:n,context:a}=t,{response:o}=e;return r={caseID:o.caseID,caseTypeID:"BackgroundJob"},HP({submitResponse:o}),t.target=`${js.APP.APP}/${my.MODAL}`,s.push($S(LS,{containerItemID:n,context:a,target:t.target,skipReleaseLockRequest:!0})),s})),Xg((()=>(Dg.resolveActionByID(n,r),BC(s),s=[],s))))})))},YP=(e,t)=>_P(e,t),KP=e=>{let t=0,n=[];return e.pipe(lh(Vg),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),Zg((e=>{const n=Nm(ta,e),s=Va(n,e.context);return Mu(mI(s,{loadingContext:e.context})).pipe(Zg((({continueExecution:n})=>n?(ud(e.context),YP(e,{actionMgrID:t,isProcessAction:!0})):(Dg.rejectActionByID(e.actionMgrID),uh))))})),Zg((async e=>{if(e&&Rm(e.type)){const t=uI(e);return n.push(t),n}const{actionInPayload:t,headers:s,response:r}=e;return await NP(r,n,{headers:s,actionInPayload:t}),n})),Xg((()=>(TI(n),$m(n,t),n=[],n))))},QP=e=>{let t=0,n=[];return e.pipe(lh(Rr,kr),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),Zg((e=>{const{containerItemID:t,caseID:n,context:s,caseDeleted:r,skipReleaseLockRequest:a,currentCaseViewMode:o,isProcessAction:i,isInCreateStage:c,deleteWork:l}=e,u=o===js.PERFORM_MODE,d=n&&u;return l?nh([]):i&&c?aP(e):t!==s||r||a||!d?t?.includes(js.MODAL)&&Qm(yA(t))===js.REVIEW_MODE?aP(e):nh([]):aP(e)})),Zg((e=>(e&&Rm(e.type)&&n.push(uI(e)),n))),Xg((()=>(BC(n),$m(n,t),n=[],n))))};var JP=function(e){function t(t,n){return e.call(this)||this}return xl(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(ql),XP={setInterval:function(e,t){for(var n=[],s=2;s<arguments.length;s++)n[s-2]=arguments[s];var r=XP.delegate;return(null==r?void 0:r.setInterval)?r.setInterval.apply(r,Fl([e,t],Ul(n))):setInterval.apply(void 0,Fl([e,t],Ul(n)))},clearInterval:function(e){var t=XP.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},ZP=function(e){function t(t,n){var s=e.call(this,t,n)||this;return s.scheduler=t,s.work=n,s.pending=!1,s}return xl(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var s=this.id,r=this.scheduler;return null!=s&&(this.id=this.recycleAsyncId(r,s,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),XP.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&&XP.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,s=!1;try{this.work(e)}catch(e){s=!0,n=e||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,s=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Hl(s,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(JP),eO={now:function(){return(eO.delegate||Date).now()},delegate:void 0},tO=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=eO.now,e}(),nO=new(function(e){function t(t,n){void 0===n&&(n=tO.now);var s=e.call(this,t,n)||this;return s.actions=[],s._active=!1,s}return xl(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}(tO))(ZP),sO=nO;function rO(e,t,n){void 0===e&&(e=0),void 0===n&&(n=sO);var s=-1;return null!=t&&(eh(t)?n=t:s=t),new fu((function(t){var r,a=(r=e)instanceof Date&&!isNaN(r)?+e-n.now():e;a<0&&(a=0);var o=0;return n.schedule((function(){t.closed||(t.next(o++),0<=s?this.schedule(void 0,s):t.complete())}),a)}))}function aO(e,t){return void 0===e&&(e=0),void 0===t&&(t=nO),e<0&&(e=0),rO(e,e,t)}function oO(e){return Pu((function(t,n){var s=!1,r=null,a=null,o=function(){if(null==a||a.unsubscribe(),a=null,s){s=!1;var e=r;r=null,n.next(e)}};t.subscribe(Ou(n,(function(t){null==a||a.unsubscribe(),s=!0,r=t,a=Ou(n,o,Zl),Nu(e(t)).subscribe(a)}),(function(){o(),n.complete()}),void 0,(function(){r=a=null})))}))}const iO=(e,t,n,s,r)=>{if(r!==js.RESOURCE_STATUS.CREATE)return;vI.isStateMachineExist(e,t,n)||vI.setStateMachine(e,n,t,new lp(n,t,e));vI.getStateMachine(e,t,n).insert({},"string"==typeof s?s:s+1,!0,{isDefault:!0})},cO=(e,t,n,s,r)=>{"string"==typeof t&&e.data?.caseInfo?.content&&n&&("CREATE"===s||"UPDATE"===s)&&(e.data.caseInfo.content[r][t][n]=t)},lO=e=>{const t=!e.isLocalAction&&e.editType===js.ACTION;return{...t?{}:{activeActionID:e.actionID},assignments:[{ID:e.assignmentID,...t?{actions:[{ID:e.actionID}]}:{}}]}},uO=e=>{let t=0,n=[],s="";return e.pipe(lh(_a),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),Zg((e=>GT(e))),Zg((async e=>{if(e&&e.type===Tr)return n.push(uI(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0}};const{actionInPayload:t,response:r,headers:a}=e,o=t.containerName,i=Va(o,t.context);let c=gI(i,o,t.context);c=Ks(t.context,c);const{pageReference:l,targetProperty:u,index:d,subscriptFieldName:p,pageGroupName:g,actionType:h,isPageGroup:f}=t,m=l?.startsWith(Fs.OBJECT_INFO.OBJECT_INFO);let I=null;m?(I=Us.transformCaseData(r),I.uiResources.root.config.context=`${l}${u}[${d}]`):I=r;const E=am(I);E.key=t.ID,E.data?.caseInfo?(E.data.caseInfo.ID=t.ID,cO(E,d,p,h,g)):E.data?.objectInfo&&(E.data.objectInfo.ID=t.ID);const{interestPageActionID:y,editType:A,isLocalAction:C,actionID:S}=t,_={isMultiRecordData:!0,viewName:t.viewID,parentContext:t.context,interestPage:t.interestPage,interestPageActionID:y,editType:A,isLocalAction:C,actionID:S};E.uiResources.context_data.modalView=_;const N=$C(t.context)?.context_data?.caseInfo,T=`${t.pageReference}${t.targetProperty}`,D=nd(N,T,t.index);E.uiResources.context_data.caseInfo={...E.uiResources.context_data.caseInfo,content:rS.mergeDeep(E.uiResources.context_data.caseInfo?.content,D?.content)};const P=cS.getProperty(js.CASE_INFO.REMOTESYSTEMID,"",t.context),O={acName:i,context:c};await oI(E,t,O);const R={target:i,context:c,containerItemID:c,headers:a,index:d,subscriptFieldName:p,pageGroupName:g,isPageGroup:f};P&&(R.headers={...R.headers,RemoteSystemID:P});const b=aI(E,R);b.resourceStatus=t.actionType,b.isMultiRecordData=!0,b.readOnly=t.readOnly,b.parentContext=t.context,b.heading=t.heading,b.data.caseInfo&&A===js.ACTION&&(b.data.caseInfo={...b.data.caseInfo,...lO(t),isLocalAction:t.isLocalAction}),b.clearStateMachine=!1;const v=dI(i,b);s=c,n.push(v);let x={changedListProperty:[],leafProperty:[]};return A===js.ACTION&&(vI.registerForServerChanges(),x=UC.getServerProperties(b.data,c)),{actionsOut:n,actionInPayload:t,serverProps:x}})),Xg((({actionInPayload:e,serverProps:r={changedListProperty:[],leafProperty:[]}})=>{if(bm(n)?Dg.rejectActionByID(t):Dg.resolveActionByID(t),e.skipPageInstructions||iO(s,e.pageReference,e.targetProperty,e.index,e.actionType),BC(n),n=[],e.editType===js.ACTION){UC.handleServerChanges(s,r.changedListProperty,r.leafProperty),vI.unRegisterForServerChanges();const t=js.getProperty(Fs.CASE_INFO.CASE_INFO_CONTENT)+rS.convertClipboardPageToPageRefNotation(e.interestPage);e.columns.forEach((n=>{const r=No.trimAnnotation(n.config.value),a=HC(r,t,s),o=oC(r.startsWith(".")?r.split(".").pop():r,n.config.classID);Zu.addFieldNode(s,t,e.viewID,r,a,{isDeclarativeTarget:!!o?.isDeclarativeTarget,context:s,propertyName:r,pageReference:t,value:n.config.value,isInsideList:/\[\d+\]/.test(t)||/\[\d+\]/.test(r)})}))}return n})))},dO=e=>{const{context:t}=e;let n={...rI(t).content,contextData:!1};const s=PI(t);rS.isEmpty(s)||(n=DI(s,n));const r=((e,t=!1)=>e===js.ACTION?t?Nf.REFRESH_CASE_DATA:Nf.REFRESH_ASSIGNMENT_DATA:Nf.REFRESH_CASE_VIEW)(e.editType,e.isLocalAction),{restApi:a,reqType:o}=i_(r,{ID:e.isLocalAction||e.editType!==js.ACTION?e.ID:e.assignmentID,actionID:e.actionID,viewID:e.viewID});let i=a;return e.editType===js.ACTION&&(i+=`?operation=${e.operationFlag}`,n.interestPageActionID=e.interestPageActionID),n.interestPage=e.interestPage,Mu(Wd(i,{method:o,body:n,headers:e.headers},t)).pipe(Xg((t=>({actionInPayload:e,response:t.data,headers:sI(t.headers)}))),ph(": Error occurred during getEmbeddedDataView request : ",t))},pO=(e,t,n)=>"string"==typeof n?`${e}${t}.${n}`:`${e}${t}[${n}]`,gO=(e,t,n,s,r)=>{const a=e.data?.caseInfo?.content;if(a){const e=((e,t,n)=>{const s=(e,t)=>{if((e=>"object"==typeof e&&null!==e)(e))return e[t]},r=t.replace(/^\./,"").split(".");let a=e;for(const e of r)a=s(a,e);return"string"==typeof n?s(a,n)??null:Array.isArray(a)?a[n]??null:null})(a,s,r);e&&BC(KS({context:t,reference:n,value:e}))}const o=e.uiResources?.context_data;o&&BC(KS({context:t,reference:js.CONTEXT_DATA,value:o}))},hO=e=>{let t=0,n=[];return e.pipe(lh(Na),Xg((e=>{const{payload:n}=e;return({actionMgrID:t}=n),n})),Zg((e=>dO(e))),fP((async e=>{const t={rootView:null,data:null,uiResources:null,containerContext:null};if(e?.type===Tr)return n.push(uI(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0},responseData:t};const{actionInPayload:s,response:r,headers:a}=e,{pageReference:o,targetProperty:i,index:c,containerName:l}=s,u=o?.startsWith(Fs.OBJECT_INFO.OBJECT_INFO),{context:d,containerContext:p,target:g}=(e=>{const{containerName:t,context:n}=e;if(!t)return{context:n,containerContext:null,target:null};const s=Va(t,n),r=gI(s,t,n)||t,a=Ks(n,r);return{context:a,containerContext:a,target:s}})(s),h=((e,t,n,s,r)=>{if(r){const r=Us.transformCaseData(e);return r.uiResources.root.config.context=pO(t,n,s),r}return e})(r,o,i,c,u),f=am(h);f.key=s.ID;const m=pO(o,i,c),I=l?{acName:g,context:d}:{context:d};if(await oI(f,s,I),l&&g){const e=aI(f,{target:g,context:d,containerItemID:d,headers:a,index:c});e.resourceStatus=s.actionType,e.isMultiRecordData=!0,e.readOnly=s.readOnly,e.parentContext=s.context,e.clearStateMachine=!1;const t=dI(g,e);n.push(t)}else gO(f,d,m,i,c);const E=f.uiResources?.root||null;return E?.config&&(E.config.context=m),t.rootView=E,t.data=f.data,t.uiResources=f.uiResources,t.containerContext=p,{actionsOut:n,actionInPayload:s,responseData:t}})),Xg((({actionsOut:e,responseData:s})=>{bm(e)?Dg.rejectActionByID(t):Dg.resolveActionByID(t,s);return n=[],e})))},fO=e=>{let t,n="",s=[];return e.pipe(lh(Ta),Jg((e=>{t=e.payload;const{isFormValid:r}=e.payload;if(({actionMgrID:n}=e.payload),!r){const t={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return Dg.rejectActionByID(n,!0,t),xf.handleDeferredActionCompletion(e.payload.context),nh([])}return nh(e.payload).pipe(Zg((e=>(t=e,GT(t)))),Zg((async e=>((e,t)=>{if(e&&"action"===t.editType&&e.type!==Tr){const{context:n,pageReference:s}=t,r={context:n},{response:a}=e,o=s?.startsWith(Fs.OBJECT_INFO.OBJECT_INFO);let i=null;o?(i=Us.transformCaseData(a),i.uiResources.root.config.context=s):i=a;const c=am(i);c.key=t.ID,c.data?.caseInfo?c.data.caseInfo.ID=t.ID:c.data?.objectInfo&&(c.data.objectInfo.ID=t.ID);const l=aI(c,r);l.skipValidation=!0;const u=$S(fS,l);vI.registerForServerChangesSync(),BC(u),vI.unRegisterForServerChanges()}return e})(e,t))),Zg((async e=>{if(e&&e.type===Tr){const t=uI(e);return s.push(t),s}const{containerItemID:n,context:r,pageReference:a,interestPage:o}=t,i=o?.replace(/\(\d+\)$/,"");return((e,t,n,s,r)=>{Ip(e).forEach((e=>{const a=r&&"replace"===e.instruction.toLowerCase()?rS.convertClipboardPageToPageRefNotation(r):rS.convertClipboardPageToPageRefNotation(e.target);vI.isStateMachineExist(t,n,a)||vI.setStateMachine(t,a,n,new lp(a,n,t));const o=vI.getStateMachine(t,n,a);switch(e.instruction.toLowerCase()){case"insert":o.insert(e.content,e.listIndex,s,{encryptedContent:e.encryptedContent});break;case"update":o.update(e.content,e.listIndex??e.groupIndex,s,{encryptedContent:e.encryptedContent});break;case"delete":e.listIndex?o.delete(e.listIndex,s):e.groupIndex?o.delete(e.groupIndex,s):o.deletePage();break;case"replace":o.replacePage(e.content,s,r?e.target:void 0,r?n:void 0,e.encryptedContent);break;case"move":o.move(e.listIndex,e.listMoveToIndex);break;case"add":o.insert(e.content,e.groupIndex,s,{encryptedContent:e.encryptedContent});break;case"delete all":o.deleteAll()}}))})(r,t.parentContext,a.startsWith(Fs.OBJECT_INFO.OBJECT_INFO_CONTENT)?js.getProperty(Fs.OBJECT_INFO.OBJECT_INFO_CONTENT):js.getProperty(Fs.CASE_INFO.CASE_INFO_CONTENT),!1,i),s.push($S(LS,{containerItemID:n,context:r,target:t.target,skipReleaseLockRequest:!0})),s})),Xg((()=>{if(bm(s))Dg.rejectActionByID(n),xf.handleDeferredActionCompletion(t.context);else{Dg.resolveActionByID(n),xf.handleDeferredActionCompletion(t.context);const{pageReference:s}=e.payload,r=cS.getPropertyValue(js.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,s,t.parentContext);r?((e,t)=>{const{pageReference:n,isMultiRecordData:s}=t,r=cS.getPropertyValue(js.getProperty(Fs.CASE_INFO.CASE_INFO_ID),n,e.parentContext),a=cS.getPropertyValue(js.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,n,e.parentContext),o=cS.getPropertyValue(Fs.CASE_INFO.ASSIGNMENT_ID,n,e.parentContext),i=cS.getPropertyValue(js.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,n,e.parentContext),{interestPage:c,interestPageActionID:l,actionID:u,isLocalAction:d}=i,p=e.pageReference.substring(0,e.pageReference?.lastIndexOf(".")).replace(js.getProperty(js.CASE_INFO.CASE_INFO_CONTENT),"");"action"===i.editType?pE(r,o,u,e.parentContext,c,l,d,s,i.editType):dE(r,a,e.parentContext,p,{})})(t,{isMultiRecordData:r,pageReference:s}):yE(t.parentContext,js.getProperty(js.CASE_INFO.CASE_INFO_CONTENT),{})}return BC(s),s=[],s})))})))},mO=e=>{const{caseID:t,headers:n,debugInfo:s,context:r}=e,a=i_("getDescendants",{caseID:t}),{restApi:o}=a,{reqType:i}=a;return Mu(Wd(o,{method:i,headers:{...n,...s&&{...wd.addDebugHeaders(s)}}},r)).pipe(Xg((t=>({actionInPayload:e,response:t.data,headers:sI({...n,...t.headers})}))),ph("Error ocurred during ajax call at getDescendants Epic : ",r))},IO=e=>{let t=0,n=[];return e.pipe(lh(_f),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),Zg((e=>mO(e))),Zg((async e=>{if(e&&Rm(e.type))return n.push(uI(e)),n;const{actionInPayload:t,response:s}=e,r={};rS.setIn(r,"caseInfo.childCases",s?.childCases??[]),s?.uiResources?.resources&&fC(s.uiResources.resources),s?.uiResources?.components&&await Ig(s.uiResources.components),s?.uiResources?.localeReferences&&rS.setIn(r,"localeReferences",s.uiResources.localeReferences),s?.uiResources?.childCases_context_data&&rS.setIn(r,"childCases_context_data",s.uiResources.childCases_context_data);const a={data:r,context:t?.context};return n.push($S(fS,a)),n})),Xg((()=>(BC(n),$m(n,t),n=[],n))))},EO=e=>{let t,n="",s=[],r={};return e.pipe(lh(Da),Jg((e=>{t=e.payload;const{isFormValid:a}=e.payload;return({actionMgrID:n}=e.payload),a?nh(e.payload).pipe(Zg((e=>(t=e,nh({})))),Zg((async()=>{const{containerItemID:e}=t,a=$C(e),o=e,i=a?.dataInfo.content;delete i.classID;const c=Ws(o),l=jy(c).length,u=jy(c)[l-1]?xy(jy(c)[l-1]):c,d=Qy(e),p=Cy(d,e)||{},g=p?.referenceList?.replaceAll(".",""),h=p?.subscriptName,f=$C(u),m={containerItemID:u,data:{...f,caseInfo:{content:{...i}}}};s.push($S(RS,m)),((e,t,n)=>{cy(t)&&e.push($S(LS,{containerItemID:n,skipReleaseLockRequest:!0}))})(s,o,e);const I=(({itemData:e,workareaContainerData:t,subscriptData:n,pageGroupName:s,activeWorkArea:r,subscriptFieldName:a,actionMgrID:o,containerItemID:i})=>{const c={referenceList:e?.referenceList,ID:t?.caseInfo?.ID,index:n[a],containerName:Fs.MODAL,pageReference:Fs.CASE_INFO.CASE_INFO_CONTENT,viewID:Fs.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW,skipSemanticUrl:!0,actionType:Fs.RESOURCE_STATUS.CREATE,interestPage:`.${s}.${n[a]??""}`,targetProperty:`.${s??""}`,pageGroupName:s,context:r??"",subscriptFieldName:a};return{type:_a,payload:{isInCreateStage:!1,isModalAction:!0,parentContext:"",target:"",...c,actionMgrID:o,containerItemID:i,doDeleteCaseSummary:!1,isFormValid:!0}}})({itemData:p,workareaContainerData:f,subscriptData:i,pageGroupName:g,activeWorkArea:u,subscriptFieldName:h,actionMgrID:n,containerItemID:e});return s.push(I),r=i,s})),Xg((()=>(Dg.resolveActionByID(n,r),BC(s),s=[],s)))):(((e,t)=>{const n={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};Dg.rejectActionByID(e,!0,n),xf.handleDeferredActionCompletion(t)})(n,e.payload.context),nh([]))})))},yO=[lD,LD,WD,QD,PP,vP,GP,zP,KP,sP,dP,iP,QP,EP,hP,e=>e.pipe(lh(Xr),oO((()=>aO(100))),Xg((e=>{const{actionMgrID:t,isChildCase:n,isModalAction:s,isProcessAction:r,isDataObject:a,skipReleaseLockRequest:o,isInCreateStage:i,containerItemID:c,context:l}=e.payload;return Dg.resolveActionByID(t),fd.publish(js.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:s,hideDelete:!r&&n,isDataObject:a,skipReleaseLockRequest:o,isInCreateStage:i,containerItemID:l||c}),[]}))),e=>e.pipe(lh(Br),oO((()=>aO(100))),Xg((e=>{const{actionMgrID:t,context:n,containerName:s,containerItemID:r}=e.payload,a=Va(s,n);return Dg.resolveActionByID(t),BC($S(wS,{containerItemID:r,target:a,doDeleteCaseSummary:!1})),[]}))),uO,hO,fO,IO,EO];function AO(){return Pu((function(e,t){e.subscribe(Ou(t,Zl))}))}const{RESOURCE_TYPES:CO}=Fs,SO="pyCasePreview",_O=(e,t)=>{const n=YI.isObjectCaseType(e.caseClassName);if(e.key&&!n){const n=Qy(e?.context),s=Py(n,e.key),r=e?.context;(s||e.updateData||(e=>{const t=kC();if(!e)return!1;const n=Ws(e),s=Qy(n),r=Qy(e);if(!s||!r)return!1;const a=Cy(s,n),o=Cy(r,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)})(r))&&t.actionsOut.push($S(fS,e))}else t.actionsOut.push($S(fS,e))},NO=[e=>e.pipe(lh(tr),Xg((e=>e.payload)),ih((e=>!Jm(e.actionMgrID))),Zg((e=>{const t={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===my.PREVIEW&&e.context&&e.caseId&&!e.updateData){const t=Va(my.PREVIEW,e.context),n=gI(t,my.PREVIEW,e.context,{buildNew:!0}),s=decodeURI(e.caseId);BC(_S({...e,context:n,target:t,containerItemID:n,key:s,caseViewMode:js.REVIEW_MODE,root:{type:"reference",config:{context:js.getProperty(js.CASE_INFO.CASE_INFO_CONTENT),name:e.viewName,type:"view"}},data:{key:s,caseInfo:{ID:s,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(Bs.isRemoteCase(t.caseClassName)){const{RemoteSystemID:e}=Bs.getRemoteCase(t.caseClassName);n.RemoteSystemID=e}const{restApi:s,reqType:r}=((e,t)=>{let n=i_("loadView",t);e.viewContext===CO.PAGE&&(n=i_(Wr,{page:e.viewName,pageClass:e.pageClass}));const s=Ls.getDefaultQualifiedName(SO);return e.containerName===my.PREVIEW&&Boolean(e.caseId)&&e.viewContext!==CO.PAGE&&(e.viewName===s||e.viewName===SO)&&(n=i_(Yr,{caseID:e.caseId,params:{pageName:s}})),n})(e,t);return Mu(Wd(YI.appendExcludeQueryParamToUrl(s),{method:r,headers:n},e.context)).pipe(Xg((t=>{const n=decodeURI(e.caseId);let s="";return"string"==typeof t.data?t.data?s=JSON.parse(t.data):(console.error("response data is empty!!"),s={}):s=t.data,{response:{...s,key:n},actionConfig:e,headers:sI(t.headers),rootView:rS.getIn(s,js.ROOT)}})),ph(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))})),Zg((async e=>{const t={};if(e?.type===Tr){if(t.actionsOut=uI(e),e?.payload?.context?.includes(my.PREVIEW)){const n={...$C(e.payload.context),caseInfo:{progress:!1,error:!0}},s=Va(my.PREVIEW,e.payload.context);t.actionsOut=$S(RS,{key:n.key,target:s,containerName:my.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:s,headers:r}=e;e?.actionConfig?.skipAssignmentsUpdate&&(delete s?.data?.caseInfo?.assignments,delete s?.data?.caseInfo?.availableActions,delete s?.data?.caseInfo?.availableProcesses);const{containerItemID:a,containerName:o}=n,{target:i,context:c}=(e=>{const{containerName:t,updateData:n,viewLoadingContainer:s}=e,r=t||Og.getTargetViewContainerName(Wr),a=s?.target??Va(r,e.context);return{target:a,context:s?.context??(t===my.PREVIEW&&n?e.context:gI(a,r,e.context,{buildNew:!!t}))}})(n);n.context=c;const l={acName:i,context:c};let u={};u=am(s),u.directUrlUpdation=!1,await oI(u,n,l);const d={...n,target:i,context:c,containerItemID:a||c,headers:r},p=aI(u,d);if(p.resourceType=CO.CASE,n.viewName===js.PY_CONFIRM&&(p.caseViewMode=js.REVIEW_MODE,rS.setIn(p.data,["context_data","caseViewMode"],js.REVIEW_MODE)),o&&!p.updateData){p.caseViewMode=js.REVIEW_MODE,rS.setIn(p.data,["context_data","caseViewMode"],p.caseViewMode);const e=Qy(p?.context);((e,t,n,s,r)=>{e&&r===my.PREVIEW?(n.data.caseInfo.progress=!1,delete n.root,Km(n,n),s.actionsOut=$S(RS,{...n,containerName:r})):e?(s.actionsOut=[],s.actionsOut.push($S(wS,{target:t,containerItemID:e}))):s.actionsOut=$S(_S,{...n,containerName:r})})(Py(e,p.key),e,p,t,o)}else{p.preserveClientChanges=!0,t.actionsOut=[],o===my.PREVIEW&&t.actionsOut.push({type:ha,payload:{context:c,skipMergeAssignmentsAndActions:!1}});const{viewName:e}=n;e===Ls.getDefaultQualifiedName(SO)&&Km(p,p),_O(p,t)}}catch(e){console.error(e),t.rootView={type:"error",payload:e}}const{caseId:n,context:s,viewName:r}=e.actionConfig;return r===Ls.getDefaultQualifiedName(SO)&&(e=>{fd.publish(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_PREVIEW,e)})({caseId:n,context:s}),t})),Xg((({rootView:e,actionsOut:t,actionMgrID:n=0})=>(Dg.resolveActionByID(n,e),Us.setNeedsMapping(!1),t)))),e=>{let t=0,n=[];return e.pipe(lh(nr),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),Zg((e=>{fd.publish(Fs.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);const{debugInfo:n,context:s,viewName:r,className:a,skipSemanticUrl:o=!1,containerName:i=Og.getTargetViewContainerName(Wr)}=e,c=n&&{...wd.addDebugHeaders(n)},l=Va(i,s);let u="";if(!o){const{semanticURL:t,activate:n,activateContainerActionPayload:s}=AI(r,a,l);if(u=t,n)return OI(s),nh({type:Fr,activateContainerActionPayload:s,actionConfig:e})}return Mu(xy(l)?mI(l,{loadingContext:s}):Promise.resolve({continueExecution:!0,removeActionPayload:{}})).pipe(Zg((({continueExecution:n,removeActionPayload:i})=>{if(!n)return Dg.rejectActionByID(t),uh;const{restApi:l,reqType:d}=i_(Wr,{page:r,pageClass:a});return Mu(Wd(l,{method:d,headers:c},s)).pipe(Xg((t=>{let n={};return n="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...n,key:u,semanticURL:u},actionConfig:e,headers:sI(t.headers),removeActionPayload:i,skipSemanticUrl:o}})),ph(": Error ocurred during ajax call at showPage Epic : ",e.context))})))})),Zg((async e=>{const t={};if(t.actionManagerID=e?.actionConfig?.actionMgrID,e&&e.type===Tr)return n.push(uI(e)),t;let{type:s}=e;const{actionConfig:r,skipSemanticUrl:a}=e,o=r.containerName||Og.getTargetViewContainerName(nr),i=Va(o,r.context);fd.publish(Fs.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,{pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),fd.publish(Fs.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className});const{remoteCasePayload:c,updatedType:l}=((e,t,n,s)=>{let r={},a=e;if(n.isRemoteCase){r={...n};const e=Py(s,r.insKey);e&&(t.activateContainerActionPayload={containerItemID:e},a=Fr)}return{remoteCasePayload:r,updatedType:a}})(s,e,r,i);if(s=l??s,r.isDeferLoaded){const{response:s,headers:o={}}=e,{isCreateDataObject:c,context:l}=r,u=am(s,{isCreateDataObject:c});u.directUrlUpdation=!a;const d={acName:i,context:l};await oI(u,r,d);const p=aI(u,{containerItemID:l,target:i,headers:o,context:l});t.rootView=rS.getIn(u,js.ROOT),n.push($S(fS,p))}else if(s===Fr){const{activateContainerActionPayload:{semanticURL:t,containerItemID:s}}=e,a={acName:i,context:Ly(s)};r.isTraditionalRemoteCase||await oI({directUrlUpdation:!0,semanticURL:t},r,a,!0),n.push($S(wS,{target:i,containerItemID:s}))}else{const t=gI(i,o,r.context),{response:s,headers:l={},removeActionPayload:u}=e,d=am(s,{isCreateDataObject:r.isCreateDataObject});d.directUrlUpdation=!a;const p={acName:i,context:t},g=Qm(t);await oI(d,r,p);const h={target:i,context:t,containerItemID:t,headers:l,debugInfo:r.debugInfo,currentCaseViewMode:g,referenceList:r?.referenceListStr,subscriptName:r?.subscriptName},f=aI(d,h);f.resourceType=Fs.PAGE,r.isCreateDataObject&&(f.resourceType=Fs.RESOURCE_TYPES.DATA,f.resourceStatus=Fs.RESOURCE_STATUS.CREATE,delete f.data.caseInfo,f.referenceList=r.referenceListStr,f.subscriptName=r.subscriptName),((e,t,n)=>{e.isRemoteCase&&(n.resourceType=Fs.CASE,n.key=YI.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:xm(YI.getRemoteCaseKey(t.assignmentID,t.insKey))}},pI(n.data,t.remoteCaseMeta),n.isTraditionalRemoteCase=e.isTraditionalRemoteCase||!1,n.className=t.className)})(r,c,f),f.data??={},f.data.traditionalGadgetId=YI.getUniqueGadgetId();const m=dI(i,f);u.containerItemID&&hI(m)&&n.push($S(LS,{containerItemID:u.containerItemID,target:i})),n.push(m)}return fd.publish(Fs.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:i,pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),t})),Xg((({actionManagerID:e=0,rootView:t})=>{Dg.resolveActionByID(e,t),BC(n),n=[]})),AO())}],TO=(e,t,n)=>{const{context:s,pageName:r,dataContext:a,dataContextParameters:o,semanticURL:i,skipSemanticUrl:c,RemoteSystemID:l}=e,{removeActionPayload:u}=t,{restApi:d,reqType:p,body:g}=i_(Hr,{pageName:r,dataContext:a,dataContextParameters:o}),h={};return h.RemoteSystemID=l,Mu(Wd(d,{method:p,headers:h,body:g},s)).pipe(Xg((t=>({response:{...t.data,key:i,semanticURL:i},actionConfig:e,headers:sI(t.headers),removeActionPayload:u,skipSemanticUrl:c}))),ph("Error occurred during ajax call at showData Epic : ",e.context,String(n)))},{RESOURCE_TYPES:DO}=Fs,PO=e=>{const{dataViewName:t,context:n,dataViewParameters:s}=e,r={data_view_ID:t,dataViewParameters:encodeURIComponent(JSON.stringify(s))},{restApi:a,reqType:o}=i_("deleteDataObject",r);return Mu(Wd(a,{method:o},n)).pipe(Xg((t=>({response:t.data,actionInPayload:e}))),ph("Error occurred during ajax call at deleteDataObject Epic",n))},OO=e=>{const{dataViewID:t,dataViewParameters:n,context:s}=e,r={data_view_ID:t},{restApi:a,reqType:o}=i_("getDataObjectActions",r);return Mu(Wd(a,{method:o,body:{dataViewParameters:n}},s)).pipe(Xg((e=>({...e.data}))),ph("Error occurred during ajax call at GET data object actions : ",e.context))},RO=[e=>{let t,n=0,s=[];return e.pipe(lh(sr),fP((e=>(({actionMgrID:n}=e.payload),nh(e.payload).pipe(Zg((e=>((e,t)=>{const{context:n,pageName:s,dataContext:r,dataContextParameters:a,skipSemanticUrl:o=!1,isDeferLoaded:i=!1,parentAction:c="",resourceType:l,containerName:u,RemoteSystemID:d}=e,p=Va(u,n);let g="";const h={context:n,pageName:s,dataContext:r,dataContextParameters:a,semanticURL:g,skipSemanticUrl:o,containerName:u,isDeferLoaded:i,parentAction:c,resourceType:l,RemoteSystemID:d};if(!o){g=a_(Hr,{pageName:s,dataViewName:r},a),h.semanticURL=g;const{activate:o,activateContainerActionPayload:i}=EI(DO.PAGE,p,{semanticURL:g});return o?nh({type:Fr,activateContainerActionPayload:i,actionConfig:e}):Mu(mI(p,{loadingContext:n})).pipe(Zg((({continueExecution:e,removeActionPayload:n})=>e?TO(h,{removeActionPayload:n},t):(Dg.rejectActionByID(t),uh))))}return TO(h,{removeActionPayload:{}},t)})(e,n))),Zg((async e=>{if(e&&e.type===Tr)return s.push(uI(e)),s;const{type:n,actionConfig:r,headers:a,response:o,skipSemanticUrl:i}=e;t=rS.getIn(o,js.ROOT);const{containerName:c,parentAction:l,resourceType:u}=r,d=Va(c,r.context);let p;const g=Qm(r?.context);if(r.isDeferLoaded){p=am(o),p.directUrlUpdation=!i;const t={acName:d,context:r.context};await oI(p,r,t);const n={target:d,headers:a,context:r.context,containerItemID:e.containerItemID},c=aI(p,n);return s=$S(fS,c),s}if(n===Fr){const{activateContainerActionPayload:{semanticURL:t,containerItemID:n}}=e,a={acName:d,context:Ly(n)};await oI({directUrlUpdation:!0,semanticURL:t},r,a,!0),s.push($S(wS,{target:d,containerItemID:n,resourceType:DO.DATA}))}else if("DATA"===u&&l===Sa){const{context:e}=r,t=o?.data,n={context:e,data:t};s.push($S(fS,n))}else{const t=gI(d,c,r.context),{removeActionPayload:n}=e;p=am(o),p.directUrlUpdation=!i;const l={acName:d,context:t};await oI(p,r,l);const u=aI(p,{target:d,context:t,containerItemID:t,headers:a,currentCaseViewMode:g});u.resourceType=DO.DATA;const h=dI(d,u);n.containerItemID&&hI(h)&&s.push($S(LS,{containerItemID:n.containerItemID,target:d})),SI(s),s.push(h)}return s})),Xg((()=>(Dg.resolveActionByID(n,t),BC(s),s=[],s))))))))},e=>{let t=0,n=[];return e.pipe(lh(Ia),gh(100),Jg((e=>{const{isFormValid:s}=e.payload;if(({actionMgrID:t}=e.payload),!s){const e={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return Dg.rejectActionByID(t,!0,e),nh([])}return nh(e.payload).pipe(Zg((e=>hh(e))),Zg((async e=>{if(e&&e.type===Tr){const{payload:s}=e,r=uI({...e,...s,actionMgrID:t});return n.push(r),{actionsOut:n,data:void 0}}const{actionInPayload:s}=e,{containerItemID:r,isModalAction:a}=s,o=a?my.MODAL:my.PRIMARY,i={target:Va(o,r),containerItemID:r,context:r};return n.push($S(LS,i)),{actionsOut:n,data:e?.response}})),Xg((({data:e})=>(1===n.length&&Rm(n[0].type)?Dg.rejectActionByID(t):Dg.resolveActionByID(t,e),BC(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(lh(ya),gh(100),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),Zg((e=>fh(e))),Zg((async e=>{if(e&&e.type===Tr){const{payload:s}=e,r=uI({...e,...s,actionMgrID:t});return n.push(r),n}const{actionInPayload:s,response:r,headers:a={}}=e,{containerName:o,readOnly:i,actionName:c}=s,l=Va(o,s.context),u=gI(l,o,s.context),d={acName:l,context:u};if(r?.data?.dataInfo){const{dataInfo:e}=r.data;e.dataContext||=s.dataLookUp,e.dataContextParameters||=s.requestPayload}await oI(r,s,d);const p=aI(r,{target:l,context:u,containerItemID:u,headers:a});return p.resourceType=Fs.RESOURCE_TYPES.DATA,p.resourceStatus=Fs.RESOURCE_STATUS.UPDATE,p.readOnly=i,p.actionName=c,p.key=JSON.stringify(s.requestPayload),n.push($S(_S,p)),n})),Xg((()=>(1===n.length&&Rm(n[0].type)?Dg.rejectActionByID(t):Dg.resolveActionByID(t),BC(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(lh(Aa),gh(100),Jg((e=>{const{isFormValid:s}=e.payload;if(({actionMgrID:t}=e.payload),!s){const e={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return Dg.rejectActionByID(t,!0,e),nh([])}return nh(e.payload).pipe(Zg((e=>mh(e))),Zg((async e=>{if(e&&e.type===Tr){const{payload:s}=e,r=uI({...e,...s,actionMgrID:t});return n.push(r),n}const{actionInPayload:s}=e,{containerItemID:r,isModalAction:a}=s,o=a?my.MODAL:my.PRIMARY,i={target:Va(o,r),containerItemID:r,context:r};return n.push($S(LS,i)),n})),Xg((()=>(1===n.length&&Rm(n[0].type)?Dg.rejectActionByID(t):Dg.resolveActionByID(t),BC(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(lh(Ea),gh(100),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),Zg((e=>PO(e))),Zg((async e=>{if(e&&e.type===Tr){const{payload:s}=e,r=uI({...e,...s,actionMgrID:t});return n.push(r),n}return[]})),Xg((()=>(1===n.length&&Rm(n[0].type)?Dg.rejectActionByID(t):Dg.resolveActionByID(t),BC(n),n=[],n))))},e=>{let t=0,n=[];let s={};return e.pipe(lh(_r),gh(100),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),Zg((e=>OO(e))),Zg((async e=>e&&e.type===Tr?(n.push(uI(e)),n):(s=e,[]))),Xg((()=>(1===n.length&&Rm(n[0].type)?Dg.rejectActionByID(t):Dg.resolveActionByID(t,s),BC(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(lh(Ca),gh(100),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),Zg((e=>Ih(e))),Zg((async e=>{if(e&&e.type===Tr){const{payload:s}=e,r=uI({...e,...s,actionMgrID:t});return n.push(r),n}const{actionInPayload:s,response:r,headers:a={}}=e,{containerName:o,actionID:i,context:c,actionName:l}=s,u=Va(o,s.context);let d=Hs(o,c);d=Ks(c,d);const p={target:u,context:d,containerItemID:d,headers:a,resourceType:Fs.RESOURCE_TYPES.DATA,resourceStatus:Fs.RESOURCE_STATUS.OPEN_FLOW_ACTION,key:JSON.stringify(s.dataViewParameters),actionID:i,actionName:l};if(r?.data?.dataInfo){const{dataInfo:e}=r.data;e.dataContext||=s.lookupDatapage,e.dataContextParameters||=s.dataViewParameters}const g={acName:u,context:c};await oI(r,s,g);const h=aI(r,p);return n.push($S(_S,h)),n})),Xg((()=>(1===n.length&&Rm(n[0].type)?Dg.rejectActionByID(t):Dg.resolveActionByID(t),BC(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(lh(Sa),gh(100),Jg((e=>{const{isFormValid:s}=e.payload;({actionMgrID:t}=e.payload);const r=e.payload.context;if(!s){const e={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return Dg.rejectActionByID(t,!0,e),nh([])}return od({context:r,stateObj:$C(r),clearContextMessages:!0}),nh(e.payload).pipe(Zg((e=>Eh(e))),Zg((async e=>{if(e&&e.type===Tr){iE(e,"dataObject");const{payload:s}=e,r=uI({...e,...s,actionMgrID:t});return n.push(r),n}const{actionInPayload:s,response:r,headers:a={}}=e,{containerName:o,containerItemID:i,resourceType:c,key:l}=s,u=Va(o,s.context),d={acName:u,context:s.context};await oI(r,s,d);const p={key:l,target:u,resourceType:c,containerItemID:i,headers:a,context:s.context};return n=((e,t,n,s)=>{const{resourceType:r,key:a,containerItemID:o}=s,i=aI(n,t);i.resourceType=r||Fs.RESOURCE_TYPES.DATA;const c=Qs(o);e.push($S(LS,i));const l=HC(".dataContext","dataInfo",c),u=HC(".dataContextParameters","dataInfo",c),d={context:c,skipSemanticUrl:!0,resourceType:r,parentAction:Sa,dataContext:l,dataContextParameters:u},p=l&&u&&a_(Hr,{pageName:js.PY_DETAILS,dataViewName:l},u)||"";if(o?.includes(js.PREVIEW)){const t={type:sr,payload:{pageName:js.VIEW_NAMES.PY_DATA_PREVIEW,container:js.PREVIEW,containerName:js.PREVIEW,...d}};e.push(t)}else if(r!==js.PAGE&&a===p&&o?.includes(js.PRIMARY)){const t={type:sr,payload:{pageName:js.VIEW_NAMES.PY_DETAILS,containerName:"",...d}};e.push(t)}return e})(n,p,r,{key:l,resourceType:c,containerItemID:i}),n})),Xg((()=>(1===n.length&&Rm(n[0].type)?Dg.rejectActionByID(t):Dg.resolveActionByID(t),BC(n),n=[],n))))})))}];function bO(e,t){return void 0===t&&(t=nO),Pu((function(n,s){var r=null,a=null,o=null,i=function(){if(r){r.unsubscribe(),r=null;var e=a;a=null,s.next(e)}};function c(){var n=o+e,a=t.now();if(a<n)return r=this.schedule(void 0,n-a),void s.add(r);i()}n.subscribe(Ou(s,(function(n){a=n,o=t.now(),r||(r=t.schedule(c,e),s.add(r))}),(function(){i(),s.complete()}),void 0,(function(){a=r=null})))}))}const{RESOURCE_TYPES:{CASE:vO,DATA:xO,OBJECT:wO}}=Fs;let MO=[],LO=!1,UO=!1,FO=null,jO=null;const VO={},kO=[e=>e.pipe(lh(Nr),bO(200),Xg((e=>e.payload)),Zg((e=>{UO=!1,fd.subscribe(Fs.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{UO=!0}));const t=Id.getPreviewMode()&&wd.addDebugHeaders({debugId:rS.generateUniqueID()});VO.dataContext=e.payload.dataViewName,VO.dataContextParameters=e.payload.dataViewKeys;const{context:n,requestType:s,routeKey:r}=e;let{routeEndpoint:a}=e;a&&(a.indexOf("viewType={viewType}")>0?a=a.replace("{viewType}","page"):a.indexOf('viewType=""')>0&&(a=a.replace('viewType=""','viewType="page"'))),LO=r===La,LO&&Us.setNeedsMapping(!0);const o=rn()+a,i=e.options.context;let c;const l={},u=e?.payload?.caseClassName;if(Bs.isRemoteCase(u)){const{RemoteSystemID:e}=Bs.getRemoteCase(u);l.RemoteSystemID=e}if(PA.isWSSPortal()&&(l[js.X_ORIGIN_CHANNEL]="WSS"),"POST"===s){c=e.payload,a.indexOf("viewType=")<0&&(a=`${a}?viewType=page`);let i;switch(_I(r)){case vO:case wO:i={caseTypeID:c.caseTypeID,processID:c.processID,content:{}};break;case xO:i=VO;break;default:i=c}return Mu(Wd(o,{method:s,body:i,headers:{...l,...t}},n)).pipe(Xg((t=>({response:{...t.data},payload:e,headers:sI(t.headers,"",l)}))),ph(": Error occurred during ajax call at historyEpic : ",e))}return Mu(Wd(YI.appendExcludeQueryParamToUrl(o),{method:"GET",headers:{...l,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(Xg((n=>({response:n.data,payload:e,headers:{...sI(n.headers),...t}}))),Lu((s=>{if(r===oa){const n={messages:[{type:"error",message:s.response.data.errorDetails[0].localizedValue}],category:"PAGE"};Ng.setComponentCache("assignments-launchAssignment-Error",n);const r=Rh(SA()),a=TA.getEndPointInfo(r.split("/assignments")[0]),o=rn()+a.routeEndpoint;return e={...e,routeKey:Yr,resetSemanticURL:!0},Mu(Wd(o,{method:a.reqType,headers:{...l,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(Xg((n=>({response:n.data,payload:e,headers:{...sI(n.headers),...t}}))))}return nh(GS(": Error occurred during ajax call at historyEpic : ",s,n))})))})),Zg((async e=>{if(UO)return MO;if(fd.subscribe(Fs.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{UO=!0})),e&&e.type===Tr)return uI(e);const{headers:t={},response:n,payload:s}=e,r=am(n,{[Fs.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),a=s.options.acName,o=By(a)&&Gy(a)?xy(a):e.payload.options.context,i=o;t.RemoteSystemID=s?.payload?.RemoteSystemID,jO={target:a,context:o,containerItemID:i,headers:t,debugInfo:{debugId:t[js.COREHEADER_APP_DEBUG_ID]}};let c=s?.payload?.pageClass;const l=s?.payload?.page,u=LO?La:Yr,d=LO?s.payload.objectID:s.payload.workID,p=LO?"{objectID}":"{workID}";let g=LO?`objects/${d}`:"";s?.payload?.caseName&&d&&(g=a_(u,{caseName:e.payload.payload.caseName}),g=g?.replace(p,d)||"",c=s?.payload?.caseClassName),(s?.routeKey===oa||s?.resetSemanticURL)&&((e,t)=>{const n=Lm(t);let s=a_(Yr,{caseClassName:wm(t)},{id:n});s=s?.replace("{workID}",String(xm(n))).replace("{id}",String(xm(n))),f_({directUrlUpdation:!0,semanticURL:s,options:{}})})(0,r),((e,t)=>{const n=t?.data?.caseInfo;e===oa&&n?.caseTypeID&&n?.content&&Gm(n.caseTypeID)&&(n.content.coexistenceAction=Kr)})(s?.routeKey,r),(e=>{const t=e?.data?.caseInfo;if(!t)return;const{ID:n,caseTypeID:s}=t;n&&s&&Gm(s)&&(e.data.caseID=n)})(r),fd.publish(Fs.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,{pageName:l,pageClass:c}),fd.publish(Fs.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:l,pageClass:c});const h=rS.getIn(r,js.COMPONENTS);h&&await Ig(h),Jp(r,s.options.actionConfig,!0),fd.publish(Fs.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:a,pageName:l,pageClass:c});let f=aI(r,jO);return f=((e,t,n)=>{if(e===eI.CASE||e===eI.OBJECT||e===eI.ASSIGNMENT){if(t?.caseInfo?.assignments&&t?.caseInfo?.assignments.length>0){const{key:e,flowName:s}=cI(t.caseInfo.assignments[0].ID);n.key=e||t.caseInfo.ID,n.flowName=s}else n.flowName="",n.key=t?.caseInfo?.ID||t?.objectInfo?.ID||t.semanticURL;n.resourceType=e,n.semanticURL=t.semanticURL,e===eI.ASSIGNMENT?(n.caseViewMode=js.PERFORM_MODE,n.resourceType=eI.CASE):n.caseViewMode=js.REVIEW_MODE}else n.resourceType=e,n.semanticURL=t.semanticURL;return n})(_I(e.payload.routeKey),{...n.data,semanticURL:g,caseViewMode:js.REVIEW_MODE},f),f.data.traditionalGadgetId=YI.getUniqueGadgetId(),MO.push(dI(a,f)),FO=r,((e,t)=>{let n=Ng.getComponentCache("assignments-launchAssignment-Error")||{};n&&"object"==typeof n&&Object.keys(n).length>0&&(n={...n,context:e},t.push($S(MS,n)),Ng.resetComponentCache("assignments-launchAssignment-Error"))})(o,MO),MO})),Xg((()=>(UO||BC(MO),FO&&jO&&Km(FO,jO),MO=[],LO=!1,UO=!1,jO=null,FO=null,MO))),ph("Error occurred"))],BO=[e=>{let t=0;return e.pipe(lh(la),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),Xg((()=>{const e=kC()?.getState(),n=VT();return Xt(e,n)&&t>0?Dg.resolveActionByID(t,{}):Dg.rejectActionByID(t),[]})),AO())}],$O=[e=>{let t=0,n=[];return e.pipe(lh(rr),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),Zg((e=>{const{context:t,skipSemanticUrl:n=!1,insightID:s}=e;let r,a="";n||(a=a_(qr,{insightID:"{insightID}"}),a=a.replace("{insightID}",s),r=TA.getEndPointInfo(a));const{restApi:o,reqType:i}=i_(qr,{...r?.payload||[],insightID:s});return Mu(Wd(o,{method:i},t)).pipe(Xg((t=>{let s={};return s="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...s,key:a,semanticURL:a},actionConfig:e,skipSemanticUrl:n}})),ph(": Error occurred during ajax call at showPage Epic : ",e.context))})),Zg((async e=>{if(e&&e.type===Tr)return n.push(uI(e)),n;const{actionConfig:t,skipSemanticUrl:s}=e,r=Og.getTargetViewContainerName(nr),a=Va(r,t.context),o=gI(a,r,t.context),{response:i}=e,c=am(i);c.directUrlUpdation=!s;const l={acName:a,context:o},u=!s,d=s;await oI(c,t,l,u,d);const p=aI(c,{target:a,context:o,containerItemID:o});p.resourceType=Fs.PAGE;const g=dI(a,p);return n.push(g),n})),Xg((()=>{Dg.resolveActionByID(t),BC(n),n=[]})),AO())}],GO=[e=>{let t=0,n=[];return e.pipe(lh(ar),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),Zg((e=>{const{context:t,skipSemanticUrl:n=!1,dashboardID:s}=e;let r="";n||(r=a_(zr,{dashboardID:s}),r=r.replace("{dashboardID}",s));const{restApi:a,reqType:o}=i_(zr,{dashboardID:s});return Mu(Wd(a,{method:o},t)).pipe(Xg((t=>{let s={};return s="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...s,key:r,semanticURL:r},actionConfig:e,skipSemanticUrl:n}})),ph(": Error occurred during ajax call at showPage Epic : ",e.context))})),Zg((async e=>{if(e&&e.type===Tr)return n.push(uI(e)),n;const{actionConfig:t,skipSemanticUrl:s}=e,r=Og.getTargetViewContainerName(nr),a=Va(r,t.context),o=gI(a,r,t.context),{response:i}=e,c=am(i);c.directUrlUpdation=!s;const l={acName:a,context:o},u=!s,d=s;await oI(c,t,l,u,d);const p=aI(c,{target:a,context:o,containerItemID:o});p.resourceType=Fs.PAGE;const g=dI(a,p);return n.push(g)})),Xg((()=>{Dg.resolveActionByID(t),BC(n),n=[]})),AO())}],WO=(e,t)=>{const{class:n,context:s,viewType:r=tI.PAGE}=e,{removeActionPayload:a}=t,o=e?.pageName?e?.pageName:PA.getDefaultCasePage();return Mu(Zp.createCase(n,{...e,pageName:o,viewType:r,context:s})).pipe(Xg((({response:t,headers:n})=>(Us.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:a}))),ph("Error occurred during ajax call at createObject Epic : ",s))},HO="CREATE_OBJECT",qO=e=>{let t,n=0,s=[],r={};let a=!1;return e.pipe(lh(HO),gh(100),Jg((e=>{if(({actionMgrID:n}=e.payload),YI.isExternalObject(e.payload.class)&&!GI(e.payload.context)){const e={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return Dg.rejectActionByID(n,!0,e),nh([])}return nh(e.payload).pipe(Zg((e=>{const{context:s}=e;t=e.class;const r=PD(e),o=Va(r,s);return a=!1,Mu(sD(o,{loadingContext:s})).pipe(Zg((({continueExecution:t,removeActionPayload:s,dirtyCheckPerformed:r})=>t?(a=r,WO(e,{removeActionPayload:s})):(Dg.rejectActionByID(n),uh))))})),Zg((async e=>{if(e&&e.type===Tr)return e.payload.context=((e,t)=>YI.isExternalObject(e)&&t?t:gA())(t,e.payload.context),s.push(uI(e)),s;const{actionInPayload:o,response:i,headers:c,removeActionPayload:l}=e,u=vD(o,i);rS.setIn(i.data,js.getProperty(js.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const d=PD({...o,isInCreateStage:u}),p=Va(d,o.context),g=gI(p,d,o.context);if(((e,t)=>{YI.isExternalObject(e.class)&&(e.containerItemID=e.context,pD(t,e))})(o,s),!a&&((e,t,n)=>!Pm(e)&&By(t)&&!YI.isExternalObject(n))(d,p,t)){const{continueExecution:e}=await mI(p,{loadingContext:o.context});if(!e)return Dg.rejectActionByID(n),s}if(((e,t)=>!e&&!t)(o?.openCaseViewAfterCreate??!0,u)){const{businessID:e,caseType:t,resolvedURL:n}=Fg(i);return r={id:e,label:t,href:n},oD(r),iD({caseId:e,caseType:t}),s}(e=>{YI.isExternalObject(e.class)&&oD({content:xA().getLocaleValue("Successfully submitted!","Assignment")})})(o);const h=am(i),f=String(xm(wg(h)));let m=a_(Ma,{caseClassName:xg(h)});m=m.replace(/{.+?}/,f),h.semanticURL=m,Ng.setComponentCache(f,wd.addDebugHeaders(o.debugInfo)),RD(h,o);const I={acName:p,context:g};await oI(h,o,I);const E={target:p,context:g,headers:c,semanticURL:m,caseViewMode:bD(h),containerItemID:g,isInCreateStage:u,isMinimizable:u,assignmentContext:rS.getIn(h,tD),nextAssignmentInfo:rS.getIn(h,eD),resourceType:Fs.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:o.openCaseViewAfterCreate,modalOptions:o.modalOptions,debugInfo:o.debugInfo};Mg(E,h);const y=aI(h,E),A=dI(p,y);return((e,t,n)=>{if(hI(e)){const{removeActionPayload:e,target:s}=t;Fm(n,{removeActionPayload:e,target:s})}})(A,{removeActionPayload:l,target:p},s),s.push(A),s})),Xg((()=>(TI(s),$m(s,n),setTimeout((()=>(e=>{YI.isExternalObject(e)&&Us.setNeedsMapping(!1)})(t))),r={},s=[],s))))})))},zO=(e,t)=>{const{assignmentID:n,actionID:s,caseID:r,context:a,additionalHeaders:o={},jsActionQueryParams:i}=e,{state$:c}=t,l=tI.PAGE,u="executeObjectWideAction",d={assignmentID:n,actionID:s,viewType:l,objectID:r};let{restApi:p}=i_(u,d);const{reqType:g}=i_(u,d);l&&!p?.includes("viewType=")&&(p=p?.includes("?")?`${p}&viewType=${l}`:`${p}?viewType=${l}`),p=oE(i,p),e.viewType=l;const{content:h}=rI(a,{isObjectWideAction:!0}),f=c.value.data[a]?.objectInfo?.headers||{},{etag:m}=f,I={"if-match":m,...o};return Mu(Wd(p,{method:g,body:h,headers:I},a)).pipe(Xg((t=>{const{data:n,headers:s}=t;return Us.analyseResponse(t.data),{actionInPayload:e,response:n,headers:sI({...I,...s})}})),ph("Error occurred during ajax call at executeObjectWideAction Epic : ",a))},YO=(e,t)=>{const{isCaseWideAction:n}=t;return{isCaseWideAction:n,caseID:wg(e)}},{RESOURCE_TYPES:KO}=Fs,QO=(e,t)=>{let n=0,s=[],r={},a="";return e.pipe(lh(va),Jg((e=>{if(({actionMgrID:n}=e.payload),a=e.payload.context,od({context:a,stateObj:$C(a),clearContextMessages:!0}),!GI(a)){const t={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return Dg.rejectActionByID(n,!0,t),xf.handleDeferredActionCompletion(e.payload.context),nh([])}return nh(e.payload).pipe(Zg((e=>{dD(s,e);const n={...e};return zO(n,{state$:t})})),Zg((async e=>{if(e?.type===Tr){const t=uI(e);return s.push(t),s}yf.clearContextedCache(a);const{headers:t,actionInPayload:o,response:i}=e,{containerItemID:c,isModalAction:l,isInCreateStage:u}=o,d=Qy(c);o.target=d,rS.setIn(i.data,js.OBJECT_INFO_IS_LOCAL_ACTION,!1),ZD({submitResponse:i});let p=am(i,{[Fs.STOPMERGEACTIONS]:!i.nextAssignmentInfo});const g=xg(p),h=Ws(o.context),f=jy(h)[0]?xy(jy(h)[0]):h,m=(e=>{const t=Lg(e);return QI(t)&&JI(PA.getOperatorIdentifier(),t)})(p),I=u&&!m;!l||u||ID(o.context,f)||(p=CI(p,$C(c)));const E=aI(p,{headers:t,actionMgrID:n,directUrlUpdation:!1});((e,t)=>{const{attachmentsExist:n}=t;n&&rS.setIn(e,Fs.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),rS.setIn(e,Fs.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())})(E.data,o),E.caseClassName=g,E.resourceType=KO.ASSIGNMENT,E.headers=t;const y=wg(p);Mg(E,p);const A=a_(Ma,{caseClassName:g}).replace(/{.+?}/,String(xm(y)));p.semanticURL=A,E.semanticURL=A,await _D(o,E,!1,y,p,s,e,i,!0),I&&(r=ED(o),iD({caseId:o.caseID,caseType:o.caseTypeID,assignmentId:o.assignmentID})),((e,t)=>{const n=xg(e?.response),s=Lg(e?.response),{caseTypeID:r}=s,a=PA.getFeatureMap();(a?.deferUpdateCaseSummaryView??!Object.hasOwn(a,js.DEFER_UPDATE_CASESUMMARY_VIEW))&&r&&IC(js.CASESUMMARY_VIEW_NAME,r)&&Hm(t,e?.actionInPayload,e?.response,{caseClassName:n})})(e,s),xf.handleDeferredActionCompletion(a),ND(E,o,f);const C=YO(p,o);return Pf({...C,containerItemID:c}),fD(s,{transientItemID:c,target:d,isModalAction:l}),s})),Xg((()=>{const e=s.find((e=>e.type===Tr));return e?(xf.handleDeferredActionCompletion(a),TD(e),Dg.rejectActionByID(n)):Dg.resolveActionByID(n,r),TI(s),Us.setNeedsMapping(!1),s=[],r={},s})))})))},JO=(e,t)=>{const{insKey:n,headers:s,context:r,debugInfo:a,viewType:o}=e,{removeActionPayload:i}=t,c=e.pageName?e.pageName:js.VIEW_NAMES.PY_DETAILS,l=i_(La,{objectID:n,params:{pageName:c}});let{restApi:u}=l;const{reqType:d}=l;return"none"===o&&(u=`${u?.split("viewType")[0]}viewType=none`),Mu(Wd(u,{method:d,headers:{...s,...a&&{...wd.addDebugHeaders(a)}}},r)).pipe(Xg((t=>(Us.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:sI({...s,...t.headers}),removeActionPayload:i}))),ph("Error occurred during ajax call at getObject Epic : ",r))},XO="GET_OBJECT",{RESOURCE_TYPES:ZO}=Fs,eR=async(e,t)=>{const{actionInPayload:n,activateContainerActionPayload:s,type:r,response:a,removeActionPayload:o,headers:i}=e,{context:c,skipBrowserSemanticUrlUpdate:l,debugInfo:u}=n,d=Nm(La,n),p=Va(d,c);if(Om(r))await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:s},actionInPayload:r,actionInPayload:{context:a,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=Nm(La,r),l=Va(c,a),u=Ly(s);await oI({directUrlUpdation:!o,semanticURL:n},r,{acName:l,containerName:c,target:l,context:u}),e.push($S(wS,{containerItemID:s,target:l,context:u,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:s,actionInPayload:n});else{const e=gI(p,d,c,{buildNew:!0}),s=am(a),r=(e=>{const t=wg(e),n=xg(e);let s=a_(La,{objectClassName:n});return s=s?.replace("{objectID}",String(xm(t))),s})(s);s.semanticURL=r,s.directUrlUpdation=!l;const g={acName:p,context:e};await oI(s,n,g);const h=aI(s,{target:p,context:e,containerItemID:e,semanticURL:r,headers:i,debugInfo:u});h.caseViewMode=js.REVIEW_MODE,h.resourceType=ZO.OBJECT,Mg(h,s);const f=dI(p,h);o.containerItemID&&hI(f)&&t.push($S(LS,{containerItemID:o.containerItemID,target:p})),t.push(f)}const g=n.insKey;Of({caseKey:g,actionInContext:c})},tR="OPEN_OBJECT_ACTION",nR=e=>{const{actionID:t,caseID:n,context:s,openActionType:r,modalLoadingContainer:a}=e,o=tI.FORM,i=i_(Ua,{objectID:n,actionID:t,viewType:o}),{reqType:c}=i;let{restApi:l}=i;e.actionType=js.RESOURCE_TYPES.OBJECT,l&&!l.includes("viewType=")&&(l=l.includes("?")?`${l}&viewType=${o}`:`${l}?viewType=${o}`);const u=a?.context??s;return Mu(Wd(l,{method:c,headers:{}},u)).pipe(Xg((t=>(Us.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:sI(t.headers)}))),ph(`: Error occurred during ajax call at ${r} Epic : `,u))},sR=async(e,t,{headers:n,actionInPayload:s})=>{const{context:r,actionName:a,openActionType:o,doDeleteCaseSummary:i,modalLoadingContainer:c}=s,l=am(e,{info:Fs.OBJECT_INFO.OBJECT_INFO}),u=Nm(o,s),d=c?.target??Va(u,r),{context:p,containerItemID:g,isNewContainerItem:h}=((e,t,n,s)=>{let r,a,o=!1;const i=$y(e);return!Gy(e)||i&&!Ty(e,s)?(a=Hs(t,n),Pm(t)&&(a=Ks(n,a)),r=a,o=!0):(r=i?Py(e,s):xy(e),a=Ly(r)),{context:a,containerItemID:r,isNewContainerItem:o}})(d,u,r,e.data.objectInfo.ID),f={acName:d,target:d,containerName:u,context:p};await oI(l,s,f);const m=l.uiResources?.root,I=(e=>e?js.PERFORM_MODE:js.REVIEW_MODE)(m),E=aI(l,{target:d,context:p,containerItemID:g,caseViewMode:I,doDeleteCaseSummary:i,headers:n,actionName:a,isMinimizable:!1,isInCreateStage:Pm(u),resourceType:Fs.RESOURCE_TYPES.OBJECT,isProcessAction:s.isProcessAction,showProgress:s.showProgress,progressMessage:s.progressMessage,actionType:s.actionType});if(m&&Mg(E,l),Pm(u)&&delete E.doDeleteCaseSummary,t.push($S((e=>e?_S:RS)(h),E)),h||t.push($S(vS,E)),h){const r=jy(s.contextName),a=Py(r,e.data.objectInfo.ID);if(a){const e={data:{objectInfo:{headers:n}},context:a};t.push($S(fS,e))}}return g!==xy(d)&&t.push($S(wS,{target:d,containerItemID:g})),Ug(g)&&!c?.context&&NI(E,t),t},rR=e=>{e.openActionType=Ua;if(Nm(e.openActionType,e)===js.MODAL){const t=Nm(e.openActionType,e),n=Va(t,e.context),s=Ks(e.context,Hs(t,e.context));return BC(_S({target:n,context:s,containerItemID:s,key:e.caseID,caseViewMode:js.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:js.getProperty(js.CASE_INFO.CASE_INFO_CONTENT),type:"view"}},data:{key:e.caseID,objectInfo:{ID:e.caseID}}})),BC(bS({context:s})),e.modalLoadingContainer={target:n,context:s},nR(e)}return nR(e)},aR=e=>{const{containerName:t,isInCreateStage:n}=e;return n?js.MODAL:t||Og.getTargetViewContainerName(Fa)},oR=(e,t)=>{const{class:n,context:s,viewType:r=tI.PAGE}=e,{removeActionPayload:a}=t,o=e?.pageName?e?.pageName:PA.getDefaultCasePage();return Mu(Zp.createCase(n,{...e,pageName:o,viewType:r,context:s,retrieveActionViewForNewObject:!0})).pipe(Xg((({response:t,headers:n})=>(Us.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:a}))),ph("Error occurred during ajax call at createObject Epic : ",s))},iR="CREATE_EXTERNAL_OBJECT",cR=e=>{const{workId:t,context:n,isExternalCase:s}=e,r=s?Zr:"deleteWork",{restApi:a,reqType:o}=i_(r,{ID:t});return Mu(Wd(a,{method:o},n)).pipe(Xg((t=>({response:t.data,actionInPayload:e,headers:sI(t.headers)}))),ph("Error occurred during ajax call at deleteWork Epic : ",n))},lR=e=>{fd.publish(js.PUB_SUB_EVENTS.WORK_EVENTS.WORK_DELETED,e)},uR=((...e)=>(t,n)=>new fu((s=>{const r=e.map((e=>e(t,n).subscribe(s)));return()=>{r.forEach((e=>e.unsubscribe()))}})))(...QT,...yO,...NO,...kO,...RO,...JT,...BO,...$O,...GO,...[qO,e=>{let t=0,n=[];return e.pipe(lh(XO),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),Zg((e=>{const{context:n,isChild:s,viewType:r}=e,a=Nm(La,e),o=Va(a,n);return Mu("none"!==r?mI(o,{loadingContext:n}):Promise.resolve({continueExecution:!0,removeActionPayload:void 0})).pipe(Zg((({continueExecution:n,removeActionPayload:a})=>{if(!n)return Dg.rejectActionByID(t),uh;const{activate:i,activateContainerActionPayload:c}=EI(ZO.OBJECT,o,e);return i&&!s&&"none"!==r?nh({type:Fr,activateContainerActionPayload:c,actionInPayload:e}):JO(e,{removeActionPayload:a})})))})),Zg((async e=>{if(e&&Rm(e.type))return n.push(uI(e)),n;if("none"===e?.actionInPayload?.viewType){const t=$C(e?.actionInPayload?.context);if(t?.context_data?.caseViewMode!==js.PERFORM_MODE){const t=am(e?.response),s={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:ha,payload:{context:s.context,doDeleteConfirmationDetails:!1}}),n.push($S(fS,s));const r=Qy(e?.actionInPayload?.context),a=Tm(e?.actionInPayload?.context),o=Object.freeze({target:r,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:a});if(Ug(e?.actionInPayload?.context)){const t=aI(e?.response,{...o});NI({...t,isArrayDeepMerge:!0},n)}}}else await eR(e,n);return n})),Xg((()=>(BC(n),$m(n,t),n=[],n))))},QO,e=>{let t=0,n=[];return e.pipe(lh(tR),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),Zg((e=>rR(e))),Zg((async e=>{if(Rm(e.type)){const t=uI(e);n.push(t);const s=$C(e.payload.context);return s?.context_data?.isLoading&&n.push($S(vS,e.payload)),n}const{actionInPayload:t,headers:s,response:r}=e,{actionID:a}=t;return rS.setIn(r,"data.objectInfo.activeActionID",a),rS.setIn(r.data,js.getProperty(js.OBJECT_INFO_IS_LOCAL_ACTION),!0),t.refreshConditions&&rS.setIn(r.data,js.getProperty(js.CASE_INFO_REFRESH_CONDITIONS),t.refreshConditions),await sR(r,n,{headers:s,actionInPayload:t}),yP(t),n})),Xg((()=>(BC(n),$m(n,t),n=[],n))))},e=>{let t=0,n=[],s=!1;return e.pipe(lh(iR),gh(100),Xg((e=>(({actionMgrID:t}=e.payload),e.payload))),Zg((e=>{const{context:n}=e,r=aR(e),a=Va(r,n);return s=!1,Mu(sD(a,{loadingContext:n})).pipe(Zg((({continueExecution:n,removeActionPayload:r,dirtyCheckPerformed:a})=>n?(s=a,oR(e,{removeActionPayload:r})):(Dg.rejectActionByID(t),uh))))})),Zg((async e=>{if(e&&e.type===Tr)return e.payload.context=gA(),n.push(uI(e)),n;const{actionInPayload:r,response:a,headers:o,removeActionPayload:i}=e,c=vD(r,a);rS.setIn(a.data,js.getProperty(js.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const l=aR({...r,isInCreateStage:c}),u=Va(l,r.context),d=gI(u,l,r.context);if(!s&&!Pm(l)&&By(u)){const{continueExecution:e}=await mI(u,{loadingContext:r.context});if(!e)return Dg.rejectActionByID(t),n}const p=am(a);let g=a_(Fa,{caseClassName:xg(p)});g=g.replace(/{.+?}/,String(xm(wg(p)))),p.semanticURL=g,RD(p,r);const h={acName:u,context:d};await oI(p,r,h);const f={target:u,context:d,headers:o,semanticURL:g,caseViewMode:bD(p),containerItemID:d,isInCreateStage:c,isMinimizable:c,assignmentContext:rS.getIn(p,tD),nextAssignmentInfo:rS.getIn(p,eD),resourceType:Fs.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:r.openCaseViewAfterCreate,modalOptions:r.modalOptions,debugInfo:r.debugInfo,isExternalObjectCreationFlow:!0};Mg(f,p);const m=aI(p,f),I=dI(u,m);return hI(I)&&Fm(n,{removeActionPayload:i,target:u}),n.push(I),n})),Xg((()=>(TI(n),$m(n,t),n=[],n))))},e=>{let t,n=0,s=[];return e.pipe(lh(Wg),Xg((e=>(({actionMgrID:n,caseTypeID:t}=e.payload),e.payload))),Zg((e=>{if(!e.skipDeleteConfirmation&&!e.ignoreWorkDeletion){const s=my.MODAL,r=Va(s,e.context),a=Ks(e.context,Hs(s,e.context));return BC([$S(_S,{target:r,context:a,containerItemID:a,containerName:s,isDeleteConfirmation:!0,actionName:"Delete",workId:e.workId,caseTypeID:t,className:e.className,keys:e.keys,...e.enableBackNavigation&&{enableBackNavigation:!0},data:{caseInfo:{caseTypeID:t}}})]),Dg.resolveActionByID(n),uh}return e.ignoreWorkDeletion?nh({actionInPayload:e}):cR(e)})),Zg((async e=>{if(e&&Rm(e.type)){const{payload:t}=e;return s.push(uI({...e,...t,actionMgrID:n})),s}const{actionInPayload:t}=e,{context:r}=t;if(oD({content:xA().getLocaleValue("Deleted successfully!","Messages")}),r?.includes(js.PREVIEW)&&s.push($S(SS,zy({context:js.APP.APP,name:js.PREVIEW}))),r?.includes(js.MODAL)){const e=my.MODAL,t=Va(e,r),n=Cy(t,r);n?.enableBackNavigation&&window?.history?.back()}return s})),Xg((()=>(BC(s),$m(s,n)===js.PROMISE_VALUE.RESOLVE&&lR({caseTypeID:t}),s=[],s))))}]),dR=()=>e=>t=>{const{type:n="",payload:s={}}=t||{},{category:r,context:a,transientItemID:o}=s;"HTTP"!==r&&[Or,jr,Rr,kr,vr,Ur].includes(n)&&(MI(a||o),Zu.removeContextTreeNode(a||o),n!==Or&&n!==Rr||-1===s?.target?.indexOf("modal")||fd.publish(Fs.PUB_SUB_EVENTS.PEGA_EMBED_CUSTOM,n)),e(t)},pR={},gR=e=>{const t=rS.getIn(pR,[js.CONTEXT,e],[]),n=[];t.forEach((t=>{const s=t.substr(0,t.lastIndexOf("_")),r=rS.getIn(pR,[s,t],[]),a=r&&r.length>0&&r.indexOf(e);if(a>-1&&r.splice(a,1),!r||r&&0===r.length){rS.deleteIn(pR,[s,t]);const e=rS.getIn(pR,[s]);e&&0===Object.keys(e).length&&rS.deleteIn(pR,[s]),n.push({dataPageName:s,dataPageNameWithHash:t})}})),rS.deleteIn(pR,[js.CONTEXT,e]);const s=rS.getIn(pR,[js.CONTEXT]);(!s||s&&0===Object.keys(s).length)&&rS.deleteIn(pR,[js.CONTEXT]),n.length>0&&BC(HS({dataPagesToBeRemoved:n}))},hR=(e={},t)=>{Object.keys(e).forEach((n=>{const s=rS.getIn(e,[n],{});Object.keys(s).forEach((e=>{((e,t,n)=>{const s=rS.getIn(pR,[js.CONTEXT,n]);if(rS.getIn(pR,[e])){const s=rS.getIn(pR,[e,t],[]);rS.setIn(pR,[e,t],[...new Set([...s,n])])}else rS.setIn(pR,[e,t],[n]);s?rS.setIn(pR,[js.CONTEXT,n],[...new Set([...s,t])]):rS.setIn(pR,[js.CONTEXT,n],[t])})(n,e,t)}))}))},fR=()=>e=>t=>{(Array.isArray(t)?t:[t]).forEach((e=>{const{payload:{data:t={},context:n=null,childContainersContexts:s=[]}={},type:r}=e;if(((e,t)=>{t&&t.length>0&&(e===kr||e===Rr)&&t.forEach((e=>{gR(e)}))})(r,s),r===Or||r===Cr||r===da){const e=r===da?t:t.shared;hR(e,n)}else r===kr?(gR(n),hR(t.shared,n)):r===Rr&&gR(n)})),e(t)},{PUB_SUB_EVENTS:mR}=Fs,IR=e=>t=>n=>{const{type:s,payload:{target:r,containerItemID:a,context:o,deleteContext:i,childContainersContexts:c=[],containerInfo:{newAccessedOrder:l,containerType:u}={newAccessedOrder:new Array,containerType:""},eventName:d}={}}=n;s===Rr&&((e,t,n,s,r,a)=>{const{resourceType:o,key:i,context:c}=rS.getIn(e.getState(),["containers",t,"items",n])||{},l={resourceType:o,key:i,context:c,containerItemID:n,...void 0!==s?{eventName:s}:{}};fd.publish(mR.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,l),t===`${Fs.APP.APP}/${js.PRIMARY}`&&a===js.CONTAINER_TYPE.MULTIPLE&&fd.publish(mR.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:i,newAccessedOrder:r})})(e,r,a,d,l,u),((e,t)=>{t&&t.length>0&&(e===kr||e===Rr)&&t.forEach((e=>{e&&Sf.cleanCaches(e)}))})(s,c),o&&(s===kr||s===Rr&&i)&&Sf.cleanCaches(o),t(n)},ER=e=>e===`${js.APP.APP}/${js.MODAL}`,yR=(e,t,n,s,r)=>{var a;e&&t&&(ER(r)?(a={caseId:e,caseClass:n,context:s||""},fd.publish(js.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_CASE_MODAL_OPEN,a)):(e=>{fd.publish(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,e)})({caseId:e,caseClass:n,context:s||""}))},AR=(e,t)=>{var n;e&&(ER(t)?(n={caseId:e,caseClass:"",context:""},fd.publish(js.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_CASE_MODAL_CLOSE,n)):(e=>{fd.publish(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,e)})({caseId:e}))},CR=()=>e=>t=>{if(t&&"object"==typeof t&&"type"in t&&"payload"in t){const{type:e,payload:n}=t,{target:s,key:r,context:a,data:o}=n||{};if((e=>e===`${js.APP.APP}/${js.PRIMARY}`)(s)||ER(s)){const t=o?.caseInfo?.ID,n=a||"",i=HC(js.CASE_INFO.CASE_INFO_ID,"",n)||"",c=o?.caseInfo?.caseTypeID||"";e!==kr&&e!==Rr||AR(i,s),e!==Or&&e!==kr||yR(r,!!t,c,n,s)}}e(t)},SR=()=>e=>t=>{const{payload:{context:n=null,transientItemID:s=null,clearStateMachine:r=!0}={},type:a}=t;n&&(a===Or||a===jr||a===kr||a===Rr)&&r&&(Ep(n),mp(n)),s&&a===Mr&&(Ep(s),mp(s)),e(t)},_R=e=>rS.getIn(e,js.CASE_INFO.ASSIGNMENT_ID),NR=e=>{Object.keys(sf.subscribers).forEach((t=>{"COACH_UPDATE"===sf.subscribers[t].filter.matcher&&sf.subscribers[t].filter.criteria?.caseId===e&&sf.unsubscribe(t)}))},TR=(e,t)=>{if(n=t.target,n?.toString().includes(js.MODAL))return;var n;const{context:s,data:r,resourceType:a,caseID:o}=t;e===Or?((e,t,n)=>{if(n===js.RESOURCE_TYPES.ASSIGNMENT){const n=_R(t),s=rS.getIn(t,["caseInfo","ID"]);n&&s&&bf({actionInContext:e,assignmentID:n,caseKey:s})}else if(n===js.RESOURCE_TYPES.CASE&&e?.includes("workarea")){const n=rS.getIn(t,["caseInfo","ID"]),s=_R(t);n&&s&&bf({actionInContext:e,assignmentID:s,caseKey:n})}})(s,r,a):e===jr?((e,t,n)=>{if(n!==js.RESOURCE_TYPES.ASSIGNMENT)return;const s=_R($C(e)),r=_R(t),a=rS.getIn(t,["caseInfo","ID"]);s&&s!==r&&vf({actionInContext:e,assignmentID:s,caseKey:a}),r&&a&&bf({actionInContext:e,assignmentID:r,caseKey:a})})(s,r,a):e===Rr&&o?((e,t)=>{if(e?.includes("workarea")){const n=_R($C(e));n&&vf({actionInContext:e,assignmentID:n,caseKey:t})}else NR(t)})(s,o):e===kr&&o&&((e,t,n,s)=>{if(e?.includes("workarea")){const t=_R($C(e));t&&vf({actionInContext:e,assignmentID:t,caseKey:s})}else NR(s);if(n===js.RESOURCE_TYPES.ASSIGNMENT){const n=_R(t);n&&bf({actionInContext:e,assignmentID:n,caseKey:s})}})(s,r,a,o)},DR=()=>e=>t=>{if(t&&"object"==typeof t&&"type"in t&&"payload"in t){const{type:e,payload:s}=t;"object"==typeof(n=s)&&null!==n&&TR(e,s)}var n;e(t)},PR=[hr,mr,Er,"DELETE_CASE_IN_CREATE_STAGE",yr,Ar],OR=new Set([Or,kr,jr,Rr,fr,_a,er,ga,...PR]),RR=(e,t)=>{if(!(e=>{const t=e?.data?.caseInfo?.settings?.autoSave;if(null!=t)return Boolean(t);const n=e?.containerItemID??e?.context;if(n){const e=HC("caseInfo.settings.autoSave",null,n);if(null!=e)return Boolean(e)}return!1})(t))return!1;const n=t.containerItemID||e,s=t.target||Qy(n),r=Cy(s,n),a=t.resourceType||r?.resourceType,o=t.key||r?.key;return a===js.RESOURCE_TYPES.ASSIGNMENT&&Boolean(o)},bR=(e,t,n)=>{e===Or||e===kr||e===jr&&t.data?(GE(n)&&WE(n),e===kr&&HE(n),RR(n,t)&&((e,t)=>{0===RE.size&&"undefined"!=typeof document&&(document.addEventListener("pointerdown",kE,{passive:!0}),document.addEventListener("keydown",BE,{passive:!0}),document.addEventListener("input",$E,{capture:!0,passive:!0})),RE.set(e,t)})(n,{containerName:t.containerName??""})):e===Rr&&(GE(n)&&WE(n),HE(n))},vR=(e,t)=>{if(e!==Rr||!t.includes(js.MODAL))return;const n=Qs(t),s=`${n}/`;for(const e of ME)(e===n||e.startsWith(s))&&YE(e)},xR=(e,t,n)=>{e!==fr?e!==_a?PR.includes(e)&&qE(n):(e=>{qE(e),ME.add(e)})(n):t.autosave||qE(n)},wR=()=>e=>t=>{if(t&&"object"==typeof t&&"type"in t&&"payload"in t&&"string"==typeof t.type&&OR.has(t.type)&&("object"==typeof(n=t.payload)&&null!==n)){const{type:e,payload:n}=t,s=((e,t)=>e===yr?t.saveActionPayload?.containerItemID:e===Ar?t.saveContainerItemID??t.context:t.containerItemID??t.context)(e,n);s&&(vR(e,s),bR(e,n,s),GE(s)&&(((e,t)=>{if(t.context)e===er?(Hp(t.context,null),zE(t.context)):e!==ga||t?.isDefault||t?.skipDirtyValidation||zE(t.context)})(e,n),xR(e,n,s)))}var n;e(t)},MR=(()=>{const e=new rh;let t=null,n=null;const s=s=>(n=s,t=new ch(e.asObservable(),s.getState()),n=>r=>{const a=n(r);var o;return t?.next(s.getState()),"object"==typeof(o=r)&&null!==o&&"type"in o&&"string"==typeof o.type&&e.next(r),a});return s.run=s=>{if(!t||!n)throw new Error("Epic middleware must be added to the store before calling run().");return s(e.asObservable(),t).subscribe((e=>{n?.dispatch(e)}))},s})(),LR=e=>{if(null!==kC())return void tS();const t=[py.propertyChangeMiddleware,dR,fR,SR,MR,DR,wR,CR,IR],n=tT({reducer:kT(e),middleware:e=>e({serializableCheck:!1,thunk:!1}).concat(t),enhancers:e=>e().prepend(oT).concat(oT)});MR.run(uR),VC(n)},UR=["ar","arc","ckb","dv","fa","ha","he","khw","ks","ps","ur","yi"],FR=e=>UR.includes(e.split("-")[0])?"rtl":"ltr";const jR=async function(e){if(!e)return;const t=PA.getLocale();PA.setLocale(e);const n=PA.getLocale();if(n&&n!==t){if(N_(["lang"]),"undefined"!=typeof window){const e=new URL(window.location.href);e.searchParams.set("lang",n),window.history.replaceState(window.history.state,"",e.toString())}PA.isInfinityRuntime()&&await DA.loadLocaleBundle([n]),await RA(n),"undefined"!=typeof document&&(document.documentElement.lang=n,document.documentElement.dir=FR(n)),BC({type:ma,payload:{locale:n}}),fd.publish(js.PUB_SUB_EVENTS.EVENT_LOCALE_CHANGED,{locale:n,previousLocale:t})}};class VR{static EDIT_OPEN="edit_open";static EDIT_CLOSE="edit_close";static VIEW_OPEN="view_open";static VIEW_CLOSE="view_close";static caseCollabSubIds={};static init(e){e&&(this.collabConfig=e)}static dispatchCollaboratorAction=(e,t,n,s,r)=>{BC({type:"LIST_ACTION",payload:{instruction:e,context:t,referenceList:s,listIndex:n,content:r,skipDirtyValidation:!0}})};static handleCaseCollaboratorsUpdate(e,t){const n=t?.message??{},[s,r]=Object.entries(n)[0];if(s===PA.getOperatorIdentifier())return;const a={ID:s,state:r},o=HC(js.CASE_INFO.CASE_INFO_COLLABORATORS,"",e)||[],i=o.findIndex((e=>e.ID===s));if(-1!==i)"closed"===r?this.dispatchCollaboratorAction("DELETE",e,i,js.CASE_INFO.CASE_INFO_COLLABORATORS,null):this.dispatchCollaboratorAction("REPLACE",e,null,`${js.CASE_INFO.CASE_INFO_COLLABORATORS}[${i}]`,a);else{if("closed"===r)return;this.dispatchCollaboratorAction("INSERT",e,o.length,js.CASE_INFO.CASE_INFO_COLLABORATORS,a)}}static subscribeToCollaborators(e,t){const n=sf.subscribe({matcher:"CASE_COLLABORATOR",criteria:{caseId:e}},(e=>this.handleCaseCollaboratorsUpdate(t,e)));this.caseCollabSubIds[e]=n}static unsubscribeToCollaborators(e){sf.unsubscribe(this.caseCollabSubIds[e]),delete this.caseCollabSubIds[e]}static publishCaseEvent(e,t){sf.publishMessage({filter:{matcher:"CASE_COLLABORATOR",criteria:{caseId:t}},message:e})}static subscribeToEvent(e,t,n){let s=null;if(e===js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN||e===js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE?s=e=>this.publishCaseEvent(t,e):e===js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD?s=e=>{const{caseId:t,context:n}=e;this.caseCollabSubIds[t]||this.subscribeToCollaborators(t,n)}:e===js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD&&(s=e=>{const{caseId:t}=e;this.caseCollabSubIds[t]&&this.unsubscribeToCollaborators(t)}),!s)throw new Error(`Unhandled eventKey: ${e}`);fd.subscribe(e,s,n)}static unsubscribeFromEvent(e,t){fd.unsubscribe(e,t)}static subscribeToCaseEvents(){VR.collabConfig?.appEnabled&&VR.collabConfig?.portalEnabled&&(this.subscribeToEvent(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,this.VIEW_OPEN,"case_view_open"),this.subscribeToEvent(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,this.VIEW_CLOSE,"case_view_close"),this.subscribeToEvent(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN,this.EDIT_OPEN,"case_edit_open"),this.subscribeToEvent(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE,this.EDIT_CLOSE,"case_edit_close"))}static unsubscribeToCaseEvents(){VR.collabConfig?.appEnabled&&VR.collabConfig?.portalEnabled&&(this.unsubscribeFromEvent(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,"case_view_open"),this.unsubscribeFromEvent(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,"case_view_close"),this.unsubscribeFromEvent(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN,"case_edit_open"),this.unsubscribeFromEvent(js.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE,"case_edit_close"))}}const kR=VR;const BR=new class{#S(e,t,n,s,r){let a=!1;return e.IncludeInURL&&void 0!==t&&(s[e.Key]=t,"portal"===e.Key&&t!==n&&(a=!0)),Array.isArray(e.IncludeInHeaders)&&void 0!==t&&e.IncludeInHeaders.forEach((n=>{r[n.Value]||(r[n.Value]=[]),r[n.Value].push(`${e.Key}=${t}`)})),a}#_(e,t,n){const s={},r={};let a=!1;return Array.isArray(e)&&e.forEach((e=>{const o=t[e.Key];this.#S(e,o,n,s,r)&&(a=!0)})),{urlParams:s,headerMap:r,isPortalChanged:a}}#N(e){const t=Ng.getComponentCache("lastActionID");return Jh.truncateNamespace(e)===Jh.truncateNamespace("string"==typeof t?t:(t??"").toString())}#T({message:e}){const{RequestContext:t,ActionName:n}=e;if(!this.#N(n))return;const s=JSON.parse(t),r=PA.environmentInfoObject?.requestContext,a=new URL(window.location.href).searchParams.get("portal"),{urlParams:o,headerMap:i,isPortalChanged:c}=this.#_(r,s,a);Ng.setURLParams(o),Object.entries(i).forEach((([e,t])=>{wd.registerHeader(e,t.join("; "))})),Ng.setComponentCache("lastActionID",""),c&&globalThis.location.reload()}subscribeToGlobalEvents(){const e=rS.generateUniqueID(),t={matcher:"SWITCH_REQUEST_CONTEXT",criteria:{UserID:PA.getOperatorIdentifier()||""}};sf.subscribe(t,this.#T.bind(this),void 0,e)}},$R={publishConstellationLoadedEvent:()=>{fd.publish(js.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})}};const GR=new class{activateContainerItemOnSwitch(e){const t=`${js.APP.APP}/${js.PRIMARY}`,n={target:t,containerItemID:Py(t,e)};Cm({}).getPConnect().getContainerManager().activateContainerItem(n)}removeContainerItemOnClose(e){const t=`${js.APP.APP}/${js.PRIMARY}`,n={target:t,containerItemID:Py(t,e)};Cm({}).getPConnect().getContainerManager().removeContainerItem(n)}showCasePreview(e,t){const n=Cm({meta:{type:"PreviewViewContainer",config:{name:js.PREVIEW}},options:{context:js.APP.APP,target:"root/hybrid_preview"}});n.getPConnect().getContainerManager().resetContainers({name:js.PRIMARY,context:js.APP.APP}),by(js.APP.APP,js.PREVIEW)||n.getPConnect().getContainerManager().initializeContainers({type:"multiple",name:js.PREVIEW}),n.getPConnect().getActionsApi().showCasePreview(e,{caseClassName:t})}closeCasePreview(){Cm({}).getPConnect().getContainerManager().resetContainers({name:js.PREVIEW,context:js.APP.APP})}isFormDirty(e){const t=`${js.APP.APP}/${js.PRIMARY}`,n=mA(t,e);return bI.isStateModified(n)}getEventUtils(){return $R}getBroadcastUtils(){return ZT}isTraditionalUICase(e){return Gm(e)}};const WR=class{static openCase(e,t=Fs.APP.APP,n={}){return n.renderInline=!0,n.pageName?(PA.setDefaultCasePage(Ls.getDefaultQualifiedName(n.pageName)),n.pageName=Ls.getDefaultQualifiedName(n.pageName)):(PA.setDefaultCasePage(Ls.getDefaultQualifiedName(js.PY_DETAILS)),n.pageName=Ls.getDefaultQualifiedName(js.PY_DETAILS)),n?.disableAssignmentHeader?PA.disableAssignmentHeader(n.disableAssignmentHeader):PA.disableAssignmentHeader(!1),Kh.openCase(e,t,js.PRIMARY,n)}static createCase(e,t=Fs.APP.APP,n={}){return n.renderInline=!0,n.pageName?(PA.setDefaultCasePage(Ls.getDefaultQualifiedName(n.pageName)),n.pageName=Ls.getDefaultQualifiedName(n.pageName)):(PA.setDefaultCasePage(Ls.getDefaultQualifiedName(js.PY_DETAILS)),n.pageName=Ls.getDefaultQualifiedName(js.PY_DETAILS)),n?.disableAssignmentHeader?PA.disableAssignmentHeader(n.disableAssignmentHeader):PA.disableAssignmentHeader(!1),Kh.createCase(e,t,js.PRIMARY,n)}static getNextWork(e=Fs.APP.APP,t={}){return t.renderInline=!0,t.pageName?(PA.setDefaultCasePage(Ls.getDefaultQualifiedName(t.pageName)),t.pageName=Ls.getDefaultQualifiedName(t.pageName)):(PA.setDefaultCasePage(Ls.getDefaultQualifiedName(js.PY_DETAILS)),t.pageName=Ls.getDefaultQualifiedName(js.PY_DETAILS)),t?.disableAssignmentHeader?PA.disableAssignmentHeader(t.disableAssignmentHeader):PA.disableAssignmentHeader(!1),Kh.getNextWork(e,js.PRIMARY,t)}static openAssignment(e,t=Fs.APP.APP,n={}){return n.renderInline=!0,n.pageName?(PA.setDefaultCasePage(Ls.getDefaultQualifiedName(n.pageName)),n.pageName=Ls.getDefaultQualifiedName(n.pageName)):(PA.setDefaultCasePage(Ls.getDefaultQualifiedName(js.PY_DETAILS)),n.pageName=Ls.getDefaultQualifiedName(js.PY_DETAILS)),n?.disableAssignmentHeader?PA.disableAssignmentHeader(n.disableAssignmentHeader):PA.disableAssignmentHeader(!1),Kh.openAssignment(e,t,js.PRIMARY,n)}static openPage(e,t,n=Fs.APP.APP,s={}){const r=nr;s?.defaultCasePage?(PA.setDefaultCasePage(Ls.getDefaultQualifiedName(s.defaultCasePage)),s.defaultCasePage=Ls.getDefaultQualifiedName(s.defaultCasePage)):PA.setDefaultCasePage(Ls.getDefaultQualifiedName(js.PY_DETAILS)),s?.disableAssignmentHeader?PA.disableAssignmentHeader(s.disableAssignmentHeader):PA.disableAssignmentHeader(!1);const a={viewName:e,className:t,acTargetName:js.PRIMARY,actionMgrID:Dg.getNextActionMgrId(),context:n},{promise:o}=Dg.actionManagerPromise(r,a.actionMgrID);return BC({type:r,payload:{...a}}),o}static getCurrentContextAPI(e,t=Fs.APP.APP){return Cm({meta:{config:{}},options:{context:t,pageReference:e,containerName:js.PRIMARY}}).getPConnect()}};function HR(e){if(!e||"*"===e||"null"===e)return"";try{const t=new URL(e);return"https:"!==t.protocol&&"http:"!==t.protocol||"null"===t.origin?"":t.origin}catch{return""}}function qR(e){if(e.contentRect)return{height:e.contentRect.height};const t=Array.isArray(e.contentBoxSize)?e.contentBoxSize[0]:e.contentBoxSize;return"blockSize"in t?{height:t.blockSize}:"height"in t&&"number"==typeof t.height?{height:t.height}:{height:0}}const zR=new class{gadgetName="";resize=!1;parentOrigin="";boundOnMessage=this.onMessage.bind(this);init(e){if("undefined"==typeof window)return;const{resizing:t,parentOrigin:n}=e;this.gadgetName=window.name,this.resize="stretch"===t,this.parentOrigin="",n?this.parentOrigin=HR(n):document.referrer?this.parentOrigin=HR(document.referrer):this.parentOrigin=HR(function(){try{const{ancestorOrigins:e}=window.location;if(e&&e.length>0)return e[0]??""}catch{}return""}());const s=document.getElementsByTagName("app-root")[0];s.classList.add("mashup"),window.parent!==window&&this.resize&&this._registerResizeObserver(s)}send(e){const{action:t,message:n}=e,s=JSON.stringify({gadgetName:this.gadgetName,action:t,message:n});window.parent.postMessage(s,this.parentOrigin||window.location.origin)}_registerResizeObserver(e){new ResizeObserver((e=>{for(const t of e){const e=qR(t);this.send({action:"resize",message:e})}})).observe(e)}_updateUrl(e){window.history.pushState({},"home",e),PCore.configureForBrowserBookmark({semanticURL:"",context:js.APP.ROOT,acName:"primary"})}onMessage(e){if(!this.parentOrigin||e.origin!==this.parentOrigin)return!1;if("string"!=typeof e.data)return!1;let t;try{t=JSON.parse(e.data)}catch{return!1}return"UpdateUrl"===t.action&&this._updateUrl(t.message.url),!0}getMessageHandler(){return this.boundOnMessage}};"undefined"!=typeof window&&window.addEventListener("message",zR.getMessageHandler(),!1);const YR={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},KR={type:"RootContainer",config:{renderingMode:"hybrid"},children:[{type:"HybridViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary",contextName:"app"},children:[]}]},QR="portal-less-styles";const JR=new class{createC11nEnv=e=>Cm(e);getContextUtils=()=>e;getRoutingManager=()=>t;getComponentsRegistry=()=>Co;getStateManager=()=>u;getActionCreators=()=>d;getStreamObservable=()=>a;getActionProcessor=()=>dS;getActionHandler=()=>uS;renderApp=(e,t)=>{const n={context:js.APP.APP},s={...rS.getIn(e,js.ROOT),options:n};LR(e),Jp(e,n,!0);const r=this.createC11nEnv({meta:s,isRoot:!0});fd.publish(Fs.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:r,domContainerID:t})};updateStoreWithUiRoot=async(e,t,n)=>{const{data:s,uiResources:r={}}=e,{root:a}=r,o=rS.getIn(r,js.CONTEXT_DATA),i=am(e);await oI(i,{},{},!1,!0);const c={...s,[js.CONTEXT_DATA]:o};Xy(a,t,c,n)};fetchEndPointResource=(e,t,n)=>{Wd(e,{method:"GET"},js.APP.ROOT).then((e=>{200===e.status&&this.updateStoreWithUiRoot(e.data,t,n)}))};loadComponent=async(e,t,n)=>{await Ig(n);const s=this.createC11nEnv({meta:e,isRoot:!0});kC()||LR({}),fd.publish(Fs.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:s,domContainerID:t})};setStaticServerUrl=(e,t,n)=>{hg.initServer(e,t,n)};loadView=async(e,t,n=[])=>{nn();const s=am(e),r=rS.getIn(s,js.VIEWS),a=rS.getIn(s,js.NAVIGATIONS),o=rS.getIn(s,js.COMPONENTS)||[];o.push(...n);const i=rS.getIn(s,js.STATIC_SERVER_URL),c=rS.getIn(s,js.APPLICATION_DATA);r&&uC(r),a&&hC(a),(e=>{e&&(t_=e.pyLabel)})(c),i&&hg.initServer(i),await Ig(o,i),this.renderApp(s,t)};initAppShell=(e,t,n)=>{S_(e),Og.buildActionTargetMap(t),nn(n)};initRoutingTable=(e,t)=>{S_(e,!0),nn(t)};setAppAlias=e=>{hg.setAppAlias(e)};getHomeRestApi=e=>{const t=rn(),{restApi:n}=o_("home",{portalName:e});return`${t}${n}`};getViewRestApi=(e,t)=>{const{restApi:n}=((e,t)=>{let n={restApi:""};try{if(A_()&&!t){const t=CA(),s=TA.processUrl(t,!0),r=TA._getMatchedRouteInRoutingTable(s)||"",a=TA.getRoutingInfo(),o=TA.processUrl(t,!1).split("/"),i=o[o.length-1],c=a?.routes?.[r]?.payload?.caseID?.replace("{workID}",i).replace("{id}",i);n=TA.getRestEndPoint("loadView",{caseID:c,viewID:e})||{}}else n=TA.getRestEndPoint("showView",{page:e,pageClass:t})||{}}catch(e){}return n})(e,t);return rn()+n};loadRootComponent=async(e,t,n=[],s,r,a)=>{const{config:o}=t||{},i=o?.name;if(kC()||LR({}),a){const e=`${js.APP.ROOT}/${i}`;uA(e),lA().deleteContainerItem(e)}(lA().getContainerItems()||[]).length>1&&!i?.startsWith("hybrid_")&&"authoring-preview"!==i&&tS(),BC(fS({data:{},context:js.APP.ROOT}));const c=this.createC11nEnv({meta:t,options:{context:js.APP.ROOT,pageReference:"",target:`${js.APP.ROOT}/${i}`}}),l=c.getPConnect(),u=`${l.getContextName()}/${l.getContainerName()}`;xy(u)||"noPortal"===o?.renderingMode||l.getContainerManager().initializeContainers({type:"single"});const d=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference","URL",...n];await Ig(d),fd.publish(Fs.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:c,domContainerID:e,componentName:"RootContainer",portalTarget:s,styleSheetTarget:r})};loadViewByName=(e,t,n,s)=>{let r=this.getViewRestApi(e,n);r===rn()&&(r=this.getHomeRestApi(t)),this.fetchEndPointResource(r,s)};loadPortalView=(e,t)=>{const n=this.getHomeRestApi(e);this.fetchEndPointResource(n,t,!0)};configureForBrowserBookmark=e=>{C_(e)};checkIfSemanticURL=()=>A_();onPCoreReady=e=>{fd.subscribe(Fs.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};onPCoreCleanup=e=>{fd.subscribe(Fs.PUB_SUB_EVENTS.EVENT_UNMOUNT_APP,e,"unmountAppCallback")};setFieldsDefaultConfigs=e=>{bp.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{on(e)};setFetchDefaultHeaders=e=>{Kd(e)};setFetchAuthInfo=e=>{Qd(e)};getCaseApi=()=>Kh;getMashupApi=()=>WR;enableAppRouting=e=>{s_(e)};initStore=()=>LR({});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()))};getBootstrapConfigViaSB=async(e,t,n)=>{const s=n?`?dataViewParameters=${encodeURIComponent(JSON.stringify({themeID:n}))}`:"";return Wd(`${e}/api/application/v2/data_views/D_pxBootstrapConfig${s}`,{method:"GET",headers:new Headers(t)}).then((e=>{if(e.data)return e.data;throw Error("D_pxBootstrapConfig load failed.",{cause:e.status})}))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=Cm({meta:YR,options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:t,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}};loadMashup=async(e,t=!0)=>{if(t){const t=document.querySelector(e)??document.getElementsByTagName(e)[0],n=t?.parentNode;if(n&&!document.getElementById(QR)){const e=document.createElement("style");e.id=QR,e.textContent="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",n.appendChild(e)}}await this.loadRootComponent(e,YR,[js.LOAD_VIEW_STRING,"ViewContainer"]),globalThis.parent!==globalThis&&zR.init({resizing:"stretch"})};bootstrapWithAuthHeader=async(e,t,n=[],s,r)=>{const{customRendering:a=!1,onPCoreReadyCallback:o,staticContentServerUrl:i,dynamicSetCookie:c=!1,renderingMode:l,locale:u,envType:d,themeID:p,customCookies:g=!1,enableRouting:h}=e;let{restServerUrl:f,authInfo:m,authorizationHeader:I,appAlias:E,theme:y={}}=e,A=e.additionalHeaders?{...e.additionalHeaders}:{},C=null;const S=!I&&m&&!m.authType;if(m||(e.authInfo={},m=e.authInfo),(I&&0===Object.keys(m).length||g&&!S&&!m.authType)&&(m.authType="custom"),m.customCookies=g,!I&&m.tokenInfo?.access_token){const{tokenInfo:e}=m;I=`${e.token_type} ${e.access_token}`}if(m.tokenInfo?.csrf&&(A={...A,pzCTkn:m.tokenInfo.csrf}),E&&-1===E.indexOf("/")&&(E=`app/${E}`),"LAUNCHPAD"===d){A={...A,"X-Constellation-App":"Pega"},f=f.endsWith("/dx")?f:`${f}/dx`;const e=p?`?themeID=${p}`:"";globalThis.PCore&&(C=await this.getLPConfig(`${f}/api/application/v2/environmentInfo${e}`,I,A,g)),0===Object.keys(y).length&&C?.theme?.definition&&(y=JSON.parse(C.theme.definition).Theme)}else C=S?await this.preInitBootstrapConfig(e,E,A,p):await this.getBootstrapConfigExtended(E?`${f}/${E}`:`${f}`,I,A,p,g,u);const _=C?.pyConfigJSON?JSON.parse(C.pyConfigJSON):{...C};"LAUNCHPAD"===d&&await this.applyEnvironmentInfoResponse(_),_.restServerConfig=f,_.dynamicSemanticUrl=!1,_.dynamicSetCookie=c,_.enableRouting=!1,_.serviceConfig?Object.assign(_.serviceConfig,{contextPath:"",appAlias:E}):_.serviceConfig={contextPath:"",appAlias:E,staticContentServer:i,appStaticContentServer:"no-appstatic"},_.additionalHeaders={Authorization:I,...A},_.envType=d,_.dynamicLoadComponents=!a,_.dynamicSemanticUrl=!a,_.noHistory=!0,_.theme=y??{};const N=p&&_?.themeObject?_.themeObject:null;_.theme=N||y,_.renderingMode=l??_.renderingMode,_.locale=u||_.locale,e.semanticUrlArgs&&(_.semanticUrlArgs=e.semanticUrlArgs);const T=i||_.serviceConfig.staticContentServer;if(_.isSdk?(_.enableRouting=h,_.dynamicSemanticUrl=_.enableRouting,hg.initServer(i,"no-appstatic")):(_.serviceConfig.staticContentServer=T,_.serviceConfig.appStaticContentServer=_.serviceConfig.appStaticContentServer||"no-appstatic",hg.initServer(T,T)),"EMBED"===_.renderingMode&&m?.authentication_service&&"pega"!==m.authentication_service&&(_.routingInfo||(_.routingInfo={}),_.routingInfo.authServiceAlias=m.authentication_service),await nb.initCoreConfig(_),o&&fd.subscribe(Fs.PUB_SUB_EVENTS.EVENT_RENDER_APP,o,"renderAppCallback"),"LAUNCHPAD"===_.envType&&"EMBED"===_.renderingMode&&PA.setIsWebEmbed(!0),m&&["OAuth2.0","custom"].includes(m?.authType)&&this.setFetchAuthInfo(m),!a){const e=PA.environmentInfoObject?.pyInfinityStaticService;let a=null;if(e){const e=await af.getDataAsync("D_pxGetComponentLibraryListAndMap","",{});Array.isArray(e.data)&&e.data.length>0&&(a=e.data)}const o=new Promise((async(e,t)=>{try{const t=async()=>{await this.importReactRoot(),e(!0)};fd.subscribe("component-map-loaded",t),"ReactRoot"in Co.getLazyMap()&&e(!0)}catch(e){t(e)}}));await o,nb.initCoreContainers(),await this.loadRootContainerWithHybrid(t,n,s,r),a&&await Promise.all(a.map((({pyComponentMap:e,pxUpdateDateTime:t})=>hg.importCustomComponentMap(e,t))))}};loadRootContainerWithHybrid=(e,t=[],n,s)=>(t.push(js.CONTAINER_TYPE?.HYBRID||"HybridViewContainer",js.LOAD_VIEW_STRING),this.loadRootComponent(e,KR,t,n,s));getBootstrapConfigExtended=async(e,t,n,s,r,a)=>{const o={};s&&(o.themeID=s),a&&(o.locale=a);const i=`${e}/api/application/v2/data_views/D_pxBootstrapConfig${s||a?`?dataViewParameters=${encodeURIComponent(JSON.stringify(o))}`:""}`,c=t?{Authorization:t,...n}:n;return fetch(i,{method:"GET",headers:new Headers(c),credentials:t&&!r?"same-origin":"include"}).then((e=>{if(e.ok)return e.json();throw Error("D_pxBootstrapConfig load failed.",{cause:e.status})}))};getLPConfig=async(e,t,n,s)=>{const r=new Headers({...n,...t&&{Authorization:t}}),a=await fetch(e,{method:"GET",headers:r,credentials:t&&!s?"same-origin":"include"});if(!a.ok)throw new Error("environmentInfo load failed.",{cause:a.status});return a.json()};applyEnvironmentInfoResponse=async e=>{const{environmentInfo:t,pyCaseTypeList:n,theme:s,keyMapping:r}=e,{pxApplication:a,features:o,pxLocale:i}=t,c={simpleTable:{pageInstructionUUIDGeneration:!1},...o},l=Intl.DateTimeFormat().resolvedOptions().timeZone.toUpperCase(),u="ETC/UNKNOWN"===l?"America/New_York":l;e.environmentInfo={...t,pxApplication:{...a},features:c,pyCaseTypeList:n,pxLocale:{...i,pyTimeZone:u}},e.timezone=u;const d=Object.keys(e.environmentInfo);return{isEnvInfoValid:["pxOperator","pxLocale","pxApplication"].every((e=>d.includes(e))),theme:s,keyMapping:r,features:c}};importReactRoot=async()=>{const e=[];return Co.getComponent("ReactRoot").modules.forEach((t=>{e.push(t())})),Promise.allSettled(e)};preInitBootstrapConfig=async(e,t,n,s)=>{const{restServerUrl:r,customRendering:a=!1,staticContentServerUrl:o,dynamicSetCookie:i=!1,authInfo:c,renderingMode:l,locale:u,timezone:d="America/New_York",envType:p,theme:g={}}=e,h=s??null,f={restServerUrl:r,restServerConfig:r,dynamicSetCookie:i,enableRouting:!1,serviceConfig:{contextPath:"",appAlias:t,staticContentServer:o,appStaticContentServer:"no-appstatic"},additionalHeaders:{...n},envType:p,dynamicLoadComponents:!a,dynamicSemanticUrl:!a,noHistory:!0,themeIDObj:h,theme:h||g,renderingMode:l,locale:u,timezone:d,tokens:{C11NB2S:""}};return hg.initServer(o,"no-appstatic"),await nb.init(f),c&&["OAuth2.0","custom"].includes(c?.authType)&&this.setFetchAuthInfo(c),this.getBootstrapConfigViaSB(t?`${r}/${t}`:`${r}`,n,s)}};const XR=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 ZR=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.portalTemplate=e.portalTemplate,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=e.dynamicLoadComponents??!0,this.dynamicSemanticUrl=e.dynamicSemanticUrl??!0,this.enableRouting=e.enableRouting??!0,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 XR(e.serviceConfig),this.behaviorOverrides=e.behaviorOverrides,this.initBroadcast=!!e.initBroadcast,this.cookieComplianceMethod=e.cookieComplianceMethod??"none",this.isExtraCallRequiredForDefaultHome=e.isExtraCallRequiredForDefaultHome??"false",this.enablePriorityAndUrgencyImprovements=e.enablePriorityAndUrgencyImprovements??!1,this.storePercentageAsDecimal=e.storeC11nPercentageAsDecimal??!1,this.collab=e.collab,this.requestContext=e.requestContext,this.pzencv1zzz=e.pzencv1zzz}},eb="@P .viewConfig";let tb=0;const nb=new class{async init(e){const t=new ZR(e);s_(t.enableRouting),LR({}),bp.updateFieldDefaults(t.fieldDefaults),bp.setFieldDefault("Percentage","storePercentageAsDecimal",t.storePercentageAsDecimal),this.#D(t.routingInfo,t.actionModel,{server:t.restServerConfig,reAuthUrl:t.serviceConfig.reAuthUrl});const{appAliasWithoutServlet:n,appAlias:s,googleMapKey:r,staticContentServer:a,appStaticContentServer:o}=t.serviceConfig;hg.setAppAlias(n||s),on(r),hg.initServer(a,o,t.tokens.C11NB2S),Bs.setRemoteCaseMapping(t.remoteCaseMapping),kR.init(t.collab),kR.subscribeToCaseEvents(),Jh.subscribeToCaseEvents(),sf.setConnectionConfig({messagingService:t.serviceConfig.messagingService}),t.initBroadcast&&GR.getBroadcastUtils().init(),wd.setDefaultHeaders(t.additionalHeaders),wd.setRequestContext(t.requestContext),"Infinity"===t.envType&&await this.loadEnvironmentInfoFromDataPage(t);const i={...t.environmentInfo,encCSRFToken:t.pzencv1zzz,renderingMode:t.renderingMode,...t.portalTemplate?{pyPortalTemplate:t.portalTemplate}:{}};i.pyCaseTypeList?.forEach((e=>{const t=e.pyWorkTypeImplementationClassName;t&&(e.localeReference=tm(Zf,t))})),i.features?.isNamespaceEnabled&&(t.additionalHeaders.Prefer="namespaced",wd.setDefaultHeaders(t.additionalHeaders)),this.configureTheme(t.theme),PA.setCookieComplianceMethod(t.cookieComplianceMethod),PA.setIsExtraCallRequiredForDefaultHome(t.isExtraCallRequiredForDefaultHome),PA.setEnablePriorityAndUrgencyImprovements(t.enablePriorityAndUrgencyImprovements),PA.setEnvironmentInfo(i);const c=new URLSearchParams(window.location.search).get("lang")||t.locale||navigator.language||"en-US";PA.setLocale(c),"undefined"!=typeof document&&(document.documentElement.lang=c,document.documentElement.dir=FR(c)),xA().setTimezone(t.timezone),Ng.init(),"Infinity"!==t.envType&&BR.subscribeToGlobalEvents(),t.initBroadcast&&GR.getBroadcastUtils().init(),await RA()}configureTheme=e=>{if(e){const t=e.light,n=e.dark;void 0!==t&&void 0!==n?(this.#P(t),this.#P(n,{type:"dark"})):PA.setTheme(e)}};getBootstrapConfig=async(e,t)=>{const n=`${t.token_type} ${t.access_token}`,s=`${e}/api/application/v2/data_views/${Ls.getDefaultQualifiedName("D_pxBootstrapConfig")}`;return(await fetch(s,{method:"GET",headers:new Headers({Authorization:n})})).json()};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=Cm({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 JR.getComponentsRegistry().getComponent("ReactRoot")?.modules?.forEach((t=>{e.push(t())})),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,t,n)=>{try{ug(e)}catch(e){return void console.error("Design system load blocked: untrusted or malformed URL",e)}try{await((e,t="true")=>new Promise(((n,s)=>{if("undefined"==typeof document)return void s(new Error("document is not available in this environment"));const r=document.createElement("script");r.type="text/javascript",r.src=e,r.async="true"===t,r.onload=()=>n(void 0),r.onerror=()=>s(new Error("Failed to load resource from Design System")),document.body.appendChild(r)})))(`${e}component/project/${t}/designsystems/${n}/componentsmap.js?v=${Date.now()}`)}catch(e){console.log(e)}};buildSemanticUrl=(e,t,n,s,r)=>{const a=new URLSearchParams(t),o="true"===n&&!!e,i=new URLSearchParams(window.location.search).get("lang");i&&!a.has("lang")&&a.set("lang",i);let c=null,l=null,u=null;if(e){const t=(e.startsWith("/")?e.substring(1):e).split("/");c=t[0]||null,l=t[1]||null,"assignments"===t[2]&&t[3]&&(u=t[3])}const d=[s];c&&d.push(c),l&&d.push(l),u&&d.push("assignments",u),o&&(a.has("noPortal")||a.append("noPortal","true"),l&&r&&a.append("view",r));const p=a.toString();return d.join("/")+(p?`?${p}`:"")};initCoreConfig=async e=>{const{routingInfo:t,serviceConfig:n,semanticUrl:s,queryParams:r,noPortal:a,noHistory:o,viewName:i,theme:c,restServerConfig:l,dynamicLoadComponents:u=!0,dynamicSemanticUrl:d=!0,renderingMode:p="FULL_PORTAL",envType:g,extras:h}=e,{appAlias:f,contextPath:m}=n,I=window.location,E=I.origin;let y=l??E;const A={};if(m&&(y+=m),f&&"LAUNCHPAD"!==g&&(y+=`/${f}`),e.restServerConfig=y,this.#O(),!0===d){const e=this.buildSemanticUrl(s,r,a,y,i);!o&&e&&"undefined"!=typeof window&&window.history.replaceState({},"home",e)}else if("HYBRID"!==p){const e=I.href,t=e.indexOf("?");t>0&&"undefined"!=typeof window&&window.history.pushState({},"home",e.substring(0,t)),A.dynamicSemanticUrl=!1}else console.log(`renderingMode :${p}`);!0!==u&&(A.dynamicLoadComponents=!1);let C=null;if(f){const e=f.indexOf("/app/");C=e>=0?f.substring(e+1):f}if((!1===A.dynamicSemanticUrl||!1===A.dynamicLoadComponents)&&PCore.setBehaviorOverrides(A),e.appAlias=C,c)if("object"==typeof c)e.theme=c;else try{e.theme=JSON.parse(c)}catch{e.theme={}}let S=I?`${I.protocol}//${I.host}`:t.domain;if("EMBED"===p)try{S=new URL(e.restServerConfig).origin}catch{}const _={...t,domain:S,searchParams:I?I.search:"",embedQueryParams:e.semanticUrlArgs};e.routingInfo=_,e.initBroadcast="true"===PA.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence,!e.noPortal||"true"!==e.noPortal&&!0!==e.noPortal||(e.renderingMode="EMBED"),h?.cspNonce&&(window.__webpack_nonce__=h.cspNonce),PA.setCaseLabelFirstInTitle(e.extras?.useDefaultBrowserTabTitle??!0),await this.init(e)};launchViewByName=async(e,t,n,s,r,a,o,i,c=[])=>{tb+=1;const l=i||`mashup${tb}`,u={type:"RootContainer",config:{viewConfig:eb,renderingMode:"view",name:l}};await JR.loadRootComponent(e,u,r,a,o),await this.loadCustomComponentLibrariesIfEnabled(c),JR.loadViewByName(t,n,s,l)};launchView=(e,t,n=[],s,r,a,o)=>{let i;tb+=1,i="hybrid"===o?`hybrid_${tb}`:o||`mashup${tb}`;const c={type:"RootContainer",config:{viewConfig:eb,renderingMode:"portal",name:i}};o===js.HYBRID&&Tf.setRuntimeParam(js.HYRBID_ROOT_CONTAINERNAME,i),Tf.setRuntimeParams(s),JR.loadRootComponent(e,c,n,r,a).then((()=>JR.updateStoreWithUiRoot(t,i,!1)))};launchPortal=async(e,t,n=`portal${tb+=1}`,s=[],r=[])=>{const a="LoadingComponent",o={type:"RootContainer",config:{viewConfig:eb,renderingMode:"portal",skeleton:a,name:n}},i=[...s,a];PA.isPortalLoaded=!0;try{return await JR.loadRootComponent(e,o,i),await this.loadCustomComponentLibrariesIfEnabled(r),JR.loadPortalView(t,n)}catch(e){throw console.error(`Failed to launch portal ${t}:`,e),e}};launchMashup=(e,t=!0,n=[])=>{const s={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:"@ROUTING_INFO",name:"primary"}}]};if(t&&!document.getElementById("portal-less-styles")){const t=document.getElementsByTagName(e),n=t[0]?.parentNode;if(n){const e=document.createElement("style");e.id="portal-less-styles",e.textContent="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",n.appendChild(e)}}if((async()=>{await JR.loadRootComponent(e,s,[js.LOAD_VIEW_STRING,"ViewContainer"]),await this.loadCustomComponentLibrariesIfEnabled(n)})(),window.parent!==window){const e=hg.getStaticServerUrl();r(754)(`${e}constellation-mashup-bridge.js`).then((e=>{e.mashup.init({resizing:"stretch"})}))}};loadEnvironmentInfoFromDataPage=async e=>{if("wss"===e.portalType&&(e.environmentInfo={...e.environmentInfo,features:{case:{createInModal:!1}}}),e.environmentInfo?.pyDataPages&&Array.isArray(e.environmentInfo.pyDataPages)){const t=e.environmentInfo.pyDataPages;setTimeout((()=>{this.loadDataPagesIntoEnvironmentInfo(t).catch((e=>{console.error("Error loading data pages into environment info:",e)}))}),js.PRIORITY.TRIVIAL)}};loadDataPagesIntoEnvironmentInfo=async e=>{if(!e?.length)return;const t=PA.environmentInfoObject;if(!t)return;const n=e.filter((({pyName:e,pyPath:t})=>!(!e||!t)||(console.warn("Invalid data page configuration: missing pyName or pyPath"),!1)));if(0===n.length)return;const s=await Promise.allSettled(n.map((async({pyName:e,pyPath:t})=>{try{return{pyPath:t,response:await af.getPageDataAsync(e,"",{})}}catch(t){return console.error(`Failed to load data page ${e}:`,t),null}}))),r=s.length;let a=!1;for(let e=0;e<r;e+=1){const n=s[e];if("fulfilled"===n.status&&n.value){const{pyPath:e,response:s}=n.value;this.setNestedProperty(t,e,s),a=!0}}a&&PA.setEnvironmentInfo(t)};#R(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}setNestedProperty(e,t,n){const s=t.startsWith(".")?t.slice(1):t;if(!s)return void("object"==typeof n&&null!==n&&Object.assign(e,n));const r=s.split("."),a=r.length;let o=e;for(let e=0;e<a-1;e+=1){const t=r[e],n=o[t];if(this.#R(n))o=n;else{const e={};o[t]=e,o=e}}o[r[a-1]]=n}start=async(e,t)=>{const{serviceConfig:{appStaticContentServer:n},ccV2LibId:s,environmentId:r,isAlternateDesignSystemEnabled:a,alternateDesignSystemName:o}=e;await this.initCoreConfig(e);const i=PA.environmentInfoObject?.pyC11nDXCBDevURL,c="true"===a&&"other"!==o,l=async()=>{await this.importReactRoot();const e=[];i?e.push(hg.importCustomComponentMap("")):s&&e.push(hg.importCustomComponentMap(s)),c&&e.push(this.importDesignSystemComponentMap(n,r,o)),e.length&&await Promise.all(e),t?.()},u=JR.getComponentsRegistry();if("ReactRoot"in u.getLazyMap())return!0;return u.getComponent("ReactRoot")?(await l(),!0):new Promise((e=>{fd.subscribeOnce("component-map-loaded",(async()=>{await l(),fd.unsubscribe("component-map-loaded","component-map-loaded-id"),e(!0)}),"component-map-loaded-id")}))};registerForDebugInfo=e=>{if(PA.setPreviewMode(),!e)return;const t=({debugInfo:t})=>{const n=t?.["X-Pega-App-Debug-ID"];n&&e.postMessage({appDebugID:n})};fd.subscribe("fetchSuccess",t,"fetchSuccess"),fd.subscribe("fetchFailure",t,"fetchFailure")};toggleTracerHeaders=e=>{e.addEventListener("message",(e=>{const t=e?.data?.enableTracer;t?Id.enableTracer():Id.disableTracer()}))};loadEnvironmentInfo=async e=>{const t="Android"===window.pms?.device.systemName;if(e.theme&&!t)try{const t=JSON.parse(e.theme.definition),n=t.Branding,s=t.Theme;PA.setBrandingInfo(n),PA.setTheme(s)}catch{PA.setBrandingInfo({}),PA.setTheme({})}if(e.darkTheme&&!t){const t={type:"dark"};try{const n=JSON.parse(e.darkTheme.definition);PA.setBrandingInfo(n.Branding,t),PA.setTheme(n.Theme,t)}catch{PA.setBrandingInfo({},t),PA.setTheme(void 0,t)}}e.keyMapping&&PA.setKeyMapping(e.keyMapping),PA.setCookieComplianceMethod(e.cookieComplianceMethod??"none")};async loadCustomComponentLibrariesIfEnabled(e){e?.length>0&&PA.environmentInfoObject?.pyInfinityStaticService&&await this.loadCustomComponentLibraries(e)}async loadCustomComponentLibraries(e){const t=e.map((e=>this.importSingleCustomComponent(e)));await Promise.all(t)}importSingleCustomComponent(e){return"object"==typeof e&&"pyComponentMap"in e?hg.importCustomComponentMap(e.pyComponentMap,e.pxUpdateDateTime):hg.importCustomComponentMap(e)}#D(e,t,n){S_(e),Og.buildActionTargetMap(t),nn(n)}#O(){document.querySelectorAll('head link[rel~="icon"], head link[rel~="apple-touch-icon"]').forEach((e=>{e.setAttribute("href",e.href)}))}#P(e,t){if(null===e)return;if("object"==typeof e)return void PA.setTheme(e,t);let n;try{n=JSON.parse(e)}catch{return void PA.setTheme("dark"===t?.type?void 0:{},t)}PA.setTheme(n,t)}},sb={createViewRule:(e,t)=>{const{restApi:n,reqType:s}=i_("createViewRuleByID");return Wd(n,{method:s,body:e},t).then((e=>e.data))},getViewRule:(e,t)=>{const{restApi:n,reqType:s}=i_("getViewRuleByID",{ID:e});return Wd(n,{method:s},t).then((e=>e.data))},updateViewRule:(e,t,n)=>{const{restApi:s,reqType:r}=i_("updateViewRuleByID",{ID:e});return Wd(s,{method:r,body:t},n).then((e=>e.data))},deleteViewRule:(e,t)=>{const{restApi:n,reqType:s}=i_("deleteViewRuleByID",{ID:e});return Wd(n,{method:s},t).then((e=>e.data))},getCalculatedFields:(e,t,n)=>{const{restApi:s,reqType:r}=i_("getCalculatedFieldsInViewByID",{caseID:e,viewID:t});return Wd(s,{method:r,body:{calculations:{fields:n}}}).then((e=>e.data))}},rb={"Content-Type":"application/json"},ab={addCaseFollower:(e,t,n)=>{const s={caseID:e},r=JSON.stringify({users:t.map((e=>({ID:e})))});return tg("addCaseFollower",{body:r,queryPayload:s,headers:rb},n)},deleteCaseFollower:(e,t,n)=>tg("deleteCaseFollower",{queryPayload:{caseID:e,followerID:t}},n),getCaseFollowers:(e,t)=>tg("getCaseFollowers",{queryPayload:{caseID:e}},t).then((e=>e.data.followers))},ob={addRelatedCases:(e,t,n)=>{const s={caseID:e},r=JSON.stringify({cases:t});return tg("addRelatedCases",{body:r,queryPayload:s},n)},removeRelatedCase:(e,t,n)=>tg("removeRelatedCase",{queryPayload:{caseID:e,relatedCaseID:t}},n),getRelatedCases:(e,t)=>tg("getRelatedCases",{queryPayload:{caseID:e}},t).then((e=>e.data.relatedCases))},ib="operatorDetails",cb={getOperatorDetails:(e,t=!1)=>{const{reqType:n}=i_(ib,{});if("GET"===n){const t={encodedOperatorId:encodeURIComponent(`{"opname":"${e}"}`)};return tg(ib,{queryPayload:t})}return t?tg("operatorDetailsByBusinessID",{body:{dataViewParameters:{BusinessID:e}}}):tg(ib,{body:{dataViewParameters:{ID:e}}})}},lb="postCustomFeedMessages",ub={"Content-Type":"application/json"};const db=new class{constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,t,n,s,r,a,o)=>{const i=a.getLocalizationService();o||(this.mentions=[]);let c="";s&&Array.isArray(s)&&s?.length>0&&(s.forEach((e=>{e.on&&(c=`${c}${e.id},`)})),""===c&&(c="ClearFilters"));let l="";o&&(l=a.getValue("pulse.pageLastEntry"));const u={filterForContext:"pyDataFeed"===t?encodeURIComponent(e):e,feedID:t,feedClass:n,filterBy:c,pageSize:10,olderThan:l};for(let e=0;e<r.length;e+=1)r[e].cancel();const d=rg();return r.push(d),tg("getFeedMessages",{queryPayload:u,cancelTokenSource:d},a.getContextName()).then((async t=>{if(200!==t.status||!t.data)return a.reportError(`getFeeds call failed ${t.status}`,t.data),t;{r.pop();const n=[],c={};let l=!1,u=[];if(t?.data){if(u=Array.isArray(t.data.data.MessageTypes)&&t.data.data.MessageTypes.length?t.data.data.MessageTypes:[],t?.data?.data?.FeedList){const e=t.data.data.FeedList?.pxResults;Array.isArray(e)&&e?.length>0&&e.forEach(((e,t)=>{e.ID=""!==e.pzInsKey?e.pzInsKey:`message${t}`,n.push(e.ID),c[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)})),l||["pzPostDetails","pzPrivatePostDetails"].includes(e.pyMessageViewReference)||(l=!0)}))}if(l&&await om({uiResources:t.data.uiResources}),!s&&(s=[{id:"All",label:i.getLocalizedText("All"),on:!0,disabled:!1}],t?.data?.data?.FeedFilters)){const e=t.data.data.FeedFilters?.pxResults;let n=!0;if(e&&Array.isArray(e)&&e?.length>0){e.forEach((e=>{const t={id:e.pyFeedSourceReference,label:i.getLocalizedText(e.pyLabel),disabled:!1,on:"true"===e.pySelected};t.on||(n=!1),s.push(t)}));const t=s.find((e=>"All"===e.id));t&&(t.on=n)}}}if(o&&a.getValue("pulse.messageIDs")){let e=a.getValue("pulse.messages");e={...e,...c},Object.values(e).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)}))}))}if(Dy(a.getContextName())){a.updateState({pulse:{messages:o&&a.getValue("pulse.messageIDs")?{...a.getValue("pulse.messages"),...c}:c,messageIDs:o&&a.getValue("pulse.messageIDs")?[...a.getValue("pulse.messageIDs"),...n]:n,nextPageFirstEntry:t?.data?.nextPageFirstEntry||"",pageLastEntry:t?.data?.pageLastEntry||"",hideAttachment:t?.data?.hideAttachment||!1,postTypes:u,pulseContext:e}});const r=[...new Map(this.mentions.flat()?.map((e=>[e.mentionsID,e]))).values()].filter((e=>Object.hasOwn(e,"mentionsType"))).filter((e=>!e?.mentionsType?.toLowerCase().includes("user")));return{feedFilters:s,caseMentions:r}}}})).catch((e=>{if(!ag(e))return a.reportError(": Error occurred during ajax call at getFeeds API : ",e.response),e.response}))};postMessage=(e,t,n,s=[],r=!1,a=[])=>{const o={message:t,context:e,parentMessageId:r?e:"",attachments:s,pyRecipients:a.length?a:void 0},i=0===a.length?{body:JSON.stringify(o),headers:ub}:{body:JSON.stringify(o),queryPayload:{type:"PegaSocial-Post-Private"},headers:ub};return tg(a.length?lb:"postFeedMessages",i,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=>{throw n.reportError(": Error occurred during ajax call at postMessage API : ",e.response),e.response}))};postCustomMessage=(e,t,n)=>tg(lb,{body:t,queryPayload:{type:e},headers:ub},n.getContextName()).then((async e=>{if(201===e.status&&e.data){const s=e.data.data,r={ID:s.ID,pzInsKey:s.ID,classID:s.classID,pyPostType:s.pyPostType,postedByUser:s.postedByUser,pyIsDeleteEnabled:s.pyIsDeleteEnabled,pyMessageViewReference:s.messageViewReference,pyFeed:{pyIconType:"user",pyCommentContext:s.pyCommentContext,pyPostedOn:s.postedTime,pyFeedTitle:s.postedByUser.name,pyIconReference:s.postedByUser.ID},...s.PostMessage};im(s.messageViewReference,n,t.context)||await om({uiResources:e.data.uiResources}),n.updateState({pulse:{messages:{[r.ID]:r,...n.getValue("pulse.messages")},messageIDs:[r.ID,...n.getValue("pulse.messageIDs")]}})}return n.reportError(`postCustomMessage call failed with status ${e.status}`,e),""})).catch((e=>{throw n.reportError(": Error occurred during ajax call at postCustomMessage API : ",e.response),e.response}));editMessage=({messageID:e,parentMessageID:t,message:n,pConnectObj:s,isReply:r=!1,recipients:a=[]})=>{const o=JSON.stringify({message:n,...a.length&&{pyRecipients:a}});return tg("editFeedMessage",{queryPayload:{messageID:e},body:o,headers:ub},s.getContextName()).then((e=>{if(200===e?.status&&e?.data){const n=e?.data;if(r){n.parentMessageID=t;const{pxResults:e,caseMentions:a}=this.buildMessageObject(n,r,s,!1);return s.updateState({pulse:{messages:{[t]:{pxResults:e}}}}),a}const{messages:a,caseMentions:o}=this.buildMessageObject(n,r,s,!1);return s.updateState({pulse:{messages:a}}),o}return s.reportError(`editMessage call failed with status ${e.status}`,e),""})).catch((e=>{throw s.reportError(": Error occurred during ajax call at editMessage API : ",e.response),e.response}))};buildMessageObject=(e,t,n,s=!1)=>{const r={ID:e?.ID||"",classID:e?.classID||"PegaSocial-Message",tags:e?.tags||[],pyHasAttachment:s,pzInsKey:e?.ID||"",pyMessage:e?.message||"",mentions:e?.mentions||[],postedByUser:e?.postedByUser,pxCreateDateTime:e?.postedTime||"",pxUpdateDateTime:e?.updatedTime||"",parentMessageID:e?.parentMessageID||"",pyIsDeleteEnabled:e?.pyIsDeleteEnabled||!1,pyIsEdited:"string"==typeof e?.isEdited?"true"===e?.isEdited:e?.isEdited||!1,pyFeed:{pyPostedOn:e?.postedTime||"",pyFeedTitle:e?.postedByUser?.name||"",pyIconType:"user",pyCommentContext:e?.pyCommentContext||".pzInsKey",pyIconReference:"pi pi-case"},pyContext:"",pxIcon:"globe",pyMessageViewReference:e?.messageViewReference||"pzPostDetails",pyPostType:e?.pyPostType,pyRecipients:e?.pyRecipients?.length?e.pyRecipients:void 0},a=n.getValue("pulse.messages");if(t){let{pxResults:e=[]}=Object.values(a)?.find((e=>e?.ID===r?.parentMessageID))||{};const t=e?.findIndex((e=>e?.pzInsKey===r?.ID));if(-1!==t){const n=[...e];n[t]={...n[t],...r},e=n}else e=[...e,r];return{pxResults:e,messages:{},messageIDs:[],caseMentions:this.getCaseMentions(e)}}const o=n.getValue("pulse.messageIDs");if(o){const e=o.includes(r.ID)?{...a[r.ID],...r}:r,t={...a,[r.ID]:e};return{messages:t,messageIDs:o.includes(r.ID)?o:[r.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.hasOwn(e,"mentionsType"))).filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))};likeMessage=({pulseContext:e,likedBy:t,messageID:n,isReply:s,pConnectObj:r})=>{const a=t?"unlikeFeedMessages":"likeFeedMessages",o=JSON.stringify({ContextClass:e});tg(a,{body:o,queryPayload:{pulseContext:e},headers:ub},r.getContextName()).then((a=>{if(200===a.status)if(s){const s=r.getValue(`pulse.messages.${n}`),a=s?.pxResults&&Array.isArray(s?.pxResults)&&s.pxResults?.length>0&&s.pxResults?.map((n=>{if((n={...n}).pzInsKey===e){let e=0,s=!1;const r=n.pyLikes?n?.pyLikes?.pxLikeCount:0;t?(e=r-1,s=!1):(e=r+1,s=!0),n.pyLikes={pxLikeCount:e,pxIsLiked:s}}return n}));r.updateState({pulse:{messages:{[n]:{pxResults:a}}}})}else{const s={...r.getValue(`pulse.messages.${n}`)},a=s.pyLikes?s.pyLikes.pxLikeCount:0;let o=0,i=!1;t?(o=a-1,i=!1):(o=a+1,i=!0),s.pyLikes={pxLikeCount:o,pxIsLiked:i},r.updateState({pulse:{messages:{[e]:s}}})}else r.reportError(`likeMessage call failed with status ${a.status}`,a)})).catch((e=>{r.reportError(": Error occurred during ajax call at likeMessage API : ",e.response.data)}))};deleteMessage=(e,t,n,s)=>{let r=e;t&&(r=n);tg("deleteFeedMessage",{queryPayload:{messageID:r}},s.getContextName()).then((r=>{if(200===r.status)if(t){const t=s.getValue(`pulse.messages.${e}`),r=t?.pxResults&&Array.isArray(t?.pxResults)&&t.pxResults?.length>0&&t.pxResults?.filter((e=>e.pzInsKey!==n));s.updateState({pulse:{messages:{[e]:{pxResults:r}}}})}else{const t=s.getValue("pulse.messageIDs"),n=t&&Array.isArray(t)&&t?.length>0&&t?.filter((t=>t!==e)),r={...s.getValue("pulse.messages")};delete r[e],s.updateState({pulse:{messageIDs:n,messages:r}})}else s.reportError(`deleteMessage call failed with status ${r.status}`,r)})).catch((e=>{s.reportError(": Error occurred during ajax call at deleteMessage API : ",e.response)}))};getLikedUsers=(e,t)=>tg("getFeedMessageLikes",{queryPayload:{messageID:e}},t.getContextName());getMentionSuggestions=(e,t)=>{const{pulseContext:n,searchFor:s,mentionsType:r,listSize:a=5}=e,o={pulseContext:n,searchFor:s,mentionsType:r,listSize:a};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const i=rg();return this.mentionsTagsCancelTokenSource.push(i),tg("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=>{ag(e)||t.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",e.response.data)}))};getMentionTypes=e=>tg("getMentionTypes",{},e.getContextName());getPostTypeView=(e,t,n)=>tg("getViewRuleByMessageType",{queryPayload:{type:e,contextID:n??""}},t.getContextName());getTagSuggestions=(e,t)=>{const{searchFor:n,listSize:s=5}=e,r={searchFor:n,listSize:s};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const a=rg();return this.mentionsTagsCancelTokenSource.push(a),tg("getTagSuggestions",{queryPayload:r,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=>{ag(e)||t.reportError(": Error occurred during ajax call at getTagSuggestions API : ",e.response.data)}))}},pb={getTaggedCases:(e,t)=>{const n={caseID:e,viewID:Ls.getDefaultQualifiedName("pyTaggedCases")};return tg("loadView",{queryPayload:n},t.getContextName()).then((e=>e?.data)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)}))},getTags:(e,t)=>tg("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 s={caseID:e},r=JSON.stringify({tags:t});return tg("addTagsToCase",{body:r,queryPayload:s},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)=>tg("deleteCaseTag",{queryPayload:{caseID:e,tagID:t}},n.getContextName()).catch((e=>{n.reportError(": Error occurred during ajax call at removeTag API : ",e.response)})),getTagsLandingPageURL:e=>{const t=Ls.getDefaultQualifiedName("D_pxGetTagsLandingPageURL");return af.getPageDataAsync(t,e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",t.response)}))}},gb=(e,t)=>{dA(t.getContextName(),e.etag),pA(t.getContextName(),e.etag)},hb={getParticipants:(e,t)=>tg("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)=>tg("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)=>tg("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)=>tg("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,s,r)=>{const a={caseID:e},o={...n,participantRoleID:t},i={"if-match":s.getCaseSummary().headers.etag};return new Promise(((e,t)=>{tg("createParticipant",{body:o,queryPayload:a,headers:i},s.getContextName()).then((t=>{gb(t.headers,s),e()})).catch((e=>{e.response.data.errorDetails?.forEach((e=>{e.erroneousInputOutputFieldInPage=e.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")}));const n=HI(r||s.getContextName());s.reportError(": Error occurred during ajax call at createParticipant API : ",{...e.response.data,formFields:n},r),t(e.response)}))}))},updateParticipant:async(e,t,n,s,r)=>{const a={caseID:e,participantID:t},o={"if-match":s.getCaseSummary().headers.etag};return new Promise(((e,t)=>{tg("updateParticipant",{body:n,queryPayload:a,headers:o},s.getContextName()).then((t=>{gb(t.headers,s),e()})).catch((e=>{e.response.data.errorDetails?.forEach((e=>{e.erroneousInputOutputFieldInPage=e.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")}));const n=HI(r||s.getContextName());s.reportError(": Error occurred during ajax call at updateParticipant API : ",{...e.response.data,formFields:n},r),t(e.response)}))}))},deleteParticipant:(e,t,n)=>{const s={caseID:e,participantID:t},r={"if-match":n.getCaseSummary().headers.etag};return new Promise(((e,t)=>{tg("deleteParticipant",{queryPayload:s,headers:r},n.getContextName()).then((t=>{gb(t.headers,n),e()})).catch((e=>{n.reportError(": Error occurred during ajax call at deleteParticipant API : ",e.response),t(e.response)}))}))}};function fb(e=[]){return e.reduce(((e,t)=>(e[t.personalizationID]={name:t.name,personalizationState:JSON.parse(t.personalizationState||"{}")},e)),{})}const mb="create",Ib="update",Eb="delete";function yb(e,t,n,s){const r=AC(t);if(r){switch(e){case mb:case Ib:{const{markAsDefault:e,...t}=s;Object.entries(t).length>0&&(r.allPersonalizations[n]=t),e&&(r.defaultPersonalization=n);break}case Eb:delete r.allPersonalizations[n],r.defaultPersonalization===n&&(r.defaultPersonalization="");break;default:return null}return r}return null}const Ab={},Cb=async e=>{const t=AC(e);if(t)return Array.isArray(t.allPersonalizations)&&(t.allPersonalizations=fb(t.allPersonalizations)),Promise.resolve(t);const{restApi:n,reqType:s}=i_("getUIListPersonalizations",{listID:e});return Wd(n,{method:s,body:{}}).then((e=>{const{data:t}=e;return{allPersonalizations:fb(t.allPersonalizations),defaultPersonalization:t.defaultPersonalization}}))},Sb=async(e,t,n)=>{const{restApi:s,reqType:r}=i_("createListPersonalization",{listID:e});return yb(mb,e,t,n),Wd(s,{method:r,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}}).then((e=>{const n=e.data;return Ab[t]=n,e}))},_b=async(e,t,n)=>{const s=Ab[t]||t;yb(Ib,e,t,n);const{restApi:r,reqType:a}=i_("updateListPersonalization",{listID:e,personalizationID:s})||{};return Wd(r,{method:a,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}})},Nb=async(e,t)=>{const n=Ab[t]||t;yb(Eb,e,t);const{restApi:s,reqType:r}=i_("deleteListPersonalization",{listID:e,personalizationID:n});return Wd(s,{method:r,body:{}}).then((e=>(Ab[t]&&delete Ab[t],e)))};const Tb=function(e){return e?{createPersonalization:Sb.bind(null,e),updatePersonalization:_b.bind(null,e),deletePersonalization:Nb.bind(null,e),fetchPersonalizations:Cb.bind(null,e)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}},Db="undefined"!=typeof window?window.sessionStorage:{getItem:()=>null,setItem:()=>{}},Pb="getDataObjects",Ob="getInsightByID",Rb=["LocalList","RemoteList","PromptList","DataPage"];let bb=null;const vb=[];const xb={},wb=e=>Ch.getAppCacheKey(`PrimaryFields-${e}`);function Mb(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 Lb(e){return"object"==typeof e&&null!==e}function Ub(e){return{...e[1],fieldID:e[0],fieldType:e[1].fieldType||(e[1].isUserReference?"User reference":void 0),category:Mb(e),classID:e[1].associationClassID?e[1].associationClassID:e[1].classID}}function Fb({data:e}){const t=(e,t)=>tm("FIELD",e,t),n="string"==typeof e.classID?e.classID:"",s=tm("CASE",n);e.classNameLocaleReference=s;const r=Array.isArray(e.fields)?e.fields:[];for(let e=0;e<r.length;e+=1){const n=r[e];if(Lb(n)){const e={nameLocaleReference:"INSIGHTS",categoryLocaleReference:"INSIGHTS",parentCategoryLocaleReference:"INSIGHTS"},r=n.definedOnClassIDs;if("string"==typeof r){const a=r.split(":").reverse(),o="string"==typeof n.fieldID?n.fieldID:"",i=o.split("!").pop()?.split(":").reverse()||[];a[0]&&i[0]&&(e.nameLocaleReference=t(i[0],a[0])),a[1]&&i[1]&&(e.categoryLocaleReference=t(i[1],a[1])),a[2]&&i[2]?e.parentCategoryLocaleReference=t(i[2],a[2]):n.parentCategory&&(e.parentCategoryLocaleReference=s)}Object.assign(n,e)}}return{data:e}}const jb={getDataObjects:function(){const e=Ch.getAppCacheKey(Pb);if(Db.getItem(e))return Promise.resolve(JSON.parse(`${Db.getItem(e)}`));const{restApi:t,reqType:n}=i_(Pb,{}),s=Wd(t,{method:n});return s.then((t=>{Db.setItem(e,JSON.stringify(t))})),s},getDataPageObjects:function(e=!0){if(bb)return bb;const t=Ch.getAppCacheKey("getDataPageObjects");if(e&&Db.getItem(t))return Promise.resolve(JSON.parse(`${Db.getItem(t)}`));const{restApi:n,reqType:s}=i_("getDataPages",{datapageRequestType:"explorable"});return bb=Wd(n,{method:s,datapageRequestType:"explorable"}),bb.then((e=>{bb=null,Db.setItem(t,JSON.stringify(e))})),bb},getDataViewMetadata:function(e,t,n){if(!t){const{sourceMetadata:t,sourceFields:n}=function(e){const t=yC(e);if(t&&t.classID){let e=SC(t.classID);const n=t.rdFields,s=(n&&!Array.isArray(n)?n.fields:void 0)?.filter((e=>e.indexOf(".")>0));if(s&&!rS.isEmpty(s)){const n=s.reduce(((e,n)=>{const s=lC(n,t.classID);var r;return s&&"type"in(r=s)&&"classID"in r&&(e[n]=s),e}),{});e={...e,...n}}if(e&&Object.keys(e).length>0){for(const t of Object.keys(e))e[t].type.startsWith("Page")?delete e[t]:e[t]?.datasource&&Rb.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={...t,fields:Object.entries(n).map(Ub)};if(Lb(s=e)&&"string"==typeof s.classID&&Array.isArray(s.fields)){const t=Fb({data:e});return Promise.resolve(t)}}}var s;const r={dataSource:e,columns:[],parameters:{},associationFilter:n,matchPosition:"",ignoreCase:!1};return yf.init(r).then((({dataSourceMetaData:e})=>e?Fb({data:e}):{data:{classID:"",className:"",isQueryable:!1,fields:[]}}))},getDefaultColumns:function(e){const t=Ch.getAppCacheKey(`DefaultColumns_${Object.values(e).join("_")}`);if(Db.getItem(t))return Promise.resolve(JSON.parse(`${Db.getItem(t)}`));const n={dataViewName:Ls.getDefaultQualifiedName("D_pzGetDefaultColumns")},{restApi:s,reqType:r}=i_("getListData",n),a=Wd(s,{method:r,body:{dataViewParameters:e}});return a.then((e=>{Db.setItem(t,JSON.stringify(e))})),a},getFieldsForDataSource:function(e,t,n){if(!t){const t=yC(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 s=Ch.getAppCacheKey(`RDColumns-${e}`);if(Db.getItem(s))return Promise.resolve(JSON.parse(`${Db.getItem(s)}`));const r=Ch.getData(Ls.getDefaultQualifiedName("D_pxFieldsForDataSource"),{dataViewParameters:{DataPageName:e}},n);return r.then((e=>{Db.setItem(s,JSON.stringify(e))})),r},getPrimaryFieldsForDataSource:function(e="",t=""){const n=Ch.getAppCacheKey(`PFColumns-${e}${t}`);if(Db.getItem(n))return Promise.resolve(JSON.parse(`${Db.getItem(n)}`));const s=Ch.getData(Ls.getDefaultQualifiedName("D_pxGetInitialFieldsForDataSource"),{dataViewParameters:{DataPageName:e,ClassName:t}});return s.then((e=>{Db.setItem(n,JSON.stringify(e))})),s},getPrimaryFieldsForInsights:async function(e,t,n,s){const{allClasses:r,promisesToAwait:a,classesToFetch:o,isTopLevelClassPresent:i,joinedClassesToFetch:c}=function(e,t){const n=[],s=[];let r=!1;const a=[],o=[];return e&&o.push(e),t&&t.length>0&&o.push(...t),o.forEach((t=>{const o=wb(t);if(Db.getItem(o))return;const i=xb[t];i?s.push(i):(n.push(t),t===e?r=!0:a.push(t))})),{allClasses:o,promisesToAwait:s,classesToFetch:n,isTopLevelClassPresent:r,joinedClassesToFetch:a}}(e,n);return o.length&&a.push((async(e,t,n,s,r)=>{const a=Ch.getData(Ls.getDefaultQualifiedName("D_pxGetPrimaryFieldsForInsights"),{dataViewParameters:{...t&&{topLevelClassID:t},...s&&{joinedClassIDs:s.join(",")},...n&&{topLevelDataPageID:n}}},r).then((t=>{const n=t.data?.data||[],s={};e.forEach((e=>{s[e]=[]})),n.forEach((e=>{const t=e.classID,n=e[Ls.getDefaultQualifiedName("pyFieldName")];s[t].push(n)})),Object.entries(s).forEach((([e,t])=>{const n=wb(e);Db.setItem(n,JSON.stringify(t))}))})).finally((()=>{e.forEach((e=>{delete xb[e]}))}));return e.forEach((e=>{xb[e]=a})),a})(o,i?e:void 0,i?t:void 0,c.length>0?c:void 0,s)),Promise.allSettled(a).then((()=>{const e={};return r.forEach((t=>{const n=wb(t);if(Db.getItem(n))try{e[t]=JSON.parse(`${Db.getItem(n)}`)}catch{}})),{data:e}}))},getInsightIDs:function(){const{restApi:e,reqType:t}=i_("getInsightIDs");return Wd(e,{method:t})},getInsightByID:function(e){const t=CC(e);if(t)return Promise.resolve({data:{pyInsights:[t]}});const n={insightID:e},{restApi:s,reqType:r}=i_(Ob,n);return Wd(s,{method:r})},getInsightsByID:function(e){const t={insightID:e.join(",")},{restApi:n,reqType:s}=i_(Ob,t);return Wd(n,{method:s})},loadClassResources:async e=>{const t=e.filter((e=>!vb.includes(e)));if(0===t.length)return;const n={classIDs:e.join(",")},{restApi:s,reqType:r}=i_("getClassResources",n);return Wd(s,{method:r}).then((e=>{e.data.resources&&(vb.push(...t),Kp(e.data.resources))}))},createInsight:function(e){const{restApi:t,reqType:n}=i_("createInsight");return Wd(t,{method:n,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})},updateInsight:function(e,t){const n={insightID:e},{restApi:s,reqType:r}=i_("updateInsight",n);let a;return"UpdateDateTime"in t&&(a=t.UpdateDateTime),Wd(s,{method:r,body:JSON.stringify(t),headers:{"if-match":a,"Content-Type":"application/json"}})},deleteInsight:function(e){const t={insightID:e},{restApi:n,reqType:s}=i_("deleteInsight",t);return Wd(n,{method:s})},exportToExcel:function(e){const{restApi:t,reqType:n}=i_("exportToExcel");return Wd(t,{method:n,body:JSON.stringify(e)})},exportToCSV:function(e){const{restApi:t,reqType:n}=i_("exportToCSV");return Wd(t,{method:n,body:JSON.stringify(e)})},scheduleInsight:(e,t)=>{const n={insightID:e},{restApi:s,reqType:r}=i_("scheduleInsight",n);return Wd(s,{method:r,body:JSON.stringify(t)})},updateScheduledInsight:(e,t,n)=>{const s={insightID:e,scheduleID:t},{restApi:r,reqType:a}=i_("updateScheduledInsight",s);return Wd(r,{method:a,body:JSON.stringify(n)})},deleteScheduledInsight:(e,t)=>{const n={insightID:e,scheduleID:t},{restApi:s,reqType:r}=i_("deleteScheduledInsight",n);return Wd(s,{method:r})},translateStrings:function(e){const{restApi:t,reqType:n}=i_("translateStrings");return Wd(t,{method:n,body:JSON.stringify(e)})}};const Vb=new class{addRoutes=e=>{return t=e,void TA.addRoutes(t);var t}};const kb=class{static registerModule(e,t,n){n[e]=()=>t}};const Bb=class{static getCaseEvent=()=>Object.freeze(Fs.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(Fs.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(Fs.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(Fs.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS);static getBulkProcessEvent=()=>Object.freeze(Fs.PUB_SUB_EVENTS.EVENT_BULKACTION);static getLocalActionProcessEvent=()=>Object.freeze(Fs.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION)};const $b=new class{constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},Gb={setTokens:e=>{Qd({tokenInfo:e}),Kd(e?.csrf&&!e?.access_token?{pzCTkn:e?.csrf}:{Authorization:`${e?.token_type} ${e?.access_token}`}),setTimeout((()=>fd.publish("updateSession",{updateStatus:"success"})),0)},revokeTokens:async()=>Ad(),getAuthInstance:e=>yd.init(e),setAuthorizationHeader:e=>{Kd({Authorization:e}),setTimeout((()=>fd.publish("updateSession",{updateStatus:"success"})),0)}};const Wb=new class{getDebouncedSubject(e){return(new rh).pipe(bO(e))}},Hb=(()=>{const e="[!#-'*+/0-9=?A-Z\\^_`a-z{|}~\\-]+",t="\\\\[\\x00-\\x7f]",n=`(?:${e}|${`"(?:[^\\r"\\\\\\x80-\\xff]|${t})*"`})`,s=`(?:${e}|${`\\[(?:[^\\r\\[\\]\\\\\\x80-\\xff]|${t})*\\]`})`;return new RegExp(`^${`${n}(?:\\.${n})*`}@${`${s}(?:\\.${s})*`}$`)})();const qb=(()=>{const e="[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+";return new RegExp(`^${`${`(?:${`${e}(?:\\.${e})*`}|"(?:[^\\x0d\\x22\\x5c]|\\\\[\\x00-\\x7f])+")`}@(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z]{2,63}`}$`)})();Yp.register("email",((e,{useRFC822Validation:t})=>{let n=null;const s=t?(r=e,Hb.test(r)):function(e){return qb.test(e)}(e);var r;return e&&!s&&(n="Enter a valid email address"),n})),Yp.register("integer",(e=>{let t=null;return e&&!/^(-)?\d+$/.test(e)&&(t="Invalid number"),t})),Yp.register("required",(e=>Array.isArray(e)&&0===e.length||null==e||""===e?"Cannot be blank":null)),Yp.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="Enter a valid url"),t})),setTimeout((()=>{const e="Enter a valid phone number";r.e(667).then(r.bind(r,816)).then((({parsePhoneNumberFromString:t})=>{Yp.register("phone",(n=>{let s=null;n&&!/^\+?\d+$/.test(n)&&(s=e);const r=n?.startsWith("+");if(n&&r){const r=t(n);r&&r.isPossible()&&n===r.number||(s=e)}return s}))}))}),js.PRIORITY.TRIVIAL);const zb=(e,t)=>{switch(t){case"invalid":return`Incorrect ${e}`;case"incomplete":return`Incomplete ${e}`;default:return null}};Yp.register("datetime",(e=>zb("date and time",e))),Yp.register("date",(e=>zb("date",e))),Yp.register("time",(e=>zb("time",e)));const Yb=e=>{for(const t of e)if(t?.error)return"Error with one or more files";return null};Yp.register("attachment",(e=>{let t=null;return e?("pyCount"in e&&Array.isArray(e.pxResults)?t=Yb(e.pxResults):Array.isArray(e)?t=Yb(e):"error"in e&&e.error&&(t="Error with one or more files"),t):t}));const Kb=()=>{const e={},t="undefined"!=typeof Intl?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0;t&&(e["user-timezone"]=t);const n="undefined"!=typeof navigator?navigator.language:void 0;return n&&(e["user-locale"]=n),e},Qb="createConversation",Jb="sendMessage",Xb="getConversations",Zb="getMessages",ev="createConversationForAgent",tv="sendMessageForAgent",nv="getCoach",sv=(e,t,n,s,r,a,o)=>{for(const e of o)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const i=rg();return o.push(i),tg(e,{queryPayload:Xb===e?{assistantID:t,contextID:n,pageSize:s,pageIndex:r}:{agentID:t,contextID:n,pageSize:s,pageIndex:r},cancelTokenSource:i,headers:Kb()},a).then((e=>(o.pop(),e)))},rv=(e,t,n,s,r)=>{for(const e of r)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const a=rg();return r.push(a),tg(e,{queryPayload:Zb===e?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n},cancelTokenSource:a,headers:Kb()},s).then((e=>(r.pop(),e)))},av=(e,t,n,s,r,a,o=!1)=>{for(const e of r)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const i=rg();return r.push(i),tg(e,{body:JSON.stringify({contextID:t,executeStarterQuestion:!1,...a&&a.isManualConfirmationSupported&&{capabilities:{tools:{isManualConfirmationSupported:!0}}},...e===ev&&o&&{showAgentRecommendations:o}}),cancelTokenSource:i,queryPayload:e===Qb?{assistantID:n}:{agentID:n},headers:Kb()},s).then((e=>(r.pop(),e)))},ov=(e,t,n,s,r,a,o)=>{const i={...s&&{request:s},...o&&o.additionalInstruction&&{additionalInstruction:o.additionalInstruction},...o&&o.isManualConfirmationSupported&&{capabilities:{tools:{isManualConfirmationSupported:!0}}},...o&&o.toolsReviewed&&o.toolsReviewed.length>0&&{toolsReviewed:o.toolsReviewed},...a&&a?.length>0&&{attachments:a}};return tg(e,{body:JSON.stringify(i),queryPayload:e===Jb?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n},headers:Kb()},r)},iv=(e,t,n,s,r,a,o,i)=>{const c={...s&&{request:s},...o&&o.additionalInstruction&&{additionalInstruction:o.additionalInstruction},...a&&a.length>0&&{attachments:a},...o&&o.toolsReviewed&&o.toolsReviewed.length>0&&{toolsReviewed:o.toolsReviewed},capabilities:{stream:{isEnabled:!0},...o&&o.isManualConfirmationSupported&&{tools:{isManualConfirmationSupported:!0}}},...o&&o.questionnaire&&{questionnaire:o.questionnaire}},l=e===Jb?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n},{restApi:u,reqType:d}=i_(e,l),p={method:d,headers:{Accept:"text/event-stream",...Kb()},body:JSON.stringify(c),responseType:"stream",adapter:"fetch",...i&&{signal:i.token}};return Wd(u,p,r)},cv=(e,t,n,s,r)=>{for(const e of s)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const a=rg();return s.push(a),tg(e,{queryPayload:e===nv?{assistantID:t,...r&&{contextID:r}}:{agentID:t,...r&&{contextID:r}},cancelTokenSource:a},n).then((e=>(s.pop(),e))).catch((e=>{throw s.pop(),e}))},lv={createConversation:(e,t,n,s=[])=>av(Qb,e,t,n,s),sendMessage:(e,t,n,s,r)=>r?.enableStreaming?iv(Jb,e,t,n,s,void 0,r):ov(Jb,e,t,n,s),createConversationForAgent:(e,t,n,s=[],r,a)=>av(ev,e,t,n,s,r,a),sendMessageForAgent:(e,t,n,s,r,a)=>a?.enableStreaming?iv(tv,e,t,n,s,r,a,a.cancelTokenSource):ov(tv,e,t,n,s,r,a),getAgent:(e,t,n,s=[])=>cv("getAgent",e,t,s,n),getCoach:(e,t,n,s=[])=>cv(nv,e,t,s,n),likeAgentMessage:(e,t,n,s)=>{const r={queryPayload:{agentID:e,conversationID:t,messageID:n},headers:Kb()};return tg("likeAgentMessage",r,s)},unLikeAgentMessage:(e,t,n,s,r="")=>{const a={queryPayload:{agentID:e,conversationID:t,messageID:n},body:JSON.stringify({feedbackText:r}),headers:Kb()};return tg("dislikeAgentMessage",a,s)},getConversations:(e,t,n,s,r,a=[])=>sv(Xb,e,t,n,s,r,a),getConversationsForAgent:(e,t,n,s,r,a=[])=>sv("getConversationsForAgent",e,t,n,s,r,a),getMessages:(e,t,n,s=[])=>rv(Zb,e,t,n,s),getMessagesForAgent:(e,t,n,s=[])=>rv("getMessagesForAgent",e,t,n,s)};const uv=new class{async rewriteText(e){const{originalText:t,rewriteAction:n,additionalInstructions:s,context:r}=e,a=PA.isInfinityRuntime(),o=PA.getRewriteGenAIDP()??Ls.getDefaultQualifiedName("D_RewriteWithAI"),i={OriginalText:t,RewriteAction:n,AdditionalInstructions:s||""};try{let e,t;if(a){const t=await af.getPageDataAsync(o,r,i),n=Object.fromEntries(Object.entries(t)).pyResponseData;e="string"==typeof n?n:void 0}else{const n=(await af.getDataAsync(o,r,i)).data[0],s=n[Ls.getDefaultQualifiedName("Content")];e="string"==typeof s?s:void 0;const a=n[Ls.getDefaultQualifiedName("ErrorMessage")];t="string"==typeof a?a:void 0}return e?{success:!0,rewrittenText:e}:{success:!1,errorMessage:t||"AI rewrite failed: No rewritten text returned"}}catch(e){return{success:!1,errorMessage:e instanceof Error?e.message:"An unexpected error occurred during AI rewrite"}}}};const dv=class{classAccessMap=new Map;constructor(){const e=PA.getClassesAccessList();0!==e.length?this.classAccessMap=e.reduce(((e,t)=>(e.set(t.pyClassName,t.pyHasCreateAccess),e)),new Map):this.classAccessMap=PA.getCaseTypeList().reduce(((e,t)=>(e.set(t.pyWorkTypeImplementationClassName,t.hasCreateAccess??!0),e)),new Map)}hasCreateAccess(e){return this.classAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}};const pv=class{static AUTOSAVE_SAVE_STATUS=DE;static isAutosaveEnabledForContext(e){return GE(e)}static subscribeAutosaveStatus(e,t){return((e,t)=>{let n=xE.get(e);return n||(n=new Set,xE.set(e,n)),n.add(t),()=>{const n=xE.get(e);n&&(n.delete(t),0===n.size&&xE.delete(e))}})(e,t)}static notifyChange(e,t,n){GE(e)&&(((e,t,n)=>{let s=wE.get(e);s||(s=new Map,wE.set(e,s)),s.set(t,n)})(e,t,n),zE(e))}};class gv{static behaviorOverrides={};getPersonalizationUtils=Tb;constructor(){gv.behaviorOverrides={}}getPCoreVersion=()=>"26.1.2";onPCoreReady=e=>JR.onPCoreReady(e);onPCoreCleanup=e=>JR.onPCoreCleanup(e);getComponentsRegistry=()=>JR.getComponentsRegistry();checkIfSemanticURL=()=>JR.checkIfSemanticURL();isValidSemanticURL=()=>(()=>{if(A_()){const e=TA.processUrl(CA(),!0);return!!TA._getMatchedRouteInRoutingTable(e)}return!1})();getRoutingUtils=()=>Vb;getViewResources=()=>i;configureForBrowserBookmark=e=>JR.configureForBrowserBookmark(e);getStore=()=>kC();resetStore=()=>tS();getMessageManager=()=>pd;getCoexistenceManager=()=>GR;getStoreValue=(e,t,n)=>HC(e,t,n);getContainerUtils=()=>c;getAnnotationUtils=()=>zg;getFieldUtils=()=>ep;getFieldDefaultUtils=()=>bp;getAssetLoader=()=>hg;getAttachmentUtils=()=>Bp;getViewRuleApi=()=>sb;getFeedUtils=()=>db;getTagUtils=()=>pb;getGenAIAssistantUtils=()=>lv;getGenAIUtils=()=>uv;getStakeholderUtils=()=>hb;getUserApi=()=>cb;getCaseFollowerApi=()=>ab;getCaseUtils=()=>YI;getStateUtils=()=>Hf;getRelatedCasesApi=()=>ob;getDataApi=()=>yf;getDataApiUtils=()=>Ch;getAnalyticsUtils=()=>jb;getLocaleUtils=e=>{const t=e??PA.getLocale()??"en-US";return iC(t)};registerLocaleManager=e=>{const t=this.getLocaleUtils();Object.keys(e).forEach((n=>{t[n]=e[n]}))};setBehaviorOverrides=e=>{gv.behaviorOverrides=e};setBehaviorOverride=(e,t)=>{gv.behaviorOverrides[e]=t};getBehaviorOverrides=()=>gv.behaviorOverrides;getBehaviorOverride=e=>gv.behaviorOverrides[e];getAsynchronousUtils=()=>Wb;createPConnect=e=>Cm(e);getPubSubUtils=()=>fd;registerComponentCreator=e=>{Sm(e)};getConstants=()=>Object.freeze(Fs);getResolvedConstantValue=e=>js.getProperty(e);getEvents=()=>Bb;getRestClient=()=>o;getMashupApi=()=>WR;getEnvironmentInfo=()=>PA;switchLocale=e=>jR(e);getRuntimeParamsAPI=()=>Tf;getSemanticUrlUtils=()=>bg;getRemoteCaseUtils=()=>Bs;getNavigationUtils=()=>Ng;registerModule=(e,t)=>kb.registerModule(e,t,this);getErrorHandler=()=>$b;getFormUtils=()=>bI;getAutosaveUtils=()=>pv;getMessagingServiceManager=()=>sf;getMetadataUtils=()=>l;getDataPageUtils=()=>af;getDataTypeUtils=()=>qg;getCascadeManager=()=>UC;isDeepEqual=(e,t)=>Xt(e,t);getAuthUtils=()=>Gb;getDebugger=()=>Id;getDeferLoadManager=()=>yh;getExpressionEngine=()=>n;getActionsSequencer=()=>xf;getRefreshManager=()=>Cf;getInitialiser=()=>nb;getBootstrapUtils=()=>JR;getContextTreeManager=()=>Zu;getAccessPrivilege=()=>dv.getInstance();getObjectTransformer=()=>Us;getAllStateMachines=(e,t,n)=>t&&n?vI.getAllStateMachines(e,t,n):vI.getAllStateMachinesByContext(e);isNamespaceEnabled=()=>Ls.isNamespaceEnabled();getQualifiedName=(e,t)=>Ls.getQualifiedName(e,t);getDefaultQualifiedName=e=>this.getQualifiedName(e,"PegaPlatform");getNameSpaceUtils=()=>Ls;getNetworkUtils=()=>md;getMashupBridge=()=>p;getConfirmDialogService=()=>Zm}const hv=new gv;globalThis.PCore=hv})()})();
|
|
2
|
+
//# sourceMappingURL=constellation-core-web.js.map
|