@egovernments/digit-ui-module-core 2.0.0-dev-06 → 2.0.0-dev-08
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +1 -1
- package/dist/main.js.br +0 -0
- package/dist/main.js.map +1 -1
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
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-svg-components"),require("@egovernments/digit-ui-react-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-svg-components","@egovernments/digit-ui-react-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-svg-components"),require("@egovernments/digit-ui-react-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-svg-components"],e["@egovernments/digit-ui-react-components"],e.redux,e["redux-thunk"])}(this,(e,t,n,i,o,r,l,a,s,c)=>(()=>{var u={158(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>C});var i=n(4883),o=n(5953),r=n(4442),l=n(5053),a=n(6243),s=n(7598),c=n.n(s),u=n(5697),d=n(5660),v=n(743),p=n(6177),m=n(6870);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(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"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}function b(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){h(r,i,o,l,a,"next",e)}function a(e){h(r,i,o,l,a,"throw",e)}l(void 0)})}}var O=e=>{var t,n,{config:o,t:s}=e,[c,f]=(0,i.useState)(null),{mobile_number:y,tenantId:h}=Digit.Hooks.useQueryParams(),O=(0,r.useNavigate)(),[x,S]=(0,i.useState)(""),[j,_]=(0,i.useState)(!0),[w,C]=(0,i.useState)(null),N=()=>Digit.UserService.getType();(0,i.useEffect)(()=>{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");O(n,{replace:!0})}else Digit.UserService.setType("employee")},[c]);var E=()=>{C(null)},D=function(){var e=b(function*(){var e={otp:{mobileNumber:y,userType:N().toUpperCase(),type:"passwordreset",tenantId:h}};try{yield Digit.UserService.sendOtp(e,h),C(s("ES_OTP_RESEND"))}catch(e){var t;C((null==e||null===(t=e.response)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.error_description)||s("ES_INVALID_LOGIN_CREDENTIALS"))}setTimeout(E,5e3)});return function(){return e.apply(this,arguments)}}(),P=function(){var e=b(function*(e){try{if(e.newPassword!==e.confirmPassword)return C(s("ERR_PASSWORD_DO_NOT_MATCH"));var t=g(g({},e),{},{otpReference:x,tenantId:h,type:N().toUpperCase()});yield Digit.UserService.changePassword(t,h),I()}catch(e){var n;C((null==e||null===(n=e.response)||void 0===n||null===(n=n.data)||void 0===n||null===(n=n.error)||void 0===n||null===(n=n.fields)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.message)||s("ES_SOMETHING_WRONG")),setTimeout(E,5e3)}});return function(t){return e.apply(this,arguments)}}(),I=()=>{var e;O("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/employee/user/login"),{replace:!0})},[T,A,L]=o.inputs,R=[{body:[{label:s(T.label),type:T.type,populators:{name:T.name},isMandatory:!0},{label:s(A.label),type:A.type,populators:{name:A.name},isMandatory:!0},{label:s(L.label),type:L.type,populators:{name:L.name},isMandatory:!0}]}];return(0,m.jsxs)(u.A,{children:[(0,m.jsx)("div",{className:"employeeBackbuttonAlign",children:(0,m.jsx)(a.BackLink,{variant:"primary",style:{borderBottom:"none"}})}),(0,m.jsxs)(l.FormComposer,{onSubmit:P,noBoxShadow:!0,inline:!0,submitInForm:!0,config:R,label:o.texts.submitButtonLabel,cardStyle:{maxWidth:"408px",margin:"auto"},className:"employeeChangePassword",children:[(0,m.jsx)(d.A,{}),(0,m.jsxs)(l.CardSubHeader,{style:{textAlign:"center"},children:[" ",o.texts.header," "]}),(0,m.jsxs)(l.CardText,{children:["".concat(s("CS_LOGIN_OTP_TEXT")," "),(0,m.jsxs)("b",{children:[" ","".concat(s("+ 91 - "))," ",y]})]}),(0,m.jsx)(v.A,{t:s,userType:"employee",otp:x,onOtpChange:S,error:j,onResend:D})]}),w&&(0,m.jsx)(a.Toast,{type:"error",label:s(w),onClose:E}),(0,m.jsxs)("div",{className:"EmployeeLoginFooter",children:[(0,m.jsx)(p.A,{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:()=>{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()}})," "]})]})};O.propTypes={loginParams:c().any},O.defaultProps={loginParams:null};const x=O;var S=[{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 j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach(function(t){w(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function w(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const C=()=>{var{t:e}=(0,o.useTranslation)(),t=(0,i.useMemo)(()=>S.map(t=>{var n={};for(var i in t.texts)n[i]=e(t.texts[i]);return _(_({},t),{},{texts:n})}),[S]);return(0,m.jsx)(r.Routes,{children:(0,m.jsx)(r.Route,{path:"",element:(0,m.jsx)(x,{config:t[0],t:e})})})}},296(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>C});var i=n(4883),o=n(5953),r=n(4442),l=n(6243),a=n(1603),s=n(6870),c=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,158)),()=>n(158).default,{loaderText:"Loading Change Password..."}),u=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,9458)),()=>n(9458).default,{loaderText:"Loading Forgot Password..."}),d=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,1234)).then(e=>({default:e.AppHome})),()=>n(1234).AppHome,{loaderText:"Loading Home..."}),v=(e,t)=>t.filter(t=>{var n;return null==e||null===(n=e.map)||void 0===n?void 0:n.call(e,e=>e.code).includes(t.code)}),p=e=>{var t,n,{stateCode:i,userType:o,modules:l,appTenants:p,additionalComponent:m}=e,f=(0,r.useLocation)(),g=Digit.UserService.getUser();if(!g||null==g||!g.access_token||null==g||!g.info)return(0,s.jsx)(r.Navigate,{to:{pathname:"/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/").concat(o,"/user/login"),state:{from:f.pathname+f.search}},replace:!0});var y=null==l?void 0:l.map((e,t)=>{var{code:n,tenants:l}=e;return(0,s.jsx)(r.Route,{path:"".concat(n.toLowerCase(),"/*"),element:(0,s.jsx)(a.A,{moduleCode:n,stateCode:i,userType:o,tenants:v(l,p),maxRetries:3,retryDelay:1e3,initialDelay:800})},t)});return(0,s.jsx)("div",{className:"ground-container digit-home-ground",children:(0,s.jsxs)(r.Routes,{children:[y,(0,s.jsx)(r.Route,{path:"login",element:(0,s.jsx)(r.Navigate,{to:{pathname:"/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/").concat(o,"/user/login"),state:{from:f.pathname+f.search}},replace:!0})}),(0,s.jsx)(r.Route,{path:"forgot-password",element:(0,s.jsx)(u,{})}),(0,s.jsx)(r.Route,{path:"change-password",element:(0,s.jsx)(c,{})}),(0,s.jsx)(r.Route,{path:"*",element:(0,s.jsx)(d,{userType:o,modules:l,additionalComponent:m})})]})})},m=n(4217),f=n(5007),g=n(6177),y=n(5181),h=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,158)),()=>n(158).default,{loaderText:"Loading Change Password..."}),b=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,9458)),()=>n(9458).default,{loaderText:"Loading Forgot Password..."}),O=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,5383)),()=>n(5383).default,{loaderText:"Loading Language Selection..."}),x=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,3934)),()=>n(3934).default,{loaderText:"Loading Login..."}),S=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,1626)),()=>n(1626).default,{loaderText:"Loading OTP..."}),j=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,4872)),()=>n(4872).default,{loaderText:"Loading User Profile..."}),_=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,6340)),()=>n(6340).default,{loaderText:"Loading Error Component..."}),w=["user/landing","user/profile","user/error","user/productPage"];const C=(0,y.A)(e=>{var t,n,l,a,{stateInfo:c,userDetails:u,CITIZEN:d,cityDetails:v,mobileView:y,handleUserDropdownSelection:C,logoUrl:N,logoUrlWhite:E,stateCode:D,modules:P,appTenants:I,sourceUrl:T,pathname:A,initData:L,noTopBar:R=!1}=e,M=(0,r.useNavigate)(),{t:k}=(0,o.useTranslation)(),U=(0,r.useLocation)(),B=null==U||null===(t=U.pathname)||void 0===t?void 0:t.includes("language-selection"),F=w.some(e=>{var t;return null==U||null===(t=U.pathname)||void 0===t?void 0:t.includes(e)});(0,i.useEffect)(()=>{Digit.UserService.setType("employee")},[]);var V=null==L||null===(n=L.modules)||void 0===n||null===(n=n.filter(e=>null==e?void 0:e.additionalComponent))||void 0===n?void 0:n.map(e=>null==e?void 0:e.additionalComponent);return(0,s.jsx)("div",{className:"employee",children:(0,s.jsxs)(r.Routes,{children:[(0,s.jsx)(r.Route,{path:"user/*",element:(0,s.jsxs)(s.Fragment,{children:[F&&(0,s.jsx)(f.A,{t:k,stateInfo:c,userDetails:u,CITIZEN:d,cityDetails:v,mobileView:y,handleUserDropdownSelection:C,logoUrl:N,logoUrlWhite:E,showSidebar:!!F,showLanguageChange:!B}),(0,s.jsx)("div",{className:F?"grounded-container":"loginContainer",style:F?{padding:0,paddingTop:"0",marginLeft:"0"}:{"--banner-url":"url(".concat(null==c?void 0:c.bannerUrl,")"),padding:"0px"},children:(0,s.jsxs)(r.Routes,{children:[(0,s.jsx)(r.Route,{path:"login",element:(0,s.jsx)(x,{stateCode:D})}),(0,s.jsx)(r.Route,{path:"login/otp",element:(0,s.jsx)(S,{isLogin:!0})}),(0,s.jsx)(r.Route,{path:"forgot-password",element:(0,s.jsx)(b,{stateCode:D})}),(0,s.jsx)(r.Route,{path:"change-password",element:(0,s.jsx)(h,{})}),(0,s.jsx)(r.Route,{path:"profile",element:(0,s.jsx)(j,{stateCode:D,userType:"employee",cityDetails:v})}),(0,s.jsx)(r.Route,{path:"error",element:(0,s.jsx)(_,{initData:L,goToHome:()=>{var e,t,n;M("/".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)(r.Route,{path:"language-selection",element:(0,s.jsx)(O,{})}),(0,s.jsx)(r.Route,{path:"*",element:(0,s.jsx)(r.Navigate,{to:"language-selection",replace:!0})})]})})]})}),(0,s.jsx)(r.Route,{path:"*",element:(0,s.jsxs)(s.Fragment,{children:[!R&&(0,s.jsx)(f.A,{t:k,stateInfo:c,userDetails:u,CITIZEN:d,cityDetails:v,mobileView:y,handleUserDropdownSelection:C,logoUrl:N,logoUrlWhite:E,modules:P}),(0,s.jsxs)("div",{className:R?"":"main digit-home-main",children:[(0,s.jsx)("div",{className:"employee-app-wrapper digit-home-app-wrapper",children:(0,s.jsx)(m.A,{initData:L,children:(0,s.jsx)(p,{stateCode:D,userType:"employee",modules:P,appTenants:I,additionalComponent:V})})}),(0,s.jsx)("div",{className:"employee-home-footer",children:(0,s.jsx)(g.A,{alt:"Powered by DIGIT",src:null===(l=window)||void 0===l||null===(l=l.globalConfigs)||void 0===l||null===(a=l.getConfig)||void 0===a?void 0:a.call(l,"DIGIT_FOOTER"),style:{height:"1.1em",cursor:"pointer"},onClick:()=>{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)(r.Route,{path:"*",element:(0,s.jsx)(r.Navigate,{to:"user/language-selection",replace:!0})})]})})},".digit-home-main")},338(e){"use strict";e.exports=l},358(e,t,n){"use strict";n.d(t,{A:()=>s});var i=n(6243),o=n(4883),r=n(4442),l=n(6870),a=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!==(i=e)&&void 0!==i&&i.includes(t);){var i,o;e=null===(o=e)||void 0===o?void 0:o.replace(t,n)}return e};const s=e=>{var t,n,[s,c]=(0,o.useState)(null),[u,d]=(0,o.useState)([]),[v,p]=(0,o.useState)([]),m=(0,r.useNavigate)(),f=(e.dropdown,Digit.Utils.getMultiRootTenant());return(0,o.useEffect)(()=>{var e,t=Digit.SessionStorage.get("citizen.userRequestObject"),n=[],i=[];null==t||null===(e=t.info)||void 0===e||null===(e=e.roles)||void 0===e||e.forEach(e=>n.push(e.tenantId));var o=n.filter((e,t,n)=>n.indexOf(e)===t);null==o||o.forEach(e=>{var t;i.push({label:"TENANT_TENANTS_".concat(null===(t=a(e,".","_"))||void 0===t?void 0:t.toUpperCase()),value:e})}),null==i||i.filter(e=>e.value==Digit.SessionStorage.get("Employee.tenantId")),d(i)},[s]),(0,l.jsx)("div",{style:null!=e&&e.mobileView?{color:"#767676"}:{},children:f&&1==u.length?(0,l.jsx)(i.CardText,{style:{color:"#363636"},children:null==u||null===(t=u[0])||void 0===t?void 0:t.value}):(0,l.jsx)(i.Dropdown,{t:null==e?void 0:e.t,option:u,selected:u.find(e=>e.value===(null==s?void 0:s.value)),optionKey:"label",select:e=>{var t,n,i,o=Digit.SessionStorage.get("citizen.userRequestObject"),r=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(t=>t.tenantId===e.value);if((null==r?void 0:r.length)>0&&(o.info.roles=r,o.info.tenantId=null==e?void 0:e.value),Digit.SessionStorage.set("Employee.tenantId",null==e?void 0:e.value),Digit.UserService.setUser(o),c(e),"undefined"!=typeof window&&null!==(n=window.location)&&void 0!==n&&null!==(n=n.href)&&void 0!==n&&n.includes("/".concat(null===(i=window)||void 0===i?void 0:i.contextPath,"/employee/"))){var l,a,s=(null===(l=location.state)||void 0===l?void 0:l.from)||"/".concat(null===(a=window)||void 0===a?void 0:a.contextPath,"/employee");m(s,{replace:!0})}try{"undefined"!=typeof window&&window.location.reload()}catch(e){console.warn("Failed to reload page:",e)}},freeze:!0,customSelector:(0,l.jsx)("label",{className:"cp",children:null==e?void 0:e.t("TENANT_TENANTS_".concat(null===(n=a(Digit.SessionStorage.get("Employee.tenantId"),".","_"))||void 0===n?void 0:n.toUpperCase()))})})})}},743(e,t,n){"use strict";n.d(t,{A:()=>s});var i=n(6243),o=n(4883),r=n(4989),l=n(5053),a=n(6870);const s=e=>{var{config:t,otp:n,onOtpChange:s,onResend:c,onSelect:u,t:d,error:v,userType:p="citizen",canSubmit:m}=e,[f,g]=(0,o.useState)(30);(0,r.A)(()=>{g(f-1)},f>0?1e3:null);var y=()=>{c(),g(2)};return"employee"===p?(0,a.jsxs)(o.Fragment,{children:[(0,a.jsx)(l.OTPInput,{length:6,onChange:s,value:n}),f>0?(0,a.jsx)(i.CardText,{children:"".concat(d("CS_RESEND_ANOTHER_OTP")," ").concat(f," ").concat(d("CS_RESEND_SECONDS"))}):(0,a.jsx)("p",{className:"card-text-button resend-otp",onClick:y,children:d("CS_RESEND_OTP")}),!v&&(0,a.jsx)(i.CardLabelError,{children:d("CS_INVALID_OTP")})]}):(0,a.jsxs)(i.FormStep,{onSelect:u,config:t,t:d,isDisabled:!(6===(null==n?void 0:n.length)&&m),children:[(0,a.jsx)(l.OTPInput,{length:6,onChange:s,value:n}),f>0?(0,a.jsx)(i.CardText,{children:"".concat(d("CS_RESEND_ANOTHER_OTP")," ").concat(f," ").concat(d("CS_RESEND_SECONDS"))}):(0,a.jsx)("p",{className:"card-text-button",onClick:y,children:d("CS_RESEND_OTP")}),!v&&(0,a.jsx)(i.CardLabelError,{children:d("CS_INVALID_OTP")})]})}},856(e,t,n){"use strict";var i=n(7183);function o(){}function r(){}r.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,r,l){if(l!==i){var a=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 a.name="Invariant Violation",a}}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:r,resetWarningCache:o};return n.PropTypes=n,n}},883(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>c}),n(4883);var i=n(5953),o=n(4442),r=n(5697),l=n(6243),a=n(5660),s=n(6870);const c=e=>{var{state:t={}}=(0,o.useLocation)(),{t:n}=(0,i.useTranslation)(),c=(e.stateInfo,(0,o.useNavigate)()),u={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:()=>{c("/".concat(window.globalPath,"/"))}};return(0,s.jsx)(r.A,{children:(0,s.jsxs)(l.Card,{className:"digit-employee-card customError",children:[(0,s.jsx)(a.A,{showTenant:!1}),(0,s.jsx)(l.CardHeader,{className:"center",children:n(u.infoHeader)}),(0,s.jsx)(l.CardText,{className:"center",children:n(u.infoMessage)}),(0,s.jsx)(l.Button,{className:"customErrorButton",label:n(null==u?void 0:u.buttonInfo),variation:"primary",isSuffix:!0,onClick:e=>{e.preventDefault(),null==u||u.action()}})]})})}},1065(e,t,n){"use strict";n.d(t,{P:()=>i});var i=e=>{var t=Digit.Utils.getConfigModuleName();return Digit.Hooks.useCommonMDMS(e,t,["LoginConfig"],{select:e=>{var n;return{config:null==e||null===(n=e[t])||void 0===n?void 0:n.LoginConfig}},retry:!1})}},1234(e,t,n){"use strict";n.d(t,{AppHome:()=>w,q:()=>S});var i=n(5053),o=n(6243),r=n(4883),l=n.n(r),a=n(5953),s=n(4442),c=n(6870);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach(function(t){v(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function v(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=n(338),m=e=>{var t,n,i,{modules:u,additionalComponent:v}=e,{isLoading:m,data:f}=Digit.Hooks.useAccessControl(),g=Digit.Utils.getMultiRootTenant(),{t:y}=(0,a.useTranslation)(),h=(0,s.useNavigate)(),b=null===(t=Digit)||void 0===t||null===(t=t.ULBService)||void 0===t?void 0:t.getStateId(),[O,x]=(0,r.useState)([{}]),{data:S}=Digit.Hooks.useCustomMDMS(b,"HomeScreenOrder",[{name:"CardsAndLinksOrder"}],{select:e=>{var t;return null==e||null===(t=e.HomeScreenOrder)||void 0===t?void 0:t.CardsAndLinksOrder}}),{data:j,isLoading:_}=Digit.Hooks.useCustomMDMS(b,"SandBoxLanding",[{name:"AdditionalModuleLinks"}],{select:e=>{var t;return null==e||null===(t=e.SandBoxLanding)||void 0===t?void 0:t.AdditionalModuleLinks}});(0,r.useEffect)(()=>{x(S)},[S]);var w=(e,t)=>{if(!e||!t)return null;var n=null==j?void 0:j.find(t=>t.moduleName===e.module),i=null==n?void 0:n[t],o=null==e?void 0:e.links;return(null==o?void 0:o.find(e=>(null==e?void 0:e.displayName)===i))||null},C=e=>{var t,n=null==j?void 0:j.find(t=>t.moduleName===e.module);return null==e||null===(t=e.links)||void 0===t?void 0:t.filter(e=>{var t=e.displayName,i="Configure_master"!==t,o=t!==(null==n?void 0:n.howItWorksLink),r=t!==(null==n?void 0:n.userManualLink);return i&&o&&r})},N=null==f?void 0:f.actions.filter(e=>"card"===e.url&&e.parentModule).reduce((e,t)=>{var n=t.parentModule;e[n]||(e[n]={module:n,kpis:[],icon:t.leftIcon?Digit.Utils.iconRender({iconName:t.leftIcon,iconFill:"white",CustomSVG:o.CustomSVG,Components:p}):"",label:Digit.Utils.locale.getTransformedLocale("".concat(n,"_CARD_HEADER")),links:[]});var i=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)))&&g?n=n.replace("/sandbox-ui/employee","/sandbox-ui/".concat(b,"/employee")):n}(t.navigationURL),r=i.indexOf("?");return e[n].links.push({link:i,icon:t.leftIcon,queryParams:-1===r?null:i.substring(r),label:y(Digit.Utils.locale.getTransformedLocale("".concat(n,"_LINK_").concat(t.displayName))),displayName:t.displayName}),e},{});if(m)return(0,c.jsx)(o.Loader,{page:!1,variant:"PageLoader"});if(!N)return"";i=g?(e=>Object.keys(e).sort((e,t)=>{var n,i;return((null==O||null===(n=O.find(t=>"card"===t.moduleType&&t.name===e))||void 0===n?void 0:n.order)||null)-((null==O||null===(i=O.find(e=>"card"===e.moduleType&&e.name===t))||void 0===i?void 0:i.order)||null)}).reduce((t,n)=>{var i,o=null==e||null===(i=e[n])||void 0===i||null===(i=i.links)||void 0===i?void 0:i.sort((e,t)=>{var i,o,r=null==e?void 0:e.displayName,l=null==t?void 0:t.displayName;return((null==O||null===(i=O.find(e=>"link"===e.moduleType&&e.name==="".concat(n,".").concat(r.replace(/\s+/g,"_"))))||void 0===i?void 0:i.order)||null)-((null==O||null===(o=O.find(e=>"link"===e.moduleType&&e.name==="".concat(n,".").concat(l.replace(/\s+/g,"_"))))||void 0===o?void 0:o.order)||null)});return t[n]=d(d({},e[n]),{},{links:o}),t},{}))(N):N;var E=null===(n=Object.keys(i))||void 0===n?void 0:n.map((e,t)=>{var n,r,l=null===(n=i)||void 0===n?void 0:n[e],a=null==l||null===(r=l.links)||void 0===r?void 0:r.find(e=>"Configure_master"===(null==e?void 0:e.displayName)),s=w(l,"howItWorksLink"),u=w(l,"userManualLink"),v={icon:"SupervisorAccount",moduleName:y(null==l?void 0:l.label),metrics:[],links:Digit.Utils.getMultiRootTenant()?C(l):null==l?void 0:l.links,centreChildren:[(0,c.jsx)("div",{children:y(Digit.Utils.locale.getTransformedLocale("MODULE_CARD_DESC_".concat(e)))}),s&&(0,c.jsx)(o.Button,{variation:"teritiary",label:null==s?void 0:s.label,icon:null==s?void 0:s.icon,type:"button",size:"medium",onClick:()=>window.open(null==s?void 0:s.link,"_blank"),style:{padding:"0px"}})],endChildren:Digit.Utils.getMultiRootTenant()?[a&&(0,c.jsx)(o.Button,{variation:"teritiary",label:null==a?void 0:a.label,icon:null==a?void 0:a.icon,type:"button",size:"medium",onClick:()=>h(null==a?void 0:a.link),style:{padding:"0px"}}),u&&(0,c.jsx)(o.Button,{variation:"teritiary",label:null==u?void 0:u.label,icon:null==u?void 0:u.icon,type:"button",size:"medium",onClick:()=>window.open(null==u?void 0:u.link,"_blank"),style:{padding:"0px"}})]:null};return(0,c.jsx)(o.LandingPageCard,d({buttonSize:"medium"},v))});return(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(o.LandingPageWrapper,{children:l().Children.map(E,e=>l().cloneElement(e))})})},f=n(338),g=e=>{var{question:t,isLabelLink:n,answer:l,type:s,actions:u,content:d,lastIndex:v}=e,[p,m]=(0,r.useState)(!1),{t:g}=(0,a.useTranslation)(),y=Digit.ULBService.getStateId(),h="number"===s?"ol":"ul";return(0,c.jsxs)("div",{className:"faqs border-none",onClick:()=>m(!p),children:[(0,c.jsxs)("div",{className:"faq-question",style:{justifyContent:"space-between",display:"flex"},children:[(0,c.jsx)("span",{children:g(t)}),(0,c.jsx)("span",{className:p?"faqicon rotate":"faqicon",style:{float:"right"},children:(0,c.jsx)(f.ArrowForward,{})})]}),(0,c.jsxs)("div",{className:"faq-answer",style:p?{display:"block"}:{display:"none"},children:[(0,c.jsx)(i.CardSectionSubText,{style:{marginTop:"1rem"},children:g(d)}),(0,c.jsx)("div",{style:{marginTop:"1rem"},children:u&&(0,c.jsx)(h,{children:u.map((e,t)=>(0,c.jsxs)("li",{style:{listStyleType:"ul"===h?"disc":"auto",margin:"8px 0"},children:[n?null!=e&&e.label?(0,c.jsx)(o.Button,{variation:"teritiary",label:g(null==e?void 0:e.label),type:"button",size:"medium",onClick:()=>{if(null!=e&&e.fulllink)window.open(null==e?void 0:e.link,"_blank");else{var t,n="https://".concat(window.location.hostname,"/").concat(null===(t=window)||void 0===t?void 0:t.globalPath,"/").concat(y);window.open("".concat(n,"/").concat(null==e?void 0:e.link),"_blank")}},style:{padding:"0px"}}):null:null!=e&&e.label?(0,c.jsxs)("strong",{children:[g(null==e?void 0:e.label),":"]}):null,g(null==e?void 0:e.description)]},t))})})]}),v?null:(0,c.jsx)("div",{className:"cs-box-border"})]})},y=e=>{var{type:t,title:n,content:o,actions:r,style:l}=e,{t:s}=(0,a.useTranslation)(),u="number"===t?"ol":"ul";return(0,c.jsxs)("div",{children:[(0,c.jsx)(i.CardSectionHeader,{children:s(n)}),(0,c.jsx)(i.CardSectionSubText,{style:{marginTop:"1rem"},children:s(o)}),(0,c.jsx)("div",{style:{marginTop:"1rem"},children:r&&(0,c.jsx)(u,{children:r.map((e,t)=>(0,c.jsxs)("li",{style:{listStyleType:"ul"===u?"disc":"auto",margin:"8px 0"},children:[null!=e&&e.label?(0,c.jsxs)("strong",{children:[s(null==e?void 0:e.label),":"]}):null," ",s(null==e?void 0:e.description)]},t))})})]})},h=e=>{var{key:t,title:n,content:i,faqs:o,type:r}=e,{t:l}=(0,a.useTranslation)();return(0,c.jsx)("div",{style:{width:"100%"},children:(0,c.jsx)("div",{style:{width:"100%"},children:o.map((e,t)=>(0,c.jsx)(g,{question:e.question,answer:e.answer,isLabelLink:e.isLabelLink,type:r,actions:e.answer,content:e.content,lastIndex:t===(null==o?void 0:o.length)-1},"faq_"+t))})})};const b=e=>{var{cardConfig:t}=e,{t:n}=(0,a.useTranslation)();return(0,c.jsxs)(o.Card,{className:"sandbox-guide",style:{width:"25rem",height:"47rem",overflowY:"scroll"},children:[(0,c.jsx)(o.CardHeader,{children:n("GUIDE_TO_SETUP")}),(0,c.jsx)("div",{style:{display:"flex",flexWrap:"wrap"},children:t.map((e,n)=>"faqs"===(null==e?void 0:e.type)?(0,c.jsx)(h,{title:e.title,type:null==e?void 0:e.type,content:e.content,faqs:e.actions},e.id):(0,c.jsxs)(l().Fragment,{children:[(0,c.jsx)(y,{type:null==e?void 0:e.type,title:e.title,content:e.content,actions:e.actions,style:e.style},e.id),n!==(null==t?void 0:t.length)-1&&(0,c.jsx)(i.BreakLine,{style:{width:"100%",border:"1px solid #d6d5d4"}})]}))})]})};var O=["onSelect","formData","control","formState"];const x=e=>{var{onSelect:t,formData:n,control:i,formState:o}=e,{t:r}=(function(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}(e,O),(0,a.useTranslation)()),{isLoading:l,data:s}=Digit.Hooks.useAccessControl(),u=(Digit.Utils.getMultiRootTenant(),Digit.ULBService.getStateId());return(null==s?void 0:s.actions.filter(e=>"card"===e.url&&e.parentModule).reduce((e,t)=>{var n=t.parentModule;e[n]||(e[n]={module:n,label:Digit.Utils.locale.getTransformedLocale("".concat(n,"_CARD_HEADER")),links:[]});var i=Digit.Utils.transformURL(t.navigationURL,u),o=i.indexOf("?");return e[n].links.push({link:-1===o?i:i.substring(0,o),label:r(Digit.Utils.locale.getTransformedLocale("".concat(n,"_LINK_").concat(t.displayName))),queryParams:-1===o?null:i.substring(o),description:r(Digit.Utils.locale.getTransformedLocale("".concat(n,"_LINK_").concat(t.displayName,"_DESCRIPTION")))}),e},{}))?(0,c.jsx)(b,{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"}]}]}):""};var S=(e,t,n)=>{var i=null==e?void 0:e["".concat(t)];i&&i.map(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,r={links:null==i?void 0:i.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(e=>{var t,i,o,{role:l,from:a,loginLink:s,dashoardLink:c}=e;Digit.UserService.hasAccess(l)?null==r||null===(t=r.links)||void 0===t||t.push({link:a,i18nKey:n(c)}):null==r||null===(i=r.links)||void 0===i||i.push({link:"/".concat(null===(o=window)||void 0===o?void 0:o.contextPath,"/citizen/login"),state:{role:"FSM_DSO",from:a},i18nKey:n(s)})}),r},j=e=>{var{modules:t,getCitizenMenu:n,fetchedCitizen:r,isLoading:s}=e,u=[t.filter(e=>{var{code:t}=e;return"Payment"===t})[0],...t.filter(e=>{var{code:t}=e;return"Payment"!==t})],{t:d}=(0,a.useTranslation)();return s?(0,c.jsx)(i.Loader,{}):(0,c.jsx)(l().Fragment,{children:(0,c.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,c.jsx)(o.BackLink,{onClick:()=>window.history.back()}),(0,c.jsx)("div",{className:"citizenAllServiceGrid",children:u.filter(e=>e).map((e,t)=>{var a,s,u,v,{code:p}=e;return r&&(s=r?S(n,p,d):void 0),(null===(a=s)||void 0===a||null===(a=a.links)||void 0===a?void 0:a.length)>0?(0,c.jsx)(i.CitizenHomeCard,{header:d(null===(u=s)||void 0===u?void 0:u.header),links:null===(v=s)||void 0===v||null===(v=v.links)||void 0===v||null===(v=v.filter(e=>null==e?void 0:e.link))||void 0===v?void 0:v.sort((e,t)=>(null==e?void 0:e.orderNumber)-(null==t?void 0:t.orderNumber)),Icon:()=>(e=>{switch(e){case"PT":default:return(0,c.jsx)(o.CustomSVG.PTIcon,{className:"fill-path-primary-main"});case"WS":return(0,c.jsx)(o.CustomSVG.WSICon,{className:"fill-path-primary-main"});case"FSM":return(0,c.jsx)(o.CustomSVG.FSMIcon,{className:"fill-path-primary-main"});case"MCollect":return(0,c.jsx)(o.CustomSVG.MCollectIcon,{className:"fill-path-primary-main"});case"PGR":return(0,c.jsx)(o.CustomSVG.PGRIcon,{className:"fill-path-primary-main"});case"TL":return(0,c.jsx)(o.CustomSVG.TLIcon,{className:"fill-path-primary-main"});case"OBPS":return(0,c.jsx)(o.CustomSVG.OBPSIcon,{className:"fill-path-primary-main"});case"Bills":return(0,c.jsx)(o.CustomSVG.BillsIcon,{className:"fill-path-primary-main"})}})(p),Info:"OBPS"===p?()=>(0,c.jsx)(i.CitizenInfoLabel,{style:{margin:"0px",padding:"10px"},info:d("CS_FILE_APPLICATION_INFO_LABEL"),text:d("BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL")}):null,isInfo:"OBPS"===p}):(0,c.jsx)(l().Fragment,{})})})]})})},_=e=>{var{modules:t,additionalComponent:n}=e;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"employee-app-container digit-home-employee-app",children:(0,c.jsx)(o.LandingPageWrapper,{children:null==t?void 0:t.map((e,t)=>{var{code:n}=e,i=Digit.ComponentRegistryService.getComponent("".concat(n,"Card"))||(()=>(0,c.jsx)(l().Fragment,{}));return(0,c.jsx)(i,{},t)})})}),n&&(null==n?void 0:n.length)>0&&n.map(e=>{var t="string"==typeof e?Digit.ComponentRegistryService.getComponent(e):null;return t?(0,c.jsx)("div",{className:"additional-component-wrapper",children:(0,c.jsx)(t,{})}):null})]})},w=e=>{var{userType:t,modules:n,getCitizenMenu:i,fetchedCitizen:o,isLoading:r,additionalComponent:l}=e;if("citizen"===t)return(0,c.jsx)(j,{modules:n,getCitizenMenu:i,fetchedCitizen:o,isLoading:r});var a=Digit.UserService.hasAccess("SUPERUSER")&&Digit.Utils.getMultiRootTenant();return Digit.Utils.getRoleBasedHomeCard()?(0,c.jsxs)("div",{className:a?"homeWrapper":"",children:[(0,c.jsx)(m,{modules:n,additionalComponent:l}),a&&!window.Digit.Utils.browser.isMobile()?(0,c.jsx)(x,{}):null]}):(0,c.jsx)(_,{modules:n,additionalComponent:l})}},1603(e,t,n){"use strict";n.d(t,{A:()=>v});var i=n(4883),o=n(4442),r=n(6243),l=n(5953),a=n(6870);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}const v=e=>{var t,{moduleCode:n,stateCode:s,userType:u,tenants:v,maxRetries:p=5,retryDelay:m=1500,initialDelay:f=100}=e,[g,y]=(0,i.useState)({module:null,loading:!0,error:null,retryCount:0,initialDelayComplete:!1}),{t:h}=(0,l.useTranslation)();if((0,i.useEffect)(()=>{var e,t,i=function(){var t,o=(t=function*(){try{var t=Digit.ComponentRegistryService.getComponent("".concat(n,"Module"));if(t)y({module:t,loading:!1,error:null,retryCount:0,initialDelayComplete:!0});else if(g.retryCount<p){y(e=>c(c({},e),{},{retryCount:e.retryCount+1}));var o=m*Math.pow(1.5,g.retryCount);e=setTimeout(()=>{i()},o)}else y({module:null,loading:!1,error:'Module "'.concat(n,'" not found after ').concat(p," attempts"),retryCount:g.retryCount,initialDelayComplete:!0})}catch(e){console.error("Error loading module ".concat(n,":"),e),y({module:null,loading:!1,error:e.message,retryCount:g.retryCount,initialDelayComplete:!0})}},function(){var e=this,n=arguments;return new Promise(function(i,o){var r=t.apply(e,n);function l(e){d(r,i,o,l,a,"next",e)}function a(e){d(r,i,o,l,a,"throw",e)}l(void 0)})});return function(){return o.apply(this,arguments)}}();return g.initialDelayComplete?i():t=setTimeout(()=>{y(e=>c(c({},e),{},{initialDelayComplete:!0})),i()},f),()=>{e&&clearTimeout(e),t&&clearTimeout(t)}},[n,g.retryCount,g.initialDelayComplete,p,m,f]),g.loading){var b=g.initialDelayComplete?h("CORE_LOADING_MODULE",{moduleCode:n,defaultValue:"Loading {{moduleCode}} module..."}):h("CORE_INITIALIZING_MODULE",{moduleCode:n,defaultValue:"Initializing {{moduleCode}} module..."});return(0,a.jsxs)("div",{className:"module-loading-container",children:[(0,a.jsx)(r.Loader,{page:!0,variant:"PageLoader",loaderText:b}),g.retryCount>0&&g.initialDelayComplete&&(0,a.jsx)("div",{className:"retry-info",style:{textAlign:"center",marginTop:"1rem",color:"#666"},children:h("CORE_MODULE_RETRY_ATTEMPT",{retryCount:g.retryCount,maxRetries:p,defaultValue:"Retry attempt {{retryCount}}/{{maxRetries}}"})})]})}if(g.error||!g.module)return console.warn("Module loading failed for ".concat(n,":"),g.error),(0,a.jsx)(o.Navigate,{to:"/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/employee/user/error?type=notfound&module=").concat(n,"&reason=").concat(encodeURIComponent(g.error||"Module not found")),replace:!0});var O=g.module;return(0,a.jsx)(O,{stateCode:s,moduleCode:n,userType:u,tenants:v})}},1626(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>g});var i=n(4883),o=n(6243),r=n(5053),l=n(5953),a=n(4442),s=n(5697),c=n(5660),u=n(6177),d=n(6870),v=["UserRequest"];function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function m(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}const g=e=>{var t,n,g,{isLogin:y=!1}=e,{t:h}=(0,l.useTranslation)(),b=(0,a.useNavigate)(),O=(0,a.useLocation)(),[x,S]=(0,i.useState)(null),[j,_]=(0,i.useState)(!1),[w,C]=(0,i.useState)(null),[N,E]=(0,i.useState)((null==O||null===(t=O.state)||void 0===t?void 0:t.data)||{}),[D,P]=(0,i.useState)(!1),{email:I,tenant:T}=O.state||{},{data:A}=Digit.Hooks.useCustomMDMS(T,"SandBoxLanding",[{name:"LandingPageRoles"}],{enabled:!0,staleTime:0,cacheTime:0,select:e=>{var t;return null==e||null===(t=e.SandBoxLanding)||void 0===t?void 0:t.LandingPageRoles}}),L=null==A?void 0:A[0].url,R=[{body:[{type:"component",component:"OtpComponent",key:"OtpComponent",withoutLabel:!0,isMandatory:!1,customProps:{email:I,tenant:T},populators:{required:!0}}]}],M=[{texts:{header:h("SANDBOX_OTP_VERIFICATION"),submitButtonLabel:"CORE_COMMON_SUBMIT"}}],k=()=>{S(null)};(0,i.useEffect)(()=>{var e,t,n;if(w){Digit.SessionStorage.set("citizen.userRequestObject",w);var i=null==w||null===(e=w.info)||void 0===e||null===(e=e.roles)||void 0===e?void 0:e.filter(e=>e.tenantId===Digit.SessionStorage.get("Employee.tenantId"));(null==w||null===(t=w.info)||void 0===t||null===(t=t.roles)||void 0===t?void 0:t.length)>0&&(w.info.roles=i),Digit.UserService.setUser(w),((e,t)=>{var n;if(!Digit.Utils.getMultiRootTenant()){var i=(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",i),localStorage.setItem("Employee.locale",i),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==w?void 0:w.info,null==w?void 0:w.access_token);var o="/".concat(null===(n=window)||void 0===n?void 0:n.globalPath,"/user/setup"),r=((e,t,n,i)=>{var o,r,l,a="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),s=null===(r=window)||void 0===r?void 0:r.contextPath;switch(!0){case"/sandbox-ui/user/otp"===e&&a:return"/".concat(s,"/employee/sandbox/landing");case a&&(null==n||null===(l=n[0])||void 0===l||null===(l=l.rolesForLandingPage)||void 0===l?void 0:l.includes("SUPERUSER")):return"/".concat(s).concat(i);default:return"/".concat(s,"/employee")}})(O.pathname,w,A,L);return y?void b(r):void b({pathname:o},{state:{tenant:T}})}},[w]);var U=function(){var e,t=(e=function*(e){var t,n={username:I,password:null==e||null===(t=e.OtpComponent)||void 0===t?void 0:t.otp,tenantId:T,userType:"EMPLOYEE"};try{var i=yield Digit.UserService.authenticate(n),{UserRequest:o}=i,r=function(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(i,v);Digit.SessionStorage.set("Employee.tenantId",null==o?void 0:o.tenantId),C(function(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){m(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}({info:o},r))}catch(e){var l;S((null==e||null===(l=e.response)||void 0===l||null===(l=l.data)||void 0===l?void 0:l.error_description)||"ES_ERROR_USER_NOT_PERMITTED"==(null==e?void 0:e.message)&&h("ES_ERROR_USER_NOT_PERMITTED")||h("INVALID_LOGIN_CREDENTIALS")),setTimeout(k,5e3)}},function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){f(r,i,o,l,a,"next",e)}function a(e){f(r,i,o,l,a,"throw",e)}l(void 0)})});return function(e){return t.apply(this,arguments)}}();return(0,d.jsxs)(s.A,{children:[(0,d.jsxs)("div",{className:"employeeBackbuttonAlign",children:[(0,d.jsx)(o.BackLink,{onClick:()=>b(-1)})," "]}),(0,d.jsx)(r.FormComposerV2,{onSubmit:U,noBoxShadow:!0,inline:!0,submitInForm:!0,onFormValueChange:(e,t)=>{var n,i=t.OtpComponent;6===(null==i||null===(n=i.otp)||void 0===n?void 0:n.length)?_(!0):_(!1)},isDisabled:!j,config:R,label:M[0].texts.submitButtonLabel,heading:M[0].texts.header,headingStyle:{textAlign:"center"},cardStyle:{maxWidth:"408px",margin:"auto"},className:"sandbox-onboarding-wrapper",children:(0,d.jsx)(c.A,{showTenant:!1})}),x&&(0,d.jsx)(o.Toast,{type:"error",label:h(x),onClose:k}),(0,d.jsxs)("div",{className:"EmployeeLoginFooter",children:[(0,d.jsx)(u.A,{alt:"Powered by DIGIT",src:null===(n=window)||void 0===n||null===(n=n.globalConfigs)||void 0===n||null===(g=n.getConfig)||void 0===g?void 0:g.call(n,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:()=>{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()}})," "]})]})}},1737(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>ke});var i=n(4883),o=n.n(i),r=n(5953),l=n(5053),a=n(6243),s=e=>"checkbox"===e.type,c=e=>e instanceof Date,u=e=>null==e;const d=e=>"object"==typeof e;var v=e=>!u(e)&&!Array.isArray(e)&&d(e)&&!c(e),p=e=>v(e)&&e.target?s(e.target)?e.target.checked:e.target.value:e,m=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),f="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function g(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(f&&(e instanceof Blob||e instanceof FileList)||!n&&!v(e))return e;if(t=n?[]:{},n||(e=>{const t=e.constructor&&e.constructor.prototype;return v(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=g(e[n]));else t=e}return t}var y=e=>Array.isArray(e)?e.filter(Boolean):[],h=e=>void 0===e,b=(e,t,n)=>{if(!t||!v(e))return n;const i=y(t.split(/[,[\].]+?/)).reduce((e,t)=>u(e)?e:e[t],e);return h(i)||i===e?h(e[t])?n:e[t]:i},O=e=>"boolean"==typeof e,x=e=>/^\w*$/.test(e),S=e=>y(e.replace(/["|']|\]/g,"").split(/\.|\[/)),j=(e,t,n)=>{let i=-1;const o=x(t)?[t]:S(t),r=o.length,l=r-1;for(;++i<r;){const t=o[i];let r=n;if(i!==l){const n=e[t];r=v(n)||Array.isArray(n)?n:isNaN(+o[i+1])?{}:[]}if("__proto__"===t)return;e[t]=r,e=e[t]}return e};const _="blur",w="onChange",C="onSubmit",N="all",E="pattern",D="required",P=i.createContext(null),I=()=>i.useContext(P);var T=(e,t,n,i=!0)=>{const o={defaultValues:t._defaultValues};for(const r in e)Object.defineProperty(o,r,{get:()=>{const o=r;return t._proxyFormState[o]!==N&&(t._proxyFormState[o]=!i||N),n&&(n[o]=!0),e[o]}});return o},A=e=>v(e)&&!Object.keys(e).length,L=(e,t,n,i)=>{n(e);const{name:o,...r}=e;return A(r)||Object.keys(r).length>=Object.keys(t).length||Object.keys(r).find(e=>t[e]===(!i||N))},R=e=>Array.isArray(e)?e:[e],M=(e,t,n)=>!e||!t||e===t||R(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e)));function k(e){const t=i.useRef(e);t.current=e,i.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var U=e=>"string"==typeof e,B=(e,t,n,i,o)=>U(e)?(i&&t.watch.add(e),b(n,e,o)):Array.isArray(e)?e.map(e=>(i&&t.watch.add(e),b(n,e))):(i&&(t.watchAll=!0),n);const F=e=>e.render(function(e){const t=I(),{name:n,disabled:o,control:r=t.control,shouldUnregister:l}=e,a=m(r._names.array,n),s=function(e){const t=I(),{control:n=t.control,name:o,defaultValue:r,disabled:l,exact:a}=e||{},s=i.useRef(o);s.current=o,k({disabled:l,subject:n._subjects.values,next:e=>{M(s.current,e.name,a)&&u(g(B(s.current,n._names,e.values||n._formValues,!1,r)))}});const[c,u]=i.useState(n._getWatch(o,r));return i.useEffect(()=>n._removeUnmounted()),c}({control:r,name:n,defaultValue:b(r._formValues,n,b(r._defaultValues,n,e.defaultValue)),exact:!0}),c=function(e){const t=I(),{control:n=t.control,disabled:o,name:r,exact:l}=e||{},[a,s]=i.useState(n._formState),c=i.useRef(!0),u=i.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=i.useRef(r);return d.current=r,k({disabled:o,next:e=>c.current&&M(d.current,e.name,l)&&L(e,u.current,n._updateFormState)&&s({...n._formState,...e}),subject:n._subjects.state}),i.useEffect(()=>(c.current=!0,u.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),T(a,n,u.current,!1)}({control:r,name:n,exact:!0}),u=i.useRef(r.register(n,{...e.rules,value:s,...O(e.disabled)?{disabled:e.disabled}:{}}));return i.useEffect(()=>{const e=r._options.shouldUnregister||l,t=(e,t)=>{const n=b(r._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){const e=g(b(r._options.defaultValues,n));j(r._defaultValues,n,e),h(b(r._formValues,n))&&j(r._formValues,n,e)}return()=>{(a?e&&!r._state.action:e)?r.unregister(n):t(n,!1)}},[n,r,a,l]),i.useEffect(()=>{b(r._fields,n)&&r._updateDisabledField({disabled:o,fields:r._fields,name:n,value:b(r._fields,n)._f.value})},[o,n,r]),{field:{name:n,value:s,...O(o)||c.disabled?{disabled:c.disabled||o}:{},onChange:i.useCallback(e=>u.current.onChange({target:{value:p(e),name:n},type:"change"}),[n]),onBlur:i.useCallback(()=>u.current.onBlur({target:{value:b(r._formValues,n),name:n},type:_}),[n,r]),ref:i.useCallback(e=>{const t=b(r._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})},[r._fields,n])},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!b(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!b(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!b(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!b(c.validatingFields,n)},error:{enumerable:!0,get:()=>b(c.errors,n)}})}}(e));var V=(e,t,n,i,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[i]:o||!0}}:{},G=e=>({isOnSubmit:!e||e===C,isOnBlur:"onBlur"===e,isOnChange:e===w,isOnAll:e===N,isOnTouch:"onTouched"===e}),H=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const z=(e,t,n,i)=>{for(const o of n||Object.keys(e)){const n=b(e,o);if(n){const{_f:e,...r}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],o)&&!i)break;if(e.ref&&t(e.ref,e.name)&&!i)break;z(r,t)}else v(r)&&z(r,t)}}};var W=(e,t,n)=>{const i=R(b(e,n));return j(i,"root",t[n]),j(e,n,i),e},q=e=>"file"===e.type,X=e=>"function"==typeof e,Q=e=>{if(!f)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Z=e=>U(e),Y=e=>"radio"===e.type,K=e=>e instanceof RegExp;const J={value:!1,isValid:!1},$={value:!0,isValid:!0};var ee=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!h(e[0].attributes.value)?h(e[0].value)||""===e[0].value?$:{value:e[0].value,isValid:!0}:$:J}return J};const te={isValid:!1,value:null};var ne=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,te):te;function ie(e,t,n="validate"){if(Z(e)||Array.isArray(e)&&e.every(Z)||O(e)&&!e)return{type:n,message:Z(e)?e:"",ref:t}}var oe=e=>v(e)&&!K(e)?e:{value:e,message:""},re=async(e,t,n,i,o)=>{const{ref:r,refs:l,required:a,maxLength:c,minLength:d,min:p,max:m,pattern:f,validate:g,name:y,valueAsNumber:x,mount:S,disabled:j}=e._f,_=b(t,y);if(!S||j)return{};const w=l?l[0]:r,C=e=>{i&&w.reportValidity&&(w.setCustomValidity(O(e)?"":e||""),w.reportValidity())},N={},P=Y(r),I=s(r),T=P||I,L=(x||q(r))&&h(r.value)&&h(_)||Q(r)&&""===r.value||""===_||Array.isArray(_)&&!_.length,R=V.bind(null,y,n,N),M=(e,t,n,i="maxLength",o="minLength")=>{const l=e?t:n;N[y]={type:e?i:o,message:l,ref:r,...R(e?i:o,l)}};if(o?!Array.isArray(_)||!_.length:a&&(!T&&(L||u(_))||O(_)&&!_||I&&!ee(l).isValid||P&&!ne(l).isValid)){const{value:e,message:t}=Z(a)?{value:!!a,message:a}:oe(a);if(e&&(N[y]={type:D,message:t,ref:w,...R(D,t)},!n))return C(t),N}if(!(L||u(p)&&u(m))){let e,t;const i=oe(m),o=oe(p);if(u(_)||isNaN(_)){const n=r.valueAsDate||new Date(_),l=e=>new Date((new Date).toDateString()+" "+e),a="time"==r.type,s="week"==r.type;U(i.value)&&_&&(e=a?l(_)>l(i.value):s?_>i.value:n>new Date(i.value)),U(o.value)&&_&&(t=a?l(_)<l(o.value):s?_<o.value:n<new Date(o.value))}else{const n=r.valueAsNumber||(_?+_:_);u(i.value)||(e=n>i.value),u(o.value)||(t=n<o.value)}if((e||t)&&(M(!!e,i.message,o.message,"max","min"),!n))return C(N[y].message),N}if((c||d)&&!L&&(U(_)||o&&Array.isArray(_))){const e=oe(c),t=oe(d),i=!u(e.value)&&_.length>+e.value,o=!u(t.value)&&_.length<+t.value;if((i||o)&&(M(i,e.message,t.message),!n))return C(N[y].message),N}if(f&&!L&&U(_)){const{value:e,message:t}=oe(f);if(K(e)&&!_.match(e)&&(N[y]={type:E,message:t,ref:r,...R(E,t)},!n))return C(t),N}if(g)if(X(g)){const e=ie(await g(_,t),w);if(e&&(N[y]={...e,...R("validate",e.message)},!n))return C(e.message),N}else if(v(g)){let e={};for(const i in g){if(!A(e)&&!n)break;const o=ie(await g[i](_,t),w,i);o&&(e={...o,...R(i,o.message)},C(o.message),n&&(N[y]=e))}if(!A(e)&&(N[y]={ref:w,...e},!n))return N}return C(!0),N};function le(e,t){const n=Array.isArray(t)?t:x(t)?[t]:S(t),i=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let i=0;for(;i<n;)e=h(e)?i++:e[t[i++]];return e}(e,n),o=n.length-1,r=n[o];return i&&delete i[r],0!==o&&(v(i)&&A(i)||Array.isArray(i)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!h(e[t]))return!1;return!0}(i))&&le(e,n.slice(0,-1)),e}var ae=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}},se=e=>u(e)||!d(e);function ce(e,t){if(se(e)||se(t))return e===t;if(c(e)&&c(t))return e.getTime()===t.getTime();const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const o of n){const n=e[o];if(!i.includes(o))return!1;if("ref"!==o){const e=t[o];if(c(n)&&c(e)||v(n)&&v(e)||Array.isArray(n)&&Array.isArray(e)?!ce(n,e):n!==e)return!1}}return!0}var ue=e=>"select-multiple"===e.type,de=e=>Q(e)&&e.isConnected,ve=e=>{for(const t in e)if(X(e[t]))return!0;return!1};function pe(e,t={}){const n=Array.isArray(e);if(v(e)||n)for(const n in e)Array.isArray(e[n])||v(e[n])&&!ve(e[n])?(t[n]=Array.isArray(e[n])?[]:{},pe(e[n],t[n])):u(e[n])||(t[n]=!0);return t}function me(e,t,n){const i=Array.isArray(e);if(v(e)||i)for(const i in e)Array.isArray(e[i])||v(e[i])&&!ve(e[i])?h(t)||se(n[i])?n[i]=Array.isArray(e[i])?pe(e[i],[]):{...pe(e[i])}:me(e[i],u(t)?{}:t[i],n[i]):n[i]=!ce(e[i],t[i]);return n}var fe=(e,t)=>me(e,t,pe(t)),ge=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:i})=>h(e)?e:t?""===e?NaN:e?+e:e:n&&U(e)?new Date(e):i?i(e):e;function ye(e){const t=e.ref;if(!(e.refs?e.refs.every(e=>e.disabled):t.disabled))return q(t)?t.files:Y(t)?ne(e.refs).value:ue(t)?[...t.selectedOptions].map(({value:e})=>e):s(t)?ee(e.refs).value:ge(h(t.value)?e.ref.value:t.value,e)}var he=e=>h(e)?e:K(e)?e.source:v(e)?K(e.value)?e.value.source:e.value:e;function be(e,t,n){const i=b(e,n);if(i||x(n))return{error:i,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),r=b(t,i),l=b(e,i);if(r&&!Array.isArray(r)&&n!==i)return{name:n};if(l&&l.type)return{name:i,error:l};o.pop()}return{name:n}}const Oe={mode:C,reValidateMode:w,shouldFocusError:!0};function xe(e={}){let t,n={...Oe,...e},i={submitCount:0,isDirty:!1,isLoading:X(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},o={},r=(v(n.defaultValues)||v(n.values))&&g(n.defaultValues||n.values)||{},l=n.shouldUnregister?{}:g(r),a={action:!1,mount:!1,watch:!1},d={mount:new Set,unMount:new Set,array:new Set,watch:new Set},x=0;const S={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},w={values:ae(),array:ae(),state:ae()},C=G(n.mode),E=G(n.reValidateMode),D=n.criteriaMode===N,P=async e=>{if(S.isValid||e){const e=n.resolver?A((await M()).errors):await k(o,!0);e!==i.isValid&&w.state.next({isValid:e})}},I=(e,t)=>{(S.isValidating||S.validatingFields)&&((e||Array.from(d.mount)).forEach(e=>{e&&(t?j(i.validatingFields,e,t):le(i.validatingFields,e))}),w.state.next({validatingFields:i.validatingFields,isValidating:!A(i.validatingFields)}))},T=(e,t,n,i)=>{const s=b(o,e);if(s){const o=b(l,e,h(n)?b(r,e):n);h(o)||i&&i.defaultChecked||t?j(l,e,t?o:ye(s._f)):Z(e,o),a.mount&&P()}},L=(e,t,n,l,a)=>{let s=!1,c=!1;const u={name:e},d=!!(b(o,e)&&b(o,e)._f&&b(o,e)._f.disabled);if(!n||l){S.isDirty&&(c=i.isDirty,i.isDirty=u.isDirty=F(),s=c!==u.isDirty);const n=d||ce(b(r,e),t);c=!(d||!b(i.dirtyFields,e)),n||d?le(i.dirtyFields,e):j(i.dirtyFields,e,!0),u.dirtyFields=i.dirtyFields,s=s||S.dirtyFields&&c!==!n}if(n){const t=b(i.touchedFields,e);t||(j(i.touchedFields,e,n),u.touchedFields=i.touchedFields,s=s||S.touchedFields&&t!==n)}return s&&a&&w.state.next(u),s?u:{}},M=async e=>{I(e,!0);const t=await n.resolver(l,n.context,((e,t,n,i)=>{const o={};for(const n of e){const e=b(t,n);e&&j(o,n,e._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:i}})(e||d.mount,o,n.criteriaMode,n.shouldUseNativeValidation));return I(e),t},k=async(e,t,o={valid:!0})=>{for(const r in e){const a=e[r];if(a){const{_f:e,...s}=a;if(e){const s=d.array.has(e.name);I([r],!0);const c=await re(a,l,D,n.shouldUseNativeValidation&&!t,s);if(I([r]),c[e.name]&&(o.valid=!1,t))break;!t&&(b(c,e.name)?s?W(i.errors,c,e.name):j(i.errors,e.name,c[e.name]):le(i.errors,e.name))}!A(s)&&await k(s,t,o)}}return o.valid},F=(e,t)=>(e&&t&&j(l,e,t),!ce(ne(),r)),V=(e,t,n)=>B(e,d,{...a.mount?l:h(t)?r:U(e)?{[e]:t}:t},n,t),Z=(e,t,n={})=>{const i=b(o,e);let r=t;if(i){const n=i._f;n&&(!n.disabled&&j(l,e,ge(t,n)),r=Q(n.ref)&&u(t)?"":t,ue(n.ref)?[...n.ref.options].forEach(e=>e.selected=r.includes(e.value)):n.refs?s(n.ref)?n.refs.length>1?n.refs.forEach(e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(r)?!!r.find(t=>t===e.value):r===e.value)):n.refs[0]&&(n.refs[0].checked=!!r):n.refs.forEach(e=>e.checked=e.value===r):q(n.ref)?n.ref.value="":(n.ref.value=r,n.ref.type||w.values.next({name:e,values:{...l}})))}(n.shouldDirty||n.shouldTouch)&&L(e,r,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&te(e)},K=(e,t,n)=>{for(const i in t){const r=t[i],l=`${e}.${i}`,a=b(o,l);!d.array.has(e)&&se(r)&&(!a||a._f)||c(r)?Z(l,r,n):K(l,r,n)}},J=(e,t,n={})=>{const s=b(o,e),c=d.array.has(e),v=g(t);j(l,e,v),c?(w.array.next({name:e,values:{...l}}),(S.isDirty||S.dirtyFields)&&n.shouldDirty&&w.state.next({name:e,dirtyFields:fe(r,l),isDirty:F(e,v)})):!s||s._f||u(v)?Z(e,v,n):K(e,v,n),H(e,d)&&w.state.next({...i}),w.values.next({name:a.mount?e:void 0,values:{...l}})},$=async r=>{a.mount=!0;const s=r.target;let c=s.name,u=!0;const v=b(o,c),m=e=>{u=Number.isNaN(e)||e===b(l,c,e)};if(v){let a,g;const y=s.type?ye(v._f):p(r),h=r.type===_||"focusout"===r.type,N=!((f=v._f).mount&&(f.required||f.min||f.max||f.maxLength||f.minLength||f.pattern||f.validate)||n.resolver||b(i.errors,c)||v._f.deps)||((e,t,n,i,o)=>!o.isOnAll&&(!n&&o.isOnTouch?!(t||e):(n?i.isOnBlur:o.isOnBlur)?!e:!(n?i.isOnChange:o.isOnChange)||e))(h,b(i.touchedFields,c),i.isSubmitted,E,C),T=H(c,d,h);j(l,c,y),h?(v._f.onBlur&&v._f.onBlur(r),t&&t(0)):v._f.onChange&&v._f.onChange(r);const R=L(c,y,h,!1),U=!A(R)||T;if(!h&&w.values.next({name:c,type:r.type,values:{...l}}),N)return S.isValid&&P(),U&&w.state.next({name:c,...T?{}:R});if(!h&&T&&w.state.next({...i}),n.resolver){const{errors:e}=await M([c]);if(m(y),u){const t=be(i.errors,o,c),n=be(e,o,t.name||c);a=n.error,c=n.name,g=A(e)}}else I([c],!0),a=(await re(v,l,D,n.shouldUseNativeValidation))[c],I([c]),m(y),u&&(a?g=!1:S.isValid&&(g=await k(o,!0)));u&&(v._f.deps&&te(v._f.deps),((n,o,r,l)=>{const a=b(i.errors,n),s=S.isValid&&O(o)&&i.isValid!==o;var c;if(e.delayError&&r?(c=()=>((e,t)=>{j(i.errors,e,t),w.state.next({errors:i.errors})})(n,r),t=e=>{clearTimeout(x),x=setTimeout(c,e)},t(e.delayError)):(clearTimeout(x),t=null,r?j(i.errors,n,r):le(i.errors,n)),(r?!ce(a,r):a)||!A(l)||s){const e={...l,...s&&O(o)?{isValid:o}:{},errors:i.errors,name:n};i={...i,...e},w.state.next(e)}})(c,g,a,R))}var f},ee=(e,t)=>{if(b(i.errors,t)&&e.focus)return e.focus(),1},te=async(e,t={})=>{let r,l;const a=R(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await M(e);if(e)for(const n of e){const e=b(t,n);e?j(i.errors,n,e):le(i.errors,n)}else i.errors=t;return t})(h(e)?e:a);r=A(t),l=e?!a.some(e=>b(t,e)):r}else e?(l=(await Promise.all(a.map(async e=>{const t=b(o,e);return await k(t&&t._f?{[e]:t}:t)}))).every(Boolean),(l||i.isValid)&&P()):l=r=await k(o);return w.state.next({...!U(e)||S.isValid&&r!==i.isValid?{}:{name:e},...n.resolver||!e?{isValid:r}:{},errors:i.errors}),t.shouldFocus&&!l&&z(o,ee,e?a:d.mount),l},ne=e=>{const t={...a.mount?l:r};return h(e)?t:U(e)?b(t,e):e.map(e=>b(t,e))},ie=(e,t)=>({invalid:!!b((t||i).errors,e),isDirty:!!b((t||i).dirtyFields,e),error:b((t||i).errors,e),isValidating:!!b(i.validatingFields,e),isTouched:!!b((t||i).touchedFields,e)}),oe=(e,t,n)=>{const r=(b(o,e,{_f:{}})._f||{}).ref,l=b(i.errors,e)||{},{ref:a,message:s,type:c,...u}=l;j(i.errors,e,{...u,...t,ref:r}),w.state.next({name:e,errors:i.errors,isValid:!1}),n&&n.shouldFocus&&r&&r.focus&&r.focus()},ve=(e,t={})=>{for(const a of e?R(e):d.mount)d.mount.delete(a),d.array.delete(a),t.keepValue||(le(o,a),le(l,a)),!t.keepError&&le(i.errors,a),!t.keepDirty&&le(i.dirtyFields,a),!t.keepTouched&&le(i.touchedFields,a),!t.keepIsValidating&&le(i.validatingFields,a),!n.shouldUnregister&&!t.keepDefaultValue&&le(r,a);w.values.next({values:{...l}}),w.state.next({...i,...t.keepDirty?{isDirty:F()}:{}}),!t.keepIsValid&&P()},pe=({disabled:e,name:t,field:n,fields:i,value:o})=>{if(O(e)&&a.mount||e){const r=e?void 0:h(o)?ye(n?n._f:b(i,t)._f):o;j(l,t,r),L(t,r,!1,!1,!0)}},me=(e,t={})=>{let i=b(o,e);const l=O(t.disabled);return j(o,e,{...i||{},_f:{...i&&i._f?i._f:{ref:{name:e}},name:e,mount:!0,...t}}),d.mount.add(e),i?pe({field:i,disabled:t.disabled,name:e,value:t.value}):T(e,!0,t.value),{...l?{disabled:t.disabled}:{},...n.progressive?{required:!!t.required,min:he(t.min),max:he(t.max),minLength:he(t.minLength),maxLength:he(t.maxLength),pattern:he(t.pattern)}:{},name:e,onChange:$,onBlur:$,ref:l=>{if(l){me(e,t),i=b(o,e);const n=h(l.value)&&l.querySelectorAll&&l.querySelectorAll("input,select,textarea")[0]||l,a=(e=>Y(e)||s(e))(n),c=i._f.refs||[];if(a?c.find(e=>e===n):n===i._f.ref)return;j(o,e,{_f:{...i._f,...a?{refs:[...c.filter(de),n,...Array.isArray(b(r,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),T(e,!1,void 0,n)}else i=b(o,e,{}),i._f&&(i._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!m(d.array,e)||!a.action)&&d.unMount.add(e)}}},xe=()=>n.shouldFocusError&&z(o,ee,d.mount),Se=(e,t)=>async r=>{let a;r&&(r.preventDefault&&r.preventDefault(),r.persist&&r.persist());let s=g(l);if(w.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await M();i.errors=e,s=t}else await k(o);if(le(i.errors,"root"),A(i.errors)){w.state.next({errors:{}});try{await e(s,r)}catch(e){a=e}}else t&&await t({...i.errors},r),xe(),setTimeout(xe);if(w.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:A(i.errors)&&!a,submitCount:i.submitCount+1,errors:i.errors}),a)throw a},je=(t,n={})=>{const s=t?g(t):r,c=g(s),u=A(t),v=u?r:c;if(n.keepDefaultValues||(r=s),!n.keepValues){if(n.keepDirtyValues)for(const e of d.mount)b(i.dirtyFields,e)?j(v,e,b(l,e)):J(e,b(v,e));else{if(f&&h(t))for(const e of d.mount){const t=b(o,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Q(e)){const t=e.closest("form");if(t){t.reset();break}}}}o={}}l=e.shouldUnregister?n.keepDefaultValues?g(r):{}:g(v),w.array.next({values:{...v}}),w.values.next({values:{...v}})}d={mount:n.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!S.isValid||!!n.keepIsValid||!!n.keepDirtyValues,a.watch=!!e.shouldUnregister,w.state.next({submitCount:n.keepSubmitCount?i.submitCount:0,isDirty:!u&&(n.keepDirty?i.isDirty:!(!n.keepDefaultValues||ce(t,r))),isSubmitted:!!n.keepIsSubmitted&&i.isSubmitted,dirtyFields:u?{}:n.keepDirtyValues?n.keepDefaultValues&&l?fe(r,l):i.dirtyFields:n.keepDefaultValues&&t?fe(r,t):n.keepDirty?i.dirtyFields:{},touchedFields:n.keepTouched?i.touchedFields:{},errors:n.keepErrors?i.errors:{},isSubmitSuccessful:!!n.keepIsSubmitSuccessful&&i.isSubmitSuccessful,isSubmitting:!1})},_e=(e,t)=>je(X(e)?e(l):e,t);return{control:{register:me,unregister:ve,getFieldState:ie,handleSubmit:Se,setError:oe,_executeSchema:M,_getWatch:V,_getDirty:F,_updateValid:P,_removeUnmounted:()=>{for(const e of d.unMount){const t=b(o,e);t&&(t._f.refs?t._f.refs.every(e=>!de(e)):!de(t._f.ref))&&ve(e)}d.unMount=new Set},_updateFieldArray:(e,t=[],n,s,c=!0,u=!0)=>{if(s&&n){if(a.action=!0,u&&Array.isArray(b(o,e))){const t=n(b(o,e),s.argA,s.argB);c&&j(o,e,t)}if(u&&Array.isArray(b(i.errors,e))){const t=n(b(i.errors,e),s.argA,s.argB);c&&j(i.errors,e,t),((e,t)=>{!y(b(e,t)).length&&le(e,t)})(i.errors,e)}if(S.touchedFields&&u&&Array.isArray(b(i.touchedFields,e))){const t=n(b(i.touchedFields,e),s.argA,s.argB);c&&j(i.touchedFields,e,t)}S.dirtyFields&&(i.dirtyFields=fe(r,l)),w.state.next({name:e,isDirty:F(e,t),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else j(l,e,t)},_updateDisabledField:pe,_getFieldArray:t=>y(b(a.mount?l:r,t,e.shouldUnregister?b(r,t,[]):[])),_reset:je,_resetDefaultValues:()=>X(n.defaultValues)&&n.defaultValues().then(e=>{_e(e,n.resetOptions),w.state.next({isLoading:!1})}),_updateFormState:e=>{i={...i,...e}},_disableForm:e=>{O(e)&&(w.state.next({disabled:e}),z(o,(t,n)=>{const i=b(o,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0,!1))},_subjects:w,_proxyFormState:S,_setErrors:e=>{i.errors=e,w.state.next({errors:i.errors,isValid:!1})},get _fields(){return o},get _formValues(){return l},get _state(){return a},set _state(e){a=e},get _defaultValues(){return r},get _names(){return d},set _names(e){d=e},get _formState(){return i},set _formState(e){i=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:te,register:me,handleSubmit:Se,watch:(e,t)=>X(e)?w.values.subscribe({next:n=>e(V(void 0,t),n)}):V(e,t,!0),setValue:J,getValues:ne,reset:_e,resetField:(e,t={})=>{b(o,e)&&(h(t.defaultValue)?J(e,g(b(r,e))):(J(e,t.defaultValue),j(r,e,g(t.defaultValue))),t.keepTouched||le(i.touchedFields,e),t.keepDirty||(le(i.dirtyFields,e),i.isDirty=t.defaultValue?F(e,g(b(r,e))):F()),t.keepError||(le(i.errors,e),S.isValid&&P()),w.state.next({...i}))},clearErrors:e=>{e&&R(e).forEach(e=>le(i.errors,e)),w.state.next({errors:e?i.errors:{}})},unregister:ve,setError:oe,setFocus:(e,t={})=>{const n=b(o,e),i=n&&n._f;if(i){const e=i.refs?i.refs[0]:i.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:ie}}var Se=n(6870);const je=e=>{var{register:t,control:n,reset:i,tenantId:o,t:r,previousPage:l,formState:s,isLoading:c}=e,u=window.Digit.Utils.browser.isMobile();return(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsxs)(a.SearchField,{className:"pt-form-field",children:[(0,Se.jsx)("label",{children:r("AUDIT_FROM_DATE_LABEL")}),(0,Se.jsx)(F,{render:e=>(0,Se.jsx)(a.DatePicker,{date:e.value,onChange:e.onChange}),name:"fromDate",control:n})]}),(0,Se.jsxs)(a.SearchField,{className:"pt-form-field",children:[(0,Se.jsx)("label",{children:r("AUDIT_TO_DATE_LABEL")}),(0,Se.jsx)(F,{render:e=>(0,Se.jsx)(a.DatePicker,{date:e.value,onChange:e.onChange}),name:"toDate",control:n})]}),(0,Se.jsx)(a.SearchField,{className:"pt-search-action-submit",children:(0,Se.jsx)(a.Button,{style:{marginTop:u?"510px":"25px",marginLeft:u?"0":"-30px",maxWidth:u?"100%":"240px"},label:r("ES_COMMON_APPLY"),submit:!0})})]})};var _e=["currentlyActiveMobileModal","searchFormFieldsComponentProps","tenantId"],we=["currentlyActiveMobileModal","searchFormFieldsComponentProps","tenantId"];function Ce(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(n),!0).forEach(function(t){De(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ne(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function De(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Pe=e=>{var t,{Controller:n,register:r,control:l,t:s,reset:c,previousPage:u,handleSubmit:d,tenantId:v,data:p,onSubmit:m,isLoading:f}=e,[g,y]=(0,i.useState)([]),h=e=>(0,Se.jsx)("div",{onClick:e.onClick,children:(0,Se.jsx)(a.DownloadBtnCommon,{})});(0,i.useEffect)(()=>{(null==p?void 0:p.length)>0&&y([null==p?void 0:p.map(e=>{var t={};return t[s("AUDIT_DATE_LABEL")]=b(null==e?void 0:e.timestamp),t[s("AUDIT_TIME_LABEL")]=O(null==e?void 0:e.timestamp),t[s("AUDIT_DATAVIEWED_LABEL")]=(null==e?void 0:e.dataView[0])+","+(null==e?void 0:e.dataView[1]),t[s("AUDIT_DATAVIEWED_BY_LABEL")]=null==e?void 0:e.dataViewedBy,t[s("AUDIT_ROLE_LABEL")]=null==e?void 0:e.roles.map(e=>e.name).join(","),Ee({},t)})])},[p]);var b=e=>{if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getMonth()+1,i=t.getDate(),o=t.getFullYear();return n=(n>9?"":"0")+n,"".concat(i=(i>9?"":"0")+i,"/").concat(n,"/").concat(o)},O=e=>{if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getHours(),i=t.getMinutes(),o=n>12?"PM":"AM";return i=(i>9?"":"0")+i,"".concat(n=((n=n>12?n-12:n)>9?"":"0")+n,":").concat(i," ").concat(o)},[x,S]=(0,i.useReducer)(function(e,t){switch(t.type){case"set":return t.payload;case"remove":return!1}},!1),j=()=>{S({type:"remove"})},_=()=>(0,Se.jsx)("div",{className:"InboxMobilePopupCloseButtonWrapper",onClick:j,children:(0,Se.jsx)(a.CloseSvg,{})}),w={Controller:n,register:r,control:l,t:s,reset:c,previousPage:u},C=(0,i.useCallback)(e=>{var{currentlyActiveMobileModal:t,searchFormFieldsComponentProps:n,tenantId:i}=e;return(e=>{var{currentlyActiveMobileModal:t,searchFormFieldsComponentProps:n,tenantId:i}=e,o=Ce(e,_e),{closeMobilePopupModal:r}=o;return"SearchFormComponent"===t?(0,Se.jsxs)(a.SearchForm,Ee(Ee({},o),{},{children:[(0,Se.jsx)(_,{}),(0,Se.jsx)("div",{className:"MobilePopupHeadingWrapper",children:(0,Se.jsxs)("h2",{children:[s("PRIVACY_AUDIT_REPORT"),":"]})}),(0,Se.jsx)(je,Ee(Ee({},n),{},{closeMobilePopupModal:r,tenantId:i,t:s}))]})):(0,Se.jsx)("span",{})})(Ee({currentlyActiveMobileModal:t,searchFormFieldsComponentProps:n,tenantId:i},Ce(e,we)))},[x]),N=[];null==p||null===(t=p.roles)||void 0===t||t.forEach(e=>{N.push(null==e?void 0:e.name)});var E=(0,i.useMemo)(()=>null!=p&&p.display||""===p?[]:null==p?void 0:p.map(e=>{var t;return{[s("AUDIT_DATE_LABEL")]:b(e.timestamp),[s("AUDIT_TIME_LABEL")]:O(e.timestamp),[s("AUDIT_DATAVIEWED_LABEL")]:e.dataView[0]+","+e.dataView[1],[s("AUDIT_DATAVIEWED_BY_LABEL")]:e.dataViewedBy,[s("AUDIT_ROLE_LABEL")]:null===(t=e.roles.slice(0,3))||void 0===t?void 0:t.map(e=>e.name).join(",")}}),[p]);return(0,Se.jsxs)(o().Fragment,{children:[(0,Se.jsx)(a.BackButton,{}),(0,Se.jsx)("div",{className:"sideContent",style:{marginLeft:"70%",marginTop:"-12%"},children:(0,Se.jsx)(h,{className:"mrlg cursorPointer",onClick:()=>(e=>{if(void 0!==(null==e?void 0:e[0]))return Digit.Download.Excel(null==e?void 0:e[0],"AuditReport")})(g)})}),(0,Se.jsxs)(a.HeaderComponent,{children:[s("PRIVACY_AUDIT_REPORT"),":"]}),(0,Se.jsx)("div",{className:"digit-search-box",children:(0,Se.jsx)(a.SearchAction,{text:s("ES_COMMON_SEARCH"),handleActionClick:()=>S({type:"set",payload:"SearchFormComponent"}),tenantId:v,t:s})}),x?(0,Se.jsx)(a.PopUp,{children:(0,Se.jsx)(C,{onSubmit:e=>{S({type:"remove"}),m(e)},handleSubmit:d,id:"search-form",className:"rm-mb form-field-flex-one inboxPopupMobileWrapper",searchFormFieldsComponentProps:w,currentlyActiveMobileModal:x,closeMobilePopupModal:j,tenantId:v})}):null,f&&(0,Se.jsx)(a.Loader,{}),(0,Se.jsx)(a.DetailsCard,{data:E})]})};function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Te(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ae=e=>{var{tenantId:t,t:n,onSubmit:r,data:s,count:c}=e,u=Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{offset:0,limit:5,sortOrder:"DESC"},{register:d,control:v,handleSubmit:p,setValue:m,getValues:f,reset:g}=function(e={}){const t=i.useRef(),n=i.useRef(),[o,r]=i.useState({isDirty:!1,isValidating:!1,isLoading:X(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:X(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...xe(e),formState:o});const l=t.current.control;return l._options=e,k({subject:l._subjects.state,next:e=>{L(e,l._proxyFormState,l._updateFormState,!0)&&r({...l._formState})}}),i.useEffect(()=>l._disableForm(e.disabled),[l,e.disabled]),i.useEffect(()=>{if(l._proxyFormState.isDirty){const e=l._getDirty();e!==o.isDirty&&l._subjects.state.next({isDirty:e})}},[l,o.isDirty]),i.useEffect(()=>{e.values&&!ce(e.values,n.current)?(l._reset(e.values,l._options.resetOptions),n.current=e.values,r(e=>({...e}))):l._resetDefaultValues()},[e.values,l]),i.useEffect(()=>{e.errors&&l._setErrors(e.errors)},[e.errors,l]),i.useEffect(()=>{l._state.mount||(l._updateValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),i.useEffect(()=>{e.shouldUnregister&&l._subjects.values.next({values:l._getWatch()})},[e.shouldUnregister,l]),t.current.formState=T(o,l),t.current}({defaultValues:u}),y=e=>{if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getMonth()+1,i=t.getDate(),o=t.getFullYear();return n=(n>9?"":"0")+n,"".concat(i=(i>9?"":"0")+i,"/").concat(n,"/").concat(o)},h=e=>{if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getHours(),i=t.getMinutes(),o=n>12?"PM":"AM";return i=(i>9?"":"0")+i,"".concat(n=((n=n>12?n-12:n)>9?"":"0")+n,":").concat(i," ").concat(o)},[b,O]=(0,i.useState)([]),x=e=>(0,Se.jsx)("div",{onClick:e.onClick,children:(0,Se.jsx)(l.DownloadBtnCommon,{})});(0,i.useEffect)(()=>{d("offset",0),d("limit",5),d("sortOrder","DESC")},[d]),(0,i.useEffect)(()=>{(null==s?void 0:s.length)>0&&O([null==s?void 0:s.map(e=>{var t={};return t[n("AUDIT_DATE_LABEL")]=y(null==e?void 0:e.timestamp),t[n("AUDIT_TIME_LABEL")]=h(null==e?void 0:e.timestamp),t[n("AUDIT_DATAVIEWED_LABEL")]=(null==e?void 0:e.dataView[0])+","+(null==e?void 0:e.dataView[1]),t[n("AUDIT_DATAVIEWED_BY_LABEL")]=null==e?void 0:e.dataViewedBy,t[n("AUDIT_ROLE_LABEL")]=null==e?void 0:e.roles.map(e=>e.name).join(","),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach(function(t){Te(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},t)})])},[s]);var S=(0,i.useCallback)(e=>{0!==e.length&&(m("sortBy",e.id),m("sortOrder",e.desc?"DESC":"ASC"))},[]);function j(){m("offset",f("offset")-f("limit")),p(r)()}var _=window.Digit.Utils.browser.isMobile();if(_)return(0,Se.jsx)(Pe,{Controller:F,register:d,control:v,t:n,reset:g,previousPage:j,handleSubmit:p,tenantId:t,data:s,onSubmit:r});var w=e=>(0,Se.jsx)("span",{className:"cell-text",children:e}),C=(0,i.useMemo)(()=>[{Header:n("AUDIT_DATE_LABEL"),disableSortBy:!0,accessor:e=>{var t="NA"===e.timestamp?n("WS_NA"):y(e.timestamp);return w("".concat(t))}},{Header:n("AUDIT_TIME_LABEL"),disableSortBy:!0,accessor:e=>{var t="NA"===e.timestamp?n("WS_NA"):h(e.timestamp);return w("".concat(t))}},{Header:n(_?"AUDIT_DATAVIEWED_LABEL":"AUDIT_DATAVIEWED_PRIVACY"),disableSortBy:!0,accessor:e=>w("".concat(null==e?void 0:e.dataView))},{Header:n(_?"AUDIT_DATAVIEWED_BY_LABEL":"AUDIT_DATAVIEWED_BY_PRIVACY"),disableSortBy:!0,accessor:e=>w("".concat(null==e?void 0:e.dataViewedBy))},{Header:n("AUDIT_ROLE_LABEL"),disableSortBy:!0,accessor:e=>{var t;return w("".concat(null==e||null===(t=e.roles.slice(0,3))||void 0===t?void 0:t.map(e=>e.name)))}}],[]);return(0,Se.jsxs)(o().Fragment,{children:[(0,Se.jsxs)("div",{style:{marginRight:"-70px"},children:[" ",(0,Se.jsx)(a.BackButton,{})," "]}),(0,Se.jsxs)("div",{style:{marginTop:"30px",marginLeft:"30px"},children:[" ",(0,Se.jsx)(a.HeaderComponent,{children:n("PRIVACY_AUDIT_REPORT")})," "]}),(0,Se.jsx)(a.SearchForm,{className:"audit-card",onSubmit:r,handleSubmit:p,children:(0,Se.jsx)(je,{register:d,control:v,reset:g,tenantId:t,t:n,previousPage:j})}),(0,Se.jsx)("div",{style:{marginTop:"240px",marginLeft:"-55%",maxWidth:"80%",marginRight:"52px"},children:null!=s&&s.display?(0,Se.jsx)("div",{style:{marginTop:"20x",width:"1025px",marginLeft:"25px",backgroundColor:"white",height:"60px"},children:n(s.display).split("\\n").map((e,t)=>(0,Se.jsx)("p",{style:{textAlign:"center"},children:e},t))}):""!==s?(0,Se.jsxs)("div",{style:{backgroundColor:"white",marginRight:"-30px",marginLeft:"30px"},children:[(0,Se.jsx)("div",{className:"sideContent",style:{float:"right",padding:"10px 30px"},children:(0,Se.jsx)(x,{className:"mrlg cursorPointer",onClick:()=>(e=>{if(void 0!==(null==e?void 0:e[0]))return Digit.Download.Excel(null==e?void 0:e[0],"AuditReport")})(b)})}),(0,Se.jsx)(l.Table,{t:n,data:s,totalRecords:c,columns:C,getCellProps:e=>({style:{minWidth:e.column.Header===n("ES_INBOX_APPLICATION_NO")?"240px":"",padding:"20px 18px",fontSize:"16px"}}),onPageSizeChange:function(e){m("limit",Number(e.target.value)),p(r)()},currentPage:f("offset")/f("limit"),onNextPage:function(){m("offset",f("offset")+f("limit")),p(r)()},onPrevPage:j,manualPagination:!1,pageSizeLimit:f("limit"),onSort:S,disableSort:!1,sortParams:[{id:f("sortBy"),desc:"DESC"===f("sortOrder")}]})]}):(0,Se.jsx)(a.Loader,{})})]})};function Le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(n),!0).forEach(function(t){Me(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Le(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Me(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ke=e=>{var t,n,{path:o}=e,{t:l}=(0,r.useTranslation)(),a=Digit.ULBService.getCitizenCurrentTenant(),[s,c]=(0,i.useState)({}),u=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})/),i=new Date(Date.UTC(n[1],n[2]-1,n[3]));return i.setMinutes(i.getMinutes()+i.getTimezoneOffset()),"dayend"===t&&(i.setHours(i.getHours()+24),i.setSeconds(i.getSeconds()-1)),i.getTime()}catch(t){return e}};(0,i.useEffect)(()=>{var e=Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{};if(e){var t=Re({},e);c(Object.keys(t).filter(e=>t[e]).reduce((e,n)=>Re(Re({},e),{},{[n]:"object"==typeof t[n]?t[n].code:t[n]}),{}))}},[]);var d={enabled:!!(s&&Object.keys(s).length>0)},v=Re({},s),{isLoading:p,data:m}=Digit.Hooks.useAudit({tenantId:a,filters:Re({},v),config:d});return(0,Se.jsx)(Ae,{t:l,tenantId:a,onSubmit:function(e){Digit.SessionStorage.set("AUDIT_APPLICATION_DETAIL",{offset:0,limit:5,sortBy:"commencementDate",sortOrder:"DESC"});var t=Re(Re({},e),{},{fromDate:u(null==e?void 0:e.fromDate),toDate:u(null==e?void 0:e.toDate)});c(Object.keys(t).filter(e=>t[e]).reduce((e,n)=>Re(Re({},e),{},{[n]:(t[n],t[n])}),{}))},data:p?"":(null==m||null===(t=m.ElasticSearchData)||void 0===t?void 0:t.length)>0?null==m?void 0:m.ElasticSearchData:{display:"ES_COMMON_NO_DATA"},count:null==m||null===(n=m.ElasticSearchData)||void 0===n?void 0:n.length})}},1954(e){"use strict";e.exports=s},2148(e){"use strict";e.exports=o},2161(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),r=t[1],l=t[2],a=t[3]||"",s={};return s.inverse=!!r&&"not"===r.toLowerCase(),s.type=l?l.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],s.expressions=a.map(function(e){var t=e.match(i),n=t[1].toLowerCase().match(o);return{modifier:n[1],feature:n[2],value:t[2]}}),s})}(e).some(function(e){var n=e.inverse,i="all"===e.type||t.type===e.type;if(i&&n||!i&&!n)return!1;var o=e.expressions.every(function(e){var n=e.feature,i=e.modifier,o=e.value,r=t[n];if(!r)return!1;switch(n){case"orientation":case"scan":return r.toLowerCase()===o.toLowerCase();case"width":case"height":case"device-width":case"device-height":o=c(o),r=c(r);break;case"resolution":o=s(o),r=s(r);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":o=a(o),r=a(r);break;case"grid":case"color":case"color-index":case"monochrome":o=parseInt(o,10)||1,r=parseInt(r,10)||0}switch(i){case"min":return r>=o;case"max":return r<=o;default:return r===o}});return o&&!n||!o&&n})};var n=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,i=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,o=/^(?:(min|max)-)?(.+)/,r=/(em|rem|px|cm|mm|in|pt|pc)?$/,l=/(dpi|dpcm|dppx)?$/;function a(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function s(e){var t=parseFloat(e);switch(String(e).match(l)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function c(e){var t=parseFloat(e);switch(String(e).match(r)[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}}},2247(e){"use strict";e.exports=c},2339(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(6243),o=n(5053),r=n(4883),l=n(5953),a=n(6870);const s=e=>{var t,n,{module:s}=e,c=Digit.UserService.getUser(),{t:u}=((null==c||null===(t=c.info)||void 0===t?void 0:t.tenantId)||Digit.ULBService.getCurrentTenantId(),(0,l.useTranslation)()),d=Digit.SessionStorage.get("initData").stateInfo,v=Digit.StoreData.getCurrentLanguage(),[p,m]=(0,r.useState)(v),[f,g]=(0,r.useState)(!1),[y,h]=(0,r.useState)(""),b=()=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.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"})}),{isLoading:O,data:x}=Digit.Hooks.useGetHowItWorksJSON(Digit.ULBService.getStateId()),S=null==x||null===(n=x.MdmsRes["common-masters"])||void 0===n||null===(n=n.howItWorks[0])||void 0===n?void 0:n["".concat(s)];return O?(0,a.jsx)(i.Loader,{}):(0,a.jsx)(r.Fragment,{children:(0,a.jsxs)("div",{className:"how-it-works-page",children:[(0,a.jsx)(i.BackButton,{}),(0,a.jsx)("div",{className:"how-it-works-page-header",children:(0,a.jsx)(i.HeaderComponent,{children:u(S.screenHeader?S.screenHeader:"HOW_IT_WORKS")})}),(0,a.jsx)("div",{className:"language-selector",style:{margin:"10px"},children:[{label:"ENGLISH",value:"en_IN"},{label:"हिंदी",value:"hi_IN"}].map((e,t)=>(0,a.jsx)("div",{className:"language-button-container",children:(0,a.jsx)(o.CustomButton,{selected:e.value===p,text:e.label,onClick:()=>(e=>{m(e.value),Digit.LocalizationService.changeLanguage(e.value,d.code)})(e)})},t))}),S.videosJson.map((e,t)=>(0,a.jsx)("div",{children:(0,a.jsxs)("div",{className:"WhatsNewCard",style:{float:"left",position:"relative",width:"100%",marginBottom:10},children:[(0,a.jsx)("div",{className:"video-icon",onClick:()=>{return t=e,h("hi_IN"===p?t.hi_IN:t.en_IN),void g(!0);var t},children:(0,a.jsx)("div",{className:"vid-svg",children:(0,a.jsx)(b,{})})}),(0,a.jsxs)("div",{className:"how-it-works-header-description",children:[(0,a.jsx)("h2",{children:u(e.headerLabel)}),(0,a.jsx)("p",{children:u(e.description)})]})]})})),S.pdfHeader&&S.pdfDesc&&(0,a.jsx)("div",{className:"WhatsNewCard",style:{position:"relative",width:"100%",marginBottom:10,display:"inline-block"},children:(0,a.jsxs)("div",{className:"how-it-works-pdf-section",children:[(0,a.jsxs)("div",{className:"pdf-icon-header-desc",children:[(0,a.jsx)("div",{className:"pdf-icon",children:(0,a.jsx)(i.PDFSvg,{})}),(0,a.jsxs)("div",{className:"pdf-header-desc",children:[(0,a.jsx)("h2",{children:u(S.pdfHeader)}),(0,a.jsx)("p",{children:u(S.pdfDesc)})]})]}),(0,a.jsx)("div",{className:"download-icon",children:(0,a.jsx)(i.DownloadImgIcon,{})})]})}),f&&(0,a.jsxs)("div",{className:"how-it-works-video-play",children:[(0,a.jsx)("div",{className:"close-button",children:(0,a.jsx)(i.CloseSvg,{onClick:()=>{g(!1)}})}),(0,a.jsx)("video",{width:500,height:500,controls:!0,autoPlay:!0,children:(0,a.jsx)("source",{src:y,type:"video/mp4"})})]})]})})}},2346(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(6243),o=n(4883),r=n.n(o),l=n(5953),a=n(6870);const s=e=>{var t,n,o,s,c,u,d,v,p,m,f,g,y,h,b,{moduleCode:O}=e,{t:x}=(0,l.useTranslation)(),S=Digit.ULBService.getCitizenCurrentTenant(),{isLoading:j,data:_}=Digit.Hooks.useStaticData(Digit.ULBService.getStateId()),{isLoading:w,error:C,data:N,isSuccess:E}=Digit.Hooks.useDynamicData({moduleCode:O,tenantId:S,filters:{},t:x}),D=e=>{var{module:t,styles:n}=e;switch(t){case"TL":default:return(0,a.jsx)(i.CaseIcon,{className:"fill-path-primary-main",styles:n});case"PT":return(0,a.jsx)(i.PTIcon,{className:"fill-path-primary-main",styles:n});case"MCOLLECT":return(0,a.jsx)(i.MCollectIcon,{className:"fill-path-primary-main",styles:n});case"PGR":return(0,a.jsx)(i.ComplaintIcon,{className:"fill-path-primary-main",styles:n})}},P=null==_||null===(t=_.MdmsRes["common-masters"])||void 0===t||null===(t=t.StaticData[0])||void 0===t?void 0:t["".concat(O)],I=e=>{var{module:t}=e;switch(t){case"PT":case"WS":return(0,a.jsx)("span",{className:"timerIcon",children:(0,a.jsx)(i.TimerIcon,{})});default:return null}},T=e=>{var{module:t}=e;switch(t){case"PT":return(0,a.jsx)("span",{className:"rupeeSymbol",children:(0,a.jsx)(i.RupeeSymbol,{})});case"WS":return(0,a.jsx)("span",{className:"timerIcon",children:(0,a.jsx)(i.TimerIcon,{})});default:return null}},A=e=>{switch(e){case"TL":case"PT":case"MCOLLECT":return{staticCommonContent:x("COMMON_VALIDITY"),validity:(null==P?void 0:P.validity)+("1"===(null==P?void 0:P.validity)?x("COMMON_DAY"):x("COMMON_DAYS"))};case"PGR":return{staticCommonContent:x("ACTION_TEST_COMPLAINT_TYPES")};case"OBPS":return{staticCommonContent:x("BUILDING_PLAN_PERMIT_VALIDITY"),validity:(null==P?void 0:P.validity)+" "+("1"===(null==P?void 0:P.validity)?x("COMMON_DAY"):x("COMMON_DAYS"))};default:return{staticCommonContent:""}}},L=e=>{switch(e){case"PT":return{staticDataOne:(null==P?void 0:P.staticDataOne)+" "+x("COMMON_DAYS"),staticDataOneHeader:x("APPLICATION_PROCESSING_TIME"),staticDataTwo:null==P?void 0:P.staticDataTwo,staticDataTwoHeader:x("APPLICATION_PROCESSING_FEE")};case"WS":return{staticDataOne:"",staticDataOneHeader:x("PAY_WATER_CHARGES_BY")+" "+(null==P?void 0:P.staticDataOne)+" "+x("COMMON_DAYS")+" "+x("OF_BILL_GEN_TO_AVOID_LATE_FEE"),staticDataTwo:(null==P?void 0:P.staticDataTwo)+" "+x("COMMON_DAYS"),staticDataTwoHeader:x("APPLICATION_PROCESSING_TIME")};default:return{}}};return j||w?(0,a.jsx)(i.Loader,{}):P?(0,a.jsxs)(r().Fragment,{children:[P&&null!=P&&P.payViaWhatsApp?(0,a.jsx)(i.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"},children:(0,a.jsxs)("div",{className:"pay-whatsapp-card",onClick:()=>{return e=null==P?void 0:P.payViaWhatsApp,void window.open(e);var e},children:[(0,a.jsx)("div",{className:"pay-whatsapp-text",children:x("PAY_VIA_WHATSAPP")}),(0,a.jsx)("div",{className:"whatsAppIconG",children:(0,a.jsx)(i.WhatsappIconGreen,{})})]})}):null,P&&null!=P&&P.helpline?(0,a.jsxs)(i.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"},children:[(0,a.jsxs)("div",{className:"static-home-Card",children:[(0,a.jsx)("div",{className:"static-home-Card-header",children:x("CALL_CENTER_HELPLINE")}),(0,a.jsx)("div",{className:"helplineIcon",children:(0,a.jsx)(i.HelpLineIcon,{})})]}),(0,a.jsxs)("div",{className:"call-center-card-text",children:[null!=P&&null!==(n=P.helpline)&&void 0!==n&&n.contactOne?(0,a.jsx)("div",{className:"call-center-card-content",children:(0,a.jsx)("a",{href:"tel:".concat(null==P||null===(o=P.helpline)||void 0===o?void 0:o.contactOne),children:null==P||null===(s=P.helpline)||void 0===s?void 0:s.contactOne})}):null,null!=P&&null!==(c=P.helpline)&&void 0!==c&&c.contactTwo?(0,a.jsx)("div",{className:"call-center-card-content",children:(0,a.jsx)("a",{href:"tel:".concat(null==P||null===(u=P.helpline)||void 0===u?void 0:u.contactTwo),children:null==P||null===(d=P.helpline)||void 0===d?void 0:d.contactTwo})}):null]})]}):null,P&&null!=P&&P.serviceCenter?(0,a.jsxs)(i.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"},children:[(0,a.jsxs)("div",{className:"static-home-Card",children:[(0,a.jsx)("div",{className:"static-home-Card-header",children:x("CITIZEN_SERVICE_CENTER")}),(0,a.jsx)("div",{className:"serviceCentrIcon",children:(0,a.jsx)(i.ServiceCenterIcon,{})})]}),(0,a.jsx)("div",{className:"service-center-details-card",children:(0,a.jsx)("div",{className:"service-center-details-text",children:null==P?void 0:P.serviceCenter})}),null!=P&&P.viewMapLocation?(0,a.jsx)("div",{className:"link",children:(0,a.jsx)("a",{href:null==P?void 0:P.viewMapLocation,children:x("VIEW_ON_MAP")})}):null]}):(0,a.jsx)("div",{}),(0,a.jsxs)(i.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"},children:[C||null==N||null===(null==N?void 0:N.dynamicDataOne)?(0,a.jsx)("div",{}):(0,a.jsx)("div",{className:"dynamicDataCard",children:(0,a.jsxs)("div",{className:"dynamicData",children:[(0,a.jsx)(D,{module:O,styles:{width:"24px",height:"24px"}}),(0,a.jsx)("span",{className:"dynamicData-content",children:null==N?void 0:N.dynamicDataOne})]})}),C||null==N||null===(null==N?void 0:N.dynamicDataTwo)?(0,a.jsx)("div",{}):(0,a.jsx)("div",{className:"dynamicDataCard",children:(0,a.jsxs)("div",{className:"dynamicData",children:[(0,a.jsx)(D,{module:O,styles:{width:"24px",height:"24px"}}),(0,a.jsx)("span",{className:"dynamicData-content",children:null==N?void 0:N.dynamicDataTwo})]})}),P&&null!=P&&P.staticDataOne?(0,a.jsx)("div",{className:"staticDataCard",children:(0,a.jsxs)("div",{className:"staticData",children:[(0,a.jsx)(I,{module:O}),(0,a.jsxs)("span",{className:"static-data-content",children:[(0,a.jsx)("span",{className:"static-data-content-first",style:{marginTop:""===(null===(v=L(O))||void 0===v?void 0:v.staticDataOne)?"8px":"unset"},children:null===(p=L(O))||void 0===p?void 0:p.staticDataOneHeader}),(0,a.jsx)("span",{className:"static-data-content-second",children:"".concat(null===(m=L(O))||void 0===m?void 0:m.staticDataOne)})]})]})}):(0,a.jsx)("div",{}),P&&null!=P&&P.staticDataTwo?(0,a.jsx)("div",{className:"staticDataCard",children:(0,a.jsxs)("div",{className:"staticData",children:[(0,a.jsx)(T,{module:O}),(0,a.jsxs)("span",{className:"static-data-content",children:[(0,a.jsx)("span",{className:"static-data-content-first",children:null===(f=L(O))||void 0===f?void 0:f.staticDataTwoHeader}),(0,a.jsx)("span",{className:"static-data-content-second",children:null===(g=L(O))||void 0===g?void 0:g.staticDataTwo})]})]})}):(0,a.jsx)("div",{}),P&&null!=P&&P.validity?(0,a.jsx)("div",{className:"staticDataCard",children:(0,a.jsxs)("div",{className:"staticData",children:[(0,a.jsx)("span",{className:"validityIcon",children:(0,a.jsx)(i.ValidityTimeIcon,{})}),(0,a.jsxs)("span",{className:"static-data-content",children:[(0,a.jsx)("span",{className:"static-data-content-first",children:null===(y=A(O))||void 0===y?void 0:y.staticCommonContent}),(0,a.jsx)("span",{className:"static-data-content-second",children:null===(h=A(O))||void 0===h?void 0:h.validity})]})]})}):(0,a.jsx)("div",{}),C||null==N||null==N||!N.staticData||null===(null==N?void 0:N.staticData)?(0,a.jsx)("div",{}):(0,a.jsx)("div",{className:"staticDataCard",children:(0,a.jsxs)("div",{className:"staticData",children:["PGR"===O?(0,a.jsx)(D,{module:O,styles:{width:"24px",height:"24px",marginLeft:"13px",marginTop:"12px"}}):(0,a.jsx)("span",{className:"validityIcon",children:(0,a.jsx)(i.ValidityTimeIcon,{})}),(0,a.jsxs)("span",{className:"static-data-content",children:[(0,a.jsx)("span",{className:"static-data-content-first",children:null===(b=A(O))||void 0===b?void 0:b.staticCommonContent}),(0,a.jsx)("span",{className:"static-data-content-second",children:null==N?void 0:N.staticData})]})]})})]})]}):(0,a.jsx)(r().Fragment,{})}},3015(e,t,n){"use strict";n.d(t,{A:()=>s});var i=n(6243),o=n(4883),r=n.n(o),l=n(5953),a=n(6870);const s=e=>{var t,n=e.dropdown||!1,{data:s,isLoading:c}=Digit.Hooks.useStore.getInitData(),{languages:u,stateInfo:d}=s||{},{t:v}=(0,l.useTranslation)(),p=Digit.StoreData.getCurrentLanguage(),[m,f]=(0,o.useState)(p),g=e=>{f(e.value),Digit.LocalizationService.changeLanguage(e.value,d.code)};return c?null:n?(0,a.jsx)("div",{children:(0,a.jsx)(i.Dropdown,{className:"language-dropdown",option:u,selected:null==u?void 0:u.find(e=>(null==e?void 0:e.value)===p),optionKey:"label",select:g,freeze:!0,customSelector:(0,a.jsx)("label",{className:"cp",children:v(null==u||null===(t=u.find(e=>(null==e?void 0:e.value)===m))||void 0===t?void 0:t.label)})})}):(0,a.jsxs)(r().Fragment,{children:[(0,a.jsx)("div",{style:{marginBottom:"5px"},children:"Language"}),(0,a.jsx)("div",{className:"language-selector",children:u.map((e,t)=>(0,a.jsx)("div",{className:"language-button-container",children:(0,a.jsx)(i.Button,{label:e.label,onClick:()=>g(e),variation:e.value===m?"primary":""})},t))})]})}},3060(e,t){"use strict";var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function o(e,t,i){var o=null;if(void 0!==i&&(o=""+i),void 0!==t.key&&(o=""+t.key),"key"in t)for(var r in i={},t)"key"!==r&&(i[r]=t[r]);else i=t;return t=i.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:i}}t.Fragment=i,t.jsx=o,t.jsxs=o},3333(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>d});var i=n(4883),o=n(6243),r=n(5953),l=n(4442),a=n(5697),s=n(5660),c=n(6177),u=n(6870);const d=()=>{var e,t,n,d,{t:v}=(0,r.useTranslation)(),p=(0,l.useLocation)(),{tenant:m}=p.state||{},f=(0,i.useRef)(null),g=null===(e=Digit.SessionStorage.get("User"))||void 0===e||null===(e=e.info)||void 0===e?void 0:e.roles,[y,h]=(0,i.useState)(!0),{data:b}=Digit.Hooks.useCustomMDMS(m,"SandBoxLanding",[{name:"LandingPageRoles"}],{enabled:!0,staleTime:0,gcTime:0,select:e=>{var t;return null==e||null===(t=e.SandBoxLanding)||void 0===t?void 0:t.LandingPageRoles}});(0,i.useEffect)(()=>{null!=b&&b[0].url&&h(!1)},[b]);var O=null==b?void 0:b[0].url;return(0,u.jsxs)(a.A,{children:[(0,u.jsx)("div",{className:"employeeBackbuttonAlign",children:(0,u.jsx)(o.BackLink,{onClick:()=>window.history.back()})}),(0,u.jsxs)(o.Card,{className:"card-sandbox",children:[(0,u.jsx)(s.A,{showTenant:!1}),(0,u.jsx)("div",{className:"sandbox-success-signup",children:(0,u.jsx)(o.SVG.TickMark,{fill:"#fff",height:30,width:70})}),(0,u.jsx)(o.CardHeader,{className:"cardHeader-sandbox",styles:{color:"#00703c"},children:v("SANDBOX_HEADER")}),(0,u.jsx)(o.CardText,{className:"cardText-sandbox",children:v("SAMDBOX_URL_SUB")}),(0,u.jsxs)(o.CardLabel,{children:[" ",v("SANDBOX_URL")," "]}),(0,u.jsxs)("div",{className:"sandbox-url-wrapper",children:[(0,u.jsx)(o.TextInput,{inputRef:f,className:"urlInputText",onChange:()=>{},nonEditable:!0,value:"".concat(window.location.host,"/").concat(null===(t=window)||void 0===t?void 0:t.globalPath,"/").concat(m,"/employee")}),(0,u.jsx)(o.Button,{className:"copyButton",variation:"secondary",onClick:()=>{navigator.clipboard.writeText(f.current.value)},label:v("COPY_URL")})]}),(0,u.jsx)("div",{className:"sandbox-url-footer",children:v("SANDBOX_URL_FOOT")}),(0,u.jsx)(o.Button,{isDisabled:y,onClick:()=>{var e,t;((e,t)=>{var n;return"SUPERUSER"===(null==e||null===(n=e[0])||void 0===n?void 0:n.code)&&t.some(e=>e.rolesForLandingPage.includes("SUPERUSER"))})(g,b)?window.location.href="/".concat(null===(e=window)||void 0===e?void 0:e.globalPath,"/").concat(m).concat(O):window.location.href="/".concat(null===(t=window)||void 0===t?void 0:t.globalPath,"/").concat(m,"/employee")},label:v("SIGN_IN")})]}),(0,u.jsx)("div",{className:"EmployeeLoginFooter",children:(0,u.jsx)(c.A,{alt:"Powered by DIGIT",src:null===(n=window)||void 0===n||null===(n=n.globalConfigs)||void 0===n||null===(d=n.getConfig)||void 0===d?void 0:d.call(n,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:()=>{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()}})})]})}},3934(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>D});var i=n(4883),o=n(5953),r=n(4442),l=n(4650),a=[{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"}}]}],s=n(6243),c=n(7598),u=n.n(c),d=n(5697),v=n(5660),p=n(5419),m=n(6177),f=n(5181),g=n(6870),y=["UserRequest"];function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach(function(t){O(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function O(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}function S(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){x(r,i,o,l,a,"next",e)}function a(e){x(r,i,o,l,a,"throw",e)}l(void 0)})}}var j=e=>{var t,n,o,l,{config:a,t:c,isDisabled:u,loginOTPBased:f}=e,{data:h,isLoading:O}=Digit.Hooks.useTenants(),{data:x,isLoading:j}=Digit.Hooks.useStore.getInitData(),{stateInfo:_}=x||{},[w,C]=(0,i.useState)(null),[N,E]=(0,i.useState)(null),[D,P]=(0,i.useState)(!1),I=(0,r.useNavigate)(),T=null===(t=Digit.ComponentRegistryService)||void 0===t?void 0:t.getComponent("DynamicLoginComponent");(0,i.useEffect)(()=>{var e,t,n,i,o,r,l,a,s,c;if(w){Digit.SessionStorage.set("citizen.userRequestObject",w);var u=null==w||null===(e=w.info)||void 0===e||null===(e=e.roles)||void 0===e?void 0:e.filter(e=>e.tenantId===Digit.SessionStorage.get("Employee.tenantId"));(null==w||null===(t=w.info)||void 0===t||null===(t=t.roles)||void 0===t?void 0:t.length)>0&&(w.info.roles=u),Digit.UserService.setUser(w),((e,t)=>{var n;if(!Digit.Utils.getMultiRootTenant()){var i=(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",i),localStorage.setItem("Employee.locale",i),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==w?void 0:w.info,null==w?void 0:w.access_token);var d,v,p,m,f="/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/employee");null!==(i=window)&&void 0!==i&&null!==(i=i.location)&&void 0!==i&&null!==(i=i.href)&&void 0!==i&&i.includes("from=")&&(f=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===(v=window)||void 0===v?void 0:v.contextPath,"/employee")),null!=w&&null!==(o=w.info)&&void 0!==o&&o.roles&&(null==w||null===(r=w.info)||void 0===r||null===(r=r.roles)||void 0===r?void 0:r.length)>0&&null!=w&&null!==(l=w.info)&&void 0!==l&&null!==(l=l.roles)&&void 0!==l&&l.every(e=>"NATADMIN"===e.code)&&(f="/".concat(null===(p=window)||void 0===p?void 0:p.contextPath,"/employee/dss/landing/NURT_DASHBOARD")),null!=w&&null!==(a=w.info)&&void 0!==a&&a.roles&&(null==w||null===(s=w.info)||void 0===s||null===(s=s.roles)||void 0===s?void 0:s.length)>0&&null!=w&&null!==(c=w.info)&&void 0!==c&&null!==(c=c.roles)&&void 0!==c&&c.every(e=>"STADMIN"===e.code)&&(f="/".concat(null===(m=window)||void 0===m?void 0:m.contextPath,"/employee/dss/landing/home")),I(f,{replace:!0})}},[w]);var A=function(){var e=S(function*(e){var t,n;null!=e&&e.username&&(e.username=e.username.trim()),null!=e&&e.password&&(e.password=e.password.trim()),P(!0);var i=b(b(b({},e),H),{},{userType:"EMPLOYEE"});i.tenantId=(null==i||null===(t=i.city)||void 0===t?void 0:t.code)||(null===(n=Digit)||void 0===n||null===(n=n.ULBService)||void 0===n?void 0:n.getStateId()),delete i.city;try{var o=yield Digit.UserService.authenticate(i),{UserRequest:r}=o,l=function(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(o,y);Digit.SessionStorage.set("Employee.tenantId",null==r?void 0:r.tenantId),C(b({info:r},l))}catch(e){var a;E((null==e||null===(a=e.response)||void 0===a||null===(a=a.data)||void 0===a?void 0:a.error_description)||"ES_ERROR_USER_NOT_PERMITTED"==(null==e?void 0:e.message)&&c("ES_ERROR_USER_NOT_PERMITTED")||c("INVALID_LOGIN_CREDENTIALS")),setTimeout(k,5e3)}P(!1)});return function(t){return e.apply(this,arguments)}}(),L={url:"/user-otp/v1/_send",params:{tenantId:null===(n=Digit)||void 0===n||null===(n=n.ULBService)||void 0===n?void 0:n.getStateId()},body:{},config:{enable:!1}},R=Digit.Hooks.useCustomAPIMutationHook(L),M=function(){var e=S(function*(e){var t,n,i=e.email;yield R.mutate({body:{otp:{userName:e.email,type:"login",tenantId:null===(t=Digit)||void 0===t||null===(t=t.ULBService)||void 0===t?void 0:t.getStateId(),userType:"EMPLOYEE"}},config:{enable:!0}},{onError:(e,t)=>{var n,i;E(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===(i=e.response)||void 0===i||null===(i=i.data)||void 0===i||null===(i=i.Errors)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.code):"SANDBOX_RESEND_OTP_ERROR"),setTimeout(k,5e3)},onSuccess:(n=S(function*(e){var t,n;I("/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/employee/user/login/otp"),{state:{email:i,tenant:null===(n=Digit)||void 0===n||null===(n=n.ULBService)||void 0===n?void 0:n.getStateId()}})}),function(e){return n.apply(this,arguments)})})});return function(t){return e.apply(this,arguments)}}(),k=()=>{E(null)},U=()=>{var e;I("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/employee/user/forgot-password"))},B=Digit.ULBService.getStateId(),F={code:B,name:Digit.Utils.locale.getTransformedLocale("TENANT_TENANTS_".concat(B))},V=[{body:null==a?void 0:a.inputs}],{mode:G}=Digit.Hooks.useQueryParams();"admin"===G&&0==(null==V||null===(o=V[0])||void 0===o||null===(o=o.body)||void 0===o||null===(o=o[2])||void 0===o?void 0:o.disable)&&null==(null==V||null===(l=V[0])||void 0===l||null===(l=l.body)||void 0===l||null===(l=l[2])||void 0===l||null===(l=l.populators)||void 0===l?void 0:l.defaultValue)&&(V[0].body[2].disable=!0,V[0].body[2].isMandatory=!1,V[0].body[2].populators.defaultValue=F);var H=(0,i.useMemo)(()=>Object.fromEntries(V[0].body.filter(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(e=>[e.populators.name,e.populators.defaultValue])),[]),z=(e,t,n)=>{var i=V[0].body.filter(e=>null==e?void 0:e.isMandatory).map(e=>null==e?void 0:e.key).some(e=>{var n=t[e];return null==n||""===n||!1===n});P(i)},W=function(){var e,t,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return(0,g.jsx)(s.FormComposerV2,{onSubmit:f?M:A,isDisabled:u||D,noBoxShadow:!0,inline:!0,submitInForm:!0,config:V,label:null==a||null===(e=a.texts)||void 0===e?void 0:e.submitButtonLabel,secondaryActionLabel:(null==a||null===(t=a.texts)||void 0===t?void 0:t.secondaryButtonLabel)+(i.includes("login-form-container")?"?":""),onSecondayActionClick:U,onFormValueChange:z,heading:null==a||null===(n=a.texts)||void 0===n?void 0:n.header,className:"".concat(r),cardSubHeaderClassName:"loginCardSubHeaderClassName",cardClassName:o,buttonClassName:"buttonClassName",defaultValues:H,children:null!=_&&_.code?(0,g.jsx)(v.A,{}):(0,g.jsx)(v.A,{showTenant:!1})})},q=e=>{var t,n;return(0,g.jsx)("div",{className:e,style:{backgroundColor:"unset"},children:(0,g.jsx)(m.A,{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:()=>{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 O||j?(0,g.jsx)(s.Loader,{page:!0,variant:"PageLoader"}):null!=a&&a.bannerImages?(0,g.jsxs)("div",{className:"login-container",children:[(0,g.jsx)(p.A,{bannerImages:null==a?void 0:a.bannerImages}),(0,g.jsxs)("div",{className:"login-form-container",children:[W("login-form-container","",f?"sandbox-onboarding-wrapper":""),T&&(0,g.jsx)(T,{}),N&&(0,g.jsx)(s.Toast,{type:"error",label:c(N),onClose:k}),q("EmployeeLoginFooter")]})]}):(0,g.jsxs)(d.A,{children:[(0,g.jsx)("div",{className:"employeeBackbuttonAlign",children:(0,g.jsx)(s.BackLink,{onClick:()=>window.history.back()})}),W("loginFormStyleEmployee","loginCardClassName",f?"sandbox-onboarding-wrapper":""),T&&(0,g.jsx)(T,{}),N&&(0,g.jsx)(s.Toast,{type:"error",label:c(N),onClose:k}),q("employee-login-home-footer")]})};j.propTypes={loginParams:u().any},j.defaultProps={loginParams:null};const _=(0,f.A)(j,".login-form-container");var w=n(1065);function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach(function(t){E(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function E(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const D=e=>{var t,{stateCode:n}=e,{t:c}=(0,o.useTranslation)(),[u,d]=(0,i.useState)(l.m),[v,p]=(0,i.useState)(a),m=Digit.StoreData.getCurrentLanguage(),f=(null===(t=window)||void 0===t||null===(t=t.globalConfigs)||void 0===t?void 0:t.getConfig("OTP_BASED_LOGIN"))||!1,{data:y,isLoading:h}=(0,w.P)(n),{data:b}=Digit.Services.useStore({stateCode:n,moduleCode:["privacy-policy"],language:m,modulePrefix:"digit"});(0,i.useEffect)(()=>{!h&&null!=y&&y.config?d(null==y?void 0:y.config):d(l.m)},[y,h]);var O=(0,i.useMemo)(()=>u.map(e=>{var t={};for(var n in e.texts)t[n]=c(e.texts[n]);return N(N({},e),{},{texts:t})},[u])),x=(0,i.useMemo)(()=>v.map(e=>{var t={};for(var n in e.texts)t[n]=c(e.texts[n]);return N(N({},e),{},{texts:t})},[v]));return h?(0,g.jsx)(s.Loader,{page:!1,variant:"PageLoader"}):(0,g.jsxs)(r.Routes,{children:[" ",(0,g.jsx)(r.Route,{path:"/",element:f?(0,g.jsx)(_,{config:x[0],t:c,loginOTPBased:f}):(0,g.jsx)(_,{config:O[0],t:c})})]})}},4217(e,t,n){"use strict";n.d(t,{A:()=>c});var i=n(4883),o=n.n(i),r=n(6340),l=n(6870),a=()=>{if("undefined"==typeof window)return(0,l.jsx)("span",{});try{var e,t=(null===(e=window)||void 0===e?void 0:e.contextPath)||"",n=Digit.UserService.getType(),i="/".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,l.jsx)("span",{});try{window.location.href=i}catch(e){console.warn("Navigation failed in error boundary:",e);try{window.location.replace(i)}catch(e){console.error("Both href and replace failed:",e)}}}catch(e){console.error("Error in Redircter component:",e)}return(0,l.jsx)("span",{})};class s extends o().Component{constructor(e){super(e),this.state={error:null,errorStack:null,hasError:!1,module:null,action:null,info:null}}static getDerivedStateFromError(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}}componentDidCatch(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})}render(){return this.state.hasError?(0,l.jsxs)("div",{className:"error-boundary",children:[(0,l.jsx)(a,{}),(0,l.jsx)(r.default,{initData:this.props.initData,errorData:this.state,goToHome:()=>{var e,t,n;window.location.href="/".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))}})]}):this.props.children}}const c=s},4442(e){"use strict";e.exports=r},4456(e){"use strict";e.exports=i},4650(e,t,n){"use strict";n.d(t,{m:()=>i});var i=[{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}]}]},4781(e,t,n){"use strict";n.d(t,{A:()=>O});var i=n(4883),o=n.n(i),r=n(5053),l=n(4442),a=n(3015),s=n(6870);const c=(e,t,n,i)=>[{type:"component",element:"LANGUAGE",action:(0,s.jsx)(a.A,{}),icon:"LanguageIcon"},{id:"login-btn",element:"LOGIN",text:e("CORE_COMMON_LOGIN"),icon:(0,s.jsx)(r.LogoutIcon,{className:"icon"}),populators:{onClick:n}}];var u=n(5953),d=n(6810),v=n(358),p=n(8808),m=n(6177);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(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"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h=e=>{var{info:t,stateName:n,t:i}=e;return(0,s.jsxs)("div",{className:"profile-section",children:[(0,s.jsx)("div",{className:"imageloader imageloader-loaded",children:(0,s.jsx)(m.A,{className:"img-responsive img-circle img-Profile",src:p.X,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)(v.A,{t:i,mobileView:!0})]})},b={CommonPTIcon:(0,s.jsx)(r.PTIcon,{className:"icon"}),OBPSIcon:(0,s.jsx)(r.OBPSIcon,{className:"icon"}),propertyIcon:(0,s.jsx)(r.PropertyHouse,{className:"icon"}),TLIcon:(0,s.jsx)(r.CaseIcon,{className:"icon"}),PGRIcon:(0,s.jsx)(r.PGRIcon,{className:"icon"}),FSMIcon:(0,s.jsx)(r.FSMIcon,{className:"icon"}),WSIcon:(0,s.jsx)(r.WSICon,{className:"icon"}),MCollectIcon:(0,s.jsx)(r.MCollectIcon,{className:"icon"}),BillsIcon:(0,s.jsx)(r.CollectionIcon,{className:"icon"}),BirthIcon:(0,s.jsx)(r.BirthIcon,{className:"icon"}),DeathIcon:(0,s.jsx)(r.DeathIcon,{className:"icon"}),FirenocIcon:(0,s.jsx)(r.FirenocIcon,{className:"icon"}),HomeIcon:(0,s.jsx)(r.HomeIcon,{className:"icon"}),EditPencilIcon:(0,s.jsx)(r.EditPencilIcon,{className:"icon"}),LogoutIcon:(0,s.jsx)(r.LogoutIcon,{className:"icon"}),Phone:(0,s.jsx)(r.Phone,{className:"icon"})};const O=e=>{var t,n,a,{linkData:v,islinkDataLoading:p}=e,{t:m}=(0,u.useTranslation)(),f=(0,l.useNavigate)(),y=(0,l.useLocation)(),{pathname:O}=y,{data:x,isFetched:S}=Digit.Hooks.useStore.getInitData(),{stateInfo:j}=x||{},_=Digit.UserService.getUser(),w=window.Digit.Utils.browser.isMobile(),[C,N]=(0,i.useState)(!1),[E,D]=(0,i.useState)(!1),[P,I]=(0,i.useState)(!1),T=()=>{I(!1)};if(p)return(0,s.jsx)(r.Loader,{});var A=()=>{var e;f("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/user/profile"))},L=[...c(m,0,()=>{var e;f("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/login"))})];L=L.filter(e=>"LANGUAGE"!==e.element);var R,M,k,U,B,F,V=Digit.ULBService.getCurrentTenantId(),G=e=>{var t,n,{item:i}=e,o=(null==i?void 0:i.icon)||(null===(t=i.icon)||void 0===t||null===(t=t.type)||void 0===t?void 0:t.name),r=o?b[o]:b.BillsIcon;n="component"===i.type?i.action:i.text;var a=()=>(0,s.jsxs)("span",g(g({className:"menu-item"},i.populators),{},{children:[r,(0,s.jsx)("div",{className:"menu-label",children:n})]}));return"external-link"===i.type?(0,s.jsx)("a",{href:i.link,children:(0,s.jsx)(a,{})}):"link"===i.type?(0,s.jsx)(l.Link,{to:null==i?void 0:i.link,children:(0,s.jsx)(a,{})}):(0,s.jsx)(a,{})};return S&&_&&_.access_token&&"CITIZEN"===(null==_||null===(t=_.info)||void 0===t?void 0:t.type)&&(R=(0,s.jsx)(h,{info:null==_?void 0:_.info,stateName:null==j?void 0:j.name,t:m}),L=L.filter(e=>"login-btn"!==(null==e?void 0:e.id)),L=[...L,{type:"link",icon:"HomeIcon",element:"HOME",text:m("COMMON_BOTTOM_NAVIGATION_HOME"),link:C?"/".concat(null===(M=window)||void 0===M?void 0:M.contextPath,"/employee"):"/".concat(null===(k=window)||void 0===k?void 0:k.contextPath,"/citizen"),populators:{onClick:()=>{var e;f("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/all-services"))}}},{text:m("EDIT_PROFILE"),element:"PROFILE",icon:"EditPencilIcon",populators:{onClick:A}},{text:m("CORE_COMMON_LOGOUT"),element:"LOGOUT",icon:"LogoutIcon",populators:{onClick:()=>{D(!1),I(!0)}}},{text:(0,s.jsxs)(o().Fragment,{children:[m("CS_COMMON_HELPLINE"),(0,s.jsxs)("div",{className:"telephone",style:{marginTop:"-10%"},children:[null==x||null===(U=x.tenants)||void 0===U?void 0:U.map(e=>{var t,n,i,o;e.code===V?("tel:".concat(null==x||null===(t=x.tenants)||void 0===t?void 0:t[e].contactNumber),null==x||null===(n=x.tenants)||void 0===n||n[e].contactNumber):("tel:".concat(null==x||null===(i=x.tenants)||void 0===i?void 0:i[0].contactNumber),null==x||null===(o=x.tenants)||void 0===o||o[0].contactNumber)}),(0,s.jsx)("div",{className:"link",children:(0,s.jsx)("a",{href:"tel:".concat(null==x||null===(B=x.tenants)||void 0===B?void 0:B[0].contactNumber),children:null==x||null===(F=x.tenants)||void 0===F?void 0:F[0].contactNumber})})]})]}),element:"Helpline",icon:"Phone"}]),null===(n=Object.keys(v))||void 0===n||null===(n=n.sort((e,t)=>t.localeCompare(e)))||void 0===n||n.map(e=>{var t,n,i,o,r;(null===(t=v[e][0])||void 0===t?void 0:t.sidebar)==="".concat(window.contextPath,"-links")&&L.splice(1,0,{type:null!==(n=v[e][0])&&void 0!==n&&null!==(n=n.sidebarURL)&&void 0!==n&&n.includes(null===(i=window)||void 0===i?void 0:i.contextPath)?"link":"external-link",text:m("ACTION_TEST_".concat(Digit.Utils.locale.getTransformedLocale(e))),links:v[e],icon:null===(o=v[e][0])||void 0===o?void 0:o.leftIcon,link:null===(r=v[e][0])||void 0===r?void 0:r.sidebarURL})}),(0,s.jsx)(o().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:w?"calc(100vh - 56px)":"auto",zIndex:"99"},children:[R,(0,s.jsx)("div",{className:"drawer-desktop",children:null===(a=L)||void 0===a?void 0:a.map((e,t)=>(0,s.jsx)("div",{className:"sidebar-list ".concat(O===(null==e?void 0:e.link)||O===(null==e?void 0:e.sidebarURL)?"active":""),children:(0,s.jsx)(G,{item:e})},t))})]}),(0,s.jsx)("div",{children:P&&(0,s.jsx)(d.A,{onSelect:()=>{var e;Digit.Utils.getMultiRootTenant()?(Digit.UserService.logout(),I(!1),window.location.href="/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/login")):(Digit.UserService.logout(),I(!1))},onCancel:T,onDismiss:T})})]})})}},4872(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>S});var i=n(6243),o=n(5053),r=n(4883),l=n.n(r),a=n(5953),s=n(4442),c=n(6870);function u(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}const d=function(e){var{setProfilePic:t,closeDrawer:n,userType:i,removeProfilePic:s,showToast:d}=e,[v,p]=(0,r.useState)(null),[m,f]=(0,r.useState)(""),[g,y]=(0,r.useState)(null),{t:h}=(0,a.useTranslation)();return(0,r.useEffect)(()=>{var e;(e=function*(){if(y(null),m)if(m.size>=1e6)d("error",h("CORE_COMMON_PROFILE_MAXIMUM_UPLOAD_SIZE_EXCEEDED")),y(h("CORE_COMMON_PROFILE_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else try{var e,n=yield Digit.UploadServices.Filestorage("".concat(i,"-profile"),m,Digit.ULBService.getStateId());if((null==n||null===(e=n.data)||void 0===e||null===(e=e.files)||void 0===e?void 0:e.length)>0){var o,r=null==n||null===(o=n.data)||void 0===o||null===(o=o.files[0])||void 0===o?void 0:o.fileStoreId;p(r),t(r)}else d("error",h("CORE_COMMON_PROFILE_FILE_UPLOAD_ERROR")),y(h("CORE_COMMON_PROFILE_FILE_UPLOAD_ERROR"))}catch(e){d("error",h("CORE_COMMON_PROFILE_INVALID_FILE_INPUT"))}},function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){u(r,i,o,l,a,"next",e)}function a(e){u(r,i,o,l,a,"throw",e)}l(void 0)})})()},[m]),(0,c.jsxs)(l().Fragment,{children:[(0,c.jsx)("div",{style:{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",width:"100%",height:"100vh",backgroundColor:"rgba(0,0,0,.5)"},onClick:()=>n()}),(0,c.jsxs)("div",{style:{width:"100%",justifyContent:"space-between",display:"flex",backgroundColor:"white",alignItems:"center",position:"fixed",left:"0",right:"0",height:"20%",bottom:"citizen"===i?"2.5rem":"0",zIndex:"1000"},children:[(0,c.jsxs)("div",{style:{display:"flex",flex:"1",flexDirection:"column",width:"100%",justifyContent:"center",alignItems:"center",gap:"8px 0"},children:[(0,c.jsxs)("label",{for:"file",style:{cursor:"pointer"},children:[" ",(0,c.jsx)(o.GalleryIcon,{})]}),(0,c.jsx)("label",{style:{cursor:"pointer"},children:" Gallery"}),(0,c.jsx)("input",{type:"file",id:"file",accept:"image/*, .png, .jpeg, .jpg",onChange:e=>f(e.target.files[0]),style:{display:"none"}})]}),(0,c.jsxs)("div",{style:{display:"flex",flex:"1",width:"100%",justifyContent:"center",alignItems:"center",flexDirection:"column",gap:"8px 0"},children:[(0,c.jsx)("button",{onClick:()=>{s(),n()},children:(0,c.jsx)(o.RemoveIcon,{})}),(0,c.jsx)("label",{style:{cursor:"pointer"},children:"Remove"})]})]})]})};var v,p,m=n(6177);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(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"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}function b(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){h(r,i,o,l,a,"next",e)}function a(e){h(r,i,o,l,a,"throw",e)}l(void 0)})}}var O=null===(v=Digit)||void 0===v||null===(v=v.ULBService)||void 0===v||null===(p=v.getStateId)||void 0===p?void 0:p.call(v),x={tenantId:"".concat(O),UserProfileValidationConfig:[{name:"/^[a-zA-Z ]+$/i",mobileNumber:"/^[6-9]{1}[0-9]{9}$/",password:"/^([a-zA-Z0-9@#$%]{8,15})$/i"}]};const S=e=>{var t,n,u,v,p,f,y,h,O,S,j,_,w,C,N,E,D,P,I,T,A,L,R,M,{stateCode:k,userType:U,cityDetails:B}=e,F=(0,s.useNavigate)(),{t:V}=(0,a.useTranslation)(),G=window.location.href,H=Digit.ULBService.getStateId(),z=Digit.ULBService.getCurrentTenantId(),W=(null===(t=Digit.UserService.getUser())||void 0===t?void 0:t.info)||{},[q,X]=(0,r.useState)(null),[Q,Z]=(0,r.useState)(null!=W&&W.name?W.name:""),[Y,K]=(0,r.useState)(null!=W&&W.emailId?W.emailId:""),[J,$]=(0,r.useState)(null==q?void 0:q.gender),[ee,te]=(0,r.useState)(null!=W&&W.permanentCity?W.permanentCity:B.name),[ne,ie]=(0,r.useState)(null!=W&&W.mobileNumber?W.mobileNumber:""),[oe,re]=(0,r.useState)(null),[le,ae]=(0,r.useState)(""),[se,ce]=(0,r.useState)(!1),[ue,de]=(0,r.useState)(!1),[ve,pe]=(0,r.useState)(""),[me,fe]=(0,r.useState)(""),[ge,ye]=(0,r.useState)(""),[he,be]=(0,r.useState)(null),[Oe,xe]=(0,r.useState)(!1),[Se,je]=l().useState(window.innerWidth),[_e,we]=l().useState({}),Ce=window.Digit.Utils.browser.isMobile(),Ne=Digit.Utils.getMultiRootTenant(),Ee=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((e,t)=>{var[n,i]=t;if("string"==typeof i)try{if(i.startsWith("/")&&i.lastIndexOf("/")>0){var o=i.lastIndexOf("/"),r=i.slice(1,o),l=i.slice(o+1);e[n]=new RegExp(r,l)}else e[n]=new RegExp(i)}catch(t){console.error('Error parsing regex for key "'.concat(n,'":'),t),e[n]=i}else e[n]=i;return e},{})},[De,Pe]=(0,r.useState)(Ee(x)||{}),{data:Ie,isValidationConfigLoading:Te}=Digit.Hooks.useCustomMDMS(k,"commonUiConfig",[{name:"UserProfileValidationConfig"}],{select:e=>null==e?void 0:e.commonUiConfig});(0,r.useEffect)(()=>{var e;if(Ie&&null!=Ie&&null!==(e=Ie.UserProfileValidationConfig)&&void 0!==e&&e[0]){var t=Ee(Ie);Pe(t)}},[Ie]);var Ae=function(){var e=b(function*(){var e=null==W?void 0:W.uuid;if(e){var t=yield Digit.UserService.userSearch(z,{uuid:[e]},{});t&&t.user&&t.user.length&&X(t.user[0])}});return function(){return e.apply(this,arguments)}}();l().useEffect(()=>{var e=()=>je(window.innerWidth);return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),(0,r.useEffect)(()=>{var e;xe(!0),Ae(),$({i18nKey:void 0,code:null==q?void 0:q.gender,value:null==q?void 0:q.gender});var t=null==q||null===(e=q.photo)||void 0===e?void 0:e.split(",");ae(null==t?void 0:t.at(0)),xe(!1)},[null!==q]);var Le=!1,Re=e=>$(e),Me=()=>ce(!1),ke=e=>{var t;Z(e),null==De||null===(t=De.name)||void 0===t||!t.test(e)||0===e.length||e.length>50?we(g(g({},_e),{},{userName:{type:"pattern",message:"CORE_COMMON_PROFILE_NAME_INVALID"}})):we(g(g({},_e),{},{userName:null}))},Ue=e=>{(null==W?void 0:W.userName)!==e?(K(e),!e.length||e.includes("@")&&e.includes(".")?we(g(g({},_e),{},{emailAddress:null})):we(g(g({},_e),{},{emailAddress:{type:"pattern",message:"CORE_COMMON_PROFILE_EMAIL_INVALID"}}))):we(g(g({},_e),{},{emailAddress:null}))},Be=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3;be({key:e,action:t}),setTimeout(()=>{be(null)},n)},Fe=function(){var e=b(function*(){xe(!0);try{var e=g(g({},W),{},{name:Q,gender:null==J?void 0:J.value,emailId:Y,photo:oe});if(Q&&Z(e=>e.trim()),null==De||!De.name.test(Q)||""===Q||Q.length>50||Q.length<1)throw JSON.stringify({type:"error",message:V("CORE_COMMON_PROFILE_NAME_INVALID")});if("employee"===U&&(null==De||!De.mobileNumber.test(ne)))throw JSON.stringify({type:"error",message:V("CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID")});if(Y.length&&(!Y.includes("@")||!Y.includes(".")))throw JSON.stringify({type:"error",message:V("CORE_COMMON_PROFILE_EMAIL_INVALID")});var t=ve.trim(),n=me.trim(),i=ge.trim();if(pe(t),fe(n),ye(i),ue&&t&&n&&i){if(n!==i)throw JSON.stringify({type:"error",message:V("CORE_COMMON_PROFILE_PASSWORD_MISMATCH")});if(!(t.length&&n.length&&i.length))throw JSON.stringify({type:"error",message:V("CORE_COMMON_PROFILE_PASSWORD_INVALID")});if(!(null!=De&&De.password.test(n)||null!=De&&De.password.test(i)))throw JSON.stringify({type:"error",message:V("CORE_COMMON_PROFILE_PASSWORD_INVALID")})}var{responseInfo:o,user:r}=yield Digit.UserService.updateUser(e,k);if(o&&"200"===o.status){var l=Digit.UserService.getUser();l&&Digit.UserService.setUser(g(g({},l),{},{info:g(g({},l.info),{},{name:Q,mobileNumber:ne,emailId:Y,permanentCity:ee})}))}if(ve.length&&me.length&&ge.length){var a={existingPassword:ve,newPassword:me,tenantId:z,type:"EMPLOYEE",username:null==W?void 0:W.userName,confirmPassword:ge};if(me!==ge)throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_ERROR_PASSWORD_NOT_MATCH"});try{var s=yield Digit.UserService.changePassword(a,z),{responseInfo:c}=s;if(null==c||!c.status||"200"!==c.status)throw"";Be("success",V("CORE_COMMON_PROFILE_UPDATE_SUCCESS_WITH_PASSWORD"),5e3),setTimeout(()=>Digit.UserService.logout(),2e3)}catch(e){var u;throw JSON.stringify({type:"error",message:null!==(u=e.Errors)&&void 0!==u&&null!==(u=u.at(0))&&void 0!==u&&u.description?e.Errors.at(0).description:"CORE_COMMON_PROFILE_UPDATE_ERROR_WITH_PASSWORD"})}}else null!=o&&o.status&&"200"===o.status&&Be("success",V("CORE_COMMON_PROFILE_UPDATE_SUCCESS"),5e3)}catch(e){var d=JSON.parse(e);Be(d.type,V(d.message),5e3)}xe(!1)});return function(){return e.apply(this,arguments)}}(),Ve=[],{data:Ge}=Digit.Hooks.useGenderMDMS(H,"common-masters","GenderType");Ge&&Ge.map(e=>{Ve.push({i18nKey:"PT_COMMON_GENDER_".concat(e.code),code:"".concat(e.code),value:"".concat(e.code)})});var He=function(){var e=b(function*(e){re(e);var t=e?yield ze([e],H):null;ae(null==t?void 0:t.thumbs[0]),Me()});return function(t){return e.apply(this,arguments)}}(),ze=function(){var e=b(function*(e,t){var n=yield Digit.UploadServices.Filefetch(e,t);return n.data.fileStoreIds&&0!==n.data.fileStoreIds.length?{thumbs:n.data.fileStoreIds.map(e=>e.url.split(",")[3]),images:n.data.fileStoreIds.map(e=>Digit.Utils.getFileUrl(e.url))}:null});return function(t,n){return e.apply(this,arguments)}}();return Oe||Te?(0,c.jsx)(i.Loader,{}):(0,c.jsxs)("div",{className:"user-profile ".concat("citizen"===U?"citizen":"employee"),children:[(0,c.jsx)("section",{style:{margin:"citizen"===U||Ce?"8px":"0px"},children:"citizen"===U||Ce?(0,c.jsx)(i.BackLink,{onClick:()=>F("/")}):(0,c.jsx)(i.BreadCrumb,{style:{marginTop:"0rem",marginBottom:"1.5rem"},crumbs:[{internalLink:Ne?"/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/employee/sandbox/landing"):"/".concat(null===(u=window)||void 0===u?void 0:u.contextPath,"/employee"),content:V("ES_COMMON_HOME"),show:!0},{internalLink:"/".concat(null===(v=window)||void 0===v?void 0:v.contextPath,"/employee/user/profile"),content:V("ES_COMMON_PAGE_1"),show:G.includes("/user/profile")}]})}),(0,c.jsxs)("div",{style:{display:"flex",flex:1,flexDirection:Se<768||"citizen"===U?"column":"row",margin:"citizen"===U?"8px":"0px",gap:"citizen"===U?"":"0 24px",boxShadow:"citizen"===U?"1px 1px 4px 0px rgba(0,0,0,0.2)":"",background:"citizen"===U?"white":"",borderRadius:"citizen"===U?"4px":"",maxWidth:"citizen"===U?"960px":""},children:[(0,c.jsx)("section",{style:{position:"relative",display:"flex",flex:"citizen"===U?1:2.5,justifyContent:"center",alignItems:"center",maxWidth:"100%",borderRadius:"4px",boxShadow:"citizen"===U?"":"1px 1px 4px 0px rgba(0,0,0,0.2)",border:"".concat("citizen"===U?"8px":"24px"," solid #fff"),background:"#EEEEEE",padding:"citizen"===U?"8px":"16px"},children:(0,c.jsxs)("div",{style:{position:"relative",height:"citizen"===U?"114px":"150px",width:"citizen"===U?"114px":"150px",margin:"16px"},children:[(0,c.jsx)(m.A,{style:{margin:"auto",borderRadius:"300px",justifyContent:"center",height:"100%",width:"100%"},src:le&&""!==le?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",alt:"Profile Image"}),(0,c.jsx)("button",{style:{position:"absolute",left:"50%",bottom:"-24px",transform:"translateX(-50%)"},onClick:()=>ce(!se),children:(0,c.jsx)(o.CameraIcon,{})})]})}),(0,c.jsx)("section",{style:{display:"flex",flexDirection:"column",flex:"citizen"===U?1:7.5,width:"100%",borderRadius:"4px",height:"fit-content",boxShadow:"citizen"===U?"":"1px 1px 4px 0px rgba(0,0,0,0.2)",background:"white",padding:"citizen"===U?"8px":"24px",paddingBottom:"20px"},children:"citizen"===U?(0,c.jsxs)(l().Fragment,{children:[(0,c.jsxs)(i.LabelFieldPair,{children:[(0,c.jsxs)(i.CardLabel,{className:"user-profile",style:{},children:["".concat(V("CORE_COMMON_PROFILE_NAME")),"*"]}),(0,c.jsxs)("div",{style:{width:"40rem",maxWidth:"960px"},children:[(0,c.jsx)(i.TextInput,g(g({t:V,style:{width:"100%"},type:"text",isMandatory:!1,name:"name",value:Q,onChange:e=>ke(e.target.value)},{isRequired:!0,pattern:(null==Ie||null===(p=Ie.UserProfileValidationConfig)||void 0===p||null===(p=p[0])||void 0===p?void 0:p.name)||(null==x||null===(f=x.UserProfileValidationConfig)||void 0===f||null===(f=f[0])||void 0===f?void 0:f.name),type:"tel",title:V("CORE_COMMON_PROFILE_NAME_ERROR_MESSAGE")}),{},{disable:Le})),(null==_e?void 0:_e.userName)&&(0,c.jsx)(i.ErrorMessage,{message:V(null==_e||null===(y=_e.userName)||void 0===y?void 0:y.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,c.jsxs)(i.LabelFieldPair,{children:[(0,c.jsx)(i.CardLabel,{className:"user-profile",style:{},children:"".concat(V("CORE_COMMON_PROFILE_GENDER"))}),(0,c.jsx)(i.Dropdown,{style:{width:"40rem",fontSize:"1rem"},className:"form-field profileDropdown",selected:1===(null==J?void 0:J.length)?J[0]:J,disable:1===(null==J?void 0:J.length)||Le,option:Ve,select:Re,value:J,optionKey:"code",t:V,name:"gender"})]}),(0,c.jsxs)(i.LabelFieldPair,{children:[(0,c.jsx)(i.CardLabel,{className:"user-profile",style:{},children:"".concat(V("CORE_COMMON_PROFILE_EMAIL"))}),(0,c.jsxs)("div",{style:{width:"40rem"},children:[(0,c.jsx)(i.TextInput,{t:V,style:{width:"100%"},type:"email",isMandatory:!1,optionKey:"i18nKey",name:"email",value:Y,onChange:e=>Ue(e.target.value),disabled:Le}),(null==_e?void 0:_e.emailAddress)&&(0,c.jsx)(i.ErrorMessage,{message:V(null==_e||null===(h=_e.emailAddress)||void 0===h?void 0:h.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,c.jsx)("button",{onClick:Fe,style:{marginTop:"24px",backgroundColor:"#c84c0e",width:"100%",height:"40px",color:"white",maxWidth:Ce?"100%":"240px",borderBottom:"1px solid black"},children:V("CORE_COMMON_SAVE")})]}):(0,c.jsxs)(l().Fragment,{children:[(0,c.jsxs)(i.LabelFieldPair,{style:{display:"flex"},children:[(0,c.jsxs)(i.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:["".concat(V("CORE_COMMON_PROFILE_NAME")),"*"]}),(0,c.jsxs)("div",{style:{width:"100%"},children:[(0,c.jsx)(i.TextInput,g(g({t:V,type:"text",isMandatory:!1,name:"name",value:Q,onChange:e=>ke(e.target.value),placeholder:"Enter Your Name"},{isRequired:!0,pattern:(null==Ie||null===(O=Ie.UserProfileValidationConfig)||void 0===O||null===(O=O[0])||void 0===O?void 0:O.name)||(null==x||null===(S=x.UserProfileValidationConfig)||void 0===S||null===(S=S[0])||void 0===S?void 0:S.name),type:"text",title:V("CORE_COMMON_PROFILE_NAME_ERROR_MESSAGE")}),{},{disabled:Le})),(null==_e?void 0:_e.userName)&&(0,c.jsx)(i.ErrorMessage,{message:V(null==_e||null===(j=_e.userName)||void 0===j?void 0:j.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,c.jsxs)(i.LabelFieldPair,{style:{display:"flex"},children:[(0,c.jsx)(i.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(V("CORE_COMMON_PROFILE_GENDER"))}),(0,c.jsx)("div",{style:{width:"100%"},children:(0,c.jsx)(i.Dropdown,{className:"profileDropdown",selected:1===(null==J?void 0:J.length)?J[0]:J,disable:1===(null==J?void 0:J.length)||Le,option:Ve,select:Re,value:J,optionKey:"code",t:V,name:"gender"})})]}),(0,c.jsxs)(i.LabelFieldPair,{style:{display:"flex"},children:[(0,c.jsx)(i.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(V("CORE_COMMON_PROFILE_CITY"))}),(0,c.jsxs)("div",{style:{width:"100%"},children:[(0,c.jsx)(i.TextInput,g(g({t:V,type:"text",isMandatory:!1,name:"city",value:V(Digit.Utils.locale.getTransformedLocale("TENANT_TENANTS_".concat(z))),onChange:e=>te(e.target.value),placeholder:"Enter Your City Name"},{isRequired:!0,type:"text",title:V("CORE_COMMON_PROFILE_CITY_ERROR_MESSAGE")}),{},{disabled:!0})),(0,c.jsx)(i.ErrorMessage,{})]})]}),(0,c.jsxs)(i.LabelFieldPair,{style:{display:"flex"},children:[(0,c.jsx)(i.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(V("CORE_COMMON_PROFILE_MOBILE_NUMBER"),"*")}),(0,c.jsxs)("div",{style:{width:"100%"},children:[(0,c.jsx)(i.MobileNumber,{value:ne,style:{width:"100%"},name:"mobileNumber",placeholder:"Enter a valid Mobile No.",onChange:e=>(e=>{var t;ie(e),"employee"!==U||null!=De&&null!==(t=De.mobileNumber)&&void 0!==t&&t.test(e)?we(g(g({},_e),{},{mobileNumber:null})):we(g(g({},_e),{},{mobileNumber:{type:"pattern",message:"CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID"}}))})(e),disable:!Digit.Utils.getMultiRootTenant(),required:!0,pattern:(null==Ie||null===(_=Ie.UserProfileValidationConfig)||void 0===_||null===(_=_[0])||void 0===_?void 0:_.mobileNumber)||(null==x||null===(w=x.UserProfileValidationConfig)||void 0===w||null===(w=w[0])||void 0===w?void 0:w.mobileNumber),type:"tel",title:V("CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID")}),(null==_e?void 0:_e.mobileNumber)&&(0,c.jsx)(i.ErrorMessage,{message:V(null==_e||null===(C=_e.mobileNumber)||void 0===C?void 0:C.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,c.jsxs)(i.LabelFieldPair,{style:{display:"flex"},children:[(0,c.jsx)(i.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(V("CORE_COMMON_PROFILE_EMAIL"))}),(0,c.jsxs)("div",{style:{width:"100%"},children:[(0,c.jsx)(i.TextInput,{t:V,type:"email",isMandatory:!1,placeholder:V("EMAIL_VALIDATION"),optionKey:"i18nKey",name:"email",value:Y,onChange:e=>Ue(e.target.value),disabled:!!Digit.Utils.getMultiRootTenant()||Le}),(null==_e?void 0:_e.emailAddress)&&(0,c.jsx)(i.ErrorMessage,{message:V(null==_e||null===(N=_e.emailAddress)||void 0===N?void 0:N.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,c.jsx)(i.LabelFieldPair,{children:(0,c.jsxs)("div",{style:{width:"100%"},children:[0!=ue||Digit.Utils.getOTPBasedLogin()?null:(0,c.jsx)(i.Button,{label:V("CORE_COMMON_CHANGE_PASSWORD"),variation:"teritiary",onClick:()=>de(!ue),style:{paddingLeft:"0rem"}}),ue?(0,c.jsxs)("div",{style:{marginTop:"10px"},children:[(0,c.jsxs)(i.LabelFieldPair,{style:{display:"flex"},children:[(0,c.jsx)(i.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(V("CORE_COMMON_PROFILE_CURRENT_PASSWORD"))}),(0,c.jsxs)("div",{style:{width:"100%"},children:[(0,c.jsx)(i.TextInput,{t:V,type:"password",isMandatory:!1,name:"name",pattern:(null==Ie||null===(E=Ie.UserProfileValidationConfig)||void 0===E||null===(E=E[0])||void 0===E?void 0:E.password)||(null==x||null===(D=x.UserProfileValidationConfig)||void 0===D||null===(D=D[0])||void 0===D?void 0:D.password),onChange:e=>{var t,n;return n=null==e||null===(t=e.target)||void 0===t?void 0:t.value,void(null!=De&&De.password.test(n)?we(g(g({},_e),{},{currentPassword:null})):we(g(g({},_e),{},{currentPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}})))},disabled:Le}),(null==_e?void 0:_e.currentPassword)&&(0,c.jsx)(i.ErrorMessage,{message:V(null==_e||null===(P=_e.currentPassword)||void 0===P?void 0:P.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,c.jsxs)(i.LabelFieldPair,{style:{display:"flex"},children:[(0,c.jsx)(i.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(V("CORE_COMMON_PROFILE_NEW_PASSWORD"))}),(0,c.jsxs)("div",{style:{width:"100%"},children:[(0,c.jsx)(i.TextInput,{t:V,type:"password",isMandatory:!1,name:"name",pattern:(null==Ie||null===(I=Ie.UserProfileValidationConfig)||void 0===I||null===(I=I[0])||void 0===I?void 0:I.password)||(null==x||null===(T=x.UserProfileValidationConfig)||void 0===T||null===(T=T[0])||void 0===T?void 0:T.password),onChange:e=>{var t,n;return n=null==e||null===(t=e.target)||void 0===t?void 0:t.value,fe(n),void(null!=De&&De.password.test(n)?we(g(g({},_e),{},{newPassword:null})):we(g(g({},_e),{},{newPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}})))},disabled:Le}),(null==_e?void 0:_e.newPassword)&&(0,c.jsx)(i.ErrorMessage,{message:V(null==_e||null===(A=_e.newPassword)||void 0===A?void 0:A.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,c.jsxs)(i.LabelFieldPair,{style:{display:"flex"},children:[(0,c.jsx)(i.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(V("CORE_COMMON_PROFILE_CONFIRM_PASSWORD"))}),(0,c.jsxs)("div",{style:{width:"100%"},children:[(0,c.jsx)(i.TextInput,{t:V,type:"password",isMandatory:!1,name:"name",pattern:(null==Ie||null===(L=Ie.UserProfileValidationConfig)||void 0===L||null===(L=L[0])||void 0===L?void 0:L.password)||(null==x||null===(R=x.UserProfileValidationConfig)||void 0===R||null===(R=R[0])||void 0===R?void 0:R.password),onChange:e=>{var t,n;return n=null==e||null===(t=e.target)||void 0===t?void 0:t.value,ye(n),void(null!=De&&De.password.test(n)?we(g(g({},_e),{},{confirmPassword:null})):we(g(g({},_e),{},{confirmPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}})))},disabled:Le}),(null==_e?void 0:_e.confirmPassword)&&(0,c.jsx)(i.ErrorMessage,{message:V(null==_e||null===(M=_e.confirmPassword)||void 0===M?void 0:M.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]})]}):""]})}),"employee"===U&&Ce?(0,c.jsx)("button",{onClick:Fe,style:{marginTop:"24px",backgroundColor:"#c84c0e",width:"100%",height:"40px",color:"white",maxWidth:Ce?"100%":"240px",borderBottom:"1px solid black",fontWeight:"700",fontSize:"17px"},children:V("CORE_COMMON_SAVE")}):null]})})]}),"employee"!==U||Ce?null:(0,c.jsx)(i.Footer,{actionFields:[(0,c.jsx)(i.SubmitBar,{t:V,label:V("CORE_COMMON_SAVE"),onSubmit:Fe})],className:"",setactionFieldsToRight:!0}),he&&(0,c.jsx)(i.Toast,{type:he.key,label:V("success"===he.key?"CORE_COMMON_PROFILE_UPDATE_SUCCESS":he.action),onClose:()=>be(null),style:{maxWidth:"670px"}}),1==se?(0,c.jsx)(d,{setProfilePic:He,closeDrawer:Me,userType:U,removeProfilePic:()=>{re(null),ae(null)},showToast:Be}):""]})}},4883(e){"use strict";e.exports=t},4989(e,t,n){"use strict";n.d(t,{A:()=>o});var i=n(4883);const o=function(e,t){var n=(0,i.useRef)();(0,i.useEffect)(()=>{n.current=e},[e]),(0,i.useEffect)(()=>{if(null!==t){var e=setInterval(function(){n.current()},t);return()=>clearInterval(e)}},[t])}},5007(e,t,n){"use strict";n.d(t,{A:()=>X});var i=n(4883),o=n.n(i),r=n(5053),l=n(6243),a=n(4442),s=n(358),c=n(3015),u=n(6177),d=n(6870);function v(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}const p=e=>{var t,n,i,p,m,f,g,y,{t:h,stateInfo:b,toggleSidebar:O,isSidebarOpen:x,handleLogout:S,userDetails:j,CITIZEN:_,cityDetails:w,mobileView:C,userOptions:N,handleUserDropdownSelection:E,logoUrl:D,logoUrlWhite:P,showLanguageChange:I=!0}=e,[T,A]=o().useState(null);o().useEffect(()=>{var e=function(){var e,t=(e=function*(){var e,t=Digit.Utils.getMultiRootTenant()?Digit.ULBService.getStateId():Digit.ULBService.getCurrentTenantId(),n=null==j||null===(e=j.info)||void 0===e?void 0:e.uuid;if(n){var i=yield Digit.UserService.userSearch(t,{uuid:[n]},{});if(i&&i.user&&i.user.length){var o,r=i.user[0],l=null==r||null===(o=r.photo)||void 0===o?void 0:o.split(",");A(null==l?void 0:l.at(0))}}},function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){v(r,i,o,l,a,"next",e)}function a(e){v(r,i,o,l,a,"throw",e)}l(void 0)})});return function(){return t.apply(this,arguments)}}();e()},[null!==T,null==j||null===(t=j.info)||void 0===t?void 0:t.uuid]);var L,R,M=Digit.ULBService.getCitizenCurrentTenant(!0),k=(0,a.useNavigate)(),{pathname:U}=(0,a.useLocation)(),{data:{unreadCount:B}={},isSuccess:F}=Digit.Hooks.useNotificationCount({tenantId:M,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)&&!!M}});if(_)return(0,d.jsx)("div",{children:(0,d.jsx)(r.TopBar,{img:null==b?void 0:b.logoUrlWhite,isMobile:!0,toggleSidebar:()=>{Digit.clikOusideFired?Digit.clikOusideFired=!1:O(!0)},logoUrl:null==b?void 0:b.logoUrlWhite,onLogout:S,userDetails:j,notificationCount:B<99?B:99,notificationCountLoaded:F,cityOfCitizenShownBesideLogo:h(M),onNotificationIconClick:function(){var e;k("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/engagement/notifications"))},hideNotificationIconOnSomeUrlsWhenNotLoggedIn:(e=>{var t,n,i;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===(i=window)||void 0===i?void 0:i.contextPath,"/citizen/select-location")].includes(e)})(U),changeLanguage:C?null:(0,d.jsx)(c.A,{dropdown:!0})})});var V=!(null==j||!j.access_token),G=null===(n=Digit.ComponentRegistryService)||void 0===n?void 0:n.getComponent("CustomEmployeeTopBar");return G?(0,d.jsx)(G,{t:h,stateInfo:b,toggleSidebar:O,isSidebarOpen:x,handleLogout:S,userDetails:j,CITIZEN:_,cityDetails:w,mobileView:C,userOptions:N,handleUserDropdownSelection:E,logoUrl:D,showLanguageChange:I,loggedin:V}):(0,d.jsx)(l.Header,{actionFields:[(0,d.jsx)(s.A,{dropdown:!0,t:h}),I&&(0,d.jsx)(c.A,{dropdown:!0}),(null==j?void 0:j.access_token)&&(0,d.jsx)(l.Dropdown,{option:N,optionKey:"name",profilePic:T||(null==j||null===(i=j.info)||void 0===i?void 0:i.name)||(null==j||null===(p=j.info)||void 0===p||null===(p=p.userInfo)||void 0===p?void 0:p.name)||"Employee",select:E,showArrow:!0,menuStyles:{marginTop:"1rem"},theme:"light"})],onHamburgerClick:()=>{O()},className:"digit-employee-header",img:D,logoWidth:"64px",logoHeight:"48px",logo:(V?null==w?void 0:w.logoId:null==b?void 0:b.statelogo)||"https://egov-dev-assets.s3.ap-south-1.amazonaws.com/egov-logo-2025.png",onImageClick:()=>{},onLogoClick:()=>{},props:{},showDeafultImg:!0,style:{},theme:(null===(m=window)||void 0===m||null===(m=m.globalConfigs)||void 0===m?void 0:m.getConfig("HEADER_THEME"))||"light",ulb:V?null!=w&&null!==(f=w.city)&&void 0!==f&&f.ulbGrade?(0,d.jsxs)(d.Fragment,{children:[h(null==w?void 0:w.i18nKey).toUpperCase()," ",h("ULBGRADE_".concat(null==w||null===(g=w.city)||void 0===g?void 0:g.ulbGrade.toUpperCase().replace(" ","_").replace(".","_"))).toUpperCase()]}):(0,d.jsx)(u.A,{className:"state",src:P,alt:"State Logo"}):(0,d.jsxs)(d.Fragment,{children:[h("MYCITY_".concat(null==b||null===(y=b.code)||void 0===y?void 0:y.toUpperCase(),"_LABEL"))," ",h("MYCITY_STATECODE_LABEL")]})})};var m=n(5953),f=(n(8808),n(4781));function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach(function(t){h(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function h(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}function O(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){b(r,i,o,l,a,"next",e)}function a(e){b(r,i,o,l,a,"throw",e)}l(void 0)})}}var x=e=>{var t,n,o,s,{isOpen:c,isMobile:u=!1,toggleSidebar:v,onLogout:p,isEmployee:g=!1,linkData:h,islinkDataLoading:b,userProfile:x}=e,{data:S,isFetched:j}=(Digit.Utils.getMultiRootTenant(),Digit.Hooks.useStore.getInitData()),_=Digit.StoreData.getCurrentLanguage(),[w,C]=(0,i.useState)(null),{languages:N,stateInfo:E}=S||{},D=Digit.UserService.getUser(),[P,I]=(0,i.useState)(""),[T,A]=(0,i.useState)(null),[L,R]=(0,i.useState)([]),[M,k]=(0,i.useState)([]),[U,B]=(0,i.useState)(_),{isLoading:F,data:V}=Digit.Hooks.useAccessControl(),G=Digit.ULBService.getCurrentTenantId(),{t:H}=(0,m.useTranslation)(),z=(0,a.useNavigate)(),W=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!==(i=e)&&void 0!==i&&i.includes(t);){var i,o;e=null===(o=e)||void 0===o?void 0:o.replace(t,n)}return e};(0,i.useEffect)(()=>{var e,t=Digit.SessionStorage.get("citizen.userRequestObject"),n=[],i=[];null==t||null===(e=t.info)||void 0===e||null===(e=e.roles)||void 0===e||e.forEach(e=>n.push(e.tenantId));var o=n.filter((e,t,n)=>n.indexOf(e)===t);null==o||o.forEach(e=>{var t;i.push({label:H("TENANT_TENANTS_".concat(null===(t=W(e,".","_"))||void 0===t?void 0:t.toUpperCase())),value:e})}),null==i||i.filter(e=>e.value==Digit.SessionStorage.get("Employee.tenantId")),R(i)},[T]);var q=()=>{Digit.clikOusideFired=!0,v(!1)};(0,i.useEffect)(()=>{var e=function(){var e=O(function*(){var e,t=Digit.ULBService.getCurrentTenantId(),n=null==D||null===(e=D.info)||void 0===e?void 0:e.uuid;if(n){var i,o=yield Digit.UserService.userSearch(t,{uuid:[n]},{});if(o&&o.user&&null!=o&&null!==(i=o.user)&&void 0!==i&&i.length){var r,l=o.user[0],a=null==l||null===(r=l.photo)||void 0===r?void 0:r.split(",");C(null==a?void 0:a.at(0))}}});return function(){return e.apply(this,arguments)}}();w||e()},[w]);var X=e=>{var t,n,i=null;Digit.Utils.getMultiRootTenant()?(i=g?e.replace("/sandbox-ui/employee","/sandbox-ui/".concat(G,"/employee")):e.replace("/sandbox-ui/citizen","/sandbox-ui/".concat(G,"/citizen")),z(i),v()):("/"===e[0]?z("/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/").concat(g?"employee":"citizen").concat(e)):z("/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/").concat(g?"employee":"citizen","/").concat(e)),v())};if(b||F)return(0,d.jsx)(l.Loader,{});var Q=[{id:"login-btn",element:"LOGIN",text:H("CORE_COMMON_LOGIN"),icon:(0,d.jsx)(r.LogoutIcon,{className:"icon"}),populators:{onClick:()=>{var e,t;z(g?"/".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")),q()}}}];j&&D&&D.access_token&&(null==D||D.info,null==E||E.name,Q=Q.filter(e=>"login-btn"!==(null==e?void 0:e.id)));var Z={};if(g){var Y;null==V||V.actions.filter(e=>"url"===e.url&&"Home"!==e.displayName).forEach(e=>{var t;if(""==P&&""!==e.path){var n=e.path.split(".")[0];"TradeLicense"===n&&(n="Trade License"),Z[n]?Z[n].push(e):Z[n]=[e]}else if(""!==e.path&&null!=e&&null!==(t=e.displayName)&&void 0!==t&&t.toLowerCase().includes(P.toLowerCase())){var i=e.path.split(".")[0];"TradeLicense"===i&&(i="Trade License"),Z[i]?Z[i].push(e):Z[i]=[e]}});for(var K=Object.keys(Z),J=function(e){var t,n,i,o,r,l,a=null===(t=Z[K[e]][0])||void 0===t||null===(t=t.displayName)||void 0===t||null===(t=t.toUpperCase())||void 0===t?void 0:t.replace(/[ -]/g,"_"),s=null===(n=K[e])||void 0===n||null===(n=n.toUpperCase())||void 0===n?void 0:n.replace(/[ -]/g,"_");-1===Z[K[e]][0].path.indexOf(".")?Q.splice(1,0,{type:"link",text:H("ACTION_TEST_".concat(a)),link:null===(i=Z[K[e]][0])||void 0===i?void 0:i.navigationURL,icon:null===(o=Z[K[e]][0])||void 0===o?void 0:o.leftIcon,populators:{onClick:()=>{var t;z(null===(t=Z[K[e]][0])||void 0===t?void 0:t.navigationURL),q()}}}):Q.splice(1,0,{type:"dynamic",moduleName:H("ACTION_TEST_".concat(s)),links:null===(r=Z[K[e]])||void 0===r?void 0:r.map(e=>{var t;return y(y({},e),{},{displayName:H("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===(l=Z[K[e]][1])||void 0===l?void 0:l.leftIcon})},$=0;$<(null==K?void 0:K.length);$++)J($);var ee=Q.findIndex(e=>"HOME"===e.element),te=Q.splice(ee,1),ne=Q.findIndex(e=>"LANGUAGE"===e.element),ie=Q.splice(ne,(null===(Y=Q)||void 0===Y?void 0:Y.length)-ne);Q.sort((e,t)=>{var n="dynamic"===(null==e?void 0:e.type)?null==e?void 0:e.moduleName:null==e?void 0:e.text,i="dynamic"===(null==t?void 0:t.type)?null==t?void 0:t.moduleName:null==t?void 0:t.text;return n.localeCompare(i)}),(null==te?void 0:te[0])&&Q.splice(0,0,te[0]),Q=(null==ie?void 0:ie.length)>0?Q.concat(ie):Q}else{var oe;null===(oe=Object.keys(h))||void 0===oe||null===(oe=oe.sort((e,t)=>t.localeCompare(e)))||void 0===oe||oe.map(e=>{var t,n,i,o,r;"digit-ui-links"===(null===(t=h[e][0])||void 0===t?void 0:t.sidebar)&&Q.splice(1,0,{type:null!==(n=h[e][0])&&void 0!==n&&null!==(n=n.sidebarURL)&&void 0!==n&&n.includes(null===(i=window)||void 0===i?void 0:i.contextPath)?"link":"external-link",text:H("ACTION_TEST_".concat(Digit.Utils.locale.getTransformedLocale(e))),links:h[e],icon:null===(o=h[e][0])||void 0===o?void 0:o.leftIcon,link:null===(r=h[e][0])||void 0===r?void 0:r.sidebarURL})})}location.pathname.includes("/openlink")&&(Q=Q.filter(e=>"LANGUAGE"===e.element)),Q=null===(t=Q)||void 0===t?void 0:t.map(e=>y(y({},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 re,le="";le=Digit.Utils.getMultiRootTenant()?H("TENANT_TENANTS_".concat(G)):H("TENANT_TENANTS_".concat(null===(re=W(Digit.SessionStorage.get("Employee.tenantId"),".","_"))||void 0===re?void 0:re.toUpperCase()));var ae=null===(n=Q)||void 0===n?void 0:n.map(e=>{var t;return"dynamic"===(null==e?void 0:e.type)?y(y({},e),{},{children:null==e||null===(t=e.links)||void 0===t?void 0:t.map(e=>y(y({},e),{},{label:null==e?void 0:e.displayName,icon:null==e?void 0:e.leftIcon}))}):e}),se=null==L?void 0:L.map(e=>y(y({},e),{},{type:"custom",key:"city"})),ce=null==N?void 0:N.map(e=>y(y({},e),{},{type:"custom",key:"language",icon:"Language"})),ue=[{label:"HOME",value:"HOME",icon:"Home",type:"custom",key:"home"},{label:le,value:le,children:(null==se?void 0:se.length)>0?se:void 0,type:"custom",icon:"LocationCity",key:"city"},{label:H("Language"),children:(null==ce?void 0:ce.length)>0?ce:void 0,type:"custom",icon:"Language",key:"language"},{label:H("EDIT_PROFILE"),type:"custom",icon:"Edit",key:"editProfile"},{label:H("Modules"),icon:"DriveFileMove",children:ae}];return u?(0,d.jsx)(l.Hamburger,{items:ue,profileName:null==D||null===(o=D.info)||void 0===o?void 0:o.name,profileNumber:null==D||null===(s=D.info)||void 0===s?void 0:s.mobileNumber,theme:"dark",transitionDuration:.3,styles:{marginTop:"64px",height:"93%"},onLogout:p,hideUserManuals:!0,profile:w||void 0,isSearchable:!0,onSelect:e=>{var{item:t,index:n,parentIndex:i}=e;return(e=>{var t,n,i,{item:o,index:r,parentIndex:l}=e;if(null!=o&&o.navigationURL)X(null==o?void 0:o.navigationURL);else if(null!=o&&o.link)X(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":z(g?"/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/employee"):"/".concat(null===(i=window)||void 0===i?void 0:i.contextPath,"/citizen")),v();break;case"editProfile":x(),v();break;case"language":B((t=o).value),Digit.LocalizationService.changeLanguage(t.value,E.code),v();break;case"city":(e=>{var t,n,i,o=Digit.SessionStorage.get("citizen.userRequestObject"),r=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(t=>t.tenantId===e.value);if((null==r?void 0:r.length)>0&&(o.info.roles=r,o.info.tenantId=null==e?void 0:e.value),Digit.SessionStorage.set("Employee.tenantId",null==e?void 0:e.value),Digit.UserService.setUser(o),A(e),"undefined"!=typeof window&&null!==(n=window.location)&&void 0!==n&&null!==(n=n.href)&&void 0!==n&&n.includes("/".concat(null===(i=window)||void 0===i?void 0:i.contextPath,"/employee/"))){var l,a,s=(null===(l=location.state)||void 0===l?void 0:l.from)||"/".concat(null===(a=window)||void 0===a?void 0:a.contextPath,"/employee");z(s,{replace:!0})}try{"undefined"!=typeof window&&window.location.reload()}catch(e){console.warn("Failed to reload page:",e)}})(o),v()}}})({item:t,index:n,parentIndex:i})}}):(0,d.jsx)(f.A,{logout:p})},S=n(8320),j=n.n(S),_=/[A-Z]/g,w=/^ms-/,C={};function N(e){return"-"+e.toLowerCase()}const E=function(e){if(C.hasOwnProperty(e))return C[e];var t=e.replace(_,N);return C[e]=w.test(t)?"-"+t:t};var D=n(7598),P=n.n(D);const I=P().oneOfType([P().string,P().number]),T={all:P().bool,grid:P().bool,aural:P().bool,braille:P().bool,handheld:P().bool,print:P().bool,projection:P().bool,screen:P().bool,tty:P().bool,tv:P().bool,embossed:P().bool},A={orientation:P().oneOf(["portrait","landscape"]),scan:P().oneOf(["progressive","interlace"]),aspectRatio:P().string,deviceAspectRatio:P().string,height:I,deviceHeight:I,width:I,deviceWidth:I,color:P().bool,colorIndex:P().bool,monochrome:P().bool,resolution:I,type:Object.keys(T)},{type:L,...R}=A,M={minAspectRatio:P().string,maxAspectRatio:P().string,minDeviceAspectRatio:P().string,maxDeviceAspectRatio:P().string,minHeight:I,maxHeight:I,minDeviceHeight:I,maxDeviceHeight:I,minWidth:I,maxWidth:I,minDeviceWidth:I,maxDeviceWidth:I,minColor:P().number,maxColor:P().number,minColorIndex:P().number,maxColorIndex:P().number,minMonochrome:P().number,maxMonochrome:P().number,minResolution:I,maxResolution:I,...R};var k={all:{...T,...M},types:T,matchers:A,features:M};const U=(0,i.createContext)(void 0),B=e=>{if(e)return Object.keys(e).reduce((t,n)=>(t[E(n)]=e[n],t),{})},F=()=>{const e=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{e.current=!0},[]),e.current},V=e=>{const t=()=>(e=>e.query||(e=>{const t=[];return Object.keys(k.all).forEach(n=>{const i=e[n];null!=i&&t.push(((e,t)=>{const n=E(e);return"number"==typeof t&&(t=`${t}px`),!0===t?n:!1===t?`not ${n}`:`(${n}: ${t})`})(n,i))}),t.join(" and ")})(e))(e),[n,o]=(0,i.useState)(t);return(0,i.useEffect)(()=>{const e=t();n!==e&&o(e)},[e]),n},G=(e,t,n)=>{const o=(e=>{const t=(0,i.useContext)(U),n=()=>B(e)||B(t),[o,r]=(0,i.useState)(n);return(0,i.useEffect)(()=>{const e=n();(function(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),i=Object.keys(t),o=n.length;if(i.length!==o)return!1;for(let i=0;i<o;i++){const o=n[i];if(e[o]!==t[o]||!Object.prototype.hasOwnProperty.call(t,o))return!1}return!0})(o,e)||r(e)},[e,t]),o})(t),r=V(e);if(!r)throw new Error("Invalid or missing MediaQuery!");const l=((e,t)=>{const n=()=>j()(e,t||{},!!t),[o,r]=(0,i.useState)(n),l=F();return(0,i.useEffect)(()=>{if(l){const e=n();return r(e),()=>{e&&e.dispose()}}},[e,t]),o})(r,o),a=(e=>{const[t,n]=(0,i.useState)(e.matches);return(0,i.useEffect)(()=>{const t=e=>{n(e.matches)};return e.addListener(t),n(e.matches),()=>{e.removeListener(t)}},[e]),t})(l),s=F();return(0,i.useEffect)(()=>{s&&n&&n(a)},[a]),(0,i.useEffect)(()=>()=>{l&&l.dispose()},[]),a},H=({children:e,device:t,onChange:n,...i})=>{const o=G(i,t,n);return"function"==typeof e?e(o):o?e:null},z=()=>{var e,t,n,{isLoading:i,data:o}=Digit.Hooks.useAccessControl(),r=Digit.Utils.getMultiRootTenant(),{t:s}=(0,m.useTranslation)(),c=(0,a.useNavigate)(),u=null===(e=Digit)||void 0===e||null===(e=e.ULBService)||void 0===e?void 0:e.getStateId();function v(){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"==typeof e[t]&&!Array.isArray(e[t])){var i=v(e[t]);if(i)return i}}return null}function p(e,t){for(var n in t)t.hasOwnProperty(n)&&("object"!=typeof t[n]||Array.isArray(t[n])?e[n]||(e[n]=t[n]):(e[n]||(e[n]={}),p(e[n],t[n])))}var f={};null==o||o.actions.filter(e=>"url"===e.url).forEach(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,i=null==e||null===(n=e.path)||void 0===n?void 0:n.split("."),o={};i.reduce((t,n,o)=>{if(o!==i.length-1)return t[n]={},t[n];t[n]={item:e}},o),p(f,o)}});var g=e=>(e.sort((e,t)=>(void 0!==e.orderNumber?e.orderNumber:1/0)-(void 0!==t.orderNumber?t.orderNumber:1/0)),e.forEach(e=>{e.children&&e.children.length>0&&g(e.children)}),e),y=function(e){var t=(e,n)=>{if(n.item)return{label:s(n.item.displayName),icon:{icon:n.item.leftIcon,width:"1.5rem",height:"1.5rem"},navigationUrl:n.item.navigationURL,orderNumber:n.item.orderNumber};var i=Object.keys(n).map(e=>t(e,n[e])),o=v(n);return{label:s(e),icon:{icon:o,width:"1.5rem",height:"1.5rem"},children:i}};return Object.keys(e).map(n=>t(n,e[n]))}((e=>{var t=Object.entries(e);return t.sort((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:0),Object.fromEntries(t)})(f)),h=g(y);return i?(0,d.jsx)(l.Loader,{}):f?(0,d.jsx)(H,{minWidth:768,children:(0,d.jsx)(l.SideNav,{items:h,hideAccessbilityTools:!0,onSelect:e=>{var{item:t,index:n,parentIndex:i}=e;return(e=>{var{item:t,index:n,parentIndex:i}=e;null!=t&&t.navigationUrl&&function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("/"!=i)if(-1===(null===(e=i)||void 0===e?void 0:e.indexOf("/".concat(null===(t=window)||void 0===t?void 0:t.contextPath)))){var o=window.location.origin,l=null;if(r)n(l=i=i.replace("/sandbox-ui/employee","/sandbox-ui/".concat(u,"/employee")));else{l=o+i;try{"undefined"!=typeof window&&(window.location.href=l)}catch(e){console.warn("Navigation failed, attempting fallback:",e);try{window.location.replace(l)}catch(e){console.error("All navigation methods failed:",e)}}}}else n(i)}(c,null==t?void 0:t.navigationUrl)})({item:t,index:n,parentIndex:i})},theme:(null===(t=window)||void 0===t||null===(t=t.globalConfigs)||void 0===t?void 0:t.getConfig("SIDENAV_THEME"))||"dark",variant:(null===(n=window)||void 0===n||null===(n=n.globalConfigs)||void 0===n?void 0:n.getConfig("SIDENAV_VARIANT"))||"primary",transitionDuration:"",className:"",styles:{},expandedWidth:"",collapsedWidth:"",onBottomItemClick:()=>{}})}):""},W=e=>{var{t,CITIZEN:n,isSidebarOpen:i,toggleSidebar:o,handleLogout:r,mobileView:l,userDetails:a,modules:s,linkData:c,islinkDataLoading:u,userProfile:v}=e;return n?(0,d.jsx)(x,{isOpen:i,isMobile:!0,toggleSidebar:o,onLogout:r,linkData:c,islinkDataLoading:u,userProfile:v,isEmployee:!1}):!i&&null!=a&&a.access_token?(0,d.jsx)("div",{className:"digit-employeeSidebar",children:(0,d.jsx)(z,{mobileView:l,userDetails:a,modules:s})}):(0,d.jsx)("div",{className:"digit-citizenSidebar",children:(0,d.jsx)(x,{isOpen:i,isMobile:!0,toggleSidebar:o,onLogout:r,isEmployee:!0,userProfile:v})})};var q=n(6810);const X=e=>{var{t,stateInfo:n,userDetails:r,CITIZEN:l,cityDetails:s,mobileView:c,handleUserDropdownSelection:u,logoUrl:v,logoUrlWhite:m,showSidebar:f=!0,showLanguageChange:g,linkData:y,islinkDataLoading:h}=e,[b,O]=(0,i.useState)(!1),x=(0,a.useNavigate)(),[S,j]=(0,i.useState)(!1),_=()=>{O(!1),j(!0)},w=()=>{j(!1)},C=()=>{O(!b)},N=()=>{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"))},E=[{name:t("EDIT_PROFILE"),icon:"Edit",func:N},{name:t("CORE_COMMON_LOGOUT"),icon:"Logout",func:_}];return(0,d.jsxs)(o().Fragment,{children:[(0,d.jsx)(p,{t,stateInfo:n,toggleSidebar:C,isSidebarOpen:b,handleLogout:_,userDetails:r,CITIZEN:l,cityDetails:s,mobileView:c,userOptions:E,handleUserDropdownSelection:u,logoUrl:v,logoUrlWhite:m,showLanguageChange:g}),S&&(0,d.jsx)(q.A,{onSelect:()=>{Digit.UserService.logout(),j(!1)},onCancel:w,onDismiss:w}),l?l?f&&b&&(0,d.jsx)(W,{t,CITIZEN:l,isSidebarOpen:b,toggleSidebar:C,handleLogout:_,mobileView:c,userDetails:r,linkData:y,userProfile:N,islinkDataLoading:h}):null:f&&(0,d.jsx)(W,{t,CITIZEN:l,isSidebarOpen:b,toggleSidebar:C,handleLogout:_,mobileView:c,userDetails:r,linkData:y,userProfile:N,islinkDataLoading:h})]})}},5053(e){"use strict";e.exports=a},5181(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(4883),o=n(6870);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function l(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".digit-home-main";return function(n){return(0,i.useEffect)(()=>{var e=n=>{if("Tab"===n.key){var i=document.querySelector(t);i&&(i.setAttribute("tabindex","-1"),i.style.outline="none",i.focus()),window.removeEventListener("keydown",e)}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),(0,o.jsx)(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){l(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},n))}}},5383(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>m});var i,o,r=n(6243),l=n(5053),a=n(4883),s=n(5953),c=n(4442),u=n(5697),d=n(6177),v=n(6870),p={label:"English",value:null===(i=Digit)||void 0===i||null===(i=i.Utils)||void 0===i||null===(o=i.getDefaultLanguage)||void 0===o?void 0:o.call(i)};const m=()=>{var e,t,n,i,{data:o,isLoading:m}=Digit.Hooks.useStore.getInitData(),{t:f}=(0,s.useTranslation)(),g=(0,c.useNavigate)(),{languages:y,stateInfo:h}=o||{},b=y;b&&0!=(null===(e=b)||void 0===e?void 0:e.length)||(b=[p]);var O,x=Digit.StoreData.getCurrentLanguage(),[S,j]=(0,a.useState)(x),_=(null==y?void 0:y.length)>1;return m?(0,v.jsx)(r.Loader,{}):_?(0,v.jsxs)(u.A,{children:[(0,v.jsxs)(r.Card,{className:"bannerCard removeBottomMargin languageSelection",children:[(0,v.jsxs)("div",{className:"bannerHeader",children:[(0,v.jsx)(d.A,{className:"bannerLogo",src:null==h?void 0:h.logoUrl,alt:"Digit Banner Image"}),(0,v.jsx)("p",{children:f("TENANT_TENANTS_".concat(null==h||null===(t=h.code)||void 0===t?void 0:t.toUpperCase()))})]}),(0,v.jsx)("div",{className:"language-selector",style:{justifyContent:"space-around",marginBottom:"24px",padding:"0 5%"},children:b.map((e,t)=>(0,v.jsx)("div",{className:"language-button-container",children:(0,v.jsx)(l.CustomButton,{selected:e.value===S,text:f(e.label),onClick:()=>(e=>{j(e.value),Digit.LocalizationService.changeLanguage(e.value,h.code)})(e)})},t))}),(0,v.jsx)(r.SubmitBar,{style:{width:"100%"},label:f("CORE_COMMON_CONTINUE"),onSubmit:e=>{var t;g("/".concat((t=window.contextPath,t&&"string"==typeof t?t.split("/")[0]:""),"/user/login?ts=").concat(Date.now()))}})]}),(0,v.jsxs)("div",{className:"EmployeeLoginFooter",children:[(0,v.jsx)(d.A,{alt:"Powered by DIGIT",src:null===(n=window)||void 0===n||null===(n=n.globalConfigs)||void 0===n||null===(i=n.getConfig)||void 0===i?void 0:i.call(n,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:()=>{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,v.jsx)(c.Navigate,{to:"/".concat(null===(O=window)||void 0===O?void 0:O.contextPath,"/employee/user/login"),replace:!0})}},5419(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(4883),o=n(4650),r=n(5953),l=n(6870);const a=e=>{var t,{bannerImages:n=[]}=e,[a,s]=(0,i.useState)(0),{t:c}=(0,r.useTranslation)(),u=n||(null===(t=o.m[0])||void 0===t?void 0:t.bannerImages)||[],d=()=>{s(e=>e===u.length-1?0:e+1)};return(0,i.useEffect)(()=>{var e=setInterval(()=>{d()},5e3);return()=>clearInterval(e)},[u.length]),(0,l.jsx)(i.Fragment,{children:(0,l.jsxs)("div",{className:"carousel-container",children:[u.sort((e,t)=>(null==e?void 0:e.id)-(null==t?void 0:t.id)).map((e,t)=>(0,l.jsx)("div",{className:"carousel-slide ".concat(t===a?"active":""),style:{backgroundImage:"url(".concat(e.image,")")},children:(0,l.jsxs)("div",{className:"carousel-content",children:[(0,l.jsx)("h2",{children:c(e.title)}),(0,l.jsx)("p",{children:c(e.description)})]})},e.id)),(0,l.jsxs)("div",{className:"carousel-controls",children:[(0,l.jsx)("button",{className:"carousel-nav",onClick:()=>{s(e=>0===e?u.length-1:e-1)},children:"<"}),(0,l.jsx)("div",{className:"carousel-indicators",children:u.map((e,t)=>(0,l.jsx)("button",{className:"indicator ".concat(t===a?"active":""),onClick:()=>(e=>{s(e)})(t)},t))}),(0,l.jsx)("button",{className:"carousel-nav",onClick:d,children:">"})]})]})})}},5660(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(6243),o=(n(4883),n(5953)),r=n(6177),l=n(6870);const a=e=>{var t,{showTenant:n=!0}=e,{data:a,isLoading:s}=Digit.Hooks.useStore.getInitData(),{stateInfo:c}=a||{},{t:u}=(0,o.useTranslation)();return s?(0,l.jsx)(i.Loader,{}):(0,l.jsxs)("div",{className:"bannerHeader",children:[(0,l.jsx)(r.A,{className:"bannerLogo",src:null==c?void 0:c.logoUrl,style:n?{}:{borderRight:"unset"},alt:"Digit Banner"}),n&&(null==c?void 0:c.code)&&(0,l.jsx)("p",{children:u("TENANT_TENANTS_".concat(null==c||null===(t=c.code)||void 0===t?void 0:t.toUpperCase()))})]})}},5697(e,t,n){"use strict";n.d(t,{A:()=>o}),n(4883);var i=n(6870);const o=e=>{var{children:t}=e;return(0,i.jsx)("div",{className:"banner banner-container",children:t})}},5953(e){"use strict";e.exports=n},6177(e,t,n){"use strict";n.d(t,{A:()=>d}),n(4883);var i=n(7598),o=n.n(i),r=n(6870),l=["src","alt","decorative","ariaLabel","ariaLabelledby"];function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function s(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){c(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 c(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=e=>{var{src:t,alt:n="Image not found",decorative:i=!1,ariaLabel:o="No Image description set",ariaLabelledby:a="no-image-description"}=e,c=function(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,l),u={};return i?u.alt="":n?u.alt=n:o?u["aria-label"]=o:a?u["aria-labelledby"]=a:console.warn("AccessibleImage: Missing alt, aria-label, or aria-labelledby for non-decorative image."),(0,r.jsx)("img",s(s(s({src:t},u),c),{},{tabIndex:0,onKeyDown: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()}}))};u.propTypes={src:o().string.isRequired,alt:o().string,decorative:o().bool,ariaLabel:o().string,ariaLabelledby:o().string};const d=u},6243(t){"use strict";t.exports=e},6340(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s}),n(4883);var i=n(5953),o=n(6177),r=n(6870),l={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"}},a={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=e=>{var t,{type:n="error"}=Digit.Hooks.useQueryParams(),s=null==e||null===(t=e.errorData)||void 0===t?void 0:t.module,{t:c}=(0,i.useTranslation)(),u=s?a[s]:l[n];return e.stateInfo,(0,r.jsx)("div",{className:"error-boundary",children:(0,r.jsxs)("div",{className:"error-container",children:[(0,r.jsx)(o.A,{src:u.imgUrl,alt:"error"}),(0,r.jsx)("h1",{children:c(u.infoMessage)}),(0,r.jsx)("button",{onClick:()=>{var t,n;s?null==e||null===(t=e.errorData)||void 0===t||t.action():null==e||null===(n=e.goToHome)||void 0===n||n.call(e)},children:c(u.buttonInfo)})]})})}},6614(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>d});var i=n(5053),o=(n(4883),n(5953)),r=n(4442),l=n(6177),a=n(6870);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=()=>{var e,t,n,s,u,d,v,p,m,f,g,y,h,b,O,x,{t:S}=(0,o.useTranslation)(),j=(0,r.useNavigate)(),_=Digit.Utils.getMultiRootTenant()?Digit.ULBService.getStateId():Digit.ULBService.getCitizenCurrentTenant(!0),{data:{stateInfo:w,uiHomePage:C}={},isLoading:N}=Digit.Hooks.useStore.getInitData(),E=window.Digit.Utils.browser.isMobile(),D=()=>{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)},{data:P,isLoading:I}=Digit.Hooks.useEvents({tenantId:_,variant:"whats-new",config:{enabled:D()}});_||j("/".concat(null===(x=window)||void 0===x?void 0:x.contextPath,"/citizen/select-language"));var T,A,L=null==C?void 0:C.appBannerDesktop,R=null==C?void 0:C.appBannerMobile,M=null==C?void 0:C.citizenServicesCard,k=null==C?void 0:C.informationAndUpdatesCard,U=null==C?void 0:C.whatsAppBannerDesktop,B=null==C?void 0:C.whatsAppBannerMobile,F=null==C?void 0:C.whatsNewSection,V=null==C?void 0:C.redirectURL;V&&j("/".concat(null===(T=window)||void 0===T?void 0:T.contextPath,"/citizen/").concat(V)),(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!==(s=n.includes)&&void 0!==s&&s.call(n,"sandbox-ui"))&&j("/".concat(null===(A=window)||void 0===A?void 0:A.contextPath,"/citizen/all-services"));var G=e=>{window.open(null==e?void 0:e.navigationUrl)},H={header:S(null==M?void 0:M.headerLabel),sideOption:{name:S(null==M||null===(u=M.sideOption)||void 0===u?void 0:u.name),onClick:()=>{var e;return j(null==M||null===(e=M.sideOption)||void 0===e?void 0:e.navigationUrl)}},options:[{name:S(null==M||null===(d=M.props)||void 0===d||null===(d=d[0])||void 0===d?void 0:d.label),Icon:(0,a.jsx)(i.ComplaintIcon,{}),onClick:()=>{var e;return j(null==M||null===(e=M.props)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.navigationUrl)}},{name:S(null==M||null===(v=M.props)||void 0===v||null===(v=v[1])||void 0===v?void 0:v.label),Icon:(0,a.jsx)(i.PTIcon,{className:"fill-path-primary-main"}),onClick:()=>{var e;return j(null==M||null===(e=M.props)||void 0===e||null===(e=e[1])||void 0===e?void 0:e.navigationUrl)}},{name:S(null==M||null===(p=M.props)||void 0===p||null===(p=p[2])||void 0===p?void 0:p.label),Icon:(0,a.jsx)(i.CaseIcon,{className:"fill-path-primary-main"}),onClick:()=>{var e;return j(null==M||null===(e=M.props)||void 0===e||null===(e=e[2])||void 0===e?void 0:e.navigationUrl)}},{name:S(null==M||null===(m=M.props)||void 0===m||null===(m=m[3])||void 0===m?void 0:m.label),Icon:(0,a.jsx)(i.OBPSIcon,{}),onClick:()=>{var e;return j(null==M||null===(e=M.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%"}},z={header:S(null==k?void 0:k.headerLabel),sideOption:{name:S(null==k||null===(f=k.sideOption)||void 0===f?void 0:f.name),onClick:()=>{var e;return j(null==k||null===(e=k.sideOption)||void 0===e?void 0:e.navigationUrl)}},options:[{name:S(null==k||null===(g=k.props)||void 0===g||null===(g=g[0])||void 0===g?void 0:g.label),Icon:(0,a.jsx)(i.HomeIcon,{}),onClick:()=>{var e;return j(null==k||null===(e=k.props)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.navigationUrl)}},{name:S(null==k||null===(y=k.props)||void 0===y||null===(y=y[1])||void 0===y?void 0:y.label),Icon:(0,a.jsx)(i.Calender,{}),onClick:()=>{var e;return j(null==k||null===(e=k.props)||void 0===e||null===(e=e[1])||void 0===e?void 0:e.navigationUrl)}},{name:S(null==k||null===(h=k.props)||void 0===h||null===(h=h[2])||void 0===h?void 0:h.label),Icon:(0,a.jsx)(i.DocumentIcon,{}),onClick:()=>{var e;return j(null==k||null===(e=k.props)||void 0===e||null===(e=e[2])||void 0===e?void 0:e.navigationUrl)}},{name:S(null==k||null===(b=k.props)||void 0===b||null===(b=b[3])||void 0===b?void 0:b.label),Icon:(0,a.jsx)(i.DocumentIcon,{}),onClick:()=>{var e;return j(null==k||null===(e=k.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 N?(0,a.jsx)(i.Loader,{}):(0,a.jsx)("div",{className:"HomePageContainer",children:(0,a.jsxs)("div",{className:"HomePageWrapper",children:[(0,a.jsxs)("div",{className:"BannerWithSearch",children:[E?(0,a.jsx)(l.A,{src:null==R?void 0:R.bannerUrl,alt:"Banner Image"}):(0,a.jsx)(l.A,{src:null==L?void 0:L.bannerUrl,alt:"Banner Image"}),(0,a.jsxs)("div",{className:"ServicesSection",children:[(0,a.jsx)(i.CardBasedOptions,c({style:{marginTop:"-30px"}},H)),(0,a.jsx)(i.CardBasedOptions,c({style:E?{}:{marginTop:"-30px"}},z))]})]}),(B||U)&&(0,a.jsx)("div",{className:"WhatsAppBanner",children:E?(0,a.jsx)(l.A,{src:null==B?void 0:B.bannerUrl,onClick:()=>G(B),alt:"Whatsapp Banner"}):(0,a.jsx)(l.A,{src:null==U?void 0:U.bannerUrl,onClick:()=>G(U),alt:"Whatsapp Banner"})}),D()?I?(0,a.jsx)(i.Loader,{}):(0,a.jsxs)("div",{className:"WhatsNewSection",children:[(0,a.jsxs)("div",{className:"headSection",children:[(0,a.jsx)("h2",{children:S(null==F?void 0:F.headerLabel)}),(0,a.jsx)("p",{onClick:()=>{var e;return j(null==F||null===(e=F.sideOption)||void 0===e?void 0:e.navigationUrl)},children:S(null==F||null===(O=F.sideOption)||void 0===O?void 0:O.name)})]}),(0,a.jsx)(i.WhatsNewCard,c({},null==P?void 0:P[0]))]}):null]})})}},6810(e,t,n){"use strict";n.d(t,{A:()=>l});var i=n(6243),o=(n(4883),n(5953)),r=n(6870);const l=e=>{var{onSelect:t,onCancel:n,onDismiss:l,PopupStyles:a,isDisabled:s,hideSubmit:c}=e,{t:u}=(0,o.useTranslation)(),d=[(0,r.jsx)("div",{children:(0,r.jsxs)(i.CardText,{children:[u("CORE_LOGOUT_WEB_CONFIRMATION_MESSAGE")+" ",(0,r.jsx)("strong",{children:u("CORE_LOGOUT_MESSAGE")})]})})],v=[(0,r.jsx)(i.Button,{type:"button",size:"large",variation:"secondary",label:u("CORE_LOGOUT_CANCEL"),className:"logout-cancel-button",onClick:n}),(0,r.jsx)(i.Button,{type:"button",size:"large",variation:"primary",label:u("CORE_LOGOUT_WEB_YES"),formId:"modal-action",onClick:t,isDisabled:s})],p=[(0,r.jsx)(i.Button,{type:"button",size:"large",variation:"digit-action-cancel",label:u("CORE_LOGOUT_CANCEL"),className:"logout-cancel-button",onClick:n})];return(0,r.jsx)(i.PopUp,{type:"default",children:d,heading:u("CORE_LOGOUT_WEB_HEADER"),footerChildren:c?p:v,sortFooterButtons:!0,onClose:l,className:"digit-logout-popup-wrapper",onOverlayClick:l,equalWidthButtons:!0,style:a})}},6870(e,t,n){"use strict";e.exports=n(3060)},6945(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>v});var i=n(6243),o=n(5053),r=n(4883),l=n(5953),a=n(4442),s=n(6870);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const v=()=>{var{t:e}=(0,l.useTranslation)(),t=(0,a.useNavigate)(),n=(0,a.useLocation)(),{data:{stateInfo:c,uiHomePage:d}={},isLoading:v}=Digit.Hooks.useStore.getInitData(),p=null==d?void 0:d.redirectURL,{data:m,isLoading:f}=Digit.Hooks.useTenants(),[g,y]=(0,r.useState)(()=>({code:Digit.ULBService.getCitizenCurrentTenant(!0)})),[h,b]=(0,r.useState)(!1),O=(0,r.useMemo)(()=>({header:e("CS_COMMON_CHOOSE_LOCATION"),submitBarLabel:e("CORE_COMMON_CONTINUE")}),[e]);function x(e){y(e),b(!1)}var S=(0,r.useMemo)(()=>({options:m,optionsKey:"i18nKey",additionalWrapperClass:"digit-reverse-radio-selection-wrapper",onSelect:x,selectedOption:g}),[m,e,g]);return f?(0,s.jsx)("loader",{}):(0,s.jsxs)("div",{className:"selection-card-wrapper",children:[(0,s.jsx)(i.BackLink,{onClick:()=>window.history.back()}),(0,s.jsxs)(o.PageBasedInput,{texts:O,onSubmit:function(){if(g){var e;Digit.SessionStorage.set("CITIZEN.COMMON.HOME.CITY",g);var i,o,r=null===(e=n.state)||void 0===e?void 0:e.redirectBackTo;p?t("/".concat(null===(i=window)||void 0===i?void 0:i.contextPath,"/citizen/").concat(p)):r?t(r,{replace:!0}):t("/".concat(null===(o=window)||void 0===o?void 0:o.contextPath,"/citizen"))}else b(!0)},className:"location-selection-container",children:[(0,s.jsx)(o.CardHeader,{children:e("CS_COMMON_CHOOSE_LOCATION")}),(0,s.jsx)(o.SearchOnRadioButtons,u(u({},S),{},{placeholder:e("COMMON_TABLE_SEARCH")})),h?(0,s.jsx)(o.CardLabelError,{children:e("CS_COMMON_LOCATION_SELECTION_ERROR")}):null]})]})}},7183(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7288(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>E});var i=n(6243),o=n(4883),r=n(5953),l=n(4442),a=[{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]+)*$"}}]}],s=n(6870);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const v=e=>{var t,{t:n,onSelect:r,mobileNumber:l,emailId:a,onMobileChange:c,onEmailChange:d,config:v,canSubmit:p}=e,[m,f]=(0,o.useState)(!!a),[g,y]=(0,o.useState)(""),h=(null===(t=window)||void 0===t||null===(t=t.globalConfigs)||void 0===t?void 0:t.getConfig("CORE_MOBILE_CONFIGS"))||{},b=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,O=(null==h?void 0:h.mobileNumberPattern)||"^\\d+$",x=new RegExp(O),S=(0,o.useMemo)(()=>b.test(a),[a]),j=(0,o.useMemo)(()=>x.test(l||""),[l,x]),_=(0,o.useMemo)(()=>m?!(S&&p):!(j&&p),[m,S,j,p]),w=(0,o.useMemo)(()=>window.innerWidth<=768?n(m?"LOGIN_WITH_MOBILE":"LOGIN_WITH_EMAIL"):n(m?"CS_USE_MOBILE_INSTEAD":"CS_LOGIN_REGISTER_WITH_EMAIL"),[m,n]);return(0,s.jsxs)(i.InputCard,{t:n,texts:null==v?void 0:v.texts,submit:!0,onNext:()=>{if(m){if(!S)return void y(n("ERR_INVALID_EMAIL"));r({userName:a})}else{if(!j)return void y(n("ERR_INVALID_MOBILE_NUMBER"));r({mobileNumber:l})}},isDisable:_,children:[(0,s.jsx)("div",{children:(0,s.jsx)(i.FieldV1,{withoutLabel:!0,charCount:!0,error:g,onChange:e=>{var t=e.target.value;y(""),m?(d(e),t&&!b.test(t)&&y(n("ERR_INVALID_EMAIL"))):(c(e),t&&!x.test(t)&&y(n("ERR_INVALID_MOBILE_NUMBER")))},placeholder:n(m?"ENTER_EMAIL_PLACEHOLDER":"ENTER_MOBILE_PLACEHOLDER"),populators:{name:m?"userName":"mobileNumber",prefix:m?"":null==h?void 0:h.mobilePrefix,validation:{maxlength:m?256:(null==h?void 0:h.mobileNumberLength)||10,pattern:m?b:x}},props:{fieldStyle:{width:"100%"}},type:"text",value:m?a:l},m?"email":"mobile")}),(0,s.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"1rem",marginBottom:"1.5rem",marginTop:"-24px"},children:(0,s.jsx)(i.LinkLabel,{style:u({display:"inline"},{marginLeft:"0px",userSelect:"none",color:"inherit",cursor:"pointer",textDecoration:"underline"}),onClick:()=>{f(!m),y(""),m?d({target:{value:""}}):c({target:{value:""}})},children:w})})]})},p=e=>{var{config:t,onSelect:n,t:o,isDisabled:r}=e;return(0,s.jsx)(i.FormStep,{config:t,onSelect:n,t:o,isDisabled:r})};var m,f=n(743),g=["ResponseInfo","UserRequest"],y=["ResponseInfo","UserRequest"];function h(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function b(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}function O(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){b(r,i,o,l,a,"next",e)}function a(e){b(r,i,o,l,a,"throw",e)}l(void 0)})}}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach(function(t){j(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function j(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _={type:"register"},w={type:"login"},C="/".concat(null===(m=window)||void 0===m?void 0:m.contextPath,"/citizen"),N=(e,t)=>(null==e?void 0:e.from)||(null==t?void 0:t.from)||C;const E=e=>{var t,n,{stateCode:c,isUserRegistered:u=!0}=e,{t:d}=(0,r.useTranslation)(),m=(0,l.useLocation)(),b=(0,l.useNavigate)(),[x,j]=(0,o.useState)(null),[E,D]=(0,o.useState)(null),[P,I]=(0,o.useState)(!0),[T,A]=(0,o.useState)(null),[L,R]=(0,o.useState)(u?{}:null==m||null===(t=m.state)||void 0===t?void 0:t.data),[M,k]=(0,o.useState)(null),U=Digit.Hooks.useQueryParams(),[B,F]=(0,o.useState)(!1),[V,G]=(0,o.useState)(!0),[H,z]=(0,o.useState)(!0);(0,o.useEffect)(()=>{var e;return E&&(M&&(clearTimeout(M),k(null)),e=setTimeout(()=>{D("")},5e3),k(e)),()=>{e&&clearTimeout(e)}},[E]),(0,o.useEffect)(()=>{var e;if(x){Digit.SessionStorage.set("citizen.userRequestObject",x),Digit.UserService.setUser(x),((e,t,n)=>{var i;if(!Digit.Utils.getMultiRootTenant()){var o=null===(i=JSON.parse(sessionStorage.getItem("Digit.initData")))||void 0===i||null===(i=i.value)||void 0===i?void 0:i.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==x?void 0:x.info,null==x?void 0:x.access_token,c);var t,n=(null===(e=m.state)||void 0===e?void 0:e.from)||C;Digit.ULBService.getCitizenCurrentTenant(!0)?b(n,{replace:!0}):b("/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/citizen/select-location"),{state:{redirectBackTo:n},replace:!0})}},[x]);var W=(0,o.useMemo)(()=>a.map(e=>{var t={};for(var n in e.texts)t[n]=d(e.texts[n]);return S(S({},e),{},{texts:t})},[a])),q=function(){var e=O(function*(e){z(!1),R(S(S({},L),e));var t=S(S({},e),{},{tenantId:c,userType:"citizen"});if(u){var n,i,o,r,[l,a]=yield Y({otp:S(S({},t),w)});if(!a)return z(!0),void b("otp",{state:{from:N(m.state,U),role:null===(i=m.state)||void 0===i?void 0:i.role},replace:!0});z(!0),m.state&&"FSM_DSO"===m.state.role||b("/".concat(null===(o=window)||void 0===o?void 0:o.contextPath,"/citizen/register/name"),{state:{from:N(m.state,U),data:t}}),null!==(n=m.state)&&void 0!==n&&n.role&&(z(!0),D("FSM_DSO"===(null===(r=m.state)||void 0===r?void 0:r.role)?d("ES_ERROR_DSO_LOGIN"):"User not registered."))}else{var[s,v]=yield Y({otp:S(S({},t),_)});if(!v)return z(!0),void b("otp",{state:{from:N(m.state,U)},replace:!0});z(!0)}});return function(t){return e.apply(this,arguments)}}(),X=function(){var e=O(function*(e){var t=S(S({},L),{},{tenantId:c,userType:"citizen"},e);R(S(S({},L),e)),F(!0);var[n,i]=yield Y({otp:S(S({},t),_)});n?(F(!1),b("otp",{state:{from:N(m.state,U)},replace:!0})):F(!1)});return function(t){return e.apply(this,arguments)}}(),Q=function(){var e=O(function*(){try{I(!0),G(!1);var{mobileNumber:e,otp:t,name:n}=L;if(u){var i,o,r={username:e,password:t,tenantId:c,userType:"citizen"},l=yield Digit.UserService.authenticate(r),{ResponseInfo:a,UserRequest:s}=l,v=h(l,g);if(null!==(i=m.state)&&void 0!==i&&i.role){var p=s.roles.find(e=>e.code===m.state.role);if(!p||!p.code)return D(d("ES_ERROR_USER_NOT_PERMITTED")),void setTimeout(()=>b(C,{replace:!0}),5e3)}null!==(o=window)&&void 0!==o&&null!==(o=o.globalConfigs)&&void 0!==o&&o.getConfig("ENABLE_SINGLEINSTANCE")&&(s.tenantId=Digit.ULBService.getStateId()),j(S({info:s},v))}else if(!u){var f,O={name:n,username:e,otpReference:t,tenantId:c},x=yield Digit.UserService.registerUser(O,c),{ResponseInfo:_,UserRequest:w}=x,N=h(x,y);null!==(f=window)&&void 0!==f&&null!==(f=f.globalConfigs)&&void 0!==f&&f.getConfig("ENABLE_SINGLEINSTANCE")&&(w.tenantId=Digit.ULBService.getStateId()),j(S({info:w},N))}}catch(e){G(!0),I(!1)}});return function(){return e.apply(this,arguments)}}(),Z=function(){var e=O(function*(){var{mobileNumber:e}=L,t={mobileNumber:e,tenantId:c,userType:"citizen"};if(u){if(u)var[n,i]=yield Y({otp:S(S({},t),w)})}else var[o,r]=yield Y({otp:S(S({},t),_)})});return function(){return e.apply(this,arguments)}}(),Y=function(){var e=O(function*(e){try{return[yield Digit.UserService.sendOtp(e,c),null]}catch(e){return[null,e]}});return function(t){return e.apply(this,arguments)}}();return(0,s.jsx)("div",{className:"citizen-form-wrapper",children:(0,s.jsxs)(i.AppContainer,{children:[m.pathname.includes("login")?null:(0,s.jsx)(i.BackLink,{onClick:()=>b(-1)}),(0,s.jsxs)(l.Routes,{children:[" ",(0,s.jsx)(l.Route,{path:"/",element:(0,s.jsx)(v,{onSelect:q,config:W[0],mobileNumber:L.mobileNumber||"",onMobileChange:e=>{var{value:t}=e.target;R(S(S({},L),{},{mobileNumber:t}))},canSubmit:H,showRegisterLink:u&&!(null!==(n=m.state)&&void 0!==n&&n.role),t:d})}),(0,s.jsx)(l.Route,{path:"otp",element:(0,s.jsx)(f.A,{config:S(S({},W[1]),{},{texts:S(S({},W[1].texts),{},{cardText:"".concat(W[1].texts.cardText," ").concat(L.mobileNumber||"")})}),onOtpChange:e=>{R(S(S({},L),{},{otp:e}))},onResend:Z,onSelect:Q,otp:L.otp,error:P,canSubmit:V,t:d})}),(0,s.jsx)(l.Route,{path:"name",element:(0,s.jsx)(p,{config:W[2],onSelect:X,t:d,isDisabled:B})}),E&&(0,s.jsx)(i.Toast,{type:"error",label:E,onClose:()=>D(null)})]})]})})}},7598(e,t,n){e.exports=n(856)()},7973(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>c});var i=n(6243),o=n(4883),r=n(5953),l=n(338),a=n(6870);const s=e=>{var{question:t,answer:n,lastIndex:i}=e,[s,c]=(0,o.useState)(!1),{t:u}=(0,r.useTranslation)();return(0,a.jsxs)("div",{className:"faqs border-none",onClick:()=>c(!s),children:[(0,a.jsxs)("div",{className:"faq-question",style:{justifyContent:"space-between",display:"flex"},children:[(0,a.jsx)("span",{children:u(t)}),(0,a.jsx)("span",{className:s?"faqicon rotate":"faqicon",style:{float:"right"},children:(0,a.jsx)(l.ArrowForward,{})})]}),(0,a.jsx)("div",{className:"faq-answer",style:s?{display:"block"}:{display:"none"},children:(0,a.jsx)("span",{children:u(n)})}),i?null:(0,a.jsx)("div",{className:"cs-box-border"})]})},c=e=>{var t,n,{module:l}=e,c=Digit.UserService.getUser(),{t:u}=((null==c||null===(t=c.info)||void 0===t?void 0:t.tenantId)||Digit.ULBService.getCurrentTenantId(),(0,r.useTranslation)()),{isLoading:d,data:v}=Digit.Hooks.useGetFAQsJSON(Digit.ULBService.getStateId()),p=null==v||null===(n=v.MdmsRes["common-masters"])||void 0===n||null===(n=n.faqs[0])||void 0===n?void 0:n["".concat(l)].faqs;return d?(0,a.jsx)(i.Loader,{}):(0,a.jsx)(o.Fragment,{children:(0,a.jsxs)("div",{className:"faq-page",children:[(0,a.jsx)(i.BackButton,{style:{marginLeft:"unset"}}),(0,a.jsx)("div",{style:{marginBottom:"15px"},children:(0,a.jsx)(i.HeaderComponent,{styles:{marginLeft:"0px",paddingTop:"10px",fontSize:"32px"},children:u("FAQ_S")})}),(0,a.jsx)("div",{className:"faq-list",children:p.map((e,t)=>(0,a.jsx)(s,{question:e.question,answer:e.answer,lastIndex:t===(null==p?void 0:p.length)-1},"faq_"+t))})]})})}},8020(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>I});var i,o,r,l,a,s=n(6243),c=n(4883),u=n.n(c),d=n(5953),v=n(4442),p=(n(4217),n(1234)),m=n(5007),f=n(4781),g=n(6177),y=n(1603),h=n(6870),b=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,6340)),()=>n(6340).default,{loaderText:"Loading Error Component..."}),O=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,7973)),()=>n(7973).default,{loaderText:"Loading FAQs..."}),x=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,6614)),()=>n(6614).default,{loaderText:"Loading Home..."}),S=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,9466)),()=>n(9466).default,{loaderText:"Loading Language Selection..."}),j=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,6945)),()=>n(6945).default,{loaderText:"Loading Location Selection..."}),_=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,4872)),()=>n(4872).default,{loaderText:"Loading User Profile..."}),w=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,2339)),()=>n(2339).default,{loaderText:"Loading How It Works..."}),C=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,7288)),()=>n(7288).default,{loaderText:"Loading Login..."}),N=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,1737)),()=>n(1737).default,{loaderText:"Loading Search..."}),E=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,2346)),()=>n(2346).default,{loaderText:"Loading Dynamic Content..."}),D=["".concat(null===(i=window)||void 0===i?void 0:i.contextPath,"/citizen/register/name"),"/".concat(null===(o=window)||void 0===o?void 0:o.contextPath,"/citizen/select-language"),"/".concat(null===(r=window)||void 0===r?void 0:r.contextPath,"/citizen/select-location"),"/".concat(null===(l=window)||void 0===l?void 0:l.contextPath,"/citizen/login"),"/".concat(null===(a=window)||void 0===a?void 0:a.contextPath,"/citizen/register/otp")],P=(e,t)=>t.filter(t=>e.map(e=>e.code).includes(t.code));const I=e=>{var t,n,{stateInfo:i,userDetails:o,CITIZEN:r,cityDetails:l,mobileView:a,handleUserDropdownSelection:c,logoUrl:I,DSO:T,stateCode:A,modules:L,appTenants:R,sourceUrl:M,pathname:k,initData:U}=e,{isLoading:B,data:F,isFetched:V}=Digit.Hooks.useCustomMDMS(Digit.ULBService.getStateId(),"ACCESSCONTROL-ACTIONS-TEST",[{name:"actions-test",filter:"[?(@.url == '".concat(Digit.Utils.getMultiRootTenant()?window.globalPath:window.contextPath,"-card')]")}],{select: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(e=>!0===e.enabled).reduce((e,t)=>{var n;return e[t.parentModule]=(null===(n=e[t.parentModule])||void 0===n?void 0:n.length)>0?[t,...e[t.parentModule]]:[t],e},{})}}),G=Digit.Hooks.useRouteSubscription(k),{t:H}=(0,d.useTranslation)(),z=(0,v.useNavigate)(),W=((0,v.useLocation)(),D.some(e=>window.location.href.includes(e))),q=L.map((e,t)=>{var{code:n,tenants:i}=e;return(0,h.jsx)(v.Route,{path:"".concat(n.toLowerCase(),"/*"),element:(0,h.jsx)(y.A,{moduleCode:n,stateCode:A,userType:"citizen",tenants:P(i,R),maxRetries:3,retryDelay:1e3,initialDelay:800})},t)}),X=L.map((e,t)=>{var{code:n,bannerImage:o}=e,r=(Digit.ComponentRegistryService.getComponent("".concat(n,"Links")),V?(0,p.q)(F,n,H):void 0);return"ACTION_TEST_WS"===(null==r?void 0:r.header)&&(null==r||r.links.sort((e,t)=>t.orderNumber-e.orderNumber)),(0,h.jsxs)(u().Fragment,{children:[(0,h.jsx)(v.Route,{path:"".concat(n.toLowerCase(),"-home"),element:(0,h.jsxs)("div",{className:"moduleLinkHomePage",children:[(0,h.jsx)(g.A,{src:o||(null==i?void 0:i.bannerUrl),alt:"noimagefound"}),(0,h.jsx)(s.BackLink,{className:"moduleLinkHomePageBackButton",onClick:()=>z(-1)}),(0,h.jsx)("h1",{children:H("MODULE_"+n.toUpperCase())}),(0,h.jsx)("div",{className:"moduleLinkHomePageModuleLinks",children:r&&(0,h.jsx)(s.CitizenHomeCard,{header:H(null==r?void 0:r.header),links:null==r?void 0:r.links,Icon:()=>(0,h.jsx)("span",{}),Info:"OBPS"===n?()=>(0,h.jsx)(s.CitizenInfoLabel,{style:{margin:"0px",padding:"10px"},info:H("CS_FILE_APPLICATION_INFO_LABEL"),text:H("BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL")}):null,isInfo:"OBPS"===n})}),(0,h.jsx)(E,{moduleCode:null==n?void 0:n.toUpperCase()})]})}),(0,h.jsx)(v.Route,{path:"".concat(n.toLowerCase(),"-faq"),element:(0,h.jsx)(O,{module:null==n?void 0:n.toUpperCase()})}),(0,h.jsx)(v.Route,{path:"".concat(n.toLowerCase(),"-how-it-works"),element:(0,h.jsx)(w,{module:null==n?void 0:n.toUpperCase()})})]},n+"-routes")});return(0,h.jsxs)("div",{className:G,children:[(0,h.jsx)(m.A,{t:H,stateInfo:i,userDetails:o,CITIZEN:r,cityDetails:l,mobileView:a,handleUserDropdownSelection:c,logoUrl:I,showSidebar:!!r,linkData:F,islinkDataLoading:B}),(0,h.jsxs)("div",{className:"main center-container citizen-home-container mb-25",children:[W?null:(0,h.jsx)("div",{className:"SideBarStatic",children:(0,h.jsx)(f.A,{linkData:F,islinkDataLoading:B})}),(0,h.jsxs)(v.Routes,{children:[(0,h.jsx)(v.Route,{path:"/",element:(0,h.jsx)(x,{})}),(0,h.jsx)(v.Route,{path:"select-language",element:(0,h.jsx)(S,{})}),(0,h.jsx)(v.Route,{path:"select-location",element:(0,h.jsx)(j,{})}),(0,h.jsx)(v.Route,{path:"error",element:(0,h.jsx)(b,{initData:U,goToHome:()=>{var e,t,n;z("/".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,h.jsx)(v.Route,{path:"all-services",element:(0,h.jsx)(p.AppHome,{userType:"citizen",modules:L,getCitizenMenu:F,fetchedCitizen:V,isLoading:B})}),(0,h.jsx)(v.Route,{path:"login/*",element:(0,h.jsx)(C,{stateCode:A})}),(0,h.jsx)(v.Route,{path:"register/*",element:(0,h.jsx)(C,{stateCode:A,isUserRegistered:!1})}),(0,h.jsx)(v.Route,{path:"user/profile",element:(0,h.jsx)(_,{stateCode:A,userType:"citizen",cityDetails:l})}),(0,h.jsx)(v.Route,{path:"Audit",element:(0,h.jsx)(N,{})}),q,X]})]}),(0,h.jsx)("div",{className:"citizen-home-footer",style:window.location.href.includes("citizen/obps")?{zIndex:"-1"}:{},children:(0,h.jsx)(g.A,{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"),style:{height:"1.2em",cursor:"pointer"},onClick:()=>{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()}})})]})}},8259(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>O});var i=n(4883),o=n(5953),r=n(4442),l=[{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"}}],bannerImages:[{id:1,image:"https://images.unsplash.com/photo-1746277121508-f44615ff09bb",title:"A digital partner for frontline workers",description:"Lorem ipsum dolor sit amet consectetur adipisicing elit. Distinctio nobis temporibus provident expedita consequuntur, repudiandae pariatur! Deleniti molestias vero, cumque vel error labore ipsam totam?"},{id:2,image:"https://images.unsplash.com/photo-1581094271901-8022df4466f9",title:"Feature 2 Title",description:"Lorem, ipsum dolor sit amet consectetur adipisicing elit. Exercitationem esse doloribus molestiae fugiat eos adipisci sequi cumque sit, laboriosam dolores blanditiis nobis assumenda quasi nemo consectetur. Officia nesciunt quibusdam molestiae."},{id:3,image:"https://images.unsplash.com/photo-1624555130581-1d9cca783bc0",title:"Feature 3 Title",description:"Lorem ipsum dolor sit amet consectetur adipisicing elit. Cupiditate aut autem aperiam et modi saepe obcaecati doloremque voluptatem iusto quidem!"},{id:4,image:"https://images.unsplash.com/photo-1547481887-a26e2cacb5b2",title:"Feature 4 Title",description:"Lorem, ipsum dolor sit amet consectetur adipisicing elit. Exercitationem esse doloribus molestiae fugiat eos adipisci sequi cumque sit, laboriosam dolores blanditiis nobis assumenda quasi nemo consectetur. Officia nesciunt quibusdam molestiae."},{id:5,image:"https://images.unsplash.com/photo-1536782376847-5c9d14d97cc0",title:"Feature 5 Title",description:"Lorem, ipsum dolor sit amet consectetur adipisicing elit. Exercitationem esse doloribus molestiae fugiat eos adipisci sequi cumque sit, laboriosam dolores blanditiis nobis assumenda quasi nemo consectetur. Officia nesciunt quibusdam molestiae."},{id:6,image:"https://images.unsplash.com/photo-1490730141103-6cac27aaab94",title:"Feature 6 Title",description:"Lorem, ipsum dolor sit amet consectetur adipisicing elit. Exercitationem esse doloribus molestiae fugiat eos adipisci sequi cumque sit, laboriosam dolores blanditiis nobis assumenda quasi nemo consectetur. Officia nesciunt quibusdam molestiae."}]}],a=n(6243),s=n(7598),c=n.n(s),u=n(5697),d=n(5660),v=(n(6177),n(6870));function p(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}function m(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){p(r,i,o,l,a,"next",e)}function a(e){p(r,i,o,l,a,"throw",e)}l(void 0)})}}var f=e=>{var t,n,o,l,s,c,p,{config:f,t:g,isDisabled:y}=e,{data:h,isLoading:b}=Digit.Hooks.useTenants(),{data:O,isLoading:x}=Digit.Hooks.useStore.getInitData(),{stateInfo:S}=O||{},[j,_]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),N=(0,r.useNavigate)(),E=Digit.Hooks.useCustomAPIMutationHook({url:"/tenant-management/tenant/_create",params:{},body:{},config:{enable:!1}}),D=function(){var e=m(function*(e){var t;yield E.mutate({body:{tenant:{name:e.accountName,email:e.email}},config:{enable:!0}},{onError:(e,t)=>{var n,i;_({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===(i=e.response)||void 0===i||null===(i=i.data)||void 0===i||null===(i=i.Errors)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.code):"SANDBOX_SIGNUP_ERROR"})},onSuccess:(t=m(function*(e){var t,n,i;N({pathname:"/".concat(null===(t=window)||void 0===t?void 0:t.globalPath,"/user/otp"),state:{email:null==e||null===(n=e.Tenants[0])||void 0===n?void 0:n.email,tenant:null==e||null===(i=e.Tenants[0])||void 0===i?void 0:i.code}})}),function(e){return t.apply(this,arguments)})})});return function(t){return e.apply(this,arguments)}}(),P=[{body:null==f?void 0:f.inputs}],{mode:I}=Digit.Hooks.useQueryParams();return"admin"===I&&0==(null==P||null===(t=P[0])||void 0===t||null===(t=t.body)||void 0===t||null===(t=t[2])||void 0===t?void 0:t.disable)&&null==(null==P||null===(n=P[0])||void 0===n||null===(n=n.body)||void 0===n||null===(n=n[2])||void 0===n||null===(n=n.populators)||void 0===n?void 0:n.defaultValue)&&(P[0].body[2].disable=!0,P[0].body[2].isMandatory=!1,P[0].body[2].populators.defaultValue=defaultValue),b||x?(0,v.jsx)(a.Loader,{}):(0,v.jsxs)(u.A,{children:[(0,v.jsx)("div",{className:"employeeBackbuttonAlign",children:(0,v.jsx)(a.BackLink,{onClick:()=>window.history.back()})}),(0,v.jsx)(a.FormComposerV2,{onSubmit:D,isDisabled:y||w,noBoxShadow:!0,inline:!0,submitInForm:!0,config:P,label:null==f||null===(o=f.texts)||void 0===o?void 0:o.submitButtonLabel,secondaryActionLabel:null==f||null===(l=f.texts)||void 0===l?void 0:l.secondaryButtonLabel,onFormValueChange:(e,t,n)=>{var i=P[0].body.map(e=>e.key).some(e=>{var n=t[e];return null==n||""===n||"check"===e&&!1===n||"captcha"===e&&!1===n});C(i)},heading:null==f||null===(s=f.texts)||void 0===s?void 0:s.header,className:"sandbox-signup-form",cardSubHeaderClassName:"signupCardSubHeaderClassName",cardClassName:"signupCardClassName sandbox-onboarding-wrapper",buttonClassName:"buttonClassName",children:(0,v.jsx)(d.A,{showTenant:!1})}),j&&(0,v.jsx)(a.Toast,{type:"error",label:g(null==j?void 0:j.label),onClose:()=>{_(null)}}),(0,v.jsx)("div",{className:"employee-login-home-footer",style:{backgroundColor:"unset"},children:(0,v.jsx)("img",{alt:"Powered by DIGIT",src:null===(c=window)||void 0===c||null===(c=c.globalConfigs)||void 0===c||null===(p=c.getConfig)||void 0===p?void 0:p.call(c,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:()=>{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.propTypes={loginParams:c().any},f.defaultProps={loginParams:null};const g=f;function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach(function(t){b(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function b(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const O=e=>{var{stateCode:t}=e,{t:n}=(0,o.useTranslation)(),[a,s]=(0,i.useState)(l),c=Digit.StoreData.getCurrentLanguage(),{data:u}=Digit.Services.useStore({stateCode:t,moduleCode:["privacy-policy"],language:c,modulePrefix:"digit"}),{data:d,isLoading:p}=Digit.Hooks.useCommonMDMS(t,"commonUiConfig",["SignUpConfig"],{select:e=>{var t;return{config:null==e||null===(t=e.commonUiConfig)||void 0===t?void 0:t.SignUpConfig}},retry:!1});(0,i.useEffect)(()=>{!p&&null!=d&&d.config?s(d.config):s(l)},[d,p]);var m=(0,i.useMemo)(()=>a.map(e=>{var t={};for(var i in e.texts)t[i]=n(e.texts[i]);return h(h({},e),{},{texts:t})}),[a]);return(0,v.jsx)(r.Routes,{children:(0,v.jsx)(r.Route,{path:"",element:(0,v.jsx)(g,{config:m[0],t:n})})})}},8320(e,t,n){"use strict";var i=n(2161).Y,o="undefined"!=typeof window?window.matchMedia:null;function r(e,t,n){var r,l=this;function a(e){l.matches=e.matches,l.media=e.media}o&&!n&&(r=o.call(window,e)),r?(this.matches=r.matches,this.media=r.media,r.addListener(a)):(this.matches=i(e,t),this.media=e),this.addListener=function(e){r&&r.addListener(e)},this.removeListener=function(e){r&&r.removeListener(e)},this.dispose=function(){r&&r.removeListener(a)}}e.exports=function(e,t,n){return new r(e,t,n)}},8808(e,t,n){"use strict";n.d(t,{X:()=>i});var i="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"},9458(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>j});var i=n(4883),o=n.n(i),r=n(5953),l=n(4442),a=[{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"}]}],s=n(6243),c=n(7598),u=n.n(c),d=n(5697),v=n(5660),p=n(6177),m=n(5419),f=n(1065),g=n(6870);function y(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}var h=e=>{var t,n,r,a,{config:c,t:u,stateCode:h}=e,{data:b,isLoading:O}=Digit.Hooks.useTenants(),[x,S]=(0,i.useState)(null),j=(0,l.useNavigate)(),[_,w]=(0,i.useState)(null),{data:C}=(0,f.P)(h);if(null!=C&&C.config){var N,E=null==C||null===(N=C.config[0])||void 0===N?void 0:N.bannerImages;c.bannerImages=E}(0,i.useEffect)(()=>{var e,t;if(x){Digit.UserService.setUser(x);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");j(n,{replace:!0})}else Digit.UserService.setType("employee")},[x]);var D=()=>{w(null)},P=function(){var e,t=(e=function*(e){if(e.city){var t={otp:{mobileNumber:e.mobileNumber,userType:Digit.UserService.getType().toUpperCase(),type:"passwordreset",tenantId:e.city.code}};try{var n;yield Digit.UserService.sendOtp(t,e.city.code),j("/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/employee/user/change-password?mobile_number=").concat(e.mobileNumber,"&tenantId=").concat(e.city.code))}catch(e){var i;w((null==e||null===(i=e.response)||void 0===i||null===(i=i.data)||void 0===i||null===(i=i.error)||void 0===i||null===(i=i.fields)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.message)||"Invalid login credentials!"),setTimeout(D,5e3)}}else alert("Please Select City!")},function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){y(r,i,o,l,a,"next",e)}function a(e){y(r,i,o,l,a,"throw",e)}l(void 0)})});return function(e){return t.apply(this,arguments)}}(),I=()=>{var e;j("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/employee/login"))},[T,A]=c.inputs,L=[{body:[{label:u(T.label),type:T.type,populators:{name:T.name},isMandatory:!0},{label:u(A.label),type:A.type,populators:{name:A.name,optionsKey:"name",required:!0,options:b},isMandatory:!0}]}];return O?(0,g.jsx)(s.Loader,{page:!0,variant:"PageLoader"}):null!=c&&c.bannerImages?(0,g.jsx)(o().Fragment,{children:(0,g.jsxs)("div",{className:"login-container",children:[(0,g.jsx)(m.A,{bannerImages:null==c?void 0:c.bannerImages}),(0,g.jsxs)("div",{className:"login-form-container",children:[(0,g.jsx)(s.FormComposerV2,{onSubmit:P,noBoxShadow:!0,inline:!0,submitInForm:!0,config:L,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,g.jsx)(v.A,{})}),_&&(0,g.jsx)(s.Toast,{type:"error",label:u(_),onClose:D}),(0,g.jsxs)("div",{className:"EmployeeLoginFooter",children:[(0,g.jsx)(p.A,{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:()=>{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,g.jsxs)(d.A,{children:[(0,g.jsx)("div",{className:"employeeBackbuttonAlign",children:(0,g.jsx)(s.BackLink,{onClick:()=>window.history.back()})}),(0,g.jsx)(s.FormComposerV2,{onSubmit:P,noBoxShadow:!0,inline:!0,submitInForm:!0,config:L,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,g.jsx)(v.A,{})}),_&&(0,g.jsx)(s.Toast,{type:"error",label:u(_),onClose:D}),(0,g.jsxs)("div",{className:"EmployeeLoginFooter",children:[(0,g.jsx)(p.A,{alt:"Powered by DIGIT",src:null===(r=window)||void 0===r||null===(r=r.globalConfigs)||void 0===r||null===(a=r.getConfig)||void 0===a?void 0:a.call(r,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:()=>{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()}})," "]})]})};h.propTypes={loginParams:u().any},h.defaultProps={loginParams:null};const b=h;function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach(function(t){S(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function S(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const j=e=>{var{stateCode:t}=e,{t:n}=(0,r.useTranslation)(),o=(0,i.useMemo)(()=>a.map(e=>{var t={};for(var i in e.texts)t[i]=n(e.texts[i]);return x(x({},e),{},{texts:t})}),[a]);return(0,g.jsx)(l.Routes,{children:(0,g.jsx)(l.Route,{path:"",element:(0,g.jsx)(b,{config:o[0],t:n,stateCode:t})})})}},9466(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>d});var i=n(6243),o=n(4883),r=n(5953),l=n(4442),a=n(6870);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=()=>{var{t:e}=(0,r.useTranslation)(),t=(0,l.useNavigate)(),{data:{languages:n,stateInfo:s}={},isLoading:u}=Digit.Hooks.useStore.getInitData(),d=Digit.StoreData.getCurrentLanguage(),v=(0,o.useMemo)(()=>({header:e("CS_COMMON_CHOOSE_LANGUAGE"),submitBarLabel:e("CORE_COMMON_CONTINUE")}),[e]),p=(0,o.useMemo)(()=>({options:n,optionsKey:"label",additionalWrapperClass:"digit-reverse-radio-selection-wrapper",onSelect:e=>Digit.LocalizationService.changeLanguage(e.value,s.code),selectedOption:null==n?void 0:n.filter(e=>e.value===d)[0]}),[d,n]);return u?(0,a.jsx)(i.Loader,{}):(0,a.jsx)("div",{className:"selection-card-wrapper",children:(0,a.jsxs)(i.PageBasedInput,{texts:v,onSubmit:function(){var e;t("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/select-location"))},children:[(0,a.jsx)(i.CardHeader,{children:e("CS_COMMON_CHOOSE_LANGUAGE")}),(0,a.jsx)(i.RadioButtons,c({},p))]})})}},9546(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(4883),o=n(338),r=n(4442),l=n(5953),a=n(6870);const s=()=>{var e,[t,n]=(0,i.useState)(0),s=(0,r.useNavigate)(),c=(0,r.useLocation)(),{t:u}=(0,l.useTranslation)(),{tenant:d}=c.state||{},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"];(0,i.useEffect)(()=>{var e=setInterval(()=>{t<v.length&&n(e=>e+1)},2e3);if(t===v.length){var i;clearInterval(e),"undefined"!=typeof window&&(null===(i=window)||void 0===i||i.globalPath);var o=setTimeout(()=>{var e,t;h(p,g)?s({pathname:"/".concat(null===(e=window)||void 0===e?void 0:e.globalPath,"/").concat(d).concat(y),state:{tenant:d}}):s({pathname:"/".concat(null===(t=window)||void 0===t?void 0:t.globalPath,"/").concat(d,"/employee"),state:{tenant:d}})},1e3);return()=>clearTimeout(o)}return()=>{clearInterval(e)}},[t]),(0,i.useRef)(null);var p=null===(e=Digit.SessionStorage.get("User"))||void 0===e||null===(e=e.info)||void 0===e?void 0:e.roles,[m,f]=(0,i.useState)(!0),{data:g}=Digit.Hooks.useCustomMDMS(d,"SandBoxLanding",[{name:"LandingPageRoles"}],{enabled:!0,staleTime:0,cacheTime:0,select:e=>{var t;return null==e||null===(t=e.SandBoxLanding)||void 0===t?void 0:t.LandingPageRoles}});(0,i.useEffect)(()=>{null!=g&&g[0].url&&f(!1)},[g]);var y=null==g?void 0:g[0].url,h=(e,t)=>{var n;return"SUPERUSER"===(null==e||null===(n=e[0])||void 0===n?void 0:n.code)&&t.some(e=>e.rolesForLandingPage.includes("SUPERUSER"))};return(0,a.jsxs)("div",{className:"sandbox-loader-screen",children:[(0,a.jsx)("div",{className:"sandbox-loader"}),(0,a.jsx)("ul",{className:"sandbox-installation-steps",children:v.map((e,n)=>(0,a.jsxs)("li",{className:"sandbox-step ".concat(n<t?"sandbox-visible":""),children:[(0,a.jsx)("span",{className:"sandbox-step-text",children:u(e)}),n<t&&(0,a.jsx)(o.CheckCircle,{fill:"#00703C"})]},n))})]})}}},d={};function v(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}};return u[e](n,n.exports,v),n.exports}v.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return v.d(t,{a:t}),t},v.d=(e,t)=>{for(var n in t)v.o(t,n)&&!v.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},v.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),v.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var p={};return(()=>{"use strict";v.r(p),v.d(p,{DigitUI:()=>K,initCoreComponents:()=>$});var e=v(6243),t=v(4883),n=v.n(t),i=v(5953),o=v(4456),r=v(2148),l=v(4442),a=v(6870);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=(0,e.lazyWithFallback)(()=>Promise.resolve().then(v.bind(v,8020)),()=>v(8020).default,{loaderText:"Loading Citizen App..."}),m=(0,e.lazyWithFallback)(()=>Promise.resolve().then(v.bind(v,296)),()=>v(296).default,{loaderText:"Loading Employee App..."}),f=(0,e.lazyWithFallback)(()=>Promise.resolve().then(v.bind(v,8259)),()=>v(8259).default,{loaderText:"Loading Sign Up..."}),g=(0,e.lazyWithFallback)(()=>Promise.resolve().then(v.bind(v,1626)),()=>v(1626).default,{loaderText:"Loading OTP..."}),y=(0,e.lazyWithFallback)(()=>Promise.resolve().then(v.bind(v,3333)),()=>v(3333).default,{loaderText:"Loading View URL..."}),h=(0,e.lazyWithFallback)(()=>Promise.resolve().then(v.bind(v,883)),()=>v(883).default,{loaderText:"Loading Error Component..."}),b=(0,e.lazyWithFallback)(()=>Promise.resolve().then(v.bind(v,9546)),()=>v(9546).default,{loaderText:"Loading..."}),O=e=>{var t,n,i,o,r,{stateCode:s,modules:u,appTenants:v,logoUrl:p,logoUrlWhite:f,initData:g,defaultLanding:y="citizen",allowedUserTypes:h=["citizen","employee"]}=e,{pathname:b}=((0,l.useNavigate)(),(0,l.useLocation)()),O=window.innerWidth,x=Digit.ULBService.getCurrentUlb(),S=Digit.UserService.getUser(),{data:j}=Digit.Hooks.useStore.getInitData(),{stateInfo:_}=j||{},w=Digit.UserService.hasAccess(["FSM_DSO"]),C="CITIZEN"===(null==S||null===(t=S.info)||void 0===t?void 0:t.type)||!window.location.pathname.split("/").includes("employee");window.location.pathname.split("/").includes("employee")&&(C=!1);var N={stateInfo:_,userDetails:S,CITIZEN:C,cityDetails:x,mobileView:O<=640,handleUserDropdownSelection:e=>{e.func()},logoUrl:p,logoUrlWhite:f,DSO:w,stateCode:s,modules:u,appTenants:v,sourceUrl:"".concat(window.location.origin,"/citizen"),pathname:b,initData:g};return(0,a.jsxs)(l.Routes,{children:[(null==h?void 0:h.includes("employee"))&&(0,a.jsx)(l.Route,{path:"/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/employee/*"),element:(0,a.jsx)(m,c({},N))}),(null==h?void 0:h.includes("citizen"))&&(0,a.jsx)(l.Route,{path:"/".concat(null===(i=window)||void 0===i?void 0:i.contextPath,"/citizen/*"),element:(0,a.jsx)(d,c({},N))}),(null==h?void 0:h.includes("employee"))&&(0,a.jsx)(l.Route,{path:"/".concat(null===(o=window)||void 0===o?void 0:o.contextPath,"/no-top-bar/employee"),element:(0,a.jsx)(m,c(c({},N),{},{noTopBar:!0}))}),(0,a.jsx)(l.Route,{path:"*",element:(0,a.jsx)(l.Navigate,{to:"/".concat(null===(r=window)||void 0===r?void 0:r.contextPath,"/").concat(y)})})]})},x=e=>{var t,n,i,o,r,s,c,u,d,v,{stateCode:p,modules:m,appTenants:x,logoUrl:S,logoUrlWhite:j,initData:_,defaultLanding:w="citizen",allowedUserTypes:C}=e,{data:N}=Digit.Hooks.useStore.getInitData(),{stateInfo:E}=N||{},D=["user/error"].some(e=>{var t;return null===(t=location)||void 0===t||null===(t=t.pathname)||void 0===t?void 0:t.includes(e)}),P=Digit.UserService.getUser(),I="CITIZEN"===(null==P||null===(t=P.info)||void 0===t?void 0:t.type)||!window.location.pathname.split("/").includes("employee"),T=window.innerWidth<=640;return(0,a.jsx)("div",{className:D?"grounded-container":"loginContainer",style:D?{padding:0,paddingTop:I?"0":T&&!I?"3rem":"80px",marginLeft:I||T?"0":"40px"}:{"--banner-url":"url(".concat(null==E?void 0:E.bannerUrl,")"),padding:"0px"},children:(0,a.jsxs)(l.Routes,{children:[(0,a.jsx)(l.Route,{path:"/".concat(null===(n=window)||void 0===n?void 0:n.globalPath,"/user/invalid-url"),element:(0,a.jsx)(h,{})}),(0,a.jsx)(l.Route,{path:"/".concat(null===(i=window)||void 0===i?void 0:i.globalPath,"/user/sign-up"),element:(0,a.jsx)(f,{stateCode:p})}),(0,a.jsx)(l.Route,{path:"/".concat(null===(o=window)||void 0===o?void 0:o.globalPath,"/user/otp"),element:(0,a.jsx)(g,{})}),(0,a.jsx)(l.Route,{path:"/".concat(null===(r=window)||void 0===r?void 0:r.globalPath,"/user/setup"),element:(0,a.jsx)(b,{})}),(0,a.jsx)(l.Route,{path:"/".concat(null===(s=window)||void 0===s?void 0:s.globalPath,"/user/url"),element:(0,a.jsx)(y,{})}),(null===(c=window)||void 0===c?void 0:c.globalPath)!==(null===(u=window)||void 0===u?void 0:u.contextPath)&&(0,a.jsx)(l.Route,{path:"/".concat(null===(d=window)||void 0===d?void 0:d.contextPath,"/*"),element:(0,a.jsx)(O,{stateCode:p,modules:m,appTenants:x,logoUrl:S,logoUrlWhite:j,initData:_,defaultLanding:w,allowedUserTypes:C})}),(0,a.jsx)(l.Route,{path:"*",element:(0,a.jsx)(l.Navigate,{to:"/".concat(null===(v=window)||void 0===v?void 0:v.globalPath,"/user/sign-up")})})]})})},S=v(743),j=v(358),_=v(3015),w=v(4217),C=v(1954),N=v(2247);function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach(function(t){P(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function P(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function T(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var A=[v.n(N)()],L=(0,C.compose)((0,C.applyMiddleware)(...A));const R=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,C.createStore)(((e,t)=>{return(0,C.combineReducers)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach(function(t){T(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(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?D(D({},e),{},{selectedLanguage:t.payload}):e})},t));var n})(e,t),L)};var M=v(5053),k=["onSelect","formData","control","formState"];const U=o=>{var{onSelect:r,formData:l,control:s,formState:c}=o,u=function(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(o,k),{t:d}=(0,i.useTranslation)(),v=Digit.ULBService.getCurrentTenantId(),[p,m]=(0,t.useState)(!1),[f,g]=(0,t.useState)(!1),y=Digit.Utils.getConfigModuleName(),{data:h}=Digit.Hooks.useCustomMDMS(v,y,[{name:"PrivacyPolicy"}],{select:e=>{var t;return null==e||null===(t=e[y])||void 0===t||null===(t=t.PrivacyPolicy)||void 0===t?void 0:t.find(e=>{var t;return e.module===(null==u||null===(t=u.props)||void 0===t?void 0:t.module)})}});return(0,t.useEffect)(()=>{r("check",p)},[p]),(0,a.jsxs)(n().Fragment,{children:[(0,a.jsxs)("div",{className:"digit-privacy-checkbox digit-privacy-checkbox-align",children:[(0,a.jsx)(e.CheckBox,{label:d("ES_BY_CLICKING"),checked:p,onChange:e=>{m(e.target.checked)},id:"privacy-component-check"}),(0,a.jsx)(e.Button,{label:d("ES_PRIVACY_POLICY"),variation:"link",size:"small",onClick:()=>{g(!0)},style:{marginBottom:"1rem",paddingLeft:"0.2rem"}})]}),f&&(0,a.jsxs)(e.PopUp,{type:"default",className:"privacy-popUpClass",footerclassName:"popUpFooter",heading:d(null==h?void 0:h.header),onOverlayClick:()=>{g(!1)},footerChildren:[(0,a.jsx)(e.Button,{type:"button",size:"large",variation:"secondary",label:d("DIGIT_I_DO_NOT_ACCEPT"),onClick:()=>{m(!1),g(!1)}}),(0,a.jsx)(e.Button,{type:"button",size:"large",variation:"primary",label:d("DIGIT_I_ACCEPT"),className:"accept-class",onClick:()=>{m(!0),g(!1)}})],sortFooterChildren:!0,onClose:()=>{g(!1)},children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"privacy-table",children:d("DIGIT_TABLE_OF_CONTENTS")}),(0,a.jsx)("ul",{children:null==h?void 0:h.contents.map((t,n)=>(0,a.jsxs)("li",{style:{display:"flex",alignItems:"center"},children:[(0,a.jsxs)("span",{style:{marginRight:"0.5rem"},children:[n+1,". "]}),(0,a.jsx)(e.Button,{label:d(t.header),variation:"link",size:"medium",onClick:e=>{var n,i;e.preventDefault(),n=null==t?void 0:t.header,(i=document.getElementById(n))&&i.scrollIntoView({behavior:"smooth"})},style:{justifyContent:"flex-start"}})]},n))})]}),null==h?void 0:h.contents.map((e,t)=>(0,a.jsxs)("div",{id:null==e?void 0:e.header,children:[(0,a.jsx)("div",{style:{fontWeight:"bold",paddingLeft:null!=e&&e.isSpaceRequired?"1rem":"0"},children:d(e.header)}),e.descriptions.map((e,t)=>(0,a.jsxs)("div",{style:{paddingLeft:e.isSpaceRequired?"1rem":"0",marginBottom:"0.5rem"},children:[(0,a.jsxs)("div",{style:{fontWeight:null!=e&&e.isBold?700:400,display:"flex",alignItems:"center"},children:["points"===e.type&&(0,a.jsx)("span",{style:{marginRight:"0.5rem",listStyleType:"disc"},children:"•"}),"step"===e.type&&(0,a.jsxs)("span",{style:{marginRight:"0.5rem",listStyleType:"decimal"},children:[t+1,". "]}),d(e.text)]}),(null==e?void 0:e.subDescriptions)&&(null==e?void 0:e.subDescriptions.length)>0&&(0,a.jsx)("div",{className:"policy-subdescription",children:e.subDescriptions.map((e,t)=>(0,a.jsxs)("div",{className:"policy-subdescription-points",children:["points"===e.type&&(0,a.jsx)("span",{style:{marginRight:"0.5rem",listStyleType:"disc",paddingLeft:"1rem"},children:"•"}),"step"===e.type&&(0,a.jsxs)("span",{style:{marginRight:"0.5rem",listStyleType:"decimal",paddingLeft:"1rem"},children:[t+1,". "]}),null===e.type&&(0,a.jsx)("span",{style:{marginRight:"0.5rem",paddingLeft:"1rem"},children:" "}),d(e.text)]},t))})]},t))]},t))]})]})};var B=v(4989),F=(v(5697),["onSelect","formData","control","formState"]);function V(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}function G(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){V(r,i,o,l,a,"next",e)}function a(e){V(r,i,o,l,a,"throw",e)}l(void 0)})}}function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach(function(t){W(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function W(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q=["onSelect","formData","control","formState"];function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach(function(t){Z(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Z(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Y=t=>{var n,o,s,{stateCode:c,enabledModules:u,defaultLanding:d,allowedUserTypes:v}=t,{isLoading:p,data:m={}}=Digit.Hooks.useInitStore(c,u);if(p)return(0,a.jsx)(e.Loader,{page:!0,variant:"PageLoader"});var f=R(m)||{};return(0,i.getI18n)(),Digit.ComponentRegistryService.getComponent("PrivacyComponent")||Digit.ComponentRegistryService.setComponent("PrivacyComponent",U),(0,a.jsx)(r.Provider,{store:f,children:(0,a.jsx)(l.BrowserRouter,{children:(0,a.jsx)(e.BodyContainer,{children:Digit.Utils.getMultiRootTenant()?(0,a.jsx)(x,{initData:m,stateCode:c,modules:null==m?void 0:m.modules,appTenants:m.tenants,logoUrl:null==m||null===(n=m.stateInfo)||void 0===n?void 0:n.logoUrl,logoUrlWhite:null==m||null===(o=m.stateInfo)||void 0===o?void 0:o.logoUrlWhite,defaultLanding:d,allowedUserTypes:v}):(0,a.jsx)(O,{initData:m,stateCode:c,modules:null==m?void 0:m.modules,appTenants:m.tenants,logoUrl:null==m||null===(s=m.stateInfo)||void 0===s?void 0:s.logoUrl,defaultLanding:d,allowedUserTypes:v})})})})},K=e=>{var{stateCode:n,registry:i,enabledModules:r,defaultLanding:l,allowedUserTypes:s}=e,c=(0,t.useMemo)(()=>Digit.Utils.getPrivacyObject()||{},[]),[u,d]=(0,t.useState)(c),v=(Digit.UserService.getType(),(0,t.useMemo)(()=>new o.QueryClient({defaultOptions:{queries:{staleTime:9e5,gcTime:3e6,retry:!1,retryDelay:e=>1/0}}}),[])),p=Digit.Contexts.ComponentProvider,m=Digit.Contexts.PrivacyProvider,f=(Digit.UserService.hasAccess(["FSM_DSO"]),(0,t.useCallback)(e=>{Digit.Utils.setPrivacyObject({}),d({})},[])),g=(0,t.useCallback)(()=>{var e=Digit.Utils.getPrivacyObject();return d(e),e},[]),y=(0,t.useCallback)(e=>{var t=Digit.Utils.getAllPrivacyObject(),n="undefined"!=typeof window?window.location.pathname:"",i=Q(Q({},t),{},{[n]:e});Digit.Utils.setPrivacyObject(Q({},i)),d((null==t?void 0:t[n])||{})},[]),h=(0,t.useCallback)((e,t)=>{d(Digit.Utils.updatePrivacy(e,t)||{})},[]),b=(0,t.useMemo)(()=>({privacy:"undefined"!=typeof window?null==u?void 0:u[window.location.pathname]:u,resetPrivacy:f,getPrivacy:g,updatePrivacyDescoped:y,updatePrivacy:h}),[u,f,g,y,h]);return(0,a.jsx)("div",{children:(0,a.jsx)(w.A,{children:(0,a.jsx)(o.QueryClientProvider,{client:v,children:(0,a.jsx)(p.Provider,{value:i,children:(0,a.jsx)(m.Provider,{value:b,children:(0,a.jsx)(Y,{stateCode:n,enabledModules:r,defaultLanding:l,allowedUserTypes:s})})})})})})},J={SelectOtp:S.A,ChangeCity:j.A,ChangeLanguage:_.A,PrivacyComponent:U,OtpComponent:n=>{var o,r,{onSelect:s,formData:c,control:u,formState:d}=n,v=function(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(n,F),{t:p}=(0,i.useTranslation)(),[m,f]=((0,l.useLocation)(),(0,t.useState)(null)),[g,y]=(0,t.useState)({}),[h,b]=(0,t.useState)(!0),[O,x]=(0,t.useState)(30),S=()=>{f(null)};(0,B.A)(()=>{x(O-1)},O>0?1e3:null),(0,t.useEffect)(()=>{s("OtpComponent",g)},[g]);var j={url:"/user-otp/v1/_send",params:{tenantId:null==v||null===(o=v.props)||void 0===o?void 0:o.code},body:{},config:{enable:!1}},_=Digit.Hooks.useCustomAPIMutationHook(j),w=function(){var e=G(function*(){var e,t,n;x(30),yield _.mutate({body:{otp:{userName:null==v||null===(e=v.props)||void 0===e?void 0:e.email,type:"login",tenantId:null==v||null===(t=v.props)||void 0===t?void 0:t.tenant,userType:"EMPLOYEE"}},config:{enable:!0}},{onError:(e,t)=>{var n,i;f({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===(i=e.response)||void 0===i||null===(i=i.data)||void 0===i||null===(i=i.Errors)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.code):"SANDBOX_RESEND_OTP_ERROR"}),setTimeout(S,5e3)},onSuccess:(n=G(function*(e){f({key:"info",label:p("OTP_RESNED_SUCCESFULL")}),setTimeout(S,5e3)}),function(e){return n.apply(this,arguments)})})});return function(){return e.apply(this,arguments)}}();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(e.CardLabel,{className:"sandbox-custom-otp-subheader",children:p("SANDBOX_ENTER_OTP")}),(0,a.jsx)(e.CardLabel,{className:"sandbox-custom-otp-header",children:p("CS_OTP_EMAIL")}),(0,a.jsx)(e.CardLabel,{className:"sandbox-custom-otp-email",style:{fontWeight:"bold"},children:null==v||null===(r=v.props)||void 0===r?void 0:r.email}),(0,a.jsx)(M.OTPInput,{className:"sandbox-otp-input",length:6,onChange:e=>{y(z(z({},g),{},{otp:e}))},value:null==g?void 0:g.otp}),O>0?(0,a.jsx)(e.CardText,{className:"sandbox-resend-otp",children:"".concat(p("CS_RESEND_ANOTHER_OTP")," ").concat(O," ").concat(p("CS_RESEND_SECONDS"))}):(0,a.jsx)("p",{className:"card-text-button sandbox-otp-input",onClick:w,children:p("CS_RESEND_OTP")}),!h&&(0,a.jsx)(e.CardLabelError,{children:p("CS_INVALID_OTP")}),m&&(0,a.jsx)(e.Toast,{type:null==m?void 0:m.key,label:p(null==m?void 0:m.label),onClose:S})]})},ForgotOrganizationTooltip:n=>{var{onSelect:o}=n,{t:r}=(0,i.useTranslation)(),[l,s]=(0,t.useState)(!1),c=(0,t.useRef)(null);return(0,t.useEffect)(()=>{var e=e=>{c.current&&!c.current.contains(e.target)&&s(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,a.jsxs)("div",{ref:c,className:"loginSignUpSelector",style:{position:"relative",marginTop:"-2rem"},children:[(0,a.jsx)(e.Button,{label:r("SB_FORGOTORGANIZATION_TOOLTIP"),variation:"link",size:"small",onClick:()=>s(e=>!e),style:{marginBottom:"0.5rem",paddingLeft:"0.2rem"}}),l&&(0,a.jsx)("div",{style:{position:"absolute",bottom:"100%",left:"50%",transform:"translateY(-4px)",backgroundColor:"#0b4b66",color:"white",padding:"6px 10px",borderRadius:"4px",whiteSpace:"normal",wordBreak:"break-word",maxWidth:"20rem",zIndex:1e3,fontSize:"0.875rem"},children:r("SB_FORGOTORGANIZATION_TOOLTIP_TEXT")})]})},LoginSignupSelector:o=>{var{onSelect:r,formData:l,control:s,formState:c}=o,{t:u}=(function(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}(o,q),(0,i.useTranslation)()),[d,v]=(0,t.useState)(!0);(0,t.useEffect)(()=>{r("check",d)},[d]);var p=window.location.href.includes("sandbox-ui/user/sign-up");return(0,a.jsx)(n().Fragment,{children:(0,a.jsx)("div",{className:"loginSignUpSelector",style:{marginTop:"-2rem"},children:p?(0,a.jsx)(e.Button,{label:u("SB_ALREADY_HAVE_ACCOUNT"),variation:"link",size:"small",onClick:()=>{var e;window.location.replace("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/user/login"))},style:{marginBottom:"0.5rem",paddingLeft:"0.2rem"}}):(0,a.jsx)(e.Button,{label:u("SB_DONT_HAVE_ACCOUNT"),variation:"link",size:"small",onClick:()=>{var e;window.location.replace("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/user/sign-up"))},style:{marginBottom:"0.5rem",paddingLeft:"0.2rem"}})})})}},$=()=>{Object.entries(J).forEach(e=>{var[t,n]=e;Digit.ComponentRegistryService.setComponent(t,n)})}})(),p})());
|
|
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-svg-components"),require("@egovernments/digit-ui-react-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-svg-components","@egovernments/digit-ui-react-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-svg-components"),require("@egovernments/digit-ui-react-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-svg-components"],e["@egovernments/digit-ui-react-components"],e.redux,e["redux-thunk"])}(this,(e,t,n,i,o,r,l,a,s,c)=>(()=>{var u={158(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>C});var i=n(4883),o=n(5953),r=n(4442),l=n(5053),a=n(6243),s=n(7598),c=n.n(s),u=n(5697),d=n(5660),v=n(743),p=n(6177),m=n(6870);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(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"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}function b(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){h(r,i,o,l,a,"next",e)}function a(e){h(r,i,o,l,a,"throw",e)}l(void 0)})}}var O=e=>{var t,n,{config:o,t:s}=e,[c,f]=(0,i.useState)(null),{mobile_number:y,tenantId:h}=Digit.Hooks.useQueryParams(),O=(0,r.useNavigate)(),[x,S]=(0,i.useState)(""),[j,_]=(0,i.useState)(!0),[w,C]=(0,i.useState)(null),N=()=>Digit.UserService.getType();(0,i.useEffect)(()=>{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");O(n,{replace:!0})}else Digit.UserService.setType("employee")},[c]);var E=()=>{C(null)},D=function(){var e=b(function*(){var e={otp:{mobileNumber:y,userType:N().toUpperCase(),type:"passwordreset",tenantId:h}};try{yield Digit.UserService.sendOtp(e,h),C(s("ES_OTP_RESEND"))}catch(e){var t;C((null==e||null===(t=e.response)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.error_description)||s("ES_INVALID_LOGIN_CREDENTIALS"))}setTimeout(E,5e3)});return function(){return e.apply(this,arguments)}}(),P=function(){var e=b(function*(e){try{if(e.newPassword!==e.confirmPassword)return C(s("ERR_PASSWORD_DO_NOT_MATCH"));var t=g(g({},e),{},{otpReference:x,tenantId:h,type:N().toUpperCase()});yield Digit.UserService.changePassword(t,h),I()}catch(e){var n;C((null==e||null===(n=e.response)||void 0===n||null===(n=n.data)||void 0===n||null===(n=n.error)||void 0===n||null===(n=n.fields)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.message)||s("ES_SOMETHING_WRONG")),setTimeout(E,5e3)}});return function(t){return e.apply(this,arguments)}}(),I=()=>{var e;O("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/employee/user/login"),{replace:!0})},[T,A,L]=o.inputs,R=[{body:[{label:s(T.label),type:T.type,populators:{name:T.name},isMandatory:!0},{label:s(A.label),type:A.type,populators:{name:A.name},isMandatory:!0},{label:s(L.label),type:L.type,populators:{name:L.name},isMandatory:!0}]}];return(0,m.jsxs)(u.A,{children:[(0,m.jsx)("div",{className:"employeeBackbuttonAlign",children:(0,m.jsx)(a.BackLink,{variant:"primary",style:{borderBottom:"none"}})}),(0,m.jsxs)(l.FormComposer,{onSubmit:P,noBoxShadow:!0,inline:!0,submitInForm:!0,config:R,label:o.texts.submitButtonLabel,cardStyle:{maxWidth:"408px",margin:"auto"},className:"employeeChangePassword",children:[(0,m.jsx)(d.A,{}),(0,m.jsxs)(l.CardSubHeader,{style:{textAlign:"center"},children:[" ",o.texts.header," "]}),(0,m.jsxs)(l.CardText,{children:["".concat(s("CS_LOGIN_OTP_TEXT")," "),(0,m.jsxs)("b",{children:[" ","".concat(s("+ 91 - "))," ",y]})]}),(0,m.jsx)(v.A,{t:s,userType:"employee",otp:x,onOtpChange:S,error:j,onResend:D})]}),w&&(0,m.jsx)(a.Toast,{type:"error",label:s(w),onClose:E}),(0,m.jsxs)("div",{className:"EmployeeLoginFooter",children:[(0,m.jsx)(p.A,{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:()=>{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()}})," "]})]})};O.propTypes={loginParams:c().any},O.defaultProps={loginParams:null};const x=O;var S=[{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 j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach(function(t){w(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function w(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const C=()=>{var{t:e}=(0,o.useTranslation)(),t=(0,i.useMemo)(()=>S.map(t=>{var n={};for(var i in t.texts)n[i]=e(t.texts[i]);return _(_({},t),{},{texts:n})}),[S]);return(0,m.jsx)(r.Routes,{children:(0,m.jsx)(r.Route,{path:"",element:(0,m.jsx)(x,{config:t[0],t:e})})})}},296(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>C});var i=n(4883),o=n(5953),r=n(4442),l=n(6243),a=n(1603),s=n(6870),c=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,158)),()=>n(158).default,{loaderText:"Loading Change Password..."}),u=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,9458)),()=>n(9458).default,{loaderText:"Loading Forgot Password..."}),d=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,1234)).then(e=>({default:e.AppHome})),()=>n(1234).AppHome,{loaderText:"Loading Home..."}),v=(e,t)=>t.filter(t=>{var n;return null==e||null===(n=e.map)||void 0===n?void 0:n.call(e,e=>e.code).includes(t.code)}),p=e=>{var t,n,{stateCode:i,userType:o,modules:l,appTenants:p,additionalComponent:m}=e,f=(0,r.useLocation)(),g=Digit.UserService.getUser();if(!g||null==g||!g.access_token||null==g||!g.info)return(0,s.jsx)(r.Navigate,{to:{pathname:"/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/").concat(o,"/user/login"),state:{from:f.pathname+f.search}},replace:!0});var y=null==l?void 0:l.map((e,t)=>{var{code:n,tenants:l}=e;return(0,s.jsx)(r.Route,{path:"".concat(n.toLowerCase(),"/*"),element:(0,s.jsx)(a.A,{moduleCode:n,stateCode:i,userType:o,tenants:v(l,p),maxRetries:3,retryDelay:1e3,initialDelay:800})},t)});return(0,s.jsx)("div",{className:"ground-container digit-home-ground",children:(0,s.jsxs)(r.Routes,{children:[y,(0,s.jsx)(r.Route,{path:"login",element:(0,s.jsx)(r.Navigate,{to:{pathname:"/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/").concat(o,"/user/login"),state:{from:f.pathname+f.search}},replace:!0})}),(0,s.jsx)(r.Route,{path:"forgot-password",element:(0,s.jsx)(u,{})}),(0,s.jsx)(r.Route,{path:"change-password",element:(0,s.jsx)(c,{})}),(0,s.jsx)(r.Route,{path:"*",element:(0,s.jsx)(d,{userType:o,modules:l,additionalComponent:m})})]})})},m=n(4217),f=n(5007),g=n(6177),y=n(5181),h=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,158)),()=>n(158).default,{loaderText:"Loading Change Password..."}),b=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,9458)),()=>n(9458).default,{loaderText:"Loading Forgot Password..."}),O=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,5383)),()=>n(5383).default,{loaderText:"Loading Language Selection..."}),x=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,3934)),()=>n(3934).default,{loaderText:"Loading Login..."}),S=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,1626)),()=>n(1626).default,{loaderText:"Loading OTP..."}),j=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,4872)),()=>n(4872).default,{loaderText:"Loading User Profile..."}),_=(0,l.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,6340)),()=>n(6340).default,{loaderText:"Loading Error Component..."}),w=["user/landing","user/profile","user/error","user/productPage"];const C=(0,y.A)(e=>{var t,n,l,a,{stateInfo:c,userDetails:u,CITIZEN:d,cityDetails:v,mobileView:y,handleUserDropdownSelection:C,logoUrl:N,logoUrlWhite:E,stateCode:D,modules:P,appTenants:I,sourceUrl:T,pathname:A,initData:L,noTopBar:R=!1}=e,M=(0,r.useNavigate)(),{t:k}=(0,o.useTranslation)(),U=(0,r.useLocation)(),B=null==U||null===(t=U.pathname)||void 0===t?void 0:t.includes("language-selection"),F=w.some(e=>{var t;return null==U||null===(t=U.pathname)||void 0===t?void 0:t.includes(e)});(0,i.useEffect)(()=>{Digit.UserService.setType("employee")},[]);var V=null==L||null===(n=L.modules)||void 0===n||null===(n=n.filter(e=>null==e?void 0:e.additionalComponent))||void 0===n?void 0:n.map(e=>null==e?void 0:e.additionalComponent);return(0,s.jsx)("div",{className:"employee",children:(0,s.jsxs)(r.Routes,{children:[(0,s.jsx)(r.Route,{path:"user/*",element:(0,s.jsxs)(s.Fragment,{children:[F&&(0,s.jsx)(f.A,{t:k,stateInfo:c,userDetails:u,CITIZEN:d,cityDetails:v,mobileView:y,handleUserDropdownSelection:C,logoUrl:N,logoUrlWhite:E,showSidebar:!!F,showLanguageChange:!B}),(0,s.jsx)("div",{className:F?"grounded-container":"loginContainer",style:F?{padding:0,paddingTop:"0",marginLeft:"0"}:{"--banner-url":"url(".concat(null==c?void 0:c.bannerUrl,")"),padding:"0px"},children:(0,s.jsxs)(r.Routes,{children:[(0,s.jsx)(r.Route,{path:"login",element:(0,s.jsx)(x,{stateCode:D})}),(0,s.jsx)(r.Route,{path:"login/otp",element:(0,s.jsx)(S,{isLogin:!0})}),(0,s.jsx)(r.Route,{path:"forgot-password",element:(0,s.jsx)(b,{stateCode:D})}),(0,s.jsx)(r.Route,{path:"change-password",element:(0,s.jsx)(h,{})}),(0,s.jsx)(r.Route,{path:"profile",element:(0,s.jsx)(j,{stateCode:D,userType:"employee",cityDetails:v})}),(0,s.jsx)(r.Route,{path:"error",element:(0,s.jsx)(_,{initData:L,goToHome:()=>{var e,t,n;M("/".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)(r.Route,{path:"language-selection",element:(0,s.jsx)(O,{})}),(0,s.jsx)(r.Route,{path:"*",element:(0,s.jsx)(r.Navigate,{to:"language-selection",replace:!0})})]})})]})}),(0,s.jsx)(r.Route,{path:"*",element:(0,s.jsxs)(s.Fragment,{children:[!R&&(0,s.jsx)(f.A,{t:k,stateInfo:c,userDetails:u,CITIZEN:d,cityDetails:v,mobileView:y,handleUserDropdownSelection:C,logoUrl:N,logoUrlWhite:E,modules:P}),(0,s.jsxs)("div",{className:R?"":"main digit-home-main",children:[(0,s.jsx)("div",{className:"employee-app-wrapper digit-home-app-wrapper",children:(0,s.jsx)(m.A,{initData:L,children:(0,s.jsx)(p,{stateCode:D,userType:"employee",modules:P,appTenants:I,additionalComponent:V})})}),(0,s.jsx)("div",{className:"employee-home-footer",children:(0,s.jsx)(g.A,{alt:"Powered by DIGIT",src:null===(l=window)||void 0===l||null===(l=l.globalConfigs)||void 0===l||null===(a=l.getConfig)||void 0===a?void 0:a.call(l,"DIGIT_FOOTER"),style:{height:"1.1em",cursor:"pointer"},onClick:()=>{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)(r.Route,{path:"*",element:(0,s.jsx)(r.Navigate,{to:"user/language-selection",replace:!0})})]})})},".digit-home-main")},338(e){"use strict";e.exports=l},358(e,t,n){"use strict";n.d(t,{A:()=>s});var i=n(6243),o=n(4883),r=n(4442),l=n(6870),a=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!==(i=e)&&void 0!==i&&i.includes(t);){var i,o;e=null===(o=e)||void 0===o?void 0:o.replace(t,n)}return e};const s=e=>{var t,n,[s,c]=(0,o.useState)(null),[u,d]=(0,o.useState)([]),[v,p]=(0,o.useState)([]),m=(0,r.useNavigate)(),f=(e.dropdown,Digit.Utils.getMultiRootTenant());return(0,o.useEffect)(()=>{var e,t=Digit.SessionStorage.get("citizen.userRequestObject"),n=[],i=[];null==t||null===(e=t.info)||void 0===e||null===(e=e.roles)||void 0===e||e.forEach(e=>n.push(e.tenantId));var o=n.filter((e,t,n)=>n.indexOf(e)===t);null==o||o.forEach(e=>{var t;i.push({label:"TENANT_TENANTS_".concat(null===(t=a(e,".","_"))||void 0===t?void 0:t.toUpperCase()),value:e})}),null==i||i.filter(e=>e.value==Digit.SessionStorage.get("Employee.tenantId")),d(i)},[s]),(0,l.jsx)("div",{style:null!=e&&e.mobileView?{color:"#767676"}:{},children:f&&1==u.length?(0,l.jsx)(i.CardText,{style:{color:"#363636"},children:null==u||null===(t=u[0])||void 0===t?void 0:t.value}):(0,l.jsx)(i.Dropdown,{t:null==e?void 0:e.t,option:u,selected:u.find(e=>e.value===(null==s?void 0:s.value)),optionKey:"label",select:e=>{var t,n,i,o=Digit.SessionStorage.get("citizen.userRequestObject"),r=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(t=>t.tenantId===e.value);if((null==r?void 0:r.length)>0&&(o.info.roles=r,o.info.tenantId=null==e?void 0:e.value),Digit.SessionStorage.set("Employee.tenantId",null==e?void 0:e.value),Digit.UserService.setUser(o),c(e),"undefined"!=typeof window&&null!==(n=window.location)&&void 0!==n&&null!==(n=n.href)&&void 0!==n&&n.includes("/".concat(null===(i=window)||void 0===i?void 0:i.contextPath,"/employee/"))){var l,a,s=(null===(l=location.state)||void 0===l?void 0:l.from)||"/".concat(null===(a=window)||void 0===a?void 0:a.contextPath,"/employee");m(s,{replace:!0})}try{"undefined"!=typeof window&&window.location.reload()}catch(e){console.warn("Failed to reload page:",e)}},freeze:!0,customSelector:(0,l.jsx)("label",{className:"cp",children:null==e?void 0:e.t("TENANT_TENANTS_".concat(null===(n=a(Digit.SessionStorage.get("Employee.tenantId"),".","_"))||void 0===n?void 0:n.toUpperCase()))})})})}},743(e,t,n){"use strict";n.d(t,{A:()=>s});var i=n(6243),o=n(4883),r=n(4989),l=n(5053),a=n(6870);const s=e=>{var{config:t,otp:n,onOtpChange:s,onResend:c,onSelect:u,t:d,error:v,userType:p="citizen",canSubmit:m}=e,[f,g]=(0,o.useState)(30);(0,r.A)(()=>{g(f-1)},f>0?1e3:null);var y=()=>{c(),g(2)};return"employee"===p?(0,a.jsxs)(o.Fragment,{children:[(0,a.jsx)(l.OTPInput,{length:6,onChange:s,value:n}),f>0?(0,a.jsx)(i.CardText,{children:"".concat(d("CS_RESEND_ANOTHER_OTP")," ").concat(f," ").concat(d("CS_RESEND_SECONDS"))}):(0,a.jsx)("p",{className:"card-text-button resend-otp",onClick:y,children:d("CS_RESEND_OTP")}),!v&&(0,a.jsx)(i.CardLabelError,{children:d("CS_INVALID_OTP")})]}):(0,a.jsxs)(i.FormStep,{onSelect:u,config:t,t:d,isDisabled:!(6===(null==n?void 0:n.length)&&m),children:[(0,a.jsx)(l.OTPInput,{length:6,onChange:s,value:n}),f>0?(0,a.jsx)(i.CardText,{children:"".concat(d("CS_RESEND_ANOTHER_OTP")," ").concat(f," ").concat(d("CS_RESEND_SECONDS"))}):(0,a.jsx)("p",{className:"card-text-button",onClick:y,children:d("CS_RESEND_OTP")}),!v&&(0,a.jsx)(i.CardLabelError,{children:d("CS_INVALID_OTP")})]})}},856(e,t,n){"use strict";var i=n(7183);function o(){}function r(){}r.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,r,l){if(l!==i){var a=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 a.name="Invariant Violation",a}}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:r,resetWarningCache:o};return n.PropTypes=n,n}},883(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>c}),n(4883);var i=n(5953),o=n(4442),r=n(5697),l=n(6243),a=n(5660),s=n(6870);const c=e=>{var{state:t={}}=(0,o.useLocation)(),{t:n}=(0,i.useTranslation)(),c=(e.stateInfo,(0,o.useNavigate)()),u={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:()=>{c("/".concat(window.globalPath,"/"))}};return(0,s.jsx)(r.A,{children:(0,s.jsxs)(l.Card,{className:"digit-employee-card customError",children:[(0,s.jsx)(a.A,{showTenant:!1}),(0,s.jsx)(l.CardHeader,{className:"center",children:n(u.infoHeader)}),(0,s.jsx)(l.CardText,{className:"center",children:n(u.infoMessage)}),(0,s.jsx)(l.Button,{className:"customErrorButton",label:n(null==u?void 0:u.buttonInfo),variation:"primary",isSuffix:!0,onClick:e=>{e.preventDefault(),null==u||u.action()}})]})})}},1065(e,t,n){"use strict";n.d(t,{P:()=>i});var i=e=>{var t=Digit.Utils.getConfigModuleName();return Digit.Hooks.useCommonMDMS(e,t,["LoginConfig"],{select:e=>{var n;return{config:null==e||null===(n=e[t])||void 0===n?void 0:n.LoginConfig}},retry:!1})}},1234(e,t,n){"use strict";n.d(t,{AppHome:()=>w,q:()=>S});var i=n(5053),o=n(6243),r=n(4883),l=n.n(r),a=n(5953),s=n(4442),c=n(6870);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach(function(t){v(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function v(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=n(338),m=e=>{var t,n,i,{modules:u,additionalComponent:v}=e,{isLoading:m,data:f}=Digit.Hooks.useAccessControl(),g=Digit.Utils.getMultiRootTenant(),{t:y}=(0,a.useTranslation)(),h=(0,s.useNavigate)(),b=null===(t=Digit)||void 0===t||null===(t=t.ULBService)||void 0===t?void 0:t.getStateId(),[O,x]=(0,r.useState)([{}]),{data:S}=Digit.Hooks.useCustomMDMS(b,"HomeScreenOrder",[{name:"CardsAndLinksOrder"}],{select:e=>{var t;return null==e||null===(t=e.HomeScreenOrder)||void 0===t?void 0:t.CardsAndLinksOrder}}),{data:j,isLoading:_}=Digit.Hooks.useCustomMDMS(b,"SandBoxLanding",[{name:"AdditionalModuleLinks"}],{select:e=>{var t;return null==e||null===(t=e.SandBoxLanding)||void 0===t?void 0:t.AdditionalModuleLinks}});(0,r.useEffect)(()=>{x(S)},[S]);var w=(e,t)=>{if(!e||!t)return null;var n=null==j?void 0:j.find(t=>t.moduleName===e.module),i=null==n?void 0:n[t],o=null==e?void 0:e.links;return(null==o?void 0:o.find(e=>(null==e?void 0:e.displayName)===i))||null},C=e=>{var t,n=null==j?void 0:j.find(t=>t.moduleName===e.module);return null==e||null===(t=e.links)||void 0===t?void 0:t.filter(e=>{var t=e.displayName,i="Configure_master"!==t,o=t!==(null==n?void 0:n.howItWorksLink),r=t!==(null==n?void 0:n.userManualLink);return i&&o&&r})},N=null==f?void 0:f.actions.filter(e=>"card"===e.url&&e.parentModule).reduce((e,t)=>{var n=t.parentModule;e[n]||(e[n]={module:n,kpis:[],icon:t.leftIcon?Digit.Utils.iconRender({iconName:t.leftIcon,iconFill:"white",CustomSVG:o.CustomSVG,Components:p}):"",label:Digit.Utils.locale.getTransformedLocale("".concat(n,"_CARD_HEADER")),links:[]});var i=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)))&&g?n=n.replace("/sandbox-ui/employee","/sandbox-ui/".concat(b,"/employee")):n}(t.navigationURL),r=i.indexOf("?");return e[n].links.push({link:i,icon:t.leftIcon,queryParams:-1===r?null:i.substring(r),label:y(Digit.Utils.locale.getTransformedLocale("".concat(n,"_LINK_").concat(t.displayName))),displayName:t.displayName}),e},{});if(m)return(0,c.jsx)(o.Loader,{page:!1,variant:"PageLoader"});if(!N)return"";i=g?(e=>Object.keys(e).sort((e,t)=>{var n,i;return((null==O||null===(n=O.find(t=>"card"===t.moduleType&&t.name===e))||void 0===n?void 0:n.order)||null)-((null==O||null===(i=O.find(e=>"card"===e.moduleType&&e.name===t))||void 0===i?void 0:i.order)||null)}).reduce((t,n)=>{var i,o=null==e||null===(i=e[n])||void 0===i||null===(i=i.links)||void 0===i?void 0:i.sort((e,t)=>{var i,o,r=null==e?void 0:e.displayName,l=null==t?void 0:t.displayName;return((null==O||null===(i=O.find(e=>"link"===e.moduleType&&e.name==="".concat(n,".").concat(r.replace(/\s+/g,"_"))))||void 0===i?void 0:i.order)||null)-((null==O||null===(o=O.find(e=>"link"===e.moduleType&&e.name==="".concat(n,".").concat(l.replace(/\s+/g,"_"))))||void 0===o?void 0:o.order)||null)});return t[n]=d(d({},e[n]),{},{links:o}),t},{}))(N):N;var E=null===(n=Object.keys(i))||void 0===n?void 0:n.map((e,t)=>{var n,r,l=null===(n=i)||void 0===n?void 0:n[e],a=null==l||null===(r=l.links)||void 0===r?void 0:r.find(e=>"Configure_master"===(null==e?void 0:e.displayName)),s=w(l,"howItWorksLink"),u=w(l,"userManualLink"),v={icon:"SupervisorAccount",moduleName:y(null==l?void 0:l.label),metrics:[],links:Digit.Utils.getMultiRootTenant()?C(l):null==l?void 0:l.links,centreChildren:[(0,c.jsx)("div",{children:y(Digit.Utils.locale.getTransformedLocale("MODULE_CARD_DESC_".concat(e)))}),s&&(0,c.jsx)(o.Button,{variation:"teritiary",label:null==s?void 0:s.label,icon:null==s?void 0:s.icon,type:"button",size:"medium",onClick:()=>window.open(null==s?void 0:s.link,"_blank"),style:{padding:"0px"}})],endChildren:Digit.Utils.getMultiRootTenant()?[a&&(0,c.jsx)(o.Button,{variation:"teritiary",label:null==a?void 0:a.label,icon:null==a?void 0:a.icon,type:"button",size:"medium",onClick:()=>h(null==a?void 0:a.link),style:{padding:"0px"}}),u&&(0,c.jsx)(o.Button,{variation:"teritiary",label:null==u?void 0:u.label,icon:null==u?void 0:u.icon,type:"button",size:"medium",onClick:()=>window.open(null==u?void 0:u.link,"_blank"),style:{padding:"0px"}})]:null};return(0,c.jsx)(o.LandingPageCard,d({buttonSize:"medium"},v))});return(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(o.LandingPageWrapper,{children:l().Children.map(E,e=>l().cloneElement(e))})})},f=n(338),g=e=>{var{question:t,isLabelLink:n,answer:l,type:s,actions:u,content:d,lastIndex:v}=e,[p,m]=(0,r.useState)(!1),{t:g}=(0,a.useTranslation)(),y=Digit.ULBService.getStateId(),h="number"===s?"ol":"ul";return(0,c.jsxs)("div",{className:"faqs border-none",onClick:()=>m(!p),children:[(0,c.jsxs)("div",{className:"faq-question",style:{justifyContent:"space-between",display:"flex"},children:[(0,c.jsx)("span",{children:g(t)}),(0,c.jsx)("span",{className:p?"faqicon rotate":"faqicon",style:{float:"right"},children:(0,c.jsx)(f.ArrowForward,{})})]}),(0,c.jsxs)("div",{className:"faq-answer",style:p?{display:"block"}:{display:"none"},children:[(0,c.jsx)(i.CardSectionSubText,{style:{marginTop:"1rem"},children:g(d)}),(0,c.jsx)("div",{style:{marginTop:"1rem"},children:u&&(0,c.jsx)(h,{children:u.map((e,t)=>(0,c.jsxs)("li",{style:{listStyleType:"ul"===h?"disc":"auto",margin:"8px 0"},children:[n?null!=e&&e.label?(0,c.jsx)(o.Button,{variation:"teritiary",label:g(null==e?void 0:e.label),type:"button",size:"medium",onClick:()=>{if(null!=e&&e.fulllink)window.open(null==e?void 0:e.link,"_blank");else{var t,n="https://".concat(window.location.hostname,"/").concat(null===(t=window)||void 0===t?void 0:t.globalPath,"/").concat(y);window.open("".concat(n,"/").concat(null==e?void 0:e.link),"_blank")}},style:{padding:"0px"}}):null:null!=e&&e.label?(0,c.jsxs)("strong",{children:[g(null==e?void 0:e.label),":"]}):null,g(null==e?void 0:e.description)]},t))})})]}),v?null:(0,c.jsx)("div",{className:"cs-box-border"})]})},y=e=>{var{type:t,title:n,content:o,actions:r,style:l}=e,{t:s}=(0,a.useTranslation)(),u="number"===t?"ol":"ul";return(0,c.jsxs)("div",{children:[(0,c.jsx)(i.CardSectionHeader,{children:s(n)}),(0,c.jsx)(i.CardSectionSubText,{style:{marginTop:"1rem"},children:s(o)}),(0,c.jsx)("div",{style:{marginTop:"1rem"},children:r&&(0,c.jsx)(u,{children:r.map((e,t)=>(0,c.jsxs)("li",{style:{listStyleType:"ul"===u?"disc":"auto",margin:"8px 0"},children:[null!=e&&e.label?(0,c.jsxs)("strong",{children:[s(null==e?void 0:e.label),":"]}):null," ",s(null==e?void 0:e.description)]},t))})})]})},h=e=>{var{key:t,title:n,content:i,faqs:o,type:r}=e,{t:l}=(0,a.useTranslation)();return(0,c.jsx)("div",{style:{width:"100%"},children:(0,c.jsx)("div",{style:{width:"100%"},children:o.map((e,t)=>(0,c.jsx)(g,{question:e.question,answer:e.answer,isLabelLink:e.isLabelLink,type:r,actions:e.answer,content:e.content,lastIndex:t===(null==o?void 0:o.length)-1},"faq_"+t))})})};const b=e=>{var{cardConfig:t}=e,{t:n}=(0,a.useTranslation)();return(0,c.jsxs)(o.Card,{className:"sandbox-guide",style:{width:"25rem",height:"47rem",overflowY:"scroll"},children:[(0,c.jsx)(o.CardHeader,{children:n("GUIDE_TO_SETUP")}),(0,c.jsx)("div",{style:{display:"flex",flexWrap:"wrap"},children:t.map((e,n)=>"faqs"===(null==e?void 0:e.type)?(0,c.jsx)(h,{title:e.title,type:null==e?void 0:e.type,content:e.content,faqs:e.actions},e.id):(0,c.jsxs)(l().Fragment,{children:[(0,c.jsx)(y,{type:null==e?void 0:e.type,title:e.title,content:e.content,actions:e.actions,style:e.style},e.id),n!==(null==t?void 0:t.length)-1&&(0,c.jsx)(i.BreakLine,{style:{width:"100%",border:"1px solid #d6d5d4"}})]}))})]})};var O=["onSelect","formData","control","formState"];const x=e=>{var{onSelect:t,formData:n,control:i,formState:o}=e,{t:r}=(function(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}(e,O),(0,a.useTranslation)()),{isLoading:l,data:s}=Digit.Hooks.useAccessControl(),u=(Digit.Utils.getMultiRootTenant(),Digit.ULBService.getStateId());return(null==s?void 0:s.actions.filter(e=>"card"===e.url&&e.parentModule).reduce((e,t)=>{var n=t.parentModule;e[n]||(e[n]={module:n,label:Digit.Utils.locale.getTransformedLocale("".concat(n,"_CARD_HEADER")),links:[]});var i=Digit.Utils.transformURL(t.navigationURL,u),o=i.indexOf("?");return e[n].links.push({link:-1===o?i:i.substring(0,o),label:r(Digit.Utils.locale.getTransformedLocale("".concat(n,"_LINK_").concat(t.displayName))),queryParams:-1===o?null:i.substring(o),description:r(Digit.Utils.locale.getTransformedLocale("".concat(n,"_LINK_").concat(t.displayName,"_DESCRIPTION")))}),e},{}))?(0,c.jsx)(b,{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"}]}]}):""};var S=(e,t,n)=>{var i=null==e?void 0:e["".concat(t)];i&&i.map(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,r={links:null==i?void 0:i.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(e=>{var t,i,o,{role:l,from:a,loginLink:s,dashoardLink:c}=e;Digit.UserService.hasAccess(l)?null==r||null===(t=r.links)||void 0===t||t.push({link:a,i18nKey:n(c)}):null==r||null===(i=r.links)||void 0===i||i.push({link:"/".concat(null===(o=window)||void 0===o?void 0:o.contextPath,"/citizen/login"),state:{role:"FSM_DSO",from:a},i18nKey:n(s)})}),r},j=e=>{var{modules:t,getCitizenMenu:n,fetchedCitizen:r,isLoading:s}=e,u=[t.filter(e=>{var{code:t}=e;return"Payment"===t})[0],...t.filter(e=>{var{code:t}=e;return"Payment"!==t})],{t:d}=(0,a.useTranslation)();return s?(0,c.jsx)(i.Loader,{}):(0,c.jsx)(l().Fragment,{children:(0,c.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,c.jsx)(o.BackLink,{onClick:()=>window.history.back()}),(0,c.jsx)("div",{className:"citizenAllServiceGrid",children:u.filter(e=>e).map((e,t)=>{var a,s,u,v,{code:p}=e;return r&&(s=r?S(n,p,d):void 0),(null===(a=s)||void 0===a||null===(a=a.links)||void 0===a?void 0:a.length)>0?(0,c.jsx)(i.CitizenHomeCard,{header:d(null===(u=s)||void 0===u?void 0:u.header),links:null===(v=s)||void 0===v||null===(v=v.links)||void 0===v||null===(v=v.filter(e=>null==e?void 0:e.link))||void 0===v?void 0:v.sort((e,t)=>(null==e?void 0:e.orderNumber)-(null==t?void 0:t.orderNumber)),Icon:()=>(e=>{switch(e){case"PT":default:return(0,c.jsx)(o.CustomSVG.PTIcon,{className:"fill-path-primary-main"});case"WS":return(0,c.jsx)(o.CustomSVG.WSICon,{className:"fill-path-primary-main"});case"FSM":return(0,c.jsx)(o.CustomSVG.FSMIcon,{className:"fill-path-primary-main"});case"MCollect":return(0,c.jsx)(o.CustomSVG.MCollectIcon,{className:"fill-path-primary-main"});case"PGR":return(0,c.jsx)(o.CustomSVG.PGRIcon,{className:"fill-path-primary-main"});case"TL":return(0,c.jsx)(o.CustomSVG.TLIcon,{className:"fill-path-primary-main"});case"OBPS":return(0,c.jsx)(o.CustomSVG.OBPSIcon,{className:"fill-path-primary-main"});case"Bills":return(0,c.jsx)(o.CustomSVG.BillsIcon,{className:"fill-path-primary-main"})}})(p),Info:"OBPS"===p?()=>(0,c.jsx)(i.CitizenInfoLabel,{style:{margin:"0px",padding:"10px"},info:d("CS_FILE_APPLICATION_INFO_LABEL"),text:d("BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL")}):null,isInfo:"OBPS"===p}):(0,c.jsx)(l().Fragment,{})})})]})})},_=e=>{var{modules:t,additionalComponent:n}=e;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"employee-app-container digit-home-employee-app",children:(0,c.jsx)(o.LandingPageWrapper,{children:null==t?void 0:t.map((e,t)=>{var{code:n}=e,i=Digit.ComponentRegistryService.getComponent("".concat(n,"Card"))||(()=>(0,c.jsx)(l().Fragment,{}));return(0,c.jsx)(i,{},t)})})}),n&&(null==n?void 0:n.length)>0&&n.map(e=>{var t="string"==typeof e?Digit.ComponentRegistryService.getComponent(e):null;return t?(0,c.jsx)("div",{className:"additional-component-wrapper",children:(0,c.jsx)(t,{})}):null})]})},w=e=>{var{userType:t,modules:n,getCitizenMenu:i,fetchedCitizen:o,isLoading:r,additionalComponent:l}=e;if("citizen"===t)return(0,c.jsx)(j,{modules:n,getCitizenMenu:i,fetchedCitizen:o,isLoading:r});var a=Digit.UserService.hasAccess("SUPERUSER")&&Digit.Utils.getMultiRootTenant();return Digit.Utils.getRoleBasedHomeCard()?(0,c.jsxs)("div",{className:a?"homeWrapper":"",children:[(0,c.jsx)(m,{modules:n,additionalComponent:l}),a&&!window.Digit.Utils.browser.isMobile()?(0,c.jsx)(x,{}):null]}):(0,c.jsx)(_,{modules:n,additionalComponent:l})}},1603(e,t,n){"use strict";n.d(t,{A:()=>v});var i=n(4883),o=n(4442),r=n(6243),l=n(5953),a=n(6870);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}const v=e=>{var t,{moduleCode:n,stateCode:s,userType:u,tenants:v,maxRetries:p=5,retryDelay:m=1500,initialDelay:f=100}=e,[g,y]=(0,i.useState)({module:null,loading:!0,error:null,retryCount:0,initialDelayComplete:!1}),{t:h}=(0,l.useTranslation)();if((0,i.useEffect)(()=>{var e,t,i=function(){var t,o=(t=function*(){try{var t=Digit.ComponentRegistryService.getComponent("".concat(n,"Module"));if(t)y({module:t,loading:!1,error:null,retryCount:0,initialDelayComplete:!0});else if(g.retryCount<p){y(e=>c(c({},e),{},{retryCount:e.retryCount+1}));var o=m*Math.pow(1.5,g.retryCount);e=setTimeout(()=>{i()},o)}else y({module:null,loading:!1,error:'Module "'.concat(n,'" not found after ').concat(p," attempts"),retryCount:g.retryCount,initialDelayComplete:!0})}catch(e){console.error("Error loading module ".concat(n,":"),e),y({module:null,loading:!1,error:e.message,retryCount:g.retryCount,initialDelayComplete:!0})}},function(){var e=this,n=arguments;return new Promise(function(i,o){var r=t.apply(e,n);function l(e){d(r,i,o,l,a,"next",e)}function a(e){d(r,i,o,l,a,"throw",e)}l(void 0)})});return function(){return o.apply(this,arguments)}}();return g.initialDelayComplete?i():t=setTimeout(()=>{y(e=>c(c({},e),{},{initialDelayComplete:!0})),i()},f),()=>{e&&clearTimeout(e),t&&clearTimeout(t)}},[n,g.retryCount,g.initialDelayComplete,p,m,f]),g.loading){var b=g.initialDelayComplete?h("CORE_LOADING_MODULE",{moduleCode:n,defaultValue:"Loading {{moduleCode}} module..."}):h("CORE_INITIALIZING_MODULE",{moduleCode:n,defaultValue:"Initializing {{moduleCode}} module..."});return(0,a.jsxs)("div",{className:"module-loading-container",children:[(0,a.jsx)(r.Loader,{page:!0,variant:"PageLoader",loaderText:b}),g.retryCount>0&&g.initialDelayComplete&&(0,a.jsx)("div",{className:"retry-info",style:{textAlign:"center",marginTop:"1rem",color:"#666"},children:h("CORE_MODULE_RETRY_ATTEMPT",{retryCount:g.retryCount,maxRetries:p,defaultValue:"Retry attempt {{retryCount}}/{{maxRetries}}"})})]})}if(g.error||!g.module)return console.warn("Module loading failed for ".concat(n,":"),g.error),(0,a.jsx)(o.Navigate,{to:"/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/employee/user/error?type=notfound&module=").concat(n,"&reason=").concat(encodeURIComponent(g.error||"Module not found")),replace:!0});var O=g.module;return(0,a.jsx)(O,{stateCode:s,moduleCode:n,userType:u,tenants:v})}},1626(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>g});var i=n(4883),o=n(6243),r=n(5053),l=n(5953),a=n(4442),s=n(5697),c=n(5660),u=n(6177),d=n(6870),v=["UserRequest"];function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function m(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}const g=e=>{var t,n,g,{isLogin:y=!1}=e,{t:h}=(0,l.useTranslation)(),b=(0,a.useNavigate)(),O=(0,a.useLocation)(),[x,S]=(0,i.useState)(null),[j,_]=(0,i.useState)(!1),[w,C]=(0,i.useState)(null),[N,E]=(0,i.useState)((null==O||null===(t=O.state)||void 0===t?void 0:t.data)||{}),[D,P]=(0,i.useState)(!1),{email:I,tenant:T}=O.state||{},{data:A}=Digit.Hooks.useCustomMDMS(T,"SandBoxLanding",[{name:"LandingPageRoles"}],{enabled:!0,staleTime:0,cacheTime:0,select:e=>{var t;return null==e||null===(t=e.SandBoxLanding)||void 0===t?void 0:t.LandingPageRoles}}),L=null==A?void 0:A[0].url,R=[{body:[{type:"component",component:"OtpComponent",key:"OtpComponent",withoutLabel:!0,isMandatory:!1,customProps:{email:I,tenant:T},populators:{required:!0}}]}],M=[{texts:{header:h("SANDBOX_OTP_VERIFICATION"),submitButtonLabel:"CORE_COMMON_SUBMIT"}}],k=()=>{S(null)};(0,i.useEffect)(()=>{var e,t,n;if(w){Digit.SessionStorage.set("citizen.userRequestObject",w);var i=null==w||null===(e=w.info)||void 0===e||null===(e=e.roles)||void 0===e?void 0:e.filter(e=>e.tenantId===Digit.SessionStorage.get("Employee.tenantId"));(null==w||null===(t=w.info)||void 0===t||null===(t=t.roles)||void 0===t?void 0:t.length)>0&&(w.info.roles=i),Digit.UserService.setUser(w),((e,t)=>{var n;if(!Digit.Utils.getMultiRootTenant()){var i=(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",i),localStorage.setItem("Employee.locale",i),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==w?void 0:w.info,null==w?void 0:w.access_token);var o="/".concat(null===(n=window)||void 0===n?void 0:n.globalPath,"/user/setup"),r=((e,t,n,i)=>{var o,r,l,a="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),s=null===(r=window)||void 0===r?void 0:r.contextPath;switch(!0){case"/sandbox-ui/user/otp"===e&&a:return"/".concat(s,"/employee/sandbox/landing");case a&&(null==n||null===(l=n[0])||void 0===l||null===(l=l.rolesForLandingPage)||void 0===l?void 0:l.includes("SUPERUSER")):return"/".concat(s).concat(i);default:return"/".concat(s,"/employee")}})(O.pathname,w,A,L);return y?void b(r):void b({pathname:o},{state:{tenant:T}})}},[w]);var U=function(){var e,t=(e=function*(e){var t,n={username:I,password:null==e||null===(t=e.OtpComponent)||void 0===t?void 0:t.otp,tenantId:T,userType:"EMPLOYEE"};try{var i=yield Digit.UserService.authenticate(n),{UserRequest:o}=i,r=function(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(i,v);Digit.SessionStorage.set("Employee.tenantId",null==o?void 0:o.tenantId),C(function(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){m(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}({info:o},r))}catch(e){var l;S((null==e||null===(l=e.response)||void 0===l||null===(l=l.data)||void 0===l?void 0:l.error_description)||"ES_ERROR_USER_NOT_PERMITTED"==(null==e?void 0:e.message)&&h("ES_ERROR_USER_NOT_PERMITTED")||h("INVALID_LOGIN_CREDENTIALS")),setTimeout(k,5e3)}},function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){f(r,i,o,l,a,"next",e)}function a(e){f(r,i,o,l,a,"throw",e)}l(void 0)})});return function(e){return t.apply(this,arguments)}}();return(0,d.jsxs)(s.A,{children:[(0,d.jsxs)("div",{className:"employeeBackbuttonAlign",children:[(0,d.jsx)(o.BackLink,{onClick:()=>b(-1)})," "]}),(0,d.jsx)(r.FormComposerV2,{onSubmit:U,noBoxShadow:!0,inline:!0,submitInForm:!0,onFormValueChange:(e,t)=>{var n,i=t.OtpComponent;6===(null==i||null===(n=i.otp)||void 0===n?void 0:n.length)?_(!0):_(!1)},isDisabled:!j,config:R,label:M[0].texts.submitButtonLabel,heading:M[0].texts.header,headingStyle:{textAlign:"center"},cardStyle:{maxWidth:"408px",margin:"auto"},className:"sandbox-onboarding-wrapper",children:(0,d.jsx)(c.A,{showTenant:!1})}),x&&(0,d.jsx)(o.Toast,{type:"error",label:h(x),onClose:k}),(0,d.jsxs)("div",{className:"EmployeeLoginFooter",children:[(0,d.jsx)(u.A,{alt:"Powered by DIGIT",src:null===(n=window)||void 0===n||null===(n=n.globalConfigs)||void 0===n||null===(g=n.getConfig)||void 0===g?void 0:g.call(n,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:()=>{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()}})," "]})]})}},1737(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>ke});var i=n(4883),o=n.n(i),r=n(5953),l=n(5053),a=n(6243),s=e=>"checkbox"===e.type,c=e=>e instanceof Date,u=e=>null==e;const d=e=>"object"==typeof e;var v=e=>!u(e)&&!Array.isArray(e)&&d(e)&&!c(e),p=e=>v(e)&&e.target?s(e.target)?e.target.checked:e.target.value:e,m=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),f="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function g(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(f&&(e instanceof Blob||e instanceof FileList)||!n&&!v(e))return e;if(t=n?[]:{},n||(e=>{const t=e.constructor&&e.constructor.prototype;return v(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=g(e[n]));else t=e}return t}var y=e=>Array.isArray(e)?e.filter(Boolean):[],h=e=>void 0===e,b=(e,t,n)=>{if(!t||!v(e))return n;const i=y(t.split(/[,[\].]+?/)).reduce((e,t)=>u(e)?e:e[t],e);return h(i)||i===e?h(e[t])?n:e[t]:i},O=e=>"boolean"==typeof e,x=e=>/^\w*$/.test(e),S=e=>y(e.replace(/["|']|\]/g,"").split(/\.|\[/)),j=(e,t,n)=>{let i=-1;const o=x(t)?[t]:S(t),r=o.length,l=r-1;for(;++i<r;){const t=o[i];let r=n;if(i!==l){const n=e[t];r=v(n)||Array.isArray(n)?n:isNaN(+o[i+1])?{}:[]}if("__proto__"===t)return;e[t]=r,e=e[t]}return e};const _="blur",w="onChange",C="onSubmit",N="all",E="pattern",D="required",P=i.createContext(null),I=()=>i.useContext(P);var T=(e,t,n,i=!0)=>{const o={defaultValues:t._defaultValues};for(const r in e)Object.defineProperty(o,r,{get:()=>{const o=r;return t._proxyFormState[o]!==N&&(t._proxyFormState[o]=!i||N),n&&(n[o]=!0),e[o]}});return o},A=e=>v(e)&&!Object.keys(e).length,L=(e,t,n,i)=>{n(e);const{name:o,...r}=e;return A(r)||Object.keys(r).length>=Object.keys(t).length||Object.keys(r).find(e=>t[e]===(!i||N))},R=e=>Array.isArray(e)?e:[e],M=(e,t,n)=>!e||!t||e===t||R(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e)));function k(e){const t=i.useRef(e);t.current=e,i.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var U=e=>"string"==typeof e,B=(e,t,n,i,o)=>U(e)?(i&&t.watch.add(e),b(n,e,o)):Array.isArray(e)?e.map(e=>(i&&t.watch.add(e),b(n,e))):(i&&(t.watchAll=!0),n);const F=e=>e.render(function(e){const t=I(),{name:n,disabled:o,control:r=t.control,shouldUnregister:l}=e,a=m(r._names.array,n),s=function(e){const t=I(),{control:n=t.control,name:o,defaultValue:r,disabled:l,exact:a}=e||{},s=i.useRef(o);s.current=o,k({disabled:l,subject:n._subjects.values,next:e=>{M(s.current,e.name,a)&&u(g(B(s.current,n._names,e.values||n._formValues,!1,r)))}});const[c,u]=i.useState(n._getWatch(o,r));return i.useEffect(()=>n._removeUnmounted()),c}({control:r,name:n,defaultValue:b(r._formValues,n,b(r._defaultValues,n,e.defaultValue)),exact:!0}),c=function(e){const t=I(),{control:n=t.control,disabled:o,name:r,exact:l}=e||{},[a,s]=i.useState(n._formState),c=i.useRef(!0),u=i.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=i.useRef(r);return d.current=r,k({disabled:o,next:e=>c.current&&M(d.current,e.name,l)&&L(e,u.current,n._updateFormState)&&s({...n._formState,...e}),subject:n._subjects.state}),i.useEffect(()=>(c.current=!0,u.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),T(a,n,u.current,!1)}({control:r,name:n,exact:!0}),u=i.useRef(r.register(n,{...e.rules,value:s,...O(e.disabled)?{disabled:e.disabled}:{}}));return i.useEffect(()=>{const e=r._options.shouldUnregister||l,t=(e,t)=>{const n=b(r._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){const e=g(b(r._options.defaultValues,n));j(r._defaultValues,n,e),h(b(r._formValues,n))&&j(r._formValues,n,e)}return()=>{(a?e&&!r._state.action:e)?r.unregister(n):t(n,!1)}},[n,r,a,l]),i.useEffect(()=>{b(r._fields,n)&&r._updateDisabledField({disabled:o,fields:r._fields,name:n,value:b(r._fields,n)._f.value})},[o,n,r]),{field:{name:n,value:s,...O(o)||c.disabled?{disabled:c.disabled||o}:{},onChange:i.useCallback(e=>u.current.onChange({target:{value:p(e),name:n},type:"change"}),[n]),onBlur:i.useCallback(()=>u.current.onBlur({target:{value:b(r._formValues,n),name:n},type:_}),[n,r]),ref:i.useCallback(e=>{const t=b(r._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})},[r._fields,n])},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!b(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!b(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!b(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!b(c.validatingFields,n)},error:{enumerable:!0,get:()=>b(c.errors,n)}})}}(e));var V=(e,t,n,i,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[i]:o||!0}}:{},G=e=>({isOnSubmit:!e||e===C,isOnBlur:"onBlur"===e,isOnChange:e===w,isOnAll:e===N,isOnTouch:"onTouched"===e}),H=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const z=(e,t,n,i)=>{for(const o of n||Object.keys(e)){const n=b(e,o);if(n){const{_f:e,...r}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],o)&&!i)break;if(e.ref&&t(e.ref,e.name)&&!i)break;z(r,t)}else v(r)&&z(r,t)}}};var W=(e,t,n)=>{const i=R(b(e,n));return j(i,"root",t[n]),j(e,n,i),e},q=e=>"file"===e.type,X=e=>"function"==typeof e,Q=e=>{if(!f)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Z=e=>U(e),Y=e=>"radio"===e.type,K=e=>e instanceof RegExp;const J={value:!1,isValid:!1},$={value:!0,isValid:!0};var ee=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!h(e[0].attributes.value)?h(e[0].value)||""===e[0].value?$:{value:e[0].value,isValid:!0}:$:J}return J};const te={isValid:!1,value:null};var ne=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,te):te;function ie(e,t,n="validate"){if(Z(e)||Array.isArray(e)&&e.every(Z)||O(e)&&!e)return{type:n,message:Z(e)?e:"",ref:t}}var oe=e=>v(e)&&!K(e)?e:{value:e,message:""},re=async(e,t,n,i,o)=>{const{ref:r,refs:l,required:a,maxLength:c,minLength:d,min:p,max:m,pattern:f,validate:g,name:y,valueAsNumber:x,mount:S,disabled:j}=e._f,_=b(t,y);if(!S||j)return{};const w=l?l[0]:r,C=e=>{i&&w.reportValidity&&(w.setCustomValidity(O(e)?"":e||""),w.reportValidity())},N={},P=Y(r),I=s(r),T=P||I,L=(x||q(r))&&h(r.value)&&h(_)||Q(r)&&""===r.value||""===_||Array.isArray(_)&&!_.length,R=V.bind(null,y,n,N),M=(e,t,n,i="maxLength",o="minLength")=>{const l=e?t:n;N[y]={type:e?i:o,message:l,ref:r,...R(e?i:o,l)}};if(o?!Array.isArray(_)||!_.length:a&&(!T&&(L||u(_))||O(_)&&!_||I&&!ee(l).isValid||P&&!ne(l).isValid)){const{value:e,message:t}=Z(a)?{value:!!a,message:a}:oe(a);if(e&&(N[y]={type:D,message:t,ref:w,...R(D,t)},!n))return C(t),N}if(!(L||u(p)&&u(m))){let e,t;const i=oe(m),o=oe(p);if(u(_)||isNaN(_)){const n=r.valueAsDate||new Date(_),l=e=>new Date((new Date).toDateString()+" "+e),a="time"==r.type,s="week"==r.type;U(i.value)&&_&&(e=a?l(_)>l(i.value):s?_>i.value:n>new Date(i.value)),U(o.value)&&_&&(t=a?l(_)<l(o.value):s?_<o.value:n<new Date(o.value))}else{const n=r.valueAsNumber||(_?+_:_);u(i.value)||(e=n>i.value),u(o.value)||(t=n<o.value)}if((e||t)&&(M(!!e,i.message,o.message,"max","min"),!n))return C(N[y].message),N}if((c||d)&&!L&&(U(_)||o&&Array.isArray(_))){const e=oe(c),t=oe(d),i=!u(e.value)&&_.length>+e.value,o=!u(t.value)&&_.length<+t.value;if((i||o)&&(M(i,e.message,t.message),!n))return C(N[y].message),N}if(f&&!L&&U(_)){const{value:e,message:t}=oe(f);if(K(e)&&!_.match(e)&&(N[y]={type:E,message:t,ref:r,...R(E,t)},!n))return C(t),N}if(g)if(X(g)){const e=ie(await g(_,t),w);if(e&&(N[y]={...e,...R("validate",e.message)},!n))return C(e.message),N}else if(v(g)){let e={};for(const i in g){if(!A(e)&&!n)break;const o=ie(await g[i](_,t),w,i);o&&(e={...o,...R(i,o.message)},C(o.message),n&&(N[y]=e))}if(!A(e)&&(N[y]={ref:w,...e},!n))return N}return C(!0),N};function le(e,t){const n=Array.isArray(t)?t:x(t)?[t]:S(t),i=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let i=0;for(;i<n;)e=h(e)?i++:e[t[i++]];return e}(e,n),o=n.length-1,r=n[o];return i&&delete i[r],0!==o&&(v(i)&&A(i)||Array.isArray(i)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!h(e[t]))return!1;return!0}(i))&&le(e,n.slice(0,-1)),e}var ae=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}},se=e=>u(e)||!d(e);function ce(e,t){if(se(e)||se(t))return e===t;if(c(e)&&c(t))return e.getTime()===t.getTime();const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const o of n){const n=e[o];if(!i.includes(o))return!1;if("ref"!==o){const e=t[o];if(c(n)&&c(e)||v(n)&&v(e)||Array.isArray(n)&&Array.isArray(e)?!ce(n,e):n!==e)return!1}}return!0}var ue=e=>"select-multiple"===e.type,de=e=>Q(e)&&e.isConnected,ve=e=>{for(const t in e)if(X(e[t]))return!0;return!1};function pe(e,t={}){const n=Array.isArray(e);if(v(e)||n)for(const n in e)Array.isArray(e[n])||v(e[n])&&!ve(e[n])?(t[n]=Array.isArray(e[n])?[]:{},pe(e[n],t[n])):u(e[n])||(t[n]=!0);return t}function me(e,t,n){const i=Array.isArray(e);if(v(e)||i)for(const i in e)Array.isArray(e[i])||v(e[i])&&!ve(e[i])?h(t)||se(n[i])?n[i]=Array.isArray(e[i])?pe(e[i],[]):{...pe(e[i])}:me(e[i],u(t)?{}:t[i],n[i]):n[i]=!ce(e[i],t[i]);return n}var fe=(e,t)=>me(e,t,pe(t)),ge=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:i})=>h(e)?e:t?""===e?NaN:e?+e:e:n&&U(e)?new Date(e):i?i(e):e;function ye(e){const t=e.ref;if(!(e.refs?e.refs.every(e=>e.disabled):t.disabled))return q(t)?t.files:Y(t)?ne(e.refs).value:ue(t)?[...t.selectedOptions].map(({value:e})=>e):s(t)?ee(e.refs).value:ge(h(t.value)?e.ref.value:t.value,e)}var he=e=>h(e)?e:K(e)?e.source:v(e)?K(e.value)?e.value.source:e.value:e;function be(e,t,n){const i=b(e,n);if(i||x(n))return{error:i,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),r=b(t,i),l=b(e,i);if(r&&!Array.isArray(r)&&n!==i)return{name:n};if(l&&l.type)return{name:i,error:l};o.pop()}return{name:n}}const Oe={mode:C,reValidateMode:w,shouldFocusError:!0};function xe(e={}){let t,n={...Oe,...e},i={submitCount:0,isDirty:!1,isLoading:X(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},o={},r=(v(n.defaultValues)||v(n.values))&&g(n.defaultValues||n.values)||{},l=n.shouldUnregister?{}:g(r),a={action:!1,mount:!1,watch:!1},d={mount:new Set,unMount:new Set,array:new Set,watch:new Set},x=0;const S={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},w={values:ae(),array:ae(),state:ae()},C=G(n.mode),E=G(n.reValidateMode),D=n.criteriaMode===N,P=async e=>{if(S.isValid||e){const e=n.resolver?A((await M()).errors):await k(o,!0);e!==i.isValid&&w.state.next({isValid:e})}},I=(e,t)=>{(S.isValidating||S.validatingFields)&&((e||Array.from(d.mount)).forEach(e=>{e&&(t?j(i.validatingFields,e,t):le(i.validatingFields,e))}),w.state.next({validatingFields:i.validatingFields,isValidating:!A(i.validatingFields)}))},T=(e,t,n,i)=>{const s=b(o,e);if(s){const o=b(l,e,h(n)?b(r,e):n);h(o)||i&&i.defaultChecked||t?j(l,e,t?o:ye(s._f)):Z(e,o),a.mount&&P()}},L=(e,t,n,l,a)=>{let s=!1,c=!1;const u={name:e},d=!!(b(o,e)&&b(o,e)._f&&b(o,e)._f.disabled);if(!n||l){S.isDirty&&(c=i.isDirty,i.isDirty=u.isDirty=F(),s=c!==u.isDirty);const n=d||ce(b(r,e),t);c=!(d||!b(i.dirtyFields,e)),n||d?le(i.dirtyFields,e):j(i.dirtyFields,e,!0),u.dirtyFields=i.dirtyFields,s=s||S.dirtyFields&&c!==!n}if(n){const t=b(i.touchedFields,e);t||(j(i.touchedFields,e,n),u.touchedFields=i.touchedFields,s=s||S.touchedFields&&t!==n)}return s&&a&&w.state.next(u),s?u:{}},M=async e=>{I(e,!0);const t=await n.resolver(l,n.context,((e,t,n,i)=>{const o={};for(const n of e){const e=b(t,n);e&&j(o,n,e._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:i}})(e||d.mount,o,n.criteriaMode,n.shouldUseNativeValidation));return I(e),t},k=async(e,t,o={valid:!0})=>{for(const r in e){const a=e[r];if(a){const{_f:e,...s}=a;if(e){const s=d.array.has(e.name);I([r],!0);const c=await re(a,l,D,n.shouldUseNativeValidation&&!t,s);if(I([r]),c[e.name]&&(o.valid=!1,t))break;!t&&(b(c,e.name)?s?W(i.errors,c,e.name):j(i.errors,e.name,c[e.name]):le(i.errors,e.name))}!A(s)&&await k(s,t,o)}}return o.valid},F=(e,t)=>(e&&t&&j(l,e,t),!ce(ne(),r)),V=(e,t,n)=>B(e,d,{...a.mount?l:h(t)?r:U(e)?{[e]:t}:t},n,t),Z=(e,t,n={})=>{const i=b(o,e);let r=t;if(i){const n=i._f;n&&(!n.disabled&&j(l,e,ge(t,n)),r=Q(n.ref)&&u(t)?"":t,ue(n.ref)?[...n.ref.options].forEach(e=>e.selected=r.includes(e.value)):n.refs?s(n.ref)?n.refs.length>1?n.refs.forEach(e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(r)?!!r.find(t=>t===e.value):r===e.value)):n.refs[0]&&(n.refs[0].checked=!!r):n.refs.forEach(e=>e.checked=e.value===r):q(n.ref)?n.ref.value="":(n.ref.value=r,n.ref.type||w.values.next({name:e,values:{...l}})))}(n.shouldDirty||n.shouldTouch)&&L(e,r,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&te(e)},K=(e,t,n)=>{for(const i in t){const r=t[i],l=`${e}.${i}`,a=b(o,l);!d.array.has(e)&&se(r)&&(!a||a._f)||c(r)?Z(l,r,n):K(l,r,n)}},J=(e,t,n={})=>{const s=b(o,e),c=d.array.has(e),v=g(t);j(l,e,v),c?(w.array.next({name:e,values:{...l}}),(S.isDirty||S.dirtyFields)&&n.shouldDirty&&w.state.next({name:e,dirtyFields:fe(r,l),isDirty:F(e,v)})):!s||s._f||u(v)?Z(e,v,n):K(e,v,n),H(e,d)&&w.state.next({...i}),w.values.next({name:a.mount?e:void 0,values:{...l}})},$=async r=>{a.mount=!0;const s=r.target;let c=s.name,u=!0;const v=b(o,c),m=e=>{u=Number.isNaN(e)||e===b(l,c,e)};if(v){let a,g;const y=s.type?ye(v._f):p(r),h=r.type===_||"focusout"===r.type,N=!((f=v._f).mount&&(f.required||f.min||f.max||f.maxLength||f.minLength||f.pattern||f.validate)||n.resolver||b(i.errors,c)||v._f.deps)||((e,t,n,i,o)=>!o.isOnAll&&(!n&&o.isOnTouch?!(t||e):(n?i.isOnBlur:o.isOnBlur)?!e:!(n?i.isOnChange:o.isOnChange)||e))(h,b(i.touchedFields,c),i.isSubmitted,E,C),T=H(c,d,h);j(l,c,y),h?(v._f.onBlur&&v._f.onBlur(r),t&&t(0)):v._f.onChange&&v._f.onChange(r);const R=L(c,y,h,!1),U=!A(R)||T;if(!h&&w.values.next({name:c,type:r.type,values:{...l}}),N)return S.isValid&&P(),U&&w.state.next({name:c,...T?{}:R});if(!h&&T&&w.state.next({...i}),n.resolver){const{errors:e}=await M([c]);if(m(y),u){const t=be(i.errors,o,c),n=be(e,o,t.name||c);a=n.error,c=n.name,g=A(e)}}else I([c],!0),a=(await re(v,l,D,n.shouldUseNativeValidation))[c],I([c]),m(y),u&&(a?g=!1:S.isValid&&(g=await k(o,!0)));u&&(v._f.deps&&te(v._f.deps),((n,o,r,l)=>{const a=b(i.errors,n),s=S.isValid&&O(o)&&i.isValid!==o;var c;if(e.delayError&&r?(c=()=>((e,t)=>{j(i.errors,e,t),w.state.next({errors:i.errors})})(n,r),t=e=>{clearTimeout(x),x=setTimeout(c,e)},t(e.delayError)):(clearTimeout(x),t=null,r?j(i.errors,n,r):le(i.errors,n)),(r?!ce(a,r):a)||!A(l)||s){const e={...l,...s&&O(o)?{isValid:o}:{},errors:i.errors,name:n};i={...i,...e},w.state.next(e)}})(c,g,a,R))}var f},ee=(e,t)=>{if(b(i.errors,t)&&e.focus)return e.focus(),1},te=async(e,t={})=>{let r,l;const a=R(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await M(e);if(e)for(const n of e){const e=b(t,n);e?j(i.errors,n,e):le(i.errors,n)}else i.errors=t;return t})(h(e)?e:a);r=A(t),l=e?!a.some(e=>b(t,e)):r}else e?(l=(await Promise.all(a.map(async e=>{const t=b(o,e);return await k(t&&t._f?{[e]:t}:t)}))).every(Boolean),(l||i.isValid)&&P()):l=r=await k(o);return w.state.next({...!U(e)||S.isValid&&r!==i.isValid?{}:{name:e},...n.resolver||!e?{isValid:r}:{},errors:i.errors}),t.shouldFocus&&!l&&z(o,ee,e?a:d.mount),l},ne=e=>{const t={...a.mount?l:r};return h(e)?t:U(e)?b(t,e):e.map(e=>b(t,e))},ie=(e,t)=>({invalid:!!b((t||i).errors,e),isDirty:!!b((t||i).dirtyFields,e),error:b((t||i).errors,e),isValidating:!!b(i.validatingFields,e),isTouched:!!b((t||i).touchedFields,e)}),oe=(e,t,n)=>{const r=(b(o,e,{_f:{}})._f||{}).ref,l=b(i.errors,e)||{},{ref:a,message:s,type:c,...u}=l;j(i.errors,e,{...u,...t,ref:r}),w.state.next({name:e,errors:i.errors,isValid:!1}),n&&n.shouldFocus&&r&&r.focus&&r.focus()},ve=(e,t={})=>{for(const a of e?R(e):d.mount)d.mount.delete(a),d.array.delete(a),t.keepValue||(le(o,a),le(l,a)),!t.keepError&&le(i.errors,a),!t.keepDirty&&le(i.dirtyFields,a),!t.keepTouched&&le(i.touchedFields,a),!t.keepIsValidating&&le(i.validatingFields,a),!n.shouldUnregister&&!t.keepDefaultValue&&le(r,a);w.values.next({values:{...l}}),w.state.next({...i,...t.keepDirty?{isDirty:F()}:{}}),!t.keepIsValid&&P()},pe=({disabled:e,name:t,field:n,fields:i,value:o})=>{if(O(e)&&a.mount||e){const r=e?void 0:h(o)?ye(n?n._f:b(i,t)._f):o;j(l,t,r),L(t,r,!1,!1,!0)}},me=(e,t={})=>{let i=b(o,e);const l=O(t.disabled);return j(o,e,{...i||{},_f:{...i&&i._f?i._f:{ref:{name:e}},name:e,mount:!0,...t}}),d.mount.add(e),i?pe({field:i,disabled:t.disabled,name:e,value:t.value}):T(e,!0,t.value),{...l?{disabled:t.disabled}:{},...n.progressive?{required:!!t.required,min:he(t.min),max:he(t.max),minLength:he(t.minLength),maxLength:he(t.maxLength),pattern:he(t.pattern)}:{},name:e,onChange:$,onBlur:$,ref:l=>{if(l){me(e,t),i=b(o,e);const n=h(l.value)&&l.querySelectorAll&&l.querySelectorAll("input,select,textarea")[0]||l,a=(e=>Y(e)||s(e))(n),c=i._f.refs||[];if(a?c.find(e=>e===n):n===i._f.ref)return;j(o,e,{_f:{...i._f,...a?{refs:[...c.filter(de),n,...Array.isArray(b(r,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),T(e,!1,void 0,n)}else i=b(o,e,{}),i._f&&(i._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!m(d.array,e)||!a.action)&&d.unMount.add(e)}}},xe=()=>n.shouldFocusError&&z(o,ee,d.mount),Se=(e,t)=>async r=>{let a;r&&(r.preventDefault&&r.preventDefault(),r.persist&&r.persist());let s=g(l);if(w.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await M();i.errors=e,s=t}else await k(o);if(le(i.errors,"root"),A(i.errors)){w.state.next({errors:{}});try{await e(s,r)}catch(e){a=e}}else t&&await t({...i.errors},r),xe(),setTimeout(xe);if(w.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:A(i.errors)&&!a,submitCount:i.submitCount+1,errors:i.errors}),a)throw a},je=(t,n={})=>{const s=t?g(t):r,c=g(s),u=A(t),v=u?r:c;if(n.keepDefaultValues||(r=s),!n.keepValues){if(n.keepDirtyValues)for(const e of d.mount)b(i.dirtyFields,e)?j(v,e,b(l,e)):J(e,b(v,e));else{if(f&&h(t))for(const e of d.mount){const t=b(o,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Q(e)){const t=e.closest("form");if(t){t.reset();break}}}}o={}}l=e.shouldUnregister?n.keepDefaultValues?g(r):{}:g(v),w.array.next({values:{...v}}),w.values.next({values:{...v}})}d={mount:n.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!S.isValid||!!n.keepIsValid||!!n.keepDirtyValues,a.watch=!!e.shouldUnregister,w.state.next({submitCount:n.keepSubmitCount?i.submitCount:0,isDirty:!u&&(n.keepDirty?i.isDirty:!(!n.keepDefaultValues||ce(t,r))),isSubmitted:!!n.keepIsSubmitted&&i.isSubmitted,dirtyFields:u?{}:n.keepDirtyValues?n.keepDefaultValues&&l?fe(r,l):i.dirtyFields:n.keepDefaultValues&&t?fe(r,t):n.keepDirty?i.dirtyFields:{},touchedFields:n.keepTouched?i.touchedFields:{},errors:n.keepErrors?i.errors:{},isSubmitSuccessful:!!n.keepIsSubmitSuccessful&&i.isSubmitSuccessful,isSubmitting:!1})},_e=(e,t)=>je(X(e)?e(l):e,t);return{control:{register:me,unregister:ve,getFieldState:ie,handleSubmit:Se,setError:oe,_executeSchema:M,_getWatch:V,_getDirty:F,_updateValid:P,_removeUnmounted:()=>{for(const e of d.unMount){const t=b(o,e);t&&(t._f.refs?t._f.refs.every(e=>!de(e)):!de(t._f.ref))&&ve(e)}d.unMount=new Set},_updateFieldArray:(e,t=[],n,s,c=!0,u=!0)=>{if(s&&n){if(a.action=!0,u&&Array.isArray(b(o,e))){const t=n(b(o,e),s.argA,s.argB);c&&j(o,e,t)}if(u&&Array.isArray(b(i.errors,e))){const t=n(b(i.errors,e),s.argA,s.argB);c&&j(i.errors,e,t),((e,t)=>{!y(b(e,t)).length&&le(e,t)})(i.errors,e)}if(S.touchedFields&&u&&Array.isArray(b(i.touchedFields,e))){const t=n(b(i.touchedFields,e),s.argA,s.argB);c&&j(i.touchedFields,e,t)}S.dirtyFields&&(i.dirtyFields=fe(r,l)),w.state.next({name:e,isDirty:F(e,t),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else j(l,e,t)},_updateDisabledField:pe,_getFieldArray:t=>y(b(a.mount?l:r,t,e.shouldUnregister?b(r,t,[]):[])),_reset:je,_resetDefaultValues:()=>X(n.defaultValues)&&n.defaultValues().then(e=>{_e(e,n.resetOptions),w.state.next({isLoading:!1})}),_updateFormState:e=>{i={...i,...e}},_disableForm:e=>{O(e)&&(w.state.next({disabled:e}),z(o,(t,n)=>{const i=b(o,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0,!1))},_subjects:w,_proxyFormState:S,_setErrors:e=>{i.errors=e,w.state.next({errors:i.errors,isValid:!1})},get _fields(){return o},get _formValues(){return l},get _state(){return a},set _state(e){a=e},get _defaultValues(){return r},get _names(){return d},set _names(e){d=e},get _formState(){return i},set _formState(e){i=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:te,register:me,handleSubmit:Se,watch:(e,t)=>X(e)?w.values.subscribe({next:n=>e(V(void 0,t),n)}):V(e,t,!0),setValue:J,getValues:ne,reset:_e,resetField:(e,t={})=>{b(o,e)&&(h(t.defaultValue)?J(e,g(b(r,e))):(J(e,t.defaultValue),j(r,e,g(t.defaultValue))),t.keepTouched||le(i.touchedFields,e),t.keepDirty||(le(i.dirtyFields,e),i.isDirty=t.defaultValue?F(e,g(b(r,e))):F()),t.keepError||(le(i.errors,e),S.isValid&&P()),w.state.next({...i}))},clearErrors:e=>{e&&R(e).forEach(e=>le(i.errors,e)),w.state.next({errors:e?i.errors:{}})},unregister:ve,setError:oe,setFocus:(e,t={})=>{const n=b(o,e),i=n&&n._f;if(i){const e=i.refs?i.refs[0]:i.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:ie}}var Se=n(6870);const je=e=>{var{register:t,control:n,reset:i,tenantId:o,t:r,previousPage:l,formState:s,isLoading:c}=e,u=window.Digit.Utils.browser.isMobile();return(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsxs)(a.SearchField,{className:"pt-form-field",children:[(0,Se.jsx)("label",{children:r("AUDIT_FROM_DATE_LABEL")}),(0,Se.jsx)(F,{render:e=>(0,Se.jsx)(a.DatePicker,{date:e.value,onChange:e.onChange}),name:"fromDate",control:n})]}),(0,Se.jsxs)(a.SearchField,{className:"pt-form-field",children:[(0,Se.jsx)("label",{children:r("AUDIT_TO_DATE_LABEL")}),(0,Se.jsx)(F,{render:e=>(0,Se.jsx)(a.DatePicker,{date:e.value,onChange:e.onChange}),name:"toDate",control:n})]}),(0,Se.jsx)(a.SearchField,{className:"pt-search-action-submit",children:(0,Se.jsx)(a.Button,{style:{marginTop:u?"510px":"25px",marginLeft:u?"0":"-30px",maxWidth:u?"100%":"240px"},label:r("ES_COMMON_APPLY"),submit:!0})})]})};var _e=["currentlyActiveMobileModal","searchFormFieldsComponentProps","tenantId"],we=["currentlyActiveMobileModal","searchFormFieldsComponentProps","tenantId"];function Ce(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(n),!0).forEach(function(t){De(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ne(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function De(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Pe=e=>{var t,{Controller:n,register:r,control:l,t:s,reset:c,previousPage:u,handleSubmit:d,tenantId:v,data:p,onSubmit:m,isLoading:f}=e,[g,y]=(0,i.useState)([]),h=e=>(0,Se.jsx)("div",{onClick:e.onClick,children:(0,Se.jsx)(a.DownloadBtnCommon,{})});(0,i.useEffect)(()=>{(null==p?void 0:p.length)>0&&y([null==p?void 0:p.map(e=>{var t={};return t[s("AUDIT_DATE_LABEL")]=b(null==e?void 0:e.timestamp),t[s("AUDIT_TIME_LABEL")]=O(null==e?void 0:e.timestamp),t[s("AUDIT_DATAVIEWED_LABEL")]=(null==e?void 0:e.dataView[0])+","+(null==e?void 0:e.dataView[1]),t[s("AUDIT_DATAVIEWED_BY_LABEL")]=null==e?void 0:e.dataViewedBy,t[s("AUDIT_ROLE_LABEL")]=null==e?void 0:e.roles.map(e=>e.name).join(","),Ee({},t)})])},[p]);var b=e=>{if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getMonth()+1,i=t.getDate(),o=t.getFullYear();return n=(n>9?"":"0")+n,"".concat(i=(i>9?"":"0")+i,"/").concat(n,"/").concat(o)},O=e=>{if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getHours(),i=t.getMinutes(),o=n>12?"PM":"AM";return i=(i>9?"":"0")+i,"".concat(n=((n=n>12?n-12:n)>9?"":"0")+n,":").concat(i," ").concat(o)},[x,S]=(0,i.useReducer)(function(e,t){switch(t.type){case"set":return t.payload;case"remove":return!1}},!1),j=()=>{S({type:"remove"})},_=()=>(0,Se.jsx)("div",{className:"InboxMobilePopupCloseButtonWrapper",onClick:j,children:(0,Se.jsx)(a.CloseSvg,{})}),w={Controller:n,register:r,control:l,t:s,reset:c,previousPage:u},C=(0,i.useCallback)(e=>{var{currentlyActiveMobileModal:t,searchFormFieldsComponentProps:n,tenantId:i}=e;return(e=>{var{currentlyActiveMobileModal:t,searchFormFieldsComponentProps:n,tenantId:i}=e,o=Ce(e,_e),{closeMobilePopupModal:r}=o;return"SearchFormComponent"===t?(0,Se.jsxs)(a.SearchForm,Ee(Ee({},o),{},{children:[(0,Se.jsx)(_,{}),(0,Se.jsx)("div",{className:"MobilePopupHeadingWrapper",children:(0,Se.jsxs)("h2",{children:[s("PRIVACY_AUDIT_REPORT"),":"]})}),(0,Se.jsx)(je,Ee(Ee({},n),{},{closeMobilePopupModal:r,tenantId:i,t:s}))]})):(0,Se.jsx)("span",{})})(Ee({currentlyActiveMobileModal:t,searchFormFieldsComponentProps:n,tenantId:i},Ce(e,we)))},[x]),N=[];null==p||null===(t=p.roles)||void 0===t||t.forEach(e=>{N.push(null==e?void 0:e.name)});var E=(0,i.useMemo)(()=>null!=p&&p.display||""===p?[]:null==p?void 0:p.map(e=>{var t;return{[s("AUDIT_DATE_LABEL")]:b(e.timestamp),[s("AUDIT_TIME_LABEL")]:O(e.timestamp),[s("AUDIT_DATAVIEWED_LABEL")]:e.dataView[0]+","+e.dataView[1],[s("AUDIT_DATAVIEWED_BY_LABEL")]:e.dataViewedBy,[s("AUDIT_ROLE_LABEL")]:null===(t=e.roles.slice(0,3))||void 0===t?void 0:t.map(e=>e.name).join(",")}}),[p]);return(0,Se.jsxs)(o().Fragment,{children:[(0,Se.jsx)(a.BackButton,{}),(0,Se.jsx)("div",{className:"sideContent",style:{marginLeft:"70%",marginTop:"-12%"},children:(0,Se.jsx)(h,{className:"mrlg cursorPointer",onClick:()=>(e=>{if(void 0!==(null==e?void 0:e[0]))return Digit.Download.Excel(null==e?void 0:e[0],"AuditReport")})(g)})}),(0,Se.jsxs)(a.HeaderComponent,{children:[s("PRIVACY_AUDIT_REPORT"),":"]}),(0,Se.jsx)("div",{className:"digit-search-box",children:(0,Se.jsx)(a.SearchAction,{text:s("ES_COMMON_SEARCH"),handleActionClick:()=>S({type:"set",payload:"SearchFormComponent"}),tenantId:v,t:s})}),x?(0,Se.jsx)(a.PopUp,{children:(0,Se.jsx)(C,{onSubmit:e=>{S({type:"remove"}),m(e)},handleSubmit:d,id:"search-form",className:"rm-mb form-field-flex-one inboxPopupMobileWrapper",searchFormFieldsComponentProps:w,currentlyActiveMobileModal:x,closeMobilePopupModal:j,tenantId:v})}):null,f&&(0,Se.jsx)(a.Loader,{}),(0,Se.jsx)(a.DetailsCard,{data:E})]})};function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Te(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ae=e=>{var{tenantId:t,t:n,onSubmit:r,data:s,count:c}=e,u=Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{offset:0,limit:5,sortOrder:"DESC"},{register:d,control:v,handleSubmit:p,setValue:m,getValues:f,reset:g}=function(e={}){const t=i.useRef(),n=i.useRef(),[o,r]=i.useState({isDirty:!1,isValidating:!1,isLoading:X(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:X(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...xe(e),formState:o});const l=t.current.control;return l._options=e,k({subject:l._subjects.state,next:e=>{L(e,l._proxyFormState,l._updateFormState,!0)&&r({...l._formState})}}),i.useEffect(()=>l._disableForm(e.disabled),[l,e.disabled]),i.useEffect(()=>{if(l._proxyFormState.isDirty){const e=l._getDirty();e!==o.isDirty&&l._subjects.state.next({isDirty:e})}},[l,o.isDirty]),i.useEffect(()=>{e.values&&!ce(e.values,n.current)?(l._reset(e.values,l._options.resetOptions),n.current=e.values,r(e=>({...e}))):l._resetDefaultValues()},[e.values,l]),i.useEffect(()=>{e.errors&&l._setErrors(e.errors)},[e.errors,l]),i.useEffect(()=>{l._state.mount||(l._updateValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),i.useEffect(()=>{e.shouldUnregister&&l._subjects.values.next({values:l._getWatch()})},[e.shouldUnregister,l]),t.current.formState=T(o,l),t.current}({defaultValues:u}),y=e=>{if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getMonth()+1,i=t.getDate(),o=t.getFullYear();return n=(n>9?"":"0")+n,"".concat(i=(i>9?"":"0")+i,"/").concat(n,"/").concat(o)},h=e=>{if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getHours(),i=t.getMinutes(),o=n>12?"PM":"AM";return i=(i>9?"":"0")+i,"".concat(n=((n=n>12?n-12:n)>9?"":"0")+n,":").concat(i," ").concat(o)},[b,O]=(0,i.useState)([]),x=e=>(0,Se.jsx)("div",{onClick:e.onClick,children:(0,Se.jsx)(l.DownloadBtnCommon,{})});(0,i.useEffect)(()=>{d("offset",0),d("limit",5),d("sortOrder","DESC")},[d]),(0,i.useEffect)(()=>{(null==s?void 0:s.length)>0&&O([null==s?void 0:s.map(e=>{var t={};return t[n("AUDIT_DATE_LABEL")]=y(null==e?void 0:e.timestamp),t[n("AUDIT_TIME_LABEL")]=h(null==e?void 0:e.timestamp),t[n("AUDIT_DATAVIEWED_LABEL")]=(null==e?void 0:e.dataView[0])+","+(null==e?void 0:e.dataView[1]),t[n("AUDIT_DATAVIEWED_BY_LABEL")]=null==e?void 0:e.dataViewedBy,t[n("AUDIT_ROLE_LABEL")]=null==e?void 0:e.roles.map(e=>e.name).join(","),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach(function(t){Te(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},t)})])},[s]);var S=(0,i.useCallback)(e=>{0!==e.length&&(m("sortBy",e.id),m("sortOrder",e.desc?"DESC":"ASC"))},[]);function j(){m("offset",f("offset")-f("limit")),p(r)()}var _=window.Digit.Utils.browser.isMobile();if(_)return(0,Se.jsx)(Pe,{Controller:F,register:d,control:v,t:n,reset:g,previousPage:j,handleSubmit:p,tenantId:t,data:s,onSubmit:r});var w=e=>(0,Se.jsx)("span",{className:"cell-text",children:e}),C=(0,i.useMemo)(()=>[{Header:n("AUDIT_DATE_LABEL"),disableSortBy:!0,accessor:e=>{var t="NA"===e.timestamp?n("WS_NA"):y(e.timestamp);return w("".concat(t))}},{Header:n("AUDIT_TIME_LABEL"),disableSortBy:!0,accessor:e=>{var t="NA"===e.timestamp?n("WS_NA"):h(e.timestamp);return w("".concat(t))}},{Header:n(_?"AUDIT_DATAVIEWED_LABEL":"AUDIT_DATAVIEWED_PRIVACY"),disableSortBy:!0,accessor:e=>w("".concat(null==e?void 0:e.dataView))},{Header:n(_?"AUDIT_DATAVIEWED_BY_LABEL":"AUDIT_DATAVIEWED_BY_PRIVACY"),disableSortBy:!0,accessor:e=>w("".concat(null==e?void 0:e.dataViewedBy))},{Header:n("AUDIT_ROLE_LABEL"),disableSortBy:!0,accessor:e=>{var t;return w("".concat(null==e||null===(t=e.roles.slice(0,3))||void 0===t?void 0:t.map(e=>e.name)))}}],[]);return(0,Se.jsxs)(o().Fragment,{children:[(0,Se.jsxs)("div",{style:{marginRight:"-70px"},children:[" ",(0,Se.jsx)(a.BackButton,{})," "]}),(0,Se.jsxs)("div",{style:{marginTop:"30px",marginLeft:"30px"},children:[" ",(0,Se.jsx)(a.HeaderComponent,{children:n("PRIVACY_AUDIT_REPORT")})," "]}),(0,Se.jsx)(a.SearchForm,{className:"audit-card",onSubmit:r,handleSubmit:p,children:(0,Se.jsx)(je,{register:d,control:v,reset:g,tenantId:t,t:n,previousPage:j})}),(0,Se.jsx)("div",{style:{marginTop:"240px",marginLeft:"-55%",maxWidth:"80%",marginRight:"52px"},children:null!=s&&s.display?(0,Se.jsx)("div",{style:{marginTop:"20x",width:"1025px",marginLeft:"25px",backgroundColor:"white",height:"60px"},children:n(s.display).split("\\n").map((e,t)=>(0,Se.jsx)("p",{style:{textAlign:"center"},children:e},t))}):""!==s?(0,Se.jsxs)("div",{style:{backgroundColor:"white",marginRight:"-30px",marginLeft:"30px"},children:[(0,Se.jsx)("div",{className:"sideContent",style:{float:"right",padding:"10px 30px"},children:(0,Se.jsx)(x,{className:"mrlg cursorPointer",onClick:()=>(e=>{if(void 0!==(null==e?void 0:e[0]))return Digit.Download.Excel(null==e?void 0:e[0],"AuditReport")})(b)})}),(0,Se.jsx)(l.Table,{t:n,data:s,totalRecords:c,columns:C,getCellProps:e=>({style:{minWidth:e.column.Header===n("ES_INBOX_APPLICATION_NO")?"240px":"",padding:"20px 18px",fontSize:"16px"}}),onPageSizeChange:function(e){m("limit",Number(e.target.value)),p(r)()},currentPage:f("offset")/f("limit"),onNextPage:function(){m("offset",f("offset")+f("limit")),p(r)()},onPrevPage:j,manualPagination:!1,pageSizeLimit:f("limit"),onSort:S,disableSort:!1,sortParams:[{id:f("sortBy"),desc:"DESC"===f("sortOrder")}]})]}):(0,Se.jsx)(a.Loader,{})})]})};function Le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(n),!0).forEach(function(t){Me(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Le(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Me(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ke=e=>{var t,n,{path:o}=e,{t:l}=(0,r.useTranslation)(),a=Digit.ULBService.getCitizenCurrentTenant(),[s,c]=(0,i.useState)({}),u=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})/),i=new Date(Date.UTC(n[1],n[2]-1,n[3]));return i.setMinutes(i.getMinutes()+i.getTimezoneOffset()),"dayend"===t&&(i.setHours(i.getHours()+24),i.setSeconds(i.getSeconds()-1)),i.getTime()}catch(t){return e}};(0,i.useEffect)(()=>{var e=Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{};if(e){var t=Re({},e);c(Object.keys(t).filter(e=>t[e]).reduce((e,n)=>Re(Re({},e),{},{[n]:"object"==typeof t[n]?t[n].code:t[n]}),{}))}},[]);var d={enabled:!!(s&&Object.keys(s).length>0)},v=Re({},s),{isLoading:p,data:m}=Digit.Hooks.useAudit({tenantId:a,filters:Re({},v),config:d});return(0,Se.jsx)(Ae,{t:l,tenantId:a,onSubmit:function(e){Digit.SessionStorage.set("AUDIT_APPLICATION_DETAIL",{offset:0,limit:5,sortBy:"commencementDate",sortOrder:"DESC"});var t=Re(Re({},e),{},{fromDate:u(null==e?void 0:e.fromDate),toDate:u(null==e?void 0:e.toDate)});c(Object.keys(t).filter(e=>t[e]).reduce((e,n)=>Re(Re({},e),{},{[n]:(t[n],t[n])}),{}))},data:p?"":(null==m||null===(t=m.ElasticSearchData)||void 0===t?void 0:t.length)>0?null==m?void 0:m.ElasticSearchData:{display:"ES_COMMON_NO_DATA"},count:null==m||null===(n=m.ElasticSearchData)||void 0===n?void 0:n.length})}},1954(e){"use strict";e.exports=s},2148(e){"use strict";e.exports=o},2161(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),r=t[1],l=t[2],a=t[3]||"",s={};return s.inverse=!!r&&"not"===r.toLowerCase(),s.type=l?l.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],s.expressions=a.map(function(e){var t=e.match(i),n=t[1].toLowerCase().match(o);return{modifier:n[1],feature:n[2],value:t[2]}}),s})}(e).some(function(e){var n=e.inverse,i="all"===e.type||t.type===e.type;if(i&&n||!i&&!n)return!1;var o=e.expressions.every(function(e){var n=e.feature,i=e.modifier,o=e.value,r=t[n];if(!r)return!1;switch(n){case"orientation":case"scan":return r.toLowerCase()===o.toLowerCase();case"width":case"height":case"device-width":case"device-height":o=c(o),r=c(r);break;case"resolution":o=s(o),r=s(r);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":o=a(o),r=a(r);break;case"grid":case"color":case"color-index":case"monochrome":o=parseInt(o,10)||1,r=parseInt(r,10)||0}switch(i){case"min":return r>=o;case"max":return r<=o;default:return r===o}});return o&&!n||!o&&n})};var n=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,i=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,o=/^(?:(min|max)-)?(.+)/,r=/(em|rem|px|cm|mm|in|pt|pc)?$/,l=/(dpi|dpcm|dppx)?$/;function a(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function s(e){var t=parseFloat(e);switch(String(e).match(l)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function c(e){var t=parseFloat(e);switch(String(e).match(r)[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}}},2247(e){"use strict";e.exports=c},2339(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(6243),o=n(5053),r=n(4883),l=n(5953),a=n(6870);const s=e=>{var t,n,{module:s}=e,c=Digit.UserService.getUser(),{t:u}=((null==c||null===(t=c.info)||void 0===t?void 0:t.tenantId)||Digit.ULBService.getCurrentTenantId(),(0,l.useTranslation)()),d=Digit.SessionStorage.get("initData").stateInfo,v=Digit.StoreData.getCurrentLanguage(),[p,m]=(0,r.useState)(v),[f,g]=(0,r.useState)(!1),[y,h]=(0,r.useState)(""),b=()=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.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"})}),{isLoading:O,data:x}=Digit.Hooks.useGetHowItWorksJSON(Digit.ULBService.getStateId()),S=null==x||null===(n=x.MdmsRes["common-masters"])||void 0===n||null===(n=n.howItWorks[0])||void 0===n?void 0:n["".concat(s)];return O?(0,a.jsx)(i.Loader,{}):(0,a.jsx)(r.Fragment,{children:(0,a.jsxs)("div",{className:"how-it-works-page",children:[(0,a.jsx)(i.BackButton,{}),(0,a.jsx)("div",{className:"how-it-works-page-header",children:(0,a.jsx)(i.HeaderComponent,{children:u(S.screenHeader?S.screenHeader:"HOW_IT_WORKS")})}),(0,a.jsx)("div",{className:"language-selector",style:{margin:"10px"},children:[{label:"ENGLISH",value:"en_IN"},{label:"हिंदी",value:"hi_IN"}].map((e,t)=>(0,a.jsx)("div",{className:"language-button-container",children:(0,a.jsx)(o.CustomButton,{selected:e.value===p,text:e.label,onClick:()=>(e=>{m(e.value),Digit.LocalizationService.changeLanguage(e.value,d.code)})(e)})},t))}),S.videosJson.map((e,t)=>(0,a.jsx)("div",{children:(0,a.jsxs)("div",{className:"WhatsNewCard",style:{float:"left",position:"relative",width:"100%",marginBottom:10},children:[(0,a.jsx)("div",{className:"video-icon",onClick:()=>{return t=e,h("hi_IN"===p?t.hi_IN:t.en_IN),void g(!0);var t},children:(0,a.jsx)("div",{className:"vid-svg",children:(0,a.jsx)(b,{})})}),(0,a.jsxs)("div",{className:"how-it-works-header-description",children:[(0,a.jsx)("h2",{children:u(e.headerLabel)}),(0,a.jsx)("p",{children:u(e.description)})]})]})})),S.pdfHeader&&S.pdfDesc&&(0,a.jsx)("div",{className:"WhatsNewCard",style:{position:"relative",width:"100%",marginBottom:10,display:"inline-block"},children:(0,a.jsxs)("div",{className:"how-it-works-pdf-section",children:[(0,a.jsxs)("div",{className:"pdf-icon-header-desc",children:[(0,a.jsx)("div",{className:"pdf-icon",children:(0,a.jsx)(i.PDFSvg,{})}),(0,a.jsxs)("div",{className:"pdf-header-desc",children:[(0,a.jsx)("h2",{children:u(S.pdfHeader)}),(0,a.jsx)("p",{children:u(S.pdfDesc)})]})]}),(0,a.jsx)("div",{className:"download-icon",children:(0,a.jsx)(i.DownloadImgIcon,{})})]})}),f&&(0,a.jsxs)("div",{className:"how-it-works-video-play",children:[(0,a.jsx)("div",{className:"close-button",children:(0,a.jsx)(i.CloseSvg,{onClick:()=>{g(!1)}})}),(0,a.jsx)("video",{width:500,height:500,controls:!0,autoPlay:!0,children:(0,a.jsx)("source",{src:y,type:"video/mp4"})})]})]})})}},2346(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(6243),o=n(4883),r=n.n(o),l=n(5953),a=n(6870);const s=e=>{var t,n,o,s,c,u,d,v,p,m,f,g,y,h,b,{moduleCode:O}=e,{t:x}=(0,l.useTranslation)(),S=Digit.ULBService.getCitizenCurrentTenant(),{isLoading:j,data:_}=Digit.Hooks.useStaticData(Digit.ULBService.getStateId()),{isLoading:w,error:C,data:N,isSuccess:E}=Digit.Hooks.useDynamicData({moduleCode:O,tenantId:S,filters:{},t:x}),D=e=>{var{module:t,styles:n}=e;switch(t){case"TL":default:return(0,a.jsx)(i.CaseIcon,{className:"fill-path-primary-main",styles:n});case"PT":return(0,a.jsx)(i.PTIcon,{className:"fill-path-primary-main",styles:n});case"MCOLLECT":return(0,a.jsx)(i.MCollectIcon,{className:"fill-path-primary-main",styles:n});case"PGR":return(0,a.jsx)(i.ComplaintIcon,{className:"fill-path-primary-main",styles:n})}},P=null==_||null===(t=_.MdmsRes["common-masters"])||void 0===t||null===(t=t.StaticData[0])||void 0===t?void 0:t["".concat(O)],I=e=>{var{module:t}=e;switch(t){case"PT":case"WS":return(0,a.jsx)("span",{className:"timerIcon",children:(0,a.jsx)(i.TimerIcon,{})});default:return null}},T=e=>{var{module:t}=e;switch(t){case"PT":return(0,a.jsx)("span",{className:"rupeeSymbol",children:(0,a.jsx)(i.RupeeSymbol,{})});case"WS":return(0,a.jsx)("span",{className:"timerIcon",children:(0,a.jsx)(i.TimerIcon,{})});default:return null}},A=e=>{switch(e){case"TL":case"PT":case"MCOLLECT":return{staticCommonContent:x("COMMON_VALIDITY"),validity:(null==P?void 0:P.validity)+("1"===(null==P?void 0:P.validity)?x("COMMON_DAY"):x("COMMON_DAYS"))};case"PGR":return{staticCommonContent:x("ACTION_TEST_COMPLAINT_TYPES")};case"OBPS":return{staticCommonContent:x("BUILDING_PLAN_PERMIT_VALIDITY"),validity:(null==P?void 0:P.validity)+" "+("1"===(null==P?void 0:P.validity)?x("COMMON_DAY"):x("COMMON_DAYS"))};default:return{staticCommonContent:""}}},L=e=>{switch(e){case"PT":return{staticDataOne:(null==P?void 0:P.staticDataOne)+" "+x("COMMON_DAYS"),staticDataOneHeader:x("APPLICATION_PROCESSING_TIME"),staticDataTwo:null==P?void 0:P.staticDataTwo,staticDataTwoHeader:x("APPLICATION_PROCESSING_FEE")};case"WS":return{staticDataOne:"",staticDataOneHeader:x("PAY_WATER_CHARGES_BY")+" "+(null==P?void 0:P.staticDataOne)+" "+x("COMMON_DAYS")+" "+x("OF_BILL_GEN_TO_AVOID_LATE_FEE"),staticDataTwo:(null==P?void 0:P.staticDataTwo)+" "+x("COMMON_DAYS"),staticDataTwoHeader:x("APPLICATION_PROCESSING_TIME")};default:return{}}};return j||w?(0,a.jsx)(i.Loader,{}):P?(0,a.jsxs)(r().Fragment,{children:[P&&null!=P&&P.payViaWhatsApp?(0,a.jsx)(i.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"},children:(0,a.jsxs)("div",{className:"pay-whatsapp-card",onClick:()=>{return e=null==P?void 0:P.payViaWhatsApp,void window.open(e);var e},children:[(0,a.jsx)("div",{className:"pay-whatsapp-text",children:x("PAY_VIA_WHATSAPP")}),(0,a.jsx)("div",{className:"whatsAppIconG",children:(0,a.jsx)(i.WhatsappIconGreen,{})})]})}):null,P&&null!=P&&P.helpline?(0,a.jsxs)(i.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"},children:[(0,a.jsxs)("div",{className:"static-home-Card",children:[(0,a.jsx)("div",{className:"static-home-Card-header",children:x("CALL_CENTER_HELPLINE")}),(0,a.jsx)("div",{className:"helplineIcon",children:(0,a.jsx)(i.HelpLineIcon,{})})]}),(0,a.jsxs)("div",{className:"call-center-card-text",children:[null!=P&&null!==(n=P.helpline)&&void 0!==n&&n.contactOne?(0,a.jsx)("div",{className:"call-center-card-content",children:(0,a.jsx)("a",{href:"tel:".concat(null==P||null===(o=P.helpline)||void 0===o?void 0:o.contactOne),children:null==P||null===(s=P.helpline)||void 0===s?void 0:s.contactOne})}):null,null!=P&&null!==(c=P.helpline)&&void 0!==c&&c.contactTwo?(0,a.jsx)("div",{className:"call-center-card-content",children:(0,a.jsx)("a",{href:"tel:".concat(null==P||null===(u=P.helpline)||void 0===u?void 0:u.contactTwo),children:null==P||null===(d=P.helpline)||void 0===d?void 0:d.contactTwo})}):null]})]}):null,P&&null!=P&&P.serviceCenter?(0,a.jsxs)(i.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"},children:[(0,a.jsxs)("div",{className:"static-home-Card",children:[(0,a.jsx)("div",{className:"static-home-Card-header",children:x("CITIZEN_SERVICE_CENTER")}),(0,a.jsx)("div",{className:"serviceCentrIcon",children:(0,a.jsx)(i.ServiceCenterIcon,{})})]}),(0,a.jsx)("div",{className:"service-center-details-card",children:(0,a.jsx)("div",{className:"service-center-details-text",children:null==P?void 0:P.serviceCenter})}),null!=P&&P.viewMapLocation?(0,a.jsx)("div",{className:"link",children:(0,a.jsx)("a",{href:null==P?void 0:P.viewMapLocation,children:x("VIEW_ON_MAP")})}):null]}):(0,a.jsx)("div",{}),(0,a.jsxs)(i.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"},children:[C||null==N||null===(null==N?void 0:N.dynamicDataOne)?(0,a.jsx)("div",{}):(0,a.jsx)("div",{className:"dynamicDataCard",children:(0,a.jsxs)("div",{className:"dynamicData",children:[(0,a.jsx)(D,{module:O,styles:{width:"24px",height:"24px"}}),(0,a.jsx)("span",{className:"dynamicData-content",children:null==N?void 0:N.dynamicDataOne})]})}),C||null==N||null===(null==N?void 0:N.dynamicDataTwo)?(0,a.jsx)("div",{}):(0,a.jsx)("div",{className:"dynamicDataCard",children:(0,a.jsxs)("div",{className:"dynamicData",children:[(0,a.jsx)(D,{module:O,styles:{width:"24px",height:"24px"}}),(0,a.jsx)("span",{className:"dynamicData-content",children:null==N?void 0:N.dynamicDataTwo})]})}),P&&null!=P&&P.staticDataOne?(0,a.jsx)("div",{className:"staticDataCard",children:(0,a.jsxs)("div",{className:"staticData",children:[(0,a.jsx)(I,{module:O}),(0,a.jsxs)("span",{className:"static-data-content",children:[(0,a.jsx)("span",{className:"static-data-content-first",style:{marginTop:""===(null===(v=L(O))||void 0===v?void 0:v.staticDataOne)?"8px":"unset"},children:null===(p=L(O))||void 0===p?void 0:p.staticDataOneHeader}),(0,a.jsx)("span",{className:"static-data-content-second",children:"".concat(null===(m=L(O))||void 0===m?void 0:m.staticDataOne)})]})]})}):(0,a.jsx)("div",{}),P&&null!=P&&P.staticDataTwo?(0,a.jsx)("div",{className:"staticDataCard",children:(0,a.jsxs)("div",{className:"staticData",children:[(0,a.jsx)(T,{module:O}),(0,a.jsxs)("span",{className:"static-data-content",children:[(0,a.jsx)("span",{className:"static-data-content-first",children:null===(f=L(O))||void 0===f?void 0:f.staticDataTwoHeader}),(0,a.jsx)("span",{className:"static-data-content-second",children:null===(g=L(O))||void 0===g?void 0:g.staticDataTwo})]})]})}):(0,a.jsx)("div",{}),P&&null!=P&&P.validity?(0,a.jsx)("div",{className:"staticDataCard",children:(0,a.jsxs)("div",{className:"staticData",children:[(0,a.jsx)("span",{className:"validityIcon",children:(0,a.jsx)(i.ValidityTimeIcon,{})}),(0,a.jsxs)("span",{className:"static-data-content",children:[(0,a.jsx)("span",{className:"static-data-content-first",children:null===(y=A(O))||void 0===y?void 0:y.staticCommonContent}),(0,a.jsx)("span",{className:"static-data-content-second",children:null===(h=A(O))||void 0===h?void 0:h.validity})]})]})}):(0,a.jsx)("div",{}),C||null==N||null==N||!N.staticData||null===(null==N?void 0:N.staticData)?(0,a.jsx)("div",{}):(0,a.jsx)("div",{className:"staticDataCard",children:(0,a.jsxs)("div",{className:"staticData",children:["PGR"===O?(0,a.jsx)(D,{module:O,styles:{width:"24px",height:"24px",marginLeft:"13px",marginTop:"12px"}}):(0,a.jsx)("span",{className:"validityIcon",children:(0,a.jsx)(i.ValidityTimeIcon,{})}),(0,a.jsxs)("span",{className:"static-data-content",children:[(0,a.jsx)("span",{className:"static-data-content-first",children:null===(b=A(O))||void 0===b?void 0:b.staticCommonContent}),(0,a.jsx)("span",{className:"static-data-content-second",children:null==N?void 0:N.staticData})]})]})})]})]}):(0,a.jsx)(r().Fragment,{})}},3015(e,t,n){"use strict";n.d(t,{A:()=>s});var i=n(6243),o=n(4883),r=n.n(o),l=n(5953),a=n(6870);const s=e=>{var t,n=e.dropdown||!1,{data:s,isLoading:c}=Digit.Hooks.useStore.getInitData(),{languages:u,stateInfo:d}=s||{},{t:v}=(0,l.useTranslation)(),p=Digit.StoreData.getCurrentLanguage(),[m,f]=(0,o.useState)(p),g=e=>{f(e.value),Digit.LocalizationService.changeLanguage(e.value,d.code)};return c?null:n?(0,a.jsx)("div",{children:(0,a.jsx)(i.Dropdown,{className:"language-dropdown",option:u,selected:null==u?void 0:u.find(e=>(null==e?void 0:e.value)===p),optionKey:"label",select:g,freeze:!0,customSelector:(0,a.jsx)("label",{className:"cp",children:v(null==u||null===(t=u.find(e=>(null==e?void 0:e.value)===m))||void 0===t?void 0:t.label)})})}):(0,a.jsxs)(r().Fragment,{children:[(0,a.jsx)("div",{style:{marginBottom:"5px"},children:"Language"}),(0,a.jsx)("div",{className:"language-selector",children:u.map((e,t)=>(0,a.jsx)("div",{className:"language-button-container",children:(0,a.jsx)(i.Button,{label:e.label,onClick:()=>g(e),variation:e.value===m?"primary":""})},t))})]})}},3060(e,t){"use strict";var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function o(e,t,i){var o=null;if(void 0!==i&&(o=""+i),void 0!==t.key&&(o=""+t.key),"key"in t)for(var r in i={},t)"key"!==r&&(i[r]=t[r]);else i=t;return t=i.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:i}}t.Fragment=i,t.jsx=o,t.jsxs=o},3333(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>d});var i=n(4883),o=n(6243),r=n(5953),l=n(4442),a=n(5697),s=n(5660),c=n(6177),u=n(6870);const d=()=>{var e,t,n,d,{t:v}=(0,r.useTranslation)(),p=(0,l.useLocation)(),{tenant:m}=p.state||{},f=(0,i.useRef)(null),g=null===(e=Digit.SessionStorage.get("User"))||void 0===e||null===(e=e.info)||void 0===e?void 0:e.roles,[y,h]=(0,i.useState)(!0),{data:b}=Digit.Hooks.useCustomMDMS(m,"SandBoxLanding",[{name:"LandingPageRoles"}],{enabled:!0,staleTime:0,gcTime:0,select:e=>{var t;return null==e||null===(t=e.SandBoxLanding)||void 0===t?void 0:t.LandingPageRoles}});(0,i.useEffect)(()=>{null!=b&&b[0].url&&h(!1)},[b]);var O=null==b?void 0:b[0].url;return(0,u.jsxs)(a.A,{children:[(0,u.jsx)("div",{className:"employeeBackbuttonAlign",children:(0,u.jsx)(o.BackLink,{onClick:()=>window.history.back()})}),(0,u.jsxs)(o.Card,{className:"card-sandbox",children:[(0,u.jsx)(s.A,{showTenant:!1}),(0,u.jsx)("div",{className:"sandbox-success-signup",children:(0,u.jsx)(o.SVG.TickMark,{fill:"#fff",height:30,width:70})}),(0,u.jsx)(o.CardHeader,{className:"cardHeader-sandbox",styles:{color:"#00703c"},children:v("SANDBOX_HEADER")}),(0,u.jsx)(o.CardText,{className:"cardText-sandbox",children:v("SAMDBOX_URL_SUB")}),(0,u.jsxs)(o.CardLabel,{children:[" ",v("SANDBOX_URL")," "]}),(0,u.jsxs)("div",{className:"sandbox-url-wrapper",children:[(0,u.jsx)(o.TextInput,{inputRef:f,className:"urlInputText",onChange:()=>{},nonEditable:!0,value:"".concat(window.location.host,"/").concat(null===(t=window)||void 0===t?void 0:t.globalPath,"/").concat(m,"/employee")}),(0,u.jsx)(o.Button,{className:"copyButton",variation:"secondary",onClick:()=>{navigator.clipboard.writeText(f.current.value)},label:v("COPY_URL")})]}),(0,u.jsx)("div",{className:"sandbox-url-footer",children:v("SANDBOX_URL_FOOT")}),(0,u.jsx)(o.Button,{isDisabled:y,onClick:()=>{var e,t;((e,t)=>{var n;return"SUPERUSER"===(null==e||null===(n=e[0])||void 0===n?void 0:n.code)&&t.some(e=>e.rolesForLandingPage.includes("SUPERUSER"))})(g,b)?window.location.href="/".concat(null===(e=window)||void 0===e?void 0:e.globalPath,"/").concat(m).concat(O):window.location.href="/".concat(null===(t=window)||void 0===t?void 0:t.globalPath,"/").concat(m,"/employee")},label:v("SIGN_IN")})]}),(0,u.jsx)("div",{className:"EmployeeLoginFooter",children:(0,u.jsx)(c.A,{alt:"Powered by DIGIT",src:null===(n=window)||void 0===n||null===(n=n.globalConfigs)||void 0===n||null===(d=n.getConfig)||void 0===d?void 0:d.call(n,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:()=>{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()}})})]})}},3934(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>D});var i=n(4883),o=n(5953),r=n(4442),l=n(4650),a=[{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"}}]}],s=n(6243),c=n(7598),u=n.n(c),d=n(5697),v=n(5660),p=n(5419),m=n(6177),f=n(5181),g=n(6870),y=["UserRequest"];function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach(function(t){O(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function O(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}function S(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){x(r,i,o,l,a,"next",e)}function a(e){x(r,i,o,l,a,"throw",e)}l(void 0)})}}var j=e=>{var t,n,o,l,{config:a,t:c,isDisabled:u,loginOTPBased:f}=e,{data:h,isLoading:O}=Digit.Hooks.useTenants(),{data:x,isLoading:j}=Digit.Hooks.useStore.getInitData(),{stateInfo:_}=x||{},[w,C]=(0,i.useState)(null),[N,E]=(0,i.useState)(null),[D,P]=(0,i.useState)(!1),I=(0,r.useNavigate)(),T=null===(t=Digit.ComponentRegistryService)||void 0===t?void 0:t.getComponent("DynamicLoginComponent");(0,i.useEffect)(()=>{var e,t,n,i,o,r,l,a,s,c;if(w){Digit.SessionStorage.set("citizen.userRequestObject",w);var u=null==w||null===(e=w.info)||void 0===e||null===(e=e.roles)||void 0===e?void 0:e.filter(e=>e.tenantId===Digit.SessionStorage.get("Employee.tenantId"));(null==w||null===(t=w.info)||void 0===t||null===(t=t.roles)||void 0===t?void 0:t.length)>0&&(w.info.roles=u),Digit.UserService.setUser(w),((e,t)=>{var n;if(!Digit.Utils.getMultiRootTenant()){var i=(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",i),localStorage.setItem("Employee.locale",i),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==w?void 0:w.info,null==w?void 0:w.access_token);var d,v,p,m,f="/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/employee");null!==(i=window)&&void 0!==i&&null!==(i=i.location)&&void 0!==i&&null!==(i=i.href)&&void 0!==i&&i.includes("from=")&&(f=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===(v=window)||void 0===v?void 0:v.contextPath,"/employee")),null!=w&&null!==(o=w.info)&&void 0!==o&&o.roles&&(null==w||null===(r=w.info)||void 0===r||null===(r=r.roles)||void 0===r?void 0:r.length)>0&&null!=w&&null!==(l=w.info)&&void 0!==l&&null!==(l=l.roles)&&void 0!==l&&l.every(e=>"NATADMIN"===e.code)&&(f="/".concat(null===(p=window)||void 0===p?void 0:p.contextPath,"/employee/dss/landing/NURT_DASHBOARD")),null!=w&&null!==(a=w.info)&&void 0!==a&&a.roles&&(null==w||null===(s=w.info)||void 0===s||null===(s=s.roles)||void 0===s?void 0:s.length)>0&&null!=w&&null!==(c=w.info)&&void 0!==c&&null!==(c=c.roles)&&void 0!==c&&c.every(e=>"STADMIN"===e.code)&&(f="/".concat(null===(m=window)||void 0===m?void 0:m.contextPath,"/employee/dss/landing/home")),I(f,{replace:!0})}},[w]);var A=function(){var e=S(function*(e){var t,n;null!=e&&e.username&&(e.username=e.username.trim()),null!=e&&e.password&&(e.password=e.password.trim()),P(!0);var i=b(b(b({},e),H),{},{userType:"EMPLOYEE"});i.tenantId=(null==i||null===(t=i.city)||void 0===t?void 0:t.code)||(null===(n=Digit)||void 0===n||null===(n=n.ULBService)||void 0===n?void 0:n.getStateId()),delete i.city;try{var o=yield Digit.UserService.authenticate(i),{UserRequest:r}=o,l=function(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(o,y);Digit.SessionStorage.set("Employee.tenantId",null==r?void 0:r.tenantId),C(b({info:r},l))}catch(e){var a;E((null==e||null===(a=e.response)||void 0===a||null===(a=a.data)||void 0===a?void 0:a.error_description)||"ES_ERROR_USER_NOT_PERMITTED"==(null==e?void 0:e.message)&&c("ES_ERROR_USER_NOT_PERMITTED")||c("INVALID_LOGIN_CREDENTIALS")),setTimeout(k,5e3)}P(!1)});return function(t){return e.apply(this,arguments)}}(),L={url:"/user-otp/v1/_send",params:{tenantId:null===(n=Digit)||void 0===n||null===(n=n.ULBService)||void 0===n?void 0:n.getStateId()},body:{},config:{enable:!1}},R=Digit.Hooks.useCustomAPIMutationHook(L),M=function(){var e=S(function*(e){var t,n,i=e.email;yield R.mutate({body:{otp:{userName:e.email,type:"login",tenantId:null===(t=Digit)||void 0===t||null===(t=t.ULBService)||void 0===t?void 0:t.getStateId(),userType:"EMPLOYEE"}},config:{enable:!0}},{onError:(e,t)=>{var n,i;E(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===(i=e.response)||void 0===i||null===(i=i.data)||void 0===i||null===(i=i.Errors)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.code):"SANDBOX_RESEND_OTP_ERROR"),setTimeout(k,5e3)},onSuccess:(n=S(function*(e){var t,n;I("/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/employee/user/login/otp"),{state:{email:i,tenant:null===(n=Digit)||void 0===n||null===(n=n.ULBService)||void 0===n?void 0:n.getStateId()}})}),function(e){return n.apply(this,arguments)})})});return function(t){return e.apply(this,arguments)}}(),k=()=>{E(null)},U=()=>{var e;I("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/employee/user/forgot-password"))},B=Digit.ULBService.getStateId(),F={code:B,name:Digit.Utils.locale.getTransformedLocale("TENANT_TENANTS_".concat(B))},V=[{body:null==a?void 0:a.inputs}],{mode:G}=Digit.Hooks.useQueryParams();"admin"===G&&0==(null==V||null===(o=V[0])||void 0===o||null===(o=o.body)||void 0===o||null===(o=o[2])||void 0===o?void 0:o.disable)&&null==(null==V||null===(l=V[0])||void 0===l||null===(l=l.body)||void 0===l||null===(l=l[2])||void 0===l||null===(l=l.populators)||void 0===l?void 0:l.defaultValue)&&(V[0].body[2].disable=!0,V[0].body[2].isMandatory=!1,V[0].body[2].populators.defaultValue=F);var H=(0,i.useMemo)(()=>Object.fromEntries(V[0].body.filter(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(e=>[e.populators.name,e.populators.defaultValue])),[]),z=(e,t,n)=>{var i=V[0].body.filter(e=>null==e?void 0:e.isMandatory).map(e=>null==e?void 0:e.key).some(e=>{var n=t[e];return null==n||""===n||!1===n});P(i)},W=function(){var e,t,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return(0,g.jsx)(s.FormComposerV2,{onSubmit:f?M:A,isDisabled:u||D,noBoxShadow:!0,inline:!0,submitInForm:!0,config:V,label:null==a||null===(e=a.texts)||void 0===e?void 0:e.submitButtonLabel,secondaryActionLabel:(null==a||null===(t=a.texts)||void 0===t?void 0:t.secondaryButtonLabel)+(i.includes("login-form-container")?"?":""),onSecondayActionClick:U,onFormValueChange:z,heading:null==a||null===(n=a.texts)||void 0===n?void 0:n.header,className:"".concat(r),cardSubHeaderClassName:"loginCardSubHeaderClassName",cardClassName:o,buttonClassName:"buttonClassName",defaultValues:H,children:null!=_&&_.code?(0,g.jsx)(v.A,{}):(0,g.jsx)(v.A,{showTenant:!1})})},q=e=>{var t,n;return(0,g.jsx)("div",{className:e,style:{backgroundColor:"unset"},children:(0,g.jsx)(m.A,{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:()=>{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 O||j?(0,g.jsx)(s.Loader,{page:!0,variant:"PageLoader"}):null!=a&&a.bannerImages?(0,g.jsxs)("div",{className:"login-container",children:[(0,g.jsx)(p.A,{bannerImages:null==a?void 0:a.bannerImages}),(0,g.jsxs)("div",{className:"login-form-container",children:[W("login-form-container","",f?"sandbox-onboarding-wrapper":""),T&&(0,g.jsx)(T,{}),N&&(0,g.jsx)(s.Toast,{type:"error",label:c(N),onClose:k}),q("EmployeeLoginFooter")]})]}):(0,g.jsxs)(d.A,{children:[(0,g.jsx)("div",{className:"employeeBackbuttonAlign",children:(0,g.jsx)(s.BackLink,{onClick:()=>window.history.back()})}),W("loginFormStyleEmployee","loginCardClassName",f?"sandbox-onboarding-wrapper":""),T&&(0,g.jsx)(T,{}),N&&(0,g.jsx)(s.Toast,{type:"error",label:c(N),onClose:k}),q("employee-login-home-footer")]})};j.propTypes={loginParams:u().any},j.defaultProps={loginParams:null};const _=(0,f.A)(j,".login-form-container");var w=n(1065);function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach(function(t){E(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function E(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const D=e=>{var t,{stateCode:n}=e,{t:c}=(0,o.useTranslation)(),[u,d]=(0,i.useState)(l.m),[v,p]=(0,i.useState)(a),m=Digit.StoreData.getCurrentLanguage(),f=(null===(t=window)||void 0===t||null===(t=t.globalConfigs)||void 0===t?void 0:t.getConfig("OTP_BASED_LOGIN"))||!1,{data:y,isLoading:h}=(0,w.P)(n),{data:b}=Digit.Services.useStore({stateCode:n,moduleCode:["privacy-policy"],language:m,modulePrefix:"digit"});(0,i.useEffect)(()=>{!h&&null!=y&&y.config?d(null==y?void 0:y.config):d(l.m)},[y,h]);var O=(0,i.useMemo)(()=>u.map(e=>{var t={};for(var n in e.texts)t[n]=c(e.texts[n]);return N(N({},e),{},{texts:t})},[u])),x=(0,i.useMemo)(()=>v.map(e=>{var t={};for(var n in e.texts)t[n]=c(e.texts[n]);return N(N({},e),{},{texts:t})},[v]));return h?(0,g.jsx)(s.Loader,{page:!1,variant:"PageLoader"}):(0,g.jsxs)(r.Routes,{children:[" ",(0,g.jsx)(r.Route,{path:"/",element:f?(0,g.jsx)(_,{config:x[0],t:c,loginOTPBased:f}):(0,g.jsx)(_,{config:O[0],t:c})})]})}},4217(e,t,n){"use strict";n.d(t,{A:()=>c});var i=n(4883),o=n.n(i),r=n(6340),l=n(6870),a=()=>{if("undefined"==typeof window)return(0,l.jsx)("span",{});try{var e,t=(null===(e=window)||void 0===e?void 0:e.contextPath)||"",n=Digit.UserService.getType(),i="/".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,l.jsx)("span",{});try{window.location.href=i}catch(e){console.warn("Navigation failed in error boundary:",e);try{window.location.replace(i)}catch(e){console.error("Both href and replace failed:",e)}}}catch(e){console.error("Error in Redircter component:",e)}return(0,l.jsx)("span",{})};class s extends o().Component{constructor(e){super(e),this.state={error:null,errorStack:null,hasError:!1,module:null,action:null,info:null}}static getDerivedStateFromError(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}}componentDidCatch(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})}render(){return this.state.hasError?(0,l.jsxs)("div",{className:"error-boundary",children:[(0,l.jsx)(a,{}),(0,l.jsx)(r.default,{initData:this.props.initData,errorData:this.state,goToHome:()=>{var e,t,n;window.location.href="/".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))}})]}):this.props.children}}const c=s},4442(e){"use strict";e.exports=r},4456(e){"use strict";e.exports=i},4650(e,t,n){"use strict";n.d(t,{m:()=>i});var i=[{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}]}]},4781(e,t,n){"use strict";n.d(t,{A:()=>O});var i=n(4883),o=n.n(i),r=n(5053),l=n(4442),a=n(3015),s=n(6870);const c=(e,t,n,i)=>[{type:"component",element:"LANGUAGE",action:(0,s.jsx)(a.A,{}),icon:"LanguageIcon"},{id:"login-btn",element:"LOGIN",text:e("CORE_COMMON_LOGIN"),icon:(0,s.jsx)(r.LogoutIcon,{className:"icon"}),populators:{onClick:n}}];var u=n(5953),d=n(6810),v=n(358),p=n(8808),m=n(6177);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(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"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h=e=>{var{info:t,stateName:n,t:i}=e;return(0,s.jsxs)("div",{className:"profile-section",children:[(0,s.jsx)("div",{className:"imageloader imageloader-loaded",children:(0,s.jsx)(m.A,{className:"img-responsive img-circle img-Profile",src:p.X,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)(v.A,{t:i,mobileView:!0})]})},b={CommonPTIcon:(0,s.jsx)(r.PTIcon,{className:"icon"}),OBPSIcon:(0,s.jsx)(r.OBPSIcon,{className:"icon"}),propertyIcon:(0,s.jsx)(r.PropertyHouse,{className:"icon"}),TLIcon:(0,s.jsx)(r.CaseIcon,{className:"icon"}),PGRIcon:(0,s.jsx)(r.PGRIcon,{className:"icon"}),FSMIcon:(0,s.jsx)(r.FSMIcon,{className:"icon"}),WSIcon:(0,s.jsx)(r.WSICon,{className:"icon"}),MCollectIcon:(0,s.jsx)(r.MCollectIcon,{className:"icon"}),BillsIcon:(0,s.jsx)(r.CollectionIcon,{className:"icon"}),BirthIcon:(0,s.jsx)(r.BirthIcon,{className:"icon"}),DeathIcon:(0,s.jsx)(r.DeathIcon,{className:"icon"}),FirenocIcon:(0,s.jsx)(r.FirenocIcon,{className:"icon"}),HomeIcon:(0,s.jsx)(r.HomeIcon,{className:"icon"}),EditPencilIcon:(0,s.jsx)(r.EditPencilIcon,{className:"icon"}),LogoutIcon:(0,s.jsx)(r.LogoutIcon,{className:"icon"}),Phone:(0,s.jsx)(r.Phone,{className:"icon"})};const O=e=>{var t,n,a,{linkData:v,islinkDataLoading:p}=e,{t:m}=(0,u.useTranslation)(),f=(0,l.useNavigate)(),y=(0,l.useLocation)(),{pathname:O}=y,{data:x,isFetched:S}=Digit.Hooks.useStore.getInitData(),{stateInfo:j}=x||{},_=Digit.UserService.getUser(),w=window.Digit.Utils.browser.isMobile(),[C,N]=(0,i.useState)(!1),[E,D]=(0,i.useState)(!1),[P,I]=(0,i.useState)(!1),T=()=>{I(!1)};if(p)return(0,s.jsx)(r.Loader,{});var A=()=>{var e;f("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/user/profile"))},L=[...c(m,0,()=>{var e;f("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/login"))})];L=L.filter(e=>"LANGUAGE"!==e.element);var R,M,k,U,B,F,V=Digit.ULBService.getCurrentTenantId(),G=e=>{var t,n,{item:i}=e,o=(null==i?void 0:i.icon)||(null===(t=i.icon)||void 0===t||null===(t=t.type)||void 0===t?void 0:t.name),r=o?b[o]:b.BillsIcon;n="component"===i.type?i.action:i.text;var a=()=>(0,s.jsxs)("span",g(g({className:"menu-item"},i.populators),{},{children:[r,(0,s.jsx)("div",{className:"menu-label",children:n})]}));return"external-link"===i.type?(0,s.jsx)("a",{href:i.link,children:(0,s.jsx)(a,{})}):"link"===i.type?(0,s.jsx)(l.Link,{to:null==i?void 0:i.link,children:(0,s.jsx)(a,{})}):(0,s.jsx)(a,{})};return S&&_&&_.access_token&&"CITIZEN"===(null==_||null===(t=_.info)||void 0===t?void 0:t.type)&&(R=(0,s.jsx)(h,{info:null==_?void 0:_.info,stateName:null==j?void 0:j.name,t:m}),L=L.filter(e=>"login-btn"!==(null==e?void 0:e.id)),L=[...L,{type:"link",icon:"HomeIcon",element:"HOME",text:m("COMMON_BOTTOM_NAVIGATION_HOME"),link:C?"/".concat(null===(M=window)||void 0===M?void 0:M.contextPath,"/employee"):"/".concat(null===(k=window)||void 0===k?void 0:k.contextPath,"/citizen"),populators:{onClick:()=>{var e;f("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/all-services"))}}},{text:m("EDIT_PROFILE"),element:"PROFILE",icon:"EditPencilIcon",populators:{onClick:A}},{text:m("CORE_COMMON_LOGOUT"),element:"LOGOUT",icon:"LogoutIcon",populators:{onClick:()=>{D(!1),I(!0)}}},{text:(0,s.jsxs)(o().Fragment,{children:[m("CS_COMMON_HELPLINE"),(0,s.jsxs)("div",{className:"telephone",style:{marginTop:"-10%"},children:[null==x||null===(U=x.tenants)||void 0===U?void 0:U.map(e=>{var t,n,i,o;e.code===V?("tel:".concat(null==x||null===(t=x.tenants)||void 0===t?void 0:t[e].contactNumber),null==x||null===(n=x.tenants)||void 0===n||n[e].contactNumber):("tel:".concat(null==x||null===(i=x.tenants)||void 0===i?void 0:i[0].contactNumber),null==x||null===(o=x.tenants)||void 0===o||o[0].contactNumber)}),(0,s.jsx)("div",{className:"link",children:(0,s.jsx)("a",{href:"tel:".concat(null==x||null===(B=x.tenants)||void 0===B?void 0:B[0].contactNumber),children:null==x||null===(F=x.tenants)||void 0===F?void 0:F[0].contactNumber})})]})]}),element:"Helpline",icon:"Phone"}]),null===(n=Object.keys(v))||void 0===n||null===(n=n.sort((e,t)=>t.localeCompare(e)))||void 0===n||n.map(e=>{var t,n,i,o,r;(null===(t=v[e][0])||void 0===t?void 0:t.sidebar)==="".concat(window.contextPath,"-links")&&L.splice(1,0,{type:null!==(n=v[e][0])&&void 0!==n&&null!==(n=n.sidebarURL)&&void 0!==n&&n.includes(null===(i=window)||void 0===i?void 0:i.contextPath)?"link":"external-link",text:m("ACTION_TEST_".concat(Digit.Utils.locale.getTransformedLocale(e))),links:v[e],icon:null===(o=v[e][0])||void 0===o?void 0:o.leftIcon,link:null===(r=v[e][0])||void 0===r?void 0:r.sidebarURL})}),(0,s.jsx)(o().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:w?"calc(100vh - 56px)":"auto",zIndex:"99"},children:[R,(0,s.jsx)("div",{className:"drawer-desktop",children:null===(a=L)||void 0===a?void 0:a.map((e,t)=>(0,s.jsx)("div",{className:"sidebar-list ".concat(O===(null==e?void 0:e.link)||O===(null==e?void 0:e.sidebarURL)?"active":""),children:(0,s.jsx)(G,{item:e})},t))})]}),(0,s.jsx)("div",{children:P&&(0,s.jsx)(d.A,{onSelect:()=>{var e;Digit.Utils.getMultiRootTenant()?(Digit.UserService.logout(),I(!1),window.location.href="/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/login")):(Digit.UserService.logout(),I(!1))},onCancel:T,onDismiss:T})})]})})}},4872(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>S});var i=n(6243),o=n(5053),r=n(4883),l=n.n(r),a=n(5953),s=n(4442),c=n(6870);function u(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}const d=function(e){var{setProfilePic:t,closeDrawer:n,userType:i,removeProfilePic:s,showToast:d}=e,[v,p]=(0,r.useState)(null),[m,f]=(0,r.useState)(""),[g,y]=(0,r.useState)(null),{t:h}=(0,a.useTranslation)();return(0,r.useEffect)(()=>{var e;(e=function*(){if(y(null),m)if(m.size>=1e6)d("error",h("CORE_COMMON_PROFILE_MAXIMUM_UPLOAD_SIZE_EXCEEDED")),y(h("CORE_COMMON_PROFILE_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else try{var e,n=yield Digit.UploadServices.Filestorage("".concat(i,"-profile"),m,Digit.ULBService.getStateId());if((null==n||null===(e=n.data)||void 0===e||null===(e=e.files)||void 0===e?void 0:e.length)>0){var o,r=null==n||null===(o=n.data)||void 0===o||null===(o=o.files[0])||void 0===o?void 0:o.fileStoreId;p(r),t(r)}else d("error",h("CORE_COMMON_PROFILE_FILE_UPLOAD_ERROR")),y(h("CORE_COMMON_PROFILE_FILE_UPLOAD_ERROR"))}catch(e){d("error",h("CORE_COMMON_PROFILE_INVALID_FILE_INPUT"))}},function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){u(r,i,o,l,a,"next",e)}function a(e){u(r,i,o,l,a,"throw",e)}l(void 0)})})()},[m]),(0,c.jsxs)(l().Fragment,{children:[(0,c.jsx)("div",{style:{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",width:"100%",height:"100vh",backgroundColor:"rgba(0,0,0,.5)"},onClick:()=>n()}),(0,c.jsxs)("div",{style:{width:"100%",justifyContent:"space-between",display:"flex",backgroundColor:"white",alignItems:"center",position:"fixed",left:"0",right:"0",height:"20%",bottom:"citizen"===i?"2.5rem":"0",zIndex:"1000"},children:[(0,c.jsxs)("div",{style:{display:"flex",flex:"1",flexDirection:"column",width:"100%",justifyContent:"center",alignItems:"center",gap:"8px 0"},children:[(0,c.jsxs)("label",{for:"file",style:{cursor:"pointer"},children:[" ",(0,c.jsx)(o.GalleryIcon,{})]}),(0,c.jsx)("label",{style:{cursor:"pointer"},children:" Gallery"}),(0,c.jsx)("input",{type:"file",id:"file",accept:"image/*, .png, .jpeg, .jpg",onChange:e=>f(e.target.files[0]),style:{display:"none"}})]}),(0,c.jsxs)("div",{style:{display:"flex",flex:"1",width:"100%",justifyContent:"center",alignItems:"center",flexDirection:"column",gap:"8px 0"},children:[(0,c.jsx)("button",{onClick:()=>{s(),n()},children:(0,c.jsx)(o.RemoveIcon,{})}),(0,c.jsx)("label",{style:{cursor:"pointer"},children:"Remove"})]})]})]})};var v,p,m=n(6177);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(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"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}function b(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){h(r,i,o,l,a,"next",e)}function a(e){h(r,i,o,l,a,"throw",e)}l(void 0)})}}var O=null===(v=Digit)||void 0===v||null===(v=v.ULBService)||void 0===v||null===(p=v.getStateId)||void 0===p?void 0:p.call(v),x={tenantId:"".concat(O),UserProfileValidationConfig:[{name:"/^[a-zA-Z ]+$/i",mobileNumber:"/^[6-9]{1}[0-9]{9}$/",password:"/^([a-zA-Z0-9@#$%]{8,15})$/i"}]};const S=e=>{var t,n,u,v,p,f,y,h,O,S,j,_,w,C,N,E,D,P,I,T,A,L,R,M,{stateCode:k,userType:U,cityDetails:B}=e,F=(0,s.useNavigate)(),{t:V}=(0,a.useTranslation)(),G=window.location.href,H=Digit.ULBService.getStateId(),z=Digit.ULBService.getCurrentTenantId(),W=(null===(t=Digit.UserService.getUser())||void 0===t?void 0:t.info)||{},[q,X]=(0,r.useState)(null),[Q,Z]=(0,r.useState)(null!=W&&W.name?W.name:""),[Y,K]=(0,r.useState)(null!=W&&W.emailId?W.emailId:""),[J,$]=(0,r.useState)(null==q?void 0:q.gender),[ee,te]=(0,r.useState)(null!=W&&W.permanentCity?W.permanentCity:B.name),[ne,ie]=(0,r.useState)(null!=W&&W.mobileNumber?W.mobileNumber:""),[oe,re]=(0,r.useState)(null),[le,ae]=(0,r.useState)(""),[se,ce]=(0,r.useState)(!1),[ue,de]=(0,r.useState)(!1),[ve,pe]=(0,r.useState)(""),[me,fe]=(0,r.useState)(""),[ge,ye]=(0,r.useState)(""),[he,be]=(0,r.useState)(null),[Oe,xe]=(0,r.useState)(!1),[Se,je]=l().useState(window.innerWidth),[_e,we]=l().useState({}),Ce=window.Digit.Utils.browser.isMobile(),Ne=Digit.Utils.getMultiRootTenant(),Ee=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((e,t)=>{var[n,i]=t;if("string"==typeof i)try{if(i.startsWith("/")&&i.lastIndexOf("/")>0){var o=i.lastIndexOf("/"),r=i.slice(1,o),l=i.slice(o+1);e[n]=new RegExp(r,l)}else e[n]=new RegExp(i)}catch(t){console.error('Error parsing regex for key "'.concat(n,'":'),t),e[n]=i}else e[n]=i;return e},{})},[De,Pe]=(0,r.useState)(Ee(x)||{}),{data:Ie,isValidationConfigLoading:Te}=Digit.Hooks.useCustomMDMS(k,"commonUiConfig",[{name:"UserProfileValidationConfig"}],{select:e=>null==e?void 0:e.commonUiConfig});(0,r.useEffect)(()=>{var e;if(Ie&&null!=Ie&&null!==(e=Ie.UserProfileValidationConfig)&&void 0!==e&&e[0]){var t=Ee(Ie);Pe(t)}},[Ie]);var Ae=function(){var e=b(function*(){var e=null==W?void 0:W.uuid;if(e){var t=yield Digit.UserService.userSearch(z,{uuid:[e]},{});t&&t.user&&t.user.length&&X(t.user[0])}});return function(){return e.apply(this,arguments)}}();l().useEffect(()=>{var e=()=>je(window.innerWidth);return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),(0,r.useEffect)(()=>{var e;xe(!0),Ae(),$({i18nKey:void 0,code:null==q?void 0:q.gender,value:null==q?void 0:q.gender});var t=null==q||null===(e=q.photo)||void 0===e?void 0:e.split(",");ae(null==t?void 0:t.at(0)),xe(!1)},[null!==q]);var Le=!1,Re=e=>$(e),Me=()=>ce(!1),ke=e=>{var t;Z(e),null==De||null===(t=De.name)||void 0===t||!t.test(e)||0===e.length||e.length>50?we(g(g({},_e),{},{userName:{type:"pattern",message:"CORE_COMMON_PROFILE_NAME_INVALID"}})):we(g(g({},_e),{},{userName:null}))},Ue=e=>{(null==W?void 0:W.userName)!==e?(K(e),!e.length||e.includes("@")&&e.includes(".")?we(g(g({},_e),{},{emailAddress:null})):we(g(g({},_e),{},{emailAddress:{type:"pattern",message:"CORE_COMMON_PROFILE_EMAIL_INVALID"}}))):we(g(g({},_e),{},{emailAddress:null}))},Be=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3;be({key:e,action:t}),setTimeout(()=>{be(null)},n)},Fe=function(){var e=b(function*(){xe(!0);try{var e=g(g({},W),{},{name:Q,gender:null==J?void 0:J.value,emailId:Y,photo:oe});if(Q&&Z(e=>e.trim()),null==De||!De.name.test(Q)||""===Q||Q.length>50||Q.length<1)throw JSON.stringify({type:"error",message:V("CORE_COMMON_PROFILE_NAME_INVALID")});if("employee"===U&&(null==De||!De.mobileNumber.test(ne)))throw JSON.stringify({type:"error",message:V("CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID")});if(Y.length&&(!Y.includes("@")||!Y.includes(".")))throw JSON.stringify({type:"error",message:V("CORE_COMMON_PROFILE_EMAIL_INVALID")});var t=ve.trim(),n=me.trim(),i=ge.trim();if(pe(t),fe(n),ye(i),ue&&t&&n&&i){if(n!==i)throw JSON.stringify({type:"error",message:V("CORE_COMMON_PROFILE_PASSWORD_MISMATCH")});if(!(t.length&&n.length&&i.length))throw JSON.stringify({type:"error",message:V("CORE_COMMON_PROFILE_PASSWORD_INVALID")});if(!(null!=De&&De.password.test(n)||null!=De&&De.password.test(i)))throw JSON.stringify({type:"error",message:V("CORE_COMMON_PROFILE_PASSWORD_INVALID")})}var{responseInfo:o,user:r}=yield Digit.UserService.updateUser(e,k);if(o&&"200"===o.status){var l=Digit.UserService.getUser();l&&Digit.UserService.setUser(g(g({},l),{},{info:g(g({},l.info),{},{name:Q,mobileNumber:ne,emailId:Y,permanentCity:ee})}))}if(ve.length&&me.length&&ge.length){var a={existingPassword:ve,newPassword:me,tenantId:z,type:"EMPLOYEE",username:null==W?void 0:W.userName,confirmPassword:ge};if(me!==ge)throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_ERROR_PASSWORD_NOT_MATCH"});try{var s=yield Digit.UserService.changePassword(a,z),{responseInfo:c}=s;if(null==c||!c.status||"200"!==c.status)throw"";Be("success",V("CORE_COMMON_PROFILE_UPDATE_SUCCESS_WITH_PASSWORD"),5e3),setTimeout(()=>Digit.UserService.logout(),2e3)}catch(e){var u;throw JSON.stringify({type:"error",message:null!==(u=e.Errors)&&void 0!==u&&null!==(u=u.at(0))&&void 0!==u&&u.description?e.Errors.at(0).description:"CORE_COMMON_PROFILE_UPDATE_ERROR_WITH_PASSWORD"})}}else null!=o&&o.status&&"200"===o.status&&Be("success",V("CORE_COMMON_PROFILE_UPDATE_SUCCESS"),5e3)}catch(e){var d=JSON.parse(e);Be(d.type,V(d.message),5e3)}xe(!1)});return function(){return e.apply(this,arguments)}}(),Ve=[],{data:Ge}=Digit.Hooks.useGenderMDMS(H,"common-masters","GenderType");Ge&&Ge.map(e=>{Ve.push({i18nKey:"PT_COMMON_GENDER_".concat(e.code),code:"".concat(e.code),value:"".concat(e.code)})});var He=function(){var e=b(function*(e){re(e);var t=e?yield ze([e],H):null;ae(null==t?void 0:t.thumbs[0]),Me()});return function(t){return e.apply(this,arguments)}}(),ze=function(){var e=b(function*(e,t){var n=yield Digit.UploadServices.Filefetch(e,t);return n.data.fileStoreIds&&0!==n.data.fileStoreIds.length?{thumbs:n.data.fileStoreIds.map(e=>e.url.split(",")[3]),images:n.data.fileStoreIds.map(e=>Digit.Utils.getFileUrl(e.url))}:null});return function(t,n){return e.apply(this,arguments)}}();return Oe||Te?(0,c.jsx)(i.Loader,{}):(0,c.jsxs)("div",{className:"user-profile ".concat("citizen"===U?"citizen":"employee"),children:[(0,c.jsx)("section",{style:{margin:"citizen"===U||Ce?"8px":"0px"},children:"citizen"===U||Ce?(0,c.jsx)(i.BackLink,{onClick:()=>F("/")}):(0,c.jsx)(i.BreadCrumb,{style:{marginTop:"0rem",marginBottom:"1.5rem"},crumbs:[{internalLink:Ne?"/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/employee/sandbox/landing"):"/".concat(null===(u=window)||void 0===u?void 0:u.contextPath,"/employee"),content:V("ES_COMMON_HOME"),show:!0},{internalLink:"/".concat(null===(v=window)||void 0===v?void 0:v.contextPath,"/employee/user/profile"),content:V("ES_COMMON_PAGE_1"),show:G.includes("/user/profile")}]})}),(0,c.jsxs)("div",{style:{display:"flex",flex:1,flexDirection:Se<768||"citizen"===U?"column":"row",margin:"citizen"===U?"8px":"0px",gap:"citizen"===U?"":"0 24px",boxShadow:"citizen"===U?"1px 1px 4px 0px rgba(0,0,0,0.2)":"",background:"citizen"===U?"white":"",borderRadius:"citizen"===U?"4px":"",maxWidth:"citizen"===U?"960px":""},children:[(0,c.jsx)("section",{style:{position:"relative",display:"flex",flex:"citizen"===U?1:2.5,justifyContent:"center",alignItems:"center",maxWidth:"100%",borderRadius:"4px",boxShadow:"citizen"===U?"":"1px 1px 4px 0px rgba(0,0,0,0.2)",border:"".concat("citizen"===U?"8px":"24px"," solid #fff"),background:"#EEEEEE",padding:"citizen"===U?"8px":"16px"},children:(0,c.jsxs)("div",{style:{position:"relative",height:"citizen"===U?"114px":"150px",width:"citizen"===U?"114px":"150px",margin:"16px"},children:[(0,c.jsx)(m.A,{style:{margin:"auto",borderRadius:"300px",justifyContent:"center",height:"100%",width:"100%"},src:le&&""!==le?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",alt:"Profile Image"}),(0,c.jsx)("button",{style:{position:"absolute",left:"50%",bottom:"-24px",transform:"translateX(-50%)"},onClick:()=>ce(!se),children:(0,c.jsx)(o.CameraIcon,{})})]})}),(0,c.jsx)("section",{style:{display:"flex",flexDirection:"column",flex:"citizen"===U?1:7.5,width:"100%",borderRadius:"4px",height:"fit-content",boxShadow:"citizen"===U?"":"1px 1px 4px 0px rgba(0,0,0,0.2)",background:"white",padding:"citizen"===U?"8px":"24px",paddingBottom:"20px"},children:"citizen"===U?(0,c.jsxs)(l().Fragment,{children:[(0,c.jsxs)(i.LabelFieldPair,{children:[(0,c.jsxs)(i.CardLabel,{className:"user-profile",style:{},children:["".concat(V("CORE_COMMON_PROFILE_NAME")),"*"]}),(0,c.jsxs)("div",{style:{width:"40rem",maxWidth:"960px"},children:[(0,c.jsx)(i.TextInput,g(g({t:V,style:{width:"100%"},type:"text",isMandatory:!1,name:"name",value:Q,onChange:e=>ke(e.target.value)},{isRequired:!0,pattern:(null==Ie||null===(p=Ie.UserProfileValidationConfig)||void 0===p||null===(p=p[0])||void 0===p?void 0:p.name)||(null==x||null===(f=x.UserProfileValidationConfig)||void 0===f||null===(f=f[0])||void 0===f?void 0:f.name),type:"tel",title:V("CORE_COMMON_PROFILE_NAME_ERROR_MESSAGE")}),{},{disable:Le})),(null==_e?void 0:_e.userName)&&(0,c.jsx)(i.ErrorMessage,{message:V(null==_e||null===(y=_e.userName)||void 0===y?void 0:y.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,c.jsxs)(i.LabelFieldPair,{children:[(0,c.jsx)(i.CardLabel,{className:"user-profile",style:{},children:"".concat(V("CORE_COMMON_PROFILE_GENDER"))}),(0,c.jsx)(i.Dropdown,{style:{width:"40rem",fontSize:"1rem"},className:"form-field profileDropdown",selected:1===(null==J?void 0:J.length)?J[0]:J,disable:1===(null==J?void 0:J.length)||Le,option:Ve,select:Re,value:J,optionKey:"code",t:V,name:"gender"})]}),(0,c.jsxs)(i.LabelFieldPair,{children:[(0,c.jsx)(i.CardLabel,{className:"user-profile",style:{},children:"".concat(V("CORE_COMMON_PROFILE_EMAIL"))}),(0,c.jsxs)("div",{style:{width:"40rem"},children:[(0,c.jsx)(i.TextInput,{t:V,style:{width:"100%"},type:"email",isMandatory:!1,optionKey:"i18nKey",name:"email",value:Y,onChange:e=>Ue(e.target.value),disabled:Le}),(null==_e?void 0:_e.emailAddress)&&(0,c.jsx)(i.ErrorMessage,{message:V(null==_e||null===(h=_e.emailAddress)||void 0===h?void 0:h.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,c.jsx)("button",{onClick:Fe,style:{marginTop:"24px",backgroundColor:"#c84c0e",width:"100%",height:"40px",color:"white",maxWidth:Ce?"100%":"240px",borderBottom:"1px solid black"},children:V("CORE_COMMON_SAVE")})]}):(0,c.jsxs)(l().Fragment,{children:[(0,c.jsxs)(i.LabelFieldPair,{style:{display:"flex"},children:[(0,c.jsxs)(i.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:["".concat(V("CORE_COMMON_PROFILE_NAME")),"*"]}),(0,c.jsxs)("div",{style:{width:"100%"},children:[(0,c.jsx)(i.TextInput,g(g({t:V,type:"text",isMandatory:!1,name:"name",value:Q,onChange:e=>ke(e.target.value),placeholder:"Enter Your Name"},{isRequired:!0,pattern:(null==Ie||null===(O=Ie.UserProfileValidationConfig)||void 0===O||null===(O=O[0])||void 0===O?void 0:O.name)||(null==x||null===(S=x.UserProfileValidationConfig)||void 0===S||null===(S=S[0])||void 0===S?void 0:S.name),type:"text",title:V("CORE_COMMON_PROFILE_NAME_ERROR_MESSAGE")}),{},{disabled:Le})),(null==_e?void 0:_e.userName)&&(0,c.jsx)(i.ErrorMessage,{message:V(null==_e||null===(j=_e.userName)||void 0===j?void 0:j.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,c.jsxs)(i.LabelFieldPair,{style:{display:"flex"},children:[(0,c.jsx)(i.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(V("CORE_COMMON_PROFILE_GENDER"))}),(0,c.jsx)("div",{style:{width:"100%"},children:(0,c.jsx)(i.Dropdown,{className:"profileDropdown",selected:1===(null==J?void 0:J.length)?J[0]:J,disable:1===(null==J?void 0:J.length)||Le,option:Ve,select:Re,value:J,optionKey:"code",t:V,name:"gender"})})]}),(0,c.jsxs)(i.LabelFieldPair,{style:{display:"flex"},children:[(0,c.jsx)(i.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(V("CORE_COMMON_PROFILE_CITY"))}),(0,c.jsxs)("div",{style:{width:"100%"},children:[(0,c.jsx)(i.TextInput,g(g({t:V,type:"text",isMandatory:!1,name:"city",value:V(Digit.Utils.locale.getTransformedLocale("TENANT_TENANTS_".concat(z))),onChange:e=>te(e.target.value),placeholder:"Enter Your City Name"},{isRequired:!0,type:"text",title:V("CORE_COMMON_PROFILE_CITY_ERROR_MESSAGE")}),{},{disabled:!0})),(0,c.jsx)(i.ErrorMessage,{})]})]}),(0,c.jsxs)(i.LabelFieldPair,{style:{display:"flex"},children:[(0,c.jsx)(i.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(V("CORE_COMMON_PROFILE_MOBILE_NUMBER"),"*")}),(0,c.jsxs)("div",{style:{width:"100%"},children:[(0,c.jsx)(i.MobileNumber,{value:ne,style:{width:"100%"},name:"mobileNumber",placeholder:"Enter a valid Mobile No.",onChange:e=>(e=>{var t;ie(e),"employee"!==U||null!=De&&null!==(t=De.mobileNumber)&&void 0!==t&&t.test(e)?we(g(g({},_e),{},{mobileNumber:null})):we(g(g({},_e),{},{mobileNumber:{type:"pattern",message:"CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID"}}))})(e),disable:!Digit.Utils.getMultiRootTenant(),required:!0,pattern:(null==Ie||null===(_=Ie.UserProfileValidationConfig)||void 0===_||null===(_=_[0])||void 0===_?void 0:_.mobileNumber)||(null==x||null===(w=x.UserProfileValidationConfig)||void 0===w||null===(w=w[0])||void 0===w?void 0:w.mobileNumber),type:"tel",title:V("CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID")}),(null==_e?void 0:_e.mobileNumber)&&(0,c.jsx)(i.ErrorMessage,{message:V(null==_e||null===(C=_e.mobileNumber)||void 0===C?void 0:C.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,c.jsxs)(i.LabelFieldPair,{style:{display:"flex"},children:[(0,c.jsx)(i.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(V("CORE_COMMON_PROFILE_EMAIL"))}),(0,c.jsxs)("div",{style:{width:"100%"},children:[(0,c.jsx)(i.TextInput,{t:V,type:"email",isMandatory:!1,placeholder:V("EMAIL_VALIDATION"),optionKey:"i18nKey",name:"email",value:Y,onChange:e=>Ue(e.target.value),disabled:!!Digit.Utils.getMultiRootTenant()||Le}),(null==_e?void 0:_e.emailAddress)&&(0,c.jsx)(i.ErrorMessage,{message:V(null==_e||null===(N=_e.emailAddress)||void 0===N?void 0:N.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,c.jsx)(i.LabelFieldPair,{children:(0,c.jsxs)("div",{style:{width:"100%"},children:[0!=ue||Digit.Utils.getOTPBasedLogin()?null:(0,c.jsx)(i.Button,{label:V("CORE_COMMON_CHANGE_PASSWORD"),variation:"teritiary",onClick:()=>de(!ue),style:{paddingLeft:"0rem"}}),ue?(0,c.jsxs)("div",{style:{marginTop:"10px"},children:[(0,c.jsxs)(i.LabelFieldPair,{style:{display:"flex"},children:[(0,c.jsx)(i.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(V("CORE_COMMON_PROFILE_CURRENT_PASSWORD"))}),(0,c.jsxs)("div",{style:{width:"100%"},children:[(0,c.jsx)(i.TextInput,{t:V,type:"password",isMandatory:!1,name:"name",pattern:(null==Ie||null===(E=Ie.UserProfileValidationConfig)||void 0===E||null===(E=E[0])||void 0===E?void 0:E.password)||(null==x||null===(D=x.UserProfileValidationConfig)||void 0===D||null===(D=D[0])||void 0===D?void 0:D.password),onChange:e=>{var t,n;return n=null==e||null===(t=e.target)||void 0===t?void 0:t.value,void(null!=De&&De.password.test(n)?we(g(g({},_e),{},{currentPassword:null})):we(g(g({},_e),{},{currentPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}})))},disabled:Le}),(null==_e?void 0:_e.currentPassword)&&(0,c.jsx)(i.ErrorMessage,{message:V(null==_e||null===(P=_e.currentPassword)||void 0===P?void 0:P.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,c.jsxs)(i.LabelFieldPair,{style:{display:"flex"},children:[(0,c.jsx)(i.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(V("CORE_COMMON_PROFILE_NEW_PASSWORD"))}),(0,c.jsxs)("div",{style:{width:"100%"},children:[(0,c.jsx)(i.TextInput,{t:V,type:"password",isMandatory:!1,name:"name",pattern:(null==Ie||null===(I=Ie.UserProfileValidationConfig)||void 0===I||null===(I=I[0])||void 0===I?void 0:I.password)||(null==x||null===(T=x.UserProfileValidationConfig)||void 0===T||null===(T=T[0])||void 0===T?void 0:T.password),onChange:e=>{var t,n;return n=null==e||null===(t=e.target)||void 0===t?void 0:t.value,fe(n),void(null!=De&&De.password.test(n)?we(g(g({},_e),{},{newPassword:null})):we(g(g({},_e),{},{newPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}})))},disabled:Le}),(null==_e?void 0:_e.newPassword)&&(0,c.jsx)(i.ErrorMessage,{message:V(null==_e||null===(A=_e.newPassword)||void 0===A?void 0:A.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]}),(0,c.jsxs)(i.LabelFieldPair,{style:{display:"flex"},children:[(0,c.jsx)(i.CardLabel,{className:"profile-label-margin",style:{width:"300px"},children:"".concat(V("CORE_COMMON_PROFILE_CONFIRM_PASSWORD"))}),(0,c.jsxs)("div",{style:{width:"100%"},children:[(0,c.jsx)(i.TextInput,{t:V,type:"password",isMandatory:!1,name:"name",pattern:(null==Ie||null===(L=Ie.UserProfileValidationConfig)||void 0===L||null===(L=L[0])||void 0===L?void 0:L.password)||(null==x||null===(R=x.UserProfileValidationConfig)||void 0===R||null===(R=R[0])||void 0===R?void 0:R.password),onChange:e=>{var t,n;return n=null==e||null===(t=e.target)||void 0===t?void 0:t.value,ye(n),void(null!=De&&De.password.test(n)?we(g(g({},_e),{},{confirmPassword:null})):we(g(g({},_e),{},{confirmPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}})))},disabled:Le}),(null==_e?void 0:_e.confirmPassword)&&(0,c.jsx)(i.ErrorMessage,{message:V(null==_e||null===(M=_e.confirmPassword)||void 0===M?void 0:M.message),truncateMessage:!0,maxLength:256,className:"",wrapperClassName:"",showIcon:!0})]})]})]}):""]})}),"employee"===U&&Ce?(0,c.jsx)("button",{onClick:Fe,style:{marginTop:"24px",backgroundColor:"#c84c0e",width:"100%",height:"40px",color:"white",maxWidth:Ce?"100%":"240px",borderBottom:"1px solid black",fontWeight:"700",fontSize:"17px"},children:V("CORE_COMMON_SAVE")}):null]})})]}),"employee"!==U||Ce?null:(0,c.jsx)(i.Footer,{actionFields:[(0,c.jsx)(i.SubmitBar,{t:V,label:V("CORE_COMMON_SAVE"),onSubmit:Fe})],className:"",setactionFieldsToRight:!0}),he&&(0,c.jsx)(i.Toast,{type:he.key,label:V("success"===he.key?"CORE_COMMON_PROFILE_UPDATE_SUCCESS":he.action),onClose:()=>be(null),style:{maxWidth:"670px"}}),1==se?(0,c.jsx)(d,{setProfilePic:He,closeDrawer:Me,userType:U,removeProfilePic:()=>{re(null),ae(null)},showToast:Be}):""]})}},4883(e){"use strict";e.exports=t},4989(e,t,n){"use strict";n.d(t,{A:()=>o});var i=n(4883);const o=function(e,t){var n=(0,i.useRef)();(0,i.useEffect)(()=>{n.current=e},[e]),(0,i.useEffect)(()=>{if(null!==t){var e=setInterval(function(){n.current()},t);return()=>clearInterval(e)}},[t])}},5007(e,t,n){"use strict";n.d(t,{A:()=>X});var i=n(4883),o=n.n(i),r=n(5053),l=n(6243),a=n(4442),s=n(358),c=n(3015),u=n(6177),d=n(6870);function v(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}const p=e=>{var t,n,i,p,m,f,g,y,{t:h,stateInfo:b,toggleSidebar:O,isSidebarOpen:x,handleLogout:S,userDetails:j,CITIZEN:_,cityDetails:w,mobileView:C,userOptions:N,handleUserDropdownSelection:E,logoUrl:D,logoUrlWhite:P,showLanguageChange:I=!0}=e,[T,A]=o().useState(null);o().useEffect(()=>{var e=function(){var e,t=(e=function*(){var e,t=Digit.Utils.getMultiRootTenant()?Digit.ULBService.getStateId():Digit.ULBService.getCurrentTenantId(),n=null==j||null===(e=j.info)||void 0===e?void 0:e.uuid;if(n){var i=yield Digit.UserService.userSearch(t,{uuid:[n]},{});if(i&&i.user&&i.user.length){var o,r=i.user[0],l=null==r||null===(o=r.photo)||void 0===o?void 0:o.split(",");A(null==l?void 0:l.at(0))}}},function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){v(r,i,o,l,a,"next",e)}function a(e){v(r,i,o,l,a,"throw",e)}l(void 0)})});return function(){return t.apply(this,arguments)}}();e()},[null!==T,null==j||null===(t=j.info)||void 0===t?void 0:t.uuid]);var L,R,M=Digit.ULBService.getCitizenCurrentTenant(!0),k=(0,a.useNavigate)(),{pathname:U}=(0,a.useLocation)(),{data:{unreadCount:B}={},isSuccess:F}=Digit.Hooks.useNotificationCount({tenantId:M,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)&&!!M}});if(_)return(0,d.jsx)("div",{children:(0,d.jsx)(r.TopBar,{img:null==b?void 0:b.logoUrlWhite,isMobile:!0,toggleSidebar:()=>{Digit.clikOusideFired?Digit.clikOusideFired=!1:O(!0)},logoUrl:null==b?void 0:b.logoUrlWhite,onLogout:S,userDetails:j,notificationCount:B<99?B:99,notificationCountLoaded:F,cityOfCitizenShownBesideLogo:h(M),onNotificationIconClick:function(){var e;k("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/engagement/notifications"))},hideNotificationIconOnSomeUrlsWhenNotLoggedIn:(e=>{var t,n,i;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===(i=window)||void 0===i?void 0:i.contextPath,"/citizen/select-location")].includes(e)})(U),changeLanguage:C?null:(0,d.jsx)(c.A,{dropdown:!0})})});var V=!(null==j||!j.access_token),G=null===(n=Digit.ComponentRegistryService)||void 0===n?void 0:n.getComponent("CustomEmployeeTopBar");return G?(0,d.jsx)(G,{t:h,stateInfo:b,toggleSidebar:O,isSidebarOpen:x,handleLogout:S,userDetails:j,CITIZEN:_,cityDetails:w,mobileView:C,userOptions:N,handleUserDropdownSelection:E,logoUrl:D,showLanguageChange:I,loggedin:V}):(0,d.jsx)(l.Header,{actionFields:[(0,d.jsx)(s.A,{dropdown:!0,t:h}),I&&(0,d.jsx)(c.A,{dropdown:!0}),(null==j?void 0:j.access_token)&&(0,d.jsx)(l.Dropdown,{option:N,optionKey:"name",profilePic:T||(null==j||null===(i=j.info)||void 0===i?void 0:i.name)||(null==j||null===(p=j.info)||void 0===p||null===(p=p.userInfo)||void 0===p?void 0:p.name)||"Employee",select:E,showArrow:!0,menuStyles:{marginTop:"1rem"},theme:"light"})],onHamburgerClick:()=>{O()},className:"digit-employee-header",img:D,logoWidth:"64px",logoHeight:"48px",logo:(V?null==w?void 0:w.logoId:null==b?void 0:b.statelogo)||"https://egov-dev-assets.s3.ap-south-1.amazonaws.com/egov-logo-2025.png",onImageClick:()=>{},onLogoClick:()=>{},props:{},showDeafultImg:!0,style:{},theme:(null===(m=window)||void 0===m||null===(m=m.globalConfigs)||void 0===m?void 0:m.getConfig("HEADER_THEME"))||"light",ulb:V?null!=w&&null!==(f=w.city)&&void 0!==f&&f.ulbGrade?(0,d.jsxs)(d.Fragment,{children:[h(null==w?void 0:w.i18nKey).toUpperCase()," ",h("ULBGRADE_".concat(null==w||null===(g=w.city)||void 0===g?void 0:g.ulbGrade.toUpperCase().replace(" ","_").replace(".","_"))).toUpperCase()]}):(0,d.jsx)(u.A,{className:"state",src:P,alt:"State Logo"}):(0,d.jsxs)(d.Fragment,{children:[h("MYCITY_".concat(null==b||null===(y=b.code)||void 0===y?void 0:y.toUpperCase(),"_LABEL"))," ",h("MYCITY_STATECODE_LABEL")]})})};var m=n(5953),f=(n(8808),n(4781));function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach(function(t){h(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function h(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}function O(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){b(r,i,o,l,a,"next",e)}function a(e){b(r,i,o,l,a,"throw",e)}l(void 0)})}}var x=e=>{var t,n,o,s,{isOpen:c,isMobile:u=!1,toggleSidebar:v,onLogout:p,isEmployee:g=!1,linkData:h,islinkDataLoading:b,userProfile:x}=e,{data:S,isFetched:j}=(Digit.Utils.getMultiRootTenant(),Digit.Hooks.useStore.getInitData()),_=Digit.StoreData.getCurrentLanguage(),[w,C]=(0,i.useState)(null),{languages:N,stateInfo:E}=S||{},D=Digit.UserService.getUser(),[P,I]=(0,i.useState)(""),[T,A]=(0,i.useState)(null),[L,R]=(0,i.useState)([]),[M,k]=(0,i.useState)([]),[U,B]=(0,i.useState)(_),{isLoading:F,data:V}=Digit.Hooks.useAccessControl(),G=Digit.ULBService.getCurrentTenantId(),{t:H}=(0,m.useTranslation)(),z=(0,a.useNavigate)(),W=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!==(i=e)&&void 0!==i&&i.includes(t);){var i,o;e=null===(o=e)||void 0===o?void 0:o.replace(t,n)}return e};(0,i.useEffect)(()=>{var e,t=Digit.SessionStorage.get("citizen.userRequestObject"),n=[],i=[];null==t||null===(e=t.info)||void 0===e||null===(e=e.roles)||void 0===e||e.forEach(e=>n.push(e.tenantId));var o=n.filter((e,t,n)=>n.indexOf(e)===t);null==o||o.forEach(e=>{var t;i.push({label:H("TENANT_TENANTS_".concat(null===(t=W(e,".","_"))||void 0===t?void 0:t.toUpperCase())),value:e})}),null==i||i.filter(e=>e.value==Digit.SessionStorage.get("Employee.tenantId")),R(i)},[T]);var q=()=>{Digit.clikOusideFired=!0,v(!1)};(0,i.useEffect)(()=>{var e=function(){var e=O(function*(){var e,t=Digit.ULBService.getCurrentTenantId(),n=null==D||null===(e=D.info)||void 0===e?void 0:e.uuid;if(n){var i,o=yield Digit.UserService.userSearch(t,{uuid:[n]},{});if(o&&o.user&&null!=o&&null!==(i=o.user)&&void 0!==i&&i.length){var r,l=o.user[0],a=null==l||null===(r=l.photo)||void 0===r?void 0:r.split(",");C(null==a?void 0:a.at(0))}}});return function(){return e.apply(this,arguments)}}();w||e()},[w]);var X=e=>{var t,n,i=null;Digit.Utils.getMultiRootTenant()?(i=g?e.replace("/sandbox-ui/employee","/sandbox-ui/".concat(G,"/employee")):e.replace("/sandbox-ui/citizen","/sandbox-ui/".concat(G,"/citizen")),z(i),v()):("/"===e[0]?z("/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/").concat(g?"employee":"citizen").concat(e)):z("/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/").concat(g?"employee":"citizen","/").concat(e)),v())};if(b||F)return(0,d.jsx)(l.Loader,{});var Q=[{id:"login-btn",element:"LOGIN",text:H("CORE_COMMON_LOGIN"),icon:(0,d.jsx)(r.LogoutIcon,{className:"icon"}),populators:{onClick:()=>{var e,t;z(g?"/".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")),q()}}}];j&&D&&D.access_token&&(null==D||D.info,null==E||E.name,Q=Q.filter(e=>"login-btn"!==(null==e?void 0:e.id)));var Z={};if(g){var Y;null==V||V.actions.filter(e=>"url"===e.url&&"Home"!==e.displayName).forEach(e=>{var t;if(""==P&&""!==e.path){var n=e.path.split(".")[0];"TradeLicense"===n&&(n="Trade License"),Z[n]?Z[n].push(e):Z[n]=[e]}else if(""!==e.path&&null!=e&&null!==(t=e.displayName)&&void 0!==t&&t.toLowerCase().includes(P.toLowerCase())){var i=e.path.split(".")[0];"TradeLicense"===i&&(i="Trade License"),Z[i]?Z[i].push(e):Z[i]=[e]}});for(var K=Object.keys(Z),J=function(e){var t,n,i,o,r,l,a=null===(t=Z[K[e]][0])||void 0===t||null===(t=t.displayName)||void 0===t||null===(t=t.toUpperCase())||void 0===t?void 0:t.replace(/[ -]/g,"_"),s=null===(n=K[e])||void 0===n||null===(n=n.toUpperCase())||void 0===n?void 0:n.replace(/[ -]/g,"_");-1===Z[K[e]][0].path.indexOf(".")?Q.splice(1,0,{type:"link",text:H("ACTION_TEST_".concat(a)),link:null===(i=Z[K[e]][0])||void 0===i?void 0:i.navigationURL,icon:null===(o=Z[K[e]][0])||void 0===o?void 0:o.leftIcon,populators:{onClick:()=>{var t;z(null===(t=Z[K[e]][0])||void 0===t?void 0:t.navigationURL),q()}}}):Q.splice(1,0,{type:"dynamic",moduleName:H("ACTION_TEST_".concat(s)),links:null===(r=Z[K[e]])||void 0===r?void 0:r.map(e=>{var t;return y(y({},e),{},{displayName:H("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===(l=Z[K[e]][1])||void 0===l?void 0:l.leftIcon})},$=0;$<(null==K?void 0:K.length);$++)J($);var ee=Q.findIndex(e=>"HOME"===e.element),te=Q.splice(ee,1),ne=Q.findIndex(e=>"LANGUAGE"===e.element),ie=Q.splice(ne,(null===(Y=Q)||void 0===Y?void 0:Y.length)-ne);Q.sort((e,t)=>{var n="dynamic"===(null==e?void 0:e.type)?null==e?void 0:e.moduleName:null==e?void 0:e.text,i="dynamic"===(null==t?void 0:t.type)?null==t?void 0:t.moduleName:null==t?void 0:t.text;return n.localeCompare(i)}),(null==te?void 0:te[0])&&Q.splice(0,0,te[0]),Q=(null==ie?void 0:ie.length)>0?Q.concat(ie):Q}else{var oe;null===(oe=Object.keys(h))||void 0===oe||null===(oe=oe.sort((e,t)=>t.localeCompare(e)))||void 0===oe||oe.map(e=>{var t,n,i,o,r;"digit-ui-links"===(null===(t=h[e][0])||void 0===t?void 0:t.sidebar)&&Q.splice(1,0,{type:null!==(n=h[e][0])&&void 0!==n&&null!==(n=n.sidebarURL)&&void 0!==n&&n.includes(null===(i=window)||void 0===i?void 0:i.contextPath)?"link":"external-link",text:H("ACTION_TEST_".concat(Digit.Utils.locale.getTransformedLocale(e))),links:h[e],icon:null===(o=h[e][0])||void 0===o?void 0:o.leftIcon,link:null===(r=h[e][0])||void 0===r?void 0:r.sidebarURL})})}location.pathname.includes("/openlink")&&(Q=Q.filter(e=>"LANGUAGE"===e.element)),Q=null===(t=Q)||void 0===t?void 0:t.map(e=>y(y({},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 re,le="";le=Digit.Utils.getMultiRootTenant()?H("TENANT_TENANTS_".concat(G)):H("TENANT_TENANTS_".concat(null===(re=W(Digit.SessionStorage.get("Employee.tenantId"),".","_"))||void 0===re?void 0:re.toUpperCase()));var ae=null===(n=Q)||void 0===n?void 0:n.map(e=>{var t;return"dynamic"===(null==e?void 0:e.type)?y(y({},e),{},{children:null==e||null===(t=e.links)||void 0===t?void 0:t.map(e=>y(y({},e),{},{label:null==e?void 0:e.displayName,icon:null==e?void 0:e.leftIcon}))}):e}),se=null==L?void 0:L.map(e=>y(y({},e),{},{type:"custom",key:"city"})),ce=null==N?void 0:N.map(e=>y(y({},e),{},{type:"custom",key:"language",icon:"Language"})),ue=[{label:"HOME",value:"HOME",icon:"Home",type:"custom",key:"home"},{label:le,value:le,children:(null==se?void 0:se.length)>0?se:void 0,type:"custom",icon:"LocationCity",key:"city"},{label:H("Language"),children:(null==ce?void 0:ce.length)>0?ce:void 0,type:"custom",icon:"Language",key:"language"},{label:H("EDIT_PROFILE"),type:"custom",icon:"Edit",key:"editProfile"},{label:H("Modules"),icon:"DriveFileMove",children:ae}];return u?(0,d.jsx)(l.Hamburger,{items:ue,profileName:null==D||null===(o=D.info)||void 0===o?void 0:o.name,profileNumber:null==D||null===(s=D.info)||void 0===s?void 0:s.mobileNumber,theme:"dark",transitionDuration:.3,styles:{marginTop:"64px",height:"93%"},onLogout:p,hideUserManuals:!0,profile:w||void 0,isSearchable:!0,onSelect:e=>{var{item:t,index:n,parentIndex:i}=e;return(e=>{var t,n,i,{item:o,index:r,parentIndex:l}=e;if(null!=o&&o.navigationURL)X(null==o?void 0:o.navigationURL);else if(null!=o&&o.link)X(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":z(g?"/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/employee"):"/".concat(null===(i=window)||void 0===i?void 0:i.contextPath,"/citizen")),v();break;case"editProfile":x(),v();break;case"language":B((t=o).value),Digit.LocalizationService.changeLanguage(t.value,E.code),v();break;case"city":(e=>{var t,n,i,o=Digit.SessionStorage.get("citizen.userRequestObject"),r=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(t=>t.tenantId===e.value);if((null==r?void 0:r.length)>0&&(o.info.roles=r,o.info.tenantId=null==e?void 0:e.value),Digit.SessionStorage.set("Employee.tenantId",null==e?void 0:e.value),Digit.UserService.setUser(o),A(e),"undefined"!=typeof window&&null!==(n=window.location)&&void 0!==n&&null!==(n=n.href)&&void 0!==n&&n.includes("/".concat(null===(i=window)||void 0===i?void 0:i.contextPath,"/employee/"))){var l,a,s=(null===(l=location.state)||void 0===l?void 0:l.from)||"/".concat(null===(a=window)||void 0===a?void 0:a.contextPath,"/employee");z(s,{replace:!0})}try{"undefined"!=typeof window&&window.location.reload()}catch(e){console.warn("Failed to reload page:",e)}})(o),v()}}})({item:t,index:n,parentIndex:i})}}):(0,d.jsx)(f.A,{logout:p})},S=n(8320),j=n.n(S),_=/[A-Z]/g,w=/^ms-/,C={};function N(e){return"-"+e.toLowerCase()}const E=function(e){if(C.hasOwnProperty(e))return C[e];var t=e.replace(_,N);return C[e]=w.test(t)?"-"+t:t};var D=n(7598),P=n.n(D);const I=P().oneOfType([P().string,P().number]),T={all:P().bool,grid:P().bool,aural:P().bool,braille:P().bool,handheld:P().bool,print:P().bool,projection:P().bool,screen:P().bool,tty:P().bool,tv:P().bool,embossed:P().bool},A={orientation:P().oneOf(["portrait","landscape"]),scan:P().oneOf(["progressive","interlace"]),aspectRatio:P().string,deviceAspectRatio:P().string,height:I,deviceHeight:I,width:I,deviceWidth:I,color:P().bool,colorIndex:P().bool,monochrome:P().bool,resolution:I,type:Object.keys(T)},{type:L,...R}=A,M={minAspectRatio:P().string,maxAspectRatio:P().string,minDeviceAspectRatio:P().string,maxDeviceAspectRatio:P().string,minHeight:I,maxHeight:I,minDeviceHeight:I,maxDeviceHeight:I,minWidth:I,maxWidth:I,minDeviceWidth:I,maxDeviceWidth:I,minColor:P().number,maxColor:P().number,minColorIndex:P().number,maxColorIndex:P().number,minMonochrome:P().number,maxMonochrome:P().number,minResolution:I,maxResolution:I,...R};var k={all:{...T,...M},types:T,matchers:A,features:M};const U=(0,i.createContext)(void 0),B=e=>{if(e)return Object.keys(e).reduce((t,n)=>(t[E(n)]=e[n],t),{})},F=()=>{const e=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{e.current=!0},[]),e.current},V=e=>{const t=()=>(e=>e.query||(e=>{const t=[];return Object.keys(k.all).forEach(n=>{const i=e[n];null!=i&&t.push(((e,t)=>{const n=E(e);return"number"==typeof t&&(t=`${t}px`),!0===t?n:!1===t?`not ${n}`:`(${n}: ${t})`})(n,i))}),t.join(" and ")})(e))(e),[n,o]=(0,i.useState)(t);return(0,i.useEffect)(()=>{const e=t();n!==e&&o(e)},[e]),n},G=(e,t,n)=>{const o=(e=>{const t=(0,i.useContext)(U),n=()=>B(e)||B(t),[o,r]=(0,i.useState)(n);return(0,i.useEffect)(()=>{const e=n();(function(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),i=Object.keys(t),o=n.length;if(i.length!==o)return!1;for(let i=0;i<o;i++){const o=n[i];if(e[o]!==t[o]||!Object.prototype.hasOwnProperty.call(t,o))return!1}return!0})(o,e)||r(e)},[e,t]),o})(t),r=V(e);if(!r)throw new Error("Invalid or missing MediaQuery!");const l=((e,t)=>{const n=()=>j()(e,t||{},!!t),[o,r]=(0,i.useState)(n),l=F();return(0,i.useEffect)(()=>{if(l){const e=n();return r(e),()=>{e&&e.dispose()}}},[e,t]),o})(r,o),a=(e=>{const[t,n]=(0,i.useState)(e.matches);return(0,i.useEffect)(()=>{const t=e=>{n(e.matches)};return e.addListener(t),n(e.matches),()=>{e.removeListener(t)}},[e]),t})(l),s=F();return(0,i.useEffect)(()=>{s&&n&&n(a)},[a]),(0,i.useEffect)(()=>()=>{l&&l.dispose()},[]),a},H=({children:e,device:t,onChange:n,...i})=>{const o=G(i,t,n);return"function"==typeof e?e(o):o?e:null},z=()=>{var e,t,n,{isLoading:i,data:o}=Digit.Hooks.useAccessControl(),r=Digit.Utils.getMultiRootTenant(),{t:s}=(0,m.useTranslation)(),c=(0,a.useNavigate)(),u=null===(e=Digit)||void 0===e||null===(e=e.ULBService)||void 0===e?void 0:e.getStateId();function v(){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"==typeof e[t]&&!Array.isArray(e[t])){var i=v(e[t]);if(i)return i}}return null}function p(e,t){for(var n in t)t.hasOwnProperty(n)&&("object"!=typeof t[n]||Array.isArray(t[n])?e[n]||(e[n]=t[n]):(e[n]||(e[n]={}),p(e[n],t[n])))}var f={};null==o||o.actions.filter(e=>"url"===e.url).forEach(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,i=null==e||null===(n=e.path)||void 0===n?void 0:n.split("."),o={};i.reduce((t,n,o)=>{if(o!==i.length-1)return t[n]={},t[n];t[n]={item:e}},o),p(f,o)}});var g=e=>(e.sort((e,t)=>(void 0!==e.orderNumber?e.orderNumber:1/0)-(void 0!==t.orderNumber?t.orderNumber:1/0)),e.forEach(e=>{e.children&&e.children.length>0&&g(e.children)}),e),y=function(e){var t=(e,n)=>{if(n.item)return{label:s(n.item.displayName),icon:{icon:n.item.leftIcon,width:"1.5rem",height:"1.5rem"},navigationUrl:n.item.navigationURL,orderNumber:n.item.orderNumber};var i=Object.keys(n).map(e=>t(e,n[e])),o=v(n);return{label:s(e),icon:{icon:o,width:"1.5rem",height:"1.5rem"},children:i}};return Object.keys(e).map(n=>t(n,e[n]))}((e=>{var t=Object.entries(e);return t.sort((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:0),Object.fromEntries(t)})(f)),h=g(y);return i?(0,d.jsx)(l.Loader,{}):f?(0,d.jsx)(H,{minWidth:768,children:(0,d.jsx)(l.SideNav,{items:h,hideAccessbilityTools:!0,onSelect:e=>{var{item:t,index:n,parentIndex:i}=e;return(e=>{var{item:t,index:n,parentIndex:i}=e;null!=t&&t.navigationUrl&&function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("/"!=i)if(-1===(null===(e=i)||void 0===e?void 0:e.indexOf("/".concat(null===(t=window)||void 0===t?void 0:t.contextPath)))){var o=window.location.origin,l=null;if(r)n(l=i=i.replace("/sandbox-ui/employee","/sandbox-ui/".concat(u,"/employee")));else{l=o+i;try{"undefined"!=typeof window&&(window.location.href=l)}catch(e){console.warn("Navigation failed, attempting fallback:",e);try{window.location.replace(l)}catch(e){console.error("All navigation methods failed:",e)}}}}else n(i)}(c,null==t?void 0:t.navigationUrl)})({item:t,index:n,parentIndex:i})},theme:(null===(t=window)||void 0===t||null===(t=t.globalConfigs)||void 0===t?void 0:t.getConfig("SIDENAV_THEME"))||"dark",variant:(null===(n=window)||void 0===n||null===(n=n.globalConfigs)||void 0===n?void 0:n.getConfig("SIDENAV_VARIANT"))||"primary",transitionDuration:"",className:"",styles:{},expandedWidth:"",collapsedWidth:"",onBottomItemClick:()=>{}})}):""},W=e=>{var{t,CITIZEN:n,isSidebarOpen:i,toggleSidebar:o,handleLogout:r,mobileView:l,userDetails:a,modules:s,linkData:c,islinkDataLoading:u,userProfile:v}=e;return n?(0,d.jsx)(x,{isOpen:i,isMobile:!0,toggleSidebar:o,onLogout:r,linkData:c,islinkDataLoading:u,userProfile:v,isEmployee:!1}):!i&&null!=a&&a.access_token?(0,d.jsx)("div",{className:"digit-employeeSidebar",children:(0,d.jsx)(z,{mobileView:l,userDetails:a,modules:s})}):(0,d.jsx)("div",{className:"digit-citizenSidebar",children:(0,d.jsx)(x,{isOpen:i,isMobile:!0,toggleSidebar:o,onLogout:r,isEmployee:!0,userProfile:v})})};var q=n(6810);const X=e=>{var{t,stateInfo:n,userDetails:r,CITIZEN:l,cityDetails:s,mobileView:c,handleUserDropdownSelection:u,logoUrl:v,logoUrlWhite:m,showSidebar:f=!0,showLanguageChange:g,linkData:y,islinkDataLoading:h}=e,[b,O]=(0,i.useState)(!1),x=(0,a.useNavigate)(),[S,j]=(0,i.useState)(!1),_=()=>{O(!1),j(!0)},w=()=>{j(!1)},C=()=>{O(!b)},N=()=>{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"))},E=[{name:t("EDIT_PROFILE"),icon:"Edit",func:N},{name:t("CORE_COMMON_LOGOUT"),icon:"Logout",func:_}];return(0,d.jsxs)(o().Fragment,{children:[(0,d.jsx)(p,{t,stateInfo:n,toggleSidebar:C,isSidebarOpen:b,handleLogout:_,userDetails:r,CITIZEN:l,cityDetails:s,mobileView:c,userOptions:E,handleUserDropdownSelection:u,logoUrl:v,logoUrlWhite:m,showLanguageChange:g}),S&&(0,d.jsx)(q.A,{onSelect:()=>{Digit.UserService.logout(),j(!1)},onCancel:w,onDismiss:w}),l?l?f&&b&&(0,d.jsx)(W,{t,CITIZEN:l,isSidebarOpen:b,toggleSidebar:C,handleLogout:_,mobileView:c,userDetails:r,linkData:y,userProfile:N,islinkDataLoading:h}):null:f&&(0,d.jsx)(W,{t,CITIZEN:l,isSidebarOpen:b,toggleSidebar:C,handleLogout:_,mobileView:c,userDetails:r,linkData:y,userProfile:N,islinkDataLoading:h})]})}},5053(e){"use strict";e.exports=a},5181(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(4883),o=n(6870);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function l(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".digit-home-main";return function(n){return(0,i.useEffect)(()=>{var e=n=>{if("Tab"===n.key){var i=document.querySelector(t);i&&(i.setAttribute("tabindex","-1"),i.style.outline="none",i.focus()),window.removeEventListener("keydown",e)}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),(0,o.jsx)(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){l(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},n))}}},5383(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>m});var i,o,r=n(6243),l=n(5053),a=n(4883),s=n(5953),c=n(4442),u=n(5697),d=n(6177),v=n(6870),p={label:"English",value:null===(i=Digit)||void 0===i||null===(i=i.Utils)||void 0===i||null===(o=i.getDefaultLanguage)||void 0===o?void 0:o.call(i)};const m=()=>{var e,t,n,i,{data:o,isLoading:m}=Digit.Hooks.useStore.getInitData(),{t:f}=(0,s.useTranslation)(),g=(0,c.useNavigate)(),{languages:y,stateInfo:h}=o||{},b=y;b&&0!=(null===(e=b)||void 0===e?void 0:e.length)||(b=[p]);var O,x=Digit.StoreData.getCurrentLanguage(),[S,j]=(0,a.useState)(x),_=(null==y?void 0:y.length)>1;return m?(0,v.jsx)(r.Loader,{}):_?(0,v.jsxs)(u.A,{children:[(0,v.jsxs)(r.Card,{className:"bannerCard removeBottomMargin languageSelection",children:[(0,v.jsxs)("div",{className:"bannerHeader",children:[(0,v.jsx)(d.A,{className:"bannerLogo",src:null==h?void 0:h.logoUrl,alt:"Digit Banner Image"}),(0,v.jsx)("p",{children:f("TENANT_TENANTS_".concat(null==h||null===(t=h.code)||void 0===t?void 0:t.toUpperCase()))})]}),(0,v.jsx)("div",{className:"language-selector",style:{justifyContent:"space-around",marginBottom:"24px",padding:"0 5%"},children:b.map((e,t)=>(0,v.jsx)("div",{className:"language-button-container",children:(0,v.jsx)(l.CustomButton,{selected:e.value===S,text:f(e.label),onClick:()=>(e=>{j(e.value),Digit.LocalizationService.changeLanguage(e.value,h.code)})(e)})},t))}),(0,v.jsx)(r.SubmitBar,{style:{width:"100%"},label:f("CORE_COMMON_CONTINUE"),onSubmit:e=>{var t;g("/".concat((t=window.contextPath,t&&"string"==typeof t?t.split("/")[0]:""),"/user/login?ts=").concat(Date.now()))}})]}),(0,v.jsxs)("div",{className:"EmployeeLoginFooter",children:[(0,v.jsx)(d.A,{alt:"Powered by DIGIT",src:null===(n=window)||void 0===n||null===(n=n.globalConfigs)||void 0===n||null===(i=n.getConfig)||void 0===i?void 0:i.call(n,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:()=>{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,v.jsx)(c.Navigate,{to:"/".concat(null===(O=window)||void 0===O?void 0:O.contextPath,"/employee/user/login"),replace:!0})}},5419(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(4883),o=n(4650),r=n(5953),l=n(6870);const a=e=>{var t,{bannerImages:n=[]}=e,[a,s]=(0,i.useState)(0),{t:c}=(0,r.useTranslation)(),u=n||(null===(t=o.m[0])||void 0===t?void 0:t.bannerImages)||[],d=()=>{s(e=>e===u.length-1?0:e+1)};return(0,i.useEffect)(()=>{var e=setInterval(()=>{d()},5e3);return()=>clearInterval(e)},[u.length]),(0,l.jsx)(i.Fragment,{children:(0,l.jsxs)("div",{className:"carousel-container",children:[u.sort((e,t)=>(null==e?void 0:e.id)-(null==t?void 0:t.id)).map((e,t)=>(0,l.jsx)("div",{className:"carousel-slide ".concat(t===a?"active":""),style:{backgroundImage:"url(".concat(e.image,")")},children:(0,l.jsxs)("div",{className:"carousel-content",children:[(0,l.jsx)("h2",{children:c(e.title)}),(0,l.jsx)("p",{children:c(e.description)})]})},e.id)),(0,l.jsxs)("div",{className:"carousel-controls",children:[(0,l.jsx)("button",{className:"carousel-nav",onClick:()=>{s(e=>0===e?u.length-1:e-1)},children:"<"}),(0,l.jsx)("div",{className:"carousel-indicators",children:u.map((e,t)=>(0,l.jsx)("button",{className:"indicator ".concat(t===a?"active":""),onClick:()=>(e=>{s(e)})(t)},t))}),(0,l.jsx)("button",{className:"carousel-nav",onClick:d,children:">"})]})]})})}},5660(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(6243),o=(n(4883),n(5953)),r=n(6177),l=n(6870);const a=e=>{var t,{showTenant:n=!0}=e,{data:a,isLoading:s}=Digit.Hooks.useStore.getInitData(),{stateInfo:c}=a||{},{t:u}=(0,o.useTranslation)();return s?(0,l.jsx)(i.Loader,{}):(0,l.jsxs)("div",{className:"bannerHeader",children:[(0,l.jsx)(r.A,{className:"bannerLogo",src:null==c?void 0:c.logoUrl,style:n?{}:{borderRight:"unset"},alt:"Digit Banner"}),n&&(null==c?void 0:c.code)&&(0,l.jsx)("p",{children:u("TENANT_TENANTS_".concat(null==c||null===(t=c.code)||void 0===t?void 0:t.toUpperCase()))})]})}},5697(e,t,n){"use strict";n.d(t,{A:()=>o}),n(4883);var i=n(6870);const o=e=>{var{children:t}=e;return(0,i.jsx)("div",{className:"banner banner-container",children:t})}},5953(e){"use strict";e.exports=n},6177(e,t,n){"use strict";n.d(t,{A:()=>d}),n(4883);var i=n(7598),o=n.n(i),r=n(6870),l=["src","alt","decorative","ariaLabel","ariaLabelledby"];function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function s(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){c(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 c(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=e=>{var{src:t,alt:n="Image not found",decorative:i=!1,ariaLabel:o="No Image description set",ariaLabelledby:a="no-image-description"}=e,c=function(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,l),u={};return i?u.alt="":n?u.alt=n:o?u["aria-label"]=o:a?u["aria-labelledby"]=a:console.warn("AccessibleImage: Missing alt, aria-label, or aria-labelledby for non-decorative image."),(0,r.jsx)("img",s(s(s({src:t},u),c),{},{tabIndex:0,onKeyDown: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()}}))};u.propTypes={src:o().string.isRequired,alt:o().string,decorative:o().bool,ariaLabel:o().string,ariaLabelledby:o().string};const d=u},6243(t){"use strict";t.exports=e},6340(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s}),n(4883);var i=n(5953),o=n(6177),r=n(6870),l={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"}},a={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=e=>{var t,{type:n="error"}=Digit.Hooks.useQueryParams(),s=null==e||null===(t=e.errorData)||void 0===t?void 0:t.module,{t:c}=(0,i.useTranslation)(),u=s?a[s]:l[n];return e.stateInfo,(0,r.jsx)("div",{className:"error-boundary",children:(0,r.jsxs)("div",{className:"error-container",children:[(0,r.jsx)(o.A,{src:u.imgUrl,alt:"error"}),(0,r.jsx)("h1",{children:c(u.infoMessage)}),(0,r.jsx)("button",{onClick:()=>{var t,n;s?null==e||null===(t=e.errorData)||void 0===t||t.action():null==e||null===(n=e.goToHome)||void 0===n||n.call(e)},children:c(u.buttonInfo)})]})})}},6614(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>d});var i=n(5053),o=(n(4883),n(5953)),r=n(4442),l=n(6177),a=n(6870);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=()=>{var e,t,n,s,u,d,v,p,m,f,g,y,h,b,O,x,{t:S}=(0,o.useTranslation)(),j=(0,r.useNavigate)(),_=Digit.Utils.getMultiRootTenant()?Digit.ULBService.getStateId():Digit.ULBService.getCitizenCurrentTenant(!0),{data:{stateInfo:w,uiHomePage:C}={},isLoading:N}=Digit.Hooks.useStore.getInitData(),E=window.Digit.Utils.browser.isMobile(),D=()=>{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)},{data:P,isLoading:I}=Digit.Hooks.useEvents({tenantId:_,variant:"whats-new",config:{enabled:D()}});_||j("/".concat(null===(x=window)||void 0===x?void 0:x.contextPath,"/citizen/select-language"));var T,A,L=null==C?void 0:C.appBannerDesktop,R=null==C?void 0:C.appBannerMobile,M=null==C?void 0:C.citizenServicesCard,k=null==C?void 0:C.informationAndUpdatesCard,U=null==C?void 0:C.whatsAppBannerDesktop,B=null==C?void 0:C.whatsAppBannerMobile,F=null==C?void 0:C.whatsNewSection,V=null==C?void 0:C.redirectURL;V&&j("/".concat(null===(T=window)||void 0===T?void 0:T.contextPath,"/citizen/").concat(V)),(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!==(s=n.includes)&&void 0!==s&&s.call(n,"sandbox-ui"))&&j("/".concat(null===(A=window)||void 0===A?void 0:A.contextPath,"/citizen/all-services"));var G=e=>{window.open(null==e?void 0:e.navigationUrl)},H={header:S(null==M?void 0:M.headerLabel),sideOption:{name:S(null==M||null===(u=M.sideOption)||void 0===u?void 0:u.name),onClick:()=>{var e;return j(null==M||null===(e=M.sideOption)||void 0===e?void 0:e.navigationUrl)}},options:[{name:S(null==M||null===(d=M.props)||void 0===d||null===(d=d[0])||void 0===d?void 0:d.label),Icon:(0,a.jsx)(i.ComplaintIcon,{}),onClick:()=>{var e;return j(null==M||null===(e=M.props)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.navigationUrl)}},{name:S(null==M||null===(v=M.props)||void 0===v||null===(v=v[1])||void 0===v?void 0:v.label),Icon:(0,a.jsx)(i.PTIcon,{className:"fill-path-primary-main"}),onClick:()=>{var e;return j(null==M||null===(e=M.props)||void 0===e||null===(e=e[1])||void 0===e?void 0:e.navigationUrl)}},{name:S(null==M||null===(p=M.props)||void 0===p||null===(p=p[2])||void 0===p?void 0:p.label),Icon:(0,a.jsx)(i.CaseIcon,{className:"fill-path-primary-main"}),onClick:()=>{var e;return j(null==M||null===(e=M.props)||void 0===e||null===(e=e[2])||void 0===e?void 0:e.navigationUrl)}},{name:S(null==M||null===(m=M.props)||void 0===m||null===(m=m[3])||void 0===m?void 0:m.label),Icon:(0,a.jsx)(i.OBPSIcon,{}),onClick:()=>{var e;return j(null==M||null===(e=M.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%"}},z={header:S(null==k?void 0:k.headerLabel),sideOption:{name:S(null==k||null===(f=k.sideOption)||void 0===f?void 0:f.name),onClick:()=>{var e;return j(null==k||null===(e=k.sideOption)||void 0===e?void 0:e.navigationUrl)}},options:[{name:S(null==k||null===(g=k.props)||void 0===g||null===(g=g[0])||void 0===g?void 0:g.label),Icon:(0,a.jsx)(i.HomeIcon,{}),onClick:()=>{var e;return j(null==k||null===(e=k.props)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.navigationUrl)}},{name:S(null==k||null===(y=k.props)||void 0===y||null===(y=y[1])||void 0===y?void 0:y.label),Icon:(0,a.jsx)(i.Calender,{}),onClick:()=>{var e;return j(null==k||null===(e=k.props)||void 0===e||null===(e=e[1])||void 0===e?void 0:e.navigationUrl)}},{name:S(null==k||null===(h=k.props)||void 0===h||null===(h=h[2])||void 0===h?void 0:h.label),Icon:(0,a.jsx)(i.DocumentIcon,{}),onClick:()=>{var e;return j(null==k||null===(e=k.props)||void 0===e||null===(e=e[2])||void 0===e?void 0:e.navigationUrl)}},{name:S(null==k||null===(b=k.props)||void 0===b||null===(b=b[3])||void 0===b?void 0:b.label),Icon:(0,a.jsx)(i.DocumentIcon,{}),onClick:()=>{var e;return j(null==k||null===(e=k.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 N?(0,a.jsx)(i.Loader,{}):(0,a.jsx)("div",{className:"HomePageContainer",children:(0,a.jsxs)("div",{className:"HomePageWrapper",children:[(0,a.jsxs)("div",{className:"BannerWithSearch",children:[E?(0,a.jsx)(l.A,{src:null==R?void 0:R.bannerUrl,alt:"Banner Image"}):(0,a.jsx)(l.A,{src:null==L?void 0:L.bannerUrl,alt:"Banner Image"}),(0,a.jsxs)("div",{className:"ServicesSection",children:[(0,a.jsx)(i.CardBasedOptions,c({style:{marginTop:"-30px"}},H)),(0,a.jsx)(i.CardBasedOptions,c({style:E?{}:{marginTop:"-30px"}},z))]})]}),(B||U)&&(0,a.jsx)("div",{className:"WhatsAppBanner",children:E?(0,a.jsx)(l.A,{src:null==B?void 0:B.bannerUrl,onClick:()=>G(B),alt:"Whatsapp Banner"}):(0,a.jsx)(l.A,{src:null==U?void 0:U.bannerUrl,onClick:()=>G(U),alt:"Whatsapp Banner"})}),D()?I?(0,a.jsx)(i.Loader,{}):(0,a.jsxs)("div",{className:"WhatsNewSection",children:[(0,a.jsxs)("div",{className:"headSection",children:[(0,a.jsx)("h2",{children:S(null==F?void 0:F.headerLabel)}),(0,a.jsx)("p",{onClick:()=>{var e;return j(null==F||null===(e=F.sideOption)||void 0===e?void 0:e.navigationUrl)},children:S(null==F||null===(O=F.sideOption)||void 0===O?void 0:O.name)})]}),(0,a.jsx)(i.WhatsNewCard,c({},null==P?void 0:P[0]))]}):null]})})}},6810(e,t,n){"use strict";n.d(t,{A:()=>l});var i=n(6243),o=(n(4883),n(5953)),r=n(6870);const l=e=>{var{onSelect:t,onCancel:n,onDismiss:l,PopupStyles:a,isDisabled:s,hideSubmit:c}=e,{t:u}=(0,o.useTranslation)(),d=[(0,r.jsx)("div",{children:(0,r.jsxs)(i.CardText,{children:[u("CORE_LOGOUT_WEB_CONFIRMATION_MESSAGE")+" ",(0,r.jsx)("strong",{children:u("CORE_LOGOUT_MESSAGE")})]})})],v=[(0,r.jsx)(i.Button,{type:"button",size:"large",variation:"secondary",label:u("CORE_LOGOUT_CANCEL"),className:"logout-cancel-button",onClick:n}),(0,r.jsx)(i.Button,{type:"button",size:"large",variation:"primary",label:u("CORE_LOGOUT_WEB_YES"),formId:"modal-action",onClick:t,isDisabled:s})],p=[(0,r.jsx)(i.Button,{type:"button",size:"large",variation:"digit-action-cancel",label:u("CORE_LOGOUT_CANCEL"),className:"logout-cancel-button",onClick:n})];return(0,r.jsx)(i.PopUp,{type:"default",children:d,heading:u("CORE_LOGOUT_WEB_HEADER"),footerChildren:c?p:v,sortFooterButtons:!0,onClose:l,className:"digit-logout-popup-wrapper",onOverlayClick:l,equalWidthButtons:!0,style:a})}},6870(e,t,n){"use strict";e.exports=n(3060)},6945(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>v});var i=n(6243),o=n(5053),r=n(4883),l=n(5953),a=n(4442),s=n(6870);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const v=()=>{var{t:e}=(0,l.useTranslation)(),t=(0,a.useNavigate)(),n=(0,a.useLocation)(),{data:{stateInfo:c,uiHomePage:d}={},isLoading:v}=Digit.Hooks.useStore.getInitData(),p=null==d?void 0:d.redirectURL,{data:m,isLoading:f}=Digit.Hooks.useTenants(),[g,y]=(0,r.useState)(()=>({code:Digit.ULBService.getCitizenCurrentTenant(!0)})),[h,b]=(0,r.useState)(!1),O=(0,r.useMemo)(()=>({header:e("CS_COMMON_CHOOSE_LOCATION"),submitBarLabel:e("CORE_COMMON_CONTINUE")}),[e]);function x(e){y(e),b(!1)}var S=(0,r.useMemo)(()=>({options:m,optionsKey:"i18nKey",additionalWrapperClass:"digit-reverse-radio-selection-wrapper",onSelect:x,selectedOption:g}),[m,e,g]);return f?(0,s.jsx)("loader",{}):(0,s.jsxs)("div",{className:"selection-card-wrapper",children:[(0,s.jsx)(i.BackLink,{onClick:()=>window.history.back()}),(0,s.jsxs)(o.PageBasedInput,{texts:O,onSubmit:function(){if(g){var e;Digit.SessionStorage.set("CITIZEN.COMMON.HOME.CITY",g);var i,o,r=null===(e=n.state)||void 0===e?void 0:e.redirectBackTo;p?t("/".concat(null===(i=window)||void 0===i?void 0:i.contextPath,"/citizen/").concat(p)):r?t(r,{replace:!0}):t("/".concat(null===(o=window)||void 0===o?void 0:o.contextPath,"/citizen"))}else b(!0)},className:"location-selection-container",children:[(0,s.jsx)(o.CardHeader,{children:e("CS_COMMON_CHOOSE_LOCATION")}),(0,s.jsx)(o.SearchOnRadioButtons,u(u({},S),{},{placeholder:e("COMMON_TABLE_SEARCH")})),h?(0,s.jsx)(o.CardLabelError,{children:e("CS_COMMON_LOCATION_SELECTION_ERROR")}):null]})]})}},7183(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7288(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>E});var i=n(6243),o=n(4883),r=n(5953),l=n(4442),a=[{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]+)*$"}}]}],s=n(6870);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const v=e=>{var t,{t:n,onSelect:r,mobileNumber:l,emailId:a,onMobileChange:c,onEmailChange:d,config:v,canSubmit:p}=e,[m,f]=(0,o.useState)(!!a),[g,y]=(0,o.useState)(""),h=(null===(t=window)||void 0===t||null===(t=t.globalConfigs)||void 0===t?void 0:t.getConfig("CORE_MOBILE_CONFIGS"))||{},b=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,O=(null==h?void 0:h.mobileNumberPattern)||"^\\d+$",x=new RegExp(O),S=(0,o.useMemo)(()=>b.test(a),[a]),j=(0,o.useMemo)(()=>x.test(l||""),[l,x]),_=(0,o.useMemo)(()=>m?!(S&&p):!(j&&p),[m,S,j,p]),w=(0,o.useMemo)(()=>window.innerWidth<=768?n(m?"LOGIN_WITH_MOBILE":"LOGIN_WITH_EMAIL"):n(m?"CS_USE_MOBILE_INSTEAD":"CS_LOGIN_REGISTER_WITH_EMAIL"),[m,n]);return(0,s.jsxs)(i.InputCard,{t:n,texts:null==v?void 0:v.texts,submit:!0,onNext:()=>{if(m){if(!S)return void y(n("ERR_INVALID_EMAIL"));r({userName:a})}else{if(!j)return void y(n("ERR_INVALID_MOBILE_NUMBER"));r({mobileNumber:l})}},isDisable:_,children:[(0,s.jsx)("div",{children:(0,s.jsx)(i.FieldV1,{withoutLabel:!0,charCount:!0,error:g,onChange:e=>{var t=e.target.value;y(""),m?(d(e),t&&!b.test(t)&&y(n("ERR_INVALID_EMAIL"))):(c(e),t&&!x.test(t)&&y(n("ERR_INVALID_MOBILE_NUMBER")))},placeholder:n(m?"ENTER_EMAIL_PLACEHOLDER":"ENTER_MOBILE_PLACEHOLDER"),populators:{name:m?"userName":"mobileNumber",prefix:m?"":null==h?void 0:h.mobilePrefix,validation:{maxlength:m?256:(null==h?void 0:h.mobileNumberLength)||10,pattern:m?b:x}},props:{fieldStyle:{width:"100%"}},type:"text",value:m?a:l},m?"email":"mobile")}),(0,s.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"1rem",marginBottom:"1.5rem",marginTop:"-24px"},children:(0,s.jsx)(i.LinkLabel,{style:u({display:"inline"},{marginLeft:"0px",userSelect:"none",color:"inherit",cursor:"pointer",textDecoration:"underline"}),onClick:()=>{f(!m),y(""),m?d({target:{value:""}}):c({target:{value:""}})},children:w})})]})},p=e=>{var{config:t,onSelect:n,t:o,isDisabled:r}=e;return(0,s.jsx)(i.FormStep,{config:t,onSelect:n,t:o,isDisabled:r})};var m,f=n(743),g=["ResponseInfo","UserRequest"],y=["ResponseInfo","UserRequest"];function h(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function b(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}function O(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){b(r,i,o,l,a,"next",e)}function a(e){b(r,i,o,l,a,"throw",e)}l(void 0)})}}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach(function(t){j(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function j(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _={type:"register"},w={type:"login"},C="/".concat(null===(m=window)||void 0===m?void 0:m.contextPath,"/citizen"),N=(e,t)=>(null==e?void 0:e.from)||(null==t?void 0:t.from)||C;const E=e=>{var t,n,{stateCode:c,isUserRegistered:u=!0}=e,{t:d}=(0,r.useTranslation)(),m=(0,l.useLocation)(),b=(0,l.useNavigate)(),[x,j]=(0,o.useState)(null),[E,D]=(0,o.useState)(null),[P,I]=(0,o.useState)(!0),[T,A]=(0,o.useState)(null),[L,R]=(0,o.useState)(u?{}:null==m||null===(t=m.state)||void 0===t?void 0:t.data),[M,k]=(0,o.useState)(null),U=Digit.Hooks.useQueryParams(),[B,F]=(0,o.useState)(!1),[V,G]=(0,o.useState)(!0),[H,z]=(0,o.useState)(!0);(0,o.useEffect)(()=>{var e;return E&&(M&&(clearTimeout(M),k(null)),e=setTimeout(()=>{D("")},5e3),k(e)),()=>{e&&clearTimeout(e)}},[E]),(0,o.useEffect)(()=>{var e;if(x){Digit.SessionStorage.set("citizen.userRequestObject",x),Digit.UserService.setUser(x),((e,t,n)=>{var i;if(!Digit.Utils.getMultiRootTenant()){var o=null===(i=JSON.parse(sessionStorage.getItem("Digit.initData")))||void 0===i||null===(i=i.value)||void 0===i?void 0:i.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==x?void 0:x.info,null==x?void 0:x.access_token,c);var t,n=(null===(e=m.state)||void 0===e?void 0:e.from)||C;Digit.ULBService.getCitizenCurrentTenant(!0)?b(n,{replace:!0}):b("/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/citizen/select-location"),{state:{redirectBackTo:n},replace:!0})}},[x]);var W=(0,o.useMemo)(()=>a.map(e=>{var t={};for(var n in e.texts)t[n]=d(e.texts[n]);return S(S({},e),{},{texts:t})},[a])),q=function(){var e=O(function*(e){z(!1),R(S(S({},L),e));var t=S(S({},e),{},{tenantId:c,userType:"citizen"});if(u){var n,i,o,r,[l,a]=yield Y({otp:S(S({},t),w)});if(!a)return z(!0),void b("otp",{state:{from:N(m.state,U),role:null===(i=m.state)||void 0===i?void 0:i.role},replace:!0});z(!0),m.state&&"FSM_DSO"===m.state.role||b("/".concat(null===(o=window)||void 0===o?void 0:o.contextPath,"/citizen/register/name"),{state:{from:N(m.state,U),data:t}}),null!==(n=m.state)&&void 0!==n&&n.role&&(z(!0),D("FSM_DSO"===(null===(r=m.state)||void 0===r?void 0:r.role)?d("ES_ERROR_DSO_LOGIN"):"User not registered."))}else{var[s,v]=yield Y({otp:S(S({},t),_)});if(!v)return z(!0),void b("otp",{state:{from:N(m.state,U)},replace:!0});z(!0)}});return function(t){return e.apply(this,arguments)}}(),X=function(){var e=O(function*(e){var t=S(S({},L),{},{tenantId:c,userType:"citizen"},e);R(S(S({},L),e)),F(!0);var[n,i]=yield Y({otp:S(S({},t),_)});n?(F(!1),b("otp",{state:{from:N(m.state,U)},replace:!0})):F(!1)});return function(t){return e.apply(this,arguments)}}(),Q=function(){var e=O(function*(){try{I(!0),G(!1);var{mobileNumber:e,otp:t,name:n}=L;if(u){var i,o,r={username:e,password:t,tenantId:c,userType:"citizen"},l=yield Digit.UserService.authenticate(r),{ResponseInfo:a,UserRequest:s}=l,v=h(l,g);if(null!==(i=m.state)&&void 0!==i&&i.role){var p=s.roles.find(e=>e.code===m.state.role);if(!p||!p.code)return D(d("ES_ERROR_USER_NOT_PERMITTED")),void setTimeout(()=>b(C,{replace:!0}),5e3)}null!==(o=window)&&void 0!==o&&null!==(o=o.globalConfigs)&&void 0!==o&&o.getConfig("ENABLE_SINGLEINSTANCE")&&(s.tenantId=Digit.ULBService.getStateId()),j(S({info:s},v))}else if(!u){var f,O={name:n,username:e,otpReference:t,tenantId:c},x=yield Digit.UserService.registerUser(O,c),{ResponseInfo:_,UserRequest:w}=x,N=h(x,y);null!==(f=window)&&void 0!==f&&null!==(f=f.globalConfigs)&&void 0!==f&&f.getConfig("ENABLE_SINGLEINSTANCE")&&(w.tenantId=Digit.ULBService.getStateId()),j(S({info:w},N))}}catch(e){G(!0),I(!1)}});return function(){return e.apply(this,arguments)}}(),Z=function(){var e=O(function*(){var{mobileNumber:e}=L,t={mobileNumber:e,tenantId:c,userType:"citizen"};if(u){if(u)var[n,i]=yield Y({otp:S(S({},t),w)})}else var[o,r]=yield Y({otp:S(S({},t),_)})});return function(){return e.apply(this,arguments)}}(),Y=function(){var e=O(function*(e){try{return[yield Digit.UserService.sendOtp(e,c),null]}catch(e){return[null,e]}});return function(t){return e.apply(this,arguments)}}();return(0,s.jsx)("div",{className:"citizen-form-wrapper",children:(0,s.jsxs)(i.AppContainer,{children:[m.pathname.includes("login")?null:(0,s.jsx)(i.BackLink,{onClick:()=>b(-1)}),(0,s.jsxs)(l.Routes,{children:[" ",(0,s.jsx)(l.Route,{path:"/",element:(0,s.jsx)(v,{onSelect:q,config:W[0],mobileNumber:L.mobileNumber||"",onMobileChange:e=>{var{value:t}=e.target;R(S(S({},L),{},{mobileNumber:t}))},canSubmit:H,showRegisterLink:u&&!(null!==(n=m.state)&&void 0!==n&&n.role),t:d})}),(0,s.jsx)(l.Route,{path:"otp",element:(0,s.jsx)(f.A,{config:S(S({},W[1]),{},{texts:S(S({},W[1].texts),{},{cardText:"".concat(W[1].texts.cardText," ").concat(L.mobileNumber||"")})}),onOtpChange:e=>{R(S(S({},L),{},{otp:e}))},onResend:Z,onSelect:Q,otp:L.otp,error:P,canSubmit:V,t:d})}),(0,s.jsx)(l.Route,{path:"name",element:(0,s.jsx)(p,{config:W[2],onSelect:X,t:d,isDisabled:B})}),E&&(0,s.jsx)(i.Toast,{type:"error",label:E,onClose:()=>D(null)})]})]})})}},7598(e,t,n){e.exports=n(856)()},7973(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>c});var i=n(6243),o=n(4883),r=n(5953),l=n(338),a=n(6870);const s=e=>{var{question:t,answer:n,lastIndex:i}=e,[s,c]=(0,o.useState)(!1),{t:u}=(0,r.useTranslation)();return(0,a.jsxs)("div",{className:"faqs border-none",onClick:()=>c(!s),children:[(0,a.jsxs)("div",{className:"faq-question",style:{justifyContent:"space-between",display:"flex"},children:[(0,a.jsx)("span",{children:u(t)}),(0,a.jsx)("span",{className:s?"faqicon rotate":"faqicon",style:{float:"right"},children:(0,a.jsx)(l.ArrowForward,{})})]}),(0,a.jsx)("div",{className:"faq-answer",style:s?{display:"block"}:{display:"none"},children:(0,a.jsx)("span",{children:u(n)})}),i?null:(0,a.jsx)("div",{className:"cs-box-border"})]})},c=e=>{var t,n,{module:l}=e,c=Digit.UserService.getUser(),{t:u}=((null==c||null===(t=c.info)||void 0===t?void 0:t.tenantId)||Digit.ULBService.getCurrentTenantId(),(0,r.useTranslation)()),{isLoading:d,data:v}=Digit.Hooks.useGetFAQsJSON(Digit.ULBService.getStateId()),p=null==v||null===(n=v.MdmsRes["common-masters"])||void 0===n||null===(n=n.faqs[0])||void 0===n?void 0:n["".concat(l)].faqs;return d?(0,a.jsx)(i.Loader,{}):(0,a.jsx)(o.Fragment,{children:(0,a.jsxs)("div",{className:"faq-page",children:[(0,a.jsx)(i.BackButton,{style:{marginLeft:"unset"}}),(0,a.jsx)("div",{style:{marginBottom:"15px"},children:(0,a.jsx)(i.HeaderComponent,{styles:{marginLeft:"0px",paddingTop:"10px",fontSize:"32px"},children:u("FAQ_S")})}),(0,a.jsx)("div",{className:"faq-list",children:p.map((e,t)=>(0,a.jsx)(s,{question:e.question,answer:e.answer,lastIndex:t===(null==p?void 0:p.length)-1},"faq_"+t))})]})})}},8020(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>I});var i,o,r,l,a,s=n(6243),c=n(4883),u=n.n(c),d=n(5953),v=n(4442),p=(n(4217),n(1234)),m=n(5007),f=n(4781),g=n(6177),y=n(1603),h=n(6870),b=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,6340)),()=>n(6340).default,{loaderText:"Loading Error Component..."}),O=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,7973)),()=>n(7973).default,{loaderText:"Loading FAQs..."}),x=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,6614)),()=>n(6614).default,{loaderText:"Loading Home..."}),S=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,9466)),()=>n(9466).default,{loaderText:"Loading Language Selection..."}),j=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,6945)),()=>n(6945).default,{loaderText:"Loading Location Selection..."}),_=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,4872)),()=>n(4872).default,{loaderText:"Loading User Profile..."}),w=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,2339)),()=>n(2339).default,{loaderText:"Loading How It Works..."}),C=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,7288)),()=>n(7288).default,{loaderText:"Loading Login..."}),N=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,1737)),()=>n(1737).default,{loaderText:"Loading Search..."}),E=(0,s.lazyWithFallback)(()=>Promise.resolve().then(n.bind(n,2346)),()=>n(2346).default,{loaderText:"Loading Dynamic Content..."}),D=["".concat(null===(i=window)||void 0===i?void 0:i.contextPath,"/citizen/register/name"),"/".concat(null===(o=window)||void 0===o?void 0:o.contextPath,"/citizen/select-language"),"/".concat(null===(r=window)||void 0===r?void 0:r.contextPath,"/citizen/select-location"),"/".concat(null===(l=window)||void 0===l?void 0:l.contextPath,"/citizen/login"),"/".concat(null===(a=window)||void 0===a?void 0:a.contextPath,"/citizen/register/otp")],P=(e,t)=>t.filter(t=>e.map(e=>e.code).includes(t.code));const I=e=>{var t,n,{stateInfo:i,userDetails:o,CITIZEN:r,cityDetails:l,mobileView:a,handleUserDropdownSelection:c,logoUrl:I,DSO:T,stateCode:A,modules:L,appTenants:R,sourceUrl:M,pathname:k,initData:U}=e,{isLoading:B,data:F,isFetched:V}=Digit.Hooks.useCustomMDMS(Digit.ULBService.getStateId(),"ACCESSCONTROL-ACTIONS-TEST",[{name:"actions-test",filter:"[?(@.url == '".concat(Digit.Utils.getMultiRootTenant()?window.globalPath:window.contextPath,"-card')]")}],{select: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(e=>!0===e.enabled).reduce((e,t)=>{var n;return e[t.parentModule]=(null===(n=e[t.parentModule])||void 0===n?void 0:n.length)>0?[t,...e[t.parentModule]]:[t],e},{})}}),G=Digit.Hooks.useRouteSubscription(k),{t:H}=(0,d.useTranslation)(),z=(0,v.useNavigate)(),W=((0,v.useLocation)(),D.some(e=>window.location.href.includes(e))),q=L.map((e,t)=>{var{code:n,tenants:i}=e;return(0,h.jsx)(v.Route,{path:"".concat(n.toLowerCase(),"/*"),element:(0,h.jsx)(y.A,{moduleCode:n,stateCode:A,userType:"citizen",tenants:P(i,R),maxRetries:3,retryDelay:1e3,initialDelay:800})},t)}),X=L.map((e,t)=>{var{code:n,bannerImage:o}=e,r=(Digit.ComponentRegistryService.getComponent("".concat(n,"Links")),V?(0,p.q)(F,n,H):void 0);return"ACTION_TEST_WS"===(null==r?void 0:r.header)&&(null==r||r.links.sort((e,t)=>t.orderNumber-e.orderNumber)),(0,h.jsxs)(u().Fragment,{children:[(0,h.jsx)(v.Route,{path:"".concat(n.toLowerCase(),"-home"),element:(0,h.jsxs)("div",{className:"moduleLinkHomePage",children:[(0,h.jsx)(g.A,{src:o||(null==i?void 0:i.bannerUrl),alt:"noimagefound"}),(0,h.jsx)(s.BackLink,{className:"moduleLinkHomePageBackButton",onClick:()=>z(-1)}),(0,h.jsx)("h1",{children:H("MODULE_"+n.toUpperCase())}),(0,h.jsx)("div",{className:"moduleLinkHomePageModuleLinks",children:r&&(0,h.jsx)(s.CitizenHomeCard,{header:H(null==r?void 0:r.header),links:null==r?void 0:r.links,Icon:()=>(0,h.jsx)("span",{}),Info:"OBPS"===n?()=>(0,h.jsx)(s.CitizenInfoLabel,{style:{margin:"0px",padding:"10px"},info:H("CS_FILE_APPLICATION_INFO_LABEL"),text:H("BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL")}):null,isInfo:"OBPS"===n})}),(0,h.jsx)(E,{moduleCode:null==n?void 0:n.toUpperCase()})]})}),(0,h.jsx)(v.Route,{path:"".concat(n.toLowerCase(),"-faq"),element:(0,h.jsx)(O,{module:null==n?void 0:n.toUpperCase()})}),(0,h.jsx)(v.Route,{path:"".concat(n.toLowerCase(),"-how-it-works"),element:(0,h.jsx)(w,{module:null==n?void 0:n.toUpperCase()})})]},n+"-routes")});return(0,h.jsxs)("div",{className:G,children:[(0,h.jsx)(m.A,{t:H,stateInfo:i,userDetails:o,CITIZEN:r,cityDetails:l,mobileView:a,handleUserDropdownSelection:c,logoUrl:I,showSidebar:!!r,linkData:F,islinkDataLoading:B}),(0,h.jsxs)("div",{className:"main center-container citizen-home-container mb-25",children:[W?null:(0,h.jsx)("div",{className:"SideBarStatic",children:(0,h.jsx)(f.A,{linkData:F,islinkDataLoading:B})}),(0,h.jsxs)(v.Routes,{children:[(0,h.jsx)(v.Route,{path:"/",element:(0,h.jsx)(x,{})}),(0,h.jsx)(v.Route,{path:"select-language",element:(0,h.jsx)(S,{})}),(0,h.jsx)(v.Route,{path:"select-location",element:(0,h.jsx)(j,{})}),(0,h.jsx)(v.Route,{path:"error",element:(0,h.jsx)(b,{initData:U,goToHome:()=>{var e,t,n;z("/".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,h.jsx)(v.Route,{path:"all-services",element:(0,h.jsx)(p.AppHome,{userType:"citizen",modules:L,getCitizenMenu:F,fetchedCitizen:V,isLoading:B})}),(0,h.jsx)(v.Route,{path:"login/*",element:(0,h.jsx)(C,{stateCode:A})}),(0,h.jsx)(v.Route,{path:"register/*",element:(0,h.jsx)(C,{stateCode:A,isUserRegistered:!1})}),(0,h.jsx)(v.Route,{path:"user/profile",element:(0,h.jsx)(_,{stateCode:A,userType:"citizen",cityDetails:l})}),(0,h.jsx)(v.Route,{path:"Audit",element:(0,h.jsx)(N,{})}),q,X]})]}),(0,h.jsx)("div",{className:"citizen-home-footer",style:window.location.href.includes("citizen/obps")?{zIndex:"-1"}:{},children:(0,h.jsx)(g.A,{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"),style:{height:"1.2em",cursor:"pointer"},onClick:()=>{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()}})})]})}},8259(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>O});var i=n(4883),o=n(5953),r=n(4442),l=[{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"}}],bannerImages:[{id:1,image:"https://images.unsplash.com/photo-1746277121508-f44615ff09bb",title:"A digital partner for frontline workers",description:"Lorem ipsum dolor sit amet consectetur adipisicing elit. Distinctio nobis temporibus provident expedita consequuntur, repudiandae pariatur! Deleniti molestias vero, cumque vel error labore ipsam totam?"},{id:2,image:"https://images.unsplash.com/photo-1581094271901-8022df4466f9",title:"Feature 2 Title",description:"Lorem, ipsum dolor sit amet consectetur adipisicing elit. Exercitationem esse doloribus molestiae fugiat eos adipisci sequi cumque sit, laboriosam dolores blanditiis nobis assumenda quasi nemo consectetur. Officia nesciunt quibusdam molestiae."},{id:3,image:"https://images.unsplash.com/photo-1624555130581-1d9cca783bc0",title:"Feature 3 Title",description:"Lorem ipsum dolor sit amet consectetur adipisicing elit. Cupiditate aut autem aperiam et modi saepe obcaecati doloremque voluptatem iusto quidem!"},{id:4,image:"https://images.unsplash.com/photo-1547481887-a26e2cacb5b2",title:"Feature 4 Title",description:"Lorem, ipsum dolor sit amet consectetur adipisicing elit. Exercitationem esse doloribus molestiae fugiat eos adipisci sequi cumque sit, laboriosam dolores blanditiis nobis assumenda quasi nemo consectetur. Officia nesciunt quibusdam molestiae."},{id:5,image:"https://images.unsplash.com/photo-1536782376847-5c9d14d97cc0",title:"Feature 5 Title",description:"Lorem, ipsum dolor sit amet consectetur adipisicing elit. Exercitationem esse doloribus molestiae fugiat eos adipisci sequi cumque sit, laboriosam dolores blanditiis nobis assumenda quasi nemo consectetur. Officia nesciunt quibusdam molestiae."},{id:6,image:"https://images.unsplash.com/photo-1490730141103-6cac27aaab94",title:"Feature 6 Title",description:"Lorem, ipsum dolor sit amet consectetur adipisicing elit. Exercitationem esse doloribus molestiae fugiat eos adipisci sequi cumque sit, laboriosam dolores blanditiis nobis assumenda quasi nemo consectetur. Officia nesciunt quibusdam molestiae."}]}],a=n(6243),s=n(7598),c=n.n(s),u=n(5697),d=n(5660),v=(n(6177),n(6870));function p(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}function m(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){p(r,i,o,l,a,"next",e)}function a(e){p(r,i,o,l,a,"throw",e)}l(void 0)})}}var f=e=>{var t,n,o,l,s,c,p,{config:f,t:g,isDisabled:y}=e,{data:h,isLoading:b}=Digit.Hooks.useTenants(),{data:O,isLoading:x}=Digit.Hooks.useStore.getInitData(),{stateInfo:S}=O||{},[j,_]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),N=(0,r.useNavigate)(),E=Digit.Hooks.useCustomAPIMutationHook({url:"/tenant-management/tenant/_create",params:{},body:{},config:{enable:!1}}),D=function(){var e=m(function*(e){var t;yield E.mutate({body:{tenant:{name:e.accountName,email:e.email}},config:{enable:!0}},{onError:(e,t)=>{var n,i;_({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===(i=e.response)||void 0===i||null===(i=i.data)||void 0===i||null===(i=i.Errors)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.code):"SANDBOX_SIGNUP_ERROR"})},onSuccess:(t=m(function*(e){var t,n,i;N({pathname:"/".concat(null===(t=window)||void 0===t?void 0:t.globalPath,"/user/otp"),state:{email:null==e||null===(n=e.Tenants[0])||void 0===n?void 0:n.email,tenant:null==e||null===(i=e.Tenants[0])||void 0===i?void 0:i.code}})}),function(e){return t.apply(this,arguments)})})});return function(t){return e.apply(this,arguments)}}(),P=[{body:null==f?void 0:f.inputs}],{mode:I}=Digit.Hooks.useQueryParams();return"admin"===I&&0==(null==P||null===(t=P[0])||void 0===t||null===(t=t.body)||void 0===t||null===(t=t[2])||void 0===t?void 0:t.disable)&&null==(null==P||null===(n=P[0])||void 0===n||null===(n=n.body)||void 0===n||null===(n=n[2])||void 0===n||null===(n=n.populators)||void 0===n?void 0:n.defaultValue)&&(P[0].body[2].disable=!0,P[0].body[2].isMandatory=!1,P[0].body[2].populators.defaultValue=defaultValue),b||x?(0,v.jsx)(a.Loader,{}):(0,v.jsxs)(u.A,{children:[(0,v.jsx)("div",{className:"employeeBackbuttonAlign",children:(0,v.jsx)(a.BackLink,{onClick:()=>window.history.back()})}),(0,v.jsx)(a.FormComposerV2,{onSubmit:D,isDisabled:y||w,noBoxShadow:!0,inline:!0,submitInForm:!0,config:P,label:null==f||null===(o=f.texts)||void 0===o?void 0:o.submitButtonLabel,secondaryActionLabel:null==f||null===(l=f.texts)||void 0===l?void 0:l.secondaryButtonLabel,onFormValueChange:(e,t,n)=>{var i=P[0].body.map(e=>e.key).some(e=>{var n=t[e];return null==n||""===n||"check"===e&&!1===n||"captcha"===e&&!1===n});C(i)},heading:null==f||null===(s=f.texts)||void 0===s?void 0:s.header,className:"sandbox-signup-form",cardSubHeaderClassName:"signupCardSubHeaderClassName",cardClassName:"signupCardClassName sandbox-onboarding-wrapper",buttonClassName:"buttonClassName",children:(0,v.jsx)(d.A,{showTenant:!1})}),j&&(0,v.jsx)(a.Toast,{type:"error",label:g(null==j?void 0:j.label),onClose:()=>{_(null)}}),(0,v.jsx)("div",{className:"employee-login-home-footer",style:{backgroundColor:"unset"},children:(0,v.jsx)("img",{alt:"Powered by DIGIT",src:null===(c=window)||void 0===c||null===(c=c.globalConfigs)||void 0===c||null===(p=c.getConfig)||void 0===p?void 0:p.call(c,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:()=>{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.propTypes={loginParams:c().any},f.defaultProps={loginParams:null};const g=f;function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach(function(t){b(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function b(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const O=e=>{var{stateCode:t}=e,{t:n}=(0,o.useTranslation)(),[a,s]=(0,i.useState)(l),c=Digit.StoreData.getCurrentLanguage(),{data:u}=Digit.Services.useStore({stateCode:t,moduleCode:["privacy-policy"],language:c,modulePrefix:"digit"}),{data:d,isLoading:p}=Digit.Hooks.useCommonMDMS(t,"commonUiConfig",["SignUpConfig"],{select:e=>{var t;return{config:null==e||null===(t=e.commonUiConfig)||void 0===t?void 0:t.SignUpConfig}},retry:!1});(0,i.useEffect)(()=>{!p&&null!=d&&d.config?s(d.config):s(l)},[d,p]);var m=(0,i.useMemo)(()=>a.map(e=>{var t={};for(var i in e.texts)t[i]=n(e.texts[i]);return h(h({},e),{},{texts:t})}),[a]);return(0,v.jsx)(r.Routes,{children:(0,v.jsx)(r.Route,{path:"",element:(0,v.jsx)(g,{config:m[0],t:n})})})}},8320(e,t,n){"use strict";var i=n(2161).Y,o="undefined"!=typeof window?window.matchMedia:null;function r(e,t,n){var r,l=this;function a(e){l.matches=e.matches,l.media=e.media}o&&!n&&(r=o.call(window,e)),r?(this.matches=r.matches,this.media=r.media,r.addListener(a)):(this.matches=i(e,t),this.media=e),this.addListener=function(e){r&&r.addListener(e)},this.removeListener=function(e){r&&r.removeListener(e)},this.dispose=function(){r&&r.removeListener(a)}}e.exports=function(e,t,n){return new r(e,t,n)}},8808(e,t,n){"use strict";n.d(t,{X:()=>i});var i="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"},9458(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>j});var i=n(4883),o=n.n(i),r=n(5953),l=n(4442),a=[{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"}]}],s=n(6243),c=n(7598),u=n.n(c),d=n(5697),v=n(5660),p=n(6177),m=n(5419),f=n(1065),g=n(6870);function y(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}var h=e=>{var t,n,r,a,{config:c,t:u,stateCode:h}=e,{data:b,isLoading:O}=Digit.Hooks.useTenants(),[x,S]=(0,i.useState)(null),j=(0,l.useNavigate)(),[_,w]=(0,i.useState)(null),{data:C}=(0,f.P)(h);if(null!=C&&C.config){var N,E=null==C||null===(N=C.config[0])||void 0===N?void 0:N.bannerImages;c.bannerImages=E}(0,i.useEffect)(()=>{var e,t;if(x){Digit.UserService.setUser(x);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");j(n,{replace:!0})}else Digit.UserService.setType("employee")},[x]);var D=()=>{w(null)},P=function(){var e,t=(e=function*(e){if(e.city){var t={otp:{mobileNumber:e.mobileNumber,userType:Digit.UserService.getType().toUpperCase(),type:"passwordreset",tenantId:e.city.code}};try{var n;yield Digit.UserService.sendOtp(t,e.city.code),j("/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/employee/user/change-password?mobile_number=").concat(e.mobileNumber,"&tenantId=").concat(e.city.code))}catch(e){var i;w((null==e||null===(i=e.response)||void 0===i||null===(i=i.data)||void 0===i||null===(i=i.error)||void 0===i||null===(i=i.fields)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.message)||"Invalid login credentials!"),setTimeout(D,5e3)}}else alert("Please Select City!")},function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){y(r,i,o,l,a,"next",e)}function a(e){y(r,i,o,l,a,"throw",e)}l(void 0)})});return function(e){return t.apply(this,arguments)}}(),I=()=>{var e;j("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/employee/login"))},[T,A]=c.inputs,L=[{body:[{label:u(T.label),type:T.type,populators:{name:T.name},isMandatory:!0},{label:u(A.label),type:A.type,populators:{name:A.name,optionsKey:"name",required:!0,options:b},isMandatory:!0}]}];return O?(0,g.jsx)(s.Loader,{page:!0,variant:"PageLoader"}):null!=c&&c.bannerImages?(0,g.jsx)(o().Fragment,{children:(0,g.jsxs)("div",{className:"login-container",children:[(0,g.jsx)(m.A,{bannerImages:null==c?void 0:c.bannerImages}),(0,g.jsxs)("div",{className:"login-form-container",children:[(0,g.jsx)(s.FormComposerV2,{onSubmit:P,noBoxShadow:!0,inline:!0,submitInForm:!0,config:L,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",secondaryActionId:"employeeForgotPassword",children:(0,g.jsx)(v.A,{})}),_&&(0,g.jsx)(s.Toast,{type:"error",label:u(_),onClose:D}),(0,g.jsxs)("div",{className:"EmployeeLoginFooter",children:[(0,g.jsx)(p.A,{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:()=>{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,g.jsxs)(d.A,{children:[(0,g.jsx)("div",{className:"employeeBackbuttonAlign",children:(0,g.jsx)(s.BackLink,{onClick:()=>window.history.back()})}),(0,g.jsx)(s.FormComposerV2,{onSubmit:P,noBoxShadow:!0,inline:!0,submitInForm:!0,config:L,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",secondaryActionId:"employeeForgotPassword",children:(0,g.jsx)(v.A,{})}),_&&(0,g.jsx)(s.Toast,{type:"error",label:u(_),onClose:D}),(0,g.jsxs)("div",{className:"EmployeeLoginFooter",children:[(0,g.jsx)(p.A,{alt:"Powered by DIGIT",src:null===(r=window)||void 0===r||null===(r=r.globalConfigs)||void 0===r||null===(a=r.getConfig)||void 0===a?void 0:a.call(r,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:()=>{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()}})," "]})]})};h.propTypes={loginParams:u().any},h.defaultProps={loginParams:null};const b=h;function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach(function(t){S(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function S(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const j=e=>{var{stateCode:t}=e,{t:n}=(0,r.useTranslation)(),o=(0,i.useMemo)(()=>a.map(e=>{var t={};for(var i in e.texts)t[i]=n(e.texts[i]);return x(x({},e),{},{texts:t})}),[a]);return(0,g.jsx)(l.Routes,{children:(0,g.jsx)(l.Route,{path:"",element:(0,g.jsx)(b,{config:o[0],t:n,stateCode:t})})})}},9466(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>d});var i=n(6243),o=n(4883),r=n(5953),l=n(4442),a=n(6870);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=()=>{var{t:e}=(0,r.useTranslation)(),t=(0,l.useNavigate)(),{data:{languages:n,stateInfo:s}={},isLoading:u}=Digit.Hooks.useStore.getInitData(),d=Digit.StoreData.getCurrentLanguage(),v=(0,o.useMemo)(()=>({header:e("CS_COMMON_CHOOSE_LANGUAGE"),submitBarLabel:e("CORE_COMMON_CONTINUE")}),[e]),p=(0,o.useMemo)(()=>({options:n,optionsKey:"label",additionalWrapperClass:"digit-reverse-radio-selection-wrapper",onSelect:e=>Digit.LocalizationService.changeLanguage(e.value,s.code),selectedOption:null==n?void 0:n.filter(e=>e.value===d)[0]}),[d,n]);return u?(0,a.jsx)(i.Loader,{}):(0,a.jsx)("div",{className:"selection-card-wrapper",children:(0,a.jsxs)(i.PageBasedInput,{texts:v,onSubmit:function(){var e;t("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/select-location"))},children:[(0,a.jsx)(i.CardHeader,{children:e("CS_COMMON_CHOOSE_LANGUAGE")}),(0,a.jsx)(i.RadioButtons,c({},p))]})})}},9546(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(4883),o=n(338),r=n(4442),l=n(5953),a=n(6870);const s=()=>{var e,[t,n]=(0,i.useState)(0),s=(0,r.useNavigate)(),c=(0,r.useLocation)(),{t:u}=(0,l.useTranslation)(),{tenant:d}=c.state||{},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"];(0,i.useEffect)(()=>{var e=setInterval(()=>{t<v.length&&n(e=>e+1)},2e3);if(t===v.length){var i;clearInterval(e),"undefined"!=typeof window&&(null===(i=window)||void 0===i||i.globalPath);var o=setTimeout(()=>{var e,t;h(p,g)?s({pathname:"/".concat(null===(e=window)||void 0===e?void 0:e.globalPath,"/").concat(d).concat(y),state:{tenant:d}}):s({pathname:"/".concat(null===(t=window)||void 0===t?void 0:t.globalPath,"/").concat(d,"/employee"),state:{tenant:d}})},1e3);return()=>clearTimeout(o)}return()=>{clearInterval(e)}},[t]),(0,i.useRef)(null);var p=null===(e=Digit.SessionStorage.get("User"))||void 0===e||null===(e=e.info)||void 0===e?void 0:e.roles,[m,f]=(0,i.useState)(!0),{data:g}=Digit.Hooks.useCustomMDMS(d,"SandBoxLanding",[{name:"LandingPageRoles"}],{enabled:!0,staleTime:0,cacheTime:0,select:e=>{var t;return null==e||null===(t=e.SandBoxLanding)||void 0===t?void 0:t.LandingPageRoles}});(0,i.useEffect)(()=>{null!=g&&g[0].url&&f(!1)},[g]);var y=null==g?void 0:g[0].url,h=(e,t)=>{var n;return"SUPERUSER"===(null==e||null===(n=e[0])||void 0===n?void 0:n.code)&&t.some(e=>e.rolesForLandingPage.includes("SUPERUSER"))};return(0,a.jsxs)("div",{className:"sandbox-loader-screen",children:[(0,a.jsx)("div",{className:"sandbox-loader"}),(0,a.jsx)("ul",{className:"sandbox-installation-steps",children:v.map((e,n)=>(0,a.jsxs)("li",{className:"sandbox-step ".concat(n<t?"sandbox-visible":""),children:[(0,a.jsx)("span",{className:"sandbox-step-text",children:u(e)}),n<t&&(0,a.jsx)(o.CheckCircle,{fill:"#00703C"})]},n))})]})}}},d={};function v(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}};return u[e](n,n.exports,v),n.exports}v.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return v.d(t,{a:t}),t},v.d=(e,t)=>{for(var n in t)v.o(t,n)&&!v.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},v.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),v.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var p={};return(()=>{"use strict";v.r(p),v.d(p,{DigitUI:()=>K,initCoreComponents:()=>$});var e=v(6243),t=v(4883),n=v.n(t),i=v(5953),o=v(4456),r=v(2148),l=v(4442),a=v(6870);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=(0,e.lazyWithFallback)(()=>Promise.resolve().then(v.bind(v,8020)),()=>v(8020).default,{loaderText:"Loading Citizen App..."}),m=(0,e.lazyWithFallback)(()=>Promise.resolve().then(v.bind(v,296)),()=>v(296).default,{loaderText:"Loading Employee App..."}),f=(0,e.lazyWithFallback)(()=>Promise.resolve().then(v.bind(v,8259)),()=>v(8259).default,{loaderText:"Loading Sign Up..."}),g=(0,e.lazyWithFallback)(()=>Promise.resolve().then(v.bind(v,1626)),()=>v(1626).default,{loaderText:"Loading OTP..."}),y=(0,e.lazyWithFallback)(()=>Promise.resolve().then(v.bind(v,3333)),()=>v(3333).default,{loaderText:"Loading View URL..."}),h=(0,e.lazyWithFallback)(()=>Promise.resolve().then(v.bind(v,883)),()=>v(883).default,{loaderText:"Loading Error Component..."}),b=(0,e.lazyWithFallback)(()=>Promise.resolve().then(v.bind(v,9546)),()=>v(9546).default,{loaderText:"Loading..."}),O=e=>{var t,n,i,o,r,{stateCode:s,modules:u,appTenants:v,logoUrl:p,logoUrlWhite:f,initData:g,defaultLanding:y="citizen",allowedUserTypes:h=["citizen","employee"]}=e,{pathname:b}=((0,l.useNavigate)(),(0,l.useLocation)()),O=window.innerWidth,x=Digit.ULBService.getCurrentUlb(),S=Digit.UserService.getUser(),{data:j}=Digit.Hooks.useStore.getInitData(),{stateInfo:_}=j||{},w=Digit.UserService.hasAccess(["FSM_DSO"]),C="CITIZEN"===(null==S||null===(t=S.info)||void 0===t?void 0:t.type)||!window.location.pathname.split("/").includes("employee");window.location.pathname.split("/").includes("employee")&&(C=!1);var N={stateInfo:_,userDetails:S,CITIZEN:C,cityDetails:x,mobileView:O<=640,handleUserDropdownSelection:e=>{e.func()},logoUrl:p,logoUrlWhite:f,DSO:w,stateCode:s,modules:u,appTenants:v,sourceUrl:"".concat(window.location.origin,"/citizen"),pathname:b,initData:g};return(0,a.jsxs)(l.Routes,{children:[(null==h?void 0:h.includes("employee"))&&(0,a.jsx)(l.Route,{path:"/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/employee/*"),element:(0,a.jsx)(m,c({},N))}),(null==h?void 0:h.includes("citizen"))&&(0,a.jsx)(l.Route,{path:"/".concat(null===(i=window)||void 0===i?void 0:i.contextPath,"/citizen/*"),element:(0,a.jsx)(d,c({},N))}),(null==h?void 0:h.includes("employee"))&&(0,a.jsx)(l.Route,{path:"/".concat(null===(o=window)||void 0===o?void 0:o.contextPath,"/no-top-bar/employee"),element:(0,a.jsx)(m,c(c({},N),{},{noTopBar:!0}))}),(0,a.jsx)(l.Route,{path:"*",element:(0,a.jsx)(l.Navigate,{to:"/".concat(null===(r=window)||void 0===r?void 0:r.contextPath,"/").concat(y)})})]})},x=e=>{var t,n,i,o,r,s,c,u,d,v,{stateCode:p,modules:m,appTenants:x,logoUrl:S,logoUrlWhite:j,initData:_,defaultLanding:w="citizen",allowedUserTypes:C}=e,{data:N}=Digit.Hooks.useStore.getInitData(),{stateInfo:E}=N||{},D=["user/error"].some(e=>{var t;return null===(t=location)||void 0===t||null===(t=t.pathname)||void 0===t?void 0:t.includes(e)}),P=Digit.UserService.getUser(),I="CITIZEN"===(null==P||null===(t=P.info)||void 0===t?void 0:t.type)||!window.location.pathname.split("/").includes("employee"),T=window.innerWidth<=640;return(0,a.jsx)("div",{className:D?"grounded-container":"loginContainer",style:D?{padding:0,paddingTop:I?"0":T&&!I?"3rem":"80px",marginLeft:I||T?"0":"40px"}:{"--banner-url":"url(".concat(null==E?void 0:E.bannerUrl,")"),padding:"0px"},children:(0,a.jsxs)(l.Routes,{children:[(0,a.jsx)(l.Route,{path:"/".concat(null===(n=window)||void 0===n?void 0:n.globalPath,"/user/invalid-url"),element:(0,a.jsx)(h,{})}),(0,a.jsx)(l.Route,{path:"/".concat(null===(i=window)||void 0===i?void 0:i.globalPath,"/user/sign-up"),element:(0,a.jsx)(f,{stateCode:p})}),(0,a.jsx)(l.Route,{path:"/".concat(null===(o=window)||void 0===o?void 0:o.globalPath,"/user/otp"),element:(0,a.jsx)(g,{})}),(0,a.jsx)(l.Route,{path:"/".concat(null===(r=window)||void 0===r?void 0:r.globalPath,"/user/setup"),element:(0,a.jsx)(b,{})}),(0,a.jsx)(l.Route,{path:"/".concat(null===(s=window)||void 0===s?void 0:s.globalPath,"/user/url"),element:(0,a.jsx)(y,{})}),(null===(c=window)||void 0===c?void 0:c.globalPath)!==(null===(u=window)||void 0===u?void 0:u.contextPath)&&(0,a.jsx)(l.Route,{path:"/".concat(null===(d=window)||void 0===d?void 0:d.contextPath,"/*"),element:(0,a.jsx)(O,{stateCode:p,modules:m,appTenants:x,logoUrl:S,logoUrlWhite:j,initData:_,defaultLanding:w,allowedUserTypes:C})}),(0,a.jsx)(l.Route,{path:"*",element:(0,a.jsx)(l.Navigate,{to:"/".concat(null===(v=window)||void 0===v?void 0:v.globalPath,"/user/sign-up")})})]})})},S=v(743),j=v(358),_=v(3015),w=v(4217),C=v(1954),N=v(2247);function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach(function(t){P(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function P(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function T(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var A=[v.n(N)()],L=(0,C.compose)((0,C.applyMiddleware)(...A));const R=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,C.createStore)(((e,t)=>{return(0,C.combineReducers)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach(function(t){T(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(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?D(D({},e),{},{selectedLanguage:t.payload}):e})},t));var n})(e,t),L)};var M=v(5053),k=["onSelect","formData","control","formState"];const U=o=>{var{onSelect:r,formData:l,control:s,formState:c}=o,u=function(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(o,k),{t:d}=(0,i.useTranslation)(),v=Digit.ULBService.getCurrentTenantId(),[p,m]=(0,t.useState)(!1),[f,g]=(0,t.useState)(!1),y=Digit.Utils.getConfigModuleName(),{data:h}=Digit.Hooks.useCustomMDMS(v,y,[{name:"PrivacyPolicy"}],{select:e=>{var t;return null==e||null===(t=e[y])||void 0===t||null===(t=t.PrivacyPolicy)||void 0===t?void 0:t.find(e=>{var t;return e.module===(null==u||null===(t=u.props)||void 0===t?void 0:t.module)})}});return(0,t.useEffect)(()=>{r("check",p)},[p]),(0,a.jsxs)(n().Fragment,{children:[(0,a.jsxs)("div",{className:"digit-privacy-checkbox digit-privacy-checkbox-align",children:[(0,a.jsx)(e.CheckBox,{label:d("ES_BY_CLICKING"),checked:p,onChange:e=>{m(e.target.checked)},id:"privacy-component-check"}),(0,a.jsx)(e.Button,{label:d("ES_PRIVACY_POLICY"),variation:"link",size:"small",onClick:()=>{g(!0)},style:{marginBottom:"1rem",paddingLeft:"0.2rem"}})]}),f&&(0,a.jsxs)(e.PopUp,{type:"default",className:"privacy-popUpClass",footerclassName:"popUpFooter",heading:d(null==h?void 0:h.header),onOverlayClick:()=>{g(!1)},footerChildren:[(0,a.jsx)(e.Button,{type:"button",size:"large",variation:"secondary",label:d("DIGIT_I_DO_NOT_ACCEPT"),onClick:()=>{m(!1),g(!1)}}),(0,a.jsx)(e.Button,{type:"button",size:"large",variation:"primary",label:d("DIGIT_I_ACCEPT"),className:"accept-class",onClick:()=>{m(!0),g(!1)}})],sortFooterChildren:!0,onClose:()=>{g(!1)},children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"privacy-table",children:d("DIGIT_TABLE_OF_CONTENTS")}),(0,a.jsx)("ul",{children:null==h?void 0:h.contents.map((t,n)=>(0,a.jsxs)("li",{style:{display:"flex",alignItems:"center"},children:[(0,a.jsxs)("span",{style:{marginRight:"0.5rem"},children:[n+1,". "]}),(0,a.jsx)(e.Button,{label:d(t.header),variation:"link",size:"medium",onClick:e=>{var n,i;e.preventDefault(),n=null==t?void 0:t.header,(i=document.getElementById(n))&&i.scrollIntoView({behavior:"smooth"})},style:{justifyContent:"flex-start"}})]},n))})]}),null==h?void 0:h.contents.map((e,t)=>(0,a.jsxs)("div",{id:null==e?void 0:e.header,children:[(0,a.jsx)("div",{style:{fontWeight:"bold",paddingLeft:null!=e&&e.isSpaceRequired?"1rem":"0"},children:d(e.header)}),e.descriptions.map((e,t)=>(0,a.jsxs)("div",{style:{paddingLeft:e.isSpaceRequired?"1rem":"0",marginBottom:"0.5rem"},children:[(0,a.jsxs)("div",{style:{fontWeight:null!=e&&e.isBold?700:400,display:"flex",alignItems:"center"},children:["points"===e.type&&(0,a.jsx)("span",{style:{marginRight:"0.5rem",listStyleType:"disc"},children:"•"}),"step"===e.type&&(0,a.jsxs)("span",{style:{marginRight:"0.5rem",listStyleType:"decimal"},children:[t+1,". "]}),d(e.text)]}),(null==e?void 0:e.subDescriptions)&&(null==e?void 0:e.subDescriptions.length)>0&&(0,a.jsx)("div",{className:"policy-subdescription",children:e.subDescriptions.map((e,t)=>(0,a.jsxs)("div",{className:"policy-subdescription-points",children:["points"===e.type&&(0,a.jsx)("span",{style:{marginRight:"0.5rem",listStyleType:"disc",paddingLeft:"1rem"},children:"•"}),"step"===e.type&&(0,a.jsxs)("span",{style:{marginRight:"0.5rem",listStyleType:"decimal",paddingLeft:"1rem"},children:[t+1,". "]}),null===e.type&&(0,a.jsx)("span",{style:{marginRight:"0.5rem",paddingLeft:"1rem"},children:" "}),d(e.text)]},t))})]},t))]},t))]})]})};var B=v(4989),F=(v(5697),["onSelect","formData","control","formState"]);function V(e,t,n,i,o,r,l){try{var a=e[r](l),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(i,o)}function G(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function l(e){V(r,i,o,l,a,"next",e)}function a(e){V(r,i,o,l,a,"throw",e)}l(void 0)})}}function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach(function(t){W(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function W(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q=["onSelect","formData","control","formState"];function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach(function(t){Z(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Z(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Y=t=>{var n,o,s,{stateCode:c,enabledModules:u,defaultLanding:d,allowedUserTypes:v}=t,{isLoading:p,data:m={}}=Digit.Hooks.useInitStore(c,u);if(p)return(0,a.jsx)(e.Loader,{page:!0,variant:"PageLoader"});var f=R(m)||{};return(0,i.getI18n)(),Digit.ComponentRegistryService.getComponent("PrivacyComponent")||Digit.ComponentRegistryService.setComponent("PrivacyComponent",U),(0,a.jsx)(r.Provider,{store:f,children:(0,a.jsx)(l.BrowserRouter,{children:(0,a.jsx)(e.BodyContainer,{children:Digit.Utils.getMultiRootTenant()?(0,a.jsx)(x,{initData:m,stateCode:c,modules:null==m?void 0:m.modules,appTenants:m.tenants,logoUrl:null==m||null===(n=m.stateInfo)||void 0===n?void 0:n.logoUrl,logoUrlWhite:null==m||null===(o=m.stateInfo)||void 0===o?void 0:o.logoUrlWhite,defaultLanding:d,allowedUserTypes:v}):(0,a.jsx)(O,{initData:m,stateCode:c,modules:null==m?void 0:m.modules,appTenants:m.tenants,logoUrl:null==m||null===(s=m.stateInfo)||void 0===s?void 0:s.logoUrl,defaultLanding:d,allowedUserTypes:v})})})})},K=e=>{var{stateCode:n,registry:i,enabledModules:r,defaultLanding:l,allowedUserTypes:s}=e,c=(0,t.useMemo)(()=>Digit.Utils.getPrivacyObject()||{},[]),[u,d]=(0,t.useState)(c),v=(Digit.UserService.getType(),(0,t.useMemo)(()=>new o.QueryClient({defaultOptions:{queries:{staleTime:9e5,gcTime:3e6,retry:!1,retryDelay:e=>1/0}}}),[])),p=Digit.Contexts.ComponentProvider,m=Digit.Contexts.PrivacyProvider,f=(Digit.UserService.hasAccess(["FSM_DSO"]),(0,t.useCallback)(e=>{Digit.Utils.setPrivacyObject({}),d({})},[])),g=(0,t.useCallback)(()=>{var e=Digit.Utils.getPrivacyObject();return d(e),e},[]),y=(0,t.useCallback)(e=>{var t=Digit.Utils.getAllPrivacyObject(),n="undefined"!=typeof window?window.location.pathname:"",i=Q(Q({},t),{},{[n]:e});Digit.Utils.setPrivacyObject(Q({},i)),d((null==t?void 0:t[n])||{})},[]),h=(0,t.useCallback)((e,t)=>{d(Digit.Utils.updatePrivacy(e,t)||{})},[]),b=(0,t.useMemo)(()=>({privacy:"undefined"!=typeof window?null==u?void 0:u[window.location.pathname]:u,resetPrivacy:f,getPrivacy:g,updatePrivacyDescoped:y,updatePrivacy:h}),[u,f,g,y,h]);return(0,a.jsx)("div",{children:(0,a.jsx)(w.A,{children:(0,a.jsx)(o.QueryClientProvider,{client:v,children:(0,a.jsx)(p.Provider,{value:i,children:(0,a.jsx)(m.Provider,{value:b,children:(0,a.jsx)(Y,{stateCode:n,enabledModules:r,defaultLanding:l,allowedUserTypes:s})})})})})})},J={SelectOtp:S.A,ChangeCity:j.A,ChangeLanguage:_.A,PrivacyComponent:U,OtpComponent:n=>{var o,r,{onSelect:s,formData:c,control:u,formState:d}=n,v=function(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(n,F),{t:p}=(0,i.useTranslation)(),[m,f]=((0,l.useLocation)(),(0,t.useState)(null)),[g,y]=(0,t.useState)({}),[h,b]=(0,t.useState)(!0),[O,x]=(0,t.useState)(30),S=()=>{f(null)};(0,B.A)(()=>{x(O-1)},O>0?1e3:null),(0,t.useEffect)(()=>{s("OtpComponent",g)},[g]);var j={url:"/user-otp/v1/_send",params:{tenantId:null==v||null===(o=v.props)||void 0===o?void 0:o.code},body:{},config:{enable:!1}},_=Digit.Hooks.useCustomAPIMutationHook(j),w=function(){var e=G(function*(){var e,t,n;x(30),yield _.mutate({body:{otp:{userName:null==v||null===(e=v.props)||void 0===e?void 0:e.email,type:"login",tenantId:null==v||null===(t=v.props)||void 0===t?void 0:t.tenant,userType:"EMPLOYEE"}},config:{enable:!0}},{onError:(e,t)=>{var n,i;f({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===(i=e.response)||void 0===i||null===(i=i.data)||void 0===i||null===(i=i.Errors)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.code):"SANDBOX_RESEND_OTP_ERROR"}),setTimeout(S,5e3)},onSuccess:(n=G(function*(e){f({key:"info",label:p("OTP_RESNED_SUCCESFULL")}),setTimeout(S,5e3)}),function(e){return n.apply(this,arguments)})})});return function(){return e.apply(this,arguments)}}();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(e.CardLabel,{className:"sandbox-custom-otp-subheader",children:p("SANDBOX_ENTER_OTP")}),(0,a.jsx)(e.CardLabel,{className:"sandbox-custom-otp-header",children:p("CS_OTP_EMAIL")}),(0,a.jsx)(e.CardLabel,{className:"sandbox-custom-otp-email",style:{fontWeight:"bold"},children:null==v||null===(r=v.props)||void 0===r?void 0:r.email}),(0,a.jsx)(M.OTPInput,{className:"sandbox-otp-input",length:6,onChange:e=>{y(z(z({},g),{},{otp:e}))},value:null==g?void 0:g.otp}),O>0?(0,a.jsx)(e.CardText,{className:"sandbox-resend-otp",children:"".concat(p("CS_RESEND_ANOTHER_OTP")," ").concat(O," ").concat(p("CS_RESEND_SECONDS"))}):(0,a.jsx)("p",{className:"card-text-button sandbox-otp-input",onClick:w,children:p("CS_RESEND_OTP")}),!h&&(0,a.jsx)(e.CardLabelError,{children:p("CS_INVALID_OTP")}),m&&(0,a.jsx)(e.Toast,{type:null==m?void 0:m.key,label:p(null==m?void 0:m.label),onClose:S})]})},ForgotOrganizationTooltip:n=>{var{onSelect:o}=n,{t:r}=(0,i.useTranslation)(),[l,s]=(0,t.useState)(!1),c=(0,t.useRef)(null);return(0,t.useEffect)(()=>{var e=e=>{c.current&&!c.current.contains(e.target)&&s(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,a.jsxs)("div",{ref:c,className:"loginSignUpSelector",style:{position:"relative",marginTop:"-2rem"},children:[(0,a.jsx)(e.Button,{label:r("SB_FORGOTORGANIZATION_TOOLTIP"),variation:"link",size:"small",onClick:()=>s(e=>!e),style:{marginBottom:"0.5rem",paddingLeft:"0.2rem"}}),l&&(0,a.jsx)("div",{style:{position:"absolute",bottom:"100%",left:"50%",transform:"translateY(-4px)",backgroundColor:"#0b4b66",color:"white",padding:"6px 10px",borderRadius:"4px",whiteSpace:"normal",wordBreak:"break-word",maxWidth:"20rem",zIndex:1e3,fontSize:"0.875rem"},children:r("SB_FORGOTORGANIZATION_TOOLTIP_TEXT")})]})},LoginSignupSelector:o=>{var{onSelect:r,formData:l,control:s,formState:c}=o,{t:u}=(function(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}(o,q),(0,i.useTranslation)()),[d,v]=(0,t.useState)(!0);(0,t.useEffect)(()=>{r("check",d)},[d]);var p=window.location.href.includes("sandbox-ui/user/sign-up");return(0,a.jsx)(n().Fragment,{children:(0,a.jsx)("div",{className:"loginSignUpSelector",style:{marginTop:"-2rem"},children:p?(0,a.jsx)(e.Button,{label:u("SB_ALREADY_HAVE_ACCOUNT"),variation:"link",size:"small",onClick:()=>{var e;window.location.replace("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/user/login"))},style:{marginBottom:"0.5rem",paddingLeft:"0.2rem"}}):(0,a.jsx)(e.Button,{label:u("SB_DONT_HAVE_ACCOUNT"),variation:"link",size:"small",onClick:()=>{var e;window.location.replace("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/user/sign-up"))},style:{marginBottom:"0.5rem",paddingLeft:"0.2rem"}})})})}},$=()=>{Object.entries(J).forEach(e=>{var[t,n]=e;Digit.ComponentRegistryService.setComponent(t,n)})}})(),p})());
|