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AAAC,GAIA,MAHAC,SACAC,cAAA,eACAC,UAAAC,IAAA,mBACAJ,CACA,GACA,GAGAK,QAAA,WACA,KAAApC,YAAA,KAAAqC,OACA,GC/DqR,I,WCOjRC,GAAY,OACd,EACAhE,EACAU,GACA,EACA,KACA,KACA,MAIF,EAAesD,EAAiB,O","sources":["webpack://greeen-pay/./src/views/Redirect.vue","webpack://greeen-pay/./src/services/resources/LinkService.js","webpack://greeen-pay/src/views/Redirect.vue","webpack://greeen-pay/./src/views/Redirect.vue?4e1f","webpack://greeen-pay/./src/views/Redirect.vue?0ef4"],"sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('b-container',{staticClass:\"p-0\",attrs:{\"fluid\":\"\"}},[(_vm.preload)?_c('div',{staticClass:\"carregando\"},[_c('div',[_c('img',{staticClass:\"logo-loading\",attrs:{\"src\":require(\"@/assets/img/_logo.svg\"),\"alt\":\"logo-loading\"}}),_c('span',{staticClass:\"loading-carregando\"})])]):_vm._e()])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import Rest from '@/services/Rest';\n\n/**\n * @typedef {LinkService}\n */\nexport default class LinkService extends Rest {\n /**\n * @type {String}\n */\n static resource = '/link'\n}\n","<template>\n <b-container fluid class=\"p-0\">\n <div class=\"carregando\" v-if=\"preload\">\n <div>\n <img\n src=\"@/assets/img/_logo.svg\"\n alt=\"logo-loading\"\n class=\"logo-loading\"\n />\n <span class=\"loading-carregando\"></span>\n </div>\n </div>\n </b-container>\n</template>\n\n<script>\nimport LinkService from \"@/services/resources/LinkService\";\nconst service = LinkService.build();\n\nimport Cookies from \"js-cookie\";\n\nexport default {\n data() {\n return {\n preload: false,\n };\n },\n methods: {\n\n newRedirect(route) {\n this.preload = true;\n\n service\n .read({ id: route.params.page })\n .then((res) => {\n try {\n let affiliate = route.query.a_id;\n if (affiliate) {\n Cookies.set(`affiliate_${res.product_id}`, affiliate, {\n expires: 7,\n path: \"/\",\n });\n }\n } catch (error) {\n console.error(console.error());\n }\n let redirectUrl = new URL(res.url);\n Object.keys(route.query).forEach((key) => {\n redirectUrl.searchParams.append(key, route.query[key]);\n });\n window.location.href = redirectUrl.href;\n })\n .catch((err) => {\n document\n .querySelector(\".carregando\")\n .classList.add(\"erro\", \"redirect\");\n throw err;\n });\n },\n },\n\n mounted() {\n this.newRedirect(this.$route);\n },\n};\n</script>\n","import mod from \"-!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./Redirect.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./Redirect.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Redirect.vue?vue&type=template&id=5bb9a6d2\"\nimport script from \"./Redirect.vue?vue&type=script&lang=js\"\nexport * from \"./Redirect.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"names":["render","_vm","this","_c","_self","staticClass","attrs","preload","require","_e","staticRenderFns","LinkService","_Rest","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","Rest","_defineProperty","service","build","data","methods","newRedirect","route","read","id","params","page","then","res","affiliate","query","a_id","Cookies","concat","product_id","expires","path","error","console","redirectUrl","URL","url","Object","keys","forEach","key","searchParams","append","window","location","href","catch","err","document","querySelector","classList","add","mounted","$route","component"],"sourceRoot":""}