1(self.webpackChunklib=self.webpackChunklib||[]).push([[8463],{9504:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});class n{constructor(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t,this.initialized=!1}init(){throw new Error("init() method must be implemented by adapter")}sendEvent(t,e){throw new Error("sendEvent() method must be implemented by adapter")}checkUserChanged(){throw new Error("checkUserChanged() method must be implemented by adapter")}addGlobalProperties(){throw new Error("addGlobalProperties() method must be implemented by adapter")}destroy(){this.initialized=!1}isReady(){return this.initialized}}},8463:(t,e,r)=>{"use strict";r.r(e),r.d(e,{StatsAdapter:()=>O});var n=r(9504),o=r(8509),i="".concat(window.location.protocol,"//").concat(window.location.host,"/"),a=["h","labelData","url"];function l(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){d(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function d(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,g(t,e,"set"),r),r}function u(t,e,r){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return r}function p(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,g(t,e,"get"))}function g(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}var f=new WeakMap,v=new WeakMap,b=new WeakMap,y=new WeakSet,w=new WeakSet;class O extends n.Z{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),w.add(this),y.add(this),f.set(this,{writable:!0,value:"Stats"}),v.set(this,{writable:!0,value:null}),b.set(this,{writable:!0,value:{}})}init(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return this.config=s(s({},this.config),t),this.initialized=!1!==this.config.enabled,this.config.debug&&console.log("[".concat(p(this,f),"] Provider initialized"),this.config),this.initialized}catch(t){return console.error("[".concat(p(this,f),"] Initialization failed:"),t),!1}}sendEvent(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.isReady())return this.config.debug&&console.warn("[".concat(p(this,f),"] Adapter not ready, skipping event:"),{category:t,action:e,data:r}),!1;try{var n,c,{h:d,labelData:h,url:g}=r,v=l(r,a),b=h?u(this,y,m).call(this,v,h):u(this,y,m).call(this,v),w=s({category:t,action:e,h:d||(null===(n=travel)||void 0===n||null===(c=n.options)||void 0===c?void 0:c.hotelExtId),labelData:b},g&&{url:g});return this.config.debug&&console.log("[".concat(p(this,f),"] Sending event:"),w),(t=>{var{h:e,category:r,action:n,labelData:a,url:l=i}=t,c={page:"stat",t:"ev",h:e,c:r,a:n,l:a,r:Math.floor(1e5*Math.random())};fetch(l,{method:"POST",body:(0,o.Z)(c),keepalive:!0})})(w),!0}catch(t){return console.error("[".concat(p(this,f),"] Failed to send event:"),t),!1}}checkUserChanged(){if(!this.isReady())return!1;try{var t=u(this,w,k).call(this),e=p(this,v)&&p(this,v)!==t;return h(this,v,t),e&&this.config.debug&&console.log("[".concat(p(this,f),"] User changed from ").concat(p(this,v)," to ").concat(t)),e}catch(t){return console.error("[".concat(p(this,f),"] Failed to check user change:"),t),!1}}addGlobalProperties(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isReady())return!1;try{if("undefined"!=typeof localStorage){var e=s(s({},JSON.parse(localStorage.getItem("stats_global_props")||"{}")),t);localStorage.setItem("stats_global_props",JSON.stringify(e))}return h(this,b,s(s({},p(this,b)),t)),this.config.debug&&console.log("[".concat(p(this,f),"] Global properties added:"),t),!0}catch(t){return console.error("[".concat(p(this,f),"] Failed to add global properties:"),t),!1}}}function m(){var t,e,r,n,o,i,a,l,c,d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(h){var u=s({},d);delete u.labelString,delete u.href;var p=Object.keys(u).length>0?JSON.stringify(u):"null";return"".concat(h,"||").concat(p)}var g=(null===(t=travel)||void 0===t||null===(e=t.options)||void 0===e?void 0:e.siteId)||"",f=(null===(r=travel)||void 0===r||null===(n=r.options)||void 0===n?void 0:n.objectId)||"",v=(null===(o=window)||void 0===o||null===(i=o.location)||void 0===i?void 0:i.origin)||"",b=(null===(a=travel)||void 0===a||null===(l=a.options)||void 0===l||null===(c=l.btest)||void 0===c?void 0:c.id)||!1,y=Object.keys(d).length>0?JSON.stringify(d):"null";return"".concat(g,"||").concat(f,"||").concat(v,"||").concat(b,"||").concat(y)}function k(){return travel.options.track||null}}}]);
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.