{"version":3,"sources":["webpack:///./src/views/admin/cogeskey/CogesKeyPreview.vue?31e8","webpack:///./src/models/cogeskey-portal/cogesKeyMerchantData.ts","webpack:///./src/views/admin/cogeskey/CogesKeyPreview.vue?c8b9","webpack:///./node_modules/cache-loader/dist/cjs.js","webpack:///./src/views/admin/cogeskey/CogesKeyPreview.vue?488d","webpack:///./src/views/admin/cogeskey/CogesKeyPreview.vue","webpack:///./src/assets/images/cogeskey-preview/banner_generic_top.jpg","webpack:///./src/assets/images/cogeskey-preview/banner_generic_left.jpg","webpack:///./src/assets/images/cogeskey-preview/cogeskey_main_mobile.png","webpack:///./src/assets/images/cogeskey-preview/cogeskey_main.png","webpack:///./src/utils/axios-utils/formdata.utils.ts","webpack:///./src/services/cogeskey-portal/cogesKeyPortal.service.ts"],"names":["CogesKeyMerchantData","companyName","websiteUrl","color","logoUrl","ingredientsUrl","mobileAppLogoUrl","mobileAppTheme","render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","getColor","merchantConfig","style","getContrastColor","_v","staticStyle","border","_s","_m","_e","staticRenderFns","CogesKeyPreview","loaded","$store","getters","MerchantsGetters","GetSelectedMerchant","getMerchantConfig","setupPage","defaultColor","CogesKeyPreview_1","COGESKEY_DEFAULT_COLOR","cfgColor","r","parseInt","substr","g","b","yiq","setupContainer","removeMenuAndHeader","body","document","querySelector","background","COGESKEY_BG_COLOR","nebularWrapper","display","nebularMenu","remove","nebularHeader","$spinner","showSpinner","cogesKeyPortalService","getConfig","merchantId","then","response","data","catch","$toaster","showError","finally","removeSpinner","Vue","Component","components","Button","component","module","exports","objectToFormData","formData","namespace","formKey","fd","FormData","key","Object","prototype","hasOwnProperty","call","Array","forEach","element","index","tempFormKey","File","append","CogesKeyPortalService","url","size","sort","sortDir","filter","filtersChanged","page","basePagination","endpoints","assign","blogPostId","lang","axios","get","config","headers","post","put","delete","contact","id","contactId","privacy","settings","BasePaginationService"],"mappings":"kHAAA,W,kGCEaA,EAAb,oDACS,KAAAC,YAAc,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tC,IAAM8C,EAAS,CACbC,QAAS,CACP,eAAgB,wBAGdjC,EAAW,IAAII,SACrB,IAAK,IAAMC,KAAOnB,EAChB,GAAIoB,OAAOC,UAAUC,eAAeC,KAAKvB,EAAMmB,GAAM,CACnD,IAAMO,EAAU1B,EAAKmB,GACrBL,EAASgB,OAAOX,EAAKO,GAGzB,OAAOkB,IAAMK,IAAIT,OAAuC3C,GAAaiB,EAAUgC,K,yBAI1E,SAAYjD,GACjB,OAAO+C,IAAMC,IAAIL,OAAqC3C,M,2BAGjD,SAAcA,EAAoBsD,GACvC,OAAOP,IAAMI,KAAKR,OAAqC3C,GAAasD,K,2BAG/D,SAActD,EAAoBsD,GACvC,OAAOP,IAAMK,IAAIT,OAA0C3C,EAAYsD,EAAQC,IAAKD,K,2BAG/E,SAActD,EAAoBwD,GACvC,OAAOT,IAAMM,OAAOV,OAA0C3C,EAAYwD,M,6BAIrE,SAAgBxD,GACrB,OAAO+C,IAAMC,IAAIL,OAA0C3C,M,+BAGtD,SAAkBA,EAAoB8C,EAAcW,GACzD,OAAOV,IAAMK,IAAIT,OAA4C3C,EAAY8C,GAAOW,K,+BAG3E,SAAkBzD,EAAoB8C,GAC3C,OAAOC,IAAMM,OAAOV,OAA4C3C,EAAY8C,M,yBAIvE,SAAY9C,GACjB,OAAO+C,IAAMC,IAAIL,OAAqC3C,M,4BAGjD,SAAeA,EAAoB0D,GACxC,OAAOX,IAAMK,IAAIT,OAAqC3C,GAAa0D,O,GAtHnCC,QA0HvB7D,EAAwB,IAAIoC","file":"js/chunk-94dce71e.1f09a748.js","sourcesContent":["export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CogesKeyPreview.vue?vue&type=style&index=0&id=a2819450&lang=scss&scoped=true&\"","import { MobileAppTheme } from './mobileAppThemeType';\n\nexport class CogesKeyMerchantData {\n public companyName = '';\n public websiteUrl = '';\n public color = '#A3262B';\n public logoUrl = '';\n public ingredientsUrl = '';\n public mobileAppLogoUrl = '';\n public mobileAppTheme: MobileAppTheme = 0;\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.loaded)?_c('div',{staticClass:\"cogeskey-preview\"},[_c('div',{staticClass:\"cogeskey-preview__header-bg\"},[_c('svg',{attrs:{\"width\":\"100%\",\"viewBox\":\"0 0 360 220\",\"version\":\"1.1\",\"xmlns\":\"http://www.w3.org/2000/svg\",\"xmlns:xlink\":\"http://www.w3.org/1999/xlink\"}},[_c('g',{attrs:{\"stroke\":\"none\",\"stroke-width\":\"1\",\"fill\":\"none\",\"fill-rule\":\"evenodd\"}},[_c('g',{attrs:{\"id\":\"bkgfill\",\"fill\":_vm.getColor()}},[_c('path',{attrs:{\"d\":\"M360,0 L0,0 L0,124 C0,124 23,220 180,220 C337,220 360,124 360,124 L360,0 Z\"}})])])])]),_c('div',{staticClass:\"cogeskey-preview__header wrapper\"},[_c('div',{staticClass:\"wrapper-row\"},[_c('div',{staticClass:\"col-6 col-md-5 col-lg-3\"},[_c('span',{staticClass:\"my-2 text-md-left\"},[_c('img',{staticClass:\"cogeskey-preview__header-logo\",attrs:{\"src\":_vm.merchantConfig.logoUrl,\"alt\":_vm.merchantConfig.companyName}})])]),_c('div',{staticClass:\"cogeskey-preview__header-menu col-6 col-md-7 col-lg-9\"},[_c('ul',{staticClass:\"nav\",style:('color: ' + _vm.getContrastColor())},[_vm._v(\" EN \"),_c('v-icon',{staticStyle:{\"transform\":\"translateY(-2px)\"},style:('color: ' + _vm.getContrastColor()),attrs:{\"small\":\"\"}},[_vm._v(\"mdi-menu-down\")])],1)])])]),_c('div',{staticClass:\"cogeskey-preview__content\"},[_c('div',{staticClass:\"key-icon\"}),_c('div',{staticClass:\"wrapper\"},[_c('div',{staticClass:\"wrapper-row\"},[_c('div',{staticClass:\"wrapper-col\"},[_c('div',{staticClass:\"cogeskey-preview__content-card wrapper\"},[_c('div',{staticClass:\"wrapper-row mt-10\"},[_c('div',{staticClass:\"col-sm-12 col-lg-8\"},[_c('div',{staticClass:\"mb-3\"},[_c('img',{staticClass:\"mykey-banner-img rounded-lg\",staticStyle:{\"width\":\"100%\"},attrs:{\"src\":require(\"@/assets/images/cogeskey-preview/banner_generic_top.jpg\"),\"alt\":\"banner\"}})]),_c('hr',{staticClass:\"styled\"}),_c('div',{staticClass:\"mt-3\"},[_c('img',{staticClass:\"cogeskey-preview__content-desktop\",staticStyle:{\"width\":\"100%\"},attrs:{\"src\":require(\"@/assets/images/cogeskey-preview/cogeskey_main.png\")}}),_c('img',{staticClass:\"cogeskey-preview__content-mobile\",staticStyle:{\"width\":\"100%\"},attrs:{\"src\":require(\"@/assets/images/cogeskey-preview/cogeskey_main_mobile.png\")}})]),_c('div',{staticClass:\"news-container text-center\"},[_c('n-button',{staticClass:\"mt-4 mb-3 mx-auto text-uppercase\",staticStyle:{\"background-color\":\"#227dc7!important\",\"font-size\":\"13px\",\"border-radius\":\"4px\",\"box-shadow\":\"none!important\",\"min-width\":\"32px!important\",\"padding\":\"0 12px !important\",\"cursor\":\"unset!important\"},attrs:{\"label\":\"more\",\"type\":\"button\"}})],1)]),_c('div',{staticClass:\"col-sm-12 col-lg-4 left\"},[_c('div',{staticClass:\"\\n companyname-wrapper\\n block\\n py-3\\n merchant\\n text-center\\n colorized-border\\n mb-4\\n \",style:([{ border: '2px solid black' }])},[_c('h5',{staticClass:\"home-content-companyname text-uppercase font-weight-bold mb-3\"},[_vm._v(\" \"+_vm._s(_vm.merchantConfig.companyName)+\" \")])]),_c('div',{staticClass:\"block banner text-center rounded-lg mb-4 mt-3\"},[_c('img',{staticClass:\"rounded-lg\",attrs:{\"src\":require(\"@/assets/images/cogeskey-preview/banner_generic_left.jpg\"),\"width\":\"100%\",\"alt\":\"banner\"}})]),_c('hr',{staticClass:\"styled\"}),_vm._m(0)])])])])])])]),_vm._m(1)]):_vm._e()}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"block py-3 articles\"},[_c('h5',{staticClass:\"text-capitalize font-weight-bold\"},[_vm._v(\"Last Articles\")]),_c('div',{staticClass:\"latest-news latest\"},[_c('div',{staticClass:\"card-text font-italic my-2\"},[_c('span',[_vm._v(\"Baristas recommend paying attention to mil...\")])]),_c('div',{staticClass:\"card-text font-italic my-2\"},[_c('span',[_vm._v(\"Curiosity: let's know the most intense coffee...\")])]),_c('div',{staticClass:\"card-text font-italic my-2\"},[_c('span',[_vm._v(\"Three reasons why you should have vending...\")])])])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"cogeskey-preview__footer\"},[_c('div',{staticClass:\"wrapper\"},[_c('span',[_vm._v(\"© 2021 Coges Spa - IVA: IT 00527790240 - PATENT PENDING -\")]),_c('span',{staticClass:\"float-right\"},[_vm._v(\" Privacy | Cookies | Cookie settings \")])])])}]\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { CogesKeyMerchantData } from '@/models/cogeskey-portal/cogesKeyMerchantData';\nimport { Component, Vue } from 'vue-property-decorator';\nimport { MerchantsGetters } from '@/store/modules/merchants/enums';\nimport Button from '@/components/inputs/Button.vue';\nimport { cogesKeyPortalService } from '@/services/cogeskey-portal/cogesKeyPortal.service';\n\n@Component({\n components: {\n 'n-button': Button,\n },\n})\nexport default class CogesKeyPreview extends Vue {\n protected static readonly COGESKEY_BG_COLOR = '#e5e6e3';\n protected static readonly COGESKEY_DEFAULT_COLOR = '#a3262b';\n public loaded: boolean = false;\n public merchantConfig: CogesKeyMerchantData = new CogesKeyMerchantData();\n\n public get merchantId(): string {\n return this.$store.getters[MerchantsGetters.GetSelectedMerchant] as string;\n }\n\n public created(): void {\n this.getMerchantConfig();\n }\n\n public mounted(): void {\n this.setupPage();\n }\n\n public getColor(): string {\n const defaultColor = CogesKeyPreview.COGESKEY_DEFAULT_COLOR;\n if (this.merchantConfig && this.merchantConfig.color) {\n return this.merchantConfig.color;\n }\n return defaultColor;\n }\n\n public getContrastColor(): string {\n const cfgColor = this.getColor();\n if (typeof cfgColor === 'undefined') {\n return '#fff';\n }\n const r = parseInt(cfgColor.substr(1, 2), 16);\n const g = parseInt(cfgColor.substr(3, 2), 16);\n const b = parseInt(cfgColor.substr(5, 2), 16);\n const yiq = (r * 299 + g * 587 + b * 114) / 1000;\n return yiq < 128 ? '#fff' : '#000';\n }\n\n private setupPage(): void {\n this.setupContainer();\n this.removeMenuAndHeader();\n }\n\n private setupContainer(): void {\n const body = document.querySelector('body') as HTMLElement;\n body.style.background = CogesKeyPreview.COGESKEY_BG_COLOR;\n const nebularWrapper = document.querySelector('.nebular') as HTMLElement;\n nebularWrapper.style.background = CogesKeyPreview.COGESKEY_BG_COLOR;\n nebularWrapper.style.display = 'block';\n }\n\n private removeMenuAndHeader(): void {\n const nebularMenu = document.querySelector('.nebular__menu') as HTMLElement;\n nebularMenu.remove();\n const nebularHeader = document.querySelector('.nebular__header') as HTMLElement;\n nebularHeader.remove();\n }\n\n private getMerchantConfig(): void {\n this.$spinner.showSpinner();\n cogesKeyPortalService\n .getConfig(this.merchantId)\n .then((response) => {\n this.merchantConfig = response.data;\n })\n .catch(() => {\n this.$toaster.showError('errors.common', true);\n })\n .finally(() => {\n this.$spinner.removeSpinner();\n this.loaded = true;\n });\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CogesKeyPreview.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CogesKeyPreview.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./CogesKeyPreview.vue?vue&type=template&id=a2819450&scoped=true&\"\nimport script from \"./CogesKeyPreview.vue?vue&type=script&lang=ts&\"\nexport * from \"./CogesKeyPreview.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./CogesKeyPreview.vue?vue&type=style&index=0&id=a2819450&lang=scss&scoped=true&\"\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 \"a2819450\",\n null\n \n)\n\nexport default component.exports","module.exports = __webpack_public_path__ + \"img/banner_generic_top.1a80d650.jpg\";","module.exports = __webpack_public_path__ + \"img/banner_generic_left.95b1aca7.jpg\";","module.exports = __webpack_public_path__ + \"img/cogeskey_main_mobile.cea32004.png\";","module.exports = __webpack_public_path__ + \"img/cogeskey_main.d56b9e66.png\";","/**\n * This method converts an object to form data.\n * This is useful when we want to prepare a payload for a multipart/form-data request.\n * It manages arrays and nested objects.\n *\n * @param data - The object.\n * @param formData - The form data for recursive calls.\n * @param namespace - The key prefix for nested items.\n *\n * @returns The form data.\n */\nexport const objectToFormData = (data: any, formData?: FormData, namespace?: string): FormData => {\n const fd = formData ?? new FormData();\n let formKey: string;\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n if (namespace) {\n formKey = namespace + '[' + key + ']';\n } else {\n formKey = key;\n }\n if (data[key] instanceof Array) {\n data[key].forEach((element: any, index: any) => {\n const tempFormKey = `${formKey}[${index}]`;\n objectToFormData(element, fd, tempFormKey);\n });\n } else if (typeof data[key] === 'object' && !(data[key] instanceof File)) {\n objectToFormData(data[key], fd, key);\n } else {\n fd.append(formKey, data[key]);\n }\n }\n }\n return fd;\n};\n","import axios from 'axios';\nimport * as endpoints from '@/services/endpoints.service';\nimport { BlogPostFilter } from '@/models/cogeskey-portal/blogPostFilter';\nimport { BlogPostCreateRequest } from '@/models/cogeskey-portal/blogPostCreateRequest';\nimport { BlogPostUpdateRequest } from '@/models/cogeskey-portal/blogPostUpdateRequest';\nimport { CogesKeyContact } from '@/models/cogeskey-portal/cogesKeyContact';\nimport { CogesKeyMerchantDataRequest } from '@/models/cogeskey-portal/cogesKeyMerchantDataRequest';\nimport { CogesKeyPrivacy } from '@/models/cogeskey-portal/cogesKeyPrivacy';\nimport { CogesKeyServices } from '@/models/cogeskey-portal/cogesKeyServices';\nimport BasePaginationService from '../base/basepagination.service';\nimport { objectToFormData } from '@/utils/axios-utils/formdata.utils';\n\nclass CogesKeyPortalService extends BasePaginationService {\n\n // BLOG POSTS\n public getBlogPostsPaged(\n url: string,\n size: number,\n sort: string,\n sortDir: string,\n filter: BlogPostFilter,\n filtersChanged: boolean,\n page?: number,\n ) {\n\n return this.basePagination(\n url,\n endpoints.COGESKEY_BLOG_POSTS_PAGED(size),\n sort,\n sortDir,\n Object.assign({}, filter),\n filtersChanged,\n page,\n );\n }\n\n public getBlogPost(blogPostId: string, lang: string = 'en') {\n return axios.get(endpoints.COGESKEY_BLOG_POST_BY_ID_AND_LANG(blogPostId, lang));\n }\n\n public createBlogPost(data: BlogPostCreateRequest) {\n const config = {\n headers: {\n 'content-type': 'multipart/form-data',\n },\n };\n return axios.post(\n endpoints.COGESKEY_BLOG_POSTS(),\n objectToFormData(data),\n config,\n );\n }\n\n public updateBlogPost(blogPostId: string, lang: string, data: BlogPostUpdateRequest) {\n const config = {\n headers: {\n 'content-type': 'multipart/form-data',\n },\n };\n const formData = new FormData();\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n const element = data[key];\n formData.append(key, element);\n }\n }\n return axios.put(endpoints.COGESKEY_BLOG_POST_BY_ID_AND_LANG(blogPostId, lang), formData, config);\n }\n\n public deleteBlogPost(blogPostId: string) {\n return axios.delete(endpoints.COGESKEY_BLOG_POST_BY_ID(blogPostId));\n }\n\n // MERCHANT EXTRA DATA\n public getConfig(merchantId: string) {\n return axios.get(endpoints.COGESKEY_MERCHANT_EXTRA_DATA(merchantId));\n }\n\n public updateConfig(merchantId: string, data: CogesKeyMerchantDataRequest) {\n const config = {\n headers: {\n 'content-type': 'multipart/form-data',\n },\n };\n const formData = new FormData();\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n const element = data[key];\n formData.append(key, element);\n }\n }\n return axios.put(endpoints.COGESKEY_MERCHANT_EXTRA_DATA(merchantId), formData, config);\n }\n\n // MERCHANT CONTACTS\n public getContacts(merchantId: string) {\n return axios.get(endpoints.COGESKEY_MERCHANT_CONTACTS(merchantId));\n }\n\n public createContact(merchantId: string, contact: CogesKeyContact) {\n return axios.post(endpoints.COGESKEY_MERCHANT_CONTACTS(merchantId), contact);\n }\n\n public updateContact(merchantId: string, contact: CogesKeyContact) {\n return axios.put(endpoints.COGESKEY_MERCHANT_CONTACT_BY_ID(merchantId, contact.id), contact);\n }\n\n public deleteContact(merchantId: string, contactId: string) {\n return axios.delete(endpoints.COGESKEY_MERCHANT_CONTACT_BY_ID(merchantId, contactId));\n }\n\n // MERCHANT PRIVACY TEXTS\n public getPrivacyTexts(merchantId: string) {\n return axios.get(endpoints.COGESKEY_MERCHANT_PRIVACY_TEXTS(merchantId));\n }\n\n public updatePrivacyText(merchantId: string, lang: string, privacy: CogesKeyPrivacy) {\n return axios.put(endpoints.COGESKEY_MERCHANT_PRIVACY_BY_LANG(merchantId, lang), privacy);\n }\n\n public deletePrivacyText(merchantId: string, lang: string) {\n return axios.delete(endpoints.COGESKEY_MERCHANT_PRIVACY_BY_LANG(merchantId, lang));\n }\n\n // MERCHANT SERVICES\n public getServices(merchantId: string) {\n return axios.get(endpoints.COGESKEY_MERCHANT_SERVICES(merchantId));\n }\n\n public updateServices(merchantId: string, settings: CogesKeyServices) {\n return axios.put(endpoints.COGESKEY_MERCHANT_SERVICES(merchantId), settings);\n }\n}\n\nexport const cogesKeyPortalService = new CogesKeyPortalService();\n"],"sourceRoot":""}