PageSourceSearch

https://www.rnzcgp.org.nz/static/build/js/gp-pulse-subscribe.fc7c19618f35f6b9dd50.js

js rnzcgp.org.nz collected 2026-09-24 19:18:35 UTC 2,585 bytes, 11 lines download raw bytes

1/*!
2 * @project        RNZCGP
3 * @name           gp-pulse-subscribe.fc7c19618f35f6b9dd50.js
4 * @author         Octave
5 * @date           23:13:03 GMT+0000 (Coordinated Universal Time)
6 * @release        e65716d [production]
7 * @copyright      Copyright (c) 2026 The Royal New Zealand College of General Practitioners
8 *
9 */
10"use strict";(self.webpackChunkrnzcgp_platform_frontend=self.webpackChunkrnzcgp_platform_frontend||[]).push([[775],{9408:function(e,t,n){n.r(t),n.d(t,{default:function(){return s}});var a=n(76);let r=!1;const{recaptchaKey:c=null}=window.RNZCGP_RECAPTCHA_CONF||{recaptchaKey:null},o=e=>(window.setRecaptchaToken(e),e);function i(e){let t="";window.setRecaptchaToken=e=>{t=e},function(){if(r||void 0!==window.grecaptcha)return;r=!0;const e=document.createElement("script");e.src="https://www.google.com/recaptcha/api.js",document.body.appendChild(e),window.returnRecaptchaToken=o;const t=document.createElement("div");t.setAttribute("class","g-recaptcha"),t.setAttribute("data-sitekey",c),t.setAttribute("data-callback","returnRecaptchaToken"),t.setAttribute("data-size","invisible"),document.body.appendChild(t)}();let n=!1;const i=/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/;e.forEach((e=>{e.addEventListener("submit",(e=>{const r=e.currentTarget,c=r.querySelector("button"),o=r.nextElementSibling,s=e=>{n=!1,c.disabled=!1,o||r.insertAdjacentHTML("afterend",`<p data-error-message class="color-red my-2 medium bold">${e}</p>`),r.querySelector("#spinning").remove()};e.preventDefault();const d=e=>{""===t?window.setTimeout((()=>d(e)),1e3):(e=>
10{fetch("/gp-pulse-subscribe/",{body:JSON.stringify({email:e,captcha:t}),headers:{"Content-Type":"application/json","X-CSRFToken":(0,a.Z)()},method:"post"}).then((e=>{const{ok:t}=e,n=document.querySelector("[data-error-message]");t?(r.innerHTML='<p class="color-green-tint-2 my-2 medium bold">Thanks for subscribing!</p>',n&&n.remove()):s("Oops, something went wrong! Please try again.")})).catch((e=>{throw n=!1,e}))})(e)};if(c.disabled=!0,c.insertAdjacentHTML("afterbegin",'<img id="spinning" class="bg-green absolute" height="24" width="24" src="/static/images/loading.svg" alt="loading"/>'),!n){n=!0;const t=e.target,a=new FormData(t).get("email");a.length>0&&i.test(String(a))?(window.grecaptcha.execute(),d(a)):s("Please enter a valid email address.")}}))}))}function s(e){i(e)}},76:function(e,t,n){function a(){var e;return null===(e=document.getElementById("csrf-token"))||void 0===e?void 0:e.getAttribute("content")}n.d(t,{Z:function(){return a}})}}]);
11//# sourceMappingURL=gp-pulse-subscribe.fc7c19618f35f6b9dd50.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.