/*! For license information please see desktop.69be94c7.js.LICENSE.txt */ (()=>{var e,t,n={648:(e,t,n)=>{var o={"./bestday/bestday.min.css":[705,855],"./falabella/falabella.min.css":[677,919],"./viajanet/viajanet.min.css":[299,245]};function i(e){if(!n.o(o,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=o[e],i=t[0];return n.e(t[1]).then((()=>n(i)))}i.keys=()=>Object.keys(o),i.id=648,e.exports=i}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,i),r.exports}i.m=n,i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>"js/"+{245:"viajanet-viajanet-min-css",855:"bestday-bestday-min-css",919:"falabella-falabella-min-css"}[e]+"."+{245:"de45e15a",855:"5d91c1a2",919:"fe0e2d3e"}[e]+".js",i.miniCssF=e=>"css/"+{245:"viajanet-viajanet-min-css",855:"bestday-bestday-min-css",919:"falabella-falabella-min-css"}[e]+"."+{245:"de45e15a",855:"5d91c1a2",919:"fe0e2d3e"}[e]+".css",i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="shifu:",i.l=(n,o,r,a)=>{if(e[n])e[n].push(o);else{var c,u;if(void 0!==r)for(var l=document.getElementsByTagName("script"),s=0;s{c.onerror=c.onload=null,clearTimeout(h);var i=e[n];if(delete e[n],c.parentNode&&c.parentNode.removeChild(c),i&&i.forEach((e=>e(o))),t)return t(o)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=d.bind(null,c.onerror),c.onload=d.bind(null,c.onload),u&&document.head.appendChild(c)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.p="{0}/shifu/static/",(()=>{if("undefined"!=typeof document){var e={97:0};i.f.miniCss=(t,n)=>{e[t]?n.push(e[t]):0!==e[t]&&{245:1,855:1,919:1}[t]&&n.push(e[t]=(e=>new Promise(((t,n)=>{var o=i.miniCssF(e),r=i.p+o;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),o=0;o{var a=document.createElement("link");a.rel="stylesheet",a.type="text/css",i.nc&&(a.nonce=i.nc),a.onerror=a.onload=n=>{if(a.onerror=a.onload=null,"load"===n.type)o();else{var i=n&&n.type,c=n&&n.target&&n.target.href||t,u=new Error("Loading CSS chunk "+e+" failed.\n("+i+": "+c+")");u.name="ChunkLoadError",u.code="CSS_CHUNK_LOAD_FAILED",u.type=i,u.request=c,a.parentNode&&a.parentNode.removeChild(a),r(u)}},a.href=t,document.head.appendChild(a)})(e,r,0,t,n)})))(t).then((()=>{e[t]=0}),(n=>{throw delete e[t],n})))}}})(),(()=>{var e={97:0};i.f.j=(t,n)=>{var o=i.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else{var r=new Promise(((n,i)=>o=e[t]=[n,i]));n.push(o[2]=r);var a=i.p+i.u(t),c=new Error;i.l(a,(n=>{if(i.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var r=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;c.message="Loading chunk "+t+" failed.\n("+r+": "+a+")",c.name="ChunkLoadError",c.type=r,c.request=a,o[1](c)}}),"chunk-"+t,t)}};var t=(t,n)=>{var o,r,[a,c,u]=n,l=0;if(a.some((t=>0!==e[t]))){for(o in c)i.o(c,o)&&(i.m[o]=c[o]);u&&u(i)}for(t&&t(n);l{"use strict";const e={push:function(e){null!=e&&"dataLayer"in window&&window.dataLayer&&"push"in window.dataLayer&&window.dataLayer.push(e)}};function t(e,t){"string"==typeof e&&void 0!==window.newrelic&&"function"==typeof window.newrelic.addPageAction&&(t=t||{},newrelic.addPageAction(e,t))}function n(e,n){null!=e&&window.ShifuConfig.pageviewId?(e.pageview_id=window.ShifuConfig.pageviewId,function(e){var t=new XMLHttpRequest;t.open("POST","/hermes-service/topic/shifu",!0),t.setRequestHeader("Content-Type","application/json"),t.send(JSON.stringify(e))}(e)):("track-init"==n&&!window.ShifuConfig.trackInitFailed||t("invalidShifuPush",{error:null==e?"NullShifuObject":"EmptyPageviewId",country:window.ShifuConfig.country,location:window.location.href,version:window.ShifuConfig.version,isAgency:window.ShifuConfig.partner.isAgency,isWL:window.ShifuConfig.partner.isWL,trackingId:n||"undefined",ab:JSON.stringify(window.ShifuConfig.ab),initFailedTwice:window.ShifuConfig.trackInitFailed}),"track-init"==n&&window.ShifuConfig.setTrackInitFailed())}function o(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}const r={isMobile:function(){var e=o();return 0<=e&&e<768},isTablet:function(){var e=o();return 768<=e&&e<1024},isDesktop:function(){return 1024<=o()}};var a=function(e,t,o){if(e&&(t||o)){var i="over"===o.type?"mouseover":"click";e.addEventListener(i,(function(t){"_blank"!==e.target&&e.href?(t.preventDefault(),n(o),!e.getAttribute("product")&&e.href&&(window.location=e.href)):n(o)}))}};const c=function(e,t,n){for(var o=e.getElementsByTagName("a"),i=0;i=0||document.cookie.indexOf("loggedLevel1=")>=0,t=document.cookie.indexOf("dss2=")>=0||document.cookie.indexOf("loggedLevel2=")>=0,n=document.cookie.indexOf("wl_session=")>=0||document.cookie.indexOf("wl_logged")>=0,o="NOT_LOGGED";return t?o="FULL_ACCESS":e?o="FCOMP-1557_FixMongoCache":n&&(o="LOGGED_WITH_WL_SESSION"),o}function m(e){t("shifuLocalStorageException",{error:e,product:window.product||null,url:window.location.href,navigator:navigator.userAgent})}function b(e){try{return JSON.parse(localStorage.getItem(e))}catch(e){return m(e),null}}function S(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(e){return m(e),null}}var C="shifuNotificationCounter";function L(e){return C+"_"+("NOT_LOGGED"===e?"not-logged":"logged")}var E=30,x="readedAt";function k(e,t,n){if("true"!==window.ShifuConfig.partner.isWL){var o=L(y()),i=(r=x,a=E,(c=b(o))?(void 0!==c[r]&&function(e,t,n){if("number"!=typeof e[t])return!0;var o=new Date;return o.setDate(o.getDate()+n),o=0;--r){var a=this.tryEntries[r],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(u&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var i=o.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:N(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),v}},t}function A(e,t,n,o,i,r,a){try{var c=e[r](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(o,i)}function j(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var r=e.apply(t,n);function a(e){A(r,o,i,a,c,"next",e)}function c(e){A(r,o,i,a,c,"throw",e)}a(void 0)}))}}const T=function(){var e=j(_().mark((function e(n,o,i){var r,a,c,u,l,s,f,d,h,p,w;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v("/shifu/ajax/LOYALTY?locale=".concat(n,"&isLoyalty=").concat(o),"loyalty","GET",{"cache-control":"no-cache"});case 3:if((r=e.sent)&&r.html){for((a=document.createElement("div")).innerHTML=r.html.trim(),i.appendChild(a),c=a.getElementsByTagName("script"),u=0;u=0;--r){var a=this.tryEntries[r],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(u&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var i=o.arg;A(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:T(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),v}},t}function M(e,t,n,o,i,r,a){try{var c=e[r](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(o,i)}var F={"Content-Type":"application/json"};function B(){return G.apply(this,arguments)}function G(){var e;return e=D().mark((function e(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",v(window.ShifuConfig.evoLoginPath+"?country="+window.ShifuConfig.country.toUpperCase()+"&lang="+window.ShifuConfig.language.toLowerCase(),"login","GET",F,!0));case 1:case"end":return e.stop()}}),e)})),G=function(){var t=this,n=arguments;return new Promise((function(o,i){var r=e.apply(t,n);function a(e){M(r,o,i,a,c,"next",e)}function c(e){M(r,o,i,a,c,"throw",e)}a(void 0)}))},G.apply(this,arguments)}function U(e,n){null!=e&&window.ShifuConfig.pageviewId?(e.pageview_id=window.ShifuConfig.pageviewId,function(e){var t=new XMLHttpRequest;t.open("POST",window.ShifuConfig.domain+"/hermes-service/topic/shifu",!0),t.setRequestHeader("Content-Type","application/json"),t.send(JSON.stringify(e))}(e)):("track-init"==n&&!window.ShifuConfig.trackInitFailed||t("invalidShifuPush",{error:null==e?"NullShifuObject":"EmptyPageviewId",country:window.ShifuConfig.country,location:window.location.href,version:window.ShifuConfig.version,isAgency:window.ShifuConfig.partner.isAgency,isWL:window.ShifuConfig.partner.isWL,trackingId:n||"undefined",ab:JSON.stringify(window.ShifuConfig.ab),initFailedTwice:window.ShifuConfig.trackInitFailed}),"track-init"==n&&window.ShifuConfig.setTrackInitFailed())}function W(e,t){return window.ShifuConfig.ab&&window.ShifuConfig.ab[e]&&window.ShifuConfig.ab[e]===t}var H=document.getElementById("passportBenefits"),R=function(){var e=window.ShifuConfig.flow,t=window.ShifuConfig.companyId,n=W("shifuMyBenefitsAccess","enabled_true"),o=["search","home","landing","detail","my_passport"].includes(e);return n&&o&&"1"===t},Y={es:{main:{loyalty:"Beneficios Pasaporte",noLoyalty:"Cupones"},secondary:{points:"{points} puntos | Cupones",noPoints:"Cupones, puntos y más."}},pt:{main:{loyalty:"Benefícios Passaporte",noLoyalty:"Cupons"},secondary:{points:"{points} pontos | Cupons",noPoints:"Cupons, pontos e mais"}}},J=function(){try{var e=V(),n=H.querySelector("#benefits-incentive-icon"),o=H.querySelector("#benefits-incentive-main-text"),i=H.querySelector("#benefits-incentive-secondary-text");n&&o&&i&&(H.classList.add(e.type),n.classList.add("shifu-3-icon-".concat(e.icon.name)),e.icon.size&&n.classList.add(e.icon.size),o.textContent=e.mainText.text,e.mainText.style&&o.classList.add(e.mainText.style),i.textContent=e.secondaryText.text,e.secondaryText.style&&i.classList.add(e.secondaryText.style),H.classList.remove("-shifu-3-hide"))}catch(e){t("myBenefitsAccessLoadError",{error:e,country:window.ShifuConfig.country,location:window.location.href,version:window.ShifuConfig.version,xClient:window.ShifuConfig.xClient}),H.remove()}},V=function(){var e,t,n=window.ShifuConfig.language,o=window.ShifuConfig.isLogged,i="true"===window.ShifuConfig.isLoyaltyOn,r=null===(e=window.shifu_loyalty_info)||void 0===e?void 0:e.code,a=null===(t=window.shifu_loyalty_info)||void 0===t?void 0:t.available_points;return{type:z(o,i,r),icon:X(i),mainText:K(i,n),secondaryText:Q(i,o,a,n)}},z=function(e,t,n){return t?e?n?"-loyalty-".concat(n):"-logged-no-tier":"-loyalty-not-logged":"-no-loyalty"},X=function(e){return{name:e?"loyalty-filled":"coupon",size:e?"-shifu-3-icon-xsm":null}},K=function(e,t){return{text:Z(t,"main",e?"loyalty":"noLoyalty"),style:e?"shifu-3-subtitle-s":null}},Q=function(e,t,n,o){return e?{text:Z(o,"secondary","string"==typeof n&&0!=n?"points":"noPoints").replace("{points}",n),style:"shifu-3-caption"}:{text:""}},Z=function(e,t,n){var o;return null==Y||null===(o=Y[e])||void 0===o||null===(o=o[t])||void 0===o?void 0:o[n]};function $(){if(H){var e="true"==window.ShifuConfig.isLoyaltyOn,t=window.ShifuConfig.isLogged,n=window.shifu_loyalty_info;!e||e&&!t||e&&t&&n?J():document.addEventListener("_LOYALTY_INFO_LOADED",(function(){J()}))}}var ee=["2825","2875","3212","3211"],te={notLogged:["mybenefits"],logged:["myprofile","logout"]};function ne(e){!function(e){var t,n,o,i,r,a,c="/shifu/ajax/menu/items",u=c+"/notLogged",l=c+"/logged",s=(null===(t=window.ShifuConfig)||void 0===t?void 0:t.isLogged)||!1,f=null!==(n=window.ShifuConfig)&&void 0!==n&&n.domain?null===(o=window.ShifuConfig)||void 0===o?void 0:o.domain.replace("//",""):window.location.hostname;a=s?l:u;var d=W("convivenciaTPHC-researchers","enabled_true"),h=R();a+="?country="+window.ShifuConfig.country.toUpperCase()+"&lang="+window.ShifuConfig.language.toLowerCase()+"&domain="+f,s&&(a+="&abTripPlanner="+!!d),h&&(a+="&abBenefitsAccess=".concat(!!h)),null!==(i=window.shifu_loyalty_info)&&void 0!==i&&i.code&&(a+="&loyaltyTier=".concat(window.shifu_loyalty_info.code)),null!==(r=window.shifu_loyalty_info)&&void 0!==r&&r.available_points&&(a+="&availablePoints=".concat(window.shifu_loyalty_info.available_points)),"true"===window.ShifuConfig.partner.isWL&&(a+="&partnerId="+window.ShifuConfig.partner.code),w(a,"menu-items",e,"GET",{"Content-Type":"application/json"},!0)}((function(n,o){if(window.log=o,t("userItems",{error:n,data:JSON.stringify(o),partnerCode:window.ShifuConfig.partner.code,isWL:window.ShifuConfig.partner.isWL,isAgency:window.ShifuConfig.partner.isAgency,country:window.ShifuConfig.country,location:window.location.href,version:window.ShifuConfig.version,flow:window.ShifuConfig.flow,product:window.ShifuConfig.product,xClient:window.ShifuConfig.xClient}),n&&!window.ShifuConfig.isLogged&&re(o={items:[oe("login",window.ShifuConfig.language)]}),window.ShifuConfig.partner&&"true"===window.ShifuConfig.partner.isWL&&window.ShifuConfig.isLogged){var i=[oe("booking",window.ShifuConfig.language)];W("homeTripPlanner","enabled_true")&&["ANDROID_APP","IPHONE_APP","MOBILE"].includes(window.ShifuConfig.device)&&i.push(oe("tripPlanner",window.ShifuConfig.language)),ee.includes(window.ShifuConfig.companyId)&&(i.push(oe("myfavorites",window.ShifuConfig.language)),i.push(oe("myOpinions",window.ShifuConfig.language))),"true"===window.ShifuConfig.partner.hasMyAccount&&i.push(oe("account",window.ShifuConfig.language)),i.push(oe("logout",window.ShifuConfig.language)),re(o={items:i})}else n||re(o);e&&e(o)}))}function oe(e,t){return{es:{booking:{label:"Mis viajes",link:"/me/bookings?as_referer=shifu_menu",tracking:"mytrip"},account:{label:"Mi perfil",link:"/me/account",tracking:"myprofile"},tripPlanner:{label:"Mis planes de viaje",link:"/informacion/board-planesviaje",new_item:!0,new_item_circle:!1,tracking:"tripPlanner"},logout:{label:"Cerrar sesión",action:"DespegarSocialLogout.logout()",tracking:"logout"},login:{label:"Iniciar sesión",action:"DespegarSocialLogout.login()",tracking:"login"},myfavorites:{label:"Favoritos",link:"/favoritos",tracking:"myfavorites"},myOpinions:{label:"Mis Opiniones",link:"/me/surveys",tracking:"mysurveys"}},pt:{booking:{label:"Minhas Viagens",link:"/me/bookings?as_referer=shifu_menu",tracking:"mytrip"},account:{label:"Meu Perfil",link:"/me/account",tracking:"myprofile"},tripPlanner:{label:"Meus planos de viagem",link:"/informacao/boardplanosviagem",new_item:!0,new_item_circle:!1,tracking:"tripPlanner"},logout:{label:"Sair",action:"DespegarSocialLogout.logout()",tracking:"logout"},login:{label:"Iniciar sessão",action:"DespegarSocialLogout.login()",tracking:"login"},myfavorites:{label:"Favoritos",link:"/favoritos",tracking:"myfavorites"},myOpinions:{label:"Minhas opiniões",link:"/me/surveys",tracking:"mysurveys"}},en:{booking:{label:"My trips",link:"/me/bookings?as_referer=shifu_menu",tracking:"mytrip"},account:{label:"My profile",link:"/me/account",tracking:"myprofile"},tripPlanner:{label:"My travel plans",link:"/information/tripplannerboard",new_item:!0,new_item_circle:!1,tracking:"tripPlanner"},logout:{label:"Log out",action:"DespegarSocialLogout.logout()",tracking:"logout"},login:{label:"Login",action:"DespegarSocialLogout.login()",tracking:"login"},myfavorites:{label:"Favorites",link:"/favorites",tracking:"myfavorites"},myOpinions:{label:"My reviews",link:"/me/surveys",tracking:"mysurveys"}}}[t][e]}var ie=function(e){var t=e.querySelectorAll(".passport-data-container"),n=e.querySelectorAll(".coupons-data-container");n.length>0?!0===b("shifu-menu-header-coupons-data-clicked")||n.forEach((function(e){e.classList.add("-highlighted-icon")})):t.length>0&&(!0===b("shifu-menu-header-passport-data-clicked")||t.forEach((function(e){e.classList.add("-highlighted-icon")})))};function re(e){var t,n,o=null===(t=window.ShifuConfig)||void 0===t?void 0:t.isLogged,i=o?document.querySelector(".logged-common"):document.querySelector(".not-logged"),r=null!==(n=window.ShifuConfig)&&void 0!==n&&n.isLogged?i.querySelectorAll(".shifu-menu-items"):document.querySelectorAll("#not-logged-menu-item"),a=document.querySelectorAll(".passport-coupons-data-container a");if(e.header){var c=i.querySelectorAll(".passport-coupons-data-container"),u=i.querySelectorAll(".passport-data-container"),l=i.querySelectorAll(".coupons-data-container");c&&(u&&u.forEach((function(t){t&&(e.header.passport?(t.querySelector(".shifu-3-subtitle-s").textContent=e.header.passport.title,t.querySelector(".shifu-3-caption").textContent=e.header.passport.subtitle,t.addEventListener("click",(function(){S("shifu-menu-header-passport-data-clicked",!0)}))):t.remove())})),l&&l.forEach((function(t){t&&(e.header.coupon?(t.querySelector(".shifu-3-subtitle-s").textContent=e.header.coupon.title,t.querySelector(".shifu-3-caption").textContent=e.header.coupon.subtitle,t.addEventListener("click",(function(){S("shifu-menu-header-coupons-data-clicked",!0)}))):t.remove())})),ie(i),c.forEach((function(e){e.classList.remove("-shifu-3-hide")})))}e.items&&e.items.forEach((function(e){if(void 0!==e){var t=document.createElement("li");t.classList.add("tooltip-item");var n=document.createElement("a");if(n.classList.add("menu-login-padding"),e.link&&n.setAttribute("href",e.link),e.tracking&&(n.setAttribute("data-action",e.tracking),t.classList.add(e.tracking)),"logout"===e.tracking&&(n.classList.add("tooltip-text-logout"),t.classList.add("tooltip-item-logout")),"login"===e.tracking&&n.classList.add("loginButton"),void 0!==e.label&&(n.textContent=e.label),e.icon_class){t.classList.add("menu-icon-padding");var i=document.createElement("i");i.classList.add("header-icon",e.icon_class),n.appendChild(i)}if(e.new_item){var a=function(e){var t={es:"Nuevo",en:"New",pt:"Novo"}[window.ShifuConfig.language.toLowerCase()],n=document.createElement("span");n.classList.add("new-element-advise-container");var o=document.createElement("span");if(o.textContent=t,o.classList.add("new-element-advise"),n.appendChild(o),e){var i=document.createElement("div");i.classList.add("red-circle-new-element"),n.appendChild(i)}return n}(e.new_item_circle);n.appendChild(a)}if("passport"===e.tracking){t.classList.add("menu-icon-padding","menu-icon-passport");var c=((p=document.createElement("img")).classList.add("header-icon"),p.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFeSURBVHgB1ZRBSsNAFIb/CW2pkMUUEcSNwZW4MXgB041bF57Aa7jqyuu4kroQegSL4NqiohUKjaCY0rTjm47BTMRk2oyF/pAJ85j838yb98KwoES77aFWCzCBD8c5pJCHKZrsqNlNr6sYm1WrPqYsILN9Cvn0cAgandRCRrGMfgHERYfDjcnA8cFmOwtmZsiYGUoDiOvOjdqd0cGMxDTAWUugvEJ23mokkwUOXSjtHv4DgKUC8m+T02knY2Ac6/FoBDuAk2NgxwOe+8B9j4wjFf+M1Lz/iiKZpWhrEzig6q3X1XyN3nu71LvbhZ+a30FimpY8HeewA5BqkFklk9WNddgDSLmuPk/SZg0wp+YDyCoKQz02GMAeQJZrFjh8gx3Aw5Oq/bT57d1Pb/yh/EaTjTQigxfa+fA7NbKr3z+ARwLGMYqUD7i8Qlmt/t9UBzB0YVk6QOCUxh7KiEFrlC9De1cEuw0zVwAAAABJRU5ErkJggg==",p);n.appendChild(c)}if(e.count&&e.count>0){var u=document.createElement("div");u.classList.add("menu-notification-container");var l=document.createElement("span");l.classList.add("notification-inbox-container");var s=document.createTextNode(e.count),f=document.createElement("span");f.classList.add("notification-circle-text"),f.appendChild(s);var d=document.createElement("span");d.classList.add("shifu-3-notification-circle"),d.classList.add("-sm"),l.appendChild(d),l.appendChild(f),u.appendChild(n),u.appendChild(l),t.appendChild(u)}else t.appendChild(n);var h=t.cloneNode(!0);r[0]&&r[0].appendChild(t),r[1]&&r[1].appendChild(h),function(e,t,n){var o;if(null==te||null===(o=te[t?"logged":"notLogged"])||void 0===o?void 0:o.includes(n)){var i=document.createElement("span");i.classList.add("-menu-separator"),e[0]&&e[0].appendChild(i),e[1]&&e[1].appendChild(i.cloneNode(!0))}}(r,o,e.tracking)}var p}));var s=i.querySelectorAll(".tooltip-text-logout");a.forEach((function(e){e.addEventListener("click",(function(){var t,n=null==e||null===(t=e.dataset)||void 0===t?void 0:t.type;n&&U({type:"click",eventtype:"event",item:"menu_logged_item",label:n})}))})),function(e){for(var t=0;t=0;--r){var a=this.tryEntries[r],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(u&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var i=o.arg;A(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:T(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),v}},t}function se(e,t,n,o,i,r,a){try{var c=e[r](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(o,i)}function fe(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var r=e.apply(t,n);function a(e){se(r,o,i,a,c,"next",e)}function c(e){se(r,o,i,a,c,"throw",e)}a(void 0)}))}}var de={es:"Beneficios Pasaporte",pt:"Benefícios Passaporte"},he={notLogged:function(){return document.querySelector(".not-logged")}},pe=function(e){var t=he.notLogged();t&&t.classList.remove("-shifu-3-hide"),function(e){var t,n=he.notLogged();n&&(t=n,["click","closeModal"].forEach((function(e){t.addEventListener(e,(function(n){var o,i,a,c,u,l,s;"click"===e&&"a"===n.target.tagName.toLowerCase()&&""===n.target.href&&n.preventDefault(),function(e,t){var n;r.isDesktop()?n="tooltip":r.isMobile()&&(n="modal");var o=window.ShifuConfig.flow,i=document.querySelector(".shifu-tooltip-menu-basic.-shifu-concierge-menu .shifu-3-tooltip");if(n){var a=e.querySelector("#not-logged-"+n);if(a)if("click"===t){if("modal"===n){var c=e.querySelector("#not-logged-modal .shifu-3-icon-arrow-bold-left");c.onclick||(c.onclick=function(e){document.body.classList.remove("not-scrolleable"),a.classList.remove("-show-"+n),e.preventDefault(),e.stopPropagation()}),document.body.classList.add("not-scrolleable"),Oe(a,n)}if("tooltip"===n&&(Oe(a,n),ke||(document.body.addEventListener("click",(function(){a.classList.remove("-show-tooltip")})),ke=!0),W("shifuMenuConciergeV2","enabled_true")&&("search"==o||"home"==o||"landing"==o)&&i.classList)){i.classList.remove("-show-tooltip");var u=document.querySelector(".concierge-container .header-chevron-container i");u&&u.classList&&(u.classList.remove("shifu-3-icon-chevron-up"),u.classList.add("shifu-3-icon-chevron-down"))}}else"closeModal"===t&&(document.body.classList.remove("not-scrolleable"),a.classList.remove("-show-"+n))}}(t,e),"click"===e&&(l=L(y()),s=Date.now(),a=x,c=s,(u=b(i=l))&&(u[a]=c,S(i,u)),(o=document.querySelector(".header-notification-circle"))&&(o.style="display:none"),n.stopPropagation())}))})),ne(_e.bind(this,e)))}(e)},we=function(){var e=fe(le().mark((function e(t){var n,o,i;return le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=document.querySelector(".login-site .available-points"))){e.next=4;break}return e.next=4,T(window.ShifuConfig.language+"_"+window.ShifuConfig.country,!!t.loyalty,n);case 4:o=R(),i="true"===window.ShifuConfig.isLoyaltyOn,o&&i&&ve();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ve=function(){var e=document.querySelectorAll(".loyalty-passport-benefits-title");if(e){var t=window.ShifuConfig.language,n=de[t];n&&e.forEach((function(e){e.textContent=n,e.classList.add("shifu-3-subtitle-s")}))}},ge=function(){var e=document.getElementById("logged-white-label"),n=document.querySelector(".login-white-label .available-points");if(n&&window.ShifuConfig.partner&&"true"==window.ShifuConfig.partner.isLoyalty){var o=new CustomEvent("loyaltyWLBalance");(function(){return P.apply(this,arguments)})().then((function(t){t&&(n.innerHTML=n.innerHTML.replace("{0}",t.available_points.toLocaleString().replace(",",".")),e.classList.add("have-points"),window.loyaltyWLBalance=t)})).catch((function(e){t("failLoyaltyWLBalance",{error:e,country:window.ShifuConfig.country,partnerId:window.ShifuConfig.partner.code,location:window.location.href,version:window.ShifuConfig.version,flow:window.ShifuConfig.flow,product:window.ShifuConfig.product,xClient:window.ShifuConfig.xClient})})).finally((function(){document.dispatchEvent(o)}))}};function ye(e,t){var n=t.querySelector(".shifu-3-avatar");if(n&&e.picture_url){var o=document.createElement("img");return o.classList.add("avatar-image"),o.src=e.picture_url,o.alt=e.name||e.email,n.appendChild(o),!0}n.classList.add("-icon");var i=document.createElement("span");i.classList.add("avatar-icon");var r=document.createElement("i");r.classList.add("shifu-3-icon-user"),i.appendChild(r),n.appendChild(i)}function me(e){return be.apply(this,arguments)}function be(){return(be=fe(le().mark((function e(n){var o,i;return le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(o=document.querySelector(".logged-common"))){e.next=14;break}return window.loggedEmail=n.email,I({userEmail:n.email}),Le(),i=o.querySelector(".userName"),ye(n,o),n.name||n.email?i.innerHTML=n.name||n.email:t("failLoginInfo",{error:"No name or email",data:JSON.stringify(n),country:window.ShifuConfig.country,isLazyLogin:!1,isAgency:window.ShifuConfig.partner.isAgency,isWL:window.ShifuConfig.partner.isWL,location:window.location.href,version:window.ShifuConfig.version,flow:window.ShifuConfig.flow,product:window.ShifuConfig.product,xClient:window.ShifuConfig.xClient}),window.ShifuConfig.isLogged=!0,ge(),e.next=12,we(n);case 12:o.classList.remove("-shifu-3-hide"),"checkout"===window.ShifuConfig.flow&&Ce();case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Se(e){var t,n,o=document.createElement("span");o.textContent=e,o.classList.add("notification-circle-text");var i=document.createElement("span");i.appendChild(o),i.classList.add("shifu-3-notification-circle"),i.classList.add("header-notification-circle");var r=null!==(t=window.ShifuConfig)&&void 0!==t&&t.isLogged?document.querySelector(".logged"):he.notLogged();null==r||null===(n=r.querySelector(".avatar-circle-notifications"))||void 0===n||n.appendChild(i)}function Ce(){var e=document.getElementById("userStatus");e&&e.classList.remove("-shifu-3-hide");var t=document.querySelector(".help-checkout");t&&t.classList.add("-shifu-3-hide")}function Le(){var e=document.createEvent("HTMLEvents");e.initEvent("UserStatus",!0,!0);var t=document.querySelector(".avatar-lazy");t&&t.dispatchEvent(e)}function Ee(e){return xe.apply(this,arguments)}function xe(){return(xe=fe(le().mark((function e(n){var o,i,r,a,c,u;return le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=y(),i=he.notLogged(),r=document.getElementById("logged-white-label"),a={count:1},!ce()){e.next=8;break}window.ShifuConfig.isLogged="NOT_LOGGED"!==o,e.next=33;break;case 8:if(i||r){e.next=12;break}return e.abrupt("return",!1);case 12:if("NOT_LOGGED"===o){e.next=29;break}return e.prev=13,e.next=16,B();case 16:return c=e.sent,e.next=19,me(c);case 19:e.next=26;break;case 22:e.prev=22,e.t0=e.catch(13),"checkout"!==window.ShifuConfig.flow&&pe(),t("failLoginInfo",{error:e.t0,isLazyLogin:!1,country:window.ShifuConfig.country,isAgency:window.ShifuConfig.partner.isAgency,isWL:window.ShifuConfig.partner.isWL,location:window.location.href,version:window.ShifuConfig.version,flow:window.ShifuConfig.flow,product:window.ShifuConfig.product,xClient:window.ShifuConfig.xClient});case 26:document.addEventListener("_LOYALTY_INFO_LOADED",(function(){N("shifu_loyalty_info"in window&&"status"in window.shifu_loyalty_info&&window.shifu_loyalty_info.status)})),e.next=33;break;case 29:("beneficios-despegar"!==(null===(u=window.ShifuConfig)||void 0===u||null===(u=u.partner)||void 0===u?void 0:u.channel)||g("wl_session"))&&pe(n.product),window.ShifuConfig.isLogged=!1,w("/shifu/ajax/loyalty/"+(window.ShifuConfig.country?window.ShifuConfig.country.toUpperCase():""),"loyalty-footer",(function(e,n){e?t("loyaltyFooter",{error:"Error: ajax ",locale:window.locale}):N(n)}));case 33:k(0,a.count,(function(e){Se(e)}));case 34:case"end":return e.stop()}}),e,null,[[13,22]])})))).apply(this,arguments)}var ke=!1;function Oe(e,t){if(null!=e&&e.classList){var n="-show-"+t;e.classList.contains(n)?"modal"!==t&&e.classList.remove(n):(e.classList.add(n),U({type:"show",eventtype:"event",item:"shifu_not_logged_menu"}))}}function _e(e){var t=document.querySelectorAll(".loginButton");t&&t.forEach((function(t){t.addEventListener("click",(function(){var t="/login?ref=header-"+e+"&redirect_to="+encodeURIComponent(window.location.pathname+window.location.search),n=null;"shifuLoginBackTo"in window&&(n="back_to_last"===window.shifuLoginBackTo?"&back_to="+document.location.pathname:"&back_to="+window.shifuLoginBackTo),window.location.href=n?t+n:t}))}))}var Ae={despegar:{AR:100,BR:100,MX:100,CO:100,CL:100,PE:100,EC:100,UY:100}},je=function(e,t){var n=e||"despegar",o=function(e,t){var n=Ae[e];return n?n[t.toUpperCase()]:void 0}(n,t);return o?function(e){var t=function(){var e=g("trackerid");if(e){for(var t=0,n=0;n=0;--r){var a=this.tryEntries[r],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(u&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var i=o.arg;A(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:T(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),v}},t}function Ne(e,t,n,o,i,r,a){try{var c=e[r](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(o,i)}var Ie={"Content-Type":"application/json"},qe=document.querySelectorAll("#phone .header-banner-top-link"),De=document.querySelector("#phone #desktop-phone-number"),Me=document.querySelector("#phone #mobile-phone-number"),Fe=document.querySelector(".footer-phone-postsales .footer-phone-link"),Be=document.querySelector("#footer-post-sale-phone"),Ge=document.querySelectorAll(".footer-phone-sales .footer-phone-link"),Ue=document.querySelector(".footer-phone-sales .footer-phone-link #phone-sale-footer-desktop-number"),We=document.querySelector(".footer-phone-sales .footer-phone-link #phone-sale-footer-mobile-number"),He=De||Me,Re=Ue||We,Ye=Be&&Fe;function Je(){if(!ce()&&"CO"===window.ShifuConfig.country){var e=document.querySelector(".footer-telephone-info");e&&e.classList.remove("-shifu-3-hide")}}function Ve(e){var t=e.whitelabel||e.sale;if(t&&He){for(var n=0;n0&&(Ve(r),ze(r),Je()),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),t("failAjaxPhone",{error:e.t0,phoneUrl:i,country:window.ShifuConfig.country,isAgency:window.ShifuConfig.partner.isAgency,isWL:window.ShifuConfig.partner.isWL,version:window.ShifuConfig.version,flow:window.ShifuConfig.flow,product:window.ShifuConfig.product,xClient:window.ShifuConfig.xClient});case 17:case"end":return e.stop()}var a,c,u}),e,null,[[7,14]])})),Ke=function(){var t=this,n=arguments;return new Promise((function(o,i){var r=e.apply(t,n);function a(e){Ne(r,o,i,a,c,"next",e)}function c(e){Ne(r,o,i,a,c,"throw",e)}a(void 0)}))},Ke.apply(this,arguments)}function Qe(e){var t=document.querySelector("body"),n="show-phone-"+e;t.classList.contains(n)||t.classList.add(n)}var Ze=document.querySelector("#-shifu-concierge-videocall.-option-item.-singleline a"),$e=document.querySelector("#-shifu-concierge-whatsapp.-option-item.-singleline a");function et(e,n,o,i,r){var a={country:window.ShifuConfig.country,url:n,location:window.location.href,version:window.ShifuConfig.version,isAgency:window.ShifuConfig.partner.isAgency,isWL:window.ShifuConfig.partner.isWL,isLoyalty:window.ShifuConfig.partner.isLoyalty,duration:o};i&&(a.error=i),r&&(a.responseText=r),t(e,a)}function tt(e,n,o,i,r,a){var c=arguments.length>6&&void 0!==arguments[6]&&arguments[6],u=document.querySelector("body"),l=window.ShifuConfig.locale.replace("-","_"),s="";if(o)for(var f in o)Object.prototype.hasOwnProperty.call(o,f)&&o[f]&&(s+="&"+f+"="+o[f]);var d="/shifu/ajax/"+e.toUpperCase()+"?locale="+l+s,h=e.toLowerCase().replace("_","-"),p=Date.now();w(d,h,(function(o,s){if(et("fetch-ajax",d,Date.now()-p,o),t("lazyLoad",{module:e,error:o,locale:l,product:window.ShifuConfig.product,version:window.ShifuConfig.version,url:window.location.href,response:s}),o||0===Object.keys(s).length&&s.constructor===Object)return a&&a(),!1;try{if(!c)for(var f=0;f4&&void 0!==arguments[4]&&arguments[4];return!!window.ShifuConfig.locale&&(tt(e,t,n,null,null,o,i),!0)};function it(e){return it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},it(e)}function rt(e,t){for(var n=0;n=1){var o,i,r,a,c,u,l,s,f={flow:null===(o=window.ShifuConfig)||void 0===o?void 0:o.flow,product:null===(i=window.ShifuConfig)||void 0===i?void 0:i.product,country:null===(r=window.ShifuConfig)||void 0===r?void 0:r.country,companyId:null===(a=window.ShifuConfig)||void 0===a?void 0:a.companyId,channel:null===(c=window.ShifuConfig)||void 0===c?void 0:c.channel,device:null===(u=window.ShifuConfig)||void 0===u?void 0:u.device,businessId:null===(l=window)||void 0===l||null===(l=l.ShifuConfig)||void 0===l||null===(l=l.partner)||void 0===l?void 0:l.business,wl:null===(s=window)||void 0===s||null===(s=s.ShifuConfig)||void 0===s||null===(s=s.partner)||void 0===s?void 0:s.isWL};window.ShifuConfig.incentivesToShow.forEach((function(e){"true"===window.ShifuConfig.partner.isWL&&(f.partnerId=window.ShifuConfig.partner.code,"web_push"===e.incentive_name&&(f.partnerLogoFaviconUrl=window.ShifuConfig.partner.partnerLogoFaviconUrl),"lgpd_banner"===e.incentive_name&&(f.purchaseConditionsUrl=window.ShifuConfig.partner.purchaseConditionsUrl)),e.type&&(f.incentiveType=e.type),e.position_container_id&&document.getElementById(e.position_container_id)?ot(e.incentive_name.toUpperCase(),document.getElementById(e.position_container_id),f,null):e.position_container_id||ot(e.incentive_name.toUpperCase(),n,f,null)}))}et("fetch-incentives",t,Date.now()-d)})).catch((function(e){et("fetch-incentives",t,Date.now()-d,"parse json - ".concat(e))}))}catch(n){et("fetch-incentives",t,Date.now()-e,"fetch-incentives inline ".concat(n))}}function ft(e){return ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ft(e)}function dt(e){return dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dt(e)}function ht(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function pt(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],n=document.body;if((window.ShifuConfig.floatButton&&"FLOAT_BUTTON_NOT_APPLY"!==window.ShifuConfig.floatButton||t)&&n){var o,i,r,a,c,u,l,s,f,d,h,p={flow:window.ShifuConfig.flow,product:window.ShifuConfig.product,country:window.ShifuConfig.country,companyId:window.ShifuConfig.companyId,channel:window.ShifuConfig.channel,dates:(null===(o=window)||void 0===o||null===(o=o.ShifuConfig)||void 0===o?void 0:o.dates)||void 0,destination:(null===(i=window)||void 0===i||null===(i=i.ShifuConfig)||void 0===i?void 0:i.destination)||void 0,di:(null===(r=window)||void 0===r||null===(r=r.ShifuConfig)||void 0===r?void 0:r.di)||void 0,origin:(null===(a=window)||void 0===a||null===(a=a.ShifuConfig)||void 0===a?void 0:a.origin)||void 0,checkoutPrice:(null===(c=window)||void 0===c||null===(c=c.ShifuConfig)||void 0===c?void 0:c.checkoutPrice)||void 0,checkoutCode:(null===(u=window)||void 0===u||null===(u=u.ShifuConfig)||void 0===u?void 0:u.checkoutCode)||void 0,device:(null===(l=window)||void 0===l||null===(l=l.ShifuConfig)||void 0===l?void 0:l.device)||void 0,isLogged:(null===(s=window)||void 0===s||null===(s=s.ShifuConfig)||void 0===s?void 0:s.isLogged)||void 0,tripStatus:(null===(f=window)||void 0===f||null===(f=f.ShifuConfig)||void 0===f?void 0:f.tripStatus)||void 0,loyaltyTier:(null===(d=window)||void 0===d||null===(d=d.ShifuConfig)||void 0===d?void 0:d.loyaltyTier)||void 0,paymentMethods:(null===(h=window)||void 0===h||null===(h=h.ShifuConfig)||void 0===h?void 0:h.paymentMethods)||void 0};"true"===window.ShifuConfig.partner.isWL&&(p.partnerId=window.ShifuConfig.partner.code),window.ShifuConfig.ab&&(p.ab=JSON.stringify(window.ShifuConfig.ab)),window.location.pathname&&(p.pathname=encodeURIComponent(window.location.pathname)),ot("FLOAT_BUTTON",n,p,e,t)}else e&&e()}function St(e){return St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},St(e)}function Ct(){Ct=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",c=r.asyncIterator||"@@asyncIterator",u=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,o){var r=t&&t.prototype instanceof g?t:g,a=Object.create(r.prototype),c=new j(o||[]);return i(a,"_invoke",{value:k(e,n,c)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",w="completed",v={};function g(){}function y(){}function m(){}var b={};l(b,a,(function(){return this}));var S=Object.getPrototypeOf,C=S&&S(S(T([])));C&&C!==n&&o.call(C,a)&&(b=C);var L=m.prototype=g.prototype=Object.create(b);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(i,r,a,c){var u=f(e[i],e,r);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==St(s)&&o.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,c)}))}c(u.arg)}var r;i(this,"_invoke",{value:function(e,o){function i(){return new t((function(t,i){n(e,o,t,i)}))}return r=r?r.then(i,i):i()}})}function k(t,n,o){var i=d;return function(r,a){if(i===p)throw Error("Generator is already running");if(i===w){if("throw"===r)throw a;return{value:e,done:!0}}for(o.method=r,o.arg=a;;){var c=o.delegate;if(c){var u=O(c,o);if(u){if(u===v)continue;return u}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(i===d)throw i=w,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);i=p;var l=f(t,n,o);if("normal"===l.type){if(i=o.done?w:h,l.arg===v)continue;return{value:l.arg,done:o.done}}"throw"===l.type&&(i=w,o.method="throw",o.arg=l.arg)}}}function O(t,n){var o=n.method,i=t.iterator[o];if(i===e)return n.delegate=null,"throw"===o&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),v;var r=f(i,t.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,v;var a=r.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function T(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,r=function n(){for(;++i=0;--r){var a=this.tryEntries[r],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(u&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var i=o.arg;A(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:T(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),v}},t}function Lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Et(e){for(var t=1;t=0&&"home"===window.ShifuConfig.flow&&(A=window.ShifuConfig.locale,j=r.isMobile()?"&isMobile=".concat(r.isMobile()):"",T=window.ShifuConfig.partner&&window.ShifuConfig.partner.isWL&&"true"===window.ShifuConfig.partner.isWL?"&businessId=".concat(window.ShifuConfig.partner.business):"",w("/shifu/ajax/CONTINGENCY?locale=".concat(A).concat(j).concat(T),"contingency",(function(e,t){if(!e&&t&&t.html&&""!==t.html){for(var n=0;n_?e="scrollDown":t<_&&(e=O),_=t<=0?0:t,e}();if(C){var t=C.offsetTop+C.clientHeight;window.pageYOffset>t?(e===O?(C.classList.remove("-no-label"),C.style=""):function(){if(E&&0===E.offsetHeight){var e=C.offsetHeight;E.style="height: ".concat(e,"px")}C.classList.add("sticky","-no-label");var t=L?L.offsetHeight:0;C.style="top: -".concat(t,"px")}(),x=!0):(x&&(E&&(E.style="height: 0"),C.classList.remove("sticky","-no-label")),x=!1)}})),p=W("shifuHeaderExoticaIcon","enabled_true"),(v=document.getElementById("nav-driver-outstanding-packages"))&&!p&&v.classList.remove("-shifu-3-hide"),m=document.querySelectorAll(".new-container"),(S=(null==(b=(m=Array.from(m)).filter((function(e){return!Array.from(e.classList).some((function(e){return"-shifu-3-hide"===e}))}))[0])||null===(y=b.parentElement)||void 0===y||null===(y=y.attributes)||void 0===y||null===(y=y.product)||void 0===y?void 0:y.value)||null)&&U({type:"show",eventtype:"event",item:"showDriver-".concat(S),data:{bucket_info:window.ShifuConfig.cesBucketInfo}}),setTimeout((function(){var e,t=document.querySelector("#autogestion-language");t&&nt(t,"click","LANGUAGE",t);var n=document.querySelector(".shifu-retraction-law-label"),o=document.querySelector("#shifu-js-retraction-law-container");n&&o&&nt(n,"click","MODAL_RETRACTION_LAW",o);var i=document.querySelector(".retraction-law-banner-label"),r=document.querySelector(".shifu-retraction-law-banner-modal"),a=document.querySelector(".shifu-retraction-law-banner-modal .modal-close");i&&r&&a&&(a.addEventListener("click",(function(e){r.classList.remove("-show-modal"),r.classList.add("-shifu-3-hide"),e.stopPropagation()})),i.addEventListener("click",(function(e){r.classList.remove("-shifu-3-hide"),r.classList.add("-show-modal"),e.stopPropagation()})));var c=document.querySelector(".subscription-messages"),u=document.getElementById("subscribe-button");c&&nt(u,"click","SUBSCRIPTION_VALIDATION",c);var l=document.querySelector(".subscription-messages-container"),s=document.getElementById("subscribe-button-ab");l&&nt(s,"click","SUBSCRIPTION_VALIDATION",l);var f=document.querySelector(".shifu-3-header");if(f&&null!==(e=window.ShifuConfig)&&void 0!==e&&e.showBetaPolice){var d=document.createEvent("HTMLEvents");d.initEvent("BETAPolice",!0,!0),nt(document,"BETAPolice","BETA_POLICE",f),document.dispatchEvent(d)}var h=document.querySelector(".shifu-extended-menu");h&&nt(h.parentElement,"click","EXTENDED_MENU",h);var p=document.querySelector(".phone-display-tooltip");p&&nt(p.parentElement,"mouseenter","DROPDOWN_PHONE",p,{trackerId:g("trackerid")});var w=document.querySelector(".avatar-lazy");if(w){var v={};window.ShifuConfig.partner&&(v={partner:JSON.stringify(window.ShifuConfig.partner)}),nt(w.parentElement,"UserStatus","USER_STATUS",w,v)}}),0),function(){Ot.apply(this,arguments)}(),h.tracking();var f=Et(Et({},window.ShifuConfig),{},{showedIncentives:window.showedIncentives}),d=window.shifuWebViewData;d&&(f=Et(Et({},f),d)),window.ShifuConfig.trackInitFailed&&l(),t("SHIFU_INIT",f),window.shifuTimes.cMainEnd=s(),function(e){if(window.shifuTimes&&window.ShifuConfig){var n=window.shifuTimes&&window.ShifuConfig?pt(pt({},window.shifuTimes),{},{flow:window.ShifuConfig.flow,channel:window.ShifuConfig.channel,isWebview:window.ShifuConfig.isWebview,companyId:window.ShifuConfig.companyId,country:window.ShifuConfig.country,product:window.ShifuConfig.product,selectedProduct:window.ShifuConfig.selectedProduct,isLogged:window.ShifuConfig.isLogged,version:window.ShifuConfig.version,xClient:window.ShifuConfig.xClient}):{};e&&(n=pt(pt({},n),e)),t("SHIFU_TIMES",n)}}(d)}var p,v,y,m,b,S,C,L,E,x,k,O,_,A,j,T}void 0===window.shifuTimes&&(window.shifuTimes={}),null!==(jt=window.ShifuConfig)&&void 0!==jt&&jt.isShifuLoaded?Pt():document.addEventListener("Shifu_Loaded",Pt)})()})();