1"use strict";(self.webpackChunklib=self.webpackChunklib||[]).push([[5972],{31134:(t,e,r)=>{r.d(e,{A:()=>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}}},95972:(t,e,r)=>{r.r(e),r.d(e,{StatsAdapter:()=>m});var n=r(31134),i=r(4754),o="".concat(window.location.protocol,"//").concat(window.location.host,"/"),a=["h","labelData","url"];function l(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 c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function s(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d(t,e,r){h(t,e),e.set(t,r)}function h(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function u(t,e,r){return t.set(p(t,e),r),r}function f(t,e){return t.get(p(t,e))}function p(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}var v=new WeakMap,g=new WeakMap,b=new WeakMap,y=new WeakSet;class m extends n.A{constructor(){var t,e;super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),h(t=this,e=y),e.add(t),d(this,v,"Stats"),d(this,g,null),d(this,b,{})}init(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return this.config=c(c({},this.config),t),this.initialized=!1!==this.config.enabled,this.config.debug&&console.log("[".concat(f(v,this),"] Provider initialized"),this.config),this.initialized}catch(t){return console.error("[".concat(f(v,this),"] 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(f(v,this),"] Adapter not ready, skipping event:"),{category:t,action:e,data:r}),!1;try{var n,{h:l,labelData:s,url:d}=r,h=function(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],e.includes(r)||{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(r,a),u=s?p(y,this,w).call(this,h,s):p(y,this,w).call(this,h),g=c({category:t,action:e,h:l||(null===(n=travel)||void 0===n||null===(n=n.options)||void 0===n?void 0:n.hotelExtId),labelData:u},d&&{url:d});return this.config.debug&&console.log("[".concat(f(v,this),"] Sending event:"),g),(t=>{var{h:e,category:r,action:n,labelData:a,url:l=o}=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,i.A)(c),keepalive:!0})})(g),!0}catch(t){return console.error("[".concat(f(v,this),"] Failed to send event:"),t),!1}}checkUserChanged(){if(!this.isReady())return!1;try{var t=p(y,this,O).call(this),e=f(g,this)&&f(g,this)!==t;return u(g,this,t),e&&this.config.debug&&console.log("[".concat(f(v,this),"] User
1changed from ").concat(f(g,this)," to ").concat(t)),e}catch(t){return console.error("[".concat(f(v,this),"] 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=c(c({},JSON.parse(localStorage.getItem("stats_global_props")||"{}")),t);localStorage.setItem("stats_global_props",JSON.stringify(e))}return u(b,this,c(c({},f(b,this)),t)),this.config.debug&&console.log("[".concat(f(v,this),"] Global properties added:"),t),!0}catch(t){return console.error("[".concat(f(v,this),"] Failed to add global properties:"),t),!1}}}function w(){var t,e,r,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(o){var a=c({},i);delete a.labelString,delete a.href;var l=Object.keys(a).length>0?JSON.stringify(a):"null";return"".concat(o,"||").concat(l)}var s=(null===(t=travel)||void 0===t||null===(t=t.options)||void 0===t?void 0:t.siteId)||"",d=(null===(e=travel)||void 0===e||null===(e=e.options)||void 0===e?void 0:e.objectId)||"",h=(null===(r=window)||void 0===r||null===(r=r.location)||void 0===r?void 0:r.origin)||"",u=(null===(n=travel)||void 0===n||null===(n=n.options)||void 0===n||null===(n=n.btest)||void 0===n?void 0:n.id)||!1,f=Object.keys(i).length>0?JSON.stringify(i):"null";return"".concat(s,"||").concat(d,"||").concat(h,"||").concat(u,"||").concat(f)}function O(){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.