(this["webpackJsonp@openimis/fe"]=this["webpackJsonp@openimis/fe"]||[]).push([[0],{382: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","@sentry/react":"^7.119.0","@openimis/fe-core":"git+https://github.com/mngoe/openimis-fe-core_js.git#test-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#test-csu","@openimis/fe-location":"git+https://github.com/mngoe/openimis-fe-location_js.git#test-csu","@openimis/fe-insuree":"git+https://github.com/mngoe/openimis-fe-insuree_js.git#test-csu","@openimis/fe-medical":"git+https://github.com/mngoe/openimis-fe-medical_js.git#test-csu","@openimis/fe-product":"git+https://github.com/Y-Note-SAS/openimis-fe-product_js.git#test-csu","@openimis/fe-policy":"git+https://github.com/mngoe/openimis-fe-policy_js.git#test-csu","@openimis/fe-contribution":"git+https://github.com/mngoe/openimis-fe-contribution_js.git#test-csu","@openimis/fe-claim":"git+https://github.com/mngoe/openimis-fe-claim_js.git#test-csu","@openimis/fe-admin":"git+https://github.com/mngoe/openimis-fe-admin_js.git#test-csu","@openimis/fe-tools":"git+https://github.com/mngoe/openimis-fe-tools_js.git#test-csu","@openimis/fe-invoice":"git+https://github.com/mngoe/openimis-fe-invoice_js.git#test-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","@openimis/fe-cache":"git+https://github.com/Y-Note-SAS/openimis-fe-cache-manager_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","minimatch":"3.1.1"},"devDependencies":{"flat":"^5.0.2","http-proxy-middleware":"^2.0.1","prettier":"^2.3.2"}}')},519: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"}')},839:function(e,o,t){},842:function(e,o,t){"use strict";t.r(o);t(560),t(584);var i=t(84),r=t(920),n=t(926),a=t(927),c=t(0),l=t.n(c),s=t(54),d=t.n(s),u=t(914),p=t(866),f=t(6),m=t(473),h=t(107);const g=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function b(e,o){navigator.serviceWorker.register(e).then(e=>{e.onupdatefound=()=>{const t=e.installing;null!=t&&(t.onstatechange=()=>{"installed"===t.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."),o&&o.onUpdate&&o.onUpdate(e)):(console.log("Content is cached for offline use."),o&&o.onSuccess&&o.onSuccess(e)))})}}).catch(e=>{console.error("Error during service worker registration:",e)})}var y=t(187),v=t(368);var k=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(v.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"}}}),M=t(474),C=t(16);var j=t(249);const w=(()=>{try{const e=localStorage.getItem("state");if(null===e)return;return JSON.parse(e)}catch(e){return}})(),x=C.d;var _=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(C.e)(Object(C.c)({...e}),w,x(Object(C.a)(M.a,j.apiMiddleware,...o)))};const F={en:"en","en-GB":"en",fr:"fr","fr-FR":"fr"};var L=class{getLocale(e){return"en"}getFileNameByLang(e){return F[e]}};const S=["@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","@openimis/fe-cache"];var O=t(20),R=t(382),A=t(1);var D=class{constructor(e){this.getContribs=Object(O.memoize)(e=>this.modules.reduce((o,t)=>[...o,...Object(A.ensureArray)(t[e])],[])),this.cfg=e;try{this.modules=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=[];try{o.push(t(1).CoreModule(e["fe-core"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-core". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(719).ProgramModule(e["fe-program"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-program". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(720).CsuModule(e["fe-csu"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-csu". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(721).CmrCsModule(e["fe-cmr-cs"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-cmr-cs". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(844).LocationModule(e["fe-location"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-location". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(845).InsureeModule(e["fe-insuree"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-insuree". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(722).MedicalModule(e["fe-medical"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-medical". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(846).ProductModule(e["fe-product"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-product". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(850).PolicyModule(e["fe-policy"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-policy". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(851).ContributionModule(e["fe-contribution"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-contribution". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(847).ClaimModule(e["fe-claim"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-claim". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(843).AdminModule(e["fe-admin"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-admin". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(848).ToolsModule(e["fe-tools"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-tools". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(852).InvoiceModule(e["fe-invoice"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-invoice". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(767).IndividualModule(e["fe-individual"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-individual". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(768).HomeModule(e["fe-home"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-home". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(769).MedicalPriceListModule(e["fe-medical_pricelist"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-medical_pricelist". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(770).PayerModule(e["fe-payer"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-payer". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(853).ClaimBatchModule(e["fe-claim_batch"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-claim_batch". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(849).ProfileModule(e["fe-profile"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-profile". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(771).LanguageFrModule(e["fe-language_fr"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-language_fr". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(841).CalculationModule(e["fe-calculation"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-calculation". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(778).PolicyHolderModule(e["fe-policyholder"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-policyholder". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(854).ContributionPlanModule(e["fe-contribution_plan"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-contribution_plan". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(780).PaymentCycleModule(e["fe-payment_cycle"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-payment_cycle". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(781).ContractModule(e["fe-contract"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-contract". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(782).LanguageFrCmrCSUModule(e["fe-language_fr_cmr_csu"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-language_fr_cmr_csu". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}try{o.push(t(785).CacheModule(e["fe-cache"]||{}))}catch(i){alert('Failed to load module "@openimis/fe-cache". More details can be found in the developer console. Look for: '.concat(i)),console.error(i)}return o}(e)}catch(o){throw new Error("Loading modules failed in ModulesManager.js. This might be caused by duplicated modules in /src/modules.js. \n ORIGINAL ERROR: "+o)}this.contributionsCache={},this.controlsCache=this.buildControlsCache(),this.refsCache=this.buildRefsCache(),this.reportsCache=this.buildReportsCache()}buildControlsCache(){const e={};for(var o in this.cfg)if(this.cfg[o].controls)for(var t in this.cfg[o].controls){var i=this.cfg[o].controls[t];e[o+"."+i.field]=i.usage}return e}buildRefsCache(){return this.getContribs("refs").reduce((e,o)=>(e[o.key]=o.ref,e),{})}buildReportsCache(){return this.getContribs("reports").reduce((e,o)=>(o.getParams||console.error("Report ".concat(o.key," has no getParams function.")),o.isValid||console.error("Report ".concat(o.key," has no isValid function.")),e[o.key]=o,e),{})}getOpenIMISVersion(){return R.version}getModulesVersions(){return S.map(e=>{var o;return"".concat(e,"@").concat(null!==(o=R.dependencies[e])&&void 0!==o?o:"?")})}hideField(e,o){return 1&this.controlsCache["fe-"+e+"."+o]}getRef(e){return this.refsCache[e]}getReport(e){return this.reportsCache[e]}getProjection(e){const o=this.getRef(e);return o?"{".concat(o.join(", "),"}"):""}getConf(e,o){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const i=this.cfg[e]||{};return void 0!==i[o]?i[o]:t}},N=t(14),P=t.n(N);class T extends c.Component{getChildContext(){const{modulesManager:e}=this.props;return{modulesManager:e}}render(){return c.Children.only(this.props.children)}}T.childContextTypes={modulesManager:P.a.object.isRequired};var I=T,W=t(519),E=(t(839),t.p+"static/media/LOGOMINSANTEok.3f5b5b81.jpg"),B=t(131);const z=()=>{const[e,o]=l.a.useState({isLoading:!0,config:void 0,error:null}),t=new L;if(Object(c.useEffect)(()=>{(async()=>{const e=await fetch("".concat(A.baseApiUrl,"/graphql"),{method:"post",headers:Object(A.apiHeaders)(),body:JSON.stringify({query:"{ moduleConfigurations { module, config, controls{ field, usage } } }"})});if(e.ok){const{data:o}=await e.json();return o.moduleConfigurations.unshift({}),o.moduleConfigurations.reduce((e,o)=>{try{e[o.module]={controls:o.controls,...JSON.parse(o.config)}}catch(t){console.error("Failed to parse module ".concat(o.module," config"),t)}return e})}throw i.c(new Error("".concat(e.status," ").concat(e.statusText))),e})().then(e=>{o({error:null,isLoading:!1,config:e})},e=>{o({error:e,isLoading:!1})})},[]),e.isLoading)return Object(B.jsx)(u.a,{theme:k,children:Object(B.jsx)(p.a,{className:"bootstrap"})});if(e.error)return Object(B.jsx)(A.FatalError,{error:{code:e.error.status,message:e.error.statusText}});{const o=new D(e.config),i=o.getConf("fe","sentryDSN","");i&&r.a({dsn:i,debug:!1,integrations:[n.a()]});const a=o.getContribs("reducers").reduce((e,o)=>(e[o.key]=o.reducer,e),[]),c=o.getContribs("middlewares");return Object(B.jsx)(u.a,{theme:k,children:Object(B.jsx)(f.a,{store:_(a,c),children:Object(B.jsx)(h.a,{utils:m.a,children:Object(B.jsx)(I,{modulesManager:o,children:Object(B.jsx)(A.App,{basename:"/front",localesManager:t,messages:W,logo:E})})})})})}};d.a.render(Object(B.jsx)(a.a,{fallback:Object(B.jsx)(A.FatalError,{error:{code:500,message:"An unexpected error occurred"}}),showDialog:!0,children:Object(B.jsx)(z,{})}),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 o="".concat("/front","/service-worker.js");g?(!function(e,o){fetch(e).then(t=>{const i=t.headers.get("content-type");404===t.status||null!=i&&-1===i.indexOf("javascript")?navigator.serviceWorker.ready.then(e=>{e.unregister().then(()=>{window.location.reload()})}):b(e,o)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}(o,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")})):b(o,e)})}}()}},[[842,1,2]]]); //# sourceMappingURL=main.95e245f4.chunk.js.map