!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=43)}({43:function(e,t){function n(){const e=window.getCurrentBreakPoint();if("sm"===e||"xs"===e){const e=document.getElementById("calendar-title");e&&(e.classList.remove("sr-only"),e.textContent="Alterations for the month")}}!function(e,t){e.behaviors.SaCalendar={attach(){console.log("Loaded -- Service Alterations"),t("SaCalendar","html",document).forEach(()=>{window.addEventListener("resize",()=>{n()}),function(){const e=()=>{document.querySelectorAll("#calendar-table .sac-table-row").forEach(e=>{e.classList.add("tr-hidden"),e.classList.remove("odd")}),document.getElementById("calendar-thead").classList.add("tr-hidden"),document.getElementById("calendar-title").classList.add("sr-only")},t=t=>{if(t.target.getAttribute("data-bs-toggle"))return;if("keydown"===t.type&&"Enter"!==t.key)return;let{target:n}=t;n.classList.contains("sac-day")||(n=n.closest(".sac-day")),e();const r=n.getAttribute("data-nids"),a=n.getAttribute("data-date");let o=[];r&&(o=r.split("|"),o.forEach(e=>{const t=document.getElementById("nid-"+e);t&&t.classList.remove("tr-hidden")}));let d=0;document.querySelectorAll("#calendar-table .sac-table-row").forEach(e=>{e.classList.contains("tr-hidden")||(d%2&&e.classList.add("odd"),d+=1)}),o.length&&(window.scrollToElement(document.getElementById("calendar-title"),100),document.getElementById("calendar-thead").classList.remove("tr-hidden"),document.getElementById("calendar-title").classList.remove("sr-only"),document.getElementById("calendar-title").textContent="Alterations "+a)},n=(e,t,n)=>{Array.from(document.getElementsByClassName(e)).forEach(e=>{e.addEventListener(n,t)})};n("sac-day has-alterations",t,"click"),n("sac-day has-alterations",t,"keydown"),n("incident-dot",e=>{if("keydown"===e.type&&"Enter"!==e.key)return;const t=e.target.getAttribute("data-url");t&&(window.location.href=t)},"keydown"),n("sac-day disabled",e,"click")}(),n()})}}}(Drupal,once)}});
//# sourceMappingURL=sa-calendar.js.map