@egovernments/digit-ui-components 0.2.0-beta.7 → 0.2.0-webpack.10
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/README.md +7 -37
- package/dist/main-166735b3.0348cd7ee77dd894b972.js +1 -0
- package/dist/main-7c36387c.eeb2144481c02ceff5c6.js +1 -0
- package/dist/main-aec23333.0f710af04816aa9023ca.js +1 -0
- package/dist/main-c92480b7.146a0950f01e364f98c3.js +1 -0
- package/dist/main-d91a9049.74cc6b9811eb52c58052.js +1 -0
- package/dist/main.js +2 -0
- package/dist/main.js.LICENSE.txt +14 -0
- package/dist/runtime.a6dd0909c73994cc13d4.js +1 -0
- package/dist/vendors-059be3de.7d2a68d0f771fef635da.js +1 -0
- package/dist/vendors-125a01f4.e52f0a6e7c9305346a4e.js +1 -0
- package/dist/vendors-1bbbe0aa.beda1528edc86806c455.js +1 -0
- package/dist/vendors-1c59d003.7363983b62b3d7533702.js +1 -0
- package/dist/vendors-27545368.c6e0cb5dc6d9f6bba82d.js +2 -0
- package/dist/vendors-27545368.c6e0cb5dc6d9f6bba82d.js.LICENSE.txt +10 -0
- package/dist/vendors-49d0a293.1900eb063b3794032292.js +2 -0
- package/dist/vendors-49d0a293.1900eb063b3794032292.js.LICENSE.txt +5 -0
- package/dist/vendors-536eaa00.cc3edfd2361e81b5c1a9.js +1 -0
- package/dist/vendors-5a94f17d.917fc072320583ea418f.js +1 -0
- package/dist/vendors-78622f30.82b357b2a77611bc148c.js +1 -0
- package/dist/vendors-ab957e66.a94d8e721e8367535849.js +1 -0
- package/dist/vendors-beb35932.da545c87b5acf6832c54.js +1 -0
- package/dist/vendors-dbef025e.385620497955134874cb.js +2 -0
- package/dist/vendors-dbef025e.385620497955134874cb.js.LICENSE.txt +21 -0
- package/dist/vendors-fcf017cf.bbe1787ab7ed288fc3d0.js +2 -0
- package/dist/vendors-fcf017cf.bbe1787ab7ed288fc3d0.js.LICENSE.txt +8 -0
- package/package.json +34 -50
- package/CHANGELOG.md +0 -470
- package/dist/index.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports["@egovernments/digit-ui-components"]=t(require("react"),require("react-dom")):e["@egovernments/digit-ui-components"]=t(e.React,e.ReactDOM)}(this,((e,t)=>(this.webpackChunk_egovernments_digit_ui_components=this.webpackChunk_egovernments_digit_ui_components||[]).push([[638],{"+iTe":(e,t,n)=>{n.d(t,{A:()=>v});var l=n("LvDl"),a=n.n(l),o=n("C6rw"),r=n.n(o),i=n("17x9"),s=n.n(i),u=n("YtJg"),c=n("CnBu"),d=n("gSsx"),m=n("4tWr");const p=e=>{var t,n,l,o,i,s,p;let{t:v,config:f,inputRef:g,label:y,onChange:h,value:E,errorStyle:S,disabled:b,type:w,additionalWrapperClass:x="",variant:C}=e;const D={name:null==f||null===(t=f.mdmsConfig)||void 0===t?void 0:t.masterName};var A;null!=f&&null!==(n=f.mdmsConfig)&&void 0!==n&&n.filter&&(D.filter=null==f||null===(A=f.mdmsConfig)||void 0===A?void 0:A.filter);const{isLoading:T,data:R}=null===(l=window)||void 0===l||null===(l=l.Digit)||void 0===l?void 0:l.Hooks.useCustomMDMS(null===(o=Digit)||void 0===o||null===(o=o.ULBService)||void 0===o?void 0:o.getStateId(),null==f||null===(i=f.mdmsConfig)||void 0===i?void 0:i.moduleName,[D],{select:null!=f&&null!==(s=f.mdmsConfig)&&void 0!==s&&s.select?(N=null==f||null===(p=f.mdmsConfig)||void 0===p?void 0:p.select,Function("return "+N)()):e=>{var t,n;return a().get(e,"".concat(null==f||null===(t=f.mdmsConfig)||void 0===t?void 0:t.moduleName,".").concat(null==f||null===(n=f.mdmsConfig)||void 0===n?void 0:n.masterName),[]).filter((e=>null==e||!e.hasOwnProperty("active")||e.active)).map((e=>{var t;return{...e,name:"".concat(null==f||null===(t=f.mdmsConfig)||void 0===t?void 0:t.localePrefix,"_").concat(Digit.Utils.locale.getTransformedLocale(e.code))}}))},enabled:!(null==f||!f.mdmsConfig)});var N;return T?r().createElement(u.a,null):r().createElement(r().Fragment,{key:f.name},(()=>{switch(w){case"radio":return r().createElement(c.A,{inputRef:g,style:{...f.styles},options:R||(null==f?void 0:f.options)||[],key:f.name,optionsKey:null==f?void 0:f.optionsKey,value:E,onSelect:e=>{h(e,f.name)},disabled:b,selectedOption:E,defaultValue:E,t:v,errorStyle:S,additionalWrapperClass:x,innerStyles:null==f?void 0:f.innerStyles});case"dropdown":case"radioordropdown":case"select":return r().createElement(d.A,{inputRef:g,style:{...f.styles},option:R||(null==f?void 0:f.options)||[],key:f.name,optionKey:null==f?void 0:f.optionsKey,value:E,select:e=>{h(e,f.name)},disabled:b,selected:E||f.defaultValue,defaultValue:E||f.defaultValue,t:v,errorStyle:S,optionCardStyles:null==f?void 0:f.optionsCustomStyle,showIcon:null==f?void 0:f.showIcon,variant:C,isSearchable:null==f?void 0:f.isSearchable});case"toggle":return r().createElement(m.A,{inputRef:g,options:R||(null==f?void 0:f.options)||[],key:f.name,optionsKey:null==f?void 0:f.optionsKey,value:E,onSelect:e=>{h(e,f.name)},disabled:b,selectedOption:E,defaultValue:E,t:v,errorStyle:S,additionalWrapperClass:x,innerStyles:null==f?void 0:f.innerStyles});default:return null}})())};p.propTypes={t:s().func.isRequired,config:s().shape({mdmsConfig:s().shape({masterName:s().string,moduleName:s().string,filter:s().object,select:s().string,localePrefix:s().string}),name:s().string,optionsKey:s().string,styles:s().object,innerStyles:s().object,options:s().array,defaultValue:s().string,optionsCustomStyle:s().object,required:s().bool}),inputRef:s().object,label:s().string,onChange:s().func,value:s().oneOfType([s().string,s().array]),errorStyle:s().object,disabled:s().bool,type:s().string,additionalWrapperClass:s().string};const v=p},"0gUp":(e,t,n)=>{n.d(t,{A:()=>D});var l=n("C6rw"),a=n.n(l),o=n("ueKo"),r=n("UXbF"),i=n("RHdZ"),s=n("ktus"),u=n("z7+k"),c=n("XXwk"),d=n("r4YV"),m=n("W/KP"),p=n("giEq"),v=n("eKz2"),f=n("t8ni"),g=n("sg40"),y=n("d8RV"),h=n("AfbF"),E=n("XGbJ"),S=n("Toqr"),b=n("webM"),w=n("Yis2"),x=n("j+la"),C=n("eeei");const D=e=>{let{values:t,onFilterChange:n,t:D,labelClass:A,label:T,customStyles:R,inputRef:N}=e;const[I,L]=(0,l.useState)(!1),[k,F]=(0,l.useState)([0,0]),[V,O]=(0,l.useState)({...t,startDate:null==t?void 0:t.startDate,endDate:null==t?void 0:t.endDate}),j=(0,l.useRef)(N);(0,l.useEffect)((()=>{const e=e=>{j.current&&!j.current.contains(e.target)&&L(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[j]),(0,l.useEffect)((()=>{if(!I&&(null==V?void 0:V.startDate)instanceof Date&&(null==V?void 0:V.endDate)instanceof Date){const e=null==V?void 0:V.startDate,t=null==V?void 0:V.endDate,l=P(null==V?void 0:V.startDate,null==V?void 0:V.endDate),a="".concat((0,i.GP)(null==V?void 0:V.startDate,"MMM d, yy")," - ").concat((0,i.GP)(null==V?void 0:V.endDate,"MMM d, yy"));n({range:{startDate:e,endDate:t,duration:l,title:a},requestDate:{startDate:e,endDate:t,duration:l,title:a}})}}),[V,I]);const M=(0,l.useMemo)((()=>(0,r.hs)([{label:D("DSS_TODAY"),range:()=>({startDate:(0,s.R)(new Date),endDate:(0,u.o)(new Date)})},{label:D("DSS_YESTERDAY"),range:()=>({startDate:(0,c.K)(new Date),endDate:(0,d.B)(new Date)})},{label:D("DSS_THIS_WEEK"),range:()=>({startDate:(0,m.k)(new Date),endDate:(0,p.$)(new Date)})},{label:D("DSS_THIS_MONTH"),range:()=>({startDate:(0,v.w)(new Date),endDate:(0,f.p)(new Date)})},{label:D("DSS_THIS_QUARTER"),range:()=>({startDate:(0,g.a)(new Date),endDate:(0,y.j)(new Date)})},{label:D("DSS_PREVIOUS_YEAR"),range:()=>({startDate:(0,h.d)((0,E.P)((0,S.D)(new Date),3),1),endDate:(0,h.d)((0,E.P)((0,b.Q)(new Date),3),1)})},{label:D("DSS_THIS_YEAR"),range:()=>({startDate:(0,E.P)((0,S.D)(new Date),3),endDate:(0,E.P)((0,b.Q)(new Date),3)})}])),[]),P=(e,t)=>{let n=(new Date(t).getTime()-new Date(e).getTime())/864e5;return n>91?"month":n<90&&n>=14?"week":n<=14?"day":void 0};return a().createElement(a().Fragment,null,a().createElement("div",{className:"filter-label",style:{...R}},T),a().createElement("div",{className:"employee-select-wrap",ref:j},a().createElement("div",{className:"select"},a().createElement("input",{className:"employee-select-wrap--elipses",type:"text",value:null!=t&&t.title?"".concat(null==t?void 0:t.title):"",readOnly:!0}),a().createElement(o.jm,{className:"cursorPointer",onClick:()=>L((e=>!e))})),I&&a().createElement("div",{className:"options-card",style:{overflow:"visible",width:"unset"}},a().createElement(r.ad,{className:"pickerShadow",focusedRange:k,ranges:[V],rangeColors:["#9E9E9E"],onChange:e=>{const{range1:t}=e,{startDate:n,endDate:l,title:a,duration:o}=t;0===k[1]&&O(t),1===k[1]&&(O({title:a,duration:o,startDate:n,endDate:(0,w.p)((0,x.z)((0,C.L)(l,23),59),59)}),L(!1))},onRangeFocusChange:F,retainEndDateOnFirstSelection:!0,showSelectionPreview:!0,staticRanges:M,inputRanges:[],weekStartsOn:1}))))}},"76Om":(e,t,n)=>{n.d(t,{ix:()=>l.A,bs:()=>a.A,DG:()=>o.A,$V:()=>D,dM:()=>w,Y8:()=>A.A,kq:()=>T.A,Hk:()=>P,h3:()=>R.A,Lw:()=>N,B9:()=>I,Ix:()=>F,IX:()=>O,yj:()=>B,T_:()=>H});var l=n("d2XH"),a=n("+iTe"),o=n("KeQL"),r=n("C6rw"),i=n.n(r),s=n("wUmw"),u=n("17x9"),c=n.n(u),d=n("V9qA"),m=n("hUmK"),p=n("3RlE"),v=n("2xqR"),f=n("naAG"),g=n("wPoe"),y=n("ESrU"),h=n("Lfsa"),E=n("Zc5N"),S=n("J7Zr");const b=e=>{let{t,children:n,texts:l={},submit:a=!1,inputs:o=[],inputRef:r,onNext:s,onSkip:u,isDisable:c,onAdd:d,isMultipleAllow:m=!1,cardStyle:p={}}=e;return i().createElement(f.A,{style:p},l.headerCaption&&i().createElement(E.A,null,t(l.headerCaption)),(null==l?void 0:l.header)&&i().createElement(g.A,null,t(l.header)),(null==l?void 0:l.cardText)&&i().createElement(y.A,null,t(l.cardText)),n,l.submitBarLabel?i().createElement(h.A,{disabled:c,submit:a,label:t(l.submitBarLabel),onClick:s}):null,l.skipLabel?i().createElement(y.A,null," ",t(l.skipLabel)," "):null,l.skipText?i().createElement(S.A,{label:t(l.skipText),onClick:u}):null,m&&l.addMultipleText?i().createElement(S.A,{label:t(l.addMultipleText),onClick:d}):null)};b.propTypes={text:c().object,submit:c().bool,onNext:c().func,onSkip:c().func,onAdd:c().func,t:c().func},b.defaultProps={texts:{},submit:!1,onNext:void 0,onSkip:void 0,onAdd:void 0,t:e=>e};const w=b;function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)({}).hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},x.apply(null,arguments)}const C=e=>{var t;let{t:n,children:l,config:a,onSelect:o,onSkip:r,value:u,onChange:c,isDisabled:f,_defaultValues:g={},forcedError:y,componentInFront:h,onAdd:E,cardStyle:S={},isMultipleAllow:b=!1,showErrorBelowChildren:C=!1,childrenAtTheBottom:D=!0,textInputStyle:A}=e;const{register:T,watch:R,errors:N,handleSubmit:I}=(0,s.mN)({defaultValues:g});var L=!!f||a.canDisable&&Object.keys(N).filter((e=>N[e])).length;const k=null===(t=a.inputs)||void 0===t?void 0:t.map(((e,t)=>{var l,a;return"text"===e.type?i().createElement(i().Fragment,{key:t},i().createElement(m.A,null,n(e.label)),N[e.name]&&i().createElement(p.A,null,n(e.error)),i().createElement("div",{className:"field-container",style:{justifyContent:"left"}},h?i().createElement("span",{className:"citizen-card-input citizen-card-input--front"},h):null,i().createElement(v.A,{key:t,name:e.name,value:u,onChange:c,minlength:e.validation.minlength,maxlength:e.validation.maxlength,pattern:null===(l=e.validation)||void 0===l?void 0:l.pattern,title:null===(a=e.validation)||void 0===a?void 0:a.title,inputRef:T(e.validation),isMandatory:N[e.name],disable:!!e.disable&&e.disable,textInputStyle:A}))):"textarea"===e.type?i().createElement(i().Fragment,{key:t},i().createElement(m.A,null,n(e.label)),i().createElement(d.A,{key:t,name:e.name,value:u,onChange:c,inputRef:T(e.validation),maxLength:"1024"})):void 0}));return i().createElement("form",{onSubmit:I((e=>{o(e)}))},i().createElement(w,x({isDisable:L,isMultipleAllow:b},a,{cardStyle:S,submit:!0,onSkip:r,onAdd:E,t:n}),!D&&l,k,y&&!C&&i().createElement(p.A,null,n(y)),D&&l,y&&C&&i().createElement(p.A,null,n(y))))};C.propTypes={config:c().shape({}),onSelect:c().func,onSkip:c().func,onAdd:c().func,t:c().func},C.defaultProps={config:{},onSelect:void 0,onSkip:void 0,onAdd:void 0,t:e=>e};const D=C;var A=n("Pufp"),T=n("O2dT"),R=n("adoh");const N=e=>{let{children:t,className:n}=e;return i().createElement("div",{className:"digit-form-field ".concat(n||"")},t)},I=e=>{let{children:t,onSubmit:n,handleSubmit:l,id:a,className:o="",variant:r=""}=e;return i().createElement("form",{className:"digit-search-form-wrapper ".concat(r," ").concat(o),onSubmit:l(n),id:a},t)};var L=n("CnBu"),k=n("rTr4");const F=e=>{let{options:t,optionsKey:n,additionalWrapperClass:l,onSelect:a,selectedOption:o,SignatureImage:s=()=>i().createElement(k.t.Search,null),onSearchQueryChange:u,SearchQueryValue:c,placeholder:d}=e;const[m,p]=(0,r.useReducer)((function(e,t){if("filter"===t.type)return t.options.filter((e=>e[n].toUpperCase().includes(t.payload.toUpperCase())))}),t);return i().createElement("div",{className:"SearchOnRadioButton"},i().createElement(v.A,{textInputStyle:{maxWidth:"100%"},signature:!0,signatureImg:i().createElement(s,null),onChange:u||function(e){p({type:"filter",payload:e.target.value,options:t})},value:c,placeholder:d}),i().createElement(L.A,{options:m,optionsKey:n,additionalWrapperClass:l,onSelect:a,selectedOption:o}))};n("iTkH");const V=e=>{let{header:t,subHeader:n,cardText:l,cardLabel:a,nextText:o,skipAndContinueText:r,skip:s,onSave:u,onSkip:c,textInput:d}=e;return i().createElement(f.A,null,i().createElement(g.A,{variant:"digit-card-sub-header"},n),i().createElement(g.A,null,t),i().createElement(y.A,null,l),i().createElement(m.A,null,a),i().createElement(v.A,{onChange:d}),i().createElement(h.A,{label:o,onClick:u}),s?i().createElement(S.A,{label:r,onClick:c}):null)};V.propTypes={header:c().string,subHeader:c().string,cardText:c().string,cardLabel:c().string,nextText:c().string,skipAndContinueText:c().string,skip:c().bool,onSave:c().func,onSkip:c().func,textInput:c().string},V.defaultProps={header:"",subHeader:"",cardText:"",cardLabel:"",nextText:"",skipAndContinueText:"",skip:!0,onSave:void 0,onSkip:void 0,textInput:""};const O=V;n("LxW5"),n("xAr1"),n("0gUp"),n("ze8v");var j=n("QZag");const M=e=>{var t;const[n,l]=(0,r.useState)(!1),a=(0,r.useRef)(null),[o,s]=(0,r.useState)(window.innerWidth<=480),u=()=>{if(a.current){const e=a.current.scrollHeight>a.current.clientHeight;l(e)}},c=()=>{window.innerWidth<=480?o||s(!0):o&&s(!1),u()};(0,r.useEffect)((()=>{const e=()=>u(),t=a.current;return t&&(t.addEventListener("scroll",e),u()),()=>{t&&t.removeEventListener("scroll",e)}}),[e.children]),(0,r.useEffect)((()=>(window.addEventListener("resize",c),u(),()=>{window.removeEventListener("resize",c)})),[]);const d=(null==e||null===(t=e.footerChildren)||void 0===t?void 0:t.length)>0,m=d?null==e?void 0:e.footerChildren.slice(0,(null==e?void 0:e.maxFooterButtonsAllowed)||5):[],p=[...m].sort(((e,t)=>{const n={primary:3,secondary:2,tertiary:1},l=e=>n[(e.props.variation||"").toLowerCase()];return l(e)-l(t)})),v=null!=e&&e.sortFooterButtons?o?p.reverse():p:m;return i().createElement("div",{className:"digit-panelcard-wrap ".concat(null!=e&&e.cardClassName?null==e?void 0:e.cardClassName:""," ").concat(n?"with-shadow":""),style:null==e?void 0:e.cardStyles},i().createElement("div",{className:"digit-panelcard-header ".concat(n?"with-shadow":"")},i().createElement(j.QIW,e)),i().createElement("div",{ref:a,className:"digit-panelcard-children-wrap ".concat(null!=e&&e.showChildrenInline?"inline":""," ").concat(n?"with-shadow":""," ").concat(d?"":"without-footer")},(null==e?void 0:e.description)&&i().createElement("div",{className:"digit-panelcard-description"},null==e?void 0:e.description),null==e?void 0:e.children),d&&i().createElement("div",{className:"digit-panelcard-footer ".concat(null!=e&&e.footerclassName?null==e?void 0:e.footerclassName:""," ").concat(n?"with-shadow":"")},i().createElement("div",{className:"digit-panelcard-footer-buttons",style:{...null==e?void 0:e.footerStyles}},v)))};M.propTypes={className:c().string,style:c().object,children:c().node,footerChildren:c().node,message:c().string,type:c().string,info:c().string,response:c().string,customIcon:c().string,iconFill:c().string,multipleResponses:c().array};const P=M;function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)({}).hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},_.apply(null,arguments)}const B=e=>{let{children:t,initialVisibleCount:n,viewLessLabelForFuture:l,viewMoreLabelForFuture:a,viewLessLabelForPast:o,viewMoreLabelForPast:s,pastIcon:u,FutureIcon:c,hideFutureLabel:d,hidePastLabel:m}=e;const p=(0,r.useMemo)((()=>(e=>{const t={upcoming:1,inprogress:2,completed:3};return r.Children.toArray(e).sort(((e,n)=>(t[e.props.variant]||4)-(t[n.props.variant]||4)))})(t)),[t]),[v,f]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1);let h=-1,E=0,S=0;p.forEach(((e,t)=>{"inprogress"===e.props.variant&&(h=t),"completed"===e.props.variant&&(E+=1),"upcoming"===e.props.variant&&(S+=1)}));let b,w=-1;p.forEach(((e,t)=>{"upcoming"===e.props.variant&&t+1===h&&(w=t,b=e)}));let x=p;if(n){x=[],-1!==h&&(x.push(p[h]),h>0&&x.unshift(p[h-1]));const e=Math.max(0,n-x.length),t=p.slice(h+1);x.push(...t.slice(0,e))}if(g&&x.unshift(...p.slice(0,h-1)),v){const e=p.slice(h+1);x.push(...e.filter((e=>!x.includes(e))))}const C=h>0;return i().createElement("div",{className:"digit-timeline-molecule"},n&&C&&!d&&i().createElement("div",{className:"view-more-future-container"},i().createElement(j.$nd,{isSuffix:!0,icon:c||(g?"ArrowDropDown":"ArrowDropUp"),variation:"link",onClick:()=>{y(!g)},label:g?(0,j.GOG)("CAPITALIZEFIRSTLETTER",l)||"View Less Future Steps":(0,j.GOG)("CAPITALIZEFIRSTLETTER",a)||"View More Future Steps",size:"medium"})),r.Children.map(x,((e,t)=>i().createElement(j.Kfn,_({},e.props,{isLastStep:t===r.Children.count(x)-1,isNextActiveStep:b===e})))),n&&!m&&i().createElement("div",{className:"view-more-past-container"},i().createElement(j.$nd,{isSuffix:!0,icon:u||(v?"ArrowDropUp":"ArrowDropDown"),variation:"link",onClick:()=>{f(!v)},label:v?(0,j.GOG)("CAPITALIZEFIRSTLETTER",o)||"View Less Past Steps":(0,j.GOG)("CAPITALIZEFIRSTLETTER",s)||"View More Past Steps",size:"medium"})))};var K=n("JpEE");function q(){return q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)({}).hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},q.apply(null,arguments)}const U=e=>{let{children:t,arrow:n=!1,title:l,placement:a="bottom",enterDelay:o=100,leaveDelay:s=0,followCursor:u=!1,open:c,disableFocusListener:d=!1,disableHoverListener:m=!1,disableInteractive:p=!1,disableTouchListener:v=!1,onOpen:f,onClose:g,style:y,wrapperClassName:h,ClassName:E,...S}=e;const[b,w]=(0,r.useState)(c||!1),[x,C]=(0,r.useState)({}),D=(0,r.useRef)(null),A=(0,r.useRef)(null),T=()=>{clearTimeout(D.current),D.current=setTimeout((()=>{w(!0),f&&f()}),o)},R=()=>{clearTimeout(D.current),D.current=setTimeout((()=>{w(!1),g&&g()}),s)};return(0,r.useEffect)((()=>{if(u){const e=e=>{C({top:e.clientY,left:e.clientX})};return document.addEventListener("mousemove",e),()=>{document.removeEventListener("mousemove",e)}}}),[u]),(0,r.useEffect)((()=>{w(c)}),[c]),i().createElement("div",q({className:"tooltip-wrapper ".concat(h||""),onMouseEnter:e=>{m||(T(),u&&C({top:e.clientY,left:e.clientX}))},onMouseLeave:()=>{m||R()},onFocus:()=>{d||T()},onBlur:()=>{d||R()},onTouchStart:()=>{v||T()},onTouchEnd:()=>{v||R()},tooltipRef:A},S),t,b&&i().createElement(K.A,{title:l,placement:a,arrow:n,style:{...y,...x},className:E}))};U.propTypes={children:c().element.isRequired,arrow:c().bool,title:c().node.isRequired,placement:c().oneOf(["bottom","bottom-end","bottom-start","left","right","top","top-end","top-start","left-end","left-start","right-end","right-start"]),enterDelay:c().number,leaveDelay:c().number,followCursor:c().bool,open:c().bool,disableFocusListener:c().bool,disableHoverListener:c().bool,disableInteractive:c().bool,disableTouchListener:c().bool,onOpen:c().func,style:c().object,onClose:c().func},U.defaultProps={arrow:!0};const H=U},"C/17":(e,t,n)=>{n.d(t,{M:()=>d});var l=n("C6rw"),a=n.n(l),o=n("2xqR"),r=n("x8Sf"),i=n("17x9"),s=n.n(i);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)({}).hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},u.apply(null,arguments)}const c=(0,l.forwardRef)(((e,t)=>{let{allowDecimals:n=!0,allowNegativeValue:o=!0,id:i,name:s,className:c,customInput:d,decimalsLimit:m,defaultValue:p,disabled:v=!1,maxLength:f,value:g,onValueChange:y,fixedDecimalLength:h,placeholder:E,decimalScale:S,prefix:b,suffix:w,intlConfig:x,step:C,min:D,max:A,disableGroupSeparators:T=!1,disableAbbreviations:R=!1,decimalSeparator:N,groupSeparator:I,onChange:L,onFocus:k,onBlur:F,onKeyDown:V,onKeyUp:O,transformRawValue:j,otherProps:M,inputRef:P,..._}=e;if(N&&(0,r.Et)(N))throw new Error("decimalSeparator cannot be a number");if(I&&(0,r.Et)(I))throw new Error("groupSeparator cannot be a number");const B=(0,l.useMemo)((()=>(0,r.XG)(x)),[x]),K=N||B.decimalSeparator||"",q=I||B.groupSeparator||"";if(K&&q&&K===q&&!1===T)throw new Error("decimalSeparator cannot be the same as groupSeparator");const U={decimalSeparator:K,groupSeparator:q,disableGroupSeparators:T,intlConfig:x,prefix:b||B.prefix,suffix:w},H={decimalSeparator:K,groupSeparator:q,allowDecimals:n,decimalsLimit:m||h||2,allowNegativeValue:o,disableAbbreviations:R,prefix:b||B.prefix,transformRawValue:j},z=null!=p?(0,r.Fl)({...U,decimalScale:S,value:String(p)}):null!=g?(0,r.Fl)({...U,decimalScale:S,value:String(g)}):"",[G,X]=(0,l.useState)(z),[Y,W]=(0,l.useState)(!1),[$,Q]=(0,l.useState)(0),[Z,J]=(0,l.useState)(0),[ee,te]=(0,l.useState)(null),ne=(0,l.useRef)(P);(0,l.useImperativeHandle)(t,(()=>ne.current));const le=(e,t)=>{W(!0);const{modifiedValue:n,cursorPosition:l}=(0,r.R8)({selectionStart:t,value:e,lastKeyStroke:ee,stateValue:G,groupSeparator:q}),a=(0,r.XY)({value:n,...H});if(f&&a.replace(/-/g,"").length>f)return;if(""===a||"-"===a||a===K)return y&&y(void 0,s,{float:null,formatted:"",value:""}),void X(a);const o=K?a.replace(K,"."):a,i=parseFloat(o),u=(0,r.Fl)({value:a,...U});if(null!=l){let t=l+(u.length-e.length);t=t<=0?b?b.length:0:t,Q(t),J(Z+1)}X(u),y&&y(a,s,{float:i,formatted:u,value:a})};(0,l.useEffect)((()=>{Y&&"-"!==G&&ne.current&&document.activeElement===ne.current&&ne.current.setSelectionRange($,$)}),[G,$,ne,Y,Z]);const ae={type:"text",inputMode:"decimal",id:i,name:s,className:c,onChange:e=>{const{target:{value:t,selectionStart:n}}=e;le(t,n),L&&L(e)},onBlur:e=>{const{target:{value:t}}=e,n=(0,r.XY)({value:t,...H});if("-"===n||!n)return X(""),void(F&&F(e));const l=(0,r.Rq)(n,K,h),a=(0,r.rC)(l,K,void 0!==S?S:h),o=parseFloat(a.replace(K,".")),i=(0,r.Fl)({...U,value:a});y&&y(a,s,{float:o,formatted:i,value:a}),X(i),F&&F(e)},onFocus:e=>(k&&k(e),G?G.length:0),onKeyDown:e=>{const{key:t}=e;if(te(t),C&&("ArrowUp"===t||"ArrowDown"===t)){e.preventDefault(),Q(G.length);const n=parseFloat(null!=g?String(g).replace(K,"."):(0,r.XY)({value:G,...H}))||0,l="ArrowUp"===t?n+C:n-C;if(void 0!==D&&l<D)return;if(void 0!==A&&l>A)return;const a=String(C).includes(".")?Number(String(C).split(".")[1].length):void 0;le(String(a?l.toFixed(a):l).replace(".",K))}V&&V(e)},onKeyUp:e=>{const{key:t,currentTarget:{selectionStart:n}}=e;if("ArrowUp"!==t&&"ArrowDown"!==t&&"-"!==G){const e=(0,r.e7)(G,{groupSeparator:q,decimalSeparator:K});if(e&&n&&n>G.length-e.length&&ne.current){const t=G.length-e.length;ne.current.setSelectionRange(t,t)}}O&&O(e)},placeholder:E,disabled:v,value:null==g||"-"===G||K&&G===K?G:(0,r.Fl)({...U,decimalScale:Y?void 0:S,value:String(g)}),ref:ne,..._};if(d){const e=d;return a().createElement(e,u({},ae,M))}return a().createElement("input",ae)}));c.displayName="CurrencyInput",c.propTypes={allowDecimals:s().bool,allowNegativeValue:s().bool,id:s().string,name:s().string,className:s().string,customInput:s().elementType,decimalsLimit:s().number,defaultValue:s().oneOfType([s().number,s().string]),disabled:s().bool,maxLength:s().number,value:s().oneOfType([s().number,s().string]),onValueChange:s().func,fixedDecimalLength:s().number,placeholder:s().string,decimalScale:s().number,prefix:s().string,suffix:s().string,intlConfig:s().object,step:s().number,min:s().number,max:s().number,disableGroupSeparators:s().bool,disableAbbreviations:s().bool,decimalSeparator:s().string,groupSeparator:s().string,onChange:s().func,onFocus:s().func,onBlur:s().func,onKeyDown:s().func,onKeyUp:s().func,transformRawValue:s().func,otherProps:s().object,inputRef:s().oneOfType([s().func,s().shape({current:s().instanceOf(Element)})])};const d=e=>{let{ref:t,...n}=e;const r=(null==n?void 0:n.prefix)||"₹ ",[i,s]=(0,l.useState)(""),[u,d]=(0,l.useState)(""),[m,p]=(0,l.useState)(null==n?void 0:n.defaultValue),[v,f]=(0,l.useState)(),[g,y]=(0,l.useState)(" ");return(0,l.useEffect)((()=>{n.onValueChange&&n.onValueChange(m)}),[m]),a().createElement(c,{id:"validationCustom01",name:"input-1",customInput:o.A,className:"form-control ".concat(u," ").concat(null==n?void 0:n.variant),value:n.defaultValue?n.defaultValue:m||"",onValueChange:(e,t,n)=>{if(f(n),y(void 0===e?"undefined":e||" "),!e)return d(""),void p("");Number.isNaN(Number(e))||(Number(e),p(e))},prefix:r,step:1,otherProps:null==n?void 0:n.otherProps,inputRef:t})}},C6rw:t=>{t.exports=e},JTzt:(e,t,n)=>{n.d(t,{W:()=>l});const l=()=>{var e;return(null===(e=window)||void 0===e||null===(e=e.Digit)||void 0===e||null===(e=e.SessionStorage)||void 0===e?void 0:e.get("userType"))||"employee"}},KeQL:(e,t,n)=>{n.d(t,{A:()=>p,B:()=>d});var l=n("C6rw"),a=n.n(l),o=n("17x9"),r=n.n(o),i=n("SOjZ"),s=n("xVzt"),u=n("Lfsa"),c=n("otB8");const d=e=>{let{label:t,name:n,onClick:l}=e;return a().createElement("div",{className:"digit-detail",onClick:l},a().createElement("span",{className:"digit-label"},a().createElement("h2",null,t)),a().createElement("span",{className:"digit-name"},n))},m=e=>{let{data:t,serviceRequestIdKey:n,linkPrefix:l,handleSelect:o,selectedItems:r,keyForSelected:m,handleDetailCardClick:p,isTwoDynamicPrefix:v=!1,getRedirectionLink:f,handleClickEnabled:g=!0,t:y,showActionBar:h=!0,showCitizenInfoLabel:E=!1,submitButtonLabel:S,styleVariant:b="",redirectedLink:w,subRedirectedLink:x}=e;return l&&n?a().createElement("div",null,t.map(((e,t)=>a().createElement(i.N_,{key:t,to:v?"".concat(l).concat("function"==typeof n?n(e):"".concat(f(w),"/").concat(e[x||"Application Number"])):"".concat(l).concat("function"==typeof n?n(e):e[n])},a().createElement("div",{className:"digit-details-container"},Object.keys(e).map(((t,n)=>"applicationNo"===t||"Vehicle Log"===t?null:a().createElement(d,{label:t,name:e[t],key:n})))))))):a().createElement("div",null,t.map(((e,t)=>a().createElement("div",{key:t,className:"digit-details-container ".concat(b),onClick:()=>g&&o(e)},Object.keys(e).filter((t=>{var n;return!("object"==typeof e[t]&&1==(null===(n=e[t])||void 0===n?void 0:n.hidden))})).map(((t,n)=>a().createElement(d,{label:t,name:e[t],key:n,onClick:()=>g&&p(e)}))),E?a().createElement(s.A,{className:"digit-core-variant",info:y("ATM_INFO_LABEL"),text:y("ATM_INFO_TEXT"),fill:"#CC7B2F"}):null,h?a().createElement(c.A,null,a().createElement(u.A,{onClick:()=>p(e),label:S})):null))))};m.propTypes={data:r().array},m.defaultProps={data:[]};const p=m},LxW5:(e,t,n)=>{n.d(t,{A:()=>i});var l=n("C6rw"),a=n.n(l),o=n("ueKo"),r=n("QZag");const i=e=>{let{text:t,handleActionClick:n,...l}=e;return a().createElement("div",{className:"digit-search-action",onClick:n},a().createElement(r.ot$,{count:l.filterCount}),a().createElement(o.H,null)," ",a().createElement("span",{className:"digit-search-text"},t))}},O2dT:(e,t,n)=>{n.d(t,{A:()=>c});var l=n("C6rw"),a=n.n(l),o=n("17x9"),r=n.n(o),i=n("GXvQ");const s=(e,t,n,l)=>{var a;const o={valid:!0,name:null==e||null===(a=e.name)||void 0===a?void 0:a.substring(0,15),error:""};if(e)return!t.test(e.type)&&e.size/1024/1024>n&&(o.valid=!1,o.error=l("NOT_SUPPORTED_FILE_TYPE_AND_FILE_SIZE_EXCEEDED_5MB")),t.test(e.type)||(o.valid=!1,o.error=l("NOT_SUPPORTED_FILE_TYPE")),e.size/1024/1024>n&&(o.valid=!1,o.error=l("FILE_SIZE_EXCEEDED_5MB")),o},u=e=>{let{t,module:n="PGR",tenantId:o=Digit.ULBService.getStateId(),getFormState:r,requestSpecifcFileRemoval:u,extraStyleName:c="",setuploadedstate:d=[],showHintBelow:m,hintText:p,allowedFileTypesRegex:v=/(.*?)(jpg|jpeg|webp|aif|png|image|pdf|msword|openxmlformats-officedocument)$/i,allowedMaxSizeInMB:f=10,acceptFiles:g="image/*, .jpg, .jpeg, .webp, .aif, .png, .image, .pdf, .msword, .openxmlformats-officedocument, .dxf",maxFilesAllowed:y,customClass:h="",customErrorMsg:E,containerStyles:S}=e;const b="FILES_UPLOADED",w="TARGET_FILE_REMOVAL",[x,C]=(0,l.useState)([]),[D,A]=(0,l.useState)(!0),[T,R]=(0,l.useReducer)(((e,t)=>{switch(t.type){case b:return((e,t)=>{const{files:n,fileStoreIds:l}=t,a=Array.from(n);return[...e,...null==a?void 0:a.map(((e,t)=>[e.name,{file:e,fileStoreId:l[t]}]))]})(e,t.payload);case w:return((e,t)=>{const n=e.findIndex((e=>e[1].fileStoreId.fileStoreId===t.fileStoreId.fileStoreId)),l=e.filter(((e,t)=>t!==n));return C([]),[...l]})(e,t.payload)}}),[...d]);return(0,l.useEffect)((()=>r(T)),[T]),(0,l.useEffect)((()=>{u&&R({type:w,payload:u})}),[u]),a().createElement("div",{style:S},a().createElement(i.A,{onUpload:e=>(async e=>{A(!1),C([]);const l=Array.from(e.target.files);if(!l.length)return;const[a,r]=((e,t,n,l,a,o)=>{var r;if(!e.length||!t||!n)return[{},!1];const i=o.length+1;if(a&&(i>a||e.length>a))return[[{valid:!1,name:null===(r=e[0])||void 0===r||null===(r=r.name)||void 0===r?void 0:r.substring(0,15),error:l("FILE_LIMIT_EXCEEDED")}],!0];const u=[];let c=!1;for(let a of e){const e=s(a,t,n,l);e.valid||(c=!0),u.push(e)}return[u,c]})(l,v,f,t,y,T);if(r)C(a),A(!0);else try{const{data:{files:t}={}}=await Digit.UploadServices.MultipleFilesStorage(n,e.target.files,o);return A(!0),R({type:b,payload:{files:e.target.files,fileStoreIds:t}})}catch(e){A(!0)}})(e),removeTargetedFile:e=>R({type:w,payload:e}),uploadedFiles:T,multiple:!0,showHintBelow:m,hintText:p,extraStyleName:c,onDelete:()=>{C([])},accept:g,message:t("WORKS_NO_FILE_SELECTED"),customClass:h,enableButton:D}),a().createElement("span",{style:{display:"flex"}},x.length?x.map((e=>{let{valid:n,name:l,type:o,size:r,error:i}=e;return n?null:((e,t)=>{let{t:n,error:l,name:o}=e;return a().createElement("span",{style:{display:"flex",flexDirection:"column"}},a().createElement("div",{className:"digit-validation-error"},n(t||l)),a().createElement("div",{className:"digit-validation-error"},t?"":"".concat(n("ES_COMMON_DOC_FILENAME")," : ").concat(o," ...")))})({t,error:i,name:l},E)})):null))};u.propTypes={t:r().func.isRequired,module:r().string,tenantId:r().string,getFormState:r().func,requestSpecifcFileRemoval:r().object,extraStyleName:r().string,setuploadedstate:r().array,showHintBelow:r().bool,hintText:r().string,allowedFileTypesRegex:r().instanceOf(RegExp),allowedMaxSizeInMB:r().number,acceptFiles:r().string,maxFilesAllowed:r().number,customClass:r().string,customErrorMsg:r().string,containerStyles:r().object};const c=u},OoTn:(e,t,n)=>{n.d(t,{X:()=>l});const l=function(e,t,n){let l=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4?arguments[4]:void 0;if(!e&&0!==e)return"";switch(t){case"amount":case"Amount":return((e,t,n)=>{const l=new Intl.NumberFormat("en-IN",{currency:"INR"});switch(t){case"Lac":return"₹ ".concat(l.format((e/1e5).toFixed(2)||0)," ").concat(n("ES_DSS_LAC"));case"Cr":return"₹ ".concat(l.format((e/1e7).toFixed(2)||0)," ").concat(n("ES_DSS_CR"));case"Unit":return"₹ ".concat(l.format((null==e?void 0:e.toFixed(2))||0));default:return""}})(e,n,a);case"number":return l?new Intl.NumberFormat("en-IN").format(e):parseInt(e);case"percentage":const t=new Intl.NumberFormat("en-IN",{maximumSignificantDigits:3});return"".concat(t.format(e.toFixed(2))," %");default:return""}}},Pufp:(e,t,n)=>{n.d(t,{A:()=>m});var l=n("C6rw"),a=n.n(l),o=n("17x9"),r=n.n(o),i=n("1wiX"),s=n("gSsx"),u=n("YtJg"),c=n("iTkH");const d=e=>{var t,n,o,r,d,m;let{populators:p,formData:v,props:f,inputRef:g,errors:y,setValue:h,variant:E}=e;const[S,b]=(0,l.useState)([]),{t:w}=(0,c.Bd)(),x=null===(t=window)||void 0===t||null===(t=t.Digit)||void 0===t||null===(t=t.ULBService)||void 0===t?void 0:t.getCurrentTenantId(),C=null===(n=window)||void 0===n||null===(n=n.Digit)||void 0===n||null===(n=n.Utils)||void 0===n||null===(n=n.locale)||void 0===n?void 0:n.getTransformedLocale(x),{isLoading:D,data:A}=null===(o=window)||void 0===o||null===(o=o.Digit)||void 0===o?void 0:o.Hooks.useLocation(x,"Ward",{select:e=>{var t;const n=[],l={};return null==e||null===(t=e.TenantBoundary[0])||void 0===t||t.boundary.forEach((e=>{l[null==e?void 0:e.code]=null==e?void 0:e.children.map((e=>({code:e.code,name:e.name,i18nKey:"".concat(C,"_ADMIN_").concat(null==e?void 0:e.code),label:null==e?void 0:e.label}))),n.push({code:e.code,name:e.name,i18nKey:"".concat(C,"_ADMIN_").concat(null==e?void 0:e.code)})})),{wards:n,localities:l}}});return(0,l.useEffect)((()=>{if(A)if("ward"===p.type)b(null==A?void 0:A.wards);else{var e;let t=[];const n=null==v||null===(e=v.ward)||void 0===e?void 0:e.map((e=>e.code));null==n||n.forEach((e=>{var n;t=[...t,...null==A||null===(n=A.localities)||void 0===n?void 0:n[e]]})),b(t)}}),[A,null==v?void 0:v.ward]),D?a().createElement(u.a,null):a().createElement(a().Fragment,null,p.allowMultiSelect&&a().createElement("div",{style:{display:"grid",gridAutoFlow:"row"}},a().createElement(i.A,{options:S,optionsKey:null==p?void 0:p.optionsKey,props:f,isPropsNeeded:!0,onSelect:e=>{"ward"===p.type&&h("locality",[]),f.onChange(null==e?void 0:e.map((e=>null!=e&&e[1]?e[1]:null)).filter((e=>e)))},selected:null==f?void 0:f.value,defaultLabel:w(null==p?void 0:p.defaultText),defaultUnit:w(null==p?void 0:p.selectedText),config:p,variant:E})),!p.allowMultiSelect&&a().createElement(s.A,{inputRef:g,style:{},option:S,key:p.name,optionKey:null==p?void 0:p.optionsKey,value:null==f||null===(r=f.value)||void 0===r?void 0:r[0],select:e=>{f.onChange([e],p.name)},selected:(null==f||null===(d=f.value)||void 0===d?void 0:d[0])||p.defaultValue,defaultValue:(null==f||null===(m=f.value)||void 0===m?void 0:m[0])||p.defaultValue,t:w,errorStyle:null==y?void 0:y[p.name],optionCardStyles:null==p?void 0:p.optionsCustomStyle,variant:E}))};d.propTypes={populators:r().shape({type:r().string.isRequired,allowMultiSelect:r().bool.isRequired,optionsKey:r().string,defaultText:r().string,selectedText:r().string,defaultValue:r().string,optionsCustomStyle:r().object}).isRequired,formData:r().object.isRequired,props:r().shape({onChange:r().func.isRequired,value:r().oneOfType([r().arrayOf(r().string),r().string])}).isRequired,inputRef:r().oneOfType([r().object,r().func]),errors:r().object,setValue:r().func},d.defaultProps={populators:{optionsKey:"options",defaultText:"Select an option",selectedText:"Selected",defaultValue:"",optionsCustomStyle:{}},inputRef:null,errors:null};const m=d},adoh:(e,t,n)=>{n.d(t,{A:()=>r});var l=n("C6rw"),a=n.n(l),o=n("rTr4");const r=e=>{let{text:t,handleActionClick:n}=e;return a().createElement("div",{className:"digit-search-action",onClick:n},a().createElement(o.t.Search,null)," ",a().createElement("span",{className:"digit-search-text"},t))}},d2XH:(e,t,n)=>{n.d(t,{A:()=>m});var l=n("C6rw"),a=n.n(l),o=n("17x9"),r=n.n(o),i=n("1wiX"),s=n("gSsx"),u=n("YtJg"),c=n("iTkH");n("LvDl");const d=e=>{var t,n,o,r,d;let{populators:m,formData:p,props:v,inputRef:f,errors:g}=e;const[y,h]=(0,l.useState)([]),{t:E}=(0,c.Bd)(),S=null===(t=Digit)||void 0===t||null===(t=t.Customizations)||void 0===t||null===(t=t[null==m?void 0:m.masterName])||void 0===t||null===(t=t[null==m?void 0:m.moduleName])||void 0===t?void 0:t[null==m?void 0:m.customfn](),{isLoading:b,data:w,revalidate:x,isFetching:C}=null===(n=window)||void 0===n||null===(n=n.Digit)||void 0===n?void 0:n.Hooks.useCustomAPIHook(S);return(0,l.useEffect)((()=>{h(w)}),[w]),b?a().createElement(u.a,null):a().createElement(a().Fragment,null,m.allowMultiSelect&&a().createElement("div",{style:{display:"grid",gridAutoFlow:"row"}},a().createElement(i.A,{options:y,optionsKey:null==m?void 0:m.optionsKey,props:v,isPropsNeeded:!0,onSelect:e=>{v.onChange(null==e?void 0:e.map((e=>null!=e&&e[1]?e[1]:null)).filter((e=>e)))},selected:null==v?void 0:v.value,defaultLabel:E(null==m?void 0:m.defaultText),defaultUnit:E(null==m?void 0:m.selectedText),config:m})),!m.allowMultiSelect&&a().createElement(s.A,{inputRef:f,style:{display:"flex",justifyContent:"space-between"},option:y,key:m.name,optionKey:null==m?void 0:m.optionsKey,value:null===(o=v.value)||void 0===o?void 0:o[0],select:e=>{v.onChange([e],m.name)},selected:(null===(r=v.value)||void 0===r?void 0:r[0])||m.defaultValue,defaultValue:(null===(d=v.value)||void 0===d?void 0:d[0])||m.defaultValue,t:E,errorStyle:null==g?void 0:g[m.name],optionCardStyles:null==m?void 0:m.optionsCustomStyle}))};d.propTypes={populators:r().shape({allowMultiSelect:r().bool.isRequired,masterName:r().string,moduleName:r().string,customfn:r().string,optionsKey:r().string,defaultText:r().string,selectedText:r().string,name:r().string,defaultValue:r().string,optionsCustomStyle:r().object}).isRequired,formData:r().object,props:r().shape({isApiLoading:r().bool,options:r().array,className:r().string,style:r().object,value:r().oneOfType([r().string,r().array]),onChange:r().func}).isRequired,inputRef:r().object,errors:r().object};const m=d},oG2x:(e,t,n)=>{n.d(t,{s:()=>a});let l={docx:"vnd.openxmlformats-officedocument.wordprocessingml.document",doc:"application/msword",png:"png",pdf:"pdf",jpeg:"jpeg",jpg:"jpeg",xls:"vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",csv:"csv"};const a=e=>{if(null!=e&&e.length){let t=[];return null==e||e.forEach((e=>{t.push(l[e])})),t=t.join("|"),new RegExp("(.*?)(".concat(t,")$"))}return/(.*?)(pdf|docx|jpeg|jpg|png|msword|openxmlformats-officedocument|wordprocessingml|document|spreadsheetml|sheet)$/}},pM4I:e=>{e.exports=t},ry6L:(e,t,n)=>{n.d(t,{A:()=>l});const l=e=>e.includes(".pdf")?"pdf":(e.includes(".jpg")||e.includes(".jpeg")||e.includes(".png")||e.includes(".webp"),"image")},snI5:(e,t,n)=>{n.d(t,{Q:()=>l});const l=(e,t,l,a,o)=>{try{const r=n("A8bQ"),i=null==r?void 0:r[e];return i?i({width:l,height:a,fill:t,className:o}):(console.error("Icon not found"),null)}catch(e){return console.error("Icon not found"),null}}},x8Sf:(e,t,n)=>{n.d(t,{Et:()=>m,Fl:()=>r,R8:()=>h,Rq:()=>o,XG:()=>c,XY:()=>l,e7:()=>d,gS:()=>E,rC:()=>p});const l=e=>{let{value:t,groupSeparator:n=",",decimalSeparator:l=".",allowDecimals:o=!0,decimalsLimit:r=2,allowNegativeValue:i=!0,disableAbbreviations:s=!1,prefix:u="",transformRawValue:c=e=>e}=e;const d=c(t);if("-"===d)return d;const m=s?[]:["k","m","b"],p=new RegExp("((^|\\D)-\\d)|(-".concat(a(u),")")).test(d),[v,h]=RegExp("(\\d+)-?".concat(a(u))).exec(t)||[],E=u?v?d.replace(v,"").concat(h):d.replace(u,""):d,S=y(E,n),b=g(S,[n,l,...m]);let w=b;if(!s){if(m.some((e=>e===b.toLowerCase())))return"";const e=f(b,l);e&&(w=String(e))}const x=p&&i?"-":"";if(l&&w.includes(l)){const[e,t]=b.split(l),n=r&&t?t.slice(0,r):t,a=o?"".concat(l).concat(n):"";return"".concat(x).concat(e).concat(a)}return"".concat(x).concat(w)},a=e=>e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),o=(e,t,n)=>{if(n&&e.length>1){if(e.includes(t)){const[l,a]=e.split(t);if(a.length>n)return"".concat(l).concat(t).concat(a.slice(0,n))}const l=e.length>n?new RegExp("(\\d+)(\\d{".concat(n,"})")):new RegExp("(\\d)(\\d+)"),a=e.match(l);if(a){const[,e,n]=a;return"".concat(e).concat(t).concat(n)}}return e},r=e=>{const{value:t,decimalSeparator:n,intlConfig:l,decimalScale:o,prefix:r="",suffix:u=""}=e;if(""===t||void 0===t)return"";if("-"===t)return"-";const c=new RegExp("^\\d?-".concat(r?"".concat(a(r),"?"):"","\\d")).test(t),m="."!==n?i(t,n,c):t,p={minimumFractionDigits:o||0,maximumFractionDigits:20},v=(l?new Intl.NumberFormat(l.locale,l.currency?{...p,style:"currency",currency:l.currency}:p):new Intl.NumberFormat(void 0,p)).formatToParts(Number(m));let f=s(v,e);const g=d(f,{...e}),y=t.slice(-1)===n?n:"",[,h]=m.match(RegExp("\\d+\\.(\\d+)"))||[];return void 0===o&&h&&n&&(f=f.includes(n)?f.replace(RegExp("(\\d+)(".concat(a(n),")(\\d+)"),"g"),"$1$2".concat(h)):g&&!u?f.replace(g,"".concat(n).concat(h).concat(g)):"".concat(f).concat(n).concat(h)),u&&y?"".concat(f).concat(y).concat(u):g&&y?f.replace(g,"".concat(y).concat(g)):g&&u?f.replace(g,"".concat(y).concat(u)):[f,y,u].join("")},i=(e,t,n)=>{let l=e;return t&&"."!==t&&(l=l.replace(RegExp(a(t),"g"),"."),n&&"-"===t&&(l="-".concat(l.slice(1)))),l},s=(e,t)=>{let{prefix:n,groupSeparator:l,decimalSeparator:a,decimalScale:o,disableGroupSeparators:r=!1}=t;return e.reduce(((e,t,i)=>{let{type:s,value:u}=t;return 0===i&&n?"minusSign"===s?[u,n]:"currency"===s?[...e,n]:[n,u]:"currency"===s?n?e:[...e,u]:"group"===s?r?e:[...e,void 0!==l?l:u]:"decimal"===s?void 0!==o&&0===o?e:[...e,void 0!==a?a:u]:"fraction"===s?[...e,void 0!==o?u.slice(0,o):u]:[...e,u]}),[""]).join("")},u={currencySymbol:"",groupSeparator:"",decimalSeparator:"",prefix:"",suffix:""},c=e=>{const{locale:t,currency:n}=e||{};return(t?new Intl.NumberFormat(t,n?{currency:n,style:"currency"}:void 0):new Intl.NumberFormat).formatToParts(1000.1).reduce(((e,t,n)=>"currency"===t.type?0===n?{...e,currencySymbol:t.value,prefix:t.value}:{...e,currencySymbol:t.value,suffix:t.value}:"group"===t.type?{...e,groupSeparator:t.value}:"decimal"===t.type?{...e,decimalSeparator:t.value}:e),u)},d=(e,t)=>{let{groupSeparator:n=",",decimalSeparator:l="."}=t;const o=new RegExp("\\d([^".concat(a(n)).concat(a(l),"0-9]+)")),r=e.match(o);return r?r[1]:void 0},m=e=>RegExp(/\d/,"gi").test(e),p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".",n=arguments.length>2?arguments[2]:void 0;if(void 0===n||""===e||void 0===e)return e;if(!e.match(/\d/g))return"";const[l,a]=e.split(t);if(0===n)return l;let o=a||"";if(o.length<n)for(;o.length<n;)o+="0";else o=o.slice(0,n);return"".concat(l).concat(t).concat(o)},v={k:1e3,m:1e6,b:1e9},f=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".";const n=new RegExp("(\\d+(".concat(a(t),"\\d*)?)([kmb])$"),"i"),l=e.match(n);if(l){const[,e,,n]=l,a=v[n.toLowerCase()];return Number(e.replace(t,"."))*a}},g=(e,t)=>{const n=a(t.join("")),l=new RegExp("[^\\d".concat(n,"]"),"gi");return e.replace(l,"")},y=function(e){const t=new RegExp(a(arguments.length>1&&void 0!==arguments[1]?arguments[1]:","),"g");return e.replace(t,"")},h=e=>{let{selectionStart:t,value:n,lastKeyStroke:l,stateValue:a,groupSeparator:o}=e,r=t,i=n;if(a&&r){const e=n.split("");return"Backspace"===l&&a[r]===o&&(e.splice(r-1,1),r-=1),"Delete"===l&&a[r]===o&&(e.splice(r,1),r+=1),i=e.join(""),{modifiedValue:i,cursorPosition:r}}return{modifiedValue:i,cursorPosition:t}},E=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=Object.keys(S).filter((t=>e.includes(t)));if(t&&(null==t?void 0:t.length)>0)return S[t[0]];S["₹"]},S={"¥":{locale:"ja-JP",currency:"JPY"},"₹":{locale:"en-IN",currency:"INR"},"£":{locale:"en-GB",currency:"GBP"},"€":{locale:"de-DE",currency:"EUR"},$:{locale:"en-US",currency:"USD"}}},xAr1:(e,t,n)=>{n.d(t,{A:()=>b});var l=n("C6rw"),a=n.n(l),o=n("iTkH"),r=n("wUmw"),i=n("3RlE"),s=n("Crro"),u=n("hUmK"),c=n("2xqR"),d=n("V9qA"),m=n("+iTe"),p=n("3uk+"),v=n("0gUp"),f=n("O2dT"),g=n("1wiX"),y=n("Pufp"),h=n("ze8v"),E=n("d2XH");function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)({}).hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},S.apply(null,arguments)}const b=e=>{let{data:t,...n}=e;const{t:l}=(0,o.Bd)(),{fields:b,control:w,formData:x,errors:C,register:D,setValue:A,getValues:T,setError:R,clearErrors:N,apiDetails:I}=n;return a().createElement(a().Fragment,null,null==b?void 0:b.map(((e,o)=>{var b,L,k,F;return a().createElement(s.A,{key:o,style:{display:"flex",flexDirection:"column",alignItems:"flex-start"}},e.label&&a().createElement(u.A,{style:{...n.labelStyle,marginBottom:"0.4rem"}},l(e.label),null!=e&&e.isMandatory?" * ":null),function(e,n,o){var i,s,u;let b=arguments.length>3&&void 0!==arguments[3]&&arguments[3],L=arguments.length>4?arguments[4]:void 0,k=arguments.length>5?arguments[5]:void 0;const F="string"==typeof L?Digit.ComponentRegistryService.getComponent(L):L;let V=null!=k&&k.additionalValidation?null===(i=Digit)||void 0===i||null===(i=i.Customizations)||void 0===i||null===(i=i[null==I?void 0:I.masterName])||void 0===i||null===(i=i[null==I?void 0:I.moduleName])||void 0===i?void 0:i.additionalValidations(null==k||null===(s=k.additionalValidation)||void 0===s?void 0:s.type,x,null==k||null===(u=k.additionalValidation)||void 0===u?void 0:u.keys):null;const O=V?{validate:V}:{};switch(e){case"date":case"text":case"number":case"password":case"time":return a().createElement(r.xI,{defaultValue:null==x?void 0:x[null==n?void 0:n.name],render:t=>{var l,o;let{onChange:r,ref:i,value:s}=t;return a().createElement(c.A,{value:null==x?void 0:x[null==n?void 0:n.name],type:e,name:null==n?void 0:n.name,onChange:r,inputRef:i,errorStyle:null==C?void 0:C[null==n?void 0:n.name],max:n.max,disabled:b,style:"date"===e?{paddingRight:"3px"}:"",maxlength:null==n||null===(l=n.validation)||void 0===l?void 0:l.maxlength,minlength:null==n||null===(o=n.validation)||void 0===o?void 0:o.minlength})},name:null==n?void 0:n.name,rules:{required:o,...n.validation,...O},control:w});case"textarea":return a().createElement(r.xI,{defaultValue:null==x?void 0:x[null==n?void 0:n.name],render:t=>{let{onChange:l,ref:o,value:r}=t;return a().createElement(d.A,{className:"field",value:null==x?void 0:x[null==n?void 0:n.name],type:e,name:null==n?void 0:n.name,onChange:l,inputRef:o,disabled:b,errorStyle:null==C?void 0:C[null==n?void 0:n.name]})},name:null==n?void 0:n.name,rules:{required:o,...n.validation},control:w});case"mobileNumber":return a().createElement(r.xI,{render:e=>a().createElement(p.A,S({inputRef:e.ref,className:"field fullWidth",onChange:e.onChange,value:e.value,disable:b},e,{errorStyle:null==C?void 0:C[null==n?void 0:n.name]})),defaultValue:n.defaultValue,name:null==n?void 0:n.name,rules:{required:o,...n.validation},control:w});case"multiupload":return a().createElement(r.xI,{name:"".concat(null==n?void 0:n.name),control:w,rules:{required:!1},render:e=>{let{onChange:t,ref:o,value:r=[]}=e;return a().createElement(f.A,{t:l,module:"works",tenantId:Digit.ULBService.getCurrentTenantId(),getFormState:function(e){const n=e.length;let l=[];n>0&&e.forEach((e=>{var t,n;l.push({fileName:null==e?void 0:e[0],fileStoreId:null==e||null===(t=e[1])||void 0===t||null===(t=t.fileStoreId)||void 0===t?void 0:t.fileStoreId,documentType:null==e||null===(n=e[1])||void 0===n||null===(n=n.file)||void 0===n?void 0:n.type})})),t(n>0?e:[])},showHintBelow:!(null==n||!n.showHintBelow),setuploadedstate:r,allowedFileTypesRegex:n.allowedFileTypes,allowedMaxSizeInMB:n.allowedMaxSizeInMB,hintText:n.hintText,maxFilesAllowed:n.maxFilesAllowed,extraStyleName:{padding:"0.5rem"},customClass:null==n?void 0:n.customClass})}});case"custom":return a().createElement(r.xI,{render:e=>n.component({...e,setValue:A},n.customProps),defaultValue:n.defaultValue,name:null==n?void 0:n.name,control:w});case"radio":case"dropdown":return a().createElement(r.xI,{render:t=>a().createElement(m.A,{t:l,label:null==k?void 0:k.label,type:e,onBlur:t.onBlur,value:t.value,inputRef:t.ref,onChange:t.onChange,config:n,disable:null==k?void 0:k.disable,errorStyle:null==C?void 0:C[null==n?void 0:n.name]}),rules:{required:o,...n.validation},defaultValue:null==x?void 0:x[null==n?void 0:n.name],name:null==n?void 0:n.name,control:w});case"multiselectdropdown":return a().createElement(r.xI,{name:"".concat(null==n?void 0:n.name),control:w,defaultValue:null==x?void 0:x[null==n?void 0:n.name],rules:{required:null==n?void 0:n.isMandatory},render:e=>a().createElement("div",{style:{display:"grid",gridAutoFlow:"row"}},a().createElement(g.A,{options:null==n?void 0:n.options,optionsKey:null==n?void 0:n.optionsKey,props:e,isPropsNeeded:!0,onSelect:t=>{e.onChange(null==t?void 0:t.map((e=>null!=e&&e[1]?e[1]:null)).filter((e=>e)))},selected:null==e?void 0:e.value,defaultLabel:l(null==n?void 0:n.defaultText),defaultUnit:l(null==n?void 0:n.selectedText),config:n}))});case"locationdropdown":return a().createElement(r.xI,{name:"".concat(null==n?void 0:n.name),control:w,defaultValue:null==x?void 0:x[null==n?void 0:n.name],rules:{required:null==n?void 0:n.isMandatory,...n.validation},render:e=>a().createElement("div",{style:{display:"grid",gridAutoFlow:"row",width:"100%"}},a().createElement(y.A,{props:e,populators:n,formData:x,inputRef:e.ref,errors:C,setValue:A}))});case"apidropdown":return a().createElement(r.xI,{name:"".concat(null==n?void 0:n.name),control:w,defaultValue:null==x?void 0:x[null==n?void 0:n.name],rules:{required:null==n?void 0:n.isMandatory,...n.validation},render:e=>a().createElement("div",{style:{display:"grid",gridAutoFlow:"row"}},a().createElement(E.A,{props:e,populators:n,formData:x,inputRef:e.ref,errors:C}))});case"workflowstatesfilter":return a().createElement(r.xI,{name:"".concat(null==n?void 0:n.name),control:w,defaultValue:null==x?void 0:x[null==n?void 0:n.name],rules:{required:null==n?void 0:n.isMandatory},render:e=>a().createElement("div",{style:{display:"grid",gridAutoFlow:"row"}},a().createElement(h.A,{inboxResponse:t,props:e,populators:n,t:l,formData:x}))});case"dateRange":return a().createElement(r.xI,{render:e=>{var t;return a().createElement(v.A,{t:l,values:null==x||null===(t=x[null==n?void 0:n.name])||void 0===t?void 0:t.range,name:null==n?void 0:n.name,onFilterChange:e.onChange,inputRef:e.ref,errorStyle:null==C?void 0:C[null==n?void 0:n.name]})},rules:{required:o,...n.validation},defaultValue:null==x?void 0:x[null==n?void 0:n.name],name:null==n?void 0:n.name,control:w});case"component":return a().createElement(r.xI,{render:e=>a().createElement(F,{userType:"employee",t:l,setValue:A,onSelect:A,config:k,data:x,formData:x,register:D,errors:C,props:e,setError:R,clearErrors:N,onBlur:e.onBlur,control:w,getValues:T,responseData:t}),name:null==k?void 0:k.key,control:w});default:return!1!==(null==n?void 0:n.dependency)?n:null}}(e.type,e.populators,e.isMandatory,null==e?void 0:e.disable,null==e?void 0:e.component,e),null!=e&&null!==(b=e.populators)&&void 0!==b&&b.name&&C&&C[null==e||null===(L=e.populators)||void 0===L?void 0:L.name]&&Object.keys(C[null==e||null===(k=e.populators)||void 0===k?void 0:k.name]).length?a().createElement(i.A,{style:{fontSize:"12px",marginTop:"-20px"}},l(null==e||null===(F=e.populators)||void 0===F?void 0:F.error)):null)})))}},ze8v:(e,t,n)=>{n.d(t,{A:()=>s});var l=n("C6rw"),a=n.n(l),o=n("OC9p"),r=n("YtJg"),i=n("hUmK");const s=e=>{let{props:t,t:n,populators:s,formData:u,inboxResponse:c}=e;const[d,m]=(0,l.useState)(null);return(0,l.useEffect)((()=>{var e;c&&m(null===(e=c.statusMap)||void 0===e?void 0:e.map((e=>({uuid:e.statusid,state:e.state||e.applicationstatus,businessService:null==e?void 0:e.businessservice}))))}),[c]),d||c?a().createElement(a().Fragment,null,d&&d.length>0&&(null==s?void 0:s.componentLabel)&&a().createElement(i.A,{style:{...t.labelStyle,marginBottom:"0.4rem"}},n(null==s?void 0:s.componentLabel),null!=s&&s.isMandatory?" * ":null),null==d?void 0:d.map((e=>{var l;return a().createElement(o.A,{onChange:e=>{const n={...t.value,[e.target.value]:e.target.checked};t.onChange(n)},value:e.uuid,checked:null==u||null===(l=u[s.name])||void 0===l?void 0:l[e.uuid],label:n(Digit.Utils.locale.getTransformedLocale("".concat(s.labelPrefix).concat(null==e?void 0:e.businessService,"_STATE_").concat(null==e?void 0:e.state)))})}))):a().createElement(r.a,null)}}},e=>(e.O(0,[729,286,82,657,53,184,916,472,849,497,758,874,489,716,376,260,895],(()=>e(e.s="bejV"))),e.O())])));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunk_egovernments_digit_ui_components=this.webpackChunk_egovernments_digit_ui_components||[]).push([[376],{"+G7B":(e,t,a)=>{a.d(t,{A:()=>d});var l=a("C6rw"),n=a.n(l),i=a("rTr4"),o=a("iTkH"),r=a("sqMA");const s=e=>{let{option:t,onSelect:a,isSelected:s,renderOptions:c,level:d=0,optionsKey:m}=e;const[u,p]=(0,l.useState)(!1),{t:g}=(0,o.Bd)(),h=r.J.lightTheme.text.primary;return n().createElement("div",{style:{marginLeft:"".concat(0!==d?22:0,"px"),borderLeft:"1px solid #D6D5D4"}},n().createElement("div",{className:"digit-tree-select-option ".concat(u?"expanded":""," ").concat(t.options?"parent":"child"," level-").concat(d),onClick:t.options?()=>{t.options&&p(!u)}:()=>{t.options||a(t)}},t.options&&n().createElement("div",{className:"digit-toggle-dropdown"},u?n().createElement(i.t.ArrowDropDown,{width:"1.5rem",height:"1.5rem",fill:h}):n().createElement(i.t.ArrowDropDown,{width:"1.5rem",height:"1.5rem",fill:h,style:{transform:"rotate(-90deg)"}})),n().createElement("div",{className:"digit-option-label"},g(t[m]))),u&&t.options&&t.options.length>0&&c({options:t.options,onSelect:a,isSelected:s,level:d+1}))},c=e=>{let{option:t,onSelect:a,isSelected:s,renderOptions:c,level:d=0,isParentSelected:m,setParentSelected:u,optionsKey:p}=e;const[g,h]=(0,l.useState)(!1),{t:v}=(0,o.Bd)();(0,l.useEffect)((()=>{u(s(t))}),[s,t,u]);const f=()=>{if(t.options){const e=b(t.options);if(s(t))a([t,...e]);else if(e.some((e=>s(e)))){const l=e.filter((e=>!s(e)));a([t,...l])}else a([t,...e])}else a([t])},b=e=>{let t=[];return e.forEach((e=>{e.options?(t.push(e),t=t.concat(b(e.options))):t.push(e)})),t},E=t.options&&t.options.every((e=>s(e))),y=()=>!!t.options&&(b(t.options).some((e=>s(e)))&&!E);(0,l.useEffect)((()=>{(E&&!s(t)||y()&&s(t))&&a([t])}),[E,s,y,t,a]);const x=r.J.lightTheme.text.primary,k=r.J.lightTheme.paper.primary,w=r.J.lightTheme.primary[1];return n().createElement("div",{style:{marginLeft:"".concat(0!==d?22:0,"px")},className:"container ".concat(0===d?"outerlevel":"innerlevel")},n().createElement("div",{className:"digit-tree-multiselect-option ".concat(g?"expanded":""," ").concat(t.options?"parent":"child"," ").concat(s(t)?"checked":""," ").concat(E?"all-child-selected":""," level-").concat(d),style:{gap:"".concat(0!==d?12:4,"px")},onClick:t.options?()=>{t.options&&h(!g)}:f},t.options&&n().createElement("div",{className:"digit-toggle-dropdown"},g?n().createElement(i.t.ArrowDropDown,{width:"1.5rem",height:"1.5rem",fill:m?x:E||s(t)?k:x}):n().createElement(i.t.ArrowDropDown,{width:"1.5rem",height:"1.5rem",fill:m?x:E||s(t)?k:x,style:{transform:"rotate(-90deg)"}})),n().createElement("div",{className:"digit-option-checkbox ".concat(y()?"intermediate":""," ").concat(E||s(t)?"checked":"")},n().createElement("input",{type:"checkbox",checked:E||s(t),onChange:f})),n().createElement("div",{className:"digit-custom-checkbox ".concat(E||s(t)?"checked":""," ").concat(y()?"intermediate":""),onClick:e=>{e.stopPropagation(),f()},style:{marginRight:"".concat(0==d?8:0,"px")}},y()?n().createElement("div",{className:"intermediate-state"}):n().createElement(i.t.Check,{fill:!E&&!s(t)||m?w:k})),n().createElement("div",{className:"digit-option-label"},v(t[p]))),g&&t.options&&t.options.length>0&&n().createElement("div",{className:"child-options-container"},c({options:t.options,onSelect:a,isSelected:s,level:d+1,isParentSelected:s(t),setParentSelected:u})))},d=e=>{let{options:t,onSelect:a,selectedOption:l,variant:i,optionsKey:o}=e;const r=e=>{let{options:t,onSelect:a,isSelected:l,level:d,isParentSelected:m,setParentSelected:u}=e;return t.map((e=>n().createElement("div",{key:e.id,className:"digit-tree-select-options-container ".concat(0===d?"first-level":"")},"treemultiselect"===i?n().createElement(c,{option:e,onSelect:a,isSelected:l,renderOptions:r,level:d,isParentSelected:m,setParentSelected:u,optionsKey:o}):n().createElement(s,{option:e,onSelect:a,isSelected:l,renderOptions:r,level:d,optionsKey:o}))))};return n().createElement("div",null,r({options:t,onSelect:a,isSelected:e=>"treemultiselect"===i?l&&l.some((t=>t.code===e.code)):l&&l.code===e.code,level:0,isParentSelected:!1,setParentSelected:()=>{}}))}},"2xqR":(e,t,a)=>{a.d(t,{A:()=>u});var l=a("C6rw"),n=a.n(l),i=a("17x9"),o=a.n(i),r=a("rTr4"),s=a("vA+l"),c=a("sqMA"),d=a("JTzt");const m=e=>{var t,i,o,m,u,p,g,h,v,f,b;const E=(0,d.W)(),[y,x]=(0,l.useState)("date"===(null==e?void 0:e.type)&&(null==e?void 0:e.value)),[k,w]=(0,l.useState)(!1),[C,N]=(0,l.useState)((null==e?void 0:e.type)||"text"),A=null!=e&&e.watch?{fromDate:null==e?void 0:e.watch("fromDate"),toDate:null==e?void 0:e.watch("toDate")}:{},S=t=>{const{value:a}=null==t?void 0:t.target;x(a),null==e||e.onChange(a)},T=()=>{var t;const a=(null==e||null===(t=e.populators)||void 0===t?void 0:t.prefix)||"";return"numeric"===(null==e?void 0:e.type)?n().createElement("button",{type:"button",onClick:()=>(()=>{const t=Math.max(Number(e.value)-(Number(null==e?void 0:e.step)?Number(null==e?void 0:e.step):1),0);e.onChange(t)})(),className:"digit-numeric-button-prefix",readOnly:e.nonEditable},"-"):a?n().createElement("button",{className:"digit-prefix",readOnly:e.nonEditable},a):null},F=()=>{var t,a;const l=(null==e||null===(t=e.populators)||void 0===t?void 0:t.suffix)||"";return"numeric"===(null==e?void 0:e.type)?n().createElement("button",{type:"button",onClick:()=>(()=>{const t=Number(e.value)+(Number(null==e?void 0:e.step)?Number(null==e?void 0:e.step):1);e.onChange(t)})(),className:"digit-numeric-button-suffix",readOnly:e.nonEditable},"+"):"text"!==(null==e?void 0:e.type)||null!=e&&null!==(a=e.populators)&&void 0!==a&&a.customIcon||!l?null:n().createElement("button",{className:"digit-suffix",readOnly:e.nonEditable},l)},D=()=>{w(!k),N(k?"password":"text"),e.onChange(null==e?void 0:e.value)},B=()=>{navigator.geolocation?navigator.geolocation.getCurrentPosition((t=>{const{latitude:a,longitude:l}=t.coords;e.onChange("".concat(a,", ").concat(l))}),(e=>{console.error("Error getting location:",e)})):console.error("Geolocation is not supported")},I=c.J.lightTheme.generic.divider,R=c.J.lightTheme.generic.inputBorder,P=(()=>{const t=null==e?void 0:e.type,l=null!=e&&e.iconFill?null==e?void 0:e.iconFill:null!=e&&e.disabled?I:null!=e&&e.nonEditable?"#b1b4b6":R;if(t){if("geolocation"===t)return n().createElement(r.t.MyLocation,{fill:l,onClick:null!=e&&e.onIconSelection?null==e?void 0:e.onIconSelection:B,className:" digit-text-input-customIcon ".concat(e.disabled?"disabled":""," ").concat(e.nonEditable?"nonEditable":"")});if("password"===t&&"text"===C&&k)return n().createElement(r.t.VisibilityOff,{fill:l,onClick:D,className:" digit-text-input-customIcon ".concat(e.disabled?"disabled":""," ").concat(e.nonEditable?"nonEditable":"")});if("password"===t)return n().createElement(r.t.Visibility,{fill:l,onClick:D,className:" digit-text-input-customIcon ".concat(e.disabled?"disabled":""," ").concat(e.nonEditable?"nonEditable":"")});if("search"===t)return n().createElement(r.t.Search,{fill:l,onClick:null==e?void 0:e.onIconSelection,className:" digit-text-input-customIcon ".concat(e.disabled?"disabled":""," ").concat(e.nonEditable?"nonEditable":"")});try{var i;const t=a("A8bQ"),n="text"===(null==e?void 0:e.type)&&(null==t?void 0:t[null==e||null===(i=e.populators)||void 0===i?void 0:i.customIcon]);return n?n({width:"1.5rem",height:"1.5rem",fill:l,className:"digit-text-input-customIcon ".concat(e.disabled?"disabled":""," ").concat(e.nonEditable?"nonEditable":"")}):(console.log("Icon not found"),null)}catch(e){return console.error("Icon not found"),null}}return null})(),L="".concat(E?"digit-employeeCard-inputError":"digit-card-inputError"," ").concat(e.disabled?"disabled":""," ").concat(e.customClass||""," ").concat(e.nonEditable?"noneditable":""," ").concat("numeric"===e.type?"numeric":""),_="".concat(E?"digit-employeeCard-input":"digit-citizenCard-input"," ").concat(e.disabled?"disabled":""," focus-visible ").concat(e.errorStyle?"digit-employeeCard-inputError":""," ").concat(e.nonEditable?"noneditable":""," ").concat("numeric"===e.type?"numeric":""),O="password"===e.type&&"text"===C?"passwordToText":e.type,V="input-container ".concat(O||""," ").concat(null!==(t=e.populators)&&void 0!==t&&t.customIcon?"withIcon":"");return n().createElement(n().Fragment,null,n().createElement("div",{className:"digit-text-input-field ".concat("employee"===E?"":"digit-text-input-field-width"," ").concat(null!=e&&e.className?null==e?void 0:e.className:""," ").concat(e.disabled?"disabled":""," ").concat(e.nonEditable?"noneditable":""," ").concat(e.error?"error":""," ").concat(O||""," ").concat(null!=e&&null!==(i=e.populators)&&void 0!==i&&i.disableTextField?"numeric-buttons-only":""," ").concat(null!=e&&null!==(o=e.populators)&&void 0!==o&&o.prefix?"prefix":""," ").concat(null!=e&&null!==(m=e.populators)&&void 0!==m&&m.suffix?"suffix":""," "),style:null!=e&&e.textInputStyle?{...e.textInputStyle}:{}},e.required?n().createElement("div",{className:V},T(),n().createElement("input",{type:null!=e&&e.validation&&e.ValidationRequired?null==e||null===(u=e.validation)||void 0===u?void 0:u.type:O||"text",name:e.name,id:e.id,className:L,placeholder:(0,s.A)("TOSENTENCECASE",e.placeholder),onChange:t=>{"number"===(null==e?void 0:e.type)&&null!=e&&e.maxlength&&t.target.value.length>(null==e?void 0:e.maxlength)&&(t.target.value=t.target.value.slice(0,-1)),"numeric"===(null==e?void 0:e.type)&&(t.target.value=t.target.value.replace(/[^0-9]/g,"")),null!=e&&e.onChange&&(null==e||e.onChange(t)),"date"===e.type&&S(t)},ref:e.inputRef,value:null==e?void 0:e.value,style:{...e.style},defaultValue:e.defaultValue,minLength:e.minlength,maxLength:e.maxlength,max:e.max,pattern:null!=e&&e.validation&&e.ValidationRequired?null==e||null===(p=e.validation)||void 0===p?void 0:p.pattern:e.pattern,min:e.min,readOnly:e.nonEditable,title:null!=e&&e.validation&&e.ValidationRequired?null==e||null===(g=e.validation)||void 0===g?void 0:g.title:e.title,step:e.step,autoFocus:e.autoFocus,onBlur:e.onBlur,autoComplete:"off",disabled:e.disabled,onFocus:null==e?void 0:e.onFocus,nonEditable:e.nonEditable,config:e.config,populators:e.populators,onClick:t=>{if("date"===e.type||"time"===e.type)try{t.target.showPicker()}catch(e){console.error("Error opening picker:",e)}}}),F(),e.signature&&e.signatureImg,P&&n().createElement("span",{className:"digit-cursor-pointer",onClick:null==e?void 0:e.onIconSelection},P)):n().createElement("div",{className:V},T(),n().createElement("input",{type:null!=e&&e.validation&&e.ValidationRequired?null==e||null===(h=e.validation)||void 0===h?void 0:h.type:O||"text",name:e.name,id:e.id,className:_,placeholder:(0,s.A)("TOSENTENCECASE",e.placeholder),onChange:t=>{"number"===(null==e?void 0:e.type)&&null!=e&&e.maxlength&&t.target.value.length>(null==e?void 0:e.maxlength)&&(t.target.value=t.target.value.slice(0,-1)),"numeric"===(null==e?void 0:e.type)&&(t.target.value=t.target.value.replace(/[^0-9]/g,"")),null!=e&&e.onChange&&(null==e||e.onChange(t)),"date"===e.type&&S(t)},ref:e.inputRef,value:null==e?void 0:e.value,style:{...e.style},defaultValue:e.defaultValue,minLength:e.minlength,maxLength:e.maxlength,max:e.max,required:null!=e&&e.validation&&e.ValidationRequired?null==e||null===(v=e.validation)||void 0===v?void 0:v.isRequired:e.isRequired||"date"===e.type&&("fromDate"===e.name?A.toDate:A.fromDate),pattern:null!=e&&e.validation&&e.ValidationRequired?null==e||null===(f=e.validation)||void 0===f?void 0:f.pattern:e.pattern,min:e.min,readOnly:e.nonEditable,title:null!=e&&e.validation&&e.ValidationRequired?null==e||null===(b=e.validation)||void 0===b?void 0:b.title:e.title,step:e.step,autoFocus:e.autoFocus,onBlur:e.onBlur,onKeyPress:e.onKeyPress,autoComplete:"off",disabled:e.disabled,onFocus:null==e?void 0:e.onFocus,nonEditable:e.nonEditable,config:e.config,populators:e.populators,onClick:t=>{if("date"===e.type||"time"===e.type)try{t.target.showPicker()}catch(e){console.error("Error opening picker:",e)}}}),F(),e.signature&&e.signatureImg,P&&n().createElement("span",{className:"digit-cursor-pointer",onClick:null==e?void 0:e.onIconSelection},P))))};m.propTypes={userType:o().string,required:o().bool,name:o().string.isRequired,placeholder:o().string,onChange:o().func,inputRef:o().oneOfType([o().func,o().shape({current:o().instanceOf(Element)})]),value:o().any,className:o().string,style:o().object,maxLength:o().number,minlength:o().number,max:o().number,pattern:o().string,min:o().number,disabled:o().bool,nonEditable:o().bool,errorStyle:o().bool,hideSpan:o().bool,title:o().string,step:o().string,autoFocus:o().bool,onBlur:o().func,onKeyPress:o().func,textInputStyle:o().object,defaultValue:o().any,customClass:o().string,signature:o().bool,signatureImg:o().node,onIconSelection:o().func,type:o().string,watch:o().func,onFocus:o().func,charCount:o().bool,errors:o().object,config:o().object,error:o().string},m.defaultProps={required:!1,charCount:!1};const u=m},"4tWr":(e,t,a)=>{a.d(t,{A:()=>d});var l=a("C6rw"),n=a.n(l),i=a("17x9"),o=a.n(i),r=a("iTkH"),s=a("vA+l");const c=e=>{var t;const{t:a}=(0,r.Bd)();var l=e.selectedOption?e.selectedOption:e.options.length>0?e.options[0].code:null;const i=Math.max(...e.options.map((t=>a(t[e.optionsKey]).length))),o=Math.min(200,14.9*i),c=o<40?"40":o;return n().createElement("div",{style:null==e?void 0:e.style,className:"digit-toggle-toolbar ".concat(null!=e&&e.additionalWrapperClass?null==e?void 0:e.additionalWrapperClass:"")},null==e||null===(t=e.options)||void 0===t?void 0:t.map(((t,i)=>n().createElement("div",{style:{width:"".concat(c,"px"),maxWidth:"".concat(100/e.options.length,"%")},className:"toggle-option-container ".concat(null!=e&&e.disabled?"disabled":""),key:i},n().createElement("label",{style:{width:"".concat(c,"px")},className:"digit-toggle-btn-wrap ".concat(l===t.code?"checked":"")},n().createElement("input",{className:"digit-toggle-input",type:"radio",name:e.name,value:t.code,checked:l===t.code,onChange:()=>function(t){e.onSelect(t)}(t.code),disabled:null==e?void 0:e.disabled,ref:e.inputRef}),n().createElement("span",{className:"digit-toggle-label"},a((0,s.A)("CAPITALIZEFIRSTLETTER",t[e.optionsKey]))))))))};c.propTypes={selectedOption:o().any,onSelect:o().func,options:o().any,optionsKey:o().string,additionalWrapperClass:o().string,disabled:o().bool,inputRef:o().object},c.defaultProps={};const d=c},CefG:e=>{e.exports=JSON.parse('{"nm":"ckeck","ddd":0,"h":50,"w":50,"meta":{"g":"@lottiefiles/toolkit-js 0.33.2"},"layers":[{"ty":4,"nm":"! Outlines","sr":1,"st":0,"op":213,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[2,12,0],"ix":1},"s":{"a":1,"k":[{"o":{"x":0.653,"y":-0.834},"i":{"x":0.667,"y":1},"s":[100,100,100],"t":60},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[115,115,100],"t":73},{"o":{"x":0.333,"y":0},"i":{"x":0.127,"y":1.695},"s":[115,115,100],"t":83},{"s":[100,100,100],"t":90}],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[25,25,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 1","ix":1,"cix":2,"np":4,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,1.104],[-1.104,0],[0,-1.104],[1.104,0]],"o":[[0,-1.104],[1.104,0],[0,1.104],[-1.104,0]],"v":[[-2,10],[0,8],[2,10],[0,12]]},"ix":2}},{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 2","ix":2,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-1.036,5],[-2,-6.625],[-2,-12],[2,-12],[2,-6.625],[1.052,5]]},"ix":2}},{"ty":"mm","bm":0,"hd":false,"mn":"ADBE Vector Filter - Merge","nm":"Merge Paths 1","mm":1},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,1,1],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}},{"ty":"tr","a":{"a":0,"k":[0.099,9.982],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[2.099,21.982],"ix":2},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":10},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[5],"t":12},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[-5],"t":14},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[5],"t":16},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[-5],"t":18},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[5],"t":20},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[-5],"t":22},{"s":[0],"t":24}],"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":1},{"ty":4,"nm":"Shape Layer 1","sr":1,"st":0,"op":193,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,10,0],"ix":1},"s":{"a":1,"k":[{"o":{"x":0.41,"y":-0.602},"i":{"x":0.667,"y":1},"s":[100,100,100],"t":60},{"o":{"x":0.333,"y":0},"i":{"x":0.436,"y":1.492},"s":[115,115,100],"t":83},{"s":[100,100,100],"t":90}],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[25,35,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,0],"ix":3},"s":{"a":0,"k":[40,40],"ix":2}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"c":{"a":0,"k":[1,1,1],"ix":3}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"tm","bm":0,"hd":false,"mn":"ADBE Vector Filter - Trim","nm":"Trim Paths 1","ix":2,"e":{"a":0,"k":100,"ix":2},"o":{"a":0,"k":0,"ix":3},"s":{"a":0,"k":0,"ix":1},"m":1}],"ind":2}],"v":"5.6.5","fr":60,"op":180,"ip":0,"assets":[]}')},Dk85:(e,t,a)=>{a.d(t,{A:()=>o});var l=a("C6rw"),n=a.n(l);const i=()=>{},o=e=>{let{className:t="table",t:a,data:l,columns:o,getCellProps:r,currentPage:s=0,pageSizeLimit:c=10,disableSort:d=!0,autoSort:m=!1,initSortId:u="",onSearch:p=!1,manualPagination:g=!0,totalRecords:h,onNextPage:v,onPrevPage:f,globalSearch:b,onSort:E=i,onPageSizeChange:y,onLastPage:x,onFirstPage:k,isPaginationRequired:w=!0,sortParams:C=[],showAutoSerialNo:N=!1,customTableWrapperClassName:A="",styles:S={},tableTopComponent:T,tableRef:F,isReportTable:D=!1,showCheckBox:B=!1,actionLabel:I="CS_COMMON_DOWNLOAD",tableSelectionHandler:R=()=>{}}=e;return n().createElement(n().Fragment,null,"to be aaded later")}},F94A:e=>{e.exports=JSON.parse('{"nm":"sucess","ddd":0,"h":120,"w":120,"meta":{"g":"LottieFiles AE 0.1.21"},"layers":[{"ty":3,"nm":"scale up null","sr":1,"st":0,"op":300.00001221925,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0},"i":{"x":0.833,"y":1},"s":[111,111,100],"t":27},{"o":{"x":0.167,"y":0},"i":{"x":0.833,"y":1},"s":[101,101,100],"t":36},{"s":[121,121,100],"t":42.0000017106951}],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[60,60,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":0,"ix":11}},"ef":[],"ind":1},{"ty":4,"nm":"spark","sr":1,"st":35.0000014255792,"op":335.00001364483,"ip":35.0000014255792,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[0,0.5,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Rectangle 1","ix":1,"cix":2,"np":3,"it":[{"ty":"rc","bm":0,"hd":false,"mn":"ADBE Vector Shape - Rect","nm":"Rectangle Path 1","d":1,"p":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0,-21],"t":35,"ti":[0,1.5],"to":[0,-1.5]},{"s":[0,-30],"t":53.0000021587343}],"ix":3},"r":{"a":0,"k":0,"ix":4},"s":{"a":1,"k":[{"o":{"x":0.976,"y":0},"i":{"x":0.667,"y":1},"s":[2,0],"t":35},{"o":{"x":0.33299999999999996,"y":0},"i":{"x":0.15355432054499818,"y":0.9999999999999999},"s":[2,8],"t":42},{"s":[1.633,0],"t":53.0000021587343}],"ix":2}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.9804,0.9804,0.9804],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,-8],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"rp","bm":0,"hd":false,"mn":"ADBE Vector Filter - Repeater","nm":"Repeater 1","ix":2,"m":1,"c":{"a":0,"k":8,"ix":1},"o":{"a":0,"k":0,"ix":2},"tr":{"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":45,"ix":4},"sa":{"a":0,"k":0},"so":{"a":0,"k":100,"ix":5},"eo":{"a":0,"k":100,"ix":6}}}],"ind":2,"parent":1},{"ty":4,"nm":"check","sr":1,"st":10.0000004073083,"op":310.000012626559,"ip":22.0000008960784,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[0,0,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":false,"i":[[0,0],[0,0],[3.5,3.75],[-12.973,5.349],[-6.124,-9.992],[12.125,-7.431],[7.431,12.125]],"o":[[0,0],[0,0],[-3.5,-3.75],[10.764,-2.941],[7.431,12.125],[-12.125,7.431],[-7.431,-12.125]],"v":[[15.25,-9.688],[-5.75,10.062],[-16,0.25],[-6.777,-24.849],[21.955,-13.456],[13.456,21.955],[-21.955,13.456]]},"ix":2}},{"ty":"tm","bm":0,"hd":false,"mn":"ADBE Vector Filter - Trim","nm":"Trim Paths 1","ix":2,"e":{"a":1,"k":[{"o":{"x":0.714,"y":0},"i":{"x":0.351,"y":1},"s":[100],"t":10},{"s":[23],"t":40.0000016292334}],"ix":2},"o":{"a":0,"k":0,"ix":3},"s":{"a":1,"k":[{"o":{"x":0.742,"y":0},"i":{"x":0.363,"y":1},"s":[100],"t":17},{"s":[0],"t":45.0000018328876}],"ix":1},"m":1},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"c":{"a":0,"k":[0.9804,0.9804,0.9804],"ix":3}}],"ind":3,"parent":1},{"ty":4,"nm":"circle","sr":1,"st":0,"op":300.00001221925,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[0,0,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[-14.221,0],[0,-14.221],[14.221,0],[0,14.221]],"o":[[14.221,0],[0,14.221],[-14.221,0],[0,-14.221]],"v":[[0,-25.75],[25.75,0],[0,25.75],[-25.75,0]]},"ix":2}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"c":{"a":0,"k":[0.9804,0.9804,0.9804],"ix":3}},{"ty":"tm","bm":0,"hd":false,"mn":"ADBE Vector Filter - Trim","nm":"Trim Paths 1","ix":3,"e":{"a":1,"k":[{"o":{"x":0.714,"y":0},"i":{"x":0.351,"y":1},"s":[100],"t":0},{"s":[100],"t":30.0000012219251}],"ix":2},"o":{"a":0,"k":0,"ix":3},"s":{"a":1,"k":[{"o":{"x":0.742,"y":0},"i":{"x":0.363,"y":1},"s":[100],"t":7},{"s":[0],"t":33.0000013441176}],"ix":1},"m":1}],"ind":4,"parent":1}],"v":"5.5.7","fr":29.9700012207031,"op":60.0000024438501,"ip":0,"assets":[]}')},GXvQ:(e,t,a)=>{a.d(t,{A:()=>p});var l=a("C6rw"),n=a.n(l),i=a("17x9"),o=a.n(i),r=a("46qi"),s=a("iTkH"),c=a("NPaP"),d=a("JBBT"),m=a("JTzt");const u=e=>{var t,a,i;const{t:o}=(0,s.Bd)(),u=(0,l.useRef)(),[p,g]=(0,l.useState)(!1),[h,v]=(0,l.useState)(null),f=(0,m.W)();e.uploadMessage&&u.current.value&&(u.current.value="",e.onDelete(),g(!1)),(0,l.useEffect)((()=>{u.current.files.length<=0&&null!==h&&(u.current.value="",e.onDelete())}),[null==u||null===(t=u.current)||void 0===t?void 0:t.files]),(0,l.useEffect)((()=>{u.current.files[0]?(g(!0),v(u.current.files[0])):g(!1)}),[e.message]);const b=(null==e?void 0:e.showHint)||!1;return n().createElement(l.Fragment,null,b&&n().createElement("p",{className:"digit-cell-text"},o(null==e?void 0:e.hintText)),n().createElement("div",{className:"digit-upload-file ".concat(null!=e&&e.customClass?null==e?void 0:e.customClass:""," ").concat("employee"===f?"":"digit-upload-file-max-width"," ").concat(e.disabled?" disabled":""),style:null==e?void 0:e.style},n().createElement("div",{className:"digit-upload-file-button-wrap"},n().createElement(r.A,{theme:"border",label:o("CS_COMMON_CHOOSE_FILE"),style:{...null!=e&&e.extraStyles?null==e||null===(a=e.extraStyles)||void 0===a?void 0:a.buttonStyles:{},...null!=e&&e.enableButton?{}:{opacity:.5}},textStyles:null==e?void 0:e.textStyles,type:e.buttonType}),null==e||null===(i=e.uploadedFiles)||void 0===i?void 0:i.map(((t,a)=>{const l=t[1];return n().createElement("div",{className:"digit-tag-container"},n().createElement(c.A,{key:a,text:t[0].length>64?"".concat(t[0].slice(0,64)," ..."):t[0],onClick:t=>null==e?void 0:e.removeTargetedFile(l,t)}))})),0===(null==e?void 0:e.uploadedFiles.length)&&n().createElement("h2",{className:"digit-file-upload-status"},e.message)),n().createElement("input",{className:e.disabled?"disabled":"digit-input-mirror-selector-button",ref:u,type:"file",id:e.id||"document-".concat(Math.floor(139*(Math.random()||1))),name:"file",multiple:e.multiple,accept:e.accept,disabled:e.disabled,onChange:t=>e.onUpload(t),onClick:t=>{if(null!=e&&e.enableButton){const{target:e={}}=t||{};e.value=""}else t.preventDefault()}})),e.iserror&&n().createElement(d.A,{message:e.iserror}),(null==e?void 0:e.showHintBelow)&&n().createElement("p",{className:"digit-cell-text"},o(null==e?void 0:e.hintText)))};u.propTypes={hintText:o().string,customClass:o().string,uploadedFiles:o().arrayOf(o().arrayOf(o().oneOfType([o().string,o().object]))),enableButton:o().bool,showHint:o().bool,buttonType:o().string,onUpload:o().func.isRequired,removeTargetedFile:o().func.isRequired,onDelete:o().func,iserror:o().string,showHintBelow:o().bool,message:o().string,disabled:o().bool,inputStyles:o().object,multiple:o().bool,accept:o().string,id:o().string};const p=u},"IBj/":(e,t,a)=>{a.d(t,{A:()=>c});var l=a("C6rw"),n=a.n(l),i=a("17x9"),o=a.n(i);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},r.apply(null,arguments)}const s=(0,l.forwardRef)(((e,t)=>n().createElement("button",r({ref:t,disabled:!!e.disabled,className:"".concat(e.disabled?"digit-submit-bar-disabled":"digit-submit-bar"," ").concat(e.className?e.className:""),type:e.submit?"submit":"button",style:{...e.style},onClick:e.onSubmit},e.form?{form:e.form}:{}),n().createElement("h2",null,e.label))));s.propTypes={submit:o().any,style:o().object,label:o().string,onSubmit:o().func},s.defaultProps={};const c=s},JpEE:(e,t,a)=>{a.d(t,{A:()=>s});var l=a("C6rw"),n=a.n(l),i=a("17x9"),o=a.n(i);const r=e=>{let{tooltipRef:t,title:a,placement:l,arrow:i,style:o,className:r}=e;return n().createElement("div",{className:"tooltip-content tooltip-".concat(l," ").concat(i?"with-arrow":""," ").concat(r||""),style:o,ref:t},a)};r.propTypes={title:o().node.isRequired,placement:o().oneOf(["bottom","bottom-end","bottom-start","left","right","top","top-end","top-start","left-end","left-start","right-end","right-start"]),arrow:o().bool,style:o().object,className:o().string},r.defaultProps={arrow:!0,placement:"bottom"};const s=r},QZag:(e,t,a)=>{a.d(t,{E76:()=>l.A,ukx:()=>n.A,J08:()=>i.A,X55:()=>je.A,RT:()=>o.A,EGL:()=>r.A,lZ$:()=>s.A,MtN:()=>c.A,YZx:()=>d.A,Mig:()=>m.A,$nd:()=>u.A,kj0:()=>we.A,tKv:()=>Je.A,ZpM:()=>p.A,Yls:()=>g.A,F15:()=>h.A,aRn:()=>v.A,BhC:()=>f.A,vis:()=>b.A,c5N:()=>E.A,oVT:()=>y.A,vu3:()=>ie.A,Eg2:()=>x.A,NnP:()=>I.A,z6M:()=>R.A,wGv:()=>P.w,lrV:()=>L.A,ElJ:()=>_.A,cGx:()=>We.A,msM:()=>O.A,tHk:()=>Me.A,Kw:()=>V.A,wi6:()=>M.A,UN$:()=>He.A,Y9Y:()=>G.A,H9C:()=>$.A,ki5:()=>U.A,k3S:()=>Ce.A,H7b:()=>Ie.A,nOu:()=>j.A,g$h:()=>z.A,uMU:()=>q.A,Vf9:()=>J.A,Tb7:()=>Ae.A,aHM:()=>W.a,aVp:()=>H.a,W1t:()=>Qe.A,Kf8:()=>K.A,RaE:()=>tt.A,Xaf:()=>Z.A,cFu:()=>Y.A,wEt:()=>Q.A,R16:()=>fe.A,QIW:()=>Ue.A,fzL:()=>X.A,Bsq:()=>ee.A,HHF:()=>te.A,nPp:()=>ae.n,h2k:()=>le.A,GWJ:()=>ne.A,ot$:()=>Se.A,t4N:()=>oe.t,Syu:()=>Ne.A,JFf:()=>it,Bx2:()=>et,C1Z:()=>De,GOG:()=>Te.A,Wfh:()=>ke.A,vwO:()=>rt,lxK:()=>de,GiU:()=>B,fs1:()=>me.A,VJf:()=>$e,ksK:()=>ue.A,Kfn:()=>Be,y8:()=>pe.A,lMk:()=>be.A,jF7:()=>ye,m_M:()=>at.A,Vsm:()=>Ye,f7I:()=>xe.A,EO4:()=>ge.A,tuV:()=>Le,_Lt:()=>Pe,d9b:()=>Ve,ks9:()=>qe,Uh:()=>ve});var l=a("otB8"),n=a("J7Zr"),i=a("VNYc"),o=a("byjZ"),r=a("jiIG"),s=a("mCr/"),c=a("dM11"),d=a("WsID"),m=a("U9Ix"),u=a("Lfsa"),p=a("naAG"),g=a("1Woi"),h=a("Zc5N"),v=a("wPoe"),f=a("hUmK"),b=a("3RlE"),E=a("ESrU"),y=a("OC9p"),x=a("CoJs"),k=a("C6rw"),w=a.n(k);const C=w().createContext(),N={count:0};function A(e,t){switch(t.type){case"increment":return{count:e.count+1};case"decrement":return{count:e.count-1};default:throw new Error}}function S(){const e=(0,k.useContext)(C);return w().createElement("div",null,"Context Value: ",e)}function T(){const[e,t]=(0,k.useState)(0);(0,k.useEffect)((()=>(console.log("Component mounted or stateValue changed"),()=>{console.log("Cleanup on unmount or before stateValue changes")})),[e]);const[a,l]=(0,k.useReducer)(A,N),n=(0,k.useRef)(null);return w().createElement(C.Provider,{value:"Hello, Context!"},w().createElement("div",null,w().createElement("h1",null,"React Hooks Example"),w().createElement("p",null,"useState value: ",e),w().createElement("button",{onClick:()=>{t(e+1),l({type:"increment"}),n.current&&n.current.focus()}},"Increment"),w().createElement("p",null,"useReducer count: ",a.count),w().createElement("button",{onClick:()=>l({type:"decrement"})},"Decrement"),w().createElement("input",{ref:n,placeholder:"useRef example"}),w().createElement(S,null)))}var F=a("A8bQ");const D=()=>w().createElement("div",null,"SVG Test",w().createElement(F.NoResultsFoundIcon,null),w().createElement(F.StarFilled,null),w().createElement(F.StarEmpty,null)),B=(e,t)=>w().createElement("div",null,"Test Component",w().createElement(T,null),w().createElement(D,null));var I=a("xVzt"),R=a("WcZ2"),P=a("f/FR"),L=a("aoQ2"),_=a("fFP3"),O=a("gSsx"),V=a("JBBT"),M=a("ijgH"),G=a("GV5m"),$=a("Ttil"),U=a("bNHr"),j=a("M8Ts"),z=a("lsq2"),q=a("5zo3"),J=a("Crro"),W=a("YtJg"),H=a("UC3M"),K=a("3uk+"),Z=a("1wiX"),Y=a("EeRl"),Q=a("YjXS"),X=a("Y4Vi"),ee=a("hQ+M"),te=a("X572"),ae=a("7YUq"),le=a("CnBu"),ne=a("n7fr"),ie=a("NPaP"),oe=a("rTr4"),re=a("17x9"),se=a.n(re);const ce=e=>w().createElement(w().Fragment,null,null==e?void 0:e.text,w().createElement("div",{className:"digit-telephone ".concat(null!=e&&e.className?null==e?void 0:e.className:""),style:null==e?void 0:e.style},w().createElement("div",{className:"digit-call"},w().createElement(oe.t.Phone,null),w().createElement("a",{href:"digit-tel:".concat(null==e?void 0:e.mobile)},"+91"," ",null==e?void 0:e.mobile))));ce.propTypes={text:se().string,mobile:se().string.isRequired,className:se().string,style:se().object};const de=ce;var me=a("V9qA"),ue=a("2xqR"),pe=a("zgF6"),ge=a("GXvQ"),he=a("iTkH");const ve=e=>{let{header:t,actions:a,eventNotificationText:l,timePastAfterEventCreation:n,timeApproxiamationInUnits:i}=e;const{t:o}=(0,he.Bd)();return w().createElement("div",{className:"WhatsNewCard"},w().createElement("h2",null,o(t)),w().createElement("p",null,l),null==a?void 0:a.map((e=>{return w().createElement("a",{href:null==e?void 0:e.actionUrl},"".concat(o("CS_COMMON_".concat("number"==typeof(t=null==e?void 0:e.code)?t:t&&t.toUpperCase().replace(/[.:-\s\/]/g,"_")))));var t})),w().createElement("p",null,n+" ".concat(o(i))))};var fe=a("sJ5t"),be=a("4tWr");const Ee=e=>{let{value:t,onChange:a,label:l,name:n,ref:i,style:o,disabled:r,...s}=e;return w().createElement("div",{style:o},w().createElement("input",{checked:t,onChange:a,className:"react-switch-checkbox",id:n,type:"checkbox",readOnly:s.readonly,disabled:r}),w().createElement("label",{className:"react-switch-label",htmlFor:n},w().createElement("span",{className:"react-switch-button"})))};Ee.propTypes={value:se().bool,name:se().string,onChange:se().func,ref:se().func},Ee.defaultProps={};const ye=Ee;var xe=a("+G7B"),ke=a("IBj/"),we=a("46qi"),Ce=a("vDwf"),Ne=a("xbiS"),Ae=a("9/5d"),Se=a("EkNG"),Te=a("vA+l"),Fe=a("sqMA");const De=e=>{let{currentStep:t=1,onStepClick:a,totalSteps:l,customSteps:n,direction:i,style:o,props:r,className:s,activeSteps:c}=e;const{t:d}=(0,he.Bd)(),[m,u]=(0,k.useState)(window.innerWidth/window.innerHeight<=9/16),p=()=>{window.innerWidth/window.innerHeight<=9/16?m||u(!0):m&&u(!1)};(0,k.useEffect)((()=>(window.addEventListener("resize",(()=>{p()})),()=>{window.addEventListener("resize",(()=>{p()}))}))),(0,k.useEffect)((()=>{}),[c]);const g=Fe.J.lightTheme.paper.primary,h=((e,t)=>t&&0!==Object.keys(t).length?Object.values(t):Array.from({length:e},((e,t)=>"Step ".concat(t+1))))(l,n);return w().createElement("div",{className:"digit-stepper-container ".concat(i||""," ").concat(s||""),style:o||null},h.map(((e,l,n)=>w().createElement("div",{className:"digit-stepper-checkpoint ".concat(i||""),style:{cursor:"pointer"},key:l,onClick:()=>{t=l,a(l)}},w().createElement("div",{className:"digit-stepper-content ".concat(i||"")},w().createElement("span",{className:"stepper-circle ".concat((l<=t-1||l<c)&&"active")},l<t-1||l<c?w().createElement(oe.t.Check,{width:m?"18px":"24px",height:m?"18px":"24px",fill:g}):l+1),w().createElement("span",{className:"stepper-label ".concat((l<t-1||l<c)&&"completed"," ").concat(t-1===l&&"current"," ").concat(i||""),style:{...null==r?void 0:r.labelStyles}},d((0,Te.A)("TRUNCATESTRING",e,{maxLength:64})))),l<n.length-1&&w().createElement("span",{className:"stepper-connect ".concat((l<t-1||l<c&&l<c-1)&&"active"," ").concat(i||"")})))))},Be=e=>{let{label:t,subElements:a,variant:l,viewDetailsLabel:n,hideDetailsLabel:i,additionalElements:o,inline:r,individualElementStyles:s,showConnector:c,className:d,isLastStep:m,isNextActiveStep:p,showDefaultValueForDate:g,isError:h}=e;const[v,f]=(0,k.useState)(!1),[b,E]=w().useState(window.innerWidth/window.innerHeight<=9/16),y=()=>{window.innerWidth/window.innerHeight<=9/16?b||E(!0):b&&E(!1)};w().useEffect((()=>(window.addEventListener("resize",(()=>{y()})),()=>{window.addEventListener("resize",(()=>{y()}))})));const x=o&&o.length>0,C=h?"Failed!":"inprogress"===l?"Inprogress":"upcoming"===l?"Upcoming":"completed"===l?"Completed":"",N=Fe.J.lightTheme.paper.primary;return w().createElement("div",{className:"digit-timeline-item ".concat(d||""," ").concat(l," ").concat(h?"error":"")},w().createElement("div",{className:"timeline-circle ".concat(l," ").concat(h?"error":"")},"completed"===l&&!h&&w().createElement("div",{className:"check-icon"},w().createElement(oe.t.Check,{width:b?"18px":"24px",height:b?"18px":"24px",fill:N})),h&&w().createElement("div",{className:"check-icon"},w().createElement(oe.t.Info,{width:b?"18px":"24px",height:b?"18px":"24px",fill:N,style:{transform:"rotate(-180deg)"}}))),c&&!m&&w().createElement("div",{className:"connector-line ".concat(l||""," ").concat(p?"nextActiveStep":"")}),w().createElement("div",{className:"timeline-content ".concat(m?"lastTimeline":"")},w().createElement("div",{className:"timeline-info"},w().createElement("div",{className:"timeline-label ".concat(l)},t?(0,Te.A)("CAPITALIZEFIRSTLETTER",t):C),a&&a.length>0&&w().createElement("div",{className:"timeline-subelements"},a.map(((e,t)=>w().createElement("div",{className:"timeline-date",key:t},e)))),g&&w().createElement("div",{className:"timeline-date"},h?"Incomplete":"date"),w().createElement("div",{className:"timeline-divider"})),x&&v&&w().createElement("div",{className:r?"timeline-additional-elements-inline":"timeline-additional-elements-column"},o.map(((e,t)=>w().createElement("div",{className:"timeline-individual-element",key:t,style:s},e)))),x&&w().createElement("div",{className:"timeline-toggle-details",onClick:()=>{f(!v)}},w().createElement(u.A,{label:v?i?(0,Te.A)("CAPITALIZEFIRSTLETTER",i):"Hide Details":n?(0,Te.A)("CAPITALIZEFIRSTLETTER",n):"View Details",variation:"link",icon:v?"ArrowDropUp":"ArrowDropDown",size:"medium",isSuffix:!0,style:{paddingLeft:"unset"}}))))};var Ie=a("tZT/"),Re=a("ueKo");const Pe=e=>{let{onSubmit:t,fileData:a,onFileDelete:l,errors:n,additionalElements:i,multiple:o,handleFileClick:r,showErrorCard:s,iserror:c,showDownloadButton:d,showReUploadButton:m,fileTypes:p}=e;const{t:g}=(0,he.Bd)(),[h,v]=(0,k.useState)([]),[f,b]=(null==p||p.split(","),w().useState(window.innerWidth<=480)),E=()=>{window.innerWidth<=480?f||b(!0):f&&b(!1)};(0,k.useEffect)((()=>(window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)})),[]);const y=Fe.J.lightTheme.alert.error,x=Fe.J.lightTheme.paper.primary,C=Fe.J.lightTheme.generic.inputBorder,N=Fe.J.lightTheme.primary[2];Fe.J.lightTheme.text.disabled;"digit-uploader-content-uploadpopup ".concat(c?"error":""),oe.t.FileUpload,u.A,(0,k.useEffect)((()=>{t(h)}),[h,t]);const A=(0,k.useMemo)((()=>null==a?void 0:a.map(((e,t)=>{const a=null==n?void 0:n.find((t=>t.file===e));return w().createElement("div",{className:"digit-uploaded-file-container ".concat(a?"error":""),style:{display:"flex"},key:t},w().createElement("div",{className:"uploaded-file-container-sub",style:{cursor:"pointer",display:"flex"},onClick:()=>{r(t,e)}},((e,t)=>{switch(e){case"application/pdf":return w().createElement(Re.lL,{className:"icon"});case"image/png":return w().createElement(Re.uN,{className:"icon"});case"image/jpeg":case"image/pjpeg":return w().createElement(Re.UE,{className:"icon"});case"application/vnd.ms-excel":case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":case"application/excel":case"application/x-excel":case"application/x-msexcel":return w().createElement(Re.k3,{className:"icon"});case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":case"application/msword":return w().createElement(Re.rm,{className:"icon"});default:return w().createElement(oe.t.File,{className:"icon",fill:t?y:C})}})(null==e?void 0:e.type,a),w().createElement("div",{className:"uploaded-file-details ".concat(a?"error":"")},null==e?void 0:e.name,a&&!s&&w().createElement(V.A,{message:null==a?void 0:a.error,truncateMessage:!0,maxLength:256,className:"digit-tag-error-message",wrapperClassName:"digit-tag-error",showIcon:!0}))),a&&s&&w().createElement(j.A,{variant:"error",text:null==a?void 0:a.error,className:"uploadpopup-error-card"}),w().createElement("div",{className:"digit-upload-and-download-button ".concat(null!=a&&a.error&&s?"error-card":""),style:{display:"flex"}},m&&w().createElement(u.A,{label:"Re-Upload",variation:"secondary",icon:"FileUpload",type:"button",onClick:()=>(e=>{const t=h.filter((t=>t!==e)),a=document.createElement("input");a.type="file",a.accept=p,a.multiple=o,a.style.display="none",a.addEventListener("change",(e=>{v(t)})),a.addEventListener("change",(e=>{var a;const l=null==e||null===(a=e.target)||void 0===a?void 0:a.files;v([...t,l[0]])})),document.body.appendChild(a),a.click()})(e),size:f?"small":"medium"}),d&&w().createElement(u.A,{label:"Download",variation:"secondary",icon:"FileDownload",type:"button",onClick:()=>(async e=>{try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=e.name,document.body.appendChild(t),t.click(),document.body.removeChild(t)}catch(e){console.error("Error downloading file:",e)}})(e),size:f?"small":"medium"}),null==i?void 0:i.map(((e,t)=>w().createElement("div",{key:t},e)))),w().createElement("span",{className:"digit-uploadpopup-close-icon",style:{display:"flex"},onClick:()=>(e=>{const t=h.filter((t=>t!==e));v(t),l(e)})(e)},w().createElement(oe.t.Close,{fill:a?x:N,width:"24px",height:"24px",className:"uploader-close"})))}))),[a,n]);return w().createElement(w().Fragment,null,(!1===o&&(!a||0===(null==a?void 0:a.length))||!0===o)&&w().createElement("div",null,"Uploader comp"),(null==a?void 0:a.length)>0&&A)},Le=e=>{let{multiple:t,userType:a,onSubmit:l,fileData:n,onFileDelete:i,previews:o,uploadedFilesCount:r,handleFileClick:s}=e;const[c,d]=(0,k.useState)(!1),[m,p]=(0,k.useState)([]),[g,h]=(0,k.useState)(!1),v=(0,k.useRef)(null);let f="";const[b,E]=w().useState(window.innerWidth<=480),y=()=>{window.innerWidth<=480?b||E(!0):b&&E(!1)};(0,k.useEffect)((()=>(window.addEventListener("resize",y),()=>{window.removeEventListener("resize",y)})),[]);const x=()=>{d(!1)},C=()=>{h(!g),x()},N=()=>{d(!c)},A=()=>{if(v.current){f=v.current.getScreenshot();const e=function(e){const t=atob(e.split(",")[1]),a=e.split(",")[0].split(":")[1].split(";")[0],l=new ArrayBuffer(t.length),n=new Uint8Array(l);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return new Blob([l],{type:a})}(f),t="image_".concat(Date.now(),".jpg"),a=new File([e],t,{type:"image/jpeg"});S(a)}},S=e=>{var a;x(),h(!1);const l=null===(a=e.target)||void 0===a?void 0:a.files,n=l?[...l]:e;let i;i=t?Array.isArray(n)?[...m,...n]:[...m,n]:Array.isArray(n)?[n[0]]:[n],p(i)},T=Fe.J.lightTheme.alert.error;return(0,k.useEffect)((()=>{l(m)}),[m,l]),"digit-upload-image-drawer ".concat(b?"mobile-view":""," ").concat(c&&b?"open":"close"),w().createElement(w().Fragment,null,!(1===r&&!t)&&w().createElement("div",{className:"digit-image-uploader",onClick:N},w().createElement(oe.t.CameraEnhance,{fill:"#C84C0E",width:"40px",height:"40px",className:"upload-image-camera"}),w().createElement("div",{className:"upload-image-label"},"Click to add photo")),w().createElement("div",{className:"digit-img-container ".concat("uploadImage"," ",t?"":"singleUpload")},o.map(((e,a)=>{var l,c,d;return w().createElement(k.Fragment,{key:"preview-".concat(a)},w().createElement("div",{className:"preview-container uploadImage ".concat(t?"":"singleUpload"," ").concat(r>1?" multiple":"single"," ","imageFile"," ").concat(null!=e&&e.error?"error":"")},w().createElement("div",{onClick:()=>{s(a,null==e?void 0:e.file)}},null!=e&&null!==(l=e.file)&&void 0!==l&&l.type.startsWith("image/")?w().createElement("img",{src:null===(c=o[a])||void 0===c?void 0:c.preview,alt:"Preview ".concat(a)}):(e=>{switch(e){case"application/pdf":return w().createElement(Re.ct,{className:"digit-docupload-icon ".concat("error"),styles:{border:"1px solid #B91900"},fill:T});case"application/vnd.ms-excel":case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":case"application/excel":case"application/x-excel":case"application/x-msexcel":return w().createElement(Re.Rl,{className:"digit-docupload-icon ".concat("error"),styles:{border:"1px solid #B91900"},fill:T});case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":case"application/msword":return w().createElement(Re.IJ,{className:"digit-docupload-icon ".concat("error"),styles:{border:"1px solid #B91900"},fill:T});default:return w().createElement(Re.S8,{className:"digit-docupload-icon ".concat("error"),styles:{border:"1px solid #B91900"},fill:T})}})(null==e||null===(d=e.file)||void 0===d?void 0:d.type)),w().createElement("span",{onClick:e=>{e.stopPropagation(),(e=>{const t=m.filter((t=>t!==e));p(t),i(e)})(n[a])},className:"digit-uploader-close-icon ".concat(null!=e&&e.error?"error":"")},w().createElement(oe.t.Close,{fill:"#FFFFFF",width:"16px",height:"16px",className:"uploader-close ".concat(null!=e&&e.error?"error":"")})),(null==e?void 0:e.error)&&w().createElement(V.A,{message:null==e?void 0:e.error,truncateMessage:!0,maxLength:256,className:"digit-tag-error-message",wrapperClassName:"digit-tag-error",showIcon:!0})))}))),c&&w().createElement(w().Fragment,null,w().createElement("div",{style:{opacity:"60%"},className:"image-background",onClick:b?e=>{e.stopPropagation(),x()}:null}),w().createElement("div",{style:{bottom:"citizen"===a?"2.5rem":"0"},className:"digit-upload-image-drawer ".concat(b?"mobile-view":"")},!b&&w().createElement("div",{className:"capture-heading",style:{display:"flex"}},"Choose an option to upload"),!b&&w().createElement("div",{className:"capture-close"},w().createElement(oe.t.Close,{onClick:N,width:"32px",height:"32px",fill:"#0B4B66"})),w().createElement("div",{className:"image-upload-options",style:{display:"flex"}},w().createElement("div",{className:"upload-options",style:{display:"flex"}},w().createElement("label",{onClick:()=>C(),style:{cursor:"pointer"}},w().createElement(oe.t.CameraEnhance,{fill:"#C84C0E",width:"40px",height:"40px"})),w().createElement("label",{onClick:()=>C(),className:"upload-options-label"},"Camera")),w().createElement("div",{className:"upload-options",style:{display:"flex"}},w().createElement("label",{for:"file",style:{cursor:"pointer"}},w().createElement(oe.t.PermMedia,{fill:"#C84C0E",width:"40px",height:"40px"})),w().createElement("label",{for:"file",className:"upload-options-label"},"My Files"),w().createElement("input",{type:"file",id:"file",accept:"image/*, .png, .jpeg, .jpg",onChange:e=>{S(e)},style:{display:"none"},multiple:t}))))),g&&w().createElement(w().Fragment,null,w().createElement("div",{style:{opacity:"60%"},className:"image-background"}),w().createElement("div",{className:"webcam-container",style:{display:"flex",height:"100%",width:"100%"}},w().createElement("div",{className:"capture-heading",style:{display:"flex"}},"Capture",w().createElement(oe.t.Close,{onClick:C,width:"32px",height:"32px",fill:"#0B4B66",className:"cp"})),w().createElement("div",{className:"video-stream",style:{height:"100%"}},"Webcamp added later"),w().createElement("div",{style:{display:"flex"},className:"cancel-capture-button-wrap"},b?w().createElement(w().Fragment,null,w().createElement(u.A,{onClick:A,variation:"primary",size:b?"medium":"large",label:"Capture",icon:"CameraEnhance"}),w().createElement(u.A,{onClick:C,variation:"secondary",size:b?"medium":"large",label:"Cancel"})):w().createElement(w().Fragment,null,w().createElement(u.A,{onClick:C,variation:"secondary",size:b?"medium":"large",label:"Cancel"}),w().createElement(u.A,{onClick:A,variation:"primary",size:b?"medium":"large",label:"Capture",icon:"CameraEnhance"}))))))};var _e=a("JTzt");const Oe=e=>{const{t}=(0,he.Bd)(),a=(0,k.useRef)(),l=(0,_e.W)(),[n,i]=(0,k.useState)("Upload"),[o,r]=(0,k.useState)(""),[s,c]=(0,k.useState)(0),[d,m]=(0,k.useState)([]),[p,g]=(0,k.useState)([]),[h,v]=(0,k.useState)([]),f=async t=>{const a="uploadFile"===e.variant?t.target.files:t,l=[];if(a.length>0){const t=[];for(let n=0;n<a.length;n++){const i=a[n],{isValid:o,error:r}=b(i,e);o?t.push(i):l.push({file:i,error:r})}let n;n="uploadImage"===e.variant||"uploadPopup"===e.variant?a:null!=e&&e.multiple?[...d,...a]:[a[0]],m(n),c(n.length),v([...h,...l])}if(null!=e&&e.onUpload){const t=await(null==e?void 0:e.onUpload(d));if(t&&0!==t.length)for(const{file:e,error:a}of t){const t=l.findIndex((t=>t.file===e));-1!==t?l[t].error=a:l.push({file:e,error:a})}}},b=(e,t)=>{var a,l;let n=!0,i="";const o=null===(a=t.validations)||void 0===a?void 0:a.maxSizeAllowedInMB,r=null===(l=t.validations)||void 0===l?void 0:l.minSizeRequiredInMB;return o&&Math.round((null==e?void 0:e.size)/1024/1024)>o?(n=!1,i="File size exceeds the maximum allowed size"):r&&Math.round((null==e?void 0:e.size)/1024/1024)<r&&(n=!1,i="File size is below the minimum required size"),"uploadImage"!==t.variant||["image/png",".png",".jpeg",".jpg","image/jpeg","image/jpg"].includes(e.type)||(n=!1,i="File type is not accepted"),{isValid:n,error:i}},E=()=>{a.current.click()},y=t=>{if(Array.isArray(d)){const e=d.filter((e=>e!==t)),a=h.filter((e=>e.file!==t));m(e),c(e.length),v(a)}else m([]),c(0),v([]);null==e||e.removeTargetedFile(t)},x=e=>{e&&null!=e&&e.url&&(window.location.href=null==e?void 0:e.url)},C=e=>new Promise((t=>{const a=new FileReader;a.onload=e=>{const a=e.target.result;t(a)},a.readAsDataURL(e)}));(0,k.useEffect)((()=>{d.length>0&&(async()=>{if(null!=e&&e.onUpload){const t=await(null==e?void 0:e.onUpload(d));if(t&&0!==t.length){const e=[];t.forEach((t=>{let{file:a,error:l}=t;const n=h.findIndex((e=>e.file===a));-1!==n?h[n].error=l:e.push({file:a,error:l})})),v([...h,...e])}}})()}),[d,h,null==e?void 0:e.onUpload]),(0,k.useEffect)((()=>{i(!e.multiple&&s>0?"Re-Upload":"Upload")}),[s,e.multiple]),(0,k.useEffect)((()=>{r(0!==s?"".concat(s," Uploaded"):"")}),[s]),(0,k.useEffect)((()=>((async()=>{const e=[];for(const t of d)if(t instanceof Blob){const a=await C(t);if(a){const l=h.filter((e=>e.file===t));e.push({file:t,preview:a,error:l.length>0?l[0].error:null})}else console.error("Failed to generate preview for:",t)}else{const a=new Blob([t],{type:null==t?void 0:t.type}),l=await C(a);if(l){const a=h.filter((e=>e.file===t));e.push({file:t,preview:l,error:a.length>0?a[0].error:null})}else console.error("Failed to generate preview for:",t);console.error("Invalid file object:",t)}g(e)})(),()=>{g([])})),[d]);const N=(null==e?void 0:e.showHint)||!1,A=(null==e?void 0:e.showLabel)||!1,{fileUrl:S,fileName:T="Unknown File"}=Digit.Hooks.useQueryParams(),F=e=>{if(!e)return null;const t=new Blob([e],{type:null==e?void 0:e.type});return URL.createObjectURL(t)},D=S?[{uri:S,fileName:T}]:d.map((e=>({uri:F(e),fileName:(null==e?void 0:e.name)||T}))),B=(e,t)=>{const a=F(t);window.open(a,"_blank")},I=Fe.J.lightTheme.paper.primary,R=Fe.J.lightTheme.alert.error;return w().createElement(k.Fragment,null,w().createElement("div",{className:"digit-uploader-wrap ".concat(null!=e&&e.iserror?"error":"")},A&&w().createElement("p",{className:"digit-upload-label"},t(null==e?void 0:e.label)),(()=>{switch(e.variant){case"uploadPopup":return w().createElement(k.Fragment,null,w().createElement(Pe,{onSubmit:f,fileData:d,fileTypes:e.accept,onFileDelete:y,errors:h,additionalElements:null==e?void 0:e.additionalElements,onFileDownload:x,documents:D,handleFileClick:B,showErrorCard:null==e?void 0:e.showErrorCard,iserror:null==e?void 0:e.iserror,showDownloadButton:null==e?void 0:e.showDownloadButton,showReUploadButton:null==e?void 0:e.showReUploadButton,multiple:null==e?void 0:e.multiple}));case"uploadImage":return w().createElement(k.Fragment,null,w().createElement(Le,{onSubmit:f,fileData:d,onFileDelete:y,errors:h,multiple:null==e?void 0:e.multiple,userType:l,previews:p,uploadedFilesCount:s,documents:D,handleFileClick:B}));default:return w().createElement(k.Fragment,null,w().createElement("div",{className:"digit-uploader-content"},w().createElement("div",{className:"digit-upload ".concat(null!=e&&e.customClass?null==e?void 0:e.customClass:""," ").concat("employee"===l?"":"digit-upload-employee"," ").concat(e.disabled?" disabled":""),style:null==e?void 0:e.style},w().createElement("input",{className:"digit-uploader-input ".concat(e.disabled?" disabled":""),ref:a,type:"file",id:e.id||"document-".concat(Math.floor(139*(Math.random()||1))),name:"file",multiple:e.multiple,accept:e.accept,disabled:e.disabled,onChange:f,style:{display:"none"}}),w().createElement("input",{className:"digit-uploader-input ".concat(null!=e&&e.iserror?"error":""),type:"text",placeholder:"No File Selected",value:o,readOnly:!0})),w().createElement(u.A,{label:n,style:{height:"40px",flexShrink:0,...null!=e&&e.extraStyles?e.extraStyles.buttonStyles:{},...null!=e&&e.disableButton?{opacity:.5,cursor:"not-allowed",pointerEvents:"none"}:{}},textStyles:null==e?void 0:e.textStyles,type:e.buttonType,icon:"FileUpload",variation:"secondary",onClick:E})),(null==e?void 0:e.showAsTags)&&w().createElement("div",{className:"digit-tag-container",style:{marginTop:"0px"}},null==d?void 0:d.map(((e,t)=>{var a;const l=h.filter((t=>t.file===e)),n=l.length>0;return w().createElement(ie.A,{key:t,text:null==e?void 0:e.name,onClick:t=>{t.stopPropagation(),y(e)},isErrorTag:n,error:null===(a=l[0])||void 0===a?void 0:a.error,onTagClick:()=>B(0,e),onErrorClick:e=>e.stopPropagation()})}))),(null==e?void 0:e.showAsPreview)&&w().createElement("div",{className:"digit-img-container"},d.map(((t,a)=>{var l,n,i;const o=h.filter((e=>e.file===t)),r=o.length>0;return w().createElement(k.Fragment,{key:a},w().createElement("div",{className:"preview-container ".concat(s>1?" multiple":"single"," ").concat(null!=t&&t.type.startsWith("image/")?"imageFile":""," ").concat(r?"error":"")},w().createElement("div",{onClick:()=>{B(0,t)}},null!=t&&t.type.startsWith("image/")?w().createElement("img",{src:null===(l=p[a])||void 0===l?void 0:l.preview,alt:"Preview ".concat(a)}):((e,t)=>{switch(e){case"application/pdf":return w().createElement(Re.ct,{className:"digit-docupload-icon ".concat(t?"error":""),styles:t?{border:"1px solid #B91900"}:{},fill:t?R:""});case"application/vnd.ms-excel":case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":case"application/excel":case"application/x-excel":case"application/x-msexcel":return w().createElement(Re.Rl,{className:"digit-docupload-icon ".concat(t?"error":""),styles:t?{border:"1px solid #B91900"}:{},fill:t?R:""});case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":case"application/msword":return w().createElement(Re.IJ,{className:"digit-docupload-icon ".concat(t?"error":""),styles:t?{border:"1px solid #B91900"}:{},fill:t?R:""});default:return w().createElement(Re.S8,{className:"digit-docupload-icon ".concat(t?"error":""),styles:t?{border:"1px solid #B91900"}:{},fill:t?R:""})}})(null==t?void 0:t.type,r)),w().createElement("div",{className:"overlay ".concat(r?"error":""," ").concat(null!=e&&e.multiple?"multiple":"single"),onClick:()=>{B(0,t)}}),w().createElement("div",{className:"preview-file-name"},null!=t&&t.name&&!r?null==t?void 0:t.name:""),w().createElement("span",{onClick:e=>{y(t)},className:"digit-uploader-close-icon ".concat(r?"error":"")},w().createElement(oe.t.Close,{fill:I,width:"16px",height:"16px",className:"uploader-close ".concat(r?"error":"")})),(null===(n=o[0])||void 0===n?void 0:n.error)&&w().createElement(V.A,{message:null===(i=o[0])||void 0===i?void 0:i.error,truncateMessage:!0,maxLength:256,className:"digit-tag-error-message",wrapperClassName:"digit-tag-error",showIcon:!0})))}))))}})(),(null==e?void 0:e.iserror)&&w().createElement(V.A,{message:t(null==e?void 0:e.iserror),truncateMessage:!0,maxLength:256,className:"digit-tag-error-message",wrapperClassName:"digit-tag-error",showIcon:!0}),N&&w().createElement("p",{className:"digit-upload-helptext"},(0,Te.A)("toSentenceCase",(0,Te.A)("truncateString",t(null==e?void 0:e.hintText),{maxLength:256})))))};Oe.propTypes={hintText:se().string,showHint:se().bool,label:se().string,showLabel:se().bool,showAsTags:se().bool,showAsPreview:se().bool,customClass:se().string,uploadedFiles:se().arrayOf(se().arrayOf(se().oneOfType([se().string,se().object]))),disableButton:se().bool,buttonType:se().string,onUpload:se().func,removeTargetedFile:se().func,onDelete:se().func,iserror:se().string,disabled:se().bool,inputStyles:se().object,multiple:se().bool,accept:se().string,id:se().string,showDownloadButton:se().bool,showReUploadButton:se().bool},Oe.defaultProps={disableButton:!1};const Ve=Oe;var Me=a("KYTC");const Ge=e=>{let{wrapperClassName:t,headerContentClassName:a,caption:l,captionClassName:n,header:i,headerClasName:o,subHeader:r,subHeaderClasName:s,body:c,bodyClasName:d,style:m}=e;return w().createElement("div",{className:"digit-text-block-wrap ".concat(t),style:m},(l||i||r)&&w().createElement("div",{className:"digit-text-block-header-content ".concat(a)},l&&w().createElement("div",{className:"digit-text-block-caption ".concat(n)},l),i&&w().createElement("div",{className:"digit-text-block-header ".concat(o)},i),r&&w().createElement("div",{className:"digit-text-block-subheader ".concat(s)},r)),c&&w().createElement("div",{className:"digit-text-block-body ".concat(d)},c))};Ge.propTypes={wrapperClassName:se().string,headerContentClassName:se().string,caption:se().string,captionClassName:se().string,header:se().string,headerClasName:se().string,subHeader:se().string,subHeaderClasName:se().string,body:se().string,bodyClasName:se().string},Ge.defaultProps={wrapperClassName:"",headerContentClassName:"",caption:"",captionClassName:"",header:"",headerClasName:"",subHeader:"",subHeaderClasName:"",body:"",bodyClasName:""};const $e=Ge;var Ue=a("+YVD"),je=a("hYOT");const ze=e=>{let{label:t,value:a,inline:l,className:n,style:i}=e;return w().createElement("div",{style:i,className:"digit-viewcard-field-pair ".concat(n||""," ").concat(l?"inline":"")},w().createElement("div",{className:"digit-viewcard-label"},t),w().createElement("div",{className:"digit-viewcard-value"},a))};ze.propTypes={label:se().string,value:se().string,inline:se().bool,className:se().string,style:se().object};const qe=ze;var Je=a("p2k/"),We=a("hCkt"),He=a("Pijt");const Ke={DIGIT_DARK:"https://egov-dev-assets.s3.ap-south-1.amazonaws.com/digit.png",DIGIT_LIGHT:"https://egov-uat-assets.s3.ap-south-1.amazonaws.com/hcm/mseva-white-logo.png",DIGIT_FOOTER_DARK:"https://unified-dev.digit.org/egov-dev-assets/digit-footer-bw.png",DIGIT_FOOTER_LIGHT:"https://unified-dev.digit.org/egov-dev-assets/digit-footer.png"},Ze=e=>{let{img:t,className:a,style:l,theme:n,setImageToLeft:i,onImageClick:o,onLogoClick:r,onHamburgerClick:s,props:c,logo:d,ulb:m,actionFields:u}=e;const[p,g]=(0,k.useState)(window.innerWidth<=768),h=()=>{window.innerWidth<=768?p||g(!0):p&&g(!1)};(0,k.useEffect)((()=>(window.addEventListener("resize",(()=>{h()})),()=>{window.addEventListener("resize",(()=>{h()}))})));const v=t||Ke["dark"===n?"DIGIT_DARK":"DIGIT_LIGHT"],f=Fe.J.lightTheme.paper.primary,b=Fe.J.lightTheme.text.primary;return p?w().createElement("div",{className:"digit-topbar ".concat(a||""," ").concat(n||""),style:l},w().createElement(He.A,{className:"digit-topbar-hamburger ".concat(n||""," ").concat(s?"clickable":""),handleClick:s,color:"dark"===n?f:b}),w().createElement("div",{className:"digit-header-img-ulb-wrapper-mobileview"},w().createElement("img",{className:"digit-header-img ".concat(o?"clickable":""),alt:"Powered by DIGIT",src:t||v,onClick:()=>o(),width:"80px",height:"19px"}),w().createElement("div",{className:"topbar-divider ".concat(n||"")}),w().createElement("div",{className:"digit-topbar-ulb-mobileview ".concat(n||"")},m))):w().createElement("div",{className:"digit-topbar ".concat(a||""," ").concat(n||""),style:l},!i&&w().createElement("div",{className:"digit-logo-ulb-wrapper"},d&&w().createElement("div",{className:"digit-topbar-logo ".concat(r?"clickable":"")},w().createElement("img",{className:"digit-header-logo-img",alt:"Logo",src:d,onClick:()=>r(),width:(null==c?void 0:c.logoWidth)||"32px",height:(null==c?void 0:c.logoHeight)||"32px"})),w().createElement("div",{className:"digit-topbar-ulb"},m)),i&&w().createElement("div",{className:"digit-logo-ulb-wrapper"},w().createElement("img",{className:"digit-header-img ".concat(o?"clickable":""),alt:"Powered by DIGIT",src:t||v,onClick:()=>o(),width:"80px",height:"19px"})),w().createElement("div",{className:"digit-header-action-fields"},u&&w().createElement(w().Fragment,null,u.map(((e,t)=>w().createElement("div",{className:"individual-action-field",key:t},e)))),!i&&w().createElement("img",{className:"digit-header-img ".concat(o?"clickable":""),alt:"Powered by DIGIT",src:t||v,onClick:()=>o(),width:"80px",height:"19px"})))};Ze.propTypes={img:se().string,className:se().string,style:se().object,theme:se().string,setImageToLeft:se().bool,onImageClick:se().func,onLogoClick:se().func,onHamburgerClick:se().func,props:se().object,logo:se().string},Ze.defaultProps={img:void 0};const Ye=Ze;var Qe=a("8Mou");const Xe=e=>{let{items:t,theme:a,variant:l,transitionDuration:n,className:i,styles:o}=e;const[r,s]=(0,k.useState)(!1),[c,d]=(0,k.useState)(""),[m,u]=(0,k.useState)({}),[p,g]=(0,k.useState)({}),h=Fe.J.lightTheme.paper.primary,v=Fe.J.lightTheme.primary[2],f="dark"===a?h:v,b=e=>{const{parentIndex:t}=m;return t&&t.toString().startsWith(e)},E=(e,t)=>t?e.map((e=>{if(e.label.toLowerCase().includes(t.toLowerCase()))return e;if(e.children){const a=E(e.children,t);if(a.length>0)return{...e,children:a}}return null})).filter((e=>null!==e)):e,y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return e.map(((e,n)=>{const i=t>=0?"".concat(t,"-").concat(n):n,o=p[i],s=m.item===e,c=-1===t;return w().createElement("div",{className:"item-child-wrapper",key:i},w().createElement("div",{className:"sidebar-item ".concat(a||""," ").concat(l||""," ").concat(m.item===e?"selected":""," ").concat(-1===t?"parentLevel":""," ").concat(b(i)?"selectedAsParent":""),onClick:()=>((e,t,a)=>{u({item:e,index:t,parentIndex:a})})(e,i,t),tabIndex:0},(c||r)&&w().createElement("span",{className:"icon"},(s||b(i))&&e.selectedIcon?e.selectedIcon:e.icon),r&&w().createElement("span",{className:"item-label"},e.label),e.children&&r&&w().createElement("span",{className:"expand-icon",onClick:t=>{t.stopPropagation(),((e,t)=>{e.children&&g((e=>({...e,[t]:!e[t]})))})(e,i)}},o?w().createElement(oe.t.ArrowDropDown,{fill:"dark"===a||m.item===e&&"light"===a&&"primary"===l?h:v}):w().createElement(oe.t.ArrowDropDown,{style:{transform:"rotate(-90deg)"},fill:"dark"===a||m.item===e&&"light"===a&&"primary"===l?h:v}))),e.children&&o&&r&&w().createElement("div",{className:"sidebar-children"},y(e.children,i)))}))},x=E(t,c),C=Ke["dark"===a?"DIGIT_FOOTER_DARK":"DIGIT_FOOTER_LIGHT"];return w().createElement("div",{className:"sidebar ".concat(r?"hovered":"collapsed"," ").concat(a||""," ").concat(l||""," ").concat(i||""),style:{transition:"width ".concat(n,"s")},onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1)},w().createElement(w().Fragment,null,r?w().createElement("div",{className:"sidebar-search-container ".concat(a||""," ").concat(l||"")},w().createElement(ue.A,{type:"search",className:"sidebar-search",value:c,onChange:e=>d(e.target.value),placeholder:"Search",autoFocus:!0,iconFill:f})):w().createElement("div",{className:"sidebar-search-container-collapsed ".concat(a||""," ").concat(l||"")},w().createElement(oe.t.Search,{width:"24px",height:"24px",fill:"dark"===a?h:v,className:"search-icon"}))),w().createElement("div",{className:"sidebar-items-container ".concat(a||""," ").concat(l||"")},y(x)),r&&w().createElement("div",{className:"sidebar-bottom ".concat(a||""," ").concat(l||"")},w().createElement("div",null,w().createElement("div",{className:"sidebar-bottom-item"},w().createElement(oe.t.Help,{width:"16px",height:"16px",fill:f}),w().createElement("span",{className:"sidebar-bottom-item-text"},"Help")),w().createElement("div",{className:"sidebar-bottom-item"},w().createElement(oe.t.Settings,{width:"16px",height:"16px",fill:f}),w().createElement("span",{className:"sidebar-bottom-item-text"},"Settings")),w().createElement("div",{className:"sidebar-bottom-item"},w().createElement(oe.t.Logout,{width:"16px",height:"16px",fill:f}),w().createElement("span",{className:"sidebar-bottom-item-text"},"Logout")),w().createElement("hr",{className:"divider"})),w().createElement("img",{className:"digit-sidebar-footer-img",alt:"Powered by DIGIT",src:C,onClick:()=>{var e,t;window.open(null===(e=window)||void 0===e||null===(e=e.globalConfigs)||void 0===e||null===(t=e.getConfig)||void 0===t?void 0:t.call(e,"DIGIT_HOME_URL"),"_blank").focus()}})))};Xe.propTypes={items:se().arrayOf(se().shape({path:se().string,icon:se().node.isRequired,label:se().string.isRequired,children:se().array})).isRequired,theme:se().oneOf(["dark","light"]),variant:se().oneOf(["primary","secondary"]),collapsedWidth:se().string,expandedWidth:se().string,transitionDuration:se().number},Xe.defaultProps={theme:"dark",variant:"primary",transitionDuration:.3};const et=Xe;var tt=a("BWMB"),at=a("JpEE"),lt=a("snI5");const nt=e=>{let{width:t,errorMessage:a,options:l,onSelectionChanged:n,allowMultipleSelection:i=!0}=e;const{t:o}=(0,he.Bd)(),[r,s]=(0,k.useState)([]),c=Fe.J.lightTheme.generic.inputBorder,d=Fe.J.lightTheme.paper.primary,m=(e,t)=>{const a=t?d:c;return(0,lt.Q)(e,a,"1.5rem","1.5rem","")};return w().createElement("div",{className:"selection-card-container"},w().createElement("div",{className:"selection-card ".concat(a?"error":"")},null==l?void 0:l.map((e=>{const a=r.includes(e);return w().createElement("div",{key:e.code,className:"option ".concat(a?"selected":""),style:{width:t},onClick:()=>(e=>{const t=[...r];if(i)if(t.includes(e)){const a=t.indexOf(e);t.splice(a,1)}else t.push(e);else t.includes(e)?t.length=0:(t.length=0,t.push(e));s(t),n(t)})(e)},(null==e?void 0:e.prefixIcon)&&w().createElement("span",{className:"selectioncardicon"},m(null==e?void 0:e.prefixIcon,a)),w().createElement("span",{className:"selectioncard-option-label"},e.name),(null==e?void 0:e.suffixIcon)&&w().createElement("span",{className:"selectioncardicon"},m(null==e?void 0:e.suffixIcon,a)))}))),a&&w().createElement(V.A,{message:o(a),truncateMessage:!0,maxLength:256,showIcon:!0}))};nt.propTypes={width:se().number,errorMessage:se().string,options:se().arrayOf(se().shape({name:se().string.isRequired,code:se().string.isRequired,prefixIcon:se().node,suffixIcon:se().node})).isRequired,onSelectionChanged:se().func.isRequired,allowMultipleSelection:se().bool};const it=nt,ot=e=>{let{className:t,label:a,style:l,type:n,icon:i,stroke:o,showIcon:r,labelStyle:s,onClick:c,alignment:d,iconClassName:m,iconColor:u}=e;const p=Fe.J.lightTheme.primary[2],g=Fe.J.lightTheme.alert.success,h=Fe.J.lightTheme.alert.error,v=Fe.J.lightTheme.alert.warning;let f;if(i)f=(0,lt.Q)(i,u||p,"1rem","1rem","digit-tag-customIcon ".concat(m));else switch(n){case"error":f=w().createElement(oe.t.Error,{fill:h,width:"1rem",height:"1rem"});break;case"warning":f=w().createElement(oe.t.Warning,{fill:v,width:"1rem",height:"1rem"});break;default:f=w().createElement(oe.t.CheckCircle,{fill:"success"===n?g:p,width:"1rem",height:"1rem"})}return w().createElement("div",{className:"digit-tag-wrapper ".concat(t||""," ").concat(n||""," ").concat(o?"stroke":""," ").concat(c?"cp":""," ").concat(d||""),style:l,onClick:c},r&&f,w().createElement("span",{className:"digit-tag-text",style:s},a))};ot.propTypes={className:se().string,iconClassName:se().string,iconColor:se().string,label:se().string.isRequired,style:se().object,stroke:se().bool,type:se().string},ot.defaultProps={className:"",style:{},type:"monochrome",stroke:!1,showIcon:!0,labelStyle:{},alignment:"center",iconColor:"",iconClassName:""};const rt=ot},V9qA:(e,t,a)=>{a.d(t,{A:()=>d});var l=a("C6rw"),n=a.n(l),i=a("17x9"),o=a.n(i),r=(a("rTr4"),a("vA+l")),s=a("JTzt");const c=e=>{var t,a,l;const i=(0,s.W)();return n().createElement(n().Fragment,null,n().createElement("textarea",{onInput:(null===(t=e.populators)||void 0===t?void 0:t.resizeSmart)&&function(e){const t=e.target,a=6.25*parseFloat(getComputedStyle(t).fontSize);t.style.height="auto";const l=t.scrollHeight;t.style.height="".concat(l>a?l:a,"px")},placeholder:(0,r.A)("TOSENTENCECASE",e.placeholder),name:e.name,ref:e.inputRef,style:e.style,id:e.id,value:e.value,onChange:t=>{null!=e&&e.onChange&&(null==e||e.onChange(t))},className:"".concat("citizen"!==i?"digit-employee-card-textarea-field":"digit-card-textarea-field"," ").concat(null!=e&&e.className?null==e?void 0:e.className:""," ").concat(e.disabled?"disabled":""," ").concat(e.nonEditable?"noneditable":""," ").concat(e.error?"error":""," ").concat(null!==(a=e.populators)&&void 0!==a&&a.resizeSmart?"resize-smart":""),minLength:e.minlength,maxLength:e.maxlength,autoComplete:"off",disabled:e.disabled,nonEditable:e.nonEditable,pattern:null!=e&&e.validation&&e.ValidationRequired?null==e||null===(l=e.validation)||void 0===l?void 0:l.pattern:e.pattern}))};c.propTypes={placeholder:o().string,name:o().string.isRequired,inputRef:o().oneOfType([o().func,o().object]),style:o().object,id:o().string,value:o().string,onChange:o().func,className:o().string,nonEditable:o().bool,minlength:o().number,maxlength:o().number,autoComplete:o().string,disabled:o().bool,pattern:o().string,validation:o().object,ValidationRequired:o().bool,hintText:o().string,charCount:o().bool,errors:o().object,error:o().string,resizeSmart:o().bool},c.defaultProps={inputRef:void 0,onChange:void 0,resizeSmart:!1};const d=c},VGhJ:e=>{e.exports=JSON.parse('{"nm":"48 - Warning","ddd":0,"h":500,"w":500,"meta":{"g":"LottieFiles AE "},"layers":[{"ty":3,"nm":"48 - Warning","sr":1,"st":0,"op":144,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[60,60,0],"ix":1},"s":{"a":0,"k":[180,180,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[250.045,290.339,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":0,"ix":11}},"ef":[],"ind":1},{"ty":4,"nm":"Line","sr":1,"st":0,"op":144,"ip":12,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[-1,21.25,0],"ix":1},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0,"y":1},"s":[0,0,100],"t":12},{"s":[55.556,55.556,100],"t":32}],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[85.533,85.887,0],"ix":2},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0,"y":1},"s":[180],"t":12},{"s":[0],"t":32}],"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Shape 1","ix":1,"cix":2,"np":3,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":false,"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-1,80],[-1,-37.5]]},"ix":2}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":2,"lj":1,"ml":4,"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":28,"ix":5},"c":{"a":0,"k":[1,1,1],"ix":3}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"tm","bm":0,"hd":false,"mn":"ADBE Vector Filter - Trim","nm":"Trim Paths 1","ix":2,"e":{"a":0,"k":100,"ix":2},"o":{"a":0,"k":0,"ix":3},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0,"y":1},"s":[0],"t":22},{"s":[40],"t":42}],"ix":1},"m":1}],"ind":2,"parent":5},{"ty":4,"nm":"Dot","sr":1,"st":0,"op":144,"ip":12,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[0,0,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Shape 1","ix":1,"cix":2,"np":4,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":false,"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-1,80],[-1,-37.5]]},"ix":2}},{"ty":"tm","bm":0,"hd":false,"mn":"ADBE Vector Filter - Trim","nm":"Trim Paths 1","ix":2,"e":{"a":0,"k":0.1,"ix":2},"o":{"a":0,"k":0,"ix":3},"s":{"a":0,"k":0,"ix":1},"m":1},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":2,"lj":1,"ml":4,"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":33,"ix":5},"c":{"a":0,"k":[1,1,1],"ix":3}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":3,"parent":2},{"ty":4,"nm":"Tri Outlines","sr":1,"st":0,"op":144,"ip":10,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[85.513,72.848,0],"ix":1},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0,100],"t":10},{"s":[100,100,100],"t":15}],"ix":6,"x":"var $bm_rt;\\nvar amp, freq, decay, n, t, v;\\ntry {\\n amp = $bm_div(effect(\'Scale - Overshoot\')(\'ADBE Slider Control-0001\'), 2.5), freq = $bm_div(effect(\'Scale - Bounce\')(\'ADBE Slider Control-0001\'), 20), decay = $bm_div(effect(\'Scale - Friction\')(\'ADBE Slider Control-0001\'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : $bm_sub(time, key(n).time), $bm_rt = 0 < n ? (v = velocityAtTime($bm_sub(key(n).time, $bm_div(thisComp.frameDuration, 10))), $bm_sum(value, $bm_div($bm_mul($bm_mul($bm_div(v, 100), amp), Math.sin($bm_mul($bm_mul($bm_mul(freq, t), 2), Math.PI))), Math.exp($bm_mul(decay, t))))) : value;\\n} catch (e$$4) {\\n $bm_rt = value = value;\\n}"},"sk":{"a":0,"k":0},"p":{"a":0,"k":[59.955,37.467,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[{"ty":5,"mn":"ADBE Slider Control","nm":"Scale - Overshoot","ix":1,"en":1,"ef":[{"ty":0,"mn":"ADBE Slider Control-0001","nm":"Slider","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"mn":"ADBE Slider Control","nm":"Scale - Bounce","ix":2,"en":1,"ef":[{"ty":0,"mn":"ADBE Slider Control-0001","nm":"Slider","ix":1,"v":{"a":0,"k":35,"ix":1,"x":"var $bm_rt;\\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"mn":"ADBE Slider Control","nm":"Scale - Friction","ix":3,"en":1,"ef":[{"ty":0,"mn":"ADBE Slider Control-0001","nm":"Slider","ix":1,"v":{"a":0,"k":65,"ix":1,"x":"var $bm_rt;\\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 1","ix":1,"cix":2,"np":2,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[-3.315,5.634],[0,0],[-3.267,-5.554],[0,0],[6.537,0],[0,0]],"o":[[0,0],[3.268,-5.554],[0,0],[3.315,5.634],[0,0],[-6.536,0]],"v":[[-81.948,59.861],[-7.284,-67.044],[7.284,-67.044],[81.948,59.861],[74.664,72.598],[-74.664,72.598]]},"ix":2}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.7255,0.098,0],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[85.513,72.848],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":4,"parent":1},{"ty":3,"nm":"Tri","sr":1,"st":0,"op":144,"ip":10,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[85.513,72.848,0],"ix":1},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0,100],"t":10},{"s":[100,100,100],"t":15}],"ix":6,"x":"var $bm_rt;\\nvar amp, freq, decay, n, t, v;\\ntry {\\n amp = $bm_div(effect(\'Scale - Overshoot\')(\'ADBE Slider Control-0001\'), 2.5), freq = $bm_div(effect(\'Scale - Bounce\')(\'ADBE Slider Control-0001\'), 20), decay = $bm_div(effect(\'Scale - Friction\')(\'ADBE Slider Control-0001\'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : $bm_sub(time, key(n).time), $bm_rt = 0 < n ? (v = velocityAtTime($bm_sub(key(n).time, $bm_div(thisComp.frameDuration, 10))), $bm_sum(value, $bm_div($bm_mul($bm_mul($bm_div(v, 100), amp), Math.sin($bm_mul($bm_mul($bm_mul(freq, t), 2), Math.PI))), Math.exp($bm_mul(decay, t))))) : value;\\n} catch (e$$4) {\\n $bm_rt = value = value;\\n}"},"sk":{"a":0,"k":0},"p":{"a":0,"k":[59.955,37.467,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[{"ty":5,"mn":"ADBE Slider Control","nm":"Scale - Overshoot","ix":1,"en":1,"ef":[{"ty":0,"mn":"ADBE Slider Control-0001","nm":"Slider","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"mn":"ADBE Slider Control","nm":"Scale - Bounce","ix":2,"en":1,"ef":[{"ty":0,"mn":"ADBE Slider Control-0001","nm":"Slider","ix":1,"v":{"a":0,"k":35,"ix":1,"x":"var $bm_rt;\\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"mn":"ADBE Slider Control","nm":"Scale - Friction","ix":3,"en":1,"ef":[{"ty":0,"mn":"ADBE Slider Control-0001","nm":"Slider","ix":1,"v":{"a":0,"k":65,"ix":1,"x":"var $bm_rt;\\n$bm_rt = clamp(value, 0, 100);"}}]}],"ind":5,"parent":1},{"ty":1,"nm":"Plate_white","sr":1,"st":0,"op":144,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[250,250,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[250,250,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"sc":"#ffffff","sh":500,"sw":500,"ind":6}],"v":"5.5.7","fr":48,"op":144,"ip":0,"assets":[]}')},sqMA:(e,t,a)=>{a.d(t,{J:()=>l});const l={lightTheme:{primary:{1:"#C84C0E",2:"#0B4B66",bg:"#FBEEE8"},text:{primary:"#363636",secondary:"#787878",disabled:"#C5C5C5"},alert:{error:"#B91900",errorbg:"#FFF5F4",success:"#00703C",successbg:"#F1FFF8",warning:"#9E5F00",warningbg:"#FFF9F0",info:"#0057BD",infobg:"#DEEFFF"},generic:{background:"#EEEEEE",divider:"#D6D5D4",inputBorder:"#505A5F"},paper:{primary:"#FFFFFF",secondary:"#FAFAFA"}}}},"vA+l":(e,t,a)=>{a.d(t,{A:()=>o}),a("C6rw");var l=a("17x9"),n=a.n(l);const i=(e,t,a)=>{var l;if(!(null===(l=window)||void 0===l||null===(l=l.globalConfigs)||void 0===l?void 0:l.getConfig("IS_STRING_MANIPULATED")))return t;return(()=>{if(!t)return null;switch(e){case"TOSENTENCECASE":return t.toLowerCase().replace(/(^\s*\w|[\.\!\?]\s*\w)/g,(e=>e.toUpperCase()));case"CAPITALIZEFIRSTLETTER":return(e=>e.replace(/\b\w/g,(e=>e.toUpperCase())))(t);case"TOTITLECASE":return(e=>e.toLowerCase().replace(/\b\w|\b[^a-zA-Z0-9\s]*\w/g,(e=>e.toUpperCase())))(t);case"TRUNCATESTRING":return((e,t)=>e.length>t?e.slice(0,t)+"...":e)(t,null==a?void 0:a.maxLength);default:return t}})()};i.propTypes={functionName:n().string,key:n().string,props:n().object};const o=i},xbiS:(e,t,a)=>{a.d(t,{A:()=>g});var l=a("C6rw"),n=a.n(l),i=a("wUmw"),o=a("iTkH"),r=a("Jrwa"),s=a("xAr1"),c=a("GV5m"),d=a("9/5d"),m=a("IBj/"),u=a("zgF6"),p=a("ueKo");const g=e=>{let{uiConfig:t,header:a="",screenType:g="search",fullConfig:h,data:v}=e;const{t:f}=(0,o.Bd)(),{state:b,dispatch:E}=(0,l.useContext)(r.W),[y,x]=(0,l.useState)(null);let k=[];const{apiDetails:w}=h;var C;null!=h&&h.postProcessResult&&(null===(C=Digit)||void 0===C||null===(C=C.Customizations)||void 0===C||null===(C=C[null==w?void 0:w.masterName])||void 0===C||null===(C=C[null==w?void 0:w.moduleName])||void 0===C||C.postProcess(v,t));const{register:N,handleSubmit:A,setValue:S,getValues:T,reset:F,watch:D,trigger:B,control:I,formState:R,errors:P,setError:L,clearErrors:_,unregister:O}=(0,i.mN)({defaultValues:null==t?void 0:t.defaultValues}),V=D();(0,l.useEffect)((()=>{k=Object.values(null==R?void 0:R.dirtyFields)}),[R]);const M=(e,a)=>{var l,n,i;null==a||null===(l=a.preventDefault)||void 0===l||l.call(a);const o=!(null===(n=Digit)||void 0===n||null===(n=n.Customizations)||void 0===n||null===(n=n[null==w?void 0:w.masterName])||void 0===n||null===(n=n[null==w?void 0:w.moduleName])||void 0===n||!n.customValidationCheck)&&(null===(i=Digit)||void 0===i||null===(i=i.Customizations)||void 0===i||null===(i=i[null==w?void 0:w.masterName])||void 0===i||null===(i=i[null==w?void 0:w.moduleName])||void 0===i?void 0:i.customValidationCheck(e));if(o)return x(o),void setTimeout(G,3e3);k.length>=(null==t?void 0:t.minReqFields)?E({type:"filter"===(null==t?void 0:t.type)?"filterForm":"searchForm",state:{...e}}):(x({type:"warning",label:f("ES_COMMON_MIN_SEARCH_CRITERIA_MSG")}),setTimeout(G,3e3))},G=()=>{x(null)};return n().createElement(n().Fragment,null,n().createElement("div",{className:"search-wrapper"},a&&("filter"===(null==t?void 0:t.type)?n().createElement("div",{className:"filter-header-wrapper"},n().createElement("div",{className:"icon-filter"},n().createElement(p.YG,null)),n().createElement("div",{className:"label"},f(a)),n().createElement("div",{className:"icon-refresh",onClick:()=>{F(null==t?void 0:t.defaultValues),E({type:"clearFilterForm",state:{...null==t?void 0:t.defaultValues}})}},n().createElement(p.fN,null))):n().createElement(c.A,{styles:null==t?void 0:t.headerStyle},f(a))),n().createElement("form",{onSubmit:A(M),onKeyDown:e=>(e=>{e.keyCode?e.keyCode:e.key?e.key:e.which})(e)},n().createElement("div",null,(null==t?void 0:t.showFormInstruction)&&n().createElement("p",{className:"search-instruction-header"},f(null==t?void 0:t.showFormInstruction)),n().createElement("div",{className:"search-field-wrapper ".concat(g," ").concat(null==t?void 0:t.type," ").concat(null!=t&&t.formClassName?null==t?void 0:t.formClassName:"")},n().createElement(s.A,{fields:null==t?void 0:t.fields,control:I,formData:V,errors:P,register:N,setValue:S,getValues:T,setError:L,clearErrors:_,labelStyle:{fontSize:"16px"},apiDetails:w,data:v}),n().createElement("div",{className:"search-button-wrapper ".concat(g," ").concat(null==t?void 0:t.type," ").concat(null==t?void 0:t.searchWrapperClassName),style:null==t?void 0:t.searchWrapperStyles},(null==t?void 0:t.secondaryLabel)&&n().createElement(d.A,{style:{marginBottom:0,whiteSpace:"nowrap"},onClick:()=>{F(null==t?void 0:t.defaultValues),E({type:"clearSearchForm",state:{...null==t?void 0:t.defaultValues}}),E({type:"clearTableForm"})}},f(null==t?void 0:t.secondaryLabel)),(null==t?void 0:t.isPopUp)&&(null==t?void 0:t.primaryLabel)&&n().createElement(m.A,{label:f(null==t?void 0:t.primaryLabel),onSubmit:e=>{A(M)(e)},disabled:!1}),!(null!=t&&t.isPopUp)&&(null==t?void 0:t.primaryLabel)&&n().createElement(m.A,{label:f(null==t?void 0:t.primaryLabel),submit:"submit",disabled:!1}))))),y&&n().createElement(u.A,{type:null!=y&&y.error?"error":null!=y&&y.type?null==y?void 0:y.type:"",label:f(y.label),isDleteBtn:!0,onClose:G})))}},zgF6:(e,t,a)=>{a.d(t,{A:()=>u});var l=a("C6rw"),n=a.n(l),i=a("17x9"),o=a.n(i),r=a("rTr4"),s=a("Lfsa"),c=a("vA+l"),d=a("sqMA");const m=e=>{const[t,a]=(0,l.useState)(!0),[i,o]=(0,l.useState)(!1);(0,l.useEffect)((()=>{const t=setTimeout((()=>{a(!1),e.onClose&&e.onClose()}),null!=e&&e.transitionTime?e.transitionTime:5e3),l=setTimeout((()=>{o(!0)}),100);return()=>{clearTimeout(t),clearTimeout(l)}}),[e.transitionTime,e.onClose]);const m=()=>{a(!1)};let u;switch(null==e?void 0:e.type){case"success":u="digit-success";break;case"error":u="digit-error";break;case"warning":u="digit-warning";break;case"info":u="digit-info";break;default:u=(null==e?void 0:e.variant)||""}const p=null!=e&&e.isWarningButtons?"digit-warning-buttons":"",g=(0,c.A)("TOSENTENCECASE",e.label),h=d.J.lightTheme.paper.primary;if(!t)return null;if("warning"===(null==e?void 0:e.type))return n().createElement("div",null,n().createElement("div",{className:"digit-toast-success ".concat(t&&i?"animate":""," ").concat(u," ").concat(p),style:{...e.style}},null!=e&&e.isWarningButtons?n().createElement("div",{className:"digit-toast-sub-container"},n().createElement(r.t.Error,{fill:h}),n().createElement("div",{className:"toast-label",style:{...e.labelstyle}},g),e.isDleteBtn?n().createElement(r.t.Close,{fill:h,className:"digit-toast-close-btn",style:{cursor:"pointer"},onClick:e.onClose?e.onClose:m}):null):n().createElement(n().Fragment,null,n().createElement(r.t.Warning,{fill:h}),n().createElement("div",{className:"toast-label",style:{...e.labelstyle}},g),n().createElement(r.t.Close,{fill:h,className:"digit-toast-close-btn",style:{cursor:"pointer"},onClick:e.onClose?e.onClose:m})),null!=e&&e.isWarningButtons?n().createElement("div",{className:"digit-warning-button-container"},n().createElement(s.A,{theme:"border",label:"NO",onClick:e.onNo}),n().createElement(s.A,{label:"YES",onClick:e.onYes})):null));const v="error"===(null==e?void 0:e.type)?n().createElement(r.t.Error,{fill:h}):"info"===(null==e?void 0:e.type)?n().createElement(r.t.Info,{fill:h}):n().createElement(r.t.CheckCircle,{fill:h});return n().createElement("div",{className:"digit-toast-success ".concat(t&&i?"animate":""," ").concat(u),style:{...e.style}},v,n().createElement("div",{className:"toast-label",style:{...e.labelstyle}},g),n().createElement(r.t.Close,{fill:h,className:"digit-toast-close-btn",style:{cursor:"pointer"},onClick:e.onClose?e.onClose:m}))};m.propTypes={label:o().string,onClose:o().func,isDleteBtn:o().bool,transitionTime:o().number,type:o().string},m.defaultProps={label:"",onClose:void 0,isDleteBtn:!1};const u=m}}]);
|