{"version":3,"sources":["webpack:///./src/views/Unsubscribe.vue?20e9","webpack:///./src/views/Unsubscribe.vue?ef9b","webpack:///./src/views/Unsubscribe.vue?ef7a","webpack:///./src/views/Unsubscribe.vue","webpack:///./node_modules/core-js/modules/es.string.trim.js","webpack:///./node_modules/core-js/internals/whitespaces.js","webpack:///./node_modules/core-js/internals/string-trim.js","webpack:///./src/core/Configuration.ts","webpack:///./node_modules/core-js/internals/string-trim-forced.js"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","_v","_s","subscriptionTypeText","attrs","isUnsubscribing","on","btn_unsubscribe","_e","isPendingToConfirm","errorMessage","reactivateSubscription","goToPreferences","staticRenderFns","subscriptionTypeId","subscriptionType","resourceValue","resourceId","email","preferencesKey","urlKey","urlReason","reason","showError","showSuccess","unsubscribedSuccess","showReactivateSuccess","showReactivateError","setTimeout","data","UrlKey","UrlReason","a","post","then","response","unsubscribed","catch","error","Configuration","Instance","SubscriptionType","parseInt","SubscriptionTypeId","ResourceId","ResourceValue","Email","ErrorMessage","undefined","trim","length","Key","$route","query","key","window","location","href","encodeURIComponent","textarea","$refs","otherReason","focus","components","Button","component","$","$trim","forcedStringTrimMethod","target","proto","forced","module","exports","requireObjectCoercible","whitespaces","whitespace","ltrim","RegExp","rtrim","createMethod","TYPE","$this","string","String","replace","start","end","loggedIn","brandName","wasGloballyUnsubscribed","instance","hdnUrlKey","document","getElementById","value","remove","hdnUrlReason","hdnSubscriptionType","hdnSubscriptionTypeId","hdnResourceId","hdnResourceValue","hdnResourceEmail","hdnResourceErrorMessage","hdnLoggedIn","JSON","parse","toLowerCase","hdnBrandName","hdnWasGloballyUnsubscribed","loadDataFromDOM","fails","non","METHOD_NAME","name"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,qBAAqB,CAACF,EAAG,MAAM,CAAC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ASC,eAAe,mBAC1CM,IACFT,EAAS1E,WAAamF,EAAcL,MACpCK,EAAcJ,UAGhB,IAAMK,EAAmBR,SAASC,eAAe,sBAC7CO,IACFV,EAAS3E,cAAgBqF,EAAiBN,MAC1CM,EAAiBL,UAGnB,IAAMM,EAAmBT,SAASC,eAAe,aAC7CQ,IACFX,EAASzE,MAAQoF,EAAiBP,MAClCO,EAAiBN,UAGnB,IAAMO,EAA0BV,SAASC,eAAe,qBACpDS,IACFZ,EAASjF,aAAe6F,EAAwBR,MAChDQ,EAAwBP,UAG1B,IAAMQ,EAAcX,SAASC,eAAe,iBACxCU,IACFb,EAASH,SAAWiB,KAAKC,MAAMF,EAAYT,MAAMY,eACjDH,EAAYR,UAGd,IAAMY,EAAef,SAASC,eAAe,kBACzCc,IACFjB,EAASF,UAAYmB,EAAab,MAClCa,EAAaZ,UAGf,IAAMa,EAA6BhB,SAASC,eAAe,iCACvDe,IACFlB,EAASD,wBAA0Be,KAAKC,MAAMG,EAA2Bd,MAAMY,eAC/EE,EAA2Bb,Y,+BAnF7B,YAJ+BhD,IAA3BT,EAAcoD,WAChBpD,EAAcoD,SAAW,IAAIpD,EAC7BA,EAAcuE,gBAAgBvE,EAAcoD,WAEvCpD,EAAcoD,a,2BCPzB,IAAIoB,EAAQ,EAAQ,QAChBpC,EAAc,EAAQ,QAEtBqC,EAAM,MAIVxC,EAAOC,QAAU,SAAUwC,GACzB,OAAOF,GAAM,WACX,QAASpC,EAAYsC,MAAkBD,EAAIC,MAAkBD,GAAOrC,EAAYsC,GAAaC,OAASD","file":"js/chunk-2ae773e8.2a4f76e6.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"unsubscribed-page\"},[_c('div',{staticClass:\"FeedbackPage\"},[_c('div',{staticClass:\"FeedbackPage__iconUnsubscribed\"}),(_vm.isPendingToConfirm)?[_c('div',{staticClass:\"FeedbackPage__title\"},[_vm._v(\" Are you sure you want to unsubscribe? \")]),_c('div',{staticClass:\"FeedbackPage__text\"},[_vm._v(\" You are about to unsubscribe from receiving \"+_vm._s(_vm.subscriptionTypeText)+\". \")]),_c('div',{staticClass:\"FeedbackPage__actions\"},[_c('Button',{attrs:{\"type\":\"Link\",\"id\":\"confirmUnsubscription\",\"text\":\"Yes, unsubscribe\",\"is-loading\":_vm.isUnsubscribing},on:{\"click\":_vm.btn_unsubscribe}})],1)]:_vm._e(),_c('transition',{attrs:{\"name\":\"fade\"}},[(!_vm.isPendingToConfirm)?_c('div',{staticClass:\"FeedbackPage__module\"},[(_vm.unsubscribedSuccess)?[_c('div',{staticClass:\"FeedbackPage__title\"},[_vm._v(\" You have been successfully unsubscribed! \")]),_c('div',{staticClass:\"FeedbackPage__text\"},[_vm._v(\" You will no longer receive \"+_vm._s(_vm.subscriptionTypeText)+\" \")])]:[_c('div',{staticClass:\"FeedbackPage__title\"},[_vm._v(\" Something went wrong \")]),_c('div',{staticClass:\"FeedbackPage__text\"},[_vm._v(\" \"+_vm._s(_vm.errorMessage)+\" \")])],_c('div',{staticClass:\"FeedbackPage__actions\"},[(_vm.unsubscribedSuccess)?_c('div',[_c('Button',{attrs:{\"type\":\"Link\",\"id\":\"reactivateSubscription\",\"text\":\"Reactivate Subscription\"},on:{\"click\":_vm.reactivateSubscription}}),_c('Button',{attrs:{\"type\":\"Link\",\"id\":\"managePreferences\",\"text\":\"Manage Preferences\"},on:{\"click\":_vm.goToPreferences}})],1):_vm._e()])],2):_vm._e()]),(_vm.showReactivateSuccess)?_c('div',{staticClass:\"Messaging Messaging__success\"},[_vm._v(\"Your subscription has been reactivated.\")]):_vm._e(),(_vm.showReactivateError)?_c('div',{staticClass:\"Messaging Messaging__error\"},[_vm._v(\"Something went wrong, please try again.\")]):_vm._e()],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\nimport '../scss/index.scss';\nimport { Vue, Component, Prop } from 'vue-property-decorator';\nimport { Button } from '@frontiers-vue/button';\nimport axios, { AxiosResponse, AxiosError } from 'axios';\nimport Configuration from '../core/Configuration';\nimport { IUnsubscribedData } from '../core/models';\n// import Configuration from '@/core/Configuration';\n\n@Component({\n components: { Button },\n})\nexport default class Unsubscribe extends Vue {\n private isPendingToConfirm: boolean = true;\n private isUnsubscribing: boolean = false;\n private subscriptionTypeId: number = 0;\n private subscriptionType: string = '';\n private resourceValue: string = '';\n private resourceId: string = '';\n private email: string = '';\n private errorMessage: string = '';\n private preferencesKey: string = '';\n private urlKey: string = '';\n private urlReason: string = '';\n\n private reason: string = 'reason1';\n private showError: boolean = false;\n private showSuccess: boolean = false;\n private subscriptionTypeText: string = '';\n private unsubscribedSuccess: boolean = false;\n private showReactivateSuccess: boolean = false;\n private showReactivateError: boolean = false;\n\n private btn_unsubscribe(): void {\n this.isUnsubscribing = true;\n setTimeout(() => {\n this.isUnsubscribing = false;\n this.isPendingToConfirm = false;\n }, 2000);\n\n const data = { UrlKey: this.urlKey, UrlReason: this.urlReason };\n\n axios\n .post(`/emails/api/v1/unsubscribeToken`,\n data,\n )\n .then((response: AxiosResponse) => {\n this.preferencesKey = response.data.preferencesKey;\n this.subscriptionTypeId = response.data.subscriptionTypeId;\n this.unsubscribedSuccess = response.data.unsubscribed;\n })\n .catch((error: AxiosError) => {\n this.unsubscribedSuccess = false;\n });\n }\n\n private created(): void {\n this.subscriptionType = Configuration.Instance.SubscriptionType;\n this.subscriptionTypeId = parseInt(Configuration.Instance.SubscriptionTypeId, 10);\n this.resourceId = Configuration.Instance.ResourceId;\n this.resourceValue = Configuration.Instance.ResourceValue;\n this.email = Configuration.Instance.Email;\n this.errorMessage = Configuration.Instance.ErrorMessage;\n this.urlKey = Configuration.Instance.UrlKey;\n this.urlReason = Configuration.Instance.UrlReason;\n\n if (this.subscriptionType !== '') {\n if (this.resourceValue !== undefined && this.resourceValue !== null && this.resourceValue.trim().length > 0) {\n this.subscriptionTypeText = this.subscriptionType + ' for ' + this.resourceValue;\n } else {\n this.subscriptionTypeText = this.subscriptionType;\n }\n this.isPendingToConfirm = true;\n } else {\n this.isPendingToConfirm = false;\n this.unsubscribedSuccess = false;\n }\n\n }\n\n private reactivateSubscription(): void {\n const data = {\n Key: this.$route.query.key\n };\n\n axios\n .post(`/emails/api/v1/reactivateSubscription`,\n data,\n )\n .then((response: AxiosResponse) => {\n this.showReactivateSuccess = true;\n this.showReactivateError = false;\n })\n .catch((reason: AxiosError) => {\n this.showReactivateSuccess = false;\n this.showReactivateError = true;\n });\n }\n\n private goToPreferences(): void {\n window.location.href = '/emails/preferences/' + encodeURIComponent(this.preferencesKey);\n }\n\n private focusTextarea(): void {\n const textarea = this.$refs.otherReason as HTMLElement;\n\n textarea.focus();\n }\n\n private activateOtherReason(): void {\n this.reason = 'otherReason';\n }\n\n private fakingErrorSucces(): void {\n if (!this.showError && !this.showSuccess) {\n this.showError = true;\n } else {\n this.showError = !this.showError;\n this.showSuccess = !this.showSuccess;\n }\n }\n}\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Unsubscribe.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Unsubscribe.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Unsubscribe.vue?vue&type=template&id=59c2b32a&\"\nimport script from \"./Unsubscribe.vue?vue&type=script&lang=ts&\"\nexport * from \"./Unsubscribe.vue?vue&type=script&lang=ts&\"\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\nexport default component.exports","'use strict';\nvar $ = require('../internals/export');\nvar $trim = require('../internals/string-trim').trim;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.trim` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n trim: function trim() {\n return $trim(this);\n }\n});\n","// a string of all valid unicode whitespaces\n// eslint-disable-next-line max-len\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","var requireObjectCoercible = require('../internals/require-object-coercible');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = String(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.github.io/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n","export default class Configuration {\r\n\r\n public static get Instance(): Configuration {\r\n if (Configuration.instance === undefined) {\r\n Configuration.instance = new Configuration();\r\n Configuration.loadDataFromDOM(Configuration.instance);\r\n }\r\n return Configuration.instance;\r\n }\r\n\r\n public get SubscriptionType(): string { return this.subscriptionType; }\r\n public get UrlKey(): string { return this.urlKey; }\r\n public get UrlReason(): string { return this.urlReason; }\r\n public get SubscriptionTypeId(): string { return this.subscriptionTypeId; }\r\n public get ResourceId(): string { return this.resourceId; }\r\n public get ResourceValue(): string { return this.resourceValue; }\r\n public get Email(): string { return this.email; }\r\n public get ErrorMessage(): string { return this.errorMessage; }\r\n\r\n public get LoggedIn(): boolean { return this.loggedIn; }\r\n public get BrandName(): string { return this.brandName; }\r\n\r\n public get WasGloballyUnsubscribed(): boolean { return this.wasGloballyUnsubscribed; }\r\n\r\n private static instance: Configuration;\r\n\r\n private static loadDataFromDOM(instance: Configuration): void {\r\n const hdnUrlKey = document.getElementById('hdn-url-key') as HTMLInputElement;\r\n if (hdnUrlKey) {\r\n instance.urlKey = hdnUrlKey.value;\r\n hdnUrlKey.remove();\r\n }\r\n\r\n const hdnUrlReason = document.getElementById('hdn-url-reason') as HTMLInputElement;\r\n if (hdnUrlReason) {\r\n instance.urlReason = hdnUrlReason.value;\r\n hdnUrlReason.remove();\r\n }\r\n\r\n const hdnSubscriptionType = document.getElementById('hdn-subscription-type') as HTMLInputElement;\r\n if (hdnSubscriptionType) {\r\n instance.subscriptionType = hdnSubscriptionType.value;\r\n hdnSubscriptionType.remove();\r\n }\r\n\r\n const hdnSubscriptionTypeId = document.getElementById('hdn-subscription-type-id') as HTMLInputElement;\r\n if (hdnSubscriptionTypeId) {\r\n instance.subscriptionTypeId = hdnSubscriptionTypeId.value;\r\n hdnSubscriptionTypeId.remove();\r\n }\r\n\r\n const hdnResourceId = document.getElementById('hdn-resource-id') as HTMLInputElement;\r\n if (hdnResourceId) {\r\n instance.resourceId = hdnResourceId.value;\r\n hdnResourceId.remove();\r\n }\r\n\r\n const hdnResourceValue = document.getElementById('hdn-resource-value') as HTMLInputElement;\r\n if (hdnResourceValue) {\r\n instance.resourceValue = hdnResourceValue.value;\r\n hdnResourceValue.remove();\r\n }\r\n\r\n const hdnResourceEmail = document.getElementById('hdn-email') as HTMLInputElement;\r\n if (hdnResourceEmail) {\r\n instance.email = hdnResourceEmail.value;\r\n hdnResourceEmail.remove();\r\n }\r\n\r\n const hdnResourceErrorMessage = document.getElementById('hdn-error-message') as HTMLInputElement;\r\n if (hdnResourceErrorMessage) {\r\n instance.errorMessage = hdnResourceErrorMessage.value;\r\n hdnResourceErrorMessage.remove();\r\n }\r\n\r\n const hdnLoggedIn = document.getElementById('hdn-logged-in') as HTMLInputElement;\r\n if (hdnLoggedIn) {\r\n instance.loggedIn = JSON.parse(hdnLoggedIn.value.toLowerCase());\r\n hdnLoggedIn.remove();\r\n }\r\n\r\n const hdnBrandName = document.getElementById('hdn-brand-name') as HTMLInputElement;\r\n if (hdnBrandName) {\r\n instance.brandName = hdnBrandName.value;\r\n hdnBrandName.remove();\r\n }\r\n\r\n const hdnWasGloballyUnsubscribed = document.getElementById('hdn-was-globally-unsubscribed') as HTMLInputElement;\r\n if (hdnWasGloballyUnsubscribed) {\r\n instance.wasGloballyUnsubscribed = JSON.parse(hdnWasGloballyUnsubscribed.value.toLowerCase());\r\n hdnWasGloballyUnsubscribed.remove();\r\n }\r\n }\r\n\r\n private subscriptionType!: string;\r\n private urlKey!: string;\r\n private urlReason!: string;\r\n private subscriptionTypeId!: string;\r\n private resourceId!: string;\r\n private resourceValue!: string;\r\n private email!: string;\r\n private errorMessage!: string;\r\n\r\n private loggedIn!: boolean;\r\n private brandName!: string;\r\n private wasGloballyUnsubscribed!: boolean;\r\n}\r\n","var fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;\n });\n};\n"],"sourceRoot":""}