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,eAAAiB,EACA,eAAAA,EAAA,KAAAJ,gBAAA,IAAAI,OAAA,EAAAA,EAAA1D,KAAA2D,SAAA,UACA,EACAjB,UAAA,eAAAkB,EACA,eAAAA,EAAA,KAAAhB,oBAAA,IAAAgB,OAAA,EAAAA,EAAAC,QAAA,CACA,KC7E6L,I,+BCA2B,EAAe,ICOnOC,GAAY,OACd,EACA,EACA,GACA,EACA,KACA,KACA,MAMoB,oBAAX,GAAuB,EAAOA,GAEzC,MAAeA,E,QCyBf,GACA9D,KAAA,eAEA8C,WAAA,CACAiB,QAAAA,EAAAA,GACAC,cAAAA,EAAAA,EACAC,eAAAA,EAAAA,GACAlB,QAAAA,EAAAA,GAEAmB,gBAAAA,EAAAA,EACAC,wBAAAA,EAAAA,EAEAC,kBAAAA,GAGAlB,MAAA,CACA9C,KAAAiE,OAGAb,SAAA,CACAhE,QAAA,WACA,YAAAE,cAAAmE,OAAA,CACA,EACAnE,cAAA,WACA,WAAA4E,EACA,KAAAlE,KACA,IAAAmE,EAAAA,EACA,KAAAnE,KACAkE,EAAAE,cAAA,KAAApE,QAEAqE,KACA,IC9EiL,I,oBCA2B,EAAe,ICQvN,GAAY,OACd,EACA3F,EACAoB,GACA,EACA,KACA,WACA,MAMoB,oBAAX,GAAuB,EAAO,GAEzC,MAAe,E,2BCvBf3B,EAAOC,QAAU,SAAUC,GACzBA,EAAUC,QAAQC,OAASF,EAAUC,QAAQC,QAAU,GACvDF,EAAUC,QAAQC,OAAOC,KAAK,6ZACvBH,EAAUC,QAAQG,KAC3B,C","sources":["webpack://company-webapp/./src/views/Home/RefusalCodes/RefuseCodeTooltip.vue?c108","webpack://company-webapp/./src/views/Home/RefusalCodes/index.vue","webpack://company-webapp/./src/views/Home/RefusalCodes/refusal-codes.manager.js","webpack://company-webapp/./src/views/Home/RefusalCodes/RefuseCodeTooltip.vue","webpack://company-webapp/src/views/Home/RefusalCodes/RefuseCodeTooltip.vue","webpack://company-webapp/./src/views/Home/RefusalCodes/RefuseCodeTooltip.vue?919e","webpack://company-webapp/./src/views/Home/RefusalCodes/RefuseCodeTooltip.vue?8c58","webpack://company-webapp/./src/views/Home/RefusalCodes/RefuseCodeTooltip.vue?b340","webpack://company-webapp/src/views/Home/RefusalCodes/index.vue","webpack://company-webapp/./src/views/Home/RefusalCodes/index.vue?e721","webpack://company-webapp/./src/views/Home/RefusalCodes/index.vue?1b09","webpack://company-webapp/./src/views/Home/RefusalCodes/index.vue?0b54","webpack://company-webapp/./src/views/Home/RefusalCodes/index.vue?df1c"],"sourcesContent":["module.exports = function (Component) {\n Component.options.__i18n = Component.options.__i18n || []\n Component.options.__i18n.push('{\"pt-BR\":{\"tooltip\":{\"title\":\"Códigos de motivos de recusa\"}},\"en-US\":{\"tooltip\":{\"title\":\"Refusal reason codes\"}}}')\n delete Component.options._Ctor\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('emd-card',[_c('emd-card-header',[_c('emd-text',{attrs:{\"size\":\"section\"}},[_vm._v(\" \"+_vm._s(_vm.$t('refusalCodesTitle'))+\" \")])],1),_c('emd-card-content',{staticClass:\"card-content__refuse-codes\"},[_c('dash-card-content-fallback',{attrs:{\"hasData\":_vm.hasData}},_vm._l((_vm.refuseReasons),function(item){return _c('dash-progress-bar',{key:item.key,attrs:{\"value\":item.percentage,\"color\":item.color}},[_c('refusal-codes-icons',{attrs:{\"data-icon\":item.leftIcon,\"tooltip-id\":'acquirer_info-tippy-left' + item.key}}),_c('emd-text',[_vm._v(_vm._s(_vm.$t(item.name)))]),_c('refusal-codes-icons',{attrs:{\"data-icon\":item.rightIcon,\"tooltip-id\":'acquirer_info-tippy-right' + item.key}})],1)}),1)],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import MathManager from '../../../utils/math.manager'\n\nimport ACQUIRER_LABELS from '../Acquirer/acquirer.labels'\n\nclass RefusalCodes {\n dashProgressManager\n data\n\n constructor (data, dashProgressManager) {\n this.data = data\n this.dashProgressManager = dashProgressManager\n }\n\n defaultStructure = Object.keys(ACQUIRER_LABELS)\n\n /**\n * parseLabel takes in a single parameter label and returns a string value by matching the label parameter\n * with the key of an object validationLabel.\n * @param {String} label the label to convert\n * @returns String\n */\n parseLabel (label) {\n const validationLabel = {\n ...ACQUIRER_LABELS\n }\n return validationLabel[label]\n }\n\n static totalQuantity (list) {\n return MathManager.sumByKeys(list).quantity\n }\n\n adapter (defaultStructure, totalAcquirer) {\n const newList = this.data.map((acquirer, index) => {\n const item = { ...defaultStructure[acquirer.name], ...acquirer }\n\n const totalCodes = MathManager.sumByKeys(\n acquirer.buckets.return_code\n ).quantity\n\n const others = this.dashProgressManager.adapterTooltipRemaining(\n acquirer.buckets.return_code,\n totalCodes\n )\n\n return {\n ...item,\n name: this.parseLabel(item.name) ?? item.name,\n color: this.dashProgressManager.getColor(index),\n value: this.dashProgressManager.getCurrency(item.tpv),\n\n // We do this to make sure that we are doing the percentage based on each accquirer\n percentage: MathManager.percentageCalculator(\n item.quantity,\n totalAcquirer\n ),\n rightIcon: {\n name: 'tooltip',\n tooltip: others\n }\n }\n })\n\n return newList\n }\n\n /**\n * Executes all the methods\n * @returns Array\n */\n get () {\n const defaultStructure = this.dashProgressManager.createStructure(\n this.defaultStructure\n )\n\n const totalAcquirer = MathManager.sumByKeys(this.data).quantity\n\n return this.adapter(defaultStructure, totalAcquirer)\n }\n}\n\nexport default RefusalCodes\n","var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.showRefusalIcon)?_c('div',{staticClass:\"eu-ml_1\"},[(_vm.showTippy)?_c('emd-tippy',{attrs:{\"position\":\"top\",\"aria-expanded\":\"true\",\"type\":\"html\",\"data-testid\":\"emd-tippy-dash-info-icon\",\"id\":_vm.tooltipId,\"data-template\":_vm.tooltipId}},[_c('em',{staticClass:\"emd-text _color_success uil uil-info-circle\"}),_c('emd-tippy-template-HTML',{attrs:{\"id\":_vm.tooltipId}},[_c('emd-text',{attrs:{\"size\":\"tiny\"}},[_vm._v(_vm._s(_vm.$t('tooltip.title'))+\":\")]),_vm._l((_vm.tooltipItems),function(item){return _c('emd-text',{key:item.name,attrs:{\"size\":\"tiny\",\"data-testid\":\"emd-text-dash-info-icon\"}},[_vm._v(\" \"+_vm._s(_vm.$t(item.name))+\" \"),(item.percentage)?_c('b',{staticClass:\"_type_bold\"},[_vm._v(\" - \"+_vm._s(item.percentage)+\"%\")]):_vm._e(),_c('br')])})],2)],1):_vm._e()],1):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n {\n \"pt-BR\": {\n \"tooltip\": {\n \"title\": \"Códigos de motivos de recusa\"\n }\n },\n \"en-US\": {\n \"tooltip\": {\n \"title\": \"Refusal reason codes\"\n }\n }\n }\n\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RefuseCodeTooltip.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RefuseCodeTooltip.vue?vue&type=script&lang=js\"","import mod from \"-!../../../../node_modules/@intlify/vue-i18n-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RefuseCodeTooltip.vue?vue&type=custom&index=0&blockType=i18n\"; export default mod; export * from \"-!../../../../node_modules/@intlify/vue-i18n-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RefuseCodeTooltip.vue?vue&type=custom&index=0&blockType=i18n\"","import { render, staticRenderFns } from \"./RefuseCodeTooltip.vue?vue&type=template&id=6344c26f\"\nimport script from \"./RefuseCodeTooltip.vue?vue&type=script&lang=js\"\nexport * from \"./RefuseCodeTooltip.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* custom blocks */\nimport block0 from \"./RefuseCodeTooltip.vue?vue&type=custom&index=0&blockType=i18n\"\nif (typeof block0 === 'function') block0(component)\n\nexport default component.exports","\n\n\n\n\n\n\n {\n \"pt-BR\": {\n \"refusalCodesTitle\": \"Motivos de recusa por adquirente\",\n \"refusalCodesDescription\": \"5 principais códigos retornados pelas adquirentes em cobranças não autorizadas.\",\n \"refusalCodes\": {\n \"simulator\": \"Simulator\"\n }\n },\n \"en-US\": {\n \"refusalCodesTitle\": \"Major refusal codes by acquirer\",\n \"refusalCodesDescription\": \"5 main acquirers return code on unauthorized charges.\",\n \"refusalCodes\": {\n \"simulator\": \"Simulator\"\n }\n }\n }\n \n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"","import mod from \"-!../../../../node_modules/@intlify/vue-i18n-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=custom&index=0&blockType=i18n\"; export default mod; export * from \"-!../../../../node_modules/@intlify/vue-i18n-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=custom&index=0&blockType=i18n\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=9318ab1c&scoped=true\"\nimport script from \"./index.vue?vue&type=script&lang=js\"\nexport * from \"./index.vue?vue&type=script&lang=js\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=9318ab1c&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"9318ab1c\",\n null\n \n)\n\n/* custom blocks */\nimport block0 from \"./index.vue?vue&type=custom&index=0&blockType=i18n\"\nif (typeof block0 === 'function') block0(component)\n\nexport default component.exports","module.exports = function (Component) {\n Component.options.__i18n = Component.options.__i18n || []\n Component.options.__i18n.push('{\"pt-BR\":{\"refusalCodesTitle\":\"Motivos de recusa por adquirente\",\"refusalCodesDescription\":\"5 principais códigos retornados pelas adquirentes em cobranças não autorizadas.\",\"refusalCodes\":{\"simulator\":\"Simulator\"}},\"en-US\":{\"refusalCodesTitle\":\"Major refusal codes by acquirer\",\"refusalCodesDescription\":\"5 main acquirers return code on unauthorized charges.\",\"refusalCodes\":{\"simulator\":\"Simulator\"}}}')\n delete Component.options._Ctor\n}\n"],"names":["module","exports","Component","options","__i18n","push","_Ctor","render","_vm","this","_c","_self","attrs","_v","_s","$t","staticClass","hasData","_l","refuseReasons","item","key","percentage","color","leftIcon","name","rightIcon","staticRenderFns","RefusalCodes","data","dashProgressManager","_classCallCheck","_defineProperty","Object","keys","ACQUIRER_LABELS","_createClass","value","label","validationLabel","_objectSpread","defaultStructure","totalAcquirer","_this","newList","map","acquirer","index","_this$parseLabel","totalCodes","MathManager","sumByKeys","buckets","return_code","quantity","others","adapterTooltipRemaining","parseLabel","getColor","getCurrency","tpv","percentageCalculator","tooltip","createStructure","adapter","list","showRefusalIcon","showTippy","tooltipId","tooltipItems","_e","components","EmdText","EmdTippy","EmdTippyTemplateHTML","props","type","String","default","dataIcon","required","computed","_this$dataIcon","_this$dataIcon2","includes","_this$tooltipItems","length","component","EmdCard","EmdCardHeader","EmdCardContent","DashProgressBar","DashCardContentFallback","RefusalCodesIcons","Array","RefusalCodesManager","DashProgressManager","totalQuantity","get"],"sourceRoot":""}