PageSourceSearch

https://www.plataforma10.com.br/_next/static/chunks/0-vcj8_eg7d0y.js

js plataforma10.com.br collected 2026-10-08 20:28:09 UTC 42,102 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,640548,275697,e=>{"use strict";var t=e.i(822315),r=e.i(586838),a=e.i(36389);let i=(e,t)=>{if(!e)return null;let r=(t===a.currencyValues.RS?a.currencyDisplayText.RS:t).toLowerCase();for(let t of Object.keys(e))if(t.toLowerCase()===r){let r=e[t];return"number"==typeof r?r:null}return null},n=(e,t,r)=>{let n=i(t,r);return"number"==typeof n&&n>0?{amount:n,currency:r,converted:!0}:{amount:e,currency:a.currencyValues.ARS,converted:!1}},o=(e,t,r)=>n(e,r.get(e),t),l=(e,t)=>{let i=t===a.currencyValues.RS?a.currencyDisplayText.RS:t;return`${i} ${(e=>{let[t,...r]=e.split(",");return[t.replace(/\B(?=(\d{3})+(?!\d))/g,"."),...r].join(",")})((0,r.formatPrice)(e,t))}`};e.s(["buildCotizacionByPrecio",0,(e,t)=>{let r=new Map;return(e??[]).forEach(e=>{e?.cotizacion&&"object"==typeof e.cotizacion&&"number"==typeof e.precio&&r.set(e.precio,e.cotizacion)}),(t??[]).forEach(e=>{e?.Cotizacion&&"object"==typeof e.Cotizacion&&"number"==typeof e.Precio&&!r.has(e.Precio)&&r.set(e.Precio,e.Cotizacion)}),r},"buildServiceChargeByPrecio",0,e=>{let t=new Map;return(e??[]).forEach(e=>{"number"==typeof e?.precio&&"number"==typeof e?.importeServiceCharge&&t.set(e.precio,{importe:e.importeServiceCharge,cotizacion:e.cotizacionServiceCharge??null,importeOriginal:"number"==typeof e.importeServiceChargeOriginal?e.importeServiceChargeOriginal:null,cotizacionOriginal:e.cotizacionServiceChargeOriginal??null})}),t},"convertCalidadAmount",0,o,"findCotizacionValue",0,i,"formatCalidadPrice",0,(e,t,r)=>{let{amount:a,currency:i}=o(e,t,r);return l(a,i)},"formatMulticalidadMoney",0,l,"readServiceChargeAmount",0,(e,t,r)=>{let n=i(t,r);return"number"==typeof n&&n>=0?n:r===a.currencyValues.ARS?e:null},"resolveCotizacionAmount",0,n],275697);var s=e.i(769826);function u(e,t){return(0,r.capitalizeEachWord)(t?.trim()||e)}function c(e){let t=new Set;return e.filter(e=>{let r=`${e.clase}|${e.precio}`;return!t.has(r)&&(t.add(r),!0)})}function d(e,t,r){let a=new Map;for(let t of e){let e=[t.fechaSalidaA,t.fechaLlegadaA,t.nombreFantasiaProveedorA,t.fechaSalidaB,t.fechaLlegadaB,t.nombreFantasiaProveedorB,t.transbordo].join("|"),r=a.get(e);r?r.push(t):a.set(e,[t])}let i=[];for(let[e,n]of a){let a=n[0],o=[],l=[];for(let e of n)o.push({indiceServicio:e.indiceServicioA,claveSolicitud:e.claveSolicitudA,clase:e.claseA,precio:e.precioA,butacas:e.butacasA,cotizacion:e.cotizacionA??null,compraHabilitada:e.compraHabilitada,motivoCompraDeshabilitada:e.motivoCompraDeshabilitada}),l.push({indiceServicio:e.indiceServicioB,claveSolicitud:e.claveSolicitudB,clase:e.claseB,precio:e.precioB,butacas:e.butacasB,cotizacion:e.cotizacionB??null,compraHabilitada:e.compraHabilitada,motivoCompraDeshabilitada:e.motivoCompraDeshabilitada});let s=c(o).sort((e,t)=>e.precio-t.precio),d=c(l).sort((e,t)=>e.precio-t.precio);i.push({id:e,salidaCiudad:t,llegadaCiudad:r,fechaSalidaA:a.fechaSalidaA,fechaLlegadaA:a.fechaLlegadaA,fechaSalidaSegunCulturaA:a.fechaSalidaSegunCulturaA,fechaLlegadaSegunCulturaA:a.fechaLlegadaSegunCulturaA,nombreFantasiaProveedorA:u(a.nombreFantasiaProveedorA,a.nombreFantasiaTransportistaA),idProveedorTransportistaA:a.idProveedorTransportistaA,clasesTramoA:s,fechaSalidaB:a.fechaSalidaB,fechaLlegadaB:a.fechaLlegadaB,fechaSalidaSegunCulturaB:a.fechaSalidaSegunCulturaB,fechaLlegadaSegunCulturaB:a.fechaLlegadaSegunCulturaB,nombreFantasiaProveedorB:u(a.nombreFantasiaProveedorB,a.nombreFantasiaTransportistaB),idProveedorTransportistaB:a.idProveedorTransportistaB,clasesTramoB:d,transbordo:a.transbordo,tiempoEsperaMinutos:a.tiempoEsperaMinutos,precioMoneda:a.precioMoneda})}return i.sort((e,t)=>e.clasesTramoA[0].precio+e.clasesTramoB[0].precio-(t.clasesTramoA[0].precio+t.clasesTramoB[0].precio)),i}function m(e){return e.compraHabilitada&&e.butacas>=1}function p(e){return e.clasesTramoA.some(m)&&e.clasesTramoB.some(m)}function _(e,t,r){if(r){let a=i(e.cotizacion,r),n=i(t.cotizacion,r);if(null!=a&&a>0&&null!=n&&n>0)return a+n}return e.precio+t.precio}function f(e,t){return _(e.clasesTramoA[0],e.clasesTramoB[0],t)}function g(e,t,a){switch(t){case"price":return f(e,a);case"duration":{let t=T(e.fechaSalidaSegunCulturaA),r=T(e.fechaLlegadaSegunCulturaB);if(!t||!r)return Number.MAX_SAFE_INTEGER;return(r.getTime()-t.getTime())/6e4}default:return(0,r.parseDateInMillis)(e.fechaSalidaA)?.valueOf()??Number.MAX_SAFE_INTEGER}}let h=e=>e.trim().toLowerCase(),v=e=>e.trim().toLowerCase();function T(e){let t=(e||"").trim().split(/\s+/),r=t[0],a=t[1]||"00:00",i=(t[2]||"").toLowerCase().replace(/\./g,"");if(!r)return null;
1let[n,o,l]=r.split("/").map(Number),[s]=a.split(":").map(Number),[,u]=a.split(":").map(Number);return("pm"===i&&s<12&&(s+=12),"am"===i&&12===s&&(s=0),[n,o,l,s,u].some(e=>Number.isNaN(e)))?null:new Date(l,o-1,n,s,u)}e.s(["calcularDuracionTotal",0,function(e,t){let r=T(e),a=T(t);if(!r||!a)return"";let i=Math.round((a.getTime()-r.getTime())/6e4),n=Math.floor(i/60),o=i%60;return 0===o?`${n}h 00m`:`${n}h ${String(o).padStart(2,"0")}m`},"filterGroupedCombinations",0,function(e,t,a){let{departureTimeRange:i,quality:n,provider:o,priceRange:l,benefits:s,currency:u,serviceType:c}=t||{},d=Date.now(),m=!!n&&!n.includes("Todas");return s&&s.length>0||c&&!c.includes("Todos")&&!c.includes("transfer")?[]:e.filter(e=>{let t,s=T(e.fechaSalidaSegunCulturaA),c=(0,r.parseDateInMillis)(e.fechaSalidaA)?.valueOf()??null;if(null!==c&&c<d&&!a)return!1;if(i&&s){let e=s.getHours()+s.getMinutes()/60;if(e<i[0]||e>i[1])return!1}if(o){if(o.includes("_NO_SERVICES_FOUND_"))return!1;if(!o.includes("Todas")){let t=new Set(o.map(v));if(!(t.has(v(e.nombreFantasiaProveedorA))||t.has(v(e.nombreFantasiaProveedorB))))return!1}}if(m&&(t=new Set(n.map(h)),![...e.clasesTramoA,...e.clasesTramoB].some(e=>t.has(h(e.clase)))))return!1;if(l&&null!==l[0]&&null!==l[1]){let t=f(e,u);if(t<l[0]||t>l[1])return!1}return!0})},"formatCulturaDate",0,function(e,a="es"){let i=T(e);if(!i){let t,r={dia:(t=e.split(" "))[0]||"",hora:t[1]||""};return{hora:r.hora,diaCorto:r.dia,diaLargo:r.dia}}let n=(0,t.default)(i).locale(a);return{hora:n.format("HH:mm"),diaCorto:(0,r.capitalizeEachWord)(n.format("ddd DD/MM")),diaLargo:(0,r.capitalizeEachWord)(n.format("ddd D MMM"))}},"formatWaitTime",0,function(e){if(e<60)return`${e} min`;let t=Math.floor(e/60),r=e%60;return 0===r?`${t}h`:`${t}h ${r}m`},"getCombinationCompanies",0,function(e){let t=e.nombreFantasiaProveedorA.trim(),r=e.nombreFantasiaProveedorB.trim();return v(t)===v(r)?[t]:[t,r]},"getCombinationDepartureDayOfMonth",0,function(e){let t=T(e.fechaSalidaSegunCulturaA);return t?t.getDate():null},"getCombinationItemCompanyNames",0,function(e){return[u(e.nombreFantasiaProveedorA,e.nombreFantasiaTransportistaA),u(e.nombreFantasiaProveedorB,e.nombreFantasiaTransportistaB)]},"getCombinationMinTotalPrice",0,f,"getCombinationQualities",0,function(e){let t=new Set,r=[];for(let a of[...e.clasesTramoA,...e.clasesTramoB]){let e=a.clase.trim(),i=h(e);t.has(i)||(t.add(i),r.push(e))}return r},"getCombinationSortValue",0,g,"getCombinationTotalPriceInCurrency",0,_,"getCombinationsTrexMetrics",0,function(e,t){let r=d(e??[],"",""),a=new Set,i=1/0,n=0,o=0,l=0,u=e=>e.map(e=>(0,s.findTrexQuotation)(e.cotizacion,t)).filter(e=>void 0!==e&&e>0),c=e=>{if(!t)return{cheapest:e.clasesTramoA[0].precio+e.clasesTramoB[0].precio,dearest:e.clasesTramoA[e.clasesTramoA.length-1].precio+e.clasesTramoB[e.clasesTramoB.length-1].precio};let r=u(e.clasesTramoA),a=u(e.clasesTramoB);if(r.length&&a.length)return{cheapest:Math.min(...r)+Math.min(...a),dearest:Math.max(...r)+Math.max(...a)}};for(let e of r){let t=c(e);if(t&&(i=Math.min(i,t.cheapest),n=Math.max(n,t.dearest)),null!=e.idProveedorTransportistaA&&a.add(String(e.idProveedorTransportistaA)),null!=e.idProveedorTransportistaB&&a.add(String(e.idProveedorTransportistaB)),p(e)){o+=1;let t=Math.min(e.clasesTramoA.filter(m)[0].butacas,e.clasesTramoB.filter(m)[0].butacas);t>=1&&t<=5&&(l+=1)}}return{priceMin:Number.isFinite(i)?i:0,priceMax:n,numOfTrips:r.length,numOfAvailableTrips:o,numLastSeatsTrips:l,searchOperatorIds:Array.from(a)}},"groupCombinations",0,d,"isBookableOption",0,m,"isCombinationSelectable",0,p,"isMixedCombinationsLayout",0,function({hasSelectableCombinations:e,directServicesCount:t,isRoundtrip:r,isDeparture:a}){return e&&t>0&&!r&&a},"neutralizeNonRestrictingPriceRange",0,function(e,t,r){return e.priceRange&&(Number(e.priceRange[0])>t||Number(e.priceRange[1])<r)?e:{...e,priceRange:null}},"sortGroupedCombinations",0,function(e,t,r){return[...e].sort((e,a)=>g(e,t,r)-g(a,t,r))}],640548)},880892,e=>{"use strict";let t=null,r=null;e.s(["clearBannerTelemetry",0,()=>{t=null,r=null},"getBannerTelemetry",0,()=>t,"getViewBannerTelemetry",0,()=>
1r,"setBannerTelemetry",0,e=>{t=e},"setViewBannerTelemetry",0,e=>{r=e}])},696849,533991,329814,835885,956763,637896,e=>{"use strict";var t=e.i(822315),r=e.i(487121),a=e.i(854838),i=e.i(640548),n=e.i(630994),o=e.i(880892),l=e.i(227205),s=e.i(586838);let u=e=>e?{isHighlight:!0,label:e.message||""}:{isHighlight:!1,label:""};e.s(["getHighlightedLabel",0,u],533991);let c=[517],d=e=>null!=e&&c.includes(e);e.s(["hasFlexibleSchedule",0,d],329814);var m=e.i(36389);let p=[{value:m.sort.DEPARTURE_TIME,displayText:"hour_time_of_departure_min_max",default:!0},{value:m.sort.PRICE,displayText:"price_min_max",default:!1},{value:m.sort.DURATION,displayText:"duration_min_max",default:!1}];e.s(["sortOptions",0,p],835885);var _=e.i(882212);let f="p10_last_chosen_service";function g(e){try{if(!Number.isFinite(e.departureMillis))return;let t={departureMillis:e.departureMillis,departureLabel:e.departureLabel,clickedAtMillis:Date.now(),route:e.route,provider:e.provider??null,price:"number"==typeof e.price&&Number.isFinite(e.price)?e.price:null,serviceKey:e.serviceKey??null};window.sessionStorage.setItem(f,JSON.stringify(t))}catch{}}e.s(["readLastChosenService",0,function(){try{let e=window.sessionStorage.getItem(f);if(!e)return null;let t=JSON.parse(e);if(!Number.isFinite(t?.departureMillis)||!Number.isFinite(t?.clickedAtMillis))return null;return t}catch{return null}},"saveLastChosenService",0,g],956763);let h="exhaustedServiceKeys",v=e=>Number.isFinite(e.departureMillis)&&null!==e.idProveedor&&void 0!==e.idProveedor&&""!==e.idProveedor&&e.padOrigen&&e.padDestino?[e.departureMillis,e.idProveedor,e.padOrigen,e.padDestino].join("|"):null;function T(){try{let e=window.sessionStorage.getItem(h),t=e?JSON.parse(e):[];if(!Array.isArray(t))return[];return t.filter(e=>"string"==typeof e?.key&&e.key.length>0&&Number.isFinite(e?.passengers))}catch{return[]}}e.s(["buildServiceKey",0,v,"getExhaustedServiceEntries",0,T,"isServiceExhausted",0,function(e,t,r){return!!t&&e.some(e=>e.key===t&&r>=e.passengers)},"markServiceExhausted",0,function(e,t){try{if(!e||!Number.isFinite(t))return;let r=T(),a=r.find(t=>t.key===e);if(a){if(t>=a.passengers)return;a.passengers=t}else r.push({key:e,passengers:t});window.sessionStorage.setItem(h,JSON.stringify(r.slice(-30)))}catch{}},"shouldMarkServiceExhausted",0,e=>e.isDeparture&&e.savedQualitiesCount>=1],637896);var E=e.i(567354),D=e.i(367770);let y=e=>{let t=void 0===e?(0,o.getBannerTelemetry)():e;return t?{app_banner_type:t.app_banner_type,is_app_banner_shown:t.is_app_banner_shown,...t.app_banner_dismissed_type&&{app_banner_dismissed_type:t.app_banner_dismissed_type}}:{}};e.s(["createCombinationRouteViewedEvent",0,({businessUnit:e,combination:t,site:i})=>{try{let a=t.salidaCiudad?(0,_.formatGenericText)(t.salidaCiudad):null,n=t.llegadaCiudad?(0,_.formatGenericText)(t.llegadaCiudad):null,o=(0,s.parseDateInMillis)(t.fechaSalidaA),l=(0,s.parseDateInMillis)(t.fechaLlegadaB),u=o&&l&&l.isAfter(o)?Math.round(100*l.diff(o,"hour",!0))/100:null;return{name:r.EventNameEnum.ROUTE_VIEWED,properties:{site:i,url:location.href,business_unit:e,from_station:a,to_station:n,from_station_id:null,to_station_id:null,route:`${a} to ${n}`,trip_type:r.tripType.CONNECTION,trip_direction:r.tripDirectionType.DEPARTURE,is_route_view_available:!0,duration_trip:u,is_connection:!0,connection_type:r.connectionType.INTERNAL,connection_station:t.transbordo?(0,_.formatGenericText)(t.transbordo):null,layover_minutes:t.tiempoEsperaMinutos??null,legs_count:2,connection_providers:[t.nombreFantasiaProveedorA,t.nombreFantasiaProveedorB].filter(Boolean).map(e=>(0,_.formatGenericText)(e))}}}catch(e){return(0,a.trackingExpectedBehaviour)({componentName:"createCombinationRouteViewedEvent",labelDetails:`Error creating event - ${r.EventNameEnum.ROUTE_VIEWED} (combination)`,severity:"error"}),null}},"createConfirmPassengerDetailsEvent",0,({businessUnit:e,confirmPassengerDetails:t,site:i,passengerDetails:o,prePurchaseId:l})=>{let s=(0,_.getDatesParams)(t.servicesUrl);try{let a={},u={},c=[];if(t.departure){let e=(0,_.generateRouteText)({city:(0,_.formatGenericText)(t.departure.origin),state:(0,_.formatGenericText)(t.departure.stateOrigin)}),r=(0,_.generateRouteText)({city:(0,_.formatGenericText)(t.departure.destination),state:(0,_.formatGenericText)(t.departure.stateDestination)});a={from_station:e,to_station:r,from_station_id:Number(t.departure.originId),to_station_id:Number(t.departure.destinationId),available_seats:Number(t.departure.availableSeats),price_localcurrency:t.departure.priceLocalCurrency,service_charge_localcurrency:t.departure.serviceChargeLocalCurrency,departure_date:(0,_.formatStringDateToAmplitudeStringDate)(t.departure.departureDate),arrival_date:(0,_.formatStringDateToAmplitudeStringDate)(t.departure.arrivalDate),company:(0,_.formatGenericText)(t.departure.company),category:(0,_.formatGenericText)(t.departure.category),route:`${e} to ${r}`,trip_direction:t.departure.tripDirection,...t.isCombination&&{leg_number:1}},c.push(a)}if(t.return?.origin){let e=(0,_.generateRouteText)({city:(0,_.formatGenericText)(t.return?.origin),state:(0,_.formatGenericText)(t.return?.stateOrigin)}),r=(0,_.generateRouteText)({city:(0,_.formatGenericText)(t.return?.destination),state:(0,_.formatGenericText)(t.return?.stateDestination)});u={from_station:e,to_station:r,from_station_id:Number(t.return?.originId),to_station_id:Number(t.return?.destinationId),available_seats:Number(t.return?.availableSeats),price_localcurrency:t.return?.priceLocalCurrency,service_charge_localcurrency:t.return?.serviceChargeLocalCurrency,departure_date:(0,_.formatStringDateToAmplitudeStringDate)(t.return?.departureDate),arrival_date:(0,_.formatStringDateToAmplitudeStringDate)(t.return?.arrivalDate),company:(0,_.formatGenericText)(t.return?.company),category:(0,_.formatGenericText)(t.return?.category),route:`${e} to ${r}`,trip_direction:t.return.tripDirection,...t.isCombination&&{leg_number:2}},c.push(u)}return{name:r.EventNameEnum.CONFIRM_PASSENGER_DETAILS,properties:{url:location.href,site:i,business_unit:e,trip_type:t.isRoundtrip?r.tripType.ROUND_TRIP:r.tripType.ONE_WAY,search_departure_date:s.departureDate,search_return_date:s.returnDate,passengers:Number(t.passengers),...l&&{id_prepurchase:l},Services:[...c],...o&&o.length>0?{passenger_details:o}:{},...(0,n.getConnectionEventProps)({isCombination:!!t.isCombination})}}}catch(e){return console.error(`Error creating event - ${r.EventNameEnum.CONFIRM_PASSENGER_DETAILS}`,e),(0,a.trackingExpectedBehaviour)({componentName:"createConfirmPassengerDetailsEvent",labelDetails:`Error creating event - ${r.EventNameEnum.CONFIRM_PASSENGER_DETAILS}`,severity:"error"}),null}},"createConfirmSeatsEvent",0,({businessUnit:e,confirmSeatDetails:t,site:i,loyaltyVariant:o=null,loyaltyBenefitActive:l=null,hasMultipleQualities:s=!1})=>{let u=(0,_.getDatesParams)(t.servicesUrl);try{if(t.isDeparture&&t.departure){let a=(0,_.generateRouteText)({city:t.departure.origin,state:t.departure.stateOrigin}),c=(0,_.generateRouteText)({city:t.departure.destination,state:t.departure.stateDestination});return{name:r.EventNameEnum.CONFIRM_SEATS,properties:{url:location.href,site:i,business_unit:e,trip_type:t.isRoundtrip?r.tripType.ROUND_TRIP:r.tripType.ONE_WAY,search_departure_date:u.departureDate,search_return_date:u.returnDate,passengers:Number(t.passengers),has_multiple_qualities:s,Services:[{route:`${a} to ${c}`,from_station:a,to_station:c,from_station_id:Number(t.departure.originId),to_station_id:Number(t.departure.destinationId),available_seats:Number(t.departure.availableSeats),price_localcurrency:t.departure.priceLocalCurrency,service_charge_localcurrency:t.departure.serviceChargeLocalCurrency,departure_date:(0,_.formatStringDateToAmplitudeStringDate)(t.departure.departureDate),arrival_date:(0,_.formatStringDateToAmplitudeStringDate)(t.departure.arrivalDate),company:(0,_.formatGenericText)(t.departure.company),category:(0,_.formatGenericText)(t.departure.category),trip_direction:t.departure.tripDirection,...t.isCombination&&{leg_number:1}}],...(0,E.getLoyaltyAmplitudeProps)(o),...(0,E.getLoyaltyBenefitActiveAmplitudeProp)(l),...(0,n.getConnectionEventProps)({isCombination:!!t.isCombination,legNumber:1})}}}{let a=(0,_.generateRouteText)({city:(0,_.formatGenericText)(t.return?.origin),state:(0,_.formatGenericText)(t.return?.stateOrigin)}),c=(0,_.generateRouteText)({city:(0,_.formatGenericText)(t.return?.destination),state:(0,_.formatGenericText)(t.return?.stateDestination)});return{name:r.EventNameEnum.CONFIRM_SEATS,properties:{url:location.href,site:i,business_unit:e,trip_type:t.isRoundtrip?r.tripType.ROUND_TRIP:r.tripType.ONE_WAY,search_departure_date:u.departureDate,search_return_date:u.returnDate,passengers:Number(t.passengers),has_multiple_qualities:s,Services:[{route:`${a} to ${c}`,from_station:a,to_station:c,from_station_id:Number(t.return?.originId),to_station_id:Number(t.return?.destinationId),available_seats:Number(t.return?.availableSeats),price_localcurrency:t.return?.priceLocalCurrency,service_charge_localcurrency:t.return?.serviceChargeLocalCurrency,departure_date:(0,_.formatStringDateToAmplitudeStringDate)(t.return?.departureDate),arrival_date:(0,_.formatStringDateToAmplitudeStringDate)(t.return?.arrivalDate),company:(0,_.formatGenericText)(t.return?.company),category:(0,_.formatGenericText)(t.return?.category),trip_direction:t.return?.tripDirection,...t.isCombination&&{leg_number:2}}],...(0,E.getLoyaltyAmplitudeProps)(o),...(0,E.getLoyaltyBenefitActiveAmplitudeProp)(l),...(0,n.getConnectionEventProps)({isCombination:!!t.isCombination,legNumber:2})}}}}catch(e){return console.error(`Error creating event - ${r.EventNameEnum.CONFIRM_SEATS}`,e),(0,a.trackingExpectedBehaviour)({componentName:"createConfirmSeatsEvent",labelDetails:`Error creating event - ${r.EventNameEnum.CONFIRM_SEATS}`,severity:"error"}),null}},"createErrorFlowEvent",0,({errorFlowDetails:e})=>{try{return{name:r.EventNameEnum.ERROR_FLOW,properties:{url:location.href,site:e.site,funnel_step:e.funnelStep,error_message:e.message,detail
1:e.detail,id_prepurchase:e.idPrepurchase,pre_purchase_state:e.prePurchaseState,...e.expiredSearchContext??{}}}}catch(e){return console.error(`Error creating event - ${r.EventNameEnum.ERROR_FLOW}`,e),(0,a.trackingExpectedBehaviour)({componentName:"createErrorFlowEvent",labelDetails:`Error creating event - ${r.EventNameEnum.ERROR_FLOW}`,severity:"error"}),null}},"createOpenGalleryEvent",0,({businessUnit:e,searchDetails:i,service:n,isReturnService:o,type:l,isRoundTrip:u,site:c,availableServices:d})=>{try{let a=(0,_.resolveRoute)(i,o),m=(0,s.getLocationsFromSearchDetail)(a.departure.name),p=(0,s.getLocationsFromSearchDetail)(a.destination.name),f=(0,_.generateRouteText)(m),g=(0,_.generateRouteText)(p),h=(0,s.getLeadTimeDaysFromStringDateFromBFF)((0,s.parseDateInMillis)(n.FechaSalida)?.toString()),v="";try{i.departureDate&&i.departureDate.isValid()&&(v=(0,_.formatDateInArgentinaTimezone)(i.departureDate))}catch(e){}if(!v&&n.FechaSalida){let e=(0,_.formatServiceDateToAmplitude)(n.FechaSalida);e&&(v=(0,t.default)(e,_.DATE_TIME_FORMAT).tz(_.BS_AS_TIMEZONE).format(_.DATE_FORMAT))}v||(v=(0,_.formatDateInArgentinaTimezone)(null));let T=u&&i.returnDate?i.returnDate.format(_.DATE_FORMAT):null,E=`${f} - ${g}`;return{name:r.EventNameEnum.OPEN_GALLERY,properties:{site:c,type:l,url:window.location.href,business_unit:e,trip_type:u?r.tripType.ROUND_TRIP:r.tripType.ONE_WAY,search_departure_date:v,search_return_date:T,lead_time_search:h,passengers:i.passengers,search_days_duration_trip:u&&i.returnDate?(0,t.default)(i.returnDate).diff((0,t.default)(i.departureDate),"day"):null,available_service:d,trip_direction:o?r.tripDirectionType.RETURN:r.tripDirectionType.DEPARTURE,available_seats:n.Butacas,price_localcurrency:n.PrecioParteEntera&&n.PrecioParteDecimalPresentacion?`${n.PrecioParteEntera}.${n.PrecioParteDecimalPresentacion}`:String(n.Cotizacion?.ARS||0),from_station:a.departure.name,to_station:a.destination.name,route:E,from_station_id:Number(i.departureId)||null,to_station_id:Number(i.destinationId)||null,departure_date:n.FechaSalida?(0,_.formatServiceDateToAmplitude)(n.FechaSalida):(0,t.default)().tz(_.BS_AS_TIMEZONE).format(_.DATE_TIME_FORMAT),arrival_date:(0,_.formatServiceDateToAmplitude)(n.FechaLlegada),duration_trip:n.Duracion?.TotalMinutes||null,company:n.NombreProveedorVisualizacion||"",category:n.Calidad||""}}}catch(e){console.error(`Error creating event - ${r.EventNameEnum.OPEN_GALLERY}`,e),(0,a.trackingExpectedBehaviour)({componentName:"createOpenGalleryEvent",labelDetails:`Error creating event - ${r.EventNameEnum.OPEN_GALLERY}`,severity:"error"})}},"createRequestLogInEvent",0,({funnelStep:e})=>{try{return{name:r.EventNameEnum.REQUEST_LOG_IN,properties:{funnel_step:e}}}catch(e){return console.error(`Error creating event - ${r.EventNameEnum.REQUEST_LOG_IN}`,e),(0,a.trackingExpectedBehaviour)({componentName:"createRequestLogInEvent",labelDetails:`Error creating event - ${r.EventNameEnum.REQUEST_LOG_IN}`,severity:"error"}),null}},"createRouteViewedEvent",0,({businessUnit:e,searchDetails:t,service:a,infoService:i,isReturnService:n,isRouteViewAvailable:o,site:l})=>{let u=(0,_.resolveRoute)(t,n),c=(0,s.getLocationsFromSearchDetail)(u.departure.name),d=(0,s.getLocationsFromSearchDetail)(u.destination.name),m=(0,_.generateRouteText)(c),p=(0,_.generateRouteText)(d);return{name:r.EventNameEnum.ROUTE_VIEWED,properties:{site:l,url:location.href,business_unit:e,from_station:m,to_station:p,from_station_id:Number(u.departure.id)||null,to_station_id:Number(u.destination.id)||null,route:`${m} to ${p}`,trip_type:t.returnDate?r.tripType.ROUND_TRIP:r.tripType.ONE_WAY,trip_direction:n?r.tripDirectionType.RETURN:r.tripDirectionType.DEPARTURE,is_route_view_available:o,available_seats:a?.Butacas||null,duration_trip:a?.Duracion?.TotalHours||parseFloat(i?.duration)||null,company:(0,_.formatGenericText)(a?.NombreProveedorVisualizacion)||(0,_.formatGenericText)(i?.company)||null}}},"generateChooseCombinationEvent",0,({businessUnit:e,searchDetails:a,combination:i,selectedA:n,selectedB:o,site:l,position:u,availableCombinations:c,cardExpanded:d,viewedConnectionInfo:m})=>{try{let p=(0,s.getLocationsFromSearchDetail)(a.departureName),f=(0,s.getLocationsFromSearchDetail)(a.destinationName),g=(0,_.generateRouteText)(p),h=(0,_.generateRouteText)(f),v=i.transbordo?(0,_.formatGenericText)(i.transbordo):null,T=({legNumber:e,selected:t,company:r,fromStation:a,toStation:i,fromStationId:n,toStationId:o,fechaSalida:l,fechaLlegada:u})=>{let c,d;return{leg_number:e,available_seats:t?.butacas||0,price_localcurrency:t?.precio!=null?String(t.precio):null,from_station:a,to_station:i,from_station_id:n,to_station_id:o,price_usd:t?.cotizacion?.USD??t?.cotizacion?.usd??null,departure_date:(0,_.formatServiceDateToAmplitude)(l),arrival_date:(0,_.formatServiceDateToAmplitude)(u),duration_trip:(c=(0,s.parseDateInMillis)(l),d=(0,s.parseDateInMillis)(u),c&&d&&d.isAfter(c)?Math.round(100*d.diff(c,"hour",!0))/100:null),company:r?(0,_.formatGenericText)(r):null,category:t?.clase?(0,_.formatGenericText)(t.clase):null,route:a&&i?`${a} to ${i}`:null,service_highlighted:!1,has_photos:!1}},E=[n,o].find(e=>e&&!e.compraHabilitada);return{name:r.EventNameEnum.CHOOSE_SERVICE,properties:{...y(),site:l,type:r.ChooseServiceTypeEnum.SITE_RESULTS,url:location.href,business_unit:e,search_departure_date:a.departureDate.format(_.DATE_FORMAT),search_return_date:a.returnDate?a.returnDate.format(_.DATE_FORMAT):null,search_days_duration_trip:null,trip_type:r.tripType.CONNECTION,lead_time_search:(0,t.default)(a.departureDate).diff((0,t.default)(),"day"),is_connection:!0,connection_type:r.connectionType.INTERNAL,connection_station:v,layover_minutes:i.tiempoEsperaMinutos??null,legs_count:2,total_price_localcurrency:(n?.precio??0)+(o?.precio??0)||null,purchase_enabled:!!(n?.compraHabilitada&&o?.compraHabilitada),purchase_disabled_reason:E?.motivoCompraDeshabilitada||null,...void 0!==d&&{card_expanded:d},...void 0!==m&&{viewed_connection_info:m},service_highlighted:!1,student_discount:!1,Services:[T({legNumber:1,selected:n,company:i.nombreFantasiaProveedorA,fromStation:g,toStation:v,fromStationId:Number(a.departureId)||null,toStationId:null,fechaSalida:i.fechaSalidaA,fechaLlegada:i.fechaLlegadaA}),T({legNumber:2,selected:o,company:i.nombreFantasiaProveedorB,fromStation:v,toStation:h,fromStationId:null,toStationId:Number(a.destinationId)||null,fechaSalida:i.fechaSalidaB,fechaLlegada:i.fechaLlegadaB})],passengers:a?.passengers,position:u,available_service:c}}}catch(e){throw Error(`Error generating event - ${r.EventNameEnum.CHOOSE_SERVICE} (combination)`,e)}},"generateChooseServiceEvent",0,({businessUnit:e,searchDetails:a,service:i,isReturnService:n,type:o,isRoundTrip:l,site:c,position:m,availableServices:p,nearbyServiceData:f,hasPhotos:h=!1,serviceHighlighted:T})=>{try{let E,D,S,b,A,P,N=(0,_.resolveRoute)(a,n),O=(0,s.getLocationsFromSearchDetail)(N.departure.name),R=(0,s.getLocationsFromSearchDetail)(N.destination.name),C=(0,_.generateRouteText)(O),I=(0,_.generateRouteText)(R),x={};if(f){let e=i?.PadOrigen||"",t=i?.PadDestino||"",r=f?.originalFromStationName||"",a=f?.originalToStationName||"",n=e!==r,o=t!==a,l=(0,_.getOriginDestinationChangeType)(n,o,f.hasNearbyServices);x={from_nearby_search:!!f.hasNearbyServices,final_from_station_id:f.alternativeInfo?.IdPadOrigenAlternativo||null,final_to_station_id:f.alternativeInfo?.IdPadDestinoAlternativo||null,final_from_station:e?(0,_.formatGenericText)(e):null,final_to_station:t?(0,_.formatGenericText)(t):null,original_from_station_id:N?.departure?.id?Number(N.departure.id):null,original_to_station_id:N?.destination?.id?Number(N.destination.id):null,original_from_station:r?(0,_.formatGenericText)(r):null,original_to_station:a?(0,_.formatGenericText)(a):null,original_route:r&&a?`${(0,_.formatGenericText)(r)} to ${(0,_.formatGenericText)(a)}`:null,final_route:e&&t?`${(0,_.formatGenericText)(e)} to ${(0,_.formatGenericText)(t)}`:null,origin_destination_change_type:l,origin_distance_km:f.alternativeInfo?.DistanciaDesdePadOrigenOriginal&&"number"==typeof f.alternativeInfo.DistanciaDesdePadOrigenOriginal?Math.round(f.alternativeInfo.DistanciaDesdePadOrigenOriginal/1e3*100)/100:null,destination_distance_km:f.alternativeInfo?.DistanciaDesdePadDestinoOriginal&&"number"==typeof f.alternativeInfo.DistanciaDesdePadDestinoOriginal?Math.round(f.alternativeInfo.DistanciaDesdePadDestinoOriginal/1e3*100)/100:null}}if(!n){let e=Number(i?.FechaSalida?.match(/(\d)+/)?.[0]);g({departureMillis:e,departureLabel:i?.FechaSalida?(0,_.formatServiceDateToAmplitude)(i.FechaSalida):null,route:`${C} to ${I}`,provider:i?.NombreProveedor||null,price:"number"==typeof i?.Precio?i.Precio:null,serviceKey:v({departureMillis:e,idProveedor:i?.IdProveedor,padOrigen:i?.PadOrigen,padDestino:i?.PadDestino})})}if(f?.hasNearbyServices){let e=i?.PadOrigen||"",t=i?.PadDestino||"";E=e?(0,_.formatGenericText)(e):null,D=t?(0,_.formatGenericText)(t):null,S=f?.alternativeInfo?.IdPadOrigenAlternativo||null,b=f?.alternativeInfo?.IdPadDestinoAlternativo||null,A=E&&D?`${E} to ${D}`:null}else E=C,D=I,S=N?.departure?.id?Number(N.departure.id):null,b=N?.destination?.id?Number(N.destination.id):null,A=C&&I?`${C} to ${I}`:null;return{name:r.EventNameEnum.CHOOSE_SERVICE,properties:{...y(),site:c,type:o,url:location.href,business_unit:e,search_departure_date:a.departureDate.format(_.DATE_FORMAT),search_return_date:a.returnDate?a.returnDate.format(_.DATE_FORMAT):null,search_days_duration_trip:a.returnDate?(0,t.default)(a.returnDate).diff((0,t.default)(a.departureDate),"day"):null,trip_type:l?r.tripType.ROUND_TRIP:r.tripType.ONE_WAY,lead_time_search:(0,t.default)(a.departureDate).diff((0,t.default)(),"day"),service_highlighted:T||!1,student_discount:(i?.Beneficios??[]).some(e=>
1"Estudiante"===e.Tipo),Services:[{trip_direction:n?r.tripDirectionType.RETURN:r.tripDirectionType.DEPARTURE,available_seats:i?.Butacas||0,price_localcurrency:i?.PrecioParteEntera&&i?.PrecioParteDecimalPresentacion?`${i.PrecioParteEntera}.${i.PrecioParteDecimalPresentacion}`:null,from_station:E,to_station:D,from_station_id:S,to_station_id:b,price_usd:i?.Cotizacion?.USD||null,departure_date:i?.FechaSalida?(0,_.formatServiceDateToAmplitude)(i.FechaSalida):null,arrival_date:i?.FechaLlegada?(0,_.formatServiceDateToAmplitude)(i.FechaLlegada):null,duration_trip:i?.Duracion?.TotalHours||null,company:i?.NombreProveedorVisualizacion?(0,_.formatGenericText)(i.NombreProveedorVisualizacion):null,category:i?.Calidad?(0,_.formatGenericText)(i.Calidad):null,route:A,service_highlighted:!!i?.feature?.highlight,price_crossed:i?.CotizacionDePrecioAnterior?.Ars??null,event_label:(Array.isArray(i?.feature?.highlight)&&i.feature.highlight.length>1?i.feature.highlight.map(e=>u(e).label):u(Array.isArray(i?.feature?.highlight)?i.feature.highlight[0]:i?.feature?.highlight).label)??null,discount:i.PrecioPorcentaje??null,has_photos:!!h,tags:(P=(i?.feature?.tags??[]).map(e=>e.key).filter(e=>!!e),d(i?.IdProveedorTransportista)&&P.unshift("flexible-schedule"),P)}],passengers:a?.passengers,position:m,available_service:p,...(()=>{let e=i?.QualitiesGroup;if(Array.isArray(e)&&e.length>0){let t=e.filter(e=>(e.Butacas||0)>0).length;return t>0?{available_categories_count:t}:{}}return{}})(),...x}}}catch(e){throw Error(`Error generating event - ${r.EventNameEnum.CHOOSE_SERVICE}`,e)}},"generateSearchResultsEvent",0,({businessUnit:e,searchDetails:a,services:n,isReturnService:o,appliedOrder:u,order:c,appliedFilter:d,filter:m,site:f,nearbyData:g,originalServicesCount:h,loyaltyVariant:v=null,loyaltyBenefitActive:T=null,combinaciones:S=null,viewPaseP10:b=null,bannerTelemetry:A})=>{try{let P=(0,_.resolveRoute)(a,o),N=(0,s.getLocationsFromSearchDetail)(P.departure.name),O=(0,s.getLocationsFromSearchDetail)(P.destination.name),R=(0,_.generateRouteText)(N),C=(0,_.generateRouteText)(O),{maxPrice:I,maxPriceCompany:x}=n.reduce((e,t)=>{let r=parseFloat(`${t.PrecioParteEntera}.${t.PrecioParteDecimalPresentacion}`);return r>e.maxPrice&&(e.maxPrice=r,e.maxPriceCompany=t.NombreProveedorVisualizacion),e},{maxPrice:0,maxPriceCompany:""}),F=n.reduce((e,t)=>{let r=t.NombreProveedorVisualizacion,a=(0,_.formatServiceDateToAmplitude)(t.FechaSalida);return r&&!e.companies.includes(r)&&e.companies.push(r),a&&!e.hours.includes(a)&&e.hours.push(a),e},{companies:[],hours:[]}),B=n.filter(e=>!(0,s.isServiceDeparted)(e.FechaSalida)&&e.Butacas>=1),L=n.filter(e=>!(0,s.isServiceDeparted)(e.FechaSalida)&&0===e.Butacas),M={is_nearby_results:!1,alternative_from_stations:[],alternative_to_stations:[],alternative_from_station_ids:[],alternative_to_station_ids:[],from_station_distances_km:[],to_station_distances_km:[],nearby_search_radius_km:25,alternative_routes:[]};if(g){M.is_nearby_results=g.servicesWithOriginalDeparture?.length>0||g.servicesWithOriginalArrival?.length>0||g.servicesWithOthersDepartureAndArrival?.length>0,M.nearby_search_radius_km=g.searchRadius?Math.round(g.searchRadius/1e3*100)/100:25;let e=new Set,t=new Set,r=new Set,a=new Set,i=[],n=[],o=new Set;g.servicesWithOriginalDeparture?.forEach(t=>{if(t.InformacionDePadsAlternativos){let e=t.InformacionDePadsAlternativos;if(e.IdPadOrigenAlternativo&&r.add(e.IdPadOrigenAlternativo),e.DistanciaDesdePadOrigenOriginal){let t=Math.round(e.DistanciaDesdePadOrigenOriginal/1e3*100)/100;i.push(t)}}t.Servicios?.forEach(t=>{if(t.PadOrigen&&e.add((0,_.formatGenericText)(t.PadOrigen)),t.PadOrigen&&t.PadDestino){let e=`${(0,_.formatGenericText)(t.PadOrigen)} to ${(0,_.formatGenericText)(t.PadDestino)}`;o.add(e)}})}),g.servicesWithOriginalArrival?.forEach(l=>{if(l.InformacionDePadsAlternativos){let s=l.InformacionDePadsAlternativos;if(s.IdPadDestinoAlternativo){if(a.add(s.IdPadDestinoAlternativo),s.DistanciaDesdePadDestinoOriginal){let e=Math.round(s.DistanciaDesdePadDestinoOriginal/1e3*100)/100;n.push(e)}l.Servicios?.forEach(e=>{if(e.PadDestino&&t.add((0,_.formatGenericText)(e.PadDestino)),e.PadOrigen&&e.PadDestino){let t=`${(0,_.formatGenericText)(e.PadOrigen)} to ${(0,_.formatGenericText)(e.PadDestino)}`;o.add(t)}})}else if(s.IdPadOrigenAlternativo){if(r.add(s.IdPadOrigenAlternativo),s.DistanciaDesdePadOrigenOriginal){let e=Math.round(s.DistanciaDesdePadOrigenOriginal/1e3*100)/100;i.push(e)}l.Servicios?.forEach(t=>{if(t.PadOrigen&&e.add((0,_.formatGenericText)(t.PadOrigen)),t.PadOrigen&&t.PadDestino){let e=`${(0,_.formatGenericText)(t.PadOrigen)} to ${(0,_.formatGenericText)(t.PadDestino)}`;o.add(e)}})}}}),g.servicesWithOthersDepartureAndArrival?.forEach(l=>{if(l.InformacionDePadsAlternativos){let e=l.InformacionDePadsAlternativos;if(e.IdPadOrigenAlternativo&&(r.add(e.IdPadOrigenAlternativo),e.DistanciaDesdePadOrigenOriginal)){let t=Math.round(e.DistanciaDesdePadOrigenOriginal/1e3*100)/100;i.push(t)}if(e.IdPadDestinoAlternativo&&(a.add(e.IdPadDestinoAlternativo),e.DistanciaDesdePadDestinoOriginal)){let t=Math.round(e.DistanciaDesdePadDestinoOriginal/1e3*100)/100;n.push(t)}}l.Servicios?.forEach(r=>{let a=l.InformacionDePadsAlternativos;if(a?.IdPadOrigenAlternativo&&r.PadOrigen&&e.add((0,_.formatGenericText)(r.PadOrigen)),a?.IdPadDestinoAlternativo&&r.PadDestino&&t.add((0,_.formatGenericText)(r.PadDestino)),(a?.IdPadOrigenAlternativo||a?.IdPadDestinoAlternativo)&&r.PadOrigen&&r.PadDestino){let e=`${(0,_.formatGenericText)(r.PadOrigen)} to ${(0,_.formatGenericText)(r.PadDestino)}`;o.add(e)}})}),M.alternative_from_stations=Array.from(e),M.alternative_to_stations=Array.from(t),M.alternative_from_station_ids=Array.from(r),M.alternative_to_station_ids=Array.from(a),M.from_station_distances_km=i,M.to_station_distances_km=n,M.alternative_routes=Array.from(o)}let $=S?.internas||[],G=S?.externas||[],w=[...$,...G],z=w.length>0,k=z?(0,i.groupCombinations)($,"",""):[],U=k.filter(i.isCombinationSelectable),H={};if(z){let e=w.map(e=>e.tiempoEsperaMinutos).filter(e=>"number"==typeof e&&e>=0),t=Array.from(new Set(w.map(e=>
1e.transbordo).filter(Boolean).map(e=>(0,_.formatGenericText)(e)))),r=Array.from(new Set(w.flatMap(i.getCombinationItemCompanyNames).filter(Boolean).map(e=>(0,_.formatGenericText)(e)))),a=w.map(e=>e.precio).filter(e=>"number"==typeof e&&e>0);H={connection_count:k.length,connections_internal_count:$.length,connections_external_count:G.length,min_layover_minutes:e.length?Math.min(...e):null,avg_layover_minutes:e.length?Math.round(e.reduce((e,t)=>e+t,0)/e.length):null,connection_stations:t,min_connection_price:a.length?Math.min(...a):null,connection_providers:r}}let V=e=>{let t=e.clasesTramoA.find(i.isBookableOption),r=e.clasesTramoB.find(i.isBookableOption);return(t?.precio??0)+(r?.precio??0)},W=U.filter(e=>!(0,s.isServiceDeparted)(e.fechaSalidaA)),Y=z?new Set([...F.companies,...U.flatMap(e=>[e.nombreFantasiaProveedorA,e.nombreFantasiaProveedorB])].filter(Boolean).map(e=>(0,_.formatGenericText)(e))).size:F.companies.length,j=z?new Set([...F.hours,...U.map(e=>(0,_.formatServiceDateToAmplitude)(e.fechaSalidaA))].filter(Boolean)).size:F.hours.length,q=I,K=x;for(let e of U){let t=V(e);t>q&&(q=t,K=[e.nombreFantasiaProveedorA,e.nombreFantasiaProveedorB].filter(Boolean).join(" + "))}let Q=h>0&&M.is_nearby_results?r.ResultsTypeEnum.ORIGINALS_AND_NEARBY:h>0?r.ResultsTypeEnum.ORIGINALS:M.is_nearby_results?r.ResultsTypeEnum.NEARBY_ONLY:r.ResultsTypeEnum.EMPTY;return{name:r.EventNameEnum.SEARCH_RESULTS,properties:{...y(A),...(0,l.getPageViewTrail)(),site:f,url:location.href,business_unit:e,from_station:R,to_station:C,from_station_id:P.departure.id,to_station_id:P.destination.id,trip_type:a.returnDate?r.tripType.ROUND_TRIP:r.tripType.ONE_WAY,trip_direction:o?r.tripDirectionType.RETURN:r.tripDirectionType.DEPARTURE,search_days_duration_trip:a.returnDate?(0,t.default)(a.returnDate).diff((0,t.default)(a.departureDate),"day"):null,search_departure_date:a.departureDate.format(_.DATE_FORMAT),search_return_date:a.returnDate?a.returnDate.format(_.DATE_FORMAT):null,lead_time_search:(0,t.default)(a.departureDate).diff((0,t.default)(),"day"),passengers:a?.passengers,is_order_default:!u,order_default_by:!u&&(0,_.sortOptionToAmplitude)(c?.name??p.find(e=>e.default).value),order_by:u?(0,_.sortOptionToAmplitude)(c.name):null,is_filter:d,is_filter_by_company:m?.provider?.isApplied||!1,is_filter_by_company_value:m?.provider?.isApplied?m?.provider?.value.join(","):null,is_filter_by_category:m?.quality?.isApplied||!1,is_filter_by_category_value:m?.quality?.isApplied?m?.quality?.value.join(","):null,is_filter_by_price:m?.priceRange?.isApplied||!1,is_filter_by_hour:m?.departureTimeRange?.isApplied||!1,is_quick_date_picker:m?.otherDates?.isApplied||!1,is_quick_date_picker_datediff:m?.otherDates?.value||0,route:`${R} to ${C}`,has_service:n.length>0||U.length>0,max_price:q,max_price_company:K||"empty",available_companies:Y,available_hours:j,available_service:(B?.length||0)+W.length,soldout_services:L?.length||0,total_services:n.length+U.length,results_type:z?h>0?r.ResultsTypeEnum.ORIGINALS_AND_CONNECTIONS:n.length>0?r.ResultsTypeEnum.NEARBY_AND_CONNECTIONS:r.ResultsTypeEnum.CONNECTIONS_ONLY:Q,is_connection:z,direct_count:h,...H,is_nearby_results:M.is_nearby_results,alternative_from_stations:M.alternative_from_stations,alternative_to_stations:M.alternative_to_stations,alternative_from_station_ids:M.alternative_from_station_ids,alternative_to_station_ids:M.alternative_to_station_ids,from_station_distances_km:M.from_station_distances_km,to_station_distances_km:M.to_station_distances_km,nearby_search_radius_km:M.nearby_search_radius_km,alternative_routes:M.alternative_routes,...(0,E.getLoyaltyAmplitudeProps)(v),...(0,E.getLoyaltyBenefitActiveAmplitudeProp)(T),...(0,D.getPaseP10ViewProp)(b)}}}catch(e){throw Error(`Error generating event - ${r.EventNameEnum.SEARCH_RESULTS}`,e)}},"generateTripSearchEvent",0,({searchBoxLocation:e,businessUnit:a,searchDetails:i,typeDetail:n,site:o,hasPlaceToStay:l=!1,fromSuggestion:u=!1})=>{try{let c=(0,s.getLocationsFromSearchDetail)(i.departure.text),d=(0,s.getLocationsFromSearchDetail)(i.destination.text),m=(0,_.generateRouteText)(c),p=(0,_.generateRouteText)(d);return{name:r.EventNameEnum.SEARCH_TRIPS,properties:{url:location.href,site:o,funnel_step:e,business_unit:a,from_station:m,to_station:p,from_station_id:Number(i.departure.id),to_station_id:Number(i.destination.id),trip_type:i.returnDate?r.tripType.ROUND_TRIP:r.tripType.ONE_WAY,search_departure_date:i.departureDate.format(_.DATE_FORMAT),search_return_date:i.returnDate?i.returnDate.format(_.DATE_FORMAT):null,lead_time_search:(0,t.default)(i.departureDate).diff((0,t.default)(),"day"),passengers:i?.passengers,route:`${m} to ${p}`,type_detail:n,search_days_duration_trip:i.returnDate?(0,t.default)(i.returnDate).diff((0,t.default)(i.departureDate),"day"):null,Services:{route:`${m} to ${p}`},has_place_to_stay:l,from_suggestion:u}}}catch(t){throw Error(`Error generating event - ${r.EventNameEnum.SEARCH_TRIPS} - ${e}`,t)}},"pageViewResult",0,({businessUnit:e,searchDetails:a,site:i})=>{let n=(0,s.getLocationsFromSearchDetail)(a.departure.text),o=(0,s.getLocationsFromSearchDetail)(a.destination.text),l=(0,_.generateRouteText)(n),u=(0,_.generateRouteText)(o);return{name:r.EventNameEnum.VIEW_RESULTPAGE,properties:{site:i,url:location.href,business_unit:e,from_station:l,to_station:u,from_station_id:Number(a.departure.id)||null,to_station_id:Number(a.destination.id)||null,route:`${l} to ${u}`,trip_type:a.returnDate?r.tripType.ROUND_TRIP:r.tripType.ONE_WAY,search_departure_date:(0,t.default)(a.departureDate).format(_.DATE_FORMAT),search_return_date:a.returnDate?(0,t.default)(a.returnDate).format(_.DATE_FORMAT):null,passengers:a?.passengers}}},"serviceHighlightShowed",0,({businessUnit:e,service:t,searchDetails:i,attribution:n,site:o})=>{try{let a=(0,s.getLocationsFromSearchDetail)(i.departure.text),l=(0,s.getLocationsFromSearchDetail)(i.destination.text),u=(0,_.generateRouteText)(a),c=(0,_.generateRouteText)(l);return{name:r.EventNameEnum.SERVICE_HIGHLIGHTED_SHOWED,properties:{site:o,url:location.href,business_unit:e,type:r.ChooseServiceTypeEnum.SITE_RESULTS,trip_type:r.tripType.ONE_WAY,departure_date:t.FechaSalida,return_date:t.FechaLlegada,google_bus_price:`${t.PrecioParteEntera}.${t.PrecioParteDecimalPresentacion}`,price_localcurrency:`${t.PrecioParteEntera}.${t.PrecioParteDecimalPresentacion}`,from_station:u,to_station:c,from_station_id:Number(i.departure.id)||null,to_station_id:Number(i.destination.id)||null,route:`${u} to ${c}`,company:t.NombreProveedorVisualizacion,category:t.Calidad,attribution:n}}}catch(e){return(0,a.trackingExpectedBehaviour)({componentName:"serviceHighlightShowed",labelDetails:`Error creating event - ${r.EventNameEnum.SERVICE_HIGHLIGHTED_SHOWED}`,severity:"error"}),null}},"trackBannerShowed",0,({businessUnit:e,searchDetails:t,site:i})=>{try{let a=(0,s.getLocationsFromSearchDetail)(t.departure.text),n=(0,s.getLocationsFromSearchDetail)(t.destination.text),o=(0,_.generateRouteText)(a),l=(0,_.generateRouteText)(n);return{name:r.EventNameEnum.BANNER_SHOWED,properties:{site:i,business_unit:e,route:`${o} to ${l}`}}}catch(e){return console.error(`Error creating event - ${r.EventNameEnum.BANNER_SHOWED}`,e),(0,a.trackingExpectedBehaviour)({componentName:"trackBannerShowed",labelDetails:`Error creating event - ${r.EventNameEnum.BANNER_SHOWED}`,severity:"error"}),null}}],696849)},227205,e=>{"use strict";let t=null;e.s(["clearPageViewTrail",0,()=>{t=null},"getPageViewTrail",0,()=>t,"setPageViewTrail",0,e=>{t=e}])}]);

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.