{"version":3,"sources":["assets/img/Moneris_logo_new.png","assets/img/header_logo.png","components/GoogleCharts.js","config.js","_services/datacontext.service.js","components/Footer.js","components/Home.js","components/NotFound.js","components/App.js","index.js"],"names":["module","exports","GoogleCharts","props","useState","chartsData","setChartsData","id","graphId","t","useTranslation","useEffect","dataRows","data","i","length","para_arr","push","resultData","type","label","populateChartData","chartType","loader","graphID","width","height","options","title","legend","position","hAxis","format","vAxis","series","2","lineDashStyle","3","Config","url","parameters","params","axios","get","then","response","Footer","className","languages","code","name","country_code","require","ReactExport","ExcelFile","ExcelSheet","ExcelColumn","Home","currentLanguageCode","cookies","currentLanguage","find","l","loading","setLoading","React","selectedTabIndex","setSelectedTabIndex","setRetaildata","setTraveldata","setServicedata","onTabSelection","tabIndex","cyear","dataContextService","res","datChange","Retail","datSer","Services","datTra","TravelEntertainment","retail","map","ele","new_start_date_Event","Date","start_date_Event","toLocaleDateString","day","month","year","split","join","services","travelEntertainment","newData","document","body","dir","href","onClick","NotFound","to","App","fallback","basename","exact","path","component","i18next","use","HttpApi","LanguageDetector","initReactI18next","init","supportedLngs","fallbackLng","debug","detection","order","caches","backend","loadPath","loadingMarkup","ReactDOM","render","StrictMode","getElementById"],"mappings":"iJAAAA,EAAOC,QAAU,IAA0B,8C,kVCA3CD,EAAOC,QAAU,IAA0B,yC,uLCsF5BC,MA9Ef,SAAsBC,GAEpB,MAAoCC,mBAAS,IAA7C,mBAAOC,EAAP,KAAmBC,EAAnB,KACA,EAA8BF,mBAASD,EAAMI,IAA7C,mBAAOC,EAAP,KAEQC,GAFR,KAEcC,cAAND,GAsCR,OAnCAE,qBAAU,YAKV,WAeE,IAbA,IASIC,EAAW,GAEXC,EAAOV,EAAMU,KAERC,EAAI,EAAGA,EAAID,EAAKE,OAAQD,IAAK,CACpC,IAAIE,EAAW,GACfA,EAASC,KAAKJ,EAAKC,GAAL,qBAAkCD,EAAKC,GAAL,qBAAkC,KAClFE,EAASC,KAAKJ,EAAKC,GAAL,UAAuBD,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B,gBAAiB3D,GAAG,YACzF,6BACE,4BAAKE,EAAE,oEACP,6BACA,6BACIsD,EAAU,aAAe,kBAAC,EAAD,CAAcxD,GAAG,WAAWM,KAAMR,EAAWyF,iBAOpF,kBAAC,EAAD,QC/WWQ,EAXE,WAEf,OACE,yBAAKvD,UAAU,mBACb,qDACA,kBAAC,IAAD,CAAMwD,GAAG,KAAT,kB,OC2BSC,MAtBf,WAEE,OAEE,kBAAC,WAAD,CAAUC,SAAU,MAElB,kBAAC,IAAD,CAAQC,SAAU,yBAEhB,kBAAC,IAAD,KAEE,kBAAC,IAAD,CAAOC,OAAK,EAACC,KAAK,QAAQC,UAAWpD,IAErC,kBAAC,IAAD,CAAOkD,OAAK,EAACC,KAAK,IAAIC,UAAWpD,IAEjC,kBAAC,IAAD,CAAOoD,UAAWP,Q,qBClB5BQ,IACGC,IAAIC,KACJD,IAAIE,KACJF,IAAIG,KACJC,KAAK,CACJC,cAAe,CAAC,KAAM,MACtBC,YAAa,KACbC,OAAO,EAEPC,UAAW,CACTC,MAAO,CAAC,OAAQ,SAAU,WAC1BC,OAAQ,CAAC,WAGXC,QAAS,CACPC,SAAU,kEAIhB,IAAMC,EACJ,yBAAK7E,UAAU,oBACb,0CAIJ8E,IAASC,OACP,kBAAC,WAAD,CAAUrB,SAAUmB,GACpB,kBAAC,IAAMG,WAAP,KACE,kBAAC,EAAD,QAGF9B,SAAS+B,eAAe,W","file":"static/js/main.85bf06a3.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/Moneris_logo_new.cab89886.png\";","module.exports = __webpack_public_path__ + \"static/media/header_logo.bf415eef.png\";","// import React and other necessary modules\nimport React, { useState, useEffect } from 'react'; \n// import Google Chart component\nimport Chart from \"react-google-charts\"; \n// import useTranslation hook for translations\nimport { useTranslation } from \"react-i18next\"; \n\n// define GoogleCharts function component with props as input\nfunction GoogleCharts(props) { \n // create state variables for chart data and chart id \n const [chartsData, setChartsData] = useState([]); \n const [graphId, setGraphId] = useState(props.id);\n // use useTranslation hook to get access to i18n translation functions\n const { t } = useTranslation(); \n\n // use useEffect hook to populate the chart data\n useEffect(() => { \n populateChartData();\n }, []);\n\n // define a function to populate the chart data\n function populateChartData() { \n // define the columns for the chart \n const columns = [ \n { type: \"string\", label: \"Date\" },\n { type: \"number\", label: \"Yr-over-Yr % Vol Growth\" },\n { type: \"number\", label: \"Yr-over-Yr % Txn Growth\" },\n { type: \"number\", label: \"Yr-over-Yr % Vol Growth AVG\" },\n { type: \"number\", label: \"Yr-over-Yr % Txn Growth AVG\" }\n ];\n\n // create an empty array to store the chart data rows\n let dataRows = []; \n // get the chart data from the props \n let data = props.data; \n // loop through the data and push each row to the dataRows array \n for (let i = 0; i < data.length; i++) { \n let para_arr = [];\n para_arr.push(data[i]['new_start_date_Event'] ? data[i]['new_start_date_Event'] : \"0\")\n para_arr.push(data[i]['VolGrowth'] ? data[i]['VolGrowth'] : 0)\n para_arr.push(data[i]['TxnGrowth'] ? data[i]['TxnGrowth'] : 0)\n para_arr.push(data[i]['VolGrowthAVG'] ? data[i]['VolGrowthAVG'] : 0)\n para_arr.push(data[i]['TxnGrowthAVG'] ? data[i]['TxnGrowthAVG'] : 0)\n dataRows.push(para_arr);\n }\n // create an array of data to be used in the chart\n let resultData = [columns, ...dataRows]; \n // update the state variable for chart data with the new data\n setChartsData(resultData); \n }\n\n return (\n
\n {/* render the Chart component from Google Charts library */}\n {t('Loading National Consumer Spending Trends Chart')}
} \n graphID={graphId} \n width=\"100%\" \n height=\"450px\" \n options={{ \n title: '',\n legend: {\n position: 'top'\n },\n hAxis: {\n format: 'dd/MM/yy' \n },\n vAxis: {\n format:'#%'\n },\n series: {\n 2: {\n lineDashStyle: [4, 4]\n },\n 3: {\n lineDashStyle: [4, 4]\n }\n },\n }}\n />\n \n );\n}\n\nexport default GoogleCharts;","export const Config = {\n apiUrl: '/consumerspending/api'\n //apiUrl: 'http://localhost/SpendingTrend'\n}","import { Config } from '../config';\r\nimport axios from 'axios';\r\nclass DataContextService {\r\n get(url, parameters) {\r\n url = Config.apiUrl + url;\r\n \r\n let options = {\r\n params: parameters\r\n }\r\n\r\n return axios.get(url, options).then((response) => response);\r\n }\r\n}\r\n\r\nexport default new DataContextService();\r\nexport { DataContextService };","// Import React and the useTranslation hook from the react-i18next library\r\nimport React from \"react\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\n// Define a functional component called Footer\r\nfunction Footer() {\r\n // Destructure the t function from the useTranslation hook\r\n const { t } = useTranslation();\r\n\r\n // Return the HTML for the component\r\n return (\r\n
\r\n {/* Render a bolded text using the t function to translate the string */}\r\n

{t('AVIS DE CONFIDENTIALITÉ ET DE NON-RESPONSABILITÉ')}

\r\n {/* Render a paragraph of text using the t function to translate the string */}\r\n

Ce rapport sur les tendances des dépenses (« rapport ») contient des renseignements confidentiels de Corporation Solutions Moneris (« Moneris »). Les résultats ont été générés selon la logique « même magasin », telle que définie par Moneris. La confidentialité et d'autres contraintes ont été appliquées au besoin pour assurer l'anonymat des marchands et la confidentialité des renseignements exclusifs de Moneris. Moneris n'est pas responsable de l'utilisation que vous faites des renseignements contenus dans le rapport (y compris les erreurs, les omissions, l'inexactitude ou l'actualité de quelque nature que ce soit) ou de toute hypothèse ou conclusion que vous pourriez tirer de son utilisation. Moneris n'offre aucune garantie, expresse ou implicite, et rejette explicitement les garanties de qualité marchande et d'adéquation à un usage particulier, toute garantie de non-violation des droits de propriété intellectuelle d'un tiers, toute garantie que l'information répondra aux exigences de un client, ou toute garantie que les informations sont mises à jour et sans erreur. Dans la mesure permise par la loi applicable, Moneris ne sera pas responsable envers vous ou un tiers pour tout dommage en vertu de toute théorie du droit, y compris, sans s'y limiter, tout dommage spécial, consécutif, accessoire ou punitif, ni tout dommage pour perte d'activité profits, interruption d'activité, perte d'informations commerciales ou autre perte monétaire, même si vous êtes informé de la possibilité de tels dommages.

\r\n {/* Render a paragraph of text using the t function to translate the string */}\r\n

{t('MONERIS et MONERIS & dessin sont des marques de commerce déposées de Corporation Solutions Moneris.')}

\r\n
\r\n );\r\n}\r\n\r\n// Export the Footer component as the default export of this module\r\nexport default Footer;","// Import React, useState, useEffect, GoogleCharts, datacontext.service, Navbar, useTranslation, cookies, Footer, ReactExport, and logo\nimport React, { useState, useEffect } from 'react';\nimport GoogleCharts from './GoogleCharts';\nimport dataContextService from '../_services/datacontext.service';\nimport Navbar from './Navbar';\nimport { useTranslation } from \"react-i18next\";\nimport cookies from 'js-cookie';\nimport Footer from './Footer';\nimport ReactExport from 'react-data-export';\n\n// Declare global variables year, datVal, and page\nvar year;\nvar datVal;\nvar page;\n\nconst languages = [\n {\n code: 'fr',\n name: 'Français',\n country_code: 'fr',\n },\n {\n code: 'en',\n name: 'English',\n country_code: 'gb',\n },\n]\n\n\nconst ENG = [\n {\n columns: [\n {title: \"DataServices: National Consumer Spending Trends\", \n style: {font: {sz: \"24\", bold: true}, alignment: {horizontal: \"center\"}}, width: {wpx: 1300}}//pixels width \n ],\n data: [\n [\n {value: \"\"}\n ], \n [\n {value:\"\",style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}}}}\n ],\n [\n {value: \"This information is available to private and public sector organizations to support new or ongoing research, forecasting models, and policies.\", \n style: {font: {sz: \"12\", bold: true},alignment: {horizontal: \"center\"}}}\n ],\n [\n {value:\"\",style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}}}}\n ],\n [\n {value: \"The data presented is at the national level, but is completely customizable according to geography and other specific merchant categories.\", \n style: {font: {sz: \"12\", bold: true},alignment: {horizontal: \"center\"},fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},}}\n ],\n [\n {value: \"To learn how we can custom build a report suited to the unique needs of your organization, please contact us and\", \n style: {font: {sz: \"12\", bold: true},alignment: {horizontal: \"center\"},fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},}}\n ],\n [\n {value: \"we'd be happy to discuss these opportunities. https://www.moneris.com/en/services/data-services\", \n style: {font: {sz: \"12\", bold: true},alignment: {horizontal: \"center\"},fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},}}\n ],\n [\n {value:\"\",style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}}}}\n ],\n [\n {value: \"CONFIDENTIALITY AND DISCLAIMER\", style: {font: {sz: \"12\", italic: true, bold: true}}}\n ],\n [\n {value: \"This spending trends report (“report”) contains Confidential Information of Moneris Solutions Corporation (“Moneris”).The results were generated based on “same-store” logic, as defined by Moneris. Privacy and other constraints were applied as needed\",\n style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},font: {sz: \"11\", italic: true}}}\n ],\n [\n {value: \"to ensure merchant anonymity and the confidentiality of Moneris’ proprietary information. Moneris is not responsible for your use of the information contained in the report (including errors, omissions, inaccuracy or non-timeliness of any kind) or any\",\n style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},font: {sz: \"11\", italic: true}}}\n ],\n [\n {value: \"assumptions or conclusions you might draw from its use. Moneris makes no warranty, express or implied, and explicitly disclaims the warranties of merchantability and fitness for a particular purpose, any warranty of non-infringement of any third party's\",\n style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},font: {sz: \"11\", italic: true}}}\n ],\n [\n {value: \"intellectual property rights, any warranty that the information will meet the requirements of a client, or any warranty that the information is updated and will be error free. To the extent permitted by applicable law, Moneris shall not be liable to you\", \n style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},font: {sz: \"11\", italic: true}}}\n ],\n [\n {value: \"or any third party for any damages under any theory of law, including, without limitation, any special, consequential, incidental or punitive damages, nor any damages for loss of business profits, business interruption, loss of business information, or\", \n style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},font: {sz: \"11\", italic: true}}}\n ],\n [\n {value:\"other monetary loss, even if advised of the possibility of such damages.\",\n style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},font: {sz: \"11\", italic: true}}}\n ],\n [\n {value: \"\"}\n ],\n [\n {value: \"MONERIS and MONERIS & Design are registered trademarks of Moneris Solutions Corporation\", \n style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},font: {sz: \"11\", italic: true, bold: true, color: {rgb: \"00B6C9\"}}}}\n ]\n ]\n }\n];\n\nconst FR = [\n {\n columns: [\n {title: \"Services transmission de données : Tendances en matière de dépenses des consommateurs canadiens\", \n style: {font: {sz: \"24\", bold: true}, alignment: {horizontal: \"center\"}}, width: {wpx: 1300}}//pixels width \n ],\n data: [ \n [\n {value:\"\",style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}}}}\n ],\n [\n {value: \"Ces renseignements sont offerts aux entreprises du secteur public et du secteur privé afin d’appuyer vos recherches, vos modèles de prévision et vos politiques.\", \n style: {font: {sz: \"12\", bold: true},alignment: {horizontal: \"center\"}}}\n ],\n [\n {value:\"\",style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}}}}\n ],\n [\n {value: \"Les données fournies sont à l’échelle nationale, mais elles sont entièrement personnalisables en fonction de la géographie et des autres catégories de commerçant.\", \n style: {font: {sz: \"12\", bold: true},alignment: {horizontal: \"center\"},fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},}}\n ],\n [\n {value: \"Pour savoir comment nous pouvons produire un rapport personnalisé selon les besoins précis de votre entreprise, veuillez communiquer avec nous,\", \n style: {font: {sz: \"12\", bold: true},alignment: {horizontal: \"center\"},fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},}}\n ],\n [\n {value: \"et nous serons ravis de discuter des différentes possibilités qui s’offrent à vous. https://www.moneris.com/fr-ca/services/services-de-donnees\", \n style: {font: {sz: \"12\", bold: true},alignment: {horizontal: \"center\"},fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},}}\n ],\n [\n {value:\"\",style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}}}}\n ],\n [\n {value: \"AVIS DE CONFIDENTIALITÉ ET DE NON-RESPONSABILITÉ\", style: {font: {sz: \"11\", italic: true, bold: true}}}\n ],\n [\n {value: \"Ce rapport sur les tendances en matière de dépenses (« rapport ») contient de l’information confidentielle de Corporation Solutions Moneris (« Moneris »). Les données ont été obtenues selon une logique de « même commerce », telle que définie par Moneris.\",\n style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},font: {sz: \"10\", italic: true}}}\n ],\n [\n {value: \"Des mesures de confidentialité et d’autres contraintes ont été mises en place au besoin afin d’assurer l’anonymat du commerçant et la confidentialité des renseignements exclusifs de Moneris. Moneris n’est pas responsable de votre utilisation des\",\n style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},font: {sz: \"10\", italic: true}}}\n ],\n [\n {value: \"renseignements contenus dans le rapport (y compris les erreurs, les omissions, les inexactitudes ou le non-respect des délais de quelque nature que ce soit) ou de toute hypothèse ou conclusion que vous pourriez tirer de son utilisation. Moneris n’offre aucune\",\n style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},font: {sz: \"10\", italic: true}}}\n ],\n [\n {value: \"garantie, expresse ou implicite, et renonce expressément à toute garantie de la qualité marchande et de l’adéquation pour quelque fin que ce soit, ainsi qu’à toute garantie de l’absence de violation des droits de propriété intellectuelle des tiers, à toute\", \n style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},font: {sz: \"10\", italic: true}}}\n ],\n [\n {value: \"garantie que les renseignements répondront aux besoins d’un client, et à toute garantie que les renseignements sont à jour et ne comportent aucune erreur. Dans la mesure permise par la loi applicable, Moneris ne sera pas tenue responsable envers vous ou\", \n style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},font: {sz: \"10\", italic: true}}}\n ],\n [\n {value: \"un tiers de dommages en vertu de toute théorie de droit, notamment tout dommage spécial, consécutif, accessoire ou punitif, ni de dommage pour perte de profits d’affaires, interruption d’activité, perte de renseignements commerciaux, ou d’autres pertes\", \n style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},font: {sz: \"10\", italic: true}}}\n ],\n [\n {value:\"monétaires, même si elle est avisée de la possibilité de tels dommages.\",\n style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},font: {sz: \"10\", italic: true}}}\n ],\n [\n {value: \"\"}\n ],\n [\n {value: \"MONERIS et MONERIS & dessin sont des marques de commerce déposées de Corporation Solutions Moneris.\", \n style: {fill: {patternType: \"solid\", fgColor: {rgb: \"FFFFFF\"}},font: {sz: \"10\", italic: true,bold: true, color: {rgb: \"00B6C9\"}}}}\n ]\n ]\n }\n];\n\nconst logoImg = require('../assets/img/header_logo.png');\n\n// Importing necessary components from ReactExport library\nconst ExcelFile = ReactExport.ExcelFile;\nconst ExcelSheet = ReactExport.ExcelFile.ExcelSheet;\nconst ExcelColumn = ReactExport.ExcelFile.ExcelColumn;\n\nfunction Home() {\n // Importing useTranslation hook from i18next library\n const { t } = useTranslation();\n\n // Retrieving the current language code from cookies or setting to 'en' if not found\n const currentLanguageCode = cookies.get('i18next') || 'en'\n \n // Finding the language object based on the current language code\n const currentLanguage = languages.find((l) => l.code === currentLanguageCode)\n\n // Defining state variables using useState hook\n const [years, setYears] = useState([]); // stores an array of years\n const [loading, setLoading] = useState(true); // stores the loading status of the page\n const [chartsData, setChartsData] = React.useState({}); // stores chart data\n const [selectedTabIndex, setSelectedTabIndex] = useState(1); // stores the index of the currently selected tab\n const [retaildata, setRetaildata] = useState([]); // stores retail data\n const [traveldata, setTraveldata] = useState([]); // stores travel data\n const [servicedata, setServicedata] = useState([]); // stores service data\n\n // Function to update the selected tab index\n function onTabSelection(tabIndex, cyear){\n setSelectedTabIndex(tabIndex);\n }\n\n useEffect(() => {\n setLoading(true);\n dataContextService.get('/GetSpendingData.php').then(res => {\n datVal = res.data;\n // Extracting data for different categories of spending\n var datChange = res.data.Retail;\n var datSer = res.data.Services;\n var datTra = res.data.TravelEntertainment;\n\n // Converting date format for all spending data\n let retail=datChange.map(function(ele){ \n return {...ele, new_start_date_Event:(\n (new Date(ele.start_date_Event).toLocaleDateString('en-GB', {\n day : 'numeric',\n month : 'short',\n year : 'numeric'\n }).split(' ').join('-'))\n )};\n });\n let services=datSer.map(function(ele){ \n return {...ele, new_start_date_Event:(\n (new Date(ele.start_date_Event).toLocaleDateString('en-GB', {\n day : 'numeric',\n month : 'short',\n year : 'numeric'\n }).split(' ').join('-'))\n )};\n });\n let travelEntertainment=datTra.map(function(ele){ \n return {...ele, new_start_date_Event:(\n (new Date(ele.start_date_Event).toLocaleDateString('en-GB', {\n day : 'numeric',\n month : 'short',\n year : 'numeric'\n }).split(' ').join('-'))\n )};\n });\n let newData = {\n retail,\n services,\n travelEntertainment\n }\n setRetaildata(retail); \n setTraveldata(travelEntertainment);\n setServicedata(services);\n setChartsData(newData);\n setLoading(false);\n });\n }, []);\n\n // useEffect hook to fetch and set years data\n // useEffect(() => {\n // setLoading(true);\n // dataContextService.get('/FetchYears.php').then(data => {\n // year = data.data;\n // // Check if years data is not null and has length greater than 0\n // if (year != null && year != null && data.data.length > 0){\n // setYears(year);\n // changeYear(year[0]);\n // }\n // // If years data is not found, set loading to false\n // else {\n // setLoading(false);\n // } \n // });\n // }, []);\n\n\n // useEffect hook to update language and page title\n useEffect(() => {\n document.body.dir = currentLanguage.dir || 'ltr'\n document.title = t('app_title')\n }, [currentLanguage, t])\n\n // Function to fetch and update spending data based on the selected year\n // function changeYear(cyear){\n // setLoading(true);\n // dataContextService.get('/GetSpendingData.php', { year: cyear}).then(res => {\n // datVal = res.data;\n // // Extracting data for different categories of spending\n // var datChange = res.data.Retail;\n // var datSer = res.data.Services;\n // var datTra = res.data.TravelEntertainment;\n\n // // Converting date format for all spending data\n // let retail=datChange.map(function(ele){ \n // return {...ele, new_start_date_Event:(\n // (new Date(ele.start_date_Event).toLocaleDateString('en-GB', {\n // day : 'numeric',\n // month : 'short',\n // year : 'numeric'\n // }).split(' ').join('-'))\n // )};\n // });\n // let services=datSer.map(function(ele){ \n // return {...ele, new_start_date_Event:(\n // (new Date(ele.start_date_Event).toLocaleDateString('en-GB', {\n // day : 'numeric',\n // month : 'short',\n // year : 'numeric'\n // }).split(' ').join('-'))\n // )};\n // });\n // let travelEntertainment=datTra.map(function(ele){ \n // return {...ele, new_start_date_Event:(\n // (new Date(ele.start_date_Event).toLocaleDateString('en-GB', {\n // day : 'numeric',\n // month : 'short',\n // year : 'numeric'\n // }).split(' ').join('-'))\n // )};\n // });\n // let newData = {\n // retail,\n // services,\n // travelEntertainment\n // }\n // setRetaildata(retail); \n // setTraveldata(travelEntertainment);\n // setServicedata(services);\n // setChartsData(newData);\n // setLoading(false);\n // });\n // }\n\n return (\n <>\n {/* */}\n
\n
 
\n
\n \n
\n
\n
\n

{t('Tendances nationales des dépenses de consommation - Commerce de détail')}

\n
\n
\n { loading ? \"Loading...\" : }\n
\n
\n
\n
\n
\n

{t('Tendances nationales des dépenses de consommation - Voyages et divertissements')}

\n
\n
\n { loading ? \"Loading...\" : }\n
\n
\n
\n
\n
\n

{t('Tendances nationales des dépenses de consommation - Services')}

\n
\n
\n { loading ? \"Loading...\" : }\n
\n
\n
\n
\n
\n
\n