PageSourceSearch

https://www.travelplanet.pl/assets/invia2020/js/5085.af713c89c3466f7176d2.chunk.js

js travelplanet.pl collected 2026-09-26 09:31:25 UTC 33,086 bytes, 3 lines download raw bytes

1/*! For license information please see 5085.af713c89c3466f7176d2.chunk.js.LICENSE.txt */
2"use strict";(globalThis.webpackChunkinvia2020=globalThis.webpackChunkinvia2020||[]).push([[5085],{65085(t,e,r){r.r(e),r.d(e,{default:()=>qt});var s=r(95455);function o(t,e,r,s){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,n){function i(t){try{c(s.next(t))}catch(t){n(t)}}function a(t){try{c(s.throw(t))}catch(t){n(t)}}function c(t){t.done?r(t.value):o(t.value).then(i,a)}c((s=s.apply(t,e||[])).next())}))}function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}"function"==typeof SuppressedError&&SuppressedError;var i,a=n((function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var s,o,n;if(Array.isArray(e)){if((s=e.length)!=r.length)return!1;for(o=s;0!==o--;)if(!t(e[o],r[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((s=(n=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(o=s;0!==o--;)if(!Object.prototype.hasOwnProperty.call(r,n[o]))return!1;for(o=s;0!==o--;){var i=n[o];if(!t(e[i],r[i]))return!1}return!0}return e!=e&&r!=r}));const c="__googleMapsScriptId";var l;!function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"}(l||(l={}));class h{constructor({apiKey:t,authReferrerPolicy:e,channel:r,client:s,id:o=c,language:n,libraries:i=[],mapIds:l,nonce:u,region:p,retries:d=3,url:m="https://maps.googleapis.com/maps/api/js",version:g}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=t,this.authReferrerPolicy=e,this.channel=r,this.client=s,this.id=o||c,this.language=n,this.libraries=i,this.mapIds=l,this.nonce=u,this.region=p,this.retries=d,this.url=m,this.version=g,h.instance){if(!a(this.options,h.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(h.instance.options)}`);return h.instance}h.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?l.FAILURE:this.done?l.SUCCESS:this.loading?l.LOADING:l.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let t=this.url;return t+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(t+=`&key=${this.apiKey}`),this.channel&&(t+=`&channel=${this.channel}`),this.client&&(t+=`&client=${this.client}`),this.libraries.length>0&&(t+=`&libraries=${this.libraries.join(",")}`),this.language&&(t+=`&language=${this.language}`),this.region&&(t+=`&region=${this.region}`),this.version&&(t+=`&v=${this.version}`),this.mapIds&&(t+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(t+=`&auth_referrer_policy=${this.authReferrerPolicy}`),t}deleteScript(){const t=document.getElementById(this.id);t&&t.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((t,e)=>{this.loadCallback((r=>{r?e(r.error):t(window.google)}))}))}importLibrary(t){return this.execute(),google.maps.importLibrary(t)}loadCallback(t){this.callbacks.push(t),this.execute()}setScript(){var t,e;if(document.getElementById(this.id))return void this.callback();const r={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(r).forEach((t=>!r[t]&&delete r[t])),(null===(e=null===(t=null===window||void 0===window?void 0:window.google)||void 0===t?void 0:t.maps)||void 0===e?void 0:e.importLibrary)||(t=>{let e,r,s,n="The Google Maps JavaScript API",i="google",a="importLibrary",c="__ib__",l=document,h=window;h=h[i]||(h[i]={});const u=h.maps||(h.maps={}),p=new Set,d=new URLSearchParams,m=()=>e||(e=new Promise(((a,h)=>o(this,void 0,void 0,(function*(){var o;for(s in yield r=l.createElement("script"),r.id=this.id,d.set("libraries",[...p]+""),t)d.set(s.replace(/[A-Z]/g,(t=>"_"+t[0].toLowerCase())),t[s]);d.set("callback",i+".maps."+c),r.src=this.url+"?"+d,u[c]=a,r.onerror=()=>e=h(Error(n+" could not load.")),r.nonce=this.nonce||(null===(o=l.querySelector("script[n
2once]"))||void 0===o?void 0:o.nonce)||"",l.head.append(r)})))));u[a]?console.warn(n+" only loads once. Ignoring:",t):u[a]=(t,...e)=>p.add(t)&&m().then((()=>u[a](t,...e)))})(r);const s=this.libraries.map((t=>this.importLibrary(t)));s.length||s.push(this.importLibrary("core")),Promise.all(s).then((()=>this.callback()),(t=>{const e=new ErrorEvent("error",{error:t});this.loadErrorCallback(e)}))}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(t){if(this.errors.push(t),this.errors.length<=this.retries){const t=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${t} ms.`),setTimeout((()=>{this.deleteScript(),this.setScript()}),t)}else this.onerrorEvent=t,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((t=>{t(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading=!0,this.setScript()}}}var u=r(87387);async function p(t,e){try{let r="";if(e){const t=new URLSearchParams;for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r))if(Array.isArray(e[r]))for(const s in e[r])t.append(`${r}[]`,e[r][s]);else t.append(r,e[r]);r="?"+t.toString()}const s=await fetch(t+r);if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return s.text()}catch(t){throw new Error("Network error or HTTP error: "+t.message)}}var d=r(49865),m=r(24030),g=r(66042),f=r.n(g);const y=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],w=1,v=8;class k{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[e,r]=new Uint8Array(t,0,2);if(219!==e)throw new Error("Data does not appear to be in a KDBush format.");const s=r>>4;if(1!==s)throw new Error(`Got v${s} data when expected v1.`);const o=y[15&r];if(!o)throw new Error("Unrecognized array type.");const[n]=new Uint16Array(t,2,1),[i]=new Uint32Array(t,4,1);return new k(i,n,o,t)}constructor(t,e=64,r=Float64Array,s){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const o=y.indexOf(this.ArrayType),n=2*t*this.ArrayType.BYTES_PER_ELEMENT,i=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-i%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);s&&s instanceof ArrayBuffer?(this.data=s,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+i+a,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+n+i+a),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+i+a,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+o]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t)}add(t,e){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return b(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:n,nodeSize:i}=this,a=[0,o.length-1,0],c=[];for(;a.length;){const l=a.pop()||0,h=a.pop()||0,u=a.pop()||0;if(h-u<=i){for(let i=u;i<=h;i++){const a=n[2*i],l=n[2*i+1];a>=t&&a<=r&&l>=e&&l<=s&&c.push(o[i])}continue}const p=u+h>>1,d=n[2*p],m=n[2*p+1];d>=t&&d<=r&&m>=e&&m<=s&&c.push(o[p]),(0===l?t<=d:e<=m)&&(a.push(u),a.push(p-1),a.push(1-l)),(0===l?r>=d:s>=m)&&(a.push(p+1),a.push(h),a.push(1-l))}return c}within(t,e,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:o,nodeSize:n}=this,i=[0,s.length-1,0],a=[],c=r*r;for(;i.length;){const l=i.pop()||0,h=i.pop()||0,u=i.pop()||0;if(h-u<=n){for(let r=u;r<=h;r++)E(o[2*r],o[2*r+1],t,e)<=c&&a.push(s[r]);continue}const p=u+h>>1,d=o[2*p],m=o[2*p+1];E(d,m,t,e)<=c&&a.push(s[p]),(0===l?t-r<=d:e-r<=m)&&(i.push(u),i.push(p-1),i.push(1-l)),(0===l?t+r>=d:e+r>=m)&&(i.push(p+1),i.push(h),i.push(1-l))}return a}}
vendor: 7,757 bytes, line 2
2function b(t,e,r,s,o,n){if(o-s<=r)return;const i=s+o>>1;x(t,e,i,s,o,n),b(t,e,r,s,i-1,1-n),b(t,e,r,i+1,o,1-n)}function x(t,e,r,s,o,n){for(;o>s;){if(o-s>600){const i=o-s+1,a=r-s+1,c=Math.log(i),l=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*l*(i-l)/i)*(a-i/2<0?-1:1),u=void 0,p=void 0;x(t,e,r,Math.max(s,Math.floor(r-a*l/i+h)),Math.min(o,Math.floor(r+(i-a)*l/i+h)),n)}const i=e[2*r+n];let a=s,c=o;for(M(t,e,s,r),e[2*o+n]>i&&M(t,e,s,o);a<c;){for(M(t,e,a,c),a++,c--;e[2*a+n]<i;)a++;for(;e[2*c+n]>i;)c--}e[2*s+n]===i?M(t,e,s,c):(c++,M(t,e,c,o)),c<=r&&(s=c+1),r<=c&&(o=c-1)}}function M(t,e,r,s){I(t,r,s),I(e,2*r,2*s),I(e,2*r+1,2*s+1)}function I(t,e,r){const s=t[e];t[e]=t[r],t[r]=s}function E(t,e,r,s){const o=t-r,n=e-s;return o*o+n*n}const P={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},L=Math.fround||(C=new Float32Array(1),t=>(C[0]=+t,C[0]));var C;const A=2,_=3,S=4,j=5,O=6;class T{constructor(t){this.options=Object.assign(Object.create(P),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:r,maxZoom:s}=this.options;e&&console.time("total time");const o=`prepare ${t.length} points`;e&&console.time(o),this.points=t;const n=[];for(let e=0;e<t.length;e++){const r=t[e];if(!r.geometry)continue;const[s,o]=r.geometry.coordinates,i=L(z(s)),a=L(U(o));n.push(i,a,1/0,e,-1,1),this.options.reduce&&n.push(0)}let i=this.trees[s+1]=this._createTree(n);e&&console.timeEnd(o);for(let t=s;t>=r;t--){const r=+Date.now();i=this.trees[t]=this._createTree(this._cluster(i,t)),e&&console.log("z%d: %d clusters in %dms",t,i.numItems,+Date.now()-r)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let r=((t[0]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,t[1]));let o=180===t[2]?180:((t[2]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,o=180;else if(r>o){const t=this.getClusters([r,s,180,n],e),i=this.getClusters([-180,s,o,n],e);return t.concat(i)}const i=this.trees[this._limitZoom(e)],a=i.range(z(r),U(n),z(o),U(s)),c=i.data,l=[];for(const t of a){const e=this.stride*t;l.push(c[e+5]>1?Z(c,e,this.clusterProps):this.points[c[e+3]])}return l}getChildren(t){const e=this._getOriginId(t),r=this._getOriginZoom(t),s="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(s);const n=o.data;if(e*this.stride>=n.length)throw new Error(s);const i=this.options.radius/(this.options.extent*Math.pow(2,r-1)),a=n[e*this.stride],c=n[e*this.stride+1],l=o.within(a,c,i),h=[];for(const e of l){const r=e*this.stride;n[r+4]===t&&h.push(n[r+5]>1?Z(n,r,this.clusterProps):this.points[n[r+3]])}if(0===h.length)throw new Error(s);return h}getLeaves(t,e,r){e=e||10,r=r||0;const s=[];return this._appendLeaves(s,t,e,r,0),s}getTile(t,e,r){const s=this.trees[this._limitZoom(t)],o=Math.pow(2,t),{extent:n,radius:i}=this.options,a=i/n,c=(r-a)/o,l=(r+1+a)/o,h={features:[]};return this._addTileFeatures(s.range((e-a)/o,c,(e+1+a)/o,l),s.data,e,r,o,h),0===e&&this._addTileFeatures(s.range(1-a/o,c,1,l),s.data,o,r,o,h),e===o-1&&this._addTileFeatures(s.range(0,c,a/o,l),s.data,-1,r,o,h),h.features.length?h:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e}_appendLeaves(t,e,r,s,o){const n=this.getChildren(e);for(const e of n){const n=e.properties;if(n&&n.cluster?o+n.point_count<=s?o+=n.point_count:o=this._appendLeaves(t,n.cluster_id,r,s,o):o<s?o++:t.push(e),t.length===r)break}return o}_createTree(t){const e=new k(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)e.add(t[r],t[r+1]);return e.finish(),e.data=t,e}_addTileFeatures(t,e,r,s,o,n){for(const i of t){const t=i*this.stride,a=e[t+5]>1;let c,l,h;if(a)c=$(e,t,this.clusterProps),l=e[t],h=e[t+1];else{const r=this.points[e[t+3]];c=r.properties;const[s,o]=r.geometry.coordinates;l=z(s),h=U(o)}const u={type:1,geometry:[[Math.round(this.options.extent*(l*o-r)),Math.round(this.options.extent*(h*o-s))]],tags:c};let p;p=a||this.options.generateId?e[t+3]:this.points[e[t+3]].id,void 0!==p&&(u.id=p),n.features.push(u)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:r,extent:s,reduce:o,minPoints:n}=this.options,i=r/(s*Math.pow(2,e)),a=t.data,c=[],l=this.stride;for(let r=0;r<a.length;r+=l){if(a[r+2]<=e)continue;a[r+2]=e;const s=a[r],h=a[r+1],u=t.within(a[r],a[r+1],i),p=a[r+5];let d=p;for(const t of u){const r=t*l;a[r+2]>e&&(d+=a[r+5])}if(d>p&&d>=n){let t=s*p,n=h*p,i,m=-1;const g=(r/l<<5)+(e+1)+this.points.length;for(const s of u){const c=s*l;if(a[c+2]<=e)continue;a[c+2]=e;const h=a[c+5];t+=a[c]*h,n+=a[c+1]*h,a[c+4]=g,o&&(i||(i=this._map(a,r,!0),m=this.clusterProps.length,this.clusterProps.push(i)),o(i,this._map(a,c)))}a[r+4]=g,c.push(t/d,n/d,1/0,g,-1,d),o&&c.push(m)}else{for(let t=0;t<l;t++)c.push(a[r+t]);if(d>1)for(const t of u){const r=t*l;if(!(a[r+2]<=e)){a[r+2]=e;for(let t=0;t<l;t++)c.push(a[r+t])}}}}return c}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,r){if(t[e+5]>1){const s=this.clusterProps[t[e+6]];return r?Object.assign({},s):s}const s=this.points[t[e+3]].properties,o=this.options.map(s);return r&&o===s?Object.assign({},o):o}}function Z(t,e,r){return{type:"Feature",id:t[e+3],properties:$(t,e,r),geometry:{type:"Point",coordinates:[N(t[e]),B(t[e+1])]}}}function $(t,e,r){const s=t[e+5],o=s>=1e4?`${Math.round(s/1e3)}k`:s>=1e3?Math.round(s/100)/10+"k":s,n=t[e+6],i=-1===n?{}:Object.assign({},r[n]);return Object.assign(i,{cluster:!0,cluster_id:t[e+3],point_count:s,point_count_abbreviated:o})}function z(t){return t/360+.5}function U(t){const e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function N(t){return 360*(t-.5)}function B(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function D(t,e){var r={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(r[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,s=Object.getOwnPropertySymbols(t);o<s.length;o++)e.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(r[s[o]]=t[s[o]]);return r}class R{static isAdvancedMarkerAvailable(t){return google.maps.marker&&!0===t.getMapCapabilities().isAdvancedMarkersAvailable}static isAdvancedMarker(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}static setMap(t,e){this.isAdvancedMarker(t)?t.map=e:t.setMap(e)}static getPosition(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(t.position.lat&&t.position.lng)return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}static getVisible(t){return!!this.isAdvancedMarker(t)||t.getVisible()}}class W{constructor({markers:t,position:e}){this.markers=t,e&&(e instanceof google.maps.LatLng?this._position=e:this._position=new google.maps.LatLng(e))}get bounds(){if(0===this.markers.length&&!this._position)return;const t=new google.maps.LatLngBounds(this._position,this._position);for(const e of this.markers)t.extend(R.getPosition(e));return t}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter((t=>R.getVisible(t))).length}push(t){this.markers.push(t)}delete(){this.marker&&(R.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}const F=(t,e,r,s)=>{const o=G(t.getBounds(),e,s);return r.filter((t=>o.contains(R.getPosition(t))))},G=(t,e,r)=>{const{northEast:s,southWest:o}
2=Y(t,e),n=H({northEast:s,southWest:o},r);return J(n,e)},K=(t,e,r)=>{const s=G(t,e,r),o=s.getNorthEast(),n=s.getSouthWest();return[n.lng(),n.lat(),o.lng(),o.lat()]},V=(t,e)=>{const r=6371,s=(e.lat-t.lat)*Math.PI/180,o=(e.lng-t.lng)*Math.PI/180,n=Math.sin(s/2),i=Math.sin(o/2),a=n*n+Math.cos(t.lat*Math.PI/180)*Math.cos(e.lat*Math.PI/180)*i*i,c=void 0;return r*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))},Y=(t,e)=>({northEast:e.fromLatLngToDivPixel(t.getNorthEast()),southWest:e.fromLatLngToDivPixel(t.getSouthWest())}),H=({northEast:t,southWest:e},r)=>(t.x+=r,t.y-=r,e.x-=r,e.y+=r,{northEast:t,southWest:e}),J=({northEast:t,southWest:e},r)=>{const s=r.fromDivPixelToLatLng(e),o=r.fromDivPixelToLatLng(t);return new google.maps.LatLngBounds(s,o)};class q{constructor({maxZoom:t=16}){this.maxZoom=t}noop({markers:t}){return X(t)}}class Q extends q{constructor(t){var{viewportPadding:e=60}=t,r;super(D(t,["viewportPadding"])),this.viewportPadding=60,this.viewportPadding=e}calculate({markers:t,map:e,mapCanvasProjection:r}){return e.getZoom()>=this.maxZoom?{clusters:this.noop({markers:t}),changed:!1}:{clusters:this.cluster({markers:F(e,r,t,this.viewportPadding),map:e,mapCanvasProjection:r})}}}const X=t=>{const e=void 0;return t.map((t=>new W({position:R.getPosition(t),markers:[t]})))};class tt extends Q{constructor(t){var{maxDistance:e=4e4,gridSize:r=40}=t,s;super(D(t,["maxDistance","gridSize"])),this.clusters=[],this.state={zoom:-1},this.maxDistance=e,this.gridSize=r}calculate({markers:t,map:e,mapCanvasProjection:r}){const s={zoom:e.getZoom()};let o=!1;return this.state.zoom>=this.maxZoom&&s.zoom>=this.maxZoom||(o=!f()(this.state,s)),this.state=s,e.getZoom()>=this.maxZoom?{clusters:this.noop({markers:t}),changed:o}:{clusters:this.cluster({markers:F(e,r,t,this.viewportPadding),map:e,mapCanvasProjection:r})}}cluster({markers:t,map:e,mapCanvasProjection:r}){return this.clusters=[],t.forEach((t=>{this.addToClosestCluster(t,e,r)})),this.clusters}addToClosestCluster(t,e,r){let s=this.maxDistance,o=null;for(let e=0;
2e<this.clusters.length;e++){const r=this.clusters[e],n=V(r.bounds.getCenter().toJSON(),R.getPosition(t).toJSON());n<s&&(s=n,o=r)}if(o&&G(o.bounds,r,this.gridSize).contains(R.getPosition(t)))o.push(t);else{const e=new W({markers:[t]});this.clusters.push(e)}}}class et extends q{constructor(t){var e;super(D(t,[]))}calculate({markers:t,map:e,mapCanvasProjection:r}){return{clusters:this.cluster({markers:t,map:e,mapCanvasProjection:r}),changed:!1}}cluster(t){return this.noop(t)}}class rt extends q{constructor(t){var{maxZoom:e,radius:r=60}=t,s=D(t,["maxZoom","radius"]);super({maxZoom:e}),this.state={zoom:-1},this.superCluster=new T(Object.assign({maxZoom:this.maxZoom,radius:r},s))}calculate(t){let e=!1;const r={zoom:t.map.getZoom()};if(!f()(t.markers,this.markers)){e=!0,this.markers=[...t.markers];const r=this.markers.map((t=>{const e=R.getPosition(t),r=void 0;return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}}));this.superCluster.load(r)}return e||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(e=!f()(this.state,r)),this.state=r,e&&(this.cluster
2s=this.cluster(t)),{clusters:this.clusters,changed:e}}cluster({map:t}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(t.getZoom())).map((t=>this.transformCluster(t)))}transformCluster({geometry:{coordinates:[t,e]},properties:r}){if(r.cluster)return new W({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map((t=>t.properties.marker)),position:{lat:e,lng:t}});const s=r.marker;return new W({markers:[s],position:R.getPosition(s)})}}class st extends Q{constructor(t){var{maxZoom:e,radius:r=60,viewportPadding:s=60}=t,o=D(t,["maxZoom","radius","viewportPadding"]);super({maxZoom:e,viewportPadding:s}),this.superCluster=new T(Object.assign({maxZoom:this.maxZoom,radius:r},o)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(t){const e={zoom:Math.round(t.map.getZoom()),view:K(t.map.getBounds(),t.mapCanvasProjection,this.viewportPadding)};let r=!f()(this.state,e);if(!f()(t.markers,this.markers)){r=!0,this.markers=[...t.markers];const e=this.markers.map((t=>{const e=R.getPosition(t),r=void 0;return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}}));this.superCluster.load(e)}
2return r&&(this.clusters=this.cluster(t),this.state=e),{clusters:this.clusters,changed:r}}cluster({map:t,mapCanvasProjection:e}){const r={zoom:Math.round(t.getZoom()),view:K(t.getBounds(),e,this.viewportPadding)};return this.superCluster.getClusters(r.view,r.zoom).map((t=>this.transformCluster(t)))}transformCluster({geometry:{coordinates:[t,e]},properties:r}){if(r.cluster)return new W({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map((t=>t.properties.marker)),position:{lat:e,lng:t}});const s=r.marker;return new W({markers:[s],position:R.getPosition(s)})}}class ot{constructor(t,e){this.markers={sum:t.length};const r=e.map((t=>t.count)),s=r.reduce(((t,e)=>t+e),0);this.clusters={count:e.length,markers:{mean:s/e.length,sum:s,min:Math.min(...r),max:Math.max(...r)}}}}class nt{render({count:t,position:e},r,s){const o=void 0,n=`<svg fill="${t>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">\n<circle cx="120" cy="120" opacity=".6" r="70" />\n<circle cx="120" cy="120" opacity=".3" r="90" />\n<circle cx="120" cy="120" opacity=".2" r="110" />\n<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${t}</text>\n</svg>`,i=`Cluster of ${t} markers`,a=Number(google.maps.Marker.MAX_ZINDEX)+t;if(R.isAdvancedMarkerAvailable(s)){const t=void 0,r=(new DOMParser).parseFromString(n,"image/svg+xml").documentElement;r.setAttribute("transform","translate(0 25)");const o={map:s,position:e,zIndex:a,title:i,content:r};return new google.maps.marker.AdvancedMarkerElement(o)}const c={position:e,zIndex:a,title:i,icon:{url:`data:image/svg+xml;base64,${btoa(n)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(c)}}function it(t,e){for(let r in e.prototype)t.prototype[r]=e.prototype[r]}class at{constructor(){it(at,google.maps.OverlayView)}}var ct;!function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"}(ct||(ct={}));const lt=(t,e,r)=>{r.fitBounds(e.bounds)};class ht extends at{constructor({map:t,markers:e=[],algorithmOptions:r={},algorithm:s=new rt(r),renderer:o=new nt,onClusterClick:n=lt}){super(),this.markers=[...e],this.clusters=[],this.algorithm=s,this.renderer=o,this.onClusterClick=n,t&&this.setMap(t)}addMarker(t,e){this.markers.includes(t)||(this.markers.push(t),e||this.render())}addMarkers(t,e){t.forEach((t=>{this.addMarker(t,!0)})),e||this.render()}removeMarker(t,e){const r=this.markers.indexOf(t);return-1!==r&&(R.setMap(t,null),this.markers.splice(r,1),e||this.render(),!0)}removeMarkers(t,e){let r=!1;return t.forEach((t=>{r=this.removeMarker(t,!0)||r})),r&&!e&&this.render(),r}clearMarkers(t){this.markers.length=0,t||this.render()}render(){const t=this.getMap();if(t instanceof google.maps.Map&&t.getProjection()){google.maps.event.trigger(this,ct.CLUSTERING_BEGIN,this);const{clusters:e,changed:r}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});if(r||null==r){const t=new Set;for(const r of e)1==r.markers.length&&t.add(r.markers[0]);const r=[];for(const e of this.clusters)null!=e.marker&&(1==e.markers.length?t.has(e.marker)||R.setMap(e.marker,null):r.push(e.marker));this.clusters=e,this.renderClusters(),requestAnimationFrame((()=>r.forEach((t=>R.setMap(t,null)))))}google.maps.event.trigger(this,ct.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach((t=>R.setMap(t,null))),this.clusters.forEach((t=>t.delete())),this.clusters=[]}renderClusters(){const t=new ot(this.markers,this.clusters),e=this.getMap();this.clusters.forEach((r=>{1===r.markers.length?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,t,e),r.markers.forEach((t=>R.setMap(t,null))),this.onClusterClick&&r.marker.addListener("click",(t=>{google.maps.event.trigger(this,ct.CLUSTER_CLICK,r),this.onClusterClick(t,r,e)}))),R.setMap(r.marker,e)}))}}var ut=r(94450);const pt=t=>{const e=/[^.]+((-[0-9]+)(\.test|stage))?\.(local[a-z0-9]*-)?(invia|travelplanet)\.[a-z]{2,3}/,r=window.location.host.match(e)??[],s=void 0,o=void 0;return`https://scontent${r[1]??""}.${r[4]??""}inviacdn.net/${dt(t)}`},dt=t=>
2t?t.replace(/^\/?(.*)$/,"$1"):"",mt=pt("invia2020/img/bg/map-marker.svg"),gt="position: relative; display: flex; align-items: center; justify-content: center;",ft="width: 41px; height: 60px;",yt="position: absolute; color: white; font-size: 14px; font-weight: bold; top:15px;";function wt(t){const e=document.createElement("div");e.setAttribute("style",gt);const r=document.createElement("img");r.src=mt,r.setAttribute("style",ft);const s=document.createElement("span");return s.textContent=String(t),s.setAttribute("style",yt),e.appendChild(r),e.appendChild(s),e}class vt extends nt{render(t){return new google.maps.marker.AdvancedMarkerElement({position:t.position,content:wt(t.markers.length)})}}var kt=r(64060),bt=r(81958);const xt=bt.Ik({id:bt.ai().positive(),lat:bt.ai(),lng:bt.ai(),city:bt.Yj().optional(),street:bt.Yj().optional(),zip:bt.Yj().optional(),url:bt.Yj().url().optional()}),Mt=bt.YO(xt);var It=r(85452);async function Et(t){const e=(0,m.N)(),r=await It.Ay.post(t,{json:e}).json();return Mt.parse(r)}async function Pt(t){const e=await It.Ay.get(t).json();return Mt.parse(e)}async function Lt(t,e){const r=void 0;return await It.Ay.post("/search-results/hotels-map/ajax-filter-hotels-by-search-preferences",{json:{searchPreferences:e,hotels:t}}).json()}function Ct(){switch(ut.wI.domainId){case ut.WI.InviaCz:return"AIzaSyBusbCMRcHoZZGS2zw3jCiD6mDKGCtVrd8";case ut.WI.InviaSk:return"AIzaSyAOMfyoSKxsUVdvPrqJ2tDSK85TjkBR8NY";case ut.WI.TravelplanetPl:case ut.WI.WakacyjniPiraciPl:return"AIzaSyA-EAQZgbVnixUuiEsKYoBhtKOoA4-YmsE";case ut.WI.InviaHu:return"AIzaSyDisNI0SLCahxgVkK5hGaOPrLMlxXh0Vpw";default:throw new Error(`Google Maps API key not found for domain: ${ut.wI.domainId}`)}}function At(t,e,r){t.infoBox&&t.infoBox.close(),t.infoBox=new google.maps.InfoWindow({content:e}),t.infoBox.open(t.mapInstance,r)}function _t(t,e,r){return()=>{t.infoBox&&t.infoBox.close();const s=`\n            <strong>${(0,d.T)("invia_cz")} ${e.city}</strong><br>\n            ${e.street}<br>\n            ${e.zip}, ${e.city}<br>\n            ${e.url?`<a href="${e.url}" target="_blank">${(0,d.T)("js:detail")}</a>`:""}\n        `;t.infoBox=new google.maps.InfoWindow({content:s}),t.infoBox.open(t.mapInstance,r)}}function St(t,e,r,s){return o=>{o.stopPropagation&&(o.stopPropagation(),o.preventDefault());const n=(0,m.N)();n.nl_hotel_id_autocomplete="",n.nl_hotel_id=e.id.toString(),p(s,n).then((e=>At(t,e,r))).catch((t=>{(0,kt.Cp)(t)}))}}function jt(t,e,r){const s=new google.maps.LatLngBounds;for(const t of e)s.extend(new google.maps.LatLng(t.lat,t.lng));const o=void 0,n=Bt(s,{height:r.offsetHeight,width:r.offsetWidth});t?.mapInstance.setCenter(s.getCenter()),t?.mapInstance.setZoom(n)}function Ot(t,e){for(const r of t.rawMarkersData){if(!r.lat||!r.lng)continue;const s=new google.maps.LatLng(r.lat,r.lng),o=new google.maps.marker.AdvancedMarkerElement({position:s,content:Zt(t.markerImageUrl),gmpClickable:!0}),n=e.showHotelsList?St(t,r,o,e.infoBoxAjaxURL):_t(t,r,o);o.addEventListener("gmp-click",n),t.markers.set(r.id,o)}const r=Array.from(t.markers.values()),s=new ht({map:t.mapInstance,markers:r,renderer:new vt,algorithm:new rt({radius:60,extent:256})});return s.render(),Nt(t.mapInstance,r),s}function Tt(t,e){const r=void 0;new google.maps.InfoWindow({content:`<b>${e}</b>`,position:t.center}).open(t.mapInstance)}function Zt(t){const e=document.createElement("img");return e.src=t,e}function $t(t){return new google.maps.marker.AdvancedMarkerElement({position:t.center,map:t.mapInstance,content:Zt(t.markerImageUrl)})}function zt(t){return Object.values(google.maps.MapTypeId).includes(t.mapType)?t.mapType:google.maps.MapTypeId.ROADMAP}function Ut(t){return{zoomControl:!t.disableZoom,scaleControl:!t.disableZoom,fullscreenControl:!t.disableZoom,streetViewControl:!t.disableStreetViewControl}}function Nt(t,e){const r=new google.maps.LatLngBounds;e.forEach((t=>{r.extend(t.position)})),t.fitBounds(r);const s=t.getZoom();t.setZoom(s-2),t.setZoom(s)}function Bt(t,e){const r=256,s=256,o=21;function n(t){const e=Math.sin(t*Math.PI/180),r=Math.log((1+e)/(1-e))/2;return Math.max(Math.min(r,Math.PI),-Math.PI)/2}function i(t,e,r){return Math.floor(Math.log(t/e/r)/Math.LN2)}
2const a=t.getNorthEast(),c=t.getSouthWest(),l=(n(a.lat())-n(c.lat()))/Math.PI,h=a.lng()-c.lng(),u=(h<0?h+360:h)/360,p=i(e.height,r,l),d=i(e.width,s,u);return Math.min(p,d,o)}async function Dt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const s=Array.from(t.markers.keys()),o=(0,m.N)(),n=Wt(s,e),i=new Set;async function a(e){try{const r=await Lt(e,o),s=void 0;e.filter((t=>!r.includes(t))).forEach((e=>Rt(t,e)))}catch(t){(0,kt.Cp)(t)}}for(const t of n){const e=a(t);i.add(e),e.finally((()=>i.delete(e))),i.size>=r&&await Promise.race(i)}await Promise.all(i)}function Rt(t,e){const r=t.markers.get(e);void 0!==r&&(r.content=Zt(t.disabledMarkerImageUrl),r.gmpClickable=!1)}function Wt(t,e){const r=[];for(let s=0;s<t.length;s+=e)r.push(t.slice(s,s+e));return r}var Ft=r(27384),Gt=r(50253),Kt=r(33258);const Vt={version:"3.60"},Yt=3;function Ht(){let t;return new h({...Vt,...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},apiKey:Ct()})}async function Jt(t,e){try{(0,Ft.iQ)(t,"map--google");const r=Ht();await r.importLibrary("maps");const s={mapInstance:null,center:null,rawMarkersData:null,markers:new Map,markerImageUrl:pt(`invia2020/img/bg/${e.markerImage||"map-marker-hotel"}.svg`),disabledMarkerImageUrl:pt(`invia2020/img/bg/${e.markerImage||"map-marker-hotel-disabled"}.svg`),infoBox:null};let o=0,n=0;e.centerLng&&e.centerLat&&(o=e.centerLng,n=e.centerLat),s.center=new google.maps.LatLng(n,o);const i={...Ut(e),center:s.center,zoom:e.zoomLevel??3,mapTypeId:zt(e),mapId:"cfd9435103395a8d"};if(s.mapInstance=new google.maps.Map(t,i),s.mapInstance.addListener("click",(()=>{s.infoBox&&s.infoBox.close()})),e.boundsNELng&&e.boundsNELat&&e.boundsSWLng&&e.boundsSWLat&&jt(s,[{lng:e.boundsNELng,lat:e.boundsNELat},{lng:e.boundsSWLng,lat:e.boundsSWLat}],t),(e.showMarker||e.ajaxURL)&&await r.importLibrary("marker"),e.showMarker&&$t(s),e.caption&&Tt(s,e.caption),e.showHotelsList&&(0,Ft.iQ)(t,"map--hotel-infobox"),e.ajaxURL){Gt.W(t);const r=(0,Kt.M)(),o="serp"===r,n=o||"destination_lp"===r||"city_lp"===r;s.rawMarkersData=n?await Et(e.ajaxURL):await Pt(e.ajaxURL),Ot(s,e),o&&Dt(s)}}catch(t){(0,kt.Cp)(t)}finally{Gt.j(t)}}class qt extends s.xI{static targets=["wrap"];connect(){const t=this.data.get("options").replace(/\\"/g,'"').replace(/"{/g,"{").replace(/}"/g,"}").replace(/(\d),(\d)/g,"$1.$2"),e=JSON.parse(t);Jt(this.wrapTarget,e)}}},66042(t){t.exports=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var s,o,n;if(Array.isArray(e)){if((s=e.length)!=r.length)return!1;for(o=s;0!==o--;)if(!t(e[o],r[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((s=(n=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(o=s;0!==o--;)if(!Object.prototype.hasOwnProperty.call(r,n[o]))return!1;for(o=s;0!==o--;){var i=n[o];if(!t(e[i],r[i]))return!1}return!0}return e!=e&&r!=r}}}]);
3//# sourceMappingURL=5085.af713c89c3466f7176d2.chunk.js.map

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.