1(function(n){n(function(){var h,u,c,e,i,v;if(busSearchForm.init("home"),h=n("#main-navbar"),u=n(".search-section"),u.length){c=992;function f(){var n=u.offset().top,t=u.outerHeight()||0;e=n+t-(h.outerHeight(!0)||70)}e=0;f();function o(){var i=n(window).width(),t;if(i<c){u.removeClass("search-section-fixed");n("body").removeClass("search-fixed");u.css("top","");return}t=n(window).scrollTop();t>e?(u.addClass("search-section-fixed"),n("body").addClass("search-fixed")):(u.removeClass("search-section-fixed"),n("body").removeClass("search-fixed"),u.css("top",""))}n(window).on("scroll",o);n(window).on("resize",function(){f();o()});f();o()}var s=window.samar&&window.samar.homeDiscountCards?window.samar.homeDiscountCards:[],l=n("#home-discounts-segments-modal"),y=n("#home-discounts-segments-modal-title"),p=n("#home-discounts-segments-table");if(s.length&&l.length){i=abp.localization.getResource("Samar");function t(n){if(!n)return"";var t=document.createElement("div");return t.appendChild(document.createTextNode(String(n))),t.innerHTML}function a(n){return Number(n||0).toFixed(2).replace(".",",")}function r(n,t,i){return n&&n[t]!==undefined&&n[t]!==null?n[t]:n&&n[i]!==undefined&&n[i]!==null?n[i]:null}function w(n,t){var i={empresa:"samar",origen:n,destino:t},r=Object.keys(i).filter(function(n){return i[n]}).map(function(n){return encodeURIComponent(n)+"="+encodeURIComponent(i[n])}).join("&");return"https://regular.autobusing.es/venta/inicio_externo?"+r}function b(n){if(window.openExternalWithOverlay){window.openExternalWithOverlay(n);return}window.open(n,"_blank","noopener,noreferrer")}v=["Label:MondayShort","Label:TuesdayShort","Label:WednesdayShort","Label:ThursdayShort","Label:FridayShort","Label:SaturdayShort","Label:SundayShort"];function k(n){var r,t;if(!n)return"-";for(r=[],t=0;t<Math.min(7,n.length);t++)n[t]==="*"&&r.push(i(v[t]));return r.length?r.join(", "):"-"}function d(n){var o=r(n,"segments","Segments")||[],s,f,l;if(!o.length)return'<div class="alert alert-info mb-0">'+t(i("Text:NoData"))+"<\/div>";for(s='<div class="promotions-segments-table__row promotions-segments-table__row--header" role="row"><div class="promotions-segments-table__cell" role="columnheader">'+t(i("Label:Origin"))+'<\/div><div class="promotions-segments-table__cell" role="columnheader">'+t(i("Label:Destination"))+'<\/div><div class="promotions-segments-table__cell" role="columnheader">'+t(i("Schedules:Promotions:TravelTime"))+'<\/div><div class="promotions-segments-table__cell" role="columnheader">'+t(i("Label:Days"))+'<\/div><div class="promotions-segments-table__cell" role="columnheader">'+t(i("Label:Class"))+'<\/div><div class="promotions-segments-table__cell" role="columnheader">'+t(i("Schedules:Promotions:Prices"))+'<\/div><div class="promotions-segments-table__cell" role="columnheader">'+t(i("Schedules:Promotions:Buy"))+"<\/div><\/div>",f=0;f<o.length;f++){var u=o[f],v=r(u,"originStopName","OriginStopName")||"",y=r(u,"destinationStopName","DestinationStopName")||"",p=r(u,"travelTime","TravelTime")||"-",w=r(u,"daysCombination","DaysCombination")||"",b=r(u,"className","ClassName")||"-",h=Number(r(u,"originalPrice","OriginalPrice")||0),c=Number(r(u,"finalPrice","FinalPrice")||0),d=!!r(u,"canBuyOnline","CanBuyOnline"),g=r(u,"originStopCode","OriginStopCode")||"",nt=r(u,"destinationStopCode","DestinationStopCode")||"",e='<div class="promotion-segment-price">';c!==h&&(e+='<span class="promotion-segment-price-old">'+a(h)+" â¬<\/span>");e+='<span class="promotion-segment-price-final">'+a(c)+" â¬<\/span>";e+="<\/div>";l=d?'<button type="button" class="btn btn-primary btn-sm rounded-pill home-segment-buy-btn" data-origin-code="'+t(g)+'" data-destination-code="'+t(nt)+'">'+t(i("Schedules:Promotions:Buy"))+"<\/button>":'<button type="button" class="btn btn-outline-secondary btn-sm rounded-pill" disabled>'+t(i("Trips:NotAvailableOnlinePurchase"))+"<\/button>";s+='<div class="promotions-segments-table__row" role="row"><div class="promotions-segments-table__cell" role="cell"><div class="d-md-none small text-muted">'+t(i("Label:Origin"))+"<\/div><span>"+t(v)+'<\/span><\/div><div class="promotions-segments-table__cell" role="cell"><div class="d-md-none small text-muted">'+t(i("Label:Destination"))+"<\/div><span>"+t(y)+'<\/span><\/div><div class="promotions-segments-table__cell" role="cell"><div class="d-md-none small text-muted">'+t(i("Schedules:Promotions:TravelTime"))+"<\/div><span>"+t(p)+'<\/span><\/div><div class="promotions-segments-table__cell" role="cell"><div class="d-md-none small text-muted">'+t(i("Label:Days"))+"<\/div><span>"+t(k(w))+'<\/span><\/div><div class="promotions-segments-table__cell" role="cell"><div class="d-md-none small text-muted">'+t(i("Label:Class"))+"<\/div><span>"+t(b)+'<\/span><\/div><div class="promotions-segments-table__cell" role="cell"><div class="d-md-none small text-muted">'+t(i("Schedules:Promotions:Prices"))+"<\/div>"+e+'<\/div><div class="promotions-segments-table__cell" role="cell"><div class="d-md-none small text-muted">'+t(i("Schedules:Promotions:Buy"))+"<\/div>"+l+"<\/div><\/div>"}return s}n(document).on("click",".home-promotion-card-trigger",function(t){var u,e;if(t.preventDefault(),u=Number(n(this).attr("data-card-index")),!isNaN(u)&&!(u<0)&&!(u>=s.length)){var f=s[u],o=!!r(f,"isOpenDestination","IsOpenDestination"),h=r(f,"name","Name")||"",c=r(f,"originStopName","OriginStopName")||"",a=r(f,"destinationStopName","DestinationStopName")||"",v=o?h||i("Schedules:Promotions:SegmentsModalTitle"):(c+" - "+a).trim()||i("Schedules:Promotions:SegmentsModalTitle");y.text(v);p.html(d(f));e=bootstrap.Modal.getOrCreateInstance(l[0]);e.show()}});n(document).on("click",".home-segment-buy-btn",function(){var t=String(n(this).attr("data-origin-code")||""),i=String(n(this).attr("data-destination-code")||""),r;t&&i&&(r=w(t,i),b(r))})}})})(jQuery);
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.