PageSourceSearch

https://www.parcum.be/frontend/indeterminateChecks.component-gVKb00gf.js

js parcum.be collected 2026-10-02 06:41:29 UTC 1,852 bytes, 1 lines download raw bytes

1import{D as o}from"./site-B0IjnxmE.js";class u{constructor(){Array.from(document.querySelectorAll("ul[data-indeterminate]")).forEach((e,t)=>{new a(e,t)}),o.onDynamicContent(document.documentElement,"ul[data-indeterminate]",e=>{e.forEach((t,i)=>{new a(t,i+Date.now())})})}}class a{constructor(e,t){this.mainListIndex=0,this.mainList=e,this.mainListIndex=t,this.init()}init(){this.mainList.hasAttribute("id")||this.mainList.setAttribute("id",`jsIndeterminateList${this.mainListIndex}`),this.initSubLists(),this.initCheckboxes()}initCheckboxes(){Array.from(this.mainList.querySelectorAll("input[type=checkbox]")).forEach(e=>{e.addEventListener("change",this.onCheckboxChange.bind(this)),e.addEventListener("jschange",this.onCheckboxChange.bind(this)),e.checked&&this.checkUp(e)})}initSubLists(){Array.from(this.mainList.querySelectorAll("ul")).forEach((e,t)=>{if(!e.hasAttribute("id")){const i=`jsIndeterminateSubList${this.mainListIndex}-${t}`;e.setAttribute("id",i)}})}onCheckboxChange(e){this.checkUp(e.target),this.checkDown(e.target),e.target.checked&&e.target.closest("li").querySelectorAll("ul").forEach(s=>{s.dispatchEvent(new CustomEvent("open"))})}checkUp(e){const t=e.closest("ul");if(t&&!t.hasAttribute("data-indeterminate")){let i=0,s=0,r=0;Array.from(this.mainList.querySelectorAll(`#${t.getAttribute("id")} > li > *:not(ul) input, #${t.getAttribute("id")} > li > input`)).forEach(c=>{c.checked||c.indeterminate?c.indeterminate?r++:s++:i++});const n=t.closest("li").querySelector("input[type=checkbox]");i===0&&r===0&&s>0?(n.indeterminate=!1,n.checked=!0):s>0||r>0?(n.indeterminate=!0,n.checked=!1):(n.indeterminate=!1,n.checked=!1),this.checkUp(n)}}checkDown(e){const t=e.closest("li").querySelector("ul");t&&Array.from(t.querySelectorAll("input[type=checkbox]")).forEach(i=>{i.indeterminate=!1,i.checked=e.checked})}}export{u as default};

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.