1"use strict";(self.webpackChunklib=self.webpackChunklib||[]).push([[368],{2368:(e,t,r)=>{r.r(t),r.d(t,{initSharedDestScrollLocker:()=>A,initSharedHotelScrollLocker:()=>T});var n=r(3276),o=r(6391),i=r(3755),l="locker-scroll",c=()=>{var e=(0,i.pH)(l);e&&((0,i.vw)(l),requestAnimationFrame(()=>{var{scrollHeight:t,clientHeight:r}=document.documentElement,n=Math.round((t-r)*e/100);window.scrollTo(0,n)}))},a=r(5069);function s(e,t){u(e,t),t.add(e)}function u(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function d(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,p(e,t,"set"),r),r}function p(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function f(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var v=new WeakMap,h=new WeakSet,b=new WeakSet;class w extends a.A{constructor(){var e,t,r;super(),s(this,b),s(this,h),r={writable:!0,value:!1},u(e=this,t=v),t.set(e,r),window.addEventListener("scroll",f(this,h,m).bind(this),{passive:!0})}}function m(){var e;(function(e,t){return t.get?t.get.call(e):t.value})(e=this,p(e,v,"get"))||(d(this,v,!0),requestAnimationFrame(()=>{this.emit("scroll",{scrollPercent:f(this,b,y).call(this)}),d(this,v,!1)}))}function y(){var e=window.scrollY,t=document.documentElement.scrollHeight-document.documentElement.clientHeight;return t>0?Math.round(e/t*100):0}var k=new w,g=(e,t)=>{if("number"!=typeof e)throw new Error("initPromoScroll: threshold must be a number, got ".concat(e));k.on("scroll",r=>{var{scrollPercent:n}=r;n<e||((e=>{(0,i.LI)(l,e)})(n),t())})},O=r(3839),P=r(917),j=r(3122);function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach(function(t){C(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var S="scroll-locker",I=12,T=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c();var{scrollPercent:r=I}=t;if(e&&!(0,P.f)()){var i=(0,n.zG)(),l=(0,o.A)(_(_({},travel.isMobile()&&{subdomain:"sp"}),{},{label_type:S,event_id:i})),a=(0,n.ux)({type:"scroll-locker-clicktrip",event_id:i,href:encodeURIComponent(l),adults:"2",children:"0"}),s=()=>{window.open(location.href,"_blank"),location.href=l},u=()=>{(0,j.F)(_({h:travel.options.hotelExtId,labelData:(0,n.Ay)({type:"locker-clicktrip"},l)},a))};g(r,()=>{(0,P.f)()||((0,O.d)({view:e,onBeforeClose:u,onClose:s}),e.open())})}},A=function(e){var t,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c();var{scrollPercent:l=I}=i;if(e&&!(0,P.f)()&&null!==(t=travel.options.clickTrip)&&void 0!==t&&t.cityId){var a=(0,n.zG)(),s=(0,o.A)(_(_({},travel.isMobile()&&{subdomain:"sp"}),{},{label_type:S,city_id:null===(r=travel.options.clickTrip)||void 0===r?void 0:r.cityId,event_id:a})),u=(0,n.ux)({type:"scroll-locker-clicktrip",event_id:a,href:encodeURIComponent(s),adults:"2",children:"0"}),d=()=>{window.open(location.href,"_blank"),location.href=s},p=()=>{var e;(0,j.F)(_({h:travel.options.hotelExtId,labelData:(0,n.Ay)({type:"locker-clicktrip",city_id:(null===(e=travel.options.clickTrip)||void 0===e?void 0:e.cityId)||""},s)},u))};g(l,()=>{(0,P.f)()||((0,O.d)({view:e,onBeforeClose:p,onClose:d}),e.open())})}}}}]);
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.