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0F,CACT,C,wBExBe,SAAS1K,IACtB,MAAmC,qBAApByL,UAAUC,KAC3B,C","sources":["webpack://agra/./app/javascript/campaign-action-shared/store/actions.js","webpack://agra/./app/javascript/campaign-action-shared/store/getters.js","webpack://agra/./app/javascript/campaign-action-shared/store/mutations.js","webpack://agra/./app/javascript/campaign-action-shared/store/one-click-from-crm-statuses.js","webpack://agra/./app/javascript/campaign-action-shared/store/state.js","webpack://agra/./app/javascript/daisy-chains/store/state.js","webpack://agra/./app/javascript/daisy-chains/store/actions.js","webpack://agra/./app/javascript/daisy-chains/store/getters.js","webpack://agra/./app/javascript/daisy-chains/store/mutations.js","webpack://agra/./app/javascript/daisy-chains/store/module.js","webpack://agra/./app/javascript/petition/comments/store/actions.js","webpack://agra/./app/javascript/petition/comments/store/mutations.js","webpack://agra/./app/javascript/petition/comments/store/index.js","webpack://agra/./app/javascript/petition/comments/store/state.js","webpack://agra/./app/javascript/petition/store/state.js","webpack://agra/./app/javascript/petition/store/getters.js","webpack://agra/./app/javascript/petition/store/mutations.js","webpack://agra/./app/javascript/petition/store/actions.js","webpack://agra/./app/javascript/petition/store/index.js","webpack://agra/./app/javascript/petition/store/build-state.js","webpack://agra/./app/javascript/utils/web-share-supported.js"],"sourcesContent":["import ajax from '../../helpers/ajax'\nimport { objectKeysToSnakeCase } from '../../helpers/transform-object-keys'\nimport { OneClickFromCrmStatus } from './one-click-from-crm-statuses'\n\nexport default {\n fetchGlobalSubscriptionDataFromCrm({ state, commit }) {\n ajax.get({\n url: state.globalSubscriptionCheck.url,\n throwOnFailure: true,\n successHandler: (resp) => {\n if (resp.subscribed) {\n commit('setCrmSubscribed')\n }\n }\n }).catch(() => {\n // If the network call to get the data fails, we want to just handle that situation,\n // rather than showing a \"network call failed\" message to the user.\n commit('setGlobalSubscriptionCheckFromCrmFailed')\n })\n },\n\n fetchOneClickDataFromCrm({ state, commit, dispatch }) {\n ajax.get({\n url: state.crmOneClickUrl,\n camelCaseResponse: false,\n throwOnFailure: true,\n successHandler: (resp) => {\n // We got data from the CRM!\n dispatch('handleIfAlreadyTakenAction', resp).then((alreadyTakenAction) => {\n if (!alreadyTakenAction) {\n // Use the one-click signing UX! We got enough information and the action-taker hasn't already taken action on this campaign.\n commit('activateOneClickFromCrm', resp)\n commit('applyOneClickFieldMappings', resp)\n\n dispatch('trackSawOneClick')\n\n state.oneClickFromCrmStatus = OneClickFromCrmStatus.SUCCEEDED\n\n if (resp.subscribed) {\n commit('setCrmSubscribed')\n }\n } else {\n state.oneClickFromCrmStatus = OneClickFromCrmStatus.ALREADY_TOOK_ACTION\n }\n })\n }\n }).catch(() => {\n // If the network call to get the data fails, we want to just handle that situation,\n // rather than showing a \"network call failed\" message to the user.\n commit('cancelOneClick')\n\n // Must be set after calling cancelOneClick to avoid setting OneClickFromCrmStatus.CANCELLED instead\n state.oneClickFromCrmStatus = OneClickFromCrmStatus.FAILED\n\n if (state.globalSubscriptionCheck.enabled) {\n commit('setGlobalSubscriptionCheckFromCrmFailed')\n }\n })\n }\n}\n\nexport function getNewActionPayload(state, actionType, suppressEmailOptInField, {friendlyCaptchaSolution, hcaptchaResponse, recaptchaToken, turnstileToken }) {\n const data = {\n [actionType]: {\n ...objectKeysToSnakeCase(state.action),\n ...state.extraParams\n }\n }\n\n // Reset the additional fields attribute that we want to send without transforming to snake case\n data[actionType].additional_fields = state.action.additionalFields\n\n if (suppressEmailOptInField) {\n delete data[actionType].join_organisation\n delete data[actionType].email_opt_in_type_id\n }\n\n if (friendlyCaptchaSolution) {\n data.friendly_captcha_solution = friendlyCaptchaSolution\n }\n\n if (hcaptchaResponse) {\n data.hcaptcha_response = hcaptchaResponse\n }\n\n if (recaptchaToken) {\n data.recaptcha_token = recaptchaToken\n }\n\n if (turnstileToken) {\n data.turnstile_token = turnstileToken\n }\n\n return data\n}\n","import { EU_COUNTRIES } from '@/eu-countries'\nimport { MIN_MD_SCREEN_WIDTH } from '@/constants'\n\nexport default {\n dataProcessingConsentField: (state) => {\n return state.fields.find((f) => f.name === 'euDataProcessingConsent')\n },\n\n dataProcessingConsentLabel: (state, getters) => {\n const fieldConfig = getters.dataProcessingConsentField\n\n if (!fieldConfig) {\n return null\n }\n\n return fieldConfig.label\n },\n\n fieldWasSetFromCrm: (state) => (fieldName) => {\n return state.fieldsSetFromCrm.indexOf(fieldName) !== -1\n },\n\n fieldValue: (state) => (fieldName) => {\n const matchingField = state.fields.find((f) => f.name === fieldName)\n\n if (!matchingField) {\n throw `invalid field name ${fieldName}`\n }\n\n if (matchingField.isAdditionalField) {\n return state.action.additionalFields[fieldName]\n } else {\n return state.action[fieldName]\n }\n },\n\n isSubscribedInCrm: (state) => {\n return state.globalSubscriptionCheck.email === state.action.email && state.globalSubscriptionCheck.isSubscribed\n },\n\n oneClickSigning: (state) => {\n return state.oneClickFromContext || state.oneClickFromCrm\n },\n\n shouldShowDataProcessingConsent: (state, getters) => {\n const fieldConfig = getters.dataProcessingConsentField\n if (!fieldConfig) {\n return null\n }\n\n if (fieldConfig.countryToggles && state.action.country) {\n return EU_COUNTRIES.includes(state.action.country)\n } else {\n return true\n }\n },\n\n showDataProcessingConsentAfterSubmit: (state, getters) => {\n // If we shouldn't show data processing consent at all, then we should not show the message\n if (!getters.shouldShowDataProcessingConsent) {\n return false\n }\n\n const fieldConfig = getters.dataProcessingConsentField\n\n // For explicit consent, we never show a message after the submit button\n if (fieldConfig.explicitConsentRequired) {\n return false\n }\n\n // If the message is configured for the \"after submit\" position, show it\n return fieldConfig.messagePosition === 'after_submit'\n },\n\n showSidebarForScreenSize: (state) => {\n return state.windowWidth >= MIN_MD_SCREEN_WIDTH\n },\n\n suppressEmailOptInField: (state) => {\n return state.globalSubscriptionCheck.suppressEmailOptInFieldIfCrmLookupFails && state.globalSubscriptionCheck.crmLookupFailed\n }\n}\n","import { OneClickFromCrmStatus } from './one-click-from-crm-statuses'\n\nexport default {\n activateOneClickFromCrm(state, { first_name }) {\n state.oneClickFromCrm = true\n state.actionTakerName = first_name\n },\n\n applyOneClickFieldMappings(state, crmResponse) {\n if (!state.oneClickFieldMappings) {\n return\n }\n\n for (const oneClickFieldMapping of state.oneClickFieldMappings) {\n // Lookup the agra field from the one-click field mapping in the list of fields to assign as\n // a regular or an additional field\n const matchingAgraField = state.fields.find((f) => f.name === oneClickFieldMapping.agraFieldName)\n\n if (!matchingAgraField) {\n console.log(`Could not find matching field with name ${oneClickFieldMapping.agraFieldName}`)\n continue\n }\n\n // Only assign from CRM if response includes a value. This avoids that additional fields\n // with hideIfSetFromCrm == true are implicitly set to null\n const fieldValueFromCrm = crmResponse[oneClickFieldMapping.crmFieldName]\n if (fieldValueFromCrm) {\n if (matchingAgraField.isAdditionalField) {\n state.action.additionalFields[oneClickFieldMapping.agraFieldName] = fieldValueFromCrm\n } else {\n state.action[oneClickFieldMapping.agraFieldName] = fieldValueFromCrm\n }\n\n state.fieldsSetFromCrm.push(oneClickFieldMapping.agraFieldName)\n }\n }\n },\n\n cancelOneClick(state) {\n if (state.tryOneClickFromCrm) {\n state.oneClickFromCrm = false\n state.extraParams.fill_from_crm = false\n state.oneClickFromCrmStatus = OneClickFromCrmStatus.CANCELLED\n }\n if (state.oneClickFromContext) {\n state.oneClickFromContext = false\n state.extraParams.fill_from_context = false\n }\n state.actionTakerName = null\n },\n\n hideActionFormModal(state) {\n state.showingActionFormModal = false\n },\n\n setCrmSubscribed(state) {\n state.globalSubscriptionCheck.isSubscribed = true\n },\n\n setShowDaisyChain(state, showDaisyChain) {\n state.showDaisyChain = showDaisyChain\n },\n\n setAdditionalFieldValue(state, {field, value}) {\n state.action.additionalFields[field] = value\n },\n\n setEmailOptInValues(state, { value }) {\n state.action.emailOptInTypeId = value.emailOptInTypeId\n state.action.joinOrganisation = value.joinOrganisation\n },\n\n setFieldValue(state, {field, value}) {\n state.action[field] = value\n },\n\n setGlobalSubscriptionCheckFromCrmFailed(state) {\n state.globalSubscriptionCheck.crmLookupFailed = true\n },\n\n setSmsOptInValues(state, {value}) {\n state.action.smsOptInTypeId = value.smsOptInTypeId\n state.action.optInSms = value.optInSms\n },\n\n setToastErrorMessage(state, message) {\n state.toastErrorMessage = message\n setTimeout(() => {\n state.toastErrorMessage = null\n }, 5000)\n },\n\n setWindowWidth(state, newWidth) {\n state.windowWidth = newWidth\n },\n\n showActionFormModal(state) {\n state.showingActionFormModal = true\n }\n}\n","export const OneClickFromCrmStatus = {\n NOT_AVAILABLE: 'NotAvailable',\n PENDING: 'Pending',\n FAILED: 'Failed',\n SUCCEEDED: 'Succeeded',\n ALREADY_TOOK_ACTION: 'AlreadyTookAction',\n CANCELLED: 'Cancelled'\n}\n","export default {\n // Configure the action form\n createActionUrl: null,\n fields: [],\n extraParams: {},\n\n action: {},\n\n showingActionFormModal: false,\n\n windowWidth: window.innerWidth,\n\n actionTakerName: null,\n\n submittingCreateAction: false,\n\n disclaimerContent: {\n beforeSubmit: '',\n afterSubmit: ''\n },\n\n notMeLink: {\n url: null,\n method: null\n },\n\n oneClickFromContext: false,\n\n tryOneClickFromCrm: false,\n oneClickFromCrm: false,\n crmOneClickUrl: null,\n oneClickFromCrmStatus: null,\n\n oneClickFieldMappings: null,\n fieldsSetFromCrm: [],\n\n globalSubscriptionCheck: {\n enabled: false,\n url: null,\n email: null,\n isSubscribed: false,\n suppressEmailOptInFieldIfCrmLookupFails: false,\n crmLookupFailed: false\n },\n\n // Handle submission: Needs email confirmation\n awaitingEmailConfirmation: false,\n\n // Handle submission: Error display\n toastErrorMessage: null,\n validationErrors: {},\n\n // Post-submission: Show daisy chain\n showDaisyChain: false,\n completingAction: false,\n baseDaisyChainsPath: null,\n daisyChainRepeatedAction: false,\n\n // Post-submission: Sharing\n sharing: null\n}\n","export default {\n // Unchanging information about the kind of campaign and action we're dealing with\n pageKind: null,\n baseUrl: null,\n repeatedAction: false,\n\n // Persistent success message\n thanksMessageKey: null,\n successMessageKey: null,\n\n // Information about our place in the chain\n currentStepKind: null,\n previousStepKind: null,\n hasNextStep: null,\n stepsProgress: null,\n\n // Information specific to the current step\n stepData: null,\n stepTrackingData: null\n}\n","import ajax from '../../helpers/ajax'\nimport { trackEvent } from '@/analytics/track'\nimport webShareSupported from '@/utils/web-share-supported'\n\nexport default {\n loadNextStep({state, dispatch}) {\n state.previousStepKind = state.currentStepKind\n dispatch('loadStep')\n },\n\n loadStep({state, commit, dispatch, getters}) {\n const params = {\n web_share_supported: webShareSupported()\n }\n if (state.repeatedAction !== null) {\n params.re_sign = state.repeatedAction\n }\n\n // If there is a \"partner\" URL parameter, pass it along\n const urlParams = new URLSearchParams(new URL(window.location.href).search)\n if (urlParams.has('after_action')) {\n params.after_action = urlParams.get('after_action')\n }\n if (urlParams.has('partner')) {\n params.partner = urlParams.get('partner')\n }\n\n ajax.get({\n url: state.previousStepKind ? getters.nextStepUrl : getters.firstStepUrl,\n params: params,\n successHandler: (resp) => {\n const { daisyChainStepKind:kind, stepData:data, showNextStep:hasNextStep, stepsProgress, trackingData:tracking } = resp\n\n commit('setCurrentStep', { kind, data, hasNextStep, stepsProgress, tracking })\n\n if (state.currentStepKind) {\n dispatch('trackStepEvent')\n }\n }\n })\n },\n\n trackStepEvent({getters}) {\n trackEvent(\n getters.trackingEventNameForCurrentStep,\n getters.trackingEventDataForCurrentStep,\n getters.trackingIdentity\n )\n }\n}\n","import { importWithRetry } from '@/utils/component-loader'\nimport { defineAsyncComponent } from 'vue'\n\nconst sharedComponentMapping = {\n embedded_iframe_modal: () => importWithRetry(() => import(/* webpackMode: \"lazy\" */ /* webpackChunkName: \"embedded-iframe-modal\" */ '../shared/embedded-iframe-modal')),\n redirect: () => importWithRetry(() => import(/* webpackMode: \"lazy\" */ /* webpackChunkName: \"daisy-chain-redirect\" */ '../shared/redirect')),\n welcome_modal: () => importWithRetry(() => import(/* webpackMode: \"lazy\" */ /* webpackChunkName: \"welcome-modal\" */ '../shared/welcome-modal'))\n}\nconst componentMapping = {\n event: {\n ...sharedComponentMapping,\n registration_modal: () => importWithRetry(() => import(/* webpackMode: \"lazy\" */ /* webpackChunkName: \"event-registration-modal\" */ '../events/registration-modal')),\n share_modal: () => importWithRetry(() => import(/* webpackMode: \"lazy\" */ /* webpackChunkName: \"event-share-modal\" */ '../events/share-modal')),\n welcome_to_local_chapter_modal: () => importWithRetry(() => import(/* webpackMode: \"lazy\" */ /* webpackChunkName: \"event-welcome-modal\" */ '../events/welcome-to-local-chapter-modal'))\n },\n petition: {\n ...sharedComponentMapping,\n effort_modal: () => importWithRetry(() => import(/* webpackMode: \"lazy\" */ /* webpackChunkName: \"petition-effort-modal\" */ '../petitions/effort-modal')),\n event_modal: () => importWithRetry(() => import(/* webpackMode: \"lazy\" */ /* webpackChunkName: \"petition-event-modal\" */ '../petitions/event-modal')),\n local_chapter_modal: () => importWithRetry(() => import(/* webpackMode: \"lazy\" */ /* webpackChunkName: \"petition-local-chapter-modal\" */ '../petitions/local-chapter-modal')),\n promoted_petition_modal: () => importWithRetry(() => import(/* webpackMode: \"lazy\" */ /* webpackChunkName: \"promoted-petition-modal\" */ '../petitions/promoted-petition-modal')),\n share_modal: () => importWithRetry(() => import(/* webpackMode: \"lazy\" */ /* webpackChunkName: \"petition-share-modal\" */ '../petitions/share-modal'))\n }\n}\n\nconst trackingMetadataByPageAndStepKind = {\n event: {\n embedded_iframe_modal: {\n name: 'Saw IFrame Modal Step',\n slug: 'iframe-modal'\n },\n redirect: {\n name: 'Redirect After Event RSVP',\n slug: 'redirect'\n },\n registration_modal: {\n name: 'Saw Registration Modal Step',\n slug: 'registration-modal'\n },\n share_modal: {\n name: 'Saw Share Modal Step',\n slug: 'share-modal'\n },\n welcome_modal: {\n name: 'Saw Welcome Modal Step',\n slug: 'welcome-modal'\n },\n welcome_to_local_chapter_modal: {\n name: 'Saw Welcome To Local Group Modal Step',\n slug: 'welcome-to-local-group'\n }\n },\n petition: {\n effort_modal: {\n name: 'Saw Effort Modal Step',\n slug: 'effort-modal'\n },\n embedded_iframe_modal: {\n name: 'Saw IFrame Modal Step',\n slug: 'iframe-modal'\n },\n event_modal: {\n name: 'Saw Event Modal Step',\n slug: 'event-modal'\n },\n local_chapter_modal: {\n name: 'Saw Local Chapter Modal Step',\n slug: 'local-chapter-effort-modal'\n },\n promoted_petition_modal: {\n name: 'Saw Promoted Petition Modal Step',\n slug: 'promoted-petition-modal'\n },\n redirect: {\n name: 'Redirect After Signing Petition',\n slug: 'redirect'\n },\n share_modal: {\n name: 'Saw Share Modal Step',\n slug: 'share-modal'\n },\n welcome_modal: {\n name: 'Saw Welcome Modal Step',\n slug: 'welcome-modal'\n }\n }\n}\n\nexport default {\n currentStepComponent: (state) => {\n return defineAsyncComponent(componentMapping[state.pageKind][state.currentStepKind])\n },\n\n firstStepUrl: (state) => {\n return `${state.baseUrl}/start`\n },\n\n nextStepUrl: (state) => {\n return `${state.baseUrl}/${state.previousStepKind}`\n },\n\n trackingEventDataForCurrentStep: (state) => {\n const page = state.stepTrackingData.page\n const action = state.stepTrackingData.action\n\n const trackingData = {\n action: trackingMetadataByPageAndStepKind[state.pageKind][state.currentStepKind].slug,\n category: `${state.pageKind}-daisy-chain`,\n name: page.slug,\n source: action.source,\n value: action.source\n }\n\n trackingData[state.pageKind] = page.slug\n\n // Certain steps have extra tracking data\n switch (state.currentStepKind) {\n case 'promoted_petition_modal':\n trackingData.promoted_petition = state.stepData.promotedPetitions[0].slug\n trackingData.value = state.stepData.promotedPetitions[0].slug\n break\n case 'redirect':\n trackingData.redirect_url = state.stepData.redirectUrl\n trackingData.value = state.stepData.redirectUrl\n break\n }\n\n return trackingData\n },\n\n trackingEventNameForCurrentStep: (state) => {\n return trackingMetadataByPageAndStepKind[state.pageKind][state.currentStepKind].name\n },\n\n trackingIdentity: (state) => {\n const memberInfo = state.stepTrackingData.member\n // TODO: include anonymousId in here either way, as we do in views/tracking_integrations/_track_action.erb\n return memberInfo ? { id: memberInfo.id, email: memberInfo.email } : {}\n }\n}\n","export default {\n initializeDaisyChain(state, details) {\n const { pageKind, baseUrl, repeatedAction, thanksMessageKey, successMessageKey, previousStepKind } = details\n state.pageKind = pageKind\n state.baseUrl = baseUrl\n state.repeatedAction = repeatedAction\n state.thanksMessageKey = thanksMessageKey\n state.successMessageKey = successMessageKey\n state.previousStepKind = previousStepKind\n },\n\n setCurrentStep(state, { kind, data, hasNextStep, stepsProgress, tracking }) {\n state.currentStepKind = kind\n state.stepData = data\n state.hasNextStep = hasNextStep\n state.stepsProgress = stepsProgress\n state.stepTrackingData = tracking\n }\n}\n","import state from './state'\nimport actions from './actions'\nimport getters from './getters'\nimport mutations from './mutations'\n\nexport default {\n namespaced: true,\n\n state,\n actions,\n getters,\n mutations\n}\n","import ajax from '@/helpers/ajax'\n\nasync function fetchNextPageOfComments({ state, commit }) {\n const {data: { comments }, meta: { currentPage, nextPage}} = await fetchPageOfComments(state.petitionSlug, state.currentPage + 1)\n commit('appendComments', { comments, currentPage, nextPage })\n}\n\nfunction flagComment({ state, commit }, { commentId, friendlyCaptchaSolution, hcaptchaResponse, recaptchaToken, turnstileToken }) {\n const payload = {}\n\n if (friendlyCaptchaSolution) {\n payload.friendly_captcha_solution = friendlyCaptchaSolution\n }\n if (hcaptchaResponse) {\n payload.hcaptcha_response = hcaptchaResponse\n }\n if (recaptchaToken) {\n payload.recaptcha_token = recaptchaToken\n }\n if (turnstileToken) {\n payload.turnstile_token = turnstileToken\n }\n\n return new Promise((resolve, reject) => {\n ajax.post({\n url: petitionCommentFlagPath(state.petitionSlug, commentId),\n data: payload,\n successHandler: () => {\n fetchPageOfComments(state.petitionSlug, 1)\n .then(({ data: { comments }, meta: { currentPage, nextPage} }) => {\n commit('initializeComments', { comments, currentPage, nextPage })\n })\n .then(() => {\n resolve()\n })\n },\n errorHandler: (err) => {\n reject(err)\n }\n })\n })\n}\n\n// Helpers\n\nfunction fetchPageOfComments(petitionSlug, page) {\n return new Promise((resolve, reject) => {\n ajax.get({\n url: petitionCommentsPath(petitionSlug),\n params: { page },\n successHandler: (response) => {\n resolve(response)\n },\n errorHandler: (err) => {\n reject(err)\n }\n })\n })\n}\n\nfunction petitionCommentsPath(petitionSlug) {\n return `/petitions/${petitionSlug}/comments`\n}\n\nfunction petitionCommentFlagPath(petitionSlug, commentId) {\n return `/petitions/${petitionSlug}/comments/${commentId}/flags`\n}\n\nexport default {\n fetchNextPageOfComments,\n flagComment\n}\n","const COMMENTS_DEFAULT_COUNT = 3\n\nfunction addCreatedComment(state, comment) {\n state.comments.unshift(comment)\n if (state.comments.length > COMMENTS_DEFAULT_COUNT) {\n // We remove the last shown comment, since it's moved to the next page.\n state.comments.pop()\n }\n}\n\nfunction appendComments(state, { comments, currentPage, nextPage }) {\n state.comments = state.comments.concat(comments)\n setPagination(state, { currentPage, nextPage })\n}\n\nfunction initializeComments(state, { comments, currentPage, nextPage }) {\n state.comments = comments\n setPagination(state, { currentPage, nextPage} )\n}\n\nfunction setErrorLoadingComments(state, error) {\n state.errorLoadingComments = error\n}\n\nfunction setPagination(state, { currentPage, nextPage }) {\n state.currentPage = currentPage\n state.nextPage = nextPage\n}\n\nfunction setPetitionSlug(state, petitionSlug) {\n state.petitionSlug = petitionSlug\n}\n\nexport default {\n addCreatedComment,\n appendComments,\n initializeComments,\n setErrorLoadingComments,\n setPagination,\n setPetitionSlug\n}\n","import actions from './actions'\nimport mutations from './mutations'\nimport state from './state'\n\nexport default {\n namespaced: true,\n\n state,\n actions,\n mutations\n}\n","export default {\n errorLoadingComments: null,\n comments: [],\n currentPage: 1,\n nextPage: null,\n petitionSlug: null\n}\n","import campaignActionSharedState from '@/campaign-action-shared/store/state'\n\nexport default {\n ...campaignActionSharedState,\n\n petition: {\n slug: null,\n successful: false,\n progressBarHidden: false,\n sharingAllowed: true,\n signatureFormHidden: false,\n signersWriteToTarget: false,\n hasImage: false,\n categoryIds: []\n },\n\n alreadySignedOnPageLoad: false,\n shareButtonClicked: false,\n\n progress: {\n progressPercentage: 0,\n currentSignaturesCount: 0,\n currentSignaturesGoal: 0\n },\n\n showUnconfirmedSignaturesDisclaimer: false,\n\n signed: false,\n signTitle: null,\n\n recentActions: [],\n\n createPetitionCommentPath: null,\n\n categoriesModalOpen: false,\n imageUploadModalOpen: false,\n showingShareBanner: false\n}\n","import campaignActionSharedGetters from '@/campaign-action-shared/store/getters'\nimport i18n from '@/phoenix/translations'\nimport { MIN_MD_SCREEN_WIDTH } from '@/constants'\n\nconst SIGNATURES_COUNT_DISPLAY_MINIMUM = 5\n\nexport default {\n ...campaignActionSharedGetters,\n\n showFixedSignButton: (state) => {\n return !state.signed && !state.petition.signatureFormHidden\n },\n\n showProgressBar: (state) => {\n return !state.petition.progressBarHidden && state.progress.currentSignaturesCount >= SIGNATURES_COUNT_DISPLAY_MINIMUM\n },\n\n showProgressBarOnForm: (state, getters) => {\n return getters.showProgressBar && state.windowWidth >= MIN_MD_SCREEN_WIDTH\n },\n\n showProgressBarAboveFixedSignButtom: (state, getters) => {\n return getters.showProgressBar && getters.showFixedSignButton && state.windowWidth < MIN_MD_SCREEN_WIDTH\n },\n\n showSidebar: (state, getters) => {\n return getters.showSidebarForScreenSize || state.signed\n },\n\n submitButtonText: (state) => {\n if (state.overriddenSubmitButtonText) {\n return state.overriddenSubmitButtonText\n }\n else if (state.petition.signersWriteToDecisionMaker) {\n return i18n.t('buttons.send_message')\n }\n else {\n return i18n.t('buttons.sign')\n }\n }\n}\n","import campaignActionSharedMutations from '@/campaign-action-shared/store/mutations'\n\nexport default {\n ...campaignActionSharedMutations,\n\n categoriesModalClosed(state) {\n state.categoriesModalOpen = false\n },\n\n hideShareBanner(state) {\n state.showingShareBanner = false\n },\n\n imageUploadModalClosed(state) {\n state.imageUploadModalOpen = false\n },\n\n openCategoriesModal(state) {\n state.categoriesModalOpen = true\n },\n\n openImageUploadModal(state) {\n state.imageUploadModalOpen = true\n },\n\n setAlreadySigned(state, { actionTakerName, createPetitionCommentPath}) {\n state.signed = true\n state.alreadySignedOnPageLoad = true\n state.actionTakerName = actionTakerName\n state.createPetitionCommentPath = createPetitionCommentPath\n },\n\n setCategoryIds(state, categoryIds) {\n state.petition.categoryIds = categoryIds\n },\n\n setHasImage(state, hasImage) {\n state.petition.hasImage = hasImage\n },\n\n setShareButtonClicked(state) {\n state.shareButtonClicked = true\n },\n\n showShareBanner(state) {\n state.showingShareBanner = true\n }\n}\n","import ajax from '../../helpers/ajax'\nimport campaignActionSharedActions, { getNewActionPayload } from '../../campaign-action-shared/store/actions'\nimport storeModule from '../../daisy-chains/store/module'\nimport { trackEvent } from '@/analytics/track'\n\nexport default {\n ...campaignActionSharedActions,\n fetchExistingSignatureByToken({ state, commit }, token) {\n ajax.get({\n url: `/petitions/${state.petition.slug}/already_signed`,\n params: {\n signature_token: token\n },\n successHandler: (resp) => {\n commit('setAlreadySigned', resp)\n }\n })\n },\n\n handleIfAlreadyTakenAction({dispatch}, {already_signed, existing_signature_token}) {\n if (already_signed) {\n // The CRM says that the member has already signed this petition.\n // This feature is currently only supported by Campact CRM, for signatures.\n dispatch('fetchExistingSignatureByToken', existing_signature_token)\n return true\n }\n return false\n },\n\n saveNewAction: async function({state, getters, commit, dispatch}, { friendlyCaptchaSolution, hcaptchaResponse, recaptchaToken, turnstileToken }) {\n state.submittingCreateAction = true\n const data = getNewActionPayload(\n state, 'signature', getters.suppressEmailOptInField, { friendlyCaptchaSolution, hcaptchaResponse, recaptchaToken, turnstileToken }\n )\n\n ajax.post({\n url: state.createActionUrl,\n data,\n successHandler: (resp) => {\n // Successful signature!\n // If the response says we should redirect somewhere immediately, just do that.\n // This happens when we're in an embedded signature form, and on success we should redirect to the petition page.\n if (resp.redirectTo) {\n window.top.location = resp.redirectTo\n return\n }\n\n // We're not redirecting, so extract a bunch of stuff from the response to update the state.\n const { signature, baseDaisyChainsPath, campaignPath, createPetitionCommentPath, recentAction, trackingData } = resp\n state.signed = true\n state.createPetitionCommentPath = createPetitionCommentPath\n trackEvent('Signed Petition', trackingData.parameters, trackingData.identity)\n\n // If the page url doesn't match the petition page (which can happen if signature is from embed or facebook),\n // change page url to be a petition page url so it's shareable.\n // This does not reload the page.\n if (window.location.pathname !== campaignPath) {\n window.history.pushState({page: 'shareable_petition_page'}, '', campaignPath)\n }\n\n if (signature.requiresEmailConfirmation) {\n state.awaitingEmailConfirmation = true\n } else {\n // Kick off daisy chain\n dispatch('startDaisyChain', { baseDaisyChainsPath: baseDaisyChainsPath, repeatedAction: signature.repeatedAction })\n }\n\n // If the recent action is included in the response, add recent action to list if we already have some in the list\n if (recentAction && state.recentActions.length) {\n state.recentActions.unshift(recentAction)\n\n if (state.recentActions.length > 5) {\n state.recentActions.pop()\n }\n }\n },\n errorHandler: ({ info }) => {\n state.validationErrors = info.errors\n\n if (info.cancelOneClick) {\n commit('cancelOneClick')\n }\n }\n }).then(() => {\n state.submittingCreateAction = false\n })\n },\n\n startDaisyChain({ state, commit }, { baseDaisyChainsPath, repeatedAction }) {\n this.registerModule('daisyChain', storeModule)\n commit('setShowDaisyChain', true)\n\n let successMessageKey\n if (state.petition.signersWriteToDecisionMaker) {\n successMessageKey = 'public.daisy_chains.petitions.social_share_modal.message_sent'\n }\n else {\n successMessageKey = 'public.daisy_chains.petitions.signature_recorded'\n }\n\n commit('daisyChain/initializeDaisyChain', {\n pageKind: 'petition',\n baseUrl: baseDaisyChainsPath,\n previousStepKind: null,\n repeatedAction,\n successMessageKey,\n thanksMessageKey: 'public.daisy_chains.petitions.thanks_for_support'\n })\n },\n\n trackSawOneClick({state}) {\n trackEvent('Saw petition one-click signature', {\n action: 'one-click-signature',\n category: 'petition',\n name: state.petition.slug,\n petition: state.petition.slug\n })\n }\n}\n","import { createStore } from 'vuex'\nimport comments from '../comments/store'\nimport defaultState from './state'\nimport buildState from './build-state'\nimport getters from './getters'\nimport mutations from './mutations'\nimport actions from './actions'\n\nlet store\n\nexport default function buildStore(componentName) {\n const state = buildState(componentName, defaultState)\n store = createStore({\n state,\n getters,\n mutations,\n actions,\n\n modules: {\n comments\n }\n })\n\n return store\n}\n","import { OneClickFromCrmStatus } from '@/campaign-action-shared/store/one-click-from-crm-statuses'\n\nexport default function buildState(componentName, defaultState) {\n const el = document.querySelector(`.vue-component-loader[data-component-name=${componentName}]`)\n const { ...initialState } = JSON.parse(el.dataset.storeData)\n\n const state = {...defaultState, ...initialState}\n\n if (state.tryOneClickFromCrm) {\n state.oneClickFromCrmStatus = OneClickFromCrmStatus.PENDING\n } else {\n state.oneClickFromCrmStatus = OneClickFromCrmStatus.NOT_AVAILABLE\n }\n\n return state\n}\n","export default function webShareSupported() {\n return (typeof navigator.share !== 'undefined')\n}\n"],"names":["getNewActionPayload","state","actionType","suppressEmailOptInField","friendlyCaptchaSolution","hcaptchaResponse","recaptchaToken","turnstileToken","data","objectKeysToSnakeCase","action","extraParams","additional_fields","additionalFields","join_organisation","email_opt_in_type_id","friendly_captcha_solution","hcaptcha_response","recaptcha_token","turnstile_token","fetchGlobalSubscriptionDataFromCrm","commit","ajax","get","url","globalSubscriptionCheck","throwOnFailure","successHandler","resp","subscribed","catch","fetchOneClickDataFromCrm","dispatch","crmOneClickUrl","camelCaseResponse","then","alreadyTakenAction","oneClickFromCrmStatus","OneClickFromCrmStatus","ALREADY_TOOK_ACTION","SUCCEEDED","FAILED","enabled","dataProcessingConsentField","fields","find","f","name","dataProcessingConsentLabel","getters","fieldConfig","label","fieldWasSetFromCrm","fieldName","fieldsSetFromCrm","indexOf","fieldValue","matchingField","isAdditionalField","isSubscribedInCrm","email","isSubscribed","oneClickSigning","oneClickFromContext","oneClickFromCrm","shouldShowDataProcessingConsent","countryToggles","country","EU_COUNTRIES","includes","showDataProcessingConsentAfterSubmit","explicitConsentRequired","messagePosition","showSidebarForScreenSize","windowWidth","MIN_MD_SCREEN_WIDTH","suppressEmailOptInFieldIfCrmLookupFails","crmLookupFailed","activateOneClickFromCrm","first_name","actionTakerName","applyOneClickFieldMappings","crmResponse","oneClickFieldMappings","oneClickFieldMapping","matchingAgraField","agraFieldName","console","log","fieldValueFromCrm","crmFieldName","push","cancelOneClick","tryOneClickFromCrm","fill_from_crm","CANCELLED","fill_from_context","hideActionFormModal","showingActionFormModal","setCrmSubscribed","setShowDaisyChain","showDaisyChain","setAdditionalFieldValue","field","value","setEmailOptInValues","emailOptInTypeId","joinOrganisation","setFieldValue","setGlobalSubscriptionCheckFromCrmFailed","setSmsOptInValues","smsOptInTypeId","optInSms","setToastErrorMessage","message","toastErrorMessage","setTimeout","setWindowWidth","newWidth","showActionFormModal","NOT_AVAILABLE","PENDING","createActionUrl","window","innerWidth","submittingCreateAction","disclaimerContent","beforeSubmit","afterSubmit","notMeLink","method","awaitingEmailConfirmation","validationErrors","completingAction","baseDaisyChainsPath","daisyChainRepeatedAction","sharing","loadNextStep","previousStepKind","currentStepKind","loadStep","params","web_share_supported","webShareSupported","repeatedAction","re_sign","urlParams","URLSearchParams","URL","location","href","search","has","after_action","partner","nextStepUrl","firstStepUrl","daisyChainStepKind","kind","stepData","showNextStep","hasNextStep","stepsProgress","trackingData","tracking","trackStepEvent","trackEvent","trackingEventNameForCurrentStep","trackingEventDataForCurrentStep","trackingIdentity","sharedComponentMapping","embedded_iframe_modal","importWithRetry","redirect","welcome_modal","componentMapping","event","registration_modal","share_modal","welcome_to_local_chapter_modal","petition","effort_modal","event_modal","local_chapter_modal","promoted_petition_modal","trackingMetadataByPageAndStepKind","slug","currentStepComponent","defineAsyncComponent","pageKind","baseUrl","page","stepTrackingData","category","source","promoted_petition","promotedPetitions","redirect_url","redirectUrl","memberInfo","member","id","initializeDaisyChain","details","thanksMessageKey","successMessageKey","setCurrentStep","namespaced","actions","mutations","fetchPageOfComments","petitionSlug","Promise","resolve","reject","petitionCommentsPath","response","errorHandler","err","petitionCommentFlagPath","commentId","fetchNextPageOfComments","async","comments","meta","currentPage","nextPage","flagComment","payload","post","setPagination","addCreatedComment","comment","unshift","length","pop","appendComments","concat","initializeComments","setErrorLoadingComments","error","errorLoadingComments","setPetitionSlug","campaignActionSharedState","successful","progressBarHidden","sharingAllowed","signatureFormHidden","signersWriteToTarget","hasImage","categoryIds","alreadySignedOnPageLoad","shareButtonClicked","progress","progressPercentage","currentSignaturesCount","currentSignaturesGoal","showUnconfirmedSignaturesDisclaimer","signed","signTitle","recentActions","createPetitionCommentPath","categoriesModalOpen","imageUploadModalOpen","showingShareBanner","campaignActionSharedGetters","showFixedSignButton","showProgressBar","showProgressBarOnForm","showProgressBarAboveFixedSignButtom","showSidebar","submitButtonText","overriddenSubmitButtonText","signersWriteToDecisionMaker","i18n","t","campaignActionSharedMutations","categoriesModalClosed","hideShareBanner","imageUploadModalClosed","openCategoriesModal","openImageUploadModal","setAlreadySigned","setCategoryIds","setHasImage","setShareButtonClicked","showShareBanner","campaignActionSharedActions","fetchExistingSignatureByToken","token","signature_token","handleIfAlreadyTakenAction","already_signed","existing_signature_token","saveNewAction","redirectTo","top","signature","campaignPath","recentAction","parameters","identity","pathname","history","pushState","requiresEmailConfirmation","info","errors","startDaisyChain","this","registerModule","storeModule","trackSawOneClick","store","buildStore","componentName","defaultState","el","document","querySelector","initialState","JSON","parse","dataset","storeData","buildState","createStore","modules","navigator","share"],"sourceRoot":""}