1"use strict";(self.webpackChunkyotel=self.webpackChunkyotel||[]).push([[8229],{6261:()=>{const e=function(e){if(e){var t=e.querySelector(".form-submit"),r=e.querySelectorAll("input.required"),n=e.querySelectorAll(".js-form-type-select:has(select.required)");if(t){t.addEventListener("click",(function(){r.forEach((function(e){e.classList.contains("valid")?e.classList.remove("invalid"):e.classList.add("invalid")})),n.forEach((function(e){return i(e)}))})),n.forEach((function(e){e.querySelector("select").addEventListener("change",(function(){return i(e)})),e.addEventListener("keydown",(function(t){"Tab"===t.key&&i(e)}))})),r.forEach((function(e){var t=e.closest(".form-item");if(t){var r=t.querySelector("label"),n=function(){var n=t.querySelector(".error-message"),i=!e.value.trim();if(i&&!n){(n=document.createElement("div")).setAttribute("aria-live","polite"),n.classList.add("error-message");var o=r?r.textContent.trim():"";n.textContent=Drupal.t("".concat(o?o+" field":"This field"," is required.")),t.appendChild(n)}else!i&&n&&n.remove()};e.addEventListener("blur",n),e.addEventListener("input",n)}})),n.forEach((function(e){var t=e.querySelector("select"),r=e.querySelector("label"),n=function(){var n=e.querySelector(".error-message"),i=0===t.selectedIndex;if(i&&!n){(n=document.createElement("div")).setAttribute("aria-live","polite"),n.classList.add("error-message");var o=r?r.textContent.trim():"";n.textContent=Drupal.t("".concat(o?o+" field":"This field"," is required.")),e.appendChild(n)}else!i&&n&&n.remove()};t.addEventListener("change",n),e.addEventListener("keydown",(function(e){"Tab"===e.key&&n()}))}));var i=function(e){var t=e.querySelector("select"),r=e.querySelector("input"),n=e.querySelector("label");0===t.selectedIndex?[r,n].forEach((function(e){return e.classList.add("invalid")})):[r,n].forEach((function(e){return e.classList.remove("invalid")}))}}}};!function(t,r){t.behaviors.webform={attach:function(t,n){var i;r("yotel-form",".yotel-form",t).forEach((function(t){return e(t)})),null!==(i=t.classList)&&void 0!==i&&i.contains("yotel-form")&&e(t)}}}(Drupal,once)}},e=>{e(e.s=6261)}]);
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.