1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"d4565b8d74a783408ebb345c6f900325acc9d09f"};var i=(new e.Error).stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="d24ab24e-0c17-41e8-89e3-2073e1f62897",e._sentryDebugIdIdentifier="sentry-dbid-d24ab24e-0c17-41e8-89e3-2073e1f62897")}catch(e){}}(),(self.webpackChunkapg=self.webpackChunkapg||[]).push([[6927],{66927:function(e,i,t){t.r(i);var o=t(23029),n=t(92901),l=t(50388),s=t(53954),a=t(15361);function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}var r=function(e){function i(e){var t,n,a,r,d,h,u,p;return(0,o.A)(this,i),h=this,u=i,p=[e],u=(0,s.A)(u),(d=(0,l.A)(h,c()?Reflect.construct(u,p||[],(0,s.A)(h).constructor):u.apply(h,p))).rootElement=e,d.noPartiesSelected=e.querySelectorAll(".js-no-parties-selected"),d.partyDropdown=e.querySelector(".js-party-dropdown"),d.partyDisplayText=e.querySelector(".js-party-display-text"),d.partyList=e.querySelector(".js-party-list"),d.partyCheckboxes=null===(t=d.partyList)||void 0===t?void 0:t.querySelectorAll('input[type="checkbox"]'),d.showAllPartiesCheckbox=null===(n=d.partyCheckboxes)||void 0===n?void 0:n.item(0),d.opinionDropdown=e.querySelector(".js-opinion-dropdown"),d.opinionDisplayText=e.querySelector(".js-opinion-display-text"),d.opinionList=e.querySelector(".js-opinion-list"),d.opinionCheckboxes=null===(a=d.opinionList)||void 0===a?void 0:a.querySelectorAll('input[type="checkbox"]'),d.showAllOpinionsCheckbox=null===(r=d.opinionCheckboxes)||void 0===r?void 0:r.item(0),d}return(0,a.A)(i,e),(0,n.A)(i,[{key:"setDisplayText",value:function(e,i){var t;e&&i&&(t=i.length<=20?i:i.slice(0,20)+"...",e.innerText=t)}},{key:"showSelectionNotice",value:function(){var e;null===(e=this.noPartiesSelected)||void 0===e||e.forEach(function(e){e.classList.remove("hidden")})}},{key:"hideSelectionNotice",value:function(){var e;null===(e=this.noPartiesSelected)||void 0===e||e.forEach(function(e){e.classList.add("hidden")})}},{key:"hideElements",value:function(e){e.forEach(function(e){e.classList.add("hidden")})}},{key:"showElements",value:function(e){e.forEach(function(e){e.classList.remove("hidden")})}},{key:"toggleAllParties",value:function(){var e,i,t;null!==(e=this.showAllPartiesCheckbox)&&void 0!==e&&e.checked?null===(i=this.partyCheckboxes)||void 0===i||i.forEach(function(e){e.checked=!0}):null===(t=this.partyCheckboxes)||void 0===t||t.forEach(function(e){e.checked=!1}),this.updateParties()}},{key:"toggleAllOpinions",value:function(){var e,i,t;null!==(e=this.showAllOpinionsCheckbox)&&void 0!==e&&e.checked?null===(i=this.opinionCheckboxes)||void 0===i||i.forEach(function(e){e.checked=!0}):null===(t=this.opinionCheckboxes)||void 0===t||t.forEach(function(e){e.checked=!1}),this.updateOpinions()}},{key:"updateParties",value:function(){var e,i,t=this,o=!0;if(null===(e=this.partyCheckboxes)||void 0===e||e.forEach(function(e){if("all-parties"!=e.value){var n,l=null===(n=e.value.toLowerCase().match(/[a-zA-Z0-9]+/g))||void 0===n?void 0:n.join("-"),s=".js-opinion-card-".concat(l),a=document.querySelectorAll(s);e.checked?e.checked&&(i=i?"".concat(i,", ").concat(e.dataset.displayName):e.dataset.displayName,t.showElements(a)):(t.hideElements(a),o=!1)}}),this.partyDisplayText)if(o){var n,l=(null===(n=this.partyList)||void 0===n||null===(n=n.querySelector(":first-child label"))||void 0===n?void 0:n.innerText)||"";this.setDisplayText(this.partyDisplayText,l),this.hideSelectionNotice()}else i?(this.setDisplayText(this.partyDisplayText,i),this.hideSelectionNotice()):(this.setDisplayText(this.partyDisplayText,this.partyDisplayText.dataset.noneSelectedText),this.showSelectionNotice());o||this.showAllPartiesCheckbox&&(this.showAllPartiesCheckbox.checked=!1)}},{key:"updateOpinions",value:function(){var e,i,t=this,o=!0;if(null===(e=this.opinionCheckboxes)||void 0===e||e.forEach(function(e){if("all-opinions"!=e.value){var n,l=null===(n=e.value.toLowerCase().match(/[a-zA-Z0-9]+/g))||void 0===n?void 0:n.join("-"),s=".js-opinion-".concat(l),a=document.querySelectorAll(s);e.checked?(i=i?"".concat(i,", ").concat(e.dataset.displayName):e.dataset.displayName,t.showElements(a)):(t.hideElements(a),o=!1)}}),this.opinionDisplayText)if(o){var n,l=(null===(n=this.opinionList)||void 0===n||null===(n=n.querySelector(":first-child label"))||void 0===n?void 0:n.innerText)||"";this.setDisplayText(this.opinionDisplayText,l)}else i?this.setDisplayText(this.opinionDisplayText,i):this.setDisplayText(this.opinionDisplayText,this.opinionDisplayText.dataset.noneSelectedText);o||this.showAllOpinionsCheckbox&&(this.showAllOpinionsCheckbox.checked=!1)}},{key:"init",value:function(){var e=this;if(this.partyDisplayText&&this.opinionDisplayText){var i,t,o,n,l=(null===(i=this.partyList)||void 0===i||null===(i=i.querySelector(":first-child label"))||void 0===i?void 0:i.innerText.trim())||"";this.setDisplayText(this.partyDisplayText,l);var s=(null===(t=this.opinionList)||void 0===t||null===(t=t.querySelector(":first-child label"))||void 0===t?void 0:t.innerText.trim())||"";this.setDisplayText(this.opinionDisplayText,s),null===(o=this.partyCheckboxes)||void 0===o||o.forEach(function(i){"all-parties"==i.value?i.addEventListener("click",function(){e.toggleAllParties()}):i.addEventListener("click",function(){e.updateParties()})}
1),null===(n=this.opinionCheckboxes)||void 0===n||n.forEach(function(i){"all-opinions"==i.value?i.addEventListener("click",function(){e.toggleAllOpinions()}):i.addEventListener("click",function(){e.updateOpinions()})})}}}])}(t(5564).$);i.default=r}}]); 2//# sourceMappingURL=apg-6927.1ef010c9ca6143522aa6.js.map
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.