PageSourceSearch

https://www.grur.org/_assets/7dee795f642d8caf6a2308c90fde35d2/Frontend/assets/required-form-CSX3GcY9.js

js grur.org collected 2026-10-02 04:19:07 UTC 1,220 bytes, 1 lines download raw bytes

1import{t as d}from"./accordion-component-BhOBzPuV.js";const g=i=>new Promise((f,v)=>{const m="form.js-init-required-form",u="input,textarea,select",n=i.querySelector(".js-form-submit");document.addEventListener("change",function(e){const o=e.target;o.matches(u)&&o.closest(m)&&o.required&&a(o)},!0);function a(e){return e.classList.remove("flashing-border"),e.offsetHeight,e.validity.valid?(e.classList.remove("f3-form-error"),!0):(e.classList.add("f3-form-error"),!1)}function h(){let e=!0;return i.querySelectorAll("[required]").forEach(r=>{if(!a(r)){e&&r.focus(),r.classList.add("flashing-border");const c=r.closest(".accordion__item");if(c&&!c.classList.contains("is-active")){const s=c.closest(".accordion"),l=Array.from(s.querySelectorAll(".accordion__item")).indexOf(c);s&&l>=0&&d(s,l,!0)}e=!1}}),e}n&&n.addEventListener("click",function(e){if(!h())return e.preventDefault(),e.stopPropagation(),!1});let t=i.closest(".accordion__item");if(t){const e=t.querySelector(".errors");if(e){const o=t.closest(".accordion"),r=Array.from(o.querySelectorAll(".accordion__item")).indexOf(t);o&&r>=0&&(d(o,r,!0),t.classList.add("accordion-error"),e.scrollIntoView({behavior:"smooth",block:"start"}))}}f()});export{g as init};

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.