1(()=>{var e={5190:module=>{class VoyagerQuickBookProperty{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!e){this.log("No panel provided, skipping initialization");return}this.panel=e;this.config={debug:this.getConfigValue("bookingPanelDebug","debug",false),skipLegacyFiltering:this.shouldSkipLegacyFiltering()};this.state={locationId:null,selectedPropertyId:null,isInitialized:false};this.elements=this.cacheElements(e);if(!this.elements.property){this.log("No property elements found, skipping initialization");return}this.variations={panel:e.dataset.variation,property:this.elements.property.dataset.variation};this.init()}getConfigValue(e,t,o){try{var i;return(null===(i=window[e])||void 0===i?void 0:i[t])??o}catch{return o}}shouldSkipLegacyFiltering(){if(window.VoyagerSelectMenu||window.voyagerSelectMenu)return true;const e=document.querySelector(".js-choices .choices__inner");if(e)return true;return!!document.querySelector(".js-choices[data-choice]")}cacheElements(e){const t=e.querySelector(".js-booking-properties");if(!t)return{property:null};return{property:t,locationDropdown:t.querySelector(".js-location-dropdown"),locationRadio:t.querySelector(".js-location-radio"),propertyDropdown:t.querySelector(".js-propery-dropdown"),propertyRadio:t.querySelector(".js-property-radio")}}init(){try{this.setupEventListeners();this.state.isInitialized=true;this.log("Initialization complete")}catch(e){this.error("Initialization failed:",e)}}setupEventListeners(){this.setupLocationHandlers();this.setupPropertyHandlers()}setupLocationHandlers(){if(this.elements.locationDropdown)this.setupLocationDropdown();if(this.elements.locationRadio)this.setupLocationRadio()}setupPropertyHandlers(){if(this.elements.propertyDropdown)this.setupPropertyDropdown();if(this.elements.propertyRadio)this.setupPropertyRadio()}setupFormSubmissionHandler(){const e=this.panel.closest("form");if(e){e.addEventListener("submit",t=>{const o=this.handleNewTabExternalLinks();if(o){t.preventDefault();setTimeout(()=>{e.removeEventListener("submit",arguments.callee);e.submit()},100)}});this.log("Form submission handler attached")}else this.log("No form found for panel, new tab links will not work on submission")}setupLocationDropdown(){this.elements.locationDropdown.addEventListener("change",e=>{const t=e.target.options[e.target.selectedIndex];this.handleLocationChange(t.dataset.id)})}setupLocationRadio(){const e=this.elements.locationRadio.querySelectorAll('input[name="voyager_booking_location"]');this.setupExternalLinks(e);e.forEach(e=>{e.addEventListener("change",e=>{if(this.handleExternalLink(e.target))return;this.handleLocationChange(e.target.dataset.id);this.updatePropertyVisibility()})})}setupPropertyDropdown(){this.elements.propertyDropdown.addEventListener("change",e=>{const t=e.target.options[e.target.selectedIndex];this.handlePropertySelection(t.dataset.id)})}setupPropertyRadio(){const e=this.elements.propertyRadio.querySelectorAll('input[name="voyager_booking_property"]');e.forEach(e=>{e.addEventListener("change",e=>{if(this.handleExternalLink(e.target))return;this.handlePropertySelection(e.target.dataset.id)})})}setupExternalLinks(e){e.forEach(e=>{const t=e.value;if(t.startsWith("[new_tab]")){const o=t.replace("[new_tab]","");e.setAttribute("data-external-url",o);e.setAttribute("data-external-target","_blank");e.value=o;e.addEventListener("change",()=>{if(e.checked){this.log("Opening new tab external link immediately:",o);window.open(o,"_blank")}})}else if(t.startsWith("[external]")){const o=t.replace("[external]","");e.setAttribute("data-external-url",o);e.setAttribute("data-external-target","_self");e.value=o;e.addEventListener("change",()=>{if(e.checked){this.log("Navigating to external link immediately:",o);window.location.href=o}})}})}handleExternalLink(e){const t=e.getAttribute("data-external");if(t){this.log("Navigating to external link immediately:",t);window.location.href=t;return true}return false}handleNewTabExternalLinks(){if(this.elements.locationRadio){const e=this.elements.locationRadio.querySelector('input[name="voyager_booking_location"]:checked');if(e){const t=e.getAttribute("data-external-url");const o=e.getAttribute("data-external-target");if(t&&"_blank"===o){this.log("Opening new tab external link:",t);const e=this.buildCompleteBookingUrl(t);window.open(e,"_blank");return true}}}if(this.elements.propertyRadio){const e=this.elements.propertyRadio.querySelector('input[name="voyager_booking_property"]:checked');if(e){const t=e.getAttribute("data-external-url");const o=e.getAttribute("data-external-target");if(t&&"_blank"===o){this.log("Opening new tab external link:",t);const e=this.buildCompleteBookingUrl(t);window.open(e,"_blank");return true}}}if(this.elements.locationDropdown){let e=null;if("select"===this.elements.locationDropdown.tagName.toLowerCase())e=this.elements.locationDropdown;else e=this.elements.locationDropdown.querySelector('select[name="voyager_booking_location"]');if(e&&e.selectedOptions.length>0){const t=e.selectedOptions[0];const o=t.getAttribute("data-external-url");const i=t.getAttribute("data-external-target");if(o&&"_blank"===i){this.log("Opening new tab external link:",o);const e=this.buildCompleteBookingUrl(o);window.open(e,"_blank");return true}}}if(this.elements.propertyDropdown){let e=null;if("select"===this.elements.propertyDropdown.tagName.toLowerCase())e=this.elements.propertyDropdown;else e=this.elements.propertyDropdown.querySelector('select[name="voyager_booking_property"]');if(e&&e.selectedOptions.length>0){const t=e.selectedOptions[0];const o=t.getAttribute("data-external-url");const i=t.getAttribute("data-external-target");if(o&&"_blank"===i){this.log("Opening new tab external link:",o);const e=this.buildCompleteBookingUrl(o);window.open(e,"_blank");return true}}}return false}handleLocationChange(e){this.state.locationId=e;this.log("Location changed:",e);this.togglePropertyDisplay(e)}handlePropertySelection(e){this.state.selectedPropertyId=e;this.log("Property selected:",e)}togglePropertyDisplay(e){if("option_4"!==this.variations.panel)return;const{property:t}=this.variations;const o=this.elements.property.dataset.separation;if("location_property"===t||"location_taxonomy"===t&&o);else if("location_taxonomy"===t||"location_property_location"===t);}updatePropertyVisibility(){if(!this.elements.propertyRadio)return;const e=this.elements.propertyRadio.querySelectorAll("li");this.updateElementsVisibility(e)}updateElementsVisibility(e){if(this.config.skipLegacyFiltering){this.log("Skipping legacy filtering - VoyagerSelectMenu is active");return}
1e.forEach(e=>{this.updateElementVisibility(e)})}updateElementVisibility(e){const t=e.dataset.parentId;const o=e.closest(".choices");if(o&&o.querySelector(".choices__inner")){this.log("Skipping element visibility update - enhanced select detected");return}e.selected=false;const i=e.querySelector("input");if(i)i.checked=false;const r=this.shouldShowElement(t);e.style.display=r?"":"none";if(o&&!this.config.skipLegacyFiltering){this.updateChoicesVisibility(e,o,r);if(r)this.updateChoicesState(o)}}shouldShowElement(e){if(!this.state.locationId)return true;return"all"===e||"all"===this.state.locationId||e===this.state.locationId}updateChoicesVisibility(e,t,o){const i=t.querySelector(".choices__placeholder");let r=e.index;if(i)r++;const n=t.querySelector(`.choices__item[data-id="${r}"]:not(.choices__item--selectable)`);if(n)n.style.display=o?"":"none"}updateChoicesState(e){this.resetChoicesHighlighting(e);this.resetPropertySelection()}resetChoicesHighlighting(e){const t=e.querySelectorAll(".is-highlighted, .is-selected");t.forEach(e=>{e.classList.remove("is-highlighted","is-selected");e.removeAttribute("aria-selected")});const o=e.querySelector(".choices__item--choice.choices__placeholder");const i=e.querySelector(".choices__item--selectable");const r=e.querySelector("input.choices__input");if(o&&i&&r){const e=o.textContent;const t=o.id;r.setAttribute("aria-activedescendant",t);o.classList.add("is-highlighted");o.setAttribute("aria-selected","true");Object.assign(i.dataset,{value:"",id:"1"});i.textContent=e;i.classList.add("choices__placeholder")}}resetPropertySelection(){if(!this.elements.propertyDropdown)return;const e=this.elements.propertyDropdown.options;Array.from(e).forEach((e,t)=>{e.selected=0===t;if(0===t)e.setAttribute("selected","selected");else e.removeAttribute("selected")});this.elements.propertyDropdown.dispatchEvent(new Event("change"))}selectProperty(e){this.log("Selecting property:",e);this.selectInDropdown(".js-location-dropdown",e);this.selectInDropdown(".js-propery-dropdown",e);this.selectInRadio(".js-location-radio",e);this.selectInRadio(".js-property-radio",e)}selectInDropdown(e,t){const o=document.querySelector(e);if(!o)return;Array.from(o.options).forEach(e=>{e.selected=e.dataset.id===t.toString()})}selectInRadio(e,t){const o=document.querySelector(e);if(!o)return;o.querySelectorAll("input").forEach(e=>{e.checked=e.dataset.id===t.toString()})}openMapwithPropery(){}getPropertyQuery(){switch(this.variations.property){case"location_property":case"location_property_location":return this.generateLocationPropertyQuery();case"location_taxonomy":return this.generateLocationTaxonomyQuery();default:return this.generateLocationPropertyQuery()}}generateLocationPropertyQuery(){const e=this.getElementQuery("location");const t=this.getElementQuery("property");return t||e||false}generateLocationTaxonomyQuery(){const e=this.getElementQuery("property");const t=this.getElementQuery("location");if(this.config.debug)this.log("Location taxonomy query check:",{propertyQuery:e,locationQuery:t});return e||t||false}getElementQuery(e){const t="location"===e;const o=t?this.elements.locationDropdown:this.elements.propertyDropdown;const i=t?this.elements.locationRadio:this.elements.propertyRadio;if(o)return this.getDropdownQuery(o);else if(i)return this.getRadioQuery(i);return false}getDropdownQuery(e){if(!e)return false;const t=e.options[e.selectedIndex];if(!t)return false;const o=t.dataset;const i=o.value||t.value;if(this.config.debug)this.log("Dropdown query debug:",{selectedIndex:e.selectedIndex,selectedOption:t,dataset:o,datasetValue:o.value,optionValue:t.value,finalValue:i});return this.buildQueryString(e.selectedIndex,o,i)}getRadioQuery(e){if(!e)return false;const t=e.querySelectorAll('input[type="radio"]');let o,i,r;for(let e=0;e<t.length;e++){const n=t[e];if(n.checked){o=e;i=n.dataset;r=n.value;break}}if(void 0!==o)return this.buildQueryString(o,i,r);return false}buildQueryString(e,t,o){if(!e||0===e){if(this.config.debug)this.log("Skipping query - placeholder selected:",e);return false}if(!o||"0"===o||""===o){if(this.config.debug)this.log("Skipping query - no valid value:",o);return false}if(o.includes("?")){if(this.config.debug)this.log("Using complete URL with existing query parameters:",o);return o}if(this.config.debug)this.log("Building query string:",{selectedIndex:e,dataset:t,value:o,hasKeywords:!!t.keyword});let i="";if(t.keyword){const e=t.keyword.split(",").map((e,t)=>{const o=0===t?"":"&";return`${o}keywords[]=${e.trim()}`}).join("");i=e}const r=i?`${o}?${i}`:o;if(this.config.debug)this.log("Query string result:",r);return r}buildCompleteBookingUrl(e){if(window.voyagerBookingPanel&&"function"===typeof window.voyagerBookingPanel.collectURLParameters){const t=window.voyagerBookingPanel.collectURLParameters();const o=t.filter(Boolean).join("&");if(o){const t=e.includes("?")?"&":"?";const i=`${e}${t}${o}`;return i}}return e}log(){if(this.config.debug){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];console.log("[VoyagerQuickBookProperty]",...t)}}error(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];console.error("[VoyagerQuickBookProperty]",...t)}}window.QuickBookProperty=VoyagerQuickBookProperty;if(true&&module.exports)module.exports=VoyagerQuickBookProperty}};var t={};function __webpack_require__(o){var i=t[o];if(void 0!==i)return i.exports;var module=t[o]={exports:{}};e[o](module,module.exports,__webpack_require__);return module.exports}var o=__webpack_require__(5190)})();
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.