@pega/constellationjs 23.1.2 → 23.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.
@@ -0,0 +1,2 @@
1
+ /*! For license information please see constellation-core.c1cc37f6.js.LICENSE.txt */
2
+ var e={933:(e,t,n)=>{var r=n(515);Object.defineProperty(t,"reduxBatch",{enumerable:!0,get:function(){return r.reduxBatch}})},515:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reduxBatch=function(e){var t=[],n=void 0;function r(){t===n&&(t=t.slice())}function a(e){if("function"!=typeof e)throw new Error("Invalid listener, expected a function");var n=!0;return r(),t.push(e),function(){n&&(r(),t.splice(t.indexOf(e),1),n=!1)}}function s(){for(var e=t,r=0;r<e.length;++r)n=e,e[r]()}return function(){var t=e.apply(void 0,arguments),n=!1,r=!1;function o(e){return Array.isArray(e)?e.map((function(e){return o(e)})):t.dispatch(e)}return t.subscribe((function(){r?n=!0:s()})),Object.assign({},t,{dispatch:function(e){var t=r;t||(n=!1,r=!0);var a=o(e),i=n&&!t;return t||(n=!1,r=!1),i&&s(),a},subscribe:a})}}},923:(e,t,n)=>{e.exports=n(933)},303:e=>{e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,a,s;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(a=r;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(s=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(a=r;0!=a--;)if(!Object.prototype.hasOwnProperty.call(n,s[a]))return!1;for(a=r;0!=a--;){var o=s[a];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}},924:(e,t,n)=>{var r="__lodash_hash_undefined__",a=/^\[object .+?Constructor\]$/,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,o="object"==typeof self&&self&&self.Object===Object&&self,i=s||o||Function("return this")();function c(e,t){return!(!e||!e.length)&&function(e,t,n){if(t!=t)return function(e,t,n,r){for(var a=e.length,s=-1;++s<a;)if(t(e[s],s,e))return s;return-1}(e,l);for(var r=-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}(e,t)>-1}function d(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}function l(e){return e!=e}function u(e,t){return e.has(t)}var p,h=Array.prototype,f=Function.prototype,g=Object.prototype,y=i["__core-js_shared__"],m=(p=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",I=f.toString,E=g.hasOwnProperty,A=g.toString,_=RegExp("^"+I.call(E).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=i.Symbol,$=g.propertyIsEnumerable,C=h.splice,b=S?S.isConcatSpreadable:void 0,P=Math.max,v=L(i,"Map"),O=L(Object,"create");function T(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 R(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 N(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 D(e){var t=-1,n=e?e.length:0;for(this.__data__=new N;++t<n;)this.add(e[t])}function x(e,t){for(var n=e.length;n--;)if(V(e[n][0],t))return n;return-1}function w(e,t,n,r,a){var s=-1,o=e.length;for(n||(n=j),a||(a=[]);++s<o;){var i=e[s];t>0&&n(i)?t>1?w(i,t-1,n,r,a):d(a,i):r||(a[a.length]=i)}return a}function M(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function L(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!W(e)||m&&m in e)return!1;var t=H(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?_:a;return t.test(function(e){if(null!=e){try{return I.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function j(e){return G(e)||function(e){return B(e)&&E.call(e,"callee")&&(!$.call(e,"callee")||"[object Arguments]"==A.call(e))}(e)||!!(b&&e&&e[b])}T.prototype.clear=function(){this.__data__=O?O(null):{}},T.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},T.prototype.get=function(e){var t=this.__data__;if(O){var n=t[e];return n===r?void 0:n}return E.call(t,e)?t[e]:void 0},T.prototype.has=function(e){var t=this.__data__;return O?void 0!==t[e]:E.call(t,e)},T.prototype.set=function(e,t){return this.__data__[e]=O&&void 0===t?r:t,this},R.prototype.clear=function(){this.__data__=[]},R.prototype.delete=function(e){var t=this.__data__,n=x(t,e);return!(n<0||(n==t.length-1?t.pop():C.call(t,n,1),0))},R.prototype.get=function(e){var t=this.__data__,n=x(t,e);return n<0?void 0:t[n][1]},R.prototype.has=function(e){return x(this.__data__,e)>-1},R.prototype.set=function(e,t){var n=this.__data__,r=x(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},N.prototype.clear=function(){this.__data__={hash:new T,map:new(v||R),string:new T}},N.prototype.delete=function(e){return M(this,e).delete(e)},N.prototype.get=function(e){return M(this,e).get(e)},N.prototype.has=function(e){return M(this,e).has(e)},N.prototype.set=function(e,t){return M(this,e).set(e,t),this},D.prototype.add=D.prototype.push=function(e){return this.__data__.set(e,r),this},D.prototype.has=function(e){return this.__data__.has(e)};var U,k,F=(U=function(e,t){return B(e)?function(e,t,n,r){var a=-1,s=c,o=!0,i=e.length,d=[],l=t.length;if(!i)return d;t.length>=200&&(s=u,o=!1,t=new D(t));e:for(;++a<i;){var p=e[a],h=p;if(p=0!==p?p:0,o&&h==h){for(var f=l;f--;)if(t[f]===h)continue e;d.push(p)}else s(t,h,r)||d.push(p)}return d}(e,w(t,1,B,!0)):[]},k=P(void 0===k?U.length-1:k,0),function(){for(var e=arguments,t=-1,n=P(e.length-k,0),r=Array(n);++t<n;)r[t]=e[k+t];t=-1;for(var a=Array(k+1);++t<k;)a[t]=e[t];return a[k]=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)}(U,this,a)});function V(e,t){return e===t||e!=e&&t!=t}var G=Array.isArray;function B(e){return function(e){return!!e&&"object"==typeof e}(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!H(e)}(e)}function H(e){var t=W(e)?A.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function W(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=F},174:(e,t,n)=>{var r,a="__lodash_hash_undefined__",s=1/0,o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/,c=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,f=p||h||Function("return this")(),g=Array.prototype,y=Function.prototype,m=Object.prototype,I=f["__core-js_shared__"],E=(r=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",A=y.toString,_=m.hasOwnProperty,S=m.toString,$=RegExp("^"+A.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),C=f.Symbol,b=g.splice,P=M(f,"Map"),v=M(Object,"create"),O=C?C.prototype:void 0,T=O?O.toString:void 0;function R(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 N(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 D(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 x(e,t){for(var n=e.length;n--;)if(k(e[n][0],t))return n;return-1}function w(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function M(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!V(e)||E&&E in e)return!1;var t=function(e){var t=V(e)?S.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?$:u;return t.test(function(e){if(null!=e){try{return A.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}R.prototype.clear=function(){this.__data__=v?v(null):{}},R.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},R.prototype.get=function(e){var t=this.__data__;if(v){var n=t[e];return n===a?void 0:n}return _.call(t,e)?t[e]:void 0},R.prototype.has=function(e){var t=this.__data__;return v?void 0!==t[e]:_.call(t,e)},R.prototype.set=function(e,t){return this.__data__[e]=v&&void 0===t?a:t,this},N.prototype.clear=function(){this.__data__=[]},N.prototype.delete=function(e){var t=this.__data__,n=x(t,e);return!(n<0||(n==t.length-1?t.pop():b.call(t,n,1),0))},N.prototype.get=function(e){var t=this.__data__,n=x(t,e);return n<0?void 0:t[n][1]},N.prototype.has=function(e){return x(this.__data__,e)>-1},N.prototype.set=function(e,t){var n=this.__data__,r=x(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},D.prototype.clear=function(){this.__data__={hash:new R,map:new(P||N),string:new R}},D.prototype.delete=function(e){return w(this,e).delete(e)},D.prototype.get=function(e){return w(this,e).get(e)},D.prototype.has=function(e){return w(this,e).has(e)},D.prototype.set=function(e,t){return w(this,e).set(e,t),this};var L=U((function(e){e=function(e){return null==e?"":function(e){if("string"==typeof e)return e;if(G(e))return T?T.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(e)}(e);var t=[];return c.test(e)&&t.push(""),e.replace(d,(function(e,n,r,a){t.push(r?a.replace(l,"$1"):n||e)})),t}));function j(e){if("string"==typeof e||G(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function U(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],s=n.cache;if(s.has(a))return s.get(a);var o=e.apply(this,r);return n.cache=s.set(a,o),o};return n.cache=new(U.Cache||D),n}function k(e,t){return e===t||e!=e&&t!=t}U.Cache=D;var F=Array.isArray;function V(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function G(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==S.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:function(e,t){t=function(e,t){if(F(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!G(e))||i.test(e)||!o.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return F(e)?e:L(e)}(t);for(var n=0,r=t.length;null!=e&&n<r;)e=e[j(t[n++])];return n&&n==r?e:void 0}(e,t);return void 0===r?n:r}},207:(e,t,n)=>{var r,a="__lodash_hash_undefined__",s=1/0,o=9007199254740991,i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,d=/^\./,l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,p=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,y=f||g||Function("return this")(),m=Array.prototype,I=Function.prototype,E=Object.prototype,A=y["__core-js_shared__"],_=(r=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",S=I.toString,$=E.hasOwnProperty,C=E.toString,b=RegExp("^"+S.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=y.Symbol,v=E.propertyIsEnumerable,O=m.splice,T=k(y,"Map"),R=k(Object,"create"),N=P?P.prototype:void 0,D=N?N.toString:void 0;function x(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 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,t){for(var n=e.length;n--;)if(B(e[n][0],t))return n;return-1}function j(e,t){return null!=e&&$.call(e,t)}function U(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function k(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!z(e)||_&&_ in e)return!1;var t=W(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?b:p;return t.test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}x.prototype.clear=function(){this.__data__=R?R(null):{}},x.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},x.prototype.get=function(e){var t=this.__data__;if(R){var n=t[e];return n===a?void 0:n}return $.call(t,e)?t[e]:void 0},x.prototype.has=function(e){var t=this.__data__;return R?void 0!==t[e]:$.call(t,e)},x.prototype.set=function(e,t){return this.__data__[e]=R&&void 0===t?a:t,this},w.prototype.clear=function(){this.__data__=[]},w.prototype.delete=function(e){var t=this.__data__,n=L(t,e);return!(n<0||(n==t.length-1?t.pop():O.call(t,n,1),0))},w.prototype.get=function(e){var t=this.__data__,n=L(t,e);return n<0?void 0:t[n][1]},w.prototype.has=function(e){return L(this.__data__,e)>-1},w.prototype.set=function(e,t){var n=this.__data__,r=L(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},M.prototype.clear=function(){this.__data__={hash:new x,map:new(T||w),string:new x}},M.prototype.delete=function(e){return U(this,e).delete(e)},M.prototype.get=function(e){return U(this,e).get(e)},M.prototype.has=function(e){return U(this,e).has(e)},M.prototype.set=function(e,t){return U(this,e).set(e,t),this};var F=G((function(e){e=function(e){return null==e?"":function(e){if("string"==typeof e)return e;if(K(e))return D?D.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(e)}(e);var t=[];return d.test(e)&&t.push(""),e.replace(l,(function(e,n,r,a){t.push(r?a.replace(u,"$1"):n||e)})),t}));function V(e){if("string"==typeof e||K(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,a=t?t.apply(this,r):r[0],s=n.cache;if(s.has(a))return s.get(a);var o=e.apply(this,r);return n.cache=s.set(a,o),o};return n.cache=new(G.Cache||M),n}function B(e,t){return e===t||e!=e&&t!=t}G.Cache=M;var H=Array.isArray;function W(e){var t=z(e)?C.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function q(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Y(e){return!!e&&"object"==typeof e}function K(e){return"symbol"==typeof e||Y(e)&&"[object Symbol]"==C.call(e)}e.exports=function(e,t){return null!=e&&function(e,t,n){t=function(e,t){if(H(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!K(e))||c.test(e)||!i.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return H(e)?e:F(e)}(t);for(var r,a=-1,s=t.length;++a<s;){var d=V(t[a]);if(!(r=null!=e&&n(e,d)))break;e=e[d]}return r||!!(s=e?e.length:0)&&q(s)&&function(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||h.test(e))&&e>-1&&e%1==0&&e<t}(d,s)&&(H(e)||function(e){return function(e){return Y(e)&&function(e){return null!=e&&q(e.length)&&!W(e)}(e)}(e)&&$.call(e,"callee")&&(!v.call(e,"callee")||"[object Arguments]"==C.call(e))}(e))}(e,t,j)}},828:(e,t,n)=>{e=n.nmd(e);var r,a,s,o="[object Map]",i="[object Promise]",c="[object Set]",d="[object WeakMap]",l="[object DataView]",u=/^\[object .+?Constructor\]$/,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,f=p||h||Function("return this")(),g=t&&!t.nodeType&&t,y=g&&e&&!e.nodeType&&e,m=y&&y.exports===g,I=Function.prototype,E=Object.prototype,A=f["__core-js_shared__"],_=(r=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",S=I.toString,$=E.hasOwnProperty,C=E.toString,b=RegExp("^"+S.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m?f.Buffer:void 0,v=E.propertyIsEnumerable,O=P?P.isBuffer:void 0,T=(a=Object.keys,s=Object,function(e){return a(s(e))}),R=V(f,"DataView"),N=V(f,"Map"),D=V(f,"Promise"),x=V(f,"Set"),w=V(f,"WeakMap"),M=!v.call({valueOf:1},"valueOf"),L=B(R),j=B(N),U=B(D),k=B(x),F=B(w);function V(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!Y(e)||function(e){return!!_&&_ in e}(e))return!1;var t=z(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?b:u;return t.test(B(e))}(n)?n:void 0}var G=function(e){return C.call(e)};function B(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(R&&G(new R(new ArrayBuffer(1)))!=l||N&&G(new N)!=o||D&&G(D.resolve())!=i||x&&G(new x)!=c||w&&G(new w)!=d)&&(G=function(e){var t=C.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?B(n):void 0;if(r)switch(r){case L:return l;case j:return o;case U:return i;case k:return c;case F:return d}return t});var H=Array.isArray;function W(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!z(e)}var q=O||function(){return!1};function z(e){var t=Y(e)?C.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function Y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(W(e)&&(H(e)||"string"==typeof e||"function"==typeof e.splice||q(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&W(e)}(e)&&$.call(e,"callee")&&(!v.call(e,"callee")||"[object Arguments]"==C.call(e))}(e)))return!e.length;var t=G(e);if(t==o||t==c)return!e.size;if(M||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||E)}(e))return!T(e).length;for(var n in e)if($.call(e,n))return!1;return!0}},722:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",a=9007199254740991,s="[object Arguments]",o="[object Array]",i="[object Boolean]",c="[object Date]",d="[object Error]",l="[object Function]",u="[object Map]",p="[object Number]",h="[object Object]",f="[object Promise]",g="[object RegExp]",y="[object Set]",m="[object String]",I="[object WeakMap]",E="[object ArrayBuffer]",A="[object DataView]",_=/^\[object .+?Constructor\]$/,S=/^(?:0|[1-9]\d*)$/,$={};$["[object Float32Array]"]=$["[object Float64Array]"]=$["[object Int8Array]"]=$["[object Int16Array]"]=$["[object Int32Array]"]=$["[object Uint8Array]"]=$["[object Uint8ClampedArray]"]=$["[object Uint16Array]"]=$["[object Uint32Array]"]=!0,$[s]=$[o]=$[E]=$[i]=$[A]=$[c]=$[d]=$[l]=$[u]=$[p]=$[h]=$[g]=$[y]=$[m]=$[I]=!1;var C="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,b="object"==typeof self&&self&&self.Object===Object&&self,P=C||b||Function("return this")(),v=t&&!t.nodeType&&t,O=v&&e&&!e.nodeType&&e,T=O&&O.exports===v,R=T&&C.process,N=function(){try{return R&&R.binding&&R.binding("util")}catch(e){}}(),D=N&&N.isTypedArray;function x(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 w(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function M(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var L,j,U,k=Array.prototype,F=Function.prototype,V=Object.prototype,G=P["__core-js_shared__"],B=F.toString,H=V.hasOwnProperty,W=(L=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"",q=V.toString,z=RegExp("^"+B.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=T?P.Buffer:void 0,K=P.Symbol,J=P.Uint8Array,X=V.propertyIsEnumerable,Q=k.splice,Z=K?K.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=Y?Y.isBuffer:void 0,ne=(j=Object.keys,U=Object,function(e){return j(U(e))}),re=Oe(P,"DataView"),ae=Oe(P,"Map"),se=Oe(P,"Promise"),oe=Oe(P,"Set"),ie=Oe(P,"WeakMap"),ce=Oe(Object,"create"),de=De(re),le=De(ae),ue=De(se),pe=De(oe),he=De(ie),fe=K?K.prototype:void 0,ge=fe?fe.valueOf:void 0;function ye(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 me(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 Ie(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 Ee(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ie;++t<n;)this.add(e[t])}function Ae(e){var t=this.__data__=new me(e);this.size=t.size}function _e(e,t){for(var n=e.length;n--;)if(xe(e[n][0],t))return n;return-1}function Se(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Z&&Z in Object(e)?function(e){var t=H.call(e,Z),n=e[Z];try{e[Z]=void 0;var r=!0}catch(e){}var a=q.call(e);return r&&(t?e[Z]=n:delete e[Z]),a}(e):function(e){return q.call(e)}(e)}function $e(e){return Fe(e)&&Se(e)==s}function Ce(e,t,n,r,a){return e===t||(null==e||null==t||!Fe(e)&&!Fe(t)?e!=e&&t!=t:function(e,t,n,r,a,l){var f=Me(e),I=Me(t),_=f?o:Re(e),S=I?o:Re(t),$=(_=_==s?h:_)==h,C=(S=S==s?h:S)==h,b=_==S;if(b&&Le(e)){if(!Le(t))return!1;f=!0,$=!1}if(b&&!$)return l||(l=new Ae),f||Ve(e)?be(e,t,n,r,a,l):function(e,t,n,r,a,s,o){switch(n){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!s(new J(e),new J(t)));case i:case c:case p:return xe(+e,+t);case d:return e.name==t.name&&e.message==t.message;case g:case m:return e==t+"";case u:var l=w;case y:var h=1&r;if(l||(l=M),e.size!=t.size&&!h)return!1;var f=o.get(e);if(f)return f==t;r|=2,o.set(e,t);var I=be(l(e),l(t),r,a,s,o);return o.delete(e),I;case"[object Symbol]":if(ge)return ge.call(e)==ge.call(t)}return!1}(e,t,_,n,r,a,l);if(!(1&n)){var P=$&&H.call(e,"__wrapped__"),v=C&&H.call(t,"__wrapped__");if(P||v){var O=P?e.value():e,T=v?t.value():t;return l||(l=new Ae),a(O,T,n,r,l)}}return!!b&&(l||(l=new Ae),function(e,t,n,r,a,s){var o=1&n,i=Pe(e),c=i.length;if(c!=Pe(t).length&&!o)return!1;for(var d=c;d--;){var l=i[d];if(!(o?l in t:H.call(t,l)))return!1}var u=s.get(e);if(u&&s.get(t))return u==t;var p=!0;s.set(e,t),s.set(t,e);for(var h=o;++d<c;){var f=e[l=i[d]],g=t[l];if(r)var y=o?r(g,f,l,t,e,s):r(f,g,l,e,t,s);if(!(void 0===y?f===g||a(f,g,n,r,s):y)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var m=e.constructor,I=t.constructor;m==I||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof I&&I instanceof I||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,n,r,a,l))}(e,t,n,r,Ce,a))}function be(e,t,n,r,a,s){var o=1&n,i=e.length,c=t.length;if(i!=c&&!(o&&c>i))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var l=-1,u=!0,p=2&n?new Ee:void 0;for(s.set(e,t),s.set(t,e);++l<i;){var h=e[l],f=t[l];if(r)var g=o?r(f,h,l,t,e,s):r(h,f,l,e,t,s);if(void 0!==g){if(g)continue;u=!1;break}if(p){if(!x(t,(function(e,t){if(o=t,!p.has(o)&&(h===e||a(h,e,n,r,s)))return p.push(t);var o}))){u=!1;break}}else if(h!==f&&!a(h,f,n,r,s)){u=!1;break}}return s.delete(e),s.delete(t),u}function Pe(e){return function(e,t,n){var r=t(e);return Me(e)?r:function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}(r,n(e))}(e,Ge,Te)}function ve(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function Oe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ke(e)||function(e){return!!W&&W in e}(e))&&(je(e)?z:_).test(De(e))}(n)?n:void 0}ye.prototype.clear=function(){this.__data__=ce?ce(null):{},this.size=0},ye.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ye.prototype.get=function(e){var t=this.__data__;if(ce){var n=t[e];return n===r?void 0:n}return H.call(t,e)?t[e]:void 0},ye.prototype.has=function(e){var t=this.__data__;return ce?void 0!==t[e]:H.call(t,e)},ye.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ce&&void 0===t?r:t,this},me.prototype.clear=function(){this.__data__=[],this.size=0},me.prototype.delete=function(e){var t=this.__data__,n=_e(t,e);return!(n<0||(n==t.length-1?t.pop():Q.call(t,n,1),--this.size,0))},me.prototype.get=function(e){var t=this.__data__,n=_e(t,e);return n<0?void 0:t[n][1]},me.prototype.has=function(e){return _e(this.__data__,e)>-1},me.prototype.set=function(e,t){var n=this.__data__,r=_e(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Ie.prototype.clear=function(){this.size=0,this.__data__={hash:new ye,map:new(ae||me),string:new ye}},Ie.prototype.delete=function(e){var t=ve(this,e).delete(e);return this.size-=t?1:0,t},Ie.prototype.get=function(e){return ve(this,e).get(e)},Ie.prototype.has=function(e){return ve(this,e).has(e)},Ie.prototype.set=function(e,t){var n=ve(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ee.prototype.add=Ee.prototype.push=function(e){return this.__data__.set(e,r),this},Ee.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.clear=function(){this.__data__=new me,this.size=0},Ae.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ae.prototype.get=function(e){return this.__data__.get(e)},Ae.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof me){var r=n.__data__;if(!ae||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ie(r)}return n.set(e,t),this.size=n.size,this};var Te=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,s=[];++n<r;){var o=e[n];t(o)&&(s[a++]=o)}return s}(ee(e),(function(t){return X.call(e,t)})))}:function(){return[]},Re=Se;function Ne(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||S.test(e))&&e>-1&&e%1==0&&e<t}function De(e){if(null!=e){try{return B.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function xe(e,t){return e===t||e!=e&&t!=t}(re&&Re(new re(new ArrayBuffer(1)))!=A||ae&&Re(new ae)!=u||se&&Re(se.resolve())!=f||oe&&Re(new oe)!=y||ie&&Re(new ie)!=I)&&(Re=function(e){var t=Se(e),n=t==h?e.constructor:void 0,r=n?De(n):"";if(r)switch(r){case de:return A;case le:return u;case ue:return f;case pe:return y;case he:return I}return t});var we=$e(function(){return arguments}())?$e:function(e){return Fe(e)&&H.call(e,"callee")&&!X.call(e,"callee")},Me=Array.isArray,Le=te||function(){return!1};function je(e){if(!ke(e))return!1;var t=Se(e);return t==l||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ue(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function ke(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Fe(e){return null!=e&&"object"==typeof e}var Ve=D?function(e){return function(t){return e(t)}}(D):function(e){return Fe(e)&&Ue(e.length)&&!!$[Se(e)]};function Ge(e){return function(e){return null!=e&&Ue(e.length)&&!je(e)}(e)?function(e,t){var n=Me(e),r=!n&&we(e),a=!n&&!r&&Le(e),s=!n&&!r&&!a&&Ve(e),o=n||r||a||s,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 d in e)!H.call(e,d)||o&&("length"==d||a&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||Ne(d,c))||i.push(d);return i}(e):function(e){if(!function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||V)}(e))return ne(e);var t=[];for(var n in Object(e))H.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e,t){return Ce(e,t)}},431:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",a=9007199254740991,s="[object Arguments]",o="[object Function]",i="[object Object]",c=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,l={};l["[object Float32Array]"]=l["[object Float64Array]"]=l["[object Int8Array]"]=l["[object Int16Array]"]=l["[object Int32Array]"]=l["[object Uint8Array]"]=l["[object Uint8ClampedArray]"]=l["[object Uint16Array]"]=l["[object Uint32Array]"]=!0,l[s]=l["[object Array]"]=l["[object ArrayBuffer]"]=l["[object Boolean]"]=l["[object DataView]"]=l["[object Date]"]=l["[object Error]"]=l[o]=l["[object Map]"]=l["[object Number]"]=l[i]=l["[object RegExp]"]=l["[object Set]"]=l["[object String]"]=l["[object WeakMap]"]=!1;var u,p,h,f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,y=f||g||Function("return this")(),m=t&&!t.nodeType&&t,I=m&&e&&!e.nodeType&&e,E=I&&I.exports===m,A=E&&f.process,_=function(){try{return I&&I.require&&I.require("util").types||A&&A.binding&&A.binding("util")}catch(e){}}(),S=_&&_.isTypedArray,$=Array.prototype,C=Function.prototype,b=Object.prototype,P=y["__core-js_shared__"],v=C.toString,O=b.hasOwnProperty,T=(u=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",R=b.toString,N=v.call(Object),D=RegExp("^"+v.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),x=E?y.Buffer:void 0,w=y.Symbol,M=y.Uint8Array,L=(x&&x.allocUnsafe,p=Object.getPrototypeOf,h=Object,function(e){return p(h(e))}),j=Object.create,U=b.propertyIsEnumerable,k=$.splice,F=w?w.toStringTag:void 0,V=function(){try{var e=ie(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),G=x?x.isBuffer:void 0,B=Math.max,H=Date.now,W=ie(y,"Map"),q=ie(Object,"create"),z=function(){function e(){}return function(t){if(!Ee(t))return{};if(j)return j(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Y(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 K(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 J(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 X(e){var t=this.__data__=new K(e);this.size=t.size}function Q(e,t,n){(void 0!==n&&!pe(e[t],n)||void 0===n&&!(t in e))&&te(e,t,n)}function Z(e,t,n){var r=e[t];O.call(e,t)&&pe(r,n)&&(void 0!==n||t in e)||te(e,t,n)}function ee(e,t){for(var n=e.length;n--;)if(pe(e[n][0],t))return n;return-1}function te(e,t,n){"__proto__"==t&&V?V(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":F&&F in Object(e)?function(e){var t=O.call(e,F),n=e[F];try{e[F]=void 0;var r=!0}catch(e){}var a=R.call(e);return r&&(t?e[F]=n:delete e[F]),a}(e):function(e){return R.call(e)}(e)}function re(e){return Ae(e)&&ne(e)==s}function ae(e,t,n,r,a){e!==t&&function(e,t,n){for(var r=-1,a=Object(e),s=n(e),o=s.length;o--;){var i=s[++r];if(!1===t(a[i],i))break}}(t,(function(s,o){if(a||(a=new X),Ee(s))!function(e,t,n,r,a,s,o){var c=le(e,n),d=le(t,n),l=o.get(d);if(l)Q(e,n,l);else{var u,p,h,f,g=s?s(c,d,n+"",e,t,o):void 0,y=void 0===g;if(y){var m=fe(d),I=!m&&ye(d),E=!m&&!I&&_e(d);g=d,m||I||E?fe(c)?g=c:function(e){return Ae(e)&&ge(e)}(c)?g=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(c):I?(y=!1,g=function(e,t){return e.slice()}(d)):E?(y=!1,f=new(h=(u=d).buffer).constructor(h.byteLength),new M(f).set(new M(h)),p=f,g=new u.constructor(p,u.byteOffset,u.length)):g=[]:function(e){if(!Ae(e)||ne(e)!=i)return!1;var t=L(e);if(null===t)return!0;var n=O.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&v.call(n)==N}(d)||he(d)?(g=c,he(c)?g=function(e){return function(e,t,n,r){var a=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var i=t[s],c=void 0;void 0===c&&(c=e[i]),a?te(n,i,c):Z(n,i,c)}return n}(e,Se(e))}(c):Ee(c)&&!me(c)||(g=function(e){return"function"!=typeof e.constructor||de(e)?{}:z(L(e))}(d))):y=!1}y&&(o.set(d,g),a(g,d,r,s,o),o.delete(d)),Q(e,n,g)}}(e,t,o,n,ae,r,a);else{var c=r?r(le(e,o),s,o+"",e,t,a):void 0;void 0===c&&(c=s),Q(e,o,c)}}),Se)}Y.prototype.clear=function(){this.__data__=q?q(null):{},this.size=0},Y.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Y.prototype.get=function(e){var t=this.__data__;if(q){var n=t[e];return n===r?void 0:n}return O.call(t,e)?t[e]:void 0},Y.prototype.has=function(e){var t=this.__data__;return q?void 0!==t[e]:O.call(t,e)},Y.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},K.prototype.clear=function(){this.__data__=[],this.size=0},K.prototype.delete=function(e){var t=this.__data__,n=ee(t,e);return!(n<0||(n==t.length-1?t.pop():k.call(t,n,1),--this.size,0))},K.prototype.get=function(e){var t=this.__data__,n=ee(t,e);return n<0?void 0:t[n][1]},K.prototype.has=function(e){return ee(this.__data__,e)>-1},K.prototype.set=function(e,t){var n=this.__data__,r=ee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},J.prototype.clear=function(){this.size=0,this.__data__={hash:new Y,map:new(W||K),string:new Y}},J.prototype.delete=function(e){var t=oe(this,e).delete(e);return this.size-=t?1:0,t},J.prototype.get=function(e){return oe(this,e).get(e)},J.prototype.has=function(e){return oe(this,e).has(e)},J.prototype.set=function(e,t){var n=oe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},X.prototype.clear=function(){this.__data__=new K,this.size=0},X.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},X.prototype.get=function(e){return this.__data__.get(e)},X.prototype.has=function(e){return this.__data__.has(e)},X.prototype.set=function(e,t){var n=this.__data__;if(n instanceof K){var r=n.__data__;if(!W||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new J(r)}return n.set(e,t),this.size=n.size,this};var se=V?function(e,t){return V(e,"toString",{configurable:!0,enumerable:!1,value:be(t),writable:!0})}:Pe;function oe(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function ie(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ee(e)||function(e){return!!T&&T in e}(e))&&(me(e)?D:c).test(function(e){if(null!=e){try{return v.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function ce(e,t){var n=typeof e;return!!(t=null==t?a:t)&&("number"==n||"symbol"!=n&&d.test(e))&&e>-1&&e%1==0&&e<t}function de(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||b)}function le(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ue=function(e){var t=0,n=0;return function(){var r=H(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(se);function pe(e,t){return e===t||e!=e&&t!=t}var he=re(function(){return arguments}())?re:function(e){return Ae(e)&&O.call(e,"callee")&&!U.call(e,"callee")},fe=Array.isArray;function ge(e){return null!=e&&Ie(e.length)&&!me(e)}var ye=G||function(){return!1};function me(e){if(!Ee(e))return!1;var t=ne(e);return t==o||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ie(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Ee(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ae(e){return null!=e&&"object"==typeof e}var _e=S?function(e){return function(t){return e(t)}}(S):function(e){return Ae(e)&&Ie(e.length)&&!!l[ne(e)]};function Se(e){return ge(e)?function(e,t){var n=fe(e),r=!n&&he(e),a=!n&&!r&&ye(e),s=!n&&!r&&!a&&_e(e),o=n||r||a||s,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 d in e)o&&("length"==d||a&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||ce(d,c))||i.push(d);return i}(e):function(e){if(!Ee(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=de(e),n=[];for(var r in e)("constructor"!=r||!t&&O.call(e,r))&&n.push(r);return n}(e)}var $e,Ce=($e=function(e,t,n,r){ae(e,t,n,r)},function(e,t){return ue(function(e,t,n){return t=B(void 0===t?e.length-1:t,0),function(){for(var r=arguments,a=-1,s=B(r.length-t,0),o=Array(s);++a<s;)o[a]=r[t+a];a=-1;for(var i=Array(t+1);++a<t;)i[a]=r[a];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,void 0,Pe),e+"")}((function(e,t){var n=-1,r=t.length,a=r>1?t[r-1]:void 0,s=r>2?t[2]:void 0;for(a=$e.length>3&&"function"==typeof a?(r--,a):void 0,s&&function(e,t,n){if(!Ee(n))return!1;var r=typeof t;return!!("number"==r?ge(n)&&ce(t,n.length):"string"==r&&t in n)&&pe(n[t],e)}(t[0],t[1],s)&&(a=r<3?void 0:a,r=1),e=Object(e);++n<r;){var o=t[n];o&&$e(e,o,n,a)}return e})));function be(e){return function(){return e}}function Pe(e){return e}e.exports=Ce},8:(e,t,n)=>{var r,a="__lodash_hash_undefined__",s=1/0,o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/,c=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,g=h||f||Function("return this")(),y=Array.prototype,m=Function.prototype,I=Object.prototype,E=g["__core-js_shared__"],A=(r=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",_=m.toString,S=I.hasOwnProperty,$=I.toString,C=RegExp("^"+_.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=g.Symbol,P=y.splice,v=j(g,"Map"),O=j(Object,"create"),T=b?b.prototype:void 0,R=T?T.toString:void 0;function N(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 D(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 x(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 w(e,t,n){var r=e[t];S.call(e,t)&&G(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function M(e,t){for(var n=e.length;n--;)if(G(e[n][0],t))return n;return-1}function L(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function j(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!H(e)||A&&A in e)return!1;var t=function(e){var t=H(e)?$.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?C:u;return t.test(function(e){if(null!=e){try{return _.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function U(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||p.test(e))&&e>-1&&e%1==0&&e<t}N.prototype.clear=function(){this.__data__=O?O(null):{}},N.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},N.prototype.get=function(e){var t=this.__data__;if(O){var n=t[e];return n===a?void 0:n}return S.call(t,e)?t[e]:void 0},N.prototype.has=function(e){var t=this.__data__;return O?void 0!==t[e]:S.call(t,e)},N.prototype.set=function(e,t){return this.__data__[e]=O&&void 0===t?a:t,this},D.prototype.clear=function(){this.__data__=[]},D.prototype.delete=function(e){var t=this.__data__,n=M(t,e);return!(n<0||(n==t.length-1?t.pop():P.call(t,n,1),0))},D.prototype.get=function(e){var t=this.__data__,n=M(t,e);return n<0?void 0:t[n][1]},D.prototype.has=function(e){return M(this.__data__,e)>-1},D.prototype.set=function(e,t){var n=this.__data__,r=M(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},x.prototype.clear=function(){this.__data__={hash:new N,map:new(v||D),string:new N}},x.prototype.delete=function(e){return L(this,e).delete(e)},x.prototype.get=function(e){return L(this,e).get(e)},x.prototype.has=function(e){return L(this,e).has(e)},x.prototype.set=function(e,t){return L(this,e).set(e,t),this};var k=V((function(e){e=function(e){return null==e?"":function(e){if("string"==typeof e)return e;if(W(e))return R?R.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(e)}(e);var t=[];return c.test(e)&&t.push(""),e.replace(d,(function(e,n,r,a){t.push(r?a.replace(l,"$1"):n||e)})),t}));function F(e){if("string"==typeof e||W(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function V(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],s=n.cache;if(s.has(a))return s.get(a);var o=e.apply(this,r);return n.cache=s.set(a,o),o};return n.cache=new(V.Cache||x),n}function G(e,t){return e===t||e!=e&&t!=t}V.Cache=x;var B=Array.isArray;function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function W(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==$.call(e)}e.exports=function(e,t,n){return null==e?e:function(e,t,n,r){if(!H(e))return e;t=function(e,t){if(B(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!W(e))||i.test(e)||!o.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return B(e)?e:k(e)}(t);for(var a=-1,s=t.length,c=s-1,d=e;null!=d&&++a<s;){var l=F(t[a]),u=n;if(a!=c){var p=d[l];void 0===(u=void 0)&&(u=H(p)?p:U(t[a+1])?[]:{})}w(d,l,u),d=d[l]}return e}(e,t,n)}},795:(e,t,n)=>{var r,a="__lodash_hash_undefined__",s=1/0,o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/,c=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,f=p||h||Function("return this")(),g=Array.prototype,y=Function.prototype,m=Object.prototype,I=f["__core-js_shared__"],E=(r=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",A=y.toString,_=m.hasOwnProperty,S=m.toString,$=RegExp("^"+A.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),C=f.Symbol,b=g.splice,P=L(f,"Map"),v=L(Object,"create"),O=C?C.prototype:void 0,T=O?O.toString:void 0;function R(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 N(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 D(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 x(e,t){for(var n=e.length;n--;)if(V(e[n][0],t))return n;return-1}function w(e){return G(e)?e:U(e)}function M(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function L(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!B(e)||E&&E in e)return!1;var t=function(e){var t=B(e)?S.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?$:u;return t.test(function(e){if(null!=e){try{return A.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function j(e,t){if(G(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!H(e))||i.test(e)||!o.test(e)||null!=t&&e in Object(t)}R.prototype.clear=function(){this.__data__=v?v(null):{}},R.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},R.prototype.get=function(e){var t=this.__data__;if(v){var n=t[e];return n===a?void 0:n}return _.call(t,e)?t[e]:void 0},R.prototype.has=function(e){var t=this.__data__;return v?void 0!==t[e]:_.call(t,e)},R.prototype.set=function(e,t){return this.__data__[e]=v&&void 0===t?a:t,this},N.prototype.clear=function(){this.__data__=[]},N.prototype.delete=function(e){var t=this.__data__,n=x(t,e);return!(n<0||(n==t.length-1?t.pop():b.call(t,n,1),0))},N.prototype.get=function(e){var t=this.__data__,n=x(t,e);return n<0?void 0:t[n][1]},N.prototype.has=function(e){return x(this.__data__,e)>-1},N.prototype.set=function(e,t){var n=this.__data__,r=x(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},D.prototype.clear=function(){this.__data__={hash:new R,map:new(P||N),string:new R}},D.prototype.delete=function(e){return M(this,e).delete(e)},D.prototype.get=function(e){return M(this,e).get(e)},D.prototype.has=function(e){return M(this,e).has(e)},D.prototype.set=function(e,t){return M(this,e).set(e,t),this};var U=F((function(e){e=function(e){return null==e?"":function(e){if("string"==typeof e)return e;if(H(e))return T?T.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(e)}(e);var t=[];return c.test(e)&&t.push(""),e.replace(d,(function(e,n,r,a){t.push(r?a.replace(l,"$1"):n||e)})),t}));function k(e){if("string"==typeof e||H(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function F(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],s=n.cache;if(s.has(a))return s.get(a);var o=e.apply(this,r);return n.cache=s.set(a,o),o};return n.cache=new(F.Cache||D),n}function V(e,t){return e===t||e!=e&&t!=t}F.Cache=D;var G=Array.isArray;function B(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==S.call(e)}e.exports=function(e,t){return null==e||function(e,t){e=function(e,t){return 1==t.length?e:function(e,t){for(var n=0,r=(t=j(t,e)?[t]:w(t)).length;null!=e&&n<r;)e=e[k(t[n++])];return n&&n==r?e:void 0}(e,function(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(a);++r<a;)s[r]=e[r+t];return s}(t,0,-1))}(e,t=j(t,e)?[t]:w(t));var n,r,a=k((r=(n=t)?n.length:0)?n[r-1]:void 0);return!(null!=e&&_.call(e,a))||delete e[a]}(e,t)}},386:e=>{class t{constructor(e,t,n,r,a){this.converter=c(),this.width=e,this.poly=t,this.xor_in=n,this.reflected_xor_in=d(n,e),this.xor_out=r,this.reflect=a,this.msb_mask=1<<this.width-1,this.mask=this.msb_mask-1<<1|1,this.crc_shift=this.width<8?8-this.width:0,this.shifted_xor_in=this.xor_in<<this.crc_shift;let s=this.gen_table();this.table=s,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=s[t^e[n]];return t})}calculate(e){let t;e=this.converter.validate_buffer(e);let{table:n,width:r,crc_shift:a,mask:s}=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)&s}else{t=this.shifted_xor_in;for(let o=0;o<e.length;o++)t=n[255&(t>>r-8+a^e[o])]<<a^t<<8-a&s<<a;t>>=a}return t^=this.xor_out,t>>>0}calculate_no_table(e){e=this.converter.validate_buffer(e);let t=this.xor_in;for(let n=0;n<e.length;n++){let r=e[n];this.reflect&&(r=d(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=d(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=d(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=d(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,a=1<<n,s="";for(let o=0;o<r;o++){let r="";for(let s=0;s<a;s++){let a=e[o<<n|s];a="000000000"+a.toString(16),a=a.substr(a.length-t),r+="0x"+a+", "}s+=" "+r+"\n"}return s="[\n"+s.slice(0,-3)+"\n]",s}}const n="undefined"!=typeof Buffer,r="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,a=void 0!==typeof BigInt&&BigInt(256);class s{validate_buffer(e){switch(typeof e){case"number":{if(!Number.isSafeInteger(e)||e<0)throw Error(`number data must be a nonnegative safe integer, not ${e}`);if(this.fromUInt32&&e<=4294967295)return this.fromUInt32(e);const t=[];for(;e>0||t.length<4;)t.unshift(e%256),e=Math.floor(e/256);return this.fromByteArray(t)}case"string":return this.fromString(e);case"bigint":{if(e<0)throw Error(`bigint data must be nonnegative, not ${e}`);const t=[];for(;e>0||t.length<4;)t.unshift(Number(e%a)),e/=a;return this.fromByteArray(t)}default:if(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 s{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 s{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 d(e,t){let n=0;for(let r=0;r<t;r++)n=n<<1|1&e,e>>=1;return n}const l={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 u(e){}e.exports={CRC:t,crc:function(e,n,r,a,s){let o=new t(e,n,r,a,s);return o.calculate.bind(o)},makeBufferConverter:c,models:l,crc1:u,crc6:u,crc8:u,crc10:u,crc16:u,crc24:u,crc32:u,crc32c:u};for(let t in l){let n=l[t];e.exports[t]=n.calculate.bind(n)}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var s=t[r]={id:r,loaded:!1,exports:{}};return e[r](s,s.exports,n),s.loaded=!0,s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};(()=>{n.d(r,{v9:()=>Mh,DP:()=>oI,RE:()=>sI,WM:()=>jm,gm:()=>fI,Yw:()=>Gm,e6:()=>Wm,sd:()=>Hm,No:()=>pI,DF:()=>Fm,FC:()=>Um,kU:()=>eI,gu:()=>hI,LF:()=>km,vg:()=>Vm,jK:()=>Bm,Dw:()=>tI,x0:()=>Xm,HW:()=>Qm,N2:()=>gI,yC:()=>Ym,gn:()=>aI,JP:()=>nI,fV:()=>Jm,Hk:()=>rI,K5:()=>iI,P6:()=>Zm,r_:()=>uI,r7:()=>lI,gA:()=>cI,V5:()=>dI,d0:()=>Km,JR:()=>qm});var e={};n.r(e),n.d(e,{getDataPageKeys:()=>wt,getDataPageMetadata:()=>vt,getEmbeddedPropertyMetadata:()=>_t,getFieldParameters:()=>Nt,getFieldsByClassName:()=>Rt,getInsight:()=>Tt,getLookUpDataPage:()=>Mt,getLookUpDataPageInfo:()=>Lt,getParagraph:()=>Dt,getPersonalizationMetadata:()=>Ot,getPropertyMetadata:()=>At,getSavableDataPage:()=>xt,mergeStore:()=>Et,resolveNavigation:()=>Pt,resolveView:()=>bt,updateNavigationStore:()=>$t,updateStores:()=>Ct,updateViewStore:()=>St});var t={};n.r(t),n.d(t,{buildContextName:()=>sr,buildModalContext:()=>dr,buildTransientContextName:()=>or,getContainerIdFromContext:()=>ur,getParentContext:()=>lr,getParentContextName:()=>ar,getTargetFromContext:()=>cr,getTransientContext:()=>ir});var a={};n.r(a),n.d(a,{getResolvedTargetName:()=>Sr,getRoutingInfo:()=>$r,getSemanticURLFromRoutingInfo:()=>Cr});var s={};n.r(s),n.d(s,{evaluate:()=>Ca,handleChange:()=>Sa,hasDeclareExpression:()=>_a,updateDeclareExpressions:()=>$a});var o={};n.r(o),n.d(o,{publishExpressions:()=>As,publishResponse:()=>_s});var i={};n.r(i),n.d(i,{CONTAINER_NAMES:()=>No,CONTAINER_TYPES:()=>Ro,addRootContainerItem:()=>ci,areContainerItemsPresent:()=>jo,clearTransientData:()=>pi,closeContainerItem:()=>ii,getActiveContainerItemContext:()=>qo,getActiveContainerItemName:()=>Go,getActiveContext:()=>Ai,getChildContainerItems:()=>zo,getChildContainers:()=>Yo,getChildContainersContexts:()=>Ko,getContainerAPI:()=>gi,getContainerAccessOrder:()=>Lo,getContainerData:()=>xo,getContainerItemData:()=>wo,getContainerItemName:()=>ko,getContainerItems:()=>Mo,getContainerLimit:()=>ei,getContainerParentContext:()=>$i,getContainerType:()=>Vo,getContextByTargetAndKey:()=>Si,getDataContextName:()=>Wo,getLeastRecentlyUsedNonDirtyContainerItemID:()=>si,getRootContainerName:()=>Ei,getSuggestionContexts:()=>Jo,getTargetFromContainerItemID:()=>oi,getTransientItems:()=>ui,hasContainerItems:()=>Zo,isContainerDirty:()=>ai,isContainerInitialized:()=>Fo,isContainerItemActive:()=>Bo,isContainerItemContextBeingUsedInOtherContainers:()=>li,isContainerItemExists:()=>Uo,isContainerLimitReached:()=>ni,isContainerMultipleMode:()=>Qo,isContainerSingleMode:()=>Xo,purgeTransientData:()=>hi,removeContainer:()=>yi,resetContainersPayload:()=>ri,setContainerLimit:()=>ti,updateCaseContextEtag:()=>Ii,updateParentLastUpdateTime:()=>_i,updateRelatedContextEtag:()=>mi});var c={};n.r(c),n.d(c,{activateContainerItem:()=>ec,addContainerItem:()=>zi,addMessages:()=>tc,addSharedData:()=>uc,addTransientItem:()=>Yi,addWork:()=>Bi,clearTransientData:()=>Ji,createWork:()=>ji,error:()=>lc,finishAssignment:()=>oc,initContainers:()=>Wi,listAction:()=>hc,loadView:()=>Vi,mergeData:()=>ki,openAssignment:()=>ic,openWorkByHandle:()=>Hi,postProcess:()=>dc,purgeTransientData:()=>Xi,removeAllTransientItems:()=>rc,removeContainerItem:()=>nc,removeSharedData:()=>pc,removeTransientItem:()=>ac,replaceContainerItem:()=>sc,resetContainers:()=>qi,setSharedProperty:()=>gc,setStateProperty:()=>yc,showCasePreview:()=>fc,showHarness:()=>Fi,showHistory:()=>cc,showPage:()=>Gi,upMergeAndRemoveContainerItem:()=>Zi,updateContainerItem:()=>Qi,updateTransientData:()=>Ki});var d={};n.r(d),n.d(d,{dispatch:()=>jc,getActionType:()=>Hc,getContextValue:()=>Gc,getDataObject:()=>Uc,getReferenceTokens:()=>wc,getSharedDataObject:()=>kc,getStore:()=>Lc,getValue:()=>Vc,isMergeable:()=>qc,lookupContextValue:()=>Bc,mergeDeep:()=>zc,removeItem:()=>Wc,replaceValue:()=>Kc,setStore:()=>Mc,updateValue:()=>Yc});var l={};n.r(l),n.d(l,{hasBrowserEnv:()=>sl,hasStandardBrowserEnv:()=>il,hasStandardBrowserWebWorkerEnv:()=>cl,navigator:()=>ol,origin:()=>dl});var u={};n.r(u),n.d(u,{doesRestApiExist:()=>Wu,getCancelTokenSource:()=>qu,getCaseApi:()=>Ku,getHeaderProcessor:()=>Gu,invokeCustomRestApi:()=>Hu,invokeRestApi:()=>Bu,isRequestCanceled:()=>zu,registerInterceptor:()=>Yu});var p={};function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===h(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(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. "}n.r(p),n.d(p,{fetchViewResources:()=>np,updateViewResources:()=>tp});var I="function"==typeof Symbol&&Symbol.observable||"@@observable",E=function(){return Math.random().toString(36).substring(7).split("").join(".")},A={INIT:"@@redux/INIT"+E(),REPLACE:"@@redux/REPLACE"+E(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+E()}};function _(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function S(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(m(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(m(1));return n(S)(e,t)}if("function"!=typeof e)throw new Error(m(2));var a=e,s=t,o=[],i=o,c=!1;function d(){i===o&&(i=o.slice())}function l(){if(c)throw new Error(m(3));return s}function u(e){if("function"!=typeof e)throw new Error(m(4));if(c)throw new Error(m(5));var t=!0;return d(),i.push(e),function(){if(t){if(c)throw new Error(m(6));t=!1,d();var n=i.indexOf(e);i.splice(n,1),o=null}}}function p(e){if(!_(e))throw new Error(m(7));if(void 0===e.type)throw new Error(m(8));if(c)throw new Error(m(9));try{c=!0,s=a(s,e)}finally{c=!1}for(var t=o=i,n=0;n<t.length;n++)(0,t[n])();return e}return p({type:A.INIT}),(r={dispatch:p,subscribe:u,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error(m(10));a=e,p({type:A.REPLACE})}})[I]=function(){var e,t=u;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(m(11));function n(){e.next&&e.next(l())}return n(),{unsubscribe:t(n)}}})[I]=function(){return this},e},r}function $(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}var C=function(e,t){return C=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])},C(e,t)};function b(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}C(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function P(e,t){var n,r,a,s,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,i[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function v(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 O(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,s=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)o.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(a)throw a.error}}return o}function T(e,t,n){if(n||2===arguments.length)for(var r,a=0,s=t.length;a<s;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}function R(e){return this instanceof R?(this.v=e,this):new R(e)}function N(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,a=n.apply(e,t||[]),s=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(e){a[e]&&(r[e]=function(t){return new Promise((function(n,r){s.push([e,t,n,r])>1||i(e,t)}))})}function i(e,t){try{(n=a[e](t)).value instanceof R?Promise.resolve(n.value.v).then(c,d):l(s[0][2],n)}catch(e){l(s[0][3],e)}var n}function c(e){i("next",e)}function d(e){i("throw",e)}function l(e,t){e(t),s.shift(),s.length&&i(s[0][0],s[0][1])}}function D(e){return"function"==typeof e}function x(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}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var w=x((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 M(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var L=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,a;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var o=v(s),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 s.remove(this);var c=this.initialTeardown;if(D(c))try{c()}catch(e){a=e instanceof w?e.errors:[e]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var l=v(d),u=l.next();!u.done;u=l.next()){var p=u.value;try{k(p)}catch(e){a=null!=a?a:[],e instanceof w?a=T(T([],O(a)),O(e.errors)):a.push(e)}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(a)throw new w(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)k(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)&&M(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&M(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),j=L.EMPTY;function U(e){return e instanceof L||e&&"closed"in e&&D(e.remove)&&D(e.add)&&D(e.unsubscribe)}function k(e){D(e)?e():e.unsubscribe()}var F=function(e){function t(t,n){return e.call(this)||this}return b(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(L),V={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=V.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,T([e,t],O(n))):setInterval.apply(void 0,T([e,t],O(n)))},clearInterval:function(e){var t=V.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},G=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 b(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,a=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(a,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(a,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),V.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&&V.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,M(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(F),B=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return b(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}(G),H={now:function(){return(H.delegate||Date).now()},delegate:void 0},W=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=H.now,e}(),q=function(e){function t(t,n){void 0===n&&(n=W.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return b(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}(W),z=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return b(t,e),t}(q))(B),Y={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=Y.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,T([e,t],O(n))):setTimeout.apply(void 0,T([e,t],O(n)))},clearTimeout:function(e){var t=Y.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function K(e){Y.setTimeout((function(){throw e}))}function J(){}var X=Q("C",void 0,void 0);function Q(e,t,n){return{kind:e,value:t,error:n}}function Z(e){e()}var ee=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,U(t)&&t.add(n)):n.destination=se,n}return b(t,e),t.create=function(e,t,n){return new ne(e,t,n)},t.prototype.next=function(e){this.isStopped?ae(function(e){return Q("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?ae(Q("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?ae(X,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}(L);Function.prototype.bind;var te=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){re(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){re(e)}else re(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){re(e)}},e}(),ne=function(e){function t(t,n,r){var a,s=e.call(this)||this;return a=D(t)||!t?{next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:t,s.destination=new te(a),s}return b(t,e),t}(ee);function re(e){K(e)}function ae(e,t){var n=null;n&&Y.setTimeout((function(){return n(e,t)}))}var se={closed:!0,next:J,error:function(e){throw e},complete:J},oe="function"==typeof Symbol&&Symbol.observable||"@@observable";function ie(e){return e}function ce(e){return 0===e.length?ie:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var de=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=this,a=function(e){return e&&e instanceof ee||function(e){return e&&D(e.next)&&D(e.error)&&D(e.complete)}(e)&&U(e)}(e)?e:new ne(e,t,n);return Z((function(){var e=r,t=e.operator,n=e.source;a.add(t?t.call(a,n):n?r._subscribe(a):r._trySubscribe(a))})),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=le(t))((function(t,r){var a=new ne({next:function(t){try{e(t)}catch(e){r(e),a.unsubscribe()}},error:r,complete:t});n.subscribe(a)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[oe]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ce(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=le(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 le(e){var t;return null!==(t=null!=e?e:undefined)&&void 0!==t?t:Promise}var ue=x((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),pe=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 b(t,e),t.prototype.lift=function(e){var t=new he(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new ue},t.prototype.next=function(e){var t=this;Z((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var a=v(t.currentObservers),s=a.next();!s.done;s=a.next())s.value.next(e)}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;Z((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;Z((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,a=n.isStopped,s=n.observers;return r||a?j:(this.currentObservers=null,s.push(e),new L((function(){t.currentObservers=null,M(s,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,a=t.isStopped;n?e.error(r):a&&e.complete()},t.prototype.asObservable=function(){var e=new de;return e.source=this,e},t.create=function(e,t){return new he(e,t)},t}(de),he=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return b(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:j},t}(pe),fe=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function ge(e){return D(null==e?void 0:e.then)}function ye(e){return D(e[oe])}function me(e){return Symbol.asyncIterator&&D(null==e?void 0:e[Symbol.asyncIterator])}function Ie(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 Ee="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Ae(e){return D(null==e?void 0:e[Ee])}function _e(e){return N(this,arguments,(function(){var t,n,r;return P(this,(function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,R(t.read())];case 3:return n=a.sent(),r=n.value,n.done?[4,R(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,R(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function Se(e){return D(null==e?void 0:e.getReader)}function $e(e){if(e instanceof de)return e;if(null!=e){if(ye(e))return a=e,new de((function(e){var t=a[oe]();if(D(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(fe(e))return r=e,new de((function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()}));if(ge(e))return n=e,new de((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,K)}));if(me(e))return Ce(e);if(Ae(e))return t=e,new de((function(e){var n,r;try{for(var a=v(t),s=a.next();!s.done;s=a.next()){var o=s.value;if(e.next(o),e.closed)return}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}e.complete()}));if(Se(e))return Ce(_e(e))}var t,n,r,a;throw Ie(e)}function Ce(e){return new de((function(t){(function(e,t){var n,r,a,s;return function(e,t,n,r){return new(n||(n=Promise))((function(t,a){function s(e){try{i(r.next(e))}catch(e){a(e)}}function o(e){try{i(r.throw(e))}catch(e){a(e)}}function i(e){e.done?t(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(s,o)}i((r=r.apply(e,[])).next())}))}(this,0,void 0,(function(){var o,i;return P(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=v(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,a){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,a,(t=e[n](t)).done,t.value)}))}}}(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(),a={error:i},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(s=n.return)?[4,s.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function be(e,t,n,r,a){void 0===r&&(r=0),void 0===a&&(a=!1);var s=t.schedule((function(){n(),a?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(s),!a)return s}function Pe(e){return function(t){if(function(e){return D(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 ve(e,t,n,r,a){return new Oe(e,t,n,r,a)}var Oe=function(e){function t(t,n,r,a,s,o){var i=e.call(this,t)||this;return i.onFinalize=s,i.shouldUnsubscribe=o,i._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,i._error=a?function(e){try{a(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,i._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,i}return b(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}(ee);function Te(e,t){return void 0===t&&(t=0),Pe((function(n,r){n.subscribe(ve(r,(function(n){return be(r,e,(function(){return r.next(n)}),t)}),(function(){return be(r,e,(function(){return r.complete()}),t)}),(function(n){return be(r,e,(function(){return r.error(n)}),t)})))}))}function Re(e,t){return void 0===t&&(t=0),Pe((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}function Ne(e,t){if(!e)throw new Error("Iterable cannot be null");return new de((function(n){be(n,t,(function(){var r=e[Symbol.asyncIterator]();be(n,t,(function(){r.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function De(e,t){return t?function(e,t){if(null!=e){if(ye(e))return function(e,t){return $e(e).pipe(Re(t),Te(t))}(e,t);if(fe(e))return function(e,t){return new de((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(ge(e))return function(e,t){return $e(e).pipe(Re(t),Te(t))}(e,t);if(me(e))return Ne(e,t);if(Ae(e))return function(e,t){return new de((function(n){var r;return be(n,t,(function(){r=e[Ee](),be(n,t,(function(){var e,t,a;try{t=(e=r.next()).value,a=e.done}catch(e){return void n.error(e)}a?n.complete():n.next(t)}),0,!0)})),function(){return D(null==r?void 0:r.return)&&r.return()}}))}(e,t);if(Se(e))return function(e,t){return Ne(_e(e),t)}(e,t)}throw Ie(e)}(e,t):$e(e)}function xe(e,t){return Pe((function(n,r){var a=0;n.subscribe(ve(r,(function(n){r.next(e.call(t,n,a++))})))}))}function we(e,t,n){return void 0===n&&(n=1/0),D(t)?we((function(n,r){return xe((function(e,a){return t(n,e,r,a)}))($e(e(n,r)))}),n):("number"==typeof t&&(n=t),Pe((function(t,r){return function(e,t,n,r,a,s,o,i){var c=[],d=0,l=0,u=!1,p=function(){!u||c.length||d||t.complete()},h=function(e){d++;var a=!1;$e(n(e,l++)).subscribe(ve(t,(function(e){t.next(e)}),(function(){a=!0}),void 0,(function(){if(a)try{d--;for(var e=function(){var e=c.shift();h(e)};c.length&&d<r;)e();p()}catch(e){t.error(e)}})))};return e.subscribe(ve(t,(function(e){return d<r?h(e):c.push(e)}),(function(){u=!0,p()}))),function(){}}(t,r,e,n)})))}var Me=function(e,t){return Me=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])},Me(e,t)};Object.create,Object.create;var Le=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 pe,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}Me(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(de),je=n(923),Ue=n(722),ke=n.n(Ue),Fe=n(431),Ve=n.n(Fe),Ge=n(386),Be=n(795),He=n.n(Be),We=n(207),qe=n.n(We),ze=n(174),Ye=n.n(ze),Ke=n(8),Je=n.n(Ke),Xe=n(828),Qe=n.n(Xe);const Ze={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let et;const tt=new Uint8Array(16);function nt(){if(!et&&(et="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!et))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return et(tt)}const rt=[];for(let e=0;e<256;++e)rt.push((e+256).toString(16).slice(1));const at=function(e,t,n){if(Ze.randomUUID&&!t&&!e)return Ze.randomUUID();const r=(e=e||{}).random||(e.rng||nt)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return(rt[e[t+0]]+rt[e[t+1]]+rt[e[t+2]]+rt[e[t+3]]+"-"+rt[e[t+4]]+rt[e[t+5]]+"-"+rt[e[t+6]]+rt[e[t+7]]+"-"+rt[e[t+8]]+rt[e[t+9]]+"-"+rt[e[t+10]]+rt[e[t+11]]+rt[e[t+12]]+rt[e[t+13]]+rt[e[t+14]]+rt[e[t+15]]).toLowerCase()}(r)},st={APP:{APP:"app",ROOT:"root",PXREQUESTOR:"pxRequestor",PXUSERNAME:".pxUserName",OPERATORID:"OperatorID",USERNAME:"pxRequestor.pxUserName",PXUSERIDENTIFIER:".pxUserIdentifier",USERIDENTIFIER:"pxRequestor.pxUserIdentifier",PYIMAGEINSKEY:".pyImageInsKey",OPERATORID_IMG_INSKEY:"OperatorID.pyImageInsKey",OPERATORID_LOCALE:"OperatorID.pyUseLocale",APPLICATION_LABEL:"Application.pyLabel",APPLICATION_RULE_NAME:"Application.pyRuleName"},RESOURCE_TYPES:{ASSIGNMENT:"ASSIGNMENT",CASE:"CASE",DATA:"DATA",PAGE:"PAGE"},RESOURCE_STATUS:{CREATE:"CREATE",UPDATE:"UPDATE"},VIEW_NAMES:{PY_CASE_TAB:"pyCaseTab",DATA_OBJECT_CREATE_VIEW:"Create",DATA_OBJECT_EDIT_VIEW:"pyEdit"},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"}},WORKLIST:"worklist",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",APPSHELL_ACTIVE_CASES:"appshell-activecases",TRACE_ID:"x-b3-traceid",LOAD_VIEW_STRING:"View",PRIMARY:"primary",NEXT_ASSIGNMENT_INFO_ID:"nextAssignmentInfo.ID",WORKCLASS:"Work-",DATA_INFO:{DATA_INFO_CONTENT:"dataInfo.content"},CASE_INFO:{CASE_INFO:"caseInfo",CASE_INFO_CONTENT:"caseInfo.content",CASE_INFO_NAME:"caseInfo.name",CASE_INFO_ID:"caseInfo.ID",CASE_INFO_CLASSID:"caseInfo.content.classID",CASE_TYPE_ID:"caseInfo.caseTypeID",CASE_TYPE_NAME:"caseInfo.caseTypeName",CASE_INFO_PZINSKEY:"caseInfo.content.pzInsKey",CASE_INFO_ACTIONS:"caseInfo.availableActions",VIEW_NAME:"caseInfo.content.pyViewName",ACTION_BUTTONS:"caseInfo.actionButtons",ACTIVE_ACTION_ID:"caseInfo.activeActionID",ASSIGNMENT_LABEL:"caseInfo.assignments[0].name",ASSIGNMENT_ID:"caseInfo.assignments[0].ID",ASSIGNMENTS:"caseInfo.assignments",INSTRUCTIONS:"caseInfo.assignments[0].instructions",NAVIGATION:"caseInfo.navigation",STAGES:"caseInfo.stages",STAGEID:"caseInfo.stageID",CASECLASS:"caseInfo.caseClass",AVAILABLEACTIONS:"caseInfo.availableActions",D_CASE_ASSIGNMENTS_RESULTS:"caseInfo.assignments",CHILD_ASSIGNMENTS:"caseInfo.childCases",ASSIGNMENTACTION_ID:"caseInfo.assignments[0].actions[0].ID",ISINCREATESTAGE:"caseInfo.isInCreateStage",APPROVALFLAG:"caseInfo.content.pyApprovalResult",DUPLICATECASEFLAG:"caseInfo.content.pyDuplicateCaseActions",DUPLICATECASEID:"caseInfo.content.pyDuplicateID",DUPLICATECASEINSKEY:"caseInfo.content.pyDuplicateCaseReference.pzInsKey",HEADERS:"caseInfo.headers",PARENTCASEINFO:"caseInfo.parentCaseInfo",REMOTESYSTEMID:"caseInfo.headers.RemoteSystemID",CASE_RELATED_CASE_TYPES:"caseInfo.relatedCaseTypes",CASES:"caseInfo.cases",GETNEXTWORK:"caseInfo.confirmationLinks.getNextWork",ACTION_REFRESH_CONDITIONS:"caseInfo.assignments[0].actions[0].refreshConditions",IS_LOCAL_ACTION:"caseInfo.isLocalAction",BUSINESS_ID:"caseInfo.businessID"},ACTIONS:{ACTION_ID:"actionID",ACTIONS:"availableActions",DELETEAVIALACTIONS:"deleteAvailActions",FLOWACTION:"FlowAction",DATA_PAGES:{D_PY_ADDITIONAL_CASE_ACTIONS:"D_pyAdditionalCaseActions"}},PROCESS:{FLOWPROBLEMS:"FlowProblems"},PAGE_TYPES:{PAGE:"page",LANDINGPAGE:"landingpage",LISTPAGE:"listpage"},LOCAL_ACTION_TYPE:{CASE_WIDE:"case",EXPRESS:"express",ASSIGMENT:"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",BANNER_VARIANT_SUCCESS:"success",BANNER_VARIANT_WARNING:"warning",BANNER_VARIANT_URGENT:"urgent",BANNER_VARIANT_INFO:"info",MESSAGES:{MESSAGES_TYPE_SUCCESS:"success",MESSAGES_TYPE_INFO:"info",MESSAGES_TYPE_ERROR:"error"},PUB_SUB_EVENTS:{EVENT_RENDER_APP:"renderApp",EVENT_REAUTH:"reAuth",EVENT_FULL_REAUTH:"fullReAuth",EVENT_CUSTOM_REAUTH:"customReAuth",EVENT_CANCEL:"cancel",EVENT_MINIMIZE:"minimize",EVENT_EXPRESS_LOCALACTION:"expressLocalActionSubmit",EVENT_BULKACTION:"bulkActionSubmit",EVENT_SHOW_CANCEL_ALERT:"showCancelAlert",EVENT_SHOW_DELETE_ALERT:"showDeleteAlert",EVENT_DASHBOARD_FILTER_CHANGE:"dashboardFilterChange",EVENT_DASHBOARD_FILTER_CLEAR_ALL:"dashboardFilterClearAll",EVENT_PROMOTED_FILTERS_CHANGE:"promotedFiltersChange",EVENT_TRANSIENT_ITEMS:{UPDATE_PROMOTED_FILTERS:"updatePromotedFilters"},UI_EVENTS:{SHOW_PAGE_DONE:"showPageDone"},CASE_EVENTS:{CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW:"caseAttachmentsUpdateFromCaseview",CASE_FOLLOWER_UPDATED_BY_OPERATOR_FROM_CASEVIEW:"caseFollowerUpdateByOperatorFromCaseview",CASE_FOLLOWER_UPDATE_BY_OPERATOR_FROM_WIDGET:"caseFollowerUpdateByOperatorFromWidget",CASE_CREATED:"caseCreated",CREATE_STAGE_DONE:"caseCreatedDone",CREATE_STAGE_CANCELLED:"caseCancelled",CREATE_STAGE_SAVED:"caseSaved",CREATE_STAGE_DELETED:"caseDeleted",ASSIGNMENT_SUBMISSION:"assignmentSubmission",END_OF_ASSIGNMENT_PROCESSING:"endOfAssignmentProcessing",CLOSE_CONFIRM_VIEW:"closeConfirmView",CASE_OPENED:"caseOpened",CASE_CLOSED:"caseClosed",ASSIGNMENT_OPENED:"assignmentOpened",CASE_PREVIEW:"casePreview",CURRENT_ASSIGNMENT_UPDATED:"currentAssignmentUpdated",CASE_LOCK_EVENT:"caseLockEvent"},BOOTSTRAP_SHELL_EVENTS:{CONSTELLATION_LOADED:"CONSTELLATION_LOADED"},CONTAINER_EVENTS:{CLOSE_CONTAINER_ITEM:"CLOSE_CONTAINER_ITEM",CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM:"CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM"},DISPLAY_CASE_CREATED_TOASTER:"displayCaseCreatedToaster",DATA_EVENTS:{DATA_OBJECT_CREATED:"dataObjectCreated",DATA_OBJECT_DELETED:"dataObjectDeleted",DATA_OBJECT_UPDATED:"dataObjectUpdated"},FETCH_SUCCESS:"fetchSuccess",REVERSE_COEXISTENCE_EVENTS:{HANDLE_DISCARD:"handleDiscard",CHECK_IS_FORM_DIRTY:"checkIsFormDirty"}},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",ASSIGMENT_COLLAPSED_STATE_PATH:"presentation.templates.CaseView.assignmentWidgetCollapsed",CASE_VIEW_PATH:"presentation.templates.CaseView"},PROMISE_VALUE:{RESOLVE:"resolve",REJECT:"reject"},APP_TYPE:{UIKIT:"uikit",THEME_COSMOS:"themecosmos"},VIEW_TYPE:{PY_EMBEDASSIGNMENT:"pyEmbedAssignment",PY_DETAILS:"pyDetails"}},ot={CONTEXT:"context",AJAXCONTAINER:"primary",VIEW_CONTAINER:"ViewContainer",APP_SHELL:"AppShell",ROOT_CONTAINER:"RootContainer",MODAL_VIEW_CONTAINER:"ModalViewContainer",FLOW_CONTAINER:"FlowContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",OBJECT_PAGE:"ObjectPage",CASE_CREATE_STAGE:"CaseCreateStage",CASE_VIEW:"CaseView",VIEW:"view",CASE_PREVIEW:"CasePreview",CASE_STAGES:"Stages",CASEMESSAGES:"caseMessages",SUGGESTION:"suggestion",PRIMARY:"primary",MODAL:"modal",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_ASSOCIATED_LISTS:"summary_of_associated_lists__",CONTEXT_DATA:"context_data",CONTENT:"content",HTTP:"HTTP",PROPERTY:"PROPERTY",MESSAGES:"messages__",PAGE_ERRORS:"page_level_errors",NO_MESSAGES:"No messages existing",PULSE_REFERENCE:"pulse.messages",IS_LOADING:"isLoading",APPROVED:"Approved",REJECTED:"Rejected",DUPLICATE:"Duplicate",IGNORE:"Ignore",PARAGRAPH:"PARAGRAPH",X_ORIGIN_CHANNEL:"x-origin-channel",AUTHORING_PREVIEW_CONTAINER:"root/authoring-preview",ERROR_FIELD_IN_PAGE:"erroneousInputOutputFieldInPage",ERROR_IN_PAGE_IDENTIFIER:"erroneousInputOutputIdentifier",UI_RESOURCERS:"uiResources",UI_RESOURCERS_CONTEXT_DATA:"uiResources.context_data",ACTION_BUTTONS:"uiResources.actionButtons",RESOURCERS:"uiResources.resources",ROOT:"uiResources.root",CASE_INFO_IS_LOCAL_ACTION:"caseInfo.isLocalAction",DATA:"data",OPTIONS:"options",VIEWS:"uiResources.resources.views",NAVIGATIONS:"uiResources.resources.navigations",COMPONENTS:"uiResources.components",LOCALE_REFERENCES:"uiResources.localeReferences",STATIC_SERVER_URL:"staticServer",APPLICATION_DATA:"data.Application",REFERENCED_USERS:"referencedUsers",CASE_INFO_REFRESH_CONDITIONS:"caseInfo.refreshConditions",FIELD_LEVEL_SUCCESS:"success",FIELD_LEVEL_WARNING:"warning",FIELD_LEVEL_ERROR:"error",HASH_DELIMITER:"~^|^~",NULL_STRING:"null",DATA_PAGE:"DataPage",GET_PAGE_DATA:"getPageData",PROPERTY_ANNOTATION:"@P",ASSOCIATED_PROPERTY_ANNOTATION:"@ASSOCIATED",CLASS_ANNOTATION:"@CLASS",ASSOCIATED:"associated",CLASS_ID:".classID",CLASSID:"classID",READONLY:"readonly",SHARED:"shared",RELOAD_IF_OLDER_THAN:"reloadIfOlderThan",RELOAD_ONCE_PER_INTERACTION:"reloadOncePerInteraction",PY_DETAILS:"pyDetails",LIST_ACTIONS:{INSERT:"INSERT",UPDATE:"UPDATE",DELETE:"DELETE",DELETE_ALL:"DELETE ALL",MOVE:"MOVE",SELECT:"SELECT",DESELECT:"DESELECT"},LIST_ACTIONS_TYPE:{SELECT_DESELECT:"SELECT_DESELECT",DESELECT_ALL:"DESELECT_ALL"},ENV_INFO_KEYS:{APPLICATION_NAME:"APPLICATION_NAME",APPLICATION_DESC:"APPLICATION_DESC",ACCESS_GROUP:"ACCESS_GROUP",USER_NAME:"USER_NAME",USER_ID:"USER_ID",USER_IMAGE:"USER_IMAGE",LOCALE:"LOCALE",TIMEZONE:"TIMEZONE",WORK_GROUP:"WORK_GROUP"},ID:"ID",SCALARLIST:"ScalarList",COREHEADERS:"coreHeaders",SKIPCOREHEADERS:"skipCoreHeaders",COREHEADER_APP_DEBUG_ID:"X-Pega-App-Debug-ID",COREHEADER_APP_DEBUG_LEVELS:"X-Pega-App-Debug-Levels",CONTEXT_DATA_MODAL_VIEW:{IS_MULTI_RECORD_DATA:"context_data.modalView.isMultiRecordData",VIEW_NAME:"context_data.modalView.viewName",PARENT_CONTEXT:"context_data.modalView.parentContext",INTERESTPAGE:"context_data.modalView.interestPage"},...st},it=class{static formatPageReference(e){const t=e?.split(".").map((e=>{if(-1!==e.indexOf("[")){const t=e.indexOf("["),n=e.indexOf("]"),r=e.substring(t+1,n),a=Number(r)+1;return`${e.substring(0,t)}(${a})${e.substring(n+1)}`}return e}));return t.join(".")}};class ct{static mergeDeep(e,t){return Ve()(t,e)}static hasIn(e,t){return qe()(e,t)}static getIn(e,t,n){return Ye()(e,t,n)}static setIn(e,t,n){return Je()(e,t,n)}static deleteIn(e,t){return He()(e,t)}static isObjectEmpty(e){return!e||0===Object.entries(e).length}static isEmpty(e){return Qe()(e)}static deepClone(e){return JSON.parse(JSON.stringify(e))}static copy(e,t){Object.keys(e).forEach((n=>{t[n]=e[n]}))}static isPropertyRef(e){if(!e||-1===e.indexOf("."))return!1;let t=0;const n=e.length;for(;t<n;t+=1)if(-1!==" @#$%=!<>/\\".indexOf(e[t]))return!1;return!0}static isWhenExist(e){const t=["visibility","disabled","readOnly","required"];let n=!1;for(const r in e)t.includes(r)&&"string"==typeof e[r]&&e[r]?.startsWith("@W ")&&(n=!0);return n}static isExpressionExist(e){const t=["disabled","visibility","readOnly","required"];let n=!1;for(const r in e)t.includes(r)&&"string"==typeof e[r]&&e[r]?.startsWith("@E ")&&(n=!0);return n}static buildDataObject(e,t){let n={};const r=n;return t.indexOf(".")>0?t.split(".").forEach((e=>{if(-1!==e.indexOf("[")){const[t]=e.split("[");n[t]=[],n=n[t],e=e.substring(e.indexOf("[")+1,e.lastIndexOf("]"))}n[e]={},n=n[e]})):(n[t]={},n=n[t]),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 a=0;for(;a<r.length-1;a+=1){const e=r[a];e?.toString().length&&!t[e]&&(t[e]={}),t[e]&&(t=t[e])}"object"==typeof n?(t[r[a]]||(t[r[a]]=Array.isArray(n)?[]:{}),zc(t[r[a]],n,{isArrayDeepMerge:!0})):t[r[a]]=n};static getHashedString(e){return(0,Ge.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 ke()(e,t)}static removeExistingDependentProperty(e,t){const n=e.findIndex((e=>e.propertyName===t));n>=0&&e.splice(n,1)}static getFullPropertyReference(e){return Array.isArray(e)?e.filter((e=>!!e)).join("."):null}static iterateLeafNodes(e,t){const n=(e,r=[])=>{Object.entries(e).forEach((([a,s])=>{r.push(Array.isArray(e)?Number(a):a),Array.isArray(s)?(s.forEach(((e,t)=>{t>0&&r.pop(),r.push(t),n(e,r)})),r.pop()):"object"==typeof s?n(s,r):t(r.slice(),s),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 at()}static unflatten(e){const t={};return Object.entries(e).forEach((([e,n])=>{const r=e.split(".");let a;r.reduce(((e,t,s)=>(a=e[t]?e[t]:Number.isNaN(Number(r[s+1]))?r.length-1===s?n:{}:[],e[t]=a,e[t])),t)})),t}static flatten(e,t="",n){Array.isArray(e)?e.forEach(((e,r)=>{ct.flatten(e,`${t}[${r}]`,n)})):"object"==typeof e&&null!==e?Object.keys(e).forEach((r=>{const a=t?`${t}.${r}`:r;ct.flatten(e[r],a,n)})):n[t]=e}static buildInstructionPageReference(e,t){const n=`${e}${t}`.replace(ot.CASE_INFO.CASE_INFO_CONTENT,"").replace(ot.DATA_INFO.DATA_INFO_CONTENT,"");return it.formatPageReference(n)}static buildAttachmentsFormData(e=[]){return e.map((e=>e.delete?{type:"File",attachmentFieldName:e.label,delete:!0,pzInsKey:e.responseProps.pzInsKey}:{type:"File",attachmentFieldName:e.label,category:e.category,ID:e.handle,clientFileID:e.ID}))}static convertPageRefToClipboardPageNotation(e){return e.replace(/\[\d+\]/g,(e=>e.replace(/\d+/g,(e=>parseInt(e,10)+1)).replace("[","(").replace("]",")")))}static convertClipboardPageToPageRefNotation(e){return e.replace(/\(\d+\)/g,(e=>e.replace(/\d+/g,(e=>parseInt(e,10)-1)).replace("(","[").replace(")","]")))}static isString(e){return"string"==typeof e}}const dt=ct,lt={},ut=[],pt=[],ht={},ft={},gt={},yt={},mt={},It={},Et=(e={},t={})=>{0!==Object.keys(t).length?Object.keys(e).forEach((n=>{const r=e[n],a=t[n];if(a){const e=Array.isArray(a)?a:[a];(Array.isArray(r)?r:[r]).forEach((t=>{const n=e.findIndex((e=>e.classID===t.classID));if(-1===n)e.push(t);else{const r={isDeclarativeTarget:!1},a={...e[n],...r,...t};e[n]=a}})),t[n]=1===e.length?e[0]:e}else t[n]=r})):dt.copy(e,t)},At=(e,t="")=>{if(!e)return null;const n=ht[e];if(!n)return null;if(!t)return Array.isArray(n)?[...n]:n;let r;return r=Array.isArray(n)?n.find((e=>e.classID.toLowerCase()===t.toLowerCase())):n.classID.toLowerCase()===t.toLowerCase()||("Page"===n.type||"Page List"===n.type)&&n?.pageClass.toLowerCase()===t.toLowerCase()?n:null,r},_t=(e,t,n)=>{if(!t||!e)return null;if(!e.includes("."))return{...At(e,t),embeddedType:n};const[r,...a]=e.split("."),s=At(r,t);return _t(a.join("."),s?.pageClass,s?.type)},St=e=>{Et(e,ut)},$t=e=>{Et(e,pt)},Ct=e=>{if(e.views&&Et(e.views,ut),e.navigations&&Et(e.navigations,pt),e.personalizations&&Et(e.personalizations,gt),e.insights&&Et(e.insights,yt),e.paragraphs&&Et(e.paragraphs,lt),e.dataTypes&&Et(e.dataTypes,mt),e.datapages&&Et(e.datapages,It),e.fields){Object.keys(e.fields).forEach((t=>{const n=e.fields[t];if(Array.isArray(n)){if(e.datapages&&n.forEach((t=>{t.datasource&&"DataPage"===t.datasource.tableType&&(t.datasource.mode=e.datapages[t.datasource.name].mode)})),1===n.length){const[r]=n;e.fields[t]=r}}else e.datapages&&n.datasource&&"DataPage"===n.datasource.tableType&&(n.datasource.mode=e.datapages[n.datasource.name].mode)}));const{datapages:t={}}=e;Object.keys(t).forEach((e=>{ft[e]=t[e]}))}Et(e.fields,ht)},bt=e=>ut[e],Pt=e=>pt[e],vt=e=>e in ft?ft[e]:null,Ot=e=>e in gt?gt[e]:null,Tt=e=>e in yt?yt[e]:null,Rt=e=>{const t={};return Object.keys(ht).forEach((n=>{const r=ht[n];let a;Array.isArray(r)?a=r.find((t=>e===t.classID)):e===r.classID&&(a=r),a&&(t[n]=dt.deepClone(a))})),t},Nt=(e,t)=>{const n=At(e,t)?.datasource?.parameters;return n?dt.deepClone(n):null},Dt=(e,t)=>{let n=null;const r=lt[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?dt.deepClone(n).content:null},xt=e=>{if(e in mt){const{savableDataPage:t}=mt[e];return t}return null},wt=e=>{const t=[];let n=[];if(e in It){const r=It[e].classID,{isAlternateKeyStorage:a}=It[e];return a?It[e].parameters.forEach((e=>t.push({keyName:e.name,isAlternateKeyStorage:a,linkedField:e.linkedField}))):(n=mt[r].classKeys,n.forEach((e=>t.push({keyName:e,isAlternateKeyStorage:a})))),t}return null},Mt=e=>{if(e in mt){const{lookupDataPage:t}=mt[e];return t}return null},Lt=e=>{if(Object.prototype.hasOwnProperty.call(mt,e)){const{lookupDataPageInfo:t}=mt[e];return t}return null},jt=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={}){dt.copy(e,this.componentMap)}mergeOverrideMap(e={}){dt.copy(e,this.overrideMap)}getOverrideMap(){return this.overrideMap}getLazyMap(){return this.lazyMap}},Ut=new class{constructor(){this.handlers={}}registerHandler(e,t){this.handlers[e]=t}getHandler(e){return this.handlers[e]}},kt=class{static handleAnnotation(e,t){const n=e.indexOf(" "),r=-1===n?e:e.substring(0,n),a=Ut.getHandler(r);return a?a(e.substring(n+1),t):e}static trimAnnotation(e){if(!dt.isString(e))return e;const t=e.indexOf(" "),n=e.substring(0,t),r=e.substring(t+1);return Ut.getHandler(n)?r:e}static handleComponentMapping(e,t,n){const r=jt.getComponent(t.type);if(!r||!r.mapping)return;const a=r.mapping(t.config);if(a&&a["@map"]){const t=a["@map"],{source:r}=t;if(!r)return;const s=n.getValue(r);if("function"==typeof t.advanced)t.advanced(e,s);else{const n=t.inputs_map;e[t.output_property]=[];const r=e[t.output_property];s.forEach((e=>{const t={};Object.keys(n).forEach((r=>{let a=n[r];a&&0===a.indexOf(".")?(a=a.substring(1),t[r]=e[a]):t[r]=a})),r.push(t)}))}}}static getPropertyName(e){if(e&&dt.isString(e)){const t=e.startsWith(ot.PROPERTY_ANNOTATION),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getLeafPropertyName(e){if(dt.isString(e)&&e?.startsWith(ot.PROPERTY_ANNOTATION)){const t=this.getPropertyName(e),n=t.split(".");return n.length<2?t:n.pop()}return e}static isProperty(e){return dt.isString(e)&&!!e?.startsWith(ot.PROPERTY_ANNOTATION)}},Ft="SET_PROPERTY",Vt="REPLACE_PROPERTY",Gt="FIELD_CHANGE",Bt="LOAD_VIEW",Ht="SHOW_PAGE",Wt="SHOW_DATA",qt="SHOW_INSIGHT",zt="SHOW_DASHBOARD",Yt="SET_LOADING",Kt="RESET_LOADING",Jt="SET_SHARED_PROPERTY",Xt="CREATE_WORK",Qt="OPEN_WORK_BY_HANDLE",Zt="UPDATE_DOCUMENT",en="FINISH_ASSIGNMENT",tn="CANCEL_ASSIGNMENT",nn="OPEN_ASSIGNMENT",rn="MERGE_DATA",an="REMOVE_ITEM",sn="SHOW_HISTORY",on="ERROR",cn="INIT_CONTAINERS",dn="RESET_CONTAINERS",ln="ADD_CONTAINER_ITEM",un="REMOVE_CONTAINER_ITEM",pn="ADD_TRANSIENT_ITEM",hn="UPDATE_TRANSIENT_DATA",fn="REMOVE_TRANSIENT_ITEM",gn="REMOVE_ALL_TRANSIENT_ITEMS",yn="CLEAR_TRANSIENT_DATA",mn="PURGE_TRANSIENT_DATA",In="ACTIVATE_CONTAINER_ITEM",En="UPDATE_CONTAINER_ITEM",An="UPMERGE_AND_REMOVE_CONTAINER_ITEM",_n="REPLACE_CONTAINER_ITEM",Sn="ACTIVATE_MODAL_CONTAINER_ITEM",$n="REMOVE_CONTAINER",Cn="ADD_SUGGESTION_CONTEXT",bn="showView",Pn="showData",vn="showInsight",On="showDashboard",Tn="openWorkByHandle",Rn="openAssignment",Nn="createNewWork",Dn="SHOW_CANCEL_ALERT",xn="openLocalAction",wn="openProcessAction",Mn="caseWideActions",Ln="openBulkAction",jn="ADD_MESSAGES",Un="CLEAR_MESSAGES",kn="RESET_STORE",Fn="FETCH_DATAPAGE",Vn="ADD_SHARED_DATA",Gn="REMOVE_SHARED_DATA",Bn="LIST_ACTION",Hn="DELETE_CASE_SUMMARY",Wn="ALTER_BLOCKING_ACTION_COUNT",qn="OPEN_EMBEDDED_DATA_MODAL",zn="SUBMIT_EMBEDDED_DATA_MODAL",Yn="FILL_FORM_WITH_AI";let Kn,Jn,Xn;const Qn=e=>{e&&(Kn=e=e||{"base-server":"http://localhost:1080/prweb/","data-end-point":"api/v1/stream/data","action-end-point":"api/v1/stream/action"},Kn.BASEURL=e.server,Kn.ACTIONURL=e["action-end-point"],Kn.DATAURL=e["data-end-point"],Xn=e.reAuthUrl)},Zn=()=>Xn,er=()=>Kn.BASEURL,tr=e=>{Jn=e},nr={},rr=new Map,ar=e=>{let t=ot.EMPTY_STRING;return t=e&&e.includes(ot.FORWARD_SLASH_STRING)?e.substring(0,e.lastIndexOf("/")):e,t},sr=(e,t,n=!1)=>{let r=ot.EMPTY_STRING;if(t&&e){let a=`${t}${ot.FORWARD_SLASH_STRING}${e}`;const s=xo(a);if(s||t!==ot.APP.APP&&t!==ot.APP.ROOT)if(s){if(n&&nr[a])return r=`${a}${ot.UNDERSCORE_STRING}${nr[a]}`,r;nr[a]?nr[a]+=1:nr[a]=1,r=`${a}${ot.UNDERSCORE_STRING}${nr[a]}`}else r=sr(e,ar(t));else a=`${t}${ot.FORWARD_SLASH_STRING}${ot.PRIMARY}`,nr[a]?nr[a]+=1:nr[a]=1,r=`${a}${ot.UNDERSCORE_STRING}${nr[a]}`}return r},or=(e,t)=>{if(e&&t){const n=(rr[t]?.[e]??0)+1;return rr[t]||(rr[t]={}),rr[t][e]=n,`${t}${ot.FORWARD_SLASH_STRING}${e}_${n}`}return""},ir=(e,t)=>{if(e&&t){const n=rr[t]?.[e];return n?`${t}${ot.FORWARD_SLASH_STRING}${e}_${n}`:or(e,t)}return""},cr=e=>{let t=ot.EMPTY_STRING;return e&&(t=e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("_")).toLowerCase()),t},dr=(e,t)=>{if(null===e)return t;const[,n]=t.split(ot.FORWARD_SLASH_STRING);return e+ot.FORWARD_SLASH_STRING+n},lr=e=>{const t=e.indexOf(ot.FORWARD_SLASH_STRING),n=e.lastIndexOf(ot.FORWARD_SLASH_STRING);return t===n?e:e.substring(0,n)},ur=e=>{const t=e.split(ot.FORWARD_SLASH_STRING);return 2===t.length?e:t[0]+ot.FORWARD_SLASH_STRING+t[2]},pr=/{(.*?)}/i,hr=/{(.*?)}/g,fr=e=>null!==e.match(pr),gr=e=>(e&&("/"===e[0]&&(e=e.substring(1,e.length)),"/"===e[e.length-1]&&(e=e.substring(0,e.length-1))),e),yr=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`}},mr=()=>gr(window.location.pathname),Ir=(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)}},Er=class{static remoteCaseMapping={};static setRemoteCaseMapping=e=>{this.remoteCaseMapping=e};static getRemoteCaseMapping=()=>this.remoteCaseMapping;static getRemoteCase=e=>this.remoteCaseMapping[e];static isRemoteCase=e=>!!(e&&this.remoteCaseMapping&&this.remoteCaseMapping[e]);static getRemoteHeaderByContext=e=>Ec.getProperty(".RemoteSystemID",ot.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))}},Ar=new class{constructor(){this.routingInfo,this.appRoutes,this.appRoutesMeta,this.appName,this.appAlias,this.orgName,this.reqContextName,this.reqServletPath,this.defaultViewUrlPath,this.staticRoutesList=[],this.dynamicRoutesList=[],this.appDelimeter,this.reqServletNameReal,this.bDefaultPortal,this.portalName}init=(e,t)=>{e&&e.routes&&e.routesMeta?(this.routingInfo=e,this.appRoutes=e.routes,this.appRoutesMeta=e.routesMeta,this.reqContextName=e.reqContextName,this.reqServletPath=e.reqServletPath,this.appName=e.appName,this.appAlias=e.appAlias,this.orgName=e.orgName,this.defaultViewUrlPath=t,this._createStaticDynamicRoutesList(this.appRoutes),this.appDelimeter=e.appDelimeter,this.reqServletNameReal=e.pxReqServletNameReal,this.bDefaultPortal=e.isDefaultPortal,this.portalName=e.portalName,this.ignoreFromEndPoint=["reactMode=dev","reactMode=prod"]):console.error("Routing info is not appropriate. Missing routes and routesMeta objects in routingInfo",JSON.stringify(e))};addRoutes=e=>{e?.routes&&e.routesMeta&&(this.appRoutes={...this.appRoutes,...e.routes},this.appRoutesMeta={...this.appRoutesMeta,...e.routesMeta},this.routingInfo.routes={...this.routingInfo.routes,...e.routes},this.routingInfo.routesMeta={...this.routingInfo.routesMeta,...e.routesMeta},this._createStaticDynamicRoutesList(e.routes))};setDefaultRoute=e=>{this.defaultViewUrlPath=e};_createStaticDynamicRoutesList=e=>{Object.keys(e).forEach((e=>{fr(e)?this.dynamicRoutesList.push(e):this.staticRoutesList.push(e)}))};_getDynamicKeyName=e=>{const t=e.indexOf("{")+1,n=e.lastIndexOf("}");return e.slice(t,n)};isDefaultPortal=()=>"false"!=`${this.bDefaultPortal}`;getPortalName=()=>this.portalName;getApplicationPath=()=>`${this.getReqContextName()}/${this.getReqServletNameReal()}`;getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>gr(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,""),gr(e)};getEndPointInfo=e=>{this.ignoreFromEndPoint.forEach((t=>{e.includes(t)&&(e=e.substring(0,e.indexOf(t)))}));let t=this.processUrl(e,!0),n=this._getMatchedRouteInRoutingTable(t);void 0===n&&(t=this.processUrl(this.defaultViewUrlPath,!0),n=this._getMatchedRouteInRoutingTable(t));const{routeKey:r,payload:a}=this.appRoutes[n],{reqType:s,endPoint:o,params:i}=this.appRoutesMeta[r].restApi,c={...a},{caseClassName:d,caseID:l}=c;if(Er.isRemoteCase(d)){const{RemoteClassGroup:e,RemoteSystemID:t}=Er.getRemoteCase(d);c.caseID=l?.replace(d,e?.toUpperCase()),c.RemoteSystemID=t}const u={routeKey:r,requestType:s,routeEndpoint:o,payload:{...i,...c}};return this._resolveRoute(u,this.processUrl(e,!1),n)};getSemanticURL(e,t,n){return this._buildSemanticURL(e,t,n)}getResolvedSemanticURL(e,t,n={}){const r=this.getSemanticURL(e,t,n);let a=r;fr(r)&&r.match(hr).forEach((e=>{const t=this._getDynamicKeyName(e);n[t]&&(a=a.replace(e,n[t]))}));const s=kr(a),o=new URL(s);return!this.getPortalName()||o.searchParams.toString().indexOf("portal=")>=0||o.searchParams.append("portal",this.getPortalName()),o.toString()}_buildSemanticURL(e,t,n){const{urlPattern:r}=this.appRoutesMeta[e],a=r.split("/").length,s=r.split("/"),o=Object.keys(this.appRoutes).filter((e=>a===e.split("/").length)).filter((e=>{const t=e.split("?")[0].split("/");return s.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,a={...n};delete a.dataViewName,delete a.dataContext;const s=r.dataViewKeys||r.dataContextParameters||{},o=Object.keys(t).every((e=>t[e]===r[e]));return!!o&&(dt.isEmpty(s)||dt.isEmpty(a)?o:Object.keys(a).every((e=>Object.prototype.hasOwnProperty.call(s,e))))}));return i?this._getQueryParamsResolvedURL(i,n):""}_getQueryParamsResolvedURL(e,t,n=!1){const[r,a]=e.includes("?")?e.split("?"):[e];if(a){const e={};for(const[n,r]of Object.entries(t))e[n.toLowerCase()]=r;const s=new URLSearchParams(a),o={};for(const[r,a]of s.entries())if("string"==typeof a&&fr(a)){const s=this._getDynamicKeyName(a);o[r]=n?t[s]||e[s.toLowerCase()]:t[s]}else"string"==typeof a&&(o[r]=a);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:a}=this.appRoutesMeta[e].restApi;t&&t.params&&t.params.pageName&&(a=`${a}&pageName=${t.params.pageName}`);const s=a.match(hr);if(s)for(let e=0;e<s.length;e+=1){const n=s[e].replace("{","").replace("}",""),r=new RegExp(s[e],"g");a=a.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:a,reqType:n,body:e}}return{restApi:a,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=[],[a,s]=t.includes("?")?t.split("?"):[t],[o,i]=n.includes("?")?n.split("?"):[n],c=a.split("/"),d=o.split("/"),l={};for(let e=0;e<d.length;e+=1)r[e]=d[e],fr(d[e])&&(l[this._getDynamicKeyName(d[e])]=c[e],r[e]=c[e]);const u=this._getQueryParamsObject(i),p=this._getQueryParamsObject(s),h={};for(const[e,t]of Object.entries(p))h[e.toLowerCase()]=t;for(const e in u)fr(u[e])?l[e]=p[e]||h[e.toLowerCase()]:l[e]=u[e];let f;s&&(f=this._getQueryParamsResolvedURL(n,p,!0));const g=this._resolvePayload(e,l,n);return{...this._resolveRouteEndPoint(g,n),urlPath:f||r.join("/")}};_resolveRouteEndPoint=(e,t)=>{let{routeEndpoint:n}=e;if(!fr(n))return e;const r={};if(r[t]=e,void 0!==e.payload){const t=n.match(hr);for(let a=0;a<t.length;a+=1){const s=t[a],o=this._getDynamicKeyName(s);if(void 0!==e.payload[o]){const t=e.payload[o];n=n.replace(s,t)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${o}} in routeEndpoint- ${o} is missing in payload`,r)}}else this._sendWarningAndErrorMessages("Unable to resolve dynamic token(s) in routeEndpoint- payload is missing in routing table for-",r);return{...e,routeEndpoint:n}};_resolvePayload=(e,t,n)=>{if(void 0===e.payload)return e;const r={...e.payload,...this._resolvePayloadRecursive(e.payload,t)};return{...e,payload:r}};_resolvePayloadRecursive(e,t){const n={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let a=e[r];if("string"==typeof a&&fr(a)){const e=a.match(hr);for(let n=0;n<e.length;n+=1){const r=e[n],s=this._getDynamicKeyName(r);if(void 0!==t[s]){const e=t[s];a=a.replace(r,e)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${s}} in payload- {${s}} is missing in semantic url construct`)}n[r]=a}else"object"==typeof a&&(n[r]=this._resolvePayloadRecursive(a,t))}return n}_getMatchedRouteInRoutingTable=e=>{let t=this._findMatchedRouteInStaticList(e);return void 0!==t?t:(t=this._findMatchedRouteInDynamicList(e),void 0!==t?t:void 0)};_findMatchedRouteInStaticList=e=>this.staticRoutesList.find((t=>t.toLowerCase()===e.toLowerCase()));_findMatchedRouteInDynamicList=e=>{const[t,n]=e.includes("?")?e.split("?"):[e],r=t.split("/");return this.dynamicRoutesList.find((e=>{const[t,a]=e.includes("?")?e.split("?"):[e],s=t.split("/");if(s.length!==r.length)return!1;let o=0;for(o=0;o<s.length;o+=1){const e=s[o].toLowerCase();if(!fr(e)&&e!==r[o]&&yr(e)!==r[o])return!1}if(a){const e=new URLSearchParams(n),t=new URLSearchParams(a),r=new Set,s=new Set;for(const t of e.keys())r.add(t.toLowerCase());for(const e of t.keys())s.add(e.toLowerCase());if(s.size!==r.size)return!1;for(const e of r)if(!s.has(e))return!1}return!0}))};_sendWarningAndErrorMessages=(e,t)=>{Ir(e,t,"warning"),Ir("Error in Generated Routing Table",null,"error"),Ir("Back | Forward for this page may NOT work as intended",null,"warning"),Ir("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},_r=Ar,Sr=(e,t)=>{if(!e||!t)return null;let n,r=ot.EMPTY_STRING;return t&&(r=`${t}${ot.FORWARD_SLASH_STRING}${e}`,n=xo(r),n||-1!==t.indexOf("/")?n||(r=Sr(e,ar(t))):r=`${t}${ot.FORWARD_SLASH_STRING}${e}`),r},$r=(e,t)=>{const n=Sr(e,t);return n&&xo(n)?xo(n):{}},Cr=(e,t)=>_r.getSemanticURL(bn,{page:e},t),br="replace",Pr=["portal","noPortal","preview","debug","devtool"];let vr="",Or="Home",Tr="",Rr=!0;const Nr=e=>(Rr=e,Rr),Dr=()=>Rr,xr=(e,t,n)=>_r.getSemanticURL(e,t,n),wr=(e,t)=>_r.getRestEndPoint(e,t),Mr=(e,t)=>{let n=er();const r=wr(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):null},Lr=(e,t,n)=>{const{root:r,resources:a}=e,{views:s}=a,{config:o}=r;let i="";if(n)i=n;else{const e=s[o.name];let t=e;Array.isArray(e)&&e.length>0&&([t]=e),i=t.config.urlPath}const c=i.match(hr);if(c){const e=dt.getIn(t,o.context);i=i.replace(c[0],e.pyID)}return"/"===i[0]&&(i=i.substring(1,i.length)),{pxURLPath:i,historyAction:"add"}},jr=(e,t,n)=>{let r,a;r=gr(t)?`${e}/${t}`:e;const s=gr(n.pxURLPath);s&&(r=`${r}/${s}`);try{a=new URL(r).searchParams,r=r.includes("?")?r.split("?")[0]:r}catch(e){return console.log("Invalid url",e),""}const o=r.split("/"),i=o[o.length-1],c=new URLSearchParams(window.location.search);if(i.toLowerCase()!==Or.toLowerCase()||c.has("noPortal")||(r=`${e}/${t}`),!_r.isDefaultPortal()){const e=_r.getPortalName();c.has("portal")?c.set("portal",e):c.append("portal",e)}return a=((e,t)=>{for(const[n,r]of t.entries())!e.has(n)&&Pr.includes(n)&&e.append(n,r);return e})(a,c),a.toString()&&(r+=`?${a.toString()}`),r},Ur=(e,t=!1,{urlPathObjParam:n,infoParam:r,optionsParam:a})=>{let s,o,i;if(!1===window.PCore.getBehaviorOverride("dynamicSemanticUrl"))return;if(t)s=n,o=r,i=a;else{const{uiResources:t,data:r}=e;({options:i}=e),s=n&&n.pxURLPath&&fr(n.pxURLPath)?Lr(t,r,n.pxURLPath):n||Lr(t,r),o=_r.getEndPointInfo(s.pxURLPath),s.pxURLPath=o.urlPath}const c=jr(vr,_r.getApplicationPath(),s),{title:d}=((e,t,n)=>{if(e=(e=>{let t=e.split(" ");return t=t.map((e=>e.charAt(0).toUpperCase()+e.slice(1))),t.join(" ")})(e=e&&""!==e?e:_r.getApplicationName()),n===`${vr}/${t}/`)return{title:e};const r=new URL(n).pathname.replace(`${t}/`,""),a=r.split("/");return/\d/.test(r)?{title:`${e} - ${a[a.length-1]}`}:{title:`${e} - ${a[0]}`}})(Tr,_r.getApplicationPath(),c),l=((e,t)=>(void 0!==e&&(e.options=t),{stateObj:e}))(o,{...i,title:d});"add"===s.historyAction?((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")}})(l,d,c):s.historyAction===br&&((e,t,n)=>{try{window.history.replaceState(e,t,n)}catch(e){throw new Error("Error- Unable to Replace Browser History")}})(l,d,c)},kr=e=>{const t={pxURLPath:e};return jr(vr,_r.getApplicationPath(),t)},Fr=e=>{const{uiResources:t}=e;Dr()&&(e.directUrlUpdation||(e=>{if(e&&e.root){const{root:t}=e,{resources:n}=e,{views:r}=n,a=t.config,s=a.type,o=a.name;if("VIEW"===s.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))&&(e=>{let t=null;e.directUrlUpdation&&(t={historyAction:"add",pxURLPath:""},t.pxURLPath=e.semanticURL),Ur(e,!1,{urlPathObjParam:t,infoParam:null,optionsParam:null})})(e)},Vr=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},Gr=e=>{const t=(e=>e.state?e.state.stateObj:null)(e);t&&jc(c.showHistory(Vr(t)))},Br=()=>_r.getApplicationPath()!==mr(),Hr=(e,t=!1)=>{var n;vr=e.domain,!1===t&&Dr()&&(n=Gr,window.addEventListener("popstate",(e=>n(e))),window.onbeforeunload=()=>null),_r.init(e,Or)},Wr=new class{error=e=>{console.error(e)}},qr=new class{constructor(){this.xray=!1,this.onXRayCallback=null,this.xrayRuntime=new class{constructor(e){this.xrayInfo={},this.xRayDebugger=e}startXRay(){if(!this.xRayDebugger.xray)return null;const e=`${Date.now()+Math.random()}`;return this.xrayInfo[e]={startTime:Date.now()/1e3},e}startXRayRestApi(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],restApisTime:{...this.xrayInfo[e]?this.xrayInfo[e].restApisTime:{},[t]:Date.now()}})}stopXRayRestApi(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],restApisTime:{...this.xrayInfo[e]?.restApisTime,[t]:(Date.now()-this.xrayInfo[e]?.restApisTime[t])/1e3}})}updateXRay(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],...t})}stopXRay(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],totalTime:Date.now()/1e3-this.xrayInfo[e].startTime},t().setXRayInfo(this.xrayInfo[e]),delete this.xrayInfo[e])}}(this),this.isPreview=!1,this.debugLevels="vcv=1;tracer=0;log=0"}onXRay(e){this.onXRayCallback=e}toggleXRay(e){this.xray=e,this.xrayRuntime.xrayInfo={},null!==this.onXRayCallback&&this.onXRayCallback(e)}enableXRay(){this.toggleXRay(!0)}disableXRay(){this.toggleXRay(!1)}toggle(){this.xray?this.toggleXRay(!1):this.toggleXRay(!0)}isXRayOn(){return this.xray}getXRayRuntime(){return this.xrayRuntime}setPreviewMode(){this.isPreview=!0}getPreviewMode(){return this.isPreview}enableTracer=()=>{this.debugLevels="vcv=1;tracer=1;log=0"};disableTracer=()=>{this.debugLevels="vcv=1;tracer=0;log=0"};getDebugLevels=()=>this.debugLevels},zr=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}setEnvironmentInfo(e){this.environmentInfoObject=e}getOperatorName(){return this.environmentInfoObject.pxOperator.pyUserName}getOperatorWorkGroup(){return this.environmentInfoObject.pxOperator.pyWorkGroup}getOperatorIdentifier(){return this.environmentInfoObject.pxOperator.pyUserIdentifier}getOperatorImageInsKey(){return this.environmentInfoObject.pxOperator.pyImageInsKey}getApplicationLabel(){return this.environmentInfoObject.pxApplication.pyLabel}getPortalName(){return _r.getPortalName()}getApplicationName(){return this.environmentInfoObject.pxApplication.pyRuleName}getUseLocale(){return this.environmentInfoObject.pxLocale.pyUseLocale}getAccessGroup(){return this.environmentInfoObject.pxOperator.pyAccessGroup}getTimeZone(){return this.environmentInfoObject.pxLocale.pyTimeZone}getTheme(){return this.themeOverrides}setTheme(e){return this.themeOverrides=e,this.themeOverrides}getBrandingInfo(){return this.brandingInfo}setBrandingInfo(e){return this.brandingInfo=e,this.brandingInfo}setLocale(e){const t=e.replaceAll("-","_").split("_").slice(0,2);this.locale=t.join("-"),this.environmentInfoObject&&this.environmentInfoObject.pxLocale&&(this.environmentInfoObject.pxLocale.pyUseLocale=this.locale)}getLocale=()=>this.locale;getEnvironmentKeys(){return Object.keys(ot.ENV_INFO_KEYS)}getMaxAttachmentSize(){return this.environmentInfoObject.pxApplication.pyMaxAttachmentSize}getDefaultOperatorDP(){return this.environmentInfoObject.pxApplication.pyDefaultOperatorDP}getDocumentUrlDP(){return this.environmentInfoObject.pxApplication.pyDocumentUrlDP}getCaseInstanceListDP(){return this.environmentInfoObject.pxApplication.pyCaseInstanceListDP}getBaseLocale(){return this.environmentInfoObject.pxApplication.pyBaseLocale||"en-US"}getRenderingMode(){return this.environmentInfoObject.renderingMode}getBuiltOnAppNames(){return this.environmentInfoObject.pxApplication.pyBuiltOnApplications}setPreviewMode(){qr.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.features=t&&e?{...t,...e}: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}},Yr="text/javascript",Kr=new class{constructor(){this.loaderObj={},this.staticServerURL="",this.appStaticUrl=null,this.pegaOnlyUrl=!1,this.loadedAssets={},this.componentsConfig=null,this.appAlias="",this.b2sJWT=null}getTypes={SCRIPT:"script",STYLE:"link"};getStaticServerUrl(){return this.staticServerURL}async getThemeSchemaJSON(){const e=`${this.staticServerURL}themeOverrides.schema.json`;return fetch(e).then((e=>e.json()))}getConstellationServiceUrl(){return"/"===this.staticServerURL.charAt(this.staticServerURL.length-1)?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=zr.getBuiltOnAppNames(),a=this.loadAndFilterPegaComponentsConfig(e,r),s=this.loadAndCustomerComponentsConfig(t),o=this.fetchSDKComponent(t),i=[];if(await Promise.all([a,s,o]).then((e=>{const t=this.mergeComponentList(e);i.push(...t)})),n.alternateDesignSystemURL&&1===i.length){const r=await this.getSvcComponentsConfigADS(e,t,n);i[0].alternateDesignSystemConfig=r}return{data:{components:i}}}mergeComponentList=(e=[])=>{const[t=[],n=[],r=[]]=e,a=[...t,...n];return this.appStaticUrl?a.map((e=>{const{name:t,type:n,subtype:a}=e,s=r.reduce(((e,r)=>(t===r.name&&n===r.type&&a===r.subtype&&(e=r),e)),{});return Object.keys(s).length>0?{...e,alternateDesignSystemConfig:{...s}}:e})):a};async fetchSDKComponent(e){if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const t=`${this.appStaticUrl}v102/${this.appAlias}/componentslist-ext${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}return Promise.resolve([])}async loadAndFilterPegaComponentsConfig(e,t){return this.loadPegaComponentsConfig().then((()=>{const n=[];return this.componentsConfig&&this.componentsConfig.forEach((r=>{let a=!0;e.forEach((e=>{Array.isArray(r[e.field])?r[e.field].includes(e.value)||(a=!1):r[e.field]!==e.value&&(a=!1)})),a&&this.checkForBuiltOnSupport(t,r.allowedApplications)&&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((e=>{this.componentsConfig=e})).catch()}else e=Promise.resolve();return e}async loadAndCustomerComponentsConfig(e){let t=null;if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const n=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;t=fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}else t=Promise.resolve([]);return t}checkForBuiltOnSupport(e,t){if(!e||!t||0===e.length||0===t.length)return!0;const n=e.split(",");return 0===n.length||n.some((function(e){return-1!==t.indexOf(e)}))}async getSvcComponentsConfigCombinedUrl(e,t,n){const r=`${this.staticServerURL}v102/${this.appAlias}/componentslist${t}`,a=await fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>({data:e})));if(n.alternateDesignSystemURL&&1===a?.data?.components?.length){const r=await this.getSvcComponentsConfigADS(e,t,n);a.data.components[0].alternateDesignSystemConfig=r}return a}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()}getSvcLocale(e,t){const n=`${this.appStaticUrl}v102/${this.appAlias}/locales/${e}/${t}`;return fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}})}getSvcComponent(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>{if(!e.ok)throw Error(e.statusText);return e})).then((e=>e.text())).then((e=>e)).catch()}loadSvcComponent(e){return new Promise(((t,n)=>{this.getSvcComponent(e).then((r=>{const a=document.createElement("script");a.src=window.URL.createObjectURL(new Blob([r],{type:Yr})),a.onload=()=>t(e),a.onerror=()=>n(e),document.head.appendChild(a)})).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={};return t=e?this.loaderObj[e]:(e,t)=>new Promise(((n,r)=>{const a=document.createElement(t);"script"===t?(a.onload=()=>{n(e)},a.onerror=()=>{r(e)},a.type=Yr,a.charset="UTF-8",a.async=!1,a.src=e):(a.type="text/css",a.rel="stylesheet",a.href=e),document.head.appendChild(a)})).catch((e=>{console.log(e)})),t}loadAssets(e,t){const{isDevServerMode:n}=t;if(!e)return Promise.resolve();const r=[];return e.forEach((e=>{const t=Object.keys(e)[0];let a=n?Object.values(e)[0]:this.getStaticServerUrl();a=a.endsWith("/")?a:`${a}/`,this.loadedAssets[t]||(-1!==t.indexOf(".js")?r.push(this.getLoader()(a+t,this.getTypes.SCRIPT)):-1!==t.indexOf(".css")&&this.getLoader()(a+t,this.getTypes.STYLE),this.loadedAssets[t]=!0)})),Promise.all(r)}getAssetsFromIsolations(e){const t=this.b2sJWT.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(window.atob(t).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")),r=JSON.parse(n)?.tenant_id,{restApi:a,reqType:s}=wr("getAssetsFromIsolations",{isolationID:r,assetPath:e})||{},o=`${this.appStaticUrl}${a}`;return fetch(o,{method:s,credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob()))}};class Jr{GENERIC_BUNDLE_KEY="@BASECLASS!GENERIC!PYGENERICFIELDS";BASE_CLASS="@BASECLASS";DATA_PAGE_LOCALECONTEXT="datapage";constructor(){this.localeStore={},this.getLocaleValue=this.getLocaleValue.bind(this)}setLocaleForRule=(e,t)=>{const n=e.LocaleContent||e;this.localeStore[t]=n};getLocaleForRule=(e=this.GENERIC_BUNDLE_KEY)=>this.localeStore[e];resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,t,n=this.GENERIC_BUNDLE_KEY){t=t?`${t}.fields`:"fields";const r=this.localeStore[n.toUpperCase()];return(r?dt.getIn(r,t,{}):{})[e]||e}getParagraphLocaleValue(e,t,n){const r=this.localeStore[e.toUpperCase()];return r?decodeURIComponent(atob(r.content).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")):PCore.getMetadataUtils().getParagraph(n,t)}static async getLocaleJsons(e){const t=zr.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:Kr.getSvcLocale(t,`${e}.json`)}))),a=await Promise.allSettled(r.map((e=>e.promise)));await Promise.all(a.map((async(e,t)=>{if("fulfilled"===e.status){const a=r[t];let s;try{s=await e.value.json()}catch{s=null}s&&n.push({localeRuleKey:a.localeRuleKey,jsonData:s})}})))}return n}async loadLocaleResources(e){const t=zr.getUseLocale(),n=zr.getBaseLocale();if(zr&&t&&(t!==n||"en-US"!==n)&&e?.length>0)try{(await Jr.getLocaleJsons(e)).forEach((e=>{this.setLocaleForRule(e.jsonData,e.localeRuleKey)}))}catch(e){console.warn(e)}}setTimezone(e){this.timezone=e}getTimeZoneInUse(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}}const Xr=new Jr;class Qr{constructor(e,t,n){this._grammar=e,this._state="expectOperand",this._tree=null,this._exprStr=t||"",this._endState=n||{}}static _setParent(e,t){Object.defineProperty(e,"_parent",{value:t,writable:!0})}_addToken(e){const t=oa[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=sa[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}=oa[this._state];this._subParser=new Qr(this._grammar,e,t)}_endSubExpression(){oa[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,Qr._setParent(e,this._position)):this._tree=e,this._position=e}}const Zr=Qr,ea="identifier",ta={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e&&t},na={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e||t},ra={">":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>t},">=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>=t},"<":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<t},"<=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<=t},"==":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e===t},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e!==t},"!":{operatorType:"unaryOperator",precedence:999,evaluate:e=>{let{value:t}=e;return"true"!==t&&"false"!==t||(t="true"===t),!t}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":ta,AND:ta,and:ta,"||":na,OR:na,or:na,CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.indexOf(t)>-1},NOT_CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>-1===e.indexOf(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)}},aa={BinaryExpression:function(e){const t=[];return t[0]=this.evaluateAST(e.left),t[1]=e.right?this.evaluateAST(e.right):"",this._grammar[e.operator].evaluate(t[0],t[1])},identifier:function(e){return this._localDataObject?this._localDataObject[e.value.substring(1)]:this._context.getValue(e.value)},literal:function(e){return"true"===e.value||"false"===e.value?"true"===e.value:e.value},UnaryExpression:function(e){return this._grammar[e.operator].evaluate(e.right)}},sa={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:e.value})},binaryOperator:function(e){const{precedence:t}=this._grammar[e.value];let n=this._position._parent;for(;n&&n.operator&&this._grammar[n.operator].precedence>=t;)this._position=n,n=n._parent;const r={operationType:"BinaryExpression",operator:e.value,left:this._position};Zr._setParent(this._position,r),this._position=n,this.setPositionInAST(r)},identifier:function(e){const t={operationType:ea,value:e.value};this.setPositionInAST(t)},literal:function(e){this.setPositionInAST({operationType:"literal",value:e.value})},subExpression:function(e){this.setPositionInAST(e)}},oa={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:ea},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:sa.subExpression,endStates:{closeParenthesis:"expectBinOp"}}},ia=["binaryOperator","unaryOperator","openParenthesis"],ca=/^\s*$/,da=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,la=/\\\\/,ua=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],pa=["[a-zA-Z_.\\$][(0-9)a-zA-Z0-9_.\\$]*","[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}|[0-9]{4}-[0-9]{2}-[0-9]{2}","(?:(?:[0-9]*\\.[0-9]+)|[0-9]+)"],ha=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;class fa{constructor(e){this._grammar=e}static _isNegative(e){return ia.some((t=>t===e[e.length-1].tokenType))}static _isWhitespace(e){return!!e.match(ca)}static _createWordboundary(e){return(e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).match(da)&&(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(la,"\\")}_getSplitRegex(){if(!this._splitRegex){const e=Object.keys(this._grammar).sort(((e,t)=>t.length-e.length)).map((e=>fa._createWordboundary(e)),this);this._splitRegex=new RegExp(`(${[ua.join("|"),e.join("|"),pa.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){const t=this._getSplitRegex();return e.split(t).filter((e=>e))}_createToken(e){const t={tokenType:"literal",value:e,element:e};return'"'===e[0]||"'"===e[0]?t.value=fa._unquote(e):e.match(ha)?t.value=parseFloat(e):"true"===e||"false"===e?t.value="true"===e:this._grammar[e]?t.tokenType=this._grammar[e].operatorType:e.match(da)&&(t.tokenType="identifier"),t}_getTokens(e){const t=[];let n=!1;for(let r=0;r<e.length;r+=1)fa._isWhitespace(e[r])?t.length&&(t[t.length-1].element+=e[r]):"-"===e[r]&&fa._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 ga=fa,ya=(e,t)=>{const n=e.replace(/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,(e=>e.replace("=","==")));return new class{constructor(e,t){this._grammar={...ra},this._expression=e,this._ast=null,this._context={},this._localDataObject=t}buildAST(){const e=new ga(this._grammar).tokenize(this._expression),t=new Zr(this._grammar);return t.addTokens(e),this._ast=t.buildAst(),this}evaluate(e){return this._context=e,this.evaluateAST(this._ast)}evaluateAST(e){return aa[e.operationType].call(this,e)}}(n,t)},ma=e=>!e||e.buildAST(),Ia=(e,t)=>!e||e.evaluate(t),Ea=(e,t,n)=>{const r=ya(e,t),a=ma(r);return Ia(a,n)},Aa={},_a=(e,t)=>Aa[t]&&Object.prototype.hasOwnProperty.call(Aa[t],e),Sa=e=>{const{context:t}=e;_a(e.reference,t)&&class{static handleExpression(e,t,n,r){(e=>fetch(Kn.BASEURL+Kn.ACTIONURL,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}))({actionObject:{action:"decexp",params:{source:e,value:t,targets:n},context:this.getContext(e,r)}}).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:Ec.getProperyValue(`${n}.pxObjClass`,null,t)||Ec.getProperyValue(`${n}.pyClassName`,null,t)}}static updateState(e,t){Object.keys(e).forEach((n=>jc({type:Ft,payload:{context:t,reference:n,value:e[n]}})))}}.handleExpression(e.reference,e.value,Aa[t][e.reference],t)},$a=(e={})=>{dt.copy(e,Aa)},Ca=(e,t,n)=>Ea(e,t,n?.pConnect.getPConnect()),ba=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(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);t in n&&delete n[t]}}getPropertyFromContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);if(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]}},Pa=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 class{constructor(e){this.next=null,this.automatic=!1,this.instruction=e,this.previous=null,this.childrenStateMachines=[]}}(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){t?(e.getValue(this.target)||[]).forEach(((e,n)=>{t.forEach((t=>{const r=Ja(t),a={[r]:e[r]};this.update(a,n+1,!0,{isDefault:!0})}))})):Wa.getEditableFields(this.contextName).filter((t=>t.fieldC11nEnv.getReferenceList()===e.getStateProps().referenceList)).forEach((e=>{const{fieldC11nEnv:t}=e,n=t.getStateProps()?.value;t.isInsideList()&&n&&t.getListActions().updateProperty(n,t.getValue(n),{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 a=class{static execute(e,t,n,r,a,s){const o={instruction:"UPDATE",content:{...dt.unflatten(r)}},i={content:{...o.content},target:dt.buildInstructionPageReference(a,t),listIndex:n,instruction:"UPDATE"};return s||jc(hc({...o,listIndex:n-1,context:e,referenceList:`${a}${t}`})),i}}.execute(this.contextName,this.target,t,e,this.pageReference,n),{isDefault:s=!1}=r;if(this.initChangeList(t-1),!s){const n=this.changeList?.[this.targetPageReference]?.[t-1].content||{};this.changeList[this.targetPageReference][t-1]=zc(n,e,r)}if(this.current?.automatic!==s||this.current?.instruction?.listIndex!==t||"UPDATE"!==this.current?.instruction.instruction)this.insertNode(a),s&&(this.current.automatic=!0);else{const t=this.current.instruction.content;this.current.instruction.content=zc(t,dt.unflatten(e),r)}}delete(e,t){const n=class{static execute(e,t,n,r,a){const s={target:dt.buildInstructionPageReference(r,t),listIndex:n,instruction:"DELETE"};return a||jc(hc({instruction:"DELETE",listIndex:n-1,context:e,referenceList:`${r}${t}`})),s}}.execute(this.contextName,this.target,e,this.pageReference,t);this.changeList[this.targetPageReference]?.splice(e-1,1),this.insertNode(n)}insert(e,t,n){const r=class{static execute(e,t,n,r,a,s){const o={};Object.prototype.hasOwnProperty.call(r,"nonFormProperties")&&(r.nonFormProperties.forEach((e=>{o[e]=r[e],delete r[e]})),delete r.nonFormProperties);const i={instruction:"INSERT",content:{...dt.unflatten(r)}},c=JSON.parse(JSON.stringify(i));delete c.content.classID;const d={target:dt.buildInstructionPageReference(a,t),content:{...c.content},listIndex:n,instruction:"INSERT"};return s||(i.content={...i.content,...o},jc(hc({...i,listIndex:n-1,context:e,referenceList:`${a}${t}`}))),d}}.execute(this.contextName,this.target,t,e,this.pageReference,n);this.initChangeList(t-1);const a=this.changeList?.[this.targetPageReference]?.[t-1].content||{};this.changeList[this.targetPageReference][t-1]=zc(a,e),this.insertNode(r)}replacePage(e){const t=class{static execute(e,t,n,r){return{content:{...{...dt.unflatten(n)}},target:dt.buildInstructionPageReference(r,t),instruction:"REPLACE"}}}.execute(this.contextName,this.target,e,this.pageReference);this.insertNode(t)}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=class{static execute(e,t,n,r,a){const s={target:dt.buildInstructionPageReference(a,t),listMoveToIndex:r,listIndex:n,instruction:"MOVE"};return jc(hc({listIndex:n-1,listMoveToIndex:r-1,context:e,referenceList:`${a}${t}`,instruction:"MOVE"})),s}}.execute(this.contextName,this.target,e,t,this.pageReference);this.insertNode(r)}deleteAll(e){const t=class{static execute(e,t,n,r){return jc(hc({instruction:"DESELECT_ALL",context:e,referenceList:`${n}${r}`})),{instruction:"DELETE ALL",target:dt.buildInstructionPageReference(n,t)}}}.execute(this.contextName,this.target,this.pageReference,e);this.changeList[this.targetPageReference]=[],this.insertNode(t)}updatePage(e){const t=this.current.instruction.content;this.current.instruction.content=zc(t,e)}},va={},Oa={},Ta={},Ra=(e,t,n)=>{const r=e.getContextName();va[r]||(va[r]={}),va[r][t]||(va[r][t]={content:[]}),Oa[r]||(Oa[r]=[],Ta[r]=[]),qa.isStateMachineExist(r,n,t)||qa.setStateMachine(r,t,n,new Pa(t,n,r))},Na=e=>it.formatPageReference(e),Da=(e,t)=>{const n=Oa[e],r=Ta[e],a=Ja(t),s=a?.substring(0,a.indexOf("["));r?.indexOf(s)<0&&Ta[e].push(s),n?.indexOf(a)<0&&Oa[e].push(a)},xa=e=>{delete Oa[e]},wa=e=>qa.buildPageInstructionsByContext(e,!0),Ma=e=>{qa.clearStateMachines(e),delete va[e]},La=(e,t,n,r)=>{let[,a]=t.split(`${e}[${r}]`);""!==a&&void 0!==a&&(a=a.startsWith(".")?a.substring(1):a,Object.keys(n).forEach((e=>{n[`${a}.${e}`]=n[e],delete n[e]})))},ja=(e,t)=>{const[,n]=e.split("."),r=t?.split(".").pop();return n===r},Ua=(e,t,n)=>{const r={};return Object.values(e).forEach((e=>{if(ja(e,n)){let n=dt.getPropertyName(e);if(n=n.substr(n.indexOf(".")+1).split("."),n.length>1){let e=dt.getIn(t,n)||null;if(!e){const r=`!P!${n.join(":")}`;e=dt.getIn(t,r)||null}dt.setIn(r,n,e)}else{const e=dt.getIn(t,n);r[n[n.length-1]]=e}}})),r},ka=(e,t,n,r,a)=>{const s=e.getValue(t)||{};n&&Object.keys(s).length>0&&e.clearErrorMessages({property:r?a:e.getStateProps().value})},Fa=e=>{if(!e)return!1;const t=wa(e);return Array.isArray(t)&&t.length>0},Va=new class{constructor(){this.fieldDefaults={}}updateFieldDefaults(e){e&&(Object.keys(this.fieldDefaults).length?dt.mergeDeep(e,this.fieldDefaults):dt.copy(e,this.fieldDefaults))}setFieldDefault(e,t,n){e&&t&&(this.fieldDefaults[e]=this.fieldDefaults[e]||{},this.fieldDefaults[e][t]=n)}getDefaultsforType(e){return this.fieldDefaults[e]}};class Ga{constructor(){this.validators={}}register(e,t){this.validators[e]=t}getValidator(e){return this.validators[e]}validateRquired(e,t,n,r,a,s){const o=s.getConfigProps();let i=null;if("true"===o.required||!0===o.required){let s=r;"string"==typeof s&&(s=s.trim()),"radiobuttons"===e&&(s=o.value);const c=(PCore.getStoreValue(`.attachmentsList.${t.replace(".","")}`,"context_data",a)||[]).filter((e=>!e.delete));"attachment"===e&&0===c?.length&&(s=""),"checkbox"!==e||s&&"false"!==s||(s=""),i=this.getValidator("required")(s),Ga.messageDispatcher(t,n,a,i,o.label)}return i}validateType(e,t,n,r,a,s){const o=s.getConfigProps();let i=null;const c={pageReference:s.getPageReference(),context:a,property:t,target:s.getTarget()};let d=Va.getDefaultsforType(s.getComponentName())?.["client-validations"];!1!==d&&this.getValidator(e)&&(i=this.getValidator(e)(r,c),""!==r&&Ga.messageDispatcher(t,n,a,i,o.label));const l=o.validationType;return d=l&&Va.getDefaultsforType(l)?.["client-validations"],!1!==d&&l&&this.getValidator(l)&&(i=this.getValidator(l)(r,c),Ga.messageDispatcher(t,n,a,i,o.label)),i}validate(e,t,n,r){const a=r.getContextName();let s=null;if(!r.getConfigProps().disabled&&!r.getConfigProps().readOnly){const o=r.getPageReference();r.skipRequiredValidation()||(s=this.validateRquired(e,t,o,n,a,r)),s||(s=this.validateType(e,t,o,n,a,r))}return{message:s}}static messageDispatcher(e,t,n,r,a){if(r){const s=[];s.push({type:st.MESSAGES.MESSAGES_TYPE_ERROR,fieldLabel:a,message:r}),Oi({messages:s,property:e,pageReference:t,context:n})}}isValidatorExist(e){return!!e.validatetype}}const Ba=new Ga;class Ha{static getChanges(e){return{...hs(e)}}static isStateModified(e){return ys(e)||Fa(e)||!!gs(e)}static isFormValid(e){return ss(e)}static clearChangedProperties(e){return Ma(e),xa(e),ms(e)}static getEditableFields(e){return os(e)}static setCustomValidator(e,t){Ba.register(e,t)}static isPropertyEditable(e,t){const n=Ha.getEditableFields(e);let r=!1;return n.forEach((e=>{e.name===t&&(r=!0)})),r}}const Wa=Ha,qa=new class{constructor(){this.states={},this.unConnectedStates={}}getStateMachine(e,t,n){return this.states?.[e]?.[`${t}${n}`]||this.unConnectedStates?.[e]?.[`${t}${n}`]}isStateMachineExist(e,t,n){return!!this.states?.[e]?.[`${t}${n}`]||!!this.unConnectedStates?.[e]?.[`${t}${n}`]}getUnConnectedStateMachines(e){return this.unConnectedStates?.[e]}setStateMachine(e,t,n,r){const a=`${n}${t}`,{stateMachine:s}=this.getStateMachineObjByPath(a,e,!0);if(s&&s.targetPageReference!==r.targetPageReference)return s.addChild(r),this.unConnectedStates[e]||(this.unConnectedStates[e]={}),this.unConnectedStates[e][a]||(this.unConnectedStates[e][a]={}),void(this.unConnectedStates[e][a]=r);this.states[e]||(this.states[e]={}),this.states[e][a]||(this.states[e][a]={}),this.states[e][a]=r}buildPageInstructionsByContext(e,t){const n=this.getStateMachinesByContext(e)||{},r=[];return Object.keys(n).sort().forEach((e=>{const a=n[e];if(a.visibility){const e=a.buildSubmitPageInstructions(t);r.push(...e)}})),r}buildClientChangeList(e){const t=this.getStateMachinesByContext(e)||{};let n={};const r={};return Object.keys(t).forEach((e=>{const r=t[e].getChangeList();n={...n,...r}})),dt.flatten(n,"",r),r}getStateMachinesByContext(e){return this.states?.[e]}clearStateMachines(e){this.states[e]={},this.unConnectedStates[e]={}}removeStateMachine(e,t){delete this.states[e]?.[t]}getStateMachineObjByPath(e,t,n){const r=/\[\d+\]$/gm;let a=null;for(;e&&!this.isStateMachineExist(t,"",e);)a=null,n&&e.endsWith("]")?(a=e.match(r),a=a[a.length-1].substring(1,a[a.length-1].length-1),[e]=e.split(r)):e=e.substring(0,e.lastIndexOf("."));return e?{stateMachineTarget:e,stateMachine:this.getStateMachine(t,"",e),index:a}:{}}executeStateMachine(e,t,n,r=!0,a={}){const{stateMachineTarget:s,index:o}=this.getStateMachineObjByPath(t,e,r);if(!s)return!1;let[,i]=t.split(s);if(!i)return!1;null!==o&&([,i]=i.split(/^\[\d+\]/gm));const c={[Ja(i)]:n},d=this.getStateMachine(e,"",s);return null!==o?d.update(c,Number(o)+1,!0,a):d.updatePage(dt.unflatten(c)),!0}registerForServerChanges(){Dc.registerForListChanges(((e,t,n)=>{t.indexOf(".classID")<0&&Wa.isPropertyEditable(e,t)&&this.executeStateMachine(e,t,n)}))}unRegisterForServerChanges(){Dc.unRegisterForListChanges()}},za={},Ya={},Ka={},Ja=e=>"."===e.charAt(0)?e.substring(1):e,Xa=(e="",t="")=>`${Ja(t)}${e?".":""}${Ja(e)}`,Qa=e=>{delete za[e],delete Ya[e],delete Ka[e]},Za=(e,t,n)=>{let r=t;return Ka[e]?.[n]&&Object.keys(Ka[e][n]).length&&Object.keys(Ka[e][n]).forEach((a=>{if(Ka[e][n][a]?.getConfigProps().visibility){const s=Ka[e][n][a];s.isMounted=t.isMounted,r=s}})),r},es=(e,t,n)=>{if(za[e]){const r=Ja(Xa(t,n)),a=Za(e,za[e].fieldOrder[r],r);a&&(a.isError=!1,Ka[e]?.[r]&&Object.keys(Ka[e][r]).forEach((t=>{Ka[e][r][t].isError=!1})))}},ts=()=>za,ns=e=>{const t=e.isExpressionExist();return!1!==e.isMounted&&(t&&!1!==e.getConfigProps().visibility||!t&&(void 0===e.getConfigProps().visibility||"true"===e.getConfigProps().visibility||!0===e.getConfigProps().visibility))},rs=e=>{const t=e.getConfigProps().readOnly;return!0===t||"true"===t},as=(e,t={})=>{const n=[];let r=[];const a=[],s=ts(),{ignoreFieldsInsideList:o=!0}=t;if(s[e])for(const t in s[e].fieldOrder)if(Object.prototype.hasOwnProperty.call(s[e].fieldOrder,t)){const a=s[e].fieldOrder[t],i=ns(a),c=a.isInsideList(),d=a.getStateProps()?.value||a.getStateProps()?.selectionList;if(i&&a.isEditable()&&!rs(a))if("Attachment"===a.getMetadata().type){let n=(PCore.getStoreValue(`.attachmentsList.${d.replace(".","")}`,"context_data",e)||[]).filter((e=>`${a.options.pageReference}.${e.label}`===t));n=dt.buildAttachmentsFormData(n),n.length>0&&(r=[...r,...n])}else c&&(!c||o)||Array.isArray(a.getValue(t))?c&&!rs(a)&&d&&qa.executeStateMachine(e,t,a.getValue(d),!1):qa.executeStateMachine(e,t,a.getValue(d))||n.push(t)}if(Ya[e])for(const t in Ya[e].fieldOrder)Object.prototype.hasOwnProperty.call(Ya[e].fieldOrder,t)&&a.push(t);return{formInputs:n,attachments:r,formPageFields:a}},ss=e=>{const t=ts();let n,r=!0;if(t[e])for(const a in t[e].fieldOrder)if(Object.prototype.hasOwnProperty.call(t[e].fieldOrder,a)){const s=Za(e,t[e].fieldOrder[a],a);let o="value",i=s.getStateProps()[o];if(!i){const e=s.getComponentConfig();"multi"===e.selectionMode?o="selectionList":"Editable"===e.renderMode&&(o="referenceList"),i=s.getStateProps()[o]}const c=ns(s);!c||rs(s)||s.getConfigProps().disabled||(s.isError=!1,s.getValidationApi().validate(s.getValue(i))),!n&&s.isError&&c&&(n=a),r&&s.isError&&c&&(r=!1)}return r},os=e=>{const t=[],n=ts();if(n[e])for(const r in n[e].fieldOrder)if(Object.prototype.hasOwnProperty.call(n[e].fieldOrder,r)){const a=n[e].fieldOrder[r];if(ns(a)&&!rs(a)&&!a.getConfigProps()?.disabled&&"Attachment"!==a.getMetadata()?.type&&"multirecordlist"!==a.getMetadata()?.config?.type){const e=a.getConfigProps()?.label||a.getConfigProps()?.caption,n=a.getComponentName().toLowerCase();t.push({name:r,label:e,type:n,fieldC11nEnv:a})}}return t},is=class{static getPropertyName(e){return kt.getPropertyName(e)}static isProperty(e){return kt.isProperty(e)}static getLeafPropertyName(e){return kt.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}},cs=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}},{APP:ds}=ot;let ls={},us={};const ps="You will lose unsaved changes. Do you want to continue?",hs=(e=ds.APP,t,n)=>{let r=[],a=[];t||(r=(e=>{const t=ts(),n=[];if(t[e])for(const r in t[e].fieldOrder)!Object.prototype.hasOwnProperty.call(t[e].fieldOrder,r)||!1!==t[e].fieldOrder[r].getConfigProps().visibility&&!1!==t[e].fieldOrder[r].isMounted||n.push(r);return n})(e)),n||(a=(e=>{const t=ts(),n=[];if(t[e])for(const r in t[e].fieldOrder)Object.prototype.hasOwnProperty.call(t[e].fieldOrder,r)&&!0===t[e].fieldOrder[r].getConfigProps().readOnly&&n.push(r);return n})(e));const s={},o=ls[e]||{};return Object.keys(o).forEach((e=>{Object.prototype.hasOwnProperty.call(o,e)&&-1===r.indexOf(e)&&-1===a.indexOf(e)&&dt.buildObject(e,s,o[e].value)})),s},fs=e=>{const{context:t}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;delete ls[t]?.[n]},gs=e=>us[e],ys=e=>{const t=wa(e)||{};return ls[e]&&Object.keys(ls[e]).some((t=>ls[e][t].initialValue!==ls[e][t].value))||Object.keys(t).length>0},ms=e=>{e&&ls[e]?ls[e]={}:"all"===e&&(ls={},us={}),us[e]&&(us[e]=!1)},Is=e=>e=>t=>{const{type:n,payload:r={}}=t||{};if(n===Gt&&(Sa(r),(e=>{const t=dt.getPropertyName(e.propertyName),{context:n,pageReference:r,value:a}=e;Dc.triggerCascade(n,`${r}.${t}`,a);const s=ba.getDependencies(n,`${r}.${t}`),o=Dc.getResetDependencies(n,`${r}.${t}`),i={context:n,datapages:{}};[...s,...o].forEach((e=>{const t=dt.getPropertyNameFromDependency(e);if("multiRecord"===e.mode){const e=t.split("."),r=`.${e.pop()}`,a=e.join(".");qa.getStateMachine(n,a,r).deleteAll(r)}else jc({type:Ft,payload:{reference:t,value:"",context:n,isArrayDeepMerge:!0,isImplicit:!0}})})),s.forEach((t=>{let a=r;t.startsWith(r)||(a="");const s=t.replace(`${a}`,"").split(".").filter((e=>!!e));s.pop();const o=s.join("."),c=Vc(`.${o}`,a,n)?.classID||e.classID,d=At(t.split(".").pop(),c),{datasource:l}=d,u={};let p=[];l.parameters.forEach((e=>{e?.value?(u[e.name]=is.isProperty(e.value)?Vc(`.${dt.getFullPropertyReference([o,dt.getPropertyName(e.value)])}`,a,n):e.value,void 0===u[e.name]||null===u[e.name]||""===u[e.name]?(u[e.name]="",p.push(ot.NULL_STRING)):p.push(u[e.name])):(u[e.name]="",p.push(ot.NULL_STRING))})),p=l.name.concat(ot.UNDERSCORE_STRING,dt.getHashedString(p.join(ot.HASH_DELIMITER)));const{name:h}=l,f=vt(h);i.datapages[p]={mode:l.mode,propertyName:t,name:l.name,dataViewParameters:u,refreshStrategy:f?.refreshStrategy}})),s.length&&jc({type:Fn,payload:i})})(r),(((e,t)=>{if(!e||!t)return!1;const n=ls[e]&&ls[e][t];return!!n&&n.previousValue!==n.value})(r.context,r.reference)||Fa(r.context,r.reference))&&Oc(r),PCore.getRefreshManager().triggerRefreshForType("PROP_CHANGE",r.reference,r.context)),n===Bn){const{context:e,referenceList:t}=r;Oc({context:e,pageReference:t})}if(n===Ft||n===Vt){const{reference:e,isImplicit:n,context:a,skipDirtyValidation:s=!1}=r;cs.isPageInstruction(e)||s?s||(us[`${a}`]=!0):(e=>{const{payload:t}=e,{context:n,initialValue:r="",isStrictTracking:a}=t,s=t.reference.startsWith(".")?t.reference.substr(1):t.reference;ls[n]=ls[n]||{},ls[n][s]?ls[n][s].previousValue=Vc(t.reference,null,n):(ls[n][s]={initialValue:r||Vc(t.reference,null,n)},ls[n][s].previousValue=ls[n][s].initialValue),ls[n][s].value=t.value,a&&ls[n][s].value===ls[n][s].initialValue&&fs(t)})(t),(r.removePropertyFromChangedList||n)&&fs(r)}if(n===yn||n===mn){const{transientItemID:e,data:t}=r;dt.iterateLeafNodes(t,(t=>{fs({context:e,value:"",reference:t.join(".")})}))}n&&[En,un,_n].includes(n)&&(ms(r.context),Dc.purgeResetDependencies(r.context),$c(r.context),(r.childContainersContexts||[]).forEach((e=>{ms(e)})),(r.transientItems||[]).forEach((e=>{ms(e)}))),e(t)},Es={},As=(e,t)=>{e.DeclareExpressions&&$a({[t.context]:e.DeclareExpressions})},_s=(e,t,n=!1)=>{const r=dt.getIn(e,ot.RESOURCERS);r&&((e=>{e&&Ct(e)})(r),As(r,t),(e=>{var t;e.Theme&&(t=e.Theme,dt.copy(t,Es))})(r)),n||Fr({...e,options:t})},Ss="component-loader",$s={},Cs=async(e,t)=>{const n=Kr.getLoader(),r=t||Kr.staticServerURL;if(!e||window.PCore&&!1===window.PCore.getBehaviorOverride("dynamicLoadComponents"))return Promise.resolve();if(Kr.getLoader(Ss))return await Kr.getLoader(Ss)(e||[],r);const a=[];return e.forEach((e=>{if($s[e])return;const t=jt.getComponent(e);if(t)(t.scripts||[]).forEach((e=>{const t=e.startsWith("http")?e:r+e;a.push(n(t,Kr.getTypes.SCRIPT))})),(t.styles||[]).forEach((e=>{a.push(n(r+e,Kr.getTypes.STYLE))})),$s[e]=!0;else{const t=`${Kr.getConstellationServiceUrl()}/v860/${Kr.getAppAlias()}/component/${e}.js`;a.push(n(t,Kr.getTypes.SCRIPT))}})),Promise.all(a)},bs=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&&jc({type:Yt,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]&&jc({type:Kt,payload:{context:n}}))}addToContextArray=e=>{void 0===this.contextArray[e]&&(this.contextArray[e]=0),this.contextArray[e]=this.contextArray[e]+1};removeFromContextArray=e=>{void 0!==this.contextArray[e]&&this.contextArray[e]>0&&(this.contextArray[e]=this.contextArray[e]-1)}},Ps=new class{constructor(){this.counterActionMgrId=0,this.actionMgrActions=[]}getNextActionMgrId(){return this.counterActionMgrId+=1,this.counterActionMgrId.toString()}register(e,t,n,r,a="unknown",s,o=!0){if(void 0!==this.actionMgrActions[e])return null;const i={actionType:a,promise:t,resolve:n,reject:r,actionPayload:s};return this.actionMgrActions[e]=i,o&&bs.enableLoadingIndicator(i.actionPayload),e}actionManagerPromise=(e,t=null)=>{let n,r;null===t&&(t=this.getNextActionMgrId());const a=new Promise(((e,t)=>{n=e,r=t}));return this.register(t,a,n,r,e),{actionMgrID:t,promise:a}};resolveActionByID(e,t,n=!0){const r=this.actionMgrActions[e];let a=e;return r?(setTimeout((()=>{r.resolve(t)}),0),bs.disableLoadingIndicator(r.actionPayload,n)):a=null,a}rejectActionByID(e,t=!0,n){const r=this.actionMgrActions[e];let a=e;return r?(r.reject(n),bs.disableLoadingIndicator(r.actionPayload,t)):a=null,a}};class vs{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 Os=vs,Ts=e=>{if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1)if(n[e].ID===t)return"create"===n[e].transitionType&&"active"===n[e].visited_status}return!1},Rs=(e,t)=>{if(e&&t){const n=dt.getIn(t,["assignments","0","assigneeInfo"],{}),{ID:r,type:a}=n;return"worklist"===a?.toLowerCase()&&r===e}return!1},Ns=e=>{const{activeActionID:t,availableActions:n}=e||{};if(t&&n){const e=n.find((e=>e.ID===t));return Boolean(e)}return!1},Ds=(e,t)=>{const n=Ec.getProperyValue(st.CASE_INFO.ACTIVE_ACTION_ID,t,e),r=Ec.getProperyValue(st.CASE_INFO.AVAILABLEACTIONS,t,e);let a=!1;if(r&&n){const e=r.find((e=>e.ID===n));e&&(a=e.type.toLowerCase()===st.LOCAL_ACTION_TYPE.CASE_WIDE.toLowerCase())}return e&&!r&&(a=Uc(e)?.context_data?.actionType===ot.CASE),a},xs=e=>Gc(null,ot.CASE_VIEW_MODE_PROP,e)===ot.PERFORM_MODE&&(-1!==e.indexOf(ot.WORKAREA)||-1!==e.indexOf(ot.MODAL)),ws=e=>{const t=e?.parentCaseInfo?.ID;return Boolean(e&&t)},Ms=(e,t,n={})=>{let r,a,s,o,i,c;const d=Uc(e);return n?.isTriggeredFromDifferentContext?(r=d.caseInfo.assignments[0].ID,a=d.caseInfo.ID,s=d.caseInfo.assignments,o=d.caseInfo.activeActionID,i=d.caseInfo.availableActions,c=d.caseInfo):(r=t.getValue(st.CASE_INFO.ASSIGNMENT_ID),a=t.getValue(st.CASE_INFO.CASE_INFO_ID),s=t.getValue(st.CASE_INFO.ASSIGNMENTS),o=t.getValue(st.CASE_INFO.ACTIVE_ACTION_ID),i=t.getValue(st.CASE_INFO.AVAILABLEACTIONS),c=t.getValue(st.CASE_INFO.CASE_INFO)),{assignmentID:r,caseID:a,assignments:s,localActionID:o,caseActions:i,caseInfo:c}},Ls=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 a=0,s=-1;r.forEach((e=>{e.id===t&&e.contextName===n&&(s=a),a+=1})),r.splice(s,1)}unsubscribeAllWithEventType(e){this.subscribers[e]=[]}subscribe(e,t,n,r,a){this.subscribers[e]=this.subscribers[e]||[];let s=!1;if(a&&this.subscribers[e].forEach((e=>{s=e.id===t&&e.contextName===r})),!s){const a=new class{constructor(e,t,n,r){this.eventType=e,this.callback=n,this.contextName=r,this.id=t}}(e,t,n,r);this.subscribers[e].push(a)}}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}))}},js=class{static subscribe(e,t,n,r=!1,a="app"){Ls.subscribe(e,n,t,a,r)}static subscribeOnce(e,t,n){this.subscribe(e,t,n,!0)}static publish(e,t){Ls.publish(e,t)}static unsubscribe(e,t,n="app"){Ls.unsubscribe(e,t,n)}static unsubscribeAllWithEventType(e){Ls.unsubscribeAllWithEventType(e)}static cleanContextSubscribers(e){Ls.clearContext(e)}},Us=e=>{js.publish(ot.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,e)},ks={CASE_INFO:`${ot.DATA}.${ot.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${ot.DATA}.${ot.CASE_INFO.CASE_TYPE_ID}`,NEXT_ASSIGNMENT_INFO_ID:`${ot.DATA}.${ot.NEXT_ASSIGNMENT_INFO_ID}`,ASSIGNMENTS:`${ot.DATA}.${ot.CASE_INFO.ASSIGNMENTS}`,CASE_INFO_ID:`${ot.DATA}.${ot.CASE_INFO.CASE_INFO_ID}`,CASE_FIRST_FLOW_ACTION_NAME:`${ot.DATA}.${ot.CASE_INFO.ASSIGNMENTACTION_ID}`,CASE_FIRST_ASSIGNMENT_ID:`${ot.DATA}.${ot.CASE_INFO.ASSIGNMENT_ID}`},Fs=(e,t)=>{const{vcName:n,containerName:r}=t;return r||n||Os.getTargetViewContainerName(e)},Vs=e=>{const t=e.lastIndexOf(ot.FORWARD_SLASH_STRING)+1,n=e.lastIndexOf(ot.UNDERSCORE_STRING);return e.substring(t,n)},Gs=e=>e===No.WORKAREA,Bs=e=>e===No.MODAL,Hs=e=>e===on,Ws=e=>e&&e.find((e=>e.type===on)),qs=e=>dt.getIn(e,ks.CASE_INFO,{}),zs=e=>e?e.split(" ").pop():void 0,Ys=e=>dt.getIn(e,ks.CASE_CLASS_NAME,ot.EMPTY_STRING),Ks=e=>{const t=qs(e);return Ts(t)&&Rs(zr.getOperatorIdentifier(),t)},Js=e=>dt.getIn(e,ks.CASE_INFO_ID,ot.EMPTY_STRING),Xs=e=>dt.getIn(e,ks.CASE_FIRST_ASSIGNMENT_ID,ot.EMPTY_STRING),Qs=(e,t)=>{const{removeActionPayload:n,target:r}=t;if(n&&n.containerItemID){const{containerItemID:t,context:a}=n;e.push(dc(nc,{containerItemID:t,context:a||Wo(t),target:r}))}},Zs=e=>{const t=Lc();if(!e)return!1;const n=ar(e),r=oi(n),a=oi(e);if(!r||!a)return!1;const s=wo(r,n),o=wo(a,e);if(!s||!o)return!1;const{key:i}=s||{};let{key:c}=o||{};return c||(c=t.getState().data?.[e]?.caseInfo?.ID),i&&c&&i===c},eo=(e,t,n={})=>{const{skipFlowNameUpdate:r}=n,a=Js(t);dt.setIn(e,"key",a);const s=Ts(qs(t));if(!r&&(e=>{const t=dt.getIn(e,ks.ASSIGNMENTS,[]);return t&&t.length>0})(t)){const n=Xs(t),[,r]=n.split("!");(e=>{js.publish(ot.PUB_SUB_EVENTS.CASE_EVENTS.CURRENT_ASSIGNMENT_UPDATED,e)})({assignmentID:n,isInCreateStage:s}),dt.setIn(e,"flowName",r)}},to=(e,t)=>{const{attachmentsExist:n}=t;n&&dt.setIn(e,st.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),dt.setIn(e,st.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())},no=(e,t,n)=>{let r=ot.PROMISE_VALUE.RESOLVE;return Ws(e)?(r=ot.PROMISE_VALUE.REJECT,n?Ps.rejectActionByID(t,!0,n):Ps.rejectActionByID(t)):Ps.resolveActionByID(t),r},ro=e=>"true"===zr.getCaseTypeList().filter((t=>t.pyWorkTypeImplementationClassName===e))?.[0]?.pyIsTraditionalUICase,{RESOURCE_TYPES:ao}=st,so={PAGE:"page",FORM:"form"},oo={[ao.CASE]:[Nn,Tn,Rn],[ao.PAGE]:[bn,vn],[ao.DATA]:[Pn]},io=(e,t,n={})=>{if(!e)return{};const r={etag:e.etag},{RemoteSystemID:a}=n;return e[st.REMOTE_SYSTEM_ID]||e[st.REMOTE_SYSTEM_ID.toLowerCase()]||a?r.RemoteSystemID=e[st.REMOTE_SYSTEM_ID]||e[st.REMOTE_SYSTEM_ID.toLowerCase()]||a:Er.isRemoteCase(t)&&(r.RemoteSystemID=Er.getRemoteHeader(t)),r},co=(e,t={})=>{const{onlyChangedData:n=!1,nonEmptyAndChangedData:r=!1}=t;let a={};a=((e,t={})=>{const n={},r=Uc(e),{ignoreFieldsInsideList:a=!0}=t;if(r&&r.caseInfo&&r.caseInfo.content){const{formInputs:t,attachments:s,formPageFields:o}=as(e,{ignoreFieldsInsideList:a});s&&s.length>0&&dt.buildObject("caseInfo.attachments",n,s),o&&o.length>0&&o.forEach((e=>{let t=dt.getIn(r,e);"object"==typeof t&&(t=dt.deepClone(t),delete t?.classID),dt.buildObject(e,n,t)})),t&&t.length>0?t.forEach((e=>{dt.buildObject(e,n,dt.getIn(r,e))})):dt.buildObject("caseInfo.content",n,{})}if(r&&r.dataInfo&&r.dataInfo.content){const{formInputs:t}=as(e,{ignoreFieldsInsideList:a});t&&t.length>0&&t.forEach((e=>{dt.buildObject(e,n,dt.getIn(r,e))}))}return n})(e),n&&delete a?.caseInfo?.content;const s=hs(e,!1);r&&Object.entries(a?.caseInfo?.content).forEach((([t,n])=>{const r=Uc(e),s=Ye()(r,st.CASE_INFO.CASE_INFO_CLASSID);("True-False"===At(t,s)?.type&&!n||""===n)&&delete a.caseInfo.content[t]}));const o=Ve()(s,a);let i={},c=!1;o&&o.caseInfo&&(i={...o.caseInfo},o.caseInfo.attachments&&(c=!0));const d=(l=e,qa.buildPageInstructionsByContext(l));var l;d&&(i.pageInstructions=d);const u=(e=>Oa[e]||[])(e);return u.forEach((e=>{i&&i.content&&dt.deleteIn(i.content,(e=>{if(!e)return"";const t=e.split(".");let n="";for(const e of t)if(e){if(-1!==e.indexOf("[")&&-1!==e.indexOf("]"))return n+=`['${e}']`,n;n+=`['${e}']`}return n})(e))})),o&&o.dataInfo?{...o.dataInfo,pageInstructions:i.pageInstructions}:{content:i,attachmentsExist:c}},lo=(e,t)=>{let n,r,a={};const s=dt.getIn(e,ot.UI_RESOURCERS),o=dt.getIn(e,"confirmationNote");s?(n=dt.getIn(e,ot.UI_RESOURCERS_CONTEXT_DATA),r=dt.getIn(e,ot.ROOT),a=dt.getIn(e,ot.ACTION_BUTTONS)):o&&(r={});const{data:i={},Errors:c,semanticURL:d,key:l,flowName:u}=e,p=dt.getIn(e,"nextAssignmentInfo",null),h=dt.getIn(e,"nextAssignmentInfo.context",""),f=dt.getIn(e,"confirmationLinks",null),{isInCreateStage:g,openCaseViewAfterCreate:y,debugInfo:m}=t;return{data:{...i,key:l,flowName:u,coreHeaders:m&&{debugInfo:{[ot.COREHEADER_APP_DEBUG_ID]:m.debugId}},caseInfo:{...i.caseInfo,actionButtons:a,headers:t.headers},[ot.CONTEXT_DATA]:g?{...i[ot.CONTEXT_DATA],...n,openCaseViewAfterCreate:y,errors:c}:{...i[ot.CONTEXT_DATA],...n,errors:c}},semanticURL:d,nextAssignmentInfo:p,assignmentContext:h,confirmationLinks:f,key:l,root:r,...t}},uo=async(e,t,n,r=!1,a=!1)=>{const s=dt.getIn(e,ot.LOCALE_REFERENCES);await Xr.loadLocaleResources(s);const o=dt.getIn(e,ot.COMPONENTS);if(o)try{await Cs(o)}catch(e){console.error(e)}const i={actionConfig:t,...n};r?Fr({...e,options:i,directUrlUpdation:!0}):_s(e,i,a)},po=(e="")=>{const t=e.indexOf(" "),n=e.indexOf("!");return e.substring(t+1,n)},ho=e=>{if(e){const[,t]=e.split("!");return{key:po(e),flowName:t}}return{}},fo=e=>{const{payload:t}=e,{err:n,context:r,actionMgrID:a}=t,s=n&&n.response?n.response.data:"",o=(e=>{const t=ts(),n=[];if(t[e])for(const r in t[e].fieldOrder)Object.prototype.hasOwnProperty.call(t[e].fieldOrder,r)&&!1!==t[e].fieldOrder[r].getConfigProps().visibility&&n.push(r.substring(r.indexOf("content")+8));return n})(r);return a&&Ps.rejectActionByID(a),dc(lc,"Error action triggered",s,r,o)},go=(e,t)=>Xo(e)&&Zo(e)?dc(sc,t):dc(zi,t),yo=(e,t,n=ot.APP.APP,r={})=>{let a=null;const{buildNew:s=!0}=r;return Xo(e)?a=Zo(e)?Go(e):sr(t,n):Qo(e)&&(Zo(e)&&!s?a=qo(e):Zo(e)&&!s||(a=sr(t,n))),a},mo=e=>e&&e.type===ln,Io=e=>{let t=!1;const n=Ko(e);for(let e=0;e<n.length;e+=1){const r=n[e];if(r&&ys(r)){t=!0;break}}return t},Eo=(e,t={})=>{let n=!1,r=!1,a={},s=!0,o=!1,i=!1;const{showConfirmDialogForMaxDocumentLimitReached:c=!1,dirtyMessage:d,skipChildDirtyState:l=!1}=t;if(Xo(e)){const t=Go(e),r=Wo(t);ys(r)&&(n=!0),l||n||(n=Io(t))}else if(Qo(e)&&ni(e)){let t=si(e);t||(t=Go(e),r=!0),a.containerItemID=t,a.context=Wo(t)}if(n){const e=d||ps;o=window.confirm(Xr.getLocaleValue(e,"Messages"))}if(!o&&n&&(a={},s=!1),r){const e=Xr.getLocaleValue("You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.","Messages");c?i=window.confirm(e):(window.alert(e),s=!1)}return!i&&r&&(a={},s=!1),{continueExecution:s,removeActionPayload:a}},Ao=(e,t)=>{let n=!1;const r=zr.isCoexistenceAppOfType(ot.APP_TYPE.UIKIT),{insKey:a,isParallelCall:s,skipFlowNameCheck:o}=t;if(!a)return{};const[,i]=a.split("!")||"",c=o?a:po(a),d=ko(e,c);let l={},u=!1;if(d&&!r&&(n=!0,l=wo(e,d),!o)){let e=l?.flowName;const t=Vs(d),r=zo(d);if(r.length){const n=Sr(t,r[0]);e=wo(n,r[0])?.flowName}else n=e===i;(e!==i||s)&&(u=!0)}return{activate:n,activateContainerActionPayload:{target:e,isParallelAssignment:u,containerItemID:d,semanticURL:l.semanticURL,insKey:a}}},_o=(e,t,n)=>e===ao.PAGE?((e,t={})=>{let n=!1;const{semanticURL:r}=t,a=ko(e,r);return a&&(n=!0),{activate:n,activateContainerActionPayload:{target:e,containerItemID:a,semanticURL:r}}})(t,n):e===ao.ASSIGNMENT?Ao(t,n):e===ao.CASE?Ao(t,{...n,skipFlowNameCheck:!0}):{},So=(e=[])=>{Zo(`${ot.APP.APP}/${ot.PREVIEW}`)&&e.push(dc(qi,ri({context:st.APP.APP,name:ot.PREVIEW})))},$o=e=>{let t;for(const n of Object.keys(oo))if(oo[n].includes(e)){t=n;break}return t},Co=(e,t)=>{const{data:n={},context:r,caseViewMode:a}=e,s={data:{...n},caseViewMode:a,context:ar(r)};dt.deleteIn(s.data,"shared"),dt.setIn(s.data,["context_data","caseViewMode"],a),t.push({type:Hn,payload:{context:s.context}}),t.push(dc(ki,s))},bo=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=dt.getIn(t,["payload","assignmentContext"]);if("other"===n||"remote"===n){const r=dt.getIn(t,["payload","nextAssignmentInfo","ID"]);if(t?.payload?.isProcessAction){const n={acName:dt.getIn(t,["payload","target"]),caseID:t.payload.data.caseInfo.ID,containerItemID:dt.getIn(t,["payload","context"]),context:dt.getIn(t,["payload","context"])},r={type:tn,payload:{...n}};e.push(r),e=e.filter((e=>delete e?.payload?.data?.caseMessages)),jc(e),e=e.filter((e=>e.type!==tn))}const a=((e,t,n)=>({assignmentID:e,vcName:ot.PRIMARY,targetContainerName:dt.getIn(t,["payload","target"]),context:dt.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);Xo(a.targetContainerName)||t?.payload?.containerName!==ot.WORKAREA||(a.isMultiDoc=!0,e=[]);const s={type:nn,payload:{...a}};e.push(s),jc(e)}else jc(e)}},Po=(e,t)=>Ve()(e,t,(function(e,t){if(Array.isArray(e))return e.concat(t)})),vo=e=>{let t={},n=$i(e);for(;n;){const e=co(n);t=Po(e.content,t),n=$i(n)}return t},Oo=new class{getCoreheaders(e){const t=`${st.APP.APP}${ot.FORWARD_SLASH_STRING}${ot.PRIMARY}`,n=Go(t),r=Wo(n),a=Ec.getProperty(ot.COREHEADERS,"",r);if(a&&e in a)return a[e]}},To={defaultLimit:16},Ro={SINGLE:"single",MULTIPLE:"multiple"},No={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},Do=()=>Lc()?.getState()?.containers,xo=e=>e?Lc().getState().containers[e]:(Wr.error("getContainerData: target is the required parameter"),null),wo=(e,t)=>{if(!e||!t)return Wr.error("getContainerItemData: target and containerItem are required parameter"),null;const n=Do()[e];return n&&n.items&&n.items[t]||null},Mo=e=>e?Lc().getState().containers[e]?.items||{}:(Wr.error("getContainerItems: target is the required parameter"),null),Lo=e=>e?Lc().getState().containers[e]?.accessedOrder||[]:(Wr.error("getContainerAccessOrder: target is the required parameter"),[]),jo=e=>e?Lo(e)?.length>0||!1:(Wr.error("areContainerItemsPresent: target is the required parameter"),!1),Uo=(e,t,n)=>{if(!e||!t)return Wr.error("isContainerItemExists: target and key are required parameters"),!1;const r=Do()[e],a=r&&r.items||null,s=n||((e,t)=>e===t);if(t&&a)for(const e in a)if(s(t,a[e].key))return!0;return!1},ko=(e,t,n)=>{if(!e||!t)return Wr.error("getContainerItemName: target and key are required parameters"),null;const r=Do()[e],a=r&&r.items||null,s=n||((e,t)=>e?.toLowerCase()===t?.toLowerCase());if(t&&a)for(const e in a)if(s(t,a[e].key))return e;return null},Fo=(e,t)=>{if(!e||!t)return Wr.error("isContainerInitialized: context and name are required parameters"),!1;const n=Do();return n&&Object.prototype.hasOwnProperty.call(n,`${e}/${t}`)},Vo=(e,t)=>{if(!e||!t)return Wr.error("getContainerType: context and name are required parameters"),null;const n=Do()[`${e}/${t}`];return n&&n.type},Go=e=>{if(!e)return Wr.error("getActiveContainerItemName: target is the required parameter"),null;let t=null;const n=Do();if(n&&n[e]){const r=n[e],{accessedOrder:a}=r;t=a&&a.length>0?a[a.length-1]:null}return t},Bo=(e,t,n)=>{if(!e||!t)return Wr.error("isContainerItemActive: target and key are required parameters"),!1;const r=ko(e,t,n);return!!r&&r===Go(e)},Ho=(e,t)=>{let n=null;const r=Do();for(const a in r)if(Object.prototype.hasOwnProperty.call(r,a)&&r[a].items){const s=r[a].items[e];if(n=s?s[t]:null,n)break}return n},Wo=e=>e?Ho(e,"context"):(Wr.error("getDataContextName: containerItemName is required parameters"),null),qo=e=>{if(!e)return Wr.error("getActiveContainerItemContext: target is required parameters"),null;let t=null;const n=Do();if(n&&n[e]){const r=n[e],{accessedOrder:a}=r,s=a&&a.length>0?a[a.length-1]:null;t=Wo(s)}return t},zo=e=>{if(!e)return Wr.error("getChildContainerItems: containerItemName is required parameters"),[];const t=e.endsWith("/")?e:`${e}/`;let n=[],r=!1;const a=Do(),s=n=>{const a=[];return Object.keys(n).forEach((n=>{n.startsWith(t)&&n!==t&&a.push(n),n===e&&(r=!0)})),a};for(const e in a)if(Object.prototype.hasOwnProperty.call(a,e)&&a[e].items){const t=s(a[e].items);t&&t.length>0&&(n=n.concat(t)),n=n.sort()}return r?n:[]},Yo=e=>{if(!e)return Wr.error("getChildContainers: containerItemName is required parameters"),[];const t=[],n=Do();for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&r.startsWith(e)&&r!==e&&t.push(r);return t},Ko=e=>{if(!e)return Wr.error("getChildContainersContexts: parentContainerItemID is required parameters"),[];const t=[],n=Do();for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&r.startsWith(e)&&r!==e&&(Lo(r)||[]).forEach((n=>{Wo(n)!==e&&t.push(Wo(n))}));return t},Jo=e=>{const t=[...Ko(e),e],n=[],r=Lc().getState().data||{};return t.forEach((e=>{Object.prototype.hasOwnProperty.call(r,`${e}/${ot.SUGGESTION}`)&&n.push(`${e}/${ot.SUGGESTION}`)})),n},Xo=e=>e?e&&xo(e)&&xo(e).type===Ro.SINGLE:(Wr.error("isContainerSingleMode: target is required parameters"),null),Qo=e=>e?e&&xo(e)&&xo(e).type===Ro.MULTIPLE:(Wr.error("isContainerMultipleMode: target is required parameters"),null),Zo=e=>e?xo(e)&&xo(e).items&&Object.keys(xo(e)?.items).length>0||!1:(Wr.error("hasContainerItems: target is required parameters"),!1),ei=e=>e&&To[e]?To[e]:To.defaultLimit,ti=(e,t=To.defaultLimit)=>{e?To[e]=t:Wr.error("setContainerLimit: target is required parameter")},ni=e=>{if(!e)return Wr.error("isContainerLimitReached: target is required parameter"),!1;let t=!1;const n=xo(e),{items:r={}}=n,a=Object.keys(r),s=ei(e);return a&&a.length>0&&a.length>=s&&(t=!0),t},ri=e=>{if(!e||!e.name||!e.context)return Wr.error("resetContainersPayload: containerInfo object should contain name and context"),null;const t=e?.name,n=xo(`${e?.context}/${t}`),r=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map((e=>n?.items[`${e}`]?.context))||[],a=Yo(`${ot.APP.APP}/${ot.PREVIEW}`),s=Ko(`${ot.APP.APP}/${ot.PREVIEW}`);return{context:e?.context,name:t,containerItems:[...r,...s],childContainers:a}},ai=e=>{if(!e)return Wr.error("isContainerDirty: containerItemID is the required parameter"),!1;const t=Wo(e);return ys(t)||Io(e)},si=e=>{if(!e)return Wr.error("getLeastRecentlyUsedNonDirtyContainerItemID: target is required parameter"),null;let t;const n=xo(e),{accessedOrder:r=[]}=n;for(let e=0;e<r.length;e+=1){const n=r[e];if(!ai(n)){t=n;break}}return t},oi=e=>{if(!e)return Wr.error("getTargetFromContainerItemID: containerItemID is the required parameter"),null;const{containers:t}=Lc().getState();for(const n in t)if(t[n]?.accessedOrder?.includes(e))return n;const n=e.lastIndexOf(ot.UNDERSCORE_STRING);return e.substring(0,n)},ii=(e,t={})=>{if(!e)return Wr.error("closeContainerItem: containerItemID is the required parameter"),Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));const n=oi(e),r=Wo(e),{skipDirtyCheck:a}=t;let s=!0,o=[];if(ai(e)&&!a&&(s=window.confirm(Xr.getLocaleValue(ps,"Messages"))),s){const{accessedOrder:t=[],items:a={},type:s}=xo(n);o=t.filter((t=>t!==e));const i=o[o.length-1],c=a[i]||{},{semanticURL:d=ot.FORWARD_SLASH_STRING,context:l}=c;o.length>0&&d&&d!==ot.FORWARD_SLASH_STRING?Fr({directUrlUpdation:!0,semanticURL:d,options:{containerItemID:i,context:l}}):Fr({directUrlUpdation:!0,semanticURL:ot.FORWARD_SLASH_STRING,options:{}}),jc(nc({containerItemID:e,context:r,target:n,containerInfo:{newAccessedOrder:o,containerType:s}}))}return Promise.resolve({newAccessedOrder:o})},ci=(e,t,n,r)=>{const a="root",s=sr(t,a,!0),o=Sr(t,a),i={data:n,context:r?"app":s},c=[zi({root:e,containerItemID:s,context:r?"app":s,target:o,containerName:t})];c.push(ki(i)),jc(c)},di=(e,t,n)=>{let r=Lo(e);r=r.filter((e=>e!==t));let a=!1;for(let e=0;e<r.length;e+=1)if(Wo(r[e])===n){a=!0;break}return a},li=e=>{if(!e)return Wr.error("isContainerItemContextBeingUsedInOtherContainers: containerItemID is the required parameter"),!1;const t=Do(),n=Wo(e),r=Object.keys(t);let a=!1;for(let t=0;t<r.length&&(a=di(r[t],e,n),!a);t+=1);return a},ui=e=>{Array.isArray(e)||(e=[e]);const t=Do()||{};return e.map((e=>{const n=oi(e);return dt.getIn(t,[n,"items",e,"transientItems"])||[]})).flat()},pi=e=>{const t=dt.deepClone(Lc().getState().data[e]);dt.iterateLeafNodes(t,(e=>dt.setIn(t,e,""))),jc(Ji({transientItemID:e,data:t}))},hi=e=>{const t=dt.deepClone(Lc().getState().data[e]);dt.iterateLeafNodes(t,(e=>dt.setIn(t,e,""))),jc(Xi({transientItemID:e,data:t}))};class fi{static items;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 gi=()=>fi,yi=e=>{const t={containerName:e};t.childContainers=Yo(e),jc({type:$n,payload:t})},mi=(e,t)=>{const n=zo(e),{key:r}=wo(oi(e),e),a=[];n.forEach((e=>{const{key:n}=wo(oi(e),e);if(n===r){const n={data:{caseInfo:{headers:{etag:t}}},target:oi(e),context:e};a.push({type:rn,payload:n})}})),a.length&&jc(a)},Ii=(e,t)=>{const n=[],r={data:{caseInfo:{headers:{etag:t}}},target:oi(e),context:e};n.push({type:rn,payload:r}),n.length&&jc(n)},Ei=()=>zr.isPortalLoaded?"app":"root",Ai=()=>Oo,_i=(e,t)=>{const n={data:{caseInfo:{lastUpdateTime:t}},target:oi(e),context:e};jc({type:rn,payload:n})},Si=(e,t)=>{const n=ko(e,t),r=ko(`${n}/workarea`,t);return Wo(r)},$i=e=>e?Ho(e,"parentContext"):(Wr.error("getContainerParentContext: containerItemName is required parameters"),null),Ci={CONTENT_FIELDS_PATH:[ot.CONTEXT_DATA,ot.CASE_INFO.CASE_INFO,ot.CONTENT],FIELD_MESSAGES_PATH:[ot.CONTEXT_DATA,ot.CASE_INFO.CASE_INFO,ot.CONTENT,ot.SUMMARY_OF_MESSAGES,ot.PROPERTY_MESSAGES],PAGE_MESSAGES_PATH:[ot.CONTEXT_DATA,ot.SUMMARY_OF_MESSAGES,ot.PAGE_MESSAGES],HTTP_MESSAGES_PATH:[ot.CONTEXT_DATA,ot.SUMMARY_OF_MESSAGES,ot.HTTP_MESSAGES],CASE_MESSAGE_PATH:[ot.CASEMESSAGES]},bi=(e="",t="",n,r)=>{let a,s=[];null!==e&&(a=e&&"."===e[0]?e.substr(1).split("."):e.split("."));const o=t&&"."===t[0]?t.substr(1):t;if(n===ot.PROPERTY&&e||e){s=[ot.CONTEXT_DATA,...o.split(".")];for(let e=0;e<a.length-1;e+=1)s.push(a[e]);s.push(ot.SUMMARY_OF_MESSAGES,ot.PROPERTY_MESSAGES,a[a.length-1])}else n===st.PAGE?s=[...Ci.PAGE_MESSAGES_PATH]:n===ot.HTTP?s=[...Ci.HTTP_MESSAGES_PATH]:n===ot.CASEMESSAGES?s=[...Ci.CASE_MESSAGE_PATH]:r&&(s=[ot.CONTEXT_DATA,...o.split(".")]);return s.filter(Boolean)},Pi=e=>{const{type:t,property:n,category:r,context:a,pageReference:s}=e;let o;n&&(o=n.slice(1));const i=Uc(a);let c=[];const d=dt.getIn(i,bi(o,s,r));return t&&"all"!==t?(d&&Array.isArray(d)&&d.length>0&&(c=d.filter((e=>e.type===t))),c):d},vi=e=>{const{property:t,pageReference:n,category:r,context:a,type:s,isListEntry:o,clearContextMessages:i}=e,c={context:a,type:s};t&&!o?(c.property=t,c.pageReference=n):o?(c.pageReference=n,c.isListEntry=o):c.category=r,jc(i?{type:Un,payload:{stateObj:e.stateObj,context:a}}:{type:Un,payload:c})},Oi=e=>{const{messages:t,property:n,pageReference:r,category:a,context:s}=e,o={messages:t,context:s};n?(o.property=n,o.pageReference=r):o.category=a,jc({type:jn,payload:o})},Ti=(e,t,n)=>{for(const r of Object.keys(e))t.push(r),r===ot.SUMMARY_OF_MESSAGES?n.push([...t]):"object"==typeof e[r]&&Ti(e[r],t,n),t.pop();return n},Ri=(e,t)=>{let n=Pi({context:ot.APP.ROOT,category:"HTTP"});if(e){const e=Pi({context:t,category:"HTTP"});n?e&&(n=n.concat(Pi({context:t,category:"HTTP"}))):n=Pi({context:t,category:"HTTP"})}return n},Ni=e=>{let t=null;t=Yo(e)[0]?Go(Yo(e)[0]):e,t&&vi({context:t,stateObj:Uc(t),clearContextMessages:!0})},Di={addMessages:Oi,getValidationErrorMessages:e=>{const t=Uc(e),n=[],r=dt.getIn(t,[...Ci.CONTENT_FIELDS_PATH])||{};return Ti(r,[],[]).forEach((e=>{const t=dt.getIn(r,[...e,ot.PROPERTY_MESSAGES]);t&&Object.keys(t).forEach((e=>{t[e].length&&t[e][0].type===ot.MESSAGES.MESSAGES_TYPE_ERROR&&(t[e][0].fieldLabel?n.push({label:`${t[e][0].fieldLabel}:`,description:t[e][0].message}):n.push(t[e][0].message))}))})),n},getMessages:Pi,clearMessages:vi,getRootContainerHttpMessages:Ri,clearContextMessagesInActiveWorkArea:Ni},xi=Di,wi=new class{constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,t){this.actionHandlers[e]=t}},Mi=class{static#e=[];static#t=!1;static getActionHandlers=(e,t,n)=>{const r=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==t||e.forEach((e=>{const t=wi.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#n=(e,t,n)=>{for(let r=0;r<e.length;r++){const a=e[r],s={actionHandler:a.handler,component:t,eventType:n,config:a.config};this.#e.push(s)}};static buildActionObject=(e,t)=>{const n={...e};return n.context=t.getContextName(),n.pageReference=t.getPageReference(),n.actionMgrID=Ps.getNextActionMgrId(),n};static#r=e=>{const t=e.actionHandler,n=e.component,{config:r}=e,a={};Ec.resolveProps(r,a,n),t&&(t(e.eventType,a,n),this.#a())};static#a=()=>{if(!this.#t){if(0===this.#e.length)return;const e=this.#e.shift();this.#r(e),e.config&&"true"===e.config.parallel&&this.#e.length>0&&this.#a()}};static#s=()=>{this.#a()};static#o=(e,t,n)=>{this.#n(e,t,n),this.#s()};static getFullRef=e=>{const t=e.getPageReference(),n=e.getComponentConfig().value;return Ec.getContextPath(t,n)};static#i(e,t){const n=e.getComponentConfig().behaviours||[];for(let r=0;r<n.length;r+=1){const{behaviour:a,actions:s}=n[r];if(s){const n=this.getActionHandlers(s,a,t);n&&n.length>0&&this.#o(n,e,t)}}}static changeHandler=(e,t)=>{const n=e.getStateProps().value,r=e.getContextName();if(vi({type:st.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:r}),t instanceof Event||t.nativeEvent instanceof Event||null!==t.value&&void 0===t.prop){let{target:n}=t;null===n&&t&&t.auxiliaryTarget&&(n=t.auxiliaryTarget);const a=void 0===n?t.value:"value"in n?n.value:n.innerText,s=this.getFullRef(e);jc({type:Ft,payload:{reference:s,value:a,context:r}}),void 0!==n&&this.isEditable(n)&&!this.isNonKeyInput(n)||jc({type:Gt,payload:{reference:s,pageReference:e.getPageReference(),value:a,context:r,propertyName:e.getComponentConfig().value,classID:e.getValue(ot.CLASS_ID)}})}else{const n=e.getPageReference(),a=e.getStateProps();for(const e of Object.keys(t)){const s=a[e],o=t[e];jc({type:Ft,payload:{reference:Ec.getContextPath(n,s),value:o,context:r}}),jc({type:Gt,payload:{reference:Ec.getContextPath(n,s),value:o,context:r}})}}};static blurHandler=(e,t)=>{let{target:n}=t;null===n&&t&&t.auxiliaryTarget&&(n=t.auxiliaryTarget);const{value:r,validationValue:a}=n,s=this.getFullRef(e),o=e.getContextName();n.clearMessages&&vi({type:st.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:o}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?a:r),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,r),!this.isNonKeyInput(n)&&jc({type:Gt,payload:{reference:s,pageReference:e.getPageReference(),value:r,context:o,propertyName:e.getComponentConfig().value,classID:e.getValue(ot.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.#i(e,n)};static pause=()=>{this.#t=!0};static resume=()=>{this.#t=!1,this.#a()};static isQueueEmpty=()=>0===this.#e.length;static clearQueue=()=>{this.#e=[]};static getActionsQueue=()=>this.#e;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},Li="CREATE_WORK",ji=e=>({type:Li,payload:e}),Ui=(e,t)=>{const n=[];for(const r in e)if("object"==typeof e[r]&&-1!==r.indexOf("[")){const a=r.substring(0,r.indexOf("[")),s=r.substring(r.indexOf("[")+1,r.indexOf("]"));t[a].splice(s,1,e[r]),n.push(a)}else"object"==typeof e[r]?(t[r]||(t[r]=Array.isArray(e[r])?[]:{}),Ui(e[r],t[r])):t[r]=e[r];for(const r in t)(Array.isArray(t[r])&&-1===n.indexOf(r)||!Array.isArray(t[r])&&!Object.hasOwnProperty.call(e,r))&&delete t[r]},ki=(e,t={})=>{const{serverPrecedenceFields:n=[]}=t,{context:r,data:a,isArrayDeepMerge:s,preserveClientChanges:o=!1}=e,i=hs(r,!0);((e,t={})=>{const n=qa.buildClientChangeList(e)||{};Object.keys(n).forEach((e=>{dt.buildObject(e,t,n[e])}))})(r,i);const c=Uc(r);let d={};c&&void 0!==c&&(d=JSON.parse(JSON.stringify(c)),Ui(i,d));const l={caseInfo:{content:{...d?.caseInfo?.content}}};let u=a;return o?(n.forEach((e=>{dt.deleteIn(l,`caseInfo.content.${e}`)})),u=zc(a,l,{isArrayDeepMerge:!s})):((e,t)=>{const n=ls[e]||{};Object.keys(n).forEach((e=>{dt.hasIn(t,e)&&(n[e].value=dt.getIn(t,e))}))})(r,a),{type:rn,payload:{...e,data:u}}},Fi=e=>({type:"SHOW_HARNESS",payload:e}),Vi=e=>({type:Bt,payload:e}),Gi=e=>({type:Ht,payload:e}),Bi=e=>({type:"ADD_WORK",payload:e}),Hi=e=>({type:Qt,payload:e}),Wi=e=>({type:cn,payload:e}),qi=e=>({type:dn,payload:e}),zi=e=>({type:ln,payload:e}),Yi=e=>({type:pn,payload:e}),Ki=e=>({type:hn,payload:e}),Ji=e=>({type:yn,payload:e}),Xi=e=>({type:mn,payload:e}),Qi=e=>{const{containerItemID:t}=e;return e.suggestionContexts=Jo(t),{type:En,payload:e}},Zi=e=>({type:An,payload:e}),ec=e=>({type:In,payload:e}),tc=e=>({type:jn,payload:e}),nc=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=Wo(n)),e.context=r,e.deleteContext=!li(n),e.childContainers=Yo(n),e.childContainersContexts=Ko(n),e.transientItems=ui([...e.childContainersContexts,n]),e.suggestionContexts=Jo(n),n===t&&(e.caseID=Vc(ot.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=Vc(ot.CASE_INFO.REMOTESYSTEMID,"",t)),{type:un,payload:e}},rc=e=>{const{containerItemID:t}=e;return e.transientItems=ui([...Ko(t),t]),{type:gn,payload:e}},ac=e=>{const{transientItemID:t}=e;return e.transientItems=[t],{type:fn,payload:e}},sc=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=Wo(n)),e.context=r,e.childContainers=Yo(n),e.childContainersContexts=Ko(n),e.transientItems=ui([...e.childContainersContexts,n]),e.suggestionContexts=Jo(n),n===t&&(e.caseID=Vc(ot.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=Vc(ot.CASE_INFO.REMOTESYSTEMID,"",t)),{type:_n,payload:e}},oc=e=>({type:en,payload:e}),ic=e=>({type:nn,payload:e}),cc=e=>({type:sn,payload:e}),dc=(e,...t)=>(Mi.resume(),e(...t)),lc=(e,t,n,r,a)=>({type:on,payload:{msg:e,err:t,context:n,formFields:r,actionMgrID:a}}),uc=e=>({type:Vn,payload:e}),pc=e=>({type:Gn,payload:e}),hc=e=>({type:Bn,payload:e}),fc=e=>({type:"SHOW_CASE_PREVIEW",payload:e}),gc=e=>({type:Jt,payload:e}),yc=e=>({type:Ft,payload:e}),mc=ot.SUMMARY_OF_LISTS,Ic=ot.SUMMARY_OF_WHEN_CONDITIONS,Ec=class{static updateData(e){Object.keys(e).forEach((t=>{jc(ki({context:t,data:e[t]}))}))}static updateContextData(e){Object.keys(e).forEach((t=>{jc(ki({context:t,data:e[t]}))}))}static resolveWhen(e,t){return!!t.getContextDataValue(`.${Ic}.${e}`)}static resolveFieldValue(e,t){return t.getLocalizedValue(e)}static resolveNavigation(e,t){return Pt([this.resolveName(e,t)])}static resolveView(e,t,n=""){const r=bt([this.resolveName(e,t)]);let a=[];return Array.isArray(r)&&r.length>0?(t&&(n||(n=t.getValue(ot.CLASS_ID)),a=r.filter((e=>e[ot.CLASSID]===n))),0===a.length?r[0]:a[0]):r}static resolveName(e,t){return e?.startsWith("param.")?(e=e.substring(6),t.getContextDataValue(`.$parameters.${e}`)):(e?.startsWith("@")&&(e=kt.handleAnnotation(e,t)),e)}static getContextPath(e,t){return"number"!=typeof t&&!t||"number"!=typeof(t=kt.trimAnnotation(t))&&"string"!=typeof t?e:"number"==typeof t&&parseInt(t,10)===t?`${e}[${t}]`:"."===t.charAt(0)?e+t:t}static resolveReference(e,t){const{type:n}=e;let r;if("reference"===n){const{config:n}=e,a=n.type,{ref:s,name:o,context:i}=n;let c;return i&&(c=i.startsWith(ot.CLASS_ANNOTATION)?i.split(ot.CLASS_ANNOTATION)[1].trim():this.resolveClassID(i,t.getPageReference(),t.getContextName())),"navigation"===a?r=this.resolveNavigation(s||o,t):"view"===a?r=this.resolveView(s||o,t,c||""):"widget"===a&&(r={type:"Widget",config:{name:o,ruleClass:c}}),r}return e}static resolvePropertyReference(e,t,n){return Vc(t,e,n)}static getProperty(e,t,n){let r=this.resolvePropertyReference(t,e,n);if(null==r||0===r.length){const a=Bc(`${t}.${mc}`,e,n);a&&(r=this.resolvePropertyReference(t,a,n))}return r}static getProperyValue(e,t,n){return e=kt.trimAnnotation(e),this.getProperty(e,t,n)}static _handlePropString(e,t,n,r){n.startsWith("@")?e[t]=kt.handleAnnotation(n,r):e[t]=n}static _resolveProps(e,t){e&&Object.keys(e).forEach((n=>{const r=e[n];"string"==typeof r?this._handlePropString(e,n,r,t):Array.isArray(r)?r.forEach((n=>{this._resolveProps("object"==typeof n?n:e[n],t)})):"object"==typeof r&&this._resolveProps(e[n],t)}))}static resolveProps(e,t,n){return e&&t?(dt.mergeDeep(e,t),this._resolveProps(t,n),t):t}static resolveClassID(e,t,n){let r=`${t}${kt.trimAnnotation(e)}`;for(;r;){const e=Vc(ot.CLASS_ID,r,n);if(e)return e;r=r.substring(0,r.lastIndexOf("."))}return null}},Ac="REFRESH_DATA",_c=e=>({type:Ac,payload:e}),Sc={},$c=e=>{e&&Sc[e]&&delete Sc[e]},Cc=(e,t,n,r,a)=>{e&&n&&t&&(r&&(r=dt.convertPageRefToClipboardPageNotation(r)),jc(_c({ID:e,viewID:t,context:n,options:a,caseViewAction:!0,interestPage:r})))},bc=(e,t,n)=>{Sc[t]||(Sc[t]={}),Sc[t][e]||(Sc[t][e]={pageReference:n})},Pc=(e,t)=>{const n={pageName:(r=t.substring(t.lastIndexOf(" ")+1)).substring(0,r.lastIndexOf(".")),propertyName:r.substring(r.lastIndexOf(".")+1)};var r;return!!At(n.propertyName,e.getValue(ot.CLASS_ID,n.pageName))?.isDeclarativeTarget},vc=(e,t,n)=>{const r=Ds(e,t),a=Ec.getProperyValue(st.CASE_INFO.ACTIVE_ACTION_ID,t,e)?Ec.getProperyValue(st.CASE_INFO.ACTIVE_ACTION_ID,t,e):Ec.getProperyValue(st.CASE_INFO.ASSIGNMENTACTION_ID,t,e);((e,t,n,r,a)=>{if(!(e&&n&&t))return;const s=a.actionMgrID||Ps.getNextActionMgrId(),o={ID:e,actionID:t,context:n,caseWideAction:r,options:{...a,actionMgrID:s}};a.isFillFormWithAI?jc((e=>({type:Yn,payload:e}))(o)):jc(_c(o))})(r?Ec.getProperyValue(st.CASE_INFO.CASE_INFO_ID,t,e):Ec.getProperyValue(st.CASE_INFO.ASSIGNMENT_ID,t,e),a,e,r,n)},Oc=e=>{const{context:t,pageReference:n}=e,r=(e=>Sc[e]&&Object.keys(Sc[e]).length>0&&xs(e))(t);if(r)if(Ec.getProperyValue(ot.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,n,t)){const e=Ec.getProperyValue(st.CASE_INFO.CASE_INFO_ID,n,t),r=Ec.getProperyValue(ot.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,n,t),a=Ec.getProperyValue(ot.CONTEXT_DATA_MODAL_VIEW.INTERESTPAGE,n,t);Cc(e,r,t,a,{})}else vc(t,n,{})},Tc=(e,t)=>(e?.options?.refreshFor&&(t+=`?refreshFor=${e?.options?.refreshFor}`),e?.options?.isFillFormWithAI&&(t+="?fillFormWithAI=true"),t),Rc=new class{constructor(){this.components={}}_checkComponent(e,t){return!!this.components[t]?.[e]}start(e,t,n,r,a){const s={viewName:e,pageReference:n,contextName:r,isInProgress:!0,active:!0,caseKey:t};this.components[r]=this.components[r]||{},this.components[r][a]=s}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:a}=n;Cc(e,r,t,a,{})}}};class Nc{constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,t,n,r,a,s="singleRecord"){if(!e||!t||!n||!r?.length>0)return;const o=n.startsWith(".")?`${t}.${n.substring(1)}`:n,i=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(t,n,a);r.forEach((e=>{if(!e)return;let t=e.startsWith(".")?e.substring(1):e;if(t=dt.getFullPropertyReference([c,t]),t in i){const e=i[t];e.find((e=>e.propertyName===o))||e.push({propertyName:o,mode:s})}else i[t]=[{propertyName:o,mode:s}]})),Object.keys(i).length>0&&(this.cascadeResetSubscribers[e]=i)}deregisterResetDependencies(e,t,n,r,a){if(!e||!t||!n||!r?.length>0)return;const s=n.startsWith(".")?`${t}.${n.substring(1)}`:n,o=this.cascadeResetSubscribers[e]||{},i=this._handlePageReference(t,n,a);r.forEach((e=>{if(e){let t=e.startsWith(".")?e.substring(1):e;if(t=dt.getFullPropertyReference([i,t]),t in o){const e=o[t];dt.removeExistingDependentProperty(e,s)}}})),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,a){this.cascadeSubscribers[e]=this.cascadeSubscribers[e]||{},n.forEach((n=>{this.cascadeSubscribers[e][`${t}${n}`]=this.cascadeSubscribers[e][`${t}${n}`]||{};const s=this.cascadeSubscribers[e][`${t}${n}`];if(!s[a]){s[a]=r;const o=Vc(n,t,e);s.previousValue="object"==typeof value?null:o}}))}registerListField(e,t,n,r,a){const s=Nc._getFieldsForList(e,t,n);s.length>0&&(this.registerFields(e,t,s,r,a),Rc.enableCascade(e))}unRegisterListField(e,t,n,r){const a=Nc._getFieldsForList(e,t,n);a.length>0&&this.unRegisterFields(e,t,a,r)}static _getFieldsForList(e,t,n){const r=[],a=At(n,Vc("classID",t,e));return a&&a.datasource&&a.datasource.parameters&&Object.values(a.datasource.parameters).forEach((e=>{if(kt.isProperty(e)){const t=kt.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 a=this.cascadeSubscribers[e][`${t}${n}`];a[r]&&delete a[r]}))}triggerCascade(e,t,n,r){let a=!1;this.cascadeSubscribers[e]&&this.cascadeSubscribers[e][t]&&(Object.keys(this.cascadeSubscribers[e][t]).forEach((s=>{const o=this.cascadeSubscribers[e][t];"previousValue"!==s&&o.previousValue!==n&&(a=!0,r?r.add(o[s]):o[s](t,n))})),a&&(this.cascadeSubscribers[e][t].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,t,n=ot.CASE_INFO.CASE_INFO_CONTENT){if(!e||!t)return;const r=new Set,a=dt.getIn(e,n);a&&Object.keys(a).length>0&&(this._handleCascadeObject(a,t,n,r),r.forEach((e=>{e()})))}_handleCascadeObject(e,t,n,r){"object"==typeof e?Object.keys(e).forEach((a=>{const s=`${n}.${a}`;this._handleCascadeObject(e[a],t,s,r)})):(this.triggerCascade(t,n,e,r),this._triggerListChanges(t,n,e))}_handlePageReference(e,t,n){let r=e;return"Page"===n&&t.startsWith(".")&&t.match(/[.]/g).length>1&&(r=`${e}${t.substring(0,t.lastIndexOf("."))}`),r}registerForListChanges(e=(()=>{})){this.listChangeSubscribers.push(e)}_triggerListChanges(e,t,n){0!==this.listChangeSubscribers.length&&/[a-zA-Z]+\.(\d+)\./g.test(t)&&(t=t.replace(/\.(\d+)/g,"[$1]"),this.listChangeSubscribers.forEach((r=>{r(e,t,n)})))}unRegisterForListChanges(){this.listChangeSubscribers=[]}}const Dc=new Nc;let xc=null;const wc=e=>e.split(/\.(?![^[]+\])|\[|\]/g).filter(Boolean),Mc=e=>{xc=e},Lc=()=>xc,jc=e=>{e&&(Lc()?.dispatch(e),"MERGE_DATA"===e.type&&Dc.handleServerChanges(e.payload.data,e.payload.context,e.payload.rootPageReference))},Uc=e=>Lc().getState().data?.[e],kc=()=>Lc().getState().data[ot.SHARED],Fc=(e,t,n)=>{if(!(r=e)||'"'===r.charAt(0)||"'"===r.charAt(0))return(e=>e&&e.trim().substring(1,e.length-1))(e);var r;const a="."===e.charAt(0)?t+e:e,s=wc(a);return dt.getIn(n,s)},Vc=(e,t,n)=>Fc(e,t,Uc(n)),Gc=(e,t,n)=>Fc(t,e?`${ot.CONTEXT_DATA}.${e}`:`${ot.CONTEXT_DATA}`,Uc(n)),Bc=(e,t,n)=>((e,t,n)=>{const r=wc(`${t}.${n}`);return dt.getIn(e,r)})(Uc(n),`${ot.CONTEXT_DATA}.${e}`,t),Hc=e=>{const{context:t}=e;if(Lc().getState().data[t])return Zt;const{action:n}=e;return-1!==["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"].indexOf(n)?ln:Zt},Wc=(e,t)=>{const n=wc(t);return dt.deleteIn(e,n)},qc=e=>!Array.isArray(e)&&"object"==typeof e,zc=(e,t,n={})=>{const{isArrayDeepMerge:r}=n;Array.isArray(e)&&!t&&(t=[]);const a=(e,t)=>{if(qc(e)&&null!==t&&"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)return Ve()(e,t,a);if(Array.isArray(e)&&null!==t&&Array.isArray(t)){if(r)return Ve()(e,t,a);{const n=t.length;if(void 0===r&&n===e.length)return Ve()(e,t,a)}}return""===t&&e&&"object"==typeof e?e:t};return a(e,t)},Yc=(e,t,n,r={})=>{const{isArrayDeepMerge:a=!0}=r,s=wc(t);if("object"==typeof n){const t=zc(dt.getIn(e,s),n,{isArrayDeepMerge:a});return dt.setIn(e,s,t)}return dt.setIn(e,s,n)},Kc=(e,t,n)=>{const r=wc(t);return dt.setIn(e,r,n)};function Jc(e,t){return function(){return e.apply(t,arguments)}}const{toString:Xc}=Object.prototype,{getPrototypeOf:Qc}=Object,Zc=(ed=Object.create(null),e=>{const t=Xc.call(e);return ed[t]||(ed[t]=t.slice(8,-1).toLowerCase())});var ed;const td=e=>(e=e.toLowerCase(),t=>Zc(t)===e),nd=e=>t=>typeof t===e,{isArray:rd}=Array,ad=nd("undefined"),sd=td("ArrayBuffer"),od=nd("string"),id=nd("function"),cd=nd("number"),dd=e=>null!==e&&"object"==typeof e,ld=e=>{if("object"!==Zc(e))return!1;const t=Qc(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},ud=td("Date"),pd=td("File"),hd=td("Blob"),fd=td("FileList"),gd=td("URLSearchParams"),[yd,md,Id,Ed]=["ReadableStream","Request","Response","Headers"].map(td);function Ad(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,a;if("object"!=typeof e&&(e=[e]),rd(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let o;for(r=0;r<s;r++)o=a[r],t.call(null,e[o],o,e)}}function _d(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,a=n.length;for(;a-- >0;)if(r=n[a],t===r.toLowerCase())return r;return null}const Sd="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,$d=e=>!ad(e)&&e!==Sd,Cd=(bd="undefined"!=typeof Uint8Array&&Qc(Uint8Array),e=>bd&&e instanceof bd);var bd;const Pd=td("HTMLFormElement"),vd=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Od=td("RegExp"),Td=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ad(n,((n,a)=>{let s;!1!==(s=t(n,a,e))&&(r[a]=s||n)})),Object.defineProperties(e,r)},Rd="abcdefghijklmnopqrstuvwxyz",Nd="0123456789",Dd={DIGIT:Nd,ALPHA:Rd,ALPHA_DIGIT:Rd+Rd.toUpperCase()+Nd},xd=td("AsyncFunction"),wd=(Md="function"==typeof setImmediate,Ld=id(Sd.postMessage),Md?setImmediate:Ld?(jd=`axios@${Math.random()}`,Ud=[],Sd.addEventListener("message",(({source:e,data:t})=>{e===Sd&&t===jd&&Ud.length&&Ud.shift()()}),!1),e=>{Ud.push(e),Sd.postMessage(jd,"*")}):e=>setTimeout(e));var Md,Ld,jd,Ud;const kd="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Sd):"undefined"!=typeof process&&process.nextTick||wd,Fd={isArray:rd,isArrayBuffer:sd,isBuffer:function(e){return null!==e&&!ad(e)&&null!==e.constructor&&!ad(e.constructor)&&id(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||id(e.append)&&("formdata"===(t=Zc(e))||"object"===t&&id(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&sd(e.buffer),t},isString:od,isNumber:cd,isBoolean:e=>!0===e||!1===e,isObject:dd,isPlainObject:ld,isReadableStream:yd,isRequest:md,isResponse:Id,isHeaders:Ed,isUndefined:ad,isDate:ud,isFile:pd,isBlob:hd,isRegExp:Od,isFunction:id,isStream:e=>dd(e)&&id(e.pipe),isURLSearchParams:gd,isTypedArray:Cd,isFileList:fd,forEach:Ad,merge:function e(){const{caseless:t}=$d(this)&&this||{},n={},r=(r,a)=>{const s=t&&_d(n,a)||a;ld(n[s])&&ld(r)?n[s]=e(n[s],r):ld(r)?n[s]=e({},r):rd(r)?n[s]=r.slice():n[s]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Ad(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(Ad(t,((t,r)=>{n&&id(t)?e[r]=Jc(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let a,s,o;const i={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),s=a.length;s-- >0;)o=a[s],r&&!r(o,e,t)||i[o]||(t[o]=e[o],i[o]=!0);e=!1!==n&&Qc(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Zc,kindOfTest:td,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(rd(e))return e;let t=e.length;if(!cd(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Pd,hasOwnProperty:vd,hasOwnProp:vd,reduceDescriptors:Td,freezeMethods:e=>{Td(e,((t,n)=>{if(id(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];id(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 rd(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:_d,global:Sd,isContextDefined:$d,ALPHABET:Dd,generateString:(e=16,t=Dd.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&id(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(dd(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const a=rd(e)?[]:{};return Ad(e,((e,t)=>{const s=n(e,r+1);!ad(s)&&(a[t]=s)})),t[r]=void 0,a}}return e};return n(e,0)},isAsyncFn:xd,isThenable:e=>e&&(dd(e)||id(e))&&id(e.then)&&id(e.catch),setImmediate:wd,asap:kd};function Vd(e,t,n,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a,this.status=a.status?a.status:null)}Fd.inherits(Vd,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Fd.toJSONObject(this.config),code:this.code,status:this.status}}});const Gd=Vd.prototype,Bd={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Bd[e]={value:e}})),Object.defineProperties(Vd,Bd),Object.defineProperty(Gd,"isAxiosError",{value:!0}),Vd.from=(e,t,n,r,a,s)=>{const o=Object.create(Gd);return Fd.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Vd.call(o,e.message,t,n,r,a),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const Hd=Vd;function Wd(e){return Fd.isPlainObject(e)||Fd.isArray(e)}function qd(e){return Fd.endsWith(e,"[]")?e.slice(0,-2):e}function zd(e,t,n){return e?e.concat(t).map((function(e,t){return e=qd(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Yd=Fd.toFlatObject(Fd,{},null,(function(e){return/^is[A-Z]/.test(e)})),Kd=function(e,t,n){if(!Fd.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Fd.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Fd.isUndefined(t[e])}))).metaTokens,a=n.visitor||d,s=n.dots,o=n.indexes,i=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Fd.isSpecCompliantForm(t);if(!Fd.isFunction(a))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Fd.isDate(e))return e.toISOString();if(!i&&Fd.isBlob(e))throw new Hd("Blob is not supported. Use a Buffer instead.");return Fd.isArrayBuffer(e)||Fd.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,n,a){let i=e;if(e&&!a&&"object"==typeof e)if(Fd.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Fd.isArray(e)&&function(e){return Fd.isArray(e)&&!e.some(Wd)}(e)||(Fd.isFileList(e)||Fd.endsWith(n,"[]"))&&(i=Fd.toArray(e)))return n=qd(n),i.forEach((function(e,r){!Fd.isUndefined(e)&&null!==e&&t.append(!0===o?zd([n],r,s):null===o?n:n+"[]",c(e))})),!1;return!!Wd(e)||(t.append(zd(a,n,s),c(e)),!1)}const l=[],u=Object.assign(Yd,{defaultVisitor:d,convertValue:c,isVisitable:Wd});if(!Fd.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Fd.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),Fd.forEach(n,(function(n,s){!0===(!(Fd.isUndefined(n)||null===n)&&a.call(t,n,Fd.isString(s)?s.trim():s,r,u))&&e(n,r?r.concat(s):[s])})),l.pop()}}(e),t};function Jd(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Xd(e,t){this._pairs=[],e&&Kd(e,this,t)}const Qd=Xd.prototype;Qd.append=function(e,t){this._pairs.push([e,t])},Qd.toString=function(e){const t=e?function(t){return e.call(this,t,Jd)}:Jd;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Zd=Xd;function el(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function tl(e,t,n){if(!t)return e;const r=n&&n.encode||el,a=n&&n.serialize;let s;if(s=a?a(t,n):Fd.isURLSearchParams(t)?t.toString():new Zd(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}const nl=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){Fd.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},rl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},al={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Zd,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},sl="undefined"!=typeof window&&"undefined"!=typeof document,ol="object"==typeof navigator&&navigator||void 0,il=sl&&(!ol||["ReactNative","NativeScript","NS"].indexOf(ol.product)<0),cl="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,dl=sl&&window.location.href||"http://localhost",ll={...l,...al},ul=function(e){function t(e,n,r,a){let s=e[a++];if("__proto__"===s)return!0;const o=Number.isFinite(+s),i=a>=e.length;return s=!s&&Fd.isArray(r)?r.length:s,i?(Fd.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!o):(r[s]&&Fd.isObject(r[s])||(r[s]=[]),t(e,n,r[s],a)&&Fd.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const a=n.length;let s;for(r=0;r<a;r++)s=n[r],t[s]=e[s];return t}(r[s])),!o)}if(Fd.isFormData(e)&&Fd.isFunction(e.entries)){const n={};return Fd.forEachEntry(e,((e,r)=>{t(function(e){return Fd.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},pl={transitional:rl,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,a=Fd.isObject(e);if(a&&Fd.isHTMLForm(e)&&(e=new FormData(e)),Fd.isFormData(e))return r?JSON.stringify(ul(e)):e;if(Fd.isArrayBuffer(e)||Fd.isBuffer(e)||Fd.isStream(e)||Fd.isFile(e)||Fd.isBlob(e)||Fd.isReadableStream(e))return e;if(Fd.isArrayBufferView(e))return e.buffer;if(Fd.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Kd(e,new ll.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ll.isNode&&Fd.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=Fd.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Kd(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return a||r?(t.setContentType("application/json",!1),function(e,t,n){if(Fd.isString(e))try{return(0,JSON.parse)(e),Fd.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||pl.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Fd.isResponse(e)||Fd.isReadableStream(e))return e;if(e&&Fd.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Hd.from(e,Hd.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ll.classes.FormData,Blob:ll.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Fd.forEach(["delete","get","head","post","put","patch"],(e=>{pl.headers[e]={}}));const hl=pl,fl=Fd.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"]),gl=Symbol("internals");function yl(e){return e&&String(e).trim().toLowerCase()}function ml(e){return!1===e||null==e?e:Fd.isArray(e)?e.map(ml):String(e)}function Il(e,t,n,r,a){return Fd.isFunction(r)?r.call(this,t,n):(a&&(t=n),Fd.isString(t)?Fd.isString(r)?-1!==t.indexOf(r):Fd.isRegExp(r)?r.test(t):void 0:void 0)}class El{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function a(e,t,n){const a=yl(t);if(!a)throw new Error("header name must be a non-empty string");const s=Fd.findKey(r,a);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=ml(e))}const s=(e,t)=>Fd.forEach(e,((e,n)=>a(e,n,t)));if(Fd.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(Fd.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,a;return e&&e.split("\n").forEach((function(e){a=e.indexOf(":"),n=e.substring(0,a).trim().toLowerCase(),r=e.substring(a+1).trim(),!n||t[n]&&fl[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(Fd.isHeaders(e))for(const[t,r]of e.entries())a(r,t,n);else null!=e&&a(t,e,n);return this}get(e,t){if(e=yl(e)){const n=Fd.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(Fd.isFunction(t))return t.call(this,e,n);if(Fd.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=yl(e)){const n=Fd.findKey(this,e);return!(!n||void 0===this[n]||t&&!Il(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function a(e){if(e=yl(e)){const a=Fd.findKey(n,e);!a||t&&!Il(0,n[a],a,t)||(delete n[a],r=!0)}}return Fd.isArray(e)?e.forEach(a):a(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const a=t[n];e&&!Il(0,this[a],a,e,!0)||(delete this[a],r=!0)}return r}normalize(e){const t=this,n={};return Fd.forEach(this,((r,a)=>{const s=Fd.findKey(n,a);if(s)return t[s]=ml(r),void delete t[a];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(a):String(a).trim();o!==a&&delete t[a],t[o]=ml(r),n[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Fd.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Fd.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[gl]=this[gl]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=yl(e);t[r]||(function(e,t){const n=Fd.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,a){return this[r].call(this,t,e,n,a)},configurable:!0})}))}(n,e),t[r]=!0)}return Fd.isArray(e)?e.forEach(r):r(e),this}}El.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Fd.reduceDescriptors(El.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Fd.freezeMethods(El);const Al=El;function _l(e,t){const n=this||hl,r=t||n,a=Al.from(r.headers);let s=r.data;return Fd.forEach(e,(function(e){s=e.call(n,s,a.normalize(),t?t.status:void 0)})),a.normalize(),s}function Sl(e){return!(!e||!e.__CANCEL__)}function $l(e,t,n){Hd.call(this,null==e?"canceled":e,Hd.ERR_CANCELED,t,n),this.name="CanceledError"}Fd.inherits($l,Hd,{__CANCEL__:!0});const Cl=$l;function bl(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Hd("Request failed with status code "+n.status,[Hd.ERR_BAD_REQUEST,Hd.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Pl=(e,t,n=3)=>{let r=0;const a=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a,s=0,o=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),d=r[o];a||(a=c),n[s]=i,r[s]=c;let l=o,u=0;for(;l!==s;)u+=n[l++],l%=e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),c-a<t)return;const p=d&&c-d;return p?Math.round(1e3*u/p):void 0}}(50,250);return function(e,t){let n,r,a=0,s=1e3/t;const o=(t,s=Date.now())=>{a=s,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),i=t-a;i>=s?o(e,t):(n=e,r||(r=setTimeout((()=>{r=null,o(n)}),s-i)))},()=>n&&o(n)]}((n=>{const s=n.loaded,o=n.lengthComputable?n.total:void 0,i=s-r,c=a(i);r=s,e({loaded:s,total:o,progress:o?s/o:void 0,bytes:i,rate:c||void 0,estimated:c&&o&&s<=o?(o-s)/c:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),n)},vl=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ol=e=>(...t)=>Fd.asap((()=>e(...t))),Tl=ll.hasStandardBrowserEnv?function(){const e=ll.navigator&&/(msie|trident)/i.test(ll.navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=Fd.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},Rl=ll.hasStandardBrowserEnv?{write(e,t,n,r,a,s){const o=[e+"="+encodeURIComponent(t)];Fd.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),Fd.isString(r)&&o.push("path="+r),Fd.isString(a)&&o.push("domain="+a),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Nl(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Dl=e=>e instanceof Al?{...e}:e;function xl(e,t){t=t||{};const n={};function r(e,t,n){return Fd.isPlainObject(e)&&Fd.isPlainObject(t)?Fd.merge.call({caseless:n},e,t):Fd.isPlainObject(t)?Fd.merge({},t):Fd.isArray(t)?t.slice():t}function a(e,t,n){return Fd.isUndefined(t)?Fd.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function s(e,t){if(!Fd.isUndefined(t))return r(void 0,t)}function o(e,t){return Fd.isUndefined(t)?Fd.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(n,a,s){return s in t?r(n,a):s in e?r(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:i,headers:(e,t)=>a(Dl(e),Dl(t),!0)};return Fd.forEach(Object.keys(Object.assign({},e,t)),(function(r){const s=c[r]||a,o=s(e[r],t[r],r);Fd.isUndefined(o)&&s!==i||(n[r]=o)})),n}const wl=e=>{const t=xl({},e);let n,{data:r,withXSRFToken:a,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=t;if(t.headers=i=Al.from(i),t.url=tl(Nl(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Fd.isFormData(r))if(ll.hasStandardBrowserEnv||ll.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(!1!==(n=i.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}if(ll.hasStandardBrowserEnv&&(a&&Fd.isFunction(a)&&(a=a(t)),a||!1!==a&&Tl(t.url))){const e=s&&o&&Rl.read(o);e&&i.set(s,e)}return t},Ml="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=wl(e);let a=r.data;const s=Al.from(r.headers).normalize();let o,i,c,d,l,{responseType:u,onUploadProgress:p,onDownloadProgress:h}=r;function f(){d&&d(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let g=new XMLHttpRequest;function y(){if(!g)return;const r=Al.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());bl((function(e){t(e),f()}),(function(e){n(e),f()}),{data:u&&"text"!==u&&"json"!==u?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(y)},g.onabort=function(){g&&(n(new Hd("Request aborted",Hd.ECONNABORTED,e,g)),g=null)},g.onerror=function(){n(new Hd("Network Error",Hd.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const a=r.transitional||rl;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Hd(t,a.clarifyTimeoutError?Hd.ETIMEDOUT:Hd.ECONNABORTED,e,g)),g=null},void 0===a&&s.setContentType(null),"setRequestHeader"in g&&Fd.forEach(s.toJSON(),(function(e,t){g.setRequestHeader(t,e)})),Fd.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),u&&"json"!==u&&(g.responseType=r.responseType),h&&([c,l]=Pl(h,!0),g.addEventListener("progress",c)),p&&g.upload&&([i,d]=Pl(p),g.upload.addEventListener("progress",i),g.upload.addEventListener("loadend",d)),(r.cancelToken||r.signal)&&(o=t=>{g&&(n(!t||t.type?new Cl(null,e,g):t),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const m=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);m&&-1===ll.protocols.indexOf(m)?n(new Hd("Unsupported protocol "+m+":",Hd.ERR_BAD_REQUEST,e)):g.send(a||null)}))},Ll=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const a=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Hd?t:new Cl(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,a(new Hd(`timeout ${t} of ms exceeded`,Hd.ETIMEDOUT))}),t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(a):e.removeEventListener("abort",a)})),e=null)};e.forEach((e=>e.addEventListener("abort",a)));const{signal:i}=r;return i.unsubscribe=()=>Fd.asap(o),i}},jl=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,a=0;for(;a<n;)r=a+t,yield e.slice(a,r),a=r},Ul=(e,t,n,r)=>{const a=async function*(e,t){for await(const n of 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()}}(e))yield*jl(n,t)}(e,t);let s,o=0,i=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await a.next();if(t)return i(),void e.close();let s=r.byteLength;if(n){let e=o+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw i(e),e}},cancel:e=>(i(e),a.return())},{highWaterMark:2})},kl="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Fl=kl&&"function"==typeof ReadableStream,Vl=kl&&("function"==typeof TextEncoder?(Gl=new TextEncoder,e=>Gl.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Gl;const Bl=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Hl=Fl&&Bl((()=>{let e=!1;const t=new Request(ll.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Wl=Fl&&Bl((()=>Fd.isReadableStream(new Response("").body))),ql={stream:Wl&&(e=>e.body)};var zl;kl&&(zl=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!ql[e]&&(ql[e]=Fd.isFunction(zl[e])?t=>t[e]():(t,n)=>{throw new Hd(`Response type '${e}' is not supported`,Hd.ERR_NOT_SUPPORT,n)})})));const Yl=kl&&(async e=>{let{url:t,method:n,data:r,signal:a,cancelToken:s,timeout:o,onDownloadProgress:i,onUploadProgress:c,responseType:d,headers:l,withCredentials:u="same-origin",fetchOptions:p}=wl(e);d=d?(d+"").toLowerCase():"text";let h,f=Ll([a,s&&s.toAbortSignal()],o);const g=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let y;try{if(c&&Hl&&"get"!==n&&"head"!==n&&0!==(y=await(async(e,t)=>{const n=Fd.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Fd.isBlob(e))return e.size;if(Fd.isSpecCompliantForm(e)){const t=new Request(ll.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Fd.isArrayBufferView(e)||Fd.isArrayBuffer(e)?e.byteLength:(Fd.isURLSearchParams(e)&&(e+=""),Fd.isString(e)?(await Vl(e)).byteLength:void 0)})(t):n})(l,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(Fd.isFormData(r)&&(e=n.headers.get("content-type"))&&l.setContentType(e),n.body){const[e,t]=vl(y,Pl(Ol(c)));r=Ul(n.body,65536,e,t)}}Fd.isString(u)||(u=u?"include":"omit");const a="credentials"in Request.prototype;h=new Request(t,{...p,signal:f,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:a?u:void 0});let s=await fetch(h);const o=Wl&&("stream"===d||"response"===d);if(Wl&&(i||o&&g)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=Fd.toFiniteNumber(s.headers.get("content-length")),[n,r]=i&&vl(t,Pl(Ol(i),!0))||[];s=new Response(Ul(s.body,65536,n,(()=>{r&&r(),g&&g()})),e)}d=d||"text";let m=await ql[Fd.findKey(ql,d)||"text"](s,e);return!o&&g&&g(),await new Promise(((t,n)=>{bl(t,n,{data:m,headers:Al.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:h})}))}catch(t){if(g&&g(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Hd("Network Error",Hd.ERR_NETWORK,e,h),{cause:t.cause||t});throw Hd.from(t,t&&t.code,e,h)}}),Kl={http:null,xhr:Ml,fetch:Yl};Fd.forEach(Kl,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Jl=e=>`- ${e}`,Xl=e=>Fd.isFunction(e)||null===e||!1===e,Ql=e=>{e=Fd.isArray(e)?e:[e];const{length:t}=e;let n,r;const a={};for(let s=0;s<t;s++){let t;if(n=e[s],r=n,!Xl(n)&&(r=Kl[(t=String(n)).toLowerCase()],void 0===r))throw new Hd(`Unknown adapter '${t}'`);if(r)break;a[t||"#"+s]=r}if(!r){const e=Object.entries(a).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(Jl).join("\n"):" "+Jl(e[0]):"as no adapter specified";throw new Hd("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function Zl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Cl(null,e)}function eu(e){return Zl(e),e.headers=Al.from(e.headers),e.data=_l.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ql(e.adapter||hl.adapter)(e).then((function(t){return Zl(e),t.data=_l.call(e,e.transformResponse,t),t.headers=Al.from(t.headers),t}),(function(t){return Sl(t)||(Zl(e),t&&t.response&&(t.response.data=_l.call(e,e.transformResponse,t.response),t.response.headers=Al.from(t.response.headers))),Promise.reject(t)}))}const tu={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{tu[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const nu={};tu.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,a,s)=>{if(!1===e)throw new Hd(r(a," has been removed"+(t?" in "+t:"")),Hd.ERR_DEPRECATED);return t&&!nu[a]&&(nu[a]=!0,console.warn(r(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,a,s)}};const ru={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Hd("options must be an object",Hd.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const s=r[a],o=t[s];if(o){const t=e[s],n=void 0===t||o(t,s,e);if(!0!==n)throw new Hd("option "+s+" must be "+n,Hd.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Hd("Unknown option "+s,Hd.ERR_BAD_OPTION)}},validators:tu},au=ru.validators;class su{constructor(e){this.defaults=e,this.interceptors={request:new nl,response:new nl}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=xl(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:a}=t;void 0!==n&&ru.assertOptions(n,{silentJSONParsing:au.transitional(au.boolean),forcedJSONParsing:au.transitional(au.boolean),clarifyTimeoutError:au.transitional(au.boolean)},!1),null!=r&&(Fd.isFunction(r)?t.paramsSerializer={serialize:r}:ru.assertOptions(r,{encode:au.function,serialize:au.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=a&&Fd.merge(a.common,a[t.method]);a&&Fd.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete a[e]})),t.headers=Al.concat(s,a);const o=[];let i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const c=[];let d;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,u=0;if(!i){const e=[eu.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,c),l=e.length,d=Promise.resolve(t);u<l;)d=d.then(e[u++],e[u++]);return d}l=o.length;let p=t;for(u=0;u<l;){const t=o[u++],n=o[u++];try{p=t(p)}catch(e){n.call(this,e);break}}try{d=eu.call(this,p)}catch(e){return Promise.reject(e)}for(u=0,l=c.length;u<l;)d=d.then(c[u++],c[u++]);return d}getUri(e){return tl(Nl((e=xl(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}Fd.forEach(["delete","get","head","options"],(function(e){su.prototype[e]=function(t,n){return this.request(xl(n||{},{method:e,url:t,data:(n||{}).data}))}})),Fd.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,a){return this.request(xl(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}su.prototype[e]=t(),su.prototype[e+"Form"]=t(!0)}));const ou=su;class iu{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,a){n.reason||(n.reason=new Cl(e,r,a),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 iu((function(t){e=t})),cancel:e}}}const cu=iu,du={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(du).forEach((([e,t])=>{du[t]=e}));const lu=du,uu=function e(t){const n=new ou(t),r=Jc(ou.prototype.request,n);return Fd.extend(r,ou.prototype,n,{allOwnKeys:!0}),Fd.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(xl(t,n))},r}(hl);uu.Axios=ou,uu.CanceledError=Cl,uu.CancelToken=cu,uu.isCancel=Sl,uu.VERSION="1.7.7",uu.toFormData=Kd,uu.AxiosError=Hd,uu.Cancel=uu.CanceledError,uu.all=function(e){return Promise.all(e)},uu.spread=function(e){return function(t){return e.apply(null,t)}},uu.isAxiosError=function(e){return Fd.isObject(e)&&!0===e.isAxiosError},uu.mergeConfig=xl,uu.AxiosHeaders=Al,uu.formToJSON=e=>ul(Fd.isHTMLForm(e)?new FormData(e):e),uu.getAdapter=Ql,uu.HttpStatusCode=lu,uu.default=uu;const pu=uu;function hu(e,t,n){var r=D(e)||t||n?{next:e,error:t,complete:n}:e;return r?Pe((function(e,t){var n;null===(n=r.subscribe)||void 0===n||n.call(r);var a=!0;e.subscribe(ve(t,(function(e){var n;null===(n=r.next)||void 0===n||n.call(r,e),t.next(e)}),(function(){var e;a=!1,null===(e=r.complete)||void 0===e||e.call(r),t.complete()}),(function(e){var n;a=!1,null===(n=r.error)||void 0===n||n.call(r,e),t.error(e)}),(function(){var e,t;a&&(null===(e=r.unsubscribe)||void 0===e||e.call(r)),null===(t=r.finalize)||void 0===t||t.call(r)})))})):ie}class fu{constructor(e,t=!0){this.config=e,t?(this.ssKeyConfig=e,this.reloadConfig()):this.updateConfig(e,!1)}static init(e,t=!0){return new fu(e,t)}updateConfig(e,t=!0){t?window.sessionStorage.setItem(this.ssKeyConfig,JSON.stringify(this.config)):Mu(e)}reloadConfig(e=!0){if(e){const e=window.sessionStorage.getItem(this.ssKeyConfig);this.config=e?JSON.parse(e):null}else this.config=Lu()}async buildAuthorizeUrl(e){e=e||window.btoa(location.origin);let{sessionIndex:t}=this.config;const{password:n}=this.config,r=this.config.clientId?this.config.clientId:this.config.client_id,a=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,s=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:_r.getApplicationAlias(),c=this.config.userIdentifier?this.config.userIdentifier:this.config.user_identifier;t=t||this.config.tokenInfo.session_index;const d=t?`&session_index=${t}`:`${c}`?`&UserIdentifier=${c}`:`${n}`?`&Password=${window.atob(n)}`:"",l=new Uint8Array(64);window.crypto?.getRandomValues(l),this.config.codeVerifier=this.base64UrlSafeEncode(l),this.updateConfig(this.config,!1);const u=i?`+app.alias.${i.replace(/^app\//,"")}`:"";return this.getCodeChallenge(this.config.codeVerifier)?.then((t=>`${s}?client_id=${r}&response_type=code&redirect_uri=${a}&scope=openid${u}&state=${e}&code_challenge=${t}&code_challenge_method=S256&authentication_service=${o}&enable_psyncId=true${d}`))?.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,this.config)};getRedirectUriOrigin=()=>{let{redirectUri:e}=this.config;e=e||this.config.redirect_uri;const t=e.indexOf("//"),n=-1!==t?e.indexOf("/",t+2):-1;return-1!==n?e.substring(0,n):e};getToken(e,t){this.reloadConfig(t,!1);const n=this.config.clientId?this.config.clientId:this.config.client_id,r=this.config.clientSecret?this.config.clientSecret:this.config.client_secret,a=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,s=this.config.tokenUri?this.config.tokenUri:this.config.endPoints.token,{codeVerifier:o}=this.config,i=window.location.search,c=new URLSearchParams(i),d=e||c.get("code"),l=new URLSearchParams;return l.append("client_id",n),r&&l.append("client_secret",r),l.append("grant_type","authorization_code"),l.append("code",d),l.append("redirect_uri",a),l.append("code_verifier",o),this.config?.secureCookie&&l.append("send_token_as_cookie","true"),Ou(s,{method:"POST",headers:new Headers({"content-type":"application/x-www-form-urlencoded"}),body:l.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?xu({pzCTkn:e?.csrf}):(wu({tokenInfo:e}),xu({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 gu=fu,yu=(e,t)=>{(async e=>{const t={};if("OAuth2.0"===e?.authType){const n=new gu(e,!1);t.reauthUrl=await n.buildAuthorizeUrl(),t.redirectOrigin=n.getRedirectUriOrigin(),window.addEventListener("message",n.authMessageHandler,!1)}else t.reauthUrl=er()+(Zn()?`${Zn()}`:"/?reAuth=true");return t})(t).then((t=>{const n={openReauthMessageModal:!0,reAutheticationURL:t.reauthUrl,url:e,redirectOrigin:t.redirectOrigin};js.publish(st.PUB_SUB_EVENTS.EVENT_REAUTH,n)}))},mu=(e,t)=>"OAuth2.0"===t?.authType?e?.includes(t.endPoints.token):e?.includes("updateSession"),Iu=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}},Eu=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{[ot.COREHEADER_APP_DEBUG_ID]:e.debugId,[ot.COREHEADER_APP_DEBUG_LEVELS]:qr.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;const t=Ec.getProperty(ot.COREHEADERS,"",e);return t?{...t,debugInfo:qr.getPreviewMode()&&{...t.debugInfo,[ot.COREHEADER_APP_DEBUG_LEVELS]:qr.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(ot.SKIPCOREHEADERS))return void delete e[ot.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&&Er.injectRemoteCaseHeader(e,t,n),this.processCoreHeaders(e,t,n)}},Au=Eu,_u="updateSession",Su={},$u=new class{constructor(){this.updateSessionInProgress=!1}getUpdateSessionStatus=()=>this.updateSessionInProgress;setUpdateSessionStatus=e=>{this.updateSessionInProgress=e}};let Cu={},bu={},Pu={},vu="";const Ou=(e,t,n="root",r={})=>{const{doNotMergeHttpMessagesForStatusCode:a=null,cancelContext:s=n,includeRemoteSystemIdIfPresent:o=!0}=r;vu=a,null===e&&window.console.error("Error: url passed to Service Broker fetch is null (or) undefined");const{body:i,signal:c,withoutDefaultHeaders:d=!1,...l}=t,{Authorization:u,pzCTkn:p,...h}=t.headers||{};d||Au.injectCoreAdditionalHeaders(h,t.body,n,{includeRemoteSystemIdIfPresent:o}),s&&Su[s]>=0?Su[s]+=Su[s]:s&&void 0===Su[s]&&(Su[s]=1);let f=d?{...h}:{...Au.getDefaultHeaders(),...Au.getRegisteredHeaders(),...h,context:n};return e&&mu(e,bu)&&$u.getUpdateSessionStatus()||!$u.getUpdateSessionStatus()?(mu(e,bu)&&"OAuth2.0"===bu?.authType&&(f={...h}),De(pu({context:n,...l,url:e,data:i,...c&&void 0===c.aborted&&{cancelToken:c},...c&&void 0!==c.aborted&&{signal:c},headers:f,withCredentials:!("OAuth2.0"!==bu?.authType||!bu.secureCookie)||void 0})).pipe(hu((()=>{const e=Au.getCoreHeadersFromContext(f.context);e&&(e=>{js.publish(ot.PUB_SUB_EVENTS.FETCH_SUCCESS,e)})({...e})}))).toPromise()):Tu(e,t,n,$u)},Tu=(e,t,n,r)=>new Promise(((a,s)=>{js.subscribe(_u,(o=>{r.setUpdateSessionStatus(!o.updateStatus.length>0),"success"===o.updateStatus?Ou(e,t,n).then((e=>a(e))).catch((e=>s(e))):s(o.updateStatus.error)}),_u)})),Ru=e=>{Su[e]>0&&(Su[e]-=Su[e],0===Su[e]&&delete Su[e])};pu.interceptors.request.use((e=>(Cu.request&&(e=Cu.request(e)),e)),(e=>Promise.reject(e))),pu.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"))),Oi({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return e.config.headers&&e.config.headers.context&&(e.config.skipClearErrorMessages||(Pi({type:"error",category:"HTTP",context:e.config.headers.context}).length>0&&vi({type:"error",category:"HTTP",context:e.config.headers.context}),Pi({type:"error",category:e.config.headers.context===ot.APP.APP?"PAGE":"",context:e.config.headers.context}).length>0&&vi({type:"error",category:"PAGE",context:e.config.headers.context})),Ru(e.config.headers.context)),Cu.response&&(e=Cu.response(e)),e}),(e=>(e.config&&e.config.headers&&e.config.headers.context&&Ru(e.config.headers.context),!e.response||!e.response.status||401!==e.response.status||e.config&&mu(e.config.url,bu)||js.subscribe(_u,(e=>{$u.setUpdateSessionStatus(!e.updateStatus.length>0)}),_u),((e,t,n,r)=>{if(e.config&&mu(e.config.url,n))return Promise.reject(e);if(e.response&&e.response.status&&401===e.response.status&&!t.getUpdateSessionStatus()){if(js.unsubscribeAllWithEventType(_u),t.setUpdateSessionStatus(!0),"custom"===n?.authType){js.publish(st.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);const{url:n,config:r,context:a}=Iu(e);return Tu(n,r,a,t)}return((e,t,n)=>{const{config:r}=e,{url:a,config:s,callback:o}=(e=>{let t="",n={},r={};if("OAuth2.0"===e?.authType){t=e.endPoints.token;const a=new URLSearchParams;a.append("client_id",e.client_id),a.append("grant_type","refresh_token"),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,n)=>{const{data:r}=t,a={access_token:r?.access_token,refresh_token:r?.refresh_token};wu({tokenInfo:{...e.tokenInfo,...a}}),e.secureCookie?xu({pzCTkn:r?.csrf}):(xu({Authorization:`${r?.token_type} ${r?.access_token}`}),n.headers={...n.headers,Authorization:`${r?.token_type} ${r?.access_token}`});const{onTokenRetrieval:s}=e;s&&"function"==typeof s&&s(r)},failure:t=>{if(e.popupReauth)return yu(t,e);js.publish(st.PUB_SUB_EVENTS.EVENT_FULL_REAUTH,e)}}}else t=`${er()}/updateSession`,n={method:"GET",headers:{}},r={failure:yu};return{url:t,config:n,callback:r}})(n),i=r.headers&&r.headers.context;r.data&&(r.body=r.data);const c=Tu(r.url,r,i,t);return Ou(a,s).then((e=>(t.setUpdateSessionStatus(!1),o?.success?.(e,r),js.publish("updateSession",{updateStatus:"success"}),c.then((e=>Promise.resolve(e))).catch((e=>Promise.reject(e)))))).catch((e=>e&&e.config&&mu(e.config.url,n)?(o?.failure?.(r.url,n),c):Promise.reject(e)))})(e,t,n)}if(e.response&&e.response.status&&401===e.response.status&&t.getUpdateSessionStatus()){const{url:t,config:n,context:r}=Iu(e);return Ou(t,n,r)}if(e.response&&e.response.status&&422!==e.response.status&&e.config.headers.context&&e.response.data&&!r){const t=e.response.data.errorDetails&&e.response.data.errorDetails.map((t=>((e,t)=>t[st.TRACE_ID]?{type:"error",message:e.localizedValue||e.message,correlationID:t[st.TRACE_ID]}:{type:"error",message:e.localizedValue||e.message})(t,e.response.headers)));let n=e.config.headers.context;return n&&n.includes("/workarea")&&!n.includes("/modal")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),Oi({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return Promise.reject(e)})(e,$u,bu,e.response&&e.response.status&&e.response.status===Number(vu)?vu:null))));const Nu=()=>pu.CancelToken.source(),Du=e=>pu.isCancel(e),xu=e=>{Au.setDefaultHeaders(e)},wu=e=>{bu={...bu,...e}},Mu=e=>{Pu={...Pu,...e}},Lu=()=>({...Pu}),ju={},Uu=e=>{const t=Nu();return ju[e]=t,t},ku={uploadAttachment:(e,t,n,r)=>{const a=new FormData;a.append("appendUniqueIdToFileName",!0),a.append("file",e);const{restApi:s,reqType:o}=Mr("uploadAttachment",{});return Ou(s,{method:o,headers:{"Content-Type":"multipart/form-data"},body:a,onUploadProgress:t,signal:Uu(e.ID).token},r).then((t=>({type:"File",category:e.category||"File",ID:t.data.ID,clientFileID:e.ID}))).catch(n?n(Du,e):e=>{throw e.isHandled=!1,e}).finally((()=>delete ju[e.ID]))},linkAttachmentsToCase:(e,t,n,r)=>{const a={};if("File"===n){const[e]=t,{clientFileID:n}=e;delete e.clientFileID,a.signal=Uu(n).token}const{restApi:s,reqType:o}=Mr("linkCaseAttachment",{caseID:e});return Ou(s,{...a,body:{attachments:t},method:o},r)},getCaseAttachments:(e,t,n=!1)=>{const{restApi:r,reqType:a}=Mr("getCaseAttachments",{caseID:e,includeThumbnail:n});return Ou(r,{method:a},t).then((e=>e.data.attachments))},getAttachmentCategories:(e,t,n)=>{const{restApi:r,reqType:a}=Mr("getAttachmentCategories",{caseID:e,type:t});return Ou(r,{method:a},n).then((e=>e.data))},downloadAttachment:(e,t,n)=>{const{restApi:r,reqType:a}=Mr("downloadAttachment",{attachmentID:e});return Ou(r,{method:a,..."binary"===n&&{responseType:"arraybuffer"}},t)},editAttachment:(e,t,n)=>{const{restApi:r,reqType:a}=Mr("editAttachment",{attachmentID:e});return Ou(r,{method:a,body:{...t}},n)},deleteAttachment:(e,t)=>{const{restApi:n,reqType:r}=Mr("deleteAttachment",{attachmentID:e});return Ou(n,{method:r},t)},downloadDocument:(e,t)=>{const{restApi:n,reqType:r}=Mr("downloadDocument",{documentID:e});return Ou(n,{method:r},t)},deleteDocument:(e,t,n)=>{const{restApi:r,reqType:a}=Mr("deleteDocument",{caseID:e,documentID:t});return Ou(r,{method:a},n)},getDocumentURL:e=>{const t=PCore.getEnvironmentInfo().getDocumentUrlDP()||"D_pxGetDocumentURL";return PCore.getDataPageUtils().getPageDataAsync(t,e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error ocurred during ajax call getDocumentURL API : ",t.response)}))},cancelRequest:e=>{ju[e]&&(ju[e].cancel(),delete ju[e])}},Fu={createViewRule:(e,t)=>{const{restApi:n,reqType:r}=Mr("createViewRuleByID");return Ou(n,{method:r,body:e},t).then((e=>e.data))},getViewRule:(e,t)=>{const{restApi:n,reqType:r}=Mr("getViewRuleByID",{ID:e});return Ou(n,{method:r},t).then((e=>e.data))},updateViewRule:(e,t,n)=>{const{restApi:r,reqType:a}=Mr("updateViewRuleByID",{ID:e});return Ou(r,{method:a,body:t},n).then((e=>e.data))},deleteViewRule:(e,t)=>{const{restApi:n,reqType:r}=Mr("deleteViewRuleByID",{ID:e});return Ou(n,{method:r},t).then((e=>e.data))}},Vu=class{static createCase(e,t={}){const{caseInfo:n,startingFields:r,flowType:a,viewType:s=so.PAGE,pageName:o,context:i=ot.APP.APP,debugInfo:c,headers:d}=t;let l={};n&&n.content&&(l=n.content);const u={caseTypeID:e,content:{...l,...r},processID:a};return Bu("createWork",{body:u,queryPayload:{caseClassName:e,viewType:s,params:{pageName:o}},headers:{...d,...c&&{...Au.addDebugHeaders(c)}}},i).then((t=>({response:t.data,requestPayload:u,headers:io(t.headers,e,d)})))}},Gu=()=>({registerHeader:(...e)=>Au.registerHeader(...e),unRegisterHeader:(...e)=>Au.unRegisterHeader(...e),getRegisteredHeaders:()=>Au.getRegisteredHeaders()}),Bu=(e,{body:t={},queryPayload:n={},cancelTokenSource:r,headers:a={},responseType:s},o)=>{const{restApi:i,reqType:c}=Mr(e,n),d={method:c,headers:a,body:t,...s&&{responseType:s}};return r&&(d.signal=r.token),Ou(i,d,o)},Hu=(e,{method:t="GET",body:n={},headers:r={},withoutDefaultHeaders:a=!1},s)=>(e.startsWith("http:")||e.startsWith("https:")||(e=er()+e),Ou(e,{method:t,headers:r,body:n,withoutDefaultHeaders:a},s)),Wu=e=>_r.doesRestApiExist(e),qu=()=>Nu(),zu=e=>Du(e),Yu=e=>{(e=>{Cu=e})(e)},Ku=()=>Vu,Ju={addCaseFollower:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({users:t.map((e=>({ID:e})))});return Bu("addCaseFollower",{body:a,queryPayload:r},n)},deleteCaseFollower:(e,t,n)=>Bu("deleteCaseFollower",{queryPayload:{caseID:e,followerID:t}},n),getCaseFollowers:(e,t)=>Bu("getCaseFollowers",{queryPayload:{caseID:e}},t).then((e=>e.data.followers))},Xu={addRelatedCases:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({cases:t});return Bu("addRelatedCases",{body:a,queryPayload:r},n)},removeRelatedCase:(e,t,n)=>Bu("removeRelatedCase",{queryPayload:{caseID:e,relatedCaseID:t}},n),getRelatedCases:(e,t)=>Bu("getRelatedCases",{queryPayload:{caseID:e}},t).then((e=>e.data.relatedCases))},Qu="operatorDetails",Zu={getOperatorDetails:(e,t=!1)=>{const{reqType:n}=Mr(Qu,{});if("GET"===n){const t={encodedOperatorId:encodeURIComponent(`{"opname":"${e}"}`)};return Bu(Qu,{queryPayload:t})}return t?Bu("operatorDetailsByBusinessID",{body:{dataViewParameters:{BusinessID:e}}}):Bu(Qu,{body:{dataViewParameters:{ID:e}}})}},ep=(e,t)=>{if(e.confirmationLinks&&(e.data.caseInfo.confirmationLinks=e.confirmationLinks),!e.uiResources&&e.confirmationNote){let t=e;const{confirmationNote:n}=t;return t=((e,t)=>{const n=[e];return t.data.caseMessages=n,t})(n,t),t}if(!e.uiResources||!e.data||!e?.uiResources?.root)return e;const n=e,{uiResources:{actionButtons:r,navigation:a},nextAssignmentInfo:s}=n;if(n.data&&n.data.caseInfo){r&&(n.data.caseInfo.actionButtons=r),a&&(n.data.caseInfo.navigation=a),t&&t[st.ACTIONS.DELETEAVIALACTIONS]&&delete n.data.caseInfo.availableActions;const{assignments:s,availableActions:o=[]}=n.data.caseInfo;if(!(s&&Array.isArray(s)&&s.length>0&&s[0].actions&&Array.isArray(s[0].actions))||t&&t[st.STOPMERGEACTIONS]||(s[0].actions.forEach((e=>{"Assignment"!==e.type&&"LocalAction"!==e.type||o.push(e)})),n.data.caseInfo.availableActions=o),e.confirmationNote){const{confirmationNote:e}=n,t=[e];n.data.caseMessages=t}}return t&&t.isCreateDataObject&&(n.data.dataInfo={},n.data.dataInfo.content=n.data.pyPortal,n.uiResources.root.config.context="dataInfo.content",n.uiResources.context_data.dataInfo=n.uiResources.context_data.dataInfo??{},n.uiResources.context_data.dataInfo.content=n.uiResources.context_data.dataInfo.content??{},n.uiResources.context_data.dataInfo.content=n.uiResources.context_data?.pyPortal,delete n.data.pyPortal,delete n.key),s&&(n.data.nextAssignmentInfo=s),n},tp=async e=>{const t=ep(e),n=dt.getIn(t,ot.COMPONENTS);_s(t,{},!0),await Cs(n)},np=(e,t,n)=>Ec.resolveView(e,t,n),rp={"Content-Type":"application/json"},ap=new class{constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,t,n,r,a,s,o)=>{o||(this.mentions=[]);let i="";r&&Array.isArray(r)&&r?.length>0&&(r.forEach((e=>{e.on&&(i=`${i}${e.id},`)})),""===i&&(i="ClearFilters"));let c="";o&&(c=s.getValue("pulse.nextPageFirstEntry"));const d={filterForContext:e,feedID:t,feedClass:n,filterBy:i,pageSize:9,olderThan:c};for(let e=0;e<a.length;e+=1)a[e].cancel();const l=qu();return a.push(l),Bu("getFeedMessages",{queryPayload:d,cancelTokenSource:l},s.getContextName()).then((async e=>{if(200===e.status&&e.data){a.pop();const t=[],n={};let i=!1;if(e?.data){if(e?.data?.data?.FeedList){const r=e.data.data.FeedList?.pxResults;Array.isArray(r)&&r?.length>0&&r.forEach(((e,r)=>{e.ID=""!==e.pzInsKey?e.pzInsKey:`message${r}`,t.push(e.ID),n[e.ID]=e,e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions)})),i||"pzPostDetails"===e.pyMessageViewReference||"pzPrivatePostDetails"===e.pyMessageViewReference||(i=!0)}))}if(i&&await tp({uiResources:e.data.uiResources}),!r&&(r=[{id:"All",label:"All",on:!0,disabled:!1}],e?.data?.data?.FeedFilters)){const t=e.data.data.FeedFilters?.pxResults;let n=!0;t&&Array.isArray(t)&&t?.length>0&&(t.forEach((e=>{const t={id:e.pyFeedSourceReference,label:e.pyLabel,disabled:!1,on:"true"===e.pySelected};t.on||(n=!1),r.push(t)})),r.find((e=>"All"===e.id)).on=n)}}if(o&&s.getValue("pulse.messageIDs")){let r=s.getValue("pulse.messageIDs"),a=s.getValue("pulse.messages");r=[...r,...t],a={...a,...n},Object.values(a).forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions)}))})),s.updateState({pulse:{messages:a,messageIDs:r,nextPageFirstEntry:e.data.nextPageFirstEntry?e.data.nextPageFirstEntry:""}})}else s.updateState({pulse:{messages:n,messageIDs:t,nextPageFirstEntry:e.data.nextPageFirstEntry?e.data.nextPageFirstEntry:""}});const c=[...new Map(this.mentions.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.prototype.hasOwnProperty.call(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[];return{feedFilters:r,caseMentions:c}}return s.reportError(`getFeeds call failed ${e.status}`,e.data),""})).catch((e=>{zu(e)||s.reportError(": Error ocurred during ajax call at getFeeds API : ",e.response)}))};postMessage=(e,t,n=[],r=!1,a)=>{const s=JSON.stringify({context:e,parentMessageId:r?e:"",message:t,attachments:n});return Bu("postFeedMessages",{body:s,headers:rp},a.getContextName()).then((t=>{if((201===t.status||200===t.status)&&t.data){const s=t?.data;if(r){s.parentMessageID=e;const{pxResults:t,caseMentions:o}=this.buildMessageObject(s,r,a,n.length>0);return a.updateState({pulse:{messages:{[e]:{pxResults:t}}}}),o}const{messages:o,messageIDs:i,caseMentions:c}=this.buildMessageObject(s,r,a,n.length>0);return a.updateState({pulse:{messages:o,messageIDs:i}}),c}return a.reportError(`postMessage call failed with status ${t.status}`,t),""})).catch((e=>{a.reportError(": Error ocurred during ajax call at postMessage API : ",e.response)}))};editMessage=({messageID:e,parentMessageID:t,message:n,c11nEnv:r,isReply:a=!1})=>{const s=JSON.stringify({message:n});return Bu("editFeedMessage",{queryPayload:{messageID:e},body:s,headers:rp},r.getContextName()).then((e=>{if(200===e?.status&&e?.data){const n=e?.data;if(a){n.parentMessageID=t;const{pxResults:e,caseMentions:s}=this.buildMessageObject(n,a,r,!1);return r.updateState({pulse:{messages:{[t]:{pxResults:e}}}}),s}const{messages:s,caseMentions:o}=this.buildMessageObject(n,a,r,!1);return r.updateState({pulse:{messages:s}}),o}return r.reportError(`editMessage call failed with status ${e.status}`,e),""})).catch((e=>{r.reportError(": Error ocurred during ajax call at editMessage API : ",e.response)}))};buildMessageObject=(e,t,n,r=!1)=>{const a={ID:e?.ID||"",tags:e?.tags||[],pyHasAttachment:r,pzInsKey:e?.ID||"",pyMessage:e?.message||"",mentions:e?.mentions||[],postedByUser:e?.postedByUser,pxCreateDateTime:e?.postedTime||"",pxUpdateDateTime:e?.updatedTime||"",parentMessageID:e?.parentMessageID||"",pyIsEdited:"string"==typeof e?.isEdited?"true"===e?.isEdited:e?.isEdited||!1,pyFeed:{pyPostedOn:e?.postedTime||"",pyFeedTitle:e?.postedByUser?.name||"",pyIconType:"user",pyCommentContext:"pzInsKey",pyIconReference:"pi pi-case"},pyContext:"",pxIcon:"globe",pyMessageViewReference:"pzPostDetails"},s=n.getValue("pulse.messages");if(t){let{pxResults:e=[]}=Object.values(s)?.find((e=>e?.ID===a?.parentMessageID))||{};const t=e?.findIndex((e=>e?.pzInsKey===a?.ID));if(-1!==t){const n=[...e];n[t]={...n[t],...a},e=n}else e=[...e,a];return{pxResults:e,messages:{},messageIDs:[],caseMentions:this.getCaseMentions(e)}}const o=n.getValue("pulse.messageIDs");if(o){const e=o.includes(a.ID)?{...s[a.ID],...a}:a,t={...s,[a.ID]:e};return{messages:t,messageIDs:o.includes(a.ID)?o:[a.ID,...o],caseMentions:this.getCaseMentions(Object.values(t))}}};getCaseMentions=e=>{const t=e?.filter((e=>e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0))?.map((e=>e.mentions))?.concat(this.mentions);return[...new Map(t.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.prototype.hasOwnProperty.call(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[]};likeMessage=({pulseContext:e,likedBy:t,messageID:n,isReply:r,c11nEnv:a})=>{const s=t?"unlikeFeedMessages":"likeFeedMessages",o=JSON.stringify({ContextClass:e});Bu(s,{body:o,queryPayload:{pulseContext:e},headers:rp},a.getContextName()).then((s=>{if(200===s.status)if(r){const r=a.getValue(`pulse.messages.${n}`),s=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 a=n.pyLikes?n?.pyLikes?.pxLikeCount:0;t?(e=a-1,r=!1):(e=a+1,r=!0),n.pyLikes={pxLikeCount:e,pxIsLiked:r}}return n}));a.updateState({pulse:{messages:{[n]:{pxResults:s}}}})}else{const r={...a.getValue(`pulse.messages.${n}`)},s=r.pyLikes?r.pyLikes.pxLikeCount:0;let o=0,i=!1;t?(o=s-1,i=!1):(o=s+1,i=!0),r.pyLikes={pxLikeCount:o,pxIsLiked:i},a.updateState({pulse:{messages:{[e]:r}}})}else a.reportError(`likeMessage call failed with status ${s.status}`,s)})).catch((e=>{a.reportError(": Error ocurred during ajax call at likeMessage API : ",e.response.data)}))};deleteMessage=(e,t,n,r)=>{let a=e;t&&(a=n),Bu("deleteFeedMessage",{queryPayload:{messageID:a}},r.getContextName()).then((a=>{if(200===a.status)if(t){const t=r.getValue(`pulse.messages.${e}`),a=t?.pxResults&&Array.isArray(t?.pxResults)&&t.pxResults?.length>0&&t.pxResults?.filter((e=>e.pzInsKey!==n));r.updateState({pulse:{messages:{[e]:{pxResults:a}}}})}else{const t=r.getValue("pulse.messageIDs"),n=t&&Array.isArray(t)&&t?.length>0&&t?.filter((t=>t!==e)),a={...r.getValue("pulse.messages")};delete a[e],r.updateState({pulse:{messageIDs:n,messages:a}})}else r.reportError(`deleteMessage call failed with status ${a.status}`,a)})).catch((e=>{r.reportError(": Error ocurred during ajax call at deleteMessage API : ",e.response)}))};getLikedUsers=(e,t)=>Bu("getFeedMessageLikes",{queryPayload:{messageID:e}},t.getContextName()).then((e=>e?.data?.users)).catch((e=>{t.reportError(": Error ocurred during ajax call at getLikedUsers API : ",e.response)}));getMentionSuggestions=(e,t)=>{const{pulseContext:n,searchFor:r,mentionsType:a,listSize:s=5}=e,o={pulseContext:n,searchFor:r,mentionsType:a,listSize:s};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const i=qu();return this.mentionsTagsCancelTokenSource.push(i),Bu("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=>{zu(e)||t.reportError(": Error ocurred during ajax call at getMentionSuggestions API : ",e.response.data)}))};getMentionTypes=e=>Bu("getMentionTypes",{},e.getContextName()).then((e=>e?.data)).catch((t=>{e.reportError(": Error ocurred during ajax call at getMentionTypes API : ",t.response.data)}));getTagSuggestions=(e,t)=>{const{searchFor:n,listSize:r=5}=e,a={searchFor:n,listSize:r};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const s=qu();return this.mentionsTagsCancelTokenSource.push(s),Bu("getTagSuggestions",{queryPayload:a,cancelTokenSource:s},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=>{zu(e)||t.reportError(": Error ocurred during ajax call at getTagSuggestions API : ",e.response.data)}))}},sp={getTaggedCases:(e,t)=>Bu("loadView",{queryPayload:{caseID:e,viewID:"pyTaggedCases"}},t.getContextName()).then((e=>e?.data)).catch((e=>{t.reportError(": Error ocurred during ajax call at fetchTaggedcases API : ",e.response)})),getTags:(e,t)=>Bu("getCaseTags",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.tagsList)).catch((e=>{t.reportError(": Error ocurred during ajax call at fetchTags API : ",e.response)})),postTags:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({tags:t});return Bu("addTagsToCase",{body:a,queryPayload:r},n.getContextName()).then((e=>e?.data?.results)).catch((e=>{n.reportError(": Error ocurred during ajax call at postTags API : ",e.response)}))},removeTag:(e,t,n)=>Bu("deleteCaseTag",{queryPayload:{caseID:e,tagID:t}},n.getContextName()).catch((e=>{n.reportError(": Error ocurred during ajax call at removeTag API : ",e.response)})),getTagsLandingPageURL:e=>PCore.getDataPageUtils().getPageDataAsync("D_pxGetTagsLandingPageURL",e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error ocurred during ajax call getTagsLandingPageURL API : ",t.response)}))},op=(e,t)=>{mi(t.getContextName(),e.etag),Ii(t.getContextName(),e.etag)},ip={getParticipants:(e,t)=>Bu("getAllParticipants",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.data.content.pyParticipants)).catch((e=>{t.reportError(": Error ocurred during ajax call at getParticipants API : ",e.response)})),getRoleView:(e,t,n)=>Bu("getParticipantRoleView",{queryPayload:{caseID:e,participant_roleID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error ocurred during ajax call at fetchTaggedcases API : ",e.response)})),getParticipantRoles:(e,t)=>Bu("getParticipantRoles",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.participant_roles)).catch((e=>{t.reportError(": Error ocurred during ajax call at getParticipantRoles API : ",e.response)})),getParticipant:(e,t,n)=>Bu("getParticipant",{queryPayload:{caseID:e,participantID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error ocurred during ajax call at getParticipant API : ",e.response)})),createParticipant:(e,t,n,r)=>{const a={caseID:e},{content:s}=n,o={content:s,participantRoleID:t},i={"if-match":r.getCaseSummary().headers.etag};return Bu("createParticipant",{body:o,queryPayload:a,headers:i},r.getContextName()).then((e=>{op(e.headers,r)})).catch((e=>{r.reportError(": Error ocurred during ajax call at createParticipant API : ",e.response)}))},updateParticipant:(e,t,n,r)=>{const{content:a}=n,s={content:a},o={caseID:e,participantID:t},i={"if-match":r.getCaseSummary().headers.etag};return Bu("updateParticipant",{body:s,queryPayload:o,headers:i},r.getContextName()).then((e=>{op(e.headers,r)})).catch((e=>{r.reportError(": Error ocurred during ajax call at updateParticipant API : ",e.response)}))},deleteParticipant:(e,t,n)=>{const r={caseID:e,participantID:t},a={"if-match":n.getCaseSummary().headers.etag};return Bu("deleteParticipant",{queryPayload:r,headers:a},n.getContextName()).then((e=>{op(e.headers,n)})).catch((e=>{n.reportError(": Error ocurred during ajax call at deleteParticipant API : ",e.response)}))}},cp=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]}};function dp(e=[]){return e.reduce(((e,t)=>(e[t.personalizationID]={name:t.name,personalizationState:JSON.parse(t.personalizationState||"{}")},e)),{})}const lp="create",up="update",pp="delete";function hp(e,t,n,r){const a=PCore.getMetadataUtils().getPersonalizationMetadata(t);if(a){switch(e){case lp:case up:{const{markAsDefault:e,...t}=r;Object.entries(t).length>0&&(a.allPersonalizations[n]=t),e&&(a.defaultPersonalization=n);break}case pp:delete a.allPersonalizations[n],a.defaultPersonalization===n&&(a.defaultPersonalization="");break;default:return null}return a}return null}const fp={},gp=e=>{const t=PCore.getMetadataUtils().getPersonalizationMetadata(e);if(t)return Array.isArray(t.allPersonalizations)&&(t.allPersonalizations=dp(t.allPersonalizations)),Promise.resolve(t);const{restApi:n,reqType:r}=Mr("getUIListPersonalizations",{listID:e});return Ou(n,{method:r,body:{}}).then((e=>{const{data:t}=e;return{allPersonalizations:dp(t.allPersonalizations),defaultPersonalization:t.defaultPersonalization}}))},yp=(e,t,n)=>{const{restApi:r,reqType:a}=Mr("createListPersonalization",{listID:e});return hp(lp,e,t,n),Ou(r,{method:a,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}}).then((e=>{const n=e.data;return fp[t]=n,e}))},mp=(e,t,n)=>{const r=fp[t]||t;hp(up,e,t,n);const{restApi:a,reqType:s}=Mr("updateListPersonalization",{listID:e,personalizationID:r});return Ou(a,{method:s,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}})},Ip=(e,t)=>{const n=fp[t]||t;hp(pp,e,t);const{restApi:r,reqType:a}=Mr("deleteListPersonalization",{listID:e,personalizationID:n});return Ou(r,{method:a,body:{}}).then((e=>(fp[t]&&delete fp[t],e)))},Ep=function(e){return e?{createPersonalization:yp.bind(null,e),updatePersonalization:mp.bind(null,e),deletePersonalization:Ip.bind(null,e),fetchPersonalizations:gp.bind(null,e)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}},Ap=class{static isCaseActive(e,t){if(!e||!t)return!1;const n=xo(t);if(n){const r=Go(t),{items:a={}}=n;return a[r]&&a[r].key===e}return!1}static getCaseEditMetadata=(e,t)=>{const n={caseID:e,viewID:"pyEdit"},{restApi:r,reqType:a}=Mr("loadView",n);return Ou(r,{method:a},t)};static getCaseEditLock=(e,t)=>{const n={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:r,reqType:a}=Mr(Mn,n);return Ou(`${r}?viewType=page`,{method:a},t)};static updateCaseEditFieldsData=(e,t,n,r)=>{const a={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:s}=Mr(Mn,a),o=t[e];return Ou(`${s}?viewType=form`,{method:"PATCH",body:{content:{...o}},headers:{"if-match":n}},r)};static getCaseMessages=e=>Uc(e)?.caseMessages},_p={getData:(e,t,n,r={})=>((e,t,n,r={})=>{const a={dataViewName:e},{skipClearErrorMessages:s,signal:o,doNotMergeMessagesForStatusCode:i}=r,{restApi:c,reqType:d}=Mr("getListData",a);return Ou(c,{method:d,body:t,...o&&{signal:o},...s&&{skipClearErrorMessages:s}},n,i)})(e,t,n,r),getListCount:(e,t,n)=>{const r={dataViewName:e},{restApi:a,reqType:s}=Mr("getListDataCount",r);return Ou(a,{method:s,body:t},n)},getDataViewMetadata:(e,t,n)=>{const r={dataViewName:e},a=!!n,s=a?"postDataViewMetadata":"getDataViewMetadata",{restApi:o,reqType:i}=Mr(s,r);return Ou(o,a?{method:i,body:{associationFilter:n}}:{method:i},t)},getDataObjectView:(e,t,n,r,a={})=>{const{skipClearErrorMessages:s,signal:o,doNotMergeMessagesForStatusCode:i}=a,c={data_view_ID:e,view_ID:t},d={dataViewParameters:n},{restApi:l,reqType:u}=Mr("readDataObject",c);return Ou(l,{method:u,body:d,...o&&{signal:o},...s&&{skipClearErrorMessages:s}},r,i)},getCaseEditMetadata:(e,t)=>Ap.getCaseEditMetadata(e,t),getCaseEditLock:(e,t)=>Ap.getCaseEditLock(e,t),updateCaseEditFieldsData:(e,t,n,r)=>Ap.updateCaseEditFieldsData(e,t,n,r),moveListRecords:(e,t)=>{const{sourceID:n,destinationID:r,context:a,listClass:s,viewName:o,viewClassName:i}=e,c={viewName:o,viewClassName:i},{restApi:d,reqType:l}=Mr("moveListRecords",c);return Ou(d,{method:l,body:{content:{sourceID:n,destinationID:r,context:a,listClass:s}}},t)},isTimeElapsed:(e,t="",n="")=>{if(t){if(e&&n===ot.RELOAD_IF_OLDER_THAN)return new Date(e).setSeconds(t)<Date.now();if(e&&n===ot.RELOAD_ONCE_PER_INTERACTION)return!0}return!0},getAppCacheKey:e=>void 0!==Yo("root").find((e=>e.includes("authoring-preview")))?`${ot.AUTHORING_PREVIEW_CONTAINER}-${e}`:`${Kr.getAppAlias()}-${e}`};var Sp=n(924),$p=n.n(Sp);const Cp=new class{constructor(){this.subscriptions={}}getOrCreateSubscription(e){if(!this.subscriptions[e]){const t={caseId:e};this.subscriptions[e]=new class{constructor(e,t){this.atomicSubscribers={},this.connectionsCount=1,this.connected=!1,this.matcher=e,this.criteria=t}_handleAtomicMessage({message:e}){Object.keys(this.atomicSubscribers).forEach((t=>{const n=this.atomicSubscribers[t],r=Object.keys(n.criteria),a=Object.keys(e);0===$p()(r,a).length&&n.callback(e)}))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t){if(!this.connected){const e={matcher:this.matcher,criteria:this.criteria};Pp.subscribe(e,this._handleAtomicMessage.bind(this)),this.connected=!0}const n=this._getAutoGenId();return this.atomicSubscribers[n]={criteria:e,callback:t},n}unsubscribe(e){delete this.atomicSubscribers[e]}}("CASE",t)}return this.subscriptions[e]}};class bp{static subscribers={};static connectionsCount=0;static webSocket=null;static connectionConfig=null;static inProgressSubscriptions=[];static inProgressMessages=[];static isServiceAlive=null;static serviceAliveHandler=null;static userPresence=new 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(),a=this.users[e];if(a)return a.subscribers[r]={callback:t,contextName:n},r;this.users[e]={subscribers:{[r]:{callback:t,contextName:n}}};const s={matcher:"PRESENCE",criteria:{userId:e}};return Pp.subscribe(s,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],Pp.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)}))}))}};static refreshB2SOffset=10;static initConnection(e){if(!e)return;const{messagingService:t}=e;if(!t||t&&t.length<=6)return;const n=Kr.b2sJWT;if(!n||n.length<4)return;this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close());const r=t.endsWith("/")?t+"ws":t+"/ws";try{console.log(`MS : ${Date.now()}`);const e=new WebSocket(`${r}?token=${n}`);this.webSocket=e,e.addEventListener("open",this.handleOnOpen.bind(this)),e.addEventListener("message",this.handleOnMessage.bind(this)),e.addEventListener("error",this.handleOnError.bind(this)),e.addEventListener("close",this.handleOnClose.bind(this))}catch(e){console.log(`MS catch : ${Date.now()}`),console.log(e)}}static handleOnError(e){this.getTokenExpiryTime()<=0&&(clearInterval(this.reInitInterval),this.reInitInterval=null),console.log("web socket connection error event: ",e)}static handleOnClose(e){null!==this.serviceAliveHandler&&(clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=null),e&&4001===e.code||this.connectionConfig.disableReInit||this.reInitInterval||this.getTokenExpiryTime()<=0||this.reInitialization()}static handleOnOpen(){clearInterval(this.reInitInterval),this.reInitInterval=null;let e=[];null!==this.webSocket&&1===this.webSocket.readyState&&(this.inProgressSubscriptions.forEach((({messageSubscriber:t,id:n})=>{e.includes(n)||(e.push(n),this.subscribeToSocket(t,n))})),this.inProgressSubscriptions=[],this.inProgressMessages.forEach((e=>{this.publishMessage(e)})),this.inProgressMessages=[]),e=null}static handleOnMessage(e){if(null!==e&&"ALIVE"===e.data)null===this.isServiceAlive&&this.checkLiveliness(8e3),this.isServiceAlive=!0;else{let t=null;try{t=JSON.parse(e.data)}catch(t){console.error("Invalid data recieved 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 a=this.subscribers[r];a.filter.matcher===e&&dt.isEqual(a.filter.criteria,n)&&a.messageHandler(t)}))}else if(t&&t.tokenExpiryTime){this.setTokenExpiryTime(t);const e=1e3*(this.getTokenExpiryTime()-this.refreshB2SOffset);setTimeout((()=>this.refreshB2STokenReInit()),e)}else console.error("filter missing from recieved data from messaging service",e.data)}}static reInitialization(e){this.reInitInterval||(Object.keys(this.subscribers).forEach((e=>{this.inProgressSubscriptions.push({messageSubscriber:this.subscribers[e],id:e})})),e?this.initConnection(this.connectionConfig):this.reInitInterval=setInterval((()=>{this.initConnection(this.connectionConfig)}),5e3))}static checkLiveliness(e){!1===this.isServiceAlive?this.reInitialization(!0):this.isServiceAlive=!1,null!==this.serviceAliveHandler&&clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=setTimeout((()=>{this.checkLiveliness(e)}),e)}static setConnectionConfig(e){this.connectionConfig=e}static cleanSocketListeners(){null!==this.webSocket&&(this.webSocket.removeEventListener("open",this.handleOnOpen.bind(this)),this.webSocket.removeEventListener("message",this.handleOnMessage.bind(this)),this.webSocket.removeEventListener("error",this.handleOnError.bind(this)),this.webSocket.removeEventListener("close",this.handleOnClose.bind(this)))}static disconnect(){null!==this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close(),this.webSocket=null)}static subscribe(e,t,n,r){this.connectionsCount+=1;const a=r||`${Date.now()}_${this.connectionsCount}`,s=new class{constructor(e,t,n){this.filter=e,this.messageHandler=t,this.contextName=n}}(e,t,n);return null!==this.webSocket&&1===this.webSocket.readyState?(this.subscribeToSocket(s,a),a):(this.inProgressSubscriptions.push({messageSubscriber:s,id:a}),null===this.webSocket&&this.initConnection(this.connectionConfig),a)}static subscribeToSocket(e,t){this.subscribers[t]=e;const n={filter:e.filter,subscribe:{id:t}};this.webSocket.send(JSON.stringify(n))}static unsubscribe(e){if(this.subscribers[e]){delete this.subscribers[e];const t={unsubscribe:{id:e}};null!==this.webSocket&&1===this.webSocket.readyState&&this.webSocket.send(JSON.stringify(t))}}static publishMessage(e){null!==this.webSocket?null===this.webSocket||1!==this.webSocket.readyState?this.inProgressMessages.push(e):this.webSocket.send(JSON.stringify(e)):console.error("Web socket not initialized.")}static getUserPresence=()=>this.userPresence;static getCaseSubscription=e=>Cp.getOrCreateSubscription(e);static refreshB2STokenReInit=async()=>{const e={body:{B2SToken:Kr.b2sJWT}};PCore.getRestClient().invokeRestApi("refreshB2S",e).then((e=>{const{newB2SToken:t}=e.data;t&&t.length>30?(Kr.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 occured 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 Pp=bp,vp=class{constructor(){this.records=[],this.maxRecords=0,this.isDirty=!1}getRecords(e){if(e){const t=[],{pageNumber:n,pageSize:r}=e,a=n*r;let s=a-r;for(;s<a;s+=1){if(!this.records[s])return this.maxRecords===s?t:[];t.push(this.records[s])}return t}return this.records}mergeRecords(e,t){if(t){const{pageNumber:n,pageSize:r}=t,a=n*r;let s=0;for(let t=a-r+1-1;t<a;t+=1)this.records[t]=e[s],s+=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=zc(this.records,e,{isArrayDeepMerge:!1})),this.setMaxRecordsCount(this.records.length)}setMaxRecordsCount(e){this.maxRecords=e}getMaxRecordsCount(){return this.maxRecords}},Op=new class{isCacheDisabled=!1;constructor(){this.datastore={},this.subscribers={},this.isCacheEnabled=!0,this.subscribedDataPageNames=new Set}getData(e,t={},n,r){const a=this._generateHash(e,t,r);if(null===a)return[];if(this.datastore[e]&&this.datastore[e][a]){const t=this.datastore[e][a];return t.isDirty?[]:t.getRecords(n)}return[]}_generateHash(e,t,n){const r=vt(e);if(!r)return null;const a=r.parameters||[];let s="",o=e;const i=[];return a.forEach((e=>{t[e.name]?i.push(t[e.name]):i.push(e.defaultValue||ot.NULL_STRING)})),n&&i.push(JSON.stringify(n)),i.join(ot.HASH_DELIMITER)&&(s=dt.getHashedString(i.join(ot.HASH_DELIMITER)),o=e+ot.UNDERSCORE_STRING+s),o}async getDataAsync(e,t,n={},r,a,s={}){if(this._subscribeToMessageService(e),s.purgeDataPageCache&&(this.datastore[e]={}),!this._isCacheable(e,a)||s.invalidateCache){const o=await this._fetchData(e,n,r,a,t,s),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,a);if(o.length>0)return{data:o};const i=await this._fetchData(e,n,r,a,t,s);return{...i.data,data:this._mergeDataStore(e,n,r,a,i),pageNumber:i?.data?.pageNumber,pageSize:i?.data?.pageSize,queryStats:i?.data?.queryStats,status:i?.status}}async getPageDataAsync(e,t,n={},r={}){const{restApi:a,reqType:s}=Mr(ot.GET_PAGE_DATA,{dataViewName:e,dataViewParameters:JSON.stringify(n)}),o={method:s};if(r&&r.invalidateCache&&delete this.datastore[e],r&&!r.invalidateCache&&this.datastore[e])return this.datastore[e];const i=a&&0===Object.keys(n).length?a.split("?")[0]:a;return Ou(encodeURI(i),o,t).then((t=>(this._isPerInteraction(e)||(this.datastore[e]=t.data||{}),t.data)))}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 vp;this.datastore[t][n]=r,r.mergeRecords(e[t][n].pxResults)}}))}))}_mergeDataStore(e,t,n,r,a){const s=this._generateHash(e,t,r),o=a?.data?.data;if(!o||0===o.length)return[];if(null===s)return o;this.datastore[e]||(this.datastore[e]={}),this.datastore[e][s]||(this.datastore[e][s]=new vp);const i=this.datastore[e][s];return i.mergeRecords(o,n),i.isDirty=!1,i.getRecords(n)}async _fetchData(e,t,n,r,a,s){const{additionalApiParams:{useExtendedTimeout:o=!1,includeTotalCount:i=!1}={},...c}=s,d={dataViewParameters:t};return i&&(d.includeTotalCount=!0),o&&(d.useExtendedTimeout=!0),n&&(d.paging=n),r&&(d.query=r),await _p.getData(e,d,a,c)}isDataPage(e=""){return e.startsWith("D_")||e.startsWith("Declare_")}_handleCascadeUpdate(){const{dataPageName:e,scope:t}=this;t._handleMessage({message:{datapage:e}})}subscribeToUpdate(e,t,n,r,a,s){this.subscribers[e]=this.subscribers[e]||{},this.subscribers[e].callback=this.subscribers[e].callback||{},this.subscribers[e].callback[s]||(this.subscribers[e].callback[s]=a),this._subscribeToCascadeUpdates(e,t,n,r,s)}unsubscribe(e,t,n,r,a){delete this.subscribers[e]?.callback[a],t&&t.length>0&&Dc.unRegisterFields(n,r,t,a)}_subscribeToCascadeUpdates(e,t,n,r,a){t&&t.length>0&&Dc.registerFields(n,r,t,this._handleCascadeUpdate.bind({dataPageName:e,scope:this}),a)}_subscribeToMessageService(e){if(e&&this.subscribedDataPageNames.has(e))return;const t={matcher:"DATAPAGE_UPDATED",criteria:{datapage:e}};Pp.subscribe(t,this._handleMessage.bind(this)),this.subscribedDataPageNames.add(e)}_handleMessage(e){const{msgId:t,message:n}=e,{datapage:r}=n,a=this.subscribers[r];this._markDataInstancsDirty(r),a&&a.callback&&Object.keys(a.callback).forEach((n=>{a.callback[n](e.message,!!t)}))}_markDataInstancsDirty(e){this.datastore[e]&&Object.keys(this.datastore[e]).forEach((t=>{this.datastore[e][t].isDirty=!0}))}_isPerInteraction(e){const t=vt(e);return t&&t.refreshStrategy&&"reloadOncePerInteraction"===t.refreshStrategy.type}_isCacheable(e,t){return!(this._isPerInteraction(e)||!this.isCacheEnabled||t&&Object.keys(t).length>1)}disableCache(e){this.isCacheEnabled=!e}};class Tp{constructor(){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}static _searchResultsCache={};static init(e,t){return new Promise(((n,r)=>{const a=[...e.columns.map((e=>e.value)),...Object.entries(e.parameters).map((([e,t])=>`${e}+${t}`))].join(ot.HASH_DELIMITER),s=dt.getHashedString(a),o=`${e.dataSource}_${s}`,i=_p.getAppCacheKey(e.dataSource);if(window.sessionStorage.getItem(i)){const a=JSON.parse(window.sessionStorage.getItem(i));if(t&&Tp._searchResultsCache?.[t]?.[o])n(Tp._searchResultsCache[t][o]);else if("form"!==e.cacheLifeSpan&&Tp._searchResultsCache?.persisted?.[o])n(Tp._searchResultsCache.persisted[o]);else{const s=new Tp;s.listType=e.listType,s.dataSource=e.dataSource,e.enablePagination?(s.enablePagination=e.enablePagination,s.pageSize=e.pageSize):s.maxResultsDisplay=e.maxResultsDisplay,s.parameters=e.parameters,s.columns=e.columns,s.matchPosition=e.matchPosition,s.context=t,JSON.stringify(a.associationFilter)===JSON.stringify(e.associationFilter)?(s.dataSourceMetaData=a.dataSourceMetaData,s.isQueryable=a.isQueryable,s.isInitialised=a.isInitialised,s.associationFilter=a.associationFilter,Tp.initializeCache(t,e,o,s),n(s)):(s.associationFilter=e.associationFilter,s.fetchMetaData(t).then((r=>{window.sessionStorage.setItem(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,Tp.initializeCache(t,e,o,s),n(s)})).catch((e=>{s.isInitialised=!1,r(e)})))}}else if(e.deferDatasource){const r=new Tp;r.listType=e.listType,r.dataSource=e.dataSource,e.enablePagination?(r.enablePagination=e.enablePagination,r.pageSize=e.pageSize):r.maxResultsDisplay=e.maxResultsDisplay,r.dataSourceMetaData=e.dataSourceMetaData,r.parameters=e.parameters,r.columns=e.columns,r.matchPosition=e.matchPosition;const a=PCore.getMetadataUtils().getDataPageMetadata(e.dataSource);r.isQueryable=a.isQueryable,r.isInitialised=!0,r.dataSourceMetaData=a,window.sessionStorage.setItem(i,JSON.stringify({isQueryable:a.isQueryable,dataSourceMetaData:a,isInitialised:!0})),r.context=t,Tp.initializeCache(t,e,o,r),n(r)}else{const a=new Tp;a.listType=e.listType,a.dataSource=e.dataSource,e.enablePagination?(a.enablePagination=e.enablePagination,a.pageSize=e.pageSize):a.maxResultsDisplay=e.maxResultsDisplay,a.dataSourceMetaData=e.dataSourceMetaData,a.parameters=e.parameters,a.columns=e.columns,a.matchPosition=e.matchPosition,a.context=t,a.associationFilter=e.associationFilter,a.fetchMetaData(t).then((r=>{window.sessionStorage.setItem(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,Tp.initializeCache(t,e,o,a),n(a)})).catch((e=>{a.isInitialised=!1,r(e)}))}}))}static clearContextedCache(e){delete Tp._searchResultsCache[e]}static initializeCache(e,t,n,r){e&&"form"===t.cacheLifeSpan?.toLowerCase()?(void 0===Tp._searchResultsCache[e]&&(Tp._searchResultsCache[e]={}),Tp._searchResultsCache[e][n]=r):(void 0===Tp._searchResultsCache.persisted&&(Tp._searchResultsCache.persisted={}),Tp._searchResultsCache.persisted[n]=r)}fetchMetaData(e){return _p.getDataViewMetadata(this.dataSource,e,this.associationFilter)}getData(e){if(this.isQueryable){const t=this.buildSchemaForQueryableDP(e);return Op.getDataAsync(this.dataSource,this.context,t.dataViewParameters,t.paging,t.query)}return this.fetchNonQueryableResults(e)}memoizedGetData(e){if(this.enablePagination?e in this.cache&&this.pageNumber in this.cache[e]:e in this.cache)return this.enablePagination?this.cache[e][this.pageNumber]:this.cache[e];const t=this.getData(e);return this.enablePagination?(this.cache[e]=this.cache[e]||{},this.cache[e][this.pageNumber]=t):this.cache[e]=t,t}fetchData(e,t){return this.isValidDatasource()&&this.isInitialised?(this.pageNumber=t?this.pageNumber:1,null!=e&&(e=e.toLowerCase()),this.memoizedGetData(e)):Promise.reject()}fetchPaginatedData(e){return this.pageNumber+=1,this.fetchData(e,!0)}fetchNonQueryableResults(e){return this.fetchedNQData?new Promise((t=>t({data:this.filterNonQueryableData(e)}))):this.dataSourceMetaData.structure&&"list"===this.dataSourceMetaData.structure.toLowerCase()?new Promise(((t,n)=>{const r=this.buildSchemaForNonQueryableDP();Op.getDataAsync(this.dataSource,this.context,r.dataViewParameters).then((n=>(this.nonQueryableData=n.data?[...n.data]:[],this.fetchedNQData=!0,t({data:this.filterNonQueryableData(e)})))).catch((e=>n(e)))})):null}filterNonQueryableData(e){const t=this.columns.filter((e=>e.useForSearch)).map((e=>e.value));return this.nonQueryableData.reduce(((n,r)=>(Object.keys(r).every((a=>!(t.includes(a)&&r[a]&&this.positionMatches(r[a],e)&&(n.push({...r}),1)))),n)),[])}positionMatches(e,t){switch(this.matchPosition){case"start":return e.toLowerCase().startsWith(t.toLowerCase());case"contains":return e.toLowerCase().includes(t.toLowerCase());case"equals":return e.toLowerCase()===t.toLowerCase();default:return!1}}buildSelect(){const e=[],t=[];return this.columns.forEach((n=>{if(!t.includes(n.value)){t.push(n.value);const r={field:n.value};e.push(r)}})),e}buildFilters(e){let t={};const n={};this.columns.forEach(((t,r)=>{if(t.useForSearch){const a=`F${r}`,s={field:t.value},o={value:e};let i="CONTAINS";"start"===this.matchPosition?i="STARTS_WITH":"equals"===this.matchPosition&&(i="EQ");const c={...Number.isNaN(parseFloat(e))&&{ignoreCase:"true"},lhs:s,rhs:o,comparator:i};n[a]=c}}));const r=Object.keys(n).join(" OR ");return t={filterConditions:n,logic:r},t}buildQuery(e){return e?{select:this.buildSelect(),filter:this.buildFilters(e),distinctResultsOnly:"true"}:{select:this.buildSelect(),distinctResultsOnly:"true"}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e){return{dataViewParameters:this.parameters,query:this.buildQuery(e),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}}const Rp=Tp,Np="getDataObjects",Dp=["LocalList","RemoteList","PromptList","DataPage"];let xp=null;function wp(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 Mp={getDataObjects:function(){const e=_p.getAppCacheKey(Np);if(window.sessionStorage.getItem(e))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(e)));const{restApi:t,reqType:n}=Mr(Np,{}),r=Ou(t,{method:n});return r.then((t=>{window.sessionStorage.setItem(e,JSON.stringify(t))})),r},getDataPageObjects:function(e=!0){if(xp)return xp;const t=_p.getAppCacheKey("getDataPageObjects");if(e&&window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(t)));const{restApi:n,reqType:r}=Mr("getDataPages",{datapageRequestType:"explorable"});return xp=Ou(n,{method:r,datapageRequestType:"explorable"}),xp.then((e=>{xp=null,window.sessionStorage.setItem(t,JSON.stringify(e))})),xp},getDataViewMetadata:function(e,t=!1,n){if(!t){const{sourceMetadata:t,sourceFields:n}=function(e){const t=PCore.getMetadataUtils().getDataPageMetadata(e);if(t&&t.classID){let e=PCore.getMetadataUtils().getFieldsByClassName(t.classID);const n=new Set(t.primaryFields),r=t.rdFields?.fields?.filter((e=>e.indexOf(".")>0));if(r&&!dt.isEmpty(r)){const n=r.reduce(((e,n)=>{const r=PCore.getMetadataUtils().getEmbeddedPropertyMetadata(n,t.classID);return e[n]=r,e}),{});e={...e,...n}}if(e&&Object.keys(e).length>0){const r=new Set(t.rdFields?.fields??t.rdFields),a=r.size>0||n.size>0;for(const t in e)e[t].type.startsWith("Page")||a&&!(r.size>0&&r.has(t)||n.size>0&&n.has(t))?delete e[t]:e[t]?.datasource&&Dp.includes(e[t].datasource.tableType)&&(e[t].fieldType="Picklist");return{sourceFields:e,sourceMetadata:t}}}return{}}(e);if(t&&n&&Object.keys(n).length>0){const e={data:{...t,fields:Object.entries(n).map((e=>({...e[1],fieldID:e[0],fieldType:e[1].fieldType?e[1].fieldType:e[1].isUserReference?"User reference":void 0,category:wp(e),classID:e[1].associationClassID?e[1].associationClassID:e[1].classID})))}};return Promise.resolve(e)}}const r={dataSource:e,columns:[],parameters:{},associationFilter:n};return PCore.getDataApi().init(r).then((({dataSourceMetaData:e})=>Promise.resolve({data:e})))},getDefaultColumns:function(e){const t=_p.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}=Mr("getListData",{dataViewName:"D_pzGetDefaultColumns"}),a=Ou(n,{method:r,body:{dataViewParameters:e}});return a.then((e=>{window.sessionStorage.setItem(t,JSON.stringify(e))})),a},getFieldsForDataSource:function(e,t,n){if(!t){const t=PCore.getMetadataUtils().getDataPageMetadata(e),n=t?.rdFields?.fields??t?.rdFields;return n?Promise.resolve({data:{data:n.map((e=>({pyFieldName:e})))}}):Promise.resolve({data:{data:[]}})}const r=_p.getAppCacheKey(`RDColumns-${e}`);if(window.sessionStorage.getItem(r))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(r)));const a=PCore.getDataApiUtils().getData("D_pxFieldsForDataSource",{dataViewParameters:{DataPageName:e}},n);return a.then((e=>{window.sessionStorage.setItem(r,JSON.stringify(e))})),a},getPrimaryFieldsForDataSource:function(e="",t=""){const n=_p.getAppCacheKey(`PFColumns-${e}${t}`);if(window.sessionStorage.getItem(n))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(n)));const r=PCore.getDataApiUtils().getData("D_pxGetInitialFieldsForDataSource",{dataViewParameters:{DataPageName:e,ClassName:t}});return r.then((e=>{window.sessionStorage.setItem(n,JSON.stringify(e))})),r},getInsightIDs:function(){const{restApi:e,reqType:t}=Mr("getInsightIDs");return Ou(e,{method:t})},getInsightByID:function(e){const t=PCore.getMetadataUtils().getInsight(e);if(t)return Promise.resolve({data:{pyInsights:[t]}});const n={insightID:e},{restApi:r,reqType:a}=Mr("getInsightByID",n);return Ou(r,{method:a})},createInsight:function(e){const{restApi:t,reqType:n}=Mr("createInsight");return Ou(t,{method:n,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})},updateInsight:function(e,t){const n={insightID:e},{restApi:r,reqType:a}=Mr("updateInsight",n);return Ou(r,{method:a,body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})},deleteInsight:function(e){const t={insightID:e},{restApi:n,reqType:r}=Mr("deleteInsight",t);return Ou(n,{method:r})},exportToExcel:function(e){const{restApi:t,reqType:n}=Mr("exportToExcel");return Ou(t,{method:n,body:JSON.stringify(e)})},scheduleInsight:(e,t)=>{const n={insightID:e},{restApi:r,reqType:a}=Mr("scheduleInsight",n);return Ou(r,{method:a,body:JSON.stringify(t)})},updateScheduledInsight:(e,t,n)=>{const r={insightID:e,scheduleID:t},{restApi:a,reqType:s}=Mr("updateScheduledInsight",r);return Ou(a,{method:s,body:JSON.stringify(n)})},deleteScheduledInsight:(e,t)=>{const n={insightID:e,scheduleID:t},{restApi:r,reqType:a}=Mr("deleteScheduledInsight",n);return Ou(r,{method:a})},translateStrings:function(e){const{restApi:t,reqType:n}=Mr("translateStrings");return Ou(t,{method:n,body:JSON.stringify(e)})}},Lp=new class{addRoutes=e=>{return t=e,void _r.addRoutes(t);var t}},jp="OPEN_PROCESS_ACTION",Up="OPEN_ASSIGNMENT",kp="DELETE_CASE_IN_CREATE_STAGE",Fp="SAVE_AND_CLOSE",Vp=e=>({type:Fp,payload:e}),Gp=class{static getSavableDataPage(e){return xt(e)}static getLookUpDataPage(e){return Mt(e)}static getLookUpDataPageInfo(e){return Lt(e)}static getDataPageKeys(e){return wt(e)}},Bp=class{constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{const t=Ps.getNextActionMgrId();let n,r;const a=new Promise(((e,t)=>{n=e,r=t}));return Ps.register(t,a,n,r,e),{actionMgrID:t,promise:a}};initializeContainers(e){const t=this.c11nEnv,n={context:t.getContextName(),name:t.getContainerName(),type:ot.CONTAINER_TYPE.SINGLE},{actionMgrID:r,promise:a}=this.containerManagerPromise("INIT_CONTAINERS"),s={...n,...e,actionMgrID:r};return jc(Wi(s)),a}addContainerItem(e){const t=ln,n=this.c11nEnv,r=n.getMetadata(),{children:a}=r;let s;a&&([s]=a);const o=n.getContextName(),i=n.getContainerName(),c=sr(i,o,e?.containerType===ot.CONTAINER_TYPE.SINGLE),d=Sr(i,o),l={root:{...s,config:{...s?.config,context:s?.config?.context||n.getPageReference?.()}},containerItemID:c,context:c,target:d,containerName:i};e=JSON.parse(JSON.stringify(e)),[ot.WORKAREA].includes(i)&&delete e.data.coreHeaders;const{actionMgrID:u,promise:p}=this.containerManagerPromise(t),h={...l,...e,actionMgrID:u};return jc(zi(h)),p}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));const t=En,n={context:Wo(e.containerItemID),target:oi(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),s={...n,...e,actionMgrID:r};return jc(Qi(s)),a}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));const t={target:oi(e.containerItemID)},{actionMgrID:n,promise:r}=this.containerManagerPromise("ACTIVATE_CONTAINER_ITEM"),a={...t,...e,actionMgrID:n};return jc(ec(a)),r}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));const t=un,n={context:Wo(e.containerItemID),target:oi(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),s={...n,...e,actionMgrID:r};return jc(nc(s)),a}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));const t=ri(e),{actionMgrID:n,promise:r}=this.containerManagerPromise("RESET_CONTAINERS"),a={...t,...e,actionMgrID:n};return jc(qi(a)),r}addTransientItem(e){const{id:t,data:n}=e,r=this.c11nEnv.getContextName(),a=ir(t,r),s=ui(r);return a&&s.includes(a)||jc(Yi({transientItemID:a,contextName:r,target:oi(r),data:n})),a}updateTransientData(e){const{transientItemID:t,data:n}=e,r=this.c11nEnv.getContextName();if(t){if(!ui(r).includes(t))return;jc(Ki({transientItemID:t,data:n}))}}removeTransientItem(e){const t=this.c11nEnv.getContextName(),{target:n=this.c11nEnv.getTarget(),containerItemID:r,transientItemID:a}=e;if(a&&r){if(!ui(t).includes(a))return;jc(ac({target:n,containerItemID:r,transientItemID:a}))}}};var Hp=function(e,t){return e===t||"function"==typeof t&&e===t.toString()};function Wp(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,r,a=e.length;return n=1===a?function(t){return Hp(t.type,e[0])}:function(t){for(var n=0;n<a;n++)if(Hp(t.type,e[n]))return!0;return!1},Pe((function(e,t){var a=0;e.subscribe(ve(t,(function(e){return n.call(r,e,a++)&&t.next(e)})))}))}function qp(e,t){return Pe((function(n,r){var a=null,s=0,o=!1,i=function(){return o&&!a&&r.complete()};n.subscribe(ve(r,(function(n){null==a||a.unsubscribe();var o=0,c=s++;$e(e(n,c)).subscribe(a=ve(r,(function(e){return r.next(t?t(n,e,c,o++):e)}),(function(){a=null,i()})))}),(function(){o=!0,i()})))}))}function zp(e){return e&&D(e.schedule)}function Yp(e){return e[e.length-1]}function Kp(e){return zp(Yp(e))?e.pop():void 0}function Jp(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return De(e,Kp(e))}function Xp(e){return Pe((function(t,n){var r,a=null,s=!1;a=t.subscribe(ve(n,void 0,void 0,(function(o){r=$e(e(o,Xp(e)(t))),a?(a.unsubscribe(),a=null,r.subscribe(n)):s=!0}))),s&&(a.unsubscribe(),a=null,r.subscribe(n))}))}var Qp=new de((function(e){return e.complete()}));function Zp(e){return e?function(e){return new de((function(t){return e.schedule((function(){return t.complete()}))}))}(e):Qp}var eh=n(303),th=n.n(eh);const nh=(e,t,n)=>Xp((r=>(console.error(e,r),Jp(lc(e,r,t,null,n))))),rh=(e,t)=>n=>new de((r=>{let a={},s=0;return n.pipe(we((n=>{const r=Date.now();let o;return o=t||th(),o&&o(n,a)&&r-s<e?Zp():(a=n,s=r,Jp(n))}))).subscribe(r)})),ah=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,a=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let s=t.context_data?.is_deferred_action_in_progress??!1;if(r<=0){if(s)n.push({type:rn,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else{if(!(a.length>0))return;{const t=a.shift();s=!s,n.push(t),n.push({type:rn,payload:{context:e,data:{context_data:{deferred_action_queue:a,blocking_action_counter:r,is_deferred_action_in_progress:s}}}})}}jc(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));const t=Uc(e?.payload?.context);if(t){const n=[],r=t.context_data?.blocking_action_counter??0,a=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let s=t.context_data?.is_deferred_action_in_progress??!1;return a.length<=0&&!s&&(r<=0?(n.push(e),s=!s):a.push(e),n.unshift({type:rn,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:a,blocking_action_counter:r,is_deferred_action_in_progress:s}}}}),jc(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=Uc(e);return t&&!0===t.context_data?.is_deferred_action_in_progress?(jc({type:rn,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}}),this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}registerBlockingAction(e){return e?Uc(e)?(jc({type:Wn,payload:{context:e,isInitiateBlockingAction:!0}}),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS)):Promise.reject(new Error(this.MISSING_CONTEXT_PARAM))}deRegisterBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t={...Uc(e)};return t.context_data={...t.context_data},t&&t.context_data?.blocking_action_counter>0?(jc({type:Wn,payload:{context:e,isInitiateBlockingAction:!1}}),t.context_data.blocking_action_counter-=t.context_data.blocking_action_counter,this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;const t=Uc(e);if(t){const n={...t};n.context_data?.deferred_action_queue&&delete n.context_data.deferred_action_queue,n.context_data?.blocking_action_counter&&delete n.context_data.blocking_action_counter,n.context_data?.is_deferred_action_in_progress&&delete n.context_data.is_deferred_action_in_progress,jc({type:rn,payload:{context:e,data:{...n}}}),bs.disableLoadingIndicator({context:e})}}},{RESOURCE_TYPES:sh}=st,oh=class{static openCase(e,t,n,r={}){const a={insKey:e,acTargetName:n,actionMgrID:Ps.getNextActionMgrId(),context:t,...r},s=Qt;r&&r.channelName&&(a.headers={},a.headers[ot.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=Ps.actionManagerPromise(s,a.actionMgrID);return jc({type:s,payload:a}),o}static openAssignment(e,t,n,r={}){const a={assignmentID:e,vcName:n,doDeleteCaseSummary:!0,actionMgrID:Ps.getNextActionMgrId(),context:t,...r},s=nn;r&&r.channelName&&(a.headers={},a.headers[ot.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=Ps.actionManagerPromise(s,a.actionMgrID);return jc({type:s,payload:{...a}}),o}static createCase(e,t,n,r={}){const a=Xt,s={class:e,acTargetName:n,actionMgrID:Ps.getNextActionMgrId(),context:t,...r};r&&r.channelName&&(s.headers={},s.headers[ot.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=Ps.actionManagerPromise(a,s.actionMgrID);return jc({type:a,payload:{...s}}),o}static getNextWork(e,t,n={}){const r=nn,a={isGetNextWork:!0,vcName:t,doDeleteCaseSummary:!0,actionMgrID:Ps.getNextActionMgrId(),context:e,...n},{promise:s}=Ps.actionManagerPromise(r,a.actionMgrID);return jc({type:r,payload:{...a}}),s}static getOpenedCaseItems(e){const t=[],n=xo(e);if(n){const{items:r={}}=n,a=Object.keys(r),s=Go(e);a.forEach((n=>{if(r[n]&&(r[n].resourceType===sh.CASE||r[n].resourceType===sh.ASSIGNMENT)){const{key:a="",context:o}=r[n],i=r[n],c=a.substring(a.indexOf(" ")+1),d=Vc(".caseTypeID","caseInfo",o),l=s===n;t.push({...i,key:a,workID:a,caseID:c,className:d,context:o,containerItemID:n,target:e,active:l})}}))}return t}static getCaseDetails=e=>{const t={caseID:e},{restApi:n,reqType:r}=Mr(Tn,t);return Ou(n,{method:r})};static getCaseBulkActions=e=>{const{restApi:t,reqType:n}=Mr("getBulkActions"),r=e.map((e=>({ID:e}))),a=r.length,s=a/5,o={},i=[];for(let e=0;e<a;e+=s)o.cases=r.slice(e,e+s),o.cases.length&&i.push(Ou(t,{method:n,body:o}));return Promise.all(i).then((e=>{let t=[];for(let n=0;n<e.length;n+=1)0!==n?t.length&&(t=t.filter((t=>e[n].data.availableActions.some((e=>t.ID===e.ID))))):t=e[n].data.availableActions;return t}))}};class ih{constructor(e){ih._instance=this,this.context=`${e}/${ot.SUGGESTION}`,Lc().getState().data?.[this.context]||jc({type:Cn,payload:{context:this.context,data:{}}})}getField(e){return Vc(e,"",this.context)}setField(e,t){jc({type:Ft,payload:{reference:e,value:t,context:this.context}})}removeField(e){jc({type:an,payload:{reference:e,context:this.context}})}setState(e){jc(ki({context:this.context,data:e,isArrayDeepMerge:!0}))}}const ch=ih,dh=class{static getSharedState(e){const t=0===e.indexOf(".")?e.substring(1):e,n=kc();return n?dt.getIn(n,t):null}static setSharedState(e,t){e&&jc(gc({key:e,value:t}))}static updateState(e,t,n,r={}){const{isArrayDeepMerge:a=!0,pageReference:s}=r;e&&t&&jc(yc({context:e,reference:s?`${s}.${t}`:t,value:n,isArrayDeepMerge:a}))}static getSuggestionsContext(e){return new ch(e)}},lh=class{constructor(e,t,n){this.meta=e,this.datasource=t,this.index=0,this.options=n,this.datasourceObj=Ec.getProperyValue(t,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");const e=Ec.getContextPath(this.datasource,this.index);return this.index+=1,Ih({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}};class uh{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,Ih({meta:e,options:this.options})}resetIndex(){this.index=0}}class ph{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=>is.isProperty(e))).map((e=>is.getPropertyName(e)))}}const hh=new ph;Object.freeze(hh);let fh=null;const gh=(e,t,n)=>{e&&(Object.keys(e).forEach((r=>{if("children"!==r){const a=e[r],s=kt.trimAnnotation(a);if("string"!=typeof s&&"string"!=typeof a||!(dt.isPropertyRef(s)||a.startsWith("@W ")||a.startsWith("@E "))){if(Array.isArray(s))s.forEach(((e,n)=>{const a={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||[],t[r][n]=Object.create({}),gh(e,t[r][n],a)}));else if(s&&"object"==typeof s&&"exp"!==s.type){const e={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||{},gh(s,t[r],e)}}else n&&n.parentKey&&(n.isObjHasValue=!0),t[r]=s}})),n&&!n.isObjHasValue&&delete n.parentStateObj[n.parentKey])},yh=(e,t)=>{e._inheritedProps=e._inheritedProps||[],e.inheritedProps=[...e._inheritedProps,...dt.deepClone(t.inheritedProps)]};class mh{constructor(e){const{meta:t,isRoot:n,options:r={},useCustomContext:a}=e;this.meta=t,this._isRoot=n,this.options=r,this.useCustomContext=a,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,this.viewName=r.viewName,this._referenceList=r.referenceList||"",this._isInsideList=r.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=r.localeReference,this._containerTarget=r.target,this.xrayInfo={},this._readOnly=t?.config?.readOnly||r.readOnly,this._hasSuggestions=!1,r.inheritedConfig&&(this._inheritedConfig=dt.deepClone(r.inheritedConfig)),t?.config?.inheritedProps&&yh(this._inheritedConfig,t?.config),gh(this._rawConfig,this._stateProps),this._isState=!dt.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=dt.isExpressionExist(this._rawConfig.config),this._isWhenExist=dt.isWhenExist(this._rawConfig.config),this._isValidatorExist=Ba.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=st.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context,this._type=this.meta?.type;let s=this.options.pageReference;if(s&&(s=kt.handleAnnotation(this.options.pageReference,this)),this._pageReference=Ec.getContextPath(s||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),"reference"===this._type&&(this._rawConfig=t),"reference"===this._type&&dt.isWhenExist({visibility:this.meta?.config.visibility})&&bc(this.viewName,this._contextName,this._pageReference),"reference"!==this._type&&t&&(this._rawConfig=Ec.resolveReference(t,this)),this._rawConfig){const e=this.getRawConfigProps();e&&(this._localeRuleName=kt.trimAnnotation(e.localeReference)||r.localeReference,this._isExpressionExist=dt.isExpressionExist(e),this._isWhenExist=dt.isWhenExist(e),this._isValidatorExist=Ba.isValidatorExist(e)),this._children=this._rawConfig.children,this.options.hasForm&&this._rawConfig.config&&(Object.prototype.hasOwnProperty.call(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||"Editable"===this._rawConfig.config.renderMode&&this._rawConfig.config.referenceList)&&(!this._rawConfig.config.readOnly||"true"!==this._rawConfig.config.readOnly)&&((e,t,n)=>{((e,t,n)=>{if(za[e]){const r=za[e].fieldOrder[t];((e,t,n,r)=>{n&&n.getStateProps().visibility!==r.getStateProps().visibility&&(Ka[e]||(Ka[e]={}),Ka[e][t]||(Ka[e][t]={}),Ka[e][t][r.getStateProps().visibility]=r)})(e,t,r,n),r&&!r.getConfigProps().readOnly&&n.getConfigProps().readOnly||(za[e].fieldOrder[t]=n),za[e].fieldOrder[t].isError=!1}else za[e]={fieldOrder:{[t]:n}},za[e].fieldOrder[t].isError=!1})(e,Ja(t),n)})(this._contextName,this.getFullReference(),this),this._rawConfig?.type?.toLowerCase()===ot.VIEW&&this._rawConfig.name&&(this.viewName=kt.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&(e=>{let t=!1;if(e.isWhenExist())t=!0;else{const n=e.getRawMetadata().config?.value;if(n){const r=At(kt.getLeafPropertyName(n),Ec.resolveClassID(n,e.getPageReference(),e.getContextName()));t=!!r?.isDeclarativeTarget,!t&&r?.datasource?.parameters&&(t=((e,t)=>{let n=!1;if(t&&Array.isArray(t)){const r=t=>{const r=t.value;return r.startsWith("@P")&&(n=Pc(e,r)),n};t.some(r)}else if(t&&"object"==typeof t)for(const r in t)if(t[r].startsWith("@P")&&(n=Pc(e,t[r]),n))break;return n})(e,r?.datasource?.parameters))}}t&&bc(e.getCurrentView(),e.getContextName(),e.getPageReference())})(this)}}setXRayInfo(e){dt.mergeDeep(e,this.xrayInfo)}getXRayInfo(){return this.xrayInfo}getStateProps(){return this._stateProps}setStateProps(e){dt.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getCaseInfo(){return this._caseInfo||(this._caseInfo=new class{constructor(e){this.c11nEnv=e}getCaseStages(e,t){const n={caseID:e},{restApi:r,reqType:a}=Mr("getCaseStages",n);return Ou(r,{method:a},t).then((e=>e.data.stages))}getCaseTypeName(){return this.c11nEnv.getValue(ot.CASE_INFO.CASE_TYPE_NAME)}getName(){return this.c11nEnv.getValue(ot.CASE_INFO.CASE_INFO_NAME)}getClassName(){return this.c11nEnv.getValue(ot.CASE_INFO.CASE_TYPE_ID)}getKey(){return this.c11nEnv.getValue(ot.CASE_INFO.CASE_INFO_ID)}getID(){const e=this.getKey();if(e){const[,t]=e.split(" ");return t||e}}getAssignmentID(){return this.c11nEnv.getValue(ot.CASE_INFO.ASSIGNMENT_ID)}getActions(){return this.c11nEnv.getValue(ot.CASE_INFO.ACTION_BUTTONS)}getActiveFlowActionID(){return this.c11nEnv.getValue(ot.CASE_INFO.ACTIVE_ACTION_ID)||this.c11nEnv.getValue(ot.CASE_INFO.ASSIGNMENTACTION_ID)}getParentCaseInfo(){return this.c11nEnv.getValue(ot.CASE_INFO.PARENTCASEINFO)}isPerform(){return this.c11nEnv.getValue(`${ot.CONTEXT_DATA}${ot.CASE_VIEW_MODE_PROP}`)===ot.PERFORM_MODE}isReview(){return this.c11nEnv.getValue(`${ot.CONTEXT_DATA}${ot.CASE_VIEW_MODE_PROP}`)===ot.REVIEW_MODE}isAssignmentInCreateStage(){const e=this.c11nEnv.getValue(ot.CASE_INFO.CASE_INFO);return Ts(e)}isLocalAction(){const e=this.c11nEnv.getValue(ot.CASE_INFO.CASE_INFO);return Ns(e)}getCurrentAssignmentViewName(){let e=null,t=!1;if(this.c11nEnv.getValue("context_data.caseViewMode")===ot.PERFORM_MODE){if(this.isLocalAction())return e;if(this.isAssignmentInCreateStage())t=!0;else{const t=this.c11nEnv.getTarget(),n=this.c11nEnv.getContextName(),r=wo(t,n),{config:a}=t&&n?r&&r.view:this.c11nEnv.getMetadata();e=a?.type===ot.VIEW?a?.name:null}(e&&e.startsWith(ot.PROPERTY_ANNOTATION)||t)&&(e=this.c11nEnv.getValue(ot.CASE_INFO.VIEW_NAME))}return e}getActionRefreshConditions(){const e=this.c11nEnv.getValue(ot.CASE_INFO.ACTIVE_ACTION_ID),t=ar(this.c11nEnv.getContextName());let n;t&&(n=Uc(t));const r=n?.caseInfo?.availableActions,a=Uc(this.c11nEnv.getContextName())?.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(ot.CASE_INFO.ACTION_REFRESH_CONDITIONS)}getBusinessID(){return this.c11nEnv.getValue(ot.CASE_INFO.BUSINESS_ID)}getAssignments(){return this.c11nEnv.getValue(ot.CASE_INFO.CASE_INFO)?.assignments}getChildAssignments(){return this.c11nEnv.getValue(ot.CASE_INFO.CASE_INFO)?.childCases?.[0]?.assignments}}(this)),this._caseInfo}getListActions(){return(e=>({insert:(t,n,r,a={})=>((e,t,n,r,a)=>{const{skipStateUpdate:s=!1}=a,o=n.getContextName(),i=n.getReferenceList(),c=r||n.getPageReference(),d=Na(i);Ra(n,d,c),Da(o,`${i}[${t}]`),La(i,c,e,t);const l={instruction:ot.LIST_ACTIONS.INSERT,content:{...dt.unflatten(e)}};delete JSON.parse(JSON.stringify(l)).content.classID,qa.getStateMachine(o,c,d).insert(e,t+1,s)})(t,n,e,r,a),update:(t,n,r)=>((e,t,n=0,r={})=>{const{skipStateUpdate:a=!0,pageRef:s}=r,o=t.getContextName();let i=t.getReferenceList();const c=s||t.getPageReference();i||(i=((e,t)=>{const n=e.indexOf(st.CONTENT)+st.CONTENT.length,r=e.lastIndexOf(`[${t}]`);return e.substring(n,r)})(c,n));const d=Na(i);Ra(t,d,c),Da(o,`${i}[${n}]`),La(i,c,e,n),qa.getStateMachine(o,c,d).update(e,n+1,a,r)})(t,e,n,r),updateProperty:(t,n,r)=>((e,t,n,r)=>{const a=n.getPageReference(),{stateMachineTarget:s}=qa.getStateMachineObjByPath(`${a}${e}`,n.getContextName(),!0);if(!s){let e=a.substring(0,a.lastIndexOf("["));const t=e.substring(e.lastIndexOf("."));e=e.substring(0,e.lastIndexOf(".")),e&&t&&Ra(n,t,e)}qa.executeStateMachine(n.getContextName(),`${a}${e}`,t,!0,r)})(t,n,e,r),deleteEntry:(t,n)=>((e,t,n)=>{const r=t.getContextName(),a=t.getReferenceList(),s=n||t.getPageReference(),o=`${s+a}[${e}]`,i=Na(a);vi({type:st.MESSAGES.MESSAGES_TYPE_ERROR,pageReference:o,context:r,isListEntry:!0}),Ra(t,i,s),Da(r,`${a}[${e}]`),qa.getStateMachine(r,s,i).delete(e+1);const c=qa.getUnConnectedStateMachines(r)||{};Object.keys(c).forEach((t=>{t.includes(`${s}${i}[${e}]`)&&(c[t]=null)}))})(t,e,n),reorder:(t,n)=>((e,t,n)=>{const r=n.getContextName(),a=n.getReferenceList(),s=n.getPageReference(),o=Na(a);Ra(n,o,s),Da(r,`${a}[${t}]`),qa.getStateMachine(r,s,o).move(e+1,t+1)})(t,n,e),setSelectedRows:(t,n={})=>((e,t,n)=>new Promise((r=>{const{skipPageInstructions:a=!1}=n,{selectionMode:s,selectionList:o,required:i}=t.getConfigProps(),c=s===ot.LIST_SELECTION_MODE.MULTI,d=t.getContextName();let l=t.getPageReference(),u=c?o.substring(1):l.substring(l.lastIndexOf(".")+1);const p=t.getRawMetadata();let h=null;const f=p.config.dataRelationshipContext&&"SimpleTableSelect"===p.type&&"single"===p.config?.selectionMode;f&&(u=p.config.dataRelationshipContext,h=l.concat(".").concat(u),l=h);const g=c?`${l}${o}`:l,y=c?t.getFieldMetadata(`${u}`):t.getCurrentPageFieldMetadata(h),{datasource:{parameters:m={}}}=y,I={...m};if(((e,t,n)=>{t?.descriptors?.length&&!n&&t.descriptors.forEach((t=>{let n=dt.getPropertyName(t);n=n.substr(n.indexOf(".")+1).split("."),e[n.join(".")]=t}))})(I,y,c),c){let n=o;n=Na(n);const r=t.getValue(g)||[];Ra(t,n,l);const s=[];let i=r.length;e.forEach((e=>{const t=Ua(m,e,u),o={};if(Object.prototype.hasOwnProperty.call(e,"displayProperty")){const t=e.displayProperty;o[t]=e[t]}const c=Object.entries(t);let p=r.findIndex((e=>c.every((([t,n])=>e[t]===n))));if(-1===p?(p=i,e.$selected&&(i+=1)):i=i?i-1:0,!a){const r=qa.getStateMachine(d,l,n);e.$selected?r.insert(t,p+1,!0):r.delete(p+1,!0)}s.push({instruction:e.$selected?ot.LIST_ACTIONS.SELECT:ot.LIST_ACTIONS.DESELECT,listIndex:p,content:{...t,...o}})})),jc(hc({instruction:ot.LIST_ACTIONS_TYPE.SELECT_DESELECT,context:d,referenceList:`${l}.${u}`,actions:s}))}else{const n=Ua(I,e[0],u);t.getActionsApi().updateFieldValue("",n,f?{contextPageReference:l}:{}),t.getActionsApi().triggerFieldChange("",n)}ka(t,g,i,c,u),r()})))(t,e,n),getSelectedRows:(t=!1)=>((e,t)=>{const{selectionMode:n,selectionList:r}=t.getConfigProps(),a=[];let s=t.getPageReference();const o=n===ot.LIST_SELECTION_MODE.MULTI;let i=o?r.substring(1):s.substring(s.lastIndexOf(".")+1);const c=t.getRawMetadata();let d=null;c.config.dataRelationshipContext&&"SimpleTableSelect"===c.type&&"single"===c.config?.selectionMode&&(i=c.config.dataRelationshipContext,d=s.concat(".").concat(i),s=d);const l=o?`${s}${r}`:s;let u=t.getValue(l)||[];if(Array.isArray(u)||(u=[u]),e)return Promise.resolve(u);const{datasource:{parameters:p={}}={}}=o?t.getFieldMetadata(`${i}`):t.getCurrentPageFieldMetadata(d);return u.forEach((e=>{const t=Object.values(p).reduce(((t,n)=>{const r=n.substring(n.lastIndexOf(".")+1);return ja(n,i)&&e[r]?`${t}${e[r]}`:t}),"");t.trim()&&a.push(t.trim())})),Promise.resolve(a)})(t,e),clearSelectedRows:()=>function(e){const{selectionList:t,required:n}=e.getConfigProps(),r=e.getContextName(),a=e.getPageReference(),s=t,o=`${a}${t}`;return new Promise((t=>{let i=s;i=Na(i),Ra(e,i,a),qa.getStateMachine(r,a,i).deleteAll(s),ka(e,o,n,!0,s),t()}))}(e),setVisibility:t=>((e,t=!0)=>{const n=e.getContextName(),{selectionMode:r,selectionList:a,renderMode:s,referenceList:o}=e.getComponentConfig();let i;if(r===ot.LIST_SELECTION_MODE.MULTI&&a?i=a:"Editable"===s&&o&&(i=e.getStateProps().referenceList),i){i=Na(i);const r=qa.getStateMachine(n,"",`${e.getPageReference()}${i}`);r&&(r.visibility=t)}})(e,t),initDefaultPageInstructions:(t,n)=>((e,t,n)=>{const r=e.getContextName(),a=e.getPageReference(),s=Na(t);Ra(e,s,a),qa.getStateMachine(r,a,s).initPageInstructions(e,n)})(e,t,n),deleteAll:t=>((e,t)=>{const n=e.getPageReference(),r=Na(t);Ra(e,t,n),qa.getStateMachine(e.getContextName(),n,r).deleteAll(t)})(e,t),replacePage:(t,n)=>((e,t,n)=>{const r=e.getPageReference(),a=e.getContextName();Ra(e,t,r),Da(a,dt.buildInstructionPageReference(r,t)),qa.getStateMachine(a,r,t).replacePage(n)})(e,t,n)}))(this)}getReferenceList(){return this._referenceList}isInsideList(){return this._isInsideList||/\[\d+\]/g.test(this.getPageReference())}getRawMetadata(){return this.getMetadata()}setReferenceList(e){this._referenceList=e}getComponentConfig(){return this.getMetadata()?.config||{}}isExpressionExist(){return this._isExpressionExist}isWhenExist(){return this._isWhenExist}isConditionExist(){return this.isExpressionExist()||this.isWhenExist()}isBoundToState(){return this._isState}getPageReference(){return this._pageReference}getFullReference(){const e=this.getPageReference(),t=this.getComponentConfig();let n="value";"multi"===t.selectionMode?n="selectionList":"Editable"===t.renderMode&&(n="referenceList");const r=this.getComponentConfig()[n];return Ec.getContextPath(e,r)}getContextName(){return this._contextName}getContainerName(){const{acTargetName:e="primary",type:t,name:n}=this.getComponentConfig();return"view"!==t?.toLowerCase()&&n?n:this.options.containerName||e}getTarget(){return this._containerTarget}getCurrentView(){return this.viewName}populateSuggestionProps(e={}){if(this._rawConfig?.config&&Object.prototype.hasOwnProperty.call(this._rawConfig.config,"value")&&this.getStateProps()?.value&&this.options.hasForm){const t=d?.getStore()?.getState()?.data[`${this.getContextName()}/${ot.SUGGESTION}`],n=this.getStateProps()?.value,r=Ec.getContextPath(this.getPageReference(),n),a=t?dh.getSuggestionsContext(this.getContextName()).getField(r):void 0;this._hasSuggestions=!!a,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){const t={...Va.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig&&this._rawConfig.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(t),this.resolveConfigProps(t,e),dt.resolveStringBooleans(e)}getRawConfigProps(){const e={...Va.getDefaultsforType(this._type),...this._rawConfig.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(e),e}resolveConfigProps(e,t={}){return e&&(Ec.resolveProps(e,t,this),kt.handleComponentMapping(t,{type:this.getComponentName(),config:e},this)),t}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),gh(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach((e=>{delete this._additionalRegisteredProps[e]})),!0}populateAdditionalProps(e){const t=this.getComponentName(),n=this.getComponentConfig(),r=t===ot.ROOT_CONTAINER&&"portal"!==e.renderingMode;if(t===ot.MODAL_VIEW_CONTAINER||t===ot.CASE_CREATE_STAGE){const t=Go(`${ot.APP.APP}/${this.getContainerName()}`),n=Pi({context:t,category:st.PAGE});e.pageMessages=n,this._stateProps.pageMessages=e.pageMessages}if(this.isEditable()){let{value:t}=this.getStateProps();void 0===t&&"multi"===this.getComponentConfig()?.selectionMode?t=this.getStateProps().selectionList:!t&&"Editable"===this.getComponentConfig()?.renderMode&&this.getStateProps().referenceList&&(t=this.getStateProps().referenceList);const n=Pi({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:st.MESSAGES.MESSAGES_TYPE_ERROR}),r=Pi({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:st.MESSAGES.MESSAGES_TYPE_INFO});if(n&&n[0]){const t=n.map((e=>Xr.getLocaleValue(e.message,"Messages")));e.validatemessage=t.join(". "),e.status=ot.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status}r&&r[0]&&(e.infoMessage=r[0].message,e.status=ot.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(t===ot.ROOT_CONTAINER){const t=Ri(r,Go(`${ot.APP.APP}/${this.getContainerName()}`));e.httpMessages=t,this._stateProps.httpMessages=e.httpMessages}if(t===ot.ROOT_CONTAINER){const t=Pi({context:ot.APP.ROOT,category:"PAGE"});e.pageMessages=t,this._stateProps.pageMessages=e.pageMessages}if(t===ot.APP_SHELL&&e.portalDocMode===ot.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=oh.getOpenedCaseItems(`${st.APP.APP}/${ot.PRIMARY}`),this._stateProps.activeCases=e.activeCases),t===ot.APP_SHELL){const t=Pi({context:ot.APP.APP,category:"PAGE"});e.pageMessages=t?t.map((e=>e.message)):t,this._stateProps.pageMessages=e.pageMessages}if(e.value&&t===ot.SCALARLIST&&(this._stateProps.value=e.value),t===ot.APP_SHELL||t===ot.MODAL_VIEW_CONTAINER||t===ot.CASE_CREATE_STAGE||n.template===ot.CASE_PREVIEW){let t=Pi({context:ot.APP.APP,category:"HTTP"});const n=Pi({context:Go(`${ot.APP.APP}/${this.getContainerName()}`),category:"HTTP"});t?n&&(t=t.concat(Pi({context:Go(`${ot.APP.APP}/${this.getContainerName()}`),category:"HTTP"}))):t=Pi({context:Go(`${ot.APP.APP}/${this.getContainerName()}`),category:"HTTP"}),e.httpMessages=t?t.map((e=>e.message)):t,this._stateProps.httpMessages=e.httpMessages,t?.map((t=>{t.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...t.errorDetails):t.errorDetails,this._stateProps.errorDetails=e.errorDetails),t.correlationID&&(e.correlationID=t.correlationID)}))}if(t===ot.VIEW_CONTAINER||t===ot.FLOW_CONTAINER||t===ot.MODAL_VIEW_CONTAINER||t===ot.PREVIEW_VIEW_CONTAINER||t===ot.ROOT_CONTAINER){if(e.routingInfo=$r(this.getContainerName(),this._contextName),t===ot.ROOT_CONTAINER&&(e.rootConfig=ph.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,t===ot.FLOW_CONTAINER){const t=Pi({context:this.getContextName(),category:ot.CASEMESSAGES}),n=this.getContextName();e.caseMessages=t,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;const r=Yo(n)[0];if(r){const t=Go(r);e.lastUpdateTime=d?.getStore()?.getState()?.data?.[t]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=d?.getStore()?.getState()?.data?.[t]?.caseInfo?.lastUpdateTime;const n=Pi({context:t,category:st.PAGE});e.pageMessages=n,this._stateProps.pageMessages=e.pageMessages}}if(e.loadingInfo=this.getLoadingStatus(this.getContextName()),e.assignmentNames=this.getCaseInfo().getAssignments()?.map((e=>e.name)),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map((e=>e.name)),t===ot.MODAL_VIEW_CONTAINER){const t=e.routingInfo?.accessedOrder||[],n=t[t.length-1];n&&(e.loadingInfo=this.getLoadingStatus(n))}this._stateProps.loadingInfo=e.loadingInfo,this._stateProps.assignmentNames=e.assignmentNames,this._stateProps.childAssignmentNames=e.childAssignmentNames}else n.template===ot.CASE_VIEW||n.template===ot.CASE_PREVIEW||n.template===ot.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):t===ot.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);this.populateFieldMetadata(e)}populateFieldMetadata(e){const{value:t,datasource:n,listType:r}=this.getComponentConfig();let a="",s="";if(r===ot.ASSOCIATED?(a=n,s=ot.ASSOCIATED_PROPERTY_ANNOTATION):(a=t,s=ot.PROPERTY_ANNOTATION),a&&"string"==typeof a&&a.includes(s)){const t=kt.getPropertyName(a),n=this.getFieldMetadata(t);n&&(e.fieldMetadata=n,(e.fieldMetadata.isDeclarativeTarget||is.isPropertyInternal(t)||!e.datasource&&(e.fieldMetadata.isClassKey||e.fieldMetadata.isSpecial)&&e.listType!==ot.ASSOCIATED)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})))}}getFieldMetadata(e){if(!e)return null;const t=e.split(".");if(t.length<2){let t=this.getValue(ot.CLASS_ID);return!t&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(t=this._rawConfig.config.ruleClass),At(e,t)}return At(t.pop(),this.getValue(`.${t.join(".")}${ot.CLASS_ID}`))}getCurrentPageFieldMetadata(e=null){let t=this.getPageReference().split(".");null!==e&&(t=e.split("."));const n=t.pop();return At(n,this.getValue(`${t.join(".")}${ot.CLASS_ID}`))}getCurrentClassID(){return this.getValue(ot.CLASS_ID)}getCaseSummary(){const e={...this.getDataObject()[st.CASE_INFO.CASE_INFO]};return e.CaseID=e.CaseID||this.getValue(st.CASE_INFO.CASE_INFO_PZINSKEY),{...e,isCaseWideAction:()=>Ds(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()[st.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[st.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 class{constructor(e){this.c11nEnv=e}validate(e,t){if(!t&&!(t=this.c11nEnv.getStateProps().value)){const e=this.c11nEnv.getComponentConfig();"multi"===e.selectionMode?t=this.c11nEnv.getStateProps().selectionList:"Editable"===e.renderMode&&(t=this.c11nEnv.getStateProps().referenceList)}const n=Ba.validate(this.c11nEnv.getComponentName().toLowerCase(),t,e,this.c11nEnv);return n?.message?{status:!1,message:n?.message}:{status:!0}}}(this)}isEditable(){return this._rawConfig&&this._rawConfig.config&&!(this._inheritedConfig&&this._inheritedConfig.readOnly)&&(Object.prototype.hasOwnProperty.call(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.prototype.hasOwnProperty.call(this._rawConfig.config,"readOnly")&&("true"===this._rawConfig.config.readOnly||!0===this._rawConfig.config.readOnly))&&!(Object.prototype.hasOwnProperty.call(this._rawConfig.config,"disabled")&&!0===this._rawConfig.config.disabled)}hasChildren(){return!!this._children}getComputedVisibility(){const e="reference"===this._type&&this.getReferencedView()?this.getReferencedViewPConnect().getPConnect():this;if(!1===this.getConfigProps().visibility)return!1;const t=e.getConfigProps(),n={includeTypes:["Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]};let r=n.includeTypes.includes(e._type)&&!n.excludeTemplates.includes(t.template);if(!!t.highlightedData&&t.highlightedData.length&&t.showHighlightedData&&(r=!1),!r)return!0;const a=e.getChildren();return!!a&&a.some((e=>e.getPConnect().getComputedVisibility()))}getChildrenIterato(){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 Uc(e||this.getContextName())}getImagePath(e){return`${Kr.getConstellationServiceUrl()}/v860/${Kr.getAppAlias()}/image/${e}?org=${_r.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){const e=((e,t)=>{const n=!!e.repeat;if(e["repeat-self"])return new lh(e,e.context,t);if(n){const n=Bc(`${t.context}.${ot.SUMMARY_OF_LISTS}`,e.pageReference,t.context);return new lh(e.children[0],n||e.context,t)}return e.children?new uh(e.children,t):void 0})(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}),t=[];for(;e.hasNext();){const n=e.next();if(this.isBulkAction()){const e=n.getPConnect().getComponentName(),{template:t}=n.getPConnect().getConfigProps();if(!0!==ph.allowedComponetsForBulkProcessing[e]&&!0!==ph.allowedComponetsForBulkProcessing[e]?.[t])continue}t.push(n)}return e.resetIndex(),t}return null}setInheritedProp(e,t){this._inheritedConfig[e]=t}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,t,n){const r=n||this.getLocaleRuleName();return Xr.getLocaleValue(e,t,r)}getLocalizedParagraphValue(e){const t=this.getLocaleRuleNameFromKeys(this.getCurrentClassID(),ot.PARAGRAPH,e);return Xr.getParagraphLocaleValue(t,this.getCurrentClassID(),e)}getLocaleRuleNameFromKeys(e,t,n){return`${e}!${t}!${n}`}getValue(e,t){return this.useCustomContext?(e=0===e.indexOf?.(".")?e.substring(1):e).split?.(".").reduce(((e,t)=>e?.[t]??void 0),this.useCustomContext):this._hasSuggestions&&this.getStateProps()?.value===e?Ec.getProperyValue(e,this.getPageReference(),`${this._contextName}/${ot.SUGGESTION}`):Ec.getProperyValue(e,t||this.getPageReference(),this._contextName)}setInheritedConfig(e){if(!e)return;const{readOnly:t,displayMode:n,referenceType:r,hideLabel:a}=e;a&&(this._inheritedConfig.hideLabel=a),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)})),yh(this._inheritedConfig,e))}getInheritedProps(){const e={},t={};return this._inheritedConfig.inheritedProps?.forEach((e=>{t[e.prop]=e.value})),Ec.resolveProps(t,e,this),e}setValue(e,t,n,r){let a,s;this.isInsideList()&&this.getListActions().updateProperty(e,t),this.isBulkAction()&&(a=!0,t||(s=!0)),jc({type:"SET_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,initialValue:n,isImplicit:r,context:this.getContextName(),...a&&{isStrictTracking:a},...s&&{removePropertyFromChangedList:s}}})}updateDirtyCheckChangeList(e,t){(({value:e,context:t,reference:n})=>{if(cs.isPageInstruction(n))return;const r=n?.startsWith(".")?n?.substr(1):n;ls[t]=ls[t]||{},ls[t][r]||(ls[t][r]={initialValue:Vc(r,null,t)}),ls[t][r].value=e})({reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName()})}getContextDataValue(e,t){return Gc(t||this.getPageReference(),e,this._contextName)}updateState(e){const t=this._pageReference.indexOf(ot.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf(".");let r=ot.CASE_INFO.CASE_INFO_CONTENT;0!==t&&(r=n>0?this._pageReference.substring(n):this._pageReference),jc(ki({context:this._contextName,data:e,rootPageReference:r}))}replaceState(e,t,n={}){const{skipDirtyValidation:r=!1}=n;jc({type:"REPLACE_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName(),skipDirtyValidation:r}})}reportError(e,t,n){jc(lc(e,t||{},n))}getComponent(){return fh({getPConnect:()=>this})}createComponent(e,t,n,r){let a=this._pageReference;if(t){const e=Bc(`${this.getPageReference()}.${ot.SUMMARY_OF_LISTS}`,t,this._contextName);a=Ec.getContextPath(e||t,n)||t}else if(r&&r.pageReference){let e=r.pageReference;e=kt.handleAnnotation(e,this),a=Ec.getContextPath(this._pageReference,e)||""}return fh(Ih({meta:e,options:{containerName:this.getContainerName(),hasForm:this.options.hasForm,...e.options,pageReference:a,context:this._contextName,target:this._containerTarget,readOnly:this._readOnly||this._inheritedConfig?.readOnly}}),r)}getReferencedView(){if(this.meta)return Ec.resolveReference(this.resolveConfigProps(this.meta),this)}getReferencedViewPConnect(e=!1){const t={...this.getComponentConfig()};return delete t?.name,delete t?.type,Ih({meta:this.getReferencedView(),options:{...e?this.options:void 0,...t,context:this.getContextName(),pageReference:t.context?`${this.getPageReference()}${t.context}`:this.getPageReference()}})}getContainerManager(){return new Bp(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new class{constructor(e){this.c11nEnv=e}MSG_CLASSNAME_REQUIRED="className is required parameter";MSG_CLASSNAME_STRING="className 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.";shouldDeleteCaseInCreateStage=(e,t,n)=>!e&&t||n;getSaveActionPayload=(e,t=!1)=>{const n=e,r=n&&-1!==n.indexOf(ot.MODAL),a=this.c11nEnv.getValue(st.CASE_INFO.CASE_INFO_ID),s=this.c11nEnv.getValue(st.CASE_INFO.ASSIGNMENT_ID),o=this.c11nEnv.getValue(st.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(st.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(st.CASE_INFO.ASSIGNMENTACTION_ID),i=this.c11nEnv.getContainerName(),c=this.c11nEnv.getValue(st.CASE_INFO.CASE_TYPE_ID),d=t?void 0:ss(this.c11nEnv.getContextName()),l=this.c11nEnv.getValue("isProcessAction","isProcessAction",n);return Mi.buildActionObject({context:n,containerItemID:e,assignmentID:s,actionID:o,caseID:a,containerName:i,caseType:c,isModalAction:r,isFormValid:d,isProcessAction:l,saveOnly:t},this.c11nEnv)};actionsApiPromise=(e,t=null,n=!0)=>{let r,a,s=null;s=t&&null!==t.actionMgrID?t.actionMgrID:Ps.getNextActionMgrId();const o=new Promise(((e,t)=>{r=e,a=t}));return Ps.register(s,o,r,a,e,t,n),{actionMgrID:s,promise:o}};showDataObjectCreateView(e,t=st.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){const n=Mi.buildActionObject({viewName:t,className:e},this.c11nEnv),r=Ht,{promise:a}=this.actionsApiPromise(r,n);return jc({type:r,payload:{...n,containerName:st.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),a}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(!ys(t))return new Bp(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0});const n=Dn,r=Mi.buildActionObject({containerItemID:e,context:t},this.c11nEnv),a=t&&-1!==t.indexOf(ot.MODAL);jc({type:n,payload:{...r,isModalAction:a,isDataObject:!0,skipReleaseLockRequest:!0}});const{promise:s}=this.actionsApiPromise(n,r);return s}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));const{data:t}=Lc().getState(),n=t[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error("Data object class not found"));const r=Gp.getSavableDataPage(n),a=e&&-1!==e.indexOf(ot.MODAL),s=Mi.buildActionObject({containerItemID:e,dataPageID:r},this.c11nEnv),{promise:o}=this.actionsApiPromise("CREATE_DATA_OBJECT",s);return jc({type:"CREATE_DATA_OBJECT",payload:{...s,isModalAction:a,isFormValid:ss(e)}}),o}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=Gp.getSavableDataPage(e),r=Gp.getDataPageKeys(n),a={};for(const e of r)a[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const s=Mi.buildActionObject({dataViewName:n,dataViewParameters:a},this.c11nEnv),{promise:o}=this.actionsApiPromise("DELETE_DATA_OBJECT",s);return jc({type:"DELETE_DATA_OBJECT",payload:{...s}}),o}getDataObjectView(e,t,n={}){const 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("keyProperties is required parameter"));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));const a=Gp.getLookUpDataPage(e),s=Gp.getDataPageKeys(a);for(const e of s)r[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const o=Mi.buildActionObject({dataLookUp:a,requestPayload:r,viewName:n.viewName||st.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:ot.MODAL,keyProperties:t},this.c11nEnv),{promise:i}=this.actionsApiPromise("VIEW_DATA_OBJECT",o);return jc({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}=Lc().getState(),r=n[e]?.dataInfo?.content?.classID;if(!r)return Promise.reject(new Error("Data object class not found"));const a=Gp.getSavableDataPage(r);Gp.getDataPageKeys(a).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]}));const s=e&&-1!==e.indexOf(ot.MODAL),o=Mi.buildActionObject({containerItemID:e,dataPageID:a,key:t},this.c11nEnv),{promise:i}=this.actionsApiPromise("UPDATE_DATA_OBJECT",o);return jc({type:"UPDATE_DATA_OBJECT",payload:{...o,isModalAction:s,isFormValid:ss(e)}}),i}createWork(e,t={}){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&&window.pms.plugins&&window.pms.plugins.c11n&&window.pms.plugins.c11n.createWork)return window.pms.plugins.c11n.createWork(e,"pyStartCase");const{dockable:n=!1}=t?.modalOptions||{},r=Xt,a=Mi.buildActionObject({class:e,flowType:"pyStartCase",containerName:ot.PRIMARY,openCaseViewAfterCreate:!0,...t,modalOptions:{isDockable:n}},this.c11nEnv),{promise:s}=this.actionsApiPromise(r,a);if(t.channelName&&(a.headers=a.headers||{},a.headers[ot.X_ORIGIN_CHANNEL]=t.channelName),Er.isRemoteCase(e)){const{RemoteClassName:t,RemoteSystemID:n}=Er.getRemoteCase(e);a.class=t,a.headers=a.headers||{},a.headers.RemoteSystemID=n}return qr.getPreviewMode()&&(a.debugInfo={debugId:dt.generateUniqueID()}),jc({type:r,payload:{...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&&window.pms.plugins&&window.pms.plugins.c11n&&window.pms.plugins.c11n.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,t);const r={insKey:e,acTargetName:n.targetContainer||ot.PRIMARY,containerName:n.targetContainer||ot.PRIMARY},a=Qt,s=Mi.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(a,s);if(n.channelName&&(s.headers=s.headers||{},s.headers[ot.X_ORIGIN_CHANNEL]=n.channelName),s.className=t,Er.isRemoteCase(t)){const{RemoteSystemID:e}=Er.getRemoteCase(t);s.headers=s.headers||{},s.headers.RemoteSystemID=e,s.isRemoteCase=!0,s.remoteCaseClass=t}return qr.getPreviewMode()&&![ot.WORKAREA].includes(n.targetContainer)&&(s.debugInfo={debugId:dt.generateUniqueID()}),jc({type:a,payload:{...n,...s}}),o}openAssignment(e,t,n={}){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&&window.pms.plugins&&window.pms.plugins.c11n&&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};n.isChild&&(r.containerName=ot.PRIMARY,r.isChild=n.isChild);const a=Up,s=Mi.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(a,s);if(n.channelName&&(s.headers=s.headers||{},s.headers[ot.X_ORIGIN_CHANNEL]=n.channelName),Er.isRemoteCase(t)){const{RemoteSystemID:e}=Er.getRemoteCase(t);s.headers=s.headers||{},s.headers.RemoteSystemID=e}s.className=t,s.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),qr.getPreviewMode()&&![ot.WORKAREA].includes(n.containerName)&&(s.debugInfo={debugId:dt.generateUniqueID()});const i={context:s.context||n.context,containerName:s.containerName||n.containerName,targetContainerName:s.containerName||n.containerName,viewType:s.viewType||n.viewType,skipBrowserSemanticUrlUpdate:n.skipBrowserSemanticUrlUpdate};return jc({type:a,payload:{...s,...i}}),o}finishAssignment(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 n=Wo(e);let r=n;if(n?.includes("/workarea")&&(r=n.substring(0,r.lastIndexOf("/workarea"))),(e=>{const t=ts();if(t[e])for(const n in t[e].fieldOrder)if(Object.prototype.hasOwnProperty.call(t[e].fieldOrder,n)&&t[e].fieldOrder[n].getConfigProps().hasSuggestions)return!0;return!1})(n)){const e=[{type:"error",message:Xr.getLocaleValue(this.MSG_ACTIVE_SUGGESTION_UNATTENDED,"Messages")}];return Oi({messages:e,context:r,category:st.PAGE}),Promise.reject({type:st.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}const a=en,s=t?.isTriggeredFromDifferentContext,{caseID:o,assignments:i,localActionID:c,caseActions:d,caseInfo:l}=Ms(e,this.c11nEnv,{isTriggeredFromDifferentContext:s}),u=Ts(l);let p,h=!1;d?h="Case"===d.find((e=>e.ID===c))?.type:p=Uc(n);let{assignmentID:f}=Ms(e,this.c11nEnv,{isTriggeredFromDifferentContext:s});p?.context_data?.actionType&&(h=p.context_data.actionType===ot.CASE,f=f||p.context_data.assignmentID);const g=((e,t,n)=>{let r;const a=e?.find((e=>e.ID===t))?.actions,s=a?.filter((e=>e.ID===ot.FIX_BROKEN_ASSIGNMENTS));return r=n&&s?.length>0?s[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})(i,f,c),[y,m]=o.split(" "),I={class:y,actionID:g,assignmentID:f,caseID:o,workID:m,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:h,doDeleteCaseSummary:!0,isInCreateStage:u};-1!==e?.indexOf(ot.MODAL)&&(I.containerName=ot.MODAL,I.isModalAction=!0),I.outcome=t.outcomeID,l?.isLocalAction&&(I.viewType=so.FORM);const E=Mi.buildActionObject(I,this.c11nEnv),{promise:A}=this.actionsApiPromise(a,E),_=this.c11nEnv.getValue("isProcessAction","isProcessAction",n);return E.isProcessAction=_,ah.executeOrQueueDeferredAction({type:a,payload:{...E,context:n}}),A}getNextWork(){const e=Up,t=Mi.buildActionObject({containerName:ot.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:n}=this.actionsApiPromise(e,t);return jc({type:e,payload:{...t}}),n}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));const t=Up,n=this.c11nEnv.getValue(st.CASE_INFO.CASE_INFO_ID),r=this.c11nEnv.getCaseSummary().headers,a=Mi.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:s}=this.actionsApiPromise(t,a),o={type:t,payload:{...a,caseID:n,headers:r}};return jc(o),s}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(st.CASE_INFO.CASES),r=this.c11nEnv.getValue(st.CASE_INFO.ACTIVE_ACTION_ID),a={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&-1!==e.indexOf(ot.MODAL)&&(a.containerName=ot.MODAL,a.isModalAction=!0);const s=Mi.buildActionObject(a,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,s),i=Wo(e);return jc({type:t,payload:{...s,context:i,cases:n,actionID:r,isFormValid:ss(i),classID:this.c11nEnv.getCurrentClassID()}}),o}openBulkAction(e,t){if(!e)return Promise.reject(new Error("actionID is required parameter for openBulkAction"));if("string"!=typeof e)return Promise.reject(new TypeError("actionID must be a string openBulkAction"));const{selectedList:n}=t,r=t.type,a={selectedList:n,vcName:t.target,actionName:t?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:r,...t},s="OPEN_BULK_ACTION",o=Mi.buildActionObject(a,this.c11nEnv),{promise:i}=this.actionsApiPromise(s,o);return jc({type:s,payload:{...o}}),i}cancelBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=un,n={containerItemID:e,context:e,skipReleaseLockRequest:!0,target:`${ot.APP.APP}/${ot.MODAL}`,caseViewMode:ot.PERFORM_MODE,deleteContext:!0};jc({type:t,payload:n});const{promise:r}=this.actionsApiPromise(t,n);return r}approveCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(jc({type:Ft,payload:{reference:st.CASE_INFO.APPROVALFLAG,value:ot.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)):(jc({type:Ft,payload:{reference:st.CASE_INFO.APPROVALFLAG,value:ot.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(st.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:Ft,payload:{reference:st.CASE_INFO.DUPLICATECASEFLAG,value:ot.DUPLICATE,context:e}},r={type:Ft,payload:{reference:st.CASE_INFO.DUPLICATECASEID,value:t,context:e}};return jc([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:Ft,payload:{reference:st.CASE_INFO.DUPLICATECASEFLAG,value:ot.IGNORE,context:e}},n={type:Ft,payload:{reference:st.CASE_INFO.DUPLICATECASEID,value:"",context:e}},r={type:Ft,payload:{reference:st.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return jc([t,n,r]),this.finishAssignment(e)}openLocalAction(e,t){if(!e)return Promise.reject(new Error("actionID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("actionID must be a string"));const n=t.assignKey||this.c11nEnv.getValue(st.CASE_INFO.ASSIGNMENT_ID),r=t.caseID||this.c11nEnv.getValue(st.CASE_INFO.CASE_INFO_ID),a=t.type,s={caseID:r,assignmentID:n,vcName:t.target,actionName:t?.name,assignKey:n,actionID:e,doDeleteCaseSummary:!0,localActionType:a,...t},o="OPEN_LOCAL_ACTION",i=Mi.buildActionObject(s,this.c11nEnv),c=this.c11nEnv.getContextName(),{promise:d}=this.actionsApiPromise(o,i),l=Yo(c)[0];let u,p=!1;if(!l)return u=c,jc({type:o,payload:{...i,contextName:c,continueExecution:p}}),d;u=Go(l);const h=xo(l);if(h?.accessedOrder.forEach((e=>{r===h.items[e].key&&(p=!0,u=h.items[e].context)})),!p||this.c11nEnv.getCaseInfo().isReview())return jc({type:o,payload:{...i,contextName:c,continueExecution:p}}),d;const f=u,g=f&&-1!==f.indexOf(ot.MODAL),y=t.assignKey||this.c11nEnv.getValue(st.CASE_INFO.ASSIGNMENT_ID),m=Uc(u),I=m?.caseInfo?.assignments?m.caseInfo.assignments[0]?.actions[0]?.ID:void 0,E=this.c11nEnv.getContainerName(),A=this.c11nEnv.getValue(st.CASE_INFO.CASE_TYPE_ID),_=this.c11nEnv.getValue("isProcessAction","isProcessAction",f),S=Mi.buildActionObject({context:f,containerItemID:u,assignmentID:y,actionID:I,caseID:r,containerName:E,caseType:A,isModalAction:g,isFormValid:!0,isProcessAction:_},this.c11nEnv);S.context=u;const $=Wo(u),C=this.c11nEnv.getCaseSummary(),b=Ts(C),P=Mi.buildActionObject({caseID:r,containerItemID:u,cancelContext:$},this.c11nEnv);let v={};return g?(P.acTargetName=ot.MODAL,P.isInCreateStage=b,P.isModalAction=g,v={...P}):v={...P,acName:Sr(this.c11nEnv.getContainerName(),P.context)},jc({type:o,payload:{...i,contextName:c,saveActionPayload:S,cancelActionPayload:v,continueExecution:p}}),d}openProcessAction(e,t){if(!e)return Promise.reject(new Error("actionID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("actionID must be a string"));const n=this.c11nEnv.getValue(st.CASE_INFO.ASSIGNMENT_ID)||t.assignKey,r=this.c11nEnv.getValue(st.CASE_INFO.CASE_INFO_ID)||t.caseID,a=t.type,s={caseID:r,assignmentID:n,vcName:t.target,actionName:t?.name,assignKey:n,actionID:e,doDeleteCaseSummary:!0,processActionType:a,isProcessAction:!0,...t},o=jp,i=Mi.buildActionObject(s,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);return jc({type:o,payload:{...i}}),c}navigateToStep(e,t){if(!e)return Promise.reject(new Error("stepID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("stepID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n="NAVIGATE_TO_STEP",r=this.c11nEnv.getValue(st.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(st.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(st.CASE_INFO.ASSIGNMENT_ID),a=Ts(this.c11nEnv.getCaseSummary()),s={ID:r,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:t,doDeleteCaseSummary:!0,isInCreateStage:a};t&&-1!==t.indexOf(ot.MODAL)&&(s.acTargetName=ot.MODAL);const o=Mi.buildActionObject(s,this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o),c=Wo(t);return jc({type:n,payload:{...o,containerItemID:t,context:c}}),i}cancelAssignment(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}=st,n=tn,r=Wo(e),a=e&&e.indexOf(ot.MODAL)>-1,s=this.c11nEnv.getCaseSummary(),o=Ts(s),i=this.c11nEnv.getValue(t.CASE_INFO_ID),c=Mi.buildActionObject({caseID:i,containerItemID:e,context:r},this.c11nEnv);let d={};a?(c.acTargetName=ot.MODAL,c.isInCreateStage=o,c.isModalAction=a,d={...c}):d={...c,acName:Sr(this.c11nEnv.getContainerName(),c.context)},jc({type:n,payload:d});const{promise:l}=this.actionsApiPromise(n,c);return l}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}=st,n=e,r=Dn,a=e&&e.indexOf(ot.MODAL)>-1,s=this.c11nEnv.getValue(t.CASE_INFO_ID),o=Mi.buildActionObject({caseID:s,containerItemID:e,context:n},this.c11nEnv);if(!ys(n))return new Bp(this.c11nEnv).removeContainerItem({containerItemID:e});jc({type:r,payload:{...o,isModalAction:a}});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}=st,n=Dn,r=e,a=r&&-1!==r.indexOf(ot.MODAL),s=this.c11nEnv.getCaseSummary(),o=Ts(s),i=this.c11nEnv.getValue(t.CASE_INFO_ID),c=Mi.buildActionObject({caseID:i,containerItemID:e,context:r},this.c11nEnv),d=this.c11nEnv.getValue("isProcessAction","isProcessAction",r),l=zr.isCoexistenceAppOfType(ot.APP_TYPE.UIKIT);if(c.isProcessAction=d,o&&(a||l)&&!Ns(s)){const t=this.c11nEnv.getValue("caseInfo.isFirstAssignment"),o=ys(r);if(this.shouldDeleteCaseInCreateStage(o,t,l))return this.deleteCaseInCreateStage(e);jc({type:n,payload:{...c,isModalAction:a,isChildCase:ws(s)}})}const{promise:u}=this.actionsApiPromise(n,c);return u}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=this.getSaveActionPayload(e,!0),{promise:n}=this.actionsApiPromise("SAVE_AND_CLOSE",t);return jc(Vp(t)),n}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=this.getSaveActionPayload(e),{promise:n}=this.actionsApiPromise("SAVE_AND_CLOSE",t);return jc(Vp(t)),n}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=e,r=n&&-1!==n.indexOf(ot.MODAL),a=this.c11nEnv.getValue(st.CASE_INFO.CASE_INFO_ID),s=this.c11nEnv.getValue(st.CASE_INFO.CASE_TYPE_ID),o=Mi.buildActionObject({caseID:a,caseType:s,containerItemID:e,context:n,ignoreCaseDeletion:t},this.c11nEnv),i=this.c11nEnv.getValue("isProcessAction","isProcessAction",n),c=this.c11nEnv.getValue(st.CASE_INFO.PARENTCASEINFO);o.isProcessAction=i,o.parentCaseInfo=c;const d=`${ot.APP.APP}/${No.PRIMARY}`,l=yo(d,No.PRIMARY);o.parentContext=l,r&&(o.targetName=ot.MODAL,o.containerName=No.MODAL,o.isModalAction=r),jc((e=>({type:kp,payload:e}))(o));const{promise:u}=this.actionsApiPromise("DELETE_CASE_IN_CREATE_STAGE",o);return u}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}=_r.getRestEndPoint("getRecents");t=`${t}?maxResultsToFetch=${e}`;const n=er()+t;return Ou(n,{method:"GET",headers:{}})}logout(){const{restApi:e}=_r.getRestEndPoint("Logout"),t=er()+e;return Ou(t,{method:"GET",headers:{}})}invoke(e,t={}){const n={method:t.method||"GET",body:t.body};return Ou(e,n,this.c11nEnv.getContextName())}showCasePreview(e,t={}){this.loadView(e,"pyCasePreview",{container:No.PREVIEW,containerName:No.PREVIEW,context:st.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:No.PREVIEW,containerName:No.PREVIEW,context:st.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=Mi.buildActionObject({caseId:e,viewName:t,caseClassName:this.c11nEnv.getValue(st.CASE_INFO.CASE_TYPE_ID),RemoteSystemID:Er.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);n&&(r={...r,...n});const a=Bt,{promise:s}=this.actionsApiPromise(a,r,!1);return jc({type:a,payload:{...r}}),s}showPage(e,t,n={}){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));const r=Mi.buildActionObject({viewName:e,className:t},this.c11nEnv),a=Ht,{promise:s}=this.actionsApiPromise(a,r);return qr.getPreviewMode()&&(r.debugInfo={debugId:dt.generateUniqueID()}),jc({type:a,payload:{...r,containerName:n.containerName||this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl}}),s}showInsight(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_INSIGHTID_REQUIRED));const n=Mi.buildActionObject({},this.c11nEnv),r=qt,{promise:a}=this.actionsApiPromise(r,n);return jc({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,insightID:e}}),a}showDashboard(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));const n=Mi.buildActionObject({},this.c11nEnv),r=zt,{promise:a}=this.actionsApiPromise(r,n);return jc({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,dashboardID:e}}),a}showData(e,t,n,r={}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error("dataContext is required parameter"));if("string"!=typeof t)return Promise.reject(new TypeError("dataContext must be string"));const a=Mi.buildActionObject({pageName:e,dataContext:t,dataContextParameters:n},this.c11nEnv),s=Wt,{promise:o}=this.actionsApiPromise(s,a);return jc({type:s,payload:{...a,...r,skipSemanticUrl:Boolean(r.skipSemanticUrl)}}),o}changeHandler(e,t){Mi.changeHandler(e,t)}eventHandler(e,t){Mi.eventHandler(e,t)}triggerFieldChange(e,t,n=!1){const r=this.c11nEnv.getContextName(),a=this.c11nEnv.getPageReference(),s=Ec.getContextPath(a,e);n||this.c11nEnv.getValidationApi().validate(t),this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(e,t);let o=this.c11nEnv.getValue(ot.CLASS_ID);const i=e?e.split(".").filter((e=>!!e)):[];i.length>1&&(i.pop(),o=Vc(`.${i.join(".")}.classID`,a,r)),jc({type:Gt,payload:{reference:s,value:t,context:r,pageReference:this.c11nEnv.getPageReference(),propertyName:this.c11nEnv.getComponentConfig().value,classID:o}})}updateFieldValue(e,t,n={}){const{removePropertyFromChangedList:r=!1,isArrayDeepMerge:a=!0,contextPageReference:s=null,isListEntry:o=!1,skipDirtyValidation:i=!1}=n,c=this.c11nEnv.getContextName(),d=null===s?this.c11nEnv.getPageReference():s,l=Ec.getContextPath(d,e);let u=!1;this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(e,t,{isArrayDeepMerge:a}),this.c11nEnv.isBulkAction()&&(u=!0),e||(e=this.c11nEnv.getStateProps().value),vi({type:st.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:d,context:c,isListEntry:o}),jc({type:Ft,payload:{reference:l,value:t,context:c,isArrayDeepMerge:a,skipDirtyValidation:i,...u&&{isStrictTracking:u},...r&&{removePropertyFromChangedList:r}}})}activateModalContainerItem(e){const t=Sn,{context:n}=e,r=n&&-1!==n.indexOf(ot.MODAL),a=Mi.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);r&&(a.containerName=ot.MODAL,a.isModalAction=r),jc({type:t,payload:a});const{promise:s}=this.actionsApiPromise(t,a);return s}refreshCaseView(e,t,n,r={}){const{promise:a,actionMgrID:s}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:o,propertyName:i,preserveClientChanges:c,classID:d}=r,l={actionMgrID:s,caseViewAction:!0,preserveClientChanges:c,propertyName:i,classID:d};r.refreshFor&&(l.refreshFor=r?.refreshFor);const u=this.c11nEnv.getContextName(),p=this.c11nEnv.getPageReference();return!this.c11nEnv.getValue(ot.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)&&o&&(((e,t)=>xs(e)&&!Ds(e,t))(u,p)||Ds(u,p))?vc(u,n,l):Cc(e,t,u,n,l),a}openEmbeddedDataModal(e,t,n,r,a){const s=qn,o=t.getCaseInfo().getKey(),i=`${t.getPageReference().replace(st.CASE_INFO.CASE_INFO_CONTENT,"")}${n}[${r}]`,c={targetProperty:n,index:r,viewID:e,ID:o,actionType:a,interestPage:dt.convertPageRefToClipboardPageNotation(i)},d=Mi.buildActionObject(c,this.c11nEnv),{promise:l}=this.actionsApiPromise(s,d);return jc({type:s,payload:{...d,containerName:st.MODAL,skipSemanticUrl:!0}}),l}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=zn,n=this.c11nEnv.getPageReference().replace(st.CASE_INFO.CASE_INFO_CONTENT,""),r=Wo(e),a={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:this.c11nEnv.getValue(st.CASE_INFO.CASE_INFO_ID),viewID:this.c11nEnv.getValue(ot.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME),isFormValid:ss(r),interestPage:dt.convertPageRefToClipboardPageNotation(n),parentContext:this.c11nEnv.getValue(ot.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT)};e&&-1!==e.indexOf(ot.MODAL)&&(a.containerName=ot.MODAL,a.isModalAction=!0);const s=Mi.buildActionObject(a,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,s);return jc({type:t,payload:{...s,context:r}}),o}fillFormWithAI(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=Wo(e),n=this.c11nEnv.getPageReference(),{promise:r,actionMgrID:a}=this.actionsApiPromise(Yn);return vc(t,n,{actionMgrID:a,isFillFormWithAI:!0,preserveClientChanges:!1}),r}}(this)),this._actionsApi}getActionManager(){return Ps}getGoogleMapsAPIKey(){return Jn}getServerURL(){return er()}getLoadingStatus(e){let t=null;return e?(t=Uc(e),t=t?t.context_data:null):t=this.getDataObject().context_data,!!t&&!!t.isLoading&&t.isLoading}clearErrorMessages(e){e?.property?vi({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName()}):e?.context?vi({type:"error",...e}):(vi({type:"error",...e,context:ot.APP.APP}),vi({type:"error",...e,context:Go(`${ot.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return Bc(`${this.getPageReference()}.${ot.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){this._rawConfig&&this.options.hasForm&&this._rawConfig.config&&(Object.prototype.hasOwnProperty.call(this._rawConfig.config,"value")||Object.prototype.hasOwnProperty.call(this._rawConfig.config,"readonlyContextList"))&&((e,t,n)=>{if(za[e]){const r=Xa(t,n);za[e].fieldOrder[r]&&(za[e].fieldOrder[r].isMounted=!1)}})(this.getContextName(),kt.trimAnnotation(this.getRawConfigProps()?.value)||kt.trimAnnotation(this.getRawConfigProps()?.readonlyContextList),this.getPageReference())}addFormField(){this._rawConfig&&this.options.hasForm&&this._rawConfig.config&&Object.prototype.hasOwnProperty.call(this._rawConfig.config,"value")&&this._type!==ot.SCALARLIST&&((e,t,n)=>{if(za[e]){const r=Xa(t,n);za[e].fieldOrder[r]&&(za[e].fieldOrder[r].isMounted=!0)}})(this.getContextName(),kt.trimAnnotation(this.getRawConfigProps()?.value),this.getPageReference())}setPageValue(e,t){delete e?.classID,this.setValue(t,e),((e,t,n)=>{const r=Ja(t);Ya[e]?Ya[e].fieldOrder[r]=n:Ya[e]={fieldOrder:{[r]:n}}})(this.getContextName(),`${this.getPageReference()}${t}`,this)}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=dh.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,r=Ec.getContextPath(this.getPageReference(),n),a=t.getField(r);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,a),this.getActionsApi().triggerFieldChange(n,a),t.removeField(r)}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=this.getStateProps()?.value||e,n=Ec.getContextPath(this.getPageReference(),t);this._hasSuggestions=!1,dh.getSuggestionsContext(this.getContextName()).removeField(n)}}}function Ih(e){const t=new mh(e);return{getPConnect:()=>t}}const Eh=new class{constructor(){this.bchannel=null,this.callback=null,this.isReverseCoexistenceCase=!1,this.broadcastEventToIframe=!1,this.isDirtyDialogActive=!1}#c=()=>{window.uniqueId=(new Date).getTime(),this.bchannel=new BroadcastChannel("coexistence"),this.bchannel.onmessage=e=>{switch(e.data.action){case"displayDirtyPopup":this.broadcastEventToIframe=e.data.fromInfinity,this.isDirtyDialogActive||(e.data.isFormDirty?(js.publish(ot.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0):this.callback.call());break;case"loadPreview":{const{pyID:t,caseClassName:n,uniqueId:r}=e.data;r===window.uniqueId&&Ih({}).getPConnect().getActionsApi().showCasePreview(t,{caseClassName:n});break}}}};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),js.subscribe(st.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),js.subscribe(st.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{js.unsubscribeAllWithEventType(st.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),js.unsubscribeAllWithEventType(st.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD),this.setReverseCoexistenceCaseLoaded(!1),this.isDirtyDialogActive=!1};#d=()=>{this.bchannel.close(),this.bchannel=null};init=()=>{null===this.bchannel&&this.#c(),this.subscribeEvents()};destroy=()=>{this.#d(),this.unsubscribeEvents()};setCallBackFunction=e=>{this.callback=e};setReverseCoexistenceCaseLoaded=e=>{this.isReverseCoexistenceCase=e};setIsDirtyDialogActive=e=>{this.isDirtyDialogActive=e};getBroadCastChannel=()=>this.bchannel;getCallBackFunction=()=>this.callback;isReverseCoexistenceCaseLoaded=()=>this.isReverseCoexistenceCase;postDirtyPopupMessage=({callBackFunction:e})=>{this.bchannel.postMessage({action:"displayDirtyPopupFromConstellation",uniqueId:window.uniqueId}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.bchannel.postMessage({action:"handleDiscardInInfinity",uniqueId:window.uniqueId}),this.broadcastEventToIframe=!1):(this.callback.call(),this.callback=null),this.isDirtyDialogActive=!1}},Ah={publishConstellationLoadedEvent:()=>{js.publish(ot.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})}},_h=new class{activateContainerItemOnSwitch(e){const t=`${ot.APP.APP}/${ot.PRIMARY}`,n={target:t,containerItemID:ko(t,e)};Ih({}).getPConnect().getContainerManager().activateContainerItem(n)}removeContainerItemOnClose(e){const t=`${ot.APP.APP}/${ot.PRIMARY}`,n={target:t,containerItemID:ko(t,e)};Ih({}).getPConnect().getContainerManager().removeContainerItem(n)}showCasePreview(e,t){Ih({}).getPConnect().getActionsApi().showCasePreview(e,{caseClassName:t})}closeCasePreview(){Ih({}).getPConnect().getContainerManager().resetContainers({name:ot.PREVIEW,context:ot.APP.APP})}isFormDirty(e){const t=`${ot.APP.APP}/${ot.PRIMARY}`,n=Si(t,e);return Wa.isStateModified(n)}getEventUtils(){return Ah}getBroadcastUtils(){return Eh}isTraditionalUICase(e){return ro(e)}},Sh=class{static openCase(e,t=st.APP.APP,n={}){return n.renderInline=!0,n.pageName?Mh.getEnvironmentInfo().setDefaultCasePage(n.pageName):(Mh.getEnvironmentInfo().setDefaultCasePage(ot.PY_DETAILS),n.pageName=ot.PY_DETAILS),n?.disableAssignmentHeader?Mh.getEnvironmentInfo().disableAssignmentHeader(n.disableAssignmentHeader):Mh.getEnvironmentInfo().disableAssignmentHeader(!1),oh.openCase(e,t,ot.PRIMARY,n)}static createCase(e,t=st.APP.APP,n={}){return n.renderInline=!0,n.pageName?Mh.getEnvironmentInfo().setDefaultCasePage(n.pageName):(Mh.getEnvironmentInfo().setDefaultCasePage(ot.PY_DETAILS),n.pageName=ot.PY_DETAILS),n?.disableAssignmentHeader?Mh.getEnvironmentInfo().disableAssignmentHeader(n.disableAssignmentHeader):Mh.getEnvironmentInfo().disableAssignmentHeader(!1),oh.createCase(e,t,ot.PRIMARY,n)}static getNextWork(e=st.APP.APP,t={}){return t.renderInline=!0,t.pageName?Mh.getEnvironmentInfo().setDefaultCasePage(t.pageName):(Mh.getEnvironmentInfo().setDefaultCasePage(ot.PY_DETAILS),t.pageName=ot.PY_DETAILS),t?.disableAssignmentHeader?Mh.getEnvironmentInfo().disableAssignmentHeader(t.disableAssignmentHeader):Mh.getEnvironmentInfo().disableAssignmentHeader(!1),oh.getNextWork(e,ot.PRIMARY,t)}static openAssignment(e,t=st.APP.APP,n={}){return n.renderInline=!0,n.pageName?Mh.getEnvironmentInfo().setDefaultCasePage(n.pageName):(Mh.getEnvironmentInfo().setDefaultCasePage(ot.PY_DETAILS),n.pageName=ot.PY_DETAILS),n?.disableAssignmentHeader?Mh.getEnvironmentInfo().disableAssignmentHeader(n.disableAssignmentHeader):Mh.getEnvironmentInfo().disableAssignmentHeader(!1),oh.openAssignment(e,t,ot.PRIMARY,n)}static openPage(e,t,n=st.APP.APP,r={}){const a=Ht;r?.defaultCasePage?Mh.getEnvironmentInfo().setDefaultCasePage(r.defaultCasePage):Mh.getEnvironmentInfo().setDefaultCasePage(ot.PY_DETAILS),r?.disableAssignmentHeader?Mh.getEnvironmentInfo().disableAssignmentHeader(r.disableAssignmentHeader):Mh.getEnvironmentInfo().disableAssignmentHeader(!1);const s={viewName:e,className:t,acTargetName:ot.PRIMARY,actionMgrID:Ps.getNextActionMgrId(),context:n},{promise:o}=Ps.actionManagerPromise(a,s.actionMgrID);return jc({type:a,payload:{...s}}),o}static getCurrentContextAPI(e,t=st.APP.APP){const n={meta:{config:{}},options:{context:t,pageReference:e,containerName:ot.PRIMARY}};return Mh.createPConnect(n).getPConnect()}},$h={getResolvedSemanticURL:(e,t,n)=>_r.getResolvedSemanticURL(e,t,n),getActions:()=>({ACTION_OPENWORKBYHANDLE:Tn,ACTION_SHOWDATA:Pn,ACTION_SHOWVIEW:bn})},Ch=new class{constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}};class bh{constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,t,n,r,a){void 0===e[t]&&(e[t]={}),e[t][n]=[{uniqueHash:r,callback:a}]}registerForRefresh(e,t,n,r,a){const s=r.split("/").join(ot.HASH_DELIMITER),o=dt.getHashedString(s);"PROP_CHANGE"===e?this.propChangeRefreshMap?.[a]?.[n]?!this.propChangeRefreshMap[a][n].some((e=>e.uniqueHash===o))&&this.propChangeRefreshMap[a][n].push({uniqueHash:o,callback:t}):bh.initializeRefreshCache(this.propChangeRefreshMap,a,n,o,t):this.refreshMap?.[a]?.[`${e}-${n}`]?!this.refreshMap[a][`${e}-${n}`].some((e=>e.uniqueHash===o))&&this.refreshMap[a][`${e}-${n}`].push({uniqueHash:o,callback:t}):bh.initializeRefreshCache(this.refreshMap,a,`${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 Ph=new bh,vh={setTokens:e=>{wu({tokenInfo:e}),xu(e?.csrf&&!e?.access_token?{pzCTkn:e?.csrf}:{Authorization:`${e?.token_type} ${e?.access_token}`}),setTimeout((()=>js.publish("updateSession",{updateStatus:"success"})),0)},revokeTokens:async()=>(async()=>new Promise((async(e,t)=>{const n={...bu};if(!n?.tokenInfo)return void t(new Error("Missing token information."));const{access_token:r,refresh_token:a=null}=n.tokenInfo,{revoke:s}=n.endPoints,{client_id:o,client_secret:i,secureCookie:c}=n,d={"content-type":"application/x-www-form-urlencoded"};i&&(d.authorization=`Basic ${window.btoa(`${o}:${i}`)}`);const l=new URLSearchParams;i||l.append("client_id",o),c&&l.append("send_token_as_cookie","true");const u=a?"refresh_token":"access_token",p="access_token"===u?r:a;!c&&p&&l.append("token",p),l.append("token_type_hint",u),await Ou(s,{method:"POST",headers:new Headers(d),credentials:c?"include":"omit",body:l.toString(),withoutDefaultHeaders:!0}),xu({Authorization:null}),wu({tokenInfo:null}),e()})))(),getAuthInstance:e=>gu.init(e),setAuthorizationHeader:e=>{xu({Authorization:e}),setTimeout((()=>js.publish("updateSession",{updateStatus:"success"})),0)}},Oh=new class{constructor(){this.userSettings={}}#l(e){return e?.toString().replace(/\s/g,"-").toLowerCase()}setComponentState=(e,t)=>{sessionStorage?sessionStorage.setItem(this.#l(e),JSON.stringify(t)):console.error("Session Storage not found")};getComponentState=e=>{const t=sessionStorage.getItem(this.#l(e));return dt.isValidJson(t)||t};removeComponentState=e=>{sessionStorage.removeItem(this.#l(e))};#u=async()=>{const{restApi:e,reqType:t}=Mr("getUserSettings")||{};Ou(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=()=>{zr.getUserSettings()?this.userSettings=zr.getUserSettings():this.#u()};getUserSettings=e=>{if(!e)throw new Error("path is required parameter");if("string"!=typeof e)throw new TypeError("path must be string");return dt.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"));const{restApi:n,reqType:r}=Mr("updateUserSettings");return Ou(n,{method:r,body:dt.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)}))}};var Th=new q(G),Rh=Th;function Nh(e,t){return void 0===t&&(t=Th),Pe((function(n,r){var a=null,s=null,o=null,i=function(){if(a){a.unsubscribe(),a=null;var e=s;s=null,r.next(e)}};function c(){var n=o+e,s=t.now();if(s<n)return a=this.schedule(void 0,n-s),void r.add(a);i()}n.subscribe(ve(r,(function(n){s=n,o=t.now(),a||(a=t.schedule(c,e),r.add(a))}),(function(){i(),r.complete()}),void 0,(function(){s=a=null})))}))}const Dh=new class{getDebouncedSubject(e){return(new pe).pipe(Nh(e))}},xh=new class{#p(e,t,n){Hr(e),Os.buildActionTargetMap(t),Qn(n)}init(e){const t=new 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 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}}(e.serviceConfig),this.behaviorOverrides=e.behaviorOverrides,this.initBroadcast=!!e.initBroadcast,this.cookieComplianceMethod=e.cookieComplianceMethod??"none"}}(e),n={...t.environmentInfo,renderingMode:t.renderingMode};Nr(t.enableRouting),Xg({}),zr.setTheme(t.theme),Va.updateFieldDefaults(t.fieldDefaults),Au.setDefaultHeaders(t.additionalHeaders),this.#p(t.routingInfo,t.actionModel,{server:t.restServerConfig,reAuthUrl:t.serviceConfig.reAuthUrl}),Kr.setAppAlias(t.serviceConfig.appAliasWithoutServlet||t.serviceConfig.appAlias),tr(t.serviceConfig.googleMapKey),Kr.initServer(t.serviceConfig.staticContentServer,t.serviceConfig.appStaticContentServer,t.tokens.C11NB2S),Xr.setTimezone(t.timezone),zr.setEnvironmentInfo(n),zr.setLocale(t.locale),Er.setRemoteCaseMapping(t.remoteCaseMapping),Pp.setConnectionConfig({messagingService:t.serviceConfig.messagingService}),Oh.init(),t.initBroadcast&&_h.getBroadcastUtils().init()}getBootstrapConfig=async(e,t)=>{const n=`${t.token_type} ${t.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then((e=>e.json()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=Ih({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}}}};class wh{constructor(){wh.behaviorOverrides={}}static behaviorOverrides={};getPCoreVersion=()=>"23.1.3";onPCoreReady=e=>iI(e);getComponentsRegistry=()=>Fm();checkIfSemanticURL=()=>oI();isValidSemanticURL=()=>(()=>{if(Br()){const e=_r.processUrl(mr(),!0);return!!_r._getMatchedRouteInRoutingTable(e)}return!1})();getRoutingUtils=()=>Lp;getViewResources=()=>p;configureForBrowserBookmark=e=>sI(e);getStore=()=>Lc();resetStore=()=>{const e=kn,{promise:t,actionMgrID:n}=Ps.actionManagerPromise(e);return jc({type:e,payload:{actionMgrID:n}}),t};getMessageManager=()=>xi;getCoexistenceManager=()=>_h;getStoreValue=(e,t,n)=>Vc(e,t,n);getContainerUtils=()=>i;getAnnotationUtils=()=>is;getFieldUtils=()=>it;getFieldDefaultUtils=()=>Va;getAssetLoader=()=>Kr;getAttachmentUtils=()=>ku;getViewRuleApi=()=>Fu;getFeedUtils=()=>ap;getTagUtils=()=>sp;getStakeholderUtils=()=>ip;getUserApi=()=>Zu;getCaseFollowerApi=()=>Ju;getCaseUtils=()=>Ap;getStateUtils=()=>dh;getRelatedCasesApi=()=>Xu;getPersonalizationUtils=Ep;getDataApi=()=>Rp;getDataApiUtils=()=>_p;getAnalyticsUtils=()=>Mp;getLocaleUtils=()=>Xr;registerLocaleManager=e=>{const t=this.getLocaleUtils();Object.keys(e).forEach((n=>{t[n]=e[n]}))};setBehaviorOverrides=e=>{wh.behaviorOverrides=e};setBehaviorOverride=(e,t)=>{wh.behaviorOverrides[e]=t};getBehaviorOverrides=()=>wh.behaviorOverrides;getBehaviorOverride=e=>wh.behaviorOverrides[e];getAsynchronousUtils=()=>Dh;createPConnect=e=>Ih(e);getPubSubUtils=()=>js;registerComponentCreator=e=>{!function(e){fh=e}(e)};getConstants=()=>Object.freeze(st);getEvents=()=>class{static getCaseEvent=()=>Object.freeze(st.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(st.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(st.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(st.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS)};getRestClient=()=>u;getMashupApi=()=>Sh;getEnvironmentInfo=()=>zr;getRuntimeParamsAPI=()=>cp;getSemanticUrlUtils=()=>$h;getRemoteCaseUtils=()=>Er;getNavigationUtils=()=>Oh;registerModule=(e,t)=>class{static registerModule(e,t,n){n[e]=()=>t}}.registerModule(e,t,this);getErrorHandler=()=>Ch;getFormUtils=()=>Wa;getMessagingServiceManager=()=>Pp;getMetadataUtils=()=>e;getDataPageUtils=()=>Op;getDataTypeUtils=()=>Gp;getCascadeManager=()=>Dc;isDeepEqual=(e,t)=>ke()(e,t);getAuthUtils=()=>vh;getDebugger=()=>qr;getDeferLoadManager=()=>Rc;getExpressionEngine=()=>s;getActionsSequencer=()=>ah;getRefreshManager=()=>Ph;getInitialiser=()=>xh}const Mh=new wh;n.g.PCore=Mh;var Lh=Symbol.for("immer-nothing"),jh=Symbol.for("immer-draftable"),Uh=Symbol.for("immer-state");function kh(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Fh=Object.getPrototypeOf;function Vh(e){return!!e&&!!e[Uh]}function Gh(e){return!!e&&(Hh(e)||Array.isArray(e)||!!e[jh]||!!e.constructor?.[jh]||Kh(e)||Jh(e))}var Bh=Object.prototype.constructor.toString();function Hh(e){if(!e||"object"!=typeof e)return!1;const t=Fh(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Bh}function Wh(e,t){0===qh(e)?Object.entries(e).forEach((([n,r])=>{t(n,r,e)})):e.forEach(((n,r)=>t(r,n,e)))}function qh(e){const t=e[Uh];return t?t.type_:Array.isArray(e)?1:Kh(e)?2:Jh(e)?3:0}function zh(e,t){return 2===qh(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Yh(e,t,n){const r=qh(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function Kh(e){return e instanceof Map}function Jh(e){return e instanceof Set}function Xh(e){return e.copy_||e.base_}function Qh(e,t){if(Kh(e))return new Map(e);if(Jh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Hh(e)){if(!Fh(e)){const t=Object.create(null);return Object.assign(t,e)}return{...e}}const n=Object.getOwnPropertyDescriptors(e);delete n[Uh];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const a=r[t],s=n[a];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[a]})}return Object.create(Fh(e),n)}function Zh(e,t=!1){return tf(e)||Vh(e)||!Gh(e)||(qh(e)>1&&(e.set=e.add=e.clear=e.delete=ef),Object.freeze(e),t&&Wh(e,((e,t)=>Zh(t,!0)))),e}function ef(){kh(2)}function tf(e){return Object.isFrozen(e)}var nf,rf={};function af(e){const t=rf[e];return t||kh(0),t}function sf(){return nf}function of(e,t){t&&(af("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function cf(e){df(e),e.drafts_.forEach(uf),e.drafts_=null}function df(e){e===nf&&(nf=e.parent_)}function lf(e){return nf={drafts_:[],parent_:nf,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function uf(e){const t=e[Uh];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function pf(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Uh].modified_&&(cf(t),kh(4)),Gh(e)&&(e=hf(t,e),t.parent_||gf(t,e)),t.patches_&&af("Patches").generateReplacementPatches_(n[Uh].base_,e,t.patches_,t.inversePatches_)):e=hf(t,n,[]),cf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Lh?e:void 0}function hf(e,t,n){if(tf(t))return t;const r=t[Uh];if(!r)return Wh(t,((a,s)=>ff(e,r,t,a,s,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return gf(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let a=t,s=!1;3===r.type_&&(a=new Set(t),t.clear(),s=!0),Wh(a,((a,o)=>ff(e,r,t,a,o,n,s))),gf(e,t,!1),n&&e.patches_&&af("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function ff(e,t,n,r,a,s,o){if(Vh(a)){const o=hf(e,a,s&&t&&3!==t.type_&&!zh(t.assigned_,r)?s.concat(r):void 0);if(Yh(n,r,o),!Vh(o))return;e.canAutoFreeze_=!1}else o&&n.add(a);if(Gh(a)&&!tf(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;hf(e,a),t&&t.scope_.parent_||gf(e,a)}}function gf(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Zh(t,n)}var yf={get(e,t){if(t===Uh)return e;const n=Xh(e);if(!zh(n,t))return function(e,t,n){const r=Ef(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!Gh(r)?r:r===If(e.base_,t)?(_f(e),e.copy_[t]=Sf(r,e)):r},has:(e,t)=>t in Xh(e),ownKeys:e=>Reflect.ownKeys(Xh(e)),set(e,t,n){const r=Ef(Xh(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=If(Xh(e),t),o=r?.[Uh];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((a=n)===(s=r)?0!==a||1/a==1/s:a!=a&&s!=s)&&(void 0!==n||zh(e.base_,t)))return!0;_f(e),Af(e)}var a,s;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==If(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,_f(e),Af(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=Xh(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){kh(11)},getPrototypeOf:e=>Fh(e.base_),setPrototypeOf(){kh(12)}},mf={};function If(e,t){const n=e[Uh];return(n?Xh(n):e)[t]}function Ef(e,t){if(!(t in e))return;let n=Fh(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Fh(n)}}function Af(e){e.modified_||(e.modified_=!0,e.parent_&&Af(e.parent_))}function _f(e){e.copy_||(e.copy_=Qh(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function Sf(e,t){const n=Kh(e)?af("MapSet").proxyMap_(e,t):Jh(e)?af("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:sf(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,s=yf;n&&(a=[r],s=mf);const{revoke:o,proxy:i}=Proxy.revocable(a,s);return r.draft_=i,r.revoke_=o,i}(e,t);return(t?t.scope_:sf()).drafts_.push(n),n}function $f(e){if(!Gh(e)||tf(e))return e;const t=e[Uh];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Qh(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Qh(e,!0);return Wh(n,((e,t)=>{Yh(n,e,$f(t))})),t&&(t.finalized_=!1),n}Wh(yf,((e,t)=>{mf[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),mf.deleteProperty=function(e,t){return mf.set.call(this,e,t,void 0)},mf.set=function(e,t,n){return yf.set.call(this,e[0],t,n,e[0])};var Cf=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...a){return r.produce(e,(e=>t.call(this,e,...a)))}}let r;if("function"!=typeof t&&kh(6),void 0!==n&&"function"!=typeof n&&kh(7),Gh(e)){const a=lf(this),s=Sf(e,void 0);let o=!0;try{r=t(s),o=!1}finally{o?cf(a):df(a)}return of(a,n),pf(r,a)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===Lh&&(r=void 0),this.autoFreeze_&&Zh(r,!0),n){const t=[],a=[];af("Patches").generateReplacementPatches_(e,r,t,a),n(t,a)}return r}kh(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Gh(e)||kh(8),Vh(e)&&(e=function(e){return Vh(e)||kh(10),$f(e)}(e));const t=lf(this),n=Sf(e,void 0);return n[Uh].isManual_=!0,df(t),n}finishDraft(e,t){const n=e&&e[Uh];n&&n.isManual_||kh(9);const{scope_:r}=n;return of(r,t),pf(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=af("Patches").applyPatches_;return Vh(e)?r(e,t):this.produce(e,(e=>r(e,t)))}},bf=Cf.produce;Cf.produceWithPatches.bind(Cf),Cf.setAutoFreeze.bind(Cf),Cf.setUseStrictShallowCopy.bind(Cf),Cf.applyPatches.bind(Cf),Cf.createDraft.bind(Cf),Cf.finishDraft.bind(Cf);const Pf=(e,t)=>{const{data:{shared:n={}}={},context:r}=t;((e,t)=>{Op.updateDataPageStore(t),Object.keys(t).forEach((n=>{dt.getIn(e,[ot.SHARED,n])?Object.keys(t[n]).forEach((r=>{dt.setIn(e,[ot.SHARED,n,r],t[n][r])})):dt.setIn(e,[ot.SHARED,n],t[n])}))})(e,n),r&&dt.deleteIn(e,[r,"shared"])},vf=(e,t,n=!1)=>{const{context:r,caseViewMode:a=(n?void 0:ot.PERFORM_MODE),containerName:s}=t;s!==No.WORKAREA&&a&&dt.setIn(e,[r,"context_data","caseViewMode"],a)},Of=(e,t=[])=>{t.forEach((t=>dt.deleteIn(e,t)))},Tf=(e,t=[])=>{t.forEach((t=>dt.deleteIn(e,t)))},Rf=(e,t=[])=>{t.forEach((t=>{dt.deleteIn(e,t)}))},Nf=(e,t,n={})=>{const{deleteAssignmentSpecificResources:r=!0,doDeleteConfirmationDetails:a=!0}=n;dt.deleteIn(e,[t,"nextAssignmentInfo"]),dt.deleteIn(e,[t,"caseInfo","availableActions"]),dt.deleteIn(e,[t,"caseInfo","availableProcesses"]),dt.deleteIn(e,[t,"caseInfo","activeActionID"]),dt.deleteIn(e,[t,"caseInfo","assignments"]),dt.deleteIn(e,[t,"caseInfo","childCases"]),a&&(dt.deleteIn(e,[t,"caseInfo","confirmationLinks"]),dt.deleteIn(e,[t,"caseMessages"])),r&&(dt.deleteIn(e,[t,"caseInfo","actionButtons"]),dt.deleteIn(e,[t,"caseInfo","navigation"]))};const Df=[(e,t)=>bf(e,(e=>{switch(t.type){case rn:return e[t.payload.context]=zc(e[t.payload.context],t.payload.data,{isArrayDeepMerge:t.payload.isArrayDeepMerge}),vf(e,t.payload,!0),Pf(e,t.payload),e;case Ft:{const{context:n,reference:r,value:a,isArrayDeepMerge:s}=t.payload;return Yc(e[n],r,a,{isArrayDeepMerge:s}),e}case Vt:{const{context:n,reference:r,value:a}=t.payload;return Kc(e[n],r,a),e}case an:return Wc(e[t.payload.context],t.payload.reference),e;case Yt:return dt.setIn(e[t.payload.context],"context_data.isLoading",!0),e;case Kt:return dt.setIn(e[t.payload.context],"context_data.isLoading",!1),e;case Vn:{const{data:n}=t.payload;return Pf(e,{data:{shared:n}}),e}case Gn:{const{dataPagesToBeRemoved:n=[]}=t.payload;return n.forEach((t=>{const{dataPageName:n,dataPageNameWithHash:r}=t;dt.deleteIn(e.shared,[n,r]);const a=dt.getIn(e.shared,[n]);a&&0===Object.keys(a).length&&dt.deleteIn(e.shared,[n])})),e}case Wn:{const n=dt.getIn(e[t.payload.context].context_data,"blocking_action_counter",0);return t.payload.isInitiateBlockingAction?dt.setIn(e[t.payload.context].context_data,"blocking_action_counter",n+1):dt.setIn(e[t.payload.context].context_data,"blocking_action_counter",n-1),e}default:return e}})),(e={},t)=>bf(e,(e=>{switch(t.type){case ln:{if(!t.payload.data||e[t.payload.context])return e;t.payload.doDeleteCaseSummary&&Nf(e,t.payload.context);const{target:n}=t.payload;return!n||-1===n.indexOf(ot.WORKAREA)&&-1===n.indexOf(ot.MODAL)?e[t.payload.containerItemID]=t.payload.data:e[t.payload.context]=t.payload.data,vf(e,t.payload),((e,t)=>{const{context:n}=t;dt.setIn(e,[n,"context_data","actionType"],t.actionType),dt.setIn(e,[n,"context_data","assignmentID"],t.assignmentID)})(e,t.payload),Pf(e,t.payload),e}case En:{t.payload.doDeleteCaseSummary&&Nf(e,t.payload.context,{deleteAssignmentSpecificResources:t.payload.deleteAssignmentSpecificResources});const{target:n}=t.payload;return!n||-1===n.indexOf(ot.WORKAREA)&&-1===n.indexOf(ot.MODAL)?e[t.payload.containerItemID]=zc(e[t.payload.containerItemID],t.payload.data):e[t.payload.context]=zc(e[t.payload.context],t.payload.data),vf(e,t.payload),Pf(e,t.payload),Tf(e,t.payload.suggestionContexts),e}case un:{const{childContainersContexts:n=[]}=t.payload;return((e,t)=>{const{containerItemID:n,context:r,deleteContext:a}=t;a&&dt.deleteIn(e,[r]),dt.deleteIn(e,[n])})(e,t.payload),Rf(e,n),Of(e,t.payload.transientItems),Tf(e,t.payload.suggestionContexts),e}case dn:{const{containerItems:n}=t.payload;return Array.isArray(n)?n.forEach((t=>{dt.deleteIn(e,[t])})):dt.deleteIn(e,[n]),e}case An:{const{context:n,contextToBeRemoved:r,data:a,childContainersContextsToBeRemoved:s}=t.payload;return Nf(e,t.payload.context),vf(e,t.payload),e[n]=zc(e[n],e[r]),e[n]=zc(e[n],a),dt.deleteIn(e,[r]),Rf(e,s),Pf(e,t.payload),e}case _n:{const{payload:{context:n,pulseReplace:r=!0,childContainersContexts:a=[]}}=t;let{payload:{data:s}}=t;const o=dt.getIn(e[n],"pulse");let i=dt.getIn(e[n],"OperatorID"),c=dt.getIn(e[n],"pxRequestor");return c&&s.pxRequestor&&(c=dt.mergeDeep(c,s.pxRequestor)),i&&s.OperatorID&&(i=dt.mergeDeep(i,s.OperatorID)),!r&&o&&(s=Yc(s,"pulse",o),s=Yc(s,"OperatorID",i),s=Yc(s,"pxRequestor",c)),dt.setIn(e,n,s),vf(e,t.payload),Pf(e,t.payload),Rf(e,a),Of(e,t.payload.transientItems),Tf(e,t.payload.suggestionContexts),e}case Hn:{const{context:n,doDeleteConfirmationDetails:r=!0}=t.payload;return Nf(e,n,{doDeleteConfirmationDetails:r}),e}case pn:{const{transientItemID:n,data:r}=t.payload;return dt.setIn(e,n,r)}case fn:case gn:{const{transientItems:n}=t.payload;return n.forEach((t=>dt.deleteIn(e,t))),e}case hn:case yn:{const{transientItemID:n,data:r}=t.payload;return zc(dt.getIn(e,n),r),e}case mn:{const{transientItemID:n,data:r}=t.payload;for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&dt.deleteIn(e,[n,t]);return e}case Jt:{const{key:n,value:r}=t.payload;return dt.setIn(e,`${ot.SHARED}.${n}`,r),e}case Cn:{const{context:n,data:r}=t.payload;return dt.setIn(e,n,r)}default:return e}})),(e=Uf().data,t)=>bf(e,(e=>{switch(t.type){case on:return t.payload.err.errorDetails&&"Validation fail"===t.payload.err.errorClassification?function(e,t){const{err:n,formFields:r}=t.payload;let{context:a}=t.payload;const{fieldErrors:s,pageErrors:o}=((e,t)=>{const n=[],r=[];return e.forEach((e=>{((e,t,n,r)=>{switch(!0){case Boolean(e[ot.ERROR_IN_PAGE_IDENTIFIER]&&e[ot.ERROR_FIELD_IN_PAGE]):{const a=`${e[ot.ERROR_FIELD_IN_PAGE]}`.replace(/(\(\d\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`)),s=`${a}${e[ot.ERROR_IN_PAGE_IDENTIFIER]}`,o=dt.deepClone(e);o[ot.ERROR_FIELD_IN_PAGE]=a,t.includes(s.slice(1))?r.push(o):n.push(e);break}case Boolean(e[ot.ERROR_IN_PAGE_IDENTIFIER]&&!e[ot.ERROR_FIELD_IN_PAGE]):{const a=e[ot.ERROR_IN_PAGE_IDENTIFIER].slice(1);t.includes(a)?r.push(e):n.push(e);break}default:n.push(e)}})(e,t,n,r)})),{fieldErrors:r,pageErrors:n}})(n.errorDetails,r);if(dt.setIn(e,[a,...Ci.FIELD_MESSAGES_PATH],{}),dt.setIn(e,[a,...Ci.PAGE_MESSAGES_PATH],[]),s.forEach((t=>{if(t[ot.ERROR_FIELD_IN_PAGE]){const n=t[ot.ERROR_FIELD_IN_PAGE].slice(1);if(n){const t=function(e){let t=null;const n=e.lastIndexOf(".");return n<0?null:(t=e.substring(0,n),t?`caseInfo.content.${t}`.replace(/\(/g,"[").replace(/\)/g,"]"):t)}(n);if(!t)return!1;const r=n.substring(n.lastIndexOf(".")+1),s=bi(r,t,ot.PROPERTY);dt.setIn(e,[a,...s],[])}}})),s.length>0&&((e,t,n)=>{n.forEach((n=>{((e,t,n)=>{const r=n[ot.ERROR_FIELD_IN_PAGE].slice(1),a=n[ot.ERROR_IN_PAGE_IDENTIFIER].slice(1);if(a){let s=r?`caseInfo.content.${r}`:"caseInfo.content";s=s.replace(/\(/g,"[").replace(/\)/g,"]");const o=bi(a,s,ot.PROPERTY),i={type:st.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue},c=dt.getIn(e[t],o,[]);dt.setIn(e[t],o,[...c,i])}})(e,t,n)}))})(e,a,s),o.length>0){const t=(e=>{const t=[];return e.map((e=>{t.push({type:st.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue})})),t})(o);e[a]||(a=ot.APP.APP),dt.setIn(e,[a,...Ci.PAGE_MESSAGES_PATH],t)}else a.includes&&a.includes(No.WORKAREA)&&(a=ar(a)),dt.deleteIn(e,[a,...Ci.PAGE_MESSAGES_PATH]);return e}(e,t):e;case En:{const{context:n}=t.payload,r=[n,...Ci.FIELD_MESSAGES_PATH],a=[n,...Ci.PAGE_MESSAGES_PATH];if(dt.setIn(e,r,{}),dt.setIn(e,a,[]),n&&n.includes(No.WORKAREA)){const t=[lr(n),...Ci.PAGE_MESSAGES_PATH];dt.setIn(e,t,[])}return e}case Un:return((e,t)=>{const{property:n,pageReference:r,category:a,type:s,isListEntry:o,stateObj:i}=t.payload;let{context:c}=t.payload;if(i)return((e,t,n,r=[ot.CONTEXT_DATA,ot.CASE_INFO.CASE_INFO,ot.CONTENT])=>{const a=dt.getIn(t,r);if(a){const t=Ti(a,[],[]);for(const a of t)dt.setIn(e[n],[...r,...a],{})}})(e,i,c),e;const d=bi(n,r,a,o);if(o)dt.setIn(e[c],d,{});else{a===ot.PAGE&&c.includes&&c.includes(No.WORKAREA)&&(c=ar(c));const t=dt.getIn(e[c],d);if(t&&a===ot.CASEMESSAGES)dt.setIn(e[c],bi(n,r,a),"");else if(t&&t.length>0&&Array.isArray(t)){const o=t.filter((e=>e.type!==s));d&&d.length>0&&dt.setIn(e[c],bi(n,r,a),o)}}return e})(e,t);case jn:{const{messages:n,property:r,pageReference:a,context:s,category:o}=t.payload,i=bi(r,a,o);return n&&n.length>0&&Array.isArray(n)&&i&&i.length>0&&dt.setIn(e[s],bi(r,a,o),n),e}default:return e}})),(e,t)=>bf(e,(e=>{if(t.type===Bn){const{instruction:n,actions:r,context:a,referenceList:s,listIndex:o,listMoveToIndex:i,content:c={}}=t.payload,d=wc(s);switch(n){case ot.LIST_ACTIONS.INSERT:((e,t,n,r,a)=>{dt.setIn(e[t],[...n,r],a)})(e,a,d,o,c);break;case ot.LIST_ACTIONS.UPDATE:((e,t,n,r,a)=>{const s=zc(dt.getIn(e[t],[...n,r],{}),a);dt.setIn(e[t],[...n,r],s)})(e,a,d,o,c);break;case ot.LIST_ACTIONS.DELETE:((e,t,n,r)=>{const a=dt.getIn(e[t],n,[]);a.splice(r,1),dt.setIn(e[t],n,a)})(e,a,d,o);break;case ot.LIST_ACTIONS.MOVE:((e,t,n,r,a)=>{const s=dt.getIn(e[t],[...n,r],{}),o=dt.getIn(e[t],n,[]);o.splice(r,1),o.splice(a,0,s),dt.setIn(e[t],n,o)})(e,a,d,o,i);break;case ot.LIST_ACTIONS_TYPE.SELECT_DESELECT:((e,t,n,r)=>{const a=dt.getIn(e[t],n)||[];r.forEach((e=>{const{instruction:r,content:s,listIndex:o}=e;r===ot.LIST_ACTIONS.SELECT?(a[o]=s,n.forEach((e=>{Da(t,e)}))):delete a[o]})),dt.setIn(e[t],n,a.filter(Boolean))})(e,a,d,r);break;case ot.LIST_ACTIONS_TYPE.DESELECT_ALL:((e,t,n)=>{dt.setIn(e[t],n,[])})(e,a,d)}}return e}))],xf=(e=Uf().data,t)=>t.type===kn?Uf().data:(Df.forEach((n=>{e=n(e,t)})),e),wf=(e,t=[])=>{t.forEach((t=>{dt.deleteIn(e,[t])}))},Mf=(e,t)=>{const{type:n,payload:r}=t,a=n===En,{target:s,context:o,semanticURL:i="",root:c,containerItemID:d,childContainers:l,flowName:u,resourceType:p="",key:h="",clearView:f=!1}=r;return c?dt.setIn(e,[s,"items",d,"view"],c):f&&dt.deleteIn(e,[s,"items",d,"view"]),o&&dt.setIn(e,[s,"items",d,"context"],o),u&&dt.setIn(e,[s,"items",d,"flowName"],u),(!a||a&&h)&&dt.setIn(e,[s,"items",d,"key"],h.trim()),(!a||a&&i)&&dt.setIn(e,[s,"items",d,"semanticURL"],i),(!a||a&&p)&&dt.setIn(e,[s,"items",d,"resourceType"],p),wf(e,l),e},Lf=(e=Uf().containers,t)=>t.type===kn?Uf().containers:bf(e,(e=>{switch(t.type){case cn:{const{context:n,name:r,type:a,actionMgrID:s}=t.payload,o=`${n}/${r}`;let i=null;return Ps.resolveActionByID(s,null,!1),e[o]||(i={type:a,accessedOrder:[],items:{}},dt.setIn(e,[o],i)),e}case $n:{const{containerName:n,childContainers:r=[]}=t.payload;return dt.deleteIn(e,[n]),r.forEach((t=>{dt.deleteIn(e,[t])})),e}case dn:{const{context:n,name:r,actionMgrID:a,childContainers:s}=t.payload,o=`${n}/${r}`;return Ps.resolveActionByID(a,null,!1),dt.setIn(e,[o,"accessedOrder"],[]),dt.setIn(e,[o,"items"],{}),Array.isArray(s)&&s.forEach((t=>{dt.deleteIn(e,[t])})),e}case ln:{const{target:n,context:r,isInCreateStage:a,isBulkAction:s,semanticURL:o,root:i,containerItemID:c,actionMgrID:d,key:l,flowName:u,resourceType:p,actionName:h,isMinimizable:f,showProgress:g,progressMessage:y,modalOptions:m,resourceStatus:I,isMultiRecordData:E,acTertiary:A,parentContext:_}=t.payload,S=e[n],$=S&&S.type,C=S&&S.accessedOrder||[],b=S&&S.items||{};let P=null;return e[n]&&"single"===$&&C.length>0?Mf(e,t):(P={accessedOrder:[...C,c],items:{...b,[c]:{view:i,semanticURL:o,key:l,flowName:u,context:r,isInCreateStage:a,resourceType:p,actionName:h,isMinimizable:f,...s&&{isBulkAction:s},showProgress:g,progressMessage:y,modalOptions:m,resourceStatus:I,...A&&{acTertiary:A},...E&&{isMultiRecordData:E},..._&&{parentContext:_}}}},Ps.resolveActionByID(d,null,!1),e[n]=Ve()(e[n],P),e)}case En:{const{actionMgrID:n,data:r}=t.payload;let a=e;try{a=Mf(e,t),Ps.resolveActionByID(n,r,!1)}catch{Ps.rejectActionByID(n,!1)}return a}case _n:return((e,t)=>{const{actionMgrID:n,data:r,target:a,containerItemID:s}=t.payload;let o=e;try{dt.setIn(e,[a,"items",s,"transientItems"],[]),o=Mf(e,t),Ps.resolveActionByID(n,r,!1)}catch{Ps.rejectActionByID(n,!1)}return o})(e,t);case In:{const{target:n,containerItemID:r,actionMgrID:a}=t.payload;try{const t=dt.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));t.push(r),dt.setIn(e,[n,"accessedOrder"],t),Ps.resolveActionByID(a,null,!1)}catch{Ps.rejectActionByID(a,!1)}return e}case An:case un:{const{target:n,containerItemID:r,actionMgrID:a,childContainers:s}=t.payload;try{const t=dt.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));dt.setIn(e,[n,"accessedOrder"],t),dt.deleteIn(e,[n,"items",r]),wf(e,s),Ps.resolveActionByID(a,null,!1)}catch{Ps.rejectActionByID(a,!1)}return e}case pn:{const{transientItemID:n,target:r,contextName:a}=t.payload,s=dt.getIn(e,[r,"items",a,"transientItems"])??[];return dt.setIn(e,[r,"items",a,"transientItems"],[...s,n])}case gn:{const{target:n,containerItemID:r}=t.payload;return dt.deleteIn(e,[n,"items",r,"transientItems"]),e}case fn:{const{target:n,transientItemID:r,containerItemID:a}=t.payload,s=(dt.getIn(e,[n,"items",a,"transientItems"])??[]).filter((e=>e!==r));return dt.setIn(e,[n,"items",a,"transientItems"],s)}default:return e}}));let jf={};const Uf=()=>jf;function kf(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Kp(e),r=function(e,t){return"number"==typeof Yp(e)?e.pop():1/0}(e),a=e;return a.length?1===a.length?$e(a[0]):function(e){return void 0===e&&(e=1/0),we(ie,e)}(r)(De(a,n)):Qp}const Ff={},Vf=[(e,t)=>e.pipe(Wp(Ac,Yn),xe((e=>e.payload)),we((e=>{const{context:n,caseWideAction:r,contextData:a,caseViewAction:s,interestPage:o,options:i}=e;let c={};const{propertyName:d="",classID:l="",retrieveLatestData:u}=i,p=((e,t)=>t?{}:co(e))(n,u),h=dt.getPropertyName(d),f=h?h.split("."):[],g=f.pop(),y=f.join("."),m=[];if(y){const e=At(y,l);if(e&&"copy"===e.dataRetrievalType){const e=dt.getIn(p,`content.content.${y}`)||{};Object.keys(e).length>0&&Object.keys(e).filter((e=>e!==g)).forEach((t=>{delete e[t],m.push(`${y}`)}))}}e.serverPrecedenceFields=m;let I={...p.content,contextData:a};const E=vo(n);dt.isEmpty(E)||(I=Po(E,I)),r?c=Mr("refreshCaseData",e):s?(c=Mr("refreshCaseView",e),I.interestPage=o):c=Mr("refreshAssignmentData",e);const{restApi:A}=c,{reqType:_}=c,S=t.value.data[n]?.caseInfo?.headers;return De(((e,t,n)=>{const{url:r,context:a}=e;if(e.reqHeaders&&e.reqHeaders.etag&&(e.headers={"if-match":e.reqHeaders.etag}),!n)return Ou(`${r}`,e,a);const s=(e=>{const{ID:t,actionID:n,context:r}=e;return`${t}.${r}.${n}`})(t);if((e=>Su[e])(s)>0&&Ff[s]){const t=[];Ff[s].forEach(((n,r)=>{n.url===e.url&&(t.push(r),n.cancelConfig.cancel())})),t.forEach((e=>{Ff[s].splice(e,1)}))}const o=Nu();return e.signal=o.token,e.cancelConfig=o,Ff[s]?Ff[s].push(e):Ff[s]=[e],Ou(e.url,e,a,{cancelContext:s}).then((e=>(delete Ff[s],e))).catch((e=>{throw e&&"ERR_CANCELED"!==e.code&&delete Ff[s],e}))})({body:I,reqHeaders:S,context:n,method:_,url:Tc(e,A)},e,!s&&!r)).pipe(xe((t=>({response:{...t.data||{}},actionConfig:e,actionMgrID:e.options.actionMgrID,headers:io(t.headers)}))),nh(": Error ocurred during fetch call at refreshData Epic : ",e.context,e?.options?.actionMgrID))})),we((async e=>{if(e&&e.type===on)return fo(e);const{actionConfig:t,response:n,headers:r,actionMgrID:a}=e,{context:s,serverPrecedenceFields:o}=t,i=Os.getTargetViewContainerName(bn),c=Sr(i,s),d={acName:c,context:s},l=ep(n,{[st.STOPMERGEACTIONS]:!0,[st.ACTIONS.DELETEAVIALACTIONS]:!0});l.directUrlUpdation=!1,await uo(l,t,d);const u=lo(l,{target:c,context:s});u.preserveClientChanges=void 0===t.options.preserveClientChanges||t.options.preserveClientChanges;const p=dc(ki,u,{serverPrecedenceFields:o});return qa.registerForServerChanges(),jc(p),qa.unRegisterForServerChanges(),Ps.resolveActionByID(a,u),[]})))],Gf=Vf,Bf=[e=>e.pipe(Wp(Fn),we((async e=>{const{context:t}=e.payload,n={},r={},a=Object.keys(e.payload.datapages).map((a=>{const s=e.payload.datapages[a];if(s.mode===ot.READONLY&&s?.refreshStrategy){const{timeoutSecs:e="",type:t=""}=s?.refreshStrategy||{},n=kc()[s.name];if(n&&a in n){const r=n[a],{loadTime:s}=r;if(!_p.isTimeElapsed(s,e,t))return}}return _p.getData(s.name,{dataViewParameters:s.dataViewParameters},t).then((e=>{const t=s.mode===ot.READONLY?r:n;t[s.name]?t[s.name][a]={pxResults:e.data.data,parameters:s.dataViewParameters,loadTime:e.data?.fetchDateTime}:t[s.name]={[a]:{pxResults:e.data.data,parameters:s.dataViewParameters,loadTime:e.data?.fetchDateTime}}})).catch((()=>{}))}));await Promise.allSettled(a);const s=[];return Object.keys(n).length&&s.push(ki({context:t,data:n})),Object.keys(r).length&&s.push(uc({data:r,context:t})),jc(s),[]})))],Hf=Bf,Wf=e=>{const{containerName:t,isInCreateStage:n}=e;return n?ot.MODAL:t||Os.getTargetViewContainerName(Nn)},qf=e=>{const t=dt.getIn(e,[ot.DATA,ot.CASE_INFO.CASE_INFO]);return Ts(t)&&Rs(zr.getOperatorIdentifier(),t)},{RESOURCE_TYPES:zf}=st,Yf=(e,t=[])=>{const{viewType:n,containerName:r,targetContainerName:a,isChild:s}=e,o=qs(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?so.PAGE:n||(!Gs(r)&&!Gs(a)||s?so.PAGE:so.FORM)},Kf=(e,t,n,r,a,s,o)=>Ou(e,{method:t,headers:{"if-match":n&&n.etag,...n,...r&&{...Au.addDebugHeaders(r)}}},a,{doNotMergeHttpMessagesForStatusCode:s?o:""}),{RESOURCE_TYPES:Jf}=st,{RESOURCE_TYPES:Xf}=st,{RESOURCE_TYPES:Qf}=st,Zf=(e,t)=>{const{containerItemID:n,skipReleaseLockRequest:r}=t,a=Wo(n),s=`${a.includes("root")?ot.APP.ROOT:ot.APP.APP}/${No.MODAL}`;e.push(dc(nc,{containerItemID:n,context:a,target:s,skipReleaseLockRequest:r}))},eg=e=>Vc(".openCaseViewAfterCreate",ot.CONTEXT_DATA,e)??!0,tg=e=>/^app\/preview_[0-9]*/g.test(e),ng=(e,t)=>{const n=ar(e);return!tg(e)&&(n===t||/^app\/primary_[0-9]*/g.test(n))},rg=async(e,t,n,r,a)=>{e.doDeleteCaseSummary=t.doDeleteCaseSummary,e.caseViewMode===ot.REVIEW_MODE&&(e.flowName=" ",e.clearView=!0),a.push(dc(Qi,{...e,...r})),dt.setIn(e,"acName",r.target),await uo(n,e),((e,t,{data:n,caseViewMode:r})=>{const{containerItemID:a}=t,s=Wo(a);if(Zs(a)){const t=lr(s),a={data:n,caseViewMode:r,context:t};dt.setIn(a.data,["context_data","caseViewMode"],r),e.push({type:Hn,payload:{context:t}}),e.push(dc(ki,a))}})(a,t,e)},ag=async(e,t,n,r,a,s,o,i)=>{const{isCaseWideAction:c,isInCreateStage:d,containerItemID:l}=e,u=ar(e.context),p=Ks(a),h=Ys(a),f=d&&!p,g=Yo(u)[0],y=g?Go(g):u,m=Vs(l),I=Wo(l),E=Object.freeze({target:e.target,containerItemID:l,context:I,containerName:m});f&&!tg(e.context)?await(async(e,t,n,r,a)=>{((e,t,n)=>{if(t.isProcessAction&&(Zf(n,{...t,skipReleaseLockRequest:!0}),e)){const r=`${t?.containerItemID.includes("root")?ot.APP.ROOT:ot.APP.APP}/${No.PRIMARY}`,a=yo(r,No.PRIMARY),s={insKey:e.ID,className:e.content.classID,context:a,acTargetName:ot.PRIMARY,isChild:!0},o={type:Qt,payload:{...s}};n.push(o)}})(e.data.caseInfo.parentCaseInfo,t,a),n.resourceType=Qf.CASE,n.directUrlUpdation=!0,t.isProcessAction||await(async(e,{translatedDXAPIResponse:t,actionInPayload:n},r)=>{const{caseID:a}=n,s=(o=t,dt.getIn(o,ks.NEXT_ASSIGNMENT_INFO_ID,ot.EMPTY_STRING));var o;const i=Ys(t),{caseViewMode:c,headers:d,semanticURL:l,actionMgrID:u,directUrlUpdation:p,key:h,flowName:f,resourceType:g}=r;(e=>{js.publish(ot.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)})({caseId:a,assignmentId:s,caseType:i}),Zf(e,{...n,skipReleaseLockRequest:!0});const y=`${n?.containerItemID.includes("root")?ot.APP.ROOT:ot.APP.APP}/${No.PRIMARY}`,m=yo(y,No.PRIMARY),I=Au.getCoreHeadersFromContext(n.context)||!1,E=lo(t,{target:y,context:m,containerItemID:m,caseViewMode:c,headers:d,semanticURL:l,key:h,flowName:f,resourceType:g,directUrlUpdation:p,debugInfo:I&&I.debugInfo&&{debugId:I.debugInfo[ot.COREHEADER_APP_DEBUG_ID]}});if(Xo(y)){const t=Uc(m),a=Js({data:t}),[,s]=a?a.split(" "):[],o=`You will lose unsaved changes for ${s}. Do you want to continue?`,{continueExecution:i}=Eo(y,{dirtyMessage:o});if(!i)return r.directUrlUpdation=!1,Ps.rejectActionByID(u),Zp();if(!eg(n.context))return e;e.push(dc(sc,E))}else e.push(dc(zi,E));return t.directUrlUpdation=p,t.semanticURL=l,await uo(t,{...E,acName:y},{acName:y,context:m}),e})(a,{translatedDXAPIResponse:r,actionInPayload:t},n)})(i,e,t,a,s):ng(e.context,y)?await(async(e,t,n,r,a,s,o,i,c)=>{const{headers:d}=c;if(e){const l=Xo(oi(e));let u=!1;const p=oi(n),h=xo(p),f=Go(p);h?.items?.[f]?.key===c?.actionInPayload?.caseID&&(u=!0),Zf(a,r);const g=Vs(e),y={target:oi(e),containerItemID:e,context:e,containerName:g};t.doDeleteCaseSummary=r.doDeleteCaseSummary;const m=lr(n),I=Uc(m),E=Uc(r.context),A=I?.caseInfo?.ID,_=E?.caseInfo?.ID;if(l&&A===_||!l&&""===o)a.push(dc(Qi,{...t,key:o,resourceType:"",...y}));else if(s){const s=oi(e),i=ko(s,o);if(i)y.target=s,y.context=i,y.containerItemID=i,a.push(dc(Qi,{...t,key:o,resourceType:"",...y}));else{const e=Yo(n)[0];r.target=e,r.context=yo(e,ot.WORKAREA,n),r.containerItemID=r.context,a.push(dc(zi,{...r,...t}));const s=r.containerItemID;a.push(dc(ec,{parentContainerTarget:e,containerItemID:s}))}}if(r.target=oi(e),r.containerName=Vs(e),r.context=e,r.containerItemID=e,dt.setIn(t,"acName",y.target),await uo(i,t),u){const{data:e,caseViewMode:r}=t;n.includes(ot.WORKAREA)&&Zs(n)&&(n=lr(n));const s={data:e,caseViewMode:r,context:n};dt.setIn(s.data,["context_data","caseViewMode"],r),a.push({type:Hn,payload:{context:n}}),a.push(dc(ki,s))}if(!s&&t.caseViewMode===ot.PERFORM_MODE){const t=((e,t)=>{const n=oi(e);return ko(n,t)})(e,o),n={data:{caseInfo:{headers:d}},context:t};a.push(dc(ki,n)),a.push(_c(((e,t=!1,n=!1)=>{const r=Ps.getNextActionMgrId();return{ID:Ec.getProperyValue(st.CASE_INFO.ASSIGNMENT_ID,"",e),actionID:Ec.getProperyValue(st.CASE_INFO.ASSIGNMENTACTION_ID,"",e),context:e,caseWideAction:t,contextData:n,options:{actionMgrID:r,retrieveLatestData:!0}}})(t)))}}else{Zf(a,r);let e=!1;const o=oi(n),i=xo(o),d=Go(o);if(i?.items?.[d]?.key===c?.actionInPayload?.caseID&&(e=!0),s){const e=Yo(n)[0];r.target=e,r.context=yo(e,ot.WORKAREA,n),r.containerItemID=r.context,a.push(dc(zi,{...r,...t}));const s=r.containerItemID;a.push(dc(ec,{parentContainerTarget:e,containerItemID:s}))}if(e){const{data:e,caseViewMode:r}=t,s={data:e,caseViewMode:r,context:n};dt.setIn(s.data,["context_data","caseViewMode"],r),a.push({type:Hn,payload:{context:n}}),a.push(dc(ki,s))}}})(y,t,u,e,s,n,r,a,o):!c||p||ng(e.context,y)?await rg(t,e,a,E,s):(Zf(s,e),((e,t,n)=>{const{containerItemID:r,caseID:a}=t;if(r&&/^app\/preview_[0-9]*/g.test(r)){const{caseClassName:t}=n,s=ar(r),o=Wo(s);e.push(dc(Vi,{containerItemID:s,context:o,container:No.PREVIEW,containerName:No.PREVIEW,caseId:a,viewName:st.PREVIEW_VIEW_NAME,caseClassName:t,updateData:!0}))}})(s,e,{caseClassName:h}))},{RESOURCE_TYPES:sg}=st,og=e=>{const t={},{routeKey:n,isModalAction:r,caseID:a,context:s,RemoteSystemID:o}=e;o&&(t.RemoteSystemID=o);const i=n||"releaseAssignmentLock",{restApi:c,reqType:d}=Mr(i,{ID:a,caseID:a,viewType:so.PAGE});return qr.getPreviewMode()&&(t[ot.SKIPCOREHEADERS]=!0),De(Ou(c,{method:d,headers:t},s,{includeRemoteSystemIdIfPresent:!!o})).pipe(xe((t=>r?{actionInPayload:e}:{response:t.data,actionInPayload:e,headers:io(t.headers)})),nh(": Error ocurred during ajax call at release lock request : ",s))},{RESOURCE_TYPES:ig}=st,cg=(e,t=!1)=>{const{action:n,state$:r,actionMgrID:a}=e;let s=[];return Jp(n.payload).pipe(we((e=>((e,t)=>{const{assignmentID:n,actionID:r,context:a}=e,{restApi:s,reqType:o}=Mr("save",{assignmentID:n,actionID:r}),{content:i}=co(a),c=t.value.data[a]?.caseInfo?.headers;return De(Ou(s,{method:o,body:i,headers:{"if-match":c&&c.etag}},a)).pipe(xe((t=>({response:t.data,actionInPayload:e,headers:io(t.headers)}))),nh(": Error ocurred during ajax call at saveAndCloseAssignment Epic at save action : ",a))})(e,r))),we((e=>{if(e&&Hs(e.type))return Jp(e);if(e.actionInPayload.isProcessAction&&e.response.data.caseInfo.parentCaseInfo){const t=`${e.actionInPayload?.containerItemID.includes("root")?ot.APP.ROOT:ot.APP.APP}/${No.PRIMARY}`,n=yo(t,No.PRIMARY),r={insKey:e.response.data.caseInfo.parentCaseInfo.ID,className:e.response.data.caseInfo.parentCaseInfo.content.classID,context:n,acTargetName:ot.PRIMARY,isChild:!0},a={type:Qt,payload:{...r}};s.push(a)}let t=!1;const{containerItemID:n}=e&&e.actionInPayload,r=ar(n),a=oi(r),o=xo(a),i=Go(a);if(o?.items?.[i]?.key===e?.actionInPayload?.caseID&&(t=!0),t){const t={context:r,data:{...e.response.data}};s.push(dc(ki,t))}return e.actionInPayload.RemoteSystemID=Er.getRemoteHeaderByContext(e.actionInPayload.context)??void 0,og(e.actionInPayload)})),we((async e=>{if(e&&Hs(e.type)){const{payload:t}=e,n=fo({...e,...t,actionMgrID:a});return s.push(n),s}const{actionInPayload:n}=e,{context:r,containerName:o}=n,i={target:Sr(o,r),containerItemID:r,context:r};return t||s.push(dc(nc,i)),s})),xe((()=>(jc(s),no(s,a),t||(s=[]),s))))},{LOCAL_ACTION_TYPE:dg}=ot,{RESOURCE_TYPES:lg}=st,ug=(e,t)=>{const{actionID:n,assignmentID:r,caseID:a,context:s,openActionType:o}=e,{isProcessAction:i}=t,c=i?wn:(e=>{const t=e.localActionType.toLowerCase();return t===dg.CASE_WIDE||t===dg.EXPRESS?Mn:xn})(e),d=so.FORM,{reqType:l}=Mr(c,{caseID:a,ID:r,actionID:n,viewType:d});let{restApi:u}=Mr(c,{caseID:a,ID:r,actionID:n,viewType:d});return e.actionType=c===Mn?ot.CASE:ot.ASSIGNMENT,u.indexOf("viewType=")<0&&(u=u.indexOf("?")<0?`${u}?viewType=${d}`:`${u}&viewType=${d}`),De(Ou(u,{method:l,headers:{}},s)).pipe(xe((t=>({response:t.data,actionInPayload:e,headers:io(t.headers)}))),nh(`: Error ocurred during ajax call at ${o} Epic : `,s))},pg=(e,t)=>{const{isProcessAction:n}=t,r=n?wn:xn;let a;if(e.openActionType=r,"modal"===Fs(r,e)){a=Yo(e.contextName)[0]?Yo(e.contextName):oi(e.contextName);const n=a?Go(a):e.contextName,r=Wo(n);return Yo(e.contextName)[0]&&e.continueExecution&&ys(r)?De([Vp(e.saveActionPayload)]).pipe(we((e=>(e=>{let t,n=0;const r=[],a={value:Lc().getState()};return Jp(e).pipe(Wp(Fp),qp((e=>{const{isFormValid:s}=e.payload;if(({actionMgrID:n,caseType:t}=e.payload),!s){const e={type:st.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return Ps.rejectActionByID(n,!0,e),Jp([])}return cg({action:e,state$:a,actionMgrID:n,caseType:t,actionsOut:r},!0)})))})(e))),we((n=>{if(1===n.length&&Hs(n[0].type)){const{continueExecution:n}=Eo(a);if(!n)return Ps.rejectActionByID(e.actionMgrID),Qp.pipe(hu((()=>Zp()))).toPromise();if(n)return ug(e,t)}return ug(e,t)})),xe((e=>e))):ug(e,t)}return ug(e,t)},hg=async(e,t,{headers:n,actionInPayload:r})=>{const{context:a,actionName:s,openActionType:o,doDeleteCaseSummary:i}=r,c=ep(e),d=Fs(o,r),l=Sr(d,a);let u,p,h=!1;!Zo(l)||Qo(l)&&!Uo(l,e.data.caseInfo.ID)||Bs(d)?(p=sr(d,a),Bs(d)&&(p=dr(a,p)),u=p,h=!0):(u=Qo(l)?ko(l,e.data.caseInfo.ID):Go(l),p=Wo(u));const f={acName:l,target:l,containerName:d,context:p};await uo(c,r,f);const g=c.uiResources?.root;let y;y=g?ot.PERFORM_MODE:ot.REVIEW_MODE;const m=lo(c,{target:l,context:p,containerItemID:u,caseViewMode:y,doDeleteCaseSummary:i,headers:n,actionName:s,isMinimizable:!1,isInCreateStage:Bs(d),resourceType:lg.ASSIGNMENT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,assignmentID:r.assignmentID,actionType:r.actionType});g&&eo(m,c),Bs(d)&&delete m.doDeleteCaseSummary,r.openActionType===Ln&&(m.isBulkAction=!0,m.data.caseInfo.actionButtons.main[0].jsAction="submitBulkAction",m.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",m.data.caseInfo.cases=r.selectedList);const I=h?zi:Qi;if(t.push(dc(I,m)),h){const a=Yo(r.contextName),s=ko(a,e.data.caseInfo.ID);if(s){const e={data:{caseInfo:{headers:n}},context:s};t.push(dc(ki,e))}}return u!==Go(l)&&t.push(dc(ec,{target:l,containerItemID:u})),Zs(u)&&Co(m,t),m.caseViewMode===ot.REVIEW_MODE&&t.push(dc(nc,m)),t};var fg=Array.isArray,gg=Object.getPrototypeOf,yg=Object.prototype,mg=Object.keys;function Ig(e){if(1===e.length){var t=e[0];if(fg(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&gg(r)===yg){var n=mg(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var r;return{args:e,keys:null}}var Eg=Array.isArray;function Ag(e){return xe((function(t){return function(e,t){return Eg(t)?e.apply(void 0,T([],O(t))):e(t)}(e,t)}))}function _g(e,t){return void 0===e&&(e=0),void 0===t&&(t=Th),e<0&&(e=0),function(e,t,n){void 0===e&&(e=0),void 0===n&&(n=Rh);var r=-1;return null!=t&&(zp(t)?n=t:r=t),new de((function(t){var a=function(e){return e instanceof Date&&!isNaN(e)}(e)?+e-n.now():e;a<0&&(a=0);var s=0;return n.schedule((function(){t.closed||(t.next(s++),0<=r?this.schedule(void 0,r):t.complete())}),a)}))}(e,e,t)}function Sg(e){return Pe((function(t,n){var r=!1,a=null,s=null,o=function(){if(null==s||s.unsubscribe(),s=null,r){r=!1;var e=a;a=null,n.next(e)}};t.subscribe(ve(n,(function(t){null==s||s.unsubscribe(),r=!0,a=t,s=ve(n,o,J),$e(e(t)).subscribe(s)}),(function(){o(),n.complete()}),void 0,(function(){a=s=null})))}))}const $g=e=>{const{context:t}=e;let n={...co(t).content,contextData:!1};const r=vo(t);dt.isEmpty(r)||(n=Po(r,n));const{restApi:a,reqType:s}=Mr("refreshCaseView",e);return n.interestPage=e.interestPage,De(Ou(a,{method:s,body:n},t)).pipe(xe((t=>({actionInPayload:e,response:t.data,headers:io(t.headers)}))),nh(": Error ocurred during ajax call : ",t))},Cg=[e=>{let t=0,n=[],r="",a=!1;return e.pipe(Wp(Li),rh(100),xe((e=>(({actionMgrID:t}=e.payload),e.payload))),we((e=>{const{context:n}=e,r=Wf(e),s=Sr(r,n),{continueExecution:o,removeActionPayload:i}=(e=>Xo(e)?{continueExecution:!0,removeActionPayload:{}}:Eo(e))(s);return a=ro(e.class),o?(e.isTraditionalUICase=a,((e,t)=>{const{class:n,context:r,viewType:a=so.PAGE}=e,{removeActionPayload:s}=t;let o=e?.pageName?e?.pageName:zr.getDefaultCasePage();return e.isTraditionalUICase&&(o="pyDetails"),De(Vu.createCase(n,{...e,pageName:o,viewType:a,context:r})).pipe(xe((({response:t,headers:n})=>({response:t,actionInPayload:e,headers:n,removeActionPayload:s}))),nh("Error ocurred during ajax call at createWork Epic : ",r))})(e,{removeActionPayload:i})):(Ps.rejectActionByID(t),Zp())})),we((async e=>{if(e&&e.type===on)return e.payload.context=Ei(),n.push(fo(e)),n;const{actionInPayload:s,response:o,headers:i,removeActionPayload:c}=e;let d;d=!(s.renderInline||zr.getDefaultCasePage()||a)&&qf(o),dt.setIn(o.data,"caseInfo.isFirstAssignment",!0);const l=Wf({...s,isInCreateStage:d}),u=Sr(l,s.context),p=yo(u,l,s.context);if(!Bs(l)&&Xo(u)){const{continueExecution:e}=Eo(u);if(!e)return Ps.rejectActionByID(t),Zp()}if(!(s?.openCaseViewAfterCreate??1)&&!d){const e=dt.getIn(o.data,"caseInfo.content");r=`${e.pyID} ${Xr.getLocaleValue("has been created.","Assignment")}`;const t=Xs(o),a=Ys(o);return(e=>{js.publish(ot.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,e)})({toastMessage:r}),(e=>{js.publish(ot.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)})({caseId:`${e.pyID}`,assignmentId:t,caseType:a}),n}const h=ep(o);let f=xr("createWork",{caseClassName:Ys(h)});f=f.replace(/{.+?}/,zs(Js(h))),h.semanticURL=f,((e,t)=>{const n=qf(e),{skipBrowserSemanticUrlUpdate:r=!1,isTraditionalUICase:a}=t;dt.setIn(e,["directUrlUpdation"],(!n||a)&&!r)})(h,s);const g={acName:u,context:p};await uo(h,s,g);const y={target:u,context:p,containerItemID:p,headers:i,semanticURL:f,isInCreateStage:d,isMinimizable:d,caseViewMode:h.confirmationNote?ot.REVIEW_MODE:ot.PERFORM_MODE,assignmentContext:dt.getIn(h,"nextAssignmentInfo.context"),nextAssignmentInfo:dt.getIn(h,"nextAssignmentInfo"),resourceType:st.CASE,openCaseViewAfterCreate:s.openCaseViewAfterCreate,modalOptions:s.modalOptions,debugInfo:s.debugInfo};eo(y,h);const m=lo(h,y);a&&(m.data.caseInfo.content.coexistenceAction="openAssignment");const I=go(u,m);return mo(I)&&Qs(n,{removeActionPayload:c,target:u}),n.push(I),So(n),n})),xe((()=>(bo(n),no(n,t),r="",n=[],n))))},e=>{let t=0,n=[];const r=[];let a=!1,s=!1;return e.pipe(Wp(Up),xe((e=>(({actionMgrID:t}=e.payload),{...e.payload,insKey:e.payload.assignmentID}))),we((e=>{a=e.isGetNextWork;const{context:n}=e;let r;r=(e?.isChild||e?.isRemote)&&e?.isMultiDoc?so.FORM:Yf(e),e.viewType=r;const o=Fs(Rn,e),i=Sr(o,n),{activate:c,activateContainerActionPayload:d}=_o(Jf.ASSIGNMENT,i,e);if(c&&!e.isParallelCall)return Jp({type:In,activateContainerActionPayload:d,actionInPayload:e});const{continueExecution:l,removeActionPayload:u}=d?.isParallelAssignment?{continueExecution:!0,removeActionPayload:{}}:Eo(i);return l?(s=ro(e.className),e.isTraditionalUICase=s,((e,t)=>{const n=Yf(e),{headers:r,context:a,assignmentID:s,isGetNextWork:o,debugInfo:i,isOpenStage:c,stageID:d,caseID:l,jsActionQueryParams:u,isLastStepInCreateStage:p}=e,{restApi:h,reqType:f}=o?Mr("getNextWork",{viewType:n}):c?Mr("openStage",{caseID:l,stageID:d}):Mr(Rn,{assignmentID:s,viewType:n}),{removeActionPayload:g}=t,y=zr.getDefaultCasePage();let m,I=e.pageName;e.isTraditionalUICase&&(I="pyDetails"),m=y?`${h}?viewType=${n}&pageName=${y}`:I?`${h}?viewType=${n}&pageName=${I}`:`${h}?viewType=${n}`,u&&Object.keys(u).forEach((e=>{m+=`&${e}=${u[e]}`}));const E=(e=>{let t=e?.headers??{};return e?.isRemote&&(t=io(t,e.remoteClassName)),t})(e);return De(Kf(m,f,E,i,a,o,"404")).pipe(xe((e=>zr.isCoexistenceAppOfType(ot.APP_TYPE.UIKIT)&&!p?Ts(e.data.data.caseInfo)?e:(m=m.replaceAll(I,"pyDetails"),zr.setDefaultCasePage("pyDetails"),{isReloadWithDifferentViewTypeRequired:!0,restUrl:m}):e)),we((e=>e?.isReloadWithDifferentViewTypeRequired?Kf(m,f,E,i,a,o,"404"):Jp(e))),xe((t=>{const{key:a,flowName:o}=ho(s);return{response:{...t.data,key:a,flowName:o},actionInPayload:e,viewType:n,removeActionPayload:g,headers:io({...r,...t.headers})}})),nh("Error ocurred during ajax call at openAssignment Epic : ",a))})(e,{removeActionPayload:u})):(Ps.rejectActionByID(t),Zp())})),we((async e=>{if(e?.type===on){if(a){const{payload:t}=e,{err:n}=t,a=n.response.status;r.push({status:Number(a)})}return n.push(fo(e)),n}const{type:t,actionInPayload:o,response:i,viewType:c,headers:d,removeActionPayload:l,activateContainerActionPayload:u}=e;if("openStage"===i?.redirectInfo?.jsAction){const e=i?.redirectInfo?.stageID,t=Up,r=i?.data?.caseInfo?.ID;o.isOpenStage=!0,o.stageID=e,o.jsActionQueryParams=i?.redirectInfo?.jsActionQueryParams;const a={type:t,payload:{...o,caseID:r,headers:d}};return n.push(a),n}const{context:p,caseViewMode:h,debugInfo:f}=o;let g=((e,t)=>{const n=qs(e);let r;r=!zr.getDefaultCasePage()&&Ts(n);const{isChild:a,containerName:s}=t,o=a&&r,i=r&&!t.isActionFromToDoList;return o||i?ot.MODAL:s||Fs(Rn,t)})(i,o);s=ro(i?.data?.caseInfo?.caseTypeID),o.isTraditionalUICase=s,s&&(g=o.containerName);const y=Sr(g,p);if(t===In)return await(async(e,t,n)=>{const{semanticURL:r,containerItemID:a,isParallelAssignment:s,insKey:o}=t,{target:i,actionInPayload:c}=n,{skipBrowserSemanticUrlUpdate:d=!1}=c,l=Wo(a);await uo({directUrlUpdation:!d,semanticURL:r},c,{acName:i,target:i,context:l}),e.push(dc(ec,{containerItemID:a,target:i,isParallelAssignment:s,insKey:o,resourceType:zf.CASE,context:l,doDeleteCaseSummary:c.doDeleteCaseSummary}))})(n,u,{actionInPayload:o,target:y}),So(n),n;const m=ep(i);((e,t)=>{const n=qs(e),r=Js(e),a=Ts(n),{skipBrowserSemanticUrlUpdate:s=!1,viewType:o,isTraditionalUICase:i}=t,c=o===so.PAGE&&(!a||i)&&!s,{caseTypeID:d}=n;if(c){const t=xr(Tn,{caseClassName:d}).replace(/{.+?}/,zs(r));e.semanticURL=t,e.directUrlUpdation=!0}})(m,o);const I=yo(y,g,p),E={acName:y,target:y,context:I};await uo(m,o,E);const A={target:y,context:I,containerItemID:I,headers:d,isMinimizable:Ts(dt.getIn(m,"data.caseInfo")),doDeleteCaseSummary:o.doDeleteCaseSummary,acTertiary:o.acTertiary,resourceType:st.CASE,debugInfo:f};eo(A,m,{skipFlowNameUpdate:o?.caseViewMode===ot.REVIEW_MODE});const _=lo(m,A);return o.isProcessAction&&(_.data.isProcessAction=o.isProcessAction),s&&(_.data.caseInfo.content.coexistenceAction="openAssignment"),((e,t,n,r,a,s,o)=>{Xo(t)&&Zo(t)?((e,t,n,r,a)=>{Yf(e,t)===so.FORM?(n.caseViewMode=r||ot.PERFORM_MODE,a.push(dc(Qi,n))):a.push(dc(sc,n))})(r,a,e,s,n):((e,t,n,r,a)=>{if(Qs(e,{removeActionPayload:t,target:n}),((e,t)=>{const n=Go(t);let r=null;return n&&(r=wo(t,n)),r?.key===e&&Qo(t)})(r.key,n))r.context=qo(n),r.containerItemID=r.context,e.push(dc(sc,r));else if((a?.isChild||a?.isRemote)&&a?.isMultiDoc){const t=oi(a.context);r.target=t,r.context=a.context,r.containerItemID=a.context,e.push(dc(sc,r))}else{const t=oi(r.context),n=ko(t,r.key);n?(r.target=t,r.context=n,r.containerItemID=n,e.push(dc(sc,r))):e.push(dc(zi,r))}})(n,o,t,e,r)})(_,y,n,o,i,h,l),c===so.FORM&&Zs(_.containerItemID)&&Co(_,n),So(n),(e=>{js.publish(ot.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,e)})({actionInContext:p,assignmentID:o.assignmentID,caseKey:_.key}),n})),xe((()=>{const e=t;return jc(n),no(n,e,r),n[0]?.payload?.isParallelAssignment&&jc({type:Up,payload:{...n[0].payload,isParallelCall:!0}}),n=[],n})))},e=>{let t=0,n=[];return e.pipe(Wp("OPEN_WORK_BY_HANDLE"),xe((e=>(({actionMgrID:t}=e.payload),e.payload))),we((e=>{const{context:n,isChild:r,viewType:a}=e,s=Fs(Tn,e),o=Sr(s,n);let i,c=!0;if("none"!==a){const e=Eo(o);c=e.continueExecution,i=e.removeActionPayload}if(!c)return Ps.rejectActionByID(t),Zp();const{activate:d,activateContainerActionPayload:l}=_o(Xf.CASE,o,e);return d&&!r&&"none"!==a?Jp({type:In,activateContainerActionPayload:l,actionInPayload:e}):((e,t)=>{const{insKey:n,headers:r,context:a,debugInfo:s,viewType:o}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:zr.getDefaultCasePage(),d=Mr(Tn,{caseID:n,params:{pageName:c}});let{restApi:l}=d;const{reqType:u}=d;return"none"===o&&(l=`${l.split("viewType")[0]}viewType=none`),De(Ou(l,{method:u,headers:{...r,...s&&{...Au.addDebugHeaders(s)}}},a)).pipe(xe((t=>({response:t.data,actionInPayload:e,headers:io({...r,...t.headers}),removeActionPayload:i}))),nh("Error ocurred during ajax call at openWorkByHandle Epic : ",a))})(e,{removeActionPayload:i})})),we((async e=>{if(e&&Hs(e.type))return n.push(fo(e)),n;const t=Uc(e?.actionInPayload?.context),r=ro(e?.actionInPayload.className);if("none"===e?.actionInPayload?.viewType){if("perform"!==t?.context_data?.caseViewMode){const t={data:{...ep(e?.response)?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:Hn,payload:{context:t.context,doDeleteConfirmationDetails:!1}}),r&&(t.data.caseInfo.content.coexistenceAction="openWorkByHandle"),n.push(dc(ki,t));const a=oi(e?.actionInPayload?.context),s=Vs(e?.actionInPayload?.context),o=Object.freeze({target:a,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:s});if(Zs(e?.actionInPayload?.context)){const t=lo(e?.response,{...o});Co({...t,isArrayDeepMerge:!0},n)}}}else await(async(e,t,n)=>{const{actionInPayload:r,activateContainerActionPayload:a,type:s,response:o,removeActionPayload:i,headers:c}=e,{context:d,skipBrowserSemanticUrlUpdate:l,debugInfo:u}=r,p=Fs(Tn,r),h=Sr(p,d);if(s===In)await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:r},actionInPayload:a,actionInPayload:{context:s,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=Fs(Tn,a),d=Sr(c,s),l=Wo(r);await uo({directUrlUpdation:!o,semanticURL:n},a,{acName:d,containerName:c,target:d,context:l}),e.push(dc(ec,{containerItemID:r,target:d,context:l,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:a,actionInPayload:r});else{const e=yo(h,p,d,{buildNew:!0}),a=ep(o),s=((e,t)=>{const{isRemoteCase:n,remoteCaseClass:r}=t,a=Js(e),s=n?r:Ys(e);let o=xr(Tn,{caseClassName:s});return o=o&&o.replace("{workID}",zs(a)),o})(a,r);a.semanticURL=s,a.directUrlUpdation=!l;const f={acName:h,context:e};await uo(a,r,f);const g=lo(a,{target:h,context:e,containerItemID:e,semanticURL:s,headers:c,debugInfo:u});g.caseViewMode=ot.REVIEW_MODE,g.resourceType=Xf.CASE,n&&(g.data.caseInfo.content.coexistenceAction="openWorkByHandle"),eo(g,a,{skipFlowNameUpdate:!0});const y=go(h,g);i.containerItemID&&mo(y)&&t.push(dc(nc,{containerItemID:i.containerItemID,target:h})),t.push(y)}So(t),(e=>{js.publish(ot.PUB_SUB_EVENTS.CASE_EVENTS.CASE_OPENED,e)})({caseKey:r.insKey,actionInContext:d})})(e,n,r);return n})),xe((()=>(jc(n),no(n,t),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Wp("OPEN_LOCAL_ACTION"),xe((e=>(({actionMgrID:t}=e.payload),e.payload))),we((e=>((e,t)=>pg(e,t))(e,{actionMgrID:t}))),we((async e=>{if(!e)return Qp;if(Hs(e.type)){const t=fo(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:s}=t;return dt.setIn(a,"data.caseInfo.activeActionID",s),dt.setIn(a.data,ot.CASE_INFO_IS_LOCAL_ACTION,!0),t.refreshConditions&&dt.setIn(a.data,ot.CASE_INFO_REFRESH_CONDITIONS,t.refreshConditions),await hg(a,n,{headers:r,actionInPayload:t}),(e=>{const{callbacks:t}=e;var n;t?.submit&&(n=e=>{t.submit(e),js.unsubscribe(ot.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,"expressLocalActionSubmit")},js.subscribe(ot.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n,"expressLocalActionSubmit"))})(t),n})),xe((()=>(jc(n),no(n,t),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Wp("OPEN_BULK_ACTION"),xe((e=>(({actionMgrID:t}=e.payload),e.payload))),we((e=>((e,t)=>{const{context:n}=e,{actionMgrID:r}=t;e.openActionType=Ln;const a=Fs(Ln,e),s=Sr(a,n),{continueExecution:o}=Eo(s);return o?(e=>{const{actionID:t,context:n,openActionType:r,caseTypeID:a,bulkContextID:s="",bulkContextType:o=""}=e,{reqType:i,restApi:c}=Mr("openBulkAction",{caseTypeID:a,actionID:t,bulkContextID:s,bulkContextType:o});return De(Ou(c,{method:i},n)).pipe(xe((t=>({response:t.data,actionInPayload:e,headers:io(t.headers)}))),nh(`: Error ocurred during ajax call at ${r} Epic : `,n))})(e):(Ps.rejectActionByID(r),Zp())})(e,{actionMgrID:t}))),we((async e=>{if(e&&Hs(e.type)){const t=fo(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:s}=t;return dt.setIn(a,"data.caseInfo.activeActionID",s),await hg(a,n,{headers:r,actionInPayload:t}),(e=>{const{callbacks:t}=e;var n;t?.submit&&(n=e=>{t.submit(e),js.unsubscribe(ot.PUB_SUB_EVENTS.EVENT_BULKACTION,"bulkActionSubmit")},js.subscribe(ot.PUB_SUB_EVENTS.EVENT_BULKACTION,n,"bulkActionSubmit"))})(t),n})),xe((()=>(1===n.length&&Hs(n[0].type)?Ps.rejectActionByID(t):Ps.resolveActionByID(t),jc(n),n=[],n))))},e=>{let t,n=0,r=[],a="";return e.pipe(Wp("SUBMIT_BULK_ACTION"),qp((e=>{const{isFormValid:s}=e.payload;if(({actionMgrID:n}=e.payload),!s){const e={type:st.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return Ps.rejectActionByID(n,!0,e),Jp([])}return Jp(e.payload).pipe(we((e=>(t=e,(e=>{const{actionID:t,context:n,cases:r,classID:a}=e,{content:s}=co(n,{nonEmptyAndChangedData:!0});let o=5;try{dh.getSharedState("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults")?.find((e=>e.pyClassName===a))?.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,{reqType:d,restApi:l}=Mr("performBulkAction",{actionID:t}),u=[],p=i.length;for(let t=0;t<p;t+=c)s.cases=i.slice(t,t+c),s.cases.length&&u.push(De(Ou(l,{method:d,body:s},n)).pipe(xe((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:io({...r})}})),nh("Error ocurred during ajax call at submitbulkaction Epic : ",n)));return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return D(Yp(e))?e.pop():void 0}(e),r=Ig(e),a=r.args,s=r.keys,o=new de((function(e){var t=a.length;if(t)for(var n=new Array(t),r=t,o=t,i=function(t){var i=!1;$e(a[t]).subscribe(ve(e,(function(e){i||(i=!0,o--),n[t]=e}),(function(){return r--}),void 0,(function(){r&&i||(o||e.next(s?function(e,t){return e.reduce((function(e,n,r){return e[n]=t[r],e}),{})}(s,n):n),e.complete())})))},c=0;c<t;c++)i(c);else e.complete()}));return n?o.pipe(Ag(n)):o}(u)})(t)))),we((e=>{let n=0,s=0;const o=[],{containerItemID:i,context:c}=t;return e.map((e=>{const{response:t}=e;n+=Number(t.successCount),s+=Number(t.failureCount),s&&t.results.map((e=>{"200"!==e.status&&e.error&&o.push({ID:e.BusinessID,message:e.error.errorDetails[0].localizedValue})}))})),a=`${n} record(s) updated`,(e=>{js.publish(ot.PUB_SUB_EVENTS.EVENT_BULKACTION,e)})({submitResponse:e}),t.target=`${ot.APP.APP}/${No.MODAL}`,r.push(dc(nc,{containerItemID:i,context:c,target:t.target,skipReleaseLockRequest:!0})),s&&r.push(dc(tc,{messages:[{type:"error",message:`${s} records failed to update`,errorDetails:o,showHeader:!1}],context:ar(c)||c,category:"HTTP",showHeader:!1})),r})),xe((()=>(Ps.resolveActionByID(n,a),jc(r),r=[],r))))})))},e=>{let t=0,n=[];return e.pipe(Wp(jp),xe((e=>(({actionMgrID:t}=e.payload),e.payload))),we((e=>(Ni(e.context),((e,t)=>pg(e,t))(e,{actionMgrID:t,isProcessAction:!0})))),we((async e=>{if(e&&Hs(e.type)){const t=fo(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e;return await hg(a,n,{headers:r,actionInPayload:t}),n})),xe((()=>(bo(n),no(n,t),n=[],n))))},(e,t)=>{let n=0,r=[],a="",s="";return e.pipe(Wp("FINISH_ASSIGNMENT"),qp((e=>{const o=zr.isCoexistenceAppOfType(ot.APP_TYPE.UIKIT);if(({actionMgrID:n}=e.payload),s=e.payload.context,!ss(s)){const t={type:st.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return Ps.rejectActionByID(n,!0,t),ah.handleDeferredActionCompletion(e.payload.context),Jp([])}return vi({context:s,stateObj:Uc(s),clearContextMessages:!0}),Jp(e.payload).pipe(we((e=>(((e,t)=>{const{containerItemID:n,context:r,actionMgrID:a,isInCreateStage:s,isModalAction:o}=t;if(s&&o){const t=Vs(n),s=Sr(t,r);e.push(dc(ec,{containerItemID:n,target:s,actionMgrID:a}))}})(r,e),((e,t)=>{const{assignmentID:n,actionID:r,caseID:a,context:s,additionalHeaders:o={},isCaseWideAction:i,outcome:c}=e,{state$:d}=t,l=(e=>{const{isModalAction:t,viewType:n,isInCreateStage:r}=e;return t&&r?so.PAGE:n||so.FORM})(e),u=(e=>{const{isCaseWideAction:t}=e;return t?Mn:"finishAssignment"})(e),p={assignmentID:n,actionID:r,caseID:a,viewType:l};let{restApi:h}=Mr(u,p),{reqType:f}=Mr(u,p);l&&h.indexOf("viewType=")<0&&(h=h.indexOf("?")<0?`${h}?viewType=${l}`:`${h}&viewType=${l}`),c&&h.indexOf("outcome")<0&&(h=h.indexOf("?")<0?`${h}?outcome=${c}`:`${h}&outcome=${c}`),i&&(f="PATCH");const{content:g,attachmentsExist:y}=co(s);e.attachmentsExist=y;const m=d.value.data[s]?.caseInfo?.headers||{},{etag:I}=m,E={"if-match":I,...o};return De(Ou(h,{method:f,body:g,headers:E},s)).pipe(xe((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:io({...E,...r})}})),nh("Error ocurred during ajax call at finishAssignment Epic : ",s))})({...e},{state$:t})))),we((async e=>{if(e&&e.type===on){const t=fo(e);return r.push(t),r}const{headers:t,actionInPayload:s,response:i}=e,{containerItemID:c,context:d=Wo(c),isModalAction:l,isInCreateStage:u}=s,p=oi(c);s.target=p;const h=Vs(c),f=Object.freeze({target:s.target,containerItemID:c,context:d,containerName:h});dt.setIn(i.data,"caseInfo.isFirstAssignment",!1),dt.setIn(i.data,ot.CASE_INFO_IS_LOCAL_ACTION,!1),(e=>{js.publish(ot.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,e)})({submitResponse:i});let g=ep(i,{[st.STOPMERGEACTIONS]:!i.nextAssignmentInfo});const y=Ys(g),m=ar(s.context),I=Yo(m)[0]?Go(Yo(m)[0]):m,E=Ks(g),A=u&&!E;!l||u||ng(s.context,I)||(g=((e,t)=>(e?.data?.caseInfo&&t?.caseInfo?.content&&(e.data.caseInfo.content=t?.caseInfo?.content),e))(g,Uc(c)));const _=lo(g,{headers:t,actionMgrID:n,directUrlUpdation:!1});let S,$;to(_.data,s),_.caseClassName=y,_.resourceType=sg.ASSIGNMENT,_.headers=t;const C=g?.data?.caseInfo?.assignments?.some((e=>e.ID===s.assignmentID)),b=((e,t)=>{const{assignmentID:n}=t;return e?.data?.caseInfo?.assignments?.some((e=>e.ID===n&&"true"===e?.canPerform))})(g,s),P=((e,t,n,r,a)=>{let s;const o=oi(t);return s=Qo(o)?ko(o,n.data.caseInfo.ID):Go(o),r&&e&&Gc(null,ot.CASE_VIEW_MODE_PROP,s)===ot.PERFORM_MODE&&a})(C,I,g,l,b),v=s?.actionID===st.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT;g?.data?.nextAssignmentInfo&&!v?(_.caseViewMode=ot.PERFORM_MODE,S=Js(g),$=!0):P&&!v?(_.caseViewMode=ot.PERFORM_MODE,S=Js(g),_.flowName=" ",_.deleteAssignmentSpecificResources=!1,$=!1):(_.caseViewMode=ot.REVIEW_MODE,S="",$=!1);const O=Js(g);eo(_,g,{skipFlowNameUpdate:_?.caseViewMode===ot.REVIEW_MODE||P});const T=xr("createWork",{caseClassName:y}).replace(/{.+?}/,zs(O));var R;if(g.semanticURL=T,_.semanticURL=T,l?(await ag(s,_,$,S,g,r,e,i),A&&(a=eg((R=s).context)?"":`${R.workID} ${Xr.getLocaleValue("has been created.","Assignment")}`)):u&&o&&!E?(zr.setDefaultCasePage("pyDetails"),await(async(e,t,n)=>{const r={assignmentID:e?.data?.caseInfo?.assignments[0]?.ID,className:e?.data?.caseInfo?.content?.classID,containerName:No.PRIMARY,targetContainerName:No.PRIMARY,viewType:so.PAGE,isLastStepInCreateStage:!0,context:n},a={type:nn,payload:{...r}};t.push(a)})(i,r,ar(d))):await rg(_,s,g,f,r),((e,t,n)=>{const{isModalAction:r,isCaseWideAction:a,caseID:s}=t,o=ng(t.context,n);Us({caseID:s,isModalAction:r,isModalLaunchedFromPrimaryValue:o,isCaseWideAction:a,stages:e?.data?.caseInfo?.stages||[]})})(_,s,I),!g?.data?.nextAssignmentInfo){const e=((e,t)=>{const{isCaseWideAction:n,assignmentID:r,actionID:a}=t;return{isCaseWideAction:n,caseID:Js(e),assignmentID:n?null:r,actionID:n?a:null}})(g,s);(e=>{js.publish(ot.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,e)})({...e,containerItemID:c})}return((e,{isModalAction:t,target:n,transientItemID:r})=>{if(t){const t=e.find((({type:e})=>e===_n));t?.payload&&(n=t.payload.target,r=t.payload.containerItemID)}const a=rc({target:n,containerItemID:r});a.payload.transientItems.length&&e.push(a)})(r,{transientItemID:c,target:p,isModalAction:l}),r})),xe((()=>(ah.handleDeferredActionCompletion(s),r.find((e=>e.type===on))?Ps.rejectActionByID(n):Ps.resolveActionByID(n,a),bo(r),r=[],a="",r))))})))},(e,t)=>{let n=0,r=[];return e.pipe(Wp("NAVIGATE_TO_STEP"),qp((e=>(({actionMgrID:n}=e.payload),Jp(e.payload).pipe(we((e=>((e,t)=>{const{ID:n,stepID:r,containerItemID:a,context:s=Wo(a),isInCreateStage:o}=e,{state$:i}=t,c={ID:n,stepID:r,viewType:o?so.PAGE:so.FORM},{restApi:d,reqType:l}=Mr("navigateToStep",c),{content:u}=co(s),p=i.value.data[s].caseInfo.headers;return De(Ou(`${d}`,{method:l,body:u,headers:{"if-match":p&&p.etag}},s)).pipe(xe((t=>({response:t.data,actionInPayload:e,headers:io({...p,...t.headers})}))),nh("Error ocurred during ajax call at navigateToStep Epic : ",s))})(e,{state$:t}))),we((async e=>{if(e&&Hs(e.type))return r.push(fo(e)),r;const{actionInPayload:t,response:n,headers:a}=e,{containerItemID:s,context:o=Wo(s),isModalAction:i}=t,c=oi(s),d=Vs(s),l=Object.freeze({target:c,containerItemID:s,context:o,containerName:d}),u=ep(n),p={acName:c,...l};await uo(u,t,p);const h=lo(u,{...l,headers:a});h.doDeleteCaseSummary=t.doDeleteCaseSummary,h.resourceType=ig.ASSIGNMENT,eo(h,u),to(h.data,t);const f=u.data.caseInfo.stages;return Us({caseID:Js(u),isModalAction:i,stages:f}),Zs(s)&&Co(h,r),r.push(dc(Qi,h)),So(r),r})),xe((()=>(jc(r),no(r,n),r=[],r))))))))},e=>{let t=0,n=[];return e.pipe(Wp("CANCEL_ASSIGNMENT"),xe((e=>(({actionMgrID:t}=e.payload),e.payload))),we((e=>{const{isModalAction:t}=e;return e.context||(e.context=Wo(e.containerItemID)),e.RemoteSystemID=Er.getRemoteHeaderByContext(e.context)??void 0,((e,t)=>{const{isModalAction:n}=t;return og({routeKey:"cancelAssignment",isModalAction:n,...e})})(e,{isModalAction:t})})),we((async e=>{if(e&&e.type===on)return n.push(fo(e)),n;const{actionInPayload:r,response:a}=e,{containerItemID:s,isModalAction:o,isInCreateStage:i}=r,c=oi(s),d=Wo(s),l={target:o?`${ot.APP.APP}/${ot.MODAL}`:c,containerItemID:s,caseViewMode:o?ot.PERFORM_MODE:ot.REVIEW_MODE,context:d,actionMgrID:t,key:Js(a)};return i&&n.push(dc(Qi,l)),!o&&Zs(s)&&(async(e,t)=>{const{childContainerItemID:n,caseViewMode:r}=t,a=ar(n),s={context:Wo(a),data:{context_data:{caseViewMode:r}}};e.push(dc(ki,s))})(n,{childContainerItemID:s,caseViewMode:ot.REVIEW_MODE}),l.skipReleaseLockRequest=!0,n.push(dc(nc,l)),n})),xe((()=>(jc(n),no(n,t),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Wp(un,_n),xe((e=>(({actionMgrID:t}=e.payload),e.payload))),we((e=>{const{containerItemID:t,caseID:n,context:r,caseDeleted:a,skipReleaseLockRequest:s}=e;return t!==r||!n||a||s?Jp([]):og(e)})),we((e=>(e&&Hs(e.type)&&n.push(fo(e)),n))),xe((()=>(jc(n),no(n,t),n=[],n))))},(e,t)=>{let n,r=0;return e.pipe(Wp(Fp),qp((e=>{const{saveOnly:a}=e.payload;return({actionMgrID:r,caseType:n}=e.payload),cg({action:e,state$:t,actionMgrID:r,caseType:n},a)})))},(e,t)=>{let n,r=0,a=[];return e.pipe(Wp(kp),xe((e=>(({actionMgrID:r,caseType:n}=e.payload),e.payload))),we((e=>e.ignoreCaseDeletion?Jp({actionInPayload:e}):(e=>{const{caseID:t,context:n}=e,{restApi:r,reqType:a}=Mr("deleteCaseInCreateStage",{ID:t});return De(Ou(r,{method:a},n)).pipe(xe((t=>({response:t.data,actionInPayload:e,headers:io(t.headers)}))),nh(": Error ocurred during ajax call at deleteCaseInCreateStage Epic : ",n))})(e))),we((async e=>{if(e&&Hs(e.type)){const{payload:t}=e,n=fo({...e,...t,actionMgrID:r});return a.push(n),a}const{actionInPayload:n}=e,{context:s,isModalAction:o}=n,i=o?No.MODAL:No.PRIMARY,c=Sr(i,s);if(!o){const e={acName:c,target:c,context:s},r=t.value.containers[c],{semanticURL:a}=(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 uo({directUrlUpdation:!0,semanticURL:a},n,e)}if(n.isProcessAction&&n.parentCaseInfo){const e={insKey:n.parentCaseInfo.ID,className:n.parentCaseInfo.content.classID,context:n.parentContext,acTargetName:ot.PRIMARY,isChild:!0},t={type:Qt,payload:{...e}};a.push(t)}const d={target:c,containerItemID:s,context:s,caseDeleted:!0};return a.push(dc(nc,d)),a})),xe((()=>(jc(a),no(a,r)===ot.PROMISE_VALUE.RESOLVE&&(e=>{js.publish(ot.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,e)})({caseType:n}),a=[],a))))},e=>e.pipe(Wp(Dn),Sg((()=>_g(100))),xe((e=>{const{actionMgrID:t,isChildCase:n,isModalAction:r,isProcessAction:a,isDataObject:s,skipReleaseLockRequest:o}=e.payload;return Ps.resolveActionByID(t),js.publish(ot.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:r,hideDelete:!a&&n,isDataObject:s,skipReleaseLockRequest:o}),[]}))),e=>e.pipe(Wp(Sn),Sg((()=>_g(100))),xe((e=>{const{actionMgrID:t,context:n,containerName:r,containerItemID:a}=e.payload,s=Sr(r,n);return Ps.resolveActionByID(t),jc(dc(ec,{containerItemID:a,target:s,doDeleteCaseSummary:!1})),[]}))),e=>{let t=0,n=[],r="";return e.pipe(Wp(qn),xe((e=>(({actionMgrID:t}=e.payload),e.payload))),we((e=>$g(e))),we((async e=>{if(e&&e.type===on)return n.push(fo(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0}};const{actionInPayload:t,response:a}=e,s=t.containerName,o=Sr(s,t.context);let i=yo(o,s,t.context);i=dr(t.context,i);const c=ep(a);c.key=t.ID,c.data.caseInfo.ID=t.ID;const d={isMultiRecordData:!0,viewName:t.viewID,parentContext:t.context,interestPage:t.interestPage};c.uiResources.context_data.modalView=d;const l={acName:o,context:i};await uo(c,t,l);const u=lo(c,{target:o,context:i,containerItemID:i});u.resourceStatus=t.actionType,u.isMultiRecordData=!0,u.parentContext=t.context;const p=go(o,u);return r=i,n.push(p),So(n),{actionsOut:n,actionInPayload:t}})),xe((({actionInPayload:e})=>(Ws(n)?Ps.rejectActionByID(t):Ps.resolveActionByID(t),jc(n),n=[],e.skipPageInstructions||((e,t,n,r,a)=>{a===ot.RESOURCE_STATUS.CREATE&&(qa.isStateMachineExist(e,t,n)||qa.setStateMachine(e,n,t,new Pa(n,t,e)),qa.getStateMachine(e,t,n).insert({},r+1,!0))})(r,e.pageReference,e.targetProperty,e.index,e.actionType),n))))},e=>{let t,n=0,r=[];return e.pipe(Wp(zn),qp((e=>{t=e.payload;const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const e={type:st.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return Ps.rejectActionByID(n,!0,e),Jp([])}return Jp(e.payload).pipe(we((e=>(t=e,$g(t)))),we((async e=>{if(e&&e.type===on){const t=fo(e);return r.push(t),r}const{containerItemID:n,context:a}=t;var s,o,i,c;return s=a,o=t.parentContext,i=st.CASE_INFO.CASE_INFO_CONTENT,c=!0,wa(s).forEach((e=>{const t=dt.convertClipboardPageToPageRefNotation(e.target);qa.isStateMachineExist(o,i,t)||qa.setStateMachine(o,t,i,new Pa(t,i,o));const n=qa.getStateMachine(o,i,t);switch(e.instruction.toLowerCase()){case"insert":n.insert(e.content,e.listIndex,c);break;case"update":n.update(e.content,e.listIndex,c,{});break;case"delete":n.delete(e.listIndex,c);break;case"replace":n.replacePage(e.content);break;case"move":n.move(e.listIndex,e.listMoveToIndex);break;case"delete all":{const e=t.substring(t.lastIndexOf("."),t.length);n.deleteAll(e);break}}})),r.push(dc(nc,{containerItemID:n,context:a,target:t.target,skipReleaseLockRequest:!0})),r})),xe((()=>(Ws(r)?Ps.rejectActionByID(n):(Ps.resolveActionByID(n),vc(t.parentContext,"caseInfo.content",{})),jc(r),r=[],r))))})))}],bg=Cg;function Pg(){return Pe((function(e,t){e.subscribe(ve(t,J))}))}const{RESOURCE_TYPES:vg}=st,Og=[e=>e.pipe(Wp(Bt),xe((e=>e.payload)),we((e=>{const t={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID},n={};if(t.RemoteSystemID)n.RemoteSystemID=t.RemoteSystemID;else if(Er.isRemoteCase(t.caseClassName)){const{RemoteSystemID:e}=Er.getRemoteCase(t.caseClassName);n.RemoteSystemID=e}let{restApi:r,reqType:a}=Mr("loadView",t);return e.viewContext===vg.PAGE&&({restApi:r,reqType:a}=Mr(bn,{page:e.viewName,pageClass:e.pageClass})),De(Ou(r,{method:a,headers:n},e.context)).pipe(xe((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:io(t.headers),rootView:dt.getIn(r,ot.ROOT)}})),nh(": Error ocurred during ajax call at loadView Epic : ",e.context))})),we((async e=>{const t={};if(e?.type===on)return t.actionsOut=fo(e),t;try{t.actionMgrID=e?.actionConfig?.actionMgrID,t.rootView=e?.rootView;const{actionConfig:n,response:r,headers:a}=e,{containerItemID:s,container:o,updateData:i}=n,c=o||Os.getTargetViewContainerName(bn),d=Sr(c,n.context),l=o===No.PREVIEW&&i?n.context:yo(d,c,n.context,{buildNew:!!o});n.context=l;const u={acName:d,context:l};let p={};p=o===No.PREVIEW?ep(r):ep(r,{[st.STOPMERGEACTIONS]:!0,[st.ACTIONS.DELETEAVIALACTIONS]:!0}),p.directUrlUpdation=!1,await uo(p,n,u);const h={...n,target:d,context:l,containerItemID:s||l,headers:a},f=lo(p,h);if(f.resourceType=vg.CASE,o&&!i){f.caseViewMode=ot.REVIEW_MODE,f.caseViewMode=ot.REVIEW_MODE;const e=oi(f?.context);((e,t,n,r,a)=>{e?(r.actionsOut=[],r.actionsOut.push(dc(ec,{target:t,containerItemID:e}))):r.actionsOut=dc(zi,{...n,container:a})})(ko(e,f.key),e,f,t,o)}else f.preserveClientChanges=!0,t.actionsOut=[],t.actionsOut.push({type:Hn,payload:{context:l}}),t.actionsOut.push(dc(ki,f))}catch(e){console.error(e),t.rootView={type:"error",payload:e}}const{caseId:n,context:r,viewName:a}=e.actionConfig;return"pyCasePreview"===a&&(e=>{js.publish(ot.PUB_SUB_EVENTS.CASE_EVENTS.CASE_PREVIEW,e)})({caseId:n,context:r}),t})),xe((({rootView:e,actionsOut:t,actionMgrID:n=0})=>(Ps.resolveActionByID(n,e),t)))),e=>{let t=0,n=[];return e.pipe(Wp(Ht),xe((e=>(({actionMgrID:t}=e.payload),e.payload))),we((e=>{const{debugInfo:n,context:r,viewName:a,className:s,skipSemanticUrl:o=!1,containerName:i=Os.getTargetViewContainerName(bn)}=e,c=n&&{...Au.addDebugHeaders(n)},d=Sr(i,r);let l="",u={},p=!1;if(!o){if(l=xr(bn,{page:a}),d&&l){const{activate:t,activateContainerActionPayload:n}=_o(vg.PAGE,d,{semanticURL:l});if(t)return Jp({type:In,activateContainerActionPayload:n,actionConfig:e})}if(({continueExecution:p,removeActionPayload:u}=Eo(d)),!p)return Ps.rejectActionByID(t),Zp()}const{restApi:h,reqType:f}=Mr(bn,{page:a,pageClass:s});return De(Ou(h,{method:f,headers:c},r)).pipe(xe((t=>{let n={};return n="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...n,key:l,semanticURL:l},actionConfig:e,headers:io(t.headers),removeActionPayload:u,skipSemanticUrl:o}})),nh(": Error ocurred during ajax call at showPage Epic : ",e.context))})),we((async e=>{if(e&&e.type===on)return n.push(fo(e)),n;const{type:t,actionConfig:r,skipSemanticUrl:a}=e,s=r.containerName||Os.getTargetViewContainerName(Ht),o=Sr(s,r.context);if(t===In){const{activateContainerActionPayload:{semanticURL:t,containerItemID:a}}=e,s={acName:o,context:Wo(a)};await uo({directUrlUpdation:!0,semanticURL:t},r,s,!0),n.push(dc(ec,{target:o,containerItemID:a}))}else{const t=yo(o,s,r.context),{response:i,headers:c={},removeActionPayload:d}=e,l=ep(i,{isCreateDataObject:r.isCreateDataObject});l.directUrlUpdation=!a;const u={acName:o,context:t};await uo(l,r,u);const p={target:o,context:t,containerItemID:t,headers:c,debugInfo:r.debugInfo},h=lo(l,p);h.resourceType=st.PAGE,r.isCreateDataObject&&(h.resourceType=st.RESOURCE_TYPES.DATA,h.resourceStatus=st.RESOURCE_STATUS.CREATE,delete h.data.caseInfo);const f=go(o,h);d.containerItemID&&mo(f)&&n.push(dc(nc,{containerItemID:d.containerItemID,target:o})),n.push(f),So(n)}return js.publish(st.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:o,pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),n})),xe((()=>{Ps.resolveActionByID(t),jc(n),n=[]})),Pg())}],Tg=Og,{RESOURCE_TYPES:Rg}=st,Ng=[e=>{let t,n=0,r=[];return e.pipe(Wp(Wt),xe((e=>(({actionMgrID:n}=e.payload),e.payload))),we((e=>{const{context:t,pageName:r,dataContext:a,dataContextParameters:s,skipSemanticUrl:o=!1,containerName:i=Os.getTargetViewContainerName(Ht),isDeferLoaded:c=!1}=e,d=Sr(i,t);let l="",u={},p=!1;if(!o){l=xr(Pn,{pageName:r,dataViewName:a},s);const{activate:t,activateContainerActionPayload:o}=_o(Rg.PAGE,d,{semanticURL:l});if(t)return Jp({type:In,activateContainerActionPayload:o,actionConfig:e});if(({continueExecution:p,removeActionPayload:u}=Eo(d)),!p)return Ps.rejectActionByID(n),Zp()}return((e,t)=>{const{context:n,pageName:r,dataContext:a,dataContextParameters:s,semanticURL:o,skipSemanticUrl:i}=e,{removeActionPayload:c}=t,{restApi:d,reqType:l,body:u}=Mr(Pn,{pageName:r,dataContext:a,dataContextParameters:s});return De(Ou(d,{method:l,body:u},n)).pipe(xe((t=>({response:{...t.data,key:o,semanticURL:o},actionConfig:e,headers:io(t.headers),removeActionPayload:c,skipSemanticUrl:i}))),nh("Error ocurred during ajax call at showData Epic : ",e.context))})({context:t,pageName:r,dataContext:a,dataContextParameters:s,semanticURL:l,skipSemanticUrl:o,containerName:i,isDeferLoaded:c},{removeActionPayload:u})})),we((async e=>{if(e&&e.type===on)return r.push(fo(e)),r;const{type:n,actionConfig:a,headers:s,response:o,skipSemanticUrl:i}=e;t=dt.getIn(o,ot.ROOT);const{containerName:c}=a,d=Sr(c,a.context);let l;if(a.isDeferLoaded){l=ep(o),l.directUrlUpdation=!i;const t={acName:d,context:a.context};await uo(l,a,t);const n={target:d,context:a.context,containerItemID:e.containerItemID,headers:s},c=lo(l,n);return r=dc(ki,c),r}if(n===In){const{activateContainerActionPayload:{semanticURL:t,containerItemID:n}}=e,s={acName:d,context:Wo(n)};await uo({directUrlUpdation:!0,semanticURL:t},a,s,!0),r.push(dc(ec,{target:d,containerItemID:n,resourceType:Rg.DATA}))}else{const t=yo(d,c,a.context),{removeActionPayload:n}=e;l=ep(o),l.directUrlUpdation=!i;const u={acName:d,context:t};await uo(l,a,u);const p=lo(l,{target:d,context:t,containerItemID:t,headers:s});p.resourceType=Rg.DATA;const h=go(d,p);n.containerItemID&&mo(h)&&r.push(dc(nc,{containerItemID:n.containerItemID,target:d})),r.push(h),So(r)}return r})),xe((()=>(Ps.resolveActionByID(n,t),jc(r),r=[],r))))},e=>{let t=0,n=[];return e.pipe(Wp("CREATE_DATA_OBJECT"),rh(100),qp((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:st.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return Ps.rejectActionByID(t,!0,e),Jp([])}return Jp(e.payload).pipe(we((e=>(e=>{const{dataPageID:t,context:n,headers:r,containerItemID:a}=e,s={data_view_ID:t},{restApi:o,reqType:i}=Mr("createDataObject",s),c=co(a);return De(Ou(o,{method:i,headers:r,body:{data:c.content}},a)).pipe(xe((t=>({response:t.data,actionInPayload:e}))),nh("Error ocurred during ajax call at createDataObject Epic",n))})(e))),we((async e=>{if(e&&e.type===on){const{payload:r}=e,a=fo({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r}=e,{containerItemID:a,isModalAction:s}=r,o=s?No.MODAL:No.PRIMARY,i={target:Sr(o,a),containerItemID:a,context:a};return n.push(dc(nc,i)),n})),xe((()=>(1===n.length&&Hs(n[0].type)?Ps.rejectActionByID(t):Ps.resolveActionByID(t),jc(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(Wp("VIEW_DATA_OBJECT"),rh(100),xe((e=>(({actionMgrID:t}=e.payload),e.payload))),we((e=>(e=>{const{dataLookUp:t,context:n,headers:r,viewName:a,requestPayload:s}=e,o={data_view_ID:t,view_ID:a},{restApi:i,reqType:c}=Mr("readDataObject",o);return De(Ou(i,{method:c,headers:r,body:{dataViewParameters:s}},n)).pipe(xe((t=>({response:t.data,actionInPayload:e}))),nh("Error ocurred during ajax call at getDataObjectView Epic",n))})(e))),we((async e=>{if(e&&e.type===on){const{payload:r}=e,a=fo({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r,response:a,headers:s={}}=e,{containerName:o}=r,i=Sr(o,r.context),c=yo(i,o,r.context),d={acName:i,context:c};await uo(a,r,d);const l=lo(a,{target:i,context:c,containerItemID:c,headers:s});return l.resourceType=st.RESOURCE_TYPES.DATA,l.resourceStatus=st.RESOURCE_STATUS.UPDATE,l.key=JSON.stringify(r.requestPayload),n.push(dc(zi,l)),n})),xe((()=>(1===n.length&&Hs(n[0].type)?Ps.rejectActionByID(t):Ps.resolveActionByID(t),jc(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Wp("UPDATE_DATA_OBJECT"),rh(100),qp((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:st.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return Ps.rejectActionByID(t,!0,e),Jp([])}return Jp(e.payload).pipe(we((e=>(e=>{const{dataPageID:t,context:n,headers:r,containerItemID:a,key:s}=e,o={data_view_ID:t},{restApi:i,reqType:c}=Mr("updateDataObject",o),d=co(a);return De(Ou(i,{method:c,headers:r,body:{data:{...d.content,...s},pageInstructions:d.pageInstructions||[]}},a)).pipe(xe((t=>({response:t.data,actionInPayload:e}))),nh("Error ocurred during ajax call at updateDataObject Epic",n))})(e))),we((async e=>{if(e&&e.type===on){const{payload:r}=e,a=fo({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r}=e,{containerItemID:a,isModalAction:s}=r,o=s?No.MODAL:No.PRIMARY,i={target:Sr(o,a),containerItemID:a,context:a};return n.push(dc(nc,i)),n})),xe((()=>(1===n.length&&Hs(n[0].type)?Ps.rejectActionByID(t):Ps.resolveActionByID(t),jc(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(Wp("DELETE_DATA_OBJECT"),rh(100),xe((e=>(({actionMgrID:t}=e.payload),e.payload))),we((e=>(e=>{const{dataViewName:t,context:n,dataViewParameters:r}=e,a={data_view_ID:t,dataViewParameters:encodeURIComponent(JSON.stringify(r))},{restApi:s,reqType:o}=Mr("deleteDataObject",a);return De(Ou(s,{method:o},n)).pipe(xe((t=>({response:t.data,actionInPayload:e}))),nh("Error ocurred during ajax call at deleteDataObject Epic",n))})(e))),we((async e=>{if(e&&e.type===on){const{payload:r}=e,a=fo({...e,...r,actionMgrID:t});return n.push(a),n}return[]})),xe((()=>(1===n.length&&Hs(n[0].type)?Ps.rejectActionByID(t):Ps.resolveActionByID(t),jc(n),n=[],n))))}],Dg=Ng,{RESOURCE_TYPES:{CASE:xg,DATA:wg}}=st;let Mg=[];const Lg={},jg=[e=>e.pipe(Wp(sn),Nh(200),xe((e=>e.payload)),we((e=>{const t=qr.getPreviewMode()&&Au.addDebugHeaders({debugId:dt.generateUniqueID()});Lg.dataContext=e.payload.dataViewName,Lg.dataContextParameters=e.payload.dataViewKeys;const{context:n,requestType:r,routeKey:a}=e;let{routeEndpoint:s}=e;s=s&&s.indexOf("viewType={viewType}")>0?s.replace("{viewType}","page"):s&&s.indexOf('viewType=""')>0?s.replace('viewType=""','viewType="page"'):s;const o=er()+s,i=e.options.context;let c;const d={},l=e?.payload?.caseClassName;if(Er.isRemoteCase(l)){const{RemoteSystemID:e}=Er.getRemoteCase(l);d.RemoteSystemID=e}if("POST"===r){let i;switch(c=e.payload,s.indexOf("viewType=")<0&&(s=`${s}?viewType=page`),$o(a)){case xg:i={caseTypeID:c.caseTypeID,processID:c.processID,content:{}};break;case wg:i=Lg;break;default:i=c}return De(Ou(o,{method:r,body:i,headers:{...d,...t}},n)).pipe(xe((t=>({response:{...t.data},payload:e,headers:io(t.headers)}))),nh(": Error ocurred during ajax call at historyEpic : ",e))}return De(Ou(o,{method:"GET",headers:{...d,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(xe((n=>({response:n.data,payload:e,headers:{...io(n.headers),...t}}))))})),we((async e=>{if(e&&e.type===on)return fo(e);const{headers:t={},response:n,payload:r}=e,a=ep(n,{[st.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),s=r.options.acName,o=Xo(s)&&Zo(s)?Go(s):e.payload.options.context,i=o;t.RemoteSystemID=r?.payload?.RemoteSystemID;const c={target:s,context:o,containerItemID:i,headers:t,debugInfo:{debugId:t[ot.COREHEADER_APP_DEBUG_ID]}},d=dt.getIn(a,ot.LOCALE_REFERENCES);await Xr.loadLocaleResources(d);const l=dt.getIn(a,ot.COMPONENTS);l&&await Cs(l),_s(a,r.options.actionConfig,!0);let u="";const p=r?.payload?.page;let h=r?.payload?.pageClass;r.payload&&r.payload.caseName&&r.payload.workID&&(u=xr(Tn,{caseName:e.payload.payload.caseName}),u=u&&u.replace("{workID}",e.payload.payload.workID)||"",h=r?.payload?.caseClassName),js.publish(st.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:s,pageName:p,pageClass:h});let f=lo(a,c);return f=((e,t,n)=>{if(e===ao.CASE){if(t?.caseInfo?.assignments){const{key:e,flowName:r}=ho(t.caseInfo.assignments[0].ID);n.key=e,n.flowName=r}else n.flowName="",n.key=t?.caseInfo?.ID||t.semanticURL;n.resourceType=e,n.semanticURL=t.semanticURL,n.caseViewMode=ot.REVIEW_MODE}else n.resourceType=e,n.semanticURL=t.semanticURL;return n})($o(e.payload.routeKey),{...n.data,semanticURL:u,caseViewMode:ot.REVIEW_MODE},f),Mg.push(go(s,f)),So(Mg),Mg})),xe((()=>(jc(Mg),Mg=[],Mg))),nh("Error occured"))],Ug=[e=>{let t=0,n=[];return e.pipe(Wp(qt),xe((e=>(({actionMgrID:t}=e.payload),e.payload))),we((e=>{const{context:t,skipSemanticUrl:n=!1,insightID:r}=e;let a="";n||(a=xr(vn,{insightID:"{insightID}"}),a=a.replace("{insightID}",r));const{restApi:s,reqType:o}=Mr(vn,{insightID:r});return De(Ou(s,{method:o},t)).pipe(xe((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}})),nh(": Error ocurred during ajax call at showPage Epic : ",e.context))})),we((async e=>{if(e&&e.type===on)return n.push(fo(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,a=Os.getTargetViewContainerName(Ht),s=Sr(a,t.context),o=yo(s,a,t.context),{response:i}=e,c=ep(i);c.directUrlUpdation=!r;const d={acName:s,context:o},l=!r,u=r;await uo(c,t,d,l,u);const p=lo(c,{target:s,context:o,containerItemID:o});p.resourceType=st.PAGE;const h=go(s,p);return n.push(h),So(n),n})),xe((()=>{Ps.resolveActionByID(t),jc(n),n=[]})),Pg())}],kg=[e=>{let t=0,n=[];return e.pipe(Wp(zt),xe((e=>(({actionMgrID:t}=e.payload),e.payload))),we((e=>{const{context:t,skipSemanticUrl:n=!1,dashboardID:r}=e;let a="";n||(a=xr(On,{dashboardID:r}),a=a.replace("{dashboardID}",r));const{restApi:s,reqType:o}=Mr(On,{dashboardID:r});return De(Ou(s,{method:o},t)).pipe(xe((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}})),nh(": Error ocurred during ajax call at showPage Epic : ",e.context))})),we((async e=>{if(e&&e.type===on)return n.push(fo(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,a=Os.getTargetViewContainerName(Ht),s=Sr(a,t.context),o=yo(s,a,t.context),{response:i}=e,c=ep(i);c.directUrlUpdation=!r;const d={acName:s,context:o},l=!r,u=r;await uo(c,t,d,l,u);const p=lo(c,{target:s,context:o,containerItemID:o});p.resourceType=st.PAGE;const h=go(s,p);return n.push(h)})),xe((()=>{Ps.resolveActionByID(t),jc(n),n=[]})),Pg())}],Fg=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 kf.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}(...Gf,...bg,...Tg,...jg,...Dg,...Hf,(e=>{let t=0;return e.pipe(Wp(kn),xe((e=>(({actionMgrID:t}=e.payload),e.payload))),xe((e=>{const n=Lc().getState(),r=Uf();return th()(n,r)&&t>0?Ps.resolveActionByID(t,{}):Ps.rejectActionByID(t),[]})),Pg())}),...Ug,...kg),Vg=e=>e.type||(e.messages&&e.messages[0].type)===st.MESSAGES.MESSAGES_TYPE_ERROR,Gg=e=>e=>t=>{const{type:n="",payload:r={}}=t||{},{category:a,property:s,pageReference:o,context:i,referenceList:c}=r;"HTTP"!==a&&n===jn&&Vg(r)?((e,t,n)=>{if(za[e]){const r=Ja(Xa(t,n)),a=Za(e,za[e].fieldOrder[r],r);a&&(a.isError=!0)}})(i,s,o):"HTTP"!==a&&n===Un&&Vg(r)&&void 0!==s?es(i,s,o):"HTTP"!==a&&-1!==[ln,En,un,_n].indexOf(n)?Qa(i):n===Bn&&es(i,s,c),e(t)},Bg={},Hg=e=>{const t=dt.getIn(Bg,[ot.CONTEXT,e],[]),n=[];t.forEach((t=>{const r=t.substr(0,t.lastIndexOf("_")),a=dt.getIn(Bg,[r,t],[]),s=a&&a.length>0&&a.indexOf(e);if(s>-1&&a.splice(s,1),!a||a&&0===a.length){dt.deleteIn(Bg,[r,t]);const e=dt.getIn(Bg,[r]);e&&0===Object.keys(e).length&&dt.deleteIn(Bg,[r]),n.push({dataPageName:r,dataPageNameWithHash:t})}})),dt.deleteIn(Bg,[ot.CONTEXT,e]);const r=dt.getIn(Bg,[ot.CONTEXT]);(!r||r&&0===Object.keys(r).length)&&dt.deleteIn(Bg,[ot.CONTEXT]),n.length>0&&jc(pc({dataPagesToBeRemoved:n}))},Wg=(e={},t)=>{Object.keys(e).forEach((n=>{const r=dt.getIn(e,[n],{});Object.keys(r).forEach((e=>{((e,t,n)=>{const r=dt.getIn(Bg,[ot.CONTEXT,n]);if(dt.getIn(Bg,[e])){const r=dt.getIn(Bg,[e,t],[]);dt.setIn(Bg,[e,t],[...new Set([...r,n])])}else dt.setIn(Bg,[e,t],[n]);r?dt.setIn(Bg,[ot.CONTEXT,n],[...new Set([...r,t])]):dt.setIn(Bg,[ot.CONTEXT,n],[t])})(n,e,t)}))}))},qg=e=>e=>t=>{const{payload:{data:n={},context:r,childContainersContexts:a=[]}={},type:s}=t;if(a&&a.length>0&&(s===_n||s===un)&&a.forEach((e=>{Hg(e)})),s===ln||s===rn||s===Vn){const e=s===Vn?n:n.shared;Wg(e,r)}else s===En||s===_n?(Hg(r),Wg(n.shared,r)):s===un&&Hg(r);e(t)},zg=class{static cleanCaches(e){Dc.purgeCascadeFields(e),Rc.removeContext(e),Rp.clearContextedCache(e),js.cleanContextSubscribers(e),Qa(e),Pp.clearContext(e),Ph.deRegisterForRefresh(e)}},Yg=e=>t=>n=>{const{type:r,payload:{target:a,containerItemID:s,context:o,childContainersContexts:i=[],containerInfo:{newAccessedOrder:c,containerType:d}={}}={}}=n,{PUB_SUB_EVENTS:l}=st;if(r===un){const{resourceType:t,key:n,context:r}=dt.getIn(e.getState(),["containers",a,"items",s])||{},o={resourceType:t,key:n,context:r,containerItemID:s};js.publish(l.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,o),a===`${st.APP.APP}/${ot.PRIMARY}`&&d===ot.CONTAINER_TYPE.MULTIPLE&&js.publish(l.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:n,newAccessedOrder:c})}i&&i.length>0&&(r===_n||r===un)&&i.forEach((e=>{zg.cleanCaches(e)})),r!==_n&&r!==un||zg.cleanCaches(o),t(n)},Kg=e=>e=>t=>{const{payload:{context:n}={},type:r}=t;!n||r!==ln&&r!==En&&r!==_n&&r!==un||(Ma(n),xa(n)),e(t)},Jg=function(e){void 0===e&&(e={});var t,n=new(0,z.constructor)(z.schedulerActionCtor),r=new pe,a=function(a){t=a;var s=new pe,o=new pe,i=s.asObservable().pipe(Te(n)),c=new Le(o.pipe(Te(n)),t.getState());return r.pipe(xe((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})),we((function(e){return De(e).pipe(Re(n),Te(n))}))).subscribe(t.dispatch),function(e){return function(n){var r=e(n);return o.next(t.getState()),s.next(n),r}}};return a.run=function(e){r.next(e)},a}(),Xg=e=>{const t=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||$;if(null!==Lc())Mh.resetStore();else{const n=S((e=>((e=>{const t=e.Data||e.data,{uiResources:n={}}=e,r=n[ot.CONTEXT_DATA]||e[ot.CONTEXT_DATA];jf={data:{[ot.APP.APP]:{...t,[ot.CONTEXT_DATA]:r}},containers:{}}})(e),function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var a=t[r];"function"==typeof e[a]&&(n[a]=e[a])}var s,o=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:A.INIT}))throw new Error(m(12));if(void 0===n(void 0,{type:A.PROBE_UNKNOWN_ACTION()}))throw new Error(m(13))}))}(n)}catch(e){s=e}return function(e,t){if(void 0===e&&(e={}),s)throw s;for(var r=!1,a={},i=0;i<o.length;i++){var c=o[i],d=n[c],l=e[c],u=d(l,t);if(void 0===u)throw t&&t.type,new Error(m(14));a[c]=u,r=r||u!==l}return(r=r||o.length!==Object.keys(e).length)?a:e}}({data:xf,containers:Lf})))(e),t(je.reduxBatch,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(m(15))},a={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},s=t.map((function(e){return e(a)}));return r=$.apply(void 0,s)(n.dispatch),y(y({},n),{},{dispatch:r})}}}(Is,Gg,qg,Kg,Jg,Yg),je.reduxBatch));Jg.run(Fg),Mc(n)}};Ba.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)`,a=`(${t}|\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|${n})*\\x22)`;return new RegExp(`^${a}(\\x2e${a})*\\x40${r}(\\x2e${r})*$`).test(e)}(e)&&(t=Xr.getLocaleValue("Invalid Email","Messages")),t})),Ba.register("integer",(e=>{let t=null;return e&&!/^(-)?\d+$/.test(e)&&(t=Xr.getLocaleValue("Invalid number","Messages")),t})),Ba.register("required",(e=>Array.isArray(e)&&0===e.length||null==e||""===e?Xr.getLocaleValue("Cannot be blank","Messages"):null)),Ba.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=Xr.getLocaleValue("Invalid URL","Messages")),t}));const Qg={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","60\\d{8}|(?:1\\d|[39])\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|31)"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:1[49]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","[56]94\\d{6}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}",[6,7,8,9,10,11]],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0",0,"(000[259]\\d{6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[0135-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","596\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","38\\d{6}|[78]\\d{9,13}|(?:20|9\\d)\\d{8}",[8,10,11,12,13,14],[["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["3"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|80\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-5]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|77|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?:305[3-9]|472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["305209\\d{4}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[6,7,8,9,10,11,12,13],[["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};var Zg={}.constructor;function ey(e){return null!=e&&e.constructor===Zg}function ty(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ny(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ry(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ay(e){var t,n,r,a=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,s=[],o=!0,i=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(s.push(r.value),4!==s.length);o=!0);}catch(e){i=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(i)throw a}}return s}}(e)||function(e,t){if(e){if("string"==typeof e)return ry(e,4);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ry(e,4):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Array.prototype.slice.call(e)),s=a[0],o=a[1],i=a[2],c=a[3];if("string"!=typeof s)throw new TypeError("A text for parsing must be a string.");if(t=s,o&&"string"!=typeof o){if(!ey(o))throw new Error("Invalid second argument: ".concat(o));i?(n=o,r=i):r=o}else c?(n=i,r=c):(n=void 0,r=i),o&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ty(Object(n),!0).forEach((function(t){ny(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ty(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({defaultCountry:o},n));return{text:t,options:n,metadata:r}}var sy="0-90-9٠-٩۰-۹",oy="".concat("-‐-―−ー-").concat("//").concat("..").concat("  ­​⁠ ").concat("()()[]\\[\\]").concat("~⁓∼~");function iy(e){return iy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iy(e)}function cy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dy(e){var t="function"==typeof Map?new Map:void 0;return dy=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return ly(e,arguments,hy(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),py(r,e)},dy(e)}function ly(e,t,n){return ly=uy()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&py(a,n.prototype),a},ly.apply(null,arguments)}function uy(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function py(e,t){return py=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},py(e,t)}function hy(e){return hy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},hy(e)}var fy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&py(e,t)}(r,e);var t,n=function(e){var t=uy();return function(){var n,r=hy(e);if(t){var a=hy(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===iy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return cy(e)}(this,n)}}(r);function r(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),t=n.call(this,e),Object.setPrototypeOf(cy(t),r.prototype),t.name=t.constructor.name,t}return t=r,Object.defineProperty(t,"prototype",{writable:!1}),t}(dy(Error));function gy(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),a=0;a<3;a++){var s=Number(n[a]),o=Number(r[a]);if(s>o)return 1;if(o>s)return-1;if(!isNaN(s)&&isNaN(o))return 1;if(isNaN(s)&&!isNaN(o))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}function yy(e){return yy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yy(e)}function my(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ey(e,t,n){return t&&Iy(e.prototype,t),n&&Iy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ay=" ext. ",_y=/^\d+$/,Sy=function(){function e(t){my(this,e),function(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!ey(e)||!ey(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(ey(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+Oy(e)+": "+e,"."))}(t),this.metadata=t,Ry.call(this,t)}return Ey(e,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter((function(e){return"001"!==e}))}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&_y.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new $y(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new $y(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}]),e}(),$y=function(){function e(t,n){my(this,e),this.globalMetadataObject=n,this.metadata=t,Ry.call(this,n.metadata)}return Ey(e,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this;return(this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[]).map((function(t){return new Cy(t,e)}))}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return!(this.types()&&0===this.types().length||!this.types())}},{key:"type",value:function(e){if(this.hasTypes()&&vy(this.types(),e))return new Py(vy(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?Ay:this.metadata[13]||Ay}}]),e}(),Cy=function(){function e(t,n){my(this,e),this._format=t,this.metadata=n}return Ey(e,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||by.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),e}(),by=/^\(?\$1\)?$/,Py=function(){function e(t,n){my(this,e),this.type=t,this.metadata=n}return Ey(e,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),e}();function vy(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}var Oy=function(e){return yy(e)};function Ty(e,t){if((t=new Sy(t)).hasCountry(e))return t.country(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function Ry(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===gy(t,"1.2.0")?this.v2=!0:-1===gy(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var Ny=function(e){return"([".concat(sy,"]{1,").concat(e,"})")};function Dy(e){var t="[  \\t,]*",n="[:\\..]?[  \\t,-]*",r="[  \\t]*";return";ext="+Ny("20")+"|"+t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+Ny("20")+"#?|"+t+"(?:[xx##~~]|int|int)"+n+Ny("9")+"#?|[- ]+"+Ny("6")+"#|"+r+"(?:,{2}|;)"+n+Ny("15")+"#?|"+r+"(?:,)+"+n+Ny("9")+"#?"}var xy="[++]{0,1}(?:["+oy+"]*["+sy+"]){3,}["+oy+sy+"]*",wy=new RegExp("^[++]{0,1}(?:["+oy+"]*["+sy+"]){1,2}$","i"),My=xy+"(?:"+Dy()+")?",Ly=new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^"+My+"$","i"),jy=new RegExp("(?:"+Dy()+")$","i"),Uy={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function ky(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fy(e){for(var t,n="",r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ky(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ky(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.split(""));!(t=r()).done;)n+=Vy(t.value,n)||"";return n}function Vy(e,t,n){return"+"===e?t?void("function"==typeof n&&n("end")):"+":function(e){return Uy[e]}(e)}function Gy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function By(e,t){return Hy(e,void 0,t)}function Hy(e,t,n){var r=n.type(t),a=r&&r.possibleLengths()||n.possibleLengths();if(!a)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===t){if(!n.type("FIXED_LINE"))return Hy(e,"MOBILE",n);var s=n.type("MOBILE");s&&(a=function(e,t){for(var n,r=e.slice(),a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Gy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gy(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t);!(n=a()).done;){var s=n.value;e.indexOf(s)<0&&r.push(s)}return r.sort((function(e,t){return e-t}))}(a,s.possibleLengths()))}else if(t&&!r)return"INVALID_LENGTH";var o=e.length,i=a[0];return i===o?"IS_POSSIBLE":i>o?"TOO_SHORT":a[a.length-1]<o?"TOO_LONG":a.indexOf(o,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function Wy(e,t){return"IS_POSSIBLE"===By(e,t)}function qy(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function zy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Yy=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Ky(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new Sy(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(qy(r,n.nationalNumberPattern())){if(Jy(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?Jy(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var a,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return zy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zy(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(Yy);!(a=s()).done;){var o=a.value;if(Jy(r,o,n))return o}}}}function Jy(e,t,n){return!(!(t=n.type(t))||!t.pattern())&&!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&qy(e,t.pattern())}var Xy=/(\$\d)/,Qy=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function Zy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function em(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?em(Object(n),!0).forEach((function(t){nm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):em(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rm={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function am(e,t,n,r,a){var s=function(e,t){for(var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Zy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zy(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(n=r()).done;){var a=n.value;if(a.leadingDigitsPatterns().length>0){var s=a.leadingDigitsPatterns()[a.leadingDigitsPatterns().length-1];if(0!==t.search(s))continue}if(qy(t,a.pattern()))return a}}(r.formats(),e);return s?function(e,t,n){var r=n.useInternationalFormat,a=n.withNationalPrefix,s=e.replace(new RegExp(t.pattern()),r?t.internationalFormat():a&&t.nationalPrefixFormattingRule()?t.format().replace(Xy,t.nationalPrefixFormattingRule()):t.format());return r?function(e){return e.replace(new RegExp("[".concat(oy,"]+"),"g")," ").trim()}(s):s}(e,s,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!s.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!a||!1!==a.nationalPrefix,carrierCode:t,metadata:r}):e}function sm(e,t,n,r){return t?r(e,t,n):e}function om(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function im(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?om(Object(n),!0).forEach((function(t){cm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):om(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dm=function(){function e(t,n,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new TypeError("`country` or `countryCallingCode` not passed");if(!n)throw new TypeError("`nationalNumber` not passed");if(!r)throw new TypeError("`metadata` not passed");var a=function(e,t){var n,r,a=new Sy(t);return lm(e)?(n=e,a.selectNumberingPlan(n),r=a.countryCallingCode()):r=e,{country:n,countryCallingCode:r}}(t,r),s=a.country,o=a.countryCallingCode;this.country=s,this.countryCallingCode=o,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}}var t,n;return t=e,(n=[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:function(e,t,n){var r=new Sy(n).getCountryCodesForCallingCode(e);return r?r.filter((function(e){return function(e,t,n){var r=new Sy(n);return r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0}(t,e,n)})):[]}(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new Sy(n),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.country(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return Wy(e.phone||e.nationalNumber,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return e=this,t={v2:!0},n=this.getMetadata(),t=t||{},(n=new Sy(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==Ky(e,t,n.metadata):qy(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern());var e,t,n}},{key:"isNonGeographic",value:function(){return new Sy(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return Ky(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return function(e,t,n,r){if(n=n?tm(tm({},rm),n):rm,r=new Sy(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.country(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var a,s=r.countryCallingCode(),o=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return o?sm(a=am(o,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return o?(a=am(o,null,"INTERNATIONAL",r,n),sm(a="+".concat(s," ").concat(a),e.ext,r,n.formatExtension)):"+".concat(s);case"E.164":return"+".concat(s).concat(o);case"RFC3966":return function(e){var t=e.number,n=e.ext;if(!t)return"";if("+"!==t[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(n?";ext="+n:"")}({number:"+".concat(s).concat(o),ext:e.ext});case"IDD":if(!n.fromCountry)return;var i=function(e,t,n,r,a){if(Ty(r,a.metadata)===n){var s=am(e,t,"NATIONAL",a);return"1"===n?n+" "+s:s}var o=function(e,t,n){var r=new Sy(n);return r.selectNumberingPlan(e,void 0),r.defaultIDDPrefix()?r.defaultIDDPrefix():Qy.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,0,a.metadata);if(o)return"".concat(o," ").concat(n," ").concat(am(e,null,"INTERNATIONAL",a))}(o,e.carrierCode,s,n.fromCountry,r);return sm(i,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}(this,e,t?im(im({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),lm=function(e){return/^[A-Z]{2}$/.test(e)},um=new RegExp("(["+sy+"])");function pm(e,t){var n=function(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var a,s,o,i=r.length-1,c=i>0&&r[i];if(t.nationalPrefixTransformRule()&&c)a=e.replace(n,t.nationalPrefixTransformRule()),i>1&&(s=r[1]);else{var d=r[0];a=e.slice(d.length),c&&(s=r[1])}if(c){var l=e.indexOf(r[1]);e.slice(0,l)===t.numberingPlan.nationalPrefix()&&(o=t.numberingPlan.nationalPrefix())}else o=r[0];return{nationalNumber:a,nationalPrefix:o,carrierCode:s}}}return{nationalNumber:e}}(e,t),r=n.carrierCode,a=n.nationalNumber;if(a!==e){if(!function(e,t,n){return!(qy(e,n.nationalNumberPattern())&&!qy(t,n.nationalNumberPattern()))}(e,a,t))return{nationalNumber:e};if(t.possibleLengths()&&!function(e,t){switch(By(e,t)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(a,t))return{nationalNumber:e}}return{nationalNumber:a,carrierCode:r}}function hm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var fm="(["+sy+"]|[\\-\\.\\(\\)]?)",gm=new RegExp("^\\+"+fm+"*["+sy+"]"+fm+"*$","g"),ym=new RegExp("^(["+sy+"]+((\\-)*["+sy+"])*\\.)*[a-zA-Z]+((\\-)*["+sy+"])*\\.?$","g"),mm="tel:",Im=";phone-context=",Em=new RegExp("[++"+sy+"]"),Am=new RegExp("[^"+sy+"#]+$");function _m(e,t,n){if(t=t||{},n=new Sy(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new fy("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=function(e,t){var n,r=t.extractFormattedPhoneNumber,a=function(e){var t=e.indexOf(Im);if(t<0)return null;var n=t+Im.length;if(n>=e.length)return"";var r=e.indexOf(";",n);return r>=0?e.substring(n,r):e.substring(n)}(e);if(!function(e){return null===e||0!==e.length&&(gm.test(e)||ym.test(e))}(a))throw new fy("NOT_A_NUMBER");if(null===a)n=r(e)||"";else{n="","+"===a.charAt(0)&&(n+=a);var s,o=e.indexOf(mm);s=o>=0?o+mm.length:0;var i=e.indexOf(Im);n+=e.substring(s,i)}var c=n.indexOf(";isub=");if(c>0&&(n=n.substring(0,c)),""!==n)return n}(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(e)if(e.length>250){if(n)throw new fy("TOO_LONG")}else{if(!1===t)return e;var r=e.search(Em);if(!(r<0))return e.slice(r).replace(Am,"")}}(e,n,t)}});if(!r)return{};if(!function(e){return e.length>=2&&Ly.test(e)}(r))return function(e){return wy.test(e)}(r)?{error:"TOO_SHORT"}:{};var a=function(e){var t=e.search(jy);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(jy),a=1;a<r.length;){if(r[a])return{number:n,ext:r[a]};a++}}(r);return a.ext?a:{number:r}}(e,t.v2,t.extract),a=r.number,s=r.ext,o=r.error;if(!a){if(t.v2){if("TOO_SHORT"===o)throw new fy("TOO_SHORT");throw new fy("NOT_A_NUMBER")}return{}}var i=function(e,t,n,r){var a,s=function(e,t,n,r){if(!e)return{};var a;if("+"!==e[0]){var s=function(e,t,n,r){if(t){var a=new Sy(r);a.selectNumberingPlan(t,n);var s=new RegExp(a.IDDPrefix());if(0===e.search(s)){var o=(e=e.slice(e.match(s)[0].length)).match(um);if(!(o&&null!=o[1]&&o[1].length>0&&"0"===o[1]))return e}}}(e,t,n,r);if(!s||s===e){if(t||n){var o=function(e,t,n,r){var a=t?Ty(t,r):n;if(0===e.indexOf(a)){(r=new Sy(r)).selectNumberingPlan(t,n);var s=e.slice(a.length),o=pm(s,r).nationalNumber,i=pm(e,r).nationalNumber;if(!qy(i,r.nationalNumberPattern())&&qy(o,r.nationalNumberPattern())||"TOO_LONG"===By(i,r))return{countryCallingCode:a,number:s}}return{number:e}}(e,t,n,r),i=o.countryCallingCode,c=o.number;if(i)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:i,number:c}}return{number:e}}a=!0,e="+"+s}if("0"===e[1])return{};r=new Sy(r);for(var d=2;d-1<=3&&d<=e.length;){var l=e.slice(1,d);if(r.hasCallingCode(l))return r.selectNumberingPlan(l),{countryCallingCodeSource:a?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:l,number:e.slice(d)};d++}return{}}(Fy(e),t,n,r.metadata),o=s.countryCallingCodeSource,i=s.countryCallingCode,c=s.number;if(i)r.selectNumberingPlan(i);else{if(!c||!t&&!n)return{};r.selectNumberingPlan(t,n),!!t&&(a=t),i=n||Ty(t,r.metadata)}if(!c)return{countryCallingCodeSource:o,countryCallingCode:i};var d=pm(Fy(c),r),l=d.nationalNumber,u=d.carrierCode,p=function(e,t){var n=t.nationalNumber,r=t.defaultCountry,a=t.metadata,s=a.getCountryCodesForCallingCode(e);return s?1===s.length?s[0]:function(e,t){var n=t.countries,r=t.metadata;r=new Sy(r);for(var a,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return hm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hm(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n);!(a=s()).done;){var o=a.value;if(r.country(o),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return o}else if(Ky({phone:e,country:o},void 0,r.metadata))return o}}(n,{countries:s,defaultCountry:r,metadata:a.metadata}):void 0}(i,{nationalNumber:l,defaultCountry:t,metadata:r});return p&&(a=p,"001"===p||r.country(a)),{country:a,countryCallingCode:i,countryCallingCodeSource:o,nationalNumber:l,carrierCode:u}}(a,t.defaultCountry,t.defaultCallingCode,n),c=i.country,d=i.nationalNumber,l=i.countryCallingCode,u=i.countryCallingCodeSource,p=i.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new fy("INVALID_COUNTRY");return{}}if(!d||d.length<2){if(t.v2)throw new fy("TOO_SHORT");return{}}if(d.length>17){if(t.v2)throw new fy("TOO_LONG");return{}}if(t.v2){var h=new dm(l,d,n.metadata);return c&&(h.country=c),p&&(h.carrierCode=p),s&&(h.ext=s),h.__countryCallingCodeSource=u,h}var f=!!(t.extended?n.hasSelectedNumberingPlan():c)&&qy(d,n.nationalNumberPattern());return t.extended?{country:c,countryCallingCode:l,carrierCode:p,valid:f,possible:!!f||!(!0!==t.extended||!n.possibleLengths()||!Wy(d,n)),phone:d,ext:s}:f?function(e,t,n){var r={country:e,phone:t};return n&&(r.ext=n),r}(c,d,s):{}}function Sm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sm(Object(n),!0).forEach((function(t){Cm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Cm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bm(Object(n),!0).forEach((function(t){vm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Om(e,t,n){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,n)&&(t=Pm(Pm({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return _m(e,$m($m({},t),{},{v2:!0}),n)}(e,t,n)}catch(e){if(!(e instanceof fy))throw e}}function Tm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tm(Object(n),!0).forEach((function(t){Nm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Nm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dm(){var e=ay(arguments),t=e.text,n=e.options,r=e.metadata,a=Om(t,n=Rm(Rm({},n),{},{extract:!1}),r);return a&&a.isPossible()||!1}Ba.register("phone",(e=>{let t=null;e&&!/^\+?\d+$/.test(e)&&(t=Xr.getLocaleValue("Invalid Phone","Messages"));const n=/^\+/.test(e);return e&&n&&(function(){return function(e,t){var n=Array.prototype.slice.call(t);return n.push(Qg),e.apply(this,n)}(Dm,arguments)}(e)||(t=Xr.getLocaleValue("Invalid Phone","Messages"))),t}));const xm=(e,t)=>{switch(t){case"invalid":return Xr.getLocaleValue(`Incorrect ${e}`,"Messages");case"incomplete":return Xr.getLocaleValue(`Incomplete ${e}`,"Messages");default:return null}};Ba.register("datetime",(e=>xm("DateTime",e))),Ba.register("date",(e=>xm("Date",e))),Ba.register("time",(e=>xm("Time",e))),Ut.registerHandler("@L",((e,t)=>t.getLocalizedValue(e))),Ut.registerHandler("@P",((e,t)=>t.getValue(e))),Ut.registerHandler("@E",((e,t)=>{try{const n=ya(e),r=ma(n);return Ia(r,t)}catch(e){}return!0})),Ut.registerHandler("@W",((e,t)=>{const n=t.getContextDataValue(`.${ot.SUMMARY_OF_WHEN_CONDITIONS}.${e}`);return!0===n||"true"===n})),Ut.registerHandler("@ASSOCIATED",((e,t)=>{let n={};const r=[];let a="",s="";const o=t.getPageReference();if(e.startsWith(".")){a=`${o}.${e.substring(1)}`;const r=e?e.split(".").filter((e=>!!e)):[];r.length>1&&(r.pop(),s=r.join(".")),n=t.getFieldMetadata(e.substring(1))}else n=t.getFieldMetadata(e),a=e;const i=n?.datasource?.tableType,c=n?.datasource?.mode===ot.READONLY,d=n?.datasource?.name||"",l=t.getComponentConfig();if(l&&l.deferDatasource)return l.datasourceMetadata=`@FIELD_META ${e}`,t.setStateProps({datasourceMetadata:l.datasourceMetadata}),i!==ot.DATA_PAGE?n?.datasource?.records:null;if(i!==ot.DATA_PAGE)return n?.datasource?.records;const u=kt.getPropertyName(n?.datasource?.propertyForDisplayText),p=kt.getPropertyName(n?.datasource?.propertyForValue),h=Array.isArray(n?.datasource?.parameters)?n?.datasource?.parameters:[],f=t.getContextName(),g=[];if(h.forEach((e=>{if(kt.isProperty(e?.value)){let t=Vc(`.${dt.getFullPropertyReference([s,kt.getPropertyName(e.value)])}`,o,f);g.push(dt.getFullPropertyReference([o,s,kt.getPropertyName(e?.value)])),null!=t&&""!==t||(t=ot.NULL_STRING),r.push(t)}else r.push(e?.value||ot.NULL_STRING)})),f){const e=ba.getContextObjectByName(f)||{};g.forEach((t=>{if(t in e){const n=e[t];e[t]=[...new Set([...n,a])]}else e[t]=[a]})),ba.addContextName(f,e)}const y=function(e,t,n,r){let a="",s=n;if(t.join(ot.HASH_DELIMITER)&&(a=dt.getHashedString(t.join(ot.HASH_DELIMITER)),s=n+ot.UNDERSCORE_STRING+a),r){const e=kc(),t=e?e[n]?.[s]:{};return Array.isArray(t?.pxResults)?t.pxResults:[]}const o=e.getDataObject()[n][s];return Array.isArray(o?.pxResults)?o.pxResults:[]}(t,r,d,c);return y.map((e=>({key:e[p]||e[`.${p}`],value:e[u]||e[`.${u}`]})))})),Ut.registerHandler("@ROUTING_INFO",((e,t)=>$r(t.getContainerName(),t.getContextName()))),Ut.registerHandler("@ENV",((e,t)=>{switch(e){case ot.ENV_INFO_KEYS.APPLICATION_NAME:return zr.getApplicationName();case ot.ENV_INFO_KEYS.ACCESS_GROUP:return zr.getAccessGroup();case ot.ENV_INFO_KEYS.USER_NAME:return zr.getOperatorName();case ot.ENV_INFO_KEYS.USER_ID:return zr.getOperatorIdentifier();case ot.ENV_INFO_KEYS.APPLICATION_DESC:return t.getLocalizedValue(zr.getApplicationLabel());case ot.ENV_INFO_KEYS.USER_IMAGE:return zr.getOperatorImageInsKey();case ot.ENV_INFO_KEYS.LOCALE:return zr.getUseLocale();case ot.ENV_INFO_KEYS.TIMEZONE:return zr.getTimeZone();case ot.ENV_INFO_KEYS.WORK_GROUP:return zr.getOperatorWorkGroup();default:return e}})),Ut.registerHandler("@DATASOURCE",((e,t)=>{const n=t.getValue(e)||[],r=t.getComponentConfig(),a=Object.keys(r).find((t=>r[t]?.source?.includes(e)));if(a){const{fields:e,copyAll:t}=r[a],s=[];return n.forEach((n=>{const r={};t?Object.keys(n).forEach((e=>{const t=kt.getPropertyName(e);r[t]=n[t]})):Object.keys(e).forEach((t=>{const a=kt.getPropertyName(e[t]);r[t]=n[a]})),s.push(r)})),s}return[]})),Ut.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 a="";const s=e.split(".").filter((e=>!!e));if(s.length>1&&(s.pop(),a=`.${s.join(".")}`),Array.isArray(r.datasource.parameters)){const e=[];r.datasource.parameters.forEach((n=>{const r={},{name:s,value:o}=n;r.name=s,"string"==typeof o&&o.startsWith("@P")?r.value=`@P ${a}${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})),Ut.registerHandler("@USER",((e,t)=>{const n=t.getValue(e),r=t.getReferencedUser(n);return{userId:n,userName:r?r.UserName:null}})),Ut.registerHandler("@ACTIVE_CASES",((e,t)=>oh.getOpenedCaseItems(`${t.getContextName()}/${t.getContainerName()}`))),Ut.registerHandler("@LR",(e=>e)),Ut.registerHandler("@CASE",((e,t)=>e===ot.ID?t.getCaseInfo().getKey():e)),Ut.registerHandler("@SHARED",(e=>dh.getSharedState(e)));const wm=new DOMParser;let Mm;const Lm=e=>{if(e){let t=wm.parseFromString(e,"text/html").getElementsByTagName("pega-reference")[0].getAttribute("data-rule-id");if(t=t.replace(/[^a-zA-Z.]+/g,""),t){const e=Mm.getValue(t);return Mm.registerAdditionalProps({[t]:`@P ${t}`}),e}}};Ut.registerHandler("@PARAGRAPH",((e,t)=>{const n=t.getLocalizedParagraphValue(e);return n?((e,t)=>((e,t)=>{Mm=t;const n=e.replace(/<pega-reference(.*?)<\/pega-reference>/g,Lm);return/^(<p>)\s*(<\/p>)$/.test(n)?null:n})(e,t))(n,t):null})),Ut.registerHandler("@FILTERED_LIST",((e,t)=>{const n=e.substring(1,e.indexOf("[")),r=e.substring(e.indexOf("]")+2),a=e.substring(e.indexOf("[")+1,e.indexOf("]")),{useCustomContext:s}=t;let o;return dt.isEmpty(s)?o=t.getValue(`.${n}`):(o=s,o=dt.getIn(o,n)),o&&r.length>0?(a&&(o=o.filter((e=>Ea(a,e)))),o.map((e=>dt.getIn(e,r)))):null})),Ut.registerHandler("@ADDRESS",((e,t)=>{const n=t.getValue(e)?.pyCountry;return n?`pyAddressForm_${n}`:"pyAddressForm"})),Ut.registerHandler("@DATATYPE",((e,t)=>t.getValue(e)));const jm=e=>Ih(e),Um=()=>t,km=()=>a,Fm=()=>jt,Vm=()=>d,Gm=()=>c,Bm=()=>o,Hm=()=>Mi,Wm=()=>wi,qm=async(e,t,n)=>{const r=ep(e),{data:a,uiResources:s={}}=e,o=dt.getIn(s,ot.CONTEXT_DATA);await uo(r,{},{},!1,!0);const i={...a,[ot.CONTEXT_DATA]:o},{root:c}=s;Mh.getContainerUtils().addRootContainerItem(c,t,i,n)},zm=(e,t,n)=>{Ou(e,{method:"GET"},ot.APP.ROOT).then((async e=>{const{data:r,status:a}=e;200===a&&qm(r,t,n)}))},Ym=async(e,t,n)=>Cs(n).then((()=>{const n=jm({meta:e,isRoot:!0});Lc()||Xg({}),js.publish(st.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:n,domContainerID:t})})),Km=(e,t,n)=>{Kr.initServer(e,t,n)},Jm=async(e,t,n=[])=>{Qn();const r=ep(e),a=dt.getIn(r,ot.VIEWS),s=dt.getIn(r,ot.NAVIGATIONS),o=dt.getIn(r,ot.COMPONENTS)||[];o.push(...n);const i=dt.getIn(r,ot.STATIC_SERVER_URL),c=dt.getIn(r,ot.APPLICATION_DATA);a&&St(a),s&&$t(s),(e=>{e&&(Tr=e.pyLabel)})(c),i&&Kr.initServer(i),await Cs(o,i).then((()=>((e,t)=>{const n={context:ot.APP.APP},r={...dt.getIn(e,ot.ROOT),options:n};Xg(e),_s(e,n,!0);const a=jm({meta:r,isRoot:!0});js.publish(st.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:a,domContainerID:t})})(r,t)))},Xm=(e,t,n)=>{Hr(e),Os.buildActionTargetMap(t),Qn(n)},Qm=(e,t)=>{Hr(e,!0),Qn(t)},Zm=e=>{Kr.setAppAlias(e)},eI=e=>{const{restApi:t}=wr("home",{portalName:e});return er()+t},tI=(e,t)=>{const{restApi:n}=((e,t)=>{let n={restApi:""};try{if(Br()&&!t){const t=mr(),r=_r.processUrl(t,!0),a=_r._getMatchedRouteInRoutingTable(r),s=_r.getRoutingInfo(),o=_r.processUrl(t,!1).split("/"),i=o[o.length-1];let{caseID:c}=s.routes[a].payload;c=c.replace("{workID}",i),n=_r.getRestEndPoint("loadView",{caseID:c,viewID:e})}else n=_r.getRestEndPoint("showView",{page:e,pageClass:t})}catch(e){}return n})(e,t);return er()+n},nI=async(e,t,n=[],r,a,s)=>{const{config:{name:o}={}}=t;Lc()||Xg({}),s&&(Mh.getContainerUtils().removeContainer(`${ot.APP.ROOT}/${o}`),Mh.getContainerUtils().getContainerAPI().deleteContainerItem(`${ot.APP.ROOT}/${o}`)),Mh.getContainerUtils().getContainerAPI().getContainerItems()?.length>1&&!o?.startsWith("hybrid_")&&"authoring-preview"!==o&&Mh.resetStore(),jc(ki({data:{},context:ot.APP.ROOT}));const i=jm({meta:t,options:{context:ot.APP.ROOT,pageReference:"",target:`${ot.APP.ROOT}/${o}`}}),c=i.getPConnect(),d=c.getContextName(),l=c.getContainerName(),u=c.getContainerManager(),p=`${d}/${l}`;Mh.getContainerUtils().getActiveContainerItemName(p)||"noPortal"===t.config.renderingMode||u.initializeContainers({type:"single"});const h=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference",...n];return Cs(h).then((()=>{js.publish(st.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:i,domContainerID:e,componentName:"RootContainer",portalTarget:r,styleSheetTarget:a})}))},rI=(e,t,n,r)=>{let a=tI(e,n);a===er()&&(a=eI(t)),zm(a,r)},aI=(e,t)=>{const n=eI(e);zm(n,t,!0)},sI=e=>{(e=>{const{acName:t,context:n,defaultViewLabel:r}=e,a=(e=>{const t=_r.getRoutingInfo(),n=e.split(" ").join(""),r=e.split(" ").join("-").toLowerCase(),a=(e=>{const t=e.replace(/(?=[A-Z][a-z])/g,"-").toLowerCase();return t.startsWith("-")?t.substring(1):t})(e);return t.routes[n]?n:t.routes[r]?r:t.routes[a]?a:e})(r);(e=>{Or=e})(a),_r.setDefaultRoute(a);const s=sr(t,n),o=Sr(t,n),i={historyAction:br,pxURLPath:""};let d;const l={acName:o,context:s,actionConfig:{context:s}};if(Br()){const e=(e=>{if(e.indexOf("?")>0){const[t,n]=e.split("?"),r=new URLSearchParams(n),a=new Map;for(const[e,t]of r)"portal"!==e&&"noPortal"!==e&&a.set(e,t);const s=new URLSearchParams(a).toString();return s?`${t}?${s}`:t}return e})(gr(window.location.pathname+window.location.search));d=_r.getEndPointInfo(e),i.pxURLPath=d.urlPath,void 0!==d.payload?.pageClass&&(d.payload.pageClass=Lc()?.getState()?.data?.app?.pyPortal?.classID);const t={},n="showHistory";t.routeEndpoint=d.routeEndpoint,t.requestType=d.requestType,t.payload=d.payload,t.options=l,t.routeKey=d.routeKey,jc(c[n](Vr(t)))}else d=_r.getEndPointInfo(Or),i.pxURLPath="";Ur(null,!0,{urlPathObjParam:i,infoParam:d,optionsParam:l})})(e)},oI=()=>Br(),iI=e=>{js.subscribe(st.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")},cI=e=>{Va.updateFieldDefaults(e)},dI=e=>{tr(e)},lI=e=>{xu(e)},uI=e=>{wu(e)},pI=()=>oh,hI=()=>Sh,fI=e=>{Nr(e)},gI=()=>Xg({})})();var a=r.v9,s=r.DP,o=r.RE,i=r.WM,c=r.gm,d=r.Yw,l=r.e6,u=r.sd,p=r.No,h=r.DF,f=r.FC,g=r.kU,y=r.gu,m=r.LF,I=r.vg,E=r.jK,A=r.Dw,_=r.x0,S=r.HW,$=r.N2,C=r.yC,b=r.gn,P=r.JP,O=r.fV,v=r.Hk,T=r.K5,R=r.P6,N=r.r_,D=r.r7,x=r.gA,w=r.V5,M=r.d0,L=r.JR;export{a as PCoreInstance,s as checkIfSemanticURL,o as configureForBrowserBookmark,i as createC11nEnv,c as enableAppRouting,d as getActionCreators,l as getActionHandler,u as getActionProcessor,p as getCaseApi,h as getComponentsRegistry,f as getContextUtils,g as getHomeRestApi,y as getMashupApi,m as getRoutingManager,I as getStateManager,E as getStreamObservable,A as getViewRestApi,_ as initAppShell,S as initRoutingTable,$ as initStore,C as loadComponent,b as loadPortalView,P as loadRootComponent,O as loadView,v as loadViewByName,T as onPCoreReady,R as setAppAlias,N as setFetchAuthInfo,D as setFetchDefaultHeaders,x as setFieldsDefaultConfigs,w as setGoogleMapsAPIKey,M as setStaticServerUrl,L as updateStoreWithUiRoot};