PageSourceSearch

https://www.odense-marcipan.com/DXXm4PT1.js

js odense-marcipan.com collected 2026-09-27 07:37:16 UTC 1,733 bytes, 1 lines download raw bytes

1import{I as r}from"./om.js";class c{constructor(i,a=r.get("loaderService"),e=r.get("newsletterService")){this.loaderService=a,this.newsletterService=e,this.isLoading=!1,this.formEl=document.getElementById("newsletter-form"),this.successEl=document.getElementById("newsletter-success"),this.errorEl=document.getElementById("newsletter-error"),this.recaptchaSiteKey=this.formEl.getAttribute("data-recaptcha-site-key"),this.formEl.noValidate=!0,this.formEl.onsubmit=s=>this.onSubmit(s)}onSubmit(i){if(i.preventDefault(),i.stopPropagation(),!this.formEl.checkValidity()||this.isLoading){this.formEl.classList.add("was-validated");const e=Array.from(document.getElementsByTagName("INPUT")).find(s=>!s.checkValidity());e&&(e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}),e.focus())}else this.loaderService.start(),this.isLoading=!0,this.recaptchaCheckIfAvailable().then(a=>{const e={name:"",email:"",consent:!1,recaptchaToken:a},s=new FormData(this.formEl).entries();Array.from(s).map(t=>({key:t[0],value:t[1]})).forEach(t=>{t.key==="name"&&(e.name=t.value),t.key==="email"&&(e.email=t.value),t.key==="consent"&&(e.consent=!!t.value)}),this.newsletterService.signup(e).then(t=>{this.errorEl.classList.add("d-none"),this.successEl.classList.remove("d-none"),this.formEl.classList.add("d-none"),this.isLoading=!1,this.loaderService.stop()},t=>{this.errorEl.classList.remove("d-none"),this.successEl.classList.add("d-none"),this.isLoading=!1,this.loaderService.stop()})})}recaptchaCheckIfAvailable(){return new Promise((i,a)=>{window.grecaptcha?window.grecaptcha.ready(()=>{let e=this.recaptchaSiteKey;window.grecaptcha.execute(e,{action:"submit"}).then(function(s){i(s)})}):i(null)})}}export{c as NewsletterComponent};

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.