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A0J,mBAAAA,KAAAA,EAAAA,CAAAA,aAAAA,QAAAA,mBAAAA,qBAAAA,QAAAA,aAAAA,GAAAA,I","sources":["webpack://agra/./app/javascript/turnstile.js","webpack://agra/./app/javascript/components/buttons/hcaptcha-submit-button.vue","webpack://agra/./app/javascript/components/buttons/hcaptcha-submit-button.vue?ec2a","webpack://agra/./app/javascript/components/buttons/recaptcha-submit-button.vue","webpack://agra/./app/javascript/components/buttons/recaptcha-submit-button.vue?57d8","webpack://agra/./app/javascript/components/buttons/turnstile-submit-button.vue","webpack://agra/./app/javascript/components/buttons/turnstile-submit-button.vue?ea9c","webpack://agra/./app/javascript/components/buttons/bot-protected-submit-button.vue","webpack://agra/./app/javascript/components/buttons/bot-protected-submit-button.vue?be28","webpack://agra/./app/javascript/recaptcha.js","webpack://agra/./app/javascript/components/buttons/friendly-captcha-submit-button.vue","webpack://agra/./app/javascript/components/buttons/friendly-captcha-submit-button.vue?3f41"],"sourcesContent":["// The \"turnstile\" variable is defined in the script from Cloudflare.\n/* eslint-disable no-undef */\nexport async function waitForTurnstileLoaded(delay) {\n  return new Promise((resolve, reject) => {\n    if (typeof turnstile !== 'undefined' && turnstile !== null) {\n      resolve(turnstile)\n    } else {\n      // delay up to 10 seconds, checking with an increasing backoff.\n      if (delay < 10000) {\n        console.log('delaying ' + delay)\n\n        setTimeout(async function() {\n          resolve(await waitForTurnstileLoaded(delay * 2))\n        }, delay)\n\n      } else {\n        reject('Cloudflare Turnstile service did not load')\n      }\n    }\n  })\n}\n","<template>\n  <div>\n    <vue-hcaptcha ref=\"hcaptcha\" :sitekey=\"hcaptchaSiteKey\" size=\"invisible\" :re-captcha-compat=\"false\"\n                  @verify=\"setHcaptchaResponseAndSubmit\" />\n    <validation-errors v-if=\"showValidationError\" :errors=\"[validationErrorMessage]\" class=\"mb-1\" />\n    <submit-button :form-valid=\"formValid\" :label=\"label\" :submitting-label=\"submittingLabel\"\n                   :submit-in-progress=\"submitInProgress\" :class=\"buttonClass\"\n                   @click=\"executeHcaptcha\" />\n  </div>\n</template>\n\n<script>\nimport SubmitButton from './submit-button'\nimport ValidationErrors from '@/components/inputs/validation-errors'\nimport VueHcaptcha from '@hcaptcha/vue3-hcaptcha'\n\nexport default {\n  components: { SubmitButton, ValidationErrors, VueHcaptcha },\n\n  props: {\n    // This prop needs to be named `buttonClass` rather than `class` because ESLint will\n    // throw a vue/no-parsing-error error if a prop is named `class`.\n    buttonClass: {\n      type: String,\n      required: false,\n      default: ''\n    },\n    formValid: {\n      type: Boolean,\n      required: false,\n      default: true\n    },\n    label: {\n      type: String,\n      required: true\n    },\n    submitInProgress: {\n      type: Boolean,\n      required: false,\n      default: false\n    },\n    submittingLabel: {\n      type: String,\n      required: false\n    },\n    validationErrors: {\n      type: Object,\n      required: false,\n      default: () => ({})\n    }\n  },\n\n  emits: ['submit-with-token'],\n\n  data() {\n    return {\n      hcaptchaResponse: null\n    }\n  },\n\n  computed: {\n    hcaptchaSiteKey() {\n      return this.agraConfiguration.botProtection.siteKey\n    },\n\n    showValidationError() {\n      return !!this.validationErrors.hcaptchaVerifyResult\n    },\n\n    validationErrorMessage() {\n      return this.i18n.t('public.bot_protection.rejected', {org_name: this.agraConfiguration.organisationName})\n    }\n  },\n\n  methods: {\n    executeHcaptcha() {\n      this.$refs.hcaptcha.execute()\n    },\n\n    setHcaptchaResponseAndSubmit(token) {\n      this.hcaptchaResponse = token\n      this.$emit('submit-with-token', {hcaptchaResponse: this.hcaptchaResponse})\n    }\n  }\n}\n</script>\n","import { render } from \"./hcaptcha-submit-button.vue?vue&type=template&id=03538bc8\"\nimport script from \"./hcaptcha-submit-button.vue?vue&type=script&lang=js\"\nexport * from \"./hcaptcha-submit-button.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","<template>\n  <div>\n    <validation-errors v-if=\"showValidationError\" :errors=\"validationErrorMessages\" class=\"mb-1\" />\n    <submit-button :form-valid=\"formValid && recaptchaLoaded\"\n                   :label=\"label\" :submitting-label=\"submittingLabel\"\n                   :submit-in-progress=\"submitInProgress\" :class=\"buttonClass\"\n                   @click=\"submit\" />\n  </div>\n</template>\n\n<script>\nimport SubmitButton from './submit-button'\nimport ValidationErrors from '@/components/inputs/validation-errors'\n\nexport default {\n  components: { SubmitButton, ValidationErrors },\n\n  props: {\n    // This prop needs to be named `buttonClass` rather than `class` because ESLint will\n    // throw a vue/no-parsing-error error if a prop is named `class`.\n    buttonClass: {\n      type: String,\n      required: false\n    },\n\n    recaptchaAction: {\n      type: String,\n      required: true\n    },\n\n    formValid: {\n      type: Boolean,\n      required: false,\n      default: true\n    },\n\n    label: {\n      type: String,\n      required: true\n    },\n\n    submitInProgress: {\n      type: Boolean,\n      required: false,\n      default: false\n    },\n\n    submittingLabel: {\n      type: String,\n      required: false\n    },\n\n    validationErrors: {\n      type: Object,\n      required: false,\n      default: () => ({})\n    }\n  },\n\n  emits: ['submit-with-token'],\n\n  data() {\n    return {\n      recaptchaLoaded: false\n    }\n  },\n\n  computed: {\n    showValidationError() {\n      return this.validationErrors.recaptchaScore || this.validationErrors.recaptchaVerifyResult\n    },\n\n    validationErrorMessages() {\n      if (this.validationErrors.recaptchaVerifyResult) {\n        return this.validationErrors.recaptchaVerifyResult\n      } else {\n        return [this.i18n.t('public.bot_protection.rejected', {org_name: this.agraConfiguration.organisationName})]\n      }\n    }\n  },\n\n  created() {\n    // Lazy-loading the recaptcha initialization script.\n    const { waitForRecaptchaLoaded } = require('../../recaptcha')\n    this.waitForRecaptchaLoaded = waitForRecaptchaLoaded\n  },\n\n  mounted: async function() {\n    await this.waitForRecaptchaLoaded(200)\n    this.recaptchaLoaded = true\n  },\n\n  methods: {\n    waitForToken(action) {\n      const siteKey = this.agraConfiguration.botProtection.siteKey\n      return new Promise((resolve) => {\n        /* eslint-disable-next-line no-undef  */\n        grecaptcha.ready(() => {\n          /* eslint-disable-next-line no-undef  */\n          grecaptcha.execute(siteKey, { action })\n            .then((token) => {\n              resolve(token)\n            })\n        })\n      })\n    },\n\n    submit: async function() {\n      const recaptchaToken = await this.waitForToken(this.recaptchaAction)\n      this.$emit('submit-with-token', {recaptchaToken})\n    }\n  }\n}\n</script>\n","import { render } from \"./recaptcha-submit-button.vue?vue&type=template&id=ca0cfbc8\"\nimport script from \"./recaptcha-submit-button.vue?vue&type=script&lang=js\"\nexport * from \"./recaptcha-submit-button.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","<template>\n  <div>\n    <div ref=\"turnstileContainer\" />\n    <validation-errors v-if=\"showValidationError\" :errors=\"[validationErrorMessage]\" class=\"mb-1\" />\n    <submit-button :form-valid=\"formValid && challengePassed\"\n                   :label=\"label\" :submitting-label=\"submittingLabel\"\n                   :submit-in-progress=\"submitInProgress\" :class=\"buttonClass\"\n                   @click=\"submit\" />\n  </div>\n</template>\n\n<script>\nimport { nextTick } from 'vue'\nimport SubmitButton from './submit-button'\nimport ValidationErrors from '@/components/inputs/validation-errors'\n\nconst FLEXIBLE_WIDGET_MIN_WIDTH = 300\nconst MOBILE_WINDOW_BUTTON_WIDTH_DIFFERENCE = 56\n\nexport default {\n  components: { SubmitButton, ValidationErrors },\n\n  props: {\n    // This prop needs to be named `buttonClass` rather than `class` because ESLint will\n    // throw a vue/no-parsing-error error if a prop is named `class`.\n    buttonClass: {\n      type: String,\n      required: false\n    },\n    formValid: {\n      type: Boolean,\n      required: false,\n      default: true\n    },\n    label: {\n      type: String,\n      required: true\n    },\n    submitInProgress: {\n      type: Boolean,\n      required: false,\n      default: false\n    },\n    submittingLabel: {\n      type: String,\n      required: false\n    },\n    turnstileAction: {\n      type: String,\n      required: false\n    },\n    validationErrors: {\n      type: Object,\n      required: false,\n      default: () => ({})\n    }\n  },\n\n  emits: ['submit-with-token'],\n\n  data() {\n    return {\n      challengeToken: null,\n      elementWidth: null,\n      widgetId: null\n    }\n  },\n\n  computed: {\n    challengePassed() {\n      return !!this.challengeToken\n    },\n\n    showValidationError() {\n      return !!this.validationErrors.turnstileVerifyResult\n    },\n\n    validationErrorMessage() {\n      return this.i18n.t('public.bot_protection.rejected', {org_name: this.agraConfiguration.organisationName})\n    },\n\n    widgetSize() {\n      // What size of Turnstile widget should we use?\n      // See https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#widget-size\n      if (this.elementWidth >= FLEXIBLE_WIDGET_MIN_WIDTH) {\n        // The \"flexible\" size has a minimum width of 300px and stretches to 100% of the containing element\n        return 'flexible'\n      } else {\n        // The \"compact\" size is 150px wide\n        return 'compact'\n      }\n    }\n  },\n\n  watch: {\n    submitInProgress() {\n      if (!this.submitInProgress) {\n        // The submit has finished, and we're still here.\n        // This presumably means that the submit _failed_, and we may need to re-submit.\n        // Reset the challenge so we're ready.\n        this.challengeToken = null\n        /* eslint-disable-next-line no-undef  */\n        turnstile.reset(this.widgetId)\n      }\n    }\n  },\n\n  created() {\n    // Lazy-load the turnstile initialization script.\n    const { waitForTurnstileLoaded } = require('@/turnstile')\n    this.waitForTurnstileLoaded = waitForTurnstileLoaded\n  },\n\n  mounted() {\n    nextTick(() => {\n      this.elementWidth = this.$el.offsetWidth\n      if (this.elementWidth === 0) {\n        // On mobile, the form is hidden at first, which can cause offsetWidth to return 0.\n        // In that case, infer the form width from the window size.\n        this.elementWidth = window.innerWidth - MOBILE_WINDOW_BUTTON_WIDTH_DIFFERENCE\n      }\n    })\n\n    this.waitForTurnstileLoaded(200).then(() => {\n      this.renderTurnstile()\n    })\n  },\n\n  beforeUnmount() {\n    /* eslint-disable-next-line no-undef  */\n    turnstile.remove(this.widgetId)\n  },\n\n  methods: {\n    handleChallengeSuccess(token) {\n      this.challengeToken = token\n    },\n\n    handleExpiredChallenge() {\n      // Since the challenge has expired, any token we had is no longer valid.\n      this.challengeToken = null\n\n      // Reset the widget so we can solve a new challenge and get a new token.\n      /* eslint-disable-next-line no-undef  */\n      turnstile.reset(this.widgetId)\n    },\n\n    renderTurnstile() {\n      /* eslint-disable-next-line no-undef  */\n      this.widgetId = turnstile.render(this.$refs.turnstileContainer, {\n        sitekey: this.agraConfiguration.botProtection.siteKey,\n        action: this.turnstileAction,\n        callback: this.handleChallengeSuccess,\n        'expired-callback': this.handleExpiredChallenge,\n        appearance: 'interaction-only',\n        size: this.widgetSize\n      })\n    },\n\n    submit() {\n      this.$emit('submit-with-token', {turnstileToken: this.challengeToken})\n    }\n  }\n}\n</script>\n","import { render } from \"./turnstile-submit-button.vue?vue&type=template&id=75774162\"\nimport script from \"./turnstile-submit-button.vue?vue&type=script&lang=js\"\nexport * from \"./turnstile-submit-button.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","<template>\n  <component :is=\"buttonComponent\" v-bind=\"extraButtonProps\" :label=\"label\" :submitting-label=\"submittingLabel\"\n             :form-valid=\"formValid\" :submit-in-progress=\"submitInProgress\" v-on=\"buttonListener\" @error=\"errorGettingToken\" />\n  <toast v-if=\"showError\" kind=\"error\">\n    <template #message-content>\n      <p>\n        {{ i18n.t('public.bot_protection.error_getting_token') }}\n      </p>\n    </template>\n  </toast>\n</template>\n\n<script>\nimport FriendlyCaptchaSubmitButton from '@/components/buttons/friendly-captcha-submit-button'\nimport HcaptchaSubmitButton from '@/components/buttons/hcaptcha-submit-button'\nimport RecaptchaSubmitButton from '@/components/buttons/recaptcha-submit-button'\nimport SubmitButton from '@/components/buttons/submit-button'\nimport Toast from '@/components/toast'\nimport TurnstileSubmitButton from '@/components/buttons/turnstile-submit-button.vue'\n\nexport default {\n  components: { FriendlyCaptchaSubmitButton, HcaptchaSubmitButton, RecaptchaSubmitButton, SubmitButton, Toast, TurnstileSubmitButton },\n\n  props: {\n    buttonClass: {\n      type: String,\n      required: false,\n      default: ''\n    },\n    calculateSolutionOnMount: {\n      type: Boolean,\n      required: false,\n      default: false\n    },\n    formValid: {\n      type: Boolean,\n      required: false,\n      default: true\n    },\n    label: {\n      type: String,\n      required: true\n    },\n    captchaAction: {\n      type: String,\n      required: true\n    },\n    invisibleCaptcha: {\n      type: Boolean,\n      required: false,\n      default: false\n    },\n    submitInProgress: {\n      type: Boolean,\n      required: false,\n      default: false\n    },\n    submittingLabel: {\n      type: String,\n      required: false\n    },\n    validationErrors: {\n      type: Object,\n      required: false,\n      default: () => ({})\n    }\n  },\n\n  emits: ['submit'],\n\n  data() {\n    return {\n      showError: false\n    }\n  },\n\n  computed: {\n    buttonComponent() {\n      switch (this.agraConfiguration.botProtection.kind) {\n      case 'friendly-captcha':\n        return FriendlyCaptchaSubmitButton\n      case 'hcaptcha':\n        return HcaptchaSubmitButton\n      case 'recaptcha':\n        return RecaptchaSubmitButton\n      case 'turnstile':\n        return TurnstileSubmitButton\n      default:\n        return SubmitButton\n      }\n    },\n\n    buttonListener() {\n      // If we are rendering a regular submit button, we need to listen for a \"click\" event.\n      // But if we are rendering any of the bot protection buttons, we need to _ignore_ the \"click\" event\n      // because we only want to know about the \"submit-with-token\" event that happens once the challenge\n      // has been evaluated.\n      switch (this.agraConfiguration.botProtection.kind) {\n      case 'friendly-captcha':\n      case 'hcaptcha':\n      case 'recaptcha':\n      case 'turnstile':\n        return {\n          'submit-with-token': this.submitWithToken\n        }\n      default:\n        return {\n          click: this.submit\n        }\n      }\n    },\n\n    extraButtonProps() {\n      const buttonProps = {}\n\n      if (this.agraConfiguration.botProtection.kind === 'none') {\n        buttonProps.class = this.buttonClass\n      } else {\n        buttonProps.buttonClass = this.buttonClass\n        buttonProps.validationErrors = this.validationErrors\n      }\n\n      switch (this.agraConfiguration.botProtection.kind) {\n      case 'friendly-captcha':\n        buttonProps.invisibleCaptcha = this.invisibleCaptcha\n        buttonProps.calculateSolutionOnMount = this.calculateSolutionOnMount\n        break\n      case 'recaptcha':\n        buttonProps.recaptchaAction = this.captchaAction\n        break\n      case 'turnstile':\n        buttonProps.turnstileAction = this.captchaAction\n        break\n      }\n\n      return buttonProps\n    }\n  },\n\n  methods: {\n    errorGettingToken(error) {\n      this.showError = true\n      console.log('Error getting token:', error)\n    },\n\n    submit() {\n      this.$emit('submit', {})\n    },\n\n    submitWithToken(challengeResponse) {\n      this.$emit('submit', challengeResponse)\n    }\n  }\n}\n</script>\n","import { render } from \"./bot-protected-submit-button.vue?vue&type=template&id=d6a93706\"\nimport script from \"./bot-protected-submit-button.vue?vue&type=script&lang=js\"\nexport * from \"./bot-protected-submit-button.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import Rails from '@rails/ujs'\n\nimport 'form-request-submit-polyfill'\nimport { domReady } from 'utils/dom-ready'\n\nlet initialized = false\nlet submittingForm = false\n\n// global from Google reCAPTCHA script include.\n/* eslint-disable no-undef */\n\nexport async function waitForRecaptchaLoaded(delay) {\n  return new Promise((resolve, reject) => {\n    if (typeof grecaptcha !== 'undefined' && grecaptcha !== null) {\n      resolve(grecaptcha)\n    } else {\n      // delay up to 10 seconds, checking with an increasing backoff.\n      if (delay < 10000) {\n        console.log('delaying ' + delay)\n\n        setTimeout(async function() {\n          resolve(await waitForRecaptchaLoaded(delay * 2))\n        }, delay)\n\n      } else {\n        reject('Google recaptcha service did not load')\n      }\n    }\n  })\n}\n\n// export for jest test\nexport async function waitForRecaptchaToken(recaptchaLoader, tokenField, targetForm) {\n  await waitForRecaptchaLoaded(200)\n  return new Promise((resolve) => {\n    grecaptcha.ready(() => {\n      grecaptcha.execute(window.Agra.Configuration.botProtection.siteKey, {\n        action: targetForm.dataset['captchaAction']\n      }).then((token) => {\n        tokenField.value = token\n        resolve(token)\n      })\n    })\n  })\n}\n\n// This method is used to enable reCAPTCHA on rails-ujs forms (not forms rendered by Vue).\nfunction setupRecaptcha() {\n  if (initialized) {\n    errorLogger.error('Re-initializing reCAPTCHA')\n  }\n\n  const recaptchaForms = Array.from(document.getElementsByClassName('bot-protected-form'))\n  const recaptchaLoader = document.getElementById('recaptcha-loader')\n\n  if (recaptchaForms !== null && recaptchaLoader !== null) {\n    // A page may contain several forms protected by reCAPTCHA. Need to hook to\n    // all of them to set the token on submit\n    recaptchaForms.forEach( (recaptchaForm) => {\n      recaptchaForm.addEventListener('ajax:complete', () => {\n        submittingForm = false\n      })\n\n      // We handle the event `submit` here, not `ajax:before`,\n      // because Rails full-page forms do not emit the event `ajax:before`.\n      recaptchaForm.addEventListener('submit', (event) => {\n        return recaptchaSubmit(event, recaptchaLoader)\n      })\n    })\n  }\n}\n\nfunction recaptchaSubmit(event, recaptchaLoader) {\n  console.log('performing submit')\n\n  const targetForm = event.target\n  // There may be more than one recaptcha token field in the page, so we ensure we retrieve\n  // the correct one scoping the search to the currently submitted form.\n  const tokenField = targetForm.querySelector('#recaptcha_token')\n\n  // If the token has already been filled in, great! Submit the form\n  if (tokenField.value.length > 0) {\n    return true // continue with the form submit\n  }\n\n  // Don't go through with this submit, will be re-submitted after recaptcha\n  // token is set and the .requestSubmit() call below is executed.\n  event.preventDefault()\n  event.stopPropagation()\n\n  Rails.disableElement(targetForm)\n\n  waitForRecaptchaToken(recaptchaLoader, tokenField, targetForm).then(function() {\n    if (submittingForm) {\n      errorLogger.error('Submitting form while last request hasn\\'t finished yet')\n    }\n    submittingForm = true\n\n    targetForm.requestSubmit() // Retry the submit now that we have a token\n  })\n  return false\n}\n\nfunction initialize() {\n  document.addEventListener('form:loaded', () => {\n    initialized = false\n    setupRecaptcha()\n    initialized = true\n  })\n\n  setupRecaptcha()\n  initialized = true\n}\n\ndocument.addEventListener('turbolinks:load', initialize)\ndomReady(initialize)\n","<template>\n  <div ref=\"container\" :class=\"['frc-captcha', 'mb-4', {'d-none': invisibleCaptcha}]\" />\n\n  <validation-errors v-if=\"showValidationError\" :errors=\"[validationErrorMessage]\" class=\"mb-1\" />\n  <submit-button :form-valid=\"formValid\" :label=\"label\" :submitting-label=\"submittingLabel\"\n                 :submit-in-progress=\"disabledSubmit\" :class=\"buttonClass\"\n                 @click=\"handleButtonClick\" />\n</template>\n\n<script>\nimport SubmitButton from '@/components/buttons/submit-button'\nimport ValidationErrors from '@/components/inputs/validation-errors'\nimport { WidgetInstance } from 'friendly-challenge'\n\nexport default {\n  components: { SubmitButton, ValidationErrors },\n\n  props: {\n    // This prop needs to be named `buttonClass` rather than `class` because ESLint will\n    // throw a vue/no-parsing-error error if a prop is named `class`.\n    buttonClass: {\n      type: String,\n      required: false,\n      default: ''\n    },\n    calculateSolutionOnMount: {\n      type: Boolean,\n      required: false,\n      default: false\n    },\n    formValid: {\n      type: Boolean,\n      required: false,\n      default: true\n    },\n    invisibleCaptcha: {\n      type: Boolean,\n      required: false,\n      default: false\n    },\n    label: {\n      type: String,\n      required: true\n    },\n    submitInProgress: {\n      type: Boolean,\n      required: false,\n      default: false\n    },\n    submittingLabel: {\n      type: String,\n      required: false\n    },\n    validationErrors: {\n      type: Object,\n      required: false,\n      default: () => ({})\n    }\n  },\n\n  emits: ['error', 'submit-with-token'],\n\n  data() {\n    return {\n      buttonClicked: false,\n      captchaSolution: null,\n      executingCaptcha: false\n    }\n  },\n\n  computed: {\n    disabledSubmit() {\n      return this.submitInProgress || this.executingCaptcha\n    },\n\n    puzzleEndpointUrl() {\n      return `https://${this.agraConfiguration.botProtection.hostname}/api/v1/puzzle`\n    },\n\n    showValidationError() {\n      return !!this.validationErrors.friendlyCaptchaVerifyResult\n    },\n\n    validationErrorMessage() {\n      return this.i18n.t('public.bot_protection.rejected', {org_name: this.agraConfiguration.organisationName})\n    }\n  },\n\n  watch: {\n    submitInProgress() {\n      if (!this.submitInProgress) {\n        // The submit has finished, and we're still here.\n        // This presumably means that the submit _failed_, and we may need to re-submit.\n        // Reset the widget so we're ready.\n        this.widget.reset()\n      }\n    }\n  },\n\n  mounted() {\n    const options = {\n      startedCallback: this.captchaStartedCallback,\n      doneCallback: this.captchaDoneCallback,\n      errorCallback: this.captchaErrorCallback,\n      language: this.i18n.locale(),\n      puzzleEndpoint: this.puzzleEndpointUrl,\n      sitekey: this.agraConfiguration.botProtection.siteKey,\n      startMode: this.calculateSolutionOnMount ? 'auto' : 'focus'\n    }\n\n    this.widget = new WidgetInstance(this.$refs.container, options)\n  },\n\n  unmounted() {\n    this.widget.destroy()\n  },\n\n  methods: {\n    captchaDoneCallback(solution) {\n      this.captchaSolution = solution\n      this.executingCaptcha = false\n\n      if (this.buttonClicked) {\n        this.submitAndReset()\n      }\n    },\n\n    captchaErrorCallback(outerError) {\n      this.executingCaptcha = false\n\n      const {code, description, error: exception} = outerError\n      const errorInfo = { code, description, cause: exception.rawError.toString() }\n\n      this.$emit('error', JSON.stringify(errorInfo))\n    },\n\n    captchaStartedCallback() {\n      this.executingCaptcha = true\n    },\n\n    handleButtonClick() {\n      this.buttonClicked = true\n\n      if (this.captchaSolution) {\n        this.submitAndReset()\n      } else if (!this.executingCaptcha) {\n        // Oops, somehow we did not start the captcha puzzle by the time the button was clicked.\n        // Do it now.\n        this.widget.reset()\n      }\n    },\n\n    submitAndReset() {\n      this.$emit('submit-with-token', {friendlyCaptchaSolution: this.captchaSolution})\n\n      this.buttonClicked = false\n      this.captchaSolution = null\n    }\n  }\n}\n</script>\n","import { render } from \"./friendly-captcha-submit-button.vue?vue&type=template&id=b15104f2\"\nimport script from \"./friendly-captcha-submit-button.vue?vue&type=script&lang=js\"\nexport * from \"./friendly-captcha-submit-button.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"names":["async","waitForTurnstileLoaded","delay","Promise","resolve","reject","turnstile","console","log","setTimeout","components","SubmitButton","ValidationErrors","VueHcaptcha","props","buttonClass","type","String","required","default","formValid","Boolean","label","submitInProgress","submittingLabel","validationErrors","Object","emits","data","hcaptchaResponse","computed","hcaptchaSiteKey","this","agraConfiguration","botProtection","siteKey","showValidationError","hcaptchaVerifyResult","validationErrorMessage","i18n","t","org_name","organisationName","methods","executeHcaptcha","$refs","hcaptcha","execute","setHcaptchaResponseAndSubmit","token","$emit","_createElementBlock","_createVNode","_component_vue_hcaptcha","ref","sitekey","$options","size","onVerify","_createTextVNode","_createBlock","_component_validation_errors","key","errors","class","_createCommentVNode","_component_submit_button","$props","_normalizeClass","onClick","recaptchaAction","recaptchaLoaded","recaptchaScore","recaptchaVerifyResult","validationErrorMessages","created","waitForRecaptchaLoaded","require","mounted","waitForToken","action","grecaptcha","ready","then","submit","recaptchaToken","$data","turnstileAction","challengeToken","elementWidth","widgetId","challengePassed","turnstileVerifyResult","widgetSize","watch","reset","nextTick","$el","offsetWidth","window","innerWidth","renderTurnstile","beforeUnmount","remove","handleChallengeSuccess","handleExpiredChallenge","render","turnstileContainer","callback","appearance","turnstileToken","_createElementVNode","_hoisted_1","FriendlyCaptchaSubmitButton","HcaptchaSubmitButton","RecaptchaSubmitButton","Toast","TurnstileSubmitButton","calculateSolutionOnMount","captchaAction","invisibleCaptcha","showError","buttonComponent","kind","buttonListener","submitWithToken","click","extraButtonProps","buttonProps","errorGettingToken","error","challengeResponse","_Fragment","_resolveDynamicComponent","_mergeProps","_toHandlers","onError","_component_toast","_withCtx","_toDisplayString","_ctx","_","initialized","submittingForm","waitForRecaptchaToken","recaptchaLoader","tokenField","targetForm","Agra","Configuration","dataset","value","setupRecaptcha","errorLogger","recaptchaForms","Array","from","document","getElementsByClassName","getElementById","forEach","recaptchaForm","addEventListener","event","target","querySelector","length","preventDefault","stopPropagation","Rails","disableElement","requestSubmit","recaptchaSubmit","initialize","domReady","buttonClicked","captchaSolution","executingCaptcha","disabledSubmit","puzzleEndpointUrl","hostname","friendlyCaptchaVerifyResult","widget","options","startedCallback","captchaStartedCallback","doneCallback","captchaDoneCallback","errorCallback","captchaErrorCallback","language","locale","puzzleEndpoint","startMode","WidgetInstance","container","unmounted","destroy","solution","submitAndReset","outerError","code","description","exception","errorInfo","cause","rawError","toString","JSON","stringify","handleButtonClick","friendlyCaptchaSolution"],"sourceRoot":""}