(this["webpackJsonp@openimis/fe"]=this["webpackJsonp@openimis/fe"]||[]).push([[0],{341:function(e){e.exports=JSON.parse('{"name":"@openimis/fe","version":"24.04","license":"AGPL-3.0-only","proxy":"http://localhost:8000","homepage":"http://localhost:3000/front","dependencies":{"@date-io/core":"^1.3.13","@date-io/moment":"^1.3.13","@material-ui/core":"^4.9.14","@material-ui/icons":"^4.9.1","@material-ui/lab":"^4.0.0-alpha.58","@material-ui/pickers":"^3.2.10","classnames":"^2.2.6","clsx":"^1.1.1","lodash":"^4.17.15","lodash-uuid":"^0.0.3","moment":"^2.25.3","prop-types":"^15.7.2","react":"^17.0.2","react-autosuggest":"^10.0.2","react-dom":"^17.0.2","react-helmet":"^6.1.0","react-intl":"^5.8.1","react-redux":"^7.2.0","react-scripts":"4.0.3","redux":"^4.0.5","redux-api-middleware":"^3.2.1","redux-thunk":"^2.3.0","shelljs":"^0.8.4","@openimis/fe-core":"git+https://github.com/mngoe/openimis-fe-core_js.git#main-csu","@openimis/fe-program":"git+https://github.com/mngoe/openimis-fe-program_js.git#main-csu","@openimis/fe-csu":"git+https://github.com/mngoe/openimis-fe-csu_js.git#main","@openimis/fe-cmr-cs":"git+https://github.com/mngoe/openimis-fe-cmr-cs_js.git#main-csu","@openimis/fe-location":"git+https://github.com/mngoe/openimis-fe-location_js.git#main-csu","@openimis/fe-insuree":"git+https://github.com/mngoe/openimis-fe-insuree_js.git#main-csu","@openimis/fe-medical":"git+https://github.com/mngoe/openimis-fe-medical_js.git#main-csu","@openimis/fe-product":"git+https://github.com/mngoe/openimis-fe-product_js.git#main-csu","@openimis/fe-policy":"git+https://github.com/mngoe/openimis-fe-policy_js.git#main-csu","@openimis/fe-contribution":"git+https://github.com/mngoe/openimis-fe-contribution_js.git#main-csu","@openimis/fe-claim":"git+https://github.com/mngoe/openimis-fe-claim_js.git#main-csu","@openimis/fe-admin":"git+https://github.com/mngoe/openimis-fe-admin_js.git#main-csu","@openimis/fe-tools":"git+https://github.com/mngoe/openimis-fe-tools_js.git#main-csu","@openimis/fe-invoice":"git+https://github.com/mngoe/openimis-fe-invoice_js.git#main-csu","@openimis/fe-individual":">=1.0.0","@openimis/fe-home":">=v1.5.3","@openimis/fe-medical_pricelist":">=v1.6.0","@openimis/fe-payer":">=v1.4.4","@openimis/fe-claim_batch":">=v1.4.3","@openimis/fe-profile":">=v1.6.1","@openimis/fe-language_fr":">=v1.6.2","@openimis/fe-calculation":">=v1.5.1","@openimis/fe-policyholder":">=v1.5.1","@openimis/fe-contribution_plan":">=v1.7.0","@openimis/fe-payment_cycle":">=v1.0.1","@openimis/fe-contract":">=v1.5.1","@openimis/fe-language_fr_cmr_csu":"git+https://github.com/mngoe/openimis-fe-language_fr_cmr_csu_js-.git#main"},"scripts":{"start":"react-scripts start","build":"react-scripts build","load-config":"node ./openimis-config.js","postinstall":"node script/postinstall.js","format":"prettier src -w","check-package":"node script/check-package.js"},"eslintConfig":{"extends":["react-app"],"rules":{"space-before-function-paren":0,"react/jsx-boolean-value":0}},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"resolutions":{"caniuse-lite":"1.0.30001632"},"devDependencies":{"flat":"^5.0.2","http-proxy-middleware":"^2.0.1","prettier":"^2.3.2"}}')},456:function(e){e.exports=JSON.parse('{"appName":"openIMIS","close":"Close","ok":"Ok","cancel":"Cancel","empty":" ","FatalError.title":"Fatal Error","FatalError.message":"Requested action can\'t be executed, please check your internet connection,...","currency":"FCFA","rowsPerPage":"Rows Per Page","ofPages":"of","selectAll":"Select All","clearSelected":"Clear Selection","autosuggest.more":"... other options matching search, please refine","search.title":"Search Criteria","search.apply":"Apply","search.dialog.title":"Adapt Search Criteria","picker.close":"Close","picker.select":"Select","noRecord":"No Record To Display","row.actions":"Actions","row.delete":"Are you sure delete this row?","year":"Year","year.null":"Any","month":"Month","month.null":"Any","month.1":"January","month.2":"February","month.3":"March","month.4":"April","month.5":"May","month.6":"June","month.7":"Jully","month.8":"August","month.9":"September","month.10":"October","month.11":"November","month.12":"December","validation.minValue":"{value} under allowed {min}","validation.maxValue":"{value} above allowed {max}","addTooltip":"Create new","saveTooltip":"Save changes","resetFilterTooltip":"Reset filters","refreshFilterTooltip":"Search"}')},723:function(e,t,i){"use strict";i.r(t),i.d(t,"LanguageFrCmrCSUModule",(function(){return c}));var a=i(455),o=i.n(a);function l(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,a)}return i}function r(e){for(var t=1;t{e.onupdatefound=()=>{const i=e.installing;null!=i&&(i.onstatechange=()=>{"installed"===i.state&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://bit.ly/CRA-PWA."),t&&t.onUpdate&&t.onUpdate(e)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(e)))})}})).catch((e=>{console.error("Error during service worker registration:",e)}))}var y=i(165),b=i(330);var P=Object(y.b)({overrides:{MuiTableRow:{root:{"&$selected":{backgroundColor:"rgba(0, 0, 0, 0.08)"}}},MuiFormLabel:{asterisk:{color:"#db3131","&$error":{color:"#db3131"}}}},palette:{primary:{main:"#006273"},secondary:{main:"#fff"},error:{main:"#801a00"},text:{primary:"#006273",secondary:"#006273",second:"#fff",error:"#801a00"},toggledButton:"#999999"},typography:{useNextVariants:!0,fontFamily:["Rubik","Roboto",'"Helvetica Neue"',"sans-serif"].join(","),fontSize:14,fontWeightRegular:300,fontWeightMedium:400,title:{fontSize:20,fontWeight:300},label:{color:"grey"}},jrnlDrawer:{open:{width:500},close:{width:80},itemDetail:{marginLeft:8},iconSize:24},menu:{variant:"AppBar",drawer:{width:300,fontSize:16,backgroundColor:"#006273"},appBar:{fontSize:16}},page:{padding:16,locked:{background:"repeating-linear-gradient(45deg, #D3D3D3 1px, #D3D3D3 1px, #fff 10px, #fff 10px);"}},paper:{paper:{margin:10,backgroundColor:"#dbeef0"},header:{color:"#006273",backgroundColor:"#b7d4d8"},message:{backgroundColor:"#b7d4d8"},title:{padding:10,fontSize:24,color:"#006273",backgroundColor:"#b7d4d8"},action:{padding:5},divider:{padding:0,margin:0},body:{marginTop:10,backgroundColor:"#dbeef0"},item:{padding:10}},table:{title:{padding:10,fontWeight:500,color:"#006273",backgroundColor:"#b7d4d8"},header:{color:"#006273"},headerAction:{padding:5},row:{color:"#006273",align:"center","&:hover":{background:"rgba(0, 0, 0, 0.12) !important"}},cell:{padding:5},lockedRow:{background:"repeating-linear-gradient(45deg, #D3D3D3 1px, #D3D3D3 1px, #fff 10px, #fff 10px);"},lockedCell:{},highlightedRow:{},highlightedCell:{fontWeight:500,align:"center"},secondaryHighlightedRow:{backgroundColor:"#cbedf2"},secondaryHighlightedCell:{},highlightedAltRow:{},highlightedAltCell:{fontStyle:"italic",align:"center"},disabledRow:{},disabledCell:{color:"grey",align:"center"},footer:{color:"#006273"},pager:{color:"#006273"}},form:{spacing:10},formTable:{table:{color:"#006273"},actions:{color:"#006273"},header:{color:"#006273",align:"center"}},dialog:{title:{fontWeight:500,color:"grey"},content:{padding:0},primaryButton:{backgroundColor:"#006273",color:"#fff",fontWeight:"bold","&:hover":{backgroundColor:Object(b.alpha)("#006273",.5),color:"#006273"}},secondaryButton:{}},tooltipContainer:{position:"fixed",bottom:15,right:8,zIndex:2e3,display:"flex",flexDirection:"column",alignItems:"flex-end"},flexTooltip:{marginBottom:5},fab:{position:"fixed",bottom:20,right:8,zIndex:2e3},fakeInput:{},bigAvatar:{width:160,height:160},buttonContainer:{horizontal:{display:"flex",flexWrap:"nowrap",overflowX:"auto",justifyContent:"flex-end"}}}),g=i(416),v=i(16);var f=i(224);const h=(()=>{try{const e=localStorage.getItem("state");if(null===e)return;return JSON.parse(e)}catch(e){return}})(),C=v.d;var D=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(v.e)(Object(v.c)({...e}),h,C(Object(v.a)(g.a,f.apiMiddleware,...t)))};const T={en:"en","en-GB":"en",fr:"fr","fr-FR":"fr"};var S=class{getLocale(e){return"en"}getFileNameByLang(e){return T[e]}};const F=["@openimis/fe-core","@openimis/fe-program","@openimis/fe-csu","@openimis/fe-cmr-cs","@openimis/fe-location","@openimis/fe-insuree","@openimis/fe-medical","@openimis/fe-product","@openimis/fe-policy","@openimis/fe-contribution","@openimis/fe-claim","@openimis/fe-admin","@openimis/fe-tools","@openimis/fe-invoice","@openimis/fe-individual","@openimis/fe-home","@openimis/fe-medical_pricelist","@openimis/fe-payer","@openimis/fe-claim_batch","@openimis/fe-profile","@openimis/fe-language_fr","@openimis/fe-calculation","@openimis/fe-policyholder","@openimis/fe-contribution_plan","@openimis/fe-payment_cycle","@openimis/fe-contract","@openimis/fe-language_fr_cmr_csu"];var R=i(22),A=i(341),k=i(1);var I=class{constructor(e){this.getContribs=Object(R.memoize)((e=>this.modules.reduce(((t,i)=>[...t,...Object(k.ensureArray)(i[e])]),[]))),this.cfg=e;try{this.modules=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[];try{t.push(i(1).CoreModule(e["fe-core"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-core". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(647).ProgramModule(e["fe-program"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-program". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(648).CsuModule(e["fe-csu"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-csu". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(649).CmrCsModule(e["fe-cmr-cs"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-cmr-cs". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(731).LocationModule(e["fe-location"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-location". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(732).InsureeModule(e["fe-insuree"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-insuree". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(650).MedicalModule(e["fe-medical"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-medical". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(733).ProductModule(e["fe-product"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-product". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(737).PolicyModule(e["fe-policy"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-policy". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(738).ContributionModule(e["fe-contribution"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-contribution". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(734).ClaimModule(e["fe-claim"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-claim". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(730).AdminModule(e["fe-admin"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-admin". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(735).ToolsModule(e["fe-tools"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-tools". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(739).InvoiceModule(e["fe-invoice"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-invoice". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(708).IndividualModule(e["fe-individual"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-individual". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(709).HomeModule(e["fe-home"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-home". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(710).MedicalPriceListModule(e["fe-medical_pricelist"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-medical_pricelist". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(711).PayerModule(e["fe-payer"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-payer". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(740).ClaimBatchModule(e["fe-claim_batch"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-claim_batch". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(736).ProfileModule(e["fe-profile"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-profile". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(712).LanguageFrModule(e["fe-language_fr"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-language_fr". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(728).CalculationModule(e["fe-calculation"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-calculation". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(719).PolicyHolderModule(e["fe-policyholder"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-policyholder". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(741).ContributionPlanModule(e["fe-contribution_plan"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-contribution_plan". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(721).PaymentCycleModule(e["fe-payment_cycle"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-payment_cycle". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(722).ContractModule(e["fe-contract"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-contract". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}try{t.push(i(723).LanguageFrCmrCSUModule(e["fe-language_fr_cmr_csu"]||{}))}catch(a){alert('Failed to load module "@openimis/fe-language_fr_cmr_csu". More details can be found in the developer console. Look for: '.concat(a)),console.error(a)}return t}(e)}catch(t){throw new Error("Loading modules failed in ModulesManager.js. This might be caused by duplicated modules in /src/modules.js. \n ORIGINAL ERROR: "+t)}this.contributionsCache={},this.controlsCache=this.buildControlsCache(),this.refsCache=this.buildRefsCache(),this.reportsCache=this.buildReportsCache()}buildControlsCache(){const e={};for(var t in this.cfg)if(this.cfg[t].controls)for(var i in this.cfg[t].controls){var a=this.cfg[t].controls[i];e[t+"."+a.field]=a.usage}return e}buildRefsCache(){return this.getContribs("refs").reduce(((e,t)=>(e[t.key]=t.ref,e)),{})}buildReportsCache(){return this.getContribs("reports").reduce(((e,t)=>(t.getParams||console.error("Report ".concat(t.key," has no getParams function.")),t.isValid||console.error("Report ".concat(t.key," has no isValid function.")),e[t.key]=t,e)),{})}getOpenIMISVersion(){return A.version}getModulesVersions(){return F.map((e=>{var t;return"".concat(e,"@").concat(null!==(t=A.dependencies[e])&&void 0!==t?t:"?")}))}hideField(e,t){return 1&this.controlsCache["fe-"+e+"."+t]}getRef(e){return this.refsCache[e]}getReport(e){return this.reportsCache[e]}getProjection(e){const t=this.getRef(e);return t?"{".concat(t.join(", "),"}"):""}getConf(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const a=this.cfg[e]||{};return void 0!==a[t]?a[t]:i}},E=i(15),w=i.n(E);class L extends a.Component{getChildContext(){const{modulesManager:e}=this.props;return{modulesManager:e}}render(){return a.Children.only(this.props.children)}}L.childContextTypes={modulesManager:w.a.object.isRequired};var M=L,N=i(456),H=(i(726),i.p+"static/media/LOGOMINSANTEok.3f5b5b81.jpg"),x=i(134);const B=()=>{const[e,t]=o.a.useState({isLoading:!0,config:void 0,error:null}),i=new S;if(Object(a.useEffect)((()=>{(async()=>{const e=await fetch("".concat(k.baseApiUrl,"/graphql"),{method:"post",headers:Object(k.apiHeaders)(),body:JSON.stringify({query:"{ moduleConfigurations { module, config, controls{ field, usage } } }"})});if(e.ok){const{data:t}=await e.json();return t.moduleConfigurations.unshift({}),t.moduleConfigurations.reduce(((e,t)=>{try{e[t.module]={controls:t.controls,...JSON.parse(t.config)}}catch(i){console.error("Failed to parse module ".concat(t.module," config"),i)}return e}))}throw e})().then((e=>t({error:null,isLoading:!1,config:e})),(e=>t({error:e,isLoading:!1})))}),[]),e.isLoading)return Object(x.jsx)(n.a,{theme:P,children:Object(x.jsx)(c.a,{className:"bootstrap"})});if(e.error)return Object(x.jsx)(k.FatalError,{error:{code:e.error.status,message:e.error.statusText}});{const t=new I(e.config),a=t.getContribs("reducers").reduce(((e,t)=>(e[t.key]=t.reducer,e)),[]),o=t.getContribs("middlewares");return Object(x.jsx)(n.a,{theme:P,children:Object(x.jsx)(s.a,{store:D(a,o),children:Object(x.jsx)(m.a,{utils:u.a,children:Object(x.jsx)(M,{modulesManager:t,children:Object(x.jsx)(k.App,{basename:"/front",localesManager:i,messages:N,logo:H})})})})})}};r.a.render(Object(x.jsx)(B,{}),document.getElementById("root")),function(e){if("serviceWorker"in navigator){if(new URL("/front",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",(()=>{const t="".concat("/front","/service-worker.js");d?(!function(e,t){fetch(e).then((i=>{const a=i.headers.get("content-type");404===i.status||null!=a&&-1===a.indexOf("javascript")?navigator.serviceWorker.ready.then((e=>{e.unregister().then((()=>{window.location.reload()}))})):p(e,t)})).catch((()=>{console.log("No internet connection found. App is running in offline mode.")}))}(t,e),navigator.serviceWorker.ready.then((()=>{console.log("This web app is being served cache-first by a service worker. To learn more, visit https://bit.ly/CRA-PWA")}))):p(t,e)}))}}()}},[[729,1,2]]]); //# sourceMappingURL=main.77beacee.chunk.js.map