(()=>{functione(e,n){varr="undefined"!=typeofSymbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,n){if(!e)return;if("string"==typeofe)returnt(e,n);varr=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)returnArray.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))returnt(e,n)}(e))||n&&e&&"number"==typeofe.length){r&&(e=r);varo=0,c=function(){};return{s:c,n:function(){returno>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throwe},f:c}}thrownewTypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}vari,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){vare=r.next();returna=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throwi}}}}functiont(e,t){(null==t||t>e.length)&&(t=e.length);for(varn=0,r=newArray(t);n<t;n++)r[n]=e[n];returnr}functionn(e,t){for(varn=0;n<t.length;n++){varr=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"inr&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(new(function(){functiont(){!function(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}(this,t),this.parentElement=document.querySelector(".form-check-parent"),this.parentForm=document.getElementById("bulkActions")}varr,o,c;returnr=t,o=[{key:"watchCheckboxes",value:function(e){vart=this;document.querySelectorAll(".child-hidden-input").forEach((function(e){returne.remove()})),document.querySelectorAll(".form-check-child").forEach((function(n){e.checked?(n.checked=e.checked,t.processChildItem(n,document.getElementById("bulkActions"))):(n.checked=!1,document.querySelectorAll(".child-hidden-input").forEach((function(e){returne.remove()})))}))}},{key:"processChildItem",value:function(t,n){varr=arguments.length>2&&void0!==arguments[2]?arguments[2]:{};if(r.hasOwnProperty("single")&&document.querySelectorAll(".child-hidden-input").forEach((function(e){returne.remove()})),!1!==t.checked){varo=document.createElement("INPUT");o.setAttribute("name","quotes[]"),o.setAttribute("value",t.dataset.value),o.setAttribute("class","child-hidden-input"),o.hidden=!0,n.append(o)}else{varc,i=document.querySelectorAll("input.child-hidden-input"),a=e(i);try{for(a.s();!(c=a.n()).done;){varu=c.value;u.value==t.dataset.value&&u.remove()}}catch(e){a.e(e)}finally{a.f()}}}},{key:"handle",value:function(){vart=this;this.parentElement.addEventListener("click",(function(){t.watchCheckboxes(t.parentElement)}));varn,r=e(document.querySelectorAll(".form-check-child"));try{varo=function(){vare=n.value;e.addEventListener("click",(function(){t.processChildItem(e,t.parentForm)}))};for(r.s();!(n=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}}}],o&&n(r.prototype,o),c&&n(r,c),t}())).handle()})();