PageSourceSearch

https://www.environment.sa.gov.au/dist/freeform-DvyEkVF7.js

js environment.sa.gov.au collected 2026-10-02 02:54:47 UTC 1,608 bytes, 1 lines download raw bytes

1async function m(r){const s=await fetch("/feeds/form-csrf?form=".concat(r),{method:"GET"}),e=await s.json();if(s.ok)return e;throw new Error(e)}async function d(r){const s=r.dataset.handle;try{const{csrf:e}=await m(s),o=r.querySelector("input[name=".concat(e.name,"]")).value,n=e.value;r.querySelector("input[name=".concat(e.name,"]")).value=n,o!==n&&r.querySelector("input[name=".concat(e.name,"]")).value}catch(e){console.error(e)}}function f(r,s,e){r.preventDefault();const{options:o}=r.freeform,{form:n}=r,c=o[s],t=document.createElement("div");t.classList.add(...c.split(" ")),t.innerHTML='<div class="px-4 py-3 relative text-base" role="alert"><strong class="font-bold">'.concat(o[e],"</strong></div>"),n.append(t)}function a(r){const{form:s}=r,e=s.querySelectorAll(".freeform--form-errors, .freeform--form-success");for(const o of e)o.remove()}async function i(){const r=[...document.querySelectorAll("[data-freeform]")];if(r)for(const s of r)s.addEventListener("freeform-ready",e=>{e.options.errorClassBanner="freeform--form-errors bg-red-100 mt-2 border border-red-400 rounded text-red-700",e.options.successClassBanner="freeform--form-success bg-green-100 mt-2 bg-opacity-30 border border-green-900 rounded text-green-900"}),s.addEventListener("freeform-render-success",e=>{f(e,"successClassBanner","successBannerMessage"),setTimeout(()=>{a(e)},5e3)}),s.addEventListener("freeform-render-form-errors",e=>{f(e,"errorClassBanner","errorBannerMessage")}),s.addEventListener("freeform-remove-messages",e=>{a(e)}),s.addEventListener("freeform-on-submit",e=>{a(e)}),await d(s)}export{i as initFreeform};

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.