@pega/constellationjs 25.1.2 → 25.1.3

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.
Files changed (33) hide show
  1. package/README.md +3 -2
  2. package/dist/constellation-core-react-native.js +1 -1
  3. package/dist/constellation-core-react-native.js.br +0 -0
  4. package/dist/constellation-core-react-native.js.gz +0 -0
  5. package/dist/constellation-core-react-native.js.map +1 -1
  6. package/dist/constellation-core-web.js +1 -1
  7. package/dist/constellation-core-web.js.br +0 -0
  8. package/dist/constellation-core-web.js.gz +0 -0
  9. package/dist/constellation-core-web.js.map +1 -1
  10. package/dist/constellation-core.237eec7c.js +2 -0
  11. package/dist/constellation-core.237eec7c.js.br +0 -0
  12. package/dist/constellation-core.237eec7c.js.gz +0 -0
  13. package/dist/constellation-core.237eec7c.js.map +1 -0
  14. package/dist/constellation-core.json +1 -1
  15. package/dist/js/libphonenumber-web.js +1 -1
  16. package/dist/js/libphonenumber-web.js.br +0 -0
  17. package/dist/js/libphonenumber-web.js.gz +0 -0
  18. package/dist/js/libphonenumber-web.js.map +1 -1
  19. package/dist/js/libphonenumber.a5a4a2d2.js +2 -0
  20. package/dist/js/libphonenumber.a5a4a2d2.js.br +0 -0
  21. package/dist/js/libphonenumber.a5a4a2d2.js.gz +0 -0
  22. package/dist/js/libphonenumber.a5a4a2d2.js.map +1 -0
  23. package/dist/lib_asset.json +1 -1
  24. package/package.json +1 -1
  25. package/dist/constellation-core.81b41fe3.js +0 -2
  26. package/dist/constellation-core.81b41fe3.js.br +0 -0
  27. package/dist/constellation-core.81b41fe3.js.gz +0 -0
  28. package/dist/constellation-core.81b41fe3.js.map +0 -1
  29. package/dist/js/libphonenumber.4924dfce.js +0 -2
  30. package/dist/js/libphonenumber.4924dfce.js.br +0 -0
  31. package/dist/js/libphonenumber.4924dfce.js.gz +0 -0
  32. package/dist/js/libphonenumber.4924dfce.js.map +0 -1
  33. /package/dist/{constellation-core.81b41fe3.js.LICENSE.txt → constellation-core.237eec7c.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ var e,t,n={631:(e,t,n)=>{var r="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",o="[object Function]",i="[object GeneratorFunction]",c=/^\[object .+?Constructor\]$/,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,d=l||u||Function("return this")();function p(e,t){return!!(e?e.length:0)&&function(e,t,n){if(t!=t)return function(e,t,n,r){var s=e.length,a=n+(r?1:-1);for(;r?a--:++a<s;)if(t(e[a],a,e))return a;return-1}(e,f,n);var r=n-1,s=e.length;for(;++r<s;)if(e[r]===t)return r;return-1}(e,t,0)>-1}function h(e,t,n){for(var r=-1,s=e?e.length:0;++r<s;)if(n(t,e[r]))return!0;return!1}function g(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e}function f(e){return e!=e}function m(e,t){return e.has(t)}var I,y=Array.prototype,E=Function.prototype,A=Object.prototype,_=d["__core-js_shared__"],C=(I=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"",S=E.toString,T=A.hasOwnProperty,N=A.toString,P=RegExp("^"+S.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=d.Symbol,D=A.propertyIsEnumerable,R=y.splice,b=O?O.isConcatSpreadable:void 0,v=Math.max,x=G(d,"Map"),w=G(Object,"create");function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e){var t=-1,n=e?e.length:0;for(this.__data__=new F;++t<n;)this.add(e[t])}function j(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function k(e,t,n,r){var s,a=-1,o=p,i=!0,c=e.length,l=[],u=t.length;if(!c)return l;n&&(t=function(e,t){for(var n=-1,r=e?e.length:0,s=Array(r);++n<r;)s[n]=t(e[n],n,e);return s}(t,(s=n,function(e){return s(e)}))),r?(o=h,i=!1):t.length>=200&&(o=m,i=!1,t=new U(t));e:for(;++a<c;){var d=e[a],g=n?n(d):d;if(d=r||0!==d?d:0,i&&g==g){for(var f=u;f--;)if(t[f]===g)continue e;l.push(d)}else o(t,g,r)||l.push(d)}return l}function V(e,t,n,r,s){var a=-1,o=e.length;for(n||(n=W),s||(s=[]);++a<o;){var i=e[a];t>0&&n(i)?t>1?V(i,t-1,n,r,s):g(s,i):r||(s[s.length]=i)}return s}function $(e){if(!Q(e)||(t=e,C&&C in t))return!1;var t,n=X(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?P:c;return n.test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function B(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return $(n)?n:void 0}function W(e){return Y(e)||function(e){return J(e)&&T.call(e,"callee")&&(!D.call(e,"callee")||N.call(e)==a)}(e)||!!(b&&e&&e[b])}M.prototype.clear=function(){this.__data__=w?w(null):{}},M.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},M.prototype.get=function(e){var t=this.__data__;if(w){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},M.prototype.has=function(e){var t=this.__data__;return w?void 0!==t[e]:T.call(t,e)},M.prototype.set=function(e,t){return this.__data__[e]=w&&void 0===t?r:t,this},L.prototype.clear=function(){this.__data__=[]},L.prototype.delete=function(e){var t=this.__data__,n=j(t,e);return!(n<0)&&(n==t.length-1?t.pop():R.call(t,n,1),!0)},L.prototype.get=function(e){var t=this.__data__,n=j(t,e);return n<0?void 0:t[n][1]},L.prototype.has=function(e){return j(this.__data__,e)>-1},L.prototype.set=function(e,t){var n=this.__data__,r=j(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},F.prototype.clear=function(){this.__data__={hash:new M,map:new(x||L),string:new M}},F.prototype.delete=function(e){return B(this,e).delete(e)},F.prototype.get=function(e){return B(this,e).get(e)},F.prototype.has=function(e){return B(this,e).has(e)},F.prototype.set=function(e,t){return B(this,e).set(e,t),this},U.prototype.add=U.prototype.push=function(e){return this.__data__.set(e,r),this},U.prototype.has=function(e){return this.__data__.has(e)};var H,q,z=(H=function(e,t){return J(e)?k(e,V(t,1,J,!0)):[]},q=v(void 0===q?H.length-1:q,0),function(){for(var e=arguments,t=-1,n=v(e.length-q,0),r=Array(n);++t<n;)r[t]=e[q+t];t=-1;for(var s=Array(q+1);++t<q;)s[t]=e[t];return s[q]=r,function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(H,this,s)});var Y=Array.isArray;function K(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}(e.length)&&!X(e)}function J(e){return function(e){return!!e&&"object"==typeof e}(e)&&K(e)}function X(e){var t=Q(e)?N.call(e):"";return t==o||t==i}function Q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=z},188:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a="[object Function]",o="[object GeneratorFunction]",i="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,u=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,g="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,m=g||f||Function("return this")();var I,y=Array.prototype,E=Function.prototype,A=Object.prototype,_=m["__core-js_shared__"],C=(I=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"",S=E.toString,T=A.hasOwnProperty,N=A.toString,P=RegExp("^"+S.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=m.Symbol,D=y.splice,R=V(m,"Map"),b=V(Object,"create"),v=O?O.prototype:void 0,x=v?v.toString:void 0;function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function U(e,t){var n;t=function(e,t){if(W(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||q(e))return!0;return l.test(e)||!c.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:W(n=t)?n:$(n);for(var r=0,s=t.length;null!=e&&r<s;)e=e[B(t[r++])];return r&&r==s?e:void 0}function j(e){if(!H(e)||(t=e,C&&C in t))return!1;var t,n=function(e){var t=H(e)?N.call(e):"";return t==a||t==o}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?P:h;return n.test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function k(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function V(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return j(n)?n:void 0}w.prototype.clear=function(){this.__data__=b?b(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(b){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return b?void 0!==t[e]:T.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=b&&void 0===t?r:t,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(e){var t=this.__data__,n=F(t,e);return!(n<0)&&(n==t.length-1?t.pop():D.call(t,n,1),!0)},M.prototype.get=function(e){var t=this.__data__,n=F(t,e);return n<0?void 0:t[n][1]},M.prototype.has=function(e){return F(this.__data__,e)>-1},M.prototype.set=function(e,t){var n=this.__data__,r=F(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new w,map:new(R||M),string:new w}},L.prototype.delete=function(e){return k(this,e).delete(e)},L.prototype.get=function(e){return k(this,e).get(e)},L.prototype.has=function(e){return k(this,e).has(e)},L.prototype.set=function(e,t){return k(this,e).set(e,t),this};var $=G((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(q(e))return x?x.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(d,(function(e,t,r,s){n.push(r?s.replace(p,"$1"):t||e)})),n}));function B(e){if("string"==typeof e||q(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function G(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(G.Cache||L),n}G.Cache=L;var W=Array.isArray;function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function q(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&N.call(e)==i}e.exports=function(e,t,n){var r=null==e?void 0:U(e,t);return void 0===r?n:r}},928:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a=9007199254740991,o="[object Arguments]",i="[object Function]",c="[object GeneratorFunction]",l="[object Symbol]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d=/^\w*$/,p=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,g=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,m=/^(?:0|[1-9]\d*)$/,I="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,y="object"==typeof self&&self&&self.Object===Object&&self,E=I||y||Function("return this")();var A,_=Array.prototype,C=Function.prototype,S=Object.prototype,T=E["__core-js_shared__"],N=(A=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",P=C.toString,O=S.hasOwnProperty,D=S.toString,R=RegExp("^"+P.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=E.Symbol,v=S.propertyIsEnumerable,x=_.splice,w=W(E,"Map"),M=W(Object,"create"),L=b?b.prototype:void 0,F=L?L.toString:void 0;function U(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function k(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function V(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function $(e,t){return null!=e&&O.call(e,t)}function B(e){if(!Q(e)||(t=e,N&&N in t))return!1;var t,n=J(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?R:f;return n.test(function(e){if(null!=e){try{return P.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function G(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function W(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return B(n)?n:void 0}function H(e,t,n){var r;t=function(e,t){if(K(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||ee(e))return!0;return d.test(e)||!u.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:K(r=t)?r:q(r);for(var s,i=-1,c=t.length;++i<c;){var l=z(t[i]);if(!(s=null!=e&&n(e,l)))break;e=e[l]}return s||!!(c=e?e.length:0)&&X(c)&&function(e,t){return t=null==t?a:t,!!t&&("number"==typeof e||m.test(e))&&e>-1&&e%1==0&&e<t}(l,c)&&(K(e)||function(e){return function(e){return Z(e)&&function(e){return null!=e&&X(e.length)&&!J(e)}(e)}(e)&&O.call(e,"callee")&&(!v.call(e,"callee")||D.call(e)==o)}(e))}U.prototype.clear=function(){this.__data__=M?M(null):{}},U.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},U.prototype.get=function(e){var t=this.__data__;if(M){var n=t[e];return n===r?void 0:n}return O.call(t,e)?t[e]:void 0},U.prototype.has=function(e){var t=this.__data__;return M?void 0!==t[e]:O.call(t,e)},U.prototype.set=function(e,t){return this.__data__[e]=M&&void 0===t?r:t,this},j.prototype.clear=function(){this.__data__=[]},j.prototype.delete=function(e){var t=this.__data__,n=V(t,e);return!(n<0)&&(n==t.length-1?t.pop():x.call(t,n,1),!0)},j.prototype.get=function(e){var t=this.__data__,n=V(t,e);return n<0?void 0:t[n][1]},j.prototype.has=function(e){return V(this.__data__,e)>-1},j.prototype.set=function(e,t){var n=this.__data__,r=V(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},k.prototype.clear=function(){this.__data__={hash:new U,map:new(w||j),string:new U}},k.prototype.delete=function(e){return G(this,e).delete(e)},k.prototype.get=function(e){return G(this,e).get(e)},k.prototype.has=function(e){return G(this,e).has(e)},k.prototype.set=function(e,t){return G(this,e).set(e,t),this};var q=Y((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ee(e))return F?F.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return p.test(e)&&n.push(""),e.replace(h,(function(e,t,r,s){n.push(r?s.replace(g,"$1"):t||e)})),n}));function z(e){if("string"==typeof e||ee(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function Y(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(Y.Cache||k),n}Y.Cache=k;var K=Array.isArray;function J(e){var t=Q(e)?D.call(e):"";return t==i||t==c}function X(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Z(e){return!!e&&"object"==typeof e}function ee(e){return"symbol"==typeof e||Z(e)&&D.call(e)==l}e.exports=function(e,t){return null!=e&&H(e,t,$)}},529:(e,t,n)=>{e=n.nmd(e);var r=9007199254740991,s="[object Arguments]",a="[object Function]",o="[object GeneratorFunction]",i="[object Map]",c="[object Promise]",l="[object Set]",u="[object WeakMap]",d="[object DataView]",p=/^\[object .+?Constructor\]$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,f=h||g||Function("return this")(),m=t&&!t.nodeType&&t,I=m&&e&&!e.nodeType&&e,y=I&&I.exports===m;var E,A,_,C=Function.prototype,S=Object.prototype,T=f["__core-js_shared__"],N=(E=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",P=C.toString,O=S.hasOwnProperty,D=S.toString,R=RegExp("^"+P.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=y?f.Buffer:void 0,v=S.propertyIsEnumerable,x=b?b.isBuffer:void 0,w=(A=Object.keys,_=Object,function(e){return A(_(e))}),M=q(f,"DataView"),L=q(f,"Map"),F=q(f,"Promise"),U=q(f,"Set"),j=q(f,"WeakMap"),k=!v.call({valueOf:1},"valueOf"),V=Y(M),$=Y(L),B=Y(F),G=Y(U),W=Y(j);function H(e){if(!ee(e)||function(e){return!!N&&N in e}(e))return!1;var t=Z(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?R:p;return t.test(Y(e))}function q(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return H(n)?n:void 0}var z=function(e){return D.call(e)};function Y(e){if(null!=e){try{return P.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function K(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&X(e)}(e)&&O.call(e,"callee")&&(!v.call(e,"callee")||D.call(e)==s)}(M&&z(new M(new ArrayBuffer(1)))!=d||L&&z(new L)!=i||F&&z(F.resolve())!=c||U&&z(new U)!=l||j&&z(new j)!=u)&&(z=function(e){var t=D.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?Y(n):void 0;if(r)switch(r){case V:return d;case $:return i;case B:return c;case G:return l;case W:return u}return t});var J=Array.isArray;function X(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Z(e)}var Q=x||function(){return!1};function Z(e){var t=ee(e)?D.call(e):"";return t==a||t==o}function ee(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(X(e)&&(J(e)||"string"==typeof e||"function"==typeof e.splice||Q(e)||K(e)))return!e.length;var t=z(e);if(t==i||t==l)return!e.size;if(k||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||S)}(e))return!w(e).length;for(var n in e)if(O.call(e,n))return!1;return!0}},216:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",s=1,a=2,o=9007199254740991,i="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",p="[object Error]",h="[object Function]",g="[object GeneratorFunction]",f="[object Map]",m="[object Number]",I="[object Null]",y="[object Object]",E="[object Promise]",A="[object Proxy]",_="[object RegExp]",C="[object Set]",S="[object String]",T="[object Symbol]",N="[object Undefined]",P="[object WeakMap]",O="[object ArrayBuffer]",D="[object DataView]",R=/^\[object .+?Constructor\]$/,b=/^(?:0|[1-9]\d*)$/,v={};v["[object Float32Array]"]=v["[object Float64Array]"]=v["[object Int8Array]"]=v["[object Int16Array]"]=v["[object Int32Array]"]=v["[object Uint8Array]"]=v["[object Uint8ClampedArray]"]=v["[object Uint16Array]"]=v["[object Uint32Array]"]=!0,v[i]=v[c]=v[O]=v[u]=v[D]=v[d]=v[p]=v[h]=v[f]=v[m]=v[y]=v[_]=v[C]=v[S]=v[P]=!1;var x="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,w="object"==typeof self&&self&&self.Object===Object&&self,M=x||w||Function("return this")(),L=t&&!t.nodeType&&t,F=L&&e&&!e.nodeType&&e,U=F&&F.exports===L,j=U&&x.process,k=function(){try{return j&&j.binding&&j.binding("util")}catch(e){}}(),V=k&&k.isTypedArray;function $(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function B(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function G(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var W,H,q,z=Array.prototype,Y=Function.prototype,K=Object.prototype,J=M["__core-js_shared__"],X=Y.toString,Q=K.hasOwnProperty,Z=(W=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||""))?"Symbol(src)_1."+W:"",ee=K.toString,te=RegExp("^"+X.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=U?M.Buffer:void 0,re=M.Symbol,se=M.Uint8Array,ae=K.propertyIsEnumerable,oe=z.splice,ie=re?re.toStringTag:void 0,ce=Object.getOwnPropertySymbols,le=ne?ne.isBuffer:void 0,ue=(H=Object.keys,q=Object,function(e){return H(q(e))}),de=ke(M,"DataView"),pe=ke(M,"Map"),he=ke(M,"Promise"),ge=ke(M,"Set"),fe=ke(M,"WeakMap"),me=ke(Object,"create"),Ie=Ge(de),ye=Ge(pe),Ee=Ge(he),Ae=Ge(ge),_e=Ge(fe),Ce=re?re.prototype:void 0,Se=Ce?Ce.valueOf:void 0;function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Pe;++t<n;)this.add(e[t])}function De(e){var t=this.__data__=new Ne(e);this.size=t.size}function Re(e,t){var n=qe(e),r=!n&&He(e),s=!n&&!r&&ze(e),a=!n&&!r&&!s&&Qe(e),o=n||r||s||a,i=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=i.length;for(var l in e)!t&&!Q.call(e,l)||o&&("length"==l||s&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Be(l,c))||i.push(l);return i}function be(e,t){for(var n=e.length;n--;)if(We(e[n][0],t))return n;return-1}function ve(e){return null==e?void 0===e?N:I:ie&&ie in Object(e)?function(e){var t=Q.call(e,ie),n=e[ie];try{e[ie]=void 0;var r=!0}catch(e){}var s=ee.call(e);r&&(t?e[ie]=n:delete e[ie]);return s}(e):function(e){return ee.call(e)}(e)}function xe(e){return Xe(e)&&ve(e)==i}function we(e,t,n,r,o){return e===t||(null==e||null==t||!Xe(e)&&!Xe(t)?e!=e&&t!=t:function(e,t,n,r,o,l){var h=qe(e),g=qe(t),I=h?c:$e(e),E=g?c:$e(t),A=(I=I==i?y:I)==y,N=(E=E==i?y:E)==y,P=I==E;if(P&&ze(e)){if(!ze(t))return!1;h=!0,A=!1}if(P&&!A)return l||(l=new De),h||Qe(e)?Fe(e,t,n,r,o,l):function(e,t,n,r,o,i,c){switch(n){case D:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!i(new se(e),new se(t)));case u:case d:case m:return We(+e,+t);case p:return e.name==t.name&&e.message==t.message;case _:case S:return e==t+"";case f:var l=B;case C:var h=r&s;if(l||(l=G),e.size!=t.size&&!h)return!1;var g=c.get(e);if(g)return g==t;r|=a,c.set(e,t);var I=Fe(l(e),l(t),r,o,i,c);return c.delete(e),I;case T:if(Se)return Se.call(e)==Se.call(t)}return!1}(e,t,I,n,r,o,l);if(!(n&s)){var R=A&&Q.call(e,"__wrapped__"),b=N&&Q.call(t,"__wrapped__");if(R||b){var v=R?e.value():e,x=b?t.value():t;return l||(l=new De),o(v,x,n,r,l)}}if(!P)return!1;return l||(l=new De),function(e,t,n,r,a,o){var i=n&s,c=Ue(e),l=c.length,u=Ue(t),d=u.length;if(l!=d&&!i)return!1;var p=l;for(;p--;){var h=c[p];if(!(i?h in t:Q.call(t,h)))return!1}var g=o.get(e);if(g&&o.get(t))return g==t;var f=!0;o.set(e,t),o.set(t,e);var m=i;for(;++p<l;){var I=e[h=c[p]],y=t[h];if(r)var E=i?r(y,I,h,t,e,o):r(I,y,h,e,t,o);if(!(void 0===E?I===y||a(I,y,n,r,o):E)){f=!1;break}m||(m="constructor"==h)}if(f&&!m){var A=e.constructor,_=t.constructor;A==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof A&&A instanceof A&&"function"==typeof _&&_ instanceof _||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,o,l)}(e,t,n,r,we,o))}function Me(e){return!(!Je(e)||function(e){return!!Z&&Z in e}(e))&&(Ye(e)?te:R).test(Ge(e))}function Le(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||K,t!==r)return ue(e);var t,n,r,s=[];for(var a in Object(e))Q.call(e,a)&&"constructor"!=a&&s.push(a);return s}function Fe(e,t,n,r,o,i){var c=n&s,l=e.length,u=t.length;if(l!=u&&!(c&&u>l))return!1;var d=i.get(e);if(d&&i.get(t))return d==t;var p=-1,h=!0,g=n&a?new Oe:void 0;for(i.set(e,t),i.set(t,e);++p<l;){var f=e[p],m=t[p];if(r)var I=c?r(m,f,p,t,e,i):r(f,m,p,e,t,i);if(void 0!==I){if(I)continue;h=!1;break}if(g){if(!$(t,(function(e,t){if(s=t,!g.has(s)&&(f===e||o(f,e,n,r,i)))return g.push(t);var s}))){h=!1;break}}else if(f!==m&&!o(f,m,n,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h}function Ue(e){return function(e,t,n){var r=t(e);return qe(e)?r:function(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e}(r,n(e))}(e,Ze,Ve)}function je(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function ke(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Me(n)?n:void 0}Te.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},Te.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Te.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===r?void 0:n}return Q.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},Te.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?r:t,this},Ne.prototype.clear=function(){this.__data__=[],this.size=0},Ne.prototype.delete=function(e){var t=this.__data__,n=be(t,e);return!(n<0)&&(n==t.length-1?t.pop():oe.call(t,n,1),--this.size,!0)},Ne.prototype.get=function(e){var t=this.__data__,n=be(t,e);return n<0?void 0:t[n][1]},Ne.prototype.has=function(e){return be(this.__data__,e)>-1},Ne.prototype.set=function(e,t){var n=this.__data__,r=be(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Pe.prototype.clear=function(){this.size=0,this.__data__={hash:new Te,map:new(pe||Ne),string:new Te}},Pe.prototype.delete=function(e){var t=je(this,e).delete(e);return this.size-=t?1:0,t},Pe.prototype.get=function(e){return je(this,e).get(e)},Pe.prototype.has=function(e){return je(this,e).has(e)},Pe.prototype.set=function(e,t){var n=je(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Oe.prototype.add=Oe.prototype.push=function(e){return this.__data__.set(e,r),this},Oe.prototype.has=function(e){return this.__data__.has(e)},De.prototype.clear=function(){this.__data__=new Ne,this.size=0},De.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},De.prototype.get=function(e){return this.__data__.get(e)},De.prototype.has=function(e){return this.__data__.has(e)},De.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ne){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Pe(r)}return n.set(e,t),this.size=n.size,this};var Ve=ce?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,s=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[s++]=o)}return a}(ce(e),(function(t){return ae.call(e,t)})))}:function(){return[]},$e=ve;function Be(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||b.test(e))&&e>-1&&e%1==0&&e<t}function Ge(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function We(e,t){return e===t||e!=e&&t!=t}(de&&$e(new de(new ArrayBuffer(1)))!=D||pe&&$e(new pe)!=f||he&&$e(he.resolve())!=E||ge&&$e(new ge)!=C||fe&&$e(new fe)!=P)&&($e=function(e){var t=ve(e),n=t==y?e.constructor:void 0,r=n?Ge(n):"";if(r)switch(r){case Ie:return D;case ye:return f;case Ee:return E;case Ae:return C;case _e:return P}return t});var He=xe(function(){return arguments}())?xe:function(e){return Xe(e)&&Q.call(e,"callee")&&!ae.call(e,"callee")},qe=Array.isArray;var ze=le||function(){return!1};function Ye(e){if(!Je(e))return!1;var t=ve(e);return t==h||t==g||t==l||t==A}function Ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Je(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Xe(e){return null!=e&&"object"==typeof e}var Qe=V?function(e){return function(t){return e(t)}}(V):function(e){return Xe(e)&&Ke(e.length)&&!!v[ve(e)]};function Ze(e){return null!=(t=e)&&Ke(t.length)&&!Ye(t)?Re(e):Le(e);var t}e.exports=function(e,t){return we(e,t)}},692:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",o="[object AsyncFunction]",i="[object Function]",c="[object GeneratorFunction]",l="[object Null]",u="[object Object]",d="[object Proxy]",p="[object Undefined]",h=/^\[object .+?Constructor\]$/,g=/^(?:0|[1-9]\d*)$/,f={};f["[object Float32Array]"]=f["[object Float64Array]"]=f["[object Int8Array]"]=f["[object Int16Array]"]=f["[object Int32Array]"]=f["[object Uint8Array]"]=f["[object Uint8ClampedArray]"]=f["[object Uint16Array]"]=f["[object Uint32Array]"]=!0,f[a]=f["[object Array]"]=f["[object ArrayBuffer]"]=f["[object Boolean]"]=f["[object DataView]"]=f["[object Date]"]=f["[object Error]"]=f[i]=f["[object Map]"]=f["[object Number]"]=f[u]=f["[object RegExp]"]=f["[object Set]"]=f["[object String]"]=f["[object WeakMap]"]=!1;var m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,I="object"==typeof self&&self&&self.Object===Object&&self,y=m||I||Function("return this")(),E=t&&!t.nodeType&&t,A=E&&e&&!e.nodeType&&e,_=A&&A.exports===E,C=_&&m.process,S=function(){try{var e=A&&A.require&&A.require("util").types;return e||C&&C.binding&&C.binding("util")}catch(e){}}(),T=S&&S.isTypedArray;var N,P,O,D=Array.prototype,R=Function.prototype,b=Object.prototype,v=y["__core-js_shared__"],x=R.toString,w=b.hasOwnProperty,M=(N=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+N:"",L=b.toString,F=x.call(Object),U=RegExp("^"+x.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=_?y.Buffer:void 0,k=y.Symbol,V=y.Uint8Array,$=j?j.allocUnsafe:void 0,B=(P=Object.getPrototypeOf,O=Object,function(e){return P(O(e))}),G=Object.create,W=b.propertyIsEnumerable,H=D.splice,q=k?k.toStringTag:void 0,z=function(){try{var e=Ee(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Y=j?j.isBuffer:void 0,K=Math.max,J=Date.now,X=Ee(y,"Map"),Q=Ee(Object,"create"),Z=function(){function e(){}return function(t){if(!ve(t))return{};if(G)return G(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function re(e){var t=this.__data__=new te(e);this.size=t.size}function se(e,t){var n=Pe(e),r=!n&&Ne(e),s=!n&&!r&&De(e),a=!n&&!r&&!s&&we(e),o=n||r||s||a,i=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=i.length;for(var l in e)!t&&!w.call(e,l)||o&&("length"==l||s&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ae(l,c))||i.push(l);return i}function ae(e,t,n){(void 0!==n&&!Te(e[t],n)||void 0===n&&!(t in e))&&ce(e,t,n)}function oe(e,t,n){var r=e[t];w.call(e,t)&&Te(r,n)&&(void 0!==n||t in e)||ce(e,t,n)}function ie(e,t){for(var n=e.length;n--;)if(Te(e[n][0],t))return n;return-1}function ce(e,t,n){"__proto__"==t&&z?z(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}ee.prototype.clear=function(){this.__data__=Q?Q(null):{},this.size=0},ee.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ee.prototype.get=function(e){var t=this.__data__;if(Q){var n=t[e];return n===r?void 0:n}return w.call(t,e)?t[e]:void 0},ee.prototype.has=function(e){var t=this.__data__;return Q?void 0!==t[e]:w.call(t,e)},ee.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Q&&void 0===t?r:t,this},te.prototype.clear=function(){this.__data__=[],this.size=0},te.prototype.delete=function(e){var t=this.__data__,n=ie(t,e);return!(n<0)&&(n==t.length-1?t.pop():H.call(t,n,1),--this.size,!0)},te.prototype.get=function(e){var t=this.__data__,n=ie(t,e);return n<0?void 0:t[n][1]},te.prototype.has=function(e){return ie(this.__data__,e)>-1},te.prototype.set=function(e,t){var n=this.__data__,r=ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ne.prototype.clear=function(){this.size=0,this.__data__={hash:new ee,map:new(X||te),string:new ee}},ne.prototype.delete=function(e){var t=ye(this,e).delete(e);return this.size-=t?1:0,t},ne.prototype.get=function(e){return ye(this,e).get(e)},ne.prototype.has=function(e){return ye(this,e).has(e)},ne.prototype.set=function(e,t){var n=ye(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},re.prototype.clear=function(){this.__data__=new te,this.size=0},re.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var n=this.__data__;if(n instanceof te){var r=n.__data__;if(!X||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ne(r)}return n.set(e,t),this.size=n.size,this};var le,ue=function(e,t,n){for(var r=-1,s=Object(e),a=n(e),o=a.length;o--;){var i=a[le?o:++r];if(!1===t(s[i],i,s))break}return e};function de(e){return null==e?void 0===e?p:l:q&&q in Object(e)?function(e){var t=w.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(e){}var s=L.call(e);r&&(t?e[q]=n:delete e[q]);return s}(e):function(e){return L.call(e)}(e)}function pe(e){return xe(e)&&de(e)==a}function he(e){return!(!ve(e)||function(e){return!!M&&M in e}(e))&&(Re(e)?U:h).test(function(e){if(null!=e){try{return x.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function ge(e){if(!ve(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=_e(e),n=[];for(var r in e)("constructor"!=r||!t&&w.call(e,r))&&n.push(r);return n}function fe(e,t,n,r,s){e!==t&&ue(t,(function(a,o){if(s||(s=new re),ve(a))!function(e,t,n,r,s,a,o){var i=Ce(e,n),c=Ce(t,n),l=o.get(c);if(l)return void ae(e,n,l);var d=a?a(i,c,n+"",e,t,o):void 0,p=void 0===d;if(p){var h=Pe(c),g=!h&&De(c),f=!h&&!g&&we(c);d=c,h||g||f?Pe(i)?d=i:xe(A=i)&&Oe(A)?d=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(i):g?(p=!1,d=function(e,t){if(t)return e.slice();var n=e.length,r=$?$(n):new e.constructor(n);return e.copy(r),r}(c,!0)):f?(p=!1,m=c,I=!0?(y=m.buffer,E=new y.constructor(y.byteLength),new V(E).set(new V(y)),E):m.buffer,d=new m.constructor(I,m.byteOffset,m.length)):d=[]:function(e){if(!xe(e)||de(e)!=u)return!1;var t=B(e);if(null===t)return!0;var n=w.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&x.call(n)==F}(c)||Ne(c)?(d=i,Ne(i)?d=function(e){return function(e,t,n,r){var s=!n;n||(n={});var a=-1,o=t.length;for(;++a<o;){var i=t[a],c=r?r(n[i],e[i],i,n,e):void 0;void 0===c&&(c=e[i]),s?ce(n,i,c):oe(n,i,c)}return n}(e,Me(e))}(i):ve(i)&&!Re(i)||(d=function(e){return"function"!=typeof e.constructor||_e(e)?{}:Z(B(e))}(c))):p=!1}var m,I,y,E;var A;p&&(o.set(c,d),s(d,c,r,a,o),o.delete(c));ae(e,n,d)}(e,t,o,n,fe,r,s);else{var i=r?r(Ce(e,o),a,o+"",e,t,s):void 0;void 0===i&&(i=a),ae(e,o,i)}}),Me)}function me(e,t){return Se(function(e,t,n){return t=K(void 0===t?e.length-1:t,0),function(){for(var r=arguments,s=-1,a=K(r.length-t,0),o=Array(a);++s<a;)o[s]=r[t+s];s=-1;for(var i=Array(t+1);++s<t;)i[s]=r[s];return i[t]=n(o),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,i)}}(e,t,Ue),e+"")}var Ie=z?function(e,t){return z(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Ue;function ye(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function Ee(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return he(n)?n:void 0}function Ae(e,t){var n=typeof e;return!!(t=null==t?s:t)&&("number"==n||"symbol"!=n&&g.test(e))&&e>-1&&e%1==0&&e<t}function _e(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||b)}function Ce(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Se=function(e){var t=0,n=0;return function(){var r=J(),s=16-(r-n);if(n=r,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Ie);function Te(e,t){return e===t||e!=e&&t!=t}var Ne=pe(function(){return arguments}())?pe:function(e){return xe(e)&&w.call(e,"callee")&&!W.call(e,"callee")},Pe=Array.isArray;function Oe(e){return null!=e&&be(e.length)&&!Re(e)}var De=Y||function(){return!1};function Re(e){if(!ve(e))return!1;var t=de(e);return t==i||t==c||t==o||t==d}function be(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}function ve(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xe(e){return null!=e&&"object"==typeof e}var we=T?function(e){return function(t){return e(t)}}(T):function(e){return xe(e)&&be(e.length)&&!!f[de(e)]};function Me(e){return Oe(e)?se(e,!0):ge(e)}var Le,Fe=(Le=function(e,t,n,r){fe(e,t,n,r)},me((function(e,t){var n=-1,r=t.length,s=r>1?t[r-1]:void 0,a=r>2?t[2]:void 0;for(s=Le.length>3&&"function"==typeof s?(r--,s):void 0,a&&function(e,t,n){if(!ve(n))return!1;var r=typeof t;return!!("number"==r?Oe(n)&&Ae(t,n.length):"string"==r&&t in n)&&Te(n[t],e)}(t[0],t[1],a)&&(s=r<3?void 0:s,r=1),e=Object(e);++n<r;){var o=t[n];o&&Le(e,o,n,s)}return e})));function Ue(e){return e}e.exports=Fe},835:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a=9007199254740991,o="[object Function]",i="[object GeneratorFunction]",c="[object Symbol]",l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,d=/^\./,p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g,g=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,I="object"==typeof self&&self&&self.Object===Object&&self,y=m||I||Function("return this")();var E,A=Array.prototype,_=Function.prototype,C=Object.prototype,S=y["__core-js_shared__"],T=(E=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",N=_.toString,P=C.hasOwnProperty,O=C.toString,D=RegExp("^"+N.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=y.Symbol,b=A.splice,v=G(y,"Map"),x=G(Object,"create"),w=R?R.prototype:void 0,M=w?w.toString:void 0;function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e,t,n){var r=e[t];P.call(e,t)&&Y(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function k(e,t){for(var n=e.length;n--;)if(Y(e[n][0],t))return n;return-1}function V(e){if(!J(e)||(t=e,T&&T in t))return!1;var t,n=function(e){var t=J(e)?O.call(e):"";return t==o||t==i}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?D:g;return n.test(function(e){if(null!=e){try{return N.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function $(e,t,n,r){if(!J(e))return e;t=function(e,t){if(K(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||X(e))return!0;return u.test(e)||!l.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return K(e)?e:H(e)}(t);for(var s=-1,a=t.length,o=a-1,i=e;null!=i&&++s<a;){var c=q(t[s]),d=n;if(s!=o){var p=i[c];void 0===(d=r?r(p,c,i):void 0)&&(d=J(p)?p:W(t[s+1])?[]:{})}j(i,c,d),i=i[c]}return e}function B(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return V(n)?n:void 0}function W(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||f.test(e))&&e>-1&&e%1==0&&e<t}L.prototype.clear=function(){this.__data__=x?x(null):{}},L.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},L.prototype.get=function(e){var t=this.__data__;if(x){var n=t[e];return n===r?void 0:n}return P.call(t,e)?t[e]:void 0},L.prototype.has=function(e){var t=this.__data__;return x?void 0!==t[e]:P.call(t,e)},L.prototype.set=function(e,t){return this.__data__[e]=x&&void 0===t?r:t,this},F.prototype.clear=function(){this.__data__=[]},F.prototype.delete=function(e){var t=this.__data__,n=k(t,e);return!(n<0)&&(n==t.length-1?t.pop():b.call(t,n,1),!0)},F.prototype.get=function(e){var t=this.__data__,n=k(t,e);return n<0?void 0:t[n][1]},F.prototype.has=function(e){return k(this.__data__,e)>-1},F.prototype.set=function(e,t){var n=this.__data__,r=k(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},U.prototype.clear=function(){this.__data__={hash:new L,map:new(v||F),string:new L}},U.prototype.delete=function(e){return B(this,e).delete(e)},U.prototype.get=function(e){return B(this,e).get(e)},U.prototype.has=function(e){return B(this,e).has(e)},U.prototype.set=function(e,t){return B(this,e).set(e,t),this};var H=z((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(X(e))return M?M.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return d.test(e)&&n.push(""),e.replace(p,(function(e,t,r,s){n.push(r?s.replace(h,"$1"):t||e)})),n}));function q(e){if("string"==typeof e||X(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function z(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(z.Cache||U),n}function Y(e,t){return e===t||e!=e&&t!=t}z.Cache=U;var K=Array.isArray;function J(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function X(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&O.call(e)==c}e.exports=function(e,t,n){return null==e?e:$(e,t,n)}},521:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a="[object Function]",o="[object GeneratorFunction]",i="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,u=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,g="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,m=g||f||Function("return this")();var I,y=Array.prototype,E=Function.prototype,A=Object.prototype,_=m["__core-js_shared__"],C=(I=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"",S=E.toString,T=A.hasOwnProperty,N=A.toString,P=RegExp("^"+S.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=m.Symbol,D=y.splice,R=$(m,"Map"),b=$(Object,"create"),v=O?O.prototype:void 0,x=v?v.toString:void 0;function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function U(e){if(!z(e)||(t=e,C&&C in t))return!1;var t,n=function(e){var t=z(e)?N.call(e):"";return t==a||t==o}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?P:h;return n.test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function j(e,t){e=function(e,t){return 1==t.length?e:function(e,t){for(var n=0,r=(t=B(t,e)?[t]:k(t)).length;null!=e&&n<r;)e=e[W(t[n++])];return n&&n==r?e:void 0}(e,function(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(s);++r<s;)a[r]=e[r+t];return a}(t,0,-1))}(e,t=B(t,e)?[t]:k(t));var n,r,s=W((r=(n=t)?n.length:0)?n[r-1]:void 0);return!(null!=e&&T.call(e,s))||delete e[s]}function k(e){return q(e)?e:G(e)}function V(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function $(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return U(n)?n:void 0}function B(e,t){if(q(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Y(e))||(l.test(e)||!c.test(e)||null!=t&&e in Object(t))}w.prototype.clear=function(){this.__data__=b?b(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(b){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return b?void 0!==t[e]:T.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=b&&void 0===t?r:t,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(e){var t=this.__data__,n=F(t,e);return!(n<0)&&(n==t.length-1?t.pop():D.call(t,n,1),!0)},M.prototype.get=function(e){var t=this.__data__,n=F(t,e);return n<0?void 0:t[n][1]},M.prototype.has=function(e){return F(this.__data__,e)>-1},M.prototype.set=function(e,t){var n=this.__data__,r=F(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new w,map:new(R||M),string:new w}},L.prototype.delete=function(e){return V(this,e).delete(e)},L.prototype.get=function(e){return V(this,e).get(e)},L.prototype.has=function(e){return V(this,e).has(e)},L.prototype.set=function(e,t){return V(this,e).set(e,t),this};var G=H((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Y(e))return x?x.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(d,(function(e,t,r,s){n.push(r?s.replace(p,"$1"):t||e)})),n}));function W(e){if("string"==typeof e||Y(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function H(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(H.Cache||L),n}H.Cache=L;var q=Array.isArray;function z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Y(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&N.call(e)==i}e.exports=function(e,t){return null==e||j(e,t)}},953:e=>{class t{constructor(e,t,n,r,s){this.converter=c(),this.width=e,this.poly=t,this.xor_in=n,this.reflected_xor_in=l(n,e),this.xor_out=r,this.reflect=s,this.msb_mask=1<<this.width-1,this.mask=this.msb_mask-1<<1|1,this.crc_shift=this.width<8?8-this.width:0,this.shifted_xor_in=this.xor_in<<this.crc_shift;let a=this.gen_table();this.table=a,8!==this.width||this.xor_in||this.xor_out||this.reflect||(this.calculate=function(e){e=this.converter.validate_buffer(e);let t=0;for(let n=0;n<e.length;n++)t=a[t^e[n]];return t})}calculate(e){let t;e=this.converter.validate_buffer(e);let{table:n,width:r,crc_shift:s,mask:a}=this;if(this.reflect){t=this.reflected_xor_in;for(let r=0;r<e.length;r++){t=(n[255&(t^e[r])]^t>>>8)&a}}else{t=this.shifted_xor_in;for(let o=0;o<e.length;o++)t=n[255&(t>>r-8+s^e[o])]<<s^t<<8-s&a<<s;t>>=s}return t^=this.xor_out,t>>>0}calculate_no_table(e){e=this.converter.validate_buffer(e);let t=this.xor_in;for(let n=0;n<e.length;n++){let r=e[n];this.reflect&&(r=l(r,8));for(let e=0;e<8;e++){let n=t&this.msb_mask;r&128>>e&&(n^=this.msb_mask),t<<=1,n&&(t^=this.poly)}t&=this.mask}return this.reflect&&(t=l(t,this.width)),t^=this.xor_out,t>>>0}gen_table(){let e=[];for(let t=0;t<256;t++){let n=t;this.reflect&&(n=l(n,8)),n<<=this.width-8+this.crc_shift;for(let e=0;e<8;e++)0!=(n&this.msb_mask<<this.crc_shift)?(n<<=1,n^=this.poly<<this.crc_shift):n<<=1;this.reflect&&(n=l(n>>this.crc_shift,this.width)<<this.crc_shift),n=n>>this.crc_shift&this.mask,e[t]=n>>>0}return new Int32Array(e)}print_table(){let e=this.table,t=Math.ceil(this.width/4),n=t<4?4:3,r=e.length>>n,s=1<<n,a="";for(let o=0;o<r;o++){let r="";for(let a=0;a<s;a++){let s=e[o<<n|a];s="000000000"+s.toString(16),s=s.substr(s.length-t),r+="0x"+s+", "}a+=" "+r+"\n"}return a="[\n"+a.slice(0,-3)+"\n]",a}}const n="undefined"!=typeof Buffer,r="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,s=void 0!==typeof BigInt&&BigInt(256);class a{validate_buffer(e){switch(typeof e){case"number":{if(!Number.isSafeInteger(e)||e<0)throw Error(`number data must be a nonnegative safe integer, not ${e}`);if(this.fromUInt32&&e<=4294967295)return this.fromUInt32(e);const t=[];for(;e>0||t.length<4;)t.unshift(e%256),e=Math.floor(e/256);return this.fromByteArray(t)}case"string":return this.fromString(e);case"bigint":{if(e<0)throw Error(`bigint data must be nonnegative, not ${e}`);const t=[];for(;e>0||t.length<4;)t.unshift(Number(e%s)),e/=s;return this.fromByteArray(t)}default:if(n&&Buffer.isBuffer(e))return e;if(r){if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new Uint8Array(e)}throw new Error(`Unrecognized data type ${typeof e}: ${e}`)}}}class o extends a{fromUInt32(e){const t=Buffer.alloc(4);return t.writeUInt32BE(e),t}fromByteArray=Buffer.from.bind(Buffer);fromString=Buffer.from.bind(Buffer)}class i extends a{fromByteArray=Uint8Array.from.bind(Uint8Array);fromString(e){return new TextEncoder("utf-8").encode(e)}}function c(e=!1){if(r&&(e||!n))return new i;if(n)return new o;throw Error("either need TypedArrays or Buffer")}function l(e,t){let n=0;for(let r=0;r<t;r++)n=n<<1|1&e,e>>=1;return n}const u={crc1:new t(1,1,0,0,!1),crc6:new t(6,47,0,0,!1),crc8:new t(8,7,0,0,!1),crc10:new t(10,563,0,0,!1),crc16:new t(16,32773,0,0,!0),crc24:new t(24,8801531,11994318,0,!1),crc32:new t(32,79764919,4294967295,4294967295,!0),crc32c:new t(32,517762881,4294967295,4294967295,!0)};function d(e){}e.exports={CRC:t,crc:function(e,n,r,s,a){let o=new t(e,n,r,s,a);return o.calculate.bind(o)},makeBufferConverter:c,models:u,crc1:d,crc6:d,crc8:d,crc10:d,crc16:d,crc24:d,crc32:d,crc32c:d};for(let t in u){let n=u[t];e.exports[t]=n.calculate.bind(n)}},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}},r={};function s(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={id:e,loaded:!1,exports:{}};return n[e](a,a.exports,s),a.loaded=!0,a.exports}s.m=n,s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>"js/libphonenumber.a5a4a2d2.js",s.miniCssF=e=>{},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;if("string"==typeof import.meta.url&&(e=import.meta.url),!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})(),e={388:0},t=t=>{var n,r,{__webpack_ids__:a,__webpack_modules__:o,__webpack_runtime__:i}=t,c=0;for(n in o)s.o(o,n)&&(s.m[n]=o[n]);for(i&&i(s);c<a.length;c++)r=a[c],s.o(e,r)&&e[r]&&e[r][0](),e[a[c]]=0},s.f.j=(n,r)=>{var a=s.o(e,n)?e[n]:void 0;if(0!==a)if(a)r.push(a[1]);else{var o=import("./"+s.u(n)).then(t,(t=>{throw 0!==e[n]&&(e[n]=void 0),t}));o=Promise.race([o,new Promise((t=>a=e[n]=[t]))]),r.push(a[1]=o)}};var a={};s.d(a,{A:()=>RS});var o={};s.r(o),s.d(o,{buildContextName:()=>J,buildModalContext:()=>ee,buildTransientContextName:()=>X,getContainerIdFromContext:()=>ne,getParentContext:()=>te,getParentContextName:()=>K,getTargetFromContext:()=>Z,getTransientContext:()=>Q});var i={};s.r(i),s.d(i,{getResolvedTargetName:()=>wt,getRoutingInfo:()=>Mt,getSemanticURLFromRoutingInfo:()=>Lt});var c={};s.r(c),s.d(c,{evaluate:()=>hn,handleChange:()=>dn,hasDeclareExpression:()=>un,updateDeclareExpressions:()=>pn});var l={};s.r(l),s.d(l,{hasBrowserEnv:()=>Fr,hasStandardBrowserEnv:()=>jr,hasStandardBrowserWebWorkerEnv:()=>kr,navigator:()=>Ur,origin:()=>Vr});var u={};s.r(u),s.d(u,{publishExpressions:()=>Wi,publishResponse:()=>Hi});var d={};s.r(d),s.d(d,{doesRestApiExist:()=>Xi,getCancelTokenSource:()=>Qi,getCaseApi:()=>tc,getHeaderProcessor:()=>Yi,invokeCustomRestApi:()=>Ji,invokeRestApi:()=>Ki,isRequestCanceled:()=>Zi,registerInterceptor:()=>ec});var p={};s.r(p),s.d(p,{fetchViewResources:()=>vd,updateViewResources:()=>bd});var h={};s.r(h),s.d(h,{CONTAINER_NAMES:()=>Np,CONTAINER_TYPES:()=>Tp,addRootContainerItem:()=>ah,areContainerItemsPresent:()=>xp,clearTransientData:()=>dh,closeContainerItem:()=>sh,getActiveContainerItemContext:()=>Gp,getActiveContainerItemIDFromRoutingInfo:()=>Sh,getActiveContainerItemName:()=>kp,getActiveContext:()=>Eh,getChildContainerItems:()=>Wp,getChildContainers:()=>Hp,getChildContainersContexts:()=>qp,getContainerAPI:()=>gh,getContainerAccessOrder:()=>vp,getContainerData:()=>Dp,getContainerItemByKey:()=>Fp,getContainerItemData:()=>Rp,getContainerItemName:()=>Mp,getContainerItems:()=>bp,getContainerLimit:()=>Xp,getContainerParentContext:()=>Ch,getContainerType:()=>jp,getContextByTargetAndKey:()=>_h,getDataContextName:()=>Bp,getFlowContainer:()=>Nh,getLeastRecentlyUsedNonDirtyContainerItemID:()=>nh,getParentContainerItem:()=>Th,getRootContainerName:()=>yh,getSuggestionContexts:()=>zp,getTargetFromContainerItemID:()=>rh,getTransientItems:()=>ch,hasContainerItems:()=>Jp,isContainerDirty:()=>th,isContainerInitialized:()=>Up,isContainerItemActive:()=>Vp,isContainerItemContextBeingUsedInOtherContainers:()=>ih,isContainerItemExists:()=>wp,isContainerLimitReached:()=>Zp,isContainerMultipleMode:()=>Kp,isContainerSingleMode:()=>Yp,purgeTransientData:()=>ph,removeContainer:()=>fh,replaceTransientData:()=>uh,resetContainersPayload:()=>eh,setContainerLimit:()=>Qp,updateCaseContextEtag:()=>Ih,updateParentLastUpdateTime:()=>Ah,updateRelatedContextEtag:()=>mh,updateTransientData:()=>lh});var g={};s.r(g),s.d(g,{getAIAgent:()=>Tg,getAdditionalInfo:()=>Rg,getDataPageKeys:()=>Pg,getDataPageMetadata:()=>Ig,getEmbeddedPropertyMetadata:()=>ug,getFieldParameters:()=>_g,getFieldsByClassName:()=>Ag,getGenAICoach:()=>Sg,getInsight:()=>Eg,getLocaleUtilsForLanguage:()=>cg,getLocalizationServiceFromStore:()=>lg,getLookUpDataPage:()=>Og,getLookUpDataPageInfo:()=>Dg,getParagraph:()=>Cg,getPersonalizationMetadata:()=>yg,getPropertyMetadata:()=>ig,getResolvedFieldMetadata:()=>bg,getSavableDataPage:()=>Ng,isViewExists:()=>fg,mergeStore:()=>og,resolveNavigation:()=>mg,resolveView:()=>gg,updateNavigationStore:()=>pg,updateStores:()=>hg,updateViewStore:()=>dg});var f={};s.r(f),s.d(f,{dispatch:()=>Ug,doesContextExist:()=>Qg,getActionType:()=>Wg,getContextValue:()=>Bg,getDataObject:()=>jg,getReferenceTokens:()=>Mg,getSharedDataObject:()=>kg,getStore:()=>Fg,getValue:()=>$g,isMergeable:()=>qg,lookupContextValue:()=>Gg,mergeDeep:()=>Yg,performReplaceAndRearrange:()=>zg,removeItem:()=>Hg,replaceValue:()=>Jg,resetStore:()=>Xg,setStore:()=>Lg,updateValue:()=>Kg});var m={};s.r(m),s.d(m,{activateContainerItem:()=>Rf,addContainerItem:()=>Ef,addMessages:()=>bf,addSharedData:()=>Vf,addTransientItem:()=>Af,addWork:()=>ff,clearTransientData:()=>Cf,createWork:()=>lf,error:()=>kf,finishAssignment:()=>Lf,initContainers:()=>If,listAction:()=>Bf,loadView:()=>hf,mergeData:()=>df,openAssignment:()=>Ff,openWorkByHandle:()=>mf,postProcess:()=>jf,purgeTransientData:()=>Tf,removeAllTransientItems:()=>xf,removeContainerItem:()=>vf,removeSharedData:()=>$f,removeTransientItem:()=>wf,replaceContainerItem:()=>Mf,replaceTransientData:()=>Sf,resetContainers:()=>yf,resetLoading:()=>Of,setLoading:()=>Pf,setSharedProperty:()=>Wf,setStateProperty:()=>Hf,showCasePreview:()=>Gf,showHarness:()=>pf,showHistory:()=>Uf,showPage:()=>gf,upMergeAndRemoveContainerItem:()=>Df,updateContainerItem:()=>Nf,updateTransientData:()=>_f});var I=s(216),y=s.n(I);let E,A,_;const C=e=>{e&&(E=e=e||{"base-server":"http://localhost:1080/prweb/","data-end-point":"api/v1/stream/data","action-end-point":"api/v1/stream/action"},E.BASEURL=e.server,E.ACTIONURL=e["action-end-point"],E.DATAURL=e["data-end-point"],_=e.reAuthUrl)},S=()=>_,T=()=>E.BASEURL,N=e=>fetch(`${E.BASEURL}${E.ACTIONURL}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),P=e=>{A=e},O=()=>A;var D=s(953),R=s(521),b=s.n(R),v=s(928),x=s.n(v),w=s(188),M=s.n(w),L=s(835),F=s.n(L),U=s(692),j=s.n(U),k=s(529),V=s.n(k);const $=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")}},B={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:"pyCaseTab",DATA_OBJECT_CREATE_VIEW:"Create",DATA_OBJECT_EDIT_VIEW:"pyEdit",PY_DATA_PREVIEW:"pyDataPreview",PY_DETAILS:"pyDetails",OBJECT_CREATE_VIEW:"Create",SUBSCRIPT_CREATE_VIEW:"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:"D_pyGetUserWorkListByUserId",D__WORK_BASKET:"D_WorkBasket",D__PY_MY_WORK_LIST:"D_pyMyWorkList"}},CONTEXT_TREE_NODE_TYPES:{VIEW:"VIEW",FIELD:"FIELD",DECLARATIVE_TARGET:"DECLARATIVE_TARGET",WHEN:"WHEN",CONTEXT:"CONTEXT",PAGELIST:"PAGELIST"},WORKLIST:"worklist",WAIT:"wait",TODO:"todo",STANDARD_FLOW:"Standard",CASE:"CASE",ASSIGNMENT:"ASSIGNMENT",FIX_BROKEN_ASSIGNMENTS:"FixBrokenAssignments",PAGE:"PAGE",PZINSKEY:".pzInsKey",CREATE_DETAILS_VIEW_NAME:"pzCreateDetails",PREVIEW_VIEW_NAME:"pyCasePreview",CASESUMMARY_VIEW_NAME:"pyCaseSummary",APPSHELL_ACTIVE_CASES:"appshell-activecases",TRACE_ID:"x-b3-traceid",LOAD_VIEW_STRING:"View",PRIMARY:"primary",DEFER_UPDATE_CASESUMMARY_VIEW:"deferUpdateCaseSummaryView",NEXT_ASSIGNMENT_INFO_ID:"nextAssignmentInfo.ID",WORKCLASS:"Work-",DATA_INFO:{DATA_INFO:"dataInfo",DATA_INFO_CONTENT:"dataInfo.content"},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_CONTENT:"caseInfo.content",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:"caseInfo.content.pzInsKey",CASE_INFO_ACTIONS:"caseInfo.availableActions",VIEW_NAME:"caseInfo.content.pyViewName",ACTION_BUTTONS:"caseInfo.actionButtons",ACTIVE_ACTION_ID:"caseInfo.activeActionID",ASSIGNMENT_LABEL:"caseInfo.assignments[0].name",ASSIGNMENT_ID:"caseInfo.assignments[0].ID",ASSIGNMENTS:"caseInfo.assignments",INSTRUCTIONS:"caseInfo.assignments[0].instructions",NAVIGATION:"caseInfo.navigation",STAGES:"caseInfo.stages",STAGEID:"caseInfo.stageID",CASECLASS:"caseInfo.caseClass",AVAILABLEACTIONS:"caseInfo.availableActions",AVAILABLEPROCESSES:"caseInfo.availableProcesses",D_CASE_ASSIGNMENTS_RESULTS:"caseInfo.assignments",CHILD_ASSIGNMENTS:"caseInfo.childCases",ASSIGNMENTACTION_ID:"caseInfo.assignments[0].actions[0].ID",ISINCREATESTAGE:"caseInfo.isInCreateStage",APPROVALFLAG:"caseInfo.content.pyApprovalResult",DUPLICATECASEFLAG:"caseInfo.content.pyDuplicateCaseActions",DUPLICATECASEID:"caseInfo.content.pyDuplicateID",DUPLICATECASEINSKEY:"caseInfo.content.pyDuplicateCaseReference.pzInsKey",HEADERS:"caseInfo.headers",PARENTCASEINFO:"caseInfo.parentCaseInfo",REMOTESYSTEMID:"caseInfo.headers.RemoteSystemID",CASE_RELATED_CASE_TYPES:"caseInfo.relatedCaseTypes",CASES:"caseInfo.cases",GETNEXTWORK:"caseInfo.confirmationLinks.getNextWork",ACTION_REFRESH_CONDITIONS:"caseInfo.assignments[0].actions[0].refreshConditions",IS_LOCAL_ACTION:"caseInfo.isLocalAction",BUSINESS_ID:"caseInfo.businessID",IS_FIRST_ASSIGNMENT:"caseInfo.isFirstAssignment",CASE_INFO_ATTACHMENTS:"caseInfo.attachments"},ACTIONS:{ACTION_ID:"actionID",ACTIONS:"availableActions",DELETEAVIALACTIONS:"deleteAvailActions",FLOWACTION:"FlowAction",DATA_PAGES:{D_PY_ADDITIONAL_CASE_ACTIONS:"D_pyAdditionalCaseActions"}},PROCESS:{FLOWPROBLEMS:"FlowProblems"},PAGE_TYPES:{PAGE:"page",LANDINGPAGE:"landingpage",LISTPAGE:"listpage"},LOCAL_ACTION_TYPE:{CASE_WIDE:"case",EXPRESS:"express",ASSIGNMENT:"Assignment",LOCAL_ACTION:"LocalAction"},LOCAL_ACTIONS:{TRANSFER_ASSIGNMENT:"pyTransferAssignment"},CONTENT:"content",MODAL:"modal",STOPMERGEACTIONS:"stopMergeActions",IS_CREATE_DATA_OBJECT:"isCreateDataObject",SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME:"context_data.caseInfo.content.summary_of_assignment__.lastSubmitTime",SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME:"context_data.caseInfo.content.summary_of_attachments__.lastRefreshTime",CONTEXT_DATA_ASSIGNMENTID:"context_data.assignmentID",BANNER_VARIANT_SUCCESS:"success",BANNER_VARIANT_WARNING:"warning",BANNER_VARIANT_URGENT:"urgent",BANNER_VARIANT_INFO:"info",MESSAGES:{MESSAGES_TYPE_SUCCESS:"success",MESSAGES_TYPE_INFO:"info",MESSAGES_TYPE_ERROR:"error"},PUB_SUB_EVENTS:{EVENT_RENDER_APP:"renderApp",EVENT_UNMOUNT_APP:"unmountApp",EVENT_REAUTH:"reAuth",EVENT_FULL_REAUTH:"fullReAuth",EVENT_CUSTOM_REAUTH:"customReAuth",EVENT_CANCEL:"cancel",EVENT_MINIMIZE:"minimize",EVENT_EXPRESS_LOCALACTION:"expressLocalActionSubmit",EVENT_BULKACTION:"bulkActionSubmit",EVENT_SHOW_CANCEL_ALERT:"showCancelAlert",EVENT_SHOW_DELETE_ALERT:"showDeleteAlert",EVENT_DASHBOARD_FILTER_CHANGE:"dashboardFilterChange",EVENT_DASHBOARD_FILTER_CLEAR_ALL:"dashboardFilterClearAll",EVENT_PROMOTED_FILTERS_CHANGE:"promotedFiltersChange",EVENT_LOCALACTION_SUBMISSION:"localActionSubmit",EVENT_LOGOFF:"Logoff",EVENT_TRANSIENT_ITEMS:{UPDATE_PROMOTED_FILTERS:"updatePromotedFilters"},UI_EVENTS:{INSPECTOR:"inspector",INSPECTOR_SHOW_ALL:"inspectorShowAll",SHOW_PAGE_INIT:"showPageInit",SHOW_PAGE_DONE:"showPageDone",SHOW_PAGE_STARTED:"showPageStarted"},CASE_EVENTS:{CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW:"caseAttachmentsUpdateFromCaseview",CASE_FOLLOWER_UPDATED_BY_OPERATOR_FROM_CASEVIEW:"caseFollowerUpdateByOperatorFromCaseview",CASE_FOLLOWER_UPDATE_BY_OPERATOR_FROM_WIDGET:"caseFollowerUpdateByOperatorFromWidget",CASE_CREATED:"caseCreated",CREATE_STAGE_DONE:"caseCreatedDone",CREATE_STAGE_CANCELLED:"caseCancelled",CREATE_STAGE_SAVED:"caseSaved",CREATE_STAGE_DELETED:"caseDeleted",ASSIGNMENT_SUBMISSION:"assignmentSubmission",END_OF_ASSIGNMENT_PROCESSING:"endOfAssignmentProcessing",CLOSE_CONFIRM_VIEW:"closeConfirmView",CASE_OPENED:"caseOpened",CASE_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"},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",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"},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"},PROMISE_VALUE:{RESOLVE:"resolve",REJECT:"reject"},APP_TYPE:{UIKIT:"uikit",THEME_COSMOS:"themecosmos"},PORTAL_TYPE:{WSS:"wss"},VIEW_TYPE:{PY_EMBEDASSIGNMENT:"pyEmbedAssignment",PY_DETAILS:"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"}},G={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",SELF_SERVICE_CASE_VIEW:"SelfServiceCaseView",VIEW:"view",CASE_PREVIEW:"CasePreview",CASE_STAGES:"Stages",CASEMESSAGES:"caseMessages",SUGGESTION:"suggestion",PREVIEW:"preview",TERTIARY:"tertiary",DEFAULT:"default",ACPRIMARY:"primary",ACTERTIARY:"tertiary",PERFORM_MODE:"perform",CASE_VIEW_MODE_PROP:".caseViewMode",REVIEW_MODE:"review",WORKAREA:"workarea",ACPRIMARY_NAME:"ACPRIMARY",ACTERTIARY_NAME:"ACTERTIARY",THREADNAMESEPARATOR:"/",JOINCHARACTER:"_",FORWARD_SLASH_STRING:"/",UNDERSCORE_STRING:"_",WORK_ID:"WORK_ID",EMPTY_STRING:"",PROPERTY_MESSAGES:"propertyMessages__",CONTEXT_MESSAGES:"contextMessages__",HTTP_MESSAGES:"httpMessages__",PAGE_MESSAGES:"pageMessages__",SUMMARY_OF_LISTS:"summary_of_lists__",SUMMARY_OF_GROUPS:"summary_of_groups__",SUMMARY_OF_MESSAGES:"summary_of_messages__",SUMMARY_OF_FIELD_VALUES:"summary_of_field_values__",SUMMARY_OF_WHEN_CONDITIONS:"summary_of_when_conditions__",SUMMARY_OF_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_START:"onRefreshStart",ON_REFRESH_ERROR:"onRefreshError",ON_REFRESH_COMPLETE:"onRefreshComplete",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",ASSOCIATED_PROPERTY_ANNOTATION:"@ASSOCIATED",CLASS_ANNOTATION:"@CLASS",ASSOCIATED:"associated",CLASS_ID:".classID",CLASSID:"classID",READONLY:"readonly",SHARED:"shared",RELOAD_IF_OLDER_THAN:"reloadIfOlderThan",RELOAD_ONCE_PER_INTERACTION:"reloadOncePerInteraction",PY_DETAILS:"pyDetails",PY_CONFIRM:"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",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},...B,getProperty:e=>$.map(e)},W="pyRemoteCaseDetails";class H{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=>sf.getProperty(".RemoteSystemID",G.CASE_INFO.HEADERS,e);static getRemoteHeader=e=>this.remoteCaseMapping[e]?.RemoteSystemID;static injectRemoteCaseHeader=(e,t,n)=>{if(e&&e.RemoteSystemID)return;const r=this.getRemoteHeaderByContext(n);r?e.RemoteSystemID=r:t&&this.isRemoteCase(t.caseTypeID)&&(e.RemoteSystemID=this.getRemoteHeader(t.caseTypeID))};static isTraditionalRemoteCase=(e="")=>"Traditional"===H.getRemoteCase(e)?.RemoteApplicationType;static setAdditionalParameters=()=>{const e=Vh.environmentInfoObject?.pyRemoteCaseTypeList;e?.forEach((e=>{const t=this.getRemoteCase(e.pyWorkTypeImplementationClassName);t&&(t.name=e.pyWorkTypeName)}))};static getRemoteHeaderFromSourceClass=e=>{const t=Object.values(this.remoteCaseMapping).find((t=>t.RemoteClassName===e));return t?.RemoteSystemID};static getRemoteCaseClassBySourceClass=e=>{for(const[t,n]of Object.entries(this.remoteCaseMapping))if(n.RemoteClassName===e)return t}}const q=H,z={},Y=new Map,K=e=>{let t=G.EMPTY_STRING;return t=e&&e.includes(G.FORWARD_SLASH_STRING)?e.substring(0,e.lastIndexOf("/")):e,t},J=(e,t,n=!1)=>{let r=G.EMPTY_STRING;if(t&&e){let s=`${t}${G.FORWARD_SLASH_STRING}${e}`;const a=Dp(s);if(a||t!==G.APP.APP&&t!==G.APP.ROOT)if(a){if(n&&z[s])return r=`${s}${G.UNDERSCORE_STRING}${z[s]}`,r;z[s]?z[s]+=1:z[s]=1,r=`${s}${G.UNDERSCORE_STRING}${z[s]}`}else r=J(e,K(t));else s=`${t}${G.FORWARD_SLASH_STRING}${G.PRIMARY}`,z[s]?z[s]+=1:z[s]=1,r=`${s}${G.UNDERSCORE_STRING}${z[s]}`}return r},X=(e,t)=>{if(e&&t){const n=(Y[t]?.[e]??0)+1;return Y[t]||(Y[t]={}),Y[t][e]=n,`${t}${G.FORWARD_SLASH_STRING}${e}_${n}`}return""},Q=(e,t)=>{if(e&&t){const n=Y[t]?.[e];return n?`${t}${G.FORWARD_SLASH_STRING}${e}_${n}`:X(e,t)}return""},Z=e=>{let t=G.EMPTY_STRING;return e&&(t=e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("_")).toLowerCase()),t},ee=(e,t)=>{if(null===e)return t;const[,n]=t.split(G.FORWARD_SLASH_STRING);return e+G.FORWARD_SLASH_STRING+n},te=e=>{const t=e.indexOf(G.FORWARD_SLASH_STRING),n=e.lastIndexOf(G.FORWARD_SLASH_STRING);return t===n?e:e.substring(0,n)},ne=e=>{const t=e.split(G.FORWARD_SLASH_STRING);return 2===t.length?e:t[0]+G.FORWARD_SLASH_STRING+t[2]},re="SET_PROPERTY",se="REPLACE_PROPERTY",ae="FIELD_CHANGE",oe="LOAD_VIEW",ie="SHOW_PAGE",ce="SHOW_DATA",le="SHOW_INSIGHT",ue="SHOW_DASHBOARD",de="SET_LOADING",pe="RESET_LOADING",he="SET_SHARED_PROPERTY",ge="CREATE_WORK",fe="OPEN_WORK_BY_HANDLE",me="UPDATE_DOCUMENT",Ie="FINISH_ASSIGNMENT",ye="CANCEL_ASSIGNMENT",Ee="OPEN_ASSIGNMENT",Ae="MERGE_DATA",_e="REMOVE_ITEM",Ce="GET_DATAOBJECT_ACTIONS",Se="SHOW_HISTORY",Te="ERROR",Ne="INIT_CONTAINERS",Pe="RESET_CONTAINERS",Oe="ADD_CONTAINER_ITEM",De="REMOVE_CONTAINER_ITEM",Re="ADD_TRANSIENT_ITEM",be="UPDATE_TRANSIENT_DATA",ve="REMOVE_TRANSIENT_ITEM",xe="REMOVE_ALL_TRANSIENT_ITEMS",we="CLEAR_TRANSIENT_DATA",Me="PURGE_TRANSIENT_DATA",Le="REPLACE_TRANSIENT_DATA",Fe="ACTIVATE_CONTAINER_ITEM",Ue="UPDATE_CONTAINER_ITEM",je="UPMERGE_AND_REMOVE_CONTAINER_ITEM",ke="REPLACE_CONTAINER_ITEM",Ve="ACTIVATE_MODAL_CONTAINER_ITEM",$e="REMOVE_CONTAINER",Be="ADD_SUGGESTION_CONTEXT",Ge="showView",We="showData",He="showInsight",qe="showDashboard",ze="openWorkByHandle",Ye="openAssignment",Ke="createNewWork",Je="SHOW_CANCEL_ALERT",Xe="deleteCaseInCreateStage",Qe="openLocalAction",Ze="openProcessAction",et="caseWideActions",tt="openBulkAction",nt="performBulkAction",rt="launchAssignment",st="ADD_MESSAGES",at="CLEAR_MESSAGES",ot="RESET_STORE",it="FETCH_DATAPAGE",ct="ADD_SHARED_DATA",lt="REMOVE_SHARED_DATA",ut="LIST_ACTION",dt="DELETE_CASE_SUMMARY",pt="ALTER_BLOCKING_ACTION_COUNT",ht="CREATE_DATA_OBJECT",gt="DELETE_DATA_OBJECT",ft="VIEW_DATA_OBJECT",mt="UPDATE_DATA_OBJECT",It="OPEN_DATA_OBJECT_ACTION",yt="SUBMIT_DATA_OBJECT_ACTION",Et="OPEN_EMBEDDED_DATA_MODAL",At="SUBMIT_EMBEDDED_DATA_MODAL",_t="SUBMIT_SUBSCRIPT",Ct="FILL_FORM_WITH_AI",St="createWork",Tt="openAssignment",Nt="openCase",Pt="OPEN_OBJECT_ACTION",Ot="EXECUTE_OBJECT_WIDE_ACTION",Dt="DELETE_WORK",Rt="createObject",bt="getObject",vt="getObjectWideAction",xt="createExternalObject",wt=(e,t)=>{if(!e||!t)return null;let n,r=G.EMPTY_STRING;return t&&(r=`${t}${G.FORWARD_SLASH_STRING}${e}`,n=Dp(r),n||t.includes("/")?n||(r=wt(e,K(t))):r=`${t}${G.FORWARD_SLASH_STRING}${e}`),r},Mt=(e,t)=>{const n=wt(e,t);return n&&Dp(n)?Dp(n):{}},Lt=(e,t)=>jh.getSemanticURL(Ge,{page:e},t);class Ft{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=Ht[this._state],n=this._exprStr;if(this._exprStr+=e.element,t.subHandler){this._subParser||this._startSubExpression(n);const t=this._subParser?._addToken(e);t&&(this._endSubExpression(),this._state=t)}else{if(!t.operatorTypes?.[e.tokenType]){if(this._endState[e.tokenType])return this._endState[e.tokenType];throw new Error(`Token ${e.element} (${e.tokenType}) unexpected in expression: ${this._exprStr}`)}{const n=t.operatorTypes[e.tokenType],r=Wt[e.tokenType];r&&r.call(this,e),n.toState&&(this._state=n.toState)}}return!1}addTokens(e){e.forEach(this._addToken,this)}buildAst(){return this._subParser&&this._endSubExpression(),this._state="complete",this._position?this._tree:null}_startSubExpression(e){const{endStates:t}=Ht[this._state];this._subParser=new Ft(this._grammar,e,t)}_endSubExpression(){Ht[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,Ft._setParent(e,this._position)):this._tree=e,this._position=e}}const Ut=Ft,jt="identifier",kt={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e&&t},Vt={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e||t},$t=(e,t,n)=>{const r=""===e,s=""===t||null==t;if(r&&s)return n;if("boolean"==typeof t){const s=!!(!r&&"false"!==e&&"0"!==e)&&Boolean(e);return n?s===t:s!==t}return r!==s?!n:n?e===t:e!==t},Bt={">":{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)=>$t(e,t,!0)},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>$t(e,t,!1)},"!":{operatorType:"unaryOperator",precedence:999,evaluate:e=>{let{value:t}=e;return"true"!==t&&"false"!==t||(t="true"===t),!t}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":kt,AND:kt,and:kt,"||":Vt,OR:Vt,or:Vt,CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.includes(t)},NOT_CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.includes(t)},STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.startsWith(t)},NOT_STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.startsWith(t)},ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.endsWith(t)},NOT_ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.endsWith(t)},IS_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!e},IS_NOT_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!!e},IS_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>t.split(",").includes(e)},IS_NOT_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!t.split(",").includes(e)}},Gt={BinaryExpression:function(e){const t=[],n=e.right,r=e.operator,s=e.left;let a="boolean"==typeof s.value?"True-False":"";if(t[0]=this.evaluateAST(s),!a&&s.operationType===jt&&"string"==typeof s.value){const e=s.value.substring(1);a=this._context?.getFieldMetadata(e)?.type??"";const{pageReference:t,context:n}=this._contextTreeNodeContext??{};if(!a&&t&&n){const r=sf.resolveClassID(s.value,t,n),o=ig(e,r);o&&!Array.isArray(o)&&(a=o.type??"")}}t[1]=n?this.evaluateAST(n,a):"";return(0,this._grammar[r].evaluate)(t[0],t[1])},identifier:function(e){return this._localDataObject?ef.getIn(this._localDataObject,e.value?e.value.substring(1).split("."):[])??"":this._contextTreeNodeContext?sf.getLitePropertyValue(this._contextTreeNodeContext,e.value)??"":this._context.getValue(e.value)??""},literal:function(e,t){return!(void 0===t||""===t||"True-False"===t)||"true"!==e.value&&"false"!==e.value?e.value:"true"===e.value},UnaryExpression:function(e){const t=e.operator,n=e.right;return(0,this._grammar[t].evaluate)(n)}},Wt={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:e.value})},binaryOperator:function(e){const{precedence:t}=this._grammar[e.value];let n=this._position._parent;const r=n?n.operator:null,s=r?this._grammar[r]:null,a=s?s.precedence:null;if(a&&t)for(;n?.operator&&a>=t;)this._position=n,n=n._parent;const o={operationType:"BinaryExpression",operator:e.value,left:this._position};Ut._setParent(this._position,o),this._position=n,this.setPositionInAST(o)},identifier:function(e){const t={operationType:jt,value:e.value};this.setPositionInAST(t)},literal:function(e){this.setPositionInAST({operationType:"literal",value:e.value})},subExpression:function(e){this.setPositionInAST(e)}},Ht={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:jt},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:Wt.subExpression,endStates:{closeParenthesis:"expectBinOp"}}},qt=["binaryOperator","unaryOperator","openParenthesis"],zt=/^\s*$/,Yt=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,Kt=/\\\\/,Jt=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],Xt=["[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]+)"],Qt=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;class Zt{constructor(e){this._grammar=e}static _isNegative(e){return qt.some((t=>t===e[e.length-1].tokenType))}static _isWhitespace(e){return!!e.match(zt)}static _createWordboundary(e){return(e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).match(Yt)&&(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(Kt,"\\")}_getSplitRegex(){if(!this._splitRegex){const e=Object.keys(this._grammar).sort(((e,t)=>t.length-e.length)).map((e=>Zt._createWordboundary(e)),this);this._splitRegex=new RegExp(`(${[Jt.join("|"),e.join("|"),Xt.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=Zt._unquote(e):e.match(Qt)?t.value=parseFloat(e):"true"===e||"false"===e?t.value="true"===e:this._grammar[e]?t.tokenType=this._grammar[e].operatorType:e.match(Yt)&&(t.tokenType="identifier"),t}_getTokens(e){const t=[];let n=!1;for(let r=0;r<e.length;r+=1)Zt._isWhitespace(e[r])?t.length&&(t[t.length-1].element+=e[r]):"-"===e[r]&&Zt._isNegative(t)?n=!0:(n&&(e[r]=`-${e[r]}`,n=!1),t.push(this._createToken(e[r])));return t}tokenize(e){const t=this._splitExpression(e);return this._getTokens(t)}}const en=Zt;const tn=class{constructor(e,t){this._grammar={...Bt},this._expression=e,this._ast=null,this._contextTreeNodeContext=null,this._localDataObject=t}buildAST(){const e=new en(this._grammar).tokenize(this._expression),t=new Ut(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 on(e.operationType,Gt)&&Gt[e.operationType].call(this,e,t)}},nn=(e,t)=>{const n=e.replace(/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,(e=>e.replace("=","==")));return new tn(n,t)},rn=e=>!e||e.buildAST(),sn=(e,t,n)=>!e||e.evaluate(t,n),an=(e,t,n)=>{const r=nn(e,t),s=rn(r);return sn(s,n)},on=(e,t)=>e in t;const cn=class{static handleExpression(e,t,n,r){const s=this.getContext(e,r);N({actionObject:{action:"decexp",params:{source:e,value:t,targets:n},context:s}}).then((e=>e.json())).then((e=>{this.updateState(e,r)})).catch((e=>window.console.log(e)))}static getContext(e,t){const n=e.substring(0,e.indexOf("."));return{name:n,class:sf.getPropertyValue(`${n}.pxObjClass`,null,t)||sf.getPropertyValue(`${n}.pyClassName`,null,t)}}static updateState(e,t){Object.keys(e).forEach((n=>Ug({type:re,payload:{context:t,reference:n,value:e[n]}})))}},ln={},un=(e,t)=>ln[t]&&Object.hasOwn(ln[t],e),dn=e=>{const{context:t}=e;un(e.reference,t)&&cn.handleExpression(e.reference,e.value,ln[t][e.reference],t)},pn=(e={})=>{ef.copy(e,ln)},hn=(e,t,n)=>an(e,t,n?.pConnect.getPConnect());const gn=new class{constructor(){this._dataSourceMap={}}hasContextName(e){return e in this._dataSourceMap}addContextName(e,t){t&&Object.keys(t).length>0?this._dataSourceMap[e]=t:this._dataSourceMap[e]={}}getContextObjectByName(e){return e in this._dataSourceMap?this._dataSourceMap[e]:null}deleteContextName(e){this.hasContextName(e)&&delete this._dataSourceMap[e]}addOrUpdatePropertyInContext(e,t,n){if(this.hasContextName(e)){const r=this.getContextObjectByName(e);if(r)if(Array.isArray(n))r[t]=n;else{const e=r[t];r[t]=[...new Set([...e,n])]}}else{const r={};Array.isArray(n)?r[t]=n:r[t]=[n],this.addContextName(e,r)}}deletePropertyInContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);n&&t in n&&delete n[t]}}getPropertyFromContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);if(n&&t in n)return n[t]}return[]}getDependencies(e,t){const n=this.getPropertyFromContext(e,t),r=new Set(n);return n.forEach((e=>{r.add(e)})),[...r]}};const fn=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={}){ef.copy(e,this.componentMap)}mergeOverrideMap(e={}){ef.copy(e,this.overrideMap)}getOverrideMap(){return this.overrideMap}getLazyMap(){return this.lazyMap}};const mn=new class{constructor(){this.handlers={}}registerHandler(e,t){this.handlers[e]=t}getHandler(e){return this.handlers[e]}};const In=class{static handleAnnotation(e,t,n){const r=e.indexOf(" "),s=-1===r?e:e.substring(0,r),a=mn.getHandler(s);return a?a(e.substring(r+1),t,n):e}static trimAnnotation(e){if("string"!=typeof e)return e;const t=e.indexOf(" "),n=e.substring(0,t),r=e.substring(t+1);return mn.getHandler(n)?r:e}static handleComponentMapping(e,t,n){const r=fn.getComponent(t.type);if(!r?.mapping)return;const s=r.mapping(t.config);if(s&&s["@map"]){const t=s["@map"],{source:r}=t;if(!r)return;const a=n.getValue(r);if("function"==typeof t.advanced)t.advanced(e,a);else{const n=t.inputs_map;e[t.output_property]=[];const r=e[t.output_property];a.forEach((e=>{const t={};Object.keys(n).forEach((r=>{let s=n[r];s&&0===s.indexOf(".")?(s=s.substring(1),t[r]=e[s]):t[r]=s})),r.push(t)}))}}}static getPropertyName(e=""){if(e&&ef.isString(e)){const t=e.startsWith(G.PROPERTY_ANNOTATION)||e.startsWith(G.ATTACHMENT_ANNOTATION)||e.startsWith(G.ASSOCIATED_PROPERTY_ANNOTATION),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getLeafPropertyName(e){if(ef.isString(e)&&!!e?.startsWith(G.PROPERTY_ANNOTATION)){const t=this.getPropertyName(e),n=t.split(".");return n.length<2?t:n.pop()}return e}static isProperty(e){return ef.isString(e)&&!!e?.startsWith(G.PROPERTY_ANNOTATION)}};function yn(e,t){return function(){return e.apply(t,arguments)}}const{toString:En}=Object.prototype,{getPrototypeOf:An}=Object,{iterator:_n,toStringTag:Cn}=Symbol,Sn=(Tn=Object.create(null),e=>{const t=En.call(e);return Tn[t]||(Tn[t]=t.slice(8,-1).toLowerCase())});var Tn;const Nn=e=>(e=e.toLowerCase(),t=>Sn(t)===e),Pn=e=>t=>typeof t===e,{isArray:On}=Array,Dn=Pn("undefined");function Rn(e){return null!==e&&!Dn(e)&&null!==e.constructor&&!Dn(e.constructor)&&xn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const bn=Nn("ArrayBuffer");const vn=Pn("string"),xn=Pn("function"),wn=Pn("number"),Mn=e=>null!==e&&"object"==typeof e,Ln=e=>{if("object"!==Sn(e))return!1;const t=An(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Cn in e||_n in e)},Fn=Nn("Date"),Un=Nn("File"),jn=Nn("Blob"),kn=Nn("FileList");const Vn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},$n=void 0!==Vn.FormData?Vn.FormData:void 0,Bn=Nn("URLSearchParams"),[Gn,Wn,Hn,qn]=["ReadableStream","Request","Response","Headers"].map(Nn);function zn(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,s;if("object"!=typeof e&&(e=[e]),On(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Rn(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let o;for(r=0;r<a;r++)o=s[r],t.call(null,e[o],o,e)}}function Yn(e,t){if(Rn(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,s=n.length;for(;s-- >0;)if(r=n[s],t===r.toLowerCase())return r;return null}const Kn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Jn=e=>!Dn(e)&&e!==Kn;const Xn=(Qn="undefined"!=typeof Uint8Array&&An(Uint8Array),e=>Qn&&e instanceof Qn);var Qn;const Zn=Nn("HTMLFormElement"),er=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),tr=Nn("RegExp"),nr=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};zn(n,((n,s)=>{let a;!1!==(a=t(n,s,e))&&(r[s]=a||n)})),Object.defineProperties(e,r)};const rr=Nn("AsyncFunction"),sr=(ar="function"==typeof setImmediate,or=xn(Kn.postMessage),ar?setImmediate:or?(ir=`axios@${Math.random()}`,cr=[],Kn.addEventListener("message",(({source:e,data:t})=>{e===Kn&&t===ir&&cr.length&&cr.shift()()}),!1),e=>{cr.push(e),Kn.postMessage(ir,"*")}):e=>setTimeout(e));var ar,or,ir,cr;const lr="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Kn):"undefined"!=typeof process&&process.nextTick||sr,ur={isArray:On,isArrayBuffer:bn,isBuffer:Rn,isFormData:e=>{if(!e)return!1;if($n&&e instanceof $n)return!0;const t=An(e);if(!t||t===Object.prototype)return!1;if(!xn(e.append))return!1;const n=Sn(e);return"formdata"===n||"object"===n&&xn(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&bn(e.buffer),t},isString:vn,isNumber:wn,isBoolean:e=>!0===e||!1===e,isObject:Mn,isPlainObject:Ln,isEmptyObject:e=>{if(!Mn(e)||Rn(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Gn,isRequest:Wn,isResponse:Hn,isHeaders:qn,isUndefined:Dn,isDate:Fn,isFile:Un,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:jn,isRegExp:tr,isFunction:xn,isStream:e=>Mn(e)&&xn(e.pipe),isURLSearchParams:Bn,isTypedArray:Xn,isFileList:kn,forEach:zn,merge:function e(...t){const{caseless:n,skipUndefined:r}=Jn(this)&&this||{},s={},a=(t,a)=>{if("__proto__"===a||"constructor"===a||"prototype"===a)return;const o=n&&Yn(s,a)||a,i=er(s,o)?s[o]:void 0;Ln(i)&&Ln(t)?s[o]=e(i,t):Ln(t)?s[o]=e({},t):On(t)?s[o]=t.slice():r&&Dn(t)||(s[o]=t)};for(let e=0,n=t.length;e<n;e++)t[e]&&zn(t[e],a);return s},extend:(e,t,n,{allOwnKeys:r}={})=>(zn(t,((t,r)=>{n&&xn(t)?Object.defineProperty(e,r,{__proto__:null,value:yn(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),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,r)=>{let s,a,o;const i={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)o=s[a],r&&!r(o,e,t)||i[o]||(t[o]=e[o],i[o]=!0);e=!1!==n&&An(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Sn,kindOfTest:Nn,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(On(e))return e;let t=e.length;if(!wn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[_n]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Zn,hasOwnProperty:er,hasOwnProp:er,reduceDescriptors:nr,freezeMethods:e=>{nr(e,((t,n)=>{if(xn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];xn(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return On(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Yn,global:Kn,isContextDefined:Jn,isSpecCompliantForm:function(e){return!!(e&&xn(e.append)&&"FormData"===e[Cn]&&e[_n])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Mn(e)){if(t.indexOf(e)>=0)return;if(Rn(e))return e;if(!("toJSON"in e)){t[r]=e;const s=On(e)?[]:{};return zn(e,((e,t)=>{const a=n(e,r+1);!Dn(a)&&(s[t]=a)})),t[r]=void 0,s}}return e};return n(e,0)},isAsyncFn:rr,isThenable:e=>e&&(Mn(e)||xn(e))&&xn(e.then)&&xn(e.catch),setImmediate:sr,asap:lr,isIterable:e=>null!=e&&xn(e[_n])},dr=ur.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"]),pr=Symbol("internals"),hr=/[^\x09\x20-\x7E\x80-\xFF]/g;function gr(e){return e&&String(e).trim().toLowerCase()}function fr(e){return!1===e||null==e?e:ur.isArray(e)?e.map(fr):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(hr,""))}function mr(e,t,n,r,s){return ur.isFunction(r)?r.call(this,t,n):(s&&(t=n),ur.isString(t)?ur.isString(r)?-1!==t.indexOf(r):ur.isRegExp(r)?r.test(t):void 0:void 0)}class Ir{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function s(e,t,n){const s=gr(t);if(!s)throw new Error("header name must be a non-empty string");const a=ur.findKey(r,s);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=fr(e))}const a=(e,t)=>ur.forEach(e,((e,n)=>s(e,n,t)));if(ur.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(ur.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,r,s;return e&&e.split("\n").forEach((function(e){s=e.indexOf(":"),n=e.substring(0,s).trim().toLowerCase(),r=e.substring(s+1).trim(),!n||t[n]&&dr[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(ur.isObject(e)&&ur.isIterable(e)){let n,r,s={};for(const t of e){if(!ur.isArray(t))throw TypeError("Object iterator must return a key-value pair");s[r=t[0]]=(n=s[r])?ur.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}a(s,t)}else null!=e&&s(t,e,n);return this}get(e,t){if(e=gr(e)){const n=ur.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(ur.isFunction(t))return t.call(this,e,n);if(ur.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=gr(e)){const n=ur.findKey(this,e);return!(!n||void 0===this[n]||t&&!mr(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function s(e){if(e=gr(e)){const s=ur.findKey(n,e);!s||t&&!mr(0,n[s],s,t)||(delete n[s],r=!0)}}return ur.isArray(e)?e.forEach(s):s(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const s=t[n];e&&!mr(0,this[s],s,e,!0)||(delete this[s],r=!0)}return r}normalize(e){const t=this,n={};return ur.forEach(this,((r,s)=>{const a=ur.findKey(n,s);if(a)return t[a]=fr(r),void delete t[s];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(s):String(s).trim();o!==s&&delete t[s],t[o]=fr(r),n[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ur.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&ur.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(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[pr]=this[pr]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=gr(e);t[r]||(!function(e,t){const n=ur.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,s){return this[r].call(this,t,e,n,s)},configurable:!0})}))}(n,e),t[r]=!0)}return ur.isArray(e)?e.forEach(r):r(e),this}}Ir.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ur.reduceDescriptors(Ir.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),ur.freezeMethods(Ir);const yr=Ir;function Er(e,t){const n=new Set(t.map((e=>String(e).toLowerCase()))),r=[],s=e=>{if(null===e||"object"!=typeof e)return e;if(ur.isBuffer(e))return e;if(-1!==r.indexOf(e))return;let t;if(e instanceof yr&&(e=e.toJSON()),r.push(e),ur.isArray(e))t=[],e.forEach(((e,n)=>{const r=s(e);ur.isUndefined(r)||(t[n]=r)}));else{if(!ur.isPlainObject(e)&&function(e){if(ur.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(ur.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return r.pop(),e;t=Object.create(null);for(const[r,a]of Object.entries(e)){const e=n.has(r.toLowerCase())?"[REDACTED ****]":s(a);ur.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return s(e)}class Ar extends Error{static from(e,t,n,r,s,a){const o=new Ar(e.message,t||e.code,n,r,s);return o.cause=e,o.name=e.name,null!=e.status&&null==o.status&&(o.status=e.status),a&&Object.assign(o,a),o}constructor(e,t,n,r,s){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),r&&(this.request=r),s&&(this.response=s,this.status=s.status)}toJSON(){const e=this.config,t=e&&ur.hasOwnProp(e,"redact")?e.redact:void 0,n=ur.isArray(t)&&t.length>0?Er(e,t):ur.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}}}Ar.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ar.ERR_BAD_OPTION="ERR_BAD_OPTION",Ar.ECONNABORTED="ECONNABORTED",Ar.ETIMEDOUT="ETIMEDOUT",Ar.ECONNREFUSED="ECONNREFUSED",Ar.ERR_NETWORK="ERR_NETWORK",Ar.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ar.ERR_DEPRECATED="ERR_DEPRECATED",Ar.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ar.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ar.ERR_CANCELED="ERR_CANCELED",Ar.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ar.ERR_INVALID_URL="ERR_INVALID_URL",Ar.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const _r=Ar;function Cr(e){return ur.isPlainObject(e)||ur.isArray(e)}function Sr(e){return ur.endsWith(e,"[]")?e.slice(0,-2):e}function Tr(e,t,n){return e?e.concat(t).map((function(e,t){return e=Sr(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Nr=ur.toFlatObject(ur,{},null,(function(e){return/^is[A-Z]/.test(e)}));const Pr=function(e,t,n){if(!ur.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=ur.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!ur.isUndefined(t[e])}))).metaTokens,s=n.visitor||d,a=n.dots,o=n.indexes,i=n.Blob||"undefined"!=typeof Blob&&Blob,c=void 0===n.maxDepth?100:n.maxDepth,l=i&&ur.isSpecCompliantForm(t);if(!ur.isFunction(s))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(ur.isDate(e))return e.toISOString();if(ur.isBoolean(e))return e.toString();if(!l&&ur.isBlob(e))throw new _r("Blob is not supported. Use a Buffer instead.");return ur.isArrayBuffer(e)||ur.isTypedArray(e)?l&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,n,s){let i=e;if(ur.isReactNative(t)&&ur.isReactNativeBlob(e))return t.append(Tr(s,n,a),u(e)),!1;if(e&&!s&&"object"==typeof e)if(ur.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(ur.isArray(e)&&function(e){return ur.isArray(e)&&!e.some(Cr)}(e)||(ur.isFileList(e)||ur.endsWith(n,"[]"))&&(i=ur.toArray(e)))return n=Sr(n),i.forEach((function(e,r){!ur.isUndefined(e)&&null!==e&&t.append(!0===o?Tr([n],r,a):null===o?n:n+"[]",u(e))})),!1;return!!Cr(e)||(t.append(Tr(s,n,a),u(e)),!1)}const p=[],h=Object.assign(Nr,{defaultVisitor:d,convertValue:u,isVisitable:Cr});if(!ur.isObject(e))throw new TypeError("data must be an object");return function e(n,r,a=0){if(!ur.isUndefined(n)){if(a>c)throw new _r("Object is too deeply nested ("+a+" levels). Max depth: "+c,_r.ERR_FORM_DATA_DEPTH_EXCEEDED);if(-1!==p.indexOf(n))throw Error("Circular reference detected in "+r.join("."));p.push(n),ur.forEach(n,(function(n,o){!0===(!(ur.isUndefined(n)||null===n)&&s.call(t,n,ur.isString(o)?o.trim():o,r,h))&&e(n,r?r.concat(o):[o],a+1)})),p.pop()}}(e),t};function Or(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,(function(e){return t[e]}))}function Dr(e,t){this._pairs=[],e&&Pr(e,this,t)}const Rr=Dr.prototype;Rr.append=function(e,t){this._pairs.push([e,t])},Rr.toString=function(e){const t=e?function(t){return e.call(this,t,Or)}:Or;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const br=Dr;function vr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function xr(e,t,n){if(!t)return e;const r=n&&n.encode||vr,s=ur.isFunction(n)?{serialize:n}:n,a=s&&s.serialize;let o;if(o=a?a(t,s):ur.isURLSearchParams(t)?t.toString():new br(t,s).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const wr=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ur.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Mr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Lr={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:br,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Fr="undefined"!=typeof window&&"undefined"!=typeof document,Ur="object"==typeof navigator&&navigator||void 0,jr=Fr&&(!Ur||["ReactNative","NativeScript","NS"].indexOf(Ur.product)<0),kr="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Vr=Fr&&window.location.href||"http://localhost",$r={...l,...Lr};const Br=function(e){function t(e,n,r,s){let a=e[s++];if("__proto__"===a)return!0;const o=Number.isFinite(+a),i=s>=e.length;if(a=!a&&ur.isArray(r)?r.length:a,i)return ur.hasOwnProp(r,a)?r[a]=ur.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o;r[a]&&ur.isObject(r[a])||(r[a]=[]);return t(e,n,r[a],s)&&ur.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}(r[a])),!o}if(ur.isFormData(e)&&ur.isFunction(e.entries)){const n={};return ur.forEachEntry(e,((e,r)=>{t(function(e){return ur.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},Gr=(e,t)=>null!=e&&ur.hasOwnProp(e,t)?e[t]:void 0;const Wr={transitional:Mr,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,s=ur.isObject(e);s&&ur.isHTMLForm(e)&&(e=new FormData(e));if(ur.isFormData(e))return r?JSON.stringify(Br(e)):e;if(ur.isArrayBuffer(e)||ur.isBuffer(e)||ur.isStream(e)||ur.isFile(e)||ur.isBlob(e)||ur.isReadableStream(e))return e;if(ur.isArrayBufferView(e))return e.buffer;if(ur.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){const t=Gr(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Pr(e,new $r.classes.URLSearchParams,{visitor:function(e,t,n,r){return $r.isNode&&ur.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((a=ur.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=Gr(this,"env"),r=n&&n.FormData;return Pr(a?{"files[]":e}:e,r&&new r,t)}}return s||r?(t.setContentType("application/json",!1),function(e,t,n){if(ur.isString(e))try{return(t||JSON.parse)(e),ur.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=Gr(this,"transitional")||Wr.transitional,n=t&&t.forcedJSONParsing,r=Gr(this,"responseType"),s="json"===r;if(ur.isResponse(e)||ur.isReadableStream(e))return e;if(e&&ur.isString(e)&&(n&&!r||s)){const n=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(e,Gr(this,"parseReviver"))}catch(e){if(n){if("SyntaxError"===e.name)throw _r.from(e,_r.ERR_BAD_RESPONSE,this,null,Gr(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$r.classes.FormData,Blob:$r.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ur.forEach(["delete","get","head","post","put","patch","query"],(e=>{Wr.headers[e]={}}));const Hr=Wr;function qr(e,t){const n=this||Hr,r=t||n,s=yr.from(r.headers);let a=r.data;return ur.forEach(e,(function(e){a=e.call(n,a,s.normalize(),t?t.status:void 0)})),s.normalize(),a}function zr(e){return!(!e||!e.__CANCEL__)}const Yr=class extends _r{constructor(e,t,n){super(null==e?"canceled":e,_r.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Kr(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new _r("Request failed with status code "+n.status,n.status>=400&&n.status<500?_r.ERR_BAD_REQUEST:_r.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}const Jr=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s,a=0,o=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),l=r[o];s||(s=c),n[a]=i,r[a]=c;let u=o,d=0;for(;u!==a;)d+=n[u++],u%=e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),c-s<t)return;const p=l&&c-l;return p?Math.round(1e3*d/p):void 0}};const Xr=function(e,t){let n,r,s=0,a=1e3/t;const o=(t,a=Date.now())=>{s=a,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),i=t-s;i>=a?o(e,t):(n=e,r||(r=setTimeout((()=>{r=null,o(n)}),a-i)))},()=>n&&o(n)]},Qr=(e,t,n=3)=>{let r=0;const s=Jr(50,250);return Xr((n=>{const a=n.loaded,o=n.lengthComputable?n.total:void 0,i=null!=o?Math.min(a,o):a,c=Math.max(0,i-r),l=s(c);r=Math.max(r,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)},Zr=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},es=e=>(...t)=>ur.asap((()=>e(...t))),ts=$r.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,$r.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL($r.origin),$r.navigator&&/(msie|trident)/i.test($r.navigator.userAgent)):()=>!0,ns=$r.hasStandardBrowserEnv?{write(e,t,n,r,s,a,o){if("undefined"==typeof document)return;const i=[`${e}=${encodeURIComponent(t)}`];ur.isNumber(n)&&i.push(`expires=${new Date(n).toUTCString()}`),ur.isString(r)&&i.push(`path=${r}`),ur.isString(s)&&i.push(`domain=${s}`),!0===a&&i.push("secure"),ur.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 r=t[n].replace(/^\s+/,""),s=r.indexOf("=");if(-1!==s&&r.slice(0,s)===e)return decodeURIComponent(r.slice(s+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function rs(e,t,n){let r=!("string"==typeof(s=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s));var s;return e&&(r||!1===n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const ss=e=>e instanceof yr?{...e}:e;function as(e,t){t=t||{};const n=Object.create(null);function r(e,t,n,r){return ur.isPlainObject(e)&&ur.isPlainObject(t)?ur.merge.call({caseless:r},e,t):ur.isPlainObject(t)?ur.merge({},t):ur.isArray(t)?t.slice():t}function s(e,t,n,s){return ur.isUndefined(t)?ur.isUndefined(e)?void 0:r(void 0,e,0,s):r(e,t,0,s)}function a(e,t){if(!ur.isUndefined(t))return r(void 0,t)}function o(e,t){return ur.isUndefined(t)?ur.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(n,s,a){return ur.hasOwnProp(t,a)?r(n,s):ur.hasOwnProp(e,a)?r(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,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:i,headers:(e,t,n)=>s(ss(e),ss(t),0,!0)};return ur.forEach(Object.keys({...e,...t}),(function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const a=ur.hasOwnProp(c,r)?c[r]:s,o=a(ur.hasOwnProp(e,r)?e[r]:void 0,ur.hasOwnProp(t,r)?t[r]:void 0,r);ur.isUndefined(o)&&a!==i||(n[r]=o)})),n}const os=["content-type","content-length"];const is=e=>{const t=as({},e),n=e=>ur.hasOwnProp(t,e)?t[e]:void 0,r=n("data");let s=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");var p;if(t.headers=i=yr.from(i),t.url=xr(rs(l,d,u),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?(p=c.password,encodeURIComponent(p).replace(/%([0-9A-F]{2})/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))):""))),ur.isFormData(r)&&($r.hasStandardBrowserEnv||$r.hasStandardBrowserWebWorkerEnv?i.setContentType(void 0):ur.isFunction(r.getHeaders)&&function(e,t,n){"content-only"===n?Object.entries(t).forEach((([t,n])=>{os.includes(t.toLowerCase())&&e.set(t,n)})):e.set(t)}(i,r.getHeaders(),n("formDataHeaderPolicy"))),$r.hasStandardBrowserEnv){ur.isFunction(s)&&(s=s(t));if(!0===s||null==s&&ts(t.url)){const e=a&&o&&ns.read(o);e&&i.set(a,e)}}return t},cs="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=is(e);let s=r.data;const a=yr.from(r.headers).normalize();let o,i,c,l,u,{responseType:d,onUploadProgress:p,onDownloadProgress:h}=r;function g(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let f=new XMLHttpRequest;function m(){if(!f)return;const r=yr.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());Kr((function(e){t(e),g()}),(function(e){n(e),g()}),{data:d&&"text"!==d&&"json"!==d?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f}),f=null}f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout,"onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&f.responseURL.startsWith("file:"))&&setTimeout(m)},f.onabort=function(){f&&(n(new _r("Request aborted",_r.ECONNABORTED,e,f)),g(),f=null)},f.onerror=function(t){const r=t&&t.message?t.message:"Network Error",s=new _r(r,_r.ERR_NETWORK,e,f);s.event=t||null,n(s),g(),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||Mr;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new _r(t,s.clarifyTimeoutError?_r.ETIMEDOUT:_r.ECONNABORTED,e,f)),g(),f=null},void 0===s&&a.setContentType(null),"setRequestHeader"in f&&ur.forEach(a.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),ur.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),d&&"json"!==d&&(f.responseType=r.responseType),h&&([c,u]=Qr(h,!0),f.addEventListener("progress",c)),p&&f.upload&&([i,l]=Qr(p),f.upload.addEventListener("progress",i),f.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(o=t=>{f&&(n(!t||t.type?new Yr(null,e,f):t),f.abort(),g(),f=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const I=function(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}(r.url);!I||$r.protocols.includes(I)?f.send(s||null):n(new _r("Unsupported protocol "+I+":",_r.ERR_BAD_REQUEST,e))}))},ls=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const s=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof _r?t:new Yr(t instanceof Error?t.message:t))}};let a=t&&setTimeout((()=>{a=null,s(new _r(`timeout of ${t}ms exceeded`,_r.ETIMEDOUT))}),t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)})),e=null)};e.forEach((e=>e.addEventListener("abort",s)));const{signal:i}=r;return i.unsubscribe=()=>ur.asap(o),i}},us=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,s=0;for(;s<n;)r=s+t,yield e.slice(s,r),s=r},ds=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()}},ps=(e,t,n,r)=>{const s=async function*(e,t){for await(const n of ds(e))yield*us(n,t)}(e,t);let a,o=0,i=e=>{a||(a=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await s.next();if(t)return i(),void e.close();let a=r.byteLength;if(n){let e=o+=a;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw i(e),e}},cancel:e=>(i(e),s.return())},{highWaterMark:2})};const hs="1.16.0",{isFunction:gs}=ur,fs=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},ms=e=>{const t=ur.global??globalThis,{ReadableStream:n,TextEncoder:r}=t;e=ur.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:o}=e,i=s?gs(s):"function"==typeof fetch,c=gs(a),l=gs(o);if(!i)return!1;const u=i&&gs(n),d=i&&("function"==typeof r?(p=new r,e=>p.encode(e)):async e=>new Uint8Array(await new a(e).arrayBuffer()));var p;const h=c&&u&&fs((()=>{let e=!1;const t=new a($r.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r})),g=l&&u&&fs((()=>ur.isReadableStream(new o("").body))),f={stream:g&&(e=>e.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!f[e]&&(f[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new _r(`Response type '${e}' is not supported`,_r.ERR_NOT_SUPPORT,n)})}));const m=async(e,t)=>{const n=ur.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(ur.isBlob(e))return e.size;if(ur.isSpecCompliantForm(e)){const t=new a($r.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return ur.isArrayBufferView(e)||ur.isArrayBuffer(e)?e.byteLength:(ur.isURLSearchParams(e)&&(e+=""),ur.isString(e)?(await d(e)).byteLength:void 0)})(t):n};return async e=>{let{url:t,method:n,data:i,signal:l,cancelToken:u,timeout:d,onDownloadProgress:p,onUploadProgress:I,responseType:y,headers:E,withCredentials:A="same-origin",fetchOptions:_,maxContentLength:C,maxBodyLength:S}=is(e);const T=ur.isNumber(C)&&C>-1,N=ur.isNumber(S)&&S>-1;let P=s||fetch;y=y?(y+"").toLowerCase():"text";let O=ls([l,u&&u.toAbortSignal()],d),D=null;const R=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let b;try{if(T&&"string"==typeof t&&t.startsWith("data:")){const n=function(e){if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length;const t=r.length;for(let n=0;n<t;n++)if(37===r.charCodeAt(n)&&n+2<t){const t=r.charCodeAt(n+1),s=r.charCodeAt(n+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(s>=48&&s<=57||s>=65&&s<=70||s>=97&&s<=102)&&(e-=2,n+=2)}let n=0,s=t-1;const a=e=>e>=2&&37===r.charCodeAt(e-2)&&51===r.charCodeAt(e-1)&&(68===r.charCodeAt(e)||100===r.charCodeAt(e));s>=0&&(61===r.charCodeAt(s)?(n++,s--):a(s)&&(n++,s-=3)),1===n&&s>=0&&(61===r.charCodeAt(s)||a(s))&&n++;const o=3*Math.floor(e/4)-(n||0);return o>0?o:0}if("undefined"!=typeof Buffer&&"function"==typeof Buffer.byteLength)return Buffer.byteLength(r,"utf8");let s=0;for(let e=0,t=r.length;e<t;e++){const n=r.charCodeAt(e);if(n<128)s+=1;else if(n<2048)s+=2;else if(n>=55296&&n<=56319&&e+1<t){const t=r.charCodeAt(e+1);t>=56320&&t<=57343?(s+=4,e++):s+=3}else s+=3}return s}(t);if(n>C)throw new _r("maxContentLength size of "+C+" exceeded",_r.ERR_BAD_RESPONSE,e,D)}if(N&&"get"!==n&&"head"!==n){const t=await m(E,i);if("number"==typeof t&&isFinite(t)&&t>S)throw new _r("Request body larger than maxBodyLength limit",_r.ERR_BAD_REQUEST,e,D)}if(I&&h&&"get"!==n&&"head"!==n&&0!==(b=await m(E,i))){let e,n=new a(t,{method:"POST",body:i,duplex:"half"});if(ur.isFormData(i)&&(e=n.headers.get("content-type"))&&E.setContentType(e),n.body){const[e,t]=Zr(b,Qr(es(I)));i=ps(n.body,65536,e,t)}}ur.isString(A)||(A=A?"include":"omit");const s=c&&"credentials"in a.prototype;if(ur.isFormData(i)){const e=E.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&E.delete("content-type")}E.set("User-Agent","axios/"+hs,!1);const l={..._,signal:O,method:n.toUpperCase(),headers:E.normalize().toJSON(),body:i,duplex:"half",credentials:s?A:void 0};D=c&&new a(t,l);let u=await(c?P(D,_):P(t,l));if(T){const t=ur.toFiniteNumber(u.headers.get("content-length"));if(null!=t&&t>C)throw new _r("maxContentLength size of "+C+" exceeded",_r.ERR_BAD_RESPONSE,e,D)}const d=g&&("stream"===y||"response"===y);if(g&&u.body&&(p||T||d&&R)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=u[e]}));const n=ur.toFiniteNumber(u.headers.get("content-length")),[r,s]=p&&Zr(n,Qr(es(p),!0))||[];let a=0;const i=t=>{if(T&&(a=t,a>C))throw new _r("maxContentLength size of "+C+" exceeded",_r.ERR_BAD_RESPONSE,e,D);r&&r(t)};u=new o(ps(u.body,65536,i,(()=>{s&&s(),R&&R()})),t)}y=y||"text";let v=await f[ur.findKey(f,y)||"text"](u,e);if(T&&!g&&!d){let t;if(null!=v&&("number"==typeof v.byteLength?t=v.byteLength:"number"==typeof v.size?t=v.size:"string"==typeof v&&(t="function"==typeof r?(new r).encode(v).byteLength:v.length)),"number"==typeof t&&t>C)throw new _r("maxContentLength size of "+C+" exceeded",_r.ERR_BAD_RESPONSE,e,D)}return!d&&R&&R(),await new Promise(((t,n)=>{Kr(t,n,{data:v,headers:yr.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:D})}))}catch(t){if(R&&R(),O&&O.aborted&&O.reason instanceof _r){const n=O.reason;throw n.config=e,D&&(n.request=D),t!==n&&(n.cause=t),n}if(t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new _r("Network Error",_r.ERR_NETWORK,e,D,t&&t.response),{cause:t.cause||t});throw _r.from(t,t&&t.code,e,D,t&&t.response)}}},Is=new Map,ys=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let o,i,c=a.length,l=Is;for(;c--;)o=a[c],i=l.get(o),void 0===i&&l.set(o,i=c?new Map:ms(t)),l=i;return i},Es=(ys(),{http:null,xhr:cs,fetch:{get:ys}});ur.forEach(Es,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}}));const As=e=>`- ${e}`,_s=e=>ur.isFunction(e)||null===e||!1===e;const Cs={getAdapter:function(e,t){e=ur.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let o=0;o<n;o++){let n;if(r=e[o],s=r,!_s(r)&&(s=Es[(n=String(r)).toLowerCase()],void 0===s))throw new _r(`Unknown adapter '${n}'`);if(s&&(ur.isFunction(s)||(s=s.get(t))))break;a[n||"#"+o]=s}if(!s){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(As).join("\n"):" "+As(e[0]):"as no adapter specified";throw new _r("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return s},adapters:Es};function Ss(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Yr(null,e)}function Ts(e){Ss(e),e.headers=yr.from(e.headers),e.data=qr.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Cs.getAdapter(e.adapter||Hr.adapter,e)(e).then((function(t){Ss(e),e.response=t;try{t.data=qr.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=yr.from(t.headers),t}),(function(t){if(!zr(t)&&(Ss(e),t&&t.response)){e.response=t.response;try{t.response.data=qr.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=yr.from(t.response.headers)}return Promise.reject(t)}))}const Ns={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ns[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Ps={};Ns.transitional=function(e,t,n){function r(e,t){return"[Axios v"+hs+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,s,a)=>{if(!1===e)throw new _r(r(s," has been removed"+(t?" in "+t:"")),_r.ERR_DEPRECATED);return t&&!Ps[s]&&(Ps[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,s,a)}},Ns.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Os={assertOptions:function(e,t,n){if("object"!=typeof e)throw new _r("options must be an object",_r.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],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 _r("option "+a+" must be "+n,_r.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new _r("Unknown option "+a,_r.ERR_BAD_OPTION)}},validators:Ns},Ds=Os.validators;class Rs{constructor(e){this.defaults=e||{},this.interceptors={request:new wr,response:new wr}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=(()=>{if(!t.stack)return"";const e=t.stack.indexOf("\n");return-1===e?"":t.stack.slice(e+1)})();try{if(e.stack){if(n){const t=n.indexOf("\n"),r=-1===t?-1:n.indexOf("\n",t+1),s=-1===r?"":n.slice(r+1);String(e.stack).endsWith(s)||(e.stack+="\n"+n)}}else e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=as(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:s}=t;void 0!==n&&Os.assertOptions(n,{silentJSONParsing:Ds.transitional(Ds.boolean),forcedJSONParsing:Ds.transitional(Ds.boolean),clarifyTimeoutError:Ds.transitional(Ds.boolean),legacyInterceptorReqResOrdering:Ds.transitional(Ds.boolean)},!1),null!=r&&(ur.isFunction(r)?t.paramsSerializer={serialize:r}:Os.assertOptions(r,{encode:Ds.function,serialize:Ds.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Os.assertOptions(t,{baseUrl:Ds.spelling("baseURL"),withXsrfToken:Ds.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=s&&ur.merge(s.common,s[t.method]);s&&ur.forEach(["delete","get","head","post","put","patch","query","common"],(e=>{delete s[e]})),t.headers=yr.concat(a,s);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||Mr;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=[Ts.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(p)}catch(e){t.call(this,e);break}}try{l=Ts.call(this,p)}catch(e){return Promise.reject(e)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(e){return xr(rs((e=as(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}ur.forEach(["delete","get","head","options"],(function(e){Rs.prototype[e]=function(t,n){return this.request(as(n||{},{method:e,url:t,data:(n||{}).data}))}})),ur.forEach(["post","put","patch","query"],(function(e){function t(t){return function(n,r,s){return this.request(as(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Rs.prototype[e]=t(),"query"!==e&&(Rs.prototype[e+"Form"]=t(!0))}));const bs=Rs;class vs{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,s){n.reason||(n.reason=new Yr(e,r,s),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}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 vs((function(t){e=t})),cancel:e}}}const xs=vs;const ws={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ws).forEach((([e,t])=>{ws[t]=e}));const Ms=ws;const Ls=function e(t){const n=new bs(t),r=yn(bs.prototype.request,n);return ur.extend(r,bs.prototype,n,{allOwnKeys:!0}),ur.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(as(t,n))},r}(Hr);Ls.Axios=bs,Ls.CanceledError=Yr,Ls.CancelToken=xs,Ls.isCancel=zr,Ls.VERSION=hs,Ls.toFormData=Pr,Ls.AxiosError=_r,Ls.Cancel=Ls.CanceledError,Ls.all=function(e){return Promise.all(e)},Ls.spread=function(e){return function(t){return e.apply(null,t)}},Ls.isAxiosError=function(e){return ur.isObject(e)&&!0===e.isAxiosError},Ls.mergeConfig=as,Ls.AxiosHeaders=yr,Ls.formToJSON=e=>Br(ur.isHTMLForm(e)?new FormData(e):e),Ls.getAdapter=Cs.getAdapter,Ls.HttpStatusCode=Ms,Ls.default=Ls;const Fs=Ls;function Us(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 js=Us((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));var ks=function(e,t){return ks=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])},ks(e,t)};function Vs(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}ks(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function $s(e,t,n,r){return new(n||(n=Promise))((function(s,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function i(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,i)}c((r=r.apply(e,t||[])).next())}))}function Bs(e,t){var n,r,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[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,r&&(s=2&i[0]?r.return:i[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,i[1])).done)return s;switch(r=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(s=a.trys,(s=s.length>0&&s[s.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){a.label=i[1];break}if(6===i[0]&&a.label<s[1]){a.label=s[1],s=i;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(i);break}s[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}Object.create;function Gs(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ws(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,s,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){s={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(s)throw s.error}}return o}function Hs(e,t,n){if(n||2===arguments.length)for(var r,s=0,a=t.length;s<a;s++)!r&&s in t||(r||(r=Array.prototype.slice.call(t,0,s)),r[s]=t[s]);return e.concat(r||Array.prototype.slice.call(t))}function qs(e){return this instanceof qs?(this.v=e,this):new qs(e)}function zs(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,s=n.apply(e,t||[]),a=[];return r=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)}})),r[Symbol.asyncIterator]=function(){return this},r;function o(e,t){s[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||i(e,t)}))},t&&(r[e]=t(r[e])))}function i(e,t){try{(n=s[e](t)).value instanceof qs?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 Ys(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Gs(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,s){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,s,(t=e[n](t)).done,t.value)}))}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;var Ks=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Js(e){return"function"==typeof e}function Xs(e){return Js(null==e?void 0:e.then)}var Qs=Us((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 Zs(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var ea=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,s;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=Gs(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(Js(c))try{c()}catch(e){s=e instanceof Qs?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=Gs(l),d=u.next();!d.done;d=u.next()){var p=d.value;try{ra(p)}catch(e){s=null!=s?s:[],e instanceof Qs?s=Hs(Hs([],Ws(s)),Ws(e.errors)):s.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(s)throw new Qs(s)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)ra(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)&&Zs(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&Zs(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),ta=ea.EMPTY;function na(e){return e instanceof ea||e&&"closed"in e&&Js(e.remove)&&Js(e.add)&&Js(e.unsubscribe)}function ra(e){Js(e)?e():e.unsubscribe()}var sa={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},aa={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var s=aa.delegate;return(null==s?void 0:s.setTimeout)?s.setTimeout.apply(s,Hs([e,t],Ws(n))):setTimeout.apply(void 0,Hs([e,t],Ws(n)))},clearTimeout:function(e){var t=aa.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function oa(e){aa.setTimeout((function(){var t=sa.onUnhandledError;if(!t)throw e;t(e)}))}function ia(){}var ca=la("C",void 0,void 0);function la(e,t,n){return{kind:e,value:t,error:n}}var ua=null;function da(e){if(sa.useDeprecatedSynchronousErrorHandling){var t=!ua;if(t&&(ua={errorThrown:!1,error:null}),e(),t){var n=ua,r=n.errorThrown,s=n.error;if(ua=null,r)throw s}}else e()}var pa=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,na(t)&&t.add(n)):n.destination=Ea,n}return Vs(t,e),t.create=function(e,t,n){return new ma(e,t,n)},t.prototype.next=function(e){this.isStopped?ya(function(e){return la("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?ya(la("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?ya(ca,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}(ea),ha=Function.prototype.bind;function ga(e,t){return ha.call(e,t)}var fa=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){Ia(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Ia(e)}else Ia(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Ia(e)}},e}(),ma=function(e){function t(t,n,r){var s,a,o=e.call(this)||this;Js(t)||!t?s={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:o&&sa.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return o.unsubscribe()},s={next:t.next&&ga(t.next,a),error:t.error&&ga(t.error,a),complete:t.complete&&ga(t.complete,a)}):s=t;return o.destination=new fa(s),o}return Vs(t,e),t}(pa);function Ia(e){var t;sa.useDeprecatedSynchronousErrorHandling?(t=e,sa.useDeprecatedSynchronousErrorHandling&&ua&&(ua.errorThrown=!0,ua.error=t)):oa(e)}function ya(e,t){var n=sa.onStoppedNotification;n&&aa.setTimeout((function(){return n(e,t)}))}var Ea={closed:!0,next:ia,error:function(e){throw e},complete:ia},Aa="function"==typeof Symbol&&Symbol.observable||"@@observable";function _a(e){return e}function Ca(e){return 0===e.length?_a:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var Sa=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,s=this,a=(r=e)&&r instanceof pa||function(e){return e&&Js(e.next)&&Js(e.error)&&Js(e.complete)}(r)&&na(r)?e:new ma(e,t,n);return da((function(){var e=s,t=e.operator,n=e.source;a.add(t?t.call(a,n):n?s._subscribe(a):s._trySubscribe(a))})),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=Ta(t))((function(t,r){var s=new ma({next:function(t){try{e(t)}catch(e){r(e),s.unsubscribe()}},error:r,complete:t});n.subscribe(s)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[Aa]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ca(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Ta(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function Ta(e){var t;return null!==(t=null!=e?e:sa.Promise)&&void 0!==t?t:Promise}function Na(e){return Js(e[Aa])}function Pa(e){return Symbol.asyncIterator&&Js(null==e?void 0:e[Symbol.asyncIterator])}function Oa(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 Da="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Ra(e){return Js(null==e?void 0:e[Da])}function ba(e){return zs(this,arguments,(function(){var t,n,r;return Bs(this,(function(s){switch(s.label){case 0:t=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,qs(t.read())];case 3:return n=s.sent(),r=n.value,n.done?[4,qs(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,qs(r)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function va(e){return Js(null==e?void 0:e.getReader)}function xa(e){if(e instanceof Sa)return e;if(null!=e){if(Na(e))return s=e,new Sa((function(e){var t=s[Aa]();if(Js(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(Ks(e))return r=e,new Sa((function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()}));if(Xs(e))return n=e,new Sa((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,oa)}));if(Pa(e))return wa(e);if(Ra(e))return t=e,new Sa((function(e){var n,r;try{for(var s=Gs(t),a=s.next();!a.done;a=s.next()){var o=a.value;if(e.next(o),e.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}e.complete()}));if(va(e))return wa(ba(e))}var t,n,r,s;throw Oa(e)}function wa(e){return new Sa((function(t){(function(e,t){var n,r,s,a;return $s(this,void 0,void 0,(function(){var o,i;return Bs(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=Ys(e),c.label=1;case 1:return[4,n.next()];case 2:if((r=c.sent()).done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i=c.sent(),s={error:i},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function Ma(e,t,n,r,s){void 0===r&&(r=0),void 0===s&&(s=!1);var a=t.schedule((function(){n(),s?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(a),!s)return a}function La(e){return function(t){if(function(e){return Js(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 Fa(e,t,n,r,s){return new Ua(e,t,n,r,s)}var Ua=function(e){function t(t,n,r,s,a,o){var i=e.call(this,t)||this;return i.onFinalize=a,i.shouldUnsubscribe=o,i._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,i._error=s?function(e){try{s(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,i._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,i}return Vs(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}(pa);function ja(e,t){return void 0===t&&(t=0),La((function(n,r){n.subscribe(Fa(r,(function(n){return Ma(r,e,(function(){return r.next(n)}),t)}),(function(){return Ma(r,e,(function(){return r.complete()}),t)}),(function(n){return Ma(r,e,(function(){return r.error(n)}),t)})))}))}function ka(e,t){return void 0===t&&(t=0),La((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}function Va(e,t){if(!e)throw new Error("Iterable cannot be null");return new Sa((function(n){Ma(n,t,(function(){var r=e[Symbol.asyncIterator]();Ma(n,t,(function(){r.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function $a(e,t){if(null!=e){if(Na(e))return function(e,t){return xa(e).pipe(ka(t),ja(t))}(e,t);if(Ks(e))return function(e,t){return new Sa((function(n){var r=0;return t.schedule((function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())}))}))}(e,t);if(Xs(e))return function(e,t){return xa(e).pipe(ka(t),ja(t))}(e,t);if(Pa(e))return Va(e,t);if(Ra(e))return function(e,t){return new Sa((function(n){var r;return Ma(n,t,(function(){r=e[Da](),Ma(n,t,(function(){var e,t,s;try{t=(e=r.next()).value,s=e.done}catch(e){return void n.error(e)}s?n.complete():n.next(t)}),0,!0)})),function(){return Js(null==r?void 0:r.return)&&r.return()}}))}(e,t);if(va(e))return function(e,t){return Va(ba(e),t)}(e,t)}throw Oa(e)}function Ba(e,t){return t?$a(e,t):xa(e)}function Ga(e,t,n){var r=Js(e)||t||n?{next:e,error:t,complete:n}:e;return r?La((function(e,t){var n;null===(n=r.subscribe)||void 0===n||n.call(r);var s=!0;e.subscribe(Fa(t,(function(e){var n;null===(n=r.next)||void 0===n||n.call(r,e),t.next(e)}),(function(){var e;s=!1,null===(e=r.complete)||void 0===e||e.call(r),t.complete()}),(function(e){var n;s=!1,null===(n=r.error)||void 0===n||n.call(r,e),t.error(e)}),(function(){var e,t;s&&(null===(e=r.unsubscribe)||void 0===e||e.call(r)),null===(t=r.finalize)||void 0===t||t.call(r)})))})):_a}function Wa(e){return La((function(t,n){var r,s=null,a=!1;s=t.subscribe(Fa(n,void 0,void 0,(function(o){r=xa(e(o,Wa(e)(t))),s?(s.unsubscribe(),s=null,r.subscribe(n)):a=!0}))),a&&(s.unsubscribe(),s=null,r.subscribe(n))}))}class Ha{constructor(e,t,n={}){this.type=e,this.name=t,this.parent=null,this.children=[],this.eventSubscribers=[],this.value="",this.previousValue="|~#-old-#~|",this.props=n,this.references=new Map}addReference(e,t){this.references.set(e,t)}getReference(e){return e?this.references.get(e):void 0}getNode(e,t,n){return this.children.find((r=>r.type===e&&r.name===t&&r.props.index===n))}addNode(e,t,n={}){let r=this.getNode(e,t,n.index);return r?r.props=n:(r=new Ha(e,t,n),r.parent=this,this.children.push(r)),r}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e,t=!1){this.eventSubscribers.forEach((t=>{t(e)})),!t&&this.parent&&this.parent.triggerEvent(e)}setPreviousDefaultValue(){"|~#-old-#~|"===this.previousValue&&(this.previousValue=this.value)}removeReference(e,t){const n=this.references.get(e);n?.props?.index===t&&this.references.delete(e)}removeChildNode(e){const t=this.children.findIndex((t=>t.name.startsWith(e)));-1!==t&&this.children.splice(t,1)}removeChildren(){this.children.splice(0,this.children.length)}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const r=this.children[n];if(r.props.index===t&&r.name===e){this.children.splice(n,1);break}}}}const qa=Ha;const za=class{constructor(e,t,n,r={}){this.type=B.CONTEXT_TREE_NODE_TYPES.WHEN,this.subType=e,this.referenceName=t,this.name=n,this.props=r}},Ya=/(([^.]+)\[\d+\])/g,Ka=e=>{if((e?.split(".")??[]).length<3)return[e];const t=e?.match(Ya);if(!t)return[e];let n,r=t[t.length-1];return e=e?.split(r)[0],e=e?.substring(0,e.length-1),[r,n]=r.split("["),n=n?.split("]")[0],[e,r,n]},Ja=(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:Xa,WHEN:Qa,DECLARATIVE_TARGET:Za,PAGELIST:eo}=G.CONTEXT_TREE_NODE_TYPES;const to=class{constructor(e,t,n={}){this.type=e,this.name=t,this.children=[],this.eventSubscribers=[],this.props=n,this.references=new Map([[Xa,new Map],[Qa,new Map],[Za,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===eo){const n=this.references.get(Xa);n.set(e,t),this.references.set(Xa,n)}}}removePageListNodes(e,t){const n=this.children.filter((t=>t.name.startsWith(e))).filter((n=>{const r=Ja(n.name,e);return-1!==r&&+r>=t}));n.length>0&&n.forEach((e=>{this.removeChildNode(e.name,t)}))}removeChildNode(e,t){const n=this.children.findIndex((t=>t.name.startsWith(e)));if(-1!==n){const[t]=this.children.splice(n,1),r=t?.parent;r?.removeChildNode(e)}const r=this.references.get(Xa),s=this.references.get(Za);[...r.keys(),...s.keys()].filter((t=>t.startsWith(e))).filter((e=>{const[,,n]=Ka(e);return+n>=t})).forEach((e=>{const t=r.get(e),n=t?.parent;n?.removeChildren(),r.delete(e)}))}getReference(e,t){if(this.references.has(t))return this.references.get(t)?.get(e)}getNode(e,t,n){return this.children.find((r=>r.type===e&&r.name===t&&r.props.index===n))}addNode(e,t,n={}){let r=this.getNode(e,t,n.index);return r?r.props=n:(r=new qa(e,t,n),r.parent=this,this.children.push(r)),r}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e){this.eventSubscribers.forEach((t=>{t(e)}))}removeReference(e,t,n){const r=this.references.get(t),s=r?.get(e);s?.props?.index===n&&r.delete(e)}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const r=this.children[n];if(r.props.index===t&&r.name===e){this.children.splice(n,1);break}}}addWhen(e,t,n,r,s){if(!(n&&r&&e&&t))return;n.startsWith(".")&&(n=n.substring(1));const a=`${e}.${n}.${r}`,o=new za(t,n,r,s),i=this.references.get("WHEN");i?.set(a,o)}},{VIEW:no,FIELD:ro,CONTEXT:so,DECLARATIVE_TARGET:ao,WHEN:oo}=B.CONTEXT_TREE_NODE_TYPES;const io=new class{constructor(){this.rootNodes={}}_isContextNodeExist(e){return Object.keys(this.rootNodes).includes(e)}addContextNode(e){if(!this._isContextNodeExist(e)){const t=new to(so,e);this.rootNodes[e]=t}return this.rootNodes[e]}getContextNode(e){return e?this.rootNodes[e]:void 0}addPageNode(e,t){return this.addContextNode(e).addNode("PAGE",t)}_addParentViewNode(e,t,n){const r=this.addContextNode(e).addNode("PAGE",t);let s=r.getReference(n);return s||(s=r.addNode("VIEW",n),r.addReference(n,s)),s}pushChildPageNodeToParentView(e,t,n){const r=e.children;let s=!1;if(r)for(let e=0;e<r.length;e+=1)if(r[e].name===n){s=!0;break}s||r.push(t),t.parent=e}addViewNode(e,t,n,r){const s=this.addContextNode(e).addNode("PAGE",t);let a=null;if(r&&n!==r){a=this._addParentViewNode(e,t,r).addNode("VIEW",n)}else a=s.addNode("VIEW",n);s.addReference(n,a);const o=t.split(".");for(;o.length>0;){o.pop();const n=o.join("."),a=this.getContextNode(e)?.getNode("PAGE",n),i=a?.getReference(r);if(i){this.pushChildPageNodeToParentView(i,s,t);break}}return a}getViewNode(e,t,n){return this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n)}addPageListNode(e,t,n,r,s){if(!r)return;r.startsWith(".")&&(r=r.substring(1));const a=this.addContextNode(e),o=a.addNode("PAGE",t)?.getReference(n)?.addNode("PAGELIST",`${t}.${r}`,s);return o&&a.addReference(`${t}.${r}`,o),o}updatePageListNode(e,t,n,r){if(!n)return;n.startsWith(".")&&(n=n.substring(1));this.addContextNode(e).removePageListNodes(`${t}.${n}`,r)}removeFieldNode(e,t,n,r,s){const a=this.getContextNode(e);a?.getNode("PAGE",t)?.getReference(n)?.removeNode(`${t}${r}`,s),a?.removeReference(`${t}${r}`,ro,s),a?.removeReference(`${t}${r}`,ao,s)}removeViewNode(e,t,n,r){const s=this.getContextNode(e),a=s?.getNode("PAGE",t),o=a?.getReference(n);this.removeChildViewNodes(e,t,n,r);const i=o?.parent?.children?.findIndex((e=>e.name===n))??-1;i>-1&&o?.parent?.children.splice(i,1)}removeChildViewNodes(e,t,n,r){const s=this.getContextNode(e),a=s?.getNode("PAGE",t),o=a?.getReference(n);o?.children.forEach((a=>{"PAGE"===a.type?this.removeViewNode(e,a.name,n,r):a.type===no?this.removeChildViewNodes(e,t,a.name,r):(s.removeReference(a.name,ro,a.props.index),s.removeReference(a.name,ao,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 r=r=>{const s=this.getContextNode(e),a=s?.references?.get(r);if(a)for(const[e]of a)(n&&e===t||e.startsWith(`${t}.`)||e.startsWith(`${t}[`))&&s?.references?.get(r)?.delete(e)};r(ro),r(ao)}deleteListNode(e,t,n){const r=r=>{const s=this.getContextNode(e),a=s?.references?.get(r);if(a)for(const[e]of a)e.includes(`${t.join(".")}[${n}]`)&&s?.references?.get(r)?.delete(e)};r(ro),r(ao)}getPageListNode(e,t,n,r){const s=this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n);return s?.children.find((e=>"PAGELIST"===e.type&&e.name===`${t}.${r}`))}getFieldNode(e,t,n,r){return this.getViewNode(e,t,n)?.getNode(ro,r)}_findViewNode(e,t,n,r){let s=r.addNode("PAGE",t)?.getReference(n);if(s)return s;const a=t.split(".");for(;a.length>0;){a.pop();const e=a.join(".");if(s=r.addNode("PAGE",e)?.getReference(n),s)return s}return this.addViewNode(e,t,n)}addFieldNode(e,t,n,r,s,a={}){const o=this.addContextNode(e),i=this._findViewNode(e,t,n,o),c=this.createFieldNode(i,t,r,a);return c&&this.updateFieldNode(o,i,c,e,t,r,s),c}createFieldNode(e,t,n,r){const{isDeclarativeTarget:s}=r;return s?e.addNode(ao,`${t}${n}`,r):e.addNode(ro,`${t}${n}`,r)}updateFieldNode(e,t,n,r,s,a,o){const i=`${s}${a}`;"Address"===n.props?.componentName&&this.deleteAllListNodes(r,n.name),e.addReference(i,n),n.value=o,n.setPreviousDefaultValue(),n.props.isInsideList&&this.handleFieldInsideList(e,t,r,s,a)}handleFieldInsideList(e,t,n,r,s){const a=rh(n),o=Rp(a,n)||{},i=`${r}${s}`;let c=null;if(o?.subscriptFieldName||o?.isPageGroup)c=r.substring(0,r.lastIndexOf(`.${o?.index??""}`))||i.substring(0,i.lastIndexOf(`.${o?.index}`)),this.createListNodeIfNotExist(e,t,c);else{const n=r.substring(0,r.lastIndexOf("["))||i.substring(0,i.lastIndexOf("["));this.createListNodeIfNotExist(e,t,n)}}createListNodeIfNotExist(e,t,n){let r=e.getReference(n,ro);r||(r=t.addNode(ro,n,{}),e.addReference(n,r))}removeContextTreeNode(e){delete this.rootNodes[e]}onViewMutate(e,t,n,r){this.getViewNode(e,t,n)?.addEventListener(r)}mutateField(e,t,n,r){const s=this.getContextNode(e),[a,o,i]=Ka(t);n.startsWith(".")&&(n=n.substring(1)),o&&this.mutatePageList(e,a,o,{...r,rowIndex:i});const c=s?.getReference(`${t}.${n}`,ro);c&&c instanceof qa&&c.triggerEvent(r)}onPageListMutate(e,t,n,r,s){this.getPageListNode(e,t,n,r)?.addEventListener(s)}mutatePageList(e,t,n,r,s=!1){const a=this.getContextNode(e),o=a?.getReference(`${t}.${n}`,ro);o&&o instanceof qa&&o.triggerEvent(r,s)}getFieldsList(e){const t=this.getContextNode(e);return t?.references.get(ro)}getFieldReferenceForProperty(e,t){let n=this.getContextNode(e)?.references?.get(ro)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(ao)?.get(t)),n}getFieldReferencePreviousValue(e,t){let n=this.getContextNode(e)?.references?.get(ro)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(ao)?.get(t)),n?.value}updateFieldNodeValue(e,t,n){const r=this.getContextNode(e)?.references?.get(ro)?.get(t);r instanceof qa&&r&&(r.previousValue=r.value,void 0===r.value&&(r.previousValue=n),r.value=n)}getContextReferences(e){if(!this.getContextNode(e))return;const t=this.getContextReferencesByType(e,ro),n=this.getContextReferencesByType(e,ao);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,ro)?.get(t)||!!this.getContextReferencesByType(e,ao)?.get(t)}addWhenNode(e,t,n,r,s,a){const o=this.getContextNode(e);o?.addWhen(t,n,r,s,a)}getDeclarativeTargets(e){const t=this.getContextNode(e),n=t?.references?.get(ao)||new Map,r=[];return n.forEach((e=>{const t=e?.props||{},{propertyName:n=""}=t,s=t.pageReference??B.CASE_INFO.CASE_INFO_CONTENT;r.push({pageReference:s,name:n})})),r}getWhens(e){const t=this.getContextNode(e),n=t?.references?.get(oo)||new Map,r=[];return n.forEach((e=>{const t=e.subType,n=e.referenceName,s=e.name,a=e?.props?.pageReference??B.CASE_INFO.CASE_INFO_CONTENT;r.push({name:s,pageReference:a,referenceName:n,type:t})})),r}},co={CONTENT_FIELDS_PATH:[G.CONTEXT_DATA,G.CASE_INFO.CASE_INFO,G.CONTENT],DATA_OBJECT_CONTENT_FIELDS_PATH:[G.CONTEXT_DATA,G.DATA_INFO.DATA_INFO,G.CONTENT],OBJECT_CONTENT_FIELDS_PATH:[G.CONTEXT_DATA,G.OBJECT_INFO.OBJECT_INFO,G.CONTENT],FIELD_MESSAGES_PATH:[G.CONTEXT_DATA,G.CASE_INFO.CASE_INFO,G.CONTENT,G.SUMMARY_OF_MESSAGES,G.PROPERTY_MESSAGES],DATA_OBJECT_FIELD_MESSAGES_PATH:[G.CONTEXT_DATA,G.DATA_INFO.DATA_INFO,G.CONTENT,G.SUMMARY_OF_MESSAGES,G.PROPERTY_MESSAGES],OBJECT_FIELD_MESSAGES_PATH:[G.CONTEXT_DATA,G.OBJECT_INFO.OBJECT_INFO,G.CONTENT,G.SUMMARY_OF_MESSAGES,G.PROPERTY_MESSAGES],PAGE_MESSAGES_PATH:[G.CONTEXT_DATA,G.SUMMARY_OF_MESSAGES,G.PAGE_MESSAGES],HTTP_MESSAGES_PATH:[G.CONTEXT_DATA,G.SUMMARY_OF_MESSAGES,G.HTTP_MESSAGES],CASE_MESSAGE_PATH:[G.CASEMESSAGES]},lo=(e="",t="",n,r)=>{let s=[],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===G.PROPERTY&&e||e){s=[G.CONTEXT_DATA,...o.split(".")];for(let e=0;e<a.length-1;e+=1)s.push(a[e]);s.push(G.SUMMARY_OF_MESSAGES,G.PROPERTY_MESSAGES,a[a.length-1])}else n===B.PAGE?s=[...co.PAGE_MESSAGES_PATH]:n===G.HTTP?s=[...co.HTTP_MESSAGES_PATH]:n===G.CASEMESSAGES?s=[...co.CASE_MESSAGE_PATH]:r&&(s=[G.CONTEXT_DATA,...o.split(".")]);return s.filter(Boolean)},uo=(e,t,n)=>{const r={content:{}},s=`${t.split(".").slice(2).join(".")}[${n}]`,a=ef.getIn(e?.content,s.split("."));return a&&ef.setIn(r.content,s.split("."),{...a}),r},po=(e,t,n,r,s,a,o={})=>{const i=((e,t,n)=>t<n?e.filter((e=>parseInt(e.match(/\d+/)?.[0],10)>t&&parseInt(e.match(/\d+/)?.[0],10)<=n)):e.filter((e=>parseInt(e.match(/\d+/)?.[0],10)<t&&parseInt(e.match(/\d+/)?.[0],10)>=n)))(n,r,s),c=r>s?"up":"down";i&&i?.length>0&&i?.forEach((n=>{const r=parseInt(n.match(/\d+/)?.[0],10),s=`${a}[${r}]`;o[`${a}[${r+("up"===c?1:-1)}]`]=ef.getIn(e[t],[G.CONTEXT_DATA,...s.split(".")]),ef.deleteIn(e[t],[G.CONTEXT_DATA,...s.split(".")])}));const l=Object.keys(o);l.length>0&&l.forEach((n=>{ef.setIn(e[t],[G.CONTEXT_DATA,...n.split(".")],o[n])}))},ho=(e,t,n,r,s)=>{const a=ef.deepClone(ef.getIn(e,[`${t}`])),o=ef.getIn(a,[G.CONTEXT_DATA,G.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 r=ef.getIn(e,[G.CONTEXT_DATA,...n.split(".")],{});return Object.keys(r).filter((e=>e.includes(`${t}[`)))})(a,i.substring(i.lastIndexOf(".")+1),c);if(0===l.length)return;const u=uo(o,i,r).content;if(u&&Object.keys(u).length>0){const n={},o=`${i}[${r}]`,c=ef.getIn(a,[G.CONTEXT_DATA,...o.split(".")]);n[`${i}[${s}]`]=c,ef.deleteIn(e[t],[G.CONTEXT_DATA,...o.split(".")]),po(e,t,l,r,s,i,n)}else po(e,t,l,r,s,i)},go=e=>{const{type:t,property:n,category:r,context:s,pageReference:a}=e;let o;n&&(o=n.slice(1));const i=jg(s);let c=[];const l=ef.getIn(i,lo(o,a,r));return t&&"all"!==t?(l&&Array.isArray(l)&&l.length>0&&(c=l.filter((e=>e.type===t))),t===B.MESSAGES.MESSAGES_TYPE_ERROR&&c.length>0&&n&&io.mutateField(s,a,n,{messages:[...c],type:B.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:n}),c):l},fo=e=>{const{property:t,pageReference:n,category:r,context:s,type:a,subType:o,isListEntry:i,clearContextMessages:c,deletingIndex:l}=e,u={context:s,type:a,subType:o};t&&!i?(io.mutateField(s,n,t,{type:at,fieldName:t}),u.property=t,u.pageReference=n):i?(u.pageReference=n,u.isListEntry=i,u.deletingIndex=l):u.category=r,Ug(c?{type:at,payload:{stateObj:e.stateObj,context:s}}:{type:at,payload:u})},mo=e=>{const{messages:t,property:n,pageReference:r,category:s,context:a}=e,o={messages:t,context:a};n?(o.property=n,o.pageReference=r):o.category=s,Ug({type:st,payload:o})},Io=(e,t,n)=>{for(const r of Object.keys(e)){if(t.push(r),r===G.SUMMARY_OF_MESSAGES)n.push([...t]);else{"object"===typeof e[r]&&Io(e[r],t,n)}t.pop()}return n},yo=(e,t)=>{let n=go({context:G.APP.ROOT,category:"HTTP"});if(Vh.getRenderingMode()===G.EMBED){const e=go({context:G.APP.APP,category:"HTTP"});e&&(n=n?n.concat(e):e)}if(e){const e=go({context:t,category:"HTTP"});n?e&&(n=n.concat(go({context:t,category:"HTTP"}))):n=go({context:t,category:"HTTP"})}return n},Eo=e=>{let t=null;t=Hp(e)[0]?kp(Hp(e)[0]):e,t&&fo({context:t,stateObj:jg(t),clearContextMessages:!0})},Ao=e=>(ef.getIn(jg(e),co.PAGE_MESSAGES_PATH)??[]).some((e=>e.subType===G.CUSTOM_ERROR)),_o={addMessages:mo,getValidationErrorMessages:(e,t)=>{const n=jg(e),r=(e=>{let t=co.CONTENT_FIELDS_PATH;e?.objectInfo?t=Bl.isObjectCaseType(e?.objectInfo?.objectTypeID)?co.OBJECT_CONTENT_FIELDS_PATH:t:e?.dataInfo?.content&&(t=co.DATA_OBJECT_CONTENT_FIELDS_PATH);return t})(n),s=ef.getIn(n,[...r])||{},a=[];return Io(s,[],[]).forEach((e=>{const n=ef.getIn(s,[...e,G.PROPERTY_MESSAGES]);n&&Object.keys(n).forEach((e=>{n[e].forEach((e=>{if(e.type===G.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:go,clearMessages:fo,getRootContainerHttpMessages:yo,clearContextMessagesInActiveWorkArea:Eo,clearContextMessages:e=>{const{context:t}=e;Ug({type:at,payload:{clearAll:!0,context:t}})},isCustomPageErrorExist:Ao},Co=_o;const So=class{constructor(e,t,n,r){this.eventType=e,this.callback=n,this.contextName=r,this.id=t}};const To=new class{constructor(){this.subscribers={}}publish(e,t){this.subscribers[e]?.forEach((e=>{e.callback(t)}))}unsubscribe(e,t,n){const r=this.subscribers[e]||[];let s=0,a=-1;r.forEach((e=>{e.id===t&&e.contextName===n&&(a=s),s+=1})),-1!==a&&r.splice(a,1)}unsubscribeAllWithEventType(e){this.subscribers[e]=[]}subscribe(e,t,n,r,s){this.subscribers[e]=this.subscribers[e]||[];let a=!1;if(s&&this.subscribers[e].forEach((e=>{a=e.id===t&&e.contextName===r})),!a){const s=new So(e,t,n,r);this.subscribers[e].push(s)}}clearContext(e){const t=this.subscribers;Object.keys(t).forEach((t=>{const n=this.subscribers[t],r=[];n.forEach((t=>{t.contextName!==e&&r.push(t)})),this.subscribers[t]=r}))}};const No=class{static subscribe(e,t,n,r=!1,s="app"){To.subscribe(e,n,t,s,r)}static subscribeOnce(e,t,n){this.subscribe(e,t,n,!0)}static publish(e,t){To.publish(e,t)}static unsubscribe(e,t,n="app"){To.unsubscribe(e,t,n)}static unsubscribeAllWithEventType(e){To.unsubscribeAllWithEventType(e)}static cleanContextSubscribers(e){To.clearContext(e)}};const Po=new class{#e;#t;constructor(){this.#e="true"===localStorage.getItem("inspectorFlag"),this.#t=!1,this.isPreview=!1,this.debugLevels="vcv=1;tracer=0;log=0;metric=1"}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="true"===localStorage.getItem("inspectorFlag");this.#e=!e,localStorage.setItem("inspectorFlag",this.#e.toString()),No.publish(G.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR,this.#e)}toggleInspectorShowAll(){this.#t=!this.#t,No.publish(G.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR_SHOW_ALL,this.#t)}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 Oo{constructor(e,t=!0){this.config=e,t?(this.ssKeyConfig=e,this.reloadConfig()):this.updateConfig(e,!1)}static init(e,t=!0){return new Oo(e,t)}updateConfig(e,t=!0){t?window.sessionStorage.setItem(this.ssKeyConfig,JSON.stringify(this.config)):ni(e)}reloadConfig(e=!0){if(e){const e=window.sessionStorage.getItem(this.ssKeyConfig);this.config=e?JSON.parse(e):null}else this.config=ri()}async buildAuthorizeUrl(e){e=e||window.btoa(window.location.origin);let{sessionIndex:t}=this.config;const{password:n}=this.config,r=this.config.clientId?this.config.clientId:this.config.client_id,s=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,a=this.config.authorizeUri?this.config.authorizeUri:this.config.endPoints?.authorize,o=this.config.authService?this.config.authService:this.config.authentication_service||"pega",i=this.config.appAlias?this.config.appAlias:jh.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=${r}&response_type=code&redirect_uri=${s}&scope=openid${d}&state=${e}&code_challenge=${t}&code_challenge_method=S256&authentication_service=${o}&enable_psyncId=true${l}`))?.catch((()=>null))}getTokenAndFinish=e=>{window.removeEventListener("message",this.authMessageHandler,!1),this.getToken(e,!1).then((()=>{})).catch((e=>{console.log(e)}))};authMessageHandler=e=>{if(e.origin!==this.getRedirectUriOrigin())return;if(!e.data||!e.data.type||"PegaAuth"!==e.data.type)return;const t=e.data.code.toString();this.getTokenAndFinish(t)};getRedirectUriOrigin=()=>{let{redirectUri:e}=this.config;e=e||this.config.redirect_uri||"";const t=e.indexOf("//"),n=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,r=this.config.clientSecret?this.config.clientSecret:this.config.client_secret,s=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,a=this.config.tokenUri?this.config.tokenUri:this.config.endPoints?.token,{codeVerifier:o}=this.config,i=window.location.search,c=new URLSearchParams(i),l=e||c.get("code"),u=new URLSearchParams;return n&&u.append("client_id",n),r&&u.append("client_secret",r),u.append("grant_type","authorization_code"),u.append("code",l),s&&u.append("redirect_uri",s),o&&u.append("code_verifier",o),this.config?.secureCookie&&u.append("send_token_as_cookie","true"),Ko(a,{method:"POST",headers:new Headers({"content-type":"application/x-www-form-urlencoded"}),body:u.toString()}).then((e=>e.data)).then((e=>{e.eA=Date.now()+1e3*e.expires_in;let n=!1;if(this.config.codeVerifier&&(delete this.config.codeVerifier,n=!0),e.session_index&&(this.config.session_index=e.session_index,n=!0),n){this.updateConfig(this.config,t),this.config?.secureCookie?ei({pzCTkn:e?.csrf}):(ti({tokenInfo:e}),ei({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 Do=Oo,Ro=async()=>new Promise((async(e,t)=>{const n=si();if(!n?.tokenInfo)return void t(new Error("Missing token information."));const{access_token:r,refresh_token:s=null}=n.tokenInfo,{revoke:a}=n.endPoints,{client_id:o,client_secret:i,secureCookie:c,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 h=s?"refresh_token":"access_token",g="access_token"===h?r:s;!c&&g&&p.append("token",g),p.append("token_type_hint",h),a&&await Ko(a,{method:"POST",headers:new Headers(d),credentials:c?"include":"omit",body:p.toString(),withoutDefaultHeaders:!0}),ei({Authorization:null}),ti({tokenInfo:null}),e()})),bo=async e=>{const t={};if("OAuth2.0"===e?.authType){const n=new Do(e,!1);t.reauthUrl=await n.buildAuthorizeUrl(),t.redirectOrigin=n.getRedirectUriOrigin(),window.addEventListener("message",n.authMessageHandler,!1)}else t.reauthUrl=T()+(S()?`${S()}`:"/?reAuth=true");return t},vo=(e,t)=>{bo(t).then((t=>{const n={openReauthMessageModal:!0,reAuthenticationURL:t.reauthUrl,url:e,redirectOrigin:t.redirectOrigin};No.publish(B.PUB_SUB_EVENTS.EVENT_REAUTH,n)}))},xo=e=>{let t="",n={},r={},s=!0;if("OAuth2.0"===e?.authType){t=e.endPoints.token;const a=new URLSearchParams;(!e.tokenInfo.refresh_token||e.tokenInfo.refresh_token&&e.tokenInfo.refresh_token.length<=0)&&(s=!1),a.append("client_id",e.client_id),a.append("grant_type","refresh_token"),e.clientSecret&&a.append("client_secret",e.clientSecret),e.secureCookie&&a.append("send_token_as_cookie","true"),e.tokenInfo?.refresh_token&&a.append("refresh_token",e.tokenInfo.refresh_token),n={method:"POST",body:a.toString(),headers:{"content-type":"application/x-www-form-urlencoded"}},r={success:t=>{const{data:n}=t,r={access_token:n?.access_token,refresh_token:n?.refresh_token};ti({tokenInfo:{...e.tokenInfo,...r}}),e.secureCookie?ei({pzCTkn:n?.csrf}):ei({Authorization:`${n?.token_type} ${n?.access_token}`});const{onTokenRetrieval:s}=e;s&&"function"==typeof s&&s(n)},failure:t=>{if(e.popupReauth)return vo(t,e);No.publish(B.PUB_SUB_EVENTS.EVENT_FULL_REAUTH,e)}}}else t=`${T()}/updateSession`,n={method:"GET",headers:{}},r={failure:vo};return{url:t,config:n,callback:r,isRefreshTokenPresent:s}},wo=(e,t)=>"OAuth2.0"===t?.authType?e?.includes(t.endPoints.token):e?.includes("updateSession"),Mo=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}},Lo=(e,t,n)=>{const{config:r}=e,{url:s,config:a,callback:o,isRefreshTokenPresent:i}=xo(n),c=r.headers&&r.headers.context;r.data&&(r.body=r.data);const l=Jo(r.url,r,c,t);return i?Ko(s,a).then((e=>new Promise(((n,s)=>{setTimeout((()=>{t.setUpdateSessionStatus(!1),t.latestUpdateSessionTimeStamp=Date.now(),o?.success?.(e,r),No.publish("updateSession",{updateStatus:"success"}),No.publish("OnUpdateSession",{}),l.then((e=>{n(e)})).catch((e=>{s(e)}))}),0)})))).catch((e=>e&&e.config&&wo(e.config.url,n)?(o?.failure?.(r.url,n),l):Promise.reject(e))):(o?.failure?.(r.url,n),l)},Fo=(e,t,n,r)=>{if(e.config&&wo(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(No.unsubscribeAllWithEventType(Vo),t.setUpdateSessionStatus(!0),"custom"===n?.authType){No.publish(B.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);const{url:n,config:r,context:s}=Mo(e);return Jo(n,r,s,t)}return Lo(e,t,n)}if(e.response&&e.response.status&&401===e.response.status&&!e.config.isExternalUrl&&t.getUpdateSessionStatus()){const{url:t,config:n,context:r}=Mo(e);return Ko(t,n,r)}if(e.response&&e.response.status&&422!==e.response.status&&424!==e.response.status&&(400!==e.response.status||"Invalid inputs"!==e.response.data.errorClassification)&&e.config.headers.context&&e.response.data&&!r){const t=e.response.data.errorDetails&&e.response.data.errorDetails.map((t=>((e,t)=>t[B.TRACE_ID]?{type:"error",message:e.localizedValue||e.message,correlationID:t[B.TRACE_ID]}:{type:"error",message:e.localizedValue||e.message})(t,e.response.headers))),n=e.config.headers.context;return mo({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return Promise.reject(e)};const Uo=class{constructor(){this.updateSessionInProgress=!1,this.latestUpdateSessionTimeStamp=Date.now()}getUpdateSessionStatus=()=>this.updateSessionInProgress;setUpdateSessionStatus=e=>{this.updateSessionInProgress=e}};const jo=new class{constructor(){this.externalHeaders={},this.defaultHeaders={},this.SPECIAL_CHARS={SLASH:"/"}}registerHeader(e,t){return!this.defaultHeaders[e]&&(this.externalHeaders[e]=t,!0)}unRegisterHeader(e){this.externalHeaders[e]&&delete this.externalHeaders[e]}getRegisteredHeaders(){return this.externalHeaders}setDefaultHeaders(e){this.defaultHeaders={...this.defaultHeaders,...e}}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[G.COREHEADER_APP_DEBUG_ID]:e.debugId,[G.COREHEADER_APP_DEBUG_LEVELS]:Po.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;const t=sf.getProperty(G.COREHEADERS,"",e);return t?{...t,debugInfo:Po.getPreviewMode()&&{...t.debugInfo,[G.COREHEADER_APP_DEBUG_LEVELS]:Po.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,t,n){const r=this.getCoreHeadersFromContext(n);if(r){const t=Object.keys(e);if(t.includes(G.SKIPCOREHEADERS))return void delete e[G.SKIPCOREHEADERS];const n=Object.assign({},...Object.values(r));Object.keys({...n}).forEach((r=>{t.includes(r)||(e[r]=n[r])}))}}injectCoreAdditionalHeaders(e,t,n,r){r?.includeRemoteSystemIdIfPresent&&q.injectRemoteCaseHeader(e,t,n),this.processCoreHeaders(e,t,n)}},ko=jo;const Vo="updateSession",$o={},Bo=new Uo,Go=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&&(No.unsubscribe(B.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((()=>{No.publish(B.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(t),No.subscribe(B.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0}),1e3*(e-this.expiryBuffer));return this.setTimerID(t),t}};let Wo={},Ho={},qo={},zo="";const Yo=e=>{Wo=e},Ko=(e,t,n="root",r={})=>{const{doNotMergeHttpMessagesForStatusCode:s=null,cancelContext:a=n,includeRemoteSystemIdIfPresent:o=!0}=r;zo=s,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:h,pzCTkn:g,...f}=t.headers||{};d||ko.injectCoreAdditionalHeaders(f,t.body,n,{includeRemoteSystemIdIfPresent:o}),a&&$o[a]>=0?$o[a]+=1:a&&void 0===$o[a]&&($o[a]=1);let m=d?{...f}:{...ko.getDefaultHeaders(),...ko.getRegisteredHeaders(),...f,context:n};if(p.isExternalUrl=(e=>!e?.startsWith(T()||""))(e||""),p.fetchTimeStamp=Date.now(),e&&wo(e,Ho)&&Bo.getUpdateSessionStatus()||!Bo.getUpdateSessionStatus()||p.isExternalUrl){wo(e,Ho)&&"OAuth2.0"===Ho?.authType&&(m={...f});const{restApi:t}=jh.doesRestApiExist("Logout")&&jh.getRestEndPoint("Logout")||{restApi:null};return(!t||e&&!e.endsWith(t))&&Go.setTimerID(Go.resetInactiveTimeout(Go.getTimerID())),function(e,t){var n="object"==typeof t;return new Promise((function(r,s){var a,o=!1;e.subscribe({next:function(e){a=e,o=!0},error:s,complete:function(){o?r(a):n?r(t.defaultValue):s(new js)}})}))}(Ba(Fs({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:(I=Ho,!("OAuth2.0"!==I?.authType||!I.secureCookie)||!("custom"!==I?.authType||!I.customCookies)||void 0)})).pipe(Ga((()=>{const e=ko.getCoreHeadersFromContext(m.context);e&&(e=>{No.publish(G.PUB_SUB_EVENTS.FETCH_SUCCESS,e)})({...e})})),Wa((e=>{const t=m,n=!!t?.[G.COREHEADER_APP_DEBUG_ID]?{debugInfo:{[G.COREHEADER_APP_DEBUG_ID]:t?.[G.COREHEADER_APP_DEBUG_ID],[G.COREHEADER_APP_DEBUG_LEVELS]:Po.getDebugLevels()}}:ko.getCoreHeadersFromContext(m.context);throw n&&(e=>{No.publish(G.PUB_SUB_EVENTS.FETCH_FAILURE,e)})({...n,error:e}),e}))))}var I;return Jo(e,t,n,Bo)},Jo=(e,t,n,r)=>new Promise(((s,a)=>{No.subscribe(Vo,(o=>{r.setUpdateSessionStatus(!o.updateStatus),"success"===o.updateStatus?Ko(e,t,n).then((e=>s(e))).catch((e=>a(e))):a(o.updateStatus.error)}),Vo)})),Xo=e=>{$o[e]>0&&($o[e]-=1,0===$o[e]&&delete $o[e])};Fs.interceptors.request.use((e=>(Wo.request&&(e=Wo.request(e)),e)),(e=>Promise.reject(e))),Fs.interceptors.response.use((e=>{if(202===e.status&&e.config.headers.context&&e.data?.caseInfo?.errorMessage){const t=[{type:"error",message:e.data.caseInfo.errorMessage}];let n=e.config.headers.context;return n&&n.includes("/workarea")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),mo({messages:t,category:"HTTP",context:n}),Promise.reject(e)}if(e.config.headers&&e.config.headers.context){if(!e.config.skipClearErrorMessages){go({type:"error",category:"HTTP",context:e.config.headers.context}).length>0&&fo({type:"error",category:"HTTP",context:e.config.headers.context}),go({type:"error",category:e.config.headers.context===G.APP.APP?"PAGE":"",context:e.config.headers.context}).length>0&&fo({type:"error",category:"PAGE",context:e.config.headers.context});e.config.headers.context.slice(e.config.headers.context.lastIndexOf("/")+1).startsWith("primary")&&(go({type:"error",category:"HTTP",context:G.APP.APP}).length>0&&fo({type:"error",category:"HTTP",context:G.APP.APP}),go({type:"error",category:"PAGE",context:G.APP.APP}).length>0&&fo({type:"error",category:"PAGE",context:G.APP.APP}))}Xo(e.config.headers.context)}return Wo.response&&(e=Wo.response(e)),e}),(e=>(e.config&&e.config.headers&&e.config.headers.context&&Xo(e.config.headers.context),!e.response||!e.response.status||401!==e.response.status||e.config.isExternalUrl||e.config&&wo(e.config.url,Ho)||No.subscribe(Vo,(e=>{Bo.setUpdateSessionStatus(!e.updateStatus)}),Vo),Fo(e,Bo,Ho,e.response&&e.response.status&&e.response.status===Number(zo)?zo:null))));const Qo=()=>Fs.CancelToken.source(),Zo=e=>Fs.isCancel(e),ei=e=>{ko.setDefaultHeaders(e)},ti=e=>{Ho={...Ho,...e}},ni=e=>{qo={...qo,...e}},ri=()=>({...qo}),si=()=>({...Ho});const ai=class{static formatPageReference(e){const t=e?.split(".").map((e=>{if(e.includes("[")){const t=e.indexOf("["),n=e.indexOf("]"),r=e.substring(t+1,n),s=Number(r)+1;return`${e.substring(0,t)}(${s})${e.substring(n+1)}`}return e}));return t.join(".")}static formatePageReferenceToArrayIndex(e){const t=e?.split(".").map((e=>{if(e.includes("(")){const t=e.indexOf("("),n=e.indexOf(")"),r=e.substring(t+1,n),s=Number(r);if(!Number.isNaN(s)){const r=s-1;return`${e.substring(0,t)}[${r}]${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 oi=class{static execute(e,t,n,r){const s={};Object.hasOwn(n,"nonFormProperties")&&(n.nonFormProperties.forEach((e=>{s[e]=n[e],delete n[e]})),delete n.nonFormProperties);const a={instruction:"string"==typeof t?"ADD":"INSERT",content:{...ef.unflatten(n)}},o=JSON.parse(JSON.stringify(a));delete o.content.classID;return{instruction:{target:ef.buildInstructionPageReference(r,e),content:{...o.content},["string"==typeof t?"groupIndex":"listIndex"]:t,instruction:"string"==typeof t?"ADD":"INSERT"},actionPayload:a,displayPropertPayload:s}}};const ii=class{static execute(e,t,n,r,s,a,o,i){const c={instruction:"UPDATE",content:{...ef.unflatten(r)},isDefault:i},l={content:{...c.content},target:ef.buildInstructionPageReference(s,t),["string"==typeof n?"groupIndex":"listIndex"]:n,instruction:"UPDATE"};return a||Ug(Bf({...c,["string"==typeof n?"groupIndex":"listIndex"]:"string"==typeof n?n:n-1,context:e,referenceList:`${s}${t}`,skipDirtyValidation:o})),l}};const ci=class{static execute(e,t,n){return{target:ef.buildInstructionPageReference(n,e),["string"==typeof t?"groupIndex":"listIndex"]:t,instruction:"DELETE"}}};const li=class{static getDeleteAllInstruction(e,t){return{instruction:"DELETE ALL",target:ef.buildInstructionPageReference(e,t)}}static execute(e,t,n,r){r||Ug(Bf({instruction:"DESELECT_ALL",context:e,referenceList:`${n}${t}`}))}};const ui=class{static execute(e,t,n,r){return{target:ef.buildInstructionPageReference(r,e),listMoveToIndex:n,listIndex:t,instruction:"MOVE"}}};const di=class{static execute(e,t,n){const r={instruction:"REPLACE",content:{...ef.unflatten(t)}};return{instruction:{target:ef.buildInstructionPageReference(n,e),content:{...r.content},instruction:"REPLACE"},actionPayload:r}}};const pi=class{static execute(e,t){return{target:ef.buildInstructionPageReference(t,e),instruction:"DELETE"}}};const hi=class{constructor(e){this.next=null,this.automatic=!1,this.instruction=e,this.previous=null,this.childrenStateMachines=[]}};const gi=class{constructor(e,t,n){this.target=e,this.pageReference=t,this.contextName=n,this.root=null,this.current=null,this.changeList={},this.targetPageReference=t+e,this.children=[],this.visibility=!0}addChild(e){null===this.current&&this.insertNode({}),this.current.childrenStateMachines.push(e)}insertNode(e){const t=new hi(e);null===this.root&&(this.root=t),null!==this.current&&(t.previous=this.current,this.current.next=t),this.current=t}buildChildSumbitPageInstructions(e,t){let n=[];return e.childrenStateMachines.forEach((e=>{e.visibility&&(n=n.concat(e.buildSubmitPageInstructions(t)))})),n}buildSubmitPageInstructions(e=!1){let t=this.root,n=[];for(;t;)!t.instruction.instruction||e&&t.automatic||n.push(t.instruction),n=[...n,...this.buildChildSumbitPageInstructions(t,e)],t=t.next;return n}initPageInstructions(e,t,n){const r=e.getValue(this.target)||[];if(Array.isArray(r)){if(t)return void r.forEach(((e,r)=>{t.forEach((t=>{const s=bl(t),a={};let o=!0;n&&(a[bl(n)]=crypto.randomUUID(),o=!1);const i={[s]:ef.getIn(e,s),...a};this.update(i,r+1,o,{isDefault:!0,skipDirtyValidation:!0})}))}));r.forEach(((e,t)=>{if(n&&!e[bl(n)]){const e={};e[bl(n)]=crypto.randomUUID(),this.update(e,t+1,!1,{isDefault:!0,skipDirtyValidation:!0})}}))}t&&r&&"object"==typeof r&&!Array.isArray(r)&&Object.keys(r).length>0&&this.processObjectRows(r,t,n)}processObjectRows(e,t,n){Object.keys(e).forEach((r=>{const s=e[r];t.forEach((e=>{const t=bl(e),a={};let o=!0;n&&(a[bl(n)]=crypto.randomUUID(),o=!1);const i={[`${t}`]:ef.getIn(s,t),...a};this.update(i,r,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,r){const{isDefault:s=!1,skipPageinstruction:a,skipDirtyValidation:o=!1}=r,i=ii.execute(this.contextName,this.target,t,e,this.pageReference,n,o,s);if(!a){if("string"==typeof t?this.initChangeList(t):this.initChangeList(t-1),!s){const n=this.changeList?.[this.targetPageReference]?.["string"==typeof t?t:t-1].content;this.changeList[this.targetPageReference]["string"==typeof t?t:t-1]=Yg(ef.deepClone(n),e,r)}if(this.current?.automatic!==s||this.current?.instruction?.groupIndex!==t&&this.current?.instruction?.listIndex!==t||"UPDATE"!==this.current?.instruction.instruction)this.insertNode(i),s&&(this.current.automatic=!0);else{const t=this.current.instruction.content;this.current.instruction.content=Yg(ef.deepClone(t),ef.unflatten(e),r)}}}delete(e,t){const n=ci.execute(this.target,e,this.pageReference);this.changeList[this.targetPageReference]?.splice(e-1,1),this.insertNode(n),t||Ug(Bf({instruction:"DELETE",listIndex:"string"==typeof e?e:e-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}insert(e,t,n,r){const{instruction:s,actionPayload:a={content:{}},displayPropertPayload:o={}}=oi.execute(this.target,t,e,this.pageReference),{isDefault:i=!1}=r;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]=Yg(ef.deepClone(n),e,r)}this.root&&!this.root.instruction?.instruction&&this.current&&!this.current.instruction?.instruction?this.root.instruction=s:this.insertNode(s),n||(a.content={...a.content,...o},Ug(Bf({...a,["string"==typeof t?"groupIndex":"listIndex"]:"string"==typeof t?t:t-1,c11nEnv:r.c11nEnv,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))),i&&(this.current.automatic=!0)}replacePage(e,t,n,r){const s=r??this.pageReference,a=n??this.target,{instruction:o,actionPayload:i}=di.execute(a,e,s);this.insertNode(o),t||Ug(Bf({...i,context:this.contextName,referenceList:`${s}${ef.convertClipboardPageToPageRefNotation(a)}`}))}deletePage(e){const t=pi.execute(this.target,this.pageReference);this.insertNode(t),e||Ug(Bf({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 r=ui.execute(this.target,e,t,this.pageReference);this.insertNode(r),Ug(Bf({listIndex:e-1,listMoveToIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,instruction:"MOVE"}))}deleteAll(e){const t=li.getDeleteAllInstruction(this.pageReference,this.target);this.changeList[this.targetPageReference]=[],this.insertNode(t),li.execute(this.contextName,this.target,this.pageReference,e)}updatePage(e){const t=this.current.instruction.content;this.current.instruction.content=Yg(ef.deepClone(t),e)}},fi={},mi={},Ii={},yi=(e,t,n)=>{fi[e]||(fi[e]={}),fi[e][t]||(fi[e][t]={content:[]}),mi[e]||(mi[e]=[],Ii[e]=[]),Dl.isStateMachineExist(e,n,t)||Dl.setStateMachine(e,t,n,new gi(t,n,e))},Ei=e=>ai.formatPageReference(e),Ai=(e,t)=>{const n=mi[e],r=Ii[e],s=bl(t),a=s?.substring(0,s.indexOf("["));r?.indexOf(a)<0&&Ii[e].push(a),n?.indexOf(s)<0&&mi[e].push(s)},_i=e=>{delete mi[e]},Ci=e=>Dl.buildPageInstructionsByContext(e),Si=e=>{Dl.clearStateMachines(e),delete fi[e]},Ti=(e,t,n,r)=>{let[,s]=t.split(`${e}[${r}]`);""!==s&&void 0!==s&&(s=s.startsWith(".")?s.substring(1):s,Object.keys(n).forEach((e=>{n[`${s}.${e}`]=n[e],delete n[e]})))},Ni=(e,t,n,r,s)=>{const{skipStateUpdate:a=!1,insertIfEmpty:o=!1}=s||{},i=n.getContextName(),c=n.getReferenceList(),l=r||n.getPageReference(),u=Ei(c);yi(i,u,l),Ai(i,`${c}[${t}]`),Ti(c,l,e,t);const d={instruction:G.LIST_ACTIONS.INSERT,content:{...ef.unflatten(e)}};delete JSON.parse(JSON.stringify(d)).content.classID;const p=Dl.getStateMachine(i,l,u);o&&p?.root||p.insert(e,t+1,a,{c11nEnv:n})},Pi=(e,t,n=0,r={})=>{const{skipStateUpdate:s=!0,pageRef:a}=r,o=t.getContextName();let i=t.getReferenceList();const c=a||t.getPageReference();i||(i=((e,t)=>{const n=e.indexOf(B.CONTENT)+B.CONTENT.length,r=e.lastIndexOf(`[${t}]`);return e.substring(n,r)})(c,n));const l=Ei(i);yi(o,l,c),Ai(o,`${i}[${n}]`),Ti(i,c,e,n);Dl.getStateMachine(o,c,l).update(e,n+1,s,r)},Oi=(e,t)=>{const[,n]=e.split("."),r=t?.split(".").pop();return n===r},Di=(e,t,n)=>{const r={};return Object.values(e).forEach((e=>{if(Oi(e,n)){const n=ef.getPropertyName(e),s=n.substr(n.indexOf(".")+1).split(".");if(s.length>1){let e=ef.getIn(t,s)??"";if(!e){const n=`!P!${s.join(":")}`;e=ef.getIn(t,n)??""}ef.setIn(r,s,e)}else{const e=ef.getIn(t,s)??"";r[s[s.length-1]]=e}}})),r},Ri=(e,t,n,r,s)=>{const a=e.getValue(t)||{};n&&Object.keys(a).length>0&&e.clearErrorMessages({property:r?s:e.getStateProps().value})},bi=(e,t,n)=>new Promise((r=>{const{skipPageInstructions:s=!1}=n,{selectionMode:a,selectionList:o,required:i}=t.getConfigProps(),c=a===G.LIST_SELECTION_MODE.MULTI,l=t.getContextName();let u=t.getPageReference(),d=((e,t,n)=>e?n.substring(1):t.substring(t.lastIndexOf(".")+1))(c,u,o);const p=t.getRawMetadata();let h=null;const g=(e=>e?.config?.dataRelationshipContext&&"SimpleTableSelect"===e.type&&"single"===e.config?.selectionMode)(p);g&&(d=p?.config?.dataRelationshipContext,h=u.concat(".").concat(d),u=h);const f=((e,t,n)=>e?`${t}${n}`:t)(c,u,o),m=((e,t,n,r)=>t?e.getFieldMetadata(`${n}`):e.getCurrentPageFieldMetadata(r))(t,c,d,h),{datasource:{parameters:I={}}}=m,y={...I};if(((e,t,n)=>{t?.descriptors?.length&&!n&&t.descriptors.forEach((t=>{const n=ef.getPropertyName(t),r=n.substr(n.indexOf(".")+1).split(".");e[r.join(".")]=t}))})(y,m,c),c){let n=o;n=Ei(n);const r=t.getValue(f)||[];yi(t.getContextName(),n,u);const a=[];let i=r.length;e.forEach((e=>{const t=Di(I,e,d),o={};if(Object.hasOwn(e,"displayProperty")){const t=e.displayProperty;o[t]=e[t]}const c=Object.entries(t);let p=r.findIndex((e=>c.every((([t,n])=>e[t]===n))));if(-1===p?(p=i,e.$selected&&(i+=1)):i=i?i-1:0,!s){const r=Dl.getStateMachine(l,u,n);e.$selected?r.insert(t,p+1,!0,{}):r.delete(p+1,!0)}a.push({instruction:e.$selected?G.LIST_ACTIONS.SELECT:G.LIST_ACTIONS.DESELECT,listIndex:p,content:{...t,...o}})})),Ug(Bf({instruction:G.LIST_ACTIONS_TYPE.SELECT_DESELECT,context:l,referenceList:`${u}.${d}`,actions:a}))}else{const n=Di(y,e[0],d),r=p?.config?.compositeKeys||[];if(t.getRawConfigProps().onlyAllowRefreshOnCompositeKeys&&r.length){const s=r?.reduce(((e,t)=>{const n=ef.getPropertyName(t);return e[n.substr(n.indexOf(".")+1).split(".").join(".")]=t,e}),{})||{},a=Di(s,e[0],d);Object.keys(a).forEach((e=>{delete n[e],t.getActionsApi().updateFieldValue(`.${e}`,a[e],g?{contextPageReference:u}:{}),t.getActionsApi().triggerFieldChange(`.${d}.${e}`,a[e])}));const o=(e=>e.length>1&&e.pop()||"")(u.split(/\[\d+\]/gm));t.getActionsApi().updateFieldValue(o,n,g?{contextPageReference:u}:{}),t.getActionsApi().triggerFieldChange(o,n)}else Object.keys(n).forEach((e=>{t.getActionsApi().updateFieldValue(`.${e}`,n[e],g?{contextPageReference:u}:{}),t.getActionsApi().triggerFieldChange(`.${d}.${e}`,n[e])}))}Ri(t,f,i,c,d),r()})),vi=e=>{if(!e)return!1;const t=(n=e,Dl.buildPageInstructionsByContext(n,!0));var n;return Array.isArray(t)&&t.length>0};const xi=(e,t,n={})=>{const{skipStateUpdate:r=!1}=n,s=e.getPageReference(),a=Ei(t);yi(e.getContextName(),t,s);Dl.getStateMachine(e.getContextName(),s,a).deleteAll(r)},wi=e=>({insert:(t,n,r,s)=>Ni(t,n,e,r,s),update:(t,n,r)=>Pi(t,e,n,r),updateProperty:(t,n,r)=>((e,t,n,r={})=>{const s=n.getPageReference(),{stateMachineTarget:a}=Dl.getStateMachineObjByPath(`${s}${e}`,n.getContextName(),`${s}${e}`.endsWith("]"));if(!a){let e=s.substring(0,s.lastIndexOf("["));e||(e=s.substring(0,s.lastIndexOf(".")));const t=e.substring(e.lastIndexOf("."));e=e.substring(0,e.lastIndexOf(".")),e&&t&&yi(n.getContextName(),t,e)}Dl.executeStateMachine(n.getContextName(),`${s}${e}`,t,!0,r)})(t,n,e,r),deleteEntry:(t,n,r)=>((e,t,n,r)=>{const{skipStateUpdate:s=!1}=r||{},a=t.getContextName(),o=t.getReferenceList(),i=n||t.getPageReference(),c=`${i+o}[${e}]`,l=Ei(o);fo({type:B.MESSAGES.MESSAGES_TYPE_ERROR,pageReference:c,context:a,isListEntry:!0,deletingIndex:e}),yi(a,l,i),Ai(a,`${o}[${e}]`);const u=Dl.getStateMachine(a,i,l);"string"==typeof e?u.delete(e,s):u.delete(e+1,s);const d=Dl.getUnConnectedStateMachines(a)||{};Object.keys(d).forEach((e=>{e.includes(`${i}${l}`)&&e!==`${i}${l}`&&(d[e]=null)}))})(t,e,n,r),reorder:(t,n)=>((e,t,n)=>{const r=n.getContextName(),s=n.getReferenceList(),a=n.getPageReference(),o=Ei(s);yi(r,o,a),io.deleteAllListNodes(r,`${a}${o}`,!1),Ai(r,`${s}[${t}]`),Dl.getStateMachine(r,a,o).move(e+1,t+1);const i=Dl.getUnConnectedStateMachines(r)||{};Object.keys(i)?.forEach((e=>{e.includes(`${a}${o}`)&&e!==`${a}${o}`&&delete i[e]}))})(t,n,e),setSelectedRows:(t,n={skipPageInstructions:!1})=>bi(t,e,n),getSelectedRows:(t=!1)=>((e,t)=>{const{selectionMode:n,selectionList:r}=t.getConfigProps(),s=[];let a=t.getPageReference();const o=n===G.LIST_SELECTION_MODE.MULTI;let i=o?r.substring(1):a.substring(a.lastIndexOf(".")+1);const c=t.getRawMetadata();let l=null;c?.config?.dataRelationshipContext&&"SimpleTableSelect"===c.type&&"single"===c.config?.selectionMode&&(i=c.config.dataRelationshipContext,l=a.concat(".").concat(i),a=l);const u=o?`${a}${r}`:a;let d=t.getValue(u)||[];if(Array.isArray(d)||(d=[d]),e)return Promise.resolve(d);const{datasource:{parameters:p={}}={}}=o?t.getFieldMetadata(`${i}`):t.getCurrentPageFieldMetadata(l);return d.forEach((e=>{const t=Object.values(p).reduce(((t,n)=>{const r=n.substring(n.lastIndexOf(".")+1);return Oi(n,i)&&e[r]?`${t}${e[r]}`:t}),"");t.trim()&&s.push(t.trim())})),Promise.resolve(s)})(t,e),clearSelectedRows:()=>function(e){const{selectionList:t,required:n}=e.getConfigProps(),r=e.getContextName(),s=e.getPageReference(),a=t,o=`${s}${t}`;return new Promise((t=>{let i=a;i=Ei(i),yi(r,i,s),Dl.getStateMachine(r,s,i).deleteAll(),Ri(e,o,n,!0,a),t()}))}(e),setVisibility:t=>((e,t=!0)=>{const n=e.getContextName(),{selectionMode:r,selectionList:s,renderMode:a,referenceList:o}=e.getComponentConfig();let i;if(r===G.LIST_SELECTION_MODE.MULTI&&s?i=s:"Editable"===a&&o&&(i=e.getStateProps().referenceList),i){i=Ei(i);const r=Dl.getStateMachine(n,"",`${e.getPageReference()}${i}`);r&&(r.visibility=t)}})(e,t),initDefaultPageInstructions:(t,n,r)=>((e,t,n,r)=>{const s=e.getContextName(),a=e.getPageReference(),o=Ei(t);yi(s,o,a),Dl.getStateMachine(s,a,o).initPageInstructions(e,n,r)})(e,t,n,r),deleteAll:(t,n)=>xi(e,t,n),replacePage:(t,n,r)=>((e,t,n,r)=>{const{skipStateUpdate:s=!1}=r||{},a=e.getPageReference(),o=e.getContextName();yi(o,t,a),Ai(o,ef.buildInstructionPageReference(a,t)),Dl.getStateMachine(o,a,t).replacePage(n,s)})(e,t,n,r),deletePage:(t,n)=>((e,t,n)=>{const{skipStateUpdate:r=!1}=n||{},s=e.getPageReference(),a=e.getContextName();yi(a,t,s),Ai(a,ef.buildInstructionPageReference(s,t)),Dl.getStateMachine(a,s,t).deletePage(r)})(e,t,n)});const Mi=new class{constructor(){this.fieldDefaults={}}updateFieldDefaults(e){e&&(Object.keys(this.fieldDefaults).length?ef.mergeDeep(e,this.fieldDefaults):ef.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]}},Li="downloadAttachment",Fi={},Ui=e=>{const t=Qo();return Fi[e]=t,t},ji=e=>{let t="document-doc";if(!e)return t;if(e.startsWith("audio"))t="audio";else if(e.startsWith("video"))t="video";else if(e.startsWith("image"))t="picture";else if(e.includes("pdf"))t="document-pdf";else{const[,n]=e.split("/"),r=e=>e.some((e=>n.includes(e)));r(["excel","spreadsheet"])?t="document-xls":r(["zip","compressed","gzip","rar","tar"])&&(t="document-compress")}return t},ki=e=>{let t,n,r,s;return t=e.pyCategoryLabel?`${e.pyCategoryLabel},`:e.pyCategoryName?`${e.pyCategoryName},`:e.Category,n=e.pxCreateOpName?e.pxCreateOpName:e.pxCreateOperator?e.pxCreateOperator:e.CreateUser?.Name||"",r=e.pyFileName?e.pyFileName:e.FileExtension&&""!==e.FileExtension&&e.FileName.endsWith(e.FileExtension)?e.FileName.substring(0,e.FileName.lastIndexOf(e.FileExtension)-1):e.FileName,s=e.pyAttachName&&e.pyFileName?e.pyAttachName.startsWith(e.pyFileName)&&e.pyAttachName.split(".").length-1===e.pyFileName.split(".").length?e.pyAttachName.split(".").pop():"":e.FileExtension,{props:{meta:`${t} ${n}`,name:e.pyAttachName?e.pyAttachName:e.FileName,icon:ji(e.pyMimeFileExtension||e.MimeType),error:e.error||null,thumbnail:e.thumbnail||null},responseProps:{fileName:e.pyAttachName?e.pyAttachName:e.FileName,name:r,category:e.pyCategoryName?e.pyCategoryName:e.Category,extension:s,ID:e.pzInsKey?e.pzInsKey:e.ID,mimeType:e.pyMimeFileExtension?e.pyMimeFileExtension:e.MimeType,attachmentURL:e.pyAttachmentLink?e.pyAttachmentLink:e.AttachmentURL,createUser:n,createDateTime:e.pxCreateDateTime?e.pxCreateDateTime:e.CreateDateTime,responseType:e.responseType??(e.ID?"binary":null),localAttachment:!!e.localAttachment}}},Vi=e=>{let t=[],n=!1;if(e&&Object.hasOwn(e,"pyCount"))n=!0,t=e?.pxResults?.filter((e=>!!e.pzInsKey)).map((e=>ki(e)))||[];else if(e&&"object"==typeof e){let n;n=Array.isArray(e)?e:[e],t=n?.filter((e=>e.ID&&e.FileName||e.pzInsKey)).map(ki)}else t=[];return{hasUploadedFiles:t.length>0,categoryName:e?.pyCategoryName||t?.[0]?.responseProps?.category||"",attachments:t,isOldAttachment:n}},$i={uploadAttachment:(e,t,n,r,s,a)=>{const o=new FormData;o.append("appendUniqueIdToFileName","true"),o.append("file",e),s&&o.append("contextID",s),a&&o.append("category",a);const{restApi:i,reqType:c}=rm("uploadAttachment",{});return Ko(i,{method:c,headers:{"Content-Type":"multipart/form-data"},body:o,onUploadProgress:t,signal:Ui(e.ID).token},r).then((t=>({type:"File",category:e.category||"File",ID:t.data.ID,clientFileID:e.ID,filename:e.name}))).catch(n?n(Zo,e):e=>{throw e.isHandled=!1,e}).finally((()=>delete Fi[e.ID]))},linkAttachmentsToCase:(e,t,n,r)=>{const s={};if("File"===n){const[e]=t,{clientFileID:n}=e;delete e.clientFileID,n&&(s.signal=Ui(n).token)}const{restApi:a,reqType:o}=rm("linkCaseAttachment",{caseID:e});return Ko(a,{...s,body:{attachments:t},method:o},r)},getCaseAttachments:(e,t,n=!1)=>{const{restApi:r,reqType:s}=rm("getCaseAttachments",{caseID:e,includeThumbnail:n});return Ko(r,{method:s},t).then((e=>e.data.attachments))},getAttachmentCategories:(e,t,n)=>{const{restApi:r,reqType:s}=rm("getAttachmentCategories",{caseID:e,type:t});return Ko(r,{method:s},n).then((e=>e.data))},downloadAttachment:(e,t,n)=>{const{restApi:r,reqType:s}=rm(Li,{attachmentID:e});return Ko(r,{method:s,..."binary"===n&&{responseType:"arraybuffer"}},t)},editAttachment:(e,t,n)=>{const{restApi:r,reqType:s}=rm("editAttachment",{attachmentID:e});return Ko(r,{method:s,body:{...t}},n)},deleteAttachment:(e,t)=>{const{restApi:n,reqType:r}=rm("deleteAttachment",{attachmentID:e});return Ko(n,{method:r},t)},downloadDocument:(e,t)=>{const{restApi:n,reqType:r}=rm("downloadDocument",{documentID:e});return Ko(n,{method:r},t)},deleteDocument:(e,t,n)=>{const{restApi:r,reqType:s}=rm("deleteDocument",{caseID:e,documentID:t});return Ko(r,{method:s},n)},getDocumentURL:e=>{const t=PCore.getEnvironmentInfo().getDocumentUrlDP()||"D_pxGetDocumentURL";return PCore.getDataPageUtils().getPageDataAsync(t,e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getDocumentURL API : ",t.response)}))},cancelRequest:e=>{Fi[e]&&(Fi[e].cancel(),delete Fi[e])},buildFilePropsFromResponse:ki,getAttachmentURL:e=>{const{restApi:t}=rm(Li,{attachmentID:e});return t},prepareAttachmentData:Vi,validateAttachments:(e,t)=>{let n=e;if("object"==typeof t&&"attachments"in t){const{attachments:e}=t;0===e.length&&(n="")}else{const{attachments:e}=Vi(t);0===e.length&&(n="")}return n}};class Bi{constructor(){this.validators={}}static messageDispatcher(e,t,n,r,s,a){if(r){const o=[];o.push({type:B.MESSAGES.MESSAGES_TYPE_ERROR,fieldLabel:s,message:r,...a??{}}),mo({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,r,s,a){const{required:o,value:i}=a;let c=null;if(!("true"!==o&&!0!==o)){let o=r;switch(e){case"radiobuttons":o=i;break;case"attachment":o=$i.validateAttachments(r,i);break;case"checkbox":o&&"false"!==o||(o="");break;default:"string"==typeof o&&(o=o.trim())}c=this.getValidator("required")(o),Bi.messageDispatcher(t,n,s,c,ai.getFieldLabel(a),{subType:"required"})}return c}validateType(e,t,n,r,s,a){let o=null;const i={pageReference:n,context:s,property:t,target:a?.target,required:a?.required};let c=Mi.getDefaultsforType(a?.componentName||"")?.["client-validations"];!1!==c&&e&&this.getValidator(e)&&(o=this.getValidator(e)(r,i),(""!==r||Mi.getDefaultsforType(a?.componentName||"")?.showErrorWhenEmpty)&&Bi.messageDispatcher(t,n,s,o,a?.label));const l=a?.validationType;return c=l&&Mi.getDefaultsforType(l)?.["client-validations"],!1!==c&&l&&this.getValidator(l)&&(o=this.getValidator(l)(r,i),Bi.messageDispatcher(t,n,s,o,a?.label)),o}validate(e,t,n,r={}){const{context:s,disabled:a,readOnly:o,pageReference:i,skipRequiredValidation:c}=r;let l=null;return a||o||(c||(l=this.validateRequired(e,t,i,n,s,r)),l||(l=this.validateType(e,t,i,n,s,r))),{message:l}}isValidatorExist(e){return!!e.validatetype}}const Gi=new Bi,Wi=(e,t)=>{e.DeclareExpressions&&t.context&&pn({[t.context]:e.DeclareExpressions})},Hi=(e,t,n=!1)=>{const r=ef.getIn(e,G.RESOURCES);r&&((e=>{e&&hg(e)})(r),Wi(r,t)),n||um({...e,options:t})};class qi{static createCase(e,t){const{caseInfo:n,startingFields:r,flowType:s,viewType:a=Zc.PAGE,pageName:o,context:i=G.APP.APP,debugInfo:c,headers:l,retrieveActionViewForNewObject:u=!1}=t;let d={};n&&n.content&&(d=n.content);const{content:p,pageInstructions:h}=qi.getExternalObjectContent(e,u,i);let g={[qi.getKeyBasedOnWorkType(e)]:e,content:{...d,...r,...Bl.isExternalObject(e)&&!u&&{...p}}};g={...g,...Bl.isExternalObject(e)&&!u&&{pageInstructions:h},...!Bl.isObjectCaseType(e)&&{processID:s}};const f=qi.getObjectTypeViewPayload(u,e);return Ki(Bl.getRouteKeyForCreateWork(e,u),{body:g,queryPayload:{...f,caseClassName:e,viewType:a,params:{pageName:o}},headers:{...l,...c&&{...ko.addDebugHeaders(c)}}},i).then((t=>({response:t.data,requestPayload:g,headers:tl(t.headers,e,l)})))}static getObjectTypeViewPayload=(e,t)=>e?{objectTypeID:t,actionID:"Create"}:{};static getExternalObjectContent=(e,t,n)=>{if(Bl.isExternalObject(e)&&!t){const e=nl(n,{isExternalObject:!0}),{content:t,pageInstructions:r}=e.content;return{content:t,pageInstructions:r}}return{}};static getKeyBasedOnWorkType=e=>Bl.isObjectCaseType(e)?"objectTypeID":"caseTypeID"}const zi=qi,Yi=()=>({registerHeader:(...e)=>ko.registerHeader(...e),unRegisterHeader:(...e)=>ko.unRegisterHeader(...e),getRegisteredHeaders:()=>ko.getRegisteredHeaders()}),Ki=(e,{body:t={},queryPayload:n={},cancelTokenSource:r,headers:s={},responseType:a,adapter:o},i,c)=>{const{restApi:l,reqType:u}=rm(e,n),d={method:u,headers:s,body:t,...a&&{responseType:a},...o&&{adapter:o}};return r&&(d.signal=r.token),Ko(l,d,i,c??{})},Ji=(e,{method:t="GET",body:n={},headers:r={},withoutDefaultHeaders:s=!1},a)=>{e.startsWith("http:")||e.startsWith("https:")||(e=T()+e);return Ko(e,{method:t,headers:r,body:n,withoutDefaultHeaders:s},a)},Xi=e=>jh.doesRestApiExist(e),Qi=()=>Qo(),Zi=e=>Zo(e),ec=e=>{Yo(e)},tc=()=>zi,nc="getCustomComponent",rc="text/javascript";const sc=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="",r=0;return e.forEach((e=>{n+=`${0===r?"?":"&"}field${r}=${e.field}&value${r}=${e.value}`,r+=1})),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,n,t):this.getSvcComponentsConfigCombinedUrl(e,n,t)}async getSvcComponentsConfigSeparatedUrls(e,t,n){const r=Vh.getBuiltOnAppNames(),s=this.loadAndFilterPegaComponentsConfig(e,r);let a=Promise.resolve([]);!0!==n.skipLoadCustomerComponents&&(a=this.loadAndCustomerComponentsConfig(t,e));const o=[],i=Vh.environmentInfoObject?.pyInfinityStaticService;if(i){const e=[],t=await Promise.all([s,a]),[n,r]=t,i=[];for(const t of r)!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([s,a,e]).then((e=>{const t=this.mergeComponentList(e);o.push(...t)}))}if(n.alternateDesignSystemURL&&1===o.length){const r=await this.getSvcComponentsConfigADS(e,t,n);o[0].alternateDesignSystemConfig=r}return{data:{components:o}}}mergeComponentList=e=>{const[t=[],n=[],r=[]]=e,s=[...t,...n];return this.appStaticUrl?s.map((e=>{const{name:t,type:n,subtype:s}=e,a=r.reduce(((e,r)=>(t===r.name&&n===r.type&&s===r.subtype&&(e=r),e)),{});return Object.keys(a).length>0?{...e,alternateDesignSystemConfig:{...a}}:e})):s};async fetchSDKComponent(e){if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const t=`${this.appStaticUrl}v102/${this.appAlias}/componentslist-ext${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}return Promise.resolve([])}async loadAndFilterPegaComponentsConfig(e,t){return this.loadPegaComponentsConfig().then((()=>{const n=[];return this.componentsConfig&&this.componentsConfig.forEach((r=>{let s=!0;e.forEach((e=>{Array.isArray(r[e.field])?r[e.field].includes(e.value)||(s=!1):r[e.field]!==e.value&&(s=!1)})),s&&this.checkForBuiltOnSupport(t,r.allowedApplications)&&n.push(r)})),n}))}async loadPegaComponentsConfig(){let e=null;if(null===this.componentsConfig){const t=`${this.staticServerURL}components/componentsconfig.json?v=${(new Date).getTime()}`;e=fetch(t,{method:"GET"}).then((e=>e.json())).then((async e=>{this.componentsConfig=e,this.ccV2LibId&&await this.loadLibraryComponentsConfig(this.ccV2LibId).then((e=>{e&&e.length>0&&(this.componentsConfig=(this.componentsConfig||[]).concat(e))})).catch((e=>{console.error(`Exception while appending custom component config from library ${this.ccV2LibId} : ${e}`)}))})).catch()}else e=Promise.resolve();return e}async loadLibraryComponentsConfig(e){let t=null;return t=fetch(`${this.appStaticUrl}v100/componentlib/componentsconfig/${e}?v=${Date.now()}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>{if(!e.ok)throw console.error("Error while fetching custom component config/library component config"),new Error(e.statusText);return e})).then((e=>e.json())).then((e=>Promise.resolve(e))).catch((t=>(console.error(`Exception while fetching custom component config from library ${e} : ${t}`),{error:t.message}))),t}async loadAndCustomerComponentsConfig(e,t){let n=null;const r=Vh.environmentInfoObject?.pyInfinityStaticService;if(r){const e={};t.forEach(((t,n)=>{e[`field${n}`]=t.field,e[`value${n}`]=t.value})),n=PCore.getDataPageUtils().getDataAsync("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 r=`${this.staticServerURL}v102/${this.appAlias}/componentslist${t}`,s=await fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>({data:e})));if(!0===n.skipLoadCustomerComponents&&s?.data?.components?.length>0&&(s.data.components=s.data.components.filter((e=>void 0===e.componentKey))),n.alternateDesignSystemURL&&1===s?.data?.components?.length){const r=await this.getSvcComponentsConfigADS(e,t,n);s.data.components[0].alternateDesignSystemConfig=r}return s}getSvcComponentsConfigADS(e,t,n){const r=`${n.alternateDesignSystemURL}${n.alternateDesignSystemURL?.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(r,{method:"GET"}).then((e=>{if(e.ok)return e.json();throw new Error(e.statusText)})).catch((e=>({error:e.message})))}getSvcImage(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).catch()}getSvcImageUrl(e){const t=Vh.environmentInfoObject?.pyInfinityStaticService,{callUrlKey:n,queryPayload:r,callUrl:s}=this.buildImageRequest(e,t);return this.imageBlobUrlCache[s]||(this.imageBlobUrlCache[s]=this.fetchImage(n,r,s,t)),this.imageBlobUrlCache[s]}buildImageRequest(e,t){let n,r="getBinaryFile",s=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;if(t){const t=/DATA-CONTENT-IMAGE\s([^\s!]+)!.*\/OPERATORIMAGES\//i,a=e.match(t);a&&a[1]?(r="getOperatorImage",n={user_ID:a[1].toLowerCase()}):n={fileID:e},s=rm(r,n)?.restApi||s}return{callUrlKey:r,queryPayload:n,callUrl:s}}fetchImage(e,t,n,r){return r?Ki(e,{queryPayload:t}).then((e=>{const n=this.decodeBase64ToByteArray(e.data),r=this.getMimeTypeFromKey(t?.fileID||t?.user_ID||""),s=new Blob([n],{type:r});return window.URL.createObjectURL(s)})).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()}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"}decodeBase64ToByteArray(e){const t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e+=1)r[e]=t.charCodeAt(e);return r}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=Vh.environmentInfoObject?.pyInfinityStaticService;if(t){const t=Vh.environmentInfoObject?.pxApplication?.pxUpdateDateTime,n=t?ef.parsePegaDateTimeToTimestamp(t):null,r=`${e}${n?`?v=${n}`:""}`;return(await Ki(nc,{queryPayload:{componentName:r}})).data}const n=Vh.environmentInfoObject?.pyC11nDXCBDevURL,r=n?`${n}/index.js`:`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`,s=await fetch(r,n?{}:{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){try{const t=Vh.environmentInfoObject?.pyInfinityStaticService,n=Vh.environmentInfoObject?.pyC11nDXCBDevURL;let r=`${this.appStaticUrl}v100/componentlib/componentsmap/${e}`;if(n){r=`${n.replace(/\/+$/,"")}/index.js`}if(t&&!n){const t=Vh.environmentInfoObject?.pxApplication?.pxUpdateDateTime,n=t?ef.parsePegaDateTimeToTimestamp(t):null,r=`${e}${n?`?v=${n}`:""}`,s=await Ki(nc,{queryPayload:{componentName:r}});return void this.appendCustomScriptToHead(s.data)}if(t||n){const e=document.createElement("script");return e.src=r,e.type="text/javascript",e.onerror=()=>console.error("Error while appending custom component map"),void document.head.appendChild(e)}const s=n?{}:{headers:{Authorization:`Bearer ${this.b2sJWT}`}},a=await fetch(r,s);a.ok||console.error("Error while fetching custom component map");const o=await a.text();this.setCCV2LibId(e),this.appendCustomScriptToHead(o)}catch(e){console.error("Exception while appending custom component map:",e)}}async appendCustomScriptToHead(e){try{const t=document.createElement("script");t.src=window.URL.createObjectURL(new Blob([e],{type:rc})),t.onerror=()=>console.error("Error while appending custom component map"),document.head.appendChild(t)}catch(e){console.error("Exception appendCustomScriptToHead:",e)}}loadSvcComponent(e){return new Promise(((t,n)=>{this.getSvcComponent(e).then((r=>{const s=document.createElement("script");s.src=window.URL.createObjectURL(new Blob([r],{type:rc})),s.onload=()=>t(e),s.onerror=()=>n(e),document.head.appendChild(s)})).catch((()=>{n(e)}))}))}initServer(e,t,n){console.log(`asset-loader.initServer(${e}, ${t})`),this.appStaticUrl=null,this.staticServerURL=null,this.pegaOnlyUrl=!1,this.componentsConfig=null,e&&t&&"no-appstatic"!==t&&"no-cdn"!==t?(this.appStaticUrl=t.endsWith("/")?t:`${t}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0):e&&t&&"no-appstatic"===t?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0):e&&t&&"no-cdn"===t&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL),console.log(`asset-loader.initServer() staticServerURL=${this.staticServerURL}, appStaticUrl=${this.appStaticUrl}, pegaOnlyUrl=${this.pegaOnlyUrl})`),this.b2sJWT=n}register(e,t){this.loaderObj[e]=t}getLoader(e){let t;const n=(e,t)=>new Promise(((n,r)=>{const s=document.createElement(t);if("script"===t){const t=s;t.onload=()=>{n(e)},t.onerror=()=>{r(e)},t.type=rc,t.charset="UTF-8",t.async=!1,t.src=e}else{const t=s;t.type="text/css",t.rel="stylesheet",t.href=e}document.head.appendChild(s)})).catch((e=>{console.log(e)}));return t=e?this.loaderObj[e]:n,t}loadAssets(e,t){const{isDevServerMode:n}=t;if(!e)return Promise.resolve();const r=[];return e.forEach((e=>{const t=Object.keys(e)[0];let s=n?Object.values(e)[0]:this.getStaticServerUrl();s=s.endsWith("/")?s:`${s}/`,this.loadedAssets[t]||(t.includes(".js")?r.push(this.getLoader()(s+t,this.getTypes.SCRIPT)):t.includes(".css")&&this.getLoader()(s+t,this.getTypes.STYLE),this.loadedAssets[t]=!0)})),Promise.all(r)}getAssetsFromIsolations(e){const t=this.b2sJWT?.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")||"",n=decodeURIComponent(s.g.atob(t).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")),r=JSON.parse(n),a=r?.tenant_id,{restApi:o,reqType:i}=nm("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()))}},ac="component-loader",oc={},ic=async(e,t)=>{if(!e?.length||!1===window.PCore?.getBehaviorOverride("dynamicLoadComponents"))return Promise.resolve();const n=sc.getLoader(),r=t||sc.staticServerURL;if(sc.getLoader(ac))return sc.getLoader(ac)(e,r);const s=new Set(Object.keys(oc)),a=e.flatMap((e=>{if(s.has(e))return[];const t=fn.getComponent(e);if(!t){const t=`${sc.getConstellationServiceUrl()}/v860/${sc.getAppAlias()}/component/${e}.js`;return s.add(e),[n(t,sc.getTypes.SCRIPT)]}const a=(t.scripts||[]).map((e=>n(e.startsWith("http")?e:`${r}${e}`,sc.getTypes.SCRIPT))),o=(t.styles||[]).map((e=>n(`${r}${e}`,sc.getTypes.STYLE)));return s.add(e),[...a,...o]}));return Promise.all(a.map((e=>e.catch((e=>console.error("Error loading asset:",e))))))};const cc=new class{#n;constructor(){this.userSettings={},this.componentCache={},this.contextMapToClearOnCancel={},this.#n=!1}getNormalizedKey(e){return e?.toString().trim().replace(/\s/g,"-").toLowerCase()}setComponentState=(e,t)=>{sessionStorage?sessionStorage.setItem(this.getNormalizedKey(e),JSON.stringify(t)):console.error("Session Storage not found")};getComponentState=e=>{const t=sessionStorage.getItem(this.getNormalizedKey(e)),n=t?ef.isValidJson(t):void 0;return n||t};removeComponentState=e=>{sessionStorage.removeItem(this.getNormalizedKey(e))};fetchUserSettings=async()=>{if(Xi("getUserSettings")){const{restApi:e,reqType:t}=rm("getUserSettings");Ko(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=()=>{Vh.getUserSettings()?this.userSettings=Vh.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 ef.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(!Xi("updateUserSettings"))return Promise.resolve("updateUserSettings route is not available");n=rm("updateUserSettings");const{restApi:r,reqType:s}=n;return Ko(r,{method:s,body:ef.setIn({},e,t)}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong");this.userSettings=e.data})).catch((e=>{console.error(e)}))};setComponentCache(e,t,n={}){if("string"!=typeof e||!e?.trim())return;const r=n.clearOnCancelForContext;if(r&&(Object.hasOwn(this.contextMapToClearOnCancel,r)?this.contextMapToClearOnCancel[r].add(this.getNormalizedKey(e)):this.contextMapToClearOnCancel[r]=new Set([this.getNormalizedKey(e)])),this.componentCache[this.getNormalizedKey(e)]=t,!this.#n){this.#n=!0;const e=e=>{const{context:t}=e||{};(this.contextMapToClearOnCancel[t]||new Set).forEach((e=>{this.resetComponentCache(e)})),delete this.contextMapToClearOnCancel[t]};No.subscribe(G.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(window.location.href).searchParams.get(e);return n?(n=t?atob(n):n,n):null}setURLParam(e,t,n){if(!Vh.shouldUseURLParams())return;const r=new URL(window.location.href);if(t=n?btoa(t):t,r.searchParams.get(e)===t)return;r.searchParams.set(e,t);window.history.pushState({type:"ui-navigation"},"",r)}resetComponentCache(e){return!("string"!=typeof e||!e?.trim())&&(!!Object.hasOwn(this.componentCache,this.getNormalizedKey(e))&&(delete this.componentCache[this.getNormalizedKey(e)],!0))}};const lc=new class{constructor(){this.contextArray={},this.pauseDuration=2e3,this.waitingToPutUpIndicator=!1}getLoadingContext(e){let t=null;return e&&(({context:t}=e),t||(t=e.containerItemID),t||(t=e.contextName)),t}enableLoadingIndicator(e,t=!0){const n=this.getLoadingContext(e);n&&(this.addToContextArray(n),this.waitingToPutUpIndicator||(this.waitingToPutUpIndicator=!0,this.pauseBeforeShowing(n).then((e=>{t&&void 0!==this.contextArray[e]&&this.contextArray[e]>0&&Ug({type:de,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]&&Ug({type:pe,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 uc=new class{constructor(){this.counterActionMgrId=0,this.actionMgrActions={}}getNextActionMgrId(){return this.counterActionMgrId+=1,this.counterActionMgrId.toString()}register(e,t,n,r,s="unknown",a,o=!0){if(void 0!==this.actionMgrActions[e])return null;const i={actionType:s,promise:t,resolve:n,reject:r,actionPayload:a};return this.actionMgrActions[e]=i,o&&lc.enableLoadingIndicator(i.actionPayload),e}actionManagerPromise=(e,t="")=>{let n,r;""===t&&(t=this.getNextActionMgrId());const s=new Promise(((e,t)=>{n=e,r=t}));if(!n||!r)throw new Error("resolveFn or rejectFn is not defined.");return this.register(t,s,n,r,e),{actionMgrID:t,promise:s}};resolveActionByID(e,t,n=!0){const r=this.actionMgrActions[e];let s=e;return r?(setTimeout((()=>{r.resolve(t)}),0),lc.disableLoadingIndicator(r.actionPayload,n)):s=null,s}rejectActionByID(e,t=!0,n){const r=this.actionMgrActions[e];let s=e;return r?(r.reject(n),lc.disableLoadingIndicator(r.actionPayload,t)):s=null,s}setRemoteCaseHeaderByContext(e,t){t&&(e.headers=e.headers||{},e.headers.RemoteSystemID=t)}setTraditionalRemoteCaseParams(e,t){return e.className=t.className,e.isTraditionalRemoteCase=q.isTraditionalRemoteCase(t.className),e.remoteClassName=t.remoteClassName,e.action=t.action,e.viewName=W,e.gadgetId=t.gadgetId??Bl.getUniqueGadgetId(),e.name=t.name,e.skipSemanticUrl=!0,ie}};class dc{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 pc=dc,hc=(e,t,n)=>jh.getResolvedSemanticURL(e,t,n),gc={getResolvedSemanticURL:hc,getActions:()=>({ACTION_OPENWORKBYHANDLE:ze,ACTION_SHOWDATA:We,ACTION_SHOWVIEW:Ge,ACTION_GETOBJECT:bt,ACTION_SHOWINSIGHT:He,ACTION_SHOWDASHBOARD:qe}),updateSemanticURLAndDocumentTitle:e=>jh.updateSemanticURLAndDocumentTitle(e),getSemanticURLForToaster:(e,t,n=!1)=>hc(n?bt:ze,{caseClassName:e},{[n?"objectID":"workID"]:t})},fc={CASE_INFO:`${G.DATA}.${G.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${G.DATA}.${G.CASE_INFO.CASE_TYPE_ID}`,CASE_INFO_ID:`${G.DATA}.${G.CASE_INFO.CASE_INFO_ID}`,BUSINESS_ID:`${G.DATA}.${G.CASE_INFO.BUSINESS_ID}`},mc=e=>ef.getIn(e,G.getProperty(fc.CASE_CLASS_NAME),G.EMPTY_STRING),Ic=e=>ef.getIn(e,G.getProperty(fc.CASE_INFO_ID),G.EMPTY_STRING),yc=(e,t)=>{const n=Ic(t);ef.setIn(e,"key",n)},Ec=e=>ef.getIn(e,G.getProperty(fc.CASE_INFO),{}),Ac=e=>{const t=Fg();if(!e)return!1;const n=K(e),r=rh(n),s=rh(e);if(!r||!s)return!1;const a=Rp(r,n),o=Rp(s,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},_c=e=>{const t=Ic(e),n=ef.getIn(e,G.getProperty(fc.BUSINESS_ID),G.EMPTY_STRING),r=t.toLowerCase().includes(n.toLowerCase())?n:t,s=mc(e);return{businessID:n,caseType:s,resolvedURL:gc.getSemanticURLForToaster(s,r,Bl.isObjectCaseType(s))}},Cc=e=>{No.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,e)},Sc=e=>{No.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,e)},Tc=e=>{No.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.CASE_OPENED,e)},Nc={CASE_INFO:`${G.DATA}.${G.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${G.DATA}.${G.CASE_INFO.CASE_TYPE_ID}`,NEXT_ASSIGNMENT_INFO_ID:`${G.DATA}.${G.NEXT_ASSIGNMENT_INFO_ID}`,ASSIGNMENTS:`${G.DATA}.${G.CASE_INFO.ASSIGNMENTS}`,CASE_INFO_ID:`${G.DATA}.${G.CASE_INFO.CASE_INFO_ID}`,CASE_FIRST_FLOW_ACTION_NAME:`${G.DATA}.${G.CASE_INFO.ASSIGNMENTACTION_ID}`,CASE_FIRST_ASSIGNMENT_ID:`${G.DATA}.${G.CASE_INFO.ASSIGNMENT_ID}`},Pc=(e,t)=>{const{vcName:n,containerName:r}=t;return r||n||pc.getTargetViewContainerName(e)},Oc=e=>{const t=e.lastIndexOf(G.FORWARD_SLASH_STRING)+1,n=e.lastIndexOf(G.UNDERSCORE_STRING);return e.substring(t,n)},Dc=e=>e===Np.WORKAREA,Rc=e=>e===Np.MODAL,bc=e=>e===Fe,vc=e=>e===Te,xc=e=>e&&e.find((e=>e.type===Te)),wc=e=>ef.getIn(e,Nc.CASE_INFO,{}),Mc=e=>e?e.split(" ").pop():void 0,Lc=e=>ef.getIn(e,Nc.CASE_CLASS_NAME,G.EMPTY_STRING),Fc=(e,t=!1)=>{const n=t?Ec(e):wc(e);return Wl(n)&&Hl(Vh.getOperatorIdentifier(),n)},Uc=e=>ef.getIn(e,Nc.CASE_INFO_ID,G.EMPTY_STRING),jc=e=>ef.getIn(e,Nc.CASE_FIRST_ASSIGNMENT_ID,G.EMPTY_STRING),kc=(e,t)=>{const{removeActionPayload:n,target:r}=t;if(n&&n.containerItemID){const{containerItemID:t,context:s}=n;e.push(jf(vf,{containerItemID:t,context:s||Bp(t),target:r}))}},Vc=e=>{const t=Fg();if(!e)return!1;const n=K(e),r=rh(n),s=rh(e);if(!r||!s)return!1;const a=Rp(r,n),o=Rp(s,e);if(!a||!o)return!1;const{key:i}=a||{};let{key:c}=o||{};return c||(c=t?.getState().data?.[e]?.caseInfo?.ID),i&&c&&i===c},$c=(e,t,n={})=>{const{skipFlowNameUpdate:r}=n,s=Uc(t);ef.setIn(e,"key",s);const a=Wl(wc(t));if(!r&&(e=>{const t=ef.getIn(e,Nc.ASSIGNMENTS,[]);return t&&t.length>0})(t)){const n=jc(t),[,r]=n.split("!");(e=>{No.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.CURRENT_ASSIGNMENT_UPDATED,e)})({assignmentID:n,isInCreateStage:a}),ef.setIn(e,"flowName",r)}},Bc=(e,t)=>{const{attachmentsExist:n}=t;n&&ef.setIn(e,B.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),ef.setIn(e,B.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())},Gc=(e,t,n)=>{let r=G.PROMISE_VALUE.RESOLVE;return xc(e)?(r=G.PROMISE_VALUE.REJECT,n?uc.rejectActionByID(t,!0,n):uc.rejectActionByID(t)):uc.resolveActionByID(t),r},Wc=e=>{if(!e)return!1;const t=Vh.getCaseTypeList();return"true"===t.filter((t=>t.pyWorkTypeImplementationClassName===e))?.[0]?.pyIsTraditionalUICase},Hc=()=>"true"===Vh?.environmentInfoObject?.pxMashupDetails?.pyLaunchCaseInModal,qc=(e,t,n,r)=>{const{containerItemID:s}=t;if(s){const{caseClassName:a,skipAssignmentsUpdate:o}=r,i=K(s),c=rh(i),l=c&&Dp(c),u=c&&kp(c),d=Z(i),p=n?.data?.caseInfo?.ID;u&&l?.items?.[u]?.key===t?.caseID&&e.push(jf(hf,{containerItemID:i,context:i,container:d,containerName:d,caseId:p,viewName:B.CASESUMMARY_VIEW_NAME,updateData:!0,viewLoadingContainer:{context:i},caseClassName:a,...void 0!==o&&{skipAssignmentsUpdate:o}}))}},zc=(e,t)=>{const n=Lc(e?.response),r=wc(e?.response),{caseTypeID:s}=r,a=Vh.getFeatureMap();(a?.deferUpdateCaseSummaryView??!Object.hasOwn(a,G.DEFER_UPDATE_CASESUMMARY_VIEW))&&s&&qc(t,e?.actionInPayload,e?.response,{caseClassName:n,skipAssignmentsUpdate:!e?.actionInPayload?.context?.includes(G.PREVIEW)})},Yc=e=>jg(e)?.context_data?.caseViewMode;class Kc{constructor(e){Kc._instance=this,this.context=`${e}/${G.SUGGESTION}`,Fg()?.getState().data?.[this.context]||Ug({type:Be,payload:{context:this.context,data:{}}})}getField(e){return $g(e,"",this.context)}setField(e,t){Ug({type:re,payload:{reference:e,value:t,context:this.context}})}removeField(e,t={}){Ug({type:_e,payload:{reference:e,context:this.context,...t}}),No.publish(G.PUB_SUB_EVENTS.SUGGESTION_PROCESSED,{reference:e,context:this.context,...t})}setState(e){Ug(df({context:this.context,data:e,isArrayDeepMerge:!0}))}}const Jc=Kc;const Xc=class{static getSharedState(e){const t=e.startsWith(".")?e.substring(1):e,n=kg();return n?ef.getIn(n,t):null}static setSharedState(e,t){e&&Ug(Wf({key:e,value:t}))}static updateState(e,t,n,r={}){const{isArrayDeepMerge:s=!0,pageReference:a,removePropertyFromChangedList:o=!1,skipDirtyValidation:i=!1}=r;if(!e||!t)return;Ug(Hf({context:e,reference:a?`${a}.${t}`:t,value:n,isArrayDeepMerge:s,removePropertyFromChangedList:o,skipDirtyValidation:i}))}static getSuggestionsContext(e){return new Jc(e)}static triggerRefresh(e,t){ep({context:e,pageReference:t})}},{RESOURCE_TYPES:Qc}=B,Zc={PAGE:"page",FORM:"form"},el={[Qc.CASE]:[Ke,ze,Ye],[Qc.OBJECT]:[Rt,bt,xt],[Qc.PAGE]:[Ge,He],[Qc.DATA]:[We],ASSIGNMENT:[rt]},tl=(e,t,n={})=>{if(!e)return{};const r={etag:e.etag},{RemoteSystemID:s}=n;return e[B.REMOTE_SYSTEM_ID]||e[B.REMOTE_SYSTEM_ID.toLowerCase()]||s?r.RemoteSystemID=e[B.REMOTE_SYSTEM_ID]||e[B.REMOTE_SYSTEM_ID.toLowerCase()]||s:t&&q.isRemoteCase(t)&&(r.RemoteSystemID=q.getRemoteHeader(t)),r},nl=(e,t={})=>{const{onlyChangedData:n=!1,nonEmptyAndChangedData:r=!1,skipUUID:s=!0,isTransientContext:a=!1,includeDisabledFields:o=!1,isObjectWideAction:i,isExternalObject:c}=t;let l={};l=Ul(e,{isTransientContext:a,includeDisabledFields:o,isObjectWideAction:i,isExternalObject:c}),n&&(delete l?.caseInfo?.content,a&&(l={}));const u=dp(e,!1);!a&&r&&((e,t)=>{Object.entries(e?.caseInfo?.content).forEach((([n,r])=>{const s=jg(t),a=M()(s,B.CASE_INFO.CASE_INFO_CLASSID),o=ig(n,a);("True-False"===o?.type&&!r||""===r)&&delete e.caseInfo.content[n]}))})(l,e);const d=j()(u,l);let p={};({content:p}=((e,t,n=!1,r=!1)=>{let s={};const a=n||r?t?.objectInfo:t?.caseInfo;return(e||a)&&(s=e?{...t}:{...a}),{content:s}})(a,d,i,c));const h=[...Ci(e)];s&&h.forEach((e=>{delete e.content?.EmbedListUUID__})),p.pageInstructions=h;if((mi[e]||[]).forEach((e=>{if(p?.content){const t=e?.replace(G.getProperty(G.CASE_INFO.CASE_INFO_CONTENT),"");ef.deleteIn(p.content,(e=>{if(!e)return"";const t=e.split(".");let n,r="";for(n of t)if(n){if(n.includes("[")&&n.includes("]"))return r+=`['${n.substring(0,n.lastIndexOf("["))}']`,r;r+=`['${n}']`}return r})(t))}})),!a&&d?.dataInfo)return p={...d.dataInfo,pageInstructions:p.pageInstructions},{content:p};const g=$g(".pzAdditionalPayload",G.CASE_INFO.CASE_INFO_CONTENT,e);return p.content&&g&&(p.content.pzAdditionalPayload=g),{content:p}},rl=(e,t)=>{let n,r,s={};const a=ef.getIn(e,G.UI_RESOURCES),o=ef.getIn(e,"confirmationNote");a?(n=ef.getIn(e,G.UI_RESOURCES_CONTEXT_DATA),r=ef.getIn(e,G.ROOT),s=ef.getIn(e,G.ACTION_BUTTONS)):o&&(r={});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 h=ef.getIn(e,"nextAssignmentInfo",null),g=ef.getIn(e,"nextAssignmentInfo.context",""),f=ef.getIn(e,"confirmationLinks",null),{isInCreateStage:m,openCaseViewAfterCreate:I,debugInfo:y,isExternalObjectCreationFlow:E}=t;return{data:{...i,key:d,flowName:l,coreHeaders:y&&{debugInfo:{[G.COREHEADER_APP_DEBUG_ID]:y.debugId}},[G.getProperty(G.CASE_INFO.CASE_INFO)]:{...i[G.getProperty(G.CASE_INFO.CASE_INFO)],actionButtons:s,headers:t.headers},[G.CONTEXT_DATA]:m?{...i[G.CONTEXT_DATA],...n,openCaseViewAfterCreate:I,errors:c,isExternalObjectCreationFlow:E}:{...i[G.CONTEXT_DATA],...n,errors:c}},semanticURL:u,nextAssignmentInfo:h,assignmentContext:g,confirmationLinks:f,key:d,root:r,...t}},sl=async(e,t,n,r=!1,s=!1)=>{const a=ef.getIn(e,G.COMPONENTS);if(a)try{await ic(a)}catch(e){console.error(e)}const o={actionConfig:t,...n};r?um({...e,options:o,directUrlUpdation:!0}):Hi(e,o,s)},al=(e="")=>{const t=e.indexOf(" "),n=e.indexOf("!");return e.substring(t+1,n)},ol=e=>{if(e){const[,t]=e.split("!");return{key:al(e),flowName:t}}return{}},il=(e,t,n,r)=>{switch(!0){case Boolean(e[G.ERROR_IN_PAGE_IDENTIFIER]&&e[G.ERROR_FIELD_IN_PAGE]):{const s=`${e[G.ERROR_FIELD_IN_PAGE]}`.replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`)),a=`${s}${e[G.ERROR_IN_PAGE_IDENTIFIER]}`,o=ef.deepClone(e);o[G.ERROR_FIELD_IN_PAGE]=s,t.includes(a.slice(1))||t.includes(a.substring(a.indexOf(".")+1,a.indexOf("[")))||t.includes(a.substring(a.indexOf(".")+1,a.indexOf("(")))?r.push(o):n.push(e);break}case Boolean(e[G.ERROR_IN_PAGE_IDENTIFIER]&&!e[G.ERROR_FIELD_IN_PAGE]):{const s=e[G.ERROR_IN_PAGE_IDENTIFIER].slice(1);t.includes(s)?r.push(e):n.push(e);break}default:n.push(e)}},cl=e=>{const{payload:t}=e,{err:n,context:r,actionMgrID:s}=t,a=n&&n.response?n.response.data:"",o=kl(r);return s&&uc.rejectActionByID(s,!0,n),jf(kf,"Error action triggered",a,r,o)},ll=(e,t)=>Yp(e)&&Jp(e)?jf(Mf,t):jf(Ef,t),ul=(e,t,n=G.APP.APP,r={})=>{let s=null;const{buildNew:a=!0}=r;return Yp(e)?s=Jp(e)?kp(e):J(t,n):Kp(e)&&(Jp(e)&&!a?s=Gp(e):Jp(e)&&!a||(s=J(t,n))),s},dl=e=>e&&e.type===Oe,pl=e=>{let t=!1;const n=qp(e);for(let e=0;e<n.length;e+=1){const r=n[e];if(r&&Ip(r)){t=!0;break}}return t},hl=(e,t={})=>{let n=!1,r=!1,s={},a=!0,o=!1,i=!1;const{showConfirmDialogForMaxDocumentLimitReached:c=!1,dirtyMessage:l,skipChildDirtyState:u=!1}=t,d=Hh();if(Yp(e)){const t=kp(e);if(!t)return{continueExecution:a,removeActionPayload:s};const r=Bp(t);Ip(r)&&(n=!0),u||n||(n=pl(t))}else if(Kp(e)&&Zp(e)){let t=nh(e);t||(t=kp(e),r=!0),s.containerItemID=t,s.context=Bp(t)}if(n){const e=l||lp;o=window.confirm(d.getLocaleValue(e,"Messages"))}if(!o&&n&&(s={},a=!1),r){const e=d.getLocaleValue(up,"Messages");c?i=window.confirm(e):(window.alert(e),a=!1)}return!i&&r&&(s={},a=!1),{continueExecution:a,removeActionPayload:s}},gl=(e,t)=>{let n=!1;const r=Vh.isCoexistenceAppOfType(G.APP_TYPE.UIKIT),{insKey:s,isParallelCall:a,skipFlowNameCheck:o}=t;if(!s)return{};const[,i]=s.split("!")||"",c=o?s:al(s),l=Mp(e,c);let u={},d=!1;if(l&&!r&&((e,t)=>{const n=Rp(e,t);return n?.resourceType})(e,l)===t?.type&&(n=!0,u=Rp(e,l),!o)){let e=u?.flowName;const t=Oc(l),r=Wp(l);if(r.length){const n=wt(t,r[0]);e=Rp(n,r[0])?.flowName}else n=e===i;(e!==i||a)&&(d=!0)}return{activate:n,activateContainerActionPayload:{target:e,isParallelAssignment:d,containerItemID:l,semanticURL:u.semanticURL,insKey:s}}},fl=(e,t,n)=>e===Qc.PAGE?((e,t={})=>{let n=!1;const{semanticURL:r}=t,s=Mp(e,r);return s&&(n=!0),{activate:n,activateContainerActionPayload:{target:e,containerItemID:s,semanticURL:r}}})(t,n):e===Qc.ASSIGNMENT?gl(t,{...n,type:e}):e===Qc.CASE||e===Qc.OBJECT?gl(t,{...n,skipFlowNameCheck:!0,type:e}):{},ml=e=>{if(e){const t=(e=>{const t=bp(e);if(!t)return null;for(const[e,n]of Object.entries(t))if(!n.key&&n.resourceType===B.PAGE)return e;return null})(e);if(t)return{activate:!0,activateContainerActionPayload:{target:e,containerItemID:t,semanticURL:""}}}return{activate:!1}},Il=(e,t,n)=>{const{semanticURL:r,isDefaultNavPage:s}=((e,t)=>{const n=tm(Ge,{page:e,pageClass:t}),r=Fg()?.getState()?.data?.app?.pyPortal?.pyPrimaryNavPages,s=Array.isArray(r)?r[0]:void 0;return{semanticURL:n,isDefaultNavPage:!(s?.pyRuleName!==e||s?.pyClassName!==t)}})(e,t);if(n&&r&&!s){const e=fl(Qc.PAGE,n,{semanticURL:r});if(e.activate)return{semanticURL:r,activate:!0,activateContainerActionPayload:e.activateContainerActionPayload}}if(s){const e=ml(n);return e.activate?{semanticURL:r,...e}:{semanticURL:"",activate:!1}}return{semanticURL:r,activate:!1}},yl=(e,t)=>(e?.data?.caseInfo&&t?.caseInfo?.content&&(e.data.caseInfo.content=t?.caseInfo?.content),e),El=(e=[])=>{Jp(`${G.APP.APP}/${G.PREVIEW}`)&&e.push(jf(yf,eh({context:B.APP.APP,name:G.PREVIEW})))},Al=e=>{let t;for(const n of Object.keys(el))if(el[n].includes(e)){t=n;break}return t},_l=(e,t,n="",r={})=>{const{data:s={},context:a,caseViewMode:o,skipMergeAssignmentsAndActions:i=!0}=e,c={data:{...s},caseViewMode:o,context:K(a)};ef.deleteIn(c.data,"shared"),ef.setIn(c.data,["context_data","caseViewMode"],o),t.push({type:dt,payload:{context:c.context,skipMergeAssignmentsAndActions:i}});const l=n&&![B.CASE_INFO.CASE_INFO_CONTENT,B.DATA_INFO.DATA_INFO_CONTENT].includes(n),{propertiesToReplace:u=[]}=r;t.push(jf(df,{...c,...l&&{uiRootReference:n}},...u.length>0?[{propertiesToReplace:u}]:[]))},Cl=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=ef.getIn(t,["payload","assignmentContext"]);if("other"===n||"remote"===n){const r=ef.getIn(t,["payload","nextAssignmentInfo","ID"]);if(t?.payload?.isProcessAction){const n={acName:ef.getIn(t,["payload","target"]),caseID:t.payload.data.caseInfo.ID,containerItemID:ef.getIn(t,["payload","context"]),context:ef.getIn(t,["payload","context"])},r={type:ye,payload:{...n}};e.push(r),e=e.filter((e=>delete e?.payload?.data?.caseMessages)),Ug(e),e=e.filter((e=>e.type!==ye))}const s=((e,t,n)=>({assignmentID:e,vcName:G.PRIMARY,targetContainerName:ef.getIn(t,["payload","target"]),context:ef.getIn(t,["payload","context"]),..."other"===n&&{isChild:!0},isProcessAction:t?.payload?.isProcessAction,..."remote"===n&&{isRemote:!0},..."remote"===n&&{remoteClassName:t.payload.nextAssignmentInfo.className}}))(r,t,n);Yp(s.targetContainerName)||t?.payload?.containerName!==G.WORKAREA||(s.isMultiDoc=!0,e=[]);const a={type:Ee,payload:{...s}};e.push(a),Ug(e)}else Ug(e)}},Sl=(e,t)=>j()(e,t,(function(e,t){if(Array.isArray(e))return e.concat(t)})),Tl=e=>{let t={},n=Ch(e);for(;n;){const e=nl(n);t=Sl(e.content,t),n=Ch(n)}return t},Nl=e=>{e?.containerItemID&&Xc.updateState(e.containerItemID,"traditionalGadgetId",Bl.getUniqueGadgetId(),{skipDirtyValidation:!0})};class Pl{static getChanges(e){return{...dp(e)}}static getSubmitData(e,t){const{isTransientContext:n=!1,includeDisabledFields:r=!1}=t||{},{content:s}=nl(e,{isTransientContext:n,includeDisabledFields:r});return s}static isStateModified(e){return Ip(e)}static isFormValid(e,t){return jl(e,t)}static clearChangedProperties(e){return Si(e),_i(e),Ep(e)}static getEditableFields(e){return Vl(e)}static setCustomValidator(e,t){Gi.register(e,t)}static isPropertyEditable(e,t){return Pl.getEditableFields(e).some((e=>e.name===t))}}const Ol=Pl;const Dl=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,r){const s=`${n}${t}`,{stateMachine:a}=this.getStateMachineObjByPath(s,e,!0,!0),o=(t,n,r=!1)=>{const s=r?this.states:this.unConnectedStates;s[e]||(s[e]={}),s[e][t]||(s[e][t]={}),s[e][t]=n};if(a&&a.targetPageReference!==r.targetPageReference)return a.addChild(r),void o(s,r);const i=Object.entries(this.states[e]||{}).filter((([e])=>{if(e.includes(s)){const t=e.substring(0,s.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],r.addChild(n),o(t,n)})),this.states[e][s]=r):o(s,r,!0)}buildPageInstructionsByContext(e,t){const n=this.getStateMachinesByContext(e)||{},r=[];return Object.keys(n).sort().forEach((s=>{const a=io.getContextReferences(e)?.get(s),o=a&&sf.resolveContextTreeNodeProps(a.props)||{},i=n[s];if(a&&!0!==o.readOnly){const e=i.buildSubmitPageInstructions(t);r.push(...e)}a||this.setStateMachineEmpty(e,s)})),r}buildClientChangeList(e){const t=this.getStateMachinesByContext(e)||{};let n={};const r={};return Object.keys(t).forEach((e=>{const r=t[e].getChangeList();n={...n,...r}})),ef.flatten(n,"",r),r}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;const r=this.getUnConnectedStateMachines(e)||{};Object.keys(r).forEach((e=>{e.includes(t)&&delete r[e]}))}removeStateMachine(e,t){delete this.states[e]?.[t]}createStateMachine(e,t){let n=e.substring(0,e.lastIndexOf("["));const r=n.substring(n.lastIndexOf("."));n=n.substring(0,n.lastIndexOf(".")),n&&r&&yi(t,r,n)}getStateMachineObjByPath(e,t,n,r=!1){const s=/\[\d+\]$/gm,a=e;let o;for(;e&&!this.isStateMachineExist(t,"",e);){const i=rh(t),c=Rp(i,t)||{},l=c?.isPageGroup||c?.subscriptFieldName||"string"==typeof c?.index;if(o=null,n&&e.endsWith("]")){if(o=e.match(s),o=o?.[o.length-1]?.substring(1,o[o.length-1].length-1),[e]=e.split(s),!r&&!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,r=!0,s={}){const{stateMachineTarget:a,index:o}=this.getStateMachineObjByPath(t,e,r);if(!a)return!1;const i=rh(e),c=Rp(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={[bl(l)]:n},p=this.getStateMachine(e,"",a);if(null!==o)if(u){const t=Ci(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,s.skipStateUpdate??!0,s)})),p?.update(d,o,s.skipStateUpdate??!0,s)}else p?.update(d,Number(o)+1,s.skipStateUpdate??!0,s);else p?.updatePage(ef.unflatten(d));return!0}setUniqueField(e,t,n){const r=io.getContextReferences(e)?.get(n)?.props?.uniqueField;r&&(t.content||(t.content={}),t.content[bl(r)]=crypto.randomUUID())}getBasePageReference(e){return $g(B.DATA_INFO.DATA_INFO_CONTENT,"",e)?B.DATA_INFO.DATA_INFO_CONTENT:B.CASE_INFO.CASE_INFO_CONTENT}mergeServerPageInstructions(e,t){t.forEach((t=>{if(t.target){const n=ef.convertClipboardPageToPageRefNotation(t.target),r=`${this.getBasePageReference(e)}${n}`;if(!this.isStateMachineExist(e,r,"")){const t=r.substring(r.lastIndexOf(".")),n=r.substring(0,r.lastIndexOf("."));yi(e,t,n)}const s=this.getStateMachine(e,r,"");"INSERT"===t.instruction&&this.setUniqueField(e,t,r),s?.insertNode(t)}}))}registerForServerChanges(){xg.registerForListChanges(((e,t,n)=>{setTimeout((()=>{this.generatePageInstructions(e,t,n)}),0)}))}registerForServerChangesSync(){xg.registerForListChanges(((e,t,n)=>{this.generatePageInstructions(e,t,n)}))}generatePageInstructions(e,t,n){const r="].";if(!t.includes(".classID")&&Ol.isPropertyEditable(e,t)&&this.executeStateMachine(e,t,n),!t.includes(".classID")&&t.includes(r)){const s=t.substring(0,t.lastIndexOf("[")),a=Ol.getEditableFields(e);if(["multiselect","checkbox"].includes(a.find((e=>e.name===s))?.type)){const a=io.getContextReferences(e),o=a?.get(s),i=t.substring(t.lastIndexOf(r)+2);o?.props.selfReferencingDatapageKeys?.includes(i)&&this.executeStateMachine(e,t,n)}}}unRegisterForServerChanges(){xg.unRegisterForListChanges()}},Rl={},bl=e=>e.startsWith(".")?e.substring(1):e,vl=e=>{delete Rl[e]},xl=(e,t={})=>{const{includeDisabledFields:n=!1}=t,r=sf.resolveContextTreeNodeProps(e),s=!0!==r.readOnly&&!1!==r.visibility&&(n||!0!==r.disabled),a="string"==typeof e?.value&&e?.value.includes("@FILTERED_LIST"),o=(e=>e.selectionList||e.selectionKey||"Editable"===e.renderMode&&e.referenceList)(e);return(e?.value||o)&&!a&&s},wl=(e,t,n,r,s)=>(Dl.executeStateMachine(e,r,sf.getLitePropertyValue(n,t))||s.push(r),s),Ml=(e,t,n)=>{const r=t.isInsideList,{ignoreFieldsInsideList:s=!0}=n;return(!r||r&&!s)&&!Array.isArray(sf.getLitePropertyValue(t,e))&&!(t.componentName&&["Address","Attachment"].includes(t.componentName))},Ll=(e,t={})=>{let n=[];const r=[],s=io.getContextReferences(e);return s?(({editableFormFieldsReferenceList:n}=((e,t,n)=>{const{includeDisabledFields:r=!1}=n;let s=[];for(const[a,o]of e){const e=sf.resolveContextTreeNodeProps(o.props),i=e.propertyName;xl(o.props,{includeDisabledFields:r})&&Ml(a,e,n)&&(s=wl(t,i,e,a,s))}return{editableFormFieldsReferenceList:s}})(s,e,t)),Rl[e]&&r.push(...Object.keys(Rl[e].fieldOrder??{})),{formInputs:n,formPageFields:r}):{formInputs:n,formPageFields:r}},Fl=e=>{let t=[];const n=io.getContextReferences(e);if(n)for(const[e,r]of n){const n=r?.props;if(xl(n)&&"Attachment"===n?.componentName){const r="true"===n?.allowMultiple;t=[...t,{type:"File",allowMultiple:r,fullPath:e}]}}return t},Ul=(e,t={})=>{const n={},r=jg(e),{ignoreFieldsInsideList:s=!0,isTransientContext:a=!1,includeDisabledFields:o=!1,isObjectWideAction:i=!1,isExternalObject:c=!1}=t,l=((e,t,n)=>e||t?n?.objectInfo:n?.caseInfo)(i,c,r);if(a||l){const{formInputs:t,formPageFields:i}=Ll(e,{ignoreFieldsInsideList:s,includeDisabledFields:o});((e,t,n)=>{e.forEach((e=>{let r=ef.getIn(t,e);"object"==typeof r&&(r=ef.deepClone(r),delete r?.classID),ef.buildObject(e,n,r)}))})(i,r,n),t&&t.length>0?t.forEach((e=>{ef.buildObject(e,n,ef.getIn(r,e))})):a||ef.buildObject(B.CASE_INFO.CASE_INFO_CONTENT,n,{})}if(!a&&r?.dataInfo?.content){const{formInputs:t}=Ll(e,{ignoreFieldsInsideList:s});t.forEach((e=>{ef.buildObject(e,n,ef.getIn(r,e))}))}return n},jl=(e,t)=>{const n=io.getContextReferences(e);let r=!0;if(!n)return r;for(const[e,s]of n){const n=sf.resolveContextTreeNodeProps(s.props);if(xl(s.props)&&(!t||e.includes(t))){const e=Gi.validate(n.componentName?.toLowerCase(),n.propertyName,sf.getLitePropertyValue(n,n.propertyName),n);r&&(r=!e.message)}}return r},kl=(e,t=!1)=>{const n=io.getContextReferences(e),r=[];if(n)for(const[e,s]of n){if(!1!==sf.resolveContextTreeNodeProps(s.props).visibility){const n=8,s=t?e:e.substring(e.indexOf("content")+n);r.push(s)}}return r},Vl=e=>{const t=[],n=io.getContextReferences(e);if(n)for(const[e,r]of n){const n=sf.resolveContextTreeNodeProps(r.props);xl(r.props)&&"Attachment"!==n.componentName&&"multirecordlist"!==n.type&&t.push({name:e,label:n.label,type:n.componentName?.toLowerCase()})}return t};class $l{static isCaseActive(e,t){if(!e||!t)return!1;const n=Dp(t);if(n){const r=kp(t),{items:s={}}=n;return!(!r||!s[r]||s[r].key!==e)}return!1}static getCaseEditMetadata=(e,t)=>{const n={caseID:e,viewID:"pyEdit"},{restApi:r,reqType:s}=rm("loadView",n);return Ko(r,{method:s},t)};static isExternalCaseType=e=>{const t=Vh.getCaseTypeList()?.find((t=>"Case"===t.objectType&&t.DisplayMandatoryInputsForObject&&t.pyWorkTypeImplementationClassName===e));return!!t};static getCaseEditLock=(e,t)=>{const n={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:r,reqType:s}=rm(et,n);return Ko(`${r}?viewType=page`,{method:s},t)};static updateCaseEditFieldsData=(e,t,n,r)=>{const s={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:a}=rm(et,s),o=t[e];return Ko(`${a}?viewType=form`,{method:"PATCH",body:{content:{...o}},headers:{"if-match":n}},r)};static getCaseMessages=e=>jg(e)?.caseMessages;static getPropertiesToReplace=e=>(Fl(e)||[]).map((e=>({path:e.fullPath,allowMultiple:e.allowMultiple})));static getPropertiesToReArrange=e=>(Fl(e)||[]).filter((e=>e.allowMultiple)).map((e=>e.fullPath));static getUniqueGadgetId=()=>ef.generateUniqueID().substring(0,5);static getRemoteCaseMapping=()=>q.getRemoteCaseMapping();static isTraditionalRemoteCase=e=>q.isTraditionalRemoteCase(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=Vh.getCaseTypeList()?.filter((t=>t.pyWorkTypeImplementationClassName===e));return t&&t.length>0&&"Object"===t[0].objectType};static isExternalObject=e=>{const t=Vh.getCaseTypeList()?.filter((t=>t.pyWorkTypeImplementationClassName===e));return t&&t.length>0&&t[0].DisplayMandatoryInputsForObject};static getRouteKeyForCreateWork=(e,t=!1)=>$l.isExternalObject(e)&&t?"retrieveActionViewForNewObject":$l.isObjectCaseType(e)?Rt:St;static setTraditionalGadgetId=e=>{e.traditionalGadgetId=$l.getUniqueGadgetId()}}const Bl=$l,Gl=e=>{const{activeActionID:t,availableActions:n}=e||{};if(t&&n){const e=n.find((e=>e.ID===t));return Boolean(e)}return!1},Wl=e=>{if(Bl.isObjectCaseType(String(e?.objectTypeID))&&!Gl(e))return!0;if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1){if(n[e].ID===t)return"create"===n[e].transitionType&&"active"===n[e].visited_status}}return!1},Hl=(e,t)=>{if(e&&t){const n=ef.getIn(t,["assignments","0","assigneeInfo"],{}),{ID:r,type:s}=n;return"worklist"===s?.toLowerCase()&&r===e}return!1},ql=(e,t)=>{const n=sf.getPropertyValue(B.CASE_INFO.ACTIVE_ACTION_ID,t,e),r=sf.getPropertyValue(B.CASE_INFO.AVAILABLEACTIONS,t,e);let s=!1;if(r&&n){const e=r.find((e=>e.ID===n));e&&(s=e.type.toLowerCase()===B.LOCAL_ACTION_TYPE.CASE_WIDE.toLowerCase())}if(e&&!r){const t=jg(e);s=t?.context_data?.actionType===G.CASE}return s},zl=e=>Bg(null,G.CASE_VIEW_MODE_PROP,e)===G.PERFORM_MODE&&(e.includes(G.WORKAREA)||e.includes(G.MODAL)),Yl=e=>{const t=e?.parentCaseInfo?.ID;return Boolean(e&&t)},Kl=(e,t,n)=>{let r;const s=e?.find((e=>e.ID===t))?.actions,a=s?.filter((e=>e.ID===G.FIX_BROKEN_ASSIGNMENTS))||[];return r=n&&a?.length>0?a[0].ID:n||((e,t)=>{if(!Array.isArray(e)||!t)throw new Error("Invalid parameters passed to getAssignmentActionID API");return e.find((e=>e.ID===t))?.actions?.[0]?.ID})(e,t),r},Jl=(e,t,n)=>{let r,s,a,o,i,c,l,u,d;const p=jg(e),h=p?.caseInfo?.caseTypeID||p?.objectInfo?.objectTypeID;return n?.isTriggeredFromDifferentContext?(r=p.caseInfo.assignments[0].ID,s=p.caseInfo.ID,a=p.caseInfo.assignments,o=p.caseInfo.activeActionID,i=p.caseInfo.availableActions,c=p.caseInfo,l=p.caseInfo.businessID,u=p.caseInfo.caseTypeID,d=p.caseInfo.caseTypeName):p?.objectInfo&&Bl.isObjectCaseType(h)?(s=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):(r=t.getValue(G.getProperty(B.CASE_INFO.ASSIGNMENT_ID)),s=t.getValue(G.getProperty(B.CASE_INFO.CASE_INFO_ID)),a=t.getValue(G.getProperty(B.CASE_INFO.ASSIGNMENTS)),o=t.getValue(G.getProperty(B.CASE_INFO.ACTIVE_ACTION_ID)),i=t.getValue(G.getProperty(B.CASE_INFO.AVAILABLEACTIONS)),c=t.getValue(G.getProperty(B.CASE_INFO.CASE_INFO)),l=t.getValue(G.getProperty(B.CASE_INFO.BUSINESS_ID)),u=t.getValue(G.getProperty(B.CASE_INFO.CASE_TYPE_ID)),d=t.getValue(G.getProperty(B.CASE_INFO.CASE_TYPE_NAME))),{assignmentID:r,caseID:s,assignments:a,localActionID:o,caseActions:i,caseInfo:c,businessID:l,caseTypeID:u,caseTypeName:d}},Xl=(e,t)=>{if(Object.keys(e??{}).length>0&&t?.startsWith("http")){const n=new URL(t),r=new URLSearchParams(n.search);return Object.keys(e).forEach((t=>{r.append(t,String(e[t]))})),n.search=r.toString(),n.toString()}return t},Ql=(e,t="case")=>{const n=e?.payload?.err?.response?.data?.displayButtonsOnErrors||[],r=e?.payload?.err?.response?.status;if(Array.isArray(n)&&n.length>0&&424===r){n.forEach((e=>{e.isErrorButton=!0}));const r=e.payload.context,s=jg(r),a=((e,t)=>(e.forEach((e=>{!0!==e.isErrorButton||t.some((t=>t.actionID===e.actionID))||(t=[...t,e])})),t))(n,s?.caseInfo?.actionButtons?.secondary||[]),o={data:{["dataObject"===t?B.DATA_INFO.DATA_INFO:B.CASE_INFO.CASE_INFO]:{actionButtons:{secondary:a}}},target:rh(r),context:r};Ug({type:Ae,payload:o})}};const Zl=class{constructor(e){this.c11nEnv=e}validate(e,t){const{value:n}=this.c11nEnv.getStateProps();if(!t&&!(t=n)){const e=this.c11nEnv.getComponentConfig(),n=this.c11nEnv.getStateProps();t="multi"===e.selectionMode?n.selectionList:"Editable"===e.renderMode?n.referenceList:"single"===e.selectionMode?n.selectionKey:n.value}const r=((e,t,n)=>{const r=""===t&&n?.startsWith(".")?n.substring(1,n.length):n,s=io.getContextReferences(e)?.get(`${t}${r}`)?.props;return s?sf.resolveContextTreeNodeProps(s):s})(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),t),{message:s}=Gi.validate(this.c11nEnv.getComponentName()?.toLowerCase(),t,e,r);return s?{status:!1,message:s}:{status:!0}}},eu="OPEN_PROCESS_ACTION",tu="OPEN_ASSIGNMENT",nu="DELETE_CASE_IN_CREATE_STAGE",ru="SAVE_AND_CLOSE",su=e=>({type:ru,payload:e}),au="DELETE_WORK",ou=e=>({type:au,payload:e});const iu=class{static getSavableDataPage(e){return Ng(e)}static getLookUpDataPage(e){return Og(e)}static getLookUpDataPageInfo(e){return Dg(e)}static getDataPageKeys(e){return Pg(e)}};const cu=class{static getPropertyName(e){return In.getPropertyName(e)}static isProperty(e){return In.isProperty(e)}static getLeafPropertyName(e){return In.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}};class lu{static createContainerPConnect(e,t,n,r=!1){const{accessedOrder:s,items:a}=e;if(s&&a){const e=s[s.length-1];if(a[e]?.view&&Object.keys(a[e].view).length>0){const s=a[e],o=e.substring(0,e.lastIndexOf("_")),{view:i,context:c}=s,{viewName:l,viewContext:u}=this.processRootViewDetails(i,s,t);if(!l)return null;return $d({meta:i,options:{context:c,pageReference:u||t,containerName:n,containerItemID:e,parentPageReference:t,hasForm:r||n===Np.WORKAREA||n===Np.MODAL||l===G.CREATE_DETAILS_VIEW_NAME,target:o}}).getPConnect}}return null}static processRootViewDetails(e,t,n){const{config:{context:r,name:s}={}}=e,{context:a}=t;let o=s,i=r;const c=cu.isProperty(s),l=cu.isProperty(r);if(l){const e=cu.getPropertyName(r);i=$g(`.${e}`,e.startsWith(".")?n:"",a)}if(i||(i=n),c){const e=cu.getPropertyName(s);o=$g(`.${e}`,i,a)}return c&&l&&""!==o&&(o=s,i=r),{viewName:o,viewContext:i}}static addFlowContainerItem(e){const t=e.getContainerManager(),n=e.getContextName();let r,s;if("review"!==e.getValue("context_data.caseViewMode")){const e=n.substring(0,n.lastIndexOf("_")),t=kp(e),a=Rp(e,t);a&&({key:r,flowName:s}=a)}t.addContainerItem({semanticURL:"",key:r,flowName:s,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(G.CASE_INFO.GETNEXTWORK);static getActiveCaseActionName=e=>{const t=e.getValue(G.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(G.CASE_INFO.ACTIVE_ACTION_ID),r=t.find((e=>e.ID===n));return r?.name||""};static getFirstCaseActionName=e=>{const t=e.getValue(G.CASE_INFO.CASE_INFO_ACTIONS);return t[0]?.name||""};static hasNotificationMessages=e=>!!e.getValue("caseMessages");static isCaseWideLocalAction=e=>{const t=e.getValue(G.CASE_INFO.ACTIVE_ACTION_ID),n=e.getValue(G.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(G.CASE_INFO.CHILD_ASSIGNMENTS);let n=[];return t&&t.length>0&&t.forEach((({assignments:e=[],Name:t,caseTypeID:r})=>{const s=e.map((e=>({...e,caseName:t,caseTypeID:r})));n=n.concat(s)})),n};static hasAssignments=e=>{const t=e.getValue(G.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),n=lu.getChildCaseAssignments(e);return!!(Array.isArray(n)&&n.length>0||Array.isArray(t)&&t.length>0||lu.isCaseWideLocalAction(e))};static showBanner=e=>{const t=e();return lu.hasNotificationMessages(t)||!lu.hasAssignments(t)};static showTodo=e=>"perform"!==e.getValue("context_data.caseViewMode");static isRenderWithToDoWrapper=(e,t)=>{const n=e(),{showWithToDo:r}=t;return r&&(!lu.isCaseWideLocalAction(n)||lu.showTodo(n))};static getToDoAssignments=e=>{const t=e.getValue(G.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(G.CASE_INFO.ASSIGNMENT_LABEL),r=e.getValue(G.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)||[],s=lu.getChildCaseAssignments(e)||[];let a=JSON.parse(JSON.stringify(s));a=a.map((e=>(e.isChild=!0,e)));const o=[...r,...a];let i=JSON.parse(JSON.stringify(o));return t&&!lu.showTodo(e)&&(i=i.map((t=>(t.name=lu.getActiveCaseActionName(e)||t?.name||n,t)))),i}}const uu=lu;const du=class{constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{const t=uc.getNextActionMgrId();let n,r;const s=new Promise(((e,t)=>{n=e,r=t}));if(!n||!r)throw new Error("resolveFn or rejectFn is not defined.");return uc.register(t,s,n,r,e),{actionMgrID:t,promise:s}};initializeContainers(e){const t=Ne,n=this.c11nEnv,r={context:n.getContextName(),name:n.getContainerName(),type:G.CONTAINER_TYPE.SINGLE},{actionMgrID:s,promise:a}=this.containerManagerPromise(t),o={...r,...e,actionMgrID:s};return Ug(If(o)),a}addContainerItem(e){const t=Oe,n=this.c11nEnv,r=n.getMetadata(),{children:s}=r||{};let a;Array.isArray(s)&&s.length>0&&([a]=s);const o=n.getContextName(),i=n.getContainerName(),c=J(i,o,e?.containerType===G.CONTAINER_TYPE.SINGLE),l=wt(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)),[G.WORKAREA].includes(i)&&delete e.data?.coreHeaders;const{actionMgrID:d,promise:p}=this.containerManagerPromise(t),h={...u,...e,actionMgrID:d};return Ug(Ef(h)),p}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));const t=Ue,n={context:Bp(e.containerItemID),target:rh(e.containerItemID)},{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return Ug(Nf(a)),s}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));const t=Fe,n={target:rh(e.containerItemID)},{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return Ug(Rf(a)),s}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));const t=De,n={context:Bp(e.containerItemID),target:rh(e.containerItemID)},{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return Ug(vf(a)),s}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));const t=Pe,n=eh(e),{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return Ug(yf(a)),s}addTransientItem(e){const{id:t,data:n}=e,r=this.c11nEnv.getContextName(),s=Q(t,r),a=ch(r);return s&&a.includes(s)||Ug(Af({transientItemID:s,contextName:r,target:rh(r),data:n})),s}updateTransientData(e){const{transientItemID:t,data:n}=e,r=this.c11nEnv.getContextName();if(t){if(!ch(r).includes(t))return;Ug(_f({transientItemID:t,data:n}))}}removeTransientItem(e){const t=this.c11nEnv.getContextName(),{target:n=this.c11nEnv.getTarget(),containerItemID:r,transientItemID:s}=e;if(s&&r){if(!ch(t).includes(s))return;Ug(wf({target:n,containerItemID:r,transientItemID:s}))}}createContainerPConnect(e,t,n,r=!1){uu.createContainerPConnect(e,t,n,r)}hasContainerItems(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return Jp(`${e}/${t}`)}isContainerInitialized(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return Up(e,t)}};var pu=function(e,t){return e===t||"function"==typeof t&&e===t.toString()};function hu(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,r,s=e.length;return n=1===s?function(t){return pu(t.type,e[0])}:function(t){for(var n=0;n<s;n++)if(pu(t.type,e[n]))return!0;return!1},La((function(e,t){var s=0;e.subscribe(Fa(t,(function(e){return n.call(r,e,s++)&&t.next(e)})))}))}function gu(e,t){return La((function(n,r){var s=null,a=0,o=!1,i=function(){return o&&!s&&r.complete()};n.subscribe(Fa(r,(function(n){null==s||s.unsubscribe();var o=0,c=a++;xa(e(n,c)).subscribe(s=Fa(r,(function(e){return r.next(t?t(n,e,c,o++):e)}),(function(){s=null,i()})))}),(function(){o=!0,i()})))}))}function fu(e,t){return La((function(n,r){var s=0;n.subscribe(Fa(r,(function(n){r.next(e.call(t,n,s++))})))}))}function mu(e,t,n){return void 0===n&&(n=1/0),Js(t)?mu((function(n,r){return fu((function(e,s){return t(n,e,r,s)}))(xa(e(n,r)))}),n):("number"==typeof t&&(n=t),La((function(t,r){return function(e,t,n,r,s,a,o,i){var c=[],l=0,u=0,d=!1,p=function(){!d||c.length||l||t.complete()},h=function(e){return l<r?g(e):c.push(e)},g=function(e){a&&t.next(e),l++;var i=!1;xa(n(e,u++)).subscribe(Fa(t,(function(e){null==s||s(e),a?h(e):t.next(e)}),(function(){i=!0}),void 0,(function(){if(i)try{l--;for(var e=function(){var e=c.shift();o?Ma(t,o,(function(){return g(e)})):g(e)};c.length&&l<r;)e();p()}catch(e){t.error(e)}})))};return e.subscribe(Fa(t,h,(function(){d=!0,p()}))),function(){null==i||i()}}(t,r,e,n)})))}function Iu(e){return e&&Js(e.schedule)}function yu(e){return e[e.length-1]}function Eu(e){return Iu(yu(e))?e.pop():void 0}function Au(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ba(e,Eu(e))}var _u=new Sa((function(e){return e.complete()}));function Cu(e){return e?function(e){return new Sa((function(t){return e.schedule((function(){return t.complete()}))}))}(e):_u}const Su=(e,t,n)=>Wa((r=>("ERR_CANCELED"!==r?.code&&console.error(e,r),Au(kf(e,r,t,null,n))))),Tu=(e,t)=>n=>new Sa((r=>{let s={},a=0;return n.pipe(mu((n=>{const r=Date.now();let o;return o=t||y(),o&&o(n,s)&&r-a<e?Cu():(s=n,a=r,Au(n))}))).subscribe(r)})),Nu=e=>{const{dataPageID:t,context:n,headers:r,containerItemID:s}=e,a={data_view_ID:t},{restApi:o,reqType:i}=rm("createDataObject",a),{content:c}=nl(s);return Ba(Ko(o,{method:i,headers:r,body:{data:c.content,pageInstructions:c?.pageInstructions}},s)).pipe(fu((t=>({response:t.data,actionInPayload:e}))),Su("Error occurred during ajax call at createDataObject Epic",n))},Pu=e=>{const{dataLookUp:t,context:n,headers:r,viewName:s,requestPayload:a}=e,o={data_view_ID:t,view_ID:s},{restApi:i,reqType:c}=rm("readDataObject",o);return Ba(Ko(i,{method:c,headers:r,body:{dataViewParameters:a}},n)).pipe(fu((t=>({response:t.data,headers:tl(t.headers),actionInPayload:e}))),Su("Error occurred during ajax call at getDataObjectView Epic",n))},Ou=e=>{const{dataPageID:t,context:n,headers:r,containerItemID:s,key:a}=e,o={data_view_ID:t},{restApi:i,reqType:c}=rm("updateDataObject",o),{content:l}=nl(s);return Ba(Ko(i,{method:c,headers:{...r,"if-match":e?.etag},body:{data:{...l.content,...a},pageInstructions:l.pageInstructions||[]}},s)).pipe(fu((t=>({response:t.data,actionInPayload:e}))),Su("Error occurred during ajax call at updateDataObject Epic",n))},Du=e=>{const{lookupDatapage:t,context:n,headers:r,actionID:s,dataViewParameters:a}=e,o={data_view_ID:t,action_ID:s},{restApi:i,reqType:c}=rm("openDataObjectAction",o);return Ba(Ko(i,{method:c,headers:r,body:{dataViewParameters:a}},n)).pipe(fu((t=>({response:t.data,headers:tl(t.headers),actionInPayload:e}))),Su("Error occurred during ajax call at getDataObjectView Epic",n))},Ru=e=>{const{savableDatapage:t,context:n,headers:r,actionID:s,keys:a,containerItemID:o,jsActionQueryParams:i}=e,c={data_view_ID:t,action_ID:s};let{restApi:l}=rm("submitDataObjectAction",c);const{reqType:u}=rm("submitDataObjectAction",c),{content:d}=nl(o);return l=Xl(i,l),Ba(Ko(l,{method:u,headers:{...r,"if-match":e?.etag},body:{data:{...d?.content,...a},pageInstructions:d?.pageInstructions||[]}},n)).pipe(fu((t=>({response:t.data,actionInPayload:e}))),Su("Error occurred during ajax call at getDataObjectView Epic",n))};const bu=new class{constructor(){this.components={}}_checkComponent(e,t){return!!this.components[t]?.[e]}start(e,t,n,r,s){const a={viewName:e,pageReference:n,contextName:r,isInProgress:!0,active:!0,caseKey:t};this.components[r]=this.components[r]||{},this.components[r][s]=a}stop(e,t){this._checkComponent(e,t)&&(this.components[t][e].isInProgress=!1)}remove(e,t){this._checkComponent(e,t)&&delete this.components[t][e]}removeContext(e){delete this.components[e]}enableCascade(e){this.components[e]&&Object.values(this.components[e]).forEach((e=>{e.isInProgress&&(e.cascade=!0)}))}activate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!0)}deactivate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!1)}refreshActiveComponents(e){e&&this.components[e]&&Object.keys(this.components[e]).forEach((t=>{this.refreshComponent(t,e)}))}refreshComponent(e,t){if(!this._checkComponent(e,t))return;const n=this.components[t][e];if(n.active&&n.cascade){const{caseKey:e,viewName:r,pageReference:s}=n;qd(e,r,t,s,{})}}},vu="postDataViewMetadata",xu={getData:(e,t,n,r)=>((e,t,n,r={})=>{const s={dataViewName:e},{skipClearErrorMessages:a,signal:o,doNotMergeMessagesForStatusCode:i}=r,{restApi:c,reqType:l}=rm("getListData",s);return Ko(c,{method:l,body:t,...o&&{signal:o},...a&&{skipClearErrorMessages:a}},n,i)})(e,t,n,r),getListCount:(e,t,n)=>{const r={dataViewName:e},{restApi:s,reqType:a}=rm("getListDataCount",r);return Ko(s,{method:a,body:t},n)},getDataViewMetadata:(e,t,n,r)=>{const s=!!n,a=!!r,o=jh.doesRestApiExist(vu),i=(s||a)&&o?vu:"getDataViewMetadata",c={dataViewName:e},{restApi:l,reqType:u}=rm(i,c);if(o){if(s)return Ko(l,{method:u,body:{associationFilter:n}},t);if(a)return Ko(l,{method:u,body:{propertyFilter:r}},t)}return Ko(l,{method:u},t)},getDataObjectView:(e,t,n,r,s={})=>{const{skipClearErrorMessages:a,signal:o,doNotMergeMessagesForStatusCode:i}=s,c={data_view_ID:e,view_ID:t},l={dataViewParameters:n},{restApi:u,reqType:d}=rm("readDataObject",c);return Ko(u,{method:d,body:l,...o&&{signal:o},...a&&{skipClearErrorMessages:a}},r,i)},getCaseEditMetadata:(e,t)=>Bl.getCaseEditMetadata(e,t),getCaseEditLock:(e,t)=>Bl.getCaseEditLock(e,t),updateCaseEditFieldsData:(e,t,n,r)=>Bl.updateCaseEditFieldsData(e,t,n,r),moveListRecords:(e,t)=>{const{sourceID:n,destinationID:r,context:s,listClass:a,viewName:o,viewClassName:i}=e,c={viewName:o,viewClassName:i},{restApi:l,reqType:u}=rm("moveListRecords",c);return Ko(l,{method:u,body:{content:{sourceID:n,destinationID:r,context:s,listClass:a}}},t)},isTimeElapsed:(e,t,n="")=>{if(t){if(e&&n===G.RELOAD_IF_OLDER_THAN)return new Date(e).setSeconds(t)<Date.now();if(e&&n===G.RELOAD_ONCE_PER_INTERACTION)return!0}return!0},getAppCacheKey:e=>void 0!==Hp("root").find((e=>e.includes("authoring-preview")))?`${G.AUTHORING_PREVIEW_CONTAINER}-${e}`:`${sc.getAppAlias()}-${e}`,isDistinctResultsOnly:e=>{const t=Vh.getKeyMapping("pyGUID");return!e.some((e=>e.field===t))}};const wu=class{constructor(e,t,n){this.filter=e,this.messageHandler=t,this.contextName=n}};const Mu=class{constructor(){this.users={},this.connected=!1,this.connectionsCount=1}_handleUserPresence({message:e}){const{state:t,updateById:n}=e,r=this.users[n];r&&(r.state=t,Object.keys(r.subscribers).forEach((e=>{r.subscribers[e]?.callback({state:r.state})})))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t,n){const r=this._getAutoGenId(),s=this.users[e];if(s)return s.subscribers[r]={callback:t,contextName:n},r;this.users[e]={subscribers:{[r]:{callback:t,contextName:n}}};const a={matcher:"PRESENCE",criteria:{userId:e}};return $u.subscribe(a,this._handleUserPresence.bind(this)),r}unsubscribe(e,t){const n={matcher:"PRESENCE",unsubscribeUsers:{users:[e]}};this.users[e]&&this.users[e].subscribers&&(delete this.users[e].subscribers[t],0===Object.keys(this.users[e].subscribers).length&&(delete this.users[e],$u.publishMessage(n)))}getUserState(e){return this.users[e]&&this.users[e].state}clearContext(e){Object.keys(this.users).forEach((t=>{Object.keys(this.users[t].subscribers).forEach((n=>{this.users[t].subscribers[n].contextName===e&&this.unsubscribe(t,n)}))}))}};var Lu=s(631),Fu=s.n(Lu);const Uu=class{constructor(e,t){this.atomicSubscribers={},this.connectionsCount=1,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 r=Object.keys(n.criteria),s=Object.keys(e);0===Fu()(r,s).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=$u.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&&($u.unsubscribe(this.messagingServiceSubscriptionId),this.messagingServiceSubscriptionId=""))}};const ju=new class{constructor(){this.subscriptions={}}getOrCreateSubscription(e){if(!this.subscriptions[e]){const t={caseId:e};this.subscriptions[e]=new Uu("CASE",t)}return this.subscriptions[e]}};const ku=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 publishCaseValuesUpdate(e,t){const n=`${t.actionInContext}/workarea`;Object.entries(e.message).forEach((([e,t])=>{const r=Gp(n)||"",s=this.transformReference(e),{pageReference:a,propertyName:o}=this.extractReferenceParts(s);e.match(/\.\w+\[\d+\]\.\w+/)&&Dl.executeStateMachine(r,s,t,!0,{skipStateUpdate:!0});Ug([{type:re,payload:{reference:s,value:t,context:r}},{type:ae,payload:{reference:s,value:t,context:r,pageReference:a,propertyName:o}}])}))}};class Vu{static subscribers={};static connectionsCount=0;static webSocket=null;static connectionConfig=null;static inProgressSubscriptions=[];static inProgressMessages=[];static isServiceAlive=null;static serviceAliveHandler=null;static userPresence=new Mu;static refreshB2SOffset=10;static agentSubscribeIdMap=new Map;static isAuthenticated=!1;static initConnection(e){if(!e)return;const{messagingService:t}=e;if(!t||t&&t.length<=6)return;const n=sc.b2sJWT;if(!n||n.length<4)return;this.webSocket&&(this.webSocket.close(),this.cleanSocketListeners());const r=t.endsWith("/")?`${t}ws`:`${t}/ws`;try{const e=new WebSocket(`${r}`);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.log("web socket connection error event: ",e)}static handleOnClose(e){null!==this.serviceAliveHandler&&(clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=null),this.isAuthenticated=!1,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=sc.b2sJWT;if(!e||e.length<4)return;this.publishMessage({token:e})}}static unsubscribeAgentMessageCaseValues(e){const t=Vu.agentSubscribeIdMap.get(e.assignmentID);Vu.unsubscribe(t??""),Vu.agentSubscribeIdMap.delete(e.assignmentID)}static subscribeAgentMessageCaseValues(e){const t={matcher:"COACH_UPDATE",criteria:{caseId:e.caseKey,assignmentId:e.assignmentID}},n=Vu.subscribe(t,(t=>{ku.publishCaseValuesUpdate(t,e)}));Vu.agentSubscribeIdMap.set(e.assignmentID,n)}static handleOnMessage(e){if(null!==e&&"ALIVE"===e.data)null===this.isServiceAlive&&this.checkLiveliness(1e4),this.isServiceAlive=!0;else{let t=null;try{t=JSON.parse(e.data)}catch(t){console.error("Invalid data received from messaging service",e.data)}if(t&&t.msgId&&this.webSocket?.send(`{"ack":"${t.msgId}"}`),t&&t.filter){const{matcher:e,criteria:n}=t.filter;delete n.environmentID,Object.keys(this.subscribers).forEach((r=>{const s=this.subscribers[r];s?.filter&&s.filter.matcher===e&&ef.isEqual(s.filter.criteria,n)&&s.messageHandler(t)}))}else if(t&&t.tokenExpiryTime){this.isAuthenticated=!0,No.subscribe(G.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,Vu.subscribeAgentMessageCaseValues),No.subscribe(G.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,Vu.unsubscribeAgentMessageCaseValues),this.setTokenExpiryTime(t);const e=1e3*(this.getTokenExpiryTime()-this.refreshB2SOffset);setTimeout((()=>this.refreshB2STokenReInit()),e);let n=[];this.inProgressSubscriptions.forEach((({messageSubscriber:e,id:t})=>{n?.includes(t)||(n?.push(t),this.subscribeToSocket(e,t))})),this.inProgressSubscriptions=[],this.inProgressMessages.forEach((e=>{this.publishMessage(e)})),this.inProgressMessages=[],n=null}else console.error("filter missing from received data from messaging service",e.data)}}static reInitialization(e){this.reInitInterval||(Object.keys(this.subscribers).forEach((e=>{this.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(),this.webSocket.close(),this.webSocket=null)}static subscribe(e,t,n,r){this.connectionsCount+=1;const s=r||`${Date.now()}_${this.connectionsCount}`,a=new wu(e,t,n);return null!==this.webSocket&&1===this.webSocket.readyState&&this.isAuthenticated?(this.subscribeToSocket(a,s),s):(this.inProgressSubscriptions.push({messageSubscriber:a,id:s}),null===this.webSocket&&this.initConnection(this.connectionConfig),s)}static subscribeToSocket(e,t){this.subscribers[t]=e;const n={filter:e.filter,subscribe:{id:t}};this.webSocket?.send(JSON.stringify(n))}static unsubscribe(e,t){if(this.subscribers[e]){t||delete this.subscribers[e];const n={unsubscribe:{id:e}};null!==this.webSocket&&1===this.webSocket.readyState&&this.webSocket.send(JSON.stringify(n))}}static publishMessage(e){null!==this.webSocket?null===this.webSocket||1!==this.webSocket.readyState?this.inProgressMessages.push(e):this.webSocket.send(JSON.stringify(e)):console.error("Web socket not initialized.")}static getUserPresence=()=>this.userPresence;static getCaseSubscription=e=>ju.getOrCreateSubscription(e);static refreshB2STokenReInit=async()=>{const e={body:{B2SToken:sc.b2sJWT}};Ki("refreshB2S",e).then((e=>{const{newB2SToken:t}=e.data;t&&t.length>30?(sc.b2sJWT=t,this.setTokenExpiryTime({tokenExpiryTime:Math.round(Date.now()/1e3)+60}),this.webSocket?.close()):console.log("refreshB2S: invalid b2s length")})).catch((e=>{console.log(`refreshB2S: error occurred while fetching: ${e}`)}))};static getTokenExpiryTime=()=>{const e=Math.round(Date.now()/1e3);return this.tokenExpiryTime-e};static setTokenExpiryTime=e=>{this.tokenExpiryTime=e.tokenExpiryTime};static clearContext(e){Object.keys(this.subscribers).forEach((t=>{this.subscribers[t].contextName===e&&this.unsubscribe(t)})),this.userPresence.clearContext(e)}}const $u=Vu;const Bu=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:r}=e,s=n*r;let a=s-r;for(;a<s;a+=1){if(!this.records[a])return this.maxRecords===a?t:[];t.push(this.records[a])}return t}return this.records}mergeRecords(e,t){if(Number.isInteger(t?.pageNumber)&&Number.isInteger(t?.pageSize)){const{pageNumber:n,pageSize:r}=t,s=n*r;let a=0;for(let t=s-r+1-1;t<s;t+=1)this.records[t]=e[a],a+=1;if(e.length<r){const t=(n-1)*r+e.length;this.setMaxRecordsCount(t)}}else e||(e=[]),Array.isArray(this.records)&&Array.isArray(e)&&(this.records=Yg(this.records,e,{isArrayDeepMerge:!1})),this.setMaxRecordsCount(this.records.length)}setMaxRecordsCount(e){this.maxRecords=e}getMaxRecordsCount(){return this.maxRecords}};const Gu=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}getData(e,t,n,r){const s=this.generateHash(e,t,r);if(this.dataStore[e]&&this.dataStore[e][s]){const t=this.dataStore[e][s];return t.isDirty?[]:t.getRecords(n)}return[]}async getDataAsync(e,t,n={},r,s,a={}){if(a.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),!this.isCacheable(e,s)||a.invalidateCache){const o=await this.fetchData(e,n,r,s,t,a),i=o?.data?.data??[];return{...o.data,data:i,pageNumber:o?.data?.pageNumber,pageSize:o?.data?.pageSize,queryStats:o?.data?.queryStats,status:o?.status}}const o=this.getData(e,n,r,s);if(o.length>0)return Promise.resolve({data:o});const i=await this.fetchData(e,n,r,s,t,a);return{...i.data,data:this.mergeDataStore(e,n,r,s,i),pageNumber:i?.data?.pageNumber,pageSize:i?.data?.pageSize,queryStats:i?.data?.queryStats,status:i?.status}}async getPageDataAsync(e,t,n={},r={}){const s=this.generateHash(e,n,null);if(r.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),this.isCacheable(e)&&this.dataStore[e]&&this.dataStore[e][s]){if(!r?.invalidateCache)return Promise.resolve(this.dataStore[e][s]);delete this.dataStore[e][s],this._removeDataStoreMetaEntry(e,n,s)}const{restApi:a,reqType:o}=rm(G.GET_PAGE_DATA,{dataViewName:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))}),i={method:o};if(r.enableStreaming){const e=r.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 Ko(c,i,t).then((t=>(this.isCacheable(e)&&(this.dataStore[e]={...this.dataStore[e],[s]:t.data},this._addDataStoreMetaEntry(e,n,s)),r.enableStreaming?t:t.data)))}subscribeToDataPageUpdates(e,t,n,r={}){if(!e||!t||!n)return!1;const s=this.generateHash(n,r,null);this.dataPageSubscribers[n]??={};const a=this.dataPageSubscribers[n];a[s]??={};const o=a[s];return this.subscribeToMessageService(n,e),!o[e]&&(o[e]??=t,!0)}unsubscribeToDataPageUpdates(e,t,n={}){if(!e||!t)return!1;const r=this.generateHash(t,n,null);delete this.dataPageSubscribers[t]?.[r]?.[e];const s=this.subscribedDataPageNames.get(t),a=s?.count??0;return a<=1?(s?.messagingSubscriptionId&&$u.unsubscribe(s.messagingSubscriptionId),this.subscribedDataPageNames.delete(t)):s&&this.subscribedDataPageNames.set(t,{...s,count:a-1}),!0}unsubscribeToDatapageUpdates(e,t,n={}){return this.unsubscribeToDataPageUpdates(e,t??"",n)}_isDataPageCached(e,t){if(t&&ef.isObjectEmpty(t))return!!this.dataStore[e];const n=this.generateHash(e,t,null);return!!this.dataStoreMeta[e]?.[n]?.length}updateDataPageStore(e={}){Object.keys(e).forEach((t=>{this.dataStore[t]||(this.dataStore[t]={});const n=e[t];Object.keys(n).forEach((n=>{if(this.dataStore[t][n]){this.dataStore[t][n].mergeRecords(e[t][n].pxResults)}else{const r=new Bu;this.dataStore[t][n]=r,r.mergeRecords(e[t][n].pxResults||[])}}))}))}_addDataStoreMetaEntry(e,t,n){const r=this.generateHash(e,t,null);this.dataStoreMeta[e]??={};const s=this.dataStoreMeta[e];s[r]??=[];const a=s[r];a.includes(n)||a.push(n)}_removeDataStoreMetaEntry(e,t,n){if(!e||t||n||(this.dataStoreMeta[e]={}),e&&t&&n){const r=this.generateHash(e,t,null);this.dataStoreMeta[e][r]=this.dataStoreMeta[e][r].filter((e=>e!==n))}}mergeDataStore(e,t,n,r,s){const a=this.generateHash(e,t,r),o=s?.data?.data;if(!o||0===o.length)return[];this.dataStore[e]||(this.dataStore[e]={}),this.dataStore[e][a]||(this.dataStore[e][a]=new Bu);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_")}subscribeToUpdate(e,t,n,r,s,a){this.subscribers[e]=this.subscribers[e]||{},this.subscribers[e].callback=this.subscribers[e].callback||{},a&&!this.subscribers[e].callback?.[a]&&(this.subscribers[e].callback[a]=s),this.subscribeToCascadeUpdates(e,t,n,r,a)}unsubscribe(e,t,n,r,s){delete this.subscribers[e]?.callback?.[s],t&&t.length>0&&xg.unRegisterFields(n,r,t,s)}handleMessage(e){const{msgId:t,message:n}=e,{datapage:r,parameters:s=""}=n,a=this.subscribers[r];this.markDataInstanceDirty(r,""===s?null:JSON.parse(s)),t&&this._executeDataPageSubscriptions(e),!t&&a?.callback&&Object.keys(a.callback).forEach((t=>{a.callback?.[t](e.message)}))}markDataInstanceDirty(e,t){let n,r;if((!t||(n=this.generateHash(e,t,null),r=this.dataStoreMeta[e]?.[n],r?.push(this.generateHash(e,null)),r))&&this.dataStore[e]){Object.keys(this.dataStore[e]).filter((e=>!t||!r||r.includes(e))).forEach((t=>{this.dataStore[e][t].isDirty=!0}))}}_executeDataPageSubscriptions(e){const{message:t}=e,{datapage:n,parameters:r}=t,s=r?JSON.parse(r):null;if(this.dataPageSubscribers[n])if(s){const t=[];t.push(this.generateHash(n,s,null)),t.push(this.generateHash(n,null,null)),t.forEach((t=>{const r=this.dataPageSubscribers[n]?.[t]??{};Object.keys(r).forEach((t=>{r[t](e.message)}))}))}else{const t=this.dataPageSubscribers[n];Object.keys(t).forEach((n=>{const r=t[n];Object.keys(r).forEach((r=>{t[n][r](e.message)}))}))}}isPerInteraction(e){const t=Ig(e);return!t||"reloadOncePerInteraction"===t.refreshStrategy?.type}disableCache(e){this.isCacheEnabled=!e}generateHash(e,t,n){const r=Ig(e);let s=[];r||(s=Object.keys(t||{}).map((e=>({name:e}))));let a="",o=e;const i=[];return(r?.parameters||s).forEach((e=>{t?.[e.name]?i.push(t[e.name]):i.push(e.defaultValue??G.NULL_STRING)})),n&&i.push(JSON.stringify(n)),i.join(G.HASH_DELIMITER)&&(a=ef.getHashedString(i.join(G.HASH_DELIMITER)),o=e+G.UNDERSCORE_STRING+a),o}async fetchData(e,t,n,r,s,a){const{additionalApiParams:{useExtendedTimeout:o=!1,includeTotalCount:i=!1}={},...c}=a,l={dataViewParameters:t};return i&&(l.includeTotalCount=!0),o&&(l.useExtendedTimeout=!0),n&&(l.paging=n),r&&(l.query=r),xu.getData(e,l,s,c)}handleCascadeUpdate(){const{dataPageName:e,scope:t}=this;t.handleMessage({message:{datapage:e,parameters:""}})}subscribeToCascadeUpdates(e,t,n,r,s){t&&t.length>0&&xg.registerFields(n,r,t,this.handleCascadeUpdate.bind({dataPageName:e,scope:this}),s)}subscribeToMessageService(e,t){if(e&&this.subscribedDataPageNames.has(e)){const t=this.subscribedDataPageNames.get(e);return void(t&&this.subscribedDataPageNames.set(e,{...t,count:t.count+1}))}const n={matcher:"DATAPAGE_UPDATED",criteria:{datapage:e}},r=$u.subscribe(n,this.handleMessage.bind(this),void 0,t);this.subscribedDataPageNames.set(e,{count:1,messagingSubscriptionId:r})}isCacheable(e,t){return!(this.isPerInteraction(e)||!this.isCacheEnabled)&&!(t&&Object.keys(t).length>1)}};const Wu=class{constructor(e,t,n,r,s=100,a=500){this.finalDataViewCall=e,this.combiner=t,this.comparator=n,this.separator=r,this.maxtime=s,this.maxsize=a,this.groupedDataViewArray=[]}findCombinableDataViewCall(e){return this.groupedDataViewArray.find((t=>this.comparator(t,e)))}dequeueAllDataViewCalls(){for(this.groupedDataViewArray.reverse();this.groupedDataViewArray.length>0;){const e=this.groupedDataViewArray.pop();this.finalDataViewCall(e).then((t=>{this.separator(e,t)}))}clearTimeout(this.timeoutId)}dequeueDataViewCallOnSizeExceed(e){const t=this.groupedDataViewArray.findIndex((t=>this.comparator(t,e)));this.groupedDataViewArray[t]&&(this.groupedDataViewArray.splice(t,1),this.finalDataViewCall(e).then((t=>{this.separator(e,t)})))}queueDataViewCall(e,t){let n,r,s=this.findCombinableDataViewCall(e);return n=new Promise((e=>{r=e})),s&&!s.dataViewCallMap[t]?(this.combiner(s,e),s.dataViewCallMap[t]={promise:n,resolve:r}):s?n=s.dataViewCallMap[t].promise:(s={...e,dataViewCallMap:{[t]:{promise:n,resolve:r}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[t]:{promise:n,resolve:r}}})),Object.keys(s.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(s):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>this.dequeueAllDataViewCalls()),this.maxtime)),n}};const Hu=class{constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,t,n,r,s,a,o){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new Wu(t,n,s,r,a,o)),this.bufferedDataQueues[e]}},qu=(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,zu=e=>e.map((e=>e.field)),Yu=(e,t)=>{const n=(e.query?.filter).filterConditions,r=(t.query?.filter).filterConditions;let s=(t.query?.filter).logic;const a=Object.keys(n).length;qu(n,r)?("EQ"===n.F0.comparator&&(e=>{const t=e?.F0.rhs.value;e.F0.rhs={values:[t]},e.F0.comparator="IN"})(n),n.F0.rhs.values.push(r.F0.rhs.value)):(Object.keys(r).forEach(((e,t)=>{const o=`F${a+t}`;n[o]=r[e],s=s.replace(e,o)})),(e.query?.filter).logic+=` OR ${s}`);const o=zu(e.query?.select);zu(t.query?.select).forEach((t=>{o.includes(t)||(e.query?.select).push({field:t})}))},Ku=(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]:!ef.isEqual(e.dataViewParameters?.[n],t.dataViewParameters?.[n]))))(e,t)||((e,t)=>!e.dataViewParameters&&!t.dataViewParameters)(e,t)),Ju=(e,t)=>{const{data:n}=t,{dataViewCallMap:r,filterDataOnClient:s}=e;Object.keys(r).forEach((e=>{r[e].resolve({data:s(e,n)})}))},Xu=e=>({combiner:Yu,comparator:Ku,separator:Ju,...e}),Qu=(e,t)=>{try{window.sessionStorage.setItem(e,t)}catch(e){}};class Zu{constructor(e,t){this.isInitialised=!1,this.isQueryable=!0,this.dataSourceMetaData={},this.nonQueryableData=[],this.fetchedNQData=!1,this.previousSearchText=null,this.totalRecordCount=0,this.fetchedRecordCount=0,this.cache={},this.pageNumber=0,this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null,this.dataSource="",this.bufferInitialized=!1,e&&(this.listType=e.listType,this.dataSource=e.dataSource,e.enablePagination?(this.enablePagination=e.enablePagination,this.pageSize=e.pageSize):this.maxResultsDisplay=e.maxResultsDisplay,this.parameters=e.parameters,this.columns=e.columns,this.matchPosition=e.matchPosition,this.ignoreCase=!1!==e.ignoreCase,this.dataSourceMetaData=e.dataSourceMetaData,this.context=t)}static searchResultsCache={};static init(e,t){return new Promise(((n,r)=>{const s=[...e.columns.map((e=>e.value)),...Object.entries(e.parameters).map((([e,t])=>`${e}+${t}`)),e.matchPosition,e.maxResultsDisplay].join(G.HASH_DELIMITER),a=ef.getHashedString(s),o=`${e.dataSource}_${a}`,i=xu.getAppCacheKey(e.dataSource);if(window.sessionStorage.getItem(i)){const s=JSON.parse(`${window.sessionStorage.getItem(i)}`);if(t&&Zu.searchResultsCache?.[t]?.[o])n(Zu.searchResultsCache[t][o]);else if("form"!==e.cacheLifeSpan&&Zu.searchResultsCache?.persisted?.[o])n(Zu.searchResultsCache.persisted[o]);else{const a=new Zu(e,t);JSON.stringify(s.associationFilter)===JSON.stringify(e.associationFilter)?(a.dataSourceMetaData=s.dataSourceMetaData,a.isQueryable=s.isQueryable,a.isInitialised=s.isInitialised,a.associationFilter=s.associationFilter,Zu.initializeCache(t,e,o,a),n(a)):(a.associationFilter=e.associationFilter,a.propertyFilter=e.propertyFilter,a.fetchMetaData(t).then((r=>{Qu(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),a.isQueryable=r.data.isQueryable,a.dataSourceMetaData=r.data,a.isInitialised=!0,Zu.initializeCache(t,e,o,a),n(a)})).catch((e=>{a.isInitialised=!1,r(e)})))}}else if(e.deferDatasource&&Ig(e.dataSource)){const r=new Zu(e,t),s=Ig(e.dataSource);r.isQueryable=!!s?.isQueryable,r.isInitialised=!0,r.dataSourceMetaData=s,Qu(i,JSON.stringify({isQueryable:s?.isQueryable,dataSourceMetaData:s,isInitialised:!0})),r.context=t,Zu.initializeCache(t,e,o,r),n(r)}else{const s=new Zu(e,t);s.associationFilter=e.associationFilter,s.propertyFilter=e.propertyFilter,s.fetchMetaData(t).then((r=>{Qu(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),s.isQueryable=r.data.isQueryable,s.dataSourceMetaData=r.data,s.isInitialised=!0,Zu.initializeCache(t,e,o,s),n(s)})).catch((e=>{s.isInitialised=!1,r(e)}))}}))}static bufferedDataView=new Hu;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage(Xu(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete Zu.searchResultsCache[e]}static initializeCache(e,t,n,r){e&&"form"===t.cacheLifeSpan?.toLowerCase()?(void 0===Zu.searchResultsCache[e]&&(Zu.searchResultsCache[e]={}),Zu.searchResultsCache[e][n]=r):(void 0===Zu.searchResultsCache.persisted&&(Zu.searchResultsCache.persisted={}),Zu.searchResultsCache.persisted[n]=r)}fetchMetaData(e){return xu.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){Zu.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,(e=>Gu.getDataAsync(this.dataSource,this.context,e.dataViewParameters,e.paging,e.query)),e.combiner,e.separator,e.comparator,e.waitTime,e.maxSize)}buildSchemaForQueryableBufferDP(e){return{...this.buildSchemaForQueryableDP(e),paging:void 0,filterDataOnClient:this.filterDataOnClient.bind(this)}}getData(e,t){if(this.isQueryable){if(this.bufferInitialized)try{const t=this.buildSchemaForQueryableBufferDP(e);return Zu.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(t,e)}catch{const n=this.buildSchemaForQueryableDP(e,t);return Gu.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}const n=this.buildSchemaForQueryableDP(e,t);return Gu.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}return this.fetchNonQueryableResults(e,t)}memoizedGetData(e,t){const n=e?.toLowerCase();if(this.enablePagination?n in this.cache&&this.pageNumber in this.cache[n]:n in this.cache)return this.enablePagination?this.cache[n][this.pageNumber]:this.cache[n];const r=this.getData(e,t);return this.enablePagination?(this.cache[n]=this.cache[n]||{},this.cache[n][this.pageNumber]=r):this.cache[n]=r,r}fetchData(e,t=!1,n){return this.isValidDatasource()?this.context&&!Qg(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=Gu.getDataAsync(this.dataSource,this.context,n.dataViewParameters,void 0,void 0,t),this.isNQDataFetchInProgress=!0,new Promise(((n,r)=>{this.fetchNQDataPromise?.then((r=>(this.nonQueryableData=[...r.data],this.fetchedNQData=!0,n({data:this.filterDataOnClient(e,this.nonQueryableData,t)})))).catch((e=>r(e))).finally((()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null}))}))}return Promise.resolve(null)}filterDataOnClient(e,t,n){const r=(n?.columns??this.columns)?.filter((e=>e.useForSearch)).map((e=>e.value));return t.reduce(((t,s)=>(Object.keys(s).every((a=>!(r?.includes(a)&&s[a]&&this.positionMatches(`${s[a]}`,e,n))||(t.push({...s}),!1))),t)),[])}positionMatches(e,t,n){const r=n?.ignoreCase??this.ignoreCase,s=r?e.toLowerCase():e,a=r?t.toLowerCase():t;switch(n?.matchPosition??this.matchPosition){case"start":return s.startsWith(a);case"contains":return s.includes(a);case"equals":return s===a;default:return!1}}buildSelect(e){const t=[],n=[];return(e?.columns??this.columns)?.forEach((e=>{if(!n.includes(e.value)){n.push(e.value);const r={field:e.value};t.push(r)}})),t}buildFilters(e,t){const n=t?.matchPosition??this.matchPosition,r=t?.ignoreCase??this.ignoreCase,s={};let a=0;(t?.columns??this.columns)?.forEach((t=>{if(t.useForSearch){const o=`F${a}`;a+=1;const i={field:t.value},c={value:e};let l="CONTAINS";"start"===n?l="STARTS_WITH":"equals"===n&&(l="EQ");const u={...`${parseFloat(e)}`!==e==!0&&{ignoreCase:r?"true":"false"},lhs:i,rhs:c,comparator:l};s[o]=u}}));const o=Object.keys(s).join(" OR ");return{filterConditions:s,logic:o}}buildQuery(e,t){const n=this.buildSelect(t);return e?{select:n,filter:this.buildFilters(e,t),...xu.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}:{select:n,...xu.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 ed=Zu;class td{constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,t,n,r,s){void 0===e[t]&&(e[t]={}),e[t][n]=[{uniqueHash:r,callback:s}]}registerForRefresh(e,t,n,r,s){n=ef.convertClipboardPageToPageRefNotation(n);const a=r.split("/").join(G.HASH_DELIMITER),o=ef.getHashedString(a);if("PROP_CHANGE"===e)if(this.propChangeRefreshMap?.[s]?.[n]){this.propChangeRefreshMap[s][n].some((e=>e.uniqueHash===o))||this.propChangeRefreshMap[s][n].push({uniqueHash:o,callback:t})}else td.initializeRefreshCache(this.propChangeRefreshMap,s,n,o,t);else if(this.refreshMap?.[s]?.[`${e}-${n}`]){this.refreshMap[s][`${e}-${n}`].some((e=>e.uniqueHash===o))||this.refreshMap[s][`${e}-${n}`].push({uniqueHash:o,callback:t})}else td.initializeRefreshCache(this.refreshMap,s,`${e}-${n}`,o,t)}triggerRefreshForType(e,t,n){"PROP_CHANGE"===e?this.propChangeRefreshMap?.[n]?.[t]&&this.propChangeRefreshMap[n][t].forEach((e=>e.callback())):this.refreshMap?.[n]?.[`${e}-${t}`]&&this.refreshMap[n][`${e}-${t}`].forEach((e=>e.callback()))}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}}const nd=new td;const rd=class{static cleanCaches(e){xg.purgeCascadeFields(e),bu.removeContext(e),ed.clearContextedCache(e),No.cleanContextSubscribers(e),vl(e),io.removeContextTreeNode(e),$u.clearContext(e),nd.deRegisterForRefresh(e)}},sd="GET_DESCENDANTS",ad={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"};const od=new class{constructor(){this.runtimeParams={},this.runtimeParamsMap={}}setRuntimeParams(e){this.runtimeParams=e}getRuntimeParams(){return this.runtimeParams}setRuntimeParam(e,t){this.runtimeParamsMap[e]=t}getRuntimeParam(e){return this.runtimeParamsMap[e]}};const id=new class{MISSING_CONTEXT_PARAM="context is required parameter";INVALID_CONTEXT_DETAILS="Invalid Context";INVALID_CONTEXT_OPERATION="Invalid Operation on Given Context";schedulePendingActionOnCompletion(e,t){const n=[],r=t.context_data?.blocking_action_counter??0,s=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let a=t.context_data?.is_deferred_action_in_progress??!1;if(r<=0){if(a)n.push({type:Ae,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else{if(!(s.length>0))return;{const t=s.shift();a=!a,n.push({type:Ae,payload:{context:e,data:{context_data:{deferred_action_queue:s,blocking_action_counter:r,is_deferred_action_in_progress:a}}}}),t&&n.push(t)}}Ug(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));const t=jg(e?.payload?.context);if(t){const n=[],r=t.context_data?.blocking_action_counter??0,s=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let a=t.context_data?.is_deferred_action_in_progress??!1;return s.length<=0&&!a&&(r<=0?(n.push(e),a=!a):s.push(e),n.unshift({type:Ae,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:s,blocking_action_counter:r,is_deferred_action_in_progress:a}}}}),Ug(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=jg(e);return t&&!0===t.context_data?.is_deferred_action_in_progress?(Ug({type:Ae,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 jg(e)?(Ug({type:pt,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={...jg(e)};return t.context_data={...t.context_data},t&&t.context_data?.blocking_action_counter>0?(Ug({type:pt,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=jg(e);if(t){const n={...t};n.context_data={...n.context_data},n.context_data?.deferred_action_queue&&ef.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),Ug({type:Ae,payload:{context:e,data:{...n}}}),lc.disableLoadingIndicator({context:e})}}isDeferredActionInProgress(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t=jg(e);return!(!t||!0!==t.context_data?.is_deferred_action_in_progress)}},cd=(e,t)=>{const n={},r=iu.getLookUpDataPage(e),s=iu.getDataPageKeys(r);if(s)for(const e of s)n[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];return{dataViewParameters:n,dataPageID:r,dataPageKeys:s}},ld=(e,t)=>{const n=iu.getSavableDataPage(e),r=iu.getDataPageKeys(n);return r?.forEach((e=>{e.isAlternateKeyStorage&&(e.keyName===e.linkedField||Object.keys(t).includes(e.linkedField))?e.keyName=t[e.linkedField]:e.isAlternateKeyStorage&&Object.keys(t).includes(e.keyName)&&e.keyName!==e.linkedField?(t[e.linkedField]=t[e.keyName],delete t[e.keyName]):e.keyName=t[e.keyName]})),{keys:t,dataPageID:n,dataPageKeys:r}},ud=e=>{No.publish(B.PUB_SUB_EVENTS.EVENT_CANCEL,e)},dd=(e,t,n)=>{const{callbacks:r}=n;return n.callbacks=null,e(t,n).then((e=>{"cancel"===e?r?.cancel?.():r?.submit?.()}))};const pd=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(G.getProperty(B.CASE_INFO.CASE_INFO_ID))||e?.links?.open?.href?.split("/")?.[2];getSaveActionPayload=(e,t=!1)=>{const n=e,r=n&&n.includes(G.MODAL),s=this.c11nEnv.getValue(B.CASE_INFO.CASE_INFO_ID),a=this.c11nEnv.getValue(B.CASE_INFO.ASSIGNMENT_ID),o=this.c11nEnv.getValue(B.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(B.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(B.CASE_INFO.ASSIGNMENTACTION_ID),i=this.c11nEnv.getContainerName(),c=this.c11nEnv.getValue(B.CASE_INFO.CASE_TYPE_ID),l=t?void 0:jl(this.c11nEnv.getContextName()),u=this.c11nEnv.getValue("isProcessAction","isProcessAction");return of.buildActionObject({context:n,containerItemID:e,assignmentID:a,actionID:o,caseID:s,containerName:i,caseType:c,isModalAction:r,isFormValid:l,isProcessAction:u,saveOnly:t},this.c11nEnv)};actionsApiPromise=(e,t,n=!0)=>{let r,s,a="";a=t&&null!==t.actionMgrID?t.actionMgrID||"":uc.getNextActionMgrId();const o=new Promise(((e,t)=>{r=e,s=t}));if(!r||!s)throw new Error("resolveFn or rejectFn is not defined.");return uc.register(a,o,r,s,e,t,n),{actionMgrID:a,promise:o}};showDataObjectCreateView(e,t=B.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){const n=of.buildActionObject({viewName:t,className:e},this.c11nEnv),r=ie,{promise:s}=this.actionsApiPromise(r,n);return Ug({type:r,payload:{...n,containerName:B.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),s}cancelDataObject(e){if(!e)return Promise.reject(new Error("containerItemId is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=e;if(!Ip(t)){return new du(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}const n=Je,r=of.buildActionObject({containerItemID:e,context:t},this.c11nEnv),s=t&&t.includes(G.MODAL);Ug({type:n,payload:{...r,isModalAction:s,isDataObject:!0,skipReleaseLockRequest:!0}});const{promise:a}=this.actionsApiPromise(n,r);return a.then((()=>{ud({})}))}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));const{data:t}=Fg()?.getState()||{},n=t[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error(G.DATA_CLASS_NOT_FOUND));if(gg(B.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW)){const t=this.handleSubscript.call(this,e,this.c11nEnv);if(t)return t}const r=iu.getSavableDataPage(n),s=ht,a=!!e&&e.includes(G.MODAL),o=of.buildActionObject({containerItemID:e,dataPageID:r},this.c11nEnv),{promise:i}=this.actionsApiPromise(s,o);return Ug({type:"CREATE_DATA_OBJECT",payload:{...o,isModalAction:a,isFormValid:jl(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=gt,r=iu.getSavableDataPage(e),s=iu.getDataPageKeys(r),a={};if(s)for(const e of s)a[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const o=of.buildActionObject({dataViewName:r,dataViewParameters:a},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);return Ug({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 r=ft,{dataPageID:s,dataViewParameters:a}=cd(e,t),o=of.buildActionObject({dataLookUp:s,keyProperties:t,requestPayload:a,viewName:n.viewName||B.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:G.MODAL,readOnly:n.readOnly,actionName:n.actionName},this.c11nEnv),{promise:i}=this.actionsApiPromise(r,o);return Ug({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}=Fg()?.getState()||{},r=n[e]?.dataInfo?.content?.classID;if(!r)return Promise.reject(new Error(G.DATA_CLASS_NOT_FOUND));const{dataPageID:s,keys:a}=ld(r,t),o=mt,i=e&&e.includes(G.MODAL),c=of.buildActionObject({containerItemID:e,dataPageID:s,key:a},this.c11nEnv),l=n[e]?.caseInfo?.headers?.etag,{promise:u}=this.actionsApiPromise(o,c);return Ug({type:"UPDATE_DATA_OBJECT",payload:{...c,isModalAction:i,isFormValid:jl(e),etag:l}}),u}openDataObjectAction(e,t,n,r){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!t)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(!r)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));const s=It,{dataViewParameters:a,dataPageID:o,dataPageKeys:i}=cd(e,t),c=of.buildActionObject({actionID:n,actionName:r,dataViewParameters:a,lookupDatapage:o,containerName:G.MODAL,dataViewPayload:i,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:l}=this.actionsApiPromise(s,c);return Ug({type:s,payload:{...c}}),l}submitDataObjectAction(e,t,n,r){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:s}=Fg()?.getState()||{},a=s[e]?.dataInfo?.content?.classID;if(!a)return Promise.reject(new Error(G.DATA_CLASS_NOT_FOUND));const o=r?.jsActionQueryParams,i=Th(e),c=rh(i),l=Rp(c,i)||{},{resourceType:u="",key:d=""}=l,p=yt,{dataPageID:h,keys:g}=ld(a,t),f=of.buildActionObject({containerItemID:e,actionID:n,resourceType:u,key:d,keys:g,savableDatapage:h,containerName:G.MODAL,context:e,jsActionQueryParams:o},this.c11nEnv);f.context=e;const m=s[e]?.caseInfo?.headers?.etag,{promise:I}=this.actionsApiPromise(p,f);return Ug({type:p,payload:{...f,isFormValid:jl(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(window.pms?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,"pyStartCase",t);const{dockable:n=!1}=t?.modalOptions||{};let r=((e,t)=>Bl.isExternalObject(e)&&!t?"CREATE_EXTERNAL_OBJECT":Bl.isObjectCaseType(e)?"CREATE_OBJECT":ge)(e,$g(".isExternalObjectCreationFlow","context_data",this.c11nEnv.getContextName()));const s=of.buildActionObject({class:e,flowType:"pyStartCase",containerName:G.PRIMARY,openCaseViewAfterCreate:!0,...t,modalOptions:{isDockable:n}},this.c11nEnv),{promise:a}=this.actionsApiPromise(r,s);if(s.headers={...s.headers},t.channelName?s.headers[G.X_ORIGIN_CHANNEL]=t.channelName:Vh.isWSSPortal()&&(s.headers[G.X_ORIGIN_CHANNEL]="WSS"),q.isRemoteCase(e)){const{RemoteClassName:t,RemoteSystemID:n,name:a}=q.getRemoteCase(e);if(s.className=e,s.class=t,uc.setRemoteCaseHeaderByContext(s,n),q.isTraditionalRemoteCase(e)){const n={className:e,name:a,action:St,remoteClassName:t};r=uc.setTraditionalRemoteCaseParams(s,n)}}if(Po.getPreviewMode()){s.debugInfo={debugId:ef.generateUniqueID()};const e=ko.getCoreHeadersFromContext(s?.context||""),t=String(e?.debugInfo?.[G.COREHEADER_APP_DEBUG_ID]||"");t&&r!==ge&&(s.debugInfo={debugId:t})}return Ug({type:r,payload:{...s}}),a}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=Ce,r=of.buildActionObject({dataViewID:e,dataViewParameters:t},this.c11nEnv),{promise:s}=this.actionsApiPromise(n,r);return Ug({type:n,payload:{...r}}),s}getDescendants(e,t){if(!e)return Promise.reject(new Error(this.MSG_CASE_ID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTEXT_STRING));const n=t||this.c11nEnv.getContextName(),r=of.buildActionObject({caseID:e,currentContext:n},this.c11nEnv),{promise:s}=this.actionsApiPromise("GET_DESCENDANTS",r),a=(o={...r,context:n},{type:sd,payload:o});var o;return Ug(a),s}openWorkByHandle(e,t,n={}){if(!e)return Promise.reject(new Error("workID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("workID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,t);const r={insKey:e,acTargetName:n.targetContainer||G.PRIMARY,containerName:n.targetContainer||G.PRIMARY};let s=Bl.isObjectCaseType(t)?"GET_OBJECT":fe;const a=of.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(s,a);return a.headers={...a.headers},n.channelName?a.headers[G.X_ORIGIN_CHANNEL]=n.channelName:Vh.isWSSPortal()&&(a.headers[G.X_ORIGIN_CHANNEL]="WSS"),a.className=t,q.isRemoteCase(t)&&(s=this.setRemoteCaseParamsForOpenCase(a,t,n.remoteCaseMeta)??s),Po.getPreviewMode()&&![G.WORKAREA].includes(n.targetContainer)&&(a.debugInfo={debugId:ef.generateUniqueID()}),Ug({type:s,payload:{...n,...a}}),o}setRemoteCaseParamsForOpenCase(e,t,n={}){const{RemoteSystemID:r,RemoteClassName:s,name:a}=q.getRemoteCase(t);if(uc.setRemoteCaseHeaderByContext(e,r),e.isRemoteCase=!0,e.remoteCaseClass=t,q.isTraditionalRemoteCase(t)){e.remoteCaseMeta=n;const r={className:t,name:a,action:Nt,remoteClassName:s};return uc.setTraditionalRemoteCaseParams(e,r)}}openAssignment(e,t,n={isActionFromToDoList:!1,isChild:!1,context:"",viewType:"",skipBrowserSemanticUrlUpdate:!1,containerName:"",channelName:"",remoteCaseMeta:{}}){if(!e)return Promise.reject(new Error("assignmentID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("assignmentID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.openAssignment)return window.pms.plugins.c11n.openAssignment(e,t);const r={assignmentID:e,doDeleteCaseSummary:!0,containerName:n.containerName,isActionFromToDoList:n.isActionFromToDoList,isChild:!1};n.isChild&&(r.containerName=G.PRIMARY,r.isChild=n.isChild);let s=tu;const a=of.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(s,a);if(a.headers=a.headers||{},n.channelName?a.headers[G.X_ORIGIN_CHANNEL]=n.channelName:Vh.isWSSPortal()&&(a.headers[G.X_ORIGIN_CHANNEL]="WSS"),q.isRemoteCase(t)){const{RemoteClassName:e,RemoteSystemID:r,name:o}=q.getRemoteCase(t);if(uc.setRemoteCaseHeaderByContext(a,r),q.isTraditionalRemoteCase(t)){a.remoteCaseMeta=n.remoteCaseMeta;const r={className:t,name:o,action:Tt,remoteClassName:e};s=uc.setTraditionalRemoteCaseParams(a,r)}}a.className=t,a.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),Po.getPreviewMode()&&![G.WORKAREA].includes(n.containerName)&&(a.debugInfo={debugId:ef.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 Ug({type:s,payload:{...a,...i}}),o}finishAssignment(e,t={outcomeID:"",jsActionQueryParams:{}}){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n=Bp(e);let r=n;if(n?.includes("/workarea")&&(r=n.substring(0,r?.lastIndexOf("/workarea"))),(e=>{const t=io.getContextReferences(e);if(t)for(const[,e]of t)if(sf.resolveContextTreeNodeProps(e.props).hasSuggestions)return!0;return!1})(n)){const e=[{type:"error",message:this.c11nEnv.getLocalizationService().getLocalizedMessage(this.MSG_ACTIVE_SUGGESTION_UNATTENDED)}];return mo({messages:e,context:r,category:B.PAGE}),Promise.reject({type:B.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}const s=t?.isTriggeredFromDifferentContext,{caseID:a,assignments:o,localActionID:i,caseActions:c,caseInfo:l,businessID:u,caseTypeID:d,caseTypeName:p}=Jl(e,this.c11nEnv,{isTriggeredFromDifferentContext:s}),h=Wl(l);let g,f=!1;if(c){const e=c.find((e=>e.ID===i));f="Case"===e?.type}else g=jg(n);let{assignmentID:m}=Jl(e,this.c11nEnv,{isTriggeredFromDifferentContext:s});g?.context_data?.actionType&&(f=g.context_data.actionType===G.CASE,m=m||g.context_data.assignmentID);const I=((e,t,n,r)=>{let s;return s=e?Kl(e,t,n):r||"Create",s})(o,m,i,l?.activeActionID),[y,E]=a.split(" "),A={class:y,actionID:I,assignmentID:m,caseID:a,workID:E,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:f,doDeleteCaseSummary:!0,isInCreateStage:h,businessID:u,caseTypeID:d,caseTypeName:p};e?.includes(G.MODAL)&&(A.containerName=G.MODAL,A.isModalAction=!0),A.outcome=t.outcomeID,A.jsActionQueryParams=t.jsActionQueryParams,l?.isLocalAction&&(A.viewType=Zc.FORM);const _=((e,t)=>Bl.isObjectCaseType(e)||t?Ot:Ie)(d,l?.isObjectWideAction),C=of.buildActionObject(A,this.c11nEnv),{promise:S}=this.actionsApiPromise(_,C);return C.isProcessAction=this.c11nEnv.getValue("isProcessAction","isProcessAction")||jg(n).context_data.isProcessAction,C.headers??={},Vh.isWSSPortal()&&(C.headers[G.X_ORIGIN_CHANNEL]="WSS"),id.executeOrQueueDeferredAction({type:_,payload:{...C,context:n}}),S}getNextWork(){if("HYBRID"===Vh.getRenderingMode())return No.publish(B.PUB_SUB_EVENTS.CASE_EVENTS.GET_NEXT_WORK,{userIdentifier:Vh.getOperatorIdentifier()}),Promise.resolve();const e=tu,t=of.buildActionObject({containerName:G.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:n}=this.actionsApiPromise(e,t);return Ug({type:e,payload:{...t}}),n}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));const t=tu,n=this.c11nEnv.getValue(B.CASE_INFO.CASE_INFO_ID),r=this.c11nEnv.getCaseSummary().headers,s=of.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:a}=this.actionsApiPromise(t,s),o={type:t,payload:{...s,caseID:n,headers:r}};return Ug(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(B.CASE_INFO.CASES),r=this.c11nEnv.getValue(B.CASE_INFO.ACTIVE_ACTION_ID),s={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(G.MODAL)&&(s.containerName=G.MODAL,s.isModalAction=!0);const a=of.buildActionObject(s,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,a),i=Bp(e);return Ug({type:t,payload:{...a,context:i,cases:n,actionID:r,isFormValid:jl(i),classID:this.c11nEnv.getCurrentClassID()}}),o}submitBulkActionAsync(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t="SUBMIT_BULK_ACTION_ASYNC",n=this.c11nEnv.getValue(B.CASE_INFO.CASES),r=this.c11nEnv.getValue(B.CASE_INFO.ACTIVE_ACTION_ID),s={containerName:e.includes(G.MODAL)?G.MODAL:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1,isModalAction:e.includes(G.MODAL)},a=of.buildActionObject(s,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,a),i=Bp(e);return Ug({type:t,payload:{...a,context:i,cases:n,actionID:r,isFormValid:jl(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:r}=t,s=t.type,a={selectedList:n,vcName:t.target,actionName:t?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:s,runningMode:r,...t},o="OPEN_BULK_ACTION",i=of.buildActionObject(a,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);return Ug({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 du(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}approveCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(Ug({type:re,payload:{reference:B.CASE_INFO.APPROVALFLAG,value:G.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)):(Ug({type:re,payload:{reference:B.CASE_INFO.APPROVALFLAG,value:G.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(B.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:re,payload:{reference:B.CASE_INFO.DUPLICATECASEFLAG,value:G.DUPLICATE,context:e}},r={type:re,payload:{reference:B.CASE_INFO.DUPLICATECASEID,value:t,context:e}};return Ug([n,r]),this.finishAssignment(e)}ignoreDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t={type:re,payload:{reference:B.CASE_INFO.DUPLICATECASEFLAG,value:G.IGNORE,context:e}},n={type:re,payload:{reference:B.CASE_INFO.DUPLICATECASEID,value:"",context:e}},r={type:re,payload:{reference:B.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return Ug([t,n,r]),this.finishAssignment(e)}openLocalAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const n=this.getCaseID(t);if(window.pms?.plugins?.c11n?.openLocalAction)return t.caseID=n,dd(window.pms.plugins.c11n.openLocalAction,e,t);const r=t.assignKey||this.c11nEnv.getValue(B.CASE_INFO.ASSIGNMENT_ID),s=t.type,a={caseID:n,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,localActionType:s,...t},o=(e=>"Object"===e.type||Bl.isObjectCaseType(e?.caseClassName||"")||window.location.href.includes("/objects/")?Pt:"OPEN_LOCAL_ACTION")(t),i=of.buildActionObject(a,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);if(o===Pt)return Ug({type:o,payload:{...i}}),c;const l=this.c11nEnv.getContextName(),u=Hp(l)[0];let d=!1;const p=kp(u),h=this.c11nEnv.getValue(G.getProperty(B.CASE_INFO.CASE_INFO_ID)),g=n!==h&&p&&q.getRemoteHeaderByContext(p)||q.getRemoteHeaderByContext(l);let f;if(uc.setRemoteCaseHeaderByContext(i,g),!u)return f=l,Ug({type:o,payload:{...i,contextName:l,continueExecution:d}}),c;f=kp(u);const m=Dp(u);if(m?.accessedOrder.forEach((e=>{n===m.items[e].key&&(d=!0,f=m.items[e].context)})),!d||f&&"review"===Fg()?.getState()?.data[f]?.context_data?.caseViewMode)return Ug({type:o,payload:{...i,contextName:l,continueExecution:d}}),c;const I=f,y=I&&I.includes(G.MODAL),E=t.assignKey||this.c11nEnv.getValue(B.CASE_INFO.ASSIGNMENT_ID),A=jg(f),_=A?.caseInfo?.assignments?A.caseInfo.assignments[0]?.actions[0]?.ID:void 0,C=this.c11nEnv.getContainerName(),S=this.c11nEnv.getValue(B.CASE_INFO.CASE_TYPE_ID),T=this.c11nEnv.getValue("isProcessAction","isProcessAction"),N=of.buildActionObject({context:I,containerItemID:f,assignmentID:E,actionID:_,caseID:n,containerName:C,caseType:S,isModalAction:y,isFormValid:!0,isProcessAction:T},this.c11nEnv);N.context=f;const P=Bp(f),O=this.c11nEnv.getCaseSummary(),D=Wl(O),R=of.buildActionObject({caseID:n,containerItemID:f,cancelContext:P},this.c11nEnv);let b={};return y?(R.acTargetName=G.MODAL,R.isInCreateStage=D,R.isModalAction=y,b={...R}):b={...R,acName:wt(this.c11nEnv.getContainerName(),R.context)},Ug({type:o,payload:{...i,contextName:l,saveActionPayload:N,cancelActionPayload:b,continueExecution:d}}),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(B.CASE_INFO.CASE_INFO_ID)||t.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return t.caseID=n,dd(window.pms.plugins.c11n.openProcessAction,e,t);const r=this.c11nEnv.getValue(B.CASE_INFO.ASSIGNMENT_ID)||t.assignKey,s=t.type,a={caseID:n,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,processActionType:s,isProcessAction:!0,...t},o=eu,i=of.buildActionObject(a,this.c11nEnv),c=this.c11nEnv.getContextName(),l=Hp(c)[0];let u=q.getRemoteHeaderByContext(c);if(!u&&l){const e=Dp(l);e?.accessedOrder.forEach((r=>{(t.caseID||n)===e.items[r].key&&(u=q.getRemoteHeaderByContext(e.items[r].context))}))}uc.setRemoteCaseHeaderByContext(i,u);const{promise:d}=this.actionsApiPromise(o,i);return Ug({type:o,payload:{...i}}),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="NAVIGATE_TO_STEP",r=this.c11nEnv.getValue(B.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(B.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(B.CASE_INFO.ASSIGNMENT_ID),s=Wl(this.c11nEnv.getCaseSummary()),a=this.c11nEnv.getValue(B.CASE_INFO.CASE_INFO_ID),o={ID:r,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:t,doDeleteCaseSummary:!0,isInCreateStage:s,caseID:a};t&&t.includes(G.MODAL)&&(o.acTargetName=G.MODAL);const i=of.buildActionObject(o,this.c11nEnv),{promise:c}=this.actionsApiPromise(n,i),l=Bp(t);return Ug({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}=B,r=ye,s=Bp(e),a=e&&e.includes(G.MODAL),o=this.c11nEnv.getCaseSummary(),i=Wl(o),c=this.c11nEnv.getValue(G.getProperty(n.CASE_INFO_ID)),l=this.c11nEnv.getValue(n.ASSIGNMENT_ID),u=of.buildActionObject({caseID:c,containerItemID:e,context:s},this.c11nEnv);let d={};a?(u.acTargetName=G.MODAL,u.isInCreateStage=i,u.isModalAction=a,d={...u}):d={...u,acName:wt(this.c11nEnv.getContainerName(),u.context)};const{promise:p}=this.actionsApiPromise(r,u);return Ug({type:r,payload:d}),p.then((()=>{t||ud({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}=B,n=e,r=Je,s=e&&e.includes(G.MODAL),a=this.c11nEnv.getValue(t.CASE_INFO_ID),o=of.buildActionObject({caseID:a,containerItemID:e,context:n},this.c11nEnv);if(!Ip(n)){return new du(this.c11nEnv).removeContainerItem({containerItemID:e}).then((()=>{ud({caseID:a,context:this.c11nEnv.getContextName()})}))}Ug({type:r,payload:{...o,isModalAction:s}});const{promise:i}=this.actionsApiPromise(r,o);return i}cancelCreateStageAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=B,n=Je,r=e,s=r&&r.includes(G.MODAL),a=this.c11nEnv.getCaseSummary(),o=this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.CASE_TYPE_ID)),i=Wl(a),c=this.c11nEnv.getValue(G.getProperty(t.CASE_INFO_ID)),l=of.buildActionObject({caseID:c,containerItemID:e,context:r},this.c11nEnv),u=this.c11nEnv.getValue("isProcessAction","isProcessAction"),d=Vh.isCoexistenceAppOfType(G.APP_TYPE.UIKIT);if(l.isProcessAction=u,i&&(s||d)&&!Gl(a)){const t=this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.IS_FIRST_ASSIGNMENT)),c=Ip(r);if(this.shouldDeleteCaseInCreateStage(c,t,d)){const t=!0===Boolean(Bl.isExternalObject(o));return this.deleteCaseInCreateStage(e,t)}Ug({type:n,payload:{...l,isModalAction:s,isChildCase:Yl(a),isInCreateStage:i}})}const{promise:p}=this.actionsApiPromise(n,l);return p.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=ru,n=this.getSaveActionPayload(e,!0),{promise:r}=this.actionsApiPromise(t,n);return id.executeOrQueueDeferredAction(su(n)),r}saveAndClose(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=ru,n=this.getSaveActionPayload(e),{promise:r}=this.actionsApiPromise(t,n);return Ug(su(n)),r}deleteCaseInCreateStage(e,t=!1){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n=nu,r=e,s=r&&r.includes(G.MODAL),a=this.c11nEnv.getValue(G.getProperty(B.CASE_INFO.CASE_INFO_ID)),o=this.c11nEnv.getValue(G.getProperty(B.CASE_INFO.CASE_TYPE_ID)),i=of.buildActionObject({caseID:a,caseType:o,containerItemID:e,context:r,ignoreCaseDeletion:t},this.c11nEnv),c=this.c11nEnv.getValue("isProcessAction","isProcessAction"),l=this.c11nEnv.getValue(G.getProperty(B.CASE_INFO.PARENTCASEINFO));i.isProcessAction=c,i.parentCaseInfo=l;const u=`${G.APP.APP}/${Np.PRIMARY}`,d=ul(u,Np.PRIMARY);i.parentContext=d,s&&(i.targetName=G.MODAL,i.containerName=Np.MODAL,i.isModalAction=s),Ug((e=>({type:nu,payload:e}))(i));const{promise:p}=this.actionsApiPromise(n,i);return p.then((()=>{ud({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}=jh.getRestEndPoint("getRecents")||{};t=`${t}?maxResultsToFetch=${e}`;const n=T()+t;return Ko(n,{method:"GET",headers:{}})}updateRecents(e,t,n,r){const{restApi:s}=jh.getRestEndPoint("updateRecents")||{},a=`${T()}${s}`;return Ko(a,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:n,pyID:t,classID:e,ID:r}})}logout(){const{restApi:e}=jh.getRestEndPoint("Logout")||{},t=`${T()}${e}`;return Ko(t,{method:"GET",headers:{}}).then((e=>(Object.keys(io.rootNodes).forEach((e=>{rd.cleanCaches(e)})),io.rootNodes={},sessionStorage.clear(),Xg(),Promise.resolve(e))))}invoke(e,t={}){const n={method:t.method||"GET",body:t.body};return Ko(e,n,this.c11nEnv.getContextName())}showCasePreview(e,t={}){this.loadView(e,"pyCasePreview",{container:Np.PREVIEW,containerName:Np.PREVIEW,context:B.APP.APP,...t})}showDataPreview(e,t,n){return e?"string"!=typeof e?Promise.reject(new TypeError("dataContext must be string")):t?"object"!=typeof t?Promise.reject(new TypeError("dataContextParameters must be an object")):this.showData("pyDataPreview",e,t,{container:Np.PREVIEW,containerName:Np.PREVIEW,context:B.APP.APP,...n||{},skipSemanticUrl:!0}):Promise.reject(new Error("dataContextParameters is required parameter")):Promise.reject(new Error("dataContext is required parameter"))}loadView(e,t,n){let r=of.buildActionObject({caseId:e,viewName:t,caseClassName:this.c11nEnv.getValue(G.getProperty(B.CASE_INFO.CASE_TYPE_ID)),RemoteSystemID:q.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);n||(n={containerName:this.c11nEnv.getContainerName(),updateData:!1}),n&&"object"==typeof n?(Object.hasOwn(n,"container")&&!Object.hasOwn(n,"containerName")&&(n.containerName=n.container),r={...r,...n}):r={...r,containerName:this.c11nEnv.getContainerName()};const s=oe,{promise:a}=this.actionsApiPromise(s,r,!1);return Ug({type:s,payload:{...r}}),a}showPage(e,t,n={containerName:"",skipSemanticUrl:""}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.showPage)return window.pms.plugins.c11n.showPage(e,t,n);const r=of.buildActionObject({viewName:e,className:t},this.c11nEnv),s=ie,{promise:a}=this.actionsApiPromise(s,r);return Po.getPreviewMode()&&(r.debugInfo={debugId:ef.generateUniqueID()}),Ug({type:s,payload:{...r,...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=of.buildActionObject({},this.c11nEnv),r=le,{promise:s}=this.actionsApiPromise(r,n);return Ug({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,insightID:e}}),s}showDashboard(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));const n=of.buildActionObject({},this.c11nEnv),r=ue,{promise:s}=this.actionsApiPromise(r,n);return Ug({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,dashboardID:e}}),s}showData(e,t,n,r={containerName:"",skipSemanticUrl:!1}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error("dataContext is required parameter"));if("string"!=typeof t)return Promise.reject(new TypeError("dataContext must be string"));const s=of.buildActionObject({pageName:e,dataContext:t,dataContextParameters:n,RemoteSystemID:q.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv),a=ce;r?.containerName||(r.containerName="HYBRID"===Vh.getRenderingMode()?od.getRuntimeParam(G.HYRBID_ROOT_CONTAINERNAME):pc.getTargetViewContainerName(a));const{promise:o}=this.actionsApiPromise(a,s);return Ug({type:a,payload:{...s,...r,skipSemanticUrl:Boolean(r.skipSemanticUrl)}}),o}changeHandler(e,t){of.changeHandler(e,t)}eventHandler(e,t){of.eventHandler(e,t)}triggerFieldChange(e,t,n=!1,r={skipDirtyValidation:!1}){const s=this.c11nEnv.getContextName(),a=this.c11nEnv.getPageReference(),o=sf.getContextPath(a,e);n||this.c11nEnv.getValidationApi().validate(t),this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(e,t,r);let i=this.c11nEnv.getValue(G.CLASS_ID);const c=e?e.split(".").filter((e=>!!e)):[];c.length>1&&(c.pop(),i=$g(`.${c.join(".")}.classID`,a,s)),e=ef.trimDotForProperty(e),Ug({type:ae,payload:{reference:o,value:t,context:s,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:i}})}updateFieldValue(e,t,n={}){const{removePropertyFromChangedList:r=!1,isArrayDeepMerge:s=!0,contextPageReference:a="",isListEntry:o=!1,skipDirtyValidation:i=!1,associatedProperty:c}=n,l=this.c11nEnv.getContextName();let u=this.c11nEnv.getPageReference();const d=a?.startsWith(u)?a.replace(u,""):a;u=a||u;const p=sf.getContextPath(u,e);let h=!1;this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(d?`${d}${e}`:e,t,{isArrayDeepMerge:s,skipDirtyValidation:i}),this.c11nEnv.isBulkAction()&&(h=!0),e||(e=this.c11nEnv.getStateProps().value),fo({type:B.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:u,context:l,isListEntry:o}),Ug({type:re,payload:{reference:p,value:t,context:l,isArrayDeepMerge:s,skipDirtyValidation:i,...h&&{isStrictTracking:h},...r&&{removePropertyFromChangedList:r},...c&&{associatedProperty:`${u}${c}`}}})}activateModalContainerItem(e){const t=Ve,{context:n}=e,r=n&&n.includes(G.MODAL),s=of.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);r&&(s.containerName=G.MODAL,s.isModalAction=r),Ug({type:t,payload:s});const{promise:a}=this.actionsApiPromise(t,s);return a}refreshCaseView(e,t,n,r={}){const{promise:s,actionMgrID:a}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:o,propertyName:i,preserveClientChanges:c,classID:l,context:u,optionalPayload:d,isArrayDeepMerge:p}=r,h={actionMgrID:a,caseViewAction:!0,preserveClientChanges:c,propertyName:i,classID:l,isArrayDeepMerge:p,optionalPayload:d};r.refreshFor&&(h.refreshFor=r?.refreshFor),r.resetForm&&(h.resetForm=r?.resetForm);const g=u||this.c11nEnv.getContextName(),f=this.c11nEnv.getPageReference();return!this.c11nEnv.getValue(G.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)&&o&&(((e,t)=>zl(e)&&!ql(e,t))(g,f)||ql(g,f))?Zd(g,n,h):qd(e,t,g,n,h),s}refreshEmbeddedDataWithAction(e,t,n,r,s,a,o,i,c={}){const{promise:l}=this.actionsApiPromise(ad.REFRESH_DATA),u=this.c11nEnv.getContextName();return zd(e,t,n,u,r||this.c11nEnv.getPageReference(),s,a,o,i,c),l}openEmbeddedDataModal(e,t,n,r,s,a,o,i){const c=Et;let l=t.getCaseInfo().getKey();const u=t.getValue(B.CASE_INFO.IS_LOCAL_ACTION),d=t.getValue(B.CASE_INFO.ASSIGNMENT_ID),p=((e,t,n)=>n||t!==G.ACTION?e.getValue(B.CASE_INFO.ACTIVE_ACTION_ID):e.getValue(B.CASE_INFO.ASSIGNMENTACTION_ID))(t,o,u),h=t.getPageReference();let g="string"==typeof r?`${t.getPageReference().replace(G.getProperty(B.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${r}`:`${t.getPageReference().replace(G.getProperty(B.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${r}]`;h.startsWith(B.OBJECT_INFO.OBJECT_INFO)&&!l&&(l=t.getCaseInfo().getObjectKey(),g=`${t.getPageReference().replace(B.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${r}]`);const f={targetProperty:n,index:r,viewID:e,ID:l,actionType:s,interestPage:ef.convertPageRefToClipboardPageNotation(g),heading:a,editType:o,interestPageActionID:o===G.ACTION?i:void 0,actionID:p,isLocalAction:u,operationFlag:G.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:"string"==typeof r,assignmentID:u||o!==G.ACTION?void 0:d},m=of.buildActionObject(f,this.c11nEnv);if(o===G.ACTION){const e=ef.getETag(m.context);m.headers={"If-Match":e}}const{promise:I}=this.actionsApiPromise(c,m);if(Vh.getFeatureMap().granularUIRefresh){(t.getMetadata().config.children[0].children||[]).forEach((e=>{const n=In.trimAnnotation(e.config.value),r=ig(n.startsWith(".")?n.replace(".",""):n,e.config.classID);r?.isDeclarativeTarget&&io.addFieldNode(t.getContextName(),h+g,t.viewName,n,"",{isDeclarativeTarget:!0,propertyName:n,pageReference:h+g})}))}return Ug({type:c,payload:{...m,containerName:B.MODAL,skipSemanticUrl:!0}}),I}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=At;let n=this.c11nEnv.getValue(G.getProperty(B.CASE_INFO.CASE_INFO_ID));const r=this.c11nEnv.getValue(G.getProperty(B.CASE_INFO.ASSIGNMENT_ID));let s=this.c11nEnv.getPageReference().replace(G.getProperty(B.CASE_INFO.CASE_INFO_CONTENT),"");const a=Bp(e),o=this.c11nEnv.getValue(G.getProperty(G.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW)),{interestPageActionID:i,editType:c,isLocalAction:l,actionID:u,viewName:d,parentContext:p}=o;s.startsWith(B.OBJECT_INFO.OBJECT_INFO)&&!n&&(n=this.c11nEnv.getValue(B.OBJECT_INFO.OBJECT_INFO_ID),s=this.c11nEnv.getPageReference().replace(B.OBJECT_INFO.OBJECT_INFO_CONTENT,""));const h={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:n,viewID:d,isFormValid:jl(a),interestPage:ef.convertPageRefToClipboardPageNotation(s),parentContext:p,isModalAction:!1,target:this.c11nEnv.getTarget(),editType:c,actionID:u,operationFlag:G.EMBEDDED_DATA_MODAL.SUBMIT_ROW,interestPageActionID:i,isLocalAction:l,assignmentID:r};e&&e.includes(G.MODAL)&&(h.containerName=G.MODAL,h.isModalAction=!0);const g=of.buildActionObject(h,this.c11nEnv);if(c===G.ACTION){const e=ef.getETag(g.context);g.headers={"If-Match":e}}const{promise:f}=this.actionsApiPromise(t,g);if(Ip(a)){const[e,t,n]=Ka(this.c11nEnv.getPageReference());io.mutatePageList(p,e,t,{type:at,rowIndex:n}),Ug({type:at,payload:{pageReference:this.c11nEnv.getPageReference(),context:p,isListEntry:!0}})}return id.executeOrQueueDeferredAction({type:t,payload:{...g,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=Bp(e),n=this.c11nEnv.getPageReference(),{promise:r,actionMgrID:s}=this.actionsApiPromise(Ct);return Zd(t,n,{actionMgrID:s,isFillFormWithAI:!0,preserveClientChanges:!1}),r}handleSubscript(e,t){if(!gg(B.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW))return Promise.reject(new Error(this.MSG_SUBSCRIPT_VIEW_REQUIRED));const n=_t,r=of.buildActionObject({containerItemID:e},t);Ug({type:n,payload:{...r,isDataObject:!0,skipReleaseLockRequest:!0,isFormValid:jl(e),context:e}});const{promise:s}=this.actionsApiPromise(n,r);return s}showSubscriptCreateView(e,t,n,r=B.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW){const s=of.buildActionObject({viewName:r,className:e,referenceListStr:t,subscriptName:n},this.c11nEnv),a=ie,{promise:o}=this.actionsApiPromise(a,s);return Ug({type:a,payload:{...s,containerName:B.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),o}deleteWork(e,t,n){if(!e)return Promise.reject(new Error("workId is required parameter"));const r=Dt,s=Bl.isExternalCaseType(t),a=of.buildActionObject({workId:e,caseTypeID:t,isExternalCase:s,...n?.skipDeleteConfirmation&&{skipDeleteConfirmation:!0},...n?.enableBackNavigation&&{enableBackNavigation:!0}},this.c11nEnv),{promise:o}=this.actionsApiPromise(r,a);return Ug(ou({...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=Dt,r=of.buildActionObject({className:e,keys:t},this.c11nEnv),{promise:s}=this.actionsApiPromise(n,r);return Ug(ou({...r})),s}};const hd=class{constructor(e){this.c11nEnv=e}async getCaseStages(e,t){const n={caseID:e},{restApi:r,reqType:s}=rm("getCaseStages",n);return(await Ko(r,{method:s},t)).data.stages}getCaseTypeName(){return this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.CASE_TYPE_NAME))}getName(){return this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.CASE_INFO_NAME))}getClassName(){return this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.CASE_TYPE_ID))}getAvailableProcesses(){return this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.AVAILABLEPROCESSES))}getKey(){return this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.CASE_INFO_ID))}getObjectKey(){return this.c11nEnv.getValue(G.OBJECT_INFO.OBJECT_INFO_ID)}getID(){const e=this.getKey();if(e){const[,t]=e.split(" ");return t||e}}getAssignmentID(){return this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.ASSIGNMENT_ID))}getActions(){return this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.ACTION_BUTTONS))}getActiveFlowActionID(){return this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.ACTIVE_ACTION_ID))||this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.ASSIGNMENTACTION_ID))}getParentCaseInfo(){return this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.PARENTCASEINFO))}isPerform(){return this.c11nEnv.getValue(`${G.CONTEXT_DATA}${G.CASE_VIEW_MODE_PROP}`)===G.PERFORM_MODE}isReview(){return this.c11nEnv.getValue(`${G.CONTEXT_DATA}${G.CASE_VIEW_MODE_PROP}`)===G.REVIEW_MODE}isAssignmentInCreateStage(){const e=this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.CASE_INFO));return Wl(e)}isLocalAction(){const e=this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.CASE_INFO));return Gl(e)}getCurrentAssignmentViewName(){let e=null,t=!1;if(this.c11nEnv.getValue("context_data.caseViewMode")===G.PERFORM_MODE){if(this.isLocalAction())return e;if(this.isAssignmentInCreateStage())t=!0;else{const t=this.c11nEnv.getTarget(),n=this.c11nEnv.getContextName(),r=Rp(t,n),{config:s}=t&&n?r&&r.view:this.c11nEnv.getMetadata();e=s?.type===G.VIEW?s?.name:null}(e&&e.startsWith(G.PROPERTY_ANNOTATION)||t)&&(e=this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.VIEW_NAME)))}return e}getValueByPath(e,t){let n=e;if((t=t.replace("@P ","").trim()).includes("pyViewContext")){const t=e.caseInfo?.content??{},r=t.pyViewContext;if(""===r)return n.caseInfo.content;if("string"==typeof r&&r.includes("(")&&r.includes(")")){const e=r.substring(1,r.indexOf("(")),n=parseInt(r.substring(r.indexOf("(")+1,r.indexOf(")")),10)-1;if(Array.isArray(t[e]))return t[e][n]}}const r=t.split(/[.[\]]/).filter((e=>e));for(const e of r)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=Rp(e,t),{config:r}=e&&t&&n?n.view:this.c11nEnv.getMetadata(),s=this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.CASE_INFO)),a=r?.type===G.VIEW?r.context:null;if(a){const e=this.getValueByPath({caseInfo:s},a);if("object"==typeof e&&null!==e&&"classID"in e)return e.classID}return null}getActionRefreshConditions(){if(this.c11nEnv.getValue(G.getProperty(G.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)))return this.c11nEnv.getValue(G.getProperty(G.EMBEDDED_DATA_MODAL.REFRESH_CONDITIONS));const e=this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.ACTIVE_ACTION_ID)),t=K(this.c11nEnv.getContextName());let n;t&&(n=jg(t));const r=n?.caseInfo?.availableActions,s=jg(this.c11nEnv.getContextName()),a=s?.caseInfo?.refreshConditions;if(e){if(r){const t=r.find((t=>t.ID===e));return t?t.refreshConditions:a}return a}return this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.ACTION_REFRESH_CONDITIONS))}getBusinessID(){return this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.BUSINESS_ID))}getAssignments(){return this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.CASE_INFO))?.assignments}getChildAssignments(){return this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.CASE_INFO))?.childCases?.[0]?.assignments}isCaseWideLocalAction=()=>{const e=this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.ACTIVE_ACTION_ID)),t=this.c11nEnv.getValue(G.getProperty(G.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(G.getProperty(G.CASE_INFO.CASE_INFO_ACTIONS)),t=this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.ASSIGNMENT_LABEL)),n=this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS))||[],r=this.getChildAssignments()||[];let s=JSON.parse(JSON.stringify(r));s=s.map((e=>(e.isChild=!0,e)));const a=[...n,...s];let o=JSON.parse(JSON.stringify(a));return e&&!this.isPerform()&&(o=o.map((e=>(e.name=this.getActiveCaseActionName()||e?.name||t,e)))),o}getActiveCaseActionName(){const e=this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.CASE_INFO_ACTIONS)),t=this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.ACTIVE_ACTION_ID)),n=e.find((e=>e.ID===t));return n?.name||""}getFirstCaseActionName(){const e=this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.CASE_INFO_ACTIONS));return e[0]?.name||""}hasAssignments(){const e=this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)),t=this.getChildAssignments();return!!(e||t||this.isCaseWideLocalAction())}hasMessages=()=>!!this.c11nEnv.getValue("caseMessages");hasGetNextWorkLinks(){return!!this.c11nEnv.getValue(G.getProperty(G.CASE_INFO.GETNEXTWORK))}isObjectWideAction(){const e=this.c11nEnv.getValue(G.OBJECT_INFO.OBJECT_INFO);return Gl(e)}},{RESOURCE_TYPES:gd}=B;const fd=class{static openCase(e,t,n,r={}){const s={insKey:e,acTargetName:n,actionMgrID:uc.getNextActionMgrId(),context:t,...r},a=fe;r&&r.channelName?s.headers={[G.X_ORIGIN_CHANNEL]:r.channelName}:Vh.isWSSPortal()&&(s.headers={[G.X_ORIGIN_CHANNEL]:"WSS"});const{promise:o}=uc.actionManagerPromise(a,s.actionMgrID);return Ug({type:a,payload:s}),o}static openAssignment(e,t,n,r={}){const s={assignmentID:e,vcName:n,doDeleteCaseSummary:!0,actionMgrID:uc.getNextActionMgrId(),context:t,...r},a=Ee;r&&r.channelName?s.headers={[G.X_ORIGIN_CHANNEL]:r.channelName}:Vh.isWSSPortal()&&(s.headers={[G.X_ORIGIN_CHANNEL]:"WSS"});const{promise:o}=uc.actionManagerPromise(a,s.actionMgrID);return Ug({type:a,payload:{...s}}),o}static createCase(e,t,n,r={}){const s=ge,a={class:e,acTargetName:n,actionMgrID:uc.getNextActionMgrId(),context:t,...r};r&&r.channelName?a.headers={[G.X_ORIGIN_CHANNEL]:r.channelName}:Vh.isWSSPortal()&&(a.headers={[G.X_ORIGIN_CHANNEL]:"WSS"});const{promise:o}=uc.actionManagerPromise(s,a.actionMgrID);return Ug({type:s,payload:{...a}}),o}static getNextWork(e,t,n={}){const r=Ee,s={isGetNextWork:!0,vcName:t,doDeleteCaseSummary:!0,actionMgrID:uc.getNextActionMgrId(),context:e,...n},{promise:a}=uc.actionManagerPromise(r,s.actionMgrID);return Ug({type:r,payload:{...s}}),a}static getOpenedCaseItems(e){const t=[],n=Dp(e);if(n){const{items:r={}}=n,s=Object.keys(r),a=kp(e);s.forEach((n=>{if(r[n]&&(r[n].resourceType===gd.CASE||r[n].resourceType===gd.ASSIGNMENT||r[n].resourceType===gd.OBJECT)){const{key:s="",context:o}=r[n],i=r[n],c=s.substring(s.indexOf(" ")+1),l=$g(".caseTypeID",G.CASE_INFO.CASE_INFO,o),u=a===n;t.push({...i,key:s,workID:s,caseID:c,className:l,context:o,containerItemID:n,target:e,active:u})}}))}return t}static getCaseDetails=(e,t)=>{if(!e)return Promise.reject(new Error("Case ID is required"));const n={caseID:e},{restApi:r,reqType:s}=rm(ze,n),a={},o=q.getRemoteHeaderFromSourceClass(t??"");return o&&(a.RemoteSystemID=o),Ko(r,{method:s,headers:a})};static getCaseBulkActions=async e=>{const{restApi:t,reqType:n}=rm("getBulkActions"),r=e.map((e=>({ID:e}))),s=r.length,a=s/5,o={},i=[];for(let e=0;e<s;e+=a)o.cases=r.slice(e,e+a),o.cases.length&&i.push(Ko(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:r}=rm("getCaseBulkActions",t),s=await Ko(n,{method:r});let a=[];return s.data?.availableActions?.length&&(a=s.data.availableActions),a}};class md{static getParagraphStream(e,t,n){return((e,t,n)=>{if(!e)return e;const r=(new DOMParser).parseFromString(e,"text/html"),s=r.querySelectorAll("pega-reference");for(const e of s){const n=e.getAttribute("data-rule-id");if(n){const s=t.getValue(n),a=r.createTextNode(s??"");e.replaceWith(a),t.registerAdditionalProps({[n]:`@P ${n}`})}else e.replaceWith("")}let a;return a="simple"===n?r?.body?.textContent||"":r?.body?.innerHTML||"",/^(<p>)\s*(<\/p>)$/.test(a)?null:a})(e,t,n)}static isDecisionParagraph(e,t){const n=Cg(e,t);return!!n?.useDecision}static processParagraph(e,t){const n=t.getCurrentClassID(),r=Cg(e,n);let s;if(r?.useDecision){const n=r.dynamicContents.length;for(let a=0;a<n-1;a+=1)if(sf.resolveWhen(r.dynamicContents[a].when,t)){s=r.dynamicContents[a],e=`${e}#${s.when}`;break}s||(s=r.dynamicContents.pop())}else s=r;const a=r?.definedOnClassID,o=Hh().getParagraphLocaleValue(a||n,e);return o?md.getParagraphStream(o.content,t,o?.category):s?.content?md.getParagraphStream(s.content,t,s?.category):null}}const Id=md;class yd{constructor(e){this.fieldType=e}applyFallback(e){const t=Mi.getDefaultsforType(this.fieldType);e.currencyISOCode=e.currencyISOCode||t?.currencyISOCode||"USD"}}class Ed{static getStrategy(e){switch(e){case"Currency":case"Decimal":case"Integer":case"Percentage":return new yd(e);default:return}}}const Ad="DATAPAGE",_d="VIEW",Cd="FIELD",Sd="CASE",Td="PARAGRAPH",Nd=(e,t,n,r)=>{const s=[_d,Cd,Td],a=[Ad,Td];(!t||s.includes(e)&&!n)&&console.warn(`Invalid parameters for locale reference: type=${e}, id=${t}, ruleClass=${n}, path=${r}`);const o=a.includes(e)&&r?`#${r}`:"",i=e===Ad?"@BASECLASS":n;return e===Ad||s.includes(e)?`${i}!${e}!${t}${o}`.toUpperCase():`${e}!${t}${o}`.toUpperCase()};class Pd{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=cg(this.locale),r=this.#r(e,this.localeReference?n.localeStore[`${this.localeReference.toUpperCase()}`]:{})||this.#r(e,n.localeStore[Pd.COMMON_LABELS])||this.#r(e,n.localeStore[Pd.COMPONENT_FIELDS])||this.#s(e)||e;return(t?this.#a(r,t):r)||e}getLocalizedMessage(e,t){const n=cg(this.locale).localeStore[Pd.MESSAGES]??{},r=this.#r(e,n)??e;return(t?this.#a(r,t):r)||e}getLocalizedDataPage(e,t,n,r){if(!t||!n||!e)return e;const s=Nd(Ad,t,void 0,n),a=cg(this.locale),o=this.#r(e,a.localeStore[s])??this.#r(e,a.localeStore[Pd.COMMON_LABELS])??this.#s(e)??e;return(r?this.#a(o,r):o)||e}#a(e,t){return 0===t.length?e:e.replace(/\{(\d+)\}/g,((e,n)=>t[""+(Number(n)-1)]??e))}#s(e){if(0===this.lookupList.length)return;const t=cg(this.locale);for(const n of this.lookupList){const r=this.#r(e,t.localeStore[n]);if(r)return r}}#r(e,t){if(null==e||!t)return;const n=t[e]??t[e];return"string"==typeof n?n:void 0}setLookupList(e){Array.isArray(e)&&(this.lookupList=e)}}const Od=e=>$.getNeedsMapping()||e?.info===B.OBJECT_INFO.OBJECT_INFO?B.OBJECT_INFO.OBJECT_INFO:B.CASE_INFO.CASE_INFO,Dd=(e,t)=>{const n=Od(t);e.data=e.data??{};const{assignments:r,availableActions:s=[]}=e.data[n]??{};if(r&&Array.isArray(r)&&r.length>0&&r[0].actions&&Array.isArray(r[0].actions)&&!t?.stopMergeActions){r[0].actions.forEach((e=>{"Assignment"!==e.type&&"LocalAction"!==e.type||s.push(e)})),e.data[n]=e.data[n]??{},e.data[n].availableActions=s}},Rd=(e,t)=>{const n=Od(t);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 Dd(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:s,navigation:a},nextAssignmentInfo:o}=r;if(r.data&&r.data[n]&&(s&&(r.data[n].actionButtons=s),a&&(r.data[n].navigation=a),t&&t[B.ACTIONS.DELETEAVIALACTIONS]&&delete r.data[n].availableActions,Dd(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),o&&(r.data=r.data??{},r.data.nextAssignmentInfo=o),r},bd=async e=>{const t=Rd(e),n=ef.getIn(t,G.COMPONENTS);Hi(t,{},!0),await ic(n)},vd=(e,t,n)=>sf.resolveView(e,t,n);const xd=class{constructor(e,t,n){this.meta=e,this.datasource=t,this.index=0,this.options=n,this.datasourceObj=sf.getPropertyValue(t,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");const e=sf.getContextPath(this.datasource,this.index);return this.index+=1,$d({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}};class wd{constructor(e,t){this.children=e,this.index=0,this.options=t}hasNext(){return this.index<this.children.length}next(){if(!this.hasNext())throw new Error("No Children");const e=this.children[this.index];return this.index+=1,$d({meta:e,index:this.index,options:this.options})}resetIndex(){this.index=0}}const Md=(e,t)=>{const n=!!e?.repeat;if(!!e?.["repeat-self"])return new xd(e,e.context||"",t);if(n){const n=Gg(`${t.context}.${G.SUMMARY_OF_LISTS}`,e.pageReference,t.context);return new xd(e.children[0],n||e.context,t)}return e?.children?new wd(e.children,t):void 0};class Ld{static allowedComponetsForBulkProcessing={Currency:!0,TextInput:!0,Phone:!0,Percentage:!0,Email:!0,Integer:!0,Decimal:!0,URL:!0,SemanticLink:!0,Checkbox:!0,RadioButtons:!0,DateTime:!0,Date:!0,Time:!0,Text:!0,TextArea:!0,RichText:!0,Dropdown:!0,Search:!0,Location:!0,Attachment:!0,AutoComplete:!0,MultiSelect:!0,UserReference:!0,Region:!0,TextContent:!0,View:{Forms:!0,DefaultForm:!0,OneColumn:!0,TwoColumn:!0,ThreeColumn:!0}};static getItemView(e,t){const n=[];if(e&&["portal","view"].includes(t)){const{accessedOrder:t,items:r}=e;if(t&&r){const e=t[t.length-1];r[e]&&r[e].view&&Object.keys(r[e].view).length>0&&n.push(r[e])}}return n}static getDependentProperties=e=>{let t=[];return e._rawConfig?.config?.parameters?t=Object.values(e._rawConfig?.config?.parameters||{}):e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters&&(t=(e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters||[]).map((e=>e?.value))),t.filter((e=>cu.isProperty(e))).map((e=>cu.getPropertyName(e)))}}const Fd=new Ld;let Ud;Object.freeze(Fd);const jd=(e,t,n)=>{e&&(Object.keys(e).forEach((r=>{if("children"!==r){const s=e[r],a=In.trimAnnotation(s);if("string"!=typeof a&&"string"!=typeof s||!(ef.isValidAnnotation(s)&&ef.isPropertyRef(a)||s.startsWith("@W ")||s.startsWith("@DW ")||s.startsWith("@E ")||s.startsWith("@ATTACHMENT "))){if(Array.isArray(a))a.forEach(((e,n)=>{const s={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||[],t[r][n]=Object.create({}),jd(e,t[r][n],s)}));else if(a&&"object"==typeof a&&"exp"!==a.type){const e={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||{},jd(a,t[r],e)}}else n&&n.parentKey&&(n.isObjHasValue=!0),t[r]=a}})),n&&!n.isObjHasValue&&delete n.parentStateObj[n.parentKey])},kd=(e,t)=>{e._inheritedProps=e._inheritedProps||[],e.inheritedProps=[...e._inheritedProps,...ef.deepClone(t.inheritedProps)]};class Vd{constructor(e){const{meta:t,isRoot:n,options:r={},useCustomContext:s}=e;this.meta=t,this._isRoot=n,this.options=r,this.useCustomContext=s,this._rawConfig=t?.config,this._isExpressionExist=!1,this._isWhenExist=!1,this._isValidatorExist=!1,this._pageReference="",this._referenceContext="",this._contextName="",this._stateProps={},this._actions={},this._children="",this._additionalRegisteredProps={},this._caseInfo=null,this.viewName=r.viewName,this.parentViewName=r.viewName??"",this._referenceList=r.referenceList||"",this._isInsideList=r.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=r.localeReference,this._containerTarget=r.target,this._readOnly=t?.config?.readOnly||r.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,this.index=e.index,this.categoryName=r.categoryName||"",r.inheritedConfig&&(this._inheritedConfig=ef.deepClone(r.inheritedConfig)),t?.config?.inheritedProps&&kd(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=ai.formatePageReferenceToArrayIndex(this.meta.config.value)),jd(this._rawConfig,this._stateProps),this._isState=!ef.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=ef.isExpressionExist(this._rawConfig.config),this._isWhenExist=ef.isWhenExist(this._rawConfig.config),this._isValidatorExist=Gi.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=B.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=In.handleAnnotation(this.options.pageReference,this)),this._pageReference=sf.getContextPath(a||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),"reference"===this._type&&(this._rawConfig=t);const o="reference"===this._type&&ef.isWhenExist({visibility:this.meta?.config?.visibility}),i=this._checkAndSetDecisionParagraph("instructions",this._rawConfig?.instructions);let c=!1;if("reference"!==this._type&&t&&(this._rawConfig=sf.resolveReference(t,this)),this._rawConfig){const e=this.getRawConfigProps();e&&(this._localeRuleName=In.trimAnnotation(e.localeReference)||r.localeReference,this._isExpressionExist=ef.isExpressionExist(e),this._isWhenExist=ef.isWhenExist(e),this._isValidatorExist=Gi.isValidatorExist(e),c=this._checkAndSetDecisionParagraph("label",e?.label)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===G.VIEW&&this._rawConfig.name&&(this.viewName=In.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&Xd(this)}(o||i||c)&&Yd(this.viewName,this._contextName,this._pageReference)}_checkAndSetDecisionParagraph(e,t){let n=!1;if(t&&t.startsWith(G.PARAGRAPH_ANNOTATION)){const r=In.trimAnnotation(t);n=Id.isDecisionParagraph(r,this.getCurrentClassID()),n&&this.setStateProps({[e]:t})}return n}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||""===this._pageReference){const t=In.trimAnnotation(this.getPropertyName()),n=this.getFieldMetadata(t);e=n?.isDeclarativeTarget||!1}return e}_getPropertyName(){const e=In.trimAnnotation(this.getPropertyName());return""===this._pageReference&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){const e=this._getPropertyName(),{value:t,label:n,required:r,readOnly:s,disabled:a,visibility:o,validationType:i,caption:c,allowMultiple:l}=this.getRawConfigProps();if(this.getValue(this._pageReference)||""===this._pageReference){const u="Address"===this._type&&this._rawConfig?.config?.associatedView?In.trimAnnotation(this._rawConfig.config.associatedView):"",d=n||c,p={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:In.trimAnnotation(t),label:d?.startsWith("@")?In.handleAnnotation(d,this,void 0):d,required:r,readOnly:s,disabled:a,visibility:o||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:t,validationType:i,componentName:this._rawConfig?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),index:this.index,allowMultiple:l,isDeclarativeTarget:this.isDeclarativeTarget()};io.addFieldNode(this._contextName,this._pageReference,(u||this.categoryName||this.viewName)??"",e,this.getValue(e),p)}}removeNode(){if(!this.isVisible())if(Object.hasOwn(this._rawConfig?.config??{},"value")&&"Address"!==this._type)io.removeFieldNode(this._contextName,this._pageReference,this.viewName||"",In.trimAnnotation(this.getPropertyName()),this.index);else if("Address"===this._type&&this._rawConfig?.config?.associatedView)io.removeViewNode(this._contextName,this._pageReference,In.trimAnnotation(this._rawConfig.config.associatedView),this.index);else{const e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference;io.removeViewNode(this._contextName,e,this._rawConfig?.config?.name||this._rawConfig?.config?.id||"",this.index)}}addViewNode(){this.isReadOnly()||(this._rawConfig?.type?.toLowerCase()===G.VIEW&&this._rawConfig.name&&this.viewName&&io.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName),"Group"===this._rawConfig?.type&&this._rawConfig?.config?.id&&io.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.id,this.parentViewName),"Address"===this._rawConfig?.type&&this._rawConfig?.config?.associatedView&&io.addViewNode(this._contextName,this._pageReference,In.trimAnnotation(this._rawConfig.config.associatedView),this.parentViewName),"deferload"===this._rawConfig?.type?.toLowerCase()&&this._rawConfig.config?.name&&io.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.parentViewName))}addWhenNode(){let e="",t="";const n=ef.getWhenNames(this._rawConfig?.config),r=this.getRawConfigProps();if(r?.type&&r?.type?.toLowerCase()===G.VIEW)t=G.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{t=G.CONTEXT_TREE_NODE_TYPES.FIELD;const n=this.getPropertyName();e=In.isProperty(n)?In.trimAnnotation(n):""}e&&n.forEach((n=>{io.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()!==G.VIEW||"Editable"===this._rawConfig.config?.renderMode)&&this._rawConfig?.config?.referenceList&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode)){const{value:e,label:t,required:n,readOnly:r,disabled:s,visibility:a,validationType:o,selectionMode:i,selectionList:c,selectionKey:l,referenceList:u,renderMode:d,caption:p,uniqueField:h}=this.getRawConfigProps(),g=t||p;let f=[];["Multiselect","Checkbox"].includes(this._rawConfig.type)&&(f=this.getSelfReferencingDatapageKeys()),io.addPageListNode(this._contextName,this._pageReference,this.viewName??"",In.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:In.trimAnnotation(this.getPropertyName()),label:g?.startsWith("@")?In.handleAnnotation(g,this,void 0):g,required:n,readOnly:r,disabled:s,visibility:a||this.options.visibility,skipRequiredValidation:this.options.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:e,validationType:o,componentName:this._rawConfig.type,type:this._rawConfig.config?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),selectionMode:i,selectionList:c,renderMode:d,referenceList:u,selectionKey:l,index:this.index,uniqueField:h,selfReferencingDatapageKeys:["Multiselect","Checkbox"].includes(this._rawConfig.type)?f:void 0});const m=this.getValue(In.trimAnnotation(this.getPropertyName()),this._pageReference)||[];io.updatePageListNode(this._contextName,this._pageReference,In.trimAnnotation(this.getPropertyName()),m.length)}this.isWhenExist()&&this.addWhenNode(),this.removeNode()}getStateProps(){return this._stateProps}setStateProps(e){ef.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getSharedDataPageForReferenceList(){const e=this.getCaseInfo().getClassName(),t=this.getCurrentView();if(!t||!e)return;const n=vd(t,this,e);if(!n)return;const r=this.getRawMetadata()?.config?.referenceList;if(!r)return;let s={};"object"==typeof n.config?.parameters&&null!==n.config.parameters&&(s=n.config.parameters);const a=ef.generateDataPageHashWithParameters(s,r,this),o=kg(),i=o?o[r]?.[a]:{};return Array.isArray(i?.pxResults)?i.pxResults:void 0}getCaseInfo(){return this._caseInfo||(this._caseInfo=new hd(this)),this._caseInfo}getCaseLocaleReference(e){const t=this.getRawConfigProps(),n=e||this.getValue(G.getProperty(G.CASE_INFO.CASE_TYPE_ID))||this.getValue(G.CLASS_ID,G.getProperty(G.DATA_INFO.DATA_INFO_CONTENT))||t?.referenceClass||t?.className;return n?Nd(Sd,n):null}getListActions(){return wi(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 sf.getContextPath(e,t)}getContextName(){return this._contextName}getContainerName(){const{type:e}=this.getMetadata()||{},t=[G.CONTAINERS.ROOT_CONTAINER,G.CONTAINERS.VIEW_CONTAINER,G.CONTAINERS.FLOW_CONTAINER,G.CONTAINERS.MODAL_VIEW_CONTAINER,G.CONTAINERS.PREVIEW_VIEW_CONTAINER,G.CONTAINERS.HYBRID_VIEW_CONTAINER],{acTargetName:n=Np.PRIMARY,name:r,routingInfo:s}=this.getComponentConfig();return(e&&t.includes(e)||"@ROUTING_INFO"===s)&&r?r:this.options.containerName||n}getTarget(){return this._containerTarget}getCurrentView(){return this.viewName}populateSuggestionProps(e){if(this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&this.getStateProps()?.value&&this.options.hasForm){const t=f?.getStore()?.getState()?.data[`${this.getContextName()}/${G.SUGGESTION}`],n=this.getStateProps()?.value,r=sf.getContextPath(this.getPageReference(),n),s=t?Xc.getSuggestionsContext(this.getContextName()).getField(r):void 0;this._hasSuggestions=!!s,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){const t={...Mi.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig},n=Ed.getStrategy(this._type);return n?.applyFallback(t),this.populateSuggestionProps(t),this.resolveConfigProps(t,e),ef.resolveStringBooleans(e)}getLocalizationService(e){const t=this.getComponentName(),n=e||("View"===t?this._rawConfig?.config?.template:t),r=Vh.getLocale()??"en-US",s=new Pd(r,n),a=this.getCaseLocaleReference();return a&&s.setLookupList([a]),s}getRawConfigProps(){const e={...Mi.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(e),e}resolveConfigProps(e,t={}){return e&&(sf.resolveProps(e,t,this),In.handleComponentMapping(t,{type:this.getComponentName()||"",config:e},this)),t}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),jd(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(),r=this.getComponentConfig(),s=n===G.ROOT_CONTAINER&&"portal"!==e.renderingMode;if(n===G.MODAL_VIEW_CONTAINER||n===G.CASE_CREATE_STAGE){const n=kp(`${G.APP.APP}/${this.getContainerName()}`),r=go({context:n,category:B.PAGE});e.pageMessages=t(r),this._stateProps.pageMessages=e.pageMessages}if(this.isEditable()){let{value:t}=this.getStateProps();void 0===t&&"multi"===this.getComponentConfig()?.selectionMode?t=this.getStateProps().selectionList||In.trimAnnotation(this.getRawConfigProps().selectionList):!t&&"Editable"===this.getComponentConfig()?.renderMode&&this.getStateProps().referenceList&&(t=this.getStateProps().referenceList);const n=go({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:B.MESSAGES.MESSAGES_TYPE_ERROR}),r=go({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:B.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=G.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status;const r=n?.find((e=>"error"===e.type&&"required"===e.subType));r&&!e.required&&this.clearErrorMessages({property:t,subType:"required"})}r&&r[0]&&(e.infoMessage=r[0].message,e.status=G.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(n===G.ROOT_CONTAINER){const n=yo(s,kp(`${G.APP.APP}/${this.getContainerName()}`));e.httpMessages=Array.isArray(n)?t(n):n,this._stateProps.httpMessages=e.httpMessages;const r=Xc.getSharedState("isLoggedOut");e.isLoggedOut=r,this._stateProps.isLoggedOut=r;const a=go({context:G.APP.ROOT,category:"PAGE"});e.pageMessages=t(a),this._stateProps.pageMessages=e.pageMessages}if(n===G.HYBRID_VIEW_CONTAINER){const n=go({context:G.APP.APP,category:G.HTTP});e.httpMessages=t(n),this._stateProps.httpMessages=n}if(n===G.APP_SHELL&&e.portalDocMode===G.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=fd.getOpenedCaseItems(`${B.APP.APP}/${G.PRIMARY}`),this._stateProps.activeCases=e.activeCases),n===G.APP_SHELL){const n=G.APP.APP,r=kp(`${n}/${this.getContainerName()}`),s=[...go({context:n,category:"PAGE"})||[],...go({context:r,category:"PAGE"})||[]],a=s.length>0?s:void 0;e.pageMessages=a&&t(a),this._stateProps.pageMessages=e.pageMessages}if(e.value&&n===G.SCALARLIST&&(this._stateProps.value=e.value),n===G.APP_SHELL||n===G.MODAL_VIEW_CONTAINER||n===G.CASE_CREATE_STAGE||r.template===G.CASE_PREVIEW){let t=go({context:G.APP.APP,category:"HTTP"});const n=go({context:kp(`${G.APP.APP}/${this.getContainerName()}`),category:"HTTP"});t?n&&(t=t.concat(go({context:kp(`${G.APP.APP}/${this.getContainerName()}`),category:"HTTP"}))):t=go({context:kp(`${G.APP.APP}/${this.getContainerName()}`),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===G.VIEW_CONTAINER||n===G.FLOW_CONTAINER||n===G.MODAL_VIEW_CONTAINER||n===G.PREVIEW_VIEW_CONTAINER||n===G.ROOT_CONTAINER){if(e.routingInfo=Mt(this.getContainerName(),this._contextName),n===G.ROOT_CONTAINER&&(e.rootConfig=Ld.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,n===G.FLOW_CONTAINER){const n=go({context:this.getContextName(),category:G.CASEMESSAGES}),r=this.getContextName();e.caseMessages=n,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;const s=Hp(r)[0];if(s){const n=kp(s),r=f?.getStore()?.getState()?.data;r&&n&&(e.lastUpdateTime=r[n]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=r[n]?.caseInfo?.lastUpdateTime);const a=go({context:n,category:B.PAGE}),o=go({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.assignmentNames=this.getCaseInfo().getAssignments()?.map((e=>e.name)),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map((e=>e.name)),n===G.MODAL_VIEW_CONTAINER){const t=e.routingInfo?.accessedOrder||[],n=t[t.length-1];n&&(e.loadingInfo=this.getLoadingStatus(n))}this._stateProps.loadingInfo=e.loadingInfo,this._stateProps.assignmentNames=e.assignmentNames,this._stateProps.childAssignmentNames=e.childAssignmentNames}else r.template===G.CASE_VIEW||r.template===G.SELF_SERVICE_CASE_VIEW||r.template===G.CASE_PREVIEW||r.template===G.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):n===G.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:r}=this.getComponentConfig(),{propertyValue:s,propertyAnnotation:a}=this.getPropertyDetails(r,n,t);if(s&&"string"==typeof s&&(s.includes(a)||s.includes(G.ATTACHMENT_ANNOTATION))){const t=In.getPropertyName(s),n=this.getFieldMetadata(t);n&&this.updateConfigData(e,n,t)}}resolvePropertyMetadata(e,t){if(!e)return e;const n=Rg(`${this._pageReference}.${t}`,this._contextName);return e?.additionalInformation&&this.setStateProps({additionalInformation:n}),Array.isArray(e)||(e.additionalInformation=n),e}getFieldMetadata(e){if(!e)return null;const t=e.split(".");if(t.length<2){let t=this.getValue(G.CLASS_ID);return!t&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(t=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata(ig(e,t),e)}const n=t.pop(),r=t.join(".")?".":"";let s=this.getValue(`${r}${t.join(".")}${G.CLASS_ID}`);return s||(s=ef.resolvePageClass(e,this.getValue(G.CASE_INFO.CASE_INFO_CLASSID))),this.resolvePropertyMetadata(ig(n,s),e)}getCurrentPageFieldMetadata(e=null){let t=this.getPageReference().split(".");null!==e&&(t=e.split("."));const n=t.pop();return this.resolvePropertyMetadata(ig(n,this.getValue(`${t.join(".")}${G.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(G.CLASS_ID)}getCaseSummary(){const e={...this.getDataObject()[G.getProperty(B.CASE_INFO.CASE_INFO)]};return e.CaseID=e.CaseID||this.getValue(G.getProperty(B.CASE_INFO.CASE_INFO_PZINSKEY)),{...e,isCaseWideAction:()=>ql(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()[B.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[B.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}resolveContextProps(e){const{value:t}=this.getStateProps();t&&(e.error=this.getContextDataValue(`${this.getPageReference()+t}.error`),e.validatemessage=this.getContextDataValue(`${this.getPageReference()+t}.validatemessage`))}isValidatorExist(){return!!this._isValidatorExist}getValidationApi(){return new Zl(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?In.handleAnnotation(this._rawConfig?.config?.visibility,this):"string"!=typeof this.options?.visibility||In.handleAnnotation(this.options?.visibility,this)}isReadOnly(){return void 0!==this._readOnly&&("true"===this._readOnly||!0===this._readOnly||"string"==typeof this._readOnly&&!0===In.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 r=n.getConfigProps(),s={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]};let a=n._type&&s.includeTypes.includes(n._type)&&!s.excludeTemplates.includes(r.template);if(!!r.highlightedData&&r.highlightedData.length&&r.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 jg(e||this.getContextName())}getImagePath(e){return`${sc.getConstellationServiceUrl()}/v860/${sc.getAppAlias()}/image/${e}?org=${jh.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=Md(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}),n=[];for(;t?.hasNext();){const e=t.next();this.isBulkAction()&&this.#o(e)||n.push(e)}return t?.resetIndex(),n}return[]}setInheritedProp(e,t){this._inheritedConfig[e]=t}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,t,n){const r=n||this.getLocaleRuleName(),s=r&&t?`${r}#${t}`:r,a=this.getLocalizationService(s).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?sf.getPropertyValue(e,this.getPageReference(),`${this._contextName}/${G.SUGGESTION}`):sf.getPropertyValue(e,t||this.getPageReference(),this._contextName)}setInheritedConfig(e){if(!e)return;const{readOnly:t,displayMode:n,referenceType:r,hideLabel:s}=e;s&&(this._inheritedConfig.hideLabel=s),r&&(this._inheritedConfig.referenceType=r),n&&(this._inheritedConfig.displayMode=n),(this._inheritedConfig.readOnly||t)&&(this._inheritedConfig.readOnly=t),e.inheritedProps&&(e.inheritedProps?.forEach((e=>{"required"===e.prop&&(this._inheritedConfig[e.prop]=e.value)})),kd(this._inheritedConfig,e))}getInheritedProps(){const e={},t={};return this._inheritedConfig.inheritedProps?.forEach((e=>{t[e.prop]=e.value})),sf.resolveProps(t,e,this),e}setValue(e,t,n,r=!1,s={}){let a,o;const{isArrayDeepMerge:i}=s;this.isInsideList()&&this.getListActions().updateProperty(e,t),this.isBulkAction()&&(a=!0,t||(o=!0)),Ug({type:"SET_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,initialValue:n,isImplicit:r,context:this.getContextName(),...void 0!==i&&{isArrayDeepMerge:i},...a&&{isStrictTracking:a},...o&&{removePropertyFromChangedList:o}}})}updateDirtyCheckChangeList(e,t){const n={reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName()};mp(n)}getContextDataValue(e,t){return Bg(t||this.getPageReference(),e,this._contextName)}updateState(e){const t=this._pageReference.indexOf(G.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf(".");let r=G.CASE_INFO.CASE_INFO_CONTENT;0!==t&&(r=n>0?this._pageReference.substring(n):this._pageReference),Ug(df({context:this._contextName,data:e,rootPageReference:r}))}replaceState(e,t,n={}){const{skipDirtyValidation:r=!1}=n;Ug({type:"REPLACE_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName(),skipDirtyValidation:r}})}reportError(e,t,n){Ug(kf(e,t||{},n,t?.formFields))}getComponent(){return Ud({getPConnect:()=>this})}createComponent(e,t,n,r){let s=this._pageReference;if(t){const e=Gg(`${this.getPageReference()}.${G.SUMMARY_OF_LISTS}`,t,this._contextName);s=sf.getContextPath(e||t,n)||t}else if(r&&r.pageReference){let e=r.pageReference;e=In.handleAnnotation(e,this),s=sf.getContextPath(this._pageReference,e)||""}return Ud($d({meta:e,index:this.index,options:{containerName:this.getContainerName(),hasForm:this.options.hasForm,...e.options,pageReference:s,context:this._contextName,target:this._containerTarget,readOnly:this._readOnly||this._inheritedConfig?.readOnly,viewName:this.viewName},useCustomContext:this.useCustomContext}),r)}getReferencedView(){if(this.meta)return sf.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)||e.startsWith(G.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,$d({meta:this.getReferencedView(),options:{...e?this.options:void 0,...t,context:this.getContextName(),pageReference:t.context?this._resolvePageRef(t.context):this.getPageReference(),viewName:this.viewName}})}getContainerManager(){return new du(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new pd(this)),this._actionsApi}getActionManager(){return uc}doesContextExist(e){return Qg(e??this.getContextName())}getGoogleMapsAPIKey(){return O()}getServerURL(){return T()}getLoadingStatus(e){let t=null;return e?(t=jg(e),t=t?t.context_data:null):t=this.getDataObject().context_data,!!t&&(!!t.isLoading&&t.isLoading)}clearErrorMessages(e){e?.property?fo({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName(),...e.subType&&{subType:e.subType}}):e?.context?fo({type:"error",...e}):(fo({type:"error",...e,context:G.APP.APP}),fo({type:"error",...e,context:kp(`${G.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return Gg(`${this.getPageReference()}.${G.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,t,n=!1){delete e?.classID,this.setValue(t,e,void 0,void 0,{isArrayDeepMerge:!1}),n?((e,t,n)=>{const r=(e,t)=>{Object.entries(e).forEach((([e,s])=>{if(Array.isArray(s)){const r=PCore.createPConnect({options:{pageReference:n.getPageReference(),context:n.getContextName(),referenceList:`${t}.${e}`}}).getPConnect();xi(r,`${t}.${e}`,{skipStateUpdate:!0});for(let e=0;e<s.length;e+=1)Ni(s[e],e,r,void 0,{})}else"object"==typeof s&&r(s,`${t}.${e}`)}))};r(e,t)})(e,t,this):((e,t,n)=>{const r=bl(t);Rl[e]?Rl[e].fieldOrder[r]=n:Rl[e]={fieldOrder:{[r]:n}}})(this.getContextName(),`${this.getPageReference()}${t}`,this.getStateProps()?.value??"")}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=Xc.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,r=sf.getContextPath(this.getPageReference(),n),s=t.getField(r);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,s),this.getActionsApi().triggerFieldChange(n,s),t.removeField(r,{actionPerformed:"accepted"})}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=this.getStateProps()?.value||e,n=sf.getContextPath(this.getPageReference(),t);this._hasSuggestions=!1,Xc.getSuggestionsContext(this.getContextName()).removeField(n,{actionPerformed:"ignored"});const r=gn.getDependencies(this._contextName,n);r?.forEach((e=>{Xc.getSuggestionsContext(this.getContextName()).removeField(e,{actionPerformed:"ignored"})}))}}getSelfReferencingDatapageKeys(){const e=[],t=this.getPropertyName(),n=this.getFieldMetadata(t),{datasource:{parameters:r={}}={}}=n||{};return Object.values(r).forEach((n=>{const[,r]=n.split("."),s=t?.split(".").pop();r===s&&e.push(n.substring(n.lastIndexOf(".")+1))})),e}isReadOnlyField(e,t){const n=cu.isPropertyInternal(t),r=e.datasource,s=this.getComponentConfig().isSearchField,{isClassKey:a,isSpecial:o,isDeclarativeTarget:i}=e.fieldMetadata,c=e.listType!==G.ASSOCIATED;return!s&&(i||n||!r&&(a||o)&&c)}getPropertyDetails(e,t,n){return e===G.ASSOCIATED?{propertyValue:t,propertyAnnotation:G.ASSOCIATED_PROPERTY_ANNOTATION}:{propertyValue:n,propertyAnnotation:G.PROPERTY_ANNOTATION}}updateConfigData(e,t,n){e.fieldMetadata=t,t.additionalInformation&&(e.additionalInformation=t?.additionalInformation),this.isReadOnlyField(e,n)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})),e.fieldMetadata?.isReadOnly&&(e.readOnly=!0,this.registerAdditionalProps({readOnly:!0}))}#o(e){const t=e.getPConnect().getComponentName(),n=e.getPConnect().getConfigProps().template;return!(!0===Ld.allowedComponetsForBulkProcessing[t]||!0===Ld.allowedComponetsForBulkProcessing[t]?.[n])}}function $d(e){const t=new Vd(e);return{getPConnect:()=>t}}function Bd(e){Ud=e}const Gd=e=>({type:ad.REFRESH_DATA,payload:e}),Wd={},Hd=(e,t,n,r,s,a,o,i)=>{if(!(e&&r&&t))return;const c=i.actionMgrID||uc.getNextActionMgrId(),l={ID:e,actionID:t,objectTypeID:n,context:r,caseWideAction:s,isObjectType:a,isExternalObject:o,options:{...i,actionMgrID:c}};i.isFillFormWithAI?Ug((e=>({type:Ct,payload:e}))(l)):Ug(Gd(l))},qd=(e,t,n,r,s)=>{if(!(e&&n&&t))return;r&&(r=ef.convertPageRefToClipboardPageNotation(r));Ug(Gd({ID:e,viewID:t,context:n,options:s,caseViewAction:!0,interestPage:r}))},zd=(e,t,n,r,s,a,o,i,c,l={})=>{if(!((e||t)&&r&&n&&s))return;s&&(s=ef.convertPageRefToClipboardPageNotation(s));const u={ID:o||c!==G.ACTION?e:t,actionID:n,context:r,options:l,interestPage:s,interestPageActionID:a,isLocalAction:o,isMultiRecordData:i,editType:c};Ug(Gd(u))},Yd=(e,t,n)=>{Wd[t]||(Wd[t]={}),e&&!Wd[t][e]&&(Wd[t][e]={pageReference:n})},Kd=(e,t,n)=>{const r={pageName:(s=t.substring(t.lastIndexOf(" ")+1)).substring(0,s.lastIndexOf(".")),propertyName:s.substring(s.lastIndexOf(".")+1)};var s;const a=ig(r.propertyName,n||e.getValue(G.CLASS_ID,r.pageName));return!!a?.isDeclarativeTarget},Jd=(e,t)=>{const n=e.getRawMetadata()?.config?.value;let r=!1;if(n){const s=ig(In.getLeafPropertyName(n),t||sf.resolveClassID(n,e.getPageReference(),e.getContextName()));if(r=!!s?.isDeclarativeTarget,!r&&s?.additionalInformation){const e=In.trimAnnotation(s?.additionalInformation);r=Id.isDecisionParagraph(e,s.classID)}!r&&s?.datasource?.parameters&&(r=((e,t,n)=>{let r=!1;if(Array.isArray(t)){const s=t=>{const s=t.value;return s.startsWith("@P")&&(r=Kd(e,s,n)),r};t.some(s)}else if("object"==typeof t)for(const s of Object.keys(t))if(t[s].startsWith("@P")&&(r=Kd(e,t[s],n),r))break;return r})(e,s?.datasource?.parameters,t)),r||(r=s?.datasource?.tableType===G.DECISION)}return r},Xd=e=>{(e.isWhenExist()||Jd(e))&&Yd(e.getCurrentView(),e.getContextName(),e.getPageReference())},Qd=e=>{if(!e)return!1;const t=Fg()?.getState()?.data?.[e],n=t?.caseInfo?.caseTypeID||t?.objectInfo?.objectTypeID;return Bl.isObjectCaseType(n)},Zd=(e,t,n)=>{const r=ql(e,t),s=Bl.isObjectCaseType(n?.classID)||t.startsWith(G.OBJECT_INFO.OBJECT_INFO);let a,o,i="",c=!1;const l=n=>sf.getPropertyValue(n,t,e)||"";if(s&&Qd(e))i=l(B.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),c=Bl.isExternalObject(i),n.isObjectWideAction=!0,a=l(B.OBJECT_INFO.ACTIVE_ACTION_ID)||G.VIEW_NAMES.OBJECT_CREATE_VIEW,o=l(G.getProperty(B.CASE_INFO.CASE_INFO_ID))||i;else if(a=l(B.CASE_INFO.ACTIVE_ACTION_ID)||l(B.CASE_INFO.ASSIGNMENTACTION_ID),r)o=l(G.getProperty(B.CASE_INFO.CASE_INFO_ID));else{o=l(G.getProperty(B.CASE_INFO.ASSIGNMENT_ID))||l(G.getProperty(B.CONTEXT_DATA_ASSIGNMENTID))}Hd(o,a,i,e,r,s,c,n)},ep=e=>{const{context:t,pageReference:n}=e,r=(e=>Wd[e]&&Object.keys(Wd[e]).length>0&&zl(e))(t);if(!r)return;const s=sf.getPropertyValue(G.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,n,t),{isMultiRecordData:a,editType:o}=s||{};if(a){const e=sf.getPropertyValue(B.CASE_INFO.CASE_INFO_ID,n,t),r=sf.getPropertyValue(B.CASE_INFO.ASSIGNMENT_ID,n,t),{interestPage:i,interestPageActionID:c,actionID:l,isLocalAction:u,viewName:d}=s;o===G.ACTION?zd(e,r,l,t,i,c,u,a,o):qd(e,d,t,i,{})}else Zd(t,n,{})},tp=(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},np=(e,t)=>{const n=e.url?.includes("/refresh?refreshFor="),r=t.url?.includes("/refresh?refreshFor="),s=e.url?.endsWith("/refresh")&&!n,a=t.url?.endsWith("/refresh")&&!r;if(s&&a)return((e,t)=>{const n=e.url===t.url,r=e.interestPage===t.interestPage;return n&&r})(e,t);if(s&&r)return!0;if(n){if(a)return"CANCEL_REFRESH";if(r)return!1}return!1},rp=e=>{const t=(e=>{const t=[];return io.getDeclarativeTargets(e).forEach((({name:e,pageReference:n})=>{const r=n.split(".");r.shift();let s=r.join(".");e&&s&&(s=ef.convertPageRefToClipboardPageNotation(s),t.push({name:e,context:s}))})),t})(e),n=(e=>{const t=[];return io.getWhens(e).forEach((({name:e,type:n,pageReference:r})=>{const s=r.split(".");s.shift();let a=s.join(".");e&&a&&(a=ef.convertPageRefToClipboardPageNotation(a),t.push({name:e,context:a,type:n}))})),t})(e);return{fieldsWithDeclarativeTargets:t,whens:n}};const sp=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}},{APP:ap}=G;let op={},ip={},cp={};const lp="You will lose unsaved changes. Do you want to continue?",up="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",dp=(e=ap.APP,t,n)=>{let r=[],s=[];t||(r=kl(e,!0)),n||(s=(e=>{const t=io.getContextReferences(e),n=[];if(t)for(const[e,r]of t)!0===sf.resolveContextTreeNodeProps(r.props).readOnly&&n.push(e);return n})(e));const a={};((e,t,n)=>{const r=ip[t]||{};Object.keys(r).forEach((t=>{const s=r[t].associatedProperty;Object.hasOwn(r,t)&&(void 0===s||n.includes(s))&&ef.buildObject(t,e,r[t].value)}))})(a,e,r);const o=op[e]||{};return Object.keys(o).forEach((e=>{const n=!t&&r.includes(e)||t;Object.hasOwn(o,e)&&n&&!s.includes(e)&&ef.buildObject(e,a,o[e].value)})),a},pp=e=>{const{context:t}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;delete op[t]?.[n],delete ip[t]?.[n]},hp=e=>e&&cp[e],gp=(e,t)=>{const{context:n,initialValue:r="",isStrictTracking:s,associatedProperty:a}=t,o=t.reference.startsWith(".")?t.reference.substr(1):t.reference;e[o]?e[o].previousValue=$g(t.reference,null,n):(e[o]={initialValue:r||$g(t.reference,null,n)},e[o].previousValue=e[o].initialValue),e[o].value=t.value,a&&(e[o].associatedProperty=a),s&&e[o].value===e[o].initialValue&&pp(t)},fp=e=>{const{payload:t}=e,{context:n}=t,r=t.reference.startsWith(".")?t.reference.substr(1):t.reference;io.isFieldExists(n,r)||(ip[n]=ip[n]||{},gp(ip[n],t)),op[n]=op[n]||{},gp(op[n],t)},mp=({value:e,context:t,reference:n})=>{const r=rh(t),s=Rp(r,t)||{};if(sp.isPageInstruction(n)||s?.subscriptFieldName)return;const a=n?.startsWith(".")?n?.substr(1):n;op[t]=op[t]||{};op[t][a]||(op[t][a]={initialValue:$g(a,null,t)}),op[t][a].value=e},Ip=e=>e&&op[e]&&Object.keys(op[e]).some((t=>op[e][t].initialValue!==op[e][t].value))||!!hp(e),yp=(e,t)=>{if(!e||!t)return!1;const n=op[e]&&op[e][t];return!!n&&n.previousValue!==n.value},Ep=e=>{e&&op[e]?(op[e]={},ip[e]={}):"all"===e&&(op={},ip={},cp={}),cp[e]&&(cp[e]=!1)},Ap=(e,t,n=new Set)=>{if(n.has(t))return;n.add(t);[...gn.getDependencies(e,t),...xg.getResetDependencies(e,t)].forEach((t=>{const r=ef.getPropertyNameFromDependency(t);if("object"==typeof t&&"multiRecord"===t.mode){const t=r.split("."),n=`.${t.pop()}`,s=t.join(".");if(Dl.isStateMachineExist(e,s,n)){Dl.getStateMachine(e,s,n).deleteAll()}}else sp.isPageInstruction(r)&&Dl.executeStateMachine(e,r,""),Ug({type:re,payload:{reference:r,value:"",context:e,isArrayDeepMerge:!0,isImplicit:!0}});Ap(e,r,n)}))},_p={propertyChangeMiddleware:()=>e=>t=>{const{type:n,payload:r={}}=t||{};if(n===ae&&(dn(r),(e=>{const{context:t,pageReference:n,value:r,reference:s}=e;xg.triggerCascade(t,s,r);const a=gn.getDependencies(t,s),o={context:t,datapages:{}};Ap(t,s),a.forEach((r=>{let s=n;r.startsWith(n)||(s="");const a=r.replace(`${s}`,"").split(".").filter((e=>!!e));a.pop();const i=a.join("."),c=$g(`.${i}`,s,t)?.classID||e.classID,l=ig(r.split(".").pop(),c),{datasource:u}=l,d={},p=[];u.parameters.forEach((e=>{e?.value?(d[e.name]=cu.isProperty(e.value)?$g(`.${ef.getFullPropertyReference([i,ef.getPropertyName(e.value)])}`,s,t):e.value,void 0===d[e.name]||null===d[e.name]||""===d[e.name]?(d[e.name]="",p.push(G.NULL_STRING)):p.push(d[e.name])):(d[e.name]="",p.push(G.NULL_STRING))}));const h=u.name.concat(G.UNDERSCORE_STRING,ef.getHashedString(p.join(G.HASH_DELIMITER))),{name:g}=u,f=Ig(g);o.datapages[h]={mode:u.mode,propertyName:r,name:u.name,dataViewParameters:d,refreshStrategy:f?.refreshStrategy}})),a.length&&Ug({type:it,payload:o})})(r),id.registerBlockingAction(r.context).catch((()=>{})),setTimeout((()=>{(yp(r.context,r.reference)||vi(r.context))&&ep(r),nd.triggerRefreshForType("PROP_CHANGE",r.reference,r.context),id.deRegisterBlockingAction(r.context).catch((()=>{}))}),0)),n===ut&&!r?.isDefault){const{context:e,referenceList:t,c11nEnv:n,listIndex:s,instruction:a,skipDirtyValidation:o=!1}=r;0===s&&"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 r of n){const n=$d({meta:r}).getPConnect();if(n.isWhenExist()||Jd(n,t))return!0;if(r.children&&e(t,r.children))return!0}return!1}(n.contextClass,n.children??[])),t&&Yd(e.getCurrentView(),e.getContextName(),e.getPageReference())})(n),ep({context:e,pageReference:t}),o||(cp[`${e}`]=!0)}if(n===re||n===se){const{reference:e,isImplicit:n,context:s,skipDirtyValidation:a=!1}=r;io.updateFieldNodeValue(s,e,r.value),sp.isPageInstruction(e)||a?a||(cp[`${s}`]=!0):fp(t),(r.removePropertyFromChangedList||n)&&pp(r)}if(n===we||n===Me){const{transientItemID:e,data:t}=r;ef.iterateLeafNodes(t,(t=>{pp({context:e,value:"",reference:t.join(".")})}))}if(n&&[Ue,De,ke,xe].includes(n)){Ep(r.context),xg.purgeResetDependencies(r.context),(e=>{e&&Wd[e]&&delete Wd[e]})(r.context);(r.childContainersContexts||[]).forEach((e=>{Ep(e)}));(r.transientItems||[]).forEach((e=>{Ep(e)}))}e(t)},getChanges:dp,recordChange:fp,isDirty:()=>Object.keys(op).some((e=>Ip(e))),isPropertyDirty:yp,isContextDirty:Ip,resetChangedProperties:Ep,deleteRecordedChange:pp,isComplexObjectMerged:hp};const Cp=new class{getCoreheaders(e){const t=`${B.APP.APP}${G.FORWARD_SLASH_STRING}${G.PRIMARY}`,n=kp(t),r=Bp(n),s=sf.getProperty(G.COREHEADERS,"",r);if(s&&e in s)return s[e]}},Sp={defaultLimit:16},Tp={SINGLE:"single",MULTIPLE:"multiple"},Np={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},Pp=()=>Fg()?.getState()?.containers;function Op(e){return"string"==typeof e&&""!==e.trim()}const Dp=e=>Op(e)?Fg()?.getState().containers[e]:null,Rp=(e,t)=>{if(!Op(e)||!Op(t))return null;const n=Pp(),r=n?.[e];return r&&r.items&&r.items[t]||null},bp=e=>Op(e)?Fg()?.getState().containers[e]?.items:null,vp=e=>Op(e)&&Fg()?.getState().containers[e]?.accessedOrder||[],xp=e=>Op(e)&&vp(e)?.length>0||!1,wp=(e,t,n)=>{if(!Op(e)||!Op(t))return!1;const r=Pp(),s=r?.[e],a=s&&s.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},Mp=(e,t,n)=>{if(!Op(e)||!Op(t))return null;const r=Pp(),s=r?.[e],a=s&&s.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},Lp=(e,t)=>{if(e&&t)for(const s of Object.keys(t))if(n=e,r=t[s].key,n?.toLowerCase()===r?.toLowerCase())return t[s];var n,r;return null},Fp=e=>{if(!Op(e))return null;const t=Pp()??{};for(const n of Object.keys(t))if(t[n]){const r=t[n].items??null,s=Lp(e,r);if(s)return s}return null},Up=(e,t)=>{if(!Op(e)||!Op(t))return!1;const n=Pp();return n&&Object.hasOwn(n,`${e}/${t}`)},jp=(e,t)=>{if(!Op(e)||!Op(t))return null;const n=Pp(),r=n?.[`${e}/${t}`];return r&&r.type},kp=e=>{if(!Op(e))return null;let t=null;const n=Pp();if(n&&n[e]){const r=n[e],{accessedOrder:s}=r;t=s&&s.length>0?s[s.length-1]:null}return t},Vp=(e,t,n)=>{if(!Op(e)||!Op(t))return!1;const r=Mp(e,t,n);return!!r&&r===kp(e)},$p=(e,t)=>{let n=null;const r=Pp();if(!r)return null;for(const s of Object.keys(r))if(r[s].items){const a=r[s].items[e];if(n=a?a[t]:null,n)break}return n},Bp=e=>Op(e)?$p(e,"context"):null,Gp=e=>{if(!Op(e))return null;let t=null;const n=Pp();if(n&&n[e]){const r=n[e],{accessedOrder:s}=r,a=s&&s.length>0?s[s.length-1]:null;t=Bp(a)}return t},Wp=e=>{if(!Op(e))return[];const t=e.endsWith("/")?e:`${e}/`;let n=[],r=!1;const s=Pp();if(!s)return[];const a=n=>{const s=[];return Object.keys(n).forEach((n=>{n.startsWith(t)&&n!==t&&s.push(n),n===e&&(r=!0)})),s};for(const e of Object.keys(s))if(s[e].items){const t=a(s[e].items);t&&t.length>0&&(n=n.concat(t)),n=n.sort()}return r?n:[]},Hp=e=>{if(!Op(e))return[];const t=[],n=Pp();if(!n)return[];for(const r of Object.keys(n))r.startsWith(e)&&r!==e&&t.push(r);return t},qp=e=>{if(!Op(e))return[];const t=[],n=Pp();if(!n)return[];for(const r of Object.keys(n))if(r.startsWith(e)&&r!==e){(vp(r)||[]).forEach((n=>{Bp(n)!==e&&t.push(Bp(n))}))}return t},zp=e=>{const t=[...qp(e),e],n=[],r=Fg()?.getState().data||{};return t.forEach((e=>{Object.hasOwn(r,`${e}/${G.SUGGESTION}`)&&n.push(`${e}/${G.SUGGESTION}`)})),n},Yp=e=>Op(e)?e&&Dp(e)&&Dp(e).type===Tp.SINGLE:null,Kp=e=>Op(e)?e&&Dp(e)&&Dp(e).type===Tp.MULTIPLE:null,Jp=e=>Op(e)&&Dp(e)&&Dp(e).items&&Object.keys(Dp(e)?.items).length>0||!1,Xp=e=>e&&Sp[e]?Sp[e]:Sp.defaultLimit,Qp=(e,t=Sp.defaultLimit)=>{Op(e)&&(Sp[e]=t)},Zp=e=>{if(!Op(e))return!1;let t=!1;const n=Dp(e),{items:r={}}=n,s=Object.keys(r),a=Xp(e);return s&&s.length>0&&s.length>=a&&(t=!0),t},eh=e=>{if(!e||!Op(e.name)||!Op(e.context))return null;const t=e?.name,n=Dp(`${e?.context}/${t}`),r=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map((e=>n?.items[`${e}`]?.context))||[],s=Hp(`${G.APP.APP}/${G.PREVIEW}`),a=qp(`${G.APP.APP}/${G.PREVIEW}`);return{context:e?.context,name:t,containerItems:[...r,...a],childContainers:s}},th=e=>{if(!Op(e))return!1;const t=Bp(e);return Ip(t)||pl(e)},nh=e=>{if(!Op(e))return null;let t;const n=Dp(e),{accessedOrder:r=[]}=n;for(let e=0;e<r.length;e+=1){const n=r[e];if(!th(n)){t=n;break}}return t},rh=e=>{if(!Op(e))return null;const{containers:t}=Fg()?.getState()||{};if(t)for(const n of Object.keys(t))if(t[n]?.accessedOrder?.includes(e))return n;const n=e.lastIndexOf(G.UNDERSCORE_STRING);return e.slice(0,n)},sh=(e,t={})=>{if(!Op(e))return Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));const n=rh(e),r=Bp(e),{skipDirtyCheck:s}=t;let a=!0,o=[];if(th(e)&&!s&&(a=window.confirm(Hh().getLocaleValue(lp,"Messages"))),a){const{accessedOrder:s=[],items:a={},type:i}=Dp(n);o=s.filter((t=>t!==e));const c=o[o.length-1],l=a[c]||{},{semanticURL:u=G.FORWARD_SLASH_STRING,context:d}=l;o.length>0&&u&&u!==G.FORWARD_SLASH_STRING?um({directUrlUpdation:!0,semanticURL:u,options:{containerItemID:c,context:d}}):um({directUrlUpdation:!0,semanticURL:G.FORWARD_SLASH_STRING,options:{}});Ug(vf({containerItemID:e,context:r,target:n,containerInfo:{newAccessedOrder:o,containerType:i},...void 0!==t.eventName?{eventName:t.eventName}:{}}))}return Promise.resolve({newAccessedOrder:o,removeItem:a})},ah=(e,t,n,r)=>{const s="root",a=J(t,s,!0),o=wt(t,s),i={data:n,context:r?"app":a},c=[Ef({root:e,containerItemID:a,context:r?"app":a,target:o,containerName:t})];c.push(df(i)),Ug(c)},oh=(e,t,n)=>{let r=vp(e);r=r.filter((e=>e!==t));let s=!1;for(let e=0;e<r.length;e+=1){if(Bp(r[e])===n){s=!0;break}}return s},ih=e=>{if(!Op(e))return!1;const t=Pp(),n=Bp(e),r=t?Object.keys(t):[];let s=!1;for(let t=0;t<r.length&&(s=oh(r[t],e,n),!s);t+=1);return s},ch=e=>{Array.isArray(e)||(e=[e]);const t=Pp()||{};return e.map((e=>{const n=rh(e);return ef.getIn(t,[n,"items",e,"transientItems"])||[]})).flat()},lh=e=>{const{transientItemID:t,data:n,options:r}=e,s=ef.deepClone(Fg()?.getState().data[t]);r?.reset&&ef.iterateLeafNodes(s,(e=>{"classID"!==e[e.length-1]&&ef.setIn(s,e,"")})),Ug(_f({transientItemID:t,data:ef.mergeDeep(n,s)}))},uh=e=>{const{transientItemID:t,data:n}=e;Ug(Sf({transientItemID:t,data:n}))},dh=e=>{const t=ef.deepClone(Fg()?.getState().data[e]);ef.iterateLeafNodes(t,(e=>{"classID"!==e[e.length-1]&&ef.setIn(t,e,"")})),Ug(Cf({transientItemID:e,data:t}))},ph=e=>{const t=ef.deepClone(Fg()?.getState().data[e]);ef.iterateLeafNodes(t,(e=>ef.setIn(t,e,""))),Ug(Tf({transientItemID:e,data:t}))};class hh{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 gh=()=>hh,fh=e=>{const t={containerName:e};t.childContainers=Hp(e),Ug({type:$e,payload:t})},mh=(e,t)=>{const n=Wp(e),{key:r}=Rp(rh(e),e),s=[];n.forEach((e=>{const{key:n}=Rp(rh(e),e);if(n===r){const n={data:{caseInfo:{headers:{etag:t}}},target:rh(e),context:e};s.push({type:Ae,payload:n})}})),s.length&&Ug(s)},Ih=(e,t)=>{const n=[],r={data:{caseInfo:{headers:{etag:t}}},target:rh(e),context:e};n.push({type:Ae,payload:r}),n.length&&Ug(n)},yh=()=>Vh.isPortalLoaded?"app":"root",Eh=()=>Cp,Ah=(e,t)=>{const n={data:{caseInfo:{lastUpdateTime:t}},target:rh(e),context:e};Ug({type:Ae,payload:n})},_h=(e,t)=>{const n=Mp(e,t),r=Mp(`${n}/workarea`,t);return Bp(r)},Ch=e=>Op(e)?$p(e,"parentContext"):null,Sh=e=>{const{accessedOrder:t}=e;return t&&t.length>0?t[t.length-1]:""},Th=e=>{if(e&&"string"==typeof e){const t=e.split("/");return t.pop(),t.join("/")}return null},Nh=()=>uu,Ph=/{(.*?)}/i,Oh=/{(.*?)}/g,Dh=e=>null!==e.match(Ph),Rh=e=>(e&&(e.startsWith("/")&&(e=e.substring(1,e.length)),e.endsWith("/")&&(e=e.substring(0,e.length-1))),e),bh=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`}},vh=()=>Rh(window.location.pathname),xh=()=>Rh(window.location.pathname+window.location.search),wh=(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)}},Mh=e=>{if(e.indexOf("?")>0){const[t,n]=e.split("?"),r=new URLSearchParams(n),s=new Map;for(const[e,t]of r)"portal"!==e&&"noPortal"!==e&&"debug"!==e&&"activeTab"!==e&&s.set(e,t);const a=new URLSearchParams(s).toString();return a?`${t}?${a}`:t}return e},Lh=(e,t)=>e.includes("/assignments")?((e,t)=>{const n=e.split("/"),r=n.indexOf("assignments"),s=n.slice(r-2).join("/"),a=n[n.length-1],o=nm(Ye,{assignmentID:a});return{routeEndpoint:o?.restApi,requestType:o?.reqType,payload:{assignmentID:a},options:t,routeKey:rt,urlPath:s}})(e,t):jh.getEndPointInfo(e),Fh=()=>{const e=Vh.environmentInfoObject?.pyExecutionRuntimeName;return"Infinity"===e};const Uh=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=>{Dh(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=()=>Rh(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>Rh(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("/")&&Fh()&&"PREVIEW"!==Vh.getRenderingMode()&&this.setDefaultClassName(""),Rh(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="",r={caseClassName:"",caseID:"",RemoteSystemID:void 0,page:""};return Object.values(this.appRoutes).forEach((t=>{t.payload?.page===e?(n=t.routeKey,r={...t.payload}):this.appRoutes[e]&&(n=this.appRoutes[e].routeKey,r={...this.appRoutes[e].payload})})),{routeKey:n,payload:r}}transformRemoteCasePayload(e){const{caseClassName:t,caseID:n}=e;if(!q.isRemoteCase(t))return e;const{RemoteClassGroup:r,RemoteSystemID:s}=q.getRemoteCase(t);return{...e,caseID:n?.replace(t,r?.toUpperCase()),RemoteSystemID:s}}getEndPointInfo=e=>{e=this.stripIgnoredParams(e);const t=Fh();let n=this.processUrl(e,!0),r=this._getMatchedRouteInRoutingTable(n,t?this.defaultClassName:void 0);r||(n=this.processUrl(this.defaultViewUrlPath,!t),r=this._getMatchedRouteInRoutingTable(n,t?this.defaultClassName:void 0)||"");const{routeKey:s,payload:a}=this.getRouteDetails(r,t);if(!this.appRoutesMeta?.[s]?.restApi)return null;const{reqType:o,endPoint:i,params:c}=this.appRoutesMeta[s].restApi,l={routeKey:s,requestType:o,routeEndpoint:i,payload:{...c,...this.transformRemoteCasePayload(a)}};return this._resolveRoute(l,this.processUrl(e,!1),r)};getSemanticURL(e,t,n){return this.buildSemanticURL(e,t,n)}getResolvedSemanticURL(e,t,n={}){const r=this.getSemanticURL(e,t,n);let s=r;if(Dh(r)){const e=r.match(Oh);e?.forEach((e=>{const t=this._getDynamicKeyName(e);n[t]&&(s=s.replace(e,n[t]))}))}const a=lm(s),o=new URL(a);return this.isDefaultPortal()||this.getPortalName()&&!o.searchParams.toString().includes("portal=")&&o.searchParams.append("portal",this.getPortalName()),o.toString()}buildDocumentTitle(e,t,n){const r=n??"";return e&&t?`${e} (${t}) - ${r}`:r}updateSemanticURLAndDocumentTitle(e){const{key:t,actionName:n,caseClassName:r,isRemoteCase:s,name:a}=e;if(s&&!r)return;const o=this.getSemanticURL(n,{caseClassName:r}).replace(/{.+?}/,String(Mc(t))),i=`${B.APP.APP}${G.FORWARD_SLASH_STRING}${B.PRIMARY}`,c={semanticURL:o,directUrlUpdation:!0,options:{acName:i,context:Gp(i)}},l=vh();o&&!l.includes(o)&&cm(c);const u=t.substring(t.lastIndexOf(" ")+1),d=Vh.environmentInfoObject?.pxApplication?.pyLabel,p=this.buildDocumentTitle(a,u,d);Im(p)}buildSemanticURL(e,t,n){const{urlPattern:r}=this.appRoutesMeta?.[e]||{},s=r?.split("/").length,a=r?.split("/");this.setDefaultClassName(t?.pageClass||this.defaultClassName);const o=Object.keys(this.appRoutes).filter((e=>s===e.split("/").length)).filter((e=>{const t=e.split("?")[0].split("/");return a?.every(((e,n)=>e.startsWith("{")||e===t[n]))}));if(1===o.length)return this._getQueryParamsResolvedURL(o[0],n);if(0===Object.keys(t).length)return"";const i=o.find((e=>{const r=this.appRoutes[e].payload,s={...n};delete s.dataViewName,delete s.dataContext;const a=r.dataViewKeys||r.dataContextParameters||{},o=Object.keys(t).every((e=>t[e]===r[e]));return!!o&&(ef.isEmpty(a)||ef.isEmpty(s)?o:Object.keys(s).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[r,s]=e.includes("?")?e.split("?"):[e];if(s){const e={};for(const[n,r]of Object.entries(t))e[n.toLowerCase()]=r;const a=new URLSearchParams(s),o={};for(const[r,s]of a.entries())if("string"==typeof s&&Dh(s)){const a=this._getDynamicKeyName(s);o[r]=n?t[a]||e[a.toLowerCase()]:t[a]}else"string"==typeof s&&(o[r]=s);return`${r}?${new URLSearchParams(o).toString()}`}return r}_getQueryParamsObject(e){const t={},n=new URLSearchParams(e);for(const[e,r]of n.entries())t[e]=r;return t}getRestEndPoint(e,t){try{return this._buildRestApi(e,t)}catch(e){return console.error(e),null}}_buildRestApi(e,t){if(e&&this.appRoutesMeta?.[e]){const{reqType:n,body:r}=this.appRoutesMeta[e].restApi;let{endPoint:s}=this.appRoutesMeta[e].restApi;t?.params&&t.params.pageName&&(s=`${s}&pageName=${t.params.pageName}`);const a=s.match(Oh);if(a)for(let e=0;e<a.length;e+=1){const n=a[e].replace("{","").replace("}",""),r=new RegExp(a[e],"g");s=s.replace(r,t?.[n])}if(r){let e={};return Object.keys(r).forEach((n=>{this._isSpecialInstruction(n)&&(e={...e,...this._processInstruction(n,r[n],t)})})),{restApi:s,reqType:n,body:e}}return{restApi:s,reqType:n}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,t,n){const r={};return"@COPY"===e&&t.forEach((e=>{r[e]=n[e]})),r}doesRestApiExist(e){return!(!this.appRoutesMeta||!this.appRoutesMeta[e])}_resolveRoute=(e,t,n)=>{const r=[],[s,a]=t.includes("?")?t.split("?"):[t],[o,i]=n.includes("?")?n.split("?"):[n],c=s.split("/"),l=o.split("/"),u={};for(let e=0;e<l.length;e+=1)if(r[e]=l[e],Dh(l[e])){u[this._getDynamicKeyName(l[e])]=c[e],r[e]=c[e]}const d=this._getQueryParamsObject(i),p=this._getQueryParamsObject(a),h={};for(const[e,t]of Object.entries(p))h[e.toLowerCase()]=t;for(const e of Object.keys(d))Dh(d[e])?u[e]=p[e]||h[e.toLowerCase()]:u[e]=d[e];let g;a&&(g=this._getQueryParamsResolvedURL(n,p,!0));const f=this._resolvePayload(e,u,n);return{...this._resolveRouteEndPoint(f,n),urlPath:g||r.join("/")}};_resolveRouteEndPoint=(e,t)=>{let{routeEndpoint:n}=e;if(!Dh(n))return e;const r={};if(r[t]=e,void 0!==e.payload){const t=n.match(Oh);for(let s=0;s<t.length;s+=1){const a=t[s],o=this._getDynamicKeyName(a);if(void 0!==e.payload[o]){const t=e.payload[o];n=n.replace(a,t)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${o}} in routeEndpoint- ${o} is missing in payload`,r)}}else this._sendWarningAndErrorMessages("Unable to resolve dynamic token(s) in routeEndpoint- payload is missing in routing table for-",r);return{...e,routeEndpoint:n}};_resolvePayload=(e,t,n)=>{if(void 0===e.payload)return e;const r={...e.payload,...this._resolvePayloadRecursive(e.payload,t)};return{...e,payload:r}};_resolvePayloadRecursive(e,t){const n={};for(const r of Object.keys(e)){let s=e[r];if("string"==typeof s&&Dh(s)){const e=s.match(Oh);for(let n=0;n<e.length;n+=1){const r=e[n],a=this._getDynamicKeyName(r);if(void 0!==t[a]){const e=t[a];s=s.replace(r,e)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${a}} in payload- {${a}} is missing in semantic url construct`)}n[r]=s}else"object"==typeof s&&(n[r]=this._resolvePayloadRecursive(s,t))}return n}_getMatchedRouteInRoutingTable=(e,t)=>{const[n]=e.includes("?")?e.split("?"):[e];let r=this._findMatchedRouteInStaticList(n,t);return void 0!==r?r:(r=this._findMatchedRouteInDynamicList(e),void 0!==r?r:void 0)};_findMatchedRouteInStaticList=(e,t)=>{if(!this.staticRoutesList||!e)return;const n=e.toLowerCase(),r=t?.toLowerCase();if(Fh()){const e=this._findMatchingRouteByClass(n,r);if(!e)return;const t=Object.values(e)[0],s=t?.payload?.page||"";return this.setStaticRoutePage(s),Object.keys(e)[0]}return this._findInStaticList(n)};_findMatchingRouteByClass=(e,t)=>{if(this.staticRoutesList)return this.staticRoutesList.find((n=>Object.entries(n).some((([n,r])=>{if(!r)return!1;const s=r.payload?.page?.toLowerCase(),a=r.payload?.pageClass?.toLowerCase(),o=s===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],r=t.split("/");return this.dynamicRoutesList?.find((e=>{const[t,s]=e.includes("?")?e.split("?"):[e],a=t.split("/");if(a.length!==r.length)return!1;let o=0;for(o=0;o<a.length;o+=1){const e=a[o].toLowerCase();if(!Dh(e)&&e!==r[o]&&bh(e)!==r[o])return!1}if(s){const e=new URLSearchParams(n.toLowerCase()),t=new URLSearchParams(s.toLowerCase()),r=new Set,a=new Set,o=/\{[a-zA-Z]+\}/;for(const t of e.keys())r.add(t);for(const e of t.keys())a.add(e);if(a.size!==r.size)return!1;for(const n of r){if(!a.has(n))return!1;const r=t.get(n);if(e.get(n)!==r&&!o.test(r))return!1}}return!0}))};_sendWarningAndErrorMessages=(e,t)=>{wh(e,t,"warning"),wh("Error in Generated Routing Table",null,"error"),wh("Back | Forward for this page may NOT work as intended",null,"warning"),wh("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},jh=Uh;const kh=new class{constructor(){this.languagePacks=[]}getLocalizationBundles(e=Vh.getLocale()){return(this.languagePacks.find((t=>t.pyLangCode===e))?.pyBundles??this.languagePacks.find((e=>e.pyLangCode===G.DEFAULT.toUpperCase()))?.pyBundles??[]).sort(((e,t)=>e.pyOrder-t.pyOrder))}async loadLocaleBundle(e){const t=[];e.forEach((e=>{t.push(Gu.getPageDataAsync("D_pzBundlesForLocalization","",{locale:e,onlyApp:"false"},{invalidateCache:!0}))}));const 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 Vh=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"}setEnvironmentInfo(e){this.environmentInfoObject=e;const t=this.environmentInfoObject?.features||ef.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...t,granularUIRefresh:t.granularUIRefresh||t.pyEnableGranularUIRefresh||!1},kh.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 jh.getPortalName()}getApplicationName(){return this.environmentInfoObject?.pxApplication?.pyRuleName}getUseLocale(){return this.environmentInfoObject?.pxLocale?.pyUseLocale}getAccessGroup(){return this.environmentInfoObject?.pxOperator?.pyAccessGroup}getTimeZone(){return this.environmentInfoObject?.pxLocale?.pyTimeZone?.trim()||void 0}getTheme(){return this.themeOverrides}setTheme(e){return this.themeOverrides=e,this.themeOverrides}setIsWebEmbed(e){return this.isWebEmbed=e,this.isWebEmbed}isWSSPortal(){return this.environmentInfoObject?.pyPortalTemplate===G.PORTAL_TYPE.WSS}getBrandingInfo(){return this.brandingInfo}setBrandingInfo(e){return this.brandingInfo=e,this.brandingInfo}getCookieComplianceMethod(){return this.cookieComplianceMethod}setCookieComplianceMethod(e){this.cookieComplianceMethod=e}setLocale(e){const t=e.replaceAll("-","_").split("_").slice(0,2);this.locale=t.join("-"),this.environmentInfoObject?.pxLocale&&(this.environmentInfoObject.pxLocale.pyUseLocale=this.locale)}getLocale=()=>this.locale;getEnvironmentKeys(){return Object.keys(G.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}shouldUseURLParams(){return"FULL_PORTAL"===this.environmentInfoObject?.renderingMode&&this.getFeatureMap()?.pyUseURLParams}getBuiltOnAppNames(){return this.environmentInfoObject?.pxApplication?.pyBuiltOnApplications}setPreviewMode(){Po.setPreviewMode()}setDefaultCasePage(e){this.pageName=e}getDefaultCasePage(){return this.pageName}disableAssignmentHeader(e){this.isAssignmentHeaderHidden=e}isAssignmentHeaderDisabled(){return this.isAssignmentHeaderHidden}getDefaultPortal(){return this.environmentInfoObject?.pxOperator?.pyDefaultPortal}updateFeatureMap(e){const t=this.environmentInfoObject?.features;return this.environmentInfoObject&&e&&(this.environmentInfoObject?.features?this.environmentInfoObject.features={...t,...e}:this.environmentInfoObject.features={...e}),this.getFeatureMap()}getFeatureMap(){return this.environmentInfoObject?.features||{}}setKeyMapping(e){return this.KeyMapping=e,this.KeyMapping}getKeyMapping(e){const t=this.KeyMapping[e];return void 0!==t?t:null}setCoexistenceMeta(e){return e&&(this.coexistenceMeta=e),this.getCoexistenceMeta()}getCoexistenceMeta(){return this.coexistenceMeta}isCoexistenceAppOfType(e){return!(!this.coexistenceMeta.isCoexistence||this.coexistenceMeta.appType!==e)}getCaseTypeList(){return this.environmentInfoObject&&this.environmentInfoObject?.pyCaseTypeList||[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}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 kh.getLocalizationBundles(e)}getAvailableLocalePacks(){return this.getFeatureMap()?.availableLanguagePacks||void 0}getIsExtraCallRequiredForDefaultHome(){return this.isExtraCallRequiredForDefaultHome}setIsExtraCallRequiredForDefaultHome(e){this.isExtraCallRequiredForDefaultHome=e}getInactivityTimeout(){const e=this.environmentInfoObject?.pxOperator?.pyAuthenticationTimeout;return e?Number(e):e}isUnifiedObject(){return this.environmentInfoObject?.features?.isUnifiedObject||!1}getRuntime(){return"undefined"!=typeof window&&window.document?"Browser":"Native"}},$h=e=>"fulfilled"===e.status,Bh=async(e=Vh.getLocale())=>{try{await(async e=>{const t=Vh.getAvailableLocalePacks(),n=Vh.getLocalizationBundles(e);let r;if(e&&t&&t.includes(e)?r=[Ki("getLocalizationPack",{queryPayload:{locale:e}})]:n.length>0&&(r=n.map((e=>Ki("getLocalizationPack",{queryPayload:{version:e.pyBundleVersion,bundle:e.pyBundleName}})))),!r||0===r.length)return;const s=200,a=201;(await Promise.allSettled(r)).filter($h).forEach((({value:t})=>{if([s,a].includes(t.status)&&t.data){const n=t.data,r=cg(e??"en-US");Object.keys(n).forEach((e=>{r.setLocaleForRule(n[e],e)}))}}))})(e)}catch(e){console.warn(e)}};const Gh=class{static regex=/\{@P[^}]*\s*:\s*[^}]*\}/g;static subRegex=/:'[a-zA-Z0-9!@#$&()\\-`.+,/\s"]*'/;static keyMap={};static formatLocaleKey(e){let t=0,n="";for(;t<=e.length;){const r=e.indexOf("{@P ",t);if(-1===r){n+=e.substring(t,e.length);break}n+=e.substring(t,r);const s=e.indexOf("}",t),a=e.substring(r,s+1),[o,i]=this.getKeyAndValue(a);this.addKeyToMap(o,i),n+=`${a.split(":")[0]}}`,t=s+1}return n}static getKeyAndValue(e){const t=e.indexOf(":"),n=e.indexOf("}");return[`${e.substring(0,t)}}`,e.substring(t+1,n)]}static addKeyToMap(e,t){this.keyMap[e]=t}static replaceWithValue(e){let t=0,n="";for(;t<=e.length;){const r=e.indexOf("{@P ",t);if(-1===r){n+=e.substring(t,e.length);break}n+=e.substring(t,r);const s=e.indexOf("}",t),a=e.substring(r,s+1);n+=this.keyMap[a],t=s+1}return n}};class Wh{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,r=t.toUpperCase();r.startsWith("@BASECLASS!DATAPAGE!")&&r.split(/[!#]/).length<4?Object.entries(n).forEach((([e,t])=>{null!==t&&"object"==typeof t&&"fields"in t&&this.updateLocaleStore(t,`${r}#${e}`.toUpperCase())})):"GENERIC!GENERICFIELDS"===r?Object.entries(n).forEach((([e,t])=>{null!==t&&"object"==typeof t&&this.sanitizeLocaleField(t,e.toUpperCase())})):this.sanitizeLocaleField(n,r)};updateLocaleStore=(e,t)=>{const n=e.fields||e,r=this.localeStore[t];r?ef.mergeDeep(n,r):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,r){const s=this.#i(n,t),a=this.#c(e);a&&(e=Gh.formatLocaleKey(e));const o=s?this.localeStore[s.toUpperCase()]??{}:{},i=r?this.localeStore[r.toUpperCase()]??{}:{};return"MESSAGES"===n?.toUpperCase()&&"string"==typeof e?this.getLocalizedErrorMessage(o,e)||e:a?Gh.replaceWithValue(o[e]||i[e]||e):o[e]||i[e]||e}#i(e,t){return e?.toUpperCase().startsWith("@BASECLASS!DATAPAGE!")?t?`${e}#${t}`:e:e||t}getParagraphLocaleValue(e,t){const n=`${e}!${G.PARAGRAPH}!${t}`,r=this.localeStore[n.toUpperCase()];return r?{category:r.category,content:decodeURIComponent(atob(r.content).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join(""))}:null}getPortalLocaleReference(e){return 2!==Vh.getLocalizationVersion()?"":e?`PORTAL!${e}`.toUpperCase():`PORTAL!${Vh.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e){return e?`CASE!${e}`.toUpperCase():null}getLocalizationVersion(){return 2}async getLocaleJsons(e){if(!await this.isCurrentLocalePackAvailable())return[];const t=Vh.getUseLocale(),n=[],r=PCore.getLocaleUtils().localeStore;if((e=(e=e.filter((e=>!r[e]))).map((e=>e.toUpperCase()))).length>0){const r=e.map((e=>({localeRuleKey:e,promise:sc.getSvcLocale(t,`${e}.json`)}))),s=await Promise.allSettled(r.map((e=>e.promise)));await Promise.all(s.map((async(e,t)=>{if("fulfilled"===e.status){const s=r[t];let a;try{a=await e.value.json()}catch{a=null}a&&n.push({localeRuleKey:s.localeRuleKey,jsonData:a})}})))}return n}async loadLocaleResources(e){await kh.loadLocaleBundle(e),e.forEach((async e=>{await Bh(e)}))}setTimezone(e){this.timezone=e}getTimeZoneInUse(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}matchPatternWithText(e,t){let n=t;const r=[];for(let t=0;t<e.length;){const s=e[t];if(0!==s.length){const e=n.indexOf(s);if(-1===e)return null;if(t>0){const t=n.slice(0,e);r.push(t)}n=n.slice(e+s.length)}t+=1}return n&&r.push(n),r}getLocalizedErrorMessage(e,t){let n="";if(e[t])return e[t];for(const r of Object.keys(e)){const s=r.split(/\{\d+\}/),a=this.matchPatternWithText(s,t);if(a){const t=e[r];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=Vh.getLocale();return this.availableLangPacks||(this.availableLangPacks=await sc.getSvcAvailableLocales()),e&&this.availableLangPacks.includes(e)}getBaseComponentLabels=()=>this.getLocaleForRule("COSMOSFIELDS");#c(e){let t=!1;return e&&"string"==typeof e&&(t=e.includes("@P ")),t}}const Hh=e=>{const t=e??Vh.getLocale()??"en-US";return cg(t)};mn.registerHandler("@L",((e,t)=>t.getLocalizationService(t.getLocaleRuleName()).getLocalizedText(e))),mn.registerHandler("@P",((e,t,n)=>t?t.getValue(e):sf.getLitePropertyValue(n))),mn.registerHandler("@E",((e,t,n)=>{try{const r=nn(e),s=rn(r);return sn(s,t,n)}catch(e){}return!0})),mn.registerHandler("@W",((e,t,n)=>{let r;if(t)r=t.getContextDataValue(`.${G.SUMMARY_OF_WHEN_CONDITIONS}.${e}`);else{const{pageReference:t,context:s}=n??{};r=Bg(t,`.${G.SUMMARY_OF_WHEN_CONDITIONS}.${e}`,s)}return!0===r||"true"===r})),mn.registerHandler("@ASSOCIATED",((e,t)=>{let n={};const r=[];let s="",a="";const o=t.getPageReference();if(e.startsWith(".")){s=`${o}.${e.substring(1)}`;const r=e.split(".").filter((e=>!!e));r.length>1&&(r.pop(),a=r.join(".")),n=t.getFieldMetadata(e.substring(1))}else n=t.getFieldMetadata(e),s=e;const i=n?.datasource?.tableType,c=n?.datasource?.mode===G.READONLY,l=n?.datasource?.name||"",u=t.getComponentConfig();if(u&&u.deferDatasource&&(u.datasourceMetadata=`@FIELD_META ${e}`,t.setStateProps({datasourceMetadata:u.datasourceMetadata}),i===G.DATA_PAGE))return null;if(i===G.DECISION||i===G.RULE_REFERENCE)return function(e,t){const n=In.getPropertyName(e?.propertyForDisplayText??""),r=In.getPropertyName(e?.propertyForValue??""),s=t.getContextDataValue(`.${G.SUMMARY_OF_EXPRESSIONS}.${e?.name}`)||[];return s?.map((e=>({key:e[r]||e[`.${r}`],value:e[n]||e[`.${n}`]})))}(n?.datasource,t);if(i!==G.DATA_PAGE){const e=t.getLocalizationService(n?.localeReference);return n?.datasource?.records?.map((t=>({key:t.key,value:e.getLocalizedText(t.value)})))}const d=In.getPropertyName(n?.datasource?.propertyForDisplayText),p=In.getPropertyName(n?.datasource?.propertyForValue),h=Array.isArray(n?.datasource?.parameters)?n?.datasource?.parameters:[],g=t.getContextName(),f=[];if(h.forEach((e=>{if(In.isProperty(e?.value)){let t=$g(`.${ef.getFullPropertyReference([a,In.getPropertyName(e.value)])}`,o,g);f.push(ef.getFullPropertyReference([o,a,In.getPropertyName(e?.value)])),null!=t&&""!==t||(t=G.NULL_STRING),r.push(t)}else r.push(e?.value||G.NULL_STRING)})),g){const e=gn.getContextObjectByName(g)||{};f.forEach((t=>{if(t in e){const n=e[t];e[t]=[...new Set([...n,s])]}else e[t]=[s]})),gn.addContextName(g,e)}const m=function(e,t,n,r){let s="",a=n;if(t.join(G.HASH_DELIMITER)&&(s=ef.getHashedString(t.join(G.HASH_DELIMITER)),a=n+G.UNDERSCORE_STRING+s),r){const e=kg(),t=e?e[n]?.[a]:{};return Array.isArray(t?.pxResults)?t.pxResults:[]}const o=e.getDataObject(),i=(o?.[n]||{})[a]||{};return Array.isArray(i?.pxResults)?i.pxResults:[]}(t,r,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}}))})),mn.registerHandler("@ROUTING_INFO",((e,t)=>Mt(t.getContainerName(),t.getContextName()))),mn.registerHandler("@ENV",((e,t)=>{switch(e){case G.ENV_INFO_KEYS.APPLICATION_NAME:return Vh.getApplicationName();case G.ENV_INFO_KEYS.ACCESS_GROUP:return Vh.getAccessGroup();case G.ENV_INFO_KEYS.USER_NAME:return Vh.getOperatorName();case G.ENV_INFO_KEYS.USER_ID:return Vh.getOperatorIdentifier();case G.ENV_INFO_KEYS.APPLICATION_DESC:return t.getLocalizationService("APP!APPLICATION").getLocalizedText(Vh.getApplicationLabel()||"");case G.ENV_INFO_KEYS.USER_IMAGE:return Vh.getOperatorImageInsKey();case G.ENV_INFO_KEYS.LOCALE:return Vh.getUseLocale();case G.ENV_INFO_KEYS.TIMEZONE:return Vh.getTimeZone();case G.ENV_INFO_KEYS.WORK_GROUP:return Vh.getOperatorWorkGroup();default:return e}})),mn.registerHandler("@DATASOURCE",((e,t)=>{const n=t.getSharedDataPageForReferenceList()||t.getValue(e)||[],r=t.getComponentConfig(),s=Object.keys(r).find((t=>r[t]?.source?.includes(e)));if(s){const{fields:e,copyAll:t,filterDownloadedFields:a}=r[s],o=[];return n.forEach((n=>{const r={};t||a?Object.keys(n).forEach((e=>{const t=In.getPropertyName(e);r[t]=n[t]})):Object.keys(e).forEach((t=>{const s=In.getPropertyName(e[t]);r[t]=n[s]})),o.push(r)})),o}return[]})),mn.registerHandler("@FIELD_META",((e,t)=>{let n,r={};if(r=e.startsWith(".")?t.getFieldMetadata(e.substring(1)):t.getFieldMetadata(e),r&&r.datasource&&r.datasource.parameters){let s="";const a=e.split(".").filter((e=>!!e));if(a.length>1&&(a.pop(),s=`.${a.join(".")}`),Array.isArray(r.datasource.parameters)){const e=[];r.datasource.parameters.forEach((n=>{const r={},{name:a,value:o}=n;r.name=a,"string"==typeof o&&o.startsWith("@P")?r.value=`@P ${s}${o.substring(3)}`:r.value=o,e.push(t.resolveConfigProps(r))})),n=e}else n=t.resolveConfigProps(r.datasource.parameters);r={...r,datasource:{...r.datasource,parameters:n}}}return r})),mn.registerHandler("@USER",((e,t,n={})=>{const r=t?.getValue(e)||sf.getLitePropertyValue(n,e),s=t?.getReferencedUser(r)||sf.getReferencedUser(r,n);return{userId:r,userName:s?s.UserName:null}})),mn.registerHandler("@ACTIVE_CASES",((e,t)=>fd.getOpenedCaseItems(`${t.getContextName()}/${t.getContainerName()}`))),mn.registerHandler("@LR",(e=>e)),mn.registerHandler("@CASE",((e,t)=>e===G.ID?t.getCaseInfo().getKey():e)),mn.registerHandler("@SHARED",(e=>Xc.getSharedState(e))),mn.registerHandler("@PARAGRAPH",((e,t)=>Id.processParagraph(e,t))),mn.registerHandler("@FILTERED_LIST",((e,t)=>{const n=e.substring(1,e.indexOf("[")),r=e.substring(e.indexOf("]")+2),s=e.substring(e.indexOf("[")+1,e.indexOf("]"));if(!t)return null;const{useCustomContext:a}=t;let o;return ef.isEmpty(a)?o=t.getValue(`.${n}`):(o=a,o=ef.getIn(o,n)),o&&r.length>0?(s&&(o=o.filter((e=>an(s,e)))),o.map((e=>ef.getIn(e,r)))):null})),mn.registerHandler("@ADDRESS",((e,t)=>{const n=t.getValue(e)?.pyCountry;return n?`pyAddressForm_${n}`:"pyAddressForm"})),mn.registerHandler("@DATATYPE",((e,t)=>t.getValue(e))),mn.registerHandler("@ATTACHMENT",((e,t,n)=>{let r;return r=t?t.getValue(e):sf.getLitePropertyValue(n),$i.prepareAttachmentData(r)}));const qh=e=>{const t=e.lastIndexOf(".");return t<0?e:e.slice(t+1)};mn.registerHandler("@FL",((e,t)=>{const n=(e=>e.startsWith(".")?e.slice(1):e)(e),r=t.getFieldMetadata(n);return r&&r.label?t.getLocalizationService(r.localeReference).getLocalizedText(r.label):qh(n)})),mn.registerHandler("@DEFERRED",((e,t)=>{const n=t.getFieldMetadata(e);return n?.isDeclarativeTarget?{isDeferred:!0,propertyName:e}:t.getValue(e)})),mn.registerHandler("@GENAICOACH",((e,t)=>Sg(e,t.getCurrentClassID()))),mn.registerHandler("@AIAGENT",((e,t)=>{const n=Tg(e,t.getCurrentClassID());if(n)return n;const r=t.getComponentConfig();if(r){const n=r?.coaches?.find((t=>t?.config?.coach?.substring(9)===e&&t?.config?.ruleNamespace))?.config;if(n?.label){const r={label:n.label};t.resolveConfigProps({label:n.label},r);const s=r.label;return{insName:`${n.ruleNamespace}__${e}`,label:t.getLocalizedValue(s),type:"agent"}}}return null})),mn.registerHandler("@REFRESH",((e,t)=>{const n=t.getCaseInfo().getKey(),r=t.getContextName(),s=t.getPageReference();nd.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),n,"",s,{autoDetectRefresh:!0,preserveClientChanges:!1,refreshFor:`${s.replace("caseInfo.content","")}${e}`,resetForm:!0}),`${s}${e}`,`${r}/${s}`,r)})),mn.registerHandler("@DW",((e,t,n)=>{let r;const s=`${G.CONTEXT_DATA}.${G.SUMMARY_OF_DYNAMIC_WHENS}.${e}`;if(t)r=t.getValue(s);else{const{context:e}=n??{};r=$g(s,null,e)}return!0===r||"true"===r}));const zh={},Yh={},Kh={},Jh={},Xh={},Qh={},Zh={},eg={},tg={},ng={},rg={},sg={},ag={},og=(e={},t={})=>{0!==Object.keys(t).length?Object.keys(e).forEach((n=>{const r=e[n],s=t[n];s?((e,t,n,r)=>{const s=Array.isArray(n)?n:[n];(Array.isArray(r)?r:[r]).forEach((e=>{const t=s.findIndex((t=>t.classID===e.classID));if(-1===t)s.push(e);else{const n={isDeclarativeTarget:!1},r={...s[t],...n,...e};s[t]=r}})),t[e]=1===s.length?s[0]:s})(n,t,s,r):t[n]=r})):ef.copy(e,t)},ig=(e,t="")=>{if(!e)return null;const n=Jh[e];if(!n)return null;if(!t)return ef.deepClone(n);let r;return r=Array.isArray(n)?n.find((e=>e.classID.toLowerCase()===t.toLowerCase()))||null:n.classID.toLowerCase()===t.toLowerCase()||("Page"===n.type||"Page List"===n.type)&&n?.pageClass?.toLowerCase()===t.toLowerCase()?n:null,r?ef.deepClone(r):null},cg=e=>(sg[e]||(sg[e]=new Wh),sg[e]),lg=(e,t)=>(ag[e]||(ag[e]=t()),ag[e]),ug=(e,t,n,r=[])=>{if(!t||!e)return null;if(!e.includes(".")){let s;const a=ig(e,t);return r.length&&(s=r.join(".")),{...a,embeddedType:n,category:s}}const[s,...a]=e.split("."),o=ig(s,t);return o&&r.push(o.label),ug(a.join("."),o?.pageClass,o?.type,r)},dg=e=>{og(e,Yh)},pg=e=>{og(e,Kh)},hg=e=>{(e=>{e.views&&og(e.views,Yh),e.navigations&&og(e.navigations,Kh),e.personalizations&&og(e.personalizations,Qh),e.insights&&og(e.insights,Zh),e.paragraphs&&og(e.paragraphs,zh),e.dataTypes&&og(e.dataTypes,eg),e.datapages&&og(e.datapages,tg),e.genAICoaches&&og(e.genAICoaches,ng),e.AIAgents&&og(e.AIAgents,rg)})(e),(e=>{const t=e.fields||{};Object.keys(t).forEach((n=>{const r=t[n];if(Array.isArray(r)){if(r.forEach((t=>{e.datapages&&t.datasource&&"DataPage"===t.datasource.tableType&&(t.datasource.mode=e.datapages?.[t.datasource.name].mode);const r=Nd(Cd,n,t.definedOnClassID??t.classID);t.localeReference=r})),1===r.length){const[e]=r;t[n]=e}}else e.datapages&&r?.datasource&&"DataPage"===r.datasource.tableType&&(r.datasource.mode=e.datapages[r.datasource.name].mode)}))})(e);const{datapages:t={}}=e;Object.keys(t).forEach((e=>{Xh[e]=t[e]})),og(e.fields,Jh)},gg=e=>Yh[e],fg=(e,t)=>{const n=Yh[e];return Array.isArray(n)?n.some((e=>e.classID===t)):n?.classID===t},mg=e=>Kh[e],Ig=e=>e in Xh?Xh[e]:null,yg=e=>e in Qh?Qh[e]:null,Eg=e=>e in Zh?Zh[e]:null,Ag=e=>{const t={};return Object.keys(Jh).forEach((n=>{const r=Jh[n];let s;Array.isArray(r)?s=r.find((t=>e===t.classID)):e===r.classID&&(s=r),s&&(t[n]=ef.deepClone(s))})),t},_g=(e,t)=>{const n=ig(e,t),r=n?.datasource?.parameters;return r?ef.deepClone(r):null},Cg=(e,t)=>{let n=null;const r=zh[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?ef.deepClone(n):null},Sg=(e,t)=>{let n=null;const r=ng[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?ef.deepClone(n):null},Tg=(e,t)=>{let n=null;const r=rg[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?ef.deepClone(n):null},Ng=e=>{if(e in eg){const{savableDataPage:t}=eg[e];return t}return null},Pg=e=>{const t=tg[e];if(!t)return null;const{classID:n,isAlternateKeyStorage:r,parameters:s}=t;if(r)return s.map((e=>({keyName:e.name,isAlternateKeyStorage:r,linkedField:e.linkedField})));const a=eg[n];return a?a.classKeys.map((e=>({keyName:e,isAlternateKeyStorage:r}))):[]},Og=e=>{if(e in eg){const{lookupDataPage:t}=eg[e];return t}return null},Dg=e=>{if(Object.hasOwn(eg,e)){const{lookupDataPageInfo:t}=eg[e];return t}return null},Rg=(e,t)=>{const n=e.split("."),r=n.pop(),s=new Vd({options:{pageReference:`${n.join(".")}`,context:t}}),a=ig(r,s.getCurrentClassID())?.additionalInformation;if(!a?.includes("@PARAGRAPH"))return a;const o=In.trimAnnotation(a);return Id.processParagraph(o,s)},bg=(e,t)=>{const n=e.split("."),r=n.pop(),s=new Vd({options:{pageReference:`${n.join(".")}`,context:t}}),a=ig(r,s.getCurrentClassID()),o={};return s._classID=s.getCurrentClassID(),s.resolveConfigProps(a,o),o};class vg{constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,t,n,r,s,a="singleRecord"){if(!e||!n||!r?.length)return;const o=n.startsWith(".")?`${t}.${n.substring(1)}`:n,i=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(t,n,s);r.forEach((e=>{if(!e)return;let t=e.startsWith(".")?e.substring(1):e;if(t=ef.getFullPropertyReference([c,t]),t in i){const e=i[t];e.find((e=>e.propertyName===o))||e.push({propertyName:o,mode:a})}else i[t]=[{propertyName:o,mode:a}]})),Object.keys(i).length>0&&(this.cascadeResetSubscribers[e]=i)}deregisterResetDependencies(e,t,n,r,s){if(!e||!n||!r?.length)return;const a=n.startsWith(".")?`${t}.${n.substring(1)}`:n,o=this.cascadeResetSubscribers[e]||{},i=this._handlePageReference(t,n,s);r.forEach((e=>{if(e){let t=e.startsWith(".")?e.substring(1):e;if(t=ef.getFullPropertyReference([i,t]),t in o){const e=o[t];ef.removeExistingDependentProperty(e,a)}}})),Object.keys(o).length>0&&(this.cascadeResetSubscribers[e]=o)}getResetDependencies(e,t){return this.cascadeResetSubscribers[e]?.[t]||[]}purgeResetDependencies(e){e&&this.cascadeResetSubscribers[e]&&delete this.cascadeResetSubscribers[e]}registerFields(e,t,n,r,s){this.cascadeSubscribers[e]=this.cascadeSubscribers[e]||{},n?.forEach((n=>{this.cascadeSubscribers[e][`${t}${n}`]=this.cascadeSubscribers[e][`${t}${n}`]||{};const a=this.cascadeSubscribers[e][`${t}${n}`];if(!a[s]){a[s]=r;const o=$g(n,t,e);a.previousValue="object"==typeof o?null:o}}))}registerListField(e,t,n,r,s){const a=vg._getFieldsForList(e,t,n);a.length>0&&(this.registerFields(e,t,a,r,s),bu.enableCascade(e))}unRegisterListField(e,t,n,r){const s=vg._getFieldsForList(e,t,n);s.length>0&&this.unRegisterFields(e,t,s,r)}static _getFieldsForList(e,t,n){const r=[],s=ig(n,$g("classID",t,e));return s&&!Array.isArray(s)&&s.datasource&&s.datasource.parameters&&Object.values(s.datasource.parameters).forEach((e=>{if(In.isProperty(e)){const t=In.trimAnnotation(e);r.push(t)}})),r}unRegisterFields(e,t,n,r){this.cascadeSubscribers[e]&&n?.forEach((n=>{if(!this.cascadeSubscribers[e][`${t}${n}`])return;const s=this.cascadeSubscribers[e][`${t}${n}`];s[r]&&delete s[r]}))}triggerCascade(e,t,n,r){let s=!1;this.cascadeSubscribers[e]&&this.cascadeSubscribers[e][t]&&(Object.keys(this.cascadeSubscribers[e][t]).forEach((a=>{const o=this.cascadeSubscribers[e][t];"previousValue"!==a&&o.previousValue!==n&&(s=!0,r?r.add(o[a]):o[a](t,n))})),s&&(this.cascadeSubscribers[e][t].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,t=[],n=[]){if(!e)return;const r=new Set;n.forEach((t=>{const n=$g(t,"",e);this.triggerCascade(e,t,n,r)})),r.forEach((e=>{e()})),0!==this.listChangeSubscribers.length&&0!==t.length&&t.forEach((t=>{this.listChangeSubscribers.forEach((n=>{const r=$g(t,"",e);n(e,t,r)}))}))}_updateChangedProperties(e,t,n,r,s,a,o,i){const c=n&&i.some((e=>r.startsWith(e)));if(e!==t||c){const e=r.lastIndexOf("."),t=r.substring(0,e),i=r.substring(e),c=Co.getMessages({type:"error",property:i,context:s,pageReference:t});if(c?.length>0&&o.push(r),!n)return;a.push(r)}}isChangedListPropertyExist(e){let t=!0;return 0!==this.listChangeSubscribers.length&&ef.isValidPageListProperty(e)||(t=!1),t}_getServerProperties(e,t,n,r,s,a,o){if("object"!=typeof e){s.push(n.replace(/\.(\d+)/g,"[$1]"));const i=this.isChangedListPropertyExist(n);n=n.replace(/\.(\d+)/g,"[$1]");const c=$g(n,"",t);if(void 0===c&&!e&&0!==e)return;return void this._updateChangedProperties(c,e,i,n,t,r,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=$g(u,"",t);n&&n?.length===e[l].length||o.push(u.replace(/\.(\d+)/g,"[$1]"))}this._getServerProperties(e[l],t,u,r,s,a,o)}}getServerProperties(e,t,n=G.CASE_INFO.CASE_INFO_CONTENT){const r=[],s=[],a=[],o=ef.getIn(e,n);return o&&t?(this._getServerProperties(o,t,n,r,a,s,[]),{changedListProperty:r,leafProperty:a,changedPropertyWithError:s}):{changedListProperty:r,leafProperty:a,changedPropertyWithError:s}}_handlePageReference(e,t,n){let r=e;if("Page"===n&&t.startsWith(".")&&t.slice(1).includes(".")){r=`${e}${t.substring(0,t.lastIndexOf("."))}`}return r}registerForListChanges(e=(()=>{})){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}}const xg=new vg;let wg=null;const Mg=e=>e?.split(/\.(?![^[]+\])|\[|\]/g).filter(Boolean),Lg=e=>{wg=e},Fg=()=>wg,Ug=e=>{if(!e)return;let t=[],n=[],r=[];if(Array.isArray(e)||"MERGE_DATA"!==e.type||({changedListProperty:t,leafProperty:n,changedPropertyWithError:r}=xg.getServerProperties(e.payload.data,e.payload.context,e.payload.rootPageReference)),wg?.dispatch(e),!Array.isArray(e)&&"MERGE_DATA"===e.type){if(r.length&&!e.payload.skipValidation){r.map((e=>{const t=e.lastIndexOf(".");return{property:e.substring(t),pageReference:e.substring(0,t)}})).forEach((({property:t,pageReference:n})=>{Co.clearMessages({type:"error",property:t,pageReference:n,context:e.payload.context});const r=io.getFieldReferenceForProperty(e.payload.context,`${n}${t}`);if(r){const e=sf.resolveContextTreeNodeProps(r.props);Gi.validate(e.componentName?.toLowerCase(),e.propertyName,sf.getLitePropertyValue(e,e.propertyName),e)}}))}xg.handleServerChanges(e.payload.context,t,n)}},jg=e=>Fg()?.getState().data?.[e],kg=()=>Fg()?.getState().data?.[G.SHARED],Vg=(e,t,n)=>{if(!(r=e)||r.startsWith('"')||r.startsWith("'"))return(e=>e&&e.trim().substring(1,e.length-1))(e);var r;const s=e?.startsWith(".")?t+e:e,a=Mg(s);return ef.getIn(n,a)},$g=(e,t,n)=>Vg(e,t,jg(n)),Bg=(e,t,n)=>Vg(t,e?`${G.CONTEXT_DATA}.${e}`:`${G.CONTEXT_DATA}`,jg(n)),Gg=(e,t,n)=>((e,t,n)=>{const r=Mg(`${t}.${n}`);return ef.getIn(e,r)})(jg(n),`${G.CONTEXT_DATA}.${e}`,t),Wg=e=>{const{context:t}=e,n=Fg()?.getState().data[t];if(n)return me;const{action:r}=e;return["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"].includes(r)?Oe:me},Hg=(e,t)=>{const n=Mg(t);return ef.deleteIn(e,n)},qg=e=>!Array.isArray(e)&&"object"==typeof e,zg=(e,t=[],n=[])=>{Array.isArray(t)&&t.length>0&&t.forEach((t=>{t.allowMultiple?t.allowMultiple&&!n.includes(t.path)&&ef.setIn(e,t.path,[]):ef.setIn(e,t.path,{})})),n.length>0&&ef.rearrangeProperties(n,e)},Yg=(e,t,n={})=>{const{isArrayDeepMerge:r,propertiesToReplace:s=[],propertiesToReArrange:a=[]}=n;Array.isArray(e)&&!t&&(t=[]),zg(e,s,a);const o=(e,t)=>{if(qg(e)&&null!==t&&"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)return j()(e,t,o);if(Array.isArray(e)&&null!==t&&Array.isArray(t)){if(r)return j()(e,t,o);{const n=t.length;if(void 0===r&&n===e.length)return j()(e,t,o)}}return""===t&&e&&"object"==typeof e?e:t};return o(e,t)},Kg=(e,t,n,r={isArrayDeepMerge:!0})=>{const{isArrayDeepMerge:s}=r,a=Mg(t);if("object"==typeof n){const t=Yg(ef.getIn(e,a),n,{isArrayDeepMerge:s});return ef.setIn(e,a,t)}return ef.setIn(e,a,n)},Jg=(e,t,n)=>{const r=Mg(t);return ef.setIn(e,r,n)},Xg=()=>{const e=ot,{promise:t,actionMgrID:n}=uc.actionManagerPromise(e);return Ug({type:e,payload:{actionMgrID:n}}),t},Qg=e=>{const t=Fg()?.getState();return!!t?.data?.[e]};class Zg{static mergeDeep(e,t){return j()(t,e)}static hasIn(e,t){return x()(e,t)}static getIn(e,t,n){return M()(e,t,n)}static setIn(e,t,n){return F()(e,t,n)}static deleteIn(e,t){return b()(e,t)}static isObjectEmpty(e){return!e||0===Object.entries(e).length}static isEmpty(e){return V()(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 isWhenExist(e){const t=["visibility","disabled","readOnly","required"];let n=!1;for(const r of Object.keys(e)){const s=e[r];s&&"object"==typeof s&&!Array.isArray(s)?n=n||Zg.isWhenExist(s):t.includes(r)&&"string"==typeof s&&s?.startsWith("@W ")&&(n=!0)}return n||"multirecordlist"!==e?.type||"Editable"!==e?.renderMode||(n=Object.keys(e?.allowActions??{}).some((t=>"string"==typeof e?.allowActions?.[t]&&e.allowActions[t]?.startsWith("@W ")))),n}static getWhenNames(e){const t=["visibility","disabled","readOnly","required"];let n="";const r=new Set;if(e&&Object.keys(e).forEach((s=>{const a=e[s];t.includes(s)&&"string"==typeof a&&a.startsWith("@W ")&&(n=In.trimAnnotation(a),r.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=In.trimAnnotation(t[e]),r.add(n))}))}return[...r]}static isExpressionExist(e){const t=["disabled","visibility","readOnly","required"];let n=!1;for(const r of Object.keys(e))t.includes(r)&&"string"==typeof e[r]&&e[r]?.startsWith("@E ")&&(n=!0);return n}static buildDataObject(e,t){let n={};const r=n;if(t.indexOf(".")>0){t.split(".").forEach((e=>{if(e.includes("[")){const[t]=e.split("[");n[t]=[],n=n[t],e=e.substring(e.indexOf("[")+1,e.lastIndexOf("]"))}n[e]={},n=n[e]}))}else n[t]={},n=n[t];return Object.keys(e).forEach((t=>{let r=t;t.startsWith(".")&&(r=t.substring(1)),n[r]=e[t]})),r}static buildObject=(e,t,n)=>{if(void 0===n)return;const r=e.split(".");let s=0;for(;s<r.length-1;s+=1){const e=r[s];e?.toString().length&&!t[e]&&(t[e]={}),t[e]&&(t=t[e])}"object"==typeof n?(t[r[s]]||(t[r[s]]=Array.isArray(n)?[]:{}),Yg(t[r[s]],n,{isArrayDeepMerge:!0})):t[r[s]]=n};static getHashedString(e){return(0,D.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 y()(e,t)}static isContains(e,t){const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(e[n[r]]&&Zg.isEqual(e[n[r]],t))return!0;return!1}static removeExistingDependentProperty(e,t){const n=e.findIndex((e=>e.propertyName===t));n>=0&&e.splice(n,1)}static getFullPropertyReference(e){return Array.isArray(e)?e.filter((e=>!!e)).join("."):""}static iterateLeafNodes(e,t){const n=(e,r=[])=>{Object.entries(e).forEach((([s,a])=>{r.push(Array.isArray(e)?Number(s):s),Array.isArray(a)?a.forEach(((e,t)=>{r.push(t),n(e,r),r.pop()})):"object"==typeof a?n(a,r):t(r.slice(),a),r.pop()}))};n(e)}static resolveStringBooleans(e){const t=["required","readOnly","visibility"];return Object.keys(e).forEach((n=>{t.includes(n)&&"string"==typeof e[n]&&(e[n]="true"===e[n])})),e}static generateUniqueID(){return crypto.randomUUID()}static unflatten(e){const t={};return Object.entries(e).forEach((([e,n])=>{const r=e.split(".");let s;r.reduce(((e,t,a)=>(s=e[t]?e[t]:Number.isNaN(Number(r[a+1]))?r.length-1===a?n:{}:[],e[t]=s,e[t])),t)})),t}static flatten(e,t,n){t||(t=""),Array.isArray(e)?e.forEach(((e,r)=>{Zg.flatten(e,`${t}[${r}]`,n)})):"object"==typeof e&&null!==e?Object.keys(e).forEach((r=>{const s=t?`${t}.${r}`:r;Zg.flatten(e[r],s,n)})):n[t]=e}static buildInstructionPageReference(e,t){const n=e.startsWith(G.OBJECT_INFO.OBJECT_INFO)?`${e}${t}`.replace(G.OBJECT_INFO.OBJECT_INFO_CONTENT,""):`${e}${t}`.replace(G.CASE_INFO.CASE_INFO_CONTENT,"").replace(G.DATA_INFO.DATA_INFO_CONTENT,"");return ai.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 isString(e){return"string"==typeof e}static rejectPendingActions(e){return e.forEach((e=>e.payload.actionMgrID&&uc.rejectActionByID(e.payload.actionMgrID))),!0}static isValidAnnotation(e){const t=new Set(["@DATASOURCE","@ACTIVE_CASES","@ADDRESS","@ASSOCIATED","@ATTACHMENT","@CASE","@FILTERED_LIST","@PARAGRAPH","@P","@ROUTING_INFO","@USER","@W","@E","@SHARED"]),n=e.indexOf(" "),r=e.substring(0,n);return t.has(r)}static trimDotForProperty(e){return"string"==typeof e&&e.startsWith(".")?e.substring(1):e}static convertObjectWithStringToBoolean(e){if(e&&!Array.isArray(e)&&"object"==typeof e)return Object.keys(e).forEach((t=>{let n;const r=e[t];"string"==typeof r?n="true"===r||"false"!==r&&r:"object"==typeof r?(n=r,Zg.convertObjectWithStringToBoolean(r)):n=r,e[t]=n})),e}static rearrangeProperties(e,t){e.forEach((e=>{let n=Zg.getIn(t,e);if(!n)return;const r=Object.hasOwn(n,"pyCount");if(r&&(n=n.pxResults),!n)return;const s=n.filter((e=>!e.error)),a=n.filter((e=>e.error));Zg.setIn(t,r?`${e}.pxResults`:e,[...s,...a])}))}static getETag(e){if(!e)return;let t=e;const n=t?.split("/")||[],r=n.findIndex((e=>e.startsWith("workarea"))),s=n.findIndex((e=>e.startsWith("modal")));return-1!==r?t=n.slice(0,r+1).join("/"):-1!==s&&(t=n.slice(0,s+1).join("/")),Fg()?.getState()?.data[t]?.caseInfo?.headers?.etag}static PAGELIST_PATH_REGEX=/^(?!.*\.\.)(?!\d)\w+(\.\w+)*\.\d+(\.\w+)+$/;static isValidPageListProperty(e){return Zg.PAGELIST_PATH_REGEX.test(e)}static generateDataPageHashWithParameters(e,t,n){const r=[];let s="";const a=n.getPageReference(),o=n.getContextName();Object.keys(e).forEach((t=>{const n=e[t];let s=In.isProperty(n)?$g(`.${In.getPropertyName(n)}`,a,o):n;null!=s&&""!==s||(s=G.NULL_STRING),r.push(s)}));let i=t;const c=r.join(G.HASH_DELIMITER);return c&&(s=Zg.getHashedString(c),i=t+G.UNDERSCORE_STRING+s),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)return null;const[,n,r,s,a,o,i,c]=t.map(Number);return new Date(n,r-1,s,a,o,i,c).getTime()}static normalizePropertyRef(e){const t="caseInfo.content.";let n=e.startsWith(t)?e.substring(17):e;return n=n.replace(/\[\d+\]/g,""),n.startsWith(".")?n.substring(1):n}static resolvePageClass(e,t){if(!t)return;const n=(e=this.normalizePropertyRef(e)).split(".").slice(0,-1);let r=t;for(const e of n){const t=ig(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}}const ef=Zg,tf=G.SUMMARY_OF_LISTS,nf=G.SUMMARY_OF_WHEN_CONDITIONS;class rf{static updateData(e){Object.keys(e).forEach((t=>{Ug(df({context:t,data:e[t]}))}))}static updateContextData(e){Object.keys(e).forEach((t=>{Ug(df({context:t,data:e[t]}))}))}static resolveWhen(e,t){return!!t.getContextDataValue(`.${nf}.${e}`)}static resolveFieldValue(e,t){return t.getLocalizedValue(e)}static resolveNavigation(e,t){const n=this.resolveName(e,t);return mg("string"==typeof n?n:"")}static resolveView(e,t,n=""){const r=gg(this.resolveName(e,t));let s=[];if(Array.isArray(r)&&r.length>0){if(t&&r.length>1){if(n||(n=t.getValue(G.CLASS_ID)||""),!n)return;s=r.filter((e=>e[G.CLASSID]===n))}return 0===s.length?r[0]:s[0]}return r}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=In.handleAnnotation(e,t)),e)}static getContextPath(e,t){return("number"==typeof t||t)&&("number"==typeof(t=In.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 r;if(t)r=t.startsWith(G.CLASS_ANNOTATION)?t.split(G.CLASS_ANNOTATION)[1].trim():this.resolveClassID(t,e.getPageReference(),e.getContextName(),e.getValue(G.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;r=e&&n?t.pageClass:t.classID}r||(r=n.ruleClass)}return r}static resolveReference(e,t){const{type:n}=e;let r;if("reference"===n){const{config:n}=e,s=n?.type,{ref:a,name:o,context:i}=n||{},c=this.getRuleClass(t,i,n);return t&&(t._ruleClass=c),"navigation"===s?r=this.resolveNavigation(a||o,t):"view"===s?r=this.resolveView(a||o,t,c||""):"widget"===s&&(r={type:"Widget",config:{name:o,ruleClass:c}}),r}return e}static resolvePropertyReference(e,t,n){return $g(t,e,n)}static getProperty(e,t,n){let r=this.resolvePropertyReference(t,e,n);if(null==r||0===r.length){const s=Gg(`${t}.${tf}`,e,n);s&&(r=this.resolvePropertyReference(t,s,n))}return r}static getPropertyValue(e,t,n){return e=In.trimAnnotation(e),this.getProperty(e,t,n)}static getReferencedUser(e,t){const n=rf.getLitePropertyValue(t,"referencedUsers");if(Array.isArray(n)){const t=n.find((t=>t.UserID===e));if(t)return{userId:t.UserID,UserName:t.UserName}}return n?.[e]}static getLitePropertyValue(e,t){if(!e)return;const{useCustomContext:n,propertyName:r,hasSuggestions:s,pageReference:a,context:o}=e;let i=t||r||"";return n?(i=i.startsWith(".")?i.substring(1):i,i.split(".").reduce(((e,t)=>e?.[t]??void 0),n)):s&&i===r?rf.getPropertyValue(i,a,o?`${o}/${G.SUGGESTION}`:void 0):rf.getPropertyValue(i,a,o||void 0)}static _handlePropString(e,t,n,r,s){n.startsWith("@")?e[t]=In.handleAnnotation(n,r,s):e[t]=n}static _resolveProps(e,t,n){e&&Object.keys(e).forEach((r=>{const s=e[r];"string"==typeof s?this._handlePropString(e,r,s,t,n):Array.isArray(s)?s.forEach((r=>{this._resolveProps("object"==typeof r?r:e[r],t,n)})):"object"==typeof s&&this._resolveProps(e[r],t,n)}))}static resolveProps(e,t,n){return e&&t?(ef.mergeDeep(e,t),this._resolveProps(t,n,void 0),t):t}static resolveContextTreeNodeProps(e){const t={};return e?(ef.mergeDeep(e,t),this._resolveProps(t,void 0,e),ef.resolveStringBooleans(t)):t}static resolvePropertyPageClass(e,t,n){const r=ef.resolvePageClass(e,n),s=t.startsWith(".")?t.slice(1):t,a=ig(s,r);let o;if(a)return o=Array.isArray(a)?a[0]?.pageClass:a.pageClass,o}static resolveClassID(e,t,n,r){const s=In.trimAnnotation(e);let a=s.startsWith(".")?`${t}${s}`:s;for(;a;){const e=$g(G.CLASS_ID,a,n);if(e)return e;if(r){const e=this.resolvePropertyPageClass(a,s,r);if(e)return e}const t=a.lastIndexOf(".");if(-1===t)break;a=a.substring(0,t)}return null}}const sf=rf;const af=new class{constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,t){this.actionHandlers[e]=t}};const of=class{static#l=[];static#u=!1;static getActionHandlers=(e,t,n)=>{const r=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==t||e.forEach((e=>{const t=af.getHandler(e.action),{config:n}=e;r.push({handler:t,config:n})})),r};static isEditable=e=>{const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t||"DATETIME"===t};static isNonKeyInput=e=>{const{tagName:t,type:n}=e;return"SELECT"===t||"checkbox"===n||"radio"===n};static#d=(e,t,n)=>{for(let r=0;r<e.length;r+=1){const s=e[r],a={actionHandler:s.handler,component:t,eventType:n,config:s.config};this.#l.push(a)}};static buildActionObject=(e,t)=>{const n={...e};return n.context="Browser"===Vh.getRuntime()?t.getContextName():n.context,n.pageReference=t.getPageReference(),n.actionMgrID=uc.getNextActionMgrId(),n};static#p=e=>{const t=e.actionHandler,n=e.component,{config:r}=e,s={};sf.resolveProps(r,s,n),t&&(t(e.eventType,s,n),this.#h())};static#h=()=>{if(!this.#u){if(0===this.#l.length)return;const e=this.#l.shift();this.#p(e),e.config&&"true"===e.config.parallel&&this.#l.length>0&&this.#h()}};static#g=()=>{this.#h()};static#f=(e,t,n)=>{this.#d(e,t,n),this.#g()};static getFullRef=e=>{const t=e.getPageReference(),n=e.getComponentConfig().value;return sf.getContextPath(t,n)};static#m(e,t){const n=e.getComponentConfig().behaviours||[];for(let r=0;r<n.length;r+=1){const{behaviour:s,actions:a}=n[r];if(a){const n=this.getActionHandlers(a,s,t);n&&n.length>0&&this.#f(n,e,t)}}}static changeHandler=(e,t)=>{const n=e.getStateProps().value,r=e.getContextName();fo({type:B.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:r});if(("Browser"===Vh.getRuntime()?t?.nativeEvent instanceof Event||t instanceof Event:!!t?.nativeEvent)||null!==t.value&&void 0===t.prop){let n,{target:s}=t;null===s&&t&&t.auxiliaryTarget&&(s=t.auxiliaryTarget),n=void 0===s?t.value:"value"in s?s.value:s.innerText;const a=this.getFullRef(e);Ug({type:re,payload:{reference:a,value:n,context:r}}),void 0!==s&&this.isEditable(s)&&!this.isNonKeyInput(s)||Ug({type:ae,payload:{reference:a,pageReference:e.getPageReference(),value:n,context:r,propertyName:e.getComponentConfig().value,classID:e.getValue(G.CLASS_ID)}})}else{const n=e.getPageReference(),s=e.getStateProps();for(const e of Object.keys(t)){const a=s[e],o=t[e];Ug({type:re,payload:{reference:sf.getContextPath(n,a),value:o,context:r}}),Ug({type:ae,payload:{reference:sf.getContextPath(n,a),value:o,context:r}})}}};static blurHandler=(e,t)=>{let{target:n}=t;null===n&&t&&"auxiliaryTarget"in t&&(n=t.auxiliaryTarget);const{value:r,validationValue:s}=n,a=this.getFullRef(e),o=e.getContextName();n.clearMessages&&fo({type:B.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:o}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?s:r),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,r),this.isNonKeyInput(n)||Ug({type:ae,payload:{reference:a,pageReference:e.getPageReference(),value:r,context:o,propertyName:e.getComponentConfig().value,classID:e.getValue(G.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.#m(e,n)};static pause=()=>{this.#u=!0};static resume=()=>{this.#u=!1,this.#h()};static isQueueEmpty=()=>0===this.#l.length;static clearQueue=()=>{this.#l=[]};static getActionsQueue=()=>this.#l;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},cf="CREATE_WORK",lf=e=>({type:cf,payload:e});const uf=(e,t,n,r,s="")=>{const a=[];Object.keys(e).forEach((o=>{"object"==typeof e[o]&&o.includes("[")?function(e,t,n,r,s,a,o){const i=r.substring(0,r.indexOf("[")),c=r.substring(r.indexOf("[")+1,r.indexOf("]"));let l=t[i];const u=`${ef.trimDotForProperty(s)}.${i}`;o.includes(u)&&Object.hasOwn(l,"pyCount")&&(l=l.pxResults),Array.isArray(l)&&(l?.splice(+c,1,e[r]),a.push(i),n.add(`${s}.${r}`))}(e,t,n,o,s,a,r):e[o]&&"object"==typeof e[o]?(t[o]||(t[o]=Array.isArray(e[o])?[]:{}),uf(e[o],t[o],n,r,`${s}.${o}`)):t[o]=e[o]})),function(e,t,n){Object.keys(e).forEach((r=>{(Array.isArray(e[r])&&!n.includes(r)||!Array.isArray(e[r])&&!Object.hasOwn(t,r))&&delete e[r]}))}(t,e,a)},df=(e,t={})=>{const{serverPrecedenceFields:n=[],propertiesToReplace:r=[],propertiesToReArrange:s=[]}=t,{context:a,data:o,isArrayDeepMerge:i,preserveClientChanges:c=!1}=e,l=dp(a,!0),u=jg(a);let d={};if(u&&o){d=JSON.parse(JSON.stringify(u));const e=JSON.parse(JSON.stringify(o));s.length>0&&ef.rearrangeProperties(s,d);const t=new Set;uf(l,d,t,s),((e,t,n)=>{const r=new Set;e.forEach((e=>{e=ef.trimDotForProperty(e);const[s,a,o]=Ka(e);if(s&&a&&o&&!r.has(`${s}.${a}`)){const e=ef.getIn(n,`${s}.${a}`)||[];Array.isArray(e)&&e.forEach(((e,n)=>{n!==+o&&ef.setIn(t,`${s}.${a}[${n}]`,e)})),r.add(`${s}.${a}`)}}))})(t,d,e)}!function(e,t){const n=ef.getIn(e,G.REFERENCED_USERS);let r;if(void 0!==n){if(!Array.isArray(n)&&"object"==typeof n)return r=ef.getIn(t,G.REFERENCED_USERS,{}),void ef.setIn(e,G.REFERENCED_USERS,{...r,...n});r=ef.getIn(t,G.REFERENCED_USERS,[]);const s=new Map;for(const e of[...r,...n])if(s.has(e.UserID)){const t=s.get(e.UserID);s.set(e.UserID,{...t,...e})}else s.set(e.UserID,e);n.length=0;for(const e of s.values())n.push(e)}}(o,u);const p=ef.getIn(e?.data,G.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),h=Bl.isExternalObject(p),g=h?{[G.OBJECT_INFO.OBJECT_INFO]:{[G.CONTENT]:{...d[G.OBJECT_INFO.OBJECT_INFO]?.[G.CONTENT]}}}:{[G.CASE_INFO.CASE_INFO]:{[G.CONTENT]:{...d[G.CASE_INFO.CASE_INFO]?.[G.CONTENT]}}},f=h?G.OBJECT_INFO.OBJECT_INFO_CONTENT:G.CASE_INFO.CASE_INFO_CONTENT;let m=o;return c?(n.forEach((e=>{const t=`${f}.${e}`;ef.deleteIn(g,t)})),m=Yg(o,g,{isArrayDeepMerge:i??!0})):((e,t)=>{const n=op[e]||{};Object.keys(n).forEach((e=>{ef.hasIn(t,e)&&(n[e].value=ef.getIn(t,e))}))})(a,o),{type:Ae,payload:{...e,data:m,...r.length>0?{propertiesToReplace:r}:null,...s.length>0?{propertiesToReArrange:s}:null}}},pf=e=>({type:"SHOW_HARNESS",payload:e}),hf=e=>({type:oe,payload:e}),gf=e=>({type:ie,payload:e}),ff=e=>({type:"ADD_WORK",payload:e}),mf=e=>({type:fe,payload:e}),If=e=>({type:Ne,payload:e}),yf=e=>({type:Pe,payload:e}),Ef=e=>({type:Oe,payload:e}),Af=e=>({type:Re,payload:e}),_f=e=>({type:be,payload:e}),Cf=e=>({type:we,payload:e}),Sf=e=>({type:Le,payload:e}),Tf=e=>({type:Me,payload:e}),Nf=e=>{const{containerItemID:t}=e;e.suggestionContexts=zp(t);const n=e?.data?.caseInfo?.content,r=Object.keys(n||{}).length>0;return e.propertiesToReplace||(e.propertiesToReplace=r?Bl.getPropertiesToReplace(t):[]),{type:Ue,payload:e}},Pf=e=>{const{context:t}=e;return{type:de,payload:{context:t}}},Of=e=>{const{context:t}=e;return{type:pe,payload:{context:t}}},Df=e=>({type:je,payload:e}),Rf=e=>({type:Fe,payload:e}),bf=e=>({type:st,payload:e}),vf=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=Bp(n)),e.context=r,e.deleteContext=!ih(n),e.childContainers=Hp(n),e.childContainersContexts=qp(n),e.transientItems=ch([...e.childContainersContexts,n]),e.suggestionContexts=zp(n),n===t&&(e.caseID=$g(G.CASE_INFO.CASE_INFO_ID,"",t)||$g(G.OBJECT_INFO.OBJECT_INFO_ID,"",t),e.RemoteSystemID=$g(G.CASE_INFO.REMOTESYSTEMID,"",t)),{type:De,payload:e}},xf=e=>{const{containerItemID:t}=e;return e.transientItems=ch([...qp(t),t]),{type:xe,payload:e}},wf=e=>{const{transientItemID:t}=e;return e.transientItems=[t],{type:ve,payload:e}},Mf=e=>{const{context:t,containerItemID:n}=e;let r=t;if(r||(r=Bp(n)),e.context=r,e.childContainers=Hp(n),e.childContainersContexts=qp(n),e.transientItems=ch([...e.childContainersContexts,n]),e.suggestionContexts=zp(n),n===t){e.caseID=$g(G.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=$g(G.CASE_INFO.REMOTESYSTEMID,"",t);const n=$g(G.CASE_INFO.CASE_INFO_CLASSNAME,"",t);q.isTraditionalRemoteCase(n)&&(e.skipReleaseLockRequest=!0)}return{type:ke,payload:e}},Lf=e=>({type:Ie,payload:e}),Ff=e=>({type:Ee,payload:e}),Uf=e=>({type:Se,payload:e}),jf=(e,...t)=>(of.resume(),e(...t)),kf=(e,t,n,r,s)=>({type:Te,payload:{msg:e,err:t,context:n,formFields:r,actionMgrID:s}}),Vf=e=>({type:ct,payload:e}),$f=e=>({type:lt,payload:e}),Bf=e=>({type:ut,payload:e}),Gf=e=>({type:"SHOW_CASE_PREVIEW",payload:e}),Wf=e=>({type:he,payload:e}),Hf=e=>({type:re,payload:e}),qf="add",zf="replace",Yf=["portal","noPortal","preview","debug","devtool","activeTab"];let Kf="",Jf="Home",Xf="",Qf=!0;const Zf=e=>(Qf=e,Qf),em=()=>Qf,tm=(e,t,n)=>jh.getSemanticURL(e,t,n),nm=(e,t)=>jh.getRestEndPoint(e,t),rm=(e,t)=>{let n=T();const r=nm(e,t);return r?(r.restApi?.startsWith("/")||(r.restApi=`/${r.restApi}`),n?.endsWith("/")&&(n=n.substring(0,n.length-1)),r.restApi=n+r.restApi,r):{}},sm=(e,t,n)=>{const{root:r,resources:s}=e,{views:a}=s,{config:o}=r,i=qf;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(Oh);if(l){const e=ef.getIn(t,o.context);c=c.replace(l[0],e.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:i}},am=(e,t,n)=>{let r,s;r=Rh(t)?`${e}/${t}`:e;const a=Rh(n?.pxURLPath);a&&(r=`${r}/${a}`);try{s=new URL(r).searchParams,r=r.includes("?")?r.split("?")[0]:r}catch(e){return console.log("Invalid url",e),""}const o=r.split("/"),i=o[o.length-1],c=new URLSearchParams(window.location.search);if(Fh()?(r=((e,t,n,r,s)=>{const a=jh.getStaticRoutePage(),o=Jf?.toLowerCase(),i=a?.toLowerCase(),c=r?.toLowerCase();return i!==o&&c!==o||s.has("noPortal")?e:`${t}/${n}`})(r,e,t,i,c),jh.setStaticRoutePage("")):i.toLowerCase()!==Jf.toLowerCase()||c.has("noPortal")||(r=`${e}/${t}`),!jh.isDefaultPortal()){const e=jh.getPortalName();c.has("portal")?c.set("portal",e):c.append("portal",e)}return s=((e,t)=>{for(const[n,r]of t.entries())!e.has(n)&&Yf.includes(n)&&e.append(n,r);return e})(s,c),s.toString()&&(r+=`?${s.toString()}`),r},om=(e,{urlPathObjParam:t,infoParam:n,optionsParam:r,queryParam:s},a=!1)=>{let o,i,c;if(!1===window.PCore.getBehaviorOverride("dynamicSemanticUrl"))return;if(a)o=t,i=n,c=r;else{const{uiResources:n,data:r}=e;({options:c}=e),o=t&&t.pxURLPath&&Dh(t.pxURLPath)?sm(n,r,t.pxURLPath):t||sm(n,r),i=jh.getEndPointInfo(o.pxURLPath),o.pxURLPath=i.urlPath}let l=am(Kf,jh.getApplicationPath(),o);const{title:u}=((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:jh.getApplicationName()),n===`${Kf}/${t}/`)return{title:e};const r=new URL(n).pathname.replace(`${t}/`,""),s=r.split("/");return/\d/.test(r)?{title:`${e} - ${s[s.length-1]}`}:{title:`${e} - ${s[0]}`}})(Xf,jh.getApplicationPath(),l),d=((e,t)=>(void 0!==e&&(e.options=t),{stateObj:e}))(i,{...c,title:u});o?.historyAction===qf?((e,t,n)=>{try{window.history.pushState(e,t,n),window.scrollTo(0,0)}catch(e){throw new Error("Error- Unable to Add to Browser History")}})(d,u,l):o?.historyAction===zf&&(s&&(l+=`?${s}`),((e,t,n)=>{try{window.history.replaceState(e,t,n)}catch(e){throw new Error("Error- Unable to Replace Browser History")}})(d,u,l))},im=e=>{let t=null;e.directUrlUpdation&&(t={historyAction:qf,pxURLPath:""},t.pxURLPath=e.semanticURL),om(e,{urlPathObjParam:t,infoParam:null,optionsParam:null},!1)},cm=e=>{im(e)},lm=e=>{const t={pxURLPath:e};return am(Kf,jh.getApplicationPath(),t)},um=e=>{const{uiResources:t}=e;em()&&(e.directUrlUpdation||(e=>{if(e&&e.root){const{root:t}=e,{resources:n}=e,{views:r}=n,s=t.config,a=s.type,o=s.name;if("VIEW"===a.toUpperCase()){const e=r[o];let t=e;Array.isArray(e)&&e.length>0&&([t]=e);const n=t.config;if(n.type){const e=n.type;return!(!n.urlPath||"PAGE"!==e.toUpperCase())}}return!1}return!1})(t))&&im(e)},dm=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},pm=(e,t,n)=>{const{caseClassName:r,workID:s}=e.payload,{containerName:a,context:o}=t,{RemoteClassGroup:i,RemoteSystemID:c,name:l}=q.getRemoteCase(r),u={...e,headers:{RemoteSystemID:c},className:r,isTraditionalRemoteCase:!0,action:Nt,viewName:W,gadgetId:Bl.getUniqueGadgetId(),context:n??o,skipSemanticUrl:!0,insKey:`${i?.toUpperCase()} ${s}`,containerName:a,name:l};Ug(m.showPage(u))},hm=e=>{const t=(e=>"ui-navigation"===e.state?.type?(No.publish(B.PUB_SUB_EVENTS.URL_NAVIGATION,e.state),null):e.state?e.state.stateObj:null)(e);t&&(q.isTraditionalRemoteCase(t.payload?.caseClassName)?pm({...t},t.options):Ug(m.showHistory(dm(t))))},gm=()=>jh.getApplicationPath()!==vh(),fm=e=>{const{acName:t,context:n,defaultViewLabel:r,ruleName:s,className:a}=e,o=((e,t)=>{const n=jh.getRoutingInfo();if(Fh()&&Object.values(n?.routes).find((n=>n?.payload?.pageClass===t&&n?.payload?.page===e)))return e;const r=e.split(" ").join(""),s=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[r]?r:n?.routes[s]?s:n?.routes[a]?a:e})(s||r,a);(e=>{Jf=e})(o),jh.setDefaultRoute(o),jh.setDefaultClassName(a);const i=J(t,n),c=wt(t,n),l="true"===Vh.getIsExtraCallRequiredForDefaultHome(),u={historyAction:zf,pxURLPath:""};let d,p=null;const h={acName:c,context:i,actionConfig:{context:i}};if(l||!l&&gm()){const t=Mh(xh());Vh.shouldUseURLParams()&&(p=t.includes("?")?t.split("?")[1]:null),d=Lh(t,h),u.pxURLPath=d.urlPath,void 0!==d.payload?.pageClass&&(d.payload.pageClass=Fg()?.getState()?.data?.app?.pyPortal?.classID);const n="showHistory",r={routeEndpoint:d.routeEndpoint,requestType:d.requestType,payload:d.payload,options:h,routeKey:d.routeKey};q.isTraditionalRemoteCase(d?.payload?.caseClassName)?pm(r,e,h.context):Ug(m[n](dm(r)))}else d=jh.getEndPointInfo(Jf),u.pxURLPath="";om(null,{urlPathObjParam:u,infoParam:d,optionsParam:h,queryParam:p},!0)},mm=(e,t=!1)=>{var n;Kf=e.domain,!1===t&&em()&&(n=hm,window.addEventListener("popstate",(e=>n(e))),window.onbeforeunload=()=>null),jh.init(e,Jf)},Im=e=>{(e=>{window.document.title=e})(e)};var ym=Symbol.for("immer-nothing"),Em=Symbol.for("immer-draftable"),Am=Symbol.for("immer-state");function _m(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Cm=Object,Sm=Cm.getPrototypeOf,Tm="constructor",Nm="prototype",Pm="configurable",Om="enumerable",Dm="writable",Rm="value",bm=e=>!!e&&!!e[Am];function vm(e){return!!e&&(Mm(e)||Vm(e)||!!e[Em]||!!e[Tm]?.[Em]||$m(e)||Bm(e))}var xm=Cm[Nm][Tm].toString(),wm=new WeakMap;function Mm(e){if(!e||!Gm(e))return!1;const t=Sm(e);if(null===t||t===Cm[Nm])return!0;const n=Cm.hasOwnProperty.call(t,Tm)&&t[Tm];if(n===Object)return!0;if(!Wm(n))return!1;let r=wm.get(n);return void 0===r&&(r=Function.toString.call(n),wm.set(n,r)),r===xm}function Lm(e,t,n=!0){if(0===Fm(e)){(n?Reflect.ownKeys(e):Cm.keys(e)).forEach((n=>{t(n,e[n],e)}))}else e.forEach(((n,r)=>t(r,n,e)))}function Fm(e){const t=e[Am];return t?t.type_:Vm(e)?1:$m(e)?2:Bm(e)?3:0}var Um=(e,t,n=Fm(e))=>2===n?e.has(t):Cm[Nm].hasOwnProperty.call(e,t),jm=(e,t,n=Fm(e))=>2===n?e.get(t):e[t],km=(e,t,n,r=Fm(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n};var Vm=Array.isArray,$m=e=>e instanceof Map,Bm=e=>e instanceof Set,Gm=e=>"object"==typeof e,Wm=e=>"function"==typeof e,Hm=e=>"boolean"==typeof e;var qm=e=>e.copy_||e.base_,zm=e=>e.modified_?e.copy_:e.base_;function Ym(e,t){if($m(e))return new Map(e);if(Bm(e))return new Set(e);if(Vm(e))return Array[Nm].slice.call(e);const n=Mm(e);if(!0===t||"class_only"===t&&!n){const t=Cm.getOwnPropertyDescriptors(e);delete t[Am];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const s=n[r],a=t[s];!1===a[Dm]&&(a[Dm]=!0,a[Pm]=!0),(a.get||a.set)&&(t[s]={[Pm]:!0,[Dm]:!0,[Om]:a[Om],[Rm]:e[s]})}return Cm.create(Sm(e),t)}{const t=Sm(e);if(null!==t&&n)return{...e};const r=Cm.create(t);return Cm.assign(r,e)}}function Km(e,t=!1){return Xm(e)||bm(e)||!vm(e)||(Fm(e)>1&&Cm.defineProperties(e,{set:Jm,add:Jm,clear:Jm,delete:Jm}),Cm.freeze(e),t&&Lm(e,((e,t)=>{Km(t,!0)}),!1)),e}var Jm={[Rm]:function(){_m(2)}};function Xm(e){return null===e||!Gm(e)||Cm.isFrozen(e)}var Qm="MapSet",Zm="Patches",eI="ArrayMethods",tI={};function nI(e){const t=tI[e];return t||_m(0),t}var rI,sI=e=>!!tI[e];var aI=()=>rI;function oI(e,t){t&&(e.patchPlugin_=nI(Zm),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function iI(e){cI(e),e.drafts_.forEach(uI),e.drafts_=null}function cI(e){e===rI&&(rI=e.parent_)}var lI=e=>rI={drafts_:[],parent_:rI,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:sI(Qm)?nI(Qm):void 0,arrayMethodsPlugin_:sI(eI)?nI(eI):void 0};function uI(e){const t=e[Am];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function dI(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[Am].modified_&&(iI(t),_m(4)),vm(e)&&(e=pI(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Am].base_,e,t)}else e=pI(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Km(t,n)}(t,e,!0),iI(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ym?e:void 0}function pI(e,t){if(Xm(t))return t;const n=t[Am];if(!n){return EI(t,e.handledSet_,e)}if(!gI(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)}II(n,e)}return n.copy_}function hI(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var gI=(e,t)=>e.scope_===t,fI=[];function mI(e,t,n,r){const s=qm(e),a=e.type_;if(void 0!==r){if(jm(s,r,a)===t)return void km(s,r,n,a)}if(!e.draftLocations_){const t=e.draftLocations_=new Map;Lm(s,((e,n)=>{if(bm(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}}))}const o=e.draftLocations_.get(t)??fI;for(const e of o)km(s,e,n,a)}function II(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 r=n.getPath(e);r&&n.generatePatches_(e,r,t)}hI(e)}}function yI(e,t,n){const{scope_:r}=e;if(bm(n)){const s=n[Am];gI(s,r)&&s.callbacks_.push((function(){NI(e);const r=zm(s);mI(e,n,r,t)}))}else vm(n)&&e.callbacks_.push((function(){const s=qm(e);3===e.type_?s.has(n)&&EI(n,r.handledSet_,r):jm(s,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&EI(jm(e.copy_,t,e.type_),r.handledSet_,r)}))}function EI(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||bm(e)||t.has(e)||!vm(e)||Xm(e)||(t.add(e),Lm(e,((r,s)=>{if(bm(s)){const t=s[Am];if(gI(t,n)){const n=zm(t);km(e,r,n,e.type_),hI(t)}}else vm(s)&&EI(s,t,n)}))),e}var AI={get(e,t){if(t===Am)return e;let n=e.scope_.arrayMethodsPlugin_;const r=1===e.type_&&"string"==typeof t;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const s=qm(e);if(!Um(s,t,e.type_))return function(e,t,n){const r=SI(t,n);return r?Rm in r?r[Rm]:r.get?.call(e.draft_):void 0}(e,s,t);const a=s[t];if(e.finalized_||!vm(a))return a;if(r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return a;if(a===CI(e.base_,t)){NI(e);const n=1===e.type_?+t:t,r=PI(e.scope_,a,e,n);return e.copy_[n]=r}return a},has:(e,t)=>t in qm(e),ownKeys:e=>Reflect.ownKeys(qm(e)),set(e,t,n){const r=SI(qm(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=CI(qm(e),t),o=r?.[Am];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(((s=n)===(a=r)?0!==s||1/s==1/a:s!=s&&a!=a)&&(void 0!==n||Um(e.base_,t,e.type_)))return!0;NI(e),TI(e)}var s,a;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),yI(e,t,n)),!0},deleteProperty:(e,t)=>(NI(e),void 0!==CI(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),TI(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=qm(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[Dm]:!0,[Pm]:1!==e.type_||"length"!==t,[Om]:r[Om],[Rm]:n[t]}:r},defineProperty(){_m(11)},getPrototypeOf:e=>Sm(e.base_),setPrototypeOf(){_m(12)}},_I={};for(let e in AI){let t=AI[e];_I[e]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function CI(e,t){const n=e[Am];return(n?qm(n):e)[t]}function SI(e,t){if(!(t in e))return;let n=Sm(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Sm(n)}}function TI(e){e.modified_||(e.modified_=!0,e.parent_&&TI(e.parent_))}function NI(e){e.copy_||(e.assigned_=new Map,e.copy_=Ym(e.base_,e.scope_.immer_.useStrictShallowCopy_))}_I.deleteProperty=function(e,t){return _I.set.call(this,e,t,void 0)},_I.set=function(e,t,n){return AI.set.call(this,e[0],t,n,e[0])};function PI(e,t,n,r){const[s,a]=$m(t)?nI(Qm).proxyMap_(t,n):Bm(t)?nI(Qm).proxySet_(t,n):function(e,t){const n=Vm(e),r={type_:n?1:0,scope_:t?t.scope_:aI(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let s=r,a=AI;n&&(s=[r],a=_I);const{revoke:o,proxy:i}=Proxy.revocable(s,a);return r.draft_=i,r.revoke_=o,[i,r]}(t,n);return(n?.scope_??aI()).drafts_.push(s),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push((function(r){const s=t;if(!s||!gI(s,r))return;r.mapSetPlugin_?.fixSetContents(s);const a=zm(s);mI(e,s.draft_??s,a,n),II(s,r)}))}(n,a,r):a.callbacks_.push((function(e){e.mapSetPlugin_?.fixSetContents(a);const{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)})),s}function OI(e){if(!vm(e)||Xm(e))return e;const t=e[Am];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ym(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Ym(e,!0);return Lm(n,((e,t)=>{km(n,e,OI(t))}),r),t&&(t.finalized_=!1),n}var DI=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Wm(e)&&!Wm(t)){const n=t;t=e;const r=this;return function(e=n,...s){return r.produce(e,(e=>t.call(this,e,...s)))}}let r;if(Wm(t)||_m(6),void 0===n||Wm(n)||_m(7),vm(e)){const s=lI(this),a=PI(s,e,void 0);let o=!0;try{r=t(a),o=!1}finally{o?iI(s):cI(s)}return oI(s,n),dI(r,s)}if(!e||!Gm(e)){if(r=t(e),void 0===r&&(r=e),r===ym&&(r=void 0),this.autoFreeze_&&Km(r,!0),n){const t=[],s=[];nI(Zm).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:s}),n(t,s)}return r}_m(1)},this.produceWithPatches=(e,t)=>{if(Wm(e))return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},Hm(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Hm(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Hm(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){vm(e)||_m(8),bm(e)&&(e=function(e){bm(e)||_m(10);return OI(e)}(e));const t=lI(this),n=PI(t,e,void 0);return n[Am].isManual_=!0,cI(t),n}finishDraft(e,t){const n=e&&e[Am];n&&n.isManual_||_m(9);const{scope_:r}=n;return oI(r,t),dI(void 0,r)}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 r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=nI(Zm).applyPatches_;return bm(e)?r(e,t):this.produce(e,(e=>r(e,t)))}},RI=DI.produce;function bI(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 vI=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),xI=()=>Math.random().toString(36).substring(7).split("").join("."),wI={INIT:`@@redux/INIT${xI()}`,REPLACE:`@@redux/REPLACE${xI()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${xI()}`};function MI(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 LI(e,t,n){if("function"!=typeof e)throw new Error(bI(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(bI(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(bI(1));return n(LI)(e,t)}let r=e,s=t,a=new Map,o=a,i=0,c=!1;function l(){o===a&&(o=new Map,a.forEach(((e,t)=>{o.set(t,e)})))}function u(){if(c)throw new Error(bI(3));return s}function d(e){if("function"!=typeof e)throw new Error(bI(4));if(c)throw new Error(bI(5));let t=!0;l();const n=i++;return o.set(n,e),function(){if(t){if(c)throw new Error(bI(6));t=!1,l(),o.delete(n),a=null}}}function p(e){if(!MI(e))throw new Error(bI(7));if(void 0===e.type)throw new Error(bI(8));if("string"!=typeof e.type)throw new Error(bI(17));if(c)throw new Error(bI(9));try{c=!0,s=r(s,e)}finally{c=!1}return(a=o).forEach((e=>{e()})),e}p({type:wI.INIT});return{dispatch:p,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(bI(10));r=e,p({type:wI.REPLACE})},[vI]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(bI(11));function n(){const e=t;e.next&&e.next(u())}n();return{unsubscribe:e(n)}},[vI](){return this}}}}}function FI(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const s=t[r];0,"function"==typeof e[s]&&(n[s]=e[s])}const r=Object.keys(n);let s;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:wI.INIT}))throw new Error(bI(12));if(void 0===n(void 0,{type:wI.PROBE_UNKNOWN_ACTION()}))throw new Error(bI(13))}))}(n)}catch(e){s=e}return function(e={},t){if(s)throw s;let a=!1;const o={};for(let s=0;s<r.length;s++){const i=r[s],c=n[i],l=e[i],u=c(l,t);if(void 0===u){t&&t.type;throw new Error(bI(14))}o[i]=u,a=a||u!==l}return a=a||r.length!==Object.keys(e).length,a?o:e}}function UI(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function jI(e){return({dispatch:t,getState:n})=>r=>s=>"function"==typeof s?s(t,n,e):r(s)}var kI=jI(),VI=jI,$I="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?UI:UI.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var BI=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 GI(e){return vm(e)?RI(e,(()=>{})):e}var WI="RTK_autoBatch",HI=e=>t=>{setTimeout(t,e)},qI=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let s=!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(r),clearTimeout(s),e())},r=l(n),s=setTimeout(n,u)}):HI(10):"callback"===e.type?e.queueNotification:HI(e.timeout);var l,u;const d=()=>{o=!1,a&&(a=!1,i.forEach((e=>e())))};return Object.assign({},r,{subscribe(e){const t=r.subscribe((()=>s&&e()));return i.add(e),()=>{t(),i.delete(e)}},dispatch(e){try{return s=!e?.meta?.[WI],a=!s,a&&(o||(o=!0,c(d))),r.dispatch(e)}finally{s=!0}}})};function zI(e){const t=function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:s=!0}=e??{};let a=new BI;return t&&("boolean"==typeof t?a.push(kI):a.push(VI(t.extraArgument))),a},{reducer:n,middleware:r,devTools:s=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o,enhancers:i}=e||{};let c,l;if("function"==typeof n)c=n;else{if(!MI(n))throw new Error(XI(1));c=FI(n)}l="function"==typeof r?r(t):t();let u=UI;s&&(u=$I({trace:!1,..."object"==typeof s&&s}));const d=function(...e){return t=>(n,r)=>{const s=t(n,r);let a=()=>{throw new Error(bI(15))};const o={getState:s.getState,dispatch:(e,...t)=>a(e,...t)},i=e.map((e=>e(o)));return a=UI(...i)(s.dispatch),{...s,dispatch:a}}}(...l),p=(e=>function(t){const{autoBatch:n=!0}=t??{};let r=new BI(e);return n&&r.push(qI("object"==typeof n?n:void 0)),r})(d);return LI(c,o,u(..."function"==typeof i?i(p):p()))}function YI(e){const t={},n=[];let r;const s={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(XI(28));if(r in t)throw new Error(XI(29));return t[r]=n,s},addAsyncThunk:(e,r)=>(r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),s),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),s),addDefaultCase:e=>(r=e,s)};return e(s),[t,n,r]}function KI(e,t){let n,[r,s,a]=YI(t);if("function"==typeof e)n=()=>GI(e());else{const t=GI(e);n=()=>t}function o(e=n(),t){let o=[r[t.type],...s.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(bm(e)){const r=n(e,t);return void 0===r?e:r}if(vm(e))return RI(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e}),e)}return o.getInitialState=n,o}var{assign:JI}=Object;function XI(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. `}var QI=function(e){function t(t,n){return e.call(this)||this}return Vs(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(ea),ZI={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var s=ZI.delegate;return(null==s?void 0:s.setInterval)?s.setInterval.apply(s,Hs([e,t],Ws(n))):setInterval.apply(void 0,Hs([e,t],Ws(n)))},clearInterval:function(e){var t=ZI.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},ey=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return Vs(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,s=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(s,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(s,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),ZI.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&&ZI.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=e||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Zs(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(QI),ty=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return Vs(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.flush(this),0)},t}(ey),ny={now:function(){return(ny.delegate||Date).now()},delegate:void 0},ry=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=ny.now,e}(),sy=function(e){function t(t,n){void 0===n&&(n=ry.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return Vs(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}(ry),ay=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vs(t,e),t}(sy))(ty),oy=Us((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),iy=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 Vs(t,e),t.prototype.lift=function(e){var t=new cy(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new oy},t.prototype.next=function(e){var t=this;da((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var s=Gs(t.currentObservers),a=s.next();!a.done;a=s.next()){a.value.next(e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;da((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;da((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,s=n.isStopped,a=n.observers;return r||s?ta:(this.currentObservers=null,a.push(e),new ea((function(){t.currentObservers=null,Zs(a,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,s=t.isStopped;n?e.error(r):s&&e.complete()},t.prototype.asObservable=function(){var e=new Sa;return e.source=this,e},t.create=function(e,t){return new cy(e,t)},t}(Sa),cy=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return Vs(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:ta},t}(iy),ly=function(e,t){return ly=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])},ly(e,t)};Object.create;Object.create;var uy=function(e){function t(t,n){var r=e.call(this,(function(e){var t=r.__notifier.subscribe(e);return t&&!t.closed&&e.next(r.value),t}))||this;return r.__notifier=new iy,r.value=n,t.subscribe((function(e){e!==r.value&&(r.value=e,r.__notifier.next(e))})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}ly(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Sa);const dy=e=>{let t=new Set,n=t;const r=()=>{t===n&&(t=new Set(t))},s=e=>{let n=!0;return r(),t.add(e),()=>{n&&(r(),t.delete(e),n=!1)}},a=()=>{const e=Array.from(t);n=t,e.forEach((e=>e()))};return(...t)=>{const n=e(...t);let r=!1,o=!1;const i=e=>Array.isArray(e)?e.map(i):n.dispatch(e);return n.subscribe((()=>{o?r=!0:a()})),{...n,dispatch:e=>{const t=o;t||(r=!1,o=!0);const n=i(e),s=r&&!t;return t||(r=!1,o=!1),s&&a(),n},subscribe:s}}},py=(e,t)=>{const{data:{shared:n={}}={},context:r}=t;((e,t)=>{Gu.updateDataPageStore(t),Object.keys(t).forEach((n=>{ef.getIn(e,[G.SHARED,n])?Object.keys(t[n]).forEach((r=>{ef.setIn(e,[G.SHARED,n,r],t[n][r])})):ef.setIn(e,[G.SHARED,n],t[n])}))})(e,n),r&&ef.deleteIn(e,[r,"shared"])},hy=(e,t,n=!1)=>{const{context:r,caseViewMode:s=(n?void 0:G.PERFORM_MODE),containerName:a}=t;a!==Np.WORKAREA&&s&&ef.setIn(e,[r,"context_data","caseViewMode"],s)},gy=(e,t)=>{const{context:n}=t;ef.setIn(e,[n,"context_data","actionType"],t.actionType),ef.setIn(e,[n,"context_data","assignmentID"],t.assignmentID)},fy=(e,t=[])=>{t.forEach((t=>ef.deleteIn(e,t)))},my=(e,t=[])=>{t.forEach((t=>ef.deleteIn(e,t)))},Iy=(e,t=[])=>{t.forEach((t=>{ef.deleteIn(e,t)}))},yy=(e,t,n={})=>{const{deleteAssignmentSpecificResources:r=!0,doDeleteConfirmationDetails:s=!0,skipMergeAssignmentsAndActions:a=!0}=n;ef.deleteIn(e,[t,"nextAssignmentInfo"]),a&&ef.deleteIn(e,[t,G.CASE_INFO.CASE_INFO,"availableActions"]),ef.deleteIn(e,[t,G.CASE_INFO.CASE_INFO,"availableProcesses"]),ef.deleteIn(e,[t,G.CASE_INFO.CASE_INFO,"activeActionID"]),ef.deleteIn(e,[t,G.CASE_INFO.CASE_INFO,"assignments"]),ef.deleteIn(e,[t,G.CASE_INFO.CASE_INFO,"childCases"]),s&&(ef.deleteIn(e,[t,G.CASE_INFO.CASE_INFO,"confirmationLinks"]),ef.deleteIn(e,[t,"caseMessages"])),r&&(ef.deleteIn(e,[t,G.CASE_INFO.CASE_INFO,"actionButtons"]),ef.deleteIn(e,[t,G.CASE_INFO.CASE_INFO,"navigation"]))},Ey=KI({},(e=>{e.addCase(Oe,((e,t)=>{if(!t.payload.data||e[t.payload.context])return;t.payload.doDeleteCaseSummary&&yy(e,t.payload.context);const{target:n}=t.payload;!n||-1===n.indexOf(G.WORKAREA)&&-1===n.indexOf(G.MODAL)?e[t.payload.containerItemID]=t.payload.data:e[t.payload.context]=t.payload.data,hy(e,t.payload),gy(e,t.payload),py(e,t.payload),((e,t)=>{const{context:n}=t;ef.deleteIn(e,[n,"context_data","blocking_action_counter"]),ef.deleteIn(e,[n,"context_data","deferred_action_queue"])})(e,t.payload)})).addCase(Ue,((e,t)=>{t.payload.doDeleteCaseSummary&&yy(e,t.payload.context,{deleteAssignmentSpecificResources:t.payload.deleteAssignmentSpecificResources});const{target:n,propertiesToReplace:r=[]}=t.payload;!n||-1===n.indexOf(G.WORKAREA)&&-1===n.indexOf(G.MODAL)?e[t.payload.containerItemID]=Yg(e[t.payload.containerItemID],t.payload.data,{propertiesToReplace:[...r]}):e[t.payload.context]=Yg(e[t.payload.context],t.payload.data,{propertiesToReplace:[...r]}),(t.payload.actionType||t.payload.assignmentID)&&gy(e,t.payload),hy(e,t.payload),py(e,t.payload),my(e,t.payload.suggestionContexts)})).addCase(De,((e,t)=>{const{childContainersContexts:n=[]}=t.payload;((e,t)=>{const{containerItemID:n,context:r,deleteContext:s}=t;s&&ef.deleteIn(e,[r]),ef.deleteIn(e,[n])})(e,t.payload),Iy(e,n),fy(e,t.payload.transientItems),my(e,t.payload.suggestionContexts)})).addCase(Pe,((e,t)=>{const{containerItems:n}=t.payload;Array.isArray(n)?n.forEach((t=>{ef.deleteIn(e,[t])})):ef.deleteIn(e,[n])})).addCase(je,((e,t)=>{const{context:n,contextToBeRemoved:r,data:s,childContainersContextsToBeRemoved:a}=t.payload;yy(e,t.payload.context),hy(e,t.payload),e[n]=Yg(e[n],e[r]),e[n]=Yg(e[n],s),ef.deleteIn(e,[r]),Iy(e,a),py(e,t.payload)})).addCase(ke,((e,t)=>{const{context:n,pulseReplace:r=!0,childContainersContexts:s=[]}=t.payload;let{data:a}=t.payload;const o=ef.getIn(e[n],"pulse");let i=ef.getIn(e[n],"OperatorID"),c=ef.getIn(e[n],"pxRequestor");c&&a.pxRequestor&&(c=ef.mergeDeep(c,a.pxRequestor)),i&&a.OperatorID&&(i=ef.mergeDeep(i,a.OperatorID)),!r&&o&&(a=Kg(a,"pulse",o),a=Kg(a,"OperatorID",i),a=Kg(a,"pxRequestor",c)),ef.setIn(e,n,a),hy(e,t.payload),py(e,t.payload),Iy(e,s),fy(e,t.payload.transientItems),my(e,t.payload.suggestionContexts)})).addCase(dt,((e,t)=>{const{context:n,doDeleteConfirmationDetails:r=!0,skipMergeAssignmentsAndActions:s=!0}=t.payload;yy(e,n,{doDeleteConfirmationDetails:r,skipMergeAssignmentsAndActions:s})})).addCase(Re,((e,t)=>{const{transientItemID:n,data:r}=t.payload;ef.setIn(e,n,r)})).addCase(ve,((e,t)=>{const{transientItems:n}=t.payload;n.forEach((t=>ef.deleteIn(e,t)))})).addCase(xe,((e,t)=>{const{transientItems:n}=t.payload;n.forEach((t=>ef.deleteIn(e,t)))})).addCase(be,((e,t)=>{const{transientItemID:n,data:r}=t.payload;Yg(ef.getIn(e,n),r)})).addCase(we,((e,t)=>{const{transientItemID:n,data:r}=t.payload;Yg(ef.getIn(e,n),r)})).addCase(Me,((e,t)=>{const{transientItemID:n,data:r}=t.payload;Object.keys(r??{}).forEach((t=>{ef.deleteIn(e,[n,t])}))})).addCase(Le,((e,t)=>{const{transientItemID:n,data:r}=t.payload;ef.deleteIn(e,n),ef.setIn(e,n,r)})).addCase(he,((e,t)=>{const{key:n,value:r}=t.payload;ef.setIn(e,`${G.SHARED}.${n}`,r)})).addCase(Be,((e,t)=>{const{context:n,data:r}=t.payload;return ef.setIn(e,n,r)}))})),Ay=Ey,_y=KI({},(e=>{e.addCase(Ae,((e,t)=>{const{propertiesToReplace:n=[],propertiesToReArrange:r=[],uiRootReference:s="",interestPath:a}=t.payload,o=s&&"string"==typeof t.payload.context?`${t.payload.context}.${s}`:t.payload.context,i="string"==typeof o?Mg(o):[],c={isArrayDeepMerge:t.payload.isArrayDeepMerge,propertiesToReplace:[...n],propertiesToReArrange:[...r]};if(s&&i.length)ef.setIn(e,i,Yg(ef.getIn(e,i),ef.getIn(t.payload.data,Mg(s)),c));else if(a){const s=ef.getIn(e[t.payload.context],a),o=ef.getIn(t.payload.data,a),i=Yg(s,o,{isArrayDeepMerge:!0}),c=ef.getIn(t.payload.data.context_data,a);zg(e[t.payload.context],[...n],[...r]),ef.setIn(e[t.payload.context],a,i),e[t.payload.context]&&c&&ef.setIn(e[t.payload.context].context_data,a,Yg(ef.getIn(e[t.payload.context].context_data,a),c,{isArrayDeepMerge:!0}))}else e[t.payload.context]=Yg(e[t.payload.context],t.payload.data,c);hy(e,t.payload,!0),py(e,t.payload)})).addCase(re,((e,t)=>{const{context:n,reference:r,value:s,isArrayDeepMerge:a}=t.payload;Kg(e[n],r,s,{isArrayDeepMerge:a})})).addCase(se,((e,t)=>{const{context:n,reference:r,value:s}=t.payload;Jg(e[n],r,s)})).addCase(_e,((e,t)=>{Hg(e[t.payload.context],t.payload.reference)})).addCase(de,((e,t)=>{ef.setIn(e[t.payload.context],"context_data.isLoading",!0)})).addCase(pe,((e,t)=>{ef.setIn(e[t.payload.context],"context_data.isLoading",!1)})).addCase(ct,((e,t)=>{const{data:n}=t.payload;py(e,{data:{shared:n}})})).addCase(lt,((e,t)=>{const{dataPagesToBeRemoved:n=[]}=t.payload;n.forEach((t=>{const{dataPageName:n,dataPageNameWithHash:r}=t;ef.deleteIn(e.shared,[n,r]);const s=ef.getIn(e.shared,[n]);s&&0===Object.keys(s).length&&ef.deleteIn(e.shared,[n])}))})).addCase(pt,((e,t)=>{const n=ef.getIn(e[t.payload.context].context_data,"blocking_action_counter",0);t.payload.isInitiateBlockingAction?ef.setIn(e[t.payload.context].context_data,"blocking_action_counter",n+1):ef.setIn(e[t.payload.context].context_data,"blocking_action_counter",n-1)}))})),Cy=_y,Sy=/\[(\d+)\]$/gi,Ty=/(\d+)/gi,Ny=/\[.\]$/gi,Py=(e,t,n,r=[G.CONTEXT_DATA,G.CASE_INFO.CASE_INFO,G.CONTENT])=>{const s=ef.getIn(t,r);if(s){const t=Io(s,[],[]);for(const s of t)ef.setIn(e[n],[...r,...s],{})}},Oy=(e,t,n,r)=>{const{property:s,pageReference:a,category:o,type:i,subType:c}=r.payload,l=ef.getIn(e[t],n);if(l&&o===G.CASEMESSAGES)ef.setIn(e[t],lo(s,a,o),"");else if(l&&l.length>0&&Array.isArray(l)){let r;r=c?l.filter((e=>!(e.type===i&&e.subType===c))):l.filter((e=>e.type!==i)),n&&n.length>0&&ef.setIn(e[t],lo(s,a,o),r)}},Dy=(e,t)=>{const{property:n,pageReference:r,category:s,isListEntry:a,deletingIndex:o,stateObj:i}=t.payload,{context:c}=t.payload;if(i)return Py(e,i,c),e;const l=lo(n,r,s,a);if(Number.isInteger(o)){ef.deleteIn(e[c],l);const t=l.slice(0,l.length-1);let n=ef.getIn(e[c],t)||{};const r=(u=Object.keys(n),[...u].sort(((e,t)=>{const n=e.match(Sy),r=t.match(Sy);if(!n&&!r)return e.localeCompare(t);if(!n&&r)return-1;if(n?.length&&r?.length){const e=n[0].match(Ty),t=r[0].match(Ty);if(e?.length&&t?.length)return parseInt(e[0],10)-parseInt(t[0],10)}return 1})));n=r.map((e=>n[e])),n.forEach(((n,s)=>{const a=r[s].match(Sy);if(a?.length){const i=parseInt(a[0].match(Ty)[0],10);i>o&&(ef.deleteIn(e[c],t.concat(r[s])),ef.setIn(e[c],t.concat(r[s].replace(Ny,`[${i-1}]`)),n))}}))}else ef.setIn(e[c],l,{});var u;return e};function Ry(e,t){const n=ef.getIn(e,t);return void 0!==n?.dataInfo?.content}const by=(e,t)=>{const n=ef.getIn(e,t);return!0===Bl.isObjectCaseType(n?.objectInfo?.objectTypeID)};function vy(e,t){let n=co.FIELD_MESSAGES_PATH;return Ry(e,t)?n=co.DATA_OBJECT_FIELD_MESSAGES_PATH:by(e,t)&&(n=co.OBJECT_FIELD_MESSAGES_PATH),n}const xy=(e,t,n)=>{n.forEach((n=>{((e,t,n)=>{const r=ef.getIn(n,G.ERROR_FIELD_IN_PAGE).slice(1),s=ef.getIn(n,G.ERROR_IN_PAGE_IDENTIFIER).slice(1);if(s){let a="caseInfo.content";Ry(e,t)?a="dataInfo.content":by(e,t)&&(a="objectInfo.content");let o=r?`${a}.${r}`:a;o=o.replace(/\(/g,"[").replace(/\)/g,"]");const i=lo(s,o,G.PROPERTY),c=ef.getIn(e[t],`${o}.classID`),l=ig(s,c),u=Vh.getLocale()??"en-US",d=new Pd(u,l?.localeReference),p={type:B.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue,...l?.label&&{fieldLabel:d.getLocalizedText(l.label)}},h=ef.getIn(e[t],i,[]);if(ef.isContains(h,p))return;ef.setIn(e[t],i,[...h,p])}})(e,t,n)}))};function wy(e,t){const{err:n,formFields:r}=t.payload;let{context:s}=t.payload;const{fieldErrors:a,pageErrors:o}=((e,t)=>{const n=new Map(t.map(((e,t)=>[e,t]))),r=e=>n.get((e=>{const t=(e.erroneousInputOutputFieldInPage||"").replace(/^\./,""),n=(e.erroneousInputOutputIdentifier||"").replace(/^\./,"");return t?`${t}.${n}`:n})(e))??Number.MAX_SAFE_INTEGER,s=e.slice().sort(((e,t)=>r(e)-r(t))),a=[],o=[];for(const e of s)il(e,t,a,o);return{fieldErrors:o,pageErrors:a}})(n.errorDetails,r),i=vy(e,s);if(ef.setIn(e,[s,...i],{}),ef.setIn(e,[s,...co.PAGE_MESSAGES_PATH],[]),a.forEach((t=>{const n=ef.getIn(t,G.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 r=t.substring(t.lastIndexOf(".")+1),a=lo(r,n,G.PROPERTY);ef.setIn(e,[s,...a],[])}}})),a.length>0&&xy(e,s,a),o.length>0){const t=(e=>{const t=[];return e.forEach((e=>{t.push({type:B.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue})})),t})(o);e[s]||(s=G.APP.APP),ef.setIn(e,[s,...co.PAGE_MESSAGES_PATH],t)}else s.includes&&s.includes(Np.WORKAREA)&&(s=K(s)),ef.deleteIn(e,[s,...co.PAGE_MESSAGES_PATH]);return e}const My=KI({},(e=>{e.addCase(Te,((e,t)=>t.payload.err.errorDetails&&("Validation fail"===t.payload.err.errorClassification||"Invalid inputs"===t.payload.err.errorClassification||(t.payload.err?.displayButtonsOnErrors?.length??0)>0)?wy(e,t):e)).addCase(Ue,((e,t)=>{const{context:n}=t.payload,r=[n,...vy(e,n)],s=[n,...co.PAGE_MESSAGES_PATH];if(ef.setIn(e,r,{}),ef.setIn(e,s,[]),n&&n.includes(Np.WORKAREA)){const t=[te(n),...co.PAGE_MESSAGES_PATH];ef.setIn(e,t,[])}})).addCase(at,((e,t)=>{const{isListEntry:n,clearAll:r,context:s}=t.payload;return r?(ef.deleteIn(e,[s,G.CONTEXT_DATA]),e):n?Dy(e,t):((e,t)=>{const{property:n,pageReference:r,category:s,isListEntry:a,stateObj:o}=t.payload,{context:i}=t.payload;let c=i;if(o)return Py(e,o,i),e;const l=lo(n,r,s,a);return s===G.PAGE&&i?.includes(Np.WORKAREA)&&(c=K(i)),Oy(e,c,l,t),Oy(e,i,l,t),e})(e,t)})).addCase(st,((e,t)=>{const{messages:n,property:r,pageReference:s,context:a,category:o}=t.payload,i=lo(r,s,o);n&&n.length>0&&Array.isArray(n)&&i&&i.length>0&&ef.setIn(e[a],lo(r,s,o),n)}))})),Ly=My,Fy=(e,t,n,r,s)=>{ef.setIn(e[t],[...n,r],s)},Uy=KI({},(e=>{e.addCase(ut,((e,t)=>{const{instruction:n,actions:r,context:s,referenceList:a,listIndex:o,groupIndex:i,listMoveToIndex:c,content:l={}}=t.payload,u=Mg(a);switch(n){case G.LIST_ACTIONS.ADD:Fy(e,s,u,i,l);break;case G.LIST_ACTIONS.INSERT:Fy(e,s,u,o,l);break;case G.LIST_ACTIONS.UPDATE:((e,t,n,r,s)=>{const a=Yg(ef.getIn(e[t],[...n,r],{}),s);ef.setIn(e[t],[...n,r],a)})(e,s,u,o??i,l);break;case G.LIST_ACTIONS.DELETE:((e,t,n,r,s)=>{const a=ef.getIn(e[t],n,[]);"string"==typeof r?delete a[r]:a.splice(r,1),ef.setIn(e[t],n,a),io.deleteListNode(t,[s],a.length)})(e,s,u,o??i,a);break;case G.LIST_ACTIONS.MOVE:((e,t,n,r,s)=>{const a=ef.getIn(e[t],[...n,r],{}),o=ef.getIn(e[t],n,[]);o.splice(r,1),o.splice(s,0,a),ef.setIn(e[t],n,o),ho(e,t,n?.join("."),r,s)})(e,s,u,o,c);break;case G.LIST_ACTIONS_TYPE.SELECT_DESELECT:((e,t,n,r)=>{const s=ef.getIn(e[t],n)||[];r.forEach((e=>{const{instruction:r,content:a,listIndex:o}=e;if(r===G.LIST_ACTIONS.SELECT){s[o]=a;const e=n?.join(".");Ai(t,e)}else delete s[o]})),ef.setIn(e[t],n,s.filter(Boolean))})(e,s,u,r);break;case G.LIST_ACTIONS_TYPE.DESELECT_ALL:((e,t,n)=>{ef.setIn(e[t],n,[])})(e,s,u);break;case G.LIST_ACTIONS.REPLACE:((e,t,n,r)=>{ef.setIn(e[t],n,r)})(e,s,u,l);break;case G.LIST_ACTIONS.DELETEPAGE:((e,t,n)=>{ef.setIn(e[t],n,{})})(e,s,u)}}))})),jy=[Cy,Ay,Ly,Uy],ky=(e,t)=>(e||(e=qy().data),t.type===ot?qy().data:(jy.forEach((n=>{e=n(e,t)})),e)),Vy={},$y=(e,t=[])=>{t.forEach((t=>{ef.deleteIn(e,[t])}))},By=(e,t)=>{const{type:n,payload:r}=t,s=n===Ue,{target:a,context:o,semanticURL:i="",root:c,containerItemID:l,childContainers:u,flowName:d,resourceType:p="",key:h="",clearView:g=!1}=r;return c?ef.setIn(e,[a,"items",l,"view"],c):g&&ef.deleteIn(e,[a,"items",l,"view"]),o&&ef.setIn(e,[a,"items",l,"context"],o),d&&ef.setIn(e,[a,"items",l,"flowName"],d),(!s||s&&h)&&ef.setIn(e,[a,"items",l,"key"],h.trim()),((e,t,n,r)=>{""===e&&ef.deleteIn(t,[n,"items",r,"key"])})(h,e,a,l),(!s||s&&i)&&ef.setIn(e,[a,"items",l,"semanticURL"],i),(!s||s&&p)&&ef.setIn(e,[a,"items",l,"resourceType"],p),$y(e,u),e},Gy=KI(Vy,(e=>{e.addCase(ot,(()=>Vy)).addCase(Ne,((e,t)=>{const{context:n,name:r,type:s,actionMgrID:a}=t.payload,o=`${n}/${r}`;if(uc.resolveActionByID(a,null,!1),e[o])return e;ef.setIn(e,[o],{type:s,accessedOrder:[],items:{}})})).addCase($e,((e,t)=>{const{containerName:n,childContainers:r=[]}=t.payload;ef.deleteIn(e,[n]),r.forEach((t=>{ef.deleteIn(e,[t])}))})).addCase(Pe,((e,t)=>{const{context:n,name:r,actionMgrID:s,childContainers:a}=t.payload,o=`${n}/${r}`;uc.resolveActionByID(s,null,!1),ef.setIn(e,[o,"accessedOrder"],[]),ef.setIn(e,[o,"items"],{}),Array.isArray(a)&&a.forEach((t=>{ef.deleteIn(e,[t])}))})).addCase(Oe,((e,t)=>{const{target:n,context:r,isInCreateStage:s,isBulkAction:a,semanticURL:o,root:i,containerItemID:c,actionMgrID:l,key:u,flowName:d,resourceType:p,actionName:h,isMinimizable:g,showProgress:f,progressMessage:m,modalOptions:I,resourceStatus:y,actionID:E,isMultiRecordData:A,acTertiary:_,parentContext:C,heading:S,isTraditionalRemoteCase:T,readOnly:N,referenceList:P,subscriptName:O,subscriptFieldName:D,pageGroupName:R,isPageGroup:b,index:v,isDeleteConfirmation:x,workId:w,caseTypeID:M,className:L,keys:F,enableBackNavigation:U}=t.payload,k=e[n],V=k&&k.type,$=k&&k.accessedOrder||[],B=k&&k.items||{};if(e[n]&&"single"===V&&$.length>0)return By(e,t);const G={accessedOrder:[...$,c],items:{...B,[c]:{view:i,semanticURL:o,key:u,flowName:d,readOnly:N,context:r,isInCreateStage:s,resourceType:p,actionName:h,isMinimizable:g,...a&&{isBulkAction:a},showProgress:f,progressMessage:m,modalOptions:I,isTraditionalRemoteCase:T,resourceStatus:y,referenceList:P,subscriptName:O,subscriptFieldName:D,pageGroupName:R,isPageGroup:b,index:v,...E&&{actionID:E},..._&&{acTertiary:_},...A&&{isMultiRecordData:A},...C&&{parentContext:C},...x&&{isDeleteConfirmation:x,workId:w,caseTypeID:M,className:L,keys:F,enableBackNavigation:U},heading:S}}};uc.resolveActionByID(l,null,!1),e[n]=j()(e[n],G)})).addCase(Ue,((e,t)=>{const{actionMgrID:n,data:r}=t.payload;try{By(e,t),uc.resolveActionByID(n,r,!1)}catch{uc.rejectActionByID(n,!1)}})).addCase(ke,((e,t)=>((e,t)=>{const{actionMgrID:n,data:r,target:s,containerItemID:a}=t.payload;let o=e;try{const i=e&&e[s]?.type;let c=e&&e[s]?.accessedOrder||[];c="single"===i?c.length>0?c:[...c,a]:c.includes(a)?c:[...c,a],ef.setIn(e,[s,"items",a,"transientItems"],[]),ef.setIn(e,[s,"accessedOrder"],c),o=By(e,t),uc.resolveActionByID(n,r,!1)}catch{uc.rejectActionByID(n,!1)}return o})(e,t))).addCase(Fe,((e,t)=>{const{target:n,containerItemID:r,actionMgrID:s}=t.payload;try{const t=ef.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));t.push(r),ef.setIn(e,[n,"accessedOrder"],t),uc.resolveActionByID(s,null,!1)}catch{uc.rejectActionByID(s,!1)}})).addCase(je,((e,t)=>{const{target:n,containerItemID:r,actionMgrID:s,childContainers:a}=t.payload;try{const t=ef.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));ef.setIn(e,[n,"accessedOrder"],t),ef.deleteIn(e,[n,"items",r]),$y(e,a),uc.resolveActionByID(s,null,!1)}catch{uc.rejectActionByID(s,!1)}})).addCase(De,((e,t)=>{const{target:n,containerItemID:r,actionMgrID:s,childContainers:a}=t.payload;try{const t=ef.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));ef.setIn(e,[n,"accessedOrder"],t),ef.deleteIn(e,[n,"items",r]),$y(e,a),uc.resolveActionByID(s,null,!1)}catch{uc.rejectActionByID(s,!1)}})).addCase(Re,((e,t)=>{const{transientItemID:n,target:r,contextName:s}=t.payload,a=ef.getIn(e,[r,"items",s,"transientItems"])??[];ef.setIn(e,[r,"items",s,"transientItems"],[...a,n])})).addCase(xe,((e,t)=>{const{target:n,containerItemID:r}=t.payload;ef.deleteIn(e,[n,"items",r,"transientItems"])})).addCase(ve,((e,t)=>{const{target:n,transientItemID:r,containerItemID:s}=t.payload,a=(ef.getIn(e,[n,"items",s,"transientItems"])??[]).filter((e=>e!==r));ef.setIn(e,[n,"items",s,"transientItems"],a)}))})),Wy=Gy;let Hy={};const qy=()=>Hy,zy=e=>((e=>{const t=e.Data||e.data,{uiResources:n={}}=e,r=n[G.CONTEXT_DATA]||e[G.CONTEXT_DATA];Hy={data:{[G.APP.APP]:{...t,[G.CONTEXT_DATA]:r}},containers:{}}})(e),{data:ky,containers:Wy});function Yy(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Eu(e),r=function(e,t){return"number"==typeof yu(e)?e.pop():t}(e,1/0),s=e;return s.length?1===s.length?xa(s[0]):function(e){return void 0===e&&(e=1/0),mu(_a,e)}(r)(Ba(s,n)):_u}const Ky=(e,t=!1)=>e===G.ACTION?t?ad.REFRESH_CASE_DATA:ad.REFRESH_ASSIGNMENT_DATA:ad.REFRESH_CASE_VIEW,Jy=e=>{const{context:t}=e;let n={...nl(t).content,contextData:!1};const r=Tl(t);ef.isEmpty(r)||(n=Sl(r,n));const s=Ky(e.editType,e.isLocalAction),{restApi:a,reqType:o}=rm(s,{ID:e.isLocalAction||e.editType!==G.ACTION?e.ID:e.assignmentID,actionID:e.actionID,viewID:e.viewID});let i=a;return e.editType===G.ACTION&&(i+=`?operation=${e.operationFlag}`,n.interestPageActionID=e.interestPageActionID),n.interestPage=e.interestPage,Ba(Ko(i,{method:o,body:n,headers:e.headers},t)).pipe(fu((t=>({actionInPayload:e,response:t.data,headers:tl(t.headers)}))),Su(": Error occurred during ajax call : ",t))},Xy={},{VIEW:Qy,FIELD:Zy}=G.CONTEXT_TREE_NODE_TYPES,eE=(e,t,n)=>{const r=t.value.data[n]?.objectInfo?.headers,s=t.value.data[n]?.caseInfo?.headers;return e&&r?r:s},tE=e=>(e=>$o[e])(e)>0&&Xy[e],nE=(e,t)=>{const{caseWideAction:n,caseViewAction:r,fieldsWithDeclarativeTargets:s,fieldsWithWhen:a,isViewsWithWhen:o,interestPage:i,options:c,isMultiRecordData:l,editType:u,isLocalAction:d,interestPageActionID:p}=e,{optionalPayload:h}=c;h&&(t.content={...h});let g={},f={...t},m=ad.REFRESH;if(r||l&&u===G.ACTION){const t=Ky(u,d);l&&u===G.ACTION&&(f.interestPageActionID=p),g=rm(t,e),f={...f,interestPage:i}}else o?g=((e,t)=>{const{isObjectType:n,isExternalObject:r,actionID:s,context:a}=e;if(t||n&&Qd(a))return rm(r&&"Create"===s?ad.REFRESH_EXTERNAL_OBJECT:ad.REFRESH_CASE_DATA,e);return rm(ad.REFRESH_ASSIGNMENT_DATA,e)})(e,n):(s.length>0||a.length>0)&&({restAPI:g,requestBody:f,requestType:m}=((e,t,n,r,s)=>(s={...s,calculations:{fields:t,whens:n}},{restAPI:rm(r?ad.RECALCULATE_CASE_DATA:ad.RECALCULATE_ASSIGNMENT_DATA,e),requestBody:s,requestType:ad.RECALCULATE}))(e,s,a,n,f));return{restAPI:g,requestBody:f,requestType:m}},rE=[(e,t)=>e.pipe(hu(ad.REFRESH_DATA,Ct),fu((e=>e.payload)),mu((e=>{const{context:n,contextData:r,options:s,isObjectType:a}=e,{propertyName:o="",classID:i="",isObjectWideAction:c}=s,l=nl(n,{skipUUID:a,isObjectWideAction:c});let u=[],d=[],p=!1;Vh.getFeatureMap().granularUIRefresh?(({fieldsWithDeclarativeTargets:u=[],whens:d=[]}=rp(n)),p=d.some((e=>e.type===Qy))):p=!0;const h=d.filter((e=>e.type===Zy)),g=ef.getPropertyName(o),f=g?g.split("."):[],m=f.pop(),I=f.join("."),y=[];I&&((e,t,n,r,s)=>{const a=ig(e,t);if(!a||"copy"!==a.dataRetrievalType)return;const o=ef.getIn(n,`content.content.${e}`);if(!o||"object"!=typeof o)return;const i=r?Object.keys(o).filter((e=>e!==r)):Object.keys(o);i.length>0&&(i.forEach((e=>delete o[e])),s.push(e))})(I,i,l,m,y),e.serverPrecedenceFields=y;let E={...l.content,contextData:r};const A=Tl(n);ef.isEmpty(A)||(E=Sl(A,E));const _=nE({...e,fieldsWithDeclarativeTargets:u,fieldsWithWhen:h,isViewsWithWhen:p},E);id.registerBlockingAction(n).catch((()=>{}));const{restAPI:C,requestBody:S,requestType:T}=_;(e={...e,requestType:T}).requestType=T;const{reqType:N,restApi:P}=C,O={...eE(a,t,n)};O&&!O.etag&&e.isMultiRecordData&&e.editType===G.ACTION&&(O.etag=ef.getETag(e.context));return Ba(((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 r=(e=>{const{ID:t,actionID:n,context:r}=e;return`${t}.${r}.${n}`})(t);if(t.interestPage&&(e.interestPage=t.interestPage),tE(r)){const t=[];for(let n=0;n<Xy[r].length;){const s=Xy[r][n],a=np(s,e);if("CANCEL_REFRESH"===a){const e=new Error;return e.code="ERR_CANCELED",Promise.reject(e)}!0===a&&(t.push(n),s.cancelConfig?.cancel()),n+=1}t.forEach((e=>{Xy[r].splice(e,1)}))}const s=Qo();return e.signal=s.token,e.cancelConfig=s,Xy[r]?Xy[r].push(e):Xy[r]=[e],No.publish(G.ON_REFRESH_START,{context:n}),Ko(e.url,e,n,{cancelContext:r}).then((e=>(delete Xy[r],e))).catch((e=>{throw e&&"ERR_CANCELED"!==e.code&&delete Xy[r],e}))})({reqHeaders:O,context:n,method:N,body:S,url:tp(e,P)},e)).pipe(fu((t=>{const r=((e,t,n)=>{if(!Bl.isObjectCaseType(t)&&!n)return e;const r=ef.getIn(e?.data,B.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID);return Bl.isExternalObject(r)?e:$.transformCaseData(e)})(t?.data,s?.classID,a);return s?.resetForm&&io.removeContextTreeNode(n),{response:{...r},actionConfig:e,actionMgrID:e.options.actionMgrID,headers:tl(t.headers)}})),Su(": Error occurred during fetch call at refreshData Epic : ",e.context,e?.options?.actionMgrID))})),mu((async e=>{if(e&&e.type===Te)return id.deRegisterBlockingAction(e.payload?.context).catch((()=>{})),"ERR_CANCELED"===e.payload?.err?.code?[]:(No.publish(G.ON_REFRESH_ERROR,{context:e.payload?.context}),cl(e));const{actionConfig:t,response:n,actionMgrID:r}=e,{context:s,serverPrecedenceFields:a,requestType:o}=t,i=pc.getTargetViewContainerName(Ge),c=wt(i,s),l={acName:c,context:s},u=Rd(n,{[B.STOPMERGEACTIONS]:!0,[B.ACTIONS.DELETEAVIALACTIONS]:!0});u.directUrlUpdation=!1,o===ad.REFRESH&&await sl(u,t,l);const d=rl(u,{target:c,context:s});t.interestPage&&(d.interestPath=`caseInfo.content${ef.convertClipboardPageToPageRefNotation(t.interestPage)}`),d.isArrayDeepMerge=t.options?.isArrayDeepMerge,d.preserveClientChanges=void 0===t.options?.preserveClientChanges||t.options.preserveClientChanges;const p=Bl.getPropertiesToReArrange(s),h=jf(df,d,{serverPrecedenceFields:a,propertiesToReArrange:p}),g=h.payload?.data?.pageInstructions;return g?.length>0&&(delete h.payload?.data?.pageInstructions,Dl.mergeServerPageInstructions(s,g)),Ug(h),uc.resolveActionByID(r,d),No.publish(G.ON_REFRESH_COMPLETE,{context:s}),id.deRegisterBlockingAction(s).catch((()=>{})),[]})))],sE=rE,aE=[e=>e.pipe(hu(it),mu((async e=>{const{context:t}=e.payload,n={},r={},s=Object.keys(e.payload.datapages).map((s=>{const a=e.payload.datapages[s];if(a.mode===G.READONLY&&a?.refreshStrategy){const{timeoutSecs:e="",type:t=""}=a?.refreshStrategy||{},n=kg()?.[a.name];if(n&&s in n){const r=n[s],{loadTime:a}=r;if(!xu.isTimeElapsed(a,e,t))return}}return xu.getData(a.name,{dataViewParameters:a.dataViewParameters},t).then((e=>{const t=a.mode===G.READONLY?r:n;t[a.name]?t[a.name][s]={pxResults:e.data.data,parameters:a.dataViewParameters,loadTime:e.data?.fetchDateTime}:t[a.name]={[s]:{pxResults:e.data.data,parameters:a.dataViewParameters,loadTime:e.data?.fetchDateTime}}})).catch((()=>{}))}));await Promise.allSettled(s);const a=[];return Object.keys(n).length&&a.push(df({context:t,data:n})),Object.keys(r).length&&a.push(Vf({data:r,context:t})),Ug(a),[]})))],oE=aE;class iE{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=()=>s.g;getUniqueId=()=>this.getGlobalObject().uniqueId;setUniqueId=()=>{this.getGlobalObject().uniqueId=(new Date).getTime()};initBroadcastChannel=()=>{this.setUniqueId(),this.broadcastChannel=new BroadcastChannel("coexistence"),this.broadcastChannel.onmessage=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId())switch(e.data.action){case iE.DISPLAY_DIRTY_POPUP:this.displayDirtyPopup(e);break;case iE.LOAD_PREVIEW:this.loadPreview(e);break;case iE.UPDATE_COEXISTENCE_DRILLDOWN_CASE:this.updateCoexistenceDrilldownCase(e);break;case iE.OPEN_ASSIGNMENT_ACTION:this.openAssignment(e);break;case iE.GET_NEXT_WORK_ACTION:this.getNextWork(e);break;case iE.OPEN_WORK_BY_HANDLE:this.openWorkByHandle(e);break;case iE.CLOSE_CONTAINER_ACTION:this.closeContainer(e);break;case iE.CANCEL_CASE:this.handleCaseCancel();break;case iE.CREATE_WORK:this.createWork(e)}}};displayDirtyPopup=e=>{this.broadcastEventToIframe=e.data.fromInfinity,this.isDirtyDialogActive||(e.data.isFormDirty?(No.publish(G.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0):this.callback?.call(this))};handleCaseCancel=()=>{const e=Hp(B.APP.APP),t=e[e.length-1],n=kp(t),r=jg(n)?.caseInfo?.ID;if(r&&n&&$d({}).getPConnect().getActionsApi().getDescendants(r,n),Vc(n)){const e=Th(n);e&&$d({}).getPConnect().getActionsApi().getDescendants(r,e)}};loadPreview=e=>{const{pyID:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){$d({}).getPConnect().getActionsApi().showCasePreview(t,{caseClassName:n})}};navigateToDefaultPage=()=>{const e=$d({isRoot:!0}),t=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages;let n;Array.isArray(t)&&t[0]&&(n=t[0]);const r=n?.pyClassName||"Data-Portal",s=n?.pyRuleName||"pyHome";e.getPConnect().getActionsApi().showPage(s,r)};closeContainer=e=>{const{uniqueId:t}=e.data;t===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{const{key:t,caseClassName:n,actionApi:r,caseLabel:s,uniqueId:a}=e.data;if(a!==this.getUniqueId())return;let o=r;r===iE.OPEN_WORK_ITEM&&(o=iE.OPEN_WORK_BY_HANDLE),jh.updateSemanticURLAndDocumentTitle({key:t,caseClassName:n,actionName:o,name:s});$d({}).getPConnect().getActionsApi().updateRecents(n,t.substring(t.lastIndexOf(" ")+1),s,t)};openAssignment=e=>{const{pzInsKey:t,caseClassName:n,uniqueId:r}=e.data;if(r===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)){$d({}).getPConnect().getActionsApi().openAssignment(t,n,{containerName:B.PRIMARY,context:B.APP.APP})}this.onCreateCallback=null,this.openAssignmentParams=null}};getNextWork=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId()){const e=`${B.APP.APP}${G.FORWARD_SLASH_STRING}${B.PRIMARY}`;$d({meta:{},options:{context:Gp(e)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{const{key:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){const e=`${B.APP.APP}${G.FORWARD_SLASH_STRING}${B.PRIMARY}`;$d({meta:{},options:{context:Gp(e)}}).getPConnect().getActionsApi().openWorkByHandle(t,n)}};createWork=e=>{const{strClassName:t,uniqueId:n,strFlowParams:r,caseInitProperties:s}=e.data;if(n===this.getUniqueId()){const e=`${B.APP.APP}${G.FORWARD_SLASH_STRING}${B.PRIMARY}`,n=$d({meta:{},options:{context:Gp(e)}}),a=new URLSearchParams((s+r).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),No.subscribe(B.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),No.subscribe(B.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{No.unsubscribeAllWithEventType(B.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),No.unsubscribeAllWithEventType(B.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:iE.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:iE.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:iE.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=t,this.openAssignmentParams=n}}const cE=new iE,lE="nextAssignmentInfo",uE="nextAssignmentInfo.context",dE=e=>{const{containerName:t,isInCreateStage:n}=e;return n?G.MODAL:t||pc.getTargetViewContainerName(Ke)},pE=e=>Yp(e)?{continueExecution:!0,removeActionPayload:{}}:hl(e),hE=e=>{const t=ef.getIn(e,[G.DATA,G.CASE_INFO.CASE_INFO]);return Wl(t)&&Hl(Vh.getOperatorIdentifier(),t)},gE=(e,t)=>{const{class:n,context:r,viewType:s=Zc.PAGE}=e,{removeActionPayload:a}=t;let o=e?.pageName?e?.pageName:Vh.getDefaultCasePage();return e.isTraditionalUICase&&(o="pyDetails"),Ba(zi.createCase(n,{...e,pageName:o,viewType:s,context:r})).pipe(fu((({response:t,headers:n})=>($.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:a}))),Su("Error occurred during ajax call at createWork Epic : ",r))},fE=e=>{No.publish(G.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,e)},mE=e=>{No.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)},IE=e=>{No.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.CASE_VIEW_OPENED_AFTER_CREATE,e)},yE=e=>{let t=0,n=[],r={},s=!1;return e.pipe(hu(cf),Tu(100),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>{const{context:n}=e,r=dE(e),a=wt(r,n),{continueExecution:o,removeActionPayload:i}=pE(a);return s=Wc(e.class),o?(e.isTraditionalUICase=s,gE(e,{removeActionPayload:i})):(uc.rejectActionByID(t),Cu())})),mu((async e=>{if(e&&e.type===Te)return e.payload.context=yh(),n.push(cl(e)),n;const{actionInPayload:a,response:o,headers:i,removeActionPayload:c}=e;let l;l=!(a.renderInline||Vh.getDefaultCasePage()||s)&&hE(o),ef.setIn(o.data,B.CASE_INFO.IS_FIRST_ASSIGNMENT,!0);const u=dE({...a,isInCreateStage:l}),d=wt(u,a.context),p=ul(d,u,a.context);if(!Rc(u)&&Yp(d)){const{continueExecution:e}=hl(d);if(!e)return uc.rejectActionByID(t),Cu()}if(!(a?.openCaseViewAfterCreate??!0)&&!l){const e=jc(o),{businessID:t,caseType:s,resolvedURL:a}=_c(o);return r={id:t,label:s,href:a},fE(r),mE({caseId:t,assignmentId:e,caseType:s}),n}const h=Rd(o),g=String(Mc(Uc(h)));let f=tm("createWork",{caseClassName:Lc(h)});f=f.replace(/{.+?}/,g),h.semanticURL=f,cc.setComponentCache(g,ko.addDebugHeaders(a.debugInfo)),((e,t)=>{const n=hE(e),{skipBrowserSemanticUrlUpdate:r=!1,isTraditionalUICase:s}=t,a=s&&!Hc();ef.setIn(e,["directUrlUpdation"],(!n||a)&&!r)})(h,a);const m={acName:d,context:p},I=Yc(p);await sl(h,a,m);const y={target:d,context:p,containerItemID:p,headers:i,semanticURL:f,isInCreateStage:l,isMinimizable:l,caseViewMode:h.confirmationNote?G.REVIEW_MODE:G.PERFORM_MODE,currentCaseViewMode:I,assignmentContext:ef.getIn(h,uE),nextAssignmentInfo:ef.getIn(h,lE),resourceType:B.CASE,openCaseViewAfterCreate:a.openCaseViewAfterCreate,modalOptions:a.modalOptions,debugInfo:a.debugInfo};$c(y,h);const E=rl(h,y);s&&(E.data.caseInfo.content.coexistenceAction="openAssignment"),Bl.setTraditionalGadgetId(E.data);const A=ll(d,E);return dl(A)&&kc(n,{removeActionPayload:c,target:d}),n.push(A),El(n),IE({caseId:g}),n})),fu((()=>{const e=Hc(),a=Wl(ef.getIn(n[0]?.payload,"data.caseInfo"));return s&&e&&a?cE.postCreateCaseMessage(n[0]?.payload?.nextAssignmentInfo?.ID,Cl,n):Cl(n),Gc(n,t),r={},n=[],n})))},{RESOURCE_TYPES:EE}=B,AE=(e,t=[])=>{const{viewType:n,containerName:r,targetContainerName:s,isChild:a}=e,o=wc(t);return(e=>{if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1)if(n[e].ID===t)return"manual"===n[e].transitionType}return!1})(o)&&e?.stageID===o.stageID?Zc.PAGE:n||(!Dc(r)&&!Dc(s)||a?Zc.PAGE:Zc.FORM)},_E=(e,t,n,r,s)=>{if(kc(e,{removeActionPayload:t,target:n}),((e,t)=>{const n=kp(t);let r=null;return n&&(r=Rp(t,n)),r?.key===e&&Kp(t)})(r.key,n))r.context=Gp(n),r.containerItemID=r.context,e.push(jf(Mf,r));else if((s?.isChild||s?.isRemote)&&s?.isMultiDoc){const t=rh(s.context);r.target=t,r.context=s.context,r.containerItemID=s.context,e.push(jf(Mf,r))}else{const t=rh(r.context),n=Mp(t,r.key);n?(r.target=t,r.context=n,r.containerItemID=n,e.push(jf(Mf,r))):e.push(jf(Ef,r))}},CE=(e,t,n,r,s,a,o)=>{Yp(t)&&Jp(t)?((e,t,n,r,s)=>{AE(e,t)===Zc.FORM?(n.caseViewMode=r||G.PERFORM_MODE,s.push(jf(Nf,n))):s.push(jf(Mf,n))})(r,s,e,a,n):_E(n,o,t,e,r)},SE=({restUrl:e,reqType:t,requestHeaders:n,debugInfo:r,context:s,isGetNextWork:a,doNotMergeMessagesForStatusCode:o})=>Ko(e,{method:t,headers:{"if-match":n&&n.etag,...n,...r&&{...ko.addDebugHeaders(r)}}},s,{doNotMergeHttpMessagesForStatusCode:a?o:""}),TE=(e,t)=>{const n=AE(e),{headers:r,context:s,assignmentID:a,isGetNextWork:o,debugInfo:i,isOpenStage:c,stageID:l,caseID:u,jsActionQueryParams:d,isLastStepInCreateStage:p}=e;let h,g;({restApi:h,reqType:g}=o?rm("getNextWork",{viewType:n}):c?rm("openStage",{caseID:u,stageID:l}):rm(Ye,{assignmentID:a,viewType:n}));const{removeActionPayload:f}=t,m=Vh.getDefaultCasePage();let I="",y=e.pageName;e.isTraditionalUICase&&(y="pyDetails"),I=m?`${h}?viewType=${n}&pageName=${m}`:y?`${h}?viewType=${n}&pageName=${y}`:`${h}?viewType=${n}`,d&&Object.keys(d).forEach((e=>{I+=`&${e}=${d[e]}`}));const E=(e=>{let t=e?.headers??{};return e?.isRemote&&(t=tl(t,e.remoteClassName)),t})(e);return Ba(SE({restUrl:I,reqType:g,requestHeaders:E,debugInfo:i,context:s,isGetNextWork:o,doNotMergeMessagesForStatusCode:"404"})).pipe(fu((e=>{if(Vh.isCoexistenceAppOfType(G.APP_TYPE.UIKIT)&&!p){return Wl(e.data.data.caseInfo)?e:(I=y?I.replaceAll(y,"pyDetails"):I,Vh.setDefaultCasePage("pyDetails"),{isReloadWithDifferentViewTypeRequired:!0,restUrl:I})}return e})),mu((e=>e?.isReloadWithDifferentViewTypeRequired?SE({restUrl:I,reqType:g,requestHeaders:E,debugInfo:i,context:s,isGetNextWork:o,doNotMergeMessagesForStatusCode:"404"}):Au(e))),fu((t=>{const{key:s,flowName:o}=ol(a);return $.analyseResponse(t),{response:{...t.data,key:s,flowName:o},actionInPayload:e,viewType:n,removeActionPayload:f,headers:tl({...r,...t.headers})}})),Su("Error occurred during ajax call at openAssignment Epic : ",s))},{RESOURCE_TYPES:NE}=B,PE=e=>{const t="Browser"===Vh.getRuntime();let n=0,r=[];const s=[];let a=!1,o=!1;return e.pipe(hu(tu),fu((e=>(({actionMgrID:n}=e.payload),{...e.payload,...t?{insKey:e.payload.assignmentID}:{assignmentID:e.payload.assignmentID}}))),mu((e=>{a=e.isGetNextWork;const{context:t}=e;let r;r=(e?.isChild||e?.isRemote)&&e?.isMultiDoc?Zc.FORM:AE(e),e.viewType=r;const s=Pc(Ye,e),i=wt(s,t),{activate:c,activateContainerActionPayload:l}=fl(NE.ASSIGNMENT,i,e);if(c&&!e.isParallelCall)return Au({type:Fe,activateContainerActionPayload:l,actionInPayload:e});const u=kp(i);let d;d=l?.isParallelAssignment?{continueExecution:!0,removeActionPayload:{}}:u?hl(i):{continueExecution:!0,removeActionPayload:{}};const{continueExecution:p,removeActionPayload:h}=d;return p?(o=Wc(e.className),e.isTraditionalUICase=o,Vh.isWSSPortal()&&(e.headers={...e.headers,[G.X_ORIGIN_CHANNEL]:"WSS"}),TE(e,{removeActionPayload:h})):(uc.rejectActionByID(n),Cu())})),mu((async e=>{if(e?.type===Te){if(a){const{payload:t}=e,{err:n}=t,r=n.response.status;s.push({status:Number(r)})}return r.push(cl(e)),r}const{type:t,actionInPayload:n,response:i,viewType:c,headers:l,removeActionPayload:u,activateContainerActionPayload:d}=e;if("openStage"===i?.redirectInfo?.jsAction){const e=i?.redirectInfo?.stageID,t=tu,s=i?.data?.caseInfo?.ID;n.isOpenStage=!0,n.stageID=e,n.jsActionQueryParams=i?.redirectInfo?.jsActionQueryParams;const a={type:t,payload:{...n,caseID:s,headers:l}};return r.push(a),r}const{context:p,caseViewMode:h,debugInfo:g}=n,f=i?.data?.caseInfo?.caseTypeID;o=Wc(f),n.isTraditionalUICase=o;let m=((e,t)=>{const n=wc(e);let r;r=!Vh.getDefaultCasePage()&&Wl(n);const{isChild:s,containerName:a,isTraditionalUICase:o}=t,i=s&&r,c=r&&!t.isActionFromToDoList;return!i&&!c||o?a||Pc(Ye,t):G.MODAL})(i,n);o&&(m=n.containerName??m);const I=wt(m,p);if(t===Fe)return await(async(e,t,n)=>{const{semanticURL:r,containerItemID:s,isParallelAssignment:a,insKey:o}=t,{target:i,actionInPayload:c}=n,{skipBrowserSemanticUrlUpdate:l=!1}=c,u=Bp(s);await sl({directUrlUpdation:!l,semanticURL:r},c,{acName:i,target:i,context:u}),e.push(jf(Rf,{containerItemID:s,target:i,isParallelAssignment:a,insKey:o,resourceType:EE.CASE,context:u,doDeleteCaseSummary:c.doDeleteCaseSummary}))})(r,d,{actionInPayload:n,target:I}),El(r),r;const y=i?.data?.caseInfo?.content,E=i?.data?.caseInfo?.ID,A=i?.uiResources?.root?.config?.name,_=i?.uiResources?.root?.config?.context;y&&!y.pyViewName&&A&&"page"!==n.viewType&&(ef.setIn(y,"pyViewName",A),ef.setIn(y,"pyViewContext",_));const C=Rd(i);((e,t)=>{const n=wc(e),r=Uc(e),s=Wl(n),{skipBrowserSemanticUrlUpdate:a=!1,viewType:o,isTraditionalUICase:i}=t,c=i&&!Hc(),l=o===Zc.PAGE&&(!s||c)&&!a,{caseTypeID:u}=n;if(l){const t=tm(ze,{caseClassName:u}).replace(/{.+?}/,String(Mc(r)));e.semanticURL=t,e.directUrlUpdation=!0}})(C,n);const S=ul(I,m,p),T=n.debugInfo||{};T?.debugId||(T.debugId=ko.getCoreHeadersFromContext(p)?.debugInfo?.[G.COREHEADER_APP_DEBUG_ID]),T&&T.debugId&&cc.setComponentCache(E,ko.addDebugHeaders(T));const N={acName:I,target:I,context:S};await sl(C,n,N);const P={target:I,context:S,containerItemID:S,headers:l,parentContext:K(n?.context),isMinimizable:Wl(ef.getIn(C,"data.caseInfo")),doDeleteCaseSummary:n.doDeleteCaseSummary,acTertiary:n.acTertiary,resourceType:B.ASSIGNMENT,debugInfo:g};$c(P,C,{skipFlowNameUpdate:n?.caseViewMode===G.REVIEW_MODE});const O=rl(C,P);return n.isProcessAction&&(O.data.isProcessAction=n.isProcessAction),o&&(O.data.caseInfo.content.coexistenceAction="openAssignment"),Bl.setTraditionalGadgetId(O.data),((e,t)=>{e.acTertiary&&(t.data.caseInfo.isFirstAssignment=e.acTertiary)})(n,O),CE(O,I,r,n,i,h,u),((e,t)=>{if(e=q.getRemoteCaseClassBySourceClass(e)??e,q.isRemoteCase(e)){const{RemoteClassName:n,RemoteSystemID:r,name:s}=q.getRemoteCase(e);if(t.headers?.RemoteSystemID||uc.setRemoteCaseHeaderByContext(t,r),q.isTraditionalRemoteCase(e)){t.assignmentID=t.assignments?.[0]?.ID;const r={className:e,name:s,action:Tt,remoteClassName:n};uc.setTraditionalRemoteCaseParams(t,r)}}})(f,O.data.caseInfo),c===Zc.FORM&&Vc(O.containerItemID)&&(O.skipMergeAssignmentsAndActions=!1,_l(O,r,_)),El(r),(e=>{No.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,e)})({actionInContext:p,assignmentID:n.assignmentID,caseKey:O.key}),r})),fu((()=>{const e=n,t=Hc(),a=Wl(ef.getIn(r[0]?.payload,"data.caseInfo"));return o&&t&&a?cE.postCreateCaseMessage(r[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,Ug,r):Ug(r),Gc(r,e,s),r[0]?.payload?.isParallelAssignment&&Ug({type:tu,payload:{...r[0].payload,isParallelCall:!0}}),r=[],r})))},OE=(e,t)=>{const{insKey:n,headers:r,context:s,debugInfo:a,viewType:o}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:Vh.getDefaultCasePage(),l=rm(ze,{caseID:n,params:{pageName:c}});let{restApi:u}=l;const{reqType:d}=l;return"none"===o&&(u=`${u?.split("viewType")[0]}viewType=none`),Ba(Ko(u,{method:d,headers:{...r,...a&&{...ko.addDebugHeaders(a)}}},s)).pipe(fu((t=>($.analyseResponse(t),{response:t.data,actionInPayload:e,headers:tl({...r,...t.headers}),removeActionPayload:i}))),Su("Error occurred during ajax call at openWorkByHandle Epic : ",s))},DE="OPEN_WORK_BY_HANDLE",{RESOURCE_TYPES:RE}=B,bE=async(e,t,n)=>{const{actionInPayload:r,activateContainerActionPayload:s,type:a,response:o,removeActionPayload:i,headers:c}=e,{context:l,skipBrowserSemanticUrlUpdate:u,debugInfo:d}=r,p=Pc(ze,r),h=wt(p,l);if(bc(a))await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:r},actionInPayload:s,actionInPayload:{context:a,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=Pc(ze,s),l=wt(c,a),u=Bp(r);await sl({directUrlUpdation:!o,semanticURL:n},s,{acName:l,containerName:c,target:l,context:u}),e.push(jf(Rf,{containerItemID:r,target:l,context:u,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:s,actionInPayload:r});else{const s=ul(h,p,l,{buildNew:!0}),a=Rd(o),g=((e,t)=>{const{isRemoteCase:n,remoteCaseClass:r}=t,s=Uc(e),a=n?r:Lc(e);let o=tm(ze,{caseClassName:a},{id:t?.insKey});return o=o?.replace("{workID}",String(Mc(s)))?.replace("{id}",t?.insKey),o})(a,r);a.semanticURL=g,a.directUrlUpdation=!u;const f={acName:h,context:s};await sl(a,r,f);const m=rl(a,{target:h,context:s,containerItemID:s,semanticURL:g,headers:c,debugInfo:d});m.caseViewMode=G.REVIEW_MODE,m.resourceType=RE.CASE,n&&(m.data.caseInfo.content.coexistenceAction="openWorkByHandle",m.data.caseID=m.data.caseInfo.ID),Bl.setTraditionalGadgetId(m.data),$c(m,a,{skipFlowNameUpdate:!0}),m.currentCaseViewMode=Yc(e?.actionInPayload?.context);const I=ll(h,m);i.containerItemID&&dl(I)&&t.push(jf(vf,{containerItemID:i.containerItemID,target:h})),t.push(I)}El(t);const g=r.insKey;Tc({caseKey:g,actionInContext:l})},vE=e=>{let t=0,n=[];return e.pipe(hu(DE),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>{const{context:n,isChild:r,viewType:s}=e,a=Pc(ze,e),o=wt(a,n);let i,c=!0;if("none"!==s){const e=hl(o);c=e.continueExecution,i=e.removeActionPayload}if(!c)return uc.rejectActionByID(t),Cu();let{activate:l,activateContainerActionPayload:u}=fl(RE.CASE,o,e);const d=Yp(o);if(!l&&!d&&e.insKey&&o){const t=((e,t)=>{const n=Mp(e,t);if(!n)return null;const r=Rp(e,n);if(r?.resourceType!==RE.ASSIGNMENT||"string"!=typeof r?.context||""===r.context)return null;const s=jg(r.context),a=!!s?.caseInfo?.parentCaseInfo,o="string"==typeof r.semanticURL?r.semanticURL.trim():"";return a&&o?{target:e,containerItemID:n,semanticURL:o,insKey:t}:null})(o,e.insKey);t&&(l=!0,u=t)}return l&&!r&&"none"!==s?(Nl(u),Au({type:Fe,activateContainerActionPayload:u,actionInPayload:e})):OE(e,{removeActionPayload:i})})),mu((async e=>{if(e&&vc(e.type))return n.push(cl(e)),n;const t=jg(e?.actionInPayload?.context),r=Wc(e?.actionInPayload.className);if("none"===e?.actionInPayload?.viewType){if("perform"!==t?.context_data?.caseViewMode){const t=Rd(e?.response),s={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:dt,payload:{context:s.context,doDeleteConfirmationDetails:!1}}),r&&s.data.caseInfo?.content&&(s.data.caseInfo.content.coexistenceAction="openWorkByHandle",s.data.caseID=s.data.caseInfo.ID),Bl.setTraditionalGadgetId(s.data),n.push(jf(df,s));const a=rh(e?.actionInPayload?.context),o=Oc(e?.actionInPayload?.context),i=Object.freeze({target:a,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:o});if(Vc(e?.actionInPayload?.context)){const t=rl(e?.response,{...i});_l({...t,isArrayDeepMerge:!0},n)}}}else await bE(e,n,r);return n})),fu((()=>(Ug(n),Gc(n,t),n=[],n))))},xE="FINISH_ASSIGNMENT",{RESOURCE_TYPES:wE}=B,ME=(e,t)=>{const{containerItemID:n,context:r,actionMgrID:s,isInCreateStage:a,isModalAction:o}=t;if(a&&o){const t=Oc(n),a=wt(t,r);e.push(jf(Rf,{containerItemID:n,target:a,actionMgrID:s}))}},LE=(e,t)=>{const{containerItemID:n,skipReleaseLockRequest:r,isInCreateStage:s,isProcessAction:a}=t,o=Bp(n),i=`${o?.includes("root")?G.APP.ROOT:G.APP.APP}/${Np.MODAL}`;e.push(jf(vf,{containerItemID:n,context:o,target:i,skipReleaseLockRequest:r,isInCreateStage:s,isProcessAction:a}))},FE=e=>$g(".openCaseViewAfterCreate",G.CONTEXT_DATA,e)??!0,UE=async(e,{translatedDXAPIResponse:t,actionInPayload:n},r,s,a)=>{const{caseID:o}=n,i=(c=t,ef.getIn(c,Nc.NEXT_ASSIGNMENT_INFO_ID,G.EMPTY_STRING));var c;const l=s?mc(t):Lc(t),{caseViewMode:u,headers:d,semanticURL:p,actionMgrID:h,directUrlUpdation:g,key:f,flowName:m,resourceType:I}=r,y=rh(n?.context),E=Rp(y,n?.context)?.acTertiary;Object.assign(a,{caseId:o,assignmentId:i,caseType:l,isSubmitFromBlendedUI:E}),LE(e,{...n,skipReleaseLockRequest:!0});const A=`${n?.containerItemID.includes("root")?G.APP.ROOT:G.APP.APP}/${Np.PRIMARY}`,_=ul(A,Np.PRIMARY),C=ko.getCoreHeadersFromContext(n.context)||!1,S=rl(t,{target:A,context:_,containerItemID:_,caseViewMode:u,headers:d,semanticURL:p,key:f,flowName:m,resourceType:I,directUrlUpdation:g,debugInfo:C&&C.debugInfo&&{debugId:C.debugInfo[G.COREHEADER_APP_DEBUG_ID]}});if(Yp(A)){const t=jg(_),s=Uc({data:t}),[,a]=s?s.split(" "):[],o=`You will lose unsaved changes for ${a}. Do you want to continue?`;if(!FE(n.context))return e;{const{continueExecution:t}=hl(A,{dirtyMessage:o});if(!t)return r.directUrlUpdation=!1,uc.rejectActionByID(h),Cu();S.currentCaseViewMode=Yc(S?.context),e.push(jf(Mf,S))}}else e.push(jf(Ef,S));return t.directUrlUpdation=g,t.semanticURL=p,await sl(t,{...S,acName:A},{acName:A,context:_}),e},jE=(e,{isModalAction:t,target:n,transientItemID:r})=>{if(t){const t=e.find((({type:e})=>e===ke));t?.payload&&(n=t.payload.target,r=t.payload.containerItemID)}const s=xf({target:n,containerItemID:r});s.payload.transientItems.length&&e.push(s)},kE=e=>/^app\/preview_[0-9]*/g.test(e),VE=(e,t)=>{const n=K(e);return!kE(e)&&(n===t||/^app\/primary_[0-9]*/g.test(n))},$E=e=>{if(!FE(e.context)){let t;const n=e?.caseTypeID,r=e?.caseTypeName;return t=e.businessID?e.businessID:e.workID,{caseID:t,caseTypeID:n,caseTypeName:r}}return{}},BE=(e,t,n,r)=>{const{data:s,caseViewMode:a}=t,o={data:s,caseViewMode:a,context:n};if(ef.setIn(o.data,["context_data","caseViewMode"],a),e.push({type:dt,payload:{context:n}}),r){const t={data:$.transformObjectToCase(s),caseViewMode:a,context:n};e.push(jf(df,t))}e.push(jf(df,o))},GE=async(e,t,n,r,s,a,o,i,c,l)=>{const{headers:u}=c,d=l?G.OBJECT_INFO.OBJECT_INFO:G.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=jg(e),r=c?.response?.data?.caseInfo?.assignments??[],s=n?.caseInfo?.assignments??[],a=Yc(e)===G.PERFORM_MODE,o=r[0]?.ID!==s[0]?.ID,i=r.length>0&&s.length>0;a&&o&&i&&c?.response?.data?.caseInfo?.assignments&&(c.response.data.caseInfo.assignments=t(r,s[0]?.ID))}const p=Yp(rh(e));let h=!1;const g=rh(n),f=Dp(g),m=kp(g);m&&f?.items?.[m]?.key===c?.actionInPayload?.caseID&&(h=!0),LE(s,{...r,skipReleaseLockRequest:!0});const I=Oc(e),y={target:rh(e),containerItemID:e,context:e,containerName:I};t.doDeleteCaseSummary=r.doDeleteCaseSummary;const E=te(n),A=jg(E),_=jg(r.context),C=A[d]?.ID,S=_[d]?.ID,T=jg(e)?.caseInfo?.ID;if(p&&C===S||!p&&(""===o||y.containerItemID.includes(G.WORKAREA)&&"review"===t.caseViewMode||!a&&t.root&&0===Object.keys(t.root).length&&T===t.data?.caseInfo?.ID))(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(G.WORKAREA)&&t.caseViewMode===G.REVIEW_MODE&&((e,t)=>{const n=e?.assignmentID,r=t?.data?.caseInfo?.assignments??[],s=r[0]?.ID;return n!==s})(r,i)&&(t.flowName=" ",t.clearView=!0),s.push(jf(Nf,{...t,key:o,resourceType:"",...y}));else if(a){const a=rh(e),i=Mp(a,o);if(i)y.target=a,y.context=i,y.containerItemID=i,s.push(jf(Nf,{...t,key:o,resourceType:"",...y}));else{const e=Hp(n)[0];if(r.target=e,r.context=ul(e,G.WORKAREA,n),r?.context){r.containerItemID=r.context,s.push(jf(Ef,{...r,...t}));const n=r.containerItemID;s.push(jf(Rf,{parentContainerTarget:e,containerItemID:n}))}}}if(r.target=rh(e),r.containerName=Oc(e),r.context=e,r.containerItemID=e,ef.setIn(t,"acName",y.target),await sl(i,t),h&&(n.includes(G.WORKAREA)&&Vc(n)&&(n=te(n)),BE(s,t,n,l)),!a&&t.caseViewMode===G.PERFORM_MODE){const t=((e,t)=>{const n=rh(e);return Mp(n,t)})(e,o),n={data:{[d]:{headers:u}},context:t};s.push(jf(df,n)),s.push(Gd(((e,t=!1,n=!1)=>{const r=uc.getNextActionMgrId();return{ID:sf.getPropertyValue(B.CASE_INFO.ASSIGNMENT_ID,"",e),actionID:sf.getPropertyValue(B.CASE_INFO.ASSIGNMENTACTION_ID,"",e),context:e,caseWideAction:t,contextData:n,options:{actionMgrID:r}}})(t)))}}else{LE(s,r);let e=!1;const o=rh(n),i=Dp(o),u=kp(o);if(u&&i?.items?.[u]?.key===c?.actionInPayload?.caseID&&(e=!0),a){const e=Hp(n)[0];r.target=e,r.context=ul(e,G.WORKAREA,n),r.containerItemID=r.context,s.push(jf(Ef,{...r,...t}));const a=r.containerItemID;s.push(jf(Rf,{parentContainerTarget:e,containerItemID:a}))}e&&BE(s,t,n,l)}},WE=async(e,t,n,r,s,a,o)=>{const i=a?"objectInfo":"caseInfo";((e,t,n)=>{if(t.isProcessAction&&(LE(n,{...t,skipReleaseLockRequest:!0}),e)){const r=`${t?.containerItemID.includes("root")?G.APP.ROOT:G.APP.APP}/${Np.PRIMARY}`,s=ul(r,Np.PRIMARY),a={insKey:e.ID,className:e.content.classID,context:s,acTargetName:G.PRIMARY,isChild:!0},o={type:fe,payload:{...a}};n.push(o)}})(e.data[i].parentCaseInfo,t,s);const c=e?.data[i]?.parentCaseInfo?.ID;if(c){const n=rh(t?.context),r=Rp(n,t?.context)?.parentContext,s=rh(r);t?.isProcessAction&&wp(s,c)&&Ah(r,e?.data[i]?.lastUpdateTime)}n.resourceType=wE.CASE,n.directUrlUpdation=!0,t.isProcessAction||await UE(s,{translatedDXAPIResponse:r,actionInPayload:t},n,a,o)},HE=async(e,t,n,r,s)=>{e.doDeleteCaseSummary=t.doDeleteCaseSummary,e.caseViewMode===G.REVIEW_MODE&&(e.flowName=" ",e.clearView=!0);const{containerItemID:a}=t,o=Bl.getPropertiesToReplace(a);s.push(jf(Nf,{...e,...r,propertiesToReplace:o})),ef.setIn(e,"acName",r.target),await sl(n,e),((e,t,{data:n,caseViewMode:r})=>{const{containerItemID:s}=t,a=Bp(s);if(a&&Vc(s)){const t=te(a),o={data:n,caseViewMode:r,context:t};ef.setIn(o.data,["context_data","caseViewMode"],r),e.push({type:dt,payload:{context:t}});const i=Bl.getPropertiesToReplace(s);e.push(jf(df,o,{propertiesToReplace:i}))}})(s,t,e)},qE=async(e,t,n,r,s,a,o,i,c,l={})=>{const{isCaseWideAction:u,isInCreateStage:d,containerItemID:p}=e,h=K(e.context),g=Fc(s,c),f=c?mc(s):Lc(s),m=d&&!g&&!u,I=Hp(h)[0],y=I?kp(I):h,E=Oc(p),A=Bp(p),_=Object.freeze({target:e.target,containerItemID:p,context:A,containerName:E});m&&!kE(e.context)?await WE(i,e,t,s,a,c,l):VE(e.context,y)?await GE(y,t,h,e,a,n,r,s,o,c):!u&&!c||VE(e.context,y)?await HE(t,e,s,_,a):(LE(a,e),((e,t,n)=>{const{containerItemID:r,caseID:s}=t;if(r&&/^app\/preview_[0-9]*/g.test(r)){const{caseClassName:t}=n,a=K(r),o=Bp(a);e.push(jf(hf,{containerItemID:a,context:o,container:Np.PREVIEW,containerName:Np.PREVIEW,caseId:s,viewName:B.PREVIEW_VIEW_NAME,caseClassName:t,updateData:!0}))}})(a,e,{caseClassName:f}))},zE=(e,t,n)=>{const{isModalAction:r,isCaseWideAction:s,caseID:a}=t,o=VE(t.context,n),i=e?.data?.caseInfo?.stages,c=e?.data?.caseInfo?.stageID;Cc({caseID:a,isModalAction:r,isModalLaunchedFromPrimaryValue:o,isCaseWideAction:s,stages:i,stageID:c})},YE=e=>{const t=e?.payload?.err?.errorDetails,n=e?.payload?.context;t?.forEach((e=>{e[G.ERROR_FIELD_IN_PAGE]=e[G.ERROR_FIELD_IN_PAGE].replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`));const t=e[G.ERROR_FIELD_IN_PAGE].slice(1),r=e[G.ERROR_IN_PAGE_IDENTIFIER],s=r.startsWith(".")?r.slice(1):r;if(s){let a=t?`caseInfo.content.${t}`:"caseInfo.content";a=G.getProperty(a.replace(/\(/g,"[").replace(/\)/g,"]"));const o=lo(s,a,G.PROPERTY),i={type:B.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue};io.mutateField(n,a,o[o.length-1],{messages:[i],type:B.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:r})}}))},KE=(e,t)=>{const{assignmentID:n,actionID:r,caseID:s,context:a,additionalHeaders:o={},outcome:i,jsActionQueryParams:c,headers:l}=e,{state$:u}=t,d=(e=>{const{isModalAction:t,viewType:n,isInCreateStage:r,isCaseWideAction:s}=e;return t&&r&&!s?Zc.PAGE:n||Zc.FORM})(e),p=(e=>{const{isCaseWideAction:t}=e;return t?"executeCaseWideActions":"finishAssignment"})(e),h={assignmentID:n,actionID:r,caseID:s,viewType:d};let{restApi:g}=rm(p,h);const{reqType:f}=rm(p,h);d&&!g?.includes("viewType=")&&(g=g?.includes("?")?`${g}&viewType=${d}`:`${g}?viewType=${d}`),i&&!g?.includes("outcome")&&(g=g?.includes("?")?`${g}&outcome=${i}`:`${g}?outcome=${i}`),g=Xl(c,g),e.viewType=d;const{content:m}=nl(a),I=u.value.data[a]?.caseInfo?.headers||{},{etag:y}=I,E={"if-match":y,...l,...o};return Ba(Ko(g,{method:f,body:m,headers:E},a)).pipe(fu((t=>{const{data:n,headers:r}=t;return $.analyseResponse(n),{response:n,actionInPayload:e,headers:tl({...E,...r})}})),Su("Error occurred during ajax call at finishAssignment Epic : ",a))},JE=e=>{No.publish(G.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,e)},XE=e=>{No.publish(G.PUB_SUB_EVENTS.ERROR_ON_FINISH_ASSIGNMENT,e)},{RESOURCE_TYPES:QE}=B,ZE=(e,t)=>{let n=0,r=[],s={},a="",o={},i=!1,c=!1;return e.pipe(hu(xE),mu((e=>{const l=Vh.isCoexistenceAppOfType(G.APP_TYPE.UIKIT);if(({actionMgrID:n}=e.payload),a=e.payload.context,fo({context:a,stateObj:jg(a),clearContextMessages:!0}),!jl(a)||Ao(a)){const t={type:B.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return uc.rejectActionByID(n,!0,t),id.handleDeferredActionCompletion(e.payload.context).then((()=>{XE({errorType:B.ERROR_TYPE.CLIENT})})),Au([])}return Au(e.payload).pipe(mu((e=>{ME(r,e);const n={...e};return KE(n,{state$:t})})),mu((async e=>{if(e&&e.type===Te){Ql(e);const t=cl(e);return r.push(t),r}ed.clearContextedCache(a);const{headers:t,actionInPayload:u,response:d}=e,{containerItemID:p,context:h=Bp(p),isModalAction:g,isInCreateStage:f}=u;i=u.isCaseWideAction,c=u.isProcessAction;const m=rh(p);u.target=m;const I=Oc(p),y=Object.freeze({target:u.target,containerItemID:p,context:h,containerName:I});ef.setIn(d.data,G.CASE_INFO.IS_FIRST_ASSIGNMENT,!1),ef.setIn(d.data,G.CASE_INFO_IS_LOCAL_ACTION,!1),d?.uiResources?.root?.config?.name&&"page"!==u.viewType&&ef.setIn(d.data,G.CASE_INFO.VIEW_NAME,d?.uiResources?.root?.config?.name),JE({submitResponse:d});let E=Rd(d,{[B.STOPMERGEACTIONS]:!d.nextAssignmentInfo});const A=Lc(E),_=K(u.context),C=Hp(_)[0]?kp(Hp(_)[0]):_,S=Fc(E),T=f&&!S;!g||f||VE(u.context,C)||(E=yl(E,jg(p)));const N=rl(E,{headers:t,actionMgrID:n,directUrlUpdation:!1});let P,O;Bc(N.data,u),N.caseClassName=A,N.resourceType=QE.ASSIGNMENT,N.headers=t;const D=E?.data?.caseInfo?.assignments?.some((e=>e.ID===u.assignmentID)),R=((e,t)=>{const{assignmentID:n}=t;return e?.data?.caseInfo?.assignments?.some((e=>e.ID===n&&"true"===e?.canPerform))})(E,u),b=((e,t,n,r,s)=>{let a;const o=rh(t);return a=Kp(o)?Mp(o,n.data?.caseInfo?.ID):kp(o),r&&e&&Bg(null,G.CASE_VIEW_MODE_PROP,a)===G.PERFORM_MODE&&s})(D,C,E,g,R),v=u?.actionID===B.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT;if(E?.data?.nextAssignmentInfo&&!v)N.caseViewMode=G.PERFORM_MODE,P=Uc(E),O=!0;else if(b&&!v)E?.confirmationNote&&E?.uiResources?.root?.config?.name===G.PY_CONFIRM?N.caseViewMode=G.REVIEW_MODE:N.caseViewMode=G.PERFORM_MODE,P=Uc(E),N.flowName=" ",N.deleteAssignmentSpecificResources=!1,O=!1;else{N.caseViewMode=G.REVIEW_MODE;const e=Yp(rh(C)),t=(e=>{if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1)if(n[e].ID===t)return"resolution"===n[e].transitionType}return!1})(wc(E));P=!E?.confirmationNote||!t&&E?.uiResources?.root?.config?.name!==G.PY_CONFIRM||e?"":Uc(E),O=!1}const x=Uc(E);$c(N,E,{skipFlowNameUpdate:N?.caseViewMode===G.REVIEW_MODE||b});const w=tm("createWork",{caseClassName:A}).replace(/{.+?}/,String(Mc(x)));if(E.semanticURL=w,N.semanticURL=w,g?(await qE(u,N,O,P,E,r,e,d,!1,o),T&&(s=$E(u))):f&&l&&!S?(Vh.setDefaultCasePage("pyDetails"),await(async(e,t,n)=>{const r={assignmentID:e?.data?.caseInfo?.assignments[0]?.ID,className:e?.data?.caseInfo?.content?.classID,containerName:Np.PRIMARY,targetContainerName:Np.PRIMARY,viewType:Zc.PAGE,isLastStepInCreateStage:!0,context:n},s={type:Ee,payload:{...r}};t.push(s)})(d,r,K(h))):await HE(N,u,E,y,r),zc(e,r),id.handleDeferredActionCompletion(a).catch((()=>{})),zE(N,u,C),!E?.data?.nextAssignmentInfo){const e=((e,t)=>{const{isCaseWideAction:n,assignmentID:r,actionID:s}=t;return{isCaseWideAction:n,caseID:Uc(e),assignmentID:n?null:r,actionID:s||null}})(E,u);Sc({...e,containerItemID:p})}return jE(r,{transientItemID:p,target:m,isModalAction:g}),r})),fu((()=>{const e=r.find((e=>e.type===Te));return e?(id.handleDeferredActionCompletion(a).then((()=>{XE({errorType:B.ERROR_TYPE.SERVER})})).catch((()=>{})),YE(e),uc.rejectActionByID(n)):uc.resolveActionByID(n,s),o?.caseId&&(e=>{No.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)})(o),Cl(r),(i||c)&&(e=>{No.publish(G.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION,e)})({updateState:!0}),r=[],s={},o={},r})))})))},eA="CANCEL_ASSIGNMENT",tA=e=>{const t={},{routeKey:n,isModalAction:r,caseID:s,context:a,RemoteSystemID:o}=e;o&&(t.RemoteSystemID=o);const i=n||"releaseAssignmentLock",{restApi:c,reqType:l}=rm(i,{ID:s,caseID:s,viewType:Zc.PAGE}),u=cc.getComponentCache(s),d=u&&"object"==typeof u?u:{};return Ba(Ko(c,{method:l,headers:{...t,...d}},a,{includeRemoteSystemIdIfPresent:!!o})).pipe(fu((t=>(cc.resetComponentCache(s),r?{actionInPayload:e}:{response:t.data,actionInPayload:e,headers:tl(t.headers)}))),Su(": Error occurred during ajax call at release lock request : ",a))},nA=(e,t)=>{const{isModalAction:n}=t;return tA({routeKey:"cancelAssignment",isModalAction:n,...e})},rA=e=>{let t=0,n=[];return e.pipe(hu(eA),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>{const{isModalAction:n}=e;e.context||(e.context=Bp(e.containerItemID));const{context:r}=e,s=(e=>{const{isModalAction:t,containerItemID:n}=e;return t?Np.MODAL:Oc(n)})(e),a=wt(s,r),{continueExecution:o}=hl(a);return o?(e.RemoteSystemID=q.getRemoteHeaderByContext(e.context)??void 0,Ba(nA(e,{isModalAction:n}))):(uc.rejectActionByID(t),Cu())})),mu((e=>{if(e&&e.type===Te)return n.push(cl(e)),Ba([n]);const{actionInPayload:r,response:s}=e,{containerItemID:a,isModalAction:o,isInCreateStage:i}=r;s?.data.caseInfo&&(s.data.caseInfo.availableProcesses=s.data.caseInfo.availableProcesses??[]);const c=rh(a),l=Bp(a),u={target:o?`${G.APP.APP}/${G.MODAL}`:c,containerItemID:a,caseViewMode:o?G.PERFORM_MODE:G.REVIEW_MODE,context:l,actionMgrID:t,key:Uc(s),skipReleaseLockRequest:!1};return i&&n.push(jf(Nf,u)),!o&&Vc(a)&&(async(e,t)=>{const{childContainerItemID:n,caseViewMode:r,referencedUsers:s,response:a}=t,o=K(n),i=Bp(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:s,context_data:{caseViewMode:r}}},d=[];c&&d.push({path:G.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}),d.length>0?e.push(jf(df,u,{propertiesToReplace:d})):e.push(jf(df,u))})(n,{childContainerItemID:a,caseViewMode:G.REVIEW_MODE,referencedUsers:s?.data.referencedUsers,response:s}),u.skipReleaseLockRequest=!0,n.push(jf(vf,u)),Ba([n])})),fu((()=>(Ug(n),Gc(n,t),n=[],n))))},sA="NAVIGATE_TO_STEP",aA=(e,t)=>{const{ID:n,stepID:r,containerItemID:s,context:a=Bp(s),isInCreateStage:o}=e,{state$:i}=t,c={ID:n,stepID:r,viewType:o?Zc.PAGE:Zc.FORM},{restApi:l,reqType:u}=rm("navigateToStep",c),{content:d}=nl(a),p=i.value.data[a].caseInfo.headers;return Ba(Ko(`${l}`,{method:u,body:d,headers:{"if-match":p&&p.etag}},a)).pipe(fu((t=>({response:t.data,actionInPayload:e,headers:tl({...p,...t.headers})}))),Su("Error occurred during ajax call at navigateToStep Epic : ",a))},{RESOURCE_TYPES:oA}=B,iA=(e,t)=>{let n=0,r=[];return e.pipe(hu(sA),gu((e=>(({actionMgrID:n}=e.payload),Au(e.payload).pipe(mu((e=>(Eo(e.context),aA(e,{state$:t})))),mu((async e=>{if(e&&vc(e.type))return r.push(cl(e)),r;const{actionInPayload:t,response:n,headers:s}=e,{containerItemID:a,context:o=Bp(a),isModalAction:i}=t;ed.clearContextedCache(t.context);const c=rh(a),l=Oc(a),u=Object.freeze({target:c,containerItemID:a,context:o,containerName:l}),d=n?.data?.caseInfo?.content,p=n?.uiResources?.root?.config?.name,h=n?.uiResources?.root?.config?.context;d&&!d.pyViewName&&p&&"page"!==t.viewType&&(ef.setIn(d,"pyViewName",p),ef.setIn(d,"pyViewContext",h));const g=Rd(n),f={acName:c,...u};await sl(g,t,f);const m=rl(g,{...u,headers:s});n?.nextAssignmentInfo||(m.caseViewMode=G.REVIEW_MODE),zc(e,r),m.doDeleteCaseSummary=t.doDeleteCaseSummary,m.resourceType=oA.ASSIGNMENT,$c(m,g),Bc(m.data,t);const I=g.data?.caseInfo?.stages,y=g.data?.caseInfo?.stageID;if(Cc({caseID:Uc(g),isModalAction:i,stages:I,stageID:y}),Vc(a)){const e=Bl.getPropertiesToReplace(a);_l(m,r,"",{propertiesToReplace:e})}return r.push(jf(Nf,m)),El(r),r})),fu((()=>(Ug(r),Gc(r,n),r=[],r))))))))},cA=e=>{const{caseID:t,context:n}=e,{restApi:r,reqType:s}=rm(Xe,{ID:t});return Ba(Ko(r,{method:s},n)).pipe(fu((t=>($.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:tl(t.headers)}))),Su(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",n))},lA=e=>{No.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,e)},uA=(e,t)=>{let n,r=0,s=[];return e.pipe(hu(nu),fu((e=>(({actionMgrID:r,caseType:n}=e.payload),e.payload))),mu((e=>e.ignoreCaseDeletion?Au({actionInPayload:e}):cA(e))),mu((async e=>{if(e&&vc(e.type)){const{payload:t}=e,n=cl({...e,...t,actionMgrID:r});return s.push(n),s}const{actionInPayload:n}=e,{context:a,isModalAction:o}=n,i=o?Np.MODAL:Np.PRIMARY,c=wt(i,a);if(!o&&c){const e={acName:c,target:c,context:a},r=t.value.containers[c],{semanticURL:s}=(e=>{const{accessedOrder:t,items:n}=e;if(t&&t.length>1){const e=n[t[t.length-2]],{semanticURL:r}=e;if(r)return e}return{semanticURL:""}})(r);await sl({directUrlUpdation:!0,semanticURL:s},n,e)}if(n.isProcessAction&&n.parentCaseInfo){const e={insKey:n.parentCaseInfo.ID,className:n.parentCaseInfo.content.classID,context:n.parentContext,acTargetName:G.PRIMARY,isChild:!0},t={type:fe,payload:{...e}};s.push(t)}const l={target:c,containerItemID:a,context:a,caseDeleted:!0};return s.push(jf(vf,l)),s})),fu((()=>(Ug(s),Gc(s,r)===G.PROMISE_VALUE.RESOLVE&&lA({caseType:n}),s=[],s))))};function dA(e,t){return Js(t)?mu(e,t,1):mu(e,1)}const pA=(e,t)=>{const{assignmentID:n,actionID:r,context:s}=e,{restApi:a,reqType:o}=rm("save",{assignmentID:n,actionID:r}),{content:i}=nl(s),c=t.value.data[s]?.caseInfo?.headers;return Ba(Ko(a,{method:o,body:i,headers:{"if-match":c&&c.etag}},s)).pipe(fu((t=>({response:t.data,actionInPayload:e,headers:tl(t.headers)}))),Su(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",s))},hA=(e,t=!1)=>{const{action:n,state$:r,actionMgrID:s}=e;let a=[];return Au(n.payload).pipe(mu((e=>pA(e,r))),dA((e=>{if(e&&vc(e.type))return Au(e);const{containerItemID:t}=e&&e.actionInPayload,r=K(t),s=rh(r),o=Dp(s),i=Hp(r)[0];let c=i?kp(Hp(r)[0]):r;if(!Yp(rh(c))){const t=Dp(i);t?.accessedOrder.forEach((n=>{e.actionInPayload.caseID===t.items[n].key&&(c=t.items[n].context)}))}const l=kp(s);n.payload.canUpdateAvailableActions&&Dd(e.response);if(c&&a.push((t=>jf(df,{context:t,data:{caseInfo:{...e.response.data?.caseInfo||{},headers:e.headers}}}))(c)),o?.items?.[l]?.key===e?.actionInPayload?.caseID){const n={context:r,data:{...e.response.data,caseInfo:{...e.response.data?.caseInfo||{},headers:e.headers}}},s=Bl.getPropertiesToReplace(t);a.push(jf(df,n,{propertiesToReplace:s}))}return a.push(jf(Nf,{context:t})),zc(e,a),tA({...e.actionInPayload,RemoteSystemID:q.getRemoteHeaderByContext(e.actionInPayload.context)??void 0})})),mu((async n=>{if(n&&vc(n.type)){const{payload:t}=n,r=cl({...n,...t,actionMgrID:s});a.push(r);const o=e.action.payload.modalLoadingContainer;if(o){const e=o.context,{context_data:t}=jg(e)||{};t?.isLoading&&sh(e)}return a}const{actionInPayload:r}=n,{context:o,containerName:i}=r,c={target:wt(i,o),containerItemID:o,context:o};return t||a.push(jf(vf,c)),a})),fu((()=>(Ug(a),Gc(a,s),(e=>{No.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,e)})({context:n.payload.context,assignmentID:n.payload.assignmentID}),t||(a=[]),id.isDeferredActionInProgress(n.payload.context)&&id.handleDeferredActionCompletion(n.payload.context),a))))},gA=(e,t)=>{let n,r=0;return e.pipe(hu(ru),gu((e=>{const{saveOnly:s}=e.payload;({actionMgrID:r,caseType:n}=e.payload);return hA({action:e,state$:t,actionMgrID:r,caseType:n},s)})))},fA=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="expressLocalActionSubmit",No.unsubscribe(G.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n)};n=e,r="expressLocalActionSubmit",No.subscribe(G.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n,r)}var n,r},{LOCAL_ACTION_TYPE:mA}=G,{RESOURCE_TYPES:IA}=B,yA=(e,t)=>{const{actionID:n,assignmentID:r,caseID:s,context:a,openActionType:o,modalLoadingContainer:i,headers:c}=e,{isProcessAction:l}=t,u=l?Ze:(e=>{const t=e.localActionType.toLowerCase();return t===mA.CASE_WIDE||t===mA.EXPRESS?et:Qe})(e),d=Zc.FORM,{reqType:p}=rm(u,{caseID:s,ID:r,actionID:n,viewType:d});let{restApi:h}=rm(u,{caseID:s,ID:r,actionID:n,viewType:d});e.actionType=u===et?G.CASE:G.ASSIGNMENT,h&&!h.includes("viewType=")&&(h=h.includes("?")?`${h}&viewType=${d}`:`${h}?viewType=${d}`);const g=i?.context??a;return Ba(Ko(h,{method:p,headers:c},g)).pipe(fu((t=>({response:t.data,actionInPayload:e,headers:tl(t.headers,"",e.headers)}))),Su(`: Error occurred during ajax call at ${o} Epic : `,g))},EA=(e,t)=>{const{isProcessAction:n}=t,r=n?Ze:Qe;e.openActionType=r;let s;if("modal"===Pc(r,e)){s=Hp(e.contextName)[0]?Hp(e.contextName)[0]:rh(e.contextName);const n=s?kp(s):e.contextName,r=Bp(n),a=Pc(e.openActionType,e),o=wt(a,e.context),i=ee(e.context,J(a,e.context));if(Ug(Ef({target:o,context:i,containerItemID:i,key:e.caseID,caseViewMode:G.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:G.CASE_INFO.CASE_INFO_CONTENT,type:"view"}},data:{key:e.caseID,caseInfo:{ID:e.caseID}},headers:{...e.headers}})),Ug(Pf({context:i})),e.modalLoadingContainer={target:o,context:i},!Hp(e.contextName)[0])return yA(e,t);if(!e.continueExecution)return yA(e,t);if(!Ip(r))return yA(e,t);e.saveActionPayload.modalLoadingContainer=e.modalLoadingContainer,e.saveActionPayload.canUpdateAvailableActions=!e.saveActionPayload.isModalAction;return Ba([su(e.saveActionPayload)]).pipe(mu((e=>(e=>{let t,n=0;const r=[],s={value:Fg()?.getState()};return Au(e).pipe(hu(ru),gu((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n,caseType:t}=e.payload),!a){const e={type:B.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return uc.rejectActionByID(n,!0,e),Au([])}return hA({action:e,state$:s,actionMgrID:n,caseType:t,actionsOut:r},!0)})))})(e))),mu((n=>{if(1===n.length&&vc(n[0].type)){const{continueExecution:n}=hl(s);if(!n)return uc.rejectActionByID(e.actionMgrID),_u.pipe(Ga((()=>Cu()))).toPromise();if(n)return yA(e,t)}return yA(e,t)})),fu((e=>e)))}return yA(e,t)},AA=async(e,t,{headers:n,actionInPayload:r})=>{const{context:s,actionName:a,openActionType:o,doDeleteCaseSummary:i,modalLoadingContainer:c}=r,l=Rd(e),u=Pc(o,r),d=c?.target??wt(u,s);let p,h,g=!1;!Jp(d)||Kp(d)&&!wp(d,e.data.caseInfo.ID)?(h=J(u,s),Rc(u)&&(h=ee(s,h)),p=h,g=!0):(p=Kp(d)?Mp(d,e.data.caseInfo.ID):kp(d),h=Bp(p));const f={acName:d,target:d,containerName:u,context:h};await sl(l,r,f),(void 0===l?.data?.caseInfo?.content||void 0!==l.data.caseInfo.content&&"object"==typeof l.data.caseInfo.content&&0===Object.keys(l.data.caseInfo.content).length)&&delete l.data?.caseMessages;const m=l.uiResources?.root;let I;I=m?G.PERFORM_MODE:G.REVIEW_MODE;const y=rl(l,{target:d,context:h,containerItemID:p,caseViewMode:I,doDeleteCaseSummary:i,headers:n,actionName:a,isMinimizable:!1,isInCreateStage:Rc(u),resourceType:IA.ASSIGNMENT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,assignmentID:r.assignmentID,actionType:r.actionType});let E;if(m&&$c(y,l),Rc(u)&&delete y.doDeleteCaseSummary,r.openActionType===tt&&(y.isBulkAction=!0,y.data.caseInfo.actionButtons.main[0].jsAction="async"===r.runningMode?"submitBulkActionAsync":"submitBulkAction",y.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",y.data.caseInfo.cases=r.selectedList),E=g?Ef:r.isProcessAction?Mf:Nf,y.data.context_data.isProcessAction=r.isProcessAction,t.push(jf(E,y)),g||t.push(jf(Of,y)),g){const s=Hp(r.contextName),a=Mp(s,e.data.caseInfo.ID);if(a){const e={data:{caseInfo:{headers:n}},context:a};t.push(jf(df,e))}}return p!==kp(d)&&t.push(jf(Rf,{target:d,containerItemID:p})),Vc(p)&&!c?.context&&_l(y,t),r.isProcessAction&&!Wc(y.nextAssignmentInfo?.className)&&zc({response:l,actionInPayload:{...r,containerItemID:p}},t),y.caseViewMode===G.REVIEW_MODE&&t.push(jf(vf,y)),t},_A="OPEN_LOCAL_ACTION",CA=(e,t)=>EA(e,t),SA=e=>{let t=0,n=[];return e.pipe(hu(_A),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>CA(e,{actionMgrID:t}))),mu((async e=>{if(!e)return _u;if(vc(e.type)){const t=cl(e);n.push(t);const{context_data:r}=jg(e.payload.context)||{};return r?.isLoading&&n.push(jf(Of,e.payload)),n}const{actionInPayload:t,headers:r,response:s}=e,{actionID:a}=t;return ef.setIn(s,"data.caseInfo.activeActionID",a),ef.setIn(s.data,G.CASE_INFO_IS_LOCAL_ACTION,!0),t.refreshConditions&&ef.setIn(s.data,G.CASE_INFO_REFRESH_CONDITIONS,t.refreshConditions),await AA(s,n,{headers:r,actionInPayload:t}),fA(t),n})),fu((()=>(Ug(n),Gc(n,t),n=[],n))))},TA=e=>{const{actionID:t,context:n,openActionType:r,caseTypeID:s,bulkContextID:a="",bulkContextType:o=""}=e,i=tt,{reqType:c,restApi:l}=rm(i,{caseTypeID:s,actionID:t,bulkContextID:a,bulkContextType:o});return Ba(Ko(l,{method:c},n)).pipe(fu((t=>({response:t.data,actionInPayload:e,headers:tl(t.headers)}))),Su(`: Error occurred during ajax call at ${r} Epic : `,n))},NA=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="bulkActionSubmit",No.unsubscribe(G.PUB_SUB_EVENTS.EVENT_BULKACTION,n)};n=e,r="bulkActionSubmit",No.subscribe(G.PUB_SUB_EVENTS.EVENT_BULKACTION,n,r)}var n,r},PA="OPEN_BULK_ACTION",OA=e=>{let t=0,n=[];return e.pipe(hu(PA),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>((e,t)=>{const{context:n}=e,{actionMgrID:r}=t;e.openActionType=tt;const s=Pc(tt,e),a=wt(s,n),{continueExecution:o}=hl(a);return o?TA(e):(uc.rejectActionByID(r),Cu())})(e,{actionMgrID:t}))),mu((async e=>{if(e&&vc(e.type)){const t=cl(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:s}=e,{actionID:a}=t;return ef.setIn(s,"data.caseInfo.activeActionID",a),await AA(s,n,{headers:r,actionInPayload:t}),NA(t),n})),fu((()=>(1===n.length&&vc(n[0].type)?uc.rejectActionByID(t):uc.resolveActionByID(t),Ug(n),n=[],n))))};var DA=Array.isArray,RA=Object.getPrototypeOf,bA=Object.prototype,vA=Object.keys;function xA(e){if(1===e.length){var t=e[0];if(DA(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&RA(r)===bA){var n=vA(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var r;return{args:e,keys:null}}var wA=Array.isArray;function MA(e){return fu((function(t){return function(e,t){return wA(t)?e.apply(void 0,Hs([],Ws(t))):e(t)}(e,t)}))}function LA(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return Js(yu(e))?e.pop():void 0}(e),r=xA(e),s=r.args,a=r.keys,o=new Sa((function(e){var t=s.length;if(t)for(var n=new Array(t),r=t,o=t,i=function(t){var i=!1;xa(s[t]).subscribe(Fa(e,(function(e){i||(i=!0,o--),n[t]=e}),(function(){return r--}),void 0,(function(){r&&i||(o||e.next(a?function(e,t){return e.reduce((function(e,n,r){return e[n]=t[r],e}),{})}(a,n):n),e.complete())})))},c=0;c<t;c++)i(c);else e.complete()}));return n?o.pipe(MA(n)):o}const FA=e=>{const{actionID:t,context:n,cases:r,classID:s}=e,{content:a}=nl(n,{nonEmptyAndChangedData:!0});let o=5;try{const e=Xc.getSharedState("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults");e?.find((e=>e.pyClassName===s))?.pyList.split(",").includes(t)&&(o=1)}catch(e){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',e)}const i=r.map((e=>({ID:e}))),c=i.length/o,l=nt,{reqType:u,restApi:d}=rm(l,{actionID:t}),p=[],h=i.length;for(let t=0;t<h;t+=c)a.cases=i.slice(t,t+c),a.cases.length&&p.push(Ba(Ko(d,{method:u,body:a},n)).pipe(fu((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:tl({...r})}})),Su("Error occurred during ajax call at submitbulkaction Epic : ",n)));return LA(p)},UA=e=>{No.publish(G.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},jA="SUBMIT_BULK_ACTION",kA=e=>{let t,n=0,r=[],s="";return e.pipe(hu(jA),gu((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const e={type:B.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return uc.rejectActionByID(n,!0,e),Au([])}return Au(e.payload).pipe(mu((e=>(t=e,FA(t)))),mu((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})}))}))})),s=`${n} record(s) updated`,UA({submitResponse:e}),t.target="HYBRID"===Vh.getRenderingMode()?rh(i):`${G.APP.APP}/${Np.MODAL}`,r.push(jf(vf,{containerItemID:i,context:c,target:t.target,skipReleaseLockRequest:!0})),a&&r.push(jf(bf,{messages:[{type:"error",message:1===a?"1 record failed to update":`${a} records failed to update`,errorDetails:o,showHeader:!1}],context:K(c)||c,category:"HTTP",showHeader:!1})),r})),fu((()=>(uc.resolveActionByID(n,s),Ug(r),r=[],r))))})))},VA=e=>{const{actionID:t,context:n,cases:r}=e,{content:s}=nl(n,{nonEmptyAndChangedData:!0});s.cases=r.map((e=>({ID:e})));const a=nt,{reqType:o,restApi:i}=rm(a,{actionID:t,runningMode:"async"});return Ba(Ko(i,{method:o,body:s},n)).pipe(fu((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:tl({...r})}})),Su("Error occurred during ajax call at submitbulkaction Epic : ",n))},$A=e=>{No.publish(G.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},BA="SUBMIT_BULK_ACTION_ASYNC",GA=e=>{let t,n=0,r=[],s="";return e.pipe(hu(BA),gu((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const e={type:B.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return uc.rejectActionByID(n,!0,e),Au([])}return Au(e.payload).pipe(gu((e=>(t=e,VA(t)))),fu((e=>{const n=[],{containerItemID:a,context:o}=t,{response:i}=e,c=Number(i.failureCount)||0;return c>0&&i.results.forEach((({status:e,error:t,BusinessID:r})=>{"200"!==e&&t&&t.errorDetails&&t.errorDetails.forEach((({localizedValue:e})=>{n.push({ID:r,message:e})}))})),s="Processing bulk actions, please refresh to check completion",$A({submitResponse:i}),t.target=`${G.APP.APP}/${Np.MODAL}`,r.push(jf(vf,{containerItemID:a,context:o,target:t.target,skipReleaseLockRequest:!0})),c&&r.push(jf(bf,{messages:[{type:"error",message:1===c?"1 record failed to update":`${c} records failed to update`,errorDetails:n,showHeader:!1}],context:K(o)||o,category:"HTTP",showHeader:!1})),r})),fu((()=>(uc.resolveActionByID(n,s),Ug(r),r=[],r))))})))},WA=(e,t)=>EA(e,t),HA=e=>{let t=0,n=[];return e.pipe(hu(eu),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>(Eo(e.context),WA(e,{actionMgrID:t,isProcessAction:!0})))),mu((async e=>{if(e&&vc(e.type)){const t=cl(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:s}=e;return await AA(s,n,{headers:r,actionInPayload:t}),n})),fu((()=>(Cl(n),Gc(n,t),n=[],n))))},qA=e=>{let t=0,n=[];return e.pipe(hu(De,ke),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>{const{containerItemID:t,caseID:n,context:r,caseDeleted:s,skipReleaseLockRequest:a,currentCaseViewMode:o,isProcessAction:i,isInCreateStage:c,deleteWork:l}=e,u=o===G.PERFORM_MODE,d=n&&u;return l?Au([]):i&&c?tA(e):t!==r||s||a||!d?t?.includes(G.MODAL)&&Yc(Th(t))===G.REVIEW_MODE?tA(e):Au([]):tA(e)})),mu((e=>(e&&vc(e.type)&&n.push(cl(e)),n))),fu((()=>(Ug(n),Gc(n,t),n=[],n))))};var zA=new sy(ey),YA=zA;function KA(e,t,n){void 0===e&&(e=0),void 0===n&&(n=YA);var r=-1;return null!=t&&(Iu(t)?n=t:r=t),new Sa((function(t){var s,a=(s=e)instanceof Date&&!isNaN(s)?+e-n.now():e;a<0&&(a=0);var o=0;return n.schedule((function(){t.closed||(t.next(o++),0<=r?this.schedule(void 0,r):t.complete())}),a)}))}function JA(e,t){return void 0===e&&(e=0),void 0===t&&(t=zA),e<0&&(e=0),KA(e,e,t)}function XA(e){return La((function(t,n){var r=!1,s=null,a=null,o=function(){if(null==a||a.unsubscribe(),a=null,r){r=!1;var e=s;s=null,n.next(e)}};t.subscribe(Fa(n,(function(t){null==a||a.unsubscribe(),r=!0,s=t,a=Fa(n,o,ia),xa(e(t)).subscribe(a)}),(function(){o(),n.complete()}),void 0,(function(){s=a=null})))}))}const QA=(e,t,n,r,s)=>{if(s!==G.RESOURCE_STATUS.CREATE)return;Dl.isStateMachineExist(e,t,n)||Dl.setStateMachine(e,n,t,new gi(n,t,e));Dl.getStateMachine(e,t,n).insert({},"string"==typeof r?r:r+1,!0,{isDefault:!0})},ZA=(e,t,n,r,s)=>{"string"==typeof t&&e.data?.caseInfo?.content&&n&&("CREATE"===r||"UPDATE"===r)&&(e.data.caseInfo.content[s][t][n]=t)},e_=e=>{const t=!e.isLocalAction&&e.editType===G.ACTION;return{...t?{}:{activeActionID:e.actionID},assignments:[{ID:e.assignmentID,...t?{actions:[{ID:e.actionID}]}:{}}]}},t_=e=>{let t=0,n=[],r="";return e.pipe(hu(Et),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>Jy(e))),mu((async e=>{if(e&&e.type===Te)return n.push(cl(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0}};const{actionInPayload:t,response:s,headers:a}=e,o=t.containerName,i=wt(o,t.context);let c=ul(i,o,t.context);c=ee(t.context,c);const{pageReference:l,targetProperty:u,index:d,subscriptFieldName:p,pageGroupName:h,actionType:g,isPageGroup:f}=t,m=l?.startsWith(B.OBJECT_INFO.OBJECT_INFO);let I=null;m?(I=$.transformCaseData(s),I.uiResources.root.config.context=`${l}${u}[${d}]`):I=s;const y=Rd(I);y.key=t.ID,y.data?.caseInfo?(y.data.caseInfo.ID=t.ID,ZA(y,d,p,g,h)):y.data?.objectInfo&&(y.data.objectInfo.ID=t.ID);const{interestPageActionID:E,editType:A,isLocalAction:_,actionID:C}=t,S={isMultiRecordData:!0,viewName:t.viewID,parentContext:t.context,interestPage:t.interestPage,interestPageActionID:E,editType:A,isLocalAction:_,actionID:C};y.uiResources.context_data.modalView=S;const T=jg(t.context)?.context_data?.caseInfo,N=`${t.pageReference}${t.targetProperty}`,P=uo(T,N,t.index);y.uiResources.context_data.caseInfo={...y.uiResources.context_data.caseInfo,content:ef.mergeDeep(y.uiResources.context_data.caseInfo?.content,P?.content)};const O=sf.getProperty(G.CASE_INFO.REMOTESYSTEMID,"",t.context),D={acName:i,context:c};await sl(y,t,D);const R={target:i,context:c,containerItemID:c,headers:a,index:d,subscriptFieldName:p,pageGroupName:h,isPageGroup:f};O&&(R.headers={...R.headers,RemoteSystemID:O});const b=ef.deepClone(y.data?.caseInfo?.content);if(y.data?.caseInfo&&A===G.ACTION){F()(y.data,`${l}${u}`,new Array(d+1).fill({}));const e=ef.deepClone($g(`${u}[${d}]`,l,t.context)??{});((e,t,n,r,s)=>{if(!e[G.CLASSID]){const a=t===B.CASE_INFO.CASE_INFO_CONTENT?`${n.replace(".","")}[${r}].${G.CLASSID}`:`${t.split(B.CASE_INFO.CASE_INFO_CONTENT)[1].replace(".","")}${n}[${r}].${G.CLASSID}`,o=ef.getIn(s,a);o&&(e[G.CLASSID]=o)}})(e,l,u,d,b),F()(y.data,`${l}${u}[${d}]`,e)}const v=rl(y,R);y.data?.caseInfo&&(y.data.caseInfo.content=b);const x=rl(y,R);v.resourceStatus=t.actionType,v.isMultiRecordData=!0,v.parentContext=t.context,v.heading=t.heading,v.data.caseInfo&&A===G.ACTION&&(v.data.caseInfo={...v.data.caseInfo,...e_(t),isLocalAction:t.isLocalAction}),v.clearStateMachine=!1,x.skipValidation=!0;const w=ll(i,v);r=c,n.push(w),El(n);const M=jf(df,x);return{actionsOut:n,actionInPayload:t,mergeAction:M}})),fu((({actionInPayload:e,mergeAction:s})=>(xc(n)?uc.rejectActionByID(t):uc.resolveActionByID(t),e.skipPageInstructions||QA(r,e.pageReference,e.targetProperty,e.index,e.actionType),Ug(n),n=[],e.editType===G.ACTION&&(Dl.registerForServerChanges(),Ug(s),Dl.unRegisterForServerChanges()),n))))},n_=e=>{let t,n="",r=[];return e.pipe(hu(At),gu((e=>{t=e.payload;const{isFormValid:s}=e.payload;if(({actionMgrID:n}=e.payload),!s){const t={type:B.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return uc.rejectActionByID(n,!0,t),id.handleDeferredActionCompletion(e.payload.context),Au([])}return Au(e.payload).pipe(mu((e=>(t=e,Jy(t)))),mu((async e=>((e,t)=>{if(e&&"action"===t.editType&&e.type!==Te){const{context:n,pageReference:r}=t,s={context:n},{response:a}=e,o=r?.startsWith(B.OBJECT_INFO.OBJECT_INFO);let i=null;o?(i=$.transformCaseData(a),i.uiResources.root.config.context=r):i=a;const c=Rd(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=rl(c,s);l.skipValidation=!0;const u=jf(df,l);Dl.registerForServerChangesSync(),Ug(u),Dl.unRegisterForServerChanges()}return e})(e,t))),mu((async e=>{if(e&&e.type===Te){const t=cl(e);return r.push(t),r}const{containerItemID:n,context:s,pageReference:a,interestPage:o}=t,i=o?.replace(/\(\d+\)$/,"");return((e,t,n,r,s)=>{Ci(e).forEach((e=>{const a=s&&"replace"===e.instruction.toLowerCase()?ef.convertClipboardPageToPageRefNotation(s):ef.convertClipboardPageToPageRefNotation(e.target);Dl.isStateMachineExist(t,n,a)||Dl.setStateMachine(t,a,n,new gi(a,n,t));const o=Dl.getStateMachine(t,n,a);switch(e.instruction.toLowerCase()){case"insert":o.insert(e.content,e.listIndex,r,{});break;case"update":o.update(e.content,e.listIndex??e.groupIndex,r,{});break;case"delete":e.listIndex?o.delete(e.listIndex,r):e.groupIndex?o.delete(e.groupIndex,r):o.deletePage();break;case"replace":o.replacePage(e.content,r,s?e.target:void 0,s?n:void 0);break;case"move":o.move(e.listIndex,e.listMoveToIndex);break;case"add":o.insert(e.content,e.groupIndex,r,{});break;case"delete all":o.deleteAll()}}))})(s,t.parentContext,a.startsWith(B.OBJECT_INFO.OBJECT_INFO_CONTENT)?G.getProperty(B.OBJECT_INFO.OBJECT_INFO_CONTENT):G.getProperty(B.CASE_INFO.CASE_INFO_CONTENT),!1,i),r.push(jf(vf,{containerItemID:n,context:s,target:t.target,skipReleaseLockRequest:!0})),r})),fu((()=>{if(xc(r))uc.rejectActionByID(n),id.handleDeferredActionCompletion(t.context);else{uc.resolveActionByID(n),id.handleDeferredActionCompletion(t.context);const{pageReference:r}=e.payload;if(sf.getPropertyValue(G.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,r,t.parentContext)){const e=sf.getPropertyValue(G.getProperty(B.CASE_INFO.CASE_INFO_ID),r,t.parentContext),n=sf.getPropertyValue(G.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,r,t.parentContext),s=t.pageReference?.substring(0,t.pageReference?.lastIndexOf(".")),a=s.replace(G.getProperty(G.CASE_INFO.CASE_INFO_CONTENT),"");qd(e,n,t.parentContext,a,{})}else Zd(t.parentContext,G.getProperty(G.CASE_INFO.CASE_INFO_CONTENT),{})}return Ug(r),r=[],r})))})))},r_=e=>{const{caseID:t,headers:n,debugInfo:r,context:s}=e,a=rm("getDescendants",{caseID:t}),{restApi:o}=a,{reqType:i}=a;return Ba(Ko(o,{method:i,headers:{...n,...r&&{...ko.addDebugHeaders(r)}},skipClearErrorMessages:!0},s)).pipe(fu((t=>({actionInPayload:e,response:t.data,headers:tl({...n,...t.headers})}))),Su("Error ocurred during ajax call at getDescendants Epic : ",s))},s_=e=>{let t=0,n=[];return e.pipe(hu(sd),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>r_(e))),mu((async e=>{if(e&&vc(e.type))return n.push(cl(e)),n;const{actionInPayload:t,response:r}=e,s={};ef.setIn(s,"caseInfo.childCases",r?.childCases??[]);const a={data:s,context:t?.context};return n.push(jf(df,a)),n})),fu((()=>(Ug(n),Gc(n,t),n=[],n))))},a_=e=>{let t,n="",r=[],s={};return e.pipe(hu(_t),gu((e=>{t=e.payload;const{isFormValid:a}=e.payload;return({actionMgrID:n}=e.payload),a?Au(e.payload).pipe(mu((e=>(t=e,Au({})))),mu((async()=>{const{containerItemID:e}=t,a=jg(e),o=e,i=a?.dataInfo.content;delete i.classID;const c=K(o),l=Hp(c).length,u=Hp(c)[l-1]?kp(Hp(c)[l-1]):c,d=rh(e),p=Rp(d,e)||{},h=p?.referenceList?.replaceAll(".",""),g=p?.subscriptName,f=jg(u),m={containerItemID:u,data:{...f,caseInfo:{content:{...i}}}};r.push(jf(Nf,m)),((e,t,n)=>{Ip(t)&&e.push(jf(vf,{containerItemID:n,skipReleaseLockRequest:!0}))})(r,o,e);const I=(({itemData:e,workareaContainerData:t,subscriptData:n,pageGroupName:r,activeWorkArea:s,subscriptFieldName:a,actionMgrID:o,containerItemID:i})=>{const c={referenceList:e?.referenceList,ID:t?.caseInfo?.ID,index:n[a],containerName:B.MODAL,pageReference:B.CASE_INFO.CASE_INFO_CONTENT,viewID:B.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW,skipSemanticUrl:!0,actionType:B.RESOURCE_STATUS.CREATE,interestPage:`.${r}.${n[a]??""}`,targetProperty:`.${r??""}`,pageGroupName:r,context:s??"",subscriptFieldName:a};return{type:Et,payload:{isInCreateStage:!1,isModalAction:!0,parentContext:"",target:"",...c,actionMgrID:o,containerItemID:i,doDeleteCaseSummary:!1,isFormValid:!0}}})({itemData:p,workareaContainerData:f,subscriptData:i,pageGroupName:h,activeWorkArea:u,subscriptFieldName:g,actionMgrID:n,containerItemID:e});return r.push(I),s=i,r})),fu((()=>(uc.resolveActionByID(n,s),Ug(r),r=[],r)))):(((e,t)=>{const n={type:B.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};uc.rejectActionByID(e,!0,n),id.handleDeferredActionCompletion(t)})(n,e.payload.context),Au([]))})))},o_=[yE,PE,vE,SA,OA,kA,GA,HA,ZE,iA,rA,qA,gA,uA,e=>e.pipe(hu(Je),XA((()=>JA(100))),fu((e=>{const{actionMgrID:t,isChildCase:n,isModalAction:r,isProcessAction:s,isDataObject:a,skipReleaseLockRequest:o,isInCreateStage:i,containerItemID:c,context:l}=e.payload;return uc.resolveActionByID(t),No.publish(G.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:r,hideDelete:!s&&n,isDataObject:a,skipReleaseLockRequest:o,isInCreateStage:i,containerItemID:l||c}),[]}))),e=>e.pipe(hu(Ve),XA((()=>JA(100))),fu((e=>{const{actionMgrID:t,context:n,containerName:r,containerItemID:s}=e.payload,a=wt(r,n);return uc.resolveActionByID(t),Ug(jf(Rf,{containerItemID:s,target:a,doDeleteCaseSummary:!1})),[]}))),t_,n_,s_,a_],i_=o_;function c_(){return La((function(e,t){e.subscribe(Fa(t,ia))}))}const{RESOURCE_TYPES:l_}=B,u_=(e,t)=>{const n=Bl.isObjectCaseType(e.caseClassName);if(e.key&&!n){const n=rh(e?.context),r=Mp(n,e.key),s=e?.context;(r||e.updateData||(e=>{const t=Fg();if(!e)return!1;const n=K(e),r=rh(n),s=rh(e);if(!r||!s)return!1;const a=Rp(r,n),o=Rp(s,e);if(!a||!o)return!1;const{key:i}=a;let{key:c}=o;return c||(c=t?.getState().data?.[e]?.caseInfo?.ID),!(!i||!c||i===c)})(s))&&t.actionsOut.push(jf(df,e))}else t.actionsOut.push(jf(df,e))},d_=[e=>e.pipe(hu(oe),fu((e=>e.payload)),mu((e=>{const t={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===Np.PREVIEW&&e.context&&e.caseId&&!e.updateData){const t=wt(Np.PREVIEW,e.context),n=ul(t,Np.PREVIEW,e.context,{buildNew:!0}),r=decodeURI(e.caseId);Ug(Ef({...e,context:n,target:t,containerItemID:n,key:r,caseViewMode:G.REVIEW_MODE,root:{type:"reference",config:{context:G.getProperty(G.CASE_INFO.CASE_INFO_CONTENT),name:e.viewName,type:"view"}},data:{key:r,caseInfo:{ID:r,progress:!0,error:!1,caseTypeID:e.caseClassName,content:{classID:e.caseClassName}}}})),e.viewLoadingContainer={target:t,context:n}}const n={};if(t.RemoteSystemID)n.RemoteSystemID=t.RemoteSystemID;else if(q.isRemoteCase(t.caseClassName)){const{RemoteSystemID:e}=q.getRemoteCase(t.caseClassName);n.RemoteSystemID=e}let{restApi:r,reqType:s}=rm("loadView",t);return e.viewContext===l_.PAGE&&({restApi:r,reqType:s}=rm(Ge,{page:e.viewName,pageClass:e.pageClass})),Ba(Ko(r,{method:s,headers:n},e.context)).pipe(fu((t=>{const n=decodeURI(e.caseId);let r="";return"string"==typeof t.data?t.data?r=JSON.parse(t.data):(console.error("response data is empty!!"),r={}):r=t.data,{response:{...r,key:n},actionConfig:e,headers:tl(t.headers),rootView:ef.getIn(r,G.ROOT)}})),Su(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))})),mu((async e=>{const t={};if(e?.type===Te){if(t.actionsOut=cl(e),e?.payload?.context?.includes(Np.PREVIEW)){const n={...jg(e.payload.context),caseInfo:{progress:!1,error:!0}},r=wt(Np.PREVIEW,e.payload.context);t.actionsOut=jf(Nf,{key:n.key,target:r,containerName:Np.PREVIEW,context:e.payload.context,containerItemID:e.payload.context,data:n})}return t}try{t.actionMgrID=e?.actionConfig?.actionMgrID,t.rootView=e?.rootView;const{actionConfig:n,response:r,headers:s}=e;e?.actionConfig?.skipAssignmentsUpdate&&(delete r?.data?.caseInfo?.assignments,delete r?.data?.caseInfo?.availableActions,delete r?.data?.caseInfo?.availableProcesses);const{containerItemID:a,containerName:o}=n,{target:i,context:c}=(e=>{const{containerName:t,updateData:n,viewLoadingContainer:r}=e,s=t||pc.getTargetViewContainerName(Ge),a=r?.target??wt(s,e.context);return{target:a,context:r?.context??(t===Np.PREVIEW&&n?e.context:ul(a,s,e.context,{buildNew:!!t}))}})(n);n.context=c;const l={acName:i,context:c};let u={};u=Rd(r),u.directUrlUpdation=!1,await sl(u,n,l);const d={...n,target:i,context:c,containerItemID:a||c,headers:s},p=rl(u,d);if(p.resourceType=l_.CASE,o&&!p.updateData){p.caseViewMode=G.REVIEW_MODE;const e=rh(p?.context);((e,t,n,r,s)=>{e&&s===Np.PREVIEW?(n.data.caseInfo.progress=!1,delete n.root,r.actionsOut=jf(Nf,{...n,containerName:s})):e?(r.actionsOut=[],r.actionsOut.push(jf(Rf,{target:t,containerItemID:e}))):r.actionsOut=jf(Ef,{...n,containerName:s})})(Mp(e,p.key),e,p,t,o)}else p.preserveClientChanges=!0,t.actionsOut=[],o===Np.PREVIEW&&t.actionsOut.push({type:dt,payload:{context:c}}),u_(p,t)}catch(e){console.error(e),t.rootView={type:"error",payload:e}}const{caseId:n,context:r,viewName:s}=e.actionConfig;return"pyCasePreview"===s&&(e=>{No.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.CASE_PREVIEW,e)})({caseId:n,context:r}),t})),fu((({rootView:e,actionsOut:t,actionMgrID:n=0})=>(uc.resolveActionByID(n,e),$.setNeedsMapping(!1),t)))),e=>{let t=0,n=[];return e.pipe(hu(ie),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>{No.publish(B.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);const{debugInfo:n,context:r,viewName:s,className:a,skipSemanticUrl:o=!1,containerName:i=pc.getTargetViewContainerName(Ge)}=e,c=n&&{...ko.addDebugHeaders(n)},l=wt(i,r);let u="",d={},p=!0;if(!o){const{semanticURL:n,activate:r,activateContainerActionPayload:o}=Il(s,a,l);if(u=n,r)return Nl(o),Au({type:Fe,activateContainerActionPayload:o,actionConfig:e});if(kp(l)&&({continueExecution:p,removeActionPayload:d}=hl(l)),!p)return uc.rejectActionByID(t),Cu()}const{restApi:h,reqType:g}=rm(Ge,{page:s,pageClass:a});return Ba(Ko(h,{method:g,headers:c},r)).pipe(fu((t=>{let n={};return n="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...n,key:u,semanticURL:u},actionConfig:e,headers:tl(t.headers),removeActionPayload:d,skipSemanticUrl:o}})),Su(": Error ocurred during ajax call at showPage Epic : ",e.context))})),mu((async e=>{const t={};if(t.actionManagerID=e?.actionConfig?.actionMgrID,e&&e.type===Te)return n.push(cl(e)),t;let{type:r}=e;const{actionConfig:s,skipSemanticUrl:a}=e,o=s.containerName||pc.getTargetViewContainerName(ie),i=wt(o,s.context);No.publish(B.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className});const{remoteCasePayload:c,updatedType:l}=((e,t,n,r)=>{let s={},a=e;if(n.isTraditionalRemoteCase){s={...n};const e=Mp(r,s.insKey);e&&(t.activateContainerActionPayload={containerItemID:e},a=Fe)}return{remoteCasePayload:s,updatedType:a}})(r,e,s,i);if(r=l??r,s.isDeferLoaded){const{response:r,headers:o={}}=e,{isCreateDataObject:c,context:l}=s,u=Rd(r,{isCreateDataObject:c});u.directUrlUpdation=!a;const d={acName:i,context:l};await sl(u,s,d);const p=rl(u,{containerItemID:l,target:i,headers:o,context:l});t.rootView=ef.getIn(u,G.ROOT),n.push(jf(df,p))}else if(r===Fe){const{activateContainerActionPayload:{semanticURL:t,containerItemID:r}}=e,a={acName:i,context:Bp(r)};s.isTraditionalRemoteCase||await sl({directUrlUpdation:!0,semanticURL:t},s,a,!0),n.push(jf(Rf,{target:i,containerItemID:r}))}else{const t=ul(i,o,s.context),{response:r,headers:l={},removeActionPayload:u}=e,d=Rd(r,{isCreateDataObject:s.isCreateDataObject});d.directUrlUpdation=!a;const p={acName:i,context:t},h=Yc(t);await sl(d,s,p);const g={target:i,context:t,containerItemID:t,headers:l,debugInfo:s.debugInfo,currentCaseViewMode:h,referenceList:s?.referenceListStr,subscriptName:s?.subscriptName},f=rl(d,g);f.resourceType=B.PAGE,s.isCreateDataObject&&(f.resourceType=B.RESOURCE_TYPES.DATA,f.resourceStatus=B.RESOURCE_STATUS.CREATE,delete f.data.caseInfo,f.referenceList=s.referenceListStr,f.subscriptName=s.subscriptName),((e,t,n)=>{e.isTraditionalRemoteCase&&(n.resourceType=B.CASE,n.key=Bl.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:Mc(Bl.getRemoteCaseKey(t.assignmentID,t.insKey))}},n.isTraditionalRemoteCase=!0,n.className=t.className)})(s,c,f),f.data??={},f.data.traditionalGadgetId=Bl.getUniqueGadgetId();const m=ll(i,f);u.containerItemID&&dl(m)&&n.push(jf(vf,{containerItemID:u.containerItemID,target:i})),n.push(m),El(n)}return No.publish(B.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:i,pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),t})),fu((({actionManagerID:e=0,rootView:t})=>{uc.resolveActionByID(e,t),Ug(n),n=[]})),c_())}],p_=d_,h_=(e,t)=>{const{context:n,pageName:r,dataContext:s,dataContextParameters:a,semanticURL:o,skipSemanticUrl:i,RemoteSystemID:c}=e,{removeActionPayload:l}=t,{restApi:u,reqType:d,body:p}=rm(We,{pageName:r,dataContext:s,dataContextParameters:a}),h={};return h.RemoteSystemID=c,Ba(Ko(u,{method:d,headers:h,body:p},n)).pipe(fu((t=>({response:{...t.data,key:o,semanticURL:o},actionConfig:e,headers:tl(t.headers),removeActionPayload:l,skipSemanticUrl:i}))),Su("Error occurred during ajax call at showData Epic : ",e.context))},{RESOURCE_TYPES:g_}=B,f_=e=>{let t,n=0,r=[];return e.pipe(hu(ce),dA((e=>(({actionMgrID:n}=e.payload),Au(e.payload).pipe(mu((e=>((e,t)=>{const{context:n,pageName:r,dataContext:s,dataContextParameters:a,skipSemanticUrl:o=!1,isDeferLoaded:i=!1,parentAction:c="",resourceType:l,containerName:u,RemoteSystemID:d}=e,p=wt(u,n);let h="",g={},f=!1;if(!o){h=tm(We,{pageName:r,dataViewName:s},a);const{activate:n,activateContainerActionPayload:o}=fl(g_.PAGE,p,{semanticURL:h});if(n)return Au({type:Fe,activateContainerActionPayload:o,actionConfig:e});if(({continueExecution:f,removeActionPayload:g}=hl(p)),!f)return uc.rejectActionByID(t),Cu()}return h_({context:n,pageName:r,dataContext:s,dataContextParameters:a,semanticURL:h,skipSemanticUrl:o,containerName:u,isDeferLoaded:i,parentAction:c,resourceType:l,RemoteSystemID:d},{removeActionPayload:g})})(e,n))),mu((async e=>{if(e&&e.type===Te)return r.push(cl(e)),r;const{type:n,actionConfig:s,headers:a,response:o,skipSemanticUrl:i}=e;t=ef.getIn(o,G.ROOT);const{containerName:c,parentAction:l,resourceType:u}=s,d=wt(c,s.context);let p;const h=Yc(s?.context);if(s.isDeferLoaded){p=Rd(o),p.directUrlUpdation=!i;const t={acName:d,context:s.context};await sl(p,s,t);const n={target:d,headers:a,context:s.context,containerItemID:e.containerItemID},c=rl(p,n);return r=jf(df,c),r}if(n===Fe){const{activateContainerActionPayload:{semanticURL:t,containerItemID:n}}=e,a={acName:d,context:Bp(n)};await sl({directUrlUpdation:!0,semanticURL:t},s,a,!0),r.push(jf(Rf,{target:d,containerItemID:n,resourceType:g_.DATA}))}else if("DATA"===u&&l===yt){const{context:e}=s,t=o?.data,n={context:e,data:t};r.push(jf(df,n))}else{const t=ul(d,c,s.context),{removeActionPayload:n}=e;p=Rd(o),p.directUrlUpdation=!i;const l={acName:d,context:t};await sl(p,s,l);const u=rl(p,{target:d,context:t,containerItemID:t,headers:a,currentCaseViewMode:h});u.resourceType=g_.DATA;const g=ll(d,u);n.containerItemID&&dl(g)&&r.push(jf(vf,{containerItemID:n.containerItemID,target:d})),El(r),r.push(g)}return r})),fu((()=>(uc.resolveActionByID(n,t),Ug(r),r=[],r))))))))},m_=e=>{const{dataViewName:t,context:n,dataViewParameters:r}=e,s={data_view_ID:t,dataViewParameters:encodeURIComponent(JSON.stringify(r))},{restApi:a,reqType:o}=rm("deleteDataObject",s);return Ba(Ko(a,{method:o},n)).pipe(fu((t=>({response:t.data,actionInPayload:e}))),Su("Error occurred during ajax call at deleteDataObject Epic",n))},I_=e=>{let t=0,n=[];return e.pipe(hu(gt),Tu(100),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>m_(e))),mu((async e=>{if(e&&e.type===Te){const{payload:r}=e,s=cl({...e,...r,actionMgrID:t});return n.push(s),n}return[]})),fu((()=>(1===n.length&&vc(n[0].type)?uc.rejectActionByID(t):uc.resolveActionByID(t),Ug(n),n=[],n))))},y_=e=>{const{dataViewID:t,dataViewParameters:n,context:r}=e,s={data_view_ID:t},{restApi:a,reqType:o}=rm("getDataObjectActions",s);return Ba(Ko(a,{method:o,body:{dataViewParameters:n}},r)).pipe(fu((e=>({...e.data}))),Su("Error occurred during ajax call at GET data object actions : ",e.context))},E_=e=>{let t=0,n=[];let r={};return e.pipe(hu(Ce),Tu(100),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>y_(e))),mu((async e=>e&&e.type===Te?(n.push(cl(e)),n):(r=e,[]))),fu((()=>(1===n.length&&vc(n[0].type)?uc.rejectActionByID(t):uc.resolveActionByID(t,r),Ug(n),n=[],n))))},A_=[f_,e=>{let t=0,n=[];return e.pipe(hu(ht),Tu(100),gu((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:B.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return uc.rejectActionByID(t,!0,e),Au([])}return Au(e.payload).pipe(mu((e=>Nu(e))),mu((async e=>{if(e&&e.type===Te){const{payload:r}=e,s=cl({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r}=e,{containerItemID:s,isModalAction:a}=r,o=a?Np.MODAL:Np.PRIMARY,i={target:wt(o,s),containerItemID:s,context:s};return n.push(jf(vf,i)),n})),fu((()=>(1===n.length&&vc(n[0].type)?uc.rejectActionByID(t):uc.resolveActionByID(t),Ug(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(hu(ft),Tu(100),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>Pu(e))),mu((async e=>{if(e&&e.type===Te){const{payload:r}=e,s=cl({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r,response:s,headers:a={}}=e,{containerName:o,readOnly:i,actionName:c}=r,l=wt(o,r.context),u=ul(l,o,r.context),d={acName:l,context:u};if(s?.data?.dataInfo){const{dataInfo:e}=s.data;e.dataContext||=r.dataLookUp,e.dataContextParameters||=r.requestPayload}await sl(s,r,d);const p=rl(s,{target:l,context:u,containerItemID:u,headers:a});return p.resourceType=B.RESOURCE_TYPES.DATA,p.resourceStatus=B.RESOURCE_STATUS.UPDATE,p.readOnly=i,p.actionName=c,p.key=JSON.stringify(r.requestPayload),n.push(jf(Ef,p)),n})),fu((()=>(1===n.length&&vc(n[0].type)?uc.rejectActionByID(t):uc.resolveActionByID(t),Ug(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(hu(mt),Tu(100),gu((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:B.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return uc.rejectActionByID(t,!0,e),Au([])}return Au(e.payload).pipe(mu((e=>Ou(e))),mu((async e=>{if(e&&e.type===Te){const{payload:r}=e,s=cl({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r}=e,{containerItemID:s,isModalAction:a}=r,o=a?Np.MODAL:Np.PRIMARY,i={target:wt(o,s),containerItemID:s,context:s};return n.push(jf(vf,i)),n})),fu((()=>(1===n.length&&vc(n[0].type)?uc.rejectActionByID(t):uc.resolveActionByID(t),Ug(n),n=[],n))))})))},I_,E_,e=>{let t=0,n=[];return e.pipe(hu(It),Tu(100),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>Du(e))),mu((async e=>{if(e&&e.type===Te){const{payload:r}=e,s=cl({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r,response:s,headers:a={}}=e,{containerName:o,actionID:i,context:c,actionName:l}=r,u=wt(o,r.context);let d=J(o,c);d=ee(c,d);const p={target:u,context:d,containerItemID:d,headers:a,resourceType:B.RESOURCE_TYPES.DATA,resourceStatus:B.RESOURCE_STATUS.OPEN_FLOW_ACTION,key:JSON.stringify(r.dataViewParameters),actionID:i,actionName:l};if(s?.data?.dataInfo){const{dataInfo:e}=s.data;e.dataContext||=r.lookupDatapage,e.dataContextParameters||=r.dataViewParameters}const h={acName:u,context:c};await sl(s,r,h);const g=rl(s,p);return n.push(jf(Ef,g)),n})),fu((()=>(1===n.length&&vc(n[0].type)?uc.rejectActionByID(t):uc.resolveActionByID(t),Ug(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(hu(yt),Tu(100),gu((e=>{const{isFormValid:r}=e.payload;({actionMgrID:t}=e.payload);const s=e.payload.context;if(!r){const e={type:B.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return uc.rejectActionByID(t,!0,e),Au([])}return fo({context:s,stateObj:jg(s),clearContextMessages:!0}),Au(e.payload).pipe(mu((e=>Ru(e))),mu((async e=>{if(e&&e.type===Te){Ql(e,"dataObject");const{payload:r}=e,s=cl({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r,response:s,headers:a={}}=e,{containerName:o,containerItemID:i,resourceType:c,key:l}=r,u=wt(o,r.context),d={acName:u,context:r.context};await sl(s,r,d);const p={key:l,target:u,resourceType:c,containerItemID:i,headers:a,context:r.context};return n=((e,t,n,r)=>{const{resourceType:s,key:a,containerItemID:o}=r,i=rl(n,t);i.resourceType=s||B.RESOURCE_TYPES.DATA;const c=te(o);e.push(jf(vf,i));const l=$g(".dataContext","dataInfo",c),u=$g(".dataContextParameters","dataInfo",c),d={context:c,skipSemanticUrl:!0,resourceType:s,parentAction:yt,dataContext:l,dataContextParameters:u},p=l&&u&&tm(We,{pageName:G.PY_DETAILS,dataViewName:l},u)||"";if(o?.includes(G.PREVIEW)){const t={type:ce,payload:{pageName:G.VIEW_NAMES.PY_DATA_PREVIEW,container:G.PREVIEW,containerName:G.PREVIEW,...d}};e.push(t)}else if(s!==G.PAGE&&a===p&&o?.includes(G.PRIMARY)){const t={type:ce,payload:{pageName:G.VIEW_NAMES.PY_DETAILS,containerName:"",...d}};e.push(t)}return e})(n,p,s,{key:l,resourceType:c,containerItemID:i}),n})),fu((()=>(1===n.length&&vc(n[0].type)?uc.rejectActionByID(t):uc.resolveActionByID(t),Ug(n),n=[],n))))})))}],__=A_;function C_(e,t){return void 0===t&&(t=zA),La((function(n,r){var s=null,a=null,o=null,i=function(){if(s){s.unsubscribe(),s=null;var e=a;a=null,r.next(e)}};function c(){var n=o+e,a=t.now();if(a<n)return s=this.schedule(void 0,n-a),void r.add(s);i()}n.subscribe(Fa(r,(function(n){a=n,o=t.now(),s||(s=t.schedule(c,e),r.add(s))}),(function(){i(),r.complete()}),void 0,(function(){a=s=null})))}))}const{RESOURCE_TYPES:{CASE:S_,DATA:T_,OBJECT:N_}}=B;let P_=[],O_=!1,D_=!1;const R_={},b_=[e=>e.pipe(hu(Se),C_(200),fu((e=>e.payload)),mu((e=>{D_=!1,No.subscribe(B.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{D_=!0}));const t=Po.getPreviewMode()&&ko.addDebugHeaders({debugId:ef.generateUniqueID()});R_.dataContext=e.payload.dataViewName,R_.dataContextParameters=e.payload.dataViewKeys;const{context:n,requestType:r,routeKey:s}=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"'))),O_=s===bt,O_&&$.setNeedsMapping(!0);const o=T()+a,i=e.options.context;let c;const l={},u=e?.payload?.caseClassName;if(q.isRemoteCase(u)){const{RemoteSystemID:e}=q.getRemoteCase(u);l.RemoteSystemID=e}if(Vh.isWSSPortal()&&(l[G.X_ORIGIN_CHANNEL]="WSS"),"POST"===r){c=e.payload,a.indexOf("viewType=")<0&&(a=`${a}?viewType=page`);let i;switch(Al(s)){case S_:case N_:i={caseTypeID:c.caseTypeID,processID:c.processID,content:{}};break;case T_:i=R_;break;default:i=c}return Ba(Ko(o,{method:r,body:i,headers:{...l,...t}},n)).pipe(fu((t=>({response:{...t.data},payload:e,headers:tl(t.headers,"",l)}))),Su(": Error occurred during ajax call at historyEpic : ",e))}return Ba(Ko(o,{method:"GET",headers:{...l,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(fu((n=>({response:n.data,payload:e,headers:{...tl(n.headers),...t}}))),Wa((r=>{if(s===rt){const n={messages:[{type:"error",message:r.response.data.errorDetails[0].localizedValue}],category:"PAGE"};cc.setComponentCache("assignments-launchAssignment-Error",n);const s=Mh(xh()),a=jh.getEndPointInfo(s.split("/assignments")[0]),o=T()+a.routeEndpoint;return e={...e,routeKey:ze,resetSemanticURL:!0},Ba(Ko(o,{method:a.reqType,headers:{...l,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(fu((n=>({response:n.data,payload:e,headers:{...tl(n.headers),...t}}))))}return Au(kf(": Error occurred during ajax call at historyEpic : ",r,n))})))})),mu((async e=>{if(D_)return P_;if(No.subscribe(B.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{D_=!0})),e&&e.type===Te)return cl(e);const{headers:t={},response:n,payload:r}=e,s=Rd(n,{[B.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),a=r.options.acName,o=Yp(a)&&Jp(a)?kp(a):e.payload.options.context,i=o;t.RemoteSystemID=r?.payload?.RemoteSystemID;const c={target:a,context:o,containerItemID:i,headers:t,debugInfo:{debugId:t[G.COREHEADER_APP_DEBUG_ID]}};let l=r?.payload?.pageClass;const u=r?.payload?.page,d=O_?bt:ze,p=O_?r.payload.objectID:r.payload.workID,h=O_?"{objectID}":"{workID}";let g=O_?`objects/${p}`:"";r?.payload?.caseName&&p&&(g=tm(d,{caseName:e.payload.payload.caseName}),g=g?.replace(h,p)||"",l=r?.payload?.caseClassName),(r?.routeKey===rt||r?.resetSemanticURL)&&((e,t)=>{const n=Uc(t);let r=tm(ze,{caseClassName:Lc(t)},{id:n});r=r?.replace("{workID}",String(Mc(n))).replace("{id}",String(Mc(n))),um({directUrlUpdation:!0,semanticURL:r,options:{}})})(0,s),((e,t)=>{const n=t?.data?.caseInfo;e===rt&&n?.caseTypeID&&n?.content&&Wc(n.caseTypeID)&&(n.content.coexistenceAction=Ye)})(r?.routeKey,s),No.publish(B.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:u,pageClass:l});const f=ef.getIn(s,G.COMPONENTS);f&&await ic(f),Hi(s,r.options.actionConfig,!0),No.publish(B.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:a,pageName:u,pageClass:l});let m=rl(s,c);return m=((e,t,n)=>{if(e===Qc.CASE||e===Qc.OBJECT||e===Qc.ASSIGNMENT){if(t?.caseInfo?.assignments&&t?.caseInfo?.assignments.length>0){const{key:e,flowName:r}=ol(t.caseInfo.assignments[0].ID);n.key=e||t.caseInfo.ID,n.flowName=r}else n.flowName="",n.key=t?.caseInfo?.ID||t?.objectInfo?.ID||t.semanticURL;n.resourceType=e,n.semanticURL=t.semanticURL,e===Qc.ASSIGNMENT?(n.caseViewMode=G.PERFORM_MODE,n.resourceType=Qc.CASE):n.caseViewMode=G.REVIEW_MODE}else n.resourceType=e,n.semanticURL=t.semanticURL;return n})(Al(e.payload.routeKey),{...n.data,semanticURL:g,caseViewMode:G.REVIEW_MODE},m),m.data.traditionalGadgetId=Bl.getUniqueGadgetId(),P_.push(ll(a,m)),((e,t)=>{let n=cc.getComponentCache("assignments-launchAssignment-Error")||{};n&&"object"==typeof n&&Object.keys(n).length>0&&(n={...n,context:e},t.push(jf(bf,n)),cc.resetComponentCache("assignments-launchAssignment-Error"))})(o,P_),El(P_),P_})),fu((()=>(D_||Ug(P_),P_=[],O_=!1,D_=!1,P_))),Su("Error occurred"))],v_=b_,x_=[e=>{let t=0;return e.pipe(hu(ot),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),fu((()=>{const e=Fg()?.getState(),n=qy();return y()(e,n)&&t>0?uc.resolveActionByID(t,{}):uc.rejectActionByID(t),[]})),c_())}],w_=[e=>{let t=0,n=[];return e.pipe(hu(le),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>{const{context:t,skipSemanticUrl:n=!1,insightID:r}=e;let s,a="";n||(a=tm(He,{insightID:"{insightID}"}),a=a.replace("{insightID}",r),s=jh.getEndPointInfo(a));const{restApi:o,reqType:i}=rm(He,{...s?.payload||[],insightID:r});return Ba(Ko(o,{method:i},t)).pipe(fu((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:a,semanticURL:a},actionConfig:e,skipSemanticUrl:n}})),Su(": Error occurred during ajax call at showPage Epic : ",e.context))})),mu((async e=>{if(e&&e.type===Te)return n.push(cl(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,s=pc.getTargetViewContainerName(ie),a=wt(s,t.context),o=ul(a,s,t.context),{response:i}=e,c=Rd(i);c.directUrlUpdation=!r;const l={acName:a,context:o},u=!r,d=r;await sl(c,t,l,u,d);const p=rl(c,{target:a,context:o,containerItemID:o});p.resourceType=B.PAGE;const h=ll(a,p);return n.push(h),El(n),n})),fu((()=>{uc.resolveActionByID(t),Ug(n),n=[]})),c_())}],M_=w_,L_=[e=>{let t=0,n=[];return e.pipe(hu(ue),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>{const{context:t,skipSemanticUrl:n=!1,dashboardID:r}=e;let s="";n||(s=tm(qe,{dashboardID:r}),s=s.replace("{dashboardID}",r));const{restApi:a,reqType:o}=rm(qe,{dashboardID:r});return Ba(Ko(a,{method:o},t)).pipe(fu((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:s,semanticURL:s},actionConfig:e,skipSemanticUrl:n}})),Su(": Error occurred during ajax call at showPage Epic : ",e.context))})),mu((async e=>{if(e&&e.type===Te)return n.push(cl(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,s=pc.getTargetViewContainerName(ie),a=wt(s,t.context),o=ul(a,s,t.context),{response:i}=e,c=Rd(i);c.directUrlUpdation=!r;const l={acName:a,context:o},u=!r,d=r;await sl(c,t,l,u,d);const p=rl(c,{target:a,context:o,containerItemID:o});p.resourceType=B.PAGE;const h=ll(a,p);return n.push(h)})),fu((()=>{uc.resolveActionByID(t),Ug(n),n=[]})),c_())}],F_=L_,U_=e=>{const{containerName:t,isInCreateStage:n}=e;return n?G.MODAL:t||pc.getTargetViewContainerName(Rt)},j_=e=>"pzCreateDetails"===e?.uiResources?.root?.config?.name||!1,k_=(e,t)=>{const n=j_(e),{skipBrowserSemanticUrlUpdate:r=!1}=t;ef.setIn(e,["directUrlUpdation"],!n&&!r)},V_=e=>e.confirmationNote?G.REVIEW_MODE:G.PERFORM_MODE,$_=(e,t)=>{let n;return n=!e.renderInline&&!Vh.getDefaultCasePage()&&j_(t),n},B_=(e,t)=>{const{class:n,context:r,viewType:s=Zc.PAGE}=e,{removeActionPayload:a}=t,o=e?.pageName?e?.pageName:Vh.getDefaultCasePage();return Ba(zi.createCase(n,{...e,pageName:o,viewType:s,context:r})).pipe(fu((({response:t,headers:n})=>($.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:a}))),Su("Error occurred during ajax call at createObject Epic : ",r))},G_="CREATE_OBJECT",W_=e=>{let t,n=0,r=[],s={};return e.pipe(hu(G_),Tu(100),gu((e=>{if(({actionMgrID:n}=e.payload),Bl.isExternalObject(e.payload.class)&&!jl(e.payload.context)){const e={type:B.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return uc.rejectActionByID(n,!0,e),Au([])}return Au(e.payload).pipe(mu((e=>{const{context:r}=e;t=e.class;const s=U_(e),a=wt(s,r),{continueExecution:o,removeActionPayload:i}=pE(a);return o?B_(e,{removeActionPayload:i}):(uc.rejectActionByID(n),Cu())})),mu((async e=>{if(e&&e.type===Te)return e.payload.context=((e,t)=>Bl.isExternalObject(e)&&t?t:yh())(t,e.payload.context),r.push(cl(e)),r;const{actionInPayload:a,response:o,headers:i,removeActionPayload:c}=e,l=$_(a,o);ef.setIn(o.data,G.getProperty(G.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const u=U_({...a,isInCreateStage:l}),d=wt(u,a.context),p=ul(d,u,a.context);if(((e,t)=>{Bl.isExternalObject(e.class)&&(e.containerItemID=e.context,LE(t,e))})(a,r),((e,t,n)=>!Rc(e)&&Yp(t)&&!Bl.isExternalObject(n))(u,d,t)){const{continueExecution:e}=hl(d);if(!e)return uc.rejectActionByID(n),Cu()}if(((e,t)=>!e&&!t)(a?.openCaseViewAfterCreate??!0,l)){const{businessID:e,caseType:t,resolvedURL:n}=_c(o);return s={id:e,label:t,href:n},fE(s),mE({caseId:e,caseType:t}),r}(e=>{Bl.isExternalObject(e.class)&&fE({content:Hh().getLocaleValue("Successfully submitted!","Assignment")})})(a);const h=Rd(o),g=String(Mc(Ic(h)));let f=tm(Rt,{caseClassName:mc(h)});f=f.replace(/{.+?}/,g),h.semanticURL=f,cc.setComponentCache(g,ko.addDebugHeaders(a.debugInfo)),k_(h,a);const m={acName:d,context:p};await sl(h,a,m);const I={target:d,context:p,headers:i,semanticURL:f,caseViewMode:V_(h),containerItemID:p,isInCreateStage:l,isMinimizable:l,assignmentContext:ef.getIn(h,uE),nextAssignmentInfo:ef.getIn(h,lE),resourceType:B.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:a.openCaseViewAfterCreate,modalOptions:a.modalOptions,debugInfo:a.debugInfo};yc(I,h);const y=rl(h,I),E=ll(d,y);return((e,t,n)=>{if(dl(e)){const{removeActionPayload:e,target:r}=t;kc(n,{removeActionPayload:e,target:r})}})(E,{removeActionPayload:c,target:d},r),r.push(E),El(r),r})),fu((()=>(Cl(r),Gc(r,n),(e=>{Bl.isExternalObject(e)&&$.setNeedsMapping(!1)})(t),s={},r=[],r))))})))},H_=(e,t)=>{const{assignmentID:n,actionID:r,caseID:s,context:a,additionalHeaders:o={},jsActionQueryParams:i}=e,{state$:c}=t,l=Zc.PAGE,u="executeObjectWideAction",d={assignmentID:n,actionID:r,viewType:l,objectID:s};let{restApi:p}=rm(u,d);const{reqType:h}=rm(u,d);l&&!p?.includes("viewType=")&&(p=p?.includes("?")?`${p}&viewType=${l}`:`${p}?viewType=${l}`),p=Xl(i,p),e.viewType=l;const{content:g}=nl(a,{isObjectWideAction:!0}),f=c.value.data[a]?.objectInfo?.headers||{},{etag:m}=f,I={"if-match":m,...o};return Ba(Ko(p,{method:h,body:g,headers:I},a)).pipe(fu((t=>{const{data:n,headers:r}=t;return $.analyseResponse(t.data),{actionInPayload:e,response:n,headers:tl({...I,...r})}})),Su("Error occurred during ajax call at executeObjectWideAction Epic : ",a))},q_=(e,t)=>{const{isCaseWideAction:n}=t;return{isCaseWideAction:n,caseID:Ic(e)}},{RESOURCE_TYPES:z_}=B,Y_=(e,t)=>{let n=0,r=[],s={},a="";return e.pipe(hu(Ot),gu((e=>{if(({actionMgrID:n}=e.payload),a=e.payload.context,fo({context:a,stateObj:jg(a),clearContextMessages:!0}),!jl(a)){const t={type:B.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return uc.rejectActionByID(n,!0,t),id.handleDeferredActionCompletion(e.payload.context),Au([])}return Au(e.payload).pipe(mu((e=>{ME(r,e);const n={...e};return H_(n,{state$:t})})),mu((async e=>{if(e?.type===Te){const t=cl(e);return r.push(t),r}ed.clearContextedCache(a);const{headers:t,actionInPayload:o,response:i}=e,{containerItemID:c,isModalAction:l,isInCreateStage:u}=o,d=rh(c);o.target=d,ef.setIn(i.data,G.OBJECT_INFO_IS_LOCAL_ACTION,!1),JE({submitResponse:i});let p=Rd(i,{[B.STOPMERGEACTIONS]:!i.nextAssignmentInfo});const h=mc(p),g=K(o.context),f=Hp(g)[0]?kp(Hp(g)[0]):g,m=(e=>{const t=Ec(e);return Wl(t)&&Hl(Vh.getOperatorIdentifier(),t)})(p),I=u&&!m;!l||u||VE(o.context,f)||(p=yl(p,jg(c)));const y=rl(p,{headers:t,actionMgrID:n,directUrlUpdation:!1});((e,t)=>{const{attachmentsExist:n}=t;n&&ef.setIn(e,B.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),ef.setIn(e,B.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())})(y.data,o),y.caseClassName=h,y.resourceType=z_.ASSIGNMENT,y.headers=t;const E=Ic(p);yc(y,p);const A=tm(Rt,{caseClassName:h}).replace(/{.+?}/,String(Mc(E)));p.semanticURL=A,y.semanticURL=A,await qE(o,y,!1,E,p,r,e,i,!0),I&&(s=$E(o),mE({caseId:o.caseID,caseType:o.caseTypeID,assignmentId:o.assignmentID})),((e,t)=>{const n=mc(e?.response),r=Ec(e?.response),{caseTypeID:s}=r,a=Vh.getFeatureMap();(a?.deferUpdateCaseSummaryView??!Object.hasOwn(a,G.DEFER_UPDATE_CASESUMMARY_VIEW))&&s&&fg(G.CASESUMMARY_VIEW_NAME,s)&&qc(t,e?.actionInPayload,e?.response,{caseClassName:n})})(e,r),id.handleDeferredActionCompletion(a),zE(y,o,f);const _=q_(p,o);return Sc({..._,containerItemID:c}),jE(r,{transientItemID:c,target:d,isModalAction:l}),r})),fu((()=>{const e=r.find((e=>e.type===Te));return e?(id.handleDeferredActionCompletion(a),YE(e),uc.rejectActionByID(n)):uc.resolveActionByID(n,s),Cl(r),$.setNeedsMapping(!1),r=[],s={},r})))})))},K_=(e,t)=>{const{insKey:n,headers:r,context:s,debugInfo:a,viewType:o}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:Vh.getDefaultCasePage(),l=rm(bt,{objectID:n,params:{pageName:c}});let{restApi:u}=l;const{reqType:d}=l;return"none"===o&&(u=`${u?.split("viewType")[0]}viewType=none`),Ba(Ko(u,{method:d,headers:{...r,...a&&{...ko.addDebugHeaders(a)}}},s)).pipe(fu((t=>($.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:tl({...r,...t.headers}),removeActionPayload:i}))),Su("Error occurred during ajax call at getObject Epic : ",s))},J_="GET_OBJECT",{RESOURCE_TYPES:X_}=B,Q_=async(e,t)=>{const{actionInPayload:n,activateContainerActionPayload:r,type:s,response:a,removeActionPayload:o,headers:i}=e,{context:c,skipBrowserSemanticUrlUpdate:l,debugInfo:u}=n,d=Pc(bt,n),p=wt(d,c);if(bc(s))await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:r},actionInPayload:s,actionInPayload:{context:a,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=Pc(bt,s),l=wt(c,a),u=Bp(r);await sl({directUrlUpdation:!o,semanticURL:n},s,{acName:l,containerName:c,target:l,context:u}),e.push(jf(Rf,{containerItemID:r,target:l,context:u,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:r,actionInPayload:n});else{const e=ul(p,d,c,{buildNew:!0}),r=Rd(a),s=(e=>{const t=Ic(e),n=mc(e);let r=tm(bt,{objectClassName:n});return r=r?.replace("{objectID}",String(Mc(t))),r})(r);r.semanticURL=s,r.directUrlUpdation=!l;const h={acName:p,context:e};await sl(r,n,h);const g=rl(r,{target:p,context:e,containerItemID:e,semanticURL:s,headers:i,debugInfo:u});g.caseViewMode=G.REVIEW_MODE,g.resourceType=X_.OBJECT,yc(g,r);const f=ll(p,g);o.containerItemID&&dl(f)&&t.push(jf(vf,{containerItemID:o.containerItemID,target:p})),t.push(f)}El(t);const h=n.insKey;Tc({caseKey:h,actionInContext:c})},Z_=e=>{let t=0,n=[];return e.pipe(hu(J_),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>{const{context:n,isChild:r,viewType:s}=e,a=Pc(bt,e),o=wt(a,n);let i,c=!0;if("none"!==s){const e=hl(o);c=e.continueExecution,i=e.removeActionPayload}if(!c)return uc.rejectActionByID(t),Cu();const{activate:l,activateContainerActionPayload:u}=fl(X_.OBJECT,o,e);return l&&!r&&"none"!==s?Au({type:Fe,activateContainerActionPayload:u,actionInPayload:e}):K_(e,{removeActionPayload:i})})),mu((async e=>{if(e&&vc(e.type))return n.push(cl(e)),n;if("none"===e?.actionInPayload?.viewType){const t=jg(e?.actionInPayload?.context);if(t?.context_data?.caseViewMode!==G.PERFORM_MODE){const t=Rd(e?.response),r={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:dt,payload:{context:r.context,doDeleteConfirmationDetails:!1}}),n.push(jf(df,r));const s=rh(e?.actionInPayload?.context),a=Oc(e?.actionInPayload?.context),o=Object.freeze({target:s,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:a});if(Ac(e?.actionInPayload?.context)){const t=rl(e?.response,{...o});_l({...t,isArrayDeepMerge:!0},n)}}}else await Q_(e,n);return n})),fu((()=>(Ug(n),Gc(n,t),n=[],n))))},eC="OPEN_OBJECT_ACTION",tC=e=>{const{actionID:t,caseID:n,context:r,openActionType:s,modalLoadingContainer:a}=e,o=Zc.FORM,i=rm(vt,{objectID:n,actionID:t,viewType:o}),{reqType:c}=i;let{restApi:l}=i;e.actionType=G.RESOURCE_TYPES.OBJECT,l&&!l.includes("viewType=")&&(l=l.includes("?")?`${l}&viewType=${o}`:`${l}?viewType=${o}`);const u=a?.context??r;return Ba(Ko(l,{method:c,headers:{}},u)).pipe(fu((t=>($.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:tl(t.headers)}))),Su(`: Error occurred during ajax call at ${s} Epic : `,u))},nC=async(e,t,{headers:n,actionInPayload:r})=>{const{context:s,actionName:a,openActionType:o,doDeleteCaseSummary:i,modalLoadingContainer:c}=r,l=Rd(e,{info:B.OBJECT_INFO.OBJECT_INFO}),u=Pc(o,r),d=c?.target??wt(u,s),{context:p,containerItemID:h,isNewContainerItem:g}=((e,t,n,r)=>{let s,a,o=!1;const i=Kp(e);return!Jp(e)||i&&!wp(e,r)?(a=J(t,n),Rc(t)&&(a=ee(n,a)),s=a,o=!0):(s=i?Mp(e,r):kp(e),a=Bp(s)),{context:a,containerItemID:s,isNewContainerItem:o}})(d,u,s,e.data.objectInfo.ID),f={acName:d,target:d,containerName:u,context:p};await sl(l,r,f);const m=l.uiResources?.root,I=(e=>e?G.PERFORM_MODE:G.REVIEW_MODE)(m),y=rl(l,{target:d,context:p,containerItemID:h,caseViewMode:I,doDeleteCaseSummary:i,headers:n,actionName:a,isMinimizable:!1,isInCreateStage:Rc(u),resourceType:B.RESOURCE_TYPES.OBJECT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,actionType:r.actionType});if(m&&yc(y,l),Rc(u)&&delete y.doDeleteCaseSummary,t.push(jf((e=>e?Ef:Nf)(g),y)),g||t.push(jf(Of,y)),g){const s=Hp(r.contextName),a=Mp(s,e.data.objectInfo.ID);if(a){const e={data:{objectInfo:{headers:n}},context:a};t.push(jf(df,e))}}return h!==kp(d)&&t.push(jf(Rf,{target:d,containerItemID:h})),Ac(h)&&!c?.context&&_l(y,t),t},rC=e=>{e.openActionType=vt;if(Pc(e.openActionType,e)===G.MODAL){const t=Pc(e.openActionType,e),n=wt(t,e.context),r=ee(e.context,J(t,e.context));Ug(Ef({target:n,context:r,containerItemID:r,key:e.caseID,caseViewMode:G.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:G.getProperty(G.CASE_INFO.CASE_INFO_CONTENT),type:"view"}},data:{key:e.caseID,objectInfo:{ID:e.caseID}}})),Ug(Pf({context:r})),e.modalLoadingContainer={target:n,context:r},tC(e)}return tC(e)},sC=e=>{let t=0,n=[];return e.pipe(hu(eC),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>rC(e))),mu((async e=>{if(vc(e.type)){const t=cl(e);n.push(t);const r=jg(e.payload.context);return r?.context_data?.isLoading&&n.push(jf(Of,e.payload)),n}const{actionInPayload:t,headers:r,response:s}=e,{actionID:a}=t;return ef.setIn(s,"data.objectInfo.activeActionID",a),ef.setIn(s.data,G.getProperty(G.OBJECT_INFO_IS_LOCAL_ACTION),!0),t.refreshConditions&&ef.setIn(s.data,G.getProperty(G.CASE_INFO_REFRESH_CONDITIONS),t.refreshConditions),await nC(s,n,{headers:r,actionInPayload:t}),fA(t),n})),fu((()=>(Ug(n),Gc(n,t),n=[],n))))},aC=e=>{const{containerName:t,isInCreateStage:n}=e;return n?G.MODAL:t||pc.getTargetViewContainerName(xt)},oC=(e,t)=>{const{class:n,context:r,viewType:s=Zc.PAGE}=e,{removeActionPayload:a}=t,o=e?.pageName?e?.pageName:Vh.getDefaultCasePage();return Ba(zi.createCase(n,{...e,pageName:o,viewType:s,context:r,retrieveActionViewForNewObject:!0})).pipe(fu((({response:t,headers:n})=>($.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:a}))),Su("Error occurred during ajax call at createObject Epic : ",r))},iC="CREATE_EXTERNAL_OBJECT",cC=e=>{let t=0,n=[];return e.pipe(hu(iC),Tu(100),fu((e=>(({actionMgrID:t}=e.payload),e.payload))),mu((e=>{const{context:n}=e,r=aC(e),s=wt(r,n),{continueExecution:a,removeActionPayload:o}=pE(s);return a?oC(e,{removeActionPayload:o}):(uc.rejectActionByID(t),Cu())})),mu((async e=>{if(e&&e.type===Te)return e.payload.context=yh(),n.push(cl(e)),n;const{actionInPayload:r,response:s,headers:a,removeActionPayload:o}=e,i=$_(r,s);ef.setIn(s.data,G.getProperty(G.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const c=aC({...r,isInCreateStage:i}),l=wt(c,r.context),u=ul(l,c,r.context);if(!Rc(c)&&Yp(l)){const{continueExecution:e}=hl(l);if(!e)return uc.rejectActionByID(t),Cu()}const d=Rd(s);let p=tm(xt,{caseClassName:mc(d)});p=p.replace(/{.+?}/,String(Mc(Ic(d)))),d.semanticURL=p,k_(d,r);const h={acName:l,context:u};await sl(d,r,h);const g={target:l,context:u,headers:a,semanticURL:p,caseViewMode:V_(d),containerItemID:u,isInCreateStage:i,isMinimizable:i,assignmentContext:ef.getIn(d,uE),nextAssignmentInfo:ef.getIn(d,lE),resourceType:B.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:r.openCaseViewAfterCreate,modalOptions:r.modalOptions,debugInfo:r.debugInfo,isExternalObjectCreationFlow:!0};yc(g,d);const f=rl(d,g),m=ll(l,f);return dl(m)&&kc(n,{removeActionPayload:o,target:l}),n.push(m),El(n),n})),fu((()=>(Cl(n),Gc(n,t),n=[],n))))},lC=e=>{const{workId:t,context:n,isExternalCase:r}=e,s=r?Xe:"deleteWork",{restApi:a,reqType:o}=rm(s,{ID:t});return Ba(Ko(a,{method:o},n)).pipe(fu((t=>({response:t.data,actionInPayload:e,headers:tl(t.headers)}))),Su("Error occurred during ajax call at deleteWork Epic : ",n))},uC=e=>{No.publish(G.PUB_SUB_EVENTS.WORK_EVENTS.WORK_DELETED,e)},dC=e=>{let t,n=0,r=[];return e.pipe(hu(au),fu((e=>(({actionMgrID:n,caseTypeID:t}=e.payload),e.payload))),mu((e=>{if(!e.skipDeleteConfirmation&&!e.ignoreWorkDeletion){const r=Np.MODAL,s=wt(r,e.context),a=ee(e.context,J(r,e.context));return Ug([jf(Ef,{target:s,context:a,containerItemID:a,containerName:r,isDeleteConfirmation:!0,actionName:"Delete",workId:e.workId,caseTypeID:t,className:e.className,keys:e.keys,...e.enableBackNavigation&&{enableBackNavigation:!0},data:{caseInfo:{caseTypeID:t}}})]),uc.resolveActionByID(n),_u}return e.ignoreWorkDeletion?Au({actionInPayload:e}):lC(e)})),mu((async e=>{if(e&&vc(e.type)){const{payload:t}=e;return r.push(cl({...e,...t,actionMgrID:n})),r}const{actionInPayload:t}=e,{context:s}=t;if(fE({content:Hh().getLocaleValue("Deleted successfully!","Messages")}),s?.includes(G.PREVIEW)&&r.push(jf(yf,eh({context:G.APP.APP,name:G.PREVIEW}))),s?.includes(G.MODAL)){const e=Np.MODAL,t=wt(e,s),n=Rp(t,s);n?.enableBackNavigation&&window?.history?.back()}return r})),fu((()=>(Ug(r),Gc(r,n)===G.PROMISE_VALUE.RESOLVE&&uC({caseTypeID:t}),r=[],r))))},pC=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Yy.apply(void 0,e.map((function(e){var n=e.apply(void 0,t);if(!n)throw new TypeError('combineEpics: one of the provided Epics "'+(e.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return n})))};try{Object.defineProperty(n,"name",{value:"combineEpics("+e.map((function(e){return e.name||"<anonymous>"})).join(", ")+")"})}catch(e){}return n}(...sE,...i_,...p_,...v_,...__,...oE,...x_,...M_,...F_,...[W_,Z_,Y_,sC,cC,dC]),hC=()=>e=>t=>{const{type:n="",payload:r={}}=t||{},{category:s,context:a,transientItemID:o}=r;"HTTP"!==s&&[Oe,Ue,De,ke,be,Le].includes(n)&&(vl(a||o),io.removeContextTreeNode(a||o)),e(t)},gC={},fC=e=>{const t=ef.getIn(gC,[G.CONTEXT,e],[]),n=[];t.forEach((t=>{const r=t.substr(0,t.lastIndexOf("_")),s=ef.getIn(gC,[r,t],[]),a=s&&s.length>0&&s.indexOf(e);if(a>-1&&s.splice(a,1),!s||s&&0===s.length){ef.deleteIn(gC,[r,t]);const e=ef.getIn(gC,[r]);e&&0===Object.keys(e).length&&ef.deleteIn(gC,[r]),n.push({dataPageName:r,dataPageNameWithHash:t})}})),ef.deleteIn(gC,[G.CONTEXT,e]);const r=ef.getIn(gC,[G.CONTEXT]);(!r||r&&0===Object.keys(r).length)&&ef.deleteIn(gC,[G.CONTEXT]),n.length>0&&Ug($f({dataPagesToBeRemoved:n}))},mC=(e={},t)=>{Object.keys(e).forEach((n=>{const r=ef.getIn(e,[n],{});Object.keys(r).forEach((e=>{((e,t,n)=>{const r=ef.getIn(gC,[G.CONTEXT,n]);if(ef.getIn(gC,[e])){const r=ef.getIn(gC,[e,t],[]);ef.setIn(gC,[e,t],[...new Set([...r,n])])}else ef.setIn(gC,[e,t],[n]);r?ef.setIn(gC,[G.CONTEXT,n],[...new Set([...r,t])]):ef.setIn(gC,[G.CONTEXT,n],[t])})(n,e,t)}))}))},IC=()=>e=>t=>{(Array.isArray(t)?t:[t]).forEach((e=>{const{payload:{data:t={},context:n=null,childContainersContexts:r=[]}={},type:s}=e;if(((e,t)=>{t&&t.length>0&&(e===ke||e===De)&&t.forEach((e=>{fC(e)}))})(s,r),s===Oe||s===Ae||s===ct){const e=s===ct?t:t.shared;mC(e,n)}else s===ke?(fC(n),mC(t.shared,n)):s===De&&fC(n)})),e(t)},{PUB_SUB_EVENTS:yC}=B,EC=e=>t=>n=>{const{type:r,payload:{target:s,containerItemID:a,context:o,childContainersContexts:i=[],containerInfo:{newAccessedOrder:c,containerType:l}={newAccessedOrder:new Array,containerType:""},eventName:u}={}}=n;r===De&&((e,t,n,r,s,a)=>{const{resourceType:o,key:i,context:c}=ef.getIn(e.getState(),["containers",t,"items",n])||{},l={resourceType:o,key:i,context:c,containerItemID:n,...void 0!==r?{eventName:r}:{}};No.publish(yC.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,l),t===`${B.APP.APP}/${G.PRIMARY}`&&a===G.CONTAINER_TYPE.MULTIPLE&&No.publish(yC.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:i,newAccessedOrder:s})})(e,s,a,u,c,l),((e,t)=>{t&&t.length>0&&(e===ke||e===De)&&t.forEach((e=>{e&&rd.cleanCaches(e)}))})(r,i),r!==ke&&r!==De||!o||rd.cleanCaches(o),t(n)},AC=()=>e=>t=>{const{payload:{context:n=null,transientItemID:r=null,clearStateMachine:s=!0}={},type:a}=t;n&&(a===Oe||a===Ue||a===ke||a===De)&&s&&(Si(n),_i(n)),r&&a===we&&(Si(r),_i(r)),e(t)},_C=function(e){void 0===e&&(e={});var t,n=new(0,ay.constructor)(ay.schedulerActionCtor),r=new iy,s=function(s){t=s;var a=new iy,o=new iy,i=a.asObservable().pipe(ja(n)),c=new uy(o.pipe(ja(n)),t.getState());return r.pipe(fu((function(t){var n=t(i,c,e.dependencies);if(!n)throw new TypeError('Your root Epic "'+(t.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return n})),mu((function(e){return Ba(e).pipe(ka(n),ja(n))}))).subscribe(t.dispatch),function(e){return function(n){var r=e(n);return o.next(t.getState()),a.next(n),r}}};return s.run=function(e){r.next(e)},s}(),CC=e=>{if(null!==Fg())return void Xg();const t=[_p.propertyChangeMiddleware,hC,IC,AC,_C,EC],n=zI({reducer:zy(e),middleware:e=>e({serializableCheck:!1,thunk:!1}).concat(t),enhancers:e=>e().prepend(dy).concat(dy)});_C.run(pC),Lg(n)},SC={publishConstellationLoadedEvent:()=>{No.publish(G.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})}};const TC=new class{activateContainerItemOnSwitch(e){const t=`${G.APP.APP}/${G.PRIMARY}`,n={target:t,containerItemID:Mp(t,e)};$d({}).getPConnect().getContainerManager().activateContainerItem(n)}removeContainerItemOnClose(e){const t=`${G.APP.APP}/${G.PRIMARY}`,n={target:t,containerItemID:Mp(t,e)};$d({}).getPConnect().getContainerManager().removeContainerItem(n)}showCasePreview(e,t){const n=$d({meta:{type:"PreviewViewContainer",config:{name:G.PREVIEW}},options:{context:G.APP.APP,target:"root/hybrid_preview"}});n.getPConnect().getContainerManager().resetContainers({name:G.PRIMARY,context:G.APP.APP}),Up(G.APP.APP,G.PREVIEW)||n.getPConnect().getContainerManager().initializeContainers({type:"multiple",name:G.PREVIEW}),n.getPConnect().getActionsApi().showCasePreview(e,{caseClassName:t})}closeCasePreview(){$d({}).getPConnect().getContainerManager().resetContainers({name:G.PREVIEW,context:G.APP.APP})}isFormDirty(e){const t=`${G.APP.APP}/${G.PRIMARY}`,n=_h(t,e);return Ol.isStateModified(n)}getEventUtils(){return SC}getBroadcastUtils(){return cE}isTraditionalUICase(e){return Wc(e)}};const NC=class{static openCase(e,t=B.APP.APP,n={}){return n.renderInline=!0,n.pageName?Vh.setDefaultCasePage(n.pageName):(Vh.setDefaultCasePage(G.PY_DETAILS),n.pageName=G.PY_DETAILS),n?.disableAssignmentHeader?Vh.disableAssignmentHeader(n.disableAssignmentHeader):Vh.disableAssignmentHeader(!1),fd.openCase(e,t,G.PRIMARY,n)}static createCase(e,t=B.APP.APP,n={}){return n.renderInline=!0,n.pageName?Vh.setDefaultCasePage(n.pageName):(Vh.setDefaultCasePage(G.PY_DETAILS),n.pageName=G.PY_DETAILS),n?.disableAssignmentHeader?Vh.disableAssignmentHeader(n.disableAssignmentHeader):Vh.disableAssignmentHeader(!1),fd.createCase(e,t,G.PRIMARY,n)}static getNextWork(e=B.APP.APP,t={}){return t.renderInline=!0,t.pageName?Vh.setDefaultCasePage(t.pageName):(Vh.setDefaultCasePage(G.PY_DETAILS),t.pageName=G.PY_DETAILS),t?.disableAssignmentHeader?Vh.disableAssignmentHeader(t.disableAssignmentHeader):Vh.disableAssignmentHeader(!1),fd.getNextWork(e,G.PRIMARY,t)}static openAssignment(e,t=B.APP.APP,n={}){return n.renderInline=!0,n.pageName?Vh.setDefaultCasePage(n.pageName):(Vh.setDefaultCasePage(G.PY_DETAILS),n.pageName=G.PY_DETAILS),n?.disableAssignmentHeader?Vh.disableAssignmentHeader(n.disableAssignmentHeader):Vh.disableAssignmentHeader(!1),fd.openAssignment(e,t,G.PRIMARY,n)}static openPage(e,t,n=B.APP.APP,r={}){const s=ie;r?.defaultCasePage?Vh.setDefaultCasePage(r.defaultCasePage):Vh.setDefaultCasePage(G.PY_DETAILS),r?.disableAssignmentHeader?Vh.disableAssignmentHeader(r.disableAssignmentHeader):Vh.disableAssignmentHeader(!1);const a={viewName:e,className:t,acTargetName:G.PRIMARY,actionMgrID:uc.getNextActionMgrId(),context:n},{promise:o}=uc.actionManagerPromise(s,a.actionMgrID);return Ug({type:s,payload:{...a}}),o}static getCurrentContextAPI(e,t=B.APP.APP){return $d({meta:{config:{}},options:{context:t,pageReference:e,containerName:G.PRIMARY}}).getPConnect()}};const PC=new class{createC11nEnv=e=>$d(e);getContextUtils=()=>o;getRoutingManager=()=>i;getComponentsRegistry=()=>fn;getStateManager=()=>f;getActionCreators=()=>m;getStreamObservable=()=>u;getActionProcessor=()=>of;getActionHandler=()=>af;renderApp=(e,t)=>{const n={context:G.APP.APP},r={...ef.getIn(e,G.ROOT),options:n};CC(e),Hi(e,n,!0);const s=this.createC11nEnv({meta:r,isRoot:!0});No.publish(B.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:s,domContainerID:t})};updateStoreWithUiRoot=async(e,t,n)=>{const{data:r,uiResources:s={}}=e,{root:a}=s,o=ef.getIn(s,G.CONTEXT_DATA),i=Rd(e);await sl(i,{},{},!1,!0);const c={...r,[G.CONTEXT_DATA]:o};ah(a,t,c,n)};fetchEndPointResource=(e,t,n)=>{Ko(e,{method:"GET"},G.APP.ROOT).then((e=>{200===e.status&&this.updateStoreWithUiRoot(e.data,t,n)}))};loadComponent=async(e,t,n)=>{await ic(n);const r=this.createC11nEnv({meta:e,isRoot:!0});Fg()||CC({}),No.publish(B.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:r,domContainerID:t})};setStaticServerUrl=(e,t,n)=>{sc.initServer(e,t,n)};loadView=async(e,t,n=[])=>{C();const r=Rd(e),s=ef.getIn(r,G.VIEWS),a=ef.getIn(r,G.NAVIGATIONS),o=ef.getIn(r,G.COMPONENTS)||[];o.push(...n);const i=ef.getIn(r,G.STATIC_SERVER_URL),c=ef.getIn(r,G.APPLICATION_DATA);s&&dg(s),a&&pg(a),(e=>{e&&(Xf=e.pyLabel)})(c),i&&sc.initServer(i),await ic(o,i),this.renderApp(r,t)};initAppShell=(e,t,n)=>{mm(e),pc.buildActionTargetMap(t),C(n)};initRoutingTable=(e,t)=>{mm(e,!0),C(t)};setAppAlias=e=>{sc.setAppAlias(e)};getHomeRestApi=e=>{const t=T(),{restApi:n}=nm("home",{portalName:e});return`${t}${n}`};getViewRestApi=(e,t)=>{const{restApi:n}=((e,t)=>{let n={restApi:""};try{if(gm()&&!t){const t=vh(),r=jh.processUrl(t,!0),s=jh._getMatchedRouteInRoutingTable(r)||"",a=jh.getRoutingInfo(),o=jh.processUrl(t,!1).split("/"),i=o[o.length-1];let{caseID:c}=a&&a.routes[s].payload;c=c.replace("{workID}",i).replace("{id}",i),n=jh.getRestEndPoint("loadView",{caseID:c,viewID:e})||{}}else n=jh.getRestEndPoint("showView",{page:e,pageClass:t})||{}}catch(e){}return n})(e,t);return T()+n};loadRootComponent=async(e,t,n=[],r,s,a)=>{const{config:o}=t||{},i=o?.name;if(Fg()||CC({}),a){const e=`${G.APP.ROOT}/${i}`;fh(e),gh().deleteContainerItem(e)}(gh().getContainerItems()||[]).length>1&&!i?.startsWith("hybrid_")&&"authoring-preview"!==i&&Xg(),Ug(df({data:{},context:G.APP.ROOT}));const c=this.createC11nEnv({meta:t,options:{context:G.APP.ROOT,pageReference:"",target:`${G.APP.ROOT}/${i}`}}),l=c.getPConnect(),u=`${l.getContextName()}/${l.getContainerName()}`;kp(u)||"noPortal"===o?.renderingMode||l.getContainerManager().initializeContainers({type:"single"});const d=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference","URL",...n];await ic(d),No.publish(B.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:c,domContainerID:e,componentName:"RootContainer",portalTarget:r,styleSheetTarget:s})};loadViewByName=(e,t,n,r)=>{let s=this.getViewRestApi(e,n);s===T()&&(s=this.getHomeRestApi(t)),this.fetchEndPointResource(s,r)};loadPortalView=(e,t)=>{const n=this.getHomeRestApi(e);this.fetchEndPointResource(n,t,!0)};configureForBrowserBookmark=e=>{fm(e)};checkIfSemanticURL=()=>gm();onPCoreReady=e=>{No.subscribe(B.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};onPCoreCleanup=e=>{No.subscribe(B.PUB_SUB_EVENTS.EVENT_UNMOUNT_APP,e,"unmountAppCallback")};setFieldsDefaultConfigs=e=>{Mi.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{P(e)};setFetchDefaultHeaders=e=>{ei(e)};setFetchAuthInfo=e=>{ti(e)};getCaseApi=()=>fd;getMashupApi=()=>NC;enableAppRouting=e=>{Zf(e)};initStore=()=>CC({});getBootstrapConfig=async(e,t)=>{const n=`${t.token_type} ${t.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then((e=>e.json()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=$d({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:t,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}}};const OC=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 DC=class{constructor(e){this.routingInfo=e.routingInfo,this.actionModel=e.actionModel,this.additionalHeaders=e.additionalHeaders,this.tokens=e.tokens,this.semanticUrl=e.semanticUrl,this.queryParams=e.queryParams,this.noPortal=e.noPortal,this.timezone=e.timezone,this.noHistory=e.noHistory,this.viewName=e.viewName,this.theme=e.theme,this.fieldDefaults=e.fieldDefaults,this.restServerConfig=e.restServerConfig,this.dynamicLoadComponents=void 0===e.dynamicLoadComponents||e.dynamicLoadComponents,this.dynamicSemanticUrl=void 0===e.dynamicSemanticUrl||e.dynamicSemanticUrl,this.enableRouting=void 0===e.enableRouting||e.enableRouting,this.locale=e.locale,this.environmentInfo=e.environmentInfo,this.renderingMode=e.renderingMode||"FULL_PORTAL",this.remoteCaseMapping=e.remoteCaseMapping||{},this.envType=e.envType,this.serviceConfig=new OC(e.serviceConfig),this.behaviorOverrides=e.behaviorOverrides,this.initBroadcast=!!e.initBroadcast,this.cookieComplianceMethod=e.cookieComplianceMethod??"none",this.isExtraCallRequiredForDefaultHome=e.isExtraCallRequiredForDefaultHome??"false",this.storePercentageAsDecimal=e.storeC11nPercentageAsDecimal??!1}},RC="@P .viewConfig";let bC=0;const vC=new class{async init(e){const t=new DC(e),n={...t.environmentInfo,renderingMode:t.renderingMode};Zf(t.enableRouting),CC({}),Vh.setTheme(t.theme),Vh.setCookieComplianceMethod(t.cookieComplianceMethod),Vh.setIsExtraCallRequiredForDefaultHome(t.isExtraCallRequiredForDefaultHome),Mi.updateFieldDefaults(t.fieldDefaults),Mi.setFieldDefault("Percentage","storePercentageAsDecimal",t.storePercentageAsDecimal),ko.setDefaultHeaders(t.additionalHeaders),this.#I(t.routingInfo,t.actionModel,{server:t.restServerConfig,reAuthUrl:t.serviceConfig.reAuthUrl}),sc.setAppAlias(t.serviceConfig.appAliasWithoutServlet||t.serviceConfig.appAlias),P(t.serviceConfig.googleMapKey),sc.initServer(t.serviceConfig.staticContentServer,t.serviceConfig.appStaticContentServer,t.tokens.C11NB2S),Vh.setEnvironmentInfo(n),Vh.setLocale(t.locale||navigator.language||"en-US"),Hh().setTimezone(t.timezone),q.setRemoteCaseMapping(t.remoteCaseMapping),$u.setConnectionConfig({messagingService:t.serviceConfig.messagingService}),cc.init(),t.initBroadcast&&TC.getBroadcastUtils().init(),await Bh()}getBootstrapConfig=async(e,t)=>{const n=`${t.token_type} ${t.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then((e=>e.json()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=$d({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 PC.getComponentsRegistry().getComponent("ReactRoot")?.modules.forEach((t=>{e.push(t())})),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,t,n)=>{try{await function(e,t="true"){return new Promise(((n,r)=>{const s=document.createElement("script");s.setAttribute("type","text/javascript"),s.setAttribute("src",e),s.setAttribute("async",t),s.onload=n(),s.onerror=()=>r(new Error("Failed to load resource from Design System")),document.body.appendChild(s)}))}(`${e}component/project/${t}/designsystems/${n}/componentsmap.js?v=${Date.now()}`)}catch(e){console.log(e)}};buildSemanticUrl=(e,t,n,r,s)=>{const a=new URLSearchParams(t);let o=!1;"true"===n&&(o=!0);let i=null,c=null,l=null;if(e){e.startsWith("/")&&(e=e.substring(1));const t=e.split("/");i=t[0],t.length>1&&t[1]&&(c=t[1]),t.length>1&&"assignments"===t[2]&&t[3]&&(l=t[3])}else o=!1;let u=r;i&&(u=`${u}/${i}`),c&&(u=`${u}/${c}`),l&&(u=`${u}/assignments/${l}`),o&&(a.has("noPortal")||a.append("noPortal","true"),c&&s&&a.append("view",s));const d=a.toString();return u+=d?`?${d}`:"",u};initCoreConfig=async e=>{const{routingInfo:t,serviceConfig:n,semanticUrl:r,queryParams:s,noPortal:a,noHistory:o,viewName:i,theme:c,restServerConfig:l,dynamicLoadComponents:u=!0,dynamicSemanticUrl:d=!0,renderingMode:p="FULL_PORTAL",envType:h,extras:g}=e,{appAlias:f,contextPath:m}=n;let I=window.location.origin;const y={};if(void 0!==l&&(I=l),m&&(I=`${I}${m}`),f&&"LAUNCHPAD"!==h&&(I=`${I}/${f}`),e.restServerConfig=I,this.#y(),!0===d){const e=this.buildSemanticUrl(r,s,a,I,i);!o&&e&&window.history.pushState({},"home",e)}else if("HYBRID"!==p){let e=window.location.href;e.indexOf("?")>0&&(e=e.substring(0,e.indexOf("?")),window.history.pushState({},"home",e)),y.dynamicSemanticUrl=!1}else console.log(`renderingMode :${p}`);!0!==u&&(y.dynamicLoadComponents=!1);let E=null;if(f){const e=f.indexOf("/app/");E=e>=0?f.substring(e+1):f}if(Object.keys(y).length>0&&window.PCore.setBehaviorOverrides(y),e.appAlias=E,c){let t="object"==typeof c?c:null;if(null===t)try{t=JSON.parse(c)}catch{t={}}e.theme=t}const A={...t,domain:`${window.location.protocol}//${window.location.host}`,searchParams:window.location.search};e.routingInfo=A,e.initBroadcast="true"===Vh.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence,!e.noPortal||"true"!==e.noPortal&&!0!==e.noPortal||(e.renderingMode="EMBED"),g?.cspNonce&&(window.__webpack_nonce__=g.cspNonce),await this.init(e)};launchViewByName=(e,t,n,r,s,a,o,i)=>{bC+=1;const c=i||`mashup${bC}`,l={type:"RootContainer",config:{viewConfig:RC,renderingMode:"view",name:c}};PC.loadRootComponent(e,l,s,a,o).then((()=>PC.loadViewByName(t,n,r,c)))};launchView=(e,t,n=[],r,s,a,o)=>{bC+=1;const i="hybrid"===o?`hybrid_${bC}`:o;bC+=1;const c=i||`mashup${bC}`,l={type:"RootContainer",config:{viewConfig:RC,renderingMode:"portal",name:c}};o===G.HYBRID&&od.setRuntimeParam(G.HYRBID_ROOT_CONTAINERNAME,c),od.setRuntimeParams(r),PC.loadRootComponent(e,l,n,s,a).then((()=>PC.updateStoreWithUiRoot(t,c,!1)))};launchPortal=async(e,t,n=`portal${bC+=1}`,r=[])=>{const s={type:"RootContainer",config:{viewConfig:RC,renderingMode:"portal",skeleton:"LoadingComponent",name:n}},a=[...r,s.config.skeleton];Vh.isPortalLoaded=!0;try{return await PC.loadRootComponent(e,s,a),PC.loadPortalView(t,n)}catch(e){throw console.error(`Failed to launch portal ${t}:`,e),e}};launchMashup=(e,t=!0)=>{const n={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:"@ROUTING_INFO",name:"primary"}}]};if(t){const t=document.getElementsByTagName(e)[0]?.parentNode;if(t){const e=document.createElement("style");e.setAttribute("id","portal-less-styles"),e.innerHTML="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",t.appendChild(e)}}PC.loadRootComponent(e,n,[PCore.getConstants().LOAD_VIEW_STRING,"ViewContainer"]),window.parent!==window&&s(754)(`${window.PCore.getAssetLoader().getStaticServerUrl()}constellation-mashup-bridge.js`).then((e=>{e.mashup.init({resizing:"stretch"})}))};start=async(e,t)=>{const{appStaticContentServer:n}=e.serviceConfig,{ccV2LibId:r,environmentId:s,ccLibs:a,isAlternateDesignSystemEnabled:o,alternateDesignSystemName:i}=e;await this.initCoreConfig(e);const c=async()=>{await this.importReactRoot();const e=Vh.environmentInfoObject?.pyC11nDXCBDevURL;return e&&await sc.importCustomComponentMap(""),r&&!e&&await sc.importCustomComponentMap(r),Vh.environmentInfoObject?.pyInfinityStaticService&&a&&a.length>0&&await Promise.all(a.map((e=>sc.importCustomComponentMap(e)))),"true"===o&&"other"!==i&&await this.importDesignSystemComponentMap(n,s,i),t&&t(),!0};return new Promise(((e,t)=>{(async()=>{try{const t=PC.getComponentsRegistry();"ReactRoot"in t.getLazyMap()?e(!0):t.getComponent("ReactRoot")?e(await c()):No.subscribe("component-map-loaded",(async()=>{e(await c())}))}catch(e){t(e)}})()}))};registerForDebugInfo=e=>{PCore.getEnvironmentInfo().setPreviewMode(),e&&(PCore.getPubSubUtils().subscribe("fetchSuccess",(({debugInfo:t})=>{const n=t?.["X-Pega-App-Debug-ID"];e.postMessage({appDebugID:n})}),"fetchSuccess"),PCore.getPubSubUtils().subscribe("fetchFailure",(({debugInfo:t})=>{const n=t?.["X-Pega-App-Debug-ID"];e.postMessage({appDebugID:n})}),"fetchFailure"))};toggleTracerHeaders=e=>{e.addEventListener("message",(async e=>{const t=e?.data?.enableTracer;t?PCore.getDebugger().enableTracer():PCore.getDebugger().disableTracer()}))};loadEnvironmentInfo=async e=>{if(e.theme&&(!window.pms||"Android"!==window.pms.device.systemName))try{const t=JSON.parse(e.theme.definition);PCore.getEnvironmentInfo().setBrandingInfo(t.Branding),PCore.getEnvironmentInfo().setTheme(t.Theme)}catch{PCore.getEnvironmentInfo().setBrandingInfo({}),PCore.getEnvironmentInfo().setTheme({})}e.keyMapping&&PCore.getEnvironmentInfo().setKeyMapping(e.keyMapping),PCore.getEnvironmentInfo().setCookieComplianceMethod(e.cookieComplianceMethod??"none")};#I(e,t,n){mm(e),pc.buildActionTargetMap(t),C(n)}#y(){document.querySelectorAll('head link[rel~="icon"], head link[rel~="apple-touch-icon"]').forEach((e=>{e.setAttribute("href",e.href)}))}},xC={createViewRule:(e,t)=>{const{restApi:n,reqType:r}=rm("createViewRuleByID");return Ko(n,{method:r,body:e},t).then((e=>e.data))},getViewRule:(e,t)=>{const{restApi:n,reqType:r}=rm("getViewRuleByID",{ID:e});return Ko(n,{method:r},t).then((e=>e.data))},updateViewRule:(e,t,n)=>{const{restApi:r,reqType:s}=rm("updateViewRuleByID",{ID:e});return Ko(r,{method:s,body:t},n).then((e=>e.data))},deleteViewRule:(e,t)=>{const{restApi:n,reqType:r}=rm("deleteViewRuleByID",{ID:e});return Ko(n,{method:r},t).then((e=>e.data))},getCalculatedFields:(e,t,n)=>{const{restApi:r,reqType:s}=rm("getCalculatedFieldsInViewByID",{caseID:e,viewID:t});return Ko(r,{method:s,body:{calculations:{fields:n}}}).then((e=>e.data))}},wC={"Content-Type":"application/json"},MC={addCaseFollower:(e,t,n)=>{const r={caseID:e},s=JSON.stringify({users:t.map((e=>({ID:e})))});return Ki("addCaseFollower",{body:s,queryPayload:r,headers:wC},n)},deleteCaseFollower:(e,t,n)=>Ki("deleteCaseFollower",{queryPayload:{caseID:e,followerID:t}},n),getCaseFollowers:(e,t)=>Ki("getCaseFollowers",{queryPayload:{caseID:e}},t).then((e=>e.data.followers))},LC={addRelatedCases:(e,t,n)=>{const r={caseID:e},s=JSON.stringify({cases:t});return Ki("addRelatedCases",{body:s,queryPayload:r},n)},removeRelatedCase:(e,t,n)=>Ki("removeRelatedCase",{queryPayload:{caseID:e,relatedCaseID:t}},n),getRelatedCases:(e,t)=>Ki("getRelatedCases",{queryPayload:{caseID:e}},t).then((e=>e.data.relatedCases))},FC="operatorDetails",UC={getOperatorDetails:(e,t=!1)=>{const{reqType:n}=rm(FC,{});if("GET"===n){const t={encodedOperatorId:encodeURIComponent(`{"opname":"${e}"}`)};return Ki(FC,{queryPayload:t})}return t?Ki("operatorDetailsByBusinessID",{body:{dataViewParameters:{BusinessID:e}}}):Ki(FC,{body:{dataViewParameters:{ID:e}}})}},jC="postCustomFeedMessages",kC={"Content-Type":"application/json"};const VC=new class{constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,t,n,r,s,a,o)=>{const i=a.getLocalizationService();o||(this.mentions=[]);let c="";r&&Array.isArray(r)&&r?.length>0&&(r.forEach((e=>{e.on&&(c=`${c}${e.id},`)})),""===c&&(c="ClearFilters"));let l="";o&&(l=a.getValue("pulse.pageLastEntry"));const u={filterForContext:e,feedID:t,feedClass:n,filterBy:c,pageSize:10,olderThan:l};for(let e=0;e<s.length;e+=1)s[e].cancel();const d=Qi();return s.push(d),Ki("getFeedMessages",{queryPayload:u,cancelTokenSource:d},a.getContextName()).then((async t=>{if(200===t.status&&t.data){s.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 bd({uiResources:t.data.uiResources}),!r&&(r=[{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),r.push(t)}));const t=r.find((e=>"All"===e.id));t&&(t.on=n)}}}if(o&&a.getValue("pulse.messageIDs")){let r=a.getValue("pulse.messageIDs"),s=a.getValue("pulse.messages");r=[...r,...n],s={...s,...c},Object.values(s).forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions)}))})),a.updateState({pulse:{messages:s,messageIDs:r,nextPageFirstEntry:t?.data?.nextPageFirstEntry||"",pageLastEntry:t?.data?.pageLastEntry||"",hideAttachment:t?.data?.hideAttachment||!1,postTypes:u,pulseContext:e}})}else a.updateState({pulse:{messages:c,messageIDs:n,nextPageFirstEntry:t?.data?.nextPageFirstEntry||"",pageLastEntry:t?.data?.pageLastEntry||"",hideAttachment:t?.data?.hideAttachment||!1,postTypes:u,pulseContext:e}});const d=[...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:r,caseMentions:d}}return a.reportError(`getFeeds call failed ${t.status}`,t.data),""})).catch((e=>{Zi(e)||a.reportError(": Error occurred during ajax call at getFeeds API : ",e.response)}))};postMessage=(e,t,n,r=[],s=!1,a=[])=>{const o={message:t,context:e,parentMessageId:s?e:"",attachments:r,pyRecipients:a.length?a:void 0},i=0===a.length?{body:JSON.stringify(o),headers:kC}:{body:JSON.stringify(o),queryPayload:{type:"PegaSocial-Post-Private"},headers:kC};return Ki(a.length?jC:"postFeedMessages",i,n.getContextName()).then((t=>{if((201===t.status||200===t.status)&&t.data){const a=t?.data;if(s){a.parentMessageID=e;const{pxResults:t,caseMentions:o}=this.buildMessageObject(a,s,n,r.length>0);return n.updateState({pulse:{messages:{[e]:{pxResults:t}}}}),o}const{messages:o,messageIDs:i,caseMentions:c}=this.buildMessageObject(a,s,n,r.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)=>Ki(jC,{body:t,queryPayload:{type:e},headers:kC},n.getContextName()).then((async e=>{if(201===e.status&&e.data){const r=e.data.data,s={ID:r.ID,pzInsKey:r.ID,classID:r.classID,pyPostType:r.pyPostType,postedByUser:r.postedByUser,pyIsDeleteEnabled:r.pyIsDeleteEnabled,pyMessageViewReference:r.messageViewReference,pyFeed:{pyIconType:"user",pyCommentContext:r.pyCommentContext,pyPostedOn:r.postedTime,pyFeedTitle:r.postedByUser.name,pyIconReference:r.postedByUser.ID},...r.PostMessage};vd(r.messageViewReference,n,t.context)||await bd({uiResources:e.data.uiResources}),n.updateState({pulse:{messages:{[s.ID]:s,...n.getValue("pulse.messages")},messageIDs:[s.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:r,isReply:s=!1,recipients:a=[]})=>{const o=JSON.stringify({message:n,...a.length&&{pyRecipients:a}});return Ki("editFeedMessage",{queryPayload:{messageID:e},body:o,headers:kC},r.getContextName()).then((e=>{if(200===e?.status&&e?.data){const n=e?.data;if(s){n.parentMessageID=t;const{pxResults:e,caseMentions:a}=this.buildMessageObject(n,s,r,!1);return r.updateState({pulse:{messages:{[t]:{pxResults:e}}}}),a}const{messages:a,caseMentions:o}=this.buildMessageObject(n,s,r,!1);return r.updateState({pulse:{messages:a}}),o}return r.reportError(`editMessage call failed with status ${e.status}`,e),""})).catch((e=>{throw r.reportError(": Error occurred during ajax call at editMessage API : ",e.response),e.response}))};buildMessageObject=(e,t,n,r=!1)=>{const s={ID:e?.ID||"",classID:e?.classID||"PegaSocial-Message",tags:e?.tags||[],pyHasAttachment:r,pzInsKey:e?.ID||"",pyMessage:e?.message||"",mentions:e?.mentions||[],postedByUser:e?.postedByUser,pxCreateDateTime:e?.postedTime||"",pxUpdateDateTime:e?.updatedTime||"",parentMessageID:e?.parentMessageID||"",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===s?.parentMessageID))||{};const t=e?.findIndex((e=>e?.pzInsKey===s?.ID));if(-1!==t){const n=[...e];n[t]={...n[t],...s},e=n}else e=[...e,s];return{pxResults:e,messages:{},messageIDs:[],caseMentions:this.getCaseMentions(e)}}const o=n.getValue("pulse.messageIDs");if(o){const e=o.includes(s.ID)?{...a[s.ID],...s}:s,t={...a,[s.ID]:e};return{messages:t,messageIDs:o.includes(s.ID)?o:[s.ID,...o],caseMentions:this.getCaseMentions(Object.values(t))}}};getCaseMentions=e=>{const t=e?.filter((e=>e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0))?.map((e=>e.mentions))?.concat(this.mentions);return[...new Map(t.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.hasOwn(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[]};likeMessage=({pulseContext:e,likedBy:t,messageID:n,isReply:r,pConnectObj:s})=>{const a=t?"unlikeFeedMessages":"likeFeedMessages",o=JSON.stringify({ContextClass:e});Ki(a,{body:o,queryPayload:{pulseContext:e},headers:kC},s.getContextName()).then((a=>{if(200===a.status)if(r){const r=s.getValue(`pulse.messages.${n}`),a=r?.pxResults&&Array.isArray(r?.pxResults)&&r.pxResults?.length>0&&r.pxResults?.map((n=>{if((n={...n}).pzInsKey===e){let e=0,r=!1;const s=n.pyLikes?n?.pyLikes?.pxLikeCount:0;t?(e=s-1,r=!1):(e=s+1,r=!0),n.pyLikes={pxLikeCount:e,pxIsLiked:r}}return n}));s.updateState({pulse:{messages:{[n]:{pxResults:a}}}})}else{const r={...s.getValue(`pulse.messages.${n}`)},a=r.pyLikes?r.pyLikes.pxLikeCount:0;let o=0,i=!1;t?(o=a-1,i=!1):(o=a+1,i=!0),r.pyLikes={pxLikeCount:o,pxIsLiked:i},s.updateState({pulse:{messages:{[e]:r}}})}else s.reportError(`likeMessage call failed with status ${a.status}`,a)})).catch((e=>{s.reportError(": Error occurred during ajax call at likeMessage API : ",e.response.data)}))};deleteMessage=(e,t,n,r)=>{let s=e;t&&(s=n);Ki("deleteFeedMessage",{queryPayload:{messageID:s}},r.getContextName()).then((s=>{if(200===s.status)if(t){const t=r.getValue(`pulse.messages.${e}`),s=t?.pxResults&&Array.isArray(t?.pxResults)&&t.pxResults?.length>0&&t.pxResults?.filter((e=>e.pzInsKey!==n));r.updateState({pulse:{messages:{[e]:{pxResults:s}}}})}else{const t=r.getValue("pulse.messageIDs"),n=t&&Array.isArray(t)&&t?.length>0&&t?.filter((t=>t!==e)),s={...r.getValue("pulse.messages")};delete s[e],r.updateState({pulse:{messageIDs:n,messages:s}})}else r.reportError(`deleteMessage call failed with status ${s.status}`,s)})).catch((e=>{r.reportError(": Error occurred during ajax call at deleteMessage API : ",e.response)}))};getLikedUsers=(e,t)=>Ki("getFeedMessageLikes",{queryPayload:{messageID:e}},t.getContextName());getMentionSuggestions=(e,t)=>{const{pulseContext:n,searchFor:r,mentionsType:s,listSize:a=5}=e,o={pulseContext:n,searchFor:r,mentionsType:s,listSize:a};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const i=Qi();return this.mentionsTagsCancelTokenSource.push(i),Ki("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=>{Zi(e)||t.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",e.response.data)}))};getMentionTypes=e=>Ki("getMentionTypes",{},e.getContextName());getPostTypeView=(e,t)=>Ki("getViewRuleByMessageType",{queryPayload:{type:e}},t.getContextName());getTagSuggestions=(e,t)=>{const{searchFor:n,listSize:r=5}=e,s={searchFor:n,listSize:r};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const a=Qi();return this.mentionsTagsCancelTokenSource.push(a),Ki("getTagSuggestions",{queryPayload:s,cancelTokenSource:a},t.getContextName()).then((e=>{this.mentionsTagsCancelTokenSource=[];let n=[];return 200===e.status&&e?.data?n=e?.data?.tags&&Array.isArray(e?.data?.tags)&&e.data.tags.length>0&&e.data.tags?.map((e=>`#${e}`)):t.reportError(`Get tag suggestions call failed ${e.status}`,e.data),n})).catch((e=>{Zi(e)||t.reportError(": Error occurred during ajax call at getTagSuggestions API : ",e.response.data)}))}},$C={getTaggedCases:(e,t)=>Ki("loadView",{queryPayload:{caseID:e,viewID:"pyTaggedCases"}},t.getContextName()).then((e=>e?.data)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)})),getTags:(e,t)=>Ki("getCaseTags",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.tagsList)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTags API : ",e.response)})),postTags:(e,t,n)=>{const r={caseID:e},s=JSON.stringify({tags:t});return Ki("addTagsToCase",{body:s,queryPayload:r},n.getContextName()).then((e=>e?.data?.results)).catch((e=>{n.reportError(": Error occurred during ajax call at postTags API : ",e.response)}))},removeTag:(e,t,n)=>Ki("deleteCaseTag",{queryPayload:{caseID:e,tagID:t}},n.getContextName()).catch((e=>{n.reportError(": Error occurred during ajax call at removeTag API : ",e.response)})),getTagsLandingPageURL:e=>Gu.getPageDataAsync("D_pxGetTagsLandingPageURL",e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",t.response)}))},BC=(e,t)=>{mh(t.getContextName(),e.etag),Ih(t.getContextName(),e.etag)},GC={getParticipants:(e,t)=>Ki("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)=>Ki("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)=>Ki("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)=>Ki("getParticipant",{queryPayload:{caseID:e,participantID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error occurred during ajax call at getParticipant API : ",e.response)})),createParticipant:async(e,t,n,r,s)=>{const a={caseID:e},o={...n,participantRoleID:t},i={"if-match":r.getCaseSummary().headers.etag};return new Promise(((e,t)=>{Ki("createParticipant",{body:o,queryPayload:a,headers:i},r.getContextName()).then((t=>{BC(t.headers,r),e()})).catch((e=>{e.response.data.errorDetails?.forEach((e=>{e.erroneousInputOutputFieldInPage=e.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")}));const n=kl(s||r.getContextName());r.reportError(": Error occurred during ajax call at createParticipant API : ",{...e.response.data,formFields:n},s),t(e.response)}))}))},updateParticipant:async(e,t,n,r,s)=>{const a={caseID:e,participantID:t},o={"if-match":r.getCaseSummary().headers.etag};return new Promise(((e,t)=>{Ki("updateParticipant",{body:n,queryPayload:a,headers:o},r.getContextName()).then((t=>{BC(t.headers,r),e()})).catch((e=>{e.response.data.errorDetails?.forEach((e=>{e.erroneousInputOutputFieldInPage=e.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")}));const n=kl(s||r.getContextName());r.reportError(": Error occurred during ajax call at updateParticipant API : ",{...e.response.data,formFields:n},s),t(e.response)}))}))},deleteParticipant:(e,t,n)=>{const r={caseID:e,participantID:t},s={"if-match":n.getCaseSummary().headers.etag};return new Promise(((e,t)=>{Ki("deleteParticipant",{queryPayload:r,headers:s},n.getContextName()).then((t=>{BC(t.headers,n),e()})).catch((e=>{n.reportError(": Error occurred during ajax call at deleteParticipant API : ",e.response),t(e.response)}))}))}};function WC(e=[]){return e.reduce(((e,t)=>(e[t.personalizationID]={name:t.name,personalizationState:JSON.parse(t.personalizationState||"{}")},e)),{})}const HC="create",qC="update",zC="delete";function YC(e,t,n,r){const s=yg(t);if(s){switch(e){case HC:case qC:{const{markAsDefault:e,...t}=r;Object.entries(t).length>0&&(s.allPersonalizations[n]=t),e&&(s.defaultPersonalization=n);break}case zC:delete s.allPersonalizations[n],s.defaultPersonalization===n&&(s.defaultPersonalization="");break;default:return null}return s}return null}const KC={},JC=async e=>{const t=yg(e);if(t)return Array.isArray(t.allPersonalizations)&&(t.allPersonalizations=WC(t.allPersonalizations)),Promise.resolve(t);const{restApi:n,reqType:r}=rm("getUIListPersonalizations",{listID:e});return Ko(n,{method:r,body:{}}).then((e=>{const{data:t}=e;return{allPersonalizations:WC(t.allPersonalizations),defaultPersonalization:t.defaultPersonalization}}))},XC=async(e,t,n)=>{const{restApi:r,reqType:s}=rm("createListPersonalization",{listID:e});return YC(HC,e,t,n),Ko(r,{method:s,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}}).then((e=>{const n=e.data;return KC[t]=n,e}))},QC=async(e,t,n)=>{const r=KC[t]||t;YC(qC,e,t,n);const{restApi:s,reqType:a}=rm("updateListPersonalization",{listID:e,personalizationID:r})||{};return Ko(s,{method:a,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}})},ZC=async(e,t)=>{const n=KC[t]||t;YC(zC,e,t);const{restApi:r,reqType:s}=rm("deleteListPersonalization",{listID:e,personalizationID:n});return Ko(r,{method:s,body:{}}).then((e=>(KC[t]&&delete KC[t],e)))};const eS=function(e){return e?{createPersonalization:XC.bind(null,e),updatePersonalization:QC.bind(null,e),deletePersonalization:ZC.bind(null,e),fetchPersonalizations:JC.bind(null,e)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}},tS="getDataObjects",nS="getInsightByID",rS=["LocalList","RemoteList","PromptList","DataPage"];let sS=null;const aS={},oS=e=>xu.getAppCacheKey(`PrimaryFields-${e}`);function iS(e){let t;return e[1].category?t=e[1].category:e[0].indexOf(":")>0&&(t=e[0].substring(0,e[0].indexOf(":"))),t}const cS={getDataObjects:function(){const e=xu.getAppCacheKey(tS);if(window.sessionStorage.getItem(e))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(e)}`));const{restApi:t,reqType:n}=rm(tS,{}),r=Ko(t,{method:n});return r.then((t=>{window.sessionStorage.setItem(e,JSON.stringify(t))})),r},getDataPageObjects:function(e=!0){if(sS)return sS;const t=xu.getAppCacheKey("getDataPageObjects");if(e&&window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(t)}`));const{restApi:n,reqType:r}=rm("getDataPages",{datapageRequestType:"explorable"});return sS=Ko(n,{method:r,datapageRequestType:"explorable"}),sS.then((e=>{sS=null,window.sessionStorage.setItem(t,JSON.stringify(e))})),sS},getDataViewMetadata:function(e,t,n){if(!t){const{sourceMetadata:t,sourceFields:n}=function(e){const t=Ig(e);if(t&&t.classID){let e=Ag(t.classID);const n=t.rdFields?.fields?.filter((e=>e.indexOf(".")>0));if(n&&!ef.isEmpty(n)){const r=n.reduce(((e,n)=>{const r=ug(n,t.classID);return e[n]=r,e}),{});e={...e,...r}}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&&rS.includes(e[t].datasource.tableType)&&(e[t].fieldType="Picklist");return{sourceFields:e,sourceMetadata:t}}}return{}}(e);if(t&&n&&Object.keys(n).length>0){const e={data:{...t,fields:Object.entries(n).map((e=>({...e[1],fieldID:e[0],fieldType:e[1].fieldType||(e[1].isUserReference?"User reference":void 0),category:iS(e),classID:e[1].associationClassID?e[1].associationClassID:e[1].classID})))}};return Promise.resolve(e)}}const r={dataSource:e,columns:[],parameters:{},associationFilter:n,matchPosition:"",ignoreCase:!1};return ed.init(r).then((({dataSourceMetaData:e})=>Promise.resolve({data:e})))},getDefaultColumns:function(e){const t=xu.getAppCacheKey(`DefaultColumns_${Object.values(e).join("_")}`);if(window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(t)}`));const{restApi:n,reqType:r}=rm("getListData",{dataViewName:"D_pzGetDefaultColumns"}),s=Ko(n,{method:r,body:{dataViewParameters:e}});return s.then((e=>{window.sessionStorage.setItem(t,JSON.stringify(e))})),s},getFieldsForDataSource:function(e,t,n){if(!t){const t=Ig(e),n=Array.isArray(t?.rdFields)?t?.rdFields:t?.rdFields?.fields;return n?Promise.resolve({data:{data:n.map((e=>({pyFieldName:e})))}}):Promise.resolve({data:{data:[]}})}const r=xu.getAppCacheKey(`RDColumns-${e}`);if(window.sessionStorage.getItem(r))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(r)}`));const s=xu.getData("D_pxFieldsForDataSource",{dataViewParameters:{DataPageName:e}},n);return s.then((e=>{window.sessionStorage.setItem(r,JSON.stringify(e))})),s},getPrimaryFieldsForDataSource:function(e="",t=""){const n=xu.getAppCacheKey(`PFColumns-${e}${t}`);if(window.sessionStorage.getItem(n))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(n)}`));const r=xu.getData("D_pxGetInitialFieldsForDataSource",{dataViewParameters:{DataPageName:e,ClassName:t}});return r.then((e=>{window.sessionStorage.setItem(n,JSON.stringify(e))})),r},getPrimaryFieldsForInsights:async function(e,t,n){const{allClasses:r,promisesToAwait:s,classesToFetch:a,isTopLevelClassPresent:o,joinedClassesToFetch:i}=function(e,t){const n=[],r=[];let s=!1;const a=[],o=[];return e&&o.push(e),t&&t.length>0&&o.push(...t),o.forEach((t=>{const o=oS(t);window.sessionStorage.getItem(o)||(aS[t]?r.push(aS[t]):(n.push(t),t===e?s=!0:a.push(t)))})),{allClasses:o,promisesToAwait:r,classesToFetch:n,isTopLevelClassPresent:s,joinedClassesToFetch:a}}(e,n);return a.length&&s.push((async(e,t,n,r)=>{const s=xu.getData("D_pxGetPrimaryFieldsForInsights",{dataViewParameters:{...t&&{topLevelClassID:t},...r&&{joinedClassIDs:r.join(",")},...n&&{topLevelDataPageID:n}}}).then((t=>{const n=t.data?.data||[],r={};e.forEach((e=>{r[e]=[]})),n.forEach((({classID:e,pyFieldName:t})=>{r[e].push(t)})),Object.entries(r).forEach((([e,t])=>{const n=oS(e);window.sessionStorage.setItem(n,JSON.stringify(t))}))})).finally((()=>{e.forEach((e=>{delete aS[e]}))}));return e.forEach((e=>{aS[e]=s})),s})(a,o?e:void 0,o?t:void 0,i.length>0?i:void 0)),Promise.allSettled(s).then((()=>{const e={};return r.forEach((t=>{const n=oS(t);if(window.sessionStorage.getItem(n))try{e[t]=JSON.parse(`${window.sessionStorage.getItem(n)}`)}catch{}})),{data:e}}))},getInsightIDs:function(){const{restApi:e,reqType:t}=rm("getInsightIDs");return Ko(e,{method:t})},getInsightByID:function(e){const t=Eg(e);if(t)return Promise.resolve({data:{pyInsights:[t]}});const n={insightID:e},{restApi:r,reqType:s}=rm(nS,n);return Ko(r,{method:s})},getInsightsByID:function(e){const t={insightID:e.join(",")},{restApi:n,reqType:r}=rm(nS,t);return Ko(n,{method:r})},createInsight:function(e){const{restApi:t,reqType:n}=rm("createInsight");return Ko(t,{method:n,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})},updateInsight:function(e,t){const n={insightID:e},{restApi:r,reqType:s}=rm("updateInsight",n);let a;return"UpdateDateTime"in t&&(a=t.UpdateDateTime),Ko(r,{method:s,body:JSON.stringify(t),headers:{"if-match":a,"Content-Type":"application/json"}})},deleteInsight:function(e){const t={insightID:e},{restApi:n,reqType:r}=rm("deleteInsight",t);return Ko(n,{method:r})},exportToExcel:function(e){const{restApi:t,reqType:n}=rm("exportToExcel");return Ko(t,{method:n,body:JSON.stringify(e)})},exportToCSV:function(e){const{restApi:t,reqType:n}=rm("exportToCSV");return Ko(t,{method:n,body:JSON.stringify(e)})},scheduleInsight:(e,t)=>{const n={insightID:e},{restApi:r,reqType:s}=rm("scheduleInsight",n);return Ko(r,{method:s,body:JSON.stringify(t)})},updateScheduledInsight:(e,t,n)=>{const r={insightID:e,scheduleID:t},{restApi:s,reqType:a}=rm("updateScheduledInsight",r);return Ko(s,{method:a,body:JSON.stringify(n)})},deleteScheduledInsight:(e,t)=>{const n={insightID:e,scheduleID:t},{restApi:r,reqType:s}=rm("deleteScheduledInsight",n);return Ko(r,{method:s})},translateStrings:function(e){const{restApi:t,reqType:n}=rm("translateStrings");return Ko(t,{method:n,body:JSON.stringify(e)})}};const lS=new class{addRoutes=e=>{return t=e,void jh.addRoutes(t);var t}};const uS=class{static registerModule(e,t,n){n[e]=()=>t}};const dS=class{static getCaseEvent=()=>Object.freeze(B.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(B.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(B.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(B.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS);static getBulkProcessEvent=()=>Object.freeze(B.PUB_SUB_EVENTS.EVENT_BULKACTION);static getLocalActionProcessEvent=()=>Object.freeze(B.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION)};const pS=new class{constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},hS={setTokens:e=>{ti({tokenInfo:e}),ei(e?.csrf&&!e?.access_token?{pzCTkn:e?.csrf}:{Authorization:`${e?.token_type} ${e?.access_token}`}),setTimeout((()=>No.publish("updateSession",{updateStatus:"success"})),0)},revokeTokens:async()=>Ro(),getAuthInstance:e=>Do.init(e),setAuthorizationHeader:e=>{ei({Authorization:e}),setTimeout((()=>No.publish("updateSession",{updateStatus:"success"})),0)}};const gS=new class{getDebouncedSubject(e){return(new iy).pipe(C_(e))}};Gi.register("email",(e=>{let t=null;return e&&!function(e){const t="[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+",n="\\x5c[\\x00-\\x7f]",r=`(${t}|\\x5b([^\\x0d\\x5b-\\x5d\\x80-\\xff]|${n})*\\x5d)`,s=`(${t}|\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|${n})*\\x22)`;return new RegExp(`^${s}(\\x2e${s})*\\x40${r}(\\x2e${r})*$`).test(e)}(e)&&(t="Enter a valid email address"),t})),Gi.register("integer",(e=>{let t=null;return e&&!/^(-)?\d+$/.test(e)&&(t="Invalid number"),t})),Gi.register("required",(e=>Array.isArray(e)&&0===e.length||null==e||""===e?"Cannot be blank":null)),Gi.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";s.e(667).then(s.bind(s,816)).then((({parsePhoneNumberFromString:t})=>{Gi.register("phone",(n=>{let r=null;n&&!/^\+?\d+$/.test(n)&&(r=e);const s=n?.startsWith("+");if(n&&s){const s=t(n);s&&s.isPossible()&&n===s.number||(r=e)}return r}))}))}),G.PRIORITY.TRIVIAL);const fS=(e,t)=>{switch(t){case"invalid":return`Incorrect ${e}`;case"incomplete":return`Incomplete ${e}`;default:return null}};Gi.register("datetime",(e=>fS("DateTime",e))),Gi.register("date",(e=>fS("Date",e))),Gi.register("time",(e=>fS("Time",e)));const mS=e=>{for(const t of e)if(t?.error)return"Error with one or more files";return null};Gi.register("attachment",(e=>{let t=null;return e?("pyCount"in e&&Array.isArray(e.pxResults)?t=mS(e.pxResults):Array.isArray(e)?t=mS(e):"error"in e&&e.error&&(t="Error with one or more files"),t):t}));const IS="createConversation",yS="sendMessage",ES="getConversations",AS="getMessages",_S=(e,t,n,r,s,a,o)=>{for(const e of o)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const i=Qi();return o.push(i),Ki(e,{queryPayload:ES===e?{assistantID:t,contextID:n,pageSize:r,pageIndex:s}:{agentID:t,contextID:n,pageSize:r,pageIndex:s},cancelTokenSource:i},a).then((e=>(o.pop(),e)))},CS=(e,t,n,r,s)=>{for(const e of s)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const a=Qi();return s.push(a),Ki(e,{queryPayload:AS===e?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n}},r).then((e=>(s.pop(),e)))},SS=(e,t,n,r,s)=>{for(const e of s)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const a=Qi();return s.push(a),Ki(e,{body:JSON.stringify({contextID:t,executeStarterQuestion:!1}),cancelTokenSource:a,queryPayload:e===IS?{assistantID:n}:{agentID:n}},r).then((e=>(s.pop(),e)))},TS=(e,t,n,r,s,a,o)=>{const i={...r&&{request:r},...a&&a?.length>0&&{attachments:a},...o&&{capabilities:{stream:{isEnabled:!0}}}};return Ki(e,{body:JSON.stringify(i),queryPayload:e===yS?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n},...o&&{headers:{Accept:"text/event-stream"},adapter:"fetch",responseType:"stream"}},s)},NS={createConversation:(e,t,n,r=[])=>SS(IS,e,t,n,r),sendMessage:(e,t,n,r,s)=>TS(yS,e,t,n,r,void 0,s?.enableStreaming),createConversationForAgent:(e,t,n,r=[])=>SS("createConversationForAgent",e,t,n,r),sendMessageForAgent:(e,t,n,r,s,a)=>TS("sendMessageForAgent",e,t,n,r,s,a?.enableStreaming),likeAgentMessage:(e,t,n,r)=>Ki("likeAgentMessage",{queryPayload:{agentID:e,conversationID:t,messageID:n}},r),unLikeAgentMessage:(e,t,n,r,s="")=>{const a={queryPayload:{agentID:e,conversationID:t,messageID:n},body:JSON.stringify({feedbackText:s})};return Ki("dislikeAgentMessage",a,r)},getConversations:(e,t,n,r,s,a=[])=>_S(ES,e,t,n,r,s,a),getConversationsForAgent:(e,t,n,r,s,a=[])=>_S("getConversationsForAgent",e,t,n,r,s,a),getMessages:(e,t,n,r=[])=>CS(AS,e,t,n,r),getMessagesForAgent:(e,t,n,r=[])=>CS("getMessagesForAgent",e,t,n,r)};const PS=class{caseTypeAccessMap=new Map;constructor(){this.caseTypeAccessMap=Vh.getCaseTypeList().reduce(((e,t)=>(e.set(t.pyWorkTypeImplementationClassName,t.hasCreateAccess??!0),e)),new Map)}hasCreateAccess(e){return this.caseTypeAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}};class OS{static behaviorOverrides={};getPersonalizationUtils=eS;constructor(){OS.behaviorOverrides={}}getPCoreVersion=()=>"25.1.3";onPCoreReady=e=>PC.onPCoreReady(e);onPCoreCleanup=e=>PC.onPCoreCleanup(e);getComponentsRegistry=()=>PC.getComponentsRegistry();checkIfSemanticURL=()=>PC.checkIfSemanticURL();isValidSemanticURL=()=>(()=>{if(gm()){const e=jh.processUrl(vh(),!0);return!!jh._getMatchedRouteInRoutingTable(e)}return!1})();getRoutingUtils=()=>lS;getViewResources=()=>p;configureForBrowserBookmark=e=>PC.configureForBrowserBookmark(e);getStore=()=>Fg();resetStore=()=>Xg();getMessageManager=()=>Co;getCoexistenceManager=()=>TC;getStoreValue=(e,t,n)=>$g(e,t,n);getContainerUtils=()=>h;getAnnotationUtils=()=>cu;getFieldUtils=()=>ai;getFieldDefaultUtils=()=>Mi;getAssetLoader=()=>sc;getAttachmentUtils=()=>$i;getViewRuleApi=()=>xC;getFeedUtils=()=>VC;getTagUtils=()=>$C;getGenAIAssistantUtils=()=>NS;getStakeholderUtils=()=>GC;getUserApi=()=>UC;getCaseFollowerApi=()=>MC;getCaseUtils=()=>Bl;getStateUtils=()=>Xc;getRelatedCasesApi=()=>LC;getDataApi=()=>ed;getDataApiUtils=()=>xu;getAnalyticsUtils=()=>cS;getLocaleUtils=e=>{const t=e??Vh.getLocale()??"en-US";return cg(t)};registerLocaleManager=e=>{const t=this.getLocaleUtils();Object.keys(e).forEach((n=>{t[n]=e[n]}))};setBehaviorOverrides=e=>{OS.behaviorOverrides=e};setBehaviorOverride=(e,t)=>{OS.behaviorOverrides[e]=t};getBehaviorOverrides=()=>OS.behaviorOverrides;getBehaviorOverride=e=>OS.behaviorOverrides[e];getAsynchronousUtils=()=>gS;createPConnect=e=>$d(e);getPubSubUtils=()=>No;registerComponentCreator=e=>{Bd(e)};getConstants=()=>Object.freeze(B);getResolvedConstantValue=e=>G.getProperty(e);getEvents=()=>dS;getRestClient=()=>d;getMashupApi=()=>NC;getEnvironmentInfo=()=>Vh;getRuntimeParamsAPI=()=>od;getSemanticUrlUtils=()=>gc;getRemoteCaseUtils=()=>q;getNavigationUtils=()=>cc;registerModule=(e,t)=>uS.registerModule(e,t,this);getErrorHandler=()=>pS;getFormUtils=()=>Ol;getMessagingServiceManager=()=>$u;getMetadataUtils=()=>g;getDataPageUtils=()=>Gu;getDataTypeUtils=()=>iu;getCascadeManager=()=>xg;isDeepEqual=(e,t)=>y()(e,t);getAuthUtils=()=>hS;getDebugger=()=>Po;getDeferLoadManager=()=>bu;getExpressionEngine=()=>c;getActionsSequencer=()=>id;getRefreshManager=()=>nd;getInitialiser=()=>vC;getBootstrapUtils=()=>PC;getContextTreeManager=()=>io;getAccessPrivilege=()=>PS.getInstance();getObjectTransformer=()=>$;getAllStateMachines=(e,t,n)=>t&&n?Dl.getAllStateMachines(e,t,n):Dl.getAllStateMachinesByContext(e);isNamespaceEnabled=()=>!1;getQualifiedName=(e,t)=>e;getDefaultQualifiedName=e=>this.getQualifiedName(e,"PegaPlatform")}const DS=new OS;globalThis.PCore=DS;const RS=DS;var bS=a.A;export{bS as default};
2
+ //# sourceMappingURL=constellation-core.237eec7c.js.map