@egovernments/digit-ui-module-core 2.0.0-rc19-02 → 2.0.0-rc19-05
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -9
- package/dist/main.js +0 -3
- package/dist/main.js.LICENSE.txt +0 -26
- package/dist/main.js.map +0 -1
package/dist/main.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see main.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@egovernments/digit-ui-components"),require("react"),require("react-i18next"),require("@tanstack/react-query"),require("react-redux"),require("react-router-dom"),require("@egovernments/digit-ui-react-components"),require("@egovernments/digit-ui-svg-components"),require("redux"),require("redux-thunk")):"function"==typeof define&&define.amd?define(["@egovernments/digit-ui-components","react","react-i18next","@tanstack/react-query","react-redux","react-router-dom","@egovernments/digit-ui-react-components","@egovernments/digit-ui-svg-components","redux","redux-thunk"],t):"object"==typeof exports?exports["@egovernments/digit-ui-module-core"]=t(require("@egovernments/digit-ui-components"),require("react"),require("react-i18next"),require("@tanstack/react-query"),require("react-redux"),require("react-router-dom"),require("@egovernments/digit-ui-react-components"),require("@egovernments/digit-ui-svg-components"),require("redux"),require("redux-thunk")):e["@egovernments/digit-ui-module-core"]=t(e["@egovernments/digit-ui-components"],e.React,e["react-i18next"],e["@tanstack/react-query"],e["react-redux"],e["react-router-dom"],e["@egovernments/digit-ui-react-components"],e["@egovernments/digit-ui-svg-components"],e.redux,e["redux-thunk"])}(this,(e,t,n,r,o,i,a,l,u,s)=>(()=>{var c={34:(e,t,n)=>{"use strict";var r=n(4901);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},81:(e,t,n)=>{"use strict";var r=n(9565),o=n(9306),i=n(8551),a=n(6823),l=n(851),u=TypeError;e.exports=function(e,t){var n=arguments.length<2?l(e):t;if(o(n))return i(r(n,e));throw new u(a(e)+" is not iterable")}},113:(e,t,n)=>{"use strict";var r=n(6518),o=n(9213).find,i=n(6469),a="find",l=!0;a in[]&&Array(1)[a](function(){l=!1}),r({target:"Array",proto:!0,forced:l},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i(a)},235:(e,t,n)=>{"use strict";var r=n(9213).forEach,o=n(4598)("forEach");e.exports=o?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},280:(e,t,n)=>{"use strict";var r=n(6518),o=n(7751),i=n(6395),a=n(550),l=n(916).CONSTRUCTOR,u=n(3438),s=o("Promise"),c=i&&!l;r({target:"Promise",stat:!0,forced:i||l},{resolve:function(e){return u(c&&this===s?a:this,e)}})},283:(e,t,n)=>{"use strict";var r=n(9504),o=n(9039),i=n(4901),a=n(9297),l=n(3724),u=n(350).CONFIGURABLE,s=n(3706),c=n(1181),d=c.enforce,f=c.get,v=String,p=Object.defineProperty,m=r("".slice),y=r("".replace),g=r([].join),b=l&&!o(function(){return 8!==p(function(){},"length",{value:8}).length}),h=String(String).split("String"),O=e.exports=function(e,t,n){"Symbol("===m(v(t),0,7)&&(t="["+y(v(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!a(e,"name")||u&&e.name!==t)&&(l?p(e,"name",{value:t,configurable:!0}):e.name=t),b&&n&&a(n,"arity")&&e.length!==n.arity&&p(e,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?l&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=d(e);return a(r,"source")||(r.source=g(h,"string"==typeof t?t:"")),e};Function.prototype.toString=O(function(){return i(this)&&f(this).source||s(this)},"toString")},287:(e,t,n)=>{"use strict";n(6518)({target:"Object",stat:!0},{setPrototypeOf:n(2967)})},298:(e,t,n)=>{"use strict";var r=n(2195),o=n(5397),i=n(8480).f,a=n(7680),l="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return l&&"Window"===r(e)?function(e){try{return i(e)}catch(e){return a(l)}}(e):i(o(e))}},338:e=>{"use strict";e.exports=l},350:(e,t,n)=>{"use strict";var r=n(3724),o=n(9297),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,l=o(i,"name"),u=l&&"something"===function(){}.name,s=l&&(!r||r&&a(i,"name").configurable);e.exports={EXISTS:l,PROPER:u,CONFIGURABLE:s}},397:(e,t,n)=>{"use strict";var r=n(7751);e.exports=r("document","documentElement")},421:e=>{"use strict";e.exports={}},436:(e,t,n)=>{"use strict";var r,o,i,a,l=n(6518),u=n(6395),s=n(6193),c=n(4576),d=n(9167),f=n(9565),v=n(6840),p=n(2967),m=n(687),y=n(7633),g=n(9306),b=n(4901),h=n(34),O=n(679),S=n(2293),x=n(9225).set,j=n(1955),w=n(3138),E=n(1103),C=n(8265),_=n(1181),N=n(550),I=n(916),A=n(6043),D="Promise",T=I.CONSTRUCTOR,P=I.REJECTION_EVENT,L=I.SUBCLASSING,R=_.getterFor(D),k=_.set,M=N&&N.prototype,U=N,B=M,F=c.TypeError,G=c.document,V=c.process,H=A.f,W=H,z=!!(G&&G.createEvent&&c.dispatchEvent),X="unhandledrejection",q=function(e){var t;return!(!h(e)||!b(t=e.then))&&t},Q=function(e,t){var n,r,o,i=t.value,a=1===t.state,l=a?e.ok:e.fail,u=e.resolve,s=e.reject,c=e.domain;try{l?(a||(2===t.rejection&&$(t),t.rejection=1),!0===l?n=i:(c&&c.enter(),n=l(i),c&&(c.exit(),o=!0)),n===e.promise?s(new F("Promise-chain cycle")):(r=q(n))?f(r,n,u,s):u(n)):s(i)}catch(e){c&&!o&&c.exit(),s(e)}},Z=function(e,t){e.notified||(e.notified=!0,j(function(){for(var n,r=e.reactions;n=r.get();)Q(n,e);e.notified=!1,t&&!e.rejection&&K(e)}))},Y=function(e,t,n){var r,o;z?((r=G.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),c.dispatchEvent(r)):r={promise:t,reason:n},!P&&(o=c["on"+e])?o(r):e===X&&w("Unhandled promise rejection",n)},K=function(e){f(x,c,function(){var t,n=e.facade,r=e.value;if(J(e)&&(t=E(function(){s?V.emit("unhandledRejection",r,n):Y(X,n,r)}),e.rejection=s||J(e)?2:1,t.error))throw t.value})},J=function(e){return 1!==e.rejection&&!e.parent},$=function(e){f(x,c,function(){var t=e.facade;s?V.emit("rejectionHandled",t):Y("rejectionhandled",t,e.value)})},ee=function(e,t,n){return function(r){e(t,r,n)}},te=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Z(e,!0))},ne=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new F("Promise can't be resolved itself");var r=q(t);r?j(function(){var n={done:!1};try{f(r,t,ee(ne,n,e),ee(te,n,e))}catch(t){te(n,t,e)}}):(e.value=t,e.state=1,Z(e,!1))}catch(t){te({done:!1},t,e)}}};if(T&&(B=(U=function(e){O(this,B),g(e),f(r,this);var t=R(this);try{e(ee(ne,t),ee(te,t))}catch(e){te(t,e)}}).prototype,(r=function(e){k(this,{type:D,done:!1,notified:!1,parent:!1,reactions:new C,rejection:!1,state:0,value:null})}).prototype=v(B,"then",function(e,t){var n=R(this),r=H(S(this,U));return n.parent=!0,r.ok=!b(e)||e,r.fail=b(t)&&t,r.domain=s?V.domain:void 0,0===n.state?n.reactions.add(r):j(function(){Q(r,n)}),r.promise}),o=function(){var e=new r,t=R(e);this.promise=e,this.resolve=ee(ne,t),this.reject=ee(te,t)},A.f=H=function(e){return e===U||e===i?new o(e):W(e)},!u&&b(N)&&M!==Object.prototype)){a=M.then,L||v(M,"then",function(e,t){var n=this;return new U(function(e,t){f(a,n,e,t)}).then(e,t)},{unsafe:!0});try{delete M.constructor}catch(e){}p&&p(M,B)}l({global:!0,constructor:!0,wrap:!0,forced:T},{Promise:U}),i=d.Promise,m(U,D,!1,!0),y(D)},511:(e,t,n)=>{"use strict";var r=n(9167),o=n(9297),i=n(1951),a=n(4913).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},537:(e,t,n)=>{"use strict";var r=n(550),o=n(4428),i=n(916).CONSTRUCTOR;e.exports=i||!o(function(e){r.all(e).then(void 0,function(){})})},550:(e,t,n)=>{"use strict";var r=n(4576);e.exports=r.Promise},566:(e,t,n)=>{"use strict";var r=n(9504),o=n(9306),i=n(34),a=n(9297),l=n(7680),u=n(616),s=Function,c=r([].concat),d=r([].join),f={};e.exports=u?s.bind:function(e){var t=o(this),n=t.prototype,r=l(arguments,1),u=function(){var n=c(r,l(arguments));return this instanceof u?function(e,t,n){if(!a(f,t)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";f[t]=s("C,a","return new C("+d(r,",")+")")}return f[t](e,n)}(t,n.length,n):t.apply(e,n)};return i(n)&&(u.prototype=n),u}},597:(e,t,n)=>{"use strict";var r=n(9039),o=n(8227),i=n(9519),a=o("species");e.exports=function(e){return i>=51||!r(function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo})}},616:(e,t,n)=>{"use strict";var r=n(9039);e.exports=!r(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},655:(e,t,n)=>{"use strict";var r=n(6955),o=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return o(e)}},679:(e,t,n)=>{"use strict";var r=n(1625),o=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw new o("Incorrect invocation")}},687:(e,t,n)=>{"use strict";var r=n(4913).f,o=n(9297),i=n(8227)("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!o(e,i)&&r(e,i,{configurable:!0,value:t})}},706:(e,t,n)=>{"use strict";var r=n(350).PROPER,o=n(9039),i=n(7452);e.exports=function(e){return o(function(){return!!i[e]()||"
"!=="
"[e]()||r&&i[e].name!==e})}},741:e=>{"use strict";var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},757:(e,t,n)=>{"use strict";var r=n(7751),o=n(4901),i=n(1625),a=n(7040),l=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&i(t.prototype,l(e))}},778:(e,t,n)=>{"use strict";var r=n(6518),o=n(7240);r({target:"String",proto:!0,forced:n(3061)("link")},{link:function(e){return o(this,"a","href",e)}})},788:(e,t,n)=>{"use strict";var r=n(34),o=n(2195),i=n(8227)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"===o(e))}},825:(e,t,n)=>{"use strict";var r=n(6518),o=n(7751),i=n(8745),a=n(566),l=n(5548),u=n(8551),s=n(34),c=n(2360),d=n(9039),f=o("Reflect","construct"),v=Object.prototype,p=[].push,m=d(function(){function e(){}return!(f(function(){},[],e)instanceof e)}),y=!d(function(){f(function(){})}),g=m||y;r({target:"Reflect",stat:!0,forced:g,sham:g},{construct:function(e,t){l(e),u(t);var n=arguments.length<3?e:l(arguments[2]);if(y&&!m)return f(e,t,n);if(e===n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return i(p,r,t),new(i(a,e,r))}var o=n.prototype,d=c(s(o)?o:v),g=i(e,d,t);return s(g)?g:d}})},851:(e,t,n)=>{"use strict";var r=n(6955),o=n(5966),i=n(4117),a=n(6269),l=n(8227)("iterator");e.exports=function(e){if(!i(e))return o(e,l)||o(e,"@@iterator")||a[r(e)]}},875:(e,t,n)=>{"use strict";var r=n(6518),o=n(9039),i=n(8981),a=n(2787),l=n(2211);r({target:"Object",stat:!0,forced:o(function(){a(1)}),sham:!l},{getPrototypeOf:function(e){return a(i(e))}})},916:(e,t,n)=>{"use strict";var r=n(4576),o=n(550),i=n(4901),a=n(2796),l=n(3706),u=n(8227),s=n(4215),c=n(6395),d=n(9519),f=o&&o.prototype,v=u("species"),p=!1,m=i(r.PromiseRejectionEvent),y=a("Promise",function(){var e=l(o),t=e!==String(o);if(!t&&66===d)return!0;if(c&&(!f.catch||!f.finally))return!0;if(!d||d<51||!/native code/.test(e)){var n=new o(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((n.constructor={})[v]=r,!(p=n.then(function(){})instanceof r))return!0}return!(t||"BROWSER"!==s&&"DENO"!==s||m)});e.exports={CONSTRUCTOR:y,REJECTION_EVENT:m,SUBCLASSING:p}},1034:(e,t,n)=>{"use strict";var r=n(9565),o=n(9297),i=n(1625),a=n(5213),l=n(7979),u=RegExp.prototype;e.exports=a.correct?function(e){return e.flags}:function(e){return a.correct||!i(u,e)||o(e,"flags")?e.flags:r(l,e)}},1056:(e,t,n)=>{"use strict";var r=n(4913).f;e.exports=function(e,t,n){n in e||r(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}},1072:(e,t,n)=>{"use strict";var r=n(1828),o=n(8727);e.exports=Object.keys||function(e){return r(e,o)}},1088:(e,t,n)=>{"use strict";var r=n(6518),o=n(9565),i=n(6395),a=n(350),l=n(4901),u=n(3994),s=n(2787),c=n(2967),d=n(687),f=n(6699),v=n(6840),p=n(8227),m=n(6269),y=n(7657),g=a.PROPER,b=a.CONFIGURABLE,h=y.IteratorPrototype,O=y.BUGGY_SAFARI_ITERATORS,S=p("iterator"),x="keys",j="values",w="entries",E=function(){return this};e.exports=function(e,t,n,a,p,y,C){u(n,t,a);var _,N,I,A=function(e){if(e===p&&R)return R;if(!O&&e&&e in P)return P[e];switch(e){case x:case j:case w:return function(){return new n(this,e)}}return function(){return new n(this)}},D=t+" Iterator",T=!1,P=e.prototype,L=P[S]||P["@@iterator"]||p&&P[p],R=!O&&L||A(p),k="Array"===t&&P.entries||L;if(k&&(_=s(k.call(new e)))!==Object.prototype&&_.next&&(i||s(_)===h||(c?c(_,h):l(_[S])||v(_,S,E)),d(_,D,!0,!0),i&&(m[D]=E)),g&&p===j&&L&&L.name!==j&&(!i&&b?f(P,"name",j):(T=!0,R=function(){return o(L,this)})),p)if(N={values:A(j),keys:y?R:A(x),entries:A(w)},C)for(I in N)(O||T||!(I in P))&&v(P,I,N[I]);else r({target:t,proto:!0,forced:O||T},N);return i&&!C||P[S]===R||v(P,S,R,{name:p}),m[t]=R,N}},1103:e=>{"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},1181:(e,t,n)=>{"use strict";var r,o,i,a=n(8622),l=n(4576),u=n(34),s=n(6699),c=n(9297),d=n(7629),f=n(6119),v=n(421),p="Object already initialized",m=l.TypeError,y=l.WeakMap;if(a||d.state){var g=d.state||(d.state=new y);g.get=g.get,g.has=g.has,g.set=g.set,r=function(e,t){if(g.has(e))throw new m(p);return t.facade=e,g.set(e,t),t},o=function(e){return g.get(e)||{}},i=function(e){return g.has(e)}}else{var b=f("state");v[b]=!0,r=function(e,t){if(c(e,b))throw new m(p);return t.facade=e,s(e,b,t),t},o=function(e){return c(e,b)?e[b]:{}},i=function(e){return c(e,b)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=o(t)).type!==e)throw new m("Incompatible receiver, "+e+" required");return n}}}},1240:(e,t,n)=>{"use strict";var r=n(9504);e.exports=r(1.1.valueOf)},1278:(e,t,n)=>{"use strict";var r=n(6518),o=n(3724),i=n(5031),a=n(5397),l=n(7347),u=n(4659);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),o=l.f,s=i(r),c={},d=0;s.length>d;)void 0!==(n=o(r,t=s[d++]))&&u(c,t,n);return c}})},1291:(e,t,n)=>{"use strict";var r=n(741);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},1296:(e,t,n)=>{"use strict";var r=n(4495);e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},1392:(e,t,n)=>{"use strict";var r,o=n(6518),i=n(7476),a=n(7347).f,l=n(8014),u=n(655),s=n(5749),c=n(7750),d=n(1436),f=n(6395),v=i("".slice),p=Math.min,m=d("startsWith");o({target:"String",proto:!0,forced:!(!f&&!m&&(r=a(String.prototype,"startsWith"),r&&!r.writable)||m)},{startsWith:function(e){var t=u(c(this));s(e);var n=l(p(arguments.length>1?arguments[1]:void 0,t.length)),r=u(e);return v(t,n,n+r.length)===r}})},1436:(e,t,n)=>{"use strict";var r=n(8227)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},1469:(e,t,n)=>{"use strict";var r=n(7433);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},1481:(e,t,n)=>{"use strict";var r=n(6518),o=n(6043);r({target:"Promise",stat:!0,forced:n(916).CONSTRUCTOR},{reject:function(e){var t=o.f(this);return(0,t.reject)(e),t.promise}})},1510:(e,t,n)=>{"use strict";var r=n(6518),o=n(7751),i=n(9297),a=n(655),l=n(5745),u=n(1296),s=l("string-to-symbol-registry"),c=l("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=a(e);if(i(s,t))return s[t];var n=o("Symbol")(t);return s[t]=n,c[n]=t,n}})},1625:(e,t,n)=>{"use strict";var r=n(9504);e.exports=r({}.isPrototypeOf)},1699:(e,t,n)=>{"use strict";var r=n(6518),o=n(9504),i=n(5749),a=n(7750),l=n(655),u=n(1436),s=o("".indexOf);r({target:"String",proto:!0,forced:!u("includes")},{includes:function(e){return!!~s(l(a(this)),l(i(e)),arguments.length>1?arguments[1]:void 0)}})},1761:(e,t,n)=>{"use strict";var r=n(9565),o=n(9504),i=n(9228),a=n(8551),l=n(34),u=n(8014),s=n(655),c=n(7750),d=n(5966),f=n(7829),v=n(1034),p=n(6682),m=o("".indexOf);i("match",function(e,t,n){return[function(t){var n=c(this),o=l(t)?d(t,e):void 0;return o?r(o,t,n):new RegExp(t)[e](s(n))},function(e){var r=a(this),o=s(e),i=n(t,r,o);if(i.done)return i.value;var l=s(v(r));if(-1===m(l,"g"))return p(r,o);var c=-1!==m(l,"u");r.lastIndex=0;for(var d,y=[],g=0;null!==(d=p(r,o));){var b=s(d[0]);y[g]=b,""===b&&(r.lastIndex=f(o,u(r.lastIndex),c)),g++}return 0===g?null:y}]})},1828:(e,t,n)=>{"use strict";var r=n(9504),o=n(9297),i=n(5397),a=n(9617).indexOf,l=n(421),u=r([].push);e.exports=function(e,t){var n,r=i(e),s=0,c=[];for(n in r)!o(l,n)&&o(r,n)&&u(c,n);for(;t.length>s;)o(r,n=t[s++])&&(~a(c,n)||u(c,n));return c}},1951:(e,t,n)=>{"use strict";var r=n(8227);t.f=r},1954:e=>{"use strict";e.exports=u},1955:(e,t,n)=>{"use strict";var r,o,i,a,l,u=n(4576),s=n(3389),c=n(6080),d=n(9225).set,f=n(8265),v=n(9544),p=n(4265),m=n(7860),y=n(6193),g=u.MutationObserver||u.WebKitMutationObserver,b=u.document,h=u.process,O=u.Promise,S=s("queueMicrotask");if(!S){var x=new f,j=function(){var e,t;for(y&&(e=h.domain)&&e.exit();t=x.get();)try{t()}catch(e){throw x.head&&r(),e}e&&e.enter()};v||y||m||!g||!b?!p&&O&&O.resolve?((a=O.resolve(void 0)).constructor=O,l=c(a.then,a),r=function(){l(j)}):y?r=function(){h.nextTick(j)}:(d=c(d,u),r=function(){d(j)}):(o=!0,i=b.createTextNode(""),new g(j).observe(i,{characterData:!0}),r=function(){i.data=o=!o}),S=function(e){x.head||r(),x.add(e)}}e.exports=S},2003:(e,t,n)=>{"use strict";var r=n(6518),o=n(6395),i=n(916).CONSTRUCTOR,a=n(550),l=n(7751),u=n(4901),s=n(6840),c=a&&a.prototype;if(r({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(e){return this.then(void 0,e)}}),!o&&u(a)){var d=l("Promise").prototype.catch;c.catch!==d&&s(c,"catch",d,{unsafe:!0})}},2008:(e,t,n)=>{"use strict";var r=n(6518),o=n(9213).filter;r({target:"Array",proto:!0,forced:!n(597)("filter")},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},2010:(e,t,n)=>{"use strict";var r=n(3724),o=n(350).EXISTS,i=n(9504),a=n(2106),l=Function.prototype,u=i(l.toString),s=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,c=i(s.exec);r&&!o&&a(l,"name",{configurable:!0,get:function(){try{return c(s,u(this))[1]}catch(e){return""}}})},2062:(e,t,n)=>{"use strict";var r=n(6518),o=n(9213).map;r({target:"Array",proto:!0,forced:!n(597)("map")},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},2106:(e,t,n)=>{"use strict";var r=n(283),o=n(4913);e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),o.f(e,t,n)}},2140:(e,t,n)=>{"use strict";var r={};r[n(8227)("toStringTag")]="z",e.exports="[object z]"===String(r)},2148:e=>{"use strict";e.exports=o},2195:(e,t,n)=>{"use strict";var r=n(9504),o=r({}.toString),i=r("".slice);e.exports=function(e){return i(o(e),8,-1)}},2211:(e,t,n)=>{"use strict";var r=n(9039);e.exports=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},2247:e=>{"use strict";e.exports=s},2259:(e,t,n)=>{"use strict";n(511)("iterator")},2293:(e,t,n)=>{"use strict";var r=n(8551),o=n(5548),i=n(4117),a=n(8227)("species");e.exports=function(e,t){var n,l=r(e).constructor;return void 0===l||i(n=r(l)[a])?t:o(n)}},2357:(e,t,n)=>{"use strict";var r=n(3724),o=n(9039),i=n(9504),a=n(2787),l=n(1072),u=n(5397),s=i(n(8773).f),c=i([].push),d=r&&o(function(){var e=Object.create(null);return e[2]=2,!s(e,2)}),f=function(e){return function(t){for(var n,o=u(t),i=l(o),f=d&&null===a(o),v=i.length,p=0,m=[];v>p;)n=i[p++],r&&!(f?n in o:s(o,n))||c(m,e?[n,o[n]]:o[n]);return m}};e.exports={entries:f(!0),values:f(!1)}},2360:(e,t,n)=>{"use strict";var r,o=n(8551),i=n(6801),a=n(8727),l=n(421),u=n(397),s=n(4055),c=n(6119),d="prototype",f="script",v=c("IE_PROTO"),p=function(){},m=function(e){return"<"+f+">"+e+"</"+f+">"},y=function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;g="undefined"!=typeof document?document.domain&&r?y(r):(t=s("iframe"),n="java"+f+":",t.style.display="none",u.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F):y(r);for(var o=a.length;o--;)delete g[d][a[o]];return g()};l[v]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(p[d]=o(e),n=new p,p[d]=null,n[v]=e):n=g(),void 0===t?n:i.f(n,t)}},2478:(e,t,n)=>{"use strict";var r=n(9504),o=n(8981),i=Math.floor,a=r("".charAt),l=r("".replace),u=r("".slice),s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,r,d,f){var v=n+e.length,p=r.length,m=c;return void 0!==d&&(d=o(d),m=s),l(f,m,function(o,l){var s;switch(a(l,0)){case"$":return"$";case"&":return e;case"`":return u(t,0,n);case"'":return u(t,v);case"<":s=d[u(l,1,-1)];break;default:var c=+l;if(0===c)return o;if(c>p){var f=i(c/10);return 0===f?o:f<=p?void 0===r[f-1]?a(l,1):r[f-1]+a(l,1):o}s=r[c-1]}return void 0===s?"":s})}},2529:e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},2652:(e,t,n)=>{"use strict";var r=n(6080),o=n(9565),i=n(8551),a=n(6823),l=n(4209),u=n(6198),s=n(1625),c=n(81),d=n(851),f=n(9539),v=TypeError,p=function(e,t){this.stopped=e,this.result=t},m=p.prototype;e.exports=function(e,t,n){var y,g,b,h,O,S,x,j=n&&n.that,w=!(!n||!n.AS_ENTRIES),E=!(!n||!n.IS_RECORD),C=!(!n||!n.IS_ITERATOR),_=!(!n||!n.INTERRUPTED),N=r(t,j),I=function(e){return y&&f(y,"normal"),new p(!0,e)},A=function(e){return w?(i(e),_?N(e[0],e[1],I):N(e[0],e[1])):_?N(e,I):N(e)};if(E)y=e.iterator;else if(C)y=e;else{if(!(g=d(e)))throw new v(a(e)+" is not iterable");if(l(g)){for(b=0,h=u(e);h>b;b++)if((O=A(e[b]))&&s(m,O))return O;return new p(!1)}y=c(e,g)}for(S=E?e.next:y.next;!(x=o(S,y)).done;){try{O=A(x.value)}catch(e){f(y,"throw",e)}if("object"==typeof O&&O&&s(m,O))return O}return new p(!1)}},2675:(e,t,n)=>{"use strict";n(6761),n(1510),n(7812),n(3110),n(9773)},2694:(e,t,n)=>{"use strict";var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},2762:(e,t,n)=>{"use strict";var r=n(6518),o=n(3802).trim;r({target:"String",proto:!0,forced:n(706)("trim")},{trim:function(){return o(this)}})},2777:(e,t,n)=>{"use strict";var r=n(9565),o=n(34),i=n(757),a=n(5966),l=n(4270),u=n(8227),s=TypeError,c=u("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var n,u=a(e,c);if(u){if(void 0===t&&(t="default"),n=r(u,e,t),!o(n)||i(n))return n;throw new s("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},2787:(e,t,n)=>{"use strict";var r=n(9297),o=n(4901),i=n(8981),a=n(6119),l=n(2211),u=a("IE_PROTO"),s=Object,c=s.prototype;e.exports=l?s.getPrototypeOf:function(e){var t=i(e);if(r(t,u))return t[u];var n=t.constructor;return o(n)&&t instanceof n?n.prototype:t instanceof s?c:null}},2796:(e,t,n)=>{"use strict";var r=n(9039),o=n(4901),i=/#|\.prototype\./,a=function(e,t){var n=u[l(e)];return n===c||n!==s&&(o(t)?r(t):!!t)},l=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},u=a.data={},s=a.NATIVE="N",c=a.POLYFILL="P";e.exports=a},2812:e=>{"use strict";var t=TypeError;e.exports=function(e,n){if(e<n)throw new t("Not enough arguments");return e}},2839:(e,t,n)=>{"use strict";var r=n(4576).navigator,o=r&&r.userAgent;e.exports=o?String(o):""},2892:(e,t,n)=>{"use strict";var r=n(6518),o=n(6395),i=n(3724),a=n(4576),l=n(9167),u=n(9504),s=n(2796),c=n(9297),d=n(3167),f=n(1625),v=n(757),p=n(2777),m=n(9039),y=n(8480).f,g=n(7347).f,b=n(4913).f,h=n(1240),O=n(3802).trim,S="Number",x=a[S],j=l[S],w=x.prototype,E=a.TypeError,C=u("".slice),_=u("".charCodeAt),N=s(S,!x(" 0o1")||!x("0b1")||x("+0x1")),I=function(e){var t,n=arguments.length<1?0:x(function(e){var t=p(e,"number");return"bigint"==typeof t?t:function(e){var t,n,r,o,i,a,l,u,s=p(e,"number");if(v(s))throw new E("Cannot convert a Symbol value to a number");if("string"==typeof s&&s.length>2)if(s=O(s),43===(t=_(s,0))||45===t){if(88===(n=_(s,2))||120===n)return NaN}else if(48===t){switch(_(s,1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+s}for(a=(i=C(s,2)).length,l=0;l<a;l++)if((u=_(i,l))<48||u>o)return NaN;return parseInt(i,r)}return+s}(t)}(e));return f(w,t=this)&&m(function(){h(t)})?d(Object(n),this,I):n};I.prototype=w,N&&!o&&(w.constructor=I),r({global:!0,constructor:!0,wrap:!0,forced:N},{Number:I});var A=function(e,t){for(var n,r=i?y(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;r.length>o;o++)c(t,n=r[o])&&!c(e,n)&&b(e,n,g(t,n))};o&&j&&A(l[S],j),(N||o)&&A(l[S],x)},2953:(e,t,n)=>{"use strict";var r=n(4576),o=n(7400),i=n(9296),a=n(3792),l=n(6699),u=n(687),s=n(8227)("iterator"),c=a.values,d=function(e,t){if(e){if(e[s]!==c)try{l(e,s,c)}catch(t){e[s]=c}if(u(e,t,!0),o[t])for(var n in a)if(e[n]!==a[n])try{l(e,n,a[n])}catch(t){e[n]=a[n]}}};for(var f in o)d(r[f]&&r[f].prototype,f);d(i,"DOMTokenList")},2967:(e,t,n)=>{"use strict";var r=n(6706),o=n(34),i=n(7750),a=n(3506);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return i(n),a(r),o(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},3061:(e,t,n)=>{"use strict";var r=n(9039);e.exports=function(e){return r(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})}},3110:(e,t,n)=>{"use strict";var r=n(6518),o=n(7751),i=n(8745),a=n(9565),l=n(9504),u=n(9039),s=n(4901),c=n(757),d=n(7680),f=n(6933),v=n(4495),p=String,m=o("JSON","stringify"),y=l(/./.exec),g=l("".charAt),b=l("".charCodeAt),h=l("".replace),O=l(1.1.toString),S=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,j=/^[\uDC00-\uDFFF]$/,w=!v||u(function(){var e=o("Symbol")("stringify detection");return"[null]"!==m([e])||"{}"!==m({a:e})||"{}"!==m(Object(e))}),E=u(function(){return'"\\udf06\\ud834"'!==m("\udf06\ud834")||'"\\udead"'!==m("\udead")}),C=function(e,t){var n=d(arguments),r=f(t);if(s(r)||void 0!==e&&!c(e))return n[1]=function(e,t){if(s(r)&&(t=a(r,this,p(e),t)),!c(t))return t},i(m,null,n)},_=function(e,t,n){var r=g(n,t-1),o=g(n,t+1);return y(x,e)&&!y(j,o)||y(j,e)&&!y(x,r)?"\\u"+O(b(e,0),16):e};m&&r({target:"JSON",stat:!0,arity:3,forced:w||E},{stringify:function(e,t,n){var r=d(arguments),o=i(w?C:m,null,r);return E&&"string"==typeof o?h(o,S,_):o}})},3138:e=>{"use strict";e.exports=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}},3167:(e,t,n)=>{"use strict";var r=n(4901),o=n(34),i=n(2967);e.exports=function(e,t,n){var a,l;return i&&r(a=t.constructor)&&a!==n&&o(l=a.prototype)&&l!==n.prototype&&i(e,l),e}},3179:(e,t,n)=>{"use strict";var r=n(2140),o=n(6955);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},3362:(e,t,n)=>{"use strict";n(436),n(6499),n(2003),n(7743),n(1481),n(280)},3389:(e,t,n)=>{"use strict";var r=n(4576),o=n(3724),i=Object.getOwnPropertyDescriptor;e.exports=function(e){if(!o)return r[e];var t=i(r,e);return t&&t.value}},3392:(e,t,n)=>{"use strict";var r=n(9504),o=0,i=Math.random(),a=r(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+i,36)}},3418:(e,t,n)=>{"use strict";var r=n(6518),o=n(7916);r({target:"Array",stat:!0,forced:!n(4428)(function(e){Array.from(e)})},{from:o})},3438:(e,t,n)=>{"use strict";var r=n(8551),o=n(34),i=n(6043);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},3470:e=>{"use strict";e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},3500:(e,t,n)=>{"use strict";var r=n(4576),o=n(7400),i=n(9296),a=n(235),l=n(6699),u=function(e){if(e&&e.forEach!==a)try{l(e,"forEach",a)}catch(t){e.forEach=a}};for(var s in o)o[s]&&u(r[s]&&r[s].prototype);u(i)},3506:(e,t,n)=>{"use strict";var r=n(3925),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i("Can't set "+o(e)+" as a prototype")}},3517:(e,t,n)=>{"use strict";var r=n(9504),o=n(9039),i=n(4901),a=n(6955),l=n(7751),u=n(3706),s=function(){},c=l("Reflect","construct"),d=/^\s*(?:class|function)\b/,f=r(d.exec),v=!d.test(s),p=function(e){if(!i(e))return!1;try{return c(s,[],e),!0}catch(e){return!1}},m=function(e){if(!i(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return v||!!f(d,u(e))}catch(e){return!0}};m.sham=!0,e.exports=!c||o(function(){var e;return p(p.call)||!p(Object)||!p(function(){e=!0})||e})?m:p},3607:(e,t,n)=>{"use strict";var r=n(2839).match(/AppleWebKit\/(\d+)\./);e.exports=!!r&&+r[1]},3635:(e,t,n)=>{"use strict";var r=n(9039),o=n(4576).RegExp;e.exports=r(function(){var e=o(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})},3640:(e,t,n)=>{"use strict";var r=n(8551),o=n(4270),i=TypeError;e.exports=function(e){if(r(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw new i("Incorrect hint");return o(this,e)}},3706:(e,t,n)=>{"use strict";var r=n(9504),o=n(4901),i=n(7629),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},3709:(e,t,n)=>{"use strict";var r=n(2839).match(/firefox\/(\d+)/i);e.exports=!!r&&+r[1]},3717:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},3724:(e,t,n)=>{"use strict";var r=n(9039);e.exports=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},3763:(e,t,n)=>{"use strict";var r=n(2839);e.exports=/MSIE|Trident/.test(r)},3792:(e,t,n)=>{"use strict";var r=n(5397),o=n(6469),i=n(6269),a=n(1181),l=n(4913).f,u=n(1088),s=n(2529),c=n(6395),d=n(3724),f="Array Iterator",v=a.set,p=a.getterFor(f);e.exports=u(Array,"Array",function(e,t){v(this,{type:f,target:r(e),index:0,kind:t})},function(){var e=p(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,s(void 0,!0);switch(e.kind){case"keys":return s(n,!1);case"values":return s(t[n],!1)}return s([n,t[n]],!1)},"values");var m=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!c&&d&&"values"!==m.name)try{l(m,"name",{value:"values"})}catch(e){}},3802:(e,t,n)=>{"use strict";var r=n(9504),o=n(7750),i=n(655),a=n(7452),l=r("".replace),u=RegExp("^["+a+"]+"),s=RegExp("(^|[^"+a+"])["+a+"]+$"),c=function(e){return function(t){var n=i(o(t));return 1&e&&(n=l(n,u,"")),2&e&&(n=l(n,s,"$1")),n}};e.exports={start:c(1),end:c(2),trim:c(3)}},3851:(e,t,n)=>{"use strict";var r=n(6518),o=n(9039),i=n(5397),a=n(7347).f,l=n(3724);r({target:"Object",stat:!0,forced:!l||o(function(){a(1)}),sham:!l},{getOwnPropertyDescriptor:function(e,t){return a(i(e),t)}})},3921:(e,t,n)=>{"use strict";var r=n(6518),o=n(2652),i=n(4659);r({target:"Object",stat:!0},{fromEntries:function(e){var t={};return o(e,function(e,n){i(t,e,n)},{AS_ENTRIES:!0}),t}})},3925:(e,t,n)=>{"use strict";var r=n(34);e.exports=function(e){return r(e)||null===e}},3994:(e,t,n)=>{"use strict";var r=n(7657).IteratorPrototype,o=n(2360),i=n(6980),a=n(687),l=n(6269),u=function(){return this};e.exports=function(e,t,n,s){var c=t+" Iterator";return e.prototype=o(r,{next:i(+!s,n)}),a(e,c,!1,!0),l[c]=u,e}},4012:e=>{"use strict";e.exports=t},4055:(e,t,n)=>{"use strict";var r=n(4576),o=n(34),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},4117:e=>{"use strict";e.exports=function(e){return null==e}},4209:(e,t,n)=>{"use strict";var r=n(8227),o=n(6269),i=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[i]===e)}},4215:(e,t,n)=>{"use strict";var r=n(4576),o=n(2839),i=n(2195),a=function(e){return o.slice(0,e.length)===e};e.exports=a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":r.Bun&&"string"==typeof Bun.version?"BUN":r.Deno&&"object"==typeof Deno.version?"DENO":"process"===i(r.process)?"NODE":r.window&&r.document?"BROWSER":"REST"},4265:(e,t,n)=>{"use strict";var r=n(2839);e.exports=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble},4270:(e,t,n)=>{"use strict";var r=n(9565),o=n(4901),i=n(34),a=TypeError;e.exports=function(e,t){var n,l;if("string"===t&&o(n=e.toString)&&!i(l=r(n,e)))return l;if(o(n=e.valueOf)&&!i(l=r(n,e)))return l;if("string"!==t&&o(n=e.toString)&&!i(l=r(n,e)))return l;throw new a("Can't convert object to primitive value")}},4376:(e,t,n)=>{"use strict";var r=n(2195);e.exports=Array.isArray||function(e){return"Array"===r(e)}},4423:(e,t,n)=>{"use strict";var r=n(6518),o=n(9617).includes,i=n(9039),a=n(6469);r({target:"Array",proto:!0,forced:i(function(){return!Array(1).includes()})},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},4428:(e,t,n)=>{"use strict";var r=n(8227)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){try{if(!t&&!o)return!1}catch(e){return!1}var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n}},4442:e=>{"use strict";e.exports=i},4456:e=>{"use strict";e.exports=r},4488:(e,t,n)=>{"use strict";var r=n(7680),o=Math.floor,i=function(e,t){var n=e.length;if(n<8)for(var a,l,u=1;u<n;){for(l=u,a=e[u];l&&t(e[l-1],a)>0;)e[l]=e[--l];l!==u++&&(e[l]=a)}else for(var s=o(n/2),c=i(r(e,0,s),t),d=i(r(e,s),t),f=c.length,v=d.length,p=0,m=0;p<f||m<v;)e[p+m]=p<f&&m<v?t(c[p],d[m])<=0?c[p++]:d[m++]:p<f?c[p++]:d[m++];return e};e.exports=i},4495:(e,t,n)=>{"use strict";var r=n(9519),o=n(9039),i=n(4576).String;e.exports=!!Object.getOwnPropertySymbols&&!o(function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41})},4527:(e,t,n)=>{"use strict";var r=n(3724),o=n(4376),i=TypeError,a=Object.getOwnPropertyDescriptor,l=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=l?function(e,t){if(o(e)&&!a(e,"length").writable)throw new i("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},4554:(e,t,n)=>{"use strict";var r=n(6518),o=n(8981),i=n(5610),a=n(1291),l=n(6198),u=n(4527),s=n(6837),c=n(1469),d=n(4659),f=n(4606),v=n(597)("splice"),p=Math.max,m=Math.min;r({target:"Array",proto:!0,forced:!v},{splice:function(e,t){var n,r,v,y,g,b,h=o(this),O=l(h),S=i(e,O),x=arguments.length;for(0===x?n=r=0:1===x?(n=0,r=O-S):(n=x-2,r=m(p(a(t),0),O-S)),s(O+n-r),v=c(h,r),y=0;y<r;y++)(g=S+y)in h&&d(v,y,h[g]);if(v.length=r,n<r){for(y=S;y<O-r;y++)b=y+n,(g=y+r)in h?h[b]=h[g]:f(h,b);for(y=O;y>O-r+n;y--)f(h,y-1)}else if(n>r)for(y=O-r;y>S;y--)b=y+n-1,(g=y+r-1)in h?h[b]=h[g]:f(h,b);for(y=0;y<n;y++)h[y+S]=arguments[y+2];return u(h,O-r+n),v}})},4576:function(e,t,n){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4598:(e,t,n)=>{"use strict";var r=n(9039);e.exports=function(e,t){var n=[][e];return!!n&&r(function(){n.call(null,t||function(){return 1},1)})}},4606:(e,t,n)=>{"use strict";var r=n(6823),o=TypeError;e.exports=function(e,t){if(!delete e[t])throw new o("Cannot delete property "+r(t)+" of "+r(e))}},4659:(e,t,n)=>{"use strict";var r=n(3724),o=n(4913),i=n(6980);e.exports=function(e,t,n){r?o.f(e,t,i(0,n)):e[t]=n}},4782:(e,t,n)=>{"use strict";var r=n(6518),o=n(4376),i=n(3517),a=n(34),l=n(5610),u=n(6198),s=n(5397),c=n(4659),d=n(8227),f=n(597),v=n(7680),p=f("slice"),m=d("species"),y=Array,g=Math.max;r({target:"Array",proto:!0,forced:!p},{slice:function(e,t){var n,r,d,f=s(this),p=u(f),b=l(e,p),h=l(void 0===t?p:t,p);if(o(f)&&(n=f.constructor,(i(n)&&(n===y||o(n.prototype))||a(n)&&null===(n=n[m]))&&(n=void 0),n===y||void 0===n))return v(f,b,h);for(r=new(void 0===n?y:n)(g(h-b,0)),d=0;b<h;b++,d++)b in f&&c(r,d,f[b]);return r.length=d,r}})},4848:(e,t,n)=>{"use strict";e.exports=n(9698)},4864:(e,t,n)=>{"use strict";var r=n(3724),o=n(4576),i=n(9504),a=n(2796),l=n(3167),u=n(6699),s=n(2360),c=n(8480).f,d=n(1625),f=n(788),v=n(655),p=n(1034),m=n(8429),y=n(1056),g=n(6840),b=n(9039),h=n(9297),O=n(1181).enforce,S=n(7633),x=n(8227),j=n(3635),w=n(8814),E=x("match"),C=o.RegExp,_=C.prototype,N=o.SyntaxError,I=i(_.exec),A=i("".charAt),D=i("".replace),T=i("".indexOf),P=i("".slice),L=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,R=/a/g,k=/a/g,M=new C(R)!==R,U=m.MISSED_STICKY,B=m.UNSUPPORTED_Y;if(a("RegExp",r&&(!M||U||j||w||b(function(){return k[E]=!1,C(R)!==R||C(k)===k||"/a/i"!==String(C(R,"i"))})))){for(var F=function(e,t){var n,r,o,i,a,c,m=d(_,this),y=f(e),g=void 0===t,b=[],S=e;if(!m&&y&&g&&e.constructor===F)return e;if((y||d(_,e))&&(e=e.source,g&&(t=p(S))),e=void 0===e?"":v(e),t=void 0===t?"":v(t),S=e,j&&"dotAll"in R&&(r=!!t&&T(t,"s")>-1)&&(t=D(t,/s/g,"")),n=t,U&&"sticky"in R&&(o=!!t&&T(t,"y")>-1)&&B&&(t=D(t,/y/g,"")),w&&(i=function(e){for(var t,n=e.length,r=0,o="",i=[],a=s(null),l=!1,u=!1,c=0,d="";r<=n;r++){if("\\"===(t=A(e,r)))t+=A(e,++r);else if("]"===t)l=!1;else if(!l)switch(!0){case"["===t:l=!0;break;case"("===t:if(o+=t,"?:"===P(e,r+1,r+3))continue;I(L,P(e,r+1))&&(r+=2,u=!0),c++;continue;case">"===t&&u:if(""===d||h(a,d))throw new N("Invalid capture group name");a[d]=!0,i[i.length]=[d,c],u=!1,d="";continue}u?d+=t:o+=t}return[o,i]}(e),e=i[0],b=i[1]),a=l(C(e,t),m?this:_,F),(r||o||b.length)&&(c=O(a),r&&(c.dotAll=!0,c.raw=F(function(e){for(var t,n=e.length,r=0,o="",i=!1;r<=n;r++)"\\"!==(t=A(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),o+=t):o+="[\\s\\S]":o+=t+A(e,++r);return o}(e),n)),o&&(c.sticky=!0),b.length&&(c.groups=b)),e!==S)try{u(a,"source",""===S?"(?:)":S)}catch(e){}return a},G=c(C),V=0;G.length>V;)y(F,C,G[V++]);_.constructor=F,F.prototype=_,g(o,"RegExp",F,{constructor:!0})}S("RegExp")},4901:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},4913:(e,t,n)=>{"use strict";var r=n(3724),o=n(5917),i=n(8686),a=n(8551),l=n(6969),u=TypeError,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d="enumerable",f="configurable",v="writable";t.f=r?i?function(e,t,n){if(a(e),t=l(t),a(n),"function"==typeof e&&"prototype"===t&&"value"in n&&v in n&&!n[v]){var r=c(e,t);r&&r[v]&&(e[t]=n.value,n={configurable:f in n?n[f]:r[f],enumerable:d in n?n[d]:r[d],writable:!1})}return s(e,t,n)}:s:function(e,t,n){if(a(e),t=l(t),a(n),o)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new u("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},5031:(e,t,n)=>{"use strict";var r=n(7751),o=n(9504),i=n(8480),a=n(3717),l=n(8551),u=o([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(l(e)),n=a.f;return n?u(t,n(e)):t}},5053:e=>{"use strict";e.exports=a},5213:(e,t,n)=>{"use strict";var r=n(4576),o=n(9039),i=r.RegExp,a=!o(function(){var e=!0;try{i(".","d")}catch(t){e=!1}var t={},n="",r=e?"dgimsy":"gimsy",o=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var l in e&&(a.hasIndices="d"),a)o(l,a[l]);return Object.getOwnPropertyDescriptor(i.prototype,"flags").get.call(t)!==r||n!==r});e.exports={correct:a}},5397:(e,t,n)=>{"use strict";var r=n(7055),o=n(7750);e.exports=function(e){return r(o(e))}},5440:(e,t,n)=>{"use strict";var r=n(8745),o=n(9565),i=n(9504),a=n(9228),l=n(9039),u=n(8551),s=n(4901),c=n(34),d=n(1291),f=n(8014),v=n(655),p=n(7750),m=n(7829),y=n(5966),g=n(2478),b=n(1034),h=n(6682),O=n(8227)("replace"),S=Math.max,x=Math.min,j=i([].concat),w=i([].push),E=i("".indexOf),C=i("".slice),_=function(e){return void 0===e?e:String(e)},N="$0"==="a".replace(/./,"$0"),I=!!/./[O]&&""===/./[O]("a","$0");a("replace",function(e,t,n){var i=I?"$":"$0";return[function(e,n){var r=p(this),i=c(e)?y(e,O):void 0;return i?o(i,e,r,n):o(t,v(r),e,n)},function(e,o){var a=u(this),l=v(e);if("string"==typeof o&&-1===E(o,i)&&-1===E(o,"$<")){var c=n(t,a,l,o);if(c.done)return c.value}var p=s(o);p||(o=v(o));var y,O=v(b(a)),N=-1!==E(O,"g");N&&(y=-1!==E(O,"u"),a.lastIndex=0);for(var I,A=[];null!==(I=h(a,l))&&(w(A,I),N);)""===v(I[0])&&(a.lastIndex=m(l,f(a.lastIndex),y));for(var D="",T=0,P=0;P<A.length;P++){for(var L,R=v((I=A[P])[0]),k=S(x(d(I.index),l.length),0),M=[],U=1;U<I.length;U++)w(M,_(I[U]));var B=I.groups;if(p){var F=j([R],M,k,l);void 0!==B&&w(F,B),L=v(r(o,void 0,F))}else L=g(R,l,k,M,B,o);k>=T&&(D+=C(l,T,k)+L,T=k+R.length)}return D+C(l,T)}]},!!l(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})||!N||I)},5506:(e,t,n)=>{"use strict";var r=n(6518),o=n(2357).entries;r({target:"Object",stat:!0},{entries:function(e){return o(e)}})},5548:(e,t,n)=>{"use strict";var r=n(3517),o=n(6823),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not a constructor")}},5556:(e,t,n)=>{e.exports=n(2694)()},5610:(e,t,n)=>{"use strict";var r=n(1291),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},5700:(e,t,n)=>{"use strict";var r=n(511),o=n(8242);r("toPrimitive"),o()},5745:(e,t,n)=>{"use strict";var r=n(7629);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},5746:(e,t,n)=>{"use strict";var r=n(9565),o=n(9228),i=n(8551),a=n(34),l=n(7750),u=n(3470),s=n(655),c=n(5966),d=n(6682);o("search",function(e,t,n){return[function(t){var n=l(this),o=a(t)?c(t,e):void 0;return o?r(o,t,n):new RegExp(t)[e](s(n))},function(e){var r=i(this),o=s(e),a=n(t,r,o);if(a.done)return a.value;var l=r.lastIndex;u(l,0)||(r.lastIndex=0);var c=d(r,o);return u(r.lastIndex,l)||(r.lastIndex=l),null===c?-1:c.index}]})},5749:(e,t,n)=>{"use strict";var r=n(788),o=TypeError;e.exports=function(e){if(r(e))throw new o("The method doesn't accept regular expressions");return e}},5917:(e,t,n)=>{"use strict";var r=n(3724),o=n(9039),i=n(4055);e.exports=!r&&!o(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},5953:e=>{"use strict";e.exports=n},5966:(e,t,n)=>{"use strict";var r=n(9306),o=n(4117);e.exports=function(e,t){var n=e[t];return o(n)?void 0:r(n)}},6034:(e,t,n)=>{"use strict";var r=n(6518),o=n(2357).values;r({target:"Object",stat:!0},{values:function(e){return o(e)}})},6043:(e,t,n)=>{"use strict";var r=n(9306),o=TypeError,i=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw new o("Bad Promise constructor");t=e,n=r}),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new i(e)}},6080:(e,t,n)=>{"use strict";var r=n(7476),o=n(9306),i=n(616),a=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?a(e,t):function(){return e.apply(t,arguments)}}},6099:(e,t,n)=>{"use strict";var r=n(2140),o=n(6840),i=n(3179);r||o(Object.prototype,"toString",i,{unsafe:!0})},6119:(e,t,n)=>{"use strict";var r=n(5745),o=n(3392),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},6193:(e,t,n)=>{"use strict";var r=n(4215);e.exports="NODE"===r},6198:(e,t,n)=>{"use strict";var r=n(8014);e.exports=function(e){return r(e.length)}},6243:t=>{"use strict";t.exports=e},6269:e=>{"use strict";e.exports={}},6319:(e,t,n)=>{"use strict";var r=n(8551),o=n(9539);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){o(e,"throw",t)}}},6395:e=>{"use strict";e.exports=!1},6469:(e,t,n)=>{"use strict";var r=n(8227),o=n(2360),i=n(4913).f,a=r("unscopables"),l=Array.prototype;void 0===l[a]&&i(l,a,{configurable:!0,value:o(null)}),e.exports=function(e){l[a][e]=!0}},6499:(e,t,n)=>{"use strict";var r=n(6518),o=n(9565),i=n(9306),a=n(6043),l=n(1103),u=n(2652);r({target:"Promise",stat:!0,forced:n(537)},{all:function(e){var t=this,n=a.f(t),r=n.resolve,s=n.reject,c=l(function(){var n=i(t.resolve),a=[],l=0,c=1;u(e,function(e){var i=l++,u=!1;c++,o(n,t,e).then(function(e){u||(u=!0,a[i]=e,--c||r(a))},s)}),--c||r(a)});return c.error&&s(c.value),n.promise}})},6518:(e,t,n)=>{"use strict";var r=n(4576),o=n(7347).f,i=n(6699),a=n(6840),l=n(9433),u=n(7740),s=n(2796);e.exports=function(e,t){var n,c,d,f,v,p=e.target,m=e.global,y=e.stat;if(n=m?r:y?r[p]||l(p,{}):r[p]&&r[p].prototype)for(c in t){if(f=t[c],d=e.dontCallGetSet?(v=o(n,c))&&v.value:n[c],!s(m?c:p+(y?".":"#")+c,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;u(f,d)}(e.sham||d&&d.sham)&&i(f,"sham",!0),a(n,c,f,e)}}},6682:(e,t,n)=>{"use strict";var r=n(9565),o=n(8551),i=n(4901),a=n(2195),l=n(7323),u=TypeError;e.exports=function(e,t){var n=e.exec;if(i(n)){var s=r(n,e,t);return null!==s&&o(s),s}if("RegExp"===a(e))return r(l,e,t);throw new u("RegExp#exec called on incompatible receiver")}},6699:(e,t,n)=>{"use strict";var r=n(3724),o=n(4913),i=n(6980);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},6706:(e,t,n)=>{"use strict";var r=n(9504),o=n(9306);e.exports=function(e,t,n){try{return r(o(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},6761:(e,t,n)=>{"use strict";var r=n(6518),o=n(4576),i=n(9565),a=n(9504),l=n(6395),u=n(3724),s=n(4495),c=n(9039),d=n(9297),f=n(1625),v=n(8551),p=n(5397),m=n(6969),y=n(655),g=n(6980),b=n(2360),h=n(1072),O=n(8480),S=n(298),x=n(3717),j=n(7347),w=n(4913),E=n(6801),C=n(8773),_=n(6840),N=n(2106),I=n(5745),A=n(6119),D=n(421),T=n(3392),P=n(8227),L=n(1951),R=n(511),k=n(8242),M=n(687),U=n(1181),B=n(9213).forEach,F=A("hidden"),G="Symbol",V="prototype",H=U.set,W=U.getterFor(G),z=Object[V],X=o.Symbol,q=X&&X[V],Q=o.RangeError,Z=o.TypeError,Y=o.QObject,K=j.f,J=w.f,$=S.f,ee=C.f,te=a([].push),ne=I("symbols"),re=I("op-symbols"),oe=I("wks"),ie=!Y||!Y[V]||!Y[V].findChild,ae=function(e,t,n){var r=K(z,t);r&&delete z[t],J(e,t,n),r&&e!==z&&J(z,t,r)},le=u&&c(function(){return 7!==b(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a})?ae:J,ue=function(e,t){var n=ne[e]=b(q);return H(n,{type:G,tag:e,description:t}),u||(n.description=t),n},se=function(e,t,n){e===z&&se(re,t,n),v(e);var r=m(t);return v(n),d(ne,r)?(n.enumerable?(d(e,F)&&e[F][r]&&(e[F][r]=!1),n=b(n,{enumerable:g(0,!1)})):(d(e,F)||J(e,F,g(1,b(null))),e[F][r]=!0),le(e,r,n)):J(e,r,n)},ce=function(e,t){v(e);var n=p(t),r=h(n).concat(pe(n));return B(r,function(t){u&&!i(de,n,t)||se(e,t,n[t])}),e},de=function(e){var t=m(e),n=i(ee,this,t);return!(this===z&&d(ne,t)&&!d(re,t))&&(!(n||!d(this,t)||!d(ne,t)||d(this,F)&&this[F][t])||n)},fe=function(e,t){var n=p(e),r=m(t);if(n!==z||!d(ne,r)||d(re,r)){var o=K(n,r);return!o||!d(ne,r)||d(n,F)&&n[F][r]||(o.enumerable=!0),o}},ve=function(e){var t=$(p(e)),n=[];return B(t,function(e){d(ne,e)||d(D,e)||te(n,e)}),n},pe=function(e){var t=e===z,n=$(t?re:p(e)),r=[];return B(n,function(e){!d(ne,e)||t&&!d(z,e)||te(r,ne[e])}),r};s||(_(q=(X=function(){if(f(q,this))throw new Z("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,t=T(e),n=function(e){var r=void 0===this?o:this;r===z&&i(n,re,e),d(r,F)&&d(r[F],t)&&(r[F][t]=!1);var a=g(1,e);try{le(r,t,a)}catch(e){if(!(e instanceof Q))throw e;ae(r,t,a)}};return u&&ie&&le(z,t,{configurable:!0,set:n}),ue(t,e)})[V],"toString",function(){return W(this).tag}),_(X,"withoutSetter",function(e){return ue(T(e),e)}),C.f=de,w.f=se,E.f=ce,j.f=fe,O.f=S.f=ve,x.f=pe,L.f=function(e){return ue(P(e),e)},u&&(N(q,"description",{configurable:!0,get:function(){return W(this).description}}),l||_(z,"propertyIsEnumerable",de,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!s,sham:!s},{Symbol:X}),B(h(oe),function(e){R(e)}),r({target:G,stat:!0,forced:!s},{useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),r({target:"Object",stat:!0,forced:!s,sham:!u},{create:function(e,t){return void 0===t?b(e):ce(b(e),t)},defineProperty:se,defineProperties:ce,getOwnPropertyDescriptor:fe}),r({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:ve}),k(),M(X,G),D[F]=!0},6801:(e,t,n)=>{"use strict";var r=n(3724),o=n(8686),i=n(4913),a=n(8551),l=n(5397),u=n(1072);t.f=r&&!o?Object.defineProperties:function(e,t){a(e);for(var n,r=l(t),o=u(t),s=o.length,c=0;s>c;)i.f(e,n=o[c++],r[n]);return e}},6823:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},6837:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},6840:(e,t,n)=>{"use strict";var r=n(4901),o=n(4913),i=n(283),a=n(9433);e.exports=function(e,t,n,l){l||(l={});var u=l.enumerable,s=void 0!==l.name?l.name:t;if(r(n)&&i(n,s,l),l.global)u?e[t]=n:a(t,n);else{try{l.unsafe?e[t]&&(u=!0):delete e[t]}catch(e){}u?e[t]=n:o.f(e,t,{value:n,enumerable:!1,configurable:!l.nonConfigurable,writable:!l.nonWritable})}return e}},6910:(e,t,n)=>{"use strict";var r=n(6518),o=n(9504),i=n(9306),a=n(8981),l=n(6198),u=n(4606),s=n(655),c=n(9039),d=n(4488),f=n(4598),v=n(3709),p=n(3763),m=n(9519),y=n(3607),g=[],b=o(g.sort),h=o(g.push),O=c(function(){g.sort(void 0)}),S=c(function(){g.sort(null)}),x=f("sort"),j=!c(function(){if(m)return m<70;if(!(v&&v>3)){if(p)return!0;if(y)return y<603;var e,t,n,r,o="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)g.push({k:t+r,v:n})}for(g.sort(function(e,t){return t.v-e.v}),r=0;r<g.length;r++)t=g[r].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}});r({target:"Array",proto:!0,forced:O||!S||!x||!j},{sort:function(e){void 0!==e&&i(e);var t=a(this);if(j)return void 0===e?b(t):b(t,e);var n,r,o=[],c=l(t);for(r=0;r<c;r++)r in t&&h(o,t[r]);for(d(o,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:s(t)>s(n)?1:-1}}(e)),n=l(o),r=0;r<n;)t[r]=o[r++];for(;r<c;)u(t,r++);return t}})},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6933:(e,t,n)=>{"use strict";var r=n(9504),o=n(4376),i=n(4901),a=n(2195),l=n(655),u=r([].push);e.exports=function(e){if(i(e))return e;if(o(e)){for(var t=e.length,n=[],r=0;r<t;r++){var s=e[r];"string"==typeof s?u(n,s):"number"!=typeof s&&"Number"!==a(s)&&"String"!==a(s)||u(n,l(s))}var c=n.length,d=!0;return function(e,t){if(d)return d=!1,t;if(o(this))return t;for(var r=0;r<c;r++)if(n[r]===e)return t}}}},6955:(e,t,n)=>{"use strict";var r=n(2140),o=n(4901),i=n(2195),a=n(8227)("toStringTag"),l=Object,u="Arguments"===i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=l(e),a))?n:u?i(t):"Object"===(r=i(t))&&o(t.callee)?"Arguments":r}},6969:(e,t,n)=>{"use strict";var r=n(2777),o=n(757);e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},6980:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},7040:(e,t,n)=>{"use strict";var r=n(4495);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7055:(e,t,n)=>{"use strict";var r=n(9504),o=n(9039),i=n(2195),a=Object,l=r("".split);e.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===i(e)?l(e,""):a(e)}:a},7240:(e,t,n)=>{"use strict";var r=n(9504),o=n(7750),i=n(655),a=/"/g,l=r("".replace);e.exports=function(e,t,n,r){var u=i(o(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+l(i(r),a,""")+'"'),s+">"+u+"</"+t+">"}},7323:(e,t,n)=>{"use strict";var r,o,i=n(9565),a=n(9504),l=n(655),u=n(7979),s=n(8429),c=n(5745),d=n(2360),f=n(1181).get,v=n(3635),p=n(8814),m=c("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,g=y,b=a("".charAt),h=a("".indexOf),O=a("".replace),S=a("".slice),x=(o=/b*/g,i(y,r=/a/,"a"),i(y,o,"a"),0!==r.lastIndex||0!==o.lastIndex),j=s.BROKEN_CARET,w=void 0!==/()??/.exec("")[1];(x||w||j||v||p)&&(g=function(e){var t,n,r,o,a,s,c,v=this,p=f(v),E=l(e),C=p.raw;if(C)return C.lastIndex=v.lastIndex,t=i(g,C,E),v.lastIndex=C.lastIndex,t;var _=p.groups,N=j&&v.sticky,I=i(u,v),A=v.source,D=0,T=E;if(N&&(I=O(I,"y",""),-1===h(I,"g")&&(I+="g"),T=S(E,v.lastIndex),v.lastIndex>0&&(!v.multiline||v.multiline&&"\n"!==b(E,v.lastIndex-1))&&(A="(?: "+A+")",T=" "+T,D++),n=new RegExp("^(?:"+A+")",I)),w&&(n=new RegExp("^"+A+"$(?!\\s)",I)),x&&(r=v.lastIndex),o=i(y,N?n:v,T),N?o?(o.input=S(o.input,D),o[0]=S(o[0],D),o.index=v.lastIndex,v.lastIndex+=o[0].length):v.lastIndex=0:x&&o&&(v.lastIndex=v.global?o.index+o[0].length:r),w&&o&&o.length>1&&i(m,o[0],n,function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)}),o&&_)for(o.groups=s=d(null),a=0;a<_.length;a++)s[(c=_[a])[0]]=o[c[1]];return o}),e.exports=g},7347:(e,t,n)=>{"use strict";var r=n(3724),o=n(9565),i=n(8773),a=n(6980),l=n(5397),u=n(6969),s=n(9297),c=n(5917),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=l(e),t=u(t),c)try{return d(e,t)}catch(e){}if(s(e,t))return a(!o(i.f,e,t),e[t])}},7400:e=>{"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},7433:(e,t,n)=>{"use strict";var r=n(4376),o=n(3517),i=n(34),a=n(8227)("species"),l=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(o(t)&&(t===l||r(t.prototype))||i(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?l:t}},7452:e=>{"use strict";e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},7476:(e,t,n)=>{"use strict";var r=n(2195),o=n(9504);e.exports=function(e){if("Function"===r(e))return o(e)}},7495:(e,t,n)=>{"use strict";var r=n(6518),o=n(7323);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},7629:(e,t,n)=>{"use strict";var r=n(6395),o=n(4576),i=n(9433),a="__core-js_shared__",l=e.exports=o[a]||i(a,{});(l.versions||(l.versions=[])).push({version:"3.45.1",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"})},7633:(e,t,n)=>{"use strict";var r=n(7751),o=n(2106),i=n(8227),a=n(3724),l=i("species");e.exports=function(e){var t=r(e);a&&t&&!t[l]&&o(t,l,{configurable:!0,get:function(){return this}})}},7657:(e,t,n)=>{"use strict";var r,o,i,a=n(9039),l=n(4901),u=n(34),s=n(2360),c=n(2787),d=n(6840),f=n(8227),v=n(6395),p=f("iterator"),m=!1;[].keys&&("next"in(i=[].keys())?(o=c(c(i)))!==Object.prototype&&(r=o):m=!0),!u(r)||a(function(){var e={};return r[p].call(e)!==e})?r={}:v&&(r=s(r)),l(r[p])||d(r,p,function(){return this}),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:m}},7680:(e,t,n)=>{"use strict";var r=n(9504);e.exports=r([].slice)},7740:(e,t,n)=>{"use strict";var r=n(9297),o=n(5031),i=n(7347),a=n(4913);e.exports=function(e,t,n){for(var l=o(t),u=a.f,s=i.f,c=0;c<l.length;c++){var d=l[c];r(e,d)||n&&r(n,d)||u(e,d,s(t,d))}}},7743:(e,t,n)=>{"use strict";var r=n(6518),o=n(9565),i=n(9306),a=n(6043),l=n(1103),u=n(2652);r({target:"Promise",stat:!0,forced:n(537)},{race:function(e){var t=this,n=a.f(t),r=n.reject,s=l(function(){var a=i(t.resolve);u(e,function(e){o(a,t,e).then(n.resolve,r)})});return s.error&&r(s.value),n.promise}})},7750:(e,t,n)=>{"use strict";var r=n(4117),o=TypeError;e.exports=function(e){if(r(e))throw new o("Can't call method on "+e);return e}},7751:(e,t,n)=>{"use strict";var r=n(4576),o=n(4901);e.exports=function(e,t){return arguments.length<2?(n=r[e],o(n)?n:void 0):r[e]&&r[e][t];var n}},7764:(e,t,n)=>{"use strict";var r=n(8183).charAt,o=n(655),i=n(1181),a=n(1088),l=n(2529),u="String Iterator",s=i.set,c=i.getterFor(u);a(String,"String",function(e){s(this,{type:u,string:o(e),index:0})},function(){var e,t=c(this),n=t.string,o=t.index;return o>=n.length?l(void 0,!0):(e=r(n,o),t.index+=e.length,l(e,!1))})},7812:(e,t,n)=>{"use strict";var r=n(6518),o=n(9297),i=n(757),a=n(6823),l=n(5745),u=n(1296),s=l("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!u},{keyFor:function(e){if(!i(e))throw new TypeError(a(e)+" is not a symbol");if(o(s,e))return s[e]}})},7829:(e,t,n)=>{"use strict";var r=n(8183).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},7860:(e,t,n)=>{"use strict";var r=n(2839);e.exports=/web0s(?!.*chrome)/i.test(r)},7916:(e,t,n)=>{"use strict";var r=n(6080),o=n(9565),i=n(8981),a=n(6319),l=n(4209),u=n(3517),s=n(6198),c=n(4659),d=n(81),f=n(851),v=Array;e.exports=function(e){var t=i(e),n=u(this),p=arguments.length,m=p>1?arguments[1]:void 0,y=void 0!==m;y&&(m=r(m,p>2?arguments[2]:void 0));var g,b,h,O,S,x,j=f(t),w=0;if(!j||this===v&&l(j))for(g=s(t),b=n?new this(g):v(g);g>w;w++)x=y?m(t[w],w):t[w],c(b,w,x);else for(b=n?new this:[],S=(O=d(t,j)).next;!(h=o(S,O)).done;w++)x=y?a(O,m,[h.value,w],!0):h.value,c(b,w,x);return b.length=w,b}},7918:(e,t,n)=>{"use strict";var r=n(8907).Y,o="undefined"!=typeof window?window.matchMedia:null;function i(e,t,n){var i,a=this;function l(e){a.matches=e.matches,a.media=e.media}o&&!n&&(i=o.call(window,e)),i?(this.matches=i.matches,this.media=i.media,i.addListener(l)):(this.matches=r(e,t),this.media=e),this.addListener=function(e){i&&i.addListener(e)},this.removeListener=function(e){i&&i.removeListener(e)},this.dispose=function(){i&&i.removeListener(l)}}e.exports=function(e,t,n){return new i(e,t,n)}},7979:(e,t,n)=>{"use strict";var r=n(8551);e.exports=function(){var e=r(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},8014:(e,t,n)=>{"use strict";var r=n(1291),o=Math.min;e.exports=function(e){var t=r(e);return t>0?o(t,9007199254740991):0}},8183:(e,t,n)=>{"use strict";var r=n(9504),o=n(1291),i=n(655),a=n(7750),l=r("".charAt),u=r("".charCodeAt),s=r("".slice),c=function(e){return function(t,n){var r,c,d=i(a(t)),f=o(n),v=d.length;return f<0||f>=v?e?"":void 0:(r=u(d,f))<55296||r>56319||f+1===v||(c=u(d,f+1))<56320||c>57343?e?l(d,f):r:e?s(d,f,f+2):c-56320+(r-55296<<10)+65536}};e.exports={codeAt:c(!1),charAt:c(!0)}},8227:(e,t,n)=>{"use strict";var r=n(4576),o=n(5745),i=n(9297),a=n(3392),l=n(4495),u=n(7040),s=r.Symbol,c=o("wks"),d=u?s.for||s:s&&s.withoutSetter||a;e.exports=function(e){return i(c,e)||(c[e]=l&&i(s,e)?s[e]:d("Symbol."+e)),c[e]}},8242:(e,t,n)=>{"use strict";var r=n(9565),o=n(7751),i=n(8227),a=n(6840);e.exports=function(){var e=o("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,l=i("toPrimitive");t&&!t[l]&&a(t,l,function(e){return r(n,this)},{arity:1})}},8265:e=>{"use strict";var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},e.exports=t},8429:(e,t,n)=>{"use strict";var r=n(9039),o=n(4576).RegExp,i=r(function(){var e=o("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),a=i||r(function(){return!o("a","y").sticky}),l=i||r(function(){var e=o("^r","gy");return e.lastIndex=2,null!==e.exec("str")});e.exports={BROKEN_CARET:l,MISSED_STICKY:a,UNSUPPORTED_Y:i}},8480:(e,t,n)=>{"use strict";var r=n(1828),o=n(8727).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},8551:(e,t,n)=>{"use strict";var r=n(34),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not an object")}},8598:(e,t,n)=>{"use strict";var r=n(6518),o=n(9504),i=n(7055),a=n(5397),l=n(4598),u=o([].join);r({target:"Array",proto:!0,forced:i!==Object||!l("join",",")},{join:function(e){return u(a(this),void 0===e?",":e)}})},8622:(e,t,n)=>{"use strict";var r=n(4576),o=n(4901),i=r.WeakMap;e.exports=o(i)&&/native code/.test(String(i))},8686:(e,t,n)=>{"use strict";var r=n(3724),o=n(9039);e.exports=r&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8706:(e,t,n)=>{"use strict";var r=n(6518),o=n(9039),i=n(4376),a=n(34),l=n(8981),u=n(6198),s=n(6837),c=n(4659),d=n(1469),f=n(597),v=n(8227),p=n(9519),m=v("isConcatSpreadable"),y=p>=51||!o(function(){var e=[];return e[m]=!1,e.concat()[0]!==e}),g=function(e){if(!a(e))return!1;var t=e[m];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,arity:1,forced:!y||!f("concat")},{concat:function(e){var t,n,r,o,i,a=l(this),f=d(a,0),v=0;for(t=-1,r=arguments.length;t<r;t++)if(g(i=-1===t?a:arguments[t]))for(o=u(i),s(v+o),n=0;n<o;n++,v++)n in i&&c(f,v,i[n]);else s(v+1),c(f,v++,i);return f.length=v,f}})},8727:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8745:(e,t,n)=>{"use strict";var r=n(616),o=Function.prototype,i=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(i):function(){return a.apply(i,arguments)})},8773:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},8781:(e,t,n)=>{"use strict";var r=n(350).PROPER,o=n(6840),i=n(8551),a=n(655),l=n(9039),u=n(1034),s="toString",c=RegExp.prototype,d=c[s],f=l(function(){return"/a/b"!==d.call({source:"a",flags:"b"})}),v=r&&d.name!==s;(f||v)&&o(c,s,function(){var e=i(this);return"/"+a(e.source)+"/"+a(u(e))},{unsafe:!0})},8814:(e,t,n)=>{"use strict";var r=n(9039),o=n(4576).RegExp;e.exports=r(function(){var e=o("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})},8907:(e,t)=>{"use strict";t.Y=function(e,t){return function(e){return e.split(",").map(function(e){var t=(e=e.trim()).match(n),i=t[1],a=t[2],l=t[3]||"",u={};return u.inverse=!!i&&"not"===i.toLowerCase(),u.type=a?a.toLowerCase():"all",l=l.match(/\([^\)]+\)/g)||[],u.expressions=l.map(function(e){var t=e.match(r),n=t[1].toLowerCase().match(o);return{modifier:n[1],feature:n[2],value:t[2]}}),u})}(e).some(function(e){var n=e.inverse,r="all"===e.type||t.type===e.type;if(r&&n||!r&&!n)return!1;var o=e.expressions.every(function(e){var n=e.feature,r=e.modifier,o=e.value,i=t[n];if(!i)return!1;switch(n){case"orientation":case"scan":return i.toLowerCase()===o.toLowerCase();case"width":case"height":case"device-width":case"device-height":o=s(o),i=s(i);break;case"resolution":o=u(o),i=u(i);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":o=l(o),i=l(i);break;case"grid":case"color":case"color-index":case"monochrome":o=parseInt(o,10)||1,i=parseInt(i,10)||0}switch(r){case"min":return i>=o;case"max":return i<=o;default:return i===o}});return o&&!n||!o&&n})};var n=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,r=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,o=/^(?:(min|max)-)?(.+)/,i=/(em|rem|px|cm|mm|in|pt|pc)?$/,a=/(dpi|dpcm|dppx)?$/;function l(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function u(e){var t=parseFloat(e);switch(String(e).match(a)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function s(e){var t=parseFloat(e);switch(String(e).match(i)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}},8980:(e,t,n)=>{"use strict";var r=n(6518),o=n(9213).findIndex,i=n(6469),a="findIndex",l=!0;a in[]&&Array(1)[a](function(){l=!1}),r({target:"Array",proto:!0,forced:l},{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i(a)},8981:(e,t,n)=>{"use strict";var r=n(7750),o=Object;e.exports=function(e){return o(r(e))}},9039:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},9167:(e,t,n)=>{"use strict";var r=n(4576);e.exports=r},9213:(e,t,n)=>{"use strict";var r=n(6080),o=n(9504),i=n(7055),a=n(8981),l=n(6198),u=n(1469),s=o([].push),c=function(e){var t=1===e,n=2===e,o=3===e,c=4===e,d=6===e,f=7===e,v=5===e||d;return function(p,m,y,g){for(var b,h,O=a(p),S=i(O),x=l(S),j=r(m,y),w=0,E=g||u,C=t?E(p,x):n||f?E(p,0):void 0;x>w;w++)if((v||w in S)&&(h=j(b=S[w],w,O),e))if(t)C[w]=h;else if(h)switch(e){case 3:return!0;case 5:return b;case 6:return w;case 2:s(C,b)}else switch(e){case 4:return!1;case 7:s(C,b)}return d?-1:o||c?c:C}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},9225:(e,t,n)=>{"use strict";var r,o,i,a,l=n(4576),u=n(8745),s=n(6080),c=n(4901),d=n(9297),f=n(9039),v=n(397),p=n(7680),m=n(4055),y=n(2812),g=n(9544),b=n(6193),h=l.setImmediate,O=l.clearImmediate,S=l.process,x=l.Dispatch,j=l.Function,w=l.MessageChannel,E=l.String,C=0,_={},N="onreadystatechange";f(function(){r=l.location});var I=function(e){if(d(_,e)){var t=_[e];delete _[e],t()}},A=function(e){return function(){I(e)}},D=function(e){I(e.data)},T=function(e){l.postMessage(E(e),r.protocol+"//"+r.host)};h&&O||(h=function(e){y(arguments.length,1);var t=c(e)?e:j(e),n=p(arguments,1);return _[++C]=function(){u(t,void 0,n)},o(C),C},O=function(e){delete _[e]},b?o=function(e){S.nextTick(A(e))}:x&&x.now?o=function(e){x.now(A(e))}:w&&!g?(a=(i=new w).port2,i.port1.onmessage=D,o=s(a.postMessage,a)):l.addEventListener&&c(l.postMessage)&&!l.importScripts&&r&&"file:"!==r.protocol&&!f(T)?(o=T,l.addEventListener("message",D,!1)):o=N in m("script")?function(e){v.appendChild(m("script"))[N]=function(){v.removeChild(this),I(e)}}:function(e){setTimeout(A(e),0)}),e.exports={set:h,clear:O}},9228:(e,t,n)=>{"use strict";n(7495);var r=n(9565),o=n(6840),i=n(7323),a=n(9039),l=n(8227),u=n(6699),s=l("species"),c=RegExp.prototype;e.exports=function(e,t,n,d){var f=l(e),v=!a(function(){var t={};return t[f]=function(){return 7},7!==""[e](t)}),p=v&&!a(function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[f]=/./[f]),n.exec=function(){return t=!0,null},n[f](""),!t});if(!v||!p||n){var m=/./[f],y=t(f,""[e],function(e,t,n,o,a){var l=t.exec;return l===i||l===c.exec?v&&!a?{done:!0,value:r(m,t,n,o)}:{done:!0,value:r(e,n,t,o)}:{done:!1}});o(String.prototype,e,y[0]),o(c,f,y[1])}d&&u(c[f],"sham",!0)}},9296:(e,t,n)=>{"use strict";var r=n(4055)("span").classList,o=r&&r.constructor&&r.constructor.prototype;e.exports=o===Object.prototype?void 0:o},9297:(e,t,n)=>{"use strict";var r=n(9504),o=n(8981),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},9306:(e,t,n)=>{"use strict";var r=n(4901),o=n(6823),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not a function")}},9432:(e,t,n)=>{"use strict";var r=n(6518),o=n(8981),i=n(1072);r({target:"Object",stat:!0,forced:n(9039)(function(){i(1)})},{keys:function(e){return i(o(e))}})},9433:(e,t,n)=>{"use strict";var r=n(4576),o=Object.defineProperty;e.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},9463:(e,t,n)=>{"use strict";var r=n(6518),o=n(3724),i=n(4576),a=n(9504),l=n(9297),u=n(4901),s=n(1625),c=n(655),d=n(2106),f=n(7740),v=i.Symbol,p=v&&v.prototype;if(o&&u(v)&&(!("description"in p)||void 0!==v().description)){var m={},y=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:c(arguments[0]),t=s(p,this)?new v(e):void 0===e?v():v(e);return""===e&&(m[t]=!0),t};f(y,v),y.prototype=p,p.constructor=y;var g="Symbol(description detection)"===String(v("description detection")),b=a(p.valueOf),h=a(p.toString),O=/^Symbol\((.*)\)[^)]+$/,S=a("".replace),x=a("".slice);d(p,"description",{configurable:!0,get:function(){var e=b(this);if(l(m,e))return"";var t=h(e),n=g?x(t,7,-1):S(t,O,"$1");return""===n?void 0:n}}),r({global:!0,constructor:!0,forced:!0},{Symbol:y})}},9504:(e,t,n)=>{"use strict";var r=n(616),o=Function.prototype,i=o.call,a=r&&o.bind.bind(i,i);e.exports=r?a:function(e){return function(){return i.apply(e,arguments)}}},9519:(e,t,n)=>{"use strict";var r,o,i=n(4576),a=n(2839),l=i.process,u=i.Deno,s=l&&l.versions||u&&u.version,c=s&&s.v8;c&&(o=(r=c.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},9539:(e,t,n)=>{"use strict";var r=n(9565),o=n(8551),i=n(5966);e.exports=function(e,t,n){var a,l;o(e);try{if(!(a=i(e,"return"))){if("throw"===t)throw n;return n}a=r(a,e)}catch(e){l=!0,a=e}if("throw"===t)throw n;if(l)throw a;return o(a),n}},9544:(e,t,n)=>{"use strict";var r=n(2839);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},9565:(e,t,n)=>{"use strict";var r=n(616),o=Function.prototype.call;e.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},9572:(e,t,n)=>{"use strict";var r=n(9297),o=n(6840),i=n(3640),a=n(8227)("toPrimitive"),l=Date.prototype;r(l,a)||o(l,a,i)},9617:(e,t,n)=>{"use strict";var r=n(5397),o=n(5610),i=n(6198),a=function(e){return function(t,n,a){var l=r(t),u=i(l);if(0===u)return!e&&-1;var s,c=o(a,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},9698:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=o,t.jsxs=o},9773:(e,t,n)=>{"use strict";var r=n(6518),o=n(4495),i=n(9039),a=n(3717),l=n(8981);r({target:"Object",stat:!0,forced:!o||i(function(){a.f(1)})},{getOwnPropertySymbols:function(e){var t=a.f;return t?t(l(e)):[]}})}},d={};function f(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}};return c[e].call(n.exports,n,n.exports,f),n.exports}f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},f.d=(e,t)=>{for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var v={};return(()=>{"use strict";f.r(v),f.d(v,{DigitUI:()=>Ba,initCoreComponents:()=>Ga}),f(2675),f(9463),f(2259),f(5700),f(2008),f(3418),f(3792),f(4782),f(9572),f(2010),f(2892),f(5506),f(3851),f(1278),f(9432),f(6099),f(7495),f(8781),f(7764),f(3500),f(2953);var e=f(6243),t=f(4012),n=f.n(t),r=f(5953),o=f(4456),i=f(2148),a=f(4442),l=(f(8706),f(4423),f(1699),f(2062),f(6910),f(875),f(287),f(825),f(5440),f(5556)),u=f.n(l),s=f(4848);function c(e){return c="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},c(e)}var d=["src","alt","decorative","ariaLabel","ariaLabelledby"];function p(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?p(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function y(e,t,n){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){var t=e.src,n=e.alt,r=void 0===n?"Image not found":n,o=e.decorative,i=void 0!==o&&o,a=e.ariaLabel,l=void 0===a?"No Image description set":a,u=e.ariaLabelledby,c=void 0===u?"no-image-description":u,f=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,d),v={};return i?v.alt="":r?v.alt=r:l?v["aria-label"]=l:c?v["aria-labelledby"]=c:console.warn("AccessibleImage: Missing alt, aria-label, or aria-labelledby for non-decorative image."),(0,s.jsx)("img",m(m(m({src:t},v),f),{},{tabIndex:0,onKeyDown:function(e){var t,n;"Enter"!==e.key&&" "!==e.key||window.open(null===(t=window)||void 0===t||null===(t=t.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}}))};g.propTypes={src:u().string.isRequired,alt:u().string,decorative:u().bool,ariaLabel:u().string,ariaLabelledby:u().string};const b=g;var h={error:{imgUrl:"https://digit-ui-assets.s3.ap-south-1.amazonaws.com/error-image.png",infoMessage:"CORE_SOMETHING_WENT_WRONG",buttonInfo:"ACTION_TEST_HOME"},maintenance:{imgUrl:"https://digit-ui-assets.s3.ap-south-1.amazonaws.com/maintainence-image.png",infoMessage:"CORE_UNDER_MAINTENANCE",buttonInfo:"ACTION_TEST_HOME"},notfound:{imgUrl:"https://digit-ui-assets.s3.ap-south-1.amazonaws.com/PageNotFound.png",infoMessage:"MODULE_NOT_FOUND",buttonInfo:"ACTION_TEST_HOME"}},O={sandbox:{imgUrl:"https://digit-ui-assets.s3.ap-south-1.amazonaws.com/error-image.png",infoMessage:"WRONG_TENANT_SIGN_UP",buttonInfo:"CREATE_TENANT_ERROR_BUTTON"}};const S=function(e){var t,n=Digit.Hooks.useQueryParams().type,o=void 0===n?"error":n,i=null==e||null===(t=e.errorData)||void 0===t?void 0:t.module,a=(0,r.useTranslation)().t,l=i?O[i]:h[o];return e.stateInfo,(0,s.jsx)("div",{className:"error-boundary",children:(0,s.jsxs)("div",{className:"error-container",children:[(0,s.jsx)(b,{src:l.imgUrl,alt:"error"}),(0,s.jsx)("h1",{children:a(l.infoMessage)}),(0,s.jsx)("button",{onClick:function(){var t;i?null==e||null===(t=e.errorData)||void 0===t||t.action():e.goToHome()},children:a(l.buttonInfo)})]})})};function x(e){return x="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},x(e)}function j(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,w(r.key),r)}}function w(e){var t=function(e){if("object"!=x(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==x(t)?t:t+""}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(E=function(){return!!e})()}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}var N=function(){if("undefined"==typeof window)return(0,s.jsx)("span",{});try{var e,t=(null===(e=window)||void 0===e?void 0:e.contextPath)||"",n=Digit.UserService.getType(),r="/".concat(t,"employee"===n?"/employee/user/error":"/citizen/error"),o=window.location.href;if(o.includes("employee/user/error")||o.includes("citizen/error"))return(0,s.jsx)("span",{});try{window.location.href=r}catch(e){console.warn("Navigation failed in error boundary:",e);try{window.location.replace(r)}catch(e){console.error("Both href and replace failed:",e)}}}catch(e){console.error("Error in Redircter component:",e)}return(0,s.jsx)("span",{})};const I=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=C(t),function(e,t){if(t&&("object"==x(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,E()?Reflect.construct(t,n||[],C(e).constructor):t.apply(e,n))}(this,t,[e])).state={error:null,errorStack:null,hasError:!1,module:null,action:null,info:null},n}return 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&&_(e,t)}(t,e),n=t,o=[{key:"getDerivedStateFromError",value:function(e){return{error:null==e?void 0:e.message,hasError:!0,errorStack:null==e?void 0:e.stack,module:null==e?void 0:e.module,action:null==e?void 0:e.action,info:null==e?void 0:e.info}}}],(r=[{key:"componentDidCatch",value:function(e,t){this.setState({error:null==e?void 0:e.message,hasError:!0,errorStack:null==e?void 0:e.stack,module:null==e?void 0:e.module,action:null==e?void 0:e.action,info:t})}},{key:"render",value:function(){return this.state.hasError?(0,s.jsxs)("div",{className:"error-boundary",children:[(0,s.jsx)(N,{}),(0,s.jsx)(S,{initData:this.props.initData,errorData:this.state})]}):this.props.children}}])&&j(n.prototype,r),o&&j(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(n().Component);f(778);var A=f(5053);function D(e){return D="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},D(e)}function T(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 P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach(function(t){L(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function L(e,t,n){return(t=function(e){var t=function(e){if("object"!=D(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==D(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}f(113);var k=function(o){o.modules,o.additionalComponent;var i,l,u,c,d,f=Digit.Hooks.useAccessControl(),v=f.isLoading,p=f.data,m=Digit.Utils.getMultiRootTenant(),y=(0,r.useTranslation)().t,g=(0,a.useNavigate)(),b=null===(i=Digit)||void 0===i||null===(i=i.ULBService)||void 0===i?void 0:i.getStateId(),h=(c=(0,t.useState)([{}]),d=2,function(e){if(Array.isArray(e))return e}(c)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(c,d)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n={}.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)?R(e,t):void 0}}(c,d)||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.")}()),O=h[0],S=h[1],x=Digit.Hooks.useCustomMDMS(b,"HomeScreenOrder",[{name:"CardsAndLinksOrder"}],{select:function(e){var t;return null==e||null===(t=e.HomeScreenOrder)||void 0===t?void 0:t.CardsAndLinksOrder}}),j=x.data,w=Digit.Hooks.useCustomMDMS(b,"SandBoxLanding",[{name:"AdditionalModuleLinks"}],{select:function(e){var t;return null==e||null===(t=e.SandBoxLanding)||void 0===t?void 0:t.AdditionalModuleLinks}}),E=w.data;w.isLoading,(0,t.useEffect)(function(){S(j)},[j]);var C=function(e,t){if(!e||!t)return null;var n=null==E?void 0:E.find(function(t){return t.moduleName===e.module}),r=null==n?void 0:n[t],o=null==e?void 0:e.links;return(null==o?void 0:o.find(function(e){return(null==e?void 0:e.displayName)===r}))||null},_=function(e){var t,n=null==E?void 0:E.find(function(t){return t.moduleName===e.module});return null==e||null===(t=e.links)||void 0===t?void 0:t.filter(function(e){var t=e.displayName,r="Configure_master"!==t,o=t!==(null==n?void 0:n.howItWorksLink),i=t!==(null==n?void 0:n.userManualLink);return r&&o&&i})},N=null==p?void 0:p.actions.filter(function(e){return"card"===e.url&&e.parentModule}).reduce(function(e,t){var n=t.parentModule;e[n]||(e[n]={module:n,kpis:[],icon:t.leftIcon?Digit.Utils.iconRender(t.leftIcon,"white"):"",label:Digit.Utils.locale.getTransformedLocale("".concat(n,"_CARD_HEADER")),links:[]});var r=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if("/"!=n)return-1===(null===(e=n)||void 0===e?void 0:e.indexOf("/".concat(null===(t=window)||void 0===t?void 0:t.contextPath)))&&m?n=n.replace("/sandbox-ui/employee","/sandbox-ui/".concat(b,"/employee")):n}(t.navigationURL),o=r.indexOf("?");return e[n].links.push({link:r,icon:t.leftIcon,queryParams:-1===o?null:r.substring(o),label:y(Digit.Utils.locale.getTransformedLocale("".concat(n,"_LINK_").concat(t.displayName))),displayName:t.displayName}),e},{});if(v)return(0,s.jsx)(e.Loader,{page:!1,variant:"PageLoader"});if(!N)return"";u=m?function(e){return Object.keys(e).sort(function(e,t){var n,r;return((null==O||null===(n=O.find(function(t){return"card"===t.moduleType&&t.name===e}))||void 0===n?void 0:n.order)||null)-((null==O||null===(r=O.find(function(e){return"card"===e.moduleType&&e.name===t}))||void 0===r?void 0:r.order)||null)}).reduce(function(t,n){var r,o=null==e||null===(r=e[n])||void 0===r||null===(r=r.links)||void 0===r?void 0:r.sort(function(e,t){var r,o,i=null==e?void 0:e.displayName,a=null==t?void 0:t.displayName;return((null==O||null===(r=O.find(function(e){return"link"===e.moduleType&&e.name==="".concat(n,".").concat(i.replace(/\s+/g,"_"))}))||void 0===r?void 0:r.order)||null)-((null==O||null===(o=O.find(function(e){return"link"===e.moduleType&&e.name==="".concat(n,".").concat(a.replace(/\s+/g,"_"))}))||void 0===o?void 0:o.order)||null)});return t[n]=P(P({},e[n]),{},{links:o}),t},{})}(N):N;var I=null===(l=Object.keys(u))||void 0===l?void 0:l.map(function(t,n){var r,o,i=null===(r=u)||void 0===r?void 0:r[t],a=null==i||null===(o=i.links)||void 0===o?void 0:o.find(function(e){return"Configure_master"===(null==e?void 0:e.displayName)}),l=C(i,"howItWorksLink"),c=C(i,"userManualLink"),d={icon:"SupervisorAccount",moduleName:y(null==i?void 0:i.label),metrics:[],links:Digit.Utils.getMultiRootTenant()?_(i):null==i?void 0:i.links,centreChildren:[(0,s.jsx)("div",{children:y(Digit.Utils.locale.getTransformedLocale("MODULE_CARD_DESC_".concat(t)))}),l&&(0,s.jsx)(e.Button,{variation:"teritiary",label:null==l?void 0:l.label,icon:null==l?void 0:l.icon,type:"button",size:"medium",onClick:function(){return window.open(null==l?void 0:l.link,"_blank")},style:{padding:"0px"}})],endChildren:Digit.Utils.getMultiRootTenant()?[a&&(0,s.jsx)(e.Button,{variation:"teritiary",label:null==a?void 0:a.label,icon:null==a?void 0:a.icon,type:"button",size:"medium",onClick:function(){return g(null==a?void 0:a.link)},style:{padding:"0px"}}),c&&(0,s.jsx)(e.Button,{variation:"teritiary",label:null==c?void 0:c.label,icon:null==c?void 0:c.icon,type:"button",size:"medium",onClick:function(){return window.open(null==c?void 0:c.link,"_blank")},style:{padding:"0px"}})]:null};return(0,s.jsx)(e.LandingPageCard,P({buttonSize:"medium"},d))});return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(e.LandingPageWrapper,{children:n().Children.map(I,function(e){return n().cloneElement(e)})})})};f(6034);var M=f(338);function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var B=function(n){var o,i,a=n.question,l=n.isLabelLink,u=(n.answer,n.type),c=n.actions,d=n.content,f=n.lastIndex,v=(o=(0,t.useState)(!1),i=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(o,i)||function(e,t){if(e){if("string"==typeof e)return U(e,t);var n={}.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)?U(e,t):void 0}}(o,i)||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.")}()),p=v[0],m=v[1],y=(0,r.useTranslation)().t,g=Digit.ULBService.getStateId(),b="number"===u?"ol":"ul";return(0,s.jsxs)("div",{className:"faqs border-none",onClick:function(){return m(!p)},children:[(0,s.jsxs)("div",{className:"faq-question",style:{justifyContent:"space-between",display:"flex"},children:[(0,s.jsx)("span",{children:y(a)}),(0,s.jsx)("span",{className:p?"faqicon rotate":"faqicon",style:{float:"right"},children:(0,s.jsx)(M.ArrowForward,{})})]}),(0,s.jsxs)("div",{className:"faq-answer",style:p?{display:"block"}:{display:"none"},children:[(0,s.jsx)(A.CardSectionSubText,{style:{marginTop:"1rem"},children:y(d)}),(0,s.jsx)("div",{style:{marginTop:"1rem"},children:c&&(0,s.jsx)(b,{children:c.map(function(t,n){return(0,s.jsxs)("li",{style:{listStyleType:"ul"===b?"disc":"auto",margin:"8px 0"},children:[l?null!=t&&t.label?(0,s.jsx)(e.Button,{variation:"teritiary",label:y(null==t?void 0:t.label),type:"button",size:"medium",onClick:function(){if(null!=t&&t.fulllink)window.open(null==t?void 0:t.link,"_blank");else{var e,n="https://".concat(window.location.hostname,"/").concat(null===(e=window)||void 0===e?void 0:e.globalPath,"/").concat(g);window.open("".concat(n,"/").concat(null==t?void 0:t.link),"_blank")}},style:{padding:"0px"}}):null:null!=t&&t.label?(0,s.jsxs)("strong",{children:[y(null==t?void 0:t.label),":"]}):null,y(null==t?void 0:t.description)]},n)})})})]}),f?null:(0,s.jsx)("div",{className:"cs-box-border"})]})},F=function(e){var t=e.type,n=e.title,o=e.content,i=e.actions,a=(e.style,(0,r.useTranslation)().t),l="number"===t?"ol":"ul";return(0,s.jsxs)("div",{children:[(0,s.jsx)(A.CardSectionHeader,{children:a(n)}),(0,s.jsx)(A.CardSectionSubText,{style:{marginTop:"1rem"},children:a(o)}),(0,s.jsx)("div",{style:{marginTop:"1rem"},children:i&&(0,s.jsx)(l,{children:i.map(function(e,t){return(0,s.jsxs)("li",{style:{listStyleType:"ul"===l?"disc":"auto",margin:"8px 0"},children:[null!=e&&e.label?(0,s.jsxs)("strong",{children:[a(null==e?void 0:e.label),":"]}):null," ",a(null==e?void 0:e.description)]},t)})})})]})},G=function(e){e.key,e.title,e.content;var t=e.faqs,n=e.type;return(0,r.useTranslation)().t,(0,s.jsx)("div",{style:{width:"100%"},children:(0,s.jsx)("div",{style:{width:"100%"},children:t.map(function(e,r){return(0,s.jsx)(B,{question:e.question,answer:e.answer,isLabelLink:e.isLabelLink,type:n,actions:e.answer,content:e.content,lastIndex:r===(null==t?void 0:t.length)-1},"faq_"+r)})})})};const V=function(t){var o=t.cardConfig,i=(0,r.useTranslation)().t;return(0,s.jsxs)(e.Card,{className:"sandbox-guide",style:{width:"25rem",height:"47rem",overflowY:"scroll"},children:[(0,s.jsx)(e.CardHeader,{children:i("GUIDE_TO_SETUP")}),(0,s.jsx)("div",{style:{display:"flex",flexWrap:"wrap"},children:o.map(function(e,t){return"faqs"===(null==e?void 0:e.type)?(0,s.jsx)(G,{title:e.title,type:null==e?void 0:e.type,content:e.content,faqs:e.actions},e.id):(0,s.jsxs)(n().Fragment,{children:[(0,s.jsx)(F,{type:null==e?void 0:e.type,title:e.title,content:e.content,actions:e.actions,style:e.style},e.id),t!==(null==o?void 0:o.length)-1&&(0,s.jsx)(A.BreakLine,{style:{width:"100%",border:"1px solid #d6d5d4"}})]})})})]})};var H=["onSelect","formData","control","formState"];const W=function(e){e.onSelect,e.formData,e.control,e.formState,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}(e,H);var t=(0,r.useTranslation)().t,n=Digit.Hooks.useAccessControl(),o=(n.isLoading,n.data),i=(Digit.Utils.getMultiRootTenant(),Digit.ULBService.getStateId());return(null==o?void 0:o.actions.filter(function(e){return"card"===e.url&&e.parentModule}).reduce(function(e,n){var r=n.parentModule;e[r]||(e[r]={module:r,label:Digit.Utils.locale.getTransformedLocale("".concat(r,"_CARD_HEADER")),links:[]});var o=Digit.Utils.transformURL(n.navigationURL,i),a=o.indexOf("?");return e[r].links.push({link:-1===a?o:o.substring(0,a),label:t(Digit.Utils.locale.getTransformedLocale("".concat(r,"_LINK_").concat(n.displayName))),queryParams:-1===a?null:o.substring(a),description:t(Digit.Utils.locale.getTransformedLocale("".concat(r,"_LINK_").concat(n.displayName,"_DESCRIPTION")))}),e},{}))?(0,s.jsx)(V,{cardConfig:[{id:1,type:"faqs",actions:[{question:"SANDBOX_FAQ_QUES_14",isLabelLink:!0,answer:[{label:"SANDBOX_FAQ_ANS_14_LABEL_1",fulllink:!0,link:"https://egov-digit.gitbook.io/digit-sandbox/specifications/user-manual/walkthrough-videos"}]},{question:"SANDBOX_FAQ_QUES_1",content:"SANDBOX_FAQ_CONTENT_1",isLabelLink:!0,answer:[{label:"SANDBOX_FAQ_ANS_1_LABEL_1",link:"citizen/login",description:"SANDBOX_FAQ_ANS_1_DESCRIPTION_1"},{label:"SANDBOX_FAQ_ANS_1_LABEL_2",link:"employee/user/login",description:"SANDBOX_FAQ_ANS_1_DESCRIPTION_2"}]},{question:"SANDBOX_FAQ_QUES_2",content:"SANDBOX_FAQ_CONTENT_2",answer:[{label:null,description:"SANDBOX_FAQ_ANS_2_DESCRIPTION_1"},{label:null,description:"SANDBOX_FAQ_ANS_2_DESCRIPTION_2"},{label:null,description:"SANDBOX_FAQ_ANS_2_DESCRIPTION_3"},{label:null,description:"SANDBOX_FAQ_ANS_2_DESCRIPTION_4"}]},{question:"SANDBOX_FAQ_QUES_3",content:"SANDBOX_FAQ_CONTENT_3",answer:[{label:null,description:"SANDBOX_FAQ_ANS_3_DESCRIPTION_1"},{label:null,description:"SANDBOX_FAQ_ANS_3_DESCRIPTION_2"},{label:null,description:"SANDBOX_FAQ_ANS_3_DESCRIPTION_3"},{label:null,description:"SANDBOX_FAQ_ANS_3_DESCRIPTION_4"}]},{question:"SANDBOX_FAQ_QUES_4",content:"SANDBOX_FAQ_CONTENT_4",answer:[{label:null,description:"SANDBOX_FAQ_ANS_4_DESCRIPTION_1"},{label:null,description:"SANDBOX_FAQ_ANS_4_DESCRIPTION_2"}]},{question:"SANDBOX_FAQ_QUES_5",content:"SANDBOX_FAQ_CONTENT_5",answer:[{label:"SANDBOX_FAQ_ANS_5_LABEL_1",description:"SANDBOX_FAQ_ANS_5_DESCRIPTION_1"},{label:"SANDBOX_FAQ_ANS_5_LABEL_2",description:"SANDBOX_FAQ_ANS_5_DESCRIPTION_2"},{label:"SANDBOX_FAQ_ANS_5_LABEL_3",description:"SANDBOX_FAQ_ANS_5_DESCRIPTION_3"},{label:"SANDBOX_FAQ_ANS_5_LABEL_4",description:"SANDBOX_FAQ_ANS_5_DESCRIPTION_4"},{label:"SANDBOX_FAQ_ANS_5_LABEL_5",description:"SANDBOX_FAQ_ANS_5_DESCRIPTION_5"}]},{question:"SANDBOX_FAQ_QUES_6",content:"SANDBOX_FAQ_CONTENT_6"},{question:"SANDBOX_FAQ_QUES_7",content:"SANDBOX_FAQ_CONTENT_7",answer:[{label:null,description:"SANDBOX_FAQ_ANS_7_DESCRIPTION_1"},{label:null,description:"SANDBOX_FAQ_ANS_7_DESCRIPTION_2"}]},{question:"SANDBOX_FAQ_QUES_8",content:"SANDBOX_FAQ_CONTENT_8",answer:[{label:null,description:"SANDBOX_FAQ_ANS_8_DESCRIPTION_1"},{label:null,description:"SANDBOX_FAQ_ANS_8_DESCRIPTION_2"},{label:null,description:"SANDBOX_FAQ_ANS_8_DESCRIPTION_3"},{label:null,description:"SANDBOX_FAQ_ANS_8_DESCRIPTION_4"}]},{question:"SANDBOX_FAQ_QUES_9",content:"SANDBOX_FAQ_CONTENT_9",answer:[{label:"SANDBOX_FAQ_ANS_9_LABEL_1",description:"SANDBOX_FAQ_ANS_9_DESCRIPTION_1"},{label:"SANDBOX_FAQ_ANS_9_LABEL_2",description:"SANDBOX_FAQ_ANS_9_DESCRIPTION_2"}]},{question:"SANDBOX_FAQ_QUES_10",content:"SANDBOX_FAQ_CONTENT_10",answer:[{label:"SANDBOX_FAQ_ANS_10_LABEL_1",description:"SANDBOX_FAQ_ANS_10_DESCRIPTION_1"},{label:"SANDBOX_FAQ_ANS_10_LABEL_2",description:"SANDBOX_FAQ_ANS_10_DESCRIPTION_2"},{label:"SANDBOX_FAQ_ANS_10_LABEL_3",description:"SANDBOX_FAQ_ANS_10_DESCRIPTION_3"},{label:"SANDBOX_FAQ_ANS_10_LABEL_4",description:"SANDBOX_FAQ_ANS_10_DESCRIPTION_4"}]},{question:"SANDBOX_FAQ_QUES_11",content:"SANDBOX_FAQ_CONTENT_11"},{question:"SANDBOX_FAQ_QUES_12",content:"SANDBOX_FAQ_CONTENT_12"},{question:"SANDBOX_FAQ_QUES_13",content:"SANDBOX_FAQ_CONTENT_13"}]}]}):""};function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var X=function(e,t,n){var r=null==e?void 0:e["".concat(t)];r&&r.map(function(e){Digit.Utils.getMultiRootTenant()&&(e.navigationURL=e.navigationURL.replace("/sandbox-ui/citizen","/sandbox-ui/".concat(Digit.ULBService.getStateId(),"/citizen"))),e.link=e.navigationURL,e.i18nKey=n(e.name)});var o,i={links:null==r?void 0:r.reverse(),header:Digit.Utils.locale.getTransformedLocale("ACTION_TEST_".concat(t)),iconName:"CITIZEN_".concat(t,"_ICON")};return"FSM"===t&&[{role:"FSM_DSO",from:"/".concat(null===(o=window)||void 0===o?void 0:o.contextPath,"/citizen/fsm/dso-dashboard"),dashoardLink:"CS_LINK_DSO_DASHBOARD",loginLink:"CS_LINK_LOGIN_DSO"}].map(function(e){var t,r,o,a=e.role,l=e.from,u=e.loginLink,s=e.dashoardLink;Digit.UserService.hasAccess(a)?null==i||null===(t=i.links)||void 0===t||t.push({link:l,i18nKey:n(s)}):null==i||null===(r=i.links)||void 0===r||r.push({link:"/".concat(null===(o=window)||void 0===o?void 0:o.contextPath,"/citizen/login"),state:{role:"FSM_DSO",from:l},i18nKey:n(u)})}),i},q=function(t){var o,i=t.modules,a=t.getCitizenMenu,l=t.fetchedCitizen,u=t.isLoading,c=i.filter(function(e){return"Payment"===e.code})[0],d=i.filter(function(e){return"Payment"!==e.code}),f=[c].concat(function(e){if(Array.isArray(e))return z(e)}(o=d)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||function(e,t){if(e){if("string"==typeof e)return z(e,t);var n={}.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)?z(e,t):void 0}}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),v=(0,r.useTranslation)().t;return u?(0,s.jsx)(A.Loader,{}):(0,s.jsx)(n().Fragment,{children:(0,s.jsxs)("div",{className:"citizen-all-services-wrapper",children:[location.pathname.includes("sanitation-ui/citizen/all-services")||location.pathname.includes("sandbox-ui")&&location.pathname.includes("all-services")?null:(0,s.jsx)(e.BackLink,{onClick:function(){return window.history.back()}}),(0,s.jsx)("div",{className:"citizenAllServiceGrid",children:f.filter(function(e){return e}).map(function(t,r){var o,i,u,c,d=t.code;return l&&(i=l?X(a,d,v):void 0),(null===(o=i)||void 0===o||null===(o=o.links)||void 0===o?void 0:o.length)>0?(0,s.jsx)(A.CitizenHomeCard,{header:v(null===(u=i)||void 0===u?void 0:u.header),links:null===(c=i)||void 0===c||null===(c=c.links)||void 0===c||null===(c=c.filter(function(e){return null==e?void 0:e.link}))||void 0===c?void 0:c.sort(function(e,t){return(null==e?void 0:e.orderNumber)-(null==t?void 0:t.orderNumber)}),Icon:function(){return function(t){switch(t){case"PT":default:return(0,s.jsx)(e.CustomSVG.PTIcon,{className:"fill-path-primary-main"});case"WS":return(0,s.jsx)(e.CustomSVG.WSICon,{className:"fill-path-primary-main"});case"FSM":return(0,s.jsx)(e.CustomSVG.FSMIcon,{className:"fill-path-primary-main"});case"MCollect":return(0,s.jsx)(e.CustomSVG.MCollectIcon,{className:"fill-path-primary-main"});case"PGR":return(0,s.jsx)(e.CustomSVG.PGRIcon,{className:"fill-path-primary-main"});case"TL":return(0,s.jsx)(e.CustomSVG.TLIcon,{className:"fill-path-primary-main"});case"OBPS":return(0,s.jsx)(e.CustomSVG.OBPSIcon,{className:"fill-path-primary-main"});case"Bills":return(0,s.jsx)(e.CustomSVG.BillsIcon,{className:"fill-path-primary-main"})}}(d)},Info:"OBPS"===d?function(){return(0,s.jsx)(A.CitizenInfoLabel,{style:{margin:"0px",padding:"10px"},info:v("CS_FILE_APPLICATION_INFO_LABEL"),text:v("BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL")})}:null,isInfo:"OBPS"===d}):(0,s.jsx)(n().Fragment,{})})})]})})},Q=function(t){var r=t.modules,o=t.additionalComponent;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"employee-app-container digit-home-employee-app",children:(0,s.jsx)(e.LandingPageWrapper,{children:null==r?void 0:r.map(function(e,t){var r=e.code,o=Digit.ComponentRegistryService.getComponent("".concat(r,"Card"))||function(){return(0,s.jsx)(n().Fragment,{})};return(0,s.jsx)(o,{},t)})})}),o&&(null==o?void 0:o.length)>0&&o.map(function(e){var t="string"==typeof e?Digit.ComponentRegistryService.getComponent(e):null;return t?(0,s.jsx)("div",{className:"additional-component-wrapper",children:(0,s.jsx)(t,{})}):null})]})},Z=function(e){var t=e.userType,n=e.modules,r=e.getCitizenMenu,o=e.fetchedCitizen,i=e.isLoading,a=e.additionalComponent;if("citizen"===t)return(0,s.jsx)(q,{modules:n,getCitizenMenu:r,fetchedCitizen:o,isLoading:i});var l=Digit.UserService.hasAccess("SUPERUSER")&&Digit.Utils.getMultiRootTenant();return Digit.Utils.getRoleBasedHomeCard()?(0,s.jsxs)("div",{className:l?"homeWrapper":"",children:[(0,s.jsx)(k,{modules:n,additionalComponent:a}),l&&!window.Digit.Utils.browser.isMobile()?(0,s.jsx)(W,{}):null]}):(0,s.jsx)(Q,{modules:n,additionalComponent:a})};function Y(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return K(e,t);var n={}.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)?K(e,t):void 0}}(e,t)||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.")}()}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}f(3362);var J=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(""==t)return e;for(;null!==(r=e)&&void 0!==r&&r.includes(t);){var r,o;e=null===(o=e)||void 0===o?void 0:o.replace(t,n)}return e};const $=function(n){var r,o,i=Y((0,t.useState)(null),2),l=i[0],u=i[1],c=Y((0,t.useState)([]),2),d=c[0],f=c[1],v=Y((0,t.useState)([]),2),p=(v[0],v[1],(0,a.useNavigate)()),m=(n.dropdown,Digit.Utils.getMultiRootTenant());return(0,t.useEffect)(function(){var e,t=Digit.SessionStorage.get("citizen.userRequestObject"),n=[],r=[];null==t||null===(e=t.info)||void 0===e||null===(e=e.roles)||void 0===e||e.forEach(function(e){return n.push(e.tenantId)});var o=n.filter(function(e,t,n){return n.indexOf(e)===t});null==o||o.forEach(function(e){var t;r.push({label:"TENANT_TENANTS_".concat(null===(t=J(e,".","_"))||void 0===t?void 0:t.toUpperCase()),value:e})}),null==r||r.filter(function(e){return e.value==Digit.SessionStorage.get("Employee.tenantId")}),f(r)},[l]),(0,s.jsx)("div",{style:null!=n&&n.mobileView?{color:"#767676"}:{},children:m&&1==d.length?(0,s.jsx)(e.CardText,{style:{color:"#363636"},children:null==d||null===(r=d[0])||void 0===r?void 0:r.value}):(0,s.jsx)(e.Dropdown,{t:null==n?void 0:n.t,option:d,selected:d.find(function(e){return e.value===(null==l?void 0:l.value)}),optionKey:"label",select:function(e){var t,n,r,o=Digit.SessionStorage.get("citizen.userRequestObject"),i=null===(t=Digit.SessionStorage.get("citizen.userRequestObject"))||void 0===t||null===(t=t.info)||void 0===t||null===(t=t.roles)||void 0===t?void 0:t.filter(function(t){return t.tenantId===e.value});if((null==i?void 0:i.length)>0&&(o.info.roles=i,o.info.tenantId=null==e?void 0:e.value),Digit.SessionStorage.set("Employee.tenantId",null==e?void 0:e.value),Digit.UserService.setUser(o),u(e),"undefined"!=typeof window&&null!==(n=window.location)&&void 0!==n&&null!==(n=n.href)&&void 0!==n&&n.includes("/".concat(null===(r=window)||void 0===r?void 0:r.contextPath,"/employee/"))){var a,l,s=(null===(a=location.state)||void 0===a?void 0:a.from)||"/".concat(null===(l=window)||void 0===l?void 0:l.contextPath,"/employee");p(s,{replace:!0})}try{"undefined"!=typeof window&&window.location.reload()}catch(e){console.warn("Failed to reload page:",e)}},freeze:!0,customSelector:(0,s.jsx)("label",{className:"cp",children:null==n?void 0:n.t("TENANT_TENANTS_".concat(null===(o=J(Digit.SessionStorage.get("Employee.tenantId"),".","_"))||void 0===o?void 0:o.toUpperCase()))})})})};function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const te=function(o){var i,a,l,u=o.dropdown||!1,c=Digit.Hooks.useStore.getInitData(),d=c.data,f=c.isLoading,v=d||{},p=v.languages,m=v.stateInfo,y=(0,r.useTranslation)().t,g=Digit.StoreData.getCurrentLanguage(),b=(a=(0,t.useState)(g),l=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(a,l)||function(e,t){if(e){if("string"==typeof e)return ee(e,t);var n={}.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)?ee(e,t):void 0}}(a,l)||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.")}()),h=b[0],O=b[1],S=function(e){O(e.value),Digit.LocalizationService.changeLanguage(e.value,m.code)};return f?null:u?(0,s.jsx)("div",{children:(0,s.jsx)(e.Dropdown,{className:"language-dropdown",option:p,selected:null==p?void 0:p.find(function(e){return(null==e?void 0:e.value)===g}),optionKey:"label",select:S,freeze:!0,customSelector:(0,s.jsx)("label",{className:"cp",children:y(null==p||null===(i=p.find(function(e){return(null==e?void 0:e.value)===h}))||void 0===i?void 0:i.label)})})}):(0,s.jsxs)(n().Fragment,{children:[(0,s.jsx)("div",{style:{marginBottom:"5px"},children:"Language"}),(0,s.jsx)("div",{className:"language-selector",children:p.map(function(t,n){return(0,s.jsx)("div",{className:"language-button-container",children:(0,s.jsx)(e.Button,{label:t.label,onClick:function(){return S(t)},variation:t.value===h?"primary":""})},n)})})]})};function ne(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return re(s,"_invoke",function(n,r,o){var i,l,u,s=0,c=o||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return i=t,l=0,u=e,f.n=n,a}};function v(n,r){for(l=n,u=r,t=0;!d&&s&&!o&&t<c.length;t++){var o,i=c[t],v=f.p,p=i[2];n>3?(o=p===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=v&&((o=n<2&&v<i[1])?(l=0,f.v=r,f.n=i[1]):v<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,f.n=p,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,c,p){if(s>1)throw TypeError("Generator is already running");for(d&&1===c&&v(c,p),l=c,u=p;(t=l<2?e:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),v(l,u)):f.n=u:f.v=u);try{if(s=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(t){i=e,l=1,u=t}finally{s=1}}return{value:t,done:d}}}(n,o,i),!0),s}var a={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(re(t={},r,function(){return this}),t),d=s.prototype=l.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,re(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=s,re(d,"constructor",s),re(s,"constructor",u),u.displayName="GeneratorFunction",re(s,o,"GeneratorFunction"),re(d),re(d,o,"Generator"),re(d,r,function(){return this}),re(d,"toString",function(){return"[object Generator]"}),(ne=function(){return{w:i,m:f}})()}function re(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}re=function(e,t,n,r){function i(t,n){re(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},re(e,t,n,r)}function oe(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,o)}function ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const ae=function(t){var r,o,i,l,u,c,d,f,v,p=t.t,m=t.stateInfo,y=t.toggleSidebar,g=t.isSidebarOpen,h=t.handleLogout,O=t.userDetails,S=t.CITIZEN,x=t.cityDetails,j=t.mobileView,w=t.userOptions,E=t.handleUserDropdownSelection,C=t.logoUrl,_=t.logoUrlWhite,N=t.showLanguageChange,I=void 0===N||N,D=(f=n().useState(null),v=2,function(e){if(Array.isArray(e))return e}(f)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(f,v)||function(e,t){if(e){if("string"==typeof e)return ie(e,t);var n={}.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)?ie(e,t):void 0}}(f,v)||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.")}()),T=D[0],P=D[1];n().useEffect(function(){var e=function(){var e,t=(e=ne().m(function e(){var t,n,r,o,i,a,l;return ne().w(function(e){for(;;)switch(e.n){case 0:if(n=Digit.Utils.getMultiRootTenant()?Digit.ULBService.getStateId():Digit.ULBService.getCurrentTenantId(),!(r=null==O||null===(t=O.info)||void 0===t?void 0:t.uuid)){e.n=2;break}return e.n=1,Digit.UserService.userSearch(n,{uuid:[r]},{});case 1:(o=e.v)&&o.user&&o.user.length&&(a=o.user[0],l=null==a||null===(i=a.photo)||void 0===i?void 0:i.split(","),P(null==l?void 0:l.at(0)));case 2:return e.a(2)}},e)}),function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){oe(i,r,o,a,l,"next",e)}function l(e){oe(i,r,o,a,l,"throw",e)}a(void 0)})});return function(){return t.apply(this,arguments)}}();e()},[null!==T,null==O||null===(r=O.info)||void 0===r?void 0:r.uuid]);var L,R,k=Digit.ULBService.getCitizenCurrentTenant(!0),M=(0,a.useNavigate)(),U=(0,a.useLocation)().pathname,B=Digit.Hooks.useNotificationCount({tenantId:k,config:{enabled:"EMPLOYEE"!==(null===(L=Digit.UserService)||void 0===L||null===(L=L.getUser())||void 0===L||null===(L=L.info)||void 0===L?void 0:L.type)&&"CITIZEN"===(null===(R=Digit.UserService)||void 0===R||null===(R=R.getUser())||void 0===R||null===(R=R.info)||void 0===R?void 0:R.type)&&!!k}}),F=B.data,G=(void 0===F?{}:F).unreadCount,V=B.isSuccess;if(S)return(0,s.jsx)("div",{children:(0,s.jsx)(A.TopBar,{img:null==m?void 0:m.logoUrlWhite,isMobile:!0,toggleSidebar:function(){Digit.clikOusideFired?Digit.clikOusideFired=!1:y(!0)},logoUrl:null==m?void 0:m.logoUrlWhite,onLogout:h,userDetails:O,notificationCount:G<99?G:99,notificationCountLoaded:V,cityOfCitizenShownBesideLogo:p(k),onNotificationIconClick:function(){var e;M("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/engagement/notifications"))},hideNotificationIconOnSomeUrlsWhenNotLoggedIn:function(e){var t,n,r;return(null===(t=Digit.UserService)||void 0===t||null===(t=t.getUser())||void 0===t||!t.access_token)&&["/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/citizen/select-language"),"/".concat(null===(r=window)||void 0===r?void 0:r.contextPath,"/citizen/select-location")].includes(e)}(U),changeLanguage:j?null:(0,s.jsx)(te,{dropdown:!0})})});var H=!(null==O||!O.access_token),W=null===(o=Digit.ComponentRegistryService)||void 0===o?void 0:o.getComponent("CustomEmployeeTopBar");return W?(0,s.jsx)(W,{t:p,stateInfo:m,toggleSidebar:y,isSidebarOpen:g,handleLogout:h,userDetails:O,CITIZEN:S,cityDetails:x,mobileView:j,userOptions:w,handleUserDropdownSelection:E,logoUrl:C,showLanguageChange:I,loggedin:H}):(0,s.jsx)(e.Header,{actionFields:[(0,s.jsx)($,{dropdown:!0,t:p}),I&&(0,s.jsx)(te,{dropdown:!0}),(null==O?void 0:O.access_token)&&(0,s.jsx)(e.Dropdown,{option:w,optionKey:"name",profilePic:T||(null==O||null===(i=O.info)||void 0===i?void 0:i.name)||(null==O||null===(l=O.info)||void 0===l||null===(l=l.userInfo)||void 0===l?void 0:l.name)||"Employee",select:E,showArrow:!0,menuStyles:{marginTop:"1rem"},theme:"light"})],onHamburgerClick:function(){y()},className:"",img:C,logoWidth:"48px",logoHeight:"48px",logo:H?null==x?void 0:x.logoId:null==m?void 0:m.statelogo,onImageClick:function(){},onLogoClick:function(){},props:{},showDeafultImg:!0,style:{},theme:"light",ulb:H?null!=x&&null!==(u=x.city)&&void 0!==u&&u.ulbGrade?(0,s.jsxs)(s.Fragment,{children:[p(null==x?void 0:x.i18nKey).toUpperCase()," ",p("ULBGRADE_".concat(null==x||null===(c=x.city)||void 0===c?void 0:c.ulbGrade.toUpperCase().replace(" ","_").replace(".","_"))).toUpperCase()]}):(0,s.jsx)(b,{className:"state",src:_,alt:"State Logo"}):(0,s.jsxs)(s.Fragment,{children:[p("MYCITY_".concat(null==m||null===(d=m.code)||void 0===d?void 0:d.toUpperCase(),"_LABEL"))," ",p("MYCITY_STATECODE_LABEL")]})})};f(8980),f(4554);var le="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAO4AAADUCAMAAACs0e/bAAAAM1BMVEXK0eL////Dy97GzuD4+fvL0uPg5O7T2efb4OvR1+Xr7vTk5/Df4+37/P3v8fbO1eTt8PUsnq5FAAAGqElEQVR4nO2d25ajIBBFCajgvf//a0eMyZgEjcI5xgt7Hmatme507UaxuJXidiDqjmSgeVIMlB1ZR1WZAf2gbdu0QwixSYzjOJPmHurfEGEfY9XzjNGG9whQCeVAuv5xQEySLtR9hPuIcwj0EeroN5m3D1IbsbgHK0esiQ9MKsqXVr8Hm/a/Pulk6wihpCIXBw3dh7bTvRBt9+dC5NfS1VH3xETdM3MxXRN1T0zUPTNR98xcS1dlV9NNfx3DhkTdM6PKqHteVBF1z0vU5f0sKdpc2zWLKutXrjJjdLvpesRmukqYonauPhXpdsLb6CppmpnltsYIuY2yavi6Mi2/rzAWm1zUfF0limVLqkZyA+mDYevKBS37aGC+L1lX5e7uyU1Cv565uiua9k5LFqbqqrnu2I3m+jJ11ZoLeRtfmdB0Uw/ZDsP0VTxdn7a1VERfmq7XlXyn5D2QWLoq8bZlPoBJumphJjVBw/Ll6CoTZGsTDs4NrGqKbqBth8ZHJUi6cn168QmleSm6GmB7Kxm+6obXlf7PoDHosCwM3QpiS2legi6ocSl3L0G3BdneDDgwQdENfeY+SfDJBkF37ZB+GvwzA6/rMaafAn8143VhPZWdjMWG1oHXhdnemgPoAvLlB/iZyRTfVeF06wPoQhJmlm4bdcOAZRlRN5gcPc5SoPEQR1fDdbOo6wn+uYvXxY0QCLom6gYROKH+Aj5nvphuFXWDiLpRdxl/19LFT95k6CHCrnW7pCDqBn1i1PUFvii2c11oZOJ6usWeH0RRNzC4Zs+6FTi2nevCVwCjbugnXklX5fkfTldL8PEilUB1kfNyN1u9MME2sATr4lbuB7AjfLAuvsRm1A0g6gYRdcPAjvBlje2Z8brI8OC68AcRdlCkwLohx2mcZMjw9q+LzarQurjtnwPYAydX08WecECO/u6Ad0GBdYG7jO5gB4Ap+PwKcA9ZT43dn4/W9TyiPAn4OAJaF7h3uwe8StSCddFdM3jqFa2LvnnB5zzhuuBBAjY4gi50cg694gnXhTYvfMdrjtcFZhrwE9r41gUem8IXWMC3LrBzxh+a0gRd1N1LOK7M0IUUGuggvEmHoStA2/MJh7MpupiDU4TzjhxdzLAoO4ouZvqVURbFMHQlZD6SUeWHoguZsSLUGegrehA+FZFowPdUWTi6iMoZlIpGGUUXkDbjj/9ZOLqAQS/+GIKl5BQOCn/ycqpzkXSDm5dU7ZWkG7wUyGlcmm7g5Ux56AqirgoaJ7BeokPTDbp9CbVunjFxPrl7+HqnkrSq1Da7JX20f3dV8yJi6voO81mX8vV0mx3qUsZCPRfTlVRdz2EvdufYGDvNQvvwqHtmXd+a1ITinwNcXc+lT6JuzdT1XDyBn/x7wtX1HCQQdW9MXc8xArGrirowfLeUEbMqqq6f7TF1lfRdOuGNiGi6SpT+WxY06xUfNN2wBfyE9I4tlm7w5hvOPDNJN3yNiLMipji6gE3chKhouoCtN5x3QlF0EZt8OW/8ougitqJQlk1aii7iFC9l0MvRReyao7xNjKML2Z/PuHlzhi5mFxljiZeiC9rPTEisNEMX9KYAwo5Xhi7qaA3hamboYm7dG+NVrXhdaYDv5zFaQZsYrCtbbAGnjkQDX2+J1FXCwOsqWOpKoIQNTFdqYBWydxqNqUoG0pVpCS+H8kaJaGKErlIaXj7CRRE+gRWuKwW9YZ80oVOUgbpdT0zpnSZJTIiwCtJVelvXntr4P5j6BWfPb5Wcx84C4cq3hb11lco2u2Mdwp6XdJ/Ne3wb8DWdfiRenZaXrhLwOj4e+GQeHroy3YOspS7TlU28Wle2m2QUS0mqdcbrdNW+ZHsSsyK7tBfm0q/dWcv+Z3mytVx3t7KWulqUe6ilunu8jF8pFwgv1FXp3mUt35OtRbr7eM4u4Gs6vUBXgeuHc5kfE/cbvWZtkROLm1DMtLCy80tzsu2PRj0hTI8fvrQuvsjlJkyutszq+m423wHaLTyniy/XuiGZ84LuT+m5ZfNfRxyGs7LXZOvia7VujatUwVTrIt+Q/Csc7Tuhe+BOakT10b4TuoiiJjvgU9emTO42PwEfBa+cuodKkuf42DXr1D3JpXz73Hnn0j10evHKe+nufgfUm+7B84sX9FfdEzXux2DBpWuKokkCqN/5pa/8pmvnL+RGKCddCGmatiPyPB/+ekO/M/q/7uvbt22kTt3zEnXPzCV13T3Gel4/6NduDu66xRvlPNkM1RjjxUdv+4WhGx6TftD19Q/dfzpwcHO+rE3fAAAAAElFTkSuQmCC";const ue=function(t){var n=t.onSelect,o=t.onCancel,i=t.onDismiss,a=t.PopupStyles,l=t.isDisabled,u=t.hideSubmit,c=(0,r.useTranslation)().t,d=[(0,s.jsx)("div",{children:(0,s.jsxs)(e.CardText,{children:[c("CORE_LOGOUT_WEB_CONFIRMATION_MESSAGE")+" ",(0,s.jsx)("strong",{children:c("CORE_LOGOUT_MESSAGE")})]})})],f=[(0,s.jsx)(e.Button,{type:"button",size:"large",variation:"secondary",label:c("CORE_LOGOUT_CANCEL"),className:"logout-cancel-button",onClick:o}),(0,s.jsx)(e.Button,{type:"button",size:"large",variation:"primary",label:c("CORE_LOGOUT_WEB_YES"),formId:"modal-action",onClick:n,isDisabled:l})],v=[(0,s.jsx)(e.Button,{type:"button",size:"large",variation:"digit-action-cancel",label:c("CORE_LOGOUT_CANCEL"),className:"logout-cancel-button",onClick:o})];return(0,s.jsx)(e.PopUp,{type:"default",children:d,heading:c("CORE_LOGOUT_WEB_HEADER"),footerChildren:u?v:f,sortFooterButtons:!0,onClose:i,className:"digit-logout-popup-wrapper",onOverlayClick:i,equalWidthButtons:!0,style:a})};function se(e){return se="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},se(e)}function ce(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 de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(n),!0).forEach(function(t){fe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ce(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fe(e,t,n){return(t=function(e){var t=function(e){if("object"!=se(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=se(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==se(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ve(e){return function(e){if(Array.isArray(e))return ye(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||me(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pe(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||me(e,t)||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.")}()}function me(e,t){if(e){if("string"==typeof e)return ye(e,t);var n={}.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)?ye(e,t):void 0}}function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ge=function(e){var t=e.info,n=(e.stateName,e.t);return(0,s.jsxs)("div",{className:"profile-section",children:[(0,s.jsx)("div",{className:"imageloader imageloader-loaded",children:(0,s.jsx)(b,{className:"img-responsive img-circle img-Profile",src:le,alt:"Profile Logo"})}),(0,s.jsx)("div",{id:"profile-name",className:"label-container name-Profile",children:(0,s.jsxs)("div",{className:"label-text",children:[" ",null==t?void 0:t.name," "]})}),(0,s.jsx)("div",{id:"profile-location",className:"label-container loc-Profile",children:(0,s.jsxs)("div",{className:"label-text",children:[" ",null==t?void 0:t.mobileNumber," "]})}),(null==t?void 0:t.emailId)&&(0,s.jsx)("div",{id:"profile-emailid",className:"label-container loc-Profile",children:(0,s.jsxs)("div",{className:"label-text",children:[" ",t.emailId," "]})}),(0,s.jsx)("div",{className:"profile-divider"}),window.location.href.includes("/employee")&&!window.location.href.includes("/employee/user/login")&&!window.location.href.includes("employee/user/language-selection")&&(0,s.jsx)($,{t:n,mobileView:!0})]})},be={CommonPTIcon:(0,s.jsx)(A.PTIcon,{className:"icon"}),OBPSIcon:(0,s.jsx)(A.OBPSIcon,{className:"icon"}),propertyIcon:(0,s.jsx)(A.PropertyHouse,{className:"icon"}),TLIcon:(0,s.jsx)(A.CaseIcon,{className:"icon"}),PGRIcon:(0,s.jsx)(A.PGRIcon,{className:"icon"}),FSMIcon:(0,s.jsx)(A.FSMIcon,{className:"icon"}),WSIcon:(0,s.jsx)(A.WSICon,{className:"icon"}),MCollectIcon:(0,s.jsx)(A.MCollectIcon,{className:"icon"}),BillsIcon:(0,s.jsx)(A.CollectionIcon,{className:"icon"}),BirthIcon:(0,s.jsx)(A.BirthIcon,{className:"icon"}),DeathIcon:(0,s.jsx)(A.DeathIcon,{className:"icon"}),FirenocIcon:(0,s.jsx)(A.FirenocIcon,{className:"icon"}),HomeIcon:(0,s.jsx)(A.HomeIcon,{className:"icon"}),EditPencilIcon:(0,s.jsx)(A.EditPencilIcon,{className:"icon"}),LogoutIcon:(0,s.jsx)(A.LogoutIcon,{className:"icon"}),Phone:(0,s.jsx)(A.Phone,{className:"icon"})};const he=function(e){var o,i,l,u=e.linkData,c=e.islinkDataLoading,d=(0,r.useTranslation)().t,f=(0,a.useNavigate)(),v=(0,a.useLocation)().pathname,p=Digit.Hooks.useStore.getInitData(),m=p.data,y=p.isFetched,g=(m||{}).stateInfo,b=Digit.UserService.getUser(),h=window.Digit.Utils.browser.isMobile(),O=pe((0,t.useState)(!1),2),S=O[0],x=(O[1],pe((0,t.useState)(!1),2)),j=(x[0],x[1]),w=pe((0,t.useState)(!1),2),E=w[0],C=w[1],_=function(){C(!1)};if(c)return(0,s.jsx)(A.Loader,{});var N=function(){var e;f("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/user/profile"))},I=ve(function(e,t,n){return[{type:"component",element:"LANGUAGE",action:(0,s.jsx)(te,{}),icon:"LanguageIcon"},{id:"login-btn",element:"LOGIN",text:e("CORE_COMMON_LOGIN"),icon:(0,s.jsx)(A.LogoutIcon,{className:"icon"}),populators:{onClick:n}}]}(d,0,function(){var e;f("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/login"))}));I=I.filter(function(e){return"LANGUAGE"!==e.element});var D,T,P,L,R,k,M=Digit.ULBService.getCurrentTenantId(),U=function(e){var t,n,r=e.item,o=(null==r?void 0:r.icon)||(null===(t=r.icon)||void 0===t||null===(t=t.type)||void 0===t?void 0:t.name),i=o?be[o]:be.BillsIcon;n="component"===r.type?r.action:r.text;var l=function(){return(0,s.jsxs)("span",de(de({className:"menu-item"},r.populators),{},{children:[i,(0,s.jsx)("div",{className:"menu-label",children:n})]}))};return"external-link"===r.type?(0,s.jsx)("a",{href:r.link,children:(0,s.jsx)(l,{})}):"link"===r.type?(0,s.jsx)(a.Link,{to:null==r?void 0:r.link,children:(0,s.jsx)(l,{})}):(0,s.jsx)(l,{})};return y&&b&&b.access_token&&"CITIZEN"===(null==b||null===(o=b.info)||void 0===o?void 0:o.type)&&(D=(0,s.jsx)(ge,{info:null==b?void 0:b.info,stateName:null==g?void 0:g.name,t:d}),I=I.filter(function(e){return"login-btn"!==(null==e?void 0:e.id)}),I=[].concat(ve(I),[{type:"link",icon:"HomeIcon",element:"HOME",text:d("COMMON_BOTTOM_NAVIGATION_HOME"),link:S?"/".concat(null===(T=window)||void 0===T?void 0:T.contextPath,"/employee"):"/".concat(null===(P=window)||void 0===P?void 0:P.contextPath,"/citizen"),populators:{onClick:function(){var e;f("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/all-services"))}}},{text:d("EDIT_PROFILE"),element:"PROFILE",icon:"EditPencilIcon",populators:{onClick:N}},{text:d("CORE_COMMON_LOGOUT"),element:"LOGOUT",icon:"LogoutIcon",populators:{onClick:function(){j(!1),C(!0)}}},{text:(0,s.jsxs)(n().Fragment,{children:[d("CS_COMMON_HELPLINE"),(0,s.jsxs)("div",{className:"telephone",style:{marginTop:"-10%"},children:[null==m||null===(L=m.tenants)||void 0===L?void 0:L.map(function(e){var t,n,r,o;e.code===M?("tel:".concat(null==m||null===(t=m.tenants)||void 0===t?void 0:t[e].contactNumber),null==m||null===(n=m.tenants)||void 0===n||n[e].contactNumber):("tel:".concat(null==m||null===(r=m.tenants)||void 0===r?void 0:r[0].contactNumber),null==m||null===(o=m.tenants)||void 0===o||o[0].contactNumber)}),(0,s.jsx)("div",{className:"link",children:(0,s.jsx)("a",{href:"tel:".concat(null==m||null===(R=m.tenants)||void 0===R?void 0:R[0].contactNumber),children:null==m||null===(k=m.tenants)||void 0===k?void 0:k[0].contactNumber})})]})]}),element:"Helpline",icon:"Phone"}])),null===(i=Object.keys(u))||void 0===i||null===(i=i.sort(function(e,t){return t.localeCompare(e)}))||void 0===i||i.map(function(e){var t,n,r,o,i;(null===(t=u[e][0])||void 0===t?void 0:t.sidebar)==="".concat(window.contextPath,"-links")&&I.splice(1,0,{type:null!==(n=u[e][0])&&void 0!==n&&null!==(n=n.sidebarURL)&&void 0!==n&&n.includes(null===(r=window)||void 0===r?void 0:r.contextPath)?"link":"external-link",text:d("ACTION_TEST_".concat(Digit.Utils.locale.getTransformedLocale(e))),links:u[e],icon:null===(o=u[e][0])||void 0===o?void 0:o.leftIcon,link:null===(i=u[e][0])||void 0===i?void 0:i.sidebarURL})}),(0,s.jsx)(n().Fragment,{children:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{style:{height:"100%",width:"100%",top:"0px",backgroundColor:"rgba(0, 0, 0, 0.54)",pointerzevents:"auto"}}),(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:h?"calc(100vh - 56px)":"auto",zIndex:"99"},children:[D,(0,s.jsx)("div",{className:"drawer-desktop",children:null===(l=I)||void 0===l?void 0:l.map(function(e,t){return(0,s.jsx)("div",{className:"sidebar-list ".concat(v===(null==e?void 0:e.link)||v===(null==e?void 0:e.sidebarURL)?"active":""),children:(0,s.jsx)(U,{item:e})},t)})})]}),(0,s.jsx)("div",{children:E&&(0,s.jsx)(ue,{onSelect:function(){var e;Digit.Utils.getMultiRootTenant()?(Digit.UserService.logout(),C(!1),window.location.href="/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/login")):(Digit.UserService.logout(),C(!1))},onCancel:_,onDismiss:_})})]})})};function Oe(e){return Oe="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},Oe(e)}function Se(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 xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach(function(t){je(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function je(e,t,n){return(t=function(e){var t=function(e){if("object"!=Oe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Oe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Oe(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function we(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return Ee(s,"_invoke",function(n,r,o){var i,l,u,s=0,c=o||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return i=t,l=0,u=e,f.n=n,a}};function v(n,r){for(l=n,u=r,t=0;!d&&s&&!o&&t<c.length;t++){var o,i=c[t],v=f.p,p=i[2];n>3?(o=p===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=v&&((o=n<2&&v<i[1])?(l=0,f.v=r,f.n=i[1]):v<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,f.n=p,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,c,p){if(s>1)throw TypeError("Generator is already running");for(d&&1===c&&v(c,p),l=c,u=p;(t=l<2?e:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),v(l,u)):f.n=u:f.v=u);try{if(s=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(t){i=e,l=1,u=t}finally{s=1}}return{value:t,done:d}}}(n,o,i),!0),s}var a={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(Ee(t={},r,function(){return this}),t),d=s.prototype=l.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,Ee(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=s,Ee(d,"constructor",s),Ee(s,"constructor",u),u.displayName="GeneratorFunction",Ee(s,o,"GeneratorFunction"),Ee(d),Ee(d,o,"Generator"),Ee(d,r,function(){return this}),Ee(d,"toString",function(){return"[object Generator]"}),(we=function(){return{w:i,m:f}})()}function Ee(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ee=function(e,t,n,r){function i(t,n){Ee(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},Ee(e,t,n,r)}function Ce(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,o)}function _e(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){Ce(i,r,o,a,l,"next",e)}function l(e){Ce(i,r,o,a,l,"throw",e)}a(void 0)})}}function Ne(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ie(e,t);var n={}.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)?Ie(e,t):void 0}}(e,t)||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.")}()}function Ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ae=function(n){n.isOpen;var o,i,l,u,c=n.isMobile,d=void 0!==c&&c,f=n.toggleSidebar,v=n.onLogout,p=n.isEmployee,m=void 0!==p&&p,y=n.linkData,g=n.islinkDataLoading,b=n.userProfile,h=(Digit.Utils.getMultiRootTenant(),Digit.Hooks.useStore.getInitData()),O=h.data,S=h.isFetched,x=Digit.StoreData.getCurrentLanguage(),j=Ne((0,t.useState)(null),2),w=j[0],E=j[1],C=O||{},_=C.languages,N=C.stateInfo,I=Digit.UserService.getUser(),D=Ne((0,t.useState)(""),2),T=D[0],P=(D[1],Ne((0,t.useState)(null),2)),L=P[0],R=P[1],k=Ne((0,t.useState)([]),2),M=k[0],U=k[1],B=Ne((0,t.useState)([]),2),F=(B[0],B[1],Ne((0,t.useState)(x),2)),G=(F[0],F[1]),V=Digit.Hooks.useAccessControl(),H=V.isLoading,W=V.data,z=Digit.ULBService.getCurrentTenantId(),X=(0,r.useTranslation)().t,q=(0,a.useNavigate)(),Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(""==t)return e;for(;null!==(r=e)&&void 0!==r&&r.includes(t);){var r,o;e=null===(o=e)||void 0===o?void 0:o.replace(t,n)}return e};(0,t.useEffect)(function(){var e,t=Digit.SessionStorage.get("citizen.userRequestObject"),n=[],r=[];null==t||null===(e=t.info)||void 0===e||null===(e=e.roles)||void 0===e||e.forEach(function(e){return n.push(e.tenantId)});var o=n.filter(function(e,t,n){return n.indexOf(e)===t});null==o||o.forEach(function(e){var t;r.push({label:X("TENANT_TENANTS_".concat(null===(t=Q(e,".","_"))||void 0===t?void 0:t.toUpperCase())),value:e})}),null==r||r.filter(function(e){return e.value==Digit.SessionStorage.get("Employee.tenantId")}),U(r)},[L]);var Z=function(){Digit.clikOusideFired=!0,f(!1)};(0,t.useEffect)(function(){var e=function(){var e=_e(we().m(function e(){var t,n,r,o,i,a,l,u;return we().w(function(e){for(;;)switch(e.n){case 0:if(n=Digit.ULBService.getCurrentTenantId(),!(r=null==I||null===(t=I.info)||void 0===t?void 0:t.uuid)){e.n=2;break}return e.n=1,Digit.UserService.userSearch(n,{uuid:[r]},{});case 1:(i=e.v)&&i.user&&null!=i&&null!==(o=i.user)&&void 0!==o&&o.length&&(l=i.user[0],u=null==l||null===(a=l.photo)||void 0===a?void 0:a.split(","),E(null==u?void 0:u.at(0)));case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();w||e()},[w]);var Y=function(e){var t,n,r=null;Digit.Utils.getMultiRootTenant()?(r=m?e.replace("/sandbox-ui/employee","/sandbox-ui/".concat(z,"/employee")):e.replace("/sandbox-ui/citizen","/sandbox-ui/".concat(z,"/citizen")),q(r),f()):("/"===e[0]?q("/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/").concat(m?"employee":"citizen").concat(e)):q("/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/").concat(m?"employee":"citizen","/").concat(e)),f())};if(g||H)return(0,s.jsx)(e.Loader,{});var K=[{id:"login-btn",element:"LOGIN",text:X("CORE_COMMON_LOGIN"),icon:(0,s.jsx)(A.LogoutIcon,{className:"icon"}),populators:{onClick:function(){var e,t;q(m?"/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/employee/user/language-selection"):"/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/citizen/login")),Z()}}}];S&&I&&I.access_token&&(null==I||I.info,null==N||N.name,K=K.filter(function(e){return"login-btn"!==(null==e?void 0:e.id)}));var J={};if(m){var $;null==W||W.actions.filter(function(e){return"url"===e.url&&"Home"!==e.displayName}).forEach(function(e){var t;if(""==T&&""!==e.path){var n=e.path.split(".")[0];"TradeLicense"===n&&(n="Trade License"),J[n]?J[n].push(e):J[n]=[e]}else if(""!==e.path&&null!=e&&null!==(t=e.displayName)&&void 0!==t&&t.toLowerCase().includes(T.toLowerCase())){var r=e.path.split(".")[0];"TradeLicense"===r&&(r="Trade License"),J[r]?J[r].push(e):J[r]=[e]}});for(var ee=Object.keys(J),te=function(e){var t,n,r,o,i,a,l=null===(t=J[ee[e]][0])||void 0===t||null===(t=t.displayName)||void 0===t||null===(t=t.toUpperCase())||void 0===t?void 0:t.replace(/[ -]/g,"_"),u=null===(n=ee[e])||void 0===n||null===(n=n.toUpperCase())||void 0===n?void 0:n.replace(/[ -]/g,"_");-1===J[ee[e]][0].path.indexOf(".")?K.splice(1,0,{type:"link",text:X("ACTION_TEST_".concat(l)),link:null===(r=J[ee[e]][0])||void 0===r?void 0:r.navigationURL,icon:null===(o=J[ee[e]][0])||void 0===o?void 0:o.leftIcon,populators:{onClick:function(){var t;q(null===(t=J[ee[e]][0])||void 0===t?void 0:t.navigationURL),Z()}}}):K.splice(1,0,{type:"dynamic",moduleName:X("ACTION_TEST_".concat(u)),links:null===(i=J[ee[e]])||void 0===i?void 0:i.map(function(e){var t;return xe(xe({},e),{},{displayName:X("ACTION_TEST_".concat(null==e||null===(t=e.displayName)||void 0===t||null===(t=t.toUpperCase())||void 0===t?void 0:t.replace(/[ -]/g,"_")))})}),icon:null===(a=J[ee[e]][1])||void 0===a?void 0:a.leftIcon})},ne=0;ne<(null==ee?void 0:ee.length);ne++)te(ne);var re=K.findIndex(function(e){return"HOME"===e.element}),oe=K.splice(re,1),ie=K.findIndex(function(e){return"LANGUAGE"===e.element}),ae=K.splice(ie,(null===($=K)||void 0===$?void 0:$.length)-ie);K.sort(function(e,t){var n="dynamic"===(null==e?void 0:e.type)?null==e?void 0:e.moduleName:null==e?void 0:e.text,r="dynamic"===(null==t?void 0:t.type)?null==t?void 0:t.moduleName:null==t?void 0:t.text;return n.localeCompare(r)}),(null==oe?void 0:oe[0])&&K.splice(0,0,oe[0]),K=(null==ae?void 0:ae.length)>0?K.concat(ae):K}else{var le;null===(le=Object.keys(y))||void 0===le||null===(le=le.sort(function(e,t){return t.localeCompare(e)}))||void 0===le||le.map(function(e){var t,n,r,o,i;"digit-ui-links"===(null===(t=y[e][0])||void 0===t?void 0:t.sidebar)&&K.splice(1,0,{type:null!==(n=y[e][0])&&void 0!==n&&null!==(n=n.sidebarURL)&&void 0!==n&&n.includes(null===(r=window)||void 0===r?void 0:r.contextPath)?"link":"external-link",text:X("ACTION_TEST_".concat(Digit.Utils.locale.getTransformedLocale(e))),links:y[e],icon:null===(o=y[e][0])||void 0===o?void 0:o.leftIcon,link:null===(i=y[e][0])||void 0===i?void 0:i.sidebarURL})})}location.pathname.includes("/openlink")&&(K=K.filter(function(e){return"LANGUAGE"===e.element})),K=null===(o=K)||void 0===o?void 0:o.map(function(e){return xe(xe({},e),{},{label:(null==e?void 0:e.text)||(null==e?void 0:e.moduleName)||"",icon:null!=e&&e.icon?null==e?void 0:e.icon:void 0})});var ue,se="";se=Digit.Utils.getMultiRootTenant()?X("TENANT_TENANTS_".concat(z)):X("TENANT_TENANTS_".concat(null===(ue=Q(Digit.SessionStorage.get("Employee.tenantId"),".","_"))||void 0===ue?void 0:ue.toUpperCase()));var ce=null===(i=K)||void 0===i?void 0:i.map(function(e){var t;return"dynamic"===(null==e?void 0:e.type)?xe(xe({},e),{},{children:null==e||null===(t=e.links)||void 0===t?void 0:t.map(function(e){return xe(xe({},e),{},{label:null==e?void 0:e.displayName,icon:null==e?void 0:e.leftIcon})})}):e}),de=null==M?void 0:M.map(function(e){return xe(xe({},e),{},{type:"custom",key:"city"})}),fe=null==_?void 0:_.map(function(e){return xe(xe({},e),{},{type:"custom",key:"language",icon:"Language"})}),ve=[{label:"HOME",value:"HOME",icon:"Home",type:"custom",key:"home"},{label:se,value:se,children:(null==de?void 0:de.length)>0?de:void 0,type:"custom",icon:"LocationCity",key:"city"},{label:X("Language"),children:(null==fe?void 0:fe.length)>0?fe:void 0,type:"custom",icon:"Language",key:"language"},{label:X("EDIT_PROFILE"),type:"custom",icon:"Edit",key:"editProfile"},{label:X("Modules"),icon:"DriveFileMove",children:ce}];return d?(0,s.jsx)(e.Hamburger,{items:ve,profileName:null==I||null===(l=I.info)||void 0===l?void 0:l.name,profileNumber:null==I||null===(u=I.info)||void 0===u?void 0:u.mobileNumber,theme:"dark",transitionDuration:.3,styles:{marginTop:"64px",height:"93%"},onLogout:v,hideUserManuals:!0,profile:w||void 0,isSearchable:!0,onSelect:function(e){return function(e){var t,n,r,o=e.item;if(e.index,e.parentIndex,null!=o&&o.navigationURL)Y(null==o?void 0:o.navigationURL);else if(null!=o&&o.link)Y(null==o?void 0:o.link);else{if("custom"!==(null==o?void 0:o.type))return;switch(null==o?void 0:o.key){case"home":q(m?"/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/employee"):"/".concat(null===(r=window)||void 0===r?void 0:r.contextPath,"/citizen")),f();break;case"editProfile":b(),f();break;case"language":G((t=o).value),Digit.LocalizationService.changeLanguage(t.value,N.code),f();break;case"city":!function(e){var t,n,r,o=Digit.SessionStorage.get("citizen.userRequestObject"),i=null===(t=Digit.SessionStorage.get("citizen.userRequestObject"))||void 0===t||null===(t=t.info)||void 0===t||null===(t=t.roles)||void 0===t?void 0:t.filter(function(t){return t.tenantId===e.value});if((null==i?void 0:i.length)>0&&(o.info.roles=i,o.info.tenantId=null==e?void 0:e.value),Digit.SessionStorage.set("Employee.tenantId",null==e?void 0:e.value),Digit.UserService.setUser(o),R(e),"undefined"!=typeof window&&null!==(n=window.location)&&void 0!==n&&null!==(n=n.href)&&void 0!==n&&n.includes("/".concat(null===(r=window)||void 0===r?void 0:r.contextPath,"/employee/"))){var a,l,u=(null===(a=location.state)||void 0===a?void 0:a.from)||"/".concat(null===(l=window)||void 0===l?void 0:l.contextPath,"/employee");q(u,{replace:!0})}try{"undefined"!=typeof window&&window.location.reload()}catch(e){console.warn("Failed to reload page:",e)}}(o),f()}}}({item:e.item,index:e.index,parentIndex:e.parentIndex})}}):(0,s.jsx)(he,{logout:v})},De=(f(3921),f(7918)),Te=f.n(De),Pe=/[A-Z]/g,Le=/^ms-/,Re={};function ke(e){return"-"+e.toLowerCase()}const Me=function(e){if(Re.hasOwnProperty(e))return Re[e];var t=e.replace(Pe,ke);return Re[e]=Le.test(t)?"-"+t:t};const Ue=u().oneOfType([u().string,u().number]),Be={all:u().bool,grid:u().bool,aural:u().bool,braille:u().bool,handheld:u().bool,print:u().bool,projection:u().bool,screen:u().bool,tty:u().bool,tv:u().bool,embossed:u().bool},Fe={orientation:u().oneOf(["portrait","landscape"]),scan:u().oneOf(["progressive","interlace"]),aspectRatio:u().string,deviceAspectRatio:u().string,height:Ue,deviceHeight:Ue,width:Ue,deviceWidth:Ue,color:u().bool,colorIndex:u().bool,monochrome:u().bool,resolution:Ue,type:Object.keys(Be)},{type:Ge,...Ve}=Fe,He={minAspectRatio:u().string,maxAspectRatio:u().string,minDeviceAspectRatio:u().string,maxDeviceAspectRatio:u().string,minHeight:Ue,maxHeight:Ue,minDeviceHeight:Ue,maxDeviceHeight:Ue,minWidth:Ue,maxWidth:Ue,minDeviceWidth:Ue,maxDeviceWidth:Ue,minColor:u().number,maxColor:u().number,minColorIndex:u().number,maxColorIndex:u().number,minMonochrome:u().number,maxMonochrome:u().number,minResolution:Ue,maxResolution:Ue,...Ve};var We={all:{...Be,...He},types:Be,matchers:Fe,features:He};const ze=(0,t.createContext)(void 0),Xe=e=>{if(e)return Object.keys(e).reduce((t,n)=>(t[Me(n)]=e[n],t),{})},qe=()=>{const e=(0,t.useRef)(!1);return(0,t.useEffect)(()=>{e.current=!0},[]),e.current},Qe=e=>{const n=()=>(e=>e.query||(e=>{const t=[];return Object.keys(We.all).forEach(n=>{const r=e[n];null!=r&&t.push(((e,t)=>{const n=Me(e);return"number"==typeof t&&(t=`${t}px`),!0===t?n:!1===t?`not ${n}`:`(${n}: ${t})`})(n,r))}),t.join(" and ")})(e))(e),[r,o]=(0,t.useState)(n);return(0,t.useEffect)(()=>{const e=n();r!==e&&o(e)},[e]),r},Ze=(e,n,r)=>{const o=(e=>{const n=(0,t.useContext)(ze),r=()=>Xe(e)||Xe(n),[o,i]=(0,t.useState)(r);return(0,t.useEffect)(()=>{const e=r();(function(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(let r=0;r<o;r++){const o=n[r];if(e[o]!==t[o]||!Object.prototype.hasOwnProperty.call(t,o))return!1}return!0})(o,e)||i(e)},[e,n]),o})(n),i=Qe(e);if(!i)throw new Error("Invalid or missing MediaQuery!");const a=((e,n)=>{const r=()=>Te()(e,n||{},!!n),[o,i]=(0,t.useState)(r),a=qe();return(0,t.useEffect)(()=>{if(a){const e=r();return i(e),()=>{e&&e.dispose()}}},[e,n]),o})(i,o),l=(e=>{const[n,r]=(0,t.useState)(e.matches);return(0,t.useEffect)(()=>{const t=e=>{r(e.matches)};return e.addListener(t),r(e.matches),()=>{e.removeListener(t)}},[e]),n})(a),u=qe();return(0,t.useEffect)(()=>{u&&r&&r(l)},[l]),(0,t.useEffect)(()=>()=>{a&&a.dispose()},[]),l},Ye=({children:e,device:t,onChange:n,...r})=>{const o=Ze(r,t,n);return"function"==typeof e?e(o):o?e:null};function Ke(e){return Ke="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},Ke(e)}const Je=function(){var t,n=Digit.Hooks.useAccessControl(),o=n.isLoading,i=n.data,l=Digit.Utils.getMultiRootTenant(),u=(0,r.useTranslation)().t,c=(0,a.useNavigate)(),d=null===(t=Digit)||void 0===t||null===(t=t.ULBService)||void 0===t?void 0:t.getStateId();function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e){var n=e[t];if("item"===t&&""!==(null==n?void 0:n.leftIcon))return null==n?void 0:n.leftIcon;if("object"===Ke(e[t])&&!Array.isArray(e[t])){var r=f(e[t]);if(r)return r}}return null}function v(e,t){for(var n in t)t.hasOwnProperty(n)&&("object"!==Ke(t[n])||Array.isArray(t[n])?e[n]||(e[n]=t[n]):(e[n]||(e[n]={}),v(e[n],t[n])))}var p={};null==i||i.actions.filter(function(e){return"url"===e.url}).forEach(function(e){var t;if(null==e||null===(t=e.path)||void 0===t||null===(t=t.split("."))||void 0===t||t[0],""!==(null==e?void 0:e.path)){var n,r=null==e||null===(n=e.path)||void 0===n?void 0:n.split("."),o={};r.reduce(function(t,n,o){if(o!==r.length-1)return t[n]={},t[n];t[n]={item:e}},o),v(p,o)}});var m=function(e){return e.sort(function(e,t){return(void 0!==e.orderNumber?e.orderNumber:1/0)-(void 0!==t.orderNumber?t.orderNumber:1/0)}),e.forEach(function(e){e.children&&e.children.length>0&&m(e.children)}),e},y=function(e){var t=function(e,n){if(n.item)return{label:u(n.item.displayName),icon:{icon:n.item.leftIcon,width:"1.5rem",height:"1.5rem"},navigationUrl:n.item.navigationURL,orderNumber:n.item.orderNumber};var r=Object.keys(n).map(function(e){return t(e,n[e])}),o=f(n);return{label:u(e),icon:{icon:o,width:"1.5rem",height:"1.5rem"},children:r}};return Object.keys(e).map(function(n){return t(n,e[n])})}(function(e){var t=Object.entries(e);return t.sort(function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0}),Object.fromEntries(t)}(p)),g=m(y);return o?(0,s.jsx)(e.Loader,{}):p?(0,s.jsx)(Ye,{minWidth:768,children:(0,s.jsx)(e.SideNav,{items:g,hideAccessbilityTools:!0,onSelect:function(e){return function(e){var t=e.item;e.index,e.parentIndex,null!=t&&t.navigationUrl&&function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("/"!=r)if(-1===(null===(e=r)||void 0===e?void 0:e.indexOf("/".concat(null===(t=window)||void 0===t?void 0:t.contextPath)))){var o=window.location.origin,i=null;if(l)n(i=r=r.replace("/sandbox-ui/employee","/sandbox-ui/".concat(d,"/employee")));else{i=o+r;try{"undefined"!=typeof window&&(window.location.href=i)}catch(e){console.warn("Navigation failed, attempting fallback:",e);try{window.location.replace(i)}catch(e){console.error("All navigation methods failed:",e)}}}}else n(r)}(c,null==t?void 0:t.navigationUrl)}({item:e.item,index:e.index,parentIndex:e.parentIndex})},theme:"dark",variant:"primary",transitionDuration:"",className:"",styles:{},expandedWidth:"",collapsedWidth:"",onBottomItemClick:function(){}})}):""},$e=function(e){e.t;var t=e.CITIZEN,n=e.isSidebarOpen,r=e.toggleSidebar,o=e.handleLogout,i=e.mobileView,a=e.userDetails,l=e.modules,u=e.linkData,c=e.islinkDataLoading,d=e.userProfile;return t?(0,s.jsx)(Ae,{isOpen:n,isMobile:!0,toggleSidebar:r,onLogout:o,linkData:u,islinkDataLoading:c,userProfile:d,isEmployee:!1}):!n&&null!=a&&a.access_token?(0,s.jsx)("div",{className:"digit-employeeSidebar",children:(0,s.jsx)(Je,{mobileView:i,userDetails:a,modules:l})}):(0,s.jsx)("div",{className:"digit-citizenSidebar",children:(0,s.jsx)(Ae,{isOpen:n,isMobile:!0,toggleSidebar:r,onLogout:o,isEmployee:!0,userProfile:d})})};function et(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tt(e,t);var n={}.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)?tt(e,t):void 0}}(e,t)||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.")}()}function tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const nt=function(e){var r=e.t,o=e.stateInfo,i=e.userDetails,l=e.CITIZEN,u=e.cityDetails,c=e.mobileView,d=e.handleUserDropdownSelection,f=e.logoUrl,v=e.logoUrlWhite,p=e.showSidebar,m=void 0===p||p,y=e.showLanguageChange,g=e.linkData,b=e.islinkDataLoading,h=et((0,t.useState)(!1),2),O=h[0],S=h[1],x=(0,a.useNavigate)(),j=et((0,t.useState)(!1),2),w=j[0],E=j[1],C=function(){S(!1),E(!0)},_=function(){E(!1)},N=function(){S(!O)},I=function(){var e,t;x(l?"/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/user/profile"):"/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/employee/user/profile"))},A=[{name:r("EDIT_PROFILE"),icon:"Edit",func:I},{name:r("CORE_COMMON_LOGOUT"),icon:"Logout",func:C}];return(0,s.jsxs)(n().Fragment,{children:[(0,s.jsx)(ae,{t:r,stateInfo:o,toggleSidebar:N,isSidebarOpen:O,handleLogout:C,userDetails:i,CITIZEN:l,cityDetails:u,mobileView:c,userOptions:A,handleUserDropdownSelection:d,logoUrl:f,logoUrlWhite:v,showLanguageChange:y}),w&&(0,s.jsx)(ue,{onSelect:function(){Digit.UserService.logout(),E(!1)},onCancel:_,onDismiss:_}),l?l?m&&O&&(0,s.jsx)($e,{t:r,CITIZEN:l,isSidebarOpen:O,toggleSidebar:N,handleLogout:C,mobileView:c,userDetails:i,linkData:g,userProfile:I,islinkDataLoading:b}):null:m&&(0,s.jsx)($e,{t:r,CITIZEN:l,isSidebarOpen:O,toggleSidebar:N,handleLogout:C,mobileView:c,userDetails:i,linkData:g,userProfile:I,islinkDataLoading:b})]})};function rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const ot=function(e){var n,o,i=e.question,a=e.answer,l=e.lastIndex,u=(n=(0,t.useState)(!1),o=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(n,o)||function(e,t){if(e){if("string"==typeof e)return rt(e,t);var n={}.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)?rt(e,t):void 0}}(n,o)||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.")}()),c=u[0],d=u[1],f=(0,r.useTranslation)().t;return(0,s.jsxs)("div",{className:"faqs border-none",onClick:function(){return d(!c)},children:[(0,s.jsxs)("div",{className:"faq-question",style:{justifyContent:"space-between",display:"flex"},children:[(0,s.jsx)("span",{children:f(i)}),(0,s.jsx)("span",{className:c?"faqicon rotate":"faqicon",style:{float:"right"},children:(0,s.jsx)(M.ArrowForward,{})})]}),(0,s.jsx)("div",{className:"faq-answer",style:c?{display:"block"}:{display:"none"},children:(0,s.jsx)("span",{children:f(a)})}),l?null:(0,s.jsx)("div",{className:"cs-box-border"})]})},it=function(n){var o,i,a=n.module,l=Digit.UserService.getUser(),u=((null==l||null===(o=l.info)||void 0===o?void 0:o.tenantId)||Digit.ULBService.getCurrentTenantId(),(0,r.useTranslation)().t),c=Digit.Hooks.useGetFAQsJSON(Digit.ULBService.getStateId()),d=c.isLoading,f=c.data,v=null==f||null===(i=f.MdmsRes["common-masters"])||void 0===i||null===(i=i.faqs[0])||void 0===i?void 0:i["".concat(a)].faqs;return d?(0,s.jsx)(e.Loader,{}):(0,s.jsx)(t.Fragment,{children:(0,s.jsxs)("div",{className:"faq-page",children:[(0,s.jsx)(e.BackButton,{style:{marginLeft:"unset"}}),(0,s.jsx)("div",{style:{marginBottom:"15px"},children:(0,s.jsx)(e.HeaderComponent,{styles:{marginLeft:"0px",paddingTop:"10px",fontSize:"32px"},children:u("FAQ_S")})}),(0,s.jsx)("div",{className:"faq-list",children:v.map(function(e,t){return(0,s.jsx)(ot,{question:e.question,answer:e.answer,lastIndex:t===(null==v?void 0:v.length)-1},"faq_"+t)})})]})})};function at(e){return at="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},at(e)}function lt(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 ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(n),!0).forEach(function(t){st(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function st(e,t,n){return(t=function(e){var t=function(e){if("object"!=at(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=at(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==at(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ct=function(){var e,t,n,o,i,l,u,c,d,f,v,p,m,y,g,h,O=(0,r.useTranslation)().t,S=(0,a.useNavigate)(),x=Digit.Utils.getMultiRootTenant()?Digit.ULBService.getStateId():Digit.ULBService.getCitizenCurrentTenant(!0),j=Digit.Hooks.useStore.getInitData(),w=j.data,E=void 0===w?{}:w,C=(E.stateInfo,E.uiHomePage),_=j.isLoading,N=window.Digit.Utils.browser.isMobile(),I=function(){var e,t;return"EMPLOYEE"!==(null===(e=Digit.UserService)||void 0===e||null===(e=e.getUser())||void 0===e||null===(e=e.info)||void 0===e?void 0:e.type)&&!(null===(t=Digit.UserService)||void 0===t||null===(t=t.getUser())||void 0===t||!t.access_token)},D=Digit.Hooks.useEvents({tenantId:x,variant:"whats-new",config:{enabled:I()}}),T=D.data,P=D.isLoading;x||S("/".concat(null===(h=window)||void 0===h?void 0:h.contextPath,"/citizen/select-language"));var L,R,k=null==C?void 0:C.appBannerDesktop,M=null==C?void 0:C.appBannerMobile,U=null==C?void 0:C.citizenServicesCard,B=null==C?void 0:C.informationAndUpdatesCard,F=null==C?void 0:C.whatsAppBannerDesktop,G=null==C?void 0:C.whatsAppBannerMobile,V=null==C?void 0:C.whatsNewSection,H=null==C?void 0:C.redirectURL;H&&S("/".concat(null===(L=window)||void 0===L?void 0:L.contextPath,"/citizen/").concat(H)),(null!==(e=window)&&void 0!==e&&null!==(e=e.location)&&void 0!==e&&null!==(e=e.href)&&void 0!==e&&null!==(t=e.includes)&&void 0!==t&&t.call(e,"sanitation-ui")||null!==(n=window)&&void 0!==n&&null!==(n=n.location)&&void 0!==n&&null!==(n=n.href)&&void 0!==n&&null!==(o=n.includes)&&void 0!==o&&o.call(n,"sandbox-ui"))&&S("/".concat(null===(R=window)||void 0===R?void 0:R.contextPath,"/citizen/all-services"));var W=function(e){window.open(null==e?void 0:e.navigationUrl)},z={header:O(null==U?void 0:U.headerLabel),sideOption:{name:O(null==U||null===(i=U.sideOption)||void 0===i?void 0:i.name),onClick:function(){var e;return S(null==U||null===(e=U.sideOption)||void 0===e?void 0:e.navigationUrl)}},options:[{name:O(null==U||null===(l=U.props)||void 0===l||null===(l=l[0])||void 0===l?void 0:l.label),Icon:(0,s.jsx)(A.ComplaintIcon,{}),onClick:function(){var e;return S(null==U||null===(e=U.props)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.navigationUrl)}},{name:O(null==U||null===(u=U.props)||void 0===u||null===(u=u[1])||void 0===u?void 0:u.label),Icon:(0,s.jsx)(A.PTIcon,{className:"fill-path-primary-main"}),onClick:function(){var e;return S(null==U||null===(e=U.props)||void 0===e||null===(e=e[1])||void 0===e?void 0:e.navigationUrl)}},{name:O(null==U||null===(c=U.props)||void 0===c||null===(c=c[2])||void 0===c?void 0:c.label),Icon:(0,s.jsx)(A.CaseIcon,{className:"fill-path-primary-main"}),onClick:function(){var e;return S(null==U||null===(e=U.props)||void 0===e||null===(e=e[2])||void 0===e?void 0:e.navigationUrl)}},{name:O(null==U||null===(d=U.props)||void 0===d||null===(d=d[3])||void 0===d?void 0:d.label),Icon:(0,s.jsx)(A.OBPSIcon,{}),onClick:function(){var e;return S(null==U||null===(e=U.props)||void 0===e||null===(e=e[3])||void 0===e?void 0:e.navigationUrl)}}],styles:{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",width:"100%"}},X={header:O(null==B?void 0:B.headerLabel),sideOption:{name:O(null==B||null===(f=B.sideOption)||void 0===f?void 0:f.name),onClick:function(){var e;return S(null==B||null===(e=B.sideOption)||void 0===e?void 0:e.navigationUrl)}},options:[{name:O(null==B||null===(v=B.props)||void 0===v||null===(v=v[0])||void 0===v?void 0:v.label),Icon:(0,s.jsx)(A.HomeIcon,{}),onClick:function(){var e;return S(null==B||null===(e=B.props)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.navigationUrl)}},{name:O(null==B||null===(p=B.props)||void 0===p||null===(p=p[1])||void 0===p?void 0:p.label),Icon:(0,s.jsx)(A.Calender,{}),onClick:function(){var e;return S(null==B||null===(e=B.props)||void 0===e||null===(e=e[1])||void 0===e?void 0:e.navigationUrl)}},{name:O(null==B||null===(m=B.props)||void 0===m||null===(m=m[2])||void 0===m?void 0:m.label),Icon:(0,s.jsx)(A.DocumentIcon,{}),onClick:function(){var e;return S(null==B||null===(e=B.props)||void 0===e||null===(e=e[2])||void 0===e?void 0:e.navigationUrl)}},{name:O(null==B||null===(y=B.props)||void 0===y||null===(y=y[3])||void 0===y?void 0:y.label),Icon:(0,s.jsx)(A.DocumentIcon,{}),onClick:function(){var e;return S(null==B||null===(e=B.props)||void 0===e||null===(e=e[3])||void 0===e?void 0:e.navigationUrl)}}],styles:{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",width:"100%"}};return _?(0,s.jsx)(A.Loader,{}):(0,s.jsx)("div",{className:"HomePageContainer",children:(0,s.jsxs)("div",{className:"HomePageWrapper",children:[(0,s.jsxs)("div",{className:"BannerWithSearch",children:[N?(0,s.jsx)(b,{src:null==M?void 0:M.bannerUrl,alt:"Banner Image"}):(0,s.jsx)(b,{src:null==k?void 0:k.bannerUrl,alt:"Banner Image"}),(0,s.jsxs)("div",{className:"ServicesSection",children:[(0,s.jsx)(A.CardBasedOptions,ut({style:{marginTop:"-30px"}},z)),(0,s.jsx)(A.CardBasedOptions,ut({style:N?{}:{marginTop:"-30px"}},X))]})]}),(G||F)&&(0,s.jsx)("div",{className:"WhatsAppBanner",children:N?(0,s.jsx)(b,{src:null==G?void 0:G.bannerUrl,onClick:function(){return W(G)},alt:"Whatsapp Banner"}):(0,s.jsx)(b,{src:null==F?void 0:F.bannerUrl,onClick:function(){return W(F)},alt:"Whatsapp Banner"})}),I()?P?(0,s.jsx)(A.Loader,{}):(0,s.jsxs)("div",{className:"WhatsNewSection",children:[(0,s.jsxs)("div",{className:"headSection",children:[(0,s.jsx)("h2",{children:O(null==V?void 0:V.headerLabel)}),(0,s.jsx)("p",{onClick:function(){var e;return S(null==V||null===(e=V.sideOption)||void 0===e?void 0:e.navigationUrl)},children:O(null==V||null===(g=V.sideOption)||void 0===g?void 0:g.name)})]}),(0,s.jsx)(A.WhatsNewCard,ut({},null==T?void 0:T[0]))]}):null]})})};function dt(e){return dt="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},dt(e)}function ft(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 vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ft(Object(n),!0).forEach(function(t){pt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ft(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pt(e,t,n){return(t=function(e){var t=function(e){if("object"!=dt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const mt=function(){var n=(0,r.useTranslation)().t,o=(0,a.useNavigate)(),i=Digit.Hooks.useStore.getInitData(),l=i.data,u=void 0===l?{}:l,c=u.languages,d=u.stateInfo,f=i.isLoading,v=Digit.StoreData.getCurrentLanguage(),p=(0,t.useMemo)(function(){return{header:n("CS_COMMON_CHOOSE_LANGUAGE"),submitBarLabel:n("CORE_COMMON_CONTINUE")}},[n]),m=(0,t.useMemo)(function(){return{options:c,optionsKey:"label",additionalWrapperClass:"digit-reverse-radio-selection-wrapper",onSelect:function(e){return Digit.LocalizationService.changeLanguage(e.value,d.code)},selectedOption:null==c?void 0:c.filter(function(e){return e.value===v})[0]}},[v,c]);return f?(0,s.jsx)(e.Loader,{}):(0,s.jsx)("div",{className:"selection-card-wrapper",children:(0,s.jsxs)(e.PageBasedInput,{texts:p,onSubmit:function(){var e;o("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/select-location"))},children:[(0,s.jsx)(e.CardHeader,{children:n("CS_COMMON_CHOOSE_LANGUAGE")}),(0,s.jsx)(e.RadioButtons,vt({},m))]})})};function yt(e){return yt="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},yt(e)}function gt(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 bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gt(Object(n),!0).forEach(function(t){ht(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ht(e,t,n){return(t=function(e){var t=function(e){if("object"!=yt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ot(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return St(e,t);var n={}.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)?St(e,t):void 0}}(e,t)||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.")}()}function St(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const xt=function(){var n=(0,r.useTranslation)().t,o=(0,a.useNavigate)(),i=(0,a.useLocation)(),l=Digit.Hooks.useStore.getInitData(),u=l.data,c=void 0===u?{}:u,d=(c.stateInfo,c.uiHomePage),f=(l.isLoading,null==d?void 0:d.redirectURL),v=Digit.Hooks.useTenants(),p=v.data,m=v.isLoading,y=Ot((0,t.useState)(function(){return{code:Digit.ULBService.getCitizenCurrentTenant(!0)}}),2),g=y[0],b=y[1],h=Ot((0,t.useState)(!1),2),O=h[0],S=h[1],x=(0,t.useMemo)(function(){return{header:n("CS_COMMON_CHOOSE_LOCATION"),submitBarLabel:n("CORE_COMMON_CONTINUE")}},[n]);function j(e){b(e),S(!1)}var w=(0,t.useMemo)(function(){return{options:p,optionsKey:"i18nKey",additionalWrapperClass:"digit-reverse-radio-selection-wrapper",onSelect:j,selectedOption:g}},[p,n,g]);return m?(0,s.jsx)("loader",{}):(0,s.jsxs)("div",{className:"selection-card-wrapper",children:[(0,s.jsx)(e.BackLink,{onClick:function(){return window.history.back()}}),(0,s.jsxs)(A.PageBasedInput,{texts:x,onSubmit:function(){if(g){var e;Digit.SessionStorage.set("CITIZEN.COMMON.HOME.CITY",g);var t,n,r=null===(e=i.state)||void 0===e?void 0:e.redirectBackTo;f?o("/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/citizen/").concat(f)):r?o(r,{replace:!0}):o("/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/citizen"))}else S(!0)},className:"location-selection-container",children:[(0,s.jsx)(A.CardHeader,{children:n("CS_COMMON_CHOOSE_LOCATION")}),(0,s.jsx)(A.SearchOnRadioButtons,bt(bt({},w),{},{placeholder:n("COMMON_TABLE_SEARCH")})),O?(0,s.jsx)(A.CardLabelError,{children:n("CS_COMMON_LOCATION_SELECTION_ERROR")}):null]})]})};function jt(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return wt(s,"_invoke",function(n,r,o){var i,l,u,s=0,c=o||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return i=t,l=0,u=e,f.n=n,a}};function v(n,r){for(l=n,u=r,t=0;!d&&s&&!o&&t<c.length;t++){var o,i=c[t],v=f.p,p=i[2];n>3?(o=p===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=v&&((o=n<2&&v<i[1])?(l=0,f.v=r,f.n=i[1]):v<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,f.n=p,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,c,p){if(s>1)throw TypeError("Generator is already running");for(d&&1===c&&v(c,p),l=c,u=p;(t=l<2?e:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),v(l,u)):f.n=u:f.v=u);try{if(s=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(t){i=e,l=1,u=t}finally{s=1}}return{value:t,done:d}}}(n,o,i),!0),s}var a={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(wt(t={},r,function(){return this}),t),d=s.prototype=l.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,wt(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=s,wt(d,"constructor",s),wt(s,"constructor",u),u.displayName="GeneratorFunction",wt(s,o,"GeneratorFunction"),wt(d),wt(d,o,"Generator"),wt(d,r,function(){return this}),wt(d,"toString",function(){return"[object Generator]"}),(jt=function(){return{w:i,m:f}})()}function wt(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}wt=function(e,t,n,r){function i(t,n){wt(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},wt(e,t,n,r)}function Et(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,o)}function Ct(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _t(e,t);var n={}.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)?_t(e,t):void 0}}(e,t)||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.")}()}function _t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}f(4864),f(1392),f(2762);const Nt=function(e){var o=e.setProfilePic,i=e.closeDrawer,a=e.userType,l=e.removeProfilePic,u=e.showToast,c=Ct((0,t.useState)(null),2),d=(c[0],c[1]),f=Ct((0,t.useState)(""),2),v=f[0],p=f[1],m=Ct((0,t.useState)(null),2),y=(m[0],m[1]),g=(0,r.useTranslation)().t;return(0,t.useEffect)(function(){var e;(e=jt().m(function e(){var t,n,r,i;return jt().w(function(e){for(;;)switch(e.p=e.n){case 0:if(y(null),!v){e.n=4;break}if(!(v.size>=1e6)){e.n=1;break}u("error",g("CORE_COMMON_PROFILE_MAXIMUM_UPLOAD_SIZE_EXCEEDED")),y(g("CORE_COMMON_PROFILE_MAXIMUM_UPLOAD_SIZE_EXCEEDED")),e.n=4;break;case 1:return e.p=1,e.n=2,Digit.UploadServices.Filestorage("".concat(a,"-profile"),v,Digit.ULBService.getStateId());case 2:(null==(n=e.v)||null===(t=n.data)||void 0===t||null===(t=t.files)||void 0===t?void 0:t.length)>0?(i=null==n||null===(r=n.data)||void 0===r||null===(r=r.files[0])||void 0===r?void 0:r.fileStoreId,d(i),o(i)):(u("error",g("CORE_COMMON_PROFILE_FILE_UPLOAD_ERROR")),y(g("CORE_COMMON_PROFILE_FILE_UPLOAD_ERROR"))),e.n=4;break;case 3:e.p=3,e.v,u("error",g("CORE_COMMON_PROFILE_INVALID_FILE_INPUT"));case 4:return e.a(2)}},e,null,[[1,3]])}),function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){Et(i,r,o,a,l,"next",e)}function l(e){Et(i,r,o,a,l,"throw",e)}a(void 0)})})()},[v]),(0,s.jsxs)(n().Fragment,{children:[(0,s.jsx)("div",{style:{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",width:"100%",height:"100vh",backgroundColor:"rgba(0,0,0,.5)"},onClick:function(){return i()}}),(0,s.jsxs)("div",{style:{width:"100%",justifyContent:"space-between",display:"flex",backgroundColor:"white",alignItems:"center",position:"fixed",left:"0",right:"0",height:"20%",bottom:"citizen"===a?"2.5rem":"0",zIndex:"1000"},children:[(0,s.jsxs)("div",{style:{display:"flex",flex:"1",flexDirection:"column",width:"100%",justifyContent:"center",alignItems:"center",gap:"8px 0"},children:[(0,s.jsxs)("label",{for:"file",style:{cursor:"pointer"},children:[" ",(0,s.jsx)(A.GalleryIcon,{})]}),(0,s.jsx)("label",{style:{cursor:"pointer"},children:" Gallery"}),(0,s.jsx)("input",{type:"file",id:"file",accept:"image/*, .png, .jpeg, .jpg",onChange:function(e){return p(e.target.files[0])},style:{display:"none"}})]}),(0,s.jsxs)("div",{style:{display:"flex",flex:"1",width:"100%",justifyContent:"center",alignItems:"center",flexDirection:"column",gap:"8px 0"},children:[(0,s.jsx)("button",{onClick:function(){l(),i()},children:(0,s.jsx)(A.RemoveIcon,{})}),(0,s.jsx)("label",{style:{cursor:"pointer"},children:"Remove"})]})]})]})};function It(e){return It="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},It(e)}function At(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 Dt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?At(Object(n),!0).forEach(function(t){Tt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):At(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Tt(e,t,n){return(t=function(e){var t=function(e){if("object"!=It(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=It(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==It(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pt(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return Lt(s,"_invoke",function(n,r,o){var i,l,u,s=0,c=o||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return i=t,l=0,u=e,f.n=n,a}};function v(n,r){for(l=n,u=r,t=0;!d&&s&&!o&&t<c.length;t++){var o,i=c[t],v=f.p,p=i[2];n>3?(o=p===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=v&&((o=n<2&&v<i[1])?(l=0,f.v=r,f.n=i[1]):v<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,f.n=p,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,c,p){if(s>1)throw TypeError("Generator is already running");for(d&&1===c&&v(c,p),l=c,u=p;(t=l<2?e:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),v(l,u)):f.n=u:f.v=u);try{if(s=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(t){i=e,l=1,u=t}finally{s=1}}return{value:t,done:d}}}(n,o,i),!0),s}var a={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(Lt(t={},r,function(){return this}),t),d=s.prototype=l.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,Lt(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=s,Lt(d,"constructor",s),Lt(s,"constructor",u),u.displayName="GeneratorFunction",Lt(s,o,"GeneratorFunction"),Lt(d),Lt(d,o,"Generator"),Lt(d,r,function(){return this}),Lt(d,"toString",function(){return"[object Generator]"}),(Pt=function(){return{w:i,m:f}})()}function Lt(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Lt=function(e,t,n,r){function i(t,n){Lt(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},Lt(e,t,n,r)}function Rt(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,o)}function kt(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){Rt(i,r,o,a,l,"next",e)}function l(e){Rt(i,r,o,a,l,"throw",e)}a(void 0)})}}function Mt(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ut(e,t);var n={}.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)?Ut(e,t):void 0}}(e,t)||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.")}()}function Ut(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Bt={tenantId:"".concat(Digit.ULBService.getStateId()),UserProfileValidationConfig:[{name:"/^[a-zA-Z ]+$/i",mobileNumber:"/^[6-9]{1}[0-9]{9}$/",password:"/^([a-zA-Z0-9@#$%]{8,15})$/i"}]};const Ft=function(o){var i,l,u,c,d,f,v,p,m,y,g,h,O,S,x,j,w,E,C,_,N,I,D,T,P=o.stateCode,L=o.userType,R=o.cityDetails,k=((0,a.useHistory)(),(0,r.useTranslation)().t),M=window.location.href,U=Digit.ULBService.getStateId(),B=Digit.ULBService.getCurrentTenantId(),F=(null===(i=Digit.UserService.getUser())||void 0===i?void 0:i.info)||{},G=Mt((0,t.useState)(null),2),V=G[0],H=G[1],W=Mt((0,t.useState)(null!=F&&F.name?F.name:""),2),z=W[0],X=W[1],q=Mt((0,t.useState)(null!=F&&F.emailId?F.emailId:""),2),Q=q[0],Z=q[1],Y=Mt((0,t.useState)(null==V?void 0:V.gender),2),K=Y[0],J=Y[1],$=Mt((0,t.useState)(null!=F&&F.permanentCity?F.permanentCity:R.name),2),ee=$[0],te=$[1],ne=Mt((0,t.useState)(null!=F&&F.mobileNumber?F.mobileNumber:""),2),re=ne[0],oe=ne[1],ie=Mt((0,t.useState)(null),2),ae=ie[0],le=ie[1],ue=Mt((0,t.useState)(""),2),se=ue[0],ce=ue[1],de=Mt((0,t.useState)(!1),2),fe=de[0],ve=de[1],pe=Mt((0,t.useState)(!1),2),me=pe[0],ye=pe[1],ge=Mt((0,t.useState)(""),2),be=ge[0],he=ge[1],Oe=Mt((0,t.useState)(""),2),Se=Oe[0],xe=Oe[1],je=Mt((0,t.useState)(""),2),we=je[0],Ee=je[1],Ce=Mt((0,t.useState)(null),2),_e=Ce[0],Ne=Ce[1],Ie=Mt((0,t.useState)(!1),2),Ae=Ie[0],De=Ie[1],Te=Mt(n().useState(window.innerWidth),2),Pe=Te[0],Le=Te[1],Re=Mt(n().useState({}),2),ke=Re[0],Me=Re[1],Ue=window.Digit.Utils.browser.isMobile(),Be=Digit.Utils.getMultiRootTenant(),Fe=function(e){var t;return(null==e||null===(t=e.UserProfileValidationConfig)||void 0===t?void 0:t[0])&&Object.entries(null==e?void 0:e.UserProfileValidationConfig[0]).reduce(function(e,t){var n=Mt(t,2),r=n[0],o=n[1];if("string"==typeof o)try{if(o.startsWith("/")&&o.lastIndexOf("/")>0){var i=o.lastIndexOf("/"),a=o.slice(1,i),l=o.slice(i+1);e[r]=new RegExp(a,l)}else e[r]=new RegExp(o)}catch(t){console.error('Error parsing regex for key "'.concat(r,'":'),t),e[r]=o}else e[r]=o;return e},{})},Ge=Mt((0,t.useState)(Fe(Bt)||{}),2),Ve=Ge[0],He=Ge[1],We=Digit.Hooks.useCustomMDMS(P,"commonUiConfig",[{name:"UserProfileValidationConfig"}],{select:function(e){return null==e?void 0:e.commonUiConfig}}),ze=We.data,Xe=We.isValidationConfigLoading;(0,t.useEffect)(function(){var e;if(ze&&null!=ze&&null!==(e=ze.UserProfileValidationConfig)&&void 0!==e&&e[0]){var t=Fe(ze);He(t)}},[ze]);var qe=function(){var e=kt(Pt().m(function e(){var t,n;return Pt().w(function(e){for(;;)switch(e.n){case 0:if(!(t=null==F?void 0:F.uuid)){e.n=2;break}return e.n=1,Digit.UserService.userSearch(B,{uuid:[t]},{});case 1:(n=e.v)&&n.user&&n.user.length&&H(n.user[0]);case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();n().useEffect(function(){var e=function(){return Le(window.innerWidth)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[]),(0,t.useEffect)(function(){var e;De(!0),qe(),J({i18nKey:void 0,code:null==V?void 0:V.gender,value:null==V?void 0:V.gender});var t=null==V||null===(e=V.photo)||void 0===e?void 0:e.split(",");ce(null==t?void 0:t.at(0)),De(!1)},[null!==V]);var Qe=!1,Ze=function(e){return J(e)},Ye=function(){return ve(!1)},Ke=function(e){var t;X(e),null==Ve||null===(t=Ve.name)||void 0===t||!t.test(e)||0===e.length||e.length>50?Me(Dt(Dt({},ke),{},{userName:{type:"pattern",message:"CORE_COMMON_PROFILE_NAME_INVALID"}})):Me(Dt(Dt({},ke),{},{userName:null}))},Je=function(e){(null==F?void 0:F.userName)!==e?(Z(e),!e.length||e.includes("@")&&e.includes(".")?Me(Dt(Dt({},ke),{},{emailAddress:null})):Me(Dt(Dt({},ke),{},{emailAddress:{type:"pattern",message:"CORE_COMMON_PROFILE_EMAIL_INVALID"}}))):Me(Dt(Dt({},ke),{},{emailAddress:null}))},$e=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3;Ne({key:e,action:t}),setTimeout(function(){Ne(null)},n)},et=function(){var e=kt(Pt().m(function e(){var t,n,r,o,i,a,l,u,s,c,d,f,v,p;return Pt().w(function(e){for(;;)switch(e.p=e.n){case 0:if(De(!0),e.p=1,t=Dt(Dt({},F),{},{name:z,gender:null==K?void 0:K.value,emailId:Q,photo:ae}),z&&X(function(e){return e.trim()}),!(null==Ve||!Ve.name.test(z)||""===z||z.length>50||z.length<1)){e.n=2;break}throw JSON.stringify({type:"error",message:k("CORE_COMMON_PROFILE_NAME_INVALID")});case 2:if("employee"!==L||null!=Ve&&Ve.mobileNumber.test(re)){e.n=3;break}throw JSON.stringify({type:"error",message:k("CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID")});case 3:if(!Q.length||Q.includes("@")&&Q.includes(".")){e.n=4;break}throw JSON.stringify({type:"error",message:k("CORE_COMMON_PROFILE_EMAIL_INVALID")});case 4:if(n=be.trim(),r=Se.trim(),o=we.trim(),he(n),xe(r),Ee(o),!(me&&n&&r&&o)){e.n=7;break}if(r===o){e.n=5;break}throw JSON.stringify({type:"error",message:k("CORE_COMMON_PROFILE_PASSWORD_MISMATCH")});case 5:if(n.length&&r.length&&o.length){e.n=6;break}throw JSON.stringify({type:"error",message:k("CORE_COMMON_PROFILE_PASSWORD_INVALID")});case 6:if(null!=Ve&&Ve.password.test(r)||null!=Ve&&Ve.password.test(o)){e.n=7;break}throw JSON.stringify({type:"error",message:k("CORE_COMMON_PROFILE_PASSWORD_INVALID")});case 7:return e.n=8,Digit.UserService.updateUser(t,P);case 8:if(i=e.v,a=i.responseInfo,i.user,a&&"200"===a.status&&(l=Digit.UserService.getUser())&&Digit.UserService.setUser(Dt(Dt({},l),{},{info:Dt(Dt({},l.info),{},{name:z,mobileNumber:re,emailId:Q,permanentCity:ee})})),!(be.length&&Se.length&&we.length)){e.n=17;break}if(u={existingPassword:be,newPassword:Se,tenantId:B,type:"EMPLOYEE",username:null==F?void 0:F.userName,confirmPassword:we},Se!==we){e.n=15;break}return e.p=9,e.n=10,Digit.UserService.changePassword(u,B);case 10:if(s=e.v,null==(c=s.responseInfo)||!c.status||"200"!==c.status){e.n=11;break}$e("success",k("CORE_COMMON_PROFILE_UPDATE_SUCCESS_WITH_PASSWORD"),5e3),setTimeout(function(){return Digit.UserService.logout()},2e3),e.n=12;break;case 11:throw"";case 12:e.n=14;break;case 13:throw e.p=13,v=e.v,JSON.stringify({type:"error",message:null!==(d=v.Errors)&&void 0!==d&&null!==(d=d.at(0))&&void 0!==d&&d.description?v.Errors.at(0).description:"CORE_COMMON_PROFILE_UPDATE_ERROR_WITH_PASSWORD"});case 14:e.n=16;break;case 15:throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_ERROR_PASSWORD_NOT_MATCH"});case 16:e.n=18;break;case 17:null!=a&&a.status&&"200"===a.status&&$e("success",k("CORE_COMMON_PROFILE_UPDATE_SUCCESS"),5e3);case 18:e.n=20;break;case 19:e.p=19,p=e.v,f=JSON.parse(p),$e(f.type,k(f.message),5e3);case 20:De(!1);case 21:return e.a(2)}},e,null,[[9,13],[1,19]])}));return function(){return e.apply(this,arguments)}}(),tt=[],nt=Digit.Hooks.useGenderMDMS(U,"common-masters","GenderType").data;nt&&nt.map(function(e){tt.push({i18nKey:"PT_COMMON_GENDER_".concat(e.code),code:"".concat(e.code),value:"".concat(e.code)})});var rt=function(){var e=kt(Pt().m(function e(t){var n,r;return Pt().w(function(e){for(;;)switch(e.n){case 0:if(le(t),!t){e.n=2;break}return e.n=1,ot([t],U);case 1:r=e.v,e.n=3;break;case 2:r=null;case 3:ce(null==(n=r)?void 0:n.thumbs[0]),Ye();case 4:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),ot=function(){var e=kt(Pt().m(function e(t,n){var r;return Pt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Digit.UploadServices.Filefetch(t,n);case 1:if(!(r=e.v).data.fileStoreIds||0===r.data.fileStoreIds.length){e.n=2;break}return e.a(2,{thumbs:r.data.fileStoreIds.map(function(e){return e.url.split(",")[3]}),images:r.data.fileStoreIds.map(function(e){return Digit.Utils.getFileUrl(e.url)})});case 2:return e.a(2,null);case 3:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}();return Ae||Xe?(0,s.jsx)(e.Loader,{}):(0,s.jsxs)("div",{className:"user-profile ".concat("citizen"===L?"citizen":"employee"),children:[(0,s.jsx)("section",{style:{margin:"citizen"===L||Ue?"8px":"0px"},children:"citizen"===L||Ue?(0,s.jsx)(e.BackLink,{onClick:function(){return window.history.back()}}):(0,s.jsx)(e.BreadCrumb,{style:{marginTop:"0rem",marginBottom:"1.5rem"},crumbs:[{internalLink:Be?"/".concat(null===(l=window)||void 0===l?void 0:l.contextPath,"/employee/sandbox/landing"):"/".concat(null===(u=window)||void 0===u?void 0:u.contextPath,"/employee"),content:k("ES_COMMON_HOME"),show:!0},{internalLink:"/".concat(null===(c=window)||void 0===c?void 0:c.contextPath,"/employee/user/profile"),content:k("ES_COMMON_PAGE_1"),show:M.includes("/user/profile")}]})}),(0,s.jsxs)("div",{style:{display:"flex",flex:1,flexDirection:Pe<768||"citizen"===L?"column":"row",margin:"citizen"===L?"8px":"0px",gap:"citizen"===L?"":"0 24px",boxShadow:"citizen"===L?"1px 1px 4px 0px rgba(0,0,0,0.2)":"",background:"citizen"===L?"white":"",borderRadius:"citizen"===L?"4px":"",maxWidth:"citizen"===L?"960px":""},children:[(0,s.jsx)("section",{style:{position:"relative",display:"flex",flex:"citizen"===L?1:2.5,justifyContent:"center",alignItems:"center",maxWidth:"100%",borderRadius:"4px",boxShadow:"citizen"===L?"":"1px 1px 4px 0px rgba(0,0,0,0.2)",border:"".concat("citizen"===L?"8px":"24px"," solid #fff"),background:"#EEEEEE",padding:"citizen"===L?"8px":"16px"},children:(0,s.jsxs)("div",{style:{position:"relative",height:"citizen"===L?"114px":"150px",width:"citizen"===L?"114px":"150px",margin:"16px"},children:[(0,s.jsx)(b,{style:{margin:"auto",borderRadius:"300px",justifyContent:"center",height:"100%",width:"100%"},src:se&&""!==se?se:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAO4AAADUCAMAAACs0e/bAAAAM1BMVEXK0eL////Dy97GzuD4+fvL0uPg5O7T2efb4OvR1+Xr7vTk5/Df4+37/P3v8fbO1eTt8PUsnq5FAAAGqElEQVR4nO2d25ajIBBFCajgvf//a0eMyZgEjcI5xgt7Hmatme507UaxuJXidiDqjmSgeVIMlB1ZR1WZAf2gbdu0QwixSYzjOJPmHurfEGEfY9XzjNGG9whQCeVAuv5xQEySLtR9hPuIcwj0EeroN5m3D1IbsbgHK0esiQ9MKsqXVr8Hm/a/Pulk6wihpCIXBw3dh7bTvRBt9+dC5NfS1VH3xETdM3MxXRN1T0zUPTNR98xcS1dlV9NNfx3DhkTdM6PKqHteVBF1z0vU5f0sKdpc2zWLKutXrjJjdLvpesRmukqYonauPhXpdsLb6CppmpnltsYIuY2yavi6Mi2/rzAWm1zUfF0limVLqkZyA+mDYevKBS37aGC+L1lX5e7uyU1Cv565uiua9k5LFqbqqrnu2I3m+jJ11ZoLeRtfmdB0Uw/ZDsP0VTxdn7a1VERfmq7XlXyn5D2QWLoq8bZlPoBJumphJjVBw/Ll6CoTZGsTDs4NrGqKbqBth8ZHJUi6cn168QmleSm6GmB7Kxm+6obXlf7PoDHosCwM3QpiS2legi6ocSl3L0G3BdneDDgwQdENfeY+SfDJBkF37ZB+GvwzA6/rMaafAn8143VhPZWdjMWG1oHXhdnemgPoAvLlB/iZyRTfVeF06wPoQhJmlm4bdcOAZRlRN5gcPc5SoPEQR1fDdbOo6wn+uYvXxY0QCLom6gYROKH+Aj5nvphuFXWDiLpRdxl/19LFT95k6CHCrnW7pCDqBn1i1PUFvii2c11oZOJ6usWeH0RRNzC4Zs+6FTi2nevCVwCjbugnXklX5fkfTldL8PEilUB1kfNyN1u9MME2sATr4lbuB7AjfLAuvsRm1A0g6gYRdcPAjvBlje2Z8brI8OC68AcRdlCkwLohx2mcZMjw9q+LzarQurjtnwPYAydX08WecECO/u6Ad0GBdYG7jO5gB4Ap+PwKcA9ZT43dn4/W9TyiPAn4OAJaF7h3uwe8StSCddFdM3jqFa2LvnnB5zzhuuBBAjY4gi50cg694gnXhTYvfMdrjtcFZhrwE9r41gUem8IXWMC3LrBzxh+a0gRd1N1LOK7M0IUUGuggvEmHoStA2/MJh7MpupiDU4TzjhxdzLAoO4ouZvqVURbFMHQlZD6SUeWHoguZsSLUGegrehA+FZFowPdUWTi6iMoZlIpGGUUXkDbjj/9ZOLqAQS/+GIKl5BQOCn/ycqpzkXSDm5dU7ZWkG7wUyGlcmm7g5Ux56AqirgoaJ7BeokPTDbp9CbVunjFxPrl7+HqnkrSq1Da7JX20f3dV8yJi6voO81mX8vV0mx3qUsZCPRfTlVRdz2EvdufYGDvNQvvwqHtmXd+a1ITinwNcXc+lT6JuzdT1XDyBn/x7wtX1HCQQdW9MXc8xArGrirowfLeUEbMqqq6f7TF1lfRdOuGNiGi6SpT+WxY06xUfNN2wBfyE9I4tlm7w5hvOPDNJN3yNiLMipji6gE3chKhouoCtN5x3QlF0EZt8OW/8ougitqJQlk1aii7iFC9l0MvRReyao7xNjKML2Z/PuHlzhi5mFxljiZeiC9rPTEisNEMX9KYAwo5Xhi7qaA3hamboYm7dG+NVrXhdaYDv5zFaQZsYrCtbbAGnjkQDX2+J1FXCwOsqWOpKoIQNTFdqYBWydxqNqUoG0pVpCS+H8kaJaGKErlIaXj7CRRE+gRWuKwW9YZ80oVOUgbpdT0zpnSZJTIiwCtJVelvXntr4P5j6BWfPb5Wcx84C4cq3hb11lco2u2Mdwp6XdJ/Ne3wb8DWdfiRenZaXrhLwOj4e+GQeHroy3YOspS7TlU28Wle2m2QUS0mqdcbrdNW+ZHsSsyK7tBfm0q/dWcv+Z3mytVx3t7KWulqUe6ilunu8jF8pFwgv1FXp3mUt35OtRbr7eM4u4Gs6vUBXgeuHc5kfE/cbvWZtkROLm1DMtLCy80tzsu2PRj0hTI8fvrQuvsjlJkyutszq+m423wHaLTyniy/XuiGZ84LuT+m5ZfNfRxyGs7LXZOvia7VujatUwVTrIt+Q/Csc7Tuhe+BOakT10b4TuoiiJjvgU9emTO42PwEfBa+cuodKkuf42DXr1D3JpXz73Hnn0j10evHKe+nufgfUm+7B84sX9FfdEzXux2DBpWuKokkCqN/5pa/8pmvnL+RGKCddCGmatiPyPB/+ekO/M/q/7uvbt22kTt3zEnXPzCV13T3Gel4/6NduDu66xRvlPNkM1RjjxUdv+4WhGx6TftD19Q/dfzpwcHO+rE3fAAAAAElFTkSuQmCC",alt:"Profile Image"}),(0,s.jsx)("button",{style:{position:"absolute",left:"50%",bottom:"-24px",transform:"translateX(-50%)"},onClick:function(){return ve(!fe)},children:(0,s.jsx)(A.CameraIcon,{})})]})}),(0,s.jsx)("section",{style:{display:"flex",flexDirection:"column",flex:"citizen"===L?1:7.5,width:"100%",borderRadius:"4px",height:"fit-content",boxShadow:"citizen"===L?"":"1px 1px 4px 0px rgba(0,0,0,0.2)",background:"white",padding:"citizen"===L?"8px":"24px",paddingBottom:"20px"},children:"citizen"===L?(0,s.jsxs)(n().Fragment,{children:[(0,s.jsxs)(e.LabelFieldPair,{children:[(0,s.jsxs)(e.CardLabel,{className:"user-profile",style:{},children:["".concat(k("CORE_COMMON_PROFILE_NAME")),"*"]}),(0,s.jsxs)("div",{style:{width:"40rem",maxWidth:"960px"},children:[(0,s.jsx)(e.TextInput,Dt(Dt({t:k,style:{width:"100%"},type:"text",isMandatory:!1,name:"name",value:z,onChange:function(e){return Ke(e.target.value)}},{isRequired:!0,pattern:(null==ze||null===(d=ze.UserProfileValidationConfig)||void 0===d||null===(d=d[0])||void 0===d?void 0:d.name)||(null==Bt||null===(f=Bt.UserProfileValidationConfig)||void 0===f||null===(f=f[0])||void 0===f?void 0:f.name),type:"tel",title:k("CORE_COMMON_PROFILE_NAME_ERROR_MESSAGE")}),{},{disable:Qe})),(null==ke?void 0:ke.userName)&&(0,s.jsx)(e.ErrorMessage,{message:k(null==ke||null===(v=ke.userName)||void 0===v?void 0:v.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,s.jsxs)(e.LabelFieldPair,{children:[(0,s.jsx)(e.CardLabel,{className:"user-profile",style:{},children:"".concat(k("CORE_COMMON_PROFILE_GENDER"))}),(0,s.jsx)(e.Dropdown,{style:{width:"40rem",fontSize:"1rem"},className:"form-field profileDropdown",selected:1===(null==K?void 0:K.length)?K[0]:K,disable:1===(null==K?void 0:K.length)||Qe,option:tt,select:Ze,value:K,optionKey:"code",t:k,name:"gender"})]}),(0,s.jsxs)(e.LabelFieldPair,{children:[(0,s.jsx)(e.CardLabel,{className:"user-profile",style:{},children:"".concat(k("CORE_COMMON_PROFILE_EMAIL"))}),(0,s.jsxs)("div",{style:{width:"40rem"},children:[(0,s.jsx)(e.TextInput,{t:k,style:{width:"100%"},type:"email",isMandatory:!1,optionKey:"i18nKey",name:"email",value:Q,onChange:function(e){return Je(e.target.value)},disabled:Qe}),(null==ke?void 0:ke.emailAddress)&&(0,s.jsx)(e.ErrorMessage,{message:k(null==ke||null===(p=ke.emailAddress)||void 0===p?void 0:p.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,s.jsx)("button",{onClick:et,style:{marginTop:"24px",backgroundColor:"#c84c0e",width:"100%",height:"40px",color:"white",maxWidth:Ue?"100%":"240px",borderBottom:"1px solid black"},children:k("CORE_COMMON_SAVE")})]}):(0,s.jsxs)(n().Fragment,{children:[(0,s.jsxs)(e.LabelFieldPair,{style:{display:"flex"},children:[(0,s.jsxs)(e.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:["".concat(k("CORE_COMMON_PROFILE_NAME")),"*"]}),(0,s.jsxs)("div",{style:{width:"100%"},children:[(0,s.jsx)(e.TextInput,Dt(Dt({t:k,type:"text",isMandatory:!1,name:"name",value:z,onChange:function(e){return Ke(e.target.value)},placeholder:"Enter Your Name"},{isRequired:!0,pattern:(null==ze||null===(m=ze.UserProfileValidationConfig)||void 0===m||null===(m=m[0])||void 0===m?void 0:m.name)||(null==Bt||null===(y=Bt.UserProfileValidationConfig)||void 0===y||null===(y=y[0])||void 0===y?void 0:y.name),type:"text",title:k("CORE_COMMON_PROFILE_NAME_ERROR_MESSAGE")}),{},{disabled:Qe})),(null==ke?void 0:ke.userName)&&(0,s.jsx)(e.ErrorMessage,{message:k(null==ke||null===(g=ke.userName)||void 0===g?void 0:g.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,s.jsxs)(e.LabelFieldPair,{style:{display:"flex"},children:[(0,s.jsx)(e.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(k("CORE_COMMON_PROFILE_GENDER"))}),(0,s.jsx)("div",{style:{width:"100%"},children:(0,s.jsx)(e.Dropdown,{className:"profileDropdown",selected:1===(null==K?void 0:K.length)?K[0]:K,disable:1===(null==K?void 0:K.length)||Qe,option:tt,select:Ze,value:K,optionKey:"code",t:k,name:"gender"})})]}),(0,s.jsxs)(e.LabelFieldPair,{style:{display:"flex"},children:[(0,s.jsx)(e.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(k("CORE_COMMON_PROFILE_CITY"))}),(0,s.jsxs)("div",{style:{width:"100%"},children:[(0,s.jsx)(e.TextInput,Dt(Dt({t:k,type:"text",isMandatory:!1,name:"city",value:k(Digit.Utils.locale.getTransformedLocale("TENANT_TENANTS_".concat(B))),onChange:function(e){return te(e.target.value)},placeholder:"Enter Your City Name"},{isRequired:!0,type:"text",title:k("CORE_COMMON_PROFILE_CITY_ERROR_MESSAGE")}),{},{disabled:!0})),(0,s.jsx)(e.ErrorMessage,{})]})]}),(0,s.jsxs)(e.LabelFieldPair,{style:{display:"flex"},children:[(0,s.jsx)(e.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(k("CORE_COMMON_PROFILE_MOBILE_NUMBER"),"*")}),(0,s.jsxs)("div",{style:{width:"100%"},children:[(0,s.jsx)(e.MobileNumber,{value:re,style:{width:"100%"},name:"mobileNumber",placeholder:"Enter a valid Mobile No.",onChange:function(e){return function(e){var t;oe(e),"employee"!==L||null!=Ve&&null!==(t=Ve.mobileNumber)&&void 0!==t&&t.test(e)?Me(Dt(Dt({},ke),{},{mobileNumber:null})):Me(Dt(Dt({},ke),{},{mobileNumber:{type:"pattern",message:"CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID"}}))}(e)},disable:!Digit.Utils.getMultiRootTenant(),required:!0,pattern:(null==ze||null===(h=ze.UserProfileValidationConfig)||void 0===h||null===(h=h[0])||void 0===h?void 0:h.mobileNumber)||(null==Bt||null===(O=Bt.UserProfileValidationConfig)||void 0===O||null===(O=O[0])||void 0===O?void 0:O.mobileNumber),type:"tel",title:k("CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID")}),(null==ke?void 0:ke.mobileNumber)&&(0,s.jsx)(e.ErrorMessage,{message:k(null==ke||null===(S=ke.mobileNumber)||void 0===S?void 0:S.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,s.jsxs)(e.LabelFieldPair,{style:{display:"flex"},children:[(0,s.jsx)(e.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(k("CORE_COMMON_PROFILE_EMAIL"))}),(0,s.jsxs)("div",{style:{width:"100%"},children:[(0,s.jsx)(e.TextInput,{t:k,type:"email",isMandatory:!1,placeholder:k("EMAIL_VALIDATION"),optionKey:"i18nKey",name:"email",value:Q,onChange:function(e){return Je(e.target.value)},disabled:!!Digit.Utils.getMultiRootTenant()||Qe}),(null==ke?void 0:ke.emailAddress)&&(0,s.jsx)(e.ErrorMessage,{message:k(null==ke||null===(x=ke.emailAddress)||void 0===x?void 0:x.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,s.jsx)(e.LabelFieldPair,{children:(0,s.jsxs)("div",{style:{width:"100%"},children:[0!=me||Digit.Utils.getOTPBasedLogin()?null:(0,s.jsx)(e.Button,{label:k("CORE_COMMON_CHANGE_PASSWORD"),variation:"teritiary",onClick:function(){return ye(!me)},style:{paddingLeft:"0rem"}}),me?(0,s.jsxs)("div",{style:{marginTop:"10px"},children:[(0,s.jsxs)(e.LabelFieldPair,{style:{display:"flex"},children:[(0,s.jsx)(e.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(k("CORE_COMMON_PROFILE_CURRENT_PASSWORD"))}),(0,s.jsxs)("div",{style:{width:"100%"},children:[(0,s.jsx)(e.TextInput,{t:k,type:"password",isMandatory:!1,name:"name",pattern:(null==ze||null===(j=ze.UserProfileValidationConfig)||void 0===j||null===(j=j[0])||void 0===j?void 0:j.password)||(null==Bt||null===(w=Bt.UserProfileValidationConfig)||void 0===w||null===(w=w[0])||void 0===w?void 0:w.password),onChange:function(e){var t,n;return n=null==e||null===(t=e.target)||void 0===t?void 0:t.value,void(null!=Ve&&Ve.password.test(n)?Me(Dt(Dt({},ke),{},{currentPassword:null})):Me(Dt(Dt({},ke),{},{currentPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}})))},disabled:Qe}),(null==ke?void 0:ke.currentPassword)&&(0,s.jsx)(e.ErrorMessage,{message:k(null==ke||null===(E=ke.currentPassword)||void 0===E?void 0:E.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,s.jsxs)(e.LabelFieldPair,{style:{display:"flex"},children:[(0,s.jsx)(e.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(k("CORE_COMMON_PROFILE_NEW_PASSWORD"))}),(0,s.jsxs)("div",{style:{width:"100%"},children:[(0,s.jsx)(e.TextInput,{t:k,type:"password",isMandatory:!1,name:"name",pattern:(null==ze||null===(C=ze.UserProfileValidationConfig)||void 0===C||null===(C=C[0])||void 0===C?void 0:C.password)||(null==Bt||null===(_=Bt.UserProfileValidationConfig)||void 0===_||null===(_=_[0])||void 0===_?void 0:_.password),onChange:function(e){var t,n;return n=null==e||null===(t=e.target)||void 0===t?void 0:t.value,xe(n),void(null!=Ve&&Ve.password.test(n)?Me(Dt(Dt({},ke),{},{newPassword:null})):Me(Dt(Dt({},ke),{},{newPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}})))},disabled:Qe}),(null==ke?void 0:ke.newPassword)&&(0,s.jsx)(e.ErrorMessage,{message:k(null==ke||null===(N=ke.newPassword)||void 0===N?void 0:N.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,s.jsxs)(e.LabelFieldPair,{style:{display:"flex"},children:[(0,s.jsx)(e.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(k("CORE_COMMON_PROFILE_CONFIRM_PASSWORD"))}),(0,s.jsxs)("div",{style:{width:"100%"},children:[(0,s.jsx)(e.TextInput,{t:k,type:"password",isMandatory:!1,name:"name",pattern:(null==ze||null===(I=ze.UserProfileValidationConfig)||void 0===I||null===(I=I[0])||void 0===I?void 0:I.password)||(null==Bt||null===(D=Bt.UserProfileValidationConfig)||void 0===D||null===(D=D[0])||void 0===D?void 0:D.password),onChange:function(e){var t,n;return n=null==e||null===(t=e.target)||void 0===t?void 0:t.value,Ee(n),void(null!=Ve&&Ve.password.test(n)?Me(Dt(Dt({},ke),{},{confirmPassword:null})):Me(Dt(Dt({},ke),{},{confirmPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}})))},disabled:Qe}),(null==ke?void 0:ke.confirmPassword)&&(0,s.jsx)(e.ErrorMessage,{message:k(null==ke||null===(T=ke.confirmPassword)||void 0===T?void 0:T.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]})]}):""]})}),"employee"===L&&Ue?(0,s.jsx)("button",{onClick:et,style:{marginTop:"24px",backgroundColor:"#c84c0e",width:"100%",height:"40px",color:"white",maxWidth:Ue?"100%":"240px",borderBottom:"1px solid black",fontWeight:"700",fontSize:"17px"},children:k("CORE_COMMON_SAVE")}):null]})})]}),"employee"!==L||Ue?null:(0,s.jsx)(e.Footer,{actionFields:[(0,s.jsx)(e.SubmitBar,{t:k,label:k("CORE_COMMON_SAVE"),onSubmit:et})],className:"",setactionFieldsToRight:!0}),_e&&(0,s.jsx)(e.Toast,{type:_e.key,label:k("success"===_e.key?"CORE_COMMON_PROFILE_UPDATE_SUCCESS":_e.action),onClose:function(){return Ne(null)},style:{maxWidth:"670px"}}),1==fe?(0,s.jsx)(Nt,{setProfilePic:rt,closeDrawer:Ye,userType:L,removeProfilePic:function(){le(null),ce(null)},showToast:$e}):""]})};function Gt(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Vt(e,t);var n={}.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)?Vt(e,t):void 0}}(e,t)||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.")}()}function Vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const Ht=function(n){var o,i,a=n.module,l=Digit.UserService.getUser(),u=((null==l||null===(o=l.info)||void 0===o?void 0:o.tenantId)||Digit.ULBService.getCurrentTenantId(),(0,r.useTranslation)().t),c=Digit.SessionStorage.get("initData").stateInfo,d=Digit.StoreData.getCurrentLanguage(),f=Gt((0,t.useState)(d),2),v=f[0],p=f[1],m=Gt((0,t.useState)(!1),2),y=m[0],g=m[1],b=Gt((0,t.useState)(""),2),h=b[0],O=b[1],S=function(){return(0,s.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M12 24C5.38053 24 0 18.6143 0 12C0 5.38054 5.38053 1.90735e-06 12 1.90735e-06C18.6143 1.90735e-06 24 5.38054 24 12C24 18.6143 18.6143 24 12 24ZM16.3488 10.7852L11.3855 7.25251C11.1263 7.0701 10.8238 6.97889 10.5214 6.97889C10.291 6.97889 10.0557 7.03172 9.83976 7.14202C9.34054 7.40118 9.02857 7.91006 9.02857 8.46694L9.02877 15.5323C9.02877 16.0892 9.34076 16.5979 9.83996 16.8572C10.3344 17.1116 10.9296 17.0732 11.3857 16.7467L16.349 13.214C16.7426 12.9356 16.9778 12.4795 16.9778 11.9996C16.9776 11.5197 16.7426 11.0636 16.3489 10.7852L16.3488 10.7852Z",fill:"white"})})},x=Digit.Hooks.useGetHowItWorksJSON(Digit.ULBService.getStateId()),j=x.isLoading,w=x.data,E=null==w||null===(i=w.MdmsRes["common-masters"])||void 0===i||null===(i=i.howItWorks[0])||void 0===i?void 0:i["".concat(a)];return j?(0,s.jsx)(e.Loader,{}):(0,s.jsx)(t.Fragment,{children:(0,s.jsxs)("div",{className:"how-it-works-page",children:[(0,s.jsx)(e.BackButton,{}),(0,s.jsx)("div",{className:"how-it-works-page-header",children:(0,s.jsx)(e.HeaderComponent,{children:u(E.screenHeader?E.screenHeader:"HOW_IT_WORKS")})}),(0,s.jsx)("div",{className:"language-selector",style:{margin:"10px"},children:[{label:"ENGLISH",value:"en_IN"},{label:"हिंदी",value:"hi_IN"}].map(function(e,t){return(0,s.jsx)("div",{className:"language-button-container",children:(0,s.jsx)(A.CustomButton,{selected:e.value===v,text:e.label,onClick:function(){return function(e){p(e.value),Digit.LocalizationService.changeLanguage(e.value,c.code)}(e)}})},t)})}),E.videosJson.map(function(e,t){return(0,s.jsx)("div",{children:(0,s.jsxs)("div",{className:"WhatsNewCard",style:{float:"left",position:"relative",width:"100%",marginBottom:10},children:[(0,s.jsx)("div",{className:"video-icon",onClick:function(){return t=e,O("hi_IN"===v?t.hi_IN:t.en_IN),void g(!0);var t},children:(0,s.jsx)("div",{className:"vid-svg",children:(0,s.jsx)(S,{})})}),(0,s.jsxs)("div",{className:"how-it-works-header-description",children:[(0,s.jsx)("h2",{children:u(e.headerLabel)}),(0,s.jsx)("p",{children:u(e.description)})]})]})})}),E.pdfHeader&&E.pdfDesc&&(0,s.jsx)("div",{className:"WhatsNewCard",style:{position:"relative",width:"100%",marginBottom:10,display:"inline-block"},children:(0,s.jsxs)("div",{className:"how-it-works-pdf-section",children:[(0,s.jsxs)("div",{className:"pdf-icon-header-desc",children:[(0,s.jsx)("div",{className:"pdf-icon",children:(0,s.jsx)(e.PDFSvg,{})}),(0,s.jsxs)("div",{className:"pdf-header-desc",children:[(0,s.jsx)("h2",{children:u(E.pdfHeader)}),(0,s.jsx)("p",{children:u(E.pdfDesc)})]})]}),(0,s.jsx)("div",{className:"download-icon",children:(0,s.jsx)(e.DownloadImgIcon,{})})]})}),y&&(0,s.jsxs)("div",{className:"how-it-works-video-play",children:[(0,s.jsx)("div",{className:"close-button",children:(0,s.jsx)(e.CloseSvg,{onClick:function(){g(!1)}})}),(0,s.jsx)("video",{width:500,height:500,controls:!0,autoPlay:!0,children:(0,s.jsx)("source",{src:h,type:"video/mp4"})})]})]})})};var Wt=[{texts:{header:"CS_LOGIN_PROVIDE_MOBILE_NUMBER",cardText:"CS_LOGIN_TEXT",nextText:"CS_COMMONS_NEXT",submitBarLabel:"CS_COMMONS_NEXT"},inputs:[{label:"CORE_COMMON_MOBILE_NUMBER",type:"text",name:"mobileNumber",error:"ERR_HRMS_INVALID_MOB_NO",validation:{required:!0,minlength:10,maxlength:10}}]},{texts:{header:"CS_LOGIN_OTP",cardText:"CS_LOGIN_OTP_TEXT",nextText:"CS_COMMONS_NEXT",submitBarLabel:"CS_COMMONS_NEXT"}},{texts:{header:"CS_LOGIN_PROVIDE_NAME",cardText:"CS_LOGIN_NAME_TEXT",nextText:"CS_COMMONS_NEXT",submitBarLabel:"CS_COMMONS_NEXT"},inputs:[{label:"CORE_COMMON_NAME",type:"text",name:"name",error:"CORE_COMMON_NAME_VALIDMSG",validation:{required:!0,minlength:1,maxlength:50,pattern:"^[A-Za-z]+( [A-Za-z]+)*$"}}]}];const zt=function(t){var n=t.t,r=t.onSelect,o=(t.showRegisterLink,t.mobileNumber),i=t.onMobileChange,a=t.config,l=t.canSubmit;return(0,s.jsx)(e.FormStep,{isDisabled:!(10===o.length&&l),onSelect:r,config:a,t:n,componentInFront:"+91",onChange:i,value:o})},Xt=function(t){var n=t.config,r=t.onSelect,o=t.t,i=t.isDisabled;return(0,s.jsx)(e.FormStep,{config:n,onSelect:r,t:o,isDisabled:i})},qt=function(e,n){var r=(0,t.useRef)();(0,t.useEffect)(function(){r.current=e},[e]),(0,t.useEffect)(function(){if(null!==n){var e=setInterval(function(){r.current()},n);return function(){return clearInterval(e)}}},[n])};function Qt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const Zt=function(n){var r,o,i=n.config,a=n.otp,l=n.onOtpChange,u=n.onResend,c=n.onSelect,d=n.t,f=n.error,v=n.userType,p=void 0===v?"citizen":v,m=n.canSubmit,y=(r=(0,t.useState)(30),o=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(r,o)||function(e,t){if(e){if("string"==typeof e)return Qt(e,t);var n={}.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)?Qt(e,t):void 0}}(r,o)||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.")}()),g=y[0],b=y[1];qt(function(){b(g-1)},g>0?1e3:null);var h=function(){u(),b(2)};return"employee"===p?(0,s.jsxs)(t.Fragment,{children:[(0,s.jsx)(A.OTPInput,{length:6,onChange:l,value:a}),g>0?(0,s.jsx)(e.CardText,{children:"".concat(d("CS_RESEND_ANOTHER_OTP")," ").concat(g," ").concat(d("CS_RESEND_SECONDS"))}):(0,s.jsx)("p",{className:"card-text-button resend-otp",onClick:h,children:d("CS_RESEND_OTP")}),!f&&(0,s.jsx)(e.CardLabelError,{children:d("CS_INVALID_OTP")})]}):(0,s.jsxs)(e.FormStep,{onSelect:c,config:i,t:d,isDisabled:!(6===(null==a?void 0:a.length)&&m),children:[(0,s.jsx)(A.OTPInput,{length:6,onChange:l,value:a}),g>0?(0,s.jsx)(e.CardText,{children:"".concat(d("CS_RESEND_ANOTHER_OTP")," ").concat(g," ").concat(d("CS_RESEND_SECONDS"))}):(0,s.jsx)("p",{className:"card-text-button",onClick:h,children:d("CS_RESEND_OTP")}),!f&&(0,s.jsx)(e.CardLabelError,{children:d("CS_INVALID_OTP")})]})};function Yt(e){return Yt="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},Yt(e)}var Kt,Jt=["ResponseInfo","UserRequest"],$t=["ResponseInfo","UserRequest"];function en(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function tn(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return nn(s,"_invoke",function(n,r,o){var i,l,u,s=0,c=o||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return i=t,l=0,u=e,f.n=n,a}};function v(n,r){for(l=n,u=r,t=0;!d&&s&&!o&&t<c.length;t++){var o,i=c[t],v=f.p,p=i[2];n>3?(o=p===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=v&&((o=n<2&&v<i[1])?(l=0,f.v=r,f.n=i[1]):v<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,f.n=p,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,c,p){if(s>1)throw TypeError("Generator is already running");for(d&&1===c&&v(c,p),l=c,u=p;(t=l<2?e:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),v(l,u)):f.n=u:f.v=u);try{if(s=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(t){i=e,l=1,u=t}finally{s=1}}return{value:t,done:d}}}(n,o,i),!0),s}var a={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(nn(t={},r,function(){return this}),t),d=s.prototype=l.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,nn(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=s,nn(d,"constructor",s),nn(s,"constructor",u),u.displayName="GeneratorFunction",nn(s,o,"GeneratorFunction"),nn(d),nn(d,o,"Generator"),nn(d,r,function(){return this}),nn(d,"toString",function(){return"[object Generator]"}),(tn=function(){return{w:i,m:f}})()}function nn(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}nn=function(e,t,n,r){function i(t,n){nn(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},nn(e,t,n,r)}function rn(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,o)}function on(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){rn(i,r,o,a,l,"next",e)}function l(e){rn(i,r,o,a,l,"throw",e)}a(void 0)})}}function an(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 ln(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?an(Object(n),!0).forEach(function(t){un(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):an(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function un(e,t,n){return(t=function(e){var t=function(e){if("object"!=Yt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Yt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sn(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return cn(e,t);var n={}.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)?cn(e,t):void 0}}(e,t)||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.")}()}function cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var dn={type:"register"},fn={type:"login"},vn="/".concat(null===(Kt=window)||void 0===Kt?void 0:Kt.contextPath,"/citizen"),pn=function(e,t){return(null==e?void 0:e.from)||(null==t?void 0:t.from)||vn};const mn=function(n){var o,i,l=n.stateCode,u=n.isUserRegistered,c=void 0===u||u,d=(0,r.useTranslation)().t,f=(0,a.useLocation)(),v=(0,a.useNavigate)(),p=sn((0,t.useState)(null),2),m=p[0],y=p[1],g=sn((0,t.useState)(null),2),b=g[0],h=g[1],O=sn((0,t.useState)(!0),2),S=O[0],x=O[1],j=sn((0,t.useState)(null),2),w=(j[0],j[1],sn((0,t.useState)(c?{}:null==f||null===(o=f.state)||void 0===o?void 0:o.data),2)),E=w[0],C=w[1],_=sn((0,t.useState)(null),2),N=_[0],I=_[1],A=Digit.Hooks.useQueryParams(),D=sn((0,t.useState)(!1),2),T=D[0],P=D[1],L=sn((0,t.useState)(!0),2),R=L[0],k=L[1],M=sn((0,t.useState)(!0),2),U=M[0],B=M[1];(0,t.useEffect)(function(){var e;return b&&(N&&(clearTimeout(N),I(null)),e=setTimeout(function(){h("")},5e3),I(e)),function(){e&&clearTimeout(e)}},[b]),(0,t.useEffect)(function(){var e;if(m){Digit.SessionStorage.set("citizen.userRequestObject",m),Digit.UserService.setUser(m),function(e,t,n){var r;if(!Digit.Utils.getMultiRootTenant()){var o=null===(r=JSON.parse(sessionStorage.getItem("Digit.initData")))||void 0===r||null===(r=r.value)||void 0===r?void 0:r.selectedLanguage;localStorage.setItem("Citizen.tenant-id",n),localStorage.setItem("tenant-id",n),localStorage.setItem("citizen.userRequestObject",JSON.stringify(e)),localStorage.setItem("locale",o),localStorage.setItem("Citizen.locale",o),localStorage.setItem("token",t),localStorage.setItem("Citizen.token",t),localStorage.setItem("user-info",JSON.stringify(e)),localStorage.setItem("Citizen.user-info",JSON.stringify(e))}}(null==m?void 0:m.info,null==m?void 0:m.access_token,l);var t,n=(null===(e=f.state)||void 0===e?void 0:e.from)||vn;Digit.ULBService.getCitizenCurrentTenant(!0)?v(n,{replace:!0}):v("/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/citizen/select-location"),{state:{redirectBackTo:n},replace:!0})}},[m]);var F=(0,t.useMemo)(function(){return Wt.map(function(e){var t={};for(var n in e.texts)t[n]=d(e.texts[n]);return ln(ln({},e),{},{texts:t})},[Wt])}),G=function(){return"citizen"},V=function(){var e=on(tn().m(function e(t){var n,r,o,i,a,u,s,p,m;return tn().w(function(e){for(;;)switch(e.n){case 0:if(B(!1),C(ln(ln({},E),t)),n=ln(ln({},t),{},{tenantId:l,userType:G()}),!c){e.n=4;break}return e.n=1,X({otp:ln(ln({},n),fn)});case 1:if(o=e.v,(i=sn(o,2))[0],i[1]){e.n=2;break}return B(!0),v("otp",{state:{from:pn(f.state,A),role:null===(a=f.state)||void 0===a?void 0:a.role},replace:!0}),e.a(2);case 2:B(!0),f.state&&"FSM_DSO"===f.state.role||v("/".concat(null===(u=window)||void 0===u?void 0:u.contextPath,"/citizen/register/name"),{state:{from:pn(f.state,A),data:n}});case 3:null!==(r=f.state)&&void 0!==r&&r.role&&(B(!0),h("FSM_DSO"===(null===(s=f.state)||void 0===s?void 0:s.role)?d("ES_ERROR_DSO_LOGIN"):"User not registered.")),e.n=7;break;case 4:return e.n=5,X({otp:ln(ln({},n),dn)});case 5:if(p=e.v,(m=sn(p,2))[0],m[1]){e.n=6;break}return B(!0),v("otp",{state:{from:pn(f.state,A)},replace:!0}),e.a(2);case 6:B(!0);case 7:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),H=function(){var e=on(tn().m(function e(t){var n,r,o,i;return tn().w(function(e){for(;;)switch(e.n){case 0:return n=ln(ln({},E),{},{tenantId:l,userType:G()},t),C(ln(ln({},E),t)),P(!0),e.n=1,X({otp:ln(ln({},n),dn)});case 1:r=e.v,o=sn(r,2),i=o[0],o[1],i?(P(!1),v("otp",{state:{from:pn(f.state,A)},replace:!0})):P(!1);case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),W=function(){var e=on(tn().m(function e(){var t,n,r,o,i,a,u,s,p,m,g,b,O,S,j;return tn().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,x(!0),k(!1),t=E.mobileNumber,n=E.otp,r=E.name,!c){e.n=3;break}return a={username:t,password:n,tenantId:l,userType:G()},e.n=1,Digit.UserService.authenticate(a);case 1:if((u=e.v).ResponseInfo,s=u.UserRequest,p=en(u,Jt),null===(o=f.state)||void 0===o||!o.role){e.n=2;break}if((m=s.roles.find(function(e){return e.code===f.state.role}))&&m.code){e.n=2;break}return h(d("ES_ERROR_USER_NOT_PERMITTED")),setTimeout(function(){return v(vn,{replace:!0})},5e3),e.a(2);case 2:null!==(i=window)&&void 0!==i&&null!==(i=i.globalConfigs)&&void 0!==i&&i.getConfig("ENABLE_SINGLEINSTANCE")&&(s.tenantId=Digit.ULBService.getStateId()),y(ln({info:s},p)),e.n=5;break;case 3:if(c){e.n=5;break}return b={name:r,username:t,otpReference:n,tenantId:l},e.n=4,Digit.UserService.registerUser(b,l);case 4:(O=e.v).ResponseInfo,S=O.UserRequest,j=en(O,$t),null!==(g=window)&&void 0!==g&&null!==(g=g.globalConfigs)&&void 0!==g&&g.getConfig("ENABLE_SINGLEINSTANCE")&&(S.tenantId=Digit.ULBService.getStateId()),y(ln({info:S},j));case 5:e.n=7;break;case 6:e.p=6,e.v,k(!0),x(!1);case 7:return e.a(2)}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),z=function(){var e=on(tn().m(function e(){var t,n,r,o,i,a;return tn().w(function(e){for(;;)switch(e.n){case 0:if(t=E.mobileNumber,n={mobileNumber:t,tenantId:l,userType:G()},c){e.n=2;break}return e.n=1,X({otp:ln(ln({},n),dn)});case 1:r=e.v,(o=sn(r,2))[0],o[1],e.n=4;break;case 2:if(!c){e.n=4;break}return e.n=3,X({otp:ln(ln({},n),fn)});case 3:i=e.v,(a=sn(i,2))[0],a[1];case 4:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),X=function(){var e=on(tn().m(function e(t){var n,r;return tn().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,Digit.UserService.sendOtp(t,l);case 1:return n=e.v,e.a(2,[n,null]);case 2:return e.p=2,r=e.v,e.a(2,[null,r])}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}();return(0,s.jsx)("div",{className:"citizen-form-wrapper",children:(0,s.jsxs)(e.AppContainer,{children:[f.pathname.includes("login")?null:(0,s.jsx)(e.BackLink,{onClick:function(){return v(-1)}}),(0,s.jsxs)(a.Routes,{children:[" ",(0,s.jsx)(a.Route,{path:"/",element:(0,s.jsx)(zt,{onSelect:V,config:F[0],mobileNumber:E.mobileNumber||"",onMobileChange:function(e){var t=e.target.value;C(ln(ln({},E),{},{mobileNumber:t}))},canSubmit:U,showRegisterLink:c&&!(null!==(i=f.state)&&void 0!==i&&i.role),t:d})}),(0,s.jsx)(a.Route,{path:"otp",element:(0,s.jsx)(Zt,{config:ln(ln({},F[1]),{},{texts:ln(ln({},F[1].texts),{},{cardText:"".concat(F[1].texts.cardText," ").concat(E.mobileNumber||"")})}),onOtpChange:function(e){C(ln(ln({},E),{},{otp:e}))},onResend:z,onSelect:W,otp:E.otp,error:S,canSubmit:R,t:d})}),(0,s.jsx)(a.Route,{path:"name",element:(0,s.jsx)(Xt,{config:F[2],onSelect:H,t:d,isDisabled:T})}),b&&(0,s.jsx)(e.Toast,{type:"error",label:b,onClose:function(){return h(null)}})]})]})})};f(1761),f(8598);var yn=e=>e instanceof HTMLElement;const gn="blur",bn="change",hn="input",On="onChange",Sn="onSubmit",xn="select",jn="undefined",wn="pattern",En="required";var Cn=e=>null==e;const _n=e=>"object"==typeof e;var Nn=e=>!Cn(e)&&!Array.isArray(e)&&_n(e)&&!(e instanceof Date),In=e=>/^\w*$/.test(e),An=e=>e.filter(Boolean),Dn=e=>An(e.replace(/["|']/g,"").replace(/\[/g,".").replace(/\]/g,"").split("."));function Tn(e,t,n){let r=-1;const o=In(t)?[t]:Dn(t),i=o.length,a=i-1;for(;++r<i;){const t=o[r];let i=n;if(r!==a){const n=e[t];i=Nn(n)||Array.isArray(n)?n:isNaN(+o[r+1])?{}:[]}e[t]=i,e=e[t]}return e}var Pn=(e,t={})=>{for(const n in e)In(n)?t[n]=e[n]:Tn(t,n,e[n]);return t},Ln=e=>void 0===e,Rn=(e={},t,n)=>{const r=An(t.split(/[,[\].]+?/)).reduce((e,t)=>Cn(e)?e:e[t],e);return Ln(r)||r===e?Ln(e[t])?n:e[t]:r},kn=(e,t)=>{yn(e)&&e.removeEventListener&&(e.removeEventListener(hn,t),e.removeEventListener(bn,t),e.removeEventListener(gn,t))};const Mn={isValid:!1,value:null};var Un=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.ref.checked?{isValid:!0,value:t.ref.value}:e,Mn):Mn,Bn=e=>"radio"===e.type,Fn=e=>"file"===e.type,Gn=e=>"checkbox"===e.type,Vn=e=>e.type===`${xn}-multiple`;const Hn={value:!1,isValid:!1},Wn={value:!0,isValid:!0};var zn=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.ref.checked).map(({ref:{value:e}})=>e);return{value:t,isValid:!!t.length}}const{checked:t,value:n,attributes:r}=e[0].ref;return t?r&&!Ln(r.value)?Ln(n)||""===n?Wn:{value:n,isValid:!0}:Wn:Hn}return Hn};function Xn(e,t,n,r,o){const i=e.current[t];if(i){const{ref:{value:e,disabled:t},ref:n,valueAsNumber:l,valueAsDate:u,setValueAs:s}=i;if(t&&r)return;return Fn(n)?n.files:Bn(n)?Un(i.options).value:Vn(n)?(a=n.options,[...a].filter(({selected:e})=>e).map(({value:e})=>e)):Gn(n)?zn(i.options).value:o?e:l?""===e?NaN:+e:u?n.valueAsDate:s?s(e):e}var a;if(n)return Rn(n.current,t)}function qn(e){return!e||e instanceof HTMLElement&&e.nodeType!==Node.DOCUMENT_NODE&&qn(e.parentNode)}var Qn=e=>Nn(e)&&!Object.keys(e).length,Zn=e=>"boolean"==typeof e;function Yn(e,t){const n=In(t)?[t]:Dn(t),r=1==n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Ln(e)?r++:e[t[r++]];return e}(e,n),o=n[n.length-1];let i;r&&delete r[o];for(let t=0;t<n.slice(0,-1).length;t++){let r,o=-1;const a=n.slice(0,-(t+1)),l=a.length-1;for(t>0&&(i=e);++o<a.length;){const t=a[o];r=r?r[t]:e[t],l===o&&(Nn(r)&&Qn(r)||Array.isArray(r)&&!r.filter(e=>Nn(e)&&!Qn(e)||Zn(e)).length)&&(i?delete i[t]:delete e[t]),i=r}}return e}const Kn=(e,t)=>e&&e.ref===t;var Jn=e=>Cn(e)||!_n(e);function $n(e,t){if(Jn(e)||Jn(t))return t;for(const n in t){const r=e[n],o=t[n];try{e[n]=Nn(r)&&Nn(o)||Array.isArray(r)&&Array.isArray(o)?$n(r,o):o}catch(e){}}return e}function er(e,n,r){if(Jn(e)||Jn(n)||e instanceof Date||n instanceof Date)return e===n;if(!(0,t.isValidElement)(e)){const t=Object.keys(e),o=Object.keys(n);if(t.length!==o.length)return!1;for(const o of t){const t=e[o];if(!r||"ref"!==o){const e=n[o];if((Nn(t)||Array.isArray(t))&&(Nn(e)||Array.isArray(e))?!er(t,e,r):t!==e)return!1}}}return!0}function tr(e,t,n,r,o){let i=-1;for(;++i<e.length;){for(const r in e[i])Array.isArray(e[i][r])?(!n[i]&&(n[i]={}),n[i][r]=[],tr(e[i][r],Rn(t[i]||{},r,[]),n[i][r],n[i],r)):er(Rn(t[i]||{},r),e[i][r])?Tn(n[i]||{},r):n[i]=Object.assign(Object.assign({},n[i]),{[r]:!0});r&&!n.length&&delete r[o]}return n}var nr=e=>"string"==typeof e,rr=(e,t,n,r,o)=>{const i={};for(const t in e.current)(Ln(o)||(nr(o)?t.startsWith(o):Array.isArray(o)&&o.find(e=>t.startsWith(e))))&&(i[t]=Xn(e,t,void 0,r));return n?Pn(i):$n(t,Pn(i))},or=e=>e instanceof RegExp,ir=e=>Nn(e)&&!or(e)?e:{value:e,message:""},ar=e=>"function"==typeof e,lr=e=>nr(e)||(0,t.isValidElement)(e);function ur(e,t,n="validate"){if(lr(e)||Zn(e)&&!e)return{type:n,message:lr(e)?e:"",ref:t}}var sr=(e,t,n,r,o)=>t?Object.assign(Object.assign({},n[e]),{types:Object.assign(Object.assign({},n[e]&&n[e].types?n[e].types:{}),{[r]:o||!0})}):{},cr=async(e,t,{ref:n,ref:{value:r},options:o,required:i,maxLength:a,minLength:l,min:u,max:s,pattern:c,validate:d},f)=>{const v=n.name,p={},m=Bn(n),y=Gn(n),g=m||y,b=""===r,h=sr.bind(null,v,t,p),O=(e,t,r,o="maxLength",i="minLength")=>{const a=e?t:r;p[v]=Object.assign({type:e?o:i,message:a,ref:n},h(e?o:i,a))};if(i&&(!m&&!y&&(b||Cn(r))||Zn(r)&&!r||y&&!zn(o).isValid||m&&!Un(o).isValid)){const{value:r,message:o}=lr(i)?{value:!!i,message:i}:ir(i);if(r&&(p[v]=Object.assign({type:En,message:o,ref:g?((e.current[v].options||[])[0]||{}).ref:n},h(En,o)),!t))return p}if(!(Cn(u)&&Cn(s)||""===r)){let e,o;const i=ir(s),a=ir(u);if(isNaN(r)){const t=n.valueAsDate||new Date(r);nr(i.value)&&(e=t>new Date(i.value)),nr(a.value)&&(o=t<new Date(a.value))}else{const t=n.valueAsNumber||parseFloat(r);Cn(i.value)||(e=t>i.value),Cn(a.value)||(o=t<a.value)}if((e||o)&&(O(!!e,i.message,a.message,"max","min"),!t))return p}if(nr(r)&&!b&&(a||l)){const e=ir(a),n=ir(l),o=!Cn(e.value)&&r.length>e.value,i=!Cn(n.value)&&r.length<n.value;if((o||i)&&(O(o,e.message,n.message),!t))return p}if(nr(r)&&c&&!b){const{value:e,message:o}=ir(c);if(or(e)&&!e.test(r)&&(p[v]=Object.assign({type:wn,message:o,ref:n},h(wn,o)),!t))return p}if(d){const r=Xn(e,v,f,!1,!0),i=g&&o?o[0].ref:n;if(ar(d)){const e=ur(await d(r),i);if(e&&(p[v]=Object.assign(Object.assign({},e),h("validate",e.message)),!t))return p}else if(Nn(d)){let e={};for(const[n,o]of Object.entries(d)){if(!Qn(e)&&!t)break;const a=ur(await o(r),i,n);a&&(e=Object.assign(Object.assign({},a),h(n,a.message)),t&&(p[v]=e))}if(!Qn(e)&&(p[v]=Object.assign({ref:i},e),!t))return p}}return p};const dr=(e,t,n=[])=>{for(const r in t){const o=e+(Nn(t)?`.${r}`:`[${r}]`);Jn(t[r])?n.push(o):dr(o,t[r],n)}return n};var fr=(e,t,n,r,o)=>{let i;return n.add(t),Qn(e)||(i=Rn(e,t),(Nn(i)||Array.isArray(i))&&dr(t,i).forEach(e=>n.add(e))),Ln(i)?o?r:Rn(r,t):i},vr=({isOnBlur:e,isOnChange:t,isOnTouch:n,isTouched:r,isReValidateOnBlur:o,isReValidateOnChange:i,isBlurEvent:a,isSubmitted:l,isOnAll:u})=>!u&&(!l&&n?!(r||a):(l?o:e)?!a:!(l?i:t)||a),pr=e=>e.substring(0,e.indexOf("["));var mr=(e,t)=>[...e].some(e=>((e,t)=>RegExp(`^${t}([|.)\\d+`.replace(/\[/g,"\\[").replace(/\]/g,"\\]")).test(e))(t,e)),yr=typeof window!==jn&&typeof document!==jn;function gr(e){var t;let n;if(Jn(e)||yr&&(e instanceof File||yn(e)))return e;if(!["Set","Map","Object","Date","Array"].includes(null===(t=e.constructor)||void 0===t?void 0:t.name))return e;if(e instanceof Date)return n=new Date(e.getTime()),n;if(e instanceof Set){n=new Set;for(const t of e)n.add(t);return n}if(e instanceof Map){n=new Map;for(const t of e.keys())n.set(t,gr(e.get(t)));return n}n=Array.isArray(e)?[]:{};for(const t in e)n[t]=gr(e[t]);return n}var br=e=>({isOnSubmit:!e||e===Sn,isOnBlur:"onBlur"===e,isOnChange:e===On,isOnAll:"all"===e,isOnTouch:"onTouched"===e}),hr=e=>Bn(e)||Gn(e);const Or=typeof window===jn,Sr=yr?"Proxy"in window:typeof Proxy!==jn;function xr({mode:e=Sn,reValidateMode:n=On,resolver:r,context:o,defaultValues:i={},shouldFocusError:a=!0,shouldUnregister:l=!0,criteriaMode:u}={}){const s=(0,t.useRef)({}),c=(0,t.useRef)({}),d=(0,t.useRef)({}),f=(0,t.useRef)(new Set),v=(0,t.useRef)({}),p=(0,t.useRef)({}),m=(0,t.useRef)({}),y=(0,t.useRef)({}),g=(0,t.useRef)(i),b=(0,t.useRef)(!1),h=(0,t.useRef)(!1),O=(0,t.useRef)(),S=(0,t.useRef)({}),x=(0,t.useRef)({}),j=(0,t.useRef)(o),w=(0,t.useRef)(r),E=(0,t.useRef)(new Set),C=(0,t.useRef)(br(e)),{isOnSubmit:_,isOnTouch:N}=C.current,I="all"===u,[A,D]=(0,t.useState)({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touched:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!_,errors:{}}),T=(0,t.useRef)({isDirty:!Sr,dirtyFields:!Sr,touched:!Sr||N,isValidating:!Sr,isSubmitting:!Sr,isValid:!Sr}),P=(0,t.useRef)(A),L=(0,t.useRef)(),{isOnBlur:R,isOnChange:k}=(0,t.useRef)(br(n)).current;j.current=o,w.current=r,P.current=A,S.current=l?{}:Qn(S.current)?gr(i):S.current;const M=(0,t.useCallback)((e={})=>{b.current||(P.current=Object.assign(Object.assign({},P.current),e),D(P.current))},[]),U=()=>T.current.isValidating&&M({isValidating:!0}),B=(0,t.useCallback)((e,t,n=!1,r={},o)=>{let i=n||(({errors:e,name:t,error:n,validFields:r,fieldsWithValidation:o})=>{const i=Ln(n),a=Rn(e,t);return i&&!!a||!i&&!er(a,n,!0)||i&&Rn(o,t)&&!Rn(r,t)})({errors:P.current.errors,error:t,name:e,validFields:y.current,fieldsWithValidation:m.current});const a=Rn(P.current.errors,e);t?(Yn(y.current,e),i=i||!a||!er(a,t,!0),Tn(P.current.errors,e,t)):((Rn(m.current,e)||w.current)&&(Tn(y.current,e,!0),i=i||a),Yn(P.current.errors,e)),(i&&!Cn(n)||!Qn(r)||T.current.isValidating)&&M(Object.assign(Object.assign(Object.assign({},r),w.current?{isValid:!!o}:{}),{isValidating:!1}))},[]),F=(0,t.useCallback)((e,t)=>{const{ref:n,options:r}=s.current[e],o=yr&&yn(n)&&Cn(t)?"":t;Bn(n)?(r||[]).forEach(({ref:e})=>e.checked=e.value===o):Fn(n)&&!nr(o)?n.files=o:Vn(n)?[...n.options].forEach(e=>e.selected=o.includes(e.value)):Gn(n)&&r?r.length>1?r.forEach(({ref:e})=>e.checked=Array.isArray(o)?!!o.find(t=>t===e.value):o===e.value):r[0].ref.checked=!!o:n.value=o},[]),G=(0,t.useCallback)((e,t)=>{if(T.current.isDirty){const n=K();return e&&t&&Tn(n,e,t),!er(n,g.current)}return!1},[]),V=(0,t.useCallback)((e,t=!0)=>{if(T.current.isDirty||T.current.dirtyFields){const n=!er(Rn(g.current,e),Xn(s,e,S)),r=Rn(P.current.dirtyFields,e),o=P.current.isDirty;n?Tn(P.current.dirtyFields,e,!0):Yn(P.current.dirtyFields,e);const i={isDirty:G(),dirtyFields:P.current.dirtyFields},a=T.current.isDirty&&o!==i.isDirty||T.current.dirtyFields&&r!==Rn(P.current.dirtyFields,e);return a&&t&&M(i),a?i:{}}return{}},[]),H=(0,t.useCallback)(async(e,t)=>{const n=(await cr(s,I,s.current[e],S))[e];return B(e,n,t),Ln(n)},[B,I]),W=(0,t.useCallback)(async e=>{const{errors:t}=await w.current(K(),j.current,I),n=P.current.isValid;if(Array.isArray(e)){const n=e.map(e=>{const n=Rn(t,e);return n?Tn(P.current.errors,e,n):Yn(P.current.errors,e),!n}).every(Boolean);return M({isValid:Qn(t),isValidating:!1}),n}{const r=Rn(t,e);return B(e,r,n!==Qn(t),{},Qn(t)),!r}},[B,I]),z=(0,t.useCallback)(async e=>{const t=e||Object.keys(s.current);if(U(),w.current)return W(t);if(Array.isArray(t)){!e&&(P.current.errors={});const n=await Promise.all(t.map(async e=>await H(e,null)));return M({isValidating:!1}),n.every(Boolean)}return await H(t)},[W,H]),X=(0,t.useCallback)((e,t,{shouldDirty:n,shouldValidate:r})=>{const o={};Tn(o,e,t);for(const i of dr(e,t))s.current[i]&&(F(i,Rn(o,i)),n&&V(i),r&&z(i))},[z,F,V]),q=(0,t.useCallback)((e,t,n)=>{if(!l&&!Jn(t)&&Tn(S.current,e,Array.isArray(t)?[...t]:Object.assign({},t)),s.current[e])F(e,t),n.shouldDirty&&V(e),n.shouldValidate&&z(e);else if(!Jn(t)&&(X(e,t,n),E.current.has(e))){const r=pr(e)||e;Tn(c.current,e,t),x.current[r]({[r]:Rn(c.current,r)}),(T.current.isDirty||T.current.dirtyFields)&&n.shouldDirty&&(Tn(P.current.dirtyFields,e,((e,t,n)=>$n(tr(e,t,n.slice(0,e.length)),tr(t,e,n.slice(0,e.length))))(t,Rn(g.current,e,[]),Rn(P.current.dirtyFields,e,[]))),M({isDirty:!er(Object.assign(Object.assign({},K()),{[e]:t}),g.current)}))}!l&&Tn(S.current,e,t)},[V,F,X]),Q=e=>h.current||f.current.has(e)||f.current.has((e.match(/\w+/)||[])[0]),Z=e=>{let t=!0;if(!Qn(v.current))for(const n in v.current)e&&v.current[n].size&&!v.current[n].has(e)&&!v.current[n].has(pr(e))||(p.current[n](),t=!1);return t};function Y(e){if(!l){let t=gr(e);for(const e of E.current)In(e)&&!t[e]&&(t=Object.assign(Object.assign({},t),{[e]:[]}));return t}return e}function K(e){if(nr(e))return Xn(s,e,S);if(Array.isArray(e)){const t={};for(const n of e)Tn(t,n,Xn(s,n,S));return t}return Y(rr(s,gr(S.current),l))}O.current=O.current?O.current:async({type:e,target:t})=>{let n=t.name;const r=s.current[n];let o,i;if(r){const a=e===gn,u=vr(Object.assign({isBlurEvent:a,isReValidateOnChange:k,isReValidateOnBlur:R,isTouched:!!Rn(P.current.touched,n),isSubmitted:P.current.isSubmitted},C.current));let c=V(n,!1),d=!Qn(c)||!a&&Q(n);if(a&&!Rn(P.current.touched,n)&&T.current.touched&&(Tn(P.current.touched,n,!0),c=Object.assign(Object.assign({},c),{touched:P.current.touched})),!l&&Gn(t)&&Tn(S.current,n,Xn(s,n)),u)return!a&&Z(n),(!Qn(c)||d&&Qn(c))&&M(c);if(U(),w.current){const{errors:e}=await w.current(K(),j.current,I),r=P.current.isValid;if(o=Rn(e,n),Gn(t)&&!o&&w.current){const t=pr(n),r=Rn(e,t,{});r.type&&r.message&&(o=r),t&&(r||Rn(P.current.errors,t))&&(n=t)}i=Qn(e),r!==i&&(d=!0)}else o=(await cr(s,I,r,S))[n];!a&&Z(n),B(n,o,d,c,i)}};const J=(0,t.useCallback)(async(e={})=>{const t=Qn(s.current)?g.current:{},{errors:n}=await w.current(Object.assign(Object.assign(Object.assign({},t),K()),e),j.current,I)||{},r=Qn(n);P.current.isValid!==r&&M({isValid:r})},[I]),$=(0,t.useCallback)((e,t)=>{!function(e,t,n,r,o,i){const{ref:a,ref:{name:l}}=n,u=e.current[l];if(!o){const t=Xn(e,l,r);!Ln(t)&&Tn(r.current,l,t)}a.type&&u?Bn(a)||Gn(a)?Array.isArray(u.options)&&u.options.length?(An(u.options).forEach((e={},n)=>{(qn(e.ref)&&Kn(e,e.ref)||i)&&(kn(e.ref,t),Yn(u.options,`[${n}]`))}),u.options&&!An(u.options).length&&delete e.current[l]):delete e.current[l]:(qn(a)&&Kn(u,a)||i)&&(kn(a,t),delete e.current[l]):delete e.current[l]}(s,O.current,e,S,l,t),l&&(Yn(y.current,e.ref.name),Yn(m.current,e.ref.name))},[l]),ee=(0,t.useCallback)(e=>{if(h.current)M();else{for(const t of f.current)if(t.startsWith(e)){M();break}Z(e)}},[]),te=(0,t.useCallback)((e,t)=>{e&&($(e,t),l&&!An(e.options||[]).length&&(Yn(P.current.errors,e.ref.name),Tn(P.current.dirtyFields,e.ref.name,!0),M({isDirty:G()}),T.current.isValid&&w.current&&J(),ee(e.ref.name)))},[J,$]),ne=(0,t.useCallback)((e,t,n)=>{const r=n?v.current[n]:f.current;let o=rr(s,gr(S.current),l,!1,e);if(nr(e)){const n=pr(e)||e;return E.current.has(n)&&(o=Object.assign(Object.assign({},d.current),o)),fr(o,e,r,Ln(Rn(g.current,e))?t:Rn(g.current,e),!0)}const i=Ln(t)?g.current:t;return Array.isArray(e)?e.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:fr(o,t,r,i)}),{}):(h.current=Ln(n),Pn(!Qn(o)&&o||i))},[]);function re(e,t={}){const{name:n,type:r,value:o}=e,i=Object.assign({ref:e},t),a=s.current,u=hr(e),c=mr(E.current,n),d=t=>yr&&(!yn(e)||t===e);let f,v=a[n],p=!0;if(v&&(u?Array.isArray(v.options)&&An(v.options).find(e=>o===e.ref.value&&d(e.ref)):d(v.ref)))return void(a[n]=Object.assign(Object.assign({},v),t));v=r?u?Object.assign({options:[...An(v&&v.options||[]),{ref:e}],ref:{type:r,name:n}},t):Object.assign({},i):i,a[n]=v;const b=Ln(Rn(S.current,n));Qn(g.current)&&b||(f=Rn(b?g.current:S.current,n),p=Ln(f),p||c||F(n,f)),Qn(t)||(Tn(m.current,n,!0),!_&&T.current.isValid&&cr(s,I,v,S).then(e=>{const t=P.current.isValid;Qn(e)?Tn(y.current,n,!0):Yn(y.current,n),t!==Qn(e)&&M()})),!l||c&&p||!c&&Yn(P.current.dirtyFields,n),r&&function({ref:e},t,n){yn(e)&&n&&(e.addEventListener(t?bn:hn,n),e.addEventListener(gn,n))}(u&&v.options?v.options[v.options.length-1]:v,u||e.type===`${xn}-one`,O.current)}const oe=(0,t.useCallback)((e,t)=>async n=>{n&&n.preventDefault&&(n.preventDefault(),n.persist());let r={},o=Y(rr(s,gr(S.current),l,!0));T.current.isSubmitting&&M({isSubmitting:!0});try{if(w.current){const{errors:e,values:t}=await w.current(o,j.current,I);P.current.errors=r=e,o=t}else for(const e of Object.values(s.current))if(e){const{name:t}=e.ref,n=await cr(s,I,e,S);n[t]?(Tn(r,t,n[t]),Yn(y.current,t)):Rn(m.current,t)&&(Yn(P.current.errors,t),Tn(y.current,t,!0))}Qn(r)&&Object.keys(P.current.errors).every(e=>e in s.current)?(M({errors:{},isSubmitting:!0}),await e(o,n)):(P.current.errors=Object.assign(Object.assign({},P.current.errors),r),t&&await t(P.current.errors,n),a&&((e,t)=>{for(const n in e)if(Rn(t,n)){const t=e[n];if(t){if(t.ref.focus&&Ln(t.ref.focus()))break;if(t.options){t.options[0].ref.focus();break}}}})(s.current,P.current.errors))}finally{P.current.isSubmitting=!1,M({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Qn(P.current.errors),submitCount:P.current.submitCount+1})}},[a,I]);(0,t.useEffect)(()=>{r&&T.current.isValid&&J(),L.current=L.current||!yr?L.current:function(e,t){const n=new MutationObserver(()=>{for(const n of Object.values(e.current))if(n&&n.options)for(const e of n.options)e&&e.ref&&qn(e.ref)&&t(n);else n&&qn(n.ref)&&t(n)});return n.observe(window.document,{childList:!0,subtree:!0}),n}(s,te)},[te,g.current]),(0,t.useEffect)(()=>()=>{L.current&&L.current.disconnect(),b.current=!0,Object.values(s.current).forEach(e=>te(e,!0))},[]),!r&&T.current.isValid&&(A.isValid=er(y.current,m.current)&&Qn(P.current.errors));const ie={trigger:z,setValue:(0,t.useCallback)(function(e,t,n){q(e,t,n||{}),Q(e)&&M(),Z(e)},[q,z]),getValues:(0,t.useCallback)(K,[]),register:(0,t.useCallback)(function(e,t){if(!Or)if(nr(e))re({name:e},t);else{if(!Nn(e)||!("name"in e))return t=>t&&re(t,e);re(e,t)}},[g.current]),unregister:(0,t.useCallback)(function(e){for(const t of Array.isArray(e)?e:[e])te(s.current[t],!0)},[]),formState:Sr?new Proxy(A,{get:(e,t)=>{if(t in e)return T.current[t]=!0,e[t]}}):A},ae=(0,t.useMemo)(()=>Object.assign({isFormDirty:G,updateWatchedValue:ee,shouldUnregister:l,updateFormState:M,removeFieldEventListener:$,watchInternal:ne,mode:C.current,reValidateMode:{isReValidateOnBlur:R,isReValidateOnChange:k},validateResolver:r?J:void 0,fieldsRef:s,resetFieldArrayFunctionRef:x,useWatchFieldsRef:v,useWatchRenderFunctionsRef:p,fieldArrayDefaultValuesRef:c,validFieldsRef:y,fieldsWithValidationRef:m,fieldArrayNamesRef:E,readFormStateRef:T,formStateRef:P,defaultValuesRef:g,shallowFieldsStateRef:S,fieldArrayValuesRef:d},ie),[g.current,ee,l,$,ne]);return Object.assign({watch:function(e,t){return ne(e,t)},control:ae,handleSubmit:oe,reset:(0,t.useCallback)((e,t={})=>{if(yr)for(const e of Object.values(s.current))if(e){const{ref:t,options:n}=e,r=hr(t)&&Array.isArray(n)?n[0].ref:t;if(yn(r))try{r.closest("form").reset();break}catch(e){}}s.current={},g.current=Object.assign({},e||g.current),e&&Z(""),Object.values(x.current).forEach(e=>ar(e)&&e()),S.current=l?{}:gr(e||g.current),(({errors:e,isDirty:t,isSubmitted:n,touched:r,isValid:o,submitCount:i,dirtyFields:a})=>{o||(y.current={},m.current={}),c.current={},f.current=new Set,h.current=!1,M({submitCount:i?P.current.submitCount:0,isDirty:!!t&&P.current.isDirty,isSubmitted:!!n&&P.current.isSubmitted,isValid:!!o&&P.current.isValid,dirtyFields:a?P.current.dirtyFields:{},touched:r?P.current.touched:{},errors:e?P.current.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})})(t)},[]),clearErrors:(0,t.useCallback)(function(e){e&&(Array.isArray(e)?e:[e]).forEach(e=>s.current[e]&&In(e)?delete P.current.errors[e]:Yn(P.current.errors,e)),M({errors:e?P.current.errors:{}})},[]),setError:(0,t.useCallback)(function(e,t){const n=(s.current[e]||{}).ref;Tn(P.current.errors,e,Object.assign(Object.assign({},t),{ref:n})),M({isValid:!1}),t.shouldFocus&&n&&n.focus&&n.focus()},[]),errors:A.errors},ie)}const jr=(0,t.createContext)(null);jr.displayName="RHFContext";function wr({name:e,rules:n,defaultValue:r,control:o,onFocus:i}){const a=(0,t.useContext)(jr),{defaultValuesRef:l,setValue:u,register:s,unregister:c,trigger:d,mode:f,reValidateMode:{isReValidateOnBlur:v,isReValidateOnChange:p},formState:m,formStateRef:{current:{isSubmitted:y,touched:g,errors:b}},updateFormState:h,readFormStateRef:O,fieldsRef:S,fieldArrayNamesRef:x,shallowFieldsStateRef:j}=o||a.control,w=!mr(x.current,e),E=()=>!Ln(Rn(j.current,e))&&w?Rn(j.current,e):Ln(r)?Rn(l.current,e):r,[C,_]=(0,t.useState)(E()),N=(0,t.useRef)(C),I=(0,t.useRef)({focus:()=>null}),A=(0,t.useRef)(i||(()=>{ar(I.current.focus)&&I.current.focus()})),D=(0,t.useCallback)(t=>!vr(Object.assign({isBlurEvent:t,isReValidateOnBlur:v,isReValidateOnChange:p,isSubmitted:y,isTouched:!!Rn(g,e)},f)),[v,p,y,g,e,f]),T=(0,t.useCallback)(([e])=>{const t=(e=>Jn(e)||!Nn(e.target)||Nn(e.target)&&!e.type?e:Ln(e.target.value)?e.target.checked:e.target.value)(e);return _(t),N.current=t,t},[]),P=(0,t.useCallback)(t=>{S.current[e]?S.current[e]=Object.assign({ref:S.current[e].ref},n):(s(Object.defineProperties({name:e,focus:A.current},{value:{set(e){_(e),N.current=e},get:()=>N.current}}),n),t=Ln(Rn(l.current,e))),t&&w&&_(E())},[n,e,s]);(0,t.useEffect)(()=>()=>c(e),[e]),(0,t.useEffect)(()=>{P()},[P]),(0,t.useEffect)(()=>{!S.current[e]&&P(!0)});const L=(0,t.useCallback)(()=>{O.current.touched&&!Rn(g,e)&&(Tn(g,e,!0),h({touched:g})),D(!0)&&d(e)},[e,h,D,d,O]);return{field:{onChange:(0,t.useCallback)((...t)=>u(e,T(t),{shouldValidate:D(),shouldDirty:!0}),[u,e,D]),onBlur:L,name:e,value:C,ref:I},meta:Object.defineProperties({invalid:!!Rn(b,e)},{isDirty:{get:()=>!!Rn(m.dirtyFields,e)},isTouched:{get:()=>!!Rn(m.touched,e)}})}}const Er=e=>{const{rules:n,as:r,render:o,defaultValue:i,control:a,onFocus:l}=e,u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["rules","as","render","defaultValue","control","onFocus"]),{field:s,meta:c}=wr(e),d=Object.assign(Object.assign({},u),s);return r?(0,t.isValidElement)(r)?(0,t.cloneElement)(r,d):(0,t.createElement)(r,d):o?o(s,c):null},Cr=function(t){t.register;var n=t.control,r=(t.reset,t.tenantId,t.t),o=(t.previousPage,t.formState,t.isLoading,window.Digit.Utils.browser.isMobile());return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(e.SearchField,{className:"pt-form-field",children:[(0,s.jsx)("label",{children:r("AUDIT_FROM_DATE_LABEL")}),(0,s.jsx)(Er,{render:function(t){return(0,s.jsx)(e.DatePicker,{date:t.value,onChange:t.onChange})},name:"fromDate",control:n})]}),(0,s.jsxs)(e.SearchField,{className:"pt-form-field",children:[(0,s.jsx)("label",{children:r("AUDIT_TO_DATE_LABEL")}),(0,s.jsx)(Er,{render:function(t){return(0,s.jsx)(e.DatePicker,{date:t.value,onChange:t.onChange})},name:"toDate",control:n})]}),(0,s.jsx)(e.SearchField,{className:"pt-search-action-submit",children:(0,s.jsx)(e.Button,{style:{marginTop:o?"510px":"25px",marginLeft:o?"0":"-30px",maxWidth:o?"100%":"240px"},label:r("ES_COMMON_APPLY"),submit:!0})})]})};function _r(e){return _r="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},_r(e)}var Nr=["currentlyActiveMobileModal","searchFormFieldsComponentProps","tenantId"],Ir=["currentlyActiveMobileModal","searchFormFieldsComponentProps","tenantId"];function Ar(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Dr(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 Tr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dr(Object(n),!0).forEach(function(t){Pr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pr(e,t,n){return(t=function(e){var t=function(e){if("object"!=_r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_r(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lr(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Rr(e,t);var n={}.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)?Rr(e,t):void 0}}(e,t)||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.")}()}function Rr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const kr=function(r){var o,i=r.Controller,a=r.register,l=r.control,u=r.t,c=r.reset,d=r.previousPage,f=r.handleSubmit,v=r.tenantId,p=r.data,m=r.onSubmit,y=r.isLoading,g=Lr((0,t.useState)([]),2),b=g[0],h=g[1],O=function(t){return(0,s.jsx)("div",{onClick:t.onClick,children:(0,s.jsx)(e.DownloadBtnCommon,{})})};(0,t.useEffect)(function(){(null==p?void 0:p.length)>0&&h([null==p?void 0:p.map(function(e){var t={};return t[u("AUDIT_DATE_LABEL")]=S(null==e?void 0:e.timestamp),t[u("AUDIT_TIME_LABEL")]=x(null==e?void 0:e.timestamp),t[u("AUDIT_DATAVIEWED_LABEL")]=(null==e?void 0:e.dataView[0])+","+(null==e?void 0:e.dataView[1]),t[u("AUDIT_DATAVIEWED_BY_LABEL")]=null==e?void 0:e.dataViewedBy,t[u("AUDIT_ROLE_LABEL")]=null==e?void 0:e.roles.map(function(e){return e.name}).join(","),Tr({},t)})])},[p]);var S=function(e){if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getMonth()+1,r=t.getDate(),o=t.getFullYear();return n=(n>9?"":"0")+n,"".concat(r=(r>9?"":"0")+r,"/").concat(n,"/").concat(o)},x=function(e){if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getHours(),r=t.getMinutes(),o=n>12?"PM":"AM";return r=(r>9?"":"0")+r,"".concat(n=((n=n>12?n-12:n)>9?"":"0")+n,":").concat(r," ").concat(o)},j=Lr((0,t.useReducer)(function(e,t){switch(t.type){case"set":return t.payload;case"remove":return!1}},!1),2),w=j[0],E=j[1],C=function(){E({type:"remove"})},_=function(){return(0,s.jsx)("div",{className:"InboxMobilePopupCloseButtonWrapper",onClick:C,children:(0,s.jsx)(e.CloseSvg,{})})},N={Controller:i,register:a,control:l,t:u,reset:c,previousPage:d},I=(0,t.useCallback)(function(t){return function(t){var n=t.currentlyActiveMobileModal,r=t.searchFormFieldsComponentProps,o=t.tenantId,i=Ar(t,Nr),a=i.closeMobilePopupModal;return"SearchFormComponent"===n?(0,s.jsxs)(e.SearchForm,Tr(Tr({},i),{},{children:[(0,s.jsx)(_,{}),(0,s.jsx)("div",{className:"MobilePopupHeadingWrapper",children:(0,s.jsxs)("h2",{children:[u("PRIVACY_AUDIT_REPORT"),":"]})}),(0,s.jsx)(Cr,Tr(Tr({},r),{},{closeMobilePopupModal:a,tenantId:o,t:u}))]})):(0,s.jsx)("span",{})}(Tr({currentlyActiveMobileModal:t.currentlyActiveMobileModal,searchFormFieldsComponentProps:t.searchFormFieldsComponentProps,tenantId:t.tenantId},Ar(t,Ir)))},[w]),A=[];null==p||null===(o=p.roles)||void 0===o||o.forEach(function(e){A.push(null==e?void 0:e.name)});var D=(0,t.useMemo)(function(){return null!=p&&p.display||""===p?[]:null==p?void 0:p.map(function(e){var t;return Pr(Pr(Pr(Pr(Pr({},u("AUDIT_DATE_LABEL"),S(e.timestamp)),u("AUDIT_TIME_LABEL"),x(e.timestamp)),u("AUDIT_DATAVIEWED_LABEL"),e.dataView[0]+","+e.dataView[1]),u("AUDIT_DATAVIEWED_BY_LABEL"),e.dataViewedBy),u("AUDIT_ROLE_LABEL"),null===(t=e.roles.slice(0,3))||void 0===t?void 0:t.map(function(e){return e.name}).join(","))})},[p]);return(0,s.jsxs)(n().Fragment,{children:[(0,s.jsx)(e.BackButton,{}),(0,s.jsx)("div",{className:"sideContent",style:{marginLeft:"70%",marginTop:"-12%"},children:(0,s.jsx)(O,{className:"mrlg cursorPointer",onClick:function(){return function(e){if(void 0!==(null==e?void 0:e[0]))return Digit.Download.Excel(null==e?void 0:e[0],"AuditReport")}(b)}})}),(0,s.jsxs)(e.HeaderComponent,{children:[u("PRIVACY_AUDIT_REPORT"),":"]}),(0,s.jsx)("div",{className:"digit-search-box",children:(0,s.jsx)(e.SearchAction,{text:u("ES_COMMON_SEARCH"),handleActionClick:function(){return E({type:"set",payload:"SearchFormComponent"})},tenantId:v,t:u})}),w?(0,s.jsx)(e.PopUp,{children:(0,s.jsx)(I,{onSubmit:function(e){E({type:"remove"}),m(e)},handleSubmit:f,id:"search-form",className:"rm-mb form-field-flex-one inboxPopupMobileWrapper",searchFormFieldsComponentProps:N,currentlyActiveMobileModal:w,closeMobilePopupModal:C,tenantId:v})}):null,y&&(0,s.jsx)(e.Loader,{}),(0,s.jsx)(e.DetailsCard,{data:D})]})};function Mr(e){return Mr="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},Mr(e)}function Ur(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 Br(e,t,n){return(t=function(e){var t=function(e){if("object"!=Mr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Mr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Mr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const Gr=function(r){var o,i,a=r.tenantId,l=r.t,u=r.onSubmit,c=r.data,d=r.count,f=xr({defaultValues:Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{offset:0,limit:5,sortOrder:"DESC"}}),v=f.register,p=f.control,m=f.handleSubmit,y=f.setValue,g=f.getValues,b=f.reset,h=function(e){if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getMonth()+1,r=t.getDate(),o=t.getFullYear();return n=(n>9?"":"0")+n,"".concat(r=(r>9?"":"0")+r,"/").concat(n,"/").concat(o)},O=function(e){if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getHours(),r=t.getMinutes(),o=n>12?"PM":"AM";return r=(r>9?"":"0")+r,"".concat(n=((n=n>12?n-12:n)>9?"":"0")+n,":").concat(r," ").concat(o)},S=(o=(0,t.useState)([]),i=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(o,i)||function(e,t){if(e){if("string"==typeof e)return Fr(e,t);var n={}.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)?Fr(e,t):void 0}}(o,i)||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.")}()),x=S[0],j=S[1],w=function(e){return(0,s.jsx)("div",{onClick:e.onClick,children:(0,s.jsx)(A.DownloadBtnCommon,{})})};(0,t.useEffect)(function(){v("offset",0),v("limit",5),v("sortOrder","DESC")},[v]),(0,t.useEffect)(function(){(null==c?void 0:c.length)>0&&j([null==c?void 0:c.map(function(e){var t={};return t[l("AUDIT_DATE_LABEL")]=h(null==e?void 0:e.timestamp),t[l("AUDIT_TIME_LABEL")]=O(null==e?void 0:e.timestamp),t[l("AUDIT_DATAVIEWED_LABEL")]=(null==e?void 0:e.dataView[0])+","+(null==e?void 0:e.dataView[1]),t[l("AUDIT_DATAVIEWED_BY_LABEL")]=null==e?void 0:e.dataViewedBy,t[l("AUDIT_ROLE_LABEL")]=null==e?void 0:e.roles.map(function(e){return e.name}).join(","),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ur(Object(n),!0).forEach(function(t){Br(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ur(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},t)})])},[c]);var E=(0,t.useCallback)(function(e){0!==e.length&&(y("sortBy",e.id),y("sortOrder",e.desc?"DESC":"ASC"))},[]);function C(){y("offset",g("offset")-g("limit")),m(u)()}var _=window.Digit.Utils.browser.isMobile();if(_)return(0,s.jsx)(kr,{Controller:Er,register:v,control:p,t:l,reset:b,previousPage:C,handleSubmit:m,tenantId:a,data:c,onSubmit:u});var N=function(e){return(0,s.jsx)("span",{className:"cell-text",children:e})},I=(0,t.useMemo)(function(){return[{Header:l("AUDIT_DATE_LABEL"),disableSortBy:!0,accessor:function(e){var t="NA"===e.timestamp?l("WS_NA"):h(e.timestamp);return N("".concat(t))}},{Header:l("AUDIT_TIME_LABEL"),disableSortBy:!0,accessor:function(e){var t="NA"===e.timestamp?l("WS_NA"):O(e.timestamp);return N("".concat(t))}},{Header:l(_?"AUDIT_DATAVIEWED_LABEL":"AUDIT_DATAVIEWED_PRIVACY"),disableSortBy:!0,accessor:function(e){return N("".concat(null==e?void 0:e.dataView))}},{Header:l(_?"AUDIT_DATAVIEWED_BY_LABEL":"AUDIT_DATAVIEWED_BY_PRIVACY"),disableSortBy:!0,accessor:function(e){return N("".concat(null==e?void 0:e.dataViewedBy))}},{Header:l("AUDIT_ROLE_LABEL"),disableSortBy:!0,accessor:function(e){var t;return N("".concat(null==e||null===(t=e.roles.slice(0,3))||void 0===t?void 0:t.map(function(e){return e.name})))}}]},[]);return(0,s.jsxs)(n().Fragment,{children:[(0,s.jsxs)("div",{style:{marginRight:"-70px"},children:[" ",(0,s.jsx)(e.BackButton,{})," "]}),(0,s.jsxs)("div",{style:{marginTop:"30px",marginLeft:"30px"},children:[" ",(0,s.jsx)(e.HeaderComponent,{children:l("PRIVACY_AUDIT_REPORT")})," "]}),(0,s.jsx)(e.SearchForm,{className:"audit-card",onSubmit:u,handleSubmit:m,children:(0,s.jsx)(Cr,{register:v,control:p,reset:b,tenantId:a,t:l,previousPage:C})}),(0,s.jsx)("div",{style:{marginTop:"240px",marginLeft:"-55%",maxWidth:"80%",marginRight:"52px"},children:null!=c&&c.display?(0,s.jsx)("div",{style:{marginTop:"20x",width:"1025px",marginLeft:"25px",backgroundColor:"white",height:"60px"},children:l(c.display).split("\\n").map(function(e,t){return(0,s.jsx)("p",{style:{textAlign:"center"},children:e},t)})}):""!==c?(0,s.jsxs)("div",{style:{backgroundColor:"white",marginRight:"-30px",marginLeft:"30px"},children:[(0,s.jsx)("div",{className:"sideContent",style:{float:"right",padding:"10px 30px"},children:(0,s.jsx)(w,{className:"mrlg cursorPointer",onClick:function(){return function(e){if(void 0!==(null==e?void 0:e[0]))return Digit.Download.Excel(null==e?void 0:e[0],"AuditReport")}(x)}})}),(0,s.jsx)(A.Table,{t:l,data:c,totalRecords:d,columns:I,getCellProps:function(e){return{style:{minWidth:e.column.Header===l("ES_INBOX_APPLICATION_NO")?"240px":"",padding:"20px 18px",fontSize:"16px"}}},onPageSizeChange:function(e){y("limit",Number(e.target.value)),m(u)()},currentPage:g("offset")/g("limit"),onNextPage:function(){y("offset",g("offset")+g("limit")),m(u)()},onPrevPage:C,manualPagination:!1,pageSizeLimit:g("limit"),onSort:E,disableSort:!1,sortParams:[{id:g("sortBy"),desc:"DESC"===g("sortOrder")}]})]}):(0,s.jsx)(e.Loader,{})})]})};function Vr(e){return Vr="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},Vr(e)}function Hr(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 Wr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hr(Object(n),!0).forEach(function(t){zr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zr(e,t,n){return(t=function(e){var t=function(e){if("object"!=Vr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Vr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const qr=function(e){e.path;var n,o,i,a,l=(0,r.useTranslation)().t,u=Digit.ULBService.getCitizenCurrentTenant(),c=(i=(0,t.useState)({}),a=2,function(e){if(Array.isArray(e))return e}(i)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(i,a)||function(e,t){if(e){if("string"==typeof e)return Xr(e,t);var n={}.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)?Xr(e,t):void 0}}(i,a)||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.")}()),d=c[0],f=c[1],v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dayend";try{var n=e.match(/(\d{4})-(\d{1,2})-(\d{1,2})/),r=new Date(Date.UTC(n[1],n[2]-1,n[3]));return r.setMinutes(r.getMinutes()+r.getTimezoneOffset()),"dayend"===t&&(r.setHours(r.getHours()+24),r.setSeconds(r.getSeconds()-1)),r.getTime()}catch(t){return e}};(0,t.useEffect)(function(){var e=Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{};if(e){var t=Wr({},e);f(Object.keys(t).filter(function(e){return t[e]}).reduce(function(e,n){return Wr(Wr({},e),{},zr({},n,"object"===Vr(t[n])?t[n].code:t[n]))},{}))}},[]);var p={enabled:!!(d&&Object.keys(d).length>0)},m=Wr({},d),y=Digit.Hooks.useAudit({tenantId:u,filters:Wr({},m),config:p}),g=y.isLoading,b=y.data;return(0,s.jsx)(Gr,{t:l,tenantId:u,onSubmit:function(e){Digit.SessionStorage.set("AUDIT_APPLICATION_DETAIL",{offset:0,limit:5,sortBy:"commencementDate",sortOrder:"DESC"});var t=Wr(Wr({},e),{},{fromDate:v(null==e?void 0:e.fromDate),toDate:v(null==e?void 0:e.toDate)});f(Object.keys(t).filter(function(e){return t[e]}).reduce(function(e,n){return Wr(Wr({},e),{},zr({},n,(Vr(t[n]),t[n])))},{}))},data:g?"":(null==b||null===(n=b.ElasticSearchData)||void 0===n?void 0:n.length)>0?null==b?void 0:b.ElasticSearchData:{display:"ES_COMMON_NO_DATA"},count:null==b||null===(o=b.ElasticSearchData)||void 0===o?void 0:o.length})},Qr=function(t){var o,i,a,l,u,c,d,f,v,p,m,y,g,b,h,O=t.moduleCode,S=(0,r.useTranslation)().t,x=Digit.ULBService.getCitizenCurrentTenant(),j=Digit.Hooks.useStaticData(Digit.ULBService.getStateId()),w=j.isLoading,E=j.data,C=Digit.Hooks.useDynamicData({moduleCode:O,tenantId:x,filters:{},t:S}),_=C.isLoading,N=C.error,I=C.data,A=(C.isSuccess,function(t){var n=t.module,r=t.styles;switch(n){case"TL":default:return(0,s.jsx)(e.CaseIcon,{className:"fill-path-primary-main",styles:r});case"PT":return(0,s.jsx)(e.PTIcon,{className:"fill-path-primary-main",styles:r});case"MCOLLECT":return(0,s.jsx)(e.MCollectIcon,{className:"fill-path-primary-main",styles:r});case"PGR":return(0,s.jsx)(e.ComplaintIcon,{className:"fill-path-primary-main",styles:r})}}),D=null==E||null===(o=E.MdmsRes["common-masters"])||void 0===o||null===(o=o.StaticData[0])||void 0===o?void 0:o["".concat(O)],T=function(t){switch(t.module){case"PT":case"WS":return(0,s.jsx)("span",{className:"timerIcon",children:(0,s.jsx)(e.TimerIcon,{})});default:return null}},P=function(t){switch(t.module){case"PT":return(0,s.jsx)("span",{className:"rupeeSymbol",children:(0,s.jsx)(e.RupeeSymbol,{})});case"WS":return(0,s.jsx)("span",{className:"timerIcon",children:(0,s.jsx)(e.TimerIcon,{})});default:return null}},L=function(e){switch(e){case"TL":case"PT":case"MCOLLECT":return{staticCommonContent:S("COMMON_VALIDITY"),validity:(null==D?void 0:D.validity)+("1"===(null==D?void 0:D.validity)?S("COMMON_DAY"):S("COMMON_DAYS"))};case"PGR":return{staticCommonContent:S("ACTION_TEST_COMPLAINT_TYPES")};case"OBPS":return{staticCommonContent:S("BUILDING_PLAN_PERMIT_VALIDITY"),validity:(null==D?void 0:D.validity)+" "+("1"===(null==D?void 0:D.validity)?S("COMMON_DAY"):S("COMMON_DAYS"))};default:return{staticCommonContent:""}}},R=function(e){switch(e){case"PT":return{staticDataOne:(null==D?void 0:D.staticDataOne)+" "+S("COMMON_DAYS"),staticDataOneHeader:S("APPLICATION_PROCESSING_TIME"),staticDataTwo:null==D?void 0:D.staticDataTwo,staticDataTwoHeader:S("APPLICATION_PROCESSING_FEE")};case"WS":return{staticDataOne:"",staticDataOneHeader:S("PAY_WATER_CHARGES_BY")+" "+(null==D?void 0:D.staticDataOne)+" "+S("COMMON_DAYS")+" "+S("OF_BILL_GEN_TO_AVOID_LATE_FEE"),staticDataTwo:(null==D?void 0:D.staticDataTwo)+" "+S("COMMON_DAYS"),staticDataTwoHeader:S("APPLICATION_PROCESSING_TIME")};default:return{}}};return w||_?(0,s.jsx)(e.Loader,{}):D?(0,s.jsxs)(n().Fragment,{children:[D&&null!=D&&D.payViaWhatsApp?(0,s.jsx)(e.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"},children:(0,s.jsxs)("div",{className:"pay-whatsapp-card",onClick:function(){return e=null==D?void 0:D.payViaWhatsApp,void window.open(e);var e},children:[(0,s.jsx)("div",{className:"pay-whatsapp-text",children:S("PAY_VIA_WHATSAPP")}),(0,s.jsx)("div",{className:"whatsAppIconG",children:(0,s.jsx)(e.WhatsappIconGreen,{})})]})}):null,D&&null!=D&&D.helpline?(0,s.jsxs)(e.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"},children:[(0,s.jsxs)("div",{className:"static-home-Card",children:[(0,s.jsx)("div",{className:"static-home-Card-header",children:S("CALL_CENTER_HELPLINE")}),(0,s.jsx)("div",{className:"helplineIcon",children:(0,s.jsx)(e.HelpLineIcon,{})})]}),(0,s.jsxs)("div",{className:"call-center-card-text",children:[null!=D&&null!==(i=D.helpline)&&void 0!==i&&i.contactOne?(0,s.jsx)("div",{className:"call-center-card-content",children:(0,s.jsx)("a",{href:"tel:".concat(null==D||null===(a=D.helpline)||void 0===a?void 0:a.contactOne),children:null==D||null===(l=D.helpline)||void 0===l?void 0:l.contactOne})}):null,null!=D&&null!==(u=D.helpline)&&void 0!==u&&u.contactTwo?(0,s.jsx)("div",{className:"call-center-card-content",children:(0,s.jsx)("a",{href:"tel:".concat(null==D||null===(c=D.helpline)||void 0===c?void 0:c.contactTwo),children:null==D||null===(d=D.helpline)||void 0===d?void 0:d.contactTwo})}):null]})]}):null,D&&null!=D&&D.serviceCenter?(0,s.jsxs)(e.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"},children:[(0,s.jsxs)("div",{className:"static-home-Card",children:[(0,s.jsx)("div",{className:"static-home-Card-header",children:S("CITIZEN_SERVICE_CENTER")}),(0,s.jsx)("div",{className:"serviceCentrIcon",children:(0,s.jsx)(e.ServiceCenterIcon,{})})]}),(0,s.jsx)("div",{className:"service-center-details-card",children:(0,s.jsx)("div",{className:"service-center-details-text",children:null==D?void 0:D.serviceCenter})}),null!=D&&D.viewMapLocation?(0,s.jsx)("div",{className:"link",children:(0,s.jsx)("a",{href:null==D?void 0:D.viewMapLocation,children:S("VIEW_ON_MAP")})}):null]}):(0,s.jsx)("div",{}),(0,s.jsxs)(e.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"},children:[N||null==I||null===(null==I?void 0:I.dynamicDataOne)?(0,s.jsx)("div",{}):(0,s.jsx)("div",{className:"dynamicDataCard",children:(0,s.jsxs)("div",{className:"dynamicData",children:[(0,s.jsx)(A,{module:O,styles:{width:"24px",height:"24px"}}),(0,s.jsx)("span",{className:"dynamicData-content",children:null==I?void 0:I.dynamicDataOne})]})}),N||null==I||null===(null==I?void 0:I.dynamicDataTwo)?(0,s.jsx)("div",{}):(0,s.jsx)("div",{className:"dynamicDataCard",children:(0,s.jsxs)("div",{className:"dynamicData",children:[(0,s.jsx)(A,{module:O,styles:{width:"24px",height:"24px"}}),(0,s.jsx)("span",{className:"dynamicData-content",children:null==I?void 0:I.dynamicDataTwo})]})}),D&&null!=D&&D.staticDataOne?(0,s.jsx)("div",{className:"staticDataCard",children:(0,s.jsxs)("div",{className:"staticData",children:[(0,s.jsx)(T,{module:O}),(0,s.jsxs)("span",{className:"static-data-content",children:[(0,s.jsx)("span",{className:"static-data-content-first",style:{marginTop:""===(null===(f=R(O))||void 0===f?void 0:f.staticDataOne)?"8px":"unset"},children:null===(v=R(O))||void 0===v?void 0:v.staticDataOneHeader}),(0,s.jsx)("span",{className:"static-data-content-second",children:"".concat(null===(p=R(O))||void 0===p?void 0:p.staticDataOne)})]})]})}):(0,s.jsx)("div",{}),D&&null!=D&&D.staticDataTwo?(0,s.jsx)("div",{className:"staticDataCard",children:(0,s.jsxs)("div",{className:"staticData",children:[(0,s.jsx)(P,{module:O}),(0,s.jsxs)("span",{className:"static-data-content",children:[(0,s.jsx)("span",{className:"static-data-content-first",children:null===(m=R(O))||void 0===m?void 0:m.staticDataTwoHeader}),(0,s.jsx)("span",{className:"static-data-content-second",children:null===(y=R(O))||void 0===y?void 0:y.staticDataTwo})]})]})}):(0,s.jsx)("div",{}),D&&null!=D&&D.validity?(0,s.jsx)("div",{className:"staticDataCard",children:(0,s.jsxs)("div",{className:"staticData",children:[(0,s.jsx)("span",{className:"validityIcon",children:(0,s.jsx)(e.ValidityTimeIcon,{})}),(0,s.jsxs)("span",{className:"static-data-content",children:[(0,s.jsx)("span",{className:"static-data-content-first",children:null===(g=L(O))||void 0===g?void 0:g.staticCommonContent}),(0,s.jsx)("span",{className:"static-data-content-second",children:null===(b=L(O))||void 0===b?void 0:b.validity})]})]})}):(0,s.jsx)("div",{}),N||null==I||null==I||!I.staticData||null===(null==I?void 0:I.staticData)?(0,s.jsx)("div",{}):(0,s.jsx)("div",{className:"staticDataCard",children:(0,s.jsxs)("div",{className:"staticData",children:["PGR"===O?(0,s.jsx)(A,{module:O,styles:{width:"24px",height:"24px",marginLeft:"13px",marginTop:"12px"}}):(0,s.jsx)("span",{className:"validityIcon",children:(0,s.jsx)(e.ValidityTimeIcon,{})}),(0,s.jsxs)("span",{className:"static-data-content",children:[(0,s.jsx)("span",{className:"static-data-content-first",children:null===(h=L(O))||void 0===h?void 0:h.staticCommonContent}),(0,s.jsx)("span",{className:"static-data-content-second",children:null==I?void 0:I.staticData})]})]})})]})]}):(0,s.jsx)(n().Fragment,{})};var Zr,Yr,Kr,Jr,$r;function eo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var to=["".concat(null===(Zr=window)||void 0===Zr?void 0:Zr.contextPath,"/citizen/register/name"),"/".concat(null===(Yr=window)||void 0===Yr?void 0:Yr.contextPath,"/citizen/select-language"),"/".concat(null===(Kr=window)||void 0===Kr?void 0:Kr.contextPath,"/citizen/select-location"),"/".concat(null===(Jr=window)||void 0===Jr?void 0:Jr.contextPath,"/citizen/login"),"/".concat(null===($r=window)||void 0===$r?void 0:$r.contextPath,"/citizen/register/otp")],no=function(e,t){return t.filter(function(t){return e.map(function(e){return e.code}).includes(t.code)})};const ro=function(t){var o,i,l=t.stateInfo,u=t.userDetails,c=t.CITIZEN,d=t.cityDetails,f=t.mobileView,v=t.handleUserDropdownSelection,p=t.logoUrl,m=(t.DSO,t.stateCode),y=t.modules,g=t.appTenants,h=(t.sourceUrl,t.pathname),O=t.initData,x=Digit.Hooks.useCustomMDMS(Digit.ULBService.getStateId(),"ACCESSCONTROL-ACTIONS-TEST",[{name:"actions-test",filter:"[?(@.url == '".concat(Digit.Utils.getMultiRootTenant()?window.globalPath:window.contextPath,"-card')]")}],{select:function(e){var t;return null==e||null===(t=e["ACCESSCONTROL-ACTIONS-TEST"])||void 0===t||null===(t=t["actions-test"])||void 0===t?void 0:t.filter(function(e){return!0===e.enabled}).reduce(function(e,t){var n,r;return e[t.parentModule]=(null===(n=e[t.parentModule])||void 0===n?void 0:n.length)>0?[t].concat(function(e){if(Array.isArray(e))return eo(e)}(r=e[t.parentModule])||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return eo(e,t);var n={}.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)?eo(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):[t],e},{})}}),j=x.isLoading,w=x.data,E=x.isFetched,C=Digit.Hooks.useRouteSubscription(h),_=(0,r.useTranslation)().t,N=(0,a.useNavigate)(),I=((0,a.useLocation)(),to.some(function(e){return window.location.href.includes(e)})),A=y.map(function(e,t){var n=e.code,r=e.tenants,o=Digit.ComponentRegistryService.getComponent("".concat(n,"Module"));return o?(0,s.jsx)(a.Route,{path:"".concat(n.toLowerCase(),"/*"),element:(0,s.jsx)(o,{stateCode:m,moduleCode:n,userType:"citizen",tenants:no(r,g)})},t):null}),D=y.map(function(t,r){var o=t.code,i=t.bannerImage,u=(Digit.ComponentRegistryService.getComponent("".concat(o,"Links")),E?X(w,o,_):void 0);return"ACTION_TEST_WS"===(null==u?void 0:u.header)&&(null==u||u.links.sort(function(e,t){return t.orderNumber-e.orderNumber})),(0,s.jsxs)(n().Fragment,{children:[" ",(0,s.jsx)(a.Route,{path:"".concat(o.toLowerCase(),"-home"),element:(0,s.jsxs)("div",{className:"moduleLinkHomePage",children:[(0,s.jsx)(b,{src:i||(null==l?void 0:l.bannerUrl),alt:"noimagefound"}),(0,s.jsx)(e.BackLink,{className:"moduleLinkHomePageBackButton",onClick:function(){return N(-1)}})," ",(0,s.jsx)("h1",{children:_("MODULE_"+o.toUpperCase())}),(0,s.jsx)("div",{className:"moduleLinkHomePageModuleLinks",children:u&&(0,s.jsx)(e.CitizenHomeCard,{header:_(null==u?void 0:u.header),links:null==u?void 0:u.links,Icon:function(){return(0,s.jsx)("span",{})},Info:"OBPS"===o?function(){return(0,s.jsx)(e.CitizenInfoLabel,{style:{margin:"0px",padding:"10px"},info:_("CS_FILE_APPLICATION_INFO_LABEL"),text:_("BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL")})}:null,isInfo:"OBPS"===o})}),(0,s.jsx)(Qr,{moduleCode:null==o?void 0:o.toUpperCase()})]})}),(0,s.jsx)(a.Route,{path:"".concat(o.toLowerCase(),"-faq"),element:(0,s.jsx)(it,{module:null==o?void 0:o.toUpperCase()})}),(0,s.jsx)(a.Route,{path:"".concat(o.toLowerCase(),"-how-it-works"),element:(0,s.jsx)(Ht,{module:null==o?void 0:o.toUpperCase()})})]},o+"-routes")});return(0,s.jsxs)("div",{className:C,children:[(0,s.jsx)(nt,{t:_,stateInfo:l,userDetails:u,CITIZEN:c,cityDetails:d,mobileView:f,handleUserDropdownSelection:v,logoUrl:p,showSidebar:!!c,linkData:w,islinkDataLoading:j}),(0,s.jsxs)("div",{className:"main center-container citizen-home-container mb-25",children:[I?null:(0,s.jsx)("div",{className:"SideBarStatic",children:(0,s.jsx)(he,{linkData:w,islinkDataLoading:j})}),(0,s.jsxs)(a.Routes,{children:[" ",(0,s.jsx)(a.Route,{path:"/",element:(0,s.jsx)(ct,{})})," ",(0,s.jsx)(a.Route,{path:"select-language",element:(0,s.jsx)(mt,{})}),(0,s.jsx)(a.Route,{path:"select-location",element:(0,s.jsx)(xt,{})}),(0,s.jsx)(a.Route,{path:"error",element:(0,s.jsx)(S,{initData:O,goToHome:function(){var e,t,n;N("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/").concat(null===(t=Digit)||void 0===t||null===(t=t.UserService)||void 0===t||null===(n=t.getType)||void 0===n?void 0:n.call(t)))}})}),(0,s.jsx)(a.Route,{path:"all-services",element:(0,s.jsx)(Z,{userType:"citizen",modules:y,getCitizenMenu:w,fetchedCitizen:E,isLoading:j})}),(0,s.jsx)(a.Route,{path:"login/*",element:(0,s.jsx)(mn,{stateCode:m})})," ",(0,s.jsx)(a.Route,{path:"register/*",element:(0,s.jsx)(mn,{stateCode:m,isUserRegistered:!1})})," ",(0,s.jsx)(a.Route,{path:"user/profile",element:(0,s.jsx)(Ft,{stateCode:m,userType:"citizen",cityDetails:d})}),(0,s.jsx)(a.Route,{path:"Audit",element:(0,s.jsx)(qr,{})}),A,D]})]}),(0,s.jsx)("div",{className:"citizen-home-footer",style:window.location.href.includes("citizen/obps")?{zIndex:"-1"}:{},children:(0,s.jsx)(b,{alt:"Powered by DIGIT",src:null===(o=window)||void 0===o||null===(o=o.globalConfigs)||void 0===o||null===(i=o.getConfig)||void 0===i?void 0:i.call(o,"DIGIT_FOOTER"),style:{height:"1.2em",cursor:"pointer"},onClick:function(){var e,t;window.open(null===(e=window)||void 0===e||null===(e=e.globalConfigs)||void 0===e||null===(t=e.getConfig)||void 0===t?void 0:t.call(e,"DIGIT_HOME_URL"),"_blank").focus()}})})]})};f(5746);const oo=function(e){var t=e.children;return(0,s.jsx)("div",{className:"banner banner-container",children:t})},io=function(t){var n,o=t.showTenant,i=void 0===o||o,a=Digit.Hooks.useStore.getInitData(),l=a.data,u=a.isLoading,c=(l||{}).stateInfo,d=(0,r.useTranslation)().t;return u?(0,s.jsx)(e.Loader,{}):(0,s.jsxs)("div",{className:"bannerHeader",children:[(0,s.jsx)(b,{className:"bannerLogo",src:null==c?void 0:c.logoUrl,style:i?{}:{borderRight:"unset"},alt:"Digit Banner"}),i&&(null==c?void 0:c.code)&&(0,s.jsx)("p",{children:d("TENANT_TENANTS_".concat(null==c||null===(n=c.code)||void 0===n?void 0:n.toUpperCase()))})]})};function ao(e){return ao="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},ao(e)}function lo(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 uo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lo(Object(n),!0).forEach(function(t){so(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lo(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function so(e,t,n){return(t=function(e){var t=function(e){if("object"!=ao(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ao(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ao(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function co(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return fo(s,"_invoke",function(n,r,o){var i,l,u,s=0,c=o||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return i=t,l=0,u=e,f.n=n,a}};function v(n,r){for(l=n,u=r,t=0;!d&&s&&!o&&t<c.length;t++){var o,i=c[t],v=f.p,p=i[2];n>3?(o=p===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=v&&((o=n<2&&v<i[1])?(l=0,f.v=r,f.n=i[1]):v<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,f.n=p,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,c,p){if(s>1)throw TypeError("Generator is already running");for(d&&1===c&&v(c,p),l=c,u=p;(t=l<2?e:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),v(l,u)):f.n=u:f.v=u);try{if(s=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(t){i=e,l=1,u=t}finally{s=1}}return{value:t,done:d}}}(n,o,i),!0),s}var a={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(fo(t={},r,function(){return this}),t),d=s.prototype=l.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,fo(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=s,fo(d,"constructor",s),fo(s,"constructor",u),u.displayName="GeneratorFunction",fo(s,o,"GeneratorFunction"),fo(d),fo(d,o,"Generator"),fo(d,r,function(){return this}),fo(d,"toString",function(){return"[object Generator]"}),(co=function(){return{w:i,m:f}})()}function fo(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}fo=function(e,t,n,r){function i(t,n){fo(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},fo(e,t,n,r)}function vo(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,o)}function po(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){vo(i,r,o,a,l,"next",e)}function l(e){vo(i,r,o,a,l,"throw",e)}a(void 0)})}}function mo(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return yo(e,t);var n={}.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)?yo(e,t):void 0}}(e,t)||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.")}()}function yo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var go=function(n){var r,o,i=n.config,l=n.t,u=mo((0,t.useState)(null),2),c=u[0],d=(u[1],Digit.Hooks.useQueryParams()),f=d.mobile_number,v=d.tenantId,p=(0,a.useNavigate)(),m=mo((0,t.useState)(""),2),y=m[0],g=m[1],h=mo((0,t.useState)(!0),2),O=h[0],S=(h[1],mo((0,t.useState)(null),2)),x=S[0],j=S[1],w=function(){return Digit.UserService.getType()};(0,t.useEffect)(function(){var e,t;if(c){Digit.UserService.setUser(c);var n=(null===(e=location.state)||void 0===e?void 0:e.from)||"/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/employee");p(n,{replace:!0})}else Digit.UserService.setType("employee")},[c]);var E=function(){j(null)},C=function(){var e=po(co().m(function e(){var t,n,r;return co().w(function(e){for(;;)switch(e.p=e.n){case 0:return t={otp:{mobileNumber:f,userType:w().toUpperCase(),type:"passwordreset",tenantId:v}},e.p=1,e.n=2,Digit.UserService.sendOtp(t,v);case 2:j(l("ES_OTP_RESEND")),e.n=4;break;case 3:e.p=3,r=e.v,j((null==r||null===(n=r.response)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.error_description)||l("ES_INVALID_LOGIN_CREDENTIALS"));case 4:setTimeout(E,5e3);case 5:return e.a(2)}},e,null,[[1,3]])}));return function(){return e.apply(this,arguments)}}(),_=function(){var e=po(co().m(function e(t){var n,r,o;return co().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,t.newPassword===t.confirmPassword){e.n=1;break}return e.a(2,j(l("ERR_PASSWORD_DO_NOT_MATCH")));case 1:return n=uo(uo({},t),{},{otpReference:y,tenantId:v,type:w().toUpperCase()}),e.n=2,Digit.UserService.changePassword(n,v);case 2:e.v,N(),e.n=4;break;case 3:e.p=3,o=e.v,j((null==o||null===(r=o.response)||void 0===r||null===(r=r.data)||void 0===r||null===(r=r.error)||void 0===r||null===(r=r.fields)||void 0===r||null===(r=r[0])||void 0===r?void 0:r.message)||l("ES_SOMETHING_WRONG")),setTimeout(E,5e3);case 4:return e.a(2)}},e,null,[[0,3]])}));return function(t){return e.apply(this,arguments)}}(),N=function(){var e;p("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/employee/user/login"),{replace:!0})},I=mo(i.inputs,3),D=I[0],T=I[1],P=I[2],L=[{body:[{label:l(D.label),type:D.type,populators:{name:D.name},isMandatory:!0},{label:l(T.label),type:T.type,populators:{name:T.name},isMandatory:!0},{label:l(P.label),type:P.type,populators:{name:P.name},isMandatory:!0}]}];return(0,s.jsxs)(oo,{children:[(0,s.jsx)("div",{className:"employeeBackbuttonAlign",children:(0,s.jsx)(e.BackLink,{variant:"primary",style:{borderBottom:"none"}})}),(0,s.jsxs)(A.FormComposer,{onSubmit:_,noBoxShadow:!0,inline:!0,submitInForm:!0,config:L,label:i.texts.submitButtonLabel,cardStyle:{maxWidth:"408px",margin:"auto"},className:"employeeChangePassword",children:[(0,s.jsx)(io,{}),(0,s.jsxs)(A.CardSubHeader,{style:{textAlign:"center"},children:[" ",i.texts.header," "]}),(0,s.jsxs)(A.CardText,{children:["".concat(l("CS_LOGIN_OTP_TEXT")," "),(0,s.jsxs)("b",{children:[" ","".concat(l("+ 91 - "))," ",f]})]}),(0,s.jsx)(Zt,{t:l,userType:"employee",otp:y,onOtpChange:g,error:O,onResend:C})]}),x&&(0,s.jsx)(e.Toast,{type:"error",label:l(x),onClose:E}),(0,s.jsxs)("div",{className:"EmployeeLoginFooter",children:[(0,s.jsx)(b,{alt:"Powered by DIGIT",src:null===(r=window)||void 0===r||null===(r=r.globalConfigs)||void 0===r||null===(o=r.getConfig)||void 0===o?void 0:o.call(r,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){var e,t;window.open(null===(e=window)||void 0===e||null===(e=e.globalConfigs)||void 0===e||null===(t=e.getConfig)||void 0===t?void 0:t.call(e,"DIGIT_HOME_URL"),"_blank").focus()}})," "]})]})};go.propTypes={loginParams:u().any},go.defaultProps={loginParams:null};const bo=go;var ho=[{texts:{header:"CORE_COMMON_RESET_PASSWORD_LABEL",submitButtonLabel:"CORE_COMMON_CHANGE_PASSWORD"},inputs:[{label:"CORE_LOGIN_USERNAME",type:"text",name:"userName",error:"ERR_HRMS_INVALID_USERNAME"},{label:"CORE_LOGIN_NEW_PASSWORD",type:"password",name:"newPassword",error:"CORE_COMMON_REQUIRED_ERRMSG"},{label:"CORE_LOGIN_CONFIRM_NEW_PASSWORD",type:"password",name:"confirmPassword",error:"CORE_COMMON_REQUIRED_ERRMSG"}]}];function Oo(e){return Oo="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},Oo(e)}function So(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 xo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?So(Object(n),!0).forEach(function(t){jo(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):So(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jo(e,t,n){return(t=function(e){var t=function(e){if("object"!=Oo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Oo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Oo(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const wo=function(){var e=(0,r.useTranslation)().t,n=(0,t.useMemo)(function(){return ho.map(function(t){var n={};for(var r in t.texts)n[r]=e(t.texts[r]);return xo(xo({},t),{},{texts:n})})},[ho]);return(0,s.jsx)(a.Routes,{children:(0,s.jsx)(a.Route,{path:"",element:(0,s.jsx)(bo,{config:n[0],t:e})})})};var Eo=[{texts:{header:"CORE_COMMON_FORGOT_PASSWORD_LABEL",description:"ES_FORGOT_PASSWORD_DESC",submitButtonLabel:"CORE_COMMON_CONTINUE"},inputs:[{label:"CORE_COMMON_MOBILE_NUMBER",type:"mobileNumber",name:"mobileNumber",error:"ERR_HRMS_INVALID_MOBILE_NUMBER"},{label:"CORE_COMMON_CITY",type:"dropdown",name:"city",error:"ERR_HRMS_INVALID_CITY"}]}],Co=[{texts:{header:"CORE_COMMON_LOGIN",submitButtonLabel:"CORE_COMMON_LOGIN",secondaryButtonLabel:"CORE_COMMON_FORGOT_PASSWORD"},inputs:[{label:"CORE_LOGIN_USERNAME",type:"text",key:"username",isMandatory:!0,populators:{name:"username",validation:{required:!0},error:"ERR_USERNAME_REQUIRED"}},{label:"CORE_LOGIN_PASSWORD",type:"password",key:"password",isMandatory:!0,populators:{name:"password",validation:{required:!0},error:"ERR_PASSWORD_REQUIRED"}},{isMandatory:!0,type:"dropdown",key:"city",label:"CORE_COMMON_CITY",disable:!1,populators:{name:"city",optionsKey:"name",error:"ERR_HRMS_INVALID_CITY",mdmsConfig:{masterName:"tenants",moduleName:"tenant",localePrefix:"TENANT_TENANTS",select:"(data)=>{ return Array.isArray(data['tenant'].tenants) && Digit.Utils.getUnique(data['tenant'].tenants).map(ele=>({code:ele.code,name:Digit.Utils.locale.getTransformedLocale('TENANT_TENANTS_'+ele.code)}))}"}}},{key:"check",type:"component",disable:!1,component:"PrivacyComponent",populators:{name:"check"},customProps:{module:"HCM"},isMandatory:!1,withoutLabel:!0}]}];function _o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const No=function(e){var n,o,i,a=e.bannerImages,l=void 0===a?[]:a,u=(o=(0,t.useState)(0),i=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(o,i)||function(e,t){if(e){if("string"==typeof e)return _o(e,t);var n={}.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)?_o(e,t):void 0}}(o,i)||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.")}()),c=u[0],d=u[1],f=(0,r.useTranslation)().t,v=l||(null===(n=Co[0])||void 0===n?void 0:n.bannerImages)||[],p=function(){d(function(e){return e===v.length-1?0:e+1})};return(0,t.useEffect)(function(){var e=setInterval(function(){p()},5e3);return function(){return clearInterval(e)}},[v.length]),(0,s.jsx)(t.Fragment,{children:(0,s.jsxs)("div",{className:"carousel-container",children:[v.sort(function(e,t){return(null==e?void 0:e.id)-(null==t?void 0:t.id)}).map(function(e,t){return(0,s.jsx)("div",{className:"carousel-slide ".concat(t===c?"active":""),style:{backgroundImage:"url(".concat(e.image,")")},children:(0,s.jsxs)("div",{className:"carousel-content",children:[(0,s.jsx)("h2",{children:f(e.title)}),(0,s.jsx)("p",{children:f(e.description)})]})},e.id)}),(0,s.jsxs)("div",{className:"carousel-controls",children:[(0,s.jsx)("button",{className:"carousel-nav",onClick:function(){d(function(e){return 0===e?v.length-1:e-1})},children:"<"}),(0,s.jsx)("div",{className:"carousel-indicators",children:v.map(function(e,t){return(0,s.jsx)("button",{className:"indicator ".concat(t===c?"active":""),onClick:function(){return function(e){d(e)}(t)}},t)})}),(0,s.jsx)("button",{className:"carousel-nav",onClick:p,children:">"})]})]})})};var Io=function(e){var t=Digit.Utils.getConfigModuleName();return Digit.Hooks.useCommonMDMS(e,t,["LoginConfig"],{select:function(e){var n;return{config:null==e||null===(n=e[t])||void 0===n?void 0:n.LoginConfig}},retry:!1})};function Ao(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return Do(s,"_invoke",function(n,r,o){var i,l,u,s=0,c=o||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return i=t,l=0,u=e,f.n=n,a}};function v(n,r){for(l=n,u=r,t=0;!d&&s&&!o&&t<c.length;t++){var o,i=c[t],v=f.p,p=i[2];n>3?(o=p===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=v&&((o=n<2&&v<i[1])?(l=0,f.v=r,f.n=i[1]):v<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,f.n=p,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,c,p){if(s>1)throw TypeError("Generator is already running");for(d&&1===c&&v(c,p),l=c,u=p;(t=l<2?e:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),v(l,u)):f.n=u:f.v=u);try{if(s=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(t){i=e,l=1,u=t}finally{s=1}}return{value:t,done:d}}}(n,o,i),!0),s}var a={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(Do(t={},r,function(){return this}),t),d=s.prototype=l.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,Do(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=s,Do(d,"constructor",s),Do(s,"constructor",u),u.displayName="GeneratorFunction",Do(s,o,"GeneratorFunction"),Do(d),Do(d,o,"Generator"),Do(d,r,function(){return this}),Do(d,"toString",function(){return"[object Generator]"}),(Ao=function(){return{w:i,m:f}})()}function Do(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Do=function(e,t,n,r){function i(t,n){Do(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},Do(e,t,n,r)}function To(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,o)}function Po(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Lo(e,t);var n={}.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)?Lo(e,t):void 0}}(e,t)||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.")}()}function Lo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ro=function(r){var o,i,l,u,c=r.config,d=r.t,f=r.stateCode,v=Digit.Hooks.useTenants(),p=v.data,m=v.isLoading,y=Po((0,t.useState)(null),2),g=y[0],h=(y[1],(0,a.useNavigate)()),O=Po((0,t.useState)(null),2),S=O[0],x=O[1],j=function(){return Digit.UserService.getType()},w=Io(f).data;if(null!=w&&w.config){var E,C=null==w||null===(E=w.config[0])||void 0===E?void 0:E.bannerImages;c.bannerImages=C}(0,t.useEffect)(function(){var e,t;if(g){Digit.UserService.setUser(g);var n=(null===(e=location.state)||void 0===e?void 0:e.from)||"/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/employee");h(n,{replace:!0})}else Digit.UserService.setType("employee")},[g]);var _=function(){x(null)},N=function(){var e,t=(e=Ao().m(function e(t){var n,r,o,i;return Ao().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t.city){e.n=1;break}return alert("Please Select City!"),e.a(2);case 1:return n={otp:{mobileNumber:t.mobileNumber,userType:j().toUpperCase(),type:"passwordreset",tenantId:t.city.code}},e.p=2,e.n=3,Digit.UserService.sendOtp(n,t.city.code);case 3:h("/".concat(null===(r=window)||void 0===r?void 0:r.contextPath,"/employee/user/change-password?mobile_number=").concat(t.mobileNumber,"&tenantId=").concat(t.city.code)),e.n=5;break;case 4:e.p=4,i=e.v,x((null==i||null===(o=i.response)||void 0===o||null===(o=o.data)||void 0===o||null===(o=o.error)||void 0===o||null===(o=o.fields)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.message)||"Invalid login credentials!"),setTimeout(_,5e3);case 5:return e.a(2)}},e,null,[[2,4]])}),function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){To(i,r,o,a,l,"next",e)}function l(e){To(i,r,o,a,l,"throw",e)}a(void 0)})});return function(e){return t.apply(this,arguments)}}(),I=function(){var e;h("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/employee/login"))},A=Po(c.inputs,2),D=A[0],T=A[1],P=[{body:[{label:d(D.label),type:D.type,populators:{name:D.name},isMandatory:!0},{label:d(T.label),type:T.type,populators:{name:T.name,optionsKey:"name",required:!0,options:p},isMandatory:!0}]}];return m?(0,s.jsx)(e.Loader,{page:!0,variant:"PageLoader"}):null!=c&&c.bannerImages?(0,s.jsx)(n().Fragment,{children:(0,s.jsxs)("div",{className:"login-container",children:[(0,s.jsx)(No,{bannerImages:null==c?void 0:c.bannerImages}),(0,s.jsxs)("div",{className:"login-form-container",children:[(0,s.jsx)(e.FormComposerV2,{onSubmit:N,noBoxShadow:!0,inline:!0,submitInForm:!0,config:P,label:c.texts.submitButtonLabel,secondaryActionLabel:c.texts.secondaryButtonLabel,onSecondayActionClick:I,heading:c.texts.header,description:c.texts.description,headingStyle:{textAlign:"center",fontWeight:"bold",color:"#363636"},descriptionStyles:{color:"#787878",textAlign:"center"},cardStyle:{maxWidth:"408px",margin:"auto"},className:"employeeForgotPassword",children:(0,s.jsx)(io,{})}),S&&(0,s.jsx)(e.Toast,{type:"error",label:d(S),onClose:_}),(0,s.jsxs)("div",{className:"EmployeeLoginFooter",children:[(0,s.jsx)(b,{alt:"Powered by DIGIT",src:null===(o=window)||void 0===o||null===(o=o.globalConfigs)||void 0===o||null===(i=o.getConfig)||void 0===i?void 0:i.call(o,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){var e,t;window.open(null===(e=window)||void 0===e||null===(e=e.globalConfigs)||void 0===e||null===(t=e.getConfig)||void 0===t?void 0:t.call(e,"DIGIT_HOME_URL"),"_blank").focus()}})," "]})]})]})}):(0,s.jsxs)(oo,{children:[(0,s.jsx)("div",{className:"employeeBackbuttonAlign",children:(0,s.jsx)(e.BackLink,{onClick:function(){return window.history.back()}})}),(0,s.jsx)(e.FormComposerV2,{onSubmit:N,noBoxShadow:!0,inline:!0,submitInForm:!0,config:P,label:c.texts.submitButtonLabel,secondaryActionLabel:c.texts.secondaryButtonLabel,onSecondayActionClick:I,heading:c.texts.header,description:c.texts.description,headingStyle:{textAlign:"center",fontWeight:"bold",color:"#363636"},descriptionStyles:{color:"#787878",textAlign:"center"},cardStyle:{maxWidth:"408px",margin:"auto"},className:"employeeForgotPassword",children:(0,s.jsx)(io,{})}),S&&(0,s.jsx)(e.Toast,{type:"error",label:d(S),onClose:_}),(0,s.jsxs)("div",{className:"EmployeeLoginFooter",children:[(0,s.jsx)(b,{alt:"Powered by DIGIT",src:null===(l=window)||void 0===l||null===(l=l.globalConfigs)||void 0===l||null===(u=l.getConfig)||void 0===u?void 0:u.call(l,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){var e,t;window.open(null===(e=window)||void 0===e||null===(e=e.globalConfigs)||void 0===e||null===(t=e.getConfig)||void 0===t?void 0:t.call(e,"DIGIT_HOME_URL"),"_blank").focus()}})," "]})]})};Ro.propTypes={loginParams:u().any},Ro.defaultProps={loginParams:null};const ko=Ro;function Mo(e){return Mo="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},Mo(e)}function Uo(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 Bo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Uo(Object(n),!0).forEach(function(t){Fo(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uo(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Fo(e,t,n){return(t=function(e){var t=function(e){if("object"!=Mo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Mo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Mo(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Go=function(e){var n=e.stateCode,o=(0,r.useTranslation)().t,i=(0,t.useMemo)(function(){return Eo.map(function(e){var t={};for(var n in e.texts)t[n]=o(e.texts[n]);return Bo(Bo({},e),{},{texts:t})})},[Eo]);return(0,s.jsx)(a.Routes,{children:(0,s.jsx)(a.Route,{path:"",element:(0,s.jsx)(ko,{config:i[0],t:o,stateCode:n})})})};var Vo=function(e,t){return t.filter(function(t){var n;return null==e||null===(n=e.map)||void 0===n?void 0:n.call(e,function(e){return e.code}).includes(t.code)})},Ho=function(e){var t,n,r=e.stateCode,o=e.userType,i=e.modules,l=e.appTenants,u=e.additionalComponent,c=(Digit.Contexts.ComponentProvider,(0,a.useLocation)()),d=Digit.UserService.getUser();if(!d||null==d||!d.access_token||null==d||!d.info)return(0,s.jsx)(a.Navigate,{to:{pathname:"/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/employee/user/login"),state:{from:c.pathname+c.search}},replace:!0});var f=null==i?void 0:i.map(function(e,t){var n,i=e.code,u=e.tenants,c=Digit.ComponentRegistryService.getComponent("".concat(i,"Module"));return c?(0,s.jsx)(a.Route,{path:"".concat(i.toLowerCase(),"/*"),element:(0,s.jsx)(c,{stateCode:r,moduleCode:i,userType:o,tenants:Vo(u,l)})},t):(0,s.jsx)(a.Route,{path:"".concat(i.toLowerCase(),"/*"),element:(0,s.jsx)(a.Navigate,{to:"/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/employee/user/error?type=notfound&module=").concat(i),replace:!0})},t)});return(0,s.jsx)("div",{className:"ground-container digit-home-ground",children:(0,s.jsxs)(a.Routes,{children:[" ",f,(0,s.jsx)(a.Route,{path:"login",element:(0,s.jsx)(a.Navigate,{to:{pathname:"/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/employee/user/login"),state:{from:c.pathname+c.search}},replace:!0})}),(0,s.jsx)(a.Route,{path:"forgot-password",element:(0,s.jsx)(Go,{})}),(0,s.jsx)(a.Route,{path:"change-password",element:(0,s.jsx)(wo,{})}),(0,s.jsx)(a.Route,{path:"*",element:(0,s.jsx)(Z,{userType:o,modules:i,additionalComponent:u})})]})})};function Wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var zo={label:"English",value:Digit.Utils.getDefaultLanguage()};const Xo=function(){var n,o,i,l,u=Digit.Hooks.useStore.getInitData(),c=u.data,d=u.isLoading,f=(0,r.useTranslation)().t,v=(0,a.useNavigate)(),p=c||{},m=p.languages,y=p.stateInfo,g=m;g&&0!=(null===(n=g)||void 0===n?void 0:n.length)||(g=[zo]);var h,O,S,x=Digit.StoreData.getCurrentLanguage(),j=(O=(0,t.useState)(x),S=2,function(e){if(Array.isArray(e))return e}(O)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(O,S)||function(e,t){if(e){if("string"==typeof e)return Wo(e,t);var n={}.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)?Wo(e,t):void 0}}(O,S)||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.")}()),w=j[0],E=j[1],C=(null==m?void 0:m.length)>1;return d?(0,s.jsx)(e.Loader,{}):C?(0,s.jsxs)(oo,{children:[(0,s.jsxs)(e.Card,{className:"bannerCard removeBottomMargin languageSelection",children:[(0,s.jsxs)("div",{className:"bannerHeader",children:[(0,s.jsx)(b,{className:"bannerLogo",src:null==y?void 0:y.logoUrl,alt:"Digit Banner Image"}),(0,s.jsx)("p",{children:f("TENANT_TENANTS_".concat(null==y||null===(o=y.code)||void 0===o?void 0:o.toUpperCase()))})]}),(0,s.jsx)("div",{className:"language-selector",style:{justifyContent:"space-around",marginBottom:"24px",padding:"0 5%"},children:g.map(function(e,t){return(0,s.jsx)("div",{className:"language-button-container",children:(0,s.jsx)(A.CustomButton,{selected:e.value===w,text:f(e.label),onClick:function(){return function(e){E(e.value),Digit.LocalizationService.changeLanguage(e.value,y.code)}(e)}})},t)})}),(0,s.jsx)(e.SubmitBar,{style:{width:"100%"},label:f("CORE_COMMON_CONTINUE"),onSubmit:function(e){var t;v("/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/employee/user/login"))}})]}),(0,s.jsxs)("div",{className:"EmployeeLoginFooter",children:[(0,s.jsx)(b,{alt:"Powered by DIGIT",src:null===(i=window)||void 0===i||null===(i=i.globalConfigs)||void 0===i||null===(l=i.getConfig)||void 0===l?void 0:l.call(i,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){var e,t;window.open(null===(e=window)||void 0===e||null===(e=e.globalConfigs)||void 0===e||null===(t=e.getConfig)||void 0===t?void 0:t.call(e,"DIGIT_HOME_URL"),"_blank").focus()}})," "]})]}):(0,s.jsx)(a.Navigate,{to:"/".concat(null===(h=window)||void 0===h?void 0:h.contextPath,"/employee/user/login"),replace:!0})};var qo=[{texts:{header:"CORE_COMMON_LOGIN",submitButtonLabel:"CORE_COMMON_CONTINUE"},inputs:[{label:"CORE_SIGNUP_EMAILID",type:"text",key:"email",isMandatory:!0,populators:{name:"email",validation:{required:!0,pattern:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/},error:"ERR_EMAIL_REQUIRED"}},{isMandatory:!0,key:"check",type:"component",component:"PrivacyComponent",withoutLabel:!0,disable:!1,customProps:{module:"Sandbox"},populators:{name:"check"}}]}];function Qo(e){return Qo="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},Qo(e)}function Zo(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 Yo(e,t,n){return(t=function(e){var t=function(e){if("object"!=Qo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qo(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ko=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".digit-home-main";return function(r){return(0,t.useEffect)(function(){var e=function(t){if("Tab"===t.key){var r=document.querySelector(n);r&&(r.setAttribute("tabindex","-1"),r.style.outline="none",r.focus()),window.removeEventListener("keydown",e)}};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[]),(0,s.jsx)(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zo(Object(n),!0).forEach(function(t){Yo(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zo(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},r))}};function Jo(e){return Jo="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},Jo(e)}var $o=["UserRequest"];function ei(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return ti(s,"_invoke",function(n,r,o){var i,l,u,s=0,c=o||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return i=t,l=0,u=e,f.n=n,a}};function v(n,r){for(l=n,u=r,t=0;!d&&s&&!o&&t<c.length;t++){var o,i=c[t],v=f.p,p=i[2];n>3?(o=p===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=v&&((o=n<2&&v<i[1])?(l=0,f.v=r,f.n=i[1]):v<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,f.n=p,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,c,p){if(s>1)throw TypeError("Generator is already running");for(d&&1===c&&v(c,p),l=c,u=p;(t=l<2?e:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),v(l,u)):f.n=u:f.v=u);try{if(s=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(t){i=e,l=1,u=t}finally{s=1}}return{value:t,done:d}}}(n,o,i),!0),s}var a={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(ti(t={},r,function(){return this}),t),d=s.prototype=l.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,ti(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=s,ti(d,"constructor",s),ti(s,"constructor",u),u.displayName="GeneratorFunction",ti(s,o,"GeneratorFunction"),ti(d),ti(d,o,"Generator"),ti(d,r,function(){return this}),ti(d,"toString",function(){return"[object Generator]"}),(ei=function(){return{w:i,m:f}})()}function ti(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}ti=function(e,t,n,r){function i(t,n){ti(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},ti(e,t,n,r)}function ni(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ri(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 oi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ri(Object(n),!0).forEach(function(t){ii(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ri(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ii(e,t,n){return(t=function(e){var t=function(e){if("object"!=Jo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Jo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Jo(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ai(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,o)}function li(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){ai(i,r,o,a,l,"next",e)}function l(e){ai(i,r,o,a,l,"throw",e)}a(void 0)})}}function ui(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return si(e,t);var n={}.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)?si(e,t):void 0}}(e,t)||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.")}()}function si(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ci=function(n){var r,o,i,l=n.config,u=n.t,c=n.isDisabled,d=n.loginOTPBased,f=Digit.Hooks.useTenants(),v=(f.data,f.isLoading),p=Digit.Hooks.useStore.getInitData(),m=p.data,y=p.isLoading,g=(m||{}).stateInfo,h=ui((0,t.useState)(null),2),O=h[0],S=h[1],x=ui((0,t.useState)(null),2),j=x[0],w=x[1],E=ui((0,t.useState)(!1),2),C=E[0],_=E[1],N=(0,a.useNavigate)();(0,t.useEffect)(function(){var e,t,n,r,o,i,a,l,u,s;if(O){Digit.SessionStorage.set("citizen.userRequestObject",O);var c=null==O||null===(e=O.info)||void 0===e||null===(e=e.roles)||void 0===e?void 0:e.filter(function(e){return e.tenantId===Digit.SessionStorage.get("Employee.tenantId")});(null==O||null===(t=O.info)||void 0===t||null===(t=t.roles)||void 0===t?void 0:t.length)>0&&(O.info.roles=c),Digit.UserService.setUser(O),function(e,t){var n;if(!Digit.Utils.getMultiRootTenant()){var r=(null===(n=JSON.parse(sessionStorage.getItem("Digit.locale")))||void 0===n?void 0:n.value)||Digit.Utils.getDefaultLanguage();localStorage.setItem("Employee.tenant-id",null==e?void 0:e.tenantId),localStorage.setItem("tenant-id",null==e?void 0:e.tenantId),localStorage.setItem("citizen.userRequestObject",JSON.stringify(e)),localStorage.setItem("locale",r),localStorage.setItem("Employee.locale",r),localStorage.setItem("token",t),localStorage.setItem("Employee.token",t),localStorage.setItem("user-info",JSON.stringify(e)),localStorage.setItem("Employee.user-info",JSON.stringify(e))}}(null==O?void 0:O.info,null==O?void 0:O.access_token);var d,f,v,p,m="/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/employee");null!==(r=window)&&void 0!==r&&null!==(r=r.location)&&void 0!==r&&null!==(r=r.href)&&void 0!==r&&r.includes("from=")&&(m=decodeURIComponent(null===(d=window)||void 0===d||null===(d=d.location)||void 0===d||null===(d=d.href)||void 0===d||null===(d=d.split("from="))||void 0===d?void 0:d[1])||"/".concat(null===(f=window)||void 0===f?void 0:f.contextPath,"/employee")),null!=O&&null!==(o=O.info)&&void 0!==o&&o.roles&&(null==O||null===(i=O.info)||void 0===i||null===(i=i.roles)||void 0===i?void 0:i.length)>0&&null!=O&&null!==(a=O.info)&&void 0!==a&&null!==(a=a.roles)&&void 0!==a&&a.every(function(e){return"NATADMIN"===e.code})&&(m="/".concat(null===(v=window)||void 0===v?void 0:v.contextPath,"/employee/dss/landing/NURT_DASHBOARD")),null!=O&&null!==(l=O.info)&&void 0!==l&&l.roles&&(null==O||null===(u=O.info)||void 0===u||null===(u=u.roles)||void 0===u?void 0:u.length)>0&&null!=O&&null!==(s=O.info)&&void 0!==s&&null!==(s=s.roles)&&void 0!==s&&s.every(function(e){return"STADMIN"===e.code})&&(m="/".concat(null===(p=window)||void 0===p?void 0:p.contextPath,"/employee/dss/landing/home")),N(m,{replace:!0})}},[O]);var I=function(){var e=li(ei().m(function e(t){var n,r,o,i,a,l,s,c;return ei().w(function(e){for(;;)switch(e.p=e.n){case 0:return null!=t&&t.username&&(t.username=t.username.trim()),null!=t&&t.password&&(t.password=t.password.trim()),_(!0),(o=oi(oi(oi({},t),U),{},{userType:"EMPLOYEE"})).tenantId=(null==o||null===(n=o.city)||void 0===n?void 0:n.code)||(null===(r=Digit)||void 0===r||null===(r=r.ULBService)||void 0===r?void 0:r.getStateId()),delete o.city,e.p=1,e.n=2,Digit.UserService.authenticate(o);case 2:i=e.v,a=i.UserRequest,l=ni(i,$o),Digit.SessionStorage.set("Employee.tenantId",null==a?void 0:a.tenantId),S(oi({info:a},l)),e.n=4;break;case 3:e.p=3,c=e.v,w((null==c||null===(s=c.response)||void 0===s||null===(s=s.data)||void 0===s?void 0:s.error_description)||"ES_ERROR_USER_NOT_PERMITTED"==(null==c?void 0:c.message)&&u("ES_ERROR_USER_NOT_PERMITTED")||u("INVALID_LOGIN_CREDENTIALS")),setTimeout(P,5e3);case 4:_(!1);case 5:return e.a(2)}},e,null,[[1,3]])}));return function(t){return e.apply(this,arguments)}}(),A={url:"/user-otp/v1/_send",params:{tenantId:null===(r=Digit)||void 0===r||null===(r=r.ULBService)||void 0===r?void 0:r.getStateId()},body:{},config:{enable:!1}},D=Digit.Hooks.useCustomAPIMutationHook(A),T=function(){var e=li(ei().m(function e(t){var n,r;return ei().w(function(e){for(;;)switch(e.n){case 0:return r=t.email,e.n=1,D.mutate({body:{otp:{userName:t.email,type:"login",tenantId:null===(n=Digit)||void 0===n||null===(n=n.ULBService)||void 0===n?void 0:n.getStateId(),userType:"EMPLOYEE"}},config:{enable:!0}},{onError:function(e,t){var n,r;w(null!=e&&null!==(n=e.response)&&void 0!==n&&null!==(n=n.data)&&void 0!==n&&null!==(n=n.Errors)&&void 0!==n&&n[0].code?"SANDBOX_RESEND_OTP".concat(null==e||null===(r=e.response)||void 0===r||null===(r=r.data)||void 0===r||null===(r=r.Errors)||void 0===r||null===(r=r[0])||void 0===r?void 0:r.code):"SANDBOX_RESEND_OTP_ERROR"),setTimeout(P,5e3)},onSuccess:function(){var e=li(ei().m(function e(t){var n,o;return ei().w(function(e){for(;;)switch(e.n){case 0:N("/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/employee/user/login/otp"),{state:{email:r,tenant:null===(o=Digit)||void 0===o||null===(o=o.ULBService)||void 0===o?void 0:o.getStateId()}});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),P=function(){w(null)},L=function(){var e;N("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/employee/user/forgot-password"))},R=Digit.ULBService.getStateId(),k={code:R,name:Digit.Utils.locale.getTransformedLocale("TENANT_TENANTS_".concat(R))},M=[{body:null==l?void 0:l.inputs}];"admin"===Digit.Hooks.useQueryParams().mode&&0==(null==M||null===(o=M[0])||void 0===o||null===(o=o.body)||void 0===o||null===(o=o[2])||void 0===o?void 0:o.disable)&&null==(null==M||null===(i=M[0])||void 0===i||null===(i=i.body)||void 0===i||null===(i=i[2])||void 0===i||null===(i=i.populators)||void 0===i?void 0:i.defaultValue)&&(M[0].body[2].disable=!0,M[0].body[2].isMandatory=!1,M[0].body[2].populators.defaultValue=k);var U=(0,t.useMemo)(function(){return Object.fromEntries(M[0].body.filter(function(e){var t,n;return(null==e||null===(t=e.populators)||void 0===t?void 0:t.defaultValue)&&(null==e||null===(n=e.populators)||void 0===n?void 0:n.name)}).map(function(e){return[e.populators.name,e.populators.defaultValue]}))},[]),B=function(e,t,n){var r=M[0].body.filter(function(e){return null==e?void 0:e.isMandatory}).map(function(e){return null==e?void 0:e.key}).some(function(e){var n=t[e];return null==n||""===n||!1===n});_(r)},F=function(){var t,n,r,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return(0,s.jsx)(e.FormComposerV2,{onSubmit:d?T:I,isDisabled:c||C,noBoxShadow:!0,inline:!0,submitInForm:!0,config:M,label:null==l||null===(t=l.texts)||void 0===t?void 0:t.submitButtonLabel,secondaryActionLabel:(null==l||null===(n=l.texts)||void 0===n?void 0:n.secondaryButtonLabel)+(o.includes("login-form-container")?"?":""),onSecondayActionClick:L,onFormValueChange:B,heading:null==l||null===(r=l.texts)||void 0===r?void 0:r.header,className:"".concat(a),cardSubHeaderClassName:"loginCardSubHeaderClassName",cardClassName:i,buttonClassName:"buttonClassName",defaultValues:U,children:null!=g&&g.code?(0,s.jsx)(io,{}):(0,s.jsx)(io,{showTenant:!1})})},G=function(e){var t,n;return(0,s.jsx)("div",{className:e,style:{backgroundColor:"unset"},children:(0,s.jsx)(b,{alt:"Powered by DIGIT",src:null===(t=window)||void 0===t||null===(t=t.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){var e,t;window.open(null===(e=window)||void 0===e||null===(e=e.globalConfigs)||void 0===e||null===(t=e.getConfig)||void 0===t?void 0:t.call(e,"DIGIT_HOME_URL"),"_blank").focus()}})})};return v||y?(0,s.jsx)(e.Loader,{page:!0,variant:"PageLoader"}):null!=l&&l.bannerImages?(0,s.jsxs)("div",{className:"login-container",children:[(0,s.jsx)(No,{bannerImages:null==l?void 0:l.bannerImages}),(0,s.jsxs)("div",{className:"login-form-container",children:[F("login-form-container","",d?"sandbox-onboarding-wrapper":""),j&&(0,s.jsx)(e.Toast,{type:"error",label:u(j),onClose:P}),G("EmployeeLoginFooter")]})]}):(0,s.jsxs)(oo,{children:[(0,s.jsx)("div",{className:"employeeBackbuttonAlign",children:(0,s.jsx)(e.BackLink,{onClick:function(){return window.history.back()}})}),F("loginFormStyleEmployee","loginCardClassName",d?"sandbox-onboarding-wrapper":""),j&&(0,s.jsx)(e.Toast,{type:"error",label:u(j),onClose:P}),G("employee-login-home-footer")]})};ci.propTypes={loginParams:u().any},ci.defaultProps={loginParams:null};const di=Ko(ci,".login-form-container");function fi(e){return fi="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},fi(e)}function vi(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 pi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vi(Object(n),!0).forEach(function(t){mi(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mi(e,t,n){return(t=function(e){var t=function(e){if("object"!=fi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fi(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yi(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return gi(e,t);var n={}.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)?gi(e,t):void 0}}(e,t)||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.")}()}function gi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const bi=function(n){var o,i=n.stateCode,l=(0,r.useTranslation)().t,u=yi((0,t.useState)(Co),2),c=u[0],d=u[1],f=yi((0,t.useState)(qo),2),v=f[0],p=(f[1],Digit.StoreData.getCurrentLanguage()),m=(null===(o=window)||void 0===o||null===(o=o.globalConfigs)||void 0===o?void 0:o.getConfig("OTP_BASED_LOGIN"))||!1,y=Io(i),g=y.data,b=y.isLoading;Digit.Services.useStore({stateCode:i,moduleCode:["privacy-policy"],language:p,modulePrefix:"digit"}).data,(0,t.useEffect)(function(){!b&&null!=g&&g.config?d(null==g?void 0:g.config):d(Co)},[g,b]);var h=(0,t.useMemo)(function(){return c.map(function(e){var t={};for(var n in e.texts)t[n]=l(e.texts[n]);return pi(pi({},e),{},{texts:t})},[c])}),O=(0,t.useMemo)(function(){return v.map(function(e){var t={};for(var n in e.texts)t[n]=l(e.texts[n]);return pi(pi({},e),{},{texts:t})},[v])});return b?(0,s.jsx)(e.Loader,{page:!1,variant:"PageLoader"}):(0,s.jsxs)(a.Routes,{children:[" ",(0,s.jsx)(a.Route,{path:"/",element:m?(0,s.jsx)(di,{config:O[0],t:l,loginOTPBased:m}):(0,s.jsx)(di,{config:h[0],t:l})})]})};var hi=[{texts:{header:"CORE_COMMON_SIGN_UP",submitButtonLabel:"CORE_COMMON_SIGN_UP_BUTTON"},inputs:[{label:"CORE_SIGNUP_EMAILID",type:"text",key:"email",isMandatory:!0,populators:{name:"email",validation:{required:!0,pattern:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,maxLength:64},error:"ERR_EMAIL_REQUIRED"}},{label:"CORE_SIGNUP_ACCOUNT_NAME",type:"text",key:"accountName",isMandatory:!0,populators:{name:"accountName",validation:{required:!0,pattern:/^[A-Za-z]+( [A-Za-z]+)*$/,maxLength:50},error:"ERR_ACCOUNT_NAME_REQUIRED"},infoMessage:"SANDBOX_SIGNUP_ACCOUNT_NAME_TOOLTIP"},{isMandatory:!1,key:"check",type:"component",component:"PrivacyComponent",withoutLabel:!0,disable:!1,customProps:{module:"SandboxSignUp"},populators:{name:"check"}}]}];function Oi(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return Si(s,"_invoke",function(n,r,o){var i,l,u,s=0,c=o||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return i=t,l=0,u=e,f.n=n,a}};function v(n,r){for(l=n,u=r,t=0;!d&&s&&!o&&t<c.length;t++){var o,i=c[t],v=f.p,p=i[2];n>3?(o=p===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=v&&((o=n<2&&v<i[1])?(l=0,f.v=r,f.n=i[1]):v<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,f.n=p,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,c,p){if(s>1)throw TypeError("Generator is already running");for(d&&1===c&&v(c,p),l=c,u=p;(t=l<2?e:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),v(l,u)):f.n=u:f.v=u);try{if(s=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(t){i=e,l=1,u=t}finally{s=1}}return{value:t,done:d}}}(n,o,i),!0),s}var a={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(Si(t={},r,function(){return this}),t),d=s.prototype=l.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,Si(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=s,Si(d,"constructor",s),Si(s,"constructor",u),u.displayName="GeneratorFunction",Si(s,o,"GeneratorFunction"),Si(d),Si(d,o,"Generator"),Si(d,r,function(){return this}),Si(d,"toString",function(){return"[object Generator]"}),(Oi=function(){return{w:i,m:f}})()}function Si(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Si=function(e,t,n,r){function i(t,n){Si(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},Si(e,t,n,r)}function xi(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,o)}function ji(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){xi(i,r,o,a,l,"next",e)}function l(e){xi(i,r,o,a,l,"throw",e)}a(void 0)})}}function wi(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ei(e,t);var n={}.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)?Ei(e,t):void 0}}(e,t)||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.")}()}function Ei(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ci=function(n){var r,o,i,l,u,c,d,f=n.config,v=n.t,p=n.isDisabled,m=Digit.Hooks.useTenants(),y=(m.data,m.isLoading),g=Digit.Hooks.useStore.getInitData(),b=g.data,h=g.isLoading,O=((b||{}).stateInfo,wi((0,t.useState)(null),2)),S=O[0],x=O[1],j=wi((0,t.useState)(!1),2),w=j[0],E=j[1],C=(0,a.useNavigate)(),_=Digit.Hooks.useCustomAPIMutationHook({url:"/tenant-management/tenant/_create",params:{},body:{},config:{enable:!1}}),N=function(){var e=ji(Oi().m(function e(t){return Oi().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,_.mutate({body:{tenant:{name:t.accountName,email:t.email}},config:{enable:!0}},{onError:function(e,t){var n,r;x({key:"error",label:null!=e&&null!==(n=e.response)&&void 0!==n&&null!==(n=n.data)&&void 0!==n&&null!==(n=n.Errors)&&void 0!==n&&null!==(n=n[0])&&void 0!==n&&n.code?"SANDBOX_SIGNUP_".concat(null==e||null===(r=e.response)||void 0===r||null===(r=r.data)||void 0===r||null===(r=r.Errors)||void 0===r||null===(r=r[0])||void 0===r?void 0:r.code):"SANDBOX_SIGNUP_ERROR"})},onSuccess:function(){var e=ji(Oi().m(function e(t){var n,r,o;return Oi().w(function(e){for(;;)switch(e.n){case 0:C({pathname:"/".concat(null===(n=window)||void 0===n?void 0:n.globalPath,"/user/otp"),state:{email:null==t||null===(r=t.Tenants[0])||void 0===r?void 0:r.email,tenant:null==t||null===(o=t.Tenants[0])||void 0===o?void 0:o.code}});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),I=[{body:null==f?void 0:f.inputs}];return"admin"===Digit.Hooks.useQueryParams().mode&&0==(null==I||null===(r=I[0])||void 0===r||null===(r=r.body)||void 0===r||null===(r=r[2])||void 0===r?void 0:r.disable)&&null==(null==I||null===(o=I[0])||void 0===o||null===(o=o.body)||void 0===o||null===(o=o[2])||void 0===o||null===(o=o.populators)||void 0===o?void 0:o.defaultValue)&&(I[0].body[2].disable=!0,I[0].body[2].isMandatory=!1,I[0].body[2].populators.defaultValue=defaultValue),y||h?(0,s.jsx)(e.Loader,{}):(0,s.jsxs)(oo,{children:[(0,s.jsx)("div",{className:"employeeBackbuttonAlign",children:(0,s.jsx)(e.BackLink,{onClick:function(){return window.history.back()}})}),(0,s.jsx)(e.FormComposerV2,{onSubmit:N,isDisabled:p||w,noBoxShadow:!0,inline:!0,submitInForm:!0,config:I,label:null==f||null===(i=f.texts)||void 0===i?void 0:i.submitButtonLabel,secondaryActionLabel:null==f||null===(l=f.texts)||void 0===l?void 0:l.secondaryButtonLabel,onFormValueChange:function(e,t,n){var r=I[0].body.map(function(e){return e.key}).some(function(e){var n=t[e];return null==n||""===n||"check"===e&&!1===n||"captcha"===e&&!1===n});E(r)},heading:null==f||null===(u=f.texts)||void 0===u?void 0:u.header,className:"sandbox-signup-form",cardSubHeaderClassName:"signupCardSubHeaderClassName",cardClassName:"signupCardClassName sandbox-onboarding-wrapper",buttonClassName:"buttonClassName",children:(0,s.jsx)(io,{showTenant:!1})}),S&&(0,s.jsx)(e.Toast,{type:"error",label:v(null==S?void 0:S.label),onClose:function(){x(null)}}),(0,s.jsx)("div",{className:"employee-login-home-footer",style:{backgroundColor:"unset"},children:(0,s.jsx)("img",{alt:"Powered by DIGIT",src:null===(c=window)||void 0===c||null===(c=c.globalConfigs)||void 0===c||null===(d=c.getConfig)||void 0===d?void 0:d.call(c,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){var e,t;window.open(null===(e=window)||void 0===e||null===(e=e.globalConfigs)||void 0===e||null===(t=e.getConfig)||void 0===t?void 0:t.call(e,"DIGIT_HOME_URL"),"_blank").focus()}})})]})};Ci.propTypes={loginParams:u().any},Ci.defaultProps={loginParams:null};const _i=Ci;function Ni(e){return Ni="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},Ni(e)}function Ii(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 Ai(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ii(Object(n),!0).forEach(function(t){Di(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ii(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Di(e,t,n){return(t=function(e){var t=function(e){if("object"!=Ni(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ni(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ni(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ti(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const Pi=function(e){var n,o,i=e.stateCode,l=(0,r.useTranslation)().t,u=(n=(0,t.useState)(hi),o=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(n,o)||function(e,t){if(e){if("string"==typeof e)return Ti(e,t);var n={}.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)?Ti(e,t):void 0}}(n,o)||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.")}()),c=u[0],d=u[1],f=Digit.StoreData.getCurrentLanguage(),v=(Digit.Services.useStore({stateCode:i,moduleCode:["privacy-policy"],language:f,modulePrefix:"digit"}).data,Digit.Hooks.useCommonMDMS(i,"commonUiConfig",["SignUpConfig"],{select:function(e){var t;return{config:null==e||null===(t=e.commonUiConfig)||void 0===t?void 0:t.SignUpConfig}},retry:!1})),p=v.data,m=v.isLoading;(0,t.useEffect)(function(){!m&&null!=p&&p.config?d(p.config):d(hi)},[p,m]);var y=(0,t.useMemo)(function(){return c.map(function(e){var t={};for(var n in e.texts)t[n]=l(e.texts[n]);return Ai(Ai({},e),{},{texts:t})})},[c]);return(0,s.jsx)(a.Routes,{children:(0,s.jsx)(a.Route,{path:"",element:(0,s.jsx)(_i,{config:y[0],t:l})})})};function Li(e){return Li="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},Li(e)}var Ri=["UserRequest"];function ki(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return Mi(s,"_invoke",function(n,r,o){var i,l,u,s=0,c=o||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return i=t,l=0,u=e,f.n=n,a}};function v(n,r){for(l=n,u=r,t=0;!d&&s&&!o&&t<c.length;t++){var o,i=c[t],v=f.p,p=i[2];n>3?(o=p===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=v&&((o=n<2&&v<i[1])?(l=0,f.v=r,f.n=i[1]):v<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,f.n=p,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,c,p){if(s>1)throw TypeError("Generator is already running");for(d&&1===c&&v(c,p),l=c,u=p;(t=l<2?e:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),v(l,u)):f.n=u:f.v=u);try{if(s=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(t){i=e,l=1,u=t}finally{s=1}}return{value:t,done:d}}}(n,o,i),!0),s}var a={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(Mi(t={},r,function(){return this}),t),d=s.prototype=l.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,Mi(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=s,Mi(d,"constructor",s),Mi(s,"constructor",u),u.displayName="GeneratorFunction",Mi(s,o,"GeneratorFunction"),Mi(d),Mi(d,o,"Generator"),Mi(d,r,function(){return this}),Mi(d,"toString",function(){return"[object Generator]"}),(ki=function(){return{w:i,m:f}})()}function Mi(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Mi=function(e,t,n,r){function i(t,n){Mi(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},Mi(e,t,n,r)}function Ui(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 Bi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ui(Object(n),!0).forEach(function(t){Fi(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ui(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Fi(e,t,n){return(t=function(e){var t=function(e){if("object"!=Li(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Li(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Li(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gi(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Vi(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,o)}function Hi(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Wi(e,t);var n={}.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)?Wi(e,t):void 0}}(e,t)||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.")}()}function Wi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const zi=function(n){var o,i,l,u=n.isLogin,c=void 0!==u&&u,d=(0,r.useTranslation)().t,f=(0,a.useNavigate)(),v=(0,a.useLocation)(),p=Hi((0,t.useState)(null),2),m=p[0],y=p[1],g=Hi((0,t.useState)(!1),2),h=g[0],O=g[1],S=Hi((0,t.useState)(null),2),x=S[0],j=S[1],w=Hi((0,t.useState)((null==v||null===(o=v.state)||void 0===o?void 0:o.data)||{}),2),E=(w[0],w[1],Hi((0,t.useState)(!1),2)),C=(E[0],E[1],v.state||{}),_=C.email,N=C.tenant,I=Digit.Hooks.useCustomMDMS(N,"SandBoxLanding",[{name:"LandingPageRoles"}],{enabled:!0,staleTime:0,cacheTime:0,select:function(e){var t;return null==e||null===(t=e.SandBoxLanding)||void 0===t?void 0:t.LandingPageRoles}}).data,D=null==I?void 0:I[0].url,T=[{body:[{type:"component",component:"OtpComponent",key:"OtpComponent",withoutLabel:!0,isMandatory:!1,customProps:{email:_,tenant:N},populators:{required:!0}}]}],P=[{texts:{header:d("SANDBOX_OTP_VERIFICATION"),submitButtonLabel:"CORE_COMMON_SUBMIT"}}],L=function(){y(null)};(0,t.useEffect)(function(){var e,t,n;if(x){Digit.SessionStorage.set("citizen.userRequestObject",x);var r=null==x||null===(e=x.info)||void 0===e||null===(e=e.roles)||void 0===e?void 0:e.filter(function(e){return e.tenantId===Digit.SessionStorage.get("Employee.tenantId")});(null==x||null===(t=x.info)||void 0===t||null===(t=t.roles)||void 0===t?void 0:t.length)>0&&(x.info.roles=r),Digit.UserService.setUser(x),function(e,t){var n;if(!Digit.Utils.getMultiRootTenant()){var r=(null===(n=JSON.parse(sessionStorage.getItem("Digit.locale")))||void 0===n?void 0:n.value)||Digit.Utils.getDefaultLanguage();localStorage.setItem("Employee.tenant-id",null==e?void 0:e.tenantId),localStorage.setItem("tenant-id",null==e?void 0:e.tenantId),localStorage.setItem("citizen.userRequestObject",JSON.stringify(e)),localStorage.setItem("locale",r),localStorage.setItem("Employee.locale",r),localStorage.setItem("token",t),localStorage.setItem("Employee.token",t),localStorage.setItem("user-info",JSON.stringify(e)),localStorage.setItem("Employee.user-info",JSON.stringify(e))}}(null==x?void 0:x.info,null==x?void 0:x.access_token);var o="/".concat(null===(n=window)||void 0===n?void 0:n.globalPath,"/user/setup"),i=function(e,t,n,r){var o,i,a,l="SUPERUSER"===(null==t||null===(o=t.info)||void 0===o||null===(o=o.roles)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.code),u=null===(i=window)||void 0===i?void 0:i.contextPath;switch(!0){case"/sandbox-ui/user/otp"===e&&l:return"/".concat(u,"/employee/sandbox/landing");case l&&(null==n||null===(a=n[0])||void 0===a||null===(a=a.rolesForLandingPage)||void 0===a?void 0:a.includes("SUPERUSER")):return"/".concat(u).concat(r);default:return"/".concat(u,"/employee")}}(v.pathname,x,I,D);return c?void f(i):void f({pathname:o},{state:{tenant:N}})}},[x]);var R=function(){var e,t=(e=ki().m(function e(t){var n,r,o,i,a,l,u;return ki().w(function(e){for(;;)switch(e.p=e.n){case 0:return r={username:_,password:null==t||null===(n=t.OtpComponent)||void 0===n?void 0:n.otp,tenantId:N,userType:"EMPLOYEE"},e.p=1,e.n=2,Digit.UserService.authenticate(r);case 2:o=e.v,i=o.UserRequest,a=Gi(o,Ri),Digit.SessionStorage.set("Employee.tenantId",null==i?void 0:i.tenantId),j(Bi({info:i},a)),e.n=4;break;case 3:e.p=3,u=e.v,y((null==u||null===(l=u.response)||void 0===l||null===(l=l.data)||void 0===l?void 0:l.error_description)||"ES_ERROR_USER_NOT_PERMITTED"==(null==u?void 0:u.message)&&d("ES_ERROR_USER_NOT_PERMITTED")||d("INVALID_LOGIN_CREDENTIALS")),setTimeout(L,5e3);case 4:return e.a(2)}},e,null,[[1,3]])}),function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){Vi(i,r,o,a,l,"next",e)}function l(e){Vi(i,r,o,a,l,"throw",e)}a(void 0)})});return function(e){return t.apply(this,arguments)}}();return(0,s.jsxs)(oo,{children:[(0,s.jsxs)("div",{className:"employeeBackbuttonAlign",children:[(0,s.jsx)(e.BackLink,{onClick:function(){return f(-1)}})," "]}),(0,s.jsx)(A.FormComposerV2,{onSubmit:R,noBoxShadow:!0,inline:!0,submitInForm:!0,onFormValueChange:function(e,t){var n,r=t.OtpComponent;6===(null==r||null===(n=r.otp)||void 0===n?void 0:n.length)?O(!0):O(!1)},isDisabled:!h,config:T,label:P[0].texts.submitButtonLabel,heading:P[0].texts.header,headingStyle:{textAlign:"center"},cardStyle:{maxWidth:"408px",margin:"auto"},className:"sandbox-onboarding-wrapper",children:(0,s.jsx)(io,{showTenant:!1})}),m&&(0,s.jsx)(e.Toast,{type:"error",label:d(m),onClose:L}),(0,s.jsxs)("div",{className:"EmployeeLoginFooter",children:[(0,s.jsx)(b,{alt:"Powered by DIGIT",src:null===(i=window)||void 0===i||null===(i=i.globalConfigs)||void 0===i||null===(l=i.getConfig)||void 0===l?void 0:l.call(i,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){var e,t;window.open(null===(e=window)||void 0===e||null===(e=e.globalConfigs)||void 0===e||null===(t=e.getConfig)||void 0===t?void 0:t.call(e,"DIGIT_HOME_URL"),"_blank").focus()}})," "]})]})};function Xi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const qi=function(){var n,o,i,l,u,c,d=(0,r.useTranslation)().t,f=((0,a.useLocation)().state||{}).tenant,v=(0,t.useRef)(null),p=null===(n=Digit.SessionStorage.get("User"))||void 0===n||null===(n=n.info)||void 0===n?void 0:n.roles,m=(u=(0,t.useState)(!0),c=2,function(e){if(Array.isArray(e))return e}(u)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(u,c)||function(e,t){if(e){if("string"==typeof e)return Xi(e,t);var n={}.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)?Xi(e,t):void 0}}(u,c)||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.")}()),y=m[0],g=m[1],h=Digit.Hooks.useCustomMDMS(f,"SandBoxLanding",[{name:"LandingPageRoles"}],{enabled:!0,staleTime:0,gcTime:0,select:function(e){var t;return null==e||null===(t=e.SandBoxLanding)||void 0===t?void 0:t.LandingPageRoles}}).data;(0,t.useEffect)(function(){null!=h&&h[0].url&&g(!1)},[h]);var O=null==h?void 0:h[0].url;return(0,s.jsxs)(oo,{children:[(0,s.jsx)("div",{className:"employeeBackbuttonAlign",children:(0,s.jsx)(e.BackLink,{onClick:function(){return window.history.back()}})}),(0,s.jsxs)(e.Card,{className:"card-sandbox",children:[(0,s.jsx)(io,{showTenant:!1}),(0,s.jsx)("div",{className:"sandbox-success-signup",children:(0,s.jsx)(e.SVG.TickMark,{fill:"#fff",height:30,width:70})}),(0,s.jsx)(e.CardHeader,{className:"cardHeader-sandbox",styles:{color:"#00703c"},children:d("SANDBOX_HEADER")}),(0,s.jsx)(e.CardText,{className:"cardText-sandbox",children:d("SAMDBOX_URL_SUB")}),(0,s.jsxs)(e.CardLabel,{children:[" ",d("SANDBOX_URL")," "]}),(0,s.jsxs)("div",{className:"sandbox-url-wrapper",children:[(0,s.jsx)(e.TextInput,{inputRef:v,className:"urlInputText",onChange:function(){},nonEditable:!0,value:"".concat(window.location.host,"/").concat(null===(o=window)||void 0===o?void 0:o.globalPath,"/").concat(f,"/employee")}),(0,s.jsx)(e.Button,{className:"copyButton",variation:"secondary",onClick:function(){navigator.clipboard.writeText(v.current.value)},label:d("COPY_URL")})]}),(0,s.jsx)("div",{className:"sandbox-url-footer",children:d("SANDBOX_URL_FOOT")}),(0,s.jsx)(e.Button,{isDisabled:y,onClick:function(){var e,t;!function(e,t){var n;return"SUPERUSER"===(null==e||null===(n=e[0])||void 0===n?void 0:n.code)&&t.some(function(e){return e.rolesForLandingPage.includes("SUPERUSER")})}(p,h)?window.location.href="/".concat(null===(t=window)||void 0===t?void 0:t.globalPath,"/").concat(f,"/employee"):window.location.href="/".concat(null===(e=window)||void 0===e?void 0:e.globalPath,"/").concat(f).concat(O)},label:d("SIGN_IN")})]}),(0,s.jsx)("div",{className:"EmployeeLoginFooter",children:(0,s.jsx)(b,{alt:"Powered by DIGIT",src:null===(i=window)||void 0===i||null===(i=i.globalConfigs)||void 0===i||null===(l=i.getConfig)||void 0===l?void 0:l.call(i,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){var e,t;window.open(null===(e=window)||void 0===e||null===(e=e.globalConfigs)||void 0===e||null===(t=e.getConfig)||void 0===t?void 0:t.call(e,"DIGIT_HOME_URL"),"_blank").focus()}})})]})};var Qi=["user/landing","user/profile","user/error","user/productPage"];const Zi=Ko(function(n){var o,i,l,u,c=n.stateInfo,d=n.userDetails,f=n.CITIZEN,v=n.cityDetails,p=n.mobileView,m=n.handleUserDropdownSelection,y=n.logoUrl,g=n.logoUrlWhite,h=n.DSO,O=n.stateCode,x=n.modules,j=n.appTenants,w=(n.sourceUrl,n.pathname,n.initData),E=n.noTopBar,C=void 0!==E&&E,_=(0,a.useNavigate)(),N=(0,r.useTranslation)().t,A=(0,a.useLocation)(),D=null==A||null===(o=A.pathname)||void 0===o?void 0:o.includes("language-selection"),T=Qi.some(function(e){var t;return null==A||null===(t=A.pathname)||void 0===t?void 0:t.includes(e)});(0,t.useEffect)(function(){Digit.UserService.setType("employee")},[]);var P=null==w||null===(i=w.modules)||void 0===i||null===(i=i.filter(function(e){return null==e?void 0:e.additionalComponent}))||void 0===i?void 0:i.map(function(e){return null==e?void 0:e.additionalComponent});return(0,s.jsx)("div",{className:"employee",children:(0,s.jsxs)(a.Routes,{children:[" ",(0,s.jsx)(a.Route,{path:"user/*",element:(0,s.jsxs)(s.Fragment,{children:[T&&(0,s.jsx)(nt,{t:N,stateInfo:c,userDetails:d,CITIZEN:f,cityDetails:v,mobileView:p,handleUserDropdownSelection:m,logoUrl:y,logoUrlWhite:g,showSidebar:!!T,showLanguageChange:!D}),(0,s.jsx)("div",{className:T?"grounded-container":"loginContainer",style:T?{padding:0,paddingTop:"0",marginLeft:"0"}:{"--banner-url":"url(".concat(null==c?void 0:c.bannerUrl,")"),padding:"0px"},children:(0,s.jsxs)(a.Routes,{children:[" ",(0,s.jsx)(a.Route,{path:"login",element:(0,s.jsx)(bi,{stateCode:O})})," ",(0,s.jsx)(a.Route,{path:"login/otp",element:(0,s.jsx)(zi,{isLogin:!0})})," ",(0,s.jsx)(a.Route,{path:"forgot-password",element:(0,s.jsx)(Go,{stateCode:O})})," ",(0,s.jsx)(a.Route,{path:"change-password",element:(0,s.jsx)(wo,{})})," ",(0,s.jsx)(a.Route,{path:"profile",element:(0,s.jsx)(e.PrivateRoute,{component:function(){return(0,s.jsx)(Ft,{stateCode:O,userType:"employee",cityDetails:v})}})}),(0,s.jsx)(a.Route,{path:"error",element:(0,s.jsx)(S,{initData:w,goToHome:function(){var e,t,n;_("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/").concat(null===(t=Digit)||void 0===t||null===(t=t.UserService)||void 0===t||null===(n=t.getType)||void 0===n?void 0:n.call(t)))}})}),(0,s.jsx)(a.Route,{path:"language-selection",element:(0,s.jsx)(Xo,{})})," ",(0,s.jsx)(a.Route,{path:"*",element:(0,s.jsx)(a.Navigate,{to:"language-selection",replace:!0})})," "]})})]})}),(0,s.jsx)(a.Route,{path:"*",element:(0,s.jsxs)(s.Fragment,{children:[!C&&(0,s.jsx)(nt,{t:N,stateInfo:c,userDetails:d,CITIZEN:f,cityDetails:v,mobileView:p,handleUserDropdownSelection:m,logoUrl:y,logoUrlWhite:g,modules:x}),(0,s.jsxs)("div",{className:C?"":"main ".concat(h?"m-auto":""," digit-home-main"),children:[(0,s.jsx)("div",{className:"employee-app-wrapper digit-home-app-wrapper",children:(0,s.jsx)(I,{initData:w,children:(0,s.jsx)(Ho,{stateCode:O,userType:"employee",modules:x,appTenants:j,additionalComponent:P})})}),(0,s.jsx)("div",{className:"employee-home-footer",children:(0,s.jsx)(b,{alt:"Powered by DIGIT",src:null===(l=window)||void 0===l||null===(l=l.globalConfigs)||void 0===l||null===(u=l.getConfig)||void 0===u?void 0:u.call(l,"DIGIT_FOOTER"),style:{height:"1.1em",cursor:"pointer"},onClick:function(){var e,t;window.open(null===(e=window)||void 0===e||null===(e=e.globalConfigs)||void 0===e||null===(t=e.getConfig)||void 0===t?void 0:t.call(e,"DIGIT_HOME_URL"),"_blank").focus()}})})]})]})}),(0,s.jsx)(a.Route,{path:"*",element:(0,s.jsx)(a.Navigate,{to:"user/language-selection",replace:!0})})]})})},".digit-home-main"),Yi=function(t){(0,a.useLocation)().state;var n=(0,r.useTranslation)().t,o=(t.stateInfo,(0,a.useNavigate)()),i={imgUrl:"https://s3.ap-south-1.amazonaws.com/egov-qa-assets/error-image.png",infoHeader:"WRONG_TENANT_SIGN_UP",infoMessage:"WRONG_TENANT_SIGN_UP_MESSAGE",buttonInfo:"WRONG_TENANT_SIGN_UP_BUTTON",action:function(){o("/".concat(window.globalPath,"/"))}};return(0,s.jsx)(oo,{children:(0,s.jsxs)(e.Card,{className:"digit-employee-card customError",children:[(0,s.jsx)(io,{showTenant:!1}),(0,s.jsx)(e.CardHeader,{className:"center",children:n(i.infoHeader)}),(0,s.jsx)(e.CardText,{className:"center",children:n(i.infoMessage)}),(0,s.jsx)(e.Button,{className:"customErrorButton",label:n(null==i?void 0:i.buttonInfo),variation:"primary",isSuffix:!0,onClick:function(e){e.preventDefault(),null==i||i.action()}})]})})};function Ki(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const Ji=function(){var e,n,o=(e=(0,t.useState)(0),n=2,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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,n)||function(e,t){if(e){if("string"==typeof e)return Ki(e,t);var n={}.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)?Ki(e,t):void 0}}(e,n)||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.")}()),i=o[0],l=o[1],u=(0,a.useNavigate)(),c=(0,a.useLocation)(),d=(0,r.useTranslation)().t,f=(c.state||{}).tenant,v=["SANDBOX_GUIDE_SETUP_ACCOUNT","SANDBOX_GUIDE_DEFAULT_MASTER_DATA","SANDBOX_GUIDE_CONFIGURING_COMPLAINTS","SANDBOX_GUIDE_CONFIGURING_EMPLOYEE_MANAGEMENT","SANDBOX_GUIDE_SETTING_UP_CITIZEN_PORTAL","SANDBOX_GUIDE_SETTING_UP_EMPLOYEE_PORTAL","SANDBOX_GUIDE_LOADING_CONFIGURATION_INTERFACE","SANDBOX_GUIDE_CREATING_DASHBOARD","SANDBOX_GUIDE_ALL_SETUP_DONE"];return(0,t.useEffect)(function(){var e,t;return i<v.length?e=setInterval(function(){l(function(e){return e<v.length-1?e+1:e})},2e3):i===v.length&&(t=setTimeout(function(){var e,t="undefined"!=typeof window?null===(e=window)||void 0===e?void 0:e.globalPath:"";u({pathname:"/".concat(t,"/user/url"),state:{tenant:f}})},1e3)),function(){e&&clearInterval(e),t&&clearTimeout(t)}},[i,v.length,u,f]),(0,s.jsxs)("div",{className:"sandbox-loader-screen",children:[(0,s.jsx)("div",{className:"sandbox-loader"}),(0,s.jsx)("ul",{className:"sandbox-installation-steps",children:v.map(function(e,t){return(0,s.jsxs)("li",{className:"sandbox-step ".concat(t<i?"sandbox-visible":""),children:[(0,s.jsx)("span",{className:"sandbox-step-text",children:d(e)}),t<i&&(0,s.jsx)(M.CheckCircle,{fill:"#00703C"})]},t)})})]})};function $i(e){return $i="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},$i(e)}function ea(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 ta(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ea(Object(n),!0).forEach(function(t){na(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ea(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function na(e,t,n){return(t=function(e){var t=function(e){if("object"!=$i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$i(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ra=function(e){var n,r,o,i,l,u=e.stateCode,c=e.modules,d=e.appTenants,f=e.logoUrl,v=e.logoUrlWhite,p=e.initData,m=e.defaultLanding,y=void 0===m?"citizen":m,g=e.allowedUserTypes,b=void 0===g?["citizen","employee"]:g,h=((0,a.useNavigate)(),(0,a.useLocation)().pathname),O=window.innerWidth,S=Digit.ULBService.getCurrentUlb(),x=Digit.UserService.getUser(),j=(Digit.Hooks.useStore.getInitData().data||{}).stateInfo,w=Digit.UserService.hasAccess(["FSM_DSO"]),E="CITIZEN"===(null==x||null===(n=x.info)||void 0===n?void 0:n.type)||!window.location.pathname.split("/").includes("employee");window.location.pathname.split("/").includes("employee")&&(E=!1),(0,t.useEffect)(function(){var e,t,n;null!=h&&h.includes("application-details")||(null!=h&&h.includes("inbox")||Digit.SessionStorage.del("fsm/inbox/searchParams"),null!=h&&h.includes("search")&&Digit.SessionStorage.del("fsm/search/searchParams")),null!=h&&h.includes("dss")||Digit.SessionStorage.del("DSS_FILTERS"),(null==h?void 0:h.toString())==="/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/employee")&&(Digit.SessionStorage.del("SEARCH_APPLICATION_DETAIL"),Digit.SessionStorage.del("WS_EDIT_APPLICATION_DETAILS")),(null==h?void 0:h.toString())!=="/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/citizen")&&(null==h?void 0:h.toString())!=="/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/employee")||Digit.SessionStorage.del("WS_DISCONNECTION")},[h]);var C={stateInfo:j,userDetails:x,CITIZEN:E,cityDetails:S,mobileView:O<=640,handleUserDropdownSelection:function(e){e.func()},logoUrl:f,logoUrlWhite:v,DSO:w,stateCode:u,modules:c,appTenants:d,sourceUrl:"".concat(window.location.origin,"/citizen"),pathname:h,initData:p};return(0,s.jsxs)(a.Routes,{children:[(null==b?void 0:b.includes("employee"))&&(0,s.jsx)(a.Route,{path:"/".concat(null===(r=window)||void 0===r?void 0:r.contextPath,"/employee/*"),element:(0,s.jsx)(Zi,ta({},C))}),(null==b?void 0:b.includes("citizen"))&&(0,s.jsx)(a.Route,{path:"/".concat(null===(o=window)||void 0===o?void 0:o.contextPath,"/citizen/*"),element:(0,s.jsx)(ro,ta({},C))}),(null==b?void 0:b.includes("employee"))&&(0,s.jsx)(a.Route,{path:"/".concat(null===(i=window)||void 0===i?void 0:i.contextPath,"/no-top-bar/employee"),element:(0,s.jsx)(Zi,ta(ta({},C),{},{noTopBar:!0}))}),(0,s.jsx)(a.Route,{path:"*",element:(0,s.jsx)(a.Navigate,{to:"/".concat(null===(l=window)||void 0===l?void 0:l.contextPath,"/").concat(y)})})]})},oa=function(e){var t,n,r,o,i,l,u,c,d,f,v=e.stateCode,p=e.modules,m=e.appTenants,y=e.logoUrl,g=e.logoUrlWhite,b=e.initData,h=e.defaultLanding,O=void 0===h?"citizen":h,S=e.allowedUserTypes,x=(Digit.Hooks.useStore.getInitData().data||{}).stateInfo,j=["user/error"].some(function(e){var t;return null===(t=location)||void 0===t||null===(t=t.pathname)||void 0===t?void 0:t.includes(e)}),w=Digit.UserService.getUser(),E="CITIZEN"===(null==w||null===(t=w.info)||void 0===t?void 0:t.type)||!window.location.pathname.split("/").includes("employee"),C=window.innerWidth<=640;return(0,s.jsx)("div",{className:j?"grounded-container":"loginContainer",style:j?{padding:0,paddingTop:E?"0":C&&!E?"3rem":"80px",marginLeft:E||C?"0":"40px"}:{"--banner-url":"url(".concat(null==x?void 0:x.bannerUrl,")"),padding:"0px"},children:(0,s.jsxs)(a.Routes,{children:[(0,s.jsx)(a.Route,{path:"/".concat(null===(n=window)||void 0===n?void 0:n.globalPath,"/user/invalid-url"),element:(0,s.jsx)(Yi,{})}),(0,s.jsx)(a.Route,{path:"/".concat(null===(r=window)||void 0===r?void 0:r.globalPath,"/user/sign-up"),element:(0,s.jsx)(Pi,{stateCode:v})}),(0,s.jsx)(a.Route,{path:"/".concat(null===(o=window)||void 0===o?void 0:o.globalPath,"/user/otp"),element:(0,s.jsx)(zi,{})}),(0,s.jsx)(a.Route,{path:"/".concat(null===(i=window)||void 0===i?void 0:i.globalPath,"/user/setup"),element:(0,s.jsx)(Ji,{})}),(0,s.jsx)(a.Route,{path:"/".concat(null===(l=window)||void 0===l?void 0:l.globalPath,"/user/url"),element:(0,s.jsx)(qi,{})}),(null===(u=window)||void 0===u?void 0:u.globalPath)!==(null===(c=window)||void 0===c?void 0:c.contextPath)&&(0,s.jsx)(a.Route,{path:"/".concat(null===(d=window)||void 0===d?void 0:d.contextPath,"/*"),element:(0,s.jsx)(ra,{stateCode:v,modules:p,appTenants:m,logoUrl:y,logoUrlWhite:g,initData:b,defaultLanding:O,allowedUserTypes:S})}),(0,s.jsx)(a.Route,{path:"*",element:(0,s.jsx)(a.Navigate,{to:"/".concat(null===(f=window)||void 0===f?void 0:f.globalPath,"/user/sign-up")})})]})})},ia=f(1954),aa=f(2247);function la(e){return la="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},la(e)}function ua(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 sa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ua(Object(n),!0).forEach(function(t){ca(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ua(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ca(e,t,n){return(t=function(e){var t=function(e){if("object"!=la(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=la(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==la(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function da(e){return da="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},da(e)}function fa(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 va(e,t,n){return(t=function(e){var t=function(e){if("object"!=da(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=da(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==da(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pa=[f.n(aa)()],ma=(0,ia.compose)(ia.applyMiddleware.apply(void 0,pa));const ya=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,ia.createStore)(function(e,t){return(0,ia.combineReducers)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fa(Object(n),!0).forEach(function(t){va(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({common:(n=e,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,t=arguments.length>1?arguments[1]:void 0;return"LANGUAGE_SELECT"===t.type?sa(sa({},e),{},{selectedLanguage:t.payload}):e})},t));var n}(e,t),ma)};var ga=["onSelect","formData","control","formState"];function ba(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ha(e,t);var n={}.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)?ha(e,t):void 0}}(e,t)||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.")}()}function ha(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const Oa=function(o){var i=o.onSelect,a=(o.formData,o.control,o.formState,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(o,ga)),l=(0,r.useTranslation)().t,u=Digit.ULBService.getCurrentTenantId(),c=ba((0,t.useState)(!1),2),d=c[0],f=c[1],v=ba((0,t.useState)(!1),2),p=v[0],m=v[1],y=Digit.Utils.getConfigModuleName(),g=Digit.Hooks.useCustomMDMS(u,y,[{name:"PrivacyPolicy"}],{select:function(e){var t;return null==e||null===(t=e[y])||void 0===t?void 0:t.PrivacyPolicy.find(function(e){var t;return e.module===(null==a||null===(t=a.props)||void 0===t?void 0:t.module)})}}).data;return(0,t.useEffect)(function(){i("check",d)},[d]),(0,s.jsxs)(n().Fragment,{children:[(0,s.jsxs)("div",{className:"digit-privacy-checkbox",children:[(0,s.jsx)(e.CheckBox,{label:l("ES_BY_CLICKING"),checked:d,onChange:function(e){f(e.target.checked)},id:"privacy-component-check"}),(0,s.jsx)(e.Button,{label:l("ES_PRIVACY_POLICY"),variation:"link",size:"medium",onClick:function(){m(!0)},style:{marginBottom:"1.18rem",paddingLeft:"0.2rem"}})]}),p&&(0,s.jsxs)(e.PopUp,{type:"default",className:"privacy-popUpClass",footerclassName:"popUpFooter",heading:l(null==g?void 0:g.header),onOverlayClick:function(){m(!1)},footerChildren:[(0,s.jsx)(e.Button,{type:"button",size:"large",variation:"secondary",label:l("DIGIT_I_DO_NOT_ACCEPT"),onClick:function(){f(!1),m(!1)}}),(0,s.jsx)(e.Button,{type:"button",size:"large",variation:"primary",label:l("DIGIT_I_ACCEPT"),className:"accept-class",onClick:function(){f(!0),m(!1)}})],sortFooterChildren:!0,onClose:function(){m(!1)},children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"privacy-table",children:l("DIGIT_TABLE_OF_CONTENTS")}),(0,s.jsx)("ul",{children:null==g?void 0:g.contents.map(function(t,n){return(0,s.jsxs)("li",{style:{display:"flex",alignItems:"center"},children:[(0,s.jsxs)("span",{style:{marginRight:"0.5rem"},children:[n+1,". "]}),(0,s.jsx)(e.Button,{label:l(t.header),variation:"link",size:"medium",onClick:function(e){var n,r;e.preventDefault(),n=null==t?void 0:t.header,(r=document.getElementById(n))&&r.scrollIntoView({behavior:"smooth"})},style:{justifyContent:"flex-start"}})]},n)})})]}),null==g?void 0:g.contents.map(function(e,t){return(0,s.jsxs)("div",{id:null==e?void 0:e.header,children:[(0,s.jsx)("div",{style:{fontWeight:"bold",paddingLeft:null!=e&&e.isSpaceRequired?"1rem":"0"},children:l(e.header)}),e.descriptions.map(function(e,t){return(0,s.jsxs)("div",{style:{paddingLeft:e.isSpaceRequired?"1rem":"0",marginBottom:"0.5rem"},children:[(0,s.jsxs)("div",{style:{fontWeight:null!=e&&e.isBold?700:400,display:"flex",alignItems:"center"},children:["points"===e.type&&(0,s.jsx)("span",{style:{marginRight:"0.5rem",listStyleType:"disc"},children:"•"}),"step"===e.type&&(0,s.jsxs)("span",{style:{marginRight:"0.5rem",listStyleType:"decimal"},children:[t+1,". "]}),l(e.text)]}),(null==e?void 0:e.subDescriptions)&&(null==e?void 0:e.subDescriptions.length)>0&&(0,s.jsx)("div",{className:"policy-subdescription",children:e.subDescriptions.map(function(e,t){return(0,s.jsxs)("div",{className:"policy-subdescription-points",children:["points"===e.type&&(0,s.jsx)("span",{style:{marginRight:"0.5rem",listStyleType:"disc",paddingLeft:"1rem"},children:"•"}),"step"===e.type&&(0,s.jsxs)("span",{style:{marginRight:"0.5rem",listStyleType:"decimal",paddingLeft:"1rem"},children:[t+1,". "]}),null===e.type&&(0,s.jsx)("span",{style:{marginRight:"0.5rem",paddingLeft:"1rem"},children:" "}),l(e.text)]},t)})})]},t)})]},t)})]})]})};function Sa(e){return Sa="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},Sa(e)}var xa=["onSelect","formData","control","formState"];function ja(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return wa(s,"_invoke",function(n,r,o){var i,l,u,s=0,c=o||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return i=t,l=0,u=e,f.n=n,a}};function v(n,r){for(l=n,u=r,t=0;!d&&s&&!o&&t<c.length;t++){var o,i=c[t],v=f.p,p=i[2];n>3?(o=p===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=v&&((o=n<2&&v<i[1])?(l=0,f.v=r,f.n=i[1]):v<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,f.n=p,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,c,p){if(s>1)throw TypeError("Generator is already running");for(d&&1===c&&v(c,p),l=c,u=p;(t=l<2?e:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),v(l,u)):f.n=u:f.v=u);try{if(s=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(t){i=e,l=1,u=t}finally{s=1}}return{value:t,done:d}}}(n,o,i),!0),s}var a={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(wa(t={},r,function(){return this}),t),d=s.prototype=l.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,wa(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=s,wa(d,"constructor",s),wa(s,"constructor",u),u.displayName="GeneratorFunction",wa(s,o,"GeneratorFunction"),wa(d),wa(d,o,"Generator"),wa(d,r,function(){return this}),wa(d,"toString",function(){return"[object Generator]"}),(ja=function(){return{w:i,m:f}})()}function wa(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}wa=function(e,t,n,r){function i(t,n){wa(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},wa(e,t,n,r)}function Ea(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,o)}function Ca(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){Ea(i,r,o,a,l,"next",e)}function l(e){Ea(i,r,o,a,l,"throw",e)}a(void 0)})}}function _a(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 Na(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_a(Object(n),!0).forEach(function(t){Ia(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ia(e,t,n){return(t=function(e){var t=function(e){if("object"!=Sa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Sa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Sa(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Aa(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Da(e,t);var n={}.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)?Da(e,t):void 0}}(e,t)||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.")}()}function Da(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ta(e){return Ta="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},Ta(e)}function Pa(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 La(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pa(Object(n),!0).forEach(function(t){Ra(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ra(e,t,n){return(t=function(e){var t=function(e){if("object"!=Ta(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ta(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ta(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ka(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,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ma(e,t);var n={}.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)?Ma(e,t):void 0}}(e,t)||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.")}()}function Ma(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ua=function(t){var n,o,l,u=t.stateCode,c=t.enabledModules,d=t.defaultLanding,f=t.allowedUserTypes,v=Digit.Hooks.useInitStore(u,c),p=v.isLoading,m=v.data,y=void 0===m?{}:m;if(p)return(0,s.jsx)(e.Loader,{page:!0,variant:"PageLoader"});var g=ya(y)||{};return(0,r.getI18n)(),Digit.ComponentRegistryService.getComponent("PrivacyComponent")||Digit.ComponentRegistryService.setComponent("PrivacyComponent",Oa),(0,s.jsx)(i.Provider,{store:g,children:(0,s.jsx)(a.BrowserRouter,{children:(0,s.jsx)(e.BodyContainer,{children:Digit.Utils.getMultiRootTenant()?(0,s.jsx)(oa,{initData:y,stateCode:u,modules:null==y?void 0:y.modules,appTenants:y.tenants,logoUrl:null==y||null===(n=y.stateInfo)||void 0===n?void 0:n.logoUrl,logoUrlWhite:null==y||null===(o=y.stateInfo)||void 0===o?void 0:o.logoUrlWhite,defaultLanding:d,allowedUserTypes:f}):(0,s.jsx)(ra,{initData:y,stateCode:u,modules:null==y?void 0:y.modules,appTenants:y.tenants,logoUrl:null==y||null===(l=y.stateInfo)||void 0===l?void 0:l.logoUrl,defaultLanding:d,allowedUserTypes:f})})})})},Ba=function(e){var n=e.stateCode,r=e.registry,i=e.enabledModules,a=e.defaultLanding,l=e.allowedUserTypes,u=(0,t.useMemo)(function(){return Digit.Utils.getPrivacyObject()||{}},[]),c=ka((0,t.useState)(u),2),d=c[0],f=c[1],v=(Digit.UserService.getType(),(0,t.useMemo)(function(){return new o.QueryClient({defaultOptions:{queries:{staleTime:9e5,gcTime:3e6,retry:!1,retryDelay:function(e){return 1/0}}}})},[])),p=Digit.Contexts.ComponentProvider,m=Digit.Contexts.PrivacyProvider,y=(Digit.UserService.hasAccess(["FSM_DSO"]),(0,t.useCallback)(function(e){Digit.Utils.setPrivacyObject({}),f({})},[])),g=(0,t.useCallback)(function(){var e=Digit.Utils.getPrivacyObject();return f(e),e},[]),b=(0,t.useCallback)(function(e){var t=Digit.Utils.getAllPrivacyObject(),n="undefined"!=typeof window?window.location.pathname:"",r=La(La({},t),{},Ra({},n,e));Digit.Utils.setPrivacyObject(La({},r)),f((null==t?void 0:t[n])||{})},[]),h=(0,t.useCallback)(function(e,t){f(Digit.Utils.updatePrivacy(e,t)||{})},[]),O=(0,t.useMemo)(function(){return{privacy:"undefined"!=typeof window?null==d?void 0:d[window.location.pathname]:d,resetPrivacy:y,getPrivacy:g,updatePrivacyDescoped:b,updatePrivacy:h}},[d,y,g,b,h]);return(0,s.jsx)("div",{children:(0,s.jsx)(I,{children:(0,s.jsx)(o.QueryClientProvider,{client:v,children:(0,s.jsx)(p.Provider,{value:r,children:(0,s.jsx)(m.Provider,{value:O,children:(0,s.jsx)(Ua,{stateCode:n,enabledModules:i,defaultLanding:a,allowedUserTypes:l})})})})})})},Fa={SelectOtp:Zt,ChangeCity:$,ChangeLanguage:te,PrivacyComponent:Oa,OtpComponent:function(n){var o,i,l=n.onSelect,u=(n.formData,n.control,n.formState,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(n,xa)),c=(0,r.useTranslation)().t,d=((0,a.useLocation)(),Aa((0,t.useState)(null),2)),f=d[0],v=d[1],p=Aa((0,t.useState)({}),2),m=p[0],y=p[1],g=Aa((0,t.useState)(!0),2),b=g[0],h=(g[1],Aa((0,t.useState)(30),2)),O=h[0],S=h[1],x=function(){v(null)};qt(function(){S(O-1)},O>0?1e3:null),(0,t.useEffect)(function(){l("OtpComponent",m)},[m]);var j={url:"/user-otp/v1/_send",params:{tenantId:null==u||null===(o=u.props)||void 0===o?void 0:o.code},body:{},config:{enable:!1}},w=Digit.Hooks.useCustomAPIMutationHook(j),E=function(){var e=Ca(ja().m(function e(){var t,n;return ja().w(function(e){for(;;)switch(e.n){case 0:return S(30),e.n=1,w.mutate({body:{otp:{userName:null==u||null===(t=u.props)||void 0===t?void 0:t.email,type:"login",tenantId:null==u||null===(n=u.props)||void 0===n?void 0:n.tenant,userType:"EMPLOYEE"}},config:{enable:!0}},{onError:function(e,t){var n,r;v({key:"error",label:null!=e&&null!==(n=e.response)&&void 0!==n&&null!==(n=n.data)&&void 0!==n&&null!==(n=n.Errors)&&void 0!==n&&n[0].code?"SANDBOX_RESEND_OTP".concat(null==e||null===(r=e.response)||void 0===r||null===(r=r.data)||void 0===r||null===(r=r.Errors)||void 0===r||null===(r=r[0])||void 0===r?void 0:r.code):"SANDBOX_RESEND_OTP_ERROR"}),setTimeout(x,5e3)},onSuccess:function(){var e=Ca(ja().m(function e(t){return ja().w(function(e){for(;;)switch(e.n){case 0:v({key:"info",label:c("OTP_RESNED_SUCCESFULL")}),setTimeout(x,5e3);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.CardLabel,{className:"sandbox-custom-otp-header",children:c("CS_OTP_EMAIL")}),(0,s.jsx)(e.CardLabel,{className:"sandbox-custom-otp-email",children:null==u||null===(i=u.props)||void 0===i?void 0:i.email}),(0,s.jsx)(e.CardLabel,{className:"sandbox-custom-otp-subheader",children:c("SANDBOX_ENTER_OTP")}),(0,s.jsx)(A.OTPInput,{className:"sandbox-otp-input",length:6,onChange:function(e){y(Na(Na({},m),{},{otp:e}))},value:null==m?void 0:m.otp}),O>0?(0,s.jsx)(e.CardText,{className:"sandbox-resend-otp",children:"".concat(c("CS_RESEND_ANOTHER_OTP")," ").concat(O," ").concat(c("CS_RESEND_SECONDS"))}):(0,s.jsx)("p",{className:"card-text-button sandbox-otp-input",onClick:E,children:c("CS_RESEND_OTP")}),!b&&(0,s.jsx)(e.CardLabelError,{children:c("CS_INVALID_OTP")}),f&&(0,s.jsx)(e.Toast,{type:null==f?void 0:f.key,label:c(null==f?void 0:f.label),onClose:x})]})}},Ga=function(){Object.entries(Fa).forEach(function(e){var t=ka(e,2),n=t[0],r=t[1];Digit.ComponentRegistryService.setComponent(n,r)})}})(),v})());
|
|
3
|
-
//# sourceMappingURL=main.js.map
|