vendor: 6,431 bytes, lines 1-8
1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 2"use strict";[].forEach.call(document.querySelectorAll('.slider'),function(el){var slider=tns({container:el,items:1,loop:true,speed:450,controlsText:['<span class="icon chevron-left"></span><span class="sr-only">prev</span>','<span class="icon chevron-right"></span><span class="sr-only">next</span>']});});[].forEach.call(document.querySelectorAll('.hero-slider'),function(el){var slider=tns({container:el,items:1,edgePadding:32,loop:true,speed:450,controlsText:['<span class="icon chevron-left"></span><span class="sr-only">prev</span>','<span class="icon chevron-right"></span><span class="sr-only">next</span>'],responsive:{480:{edgePadding:58},744:{edgePadding:100},1280:{edgePadding:100},1440:{edgePadding:100}}});el.querySelectorAll('.lozad').forEach(function(image){image.setAttribute('src',image.dataset.src);});});[].forEach.call(document.querySelectorAll('.carousel'),function(el){if(el.classList.contains('sidebar')){var columns=el.getAttribute('data-columns');var slider=tns({container:el,items:1,gutter:20,loop:false,speed:450,slideBy:"page",preventScrollOnTouch:'force',controlsText:['<span class="icon chevron-left"></span><span class="sr-only">prev</span>','<span class="icon chevron-right"></span><span class="sr-only">next</span>'],responsive:{900:{items:2},1300:{items:columns}}});}else var slider=tns({container:el,items:1,gutter:20,loop:false,speed:450,slideBy:"page",preventScrollOnTouch:'force',controlsText:['<span class="icon chevron-left"></span><span class="sr-only">prev</span>','<span class="icon chevron-right"></span><span class="sr-only">next</span>'],responsive:{600:{items:2},1100:{items:5},1200:{}}});});[].forEach.call(document.querySelectorAll('.gallery'),function(el){var slider=tns({container:el,center:true,items:1,edgePadding:32,loop:true,speed:450,nav:false,controlsText:['<span class="icon chevron-left"></span><span class="sr-only">prev</span>','<span class="icon chevron-right"></span><span class="sr-only">next</span>'],responsive:{480:{edgePadding:58},744:{edgePadding:156},1280:{edgePadding:306},1440:{edgePadding:356}}});});[].forEach.call(document.querySelectorAll('.aside-slider'),function(el){var slider=tns({container:el,center:true,items:1,edgePadding:0,loop:true,speed:450,nav:false,controlsText:['<span class="icon chevron-left"></span><span class="sr-only">prev</span>','<span class="icon chevron-right"></span><span class="sr-only">next</span>']});slider.getInfo().controlsContainer.classList.add('aside-slider__controlsContainer');slider.getInfo().nextButton.classList.add('aside-slider__button-next');slider.getInfo().prevButton.classList.add('aside-slider__button-prev');});; 3/* @license MIT https://raw.githubusercontent.com/focus-trap/tabbable/v6.3.0/LICENSE */ 4/*! 5* tabbable 6.3.0 6* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE 7*/ 8!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):(t="undefined"!=typeof globalThis?globalThis:t||self,function(){var n=t.tabbable,o=t.tabbable={};e(o),o.noConflict=function(){return t.tabbable=n,o}}())}(this,(function(t){"use strict";var e=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],n=e.join(","),o="undefined"==typeof Element,r=o?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,i=!o&&Element.prototype.getRootNode?function(t){var e;return null==t||null===(e=t.getRootNode)||void 0===e?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},a=function(t,e){var n;void 0===e&&(e=!0);var o=null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"inert");return""===o||"true"===o||e&&t&&a(t.parentNode)},l=function(t,e,o){if(a(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(n));return e&&r.call(t,n)&&i.unshift(t),i=i.filter(o)},u=function(t,e,o){for(var i=[],l=Array.from(t);l.length;){var c=l.shift();if(!a(c,!1))if("SLOT"===c.tagName){var d=c.assignedElements(),f=d.length?d:c.children,s=u(f,!0,o);o.flatten?i.push.apply(i,s):i.push({scopeParent:c,candidates:s})}else{r.call(c,n)&&o.filter(c)&&(e||!t.includes(c))&&i.push(c);var p=c.shadowRoot||"function"==typeof o.getShadowRoot&&o.getShadowRoot(c),h=!a(p,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(c));if(p&&h){var v=u(!0===p?c.children:p.children,!0,o);o.flatten?i.push.apply(i,v):i.push({scopeParent:c,candidates:v})}else l.unshift.apply(l,c.children)}}return i},c=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},d=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||function(t){var e,n=null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"contenteditable");return""===n||"true"===n}(t))&&!c(t)?0:t.tabIndex},f=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},s=function(t){return"INPUT"===t.tagName},p=function(t){return function(t){return s(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,n=t.form||i(t),o=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=o(window.CSS.escape(t.name));else try{e=o(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var r=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]}(e,t.form);return!r||r===t}(t)},h=function(t){var e=t.getBoundingClientRect(),n=e.width,o=e.height;return 0===n&&0===o},v=function(t,e){var n=e.displayCheck,o=e.getShadowRoot;if("full-native"===n&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(t).visibility)return!0;var a=r.call(t,"details>summary:first-of-type")?t.parentElement:t;if(r.call(a,"details:not([open]) *"))return!0;
8if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return h(t)}else{if("function"==typeof o){for(var l=t;t;){var u=t.parentElement,c=i(t);if(u&&!u.shadowRoot&&!0===o(u))return h(t);t=t.assignedSlot?t.assignedSlot:u||c===t.ownerDocument?u:c.host}t=l}if(function(t){var e,n,o,r,a=t&&i(t),l=null===(e=a)||void 0===e?void 0:e.host,u=!1;if(a&&a!==t)for(u=!!(null!==(n=l)&&void 0!==n&&null!==(o=n.ownerDocument)&&void 0!==o&&o.contains(l)||null!=t&&null!==(r=t.ownerDocument)&&void 0!==r&&r.contains(t));!u&&l;){var c,d,f;u=!(null===(d=l=null===(c=a=i(l))||void 0===c?void 0:c.host)||void 0===d||null===(f=d.ownerDocument)||void 0===f||!f.contains(l))}return u}(t))return!t.getClientRects().length;if("legacy-full"!==n)return!0}return!1},b=function(t,e){return!(e.disabled||a(e)||function(t){return s(t)&&"hidden"===t.type}(e)||v(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var n=0;n<e.children.length;n++){var o=e.children.item(n);if("LEGEND"===o.tagName)return!!r.call(e,"fieldset[disabled] *")||!o.contains(t)}return!0}e=e.parentElement}return!1}(e))},y=function(t,e){return!(p(e)||d(e)<0||!b(t,e))},m=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},g=function(t){var e=[],n=[];return t.forEach((function(t,o){var r=!!t.scopeParent,i=r?t.scopeParent:t,a=function(t,e){var n=d(t);return n<0&&e&&!c(t)?0:n}(i,r),l=r?g(t.candidates):i;0===a?r?e.push.apply(e,l):e.push(i):n.push({documentOrder:o,tabIndex:a,item:t,isScope:r,content:l})})),n.sort(f).reduce((function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t}),[]).concat(e)},w=e.concat("iframe").join(",");t.focusable=function(t,e){return(e=e||{}).getShadowRoot?u([t],e.includeContainer,{filter:b.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):l(t,e.includeContainer,b.bind(null,e))},t.getTabIndex=d,t.isFocusable=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==r.call(t,w)&&b(e,t)},t.isTabbable=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==r.call(t,n)&&y(e,t)},t.tabbable=function(t,e){var n;return n=(e=e||{}).getShadowRoot?u([t],e.includeContainer,{filter:y.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:m}):l(t,e.includeContainer,y.bind(null,e)),g(n)}})); 9 10; 11/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 12"use strict";var displayResponseIq=true;if(localStorage.getItem('purlPartner')){var purlStorage=localStorage.getItem('purlPartner');var purl=JSON.parse(purlStorage);if(!purl.purlData.enableResponseIq)displayResponseIq=false;}if(displayResponseIq){var script=document.createElement('script');script.type='text/javascript';script.src='//app.responseiq.com/widgetsrc.php?widget=ET7E94119SG104J21UY&widgetrnd=Math.random();';document.getElementsByTagName('head')[0].appendChild(script);}; 13Drupal.debounce=function(func,wait,immediate){let timeout;let result;return function(...args){const context=this;const later=function(){timeout=null;if(!immediate)result=func.apply(context,args);};const callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,wait);if(callNow)result=func.apply(context,args);return result;};};; 14"use strict";(function(){var didInit=false;function initMunchkin(){if(didInit===false){didInit=true;Munchkin.init('340-UVX-079');}}var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src='//munchkin.marketo.net/munchkin.js';s.onreadystatechange=function(){if(this.readyState=='complete'||this.readyState=='loaded')initMunchkin();};s.onload=initMunchkin;document.getElementsByTagName('head')[0].appendChild(s);})();; 15"use strict";(function($,Drupal,debounce,once){'use strict';Drupal.behaviors.languageLabel={attach:function attach(context,settings){if($('.language .language-switcher-language-url li a:contains("English")').length)$('.language .language-switcher-language-url li a:contains("English")').text('United States');}};Drupal.behaviors.wrapIframe={attach:function attach(context,settings){$('.wp iframe').each(function(){$(this).wrap("<div class='video-wrapper'/>");});}};Drupal.behaviors.megaMenuClose={attach:function attach(context,settings){$('.js-menu-close').on('click',function(){if($(window).width()<=1280){$('.mobilenav__content nav li.dropdown .toggle').removeClass('is-active').next().removeClass('show');setTimeout(function(){$('.mobilenav__content nav li.dropdown > div').removeClass('show');},50);}
15else{$('.navigation nav li.dropdown .toggle').removeClass('is-active').next().removeClass('show');setTimeout(function(){$('.navigation nav li.dropdown > div').removeClass('show');},50);}});}};Drupal.behaviors.activeClass={attach:function attach(context,settings){var path=window.location.href;$('.tabs a, .basic-content.extended .sidebar li a').each(function(){if(this.href===path)$(this).addClass('active');});}};Drupal.behaviors.viewLarger={attach:function attach(context,settings){$(window).on('load',function(){$('.view-larger').each(function(){$(this).appendTo($(this).prev());});});}};Drupal.behaviors.listSeparators={attach:function attach(context,settings){$(function(){var lastElement=false;$("ul > li").each(function(){if(lastElement&&lastElement.offset().top!=$(this).offset().top)lastElement.addClass("last-item");lastElement=$(this);}).last().addClass("last-item");});}};Drupal.behaviors.mobileMenu={attach:function attach(context,settings){$('.header .nav-toggle').on('click',function(){var $this=$(this);if($this.attr('aria-expanded')==='true')$(this).attr('aria-expanded','false');else $(this).attr('aria-expanded','true');$('header .header__mobile-nav').toggleClass('open');$('body').toggleClass('mobile-nav-open');return false;});$('.nav-close').on('click',function(){$('.header .nav-toggle').trigger('click');});$('.header .mega-menu .content .dropdown > a').on('click',function(e){if($(window).width()<=1280){e.preventDefault();$(this).parent().toggleClass('active');$(this).next().toggleClass('show');}});}};Drupal.behaviors.removeGoogleLinkerParam={attach:function attach(context){once('removeGoogleLinkerParam','body',context).forEach(function(){var cleanupLinkerParam=function cleanupLinkerParam(){var url=new URL(window.location.href);if(!url.searchParams.has('_gl'))return;url.searchParams.delete('_gl');window.history.replaceState(window.history.state,'',url.toString());};
15if(document.readyState==='complete')cleanupLinkerParam();else window.addEventListener('load',cleanupLinkerParam,{once:true});});}};Drupal.behaviors.anchors={attach:function attach(context,settings){var anchor=window.location.hash.substr(1);if(anchor){var anchorLoad=$("a[href$='#"+anchor+"']");$(document).ready(function(){anchorMove(anchorLoad);});}var anchors=$('.js-anchor');if(anchors.length)anchors.each(function(){$(this).on('click',function(e){e.preventDefault();anchorMove($(this));});});}};Drupal.behaviors.anchorCardIcon={attach:function attach(context,settings){once('anchorCardIcon','body',context).forEach(function(body){var anchor=window.location.hash.substr(1);if(anchor){var anchorElem=$(".cards-icons .container");$(document).ready(function(){var offsetAmount=200;var headerHeight=$('header').height()+offsetAmount;var anchorElement=$(".cards-icons .container");$('html, body').animate({scrollTop:anchorElement.offset().top-headerHeight},200);});}});}};function anchorMove(el){var offsetAmount=200;var headerHeight=$('header').height()+offsetAmount;var anchorElement=$(el.attr('href'));$('html, body').animate({scrollTop:anchorElement.offset().top-headerHeight},200);}Drupal.behaviors.playPauseVideo={attach:function attach(context,settings){var playPauseButtons=context.querySelectorAll('.js-play-pause');Object.values(playPauseButtons).map(function(playPauseButton){playPauseButton.addEventListener('click',function(e){e.stopPropagation();var media=this.closest('.tns-item');var video=media.querySelector("video");if(video.paused===true){video.play();this.classList.remove("pause");video.classList.add("play");media.classList.add("play");this.innerHTML="<span class='visually-hidden'>Play</span>";}else{video.pause();this.classList.add("pause");media.classList.add("paused");this.innerHTML="<span class='visually-hidden'>Pause</span>";}});});}};Drupal.behaviors.miscDebounce={attach:function attach(context,settings){var $searchBar=$('#search-area');var searchMobile=false;var viewportChange=debounce(function(){if(window.innerWidth<=768){if(searchMobile===false){$searchBar.prependTo('header .mm__top-left');searchMobile=true;}}else{if(searchMobile===true){$searchBar.prependTo('.js-desktop-utilities');searchMobile=false;}}if(window.innerWidth<=1024){if($('.front .hero .offers').length){var heroHeight=$('.offer.hero .content .wrapper').height()+$('.hero .search').height()+280;$('section.hero article').css('height',heroHeight+'px');}}else{}},250);window.addEventListener('resize',viewportChange);window.addEventListener('load',viewportChange);}};Drupal.behaviors.formInvalid={initialized:false,attach:function attach(context,settings){once('formSubmit','.js-form-submit',context).forEach(function(element){$('.js-form-submit').on('click',function(e){$('.form-item-destination-select .select select.js-webform-select2').attr('value',$('.form-item-destination-select .select .select2 .selection .select2-selection__rendered').attr('title'));var elements=$(this).parent().parent().parent().find('.js-form-wrapper [required="required"], .required');elements.each(function(){var elem=$(this);setTimeout(function(){if(!elem.attr('value')||elem[0].localName!='select')elem.addClass('invalid');var error=elem.attr('data-webform-required-error');if(elem.find('.error-message').length===0&&!elem.attr('value')&&!elem.hasClass('invalid'))if(error!==undefined){console.log(elem.attr('value'));elem.parent().append("<span class=\"error-message\">".concat(error,"</span>"));}else elem.parent().append("<span class=\"error-message\">Please fill out this field.</span>");},100,elem);});});});}};})(jQuery,Drupal,Drupal.debounce,once);; 16"use strict";(function($,Drupal,debounce,once){'use strict';Drupal.behaviors.langSwitch={attach:function attach(context,settings){$(window).on('load',function(){var activeText=$('.language-switcher-language-url li.is-active').attr('hreflang');if(activeText=='en-uk')activeText='UK';else if(activeText=='en-au')activeText='AU';else if(activeText=='en-sg')activeText='SG';else if(activeText=='en-ca')activeText='CA';else if(activeText=='en-nz')activeText='NZ';else activeText='US';$('.language a.toggle').text(activeText).toggleClass(activeText);});}};Drupal.behaviors.cookiePolicy={attach:function attach(context,settings){function getCookie(name){var match=document.cookie.match(RegExp('(?:^|;\\s*)'+name+'=([^;]*)'));return match?match[1]:null;}if(getCookie('cookie-agreed'))$("footer ul .last-item > span").hide();$(document).on("click",'footer ul .last-item > span',function(e){e.preventDefault();$("#sliding-popup").addClass("show");});$(window).on('load',function(){if(sessionStorage.getItem('cookie-banner')===null){$("#sliding-popup").addClass("show");sessionStorage.setItem('cookie-banner','amtrak');}else $("#sliding-popup").removeClass("show");});}};Drupal.behaviors.nzPhoneNumber={attach:function attach(context,settings){var verbGeoIp='https://geoip.verbinteractive.com';var nz=["NZ"];var nzPhone='0800 000 554';function getGeo(verbGeoIp,nz,nzPhone,$this){fetch(verbGeoIp).then(function(response){if(!response.ok)throw Error(response.statusText);return response.json();}).then(function(data){if(nz.includes(data.cc)){$this.attr('data-phone-intl',nzPhone);$this.attr('href','tel:'+nzPhone);if($this[0].parentNode.classList.contains('phone'))$this[0].innerHTML=nzPhone;else $this.find('.js-dynamic-phone-number')[0].innerHTML=nzPhone;}}).catch(function(error){console.log(error);});}$(once('dynamic-phone','.js-dynamic-phone-number-link',context)).each(function(){var $this=$(this);if($('body').hasClass('site-amtrak--au'))getGeo(verbGeoIp,nz,nzPhone,$this);});}};})(jQuery,Drupal,Drupal.debounce,once);;
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.