@egovernments/digit-ui-module-core 1.5.11 → 1.5.12
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/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=require("@egovernments/digit-ui-react-components"),n=require("react"),r=e(n),i=require("react-i18next"),o=require("react-query"),a=require("react-redux"),l=require("react-router-dom"),u=e(require("react-tooltip")),c=require("redux"),s=e(require("redux-thunk"));function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function f(e,t){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function m(e){throw new TypeError('"'+e+'" is read-only')}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return p(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var h={error:{imgUrl:"https://s3.ap-south-1.amazonaws.com/egov-qa-assets/error-image.png",infoMessage:"CORE_SOMETHING_WENT_WRONG",buttonInfo:"ACTION_TEST_HOME"},maintenance:{imgUrl:"https://s3.ap-south-1.amazonaws.com/egov-qa-assets/maintainence-image.png",infoMessage:"CORE_UNDER_MAINTENANCE",buttonInfo:"ACTION_TEST_HOME"},notfound:{imgUrl:"https://s3.ap-south-1.amazonaws.com/egov-qa-assets/PageNotFound.png",infoMessage:"CORE_NOT_FOUND",buttonInfo:"ACTION_TEST_HOME"}},E=function(e){var t=Digit.Hooks.useQueryParams().type,n=h[void 0===t?"error":t],o=i.useTranslation().t;return r.createElement("div",{className:"error-boundary"},r.createElement("div",{className:"error-container"},r.createElement("img",{src:n.imgUrl,alt:"error"}),r.createElement("h1",null,o(n.infoMessage)),r.createElement("button",{onClick:function(){e.goToHome()}},o(n.buttonInfo))))},y=function(){var e,t,n="employee"===Digit.UserService.getType()?"/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/error":"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/citizen/error";return window.location.href.includes("employee/user/error")||window.location.href.includes("citizen/error")||"development"===process.env.NODE_ENV||(window.location.href=n),r.createElement("span",null)},_=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).state={error:null,errorStack:null,hasError:!1},n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n),i.getDerivedStateFromError=function(e){return{error:null==e?void 0:e.message,hasError:!0,errorStack:null==e?void 0:e.stack}};var o=i.prototype;return o.componentDidCatch=function(e,t){this.setState({error:null==e?void 0:e.message,hasError:!0,errorStack:null==e?void 0:e.stack})},o.render=function(){return this.state.hasError?r.createElement("div",{className:"error-boundary"},r.createElement(y,null),r.createElement(E,{initData:this.props.initData})):this.props.children},i}(r.Component),b=function(e,t,n){var r=null==e?void 0:e[""+t];r&&r.map(function(e){e.link=e.navigationURL,e.i18nKey=n(e.name)});var i,o={links:null==r?void 0:r.reverse(),header:Digit.Utils.locale.getTransformedLocale("ACTION_TEST_"+t),iconName:"CITIZEN_"+t+"_ICON"};return"FSM"===t&&[{role:"FSM_DSO",from:"/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/citizen/fsm/dso-dashboard",dashoardLink:"CS_LINK_DSO_DASHBOARD",loginLink:"CS_LINK_LOGIN_DSO"}].map(function(e){var t,r,i,a=e.from,l=e.loginLink,u=e.dashoardLink;Digit.UserService.hasAccess(e.role)?null==o||null===(t=o.links)||void 0===t||t.push({link:a,i18nKey:n(u)}):null==o||null===(r=o.links)||void 0===r||r.push({link:"/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/citizen/login",state:{role:"FSM_DSO",from:a},i18nKey:n(l)})}),o},C=function(e){var n=e.modules,o=e.getCitizenMenu,a=e.fetchedCitizen,l=e.isLoading,u=n.filter(function(e){return"Payment"===e.code})[0],c=n.filter(function(e){return"Payment"!==e.code}),s=[u].concat(c),d=i.useTranslation().t;return l?r.createElement(t.Loader,null):r.createElement(r.Fragment,null,r.createElement("div",{className:"citizen-all-services-wrapper"},r.createElement(t.BackButton,null),r.createElement("div",{className:"citizenAllServiceGrid"},s.filter(function(e){return e}).map(function(e,n){var i,l,u,c,s,f,v,m=e.code;return a&&(u=a?b(o,m,d):void 0),(null===(i=u)||void 0===i||null===(l=i.links)||void 0===l?void 0:l.length)>0?r.createElement(t.CitizenHomeCard,{header:d(null===(c=u)||void 0===c?void 0:c.header),links:null===(s=u)||void 0===s||null===(f=s.links)||void 0===f||null===(v=f.filter(function(e){return null==e?void 0:e.link}))||void 0===v?void 0:v.sort(function(e,t){return(null==e?void 0:e.orderNumber)-(null==t?void 0:t.orderNumber)}),Icon:function(){return function(e){switch(e){case"PT":return r.createElement(t.PTIcon,{className:"fill-path-primary-main"});case"WS":return r.createElement(t.WSICon,{className:"fill-path-primary-main"});case"FSM":return r.createElement(t.FSMIcon,{className:"fill-path-primary-main"});case"MCollect":return r.createElement(t.MCollectIcon,{className:"fill-path-primary-main"});case"PGR":return r.createElement(t.PGRIcon,{className:"fill-path-primary-main"});case"TL":return r.createElement(t.TLIcon,{className:"fill-path-primary-main"});case"OBPS":return r.createElement(t.OBPSIcon,{className:"fill-path-primary-main"});case"Bills":return r.createElement(t.BillsIcon,{className:"fill-path-primary-main"});default:return r.createElement(t.PTIcon,{className:"fill-path-primary-main"})}}(m)},Info:"OBPS"===m?function(){return r.createElement(t.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"===m}):r.createElement(r.Fragment,null)}))))},O=function(e){return r.createElement("div",{className:"employee-app-container"},r.createElement("div",{className:"ground-container moduleCardWrapper gridModuleWrapper"},e.modules.map(function(e,t){var n=Digit.ComponentRegistryService.getComponent(e.code+"Card")||function(){return r.createElement(r.Fragment,null)};return r.createElement(n,{key:t})})))},w=function(e){var t=e.modules;return"citizen"===e.userType?r.createElement(C,{modules:t,getCitizenMenu:e.getCitizenMenu,fetchedCitizen:e.fetchedCitizen,isLoading:e.isLoading}):r.createElement(O,{modules:t})},S=function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=""),""==t)return e;for(;null!==(r=e)&&void 0!==r&&r.includes(t);){var r,i;e=null===(i=e)||void 0===i?void 0:i.replace(t,n)}return e},N=function(e){var i,o=n.useState(null),a=o[0],u=o[1],c=n.useState([]),s=c[0],d=c[1],f=(n.useState([]),l.useHistory());return n.useEffect(function(){var t,n,r=Digit.SessionStorage.get("citizen.userRequestObject"),i=[],o=[];null==r||null===(t=r.info)||void 0===t||null===(n=t.roles)||void 0===n||n.forEach(function(e){return i.push(e.tenantId)});var a=i.filter(function(e,t,n){return n.indexOf(e)===t});null==a||a.forEach(function(t){var n;o.push({label:null==e?void 0:e.t("TENANT_TENANTS_"+(null===(n=S(t,".","_"))||void 0===n?void 0:n.toUpperCase())),value:t})}),null==o||o.filter(function(e){return e.value==Digit.SessionStorage.get("Employee.tenantId")}),d(o)},[a]),r.createElement("div",{style:null!=e&&e.mobileView?{color:"#767676"}:{}},r.createElement(t.Dropdown,{option:s,selected:s.find(function(e){return e.value===(null==a?void 0:a.value)}),optionKey:"label",select:function(e){var t,n,r,i,o=Digit.SessionStorage.get("citizen.userRequestObject"),a=null===(t=Digit.SessionStorage.get("citizen.userRequestObject"))||void 0===t||null===(n=t.info)||void 0===n||null===(r=n.roles)||void 0===r?void 0:r.filter(function(t){return t.tenantId===e.value});if((null==a?void 0:a.length)>0&&(o.info.roles=a,o.info.tenantId=null==e?void 0:e.value),Digit.SessionStorage.set("Employee.tenantId",null==e?void 0:e.value),Digit.UserService.setUser(o),u(e),window.location.href.includes("/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/employee/")){var l,c,s=(null===(l=location.state)||void 0===l?void 0:l.from)||"/"+(null===(c=window)||void 0===c?void 0:c.contextPath)+"/employee";f.replace(s)}window.location.reload()},freeze:!0,customSelector:r.createElement("label",{className:"cp"},null==e?void 0:e.t("TENANT_TENANTS_"+(null===(i=S(Digit.SessionStorage.get("Employee.tenantId"),".","_"))||void 0===i?void 0:i.toUpperCase())))}))},I=function(e){var i=e.dropdown||!1,o=Digit.Hooks.useStore.getInitData(),a=o.isLoading,l=o.data||{},u=l.languages,c=l.stateInfo,s=Digit.StoreData.getCurrentLanguage(),d=n.useState(s),f=d[0],v=d[1],m=function(e){v(e.value),Digit.LocalizationService.changeLanguage(e.value,c.code)};return a?null:i?r.createElement("div",null,r.createElement(t.Dropdown,{option:u,selected:u.find(function(e){return e.value===s}),optionKey:"label",select:m,freeze:!0,customSelector:r.createElement("label",{className:"cp"},u.find(function(e){return e.value===f}).label)})):r.createElement(r.Fragment,null,r.createElement("div",{style:{marginBottom:"5px"}},"Language"),r.createElement("div",{className:"language-selector"},u.map(function(e,n){return r.createElement("div",{className:"language-button-container",key:n},r.createElement(t.CustomButton,{selected:e.value===f,text:e.label,onClick:function(){return m(e)}}))})))},D=function(e){var t,n;return r.createElement("span",{className:"user-img-txt",onClick:e.toggleMenu,title:e.name},null==e||null===(t=e.name)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.toUpperCase())},T=function(e){var n,i,o,a,u,c,s,d=e.t,f=e.stateInfo,v=e.toggleSidebar,m=e.handleLogout,p=e.userDetails,g=e.CITIZEN,h=e.cityDetails,E=e.mobileView,y=e.userOptions,_=e.handleUserDropdownSelection,b=e.logoUrl,C=e.showLanguageChange,O=void 0===C||C,w=r.useState(null),S=w[0],T=w[1];r.useEffect(function(){try{var e,t=Digit.ULBService.getCurrentTenantId(),n=null==p||null===(e=p.info)||void 0===e?void 0:e.uuid,r=function(){if(n)return Promise.resolve(Digit.UserService.userSearch(t,{uuid:[n]},{})).then(function(e){if(e&&e.user&&e.user.length){var t,n=e.user[0],r=null==n||null===(t=n.photo)||void 0===t?void 0:t.split(",");T(null==r?void 0:r.at(0))}})}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},[null!==S,null==p||null===(n=p.info)||void 0===n?void 0:n.uuid]);var x,A,L,R,P,M,k=Digit.ULBService.getCitizenCurrentTenant(!0),U=l.useHistory(),j=l.useLocation().pathname,B=Digit.Hooks.useNotificationCount({tenantId:k,config:{enabled:"EMPLOYEE"!==(null===(x=Digit.UserService)||void 0===x||null===(A=x.getUser())||void 0===A||null===(L=A.info)||void 0===L?void 0:L.type)&&"CITIZEN"===(null===(R=Digit.UserService)||void 0===R||null===(P=R.getUser())||void 0===P||null===(M=P.info)||void 0===M?void 0:M.type)&&!!k}}),F=B.data,V=(void 0===F?{}:F).unreadCount;if(g)return r.createElement("div",null,r.createElement(t.TopBar,{img:null==f?void 0:f.logoUrlWhite,isMobile:!0,toggleSidebar:function(){Digit.clikOusideFired?Digit.clikOusideFired=!1:v(!0)},logoUrl:null==f?void 0:f.logoUrlWhite,onLogout:m,userDetails:p,notificationCount:V<99?V:99,notificationCountLoaded:B.isSuccess,cityOfCitizenShownBesideLogo:d(k),onNotificationIconClick:function(){var e;U.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/engagement/notifications")},hideNotificationIconOnSomeUrlsWhenNotLoggedIn:function(e){var t,n,r,i;return(null===(t=Digit.UserService)||void 0===t||null===(n=t.getUser())||void 0===n||!n.access_token)&&["/"+(null===(r=window)||void 0===r?void 0:r.contextPath)+"/citizen/select-language","/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/citizen/select-location"].includes(e)}(j),changeLanguage:E?null:r.createElement(I,{dropdown:!0})}));var z=!(null==p||!p.access_token);return r.createElement("div",{className:"topbar"},E?r.createElement(t.Hamburger,{handleClick:v,color:"#9E9E9E"}):null,r.createElement("img",{className:"city",src:z?null==h?void 0:h.logoId:null==f?void 0:f.statelogo}),r.createElement("span",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"}},z&&(null!=h&&null!==(i=h.city)&&void 0!==i&&i.ulbGrade?r.createElement("p",{className:"ulb",style:E?{fontSize:"14px",display:"inline-block"}:{}},d(null==h?void 0:h.i18nKey).toUpperCase()," ",d("ULBGRADE_"+(null==h||null===(o=h.city)||void 0===o?void 0:o.ulbGrade.toUpperCase().replace(" ","_").replace(".","_"))).toUpperCase()):r.createElement("img",{className:"state",src:b})),!z&&r.createElement("p",{className:"ulb",style:E?{fontSize:"14px",display:"inline-block"}:{}},d("MYCITY_"+(null==f||null===(a=f.code)||void 0===a?void 0:a.toUpperCase())+"_LABEL")," ",d("MYCITY_STATECODE_LABEL")),!E&&r.createElement("div",{className:E?"right":"flex-right right w-80 column-gap-15",style:z?{}:{width:"80%"}},r.createElement("div",{className:"left"},!window.location.href.includes("employee/user/login")&&!window.location.href.includes("employee/user/language-selection")&&r.createElement(N,{dropdown:!0,t:d})),r.createElement("div",{className:"left"},O&&r.createElement(I,{dropdown:!0})),(null==p?void 0:p.access_token)&&r.createElement("div",{className:"left"},r.createElement(t.Dropdown,{option:y,optionKey:"name",select:_,showArrow:!0,freeze:!0,style:E?{right:0}:{},optionCardStyles:{overflow:"revert"},customSelector:null==S?r.createElement(D,{name:(null==p||null===(u=p.info)||void 0===u?void 0:u.name)||(null==p||null===(c=p.info)||void 0===c||null===(s=c.userInfo)||void 0===s?void 0:s.name)||"Employee"}):r.createElement("img",{src:S,style:{height:"48px",width:"48px",borderRadius:"50%"}})})),r.createElement("img",{className:"state",src:b}))))},x=function(e,n,i,o){var a,l;return[{type:"link",element:"HOME",text:e("COMMON_BOTTOM_NAVIGATION_HOME"),link:o?"/"+(null===(a=window)||void 0===a?void 0:a.contextPath)+"/employee":"/"+(null===(l=window)||void 0===l?void 0:l.contextPath)+"/citizen",icon:"HomeIcon",populators:{onClick:n}},{type:"component",element:"LANGUAGE",action:r.createElement(I,null),icon:"LanguageIcon"},{id:"login-btn",element:"LOGIN",text:e("CORE_COMMON_LOGIN"),icon:r.createElement(t.LogoutIcon,{className:"icon"}),populators:{onClick:i}}]},A="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",L=function(e){return r.createElement("h1",{className:"heading-m"},e.label)},R=function(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},r.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),r.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))},P=function(e){return r.createElement("div",{onClick:null==e?void 0:e.onClick,style:null!=e&&e.isMobileView?{padding:5}:null},null!=e&&e.isMobileView?r.createElement(t.CloseSvg,null):r.createElement("div",{className:"icon-bg-secondary",style:{backgroundColor:"#505A5F"}}," ",r.createElement(R,null)," "))},M=function(e){var n=e.onSelect,o=e.onCancel,a=e.onDismiss,l=i.useTranslation().t,u=r.useState(window.innerWidth<=780),c=u[0],s=u[1],d=function(){window.innerWidth<=780?c||s(!0):c&&s(!1)};return r.useEffect(function(){return window.addEventListener("resize",function(){d()}),function(){window.addEventListener("resize",function(){d()})}}),c?r.createElement(t.Modal,{popupStyles:{height:"174px",maxHeight:"174px",width:"324px",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},popupModuleActionBarStyles:{display:"flex",flex:1,justifyContent:"flex-start",width:"100%",position:"absolute",left:0,bottom:0,padding:"18px"},style:{flex:1},popupModuleMianStyles:{padding:"18px"},headerBarMain:r.createElement(L,{label:l("CORE_LOGOUT_WEB_HEADER")}),headerBarEnd:r.createElement(P,{onClick:a,isMobileView:c}),actionCancelLabel:l("CORE_LOGOUT_CANCEL"),actionCancelOnSubmit:o,actionSaveLabel:l("CORE_LOGOUT_WEB_YES"),actionSaveOnSubmit:n,formId:"modal-action"},r.createElement("div",null,r.createElement(t.CardText,{style:{margin:0}},l("CORE_LOGOUT_WEB_CONFIRMATION_MESSAGE")+" "))):r.createElement(t.Modal,{popupModuleMianStyles:{paddingTop:"30px"},headerBarMain:r.createElement(L,{label:l("CORE_LOGOUT_WEB_HEADER")}),headerBarEnd:r.createElement(P,{onClick:a,isMobileView:!1}),actionCancelLabel:l("CORE_LOGOUT_CANCEL"),actionCancelOnSubmit:o,actionSaveLabel:l("CORE_LOGOUT_WEB_YES"),actionSaveOnSubmit:n,formId:"modal-action"},r.createElement("div",null,r.createElement(t.CardText,{style:{marginBottom:"54px",marginLeft:"8px",marginRight:"8px"}},l("CORE_LOGOUT_WEB_CONFIRMATION_MESSAGE")+" ",r.createElement("strong",null,l("CORE_LOGOUT_MESSAGE"),"?"))))},k=function(e){var t=e.info,n=e.t;return r.createElement("div",{className:"profile-section"},r.createElement("div",{className:"imageloader imageloader-loaded"},r.createElement("img",{className:"img-responsive img-circle img-Profile",src:A})),r.createElement("div",{id:"profile-name",className:"label-container name-Profile"},r.createElement("div",{className:"label-text"}," ",null==t?void 0:t.name," ")),r.createElement("div",{id:"profile-location",className:"label-container loc-Profile"},r.createElement("div",{className:"label-text"}," ",null==t?void 0:t.mobileNumber," ")),(null==t?void 0:t.emailId)&&r.createElement("div",{id:"profile-emailid",className:"label-container loc-Profile"},r.createElement("div",{className:"label-text"}," ",t.emailId," ")),r.createElement("div",{className:"profile-divider"}),window.location.href.includes("/employee")&&!window.location.href.includes("/employee/user/login")&&!window.location.href.includes("employee/user/language-selection")&&r.createElement(N,{t:n,mobileView:!0}))},U={CommonPTIcon:r.createElement(t.PTIcon,{className:"icon"}),OBPSIcon:r.createElement(t.OBPSIcon,{className:"icon"}),propertyIcon:r.createElement(t.PropertyHouse,{className:"icon"}),TLIcon:r.createElement(t.CaseIcon,{className:"icon"}),PGRIcon:r.createElement(t.PGRIcon,{className:"icon"}),FSMIcon:r.createElement(t.FSMIcon,{className:"icon"}),WSIcon:r.createElement(t.WSICon,{className:"icon"}),MCollectIcon:r.createElement(t.MCollectIcon,{className:"icon"}),BillsIcon:r.createElement(t.CollectionIcon,{className:"icon"}),BirthIcon:r.createElement(t.BirthIcon,{className:"icon"}),DeathIcon:r.createElement(t.DeathIcon,{className:"icon"}),FirenocIcon:r.createElement(t.FirenocIcon,{className:"icon"}),HomeIcon:r.createElement(t.HomeIcon,{className:"icon"}),EditPencilIcon:r.createElement(t.EditPencilIcon,{className:"icon"}),LogoutIcon:r.createElement(t.LogoutIcon,{className:"icon"}),Phone:r.createElement(t.Phone,{className:"icon"})},j=function(e){var o,a,u,c=e.linkData,s=e.islinkDataLoading,f=i.useTranslation().t,v=l.useHistory(),m=l.useLocation().pathname,p=Digit.Hooks.useStore.getInitData(),g=p.data,h=p.isFetched,E=(g||{}).stateInfo,y=Digit.UserService.getUser(),_=window.Digit.Utils.browser.isMobile(),b=n.useState(!1)[0],C=n.useState(!1)[1],O=n.useState(!1),w=O[0],S=O[1],N=function(){S(!1)};if(s)return r.createElement(t.Loader,null);var I=function(){var e;v.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/user/profile")},D=[].concat(x(f,I,function(){var e;v.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/login")},b));D=D.filter(function(e){return"LANGUAGE"!==e.element}),Digit.ULBService.getCurrentTenantId();var T,A=function(e){var t,n,i,o=e.item,a=(null==o?void 0:o.icon)||(null===(t=o.icon)||void 0===t||null===(n=t.type)||void 0===n?void 0:n.name),u=a?U[a]:U.BillsIcon;i="component"===o.type?o.action:o.text;var c=function(){return r.createElement("span",d({className:"menu-item"},o.populators),u,r.createElement("div",{className:"menu-label"},i))};return"external-link"===o.type?r.createElement("a",{href:o.link},r.createElement(c,null)):"link"===o.type?r.createElement(l.Link,{to:null==o?void 0:o.link},r.createElement(c,null)):r.createElement(c,null)};return h&&y&&y.access_token&&(T=r.createElement(k,{info:null==y?void 0:y.info,stateName:null==E?void 0:E.name,t:f}),D=D.filter(function(e){return"login-btn"!==(null==e?void 0:e.id)}),D=[].concat(D,[{text:f("EDIT_PROFILE"),element:"PROFILE",icon:"EditPencilIcon",populators:{onClick:I}},{text:f("CORE_COMMON_LOGOUT"),element:"LOGOUT",icon:"LogoutIcon",populators:{onClick:function(){C(!1),S(!0)}}},{text:r.createElement(r.Fragment,null,f("CS_COMMON_HELPLINE"),r.createElement("div",{className:"telephone",style:{marginTop:"-10%"}},null==g?void 0:g.tenants.map(function(e){}),r.createElement("div",{className:"link"},r.createElement("a",{href:"tel:"+(null==g?void 0:g.tenants[0].contactNumber)},null==g?void 0:g.tenants[0].contactNumber)))),element:"Helpline",icon:"Phone"}])),null===(o=Object.keys(c))||void 0===o||null===(a=o.sort(function(e,t){return t.localeCompare(e)}))||void 0===a||a.map(function(e){var t,n,r,i,o,a;(null===(t=c[e][0])||void 0===t?void 0:t.sidebar)===window.contextPath+"-links"&&D.splice(1,0,{type:null!==(n=c[e][0])&&void 0!==n&&null!==(r=n.sidebarURL)&&void 0!==r&&r.includes(null===(i=window)||void 0===i?void 0:i.contextPath)?"link":"external-link",text:f("ACTION_TEST_"+Digit.Utils.locale.getTransformedLocale(e)),links:c[e],icon:null===(o=c[e][0])||void 0===o?void 0:o.leftIcon,link:null===(a=c[e][0])||void 0===a?void 0:a.sidebarURL})}),r.createElement(r.Fragment,null,r.createElement("div",null,r.createElement("div",{style:{height:"100%",width:"100%",top:"0px",backgroundColor:"rgba(0, 0, 0, 0.54)",pointerzevents:"auto"}}),r.createElement("div",{style:{display:"flex",flexDirection:"column",height:_?"calc(100vh - 56px)":"auto",zIndex:"99"}},T,r.createElement("div",{className:"drawer-desktop"},null===(u=D)||void 0===u?void 0:u.map(function(e,t){return r.createElement("div",{className:"sidebar-list "+(m===(null==e?void 0:e.link)||m===(null==e?void 0:e.sidebarURL)?"active":""),key:t},r.createElement(A,{item:e}))}))),r.createElement("div",null,w&&r.createElement(M,{onSelect:function(){Digit.UserService.logout(),S(!1)},onCancel:N,onDismiss:N}))))},B=function(e){var t=e.info,n=e.t,i=r.useState(null),o=i[0],a=i[1];return r.useEffect(function(){try{var e=Digit.ULBService.getCurrentTenantId(),n=null==t?void 0:t.uuid,r=function(){if(n)return Promise.resolve(Digit.UserService.userSearch(e,{uuid:[n]},{})).then(function(e){if(e&&e.user&&e.user.length){var t,n=e.user[0],r=null==n||null===(t=n.photo)||void 0===t?void 0:t.split(",");a(null==r?void 0:r.at(0))}})}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},[null!==o]),r.createElement("div",{className:"profile-section"},r.createElement("div",{className:"imageloader imageloader-loaded"},r.createElement("img",{className:"img-responsive img-circle img-Profile",src:o||A,style:{objectFit:"cover",objectPosition:"center"}})),r.createElement("div",{id:"profile-name",className:"label-container name-Profile"},r.createElement("div",{className:"label-text"}," ",null==t?void 0:t.name," ")),r.createElement("div",{id:"profile-location",className:"label-container loc-Profile"},r.createElement("div",{className:"label-text"}," ",null==t?void 0:t.mobileNumber," ")),(null==t?void 0:t.emailId)&&r.createElement("div",{id:"profile-emailid",className:"label-container loc-Profile"},r.createElement("div",{className:"label-text"}," ",t.emailId," ")),r.createElement("div",{className:"profile-divider"}),window.location.href.includes("/employee")&&!window.location.href.includes("/employee/user/login")&&!window.location.href.includes("employee/user/language-selection")&&r.createElement(N,{t:n,mobileView:!0}))},F=function(){var e,t,n;return r.createElement("div",{className:"digit-footer",style:{marginBottom:0}},r.createElement("img",{alt:"Powered by DIGIT",src:null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_FOOTER"),style:{cursor:"pointer"},onClick:function(){var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," ")},V=function(e){var o=e.isOpen,a=e.isMobile,u=void 0!==a&&a,c=e.toggleSidebar,s=e.onLogout,f=e.isEmployee,v=void 0!==f&&f,m=e.linkData,p=e.islinkDataLoading,g=Digit.Hooks.useStore.getInitData(),h=g.data,E=g.isFetched,y=(h||{}).stateInfo,_=Digit.UserService.getUser(),b=n.useState(""),C=b[0],O=b[1],w=i.useTranslation().t,S=l.useHistory(),N=function(){Digit.clikOusideFired=!0,c(!1)},I=Digit.Hooks.useAccessControl(),D=I.isLoading,T=I.data;if(Digit.ULBService.getCurrentTenantId(),p||D)return r.createElement(t.Loader,null);var A,L=[].concat(x(w,N,function(){var e;S.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/login"),N()},v));E&&_&&_.access_token&&(A=r.createElement(B,{info:null==_?void 0:_.info,stateName:null==y?void 0:y.name,t:w}),L=L.filter(function(e){return"login-btn"!==(null==e?void 0:e.id)}),L=[].concat(L,[{text:w("EDIT_PROFILE"),element:"PROFILE",icon:"EditPencilIcon",populators:{onClick:function(){var e,t,n=v?"/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/profile":"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/citizen/user/profile";S.push(n),N()}}},{text:w("CORE_COMMON_LOGOUT"),element:"LOGOUT",icon:"LogoutIcon",populators:{onClick:s}},{text:r.createElement(r.Fragment,null,w("CS_COMMON_HELPLINE"),r.createElement("div",{className:"telephone",style:{marginTop:"-10%"}},null==h?void 0:h.tenants.map(function(e){}),r.createElement("div",{className:"link"},r.createElement("a",{href:"tel:"+(null==h?void 0:h.tenants[0].contactNumber)},null==h?void 0:h.tenants[0].contactNumber)))),element:"Helpline",icon:"Phone"}]));var R={};if(v){var P;null==T||T.actions.filter(function(e){return"url"===e.url&&"Home"!==e.displayName}).forEach(function(e){var t;if(""==C&&""!==e.path){var n=e.path.split(".")[0];"TradeLicense"===n&&(n="Trade License"),R[n]?R[n].push(e):R[n]=[e]}else if(""!==e.path&&null!=e&&null!==(t=e.displayName)&&void 0!==t&&t.toLowerCase().includes(C.toLowerCase())){var r=e.path.split(".")[0];"TradeLicense"===r&&(r="Trade License"),R[r]?R[r].push(e):R[r]=[e]}});for(var M=Object.keys(R),k=function(e){var t,n,r,i,o,a,l,u,c,s,f,v=null===(t=R[M[e]][0])||void 0===t||null===(n=t.displayName)||void 0===n||null===(r=n.toUpperCase())||void 0===r?void 0:r.replace(/[ -]/g,"_"),m=null===(i=M[e])||void 0===i||null===(o=i.toUpperCase())||void 0===o?void 0:o.replace(/[ -]/g,"_");-1===R[M[e]][0].path.indexOf(".")?L.splice(1,0,{type:"link",text:w("ACTION_TEST_"+v),link:null===(a=R[M[e]][0])||void 0===a?void 0:a.navigationURL,icon:null===(l=R[M[e]][0])||void 0===l||null===(u=l.leftIcon)||void 0===u||null===(c=u.split)||void 0===c?void 0:c.call(u,":")[1],populators:{onClick:function(){var t;S.push(null===(t=R[M[e]][0])||void 0===t?void 0:t.navigationURL),N()}}}):L.splice(1,0,{type:"dynamic",moduleName:w("ACTION_TEST_"+m),links:null===(s=R[M[e]])||void 0===s?void 0:s.map(function(e){var t,n;return d({},e,{displayName:w("ACTION_TEST_"+(null==e||null===(t=e.displayName)||void 0===t||null===(n=t.toUpperCase())||void 0===n?void 0:n.replace(/[ -]/g,"_")))})}),icon:null===(f=R[M[e]][1])||void 0===f?void 0:f.leftIcon})},U=0;U<M.length;U++)k(U);var V=L.findIndex(function(e){return"HOME"===e.element}),z=L.splice(V,1),W=L.findIndex(function(e){return"LANGUAGE"===e.element}),H=L.splice(W,(null===(P=L)||void 0===P?void 0:P.length)-W);L.sort(function(e,t){return("dynamic"===(null==e?void 0:e.type)?null==e?void 0:e.moduleName:null==e?void 0:e.text).localeCompare("dynamic"===(null==t?void 0:t.type)?null==t?void 0:t.moduleName:null==t?void 0:t.text)}),(null==z?void 0:z[0])&&L.splice(0,0,z[0]),L=(null==H?void 0:H.length)>0?L.concat(H):L}else{var G,q;null===(G=Object.keys(m))||void 0===G||null===(q=G.sort(function(e,t){return t.localeCompare(e)}))||void 0===q||q.map(function(e){var t,n,r,i,o,a;"digit-ui-links"===(null===(t=m[e][0])||void 0===t?void 0:t.sidebar)&&L.splice(1,0,{type:null!==(n=m[e][0])&&void 0!==n&&null!==(r=n.sidebarURL)&&void 0!==r&&r.includes(null===(i=window)||void 0===i?void 0:i.contextPath)?"link":"external-link",text:w("ACTION_TEST_"+Digit.Utils.locale.getTransformedLocale(e)),links:m[e],icon:null===(o=m[e][0])||void 0===o?void 0:o.leftIcon,link:null===(a=m[e][0])||void 0===a?void 0:a.sidebarURL})})}return S.location.pathname.includes("/openlink")&&(A=r.createElement("span",null),L=L.filter(function(e){return"LANGUAGE"===e.element})),u?r.createElement(t.NavBar,{open:o,toggleSidebar:c,profileItem:A,onClose:N,menuItems:L,Footer:r.createElement(F,null),isEmployee:v,search:C,setSearch:O}):r.createElement(j,{logout:s})},z=function e(o){var a,c,s,f,v,p,g,h=o.item,E=n.useState(!1),y=E[0],_=E[1],b=h.label,C=h.icon,O=h.children,w=i.useTranslation().t,S=(l.useLocation(),{home:r.createElement(t.HomeIcon,null),announcement:r.createElement(t.ComplaintIcon,null),business:r.createElement(t.BPAHomeIcon,null),store:r.createElement(t.PropertyHouse,null),assignment:r.createElement(t.CaseIcon,null),receipt:r.createElement(t.ReceiptIcon,null),"business-center":r.createElement(t.PersonIcon,null),description:r.createElement(t.DocumentIconSolid,null),"water-tap":r.createElement(t.DropIcon,null),"collections-bookmark":r.createElement(t.CollectionsBookmarIcons,null),"insert-chart":r.createElement(t.FinanceChartIcon,null),edcr:r.createElement(t.CollectionIcon,null),collections:r.createElement(t.CollectionIcon,null)}),N=S[null==C||null===(a=C.split)||void 0===a||null===(c=a.call(C,":"))||void 0===c?void 0:c[1]]||S.collections,I=(null==h||null===(s=h.icon)||void 0===s||null===(f=s.leftIcon)||void 0===f||null===(v=f.split)||void 0===v?void 0:v.call(f,":"))||(null==h||null===(p=h.leftIcon)||void 0===p||null===(g=p.split)||void 0===g?void 0:g.call(p,":"));"dynamic"==(null==I?void 0:I[0])&&(require("@egovernments/digit-ui-react-components"),m("leftIcon"));var D=null==b?void 0:b.replace(/[ -]/g,"_").toUpperCase(),T=w("ACTION_TEST_"+D.toUpperCase()),x=w((null==T?void 0:T.length)>20?T.substring(0,20)+"...":T);return r.createElement(r.Fragment,null,r.createElement("button",{className:"submenu-container",onClick:function(e){e.preventDefault(),_(function(e){return!e})},style:null!=h&&h.elementStyle?d({},null==h?void 0:h.elementStyle,{display:"flex"}):{display:"flex"}},r.createElement("div",{className:"sidebar-link "+(y?"active":""),style:{width:null!=h&&h.nested?"240px":"260px",overflow:"auto"}},!(null!=h&&h.nested)&&N,r.createElement("div",{className:"actions",style:{padding:"0px",marginRight:"auto"}},r.createElement("div",{"data-tip":"React-tooltip","data-for":"jk-side-"+D},r.createElement("span",{style:{color:y?"#f47738":""}},x),(null==x?void 0:x.includes("..."))&&r.createElement(u,{textColor:"white",backgroundColor:"grey",place:"right",type:"info",effect:"solid",id:"jk-side-"+D},w("ACTION_TEST_"+D)))),r.createElement("div",null,O&&y?r.createElement(t.ArrowVectorDown,null):O?r.createElement(t.ArrowForward,null):null))),y&&r.createElement("div",null,O.map(function(t,n){var i,a,c,s,f,v=t.label+"-"+n,m=t.label,p=t.icon,g=t.children,h=(null==p||null===(i=p.split)||void 0===i||i.call(p,":"),null==m?void 0:m.replace(/[ -]/g,"_").toUpperCase()),E=w("ACTION_TEST_"+h.toUpperCase()),y=w((null==E?void 0:E.length)>20?E.substring(0,20)+"...":E);return g?r.createElement("div",{key:v},r.createElement(e,{item:d({},t,{nested:!0,to:(s=t.to,f=o.item.to,f+"/"+s),elementStyle:{marginLeft:"19px"}})})):r.createElement(l.NavLink,{key:v,to:null!=t&&null!==(a=t.to)&&void 0!==a&&a.includes(null===(c=window)||void 0===c?void 0:c.contextPath)?null==t?void 0:t.to:"/employee/"+(null==t?void 0:t.to),className:"custom-link",activeClassName:"actions",style:{marginLeft:"40px",marginTop:"10px"}},r.createElement("div",{"data-tip":"React-tooltip","data-for":"jk-side-"+h},r.createElement("span",{style:{fontSize:"14px"}},y),(null==y?void 0:y.includes("..."))&&r.createElement(u,{textColor:"white",backgroundColor:"grey",place:"right",type:"info",effect:"solid",id:"jk-side-"+h},w("ACTION_TEST_"+h))))})))},W=function(e){var n,o,a,c,s,d,f=e.item,v=f.label,p=f.icon,g=f.to,h=f.children,E=i.useTranslation().t,y={home:r.createElement(t.HomeIcon,null),announcement:r.createElement(t.ComplaintIcon,null),business:r.createElement(t.BPAHomeIcon,null),store:r.createElement(t.PropertyHouse,null),assignment:r.createElement(t.CaseIcon,null),receipt:r.createElement(t.ReceiptIcon,null),"business-center":r.createElement(t.PersonIcon,null),description:r.createElement(t.DocumentIconSolid,null),"water-tap":r.createElement(t.DropIcon,null),"collections-bookmark":r.createElement(t.CollectionsBookmarIcons,null),"insert-chart":r.createElement(t.FinanceChartIcon,null),edcr:r.createElement(t.CollectionIcon,null),collections:r.createElement(t.CollectionIcon,null)},_=y[null==p||null===(n=p.split)||void 0===n||null===(o=n.call(p,":"))||void 0===o?void 0:o[1]]||y.collections,b=(null==p||null===(a=p.leftIcon)||void 0===a||null===(c=a.split)||void 0===c?void 0:c.call(a,":"))||(null===(s=_)||void 0===s||null===(d=s.split)||void 0===d?void 0:d.call(s,":"));"dynamic"==(null==b?void 0:b[0])&&(require("@egovernments/digit-ui-react-components"),m("leftIcon"));var C=null==v?void 0:v.replace(/[ -]/g,"_").toUpperCase(),O=E("ACTION_TEST_"+C.toUpperCase()),w=E((null==O?void 0:O.length)>20?O.substring(0,20)+"...":O);return h?r.createElement(z,{item:e.item}):r.createElement("div",{className:"submenu-container",style:{marginLeft:"19px",marginBottom:"15px",marginTop:"15px"}},r.createElement(l.NavLink,{exact:!0,to:g},r.createElement("div",{classname:"sidebar-link"},r.createElement("div",{className:"actions",style:{padding:"0px"}},_,r.createElement("div",{"data-tip":"React-tooltip","data-for":"jk-side-"+C},r.createElement("span",{style:{fontSize:"14px"}},w),(null==w?void 0:w.includes("..."))&&r.createElement(u,{textColor:"white",backgroundColor:"grey",place:"right",type:"info",effect:"solid",id:"jk-side-"+C},E("ACTION_TEST_"+C)))))))},H="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function G(e,t){return e(t={exports:{}},t.exports),t.exports}var q=G(function(e,t){(function(){var n="Expected a function",r="__lodash_placeholder__",i=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],o="[object Arguments]",a="[object Array]",l="[object Boolean]",u="[object Date]",c="[object Error]",s="[object Function]",d="[object GeneratorFunction]",f="[object Map]",v="[object Number]",m="[object Object]",p="[object RegExp]",g="[object Set]",h="[object String]",E="[object Symbol]",y="[object WeakMap]",_="[object ArrayBuffer]",b="[object DataView]",C="[object Float32Array]",O="[object Float64Array]",w="[object Int8Array]",S="[object Int16Array]",N="[object Int32Array]",I="[object Uint8Array]",D="[object Uint16Array]",T="[object Uint32Array]",x=/\b__p \+= '';/g,A=/\b(__p \+=) '' \+/g,L=/(__e\(.*?\)|\b__t\)) \+\n'';/g,R=/&(?:amp|lt|gt|quot|#39);/g,P=/[&<>"']/g,M=RegExp(R.source),k=RegExp(P.source),U=/<%-([\s\S]+?)%>/g,j=/<%([\s\S]+?)%>/g,B=/<%=([\s\S]+?)%>/g,F=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V=/^\w*$/,z=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,W=/[\\^$.*+?()[\]{}|]/g,G=RegExp(W.source),q=/^\s+/,Z=/\s/,X=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$=/\{\n\/\* \[wrapped with (.+)\] \*/,Y=/,? & /,K=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,J=/[()=,{}\[\]\/\s]/,Q=/\\(\\)?/g,ee=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,te=/\w*$/,ne=/^[-+]0x[0-9a-f]+$/i,re=/^0b[01]+$/i,ie=/^\[object .+?Constructor\]$/,oe=/^0o[0-7]+$/i,ae=/^(?:0|[1-9]\d*)$/,le=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ue=/($^)/,ce=/['\n\r\u2028\u2029\\]/g,se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",de="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fe="["+de+"]",ve="["+se+"]",me="\\d+",pe="[a-z\\xdf-\\xf6\\xf8-\\xff]",ge="[^\\ud800-\\udfff"+de+me+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",he="\\ud83c[\\udffb-\\udfff]",Ee="[^\\ud800-\\udfff]",ye="(?:\\ud83c[\\udde6-\\uddff]){2}",_e="[\\ud800-\\udbff][\\udc00-\\udfff]",be="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ce="(?:"+pe+"|"+ge+")",Oe="(?:"+be+"|"+ge+")",we="(?:"+ve+"|"+he+")?",Se="[\\ufe0e\\ufe0f]?"+we+"(?:\\u200d(?:"+[Ee,ye,_e].join("|")+")[\\ufe0e\\ufe0f]?"+we+")*",Ne="(?:"+["[\\u2700-\\u27bf]",ye,_e].join("|")+")"+Se,Ie="(?:"+[Ee+ve+"?",ve,ye,_e,"[\\ud800-\\udfff]"].join("|")+")",De=RegExp("['’]","g"),Te=RegExp(ve,"g"),xe=RegExp(he+"(?="+he+")|"+Ie+Se,"g"),Ae=RegExp([be+"?"+pe+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[fe,be,"$"].join("|")+")",Oe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[fe,be+Ce,"$"].join("|")+")",be+"?"+Ce+"+(?:['’](?:d|ll|m|re|s|t|ve))?",be+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",me,Ne].join("|"),"g"),Le=RegExp("[\\u200d\\ud800-\\udfff"+se+"\\ufe0e\\ufe0f]"),Re=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Me=-1,ke={};ke[C]=ke[O]=ke[w]=ke[S]=ke[N]=ke[I]=ke["[object Uint8ClampedArray]"]=ke[D]=ke[T]=!0,ke[o]=ke[a]=ke[_]=ke[l]=ke[b]=ke[u]=ke[c]=ke[s]=ke[f]=ke[v]=ke[m]=ke[p]=ke[g]=ke[h]=ke[y]=!1;var Ue={};Ue[o]=Ue[a]=Ue[_]=Ue[b]=Ue[l]=Ue[u]=Ue[C]=Ue[O]=Ue[w]=Ue[S]=Ue[N]=Ue[f]=Ue[v]=Ue[m]=Ue[p]=Ue[g]=Ue[h]=Ue[E]=Ue[I]=Ue["[object Uint8ClampedArray]"]=Ue[D]=Ue[T]=!0,Ue[c]=Ue[s]=Ue[y]=!1;var je={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Be=parseFloat,Fe=parseInt,Ve="object"==typeof H&&H&&H.Object===Object&&H,ze="object"==typeof self&&self&&self.Object===Object&&self,We=Ve||ze||Function("return this")(),He=t&&!t.nodeType&&t,Ge=He&&e&&!e.nodeType&&e,qe=Ge&&Ge.exports===He,Ze=qe&&Ve.process,Xe=function(){try{return Ge&&Ge.require&&Ge.require("util").types||Ze&&Ze.binding&&Ze.binding("util")}catch(e){}}(),$e=Xe&&Xe.isArrayBuffer,Ye=Xe&&Xe.isDate,Ke=Xe&&Xe.isMap,Je=Xe&&Xe.isRegExp,Qe=Xe&&Xe.isSet,et=Xe&&Xe.isTypedArray;function tt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function nt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function it(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function ot(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function at(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function lt(e,t){return!(null==e||!e.length)&&ht(e,t,0)>-1}function ut(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function ct(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function st(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function dt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function ft(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function vt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var mt=bt("length");function pt(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function gt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function ht(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):gt(e,yt,n)}function Et(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function yt(e){return e!=e}function _t(e,t){var n=null==e?0:e.length;return n?wt(e,t)/n:NaN}function bt(e){return function(t){return null==t?void 0:t[e]}}function Ct(e){return function(t){return null==e?void 0:e[t]}}function Ot(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function wt(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function St(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Nt(e){return e?e.slice(0,Ht(e)+1).replace(q,""):e}function It(e){return function(t){return e(t)}}function Dt(e,t){return ct(t,function(t){return e[t]})}function Tt(e,t){return e.has(t)}function xt(e,t){for(var n=-1,r=e.length;++n<r&&ht(t,e[n],0)>-1;);return n}function At(e,t){for(var n=e.length;n--&&ht(t,e[n],0)>-1;);return n}function Lt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Rt=Ct({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Pt=Ct({"&":"&","<":"<",">":">",'"':""","'":"'"});function Mt(e){return"\\"+je[e]}function kt(e){return Le.test(e)}function Ut(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function jt(e,t){return function(n){return e(t(n))}}function Bt(e,t){for(var n=-1,i=e.length,o=0,a=[];++n<i;){var l=e[n];l!==t&&l!==r||(e[n]=r,a[o++]=n)}return a}function Ft(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function Vt(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function zt(e){return kt(e)?function(e){for(var t=xe.lastIndex=0;xe.test(e);)++t;return t}(e):mt(e)}function Wt(e){return kt(e)?function(e){return e.match(xe)||[]}(e):function(e){return e.split("")}(e)}function Ht(e){for(var t=e.length;t--&&Z.test(e.charAt(t)););return t}var Gt=Ct({"&":"&","<":"<",">":">",""":'"',"'":"'"}),qt=function e(t){var H,Z=(t=null==t?We:qt.defaults(We.Object(),t,qt.pick(We,Pe))).Array,se=t.Date,de=t.Error,fe=t.Function,ve=t.Math,me=t.Object,pe=t.RegExp,ge=t.String,he=t.TypeError,Ee=Z.prototype,ye=me.prototype,_e=t["__core-js_shared__"],be=fe.prototype.toString,Ce=ye.hasOwnProperty,Oe=0,we=(H=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",Se=ye.toString,Ne=be.call(me),Ie=We._,xe=pe("^"+be.call(Ce).replace(W,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Le=qe?t.Buffer:void 0,je=t.Symbol,Ve=t.Uint8Array,ze=Le?Le.allocUnsafe:void 0,He=jt(me.getPrototypeOf,me),Ge=me.create,Ze=ye.propertyIsEnumerable,Xe=Ee.splice,mt=je?je.isConcatSpreadable:void 0,Ct=je?je.iterator:void 0,Zt=je?je.toStringTag:void 0,Xt=function(){try{var e=Ji(me,"defineProperty");return e({},"",{}),e}catch(e){}}(),$t=t.clearTimeout!==We.clearTimeout&&t.clearTimeout,Yt=se&&se.now!==We.Date.now&&se.now,Kt=t.setTimeout!==We.setTimeout&&t.setTimeout,Jt=ve.ceil,Qt=ve.floor,en=me.getOwnPropertySymbols,tn=Le?Le.isBuffer:void 0,nn=t.isFinite,rn=Ee.join,on=jt(me.keys,me),an=ve.max,ln=ve.min,un=se.now,cn=t.parseInt,sn=ve.random,dn=Ee.reverse,fn=Ji(t,"DataView"),vn=Ji(t,"Map"),mn=Ji(t,"Promise"),pn=Ji(t,"Set"),gn=Ji(t,"WeakMap"),hn=Ji(me,"create"),En=gn&&new gn,yn={},_n=Do(fn),bn=Do(vn),Cn=Do(mn),On=Do(pn),wn=Do(gn),Sn=je?je.prototype:void 0,Nn=Sn?Sn.valueOf:void 0,In=Sn?Sn.toString:void 0;function Dn(e){if(Ga(e)&&!Pa(e)&&!(e instanceof Ln)){if(e instanceof An)return e;if(Ce.call(e,"__wrapped__"))return To(e)}return new An(e)}var Tn=function(){function e(){}return function(t){if(!Ha(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function xn(){}function An(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Ln(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Rn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Mn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Mn;++t<n;)this.add(e[t])}function Un(e){var t=this.__data__=new Pn(e);this.size=t.size}function jn(e,t){var n=Pa(e),r=!n&&Ra(e),i=!n&&!r&&ja(e),o=!n&&!r&&!i&&Qa(e),a=n||r||i||o,l=a?St(e.length,ge):[],u=l.length;for(var c in e)!t&&!Ce.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||oo(c,u))||l.push(c);return l}function Bn(e){var t=e.length;return t?e[Mr(0,t-1)]:void 0}function Fn(e,t){return Oo(gi(e),$n(t,0,e.length))}function Vn(e){return Oo(gi(e))}function zn(e,t,n){(void 0!==n&&!xa(e[t],n)||void 0===n&&!(t in e))&&Zn(e,t,n)}function Wn(e,t,n){var r=e[t];Ce.call(e,t)&&xa(r,n)&&(void 0!==n||t in e)||Zn(e,t,n)}function Hn(e,t){for(var n=e.length;n--;)if(xa(e[n][0],t))return n;return-1}function Gn(e,t,n,r){return er(e,function(e,i,o){t(r,e,n(e),o)}),r}function qn(e,t){return e&&hi(t,bl(t),e)}function Zn(e,t,n){"__proto__"==t&&Xt?Xt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Xn(e,t){for(var n=-1,r=t.length,i=Z(r),o=null==e;++n<r;)i[n]=o?void 0:gl(e,t[n]);return i}function $n(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Yn(e,t,n,r,i,a){var c,y=1&t,x=2&t,A=4&t;if(n&&(c=i?n(e,r,i,a):n(e)),void 0!==c)return c;if(!Ha(e))return e;var L=Pa(e);if(L){if(c=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ce.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!y)return gi(e,c)}else{var R=to(e),P=R==s||R==d;if(ja(e))return si(e,y);if(R==m||R==o||P&&!i){if(c=x||P?{}:ro(e),!y)return x?function(e,t){return hi(e,eo(e),t)}(e,function(e,t){return e&&hi(t,Cl(t),e)}(c,e)):function(e,t){return hi(e,Qi(e),t)}(e,qn(c,e))}else{if(!Ue[R])return i?e:{};c=function(e,t,n){var r=e.constructor;switch(t){case _:return di(e);case l:case u:return new r(+e);case b:return function(e,t){var n=t?di(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case C:case O:case w:case S:case N:case I:case"[object Uint8ClampedArray]":case D:case T:return fi(e,n);case f:return new r;case v:case h:return new r(e);case p:return function(e){var t=new e.constructor(e.source,te.exec(e));return t.lastIndex=e.lastIndex,t}(e);case g:return new r;case E:return Nn?me(Nn.call(e)):{}}}(e,R,y)}}a||(a=new Un);var M=a.get(e);if(M)return M;a.set(e,c),Ya(e)?e.forEach(function(r){c.add(Yn(r,t,n,r,e,a))}):qa(e)&&e.forEach(function(r,i){c.set(i,Yn(r,t,n,i,e,a))});var k=L?void 0:(A?x?Gi:Hi:x?Cl:bl)(e);return rt(k||e,function(r,i){k&&(r=e[i=r]),Wn(c,i,Yn(r,t,n,i,e,a))}),c}function Kn(e,t,n){var r=n.length;if(null==e)return!r;for(e=me(e);r--;){var i=n[r],o=e[i];if(void 0===o&&!(i in e)||!(0,t[i])(o))return!1}return!0}function Jn(e,t,r){if("function"!=typeof e)throw new he(n);return yo(function(){e.apply(void 0,r)},t)}function Qn(e,t,n,r){var i=-1,o=lt,a=!0,l=e.length,u=[],c=t.length;if(!l)return u;n&&(t=ct(t,It(n))),r?(o=ut,a=!1):t.length>=200&&(o=Tt,a=!1,t=new kn(t));e:for(;++i<l;){var s=e[i],d=null==n?s:n(s);if(s=r||0!==s?s:0,a&&d==d){for(var f=c;f--;)if(t[f]===d)continue e;u.push(s)}else o(t,d,r)||u.push(s)}return u}Dn.templateSettings={escape:U,evaluate:j,interpolate:B,variable:"",imports:{_:Dn}},(Dn.prototype=xn.prototype).constructor=Dn,(An.prototype=Tn(xn.prototype)).constructor=An,(Ln.prototype=Tn(xn.prototype)).constructor=Ln,Rn.prototype.clear=function(){this.__data__=hn?hn(null):{},this.size=0},Rn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Rn.prototype.get=function(e){var t=this.__data__;if(hn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ce.call(t,e)?t[e]:void 0},Rn.prototype.has=function(e){var t=this.__data__;return hn?void 0!==t[e]:Ce.call(t,e)},Rn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=hn&&void 0===t?"__lodash_hash_undefined__":t,this},Pn.prototype.clear=function(){this.__data__=[],this.size=0},Pn.prototype.delete=function(e){var t=this.__data__,n=Hn(t,e);return!(n<0||(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,0))},Pn.prototype.get=function(e){var t=this.__data__,n=Hn(t,e);return n<0?void 0:t[n][1]},Pn.prototype.has=function(e){return Hn(this.__data__,e)>-1},Pn.prototype.set=function(e,t){var n=this.__data__,r=Hn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Mn.prototype.clear=function(){this.size=0,this.__data__={hash:new Rn,map:new(vn||Pn),string:new Rn}},Mn.prototype.delete=function(e){var t=Yi(this,e).delete(e);return this.size-=t?1:0,t},Mn.prototype.get=function(e){return Yi(this,e).get(e)},Mn.prototype.has=function(e){return Yi(this,e).has(e)},Mn.prototype.set=function(e,t){var n=Yi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},kn.prototype.add=kn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},kn.prototype.has=function(e){return this.__data__.has(e)},Un.prototype.clear=function(){this.__data__=new Pn,this.size=0},Un.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Un.prototype.get=function(e){return this.__data__.get(e)},Un.prototype.has=function(e){return this.__data__.has(e)},Un.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Pn){var r=n.__data__;if(!vn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Mn(r)}return n.set(e,t),this.size=n.size,this};var er=_i(ur),tr=_i(cr,!0);function nr(e,t){var n=!0;return er(e,function(e,r,i){return n=!!t(e,r,i)}),n}function rr(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],a=t(o);if(null!=a&&(void 0===l?a==a&&!Ja(a):n(a,l)))var l=a,u=o}return u}function ir(e,t){var n=[];return er(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function or(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=io),i||(i=[]);++o<a;){var l=e[o];t>0&&n(l)?t>1?or(l,t-1,n,r,i):st(i,l):r||(i[i.length]=l)}return i}var ar=bi(),lr=bi(!0);function ur(e,t){return e&&ar(e,t,bl)}function cr(e,t){return e&&lr(e,t,bl)}function sr(e,t){return at(t,function(t){return Va(e[t])})}function dr(e,t){for(var n=0,r=(t=ai(t,e)).length;null!=e&&n<r;)e=e[Io(t[n++])];return n&&n==r?e:void 0}function fr(e,t,n){var r=t(e);return Pa(e)?r:st(r,n(e))}function vr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Zt&&Zt in me(e)?function(e){var t=Ce.call(e,Zt),n=e[Zt];try{e[Zt]=void 0;var r=!0}catch(e){}var i=Se.call(e);return r&&(t?e[Zt]=n:delete e[Zt]),i}(e):function(e){return Se.call(e)}(e)}function mr(e,t){return e>t}function pr(e,t){return null!=e&&Ce.call(e,t)}function gr(e,t){return null!=e&&t in me(e)}function hr(e,t,n){for(var r=n?ut:lt,i=e[0].length,o=e.length,a=o,l=Z(o),u=Infinity,c=[];a--;){var s=e[a];a&&t&&(s=ct(s,It(t))),u=ln(s.length,u),l[a]=!n&&(t||i>=120&&s.length>=120)?new kn(a&&s):void 0}s=e[0];var d=-1,f=l[0];e:for(;++d<i&&c.length<u;){var v=s[d],m=t?t(v):v;if(v=n||0!==v?v:0,!(f?Tt(f,m):r(c,m,n))){for(a=o;--a;){var p=l[a];if(!(p?Tt(p,m):r(e[a],m,n)))continue e}f&&f.push(m),c.push(v)}}return c}function Er(e,t,n){var r=null==(e=po(e,t=ai(t,e)))?e:e[Io(Fo(t))];return null==r?void 0:tt(r,e,n)}function yr(e){return Ga(e)&&vr(e)==o}function _r(e,t,n,r,i){return e===t||(null==e||null==t||!Ga(e)&&!Ga(t)?e!=e&&t!=t:function(e,t,n,r,i,s){var d=Pa(e),y=Pa(t),C=d?a:to(e),O=y?a:to(t),w=(C=C==o?m:C)==m,S=(O=O==o?m:O)==m,N=C==O;if(N&&ja(e)){if(!ja(t))return!1;d=!0,w=!1}if(N&&!w)return s||(s=new Un),d||Qa(e)?zi(e,t,n,r,i,s):function(e,t,n,r,i,o,a){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!o(new Ve(e),new Ve(t)));case l:case u:case v:return xa(+e,+t);case c:return e.name==t.name&&e.message==t.message;case p:case h:return e==t+"";case f:var s=Ut;case g:if(s||(s=Ft),e.size!=t.size&&!(1&r))return!1;var d=a.get(e);if(d)return d==t;r|=2,a.set(e,t);var m=zi(s(e),s(t),r,i,o,a);return a.delete(e),m;case E:if(Nn)return Nn.call(e)==Nn.call(t)}return!1}(e,t,C,n,r,i,s);if(!(1&n)){var I=w&&Ce.call(e,"__wrapped__"),D=S&&Ce.call(t,"__wrapped__");if(I||D){var T=I?e.value():e,x=D?t.value():t;return s||(s=new Un),i(T,x,n,r,s)}}return!!N&&(s||(s=new Un),function(e,t,n,r,i,o){var a=1&n,l=Hi(e),u=l.length;if(u!=Hi(t).length&&!a)return!1;for(var c=u;c--;){var s=l[c];if(!(a?s in t:Ce.call(t,s)))return!1}var d=o.get(e),f=o.get(t);if(d&&f)return d==t&&f==e;var v=!0;o.set(e,t),o.set(t,e);for(var m=a;++c<u;){var p=e[s=l[c]],g=t[s];if(r)var h=a?r(g,p,s,t,e,o):r(p,g,s,e,t,o);if(!(void 0===h?p===g||i(p,g,n,r,o):h)){v=!1;break}m||(m="constructor"==s)}if(v&&!m){var E=e.constructor,y=t.constructor;E==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof E&&E instanceof E&&"function"==typeof y&&y instanceof y||(v=!1)}return o.delete(e),o.delete(t),v}(e,t,n,r,i,s))}(e,t,n,r,_r,i))}function br(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=me(e);i--;){var l=n[i];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<o;){var u=(l=n[i])[0],c=e[u],s=l[1];if(a&&l[2]){if(void 0===c&&!(u in e))return!1}else{var d=new Un;if(r)var f=r(c,s,u,e,t,d);if(!(void 0===f?_r(s,c,3,r,d):f))return!1}}return!0}function Cr(e){return!(!Ha(e)||(t=e,we&&we in t))&&(Va(e)?xe:ie).test(Do(e));var t}function Or(e){return"function"==typeof e?e:null==e?Zl:"object"==typeof e?Pa(e)?Dr(e[0],e[1]):Ir(e):nu(e)}function wr(e){if(!so(e))return on(e);var t=[];for(var n in me(e))Ce.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Sr(e,t){return e<t}function Nr(e,t){var n=-1,r=ka(e)?Z(e.length):[];return er(e,function(e,i,o){r[++n]=t(e,i,o)}),r}function Ir(e){var t=Ki(e);return 1==t.length&&t[0][2]?vo(t[0][0],t[0][1]):function(n){return n===e||br(n,e,t)}}function Dr(e,t){return lo(e)&&fo(t)?vo(Io(e),t):function(n){var r=gl(n,e);return void 0===r&&r===t?hl(n,e):_r(t,r,3)}}function Tr(e,t,n,r,i){e!==t&&ar(t,function(o,a){if(i||(i=new Un),Ha(o))!function(e,t,n,r,i,o,a){var l=ho(e,n),u=ho(t,n),c=a.get(u);if(c)zn(e,n,c);else{var s=o?o(l,u,n+"",e,t,a):void 0,d=void 0===s;if(d){var f=Pa(u),v=!f&&ja(u),m=!f&&!v&&Qa(u);s=u,f||v||m?Pa(l)?s=l:Ua(l)?s=gi(l):v?(d=!1,s=si(u,!0)):m?(d=!1,s=fi(u,!0)):s=[]:Xa(u)||Ra(u)?(s=l,Ra(l)?s=ll(l):Ha(l)&&!Va(l)||(s=ro(u))):d=!1}d&&(a.set(u,s),i(s,u,r,o,a),a.delete(u)),zn(e,n,s)}}(e,t,a,n,Tr,r,i);else{var l=r?r(ho(e,a),o,a+"",e,t,i):void 0;void 0===l&&(l=o),zn(e,a,l)}},Cl)}function xr(e,t){var n=e.length;if(n)return oo(t+=t<0?n:0,n)?e[t]:void 0}function Ar(e,t,n){t=t.length?ct(t,function(e){return Pa(e)?function(t){return dr(t,1===e.length?e[0]:e)}:e}):[Zl];var r=-1;return t=ct(t,It($i())),function(e,t){var r=e.length;for(e.sort(function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,l=n.length;++r<a;){var u=vi(i[r],o[r]);if(u)return r>=l?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});r--;)e[r]=e[r].value;return e}(Nr(e,function(e,n,i){return{criteria:ct(t,function(t){return t(e)}),index:++r,value:e}}))}function Lr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],l=dr(e,a);n(l,a)&&Fr(o,ai(a,e),l)}return o}function Rr(e,t,n,r){var i=r?Et:ht,o=-1,a=t.length,l=e;for(e===t&&(t=gi(t)),n&&(l=ct(e,It(n)));++o<a;)for(var u=0,c=t[o],s=n?n(c):c;(u=i(l,s,u,r))>-1;)l!==e&&Xe.call(l,u,1),Xe.call(e,u,1);return e}function Pr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;oo(i)?Xe.call(e,i,1):Jr(e,i)}}return e}function Mr(e,t){return e+Qt(sn()*(t-e+1))}function kr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Qt(t/2))&&(e+=e)}while(t);return n}function Ur(e,t){return _o(mo(e,t,Zl),e+"")}function jr(e){return Bn(xl(e))}function Br(e,t){var n=xl(e);return Oo(n,$n(t,0,n.length))}function Fr(e,t,n,r){if(!Ha(e))return e;for(var i=-1,o=(t=ai(t,e)).length,a=o-1,l=e;null!=l&&++i<o;){var u=Io(t[i]),c=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(i!=a){var s=l[u];void 0===(c=r?r(s,u,l):void 0)&&(c=Ha(s)?s:oo(t[i+1])?[]:{})}Wn(l,u,c),l=l[u]}return e}var Vr=En?function(e,t){return En.set(e,t),e}:Zl,zr=Xt?function(e,t){return Xt(e,"toString",{configurable:!0,enumerable:!1,value:Hl(t),writable:!0})}:Zl;function Wr(e){return Oo(xl(e))}function Hr(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Z(i);++r<i;)o[r]=e[r+t];return o}function Gr(e,t){var n;return er(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}function qr(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!Ja(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return Zr(e,t,Zl,n)}function Zr(e,t,n,r){var i=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=n(t))!=t,l=null===t,u=Ja(t),c=void 0===t;i<o;){var s=Qt((i+o)/2),d=n(e[s]),f=void 0!==d,v=null===d,m=d==d,p=Ja(d);if(a)var g=r||m;else g=c?m&&(r||f):l?m&&f&&(r||!v):u?m&&f&&!v&&(r||!p):!v&&!p&&(r?d<=t:d<t);g?i=s+1:o=s}return ln(o,4294967294)}function Xr(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],l=t?t(a):a;if(!n||!xa(l,u)){var u=l;o[i++]=0===a?0:a}}return o}function $r(e){return"number"==typeof e?e:Ja(e)?NaN:+e}function Yr(e){if("string"==typeof e)return e;if(Pa(e))return ct(e,Yr)+"";if(Ja(e))return In?In.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Kr(e,t,n){var r=-1,i=lt,o=e.length,a=!0,l=[],u=l;if(n)a=!1,i=ut;else if(o>=200){var c=t?null:ki(e);if(c)return Ft(c);a=!1,i=Tt,u=new kn}else u=t?[]:l;e:for(;++r<o;){var s=e[r],d=t?t(s):s;if(s=n||0!==s?s:0,a&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),l.push(s)}else i(u,d,n)||(u!==l&&u.push(d),l.push(s))}return l}function Jr(e,t){return null==(e=po(e,t=ai(t,e)))||delete e[Io(Fo(t))]}function Qr(e,t,n,r){return Fr(e,t,n(dr(e,t)),r)}function ei(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?Hr(e,r?0:o,r?o+1:i):Hr(e,r?o+1:0,r?i:o)}function ti(e,t){var n=e;return n instanceof Ln&&(n=n.value()),dt(t,function(e,t){return t.func.apply(t.thisArg,st([e],t.args))},n)}function ni(e,t,n){var r=e.length;if(r<2)return r?Kr(e[0]):[];for(var i=-1,o=Z(r);++i<r;)for(var a=e[i],l=-1;++l<r;)l!=i&&(o[i]=Qn(o[i]||a,e[l],t,n));return Kr(or(o,1),t,n)}function ri(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r<i;)n(a,e[r],r<o?t[r]:void 0);return a}function ii(e){return Ua(e)?e:[]}function oi(e){return"function"==typeof e?e:Zl}function ai(e,t){return Pa(e)?e:lo(e,t)?[e]:No(ul(e))}var li=Ur;function ui(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Hr(e,t,n)}var ci=$t||function(e){return We.clearTimeout(e)};function si(e,t){if(t)return e.slice();var n=e.length,r=ze?ze(n):new e.constructor(n);return e.copy(r),r}function di(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function fi(e,t){var n=t?di(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function vi(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=Ja(e),a=void 0!==t,l=null===t,u=t==t,c=Ja(t);if(!l&&!c&&!o&&e>t||o&&a&&u&&!l&&!c||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!c&&e<t||c&&n&&i&&!r&&!o||l&&n&&i||!a&&i||!u)return-1}return 0}function mi(e,t,n,r){for(var i=-1,o=e.length,a=n.length,l=-1,u=t.length,c=an(o-a,0),s=Z(u+c),d=!r;++l<u;)s[l]=t[l];for(;++i<a;)(d||i<o)&&(s[n[i]]=e[i]);for(;c--;)s[l++]=e[i++];return s}function pi(e,t,n,r){for(var i=-1,o=e.length,a=-1,l=n.length,u=-1,c=t.length,s=an(o-l,0),d=Z(s+c),f=!r;++i<s;)d[i]=e[i];for(var v=i;++u<c;)d[v+u]=t[u];for(;++a<l;)(f||i<o)&&(d[v+n[a]]=e[i++]);return d}function gi(e,t){var n=-1,r=e.length;for(t||(t=Z(r));++n<r;)t[n]=e[n];return t}function hi(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var l=t[o],u=r?r(n[l],e[l],l,n,e):void 0;void 0===u&&(u=e[l]),i?Zn(n,l,u):Wn(n,l,u)}return n}function Ei(e,t){return function(n,r){var i=Pa(n)?nt:Gn,o=t?t():{};return i(n,e,$i(r,2),o)}}function yi(e){return Ur(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&ao(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=me(t);++r<i;){var l=n[r];l&&e(t,l,r,o)}return t})}function _i(e,t){return function(n,r){if(null==n)return n;if(!ka(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=me(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function bi(e){return function(t,n,r){for(var i=-1,o=me(t),a=r(t),l=a.length;l--;){var u=a[e?l:++i];if(!1===n(o[u],u,o))break}return t}}function Ci(e){return function(t){var n=kt(t=ul(t))?Wt(t):void 0,r=n?n[0]:t.charAt(0),i=n?ui(n,1).join(""):t.slice(1);return r[e]()+i}}function Oi(e){return function(t){return dt(Vl(Rl(t).replace(De,"")),e,"")}}function wi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Tn(e.prototype),r=e.apply(n,t);return Ha(r)?r:n}}function Si(e){return function(t,n,r){var i=me(t);if(!ka(t)){var o=$i(n,3);t=bl(t),n=function(e){return o(i[e],e,i)}}var a=e(t,n,r);return a>-1?i[o?t[a]:a]:void 0}}function Ni(e){return Wi(function(t){var r=t.length,i=r,o=An.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new he(n);if(o&&!l&&"wrapper"==Zi(a))var l=new An([],!0)}for(i=l?i:r;++i<r;){var u=Zi(a=t[i]),c="wrapper"==u?qi(a):void 0;l=c&&uo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?l[Zi(c[0])].apply(l,c[3]):1==a.length&&uo(a)?l[u]():l.thru(a)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&Pa(n))return l.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}})}function Ii(e,t,n,r,i,o,a,l,u,c){var s=128&t,d=1&t,f=2&t,v=24&t,m=512&t,p=f?void 0:wi(e);return function g(){for(var h=arguments.length,E=Z(h),y=h;y--;)E[y]=arguments[y];if(v)var _=Xi(g),b=Lt(E,_);if(r&&(E=mi(E,r,i,v)),o&&(E=pi(E,o,a,v)),h-=b,v&&h<c){var C=Bt(E,_);return Pi(e,t,Ii,g.placeholder,n,E,C,l,u,c-h)}var O=d?n:this,w=f?O[e]:e;return h=E.length,l?E=go(E,l):m&&h>1&&E.reverse(),s&&u<h&&(E.length=u),this&&this!==We&&this instanceof g&&(w=p||wi(w)),w.apply(O,E)}}function Di(e,t){return function(n,r){return function(e,t,n,r){return ur(e,function(e,i,o){t(r,n(e),i,o)}),r}(n,e,t(r),{})}}function Ti(e,t){return function(n,r){var i;if(void 0===n&&void 0===r)return t;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;"string"==typeof n||"string"==typeof r?(n=Yr(n),r=Yr(r)):(n=$r(n),r=$r(r)),i=e(n,r)}return i}}function xi(e){return Wi(function(t){return t=ct(t,It($i())),Ur(function(n){var r=this;return e(t,function(e){return tt(e,r,n)})})})}function Ai(e,t){var n=(t=void 0===t?" ":Yr(t)).length;if(n<2)return n?kr(t,e):t;var r=kr(t,Jt(e/zt(t)));return kt(t)?ui(Wt(r),0,e).join(""):r.slice(0,e)}function Li(e){return function(t,n,r){return r&&"number"!=typeof r&&ao(t,n,r)&&(n=r=void 0),t=rl(t),void 0===n?(n=t,t=0):n=rl(n),function(e,t,n,r){for(var i=-1,o=an(Jt((t-e)/(n||1)),0),a=Z(o);o--;)a[r?o:++i]=e,e+=n;return a}(t,n,r=void 0===r?t<n?1:-1:rl(r),e)}}function Ri(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=al(t),n=al(n)),e(t,n)}}function Pi(e,t,n,r,i,o,a,l,u,c){var s=8&t;t|=s?32:64,4&(t&=~(s?64:32))||(t&=-4);var d=[e,t,i,s?o:void 0,s?a:void 0,s?void 0:o,s?void 0:a,l,u,c],f=n.apply(void 0,d);return uo(e)&&Eo(f,d),f.placeholder=r,bo(f,e,t)}function Mi(e){var t=ve[e];return function(e,n){if(e=al(e),(n=null==n?0:ln(il(n),292))&&nn(e)){var r=(ul(e)+"e").split("e");return+((r=(ul(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var ki=pn&&1/Ft(new pn([,-0]))[1]==1/0?function(e){return new pn(e)}:Jl;function Ui(e){return function(t){var n=to(t);return n==f?Ut(t):n==g?Vt(t):function(e,t){return ct(t,function(t){return[t,e[t]]})}(t,e(t))}}function ji(e,t,i,o,a,l,u,c){var s=2&t;if(!s&&"function"!=typeof e)throw new he(n);var d=o?o.length:0;if(d||(t&=-97,o=a=void 0),u=void 0===u?u:an(il(u),0),c=void 0===c?c:il(c),d-=a?a.length:0,64&t){var f=o,v=a;o=a=void 0}var m=s?void 0:qi(e),p=[e,t,i,o,a,f,v,l,u,c];if(m&&function(e,t){var n=e[1],i=t[1],o=n|i;if(!(o<131||128==i&&8==n||128==i&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n))return e;1&i&&(e[2]=t[2],o|=1&n?0:4);var a=t[3];if(a){var l=e[3];e[3]=l?mi(l,a,t[4]):a,e[4]=l?Bt(e[3],r):t[4]}(a=t[5])&&(e[5]=(l=e[5])?pi(l,a,t[6]):a,e[6]=l?Bt(e[5],r):t[6]),(a=t[7])&&(e[7]=a),128&i&&(e[8]=null==e[8]?t[8]:ln(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(p,m),e=p[0],t=p[1],i=p[2],o=p[3],a=p[4],!(c=p[9]=void 0===p[9]?s?0:e.length:an(p[9]-d,0))&&24&t&&(t&=-25),t&&1!=t)g=8==t||16==t?function(e,t,n){var r=wi(e);return function i(){for(var o=arguments.length,a=Z(o),l=o,u=Xi(i);l--;)a[l]=arguments[l];var c=o<3&&a[0]!==u&&a[o-1]!==u?[]:Bt(a,u);if((o-=c.length)<n)return Pi(e,t,Ii,i.placeholder,void 0,a,c,void 0,void 0,n-o);var s=this&&this!==We&&this instanceof i?r:e;return tt(s,this,a)}}(e,t,c):32!=t&&33!=t||a.length?Ii.apply(void 0,p):function(e,t,n,r){var i=1&t,o=wi(e);return function t(){for(var a=-1,l=arguments.length,u=-1,c=r.length,s=Z(c+l),d=this&&this!==We&&this instanceof t?o:e;++u<c;)s[u]=r[u];for(;l--;)s[u++]=arguments[++a];return tt(d,i?n:this,s)}}(e,t,i,o);else var g=function(e,t,n){var r=1&t,i=wi(e);return function t(){var o=this&&this!==We&&this instanceof t?i:e;return o.apply(r?n:this,arguments)}}(e,t,i);return bo((m?Vr:Eo)(g,p),e,t)}function Bi(e,t,n,r){return void 0===e||xa(e,ye[n])&&!Ce.call(r,n)?t:e}function Fi(e,t,n,r,i,o){return Ha(e)&&Ha(t)&&(o.set(t,e),Tr(e,t,void 0,Fi,o),o.delete(t)),e}function Vi(e){return Xa(e)?void 0:e}function zi(e,t,n,r,i,o){var a=1&n,l=e.length,u=t.length;if(l!=u&&!(a&&u>l))return!1;var c=o.get(e),s=o.get(t);if(c&&s)return c==t&&s==e;var d=-1,f=!0,v=2&n?new kn:void 0;for(o.set(e,t),o.set(t,e);++d<l;){var m=e[d],p=t[d];if(r)var g=a?r(p,m,d,t,e,o):r(m,p,d,e,t,o);if(void 0!==g){if(g)continue;f=!1;break}if(v){if(!vt(t,function(e,t){if(!Tt(v,t)&&(m===e||i(m,e,n,r,o)))return v.push(t)})){f=!1;break}}else if(m!==p&&!i(m,p,n,r,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function Wi(e){return _o(mo(e,void 0,Mo),e+"")}function Hi(e){return fr(e,bl,Qi)}function Gi(e){return fr(e,Cl,eo)}var qi=En?function(e){return En.get(e)}:Jl;function Zi(e){for(var t=e.name+"",n=yn[t],r=Ce.call(yn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Xi(e){return(Ce.call(Dn,"placeholder")?Dn:e).placeholder}function $i(){var e=Dn.iteratee||Xl;return e=e===Xl?Or:e,arguments.length?e(arguments[0],arguments[1]):e}function Yi(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Ki(e){for(var t=bl(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,fo(i)]}return t}function Ji(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Cr(n)?n:void 0}var Qi=en?function(e){return null==e?[]:(e=me(e),at(en(e),function(t){return Ze.call(e,t)}))}:ou,eo=en?function(e){for(var t=[];e;)st(t,Qi(e)),e=He(e);return t}:ou,to=vr;function no(e,t,n){for(var r=-1,i=(t=ai(t,e)).length,o=!1;++r<i;){var a=Io(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Wa(i)&&oo(a,i)&&(Pa(e)||Ra(e))}function ro(e){return"function"!=typeof e.constructor||so(e)?{}:Tn(He(e))}function io(e){return Pa(e)||Ra(e)||!!(mt&&e&&e[mt])}function oo(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ae.test(e))&&e>-1&&e%1==0&&e<t}function ao(e,t,n){if(!Ha(n))return!1;var r=typeof t;return!!("number"==r?ka(n)&&oo(t,n.length):"string"==r&&t in n)&&xa(n[t],e)}function lo(e,t){if(Pa(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ja(e))||V.test(e)||!F.test(e)||null!=t&&e in me(t)}function uo(e){var t=Zi(e),n=Dn[t];if("function"!=typeof n||!(t in Ln.prototype))return!1;if(e===n)return!0;var r=qi(n);return!!r&&e===r[0]}(fn&&to(new fn(new ArrayBuffer(1)))!=b||vn&&to(new vn)!=f||mn&&"[object Promise]"!=to(mn.resolve())||pn&&to(new pn)!=g||gn&&to(new gn)!=y)&&(to=function(e){var t=vr(e),n=t==m?e.constructor:void 0,r=n?Do(n):"";if(r)switch(r){case _n:return b;case bn:return f;case Cn:return"[object Promise]";case On:return g;case wn:return y}return t});var co=_e?Va:au;function so(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ye)}function fo(e){return e==e&&!Ha(e)}function vo(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in me(n))}}function mo(e,t,n){return t=an(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=an(r.length-t,0),a=Z(o);++i<o;)a[i]=r[t+i];i=-1;for(var l=Z(t+1);++i<t;)l[i]=r[i];return l[t]=n(a),tt(e,this,l)}}function po(e,t){return t.length<2?e:dr(e,Hr(t,0,-1))}function go(e,t){for(var n=e.length,r=ln(t.length,n),i=gi(e);r--;){var o=t[r];e[r]=oo(o,n)?i[o]:void 0}return e}function ho(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Eo=Co(Vr),yo=Kt||function(e,t){return We.setTimeout(e,t)},_o=Co(zr);function bo(e,t,n){var r=t+"";return _o(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(X,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return rt(i,function(n){var r="_."+n[0];t&n[1]&&!lt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match($);return t?t[1].split(Y):[]}(r),n)))}function Co(e){var t=0,n=0;return function(){var r=un(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Oo(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n<t;){var o=Mr(n,i),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}var wo,So,No=(wo=wa(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(z,function(e,n,r,i){t.push(r?i.replace(Q,"$1"):n||e)}),t},function(e){return 500===So.size&&So.clear(),e}),So=wo.cache,wo);function Io(e){if("string"==typeof e||Ja(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Do(e){if(null!=e){try{return be.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function To(e){if(e instanceof Ln)return e.clone();var t=new An(e.__wrapped__,e.__chain__);return t.__actions__=gi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var xo=Ur(function(e,t){return Ua(e)?Qn(e,or(t,1,Ua,!0)):[]}),Ao=Ur(function(e,t){var n=Fo(t);return Ua(n)&&(n=void 0),Ua(e)?Qn(e,or(t,1,Ua,!0),$i(n,2)):[]}),Lo=Ur(function(e,t){var n=Fo(t);return Ua(n)&&(n=void 0),Ua(e)?Qn(e,or(t,1,Ua,!0),void 0,n):[]});function Ro(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:il(n);return i<0&&(i=an(r+i,0)),gt(e,$i(t,3),i)}function Po(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=il(n),i=n<0?an(r+i,0):ln(i,r-1)),gt(e,$i(t,3),i,!0)}function Mo(e){return null!=e&&e.length?or(e,1):[]}function ko(e){return e&&e.length?e[0]:void 0}var Uo=Ur(function(e){var t=ct(e,ii);return t.length&&t[0]===e[0]?hr(t):[]}),jo=Ur(function(e){var t=Fo(e),n=ct(e,ii);return t===Fo(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?hr(n,$i(t,2)):[]}),Bo=Ur(function(e){var t=Fo(e),n=ct(e,ii);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?hr(n,void 0,t):[]});function Fo(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Vo=Ur(zo);function zo(e,t){return e&&e.length&&t&&t.length?Rr(e,t):e}var Wo=Wi(function(e,t){var n=null==e?0:e.length,r=Xn(e,t);return Pr(e,ct(t,function(e){return oo(e,n)?+e:e}).sort(vi)),r});function Ho(e){return null==e?e:dn.call(e)}var Go=Ur(function(e){return Kr(or(e,1,Ua,!0))}),qo=Ur(function(e){var t=Fo(e);return Ua(t)&&(t=void 0),Kr(or(e,1,Ua,!0),$i(t,2))}),Zo=Ur(function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,Kr(or(e,1,Ua,!0),void 0,t)});function Xo(e){if(!e||!e.length)return[];var t=0;return e=at(e,function(e){if(Ua(e))return t=an(e.length,t),!0}),St(t,function(t){return ct(e,bt(t))})}function $o(e,t){if(!e||!e.length)return[];var n=Xo(e);return null==t?n:ct(n,function(e){return tt(t,void 0,e)})}var Yo=Ur(function(e,t){return Ua(e)?Qn(e,t):[]}),Ko=Ur(function(e){return ni(at(e,Ua))}),Jo=Ur(function(e){var t=Fo(e);return Ua(t)&&(t=void 0),ni(at(e,Ua),$i(t,2))}),Qo=Ur(function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,ni(at(e,Ua),void 0,t)}),ea=Ur(Xo),ta=Ur(function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,$o(e,n)});function na(e){var t=Dn(e);return t.__chain__=!0,t}function ra(e,t){return t(e)}var ia=Wi(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Xn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Ln&&oo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ra,args:[i],thisArg:void 0}),new An(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(void 0),e})):this.thru(i)}),oa=Ei(function(e,t,n){Ce.call(e,n)?++e[n]:Zn(e,n,1)}),aa=Si(Ro),la=Si(Po);function ua(e,t){return(Pa(e)?rt:er)(e,$i(t,3))}function ca(e,t){return(Pa(e)?it:tr)(e,$i(t,3))}var sa=Ei(function(e,t,n){Ce.call(e,n)?e[n].push(t):Zn(e,n,[t])}),da=Ur(function(e,t,n){var r=-1,i="function"==typeof t,o=ka(e)?Z(e.length):[];return er(e,function(e){o[++r]=i?tt(t,e,n):Er(e,t,n)}),o}),fa=Ei(function(e,t,n){Zn(e,n,t)});function va(e,t){return(Pa(e)?ct:Nr)(e,$i(t,3))}var ma=Ei(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),pa=Ur(function(e,t){if(null==e)return[];var n=t.length;return n>1&&ao(e,t[0],t[1])?t=[]:n>2&&ao(t[0],t[1],t[2])&&(t=[t[0]]),Ar(e,or(t,1),[])}),ga=Yt||function(){return We.Date.now()};function ha(e,t,n){return t=n?void 0:t,ji(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function Ea(e,t){var r;if("function"!=typeof t)throw new he(n);return e=il(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}var ya=Ur(function(e,t,n){var r=1;if(n.length){var i=Bt(n,Xi(ya));r|=32}return ji(e,r,t,n,i)}),_a=Ur(function(e,t,n){var r=3;if(n.length){var i=Bt(n,Xi(_a));r|=32}return ji(t,r,e,n,i)});function ba(e,t,r){var i,o,a,l,u,c,s=0,d=!1,f=!1,v=!0;if("function"!=typeof e)throw new he(n);function m(t){var n=i,r=o;return i=o=void 0,s=t,l=e.apply(r,n)}function p(e){return s=e,u=yo(h,t),d?m(e):l}function g(e){var n=e-c;return void 0===c||n>=t||n<0||f&&e-s>=a}function h(){var e=ga();if(g(e))return E(e);u=yo(h,function(e){var n=t-(e-c);return f?ln(n,a-(e-s)):n}(e))}function E(e){return u=void 0,v&&i?m(e):(i=o=void 0,l)}function y(){var e=ga(),n=g(e);if(i=arguments,o=this,c=e,n){if(void 0===u)return p(c);if(f)return ci(u),u=yo(h,t),m(c)}return void 0===u&&(u=yo(h,t)),l}return t=al(t)||0,Ha(r)&&(d=!!r.leading,a=(f="maxWait"in r)?an(al(r.maxWait)||0,t):a,v="trailing"in r?!!r.trailing:v),y.cancel=function(){void 0!==u&&ci(u),s=0,i=c=o=u=void 0},y.flush=function(){return void 0===u?l:E(ga())},y}var Ca=Ur(function(e,t){return Jn(e,1,t)}),Oa=Ur(function(e,t,n){return Jn(e,al(t)||0,n)});function wa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new he(n);var r=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return r.cache=new(wa.Cache||Mn),r}function Sa(e){if("function"!=typeof e)throw new he(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}wa.Cache=Mn;var Na=li(function(e,t){var n=(t=1==t.length&&Pa(t[0])?ct(t[0],It($i())):ct(or(t,1),It($i()))).length;return Ur(function(r){for(var i=-1,o=ln(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return tt(e,this,r)})}),Ia=Ur(function(e,t){return ji(e,32,void 0,t,Bt(t,Xi(Ia)))}),Da=Ur(function(e,t){return ji(e,64,void 0,t,Bt(t,Xi(Da)))}),Ta=Wi(function(e,t){return ji(e,256,void 0,void 0,void 0,t)});function xa(e,t){return e===t||e!=e&&t!=t}var Aa=Ri(mr),La=Ri(function(e,t){return e>=t}),Ra=yr(function(){return arguments}())?yr:function(e){return Ga(e)&&Ce.call(e,"callee")&&!Ze.call(e,"callee")},Pa=Z.isArray,Ma=$e?It($e):function(e){return Ga(e)&&vr(e)==_};function ka(e){return null!=e&&Wa(e.length)&&!Va(e)}function Ua(e){return Ga(e)&&ka(e)}var ja=tn||au,Ba=Ye?It(Ye):function(e){return Ga(e)&&vr(e)==u};function Fa(e){if(!Ga(e))return!1;var t=vr(e);return t==c||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Xa(e)}function Va(e){if(!Ha(e))return!1;var t=vr(e);return t==s||t==d||"[object AsyncFunction]"==t||"[object Proxy]"==t}function za(e){return"number"==typeof e&&e==il(e)}function Wa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Ha(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ga(e){return null!=e&&"object"==typeof e}var qa=Ke?It(Ke):function(e){return Ga(e)&&to(e)==f};function Za(e){return"number"==typeof e||Ga(e)&&vr(e)==v}function Xa(e){if(!Ga(e)||vr(e)!=m)return!1;var t=He(e);if(null===t)return!0;var n=Ce.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&be.call(n)==Ne}var $a=Je?It(Je):function(e){return Ga(e)&&vr(e)==p},Ya=Qe?It(Qe):function(e){return Ga(e)&&to(e)==g};function Ka(e){return"string"==typeof e||!Pa(e)&&Ga(e)&&vr(e)==h}function Ja(e){return"symbol"==typeof e||Ga(e)&&vr(e)==E}var Qa=et?It(et):function(e){return Ga(e)&&Wa(e.length)&&!!ke[vr(e)]},el=Ri(Sr),tl=Ri(function(e,t){return e<=t});function nl(e){if(!e)return[];if(ka(e))return Ka(e)?Wt(e):gi(e);if(Ct&&e[Ct])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ct]());var t=to(e);return(t==f?Ut:t==g?Ft:xl)(e)}function rl(e){return e?(e=al(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function il(e){var t=rl(e),n=t%1;return t==t?n?t-n:t:0}function ol(e){return e?$n(il(e),0,4294967295):0}function al(e){if("number"==typeof e)return e;if(Ja(e))return NaN;if(Ha(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ha(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Nt(e);var n=re.test(e);return n||oe.test(e)?Fe(e.slice(2),n?2:8):ne.test(e)?NaN:+e}function ll(e){return hi(e,Cl(e))}function ul(e){return null==e?"":Yr(e)}var cl=yi(function(e,t){if(so(t)||ka(t))hi(t,bl(t),e);else for(var n in t)Ce.call(t,n)&&Wn(e,n,t[n])}),sl=yi(function(e,t){hi(t,Cl(t),e)}),dl=yi(function(e,t,n,r){hi(t,Cl(t),e,r)}),fl=yi(function(e,t,n,r){hi(t,bl(t),e,r)}),vl=Wi(Xn),ml=Ur(function(e,t){e=me(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&ao(t[0],t[1],i)&&(r=1);++n<r;)for(var o=t[n],a=Cl(o),l=-1,u=a.length;++l<u;){var c=a[l],s=e[c];(void 0===s||xa(s,ye[c])&&!Ce.call(e,c))&&(e[c]=o[c])}return e}),pl=Ur(function(e){return e.push(void 0,Fi),tt(wl,void 0,e)});function gl(e,t,n){var r=null==e?void 0:dr(e,t);return void 0===r?n:r}function hl(e,t){return null!=e&&no(e,t,gr)}var El=Di(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Se.call(t)),e[t]=n},Hl(Zl)),yl=Di(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Se.call(t)),Ce.call(e,t)?e[t].push(n):e[t]=[n]},$i),_l=Ur(Er);function bl(e){return ka(e)?jn(e):wr(e)}function Cl(e){return ka(e)?jn(e,!0):function(e){if(!Ha(e))return function(e){var t=[];if(null!=e)for(var n in me(e))t.push(n);return t}(e);var t=so(e),n=[];for(var r in e)("constructor"!=r||!t&&Ce.call(e,r))&&n.push(r);return n}(e)}var Ol=yi(function(e,t,n){Tr(e,t,n)}),wl=yi(function(e,t,n,r){Tr(e,t,n,r)}),Sl=Wi(function(e,t){var n={};if(null==e)return n;var r=!1;t=ct(t,function(t){return t=ai(t,e),r||(r=t.length>1),t}),hi(e,Gi(e),n),r&&(n=Yn(n,7,Vi));for(var i=t.length;i--;)Jr(n,t[i]);return n}),Nl=Wi(function(e,t){return null==e?{}:function(e,t){return Lr(e,t,function(t,n){return hl(e,n)})}(e,t)});function Il(e,t){if(null==e)return{};var n=ct(Gi(e),function(e){return[e]});return t=$i(t),Lr(e,n,function(e,n){return t(e,n[0])})}var Dl=Ui(bl),Tl=Ui(Cl);function xl(e){return null==e?[]:Dt(e,bl(e))}var Al=Oi(function(e,t,n){return t=t.toLowerCase(),e+(n?Ll(t):t)});function Ll(e){return Fl(ul(e).toLowerCase())}function Rl(e){return(e=ul(e))&&e.replace(le,Rt).replace(Te,"")}var Pl=Oi(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ml=Oi(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),kl=Ci("toLowerCase"),Ul=Oi(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),jl=Oi(function(e,t,n){return e+(n?" ":"")+Fl(t)}),Bl=Oi(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Fl=Ci("toUpperCase");function Vl(e,t,n){return e=ul(e),void 0===(t=n?void 0:t)?function(e){return Re.test(e)}(e)?function(e){return e.match(Ae)||[]}(e):function(e){return e.match(K)||[]}(e):e.match(t)||[]}var zl=Ur(function(e,t){try{return tt(e,void 0,t)}catch(e){return Fa(e)?e:new de(e)}}),Wl=Wi(function(e,t){return rt(t,function(t){t=Io(t),Zn(e,t,ya(e[t],e))}),e});function Hl(e){return function(){return e}}var Gl=Ni(),ql=Ni(!0);function Zl(e){return e}function Xl(e){return Or("function"==typeof e?e:Yn(e,1))}var $l=Ur(function(e,t){return function(n){return Er(n,e,t)}}),Yl=Ur(function(e,t){return function(n){return Er(e,n,t)}});function Kl(e,t,n){var r=bl(t),i=sr(t,r);null!=n||Ha(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=sr(t,bl(t)));var o=!(Ha(n)&&"chain"in n&&!n.chain),a=Va(e);return rt(i,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=gi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,st([this.value()],arguments))})}),e}function Jl(){}var Ql=xi(ct),eu=xi(ot),tu=xi(vt);function nu(e){return lo(e)?bt(Io(e)):function(e){return function(t){return dr(t,e)}}(e)}var ru=Li(),iu=Li(!0);function ou(){return[]}function au(){return!1}var lu,uu=Ti(function(e,t){return e+t},0),cu=Mi("ceil"),su=Ti(function(e,t){return e/t},1),du=Mi("floor"),fu=Ti(function(e,t){return e*t},1),vu=Mi("round"),mu=Ti(function(e,t){return e-t},0);return Dn.after=function(e,t){if("function"!=typeof t)throw new he(n);return e=il(e),function(){if(--e<1)return t.apply(this,arguments)}},Dn.ary=ha,Dn.assign=cl,Dn.assignIn=sl,Dn.assignInWith=dl,Dn.assignWith=fl,Dn.at=vl,Dn.before=Ea,Dn.bind=ya,Dn.bindAll=Wl,Dn.bindKey=_a,Dn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Pa(e)?e:[e]},Dn.chain=na,Dn.chunk=function(e,t,n){t=(n?ao(e,t,n):void 0===t)?1:an(il(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var i=0,o=0,a=Z(Jt(r/t));i<r;)a[o++]=Hr(e,i,i+=t);return a},Dn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Dn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=Z(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return st(Pa(n)?gi(n):[n],or(t,1))},Dn.cond=function(e){var t=null==e?0:e.length,r=$i();return e=t?ct(e,function(e){if("function"!=typeof e[1])throw new he(n);return[r(e[0]),e[1]]}):[],Ur(function(n){for(var r=-1;++r<t;){var i=e[r];if(tt(i[0],this,n))return tt(i[1],this,n)}})},Dn.conforms=function(e){return function(e){var t=bl(e);return function(n){return Kn(n,e,t)}}(Yn(e,1))},Dn.constant=Hl,Dn.countBy=oa,Dn.create=function(e,t){var n=Tn(e);return null==t?n:qn(n,t)},Dn.curry=function e(t,n,r){var i=ji(t,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=e.placeholder,i},Dn.curryRight=function e(t,n,r){var i=ji(t,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=e.placeholder,i},Dn.debounce=ba,Dn.defaults=ml,Dn.defaultsDeep=pl,Dn.defer=Ca,Dn.delay=Oa,Dn.difference=xo,Dn.differenceBy=Ao,Dn.differenceWith=Lo,Dn.drop=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,(t=n||void 0===t?1:il(t))<0?0:t,r):[]},Dn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,0,(t=r-(t=n||void 0===t?1:il(t)))<0?0:t):[]},Dn.dropRightWhile=function(e,t){return e&&e.length?ei(e,$i(t,3),!0,!0):[]},Dn.dropWhile=function(e,t){return e&&e.length?ei(e,$i(t,3),!0):[]},Dn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&ao(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=il(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:il(r))<0&&(r+=i),r=n>r?0:ol(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Dn.filter=function(e,t){return(Pa(e)?at:ir)(e,$i(t,3))},Dn.flatMap=function(e,t){return or(va(e,t),1)},Dn.flatMapDeep=function(e,t){return or(va(e,t),1/0)},Dn.flatMapDepth=function(e,t,n){return n=void 0===n?1:il(n),or(va(e,t),n)},Dn.flatten=Mo,Dn.flattenDeep=function(e){return null!=e&&e.length?or(e,1/0):[]},Dn.flattenDepth=function(e,t){return null!=e&&e.length?or(e,t=void 0===t?1:il(t)):[]},Dn.flip=function(e){return ji(e,512)},Dn.flow=Gl,Dn.flowRight=ql,Dn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Dn.functions=function(e){return null==e?[]:sr(e,bl(e))},Dn.functionsIn=function(e){return null==e?[]:sr(e,Cl(e))},Dn.groupBy=sa,Dn.initial=function(e){return null!=e&&e.length?Hr(e,0,-1):[]},Dn.intersection=Uo,Dn.intersectionBy=jo,Dn.intersectionWith=Bo,Dn.invert=El,Dn.invertBy=yl,Dn.invokeMap=da,Dn.iteratee=Xl,Dn.keyBy=fa,Dn.keys=bl,Dn.keysIn=Cl,Dn.map=va,Dn.mapKeys=function(e,t){var n={};return t=$i(t,3),ur(e,function(e,r,i){Zn(n,t(e,r,i),e)}),n},Dn.mapValues=function(e,t){var n={};return t=$i(t,3),ur(e,function(e,r,i){Zn(n,r,t(e,r,i))}),n},Dn.matches=function(e){return Ir(Yn(e,1))},Dn.matchesProperty=function(e,t){return Dr(e,Yn(t,1))},Dn.memoize=wa,Dn.merge=Ol,Dn.mergeWith=wl,Dn.method=$l,Dn.methodOf=Yl,Dn.mixin=Kl,Dn.negate=Sa,Dn.nthArg=function(e){return e=il(e),Ur(function(t){return xr(t,e)})},Dn.omit=Sl,Dn.omitBy=function(e,t){return Il(e,Sa($i(t)))},Dn.once=function(e){return Ea(2,e)},Dn.orderBy=function(e,t,n,r){return null==e?[]:(Pa(t)||(t=null==t?[]:[t]),Pa(n=r?void 0:n)||(n=null==n?[]:[n]),Ar(e,t,n))},Dn.over=Ql,Dn.overArgs=Na,Dn.overEvery=eu,Dn.overSome=tu,Dn.partial=Ia,Dn.partialRight=Da,Dn.partition=ma,Dn.pick=Nl,Dn.pickBy=Il,Dn.property=nu,Dn.propertyOf=function(e){return function(t){return null==e?void 0:dr(e,t)}},Dn.pull=Vo,Dn.pullAll=zo,Dn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Rr(e,t,$i(n,2)):e},Dn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Rr(e,t,void 0,n):e},Dn.pullAt=Wo,Dn.range=ru,Dn.rangeRight=iu,Dn.rearg=Ta,Dn.reject=function(e,t){return(Pa(e)?at:ir)(e,Sa($i(t,3)))},Dn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=$i(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Pr(e,i),n},Dn.rest=function(e,t){if("function"!=typeof e)throw new he(n);return Ur(e,t=void 0===t?t:il(t))},Dn.reverse=Ho,Dn.sampleSize=function(e,t,n){return t=(n?ao(e,t,n):void 0===t)?1:il(t),(Pa(e)?Fn:Br)(e,t)},Dn.set=function(e,t,n){return null==e?e:Fr(e,t,n)},Dn.setWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Fr(e,t,n,r)},Dn.shuffle=function(e){return(Pa(e)?Vn:Wr)(e)},Dn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&ao(e,t,n)?(t=0,n=r):(t=null==t?0:il(t),n=void 0===n?r:il(n)),Hr(e,t,n)):[]},Dn.sortBy=pa,Dn.sortedUniq=function(e){return e&&e.length?Xr(e):[]},Dn.sortedUniqBy=function(e,t){return e&&e.length?Xr(e,$i(t,2)):[]},Dn.split=function(e,t,n){return n&&"number"!=typeof n&&ao(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=ul(e))&&("string"==typeof t||null!=t&&!$a(t))&&!(t=Yr(t))&&kt(e)?ui(Wt(e),0,n):e.split(t,n):[]},Dn.spread=function(e,t){if("function"!=typeof e)throw new he(n);return t=null==t?0:an(il(t),0),Ur(function(n){var r=n[t],i=ui(n,0,t);return r&&st(i,r),tt(e,this,i)})},Dn.tail=function(e){var t=null==e?0:e.length;return t?Hr(e,1,t):[]},Dn.take=function(e,t,n){return e&&e.length?Hr(e,0,(t=n||void 0===t?1:il(t))<0?0:t):[]},Dn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,(t=r-(t=n||void 0===t?1:il(t)))<0?0:t,r):[]},Dn.takeRightWhile=function(e,t){return e&&e.length?ei(e,$i(t,3),!1,!0):[]},Dn.takeWhile=function(e,t){return e&&e.length?ei(e,$i(t,3)):[]},Dn.tap=function(e,t){return t(e),e},Dn.throttle=function(e,t,r){var i=!0,o=!0;if("function"!=typeof e)throw new he(n);return Ha(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),ba(e,t,{leading:i,maxWait:t,trailing:o})},Dn.thru=ra,Dn.toArray=nl,Dn.toPairs=Dl,Dn.toPairsIn=Tl,Dn.toPath=function(e){return Pa(e)?ct(e,Io):Ja(e)?[e]:gi(No(ul(e)))},Dn.toPlainObject=ll,Dn.transform=function(e,t,n){var r=Pa(e),i=r||ja(e)||Qa(e);if(t=$i(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Ha(e)&&Va(o)?Tn(He(e)):{}}return(i?rt:ur)(e,function(e,r,i){return t(n,e,r,i)}),n},Dn.unary=function(e){return ha(e,1)},Dn.union=Go,Dn.unionBy=qo,Dn.unionWith=Zo,Dn.uniq=function(e){return e&&e.length?Kr(e):[]},Dn.uniqBy=function(e,t){return e&&e.length?Kr(e,$i(t,2)):[]},Dn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Kr(e,void 0,t):[]},Dn.unset=function(e,t){return null==e||Jr(e,t)},Dn.unzip=Xo,Dn.unzipWith=$o,Dn.update=function(e,t,n){return null==e?e:Qr(e,t,oi(n))},Dn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Qr(e,t,oi(n),r)},Dn.values=xl,Dn.valuesIn=function(e){return null==e?[]:Dt(e,Cl(e))},Dn.without=Yo,Dn.words=Vl,Dn.wrap=function(e,t){return Ia(oi(t),e)},Dn.xor=Ko,Dn.xorBy=Jo,Dn.xorWith=Qo,Dn.zip=ea,Dn.zipObject=function(e,t){return ri(e||[],t||[],Wn)},Dn.zipObjectDeep=function(e,t){return ri(e||[],t||[],Fr)},Dn.zipWith=ta,Dn.entries=Dl,Dn.entriesIn=Tl,Dn.extend=sl,Dn.extendWith=dl,Kl(Dn,Dn),Dn.add=uu,Dn.attempt=zl,Dn.camelCase=Al,Dn.capitalize=Ll,Dn.ceil=cu,Dn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=al(n))==n?n:0),void 0!==t&&(t=(t=al(t))==t?t:0),$n(al(e),t,n)},Dn.clone=function(e){return Yn(e,4)},Dn.cloneDeep=function(e){return Yn(e,5)},Dn.cloneDeepWith=function(e,t){return Yn(e,5,t="function"==typeof t?t:void 0)},Dn.cloneWith=function(e,t){return Yn(e,4,t="function"==typeof t?t:void 0)},Dn.conformsTo=function(e,t){return null==t||Kn(e,t,bl(t))},Dn.deburr=Rl,Dn.defaultTo=function(e,t){return null==e||e!=e?t:e},Dn.divide=su,Dn.endsWith=function(e,t,n){e=ul(e),t=Yr(t);var r=e.length,i=n=void 0===n?r:$n(il(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Dn.eq=xa,Dn.escape=function(e){return(e=ul(e))&&k.test(e)?e.replace(P,Pt):e},Dn.escapeRegExp=function(e){return(e=ul(e))&&G.test(e)?e.replace(W,"\\$&"):e},Dn.every=function(e,t,n){var r=Pa(e)?ot:nr;return n&&ao(e,t,n)&&(t=void 0),r(e,$i(t,3))},Dn.find=aa,Dn.findIndex=Ro,Dn.findKey=function(e,t){return pt(e,$i(t,3),ur)},Dn.findLast=la,Dn.findLastIndex=Po,Dn.findLastKey=function(e,t){return pt(e,$i(t,3),cr)},Dn.floor=du,Dn.forEach=ua,Dn.forEachRight=ca,Dn.forIn=function(e,t){return null==e?e:ar(e,$i(t,3),Cl)},Dn.forInRight=function(e,t){return null==e?e:lr(e,$i(t,3),Cl)},Dn.forOwn=function(e,t){return e&&ur(e,$i(t,3))},Dn.forOwnRight=function(e,t){return e&&cr(e,$i(t,3))},Dn.get=gl,Dn.gt=Aa,Dn.gte=La,Dn.has=function(e,t){return null!=e&&no(e,t,pr)},Dn.hasIn=hl,Dn.head=ko,Dn.identity=Zl,Dn.includes=function(e,t,n,r){e=ka(e)?e:xl(e),n=n&&!r?il(n):0;var i=e.length;return n<0&&(n=an(i+n,0)),Ka(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&ht(e,t,n)>-1},Dn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:il(n);return i<0&&(i=an(r+i,0)),ht(e,t,i)},Dn.inRange=function(e,t,n){return t=rl(t),void 0===n?(n=t,t=0):n=rl(n),function(e,t,n){return e>=ln(t,n)&&e<an(t,n)}(e=al(e),t,n)},Dn.invoke=_l,Dn.isArguments=Ra,Dn.isArray=Pa,Dn.isArrayBuffer=Ma,Dn.isArrayLike=ka,Dn.isArrayLikeObject=Ua,Dn.isBoolean=function(e){return!0===e||!1===e||Ga(e)&&vr(e)==l},Dn.isBuffer=ja,Dn.isDate=Ba,Dn.isElement=function(e){return Ga(e)&&1===e.nodeType&&!Xa(e)},Dn.isEmpty=function(e){if(null==e)return!0;if(ka(e)&&(Pa(e)||"string"==typeof e||"function"==typeof e.splice||ja(e)||Qa(e)||Ra(e)))return!e.length;var t=to(e);if(t==f||t==g)return!e.size;if(so(e))return!wr(e).length;for(var n in e)if(Ce.call(e,n))return!1;return!0},Dn.isEqual=function(e,t){return _r(e,t)},Dn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?_r(e,t,void 0,n):!!r},Dn.isError=Fa,Dn.isFinite=function(e){return"number"==typeof e&&nn(e)},Dn.isFunction=Va,Dn.isInteger=za,Dn.isLength=Wa,Dn.isMap=qa,Dn.isMatch=function(e,t){return e===t||br(e,t,Ki(t))},Dn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,br(e,t,Ki(t),n)},Dn.isNaN=function(e){return Za(e)&&e!=+e},Dn.isNative=function(e){if(co(e))throw new de("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Cr(e)},Dn.isNil=function(e){return null==e},Dn.isNull=function(e){return null===e},Dn.isNumber=Za,Dn.isObject=Ha,Dn.isObjectLike=Ga,Dn.isPlainObject=Xa,Dn.isRegExp=$a,Dn.isSafeInteger=function(e){return za(e)&&e>=-9007199254740991&&e<=9007199254740991},Dn.isSet=Ya,Dn.isString=Ka,Dn.isSymbol=Ja,Dn.isTypedArray=Qa,Dn.isUndefined=function(e){return void 0===e},Dn.isWeakMap=function(e){return Ga(e)&&to(e)==y},Dn.isWeakSet=function(e){return Ga(e)&&"[object WeakSet]"==vr(e)},Dn.join=function(e,t){return null==e?"":rn.call(e,t)},Dn.kebabCase=Pl,Dn.last=Fo,Dn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=il(n))<0?an(r+i,0):ln(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):gt(e,yt,i,!0)},Dn.lowerCase=Ml,Dn.lowerFirst=kl,Dn.lt=el,Dn.lte=tl,Dn.max=function(e){return e&&e.length?rr(e,Zl,mr):void 0},Dn.maxBy=function(e,t){return e&&e.length?rr(e,$i(t,2),mr):void 0},Dn.mean=function(e){return _t(e,Zl)},Dn.meanBy=function(e,t){return _t(e,$i(t,2))},Dn.min=function(e){return e&&e.length?rr(e,Zl,Sr):void 0},Dn.minBy=function(e,t){return e&&e.length?rr(e,$i(t,2),Sr):void 0},Dn.stubArray=ou,Dn.stubFalse=au,Dn.stubObject=function(){return{}},Dn.stubString=function(){return""},Dn.stubTrue=function(){return!0},Dn.multiply=fu,Dn.nth=function(e,t){return e&&e.length?xr(e,il(t)):void 0},Dn.noConflict=function(){return We._===this&&(We._=Ie),this},Dn.noop=Jl,Dn.now=ga,Dn.pad=function(e,t,n){e=ul(e);var r=(t=il(t))?zt(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ai(Qt(i),n)+e+Ai(Jt(i),n)},Dn.padEnd=function(e,t,n){e=ul(e);var r=(t=il(t))?zt(e):0;return t&&r<t?e+Ai(t-r,n):e},Dn.padStart=function(e,t,n){e=ul(e);var r=(t=il(t))?zt(e):0;return t&&r<t?Ai(t-r,n)+e:e},Dn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),cn(ul(e).replace(q,""),t||0)},Dn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&ao(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=rl(e),void 0===t?(t=e,e=0):t=rl(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=sn();return ln(e+i*(t-e+Be("1e-"+((i+"").length-1))),t)}return Mr(e,t)},Dn.reduce=function(e,t,n){var r=Pa(e)?dt:Ot,i=arguments.length<3;return r(e,$i(t,4),n,i,er)},Dn.reduceRight=function(e,t,n){var r=Pa(e)?ft:Ot,i=arguments.length<3;return r(e,$i(t,4),n,i,tr)},Dn.repeat=function(e,t,n){return t=(n?ao(e,t,n):void 0===t)?1:il(t),kr(ul(e),t)},Dn.replace=function(){var e=arguments,t=ul(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Dn.result=function(e,t,n){var r=-1,i=(t=ai(t,e)).length;for(i||(i=1,e=void 0);++r<i;){var o=null==e?void 0:e[Io(t[r])];void 0===o&&(r=i,o=n),e=Va(o)?o.call(e):o}return e},Dn.round=vu,Dn.runInContext=e,Dn.sample=function(e){return(Pa(e)?Bn:jr)(e)},Dn.size=function(e){if(null==e)return 0;if(ka(e))return Ka(e)?zt(e):e.length;var t=to(e);return t==f||t==g?e.size:wr(e).length},Dn.snakeCase=Ul,Dn.some=function(e,t,n){var r=Pa(e)?vt:Gr;return n&&ao(e,t,n)&&(t=void 0),r(e,$i(t,3))},Dn.sortedIndex=function(e,t){return qr(e,t)},Dn.sortedIndexBy=function(e,t,n){return Zr(e,t,$i(n,2))},Dn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=qr(e,t);if(r<n&&xa(e[r],t))return r}return-1},Dn.sortedLastIndex=function(e,t){return qr(e,t,!0)},Dn.sortedLastIndexBy=function(e,t,n){return Zr(e,t,$i(n,2),!0)},Dn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=qr(e,t,!0)-1;if(xa(e[n],t))return n}return-1},Dn.startCase=jl,Dn.startsWith=function(e,t,n){return e=ul(e),n=null==n?0:$n(il(n),0,e.length),t=Yr(t),e.slice(n,n+t.length)==t},Dn.subtract=mu,Dn.sum=function(e){return e&&e.length?wt(e,Zl):0},Dn.sumBy=function(e,t){return e&&e.length?wt(e,$i(t,2)):0},Dn.template=function(e,t,n){var r=Dn.templateSettings;n&&ao(e,t,n)&&(t=void 0),e=ul(e),t=dl({},t,r,Bi);var i,o,a=dl({},t.imports,r.imports,Bi),l=bl(a),u=Dt(a,l),c=0,s=t.interpolate||ue,d="__p += '",f=pe((t.escape||ue).source+"|"+s.source+"|"+(s===B?ee:ue).source+"|"+(t.evaluate||ue).source+"|$","g"),v="//# sourceURL="+(Ce.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Me+"]")+"\n";e.replace(f,function(t,n,r,a,l,u){return r||(r=a),d+=e.slice(c,u).replace(ce,Mt),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),l&&(o=!0,d+="';\n"+l+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t}),d+="';\n";var m=Ce.call(t,"variable")&&t.variable;if(m){if(J.test(m))throw new de("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(x,""):d).replace(A,"$1").replace(L,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var p=zl(function(){return fe(l,v+"return "+d).apply(void 0,u)});if(p.source=d,Fa(p))throw p;return p},Dn.times=function(e,t){if((e=il(e))<1||e>9007199254740991)return[];var n=4294967295,r=ln(e,4294967295);e-=4294967295;for(var i=St(r,t=$i(t));++n<e;)t(n);return i},Dn.toFinite=rl,Dn.toInteger=il,Dn.toLength=ol,Dn.toLower=function(e){return ul(e).toLowerCase()},Dn.toNumber=al,Dn.toSafeInteger=function(e){return e?$n(il(e),-9007199254740991,9007199254740991):0===e?e:0},Dn.toString=ul,Dn.toUpper=function(e){return ul(e).toUpperCase()},Dn.trim=function(e,t,n){if((e=ul(e))&&(n||void 0===t))return Nt(e);if(!e||!(t=Yr(t)))return e;var r=Wt(e),i=Wt(t);return ui(r,xt(r,i),At(r,i)+1).join("")},Dn.trimEnd=function(e,t,n){if((e=ul(e))&&(n||void 0===t))return e.slice(0,Ht(e)+1);if(!e||!(t=Yr(t)))return e;var r=Wt(e);return ui(r,0,At(r,Wt(t))+1).join("")},Dn.trimStart=function(e,t,n){if((e=ul(e))&&(n||void 0===t))return e.replace(q,"");if(!e||!(t=Yr(t)))return e;var r=Wt(e);return ui(r,xt(r,Wt(t))).join("")},Dn.truncate=function(e,t){var n=30,r="...";if(Ha(t)){var i="separator"in t?t.separator:i;n="length"in t?il(t.length):n,r="omission"in t?Yr(t.omission):r}var o=(e=ul(e)).length;if(kt(e)){var a=Wt(e);o=a.length}if(n>=o)return e;var l=n-zt(r);if(l<1)return r;var u=a?ui(a,0,l).join(""):e.slice(0,l);if(void 0===i)return u+r;if(a&&(l+=u.length-l),$a(i)){if(e.slice(l).search(i)){var c,s=u;for(i.global||(i=pe(i.source,ul(te.exec(i))+"g")),i.lastIndex=0;c=i.exec(s);)var d=c.index;u=u.slice(0,void 0===d?l:d)}}else if(e.indexOf(Yr(i),l)!=l){var f=u.lastIndexOf(i);f>-1&&(u=u.slice(0,f))}return u+r},Dn.unescape=function(e){return(e=ul(e))&&M.test(e)?e.replace(R,Gt):e},Dn.uniqueId=function(e){var t=++Oe;return ul(e)+t},Dn.upperCase=Bl,Dn.upperFirst=Fl,Dn.each=ua,Dn.eachRight=ca,Dn.first=ko,Kl(Dn,(lu={},ur(Dn,function(e,t){Ce.call(Dn.prototype,t)||(lu[t]=e)}),lu),{chain:!1}),Dn.VERSION="4.17.21",rt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Dn[e].placeholder=Dn}),rt(["drop","take"],function(e,t){Ln.prototype[e]=function(n){n=void 0===n?1:an(il(n),0);var r=this.__filtered__&&!t?new Ln(this):this.clone();return r.__filtered__?r.__takeCount__=ln(n,r.__takeCount__):r.__views__.push({size:ln(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},Ln.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),rt(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Ln.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:$i(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),rt(["head","last"],function(e,t){var n="take"+(t?"Right":"");Ln.prototype[e]=function(){return this[n](1).value()[0]}}),rt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Ln.prototype[e]=function(){return this.__filtered__?new Ln(this):this[n](1)}}),Ln.prototype.compact=function(){return this.filter(Zl)},Ln.prototype.find=function(e){return this.filter(e).head()},Ln.prototype.findLast=function(e){return this.reverse().find(e)},Ln.prototype.invokeMap=Ur(function(e,t){return"function"==typeof e?new Ln(this):this.map(function(n){return Er(n,e,t)})}),Ln.prototype.reject=function(e){return this.filter(Sa($i(e)))},Ln.prototype.slice=function(e,t){e=il(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Ln(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=il(t))<0?n.dropRight(-t):n.take(t-e)),n)},Ln.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ln.prototype.toArray=function(){return this.take(4294967295)},ur(Ln.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Dn[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(Dn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,l=t instanceof Ln,u=a[0],c=l||Pa(t),s=function(e){var t=i.apply(Dn,st([e],a));return r&&d?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(l=c=!1);var d=this.__chain__,f=!!this.__actions__.length,v=o&&!d,m=l&&!f;if(!o&&c){t=m?t:new Ln(this);var p=e.apply(t,a);return p.__actions__.push({func:ra,args:[s],thisArg:void 0}),new An(p,d)}return v&&m?e.apply(this,a):(p=this.thru(s),v?r?p.value()[0]:p.value():p)})}),rt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ee[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Dn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Pa(i)?i:[],e)}return this[n](function(n){return t.apply(Pa(n)?n:[],e)})}}),ur(Ln.prototype,function(e,t){var n=Dn[t];if(n){var r=n.name+"";Ce.call(yn,r)||(yn[r]=[]),yn[r].push({name:t,func:n})}}),yn[Ii(void 0,2).name]=[{name:"wrapper",func:void 0}],Ln.prototype.clone=function(){var e=new Ln(this.__wrapped__);return e.__actions__=gi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=gi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=gi(this.__views__),e},Ln.prototype.reverse=function(){if(this.__filtered__){var e=new Ln(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Ln.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Pa(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=ln(t,e+a);break;case"takeRight":e=an(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,l=o.end,u=l-a,c=r?l:a-1,s=this.__iteratees__,d=s.length,f=0,v=ln(u,this.__takeCount__);if(!n||!r&&i==u&&v==u)return ti(e,this.__actions__);var m=[];e:for(;u--&&f<v;){for(var p=-1,g=e[c+=t];++p<d;){var h=s[p],E=h.type,y=(0,h.iteratee)(g);if(2==E)g=y;else if(!y){if(1==E)continue e;break e}}m[f++]=g}return m},Dn.prototype.at=ia,Dn.prototype.chain=function(){return na(this)},Dn.prototype.commit=function(){return new An(this.value(),this.__chain__)},Dn.prototype.next=function(){void 0===this.__values__&&(this.__values__=nl(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},Dn.prototype.plant=function(e){for(var t,n=this;n instanceof xn;){var r=To(n);r.__index__=0,r.__values__=void 0,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Dn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Ln){var t=e;return this.__actions__.length&&(t=new Ln(this)),(t=t.reverse()).__actions__.push({func:ra,args:[Ho],thisArg:void 0}),new An(t,this.__chain__)}return this.thru(Ho)},Dn.prototype.toJSON=Dn.prototype.valueOf=Dn.prototype.value=function(){return ti(this.__wrapped__,this.__actions__)},Dn.prototype.first=Dn.prototype.head,Ct&&(Dn.prototype[Ct]=function(){return this}),Dn}();Ge?((Ge.exports=qt)._=qt,He._=qt):We._=qt}).call(H)}),Z=function(){var e,o,a=n.useRef(null),l=Digit.Hooks.useAccessControl(),u=l.isLoading,c=l.data,s=n.useState(""),f=s[0],v=s[1],m=i.useTranslation().t;n.useEffect(function(){if(u)return r.createElement(t.Loader,null);a.current.style.cursor="pointer",p()},[u]);var p=function(){a.current.style.width="55px",a.current.style.overflow="hidden",a.current.querySelectorAll(".dropdown-link").forEach(function(e){e.style.display="none"}),a.current.querySelectorAll(".actions").forEach(function(e){e.style.padding="0"})},g={},h={};null==c||null===(e=c.actions)||void 0===e||null===(o=e.filter(function(e){return"url"===e.url}))||void 0===o||o.forEach(function(e){q.set(h,e.path,d({},e))}),null==c||c.actions.filter(function(e){return"url"===e.url}).forEach(function(e){var t,n,r,i=e.path.split(".")[0];(""==f&&""!==e.path||""!==e.path&&null!==(t=m("ACTION_TEST_"+(null===(n=i)||void 0===n||null===(r=n.toUpperCase())||void 0===r?void 0:r.replace(/[ -]/g,"_"))))&&void 0!==t&&t.toLowerCase().includes(f.toLowerCase()))&&("TradeLicense"===(i=e.path.split(".")[0])&&(i="Trade License"),g[i]?g[i].push(e):g[i]=[e])});var E=[];return u?r.createElement(t.Loader,null):E?r.createElement("div",{className:"sidebar",ref:a,onMouseOver:function(){a.current.style.width="260px",a.current.style.overflow="auto",a.current.querySelectorAll(".dropdown-link").forEach(function(e){e.style.display="flex"})},onMouseLeave:p},r.createElement("div",{className:"submenu-container"},r.createElement("div",{className:"sidebar-link"},r.createElement("div",{className:"actions search-icon-wrapper"},r.createElement(t.SearchIcon,{className:"search-icon"}),r.createElement("input",{className:"employee-search-input",type:"text",placeholder:m("ACTION_TEST_SEARCH"),name:"search",value:f,onChange:function(e){return v(e.target.value)}})))),function(){var e=Object.keys(g);e.sort(function(e,t){return e.orderNumber-t.orderNumber});for(var t=0;t<e.length;t++)if(-1===g[e[t]][0].path.indexOf("."))if("Home"===g[e[t]][0].displayName){var n,i="/"+(null===(n=window)||void 0===n?void 0:n.contextPath)+"/employee";E.unshift({moduleName:e[t].toUpperCase(),icon:g[e[t]][0],navigationURL:i,type:"single"})}else{var o;E.push({moduleName:null===(o=g[e[t]][0])||void 0===o?void 0:o.displayName.toUpperCase(),type:"single",icon:g[e[t]][0],navigationURL:g[e[t]][0].navigationURL})}else E.push({moduleName:e[t].toUpperCase(),links:g[e[t]],icon:g[e[t]][0],orderNumber:g[e[t]][0].orderNumber});if(E.find(function(e){return"HOME"===e.moduleName})){E.findIndex(function(e){return"HOME"===e.moduleName});var a,l,u=null===(a=E)||void 0===a?void 0:a.filter(function(e){return"HOME"===(null==e?void 0:e.moduleName)}),c=null===(l=E)||void 0===l?void 0:l.filter(function(e){return"HOME"!==(null==e?void 0:e.moduleName)});E=c.sort(function(e,t){return e.moduleName.localeCompare(t.moduleName)}),(null==u?void 0:u[0])&&E.unshift(u[0])}else E.sort(function(e,t){return e.moduleName.localeCompare(t.moduleName)});var s=function e(t){var n=[];for(var r in t){var i=t[r];if("object"!=typeof i||null!=i&&i.id){var o;n.push({label:r,value:i,icon:null==i?void 0:i.leftIcon,to:"Home"===r?"/"+(null===(o=window)||void 0===o?void 0:o.contextPath)+"/employee":null==i?void 0:i.navigationURL})}else{var a,l=e(i);n.push({label:r,children:l,icon:null==l||null===(a=l[0])||void 0===a?void 0:a.icon,to:""})}}return n}(h);s.splice(s.findIndex(function(e){return""===(null==e?void 0:e.label)}),1),s.sort(function(e,t){return e.label.localeCompare(t.label)});var d=null==s?void 0:s.findIndex(function(e){return"Home"===(null==e?void 0:e.label)}),f=s.splice(d,1);return s.unshift(null==f?void 0:f[0]),s.map(function(e,t){return r.createElement(W,{key:e.label+"-"+t,item:e})})}()):""},X=function(e){var t=e.isSidebarOpen,n=e.toggleSidebar,i=e.handleLogout,o=e.mobileView,a=e.userDetails,l=e.modules;return e.CITIZEN?r.createElement(V,{isOpen:t,isMobile:!0,toggleSidebar:n,onLogout:i,linkData:e.linkData,islinkDataLoading:e.islinkDataLoading}):!o&&null!=a&&a.access_token?r.createElement(Z,{mobileView:o,userDetails:a,modules:l}):r.createElement(V,{isOpen:t,isMobile:!0,toggleSidebar:n,onLogout:i,isEmployee:!0})},$=function(e){var i=e.t,o=e.stateInfo,a=e.userDetails,u=e.CITIZEN,c=e.cityDetails,s=e.mobileView,d=e.handleUserDropdownSelection,f=e.logoUrl,v=e.showSidebar,m=void 0===v||v,p=e.showLanguageChange,g=e.linkData,h=e.islinkDataLoading,E=n.useState(!1),y=E[0],_=E[1],b=l.useHistory(),C=n.useState(!1),O=C[0],w=C[1],S=function(){_(!1),w(!0)},N=function(){w(!1)},I=[{name:i("EDIT_PROFILE"),icon:r.createElement(t.EditPencilIcon,{className:"icon"}),func:function(){var e;b.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/profile")}},{name:i("CORE_COMMON_LOGOUT"),icon:r.createElement(t.LogoutIcon,{className:"icon"}),func:S}];return r.createElement(r.Fragment,null,r.createElement(T,{t:i,stateInfo:o,toggleSidebar:_,isSidebarOpen:y,handleLogout:S,userDetails:a,CITIZEN:u,cityDetails:c,mobileView:s,userOptions:I,handleUserDropdownSelection:d,logoUrl:f,showLanguageChange:p}),O&&r.createElement(M,{onSelect:function(){Digit.UserService.logout(),w(!1)},onCancel:N,onDismiss:N}),m&&r.createElement(X,{t:i,CITIZEN:u,isSidebarOpen:y,toggleSidebar:_,handleLogout:S,mobileView:s,userDetails:a,linkData:g,islinkDataLoading:h}))},Y=function(e){var o=e.question,a=e.answer,l=e.lastIndex,u=n.useState(!1),c=u[0],s=u[1],d=i.useTranslation().t;return r.createElement("div",{className:"faqs border-none",onClick:function(){return s(!c)}},r.createElement("div",{className:"faq-question",style:{justifyContent:"space-between",display:"flex"}},r.createElement("span",null,d(o)),r.createElement("span",{className:c?"faqicon rotate":"faqicon",style:{float:"right"}},r.createElement(t.ArrowForward,null))),r.createElement("div",{className:"faq-answer",style:c?{display:"block"}:{display:"none"}},r.createElement("span",null,d(a))),l?null:r.createElement("div",{className:"cs-box-border"}))},K=function(e){var o,a,l,u=e.module,c=Digit.UserService.getUser(),s=((null==c||null===(o=c.info)||void 0===o?void 0:o.tenantId)||Digit.ULBService.getCurrentTenantId(),i.useTranslation().t),d=Digit.Hooks.useGetFAQsJSON(Digit.ULBService.getStateId()),f=d.data,v=null==f||null===(a=f.MdmsRes["common-masters"])||void 0===a||null===(l=a.faqs[0])||void 0===l?void 0:l[""+u].faqs;return d.isLoading?r.createElement(t.Loader,null):r.createElement(n.Fragment,null,r.createElement("div",{className:"faq-page"},r.createElement(t.BackButton,{style:{marginLeft:"unset"}}),r.createElement("div",{style:{marginBottom:"15px"}},r.createElement(t.Header,{styles:{marginLeft:"0px",paddingTop:"10px",fontSize:"32px"}},s("FAQ_S"))),r.createElement("div",{className:"faq-list"},v.map(function(e,t){return r.createElement(Y,{key:"faq_"+t,question:e.question,answer:e.answer,lastIndex:t===(null==v?void 0:v.length)-1})}))))},J=function(){var e,n,o,a,u,c,s,f,v,m,p,g,h,E,y,_,b,C,O,w,S,N,I,D,T=i.useTranslation().t,x=l.useHistory(),A=Digit.ULBService.getCitizenCurrentTenant(!0),L=Digit.Hooks.useStore.getInitData(),R=L.data,P=(void 0===R?{}:R).uiHomePage,M=L.isLoading,k=window.Digit.Utils.browser.isMobile(),U=function(){var e,t,n,r,i;return"EMPLOYEE"!==(null===(e=Digit.UserService)||void 0===e||null===(t=e.getUser())||void 0===t||null===(n=t.info)||void 0===n?void 0:n.type)&&!(null===(r=Digit.UserService)||void 0===r||null===(i=r.getUser())||void 0===i||!i.access_token)},j=Digit.Hooks.useEvents({tenantId:A,variant:"whats-new",config:{enabled:U()}}),B=j.data,F=j.isLoading;A||x.push("/"+(null===(D=window)||void 0===D?void 0:D.contextPath)+"/citizen/select-language");var V,z,W=null==P?void 0:P.appBannerDesktop,H=null==P?void 0:P.appBannerMobile,G=null==P?void 0:P.citizenServicesCard,q=null==P?void 0:P.informationAndUpdatesCard,Z=null==P?void 0:P.whatsAppBannerDesktop,X=null==P?void 0:P.whatsAppBannerMobile,$=null==P?void 0:P.whatsNewSection,Y=null==P?void 0:P.redirectURL;Y&&x.push("/"+(null===(V=window)||void 0===V?void 0:V.contextPath)+"/citizen/"+Y),null!==(e=window)&&void 0!==e&&null!==(n=e.location)&&void 0!==n&&null!==(o=n.href)&&void 0!==o&&null!==(a=o.includes)&&void 0!==a&&a.call(o,"sanitation-ui")&&x.push("/"+(null===(z=window)||void 0===z?void 0:z.contextPath)+"/citizen/all-services");var K=function(e){window.open(null==e?void 0:e.navigationUrl)},J={header:T(null==G?void 0:G.headerLabel),sideOption:{name:T(null==G||null===(u=G.sideOption)||void 0===u?void 0:u.name),onClick:function(){var e;return x.push(null==G||null===(e=G.sideOption)||void 0===e?void 0:e.navigationUrl)}},options:[{name:T(null==G||null===(c=G.props)||void 0===c||null===(s=c[0])||void 0===s?void 0:s.label),Icon:r.createElement(t.ComplaintIcon,null),onClick:function(){var e,t;return x.push(null==G||null===(e=G.props)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.navigationUrl)}},{name:T(null==G||null===(f=G.props)||void 0===f||null===(v=f[1])||void 0===v?void 0:v.label),Icon:r.createElement(t.PTIcon,{className:"fill-path-primary-main"}),onClick:function(){var e,t;return x.push(null==G||null===(e=G.props)||void 0===e||null===(t=e[1])||void 0===t?void 0:t.navigationUrl)}},{name:T(null==G||null===(m=G.props)||void 0===m||null===(p=m[2])||void 0===p?void 0:p.label),Icon:r.createElement(t.CaseIcon,{className:"fill-path-primary-main"}),onClick:function(){var e,t;return x.push(null==G||null===(e=G.props)||void 0===e||null===(t=e[2])||void 0===t?void 0:t.navigationUrl)}},{name:T(null==G||null===(g=G.props)||void 0===g||null===(h=g[3])||void 0===h?void 0:h.label),Icon:r.createElement(t.OBPSIcon,null),onClick:function(){var e,t;return x.push(null==G||null===(e=G.props)||void 0===e||null===(t=e[3])||void 0===t?void 0:t.navigationUrl)}}],styles:{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",width:"100%"}},Q={header:T(null==q?void 0:q.headerLabel),sideOption:{name:T(null==q||null===(E=q.sideOption)||void 0===E?void 0:E.name),onClick:function(){var e;return x.push(null==q||null===(e=q.sideOption)||void 0===e?void 0:e.navigationUrl)}},options:[{name:T(null==q||null===(y=q.props)||void 0===y||null===(_=y[0])||void 0===_?void 0:_.label),Icon:r.createElement(t.HomeIcon,null),onClick:function(){var e,t;return x.push(null==q||null===(e=q.props)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.navigationUrl)}},{name:T(null==q||null===(b=q.props)||void 0===b||null===(C=b[1])||void 0===C?void 0:C.label),Icon:r.createElement(t.Calender,null),onClick:function(){var e,t;return x.push(null==q||null===(e=q.props)||void 0===e||null===(t=e[1])||void 0===t?void 0:t.navigationUrl)}},{name:T(null==q||null===(O=q.props)||void 0===O||null===(w=O[2])||void 0===w?void 0:w.label),Icon:r.createElement(t.DocumentIcon,null),onClick:function(){var e,t;return x.push(null==q||null===(e=q.props)||void 0===e||null===(t=e[2])||void 0===t?void 0:t.navigationUrl)}},{name:T(null==q||null===(S=q.props)||void 0===S||null===(N=S[3])||void 0===N?void 0:N.label),Icon:r.createElement(t.DocumentIcon,null),onClick:function(){var e,t;return x.push(null==q||null===(e=q.props)||void 0===e||null===(t=e[3])||void 0===t?void 0:t.navigationUrl)}}],styles:{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",width:"100%"}};return M?r.createElement(t.Loader,null):r.createElement("div",{className:"HomePageContainer"},r.createElement("div",{className:"HomePageWrapper"},r.createElement("div",{className:"BannerWithSearch"},r.createElement("img",k?{src:null==H?void 0:H.bannerUrl}:{src:null==W?void 0:W.bannerUrl}),r.createElement("div",{className:"ServicesSection"},r.createElement(t.CardBasedOptions,d({style:{marginTop:"-30px"}},J)),r.createElement(t.CardBasedOptions,d({style:k?{}:{marginTop:"-30px"}},Q)))),(X||Z)&&r.createElement("div",{className:"WhatsAppBanner"},r.createElement("img",k?{src:null==X?void 0:X.bannerUrl,onClick:function(){return K(X)}}:{src:null==Z?void 0:Z.bannerUrl,onClick:function(){return K(Z)}})),U()?F?r.createElement(t.Loader,null):r.createElement("div",{className:"WhatsNewSection"},r.createElement("div",{className:"headSection"},r.createElement("h2",null,T(null==$?void 0:$.headerLabel)),r.createElement("p",{onClick:function(){var e;return x.push(null==$||null===(e=$.sideOption)||void 0===e?void 0:e.navigationUrl)}},T(null==$||null===(I=$.sideOption)||void 0===I?void 0:I.name))),r.createElement(t.WhatsNewCard,null==B?void 0:B[0])):null))},Q=function(){var e=i.useTranslation().t,o=l.useHistory(),a=Digit.Hooks.useStore.getInitData(),u=a.data,c=void 0===u?{}:u,s=c.languages,d=c.stateInfo,f=a.isLoading,v=Digit.StoreData.getCurrentLanguage(),m=n.useMemo(function(){return{header:e("CS_COMMON_CHOOSE_LANGUAGE"),submitBarLabel:e("CORE_COMMON_CONTINUE")}},[e]),p=n.useMemo(function(){return{options:s,optionsKey:"label",additionalWrapperClass:"reverse-radio-selection-wrapper",onSelect:function(e){return Digit.LocalizationService.changeLanguage(e.value,d.code)},selectedOption:null==s?void 0:s.filter(function(e){return e.value===v})[0]}},[v,s]);return f?r.createElement(t.Loader,null):r.createElement("div",{className:"selection-card-wrapper"},r.createElement(t.PageBasedInput,{texts:m,onSubmit:function(){var e;o.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/select-location")}},r.createElement(t.CardHeader,null,e("CS_COMMON_CHOOSE_LANGUAGE")),r.createElement(t.RadioButtons,p)))},ee=function(){var e=i.useTranslation().t,o=l.useHistory(),a=l.useLocation(),u=Digit.Hooks.useTenants(),c=u.data,s=u.isLoading,f=n.useState(function(){return{code:Digit.ULBService.getCitizenCurrentTenant(!0)}}),v=f[0],m=f[1],p=n.useState(!1),g=p[0],h=p[1],E=n.useMemo(function(){return{header:e("CS_COMMON_CHOOSE_LOCATION"),submitBarLabel:e("CORE_COMMON_CONTINUE")}},[e]);function y(e){m(e),h(!1)}var _=n.useMemo(function(){return{options:c,optionsKey:"i18nKey",additionalWrapperClass:"reverse-radio-selection-wrapper",onSelect:y,selectedOption:v}},[c,e,v]);return s?r.createElement("loader",null):r.createElement("div",{className:"selection-card-wrapper"},r.createElement(t.BackButton,null),r.createElement(t.PageBasedInput,{texts:E,onSubmit:function(){if(v){var e,t;Digit.SessionStorage.set("CITIZEN.COMMON.HOME.CITY",v);var n=null===(e=a.state)||void 0===e?void 0:e.redirectBackTo;n?o.replace(n):o.push("/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/citizen")}else h(!0)},className:"location-selection-container"},r.createElement(t.CardHeader,null,e("CS_COMMON_CHOOSE_LOCATION")),r.createElement(t.SearchOnRadioButtons,d({},_,{placeholder:e("COMMON_TABLE_SEARCH")})),g?r.createElement(t.CardLabelError,null,e("CS_COMMON_LOCATION_SELECTION_ERROR")):null))},te=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,i=this.s;if(i){var o=1&i?t:n;if(o){try{ne(r,1,o(this.v))}catch(e){ne(r,2,e)}return r}return this}return this.o=function(e){try{var i=e.v;1&e.s?ne(r,1,t?t(i):i):n?ne(r,1,n(i)):ne(r,2,i)}catch(e){ne(r,2,e)}},r},e}();function ne(e,t,n){if(!e.s){if(n instanceof te){if(!n.s)return void(n.o=ne.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(ne.bind(null,e,t),ne.bind(null,e,2));e.s=t,e.v=n;var r=e.o;r&&r(e)}}function re(e){return e instanceof te&&1&e.s}var ie="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function oe(e,t,n){if("function"==typeof e[ie]){var r,i,o,a=e[ie]();if(function e(l){try{for(;!((r=a.next()).done||n&&n());)if((l=t(r.value))&&l.then){if(!re(l))return void l.then(e,o||(o=ne.bind(null,i=new te,2)));l=l.v}i?ne(i,1,l):i=l}catch(e){ne(i||(i=new te),2,e)}}(),a.return){var l=function(e){try{r.done||a.return()}catch(e){}return e};if(i&&i.then)return i.then(l,function(e){throw l(e)});l()}return i}if(!("length"in e))throw new TypeError("Object is not iterable");for(var u=[],c=0;c<e.length;c++)u.push(e[c]);return function(e,t,n){var r,i,o=-1;return function a(l){try{for(;++o<e.length&&(!n||!n());)if((l=t(o))&&l.then){if(!re(l))return void l.then(a,i||(i=ne.bind(null,r=new te,2)));l=l.v}r?ne(r,1,l):r=l}catch(e){ne(r||(r=new te),2,e)}}(),r}(u,function(e){return t(u[e])},n)}function ae(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}function le(e){var o=e.setProfilePic,a=e.closeDrawer,l=e.userType,u=e.removeProfilePic,c=e.showToast,s=n.useState(null)[1],d=n.useState(""),f=d[0],v=d[1],m=n.useState(null)[1],p=i.useTranslation().t;return n.useEffect(function(){!function(){try{m(null);var e=function(){if(f){var e=function(){if(f.size>=1e6)c("error",p("CORE_COMMON_PROFILE_MAXIMUM_UPLOAD_SIZE_EXCEEDED")),m(p("CORE_COMMON_PROFILE_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{var e=ae(function(){return Promise.resolve(Digit.UploadServices.Filestorage(l+"-profile",f,Digit.ULBService.getStateId())).then(function(e){var t,n;if((null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0){var r,i,a=null==e||null===(r=e.data)||void 0===r||null===(i=r.files[0])||void 0===i?void 0:i.fileStoreId;s(a),o(a)}else c("error",p("CORE_COMMON_PROFILE_FILE_UPLOAD_ERROR")),m(p("CORE_COMMON_PROFILE_FILE_UPLOAD_ERROR"))})},function(){c("error",p("CORE_COMMON_PROFILE_INVALID_FILE_INPUT"))});if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[f]),r.createElement(r.Fragment,null,r.createElement("div",{style:{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",width:"100%",height:"100vh",backgroundColor:"rgba(0,0,0,.5)"},onClick:function(){return a()}}),r.createElement("div",{style:{width:"100%",justifyContent:"space-between",display:"flex",backgroundColor:"white",alignItems:"center",position:"fixed",left:"0",right:"0",height:"20%",bottom:"citizen"===l?"2.5rem":"0",zIndex:"2"}},r.createElement("div",{style:{display:"flex",flex:"1",flexDirection:"column",width:"100%",justifyContent:"center",alignItems:"center",gap:"8px 0"}},r.createElement("label",{for:"file",style:{cursor:"pointer"}}," ",r.createElement(t.GalleryIcon,null)),r.createElement("label",{style:{cursor:"pointer"}}," Gallery"),r.createElement("input",{type:"file",id:"file",accept:"image/*, .png, .jpeg, .jpg",onChange:function(e){return v(e.target.files[0])},style:{display:"none"}})),r.createElement("div",{style:{display:"flex",flex:"1",width:"100%",justifyContent:"center",alignItems:"center",flexDirection:"column",gap:"8px 0"}},r.createElement("button",{onClick:function(){u(),a()}},r.createElement(t.RemoveIcon,null)),r.createElement("label",{style:{cursor:"pointer"}},"Remove"))))}"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var ue,ce=function(e){var o,a,u,c,s,f,v,m,p,g,h,E,y=e.stateCode,_=e.userType,b=e.cityDetails,C=(l.useHistory(),i.useTranslation().t),O=window.location.href,w=Digit.ULBService.getStateId(),S=Digit.ULBService.getCurrentTenantId(),N=(null===(o=Digit.UserService.getUser())||void 0===o?void 0:o.info)||{},I=n.useState(null),D=I[0],T=I[1],x=n.useState(null!=N&&N.name?N.name:""),A=x[0],L=x[1],R=n.useState(null!=N&&N.emailId?N.emailId:""),P=R[0],M=R[1],k=n.useState(null==D?void 0:D.gender),U=k[0],j=k[1],B=n.useState(null!=N&&N.permanentCity?N.permanentCity:b.name),F=B[0],V=B[1],z=n.useState(null!=N&&N.mobileNumber?N.mobileNumber:""),W=z[0],H=z[1],G=n.useState(null),q=G[0],Z=G[1],X=n.useState(""),$=X[0],Y=X[1],K=n.useState(!1),J=K[0],Q=K[1],ee=n.useState(!1),te=ee[0],ne=ee[1],re=n.useState(""),ie=re[0],oe=re[1],ue=n.useState(""),ce=ue[0],se=ue[1],de=n.useState(""),fe=de[0],ve=de[1],me=n.useState(null),pe=me[0],ge=me[1],he=n.useState(!1),Ee=he[0],ye=he[1],_e=r.useState(window.innerWidth),be=_e[0],Ce=_e[1],Oe=r.useState({}),we=Oe[0],Se=Oe[1],Ne=window.Digit.Utils.browser.isMobile();r.useEffect(function(){return window.addEventListener("resize",function(){return Ce(window.innerWidth)}),function(){window.removeEventListener("resize",function(){return Ce(window.innerWidth)})}}),n.useEffect(function(){var e;ye(!0),function(){try{var e=null==N?void 0:N.uuid,t=function(){if(e)return Promise.resolve(Digit.UserService.userSearch(S,{uuid:[e]},{})).then(function(e){e&&e.user&&e.user.length&&T(e.user[0])})}();Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}(),j({i18nKey:void 0,code:null==D?void 0:D.gender,value:null==D?void 0:D.gender});var t=null==D||null===(e=D.photo)||void 0===e?void 0:e.split(",");Y(null==t?void 0:t.at(0)),ye(!1)},[null!==D]);var Ie=function(e){return j(e)},De=function(){return Q(!1)},Te=function(e){L(e),!new RegExp(/^[a-zA-Z ]+$/i).test(e)||0===e.length||e.length>50?Se(d({},we,{userName:{type:"pattern",message:"CORE_COMMON_PROFILE_NAME_INVALID"}})):Se(d({},we,{userName:null}))},xe=function(e){M(e),!e.length||e.includes("@")&&e.includes(".")?Se(d({},we,{emailAddress:null})):Se(d({},we,{emailAddress:{type:"pattern",message:"CORE_COMMON_PROFILE_EMAIL_INVALID"}}))},Ae=function(e,t,n){void 0===n&&(n=5e3),ge({key:e,action:t}),setTimeout(function(){ge(null)},n)},Le=function(){try{var e=function(e){if(t)return e;ye(!1)},t=!1;ye(!0);var n=ae(function(){var e=d({},N,{name:A,gender:null==U?void 0:U.value,emailId:P,photo:q});if(!new RegExp(/^([a-zA-Z ])*$/).test(A)||""===A||A.length>50||A.length<1)throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_NAME_INVALID"});if("employee"===_&&!new RegExp(/^[6-9]{1}[0-9]{9}$/).test(W))throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID"});if(P.length&&(!P.includes("@")||!P.includes(".")))throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_EMAIL_INVALID"});if(ie.length||ce.length||fe.length){if(ce!==fe)throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_PASSWORD_MISMATCH"});if(!(ie.length&&ce.length&&fe.length))throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"});if(!new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(ce)&&!new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(fe))throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"})}return Promise.resolve(Digit.UserService.updateUser(e,y)).then(function(e){var t=e.responseInfo;if(t&&"200"===t.status){var n=Digit.UserService.getUser();n&&Digit.UserService.setUser(d({},n,{info:d({},n.info,{name:A,mobileNumber:W,emailId:P,permanentCity:F})}))}return function(){if(ie.length&&ce.length&&fe.length){var e={existingPassword:ie,newPassword:ce,tenantId:S,type:"EMPLOYEE",username:null==N?void 0:N.userName,confirmPassword:fe};return function(){if(ce===fe)return ae(function(){return Promise.resolve(Digit.UserService.changePassword(e,S)).then(function(e){var t=e.responseInfo;if(null==t||!t.status||"200"!==t.status)throw"";Ae("success",C("CORE_COMMON_PROFILE_UPDATE_SUCCESS_WITH_PASSWORD"),5e3)})},function(e){var t,n;throw JSON.stringify({type:"error",message:null!==(t=e.Errors)&&void 0!==t&&null!==(n=t.at(0))&&void 0!==n&&n.description?e.Errors.at(0).description:"CORE_COMMON_PROFILE_UPDATE_ERROR_WITH_PASSWORD"})});throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_ERROR_PASSWORD_NOT_MATCH"})}()}null!=t&&t.status&&"200"===t.status&&Ae("success",C("CORE_COMMON_PROFILE_UPDATE_SUCCESS"),5e3)}()})},function(e){var t=JSON.parse(e);Ae(t.type,C(t.message),5e3)});return Promise.resolve(n&&n.then?n.then(e):e(n))}catch(e){return Promise.reject(e)}},Re=[],Pe=Digit.Hooks.useGenderMDMS(w,"common-masters","GenderType").data;return Pe&&Pe.map(function(e){Re.push({i18nKey:"PT_COMMON_GENDER_"+e.code,code:""+e.code,value:""+e.code})}),Ee?r.createElement(t.Loader,null):r.createElement("div",{className:"user-profile"},r.createElement("section",{style:{margin:"citizen"===_?"8px":"24px"}},"citizen"===_?r.createElement(t.BackButton,null):r.createElement(t.BreadCrumb,{crumbs:[{path:"/"+(null===(a=window)||void 0===a?void 0:a.contextPath)+"/employee",content:C("ES_COMMON_HOME"),show:!0},{path:"/"+(null===(u=window)||void 0===u?void 0:u.contextPath)+"/employee/user/profile",content:C("ES_COMMON_PAGE_1"),show:O.includes("/user/profile")}]})),r.createElement("div",{style:{display:"flex",flex:1,flexDirection:be<768||"citizen"===_?"column":"row",margin:"citizen"===_?"8px":"16px",gap:"citizen"===_?"":"0 24px",boxShadow:"citizen"===_?"1px 1px 4px 0px rgba(0,0,0,0.2)":"",background:"citizen"===_?"white":"",borderRadius:"citizen"===_?"4px":"",maxWidth:"citizen"===_?"960px":""}},r.createElement("section",{style:{position:"relative",display:"flex",flex:"citizen"===_?1:2.5,justifyContent:"center",alignItems:"center",maxWidth:"100%",height:"376px",borderRadius:"4px",boxShadow:"citizen"===_?"":"1px 1px 4px 0px rgba(0,0,0,0.2)",border:("citizen"===_?"8px":"24px")+" solid #fff",background:"#EEEEEE",padding:"citizen"===_?"8px":"16px"}},r.createElement("div",{style:{position:"relative",height:"citizen"===_?"114px":"150px",width:"citizen"===_?"114px":"150px",margin:"16px"}},r.createElement("img",{style:{margin:"auto",borderRadius:"300px",justifyContent:"center",height:"100%",width:"100%"},src:$&&""!==$?$:"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"}),r.createElement("button",{style:{position:"absolute",left:"50%",bottom:"-24px",transform:"translateX(-50%)"},onClick:function(){return Q(!J)}},r.createElement(t.CameraIcon,null)))),r.createElement("section",{style:{display:"flex",flexDirection:"column",flex:"citizen"===_?1:7.5,width:"100%",borderRadius:"4px",height:"fit-content",boxShadow:"citizen"===_?"":"1px 1px 4px 0px rgba(0,0,0,0.2)",background:"white",padding:"citizen"===_?"8px":"24px",paddingBottom:"20px"}},"citizen"===_?r.createElement(r.Fragment,null,r.createElement(t.LabelFieldPair,null,r.createElement(t.CardLabel,{style:{}},""+C("CORE_COMMON_PROFILE_NAME"),"*"),r.createElement("div",{style:{width:"100%",maxWidth:"960px"}},r.createElement(t.TextInput,d({t:C,style:{width:"100%"},type:"text",isMandatory:!1,name:"name",value:A,onChange:function(e){return Te(e.target.value)}},{isRequired:!0,pattern:"^[a-zA-Z-.`' ]*$",type:"tel",title:C("CORE_COMMON_PROFILE_NAME_ERROR_MESSAGE")},{disable:!1})),(null==we?void 0:we.userName)&&r.createElement(t.CardLabelError,null," ",null==we||null===(c=we.userName)||void 0===c?void 0:c.message," "))),r.createElement(t.LabelFieldPair,null,r.createElement(t.CardLabel,{style:{}},""+C("CORE_COMMON_PROFILE_GENDER")),r.createElement(t.Dropdown,{style:{width:"100%"},className:"form-field",selected:1===(null==U?void 0:U.length)?U[0]:U,disable:1===(null==U?void 0:U.length)||!1,option:Re,select:Ie,value:U,optionKey:"code",t:C,name:"gender"})),r.createElement(t.LabelFieldPair,null,r.createElement(t.CardLabel,{style:{}},""+C("CORE_COMMON_PROFILE_EMAIL")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:C,style:{width:"100%"},type:"email",isMandatory:!1,optionKey:"i18nKey",name:"email",value:P,onChange:function(e){return xe(e.target.value)},disable:!1}),(null==we?void 0:we.emailAddress)&&r.createElement(t.CardLabelError,null," ",null==we||null===(s=we.emailAddress)||void 0===s?void 0:s.message," "))),r.createElement("button",{onClick:Le,style:{marginTop:"24px",backgroundColor:"#F47738",width:"100%",height:"40px",color:"white",maxWidth:Ne?"100%":"240px",borderBottom:"1px solid black"}},C("CORE_COMMON_SAVE"))):r.createElement(r.Fragment,null,r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+C("CORE_COMMON_PROFILE_NAME"),"*"),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,d({t:C,type:"text",isMandatory:!1,name:"name",value:A,onChange:function(e){return Te(e.target.value)},placeholder:"Enter Your Name"},{isRequired:!0,pattern:"^[a-zA-Z-.`' ]*$",type:"text",title:C("CORE_COMMON_PROFILE_NAME_ERROR_MESSAGE")},{disable:!1})),(null==we?void 0:we.userName)&&r.createElement(t.CardLabelError,{style:{margin:0,padding:0}}," ",null==we||null===(f=we.userName)||void 0===f?void 0:f.message," "))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+C("CORE_COMMON_PROFILE_GENDER")),r.createElement(t.Dropdown,{style:{width:"100%"},selected:1===(null==U?void 0:U.length)?U[0]:U,disable:1===(null==U?void 0:U.length)||!1,option:Re,select:Ie,value:U,optionKey:"code",t:C,name:"gender"})),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+C("CORE_COMMON_PROFILE_CITY")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,d({t:C,type:"text",isMandatory:!1,name:"city",value:C("TENANT_TENANTS_"+F.toUpperCase()),onChange:function(e){return V(e.target.value)},placeholder:"Enter Your City Name"},{isRequired:!0,type:"text",title:C("CORE_COMMON_PROFILE_CITY_ERROR_MESSAGE")},{disable:!0})),r.createElement(t.CardLabelError,null))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},C("CORE_COMMON_PROFILE_MOBILE_NUMBER")+"*"),r.createElement("div",{style:{width:"100%"}},r.createElement(t.MobileNumber,{value:W,style:{width:"100%"},name:"mobileNumber",placeholder:"Enter a valid Mobile No.",onChange:function(e){return function(e){H(e),"employee"!==_||new RegExp(/^[6-9]{1}[0-9]{9}$/).test(e)?Se(d({},we,{mobileNumber:null})):Se(d({},we,{mobileNumber:{type:"pattern",message:"CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID"}}))}(e)},disable:!0,required:!0,pattern:"[6-9]{1}[0-9]{9}",type:"tel",title:C("CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID")}),(null==we?void 0:we.mobileNumber)&&r.createElement(t.CardLabelError,{style:{margin:0,padding:0}}," ",null==we||null===(v=we.mobileNumber)||void 0===v?void 0:v.message," "))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+C("CORE_COMMON_PROFILE_EMAIL")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:C,type:"email",isMandatory:!1,placeholder:C("EMAIL_VALIDATION"),optionKey:"i18nKey",name:"email",value:P,onChange:function(e){return xe(e.target.value)},disable:!1}),(null==we?void 0:we.emailAddress)&&r.createElement(t.CardLabelError,null," ",null==we||null===(m=we.emailAddress)||void 0===m?void 0:m.message," "))),r.createElement(t.LabelFieldPair,null,r.createElement("div",null,r.createElement("a",{style:(p={color:"orange",cursor:"default",marginBottom:"5"},p.cursor="pointer",p),onClick:function(){return ne(!te)}},C("CORE_COMMON_CHANGE_PASSWORD")),te?r.createElement("div",{style:{marginTop:"10px"}},r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+C("CORE_COMMON_PROFILE_CURRENT_PASSWORD")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:C,type:"password",isMandatory:!1,name:"name",pattern:"^([a-zA-Z0-9@#$%])+$",onChange:function(e){return oe(t=e.target.value),void(new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(t)?Se(d({},we,{currentPassword:null})):Se(d({},we,{currentPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}})));var t},disable:!1}),(null==we?void 0:we.currentPassword)&&r.createElement(t.CardLabelError,null,null==we||null===(g=we.currentPassword)||void 0===g?void 0:g.message))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+C("CORE_COMMON_PROFILE_NEW_PASSWORD")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:C,type:"password",isMandatory:!1,name:"name",pattern:"^([a-zA-Z0-9@#$%])+$",onChange:function(e){return se(t=e.target.value),void(new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(t)?Se(d({},we,{newPassword:null})):Se(d({},we,{newPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}})));var t},disable:!1}),(null==we?void 0:we.newPassword)&&r.createElement(t.CardLabelError,null,null==we||null===(h=we.newPassword)||void 0===h?void 0:h.message))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+C("CORE_COMMON_PROFILE_CONFIRM_PASSWORD")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:C,type:"password",isMandatory:!1,name:"name",pattern:"^([a-zA-Z0-9@#$%])+$",onChange:function(e){return ve(t=e.target.value),void(new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(t)?Se(d({},we,{confirmPassword:null})):Se(d({},we,{confirmPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}})));var t},disable:!1}),(null==we?void 0:we.confirmPassword)&&r.createElement(t.CardLabelError,null,null==we||null===(E=we.confirmPassword)||void 0===E?void 0:E.message)))):""))))),"employee"===_?r.createElement("div",{style:{height:"88px",backgroundColor:"#FFFFFF",display:"flex",justifyContent:"flex-end",marginTop:"64px",alignItems:"center"}},r.createElement("button",{onClick:Le,style:{marginTop:"24px",backgroundColor:"#F47738",width:be<768?"100%":"248px",height:"40px",float:"right",margin:be<768?"0 16px":"",marginRight:be<768?"16px":"31px",color:"white",borderBottom:"1px solid black"}},C("CORE_COMMON_SAVE"))):"",pe&&r.createElement(t.Toast,{error:"error"===pe.key,label:C("success"===pe.key?"CORE_COMMON_PROFILE_UPDATE_SUCCESS":pe.action),onClose:function(){return ge(null)},style:{maxWidth:"670px"}}),1==J?r.createElement(le,{setProfilePic:function(e){try{var t=function(e){Y(null==e?void 0:e.thumbs[0]),De()};return Z(e),Promise.resolve(e?Promise.resolve(function(e,t){try{return Promise.resolve(Digit.UploadServices.Filefetch(e,t)).then(function(e){return e.data.fileStoreIds&&0!==e.data.fileStoreIds.length?{thumbs:e.data.fileStoreIds.map(function(e){return e.url.split(",")[3]}),images:e.data.fileStoreIds.map(function(e){return Digit.Utils.getFileUrl(e.url)})}:null})}catch(e){return Promise.reject(e)}}([e],w)).then(t):t(null))}catch(e){return Promise.reject(e)}},closeDrawer:De,userType:_,removeProfilePic:function(){Z(null),Y(null)},showToast:Ae}):"")},se=function(e){var o,a,l,u=e.module,c=Digit.UserService.getUser(),s=((null==c||null===(o=c.info)||void 0===o?void 0:o.tenantId)||Digit.ULBService.getCurrentTenantId(),i.useTranslation().t),d=Digit.SessionStorage.get("initData").stateInfo,f=Digit.StoreData.getCurrentLanguage(),v=n.useState(f),m=v[0],p=v[1],g=n.useState(!1),h=g[0],E=g[1],y=n.useState(""),_=y[0],b=y[1],C=function(){return r.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.createElement("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"}))},O=Digit.Hooks.useGetHowItWorksJSON(Digit.ULBService.getStateId()),w=O.data,S=null==w||null===(a=w.MdmsRes["common-masters"])||void 0===a||null===(l=a.howItWorks[0])||void 0===l?void 0:l[""+u];return O.isLoading?r.createElement(t.Loader,null):r.createElement(n.Fragment,null,r.createElement("div",{className:"how-it-works-page"},r.createElement(t.BackButton,null),r.createElement("div",{className:"how-it-works-page-header"},r.createElement(t.Header,null,s("HOW_IT_WORKS"))),r.createElement("div",{className:"language-selector",style:{margin:"10px"}},[{label:"ENGLISH",value:"en_IN"},{label:"हिंदी",value:"hi_IN"}].map(function(e,n){return r.createElement("div",{className:"language-button-container",key:n},r.createElement(t.CustomButton,{selected:e.value===m,text:e.label,onClick:function(){return function(e){p(e.value),Digit.LocalizationService.changeLanguage(e.value,d.code)}(e)}}))})),S.videosJson.map(function(e,t){return r.createElement("div",null,r.createElement("div",{className:"WhatsNewCard",style:{float:"left",position:"relative",width:"100%",marginBottom:10}},r.createElement("div",{className:"video-icon",onClick:function(){return t=e,b("hi_IN"===m?t.hi_IN:t.en_IN),void E(!0);var t}},r.createElement("div",{className:"vid-svg"},r.createElement(C,null))),r.createElement("div",{className:"how-it-works-header-description"},r.createElement("h2",null,s(e.headerLabel)),r.createElement("p",null,s(e.description)))))}),r.createElement("div",{className:"WhatsNewCard",style:{position:"relative",width:"100%",marginBottom:10,display:"inline-block"}},r.createElement("div",{className:"how-it-works-pdf-section"},r.createElement("div",{className:"pdf-icon-header-desc"},r.createElement("div",{className:"pdf-icon"},r.createElement(t.PDFSvg,null)),r.createElement("div",{className:"pdf-header-desc"},r.createElement("h2",null,s(S.pdfHeader)),r.createElement("p",null,s(S.pdfDesc)))),r.createElement("div",{className:"download-icon"},r.createElement(t.DownloadImgIcon,null)))),h&&r.createElement("div",{className:"how-it-works-video-play"},r.createElement("div",{className:"close-button"},r.createElement(t.CloseSvg,{onClick:function(){E(!1)}})),r.createElement("video",{width:500,height:500,controls:!0,autoPlay:!0},r.createElement("source",{src:_,type:"video/mp4"})))))},de=[{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,pattern:/^[^{0-9}^\$\"<>?\\\\~!@#$%^()+={}\[\]*,/_:;“”‘’]{1,50}$/i}}]}],fe=function(e){var n=e.mobileNumber;return r.createElement(t.FormStep,{isDisabled:!(10===n.length&&e.canSubmit),onSelect:e.onSelect,config:e.config,t:e.t,componentInFront:"+91",onChange:e.onMobileChange,value:n})},ve=function(e){return r.createElement(t.FormStep,{config:e.config,onSelect:e.onSelect,t:e.t,isDisabled:e.isDisabled})},me=function(e){var i,o,a,l=e.config,u=e.otp,c=e.onOtpChange,s=e.onResend,d=e.onSelect,f=e.t,v=e.error,m=e.userType,p=void 0===m?"citizen":m,g=e.canSubmit,h=n.useState(30),E=h[0],y=h[1];i=function(){y(E-1)},o=E>0?1e3:null,a=n.useRef(),n.useEffect(function(){a.current=i},[i]),n.useEffect(function(){if(null!==o){var e=setInterval(function(){a.current()},o);return function(){return clearInterval(e)}}},[o]);var _=function(){s(),y(2)};return"employee"===p?r.createElement(n.Fragment,null,r.createElement(t.OTPInput,{length:6,onChange:c,value:u}),E>0?r.createElement(t.CardText,null,f("CS_RESEND_ANOTHER_OTP")+" "+E+" "+f("CS_RESEND_SECONDS")):r.createElement("p",{className:"card-text-button",onClick:_},f("CS_RESEND_OTP")),!v&&r.createElement(t.CardLabelError,null,f("CS_INVALID_OTP"))):r.createElement(t.FormStep,{onSelect:d,config:l,t:f,isDisabled:!(6===(null==u?void 0:u.length)&&g)},r.createElement(t.OTPInput,{length:6,onChange:c,value:u}),E>0?r.createElement(t.CardText,null,f("CS_RESEND_ANOTHER_OTP")+" "+E+" "+f("CS_RESEND_SECONDS")):r.createElement("p",{className:"card-text-button",onClick:_},f("CS_RESEND_OTP")),!v&&r.createElement(t.CardLabelError,null,f("CS_INVALID_OTP")))},pe=["ResponseInfo","UserRequest"],ge=["ResponseInfo","UserRequest"],he={type:"register"},Ee={type:"login"},ye="/"+(null===(ue=window)||void 0===ue?void 0:ue.contextPath)+"/citizen",_e=function(e,t){return(null==e?void 0:e.from)||(null==t?void 0:t.from)||ye},be=function(e){var o,a,u=e.stateCode,c=e.isUserRegistered,s=void 0===c||c,f=i.useTranslation().t,m=l.useLocation(),p=l.useRouteMatch().path,g=l.useHistory(),h=n.useState(null),E=h[0],y=h[1],_=n.useState(null),b=_[0],C=_[1],O=n.useState(!0),w=O[0],S=O[1],N=(n.useState(null),n.useState(s?{}:null==m||null===(o=m.state)||void 0===o?void 0:o.data)),I=N[0],D=N[1],T=n.useState(null),x=T[0],A=T[1],L=Digit.Hooks.useQueryParams(),R=n.useState(!1),P=R[0],M=R[1],k=n.useState(!0),U=k[0],j=k[1],B=n.useState(!0),F=B[0],V=B[1];n.useEffect(function(){var e;return b&&(x&&(clearTimeout(x),A(null)),e=setTimeout(function(){C("")},5e3),A(e)),function(){e&&clearTimeout(e)}},[b]),n.useEffect(function(){var e;if(E){var t,n,r,i,o,a;Digit.SessionStorage.set("citizen.userRequestObject",E),Digit.UserService.setUser(E),t=null==E?void 0:E.info,n=null==E?void 0:E.access_token,r=u,a=null===(i=JSON.parse(sessionStorage.getItem("Digit.initData")))||void 0===i||null===(o=i.value)||void 0===o?void 0:o.selectedLanguage,localStorage.setItem("Citizen.tenant-id",r),localStorage.setItem("tenant-id",r),localStorage.setItem("citizen.userRequestObject",JSON.stringify(t)),localStorage.setItem("locale",a),localStorage.setItem("Citizen.locale",a),localStorage.setItem("token",n),localStorage.setItem("Citizen.token",n),localStorage.setItem("user-info",JSON.stringify(t)),localStorage.setItem("Citizen.user-info",JSON.stringify(t));var l,c=(null===(e=m.state)||void 0===e?void 0:e.from)||ye;Digit.ULBService.getCitizenCurrentTenant(!0)?g.replace(c):g.replace("/"+(null===(l=window)||void 0===l?void 0:l.contextPath)+"/citizen/select-location",{redirectBackTo:c})}},[E]);var z=n.useMemo(function(){return de.map(function(e){var t={};for(var n in e.texts)t[n]=f(e.texts[n]);return d({},e,{texts:t})},[de])}),W=function(){return Digit.UserService.getType()},H=function(e){return Promise.resolve(ae(function(){return Promise.resolve(Digit.UserService.sendOtp(e,u)).then(function(e){return[e,null]})},function(e){return[null,e]}))};return r.createElement("div",{className:"citizen-form-wrapper"},r.createElement(l.Switch,null,r.createElement(t.AppContainer,null,r.createElement(t.BackButton,null),r.createElement(l.Route,{path:""+p,exact:!0},r.createElement(fe,{onSelect:function(e){try{V(!1),D(d({},I,e));var t=d({},e,{tenantId:u,userType:W()});return Promise.resolve(s?Promise.resolve(H({otp:d({},t,Ee)})).then(function(e){var n,r,i,o;if(!e[1])return V(!0),void g.replace(p+"/otp",{from:_e(m.state,L),role:null===(r=m.state)||void 0===r?void 0:r.role});V(!0),m.state&&"FSM_DSO"===m.state.role||g.push("/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/citizen/register/name",{from:_e(m.state,L),data:t}),null!==(n=m.state)&&void 0!==n&&n.role&&(V(!0),C("FSM_DSO"===(null===(o=m.state)||void 0===o?void 0:o.role)?f("ES_ERROR_DSO_LOGIN"):"User not registered."))}):Promise.resolve(H({otp:d({},t,he)})).then(function(e){if(!e[1])return V(!0),void g.replace(p+"/otp",{from:_e(m.state,L)});V(!0)}))}catch(e){return Promise.reject(e)}},config:z[0],mobileNumber:I.mobileNumber||"",onMobileChange:function(e){D(d({},I,{mobileNumber:e.target.value}))},canSubmit:F,showRegisterLink:s&&!(null!==(a=m.state)&&void 0!==a&&a.role),t:f})),r.createElement(l.Route,{path:p+"/otp"},r.createElement(me,{config:d({},z[1],{texts:d({},z[1].texts,{cardText:z[1].texts.cardText+" "+(I.mobileNumber||"")})}),onOtpChange:function(e){D(d({},I,{otp:e}))},onResend:function(){try{var e={mobileNumber:I.mobileNumber,tenantId:u,userType:W()},t=function(){if(!s)return Promise.resolve(H({otp:d({},e,he)})).then(function(){});var t=function(){if(s)return Promise.resolve(H({otp:d({},e,Ee)})).then(function(){})}();return t&&t.then?t.then(function(){}):void 0}();return Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},onSelect:function(){try{return Promise.resolve(ae(function(){S(!0),j(!1);var e=I.mobileNumber,t=I.otp,n=I.name;return function(){if(s){var r={username:e,password:t,tenantId:u,userType:W()};return Promise.resolve(Digit.UserService.authenticate(r)).then(function(e){var t,n,r,i=e.UserRequest,o=v(e,pe);if(null!==(t=m.state)&&void 0!==t&&t.role){var a=i.roles.find(function(e){return e.code===m.state.role});if(!a||!a.code)return C(f("ES_ERROR_USER_NOT_PERMITTED")),void setTimeout(function(){return g.replace(ye)},5e3)}null!==(n=window)&&void 0!==n&&null!==(r=n.globalConfigs)&&void 0!==r&&r.getConfig("ENABLE_SINGLEINSTANCE")&&(i.tenantId=Digit.ULBService.getStateId()),y(d({info:i},o))})}var i=function(){if(!s)return Promise.resolve(Digit.UserService.registerUser({name:n,username:e,otpReference:t,tenantId:u},u)).then(function(e){var t,n,r=e.UserRequest,i=v(e,ge);null!==(t=window)&&void 0!==t&&null!==(n=t.globalConfigs)&&void 0!==n&&n.getConfig("ENABLE_SINGLEINSTANCE")&&(r.tenantId=Digit.ULBService.getStateId()),y(d({info:r},i))})}();if(i&&i.then)return i.then(function(){})}()},function(){j(!0),S(!1)}))}catch(e){return Promise.reject(e)}},otp:I.otp,error:w,canSubmit:U,t:f})),r.createElement(l.Route,{path:p+"/name"},r.createElement(ve,{config:z[2],onSelect:function(e){try{var t=d({},I,{tenantId:u,userType:W()},e);return D(d({},I,e)),M(!0),Promise.resolve(H({otp:d({},t,he)})).then(function(e){e[0]?(M(!1),g.replace(p+"/otp",{from:_e(m.state,L)})):M(!1)})}catch(e){return Promise.reject(e)}},t:f,isDisabled:P})),b&&r.createElement(t.Toast,{error:!0,label:b,onClose:function(){return C(null)}}))))},Ce=function(e){return e instanceof HTMLElement},Oe=function(e){return null==e},we=function(e){return"object"==typeof e},Se=function(e){return!Oe(e)&&!Array.isArray(e)&&we(e)&&!(e instanceof Date)},Ne=function(e){return/^\w*$/.test(e)},Ie=function(e){return e.filter(Boolean)},De=function(e){return Ie(e.replace(/["|']/g,"").replace(/\[/g,".").replace(/\]/g,"").split("."))};function Te(e,t,n){for(var r=-1,i=Ne(t)?[t]:De(t),o=i.length,a=o-1;++r<o;){var l=i[r],u=n;if(r!==a){var c=e[l];u=Se(c)||Array.isArray(c)?c:isNaN(+i[r+1])?{}:[]}e[l]=u,e=e[l]}return e}var xe=function(e,t){for(var n in void 0===t&&(t={}),e)Ne(n)?t[n]=e[n]:Te(t,n,e[n]);return t},Ae=function(e){return void 0===e},Le=function(e,t,n){void 0===e&&(e={});var r=Ie(t.split(/[,[\].]+?/)).reduce(function(e,t){return Oe(e)?e:e[t]},e);return Ae(r)||r===e?Ae(e[t])?n:e[t]:r},Re=function(e,t){Ce(e)&&e.removeEventListener&&(e.removeEventListener("input",t),e.removeEventListener("change",t),e.removeEventListener("blur",t))},Pe={isValid:!1,value:null},Me=function(e){return Array.isArray(e)?e.reduce(function(e,t){return t&&t.ref.checked?{isValid:!0,value:t.ref.value}:e},Pe):Pe},ke=function(e){return"radio"===e.type},Ue=function(e){return"file"===e.type},je=function(e){return"checkbox"===e.type},Be=function(e){return"select-multiple"===e.type},Fe={value:!1,isValid:!1},Ve={value:!0,isValid:!0},ze=function(e){if(Array.isArray(e)){if(e.length>1){var t=e.filter(function(e){return e&&e.ref.checked}).map(function(e){return e.ref.value});return{value:t,isValid:!!t.length}}var n=e[0].ref,r=n.value,i=n.attributes;return n.checked?i&&!Ae(i.value)?Ae(r)||""===r?Ve:{value:r,isValid:!0}:Ve:Fe}return Fe};function We(e,t,n,r,i){var o=e.current[t];if(o){var a=o.ref,l=a.value,u=o.ref,c=o.valueAsNumber,s=o.valueAsDate,d=o.setValueAs;if(a.disabled&&r)return;return Ue(u)?u.files:ke(u)?Me(o.options).value:Be(u)?[].concat(u.options).filter(function(e){return e.selected}).map(function(e){return e.value}):je(u)?ze(o.options).value:i?l:c?""===l?NaN:+l:s?u.valueAsDate:d?d(l):l}if(n)return Le(n.current,t)}function He(e){return!e||e instanceof HTMLElement&&e.nodeType!==Node.DOCUMENT_NODE&&He(e.parentNode)}var Ge=function(e){return Se(e)&&!Object.keys(e).length},qe=function(e){return"boolean"==typeof e};function Ze(e,t){var n,r=Ne(t)?[t]:De(t),i=1==r.length?e:function(e,t){for(var n=t.slice(0,-1).length,r=0;r<n;)e=Ae(e)?r++:e[t[r++]];return e}(e,r);i&&delete i[r[r.length-1]];for(var o=0;o<r.slice(0,-1).length;o++){var a=-1,l=void 0,u=r.slice(0,-(o+1)),c=u.length-1;for(o>0&&(n=e);++a<u.length;){var s=u[a];l=l?l[s]:e[s],c===a&&(Se(l)&&Ge(l)||Array.isArray(l)&&!l.filter(function(e){return Se(e)&&!Ge(e)||qe(e)}).length)&&(n?delete n[s]:delete e[s]),n=l}}return e}var Xe=function(e,t){return e&&e.ref===t},$e=function(e){return Oe(e)||!we(e)};function Ye(e,t){if($e(e)||$e(t))return t;for(var n in t){var r=e[n],i=t[n];try{e[n]=Se(r)&&Se(i)||Array.isArray(r)&&Array.isArray(i)?Ye(r,i):i}catch(e){}}return e}function Ke(e,t,r){if($e(e)||$e(t)||e instanceof Date||t instanceof Date)return e===t;if(!n.isValidElement(e)){var i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;for(var a=0,l=i;a<l.length;a++){var u=l[a],c=e[u];if(!r||"ref"!==u){var s=t[u];if((Se(c)||Array.isArray(c))&&(Se(s)||Array.isArray(s))?!Ke(c,s,r):c!==s)return!1}}}return!0}function Je(e,t,n,r,i){for(var o=-1;++o<e.length;){for(var a in e[o]){var l;Array.isArray(e[o][a])?(!n[o]&&(n[o]={}),n[o][a]=[],Je(e[o][a],Le(t[o]||{},a,[]),n[o][a],n[o],a)):Ke(Le(t[o]||{},a),e[o][a])?Te(n[o]||{},a):n[o]=Object.assign(Object.assign({},n[o]),((l={})[a]=!0,l))}r&&!n.length&&delete r[i]}return n}var Qe=function(e){return"string"==typeof e},et=function(e,t,n,r,i){var o={},a=function(t){(Ae(i)||(Qe(i)?t.startsWith(i):Array.isArray(i)&&i.find(function(e){return t.startsWith(e)})))&&(o[t]=We(e,t,void 0,r))};for(var l in e.current)a(l);return n?xe(o):Ye(t,xe(o))},tt=function(e){return e instanceof RegExp},nt=function(e){return Se(e)&&!tt(e)?e:{value:e,message:""}},rt=function(e){return"function"==typeof e},it=function(e){return Qe(e)||n.isValidElement(e)};function ot(e,t,n){if(void 0===n&&(n="validate"),it(e)||qe(e)&&!e)return{type:n,message:it(e)?e:"",ref:t}}var at=function(e,t,n,r,i){var o;return t?Object.assign(Object.assign({},n[e]),{types:Object.assign(Object.assign({},n[e]&&n[e].types?n[e].types:{}),(o={},o[r]=i||!0,o))}):{}},lt=function(e,t,n,r){var i=n.ref,o=n.ref.value,a=n.options,l=n.required,u=n.maxLength,c=n.minLength,s=n.min,d=n.max,f=n.pattern,v=n.validate;try{var m=!1,p=i.name,g={},h=ke(i),E=je(i),y=h||E,_=""===o,b=at.bind(null,p,t,g),C=function(e,t,n,r,o){void 0===r&&(r="maxLength"),void 0===o&&(o="minLength");var a=e?t:n;g[p]=Object.assign({type:e?r:o,message:a,ref:i},b(e?r:o,a))};if(l&&(!h&&!E&&(_||Oe(o))||qe(o)&&!o||E&&!ze(a).isValid||h&&!Me(a).isValid)){var O=it(l)?{value:!!l,message:l}:nt(l),w=O.message;if(O.value&&(g[p]=Object.assign({type:"required",message:w,ref:y?((e.current[p].options||[])[0]||{}).ref:i},b("required",w)),!t))return Promise.resolve(g)}if(!(Oe(s)&&Oe(d)||""===o)){var S,N,I=nt(d),D=nt(s);if(isNaN(o)){var T=i.valueAsDate||new Date(o);Qe(I.value)&&(S=T>new Date(I.value)),Qe(D.value)&&(N=T<new Date(D.value))}else{var x=i.valueAsNumber||parseFloat(o);Oe(I.value)||(S=x>I.value),Oe(D.value)||(N=x<D.value)}if((S||N)&&(C(!!S,I.message,D.message,"max","min"),!t))return Promise.resolve(g)}if(Qe(o)&&!_&&(u||c)){var A=nt(u),L=nt(c),R=!Oe(A.value)&&o.length>A.value,P=!Oe(L.value)&&o.length<L.value;if((R||P)&&(C(R,A.message,L.message),!t))return Promise.resolve(g)}if(Qe(o)&&f&&!_){var M=nt(f),k=M.value,U=M.message;if(tt(k)&&!k.test(o)&&(g[p]=Object.assign({type:"pattern",message:U,ref:i},b("pattern",U)),!t))return Promise.resolve(g)}var j=function(){if(v){var n=We(e,p,r,!1,!0),o=y&&a?a[0].ref:i;return rt(v)?Promise.resolve(v(n)).then(function(e){var n=ot(e,o);if(n&&(g[p]=Object.assign(Object.assign({},n),b("validate",n.message)),!t))return m=!0,g}):function(){if(Se(v)){var e=function(){if(!Ge(i)&&(g[p]=Object.assign({ref:o},i),!t))return m=!0,g},r=!1,i={},a=oe(Object.entries(v),function(e){var a=e[0],l=e[1];if(Ge(i)||t)return Promise.resolve(l(n)).then(function(e){var n=ot(e,o,a);n&&(i=Object.assign(Object.assign({},n),b(a,n.message)),t&&(g[p]=i))});r=!0},function(){return r});return a&&a.then?a.then(e):e()}}()}}();return Promise.resolve(j&&j.then?j.then(function(e){return m?e:g}):m?j:g)}catch(e){return Promise.reject(e)}},ut=function e(t,n,r){for(var i in void 0===r&&(r=[]),n){var o=t+(Se(n)?"."+i:"["+i+"]");$e(n[i])?r.push(o):e(o,n[i],r)}return r},ct=function(e,t,n,r,i){var o=void 0;return n.add(t),Ge(e)||(o=Le(e,t),(Se(o)||Array.isArray(o))&&ut(t,o).forEach(function(e){return n.add(e)})),Ae(o)?i?r:Le(r,t):o},st=function(e){var t=e.isBlurEvent,n=e.isSubmitted;return!e.isOnAll&&(!n&&e.isOnTouch?!(e.isTouched||t):(n?e.isReValidateOnBlur:e.isOnBlur)?!t:!(n?e.isReValidateOnChange:e.isOnChange)||t)},dt=function(e){return e.substring(0,e.indexOf("["))},ft=function(e,t){return[].concat(e).some(function(e){return function(e,t){return RegExp(("^"+t+"([|.)\\d+").replace(/\[/g,"\\[").replace(/\]/g,"\\]")).test(e)}(t,e)})},vt="undefined"!=typeof window&&"undefined"!=typeof document;function mt(e){var t,n;if($e(e)||vt&&(e instanceof File||Ce(e)))return e;if(!["Set","Map","Object","Date","Array"].includes(null===(t=e.constructor)||void 0===t?void 0:t.name))return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Set){n=new Set;for(var r,i=g(e);!(r=i()).done;)n.add(r.value);return n}if(e instanceof Map){n=new Map;for(var o,a=g(e.keys());!(o=a()).done;){var l=o.value;n.set(l,mt(e.get(l)))}return n}for(var u in n=Array.isArray(e)?[]:{},e)n[u]=mt(e[u]);return n}var pt=function(e){return{isOnSubmit:!e||"onSubmit"===e,isOnBlur:"onBlur"===e,isOnChange:"onChange"===e,isOnAll:"all"===e,isOnTouch:"onTouched"===e}},gt=function(e){return ke(e)||je(e)},ht="undefined"==typeof window,Et=vt?"Proxy"in window:"undefined"!=typeof Proxy,yt=n.createContext(null);yt.displayName="RHFContext";var _t,bt,Ct,Ot,wt,St=function(e){var t=e.as,r=e.render,i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["rules","as","render","defaultValue","control","onFocus"]),o=function(e){var t=e.name,r=e.rules,i=e.defaultValue,o=e.control,a=e.onFocus,l=n.useContext(yt);if("production"!==process.env.NODE_ENV&&!o&&!l)throw new Error("📋 Controller is missing `control` prop. https://react-hook-form.com/api#Controller");var u=o||l.control,c=u.defaultValuesRef,s=u.setValue,d=u.register,f=u.unregister,v=u.trigger,m=u.mode,p=u.reValidateMode,g=p.isReValidateOnBlur,h=p.isReValidateOnChange,E=u.formState,y=u.formStateRef.current,_=y.isSubmitted,b=y.touched,C=y.errors,O=u.updateFormState,w=u.readFormStateRef,S=u.fieldsRef,N=u.shallowFieldsStateRef,I=!ft(u.fieldArrayNamesRef.current,t),D=function(){return!Ae(Le(N.current,t))&&I?Le(N.current,t):Ae(i)?Le(c.current,t):i},T=n.useState(D()),x=T[0],A=T[1],L=n.useRef(x),R=n.useRef({focus:function(){return null}}),P=n.useRef(a||function(){rt(R.current.focus)&&R.current.focus(),"production"!==process.env.NODE_ENV&&(rt(R.current.focus)||console.warn("📋 'ref' from Controller render prop must be attached to a React component or a DOM Element whose ref provides a 'focus()' method"))}),M=n.useCallback(function(e){return!st(Object.assign({isBlurEvent:e,isReValidateOnBlur:g,isReValidateOnChange:h,isSubmitted:_,isTouched:!!Le(b,t)},m))},[g,h,_,b,t,m]),k=n.useCallback(function(e){var t,n=$e(t=e[0])||!Se(t.target)||Se(t.target)&&!t.type?t:Ae(t.target.value)?t.target.checked:t.target.value;return A(n),L.current=n,n},[]),U=n.useCallback(function(e){if("production"!==process.env.NODE_ENV&&!t)return console.warn("📋 Field is missing `name` prop. https://react-hook-form.com/api#Controller");S.current[t]?S.current[t]=Object.assign({ref:S.current[t].ref},r):(d(Object.defineProperties({name:t,focus:P.current},{value:{set:function(e){A(e),L.current=e},get:function(){return L.current}}}),r),e=Ae(Le(c.current,t))),e&&I&&A(D())},[r,t,d]);n.useEffect(function(){return function(){return f(t)}},[t]),n.useEffect(function(){"production"!==process.env.NODE_ENV&&(Ae(x)&&console.warn("📋 "+t+" is missing in the 'defaultValue' prop of either its Controller (https://react-hook-form.com/api#Controller) or useForm (https://react-hook-form.com/api#useForm)"),!I&&Ae(i)&&console.warn("📋 Controller is missing `defaultValue` prop when using `useFieldArray`. https://react-hook-form.com/api#Controller")),U()},[U]),n.useEffect(function(){!S.current[t]&&U(!0)});var j=n.useCallback(function(){w.current.touched&&!Le(b,t)&&(Te(b,t,!0),O({touched:b})),M(!0)&&v(t)},[t,O,M,v,w]);return{field:{onChange:n.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return s(t,k(n),{shouldValidate:M(),shouldDirty:!0})},[s,t,M]),onBlur:j,name:t,value:x,ref:R},meta:Object.defineProperties({invalid:!!Le(C,t)},{isDirty:{get:function(){return!!Le(E.dirtyFields,t)}},isTouched:{get:function(){return!!Le(E.touched,t)}}})}}(e),a=o.field,l=o.meta,u=Object.assign(Object.assign({},i),a);return t?n.isValidElement(t)?n.cloneElement(t,u):n.createElement(t,u):r?r(a,l):null},Nt=function(e){var n=e.control,i=e.t,o=window.Digit.Utils.browser.isMobile();return r.createElement(Fragment,null,r.createElement(t.SearchField,{className:"pt-form-field"},r.createElement("label",null,i("AUDIT_FROM_DATE_LABEL")),r.createElement(St,{render:function(e){return r.createElement(t.DatePicker,{date:e.value,onChange:e.onChange})},name:"fromDate",control:n})),r.createElement(t.SearchField,{className:"pt-form-field"},r.createElement("label",null,i("AUDIT_TO_DATE_LABEL")),r.createElement(St,{render:function(e){return r.createElement(t.DatePicker,{date:e.value,onChange:e.onChange})},name:"toDate",control:n})),r.createElement(t.SearchField,{className:"pt-search-action-submit"},r.createElement(t.SubmitBar,{style:{marginTop:o?"510px":"25px",marginLeft:o?"0":"-30px",maxWidth:o?"100%":"240px"},label:i("ES_COMMON_APPLY"),submit:!0})))},It=["currentlyActiveMobileModal","searchFormFieldsComponentProps","tenantId"],Dt=["currentlyActiveMobileModal","searchFormFieldsComponentProps","tenantId"],Tt=function(e){var i,o=e.Controller,a=e.register,l=e.control,u=e.t,c=e.reset,s=e.previousPage,f=e.handleSubmit,m=e.tenantId,p=e.data,g=e.onSubmit,h=e.isLoading,E=n.useState([]),y=E[0],_=E[1],b=function(e){return r.createElement("div",{onClick:e.onClick},r.createElement(t.DownloadBtnCommon,null))};n.useEffect(function(){(null==p?void 0:p.length)>0&&_([null==p?void 0:p.map(function(e){var t={};return t[u("AUDIT_DATE_LABEL")]=C(null==e?void 0:e.timestamp),t[u("AUDIT_TIME_LABEL")]=O(null==e?void 0:e.timestamp),t[u("AUDIT_DATAVIEWED_LABEL")]=(null==e?void 0:e.dataView[0])+","+(null==e?void 0:e.dataView[1]),t[u("AUDIT_DATAVIEWED_BY_LABEL")]=null==e?void 0:e.dataViewedBy,t[u("AUDIT_ROLE_LABEL")]=null==e?void 0:e.roles.map(function(e){return e.name}).join(","),d({},t)})])},[p]);var C=function(e){if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getMonth()+1,r=t.getDate();return(r=(r>9?"":"0")+r)+"/"+(n=(n>9?"":"0")+n)+"/"+t.getFullYear()},O=function(e){if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getHours(),r=t.getMinutes(),i=n>12?"PM":"AM";return(n=((n=n>12?n-12:n)>9?"":"0")+n)+":"+(r=(r>9?"":"0")+r)+" "+i},w=n.useReducer(function(e,t){switch(t.type){case"set":return t.payload;case"remove":return!1}},!1),S=w[0],N=w[1],I=function(){N({type:"remove"})},D=function(){return r.createElement("div",{className:"InboxMobilePopupCloseButtonWrapper",onClick:I},r.createElement(t.CloseSvg,null))},T={Controller:o,register:a,control:l,t:u,reset:c,previousPage:s},x=n.useCallback(function(e){return function(e){var n=e.currentlyActiveMobileModal,i=e.searchFormFieldsComponentProps,o=e.tenantId,a=v(e,It),l=a.closeMobilePopupModal;switch(n){case"SearchFormComponent":return r.createElement(t.SearchForm,a,r.createElement(D,null),r.createElement("div",{className:"MobilePopupHeadingWrapper"},r.createElement("h2",null,u("PRIVACY_AUDIT_REPORT"),":")),r.createElement(Nt,d({},i,{closeMobilePopupModal:l,tenantId:o,t:u})));default:return r.createElement("span",null)}}(d({currentlyActiveMobileModal:e.currentlyActiveMobileModal,searchFormFieldsComponentProps:e.searchFormFieldsComponentProps,tenantId:e.tenantId},v(e,Dt)))},[S]);null==p||null===(i=p.roles)||void 0===i||i.forEach(function(e){});var A=n.useMemo(function(){return null!=p&&p.display||""===p?[]:null==p?void 0:p.map(function(e){var t,n;return(n={})[u("AUDIT_DATE_LABEL")]=C(e.timestamp),n[u("AUDIT_TIME_LABEL")]=O(e.timestamp),n[u("AUDIT_DATAVIEWED_LABEL")]=e.dataView[0]+","+e.dataView[1],n[u("AUDIT_DATAVIEWED_BY_LABEL")]=e.dataViewedBy,n[u("AUDIT_ROLE_LABEL")]=null===(t=e.roles.slice(0,3))||void 0===t?void 0:t.map(function(e){return e.name}).join(","),n})},[p]);return r.createElement(r.Fragment,null,r.createElement(t.BackButton,null),r.createElement("div",{className:"sideContent",style:{marginLeft:"70%",marginTop:"-12%"}},r.createElement(b,{className:"mrlg cursorPointer",onClick:function(){return function(e){if(void 0!==(null==e?void 0:e[0]))return Digit.Download.Excel(null==e?void 0:e[0],"AuditReport")}(y)}})),r.createElement(t.Header,null,u("PRIVACY_AUDIT_REPORT"),":"),r.createElement("div",{className:"searchBox"},r.createElement(t.SearchAction,{text:u("ES_COMMON_SEARCH"),handleActionClick:function(){return N({type:"set",payload:"SearchFormComponent"})},tenantId:m,t:u})),S?r.createElement(t.PopUp,null,r.createElement(x,{onSubmit:function(e){N({type:"remove"}),g(e)},handleSubmit:f,id:"search-form",className:"rm-mb form-field-flex-one inboxPopupMobileWrapper",searchFormFieldsComponentProps:T,currentlyActiveMobileModal:S,closeMobilePopupModal:I,tenantId:m})):null,h&&r.createElement(t.Loader,null),r.createElement(t.DetailsCard,{data:A}))},xt=function(e){var i=e.tenantId,o=e.t,a=e.onSubmit,l=e.data,u=e.count,c=function(e){var t=void 0===e?{}:e,r=t.mode,i=void 0===r?"onSubmit":r,o=t.reValidateMode,a=void 0===o?"onChange":o,l=t.resolver,u=t.context,c=t.defaultValues,s=void 0===c?{}:c,d=t.shouldFocusError,f=void 0===d||d,v=t.shouldUnregister,m=void 0===v||v,p=t.criteriaMode,h=n.useRef({}),E=n.useRef({}),y=n.useRef({}),_=n.useRef(new Set),b=n.useRef({}),C=n.useRef({}),O=n.useRef({}),w=n.useRef({}),S=n.useRef(s),N=n.useRef(!1),I=n.useRef(!1),D=n.useRef(),T=n.useRef({}),x=n.useRef({}),A=n.useRef(u),L=n.useRef(l),R=n.useRef(new Set),P=n.useRef(pt(i)),M=P.current,k=M.isOnSubmit,U=M.isOnTouch,j="all"===p,B=n.useState({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touched:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!k,errors:{}}),F=B[0],V=B[1],z=n.useRef({isDirty:!Et,dirtyFields:!Et,touched:!Et||U,isValidating:!Et,isSubmitting:!Et,isValid:!Et}),W=n.useRef(F),H=n.useRef(),G=n.useRef(pt(a)).current,q=G.isOnBlur,Z=G.isOnChange;A.current=u,L.current=l,W.current=F,T.current=m?{}:Ge(T.current)?mt(s):T.current;var X=n.useCallback(function(e){void 0===e&&(e={}),N.current||(W.current=Object.assign(Object.assign({},W.current),e),V(W.current))},[]),$=function(){return z.current.isValidating&&X({isValidating:!0})},Y=n.useCallback(function(e,t,n,r,i){void 0===n&&(n=!1),void 0===r&&(r={});var o=n||function(e){var t=e.errors,n=e.name,r=e.error,i=e.validFields,o=e.fieldsWithValidation,a=Ae(r),l=Le(t,n);return a&&!!l||!a&&!Ke(l,r,!0)||a&&Le(o,n)&&!Le(i,n)}({errors:W.current.errors,error:t,name:e,validFields:w.current,fieldsWithValidation:O.current}),a=Le(W.current.errors,e);t?(Ze(w.current,e),o=o||!a||!Ke(a,t,!0),Te(W.current.errors,e,t)):((Le(O.current,e)||L.current)&&(Te(w.current,e,!0),o=o||a),Ze(W.current.errors,e)),(o&&!Oe(n)||!Ge(r)||z.current.isValidating)&&X(Object.assign(Object.assign(Object.assign({},r),L.current?{isValid:!!i}:{}),{isValidating:!1}))},[]),K=n.useCallback(function(e,t){var n=h.current[e],r=n.ref,i=n.options,o=vt&&Ce(r)&&Oe(t)?"":t;ke(r)?(i||[]).forEach(function(e){var t=e.ref;return t.checked=t.value===o}):Ue(r)&&!Qe(o)?r.files=o:Be(r)?[].concat(r.options).forEach(function(e){return e.selected=o.includes(e.value)}):je(r)&&i?i.length>1?i.forEach(function(e){var t=e.ref;return t.checked=Array.isArray(o)?!!o.find(function(e){return e===t.value}):o===t.value}):i[0].ref.checked=!!o:r.value=o},[]),J=n.useCallback(function(e,t){if(z.current.isDirty){var n=ce();return e&&t&&Te(n,e,t),!Ke(n,S.current)}return!1},[]),Q=n.useCallback(function(e,t){if(void 0===t&&(t=!0),z.current.isDirty||z.current.dirtyFields){var n=!Ke(Le(S.current,e),We(h,e,T)),r=Le(W.current.dirtyFields,e),i=W.current.isDirty;n?Te(W.current.dirtyFields,e,!0):Ze(W.current.dirtyFields,e);var o={isDirty:J(),dirtyFields:W.current.dirtyFields},a=z.current.isDirty&&i!==o.isDirty||z.current.dirtyFields&&r!==Le(W.current.dirtyFields,e);return a&&t&&X(o),a?o:{}}return{}},[]),ee=n.useCallback(function(e,t){try{return"production"===process.env.NODE_ENV||h.current[e]?Promise.resolve(lt(h,j,h.current[e],T)).then(function(n){var r=n[e];return Y(e,r,t),Ae(r)}):(console.warn("📋 Field is missing with `name` attribute: ",e),Promise.resolve(!1))}catch(e){return Promise.reject(e)}},[Y,j]),te=n.useCallback(function(e){try{return Promise.resolve(L.current(ce(),A.current,j)).then(function(t){var n=t.errors,r=W.current.isValid;if(Array.isArray(e)){var i=e.map(function(e){var t=Le(n,e);return t?Te(W.current.errors,e,t):Ze(W.current.errors,e),!t}).every(Boolean);return X({isValid:Ge(n),isValidating:!1}),i}var o=Le(n,e);return Y(e,o,r!==Ge(n),{},Ge(n)),!o})}catch(e){return Promise.reject(e)}},[Y,j]),ne=n.useCallback(function(e){try{var t=function(e){return n?e:Promise.resolve(ee(r))},n=!1,r=e||Object.keys(h.current);if($(),L.current)return Promise.resolve(te(r));var i=function(){if(Array.isArray(r))return!e&&(W.current.errors={}),Promise.resolve(Promise.all(r.map(function(e){try{return Promise.resolve(ee(e,null))}catch(e){return Promise.reject(e)}}))).then(function(e){X({isValidating:!1});var t=e.every(Boolean);return n=!0,t})}();return Promise.resolve(i&&i.then?i.then(t):t(i))}catch(e){return Promise.reject(e)}},[te,ee]),re=n.useCallback(function(e,t,n){var r=n.shouldDirty,i=n.shouldValidate,o={};Te(o,e,t);for(var a,l=g(ut(e,t));!(a=l()).done;){var u=a.value;h.current[u]&&(K(u,Le(o,u)),r&&Q(u),i&&ne(u))}},[ne,K,Q]),ie=n.useCallback(function(e,t,n){if(!m&&!$e(t)&&Te(T.current,e,Array.isArray(t)?[].concat(t):Object.assign({},t)),h.current[e])K(e,t),n.shouldDirty&&Q(e),n.shouldValidate&&ne(e);else if(!$e(t)&&(re(e,t,n),R.current.has(e))){var r,i,o=dt(e)||e;Te(E.current,e,t),x.current[o](((r={})[o]=Le(E.current,o),r)),(z.current.isDirty||z.current.dirtyFields)&&n.shouldDirty&&(Te(W.current.dirtyFields,e,function(e,t,n){return Ye(Je(e,t,n.slice(0,e.length)),Je(t,e,n.slice(0,e.length)))}(t,Le(S.current,e,[]),Le(W.current.dirtyFields,e,[]))),X({isDirty:!Ke(Object.assign(Object.assign({},ce()),(i={},i[e]=t,i)),S.current)}))}!m&&Te(T.current,e,t)},[Q,K,re]),ae=function(e){return I.current||_.current.has(e)||_.current.has((e.match(/\w+/)||[])[0])},le=function(e){var t=!0;if(!Ge(b.current))for(var n in b.current)e&&b.current[n].size&&!b.current[n].has(e)&&!b.current[n].has(dt(e))||(C.current[n](),t=!1);return t};function ue(e){if(!m){for(var t,n=mt(e),r=g(R.current);!(t=r()).done;){var i,o=t.value;Ne(o)&&!n[o]&&(n=Object.assign(Object.assign({},n),((i={})[o]=[],i)))}return n}return e}function ce(e){if(Qe(e))return We(h,e,T);if(Array.isArray(e)){for(var t,n={},r=g(e);!(t=r()).done;){var i=t.value;Te(n,i,We(h,i,T))}return n}return ue(et(h,mt(T.current),m))}D.current=D.current?D.current:function(e){var t=e.type,n=e.target;try{var r,i,o=n.name,a=h.current[o];return Promise.resolve(function(){if(a){var e=function(){!l&&le(o),Y(o,r,s,c,i)},l="blur"===t,u=st(Object.assign({isBlurEvent:l,isReValidateOnChange:Z,isReValidateOnBlur:q,isTouched:!!Le(W.current.touched,o),isSubmitted:W.current.isSubmitted},P.current)),c=Q(o,!1),s=!Ge(c)||!l&&ae(o);if(l&&!Le(W.current.touched,o)&&z.current.touched&&(Te(W.current.touched,o,!0),c=Object.assign(Object.assign({},c),{touched:W.current.touched})),!m&&je(n)&&Te(T.current,o,We(h,o)),u)return!l&&le(o),(!Ge(c)||s&&Ge(c))&&X(c);$();var d=L.current?Promise.resolve(L.current(ce(),A.current,j)).then(function(e){var t=e.errors,a=W.current.isValid;if(r=Le(t,o),je(n)&&!r&&L.current){var l=dt(o),u=Le(t,l,{});u.type&&u.message&&(r=u),l&&(u||Le(W.current.errors,l))&&(o=l)}a!==(i=Ge(t))&&(s=!0)}):Promise.resolve(lt(h,j,a,T)).then(function(e){r=e[o]});return d&&d.then?d.then(e):e()}}())}catch(e){return Promise.reject(e)}};var se=n.useCallback(function(e){void 0===e&&(e={});try{var t=Ge(h.current)?S.current:{};return Promise.resolve(L.current(Object.assign(Object.assign(Object.assign({},t),ce()),e),A.current,j)).then(function(e){var t=Ge(e.errors);W.current.isValid!==t&&X({isValid:t})})}catch(e){return Promise.reject(e)}},[j]),de=n.useCallback(function(e,t){!function(e,t,n,r,i,o){var a=n.ref,l=n.ref.name,u=e.current[l];if(!i){var c=We(e,l,r);!Ae(c)&&Te(r.current,l,c)}a.type&&u?ke(a)||je(a)?Array.isArray(u.options)&&u.options.length?(Ie(u.options).forEach(function(e,n){void 0===e&&(e={}),(He(e.ref)&&Xe(e,e.ref)||o)&&(Re(e.ref,t),Ze(u.options,"["+n+"]"))}),u.options&&!Ie(u.options).length&&delete e.current[l]):delete e.current[l]:(He(a)&&Xe(u,a)||o)&&(Re(a,t),delete e.current[l]):delete e.current[l]}(h,D.current,e,T,m,t),m&&(Ze(w.current,e.ref.name),Ze(O.current,e.ref.name))},[m]),fe=n.useCallback(function(e){if(I.current)X();else{for(var t,n=g(_.current);!(t=n()).done;)if(t.value.startsWith(e)){X();break}le(e)}},[]),ve=n.useCallback(function(e,t){e&&(de(e,t),m&&!Ie(e.options||[]).length&&(Ze(W.current.errors,e.ref.name),Te(W.current.dirtyFields,e.ref.name,!0),X({isDirty:J()}),z.current.isValid&&L.current&&se(),fe(e.ref.name)))},[se,de]),me=n.useCallback(function(e,t,n){var r=n?b.current[n]:_.current,i=et(h,mt(T.current),m,!1,e);if(Qe(e)){var o=dt(e)||e;return R.current.has(o)&&(i=Object.assign(Object.assign({},y.current),i)),ct(i,e,r,Ae(Le(S.current,e))?t:Le(S.current,e),!0)}var a=Ae(t)?S.current:t;return Array.isArray(e)?e.reduce(function(e,t){var n;return Object.assign(Object.assign({},e),((n={})[t]=ct(i,t,r,a),n))},{}):(I.current=Ae(n),xe(!Ge(i)&&i||a))},[]);function pe(e,t){if(void 0===t&&(t={}),"production"!==process.env.NODE_ENV){if(!e.name)return console.warn("📋 Field is missing `name` attribute",e,"https://react-hook-form.com/api#useForm");if(R.current.has(e.name.split(/\[\d+\]$/)[0])&&!RegExp(("^"+e.name.split(/\[\d+\]$/)[0]+"[\\d+].\\w+").replace(/\[/g,"\\[").replace(/\]/g,"\\]")).test(e.name))return console.warn('📋 `name` prop should be in object shape: name="test[index].name"',e,"https://react-hook-form.com/api#useFieldArray")}var n,r=e.name,i=e.type,o=e.value,a=Object.assign({ref:e},t),l=h.current,u=gt(e),c=ft(R.current,r),s=function(t){return vt&&(!Ce(e)||t===e)},d=l[r],f=!0;if(d&&(u?Array.isArray(d.options)&&Ie(d.options).find(function(e){return o===e.ref.value&&s(e.ref)}):s(d.ref)))l[r]=Object.assign(Object.assign({},d),t);else{d=i?u?Object.assign({options:[].concat(Ie(d&&d.options||[]),[{ref:e}]),ref:{type:i,name:r}},t):Object.assign({},a):a,l[r]=d;var v=Ae(Le(T.current,r));Ge(S.current)&&v||(n=Le(v?S.current:T.current,r),(f=Ae(n))||c||K(r,n)),Ge(t)||(Te(O.current,r,!0),!k&&z.current.isValid&<(h,j,d,T).then(function(e){var t=W.current.isValid;Ge(e)?Te(w.current,r,!0):Ze(w.current,r),t!==Ge(e)&&X()})),!m||c&&f||!c&&Ze(W.current.dirtyFields,r),i&&function(e,t,n){var r=e.ref;Ce(r)&&n&&(r.addEventListener(t?"change":"input",n),r.addEventListener("blur",n))}(u&&d.options?d.options[d.options.length-1]:d,u||"select-one"===e.type,D.current)}}var ge=n.useCallback(function(e,t){return function(n){try{n&&n.preventDefault&&(n.preventDefault(),n.persist());var r={},i=ue(et(h,mt(T.current),m,!0));return z.current.isSubmitting&&X({isSubmitting:!0}),Promise.resolve(function(o,a){try{var l=function(){function o(){var o=function(){if(Ge(r)&&Object.keys(W.current.errors).every(function(e){return e in h.current}))return X({errors:{},isSubmitting:!0}),Promise.resolve(e(i,n)).then(function(){});var o=function(e){f&&function(e,t){for(var n in e)if(Le(t,n)){var r=e[n];if(r){if(r.ref.focus&&Ae(r.ref.focus()))break;if(r.options){r.options[0].ref.focus();break}}}}(h.current,W.current.errors)};return W.current.errors=Object.assign(Object.assign({},W.current.errors),r),t?Promise.resolve(t(W.current.errors,n)).then(o):o()}();if(o&&o.then)return o.then(function(){})}var a=L.current?Promise.resolve(L.current(i,A.current,j)).then(function(e){var t=e.values;W.current.errors=r=e.errors,i=t}):oe(Object.values(h.current),function(e){var t=function(){if(e){var t=e.ref.name;return Promise.resolve(lt(h,j,e,T)).then(function(e){e[t]?(Te(r,t,e[t]),Ze(w.current,t)):Le(O.current,t)&&(Ze(W.current.errors,t),Te(w.current,t,!0))})}}();if(t&&t.then)return t.then(function(){})});return a&&a.then?a.then(o):o()}()}catch(e){return a(!0,e)}return l&&l.then?l.then(a.bind(null,!1),a.bind(null,!0)):a(!1,l)}(0,function(e,t){if(W.current.isSubmitting=!1,X({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ge(W.current.errors),submitCount:W.current.submitCount+1}),e)throw t;return t}))}catch(n){return Promise.reject(n)}}},[f,j]);n.useEffect(function(){l&&z.current.isValid&&se(),H.current=H.current||!vt?H.current:function(e,t){var n=new MutationObserver(function(){for(var n=0,r=Object.values(e.current);n<r.length;n++){var i=r[n];if(i&&i.options)for(var o,a=g(i.options);!(o=a()).done;){var l=o.value;l&&l.ref&&He(l.ref)&&t(i)}else i&&He(i.ref)&&t(i)}});return n.observe(window.document,{childList:!0,subtree:!0}),n}(h,ve)},[ve,S.current]),n.useEffect(function(){return function(){H.current&&H.current.disconnect(),N.current=!0,"production"===process.env.NODE_ENV&&Object.values(h.current).forEach(function(e){return ve(e,!0)})}},[]),!l&&z.current.isValid&&(F.isValid=Ke(w.current,O.current)&&Ge(W.current.errors));var he={trigger:ne,setValue:n.useCallback(function(e,t,n){ie(e,t,n||{}),ae(e)&&X(),le(e)},[ie,ne]),getValues:n.useCallback(ce,[]),register:n.useCallback(function(e,t){if(!ht)if(Qe(e))pe({name:e},t);else{if(!Se(e)||!("name"in e))return function(t){return t&&pe(t,e)};pe(e,t)}},[S.current]),unregister:n.useCallback(function(e){for(var t,n=g(Array.isArray(e)?e:[e]);!(t=n()).done;)ve(h.current[t.value],!0)},[]),formState:Et?new Proxy(F,{get:function(e,t){if("production"!==process.env.NODE_ENV&&"isValid"===t&&k&&console.warn("📋 `formState.isValid` is applicable with `onTouched`, `onChange` or `onBlur` mode. https://react-hook-form.com/api#formState"),t in e)return z.current[t]=!0,e[t]}}):F},Ee=n.useMemo(function(){return Object.assign({isFormDirty:J,updateWatchedValue:fe,shouldUnregister:m,updateFormState:X,removeFieldEventListener:de,watchInternal:me,mode:P.current,reValidateMode:{isReValidateOnBlur:q,isReValidateOnChange:Z},validateResolver:l?se:void 0,fieldsRef:h,resetFieldArrayFunctionRef:x,useWatchFieldsRef:b,useWatchRenderFunctionsRef:C,fieldArrayDefaultValuesRef:E,validFieldsRef:w,fieldsWithValidationRef:O,fieldArrayNamesRef:R,readFormStateRef:z,formStateRef:W,defaultValuesRef:S,shallowFieldsStateRef:T,fieldArrayValuesRef:y},he)},[S.current,fe,m,de,me]);return Object.assign({watch:function(e,t){return me(e,t)},control:Ee,handleSubmit:ge,reset:n.useCallback(function(e,t){if(void 0===t&&(t={}),vt)for(var n=0,r=Object.values(h.current);n<r.length;n++){var i=r[n];if(i){var o=i.ref,a=i.options,l=gt(o)&&Array.isArray(a)?a[0].ref:o;if(Ce(l))try{l.closest("form").reset();break}catch(e){}}}var u,c,s,d,f,v,p,g;h.current={},S.current=Object.assign({},e||S.current),e&&le(""),Object.values(x.current).forEach(function(e){return rt(e)&&e()}),T.current=m?{}:mt(e||S.current),c=(u=t).errors,s=u.isDirty,d=u.isSubmitted,f=u.touched,p=u.submitCount,g=u.dirtyFields,(v=u.isValid)||(w.current={},O.current={}),E.current={},_.current=new Set,I.current=!1,X({submitCount:p?W.current.submitCount:0,isDirty:!!s&&W.current.isDirty,isSubmitted:!!d&&W.current.isSubmitted,isValid:!!v&&W.current.isValid,dirtyFields:g?W.current.dirtyFields:{},touched:f?W.current.touched:{},errors:c?W.current.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},[]),clearErrors:n.useCallback(function(e){e&&(Array.isArray(e)?e:[e]).forEach(function(e){return h.current[e]&&Ne(e)?delete W.current.errors[e]:Ze(W.current.errors,e)}),X({errors:e?W.current.errors:{}})},[]),setError:n.useCallback(function(e,t){var n=(h.current[e]||{}).ref;Te(W.current.errors,e,Object.assign(Object.assign({},t),{ref:n})),X({isValid:!1}),t.shouldFocus&&n&&n.focus&&n.focus()},[]),errors:F.errors},he)}({defaultValues:Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{offset:0,limit:5,sortOrder:"DESC"}}),s=c.register,f=c.control,v=c.handleSubmit,m=c.setValue,p=c.getValues,h=c.reset,E=function(e){if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getMonth()+1,r=t.getDate();return(r=(r>9?"":"0")+r)+"/"+(n=(n>9?"":"0")+n)+"/"+t.getFullYear()},y=function(e){if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getHours(),r=t.getMinutes(),i=n>12?"PM":"AM";return(n=((n=n>12?n-12:n)>9?"":"0")+n)+":"+(r=(r>9?"":"0")+r)+" "+i},_=n.useState([]),b=_[0],C=_[1],O=function(e){return r.createElement("div",{onClick:e.onClick},r.createElement(t.DownloadBtnCommon,null))};n.useEffect(function(){s("offset",0),s("limit",5),s("sortOrder","DESC")},[s]),n.useEffect(function(){(null==l?void 0:l.length)>0&&C([null==l?void 0:l.map(function(e){var t={};return t[o("AUDIT_DATE_LABEL")]=E(null==e?void 0:e.timestamp),t[o("AUDIT_TIME_LABEL")]=y(null==e?void 0:e.timestamp),t[o("AUDIT_DATAVIEWED_LABEL")]=(null==e?void 0:e.dataView[0])+","+(null==e?void 0:e.dataView[1]),t[o("AUDIT_DATAVIEWED_BY_LABEL")]=null==e?void 0:e.dataViewedBy,t[o("AUDIT_ROLE_LABEL")]=null==e?void 0:e.roles.map(function(e){return e.name}).join(","),d({},t)})])},[l]);var w=n.useCallback(function(e){0!==e.length&&(m("sortBy",e.id),m("sortOrder",e.desc?"DESC":"ASC"))},[]);function S(){m("offset",p("offset")-p("limit")),v(a)()}var N=window.Digit.Utils.browser.isMobile();if(N)return r.createElement(Tt,{Controller:St,register:s,control:f,t:o,reset:h,previousPage:S,handleSubmit:v,tenantId:i,data:l,onSubmit:a});var I=function(e){return r.createElement("span",{className:"cell-text"},e)},D=n.useMemo(function(){return[{Header:o("AUDIT_DATE_LABEL"),disableSortBy:!0,accessor:function(e){var t="NA"===e.timestamp?o("WS_NA"):E(e.timestamp);return I(""+t)}},{Header:o("AUDIT_TIME_LABEL"),disableSortBy:!0,accessor:function(e){var t="NA"===e.timestamp?o("WS_NA"):y(e.timestamp);return I(""+t)}},{Header:o(N?"AUDIT_DATAVIEWED_LABEL":"AUDIT_DATAVIEWED_PRIVACY"),disableSortBy:!0,accessor:function(e){return I(""+(null==e?void 0:e.dataView))}},{Header:o(N?"AUDIT_DATAVIEWED_BY_LABEL":"AUDIT_DATAVIEWED_BY_PRIVACY"),disableSortBy:!0,accessor:function(e){return I(""+(null==e?void 0:e.dataViewedBy))}},{Header:o("AUDIT_ROLE_LABEL"),disableSortBy:!0,accessor:function(e){var t;return I(""+(null==e||null===(t=e.roles.slice(0,3))||void 0===t?void 0:t.map(function(e){return e.name})))}}]},[]);return r.createElement(r.Fragment,null,r.createElement("div",{style:{marginRight:"-70px"}}," ",r.createElement(t.BackButton,null)," "),r.createElement("div",{style:{marginTop:"30px",marginLeft:"30px"}}," ",r.createElement(t.Header,null,o("PRIVACY_AUDIT_REPORT"))," "),r.createElement(t.SearchForm,{className:"audit-card",onSubmit:a,handleSubmit:v},r.createElement(Nt,{register:s,control:f,reset:h,tenantId:i,t:o,previousPage:S})),r.createElement("div",{style:{marginTop:"240px",marginLeft:"-55%",maxWidth:"80%",marginRight:"52px"}},null!=l&&l.display?r.createElement("div",{style:{marginTop:"20x",width:"1025px",marginLeft:"25px",backgroundColor:"white",height:"60px"}},o(l.display).split("\\n").map(function(e,t){return r.createElement("p",{key:t,style:{textAlign:"center"}},e)})):""!==l?r.createElement("div",{style:{backgroundColor:"white",marginRight:"-30px",marginLeft:"30px"}},r.createElement("div",{className:"sideContent",style:{float:"right",padding:"10px 30px"}},r.createElement(O,{className:"mrlg cursorPointer",onClick:function(){return function(e){if(void 0!==(null==e?void 0:e[0]))return Digit.Download.Excel(null==e?void 0:e[0],"AuditReport")}(b)}})),r.createElement(t.Table,{t:o,data:l,totalRecords:u,columns:D,getCellProps:function(e){return{style:{minWidth:e.column.Header===o("ES_INBOX_APPLICATION_NO")?"240px":"",padding:"20px 18px",fontSize:"16px"}}},onPageSizeChange:function(e){m("limit",Number(e.target.value)),v(a)()},currentPage:p("offset")/p("limit"),onNextPage:function(){m("offset",p("offset")+p("limit")),v(a)()},onPrevPage:S,manualPagination:!1,pageSizeLimit:p("limit"),onSort:w,disableSort:!1,sortParams:[{id:p("sortBy"),desc:"DESC"===p("sortOrder")}]})):r.createElement(t.Loader,null)))},At=function(e){var t,o,a=i.useTranslation().t,l=Digit.ULBService.getCitizenCurrentTenant(),u=n.useState({}),c=u[0],s=u[1],f=function(e,t){void 0===t&&(t="dayend");try{var n=e.match(/(\d{4})-(\d{1,2})-(\d{1,2})/),r=new Date(Date.UTC(n[1],n[2]-1,n[3]));return r.setMinutes(r.getMinutes()+r.getTimezoneOffset()),"dayend"===t&&(r.setHours(r.getHours()+24),r.setSeconds(r.getSeconds()-1)),r.getTime()}catch(t){return e}};n.useEffect(function(){var e=Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{};if(e){var t=d({},e);s(Object.keys(t).filter(function(e){return t[e]}).reduce(function(e,n){var r;return d({},e,((r={})[n]="object"==typeof t[n]?t[n].code:t[n],r))},{}))}},[]);var v={enabled:!!(c&&Object.keys(c).length>0)},m=d({},c),p=Digit.Hooks.useAudit({tenantId:l,filters:d({},m),config:v}),g=p.data;return r.createElement(xt,{t:a,tenantId:l,onSubmit:function(e){Digit.SessionStorage.set("AUDIT_APPLICATION_DETAIL",{offset:0,limit:5,sortBy:"commencementDate",sortOrder:"DESC"});var t=d({},e,{fromDate:f(null==e?void 0:e.fromDate),toDate:f(null==e?void 0:e.toDate)});s(Object.keys(t).filter(function(e){return t[e]}).reduce(function(e,n){var r;return d({},e,((r={})[n]=t[n],r))},{}))},data:p.isLoading?"":(null==g||null===(t=g.ElasticSearchData)||void 0===t?void 0:t.length)>0?null==g?void 0:g.ElasticSearchData:{display:"ES_COMMON_NO_DATA"},count:null==g||null===(o=g.ElasticSearchData)||void 0===o?void 0:o.length})},Lt=function(e){var n,o,a,l,u,c,s,d,f,v,m,p,g,h,E,y,_=e.moduleCode,b=i.useTranslation().t,C=Digit.ULBService.getCitizenCurrentTenant(),O=Digit.Hooks.useStaticData(Digit.ULBService.getStateId()),w=O.isLoading,S=O.data,N=Digit.Hooks.useDynamicData({moduleCode:_,tenantId:C,filters:{},t:b}),I=N.error,D=N.data,T=function(e){var n=e.styles;switch(e.module){case"TL":return r.createElement(t.CaseIcon,{className:"fill-path-primary-main",styles:n});case"PT":return r.createElement(t.PTIcon,{className:"fill-path-primary-main",styles:n});case"MCOLLECT":return r.createElement(t.MCollectIcon,{className:"fill-path-primary-main",styles:n});case"PGR":return r.createElement(t.ComplaintIcon,{className:"fill-path-primary-main",styles:n});default:return r.createElement(t.CaseIcon,{className:"fill-path-primary-main",styles:n})}},x=null==S||null===(n=S.MdmsRes["common-masters"])||void 0===n||null===(o=n.StaticData[0])||void 0===o?void 0:o[""+_],A=function(e){switch(e.module){case"PT":case"WS":return r.createElement("span",{className:"timerIcon"},r.createElement(t.TimerIcon,null));default:return null}},L=function(e){switch(e.module){case"PT":return r.createElement("span",{className:"rupeeSymbol"},r.createElement(t.RupeeSymbol,null));case"WS":return r.createElement("span",{className:"timerIcon"},r.createElement(t.TimerIcon,null));default:return null}},R=function(e){switch(e){case"TL":case"PT":case"MCOLLECT":return{staticCommonContent:b("COMMON_VALIDITY"),validity:(null==x?void 0:x.validity)+b("1"===(null==x?void 0:x.validity)?"COMMON_DAY":"COMMON_DAYS")};case"PGR":return{staticCommonContent:b("ACTION_TEST_COMPLAINT_TYPES")};case"OBPS":return{staticCommonContent:b("BUILDING_PLAN_PERMIT_VALIDITY"),validity:(null==x?void 0:x.validity)+" "+b("1"===(null==x?void 0:x.validity)?"COMMON_DAY":"COMMON_DAYS")};default:return{staticCommonContent:""}}},P=function(e){switch(e){case"PT":return{staticDataOne:(null==x?void 0:x.staticDataOne)+" "+b("COMMON_DAYS"),staticDataOneHeader:b("APPLICATION_PROCESSING_TIME"),staticDataTwo:null==x?void 0:x.staticDataTwo,staticDataTwoHeader:b("APPLICATION_PROCESSING_FEE")};case"WS":return{staticDataOne:"",staticDataOneHeader:b("PAY_WATER_CHARGES_BY")+" "+(null==x?void 0:x.staticDataOne)+" "+b("COMMON_DAYS")+" "+b("OF_BILL_GEN_TO_AVOID_LATE_FEE"),staticDataTwo:(null==x?void 0:x.staticDataTwo)+" "+b("COMMON_DAYS"),staticDataTwoHeader:b("APPLICATION_PROCESSING_TIME")};default:return{}}};return w||N.isLoading?r.createElement(t.Loader,null):x?r.createElement(r.Fragment,null,x&&null!=x&&x.payViaWhatsApp?r.createElement(t.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"}},r.createElement("div",{className:"pay-whatsapp-card",onClick:function(){window.open(null==x?void 0:x.payViaWhatsApp)}},r.createElement("div",{className:"pay-whatsapp-text"},b("PAY_VIA_WHATSAPP")),r.createElement("div",{className:"whatsAppIconG"},r.createElement(t.WhatsappIconGreen,null)))):null,x&&null!=x&&x.helpline?r.createElement(t.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"}},r.createElement("div",{className:"static-home-Card"},r.createElement("div",{className:"static-home-Card-header"},b("CALL_CENTER_HELPLINE")),r.createElement("div",{className:"helplineIcon"},r.createElement(t.HelpLineIcon,null))),r.createElement("div",{className:"call-center-card-text"},null!=x&&null!==(a=x.helpline)&&void 0!==a&&a.contactOne?r.createElement("div",{className:"call-center-card-content"},r.createElement("a",{href:"tel:"+(null==x||null===(l=x.helpline)||void 0===l?void 0:l.contactOne)},null==x||null===(u=x.helpline)||void 0===u?void 0:u.contactOne)):null,null!=x&&null!==(c=x.helpline)&&void 0!==c&&c.contactTwo?r.createElement("div",{className:"call-center-card-content"},r.createElement("a",{href:"tel:"+(null==x||null===(s=x.helpline)||void 0===s?void 0:s.contactTwo)},null==x||null===(d=x.helpline)||void 0===d?void 0:d.contactTwo)):null)):null,x&&null!=x&&x.serviceCenter?r.createElement(t.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"}},r.createElement("div",{className:"static-home-Card"},r.createElement("div",{className:"static-home-Card-header"},b("CITIZEN_SERVICE_CENTER")),r.createElement("div",{className:"serviceCentrIcon"},r.createElement(t.ServiceCenterIcon,null))),r.createElement("div",{className:"service-center-details-card"},r.createElement("div",{className:"service-center-details-text"},null==x?void 0:x.serviceCenter)),null!=x&&x.viewMapLocation?r.createElement("div",{className:"link"},r.createElement("a",{href:null==x?void 0:x.viewMapLocation},b("VIEW_ON_MAP"))):null):r.createElement("div",null),r.createElement(t.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"}},I||null==D||null===(null==D?void 0:D.dynamicDataOne)?r.createElement("div",null):r.createElement("div",{className:"dynamicDataCard"},r.createElement("div",{className:"dynamicData"},r.createElement(T,{module:_,styles:{width:"24px",height:"24px"}}),r.createElement("span",{className:"dynamicData-content"},null==D?void 0:D.dynamicDataOne))),I||null==D||null===(null==D?void 0:D.dynamicDataTwo)?r.createElement("div",null):r.createElement("div",{className:"dynamicDataCard"},r.createElement("div",{className:"dynamicData"},r.createElement(T,{module:_,styles:{width:"24px",height:"24px"}}),r.createElement("span",{className:"dynamicData-content"},null==D?void 0:D.dynamicDataTwo))),x&&null!=x&&x.staticDataOne?r.createElement("div",{className:"staticDataCard"},r.createElement("div",{className:"staticData"},r.createElement(A,{module:_}),r.createElement("span",{className:"static-data-content"},r.createElement("span",{className:"static-data-content-first",style:{marginTop:""===(null===(f=P(_))||void 0===f?void 0:f.staticDataOne)?"8px":"unset"}},null===(v=P(_))||void 0===v?void 0:v.staticDataOneHeader),r.createElement("span",{className:"static-data-content-second"},""+(null===(m=P(_))||void 0===m?void 0:m.staticDataOne))))):r.createElement("div",null),x&&null!=x&&x.staticDataTwo?r.createElement("div",{className:"staticDataCard"},r.createElement("div",{className:"staticData"},r.createElement(L,{module:_}),r.createElement("span",{className:"static-data-content"},r.createElement("span",{className:"static-data-content-first"},null===(p=P(_))||void 0===p?void 0:p.staticDataTwoHeader),r.createElement("span",{className:"static-data-content-second"},null===(g=P(_))||void 0===g?void 0:g.staticDataTwo)))):r.createElement("div",null),x&&null!=x&&x.validity?r.createElement("div",{className:"staticDataCard"},r.createElement("div",{className:"staticData"},r.createElement("span",{className:"validityIcon"},r.createElement(t.ValidityTimeIcon,null)),r.createElement("span",{className:"static-data-content"},r.createElement("span",{className:"static-data-content-first"},null===(h=R(_))||void 0===h?void 0:h.staticCommonContent),r.createElement("span",{className:"static-data-content-second"},null===(E=R(_))||void 0===E?void 0:E.validity)))):r.createElement("div",null),I||null==D||null==D||!D.staticData||null===(null==D?void 0:D.staticData)?r.createElement("div",null):r.createElement("div",{className:"staticDataCard"},r.createElement("div",{className:"staticData"},"PGR"===_?r.createElement(T,{module:_,styles:{width:"24px",height:"24px",marginLeft:"13px",marginTop:"12px"}}):r.createElement("span",{className:"validityIcon"},r.createElement(t.ValidityTimeIcon,null)),r.createElement("span",{className:"static-data-content"},r.createElement("span",{className:"static-data-content-first"},null===(y=R(_))||void 0===y?void 0:y.staticCommonContent),r.createElement("span",{className:"static-data-content-second"},null==D?void 0:D.staticData)))))):r.createElement(r.Fragment,null)},Rt=[(null===(_t=window)||void 0===_t?void 0:_t.contextPath)+"/citizen/register/name","/"+(null===(bt=window)||void 0===bt?void 0:bt.contextPath)+"/citizen/select-language","/"+(null===(Ct=window)||void 0===Ct?void 0:Ct.contextPath)+"/citizen/select-location","/"+(null===(Ot=window)||void 0===Ot?void 0:Ot.contextPath)+"/citizen/login","/"+(null===(wt=window)||void 0===wt?void 0:wt.contextPath)+"/citizen/register/otp"],Pt=function(e,t){return t.filter(function(t){return e.map(function(e){return e.code}).includes(t.code)})},Mt=function(e){var n,o,a,u=e.stateInfo,c=e.userDetails,s=e.CITIZEN,d=e.cityDetails,f=e.mobileView,v=e.handleUserDropdownSelection,m=e.logoUrl,p=e.stateCode,g=e.modules,h=e.appTenants,y=e.pathname,C=e.initData,O=Digit.Hooks.useCustomMDMS(Digit.ULBService.getStateId(),"ACCESSCONTROL-ACTIONS-TEST",[{name:"actions-test",filter:"[?(@.url == '"+window.contextPath+"-card')]"}],{select:function(e){var t,n;return null==e||null===(t=e["ACCESSCONTROL-ACTIONS-TEST"])||void 0===t||null===(n=t["actions-test"])||void 0===n?void 0:n.filter(function(e){return!0===e.enabled}).reduce(function(e,t){var n;return e[t.parentModule]=(null===(n=e[t.parentModule])||void 0===n?void 0:n.length)>0?[t].concat(e[t.parentModule]):[t],e},{})}}),S=O.isLoading,N=O.data,I=O.isFetched,D=Digit.Hooks.useRouteSubscription(y),T=i.useTranslation().t,x=l.useRouteMatch().path,A=l.useHistory(),L=Rt.some(function(e){return window.location.href.includes(e)}),R=g.map(function(e,t){var n=e.code,i=e.tenants,o=Digit.ComponentRegistryService.getComponent(n+"Module");return o?r.createElement(l.Route,{key:t,path:x+"/"+n.toLowerCase()},r.createElement(o,{stateCode:p,moduleCode:n,userType:"citizen",tenants:Pt(i,h)})):null}),P=g.map(function(e,n){var i=e.code,o=e.bannerImage,a=(Digit.ComponentRegistryService.getComponent(i+"Links"),I?b(N,i,T):void 0);return"ACTION_TEST_WS"===(null==a?void 0:a.header)&&(null==a||a.links.sort(function(e,t){return t.orderNumber-e.orderNumber})),r.createElement(r.Fragment,null,r.createElement(l.Route,{key:n,path:x+"/"+i.toLowerCase()+"-home"},r.createElement("div",{className:"moduleLinkHomePage"},r.createElement("img",{src:o||(null==u?void 0:u.bannerUrl),alt:"noimagefound"}),r.createElement(t.BackButton,{className:"moduleLinkHomePageBackButton"}),r.createElement("h1",null,T("MODULE_"+i.toUpperCase())),r.createElement("div",{className:"moduleLinkHomePageModuleLinks"},a&&r.createElement(t.CitizenHomeCard,{header:T(null==a?void 0:a.header),links:null==a?void 0:a.links,Icon:function(){return r.createElement("span",null)},Info:"OBPS"===i?function(){return r.createElement(t.CitizenInfoLabel,{style:{margin:"0px",padding:"10px"},info:T("CS_FILE_APPLICATION_INFO_LABEL"),text:T("BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL")})}:null,isInfo:"OBPS"===i})),r.createElement(Lt,{moduleCode:null==i?void 0:i.toUpperCase()}))),r.createElement(l.Route,{key:"faq"+n,path:x+"/"+i.toLowerCase()+"-faq"},r.createElement(K,{module:null==i?void 0:i.toUpperCase()})),r.createElement(l.Route,{key:"hiw"+n,path:x+"/"+i.toLowerCase()+"-how-it-works"},r.createElement(se,{module:null==i?void 0:i.toUpperCase()})))});return r.createElement("div",{className:D},r.createElement($,{t:T,stateInfo:u,userDetails:c,CITIZEN:s,cityDetails:d,mobileView:f,handleUserDropdownSelection:v,logoUrl:m,showSidebar:!0,linkData:N,islinkDataLoading:S}),r.createElement("div",{className:"main center-container citizen-home-container mb-25"},L?null:r.createElement("div",{className:"SideBarStatic"},r.createElement(j,{linkData:N,islinkDataLoading:S})),r.createElement(l.Switch,null,r.createElement(l.Route,{exact:!0,path:x},r.createElement(J,null)),r.createElement(l.Route,{exact:!0,path:x+"/select-language"},r.createElement(Q,null)),r.createElement(l.Route,{exact:!0,path:x+"/select-location"},r.createElement(ee,null)),r.createElement(l.Route,{path:x+"/error"},r.createElement(E,{initData:C,goToHome:function(){var e;A.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen")}})),r.createElement(l.Route,{path:x+"/all-services"},r.createElement(w,{userType:"citizen",modules:g,getCitizenMenu:N,fetchedCitizen:I,isLoading:S})),r.createElement(l.Route,{path:x+"/login"},r.createElement(be,{stateCode:p})),r.createElement(l.Route,{path:x+"/register"},r.createElement(be,{stateCode:p,isUserRegistered:!1})),r.createElement(l.Route,{path:x+"/user/profile"},r.createElement(ce,{stateCode:p,userType:"citizen",cityDetails:d})),r.createElement(l.Route,{path:x+"/Audit"},r.createElement(At,null)),r.createElement(_,{initData:C},R,P))),r.createElement("div",{className:"citizen-home-footer",style:window.location.href.includes("citizen/obps")?{zIndex:"-1"}:{}},r.createElement("img",{alt:"Powered by DIGIT",src:null===(n=window)||void 0===n||null===(o=n.globalConfigs)||void 0===o||null===(a=o.getConfig)||void 0===a?void 0:a.call(o,"DIGIT_FOOTER"),style:{height:"1.2em",cursor:"pointer"},onClick:function(){var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})))},kt="function"==typeof Symbol&&Symbol.for,Ut=kt?Symbol.for("react.element"):60103,jt=kt?Symbol.for("react.portal"):60106,Bt=kt?Symbol.for("react.fragment"):60107,Ft=kt?Symbol.for("react.strict_mode"):60108,Vt=kt?Symbol.for("react.profiler"):60114,zt=kt?Symbol.for("react.provider"):60109,Wt=kt?Symbol.for("react.context"):60110,Ht=kt?Symbol.for("react.async_mode"):60111,Gt=kt?Symbol.for("react.concurrent_mode"):60111,qt=kt?Symbol.for("react.forward_ref"):60112,Zt=kt?Symbol.for("react.suspense"):60113,Xt=kt?Symbol.for("react.suspense_list"):60120,$t=kt?Symbol.for("react.memo"):60115,Yt=kt?Symbol.for("react.lazy"):60116,Kt=kt?Symbol.for("react.block"):60121,Jt=kt?Symbol.for("react.fundamental"):60117,Qt=kt?Symbol.for("react.responder"):60118,en=kt?Symbol.for("react.scope"):60119;function tn(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Ut:switch(e=e.type){case Ht:case Gt:case Bt:case Vt:case Ft:case Zt:return e;default:switch(e=e&&e.$$typeof){case Wt:case qt:case Yt:case $t:case zt:return e;default:return t}}case jt:return t}}}function nn(e){return tn(e)===Gt}var rn={AsyncMode:Ht,ConcurrentMode:Gt,ContextConsumer:Wt,ContextProvider:zt,Element:Ut,ForwardRef:qt,Fragment:Bt,Lazy:Yt,Memo:$t,Portal:jt,Profiler:Vt,StrictMode:Ft,Suspense:Zt,isAsyncMode:function(e){return nn(e)||tn(e)===Ht},isConcurrentMode:nn,isContextConsumer:function(e){return tn(e)===Wt},isContextProvider:function(e){return tn(e)===zt},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Ut},isForwardRef:function(e){return tn(e)===qt},isFragment:function(e){return tn(e)===Bt},isLazy:function(e){return tn(e)===Yt},isMemo:function(e){return tn(e)===$t},isPortal:function(e){return tn(e)===jt},isProfiler:function(e){return tn(e)===Vt},isStrictMode:function(e){return tn(e)===Ft},isSuspense:function(e){return tn(e)===Zt},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===Bt||e===Gt||e===Vt||e===Ft||e===Zt||e===Xt||"object"==typeof e&&null!==e&&(e.$$typeof===Yt||e.$$typeof===$t||e.$$typeof===zt||e.$$typeof===Wt||e.$$typeof===qt||e.$$typeof===Jt||e.$$typeof===Qt||e.$$typeof===en||e.$$typeof===Kt)},typeOf:tn},on=G(function(e,t){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,n=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var v=e.type;switch(v){case c:case s:case i:case a:case o:case f:return v;default:var g=v&&v.$$typeof;switch(g){case u:case d:case p:case m:case l:return g;default:return t}}case r:return t}}}var b=s,C=u,O=l,w=n,S=d,N=i,I=p,D=m,T=r,x=a,A=o,L=f,R=!1;function P(e){return _(e)===s}t.AsyncMode=c,t.ConcurrentMode=b,t.ContextConsumer=C,t.ContextProvider=O,t.Element=w,t.ForwardRef=S,t.Fragment=N,t.Lazy=I,t.Memo=D,t.Portal=T,t.Profiler=x,t.StrictMode=A,t.Suspense=L,t.isAsyncMode=function(e){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(e)||_(e)===c},t.isConcurrentMode=P,t.isContextConsumer=function(e){return _(e)===u},t.isContextProvider=function(e){return _(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return _(e)===d},t.isFragment=function(e){return _(e)===i},t.isLazy=function(e){return _(e)===p},t.isMemo=function(e){return _(e)===m},t.isPortal=function(e){return _(e)===r},t.isProfiler=function(e){return _(e)===a},t.isStrictMode=function(e){return _(e)===o},t.isSuspense=function(e){return _(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===s||e===a||e===o||e===f||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===h||e.$$typeof===E||e.$$typeof===y||e.$$typeof===g)},t.typeOf=_}()}),an=G(function(e){e.exports="production"===process.env.NODE_ENV?rn:on}),ln=Object.getOwnPropertySymbols,un=Object.prototype.hasOwnProperty,cn=Object.prototype.propertyIsEnumerable;function sn(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var dn=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=sn(e),o=1;o<arguments.length;o++){for(var a in n=Object(arguments[o]))un.call(n,a)&&(i[a]=n[a]);if(ln){r=ln(n);for(var l=0;l<r.length;l++)cn.call(n,r[l])&&(i[r[l]]=n[r[l]])}}return i},fn="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",vn=Function.call.bind(Object.prototype.hasOwnProperty),mn=function(){};if("production"!==process.env.NODE_ENV){var pn=fn,gn={},hn=vn;mn=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function En(e,t,n,r,i){if("production"!==process.env.NODE_ENV)for(var o in e)if(hn(e,o)){var a;try{if("function"!=typeof e[o]){var l=Error((r||"React class")+": "+n+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}a=e[o](t,o,r,n,null,pn)}catch(e){a=e}if(!a||a instanceof Error||mn((r||"React class")+": type specification of "+n+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof a+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),a instanceof Error&&!(a.message in gn)){gn[a.message]=!0;var u=i?i():"";mn("Failed "+n+" type: "+a.message+(null!=u?u:""))}}}En.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(gn={})};var yn=En,_n=function(){};function bn(){return null}function Cn(){}function On(){}"production"!==process.env.NODE_ENV&&(_n=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),On.resetWarningCache=Cn;var wn=G(function(e){e.exports="production"!==process.env.NODE_ENV?function(e,t){var n="function"==typeof Symbol&&Symbol.iterator,r={array:l("array"),bigint:l("bigint"),bool:l("boolean"),func:l("function"),number:l("number"),object:l("object"),string:l("string"),symbol:l("symbol"),any:a(bn),arrayOf:function(e){return a(function(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var l=t[n];if(!Array.isArray(l))return new o("Invalid "+i+" `"+a+"` of type `"+s(l)+"` supplied to `"+r+"`, expected an array.");for(var u=0;u<l.length;u++){var c=e(l,u,r,i,a+"["+u+"]",fn);if(c instanceof Error)return c}return null})},element:a(function(t,n,r,i,a){var l=t[n];return e(l)?null:new o("Invalid "+i+" `"+a+"` of type `"+s(l)+"` supplied to `"+r+"`, expected a single ReactElement.")}),elementType:a(function(e,t,n,r,i){var a=e[t];return an.isValidElementType(a)?null:new o("Invalid "+r+" `"+i+"` of type `"+s(a)+"` supplied to `"+n+"`, expected a single ReactElement type.")}),instanceOf:function(e){return a(function(t,n,r,i,a){var l;return t[n]instanceof e?null:new o("Invalid "+i+" `"+a+"` of type `"+((l=t[n]).constructor&&l.constructor.name?l.constructor.name:"<<anonymous>>")+"` supplied to `"+r+"`, expected instance of `"+(e.name||"<<anonymous>>")+"`.")})},node:a(function(e,t,n,r,i){return c(e[t])?null:new o("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return a(function(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[n],u=s(l);if("object"!==u)return new o("Invalid "+i+" `"+a+"` of type `"+u+"` supplied to `"+r+"`, expected an object.");for(var c in l)if(vn(l,c)){var d=e(l,c,r,i,a+"."+c,fn);if(d instanceof Error)return d}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&_n(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),bn;function t(t,n,r,a,l){for(var u=t[n],c=0;c<e.length;c++)if(i(u,e[c]))return null;var s=JSON.stringify(e,function(e,t){return"symbol"===d(t)?String(t):t});return new o("Invalid "+a+" `"+l+"` of value `"+String(u)+"` supplied to `"+r+"`, expected one of "+s+".")}return a(t)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&_n("Invalid argument supplied to oneOfType, expected an instance of array."),bn;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return _n("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(n)+" at index "+t+"."),bn}return a(function(t,n,r,i,a){for(var l=[],u=0;u<e.length;u++){var c=(0,e[u])(t,n,r,i,a,fn);if(null==c)return null;c.data&&vn(c.data,"expectedType")&&l.push(c.data.expectedType)}return new o("Invalid "+i+" `"+a+"` supplied to `"+r+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return a(function(t,n,r,i,a){var l=t[n],c=s(l);if("object"!==c)return new o("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var f in e){var v=e[f];if("function"!=typeof v)return u(r,i,a,f,d(v));var m=v(l,f,r,i,a+"."+f,fn);if(m)return m}return null})},exact:function(e){return a(function(t,n,r,i,a){var l=t[n],c=s(l);if("object"!==c)return new o("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var f=dn({},t[n],e);for(var v in f){var m=e[v];if(vn(e,v)&&"function"!=typeof m)return u(r,i,a,v,d(m));if(!m)return new o("Invalid "+i+" `"+a+"` key `"+v+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=m(l,v,r,i,a+"."+v,fn);if(p)return p}return null})}};function i(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function o(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function a(e){function t(t,n,r,i,a,l,u){if(i=i||"<<anonymous>>",l=l||r,u!==fn){var c=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 c.name="Invariant Violation",c}return null==n[r]?t?new o(null===n[r]?"The "+a+" `"+l+"` is marked as required in `"+i+"`, but its value is `null`.":"The "+a+" `"+l+"` is marked as required in `"+i+"`, but its value is `undefined`."):null:e(n,r,i,a,l)}process;var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function l(e){return a(function(t,n,r,i,a,l){var u=t[n];return s(u)!==e?new o("Invalid "+i+" `"+a+"` of type `"+d(u)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function u(e,t,n,r,i){return new o((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function c(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(c);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!r)return!1;var i,o=r.call(t);if(r!==t.entries){for(;!(i=o.next()).done;)if(!c(i.value))return!1}else for(;!(i=o.next()).done;){var a=i.value;if(a&&!c(a[1]))return!1}return!0;default:return!1}}function s(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function d(e){if(null==e)return""+e;var t=s(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function f(e){var t=d(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return o.prototype=Error.prototype,r.checkPropTypes=yn,r.resetWarningCache=yn.resetWarningCache,r.PropTypes=r,r}(an.isElement):function(){function e(e,t,n,r,i,o){if(o!==fn){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:On,resetWarningCache:Cn};return n.PropTypes=n,n}()}),Sn=function(e){return r.createElement("div",{className:"banner banner-container"},e.children)},Nn=function(){var e=Digit.Hooks.useStore.getInitData(),n=e.isLoading,o=(e.data||{}).stateInfo,a=i.useTranslation().t;return n?r.createElement(t.Loader,null):r.createElement("div",{className:"bannerHeader"},r.createElement("img",{className:"bannerLogo",src:null==o?void 0:o.logoUrl}),r.createElement("p",null,a("TENANT_TENANTS_"+(null==o?void 0:o.code.toUpperCase()))))},In=function(e){var i,o,a,u=e.config,c=e.t,s=n.useState(null)[0],f=Digit.Hooks.useQueryParams(),v=f.mobile_number,m=f.tenantId,p=l.useHistory(),g=n.useState(""),h=g[0],E=g[1],y=n.useState(!0)[0],_=n.useState(null),b=_[0],C=_[1],O=function(){return Digit.UserService.getType()};n.useEffect(function(){var e,t;if(s){Digit.UserService.setUser(s);var n=(null===(e=location.state)||void 0===e?void 0:e.from)||"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee";p.replace(n)}else Digit.UserService.setType("employee")},[s]);var w=function(){C(null)},S=u.inputs,N=S[0],I=S[1],D=S[2],T=[{body:[{label:c(N.label),type:N.type,populators:{name:N.name},isMandatory:!0},{label:c(I.label),type:I.type,populators:{name:I.name},isMandatory:!0},{label:c(D.label),type:D.type,populators:{name:D.name},isMandatory:!0}]}];return r.createElement(Sn,null,r.createElement("div",{className:"employeeBackbuttonAlign"},r.createElement(t.BackButton,{variant:"white",style:{borderBottom:"none"}})),r.createElement(t.FormComposer,{onSubmit:function(e){try{return Promise.resolve(ae(function(){if(e.newPassword!==e.confirmPassword)return C(c("ERR_PASSWORD_DO_NOT_MATCH"));var t=d({},e,{otpReference:h,tenantId:m,type:O().toUpperCase()});return Promise.resolve(Digit.UserService.changePassword(t,m)).then(function(e){!function(){var e;p.replace("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/login")}()})},function(e){var t,n,r,i,o;C((null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.error)||void 0===r||null===(i=r.fields)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.message)||c("ES_SOMETHING_WRONG")),setTimeout(w,5e3)}))}catch(e){return Promise.reject(e)}},noBoxShadow:!0,inline:!0,submitInForm:!0,config:T,label:u.texts.submitButtonLabel,cardStyle:{maxWidth:"408px",margin:"auto"},className:"employeeChangePassword"},r.createElement(Nn,null),r.createElement(t.CardSubHeader,{style:{textAlign:"center"}}," ",u.texts.header," "),r.createElement(t.CardText,null,c("CS_LOGIN_OTP_TEXT")+" ",r.createElement("b",null," ",""+c("+ 91 - ")," ",v)),r.createElement(me,{t:c,userType:"employee",otp:h,onOtpChange:E,error:y,onResend:function(){try{var e=function(){setTimeout(w,5e3)},t={otp:{mobileNumber:v,userType:O().toUpperCase(),type:"passwordreset",tenantId:m}},n=ae(function(){return Promise.resolve(Digit.UserService.sendOtp(t,m)).then(function(){C(c("ES_OTP_RESEND"))})},function(e){var t,n;C((null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.error_description)||c("ES_INVALID_LOGIN_CREDENTIALS"))});return Promise.resolve(n&&n.then?n.then(e):e())}catch(e){return Promise.reject(e)}}})),b&&r.createElement(t.Toast,{error:!0,label:c(b),onClose:w}),r.createElement("div",{className:"EmployeeLoginFooter"},r.createElement("img",{alt:"Powered by DIGIT",src:null===(i=window)||void 0===i||null===(o=i.globalConfigs)||void 0===o||null===(a=o.getConfig)||void 0===a?void 0:a.call(o,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," "))};In.propTypes={loginParams:wn.any},In.defaultProps={loginParams:null};var Dn=[{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"}]}],Tn=function(){var e=i.useTranslation().t,t=l.useRouteMatch().path,o=n.useMemo(function(){return Dn.map(function(t){var n={};for(var r in t.texts)n[r]=e(t.texts[r]);return d({},t,{texts:n})},[Dn])});return r.createElement(l.Switch,null,r.createElement(l.Route,{path:""+t,exact:!0},r.createElement(In,{config:o[0],t:e})))},xn=[{texts:{header:"CORE_COMMON_FORGOT_PASSWORD_LABEL",description:"ES_FORGOT_PASSWORD_DESC",submitButtonLabel:"CORE_COMMON_CONTINUE"},inputs:[{label:"CORE_COMMON_MOBILE_NUMBER",type:"text",name:"mobileNumber",error:"ERR_HRMS_INVALID_MOBILE_NUMBER"},{label:"CORE_COMMON_CITY",type:"custom",name:"city",error:"ERR_HRMS_INVALID_CITY"}]}],An=function(e){var i,o,a,u=e.config,c=e.t,s=Digit.Hooks.useTenants(),f=s.data,v=s.isLoading,m=n.useState(null)[0],p=l.useHistory(),g=n.useState(null),h=g[0],E=g[1];n.useEffect(function(){var e,t;if(m){Digit.UserService.setUser(m);var n=(null===(e=location.state)||void 0===e?void 0:e.from)||"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee";p.replace(n)}else Digit.UserService.setType("employee")},[m]);var y=function(){E(null)},_=u.inputs,b=_[0],C=_[1],O=[{body:[{label:c(b.label),type:b.type,populators:{name:b.name,componentInFront:"+91"},isMandatory:!0},{label:c(C.label),type:C.type,populators:{name:C.name,customProps:{},component:function(e,n){return r.createElement(t.Dropdown,d({option:f,optionKey:"name",id:C.name,className:"login-city-dd",select:function(t){e.onChange(t)}},n))}},isMandatory:!0}]}];return v?r.createElement(t.Loader,null):r.createElement(Sn,null,r.createElement("div",{className:"employeeBackbuttonAlign"},r.createElement(t.BackButton,{variant:"white",style:{borderBottom:"none"}})),r.createElement(t.FormComposer,{onSubmit:function(e){try{if(!e.city)return alert("Please Select City!"),Promise.resolve();var t={otp:{mobileNumber:e.mobileNumber,userType:Digit.UserService.getType().toUpperCase(),type:"passwordreset",tenantId:e.city.code}},n=ae(function(){return Promise.resolve(Digit.UserService.sendOtp(t,e.city.code)).then(function(){var t;p.push("/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee/user/change-password?mobile_number="+e.mobileNumber+"&tenantId="+e.city.code)})},function(e){var t,n,r,i,o;E((null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.error)||void 0===r||null===(i=r.fields)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.message)||"Invalid login credentials!"),setTimeout(y,5e3)});return Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},noBoxShadow:!0,inline:!0,submitInForm:!0,config:O,label:u.texts.submitButtonLabel,secondaryActionLabel:u.texts.secondaryButtonLabel,onSecondayActionClick:function(){var e;p.replace("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/login")},heading:u.texts.header,description:u.texts.description,headingStyle:{textAlign:"center"},cardStyle:{maxWidth:"408px",margin:"auto"},className:"employeeForgotPassword"},r.createElement(Nn,null)),h&&r.createElement(t.Toast,{error:!0,label:c(h),onClose:y}),r.createElement("div",{className:"EmployeeLoginFooter"},r.createElement("img",{alt:"Powered by DIGIT",src:null===(i=window)||void 0===i||null===(o=i.globalConfigs)||void 0===o||null===(a=o.getConfig)||void 0===a?void 0:a.call(o,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," "))};An.propTypes={loginParams:wn.any},An.defaultProps={loginParams:null};var Ln=function(){var e=i.useTranslation().t,t=l.useRouteMatch().path,o=n.useMemo(function(){return xn.map(function(t){var n={};for(var r in t.texts)n[r]=e(t.texts[r]);return d({},t,{texts:n})},[xn])});return r.createElement(l.Switch,null,r.createElement(l.Route,{path:""+t,exact:!0},r.createElement(An,{config:o[0],t:e})))},Rn=function(e,t){return t.filter(function(t){var n;return null==e||null===(n=e.map)||void 0===n?void 0:n.call(e,function(e){return e.code}).includes(t.code)})},Pn=function(e){var t,n,i=e.stateCode,o=e.userType,a=e.modules,u=e.appTenants,c=(Digit,l.useRouteMatch().path),s=l.useLocation(),d=Digit.UserService.getUser();if(!d||null==d||!d.access_token||null==d||!d.info)return r.createElement(l.Redirect,{to:{pathname:"/"+(null===(n=window)||void 0===n?void 0:n.contextPath)+"/employee/user/login",state:{from:s.pathname+s.search}}});var f=a.map(function(e,t){var n,a=e.code,d=e.tenants,f=Digit.ComponentRegistryService.getComponent(a+"Module");return r.createElement(l.Route,{key:t,path:c+"/"+a.toLowerCase()},f?r.createElement(f,{stateCode:i,moduleCode:a,userType:o,tenants:Rn(d,u)}):r.createElement(l.Redirect,{to:{pathname:"/"+(null===(n=window)||void 0===n?void 0:n.contextPath)+"/employee/user/error?type=notfound",state:{from:s.pathname+s.search}}}))});return r.createElement("div",{className:"ground-container"},r.createElement(l.Switch,null,f,r.createElement(l.Route,{path:c+"/login"},r.createElement(l.Redirect,{to:{pathname:"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee/user/login",state:{from:s.pathname+s.search}}})),r.createElement(l.Route,{path:c+"/forgot-password"},r.createElement(Ln,null)),r.createElement(l.Route,{path:c+"/change-password"},r.createElement(Tn,null)),r.createElement(l.Route,null,r.createElement(w,{userType:o,modules:a}))))},Mn=function(){var e,o,a,u=Digit.Hooks.useStore.getInitData(),c=u.data,s=u.isLoading,d=i.useTranslation().t,f=l.useHistory(),v=c||{},m=v.languages,p=v.stateInfo,g=Digit.StoreData.getCurrentLanguage(),h=n.useState(g),E=h[0],y=h[1];return s?null:r.createElement(Sn,null,r.createElement(t.Card,{className:"bannerCard removeBottomMargin"},r.createElement("div",{className:"bannerHeader"},r.createElement("img",{className:"bannerLogo",src:null==p?void 0:p.logoUrl,alt:"Digit"}),r.createElement("p",null,d("TENANT_TENANTS_"+(null==p?void 0:p.code.toUpperCase())))),r.createElement("div",{className:"language-selector",style:{justifyContent:"space-around",marginBottom:"24px",padding:"0 5%"}},m.map(function(e,n){return r.createElement("div",{className:"language-button-container",key:n},r.createElement(t.CustomButton,{selected:e.value===E,text:e.label,onClick:function(){return function(e){y(e.value),Digit.LocalizationService.changeLanguage(e.value,p.code)}(e)}}))})),r.createElement(t.SubmitBar,{style:{width:"100%"},label:d("CORE_COMMON_CONTINUE"),onSubmit:function(e){var t;f.push("/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee/user/login")}})),r.createElement("div",{className:"EmployeeLoginFooter"},r.createElement("img",{alt:"Powered by DIGIT",src:null===(e=window)||void 0===e||null===(o=e.globalConfigs)||void 0===o||null===(a=o.getConfig)||void 0===a?void 0:a.call(o,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," "))},kn=[{texts:{header:"CORE_COMMON_LOGIN",submitButtonLabel:"CORE_COMMON_CONTINUE",secondaryButtonLabel:"CORE_COMMON_FORGOT_PASSWORD"},inputs:[{label:"CORE_LOGIN_USERNAME",type:"text",name:"username",error:"ERR_HRMS_INVALID_USER_ID"},{label:"CORE_LOGIN_PASSWORD",type:"password",name:"password",error:"ERR_HRMS_WRONG_PASSWORD"},{label:"CORE_COMMON_CITY",type:"custom",name:"city",error:"ERR_HRMS_INVALID_CITY"}]}],Un=["UserRequest"],jn=function(e){var i,o,a,u=e.config,c=e.t,s=e.isDisabled,f=Digit.Hooks.useTenants(),m=f.data,p=f.isLoading,g=Digit.Hooks.useStore.getInitData().isLoading,h=n.useState(null),E=h[0],y=h[1],_=n.useState(null),b=_[0],C=_[1],O=n.useState(!1),w=O[0],S=O[1],N=l.useHistory();n.useEffect(function(){var e,t,n,r,i,o,a,l,u,c,s,d,f,v;if(E){Digit.SessionStorage.set("citizen.userRequestObject",E);var m,p,g,h,y=null==E||null===(e=E.info)||void 0===e||null===(t=e.roles)||void 0===t?void 0:t.filter(function(e){return e.tenantId===Digit.SessionStorage.get("Employee.tenantId")});(null==E||null===(n=E.info)||void 0===n||null===(r=n.roles)||void 0===r?void 0:r.length)>0&&(E.info.roles=y),Digit.UserService.setUser(E),m=null==E?void 0:E.info,p=null==E?void 0:E.access_token,h=(null===(g=JSON.parse(sessionStorage.getItem("Digit.locale")))||void 0===g?void 0:g.value)||"en_IN",localStorage.setItem("Employee.tenant-id",null==m?void 0:m.tenantId),localStorage.setItem("tenant-id",null==m?void 0:m.tenantId),localStorage.setItem("citizen.userRequestObject",JSON.stringify(m)),localStorage.setItem("locale",h),localStorage.setItem("Employee.locale",h),localStorage.setItem("token",p),localStorage.setItem("Employee.token",p),localStorage.setItem("user-info",JSON.stringify(m)),localStorage.setItem("Employee.user-info",JSON.stringify(m));var _,b,C,O,w,S,I,D="/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/employee";null!==(o=window)&&void 0!==o&&null!==(a=o.location)&&void 0!==a&&null!==(l=a.href)&&void 0!==l&&l.includes("from=")&&(D=decodeURIComponent(null===(_=window)||void 0===_||null===(b=_.location)||void 0===b||null===(C=b.href)||void 0===C||null===(O=C.split("from="))||void 0===O?void 0:O[1])||"/"+(null===(w=window)||void 0===w?void 0:w.contextPath)+"/employee"),null!=E&&null!==(u=E.info)&&void 0!==u&&u.roles&&null!=E&&null!==(c=E.info)&&void 0!==c&&null!==(s=c.roles)&&void 0!==s&&s.every(function(e){return"NATADMIN"===e.code})&&(D="/"+(null===(S=window)||void 0===S?void 0:S.contextPath)+"/employee/dss/landing/NURT_DASHBOARD"),null!=E&&null!==(d=E.info)&&void 0!==d&&d.roles&&null!=E&&null!==(f=E.info)&&void 0!==f&&null!==(v=f.roles)&&void 0!==v&&v.every(function(e){return"STADMIN"===e.code})&&(D="/"+(null===(I=window)||void 0===I?void 0:I.contextPath)+"/employee/dss/landing/home"),N.replace(D)}},[E]);var I=function(){C(null)},D=u.inputs,T=D[0],x=D[1],A=D[2],L=[{body:[{label:c(T.label),type:T.type,populators:{name:T.name},isMandatory:!0},{label:c(x.label),type:x.type,populators:{name:x.name},isMandatory:!0},{label:c(A.label),type:A.type,populators:{name:A.name,customProps:{},component:function(e,n){return r.createElement(t.Dropdown,d({option:m,className:"login-city-dd",optionKey:"i18nKey",select:function(t){e.onChange(t)},t:c},n))}},isMandatory:!0}]}];return p||g?r.createElement(t.Loader,null):r.createElement(Sn,null,r.createElement("div",{className:"employeeBackbuttonAlign"},r.createElement(t.BackButton,{variant:"white",style:{borderBottom:"none"}})),r.createElement(t.FormComposer,{onSubmit:function(e){try{var t=function(){S(!1)};if(!e.city)return alert("Please Select City!"),Promise.resolve();S(!0);var n=d({},e,{userType:"EMPLOYEE"});n.tenantId=e.city.code,delete n.city;var r=ae(function(){return Promise.resolve(Digit.UserService.authenticate(n)).then(function(e){var t=e.UserRequest,n=v(e,Un);Digit.SessionStorage.set("Employee.tenantId",null==t?void 0:t.tenantId),y(d({info:t},n))})},function(e){var t,n;C((null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.error_description)||"Invalid login credentials!"),setTimeout(I,5e3)});return Promise.resolve(r&&r.then?r.then(t):t())}catch(e){return Promise.reject(e)}},isDisabled:s||w,noBoxShadow:!0,inline:!0,submitInForm:!0,config:L,label:u.texts.submitButtonLabel,secondaryActionLabel:u.texts.secondaryButtonLabel,onSecondayActionClick:function(){var e;N.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/forgot-password")},heading:u.texts.header,headingStyle:{textAlign:"center"},cardStyle:{margin:"auto",minWidth:"408px"},className:"loginFormStyleEmployee",buttonStyle:{maxWidth:"100%",width:"100%"}},r.createElement(Nn,null)),b&&r.createElement(t.Toast,{error:!0,label:c(b),onClose:I}),r.createElement("div",{className:"employee-login-home-footer",style:{backgroundColor:"unset"}},r.createElement("img",{alt:"Powered by DIGIT",src:null===(i=window)||void 0===i||null===(o=i.globalConfigs)||void 0===o||null===(a=o.getConfig)||void 0===a?void 0:a.call(o,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," "))};jn.propTypes={loginParams:wn.any},jn.defaultProps={loginParams:null};var Bn=function(){var e=i.useTranslation().t,t=l.useRouteMatch().path,o=n.useMemo(function(){return kn.map(function(t){var n={};for(var r in t.texts)n[r]=e(t.texts[r]);return d({},t,{texts:n})},[kn])});return r.createElement(l.Switch,null,r.createElement(l.Route,{path:""+t,exact:!0},r.createElement(jn,{config:o[0],t:e})))},Fn=["user/profile","user/error"],Vn=function(e){var t,o,a,u,c=e.stateInfo,s=e.userDetails,d=e.CITIZEN,f=e.cityDetails,v=e.mobileView,m=e.handleUserDropdownSelection,p=e.logoUrl,g=e.DSO,h=e.stateCode,y=e.modules,b=e.appTenants,C=e.initData,O=l.useHistory(),w=i.useTranslation().t,S=l.useRouteMatch().path,N=l.useLocation(),I=null==N||null===(t=N.pathname)||void 0===t?void 0:t.includes("language-selection"),D=Fn.some(function(e){var t;return null==N||null===(t=N.pathname)||void 0===t?void 0:t.includes(e)});return n.useEffect(function(){Digit.UserService.setType("employee")},[]),r.createElement("div",{className:"employee"},r.createElement(l.Switch,null,r.createElement(l.Route,{path:S+"/user"},D&&r.createElement($,{t:w,stateInfo:c,userDetails:s,CITIZEN:d,cityDetails:f,mobileView:v,handleUserDropdownSelection:m,logoUrl:p,showSidebar:!!D,showLanguageChange:!I}),r.createElement("div",{className:D?"grounded-container":"loginContainer",style:D?{padding:0,paddingTop:"80px",marginLeft:v?"":"64px"}:{"--banner-url":"url("+(null==c?void 0:c.bannerUrl)+")",padding:"0px"}},r.createElement(l.Switch,null,r.createElement(l.Route,{path:S+"/user/login"},r.createElement(Bn,null)),r.createElement(l.Route,{path:S+"/user/forgot-password"},r.createElement(Ln,null)),r.createElement(l.Route,{path:S+"/user/change-password"},r.createElement(Tn,null)),r.createElement(l.Route,{path:S+"/user/profile"},r.createElement(ce,{stateCode:h,userType:"employee",cityDetails:f})),r.createElement(l.Route,{path:S+"/user/error"},r.createElement(E,{initData:C,goToHome:function(){var e;O.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee")}})),r.createElement(l.Route,{path:S+"/user/language-selection"},r.createElement(Mn,null)),r.createElement(l.Route,null,r.createElement(l.Redirect,{to:S+"/user/language-selection"}))))),r.createElement(l.Route,null,r.createElement($,{t:w,stateInfo:c,userDetails:s,CITIZEN:d,cityDetails:f,mobileView:v,handleUserDropdownSelection:m,logoUrl:p,modules:y}),r.createElement("div",{className:"main "+(g?"m-auto":"")},r.createElement("div",{className:"employee-app-wrapper"},r.createElement(_,{initData:C},r.createElement(Pn,{stateCode:h,userType:"employee",modules:y,appTenants:b}))),r.createElement("div",{className:"employee-home-footer"},r.createElement("img",{alt:"Powered by DIGIT",src:null===(o=window)||void 0===o||null===(a=o.globalConfigs)||void 0===a||null===(u=a.getConfig)||void 0===u?void 0:u.call(a,"DIGIT_FOOTER"),style:{height:"1.1em",cursor:"pointer"},onClick:function(){var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})))),r.createElement(l.Route,null,r.createElement(l.Redirect,{to:S+"/user/language-selection"}))))},zn=function(e){var t,i,o,a,u=e.stateCode,c=e.modules,s=e.appTenants,d=e.logoUrl,f=e.initData,v=e.defaultLanding,m=void 0===v?"citizen":v,p=l.useHistory(),g=l.useLocation().pathname,h=window.innerWidth,E=Digit.ULBService.getCurrentUlb(),y=Digit.UserService.getUser(),_=(Digit.Hooks.useStore.getInitData().data||{}).stateInfo,b=Digit.UserService.hasAccess(["FSM_DSO"]),C="CITIZEN"===(null==y||null===(t=y.info)||void 0===t?void 0:t.type)||!window.location.pathname.split("/").includes("employee");window.location.pathname.split("/").includes("employee")&&(C=!1),n.useEffect(function(){var e,t,n;null!=g&&g.includes("application-details")||(null!=g&&g.includes("inbox")||Digit.SessionStorage.del("fsm/inbox/searchParams"),null!=g&&g.includes("search")&&Digit.SessionStorage.del("fsm/search/searchParams")),null!=g&&g.includes("dss")||Digit.SessionStorage.del("DSS_FILTERS"),(null==g?void 0:g.toString())==="/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee"&&(Digit.SessionStorage.del("SEARCH_APPLICATION_DETAIL"),Digit.SessionStorage.del("WS_EDIT_APPLICATION_DETAILS")),(null==g?void 0:g.toString())!=="/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/citizen"&&(null==g?void 0:g.toString())!=="/"+(null===(n=window)||void 0===n?void 0:n.contextPath)+"/employee"||Digit.SessionStorage.del("WS_DISCONNECTION")},[g]),p.listen(function(){var e;null===(e=window)||void 0===e||e.scrollTo({top:0,left:0,behavior:"smooth"})});var O={stateInfo:_,userDetails:y,CITIZEN:C,cityDetails:E,mobileView:h<=640,handleUserDropdownSelection:function(e){e.func()},logoUrl:d,DSO:b,stateCode:u,modules:c,appTenants:s,sourceUrl:window.location.origin+"/citizen",pathname:g,initData:f};return r.createElement(l.Switch,null,r.createElement(l.Route,{path:"/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/employee"},r.createElement(Vn,O)),r.createElement(l.Route,{path:"/"+(null===(o=window)||void 0===o?void 0:o.contextPath)+"/citizen"},r.createElement(Mt,O)),r.createElement(l.Route,null,r.createElement(l.Redirect,{to:"/"+(null===(a=window)||void 0===a?void 0:a.contextPath)+"/"+m})))},Wn=[s],Hn=("object"==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}):c.compose)(c.applyMiddleware.apply(void 0,Wn)),Gn=function(e,t){return void 0===t&&(t={}),c.createStore(function(e,t){return c.combineReducers(d({common:(n=e,function(e,t){switch(void 0===e&&(e=n),t.type){case"LANGUAGE_SELECT":return d({},e,{selectedLanguage:t.payload});default:return e}})},t));var n}(e,t),Hn)},qn=function(e){var n,o=e.stateCode,u=e.moduleReducers,c=e.defaultLanding,s=Digit.Hooks.useInitStore(o,e.enabledModules),d=s.data;return s.isLoading?r.createElement(t.Loader,{page:!0}):(i.getI18n(),r.createElement(a.Provider,{store:Gn(d,u(d))},r.createElement(l.BrowserRouter,null,r.createElement(t.Body,null,r.createElement(zn,{initData:d,stateCode:o,modules:null==d?void 0:d.modules,appTenants:d.tenants,logoUrl:null==d||null===(n=d.stateInfo)||void 0===n?void 0:n.logoUrl,defaultLanding:c})))))},Zn={SelectOtp:me};exports.DigitUI=function(e){var t=e.stateCode,i=e.registry,a=e.enabledModules,l=e.moduleReducers,u=e.defaultLanding,c=n.useState(Digit.Utils.getPrivacyObject()||{}),s=c[0],f=c[1],v=(Digit.UserService.getType(),new o.QueryClient({defaultOptions:{queries:{staleTime:9e5,cacheTime:3e6,retry:!1,retryDelay:function(e){return Infinity}}}})),m=Digit.Contexts.ComponentProvider,p=Digit.Contexts.PrivacyProvider;return Digit.UserService.hasAccess(["FSM_DSO"]),r.createElement("div",null,r.createElement(_,null,r.createElement(o.QueryClientProvider,{client:v},r.createElement(m.Provider,{value:i},r.createElement(p.Provider,{value:{privacy:null==s?void 0:s[window.location.pathname],resetPrivacy:function(e){Digit.Utils.setPrivacyObject({}),f({})},getPrivacy:function(){var e=Digit.Utils.getPrivacyObject();return f(e),e},updatePrivacyDescoped:function(e){var t,n=Digit.Utils.getAllPrivacyObject(),r=d({},n,((t={})[window.location.pathname]=e,t));Digit.Utils.setPrivacyObject(d({},r)),f((null==n?void 0:n[window.location.pathname])||{})},updatePrivacy:function(e,t){f(Digit.Utils.updatePrivacy(e,t)||{})}}},r.createElement(qn,{stateCode:t,enabledModules:a,moduleReducers:l,defaultLanding:u}))))))},exports.initCoreComponents=function(){Object.entries(Zn).forEach(function(e){Digit.ComponentRegistryService.setComponent(e[0],e[1])})};
|
|
1
|
+
function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=require("@egovernments/digit-ui-react-components"),n=require("react"),r=e(n),i=require("react-i18next"),o=require("react-query"),a=require("react-redux"),l=require("react-router-dom"),u=e(require("react-tooltip")),c=require("redux"),s=e(require("redux-thunk"));function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function f(e,t){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function m(e){throw new TypeError('"'+e+'" is read-only')}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return p(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var h={error:{imgUrl:"https://s3.ap-south-1.amazonaws.com/egov-qa-assets/error-image.png",infoMessage:"CORE_SOMETHING_WENT_WRONG",buttonInfo:"ACTION_TEST_HOME"},maintenance:{imgUrl:"https://s3.ap-south-1.amazonaws.com/egov-qa-assets/maintainence-image.png",infoMessage:"CORE_UNDER_MAINTENANCE",buttonInfo:"ACTION_TEST_HOME"},notfound:{imgUrl:"https://s3.ap-south-1.amazonaws.com/egov-qa-assets/PageNotFound.png",infoMessage:"CORE_NOT_FOUND",buttonInfo:"ACTION_TEST_HOME"}},E=function(e){var t=Digit.Hooks.useQueryParams().type,n=h[void 0===t?"error":t],o=i.useTranslation().t;return r.createElement("div",{className:"error-boundary"},r.createElement("div",{className:"error-container"},r.createElement("img",{src:n.imgUrl,alt:"error"}),r.createElement("h1",null,o(n.infoMessage)),r.createElement("button",{onClick:function(){e.goToHome()}},o(n.buttonInfo))))},y=function(){var e,t,n="employee"===Digit.UserService.getType()?"/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/error":"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/citizen/error";return window.location.href.includes("employee/user/error")||window.location.href.includes("citizen/error")||"development"===process.env.NODE_ENV||(window.location.href=n),r.createElement("span",null)},_=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).state={error:null,errorStack:null,hasError:!1},n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n),i.getDerivedStateFromError=function(e){return{error:null==e?void 0:e.message,hasError:!0,errorStack:null==e?void 0:e.stack}};var o=i.prototype;return o.componentDidCatch=function(e,t){this.setState({error:null==e?void 0:e.message,hasError:!0,errorStack:null==e?void 0:e.stack})},o.render=function(){return this.state.hasError?r.createElement("div",{className:"error-boundary"},r.createElement(y,null),r.createElement(E,{initData:this.props.initData})):this.props.children},i}(r.Component),b=function(e,t,n){var r=null==e?void 0:e[""+t];r&&r.map(function(e){e.link=e.navigationURL,e.i18nKey=n(e.name)});var i,o={links:null==r?void 0:r.reverse(),header:Digit.Utils.locale.getTransformedLocale("ACTION_TEST_"+t),iconName:"CITIZEN_"+t+"_ICON"};return"FSM"===t&&[{role:"FSM_DSO",from:"/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/citizen/fsm/dso-dashboard",dashoardLink:"CS_LINK_DSO_DASHBOARD",loginLink:"CS_LINK_LOGIN_DSO"}].map(function(e){var t,r,i,a=e.from,l=e.loginLink,u=e.dashoardLink;Digit.UserService.hasAccess(e.role)?null==o||null===(t=o.links)||void 0===t||t.push({link:a,i18nKey:n(u)}):null==o||null===(r=o.links)||void 0===r||r.push({link:"/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/citizen/login",state:{role:"FSM_DSO",from:a},i18nKey:n(l)})}),o},O=function(e){var n=e.modules,o=e.getCitizenMenu,a=e.fetchedCitizen,l=e.isLoading,u=n.filter(function(e){return"Payment"===e.code})[0],c=n.filter(function(e){return"Payment"!==e.code}),s=[u].concat(c),d=i.useTranslation().t;return l?r.createElement(t.Loader,null):r.createElement(r.Fragment,null,r.createElement("div",{className:"citizen-all-services-wrapper"},r.createElement(t.BackButton,null),r.createElement("div",{className:"citizenAllServiceGrid"},s.filter(function(e){return e}).map(function(e,n){var i,l,u,c,s,f,v,m=e.code;return a&&(u=a?b(o,m,d):void 0),(null===(i=u)||void 0===i||null===(l=i.links)||void 0===l?void 0:l.length)>0?r.createElement(t.CitizenHomeCard,{header:d(null===(c=u)||void 0===c?void 0:c.header),links:null===(s=u)||void 0===s||null===(f=s.links)||void 0===f||null===(v=f.filter(function(e){return null==e?void 0:e.link}))||void 0===v?void 0:v.sort(function(e,t){return(null==e?void 0:e.orderNumber)-(null==t?void 0:t.orderNumber)}),Icon:function(){return function(e){switch(e){case"PT":return r.createElement(t.PTIcon,{className:"fill-path-primary-main"});case"WS":return r.createElement(t.WSICon,{className:"fill-path-primary-main"});case"FSM":return r.createElement(t.FSMIcon,{className:"fill-path-primary-main"});case"MCollect":return r.createElement(t.MCollectIcon,{className:"fill-path-primary-main"});case"PGR":return r.createElement(t.PGRIcon,{className:"fill-path-primary-main"});case"TL":return r.createElement(t.TLIcon,{className:"fill-path-primary-main"});case"OBPS":return r.createElement(t.OBPSIcon,{className:"fill-path-primary-main"});case"Bills":return r.createElement(t.BillsIcon,{className:"fill-path-primary-main"});default:return r.createElement(t.PTIcon,{className:"fill-path-primary-main"})}}(m)},Info:"OBPS"===m?function(){return r.createElement(t.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"===m}):r.createElement(r.Fragment,null)}))))},C=function(e){return r.createElement("div",{className:"employee-app-container"},r.createElement("div",{className:"ground-container moduleCardWrapper gridModuleWrapper"},e.modules.map(function(e,t){var n=Digit.ComponentRegistryService.getComponent(e.code+"Card")||function(){return r.createElement(r.Fragment,null)};return r.createElement(n,{key:t})})))},w=function(e){var t=e.modules;return"citizen"===e.userType?r.createElement(O,{modules:t,getCitizenMenu:e.getCitizenMenu,fetchedCitizen:e.fetchedCitizen,isLoading:e.isLoading}):r.createElement(C,{modules:t})},S=function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=""),""==t)return e;for(;null!==(r=e)&&void 0!==r&&r.includes(t);){var r,i;e=null===(i=e)||void 0===i?void 0:i.replace(t,n)}return e},N=function(e){var i,o=n.useState(null),a=o[0],u=o[1],c=n.useState([]),s=c[0],d=c[1],f=(n.useState([]),l.useHistory());return n.useEffect(function(){var t,n,r=Digit.SessionStorage.get("citizen.userRequestObject"),i=[],o=[];null==r||null===(t=r.info)||void 0===t||null===(n=t.roles)||void 0===n||n.forEach(function(e){return i.push(e.tenantId)});var a=i.filter(function(e,t,n){return n.indexOf(e)===t});null==a||a.forEach(function(t){var n;o.push({label:null==e?void 0:e.t("TENANT_TENANTS_"+(null===(n=S(t,".","_"))||void 0===n?void 0:n.toUpperCase())),value:t})}),null==o||o.filter(function(e){return e.value==Digit.SessionStorage.get("Employee.tenantId")}),d(o)},[a]),r.createElement("div",{style:null!=e&&e.mobileView?{color:"#767676"}:{}},r.createElement(t.Dropdown,{option:s,selected:s.find(function(e){return e.value===(null==a?void 0:a.value)}),optionKey:"label",select:function(e){var t,n,r,i,o=Digit.SessionStorage.get("citizen.userRequestObject"),a=null===(t=Digit.SessionStorage.get("citizen.userRequestObject"))||void 0===t||null===(n=t.info)||void 0===n||null===(r=n.roles)||void 0===r?void 0:r.filter(function(t){return t.tenantId===e.value});if((null==a?void 0:a.length)>0&&(o.info.roles=a,o.info.tenantId=null==e?void 0:e.value),Digit.SessionStorage.set("Employee.tenantId",null==e?void 0:e.value),Digit.UserService.setUser(o),u(e),window.location.href.includes("/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/employee/")){var l,c,s=(null===(l=location.state)||void 0===l?void 0:l.from)||"/"+(null===(c=window)||void 0===c?void 0:c.contextPath)+"/employee";f.replace(s)}window.location.reload()},freeze:!0,customSelector:r.createElement("label",{className:"cp"},null==e?void 0:e.t("TENANT_TENANTS_"+(null===(i=S(Digit.SessionStorage.get("Employee.tenantId"),".","_"))||void 0===i?void 0:i.toUpperCase())))}))},I=function(e){var i=e.dropdown||!1,o=Digit.Hooks.useStore.getInitData(),a=o.isLoading,l=o.data||{},u=l.languages,c=l.stateInfo,s=Digit.StoreData.getCurrentLanguage(),d=n.useState(s),f=d[0],v=d[1],m=function(e){v(e.value),Digit.LocalizationService.changeLanguage(e.value,c.code)};return a?null:i?r.createElement("div",null,r.createElement(t.Dropdown,{option:u,selected:u.find(function(e){return e.value===s}),optionKey:"label",select:m,freeze:!0,customSelector:r.createElement("label",{className:"cp"},u.find(function(e){return e.value===f}).label)})):r.createElement(r.Fragment,null,r.createElement("div",{style:{marginBottom:"5px"}},"Language"),r.createElement("div",{className:"language-selector"},u.map(function(e,n){return r.createElement("div",{className:"language-button-container",key:n},r.createElement(t.CustomButton,{selected:e.value===f,text:e.label,onClick:function(){return m(e)}}))})))},D=function(e){var t,n;return r.createElement("span",{className:"user-img-txt",onClick:e.toggleMenu,title:e.name},null==e||null===(t=e.name)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.toUpperCase())},T=function(e){var n,i,o,a,u,c,s,d=e.t,f=e.stateInfo,v=e.toggleSidebar,m=e.handleLogout,p=e.userDetails,g=e.CITIZEN,h=e.cityDetails,E=e.mobileView,y=e.userOptions,_=e.handleUserDropdownSelection,b=e.logoUrl,O=e.showLanguageChange,C=void 0===O||O,w=r.useState(null),S=w[0],T=w[1];r.useEffect(function(){try{var e,t=Digit.ULBService.getCurrentTenantId(),n=null==p||null===(e=p.info)||void 0===e?void 0:e.uuid,r=function(){if(n)return Promise.resolve(Digit.UserService.userSearch(t,{uuid:[n]},{})).then(function(e){if(e&&e.user&&e.user.length){var t,n=e.user[0],r=null==n||null===(t=n.photo)||void 0===t?void 0:t.split(",");T(null==r?void 0:r.at(0))}})}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},[null!==S,null==p||null===(n=p.info)||void 0===n?void 0:n.uuid]);var x,A,R,L,P,M,k=Digit.ULBService.getCitizenCurrentTenant(!0),U=l.useHistory(),j=l.useLocation().pathname,B=Digit.Hooks.useNotificationCount({tenantId:k,config:{enabled:"EMPLOYEE"!==(null===(x=Digit.UserService)||void 0===x||null===(A=x.getUser())||void 0===A||null===(R=A.info)||void 0===R?void 0:R.type)&&"CITIZEN"===(null===(L=Digit.UserService)||void 0===L||null===(P=L.getUser())||void 0===P||null===(M=P.info)||void 0===M?void 0:M.type)&&!!k}}),F=B.data,V=(void 0===F?{}:F).unreadCount;if(g)return r.createElement("div",null,r.createElement(t.TopBar,{img:null==f?void 0:f.logoUrlWhite,isMobile:!0,toggleSidebar:function(){Digit.clikOusideFired?Digit.clikOusideFired=!1:v(!0)},logoUrl:null==f?void 0:f.logoUrlWhite,onLogout:m,userDetails:p,notificationCount:V<99?V:99,notificationCountLoaded:B.isSuccess,cityOfCitizenShownBesideLogo:d(k),onNotificationIconClick:function(){var e;U.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/engagement/notifications")},hideNotificationIconOnSomeUrlsWhenNotLoggedIn:function(e){var t,n,r,i;return(null===(t=Digit.UserService)||void 0===t||null===(n=t.getUser())||void 0===n||!n.access_token)&&["/"+(null===(r=window)||void 0===r?void 0:r.contextPath)+"/citizen/select-language","/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/citizen/select-location"].includes(e)}(j),changeLanguage:E?null:r.createElement(I,{dropdown:!0})}));var z=!(null==p||!p.access_token);return r.createElement("div",{className:"topbar"},E?r.createElement(t.Hamburger,{handleClick:v,color:"#9E9E9E"}):null,r.createElement("img",{className:"city",src:z?null==h?void 0:h.logoId:null==f?void 0:f.statelogo}),r.createElement("span",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"}},z&&(null!=h&&null!==(i=h.city)&&void 0!==i&&i.ulbGrade?r.createElement("p",{className:"ulb",style:E?{fontSize:"14px",display:"inline-block"}:{}},d(null==h?void 0:h.i18nKey).toUpperCase()," ",d("ULBGRADE_"+(null==h||null===(o=h.city)||void 0===o?void 0:o.ulbGrade.toUpperCase().replace(" ","_").replace(".","_"))).toUpperCase()):r.createElement("img",{className:"state",src:b})),!z&&r.createElement("p",{className:"ulb",style:E?{fontSize:"14px",display:"inline-block"}:{}},d("MYCITY_"+(null==f||null===(a=f.code)||void 0===a?void 0:a.toUpperCase())+"_LABEL")," ",d("MYCITY_STATECODE_LABEL")),!E&&r.createElement("div",{className:E?"right":"flex-right right w-80 column-gap-15",style:z?{}:{width:"80%"}},r.createElement("div",{className:"left"},!window.location.href.includes("employee/user/login")&&!window.location.href.includes("employee/user/language-selection")&&r.createElement(N,{dropdown:!0,t:d})),r.createElement("div",{className:"left"},C&&r.createElement(I,{dropdown:!0})),(null==p?void 0:p.access_token)&&r.createElement("div",{className:"left"},r.createElement(t.Dropdown,{option:y,optionKey:"name",select:_,showArrow:!0,freeze:!0,style:E?{right:0}:{},optionCardStyles:{overflow:"revert"},customSelector:null==S?r.createElement(D,{name:(null==p||null===(u=p.info)||void 0===u?void 0:u.name)||(null==p||null===(c=p.info)||void 0===c||null===(s=c.userInfo)||void 0===s?void 0:s.name)||"Employee"}):r.createElement("img",{src:S,style:{height:"48px",width:"48px",borderRadius:"50%"}})})),r.createElement("img",{className:"state",src:b}))))},x=function(e,n,i,o){var a,l;return[{type:"link",element:"HOME",text:e("COMMON_BOTTOM_NAVIGATION_HOME"),link:o?"/"+(null===(a=window)||void 0===a?void 0:a.contextPath)+"/employee":"/"+(null===(l=window)||void 0===l?void 0:l.contextPath)+"/citizen",icon:"HomeIcon",populators:{onClick:n}},{type:"component",element:"LANGUAGE",action:r.createElement(I,null),icon:"LanguageIcon"},{id:"login-btn",element:"LOGIN",text:e("CORE_COMMON_LOGIN"),icon:r.createElement(t.LogoutIcon,{className:"icon"}),populators:{onClick:i}}]},A="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",R=function(e){return r.createElement("h1",{className:"heading-m"},e.label)},L=function(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},r.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),r.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))},P=function(e){return r.createElement("div",{onClick:null==e?void 0:e.onClick,style:null!=e&&e.isMobileView?{padding:5}:null},null!=e&&e.isMobileView?r.createElement(t.CloseSvg,null):r.createElement("div",{className:"icon-bg-secondary",style:{backgroundColor:"#505A5F"}}," ",r.createElement(L,null)," "))},M=function(e){var n=e.onSelect,o=e.onCancel,a=e.onDismiss,l=i.useTranslation().t,u=r.useState(window.innerWidth<=780),c=u[0],s=u[1],d=function(){window.innerWidth<=780?c||s(!0):c&&s(!1)};return r.useEffect(function(){return window.addEventListener("resize",function(){d()}),function(){window.addEventListener("resize",function(){d()})}}),c?r.createElement(t.Modal,{popupStyles:{height:"174px",maxHeight:"174px",width:"324px",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},popupModuleActionBarStyles:{display:"flex",flex:1,justifyContent:"flex-start",width:"100%",position:"absolute",left:0,bottom:0,padding:"18px"},style:{flex:1},popupModuleMianStyles:{padding:"18px"},headerBarMain:r.createElement(R,{label:l("CORE_LOGOUT_WEB_HEADER")}),headerBarEnd:r.createElement(P,{onClick:a,isMobileView:c}),actionCancelLabel:l("CORE_LOGOUT_CANCEL"),actionCancelOnSubmit:o,actionSaveLabel:l("CORE_LOGOUT_WEB_YES"),actionSaveOnSubmit:n,formId:"modal-action"},r.createElement("div",null,r.createElement(t.CardText,{style:{margin:0}},l("CORE_LOGOUT_WEB_CONFIRMATION_MESSAGE")+" "))):r.createElement(t.Modal,{popupModuleMianStyles:{paddingTop:"30px"},headerBarMain:r.createElement(R,{label:l("CORE_LOGOUT_WEB_HEADER")}),headerBarEnd:r.createElement(P,{onClick:a,isMobileView:!1}),actionCancelLabel:l("CORE_LOGOUT_CANCEL"),actionCancelOnSubmit:o,actionSaveLabel:l("CORE_LOGOUT_WEB_YES"),actionSaveOnSubmit:n,formId:"modal-action"},r.createElement("div",null,r.createElement(t.CardText,{style:{marginBottom:"54px",marginLeft:"8px",marginRight:"8px"}},l("CORE_LOGOUT_WEB_CONFIRMATION_MESSAGE")+" ",r.createElement("strong",null,l("CORE_LOGOUT_MESSAGE"),"?"))))},k=function(e){var t=e.info,n=e.t;return r.createElement("div",{className:"profile-section"},r.createElement("div",{className:"imageloader imageloader-loaded"},r.createElement("img",{className:"img-responsive img-circle img-Profile",src:A})),r.createElement("div",{id:"profile-name",className:"label-container name-Profile"},r.createElement("div",{className:"label-text"}," ",null==t?void 0:t.name," ")),r.createElement("div",{id:"profile-location",className:"label-container loc-Profile"},r.createElement("div",{className:"label-text"}," ",null==t?void 0:t.mobileNumber," ")),(null==t?void 0:t.emailId)&&r.createElement("div",{id:"profile-emailid",className:"label-container loc-Profile"},r.createElement("div",{className:"label-text"}," ",t.emailId," ")),r.createElement("div",{className:"profile-divider"}),window.location.href.includes("/employee")&&!window.location.href.includes("/employee/user/login")&&!window.location.href.includes("employee/user/language-selection")&&r.createElement(N,{t:n,mobileView:!0}))},U={CommonPTIcon:r.createElement(t.PTIcon,{className:"icon"}),OBPSIcon:r.createElement(t.OBPSIcon,{className:"icon"}),propertyIcon:r.createElement(t.PropertyHouse,{className:"icon"}),TLIcon:r.createElement(t.CaseIcon,{className:"icon"}),PGRIcon:r.createElement(t.PGRIcon,{className:"icon"}),FSMIcon:r.createElement(t.FSMIcon,{className:"icon"}),WSIcon:r.createElement(t.WSICon,{className:"icon"}),MCollectIcon:r.createElement(t.MCollectIcon,{className:"icon"}),BillsIcon:r.createElement(t.CollectionIcon,{className:"icon"}),BirthIcon:r.createElement(t.BirthIcon,{className:"icon"}),DeathIcon:r.createElement(t.DeathIcon,{className:"icon"}),FirenocIcon:r.createElement(t.FirenocIcon,{className:"icon"}),HomeIcon:r.createElement(t.HomeIcon,{className:"icon"}),EditPencilIcon:r.createElement(t.EditPencilIcon,{className:"icon"}),LogoutIcon:r.createElement(t.LogoutIcon,{className:"icon"}),Phone:r.createElement(t.Phone,{className:"icon"})},j=function(e){var o,a,u,c=e.linkData,s=e.islinkDataLoading,f=i.useTranslation().t,v=l.useHistory(),m=l.useLocation().pathname,p=Digit.Hooks.useStore.getInitData(),g=p.data,h=p.isFetched,E=(g||{}).stateInfo,y=Digit.UserService.getUser(),_=window.Digit.Utils.browser.isMobile(),b=n.useState(!1)[0],O=n.useState(!1)[1],C=n.useState(!1),w=C[0],S=C[1],N=function(){S(!1)};if(s)return r.createElement(t.Loader,null);var I=function(){var e;v.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/user/profile")},D=[].concat(x(f,I,function(){var e;v.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/login")},b));D=D.filter(function(e){return"LANGUAGE"!==e.element}),Digit.ULBService.getCurrentTenantId();var T,A=function(e){var t,n,i,o=e.item,a=(null==o?void 0:o.icon)||(null===(t=o.icon)||void 0===t||null===(n=t.type)||void 0===n?void 0:n.name),u=a?U[a]:U.BillsIcon;i="component"===o.type?o.action:o.text;var c=function(){return r.createElement("span",d({className:"menu-item"},o.populators),u,r.createElement("div",{className:"menu-label"},i))};return"external-link"===o.type?r.createElement("a",{href:o.link},r.createElement(c,null)):"link"===o.type?r.createElement(l.Link,{to:null==o?void 0:o.link},r.createElement(c,null)):r.createElement(c,null)};return h&&y&&y.access_token&&(T=r.createElement(k,{info:null==y?void 0:y.info,stateName:null==E?void 0:E.name,t:f}),D=D.filter(function(e){return"login-btn"!==(null==e?void 0:e.id)}),D=[].concat(D,[{text:f("EDIT_PROFILE"),element:"PROFILE",icon:"EditPencilIcon",populators:{onClick:I}},{text:f("CORE_COMMON_LOGOUT"),element:"LOGOUT",icon:"LogoutIcon",populators:{onClick:function(){O(!1),S(!0)}}},{text:r.createElement(r.Fragment,null,f("CS_COMMON_HELPLINE"),r.createElement("div",{className:"telephone",style:{marginTop:"-10%"}},null==g?void 0:g.tenants.map(function(e){}),r.createElement("div",{className:"link"},r.createElement("a",{href:"tel:"+(null==g?void 0:g.tenants[0].contactNumber)},null==g?void 0:g.tenants[0].contactNumber)))),element:"Helpline",icon:"Phone"}])),null===(o=Object.keys(c))||void 0===o||null===(a=o.sort(function(e,t){return t.localeCompare(e)}))||void 0===a||a.map(function(e){var t,n,r,i,o,a;(null===(t=c[e][0])||void 0===t?void 0:t.sidebar)===window.contextPath+"-links"&&D.splice(1,0,{type:null!==(n=c[e][0])&&void 0!==n&&null!==(r=n.sidebarURL)&&void 0!==r&&r.includes(null===(i=window)||void 0===i?void 0:i.contextPath)?"link":"external-link",text:f("ACTION_TEST_"+Digit.Utils.locale.getTransformedLocale(e)),links:c[e],icon:null===(o=c[e][0])||void 0===o?void 0:o.leftIcon,link:null===(a=c[e][0])||void 0===a?void 0:a.sidebarURL})}),r.createElement(r.Fragment,null,r.createElement("div",null,r.createElement("div",{style:{height:"100%",width:"100%",top:"0px",backgroundColor:"rgba(0, 0, 0, 0.54)",pointerzevents:"auto"}}),r.createElement("div",{style:{display:"flex",flexDirection:"column",height:_?"calc(100vh - 56px)":"auto",zIndex:"99"}},T,r.createElement("div",{className:"drawer-desktop"},null===(u=D)||void 0===u?void 0:u.map(function(e,t){return r.createElement("div",{className:"sidebar-list "+(m===(null==e?void 0:e.link)||m===(null==e?void 0:e.sidebarURL)?"active":""),key:t},r.createElement(A,{item:e}))}))),r.createElement("div",null,w&&r.createElement(M,{onSelect:function(){Digit.UserService.logout(),S(!1)},onCancel:N,onDismiss:N}))))},B=function(e){var t=e.info,n=e.t,i=r.useState(null),o=i[0],a=i[1];return r.useEffect(function(){try{var e=Digit.ULBService.getCurrentTenantId(),n=null==t?void 0:t.uuid,r=function(){if(n)return Promise.resolve(Digit.UserService.userSearch(e,{uuid:[n]},{})).then(function(e){if(e&&e.user&&e.user.length){var t,n=e.user[0],r=null==n||null===(t=n.photo)||void 0===t?void 0:t.split(",");a(null==r?void 0:r.at(0))}})}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},[null!==o]),r.createElement("div",{className:"profile-section"},r.createElement("div",{className:"imageloader imageloader-loaded"},r.createElement("img",{className:"img-responsive img-circle img-Profile",src:o||A,style:{objectFit:"cover",objectPosition:"center"}})),r.createElement("div",{id:"profile-name",className:"label-container name-Profile"},r.createElement("div",{className:"label-text"}," ",null==t?void 0:t.name," ")),r.createElement("div",{id:"profile-location",className:"label-container loc-Profile"},r.createElement("div",{className:"label-text"}," ",null==t?void 0:t.mobileNumber," ")),(null==t?void 0:t.emailId)&&r.createElement("div",{id:"profile-emailid",className:"label-container loc-Profile"},r.createElement("div",{className:"label-text"}," ",t.emailId," ")),r.createElement("div",{className:"profile-divider"}),window.location.href.includes("/employee")&&!window.location.href.includes("/employee/user/login")&&!window.location.href.includes("employee/user/language-selection")&&r.createElement(N,{t:n,mobileView:!0}))},F=function(){var e,t,n;return r.createElement("div",{className:"digit-footer",style:{marginBottom:0}},r.createElement("img",{alt:"Powered by DIGIT",src:null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_FOOTER"),style:{cursor:"pointer"},onClick:function(){var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," ")},V=function(e){var o=e.isOpen,a=e.isMobile,u=void 0!==a&&a,c=e.toggleSidebar,s=e.onLogout,f=e.isEmployee,v=void 0!==f&&f,m=e.linkData,p=e.islinkDataLoading,g=Digit.Hooks.useStore.getInitData(),h=g.data,E=g.isFetched,y=(h||{}).stateInfo,_=Digit.UserService.getUser(),b=n.useState(""),O=b[0],C=b[1],w=i.useTranslation().t,S=l.useHistory(),N=function(){Digit.clikOusideFired=!0,c(!1)},I=Digit.Hooks.useAccessControl(),D=I.isLoading,T=I.data;if(Digit.ULBService.getCurrentTenantId(),p||D)return r.createElement(t.Loader,null);var A,R=[].concat(x(w,N,function(){var e;S.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/login"),N()},v));E&&_&&_.access_token&&(A=r.createElement(B,{info:null==_?void 0:_.info,stateName:null==y?void 0:y.name,t:w}),R=R.filter(function(e){return"login-btn"!==(null==e?void 0:e.id)}),R=[].concat(R,[{text:w("EDIT_PROFILE"),element:"PROFILE",icon:"EditPencilIcon",populators:{onClick:function(){var e,t,n=v?"/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/profile":"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/citizen/user/profile";S.push(n),N()}}},{text:w("CORE_COMMON_LOGOUT"),element:"LOGOUT",icon:"LogoutIcon",populators:{onClick:s}},{text:r.createElement(r.Fragment,null,w("CS_COMMON_HELPLINE"),r.createElement("div",{className:"telephone",style:{marginTop:"-10%"}},null==h?void 0:h.tenants.map(function(e){}),r.createElement("div",{className:"link"},r.createElement("a",{href:"tel:"+(null==h?void 0:h.tenants[0].contactNumber)},null==h?void 0:h.tenants[0].contactNumber)))),element:"Helpline",icon:"Phone"}]));var L={};if(v){var P;null==T||T.actions.filter(function(e){return"url"===e.url&&"Home"!==e.displayName}).forEach(function(e){var t;if(""==O&&""!==e.path){var n=e.path.split(".")[0];"TradeLicense"===n&&(n="Trade License"),L[n]?L[n].push(e):L[n]=[e]}else if(""!==e.path&&null!=e&&null!==(t=e.displayName)&&void 0!==t&&t.toLowerCase().includes(O.toLowerCase())){var r=e.path.split(".")[0];"TradeLicense"===r&&(r="Trade License"),L[r]?L[r].push(e):L[r]=[e]}});for(var M=Object.keys(L),k=function(e){var t,n,r,i,o,a,l,u,c,s,f,v=null===(t=L[M[e]][0])||void 0===t||null===(n=t.displayName)||void 0===n||null===(r=n.toUpperCase())||void 0===r?void 0:r.replace(/[ -]/g,"_"),m=null===(i=M[e])||void 0===i||null===(o=i.toUpperCase())||void 0===o?void 0:o.replace(/[ -]/g,"_");-1===L[M[e]][0].path.indexOf(".")?R.splice(1,0,{type:"link",text:w("ACTION_TEST_"+v),link:null===(a=L[M[e]][0])||void 0===a?void 0:a.navigationURL,icon:null===(l=L[M[e]][0])||void 0===l||null===(u=l.leftIcon)||void 0===u||null===(c=u.split)||void 0===c?void 0:c.call(u,":")[1],populators:{onClick:function(){var t;S.push(null===(t=L[M[e]][0])||void 0===t?void 0:t.navigationURL),N()}}}):R.splice(1,0,{type:"dynamic",moduleName:w("ACTION_TEST_"+m),links:null===(s=L[M[e]])||void 0===s?void 0:s.map(function(e){var t,n;return d({},e,{displayName:w("ACTION_TEST_"+(null==e||null===(t=e.displayName)||void 0===t||null===(n=t.toUpperCase())||void 0===n?void 0:n.replace(/[ -]/g,"_")))})}),icon:null===(f=L[M[e]][1])||void 0===f?void 0:f.leftIcon})},U=0;U<M.length;U++)k(U);var V=R.findIndex(function(e){return"HOME"===e.element}),z=R.splice(V,1),W=R.findIndex(function(e){return"LANGUAGE"===e.element}),H=R.splice(W,(null===(P=R)||void 0===P?void 0:P.length)-W);R.sort(function(e,t){return("dynamic"===(null==e?void 0:e.type)?null==e?void 0:e.moduleName:null==e?void 0:e.text).localeCompare("dynamic"===(null==t?void 0:t.type)?null==t?void 0:t.moduleName:null==t?void 0:t.text)}),(null==z?void 0:z[0])&&R.splice(0,0,z[0]),R=(null==H?void 0:H.length)>0?R.concat(H):R}else{var G,q;null===(G=Object.keys(m))||void 0===G||null===(q=G.sort(function(e,t){return t.localeCompare(e)}))||void 0===q||q.map(function(e){var t,n,r,i,o,a;"digit-ui-links"===(null===(t=m[e][0])||void 0===t?void 0:t.sidebar)&&R.splice(1,0,{type:null!==(n=m[e][0])&&void 0!==n&&null!==(r=n.sidebarURL)&&void 0!==r&&r.includes(null===(i=window)||void 0===i?void 0:i.contextPath)?"link":"external-link",text:w("ACTION_TEST_"+Digit.Utils.locale.getTransformedLocale(e)),links:m[e],icon:null===(o=m[e][0])||void 0===o?void 0:o.leftIcon,link:null===(a=m[e][0])||void 0===a?void 0:a.sidebarURL})})}return S.location.pathname.includes("/openlink")&&(A=r.createElement("span",null),R=R.filter(function(e){return"LANGUAGE"===e.element})),u?r.createElement(t.NavBar,{open:o,toggleSidebar:c,profileItem:A,onClose:N,menuItems:R,Footer:r.createElement(F,null),isEmployee:v,search:O,setSearch:C}):r.createElement(j,{logout:s})},z=function e(o){var a,c,s,f,v,p,g,h=o.item,E=n.useState(!1),y=E[0],_=E[1],b=h.label,O=h.icon,C=h.children,w=i.useTranslation().t,S=(l.useLocation(),{home:r.createElement(t.HomeIcon,null),announcement:r.createElement(t.ComplaintIcon,null),business:r.createElement(t.BPAHomeIcon,null),store:r.createElement(t.PropertyHouse,null),assignment:r.createElement(t.CaseIcon,null),receipt:r.createElement(t.ReceiptIcon,null),"business-center":r.createElement(t.PersonIcon,null),description:r.createElement(t.DocumentIconSolid,null),"water-tap":r.createElement(t.DropIcon,null),"collections-bookmark":r.createElement(t.CollectionsBookmarIcons,null),"insert-chart":r.createElement(t.FinanceChartIcon,null),edcr:r.createElement(t.CollectionIcon,null),collections:r.createElement(t.CollectionIcon,null)}),N=S[null==O||null===(a=O.split)||void 0===a||null===(c=a.call(O,":"))||void 0===c?void 0:c[1]]||S.collections,I=(null==h||null===(s=h.icon)||void 0===s||null===(f=s.leftIcon)||void 0===f||null===(v=f.split)||void 0===v?void 0:v.call(f,":"))||(null==h||null===(p=h.leftIcon)||void 0===p||null===(g=p.split)||void 0===g?void 0:g.call(p,":"));"dynamic"==(null==I?void 0:I[0])&&(require("@egovernments/digit-ui-react-components"),m("leftIcon"));var D=null==b?void 0:b.replace(/[ -]/g,"_").toUpperCase(),T=w("ACTION_TEST_"+D.toUpperCase()),x=w((null==T?void 0:T.length)>20?T.substring(0,20)+"...":T);return r.createElement(r.Fragment,null,r.createElement("button",{className:"submenu-container",onClick:function(e){e.preventDefault(),_(function(e){return!e})},style:null!=h&&h.elementStyle?d({},null==h?void 0:h.elementStyle,{display:"flex"}):{display:"flex"}},r.createElement("div",{className:"sidebar-link "+(y?"active":""),style:{width:null!=h&&h.nested?"240px":"260px",overflow:"auto"}},!(null!=h&&h.nested)&&N,r.createElement("div",{className:"actions",style:{padding:"0px",marginRight:"auto"}},r.createElement("div",{"data-tip":"React-tooltip","data-for":"jk-side-"+D},r.createElement("span",{style:{color:y?"#f47738":""}},x),(null==x?void 0:x.includes("..."))&&r.createElement(u,{textColor:"white",backgroundColor:"grey",place:"right",type:"info",effect:"solid",id:"jk-side-"+D},w("ACTION_TEST_"+D)))),r.createElement("div",null,C&&y?r.createElement(t.ArrowVectorDown,null):C?r.createElement(t.ArrowForward,null):null))),y&&r.createElement("div",null,C.map(function(t,n){var i,a,c,s,f,v=t.label+"-"+n,m=t.label,p=t.icon,g=t.children,h=(null==p||null===(i=p.split)||void 0===i||i.call(p,":"),null==m?void 0:m.replace(/[ -]/g,"_").toUpperCase()),E=w("ACTION_TEST_"+h.toUpperCase()),y=w((null==E?void 0:E.length)>20?E.substring(0,20)+"...":E);return g?r.createElement("div",{key:v},r.createElement(e,{item:d({},t,{nested:!0,to:(s=t.to,f=o.item.to,f+"/"+s),elementStyle:{marginLeft:"19px"}})})):r.createElement(l.NavLink,{key:v,to:null!=t&&null!==(a=t.to)&&void 0!==a&&a.includes(null===(c=window)||void 0===c?void 0:c.contextPath)?null==t?void 0:t.to:"/employee/"+(null==t?void 0:t.to),className:"custom-link",activeClassName:"actions",style:{marginLeft:"40px",marginTop:"10px"}},r.createElement("div",{"data-tip":"React-tooltip","data-for":"jk-side-"+h},r.createElement("span",{style:{fontSize:"14px"}},y),(null==y?void 0:y.includes("..."))&&r.createElement(u,{textColor:"white",backgroundColor:"grey",place:"right",type:"info",effect:"solid",id:"jk-side-"+h},w("ACTION_TEST_"+h))))})))},W=function(e){var n,o,a,c,s,d,f=e.item,v=f.label,p=f.icon,g=f.to,h=f.children,E=i.useTranslation().t,y={home:r.createElement(t.HomeIcon,null),announcement:r.createElement(t.ComplaintIcon,null),business:r.createElement(t.BPAHomeIcon,null),store:r.createElement(t.PropertyHouse,null),assignment:r.createElement(t.CaseIcon,null),receipt:r.createElement(t.ReceiptIcon,null),"business-center":r.createElement(t.PersonIcon,null),description:r.createElement(t.DocumentIconSolid,null),"water-tap":r.createElement(t.DropIcon,null),"collections-bookmark":r.createElement(t.CollectionsBookmarIcons,null),"insert-chart":r.createElement(t.FinanceChartIcon,null),edcr:r.createElement(t.CollectionIcon,null),collections:r.createElement(t.CollectionIcon,null)},_=y[null==p||null===(n=p.split)||void 0===n||null===(o=n.call(p,":"))||void 0===o?void 0:o[1]]||y.collections,b=(null==p||null===(a=p.leftIcon)||void 0===a||null===(c=a.split)||void 0===c?void 0:c.call(a,":"))||(null===(s=_)||void 0===s||null===(d=s.split)||void 0===d?void 0:d.call(s,":"));"dynamic"==(null==b?void 0:b[0])&&(require("@egovernments/digit-ui-react-components"),m("leftIcon"));var O=null==v?void 0:v.replace(/[ -]/g,"_").toUpperCase(),C=E("ACTION_TEST_"+O.toUpperCase()),w=E((null==C?void 0:C.length)>20?C.substring(0,20)+"...":C);return h?r.createElement(z,{item:e.item}):r.createElement("div",{className:"submenu-container",style:{marginLeft:"19px",marginBottom:"15px",marginTop:"15px"}},r.createElement(l.NavLink,{exact:!0,to:g},r.createElement("div",{classname:"sidebar-link"},r.createElement("div",{className:"actions",style:{padding:"0px"}},_,r.createElement("div",{"data-tip":"React-tooltip","data-for":"jk-side-"+O},r.createElement("span",{style:{fontSize:"14px"}},w),(null==w?void 0:w.includes("..."))&&r.createElement(u,{textColor:"white",backgroundColor:"grey",place:"right",type:"info",effect:"solid",id:"jk-side-"+O},E("ACTION_TEST_"+O)))))))},H="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function G(e,t){return e(t={exports:{}},t.exports),t.exports}var q=G(function(e,t){(function(){var n="Expected a function",r="__lodash_placeholder__",i=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],o="[object Arguments]",a="[object Array]",l="[object Boolean]",u="[object Date]",c="[object Error]",s="[object Function]",d="[object GeneratorFunction]",f="[object Map]",v="[object Number]",m="[object Object]",p="[object RegExp]",g="[object Set]",h="[object String]",E="[object Symbol]",y="[object WeakMap]",_="[object ArrayBuffer]",b="[object DataView]",O="[object Float32Array]",C="[object Float64Array]",w="[object Int8Array]",S="[object Int16Array]",N="[object Int32Array]",I="[object Uint8Array]",D="[object Uint16Array]",T="[object Uint32Array]",x=/\b__p \+= '';/g,A=/\b(__p \+=) '' \+/g,R=/(__e\(.*?\)|\b__t\)) \+\n'';/g,L=/&(?:amp|lt|gt|quot|#39);/g,P=/[&<>"']/g,M=RegExp(L.source),k=RegExp(P.source),U=/<%-([\s\S]+?)%>/g,j=/<%([\s\S]+?)%>/g,B=/<%=([\s\S]+?)%>/g,F=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V=/^\w*$/,z=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,W=/[\\^$.*+?()[\]{}|]/g,G=RegExp(W.source),q=/^\s+/,Z=/\s/,X=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$=/\{\n\/\* \[wrapped with (.+)\] \*/,Y=/,? & /,K=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,J=/[()=,{}\[\]\/\s]/,Q=/\\(\\)?/g,ee=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,te=/\w*$/,ne=/^[-+]0x[0-9a-f]+$/i,re=/^0b[01]+$/i,ie=/^\[object .+?Constructor\]$/,oe=/^0o[0-7]+$/i,ae=/^(?:0|[1-9]\d*)$/,le=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ue=/($^)/,ce=/['\n\r\u2028\u2029\\]/g,se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",de="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fe="["+de+"]",ve="["+se+"]",me="\\d+",pe="[a-z\\xdf-\\xf6\\xf8-\\xff]",ge="[^\\ud800-\\udfff"+de+me+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",he="\\ud83c[\\udffb-\\udfff]",Ee="[^\\ud800-\\udfff]",ye="(?:\\ud83c[\\udde6-\\uddff]){2}",_e="[\\ud800-\\udbff][\\udc00-\\udfff]",be="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Oe="(?:"+pe+"|"+ge+")",Ce="(?:"+be+"|"+ge+")",we="(?:"+ve+"|"+he+")?",Se="[\\ufe0e\\ufe0f]?"+we+"(?:\\u200d(?:"+[Ee,ye,_e].join("|")+")[\\ufe0e\\ufe0f]?"+we+")*",Ne="(?:"+["[\\u2700-\\u27bf]",ye,_e].join("|")+")"+Se,Ie="(?:"+[Ee+ve+"?",ve,ye,_e,"[\\ud800-\\udfff]"].join("|")+")",De=RegExp("['’]","g"),Te=RegExp(ve,"g"),xe=RegExp(he+"(?="+he+")|"+Ie+Se,"g"),Ae=RegExp([be+"?"+pe+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[fe,be,"$"].join("|")+")",Ce+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[fe,be+Oe,"$"].join("|")+")",be+"?"+Oe+"+(?:['’](?:d|ll|m|re|s|t|ve))?",be+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",me,Ne].join("|"),"g"),Re=RegExp("[\\u200d\\ud800-\\udfff"+se+"\\ufe0e\\ufe0f]"),Le=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Me=-1,ke={};ke[O]=ke[C]=ke[w]=ke[S]=ke[N]=ke[I]=ke["[object Uint8ClampedArray]"]=ke[D]=ke[T]=!0,ke[o]=ke[a]=ke[_]=ke[l]=ke[b]=ke[u]=ke[c]=ke[s]=ke[f]=ke[v]=ke[m]=ke[p]=ke[g]=ke[h]=ke[y]=!1;var Ue={};Ue[o]=Ue[a]=Ue[_]=Ue[b]=Ue[l]=Ue[u]=Ue[O]=Ue[C]=Ue[w]=Ue[S]=Ue[N]=Ue[f]=Ue[v]=Ue[m]=Ue[p]=Ue[g]=Ue[h]=Ue[E]=Ue[I]=Ue["[object Uint8ClampedArray]"]=Ue[D]=Ue[T]=!0,Ue[c]=Ue[s]=Ue[y]=!1;var je={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Be=parseFloat,Fe=parseInt,Ve="object"==typeof H&&H&&H.Object===Object&&H,ze="object"==typeof self&&self&&self.Object===Object&&self,We=Ve||ze||Function("return this")(),He=t&&!t.nodeType&&t,Ge=He&&e&&!e.nodeType&&e,qe=Ge&&Ge.exports===He,Ze=qe&&Ve.process,Xe=function(){try{return Ge&&Ge.require&&Ge.require("util").types||Ze&&Ze.binding&&Ze.binding("util")}catch(e){}}(),$e=Xe&&Xe.isArrayBuffer,Ye=Xe&&Xe.isDate,Ke=Xe&&Xe.isMap,Je=Xe&&Xe.isRegExp,Qe=Xe&&Xe.isSet,et=Xe&&Xe.isTypedArray;function tt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function nt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function it(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function ot(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function at(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function lt(e,t){return!(null==e||!e.length)&&ht(e,t,0)>-1}function ut(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function ct(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function st(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function dt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function ft(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function vt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var mt=bt("length");function pt(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function gt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function ht(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):gt(e,yt,n)}function Et(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function yt(e){return e!=e}function _t(e,t){var n=null==e?0:e.length;return n?wt(e,t)/n:NaN}function bt(e){return function(t){return null==t?void 0:t[e]}}function Ot(e){return function(t){return null==e?void 0:e[t]}}function Ct(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function wt(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function St(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Nt(e){return e?e.slice(0,Ht(e)+1).replace(q,""):e}function It(e){return function(t){return e(t)}}function Dt(e,t){return ct(t,function(t){return e[t]})}function Tt(e,t){return e.has(t)}function xt(e,t){for(var n=-1,r=e.length;++n<r&&ht(t,e[n],0)>-1;);return n}function At(e,t){for(var n=e.length;n--&&ht(t,e[n],0)>-1;);return n}function Rt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Lt=Ot({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Pt=Ot({"&":"&","<":"<",">":">",'"':""","'":"'"});function Mt(e){return"\\"+je[e]}function kt(e){return Re.test(e)}function Ut(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function jt(e,t){return function(n){return e(t(n))}}function Bt(e,t){for(var n=-1,i=e.length,o=0,a=[];++n<i;){var l=e[n];l!==t&&l!==r||(e[n]=r,a[o++]=n)}return a}function Ft(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function Vt(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function zt(e){return kt(e)?function(e){for(var t=xe.lastIndex=0;xe.test(e);)++t;return t}(e):mt(e)}function Wt(e){return kt(e)?function(e){return e.match(xe)||[]}(e):function(e){return e.split("")}(e)}function Ht(e){for(var t=e.length;t--&&Z.test(e.charAt(t)););return t}var Gt=Ot({"&":"&","<":"<",">":">",""":'"',"'":"'"}),qt=function e(t){var H,Z=(t=null==t?We:qt.defaults(We.Object(),t,qt.pick(We,Pe))).Array,se=t.Date,de=t.Error,fe=t.Function,ve=t.Math,me=t.Object,pe=t.RegExp,ge=t.String,he=t.TypeError,Ee=Z.prototype,ye=me.prototype,_e=t["__core-js_shared__"],be=fe.prototype.toString,Oe=ye.hasOwnProperty,Ce=0,we=(H=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",Se=ye.toString,Ne=be.call(me),Ie=We._,xe=pe("^"+be.call(Oe).replace(W,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Re=qe?t.Buffer:void 0,je=t.Symbol,Ve=t.Uint8Array,ze=Re?Re.allocUnsafe:void 0,He=jt(me.getPrototypeOf,me),Ge=me.create,Ze=ye.propertyIsEnumerable,Xe=Ee.splice,mt=je?je.isConcatSpreadable:void 0,Ot=je?je.iterator:void 0,Zt=je?je.toStringTag:void 0,Xt=function(){try{var e=Ji(me,"defineProperty");return e({},"",{}),e}catch(e){}}(),$t=t.clearTimeout!==We.clearTimeout&&t.clearTimeout,Yt=se&&se.now!==We.Date.now&&se.now,Kt=t.setTimeout!==We.setTimeout&&t.setTimeout,Jt=ve.ceil,Qt=ve.floor,en=me.getOwnPropertySymbols,tn=Re?Re.isBuffer:void 0,nn=t.isFinite,rn=Ee.join,on=jt(me.keys,me),an=ve.max,ln=ve.min,un=se.now,cn=t.parseInt,sn=ve.random,dn=Ee.reverse,fn=Ji(t,"DataView"),vn=Ji(t,"Map"),mn=Ji(t,"Promise"),pn=Ji(t,"Set"),gn=Ji(t,"WeakMap"),hn=Ji(me,"create"),En=gn&&new gn,yn={},_n=Do(fn),bn=Do(vn),On=Do(mn),Cn=Do(pn),wn=Do(gn),Sn=je?je.prototype:void 0,Nn=Sn?Sn.valueOf:void 0,In=Sn?Sn.toString:void 0;function Dn(e){if(Ga(e)&&!Pa(e)&&!(e instanceof Rn)){if(e instanceof An)return e;if(Oe.call(e,"__wrapped__"))return To(e)}return new An(e)}var Tn=function(){function e(){}return function(t){if(!Ha(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function xn(){}function An(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Rn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Ln(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Mn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Mn;++t<n;)this.add(e[t])}function Un(e){var t=this.__data__=new Pn(e);this.size=t.size}function jn(e,t){var n=Pa(e),r=!n&&La(e),i=!n&&!r&&ja(e),o=!n&&!r&&!i&&Qa(e),a=n||r||i||o,l=a?St(e.length,ge):[],u=l.length;for(var c in e)!t&&!Oe.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||oo(c,u))||l.push(c);return l}function Bn(e){var t=e.length;return t?e[Mr(0,t-1)]:void 0}function Fn(e,t){return Co(gi(e),$n(t,0,e.length))}function Vn(e){return Co(gi(e))}function zn(e,t,n){(void 0!==n&&!xa(e[t],n)||void 0===n&&!(t in e))&&Zn(e,t,n)}function Wn(e,t,n){var r=e[t];Oe.call(e,t)&&xa(r,n)&&(void 0!==n||t in e)||Zn(e,t,n)}function Hn(e,t){for(var n=e.length;n--;)if(xa(e[n][0],t))return n;return-1}function Gn(e,t,n,r){return er(e,function(e,i,o){t(r,e,n(e),o)}),r}function qn(e,t){return e&&hi(t,bl(t),e)}function Zn(e,t,n){"__proto__"==t&&Xt?Xt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Xn(e,t){for(var n=-1,r=t.length,i=Z(r),o=null==e;++n<r;)i[n]=o?void 0:gl(e,t[n]);return i}function $n(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Yn(e,t,n,r,i,a){var c,y=1&t,x=2&t,A=4&t;if(n&&(c=i?n(e,r,i,a):n(e)),void 0!==c)return c;if(!Ha(e))return e;var R=Pa(e);if(R){if(c=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Oe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!y)return gi(e,c)}else{var L=to(e),P=L==s||L==d;if(ja(e))return si(e,y);if(L==m||L==o||P&&!i){if(c=x||P?{}:ro(e),!y)return x?function(e,t){return hi(e,eo(e),t)}(e,function(e,t){return e&&hi(t,Ol(t),e)}(c,e)):function(e,t){return hi(e,Qi(e),t)}(e,qn(c,e))}else{if(!Ue[L])return i?e:{};c=function(e,t,n){var r=e.constructor;switch(t){case _:return di(e);case l:case u:return new r(+e);case b:return function(e,t){var n=t?di(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case O:case C:case w:case S:case N:case I:case"[object Uint8ClampedArray]":case D:case T:return fi(e,n);case f:return new r;case v:case h:return new r(e);case p:return function(e){var t=new e.constructor(e.source,te.exec(e));return t.lastIndex=e.lastIndex,t}(e);case g:return new r;case E:return Nn?me(Nn.call(e)):{}}}(e,L,y)}}a||(a=new Un);var M=a.get(e);if(M)return M;a.set(e,c),Ya(e)?e.forEach(function(r){c.add(Yn(r,t,n,r,e,a))}):qa(e)&&e.forEach(function(r,i){c.set(i,Yn(r,t,n,i,e,a))});var k=R?void 0:(A?x?Gi:Hi:x?Ol:bl)(e);return rt(k||e,function(r,i){k&&(r=e[i=r]),Wn(c,i,Yn(r,t,n,i,e,a))}),c}function Kn(e,t,n){var r=n.length;if(null==e)return!r;for(e=me(e);r--;){var i=n[r],o=e[i];if(void 0===o&&!(i in e)||!(0,t[i])(o))return!1}return!0}function Jn(e,t,r){if("function"!=typeof e)throw new he(n);return yo(function(){e.apply(void 0,r)},t)}function Qn(e,t,n,r){var i=-1,o=lt,a=!0,l=e.length,u=[],c=t.length;if(!l)return u;n&&(t=ct(t,It(n))),r?(o=ut,a=!1):t.length>=200&&(o=Tt,a=!1,t=new kn(t));e:for(;++i<l;){var s=e[i],d=null==n?s:n(s);if(s=r||0!==s?s:0,a&&d==d){for(var f=c;f--;)if(t[f]===d)continue e;u.push(s)}else o(t,d,r)||u.push(s)}return u}Dn.templateSettings={escape:U,evaluate:j,interpolate:B,variable:"",imports:{_:Dn}},(Dn.prototype=xn.prototype).constructor=Dn,(An.prototype=Tn(xn.prototype)).constructor=An,(Rn.prototype=Tn(xn.prototype)).constructor=Rn,Ln.prototype.clear=function(){this.__data__=hn?hn(null):{},this.size=0},Ln.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ln.prototype.get=function(e){var t=this.__data__;if(hn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Oe.call(t,e)?t[e]:void 0},Ln.prototype.has=function(e){var t=this.__data__;return hn?void 0!==t[e]:Oe.call(t,e)},Ln.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=hn&&void 0===t?"__lodash_hash_undefined__":t,this},Pn.prototype.clear=function(){this.__data__=[],this.size=0},Pn.prototype.delete=function(e){var t=this.__data__,n=Hn(t,e);return!(n<0||(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,0))},Pn.prototype.get=function(e){var t=this.__data__,n=Hn(t,e);return n<0?void 0:t[n][1]},Pn.prototype.has=function(e){return Hn(this.__data__,e)>-1},Pn.prototype.set=function(e,t){var n=this.__data__,r=Hn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Mn.prototype.clear=function(){this.size=0,this.__data__={hash:new Ln,map:new(vn||Pn),string:new Ln}},Mn.prototype.delete=function(e){var t=Yi(this,e).delete(e);return this.size-=t?1:0,t},Mn.prototype.get=function(e){return Yi(this,e).get(e)},Mn.prototype.has=function(e){return Yi(this,e).has(e)},Mn.prototype.set=function(e,t){var n=Yi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},kn.prototype.add=kn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},kn.prototype.has=function(e){return this.__data__.has(e)},Un.prototype.clear=function(){this.__data__=new Pn,this.size=0},Un.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Un.prototype.get=function(e){return this.__data__.get(e)},Un.prototype.has=function(e){return this.__data__.has(e)},Un.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Pn){var r=n.__data__;if(!vn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Mn(r)}return n.set(e,t),this.size=n.size,this};var er=_i(ur),tr=_i(cr,!0);function nr(e,t){var n=!0;return er(e,function(e,r,i){return n=!!t(e,r,i)}),n}function rr(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],a=t(o);if(null!=a&&(void 0===l?a==a&&!Ja(a):n(a,l)))var l=a,u=o}return u}function ir(e,t){var n=[];return er(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function or(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=io),i||(i=[]);++o<a;){var l=e[o];t>0&&n(l)?t>1?or(l,t-1,n,r,i):st(i,l):r||(i[i.length]=l)}return i}var ar=bi(),lr=bi(!0);function ur(e,t){return e&&ar(e,t,bl)}function cr(e,t){return e&&lr(e,t,bl)}function sr(e,t){return at(t,function(t){return Va(e[t])})}function dr(e,t){for(var n=0,r=(t=ai(t,e)).length;null!=e&&n<r;)e=e[Io(t[n++])];return n&&n==r?e:void 0}function fr(e,t,n){var r=t(e);return Pa(e)?r:st(r,n(e))}function vr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Zt&&Zt in me(e)?function(e){var t=Oe.call(e,Zt),n=e[Zt];try{e[Zt]=void 0;var r=!0}catch(e){}var i=Se.call(e);return r&&(t?e[Zt]=n:delete e[Zt]),i}(e):function(e){return Se.call(e)}(e)}function mr(e,t){return e>t}function pr(e,t){return null!=e&&Oe.call(e,t)}function gr(e,t){return null!=e&&t in me(e)}function hr(e,t,n){for(var r=n?ut:lt,i=e[0].length,o=e.length,a=o,l=Z(o),u=Infinity,c=[];a--;){var s=e[a];a&&t&&(s=ct(s,It(t))),u=ln(s.length,u),l[a]=!n&&(t||i>=120&&s.length>=120)?new kn(a&&s):void 0}s=e[0];var d=-1,f=l[0];e:for(;++d<i&&c.length<u;){var v=s[d],m=t?t(v):v;if(v=n||0!==v?v:0,!(f?Tt(f,m):r(c,m,n))){for(a=o;--a;){var p=l[a];if(!(p?Tt(p,m):r(e[a],m,n)))continue e}f&&f.push(m),c.push(v)}}return c}function Er(e,t,n){var r=null==(e=po(e,t=ai(t,e)))?e:e[Io(Fo(t))];return null==r?void 0:tt(r,e,n)}function yr(e){return Ga(e)&&vr(e)==o}function _r(e,t,n,r,i){return e===t||(null==e||null==t||!Ga(e)&&!Ga(t)?e!=e&&t!=t:function(e,t,n,r,i,s){var d=Pa(e),y=Pa(t),O=d?a:to(e),C=y?a:to(t),w=(O=O==o?m:O)==m,S=(C=C==o?m:C)==m,N=O==C;if(N&&ja(e)){if(!ja(t))return!1;d=!0,w=!1}if(N&&!w)return s||(s=new Un),d||Qa(e)?zi(e,t,n,r,i,s):function(e,t,n,r,i,o,a){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!o(new Ve(e),new Ve(t)));case l:case u:case v:return xa(+e,+t);case c:return e.name==t.name&&e.message==t.message;case p:case h:return e==t+"";case f:var s=Ut;case g:if(s||(s=Ft),e.size!=t.size&&!(1&r))return!1;var d=a.get(e);if(d)return d==t;r|=2,a.set(e,t);var m=zi(s(e),s(t),r,i,o,a);return a.delete(e),m;case E:if(Nn)return Nn.call(e)==Nn.call(t)}return!1}(e,t,O,n,r,i,s);if(!(1&n)){var I=w&&Oe.call(e,"__wrapped__"),D=S&&Oe.call(t,"__wrapped__");if(I||D){var T=I?e.value():e,x=D?t.value():t;return s||(s=new Un),i(T,x,n,r,s)}}return!!N&&(s||(s=new Un),function(e,t,n,r,i,o){var a=1&n,l=Hi(e),u=l.length;if(u!=Hi(t).length&&!a)return!1;for(var c=u;c--;){var s=l[c];if(!(a?s in t:Oe.call(t,s)))return!1}var d=o.get(e),f=o.get(t);if(d&&f)return d==t&&f==e;var v=!0;o.set(e,t),o.set(t,e);for(var m=a;++c<u;){var p=e[s=l[c]],g=t[s];if(r)var h=a?r(g,p,s,t,e,o):r(p,g,s,e,t,o);if(!(void 0===h?p===g||i(p,g,n,r,o):h)){v=!1;break}m||(m="constructor"==s)}if(v&&!m){var E=e.constructor,y=t.constructor;E==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof E&&E instanceof E&&"function"==typeof y&&y instanceof y||(v=!1)}return o.delete(e),o.delete(t),v}(e,t,n,r,i,s))}(e,t,n,r,_r,i))}function br(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=me(e);i--;){var l=n[i];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<o;){var u=(l=n[i])[0],c=e[u],s=l[1];if(a&&l[2]){if(void 0===c&&!(u in e))return!1}else{var d=new Un;if(r)var f=r(c,s,u,e,t,d);if(!(void 0===f?_r(s,c,3,r,d):f))return!1}}return!0}function Or(e){return!(!Ha(e)||(t=e,we&&we in t))&&(Va(e)?xe:ie).test(Do(e));var t}function Cr(e){return"function"==typeof e?e:null==e?Zl:"object"==typeof e?Pa(e)?Dr(e[0],e[1]):Ir(e):nu(e)}function wr(e){if(!so(e))return on(e);var t=[];for(var n in me(e))Oe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Sr(e,t){return e<t}function Nr(e,t){var n=-1,r=ka(e)?Z(e.length):[];return er(e,function(e,i,o){r[++n]=t(e,i,o)}),r}function Ir(e){var t=Ki(e);return 1==t.length&&t[0][2]?vo(t[0][0],t[0][1]):function(n){return n===e||br(n,e,t)}}function Dr(e,t){return lo(e)&&fo(t)?vo(Io(e),t):function(n){var r=gl(n,e);return void 0===r&&r===t?hl(n,e):_r(t,r,3)}}function Tr(e,t,n,r,i){e!==t&&ar(t,function(o,a){if(i||(i=new Un),Ha(o))!function(e,t,n,r,i,o,a){var l=ho(e,n),u=ho(t,n),c=a.get(u);if(c)zn(e,n,c);else{var s=o?o(l,u,n+"",e,t,a):void 0,d=void 0===s;if(d){var f=Pa(u),v=!f&&ja(u),m=!f&&!v&&Qa(u);s=u,f||v||m?Pa(l)?s=l:Ua(l)?s=gi(l):v?(d=!1,s=si(u,!0)):m?(d=!1,s=fi(u,!0)):s=[]:Xa(u)||La(u)?(s=l,La(l)?s=ll(l):Ha(l)&&!Va(l)||(s=ro(u))):d=!1}d&&(a.set(u,s),i(s,u,r,o,a),a.delete(u)),zn(e,n,s)}}(e,t,a,n,Tr,r,i);else{var l=r?r(ho(e,a),o,a+"",e,t,i):void 0;void 0===l&&(l=o),zn(e,a,l)}},Ol)}function xr(e,t){var n=e.length;if(n)return oo(t+=t<0?n:0,n)?e[t]:void 0}function Ar(e,t,n){t=t.length?ct(t,function(e){return Pa(e)?function(t){return dr(t,1===e.length?e[0]:e)}:e}):[Zl];var r=-1;return t=ct(t,It($i())),function(e,t){var r=e.length;for(e.sort(function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,l=n.length;++r<a;){var u=vi(i[r],o[r]);if(u)return r>=l?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});r--;)e[r]=e[r].value;return e}(Nr(e,function(e,n,i){return{criteria:ct(t,function(t){return t(e)}),index:++r,value:e}}))}function Rr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],l=dr(e,a);n(l,a)&&Fr(o,ai(a,e),l)}return o}function Lr(e,t,n,r){var i=r?Et:ht,o=-1,a=t.length,l=e;for(e===t&&(t=gi(t)),n&&(l=ct(e,It(n)));++o<a;)for(var u=0,c=t[o],s=n?n(c):c;(u=i(l,s,u,r))>-1;)l!==e&&Xe.call(l,u,1),Xe.call(e,u,1);return e}function Pr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;oo(i)?Xe.call(e,i,1):Jr(e,i)}}return e}function Mr(e,t){return e+Qt(sn()*(t-e+1))}function kr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Qt(t/2))&&(e+=e)}while(t);return n}function Ur(e,t){return _o(mo(e,t,Zl),e+"")}function jr(e){return Bn(xl(e))}function Br(e,t){var n=xl(e);return Co(n,$n(t,0,n.length))}function Fr(e,t,n,r){if(!Ha(e))return e;for(var i=-1,o=(t=ai(t,e)).length,a=o-1,l=e;null!=l&&++i<o;){var u=Io(t[i]),c=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(i!=a){var s=l[u];void 0===(c=r?r(s,u,l):void 0)&&(c=Ha(s)?s:oo(t[i+1])?[]:{})}Wn(l,u,c),l=l[u]}return e}var Vr=En?function(e,t){return En.set(e,t),e}:Zl,zr=Xt?function(e,t){return Xt(e,"toString",{configurable:!0,enumerable:!1,value:Hl(t),writable:!0})}:Zl;function Wr(e){return Co(xl(e))}function Hr(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Z(i);++r<i;)o[r]=e[r+t];return o}function Gr(e,t){var n;return er(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}function qr(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!Ja(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return Zr(e,t,Zl,n)}function Zr(e,t,n,r){var i=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=n(t))!=t,l=null===t,u=Ja(t),c=void 0===t;i<o;){var s=Qt((i+o)/2),d=n(e[s]),f=void 0!==d,v=null===d,m=d==d,p=Ja(d);if(a)var g=r||m;else g=c?m&&(r||f):l?m&&f&&(r||!v):u?m&&f&&!v&&(r||!p):!v&&!p&&(r?d<=t:d<t);g?i=s+1:o=s}return ln(o,4294967294)}function Xr(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],l=t?t(a):a;if(!n||!xa(l,u)){var u=l;o[i++]=0===a?0:a}}return o}function $r(e){return"number"==typeof e?e:Ja(e)?NaN:+e}function Yr(e){if("string"==typeof e)return e;if(Pa(e))return ct(e,Yr)+"";if(Ja(e))return In?In.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Kr(e,t,n){var r=-1,i=lt,o=e.length,a=!0,l=[],u=l;if(n)a=!1,i=ut;else if(o>=200){var c=t?null:ki(e);if(c)return Ft(c);a=!1,i=Tt,u=new kn}else u=t?[]:l;e:for(;++r<o;){var s=e[r],d=t?t(s):s;if(s=n||0!==s?s:0,a&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),l.push(s)}else i(u,d,n)||(u!==l&&u.push(d),l.push(s))}return l}function Jr(e,t){return null==(e=po(e,t=ai(t,e)))||delete e[Io(Fo(t))]}function Qr(e,t,n,r){return Fr(e,t,n(dr(e,t)),r)}function ei(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?Hr(e,r?0:o,r?o+1:i):Hr(e,r?o+1:0,r?i:o)}function ti(e,t){var n=e;return n instanceof Rn&&(n=n.value()),dt(t,function(e,t){return t.func.apply(t.thisArg,st([e],t.args))},n)}function ni(e,t,n){var r=e.length;if(r<2)return r?Kr(e[0]):[];for(var i=-1,o=Z(r);++i<r;)for(var a=e[i],l=-1;++l<r;)l!=i&&(o[i]=Qn(o[i]||a,e[l],t,n));return Kr(or(o,1),t,n)}function ri(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r<i;)n(a,e[r],r<o?t[r]:void 0);return a}function ii(e){return Ua(e)?e:[]}function oi(e){return"function"==typeof e?e:Zl}function ai(e,t){return Pa(e)?e:lo(e,t)?[e]:No(ul(e))}var li=Ur;function ui(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Hr(e,t,n)}var ci=$t||function(e){return We.clearTimeout(e)};function si(e,t){if(t)return e.slice();var n=e.length,r=ze?ze(n):new e.constructor(n);return e.copy(r),r}function di(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function fi(e,t){var n=t?di(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function vi(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=Ja(e),a=void 0!==t,l=null===t,u=t==t,c=Ja(t);if(!l&&!c&&!o&&e>t||o&&a&&u&&!l&&!c||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!c&&e<t||c&&n&&i&&!r&&!o||l&&n&&i||!a&&i||!u)return-1}return 0}function mi(e,t,n,r){for(var i=-1,o=e.length,a=n.length,l=-1,u=t.length,c=an(o-a,0),s=Z(u+c),d=!r;++l<u;)s[l]=t[l];for(;++i<a;)(d||i<o)&&(s[n[i]]=e[i]);for(;c--;)s[l++]=e[i++];return s}function pi(e,t,n,r){for(var i=-1,o=e.length,a=-1,l=n.length,u=-1,c=t.length,s=an(o-l,0),d=Z(s+c),f=!r;++i<s;)d[i]=e[i];for(var v=i;++u<c;)d[v+u]=t[u];for(;++a<l;)(f||i<o)&&(d[v+n[a]]=e[i++]);return d}function gi(e,t){var n=-1,r=e.length;for(t||(t=Z(r));++n<r;)t[n]=e[n];return t}function hi(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var l=t[o],u=r?r(n[l],e[l],l,n,e):void 0;void 0===u&&(u=e[l]),i?Zn(n,l,u):Wn(n,l,u)}return n}function Ei(e,t){return function(n,r){var i=Pa(n)?nt:Gn,o=t?t():{};return i(n,e,$i(r,2),o)}}function yi(e){return Ur(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&ao(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=me(t);++r<i;){var l=n[r];l&&e(t,l,r,o)}return t})}function _i(e,t){return function(n,r){if(null==n)return n;if(!ka(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=me(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function bi(e){return function(t,n,r){for(var i=-1,o=me(t),a=r(t),l=a.length;l--;){var u=a[e?l:++i];if(!1===n(o[u],u,o))break}return t}}function Oi(e){return function(t){var n=kt(t=ul(t))?Wt(t):void 0,r=n?n[0]:t.charAt(0),i=n?ui(n,1).join(""):t.slice(1);return r[e]()+i}}function Ci(e){return function(t){return dt(Vl(Ll(t).replace(De,"")),e,"")}}function wi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Tn(e.prototype),r=e.apply(n,t);return Ha(r)?r:n}}function Si(e){return function(t,n,r){var i=me(t);if(!ka(t)){var o=$i(n,3);t=bl(t),n=function(e){return o(i[e],e,i)}}var a=e(t,n,r);return a>-1?i[o?t[a]:a]:void 0}}function Ni(e){return Wi(function(t){var r=t.length,i=r,o=An.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new he(n);if(o&&!l&&"wrapper"==Zi(a))var l=new An([],!0)}for(i=l?i:r;++i<r;){var u=Zi(a=t[i]),c="wrapper"==u?qi(a):void 0;l=c&&uo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?l[Zi(c[0])].apply(l,c[3]):1==a.length&&uo(a)?l[u]():l.thru(a)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&Pa(n))return l.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}})}function Ii(e,t,n,r,i,o,a,l,u,c){var s=128&t,d=1&t,f=2&t,v=24&t,m=512&t,p=f?void 0:wi(e);return function g(){for(var h=arguments.length,E=Z(h),y=h;y--;)E[y]=arguments[y];if(v)var _=Xi(g),b=Rt(E,_);if(r&&(E=mi(E,r,i,v)),o&&(E=pi(E,o,a,v)),h-=b,v&&h<c){var O=Bt(E,_);return Pi(e,t,Ii,g.placeholder,n,E,O,l,u,c-h)}var C=d?n:this,w=f?C[e]:e;return h=E.length,l?E=go(E,l):m&&h>1&&E.reverse(),s&&u<h&&(E.length=u),this&&this!==We&&this instanceof g&&(w=p||wi(w)),w.apply(C,E)}}function Di(e,t){return function(n,r){return function(e,t,n,r){return ur(e,function(e,i,o){t(r,n(e),i,o)}),r}(n,e,t(r),{})}}function Ti(e,t){return function(n,r){var i;if(void 0===n&&void 0===r)return t;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;"string"==typeof n||"string"==typeof r?(n=Yr(n),r=Yr(r)):(n=$r(n),r=$r(r)),i=e(n,r)}return i}}function xi(e){return Wi(function(t){return t=ct(t,It($i())),Ur(function(n){var r=this;return e(t,function(e){return tt(e,r,n)})})})}function Ai(e,t){var n=(t=void 0===t?" ":Yr(t)).length;if(n<2)return n?kr(t,e):t;var r=kr(t,Jt(e/zt(t)));return kt(t)?ui(Wt(r),0,e).join(""):r.slice(0,e)}function Ri(e){return function(t,n,r){return r&&"number"!=typeof r&&ao(t,n,r)&&(n=r=void 0),t=rl(t),void 0===n?(n=t,t=0):n=rl(n),function(e,t,n,r){for(var i=-1,o=an(Jt((t-e)/(n||1)),0),a=Z(o);o--;)a[r?o:++i]=e,e+=n;return a}(t,n,r=void 0===r?t<n?1:-1:rl(r),e)}}function Li(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=al(t),n=al(n)),e(t,n)}}function Pi(e,t,n,r,i,o,a,l,u,c){var s=8&t;t|=s?32:64,4&(t&=~(s?64:32))||(t&=-4);var d=[e,t,i,s?o:void 0,s?a:void 0,s?void 0:o,s?void 0:a,l,u,c],f=n.apply(void 0,d);return uo(e)&&Eo(f,d),f.placeholder=r,bo(f,e,t)}function Mi(e){var t=ve[e];return function(e,n){if(e=al(e),(n=null==n?0:ln(il(n),292))&&nn(e)){var r=(ul(e)+"e").split("e");return+((r=(ul(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var ki=pn&&1/Ft(new pn([,-0]))[1]==1/0?function(e){return new pn(e)}:Jl;function Ui(e){return function(t){var n=to(t);return n==f?Ut(t):n==g?Vt(t):function(e,t){return ct(t,function(t){return[t,e[t]]})}(t,e(t))}}function ji(e,t,i,o,a,l,u,c){var s=2&t;if(!s&&"function"!=typeof e)throw new he(n);var d=o?o.length:0;if(d||(t&=-97,o=a=void 0),u=void 0===u?u:an(il(u),0),c=void 0===c?c:il(c),d-=a?a.length:0,64&t){var f=o,v=a;o=a=void 0}var m=s?void 0:qi(e),p=[e,t,i,o,a,f,v,l,u,c];if(m&&function(e,t){var n=e[1],i=t[1],o=n|i;if(!(o<131||128==i&&8==n||128==i&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n))return e;1&i&&(e[2]=t[2],o|=1&n?0:4);var a=t[3];if(a){var l=e[3];e[3]=l?mi(l,a,t[4]):a,e[4]=l?Bt(e[3],r):t[4]}(a=t[5])&&(e[5]=(l=e[5])?pi(l,a,t[6]):a,e[6]=l?Bt(e[5],r):t[6]),(a=t[7])&&(e[7]=a),128&i&&(e[8]=null==e[8]?t[8]:ln(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(p,m),e=p[0],t=p[1],i=p[2],o=p[3],a=p[4],!(c=p[9]=void 0===p[9]?s?0:e.length:an(p[9]-d,0))&&24&t&&(t&=-25),t&&1!=t)g=8==t||16==t?function(e,t,n){var r=wi(e);return function i(){for(var o=arguments.length,a=Z(o),l=o,u=Xi(i);l--;)a[l]=arguments[l];var c=o<3&&a[0]!==u&&a[o-1]!==u?[]:Bt(a,u);if((o-=c.length)<n)return Pi(e,t,Ii,i.placeholder,void 0,a,c,void 0,void 0,n-o);var s=this&&this!==We&&this instanceof i?r:e;return tt(s,this,a)}}(e,t,c):32!=t&&33!=t||a.length?Ii.apply(void 0,p):function(e,t,n,r){var i=1&t,o=wi(e);return function t(){for(var a=-1,l=arguments.length,u=-1,c=r.length,s=Z(c+l),d=this&&this!==We&&this instanceof t?o:e;++u<c;)s[u]=r[u];for(;l--;)s[u++]=arguments[++a];return tt(d,i?n:this,s)}}(e,t,i,o);else var g=function(e,t,n){var r=1&t,i=wi(e);return function t(){var o=this&&this!==We&&this instanceof t?i:e;return o.apply(r?n:this,arguments)}}(e,t,i);return bo((m?Vr:Eo)(g,p),e,t)}function Bi(e,t,n,r){return void 0===e||xa(e,ye[n])&&!Oe.call(r,n)?t:e}function Fi(e,t,n,r,i,o){return Ha(e)&&Ha(t)&&(o.set(t,e),Tr(e,t,void 0,Fi,o),o.delete(t)),e}function Vi(e){return Xa(e)?void 0:e}function zi(e,t,n,r,i,o){var a=1&n,l=e.length,u=t.length;if(l!=u&&!(a&&u>l))return!1;var c=o.get(e),s=o.get(t);if(c&&s)return c==t&&s==e;var d=-1,f=!0,v=2&n?new kn:void 0;for(o.set(e,t),o.set(t,e);++d<l;){var m=e[d],p=t[d];if(r)var g=a?r(p,m,d,t,e,o):r(m,p,d,e,t,o);if(void 0!==g){if(g)continue;f=!1;break}if(v){if(!vt(t,function(e,t){if(!Tt(v,t)&&(m===e||i(m,e,n,r,o)))return v.push(t)})){f=!1;break}}else if(m!==p&&!i(m,p,n,r,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function Wi(e){return _o(mo(e,void 0,Mo),e+"")}function Hi(e){return fr(e,bl,Qi)}function Gi(e){return fr(e,Ol,eo)}var qi=En?function(e){return En.get(e)}:Jl;function Zi(e){for(var t=e.name+"",n=yn[t],r=Oe.call(yn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Xi(e){return(Oe.call(Dn,"placeholder")?Dn:e).placeholder}function $i(){var e=Dn.iteratee||Xl;return e=e===Xl?Cr:e,arguments.length?e(arguments[0],arguments[1]):e}function Yi(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Ki(e){for(var t=bl(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,fo(i)]}return t}function Ji(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Or(n)?n:void 0}var Qi=en?function(e){return null==e?[]:(e=me(e),at(en(e),function(t){return Ze.call(e,t)}))}:ou,eo=en?function(e){for(var t=[];e;)st(t,Qi(e)),e=He(e);return t}:ou,to=vr;function no(e,t,n){for(var r=-1,i=(t=ai(t,e)).length,o=!1;++r<i;){var a=Io(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Wa(i)&&oo(a,i)&&(Pa(e)||La(e))}function ro(e){return"function"!=typeof e.constructor||so(e)?{}:Tn(He(e))}function io(e){return Pa(e)||La(e)||!!(mt&&e&&e[mt])}function oo(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ae.test(e))&&e>-1&&e%1==0&&e<t}function ao(e,t,n){if(!Ha(n))return!1;var r=typeof t;return!!("number"==r?ka(n)&&oo(t,n.length):"string"==r&&t in n)&&xa(n[t],e)}function lo(e,t){if(Pa(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ja(e))||V.test(e)||!F.test(e)||null!=t&&e in me(t)}function uo(e){var t=Zi(e),n=Dn[t];if("function"!=typeof n||!(t in Rn.prototype))return!1;if(e===n)return!0;var r=qi(n);return!!r&&e===r[0]}(fn&&to(new fn(new ArrayBuffer(1)))!=b||vn&&to(new vn)!=f||mn&&"[object Promise]"!=to(mn.resolve())||pn&&to(new pn)!=g||gn&&to(new gn)!=y)&&(to=function(e){var t=vr(e),n=t==m?e.constructor:void 0,r=n?Do(n):"";if(r)switch(r){case _n:return b;case bn:return f;case On:return"[object Promise]";case Cn:return g;case wn:return y}return t});var co=_e?Va:au;function so(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ye)}function fo(e){return e==e&&!Ha(e)}function vo(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in me(n))}}function mo(e,t,n){return t=an(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=an(r.length-t,0),a=Z(o);++i<o;)a[i]=r[t+i];i=-1;for(var l=Z(t+1);++i<t;)l[i]=r[i];return l[t]=n(a),tt(e,this,l)}}function po(e,t){return t.length<2?e:dr(e,Hr(t,0,-1))}function go(e,t){for(var n=e.length,r=ln(t.length,n),i=gi(e);r--;){var o=t[r];e[r]=oo(o,n)?i[o]:void 0}return e}function ho(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Eo=Oo(Vr),yo=Kt||function(e,t){return We.setTimeout(e,t)},_o=Oo(zr);function bo(e,t,n){var r=t+"";return _o(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(X,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return rt(i,function(n){var r="_."+n[0];t&n[1]&&!lt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match($);return t?t[1].split(Y):[]}(r),n)))}function Oo(e){var t=0,n=0;return function(){var r=un(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Co(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n<t;){var o=Mr(n,i),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}var wo,So,No=(wo=wa(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(z,function(e,n,r,i){t.push(r?i.replace(Q,"$1"):n||e)}),t},function(e){return 500===So.size&&So.clear(),e}),So=wo.cache,wo);function Io(e){if("string"==typeof e||Ja(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Do(e){if(null!=e){try{return be.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function To(e){if(e instanceof Rn)return e.clone();var t=new An(e.__wrapped__,e.__chain__);return t.__actions__=gi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var xo=Ur(function(e,t){return Ua(e)?Qn(e,or(t,1,Ua,!0)):[]}),Ao=Ur(function(e,t){var n=Fo(t);return Ua(n)&&(n=void 0),Ua(e)?Qn(e,or(t,1,Ua,!0),$i(n,2)):[]}),Ro=Ur(function(e,t){var n=Fo(t);return Ua(n)&&(n=void 0),Ua(e)?Qn(e,or(t,1,Ua,!0),void 0,n):[]});function Lo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:il(n);return i<0&&(i=an(r+i,0)),gt(e,$i(t,3),i)}function Po(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=il(n),i=n<0?an(r+i,0):ln(i,r-1)),gt(e,$i(t,3),i,!0)}function Mo(e){return null!=e&&e.length?or(e,1):[]}function ko(e){return e&&e.length?e[0]:void 0}var Uo=Ur(function(e){var t=ct(e,ii);return t.length&&t[0]===e[0]?hr(t):[]}),jo=Ur(function(e){var t=Fo(e),n=ct(e,ii);return t===Fo(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?hr(n,$i(t,2)):[]}),Bo=Ur(function(e){var t=Fo(e),n=ct(e,ii);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?hr(n,void 0,t):[]});function Fo(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Vo=Ur(zo);function zo(e,t){return e&&e.length&&t&&t.length?Lr(e,t):e}var Wo=Wi(function(e,t){var n=null==e?0:e.length,r=Xn(e,t);return Pr(e,ct(t,function(e){return oo(e,n)?+e:e}).sort(vi)),r});function Ho(e){return null==e?e:dn.call(e)}var Go=Ur(function(e){return Kr(or(e,1,Ua,!0))}),qo=Ur(function(e){var t=Fo(e);return Ua(t)&&(t=void 0),Kr(or(e,1,Ua,!0),$i(t,2))}),Zo=Ur(function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,Kr(or(e,1,Ua,!0),void 0,t)});function Xo(e){if(!e||!e.length)return[];var t=0;return e=at(e,function(e){if(Ua(e))return t=an(e.length,t),!0}),St(t,function(t){return ct(e,bt(t))})}function $o(e,t){if(!e||!e.length)return[];var n=Xo(e);return null==t?n:ct(n,function(e){return tt(t,void 0,e)})}var Yo=Ur(function(e,t){return Ua(e)?Qn(e,t):[]}),Ko=Ur(function(e){return ni(at(e,Ua))}),Jo=Ur(function(e){var t=Fo(e);return Ua(t)&&(t=void 0),ni(at(e,Ua),$i(t,2))}),Qo=Ur(function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,ni(at(e,Ua),void 0,t)}),ea=Ur(Xo),ta=Ur(function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,$o(e,n)});function na(e){var t=Dn(e);return t.__chain__=!0,t}function ra(e,t){return t(e)}var ia=Wi(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Xn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Rn&&oo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ra,args:[i],thisArg:void 0}),new An(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(void 0),e})):this.thru(i)}),oa=Ei(function(e,t,n){Oe.call(e,n)?++e[n]:Zn(e,n,1)}),aa=Si(Lo),la=Si(Po);function ua(e,t){return(Pa(e)?rt:er)(e,$i(t,3))}function ca(e,t){return(Pa(e)?it:tr)(e,$i(t,3))}var sa=Ei(function(e,t,n){Oe.call(e,n)?e[n].push(t):Zn(e,n,[t])}),da=Ur(function(e,t,n){var r=-1,i="function"==typeof t,o=ka(e)?Z(e.length):[];return er(e,function(e){o[++r]=i?tt(t,e,n):Er(e,t,n)}),o}),fa=Ei(function(e,t,n){Zn(e,n,t)});function va(e,t){return(Pa(e)?ct:Nr)(e,$i(t,3))}var ma=Ei(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),pa=Ur(function(e,t){if(null==e)return[];var n=t.length;return n>1&&ao(e,t[0],t[1])?t=[]:n>2&&ao(t[0],t[1],t[2])&&(t=[t[0]]),Ar(e,or(t,1),[])}),ga=Yt||function(){return We.Date.now()};function ha(e,t,n){return t=n?void 0:t,ji(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function Ea(e,t){var r;if("function"!=typeof t)throw new he(n);return e=il(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}var ya=Ur(function(e,t,n){var r=1;if(n.length){var i=Bt(n,Xi(ya));r|=32}return ji(e,r,t,n,i)}),_a=Ur(function(e,t,n){var r=3;if(n.length){var i=Bt(n,Xi(_a));r|=32}return ji(t,r,e,n,i)});function ba(e,t,r){var i,o,a,l,u,c,s=0,d=!1,f=!1,v=!0;if("function"!=typeof e)throw new he(n);function m(t){var n=i,r=o;return i=o=void 0,s=t,l=e.apply(r,n)}function p(e){return s=e,u=yo(h,t),d?m(e):l}function g(e){var n=e-c;return void 0===c||n>=t||n<0||f&&e-s>=a}function h(){var e=ga();if(g(e))return E(e);u=yo(h,function(e){var n=t-(e-c);return f?ln(n,a-(e-s)):n}(e))}function E(e){return u=void 0,v&&i?m(e):(i=o=void 0,l)}function y(){var e=ga(),n=g(e);if(i=arguments,o=this,c=e,n){if(void 0===u)return p(c);if(f)return ci(u),u=yo(h,t),m(c)}return void 0===u&&(u=yo(h,t)),l}return t=al(t)||0,Ha(r)&&(d=!!r.leading,a=(f="maxWait"in r)?an(al(r.maxWait)||0,t):a,v="trailing"in r?!!r.trailing:v),y.cancel=function(){void 0!==u&&ci(u),s=0,i=c=o=u=void 0},y.flush=function(){return void 0===u?l:E(ga())},y}var Oa=Ur(function(e,t){return Jn(e,1,t)}),Ca=Ur(function(e,t,n){return Jn(e,al(t)||0,n)});function wa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new he(n);var r=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return r.cache=new(wa.Cache||Mn),r}function Sa(e){if("function"!=typeof e)throw new he(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}wa.Cache=Mn;var Na=li(function(e,t){var n=(t=1==t.length&&Pa(t[0])?ct(t[0],It($i())):ct(or(t,1),It($i()))).length;return Ur(function(r){for(var i=-1,o=ln(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return tt(e,this,r)})}),Ia=Ur(function(e,t){return ji(e,32,void 0,t,Bt(t,Xi(Ia)))}),Da=Ur(function(e,t){return ji(e,64,void 0,t,Bt(t,Xi(Da)))}),Ta=Wi(function(e,t){return ji(e,256,void 0,void 0,void 0,t)});function xa(e,t){return e===t||e!=e&&t!=t}var Aa=Li(mr),Ra=Li(function(e,t){return e>=t}),La=yr(function(){return arguments}())?yr:function(e){return Ga(e)&&Oe.call(e,"callee")&&!Ze.call(e,"callee")},Pa=Z.isArray,Ma=$e?It($e):function(e){return Ga(e)&&vr(e)==_};function ka(e){return null!=e&&Wa(e.length)&&!Va(e)}function Ua(e){return Ga(e)&&ka(e)}var ja=tn||au,Ba=Ye?It(Ye):function(e){return Ga(e)&&vr(e)==u};function Fa(e){if(!Ga(e))return!1;var t=vr(e);return t==c||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Xa(e)}function Va(e){if(!Ha(e))return!1;var t=vr(e);return t==s||t==d||"[object AsyncFunction]"==t||"[object Proxy]"==t}function za(e){return"number"==typeof e&&e==il(e)}function Wa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Ha(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ga(e){return null!=e&&"object"==typeof e}var qa=Ke?It(Ke):function(e){return Ga(e)&&to(e)==f};function Za(e){return"number"==typeof e||Ga(e)&&vr(e)==v}function Xa(e){if(!Ga(e)||vr(e)!=m)return!1;var t=He(e);if(null===t)return!0;var n=Oe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&be.call(n)==Ne}var $a=Je?It(Je):function(e){return Ga(e)&&vr(e)==p},Ya=Qe?It(Qe):function(e){return Ga(e)&&to(e)==g};function Ka(e){return"string"==typeof e||!Pa(e)&&Ga(e)&&vr(e)==h}function Ja(e){return"symbol"==typeof e||Ga(e)&&vr(e)==E}var Qa=et?It(et):function(e){return Ga(e)&&Wa(e.length)&&!!ke[vr(e)]},el=Li(Sr),tl=Li(function(e,t){return e<=t});function nl(e){if(!e)return[];if(ka(e))return Ka(e)?Wt(e):gi(e);if(Ot&&e[Ot])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ot]());var t=to(e);return(t==f?Ut:t==g?Ft:xl)(e)}function rl(e){return e?(e=al(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function il(e){var t=rl(e),n=t%1;return t==t?n?t-n:t:0}function ol(e){return e?$n(il(e),0,4294967295):0}function al(e){if("number"==typeof e)return e;if(Ja(e))return NaN;if(Ha(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ha(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Nt(e);var n=re.test(e);return n||oe.test(e)?Fe(e.slice(2),n?2:8):ne.test(e)?NaN:+e}function ll(e){return hi(e,Ol(e))}function ul(e){return null==e?"":Yr(e)}var cl=yi(function(e,t){if(so(t)||ka(t))hi(t,bl(t),e);else for(var n in t)Oe.call(t,n)&&Wn(e,n,t[n])}),sl=yi(function(e,t){hi(t,Ol(t),e)}),dl=yi(function(e,t,n,r){hi(t,Ol(t),e,r)}),fl=yi(function(e,t,n,r){hi(t,bl(t),e,r)}),vl=Wi(Xn),ml=Ur(function(e,t){e=me(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&ao(t[0],t[1],i)&&(r=1);++n<r;)for(var o=t[n],a=Ol(o),l=-1,u=a.length;++l<u;){var c=a[l],s=e[c];(void 0===s||xa(s,ye[c])&&!Oe.call(e,c))&&(e[c]=o[c])}return e}),pl=Ur(function(e){return e.push(void 0,Fi),tt(wl,void 0,e)});function gl(e,t,n){var r=null==e?void 0:dr(e,t);return void 0===r?n:r}function hl(e,t){return null!=e&&no(e,t,gr)}var El=Di(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Se.call(t)),e[t]=n},Hl(Zl)),yl=Di(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Se.call(t)),Oe.call(e,t)?e[t].push(n):e[t]=[n]},$i),_l=Ur(Er);function bl(e){return ka(e)?jn(e):wr(e)}function Ol(e){return ka(e)?jn(e,!0):function(e){if(!Ha(e))return function(e){var t=[];if(null!=e)for(var n in me(e))t.push(n);return t}(e);var t=so(e),n=[];for(var r in e)("constructor"!=r||!t&&Oe.call(e,r))&&n.push(r);return n}(e)}var Cl=yi(function(e,t,n){Tr(e,t,n)}),wl=yi(function(e,t,n,r){Tr(e,t,n,r)}),Sl=Wi(function(e,t){var n={};if(null==e)return n;var r=!1;t=ct(t,function(t){return t=ai(t,e),r||(r=t.length>1),t}),hi(e,Gi(e),n),r&&(n=Yn(n,7,Vi));for(var i=t.length;i--;)Jr(n,t[i]);return n}),Nl=Wi(function(e,t){return null==e?{}:function(e,t){return Rr(e,t,function(t,n){return hl(e,n)})}(e,t)});function Il(e,t){if(null==e)return{};var n=ct(Gi(e),function(e){return[e]});return t=$i(t),Rr(e,n,function(e,n){return t(e,n[0])})}var Dl=Ui(bl),Tl=Ui(Ol);function xl(e){return null==e?[]:Dt(e,bl(e))}var Al=Ci(function(e,t,n){return t=t.toLowerCase(),e+(n?Rl(t):t)});function Rl(e){return Fl(ul(e).toLowerCase())}function Ll(e){return(e=ul(e))&&e.replace(le,Lt).replace(Te,"")}var Pl=Ci(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ml=Ci(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),kl=Oi("toLowerCase"),Ul=Ci(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),jl=Ci(function(e,t,n){return e+(n?" ":"")+Fl(t)}),Bl=Ci(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Fl=Oi("toUpperCase");function Vl(e,t,n){return e=ul(e),void 0===(t=n?void 0:t)?function(e){return Le.test(e)}(e)?function(e){return e.match(Ae)||[]}(e):function(e){return e.match(K)||[]}(e):e.match(t)||[]}var zl=Ur(function(e,t){try{return tt(e,void 0,t)}catch(e){return Fa(e)?e:new de(e)}}),Wl=Wi(function(e,t){return rt(t,function(t){t=Io(t),Zn(e,t,ya(e[t],e))}),e});function Hl(e){return function(){return e}}var Gl=Ni(),ql=Ni(!0);function Zl(e){return e}function Xl(e){return Cr("function"==typeof e?e:Yn(e,1))}var $l=Ur(function(e,t){return function(n){return Er(n,e,t)}}),Yl=Ur(function(e,t){return function(n){return Er(e,n,t)}});function Kl(e,t,n){var r=bl(t),i=sr(t,r);null!=n||Ha(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=sr(t,bl(t)));var o=!(Ha(n)&&"chain"in n&&!n.chain),a=Va(e);return rt(i,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=gi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,st([this.value()],arguments))})}),e}function Jl(){}var Ql=xi(ct),eu=xi(ot),tu=xi(vt);function nu(e){return lo(e)?bt(Io(e)):function(e){return function(t){return dr(t,e)}}(e)}var ru=Ri(),iu=Ri(!0);function ou(){return[]}function au(){return!1}var lu,uu=Ti(function(e,t){return e+t},0),cu=Mi("ceil"),su=Ti(function(e,t){return e/t},1),du=Mi("floor"),fu=Ti(function(e,t){return e*t},1),vu=Mi("round"),mu=Ti(function(e,t){return e-t},0);return Dn.after=function(e,t){if("function"!=typeof t)throw new he(n);return e=il(e),function(){if(--e<1)return t.apply(this,arguments)}},Dn.ary=ha,Dn.assign=cl,Dn.assignIn=sl,Dn.assignInWith=dl,Dn.assignWith=fl,Dn.at=vl,Dn.before=Ea,Dn.bind=ya,Dn.bindAll=Wl,Dn.bindKey=_a,Dn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Pa(e)?e:[e]},Dn.chain=na,Dn.chunk=function(e,t,n){t=(n?ao(e,t,n):void 0===t)?1:an(il(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var i=0,o=0,a=Z(Jt(r/t));i<r;)a[o++]=Hr(e,i,i+=t);return a},Dn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Dn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=Z(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return st(Pa(n)?gi(n):[n],or(t,1))},Dn.cond=function(e){var t=null==e?0:e.length,r=$i();return e=t?ct(e,function(e){if("function"!=typeof e[1])throw new he(n);return[r(e[0]),e[1]]}):[],Ur(function(n){for(var r=-1;++r<t;){var i=e[r];if(tt(i[0],this,n))return tt(i[1],this,n)}})},Dn.conforms=function(e){return function(e){var t=bl(e);return function(n){return Kn(n,e,t)}}(Yn(e,1))},Dn.constant=Hl,Dn.countBy=oa,Dn.create=function(e,t){var n=Tn(e);return null==t?n:qn(n,t)},Dn.curry=function e(t,n,r){var i=ji(t,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=e.placeholder,i},Dn.curryRight=function e(t,n,r){var i=ji(t,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=e.placeholder,i},Dn.debounce=ba,Dn.defaults=ml,Dn.defaultsDeep=pl,Dn.defer=Oa,Dn.delay=Ca,Dn.difference=xo,Dn.differenceBy=Ao,Dn.differenceWith=Ro,Dn.drop=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,(t=n||void 0===t?1:il(t))<0?0:t,r):[]},Dn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,0,(t=r-(t=n||void 0===t?1:il(t)))<0?0:t):[]},Dn.dropRightWhile=function(e,t){return e&&e.length?ei(e,$i(t,3),!0,!0):[]},Dn.dropWhile=function(e,t){return e&&e.length?ei(e,$i(t,3),!0):[]},Dn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&ao(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=il(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:il(r))<0&&(r+=i),r=n>r?0:ol(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Dn.filter=function(e,t){return(Pa(e)?at:ir)(e,$i(t,3))},Dn.flatMap=function(e,t){return or(va(e,t),1)},Dn.flatMapDeep=function(e,t){return or(va(e,t),1/0)},Dn.flatMapDepth=function(e,t,n){return n=void 0===n?1:il(n),or(va(e,t),n)},Dn.flatten=Mo,Dn.flattenDeep=function(e){return null!=e&&e.length?or(e,1/0):[]},Dn.flattenDepth=function(e,t){return null!=e&&e.length?or(e,t=void 0===t?1:il(t)):[]},Dn.flip=function(e){return ji(e,512)},Dn.flow=Gl,Dn.flowRight=ql,Dn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Dn.functions=function(e){return null==e?[]:sr(e,bl(e))},Dn.functionsIn=function(e){return null==e?[]:sr(e,Ol(e))},Dn.groupBy=sa,Dn.initial=function(e){return null!=e&&e.length?Hr(e,0,-1):[]},Dn.intersection=Uo,Dn.intersectionBy=jo,Dn.intersectionWith=Bo,Dn.invert=El,Dn.invertBy=yl,Dn.invokeMap=da,Dn.iteratee=Xl,Dn.keyBy=fa,Dn.keys=bl,Dn.keysIn=Ol,Dn.map=va,Dn.mapKeys=function(e,t){var n={};return t=$i(t,3),ur(e,function(e,r,i){Zn(n,t(e,r,i),e)}),n},Dn.mapValues=function(e,t){var n={};return t=$i(t,3),ur(e,function(e,r,i){Zn(n,r,t(e,r,i))}),n},Dn.matches=function(e){return Ir(Yn(e,1))},Dn.matchesProperty=function(e,t){return Dr(e,Yn(t,1))},Dn.memoize=wa,Dn.merge=Cl,Dn.mergeWith=wl,Dn.method=$l,Dn.methodOf=Yl,Dn.mixin=Kl,Dn.negate=Sa,Dn.nthArg=function(e){return e=il(e),Ur(function(t){return xr(t,e)})},Dn.omit=Sl,Dn.omitBy=function(e,t){return Il(e,Sa($i(t)))},Dn.once=function(e){return Ea(2,e)},Dn.orderBy=function(e,t,n,r){return null==e?[]:(Pa(t)||(t=null==t?[]:[t]),Pa(n=r?void 0:n)||(n=null==n?[]:[n]),Ar(e,t,n))},Dn.over=Ql,Dn.overArgs=Na,Dn.overEvery=eu,Dn.overSome=tu,Dn.partial=Ia,Dn.partialRight=Da,Dn.partition=ma,Dn.pick=Nl,Dn.pickBy=Il,Dn.property=nu,Dn.propertyOf=function(e){return function(t){return null==e?void 0:dr(e,t)}},Dn.pull=Vo,Dn.pullAll=zo,Dn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Lr(e,t,$i(n,2)):e},Dn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Lr(e,t,void 0,n):e},Dn.pullAt=Wo,Dn.range=ru,Dn.rangeRight=iu,Dn.rearg=Ta,Dn.reject=function(e,t){return(Pa(e)?at:ir)(e,Sa($i(t,3)))},Dn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=$i(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Pr(e,i),n},Dn.rest=function(e,t){if("function"!=typeof e)throw new he(n);return Ur(e,t=void 0===t?t:il(t))},Dn.reverse=Ho,Dn.sampleSize=function(e,t,n){return t=(n?ao(e,t,n):void 0===t)?1:il(t),(Pa(e)?Fn:Br)(e,t)},Dn.set=function(e,t,n){return null==e?e:Fr(e,t,n)},Dn.setWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Fr(e,t,n,r)},Dn.shuffle=function(e){return(Pa(e)?Vn:Wr)(e)},Dn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&ao(e,t,n)?(t=0,n=r):(t=null==t?0:il(t),n=void 0===n?r:il(n)),Hr(e,t,n)):[]},Dn.sortBy=pa,Dn.sortedUniq=function(e){return e&&e.length?Xr(e):[]},Dn.sortedUniqBy=function(e,t){return e&&e.length?Xr(e,$i(t,2)):[]},Dn.split=function(e,t,n){return n&&"number"!=typeof n&&ao(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=ul(e))&&("string"==typeof t||null!=t&&!$a(t))&&!(t=Yr(t))&&kt(e)?ui(Wt(e),0,n):e.split(t,n):[]},Dn.spread=function(e,t){if("function"!=typeof e)throw new he(n);return t=null==t?0:an(il(t),0),Ur(function(n){var r=n[t],i=ui(n,0,t);return r&&st(i,r),tt(e,this,i)})},Dn.tail=function(e){var t=null==e?0:e.length;return t?Hr(e,1,t):[]},Dn.take=function(e,t,n){return e&&e.length?Hr(e,0,(t=n||void 0===t?1:il(t))<0?0:t):[]},Dn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,(t=r-(t=n||void 0===t?1:il(t)))<0?0:t,r):[]},Dn.takeRightWhile=function(e,t){return e&&e.length?ei(e,$i(t,3),!1,!0):[]},Dn.takeWhile=function(e,t){return e&&e.length?ei(e,$i(t,3)):[]},Dn.tap=function(e,t){return t(e),e},Dn.throttle=function(e,t,r){var i=!0,o=!0;if("function"!=typeof e)throw new he(n);return Ha(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),ba(e,t,{leading:i,maxWait:t,trailing:o})},Dn.thru=ra,Dn.toArray=nl,Dn.toPairs=Dl,Dn.toPairsIn=Tl,Dn.toPath=function(e){return Pa(e)?ct(e,Io):Ja(e)?[e]:gi(No(ul(e)))},Dn.toPlainObject=ll,Dn.transform=function(e,t,n){var r=Pa(e),i=r||ja(e)||Qa(e);if(t=$i(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Ha(e)&&Va(o)?Tn(He(e)):{}}return(i?rt:ur)(e,function(e,r,i){return t(n,e,r,i)}),n},Dn.unary=function(e){return ha(e,1)},Dn.union=Go,Dn.unionBy=qo,Dn.unionWith=Zo,Dn.uniq=function(e){return e&&e.length?Kr(e):[]},Dn.uniqBy=function(e,t){return e&&e.length?Kr(e,$i(t,2)):[]},Dn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Kr(e,void 0,t):[]},Dn.unset=function(e,t){return null==e||Jr(e,t)},Dn.unzip=Xo,Dn.unzipWith=$o,Dn.update=function(e,t,n){return null==e?e:Qr(e,t,oi(n))},Dn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Qr(e,t,oi(n),r)},Dn.values=xl,Dn.valuesIn=function(e){return null==e?[]:Dt(e,Ol(e))},Dn.without=Yo,Dn.words=Vl,Dn.wrap=function(e,t){return Ia(oi(t),e)},Dn.xor=Ko,Dn.xorBy=Jo,Dn.xorWith=Qo,Dn.zip=ea,Dn.zipObject=function(e,t){return ri(e||[],t||[],Wn)},Dn.zipObjectDeep=function(e,t){return ri(e||[],t||[],Fr)},Dn.zipWith=ta,Dn.entries=Dl,Dn.entriesIn=Tl,Dn.extend=sl,Dn.extendWith=dl,Kl(Dn,Dn),Dn.add=uu,Dn.attempt=zl,Dn.camelCase=Al,Dn.capitalize=Rl,Dn.ceil=cu,Dn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=al(n))==n?n:0),void 0!==t&&(t=(t=al(t))==t?t:0),$n(al(e),t,n)},Dn.clone=function(e){return Yn(e,4)},Dn.cloneDeep=function(e){return Yn(e,5)},Dn.cloneDeepWith=function(e,t){return Yn(e,5,t="function"==typeof t?t:void 0)},Dn.cloneWith=function(e,t){return Yn(e,4,t="function"==typeof t?t:void 0)},Dn.conformsTo=function(e,t){return null==t||Kn(e,t,bl(t))},Dn.deburr=Ll,Dn.defaultTo=function(e,t){return null==e||e!=e?t:e},Dn.divide=su,Dn.endsWith=function(e,t,n){e=ul(e),t=Yr(t);var r=e.length,i=n=void 0===n?r:$n(il(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Dn.eq=xa,Dn.escape=function(e){return(e=ul(e))&&k.test(e)?e.replace(P,Pt):e},Dn.escapeRegExp=function(e){return(e=ul(e))&&G.test(e)?e.replace(W,"\\$&"):e},Dn.every=function(e,t,n){var r=Pa(e)?ot:nr;return n&&ao(e,t,n)&&(t=void 0),r(e,$i(t,3))},Dn.find=aa,Dn.findIndex=Lo,Dn.findKey=function(e,t){return pt(e,$i(t,3),ur)},Dn.findLast=la,Dn.findLastIndex=Po,Dn.findLastKey=function(e,t){return pt(e,$i(t,3),cr)},Dn.floor=du,Dn.forEach=ua,Dn.forEachRight=ca,Dn.forIn=function(e,t){return null==e?e:ar(e,$i(t,3),Ol)},Dn.forInRight=function(e,t){return null==e?e:lr(e,$i(t,3),Ol)},Dn.forOwn=function(e,t){return e&&ur(e,$i(t,3))},Dn.forOwnRight=function(e,t){return e&&cr(e,$i(t,3))},Dn.get=gl,Dn.gt=Aa,Dn.gte=Ra,Dn.has=function(e,t){return null!=e&&no(e,t,pr)},Dn.hasIn=hl,Dn.head=ko,Dn.identity=Zl,Dn.includes=function(e,t,n,r){e=ka(e)?e:xl(e),n=n&&!r?il(n):0;var i=e.length;return n<0&&(n=an(i+n,0)),Ka(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&ht(e,t,n)>-1},Dn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:il(n);return i<0&&(i=an(r+i,0)),ht(e,t,i)},Dn.inRange=function(e,t,n){return t=rl(t),void 0===n?(n=t,t=0):n=rl(n),function(e,t,n){return e>=ln(t,n)&&e<an(t,n)}(e=al(e),t,n)},Dn.invoke=_l,Dn.isArguments=La,Dn.isArray=Pa,Dn.isArrayBuffer=Ma,Dn.isArrayLike=ka,Dn.isArrayLikeObject=Ua,Dn.isBoolean=function(e){return!0===e||!1===e||Ga(e)&&vr(e)==l},Dn.isBuffer=ja,Dn.isDate=Ba,Dn.isElement=function(e){return Ga(e)&&1===e.nodeType&&!Xa(e)},Dn.isEmpty=function(e){if(null==e)return!0;if(ka(e)&&(Pa(e)||"string"==typeof e||"function"==typeof e.splice||ja(e)||Qa(e)||La(e)))return!e.length;var t=to(e);if(t==f||t==g)return!e.size;if(so(e))return!wr(e).length;for(var n in e)if(Oe.call(e,n))return!1;return!0},Dn.isEqual=function(e,t){return _r(e,t)},Dn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?_r(e,t,void 0,n):!!r},Dn.isError=Fa,Dn.isFinite=function(e){return"number"==typeof e&&nn(e)},Dn.isFunction=Va,Dn.isInteger=za,Dn.isLength=Wa,Dn.isMap=qa,Dn.isMatch=function(e,t){return e===t||br(e,t,Ki(t))},Dn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,br(e,t,Ki(t),n)},Dn.isNaN=function(e){return Za(e)&&e!=+e},Dn.isNative=function(e){if(co(e))throw new de("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Or(e)},Dn.isNil=function(e){return null==e},Dn.isNull=function(e){return null===e},Dn.isNumber=Za,Dn.isObject=Ha,Dn.isObjectLike=Ga,Dn.isPlainObject=Xa,Dn.isRegExp=$a,Dn.isSafeInteger=function(e){return za(e)&&e>=-9007199254740991&&e<=9007199254740991},Dn.isSet=Ya,Dn.isString=Ka,Dn.isSymbol=Ja,Dn.isTypedArray=Qa,Dn.isUndefined=function(e){return void 0===e},Dn.isWeakMap=function(e){return Ga(e)&&to(e)==y},Dn.isWeakSet=function(e){return Ga(e)&&"[object WeakSet]"==vr(e)},Dn.join=function(e,t){return null==e?"":rn.call(e,t)},Dn.kebabCase=Pl,Dn.last=Fo,Dn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=il(n))<0?an(r+i,0):ln(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):gt(e,yt,i,!0)},Dn.lowerCase=Ml,Dn.lowerFirst=kl,Dn.lt=el,Dn.lte=tl,Dn.max=function(e){return e&&e.length?rr(e,Zl,mr):void 0},Dn.maxBy=function(e,t){return e&&e.length?rr(e,$i(t,2),mr):void 0},Dn.mean=function(e){return _t(e,Zl)},Dn.meanBy=function(e,t){return _t(e,$i(t,2))},Dn.min=function(e){return e&&e.length?rr(e,Zl,Sr):void 0},Dn.minBy=function(e,t){return e&&e.length?rr(e,$i(t,2),Sr):void 0},Dn.stubArray=ou,Dn.stubFalse=au,Dn.stubObject=function(){return{}},Dn.stubString=function(){return""},Dn.stubTrue=function(){return!0},Dn.multiply=fu,Dn.nth=function(e,t){return e&&e.length?xr(e,il(t)):void 0},Dn.noConflict=function(){return We._===this&&(We._=Ie),this},Dn.noop=Jl,Dn.now=ga,Dn.pad=function(e,t,n){e=ul(e);var r=(t=il(t))?zt(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ai(Qt(i),n)+e+Ai(Jt(i),n)},Dn.padEnd=function(e,t,n){e=ul(e);var r=(t=il(t))?zt(e):0;return t&&r<t?e+Ai(t-r,n):e},Dn.padStart=function(e,t,n){e=ul(e);var r=(t=il(t))?zt(e):0;return t&&r<t?Ai(t-r,n)+e:e},Dn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),cn(ul(e).replace(q,""),t||0)},Dn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&ao(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=rl(e),void 0===t?(t=e,e=0):t=rl(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=sn();return ln(e+i*(t-e+Be("1e-"+((i+"").length-1))),t)}return Mr(e,t)},Dn.reduce=function(e,t,n){var r=Pa(e)?dt:Ct,i=arguments.length<3;return r(e,$i(t,4),n,i,er)},Dn.reduceRight=function(e,t,n){var r=Pa(e)?ft:Ct,i=arguments.length<3;return r(e,$i(t,4),n,i,tr)},Dn.repeat=function(e,t,n){return t=(n?ao(e,t,n):void 0===t)?1:il(t),kr(ul(e),t)},Dn.replace=function(){var e=arguments,t=ul(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Dn.result=function(e,t,n){var r=-1,i=(t=ai(t,e)).length;for(i||(i=1,e=void 0);++r<i;){var o=null==e?void 0:e[Io(t[r])];void 0===o&&(r=i,o=n),e=Va(o)?o.call(e):o}return e},Dn.round=vu,Dn.runInContext=e,Dn.sample=function(e){return(Pa(e)?Bn:jr)(e)},Dn.size=function(e){if(null==e)return 0;if(ka(e))return Ka(e)?zt(e):e.length;var t=to(e);return t==f||t==g?e.size:wr(e).length},Dn.snakeCase=Ul,Dn.some=function(e,t,n){var r=Pa(e)?vt:Gr;return n&&ao(e,t,n)&&(t=void 0),r(e,$i(t,3))},Dn.sortedIndex=function(e,t){return qr(e,t)},Dn.sortedIndexBy=function(e,t,n){return Zr(e,t,$i(n,2))},Dn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=qr(e,t);if(r<n&&xa(e[r],t))return r}return-1},Dn.sortedLastIndex=function(e,t){return qr(e,t,!0)},Dn.sortedLastIndexBy=function(e,t,n){return Zr(e,t,$i(n,2),!0)},Dn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=qr(e,t,!0)-1;if(xa(e[n],t))return n}return-1},Dn.startCase=jl,Dn.startsWith=function(e,t,n){return e=ul(e),n=null==n?0:$n(il(n),0,e.length),t=Yr(t),e.slice(n,n+t.length)==t},Dn.subtract=mu,Dn.sum=function(e){return e&&e.length?wt(e,Zl):0},Dn.sumBy=function(e,t){return e&&e.length?wt(e,$i(t,2)):0},Dn.template=function(e,t,n){var r=Dn.templateSettings;n&&ao(e,t,n)&&(t=void 0),e=ul(e),t=dl({},t,r,Bi);var i,o,a=dl({},t.imports,r.imports,Bi),l=bl(a),u=Dt(a,l),c=0,s=t.interpolate||ue,d="__p += '",f=pe((t.escape||ue).source+"|"+s.source+"|"+(s===B?ee:ue).source+"|"+(t.evaluate||ue).source+"|$","g"),v="//# sourceURL="+(Oe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Me+"]")+"\n";e.replace(f,function(t,n,r,a,l,u){return r||(r=a),d+=e.slice(c,u).replace(ce,Mt),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),l&&(o=!0,d+="';\n"+l+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t}),d+="';\n";var m=Oe.call(t,"variable")&&t.variable;if(m){if(J.test(m))throw new de("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(x,""):d).replace(A,"$1").replace(R,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var p=zl(function(){return fe(l,v+"return "+d).apply(void 0,u)});if(p.source=d,Fa(p))throw p;return p},Dn.times=function(e,t){if((e=il(e))<1||e>9007199254740991)return[];var n=4294967295,r=ln(e,4294967295);e-=4294967295;for(var i=St(r,t=$i(t));++n<e;)t(n);return i},Dn.toFinite=rl,Dn.toInteger=il,Dn.toLength=ol,Dn.toLower=function(e){return ul(e).toLowerCase()},Dn.toNumber=al,Dn.toSafeInteger=function(e){return e?$n(il(e),-9007199254740991,9007199254740991):0===e?e:0},Dn.toString=ul,Dn.toUpper=function(e){return ul(e).toUpperCase()},Dn.trim=function(e,t,n){if((e=ul(e))&&(n||void 0===t))return Nt(e);if(!e||!(t=Yr(t)))return e;var r=Wt(e),i=Wt(t);return ui(r,xt(r,i),At(r,i)+1).join("")},Dn.trimEnd=function(e,t,n){if((e=ul(e))&&(n||void 0===t))return e.slice(0,Ht(e)+1);if(!e||!(t=Yr(t)))return e;var r=Wt(e);return ui(r,0,At(r,Wt(t))+1).join("")},Dn.trimStart=function(e,t,n){if((e=ul(e))&&(n||void 0===t))return e.replace(q,"");if(!e||!(t=Yr(t)))return e;var r=Wt(e);return ui(r,xt(r,Wt(t))).join("")},Dn.truncate=function(e,t){var n=30,r="...";if(Ha(t)){var i="separator"in t?t.separator:i;n="length"in t?il(t.length):n,r="omission"in t?Yr(t.omission):r}var o=(e=ul(e)).length;if(kt(e)){var a=Wt(e);o=a.length}if(n>=o)return e;var l=n-zt(r);if(l<1)return r;var u=a?ui(a,0,l).join(""):e.slice(0,l);if(void 0===i)return u+r;if(a&&(l+=u.length-l),$a(i)){if(e.slice(l).search(i)){var c,s=u;for(i.global||(i=pe(i.source,ul(te.exec(i))+"g")),i.lastIndex=0;c=i.exec(s);)var d=c.index;u=u.slice(0,void 0===d?l:d)}}else if(e.indexOf(Yr(i),l)!=l){var f=u.lastIndexOf(i);f>-1&&(u=u.slice(0,f))}return u+r},Dn.unescape=function(e){return(e=ul(e))&&M.test(e)?e.replace(L,Gt):e},Dn.uniqueId=function(e){var t=++Ce;return ul(e)+t},Dn.upperCase=Bl,Dn.upperFirst=Fl,Dn.each=ua,Dn.eachRight=ca,Dn.first=ko,Kl(Dn,(lu={},ur(Dn,function(e,t){Oe.call(Dn.prototype,t)||(lu[t]=e)}),lu),{chain:!1}),Dn.VERSION="4.17.21",rt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Dn[e].placeholder=Dn}),rt(["drop","take"],function(e,t){Rn.prototype[e]=function(n){n=void 0===n?1:an(il(n),0);var r=this.__filtered__&&!t?new Rn(this):this.clone();return r.__filtered__?r.__takeCount__=ln(n,r.__takeCount__):r.__views__.push({size:ln(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},Rn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),rt(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Rn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:$i(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),rt(["head","last"],function(e,t){var n="take"+(t?"Right":"");Rn.prototype[e]=function(){return this[n](1).value()[0]}}),rt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Rn.prototype[e]=function(){return this.__filtered__?new Rn(this):this[n](1)}}),Rn.prototype.compact=function(){return this.filter(Zl)},Rn.prototype.find=function(e){return this.filter(e).head()},Rn.prototype.findLast=function(e){return this.reverse().find(e)},Rn.prototype.invokeMap=Ur(function(e,t){return"function"==typeof e?new Rn(this):this.map(function(n){return Er(n,e,t)})}),Rn.prototype.reject=function(e){return this.filter(Sa($i(e)))},Rn.prototype.slice=function(e,t){e=il(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Rn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=il(t))<0?n.dropRight(-t):n.take(t-e)),n)},Rn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Rn.prototype.toArray=function(){return this.take(4294967295)},ur(Rn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Dn[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(Dn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,l=t instanceof Rn,u=a[0],c=l||Pa(t),s=function(e){var t=i.apply(Dn,st([e],a));return r&&d?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(l=c=!1);var d=this.__chain__,f=!!this.__actions__.length,v=o&&!d,m=l&&!f;if(!o&&c){t=m?t:new Rn(this);var p=e.apply(t,a);return p.__actions__.push({func:ra,args:[s],thisArg:void 0}),new An(p,d)}return v&&m?e.apply(this,a):(p=this.thru(s),v?r?p.value()[0]:p.value():p)})}),rt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ee[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Dn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Pa(i)?i:[],e)}return this[n](function(n){return t.apply(Pa(n)?n:[],e)})}}),ur(Rn.prototype,function(e,t){var n=Dn[t];if(n){var r=n.name+"";Oe.call(yn,r)||(yn[r]=[]),yn[r].push({name:t,func:n})}}),yn[Ii(void 0,2).name]=[{name:"wrapper",func:void 0}],Rn.prototype.clone=function(){var e=new Rn(this.__wrapped__);return e.__actions__=gi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=gi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=gi(this.__views__),e},Rn.prototype.reverse=function(){if(this.__filtered__){var e=new Rn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Rn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Pa(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=ln(t,e+a);break;case"takeRight":e=an(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,l=o.end,u=l-a,c=r?l:a-1,s=this.__iteratees__,d=s.length,f=0,v=ln(u,this.__takeCount__);if(!n||!r&&i==u&&v==u)return ti(e,this.__actions__);var m=[];e:for(;u--&&f<v;){for(var p=-1,g=e[c+=t];++p<d;){var h=s[p],E=h.type,y=(0,h.iteratee)(g);if(2==E)g=y;else if(!y){if(1==E)continue e;break e}}m[f++]=g}return m},Dn.prototype.at=ia,Dn.prototype.chain=function(){return na(this)},Dn.prototype.commit=function(){return new An(this.value(),this.__chain__)},Dn.prototype.next=function(){void 0===this.__values__&&(this.__values__=nl(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},Dn.prototype.plant=function(e){for(var t,n=this;n instanceof xn;){var r=To(n);r.__index__=0,r.__values__=void 0,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Dn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Rn){var t=e;return this.__actions__.length&&(t=new Rn(this)),(t=t.reverse()).__actions__.push({func:ra,args:[Ho],thisArg:void 0}),new An(t,this.__chain__)}return this.thru(Ho)},Dn.prototype.toJSON=Dn.prototype.valueOf=Dn.prototype.value=function(){return ti(this.__wrapped__,this.__actions__)},Dn.prototype.first=Dn.prototype.head,Ot&&(Dn.prototype[Ot]=function(){return this}),Dn}();Ge?((Ge.exports=qt)._=qt,He._=qt):We._=qt}).call(H)}),Z=function(){var e,o,a=n.useRef(null),l=Digit.Hooks.useAccessControl(),u=l.isLoading,c=l.data,s=n.useState(""),f=s[0],v=s[1],m=i.useTranslation().t;n.useEffect(function(){if(u)return r.createElement(t.Loader,null);a.current.style.cursor="pointer",p()},[u]);var p=function(){a.current.style.width="55px",a.current.style.overflow="hidden",a.current.querySelectorAll(".dropdown-link").forEach(function(e){e.style.display="none"}),a.current.querySelectorAll(".actions").forEach(function(e){e.style.padding="0"})},g={},h={};null==c||null===(e=c.actions)||void 0===e||null===(o=e.filter(function(e){return"url"===e.url}))||void 0===o||o.forEach(function(e){q.set(h,e.path,d({},e))}),null==c||c.actions.filter(function(e){return"url"===e.url}).forEach(function(e){var t,n,r,i=e.path.split(".")[0];(""==f&&""!==e.path||""!==e.path&&null!==(t=m("ACTION_TEST_"+(null===(n=i)||void 0===n||null===(r=n.toUpperCase())||void 0===r?void 0:r.replace(/[ -]/g,"_"))))&&void 0!==t&&t.toLowerCase().includes(f.toLowerCase()))&&("TradeLicense"===(i=e.path.split(".")[0])&&(i="Trade License"),g[i]?g[i].push(e):g[i]=[e])});var E=[];return u?r.createElement(t.Loader,null):E?r.createElement("div",{className:"sidebar",ref:a,onMouseOver:function(){a.current.style.width="260px",a.current.style.overflow="auto",a.current.querySelectorAll(".dropdown-link").forEach(function(e){e.style.display="flex"})},onMouseLeave:p},r.createElement("div",{className:"submenu-container"},r.createElement("div",{className:"sidebar-link"},r.createElement("div",{className:"actions search-icon-wrapper"},r.createElement(t.SearchIcon,{className:"search-icon"}),r.createElement("input",{className:"employee-search-input",type:"text",placeholder:m("ACTION_TEST_SEARCH"),name:"search",value:f,onChange:function(e){return v(e.target.value)}})))),function(){var e=Object.keys(g);e.sort(function(e,t){return e.orderNumber-t.orderNumber});for(var t=0;t<e.length;t++)if(-1===g[e[t]][0].path.indexOf("."))if("Home"===g[e[t]][0].displayName){var n,i="/"+(null===(n=window)||void 0===n?void 0:n.contextPath)+"/employee";E.unshift({moduleName:e[t].toUpperCase(),icon:g[e[t]][0],navigationURL:i,type:"single"})}else{var o;E.push({moduleName:null===(o=g[e[t]][0])||void 0===o?void 0:o.displayName.toUpperCase(),type:"single",icon:g[e[t]][0],navigationURL:g[e[t]][0].navigationURL})}else E.push({moduleName:e[t].toUpperCase(),links:g[e[t]],icon:g[e[t]][0],orderNumber:g[e[t]][0].orderNumber});if(E.find(function(e){return"HOME"===e.moduleName})){E.findIndex(function(e){return"HOME"===e.moduleName});var a,l,u=null===(a=E)||void 0===a?void 0:a.filter(function(e){return"HOME"===(null==e?void 0:e.moduleName)}),c=null===(l=E)||void 0===l?void 0:l.filter(function(e){return"HOME"!==(null==e?void 0:e.moduleName)});E=c.sort(function(e,t){return e.moduleName.localeCompare(t.moduleName)}),(null==u?void 0:u[0])&&E.unshift(u[0])}else E.sort(function(e,t){return e.moduleName.localeCompare(t.moduleName)});var s=function e(t){var n=[];for(var r in t){var i=t[r];if("object"!=typeof i||null!=i&&i.id){var o;n.push({label:r,value:i,icon:null==i?void 0:i.leftIcon,to:"Home"===r?"/"+(null===(o=window)||void 0===o?void 0:o.contextPath)+"/employee":null==i?void 0:i.navigationURL})}else{var a,l=e(i);n.push({label:r,children:l,icon:null==l||null===(a=l[0])||void 0===a?void 0:a.icon,to:""})}}return n}(h);s.splice(s.findIndex(function(e){return""===(null==e?void 0:e.label)}),1),s.sort(function(e,t){return e.label.localeCompare(t.label)});var d=null==s?void 0:s.findIndex(function(e){return"Home"===(null==e?void 0:e.label)}),f=s.splice(d,1);return s.unshift(null==f?void 0:f[0]),s.map(function(e,t){return r.createElement(W,{key:e.label+"-"+t,item:e})})}()):""},X=function(e){var t=e.isSidebarOpen,n=e.toggleSidebar,i=e.handleLogout,o=e.mobileView,a=e.userDetails,l=e.modules;return e.CITIZEN?r.createElement(V,{isOpen:t,isMobile:!0,toggleSidebar:n,onLogout:i,linkData:e.linkData,islinkDataLoading:e.islinkDataLoading}):!o&&null!=a&&a.access_token?r.createElement(Z,{mobileView:o,userDetails:a,modules:l}):r.createElement(V,{isOpen:t,isMobile:!0,toggleSidebar:n,onLogout:i,isEmployee:!0})},$=function(e){var i=e.t,o=e.stateInfo,a=e.userDetails,u=e.CITIZEN,c=e.cityDetails,s=e.mobileView,d=e.handleUserDropdownSelection,f=e.logoUrl,v=e.showSidebar,m=void 0===v||v,p=e.showLanguageChange,g=e.linkData,h=e.islinkDataLoading,E=n.useState(!1),y=E[0],_=E[1],b=l.useHistory(),O=n.useState(!1),C=O[0],w=O[1],S=function(){_(!1),w(!0)},N=function(){w(!1)},I=[{name:i("EDIT_PROFILE"),icon:r.createElement(t.EditPencilIcon,{className:"icon"}),func:function(){var e;b.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/profile")}},{name:i("CORE_COMMON_LOGOUT"),icon:r.createElement(t.LogoutIcon,{className:"icon"}),func:S}];return r.createElement(r.Fragment,null,r.createElement(T,{t:i,stateInfo:o,toggleSidebar:_,isSidebarOpen:y,handleLogout:S,userDetails:a,CITIZEN:u,cityDetails:c,mobileView:s,userOptions:I,handleUserDropdownSelection:d,logoUrl:f,showLanguageChange:p}),C&&r.createElement(M,{onSelect:function(){Digit.UserService.logout(),w(!1)},onCancel:N,onDismiss:N}),m&&r.createElement(X,{t:i,CITIZEN:u,isSidebarOpen:y,toggleSidebar:_,handleLogout:S,mobileView:s,userDetails:a,linkData:g,islinkDataLoading:h}))},Y=function(e){var o=e.question,a=e.answer,l=e.lastIndex,u=n.useState(!1),c=u[0],s=u[1],d=i.useTranslation().t;return r.createElement("div",{className:"faqs border-none",onClick:function(){return s(!c)}},r.createElement("div",{className:"faq-question",style:{justifyContent:"space-between",display:"flex"}},r.createElement("span",null,d(o)),r.createElement("span",{className:c?"faqicon rotate":"faqicon",style:{float:"right"}},r.createElement(t.ArrowForward,null))),r.createElement("div",{className:"faq-answer",style:c?{display:"block"}:{display:"none"}},r.createElement("span",null,d(a))),l?null:r.createElement("div",{className:"cs-box-border"}))},K=function(e){var o,a,l,u=e.module,c=Digit.UserService.getUser(),s=((null==c||null===(o=c.info)||void 0===o?void 0:o.tenantId)||Digit.ULBService.getCurrentTenantId(),i.useTranslation().t),d=Digit.Hooks.useGetFAQsJSON(Digit.ULBService.getStateId()),f=d.data,v=null==f||null===(a=f.MdmsRes["common-masters"])||void 0===a||null===(l=a.faqs[0])||void 0===l?void 0:l[""+u].faqs;return d.isLoading?r.createElement(t.Loader,null):r.createElement(n.Fragment,null,r.createElement("div",{className:"faq-page"},r.createElement(t.BackButton,{style:{marginLeft:"unset"}}),r.createElement("div",{style:{marginBottom:"15px"}},r.createElement(t.Header,{styles:{marginLeft:"0px",paddingTop:"10px",fontSize:"32px"}},s("FAQ_S"))),r.createElement("div",{className:"faq-list"},v.map(function(e,t){return r.createElement(Y,{key:"faq_"+t,question:e.question,answer:e.answer,lastIndex:t===(null==v?void 0:v.length)-1})}))))},J=function(){var e,n,o,a,u,c,s,f,v,m,p,g,h,E,y,_,b,O,C,w,S,N,I,D,T=i.useTranslation().t,x=l.useHistory(),A=Digit.ULBService.getCitizenCurrentTenant(!0),R=Digit.Hooks.useStore.getInitData(),L=R.data,P=(void 0===L?{}:L).uiHomePage,M=R.isLoading,k=window.Digit.Utils.browser.isMobile(),U=function(){var e,t,n,r,i;return"EMPLOYEE"!==(null===(e=Digit.UserService)||void 0===e||null===(t=e.getUser())||void 0===t||null===(n=t.info)||void 0===n?void 0:n.type)&&!(null===(r=Digit.UserService)||void 0===r||null===(i=r.getUser())||void 0===i||!i.access_token)},j=Digit.Hooks.useEvents({tenantId:A,variant:"whats-new",config:{enabled:U()}}),B=j.data,F=j.isLoading;A||x.push("/"+(null===(D=window)||void 0===D?void 0:D.contextPath)+"/citizen/select-language");var V,z,W=null==P?void 0:P.appBannerDesktop,H=null==P?void 0:P.appBannerMobile,G=null==P?void 0:P.citizenServicesCard,q=null==P?void 0:P.informationAndUpdatesCard,Z=null==P?void 0:P.whatsAppBannerDesktop,X=null==P?void 0:P.whatsAppBannerMobile,$=null==P?void 0:P.whatsNewSection,Y=null==P?void 0:P.redirectURL;Y&&x.push("/"+(null===(V=window)||void 0===V?void 0:V.contextPath)+"/citizen/"+Y),null!==(e=window)&&void 0!==e&&null!==(n=e.location)&&void 0!==n&&null!==(o=n.href)&&void 0!==o&&null!==(a=o.includes)&&void 0!==a&&a.call(o,"sanitation-ui")&&x.push("/"+(null===(z=window)||void 0===z?void 0:z.contextPath)+"/citizen/all-services");var K=function(e){window.open(null==e?void 0:e.navigationUrl)},J={header:T(null==G?void 0:G.headerLabel),sideOption:{name:T(null==G||null===(u=G.sideOption)||void 0===u?void 0:u.name),onClick:function(){var e;return x.push(null==G||null===(e=G.sideOption)||void 0===e?void 0:e.navigationUrl)}},options:[{name:T(null==G||null===(c=G.props)||void 0===c||null===(s=c[0])||void 0===s?void 0:s.label),Icon:r.createElement(t.ComplaintIcon,null),onClick:function(){var e,t;return x.push(null==G||null===(e=G.props)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.navigationUrl)}},{name:T(null==G||null===(f=G.props)||void 0===f||null===(v=f[1])||void 0===v?void 0:v.label),Icon:r.createElement(t.PTIcon,{className:"fill-path-primary-main"}),onClick:function(){var e,t;return x.push(null==G||null===(e=G.props)||void 0===e||null===(t=e[1])||void 0===t?void 0:t.navigationUrl)}},{name:T(null==G||null===(m=G.props)||void 0===m||null===(p=m[2])||void 0===p?void 0:p.label),Icon:r.createElement(t.CaseIcon,{className:"fill-path-primary-main"}),onClick:function(){var e,t;return x.push(null==G||null===(e=G.props)||void 0===e||null===(t=e[2])||void 0===t?void 0:t.navigationUrl)}},{name:T(null==G||null===(g=G.props)||void 0===g||null===(h=g[3])||void 0===h?void 0:h.label),Icon:r.createElement(t.OBPSIcon,null),onClick:function(){var e,t;return x.push(null==G||null===(e=G.props)||void 0===e||null===(t=e[3])||void 0===t?void 0:t.navigationUrl)}}],styles:{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",width:"100%"}},Q={header:T(null==q?void 0:q.headerLabel),sideOption:{name:T(null==q||null===(E=q.sideOption)||void 0===E?void 0:E.name),onClick:function(){var e;return x.push(null==q||null===(e=q.sideOption)||void 0===e?void 0:e.navigationUrl)}},options:[{name:T(null==q||null===(y=q.props)||void 0===y||null===(_=y[0])||void 0===_?void 0:_.label),Icon:r.createElement(t.HomeIcon,null),onClick:function(){var e,t;return x.push(null==q||null===(e=q.props)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.navigationUrl)}},{name:T(null==q||null===(b=q.props)||void 0===b||null===(O=b[1])||void 0===O?void 0:O.label),Icon:r.createElement(t.Calender,null),onClick:function(){var e,t;return x.push(null==q||null===(e=q.props)||void 0===e||null===(t=e[1])||void 0===t?void 0:t.navigationUrl)}},{name:T(null==q||null===(C=q.props)||void 0===C||null===(w=C[2])||void 0===w?void 0:w.label),Icon:r.createElement(t.DocumentIcon,null),onClick:function(){var e,t;return x.push(null==q||null===(e=q.props)||void 0===e||null===(t=e[2])||void 0===t?void 0:t.navigationUrl)}},{name:T(null==q||null===(S=q.props)||void 0===S||null===(N=S[3])||void 0===N?void 0:N.label),Icon:r.createElement(t.DocumentIcon,null),onClick:function(){var e,t;return x.push(null==q||null===(e=q.props)||void 0===e||null===(t=e[3])||void 0===t?void 0:t.navigationUrl)}}],styles:{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",width:"100%"}};return M?r.createElement(t.Loader,null):r.createElement("div",{className:"HomePageContainer"},r.createElement("div",{className:"HomePageWrapper"},r.createElement("div",{className:"BannerWithSearch"},r.createElement("img",k?{src:null==H?void 0:H.bannerUrl}:{src:null==W?void 0:W.bannerUrl}),r.createElement("div",{className:"ServicesSection"},r.createElement(t.CardBasedOptions,d({style:{marginTop:"-30px"}},J)),r.createElement(t.CardBasedOptions,d({style:k?{}:{marginTop:"-30px"}},Q)))),(X||Z)&&r.createElement("div",{className:"WhatsAppBanner"},r.createElement("img",k?{src:null==X?void 0:X.bannerUrl,onClick:function(){return K(X)}}:{src:null==Z?void 0:Z.bannerUrl,onClick:function(){return K(Z)}})),U()?F?r.createElement(t.Loader,null):r.createElement("div",{className:"WhatsNewSection"},r.createElement("div",{className:"headSection"},r.createElement("h2",null,T(null==$?void 0:$.headerLabel)),r.createElement("p",{onClick:function(){var e;return x.push(null==$||null===(e=$.sideOption)||void 0===e?void 0:e.navigationUrl)}},T(null==$||null===(I=$.sideOption)||void 0===I?void 0:I.name))),r.createElement(t.WhatsNewCard,null==B?void 0:B[0])):null))},Q=function(){var e=i.useTranslation().t,o=l.useHistory(),a=Digit.Hooks.useStore.getInitData(),u=a.data,c=void 0===u?{}:u,s=c.languages,d=c.stateInfo,f=a.isLoading,v=Digit.StoreData.getCurrentLanguage(),m=n.useMemo(function(){return{header:e("CS_COMMON_CHOOSE_LANGUAGE"),submitBarLabel:e("CORE_COMMON_CONTINUE")}},[e]),p=n.useMemo(function(){return{options:s,optionsKey:"label",additionalWrapperClass:"reverse-radio-selection-wrapper",onSelect:function(e){return Digit.LocalizationService.changeLanguage(e.value,d.code)},selectedOption:null==s?void 0:s.filter(function(e){return e.value===v})[0]}},[v,s]);return f?r.createElement(t.Loader,null):r.createElement("div",{className:"selection-card-wrapper"},r.createElement(t.PageBasedInput,{texts:m,onSubmit:function(){var e;o.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/select-location")}},r.createElement(t.CardHeader,null,e("CS_COMMON_CHOOSE_LANGUAGE")),r.createElement(t.RadioButtons,p)))},ee=function(){var e=i.useTranslation().t,o=l.useHistory(),a=l.useLocation(),u=Digit.Hooks.useTenants(),c=u.data,s=u.isLoading,f=n.useState(function(){return{code:Digit.ULBService.getCitizenCurrentTenant(!0)}}),v=f[0],m=f[1],p=n.useState(!1),g=p[0],h=p[1],E=n.useMemo(function(){return{header:e("CS_COMMON_CHOOSE_LOCATION"),submitBarLabel:e("CORE_COMMON_CONTINUE")}},[e]);function y(e){m(e),h(!1)}var _=n.useMemo(function(){return{options:c,optionsKey:"i18nKey",additionalWrapperClass:"reverse-radio-selection-wrapper",onSelect:y,selectedOption:v}},[c,e,v]);return s?r.createElement("loader",null):r.createElement("div",{className:"selection-card-wrapper"},r.createElement(t.BackButton,null),r.createElement(t.PageBasedInput,{texts:E,onSubmit:function(){if(v){var e,t;Digit.SessionStorage.set("CITIZEN.COMMON.HOME.CITY",v);var n=null===(e=a.state)||void 0===e?void 0:e.redirectBackTo;n?o.replace(n):o.push("/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/citizen")}else h(!0)},className:"location-selection-container"},r.createElement(t.CardHeader,null,e("CS_COMMON_CHOOSE_LOCATION")),r.createElement(t.SearchOnRadioButtons,d({},_,{placeholder:e("COMMON_TABLE_SEARCH")})),g?r.createElement(t.CardLabelError,null,e("CS_COMMON_LOCATION_SELECTION_ERROR")):null))},te=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,i=this.s;if(i){var o=1&i?t:n;if(o){try{ne(r,1,o(this.v))}catch(e){ne(r,2,e)}return r}return this}return this.o=function(e){try{var i=e.v;1&e.s?ne(r,1,t?t(i):i):n?ne(r,1,n(i)):ne(r,2,i)}catch(e){ne(r,2,e)}},r},e}();function ne(e,t,n){if(!e.s){if(n instanceof te){if(!n.s)return void(n.o=ne.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(ne.bind(null,e,t),ne.bind(null,e,2));e.s=t,e.v=n;var r=e.o;r&&r(e)}}function re(e){return e instanceof te&&1&e.s}var ie="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function oe(e,t,n){if("function"==typeof e[ie]){var r,i,o,a=e[ie]();if(function e(l){try{for(;!((r=a.next()).done||n&&n());)if((l=t(r.value))&&l.then){if(!re(l))return void l.then(e,o||(o=ne.bind(null,i=new te,2)));l=l.v}i?ne(i,1,l):i=l}catch(e){ne(i||(i=new te),2,e)}}(),a.return){var l=function(e){try{r.done||a.return()}catch(e){}return e};if(i&&i.then)return i.then(l,function(e){throw l(e)});l()}return i}if(!("length"in e))throw new TypeError("Object is not iterable");for(var u=[],c=0;c<e.length;c++)u.push(e[c]);return function(e,t,n){var r,i,o=-1;return function a(l){try{for(;++o<e.length&&(!n||!n());)if((l=t(o))&&l.then){if(!re(l))return void l.then(a,i||(i=ne.bind(null,r=new te,2)));l=l.v}r?ne(r,1,l):r=l}catch(e){ne(r||(r=new te),2,e)}}(),r}(u,function(e){return t(u[e])},n)}function ae(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}function le(e){var o=e.setProfilePic,a=e.closeDrawer,l=e.userType,u=e.removeProfilePic,c=e.showToast,s=n.useState(null)[1],d=n.useState(""),f=d[0],v=d[1],m=n.useState(null)[1],p=i.useTranslation().t;return n.useEffect(function(){!function(){try{m(null);var e=function(){if(f){var e=function(){if(f.size>=1e6)c("error",p("CORE_COMMON_PROFILE_MAXIMUM_UPLOAD_SIZE_EXCEEDED")),m(p("CORE_COMMON_PROFILE_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{var e=ae(function(){return Promise.resolve(Digit.UploadServices.Filestorage(l+"-profile",f,Digit.ULBService.getStateId())).then(function(e){var t,n;if((null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0){var r,i,a=null==e||null===(r=e.data)||void 0===r||null===(i=r.files[0])||void 0===i?void 0:i.fileStoreId;s(a),o(a)}else c("error",p("CORE_COMMON_PROFILE_FILE_UPLOAD_ERROR")),m(p("CORE_COMMON_PROFILE_FILE_UPLOAD_ERROR"))})},function(){c("error",p("CORE_COMMON_PROFILE_INVALID_FILE_INPUT"))});if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[f]),r.createElement(r.Fragment,null,r.createElement("div",{style:{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",width:"100%",height:"100vh",backgroundColor:"rgba(0,0,0,.5)"},onClick:function(){return a()}}),r.createElement("div",{style:{width:"100%",justifyContent:"space-between",display:"flex",backgroundColor:"white",alignItems:"center",position:"fixed",left:"0",right:"0",height:"20%",bottom:"citizen"===l?"2.5rem":"0",zIndex:"2"}},r.createElement("div",{style:{display:"flex",flex:"1",flexDirection:"column",width:"100%",justifyContent:"center",alignItems:"center",gap:"8px 0"}},r.createElement("label",{for:"file",style:{cursor:"pointer"}}," ",r.createElement(t.GalleryIcon,null)),r.createElement("label",{style:{cursor:"pointer"}}," Gallery"),r.createElement("input",{type:"file",id:"file",accept:"image/*, .png, .jpeg, .jpg",onChange:function(e){return v(e.target.files[0])},style:{display:"none"}})),r.createElement("div",{style:{display:"flex",flex:"1",width:"100%",justifyContent:"center",alignItems:"center",flexDirection:"column",gap:"8px 0"}},r.createElement("button",{onClick:function(){u(),a()}},r.createElement(t.RemoveIcon,null)),r.createElement("label",{style:{cursor:"pointer"}},"Remove"))))}"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var ue,ce=function(e){var o,a,u,c,s,f,v,m,p,g,h,E,y=e.stateCode,_=e.userType,b=e.cityDetails,O=(l.useHistory(),i.useTranslation().t),C=window.location.href,w=Digit.ULBService.getStateId(),S=Digit.ULBService.getCurrentTenantId(),N=(null===(o=Digit.UserService.getUser())||void 0===o?void 0:o.info)||{},I=n.useState(null),D=I[0],T=I[1],x=n.useState(null!=N&&N.name?N.name:""),A=x[0],R=x[1],L=n.useState(null!=N&&N.emailId?N.emailId:""),P=L[0],M=L[1],k=n.useState(null==D?void 0:D.gender),U=k[0],j=k[1],B=n.useState(null!=N&&N.permanentCity?N.permanentCity:b.name),F=B[0],V=B[1],z=n.useState(null!=N&&N.mobileNumber?N.mobileNumber:""),W=z[0],H=z[1],G=n.useState(null),q=G[0],Z=G[1],X=n.useState(""),$=X[0],Y=X[1],K=n.useState(!1),J=K[0],Q=K[1],ee=n.useState(!1),te=ee[0],ne=ee[1],re=n.useState(""),ie=re[0],oe=re[1],ue=n.useState(""),ce=ue[0],se=ue[1],de=n.useState(""),fe=de[0],ve=de[1],me=n.useState(null),pe=me[0],ge=me[1],he=n.useState(!1),Ee=he[0],ye=he[1],_e=r.useState(window.innerWidth),be=_e[0],Oe=_e[1],Ce=r.useState({}),we=Ce[0],Se=Ce[1],Ne=window.Digit.Utils.browser.isMobile();r.useEffect(function(){return window.addEventListener("resize",function(){return Oe(window.innerWidth)}),function(){window.removeEventListener("resize",function(){return Oe(window.innerWidth)})}}),n.useEffect(function(){var e;ye(!0),function(){try{var e=null==N?void 0:N.uuid,t=function(){if(e)return Promise.resolve(Digit.UserService.userSearch(S,{uuid:[e]},{})).then(function(e){e&&e.user&&e.user.length&&T(e.user[0])})}();Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}(),j({i18nKey:void 0,code:null==D?void 0:D.gender,value:null==D?void 0:D.gender});var t=null==D||null===(e=D.photo)||void 0===e?void 0:e.split(",");Y(null==t?void 0:t.at(0)),ye(!1)},[null!==D]);var Ie=function(e){return j(e)},De=function(){return Q(!1)},Te=function(e){R(e),!new RegExp(/^[a-zA-Z ]+$/i).test(e)||0===e.length||e.length>50?Se(d({},we,{userName:{type:"pattern",message:"CORE_COMMON_PROFILE_NAME_INVALID"}})):Se(d({},we,{userName:null}))},xe=function(e){M(e),!e.length||e.includes("@")&&e.includes(".")?Se(d({},we,{emailAddress:null})):Se(d({},we,{emailAddress:{type:"pattern",message:"CORE_COMMON_PROFILE_EMAIL_INVALID"}}))},Ae=function(e,t,n){void 0===n&&(n=5e3),ge({key:e,action:t}),setTimeout(function(){ge(null)},n)},Re=function(){try{var e=function(e){if(t)return e;ye(!1)},t=!1;ye(!0);var n=ae(function(){var e=d({},N,{name:A,gender:null==U?void 0:U.value,emailId:P,photo:q});if(!new RegExp(/^([a-zA-Z ])*$/).test(A)||""===A||A.length>50||A.length<1)throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_NAME_INVALID"});if("employee"===_&&!new RegExp(/^[6-9]{1}[0-9]{9}$/).test(W))throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID"});if(P.length&&(!P.includes("@")||!P.includes(".")))throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_EMAIL_INVALID"});if(ie.length||ce.length||fe.length){if(ce!==fe)throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_PASSWORD_MISMATCH"});if(!(ie.length&&ce.length&&fe.length))throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"});if(!new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(ce)&&!new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(fe))throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"})}return Promise.resolve(Digit.UserService.updateUser(e,y)).then(function(e){var t=e.responseInfo;if(t&&"200"===t.status){var n=Digit.UserService.getUser();n&&Digit.UserService.setUser(d({},n,{info:d({},n.info,{name:A,mobileNumber:W,emailId:P,permanentCity:F})}))}return function(){if(ie.length&&ce.length&&fe.length){var e={existingPassword:ie,newPassword:ce,tenantId:S,type:"EMPLOYEE",username:null==N?void 0:N.userName,confirmPassword:fe};return function(){if(ce===fe)return ae(function(){return Promise.resolve(Digit.UserService.changePassword(e,S)).then(function(e){var t=e.responseInfo;if(null==t||!t.status||"200"!==t.status)throw"";Ae("success",O("CORE_COMMON_PROFILE_UPDATE_SUCCESS_WITH_PASSWORD"),5e3)})},function(e){var t,n;throw JSON.stringify({type:"error",message:null!==(t=e.Errors)&&void 0!==t&&null!==(n=t.at(0))&&void 0!==n&&n.description?e.Errors.at(0).description:"CORE_COMMON_PROFILE_UPDATE_ERROR_WITH_PASSWORD"})});throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_ERROR_PASSWORD_NOT_MATCH"})}()}null!=t&&t.status&&"200"===t.status&&Ae("success",O("CORE_COMMON_PROFILE_UPDATE_SUCCESS"),5e3)}()})},function(e){var t=JSON.parse(e);Ae(t.type,O(t.message),5e3)});return Promise.resolve(n&&n.then?n.then(e):e(n))}catch(e){return Promise.reject(e)}},Le=[],Pe=Digit.Hooks.useGenderMDMS(w,"common-masters","GenderType").data;return Pe&&Pe.map(function(e){Le.push({i18nKey:"PT_COMMON_GENDER_"+e.code,code:""+e.code,value:""+e.code})}),Ee?r.createElement(t.Loader,null):r.createElement("div",{className:"user-profile"},r.createElement("section",{style:{margin:"citizen"===_?"8px":"24px"}},"citizen"===_?r.createElement(t.BackButton,null):r.createElement(t.BreadCrumb,{crumbs:[{path:"/"+(null===(a=window)||void 0===a?void 0:a.contextPath)+"/employee",content:O("ES_COMMON_HOME"),show:!0},{path:"/"+(null===(u=window)||void 0===u?void 0:u.contextPath)+"/employee/user/profile",content:O("ES_COMMON_PAGE_1"),show:C.includes("/user/profile")}]})),r.createElement("div",{style:{display:"flex",flex:1,flexDirection:be<768||"citizen"===_?"column":"row",margin:"citizen"===_?"8px":"16px",gap:"citizen"===_?"":"0 24px",boxShadow:"citizen"===_?"1px 1px 4px 0px rgba(0,0,0,0.2)":"",background:"citizen"===_?"white":"",borderRadius:"citizen"===_?"4px":"",maxWidth:"citizen"===_?"960px":""}},r.createElement("section",{style:{position:"relative",display:"flex",flex:"citizen"===_?1:2.5,justifyContent:"center",alignItems:"center",maxWidth:"100%",height:"376px",borderRadius:"4px",boxShadow:"citizen"===_?"":"1px 1px 4px 0px rgba(0,0,0,0.2)",border:("citizen"===_?"8px":"24px")+" solid #fff",background:"#EEEEEE",padding:"citizen"===_?"8px":"16px"}},r.createElement("div",{style:{position:"relative",height:"citizen"===_?"114px":"150px",width:"citizen"===_?"114px":"150px",margin:"16px"}},r.createElement("img",{style:{margin:"auto",borderRadius:"300px",justifyContent:"center",height:"100%",width:"100%"},src:$&&""!==$?$:"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"}),r.createElement("button",{style:{position:"absolute",left:"50%",bottom:"-24px",transform:"translateX(-50%)"},onClick:function(){return Q(!J)}},r.createElement(t.CameraIcon,null)))),r.createElement("section",{style:{display:"flex",flexDirection:"column",flex:"citizen"===_?1:7.5,width:"100%",borderRadius:"4px",height:"fit-content",boxShadow:"citizen"===_?"":"1px 1px 4px 0px rgba(0,0,0,0.2)",background:"white",padding:"citizen"===_?"8px":"24px",paddingBottom:"20px"}},"citizen"===_?r.createElement(r.Fragment,null,r.createElement(t.LabelFieldPair,null,r.createElement(t.CardLabel,{style:{}},""+O("CORE_COMMON_PROFILE_NAME"),"*"),r.createElement("div",{style:{width:"100%",maxWidth:"960px"}},r.createElement(t.TextInput,d({t:O,style:{width:"100%"},type:"text",isMandatory:!1,name:"name",value:A,onChange:function(e){return Te(e.target.value)}},{isRequired:!0,pattern:"^[a-zA-Z-.`' ]*$",type:"tel",title:O("CORE_COMMON_PROFILE_NAME_ERROR_MESSAGE")},{disable:!1})),(null==we?void 0:we.userName)&&r.createElement(t.CardLabelError,null," ",null==we||null===(c=we.userName)||void 0===c?void 0:c.message," "))),r.createElement(t.LabelFieldPair,null,r.createElement(t.CardLabel,{style:{}},""+O("CORE_COMMON_PROFILE_GENDER")),r.createElement(t.Dropdown,{style:{width:"100%"},className:"form-field",selected:1===(null==U?void 0:U.length)?U[0]:U,disable:1===(null==U?void 0:U.length)||!1,option:Le,select:Ie,value:U,optionKey:"code",t:O,name:"gender"})),r.createElement(t.LabelFieldPair,null,r.createElement(t.CardLabel,{style:{}},""+O("CORE_COMMON_PROFILE_EMAIL")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:O,style:{width:"100%"},type:"email",isMandatory:!1,optionKey:"i18nKey",name:"email",value:P,onChange:function(e){return xe(e.target.value)},disable:!1}),(null==we?void 0:we.emailAddress)&&r.createElement(t.CardLabelError,null," ",null==we||null===(s=we.emailAddress)||void 0===s?void 0:s.message," "))),r.createElement("button",{onClick:Re,style:{marginTop:"24px",backgroundColor:"#F47738",width:"100%",height:"40px",color:"white",maxWidth:Ne?"100%":"240px",borderBottom:"1px solid black"}},O("CORE_COMMON_SAVE"))):r.createElement(r.Fragment,null,r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+O("CORE_COMMON_PROFILE_NAME"),"*"),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,d({t:O,type:"text",isMandatory:!1,name:"name",value:A,onChange:function(e){return Te(e.target.value)},placeholder:"Enter Your Name"},{isRequired:!0,pattern:"^[a-zA-Z-.`' ]*$",type:"text",title:O("CORE_COMMON_PROFILE_NAME_ERROR_MESSAGE")},{disable:!1})),(null==we?void 0:we.userName)&&r.createElement(t.CardLabelError,{style:{margin:0,padding:0}}," ",null==we||null===(f=we.userName)||void 0===f?void 0:f.message," "))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+O("CORE_COMMON_PROFILE_GENDER")),r.createElement(t.Dropdown,{style:{width:"100%"},selected:1===(null==U?void 0:U.length)?U[0]:U,disable:1===(null==U?void 0:U.length)||!1,option:Le,select:Ie,value:U,optionKey:"code",t:O,name:"gender"})),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+O("CORE_COMMON_PROFILE_CITY")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,d({t:O,type:"text",isMandatory:!1,name:"city",value:O("TENANT_TENANTS_"+F.toUpperCase()),onChange:function(e){return V(e.target.value)},placeholder:"Enter Your City Name"},{isRequired:!0,type:"text",title:O("CORE_COMMON_PROFILE_CITY_ERROR_MESSAGE")},{disable:!0})),r.createElement(t.CardLabelError,null))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},O("CORE_COMMON_PROFILE_MOBILE_NUMBER")+"*"),r.createElement("div",{style:{width:"100%"}},r.createElement(t.MobileNumber,{value:W,style:{width:"100%"},name:"mobileNumber",placeholder:"Enter a valid Mobile No.",onChange:function(e){return function(e){H(e),"employee"!==_||new RegExp(/^[6-9]{1}[0-9]{9}$/).test(e)?Se(d({},we,{mobileNumber:null})):Se(d({},we,{mobileNumber:{type:"pattern",message:"CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID"}}))}(e)},disable:!0,required:!0,pattern:"[6-9]{1}[0-9]{9}",type:"tel",title:O("CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID")}),(null==we?void 0:we.mobileNumber)&&r.createElement(t.CardLabelError,{style:{margin:0,padding:0}}," ",null==we||null===(v=we.mobileNumber)||void 0===v?void 0:v.message," "))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+O("CORE_COMMON_PROFILE_EMAIL")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:O,type:"email",isMandatory:!1,placeholder:O("EMAIL_VALIDATION"),optionKey:"i18nKey",name:"email",value:P,onChange:function(e){return xe(e.target.value)},disable:!1}),(null==we?void 0:we.emailAddress)&&r.createElement(t.CardLabelError,null," ",null==we||null===(m=we.emailAddress)||void 0===m?void 0:m.message," "))),r.createElement(t.LabelFieldPair,null,r.createElement("div",null,r.createElement("a",{style:(p={color:"orange",cursor:"default",marginBottom:"5"},p.cursor="pointer",p),onClick:function(){return ne(!te)}},O("CORE_COMMON_CHANGE_PASSWORD")),te?r.createElement("div",{style:{marginTop:"10px"}},r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+O("CORE_COMMON_PROFILE_CURRENT_PASSWORD")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:O,type:"password",isMandatory:!1,name:"name",pattern:"^([a-zA-Z0-9@#$%])+$",onChange:function(e){return oe(t=e.target.value),void(new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(t)?Se(d({},we,{currentPassword:null})):Se(d({},we,{currentPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}})));var t},disable:!1}),(null==we?void 0:we.currentPassword)&&r.createElement(t.CardLabelError,null,null==we||null===(g=we.currentPassword)||void 0===g?void 0:g.message))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+O("CORE_COMMON_PROFILE_NEW_PASSWORD")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:O,type:"password",isMandatory:!1,name:"name",pattern:"^([a-zA-Z0-9@#$%])+$",onChange:function(e){return se(t=e.target.value),void(new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(t)?Se(d({},we,{newPassword:null})):Se(d({},we,{newPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}})));var t},disable:!1}),(null==we?void 0:we.newPassword)&&r.createElement(t.CardLabelError,null,null==we||null===(h=we.newPassword)||void 0===h?void 0:h.message))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+O("CORE_COMMON_PROFILE_CONFIRM_PASSWORD")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:O,type:"password",isMandatory:!1,name:"name",pattern:"^([a-zA-Z0-9@#$%])+$",onChange:function(e){return ve(t=e.target.value),void(new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(t)?Se(d({},we,{confirmPassword:null})):Se(d({},we,{confirmPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}})));var t},disable:!1}),(null==we?void 0:we.confirmPassword)&&r.createElement(t.CardLabelError,null,null==we||null===(E=we.confirmPassword)||void 0===E?void 0:E.message)))):""))))),"employee"===_?r.createElement("div",{style:{height:"88px",backgroundColor:"#FFFFFF",display:"flex",justifyContent:"flex-end",marginTop:"64px",alignItems:"center"}},r.createElement("button",{onClick:Re,style:{marginTop:"24px",backgroundColor:"#F47738",width:be<768?"100%":"248px",height:"40px",float:"right",margin:be<768?"0 16px":"",marginRight:be<768?"16px":"31px",color:"white",borderBottom:"1px solid black"}},O("CORE_COMMON_SAVE"))):"",pe&&r.createElement(t.Toast,{error:"error"===pe.key,label:O("success"===pe.key?"CORE_COMMON_PROFILE_UPDATE_SUCCESS":pe.action),onClose:function(){return ge(null)},style:{maxWidth:"670px"}}),1==J?r.createElement(le,{setProfilePic:function(e){try{var t=function(e){Y(null==e?void 0:e.thumbs[0]),De()};return Z(e),Promise.resolve(e?Promise.resolve(function(e,t){try{return Promise.resolve(Digit.UploadServices.Filefetch(e,t)).then(function(e){return e.data.fileStoreIds&&0!==e.data.fileStoreIds.length?{thumbs:e.data.fileStoreIds.map(function(e){return e.url.split(",")[3]}),images:e.data.fileStoreIds.map(function(e){return Digit.Utils.getFileUrl(e.url)})}:null})}catch(e){return Promise.reject(e)}}([e],w)).then(t):t(null))}catch(e){return Promise.reject(e)}},closeDrawer:De,userType:_,removeProfilePic:function(){Z(null),Y(null)},showToast:Ae}):"")},se=function(e){var o,a,l,u=e.module,c=Digit.UserService.getUser(),s=((null==c||null===(o=c.info)||void 0===o?void 0:o.tenantId)||Digit.ULBService.getCurrentTenantId(),i.useTranslation().t),d=Digit.SessionStorage.get("initData").stateInfo,f=Digit.StoreData.getCurrentLanguage(),v=n.useState(f),m=v[0],p=v[1],g=n.useState(!1),h=g[0],E=g[1],y=n.useState(""),_=y[0],b=y[1],O=function(){return r.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.createElement("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"}))},C=Digit.Hooks.useGetHowItWorksJSON(Digit.ULBService.getStateId()),w=C.data,S=null==w||null===(a=w.MdmsRes["common-masters"])||void 0===a||null===(l=a.howItWorks[0])||void 0===l?void 0:l[""+u];return C.isLoading?r.createElement(t.Loader,null):r.createElement(n.Fragment,null,r.createElement("div",{className:"how-it-works-page"},r.createElement(t.BackButton,null),r.createElement("div",{className:"how-it-works-page-header"},r.createElement(t.Header,null,s("HOW_IT_WORKS"))),r.createElement("div",{className:"language-selector",style:{margin:"10px"}},[{label:"ENGLISH",value:"en_IN"},{label:"हिंदी",value:"hi_IN"}].map(function(e,n){return r.createElement("div",{className:"language-button-container",key:n},r.createElement(t.CustomButton,{selected:e.value===m,text:e.label,onClick:function(){return function(e){p(e.value),Digit.LocalizationService.changeLanguage(e.value,d.code)}(e)}}))})),S.videosJson.map(function(e,t){return r.createElement("div",null,r.createElement("div",{className:"WhatsNewCard",style:{float:"left",position:"relative",width:"100%",marginBottom:10}},r.createElement("div",{className:"video-icon",onClick:function(){return t=e,b("hi_IN"===m?t.hi_IN:t.en_IN),void E(!0);var t}},r.createElement("div",{className:"vid-svg"},r.createElement(O,null))),r.createElement("div",{className:"how-it-works-header-description"},r.createElement("h2",null,s(e.headerLabel)),r.createElement("p",null,s(e.description)))))}),r.createElement("div",{className:"WhatsNewCard",style:{position:"relative",width:"100%",marginBottom:10,display:"inline-block"}},r.createElement("div",{className:"how-it-works-pdf-section"},r.createElement("div",{className:"pdf-icon-header-desc"},r.createElement("div",{className:"pdf-icon"},r.createElement(t.PDFSvg,null)),r.createElement("div",{className:"pdf-header-desc"},r.createElement("h2",null,s(S.pdfHeader)),r.createElement("p",null,s(S.pdfDesc)))),r.createElement("div",{className:"download-icon"},r.createElement(t.DownloadImgIcon,null)))),h&&r.createElement("div",{className:"how-it-works-video-play"},r.createElement("div",{className:"close-button"},r.createElement(t.CloseSvg,{onClick:function(){E(!1)}})),r.createElement("video",{width:500,height:500,controls:!0,autoPlay:!0},r.createElement("source",{src:_,type:"video/mp4"})))))},de=[{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,pattern:/^[^{0-9}^\$\"<>?\\\\~!@#$%^()+={}\[\]*,/_:;“”‘’]{1,50}$/i}}]}],fe=function(e){var n=e.mobileNumber;return r.createElement(t.FormStep,{isDisabled:!(10===n.length&&e.canSubmit),onSelect:e.onSelect,config:e.config,t:e.t,componentInFront:"+91",onChange:e.onMobileChange,value:n})},ve=function(e){return r.createElement(t.FormStep,{config:e.config,onSelect:e.onSelect,t:e.t,isDisabled:e.isDisabled})},me=function(e){var i,o,a,l=e.config,u=e.otp,c=e.onOtpChange,s=e.onResend,d=e.onSelect,f=e.t,v=e.error,m=e.userType,p=void 0===m?"citizen":m,g=e.canSubmit,h=n.useState(30),E=h[0],y=h[1];i=function(){y(E-1)},o=E>0?1e3:null,a=n.useRef(),n.useEffect(function(){a.current=i},[i]),n.useEffect(function(){if(null!==o){var e=setInterval(function(){a.current()},o);return function(){return clearInterval(e)}}},[o]);var _=function(){s(),y(2)};return"employee"===p?r.createElement(n.Fragment,null,r.createElement(t.OTPInput,{length:6,onChange:c,value:u}),E>0?r.createElement(t.CardText,null,f("CS_RESEND_ANOTHER_OTP")+" "+E+" "+f("CS_RESEND_SECONDS")):r.createElement("p",{className:"card-text-button",onClick:_},f("CS_RESEND_OTP")),!v&&r.createElement(t.CardLabelError,null,f("CS_INVALID_OTP"))):r.createElement(t.FormStep,{onSelect:d,config:l,t:f,isDisabled:!(6===(null==u?void 0:u.length)&&g)},r.createElement(t.OTPInput,{length:6,onChange:c,value:u}),E>0?r.createElement(t.CardText,null,f("CS_RESEND_ANOTHER_OTP")+" "+E+" "+f("CS_RESEND_SECONDS")):r.createElement("p",{className:"card-text-button",onClick:_},f("CS_RESEND_OTP")),!v&&r.createElement(t.CardLabelError,null,f("CS_INVALID_OTP")))},pe=["ResponseInfo","UserRequest"],ge=["ResponseInfo","UserRequest"],he={type:"register"},Ee={type:"login"},ye="/"+(null===(ue=window)||void 0===ue?void 0:ue.contextPath)+"/citizen",_e=function(e,t){return(null==e?void 0:e.from)||(null==t?void 0:t.from)||ye},be=function(e){var o,a,u=e.stateCode,c=e.isUserRegistered,s=void 0===c||c,f=i.useTranslation().t,m=l.useLocation(),p=l.useRouteMatch().path,g=l.useHistory(),h=n.useState(null),E=h[0],y=h[1],_=n.useState(null),b=_[0],O=_[1],C=n.useState(!0),w=C[0],S=C[1],N=(n.useState(null),n.useState(s?{}:null==m||null===(o=m.state)||void 0===o?void 0:o.data)),I=N[0],D=N[1],T=n.useState(null),x=T[0],A=T[1],R=Digit.Hooks.useQueryParams(),L=n.useState(!1),P=L[0],M=L[1],k=n.useState(!0),U=k[0],j=k[1],B=n.useState(!0),F=B[0],V=B[1];n.useEffect(function(){var e;return b&&(x&&(clearTimeout(x),A(null)),e=setTimeout(function(){O("")},5e3),A(e)),function(){e&&clearTimeout(e)}},[b]),n.useEffect(function(){var e;if(E){var t,n,r,i,o,a;Digit.SessionStorage.set("citizen.userRequestObject",E),Digit.UserService.setUser(E),t=null==E?void 0:E.info,n=null==E?void 0:E.access_token,r=u,a=null===(i=JSON.parse(sessionStorage.getItem("Digit.initData")))||void 0===i||null===(o=i.value)||void 0===o?void 0:o.selectedLanguage,localStorage.setItem("Citizen.tenant-id",r),localStorage.setItem("tenant-id",r),localStorage.setItem("citizen.userRequestObject",JSON.stringify(t)),localStorage.setItem("locale",a),localStorage.setItem("Citizen.locale",a),localStorage.setItem("token",n),localStorage.setItem("Citizen.token",n),localStorage.setItem("user-info",JSON.stringify(t)),localStorage.setItem("Citizen.user-info",JSON.stringify(t));var l,c=(null===(e=m.state)||void 0===e?void 0:e.from)||ye;Digit.ULBService.getCitizenCurrentTenant(!0)?g.replace(c):g.replace("/"+(null===(l=window)||void 0===l?void 0:l.contextPath)+"/citizen/select-location",{redirectBackTo:c})}},[E]);var z=n.useMemo(function(){return de.map(function(e){var t={};for(var n in e.texts)t[n]=f(e.texts[n]);return d({},e,{texts:t})},[de])}),W=function(){return Digit.UserService.getType()},H=function(e){return Promise.resolve(ae(function(){return Promise.resolve(Digit.UserService.sendOtp(e,u)).then(function(e){return[e,null]})},function(e){return[null,e]}))};return r.createElement("div",{className:"citizen-form-wrapper"},r.createElement(l.Switch,null,r.createElement(t.AppContainer,null,r.createElement(t.BackButton,null),r.createElement(l.Route,{path:""+p,exact:!0},r.createElement(fe,{onSelect:function(e){try{V(!1),D(d({},I,e));var t=d({},e,{tenantId:u,userType:W()});return Promise.resolve(s?Promise.resolve(H({otp:d({},t,Ee)})).then(function(e){var n,r,i,o;if(!e[1])return V(!0),void g.replace(p+"/otp",{from:_e(m.state,R),role:null===(r=m.state)||void 0===r?void 0:r.role});V(!0),m.state&&"FSM_DSO"===m.state.role||g.push("/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/citizen/register/name",{from:_e(m.state,R),data:t}),null!==(n=m.state)&&void 0!==n&&n.role&&(V(!0),O("FSM_DSO"===(null===(o=m.state)||void 0===o?void 0:o.role)?f("ES_ERROR_DSO_LOGIN"):"User not registered."))}):Promise.resolve(H({otp:d({},t,he)})).then(function(e){if(!e[1])return V(!0),void g.replace(p+"/otp",{from:_e(m.state,R)});V(!0)}))}catch(e){return Promise.reject(e)}},config:z[0],mobileNumber:I.mobileNumber||"",onMobileChange:function(e){D(d({},I,{mobileNumber:e.target.value}))},canSubmit:F,showRegisterLink:s&&!(null!==(a=m.state)&&void 0!==a&&a.role),t:f})),r.createElement(l.Route,{path:p+"/otp"},r.createElement(me,{config:d({},z[1],{texts:d({},z[1].texts,{cardText:z[1].texts.cardText+" "+(I.mobileNumber||"")})}),onOtpChange:function(e){D(d({},I,{otp:e}))},onResend:function(){try{var e={mobileNumber:I.mobileNumber,tenantId:u,userType:W()},t=function(){if(!s)return Promise.resolve(H({otp:d({},e,he)})).then(function(){});var t=function(){if(s)return Promise.resolve(H({otp:d({},e,Ee)})).then(function(){})}();return t&&t.then?t.then(function(){}):void 0}();return Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},onSelect:function(){try{return Promise.resolve(ae(function(){S(!0),j(!1);var e=I.mobileNumber,t=I.otp,n=I.name;return function(){if(s){var r={username:e,password:t,tenantId:u,userType:W()};return Promise.resolve(Digit.UserService.authenticate(r)).then(function(e){var t,n,r,i=e.UserRequest,o=v(e,pe);if(null!==(t=m.state)&&void 0!==t&&t.role){var a=i.roles.find(function(e){return e.code===m.state.role});if(!a||!a.code)return O(f("ES_ERROR_USER_NOT_PERMITTED")),void setTimeout(function(){return g.replace(ye)},5e3)}null!==(n=window)&&void 0!==n&&null!==(r=n.globalConfigs)&&void 0!==r&&r.getConfig("ENABLE_SINGLEINSTANCE")&&(i.tenantId=Digit.ULBService.getStateId()),y(d({info:i},o))})}var i=function(){if(!s)return Promise.resolve(Digit.UserService.registerUser({name:n,username:e,otpReference:t,tenantId:u},u)).then(function(e){var t,n,r=e.UserRequest,i=v(e,ge);null!==(t=window)&&void 0!==t&&null!==(n=t.globalConfigs)&&void 0!==n&&n.getConfig("ENABLE_SINGLEINSTANCE")&&(r.tenantId=Digit.ULBService.getStateId()),y(d({info:r},i))})}();if(i&&i.then)return i.then(function(){})}()},function(){j(!0),S(!1)}))}catch(e){return Promise.reject(e)}},otp:I.otp,error:w,canSubmit:U,t:f})),r.createElement(l.Route,{path:p+"/name"},r.createElement(ve,{config:z[2],onSelect:function(e){try{var t=d({},I,{tenantId:u,userType:W()},e);return D(d({},I,e)),M(!0),Promise.resolve(H({otp:d({},t,he)})).then(function(e){e[0]?(M(!1),g.replace(p+"/otp",{from:_e(m.state,R)})):M(!1)})}catch(e){return Promise.reject(e)}},t:f,isDisabled:P})),b&&r.createElement(t.Toast,{error:!0,label:b,onClose:function(){return O(null)}}))))},Oe=function(e){return e instanceof HTMLElement},Ce=function(e){return null==e},we=function(e){return"object"==typeof e},Se=function(e){return!Ce(e)&&!Array.isArray(e)&&we(e)&&!(e instanceof Date)},Ne=function(e){return/^\w*$/.test(e)},Ie=function(e){return e.filter(Boolean)},De=function(e){return Ie(e.replace(/["|']/g,"").replace(/\[/g,".").replace(/\]/g,"").split("."))};function Te(e,t,n){for(var r=-1,i=Ne(t)?[t]:De(t),o=i.length,a=o-1;++r<o;){var l=i[r],u=n;if(r!==a){var c=e[l];u=Se(c)||Array.isArray(c)?c:isNaN(+i[r+1])?{}:[]}e[l]=u,e=e[l]}return e}var xe=function(e,t){for(var n in void 0===t&&(t={}),e)Ne(n)?t[n]=e[n]:Te(t,n,e[n]);return t},Ae=function(e){return void 0===e},Re=function(e,t,n){void 0===e&&(e={});var r=Ie(t.split(/[,[\].]+?/)).reduce(function(e,t){return Ce(e)?e:e[t]},e);return Ae(r)||r===e?Ae(e[t])?n:e[t]:r},Le=function(e,t){Oe(e)&&e.removeEventListener&&(e.removeEventListener("input",t),e.removeEventListener("change",t),e.removeEventListener("blur",t))},Pe={isValid:!1,value:null},Me=function(e){return Array.isArray(e)?e.reduce(function(e,t){return t&&t.ref.checked?{isValid:!0,value:t.ref.value}:e},Pe):Pe},ke=function(e){return"radio"===e.type},Ue=function(e){return"file"===e.type},je=function(e){return"checkbox"===e.type},Be=function(e){return"select-multiple"===e.type},Fe={value:!1,isValid:!1},Ve={value:!0,isValid:!0},ze=function(e){if(Array.isArray(e)){if(e.length>1){var t=e.filter(function(e){return e&&e.ref.checked}).map(function(e){return e.ref.value});return{value:t,isValid:!!t.length}}var n=e[0].ref,r=n.value,i=n.attributes;return n.checked?i&&!Ae(i.value)?Ae(r)||""===r?Ve:{value:r,isValid:!0}:Ve:Fe}return Fe};function We(e,t,n,r,i){var o=e.current[t];if(o){var a=o.ref,l=a.value,u=o.ref,c=o.valueAsNumber,s=o.valueAsDate,d=o.setValueAs;if(a.disabled&&r)return;return Ue(u)?u.files:ke(u)?Me(o.options).value:Be(u)?[].concat(u.options).filter(function(e){return e.selected}).map(function(e){return e.value}):je(u)?ze(o.options).value:i?l:c?""===l?NaN:+l:s?u.valueAsDate:d?d(l):l}if(n)return Re(n.current,t)}function He(e){return!e||e instanceof HTMLElement&&e.nodeType!==Node.DOCUMENT_NODE&&He(e.parentNode)}var Ge=function(e){return Se(e)&&!Object.keys(e).length},qe=function(e){return"boolean"==typeof e};function Ze(e,t){var n,r=Ne(t)?[t]:De(t),i=1==r.length?e:function(e,t){for(var n=t.slice(0,-1).length,r=0;r<n;)e=Ae(e)?r++:e[t[r++]];return e}(e,r);i&&delete i[r[r.length-1]];for(var o=0;o<r.slice(0,-1).length;o++){var a=-1,l=void 0,u=r.slice(0,-(o+1)),c=u.length-1;for(o>0&&(n=e);++a<u.length;){var s=u[a];l=l?l[s]:e[s],c===a&&(Se(l)&&Ge(l)||Array.isArray(l)&&!l.filter(function(e){return Se(e)&&!Ge(e)||qe(e)}).length)&&(n?delete n[s]:delete e[s]),n=l}}return e}var Xe=function(e,t){return e&&e.ref===t},$e=function(e){return Ce(e)||!we(e)};function Ye(e,t){if($e(e)||$e(t))return t;for(var n in t){var r=e[n],i=t[n];try{e[n]=Se(r)&&Se(i)||Array.isArray(r)&&Array.isArray(i)?Ye(r,i):i}catch(e){}}return e}function Ke(e,t,r){if($e(e)||$e(t)||e instanceof Date||t instanceof Date)return e===t;if(!n.isValidElement(e)){var i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;for(var a=0,l=i;a<l.length;a++){var u=l[a],c=e[u];if(!r||"ref"!==u){var s=t[u];if((Se(c)||Array.isArray(c))&&(Se(s)||Array.isArray(s))?!Ke(c,s,r):c!==s)return!1}}}return!0}function Je(e,t,n,r,i){for(var o=-1;++o<e.length;){for(var a in e[o]){var l;Array.isArray(e[o][a])?(!n[o]&&(n[o]={}),n[o][a]=[],Je(e[o][a],Re(t[o]||{},a,[]),n[o][a],n[o],a)):Ke(Re(t[o]||{},a),e[o][a])?Te(n[o]||{},a):n[o]=Object.assign(Object.assign({},n[o]),((l={})[a]=!0,l))}r&&!n.length&&delete r[i]}return n}var Qe=function(e){return"string"==typeof e},et=function(e,t,n,r,i){var o={},a=function(t){(Ae(i)||(Qe(i)?t.startsWith(i):Array.isArray(i)&&i.find(function(e){return t.startsWith(e)})))&&(o[t]=We(e,t,void 0,r))};for(var l in e.current)a(l);return n?xe(o):Ye(t,xe(o))},tt=function(e){return e instanceof RegExp},nt=function(e){return Se(e)&&!tt(e)?e:{value:e,message:""}},rt=function(e){return"function"==typeof e},it=function(e){return Qe(e)||n.isValidElement(e)};function ot(e,t,n){if(void 0===n&&(n="validate"),it(e)||qe(e)&&!e)return{type:n,message:it(e)?e:"",ref:t}}var at=function(e,t,n,r,i){var o;return t?Object.assign(Object.assign({},n[e]),{types:Object.assign(Object.assign({},n[e]&&n[e].types?n[e].types:{}),(o={},o[r]=i||!0,o))}):{}},lt=function(e,t,n,r){var i=n.ref,o=n.ref.value,a=n.options,l=n.required,u=n.maxLength,c=n.minLength,s=n.min,d=n.max,f=n.pattern,v=n.validate;try{var m=!1,p=i.name,g={},h=ke(i),E=je(i),y=h||E,_=""===o,b=at.bind(null,p,t,g),O=function(e,t,n,r,o){void 0===r&&(r="maxLength"),void 0===o&&(o="minLength");var a=e?t:n;g[p]=Object.assign({type:e?r:o,message:a,ref:i},b(e?r:o,a))};if(l&&(!h&&!E&&(_||Ce(o))||qe(o)&&!o||E&&!ze(a).isValid||h&&!Me(a).isValid)){var C=it(l)?{value:!!l,message:l}:nt(l),w=C.message;if(C.value&&(g[p]=Object.assign({type:"required",message:w,ref:y?((e.current[p].options||[])[0]||{}).ref:i},b("required",w)),!t))return Promise.resolve(g)}if(!(Ce(s)&&Ce(d)||""===o)){var S,N,I=nt(d),D=nt(s);if(isNaN(o)){var T=i.valueAsDate||new Date(o);Qe(I.value)&&(S=T>new Date(I.value)),Qe(D.value)&&(N=T<new Date(D.value))}else{var x=i.valueAsNumber||parseFloat(o);Ce(I.value)||(S=x>I.value),Ce(D.value)||(N=x<D.value)}if((S||N)&&(O(!!S,I.message,D.message,"max","min"),!t))return Promise.resolve(g)}if(Qe(o)&&!_&&(u||c)){var A=nt(u),R=nt(c),L=!Ce(A.value)&&o.length>A.value,P=!Ce(R.value)&&o.length<R.value;if((L||P)&&(O(L,A.message,R.message),!t))return Promise.resolve(g)}if(Qe(o)&&f&&!_){var M=nt(f),k=M.value,U=M.message;if(tt(k)&&!k.test(o)&&(g[p]=Object.assign({type:"pattern",message:U,ref:i},b("pattern",U)),!t))return Promise.resolve(g)}var j=function(){if(v){var n=We(e,p,r,!1,!0),o=y&&a?a[0].ref:i;return rt(v)?Promise.resolve(v(n)).then(function(e){var n=ot(e,o);if(n&&(g[p]=Object.assign(Object.assign({},n),b("validate",n.message)),!t))return m=!0,g}):function(){if(Se(v)){var e=function(){if(!Ge(i)&&(g[p]=Object.assign({ref:o},i),!t))return m=!0,g},r=!1,i={},a=oe(Object.entries(v),function(e){var a=e[0],l=e[1];if(Ge(i)||t)return Promise.resolve(l(n)).then(function(e){var n=ot(e,o,a);n&&(i=Object.assign(Object.assign({},n),b(a,n.message)),t&&(g[p]=i))});r=!0},function(){return r});return a&&a.then?a.then(e):e()}}()}}();return Promise.resolve(j&&j.then?j.then(function(e){return m?e:g}):m?j:g)}catch(e){return Promise.reject(e)}},ut=function e(t,n,r){for(var i in void 0===r&&(r=[]),n){var o=t+(Se(n)?"."+i:"["+i+"]");$e(n[i])?r.push(o):e(o,n[i],r)}return r},ct=function(e,t,n,r,i){var o=void 0;return n.add(t),Ge(e)||(o=Re(e,t),(Se(o)||Array.isArray(o))&&ut(t,o).forEach(function(e){return n.add(e)})),Ae(o)?i?r:Re(r,t):o},st=function(e){var t=e.isBlurEvent,n=e.isSubmitted;return!e.isOnAll&&(!n&&e.isOnTouch?!(e.isTouched||t):(n?e.isReValidateOnBlur:e.isOnBlur)?!t:!(n?e.isReValidateOnChange:e.isOnChange)||t)},dt=function(e){return e.substring(0,e.indexOf("["))},ft=function(e,t){return[].concat(e).some(function(e){return function(e,t){return RegExp(("^"+t+"([|.)\\d+").replace(/\[/g,"\\[").replace(/\]/g,"\\]")).test(e)}(t,e)})},vt="undefined"!=typeof window&&"undefined"!=typeof document;function mt(e){var t,n;if($e(e)||vt&&(e instanceof File||Oe(e)))return e;if(!["Set","Map","Object","Date","Array"].includes(null===(t=e.constructor)||void 0===t?void 0:t.name))return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Set){n=new Set;for(var r,i=g(e);!(r=i()).done;)n.add(r.value);return n}if(e instanceof Map){n=new Map;for(var o,a=g(e.keys());!(o=a()).done;){var l=o.value;n.set(l,mt(e.get(l)))}return n}for(var u in n=Array.isArray(e)?[]:{},e)n[u]=mt(e[u]);return n}var pt=function(e){return{isOnSubmit:!e||"onSubmit"===e,isOnBlur:"onBlur"===e,isOnChange:"onChange"===e,isOnAll:"all"===e,isOnTouch:"onTouched"===e}},gt=function(e){return ke(e)||je(e)},ht="undefined"==typeof window,Et=vt?"Proxy"in window:"undefined"!=typeof Proxy,yt=n.createContext(null);yt.displayName="RHFContext";var _t,bt,Ot,Ct,wt,St=function(e){var t=e.as,r=e.render,i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["rules","as","render","defaultValue","control","onFocus"]),o=function(e){var t=e.name,r=e.rules,i=e.defaultValue,o=e.control,a=e.onFocus,l=n.useContext(yt);if("production"!==process.env.NODE_ENV&&!o&&!l)throw new Error("📋 Controller is missing `control` prop. https://react-hook-form.com/api#Controller");var u=o||l.control,c=u.defaultValuesRef,s=u.setValue,d=u.register,f=u.unregister,v=u.trigger,m=u.mode,p=u.reValidateMode,g=p.isReValidateOnBlur,h=p.isReValidateOnChange,E=u.formState,y=u.formStateRef.current,_=y.isSubmitted,b=y.touched,O=y.errors,C=u.updateFormState,w=u.readFormStateRef,S=u.fieldsRef,N=u.shallowFieldsStateRef,I=!ft(u.fieldArrayNamesRef.current,t),D=function(){return!Ae(Re(N.current,t))&&I?Re(N.current,t):Ae(i)?Re(c.current,t):i},T=n.useState(D()),x=T[0],A=T[1],R=n.useRef(x),L=n.useRef({focus:function(){return null}}),P=n.useRef(a||function(){rt(L.current.focus)&&L.current.focus(),"production"!==process.env.NODE_ENV&&(rt(L.current.focus)||console.warn("📋 'ref' from Controller render prop must be attached to a React component or a DOM Element whose ref provides a 'focus()' method"))}),M=n.useCallback(function(e){return!st(Object.assign({isBlurEvent:e,isReValidateOnBlur:g,isReValidateOnChange:h,isSubmitted:_,isTouched:!!Re(b,t)},m))},[g,h,_,b,t,m]),k=n.useCallback(function(e){var t,n=$e(t=e[0])||!Se(t.target)||Se(t.target)&&!t.type?t:Ae(t.target.value)?t.target.checked:t.target.value;return A(n),R.current=n,n},[]),U=n.useCallback(function(e){if("production"!==process.env.NODE_ENV&&!t)return console.warn("📋 Field is missing `name` prop. https://react-hook-form.com/api#Controller");S.current[t]?S.current[t]=Object.assign({ref:S.current[t].ref},r):(d(Object.defineProperties({name:t,focus:P.current},{value:{set:function(e){A(e),R.current=e},get:function(){return R.current}}}),r),e=Ae(Re(c.current,t))),e&&I&&A(D())},[r,t,d]);n.useEffect(function(){return function(){return f(t)}},[t]),n.useEffect(function(){"production"!==process.env.NODE_ENV&&(Ae(x)&&console.warn("📋 "+t+" is missing in the 'defaultValue' prop of either its Controller (https://react-hook-form.com/api#Controller) or useForm (https://react-hook-form.com/api#useForm)"),!I&&Ae(i)&&console.warn("📋 Controller is missing `defaultValue` prop when using `useFieldArray`. https://react-hook-form.com/api#Controller")),U()},[U]),n.useEffect(function(){!S.current[t]&&U(!0)});var j=n.useCallback(function(){w.current.touched&&!Re(b,t)&&(Te(b,t,!0),C({touched:b})),M(!0)&&v(t)},[t,C,M,v,w]);return{field:{onChange:n.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return s(t,k(n),{shouldValidate:M(),shouldDirty:!0})},[s,t,M]),onBlur:j,name:t,value:x,ref:L},meta:Object.defineProperties({invalid:!!Re(O,t)},{isDirty:{get:function(){return!!Re(E.dirtyFields,t)}},isTouched:{get:function(){return!!Re(E.touched,t)}}})}}(e),a=o.field,l=o.meta,u=Object.assign(Object.assign({},i),a);return t?n.isValidElement(t)?n.cloneElement(t,u):n.createElement(t,u):r?r(a,l):null},Nt=function(e){var n=e.control,i=e.t,o=window.Digit.Utils.browser.isMobile();return r.createElement(Fragment,null,r.createElement(t.SearchField,{className:"pt-form-field"},r.createElement("label",null,i("AUDIT_FROM_DATE_LABEL")),r.createElement(St,{render:function(e){return r.createElement(t.DatePicker,{date:e.value,onChange:e.onChange})},name:"fromDate",control:n})),r.createElement(t.SearchField,{className:"pt-form-field"},r.createElement("label",null,i("AUDIT_TO_DATE_LABEL")),r.createElement(St,{render:function(e){return r.createElement(t.DatePicker,{date:e.value,onChange:e.onChange})},name:"toDate",control:n})),r.createElement(t.SearchField,{className:"pt-search-action-submit"},r.createElement(t.SubmitBar,{style:{marginTop:o?"510px":"25px",marginLeft:o?"0":"-30px",maxWidth:o?"100%":"240px"},label:i("ES_COMMON_APPLY"),submit:!0})))},It=["currentlyActiveMobileModal","searchFormFieldsComponentProps","tenantId"],Dt=["currentlyActiveMobileModal","searchFormFieldsComponentProps","tenantId"],Tt=function(e){var i,o=e.Controller,a=e.register,l=e.control,u=e.t,c=e.reset,s=e.previousPage,f=e.handleSubmit,m=e.tenantId,p=e.data,g=e.onSubmit,h=e.isLoading,E=n.useState([]),y=E[0],_=E[1],b=function(e){return r.createElement("div",{onClick:e.onClick},r.createElement(t.DownloadBtnCommon,null))};n.useEffect(function(){(null==p?void 0:p.length)>0&&_([null==p?void 0:p.map(function(e){var t={};return t[u("AUDIT_DATE_LABEL")]=O(null==e?void 0:e.timestamp),t[u("AUDIT_TIME_LABEL")]=C(null==e?void 0:e.timestamp),t[u("AUDIT_DATAVIEWED_LABEL")]=(null==e?void 0:e.dataView[0])+","+(null==e?void 0:e.dataView[1]),t[u("AUDIT_DATAVIEWED_BY_LABEL")]=null==e?void 0:e.dataViewedBy,t[u("AUDIT_ROLE_LABEL")]=null==e?void 0:e.roles.map(function(e){return e.name}).join(","),d({},t)})])},[p]);var O=function(e){if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getMonth()+1,r=t.getDate();return(r=(r>9?"":"0")+r)+"/"+(n=(n>9?"":"0")+n)+"/"+t.getFullYear()},C=function(e){if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getHours(),r=t.getMinutes(),i=n>12?"PM":"AM";return(n=((n=n>12?n-12:n)>9?"":"0")+n)+":"+(r=(r>9?"":"0")+r)+" "+i},w=n.useReducer(function(e,t){switch(t.type){case"set":return t.payload;case"remove":return!1}},!1),S=w[0],N=w[1],I=function(){N({type:"remove"})},D=function(){return r.createElement("div",{className:"InboxMobilePopupCloseButtonWrapper",onClick:I},r.createElement(t.CloseSvg,null))},T={Controller:o,register:a,control:l,t:u,reset:c,previousPage:s},x=n.useCallback(function(e){return function(e){var n=e.currentlyActiveMobileModal,i=e.searchFormFieldsComponentProps,o=e.tenantId,a=v(e,It),l=a.closeMobilePopupModal;switch(n){case"SearchFormComponent":return r.createElement(t.SearchForm,a,r.createElement(D,null),r.createElement("div",{className:"MobilePopupHeadingWrapper"},r.createElement("h2",null,u("PRIVACY_AUDIT_REPORT"),":")),r.createElement(Nt,d({},i,{closeMobilePopupModal:l,tenantId:o,t:u})));default:return r.createElement("span",null)}}(d({currentlyActiveMobileModal:e.currentlyActiveMobileModal,searchFormFieldsComponentProps:e.searchFormFieldsComponentProps,tenantId:e.tenantId},v(e,Dt)))},[S]);null==p||null===(i=p.roles)||void 0===i||i.forEach(function(e){});var A=n.useMemo(function(){return null!=p&&p.display||""===p?[]:null==p?void 0:p.map(function(e){var t,n;return(n={})[u("AUDIT_DATE_LABEL")]=O(e.timestamp),n[u("AUDIT_TIME_LABEL")]=C(e.timestamp),n[u("AUDIT_DATAVIEWED_LABEL")]=e.dataView[0]+","+e.dataView[1],n[u("AUDIT_DATAVIEWED_BY_LABEL")]=e.dataViewedBy,n[u("AUDIT_ROLE_LABEL")]=null===(t=e.roles.slice(0,3))||void 0===t?void 0:t.map(function(e){return e.name}).join(","),n})},[p]);return r.createElement(r.Fragment,null,r.createElement(t.BackButton,null),r.createElement("div",{className:"sideContent",style:{marginLeft:"70%",marginTop:"-12%"}},r.createElement(b,{className:"mrlg cursorPointer",onClick:function(){return function(e){if(void 0!==(null==e?void 0:e[0]))return Digit.Download.Excel(null==e?void 0:e[0],"AuditReport")}(y)}})),r.createElement(t.Header,null,u("PRIVACY_AUDIT_REPORT"),":"),r.createElement("div",{className:"searchBox"},r.createElement(t.SearchAction,{text:u("ES_COMMON_SEARCH"),handleActionClick:function(){return N({type:"set",payload:"SearchFormComponent"})},tenantId:m,t:u})),S?r.createElement(t.PopUp,null,r.createElement(x,{onSubmit:function(e){N({type:"remove"}),g(e)},handleSubmit:f,id:"search-form",className:"rm-mb form-field-flex-one inboxPopupMobileWrapper",searchFormFieldsComponentProps:T,currentlyActiveMobileModal:S,closeMobilePopupModal:I,tenantId:m})):null,h&&r.createElement(t.Loader,null),r.createElement(t.DetailsCard,{data:A}))},xt=function(e){var i=e.tenantId,o=e.t,a=e.onSubmit,l=e.data,u=e.count,c=function(e){var t=void 0===e?{}:e,r=t.mode,i=void 0===r?"onSubmit":r,o=t.reValidateMode,a=void 0===o?"onChange":o,l=t.resolver,u=t.context,c=t.defaultValues,s=void 0===c?{}:c,d=t.shouldFocusError,f=void 0===d||d,v=t.shouldUnregister,m=void 0===v||v,p=t.criteriaMode,h=n.useRef({}),E=n.useRef({}),y=n.useRef({}),_=n.useRef(new Set),b=n.useRef({}),O=n.useRef({}),C=n.useRef({}),w=n.useRef({}),S=n.useRef(s),N=n.useRef(!1),I=n.useRef(!1),D=n.useRef(),T=n.useRef({}),x=n.useRef({}),A=n.useRef(u),R=n.useRef(l),L=n.useRef(new Set),P=n.useRef(pt(i)),M=P.current,k=M.isOnSubmit,U=M.isOnTouch,j="all"===p,B=n.useState({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touched:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!k,errors:{}}),F=B[0],V=B[1],z=n.useRef({isDirty:!Et,dirtyFields:!Et,touched:!Et||U,isValidating:!Et,isSubmitting:!Et,isValid:!Et}),W=n.useRef(F),H=n.useRef(),G=n.useRef(pt(a)).current,q=G.isOnBlur,Z=G.isOnChange;A.current=u,R.current=l,W.current=F,T.current=m?{}:Ge(T.current)?mt(s):T.current;var X=n.useCallback(function(e){void 0===e&&(e={}),N.current||(W.current=Object.assign(Object.assign({},W.current),e),V(W.current))},[]),$=function(){return z.current.isValidating&&X({isValidating:!0})},Y=n.useCallback(function(e,t,n,r,i){void 0===n&&(n=!1),void 0===r&&(r={});var o=n||function(e){var t=e.errors,n=e.name,r=e.error,i=e.validFields,o=e.fieldsWithValidation,a=Ae(r),l=Re(t,n);return a&&!!l||!a&&!Ke(l,r,!0)||a&&Re(o,n)&&!Re(i,n)}({errors:W.current.errors,error:t,name:e,validFields:w.current,fieldsWithValidation:C.current}),a=Re(W.current.errors,e);t?(Ze(w.current,e),o=o||!a||!Ke(a,t,!0),Te(W.current.errors,e,t)):((Re(C.current,e)||R.current)&&(Te(w.current,e,!0),o=o||a),Ze(W.current.errors,e)),(o&&!Ce(n)||!Ge(r)||z.current.isValidating)&&X(Object.assign(Object.assign(Object.assign({},r),R.current?{isValid:!!i}:{}),{isValidating:!1}))},[]),K=n.useCallback(function(e,t){var n=h.current[e],r=n.ref,i=n.options,o=vt&&Oe(r)&&Ce(t)?"":t;ke(r)?(i||[]).forEach(function(e){var t=e.ref;return t.checked=t.value===o}):Ue(r)&&!Qe(o)?r.files=o:Be(r)?[].concat(r.options).forEach(function(e){return e.selected=o.includes(e.value)}):je(r)&&i?i.length>1?i.forEach(function(e){var t=e.ref;return t.checked=Array.isArray(o)?!!o.find(function(e){return e===t.value}):o===t.value}):i[0].ref.checked=!!o:r.value=o},[]),J=n.useCallback(function(e,t){if(z.current.isDirty){var n=ce();return e&&t&&Te(n,e,t),!Ke(n,S.current)}return!1},[]),Q=n.useCallback(function(e,t){if(void 0===t&&(t=!0),z.current.isDirty||z.current.dirtyFields){var n=!Ke(Re(S.current,e),We(h,e,T)),r=Re(W.current.dirtyFields,e),i=W.current.isDirty;n?Te(W.current.dirtyFields,e,!0):Ze(W.current.dirtyFields,e);var o={isDirty:J(),dirtyFields:W.current.dirtyFields},a=z.current.isDirty&&i!==o.isDirty||z.current.dirtyFields&&r!==Re(W.current.dirtyFields,e);return a&&t&&X(o),a?o:{}}return{}},[]),ee=n.useCallback(function(e,t){try{return"production"===process.env.NODE_ENV||h.current[e]?Promise.resolve(lt(h,j,h.current[e],T)).then(function(n){var r=n[e];return Y(e,r,t),Ae(r)}):(console.warn("📋 Field is missing with `name` attribute: ",e),Promise.resolve(!1))}catch(e){return Promise.reject(e)}},[Y,j]),te=n.useCallback(function(e){try{return Promise.resolve(R.current(ce(),A.current,j)).then(function(t){var n=t.errors,r=W.current.isValid;if(Array.isArray(e)){var i=e.map(function(e){var t=Re(n,e);return t?Te(W.current.errors,e,t):Ze(W.current.errors,e),!t}).every(Boolean);return X({isValid:Ge(n),isValidating:!1}),i}var o=Re(n,e);return Y(e,o,r!==Ge(n),{},Ge(n)),!o})}catch(e){return Promise.reject(e)}},[Y,j]),ne=n.useCallback(function(e){try{var t=function(e){return n?e:Promise.resolve(ee(r))},n=!1,r=e||Object.keys(h.current);if($(),R.current)return Promise.resolve(te(r));var i=function(){if(Array.isArray(r))return!e&&(W.current.errors={}),Promise.resolve(Promise.all(r.map(function(e){try{return Promise.resolve(ee(e,null))}catch(e){return Promise.reject(e)}}))).then(function(e){X({isValidating:!1});var t=e.every(Boolean);return n=!0,t})}();return Promise.resolve(i&&i.then?i.then(t):t(i))}catch(e){return Promise.reject(e)}},[te,ee]),re=n.useCallback(function(e,t,n){var r=n.shouldDirty,i=n.shouldValidate,o={};Te(o,e,t);for(var a,l=g(ut(e,t));!(a=l()).done;){var u=a.value;h.current[u]&&(K(u,Re(o,u)),r&&Q(u),i&&ne(u))}},[ne,K,Q]),ie=n.useCallback(function(e,t,n){if(!m&&!$e(t)&&Te(T.current,e,Array.isArray(t)?[].concat(t):Object.assign({},t)),h.current[e])K(e,t),n.shouldDirty&&Q(e),n.shouldValidate&&ne(e);else if(!$e(t)&&(re(e,t,n),L.current.has(e))){var r,i,o=dt(e)||e;Te(E.current,e,t),x.current[o](((r={})[o]=Re(E.current,o),r)),(z.current.isDirty||z.current.dirtyFields)&&n.shouldDirty&&(Te(W.current.dirtyFields,e,function(e,t,n){return Ye(Je(e,t,n.slice(0,e.length)),Je(t,e,n.slice(0,e.length)))}(t,Re(S.current,e,[]),Re(W.current.dirtyFields,e,[]))),X({isDirty:!Ke(Object.assign(Object.assign({},ce()),(i={},i[e]=t,i)),S.current)}))}!m&&Te(T.current,e,t)},[Q,K,re]),ae=function(e){return I.current||_.current.has(e)||_.current.has((e.match(/\w+/)||[])[0])},le=function(e){var t=!0;if(!Ge(b.current))for(var n in b.current)e&&b.current[n].size&&!b.current[n].has(e)&&!b.current[n].has(dt(e))||(O.current[n](),t=!1);return t};function ue(e){if(!m){for(var t,n=mt(e),r=g(L.current);!(t=r()).done;){var i,o=t.value;Ne(o)&&!n[o]&&(n=Object.assign(Object.assign({},n),((i={})[o]=[],i)))}return n}return e}function ce(e){if(Qe(e))return We(h,e,T);if(Array.isArray(e)){for(var t,n={},r=g(e);!(t=r()).done;){var i=t.value;Te(n,i,We(h,i,T))}return n}return ue(et(h,mt(T.current),m))}D.current=D.current?D.current:function(e){var t=e.type,n=e.target;try{var r,i,o=n.name,a=h.current[o];return Promise.resolve(function(){if(a){var e=function(){!l&&le(o),Y(o,r,s,c,i)},l="blur"===t,u=st(Object.assign({isBlurEvent:l,isReValidateOnChange:Z,isReValidateOnBlur:q,isTouched:!!Re(W.current.touched,o),isSubmitted:W.current.isSubmitted},P.current)),c=Q(o,!1),s=!Ge(c)||!l&&ae(o);if(l&&!Re(W.current.touched,o)&&z.current.touched&&(Te(W.current.touched,o,!0),c=Object.assign(Object.assign({},c),{touched:W.current.touched})),!m&&je(n)&&Te(T.current,o,We(h,o)),u)return!l&&le(o),(!Ge(c)||s&&Ge(c))&&X(c);$();var d=R.current?Promise.resolve(R.current(ce(),A.current,j)).then(function(e){var t=e.errors,a=W.current.isValid;if(r=Re(t,o),je(n)&&!r&&R.current){var l=dt(o),u=Re(t,l,{});u.type&&u.message&&(r=u),l&&(u||Re(W.current.errors,l))&&(o=l)}a!==(i=Ge(t))&&(s=!0)}):Promise.resolve(lt(h,j,a,T)).then(function(e){r=e[o]});return d&&d.then?d.then(e):e()}}())}catch(e){return Promise.reject(e)}};var se=n.useCallback(function(e){void 0===e&&(e={});try{var t=Ge(h.current)?S.current:{};return Promise.resolve(R.current(Object.assign(Object.assign(Object.assign({},t),ce()),e),A.current,j)).then(function(e){var t=Ge(e.errors);W.current.isValid!==t&&X({isValid:t})})}catch(e){return Promise.reject(e)}},[j]),de=n.useCallback(function(e,t){!function(e,t,n,r,i,o){var a=n.ref,l=n.ref.name,u=e.current[l];if(!i){var c=We(e,l,r);!Ae(c)&&Te(r.current,l,c)}a.type&&u?ke(a)||je(a)?Array.isArray(u.options)&&u.options.length?(Ie(u.options).forEach(function(e,n){void 0===e&&(e={}),(He(e.ref)&&Xe(e,e.ref)||o)&&(Le(e.ref,t),Ze(u.options,"["+n+"]"))}),u.options&&!Ie(u.options).length&&delete e.current[l]):delete e.current[l]:(He(a)&&Xe(u,a)||o)&&(Le(a,t),delete e.current[l]):delete e.current[l]}(h,D.current,e,T,m,t),m&&(Ze(w.current,e.ref.name),Ze(C.current,e.ref.name))},[m]),fe=n.useCallback(function(e){if(I.current)X();else{for(var t,n=g(_.current);!(t=n()).done;)if(t.value.startsWith(e)){X();break}le(e)}},[]),ve=n.useCallback(function(e,t){e&&(de(e,t),m&&!Ie(e.options||[]).length&&(Ze(W.current.errors,e.ref.name),Te(W.current.dirtyFields,e.ref.name,!0),X({isDirty:J()}),z.current.isValid&&R.current&&se(),fe(e.ref.name)))},[se,de]),me=n.useCallback(function(e,t,n){var r=n?b.current[n]:_.current,i=et(h,mt(T.current),m,!1,e);if(Qe(e)){var o=dt(e)||e;return L.current.has(o)&&(i=Object.assign(Object.assign({},y.current),i)),ct(i,e,r,Ae(Re(S.current,e))?t:Re(S.current,e),!0)}var a=Ae(t)?S.current:t;return Array.isArray(e)?e.reduce(function(e,t){var n;return Object.assign(Object.assign({},e),((n={})[t]=ct(i,t,r,a),n))},{}):(I.current=Ae(n),xe(!Ge(i)&&i||a))},[]);function pe(e,t){if(void 0===t&&(t={}),"production"!==process.env.NODE_ENV){if(!e.name)return console.warn("📋 Field is missing `name` attribute",e,"https://react-hook-form.com/api#useForm");if(L.current.has(e.name.split(/\[\d+\]$/)[0])&&!RegExp(("^"+e.name.split(/\[\d+\]$/)[0]+"[\\d+].\\w+").replace(/\[/g,"\\[").replace(/\]/g,"\\]")).test(e.name))return console.warn('📋 `name` prop should be in object shape: name="test[index].name"',e,"https://react-hook-form.com/api#useFieldArray")}var n,r=e.name,i=e.type,o=e.value,a=Object.assign({ref:e},t),l=h.current,u=gt(e),c=ft(L.current,r),s=function(t){return vt&&(!Oe(e)||t===e)},d=l[r],f=!0;if(d&&(u?Array.isArray(d.options)&&Ie(d.options).find(function(e){return o===e.ref.value&&s(e.ref)}):s(d.ref)))l[r]=Object.assign(Object.assign({},d),t);else{d=i?u?Object.assign({options:[].concat(Ie(d&&d.options||[]),[{ref:e}]),ref:{type:i,name:r}},t):Object.assign({},a):a,l[r]=d;var v=Ae(Re(T.current,r));Ge(S.current)&&v||(n=Re(v?S.current:T.current,r),(f=Ae(n))||c||K(r,n)),Ge(t)||(Te(C.current,r,!0),!k&&z.current.isValid&<(h,j,d,T).then(function(e){var t=W.current.isValid;Ge(e)?Te(w.current,r,!0):Ze(w.current,r),t!==Ge(e)&&X()})),!m||c&&f||!c&&Ze(W.current.dirtyFields,r),i&&function(e,t,n){var r=e.ref;Oe(r)&&n&&(r.addEventListener(t?"change":"input",n),r.addEventListener("blur",n))}(u&&d.options?d.options[d.options.length-1]:d,u||"select-one"===e.type,D.current)}}var ge=n.useCallback(function(e,t){return function(n){try{n&&n.preventDefault&&(n.preventDefault(),n.persist());var r={},i=ue(et(h,mt(T.current),m,!0));return z.current.isSubmitting&&X({isSubmitting:!0}),Promise.resolve(function(o,a){try{var l=function(){function o(){var o=function(){if(Ge(r)&&Object.keys(W.current.errors).every(function(e){return e in h.current}))return X({errors:{},isSubmitting:!0}),Promise.resolve(e(i,n)).then(function(){});var o=function(e){f&&function(e,t){for(var n in e)if(Re(t,n)){var r=e[n];if(r){if(r.ref.focus&&Ae(r.ref.focus()))break;if(r.options){r.options[0].ref.focus();break}}}}(h.current,W.current.errors)};return W.current.errors=Object.assign(Object.assign({},W.current.errors),r),t?Promise.resolve(t(W.current.errors,n)).then(o):o()}();if(o&&o.then)return o.then(function(){})}var a=R.current?Promise.resolve(R.current(i,A.current,j)).then(function(e){var t=e.values;W.current.errors=r=e.errors,i=t}):oe(Object.values(h.current),function(e){var t=function(){if(e){var t=e.ref.name;return Promise.resolve(lt(h,j,e,T)).then(function(e){e[t]?(Te(r,t,e[t]),Ze(w.current,t)):Re(C.current,t)&&(Ze(W.current.errors,t),Te(w.current,t,!0))})}}();if(t&&t.then)return t.then(function(){})});return a&&a.then?a.then(o):o()}()}catch(e){return a(!0,e)}return l&&l.then?l.then(a.bind(null,!1),a.bind(null,!0)):a(!1,l)}(0,function(e,t){if(W.current.isSubmitting=!1,X({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ge(W.current.errors),submitCount:W.current.submitCount+1}),e)throw t;return t}))}catch(n){return Promise.reject(n)}}},[f,j]);n.useEffect(function(){l&&z.current.isValid&&se(),H.current=H.current||!vt?H.current:function(e,t){var n=new MutationObserver(function(){for(var n=0,r=Object.values(e.current);n<r.length;n++){var i=r[n];if(i&&i.options)for(var o,a=g(i.options);!(o=a()).done;){var l=o.value;l&&l.ref&&He(l.ref)&&t(i)}else i&&He(i.ref)&&t(i)}});return n.observe(window.document,{childList:!0,subtree:!0}),n}(h,ve)},[ve,S.current]),n.useEffect(function(){return function(){H.current&&H.current.disconnect(),N.current=!0,"production"===process.env.NODE_ENV&&Object.values(h.current).forEach(function(e){return ve(e,!0)})}},[]),!l&&z.current.isValid&&(F.isValid=Ke(w.current,C.current)&&Ge(W.current.errors));var he={trigger:ne,setValue:n.useCallback(function(e,t,n){ie(e,t,n||{}),ae(e)&&X(),le(e)},[ie,ne]),getValues:n.useCallback(ce,[]),register:n.useCallback(function(e,t){if(!ht)if(Qe(e))pe({name:e},t);else{if(!Se(e)||!("name"in e))return function(t){return t&&pe(t,e)};pe(e,t)}},[S.current]),unregister:n.useCallback(function(e){for(var t,n=g(Array.isArray(e)?e:[e]);!(t=n()).done;)ve(h.current[t.value],!0)},[]),formState:Et?new Proxy(F,{get:function(e,t){if("production"!==process.env.NODE_ENV&&"isValid"===t&&k&&console.warn("📋 `formState.isValid` is applicable with `onTouched`, `onChange` or `onBlur` mode. https://react-hook-form.com/api#formState"),t in e)return z.current[t]=!0,e[t]}}):F},Ee=n.useMemo(function(){return Object.assign({isFormDirty:J,updateWatchedValue:fe,shouldUnregister:m,updateFormState:X,removeFieldEventListener:de,watchInternal:me,mode:P.current,reValidateMode:{isReValidateOnBlur:q,isReValidateOnChange:Z},validateResolver:l?se:void 0,fieldsRef:h,resetFieldArrayFunctionRef:x,useWatchFieldsRef:b,useWatchRenderFunctionsRef:O,fieldArrayDefaultValuesRef:E,validFieldsRef:w,fieldsWithValidationRef:C,fieldArrayNamesRef:L,readFormStateRef:z,formStateRef:W,defaultValuesRef:S,shallowFieldsStateRef:T,fieldArrayValuesRef:y},he)},[S.current,fe,m,de,me]);return Object.assign({watch:function(e,t){return me(e,t)},control:Ee,handleSubmit:ge,reset:n.useCallback(function(e,t){if(void 0===t&&(t={}),vt)for(var n=0,r=Object.values(h.current);n<r.length;n++){var i=r[n];if(i){var o=i.ref,a=i.options,l=gt(o)&&Array.isArray(a)?a[0].ref:o;if(Oe(l))try{l.closest("form").reset();break}catch(e){}}}var u,c,s,d,f,v,p,g;h.current={},S.current=Object.assign({},e||S.current),e&&le(""),Object.values(x.current).forEach(function(e){return rt(e)&&e()}),T.current=m?{}:mt(e||S.current),c=(u=t).errors,s=u.isDirty,d=u.isSubmitted,f=u.touched,p=u.submitCount,g=u.dirtyFields,(v=u.isValid)||(w.current={},C.current={}),E.current={},_.current=new Set,I.current=!1,X({submitCount:p?W.current.submitCount:0,isDirty:!!s&&W.current.isDirty,isSubmitted:!!d&&W.current.isSubmitted,isValid:!!v&&W.current.isValid,dirtyFields:g?W.current.dirtyFields:{},touched:f?W.current.touched:{},errors:c?W.current.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},[]),clearErrors:n.useCallback(function(e){e&&(Array.isArray(e)?e:[e]).forEach(function(e){return h.current[e]&&Ne(e)?delete W.current.errors[e]:Ze(W.current.errors,e)}),X({errors:e?W.current.errors:{}})},[]),setError:n.useCallback(function(e,t){var n=(h.current[e]||{}).ref;Te(W.current.errors,e,Object.assign(Object.assign({},t),{ref:n})),X({isValid:!1}),t.shouldFocus&&n&&n.focus&&n.focus()},[]),errors:F.errors},he)}({defaultValues:Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{offset:0,limit:5,sortOrder:"DESC"}}),s=c.register,f=c.control,v=c.handleSubmit,m=c.setValue,p=c.getValues,h=c.reset,E=function(e){if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getMonth()+1,r=t.getDate();return(r=(r>9?"":"0")+r)+"/"+(n=(n>9?"":"0")+n)+"/"+t.getFullYear()},y=function(e){if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getHours(),r=t.getMinutes(),i=n>12?"PM":"AM";return(n=((n=n>12?n-12:n)>9?"":"0")+n)+":"+(r=(r>9?"":"0")+r)+" "+i},_=n.useState([]),b=_[0],O=_[1],C=function(e){return r.createElement("div",{onClick:e.onClick},r.createElement(t.DownloadBtnCommon,null))};n.useEffect(function(){s("offset",0),s("limit",5),s("sortOrder","DESC")},[s]),n.useEffect(function(){(null==l?void 0:l.length)>0&&O([null==l?void 0:l.map(function(e){var t={};return t[o("AUDIT_DATE_LABEL")]=E(null==e?void 0:e.timestamp),t[o("AUDIT_TIME_LABEL")]=y(null==e?void 0:e.timestamp),t[o("AUDIT_DATAVIEWED_LABEL")]=(null==e?void 0:e.dataView[0])+","+(null==e?void 0:e.dataView[1]),t[o("AUDIT_DATAVIEWED_BY_LABEL")]=null==e?void 0:e.dataViewedBy,t[o("AUDIT_ROLE_LABEL")]=null==e?void 0:e.roles.map(function(e){return e.name}).join(","),d({},t)})])},[l]);var w=n.useCallback(function(e){0!==e.length&&(m("sortBy",e.id),m("sortOrder",e.desc?"DESC":"ASC"))},[]);function S(){m("offset",p("offset")-p("limit")),v(a)()}var N=window.Digit.Utils.browser.isMobile();if(N)return r.createElement(Tt,{Controller:St,register:s,control:f,t:o,reset:h,previousPage:S,handleSubmit:v,tenantId:i,data:l,onSubmit:a});var I=function(e){return r.createElement("span",{className:"cell-text"},e)},D=n.useMemo(function(){return[{Header:o("AUDIT_DATE_LABEL"),disableSortBy:!0,accessor:function(e){var t="NA"===e.timestamp?o("WS_NA"):E(e.timestamp);return I(""+t)}},{Header:o("AUDIT_TIME_LABEL"),disableSortBy:!0,accessor:function(e){var t="NA"===e.timestamp?o("WS_NA"):y(e.timestamp);return I(""+t)}},{Header:o(N?"AUDIT_DATAVIEWED_LABEL":"AUDIT_DATAVIEWED_PRIVACY"),disableSortBy:!0,accessor:function(e){return I(""+(null==e?void 0:e.dataView))}},{Header:o(N?"AUDIT_DATAVIEWED_BY_LABEL":"AUDIT_DATAVIEWED_BY_PRIVACY"),disableSortBy:!0,accessor:function(e){return I(""+(null==e?void 0:e.dataViewedBy))}},{Header:o("AUDIT_ROLE_LABEL"),disableSortBy:!0,accessor:function(e){var t;return I(""+(null==e||null===(t=e.roles.slice(0,3))||void 0===t?void 0:t.map(function(e){return e.name})))}}]},[]);return r.createElement(r.Fragment,null,r.createElement("div",{style:{marginRight:"-70px"}}," ",r.createElement(t.BackButton,null)," "),r.createElement("div",{style:{marginTop:"30px",marginLeft:"30px"}}," ",r.createElement(t.Header,null,o("PRIVACY_AUDIT_REPORT"))," "),r.createElement(t.SearchForm,{className:"audit-card",onSubmit:a,handleSubmit:v},r.createElement(Nt,{register:s,control:f,reset:h,tenantId:i,t:o,previousPage:S})),r.createElement("div",{style:{marginTop:"240px",marginLeft:"-55%",maxWidth:"80%",marginRight:"52px"}},null!=l&&l.display?r.createElement("div",{style:{marginTop:"20x",width:"1025px",marginLeft:"25px",backgroundColor:"white",height:"60px"}},o(l.display).split("\\n").map(function(e,t){return r.createElement("p",{key:t,style:{textAlign:"center"}},e)})):""!==l?r.createElement("div",{style:{backgroundColor:"white",marginRight:"-30px",marginLeft:"30px"}},r.createElement("div",{className:"sideContent",style:{float:"right",padding:"10px 30px"}},r.createElement(C,{className:"mrlg cursorPointer",onClick:function(){return function(e){if(void 0!==(null==e?void 0:e[0]))return Digit.Download.Excel(null==e?void 0:e[0],"AuditReport")}(b)}})),r.createElement(t.Table,{t:o,data:l,totalRecords:u,columns:D,getCellProps:function(e){return{style:{minWidth:e.column.Header===o("ES_INBOX_APPLICATION_NO")?"240px":"",padding:"20px 18px",fontSize:"16px"}}},onPageSizeChange:function(e){m("limit",Number(e.target.value)),v(a)()},currentPage:p("offset")/p("limit"),onNextPage:function(){m("offset",p("offset")+p("limit")),v(a)()},onPrevPage:S,manualPagination:!1,pageSizeLimit:p("limit"),onSort:w,disableSort:!1,sortParams:[{id:p("sortBy"),desc:"DESC"===p("sortOrder")}]})):r.createElement(t.Loader,null)))},At=function(e){var t,o,a=i.useTranslation().t,l=Digit.ULBService.getCitizenCurrentTenant(),u=n.useState({}),c=u[0],s=u[1],f=function(e,t){void 0===t&&(t="dayend");try{var n=e.match(/(\d{4})-(\d{1,2})-(\d{1,2})/),r=new Date(Date.UTC(n[1],n[2]-1,n[3]));return r.setMinutes(r.getMinutes()+r.getTimezoneOffset()),"dayend"===t&&(r.setHours(r.getHours()+24),r.setSeconds(r.getSeconds()-1)),r.getTime()}catch(t){return e}};n.useEffect(function(){var e=Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{};if(e){var t=d({},e);s(Object.keys(t).filter(function(e){return t[e]}).reduce(function(e,n){var r;return d({},e,((r={})[n]="object"==typeof t[n]?t[n].code:t[n],r))},{}))}},[]);var v={enabled:!!(c&&Object.keys(c).length>0)},m=d({},c),p=Digit.Hooks.useAudit({tenantId:l,filters:d({},m),config:v}),g=p.data;return r.createElement(xt,{t:a,tenantId:l,onSubmit:function(e){Digit.SessionStorage.set("AUDIT_APPLICATION_DETAIL",{offset:0,limit:5,sortBy:"commencementDate",sortOrder:"DESC"});var t=d({},e,{fromDate:f(null==e?void 0:e.fromDate),toDate:f(null==e?void 0:e.toDate)});s(Object.keys(t).filter(function(e){return t[e]}).reduce(function(e,n){var r;return d({},e,((r={})[n]=t[n],r))},{}))},data:p.isLoading?"":(null==g||null===(t=g.ElasticSearchData)||void 0===t?void 0:t.length)>0?null==g?void 0:g.ElasticSearchData:{display:"ES_COMMON_NO_DATA"},count:null==g||null===(o=g.ElasticSearchData)||void 0===o?void 0:o.length})},Rt=function(e){var n,o,a,l,u,c,s,d,f,v,m,p,g,h,E,y,_=e.moduleCode,b=i.useTranslation().t,O=Digit.ULBService.getCitizenCurrentTenant(),C=Digit.Hooks.useStaticData(Digit.ULBService.getStateId()),w=C.isLoading,S=C.data,N=Digit.Hooks.useDynamicData({moduleCode:_,tenantId:O,filters:{},t:b}),I=N.error,D=N.data,T=function(e){var n=e.styles;switch(e.module){case"TL":return r.createElement(t.CaseIcon,{className:"fill-path-primary-main",styles:n});case"PT":return r.createElement(t.PTIcon,{className:"fill-path-primary-main",styles:n});case"MCOLLECT":return r.createElement(t.MCollectIcon,{className:"fill-path-primary-main",styles:n});case"PGR":return r.createElement(t.ComplaintIcon,{className:"fill-path-primary-main",styles:n});default:return r.createElement(t.CaseIcon,{className:"fill-path-primary-main",styles:n})}},x=null==S||null===(n=S.MdmsRes["common-masters"])||void 0===n||null===(o=n.StaticData[0])||void 0===o?void 0:o[""+_],A=function(e){switch(e.module){case"PT":case"WS":return r.createElement("span",{className:"timerIcon"},r.createElement(t.TimerIcon,null));default:return null}},R=function(e){switch(e.module){case"PT":return r.createElement("span",{className:"rupeeSymbol"},r.createElement(t.RupeeSymbol,null));case"WS":return r.createElement("span",{className:"timerIcon"},r.createElement(t.TimerIcon,null));default:return null}},L=function(e){switch(e){case"TL":case"PT":case"MCOLLECT":return{staticCommonContent:b("COMMON_VALIDITY"),validity:(null==x?void 0:x.validity)+b("1"===(null==x?void 0:x.validity)?"COMMON_DAY":"COMMON_DAYS")};case"PGR":return{staticCommonContent:b("ACTION_TEST_COMPLAINT_TYPES")};case"OBPS":return{staticCommonContent:b("BUILDING_PLAN_PERMIT_VALIDITY"),validity:(null==x?void 0:x.validity)+" "+b("1"===(null==x?void 0:x.validity)?"COMMON_DAY":"COMMON_DAYS")};default:return{staticCommonContent:""}}},P=function(e){switch(e){case"PT":return{staticDataOne:(null==x?void 0:x.staticDataOne)+" "+b("COMMON_DAYS"),staticDataOneHeader:b("APPLICATION_PROCESSING_TIME"),staticDataTwo:null==x?void 0:x.staticDataTwo,staticDataTwoHeader:b("APPLICATION_PROCESSING_FEE")};case"WS":return{staticDataOne:"",staticDataOneHeader:b("PAY_WATER_CHARGES_BY")+" "+(null==x?void 0:x.staticDataOne)+" "+b("COMMON_DAYS")+" "+b("OF_BILL_GEN_TO_AVOID_LATE_FEE"),staticDataTwo:(null==x?void 0:x.staticDataTwo)+" "+b("COMMON_DAYS"),staticDataTwoHeader:b("APPLICATION_PROCESSING_TIME")};default:return{}}};return w||N.isLoading?r.createElement(t.Loader,null):x?r.createElement(r.Fragment,null,x&&null!=x&&x.payViaWhatsApp?r.createElement(t.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"}},r.createElement("div",{className:"pay-whatsapp-card",onClick:function(){window.open(null==x?void 0:x.payViaWhatsApp)}},r.createElement("div",{className:"pay-whatsapp-text"},b("PAY_VIA_WHATSAPP")),r.createElement("div",{className:"whatsAppIconG"},r.createElement(t.WhatsappIconGreen,null)))):null,x&&null!=x&&x.helpline?r.createElement(t.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"}},r.createElement("div",{className:"static-home-Card"},r.createElement("div",{className:"static-home-Card-header"},b("CALL_CENTER_HELPLINE")),r.createElement("div",{className:"helplineIcon"},r.createElement(t.HelpLineIcon,null))),r.createElement("div",{className:"call-center-card-text"},null!=x&&null!==(a=x.helpline)&&void 0!==a&&a.contactOne?r.createElement("div",{className:"call-center-card-content"},r.createElement("a",{href:"tel:"+(null==x||null===(l=x.helpline)||void 0===l?void 0:l.contactOne)},null==x||null===(u=x.helpline)||void 0===u?void 0:u.contactOne)):null,null!=x&&null!==(c=x.helpline)&&void 0!==c&&c.contactTwo?r.createElement("div",{className:"call-center-card-content"},r.createElement("a",{href:"tel:"+(null==x||null===(s=x.helpline)||void 0===s?void 0:s.contactTwo)},null==x||null===(d=x.helpline)||void 0===d?void 0:d.contactTwo)):null)):null,x&&null!=x&&x.serviceCenter?r.createElement(t.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"}},r.createElement("div",{className:"static-home-Card"},r.createElement("div",{className:"static-home-Card-header"},b("CITIZEN_SERVICE_CENTER")),r.createElement("div",{className:"serviceCentrIcon"},r.createElement(t.ServiceCenterIcon,null))),r.createElement("div",{className:"service-center-details-card"},r.createElement("div",{className:"service-center-details-text"},null==x?void 0:x.serviceCenter)),null!=x&&x.viewMapLocation?r.createElement("div",{className:"link"},r.createElement("a",{href:null==x?void 0:x.viewMapLocation},b("VIEW_ON_MAP"))):null):r.createElement("div",null),r.createElement(t.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"}},I||null==D||null===(null==D?void 0:D.dynamicDataOne)?r.createElement("div",null):r.createElement("div",{className:"dynamicDataCard"},r.createElement("div",{className:"dynamicData"},r.createElement(T,{module:_,styles:{width:"24px",height:"24px"}}),r.createElement("span",{className:"dynamicData-content"},null==D?void 0:D.dynamicDataOne))),I||null==D||null===(null==D?void 0:D.dynamicDataTwo)?r.createElement("div",null):r.createElement("div",{className:"dynamicDataCard"},r.createElement("div",{className:"dynamicData"},r.createElement(T,{module:_,styles:{width:"24px",height:"24px"}}),r.createElement("span",{className:"dynamicData-content"},null==D?void 0:D.dynamicDataTwo))),x&&null!=x&&x.staticDataOne?r.createElement("div",{className:"staticDataCard"},r.createElement("div",{className:"staticData"},r.createElement(A,{module:_}),r.createElement("span",{className:"static-data-content"},r.createElement("span",{className:"static-data-content-first",style:{marginTop:""===(null===(f=P(_))||void 0===f?void 0:f.staticDataOne)?"8px":"unset"}},null===(v=P(_))||void 0===v?void 0:v.staticDataOneHeader),r.createElement("span",{className:"static-data-content-second"},""+(null===(m=P(_))||void 0===m?void 0:m.staticDataOne))))):r.createElement("div",null),x&&null!=x&&x.staticDataTwo?r.createElement("div",{className:"staticDataCard"},r.createElement("div",{className:"staticData"},r.createElement(R,{module:_}),r.createElement("span",{className:"static-data-content"},r.createElement("span",{className:"static-data-content-first"},null===(p=P(_))||void 0===p?void 0:p.staticDataTwoHeader),r.createElement("span",{className:"static-data-content-second"},null===(g=P(_))||void 0===g?void 0:g.staticDataTwo)))):r.createElement("div",null),x&&null!=x&&x.validity?r.createElement("div",{className:"staticDataCard"},r.createElement("div",{className:"staticData"},r.createElement("span",{className:"validityIcon"},r.createElement(t.ValidityTimeIcon,null)),r.createElement("span",{className:"static-data-content"},r.createElement("span",{className:"static-data-content-first"},null===(h=L(_))||void 0===h?void 0:h.staticCommonContent),r.createElement("span",{className:"static-data-content-second"},null===(E=L(_))||void 0===E?void 0:E.validity)))):r.createElement("div",null),I||null==D||null==D||!D.staticData||null===(null==D?void 0:D.staticData)?r.createElement("div",null):r.createElement("div",{className:"staticDataCard"},r.createElement("div",{className:"staticData"},"PGR"===_?r.createElement(T,{module:_,styles:{width:"24px",height:"24px",marginLeft:"13px",marginTop:"12px"}}):r.createElement("span",{className:"validityIcon"},r.createElement(t.ValidityTimeIcon,null)),r.createElement("span",{className:"static-data-content"},r.createElement("span",{className:"static-data-content-first"},null===(y=L(_))||void 0===y?void 0:y.staticCommonContent),r.createElement("span",{className:"static-data-content-second"},null==D?void 0:D.staticData)))))):r.createElement(r.Fragment,null)},Lt=[(null===(_t=window)||void 0===_t?void 0:_t.contextPath)+"/citizen/register/name","/"+(null===(bt=window)||void 0===bt?void 0:bt.contextPath)+"/citizen/select-language","/"+(null===(Ot=window)||void 0===Ot?void 0:Ot.contextPath)+"/citizen/select-location","/"+(null===(Ct=window)||void 0===Ct?void 0:Ct.contextPath)+"/citizen/login","/"+(null===(wt=window)||void 0===wt?void 0:wt.contextPath)+"/citizen/register/otp"],Pt=function(e,t){return t.filter(function(t){return e.map(function(e){return e.code}).includes(t.code)})},Mt=function(e){var n,o,a,u=e.stateInfo,c=e.userDetails,s=e.CITIZEN,d=e.cityDetails,f=e.mobileView,v=e.handleUserDropdownSelection,m=e.logoUrl,p=e.stateCode,g=e.modules,h=e.appTenants,y=e.pathname,O=e.initData,C=Digit.Hooks.useCustomMDMS(Digit.ULBService.getStateId(),"ACCESSCONTROL-ACTIONS-TEST",[{name:"actions-test",filter:"[?(@.url == '"+window.contextPath+"-card')]"}],{select:function(e){var t,n;return null==e||null===(t=e["ACCESSCONTROL-ACTIONS-TEST"])||void 0===t||null===(n=t["actions-test"])||void 0===n?void 0:n.filter(function(e){return!0===e.enabled}).reduce(function(e,t){var n;return e[t.parentModule]=(null===(n=e[t.parentModule])||void 0===n?void 0:n.length)>0?[t].concat(e[t.parentModule]):[t],e},{})}}),S=C.isLoading,N=C.data,I=C.isFetched,D=Digit.Hooks.useRouteSubscription(y),T=i.useTranslation().t,x=l.useRouteMatch().path,A=l.useHistory(),R=Lt.some(function(e){return window.location.href.includes(e)}),L=g.map(function(e,t){var n=e.code,i=e.tenants,o=Digit.ComponentRegistryService.getComponent(n+"Module");return o?r.createElement(l.Route,{key:t,path:x+"/"+n.toLowerCase()},r.createElement(o,{stateCode:p,moduleCode:n,userType:"citizen",tenants:Pt(i,h)})):null}),P=g.map(function(e,n){var i=e.code,o=e.bannerImage,a=(Digit.ComponentRegistryService.getComponent(i+"Links"),I?b(N,i,T):void 0);return"ACTION_TEST_WS"===(null==a?void 0:a.header)&&(null==a||a.links.sort(function(e,t){return t.orderNumber-e.orderNumber})),r.createElement(r.Fragment,null,r.createElement(l.Route,{key:n,path:x+"/"+i.toLowerCase()+"-home"},r.createElement("div",{className:"moduleLinkHomePage"},r.createElement("img",{src:o||(null==u?void 0:u.bannerUrl),alt:"noimagefound"}),r.createElement(t.BackButton,{className:"moduleLinkHomePageBackButton"}),r.createElement("h1",null,T("MODULE_"+i.toUpperCase())),r.createElement("div",{className:"moduleLinkHomePageModuleLinks"},a&&r.createElement(t.CitizenHomeCard,{header:T(null==a?void 0:a.header),links:null==a?void 0:a.links,Icon:function(){return r.createElement("span",null)},Info:"OBPS"===i?function(){return r.createElement(t.CitizenInfoLabel,{style:{margin:"0px",padding:"10px"},info:T("CS_FILE_APPLICATION_INFO_LABEL"),text:T("BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL")})}:null,isInfo:"OBPS"===i})),r.createElement(Rt,{moduleCode:null==i?void 0:i.toUpperCase()}))),r.createElement(l.Route,{key:"faq"+n,path:x+"/"+i.toLowerCase()+"-faq"},r.createElement(K,{module:null==i?void 0:i.toUpperCase()})),r.createElement(l.Route,{key:"hiw"+n,path:x+"/"+i.toLowerCase()+"-how-it-works"},r.createElement(se,{module:null==i?void 0:i.toUpperCase()})))});return r.createElement("div",{className:D},r.createElement($,{t:T,stateInfo:u,userDetails:c,CITIZEN:s,cityDetails:d,mobileView:f,handleUserDropdownSelection:v,logoUrl:m,showSidebar:!0,linkData:N,islinkDataLoading:S}),r.createElement("div",{className:"main center-container citizen-home-container mb-25"},R?null:r.createElement("div",{className:"SideBarStatic"},r.createElement(j,{linkData:N,islinkDataLoading:S})),r.createElement(l.Switch,null,r.createElement(l.Route,{exact:!0,path:x},r.createElement(J,null)),r.createElement(l.Route,{exact:!0,path:x+"/select-language"},r.createElement(Q,null)),r.createElement(l.Route,{exact:!0,path:x+"/select-location"},r.createElement(ee,null)),r.createElement(l.Route,{path:x+"/error"},r.createElement(E,{initData:O,goToHome:function(){var e;A.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen")}})),r.createElement(l.Route,{path:x+"/all-services"},r.createElement(w,{userType:"citizen",modules:g,getCitizenMenu:N,fetchedCitizen:I,isLoading:S})),r.createElement(l.Route,{path:x+"/login"},r.createElement(be,{stateCode:p})),r.createElement(l.Route,{path:x+"/register"},r.createElement(be,{stateCode:p,isUserRegistered:!1})),r.createElement(l.Route,{path:x+"/user/profile"},r.createElement(ce,{stateCode:p,userType:"citizen",cityDetails:d})),r.createElement(l.Route,{path:x+"/Audit"},r.createElement(At,null)),r.createElement(_,{initData:O},L,P))),r.createElement("div",{className:"citizen-home-footer",style:window.location.href.includes("citizen/obps")?{zIndex:"-1"}:{}},r.createElement("img",{alt:"Powered by DIGIT",src:null===(n=window)||void 0===n||null===(o=n.globalConfigs)||void 0===o||null===(a=o.getConfig)||void 0===a?void 0:a.call(o,"DIGIT_FOOTER"),style:{height:"1.2em",cursor:"pointer"},onClick:function(){var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})))},kt="function"==typeof Symbol&&Symbol.for,Ut=kt?Symbol.for("react.element"):60103,jt=kt?Symbol.for("react.portal"):60106,Bt=kt?Symbol.for("react.fragment"):60107,Ft=kt?Symbol.for("react.strict_mode"):60108,Vt=kt?Symbol.for("react.profiler"):60114,zt=kt?Symbol.for("react.provider"):60109,Wt=kt?Symbol.for("react.context"):60110,Ht=kt?Symbol.for("react.async_mode"):60111,Gt=kt?Symbol.for("react.concurrent_mode"):60111,qt=kt?Symbol.for("react.forward_ref"):60112,Zt=kt?Symbol.for("react.suspense"):60113,Xt=kt?Symbol.for("react.suspense_list"):60120,$t=kt?Symbol.for("react.memo"):60115,Yt=kt?Symbol.for("react.lazy"):60116,Kt=kt?Symbol.for("react.block"):60121,Jt=kt?Symbol.for("react.fundamental"):60117,Qt=kt?Symbol.for("react.responder"):60118,en=kt?Symbol.for("react.scope"):60119;function tn(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Ut:switch(e=e.type){case Ht:case Gt:case Bt:case Vt:case Ft:case Zt:return e;default:switch(e=e&&e.$$typeof){case Wt:case qt:case Yt:case $t:case zt:return e;default:return t}}case jt:return t}}}function nn(e){return tn(e)===Gt}var rn={AsyncMode:Ht,ConcurrentMode:Gt,ContextConsumer:Wt,ContextProvider:zt,Element:Ut,ForwardRef:qt,Fragment:Bt,Lazy:Yt,Memo:$t,Portal:jt,Profiler:Vt,StrictMode:Ft,Suspense:Zt,isAsyncMode:function(e){return nn(e)||tn(e)===Ht},isConcurrentMode:nn,isContextConsumer:function(e){return tn(e)===Wt},isContextProvider:function(e){return tn(e)===zt},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Ut},isForwardRef:function(e){return tn(e)===qt},isFragment:function(e){return tn(e)===Bt},isLazy:function(e){return tn(e)===Yt},isMemo:function(e){return tn(e)===$t},isPortal:function(e){return tn(e)===jt},isProfiler:function(e){return tn(e)===Vt},isStrictMode:function(e){return tn(e)===Ft},isSuspense:function(e){return tn(e)===Zt},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===Bt||e===Gt||e===Vt||e===Ft||e===Zt||e===Xt||"object"==typeof e&&null!==e&&(e.$$typeof===Yt||e.$$typeof===$t||e.$$typeof===zt||e.$$typeof===Wt||e.$$typeof===qt||e.$$typeof===Jt||e.$$typeof===Qt||e.$$typeof===en||e.$$typeof===Kt)},typeOf:tn},on=G(function(e,t){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,n=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var v=e.type;switch(v){case c:case s:case i:case a:case o:case f:return v;default:var g=v&&v.$$typeof;switch(g){case u:case d:case p:case m:case l:return g;default:return t}}case r:return t}}}var b=s,O=u,C=l,w=n,S=d,N=i,I=p,D=m,T=r,x=a,A=o,R=f,L=!1;function P(e){return _(e)===s}t.AsyncMode=c,t.ConcurrentMode=b,t.ContextConsumer=O,t.ContextProvider=C,t.Element=w,t.ForwardRef=S,t.Fragment=N,t.Lazy=I,t.Memo=D,t.Portal=T,t.Profiler=x,t.StrictMode=A,t.Suspense=R,t.isAsyncMode=function(e){return L||(L=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(e)||_(e)===c},t.isConcurrentMode=P,t.isContextConsumer=function(e){return _(e)===u},t.isContextProvider=function(e){return _(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return _(e)===d},t.isFragment=function(e){return _(e)===i},t.isLazy=function(e){return _(e)===p},t.isMemo=function(e){return _(e)===m},t.isPortal=function(e){return _(e)===r},t.isProfiler=function(e){return _(e)===a},t.isStrictMode=function(e){return _(e)===o},t.isSuspense=function(e){return _(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===s||e===a||e===o||e===f||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===h||e.$$typeof===E||e.$$typeof===y||e.$$typeof===g)},t.typeOf=_}()}),an=G(function(e){e.exports="production"===process.env.NODE_ENV?rn:on}),ln=Object.getOwnPropertySymbols,un=Object.prototype.hasOwnProperty,cn=Object.prototype.propertyIsEnumerable;function sn(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var dn=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=sn(e),o=1;o<arguments.length;o++){for(var a in n=Object(arguments[o]))un.call(n,a)&&(i[a]=n[a]);if(ln){r=ln(n);for(var l=0;l<r.length;l++)cn.call(n,r[l])&&(i[r[l]]=n[r[l]])}}return i},fn="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",vn=Function.call.bind(Object.prototype.hasOwnProperty),mn=function(){};if("production"!==process.env.NODE_ENV){var pn=fn,gn={},hn=vn;mn=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function En(e,t,n,r,i){if("production"!==process.env.NODE_ENV)for(var o in e)if(hn(e,o)){var a;try{if("function"!=typeof e[o]){var l=Error((r||"React class")+": "+n+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}a=e[o](t,o,r,n,null,pn)}catch(e){a=e}if(!a||a instanceof Error||mn((r||"React class")+": type specification of "+n+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof a+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),a instanceof Error&&!(a.message in gn)){gn[a.message]=!0;var u=i?i():"";mn("Failed "+n+" type: "+a.message+(null!=u?u:""))}}}En.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(gn={})};var yn=En,_n=function(){};function bn(){return null}function On(){}function Cn(){}"production"!==process.env.NODE_ENV&&(_n=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Cn.resetWarningCache=On;var wn=G(function(e){e.exports="production"!==process.env.NODE_ENV?function(e,t){var n="function"==typeof Symbol&&Symbol.iterator,r={array:l("array"),bigint:l("bigint"),bool:l("boolean"),func:l("function"),number:l("number"),object:l("object"),string:l("string"),symbol:l("symbol"),any:a(bn),arrayOf:function(e){return a(function(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var l=t[n];if(!Array.isArray(l))return new o("Invalid "+i+" `"+a+"` of type `"+s(l)+"` supplied to `"+r+"`, expected an array.");for(var u=0;u<l.length;u++){var c=e(l,u,r,i,a+"["+u+"]",fn);if(c instanceof Error)return c}return null})},element:a(function(t,n,r,i,a){var l=t[n];return e(l)?null:new o("Invalid "+i+" `"+a+"` of type `"+s(l)+"` supplied to `"+r+"`, expected a single ReactElement.")}),elementType:a(function(e,t,n,r,i){var a=e[t];return an.isValidElementType(a)?null:new o("Invalid "+r+" `"+i+"` of type `"+s(a)+"` supplied to `"+n+"`, expected a single ReactElement type.")}),instanceOf:function(e){return a(function(t,n,r,i,a){var l;return t[n]instanceof e?null:new o("Invalid "+i+" `"+a+"` of type `"+((l=t[n]).constructor&&l.constructor.name?l.constructor.name:"<<anonymous>>")+"` supplied to `"+r+"`, expected instance of `"+(e.name||"<<anonymous>>")+"`.")})},node:a(function(e,t,n,r,i){return c(e[t])?null:new o("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return a(function(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[n],u=s(l);if("object"!==u)return new o("Invalid "+i+" `"+a+"` of type `"+u+"` supplied to `"+r+"`, expected an object.");for(var c in l)if(vn(l,c)){var d=e(l,c,r,i,a+"."+c,fn);if(d instanceof Error)return d}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&_n(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),bn;function t(t,n,r,a,l){for(var u=t[n],c=0;c<e.length;c++)if(i(u,e[c]))return null;var s=JSON.stringify(e,function(e,t){return"symbol"===d(t)?String(t):t});return new o("Invalid "+a+" `"+l+"` of value `"+String(u)+"` supplied to `"+r+"`, expected one of "+s+".")}return a(t)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&_n("Invalid argument supplied to oneOfType, expected an instance of array."),bn;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return _n("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(n)+" at index "+t+"."),bn}return a(function(t,n,r,i,a){for(var l=[],u=0;u<e.length;u++){var c=(0,e[u])(t,n,r,i,a,fn);if(null==c)return null;c.data&&vn(c.data,"expectedType")&&l.push(c.data.expectedType)}return new o("Invalid "+i+" `"+a+"` supplied to `"+r+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return a(function(t,n,r,i,a){var l=t[n],c=s(l);if("object"!==c)return new o("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var f in e){var v=e[f];if("function"!=typeof v)return u(r,i,a,f,d(v));var m=v(l,f,r,i,a+"."+f,fn);if(m)return m}return null})},exact:function(e){return a(function(t,n,r,i,a){var l=t[n],c=s(l);if("object"!==c)return new o("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var f=dn({},t[n],e);for(var v in f){var m=e[v];if(vn(e,v)&&"function"!=typeof m)return u(r,i,a,v,d(m));if(!m)return new o("Invalid "+i+" `"+a+"` key `"+v+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=m(l,v,r,i,a+"."+v,fn);if(p)return p}return null})}};function i(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function o(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function a(e){function t(t,n,r,i,a,l,u){if(i=i||"<<anonymous>>",l=l||r,u!==fn){var c=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 c.name="Invariant Violation",c}return null==n[r]?t?new o(null===n[r]?"The "+a+" `"+l+"` is marked as required in `"+i+"`, but its value is `null`.":"The "+a+" `"+l+"` is marked as required in `"+i+"`, but its value is `undefined`."):null:e(n,r,i,a,l)}process;var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function l(e){return a(function(t,n,r,i,a,l){var u=t[n];return s(u)!==e?new o("Invalid "+i+" `"+a+"` of type `"+d(u)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function u(e,t,n,r,i){return new o((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function c(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(c);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!r)return!1;var i,o=r.call(t);if(r!==t.entries){for(;!(i=o.next()).done;)if(!c(i.value))return!1}else for(;!(i=o.next()).done;){var a=i.value;if(a&&!c(a[1]))return!1}return!0;default:return!1}}function s(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function d(e){if(null==e)return""+e;var t=s(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function f(e){var t=d(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return o.prototype=Error.prototype,r.checkPropTypes=yn,r.resetWarningCache=yn.resetWarningCache,r.PropTypes=r,r}(an.isElement):function(){function e(e,t,n,r,i,o){if(o!==fn){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:Cn,resetWarningCache:On};return n.PropTypes=n,n}()}),Sn=function(e){return r.createElement("div",{className:"banner banner-container"},e.children)},Nn=function(){var e=Digit.Hooks.useStore.getInitData(),n=e.isLoading,o=(e.data||{}).stateInfo,a=i.useTranslation().t;return n?r.createElement(t.Loader,null):r.createElement("div",{className:"bannerHeader"},r.createElement("img",{className:"bannerLogo",src:null==o?void 0:o.logoUrl}),r.createElement("p",null,a("TENANT_TENANTS_"+(null==o?void 0:o.code.toUpperCase()))))},In=function(e){var i,o,a,u=e.config,c=e.t,s=n.useState(null)[0],f=Digit.Hooks.useQueryParams(),v=f.mobile_number,m=f.tenantId,p=l.useHistory(),g=n.useState(""),h=g[0],E=g[1],y=n.useState(!0)[0],_=n.useState(null),b=_[0],O=_[1],C=function(){return Digit.UserService.getType()};n.useEffect(function(){var e,t;if(s){Digit.UserService.setUser(s);var n=(null===(e=location.state)||void 0===e?void 0:e.from)||"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee";p.replace(n)}else Digit.UserService.setType("employee")},[s]);var w=function(){O(null)},S=u.inputs,N=S[0],I=S[1],D=S[2],T=[{body:[{label:c(N.label),type:N.type,populators:{name:N.name},isMandatory:!0},{label:c(I.label),type:I.type,populators:{name:I.name},isMandatory:!0},{label:c(D.label),type:D.type,populators:{name:D.name},isMandatory:!0}]}];return r.createElement(Sn,null,r.createElement("div",{className:"employeeBackbuttonAlign"},r.createElement(t.BackButton,{variant:"white",style:{borderBottom:"none"}})),r.createElement(t.FormComposer,{onSubmit:function(e){try{return Promise.resolve(ae(function(){if(e.newPassword!==e.confirmPassword)return O(c("ERR_PASSWORD_DO_NOT_MATCH"));var t=d({},e,{otpReference:h,tenantId:m,type:C().toUpperCase()});return Promise.resolve(Digit.UserService.changePassword(t,m)).then(function(e){!function(){var e;p.replace("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/login")}()})},function(e){var t,n,r,i,o;O((null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.error)||void 0===r||null===(i=r.fields)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.message)||c("ES_SOMETHING_WRONG")),setTimeout(w,5e3)}))}catch(e){return Promise.reject(e)}},noBoxShadow:!0,inline:!0,submitInForm:!0,config:T,label:u.texts.submitButtonLabel,cardStyle:{maxWidth:"408px",margin:"auto"},className:"employeeChangePassword"},r.createElement(Nn,null),r.createElement(t.CardSubHeader,{style:{textAlign:"center"}}," ",u.texts.header," "),r.createElement(t.CardText,null,c("CS_LOGIN_OTP_TEXT")+" ",r.createElement("b",null," ",""+c("+ 91 - ")," ",v)),r.createElement(me,{t:c,userType:"employee",otp:h,onOtpChange:E,error:y,onResend:function(){try{var e=function(){setTimeout(w,5e3)},t={otp:{mobileNumber:v,userType:C().toUpperCase(),type:"passwordreset",tenantId:m}},n=ae(function(){return Promise.resolve(Digit.UserService.sendOtp(t,m)).then(function(){O(c("ES_OTP_RESEND"))})},function(e){var t,n;O((null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.error_description)||c("ES_INVALID_LOGIN_CREDENTIALS"))});return Promise.resolve(n&&n.then?n.then(e):e())}catch(e){return Promise.reject(e)}}})),b&&r.createElement(t.Toast,{error:!0,label:c(b),onClose:w}),r.createElement("div",{className:"EmployeeLoginFooter"},r.createElement("img",{alt:"Powered by DIGIT",src:null===(i=window)||void 0===i||null===(o=i.globalConfigs)||void 0===o||null===(a=o.getConfig)||void 0===a?void 0:a.call(o,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," "))};In.propTypes={loginParams:wn.any},In.defaultProps={loginParams:null};var Dn=[{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"}]}],Tn=function(){var e=i.useTranslation().t,t=l.useRouteMatch().path,o=n.useMemo(function(){return Dn.map(function(t){var n={};for(var r in t.texts)n[r]=e(t.texts[r]);return d({},t,{texts:n})},[Dn])});return r.createElement(l.Switch,null,r.createElement(l.Route,{path:""+t,exact:!0},r.createElement(In,{config:o[0],t:e})))},xn=[{texts:{header:"CORE_COMMON_FORGOT_PASSWORD_LABEL",description:"ES_FORGOT_PASSWORD_DESC",submitButtonLabel:"CORE_COMMON_CONTINUE"},inputs:[{label:"CORE_COMMON_MOBILE_NUMBER",type:"text",name:"mobileNumber",error:"ERR_HRMS_INVALID_MOBILE_NUMBER"},{label:"CORE_COMMON_CITY",type:"custom",name:"city",error:"ERR_HRMS_INVALID_CITY"}]}],An=function(e){var i,o,a,u=e.config,c=e.t,s=Digit.Hooks.useTenants(),f=s.data,v=s.isLoading,m=n.useState(null)[0],p=l.useHistory(),g=n.useState(null),h=g[0],E=g[1];n.useEffect(function(){var e,t;if(m){Digit.UserService.setUser(m);var n=(null===(e=location.state)||void 0===e?void 0:e.from)||"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee";p.replace(n)}else Digit.UserService.setType("employee")},[m]);var y=function(){E(null)},_=u.inputs,b=_[0],O=_[1],C=[{body:[{label:c(b.label),type:b.type,populators:{name:b.name,componentInFront:"+91"},isMandatory:!0},{label:c(O.label),type:O.type,populators:{name:O.name,customProps:{},component:function(e,n){return r.createElement(t.Dropdown,d({option:f,optionKey:"name",id:O.name,className:"login-city-dd",select:function(t){e.onChange(t)}},n))}},isMandatory:!0}]}];return v?r.createElement(t.Loader,null):r.createElement(Sn,null,r.createElement("div",{className:"employeeBackbuttonAlign"},r.createElement(t.BackButton,{variant:"white",style:{borderBottom:"none"}})),r.createElement(t.FormComposer,{onSubmit:function(e){try{if(!e.city)return alert("Please Select City!"),Promise.resolve();var t={otp:{mobileNumber:e.mobileNumber,userType:Digit.UserService.getType().toUpperCase(),type:"passwordreset",tenantId:e.city.code}},n=ae(function(){return Promise.resolve(Digit.UserService.sendOtp(t,e.city.code)).then(function(){var t;p.push("/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee/user/change-password?mobile_number="+e.mobileNumber+"&tenantId="+e.city.code)})},function(e){var t,n,r,i,o;E((null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.error)||void 0===r||null===(i=r.fields)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.message)||"Invalid login credentials!"),setTimeout(y,5e3)});return Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},noBoxShadow:!0,inline:!0,submitInForm:!0,config:C,label:u.texts.submitButtonLabel,secondaryActionLabel:u.texts.secondaryButtonLabel,onSecondayActionClick:function(){var e;p.replace("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/login")},heading:u.texts.header,description:u.texts.description,headingStyle:{textAlign:"center"},cardStyle:{maxWidth:"408px",margin:"auto"},className:"employeeForgotPassword"},r.createElement(Nn,null)),h&&r.createElement(t.Toast,{error:!0,label:c(h),onClose:y}),r.createElement("div",{className:"EmployeeLoginFooter"},r.createElement("img",{alt:"Powered by DIGIT",src:null===(i=window)||void 0===i||null===(o=i.globalConfigs)||void 0===o||null===(a=o.getConfig)||void 0===a?void 0:a.call(o,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," "))};An.propTypes={loginParams:wn.any},An.defaultProps={loginParams:null};var Rn=function(){var e=i.useTranslation().t,t=l.useRouteMatch().path,o=n.useMemo(function(){return xn.map(function(t){var n={};for(var r in t.texts)n[r]=e(t.texts[r]);return d({},t,{texts:n})},[xn])});return r.createElement(l.Switch,null,r.createElement(l.Route,{path:""+t,exact:!0},r.createElement(An,{config:o[0],t:e})))},Ln=function(e,t){return t.filter(function(t){var n;return null==e||null===(n=e.map)||void 0===n?void 0:n.call(e,function(e){return e.code}).includes(t.code)})},Pn=function(e){var t,n,i=e.stateCode,o=e.userType,a=e.modules,u=e.appTenants,c=(Digit,l.useRouteMatch().path),s=l.useLocation(),d=Digit.UserService.getUser();if(!d||null==d||!d.access_token||null==d||!d.info)return r.createElement(l.Redirect,{to:{pathname:"/"+(null===(n=window)||void 0===n?void 0:n.contextPath)+"/employee/user/login",state:{from:s.pathname+s.search}}});var f=a.map(function(e,t){var n,a=e.code,d=e.tenants,f=Digit.ComponentRegistryService.getComponent(a+"Module");return r.createElement(l.Route,{key:t,path:c+"/"+a.toLowerCase()},f?r.createElement(f,{stateCode:i,moduleCode:a,userType:o,tenants:Ln(d,u)}):r.createElement(l.Redirect,{to:{pathname:"/"+(null===(n=window)||void 0===n?void 0:n.contextPath)+"/employee/user/error?type=notfound",state:{from:s.pathname+s.search}}}))});return r.createElement("div",{className:"ground-container"},r.createElement(l.Switch,null,f,r.createElement(l.Route,{path:c+"/login"},r.createElement(l.Redirect,{to:{pathname:"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee/user/login",state:{from:s.pathname+s.search}}})),r.createElement(l.Route,{path:c+"/forgot-password"},r.createElement(Rn,null)),r.createElement(l.Route,{path:c+"/change-password"},r.createElement(Tn,null)),r.createElement(l.Route,null,r.createElement(w,{userType:o,modules:a}))))},Mn=function(){var e,o,a,u=Digit.Hooks.useStore.getInitData(),c=u.data,s=u.isLoading,d=i.useTranslation().t,f=l.useHistory(),v=c||{},m=v.languages,p=v.stateInfo,g=Digit.StoreData.getCurrentLanguage(),h=n.useState(g),E=h[0],y=h[1];return s?null:r.createElement(Sn,null,r.createElement(t.Card,{className:"bannerCard removeBottomMargin"},r.createElement("div",{className:"bannerHeader"},r.createElement("img",{className:"bannerLogo",src:null==p?void 0:p.logoUrl,alt:"Digit"}),r.createElement("p",null,d("TENANT_TENANTS_"+(null==p?void 0:p.code.toUpperCase())))),r.createElement("div",{className:"language-selector",style:{justifyContent:"space-around",marginBottom:"24px",padding:"0 5%"}},m.map(function(e,n){return r.createElement("div",{className:"language-button-container",key:n},r.createElement(t.CustomButton,{selected:e.value===E,text:e.label,onClick:function(){return function(e){y(e.value),Digit.LocalizationService.changeLanguage(e.value,p.code)}(e)}}))})),r.createElement(t.SubmitBar,{style:{width:"100%"},label:d("CORE_COMMON_CONTINUE"),onSubmit:function(e){var t;f.push("/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee/user/login")}})),r.createElement("div",{className:"EmployeeLoginFooter"},r.createElement("img",{alt:"Powered by DIGIT",src:null===(e=window)||void 0===e||null===(o=e.globalConfigs)||void 0===o||null===(a=o.getConfig)||void 0===a?void 0:a.call(o,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," "))},kn=[{texts:{header:"CORE_COMMON_LOGIN",submitButtonLabel:"CORE_COMMON_CONTINUE",secondaryButtonLabel:"CORE_COMMON_FORGOT_PASSWORD"},inputs:[{label:"CORE_LOGIN_USERNAME",type:"text",name:"username",error:"ERR_HRMS_INVALID_USER_ID"},{label:"CORE_LOGIN_PASSWORD",type:"password",name:"password",error:"ERR_HRMS_WRONG_PASSWORD"},{label:"CORE_COMMON_CITY",type:"custom",name:"city",error:"ERR_HRMS_INVALID_CITY"}]}],Un=["UserRequest"],jn=function(e){var i,o,a,u=e.config,c=e.t,s=e.isDisabled,f=Digit.Hooks.useTenants(),m=f.data,p=f.isLoading,g=Digit.Hooks.useStore.getInitData().isLoading,h=n.useState(null),E=h[0],y=h[1],_=n.useState(null),b=_[0],O=_[1],C=n.useState(!1),w=C[0],S=C[1],N=l.useHistory();n.useEffect(function(){var e,t,n,r,i,o,a,l,u,c,s,d,f,v;if(E){Digit.SessionStorage.set("citizen.userRequestObject",E);var m,p,g,h,y=null==E||null===(e=E.info)||void 0===e||null===(t=e.roles)||void 0===t?void 0:t.filter(function(e){return e.tenantId===Digit.SessionStorage.get("Employee.tenantId")});(null==E||null===(n=E.info)||void 0===n||null===(r=n.roles)||void 0===r?void 0:r.length)>0&&(E.info.roles=y),Digit.UserService.setUser(E),m=null==E?void 0:E.info,p=null==E?void 0:E.access_token,h=(null===(g=JSON.parse(sessionStorage.getItem("Digit.locale")))||void 0===g?void 0:g.value)||"en_IN",localStorage.setItem("Employee.tenant-id",null==m?void 0:m.tenantId),localStorage.setItem("tenant-id",null==m?void 0:m.tenantId),localStorage.setItem("citizen.userRequestObject",JSON.stringify(m)),localStorage.setItem("locale",h),localStorage.setItem("Employee.locale",h),localStorage.setItem("token",p),localStorage.setItem("Employee.token",p),localStorage.setItem("user-info",JSON.stringify(m)),localStorage.setItem("Employee.user-info",JSON.stringify(m));var _,b,O,C,w,S,I,D="/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/employee";null!==(o=window)&&void 0!==o&&null!==(a=o.location)&&void 0!==a&&null!==(l=a.href)&&void 0!==l&&l.includes("from=")&&(D=decodeURIComponent(null===(_=window)||void 0===_||null===(b=_.location)||void 0===b||null===(O=b.href)||void 0===O||null===(C=O.split("from="))||void 0===C?void 0:C[1])||"/"+(null===(w=window)||void 0===w?void 0:w.contextPath)+"/employee"),null!=E&&null!==(u=E.info)&&void 0!==u&&u.roles&&null!=E&&null!==(c=E.info)&&void 0!==c&&null!==(s=c.roles)&&void 0!==s&&s.every(function(e){return"NATADMIN"===e.code})&&(D="/"+(null===(S=window)||void 0===S?void 0:S.contextPath)+"/employee/dss/landing/NURT_DASHBOARD"),null!=E&&null!==(d=E.info)&&void 0!==d&&d.roles&&null!=E&&null!==(f=E.info)&&void 0!==f&&null!==(v=f.roles)&&void 0!==v&&v.every(function(e){return"STADMIN"===e.code})&&(D="/"+(null===(I=window)||void 0===I?void 0:I.contextPath)+"/employee/dss/landing/home"),N.replace(D)}},[E]);var I=function(){O(null)},D=u.inputs,T=D[0],x=D[1],A=D[2],R=[{body:[{label:c(T.label),type:T.type,populators:{name:T.name},isMandatory:!0},{label:c(x.label),type:x.type,populators:{name:x.name},isMandatory:!0},{label:c(A.label),type:A.type,populators:{name:A.name,customProps:{},component:function(e,n){return r.createElement(t.Dropdown,d({option:m,className:"login-city-dd",optionKey:"i18nKey",select:function(t){e.onChange(t)},t:c},n))}},isMandatory:!0}]}];return p||g?r.createElement(t.Loader,null):r.createElement(Sn,null,r.createElement("div",{className:"employeeBackbuttonAlign"},r.createElement(t.BackButton,{variant:"white",style:{borderBottom:"none"}})),r.createElement(t.FormComposer,{onSubmit:function(e){try{var t=function(){S(!1)};if(!e.city)return alert("Please Select City!"),Promise.resolve();S(!0);var n=d({},e,{userType:"EMPLOYEE"});n.tenantId=e.city.code,delete n.city;var r=ae(function(){return Promise.resolve(Digit.UserService.authenticate(n)).then(function(e){var t=e.UserRequest,n=v(e,Un);Digit.SessionStorage.set("Employee.tenantId",null==t?void 0:t.tenantId),y(d({info:t},n))})},function(e){var t,n;O((null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.error_description)||"ES_ERROR_USER_NOT_PERMITTED"==(null==e?void 0:e.message)&&c("ES_ERROR_USER_NOT_PERMITTED")||c("INVALID_LOGIN_CREDENTIALS")),setTimeout(I,5e3)});return Promise.resolve(r&&r.then?r.then(t):t())}catch(e){return Promise.reject(e)}},isDisabled:s||w,noBoxShadow:!0,inline:!0,submitInForm:!0,config:R,label:u.texts.submitButtonLabel,secondaryActionLabel:u.texts.secondaryButtonLabel,onSecondayActionClick:function(){var e;N.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/forgot-password")},heading:u.texts.header,headingStyle:{textAlign:"center"},cardStyle:{margin:"auto",minWidth:"408px"},className:"loginFormStyleEmployee",buttonStyle:{maxWidth:"100%",width:"100%"}},r.createElement(Nn,null)),b&&r.createElement(t.Toast,{error:!0,label:c(b),onClose:I}),r.createElement("div",{className:"employee-login-home-footer",style:{backgroundColor:"unset"}},r.createElement("img",{alt:"Powered by DIGIT",src:null===(i=window)||void 0===i||null===(o=i.globalConfigs)||void 0===o||null===(a=o.getConfig)||void 0===a?void 0:a.call(o,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," "))};jn.propTypes={loginParams:wn.any},jn.defaultProps={loginParams:null};var Bn=function(){var e=i.useTranslation().t,t=l.useRouteMatch().path,o=n.useMemo(function(){return kn.map(function(t){var n={};for(var r in t.texts)n[r]=e(t.texts[r]);return d({},t,{texts:n})},[kn])});return r.createElement(l.Switch,null,r.createElement(l.Route,{path:""+t,exact:!0},r.createElement(jn,{config:o[0],t:e})))},Fn=["user/profile","user/error"],Vn=function(e){var t,o,a,u,c=e.stateInfo,s=e.userDetails,d=e.CITIZEN,f=e.cityDetails,v=e.mobileView,m=e.handleUserDropdownSelection,p=e.logoUrl,g=e.DSO,h=e.stateCode,y=e.modules,b=e.appTenants,O=e.initData,C=l.useHistory(),w=i.useTranslation().t,S=l.useRouteMatch().path,N=l.useLocation(),I=null==N||null===(t=N.pathname)||void 0===t?void 0:t.includes("language-selection"),D=Fn.some(function(e){var t;return null==N||null===(t=N.pathname)||void 0===t?void 0:t.includes(e)});return n.useEffect(function(){Digit.UserService.setType("employee")},[]),r.createElement("div",{className:"employee"},r.createElement(l.Switch,null,r.createElement(l.Route,{path:S+"/user"},D&&r.createElement($,{t:w,stateInfo:c,userDetails:s,CITIZEN:d,cityDetails:f,mobileView:v,handleUserDropdownSelection:m,logoUrl:p,showSidebar:!!D,showLanguageChange:!I}),r.createElement("div",{className:D?"grounded-container":"loginContainer",style:D?{padding:0,paddingTop:"80px",marginLeft:v?"":"64px"}:{"--banner-url":"url("+(null==c?void 0:c.bannerUrl)+")",padding:"0px"}},r.createElement(l.Switch,null,r.createElement(l.Route,{path:S+"/user/login"},r.createElement(Bn,null)),r.createElement(l.Route,{path:S+"/user/forgot-password"},r.createElement(Rn,null)),r.createElement(l.Route,{path:S+"/user/change-password"},r.createElement(Tn,null)),r.createElement(l.Route,{path:S+"/user/profile"},r.createElement(ce,{stateCode:h,userType:"employee",cityDetails:f})),r.createElement(l.Route,{path:S+"/user/error"},r.createElement(E,{initData:O,goToHome:function(){var e;C.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee")}})),r.createElement(l.Route,{path:S+"/user/language-selection"},r.createElement(Mn,null)),r.createElement(l.Route,null,r.createElement(l.Redirect,{to:S+"/user/language-selection"}))))),r.createElement(l.Route,null,r.createElement($,{t:w,stateInfo:c,userDetails:s,CITIZEN:d,cityDetails:f,mobileView:v,handleUserDropdownSelection:m,logoUrl:p,modules:y}),r.createElement("div",{className:"main "+(g?"m-auto":"")},r.createElement("div",{className:"employee-app-wrapper"},r.createElement(_,{initData:O},r.createElement(Pn,{stateCode:h,userType:"employee",modules:y,appTenants:b}))),r.createElement("div",{className:"employee-home-footer"},r.createElement("img",{alt:"Powered by DIGIT",src:null===(o=window)||void 0===o||null===(a=o.globalConfigs)||void 0===a||null===(u=a.getConfig)||void 0===u?void 0:u.call(a,"DIGIT_FOOTER"),style:{height:"1.1em",cursor:"pointer"},onClick:function(){var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})))),r.createElement(l.Route,null,r.createElement(l.Redirect,{to:S+"/user/language-selection"}))))},zn=function(e){var t,i,o,a,u=e.stateCode,c=e.modules,s=e.appTenants,d=e.logoUrl,f=e.initData,v=e.defaultLanding,m=void 0===v?"citizen":v,p=l.useHistory(),g=l.useLocation().pathname,h=window.innerWidth,E=Digit.ULBService.getCurrentUlb(),y=Digit.UserService.getUser(),_=(Digit.Hooks.useStore.getInitData().data||{}).stateInfo,b=Digit.UserService.hasAccess(["FSM_DSO"]),O="CITIZEN"===(null==y||null===(t=y.info)||void 0===t?void 0:t.type)||!window.location.pathname.split("/").includes("employee");window.location.pathname.split("/").includes("employee")&&(O=!1),n.useEffect(function(){var e,t,n;null!=g&&g.includes("application-details")||(null!=g&&g.includes("inbox")||Digit.SessionStorage.del("fsm/inbox/searchParams"),null!=g&&g.includes("search")&&Digit.SessionStorage.del("fsm/search/searchParams")),null!=g&&g.includes("dss")||Digit.SessionStorage.del("DSS_FILTERS"),(null==g?void 0:g.toString())==="/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee"&&(Digit.SessionStorage.del("SEARCH_APPLICATION_DETAIL"),Digit.SessionStorage.del("WS_EDIT_APPLICATION_DETAILS")),(null==g?void 0:g.toString())!=="/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/citizen"&&(null==g?void 0:g.toString())!=="/"+(null===(n=window)||void 0===n?void 0:n.contextPath)+"/employee"||Digit.SessionStorage.del("WS_DISCONNECTION")},[g]),p.listen(function(){var e;null===(e=window)||void 0===e||e.scrollTo({top:0,left:0,behavior:"smooth"})});var C={stateInfo:_,userDetails:y,CITIZEN:O,cityDetails:E,mobileView:h<=640,handleUserDropdownSelection:function(e){e.func()},logoUrl:d,DSO:b,stateCode:u,modules:c,appTenants:s,sourceUrl:window.location.origin+"/citizen",pathname:g,initData:f};return r.createElement(l.Switch,null,r.createElement(l.Route,{path:"/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/employee"},r.createElement(Vn,C)),r.createElement(l.Route,{path:"/"+(null===(o=window)||void 0===o?void 0:o.contextPath)+"/citizen"},r.createElement(Mt,C)),r.createElement(l.Route,null,r.createElement(l.Redirect,{to:"/"+(null===(a=window)||void 0===a?void 0:a.contextPath)+"/"+m})))},Wn=[s],Hn=("object"==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}):c.compose)(c.applyMiddleware.apply(void 0,Wn)),Gn=function(e,t){return void 0===t&&(t={}),c.createStore(function(e,t){return c.combineReducers(d({common:(n=e,function(e,t){switch(void 0===e&&(e=n),t.type){case"LANGUAGE_SELECT":return d({},e,{selectedLanguage:t.payload});default:return e}})},t));var n}(e,t),Hn)},qn=function(e){var n,o=e.stateCode,u=e.moduleReducers,c=e.defaultLanding,s=Digit.Hooks.useInitStore(o,e.enabledModules),d=s.data;return s.isLoading?r.createElement(t.Loader,{page:!0}):(i.getI18n(),r.createElement(a.Provider,{store:Gn(d,u(d))},r.createElement(l.BrowserRouter,null,r.createElement(t.Body,null,r.createElement(zn,{initData:d,stateCode:o,modules:null==d?void 0:d.modules,appTenants:d.tenants,logoUrl:null==d||null===(n=d.stateInfo)||void 0===n?void 0:n.logoUrl,defaultLanding:c})))))},Zn={SelectOtp:me};exports.DigitUI=function(e){var t=e.stateCode,i=e.registry,a=e.enabledModules,l=e.moduleReducers,u=e.defaultLanding,c=n.useState(Digit.Utils.getPrivacyObject()||{}),s=c[0],f=c[1],v=(Digit.UserService.getType(),new o.QueryClient({defaultOptions:{queries:{staleTime:9e5,cacheTime:3e6,retry:!1,retryDelay:function(e){return Infinity}}}})),m=Digit.Contexts.ComponentProvider,p=Digit.Contexts.PrivacyProvider;return Digit.UserService.hasAccess(["FSM_DSO"]),r.createElement("div",null,r.createElement(_,null,r.createElement(o.QueryClientProvider,{client:v},r.createElement(m.Provider,{value:i},r.createElement(p.Provider,{value:{privacy:null==s?void 0:s[window.location.pathname],resetPrivacy:function(e){Digit.Utils.setPrivacyObject({}),f({})},getPrivacy:function(){var e=Digit.Utils.getPrivacyObject();return f(e),e},updatePrivacyDescoped:function(e){var t,n=Digit.Utils.getAllPrivacyObject(),r=d({},n,((t={})[window.location.pathname]=e,t));Digit.Utils.setPrivacyObject(d({},r)),f((null==n?void 0:n[window.location.pathname])||{})},updatePrivacy:function(e,t){f(Digit.Utils.updatePrivacy(e,t)||{})}}},r.createElement(qn,{stateCode:t,enabledModules:a,moduleReducers:l,defaultLanding:u}))))))},exports.initCoreComponents=function(){Object.entries(Zn).forEach(function(e){Digit.ComponentRegistryService.setComponent(e[0],e[1])})};
|