PageSourceSearch

https://www.casaencantada-antigua.com/integration/tc-theme/public/js/chunk/bm-location-121c3cf346edbe3b8116.js

js casaencantada-antigua.com collected 2026-09-28 07:04:28 UTC 47,575 bytes, 1 lines download raw bytes

1(self.tcthemejsonpFunction=self.tcthemejsonpFunction||[]).push([[5128],{9946(e,t,o){(t=o(6314)(!1)).push([e.id,":root{--safe-area-inset-top: 0px;--safe-area-inset-right: 0px;--safe-area-inset-bottom: 0px;--safe-area-inset-left: 0px;--theme-rem-multiply: 1.6}@supports(top: constant(safe-area-inset-top)){:root{--safe-area-inset-top: constant(safe-area-inset-top);--safe-area-inset-right: constant(safe-area-inset-right);--safe-area-inset-bottom: constant(safe-area-inset-bottom);--safe-area-inset-left: constant(safe-area-inset-left)}}@supports(top: env(safe-area-inset-top)){:root{--safe-area-inset-top: env(safe-area-inset-top);--safe-area-inset-right: env(safe-area-inset-right);--safe-area-inset-bottom: env(safe-area-inset-bottom);--safe-area-inset-left: env(safe-area-inset-left)}}.bm-as__detail.search{padding-inline:16px 8px}.bm-as__detail.search .bm-form-input,.bm-as__detail.search .custom-select{position:relative;height:100%;width:100%;top:0;left:0}@media(hover: hover){.bm-as__detail.search .custom-select{display:block}}.bm-as__detail.search .bm-form-input:focus+.custom-select{display:none}.bm-as__detail.search .bm-form-input:focus,.bm-as__detail.search .custom-select.isActive .custom-select--trigger{outline:none;box-shadow:#fff 0 0 0 .2rem,#ff821f 0 0 0 .4rem}.bm-as__detail.search .select{position:relative;display:flex;width:100%}.bm-as__detail.search .select .select-label{display:block;font-weight:bold;margin-bottom:.4rem}.bm-as__detail.search .select .search--select-wrapper{position:relative;width:100%}.bm-as__detail.search .select .search--select-wrapper .bm-form-input,.bm-as__detail.search .select .search--select-wrapper .custom-select--trigger{border-radius:.4rem}.bm-as__detail.search .select .search--select-wrapper .bm-form-input{-webkit-appearance:none;-moz-appearance:none;padding:0rem .8rem}.bm-as__detail.search .select .search--select-wrapper .custom-select--trigger{position:relative;display:flex;width:100%;height:100%}.bm-as__detail.search .select .search--select-wrapper .custom-select--trigger:hover{border-color:var(--as-booking-mask-text-color)}.bm-as__detail.search .select .search--select-wrapper .custom-select--trigger .bm-as__icon.search-icon{transform:scaleX(-1);padding-inline:8px 0}@media(max-width: 767px){.bm-as__detail.search .select .search--select-wrapper .custom-select--trigger .bm-as__icon.close-icon{width:44px;height:44px;padding:16px}}.bm-as__detail.search .select .search--select-wrapper .custom-select--trigger .placeholder{font-size:14px}@media(max-width: 767px){.bm-as__detail.search .select .search--select-wrapper .custom-select--trigger .placeholder{font-size:16px}}.bm-as__detail.search .select .search--select-wrapper .custom-select--trigger .placeholder{cursor:pointer;align-items:flex-start;width:100%;text-align:start;border:0;background:rgba(0,0,0,0);padding:1px 2px}.bm-as__detail.search .select .search--select-wrapper .custom-select--trigger .placeholder[aria-hidden=true]{display:none}.bm-as__detail.search .select .search--select-wrapper .custom-select--trigger .search-input{display:flex;align-items:center;padding-inline:0 8px;width:80%;height:100%}.bm-as__detail.search .select .search--select-wrapper .custom-select--trigger .search-input input{position:relative;font-size:14px}@media(max-width: 767px){.bm-as__detail.search .select .search--select-wrapper .custom-select--trigger .search-input input{font-size:16px}}.bm-as__detail.search .select .search--select-wrapper .custom-select--trigger .search-input input{width:100%}.bm-as__detail.search .dropdown-wrapper{position:absolute;top:0px;left:0;width:400px;max-height:556px;margin-block:12px;z-index:700;display:flex;flex-direction:column;background-color:var(--as-booking-mask-background-color);box-shadow:0 8px 15px 0 rgba(0,0,0,.16)}.bm-as__detail.search .dropdown-wrapper.wide{width:556px}@media(max-width: 767px){.bm-as__detail.search .dropdown-wrapper{width:100%}.bm-as__detail.search .dropdown-wrapper.wide{width:100%}.bm-as__detail.search .dropdown-wrapper .main-text{font-size:var(--as-booking-mask-dropdown-mobile-font-size)}}.bm-as__detail.search .dropdown-wrapper .secondary-text{font-size:var(--as-booking-mask-small-mobile-font-size)}@media(min-width: 768px){.bm-as__detail.search .dropdown-wrapper .secondary-text{font-size:var(--as-booking-mask-small-font-size)}}.bm-as__detail.search .dropdown-wrapper .custom-select--custom-label{width:100%;color:var(--as-booking-mask-text-color);background:var(--as-booking-mask-background-color);color:var(--as-booking-mask-text-color);display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;padding:.5em 0}.bm-as__detail.search .dropdown-wrapper .custom-select--custom-label span{margin-left:20px}[dir=rtl] .bm-as__detail.search .dropdown-wrapper .custom-select--custom-label span{margin-left:0;margin-right:20px}.bm-as__detail.search .dropdown-wrapper .custom-select--options{width:100%;max-height:unset;background:var(--as-booking-mask-background-color);color:var(--as-booking-mask-text-color)}.bm-as__detail.search .dropdown-wrapper .custom-select--option{position:relative;padding:10px 20px;display:flex;align-items:center;min-height:36px;text-align:left;background-color:var(--as-booking-mask-background-color);border-block-start:1px solid var(--as-booking-mask-background-color);cursor:pointer}[dir=rtl] .bm-as__detail.search .dropdown-wrapper .custom-select--option{text-align:right}.bm-as__detail.search .dropdown-wrapper .custom-select--option .bm-as__icon{padding:0;align-items:inherit;min-height:36px;padding-inline-end:8px}[dir=rtl] .bm-as__detail.search .dropdown-wrapper .custom-select--option .bm-as__icon{padding-inline:8px 0}.bm-as__detail.search .dropdown-wrapper .custom-select--option .bm-as__icon .icon-wrapper{width:16px;height:20px}.bm-as__detail.search .dropdown-wrapper .custom-select--option:hover{color:var(--as-booking-mask-background-color);background-color:var(--as-booking-mask-text-color)}.bm-as__detail.search .dropdown-wrapper .custom-select--option:hover .custom-select-counter-tag span{color:var(--as-booking-mask-text-color);background-color:var(--as-booking-mask-background-color)}.bm-as__detail.search .dropdown-wrapper .custom-select--option:hover.first-level-section{background-color:var(--as-booking-mask-text-color)}.bm-as__detail.search .dropdown-wrapper .custom-select--option.first-level-section{background-color:var(--as-booking-mask-section-background-color)}.bm-as__detail.search .dropdown-wrapper .custom-select--option.second-level-section{border-block-start:1px solid var(--as-booking-mask-section-divider-color)}.bm-as__detail.search .dropdown-wrapper .custom-select--option.internal-1{padding-inline-start:48px}.bm-as__detail.search .dropdown-wrapper .custom-select--option.internal-2{padding-inline-start:72px}.bm-as__detail.search .dropdown-wrapper .custom-select--option.section-title{pointer-events:none}.bm-as__detail.search .dropdown-wrapper .custom-select--option.align-top{align-items:flex-start}.bm-as__detail.search .dropdown-wrapper .helper-disabled:first-child{border:none}.bm-as__detail.search .dropdown-wrapper .custom-select-option-name{display:flex;flex-direction:row;justify-content:space-between;width:100%;gap:20px}.bm-as__detail.search .dropdown-wrapper .custom-select-option-name.dropdown-option{margin-inline-start:24px}.bm-as__detail.search .dropdown-wrapper .custom-select-option-name .custom-select-text{display:flex;flex-direction:column;width:100%}.bm-as__detail.search .dropdown-wrapper .custom-select-option-name .custom-select-text .main-text,.bm-as__detail.search .dropdown-wrapper .custom-select-option-name .custom-select-text .secondary-text{overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.bm-as__detail.search .dropdown-wrapper .custom-select-option-name .custom-select-counter-tag{display:flex;align-items:center;justify-content:center;font-weight:700;font-size:var(--as-booking-mask-small-mobile-font-size)}@media(min-width: 768px){.bm-as__detail.search .dropdown-wrapper .custom-select-option-name .custom-select-counter-tag{font-size:var(--as-booking-mask-small-font-size)}}.bm-as__detail.search .dropdown-wrapper .custom-select-option-name .custom-select-counter-tag span{dis
1play:flex;align-items:center;border-radius:4px;padding:2px 6px;max-height:20px;background-color:var(--as-booking-mask-background-color)}.bm-as__detail.search .custom-select--options{max-height:30rem;overflow-y:auto}.bm-as__detail .custom-select-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}@media(max-width: 767px){.g_area-search.bm-as__show-mobile .bm-as__detail.search .select .search--select-wrapper .custom-select--trigger .placeholder{display:block}.g_area-search:not(.bm-as__show-mobile) .bm-as__detail.search .select .search--select-wrapper .custom-select--trigger .placeholder{display:none}.g_area-search:not(.bm-as__show-mobile) .bm-as__detail.search .select .search--select-wrapper .custom-select--trigger .placeholder[aria-hidden=true]{display:none}.g_area-search-ext.bm-as__show-mobile .bm-as__detail.search .select .search--select-wrapper .custom-select--trigger .placeholder{display:block}.g_area-search-ext.bm-as__show-mobile .bm-as__detail.search .select .search--select-wrapper .custom-select--trigger .placeholder[aria-hidden=true]{display:none}.g_area-search-ext:not(.bm-as__show-mobile) .bm-as__detail.search .select .search--select-wrapper .custom-select--trigger .placeholder{display:none}}",""]),e.exports=t},5072(e){"use strict";var t=[];function o(e){for(var o=-1,a=0;a<t.length;a++)if(t[a].identifier===e){o=a;break}return o}function a(e,a){for(var n={},r=[],s=0;s<e.length;s++){var l=e[s],c=a.base?l[0]+a.base:l[0],d=n[c]||0,p="".concat(c," ").concat(d);n[c]=d+1;var u=o(p),h={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==u)t[u].references++,t[u].updater(h);else{var m=i(h,a);a.byIndex=s,t.splice(s,0,{identifier:p,updater:m,references:1})}r.push(p)}return r}function i(e,t){var o=t.domAPI(t);return o.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;o.update(e=t)}else o.remove()}}e.exports=function(e,i){var n=a(e=e||[],i=i||{});return function(e){e=e||[];for(var r=0;r<n.length;r++){var s=o(n[r]);t[s].references--}for(var l=a(e,i),c=0;c<n.length;c++){var d=o(n[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}n=l}}},7659(e){"use strict";var t={};e.exports=function(e,o){var a=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(o)}},540(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056(e,t,o){"use strict";e.exports=function(e){var t=o.nc;t&&e.setAttribute("nonce",t)}},7825(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(o){!function(e,t,o){var a="";o.supports&&(a+="@supports (".concat(o.supports,") {")),o.media&&(a+="@media ".concat(o.media," {"));var i=void 0!==o.layer;i&&(a+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),a+=o.css,i&&(a+="}"),o.media&&(a+="}"),o.supports&&(a+="}");var n=o.sourceMap;n&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(n))))," */")),t.styleTagTransform(a,e,t.options)}(t,e,o)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},9897(e,t,o){"use strict";o.r(t),o.d(t,{default:()=>$e});var a=o(1425);const i={class:"bm-as__detail search ada-select__wrapper searchContainer",ref:"searchContainer"},n={class:"select"},r=["for"],s={class:"search--select-wrapper"};o(4423),o(1517),o(3777),o(4190),o(2359),o(6097),o(7273),o(7415),o(9929),o(7583),o(5122),o(230),o(7268),o(9733);const l="Destination Type",c=(e,t)=>`as-${e}-${t}`,d=(e,t,o)=>`as-${o}-${e}-${t}`,p=function(e,t){return e.map(e=>{const{booking_mask_url:o="",booking_engine_hotel_id:a="",booking_engine_provider_id:i="",second_booking_engine_hotel_id:n="",second_booking_engine_provider_id:r="",second_booking_engine_url:s="",be_open_in_same_tab:l=!1,name:d="",id:p="",weight:h=0,country:m
1="",country_id:D="",region:g="",region_id:w="",city:b="",location:f="",location_id:y=""}=e;return{booking_mask_url:o,booking_engine_hotel_id:a,booking_engine_provider_id:i,second_booking_engine_hotel_id:n,second_booking_engine_provider_id:r,second_booking_engine_url:s,be_open_in_same_tab:l,module:"hotel",name:d,id:c("hotel",p),hotel_id:p,text:d,secondaryText:u(e,t),mainText:d,country:m,countryId:D,region:g,regionId:w,city:f,city_id:y,weight:h}})},u=function(e,t){let o="";return""!=e.city&&(o=`${e.city},`),""!=e.region&&(o=`${o} ${e.region},`),""!=e.country&&(o=`${o} ${e.country},`),o.replace(/,(?=[^,]*$)/,"")},h=function(e){const{countries:t=[]}=e;return t.map(t=>{const o="country",{id:a="",name:i="",continent:n=""}=t,r=e.disableCountrySearch?"":`${i}`,s=`${n}`;return{module:o,id:c(o,a),mainText:r,countryId:a,secondaryText:s}})},m=function(e){const{countries:t=[],regions:o=[]}=e;return o.map(e=>{const o="region",{id:a="",name:i="",country_id:n=""}=e,{name:r=""}=t.find(e=>e.id===n)||{},s=""===i?"":`${i}`,l=""===r?"":`${r}`;return{module:o,name:i,countryName:r,countryId:n,id:c(o,a),mainText:s,secondaryText:l,regionId:a}})},D=function(e){const{countries:t=[],regions:o=[],cities:a=[]}=e;return a.map(a=>{const i="city",{id:n="",city:r="",region_id:s=""}=a,{name:l="",country_id:d=""}=o.find(e=>e.id===s)||{},{name:p=""}=t.find(e=>e.id===d)||{},u=e.disableCitySearch?"":`${r}`,h=(""===l?"":`${l}, \n      ${""===p?"":`${p},`}`).replace(/,(?=[^,]*$)/,"");return{module:i,name:r,regionName:l,regionId:s,countryName:p,countryId:d,id:c(i,n),mainText:u,secondaryText:h,city_id:n}})},g=function(e){const{countries:t=[],regions:o=[],cities:a=[],pois:i=[],sortResultsBy:n}=e;let r="";const s=JSON.parse(JSON.stringify(i[0])).filter(e=>e.location_id.length>0);let c=[];for(let e in s)for(let t=0;t<s[e].location_id.length;t++){let o={};const a=s[e].location_id[t];o.id=s[e].id,o.locationId=a,o.location_id=s[e].location_id,o.name=s[e].name,o.uniqueId=`poi-${s[e].id}-city-${a}`,c.push(o)}const p=[...new Map(c.map(e=>[e.uniqueId,e])).values()];let u=[],h=!1;if(n!=l){if(e.disableCitySearch&&e.disableRegionSearch&&e.disableCountrySearch&&(h=!0),e.disableCitySearch&&e.disableRegionSearch&&!e.disableCountrySearch){for(let e in p){let t=a.find(t=>t.id===p[e].locationId),i=o.find(e=>e.id===t.region_id);p[e].locationCountryId=i.country_id}u=p.filter((e,t)=>p.findIndex(t=>t.id==e.id&&t.locationCountryId==e.locationCountryId)==t)}if(e.disableCitySearch&&!e.disableRegionSearch){for(let e in p){let t=a.find(t=>t.id===p[e].locationId);p[e].locationRegionId=t.region_id}u=p.filter((e,t)=>p.findIndex(t=>t.id==e.id&&t.locationRegionId==e.locationRegionId)==t)}}let m=s;return n!=l&&(h||(m=p),e.disableCitySearch&&(e.disableRegionSearch&&e.disableCountrySearch||(m=u))),m.map(i=>{const{id:s="",name:c="",location_id:p="",locationId:u,uniqueId:h}=i,{city:m="",region_id:D=""}=a.find(e=>n!=l?e.id===u:p.includes(e.id))||{},{name:g="",country_id:w=""}=o.find(e=>e.id===D)||{},{name:b=""}=t.find(e=>e.id===w)||{},f=e.disablePoiSearch||0==p.length?"":`${c}`;let y="";return""!=m&&(y=`${m},`),""!=g&&(y=""===y?`${g},`:`${y} ${g},`),""!=b&&(y=""===y?`${b},`:`${y} ${b},`),r=y.replace(/,(?=[^,]*$)/,""),{module:"poi",name:c,regionName:g,regionId:D,countryName:b,countryId:w,id:d("poi",s,u),poiId:s,mainText:f,secondaryText:r,cityName:m,city_id:p,locationId:u,uniqueId:h}})},w=(e,t)=>(t.reverse(),t.forEach(t=>{let o=e.findIndex(e=>"city"==e.module&&t.city.trim().toLowerCase()==e.name.trim().toLowerCase());o>=0?e.splice(o+1,0,t):e.push(t)}),e),b=(e,t)=>(t.reverse(),t.forEach(t=>{let o=e.findIndex(e=>"region"==e.module&&c("region",t.regionId)==e.id);o>=0?e.splice(o+1,0,t):e.push(t)}),e),f=(e,t)=>(t.reverse(),t.forEach(t=>{let o=e.findIndex(e=>"country"==e.module&&c("country",t.countryId)==e.id);o>=0?e.splice(o+1,0,t):e.push(t)}),e),y=(e,t)=>(t.forEach(t=>{let o=e.findIndex(e=>c("city",t.locationId)==e.id);o>=0?e.splice(o+1,0,t):e.push(t)}),e),_=(e,t)=>(t.forEach(t=>{let o=e.findIndex(e=>c("region",t.regionId)==e.id);o>=0?e.splice(o+1,0,t):e.push(t)}),e),x=(e,t)=>(t.forEach(t=>{let o=e.findIndex(e=>c("region",t.regionId)==e.id);o>=0&&e.splice(o+1,0,t)}),e),S=(e,t)=>(t.forEach(t=>{let o=e.findIndex(e=>c("country",t.countryId)==e.id);o>=0&&e.splice(o+1,0,t)}),e),v=(e,t)=>
1(t.forEach(t=>{let o=e.findIndex(e=>c("country",t.countryId)==e.id);o>=0&&e.splice(o+1,0,t)}),e),k=(e,t)=>{let o=0;for(let a in e)e[a].module==t&&"section-title"!=e[a].type&&o++;return o},I=(e,t,o)=>{let a=0;for(let i in e.dropDownData)"country"==o&&(!e.disableRegionSearch&&"region"==e.dropDownData[i].module&&"section-title"!=e.dropDownData[i].type||!e.disableCitySearch&&"city"==e.dropDownData[i].module&&"section-title"!=e.dropDownData[i].type||!e.disablePoiSearch&&"poi"==e.dropDownData[i].module&&"section-title"!=e.dropDownData[i].type||"hotel"==e.dropDownData[i].module&&"section-title"!=e.dropDownData[i].type)&&e.dropDownData[t].countryId===e.dropDownData[i].countryId&&a++,"region"==o&&(!e.disableCitySearch&&"city"==e.dropDownData[i].module&&"section-title"!=e.dropDownData[i].type||!e.disablePoiSearch&&"poi"==e.dropDownData[i].module&&"section-title"!=e.dropDownData[i].type||"hotel"==e.dropDownData[i].module&&"section-title"!=e.dropDownData[i].type)&&e.dropDownData[t].regionId===e.dropDownData[i].regionId&&a++,"city"==o&&(!e.disablePoiSearch&&"poi"==e.dropDownData[i].module&&"section-title"!=e.dropDownData[i].type||"hotel"==e.dropDownData[i].module&&"section-title"!=e.dropDownData[i].type)&&(e.dropDownData[t].city_id===e.dropDownData[i].city_id||"poi"==e.dropDownData[i].module&&e.dropDownData[t].city_id===e.dropDownData[i].locationId)&&a++;return a},C=(e,t)=>{let o=0;for(let a in e)e[a].module==t&&"section-title"!=e[a].type&&o++;return o},$=function(){const e=bm_ui_settings.areaSearch,{hotels:t=[]}=bm_ui_settings.website,o={module:"country",type:"section-title",mainText:e.locales.country,id:"as-country-title-0"},a={module:"region",type:"section-title",mainText:e.locales.region,id:"as-region-title-0"},i={module:"city",type:"section-title",mainText:e.locales.city,id:"as-city-title-0"},n={module:"hotel",type:"section-title",mainText:e.locales.hotel,id:"as-hotel-title-0"},r={module:"poi",type:"section-title",mainText:e.locales.poi,id:"as-poi-title-0"},s=e.enableAllDestinationSearch?{module:"all",type:"section-title",mainText:e.locales.allDestinations,id:"as-all-0"}:"";let d=[];const u=e.sortResultsBy===l;switch(`${+e.disableCountrySearch}${+e.disableRegionSearch}${+e.disableCitySearch}${+e.disablePoiSearch}${+u}`){case"00000":d=[...h(e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d],e.dropDownData=v(e.dropDownData,m(e)),e.dropDownData=x(e.dropDownData,D(e)),e.dropDownData=w(e.dropDownData,p(t,e)),e.dropDownData=y(e.dropDownData,g(e));break;case"00001":d=[o,...h(e),a,...m(e),i,...D(e),r,...g(e),n,...p(t,e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d];break;case"00010":d=[...h(e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d],e.dropDownData=v(e.dropDownData,m(e)),e.dropDownData=x(e.dropDownData,D(e)),e.dropDownData=w(e.dropDownData,p(t,e));break;case"00011":d=[o,...h(e),a,...m(e),i,...D(e),n,...p(t,e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d];break;case"00100":d=[...h(e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d],e.dropDownData=v(e.dropDownData,m(e)),e.dropDownData=b(e.dropDownData,p(t,e)),e.dropDownData=_(e.dropDownData,g(e));break;case"00101":d=[o,...h(e),a,...m(e),r,...g(e),n,...p(t,e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d];break;case"00110":d=[...h(e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d],e.dropDownData=v(e.dropDownData,m(e)),e.dropDownData=b(e.dropDownData,p(t,e));break;case"00111":d=[o,...h(e),a,...m(e),n,...p(t,e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d];break;case"01000":d=[...h(e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d],e.dropDownData=S(e.dropDownData,D(e)),e.dropDownData=w(e.dropDownData,p(t,e)),e.dropDownData=y(e.dropDownData,g(e));break;case"01001":d=[o,...h(e),i,...D(e),r,...g(e),n,...p(t,e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d];break;case"01010":d=[...h(e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d],e.dropDownData=S(e.dropDownData,D(e)),e.dropDownData=w(e.dropDownData,p(t,e));break;case"01011":d=[o,...h(e),i,...D(e),n,...p(t,e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d];break;case"01100":d=[...h(e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d],e.dropDownData=f(e.dropDownData,p(t,e)),e.dropDownData=($=e.dropDownData,g(e).forEach(e
1=>{let t=$.findIndex(t=>c("country",e.countryId)==t.id);t>=0?$.splice(t+1,0,e):$.push(e)}),$);break;case"01101":d=[o,...h(e),r,...g(e),n,...p(t,e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d];break;case"01110":d=[...h(e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d],e.dropDownData=f(e.dropDownData,p(t,e));break;case"01111":d=[o,...h(e),n,...p(t,e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d];break;case"10000":d=[...m(e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d],e.dropDownData=x(e.dropDownData,D(e)),e.dropDownData=w(e.dropDownData,p(t,e)),e.dropDownData=y(e.dropDownData,g(e));break;case"10001":d=[a,...m(e),i,...D(e),r,...g(e),n,...p(t,e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d];break;case"10010":d=[...m(e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d],e.dropDownData=x(e.dropDownData,D(e)),e.dropDownData=w(e.dropDownData,p(t,e));break;case"10011":d=[a,...m(e),i,...D(e),n,...p(t,e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d];break;case"10100":d=[...m(e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d],e.dropDownData=b(e.dropDownData,p(t,e)),e.dropDownData=_(e.dropDownData,g(e));break;case"10101":d=[a,...m(e),r,...g(e),n,...p(t,e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d];break;case"10110":d=[...m(e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d],e.dropDownData=b(e.dropDownData,p(t,e));break;case"10111":d=[a,...m(e),n,...p(t,e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d];break;case"11000":d=[...D(e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d],e.dropDownData=w(e.dropDownData,p(t,e)),e.dropDownData=y(e.dropDownData,g(e));break;case"11001":d=[i,...D(e),r,...g(e),n,...p(t,e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d];break;case"11010":d=[...D(e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d],e.dropDownData=w(e.dropDownData,p(t,e));break;case"11011":d=[i,...D(e),n,...p(t,e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d];break;case"11100":d=[...g(e),...p(t,e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d];break;case"11101":d=[r,...g(e),n,...p(t,e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d];break;case"11110":d=[...p(t,e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d];break;case"11111":d=[n,...p(t,e)],e.dropDownData=e.enableAllDestinationSearch?[s,...d]:[...d]}var $;if(!u)if(e.disableCountrySearch||e.disableRegionSearch||e.disableCitySearch){if(!e.disableCountrySearch||!e.disableRegionSearch||!e.disableCitySearch)for(let t in e.dropDownData)"hotel"!=e.dropDownData[t].module&&"poi"!=e.dropDownData[t].module||(e.dropDownData[t].section="internal-1")}else for(let t in e.dropDownData)"city"==e.dropDownData[t].module&&(e.dropDownData[t].section="internal-1"),"hotel"!=e.dropDownData[t].module&&"poi"!=e.dropDownData[t].module||(e.dropDownData[t].section="internal-2");let T=k(e.dropDownData,"hotel"),O=k(e.dropDownData,"poi");for(let t in e.dropDownData){if("all"==e.dropDownData[t].module){let o=e.disableCountrySearch?0:e.countries.length,a=e.disableRegionSearch?0:e.regions.length,i=e.disableCitySearch?0:e.cities.length,n=e.disablePoiSearch?0:O;e.dropDownData[t].resultCount=o+a+i+n+T,e.dropDownData[t].totalCount=o+a+i+n+T}if(e.sortResultsBy!=l){if("country"==e.dropDownData[t].module){let o=I(e,t,e.dropDownData[t].module);e.dropDownData[t].type="section-level",e.dropDownData[t].resultCount=o,e.dropDownData[t].totalCount=o}else if(e.disableCountrySearch&&"region"==e.dropDownData[t].module){let o=I(e,t,e.dropDownData[t].module);e.dropDownData[t].type="section-level",e.dropDownData[t].resultCount=o,e.dropDownData[t].totalCount=o}else if(e.disableCountrySearch&&e.disableRegionSearch&&"city"==e.dropDownData[t].module){let o=I(e,t,e.dropDownData[t].module);e.dropDownData[t].type="section-level",e.dropDownData[t].resultCount=o,e.dropDownData[t].totalCount=o}}else if("section-title"==e.dropDownData[t].type&&("country"==e.dropDownData[t].module||"region"==e.dropDownData[t].module||"city"==e.dropDownData[t].module||"poi"==e.dropDownData[t].module||"hotel"==e.dropDownData[t].module)){let o=C(e.dropDownData,e.dropDownData[t].module);e.dropDownData[t].resultCount=o,e.dropDownData[t].totalCount=o}}return e},T={id:"bm-as-location-search",ref:"hiddenSelect","data-dropdown-class":"bm-as__select-dropdown","data-search":"true","aria-required":"true","data-select2-id":"bm-as-location-search",tabindex:"-1","aria-hidden":"true",class:"custom-select-hidden-accessible"},O=["data-booking-engine-hotel-id","value","data-location"];o(8164);var A=o(8972);const{fireEvent:R}
1=A.Wp,E={name:"HiddenSelect",props:{configs:{type:Object,required:!0,default:()=>({})}},watch:{"$store.state.selected":function(){this.$refs.hiddenSelect.value=this.$store.state.selected.id,R("bm::location-search::change",this.$store.state.selected)}}};var L=o(6262);const B=(0,L.A)(E,[["render",function(e,t,o,i,n,r){return(0,a.uX)(),(0,a.CE)("select",T,[t[0]||(t[0]=(0,a.Lk)("option",null,null,-1)),((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(o.configs.dropDownData,(e,t)=>((0,a.uX)(),(0,a.CE)("option",{key:e.id,"data-booking-engine-hotel-id":e.booking_engine_hotel_id,value:e.id,"data-location":e.secondaryText},(0,a.v_)(e.mainText),9,O))),128))],512)}]]),M={class:"custom-select js-custom-select"},q={class:"custom-select--trigger",ref:"trigger"},F=["aria-hidden"],H={key:0,class:"search-input"},P=["placeholder"],z={"aria-hidden":"true",class:"icon-wrapper close-button"},N=["href"];var X=o(8012);const j={name:"CustomSelect",mixins:[X.A],props:{areaSearch:{type:Object,required:!0,default:()=>({})}},data(){return{search:"",placeHolder:this.areaSearch.labels.locationSearchPlaceholder,isTyping:!1}},watch:{"$store.state.customDropDownOpenState":function(){this.$store.state.customDropDownOpenState||(this.$refs.searchField.value=this.$store.state.selected.mainText,this.$store.state.selected.mainText&&this.$store.state.selected.mainText.length>0?this.placeHolder=this.$store.state.selected.mainText.replace(/(<([^>]+)>)/gi,""):this.placeHolder=this.areaSearch.labels.locationSearchPlaceholder)}},computed:{isOpen(){return this.$store.getters.isDropDownOpen},getSvg(){return this.isMobile()?"#icon-close-promo":"#asm-bm-dropdown-icon-close"}},methods:{filterResults(){if(this.resetMatchingTextBold(this.areaSearch.dropDownData),this.areaSearch.locationFieldSearch&&this.search.length<3){for(let e in this.areaSearch.dropDownData)"section-title"!=this.areaSearch.dropDownData[e].type&&"section-level"!=this.areaSearch.dropDownData[e].type||(this.areaSearch.dropDownData[e].resultCount=this.areaSearch.dropDownData[e].totalCount);return void this.$store.dispatch("setResults",this.areaSearch.dropDownData)}let e=[],t=[],o=[],a=[],i=[],n=!1,r=!1,s=!1,l=!1,c=!1;for(let d in this.areaSearch.dropDownData){let p=this.areaSearch.dropDownData[d];const u=p.mainText.toLowerCase().split(/\s+/);let h=p.mainText.toLowerCase().split(/\s+/);if(h=this.splitItemString(u,h),(this.areaSearch.locationFieldSearch&&p.mainText.toLowerCase().includes(this.search.toLowerCase())||h.some(e=>e.startsWith(this.search.toLowerCase())))&&("Destination Type"==this.areaSearch.sortResultsBy&&("country"==p.module&&"section-title"!=p.type&&-1===e.indexOf(p.countryId)?(n=!0,e.push(p.countryId)):"region"==p.module&&"section-title"!=p.type&&-1===t.indexOf(p.regionId)?(r=!0,t.push(p.regionId)):"city"==p.module&&"section-title"!=p.type&&-1===o.indexOf(p.city_id)?(s=!0,o.push(p.city_id)):"poi"==p.module&&"section-title"!=p.type&&-1===i.indexOf(p.poiId)?(c=!0,i.push(p.poiId)):"hotel"==p.module&&"section-title"!=p.type&&-1===a.indexOf(p.hotel_id)&&(l=!0,a.push(p.hotel_id))),"Destination Type"!=this.areaSearch.sortResultsBy))if("country"==p.module&&-1===e.indexOf(p.countryId)){e.push(p.countryId);for(let e in this.areaSearch.dropDownData){let n=this.areaSearch.dropDownData[e];n.countryId==p.countryId&&("region"==n.module&&-1===t.indexOf(n.regionId)&&t.push(n.regionId),"city"==n.module&&-1===o.indexOf(n.city_id)&&o.push(n.city_id),"poi"==n.module&&-1===i.indexOf(n.uniqueId)&&i.push(n.uniqueId),"hotel"==n.module&&-1===a.indexOf(n.hotel_id)&&a.push(n.hotel_id))}}else if("region"==p.module&&-1===t.indexOf(p.regionId)){-1===e.indexOf(p.countryId)&&e.push(p.countryId),-1===t.indexOf(p.regionId)&&t.push(p.regionId);for(let e in this.areaSearch.dropDownData){let t=this.areaSearch.dropDownData[e];t.regionId==p.regionId&&("city"==t.module&&-1===o.indexOf(t.city_id)&&o.push(t.city_id),"poi"==t.module&&-1===i.indexOf(t.uniqueId)&&i.push(t.uniqueId),"hotel"==t.module&&-1===a.indexOf(t.hotel_id)&&a.push(t.hotel_id))}}else if("city"==p.module&&-1===o.indexOf(p.city_Id)){-1===e.indexOf(p.countryId)&&e.push(p.countryId),-1===t.indexOf(p.regionId)&&t.pu
1sh(p.regionId),-1===o.indexOf(p.city_id)&&o.push(p.city_id);for(let e in this.areaSearch.dropDownData){let t=this.areaSearch.dropDownData[e];t.city_id==p.city_id&&("poi"==t.module&&-1===i.indexOf(t.uniqueId)&&i.push(t.uniqueId),"hotel"==t.module&&-1===a.indexOf(t.hotel_id)&&a.push(t.hotel_id))}}else"poi"==p.module&&-1===i.indexOf(p.uniqueId)?(-1===e.indexOf(p.countryId)&&e.push(p.countryId),-1===t.indexOf(p.regionId)&&t.push(p.regionId),-1===o.indexOf(p.locationId)&&o.push(p.locationId),-1===i.indexOf(p.uniqueId)&&i.push(p.uniqueId)):(-1===e.indexOf(p.countryId)&&e.push(p.countryId),-1===t.indexOf(p.regionId)&&t.push(p.regionId),-1===o.indexOf(p.city_id)&&o.push(p.city_id),-1===a.indexOf(p.hotel_id)&&a.push(p.hotel_id))}let d=this.areaSearch.dropDownData.filter(d=>{if("Destination Type"==this.areaSearch.sortResultsBy&&("all"==d.module&&(n||r||s||l||c)||"section-title"==d.type&&("country"==d.module&&n||"region"==d.module&&r||"city"==d.module&&s||"poi"==d.module&&c||"hotel"==d.module&&l)||"country"==d.module&&e.includes(d.countryId)||"region"==d.module&&t.includes(d.regionId)||"city"==d.module&&o.includes(d.city_id)||"poi"==d.module&&i.includes(d.poiId)||"hotel"==d.module&&a.includes(d.hotel_id))){if("section-title"!=d.type)if(this.areaSearch.locationFieldSearch){let e=new RegExp(this.search,"gi");d.mainText=d.mainText.replace(e,function(e){return`<b>${e}</b>`})}else{let e=new RegExp("\\b"+this.search,"gi");d.mainText=d.mainText.replace(e,function(e){return`<b>${e}</b>`})}return!0}if("Destination Type"!=this.areaSearch.sortResultsBy&&("all"==d.module&&(e.length||t.length||o.length||i.length||a.length)||"country"==d.module&&e.includes(d.countryId)||"region"==d.module&&t.includes(d.regionId)&&e.includes(d.countryId)||"city"==d.module&&o.includes(d.city_id)&&(t.includes(d.regionId)||e.includes(d.countryId))||"poi"==d.module&&i.includes(d.uniqueId)&&(o.includes(d.locationId)||t.includes(d.regionId)||e.includes(d.countryId))||"hotel"==d.module&&a.includes(d.hotel_id)&&(o.includes(d.city_id)||t.includes(d.regionId)||e.includes(d.countryId)))){if("section-title"!=d.type)if(this.areaSearch.locationFieldSearch){let e=new RegExp(this.search,"gi");d.mainText=d.mainText.replace(e,function(e){return`<b>${e}</b>`})}else{let e=new RegExp("\\b"+this.search,"gi");d.mainText=d.mainText.replace(e,function(e){return`<b>${e}</b>`})}return!0}}),p=0,u=0,h=0,m=0,D=0,g=0;for(let e in d){if("country"==d[e].module&&"section-title"==d[e].type){for(let e in d)"country"==d[e].module&&"section-title"!=d[e].type&&p++;d[e].resultCount=p}if("country"==d[e].module&&"section-level"==d[e].type){let t=0;for(let o in d){let a=d[e].countryId,i=d[o].countryId,n=d[o].mainText;"country"!=d[o].module&&(t=this.countMatchingSubItems(a,i,n,t)),d[e].resultCount=t}}if("region"==d[e].module&&"section-title"==d[e].type){for(let e in d)"region"==d[e].module&&"section-title"!=d[e].type&&u++;d[e].resultCount=u}if("region"==d[e].module&&"section-level"==d[e].type){let t=0;for(let o in d){let a=d[e].regionId,i=d[o].regionId,n=d[o].mainText;("hotel"==d[o].module||!this.areaSearch.disableCitySearch&&"city"==d[o].module||!this.areaSearch.disablePoiSearch&&"poi"==d[o].module)&&(t=this.countMatchingSubItems(a,i,n,t))}d[e].resultCount=t}if("city"==d[e].module&&"section-title"==d[e].type){for(let e in d)"city"==d[e].module&&"section-title"!=d[e].type&&h++;d[e].resultCount=h}if("city"==d[e].module&&"section-level"==d[e].type){let t=0;for(let o in d){let a=d[e].city_id,i=d[o].city_id,n=d[o].locationId,r=d[o].mainText;"hotel"==d[o].module&&(t=this.countMatchingSubItems(a,i,r,t)),this.areaSearch.disablePoiSearch||"poi"!=d[o].module||(t=this.countMatchingSubItems(a,n,r,t))}d[e].resultCount=t}if("poi"==d[e].module&&"section-title"==d[e].type){for(let e in d)"poi"==d[e].module&&"section-title"!=d[e].type&&m++;d[e].resultCount=m}if("hotel"==d[e].module&&"section-title"==d[e].type){for(let e in d)"hotel"==d[e].module&&"section-title"!=d[e].type&&D++;d[e].resultCount=D}if("all"==d[e].module)if("Destination Type"!=this.areaSearch.sortResultsBy){let t=0;for(let o in d){let a=null,i=null,n=d[o].mainText,r=d[o].type,s=d[o].module;"all"==s&&(a=0,o=1),"hotel"==s&&"section-level"!=r&&(a=d[e].hotel_id,o=d[o].hotel_id),"poi"==s&&"section-level"!=r&&(a=d[e].uniqueId,o=d[o].uniqueId),"city"==s&&"section-level"!=r&&(a=d[e].city_Id,o=d[o].city_Id),"region"==s&&"section-level"!=r&&(a=d[e].regionId,o=d[o].regionId),"country"==s&&"section-level"!=r&&(a=d[e].countryId,o=d[o].countryId),t=this.countMatchingSubItems(a,i,n,t)}d[e].resultCount=t}else for(let t in d)"section-title"!=d[t].type&&g++,d[e].resultCount=g}this.$store.dispatch("setSearchString",this.search),this.$store.dispatch("setResults",d)},resetMatchingTextBold(e){for(let t in e)e[t].mainText=e[t].mainText.replace(/(<([^>]+)>)/gi,"")},splitItemString(e,t){for(let o=0;o<e.length;o++)for(let a=o+2;a<=e.length;a++)t.push(e.slice(o,a).join(" "));return t},countMatchingSubItems(e,t,o,a){const i=o.replace(/(<([^>]+)>)/gi,"").toLowerCase().split(/\s+/);let n=o.replace(/(<([^>]+)>)/gi,"").toLowerCase().split(/\s+/);return n=this.splitItemString(i,n),e==t&&(this.areaSearch.locationFieldSearch&&o.toLowerCase().includes(this.search.toLowerCase())||n.some(e=>e.startsWith(this.search.toLowerCase())))&&a++,a},onChange(){this.filterResults(),document.getElementById("area_search__field_id").value.length>0?this.isTyping=!0:this.isTyping=!1},clickPlaceholder(e){this.$store.dispatch("setDropDownOpenState",!0),this.$nextTick(()=>{this.$refs.searchField.focus(),"ontouchstart"in document.documentElement&&window.innerWidth>768&&window.innerWidth<1200&&setTimeout(()=>{this.$store.dispatch("setDropDownOpenState",!0)},1e3)})},clickArrow(){this.$store.dispatch("setDropDownOpenState",!1)},clickClear(){this.search="",this.filterResults(),this.isTyping=!1}}},K=(0,L.A)(j,[["render",function(e,t,o,i,n,r){return(0,a.uX)(),(0,a.CE)("div",M,[(0,a.Lk)("div",q,[t[6]||(t[6]=(0,a.Fv)('<div class="bm-as__icon search-icon"><svg aria-hidden="true" class="icon-wrapper bm-as-icon-search"><use href="#icon-bm-as-search"></use></svg><svg aria-hidden="true" class="icon-wrapper bm-as-icon-edit"><use href="#bm-as-icon-edit"></use></svg></div>',1)),(0,a.Lk)("button",{class:"placeholder","aria-hidden":r.isOpen,type:"button",onClick:t[0]||(t[0]=e=>r.clickPlaceholder(e))},(0,a.v_)(n.placeHolder),9,F),r.isOpen?((0,a.uX)(),(0,a.CE)("div",H,[(0,a.bo)((0,a.Lk)("input",{id:"area_search__field_id",class:"search__field",type:"search",placeholder:n.placeHolder,tabindex:"0",autocorrect:"off",autocapitalize:"none",spellcheck:"false",role:"searchbox","aria-autocomplete":"list",autocomplete:"off","aria-label":"Search","aria-controls":"select2-8b5h-results","aria-activedescendant":"select2-8b5h-result-cx0f-AK",onInput:t[1]||(t[1]=(...e)=>r.onChange&&r.onChange(...e)),"onUpdate:modelValue":t[2]||(t[2]=e=>n.search=e),ref:"searchField"},null,40,P),[[a.Jo,n.search]])])):(0,a.Q3)("v-if",!0),r.isOpen&&!n.isTyping?((0,a.uX)(),(0,a.CE)("div",{key:1,class:"bm-as__icon search-arrow",role:"button",onClick:t[3]||(t[3]=(...e)=>r.clickArrow&&r.clickArrow(...e))},[...t[5]||(t[5]=[(0,a.Lk)("svg",{"aria-hidden":"true",class:"icon-wrapper"},[(0,a.Lk)("use",{href:"#icon-arrow-top"})],-1)])])):(0,a.Q3)("v-if",!0),r.isOpen&&n.isTyping?((0,a.uX)(),(0,a.CE)("div",{key:2,class:"bm-as__icon close-icon",role:"button",onClick:t[4]||(t[4]=(...e)=>r.clickClear&&r.clickClear(...e))},[((0,a.uX)(),(0,a.CE)("svg",z,[(0,a.Lk)("use",{href:r.getSvg},null,8,N)]))])):(0,a.Q3)("v-if",!0)],512)])}]]),W={key:0,class:"custom-select--custom-label"},Q={class:"main-text"},U={key:0,class:"secondary-text"},V={class:"custom-select--options",ref:"optionsWrapper"},J=["data-booking-engine-hotel-id","data-value","data-id","data-be-open-in-same-tab","aria-label"],G={key:0,class:"bm-as__icon"},Y={"aria-hidden":"true",class:"icon-wrapper"},Z=["xlink:href"],ee={class:"custom-select-text"},te=["innerHTML"],oe={key:0,class:"secondary-text"},ae={key:0,class:"custom-select-counter-tag"},{isNullOrUndefined:ie}=A._0,ne={name:"CustomSelectOption",props:{item:{type:Object,required:!0,default:()=>({})},areaSearch:{type:Object,required:!0,default:()=>({})},focusItem:{type:Number,required:!0,default:0},index:{type:Number,required:!0,default:0},results:{type:Object,required:!0,default:()=>({})}},data:e=>({classes:"custom-select--option",isSortedByDestinationType:"Destination Type"==e.areaSearch.sortResultsBy}),computed:{getSvgId(){return`#asm-bm-dropdown-icon-${this.item.module}`},showIcons(){return!(this.areaSearch.disableSearchIcons||this.isSortedByDestinationType&&"section-title"!=this.item.type)},showSecondaryText(){return!this.areaSearch.hideSecondaryInfomation&&this.item.secondaryText?.length>0},showResultCount(){return!this.areaSearch.hideCounterPerLevel&&this.item.resultCount>0&&("section-title"==this.item.type||"section-level"==this.item.type)},getClasses(){let e=this.classes;if(!this.areaSearch.hideSecondaryInfomation&&this.item.secondaryText?.length>0&&(e=`${e} align-top`),this.areaSearch.helperText||(e=`${e} helper-disabled`),"section-title"==this.item.type&&(e="all"==this.item.module?`${e} first-level-section`:`${e} first-level-section section-title`),"internal-1"==this.item.section&&(e=`${e} internal-1`),"internal-2"==this.item.section&&(e=`${e} internal-2`),"section-level"==this.item.type)return`${e} first-level-section`;if(!this.isSortedByDestinationType&&"section-level"!=this.item.type&&"region"==this.item.module){for(let t in this.results)if(t>0&&this.results[t].id==this.item.id&&"section-level"!=this.results[t-1].type)return`${e} second-level-section`;return`${e}`}return e},getAriaLabel(){return ie(this.item.secondaryText)?`${this.item.mainText}`:`${this.item.mainText}, ${this.item.secondaryText}`}},methods:{handleSelected(e){this.$store.dispatch("setSelected",e),this.$store.dispatch("setDropDownOpenState",!1)},handleSelectedArrows(e,t){"Enter"===t.code&&(this.$store.dispatch("setSelected",e),this.$store.dispatch("setDropDownOpenState",!1))}},mounted(){this.index!==this.focusItem||ie(this.$store.getters.getArrowKeys)||this.$nextTick(function(){this.$refs.selectOption.focus()})}},re=(0,L.A)(ne,[["render",function(e,t,o,i,n,r){return(0,a.uX)(),(0,a.CE)("div",{class:(0,a.C4)(r.getClasses),"data-booking-engine-hotel-id":o.item.booking_engine_hotel_id,"data-value":o.item.mainText,"data-id":o.item.id,"data-be-open-in-same-tab":o.item.be_open_in_same_tab,onClick:t[0]||(t[0]=e=>r.handleSelected(o.item)),onKeyup:t[1]||(t[1]=(0,a.D$)(e=>r.handleSelectedArrows(o.item,e),["prevent"])),role:"button",ref:"selectOption",tabindex:"0","aria-label":r.getAriaLabel},[r.showIcons?((0,a.uX)(),(0,a.CE)("div",G,[((0,a.uX)(),(0,a.CE)("svg",Y,[(0,a.Lk)("use",{"xlink:href":r.getSvgId},null,8,Z)]))])):(0,a.Q3)("v-if",!0),(0,a.Lk)("div",{class:(0,a.C4)(["custom-select-option-name",{"dropdown-option":e.isSortedByDestinationType&&"section-title"!=o.item.type}])},[(0,a.Lk)("div",ee,[(0,a.Lk)("span",{class:"main-text",innerHTML:o.item.mainText},null,8,te),r.showSecondaryText?((0,a.uX)(),(0,a.CE)("span",oe,(0,a.v_)(o.item.secondaryText),1)):(0,a.Q3)("v-if",!0)]),r.showResultCount?((0,a.uX)(),(0,a.CE)("div",ae,[(0,a.Lk)("span",null,(0,a.v_)(o.item.resultCount),1)])):(0,a.Q3)("v-if",!0)],2)],42,J)}]]),{i:se}=A.iW,{isNullOrUndefined:le}=A._0,ce={name:"CustomDropDown",mixins:[X.A],components:{CustomSelectOption:re},props:{areaSearch:{type:Object,required:!0,default:()=>({})},parentRefs:{type:Object,required:!0,default:()=>({})}},data:()=>({bmSettings:bm_ui_settings,searchDescription:"",searchHint:"",focusItem:0}),computed:{isOpen(){return this.$store.getters.isDropDownOpen},getResults(){return this.$store.getters.getResults.length>0||0==this.$store.getters.getResults.length&&this.$store.getters.getSearchString.length>0?this.$store.getters.getResults:this.areaSearch.dropDownData},getSearchDescription(){return 0===this.searchDescription.length?this.areaSearch.labels.searchDropDownDescription:this.searchDescription},getSearchHint(){let e=this.areaSearch.labels.searchHint;return 0===this.searchHint.length?e:this.searchHint},getFocusItem(){return this.focusItem}},watch:{"$store.state.arrowKeys":function(){if(!le(this.$store.state.arrowKeys)){if
1(this.focusItem>=0&&40===this.$store.state.arrowKeys.keyCode){if(this.areaSearch.dropDownData.length-1===this.focusItem)return;this.focusItem++}if(this.focusItem>=0&&38===this.$store.state.arrowKeys.keyCode){if(0===this.focusItem)return;this.focusItem--}}},"$store.state.customDropDownOpenState":function(){this.$store.state.customDropDownOpenState&&(this.dropDownPosition(),this.focusItem=0,this.$store.dispatch("setArrowKeys",null))},"$store.state.results":function(){0===this.$store.state.results.length?this.searchDescription=this.areaSearch.labels.noResultsFound:this.searchDescription=this.areaSearch.labels.searchDropDownDescription}},methods:{async dropDownPosition(){await this.$nextTick();const{container:e}=this.bmSettings,t=document.getElementById(e),o=this.$refs.dropdown,a=this.parentRefs.searchContainer,i=a.getBoundingClientRect();let n=document.getElementById("bm-collapsed-horizontal-wrapper").contains(t),r=se();const s=o?.getBoundingClientRect().height,l=a?.getBoundingClientRect().top,c=document.getElementsByClassName("js-header-height")[0]?.getBoundingClientRect(),d=c?.height+c?.top,p=document.getElementById("header__wrapper-link")?.getBoundingClientRect(),u=p?.height+p?.top,h=l-((u>d?u:d)+2*parseInt(window.getComputedStyle(o)?.marginBlock,10)),m=o?.getBoundingClientRect().top,D=document.getElementsByClassName("header__items-wrapper")[0]?.getBoundingClientRect().height,g=window.innerHeight-D-m,w=parseInt(document.getElementById("bm-horizontal-hero")?.getBoundingClientRect().bottom)==window.innerHeight;let b=!1;s>=h&&(w||Math.floor(h)>Math.floor(g)?o.style.maxHeight=`${Math.floor(h)}px`:(s>=g&&(o.style.maxHeight=`${Math.floor(g)}px`),b=!0)),le(o)||(this.isMobile()?o.style.top=function(e){let t=parseInt(document.defaultView.getComputedStyle(e,"").getPropertyValue("height")),o=parseInt(document.defaultView.getComputedStyle(e,"").getPropertyValue("padding-bottom"));return t+parseInt(document.defaultView.getComputedStyle(e,"").getPropertyValue("margin-bottom"))+o}(a)+"px":n||r||b?o.style.top=Math.floor(i.height)+"px":(o.style.bottom=Math.floor(i.height)+"px",o.style.top="auto",window.innerWidth<768&&(o.style.top="0px")))},closeDropDown(){this.$store.dispatch("setDropDownOpenState",!1)}},mounted(){window.addEventListener("resize",this.dropDownPosition),window.addEventListener("scroll",function(){this.isMobile()||this.closeDropDown()}.bind(this))}},de=(0,L.A)(ce,[["render",function(e,t,o,i,n,r){const s=(0,a.g2)("custom-select-option");return r.isOpen?((0,a.uX)(),(0,a.CE)("div",{key:0,class:(0,a.C4)(["dropdown-wrapper",{wide:"Destination Type"==o.areaSearch.sortResultsBy}]),ref:"dropdown"},[o.areaSearch.helperText?((0,a.uX)(),(0,a.CE)("div",W,[(0,a.Lk)("span",Q,(0,a.v_)(r.getSearchDescription),1),r.getSearchHint&&o.areaSearch.locationFieldSearch?((0,a.uX)(),(0,a.CE)("span",U,(0,a.v_)(r.getSearchHint),1)):(0,a.Q3)("v-if",!0)])):(0,a.Q3)("v-if",!0),(0,a.Lk)("div",V,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(r.getResults,(e,t)=>((0,a.uX)(),(0,a.Wv)(s,{key:e.id+r.getFocusItem,item:e,index:t,areaSearch:o.areaSearch,results:r.getResults,focusItem:r.getFocusItem},null,8,["item","index","areaSearch","results","focusItem"]))),128))],512)],2)):(0,a.Q3)("v-if",!0)}]]),{fireEvent:pe}
1=A.Wp,ue={name:"Search",components:{HiddenSelect:B,CustomSelect:K,CustomDropDown:de},data:()=>({areaSearch:$(),getRefs:{}}),methods:{closeEvent(){this.$store.dispatch("setDropDownOpenState",!1)},keyUpEvent(e){e.preventDefault(),this.$store.dispatch("setArrowKeys",e)}},mounted(){pe("bm::location-search::mounted"),this.getRefs=this.$refs,window.addEventListener("keydown",function(e){["ArrowUp","ArrowDown"].indexOf(e.code)>-1&&this.$store.getters.isDropDownOpen&&e.preventDefault()}.bind(this),!1)}};var he=o(5072),me=o.n(he),De=o(7825),ge=o.n(De),we=o(7659),be=o.n(we),fe=o(5056),ye=o.n(fe),_e=o(540),xe=o.n(_e),Se=o(1113),ve=o.n(Se),ke=o(5825),Ie=o.n(ke),Ce={};Ce.styleTagTransform=ve(),Ce.setAttributes=ye(),Ce.insert=be().bind(null,"head"),Ce.domAPI=ge(),Ce.insertStyleElement=xe(),me()(Ie(),Ce),Ie()&&Ie().locals&&Ie().locals;const $e=(0,L.A)(ue,[["render",function(e,t,o,l,c,d){const p=(0,a.g2)("hidden-select"),u=(0,a.g2)("custom-select"),h=(0,a.g2)("custom-drop-down"),m=(0,a.gN)("click-outside"),D=(0,a.gN)("bm-search-key-arrow-up-down");return(0,a.bo)(((0,a.uX)(),(0,a.CE)("div",i,[(0,a.Lk)("div",n,[(0,a.Lk)("label",{for:e.areaSearch.locationSearch.id,class:"ada-select__label sr-only"},(0,a.v_)(e.areaSearch.labels.locationSearchPlaceholder),9,r),(0,a.Lk)("div",s,[(0,a.bF)(p,{configs:{dropDownData:e.areaSearch.dropDownData}},null,8,["configs"]),(0,a.bF)(u,{areaSearch:e.areaSearch},null,8,["areaSearch"])])]),(0,a.bF)(h,{areaSearch:e.areaSearch,parentRefs:e.getRefs},null,8,["areaSearch","parentRefs"])])),[[m,d.closeEvent],[D,d.keyUpEvent]])}]])},5825(e,t,o){var a=o(9946);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals),(0,o(534).A)("cacef082",a,!1,{})}}]);

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.