and a 'Skip to main content' link was not added")}insertSkipLinkSpan(){document.body.insertAdjacentHTML("afterbegin",'Skip to main content')}}class re{constructor(){this.imgSrcDefer=document.querySelectorAll("img[data-src]"),this.videoBackground=document.querySelectorAll("video"),this.videoBackgroundSource=document.querySelectorAll("video source");for(let e=0;e{e.addEventListener("click",(t=>{const n=e.className.split(" ").filter((e=>e.startsWith(this.linkClass)));p.debug&&console.log(n),n.length&&(t.preventDefault(),p.setFieldValue("transaction.recurrfreq",n[0].substring(this.linkClass.length).toUpperCase()),this._frequency.load())}))}));const e=p.getFieldValue("transaction.recurrfreq").toUpperCase();document.getElementsByName(this.checkboxName).forEach((t=>{const n=t.value.toUpperCase();t.checked=n===e,t.addEventListener("change",(()=>{const e=t.value.toUpperCase();t.checked?(p.setFieldValue("transaction.recurrfreq",e),p.setFieldValue("transaction.recurrpay","Y"),this._frequency.load(),this._amount.setAmount(this._amount.amount,!1)):"ONETIME"!==e&&(p.setFieldValue("transaction.recurrfreq","ONETIME"),p.setFieldValue("transaction.recurrpay","N"),this._frequency.load(),this._amount.setAmount(this._amount.amount,!1))}))})),this._frequency.onFrequencyChange.subscribe((()=>{const e=this._frequency.frequency.toUpperCase();document.getElementsByName(this.checkboxName).forEach((t=>{const n=t.value.toUpperCase();t.checked&&n!==e?t.checked=!1:t.checked||n!==e||(t.checked=!0)}))}))}}class le{constructor(){if(this.pageBackground=document.querySelector(".page-backgroundImage"),this.pageBackground){const e=this.pageBackground.querySelector("img");let t=null==e?void 0:e.getAttribute("data-src"),n=null==e?void 0:e.src;this.pageBackground&&t?(p.debug&&console.log("A background image set in the page was found with a data-src value, setting it as --engrid__page-backgroundImage_url",t),t="url('"+t+"')",this.pageBackground.style.setProperty("--engrid__page-backgroundImage_url",t)):this.pageBackground&&n?(p.debug&&console.log("A background image set in the page was found with a src value, setting it as --engrid__page-backgroundImage_url",n),n="url('"+n+"')",this.pageBackground.style.setProperty("--engrid__page-backgroundImage_url",n)):e?p.debug&&console.log("A background image set in the page was found but without a data-src or src value, no action taken",e):p.debug&&console.log("A background image set in the page was not found, any default image set in the theme on --engrid__page-backgroundImage_url will be used")}else p.debug&&console.log("A background image set in the page was not found, any default image set in the theme on --engrid__page-backgroundImage_url will be used");this.setDataAttributes()}setDataAttributes(){return this.hasVideoBackground()?p.setBodyData("page-background","video"):this.hasImageBackground()?p.setBodyData("page-background","image"):p.setBodyData("page-background","empty")}hasVideoBackground(){if(this.pageBackground)return!!this.pageBackground.querySelector("video")}hasImageBackground(){if(this.pageBackground)return!this.hasVideoBackground()&&!!this.pageBackground.querySelector("img")}}class ce{constructor(e,t=null,n=null,i){this.apiKey=e,this.dateField=t,this.statusField=n,this.dateFormat=i,this.form=u.getInstance(),this.emailField=null,this.emailWrapper=document.querySelector(".en__field--emailAddress"),this.nbDate=null,this.nbStatus=null,this.logger=new fe("NeverBounce","#039bc4","#dfdfdf","π§"),this.shouldRun=!0,this.nbLoaded=!1,this.emailField=document.getElementById("en__field_supporter_emailAddress"),window._NBSettings={apiKey:this.apiKey,autoFieldHookup:!1,inputLatency:1500,displayPoweredBy:!1,loadingMessage:"Validating...",softRejectMessage:"Invalid email",acceptedMessage:"Email validated!",feedback:!1},p.loadJS("https://cdn.neverbounce.com/widget/dist/NeverBounce.js"),this.emailField&&(this.emailField.value&&(this.logger.log("E-mail Field Found"),this.shouldRun=!1),this.emailField.addEventListener("change",(e=>{var t;this.nbLoaded||(this.shouldRun=!0,this.init(),(null===(t=this.emailField)||void 0===t?void 0:t.value)&&setTimeout((function(){window._nb.fields.get(document.querySelector("[data-nb-id]"))[0].forceUpdate()}),100))})),window.setTimeout((()=>{this.emailField&&this.emailField.value&&(this.logger.log("E-mail Filled Programatically"),this.shouldRun=!1),this.init()}),1e3)),this.form.onValidate.subscribe(this.validate.bind(this))}init(){if(!this.shouldRun)return void this.logger.log("Should Not Run");if(this.nbLoaded)return void this.logger.log("Already Loaded");if(this.logger.log("Init Function"),this.dateField&&document.getElementsByName(this.dateField).length&&(this.nbDate=document.querySelector("[name='"+this.dateField+"']")),this.statusField&&document.getElementsByName(this.statusField).length&&(this.nbStatus=document.querySelector("[name='"+this.statusField+"']")),!this.emailField)return void this.logger.log("E-mail Field Not Found");this.wrap(this.emailField,document.createElement("div"));this.emailField.parentNode.id="nb-wrapper";const e=document.createElement("div");e.innerHTML='
Enter a valid email.
',this.insertAfter(e,this.emailField);const t=this;document.body.addEventListener("nb:registered",(function(e){const n=document.querySelector('[data-nb-id="'+e.detail.id+'"]');n.addEventListener("nb:loading",(function(e){p.disableSubmit("Validating Your Email")})),n.addEventListener("nb:clear",(function(e){t.setEmailStatus("clear"),p.enableSubmit(),t.nbDate&&(t.nbDate.value=""),t.nbStatus&&(t.nbStatus.value="")})),n.addEventListener("nb:soft-result",(function(e){t.setEmailStatus("soft-result"),t.nbDate&&(t.nbDate.value=""),t.nbStatus&&(t.nbStatus.value=""),p.enableSubmit()})),n.addEventListener("nb:result",(function(e){e.detail.result.is(window._nb.settings.getAcceptedStatusCodes())?(t.setEmailStatus("valid"),t.nbDate&&(t.nbDate.value=p.formatDate(new Date,t.dateFormat)),t.nbStatus&&(t.nbStatus.value=e.detail.result.response.result)):(t.setEmailStatus("invalid"),t.nbDate&&(t.nbDate.value=""),t.nbStatus&&(t.nbStatus.value="")),p.enableSubmit()}))})),window._nb.fields.registerListener(t.emailField,!0),this.nbLoaded=!0}clearStatus(){if(!this.emailField)return void this.logger.log("E-mail Field Not Found");this.emailField.classList.remove("rm-error");const e=document.getElementById("nb-wrapper"),t=document.getElementById("nb-feedback");e.className="",t.className="en__field__error nb-hidden",t.innerHTML="",this.emailWrapper.classList.remove("en__field--validationFailed")}deleteENFieldError(){const e=document.querySelector(".en__field--emailAddress>div.en__field__error");e&&e.remove()}setEmailStatus(e){if(this.logger.log("Status:",e),!this.emailField)return void this.logger.log("E-mail Field Not Found");const t=document.getElementById("nb-wrapper");let n=document.getElementById("nb-feedback");const i="nb-hidden",s="nb-loading",o="rm-error";if(!n){const e=t.querySelector("div");e&&(e.innerHTML='
Enter a valid email.
'),n=document.getElementById("nb-feedback")}if("valid"==e)this.clearStatus();else switch(t.classList.remove("nb-success"),t.classList.add("nb-error"),e){case"required":this.deleteENFieldError(),n.innerHTML="A valid email is required",n.classList.remove(s),n.classList.remove(i),this.emailField.classList.add(o);break;case"soft-result":this.emailField.value?(this.deleteENFieldError(),n.innerHTML="Invalid email",n.classList.remove(i),this.emailField.classList.add(o)):this.clearStatus();break;case"invalid":this.deleteENFieldError(),n.innerHTML="Invalid email",n.classList.remove(s),n.classList.remove(i),this.emailField.classList.add(o);break;default:this.clearStatus()}}insertAfter(e,t){var n;null===(n=null==t?void 0:t.parentNode)||void 0===n||n.insertBefore(e,t.nextSibling)}wrap(e,t){var n;null===(n=e.parentNode)||void 0===n||n.insertBefore(t,e),t.appendChild(e)}validate(){var e;if(!this.form.validate)return;const t=p.getFieldValue("nb-result");this.emailField&&this.shouldRun&&this.nbLoaded&&t?(this.nbStatus&&(this.nbStatus.value=t),["catchall","unknown","valid"].includes(t)||(this.setEmailStatus("required"),null===(e=this.emailField)||void 0===e||e.focus(),this.logger.log("NB-Result:",p.getFieldValue("nb-result")),this.form.validate=!1)):this.logger.log("validate(): Should Not Run. Returning true.")}}class de{constructor(){this.form=u.getInstance(),this.emailField=null,this.emailWrapper=document.querySelector(".en__field--emailAddress"),this.faDate=null,this.faStatus=null,this.faMessage=null,this.logger=new fe("FreshAddress","#039bc4","#dfdfdf","π§"),this.shouldRun=!0,this.options=p.getOption("FreshAddress"),!1!==this.options&&window.FreshAddress&&(this.emailField=document.getElementById("en__field_supporter_emailAddress"),this.emailField?(this.createFields(),this.addEventListeners(),window.FreshAddressStatus="idle",this.emailField.value&&(this.logger.log("E-mail Field Found"),this.shouldRun=!1),window.setTimeout((()=>{this.emailField&&this.emailField.value&&(this.logger.log("E-mail Filled Programatically"),this.shouldRun=!1)}),1e3)):this.logger.log("E-mail Field Not Found"))}createFields(){this.options&&(this.options.dateField=this.options.dateField||"fa_date",this.faDate=p.getField(this.options.dateField),this.faDate||(this.logger.log("Date Field Not Found. Creating..."),p.createHiddenInput(this.options.dateField,""),this.faDate=p.getField(this.options.dateField)),this.options.statusField=this.options.statusField||"fa_status",this.faStatus=p.getField(this.options.statusField),this.faStatus||(this.logger.log("Status Field Not Found. Creating..."),p.createHiddenInput(this.options.statusField,""),this.faStatus=p.getField(this.options.statusField)),this.options.messageField=this.options.messageField||"fa_message",this.faMessage=p.getField(this.options.messageField),this.faMessage||(this.logger.log("Message Field Not Found. Creating..."),p.createHiddenInput(this.options.messageField,""),this.faMessage=p.getField(this.options.messageField)))}writeToFields(e,t){this.options&&(this.faDate.value=p.formatDate(new Date,this.options.dateFieldFormat||"yyyy-MM-dd"),this.faStatus.value=e,this.faMessage.value=t,this.emailWrapper.dataset.freshaddressSafetosendstatus=e.toLowerCase())}addEventListeners(){var e;this.options&&(null===(e=this.emailField)||void 0===e||e.addEventListener("change",(()=>{var e,t;if(!this.shouldRun||(null===(e=this.emailField)||void 0===e?void 0:e.value.includes("@4sitestudios.com")))return p.removeError(this.emailWrapper),this.writeToFields("Valid","Skipped"),void this.logger.log("Skipping E-mail Validation");this.logger.log("Validating "+(null===(t=this.emailField)||void 0===t?void 0:t.value)),this.callAPI()})),this.form.onValidate.subscribe(this.validate.bind(this)))}callAPI(){var e;if(!this.options||!window.FreshAddress)return;if(!this.shouldRun)return;window.FreshAddressStatus="validating";const t=null===(e=this.emailField)||void 0===e?void 0:e.value;window.FreshAddress.validateEmail(t,{emps:!1,rtc_timeout:1200}).then((e=>(this.logger.log("Validate API Response",JSON.parse(JSON.stringify(e))),this.validateResponse(e))))}validateResponse(e){var t;if(e.isServiceError())return this.logger.log("Service Error"),this.writeToFields("Service Error",e.getErrorResponse()),!0;e.isValid()?(this.writeToFields("Valid",e.getComment()),p.removeError(this.emailWrapper),e.hasSuggest()&&(p.setError(this.emailWrapper,`Did you mean ${e.getSuggEmail()}?`),this.emailField.value=e.getSuggEmail())):e.isError()?(this.writeToFields("Invalid",e.getErrorResponse()),p.setError(this.emailWrapper,e.getErrorResponse()),null===(t=this.emailField)||void 0===t||t.focus(),e.hasSuggest()&&(p.setError(this.emailWrapper,`Did you mean ${e.getSuggEmail()}?`),this.emailField.value=e.getSuggEmail(),this.writeToFields("Error",e.getErrorResponse()))):e.isWarning()?(this.writeToFields("Invalid",e.getErrorResponse()),p.setError(this.emailWrapper,e.getErrorResponse()),e.hasSuggest()&&(p.setError(this.emailWrapper,`Did you mean ${e.getSuggEmail()}?`),this.emailField.value=e.getSuggEmail(),this.writeToFields("Warning",e.getErrorResponse()))):this.writeToFields("API Error","Unknown Error"),window.FreshAddressStatus="idle",p.enableSubmit()}validate(){var e;if(p.removeError(this.emailWrapper),this.form.validate)if(this.options)if(this.shouldRun){if("validating"!==window.FreshAddressStatus)return"Invalid"===this.faStatus.value?(this.form.validate=!1,window.setTimeout((()=>{p.setError(this.emailWrapper,this.faMessage.value)}),100),null===(e=this.emailField)||void 0===e||e.focus(),p.enableSubmit(),!1):(this.form.validate=!0,!0);{this.logger.log("Waiting for API Response");const e=new Promise(((e,t)=>{setTimeout((()=>{var n;const i=this.faStatus.value;if(""===i||"Invalid"===i)return this.logger.log("Promise Rejected"),null===(n=this.emailField)||void 0===n||n.focus(),void t(!1);this.logger.log("Promise Resolved"),e(!0)}),700)}));this.form.validatePromise=e}}else this.form.validate=!0;else this.form.validate=!0}}class ue{constructor(){var e,t;const n=document.querySelector("span[data-engrid-progress-indicator]"),i=p.getPageCount(),s=p.getPageNumber();if(!n||!i||!s)return;let o=null!==(e=n.getAttribute("max"))&&void 0!==e?e:100;"string"==typeof o&&(o=parseInt(o));let r=null!==(t=n.getAttribute("amount"))&&void 0!==t?t:0;"string"==typeof r&&(r=parseInt(r));const a=1===s?0:Math.ceil((s-1)/i*o);let l=1===s?0:Math.ceil(s/i*o);const c=a/100;let d=l/100;if(r&&(l=Math.ceil(r)>Math.ceil(o)?o:r,d=l/100),n.innerHTML=`\n\t\t\t