https://www.reversemortgage.coach/_astro/AskJayForm.astro_astro_type_script_index_0_lang.DG6GqhMH.js
1import{f as g}from"./marked.esm.CqY386hz.js";g.setOptions({gfm:!0,breaks:!0});function C(s){const t=s.querySelector("form.ask-jay-form"),u=s.querySelector('[data-role="success"]'),d=s.querySelector('[data-role="fallback"]'),h=s.querySelector('[data-role="answer"]'),w=s.querySelector('[data-role="fallback-message"]'),l=s.querySelector('[data-role="loading"]'),n=s.querySelector('[data-role="client-error"]'),c=s.querySelector('[data-role="submit"]'),I=s.querySelector('[data-role="ask-another"]');if(!t||!u||!d||!h||!w||!l||!n||!c)return;const p=t.elements.namedItem("website"),m=t.elements.namedItem("formLoadedAt"),E=3e3;function q(){m&&(m.value=String(Date.now()))}q();function o(a){a?.classList.remove("hidden")}function e(a){a?.classList.add("hidden")}function r(a){a?(o(l),c.disabled=!0,c.classList.add("opacity-60","cursor-not-allowed")):(e(l),c.disabled=!1,c.classList.remove("opacity-60","cursor-not-allowed"))}function A(){e(u),e(d),e(n),e(l),o(t),t.reset(),h.innerHTML="",q(),r(!1),t.elements.namedItem("name")?.focus()}function S(a){e(t),e(u),e(l),e(n),w.textContent=`Jay has received your question and will respond to ${a} within one business day.`,o(d),r(!1)}function N(a){e(t),e(d),e(l),e(n);const f=g.parse(a,{async:!1});h.innerHTML=f,o(u),r(!1)}I?.addEventListener("click",A),t.addEventListener("submit",async a=>{a.preventDefault(),e(n);const f=t.elements.namedItem("name").value.trim(),y=t.elements.namedItem("email").value.trim(),M=t.elements.namedItem("phone").value.trim(),k=t.elements.namedItem("question").value.trim(),T=p?.value.trim()||"",v=m?.value??"",L=v===""?NaN:Number(v),j=Date.now()-L;if(T||!Number.isFinite(L)||j<E){S(y||"your email");return}if(!f||!y||!k){n.textContent="Please fill in your name, email, and question.",o(n);return}r(!0);try{const b=await fetch("/api/ask-jay",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:f,email:y,phone:M,question:k,pageUrl:window.location.href,website:p?.value||"",formLoadedAt:Number(m?.value||0)})}),i=await b.json().catch(()=>({}));if(b.ok&&i.success&&i.answer){N(i.answer);return}if(b.ok&&i.success===!1){S(y);return}n.textContent=i.error||"Unable to submit your question right now. Please call 760-271-8646.",o(n),r(!1)}catch{n.textContent="Unable to submit your question right now. Please call 760-271-8646.",o(n),r(!1)}})}document.querySelectorAll(".ask-jay-form-root").forEach(C);
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.