%PDF- %PDF-
Direktori : /home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/server/components/ |
Current File : //home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/server/components/subscription-card-modal.js.map |
{"version":3,"file":"components/subscription-card-modal.js","sources":["webpack:///./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue?1205","webpack:///./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue?4f37","webpack:///./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue?0a44","webpack:///./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue?4208","webpack:///./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue","webpack:///./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue?34e4","webpack:///./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue?94e3"],"sourcesContent":["// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../../../node_modules/@nuxt/postcss8/node_modules/css-loader/dist/cjs.js??ref--4-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/@nuxt/postcss8/node_modules/postcss-loader/dist/cjs.js??ref--4-oneOf-1-2!../../../../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SubscriptionCardModal.vue?vue&type=style&index=0&id=7d8d7028&lang=postcss&scoped=true&\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add CSS to SSR context\nvar add = require(\"!../../../../../node_modules/vue-style-loader/lib/addStylesServer.js\").default\nmodule.exports.__inject__ = function (context) {\n add(\"ce03f3c6\", content, true, context)\n};","export * from \"-!../../../../../node_modules/vue-style-loader/index.js??ref--4-oneOf-1-0!../../../../../node_modules/@nuxt/postcss8/node_modules/css-loader/dist/cjs.js??ref--4-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/@nuxt/postcss8/node_modules/postcss-loader/dist/cjs.js??ref--4-oneOf-1-2!../../../../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SubscriptionCardModal.vue?vue&type=style&index=0&id=7d8d7028&lang=postcss&scoped=true&\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/@nuxt/postcss8/node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".modal[data-v-7d8d7028]{padding-top:20vh}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.value == true),expression:\"value == true\"}],staticClass:\"modal fixed z-50 bottom-0 left-0 w-full h-screen\"},[_vm._ssrNode(\"<div\"+(_vm._ssrClass(\"absolute z-10 top-0 left-0 w-full h-full bg-black bg-opacity-25 cursor-pointer transition duration-100\",_vm.isActive == true ? 'opacity-100' : 'opacity-0'))+\" data-v-7d8d7028></div> \"),_vm._ssrNode(\"<div\"+(_vm._ssrClass(\"relative z-20 h-full bg-white shadow-lg p-10 pt-16 transition transform duration-100\",_vm.isActive == true ? 'translate-y-0 opacity-100' : 'translate-y-full opacity-0'))+\" data-v-7d8d7028>\",\"</div>\",[_vm._ssrNode(\"<button type=\\\"button\\\" class=\\\"absolute top-6 right-10 uppercase hover:text-blue-light focus:outline-none transition\\\" data-v-7d8d7028>Close</button> \"),_vm._ssrNode(\"<div class=\\\"relative h-full bg-gray p-8 overflow-y-auto\\\" data-v-7d8d7028>\",\"</div>\",[_vm._ssrNode(\"<div class=\\\"max-w-lg w-full mx-auto\\\" data-v-7d8d7028>\",\"</div>\",[_vm._ssrNode(((_vm.subscription)?(\"<h2 class=\\\"mb-8 text-center text-4xl font-bold\\\" data-v-7d8d7028>Update Card Details</h2>\"):(\"<h2 class=\\\"mb-8 text-center text-4xl font-bold\\\" data-v-7d8d7028>Your Card Details</h2>\"))+\" \"+((_vm.payment_methods.length)?(\"<div class=\\\"grid grid-cols-1 gap-y-2 mb-6\\\" data-v-7d8d7028>\"+(_vm._ssrList((_vm.payment_methods),function(card,key){return (\"<label class=\\\"flex items-center py-3 px-4 cursor-pointer bg-white rounded-lg\\\" data-v-7d8d7028><input type=\\\"radio\\\"\"+(_vm._ssrAttr(\"value\",card.id))+(_vm._ssrAttr(\"checked\",_vm._q(_vm.selected_card,card.id)))+\" data-v-7d8d7028> <span\"+(_vm._ssrClass(null,'icon-'+card.card.brand))+\" data-v-7d8d7028></span> <span class=\\\"px-2\\\" data-v-7d8d7028>\"+_vm._ssrEscape(\"****\"+_vm._s(card.card.last4))+\"</span> <span class=\\\"px-2\\\" data-v-7d8d7028>\"+_vm._ssrEscape(_vm._s(card.card.exp_month+'/'+card.card.exp_year))+\"</span></label>\")}))+\" <div class=\\\"relative text-center my-6\\\" data-v-7d8d7028><span class=\\\"absolute z-10 top-1/2 left-0 transform -translate-y-1/2 block w-full h-0.5 w-full bg-black bg-opacity-10\\\" data-v-7d8d7028></span> <span class=\\\"relative z-20 inline-block px-6 bg-gray uppercase\\\" data-v-7d8d7028>Or add new Card</span></div> \"+((_vm.selected_card)?(\"<div class=\\\"text-center\\\" data-v-7d8d7028><button class=\\\"text-blue-light uppercase\\\" data-v-7d8d7028>Add New Card</button></div>\"):\"<!---->\")+\"</div>\"):\"<!---->\")+\" \"),_vm._ssrNode(\"<div\"+(_vm._ssrStyle(null,null, { display: (_vm.selected_card == null) ? '' : 'none' }))+\" data-v-7d8d7028>\",\"</div>\",[_c('ValidationObserver',{ref:\"paymentForm\"},[_c('form',{attrs:{\"role\":\"form\",\"method\":\"POST\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.submitForm($event)}}},[_c('ValidationProvider',{attrs:{\"rules\":\"required\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('t-input-group',{attrs:{\"label\":\"Name on Card\"}},[_c('t-input',{attrs:{\"type\":\"text\",\"placeholder\":\"Name on Card\"},model:{value:(_vm.card_name),callback:function ($$v) {_vm.card_name=$$v},expression:\"card_name\"}}),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()],1)]}}])}),_vm._v(\" \"),_c('t-input-group',{attrs:{\"label\":\"Card Information\"}},[_c('div',{staticClass:\"px-4 py-4 bg-white border border-black border-opacity-20 rounded-xl\",attrs:{\"id\":\"subscription-card-element\"}})]),_vm._v(\" \"),_c('t-input-group',{attrs:{\"label\":\"Discount Code\"}},[_c('t-input',{attrs:{\"type\":\"text\"},model:{value:(_vm.discount_code),callback:function ($$v) {_vm.discount_code=$$v},expression:\"discount_code\"}})],1),_vm._v(\" \"),_c('div',{staticClass:\"flex items-center justify-center px-10\"},[_c('button',{staticClass:\"w-full btn btn-primary btn-small rounded-full\",attrs:{\"disabled\":_vm.working == true,\"type\":\"submit\"}},[(_vm.working == false)?_c('div',[_vm._v(\"Submit\")]):_c('span',{staticClass:\"flex items-center justify-center\"},[_c('svg',{staticClass:\"animate-spin -ml-1 mr-3 h-5 w-5 text-current\",attrs:{\"xmlns\":\"http://www.w3.org/2000/svg\",\"fill\":\"none\",\"viewBox\":\"0 0 24 24\"}},[_c('circle',{staticClass:\"opacity-25\",attrs:{\"cx\":\"12\",\"cy\":\"12\",\"r\":\"10\",\"stroke\":\"currentColor\",\"stroke-width\":\"4\"}}),_vm._v(\" \"),_c('path',{staticClass:\"opacity-75\",attrs:{\"fill\":\"currentColor\",\"d\":\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"}})]),_vm._v(\" \"),_c('span',[_vm._v(\"Processing\")])])])]),_vm._v(\" \"),_c('p',{staticClass:\"text-sm text-center mt-6 text-black text-opacity-75\"},[_vm._v(\"By subscribing to Take a Seat you are agreeing to all site \"),_c('NuxtLink',{staticClass:\"text-blue-light hover:underline\",attrs:{\"to\":\"/terms-conditions\",\"target\":\"_blank\"}},[_vm._v(\"Terms and Conditions\")]),_vm._v(\". Please read carefully before continuing.\")],1)],1)])],1),_vm._ssrNode(\" \"+((_vm.selected_card)?(\"<div data-v-7d8d7028><div class=\\\"flex items-center justify-center px-10\\\" data-v-7d8d7028><button\"+(_vm._ssrAttr(\"disabled\",_vm.working == true))+\" type=\\\"button\\\" class=\\\"w-full btn btn-primary btn-small rounded-full\\\" data-v-7d8d7028>\"+((_vm.working == false)?(\"<div data-v-7d8d7028>Submit</div>\"):(\"<span class=\\\"flex items-center justify-center\\\" data-v-7d8d7028><svg xmlns=\\\"http://www.w3.org/2000/svg\\\" fill=\\\"none\\\" viewBox=\\\"0 0 24 24\\\" class=\\\"animate-spin -ml-1 mr-3 h-5 w-5 text-current\\\" data-v-7d8d7028><circle cx=\\\"12\\\" cy=\\\"12\\\" r=\\\"10\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"4\\\" class=\\\"opacity-25\\\" data-v-7d8d7028></circle> <path fill=\\\"currentColor\\\" d=\\\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\\\" class=\\\"opacity-75\\\" data-v-7d8d7028></path></svg> <span data-v-7d8d7028>Processing</span></span>\"))+\"</button></div></div>\"):\"<!---->\"))],2)])],2)],2)}\nvar staticRenderFns = []\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\nexport default {\n props: {\n value: {\n required: true\n }\n },\n\n data() {\n return {\n isActive: false,\n working: false,\n card: {},\n selected_card: null,\n card_name: null,\n discount_code: '',\n }\n },\n\n computed: {\n setup_intent() {\n return this.$store.state.account.billing.setupIntent\n },\n payment_methods() {\n return this.$store.state.account.billing.paymentMethods\n },\n default_payment_method() {\n return this.$store.state.account.billing.defaultPaymentMethod\n },\n subscription() {\n return this.$store.state.account.subscription.subscription\n }\n },\n\n mounted() {\n const elements = this.$stripe.elements();\n\n this.$store.dispatch('account/billing/setupIntent');\n\n this.card = elements.create('card', {\n style: {\n base: {\n fontSize: '15px',\n fontFamily: 'Poppins, sans-serif'\n }\n }\n });\n\n this.card.mount('#subscription-card-element');\n },\n\n methods: {\n closeModal: function () {\n this.$emit(\"input\", !this.value);\n },\n\n submitForm() {\n this.$refs.paymentForm.validate().then(success => {\n if (!success) {\n return;\n }\n\n this.submitCard();\n });\n },\n\n async submitCard() {\n if(this.setup_intent !== null) {\n this.working = true;\n const { setupIntent, error } = await this.$stripe.confirmCardSetup(\n this.setup_intent, {\n payment_method: {\n card: this.card,\n billing_details: {\n name: this.card_name\n }\n }\n });\n\n if (error) {\n this.$toast.error(error.message).goAway(3000);\n this.$store.dispatch('account/billing/setupIntent')\n this.working = false;\n } else {\n if(!this.subscription) {\n this.startSubscription(setupIntent.payment_method)\n } else {\n this.saveCard(setupIntent.payment_method);\n }\n }\n }\n },\n\n async startSubscription(payment_method) {\n this.working = true;\n if(this.working == true) {\n await this.$store.dispatch('account/subscription/startSubscription', {\n payment_method: payment_method,\n discount_code: this.discount_code\n }).then(() => {\n this.$store.dispatch('account/subscription/getSubscription')\n this.$store.dispatch('account/progress/get', { slug: 'financial'})\n this.$toast.success('Successfully started your subscription!').goAway(3000);\n this.$emit(\"input\", false);\n this.working = false;\n }).catch((error) => {\n this.$store.dispatch('account/billing/setupIntent')\n this.working = false;\n this.$toast.error(error.response.data).goAway(3000);\n })\n }\n },\n\n async saveCard(payment_method) {\n await this.$store.dispatch('account/billing/savePaymentMethod', {\n payment_method: payment_method,\n discount_code: this.discount_code\n }).then(() => {\n this.$store.dispatch('account/subscription/getSubscription')\n this.$toast.success('Successfully updated your subscription!').goAway(3000);\n this.$emit(\"input\", false);\n this.working = false;\n }).catch((error) => {\n this.working = false;\n })\n }\n },\n\n watch: {\n value: function () {\n if(this.value == true) {\n setTimeout(() => {\n this.isActive = true;\n }, 100)\n } else {\n setTimeout(() => {\n this.isActive = false;\n }, 100)\n }\n }\n }\n}\n","import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--2-0!../../../../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SubscriptionCardModal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--2-0!../../../../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SubscriptionCardModal.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./SubscriptionCardModal.vue?vue&type=template&id=7d8d7028&scoped=true&\"\nimport script from \"./SubscriptionCardModal.vue?vue&type=script&lang=js&\"\nexport * from \"./SubscriptionCardModal.vue?vue&type=script&lang=js&\"\nfunction injectStyles (context) {\n \n var style0 = require(\"./SubscriptionCardModal.vue?vue&type=style&index=0&id=7d8d7028&lang=postcss&scoped=true&\")\nif (style0.__inject__) style0.__inject__(context)\n\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 injectStyles,\n \"7d8d7028\",\n \"595193e0\"\n \n)\n\nexport default component.exports"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AAAA;AAAA;AAAA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AADA;AADA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AANA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAbA;AACA;AAcA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAFA;AADA;AADA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AADA;AAFA;AADA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAFA;AAIA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA3EA;AA6EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXA;AA/HA;;AC7GA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""}