1"use strict";(self.webpackChunklib=self.webpackChunklib||[]).push([[1006],{31006:(t,i,e)=>{e.r(i),e.d(i,{default:()=>G});var n=e(75644),a=e(31463),s=e(408);class o{static generateCityTemplate(t){var i=(0,a.az)("div",{class:"main-cities__city main-cities-city js-link","data-new-window":btoa("".concat(travel.options.language,"/").concat(t.NameUrl,"-hotels-").concat(t.DestinationID,"/")),"data-path-key":"newWindow"}),e=(0,a.az)("p",{class:"main-cities-city__name"},(0,s.NS)(t.Name)),n=(0,a.az)("p",{class:"main-cities-city__desc"},t.HotelsCountText);return i.appendChild(e),i.appendChild(n),i}static generatePhotoCityTemplate(t){var i=(0,a.az)("div",{class:"main-cities__city main-cities-city js-link swiper-slide","data-new-window":btoa("".concat(travel.options.language,"/").concat(t.NameUrl,"-hotels-").concat(t.DestinationID,"/")),"data-path-key":"newWindow"}),e=(0,a.az)("img",{class:"main-cities-city__photo main-cities-city-photo",src:"".concat(t.MainPhotoSrc),loading:"lazy",alt:""}),n=(0,a.az)("p",{class:"main-cities-city__name"},(0,s.NS)(t.Name));return i.appendChild(n),i.appendChild(e),i}}var c=e(47508),r=e(97652);function l(t,i,e,n,a,s,o){try{var c=t[s](o),r=c.value}catch(t){return void e(t)}c.done?i(r):Promise.resolve(r).then(n,a)}function h(t){return function(){var i=this,e=arguments;return new Promise((function(n,a){var s=t.apply(i,e);function o(t){l(s,n,a,o,c,"next",t)}function c(t){l(s,n,a,o,c,"throw",t)}o(void 0)}))}}function p(t,i){d(t,i),i.add(t)}function u(t,i,e){d(t,i),i.set(t,e)}function d(t,i){if(i.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(t,i,e){if(!i.has(t))throw new TypeError("attempted to get private field on non-instance");return e}function v(t,i){return function(t,i){if(i.get)return i.get.call(t);return i.value}(t,m(t,i,"get"))}function f(t,i,e){return function(t,i,e){if(i.set)i.set.call(t,e);else{if(!i.writable)throw new TypeError("attempted to set read only private field");i.value=e}}(t,m(t,i,"set"),e),e}function m(t,i,e){if(!i.has(t))throw new TypeError("attempted to "+e+" private field on non-instance");return i.get(t)}var g=new WeakMap,y=new WeakMap,k=new WeakMap,b=new WeakMap,W=new WeakSet,_=new WeakSet,C=new WeakSet,P=new WeakSet,M=new WeakSet,j=new WeakSet;class E extends n.Z{constructor(){super(),p(this,j),p(this,M),p(this,P),p(this,C),p(this,_),p(this,W),u(this,g,{writable:!0,value:void 0}),u(this,y,{writable:!0,value:void 0}),u(this,k,{writable:!0,value:void 0}),u(this,b,{writable:!0,value:void 0}),f(this,g,document.querySelector(".js-main-cities-inner")),f(this,y,document.querySelector(".js-main-cities-pagination"))}generateMainCitiesHtml(t){t.citiesWithPhoto&&w(this,W,S).call(this,t.citiesWithPhoto),w(this,_,T).call(this,t.citiesWithoutPhoto),w(this,j,x).call(this);var i=t.citiesWithPhoto.length+t.citiesWithoutPhoto.length;i>1&&(f(this,b,document.querySelectorAll(".js-main-cities-block")),w(this,P,N).call(this,{totalRecords:i}))}}function S(t){t.forEach((t=>{var i=(0,a.az)("div",{class:"main-cities__block main-cities__block--photo js-main-cities-block active js-main-cities-slider"}),e=(0,a.az)("div",{class:"main-cities__block-wrapper swiper-wrapper"});t.forEach((t=>{var n=o.generatePhotoCityTemplate(t);e.append(n),i.append(e)})),v(this,g).append(i),travel.isMobile()&&w(this,M,L).call(this,{container:i})}))}function T(t){t.forEach((t=>{var i=(0,a.az)("div",{class:"main-cities__block js-main-cities-block active"});t.forEach((t=>{var e=o.generateCityTemplate(t);i.append(e)})),v(this,g).append(i)}))}function z(t){v(this,b).forEach((t=>t.classList.remove("active"))),v(this,b)[t-1].classList.add("active")}function N(t){v(this,y).classList.add("is-active"),f(this,k,new c.Z({container:v(this,y),totalRecords:t.totalRecords,recordsPerPage:1,firstLastNavigation:!1,btnsContainer:".js-main-cities-pagination-inner",prevBtn:".js-main-cities-pagination-prev",nextBtn:".js-main-cities-pagination-next",btnClass:"main-cities-pagination__btn"})),v(this,k).on("pageChange",(t=>w(this,C,z).call(this,t))),v(this,k).on("onInit",(()=>{w(this,C,z).call(this,1),v(this,g).classList.add("with-pagination")})),v(this,k).init()}function L(t){new r.Z(t.container,{slidesPerView:"auto",speed:400,spaceBetween:10})}function x(){return R.apply(this,arguments)}function R(){return(R=h((function*(){var{initJsLinks:t}=yield e.e(3397).then(e.bind(e,47973));t({container:".js-main-cities-block"})}))).apply(this,arguments)}const D=(t,i)=>Array.from({length:Math.ceil(t.length/i)},((e,n)=>t.slice(n*i,n*i+i)));function q(t,i,e){B(t,i),i.set(t,e)}function B(t,i){if(i.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function H(t,i){return function(t,i){if(i.get)return i.get.call(t);return i.value}(t,Z(t,i,"get"))}function I(t,i,e){return function(t,i,e){if(i.set)i.set.call(t,e);else{if(!i.writable)throw new TypeError("attempted to set read only private field");i.value=e}}(t,Z(t,i,"set"),e),e}function Z(t,i,e){if(!i.has(t))throw new TypeError("attempted to "+e+" private field on non-instance");return i.get(t)}var A=new WeakMap,U=new WeakMap,J=new WeakMap,V=new WeakMap,F=new WeakSet;class G{constructor(t){var i,e,{citiesModel:n}=t;B(i=this,e=F),e.add(i),q(this,A,{writable:!0,value:void 0}),q(this,U,{writable:!0,value:void 0}),q(this,J,{writable:!0,value:void 0}),q(this,V,{writable:!0,value:void 0}),I(this,A,new E({citiesModel:n})),I(this,U,n),I(this,J,H(this,U).find().sort(((t,i)=>i.ReviewsCount-t.ReviewsCount)).slice(0,15)),I(this,V,function(t,i,e){if(!i.has(t))throw new TypeError("attempted to get private field on non-instance");return e}(this,F,K).call(this,H(this,J))),H(this,A).generateMainCitiesHtml(H(this,V))}}function K(t){var i=[],e=[],n={};return t.forEach((t=>{t.MainPhotoSrc&&i.length<3?i.push(t):e.push(t)})),3===i.length?(n.citiesWithPhoto=D(i,3),n.citiesWithoutPhoto=D(e,12)):(n.citiesWithPhoto=[],n.citiesWithoutPhoto=[t.slice(0,12)]),n}}}]);
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.